Was it supposed to be a comma instead of dot? :)
[lhc/web/wiklou.git] / maintenance / rebuildImages.php
index dfdb3b2..0d3bdb3 100644 (file)
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  *
+ * @file
  * @author Brion Vibber <brion at pobox.com>
- * @addtogroup maintenance
+ * @ingrouo maintenance
  */
 
 $options = array( 'missing', 'dry-run' );
 
-require_once( 'commandLine.inc' );
+require_once( dirname(__FILE__) . '/commandLine.inc' );
 require_once( 'FiveUpgrade.inc' );
 
 class ImageBuilder extends FiveUpgrade {
@@ -103,7 +104,7 @@ class ImageBuilder extends FiveUpgrade {
                $result = $this->dbr->query( $sql, $fname );
 
                while( $row = $this->dbr->fetchObject( $result ) ) {
-                       $update = call_user_func( $callback, $row );
+                       $update = call_user_func( $callback, $row, null );
                        if( $update ) {
                                $this->progress( 1 );
                        } else {
@@ -119,7 +120,7 @@ class ImageBuilder extends FiveUpgrade {
                $this->buildTable( 'image', 'img_name', $callback );
        }
 
-       function imageCallback( $row ) {
+       function imageCallback( $row, $copy ) {
                // Create a File object from the row
                // This will also upgrade it
                $file = $this->getRepo()->newFileFromRow( $row );
@@ -131,7 +132,7 @@ class ImageBuilder extends FiveUpgrade {
                        array( &$this, 'oldimageCallback' ) );
        }
 
-       function oldimageCallback( $row ) {
+       function oldimageCallback( $row, $copy ) {
                // Create a File object from the row
                // This will also upgrade it
                if ( $row->oi_archive_name == '' ) {