Remove method getMailboxHash()
This commit is contained in:
@@ -12,25 +12,6 @@ use Kanboard\Core\Base;
|
|||||||
*/
|
*/
|
||||||
class MailHelper extends Base
|
class MailHelper extends Base
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* Get the mailbox hash from an email address
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @param string $email
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getMailboxHash($email)
|
|
||||||
{
|
|
||||||
if (! strpos($email, '@') || ! strpos($email, '+')) {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
list($localPart, ) = explode('@', $email);
|
|
||||||
list(, $identifier) = explode('+', $localPart);
|
|
||||||
|
|
||||||
return $identifier;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter mail subject
|
* Filter mail subject
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -6,14 +6,6 @@ use Kanboard\Helper\MailHelper;
|
|||||||
|
|
||||||
class MailHelperTest extends Base
|
class MailHelperTest extends Base
|
||||||
{
|
{
|
||||||
public function testMailboxHash()
|
|
||||||
{
|
|
||||||
$helper = new MailHelper($this->container);
|
|
||||||
$this->assertEquals('test1', $helper->getMailboxHash('a+test1@localhost'));
|
|
||||||
$this->assertEquals('', $helper->getMailboxHash('test1@localhost'));
|
|
||||||
$this->assertEquals('', $helper->getMailboxHash('test1'));
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testFilterSubject()
|
public function testFilterSubject()
|
||||||
{
|
{
|
||||||
$helper = new MailHelper($this->container);
|
$helper = new MailHelper($this->container);
|
||||||
|
|||||||
Reference in New Issue
Block a user