Revision 1501
Added by DarkViper about 13 years ago
frontend.functions.php | ||
---|---|---|
1 | 1 |
<?php |
2 |
/** |
|
2 |
/**$extra_sql
|
|
3 | 3 |
* |
4 | 4 |
* @category framework |
5 | 5 |
* @package frontend.functions |
... | ... | |
29 | 29 |
$page_description = $wb->page_description; |
30 | 30 |
$page_keywords = $wb->page_keywords; |
31 | 31 |
$page_link = $wb->link; |
32 |
// ---------- // |
|
33 |
// extra_sql is not used anymore - this is basically a register_globals exploit prevention... |
|
34 |
$extra_sql = $wb->extra_sql; |
|
35 |
$extra_where_sql = $wb->extra_where_sql; |
|
36 |
// ---------- // |
|
32 |
|
|
37 | 33 |
$include_head_link_css = ''; |
38 | 34 |
$include_body_links = ''; |
39 | 35 |
$include_head_links = ''; |
... | ... | |
664 | 660 |
} |
665 | 661 |
return $content; |
666 | 662 |
} |
667 |
|
|
668 |
// Begin WB < 2.4.x template compatibility code |
|
669 |
// Make extra_sql accessable through private_sql |
|
670 |
$private_sql = $extra_sql; |
|
671 |
$private_where_sql = $extra_where_sql; |
|
672 |
// Query pages for menu |
|
673 |
$sql = 'SELECT `page_id`,`menu_title`,`page_title`,`link`,`target`,`visibility`'.$extra_sql.' '; |
|
674 |
$sql .= 'FROM `'.TABLE_PREFIX.'pages` '; |
|
675 |
$sql .= 'WHERE `parent`=0 AND '.$extra_where_sql.' '; |
|
676 |
$sql .= 'ORDER BY `position` ASC'; |
|
677 |
$menu1 = $database->query($sql); |
|
678 |
// Check if current pages is a parent page and if we need its submenu |
|
679 |
$tmp = (PARENT == 0 ? PAGE_ID : PARENT); |
|
680 |
$sql = 'SELECT `page_id`,`menu_title`,`page_title`,`link`,`target`,`visibility`'.$extra_sql.' '; |
|
681 |
$sql .= 'FROM `'.TABLE_PREFIX.'pages` '; |
|
682 |
$sql .= 'WHERE `parent`='.$tmp.' AND '.$extra_where_sql.' '; |
|
683 |
$sql .= 'ORDER BY `position` ASC'; |
|
684 |
$menu2 = $database->query($sql); |
Also available in: Unified diff
removed stoneaged code from 2.4