Let crazy people run updates on broken setups like 5.3.1
[lhc/web/wiklou.git] / maintenance / attachLatest.php
index 71d5c79..67f3088 100644 (file)
@@ -24,7 +24,7 @@
  * @ingroup Maintenance
  */
 
-require_once( "Maintenance.php" );
+require_once( dirname(__FILE__) . '/Maintenance.php' );
 
 class AttachLatest extends Maintenance {
        
@@ -43,7 +43,7 @@ class AttachLatest extends Maintenance {
                        __METHOD__ );
 
                $n = 0;
-               while( $row = $dbw->fetchObject( $result ) ) {
+               foreach( $result as $row ) {
                        $pageId = intval( $row->page_id );
                        $title = Title::makeTitle( $row->page_namespace, $row->page_title );
                        $name = $title->getPrefixedText();