[Upload] [Schema] Added us_props column to avoid expensive GETs.
[lhc/web/wiklou.git] / maintenance / fixExtLinksProtocolRelative.php
index 1a7025a..2403ec6 100644 (file)
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  *
+ * @file
  * @ingroup Maintenance
  */
 
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
 
+/**
+ * Maintenance script that fixes any entriy for protocol-relative URLs
+ * in the externallinks table.
+ *
+ * @ingroup Maintenance
+ */
 class FixExtLinksProtocolRelative extends LoggedUpdateMaintenance {
        public function __construct() {
                parent::__construct();
@@ -37,7 +44,7 @@ class FixExtLinksProtocolRelative extends LoggedUpdateMaintenance {
        protected function updateSkippedMessage() {
                return 'protocol-relative URLs in externallinks table already fixed.';
        }
-       
+
        protected function doDBUpdates() {
                $db = wfGetDB( DB_MASTER );
                if ( !$db->tableExists( 'externallinks' ) ) {
@@ -53,7 +60,7 @@ class FixExtLinksProtocolRelative extends LoggedUpdateMaintenance {
                foreach ( $res as $row ) {
                        $count++;
                        if ( $count % 100 == 0 ) {
-                               $this->output( $count );
+                               $this->output( $count . "\n" );
                                wfWaitForSlaves();
                        }
                        $db->insert( 'externallinks',