Revision 854
Added by thorn over 16 years ago
class.frontend.php | ||
---|---|---|
88 | 88 |
$table_s = TABLE_PREFIX.'sections'; |
89 | 89 |
$now = time(); |
90 | 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)) |
|
91 |
SELECT `p`.`page_id`, `link` |
|
92 |
FROM `$table_p` AS `p` INNER JOIN `$table_s` USING(`page_id`) |
|
93 |
WHERE `parent` = '0' AND `visibility` = 'public' |
|
94 |
AND (($now>=`publ_start` OR `publ_start`=0) AND ($now<=`publ_end` OR `publ_end`=0)) |
|
96 | 95 |
$this->sql_where_language |
97 |
ORDER BY p.position ASC LIMIT 1";
|
|
96 |
ORDER BY `p`.`position` ASC LIMIT 1";
|
|
98 | 97 |
$get_default = $database->query($query_default); |
99 | 98 |
$default_num_rows = $get_default->numRows(); |
100 | 99 |
if(!isset($page_id) OR !is_numeric($page_id)){ |
Also available in: Unified diff
fixed an issues related to search, changed one SQL inner join (to use USING instead of WHERE, added $database = new Database(); in front of output-filter