Don't check namespace in SpecialWantedtemplates
[lhc/web/wiklou.git] / maintenance / fixExtLinksProtocolRelative.php
index 02d65ed..0c60e62 100644 (file)
@@ -34,7 +34,8 @@ require_once __DIR__ . '/Maintenance.php';
 class FixExtLinksProtocolRelative extends LoggedUpdateMaintenance {
        public function __construct() {
                parent::__construct();
-               $this->mDescription = "Fixes any entries in the externallinks table containing protocol-relative URLs";
+               $this->mDescription =
+                       "Fixes any entries in the externallinks table containing protocol-relative URLs";
        }
 
        protected function getUpdateKey() {
@@ -49,6 +50,7 @@ class FixExtLinksProtocolRelative extends LoggedUpdateMaintenance {
                $db = wfGetDB( DB_MASTER );
                if ( !$db->tableExists( 'externallinks' ) ) {
                        $this->error( "externallinks table does not exist" );
+
                        return false;
                }
                $this->output( "Fixing protocol-relative entries in the externallinks table...\n" );
@@ -79,9 +81,18 @@ class FixExtLinksProtocolRelative extends LoggedUpdateMaintenance {
                                        )
                                ), __METHOD__, array( 'IGNORE' )
                        );
-                       $db->delete( 'externallinks', array( 'el_index' => $row->el_index, 'el_from' => $row->el_from, 'el_to' => $row->el_to ), __METHOD__ );
+                       $db->delete(
+                               'externallinks',
+                               array(
+                                       'el_index' => $row->el_index,
+                                       'el_from' => $row->el_from,
+                                       'el_to' => $row->el_to
+                               ),
+                               __METHOD__
+                       );
                }
                $this->output( "Done, $count rows updated.\n" );
+
                return true;
        }
 }