summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f7d2904)
raw | patch | inline | side by side (parent: f7d2904)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 27 Feb 2007 11:39:36 +0000 (11:39 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 27 Feb 2007 11:39:36 +0000 (11:39 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5738 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_tabs.inc | patch | blob | history | |
include/functions.inc | patch | blob | history |
diff --git a/include/class_tabs.inc b/include/class_tabs.inc
index 0808b9abe2d0fa1f019e8cab6145a65fe8ea34b0..729a441d89e576a5cc511accdd7957eee3e1373d 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;
+ }
}
}
function check($ignore_account= FALSE)
{
- $this->save_object(TRUE);
- $messages= array();
+ $this->save_object(TRUE);
+ $messages= array();
- /* 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");
+ /* 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;
- }
- }
- }
+ $messages= $obj->check();
+ if (is_php4()){
+ $this->by_object[$key]= $obj;
+ }
+ if (count($messages)){
+ $this->current= $key;
+ break;
+ }
+ }
+ }
- return ($messages);
+ return ($messages);
}
function save($ignore_account= FALSE)
$key, "Adapting");
$obj->parent= &$this;
$obj->adapt_from_template($dn);
- $this->by_object[$key]= $obj;
+ if (is_php4()){
+ $this->by_object[$key]= $obj;
+ }
}
}
diff --git a/include/functions.inc b/include/functions.inc
index 9f0aef9e4e863c58b4d8d3877fba539620ceed52..9fdced5250e418e8726c40ea111742fe761b7f2c 100644 (file)
--- a/include/functions.inc
+++ b/include/functions.inc
return($ret);
}
+function is_php4()
+{
+ return (strpos(phpversion(), 4) === 0);
+}
+
+
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>