From 51e3aa1162da79954964c3ee6f6faaa58c3f9926 Mon Sep 17 00:00:00 2001 From: tomash Date: Wed, 29 Mar 2006 13:53:24 +0000 Subject: [PATCH] #1645 fix - missing function in PHP4 --- livesupport/src/modules/storageServer/var/conf.php | 12 ++++++++++++ .../modules/storageServer/var/xmlrpc/xrLocStor.php | 1 - 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/livesupport/src/modules/storageServer/var/conf.php b/livesupport/src/modules/storageServer/var/conf.php index 1d477ee82..d0a49bd6d 100644 --- a/livesupport/src/modules/storageServer/var/conf.php +++ b/livesupport/src/modules/storageServer/var/conf.php @@ -34,6 +34,7 @@ */ define('LS_VERSION', '1.1'); +define('PHP5', version_compare( phpversion(), "5.0.0", ">=" )); /** * configuration structure: @@ -168,4 +169,15 @@ if(!is_null($this_file)){ } } +if(!PHP5){ + eval(' + define("FILE_APPEND", TRUE); + function file_put_contents($f, $s, $ap=FALSE){ + $fp=fopen($f, $ap==FILE_APPEND ? "a" : "w"); + fwrite($fp,$s); + fclose($fp); + } +'); +} + ?> diff --git a/livesupport/src/modules/storageServer/var/xmlrpc/xrLocStor.php b/livesupport/src/modules/storageServer/var/xmlrpc/xrLocStor.php index 01f403d2c..fcff16716 100644 --- a/livesupport/src/modules/storageServer/var/xmlrpc/xrLocStor.php +++ b/livesupport/src/modules/storageServer/var/xmlrpc/xrLocStor.php @@ -27,7 +27,6 @@ Location : $URL$ ------------------------------------------------------------------------------*/ -define('PHP5', version_compare( phpversion(), "5.0.0", ">=" )); /* ====================================================== specific PHP config */ //error_reporting(0);