Index: trunk/wb/admin/media/rename2.php
===================================================================
--- trunk/wb/admin/media/rename2.php	(revision 383)
+++ trunk/wb/admin/media/rename2.php	(revision 384)
@@ -80,6 +80,7 @@
 	}
 	$temp_id = 0;
 	if(isset($DIR)) {
+		sort($DIR);
 		foreach($DIR AS $name) {
 			$temp_id++;
 			if($file_id == $temp_id) {
@@ -89,6 +90,7 @@
 		}
 	}
 	if(isset($FILE)) {
+		sort($FILE);
 		foreach($FILE AS $name) {
 			$temp_id++;
 			if($file_id == $temp_id) {
Index: trunk/wb/admin/media/browse.php
===================================================================
--- trunk/wb/admin/media/browse.php	(revision 383)
+++ trunk/wb/admin/media/browse.php	(revision 384)
@@ -99,6 +99,7 @@
 	$temp_id = 0;
 	$row_bg_color = 'EEEEEE';
 	if(isset($DIR)) {
+		sort($DIR);
 		foreach($DIR AS $name) {
 			$link_name = str_replace(' ', '%20', $name);
 			$temp_id++;
@@ -122,6 +123,7 @@
 		}
 	}
 	if(isset($FILE)) {
+		sort($FILE);
 		foreach($FILE AS $name) {
 			$temp_id++;
 			$template->set_var(array(
Index: trunk/wb/admin/media/delete.php
===================================================================
--- trunk/wb/admin/media/delete.php	(revision 383)
+++ trunk/wb/admin/media/delete.php	(revision 384)
@@ -72,6 +72,7 @@
 	}
 	$temp_id = 0;
 	if(isset($DIR)) {
+		sort($DIR);
 		foreach($DIR AS $name) {
 			$temp_id++;
 			if(!isset($delete_file) AND $file_id == $temp_id) {
@@ -81,6 +82,7 @@
 		}
 	}
 	if(isset($FILE)) {
+		sort($FILE);
 		foreach($FILE AS $name) {
 			$temp_id++;
 			if(!isset($delete_file) AND $file_id == $temp_id) {
Index: trunk/wb/admin/media/rename.php
===================================================================
--- trunk/wb/admin/media/rename.php	(revision 383)
+++ trunk/wb/admin/media/rename.php	(revision 384)
@@ -71,6 +71,7 @@
 	}
 	$temp_id = 0;
 	if(isset($DIR)) {
+		sort($DIR);
 		foreach($DIR AS $name) {
 			$temp_id++;
 			if($file_id == $temp_id) {
@@ -80,6 +81,7 @@
 		}
 	}
 	if(isset($FILE)) {
+		sort($FILE);
 		foreach($FILE AS $name) {
 			$temp_id++;
 			if($file_id == $temp_id) {
Index: trunk/wb/admin/templates/index.php
===================================================================
--- trunk/wb/admin/templates/index.php	(revision 383)
+++ trunk/wb/admin/templates/index.php	(revision 384)
@@ -33,7 +33,7 @@
 
 // Insert values into template list
 $template->set_block('main_block', 'template_list_block', 'template_list');
-$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template'");
+$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template' order by name");
 if($result->numRows() > 0) {
 	while($addon = $result->fetchRow()) {
 		$template->set_var('VALUE', $addon['directory']);
Index: trunk/wb/admin/pages/settings.php
===================================================================
--- trunk/wb/admin/pages/settings.php	(revision 383)
+++ trunk/wb/admin/pages/settings.php	(revision 384)
@@ -286,7 +286,7 @@
 }
 // Templates list
 $template->set_block('main_block', 'template_list_block', 'template_list');
-$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template'");
+$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template' order by name");
 if($result->numRows() > 0) {
 	while($addon = $result->fetchRow()) { 
 		// Check if the user has perms to use this template
Index: trunk/wb/admin/pages/index.php
===================================================================
--- trunk/wb/admin/pages/index.php	(revision 383)
+++ trunk/wb/admin/pages/index.php	(revision 384)
@@ -480,7 +480,7 @@
 $module_permissions = $_SESSION['MODULE_PERMISSIONS'];
 // Modules list
 $template->set_block('main_block', 'module_list_block', 'module_list');
-$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'module' AND function = 'page'");
+$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'module' AND function = 'page' order by name");
 if($result->numRows() > 0) {
 	while ($module = $result->fetchRow()) {
 		// Check if user is allowed to use this module
Index: trunk/wb/admin/pages/sections.php
===================================================================
--- trunk/wb/admin/pages/sections.php	(revision 383)
+++ trunk/wb/admin/pages/sections.php	(revision 384)
@@ -233,7 +233,7 @@
 			<select name="module" style="width: 100%;">
 			<?php
 			// Insert module list
-			$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'module' AND function = 'page' AND directory != 'menu_link'");
+			$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'module' AND function = 'page' AND directory != 'menu_link' order by name");
 			if($result->numRows() > 0) {
 				while($module = $result->fetchRow()) {
 					// Check if user is allowed to use this module
Index: trunk/wb/admin/settings/index.php
===================================================================
--- trunk/wb/admin/settings/index.php	(revision 383)
+++ trunk/wb/admin/settings/index.php	(revision 384)
@@ -139,7 +139,7 @@
 
 // Insert language values
 $template->set_block('main_block', 'language_list_block', 'language_list');
-$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'language'");
+$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'language' order by directory");
 if($result->numRows() > 0) {
 	while ($addon = $result->fetchRow()) {
 		// Insert code and name
@@ -228,7 +228,7 @@
 
 // Insert templates
 $template->set_block('main_block', 'template_list_block', 'template_list');
-$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template'");
+$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template' order by name");
 if($result->numRows() > 0) {
 	while($addon = $result->fetchRow()) {
 		$template->set_var('FILE', $addon['directory']);
@@ -264,7 +264,7 @@
 if($search_template == '') { $selected = ' selected'; } else { $selected = ''; }
 $template->set_var(array('FILE' => '', 'NAME' => $TEXT['SYSTEM_DEFAULT'], 'SELECTED' => $selected));
 $template->parse('search_template_list', 'search_template_list_block', true);
-$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template'");
+$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template' order by name");
 if($result->numRows() > 0) {
 	while($addon = $result->fetchRow()) {
 		$template->set_var('FILE', $addon['directory']);
Index: trunk/wb/admin/languages/index.php
===================================================================
--- trunk/wb/admin/languages/index.php	(revision 383)
+++ trunk/wb/admin/languages/index.php	(revision 384)
@@ -35,7 +35,7 @@
 
 // Insert values into language list
 $template->set_block('main_block', 'language_list_block', 'language_list');
-$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'language'");
+$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'language' order by name");
 if($result->numRows() > 0) {
 	while($addon = $result->fetchRow()) {
 		$template->set_var('VALUE', $addon['directory']);
Index: trunk/wb/admin/modules/index.php
===================================================================
--- trunk/wb/admin/modules/index.php	(revision 383)
+++ trunk/wb/admin/modules/index.php	(revision 384)
@@ -35,7 +35,7 @@
 
 // Insert values into module list
 $template->set_block('main_block', 'module_list_block', 'module_list');
-$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'module'");
+$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'module' order by name");
 if($result->numRows() > 0) {
 	while ($addon = $result->fetchRow()) {
 		$template->set_var('VALUE', $addon['directory']);
