From d9022f63880ce039446fba8364f68e656b7bf4cb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 3 May 2012 13:01:35 +0200 Subject: Update to MediaWiki 1.19.0 --- maintenance/namespaceDupes.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'maintenance/namespaceDupes.php') diff --git a/maintenance/namespaceDupes.php b/maintenance/namespaceDupes.php index b883ea68..0a5fec33 100644 --- a/maintenance/namespaceDupes.php +++ b/maintenance/namespaceDupes.php @@ -26,6 +26,12 @@ require_once( dirname( __FILE__ ) . '/Maintenance.php' ); class NamespaceConflictChecker extends Maintenance { + + /** + * @var DatabaseBase + */ + protected $db; + public function __construct() { parent::__construct(); $this->mDescription = ""; @@ -64,6 +70,8 @@ class NamespaceConflictChecker extends Maintenance { * @todo Document * @param $fix Boolean: whether or not to fix broken entries * @param $suffix String: suffix to append to renamed articles + * + * @return bool */ private function checkAll( $fix, $suffix = '' ) { global $wgContLang, $wgNamespaceAliases, $wgCapitalLinks; @@ -150,6 +158,7 @@ class NamespaceConflictChecker extends Maintenance { * @param $name String * @param $fix Boolean: whether to fix broken entries * @param $suffix String: suffix to append to renamed articles + * @return bool */ private function checkNamespace( $ns, $name, $fix, $suffix = '' ) { $conflicts = $this->getConflicts( $ns, $name ); @@ -171,6 +180,11 @@ class NamespaceConflictChecker extends Maintenance { /** * @todo: do this for reals + * @param $key + * @param $prefix + * @param $fix + * @param $suffix string + * @return bool */ private function checkPrefix( $key, $prefix, $fix, $suffix = '' ) { $this->output( "Checking prefix \"$prefix\" vs namespace $key\n" ); @@ -183,6 +197,8 @@ class NamespaceConflictChecker extends Maintenance { * * @param $ns Integer: namespace id (id for new namespace?) * @param $name String: prefix that is being made a namespace + * + * @return array */ private function getConflicts( $ns, $name ) { $page = 'page'; @@ -217,6 +233,8 @@ class NamespaceConflictChecker extends Maintenance { /** * Report any conflicts we find + * + * @return bool */ private function reportConflict( $row, $suffix ) { $newTitle = Title::makeTitleSafe( $row->namespace, $row->title ); @@ -254,6 +272,7 @@ class NamespaceConflictChecker extends Maintenance { * @param $row Object: row from the page table to fix * @param $resolvable Boolean * @param $suffix String: suffix to append to the fixed page + * @return bool */ private function resolveConflict( $row, $resolvable, $suffix ) { if ( !$resolvable ) { @@ -285,6 +304,7 @@ class NamespaceConflictChecker extends Maintenance { * @param $row Object: row from the old broken entry * @param $table String: table to update * @param $prefix String: prefix for column name, like page or ar + * @return bool */ private function resolveConflictOn( $row, $table, $prefix ) { $this->output( "... resolving on $table... " ); -- cgit v1.2.3-54-g00ecf