From e83abc9363a3d11bcb2b787b4953fbf2f18c91f0 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 19 Apr 2007 06:52:34 +0000 Subject: [PATCH] Updated macro class. Added check -> Empty macros can't be saved. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6107 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/gofon/macro/class_gofonMacro.inc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/gofon/macro/class_gofonMacro.inc b/plugins/gofon/macro/class_gofonMacro.inc index 4c3c40a8f..cbcc99951 100755 --- a/plugins/gofon/macro/class_gofonMacro.inc +++ b/plugins/gofon/macro/class_gofonMacro.inc @@ -340,6 +340,7 @@ class macro extends plugin $res = @mysql_query($query,$r_con); if(!$res){ gosa_log(@mysql_error($r_con)); + gosa_log($query); return(sprintf(_("Insert of new macro failed for server '%s'."),$cfg['SERVER'])); } @mysql_close($r_con); @@ -444,6 +445,10 @@ class macro extends plugin $message[] = _("Makro length must be lower than 100 lines"); } + /* Macro content must be smaller than 100 lines */ + if(empty($this->goFonMacroContent)){ + $message[] = _("You can't save an empty macro."); + } return $message; } -- 2.30.2