From fb69468112601468596fa23e00f247ac622f7770 Mon Sep 17 00:00:00 2001 From: kink Date: Tue, 29 Oct 2002 17:26:31 +0000 Subject: [PATCH] Use the new check_php_version function everywhere git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4062 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mime.php | 2 +- functions/options.php | 2 +- functions/page_header.php | 6 +++--- plugins/bug_report/setup.php | 2 +- plugins/delete_move_next/setup.php | 8 ++++---- plugins/mail_fetch/setup.php | 4 ++-- plugins/sent_subfolders/setup.php | 6 +++--- plugins/squirrelspell/sqspell_config.php | 2 +- plugins/squirrelspell/sqspell_functions.php | 2 +- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/functions/mime.php b/functions/mime.php index 00e00219..dbd1bbd5 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -325,7 +325,7 @@ function formatBody($imap_stream, $message, $color, $wrap_at, $ent_num, $id, $ma global $startMessage, $username, $key, $imapServerAddress, $imapPort, $show_html_default, $has_unsafe_images, $sort; - if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) { + if ( !check_php_version(4,1) ) { global $_GET; } if(isset($_GET['view_unsafe_images'])) { diff --git a/functions/options.php b/functions/options.php index 18282715..5bdedadb 100644 --- a/functions/options.php +++ b/functions/options.php @@ -330,7 +330,7 @@ class SquirrelOption { } function save_option($option) { - if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) { + if ( !check_php_version(4,1) ) { global $_SESSION; } global $data_dir; diff --git a/functions/page_header.php b/functions/page_header.php index 227c8575..db7ecee9 100644 --- a/functions/page_header.php +++ b/functions/page_header.php @@ -19,7 +19,7 @@ require_once(SM_PATH . 'functions/global.php'); /* Always set up the language before calling these functions */ function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE ) { - if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) { + if ( !check_php_version(4,1) ) { global $_SESSION; } if (isset($_SESSION['base_uri'])) { @@ -68,7 +68,7 @@ ECHO; function displayInternalLink($path, $text, $target='') { - if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) { + if ( !check_php_version(4,1) ) { global $_SESSION; } @@ -85,7 +85,7 @@ function displayPageHeader($color, $mailbox, $xtra='', $session=false) { $compose_new_win, $username, $datadir, $compose_width, $compose_height, $attachemessages, $provider_name, $provider_uri; - if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) { + if ( !check_php_version(4,1) ) { global $_SESSION; } diff --git a/plugins/bug_report/setup.php b/plugins/bug_report/setup.php index 7c9ed9ac..67cd1806 100644 --- a/plugins/bug_report/setup.php +++ b/plugins/bug_report/setup.php @@ -42,7 +42,7 @@ function bug_report_button() { function bug_report_save() { global $username,$data_dir; - if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) { + if ( !check_php_version(4,1) ) { global $_POST; } diff --git a/plugins/delete_move_next/setup.php b/plugins/delete_move_next/setup.php index 59ecf4e4..96dbd142 100644 --- a/plugins/delete_move_next/setup.php +++ b/plugins/delete_move_next/setup.php @@ -111,7 +111,7 @@ function delete_move_next_action() { global $PHP_SELF; - if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) { + if ( !check_php_version(4,1) ) { global $_GET, $_POST; } @@ -277,7 +277,7 @@ function delete_move_next_moveRightMainForm() { function delete_move_next_delete() { global $imapConnection, $auto_expunge; - if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) { + if ( !check_php_version(4,1) ) { global $_GET; } @@ -294,7 +294,7 @@ function delete_move_next_delete() { function delete_move_next_move() { global $imapConnection, $mailbox; - if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) { + if ( !check_php_version(4,1) ) { global $_POST; } @@ -349,7 +349,7 @@ function delete_move_next_display_save() { global $username,$data_dir; - if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) { + if ( !check_php_version(4,1) ) { global $_POST; } diff --git a/plugins/mail_fetch/setup.php b/plugins/mail_fetch/setup.php index 27e70a1b..7842e5b4 100644 --- a/plugins/mail_fetch/setup.php +++ b/plugins/mail_fetch/setup.php @@ -39,7 +39,7 @@ global $mailfetch_server_,$mailfetch_alias_,$mailfetch_user_,$mailfetch_pass_; global $mailfetch_lmos_, $mailfetch_uidl_, $mailfetch_login_, $mailfetch_fref_; global $PHP_SELF; - if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) { + if ( !check_php_version(4,1) ) { global $_SESSION; } $username = $_SESSION['username']; @@ -70,7 +70,7 @@ require_once (SM_PATH . 'plugins/mail_fetch/functions.php'); global $data_dir, $imapServerAddress, $imapPort; - if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) { + if ( !check_php_version(4,1) ) { global $_SESSION, $_COOKIE; } $username = $_SESSION['username']; diff --git a/plugins/sent_subfolders/setup.php b/plugins/sent_subfolders/setup.php index c8dba2e5..6598a3d4 100644 --- a/plugins/sent_subfolders/setup.php +++ b/plugins/sent_subfolders/setup.php @@ -49,7 +49,7 @@ function squirrelmail_plugin_init_sent_subfolders() { function sent_subfolders_check_handleAsSent() { global $handleAsSent_result, $sent_subfolders_base, $use_sent_subfolders; - if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) { + if ( !check_php_version(4,1) ) { global $_SESSION; } $sent_subfolders_base = 'INBOX.Sent'; @@ -88,7 +88,7 @@ function sent_subfolders_load_prefs() { function sent_subfolders_optpage_loadhook_folders() { global $optpage_data, $imapServerAddress, $imapPort; - if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) { + if ( !check_php_version(4,1) ) { global $_SESSION, $_COOKIE; } $username = $_SESSION['username']; @@ -159,7 +159,7 @@ function sent_subfolders_update_sentfolder() { global $data_dir, $imapServerAddress, $imapPort; global $use_sent_subfolders, $move_to_sent, $imap_server_type; - if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) { + if ( !check_php_version(4,1) ) { global $_SESSION, $_COOKIE; } $username = $_SESSION['username']; diff --git a/plugins/squirrelspell/sqspell_config.php b/plugins/squirrelspell/sqspell_config.php index 8d2fedce..6bd24bcc 100644 --- a/plugins/squirrelspell/sqspell_config.php +++ b/plugins/squirrelspell/sqspell_config.php @@ -15,7 +15,7 @@ require_once(SM_PATH . 'functions/prefs.php'); /* Just for poor wretched souls with E_ALL. :) */ global $data_dir; -if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) { +if ( !check_php_version(4,1) ) { global $_SESSION; } diff --git a/plugins/squirrelspell/sqspell_functions.php b/plugins/squirrelspell/sqspell_functions.php index a3acfeb0..9d2dfdaa 100644 --- a/plugins/squirrelspell/sqspell_functions.php +++ b/plugins/squirrelspell/sqspell_functions.php @@ -28,7 +28,7 @@ function sqspell_makePage($title, $scriptsrc, $body){ global $color, $SQSPELL_VERSION; - if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) { + if ( !check_php_version(4,1) ) { global $_GET; } if (isset($_GET['MOD'])) { -- 2.25.1