Changeset 7387
- Timestamp:
- Oct 25, 2010, 11:36:08 AM (14 years ago)
- Location:
- extensions/GrumPluginClasses
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GrumPluginClasses/classes/GPCCore.class.inc.php
r7310 r7387 29 29 | | | 30 30 | | | * implement the getPiwigoSystemPath function 31 | | | 32 | | | * implement the rmDir function 31 33 | | | 32 34 | | | … … 48 50 - static function getPiwigoSystemPath 49 51 - static function formatOctet 52 - static function rmDir 50 53 ---------------------------------------------------------------------- */ 51 54 … … 76 79 Array('name' => "CommonPlugin", 'version' => "2.2.0"), 77 80 Array('name' => "GPCAjax", 'version' => "3.0.0"), 78 Array('name' => "GPCCore", 'version' => "1. 2.0"),81 Array('name' => "GPCCore", 'version' => "1.3.1"), 79 82 Array('name' => "GPCCss", 'version' => "3.0.0"), 80 83 Array('name' => "GPCPagesNavigations", 'version' => "2.0.0"), … … 82 85 Array('name' => "GPCRequestBuilder", 'version' => "1.1.0"), 83 86 Array('name' => "GPCTables", 'version' => "1.5.0"), 84 Array('name' => "GPCTabSheet", 'version' => "1.1. 0"),87 Array('name' => "GPCTabSheet", 'version' => "1.1.1"), 85 88 Array('name' => "GPCTranslate", 'version' => "2.1.0"), 86 89 Array('name' => "GPCUsersGroups", 'version' => "2.0.0"), … … 393 396 } 394 397 398 399 /** 400 * remove a path recursively 401 * 402 * @param String $directory : directory to remove 403 * @param Bool $removePath : if set to true, remove the path himself, if set 404 * to false, remove only file & sub-directories 405 * @return Bool : true if directory was succesfully removed, otherwise false 406 */ 407 static public function rmDir($directory, $removePath=true) 408 { 409 $directory=rtrim($directory, '\/').'/'; 410 $returned=true; 411 if(file_exists($directory) and is_dir($directory) and $directory!='./' and $directory!='../') 412 { 413 $dhandle=scandir($directory); 414 foreach($dhandle as $file) 415 { 416 if($file!='.' and $file!='..' ) 417 { 418 if(is_dir($directory.$file)) 419 { 420 $returned=self::rmDir($directory.$file, true) & $returned; 421 } 422 else 423 { 424 $returned=unlink($directory.$file) & $returned; 425 } 426 } 427 } 428 if($returned and $removePath) $returned=rmdir($directory); 429 } 430 return($returned); 431 } 432 433 395 434 /** 396 435 * returns the piwigo system path -
extensions/GrumPluginClasses/classes/GPCRequestBuilder.class.inc.php
r7370 r7387 81 81 82 82 --------------------------------------------------------------------------- */ 83 84 if(!defined('GPC_DIR')) define('GPC_DIR' , basename(basename(dirname(__FILE__)))); 85 if(!defined('GPC_PATH')) define('GPC_PATH' , PHPWG_PLUGINS_PATH . GPC_DIR . '/'); 83 86 84 87 include_once('GPCTables.class.inc.php'); -
extensions/GrumPluginClasses/maintain.inc.php
r6975 r7387 2 2 3 3 if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); } 4 5 if(!defined('GPC_DIR')) define('GPC_DIR' , basename(dirname(__FILE__))); 6 if(!defined('GPC_PATH')) define('GPC_PATH' , PHPWG_PLUGINS_PATH . GPC_DIR . '/'); 7 4 8 5 9 // ini_set('error_reporting', E_ALL);
Note: See TracChangeset
for help on using the changeset viewer.