From b921eddb5a480291c20c21b94ad96a491d4ecfc2 Mon Sep 17 00:00:00 2001 From: Till Brehm <tbrehm@ispconfig.org> Date: Tue, 29 Jul 2014 14:39:21 -0400 Subject: [PATCH] Merge branch 'stable-3.0.5' of git.ispconfig.org:ispconfig/ispconfig3 into stable-3.0.5 --- interface/lib/classes/functions.inc.php | 23 ++++++++++++++++++++++- 1 files changed, 22 insertions(+), 1 deletions(-) diff --git a/interface/lib/classes/functions.inc.php b/interface/lib/classes/functions.inc.php index d2ac583..ddee8da 100644 --- a/interface/lib/classes/functions.inc.php +++ b/interface/lib/classes/functions.inc.php @@ -275,7 +275,8 @@ if(preg_match($regex, $result['ip'])) $ips[] = $result['ip']; } } - + + /* $results = $app->db->queryAllRecords("SELECT xfer FROM dns_slave WHERE xfer != ''"); if(!empty($results) && is_array($results)){ foreach($results as $result){ @@ -306,6 +307,8 @@ } } } + */ + $results = $app->db->queryAllRecords("SELECT remote_ips FROM web_database WHERE remote_ips != ''"); if(!empty($results) && is_array($results)){ foreach($results as $result){ @@ -421,6 +424,24 @@ return implode("\n", $domains); } + public function is_allowed_user($username, $restrict_names = false) { + global $app; + + if($username == 'root') return false; + if($restrict_names == true && preg_match('/^web\d+$/', $username) == false) return false; + + return true; + } + + public function is_allowed_group($groupname, $restrict_names = false) { + global $app; + + if($groupname == 'root') return false; + if($restrict_names == true && preg_match('/^client\d+$/', $groupname) == false) return false; + + return true; + } + } ?> -- Gitblit v1.9.1