Code

Fixed bases
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 19 Sep 2006 04:57:55 +0000 (04:57 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 19 Sep 2006 04:57:55 +0000 (04:57 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4718 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_plugin.inc
plugins/admin/applications/class_applicationGeneric.inc
plugins/admin/applications/generic.tpl

index 72994996b059e6147bc535d7160bd2141d64423d..04f89717e90812cfc716605cd912f1ab783f8ca2 100644 (file)
@@ -1488,7 +1488,7 @@ echo "FIXME: remove_snapshot uses old acl's<br>";
     if(isset($this->base) && isset($this->config->idepartments[$this->base])){
       $deps[$this->base] = $this->config->idepartments[$this->base];
     }else{
-      echo "No default base found. <br>";
+      echo "No default base found. ".$this->base."<br> ";
     }
 
     foreach($this->config->idepartments as $dn => $name){
index 68b2ac8f59a1c23d226b214d7cc378c9fbfbc978..53ace4e8c2ac8077a6b204e7ae807df4cae26660 100644 (file)
@@ -63,7 +63,12 @@ class application extends plugin
         $this->base= dn2base($ui->dn);
       }
     } else {
-      $this->base= preg_replace ("/^[^,]+,[^,]+,/", "", $this->dn);
+
+      if($this->isReleaseApplikation){
+        $this->base = preg_replace("/^.*,ou=apps,/","",$this->dn);
+      }else{
+        $this->base= preg_replace ("/^[^,]+,[^,]+,/", "", $this->dn);
+      }
     }
   }
 
@@ -337,7 +342,9 @@ class application extends plugin
         $this->set_picture($_FILES['picture_file']['tmp_name']);
       }        
 
-      $this->base= $_POST['base'];
+      if(isset($_POST['base'])){
+        $this->base= $_POST['base'];
+      }
     }
 
     if($this->isReleaseApplikation){
index 39ae69ac9866b84d023704905e9381e4bf5a67eb..648204181d02c3f649fb26fd5e5e023b040d8a12 100644 (file)
         {html_options options=$bases selected=$base_select}
        </select>
 {/render}
+{if !$isReleaseApplikation}
 {render acl=$baseACL disable_picture='images/folder_gray.png'}
       <input type="image" name="chooseBase" src="images/folder.png" class="center" title="{t}Select a base{/t}">
 {/render}
+{/if}
       </td>
      </tr>
    </table>