Use the new check_php_version function everywhere
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 29 Oct 2002 17:26:31 +0000 (17:26 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 29 Oct 2002 17:26:31 +0000 (17:26 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4062 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/mime.php
functions/options.php
functions/page_header.php
plugins/bug_report/setup.php
plugins/delete_move_next/setup.php
plugins/mail_fetch/setup.php
plugins/sent_subfolders/setup.php
plugins/squirrelspell/sqspell_config.php
plugins/squirrelspell/sqspell_functions.php

index 00e00219c0f625680cc06e98182a2ef4f02a8636..dbd1bbd5606c8c75b37f8690368c0c0cf4f52149 100644 (file)
@@ -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'])) {
index 1828271598096f724798f3f91bcfcffaeec97ab8..5bdedadb0eee282d31ad0f8a576dba2f2091c4ad 100644 (file)
@@ -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;
index 227c857582349729bc1710cff076ad4c7b7e2283..db7ecee93611259f971e73a7a63079c8062b33c0 100644 (file)
@@ -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;
     }
 
index 7c9ed9ac7e528d314af6f7ac5f7ffeb2c7f236bb..67cd1806d289b1806968a5b274625d02c8537667 100644 (file)
@@ -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;
     }
  
index 59ecf4e41a70249d5e5a0861af9c57dc9b19aa67..96dbd142f581aba17dd73d8e891c0dfda05cc86b 100644 (file)
@@ -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;
     }
 
index 27e70a1bfb58e5c161bd2e14bbdc43a324cdf6ca..7842e5b429f610ca31285a6aaa00d0b5f6f6e708 100644 (file)
@@ -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'];
index c8dba2e5fd3484565a58df4af0762353c9571bc0..6598a3d4002521e6874a09fb5ea827e9519a5ded 100644 (file)
@@ -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'];
index 8d2fedce8c11d45774a62cdb630ba693f939eb50..6bd24bcceb4c8be8abc24b1657e053bdc1f6fd8b 100644 (file)
@@ -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;
 }
 
index a3acfeb0400f681f74845a22681d64f403ae4b77..9d2dfdaa16fc751301bb62820942e31e470fdb2d 100644 (file)
@@ -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'])) {