From 059078cb4a41b2bfa28d9054ea798bb28014baeb Mon Sep 17 00:00:00 2001
From: cajus
Date: Fri, 19 Aug 2005 09:14:50 +0000
Subject: [PATCH] Started with removing forced dependency of parent class
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1185 594d385d-05f5-0310-b6e9-bd551577e9d8
---
.../gofon/phoneaccount/class_phoneAccount.inc | 39 +++++++------------
plugins/gofon/phoneaccount/main.inc | 1 +
2 files changed, 15 insertions(+), 25 deletions(-)
diff --git a/plugins/gofon/phoneaccount/class_phoneAccount.inc b/plugins/gofon/phoneaccount/class_phoneAccount.inc
index 2f6e55305..dfb346ca3 100644
--- a/plugins/gofon/phoneaccount/class_phoneAccount.inc
+++ b/plugins/gofon/phoneaccount/class_phoneAccount.inc
@@ -82,10 +82,6 @@ class phoneAccount extends plugin
}
- /* Prepare templating */
- $smarty= get_smarty();
-
-
/* Perform search, to get Macro Parameters,Name,Dn,Displayname etc*/
$ldap->search("(objectClass=goFonMacro)", array("*"));
@@ -187,8 +183,6 @@ class phoneAccount extends plugin
}
-
-
// Generate MySQL Syntax
function generate_mysql_entension_entries($save = false){
@@ -463,29 +457,24 @@ class phoneAccount extends plugin
}
-
-
-
-
-
-
-
-
-
-
-
-
function execute()
{
+ /* Do we represent a valid account? */
+ if (!$this->is_account && $this->parent == NULL){
+ $display= " ".
+ _("This account has no phone extensions.")."";
+ $display.= back_to_main();
+ return ($display);
+ }
/* force postmodify event, to restart phones */
+ if ($this->parent != NULL){
+ $this->parent->by_object['user']->is_modified=TRUE;
+ $this->is_modified= TRUE;
- $this->parent->by_object['user']->is_modified=TRUE;
- $this->is_modified=TRUE;
-
- $this->uid = $this->parent->by_object['user']->uid;
- $this->cn = $this->parent->by_object['user']->cn;
-
+ $this->uid = $this->parent->by_object['user']->uid;
+ $this->cn = $this->parent->by_object['user']->cn;
+ }
/* Do we need to flip is_account state? */
if (isset($_POST['modify_state'])){
@@ -499,7 +488,7 @@ class phoneAccount extends plugin
/* tell user that the pluging selected is no longer available*/
if((!$this->macrostillavailable)&&($this->macro!="none")){
- print_red(_("The macro you selected in the past, is no longer available for you, please choose another one."));
+ print_red(_("The macro you selected, is no longer available for you, please choose another one."));
}
/* Prepare templating */
diff --git a/plugins/gofon/phoneaccount/main.inc b/plugins/gofon/phoneaccount/main.inc
index a25c5b9df..19bc2be78 100644
--- a/plugins/gofon/phoneaccount/main.inc
+++ b/plugins/gofon/phoneaccount/main.inc
@@ -114,6 +114,7 @@ if (!$remove_lock){
$display.= "\n";
}
$display.= "
\n";
+ $display.= "\n";
}
/* Page header*/
--
2.30.2