$_SERVER['PHP_SELF'] = strip_tags($_SERVER['PHP_SELF']);
-/* returns true if current php version is at mimimum a.b.c */
+/**
+ * returns true if current php version is at mimimum a.b.c
+ *
+ * Called: check_php_version(4,1)
+ */
function check_php_version ($a = '0', $b = '0', $c = '0')
{
global $SQ_PHP_VERSION;
-
+
if(!isset($SQ_PHP_VERSION))
$SQ_PHP_VERSION = substr( str_pad( preg_replace('/\D/','', PHP_VERSION), 3, '0'), 0, 3);
return $SQ_PHP_VERSION >= ($a.$b.$c);
}
+/**
+ * returns true if the current internal SM version is at minimum a.b.c
+ * These are plain integer comparisons, as our internal version is
+ * constructed by us, as an array of 3 ints.
+ *
+ * Called: check_sm_version(1,3,3)
+ */
+function check_sm_version($a = 0, $b = 0, $c = 0)
+{
+ global $SQM_INTERNAL_VERSION;
+ if ( !isset($SQM_INTERNAL_VERSION) ||
+ $SQM_INTERNAL_VERSION[0] < $a ||
+ $SQM_INTERNAL_VERSION[1] < $b ||
+ ( $SQM_INTERNAL_VERSION[1] == $b &&
+ $SQM_INTERNAL_VERSION[2] < $c ) ) {
+ return FALSE;
+ }
+ return TRUE;
+}
+
+
/* recursively strip slashes from the values of an array */
function sqstripslashes(&$array) {
if(count($array) > 0) {
global $version;
$version = '1.3.3 [CVS-DEVEL]';
+/**
+ * SquirrelMail internal version number -- DO NOT CHANGE
+ * $sm_internal_version = array (release, major, minor)
+ */
+//global $SQM_INTERNAL_VERSION;
+//$SQM_INTERNAL_VERSION = array(1,3,3);
+
+
/**
* Wraps text at $wrap characters
*