From bc4ebdebe651711db105f40e2ac7b46bdd7136f9 Mon Sep 17 00:00:00 2001 From: cajus Date: Thu, 17 Jan 2008 14:14:57 +0000 Subject: [PATCH] Sorted for plugins git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8463 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../connectivity/class_pgsql_opengw.inc | 160 ------------------ .../class_oxchangeAccount.inc | 0 .../{ => openxchange}/oxchange.tpl | 0 .../{ => phpgw}/class_phpgwAccount.inc | 0 .../connectivity/{ => phpgw}/phpgw.tpl | 0 .../class_phpscheduleitAccount.inc | 0 .../{ => phpscheduleit}/phpscheduleit.tpl | 0 .../{ => pptp}/class_pptpAccount.inc | 0 .../personal/connectivity/{ => pptp}/pptp.tpl | 0 .../{ => pureftpd}/class_pureftpdAccount.inc | 0 .../connectivity/{ => pureftpd}/pureftpd.tpl | 0 .../{ => squid}/class_proxyAccount.inc | 0 .../connectivity/{ => squid}/proxy.tpl | 0 .../{ => webdav}/class_webdavAccount.inc | 0 .../connectivity/{ => webdav}/webdav.tpl | 0 15 files changed, 160 deletions(-) delete mode 100644 gosa-core/plugins/personal/connectivity/class_pgsql_opengw.inc rename gosa-core/plugins/personal/connectivity/{ => openxchange}/class_oxchangeAccount.inc (100%) rename gosa-core/plugins/personal/connectivity/{ => openxchange}/oxchange.tpl (100%) rename gosa-core/plugins/personal/connectivity/{ => phpgw}/class_phpgwAccount.inc (100%) rename gosa-core/plugins/personal/connectivity/{ => phpgw}/phpgw.tpl (100%) rename gosa-core/plugins/personal/connectivity/{ => phpscheduleit}/class_phpscheduleitAccount.inc (100%) rename gosa-core/plugins/personal/connectivity/{ => phpscheduleit}/phpscheduleit.tpl (100%) rename gosa-core/plugins/personal/connectivity/{ => pptp}/class_pptpAccount.inc (100%) rename gosa-core/plugins/personal/connectivity/{ => pptp}/pptp.tpl (100%) rename gosa-core/plugins/personal/connectivity/{ => pureftpd}/class_pureftpdAccount.inc (100%) rename gosa-core/plugins/personal/connectivity/{ => pureftpd}/pureftpd.tpl (100%) rename gosa-core/plugins/personal/connectivity/{ => squid}/class_proxyAccount.inc (100%) rename gosa-core/plugins/personal/connectivity/{ => squid}/proxy.tpl (100%) rename gosa-core/plugins/personal/connectivity/{ => webdav}/class_webdavAccount.inc (100%) rename gosa-core/plugins/personal/connectivity/{ => webdav}/webdav.tpl (100%) diff --git a/gosa-core/plugins/personal/connectivity/class_pgsql_opengw.inc b/gosa-core/plugins/personal/connectivity/class_pgsql_opengw.inc deleted file mode 100644 index 3615bb4c6..000000000 --- a/gosa-core/plugins/personal/connectivity/class_pgsql_opengw.inc +++ /dev/null @@ -1,160 +0,0 @@ -user = $user; - $this->pwd = $pwd; - $this->server = $server; - $this->db = $db; - - if($this->_connect()){ - $this->is_connected = true; - }else{ - $this->is_connected = false; - } - } - - function _connect() - { - error_reporting(E_ALL | E_STRICT); - if(is_callable("pg_connect")){ - if(!empty($this->pwd)){ - $this->handle = @pg_connect("dbname=".$this->db." host=".$this->server." user=".$this->user); - }else{ - $this->handle = @pg_connect("dbname=".$this->db." host=".$this->server." user=".$this->user." password=".$this->pwd); - } - if(!$this->handle){ - $this->handle = false; - } - }else{ - $this->handle = false; - } - return($this->handle); - } - - function Query($a_query) - { - if(is_array($a_query)){ - foreach($a_query as $nr => $query){ - return($this->_query($query)); - } - }else{ - return($this->_query($a_query)); - } - } - - function _query($query) - { - return(pg_query($this->handle,$query)); - } - - function FetchAllRows($res) - { - return(pg_fetch_all($res)) ; - } - - function gen_id() - { - $tmp = $this->_query("select nextval('key_generator');"); - $tmp = ($this->FetchAllRows($tmp)); - return($tmp[0]['nextval']); - } - - - function GetTemplateUser(){ - $data = array(); - $qry = "SELECT description,name,company_id FROM company WHERE is_template_user=1;"; - $res = $this->_query($qry); - $tmp = $this->FetchAllRows($res); - foreach($tmp as $attr){ - $data[$attr['name']] = $attr; - } - return $data; - } - function GetLocationTeam(){ - $data = array(); - $qry = "SELECT description,name,company_id FROM team WHERE is_location_team=1;"; - $res = $this->_query($qry); - $tmp = $this->FetchAllRows($res); - if(is_array($tmp)){ - foreach($tmp as $attr){ - $data[$attr['description']] = $attr; - } - } - return $data; - } - function GetTeams(){ - $data = array(); - $qry = "SELECT description,name,company_id FROM team - WHERE (is_team=1) AND company_id - NOT IN (SELECT company_id FROM company WHERE is_location_team=1);"; - $res = $this->_query($qry); - $tmp = $this->FetchAllRows($res); - foreach($tmp as $attr){ - $data[$attr['description']] = $attr; - } - return $data; - } -} - - -function gen_syntax($array,$tablename,$act,$ist) -{ - if($act == "EDIT"){ - $str = "UPDATE ".$tablename." SET "; - $company_id = $ist[0]['company_id']; - - foreach($array as $name => $value){ - if((empty($value))&&(!preg_match("/^is_/i",$name))) continue; - - if((empty($value))&&(preg_match("/^is_/i",$name))){ - $value= 0; - } - - if(!is_numeric($value)){ - $str.= " ".$name."='".$value."', "; - }else{ - $str.= " ".$name."=".$value.", "; - } - } - $str = preg_replace("/, $/","",$str); - $str .= " WHERE company_id=".$company_id.";\n"; - return $str; - } - if($act == "ADD"){ - $str = "INSERT into ".$tablename." ("; - $attrs = ""; - $values = ""; - foreach($array as $name => $attribute){ - if((empty($attribute))&&(!preg_match("/^is_/i",$name))) continue; - - if((empty($attribute))&&(preg_match("/^is_/i",$name))){ - $attribute= 0; - } - - if(is_numeric($attribute)){ - $attrs .= $name.", "; - $values .= $attribute.", "; - }else{ - $attrs .= $name.", "; - $values .= "'".$attribute."', "; - } - } - $attrs = preg_replace("/, $/","",$attrs); - $values= preg_replace("/, $/","",$values); - $str .= $attrs." ) \nVALUES\n (".$values.");\n"; - return $str; - } -} -// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: -?> diff --git a/gosa-core/plugins/personal/connectivity/class_oxchangeAccount.inc b/gosa-core/plugins/personal/connectivity/openxchange/class_oxchangeAccount.inc similarity index 100% rename from gosa-core/plugins/personal/connectivity/class_oxchangeAccount.inc rename to gosa-core/plugins/personal/connectivity/openxchange/class_oxchangeAccount.inc diff --git a/gosa-core/plugins/personal/connectivity/oxchange.tpl b/gosa-core/plugins/personal/connectivity/openxchange/oxchange.tpl similarity index 100% rename from gosa-core/plugins/personal/connectivity/oxchange.tpl rename to gosa-core/plugins/personal/connectivity/openxchange/oxchange.tpl diff --git a/gosa-core/plugins/personal/connectivity/class_phpgwAccount.inc b/gosa-core/plugins/personal/connectivity/phpgw/class_phpgwAccount.inc similarity index 100% rename from gosa-core/plugins/personal/connectivity/class_phpgwAccount.inc rename to gosa-core/plugins/personal/connectivity/phpgw/class_phpgwAccount.inc diff --git a/gosa-core/plugins/personal/connectivity/phpgw.tpl b/gosa-core/plugins/personal/connectivity/phpgw/phpgw.tpl similarity index 100% rename from gosa-core/plugins/personal/connectivity/phpgw.tpl rename to gosa-core/plugins/personal/connectivity/phpgw/phpgw.tpl diff --git a/gosa-core/plugins/personal/connectivity/class_phpscheduleitAccount.inc b/gosa-core/plugins/personal/connectivity/phpscheduleit/class_phpscheduleitAccount.inc similarity index 100% rename from gosa-core/plugins/personal/connectivity/class_phpscheduleitAccount.inc rename to gosa-core/plugins/personal/connectivity/phpscheduleit/class_phpscheduleitAccount.inc diff --git a/gosa-core/plugins/personal/connectivity/phpscheduleit.tpl b/gosa-core/plugins/personal/connectivity/phpscheduleit/phpscheduleit.tpl similarity index 100% rename from gosa-core/plugins/personal/connectivity/phpscheduleit.tpl rename to gosa-core/plugins/personal/connectivity/phpscheduleit/phpscheduleit.tpl diff --git a/gosa-core/plugins/personal/connectivity/class_pptpAccount.inc b/gosa-core/plugins/personal/connectivity/pptp/class_pptpAccount.inc similarity index 100% rename from gosa-core/plugins/personal/connectivity/class_pptpAccount.inc rename to gosa-core/plugins/personal/connectivity/pptp/class_pptpAccount.inc diff --git a/gosa-core/plugins/personal/connectivity/pptp.tpl b/gosa-core/plugins/personal/connectivity/pptp/pptp.tpl similarity index 100% rename from gosa-core/plugins/personal/connectivity/pptp.tpl rename to gosa-core/plugins/personal/connectivity/pptp/pptp.tpl diff --git a/gosa-core/plugins/personal/connectivity/class_pureftpdAccount.inc b/gosa-core/plugins/personal/connectivity/pureftpd/class_pureftpdAccount.inc similarity index 100% rename from gosa-core/plugins/personal/connectivity/class_pureftpdAccount.inc rename to gosa-core/plugins/personal/connectivity/pureftpd/class_pureftpdAccount.inc diff --git a/gosa-core/plugins/personal/connectivity/pureftpd.tpl b/gosa-core/plugins/personal/connectivity/pureftpd/pureftpd.tpl similarity index 100% rename from gosa-core/plugins/personal/connectivity/pureftpd.tpl rename to gosa-core/plugins/personal/connectivity/pureftpd/pureftpd.tpl diff --git a/gosa-core/plugins/personal/connectivity/class_proxyAccount.inc b/gosa-core/plugins/personal/connectivity/squid/class_proxyAccount.inc similarity index 100% rename from gosa-core/plugins/personal/connectivity/class_proxyAccount.inc rename to gosa-core/plugins/personal/connectivity/squid/class_proxyAccount.inc diff --git a/gosa-core/plugins/personal/connectivity/proxy.tpl b/gosa-core/plugins/personal/connectivity/squid/proxy.tpl similarity index 100% rename from gosa-core/plugins/personal/connectivity/proxy.tpl rename to gosa-core/plugins/personal/connectivity/squid/proxy.tpl diff --git a/gosa-core/plugins/personal/connectivity/class_webdavAccount.inc b/gosa-core/plugins/personal/connectivity/webdav/class_webdavAccount.inc similarity index 100% rename from gosa-core/plugins/personal/connectivity/class_webdavAccount.inc rename to gosa-core/plugins/personal/connectivity/webdav/class_webdavAccount.inc diff --git a/gosa-core/plugins/personal/connectivity/webdav.tpl b/gosa-core/plugins/personal/connectivity/webdav/webdav.tpl similarity index 100% rename from gosa-core/plugins/personal/connectivity/webdav.tpl rename to gosa-core/plugins/personal/connectivity/webdav/webdav.tpl -- 2.30.2