From 0fea430100e63268f0dc313061a713fe114c7c59 Mon Sep 17 00:00:00 2001 From: jim-p Date: Thu, 10 Apr 2014 16:31:57 -0400 Subject: Fix a whole bunch of invalid version tests. --- config/postfix/postfix_about.php | 4 ++-- config/postfix/postfix_queue.php | 4 ++-- config/postfix/postfix_search.php | 4 ++-- config/postfix/postfix_view_config.php | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'config/postfix') diff --git a/config/postfix/postfix_about.php b/config/postfix/postfix_about.php index b7d04d16..87d0cf69 100755 --- a/config/postfix/postfix_about.php +++ b/config/postfix/postfix_about.php @@ -30,8 +30,8 @@ $shortcut_section = "postfix"; require("guiconfig.inc"); -$pfSversion = str_replace("\n", "", file_get_contents("/etc/version")); -if(strstr($pfSversion, "1.2")) +$pf_version=substr(trim(file_get_contents("/etc/version")),0,3); +if ($pf_version < 2.0) $one_two = true; $pgtitle = "Diagnostics: Search Mail"; diff --git a/config/postfix/postfix_queue.php b/config/postfix/postfix_queue.php index bf6e956c..7afd8fe7 100755 --- a/config/postfix/postfix_queue.php +++ b/config/postfix/postfix_queue.php @@ -104,8 +104,8 @@ if ($_REQUEST['cmd']!=""){ get_cmd(); } else{ - $pfSversion = str_replace("\n", "", file_get_contents("/etc/version")); - if(strstr($pfSversion, "1.2")) + $pf_version=substr(trim(file_get_contents("/etc/version")),0,3); + if ($pf_version < 2.0) $one_two = true; $pgtitle = "Status: Postfix Mail Queue"; diff --git a/config/postfix/postfix_search.php b/config/postfix/postfix_search.php index 78d79869..c29d8cf2 100755 --- a/config/postfix/postfix_search.php +++ b/config/postfix/postfix_search.php @@ -34,8 +34,8 @@ $uname=posix_uname(); if ($uname['machine']=='amd64') ini_set('memory_limit', '250M'); -$pfSversion = str_replace("\n", "", file_get_contents("/etc/version")); -if(strstr($pfSversion, "1.2")) +$pf_version=substr(trim(file_get_contents("/etc/version")),0,3); +if ($pf_version < 2.0) $one_two = true; $pgtitle = "Diagnostics: Search Mail"; diff --git a/config/postfix/postfix_view_config.php b/config/postfix/postfix_view_config.php index c3efda53..24bfd575 100644 --- a/config/postfix/postfix_view_config.php +++ b/config/postfix/postfix_view_config.php @@ -57,7 +57,7 @@ if ($_REQUEST['file']!=""){ } else{ $pfSversion = str_replace("\n", "", file_get_contents("/etc/version")); - if(strstr($pfSversion, "1.2")) + if ($pf_version < 2.0) $one_two = true; $pgtitle = "Services: Postfix View Configuration"; -- cgit v1.2.3