From 336a577f2809c9760e7a1a15f10f523b2cf20c8d Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 01 Nov 2005 17:59:29 -0500
Subject: [PATCH] Added Server table
---
interface/lib/classes/tform_tpl_generator.inc.php | 48 +++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 47 insertions(+), 1 deletions(-)
diff --git a/interface/lib/classes/tform_tpl_generator.inc.php b/interface/lib/classes/tform_tpl_generator.inc.php
index a9d35ee..1a78288 100644
--- a/interface/lib/classes/tform_tpl_generator.inc.php
+++ b/interface/lib/classes/tform_tpl_generator.inc.php
@@ -153,7 +153,7 @@
// ansonsten wird sie angelegt
$tables = $app->db->getTables();
- if(!in_array($formDef['db_table'],$tables)) {
+ if(!@in_array($formDef['db_table'],$tables)) {
// Datenbank noch nicht vorhanden
$columns = array();
@@ -172,6 +172,52 @@
$columns[] = $col;
$app->db->show_error_messages = true;
+ if($formDef["auth"] == 'yes') {
+
+ $col = array( 'action' => 'add',
+ 'name' => 'sys_userid',
+ 'type' => 'int32',
+ 'typeValue' => '',
+ 'defaultValue' => '',
+ 'notNull' => true
+ );
+ $columns[] = $col;
+ $col = array( 'action' => 'add',
+ 'name' => 'sys_groupid',
+ 'type' => 'int32',
+ 'typeValue' => '',
+ 'defaultValue' => '',
+ 'notNull' => true
+ );
+ $columns[] = $col;
+ $col = array( 'action' => 'add',
+ 'name' => 'sys_perm_user',
+ 'type' => 'varchar',
+ 'typeValue' => '5',
+ 'defaultValue' => '',
+ 'notNull' => true
+ );
+ $columns[] = $col;
+ $col = array( 'action' => 'add',
+ 'name' => 'sys_perm_group',
+ 'type' => 'varchar',
+ 'typeValue' => '5',
+ 'defaultValue' => '',
+ 'notNull' => true
+ );
+ $columns[] = $col;
+ $col = array( 'action' => 'add',
+ 'name' => 'sys_perm_other',
+ 'type' => 'varchar',
+ 'typeValue' => '5',
+ 'defaultValue' => '',
+ 'notNull' => true
+ );
+ $columns[] = $col;
+
+ }
+
+
foreach($formDef['tabs'] as $tab) {
foreach($tab["fields"] as $name => $field) {
/*
--
Gitblit v1.9.1