Project

General

Profile

« Previous | Next » 

Revision 384

Added by Matthias almost 18 years ago

Added List sorting in admin area (thanks to rsmith)

View differences:

trunk/wb/admin/media/rename2.php
80 80
	}
81 81
	$temp_id = 0;
82 82
	if(isset($DIR)) {
83
		sort($DIR);
83 84
		foreach($DIR AS $name) {
84 85
			$temp_id++;
85 86
			if($file_id == $temp_id) {
......
89 90
		}
90 91
	}
91 92
	if(isset($FILE)) {
93
		sort($FILE);
92 94
		foreach($FILE AS $name) {
93 95
			$temp_id++;
94 96
			if($file_id == $temp_id) {
trunk/wb/admin/media/browse.php
99 99
	$temp_id = 0;
100 100
	$row_bg_color = 'EEEEEE';
101 101
	if(isset($DIR)) {
102
		sort($DIR);
102 103
		foreach($DIR AS $name) {
103 104
			$link_name = str_replace(' ', '%20', $name);
104 105
			$temp_id++;
......
122 123
		}
123 124
	}
124 125
	if(isset($FILE)) {
126
		sort($FILE);
125 127
		foreach($FILE AS $name) {
126 128
			$temp_id++;
127 129
			$template->set_var(array(
trunk/wb/admin/media/delete.php
72 72
	}
73 73
	$temp_id = 0;
74 74
	if(isset($DIR)) {
75
		sort($DIR);
75 76
		foreach($DIR AS $name) {
76 77
			$temp_id++;
77 78
			if(!isset($delete_file) AND $file_id == $temp_id) {
......
81 82
		}
82 83
	}
83 84
	if(isset($FILE)) {
85
		sort($FILE);
84 86
		foreach($FILE AS $name) {
85 87
			$temp_id++;
86 88
			if(!isset($delete_file) AND $file_id == $temp_id) {
trunk/wb/admin/media/rename.php
71 71
	}
72 72
	$temp_id = 0;
73 73
	if(isset($DIR)) {
74
		sort($DIR);
74 75
		foreach($DIR AS $name) {
75 76
			$temp_id++;
76 77
			if($file_id == $temp_id) {
......
80 81
		}
81 82
	}
82 83
	if(isset($FILE)) {
84
		sort($FILE);
83 85
		foreach($FILE AS $name) {
84 86
			$temp_id++;
85 87
			if($file_id == $temp_id) {
trunk/wb/admin/templates/index.php
33 33

  
34 34
// Insert values into template list
35 35
$template->set_block('main_block', 'template_list_block', 'template_list');
36
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template'");
36
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template' order by name");
37 37
if($result->numRows() > 0) {
38 38
	while($addon = $result->fetchRow()) {
39 39
		$template->set_var('VALUE', $addon['directory']);
trunk/wb/admin/pages/settings.php
286 286
}
287 287
// Templates list
288 288
$template->set_block('main_block', 'template_list_block', 'template_list');
289
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template'");
289
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template' order by name");
290 290
if($result->numRows() > 0) {
291 291
	while($addon = $result->fetchRow()) { 
292 292
		// Check if the user has perms to use this template
trunk/wb/admin/pages/index.php
480 480
$module_permissions = $_SESSION['MODULE_PERMISSIONS'];
481 481
// Modules list
482 482
$template->set_block('main_block', 'module_list_block', 'module_list');
483
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'module' AND function = 'page'");
483
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'module' AND function = 'page' order by name");
484 484
if($result->numRows() > 0) {
485 485
	while ($module = $result->fetchRow()) {
486 486
		// Check if user is allowed to use this module
trunk/wb/admin/pages/sections.php
233 233
			<select name="module" style="width: 100%;">
234 234
			<?php
235 235
			// Insert module list
236
			$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'module' AND function = 'page' AND directory != 'menu_link'");
236
			$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'module' AND function = 'page' AND directory != 'menu_link' order by name");
237 237
			if($result->numRows() > 0) {
238 238
				while($module = $result->fetchRow()) {
239 239
					// Check if user is allowed to use this module
trunk/wb/admin/settings/index.php
139 139

  
140 140
// Insert language values
141 141
$template->set_block('main_block', 'language_list_block', 'language_list');
142
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'language'");
142
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'language' order by directory");
143 143
if($result->numRows() > 0) {
144 144
	while ($addon = $result->fetchRow()) {
145 145
		// Insert code and name
......
228 228

  
229 229
// Insert templates
230 230
$template->set_block('main_block', 'template_list_block', 'template_list');
231
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template'");
231
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template' order by name");
232 232
if($result->numRows() > 0) {
233 233
	while($addon = $result->fetchRow()) {
234 234
		$template->set_var('FILE', $addon['directory']);
......
264 264
if($search_template == '') { $selected = ' selected'; } else { $selected = ''; }
265 265
$template->set_var(array('FILE' => '', 'NAME' => $TEXT['SYSTEM_DEFAULT'], 'SELECTED' => $selected));
266 266
$template->parse('search_template_list', 'search_template_list_block', true);
267
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template'");
267
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template' order by name");
268 268
if($result->numRows() > 0) {
269 269
	while($addon = $result->fetchRow()) {
270 270
		$template->set_var('FILE', $addon['directory']);
trunk/wb/admin/languages/index.php
35 35

  
36 36
// Insert values into language list
37 37
$template->set_block('main_block', 'language_list_block', 'language_list');
38
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'language'");
38
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'language' order by name");
39 39
if($result->numRows() > 0) {
40 40
	while($addon = $result->fetchRow()) {
41 41
		$template->set_var('VALUE', $addon['directory']);
trunk/wb/admin/modules/index.php
35 35

  
36 36
// Insert values into module list
37 37
$template->set_block('main_block', 'module_list_block', 'module_list');
38
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'module'");
38
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'module' order by name");
39 39
if($result->numRows() > 0) {
40 40
	while ($addon = $result->fetchRow()) {
41 41
		$template->set_var('VALUE', $addon['directory']);

Also available in: Unified diff