Project

General

Profile

« Previous | Next » 

Revision 555

Added by Matthias almost 17 years ago

Revoked parts of changeset [547] and again introduced changeset [540]

View differences:

settings2.php
123 123
// Work-out what the link should be
124 124
if($parent == '0') {
125 125
	$link = '/'.page_filename($menu_title);
126
	$filename = WB_PATH.PAGES_DIRECTORY.'/'.page_filename($menu_title).'.php'; 
126
	$filename = WB_PATH.PAGES_DIRECTORY.'/'.page_filename($menu_title).PAGE_EXTENSION; 
127 127
} else {
128 128
	$parent_section = '';
129 129
	$parent_titles = array_reverse(get_parent_titles($parent));
......
132 132
	}
133 133
	if($parent_section == '/') { $parent_section = ''; }
134 134
	$link = '/'.$parent_section.page_filename($menu_title);
135
	$filename = WB_PATH.PAGES_DIRECTORY.'/'.$parent_section.page_filename($menu_title).'.php';  
135
	$filename = WB_PATH.PAGES_DIRECTORY.'/'.$parent_section.page_filename($menu_title).PAGE_EXTENSION;  
136 136
}
137 137

  
138 138
// Check if a page with same page filename exists
......
168 168
	// First check if we need to create a new file
169 169
	if($old_link != $link) {
170 170
		// Delete old file
171
		$old_filename = WB_PATH.PAGES_DIRECTORY.$old_link.'.php';
171
		$old_filename = WB_PATH.PAGES_DIRECTORY.$old_link.PAGE_EXTENSION;
172 172
		if(file_exists($old_filename)) {
173 173
			unlink($old_filename);
174 174
		}
......
194 194
					// Update level and link
195 195
					$database->query("UPDATE ".TABLE_PREFIX."pages SET link = '$new_sub_link', level = '$new_sub_level' WHERE page_id = '".$sub['page_id']."' LIMIT 1");
196 196
					// Re-write the access file for this page
197
					$old_subpage_file = WB_PATH.PAGES_DIRECTORY.$new_sub_link.'.php';
197
					$old_subpage_file = WB_PATH.PAGES_DIRECTORY.$new_sub_link.PAGE_EXTENSION;
198 198
					if(file_exists($old_subpage_file)) {
199 199
						unlink($old_subpage_file);
200 200
					}
201
					create_access_file(WB_PATH.PAGES_DIRECTORY.$new_sub_link.'.php', $sub['page_id'], $new_sub_level);
201
					create_access_file(WB_PATH.PAGES_DIRECTORY.$new_sub_link.PAGE_EXTENSION, $sub['page_id'], $new_sub_level);
202 202
				}
203 203
			}
204 204
		}

Also available in: Unified diff