From e0b8d17b792ce1fcb50e491fd733c1dcd9a6fa57 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Sun, 1 Dec 2013 11:55:44 +0100 Subject: [PATCH] Simplify switch in BacklinkCache::getConditions Change-Id: I9f1ddad705d1697dd81f74eb735dc386bab9d200 --- includes/cache/BacklinkCache.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/includes/cache/BacklinkCache.php b/includes/cache/BacklinkCache.php index 8eed1a50e1..686361b20c 100644 --- a/includes/cache/BacklinkCache.php +++ b/includes/cache/BacklinkCache.php @@ -274,8 +274,6 @@ class BacklinkCache { 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 @@ class BacklinkCache { ); 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; -- 2.20.1