Project

General

Profile

« Previous | Next » 

Revision 547

Added by Matthias almost 17 years ago

Reintroduced changes from changeset [520] and [540] wich where overwritten by changeset [546]

Revoked changeset [541] end removed all PAGE_EXTENSION variables and the related option in WB settings as this function only works on Apache Servers together with .htaccess and mod_rewrite

Added keywords to file menu_link/uninstall.php

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).PAGE_EXTENSION; 
126
	$filename = WB_PATH.PAGES_DIRECTORY.'/'.page_filename($menu_title).'.php'; 
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).PAGE_EXTENSION;  
135
	$filename = WB_PATH.PAGES_DIRECTORY.'/'.$parent_section.page_filename($menu_title).'.php';  
136 136
}
137 137

  
138 138
// Check if a page with same page filename exists
......
174 174
	// First check if we need to create a new file
175 175
	if($old_link != $link) {
176 176
		// Delete old file
177
		$old_filename = WB_PATH.PAGES_DIRECTORY.$old_link.PAGE_EXTENSION;
177
		$old_filename = WB_PATH.PAGES_DIRECTORY.$old_link.'.php';
178 178
		if(file_exists($old_filename)) {
179 179
			unlink($old_filename);
180 180
		}
......
200 200
					// Update level and link
201 201
					$database->query("UPDATE ".TABLE_PREFIX."pages SET link = '$new_sub_link', level = '$new_sub_level' WHERE page_id = '".$sub['page_id']."' LIMIT 1");
202 202
					// Re-write the access file for this page
203
					$old_subpage_file = WB_PATH.PAGES_DIRECTORY.$new_sub_link.PAGE_EXTENSION;
203
					$old_subpage_file = WB_PATH.PAGES_DIRECTORY.$new_sub_link.'.php';
204 204
					if(file_exists($old_subpage_file)) {
205 205
						unlink($old_subpage_file);
206 206
					}
207
					create_access_file(WB_PATH.PAGES_DIRECTORY.$new_sub_link.PAGE_EXTENSION, $sub['page_id'], $new_sub_level);
207
					create_access_file(WB_PATH.PAGES_DIRECTORY.$new_sub_link.'.php', $sub['page_id'], $new_sub_level);
208 208
				}
209 209
			}
210 210
		}

Also available in: Unified diff