summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f9234fc)
raw | patch | inline | side by side (parent: f9234fc)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 12 Feb 2008 07:00:31 +0000 (07:00 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 12 Feb 2008 07:00:31 +0000 (07:00 +0000) |
-Added remove from parent.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8845 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8845 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/groups/apps/class_groupApplication.inc | patch | blob | history | |
gosa-plugins/goto/admin/groups/apps/edit_entry.tpl | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/groups/apps/class_groupApplication.inc b/gosa-plugins/goto/admin/groups/apps/class_groupApplication.inc
index 11807535feddabdcbda291167c145b9c12cf6c7d..0877b855fb5dfb6b1851057bc14c5e3080792bd3 100644 (file)
var $app_parameter = array();
var $edit_entry = array();
var $enableReleaseManagement = FALSE;
+
public function __construct(&$config, $dn= NULL, $parent= NULL)
{
$this->FAIrelease = "/";
$this->curbase = $this->config->current['BASE'];
$this->reload();
+
+ $this->is_account = FALSE;
+ if(count($this->_get_all_entries()) > 1){
+ $this->is_account= TRUE;
+ }
+ $this->initially_was_account = $this->is_account;
}
/* Call parent execute */
plugin::execute();
+ if (isset($_POST['modify_state'])){
+ $this->is_account = !$this->is_account;
+ }
+
+ /* Do we represent a valid account? */
+ if (!$this->is_account){
+ $display= $this->show_enable_header(_("Add application extension"),
+ _("Application extension disabled. You can enable it by clicking below."));
+ return ($display);
+ }
+
+ $display = $this->show_enable_header(_("Remove application extension"),
+ _("Application extension enabled. You can disable it by clicking below."));
+
+
if(isset($_GET['send'])){
$id = $_GET['send'];
$all = $this->_get_all_entries();
$smarty->assign("folders" , $this->_get_folder_names());
$entries = $this->_get_entries_for_release($this->FAIrelease);
$smarty->assign("entries",$entries);
- $display= $smarty->fetch (get_template_path('app_list.tpl', TRUE, dirname(__FILE__)));
+ $display.= $smarty->fetch (get_template_path('app_list.tpl', TRUE, dirname(__FILE__)));
return($display);
}
function remove_from_parent()
{
+ $ldap = $this->config->get_ldap_link();
+ $ldap->cd($this->dn);
+ $ldap->ls("(|(objectClass=gotoSubmenuEntry)(objectClass=FAIbranch)(objectClass=gotoMenuEntry))",$this->dn,array("*"));
+ $a_remove = array();
+ while($attrs = $ldap->fetch()){
+ $a_remove[] = $attrs['dn'];
+ }
+ foreach($a_remove as $remove){
+ $ldap->rmdir_recursive($remove);
+ show_ldap_error($ldap->get_error(),
+ sprintf(_("Removing of group/application account with dn '%s' failed, could not remove '%s'."),
+ $this->dn,$remove));
+ }
+ $this->_load_menu_structure();
}
-
function check()
{
}
diff --git a/gosa-plugins/goto/admin/groups/apps/edit_entry.tpl b/gosa-plugins/goto/admin/groups/apps/edit_entry.tpl
index bca903086e02998f212ccea99776eb5e90f074ed..4bf183d671c59af8655efa5fddb5560ea7ae5b59 100644 (file)
</td>
<td>
{if $image_set}
- <img src="getbin.php?{$rand}">
+ <img src="getbin.php?{$rand}" alt='{t}Could not load image.{/t}'>
{else}
<i>{t}None{/t}</i>
{/if}