diff --git a/gosa-plugins/kolab/personal/connectivity/kolab/class_kolabAccount.inc b/gosa-plugins/kolab/personal/connectivity/kolab/class_kolabAccount.inc
index 44e9e506a7bd4ae9276379497359fc2bda56a8f7..f5ef63436f7723aef9391ade6c1a6e6aa389f230 100644 (file)
{
/* Definitions */
var $plHeadline = "Kolab";
- var $plDescription = "This does something";
+ var $plDescription = "Manage Kolab user settings";
/* Kolab attributes */
var $kolabInvitationPolicy = array();
/* Load attributes */
foreach($this->attributes as $val){
- $smarty->assign("$val", $this->$val);
+ $smarty->assign("$val", set_post($this->$val));
}
$tmp = $this->plInfo();
if ($_POST['delegate_address'] != ""){
/* Valid email address specified? */
- $address= $_POST['delegate_address'];
+ $address= get_post('delegate_address');
$valid= FALSE;
if (!tests::is_email($address)){
if (!tests::is_email($address, TRUE)){
/* Delete forward email addresses */
if ((isset($_POST['delete_delegation'])) && (isset($_POST['delegate_list']))){
if (count($_POST['delegate_list']) && $this->acl_is_writeable("kolabDelegate")){
- $this->delDelegate ($_POST['delegate_list']);
+ $this->delDelegate (get_post('delegate_list'));
}
}
'ACT_REJECT_IF_CONFLICTS' => _("Reject if conflicts"),
'ACT_MANUAL_IF_CONFLICTS' => _("Manual if conflicts"),
'ACT_MANUAL' => _("Manual"));
- $smarty->assign('policies', $policies);
+ $smarty->assign('policies', set_post($policies));
/* Adjust checkbox */
if ($this->unrestrictedMailSize){
/* Smarty will produce <option value=""></option> and tidy don't like that, so tell smarty to create no option (array();)*/
$smarty->assign("kolabDelegate", array());
} else {
- $smarty->assign("kolabDelegate", $this->kolabDelegate);
+ $smarty->assign("kolabDelegate", set_post($this->kolabDelegate));
}
$smarty->assign("mail_account",$this->mail_Account);
if(!$this->acl_is_readable("kolabInvitationPolicy")){
$name='';
}
- $invitation.= "<input name=\"address$nr\" size=16 maxlength=60 value=\"$name\" id='address".$nr."' ".$dis.">";
+ $invitation.= "<input type='text'name=\"address$nr\" size=16 maxlength=60 value=\"".set_post($name)."\" id='address".$nr."' ".$dis.">";
}
$invitation.= "</td>";
/* Assign buttons */
$button= "";
if ($nr == count($this->kolabInvitationPolicy)-1){
- $button= "<input type='image' name=\"add_inv_".$nr."\" src='images/lists/new.png' id='add".$nr."' ".$dis.">";
+ $button= "<button type='submit' name=\"add_inv_".$nr."\" id='add".$nr."' ".$dis.">".msgPool::addButton()."</button>";
}
if ($nr != 0) {
- $button.= "<input type='image' name=\"del_inv_".$nr."\" src='images/lists/trash.png' id='remove".$nr."' ".$dis.">";
+ $button.= "<button type='submit' name=\"del_inv_".$nr."\" id='remove".$nr."' ".$dis.">".msgPool::delButton()."</button>";
}
$invitation.= "</select> </td>
$smarty->assign("changeState", $changeState);
$smarty->assign("kolabState",$this->is_account);
-
$smarty->assign("multiple_support",$this->multiple_support_active);
foreach($this->attributes as $attr){
- $smarty->assign("use_".$attr,in_array($attr,$this->multi_boxes));
+ $smarty->assign("use_".$attr,in_array_strict($attr,$this->multi_boxes));
}
foreach(array("kolabState") as $attr){
- $smarty->assign("use_".$attr,in_array($attr,$this->multi_boxes));
+ $smarty->assign("use_".$attr,in_array_strict($attr,$this->multi_boxes));
}
if($this->multiple_support_active){
/* Optionally execute a command after we're done */
plugin::remove_from_parent();
- if(!in_array("kolabInetOrgPerson",$this->attrs['objectClass'])){
+ if(!in_array_strict("kolabInetOrgPerson",$this->attrs['objectClass'])){
$this->attrs['objectClass'][] = "kolabInetOrgPerson";
}
/* Check for URL scheme... */
if(empty($this->calFBURL)){
- $message[]= msgPool::required(_("Free Busy url"));
+ $message[]= msgPool::required(_("Free Busy URL"));
}
if(!preg_match("/^http+(s)*:\/\//",$this->calFBURL)){
- $message[]= msgPool::invalid(_("Free Busy url"), $this->calFBURL, "/^http+(s)*:\/\//");
+ $message[]= msgPool::invalid(_("Free Busy URL"), $this->calFBURL, "/^http+(s)*:\/\//");
}
/* Check invitation policy for existing mail addresses */
/* Anonymous? */
if (!isset($_POST["address$nr"])){
- $this->kolabInvitationPolicy[]= $_POST["policy$nr"];
+ $this->kolabInvitationPolicy[]= get_post("policy$nr");
} else {
- $this->kolabInvitationPolicy[]= $_POST["address$nr"].": ".$_POST["policy$nr"];
+ $this->kolabInvitationPolicy[]= get_post("address$nr").": ".get_post("policy$nr");
}
$nr++;
{
return (array(
"plShortName" => _("Kolab"),
- "plDescription" => _("Kolab account settings")." ("._("Connectivity addon").")",
+ "plDescription" => _("Kolab account settings")." ("._("Connectivity add-on").")",
"plSelfModify" => TRUE,
"plDepends" => array("user"),
"plPriority" => 20, // Position in tabs
public function get_multi_edit_values()
{
$ret = plugin::get_multi_edit_values();
- if(in_array("kolabState",$this->multi_boxes)){
+ if(in_array_strict("kolabState",$this->multi_boxes)){
$ret['is_account'] = $this->is_account;
}
return($ret);
public function init_multiple_support($attrs,$all)
{
plugin::init_multiple_support($attrs,$all);
- if(isset($attrs['objectClass']) && in_array("kolabInetOrgPerson",$attrs['objectClass'])){
+ if(isset($attrs['objectClass']) && in_array_strict("kolabInetOrgPerson",$attrs['objectClass'])){
$this->is_account = TRUE;
}
plugin::adapt_from_template($dn, $skip);
/* Setting uid to default */
- if(isset($this->attrs['uid'][0]) && !in_array("uid", $skip)){
+ if(isset($this->attrs['uid'][0]) && !in_array_strict("uid", $skip)){
$this->uid = $this->attrs['uid'][0];
}
/* Pull arrays */
foreach(array("kolabDelegate", "kolabInvitationPolicy") as $attr){
- if (in_array($attr, $skip)){
+ if (in_array_strict($attr, $skip)){
continue;
}