From 318be34d9cbeaff240d4744556de36c83df6919d Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 18 Oct 2007 12:11:45 +0000 Subject: [PATCH] Fixed handling for newly created macros. If save failed, the cn field wasn't editalbe anymore. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7592 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/gofon/macro/class_gofonMacro.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/gofon/macro/class_gofonMacro.inc b/plugins/gofon/macro/class_gofonMacro.inc index 3f64f6ab4..a7a8a6c13 100755 --- a/plugins/gofon/macro/class_gofonMacro.inc +++ b/plugins/gofon/macro/class_gofonMacro.inc @@ -42,6 +42,8 @@ class macro extends plugin var $goFonHomeServers = array(); // Contains all available asterisk database server + var $is_new = FALSE; + //! The Konstructor /*! Konstructor, load class with attributes of the given dn*/ function macro ($config, $dn= NULL, $parent= NULL) @@ -53,6 +55,7 @@ class macro extends plugin /* Edit or new one ?*/ if ($this->dn == "new"){ + $this->is_new = TRUE; if(isset($_SESSION['CurrentMainBase'])){ $this->base = $_SESSION['CurrentMainBase']; }else{ @@ -339,7 +342,7 @@ class macro extends plugin plugin::save_object(); /* The cn can't be changed if this entry is not new */ - if($this->dn!= "new"){ + if(!$this->is_new){ $this->cn = $this->orig_cn; } -- 2.30.2