From: umherirrender Date: Sun, 1 Dec 2013 10:55:44 +0000 (+0100) Subject: Simplify switch in BacklinkCache::getConditions X-Git-Tag: 1.31.0-rc.0~17851^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=e0b8d17b792ce1fcb50e491fd733c1dcd9a6fa57;p=lhc%2Fweb%2Fwiklou.git Simplify switch in BacklinkCache::getConditions Change-Id: I9f1ddad705d1697dd81f74eb735dc386bab9d200 --- 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;