# Serendipity is provided in managed mode here
#@define('S9Y_INCLUDE_PATH', 's9y/');
+@define('S9Y_DATA_PATH', dirname( __FILE__)."/");
require_once 's9y/serendipity_config.inc.php';
/* vim: set sts=4 ts=4 expandtab : */
?>
# $Id$
-Version 1.0 ()
+Version 1.0-beta1 (January 23rd, 2006)
------------------------------------------------------------------------
+ * Apply changes to shared installation directory detection so that
+ it also works with Apache's mod_userdir (elf2000)
+
* Fix some problems with sending UTF-8 emails on some systems. Allow
Plugin API to handle the whole mailflow optionally.
(garvinhicking)
define('S9Y_I_ERROR', -1);
define('S9Y_I_WARNING', 0);
define('S9Y_I_SUCCESS', 1);
-$basedir = serendipity_query_default('serendipityPath', false);
+
+if (defined('S9Y_DATA_PATH')) {
+ // Shared installation. S9Y_INCLUDE_PATH points to repository,
+ // S9Y_DATA_PATH points to the local directory.
+ $basedir = S9Y_DATA_PATH;
+} else {
+ // Usual installation within DOCUMENT_ROOT.
+ $basedir = serendipity_query_default('serendipityPath', false);
+}
/**
* Checks a return code constant if it's successfull or an error and return HTML code
// highlight_string(var_export($sql, 1));
+ if (!is_resource($serendipity['dbConn'])) {
+ return false;
+ }
+
if ($expectError) {
$c = @mysql_query($sql, $serendipity['dbConn']);
} else {
$test_path2 = serendipity_getRealDir(__FILE__);
if (file_exists($test_path1 . 'serendipity_admin.php')) {
return $test_path1;
+ } elseif (defined('S9Y_DATA_PATH')) {
+ // Shared installation!
+ return S9Y_DATA_PATH;
} else {
return $test_path2;
}
<?php # $Id$
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
+# Translation by Nightly <nightly@reys.net>
/* vim: set sts=4 ts=4 expandtab : */
@define('LANG_CHARSET', 'utf-8');
include_once(S9Y_INCLUDE_PATH . 'include/compat.inc.php');
// The version string
-$serendipity['version'] = '1.0-alpha2';
+$serendipity['version'] = '1.0-beta1';
// Name of folder for the default theme
$serendipity['defaultTemplate'] = 'default';
$local_config = $_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . '/serendipity_config_local.inc.php';
} elseif (file_exists($serendipity['serendipityPath'] . '/serendipity_config_local.inc.php')) {
$local_config = $serendipity['serendipityPath'] . '/serendipity_config_local.inc.php';
+} elseif (is_defined('S9Y_DATA_PATH')) {
+ // Shared installation!
+ $local_config = S9Y_DATA_PATH . '/serendipity_config_local.inc.php';
} else {
+ // Installation fallback
$local_config = S9Y_INCLUDE_PATH . '/serendipity_config_local.inc.php';
}