diff --git a/gosa-plugins/scalix/personal/scalix/class_scalixAccount.inc b/gosa-plugins/scalix/personal/scalix/class_scalixAccount.inc
index 4f5ff3978aa54d8b38789b97580b5b9fde579896..ec108855ec80e6abc94da97d2f77f34e823cd022 100644 (file)
class scalixAccount extends plugin
{
/* Definitions */
- var $plHeadline = "Scalix";
- var $plDescription= "This does something";
+ var $plHeadline = "SCALIX";
+ var $plDescription= "Manage personal SCALIX settings";
/* plugin specific values - scalixUserClass */
/* MUST */
/* Load templating engine */
$smarty= get_smarty();
- $smarty->assign("scalixGroup",$this->scalixGroup);
+ $smarty->assign("scalixGroup", set_post($this->scalixGroup));
$display= "";
/* Do we need to flip is_account state? */
/* Do we represent a valid account? */
if (!$this->is_account && $this->parent === NULL){
$display= "<img alt=\"\" src=\"images/small-error.png\" align=\"middle\"> <b>".
- _("This account has no scalix extensions.")."</b>";
+ _("This account has no SCALIX extensions.")."</b>";
$display.= back_to_main();
return ($display);
/* Show tab dialog headers */
if ($this->parent !== NULL){
if ($this->is_account){
- $display= $this->show_disable_header(_("Remove scalix account"),
- _("This account has scalix synchronization enabled. You can disable it by clicking below."));
+ $display= $this->show_disable_header(_("Remove SCALIX account"),
+ _("This account has SCALIX synchronization enabled. You can disable it by clicking below."));
} else {
- $display= $this->show_enable_header(_("Create scalix account"), _("This account has scalix synchronization disabled. You can enable it by clicking below."));
+ $display= $this->show_enable_header(_("Create SCALIX account"), _("This account has SCALIX synchronization disabled. You can enable it by clicking below."));
return ($display);
}
}
"scalixServerLanguage", "scalixLimitMailboxSize", "scalixLimitOutboundMail", "scalixEmailAddress",
"scalixLimitInboundMail", "scalixLimitNotifyUser", "scalixHideUserEntry", "scalixMailboxClass") as $val){
- $smarty->assign("$val", $this->$val);
- $smarty->assign("$val"."ACL", $this->getacl($val));
+ $smarty->assign("$val", set_post($this->$val));
+ }
+
+ $tmp = $this->plInfo();
+ foreach($tmp['plProvidedAcls'] as $name => $desc){
+ $smarty->assign($name."ACL", $this->getacl($name));
}
/* Fill checkboxes */
plugin::save_object();
/* Check if given value is not empty */
- if (isset($_POST['email_address']) && !empty($_POST['email_address'])){
+ if (isset($_POST['email_address']) && !empty($_POST['email_address']) && isset($_POST['add_email'])){
$valid= FALSE;
/* Valid mail address */
if( ($this->is_template && !tests::is_email($_POST['email_address'], TRUE)) ||
- (!$this->is_template && !tests::is_email($_POST['email_address'])) ){
+ (!$this->is_template && !tests::is_email($_POST['email_address']))){
msg_dialog::display(_("Error"), _("Cannot add invalid mail address!"), ERROR_DIALOG);
}else{
$valid = TRUE;
}else{
/* Mail address already in use ? */
- if ($valid && ($user= $this->addEmail ($_POST['email_address'])) != ""){
+ if ($valid && ($user= $this->addEmail (get_post('email_address'))) != ""){
$ui= get_userinfo();
if ($user != $ui->username){
msg_dialog::display(_("Error"), sprintf(_("Cannot add mail address: it is already used by user '%s'."), $user),
$message= array();
if(empty($this->scalixMailnode)){
- $message[]= msgPool::required(_("Mailnode"));
+ $message[]= msgPool::required(_("Mail node"));
}
if(empty($this->scalixScalixObject)){
- $message[]= msgPool::required(_("Scalix object"));
+ $message[]= msgPool::required(_("SCALIX object"));
}
$ldap->cd($this->config->current['BASE']);
static function plInfo()
{
return (array(
- "plDescription" => _("Scalix account"),
+ "plDescription" => _("SCALIX account"),
"plSelfModify" => TRUE,
"plDepends" => array("user"),
"plPriority" => 2,
"plCategory" => array("users"),
"plOptions" => array(),
+ "plRequirements"=> array(
+ 'ldapSchema' => array('scalixUserClass' => ''),
+ 'onFailureDisablePlugin' => array(get_class())
+ ),
+
"plProvidedAcls" => array(
- "scalixMailnode" => _("Scalix Mail node"),
+ "scalixMailnode" => _("SCALIX Mail node"),
"scalixMailboxClass" => _("Mailbox class"),
"scalixServerLanguage" => _("Server language"),
"scalixAdministrator" => _("Administrator"),
"scalixMailboxAdministrator"=> _("Mailbox administrator"),
- "scalixHideUserEntry" => _("Hide user entry in Scalix"),
+ "scalixHideUserEntry" => _("Hide user entry in SCALIX"),
"scalixLimitMailboxSize" => _("Mailbox size limitations"),
"scalixLimitOutboundMail" => _("Limit outbound"),
"scalixLimitInboundMail" => _("Limit inbound"),
"scalixLimitNotifyUser" => _("Notify user"),
- "scalixEmailAddress" => _("Scalix email addresses"))
+ "scalixEmailAddress" => _("SCALIX email addresses"))
));
}
}
/* Mail address already in use ? */
- if ($valid && ($user= $this->addEmail ($_POST['email_address'])) != ""){
+ if ($valid && ($user= $this->addEmail (get_post('email_address'))) != ""){
$ui= get_userinfo();
if ($user != $ui->username){
msg_dialog::display(_("Error"), sprintf(_("Cannot add mail address: it is already used by user '%s'."), $user), ERROR_DIALOG);
function getCopyDialog()
{
$smarty = get_smarty();
- $smarty->assign("scalixEmailAddress",$this->scalixEmailAddress);
+ $smarty->assign("scalixEmailAddress",set_post($this->scalixEmailAddress));
$str = $smarty->fetch(get_template_path("paste_generic.tpl",TRUE,dirname(__FILE__)));
$ret = array();
$ret['string'] = $str;