Revision 555
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).'.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 |
|
Also available in: Unified diff
Revoked parts of changeset [547] and again introduced changeset [540]