index ceb49f2bf1b56ab94df65b0e4b74b94b21d2739d..9e5d706d37f14aa2622d94672bf50fc09d62adf6 100644 (file)
function execute()
{
/* This one is empty currently. Fabian - please fill in the docu code */
- $_SESSION['current_class_for_help'] = get_class($this);
+ session::set('current_class_for_help',get_class($this));
/* Reset Lock message POST/GET check array, to prevent perg_match errors*/
- $_SESSION['LOCK_VARS_TO_USE'] = $_SESSION['LOCK_VARS_USED'] =array();
+ session::set('LOCK_VARS_TO_USE',array());
+ session::set('LOCK_VARS_USED',array());
}
/*! \brief execute plugin
exec($command);
} else {
$message= sprintf(_("Command '%s', specified as POSTCREATE for plugin '%s' doesn't seem to exist."), $command, get_class($this));
- print_red ($message);
+ msg_dialog::display(_("Error"), $message, ERROR_DIALOG);
}
}
}
exec($command);
} else {
$message= sprintf(_("Command '%s', specified as POSTMODIFY for plugin '%s' doesn't seem to exist."), $command, get_class($this));
- print_red ($message);
+ msg_dialog::display(_("Error"), $message, ERROR_DIALOG);
}
}
}
exec($command);
} else {
$message= sprintf(_("Command '%s', specified as POSTREMOVE for plugin '%s' doesn't seem to exist."), $command, get_class($this));
- print_red ($message);
+ msg_dialog::display(_("Error"), $message, ERROR_DIALOG);
}
}
}
/* Check if the snapshot_base is defined */
if(!isset($tmp['SNAPSHOT_BASE'])){
- print_red(sprintf(_("The snapshot functionality is enabled, but the required variable '%s' is not configured in your gosa.conf."),"SNAPSHOT_BASE"));
+ msg_dialog::display(_("Configuration error"), sprintf(_("The snapshot functionality is enabled, but the required variable '%s' is not set."),"SNAPSHOT_BASE"), ERROR_DIALOG);
return(FALSE);
}
foreach(array("SNAPSHOT_SERVER","SNAPSHOT_USER","SNAPSHOT_PASSWORD","SNAPSHOT_BASE") as $var){
if(!isset($tmp[$var])){
$missing .= $var." ";
- print_red(sprintf(_("The snapshot functionality is enabled, but the required variable(s) '%s' is not configured in your gosa.conf."),$missing));
+ msg_dialog::display(_("Configuration error"), sprintf(_("The snapshot functionality is enabled, but the required variable '%s' is not set."), $missing), ERROR_DIALOG);
return(FALSE);
}
}
$msgs = $this->snapDialog->check();
if(count($msgs)){
foreach($msgs as $msg){
- print_red($msg);
+ msg_dialog::display(_("Error"), $msg, ERROR_DIALOG);
}
}else{
$this->dn = $this->snapDialog->dn;
}
/* Update userinfo if necessary */
- if($_SESSION['ui']->dn == $old_dn){
- $_SESSION['ui']->dn = $new_dn;
+ $ui = session::get('ui');
+ if($ui->dn == $old_dn){
+ $ui->dn = $new_dn;
+ session::set('ui',$ui);
new log("view","acl/".get_class($this),$this->dn,array(),"Updated current user dn from '".$old_dn."' to '".$new_dn."'");
}
function multiple_execute()
{
/* This one is empty currently. Fabian - please fill in the docu code */
- $_SESSION['current_class_for_help'] = get_class($this);
+ session::set('current_class_for_help',get_class($this));
/* Reset Lock message POST/GET check array, to prevent perg_match errors*/
- $_SESSION['LOCK_VARS_TO_USE'] = $_SESSION['LOCK_VARS_USED'] =array();
+ session::set('LOCK_VARS_TO_USE',array());
+ session::set('LOCK_VARS_USED',array());
return("Multiple edit is currently not implemented for this plugin.");
}
/* Save values to object */
$this->multi_boxes = array();
foreach ($this->attributes as $val){
- if ($this->acl_is_writeable($val) && isset ($_POST["$val"])){
+
+ /* Get selected checkboxes from multiple edit */
+ if(isset($_POST["use_".$val])){
+ $this->multi_boxes[] = $val;
+ }
- if(isset($_POST["use_".$val])){
- $this->multi_boxes[] = $val;
- }
+ if ($this->acl_is_writeable($val) && isset ($_POST["$val"])){
/* Check for modifications */
if (get_magic_quotes_gpc()) {