diff --git a/include/class_tabs.inc b/include/class_tabs.inc
index 15c5fa0fe1a03197d2f96a005fe96bb21504747a..cbf0cf87c14526d116ff778f342df2f31c5ec5d4 100644 (file)
--- a/include/class_tabs.inc
+++ b/include/class_tabs.inc
$obj= $this->by_object[$this->current];
$display.= $obj->execute();
- $this->by_object[$this->current]= $obj;
+ if (is_php4()){
+ $this->by_object[$this->current]= $obj;
+ }
/* Footer for tabbed dialog */
$display.= "</td></tr></table>";
$obj= $this->by_object[$this->last];
$obj->save_object ();
- $this->by_object[$this->last]= $obj;
+ if (is_php4()){
+ $this->by_object[$this->last]= $obj;
+ }
}
/* Skip if curent and last are the same object */
$this->current, "Saving (current)");
$obj->save_object ();
- $this->by_object[$this->current]= $obj;
+ if (is_php4()){
+ $this->by_object[$this->current]= $obj;
+ }
}
}
}
/* Paint tab */
- $display.= "<td style=\"vertical-align:bottom;width:1px;\">";
+ $display.= "<td style=\"vertical-align:bottom;width:1px;white-space:nowrap;\">";
/* Shorten string if its too long for the tab headers*/
$title= _($name);
$title= preg_replace("/ /", " ", $title);
+ /* Take care about notifications */
+ if ($this->by_object[$class]->pl_notify){
+ $notify= "id=\"notify\"";
+ } else {
+ $notify= "";
+ }
if ($_SESSION['js']==FALSE){
- $display.= "<div class=\"$style[$index]\"><input type=\"submit\" name=\"$class\"".
+ $display.= "<div class=\"$style[$index]\" $notify><input type=\"submit\" name=\"$class\"".
" class=\"$style[$index]\" value=\"$title\"";
} else {
- $display.= "<div class=\"$style[$index]\"><a class=\"$style[$index]\" onclick=\"return true;\" href=\"javascript:document.mainform.arg.value='$class';document.mainform.submit();\">$title</a";
+ $display.= "<div $notify class=\"$style[$index]\"><a class=\"$style[$index]\" onclick=\"return true;\" href=\"javascript:document.mainform.arg.value='$class';document.mainform.submit();\">$title</a";
}
$display.= "></div></td>";
}
/* Setup for all plugins */
foreach ($this->by_object as $key => $obj){
- $sacl= get_module_permission($acl, "$key", $this->dn);
+ $sacl= get_module_permission($acl, "$key", $this->dn, false);
$obj->acl= $sacl;
- $this->by_object[$key]= $obj;
+ if (is_php4()){
+ $this->by_object[$key]= $obj;
+ }
}
}
$this->save_object(TRUE);
$messages= array();
+ $current_set = FALSE;
+
/* Check all plugins */
foreach ($this->by_object as $key => $obj){
if ($obj->is_account || $ignore_account || $obj->ignore_account){
@DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,
$key, "Checking");
- $messages= $obj->check();
- if (count($messages)){
- $this->current= $key;
- break;
- }
- }
+ $msg= $obj->check();
+ if (is_php4()){
+ $this->by_object[$key]= $obj;
+ }
+ if (count($msg)){
+ $this->by_object[$key]->pl_notify= TRUE;
+ if(!$current_set){
+ $current_set = TRUE;
+ $this->current= $key;
+ $messages = $msg;
+ }
+ }else{
+ $this->by_object[$key]->pl_notify= FALSE;
+ }
+ }else{
+ $this->by_object[$key]->pl_notify= FALSE;
+ }
}
return ($messages);
$key, "Adapting");
$obj->parent= &$this;
$obj->adapt_from_template($dn);
- $this->by_object[$key]= $obj;
+ if (is_php4()){
+ $this->by_object[$key]= $obj;
+ }
}
}