http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97626

Revision: 97626
Author:   nikerabbit
Date:     2011-09-20 13:52:47 +0000 (Tue, 20 Sep 2011)
Log Message:
-----------
No need to check isset before unset, shortens the code a bit, and added some 
whitespace

Modified Paths:
--------------
    trunk/phase3/includes/cache/LinkCache.php

Modified: trunk/phase3/includes/cache/LinkCache.php
===================================================================
--- trunk/phase3/includes/cache/LinkCache.php   2011-09-20 13:36:09 UTC (rev 
97625)
+++ trunk/phase3/includes/cache/LinkCache.php   2011-09-20 13:52:47 UTC (rev 
97626)
@@ -114,15 +114,9 @@
         */
        public function clearLink( $title ) {
                $dbkey = $title->getPrefixedDbKey();
-               if( isset($this->mBadLinks[$dbkey]) ) {
-                       unset($this->mBadLinks[$dbkey]);
-               }
-               if( isset($this->mGoodLinks[$dbkey]) ) {
-                       unset($this->mGoodLinks[$dbkey]);
-               }
-               if( isset($this->mGoodLinkFields[$dbkey]) ) {
-                       unset($this->mGoodLinkFields[$dbkey]);
-               }
+               unset( $this->mBadLinks[$dbkey] );
+               unset( $this->mGoodLinks[$dbkey] );
+               unset( $this->mGoodLinkFields[$dbkey] );
        }
 
        public function getGoodLinks() { return $this->mGoodLinks; }


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to