Revision 663
Added by thorn almost 17 years ago
class.frontend.php | ||
---|---|---|
84 | 84 |
} |
85 | 85 |
// Get default page |
86 | 86 |
// Check for a page id |
87 |
$query_default = "SELECT page_id,link FROM ".TABLE_PREFIX."pages WHERE parent = '0' AND visibility = 'public'$this->sql_where_language ORDER BY position ASC LIMIT 1"; |
|
87 |
$table_p = TABLE_PREFIX.'pages'; |
|
88 |
$table_s = TABLE_PREFIX.'sections'; |
|
89 |
$now = time(); |
|
90 |
$query_default = " |
|
91 |
SELECT p.page_id, p.link |
|
92 |
FROM $table_p AS p, $table_s AS s |
|
93 |
WHERE p.page_id=s.page_id |
|
94 |
AND p.parent = '0' AND p.visibility = 'public' |
|
95 |
AND (($now>=s.publ_start OR s.publ_start=0) AND ($now<=s.publ_end OR s.publ_end=0)) |
|
96 |
$this->sql_where_language |
|
97 |
ORDER BY p.position ASC LIMIT 1"; |
|
88 | 98 |
$get_default = $database->query($query_default); |
89 | 99 |
$default_num_rows = $get_default->numRows(); |
90 | 100 |
if(!isset($page_id) OR !is_numeric($page_id)){ |
Also available in: Unified diff
out-of-date default page isn't shown anymore, instead shows next public page