Index: trunk/wb/admin/templates/uninstall.php
===================================================================
--- trunk/wb/admin/templates/uninstall.php	(revision 892)
+++ trunk/wb/admin/templates/uninstall.php	(revision 893)
@@ -23,6 +23,13 @@
 
 */
 
+$debug = true;
+
+if (true === $debug) {
+	ini_set('display_errors', 1);
+	error_reporting(E_ALL);
+}
+
 // Check if user selected template
 if(!isset($_POST['file']) OR $_POST['file'] == "") {
 	header("Location: index.php");
@@ -60,10 +67,13 @@
 /**
 *	Check if the template is the standard-template or still in use
 */
-$MESSAGE['GENERIC']['CANNOT_UNINSTALL_IS_DEFAULT_TEMPLATE'] = "Can't unistall this template <b>".$file."</b> because it's the standardtemplate!";
+if (!array_key_exists('CANNOT_UNINSTALL_IS_DEFAULT_TEMPLATE', $MESSAGE['GENERIC'] ) )
+	$MESSAGE['GENERIC']['CANNOT_UNINSTALL_IS_DEFAULT_TEMPLATE'] = "Can't uninstall this template <b>{{name}}</b> because it's the standardtemplate!";
 
 if ($file == DEFAULT_TEMPLATE) {
-	$admin->print_error($MESSAGE['GENERIC']['CANNOT_UNINSTALL_IS_DEFAULT_TEMPLATE']); /** Text is missing! 2008-06-15 */
+	$temp = array ('name' => $file );
+	$msg = replace_all( $MESSAGE['GENERIC']['CANNOT_UNINSTALL_IS_DEFAULT_TEMPLATE'], $temp );
+	$admin->print_error( $msg );
 
 } else {
 	
@@ -84,12 +94,11 @@
 		/**
 		*	Template is still in use, so we're collecting the page-titles
 		*
-		*	@version	0.2.1
-		*	@build		6
+		*	@version	0.2.0
+		*	@build		5
 		*	@since		0.1.1
-		*	@lastchange 2008-11-12
+		*	@lastchange 2008-10-23
 		*
-		*	0.2.1		Remove unused constants
 		*	0.2.0		Codechanges for Websitebaker to use it without the Black-Hawk-Engine
 		*
 		*	0.1.1		add this page <if we found only one> / these pages
@@ -113,16 +122,21 @@
 		*	0.1.2	this page/ these pages
 		*
 		*/
-		$add = $info->numRows() == 1 ? "this page" : "these pages";
-		$msg_template_str  = "<br /><br />Template <b>{{template_name}}</b> could not be uninstalled because it is still in use by ";
-		$msg_template_str .= $add.":<br /><i>click for editing.</i><br /><br />";
-		
+		if (!array_key_exists("CANNOT_UNINSTALL_IN_USE_TMPL", $MESSAGE['GENERIC'])) {
+			$add = $info->numRows() == 1 ? "this page" : "these pages";
+			$msg_template_str  = "<br /><br />{{type}} <b>{{type_name}}</b> could not be uninstalled because it is still in use by {{pages}}";
+			$msg_template_str .= ":<br /><i>click for editing.</i><br /><br />";
+		} else {
+			$msg_template_str = $MESSAGE['GENERIC']['CANNOT_UNINSTALL_IN_USE_TMPL'];
+			$temp = explode(";",$MESSAGE['GENERIC']['CANNOT_UNINSTALL_IN_USE_TMPL_PAGES']);
+			$add = $info->numRows() == 1 ? $temp[0] : $temp[1];
+		}
 		/**
 		*	The template-string for displaying the Page-Titles ... in this case as a link
 		*/
 		$page_template_str = "- <b><a href='../pages/settings.php?page_id={{id}}'>{{title}}</a></b><br />";
 		
-		$values = array ('template_name' => $file);
+		$values = array ('type' => 'Template', 'type_name' => $file, 'pages' => $add);
 		$msg = replace_all ( $msg_template_str,  $values );
 		
 		$page_names = "";
Index: trunk/wb/admin/modules/uninstall.php
===================================================================
--- trunk/wb/admin/modules/uninstall.php	(revision 892)
+++ trunk/wb/admin/modules/uninstall.php	(revision 893)
@@ -53,12 +53,12 @@
 /**
 *	Check if the module is in use
 *
-*	@version	0.1.1
-*	@build		2
-*	@date		2008-11-12
+*	@version	0.2.0
+*	@build		1
+*	@date		2008-12-29
 *	@author		aldus
-*	@package	Websitebaker - Admin - modules
-*	@state		@dev
+*	@package	Website Baker: Admin - modules
+*	@state		@beta
 *
 */
 
@@ -76,17 +76,21 @@
 	/**
 	*	Modul is in use, so we have to warn the user
 	*/
-	
-	$add = $info->numRows() == 1 ? "this page" : "these pages";
-	$msg_template_str  = "<br /><br />Modul <b>{{modul_name}}</b> could not be uninstalled because it is still in use on ";
-	$msg_template_str .= $add.":<br /><i>click for editing.</i><br /><br />";
-
+	if (!array_key_exists("CANNOT_UNINSTALL_IN_USE_TMPL", $MESSAGE['GENERIC'])) {
+		$add = $info->numRows() == 1 ? "this page" : "these pages";
+		$msg_template_str  = "<br /><br />{{type}} <b>{{type_name}}</b> could not be uninstalled because it is still in use on {{pages}}";
+		$msg_template_str .= ":<br /><i>click for editing.</i><br /><br />";
+	} else {
+		$msg_template_str = $MESSAGE['GENERIC']['CANNOT_UNINSTALL_IN_USE_TMPL'];
+		$temp = explode(";",$MESSAGE['GENERIC']['CANNOT_UNINSTALL_IN_USE_TMPL_PAGES']);
+		$add = $info->numRows() == 1 ? $temp[0] : $temp[1];
+	}
 	/**
 	*	The template-string for displaying the Page-Titles ... in this case as a link
 	*/
 	$page_template_str = "- <b><a href='../pages/sections.php?page_id={{id}}'>{{title}}</a></b><br />";
 	
-	$values = array ('modul_name' => $file);
+	$values = array ('type' => 'Modul', 'type_name' => $file, 'pages' => $add );
 	$msg = replace_all ( $msg_template_str,  $values );
 		
 	$page_names = "";
@@ -94,7 +98,7 @@
 	while ($data = $info->fetchRow() ) {
 	
 		$temp = $database->query("SELECT page_title from ".TABLE_PREFIX."pages where page_id=".$data['page_id']);
-		$temp_title = $temp->fetchRow();
+		$temp_title = $temp->fetchRow( DB_FETCHMODE_ASSOC );
 		
 		$page_info = array(
 			'id'	=> $data['page_id'], 
Index: trunk/wb/languages/DE.php
===================================================================
--- trunk/wb/languages/DE.php	(revision 892)
+++ trunk/wb/languages/DE.php	(revision 893)
@@ -548,6 +548,11 @@
 $MESSAGE['GENERIC']['BAD_PERMISSIONS'] = 'Kann im Zielverzeichnis nicht schreiben';
 $MESSAGE['GENERIC']['INVALID'] = 'Die &uuml;bertragene Datei ist ung&uuml;ltig';
 $MESSAGE['GENERIC']['CANNOT_UNINSTALL_IN_USE'] = 'Deinstallation nicht m&ouml;glich: Datei wird benutzt';
+
+$MESSAGE['GENERIC']['CANNOT_UNINSTALL_IN_USE_TMPL'] = "<br /><br />Das {{type}} <b>{{type_name}}</b> kann nicht deinstalliert werden, weil es auf {{pages}} benutzt wird:<br /><br />";
+$MESSAGE['GENERIC']['CANNOT_UNINSTALL_IN_USE_TMPL_PAGES'] = "folgender Seite;folgenden Seiten";
+$MESSAGE['GENERIC']['CANNOT_UNINSTALL_IS_DEFAULT_TEMPLATE'] = "Das Template <b>{{name}}</b> kann nicht deinstalliert werden, weil es das Standardtemplate ist!";
+
 $MESSAGE['GENERIC']['WEBSITE_UNDER_CONSTRUCTION'] = 'Momentan in Bearbeitung';
 $MESSAGE['GENERIC']['PLEASE_CHECK_BACK_SOON'] = 'Bitte versuchen Sie es sp&auml;ter noch einmal ...';
 $MESSAGE['GENERIC']['PLEASE_BE_PATIENT'] = 'Die Datenbanksicherung kann je nach Gr&ouml;&szlig;e der Datenbank einige Zeit dauern.';
