2017-07-12 15:12:40 +00:00
|
|
|
<?php
|
|
|
|
|
2017-07-14 23:56:16 +00:00
|
|
|
namespace Tests\MediaWiki\Minerva;
|
2017-07-12 15:12:40 +00:00
|
|
|
|
2019-05-07 20:27:56 +00:00
|
|
|
use MediaWiki\MediaWikiServices;
|
2019-04-10 21:43:50 +00:00
|
|
|
use MediaWiki\Minerva\SkinOptions;
|
2017-07-12 15:12:40 +00:00
|
|
|
use MediaWikiTestCase;
|
2017-08-16 19:18:08 +00:00
|
|
|
use MinervaUI;
|
2017-07-12 15:12:40 +00:00
|
|
|
use MWTimestamp;
|
|
|
|
use OutputPage;
|
|
|
|
use QuickTemplate;
|
|
|
|
use RequestContext;
|
|
|
|
use SkinMinerva;
|
|
|
|
use SpecialPage;
|
|
|
|
use Title;
|
|
|
|
use User;
|
|
|
|
use Wikimedia\TestingAccessWrapper;
|
|
|
|
|
2018-04-15 23:12:19 +00:00
|
|
|
// phpcs:ignore MediaWiki.Files.ClassMatchesFilename.NotMatch
|
2017-07-12 15:12:40 +00:00
|
|
|
class EchoNotifUser {
|
Fix seen notifications appearing as unseen on mobile
Important note: Make sure to distinguish unseen from unread
One way to reproduce minerva and non-minerva notification inconsistencies:
- Have all your alerts and notices seen. This is displayed with grayed out
number on vector skin or no number at all, if you have (marked as) read.
- Generate new alert or notice (one is enough) in your preferred way.
- You can check minerva and non-minerva at this step. Both should be in sync.
But don't perform any additional action.
- Open the notification popup in some non-minerva skin (I have tried with
vector and monobook), marking it as seen.
- Check the notification icon in minerva. At this point, you should see
notification displayed as unseen.
The reason bug appeared in the first place is that alert/notice timestamps
were mixed up when seen time is obtained. We get seen time from
EchoSeenTime class, where we get smaller of the two timestamps,
using PHP method `min()`. See I27109ee6a248. Then, we get last unread
notification timestamp (which can be either alert or notice), and compare
that to seen time. That leads to the situation when you have only one of
alerts or notices with unread items, smaller timestamp is used for seen,
and most recent for unread, at which point we compare timestamps for
two separate things.
Previous behavior of getting seen timestamps (using max instead of min) would
probably solve the problem, but some other inconsistencies might arrise.
This should prevent any weird and unpredictable behavior to happen.
Bug: T183076
Change-Id: I20bbd6c590086b1c3eccf82983aad59eb3144a7a
2018-01-10 16:26:29 +00:00
|
|
|
public function __construct(
|
|
|
|
$lastUnreadAlertTime, $lastUnreadMessageTime, $echoNotificationCount
|
|
|
|
) {
|
|
|
|
$this->lastUnreadAlertTime = $lastUnreadAlertTime;
|
|
|
|
$this->lastUnreadMessageTime = $lastUnreadMessageTime;
|
2017-07-12 15:12:40 +00:00
|
|
|
$this->echoNotificationCount = $echoNotificationCount;
|
|
|
|
}
|
Fix seen notifications appearing as unseen on mobile
Important note: Make sure to distinguish unseen from unread
One way to reproduce minerva and non-minerva notification inconsistencies:
- Have all your alerts and notices seen. This is displayed with grayed out
number on vector skin or no number at all, if you have (marked as) read.
- Generate new alert or notice (one is enough) in your preferred way.
- You can check minerva and non-minerva at this step. Both should be in sync.
But don't perform any additional action.
- Open the notification popup in some non-minerva skin (I have tried with
vector and monobook), marking it as seen.
- Check the notification icon in minerva. At this point, you should see
notification displayed as unseen.
The reason bug appeared in the first place is that alert/notice timestamps
were mixed up when seen time is obtained. We get seen time from
EchoSeenTime class, where we get smaller of the two timestamps,
using PHP method `min()`. See I27109ee6a248. Then, we get last unread
notification timestamp (which can be either alert or notice), and compare
that to seen time. That leads to the situation when you have only one of
alerts or notices with unread items, smaller timestamp is used for seen,
and most recent for unread, at which point we compare timestamps for
two separate things.
Previous behavior of getting seen timestamps (using max instead of min) would
probably solve the problem, but some other inconsistencies might arrise.
This should prevent any weird and unpredictable behavior to happen.
Bug: T183076
Change-Id: I20bbd6c590086b1c3eccf82983aad59eb3144a7a
2018-01-10 16:26:29 +00:00
|
|
|
public function getLastUnreadAlertTime() {
|
|
|
|
return $this->lastUnreadAlertTime;
|
|
|
|
}
|
|
|
|
public function getLastUnreadMessageTime() {
|
|
|
|
return $this->lastUnreadMessageTime;
|
2017-07-12 15:12:40 +00:00
|
|
|
}
|
|
|
|
public function getNotificationCount() {
|
|
|
|
return $this->echoNotificationCount;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2017-07-17 20:34:47 +00:00
|
|
|
* @coversDefaultClass SkinMinerva
|
2017-07-14 23:56:16 +00:00
|
|
|
* @group MinervaNeue
|
2017-07-12 15:12:40 +00:00
|
|
|
*/
|
|
|
|
class SkinMinervaTest extends MediaWikiTestCase {
|
2018-09-26 23:03:20 +00:00
|
|
|
const OPTIONS_MODULE = 'skins.minerva.options';
|
2017-07-12 15:12:40 +00:00
|
|
|
|
2019-04-10 21:43:50 +00:00
|
|
|
private function overrideSkinOptions( $options ) {
|
|
|
|
$mockOptions = new SkinOptions();
|
|
|
|
$mockOptions->setMultiple( $options );
|
|
|
|
$this->setService( 'Minerva.SkinOptions', $mockOptions );
|
2017-07-12 15:12:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @covers ::setContext
|
|
|
|
* @covers ::hasCategoryLinks
|
|
|
|
*/
|
|
|
|
public function testHasCategoryLinksWhenOptionIsOff() {
|
|
|
|
$outputPage = $this->getMockBuilder( OutputPage::class )
|
|
|
|
->disableOriginalConstructor()
|
|
|
|
->getMock();
|
|
|
|
$outputPage->expects( $this->never() )
|
|
|
|
->method( 'getCategoryLinks' );
|
|
|
|
|
2019-08-01 16:18:18 +00:00
|
|
|
$this->overrideSkinOptions( [ SkinOptions::CATEGORIES => false ] );
|
2017-07-12 15:12:40 +00:00
|
|
|
$context = new RequestContext();
|
|
|
|
$context->setTitle( Title::newFromText( 'Test' ) );
|
|
|
|
$context->setOutput( $outputPage );
|
|
|
|
|
|
|
|
$skin = new SkinMinerva();
|
|
|
|
$skin->setContext( $context );
|
|
|
|
$skin = TestingAccessWrapper::newFromObject( $skin );
|
|
|
|
|
|
|
|
$this->assertEquals( $skin->hasCategoryLinks(), false );
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @dataProvider provideHasCategoryLinks
|
|
|
|
* @param array $categoryLinks
|
|
|
|
* @param bool $expected
|
|
|
|
* @covers ::setContext
|
2017-12-29 20:26:59 +00:00
|
|
|
* @covers ::hasCategoryLinks
|
2017-07-12 15:12:40 +00:00
|
|
|
*/
|
|
|
|
public function testHasCategoryLinks( array $categoryLinks, $expected ) {
|
|
|
|
$outputPage = $this->getMockBuilder( OutputPage::class )
|
|
|
|
->disableOriginalConstructor()
|
|
|
|
->getMock();
|
|
|
|
$outputPage->expects( $this->once() )
|
|
|
|
->method( 'getCategoryLinks' )
|
|
|
|
->will( $this->returnValue( $categoryLinks ) );
|
|
|
|
|
2019-08-01 16:18:18 +00:00
|
|
|
$this->overrideSkinOptions( [ SkinOptions::CATEGORIES => true ] );
|
2019-04-10 21:43:50 +00:00
|
|
|
|
2017-07-12 15:12:40 +00:00
|
|
|
$context = new RequestContext();
|
|
|
|
$context->setTitle( Title::newFromText( 'Test' ) );
|
|
|
|
$context->setOutput( $outputPage );
|
|
|
|
|
|
|
|
$skin = new SkinMinerva();
|
|
|
|
$skin->setContext( $context );
|
|
|
|
|
|
|
|
$skin = TestingAccessWrapper::newFromObject( $skin );
|
|
|
|
|
|
|
|
$this->assertEquals( $skin->hasCategoryLinks(), $expected );
|
|
|
|
}
|
|
|
|
|
|
|
|
public function provideHasCategoryLinks() {
|
|
|
|
return [
|
|
|
|
[ [], false ],
|
|
|
|
[
|
|
|
|
[
|
|
|
|
'normal' => '<ul><li><a href="/wiki/Category:1">1</a></li></ul>'
|
|
|
|
],
|
|
|
|
true
|
|
|
|
],
|
|
|
|
[
|
|
|
|
[
|
|
|
|
'hidden' => '<ul><li><a href="/wiki/Category:Hidden">Hidden</a></li></ul>'
|
|
|
|
],
|
|
|
|
true
|
|
|
|
],
|
|
|
|
[
|
|
|
|
[
|
|
|
|
'normal' => '<ul><li><a href="/wiki/Category:1">1</a></li></ul>',
|
|
|
|
'hidden' => '<ul><li><a href="/wiki/Category:Hidden">Hidden</a></li></ul>'
|
|
|
|
],
|
|
|
|
true
|
|
|
|
],
|
|
|
|
[
|
|
|
|
[
|
|
|
|
'unexpected' => '<ul><li><a href="/wiki/Category:1">1</a></li></ul>'
|
|
|
|
],
|
|
|
|
false
|
|
|
|
],
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Test whether the font changer module is correctly added to the list context modules
|
|
|
|
*
|
|
|
|
* @covers ::getContextSpecificModules
|
|
|
|
* @dataProvider provideGetContextSpecificModules
|
|
|
|
* @param mixed $backToTopValue whether back to top feature is enabled
|
|
|
|
* @param string $moduleName Module name that is being tested
|
|
|
|
* @param bool $expected Whether the module is expected to be returned by the function being tested
|
|
|
|
*/
|
2019-04-10 21:43:50 +00:00
|
|
|
public function testGetContextSpecificModules( $backToTopValue, $moduleName, $expected ) {
|
|
|
|
$this->overrideSkinOptions( [
|
2019-07-30 00:24:23 +00:00
|
|
|
SkinOptions::TALK_AT_TOP => false,
|
|
|
|
SkinOptions::HISTORY_IN_PAGE_ACTIONS => false,
|
|
|
|
SkinOptions::TOOLBAR_SUBMENU => false,
|
2019-08-22 20:31:31 +00:00
|
|
|
SkinOptions::MAIN_MENU_EXPANDED => false,
|
|
|
|
SkinOptions::PERSONAL_MENU => false,
|
2019-04-10 21:43:50 +00:00
|
|
|
'backToTop' => $backToTopValue,
|
2019-03-29 21:31:09 +00:00
|
|
|
] );
|
2019-04-10 21:43:50 +00:00
|
|
|
|
|
|
|
$skin = new SkinMinerva();
|
2017-07-12 15:12:40 +00:00
|
|
|
$title = Title::newFromText( 'Test' );
|
2017-07-17 19:34:45 +00:00
|
|
|
$testContext = RequestContext::getMain();
|
|
|
|
$testContext->setTitle( $title );
|
2017-07-12 15:12:40 +00:00
|
|
|
|
2017-07-17 19:49:49 +00:00
|
|
|
$skin->setContext( $testContext );
|
2017-07-12 15:12:40 +00:00
|
|
|
|
|
|
|
if ( $expected ) {
|
|
|
|
$this->assertContains( $moduleName, $skin->getContextSpecificModules() );
|
|
|
|
} else {
|
|
|
|
$this->assertNotContains( $moduleName, $skin->getContextSpecificModules() );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public function provideGetContextSpecificModules() {
|
|
|
|
return [
|
2018-09-26 23:03:20 +00:00
|
|
|
[ true, self::OPTIONS_MODULE, true ],
|
|
|
|
[ false, self::OPTIONS_MODULE, false ],
|
2017-07-12 15:12:40 +00:00
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Test the notification user button
|
|
|
|
*
|
2019-06-10 15:51:35 +00:00
|
|
|
* @covers ::prepareUserNotificationsButton
|
|
|
|
* @dataProvider providePrepareUserNotificationsButton
|
2019-06-19 17:31:16 +00:00
|
|
|
* @param array|string $expectedUserNotificationsData Expected test case outcome
|
2017-07-12 15:12:40 +00:00
|
|
|
* @param string $message Test message
|
|
|
|
* @param Title $title
|
|
|
|
* @param bool $useEcho Whether to use Extension:Echo
|
|
|
|
* @param bool $isUserLoggedIn
|
|
|
|
* @param string $newtalks New talk page messages for the current user
|
Fix seen notifications appearing as unseen on mobile
Important note: Make sure to distinguish unseen from unread
One way to reproduce minerva and non-minerva notification inconsistencies:
- Have all your alerts and notices seen. This is displayed with grayed out
number on vector skin or no number at all, if you have (marked as) read.
- Generate new alert or notice (one is enough) in your preferred way.
- You can check minerva and non-minerva at this step. Both should be in sync.
But don't perform any additional action.
- Open the notification popup in some non-minerva skin (I have tried with
vector and monobook), marking it as seen.
- Check the notification icon in minerva. At this point, you should see
notification displayed as unseen.
The reason bug appeared in the first place is that alert/notice timestamps
were mixed up when seen time is obtained. We get seen time from
EchoSeenTime class, where we get smaller of the two timestamps,
using PHP method `min()`. See I27109ee6a248. Then, we get last unread
notification timestamp (which can be either alert or notice), and compare
that to seen time. That leads to the situation when you have only one of
alerts or notices with unread items, smaller timestamp is used for seen,
and most recent for unread, at which point we compare timestamps for
two separate things.
Previous behavior of getting seen timestamps (using max instead of min) would
probably solve the problem, but some other inconsistencies might arrise.
This should prevent any weird and unpredictable behavior to happen.
Bug: T183076
Change-Id: I20bbd6c590086b1c3eccf82983aad59eb3144a7a
2018-01-10 16:26:29 +00:00
|
|
|
* @param MWTimestamp|bool $lastUnreadAlertTime Timestamp or false
|
|
|
|
* @param MWTimestamp|bool $lastUnreadMessageTime Timestamp or false
|
2017-07-12 15:12:40 +00:00
|
|
|
* @param int|bool $echoNotificationCount
|
Fix seen notifications appearing as unseen on mobile
Important note: Make sure to distinguish unseen from unread
One way to reproduce minerva and non-minerva notification inconsistencies:
- Have all your alerts and notices seen. This is displayed with grayed out
number on vector skin or no number at all, if you have (marked as) read.
- Generate new alert or notice (one is enough) in your preferred way.
- You can check minerva and non-minerva at this step. Both should be in sync.
But don't perform any additional action.
- Open the notification popup in some non-minerva skin (I have tried with
vector and monobook), marking it as seen.
- Check the notification icon in minerva. At this point, you should see
notification displayed as unseen.
The reason bug appeared in the first place is that alert/notice timestamps
were mixed up when seen time is obtained. We get seen time from
EchoSeenTime class, where we get smaller of the two timestamps,
using PHP method `min()`. See I27109ee6a248. Then, we get last unread
notification timestamp (which can be either alert or notice), and compare
that to seen time. That leads to the situation when you have only one of
alerts or notices with unread items, smaller timestamp is used for seen,
and most recent for unread, at which point we compare timestamps for
two separate things.
Previous behavior of getting seen timestamps (using max instead of min) would
probably solve the problem, but some other inconsistencies might arrise.
This should prevent any weird and unpredictable behavior to happen.
Bug: T183076
Change-Id: I20bbd6c590086b1c3eccf82983aad59eb3144a7a
2018-01-10 16:26:29 +00:00
|
|
|
* @param string|bool $alertSeenTime String in format TS_ISO_8601 or false
|
|
|
|
* @param string|bool $msgSeenTime String in format TS_ISO_8601 or false
|
2017-07-12 15:12:40 +00:00
|
|
|
* @param string|bool $formattedEchoNotificationCount
|
|
|
|
*/
|
2019-06-10 15:51:35 +00:00
|
|
|
public function testPrepareUserNotificationsButton(
|
2019-06-19 17:31:16 +00:00
|
|
|
$expectedUserNotificationsData, $message, $title, $useEcho, $isUserLoggedIn,
|
Fix seen notifications appearing as unseen on mobile
Important note: Make sure to distinguish unseen from unread
One way to reproduce minerva and non-minerva notification inconsistencies:
- Have all your alerts and notices seen. This is displayed with grayed out
number on vector skin or no number at all, if you have (marked as) read.
- Generate new alert or notice (one is enough) in your preferred way.
- You can check minerva and non-minerva at this step. Both should be in sync.
But don't perform any additional action.
- Open the notification popup in some non-minerva skin (I have tried with
vector and monobook), marking it as seen.
- Check the notification icon in minerva. At this point, you should see
notification displayed as unseen.
The reason bug appeared in the first place is that alert/notice timestamps
were mixed up when seen time is obtained. We get seen time from
EchoSeenTime class, where we get smaller of the two timestamps,
using PHP method `min()`. See I27109ee6a248. Then, we get last unread
notification timestamp (which can be either alert or notice), and compare
that to seen time. That leads to the situation when you have only one of
alerts or notices with unread items, smaller timestamp is used for seen,
and most recent for unread, at which point we compare timestamps for
two separate things.
Previous behavior of getting seen timestamps (using max instead of min) would
probably solve the problem, but some other inconsistencies might arrise.
This should prevent any weird and unpredictable behavior to happen.
Bug: T183076
Change-Id: I20bbd6c590086b1c3eccf82983aad59eb3144a7a
2018-01-10 16:26:29 +00:00
|
|
|
$newtalks, $lastUnreadAlertTime = false, $lastUnreadMessageTime = false,
|
|
|
|
$echoNotificationCount = false, $alertSeenTime = false, $msgSeenTime = false,
|
2017-07-12 15:12:40 +00:00
|
|
|
$formattedEchoNotificationCount = false
|
|
|
|
) {
|
|
|
|
$user = $this->getMockBuilder( User::class )
|
|
|
|
->disableOriginalConstructor()
|
|
|
|
->setMethods( [ 'isLoggedIn' ] )
|
|
|
|
->getMock();
|
|
|
|
$user->expects( $this->any() )
|
|
|
|
->method( 'isLoggedIn' )
|
|
|
|
->will( $this->returnValue( $isUserLoggedIn ) );
|
|
|
|
|
|
|
|
$skin = TestingAccessWrapper::newFromObject(
|
|
|
|
$this->getMockBuilder( SkinMinerva::class )
|
|
|
|
->disableOriginalConstructor()
|
2019-05-07 20:27:56 +00:00
|
|
|
->setMethods( [ 'getTitle', 'getUser', 'useEcho',
|
2017-07-12 15:12:40 +00:00
|
|
|
'getEchoNotifUser', 'getEchoSeenTime',
|
|
|
|
'getFormattedEchoNotificationCount' ] )
|
|
|
|
->getMock()
|
|
|
|
);
|
|
|
|
$skin->expects( $this->any() )
|
|
|
|
->method( 'getTitle' )
|
|
|
|
->will( $this->returnValue( $title ) );
|
|
|
|
$skin->expects( $this->any() )
|
|
|
|
->method( 'getUser' )
|
|
|
|
->will( $this->returnValue( $user ) );
|
|
|
|
$skin->expects( $this->any() )
|
|
|
|
->method( 'useEcho' )
|
|
|
|
->will( $this->returnValue( $useEcho ) );
|
|
|
|
$skin->expects( $this->any() )
|
|
|
|
->method( 'getEchoNotifUser' )
|
|
|
|
->will( $this->returnValue(
|
|
|
|
new EchoNotifUser(
|
Fix seen notifications appearing as unseen on mobile
Important note: Make sure to distinguish unseen from unread
One way to reproduce minerva and non-minerva notification inconsistencies:
- Have all your alerts and notices seen. This is displayed with grayed out
number on vector skin or no number at all, if you have (marked as) read.
- Generate new alert or notice (one is enough) in your preferred way.
- You can check minerva and non-minerva at this step. Both should be in sync.
But don't perform any additional action.
- Open the notification popup in some non-minerva skin (I have tried with
vector and monobook), marking it as seen.
- Check the notification icon in minerva. At this point, you should see
notification displayed as unseen.
The reason bug appeared in the first place is that alert/notice timestamps
were mixed up when seen time is obtained. We get seen time from
EchoSeenTime class, where we get smaller of the two timestamps,
using PHP method `min()`. See I27109ee6a248. Then, we get last unread
notification timestamp (which can be either alert or notice), and compare
that to seen time. That leads to the situation when you have only one of
alerts or notices with unread items, smaller timestamp is used for seen,
and most recent for unread, at which point we compare timestamps for
two separate things.
Previous behavior of getting seen timestamps (using max instead of min) would
probably solve the problem, but some other inconsistencies might arrise.
This should prevent any weird and unpredictable behavior to happen.
Bug: T183076
Change-Id: I20bbd6c590086b1c3eccf82983aad59eb3144a7a
2018-01-10 16:26:29 +00:00
|
|
|
$lastUnreadAlertTime, $lastUnreadMessageTime, $echoNotificationCount
|
2017-07-12 15:12:40 +00:00
|
|
|
)
|
|
|
|
) );
|
|
|
|
$skin->expects( $this->any() )
|
|
|
|
->method( 'getEchoSeenTime' )
|
Fix seen notifications appearing as unseen on mobile
Important note: Make sure to distinguish unseen from unread
One way to reproduce minerva and non-minerva notification inconsistencies:
- Have all your alerts and notices seen. This is displayed with grayed out
number on vector skin or no number at all, if you have (marked as) read.
- Generate new alert or notice (one is enough) in your preferred way.
- You can check minerva and non-minerva at this step. Both should be in sync.
But don't perform any additional action.
- Open the notification popup in some non-minerva skin (I have tried with
vector and monobook), marking it as seen.
- Check the notification icon in minerva. At this point, you should see
notification displayed as unseen.
The reason bug appeared in the first place is that alert/notice timestamps
were mixed up when seen time is obtained. We get seen time from
EchoSeenTime class, where we get smaller of the two timestamps,
using PHP method `min()`. See I27109ee6a248. Then, we get last unread
notification timestamp (which can be either alert or notice), and compare
that to seen time. That leads to the situation when you have only one of
alerts or notices with unread items, smaller timestamp is used for seen,
and most recent for unread, at which point we compare timestamps for
two separate things.
Previous behavior of getting seen timestamps (using max instead of min) would
probably solve the problem, but some other inconsistencies might arrise.
This should prevent any weird and unpredictable behavior to happen.
Bug: T183076
Change-Id: I20bbd6c590086b1c3eccf82983aad59eb3144a7a
2018-01-10 16:26:29 +00:00
|
|
|
->will( $this->returnValueMap( [
|
|
|
|
[ $user, 'alert', $alertSeenTime ],
|
|
|
|
[ $user, 'message', $msgSeenTime ]
|
|
|
|
] ) );
|
2017-07-12 15:12:40 +00:00
|
|
|
$skin->expects( $this->any() )
|
|
|
|
->method( 'getFormattedEchoNotificationCount' )
|
|
|
|
->will( $this->returnValue( $formattedEchoNotificationCount ) );
|
|
|
|
|
2018-02-03 01:27:28 +00:00
|
|
|
$tpl = $this->getMockBuilder( QuickTemplate::class )
|
|
|
|
->setMethods( [ 'execute' ] )
|
2019-05-07 20:27:56 +00:00
|
|
|
->setConstructorArgs( [ MediaWikiServices::getInstance()->getMainConfig() ] )
|
2018-02-03 01:27:28 +00:00
|
|
|
->getMock();
|
2019-06-10 15:51:35 +00:00
|
|
|
$skin->prepareUserNotificationsButton( $tpl, $newtalks );
|
2019-05-07 20:27:56 +00:00
|
|
|
|
2017-07-12 15:12:40 +00:00
|
|
|
$this->assertEquals(
|
2019-06-19 17:31:16 +00:00
|
|
|
$expectedUserNotificationsData,
|
|
|
|
$tpl->get( 'userNotificationsData' ),
|
2017-07-12 15:12:40 +00:00
|
|
|
$message
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Utility function that returns the expected secondary button data given parameters
|
|
|
|
* @param Title $title Page title
|
|
|
|
* @param string $notificationsMsg
|
|
|
|
* @param string $notificationsTitle
|
|
|
|
* @param string $countLabel
|
|
|
|
* @param bool $isZero
|
|
|
|
* @param bool $hasUnseen
|
|
|
|
* @return array
|
|
|
|
*/
|
2019-06-19 17:31:16 +00:00
|
|
|
private function getUserNotificationsExpectedResult(
|
2017-07-12 15:12:40 +00:00
|
|
|
$title,
|
|
|
|
$notificationsMsg,
|
|
|
|
$notificationsTitle,
|
2017-10-18 18:28:37 +00:00
|
|
|
$count,
|
2017-07-12 15:12:40 +00:00
|
|
|
$countLabel,
|
|
|
|
$isZero,
|
|
|
|
$hasUnseen
|
|
|
|
) {
|
|
|
|
return [
|
2019-07-09 19:12:51 +00:00
|
|
|
'notificationIconClass' =>
|
|
|
|
MinervaUI::iconClass( 'bellOutline-base20', 'element', '', 'wikimedia' ),
|
2017-07-12 15:12:40 +00:00
|
|
|
'title' => $notificationsMsg,
|
|
|
|
'url' => SpecialPage::getTitleFor( $notificationsTitle )
|
|
|
|
->getLocalURL(
|
|
|
|
[ 'returnto' => $title->getPrefixedText() ] ),
|
2017-10-18 18:28:37 +00:00
|
|
|
'notificationCountRaw' => $count,
|
|
|
|
'notificationCountString' => $countLabel,
|
2017-07-12 15:12:40 +00:00
|
|
|
'isNotificationCountZero' => $isZero,
|
|
|
|
'hasNotifications' => $hasUnseen,
|
|
|
|
'hasUnseenNotifications' => $hasUnseen
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2019-06-10 15:51:35 +00:00
|
|
|
* Data provider for the test case testPrepareUserNotificationsButton with Echo enabled
|
2017-07-12 15:12:40 +00:00
|
|
|
* @param Title @title Page title
|
|
|
|
* @return array
|
|
|
|
*/
|
2019-06-10 15:51:35 +00:00
|
|
|
private function providePrepareUserNotificationsButtonEcho( Title $title ) {
|
2017-07-12 15:12:40 +00:00
|
|
|
return [
|
|
|
|
[ '', 'Echo, not logged in, no talk page alerts',
|
|
|
|
$title, true, false, '' ],
|
|
|
|
[ '', 'Echo, logged in, no talk page alerts',
|
|
|
|
Title::newFromText( 'Special:Notifications' ), true, true, '' ],
|
|
|
|
[ '', 'Echo, logged in, talk page alert',
|
|
|
|
Title::newFromText( 'Special:Notifications' ), true, true,
|
|
|
|
'newtalks alert' ],
|
Fix seen notifications appearing as unseen on mobile
Important note: Make sure to distinguish unseen from unread
One way to reproduce minerva and non-minerva notification inconsistencies:
- Have all your alerts and notices seen. This is displayed with grayed out
number on vector skin or no number at all, if you have (marked as) read.
- Generate new alert or notice (one is enough) in your preferred way.
- You can check minerva and non-minerva at this step. Both should be in sync.
But don't perform any additional action.
- Open the notification popup in some non-minerva skin (I have tried with
vector and monobook), marking it as seen.
- Check the notification icon in minerva. At this point, you should see
notification displayed as unseen.
The reason bug appeared in the first place is that alert/notice timestamps
were mixed up when seen time is obtained. We get seen time from
EchoSeenTime class, where we get smaller of the two timestamps,
using PHP method `min()`. See I27109ee6a248. Then, we get last unread
notification timestamp (which can be either alert or notice), and compare
that to seen time. That leads to the situation when you have only one of
alerts or notices with unread items, smaller timestamp is used for seen,
and most recent for unread, at which point we compare timestamps for
two separate things.
Previous behavior of getting seen timestamps (using max instead of min) would
probably solve the problem, but some other inconsistencies might arrise.
This should prevent any weird and unpredictable behavior to happen.
Bug: T183076
Change-Id: I20bbd6c590086b1c3eccf82983aad59eb3144a7a
2018-01-10 16:26:29 +00:00
|
|
|
|
2019-06-19 17:31:16 +00:00
|
|
|
[ $this->getUserNotificationsExpectedResult(
|
2017-07-12 15:12:40 +00:00
|
|
|
$title,
|
|
|
|
'Show my notifications',
|
|
|
|
'Notifications',
|
2017-10-18 18:28:37 +00:00
|
|
|
110,
|
2017-07-12 15:12:40 +00:00
|
|
|
'99+',
|
|
|
|
false,
|
|
|
|
true
|
2018-05-26 08:34:18 +00:00
|
|
|
), 'Echo, logged in, no talk page alerts, 110 notifications, ' .
|
|
|
|
'last un-read alert time after last alert seen time, ' .
|
Fix seen notifications appearing as unseen on mobile
Important note: Make sure to distinguish unseen from unread
One way to reproduce minerva and non-minerva notification inconsistencies:
- Have all your alerts and notices seen. This is displayed with grayed out
number on vector skin or no number at all, if you have (marked as) read.
- Generate new alert or notice (one is enough) in your preferred way.
- You can check minerva and non-minerva at this step. Both should be in sync.
But don't perform any additional action.
- Open the notification popup in some non-minerva skin (I have tried with
vector and monobook), marking it as seen.
- Check the notification icon in minerva. At this point, you should see
notification displayed as unseen.
The reason bug appeared in the first place is that alert/notice timestamps
were mixed up when seen time is obtained. We get seen time from
EchoSeenTime class, where we get smaller of the two timestamps,
using PHP method `min()`. See I27109ee6a248. Then, we get last unread
notification timestamp (which can be either alert or notice), and compare
that to seen time. That leads to the situation when you have only one of
alerts or notices with unread items, smaller timestamp is used for seen,
and most recent for unread, at which point we compare timestamps for
two separate things.
Previous behavior of getting seen timestamps (using max instead of min) would
probably solve the problem, but some other inconsistencies might arrise.
This should prevent any weird and unpredictable behavior to happen.
Bug: T183076
Change-Id: I20bbd6c590086b1c3eccf82983aad59eb3144a7a
2018-01-10 16:26:29 +00:00
|
|
|
'last un-read message time after last message seen time',
|
2017-07-12 15:12:40 +00:00
|
|
|
$title, true, true, '',
|
|
|
|
MWTimestamp::getInstance( strtotime( '2017-05-11T21:23:20Z' ) ),
|
Fix seen notifications appearing as unseen on mobile
Important note: Make sure to distinguish unseen from unread
One way to reproduce minerva and non-minerva notification inconsistencies:
- Have all your alerts and notices seen. This is displayed with grayed out
number on vector skin or no number at all, if you have (marked as) read.
- Generate new alert or notice (one is enough) in your preferred way.
- You can check minerva and non-minerva at this step. Both should be in sync.
But don't perform any additional action.
- Open the notification popup in some non-minerva skin (I have tried with
vector and monobook), marking it as seen.
- Check the notification icon in minerva. At this point, you should see
notification displayed as unseen.
The reason bug appeared in the first place is that alert/notice timestamps
were mixed up when seen time is obtained. We get seen time from
EchoSeenTime class, where we get smaller of the two timestamps,
using PHP method `min()`. See I27109ee6a248. Then, we get last unread
notification timestamp (which can be either alert or notice), and compare
that to seen time. That leads to the situation when you have only one of
alerts or notices with unread items, smaller timestamp is used for seen,
and most recent for unread, at which point we compare timestamps for
two separate things.
Previous behavior of getting seen timestamps (using max instead of min) would
probably solve the problem, but some other inconsistencies might arrise.
This should prevent any weird and unpredictable behavior to happen.
Bug: T183076
Change-Id: I20bbd6c590086b1c3eccf82983aad59eb3144a7a
2018-01-10 16:26:29 +00:00
|
|
|
MWTimestamp::getInstance( strtotime( '2017-05-12T07:18:42Z' ) ),
|
|
|
|
110, '2017-05-11T20:28:11Z', '2017-05-11T20:28:11Z', '99+' ],
|
|
|
|
|
2019-06-19 17:31:16 +00:00
|
|
|
[ $this->getUserNotificationsExpectedResult(
|
Fix seen notifications appearing as unseen on mobile
Important note: Make sure to distinguish unseen from unread
One way to reproduce minerva and non-minerva notification inconsistencies:
- Have all your alerts and notices seen. This is displayed with grayed out
number on vector skin or no number at all, if you have (marked as) read.
- Generate new alert or notice (one is enough) in your preferred way.
- You can check minerva and non-minerva at this step. Both should be in sync.
But don't perform any additional action.
- Open the notification popup in some non-minerva skin (I have tried with
vector and monobook), marking it as seen.
- Check the notification icon in minerva. At this point, you should see
notification displayed as unseen.
The reason bug appeared in the first place is that alert/notice timestamps
were mixed up when seen time is obtained. We get seen time from
EchoSeenTime class, where we get smaller of the two timestamps,
using PHP method `min()`. See I27109ee6a248. Then, we get last unread
notification timestamp (which can be either alert or notice), and compare
that to seen time. That leads to the situation when you have only one of
alerts or notices with unread items, smaller timestamp is used for seen,
and most recent for unread, at which point we compare timestamps for
two separate things.
Previous behavior of getting seen timestamps (using max instead of min) would
probably solve the problem, but some other inconsistencies might arrise.
This should prevent any weird and unpredictable behavior to happen.
Bug: T183076
Change-Id: I20bbd6c590086b1c3eccf82983aad59eb3144a7a
2018-01-10 16:26:29 +00:00
|
|
|
$title,
|
|
|
|
'Show my notifications',
|
|
|
|
'Notifications',
|
|
|
|
3,
|
|
|
|
'3',
|
|
|
|
false,
|
|
|
|
true
|
2018-05-26 08:34:18 +00:00
|
|
|
), 'Echo, logged in, no talk page alerts, 3 notifications, ' .
|
|
|
|
'last un-read alert time after last alert seen time, ' .
|
Fix seen notifications appearing as unseen on mobile
Important note: Make sure to distinguish unseen from unread
One way to reproduce minerva and non-minerva notification inconsistencies:
- Have all your alerts and notices seen. This is displayed with grayed out
number on vector skin or no number at all, if you have (marked as) read.
- Generate new alert or notice (one is enough) in your preferred way.
- You can check minerva and non-minerva at this step. Both should be in sync.
But don't perform any additional action.
- Open the notification popup in some non-minerva skin (I have tried with
vector and monobook), marking it as seen.
- Check the notification icon in minerva. At this point, you should see
notification displayed as unseen.
The reason bug appeared in the first place is that alert/notice timestamps
were mixed up when seen time is obtained. We get seen time from
EchoSeenTime class, where we get smaller of the two timestamps,
using PHP method `min()`. See I27109ee6a248. Then, we get last unread
notification timestamp (which can be either alert or notice), and compare
that to seen time. That leads to the situation when you have only one of
alerts or notices with unread items, smaller timestamp is used for seen,
and most recent for unread, at which point we compare timestamps for
two separate things.
Previous behavior of getting seen timestamps (using max instead of min) would
probably solve the problem, but some other inconsistencies might arrise.
This should prevent any weird and unpredictable behavior to happen.
Bug: T183076
Change-Id: I20bbd6c590086b1c3eccf82983aad59eb3144a7a
2018-01-10 16:26:29 +00:00
|
|
|
'last un-read message time before last message seen time',
|
|
|
|
$title, true, true, '',
|
|
|
|
MWTimestamp::getInstance( strtotime( '2017-03-26T14:11:48Z' ) ),
|
|
|
|
MWTimestamp::getInstance( strtotime( '2017-03-27T17:07:57Z' ) ),
|
|
|
|
3, '2017-03-25T00:17:44Z', '2017-03-28T19:00:42Z', '3' ],
|
|
|
|
|
2019-06-19 17:31:16 +00:00
|
|
|
[ $this->getUserNotificationsExpectedResult(
|
2017-07-12 15:12:40 +00:00
|
|
|
$title,
|
|
|
|
'Show my notifications',
|
|
|
|
'Notifications',
|
2017-10-18 18:28:37 +00:00
|
|
|
3,
|
2017-07-12 15:12:40 +00:00
|
|
|
'3',
|
|
|
|
false,
|
|
|
|
false
|
2018-05-26 08:34:18 +00:00
|
|
|
), 'Echo, logged in, no talk page alerts, 3 notifications, ' .
|
|
|
|
'last un-read alert time before last alert seen time, ' .
|
Fix seen notifications appearing as unseen on mobile
Important note: Make sure to distinguish unseen from unread
One way to reproduce minerva and non-minerva notification inconsistencies:
- Have all your alerts and notices seen. This is displayed with grayed out
number on vector skin or no number at all, if you have (marked as) read.
- Generate new alert or notice (one is enough) in your preferred way.
- You can check minerva and non-minerva at this step. Both should be in sync.
But don't perform any additional action.
- Open the notification popup in some non-minerva skin (I have tried with
vector and monobook), marking it as seen.
- Check the notification icon in minerva. At this point, you should see
notification displayed as unseen.
The reason bug appeared in the first place is that alert/notice timestamps
were mixed up when seen time is obtained. We get seen time from
EchoSeenTime class, where we get smaller of the two timestamps,
using PHP method `min()`. See I27109ee6a248. Then, we get last unread
notification timestamp (which can be either alert or notice), and compare
that to seen time. That leads to the situation when you have only one of
alerts or notices with unread items, smaller timestamp is used for seen,
and most recent for unread, at which point we compare timestamps for
two separate things.
Previous behavior of getting seen timestamps (using max instead of min) would
probably solve the problem, but some other inconsistencies might arrise.
This should prevent any weird and unpredictable behavior to happen.
Bug: T183076
Change-Id: I20bbd6c590086b1c3eccf82983aad59eb3144a7a
2018-01-10 16:26:29 +00:00
|
|
|
'last un-read message time before last message seen time',
|
2017-07-12 15:12:40 +00:00
|
|
|
$title, true, true, '',
|
Fix seen notifications appearing as unseen on mobile
Important note: Make sure to distinguish unseen from unread
One way to reproduce minerva and non-minerva notification inconsistencies:
- Have all your alerts and notices seen. This is displayed with grayed out
number on vector skin or no number at all, if you have (marked as) read.
- Generate new alert or notice (one is enough) in your preferred way.
- You can check minerva and non-minerva at this step. Both should be in sync.
But don't perform any additional action.
- Open the notification popup in some non-minerva skin (I have tried with
vector and monobook), marking it as seen.
- Check the notification icon in minerva. At this point, you should see
notification displayed as unseen.
The reason bug appeared in the first place is that alert/notice timestamps
were mixed up when seen time is obtained. We get seen time from
EchoSeenTime class, where we get smaller of the two timestamps,
using PHP method `min()`. See I27109ee6a248. Then, we get last unread
notification timestamp (which can be either alert or notice), and compare
that to seen time. That leads to the situation when you have only one of
alerts or notices with unread items, smaller timestamp is used for seen,
and most recent for unread, at which point we compare timestamps for
two separate things.
Previous behavior of getting seen timestamps (using max instead of min) would
probably solve the problem, but some other inconsistencies might arrise.
This should prevent any weird and unpredictable behavior to happen.
Bug: T183076
Change-Id: I20bbd6c590086b1c3eccf82983aad59eb3144a7a
2018-01-10 16:26:29 +00:00
|
|
|
MWTimestamp::getInstance( strtotime( '2017-04-11T13:21:15Z' ) ),
|
|
|
|
MWTimestamp::getInstance( strtotime( '2017-04-10T15:12:31Z' ) ),
|
|
|
|
3, '2017-04-12T10:37:13Z', '2017-04-11T12:55:47Z', '3' ],
|
|
|
|
|
2019-06-19 17:31:16 +00:00
|
|
|
[ $this->getUserNotificationsExpectedResult(
|
2017-07-12 15:12:40 +00:00
|
|
|
$title,
|
|
|
|
'Show my notifications',
|
|
|
|
'Notifications',
|
2017-10-18 18:28:37 +00:00
|
|
|
5,
|
2017-07-12 15:12:40 +00:00
|
|
|
'5',
|
|
|
|
false,
|
|
|
|
false
|
2018-05-26 08:34:18 +00:00
|
|
|
), 'Echo, logged in, no talk page alerts, 5 notifications, ' .
|
|
|
|
'no last un-read alert time, ' .
|
Fix seen notifications appearing as unseen on mobile
Important note: Make sure to distinguish unseen from unread
One way to reproduce minerva and non-minerva notification inconsistencies:
- Have all your alerts and notices seen. This is displayed with grayed out
number on vector skin or no number at all, if you have (marked as) read.
- Generate new alert or notice (one is enough) in your preferred way.
- You can check minerva and non-minerva at this step. Both should be in sync.
But don't perform any additional action.
- Open the notification popup in some non-minerva skin (I have tried with
vector and monobook), marking it as seen.
- Check the notification icon in minerva. At this point, you should see
notification displayed as unseen.
The reason bug appeared in the first place is that alert/notice timestamps
were mixed up when seen time is obtained. We get seen time from
EchoSeenTime class, where we get smaller of the two timestamps,
using PHP method `min()`. See I27109ee6a248. Then, we get last unread
notification timestamp (which can be either alert or notice), and compare
that to seen time. That leads to the situation when you have only one of
alerts or notices with unread items, smaller timestamp is used for seen,
and most recent for unread, at which point we compare timestamps for
two separate things.
Previous behavior of getting seen timestamps (using max instead of min) would
probably solve the problem, but some other inconsistencies might arrise.
This should prevent any weird and unpredictable behavior to happen.
Bug: T183076
Change-Id: I20bbd6c590086b1c3eccf82983aad59eb3144a7a
2018-01-10 16:26:29 +00:00
|
|
|
'last un-read message time before last message seen time',
|
|
|
|
$title, true, true, '',
|
|
|
|
false,
|
|
|
|
MWTimestamp::getInstance( strtotime( '2017-12-15T08:14:33Z' ) ),
|
|
|
|
5, '2017-12-21T18:07:24Z', '2017-12-19T16:55:52Z', '5' ],
|
|
|
|
|
2019-06-19 17:31:16 +00:00
|
|
|
[ $this->getUserNotificationsExpectedResult(
|
2017-07-12 15:12:40 +00:00
|
|
|
$title,
|
|
|
|
'Show my notifications',
|
|
|
|
'Notifications',
|
2017-10-18 18:28:37 +00:00
|
|
|
0,
|
2017-07-12 15:12:40 +00:00
|
|
|
'0',
|
|
|
|
true,
|
|
|
|
false
|
2018-05-26 08:34:18 +00:00
|
|
|
), 'Echo, logged in, no talk page alerts, 0 notifications, ' .
|
Fix seen notifications appearing as unseen on mobile
Important note: Make sure to distinguish unseen from unread
One way to reproduce minerva and non-minerva notification inconsistencies:
- Have all your alerts and notices seen. This is displayed with grayed out
number on vector skin or no number at all, if you have (marked as) read.
- Generate new alert or notice (one is enough) in your preferred way.
- You can check minerva and non-minerva at this step. Both should be in sync.
But don't perform any additional action.
- Open the notification popup in some non-minerva skin (I have tried with
vector and monobook), marking it as seen.
- Check the notification icon in minerva. At this point, you should see
notification displayed as unseen.
The reason bug appeared in the first place is that alert/notice timestamps
were mixed up when seen time is obtained. We get seen time from
EchoSeenTime class, where we get smaller of the two timestamps,
using PHP method `min()`. See I27109ee6a248. Then, we get last unread
notification timestamp (which can be either alert or notice), and compare
that to seen time. That leads to the situation when you have only one of
alerts or notices with unread items, smaller timestamp is used for seen,
and most recent for unread, at which point we compare timestamps for
two separate things.
Previous behavior of getting seen timestamps (using max instead of min) would
probably solve the problem, but some other inconsistencies might arrise.
This should prevent any weird and unpredictable behavior to happen.
Bug: T183076
Change-Id: I20bbd6c590086b1c3eccf82983aad59eb3144a7a
2018-01-10 16:26:29 +00:00
|
|
|
'no last alert and message seen time',
|
2017-07-12 15:12:40 +00:00
|
|
|
$title, true, true, '',
|
Fix seen notifications appearing as unseen on mobile
Important note: Make sure to distinguish unseen from unread
One way to reproduce minerva and non-minerva notification inconsistencies:
- Have all your alerts and notices seen. This is displayed with grayed out
number on vector skin or no number at all, if you have (marked as) read.
- Generate new alert or notice (one is enough) in your preferred way.
- You can check minerva and non-minerva at this step. Both should be in sync.
But don't perform any additional action.
- Open the notification popup in some non-minerva skin (I have tried with
vector and monobook), marking it as seen.
- Check the notification icon in minerva. At this point, you should see
notification displayed as unseen.
The reason bug appeared in the first place is that alert/notice timestamps
were mixed up when seen time is obtained. We get seen time from
EchoSeenTime class, where we get smaller of the two timestamps,
using PHP method `min()`. See I27109ee6a248. Then, we get last unread
notification timestamp (which can be either alert or notice), and compare
that to seen time. That leads to the situation when you have only one of
alerts or notices with unread items, smaller timestamp is used for seen,
and most recent for unread, at which point we compare timestamps for
two separate things.
Previous behavior of getting seen timestamps (using max instead of min) would
probably solve the problem, but some other inconsistencies might arrise.
This should prevent any weird and unpredictable behavior to happen.
Bug: T183076
Change-Id: I20bbd6c590086b1c3eccf82983aad59eb3144a7a
2018-01-10 16:26:29 +00:00
|
|
|
MWTimestamp::getInstance( strtotime( '2017-08-09T10:54:07Z' ) ),
|
|
|
|
MWTimestamp::getInstance( strtotime( '2017-08-11T14:18:36Z' ) ),
|
|
|
|
0, false, false, '0' ]
|
2017-07-12 15:12:40 +00:00
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2019-06-10 15:51:35 +00:00
|
|
|
* Data provider for the test case testPrepareUserNotificationsButton with Echo disabled
|
2017-07-12 15:12:40 +00:00
|
|
|
* @param Title @title Page title
|
|
|
|
* @return array
|
|
|
|
*/
|
2019-06-10 15:51:35 +00:00
|
|
|
private function providePrepareUserNotificationsButtonNoEcho( Title $title ) {
|
2017-07-12 15:12:40 +00:00
|
|
|
return [
|
|
|
|
[ '', 'No Echo, not logged in, no talk page alerts',
|
|
|
|
$title, false, false, '' ],
|
|
|
|
[ '', 'No Echo, logged in, no talk page alerts',
|
|
|
|
$title, false, true, '' ],
|
2019-06-19 17:31:16 +00:00
|
|
|
[ $this->getUserNotificationsExpectedResult(
|
2017-07-12 15:12:40 +00:00
|
|
|
$title,
|
|
|
|
'You have new messages on your talk page',
|
|
|
|
'Mytalk',
|
2017-10-18 18:28:37 +00:00
|
|
|
0,
|
2017-07-12 15:12:40 +00:00
|
|
|
'',
|
|
|
|
true,
|
|
|
|
false
|
|
|
|
), 'No Echo, not logged in, talk page alert',
|
|
|
|
$title, false, false, 'newtalks alert' ],
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2019-06-10 15:51:35 +00:00
|
|
|
* Data provider for the test case testPrepareUserNotificationsButton
|
2017-07-12 15:12:40 +00:00
|
|
|
* @return array
|
|
|
|
*/
|
2019-06-10 15:51:35 +00:00
|
|
|
public function providePrepareUserNotificationsButton() {
|
2017-07-12 15:12:40 +00:00
|
|
|
$title = Title::newFromText( 'Test' );
|
|
|
|
return array_merge(
|
2019-06-10 15:51:35 +00:00
|
|
|
$this->providePrepareUserNotificationsButtonEcho( $title ),
|
|
|
|
$this->providePrepareUserNotificationsButtonNoEcho( $title )
|
2017-07-12 15:12:40 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|