From a638cd0656d26deb0aedff4257b5ec0ba1f636d3 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 13 Nov 2006 12:25:32 +0000 Subject: [PATCH] Added gencd template. Updated Error Msgs from faxreport plugin. Removed setup loop. Added missing is_mac function to functions inc. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5083 594d385d-05f5-0310-b6e9-bd551577e9d8 --- html/setup.php | 2 +- include/functions.inc | 7 +++++++ plugins/admin/systems/class_divListSystem.inc | 2 +- plugins/gofax/faxreports/class_faxreport.inc | 4 ++-- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/html/setup.php b/html/setup.php index 787d709df..aec16d04d 100644 --- a/html/setup.php +++ b/html/setup.php @@ -25,7 +25,7 @@ $_SESSION['DEBUGLEVEL']= 1; if (!isset($_GET['js']) && !isset($_SESSION['js'])){ echo ''; $_SESSION['js']= FALSE; diff --git a/include/functions.inc b/include/functions.inc index 24738534a..dcc5a73ac 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -916,6 +916,13 @@ function is_ip($ip) return preg_match("/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/", $ip); } + +function is_mac($mac) +{ + return preg_match("/^[a-f0-9][a-f0-9]:[a-f0-9][a-f0-9]:[a-f0-9][a-f0-9]:[a-f0-9][a-f0-9]:[a-f0-9][a-f0-9]:[a-f0-9][a-f0-9]$/i", $mac); +} + + /* Checks if the given ip address dosen't match "is_ip" because there is also a sub net mask given */ function is_ip_with_subnetmask($ip) diff --git a/plugins/admin/systems/class_divListSystem.inc b/plugins/admin/systems/class_divListSystem.inc index e4c0e220d..5350eb746 100644 --- a/plugins/admin/systems/class_divListSystem.inc +++ b/plugins/admin/systems/class_divListSystem.inc @@ -52,7 +52,7 @@ class divListSystem extends MultiSelectWindow $this->EnableSaveButton (false); /* Dynamic action col, depending on snapshot icons */ - $action_col_size = 60; + $action_col_size = 70; if($this->parent->snapshotEnabled()){ $action_col_size += 38; } diff --git a/plugins/gofax/faxreports/class_faxreport.inc b/plugins/gofax/faxreports/class_faxreport.inc index 9d5de84cb..b9e4a9bb9 100644 --- a/plugins/gofax/faxreports/class_faxreport.inc +++ b/plugins/gofax/faxreports/class_faxreport.inc @@ -104,7 +104,7 @@ class faxreport extends plugin /* Some checks */ if(!isset($this->config->data['SERVERS']['FAX'])){ - print_red(_("Can't connect to fax database, no reports can be shown!")); + print_red(_("No fax extension defined in your sever configuration, no reports can be shown!")); return($smarty->fetch(get_template_path('contents.tpl', TRUE))); }elseif(!is_callable("mysql_connect")){ print_red(_("There is no mysql extension available, please check your php setup.")); @@ -123,7 +123,7 @@ class faxreport extends plugin } if (! mysql_query("SELECT * FROM faxlog;")){ - print_red(_("Can't select fax database for report generation!")); + print_red(_("Can't query fax table 'faxlog' for report generation!")); return($smarty->fetch(get_template_path('contents.tpl', TRUE))); } } -- 2.30.2