Project

General

Profile

« Previous | Next » 

Revision 551

Added by thorn almost 17 years ago

Reintroduced some more changes from changeset [520] and [540] which where overwritten by changeset [546]

View differences:

trunk/wb/admin/pages/settings2.php
150 150
// Get page trail
151 151
$page_trail = get_page_trail($page_id);
152 152

  
153
// Make sure link is not overwritten if page uses the menu link module
154
$query_sections = $database->query("SELECT section_id FROM ".TABLE_PREFIX."sections WHERE page_id = '$page_id' AND module = 'menu_link'");
155
if($query_sections->numRows() > 0) {
156
	$link = $old_link;
157
} 
158

  
159 153
// Update page settings in the pages table
160 154
$query = "UPDATE ".TABLE_PREFIX."pages SET parent = '$parent', page_title = '$page_title', menu_title = '$menu_title', menu = '$menu', level = '$level', page_trail = '$page_trail', root_parent = '$root_parent', link = '$link', template = '$template', target = '$target', description = '$description', keywords = '$keywords', position = '$position', visibility = '$visibility', searching = '$searching', language = '$language', admin_groups = '$admin_groups', viewing_groups = '$viewing_groups' WHERE page_id = '$page_id'";
161 155
$database->query($query);
trunk/wb/framework/functions.php
1197 1197
	$directory = WB_PATH.PAGES_DIRECTORY.$link;
1198 1198
	$filename = $directory.'.php';
1199 1199
	$directory .= '/';
1200
	if(file_exists($filename) && substr($filename,0,1<>'.')) {
1200
	if(file_exists($filename)) {
1201 1201
		if(!is_writable(WB_PATH.PAGES_DIRECTORY.'/')) {
1202 1202
			$admin->print_error($MESSAGE['PAGES']['CANNOT_DELETE_ACCESS_FILE']);
1203 1203
		} else {
1204 1204
			unlink($filename);
1205
			if(file_exists($directory)) {
1205
			if(file_exists($directory) && rtrim($directory,'/')!=WB_PATH.PAGES_DIRECTORY) {
1206 1206
				rm_full_dir($directory);
1207 1207
			}
1208 1208
		}

Also available in: Unified diff