Project

General

Profile

« Previous | Next » 

Revision 1317

Added by Dietmar over 14 years ago

Ticket #977 Templates sorted in alphabetical order

View differences:

index.php
121 121

  
122 122
// Insert values into module list
123 123
$template->set_block('main_block', 'module_list_block', 'module_list');
124
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'module' AND function = 'page'");
124
$result = $database->query('SELECT * FROM `'.TABLE_PREFIX.'addons` WHERE `type` = "module" AND `function` = "page" ORDER BY `name`');
125 125
if($result->numRows() > 0) {
126 126
	while($addon = $result->fetchRow()) {
127 127
		$template->set_var('VALUE', $addon['directory']);
......
132 132

  
133 133
// Insert values into template list
134 134
$template->set_block('main_block', 'template_list_block', 'template_list');
135
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template'");
135
$result = $database->query('SELECT * FROM `'.TABLE_PREFIX.'addons` WHERE `type` = "template" ORDER BY `name`');
136 136
if($result->numRows() > 0) {
137 137
	while($addon = $result->fetchRow()) {
138 138
		$template->set_var('VALUE', $addon['directory']);

Also available in: Unified diff