Changeset 6196 for extensions/autoupdate/trunk/include
- Timestamp:
- May 16, 2010, 5:57:12 PM (14 years ago)
- Location:
- extensions/autoupdate/trunk/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/autoupdate/trunk/include/functions.inc.php
r6181 r6196 1 1 <?php 2 2 3 function autoupdate_deltree($path) 3 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 4 5 function autoupdate_deltree($path, $move_to_trash=false) 4 6 { 5 7 if (is_dir($path)) … … 13 15 if (is_dir($pathfile)) 14 16 { 15 autoupdate_deltree($pathfile );17 autoupdate_deltree($pathfile, $move_to_trash); 16 18 } 17 19 else … … 22 24 } 23 25 closedir($fh); 24 return @rmdir($path); 26 if (@rmdir($path)) 27 { 28 return true; 29 } 30 elseif ($move_to_trash) 31 { 32 $trash = PHPWG_ROOT_PATH.'_trash'; 33 if (!is_dir($trash)) 34 { 35 @mkgetdir($trash); 36 } 37 return @rename($path, $trash . '/'.md5(uniqid(rand(), true))); 38 } 39 else 40 { 41 return false; 42 } 25 43 } 26 44 } … … 65 83 elseif (is_dir($path)) 66 84 { 67 autoupdate_deltree($path );85 autoupdate_deltree($path, true); 68 86 } 69 87 } … … 399 417 } 400 418 419 if (!function_exists('is_webmaster')) 420 { 421 function is_webmaster($user_status = '') 422 { 423 return is_autorize_status(ACCESS_WEBMASTER, $user_status); 424 } 425 } 426 401 427 define('AU_DEFAULT_INDEX', file_get_contents(AUTOUPDATE_PATH.'index.php')); 402 428 ?> -
extensions/autoupdate/trunk/include/functions_remote.inc.php
r6167 r6196 1 1 <?php 2 3 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 2 4 3 5 function autoupdate_check_version($version=PHPWG_VERSION)
Note: See TracChangeset
for help on using the changeset viewer.