Project

General

Profile

« Previous | Next » 

Revision 498

Added by ryan over 17 years ago

Added changeset [497] to 2.6.x branch

View differences:

settings2.php
115 115

  
116 116
// Work-out what the link should be
117 117
if($parent == '0') {
118
	$link = '/'.page_filename($page_title);
119
	$filename = WB_PATH.PAGES_DIRECTORY.'/'.page_filename($page_title).PAGE_EXTENSION; 
118
	$link = '/'.page_filename($menu_title);
119
	$filename = WB_PATH.PAGES_DIRECTORY.'/'.page_filename($menu_title).'.php'; 
120 120
} else {
121 121
	$parent_section = '';
122 122
	$parent_titles = array_reverse(get_parent_titles($parent));
......
124 124
		$parent_section .= page_filename($parent_title).'/';
125 125
	}
126 126
	if($parent_section == '/') { $parent_section = ''; }
127
	$link = '/'.$parent_section.page_filename($page_title);
128
	$filename = WB_PATH.PAGES_DIRECTORY.'/'.$parent_section.page_filename($page_title).PAGE_EXTENSION;  
127
	$link = '/'.$parent_section.page_filename($menu_title);
128
	$filename = WB_PATH.PAGES_DIRECTORY.'/'.$parent_section.page_filename($menu_title).'.php';  
129 129
}
130 130

  
131 131
// Check if a page with same page filename exists
......
167 167
	// First check if we need to create a new file
168 168
	if($old_link != $link) {
169 169
		// Delete old file
170
		unlink(WB_PATH.PAGES_DIRECTORY.$old_link.PAGE_EXTENSION);
170
		$old_filename = WB_PATH.PAGES_DIRECTORY.$old_link.'.php';
171
		if(file_exists($old_filename)) {
172
			unlink($old_filename);
173
		}
171 174
		// Create access file
172 175
		create_access_file($filename,$page_id,$level);
173 176
		// Move a directory for this page

Also available in: Unified diff