Revision 26
Added by stefan about 19 years ago
link.php | ||
---|---|---|
1 | 1 |
<?php |
2 | 2 |
|
3 |
// $Id: link.php,v 1.4 2005/06/22 05:31:28 rdjurovich Exp $
|
|
3 |
// $Id$ |
|
4 | 4 |
|
5 | 5 |
/* |
6 | 6 |
|
... | ... | |
73 | 73 |
// Function to generate page list |
74 | 74 |
function gen_page_list($parent) { |
75 | 75 |
global $template, $database; |
76 |
$get_pages = $database->query("SELECT page_id,menu_title,link,level FROM ".TABLE_PREFIX."pages WHERE parent = '$parent' AND visibility!='deleted'"); |
|
76 |
$get_pages = $database->query("SELECT page_id,menu_title,link,level FROM ".TABLE_PREFIX."pages WHERE parent = '$parent' AND visibility!='deleted' ORDER BY position ASC");
|
|
77 | 77 |
while($page = $get_pages->fetchRow()) { |
78 | 78 |
$title = stripslashes($page['menu_title']); |
79 | 79 |
// Add leading -'s so we can tell what level a page is at |
... | ... | |
91 | 91 |
// Get pages and put them into the pages list |
92 | 92 |
$template->set_block('main_block', 'page_list_block', 'page_list'); |
93 | 93 |
$database = new database(); |
94 |
$get_pages = $database->query("SELECT page_id,menu_title,link FROM ".TABLE_PREFIX."pages WHERE parent = '0' AND visibility!='deleted'"); |
|
94 |
$get_pages = $database->query("SELECT page_id,menu_title,link FROM ".TABLE_PREFIX."pages WHERE parent = '0' AND visibility!='deleted' ORDER BY position ASC");
|
|
95 | 95 |
if($get_pages > 0) { |
96 | 96 |
// Add 'Please select...' |
97 | 97 |
$template->set_var('TITLE', 'Please select...'); |
Also available in: Unified diff
Pages in link list in htmlarea popup are now correctly ordered.