Replace mkdir() in favor of wfMkdirParents():
authorChad Horohoe <demon@users.mediawiki.org>
Fri, 21 Nov 2008 11:34:09 +0000 (11:34 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Fri, 21 Nov 2008 11:34:09 +0000 (11:34 +0000)
* It handles directory modes for us (rather than hardcode 0777)
* It handles recursion for us

maintenance/cleanupImages.php

index 69333fe..b976ba8 100644 (file)
@@ -144,7 +144,7 @@ class ImageCleanup extends TableCleanup {
                                __METHOD__ );
                        $dir = dirname( $finalPath );
                        if( !file_exists( $dir ) ) {
-                               if( !mkdir( $dir, 0777, true ) ) {
+                               if( !wfMkdirParents( $dir ) ) {
                                        $this->log( "RENAME FAILED, COULD NOT CREATE $dir" );
                                        $db->rollback();
                                        return;