diff --git a/gosa-plugins/squid/personal/connectivity/squid/class_proxyAccount.inc b/gosa-plugins/squid/personal/connectivity/squid/class_proxyAccount.inc
index 72741f8978ae50e8e389018a11477b42cb522e60..8251a37232fbad280343c4445b805f5027b27849 100644 (file)
{
/* Definitions */
var $plHeadline = "Proxy";
- var $plDescription= "This does something";
+ var $plDescription= "Manage Proxy user settings";
/* Proxy attributes */
var $gosaProxyAcctFlags = "[N ]";
/* Assign quota values */
$smarty->assign("quota_unit", array("k" => _("KB"), "m" => _("MB"), "g" => _("GB")));
$smarty->assign("quota_time", array("h" => _("hour"), "d" => _("day"), "w" => _("week"), "m" => _("month")));
- $smarty->assign("gosaProxyQuotaPeriod", $this->gosaProxyQuotaPeriod);
- $smarty->assign("quota_size", preg_replace("/[a-z]$/i", "", $this->gosaProxyQuota));
- $smarty->assign("quota_u", preg_replace("/^[0-9]+/", "", $this->gosaProxyQuota));
+ $smarty->assign("gosaProxyQuotaPeriod", set_post($this->gosaProxyQuotaPeriod));
+ $smarty->assign("quota_size", set_post(preg_replace("/[a-z]$/i", "", $this->gosaProxyQuota)));
+ $smarty->assign("quota_u", set_post(preg_replace("/^[0-9]+/", "", $this->gosaProxyQuota)));
if ($this->is_account){
$smarty->assign("proxyState", "checked");
} else {
/* Assign filter settings */
$smarty->assign("changeB",$changeB);
foreach(array("T","B","F") as $attr){
- if(in_array("filter".$attr,$this->multi_boxes)){
+ if(in_array_strict("filter".$attr,$this->multi_boxes)){
$smarty->assign("use_filter".$attr,TRUE);
}else{
$smarty->assign("use_filter".$attr,FALSE);
$smarty->assign('proxyAccountACL', $this->getacl("",$this->ReadOnly));
}
- $smarty->assign("use_proxy",in_array("proxy",$this->multi_boxes));
+ $smarty->assign("use_proxy",in_array_strict("proxy",$this->multi_boxes));
$smarty->assign("multiple_support",$this->multiple_support_active);
$display.= $smarty->fetch(get_template_path('proxy.tpl', TRUE, dirname(__FILE__)));
return($display);
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]/");
}
}
}
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;
}
}
/* 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");
}
}
}
{
return (array(
"plShortName" => _("Proxy"),
- "plDescription" => _("Proxy account")." ("._("Connectivity addon").")",
+ "plDescription" => _("Proxy account")." ("._("Connectivity add-on").")",
"plSelfModify" => TRUE,
"plDepends" => array("user"),
"plPriority" => 21, // Position in tabs
),
"plProvidedAcls" => array(
+ "gosaProxyQuota" => _("Quota"),
"gosaProxyFlagF" => _("Filter unwanted content"),
"gosaProxyFlagT" => _("Limit proxy access"),
"gosaProxyFlagB" => _("Restrict proxy usage by quota"))
public function get_multi_edit_values()
{
$ret = plugin::get_multi_edit_values();
- if(in_array("proxy",$this->multi_boxes)){
+ if(in_array_strict("proxy",$this->multi_boxes)){
$ret['is_account'] = $this->is_account;
}
- if(in_array("filterT",$this->multi_boxes)){
+ if(in_array_strict("filterT",$this->multi_boxes)){
$ret['gosaProxyWorkingStart'] = $this->gosaProxyWorkingStart;
$ret['gosaProxyWorkingStop'] = $this->gosaProxyWorkingStop;
}
- if(in_array("filterB",$this->multi_boxes)){
+ if(in_array_strict("filterB",$this->multi_boxes)){
$ret['gosaProxyQuota'] = $this->gosaProxyQuota;
$ret['gosaProxyQuotaPeriod'] = $this->gosaProxyQuotaPeriod;
}
foreach(array("B","T","F") as $attr){
$name = "filter".$attr;
- if(in_array($name,$this->multi_boxes)){
+ if(in_array_strict($name,$this->multi_boxes)){
$ret[$name] = preg_match("/".$attr."/",$this->gosaProxyAcctFlags);
}
}
public function init_multiple_support($attrs,$all)
{
plugin::init_multiple_support($attrs,$all);
- if(isset($attrs['objectClass']) && in_array("gosaProxyAccount",$attrs['objectClass'])){
+ if(isset($attrs['objectClass']) && in_array_strict("gosaProxyAccount",$attrs['objectClass'])){
$this->is_account = TRUE;
}
}