summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 409894b)
raw | patch | inline | side by side (parent: 409894b)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 11 Apr 2006 05:47:54 +0000 (05:47 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 11 Apr 2006 05:47:54 +0000 (05:47 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3026 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/applications/class_applicationGeneric.inc | patch | blob | history | |
plugins/admin/applications/class_applicationManagement.inc | patch | blob | history |
diff --git a/plugins/admin/applications/class_applicationGeneric.inc b/plugins/admin/applications/class_applicationGeneric.inc
index 2b5e5a645a9053fe48a138493570d2c62e3eea51..da52cb304ad45e052debdf21e503bc5bcdbb950e 100644 (file)
$this->is_account= TRUE;
if ($this->dn == "new"){
- if(isset($_SESSION['appfilter']['depselect'])){
- $this->base=$_SESSION['appfilter']['depselect'];
+ if(isset($_SESSION['CurrentMainBase'])){
+ $this->base= $_SESSION['CurrentMainBase'];
}else{
$ui= get_userinfo();
$this->base= dn2base($ui->dn);
diff --git a/plugins/admin/applications/class_applicationManagement.inc b/plugins/admin/applications/class_applicationManagement.inc
index 18bec3eaf0ef0b70c23ab606e9e881f6de6f8fca..cb57824d0d3107f1737527bc47ce530744adb170 100644 (file)
if (!is_global("appfilter")){
$base= get_base_from_people($ui->dn);
- $appfilter= array("depselect" => $base,
- "regex" => "*" ,
+ $appfilter= array("regex" => "*" ,
"release" => "ou=apps,".$base);
-
register_global("appfilter", $appfilter);
}
$appfilter = get_global("appfilter");
- $this->Releases = $this->getReleases($appfilter['depselect']);
+ if(!isset($_SESSION['CurrentMainBase'])){
+ $_SESSION['CurrentMainBase'] = get_base_from_people($ui->dn);
+ }
+
+ $this->Releases = $this->getReleases($_SESSION['CurrentMainBase']);
asort($this->Releases);
$this->Release = $appfilter['release'];
}
if(isset($_GET['act'])&&($_GET['act']=="dep_open")){
$s_action="open";
$s_entry = base64_decode($_GET['dep_id']);
- $appfilter['depselect']= "".$this->config->departments[trim($s_entry)];
+ $_SESSION['CurrentMainBase']= "".$this->config->departments[trim($s_entry)];
}
/* Get posted release */
$s_entry = preg_replace("/_.$/","",$s_entry);
/* Department changed? */
- if(isset($_POST['depselect']) && $_POST['depselect']){
- $appfilter['depselect']= $_POST['depselect'];
+ if(isset($_POST['CurrentMainBase']) && $_POST['CurrentMainBase']){
+ $_SESSION['CurrentMainBase']= $_POST['CurrentMainBase'];
}
/* Homebutton is posted */
if($s_action=="home"){
- $appfilter['depselect']=(preg_replace("/^[^,]+,/","",$this->ui->dn));
- $appfilter['depselect']=(preg_replace("/^[^,]+,/","",$appfilter['depselect']));
+ $_SESSION['CurrentMainBase']=(preg_replace("/^[^,]+,/","",$this->ui->dn));
+ $_SESSION['CurrentMainBase']=(preg_replace("/^[^,]+,/","",$_SESSION['CurrentMainBase']));
}
if($s_action=="root"){
- $appfilter['depselect']=($this->config->current['BASE']);
+ $_SESSION['CurrentMainBase']=($this->config->current['BASE']);
}
/* If Backbutton is Posted */
if($s_action=="back"){
- $base_back = preg_replace("/^[^,]+,/","",$appfilter['depselect']);
+ $base_back = preg_replace("/^[^,]+,/","",$_SESSION['CurrentMainBase']);
$base_back = convert_department_dn($base_back);
if(isset($this->config->departments[trim($base_back)])){
- $appfilter['depselect']= $this->config->departments[trim($base_back)];
+ $_SESSION['CurrentMainBase']= $this->config->departments[trim($base_back)];
}else{
- $appfilter['depselect']= $this->config->departments["/"];
+ $_SESSION['CurrentMainBase']= $this->config->departments["/"];
}
}
$appfilter['regex']= $s;
}
- $this->Releases = $this->getReleases($appfilter['depselect']);
+ $this->Releases = $this->getReleases($_SESSION['CurrentMainBase']);
asort($this->Releases);
if(!isset($this->Releases[$this->Release])){
$this->Release = key($this->Releases);
*/
if(($s_action == "editPaste") || ($this->CopyPasteHandler->stillOpen())){
$this->CopyPasteHandler->save_object();
- $this->CopyPasteHandler->SetVar("base",$appfilter['depselect']);
+ $this->CopyPasteHandler->SetVar("base", $_SESSION['CurrentMainBase']);
+
return($this->CopyPasteHandler->execute());
}
/* Prepare departments */
$options= "";
foreach ($this->config->idepartments as $key => $value){
- if ($appfilter['depselect'] == $key){
+ if ($_SESSION['CurrentMainBase']== $key){
$options.= "<option selected='selected' value='$key'>$value</option>";
} else {
$options.= "<option value='$key'>$value</option>";
" <input class='center' type='image' align='middle' src='images/list_new_app.png' alt='"._("new")."' title='"._("Create new application")."' name='appl_new'> ".
$Copy_Paste.
" <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'> ".
- _("Base")." <select name='depselect' onChange='mainform.submit()' class='center'>$options</select>".
+ _("Base")." <select name='CurrentMainBase' onChange='mainform.submit()' class='center'>$options</select>".
" <input class='center' type='image' src='images/list_submit.png' align='middle' title='"._("Submit department")."' name='submit_department' alt='"._("Submit")."'> ".
"</div>";
*/
$peopleOU = get_people_ou();
- $base2 = $appfilter['depselect'];
+ $base2 = $_SESSION['CurrentMainBase'];
$res3 = get_list2($this->ui->subtreeACL, "(&(|(ou=$regex)(description=$regex))(objectClass=gosaDepartment))",
TRUE, $base2, array("ou", "description"), TRUE);