Revision 1187
Added by Dietmar almost 15 years ago
index.php | ||
---|---|---|
302 | 302 |
</tr> |
303 | 303 |
</table> |
304 | 304 |
<?php |
305 |
// Work-out if we should check for existing page_code |
|
306 |
$field_sql = $database->query("DESCRIBE ".TABLE_PREFIX."pages page_code"); |
|
307 |
$field_set = $field_sql->numRows(); |
|
308 |
|
|
305 | 309 |
$page_tmp_id = 0; |
306 | 310 |
$editable_pages = make_list(0, 0); |
307 | 311 |
?> |
... | ... | |
434 | 438 |
$template->parse('group_list2', 'group_list_block2', true); |
435 | 439 |
} |
436 | 440 |
|
441 |
|
|
437 | 442 |
// Parent page list |
438 | 443 |
$database = new database(); |
439 | 444 |
function parent_list($parent) { |
440 |
global $admin, $database, $template; |
|
445 |
global $admin, $database, $template, $field_set;
|
|
441 | 446 |
$query = "SELECT * FROM ".TABLE_PREFIX."pages WHERE parent = '$parent' AND visibility!='deleted' ORDER BY position ASC"; |
442 | 447 |
$get_pages = $database->query($query); |
443 | 448 |
while($page = $get_pages->fetchRow()) { |
... | ... | |
445 | 450 |
continue; |
446 | 451 |
// if parent = 0 set flag_icon |
447 | 452 |
$template->set_var('FLAG_ROOT_ICON',' none '); |
448 |
if( $page['parent'] == 0 ) { |
|
453 |
if( $page['parent'] == 0 && $field_set) {
|
|
449 | 454 |
$template->set_var('FLAG_ROOT_ICON','url('.THEME_URL.'/images/flags/'.strtolower($page['language']).'.png)'); |
450 | 455 |
} |
451 | 456 |
// Stop users from adding pages with a level of more than the set page level limit |
... | ... | |
470 | 475 |
for($i = 1; $i <= $page['level']; $i++) { $title_prefix .= ' - '; } |
471 | 476 |
$template->set_var(array( |
472 | 477 |
'ID' => $page['page_id'], |
473 |
'TITLE' => ($title_prefix.$page['page_title']) |
|
478 |
'TITLE' => ($title_prefix.$page['menu_title']), |
|
479 |
'MENU-TITLE' => ($title_prefix.$page['menu_title']), |
|
480 |
'PAGE-TITLE' => ($title_prefix.$page['page_title']) |
|
474 | 481 |
) |
475 | 482 |
); |
476 | 483 |
if($can_modify == true) { |
Also available in: Unified diff
change page_title to menu_title for parent dropdown list in index.php and sections.php