Revision 541
Added by Matthias almost 17 years ago
trunk/CHANGELOG | ||
---|---|---|
12 | 12 |
|
13 | 13 |
------------------------------------- 2.7.0 ------------------------------------- |
14 | 14 |
14-Jan-2008 Matthias Gallas |
15 |
# Replaced hardcoded text in login.php with language variables (fixes ticket 386) |
|
15 |
# Replaced hardcoded .php with the variable PAGE_EXTENSION for the use in pagenames. |
|
16 |
(!!Attention!! To get extenions other than .php working additional fixes are necessary!) |
|
16 | 17 |
# Replaced the variable PAGE_EXTENSION with hardcoded .php on all places where the |
17 | 18 |
pathes points to WB Corefiles with the page extension .php |
19 |
# Replaced hardcoded text in login.php with language variables (fixes ticket 386) |
|
18 | 20 |
14-Jan-2008 Christian Sommer |
19 | 21 |
! added a missing </tr> tag |
20 | 22 |
# re-introduced bugfix of Changeset 472 (fixes ticket 402) accidentally |
trunk/wb/admin/pages/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 |
} |
trunk/wb/admin/pages/add.php | ||
---|---|---|
68 | 68 |
// Work-out what the link and page filename should be |
69 | 69 |
if($parent == '0') { |
70 | 70 |
$link = '/'.page_filename($title); |
71 |
$filename = WB_PATH.PAGES_DIRECTORY.'/'.page_filename($title).'.php';
|
|
71 |
$filename = WB_PATH.PAGES_DIRECTORY.'/'.page_filename($title).PAGE_EXTENSION;
|
|
72 | 72 |
} else { |
73 | 73 |
$parent_section = ''; |
74 | 74 |
$parent_titles = array_reverse(get_parent_titles($parent)); |
... | ... | |
77 | 77 |
} |
78 | 78 |
if($parent_section == '/') { $parent_section = ''; } |
79 | 79 |
$link = '/'.$parent_section.page_filename($title); |
80 |
$filename = WB_PATH.PAGES_DIRECTORY.'/'.$parent_section.page_filename($title).'.php';
|
|
80 |
$filename = WB_PATH.PAGES_DIRECTORY.'/'.$parent_section.page_filename($title).PAGE_EXTENSION;
|
|
81 | 81 |
make_dir(WB_PATH.PAGES_DIRECTORY.'/'.$parent_section); |
82 | 82 |
} |
83 | 83 |
|
84 | 84 |
// Check if a page with same page filename exists |
85 | 85 |
$get_same_page = $database->query("SELECT page_id FROM ".TABLE_PREFIX."pages WHERE link = '$link'"); |
86 |
if($get_same_page->numRows() > 0 OR file_exists(WB_PATH.PAGES_DIRECTORY.$link.'.php') OR file_exists(WB_PATH.PAGES_DIRECTORY.$link.'/')) {
|
|
86 |
if($get_same_page->numRows() > 0 OR file_exists(WB_PATH.PAGES_DIRECTORY.$link.PAGE_EXTENSION) OR file_exists(WB_PATH.PAGES_DIRECTORY.$link.'/')) {
|
|
87 | 87 |
$admin->print_error($MESSAGE['PAGES']['PAGE_EXISTS']); |
88 | 88 |
} |
89 | 89 |
|
trunk/wb/framework/functions.php | ||
---|---|---|
1193 | 1193 |
|
1194 | 1194 |
// Unlink the page access file and directory |
1195 | 1195 |
$directory = WB_PATH.PAGES_DIRECTORY.$link; |
1196 |
$filename = $directory.'.php';
|
|
1196 |
$filename = $directory.PAGE_EXTENSION;
|
|
1197 | 1197 |
$directory .= '/'; |
1198 | 1198 |
if(file_exists($filename) && substr($filename,0,1<>'.')) { |
1199 | 1199 |
if(!is_writable(WB_PATH.PAGES_DIRECTORY.'/')) { |
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