From 88d47d2ce65e549ffccda213f4e53609cc75d882 Mon Sep 17 00:00:00 2001
From: Marius Cramer <m.cramer@pixcept.de>
Date: Thu, 23 Jan 2014 05:31:58 -0500
Subject: [PATCH] Resolved differences in sql incremental files between master and stable
---
interface/web/client/domain_edit.php | 23 +++++++++++++++++------
1 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/interface/web/client/domain_edit.php b/interface/web/client/domain_edit.php
index 13e35b8..07929f9 100644
--- a/interface/web/client/domain_edit.php
+++ b/interface/web/client/domain_edit.php
@@ -38,8 +38,8 @@
* End Form configuration
******************************************/
-require_once('../../lib/config.inc.php');
-require_once('../../lib/app.inc.php');
+require_once '../../lib/config.inc.php';
+require_once '../../lib/app.inc.php';
//* Check permissions for module
$app->auth->check_module_permissions('client');
@@ -50,7 +50,16 @@
//* load language file
$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'.lng';
-include($lng_file);
+include $lng_file;
+
+if(!$app->tform->checkClientLimit('limit_domainmodule')) {
+ $app->uses('ini_parser,getconf');
+ $settings = $app->getconf->get_global_config('domains');
+ if ($settings['use_domain_module'] == 'y') {
+ $app->error($settings['new_domain_html']);
+ }
+}
+
class page_action extends tform_actions {
@@ -69,7 +78,8 @@
if($_SESSION["s"]["user"]["typ"] == 'admin') {
// Getting Clients of the user
- $sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0 ORDER BY name";
+ //$sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0 ORDER BY name";
+ $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY sys_group.name";
$clients = $app->db->queryAllRecords($sql);
$client_select = '';
if($_SESSION["s"]["user"]["typ"] == 'admin') $client_select .= "<option value='0'></option>";
@@ -80,7 +90,7 @@
$client_select .= "<option value='$client[groupid]' $selected>$client[name]</option>\r\n";
}
}
- $app->tpl->setVar("client_group_id",$client_select);
+ $app->tpl->setVar("client_group_id", $client_select);
}
@@ -146,9 +156,10 @@
$app->db->query("UPDATE domain SET sys_groupid = $client_group_id, sys_perm_group = 'ru' WHERE domain_id = ".$this->id);
}
}
+
}
$page = new page_action;
$page->onLoad();
-?>
\ No newline at end of file
+?>
--
Gitblit v1.9.1