r43271 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r43270‎ | r43271 | r43272 >
Date:22:38, 6 November 2008
Author:siebrand
Status:old
Tags:
Comment:
Consistent casing for wfGetDB(), getDB(), and getDBKey()
Modified paths:
  • /trunk/extensions/AbuseFilter/AbuseFilter.class.php (modified) (history)
  • /trunk/extensions/AbuseFilter/SpecialAbuseLog.php (modified) (history)
  • /trunk/extensions/DPLforum/DPLforum_body.php (modified) (history)
  • /trunk/extensions/DynamicPageList/DynamicPageList2.php (modified) (history)
  • /trunk/extensions/FCKeditor/FCKeditorSkin.body.php (modified) (history)
  • /trunk/extensions/OpenSearchXml/ApiOpenSearchXml.php (modified) (history)
  • /trunk/extensions/SocialProfile/UserStats/UserStatsClass.php (modified) (history)
  • /trunk/phase3/includes/Linker.php (modified) (history)
  • /trunk/phase3/includes/Title.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryBacklinks.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryCategories.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryCategoryInfo.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryExtLinksUsage.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryImages.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryInfo.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryLangLinks.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryLinks.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryRecentChanges.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryUserContributions.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryUsers.php (modified) (history)
  • /trunk/phase3/includes/filerepo/LocalFile.php (modified) (history)
  • /trunk/phase3/includes/filerepo/LocalRepo.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialExport.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialFileDuplicateSearch.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialListUserRestrictions.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialRevisiondelete.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialRevisiondelete.php
@@ -326,11 +326,11 @@
327327 if( $this->deleteKey=='oldimage' ) {
328328 // Run through and pull all our data in one query
329329 foreach( $this->ofiles as $timestamp ) {
330 - $where[] = $dbr->addQuotes( $timestamp.'!'.$this->page->getDbKey() );
 330+ $where[] = $dbr->addQuotes( $timestamp.'!'.$this->page->getDBKey() );
331331 }
332332 $whereClause = 'oi_archive_name IN(' . implode(',',$where) . ')';
333333 $result = $dbr->select( 'oldimage', '*',
334 - array( 'oi_name' => $this->page->getDbKey(),
 334+ array( 'oi_name' => $this->page->getDBKey(),
335335 $whereClause ),
336336 __METHOD__ );
337337 while( $row = $dbr->fetchObject( $result ) ) {
@@ -340,7 +340,7 @@
341341 }
342342 // Check through our images
343343 foreach( $this->ofiles as $timestamp ) {
344 - $archivename = $timestamp.'!'.$this->page->getDbKey();
 344+ $archivename = $timestamp.'!'.$this->page->getDBKey();
345345 if( !isset($filesObjs[$archivename]) ) {
346346 continue;
347347 } else if( !$filesObjs[$archivename]->userCan(File::DELETED_RESTRICTED) ) {
@@ -364,7 +364,7 @@
365365 }
366366 $whereClause = 'fa_id IN(' . implode(',',$where) . ')';
367367 $result = $dbr->select( 'filearchive', '*',
368 - array( 'fa_name' => $this->page->getDbKey(),
 368+ array( 'fa_name' => $this->page->getDBKey(),
369369 $whereClause ),
370370 __METHOD__ );
371371 while( $row = $dbr->fetchObject( $result ) ) {
@@ -939,11 +939,11 @@
940940 $set = array();
941941 // Run through and pull all our data in one query
942942 foreach( $items as $timestamp ) {
943 - $where[] = $this->dbw->addQuotes( $timestamp.'!'.$title->getDbKey() );
 943+ $where[] = $this->dbw->addQuotes( $timestamp.'!'.$title->getDBKey() );
944944 }
945945 $whereClause = 'oi_archive_name IN(' . implode(',',$where) . ')';
946946 $result = $this->dbw->select( 'oldimage', '*',
947 - array( 'oi_name' => $title->getDbKey(),
 947+ array( 'oi_name' => $title->getDBKey(),
948948 $whereClause ),
949949 __METHOD__ );
950950 while( $row = $this->dbw->fetchObject( $result ) ) {
@@ -953,7 +953,7 @@
954954 }
955955 // To work!
956956 foreach( $items as $timestamp ) {
957 - $archivename = $timestamp.'!'.$title->getDbKey();
 957+ $archivename = $timestamp.'!'.$title->getDBKey();
958958 if( !isset($filesObjs[$archivename]) ) {
959959 $success = false;
960960 continue; // Must exist
@@ -1036,7 +1036,7 @@
10371037 }
10381038 $whereClause = 'fa_id IN(' . implode(',',$where) . ')';
10391039 $result = $this->dbw->select( 'filearchive', '*',
1040 - array( 'fa_name' => $title->getDbKey(),
 1040+ array( 'fa_name' => $title->getDBKey(),
10411041 $whereClause ),
10421042 __METHOD__ );
10431043 while( $row = $this->dbw->fetchObject( $result ) ) {
Index: trunk/phase3/includes/specials/SpecialListUserRestrictions.php
@@ -72,7 +72,7 @@
7373 $title = Title::newFromText( $page );
7474 if( $title ) {
7575 $conds['ur_page_namespace'] = $title->getNamespace();
76 - $conds['ur_page_title'] = $title->getDbKey();
 76+ $conds['ur_page_title'] = $title->getDBKey();
7777 }
7878
7979 return $conds;
Index: trunk/phase3/includes/specials/SpecialExport.php
@@ -93,7 +93,7 @@
9494 array_merge( $join,
9595 array(
9696 'page_namespace' => $title->getNamespace(),
97 - 'page_title' => $title->getDbKey() ) ),
 97+ 'page_title' => $title->getDBKey() ) ),
9898 __METHOD__ );
9999 foreach( $result as $row ) {
100100 $template = Title::makeTitle( $row->namespace, $row->title );
Index: trunk/phase3/includes/specials/SpecialFileDuplicateSearch.php
@@ -73,7 +73,7 @@
7474 if( $title && $title->getText() != '' ) {
7575 $dbr = wfGetDB( DB_SLAVE );
7676 $image = $dbr->tableName( 'image' );
77 - $encFilename = $dbr->addQuotes( htmlspecialchars( $title->getDbKey() ) );
 77+ $encFilename = $dbr->addQuotes( htmlspecialchars( $title->getDBKey() ) );
7878 $sql = "SELECT img_sha1 from $image where img_name = $encFilename";
7979 $res = $dbr->query( $sql );
8080 $row = $dbr->fetchRow( $res );
Index: trunk/phase3/includes/api/ApiQueryLangLinks.php
@@ -58,7 +58,7 @@
5959 $this->dieUsage("Invalid continue param. You should pass the " .
6060 "original value returned by the previous query", "_badcontinue");
6161 $llfrom = intval($cont[0]);
62 - $lllang = $this->getDb()->strencode($cont[1]);
 62+ $lllang = $this->getDB()->strencode($cont[1]);
6363 $this->addWhere("ll_from > $llfrom OR ".
6464 "(ll_from = $llfrom AND ".
6565 "ll_lang >= '$lllang')");
Index: trunk/phase3/includes/api/ApiQueryCategories.php
@@ -87,7 +87,7 @@
8888 $this->dieUsage("Invalid continue param. You should pass the " .
8989 "original value returned by the previous query", "_badcontinue");
9090 $clfrom = intval($cont[0]);
91 - $clto = $this->getDb()->strencode($this->titleToKey($cont[1]));
 91+ $clto = $this->getDB()->strencode($this->titleToKey($cont[1]));
9292 $this->addWhere("cl_from > $clfrom OR ".
9393 "(cl_from = $clfrom AND ".
9494 "cl_to >= '$clto')");
Index: trunk/phase3/includes/api/ApiQueryCategoryInfo.php
@@ -52,7 +52,7 @@
5353 foreach($categories as $c)
5454 {
5555 $t = $titles[$c];
56 - $cattitles[$c] = $t->getDbKey();
 56+ $cattitles[$c] = $t->getDBKey();
5757 }
5858
5959 $this->addTables('category');
Index: trunk/phase3/includes/api/ApiQueryImages.php
@@ -66,7 +66,7 @@
6767 $this->dieUsage("Invalid continue param. You should pass the " .
6868 "original value returned by the previous query", "_badcontinue");
6969 $ilfrom = intval($cont[0]);
70 - $ilto = $this->getDb()->strencode($this->titleToKey($cont[1]));
 70+ $ilto = $this->getDB()->strencode($this->titleToKey($cont[1]));
7171 $this->addWhere("il_from > $ilfrom OR ".
7272 "(il_from = $ilfrom AND ".
7373 "il_to >= '$ilto')");
Index: trunk/phase3/includes/api/ApiQueryUserContributions.php
@@ -156,7 +156,7 @@
157157 $this->addWhereFld('rev_deleted', 0);
158158 // We only want pages by the specified users.
159159 if($this->prefixMode)
160 - $this->addWhere("rev_user_text LIKE '" . $this->getDb()->escapeLike($this->userprefix) . "%'");
 160+ $this->addWhere("rev_user_text LIKE '" . $this->getDB()->escapeLike($this->userprefix) . "%'");
161161 else
162162 $this->addWhereFld('rev_user_text', $this->usernames);
163163 // ... and in the specified timeframe.
Index: trunk/phase3/includes/api/ApiQueryUsers.php
@@ -71,7 +71,7 @@
7272 if(!count($goodNames))
7373 return $retval;
7474
75 - $db = $this->getDb();
 75+ $db = $this->getDB();
7676 $this->addTables('user', 'u1');
7777 $this->addFields('u1.user_name');
7878 $this->addWhereFld('u1.user_name', $goodNames);
Index: trunk/phase3/includes/api/ApiQueryRecentChanges.php
@@ -112,10 +112,10 @@
113113 // LinkBatch refuses these, but we need them anyway
114114 if(!array_key_exists($obj->getNamespace(), $lb->data))
115115 $lb->data[$obj->getNamespace()] = array();
116 - $lb->data[$obj->getNamespace()][$obj->getDbKey()] = 1;
 116+ $lb->data[$obj->getNamespace()][$obj->getDBKey()] = 1;
117117 }
118118 }
119 - $where = $lb->constructSet('rc', $this->getDb());
 119+ $where = $lb->constructSet('rc', $this->getDB());
120120 if($where != '')
121121 $this->addWhere($where);
122122 }
Index: trunk/phase3/includes/api/ApiQueryLinks.php
@@ -92,7 +92,7 @@
9393 "original value returned by the previous query", "_badcontinue");
9494 $plfrom = intval($cont[0]);
9595 $plns = intval($cont[1]);
96 - $pltitle = $this->getDb()->strencode($this->titleToKey($cont[2]));
 96+ $pltitle = $this->getDB()->strencode($this->titleToKey($cont[2]));
9797 $this->addWhere("{$this->prefix}_from > $plfrom OR ".
9898 "({$this->prefix}_from = $plfrom AND ".
9999 "({$this->prefix}_namespace > $plns OR ".
Index: trunk/phase3/includes/api/ApiQueryExtLinksUsage.php
@@ -66,7 +66,7 @@
6767 else
6868 $protocol = null;
6969
70 - $db = $this->getDb();
 70+ $db = $this->getDB();
7171 $this->addTables(array('page','externallinks')); // must be in this order for 'USE INDEX'
7272 $this->addOption('USE INDEX', 'el_index');
7373 $this->addWhere('page_id=el_from');
Index: trunk/phase3/includes/api/ApiQueryInfo.php
@@ -296,7 +296,7 @@
297297 $others = array();
298298 foreach ($missing as $title)
299299 if ($title->getNamespace() == NS_IMAGE)
300 - $images[] = $title->getDbKey();
 300+ $images[] = $title->getDBKey();
301301 else
302302 $others[] = $title;
303303
@@ -449,10 +449,10 @@
450450 $result->setIndexedTagName($pageInfo['protection'], 'pr');
451451 }
452452 }
453 - if($fld_talkid && isset($talkids[$title->getNamespace()][$title->getDbKey()]))
454 - $pageInfo['talkid'] = $talkids[$title->getNamespace()][$title->getDbKey()];
455 - if($fld_subjectid && isset($subjectids[$title->getNamespace()][$title->getDbKey()]))
456 - $pageInfo['subjectid'] = $subjectids[$title->getNamespace()][$title->getDbKey()];
 453+ if($fld_talkid && isset($talkids[$title->getNamespace()][$title->getDBKey()]))
 454+ $pageInfo['talkid'] = $talkids[$title->getNamespace()][$title->getDBKey()];
 455+ if($fld_subjectid && isset($subjectids[$title->getNamespace()][$title->getDBKey()]))
 456+ $pageInfo['subjectid'] = $subjectids[$title->getNamespace()][$title->getDBKey()];
457457 if($fld_url) {
458458 $pageInfo['fullurl'] = $title->getFullURL();
459459 $pageInfo['editurl'] = $title->getFullURL('action=edit');
@@ -496,10 +496,10 @@
497497 $res['query']['pages'][$pageid]['protection'] = array();
498498 $result->setIndexedTagName($res['query']['pages'][$pageid]['protection'], 'pr');
499499 }
500 - if($fld_talkid && isset($talkids[$title->getNamespace()][$title->getDbKey()]))
501 - $res['query']['pages'][$pageid]['talkid'] = $talkids[$title->getNamespace()][$title->getDbKey()];
502 - if($fld_subjectid && isset($subjectids[$title->getNamespace()][$title->getDbKey()]))
503 - $res['query']['pages'][$pageid]['subjectid'] = $subjectids[$title->getNamespace()][$title->getDbKey()];
 500+ if($fld_talkid && isset($talkids[$title->getNamespace()][$title->getDBKey()]))
 501+ $res['query']['pages'][$pageid]['talkid'] = $talkids[$title->getNamespace()][$title->getDBKey()];
 502+ if($fld_subjectid && isset($subjectids[$title->getNamespace()][$title->getDBKey()]))
 503+ $res['query']['pages'][$pageid]['subjectid'] = $subjectids[$title->getNamespace()][$title->getDBKey()];
504504 if($fld_url) {
505505 $res['query']['pages'][$pageid]['fullurl'] = $title->getFullURL();
506506 $res['query']['pages'][$pageid]['editurl'] = $title->getFullURL('action=edit');
Index: trunk/phase3/includes/api/ApiQueryBacklinks.php
@@ -100,7 +100,7 @@
101101 * AND pl_title='Foo' AND pl_namespace=0
102102 * LIMIT 11 ORDER BY pl_from
103103 */
104 - $db = $this->getDb();
 104+ $db = $this->getDB();
105105 $this->addTables(array('page', $this->bl_table));
106106 $this->addWhere("{$this->bl_from}=page_id");
107107 if(is_null($resultPageSet))
@@ -108,7 +108,7 @@
109109 else
110110 $this->addFields($resultPageSet->getPageTableFields());
111111 $this->addFields('page_is_redirect');
112 - $this->addWhereFld($this->bl_title, $this->rootTitle->getDbKey());
 112+ $this->addWhereFld($this->bl_title, $this->rootTitle->getDBKey());
113113 if($this->hasNS)
114114 $this->addWhereFld($this->bl_ns, $this->rootTitle->getNamespace());
115115 $this->addWhereFld('page_namespace', $this->params['namespace']);
@@ -128,7 +128,7 @@
129129 * AND (pl_title='Foo' AND pl_namespace=0) OR (pl_title='Bar' AND pl_namespace=1)
130130 * LIMIT 11 ORDER BY pl_namespace, pl_title, pl_from
131131 */
132 - $db = $this->getDb();
 132+ $db = $this->getDB();
133133 $this->addTables(array('page', $this->bl_table));
134134 $this->addWhere("{$this->bl_from}=page_id");
135135 if(is_null($resultPageSet))
Index: trunk/phase3/includes/Linker.php
@@ -191,7 +191,7 @@
192192 wfProfileIn( __METHOD__ . '-checkPageExistence' );
193193 if( !in_array( 'known', $options ) and !in_array( 'broken', $options ) ) {
194194 if( $target->getNamespace() == NS_SPECIAL ) {
195 - if( SpecialPage::exists( $target->getDbKey() ) ) {
 195+ if( SpecialPage::exists( $target->getDBKey() ) ) {
196196 $options []= 'known';
197197 } else {
198198 $options []= 'broken';
Index: trunk/phase3/includes/filerepo/LocalFile.php
@@ -1716,7 +1716,7 @@
17171717 $this->file = $file;
17181718 $this->target = $target;
17191719 $this->oldHash = $this->file->repo->getHashPath( $this->file->getName() );
1720 - $this->newHash = $this->file->repo->getHashPath( $this->target->getDbKey() );
 1720+ $this->newHash = $this->file->repo->getHashPath( $this->target->getDBKey() );
17211721 $this->oldName = $this->file->getName();
17221722 $this->newName = $this->file->repo->getNameFromTitle( $this->target );
17231723 $this->oldRel = $this->oldHash . $this->oldName;
Index: trunk/phase3/includes/filerepo/LocalRepo.php
@@ -94,7 +94,7 @@
9595 'page_id', //Field
9696 array( //Conditions
9797 'page_namespace' => $title->getNamespace(),
98 - 'page_title' => $title->getDbKey(),
 98+ 'page_title' => $title->getDBKey(),
9999 ),
100100 __METHOD__ //Function name
101101 );
Index: trunk/phase3/includes/Title.php
@@ -2461,7 +2461,7 @@
24622462 if( $nt->getText() != wfStripIllegalFilenameChars( $nt->getText() ) ) {
24632463 $errors[] = array('imageinvalidfilename');
24642464 }
2465 - if( !File::checkExtensionCompatibility( $file, $nt->getDbKey() ) ) {
 2465+ if( !File::checkExtensionCompatibility( $file, $nt->getDBKey() ) ) {
24662466 $errors[] = array('imagetypemismatch');
24672467 }
24682468 }
Index: trunk/extensions/DPLforum/DPLforum_body.php
@@ -280,13 +280,13 @@
281281 for($i = 0; $i < $cats; $i++) {
282282 $sSqlSelectFrom .= " INNER JOIN $categorylinks AS" .
283283 " c{$n} ON page_id = c{$n}.cl_from AND c{$n}.cl_to=" .
284 - $dbr->addQuotes( $aCategories[$i]->getDbKey() );
 284+ $dbr->addQuotes( $aCategories[$i]->getDBKey() );
285285 $n++;
286286 }
287287 for($i = 0; $i < $nocats; $i++) {
288288 $sSqlSelectFrom .= " LEFT OUTER JOIN $categorylinks AS" .
289289 " c{$n} ON page_id = c{$n}.cl_from AND c{$n}.cl_to=" .
290 - $dbr->addQuotes( $aExcludeCategories[$i]->getDbKey() );
 290+ $dbr->addQuotes( $aExcludeCategories[$i]->getDBKey() );
291291 $sSqlWhere .= " AND c{$n}.cl_to IS NULL";
292292 $n++;
293293 }
Index: trunk/extensions/AbuseFilter/SpecialAbuseLog.php
@@ -84,7 +84,7 @@
8585 $searchTitle = Title::newFromText( $this->mSearchTitle );
8686 if ($this->mSearchTitle && $searchTitle) {
8787 $conds['afl_namespace'] = $searchTitle->getNamespace();
88 - $conds['afl_title'] = $searchTitle->getDbKey();
 88+ $conds['afl_title'] = $searchTitle->getDBKey();
8989 }
9090
9191 $pager = new AbuseLogPager( $this, $conds );
Index: trunk/extensions/AbuseFilter/AbuseFilter.class.php
@@ -145,7 +145,7 @@
146146 $log_entries = array();
147147 $log_template = array( 'afl_user' => $wgUser->getId(), 'afl_user_text' => $wgUser->getName(),
148148 'afl_var_dump' => serialize( $vars ), 'afl_timestamp' => $dbr->timestamp(wfTimestampNow()),
149 - 'afl_namespace' => $title->getNamespace(), 'afl_title' => $title->getDbKey(), 'afl_ip' => wfGetIp() );
 149+ 'afl_namespace' => $title->getNamespace(), 'afl_title' => $title->getDBKey(), 'afl_ip' => wfGetIp() );
150150 $doneActionsByFilter = array();
151151 $filter_matched = array();
152152
Index: trunk/extensions/SocialProfile/UserStats/UserStatsClass.php
@@ -261,7 +261,7 @@
262262 $ctg = "Opinions by User " . ($this->user_name);
263263 $parser = new Parser();
264264 $CtgTitle = Title::newFromText( $parser->transformMsg(trim($ctg), $wgOut->parserOptions() ) );
265 - $CtgTitle = $CtgTitle->getDbKey();
 265+ $CtgTitle = $CtgTitle->getDBKey();
266266 $dbr = wfGetDB( DB_MASTER );
267267 $sql = "UPDATE ".$wgDBprefix."user_stats SET stats_opinions_created=";
268268 $sql .= "(SELECT count(*) AS CreatedOpinions FROM {$dbr->tableName( 'page' )} INNER JOIN {$dbr->tableName( 'categorylinks' )} ON page_id = cl_from WHERE (cl_to) = " . $dbr->addQuotes($CtgTitle) . " ";
@@ -280,7 +280,7 @@
281281 $dbr = wfGetDB( DB_MASTER );
282282 $ctg = "Opinions by User " . ($this->user_name);
283283 $CtgTitle = Title::newFromText( $parser->transformMsg(trim($ctg), $wgOut->parserOptions()) );
284 - $CtgTitle = $CtgTitle->getDbKey();
 284+ $CtgTitle = $CtgTitle->getDBKey();
285285 $sql = "UPDATE ".$wgDBprefix."user_stats SET stats_opinions_published = ";
286286 $sql .= "(SELECT count(*) AS PromotedOpinions FROM {$dbr->tableName( 'page' )} INNER JOIN {$dbr->tableName( 'categorylinks' )} ON page_id = cl_from INNER JOIN published_page ON page_id=published_page_id WHERE (cl_to) = " . $dbr->addQuotes($CtgTitle) . " AND published_type=1 " . " " . $timeSQL;
287287 $sql .= ")";
Index: trunk/extensions/FCKeditor/FCKeditorSkin.body.php
@@ -308,7 +308,7 @@
309309 $class = 'internal';
310310 } else {
311311 $upload = SpecialPage::getTitleFor( 'Upload' );
312 - $url = $upload->getLocalUrl( 'wpDestFile=' . urlencode( $title->getDbKey() ) );
 312+ $url = $upload->getLocalUrl( 'wpDestFile=' . urlencode( $title->getDBKey() ) );
313313 $class = 'new';
314314 }
315315 }
Index: trunk/extensions/OpenSearchXml/ApiOpenSearchXml.php
@@ -243,7 +243,7 @@
244244 // Others will take Image:Foo.jpg or Foo.jpg
245245 $title = Title::newFromText( $arg, NS_IMAGE );
246246 if( $title && $title->getNamespace() == NS_IMAGE ) {
247 - return $title->getDbKey();
 247+ return $title->getDBKey();
248248 }
249249 return false;
250250 }
Index: trunk/extensions/DynamicPageList/DynamicPageList2.php
@@ -1402,12 +1402,12 @@
14031403 $sParamList = explode('|',self::getSubcategories(substr($sParam,1),$sPageTable));
14041404 foreach ($sParamList as $sPar) {
14051405 $title = Title::newFromText($localParser->transformMsg($sPar, $pOptions));
1406 - if( !is_null($title) ) $aCategories[] = $title->getDbKey();
 1406+ if( !is_null($title) ) $aCategories[] = $title->getDBKey();
14071407 }
14081408 }
14091409 else {
14101410 $title = Title::newFromText($localParser->transformMsg($sParam, $pOptions));
1411 - if( !is_null($title) ) $aCategories[] = $title->getDbKey();
 1411+ if( !is_null($title) ) $aCategories[] = $title->getDBKey();
14121412 }
14131413 }
14141414 }
@@ -1440,7 +1440,7 @@
14411441 case 'notcategory':
14421442 $title = Title::newFromText($localParser->transformMsg($sArg, $pOptions));
14431443 if( !is_null($title) ) {
1444 - $aExcludeCategories[] = $title->getDbKey();
 1444+ $aExcludeCategories[] = $title->getDBKey();
14451445 $bConflictsWithOpenReferences=true;
14461446 }
14471447 break;
@@ -2478,8 +2478,8 @@
24792479 foreach ($aLinksTo as $link) {
24802480 if ($n>0) $sSqlCond_page_pl .= ' OR ';
24812481 $sSqlCond_page_pl .= '(pl.pl_namespace=' . intval( $link->getNamespace() );
2482 - if ($bIgnoreCase) $sSqlCond_page_pl .= " AND UPPER(pl.pl_title)=UPPER(" . $dbr->addQuotes( $link->getDbKey() ).'))';
2483 - else $sSqlCond_page_pl .= " AND pl.pl_title=" . $dbr->addQuotes( $link->getDbKey() ).')';
 2482+ if ($bIgnoreCase) $sSqlCond_page_pl .= " AND UPPER(pl.pl_title)=UPPER(" . $dbr->addQuotes( $link->getDBKey() ).'))';
 2483+ else $sSqlCond_page_pl .= " AND pl.pl_title=" . $dbr->addQuotes( $link->getDBKey() ).')';
24842484 $n++;
24852485 }
24862486 $sSqlCond_page_pl .= ')';
@@ -2492,8 +2492,8 @@
24932493 foreach ($aNotLinksTo as $link) {
24942494 if ($n>0) $sSqlCond_page_pl .= ' OR ';
24952495 $sSqlCond_page_pl .= '('.$sPageLinksTable.'.pl_namespace=' . intval($link->getNamespace());
2496 - if ($bIgnoreCase) $sSqlCond_page_pl .= ' AND UPPER('.$sPageLinksTable.'.pl_title)=UPPER(' . $dbr->addQuotes( $link->getDbKey() ).'))';
2497 - else $sSqlCond_page_pl .= ' AND '.$sPageLinksTable.'.pl_title=' . $dbr->addQuotes( $link->getDbKey() ).')';
 2496+ if ($bIgnoreCase) $sSqlCond_page_pl .= ' AND UPPER('.$sPageLinksTable.'.pl_title)=UPPER(' . $dbr->addQuotes( $link->getDBKey() ).'))';
 2497+ else $sSqlCond_page_pl .= ' AND '.$sPageLinksTable.'.pl_title=' . $dbr->addQuotes( $link->getDBKey() ).')';
24982498 $n++;
24992499 }
25002500 $sSqlCond_page_pl .= ') )';
@@ -2558,8 +2558,8 @@
25592559 $n=0;
25602560 foreach ($aImageUsed as $link) {
25612561 if ($n>0) $sSqlCond_page_pl .= ' OR ';
2562 - if ($bIgnoreCase) $sSqlCond_page_pl .= "UPPER(il.il_to)=UPPER(" . $dbr->addQuotes( $link->getDbKey() ).')';
2563 - else $sSqlCond_page_pl .= "il.il_to=" . $dbr->addQuotes( $link->getDbKey() );
 2562+ if ($bIgnoreCase) $sSqlCond_page_pl .= "UPPER(il.il_to)=UPPER(" . $dbr->addQuotes( $link->getDBKey() ).')';
 2563+ else $sSqlCond_page_pl .= "il.il_to=" . $dbr->addQuotes( $link->getDBKey() );
25642564 $n++;
25652565 }
25662566 $sSqlCond_page_pl .= ')';
@@ -2592,8 +2592,8 @@
25932593 foreach ($aUses as $link) {
25942594 if ($n>0) $sSqlCond_page_pl .= ' OR ';
25952595 $sSqlCond_page_pl .= '(tl.tl_namespace=' . intval( $link->getNamespace() );
2596 - if ($bIgnoreCase) $sSqlCond_page_pl .= " AND UPPER(tl.tl_title)=UPPER(" . $dbr->addQuotes( $link->getDbKey() ).'))';
2597 - else $sSqlCond_page_pl .= " AND tl.tl_title=" . $dbr->addQuotes( $link->getDbKey() ).')';
 2596+ if ($bIgnoreCase) $sSqlCond_page_pl .= " AND UPPER(tl.tl_title)=UPPER(" . $dbr->addQuotes( $link->getDBKey() ).'))';
 2597+ else $sSqlCond_page_pl .= " AND tl.tl_title=" . $dbr->addQuotes( $link->getDBKey() ).')';
25982598 $n++;
25992599 }
26002600 $sSqlCond_page_pl .= ')';
@@ -2606,8 +2606,8 @@
26072607 foreach ($aNotUses as $link) {
26082608 if ($n>0) $sSqlCond_page_pl .= ' OR ';
26092609 $sSqlCond_page_pl .= '('.$sTemplateLinksTable.'.tl_namespace=' . intval($link->getNamespace());
2610 - if ($bIgnoreCase) $sSqlCond_page_pl .= ' AND UPPER('.$sTemplateLinksTable.'.tl_title)=UPPER(' . $dbr->addQuotes( $link->getDbKey() ).'))';
2611 - else $sSqlCond_page_pl .= ' AND '.$sTemplateLinksTable.'.tl_title=' . $dbr->addQuotes( $link->getDbKey() ).')';
 2610+ if ($bIgnoreCase) $sSqlCond_page_pl .= ' AND UPPER('.$sTemplateLinksTable.'.tl_title)=UPPER(' . $dbr->addQuotes( $link->getDBKey() ).'))';
 2611+ else $sSqlCond_page_pl .= ' AND '.$sTemplateLinksTable.'.tl_title=' . $dbr->addQuotes( $link->getDBKey() ).')';
26122612 $n++;
26132613 }
26142614 $sSqlCond_page_pl .= ') )';

Status & tagging log