From 9994de85fcf14a98dcc54cc7399b87e34d9b3c29 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 17 Mar 2009 09:23:07 -0400
Subject: [PATCH] Updated all language files.
---
interface/web/sites/database_edit.php | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/interface/web/sites/database_edit.php b/interface/web/sites/database_edit.php
index afe7013..28f62f6 100644
--- a/interface/web/sites/database_edit.php
+++ b/interface/web/sites/database_edit.php
@@ -173,6 +173,15 @@
$app->tpl->setVar("database_name_prefix", $dbname_prefix);
$app->tpl->setVar("database_user_prefix", $dbuser_prefix);
}
+
+ if($this->id > 0) {
+ //* we are editing a existing record
+ $app->tpl->setVar("edit_disabled", 1);
+ $app->tpl->setVar("server_id_value", $this->dataRecord["server_id"]);
+ $app->tpl->setVar("database_charset_value", $this->dataRecord["database_charset"]);
+ } else {
+ $app->tpl->setVar("edit_disabled", 0);
+ }
parent::onShowEnd();
}
@@ -237,6 +246,10 @@
if($old_record["database_charset"] != $this->dataRecord["database_charset"]) {
$app->tform->errorMessage .= $app->tform->wordbook["database_charset_change_txt"].'<br />';
}
+
+ //* Database username and database name shall not be empty
+ if($this->dataRecord['database_name'] == '') $app->tform->errorMessage .= $app->tform->wordbook["database_name_error_empty"].'<br />';
+ if($this->dataRecord['database_user'] == '') $app->tform->errorMessage .= $app->tform->wordbook["database_user_error_empty"].'<br />';
//* Check if the server has been changed
// We do this only for the admin or reseller users, as normal clients can not change the server ID anyway
@@ -261,6 +274,10 @@
function onBeforeInsert() {
global $app, $conf, $interfaceConf;
+
+ //* Database username and database name shall not be empty
+ if($this->dataRecord['database_name'] == '') $app->tform->errorMessage .= $app->tform->wordbook["database_name_error_empty"].'<br />';
+ if($this->dataRecord['database_user'] == '') $app->tform->errorMessage .= $app->tform->wordbook["database_user_error_empty"].'<br />';
//* Get the database name and database user prefix
$app->uses('getconf');
--
Gitblit v1.9.1