Merge "(bug 17808) (bug 21167) use real links for search suggestions"
[lhc/web/wiklou.git] / maintenance / updateDoubleWidthSearch.php
index 7899628..dc7398a 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Script to normalize double-byte latin UTF-8 characters
+ * Normalize double-byte latin UTF-8 characters
  *
  * Usage: php updateDoubleWidthSearch.php
  *
  * @ingroup Maintenance
  */
 
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
 
+/**
+ * Maintenance script to normalize double-byte latin UTF-8 characters.
+ *
+ * @ingroup Maintenance
+ */
 class UpdateDoubleWidthSearch extends Maintenance {
 
        public function __construct() {
@@ -43,8 +48,7 @@ class UpdateDoubleWidthSearch extends Maintenance {
 
                $dbw = wfGetDB( DB_MASTER );
                if ( $dbw->getType() !== 'mysql' ) {
-                       $this->output( "This change is only needed on MySQL, quitting.\n" );
-                       exit( 1 );
+                       $this->error( "This change is only needed on MySQL, quitting.\n", true );
                }
 
                $res = $this->findRows( $dbw );
@@ -68,4 +72,4 @@ class UpdateDoubleWidthSearch extends Maintenance {
 }
 
 $maintClass = "UpdateDoubleWidthSearch";
-require_once( DO_MAINTENANCE );
+require_once( RUN_MAINTENANCE_IF_MAIN );