Code

Updated proxy class
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 12 Jul 2010 07:52:17 +0000 (07:52 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 12 Jul 2010 07:52:17 +0000 (07:52 +0000)
-Fixed post handling
-Added missing ACL

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18989 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/squid/personal/connectivity/squid/class_proxyAccount.inc

index 72741f8978ae50e8e389018a11477b42cb522e60..ba5e02e9f63d3e85d2e2dbfe68d2076fd0e1abd8 100644 (file)
@@ -203,7 +203,7 @@ class proxyAccount extends plugin
         if ($_POST["quota_size"] == "gosaProxyQuota"){
           $message[]= msgPool::invalid(_("Quota Setting"));
         }elseif ($_POST["quota_size"] <= 0){
-          $message[]= msgPool::invalid(_("Quota Setting"),$_POST["quota_size"],"/^[0-9]/");
+          $message[]= msgPool::invalid(_("Quota Setting"),get_post("quota_size"),"/^[0-9]/");
         }
       }
     }
@@ -258,13 +258,13 @@ class proxyAccount extends plugin
       if ($this->acl_is_writeable("gosaProxyFlagT")){
         if(isset($_POST['startMinute'])){
           $old= $this->gosaProxyWorkingStart;
-          $this->gosaProxyWorkingStart= $_POST["startHour"] * 60 + $_POST["startMinute"];
+          $this->gosaProxyWorkingStart= get_post('startHour') * 60 + get_post('startMinute');
           $this->is_modified= ($old != $this->gosaProxyWorkingStart)?TRUE:$this->is_modified;
         }
 
         if (isset($_POST['stopMinute'])){
           $old= $this->gosaProxyWorkingStop;
-          $this->gosaProxyWorkingStop = $_POST["stopHour"]  * 60 + $_POST["stopMinute"];
+          $this->gosaProxyWorkingStop = get_post('stopHour')  * 60 + get_post('stopMinute');
           $this->is_modified= ($old != $this->gosaProxyWorkingStop)?TRUE:$this->is_modified;
         }
       }
@@ -272,14 +272,14 @@ class proxyAccount extends plugin
       /* Save quota values */
       if ($this->acl_is_writeable("gosaProxyFlagB")){
         if(isset($_POST["quota_size"]) && isset($_POST["quota_unit"])){
-          $this->gosaProxyQuota= $_POST["quota_size"].$_POST["quota_unit"];
+          $this->gosaProxyQuota= get_post("quota_size").get_post("quota_unit");
         }
       }
   
       /*Save quota period */
       if($this->acl_is_writeable("gosaProxyFlagB")){
         if(isset($_POST["gosaProxyQuotaPeriod"])){
-          $this->gosaProxyQuotaPeriod = $_POST["gosaProxyQuotaPeriod"];
+          $this->gosaProxyQuotaPeriod = get_post("gosaProxyQuotaPeriod");
         }
       }
     }
@@ -341,6 +341,7 @@ class proxyAccount extends plugin
               ),
 
           "plProvidedAcls"  => array(
+            "gosaProxyQuota"       => _("Quota"), 
             "gosaProxyFlagF"       => _("Filter unwanted content"), 
             "gosaProxyFlagT"       => _("Limit proxy access"),
             "gosaProxyFlagB"       => _("Restrict proxy usage by quota"))