From db8c1bc30eff79285e384db414beb082812b0f97 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Sun, 1 May 2005 22:32:30 +0000 Subject: [PATCH] * Changed 'cur' to 'page' which we use in 1.5 * Creating directories with 0644 is a bad idea if we want to descend into them, changed to 0755. --- maintenance/dumpHTML.inc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/maintenance/dumpHTML.inc b/maintenance/dumpHTML.inc index 7c145a9cda..9f42a7482b 100644 --- a/maintenance/dumpHTML.inc +++ b/maintenance/dumpHTML.inc @@ -12,20 +12,20 @@ function dumpHTML( $dest, $start ) { $wgLogo = "$wgStylePath/common/images/wiki.png"; $wgArticlePath = '../../$1'; $dbr =& wfGetDB( DB_SLAVE ); - $end = $dbr->selectField( 'cur', 'max(cur_id)', false ); + $end = $dbr->selectField( 'page', 'max(page_id)', false ); /*global $wgValidSkinNames; var_dump( $wgValidSkinNames ); exit;*/ - print("Creating static HTML dump. Starting from cur_id $start of $end.\n"); + print("Creating static HTML dump. Starting from page_id $start of $end.\n"); $wgUser = new User; $wgUser->setOption( 'skin', 'htmldump' ); $sk =& $wgUser->getSkin(); if ( !is_dir( $dest ) ) { - if ( !mkdir( $dest, 0644 ) ) { + if ( !mkdir( $dest, 0755 ) ) { print("Can't make directory $dir, exiting\n"); return; } @@ -78,15 +78,14 @@ function dumpHTML( $dest, $start ) { $fullDir = "$dest/{$bits[0]}/{$bits[1]}"; $fullName = "$dest/$fname"; - if ( !is_dir( $parentDir ) ) { - if ( !mkdir( $parentDir, 0644 ) ) { + if ( !mkdir( $parentDir, 0744 ) ) { print("Can't write to directory $parentDir\n"); return; } } if ( !is_dir( $fullDir ) ) { - if ( !mkdir( $fullDir, 0644 ) ) { + if ( !mkdir( $fullDir, 0744 ) ) { print("Can't write to directory $fullDir\n"); return; } -- 2.20.1