Revision 541
Added by Matthias almost 18 years ago
| settings2.php | ||
|---|---|---|
| 116 | 116 |
// Work-out what the link should be |
| 117 | 117 |
if($parent == '0') {
|
| 118 | 118 |
$link = '/'.page_filename($menu_title); |
| 119 |
$filename = WB_PATH.PAGES_DIRECTORY.'/'.page_filename($menu_title).'.php';
|
|
| 119 |
$filename = WB_PATH.PAGES_DIRECTORY.'/'.page_filename($menu_title).PAGE_EXTENSION;
|
|
| 120 | 120 |
} else {
|
| 121 | 121 |
$parent_section = ''; |
| 122 | 122 |
$parent_titles = array_reverse(get_parent_titles($parent)); |
| ... | ... | |
| 125 | 125 |
} |
| 126 | 126 |
if($parent_section == '/') { $parent_section = ''; }
|
| 127 | 127 |
$link = '/'.$parent_section.page_filename($menu_title); |
| 128 |
$filename = WB_PATH.PAGES_DIRECTORY.'/'.$parent_section.page_filename($menu_title).'.php';
|
|
| 128 |
$filename = WB_PATH.PAGES_DIRECTORY.'/'.$parent_section.page_filename($menu_title).PAGE_EXTENSION;
|
|
| 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 |
$old_filename = WB_PATH.PAGES_DIRECTORY.$old_link.'.php';
|
|
| 170 |
$old_filename = WB_PATH.PAGES_DIRECTORY.$old_link.PAGE_EXTENSION;
|
|
| 171 | 171 |
if(file_exists($old_filename)) {
|
| 172 | 172 |
unlink($old_filename); |
| 173 | 173 |
} |
| ... | ... | |
| 193 | 193 |
// Update level and link |
| 194 | 194 |
$database->query("UPDATE ".TABLE_PREFIX."pages SET link = '$new_sub_link', level = '$new_sub_level' WHERE page_id = '".$sub['page_id']."' LIMIT 1");
|
| 195 | 195 |
// Re-write the access file for this page |
| 196 |
$old_subpage_file = WB_PATH.PAGES_DIRECTORY.$new_sub_link.'.php';
|
|
| 196 |
$old_subpage_file = WB_PATH.PAGES_DIRECTORY.$new_sub_link.PAGE_EXTENSION;
|
|
| 197 | 197 |
if(file_exists($old_subpage_file)) {
|
| 198 | 198 |
unlink($old_subpage_file); |
| 199 | 199 |
} |
| 200 |
create_access_file(WB_PATH.PAGES_DIRECTORY.$new_sub_link.'.php', $sub['page_id'], $new_sub_level);
|
|
| 200 |
create_access_file(WB_PATH.PAGES_DIRECTORY.$new_sub_link.PAGE_EXTENSION, $sub['page_id'], $new_sub_level);
|
|
| 201 | 201 |
} |
| 202 | 202 |
} |
| 203 | 203 |
} |
Also available in: Unified diff
Replaced hardcoded .php with the variable PAGE_EXTENSION for the use in pagenames. (!!Attention!! To get extenions other than .php working additional fixes are necessary!) Fixes ticket #370