Changeset 6206 for extensions/autoupdate/branches/1.7
- Timestamp:
- May 17, 2010, 6:19:42 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/autoupdate/branches/1.7/include/functions.inc.php
r6205 r6206 205 205 $path = $conf['local_data_dir'].'/autoupdate'; 206 206 207 if (mkgetdir($path) 207 if (mkgetdir($conf['local_data_dir']) 208 and mkgetdir($path) 208 209 and ($zip = tempnam($path, 'zip')) 209 210 and ($archive = new pclZip($zip)) … … 246 247 $path = $conf['local_data_dir'].'/autoupdate'; 247 248 248 if (@mkgetdir($path) 249 if (mkgetdir($conf['local_data_dir']) 250 and mkgetdir($path) 249 251 and ($backupFile = tempnam($path, 'sql')) 250 252 and ($dumper = new MySQLDump($conf['db_base'],$backupFile,false,false))) … … 320 322 $path = $conf['local_data_dir'].'/autoupdate'; 321 323 $filename = $path.'/'.$code.'.zip'; 322 @mkgetdir($path); 324 mkgetdir($conf['local_data_dir']); 325 mkgetdir($path); 323 326 324 327 $chunk_num = 0; … … 385 388 { 386 389 array_push($page['infos'], sprintf(l10n('autoupdate_success'), $upgrade_to)); 387 $step = 3;390 $step = 4; 388 391 } 389 392 else … … 564 567 { 565 568 $umask = umask(0); 566 $mkd = @mkdir($dir, 0755 , ($flags&MKGETDIR_RECURSIVE) ? true:false);569 $mkd = @mkdir($dir, 0755 ); 567 570 umask($umask); 568 571 if ($mkd==false) 569 572 { 570 !($flags&MKGETDIR_DIE_ON_ERROR) or fatal_error( "$dir ".l10n('no write access'));573 !($flags&MKGETDIR_DIE_ON_ERROR) or die( "$dir ".l10n('no write access')); 571 574 return false; 572 575 } 573 if( $flags&MKGETDIR_PROTECT_HTACCESS )574 {575 $file = $dir.'/.htaccess';576 file_exists($file) or @file_put_contents( $file, 'deny from all' );577 }578 if( $flags&MKGETDIR_PROTECT_INDEX )579 {580 $file = $dir.'/index.htm';581 file_exists($file) or @file_put_contents( $file, 'Not allowed!' );582 }583 576 } 584 577 if ( !is_writable($dir) ) 585 578 { 586 !($flags&MKGETDIR_DIE_ON_ERROR) or fatal_error( "$dir ".l10n('no write access'));579 !($flags&MKGETDIR_DIE_ON_ERROR) or die( "$dir ".l10n('no write access')); 587 580 return false; 588 581 }
Note: See TracChangeset
for help on using the changeset viewer.