From 0cd6ab53b4d2be1fd86ec27d355a3a21959f0eea Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 29 Apr 2007 15:13:54 +0000 Subject: [PATCH] worked around stupid php5.2 empty haystack warnings --- setup/admin_account.php | 8 ++++---- setup/check_install.php | 2 +- setup/setup-cli.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/setup/admin_account.php b/setup/admin_account.php index 9268fafad0..f06539e5ee 100644 --- a/setup/admin_account.php +++ b/setup/admin_account.php @@ -10,7 +10,7 @@ * @version $Id$ */ - if (!strstr($_SERVER['PHP_SELF'],'setup-cli.php')) + if (strpos($_SERVER['PHP_SELF'],'setup-cli.php') === false) { $GLOBALS['egw_info'] = array( 'flags' => array( @@ -114,7 +114,7 @@ if (!$defaultgroupid || !$admingroupid) { - if (strstr($_SERVER['PHP_SELF'],'setup-cli.php')) + if (strpos($_SERVER['PHP_SELF'],'setup-cli.php') !== false) { return 42; //lang('Error in group-creation !!!'); // dont exit on setup-cli } @@ -201,7 +201,7 @@ $accountid = $GLOBALS['egw_setup']->add_account($username,$fname,$lname,$passwd,'Admins',True,$email); if (!$accountid) { - if (strstr($_SERVER['PHP_SELF'],'setup-cli.php')) + if (strpos($_SERVER['PHP_SELF'],'setup-cli.php') !== false) { return 41; //lang('Error in admin-creation !!!'); // dont exit on setup-cli } @@ -214,7 +214,7 @@ $GLOBALS['egw_setup']->db->transaction_commit(); - if (!strstr($_SERVER['PHP_SELF'],'setup-cli.php')) + if (strpos($_SERVER['PHP_SELF'],'setup-cli.php') === false) { Header('Location: index.php'); } diff --git a/setup/check_install.php b/setup/check_install.php index 7352d209df..2288361818 100644 --- a/setup/check_install.php +++ b/setup/check_install.php @@ -465,7 +465,7 @@ // add a ../ for non-absolute pathes $rel_name = $name; - if (substr($name,0,3) != '../' && $name{0} != '/' && $name{0} != '\\' && strstr($name,':') === false) + if (substr($name,0,3) != '../' && $name{0} != '/' && $name{0} != '\\' && strpos($name,':') === false) { $name = '../'.$name; } diff --git a/setup/setup-cli.php b/setup/setup-cli.php index b681099d3f..e398f80376 100755 --- a/setup/setup-cli.php +++ b/setup/setup-cli.php @@ -815,7 +815,7 @@ function _set_value(&$arr,$index,$name,$value) { $var =& $var[$name]; } - $var = strstr($name,'passw') ? md5($value) : $value; + $var = strpos($name,'passw') !== false ? md5($value) : $value; } /**