From c1fcaed2ee8f05a5030fe4e8e211ca4eae7a9489 Mon Sep 17 00:00:00 2001
From: ftimme <ft@falkotimme.com>
Date: Tue, 11 Jun 2013 11:44:57 -0400
Subject: [PATCH] - Fixed FS#2921 - RBL list field in server config can not be empty.
---
interface/web/sites/form/database.tform.php | 52 ++++++++++++++++++++++++++++++++--------------------
1 files changed, 32 insertions(+), 20 deletions(-)
diff --git a/interface/web/sites/form/database.tform.php b/interface/web/sites/form/database.tform.php
index 9bef109..e390f72 100644
--- a/interface/web/sites/form/database.tform.php
+++ b/interface/web/sites/form/database.tform.php
@@ -29,6 +29,11 @@
Hint:
The ID field of the database table is not part of the datafield definition.
The ID field must be always auto incement (int or bigint).
+
+ Search:
+ - searchable = 1 or searchable = 2 include the field in the search
+ - searchable = 1: this field will be the title of the search result
+ - searchable = 2: this field will be included in the description of the search result
*/
@@ -78,7 +83,7 @@
'keyfield'=> 'domain_id',
'valuefield'=> 'domain'
),
- 'value' => array('0' => $app->tform->lng('select_site_txt'))
+ 'value' => array('0' => 'select_site_txt')
),
'type' => array (
'datatype' => 'VARCHAR',
@@ -98,32 +103,38 @@
'default' => '',
'value' => '',
'width' => '30',
- 'maxlength' => '255'
+ 'maxlength' => '255',
+ 'searchable' => 1
),
- 'database_user' => array (
+ 'database_name_prefix' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
- 'errmsg'=> 'database_user_error_empty'),
- 1 => array ( 'type' => 'UNIQUE',
- 'errmsg'=> 'database_user_error_unique'),
- 2 => array ( 'type' => 'REGEX',
- 'regex' => '/^[a-zA-Z0-9_]{2,64}$/',
- 'errmsg'=> 'database_user_error_regex'),
- ),
'default' => '',
'value' => '',
'width' => '30',
- 'maxlength' => '255'
+ 'maxlength' => '25'
),
- 'database_password' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'PASSWORD',
- 'encryption' => 'MYSQL',
+ 'database_user_id' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'SELECT',
'default' => '',
- 'value' => '',
- 'width' => '30',
- 'maxlength' => '255'
+ 'datasource' => array ( 'type' => 'SQL',
+ 'querystring' => "SELECT database_user_id,database_user FROM web_database_user WHERE {AUTHSQL} ORDER BY database_user",
+ 'keyfield'=> 'database_user_id',
+ 'valuefield'=> 'database_user'
+ ),
+ 'value' => array('0' => 'select_dbuser_txt')
+ ),
+ 'database_ro_user_id' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'SELECT',
+ 'default' => '',
+ 'datasource' => array ( 'type' => 'SQL',
+ 'querystring' => "SELECT database_user_id,database_user FROM web_database_user WHERE {AUTHSQL} ORDER BY database_user",
+ 'keyfield'=> 'database_user_id',
+ 'valuefield'=> 'database_user'
+ ),
+ 'value' => array('0' => 'no_dbuser_txt')
),
'database_charset' => array (
'datatype' => 'VARCHAR',
@@ -153,7 +164,8 @@
),
'default' => '',
'value' => '',
- 'width' => '60'
+ 'width' => '60',
+ 'searchable' => 2
),
##################################
# ENDE Datatable fields
--
Gitblit v1.9.1