Revision 547
Added by Matthias almost 17 years ago
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).PAGE_EXTENSION;
|
|
71 |
$filename = WB_PATH.PAGES_DIRECTORY.'/'.page_filename($title).'.php';
|
|
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).PAGE_EXTENSION;
|
|
80 |
$filename = WB_PATH.PAGES_DIRECTORY.'/'.$parent_section.page_filename($title).'.php';
|
|
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.PAGE_EXTENSION) OR file_exists(WB_PATH.PAGES_DIRECTORY.$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.'/')) {
|
|
87 | 87 |
$admin->print_error($MESSAGE['PAGES']['PAGE_EXISTS']); |
88 | 88 |
} |
89 | 89 |
|
Also available in: Unified diff
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