[MediaWiki-commits] [Gerrit] Fix CACHE_TIME* constants, and a few cleanups (v1.6.1) - change (mediawiki...PhpTagsWiki)

2015-04-02 Thread JoelKP (Code Review)
JoelKP has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/201425

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, 11 insertions(+), 77 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PhpTagsWiki 
refs/changes/25/201425/1

diff --git a/PhpTagsWiki.json b/PhpTagsWiki.json
index 2776e54..e640c6c 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
},
-   cacheTimeString: {
+   CACHE_TIME_STRING: {
type: string,
desc: Time when current page was 
generated,
-   readonly: 1
}
}
},
@@ -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..cde8bbd 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(
@@ -25,6 +25,7 @@
'url'   = 
'https://www.mediawiki.org/wiki/Extension:PhpTags_Wiki',
'author'= 
'[https://www.mediawiki.org/wiki/User:Pastakhov Pavel Astakhov]',
'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..ed662be 100644
--- a/includes/WikiWPage.php
+++ b/includes/WikiWPage.php
@@ -49,7 +49,7 @@
\PhpTags\Runtime::$parser-setDefaultSort( $value );
}
 
-   public static function s_AddCategory( $category, $sortkey = '' ) {
+   public static function s_addCategory( $category, $sortkey = '' ) {
if ( is_array( $category ) ) {

[MediaWiki-commits] [Gerrit] Fix CACHE_TIME* constants, and a few cleanups (v1.6.1) - change (mediawiki...PhpTagsWiki)

2015-04-02 Thread jenkins-bot (Code Review)
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(