Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29698
Modified Files:
serendipity_functions_installer.inc.php
Log Message:
* Better detection of serendipityPath variable
Index: serendipity_functions_installer.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions_installer.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- serendipity_functions_installer.inc.php 13 Apr 2004 06:50:17 -0000 1.6
+++ serendipity_functions_installer.inc.php 13 Apr 2004 10:55:07 -0000 1.7
@@ -43,7 +43,13 @@
switch ($optname) {
case 'serendipityPath':
- return $_SERVER['DOCUMENT_ROOT'] . rtrim(dirname($_SERVER['PHP_SELF']), '/') . '/';
+ $test_path1 = $_SERVER['DOCUMENT_ROOT'] . rtrim(dirname($_SERVER['PHP_SELF']), '/') . '/';
+ $test_path2 = dirname(__FILE__);
+ if (file_exists($test_path . 'serendipity_entries.php')) {
+ return $test_path1;
+ } else {
+ return $test_path2;
+ }
case 'serendipityHTTPPath':
return rtrim(dirname($_SERVER['PHP_SELF']), '/') .'/';
@@ -629,4 +635,4 @@
return true;
}
}
-?>
\ No newline at end of file
+?>
|