Project

General

Profile

« Previous | Next » 

Revision 1978

Added by Dietmar about 11 years ago

/framework/functions.php::rebuild_all_accessfiles() output of detailed log corrected

View differences:

branches/2.8.x/CHANGELOG
11 11
! = Update/Change
12 12
===============================================================================
13 13

  
14
08 Oct-2013 Build 1978 Dietmar Woellbrink (Luisehahne)
15
! /framework/functions.php::rebuild_all_accessfiles()  output of detailed log corrected
14 16
06 Oct-2013 Build 1977 Dietmar Woellbrink (Luisehahne)
15 17
! /framework/functions.php: started implementation of packet AccessFile in function rebuild_all_accessfiles()
16 18
+ /framework/functions.php::rm_full_dir() added additional argument to set list of protected files
branches/2.8.x/wb/admin/interface/version.php
51 51

  
52 52
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
53 53
if(!defined('VERSION')) define('VERSION', '2.8.3');
54
if(!defined('REVISION')) define('REVISION', '1977');
54
if(!defined('REVISION')) define('REVISION', '1978');
55 55
if(!defined('SP')) define('SP', '');
branches/2.8.x/wb/framework/functions.php
27 27

  
28 28
/**
29 29
 * Delete an Accessfiles Tree
30
 * @param  string  $sDirToDelete  
30
 * @param  string  $sDirToDelete
31
 * @param  array   &$aReport  returns report if set
31 32
 * @return boolean true/false
32 33
 * @description    Delete all accessfiles and its depending directory tree 
33 34
 *                 inside the given directory.
34 35
 */
35

  
36
function DeleteAccessFilesTree($sDirToDelete)
36
function DeleteAccessFilesTree($sDirToDelete, array &$aReport = null)
37 37
{
38
		$aReport = array();
38 39
        $sBaseDir = realpath($sDirToDelete);
39 40
        if( $sBaseDir !== false) {    
40 41
		$sBaseDir = rtrim(str_replace('\\', '/', $sBaseDir), '/') . '/';
......
44 45
			try{
45 46
				$oAccFile = new AccessFile($sItem);
46 47
				$oAccFile->delete();
48
				$aReport = array_merge($aReport, AccessFileHelper::getDelTreeLog());
47 49
			}catch(AccessFileIsNoAccessfileException $e) {
48 50
				continue;
49 51
			}
......
1451 1453
    	/**
1452 1454
    	 * try to remove access files and build new folder protect files
1453 1455
    	 */
1454
 //   	$sTempDir = (defined('PAGES_DIRECTORY') && (PAGES_DIRECTORY != '') ? PAGES_DIRECTORY : '').'/';
1456
//   	$sTempDir = (defined('PAGES_DIRECTORY') && (PAGES_DIRECTORY != '') ? PAGES_DIRECTORY : '').'/';
1455 1457
        $sTreeToDelete = WbAdaptor::getInstance()->AppPath.WbAdaptor::getInstance()->PagesDir;
1456 1458
    	if(($sTreeToDelete!='') && is_writeable($sTreeToDelete)==true) {
1457 1459
//    	 	if(rm_full_dir (WB_PATH.$sTempDir, true, $aProtectedFiles )==false) {
1458 1460
//    			$aRetval[] = 'Could not delete existing access files';
1459 1461
//    	 	}
1460
            DeleteAccessFilesTree($sTreeToDelete);
1462
			$aDeleteLog = array();	// <<< ge?ndert
1463
            DeleteAccessFilesTree($sTreeToDelete, $aDeleteLog);	// <<< ge?ndert
1461 1464
            if($bShowDetails) {
1462
                $aRetval = array_merge($aRetval, AccessFileHelper::getDelTreeLog());
1465
                $aRetval = array_merge($aRetval, $aDeleteLog);	// <<< ge?ndert
1463 1466
            }
1464 1467
    	}
1465 1468

  

Also available in: Unified diff