Revision 1859
Added by Dietmar almost 12 years ago
- bugfix mkdir(): Invalid argument if create acessfile
branches/2.8.x/CHANGELOG | ||
---|---|---|
12 | 12 |
=============================================================================== |
13 | 13 |
|
14 | 14 |
|
15 |
08 Jan-2013 Build 1858 Dietmar Woellbrink (Luisehahne) |
|
15 |
11 Jan-2013 Build 1859 Dietmar Woellbrink (Luisehahne) |
|
16 |
# bugfix mkdir(): Invalid argument if create acessfile |
|
17 |
11 Jan-2013 Build 1858 Dietmar Woellbrink (Luisehahne) |
|
16 | 18 |
- remove MODULES_UPGRADE_LIST input from saettings |
17 | 19 |
08 Jan-2013 Build 1857 Dietmar Woellbrink (Luisehahne) |
18 | 20 |
+ add deleted files and images in jqauery |
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', '1858');
|
|
54 |
if(!defined('REVISION')) define('REVISION', '1859');
|
|
55 | 55 |
if(!defined('SP')) define('SP', ''); |
branches/2.8.x/wb/admin/settings/save.php | ||
---|---|---|
241 | 241 |
$passed = true; |
242 | 242 |
break; |
243 | 243 |
case 'media_directory': |
244 |
if(strpos($value,'/',0)===false) { $value= '/'.$value; }
|
|
244 |
$value = ( (strpos($value,'/',0)===false) && ($value!= '') ) ? '/'.$value : rtrim($value,'/');
|
|
245 | 245 |
$passed = true; |
246 | 246 |
break; |
247 | 247 |
case 'pages_directory': |
248 | 248 |
if( ($database->get_one('SELECT COUNT(*) FROM `'.TABLE_PREFIX.'pages`'))==0 ) { |
249 |
$value = $admin->StripCodeFromText($value);
|
|
249 |
$value = rtrim($admin->StripCodeFromText($value));
|
|
250 | 250 |
$passed = true; |
251 | 251 |
} else { |
252 |
$value = $old_settings[$setting_name];
|
|
252 |
$value = rtrim($old_settings[$setting_name]);
|
|
253 | 253 |
} |
254 |
if(strpos($value,'/',0)===false) { $value= '/'.$value; }
|
|
254 |
$value = ( (strpos($value,'/',0)===false) && ($value != '') ? '/'.$value : rtrim($value,'/') );
|
|
255 | 255 |
break; |
256 | 256 |
case 'wbmailer_smtp_auth': |
257 | 257 |
$value = true ; |
branches/2.8.x/wb/framework/functions.php | ||
---|---|---|
963 | 963 |
$results_array = $results->fetchRow(MYSQL_ASSOC); |
964 | 964 |
$parent = $results_array['parent']; |
965 | 965 |
$level = $results_array['level']; |
966 |
$link = $results_array['link'];
|
|
966 |
$sPageLink = $results_array['link'];
|
|
967 | 967 |
$page_title = $results_array['page_title']; |
968 | 968 |
$menu_title = $results_array['menu_title']; |
969 | 969 |
// Get the sections that belong to the page |
... | ... | |
981 | 981 |
} |
982 | 982 |
} |
983 | 983 |
} |
984 |
// Update the pages table |
|
985 |
$sql = 'DELETE FROM `'.TABLE_PREFIX.'pages` WHERE `page_id`='.$page_id; |
|
986 |
$database->query($sql); |
|
987 |
if($database->is_error()) { |
|
988 |
$admin->print_error($database->get_error()); |
|
989 |
} |
|
990 | 984 |
// Update the sections table |
991 | 985 |
$sql = 'DELETE FROM `'.TABLE_PREFIX.'sections` WHERE `page_id`='.$page_id; |
992 | 986 |
$database->query($sql); |
... | ... | |
998 | 992 |
$order = new order(TABLE_PREFIX.'pages', 'position', 'page_id', 'parent'); |
999 | 993 |
$order->clean($parent); |
1000 | 994 |
// Unlink the page access file and directory |
1001 |
$directory = WB_PATH.PAGES_DIRECTORY.$link;
|
|
995 |
$directory = WB_PATH.PAGES_DIRECTORY.$sPageLink;
|
|
1002 | 996 |
$filename = $directory.PAGE_EXTENSION; |
1003 | 997 |
$directory .= '/'; |
1004 |
if(file_exists($filename))
|
|
998 |
if(is_writable($filename))
|
|
1005 | 999 |
{ |
1006 | 1000 |
if(!is_writable(WB_PATH.PAGES_DIRECTORY.'/')) { |
1007 | 1001 |
$admin->print_error($MESSAGE['PAGES_CANNOT_DELETE_ACCESS_FILE']); |
1008 |
}else { |
|
1002 |
} else {
|
|
1009 | 1003 |
unlink($filename); |
1010 |
if( file_exists($directory) && |
|
1011 |
(rtrim($directory,'/') != WB_PATH.PAGES_DIRECTORY) && |
|
1012 |
(substr($link, 0, 1) != '.')) |
|
1004 |
if( is_writable($directory) && (rtrim($directory,'/') != WB_PATH.PAGES_DIRECTORY ) && (substr($sPageLink, 0, 1) != '.') ) |
|
1013 | 1005 |
{ |
1014 | 1006 |
rm_full_dir($directory); |
1015 | 1007 |
} |
1016 | 1008 |
} |
1017 | 1009 |
} |
1010 |
// Update the pages table |
|
1011 |
$sql = 'DELETE FROM `'.TABLE_PREFIX.'pages` WHERE `page_id`='.$page_id; |
|
1012 |
$database->query($sql); |
|
1013 |
if($database->is_error()) { |
|
1014 |
$admin->print_error($database->get_error()); |
|
1015 |
} |
|
1018 | 1016 |
} |
1019 | 1017 |
|
1020 | 1018 |
/* |
Also available in: Unified diff