jenkins-bot has submitted this change and it was merged. Change subject: Fix CACHE_TIME* constants, and a few cleanups (v1.6.1) ......................................................................
Fix CACHE_TIME* constants, and a few cleanups (v1.6.1) Changes: * "cacheTime" -> "CACHE_TIME" and "cacheTimeString" -> "CACHE_TIME_STRING" in PhpTagsWiki.json, to match constant definitions in WikiWCache.php. * Correct reference to "q_CACHE_TIME_STRING()" in WikiWCache.php. * "s_AddCategory" -> "s_addCategory" in WikiWPage.php, just to make it look nicer. * Remove the deprecated static properties which were not listed in PhpTagsWiki.json. * Improve a few descriptions in PhpTagsWiki.json. Change-Id: Ie910a493665d8f24ed1072d83a24a127f7dab58e --- M PhpTagsWiki.json M PhpTagsWiki.php M includes/WikiWCache.php M includes/WikiWPage.php M includes/WikiWStats.php 5 files changed, 15 insertions(+), 81 deletions(-) Approvals: Pastakhov: Looks good to me, approved jenkins-bot: Verified diff --git a/PhpTagsWiki.json b/PhpTagsWiki.json index 2776e54..6aeed29 100644 --- a/PhpTagsWiki.json +++ b/PhpTagsWiki.json @@ -56,15 +56,13 @@ } }, "CONSTANTS": { - "cacheTime": { + "CACHE_TIME": { "type": "DateTime", - "desc": "Time when current page was generated", - "readonly": 1 + "desc": "Time when current page was generated" }, - "cacheTimeString": { + "CACHE_TIME_STRING": { "type": "string", - "desc": "Time when current page was generated", - "readonly": 1 + "desc": "Time when current page was generated" } } }, @@ -137,7 +135,7 @@ }, "DEFAULT_SORT_KEY": { "type": "string", - "desc": "Depricated, pliase use defaultSortKey static property!!!" + "desc": "Deprecated, please use defaultSortKey static property!!!" } }, "CONSTANTS": { @@ -276,7 +274,7 @@ }, "isMainPage": { "type": "bool", - "desc": "Is this the mainpage?", + "desc": "Is this the main page?", "readonly": 1 } }, @@ -344,7 +342,7 @@ }, "IS_MAIN_PAGE": { "type": "bool", - "desc": "Is current the mainpage?" + "desc": "Is current page the main page?" } } } diff --git a/PhpTagsWiki.php b/PhpTagsWiki.php index 7a155a4..11def50 100644 --- a/PhpTagsWiki.php +++ b/PhpTagsWiki.php @@ -15,7 +15,7 @@ die( 'This file is an extension to MediaWiki and thus not a valid entry point.' ); } -define( 'PHPTAGS_WIKI_VERSION' , '1.6.0' ); +define( 'PHPTAGS_WIKI_VERSION' , '1.6.1' ); // Register this extension on Special:Version $wgExtensionCredits['phptags'][] = array( @@ -24,7 +24,8 @@ 'version' => PHPTAGS_WIKI_VERSION, 'url' => 'https://www.mediawiki.org/wiki/Extension:PhpTags_Wiki', 'author' => '[https://www.mediawiki.org/wiki/User:Pastakhov Pavel Astakhov]', - 'descriptionmsg' => 'phptagswiki-desc' + 'descriptionmsg' => 'phptagswiki-desc', + 'license-name' => 'GPL-2.0+', ); // Allow translations for this extension diff --git a/includes/WikiWCache.php b/includes/WikiWCache.php index b9cc864..d132298 100644 --- a/includes/WikiWCache.php +++ b/includes/WikiWCache.php @@ -46,7 +46,7 @@ public static function c_CACHE_TIME() { return \PhpTags\Hooks::getObjectWithValue( 'DateTime', - new \DateTime( self::q_CACHE_TIME_STRING() ) + new \DateTime( self::c_CACHE_TIME_STRING() ) ); } diff --git a/includes/WikiWPage.php b/includes/WikiWPage.php index 4cfb57a..7d329ec 100644 --- a/includes/WikiWPage.php +++ b/includes/WikiWPage.php @@ -49,11 +49,11 @@ \PhpTags\Runtime::$parser->setDefaultSort( $value ); } - public static function s_AddCategory( $category, $sortkey = '' ) { + public static function s_addCategory( $category, $sortkey = '' ) { if ( is_array( $category ) ) { $return = true; foreach ( $category as $c ) { - $return = self::s_AddCategory( $c ) && $return; + $return = self::s_addCategory( $c ) && $return; } return $return; } @@ -80,28 +80,14 @@ } /** - * @deprecated since version 2.0.0 - */ - public static function q_ID() { - return self::c_ID(); - } - - /** - * @deprecated since version 2.0.0 - */ - public static function q_TITLE() { - return self::c_TITLE(); - } - - /** - * @deprecated since version 2.0.0 + * @deprecated since version 1.6.0 */ public static function q_DEFAULT_SORT_KEY() { return self::q_defaultSortKey(); } /** - * @deprecated since version 2.0.0 + * @deprecated since version 1.6.0 */ public static function d_DEFAULT_SORT_KEY( $value ) { self::d_defaultSortKey( $value ); diff --git a/includes/WikiWStats.php b/includes/WikiWStats.php index 9d2d2ed..62dfecc 100644 --- a/includes/WikiWStats.php +++ b/includes/WikiWStats.php @@ -79,55 +79,4 @@ return $value; } - /** - * @deprecated since version 2.0.0 - */ - public static function q_ACTIVE_USERS() { return self::c_ACTIVE_USERS(); } - - /** - * @deprecated since version 2.0.0 - */ - public static function q_ADMINS() { return self::c_ADMINS(); } - - /** - * @deprecated since version 2.0.0 - */ - public static function q_ARTICLES() { return self::c_ARTICLES(); } - - /** - * @deprecated since version 2.0.0 - */ - public static function q_EDITS() { return self::c_EDITS(); } - - /** - * @deprecated since version 2.0.0 - */ - public static function q_FILES() { return self::c_FILES(); } - - /** - * @deprecated since version 2.0.0 - */ - public static function q_JOBS() { return self::c_JOBS(); } - - /** - * @deprecated since version 2.0.0 - */ - public static function q_PAGES() { return self::c_PAGES(); } - - /** - * @deprecated since version 2.0.0 - */ - public static function q_USERS() { return self::c_USERS(); } - - /** - * @deprecated since version 2.0.0 - */ - public static function q_VIEWS() { - static $value = false; - if ( $value === false ) { - $value = $GLOBALS['wgDisableCounters'] ? (int)\SiteStats::views() : null; - } - return $value; - } - } -- To view, visit https://gerrit.wikimedia.org/r/201425 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie910a493665d8f24ed1072d83a24a127f7dab58e Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/PhpTagsWiki Gerrit-Branch: master Gerrit-Owner: JoelKP <joelkpetters...@gmail.com> Gerrit-Reviewer: JoelKP <joelkpetters...@gmail.com> Gerrit-Reviewer: Pastakhov <pastak...@yandex.ru> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits