Umherirrender has uploaded a new change for review.

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


Change subject: Simplify switch in BacklinkCache::getConditions
......................................................................

Simplify switch in BacklinkCache::getConditions

Change-Id: I9f1ddad705d1697dd81f74eb735dc386bab9d200
---
M includes/cache/BacklinkCache.php
1 file changed, 1 insertion(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/61/98361/1

diff --git a/includes/cache/BacklinkCache.php b/includes/cache/BacklinkCache.php
index 8eed1a5..686361b 100644
--- a/includes/cache/BacklinkCache.php
+++ b/includes/cache/BacklinkCache.php
@@ -274,8 +274,6 @@
        protected function getConditions( $table ) {
                $prefix = $this->getPrefix( $table );
 
-               // @todo FIXME: imagelinks and categorylinks do not rely on 
getNamespace,
-               // they could be moved up for nicer case statements
                switch ( $table ) {
                        case 'pagelinks':
                        case 'templatelinks':
@@ -297,14 +295,9 @@
                                );
                                break;
                        case 'imagelinks':
-                               $conds = array(
-                                       'il_to' => $this->title->getDBkey(),
-                                       "page_id={$prefix}_from"
-                               );
-                               break;
                        case 'categorylinks':
                                $conds = array(
-                                       'cl_to' => $this->title->getDBkey(),
+                                       "{$prefix}_to" => 
$this->title->getDBkey(),
                                        "page_id={$prefix}_from"
                                );
                                break;

-- 
To view, visit https://gerrit.wikimedia.org/r/98361
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9f1ddad705d1697dd81f74eb735dc386bab9d200
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to