Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6493
Modified Files:
compat.php NEWS
Log Message:
pre PHP 4.3.0 compatibility
Index: NEWS
===================================================================
RCS file: /cvsroot/php-blog/serendipity/NEWS,v
retrieving revision 1.130
retrieving revision 1.131
diff -u -d -r1.130 -r1.131
--- NEWS 25 May 2004 09:57:51 -0000 1.130
+++ NEWS 25 May 2004 11:02:19 -0000 1.131
@@ -3,6 +3,8 @@
Version 0.7 ()
------------------------------------------------------------------------
+ * PHP pre-4.3.0 compatibility: Define PATH_SEPARATOR if not available
+
* Upgraded PEAR::Text_Wiki and serendipity_event_textwiki plugin.
Configuration options for wiki rules, options to use wiki/freelinks.
(Tobias Schlitt)
Index: compat.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/compat.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- compat.php 24 May 2004 10:42:53 -0000 1.17
+++ compat.php 25 May 2004 11:02:19 -0000 1.18
@@ -1,6 +1,22 @@
<?php # $Id$
$serendipity = array();
+if (!defined('PATH_SEPARATOR')) {
+ if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
+ define('PATH_SEPARATOR', ';');
+ } else {
+ define('PATH_SEPARATOR', ':');
+ }
+}
+
+if (!defined('DIRECTORY_SEPARATOR')) {
+ if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
+ define('DIRECTORY_SEPARATOR', '\\');
+ } else {
+ define('DIRECTORY_SEPARATOR', '/');
+ }
+}
+
if (!function_exists('file_get_contents')) {
function file_get_contents($filename, $use_include_path = 0) {
$file = fopen($filename, 'rb', $use_include_path);
|