getBools doesn't exist in Translate anymore
[lhc/web/wiklou.git] / maintenance / populateRevisionSha1.php
index b082f80..113eef4 100644 (file)
@@ -22,7 +22,7 @@
  * @ingroup Maintenance
  */
 
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
 
 /**
  * Maintenance script that fills the rev_sha1 and ar_sha1 columns of revision
@@ -48,6 +48,9 @@ class PopulateRevisionSha1 extends LoggedUpdateMaintenance {
                        $this->error( "revision table does not exist", true );
                } elseif ( !$db->tableExists( 'archive' ) ) {
                        $this->error( "archive table does not exist", true );
+               } else if ( !$db->fieldExists( 'revision', 'rev_sha1', __METHOD__ ) ) {
+                       $this->output( "rev_sha1 column does not exist\n\n", true );
+                       return false;
                }
 
                $this->output( "Populating rev_sha1 column\n" );