]> git.mjollnir.org Git - s9y.git/commitdiff
shared install changes for mod_userdir, beta prepare
authorgarvinhicking <garvinhicking>
Mon, 23 Jan 2006 09:46:13 +0000 (09:46 +0000)
committergarvinhicking <garvinhicking>
Mon, 23 Jan 2006 09:46:13 +0000 (09:46 +0000)
deployment/serendipity_config.inc.php
docs/NEWS
include/admin/installer.inc.php
include/db/mysql.inc.php
include/functions_installer.inc.php
lang/serendipity_lang_ru.inc.php
serendipity_config.inc.php

index 6cb468f4665269a5e7b0cbc0a4e45f4f0c72d88c..506f4cf1ea90a86783c21b1ec11006dfb696a1f6 100644 (file)
@@ -4,6 +4,7 @@
 # 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 : */
 ?>
index 60679b82f051765231bb31c7adc2a9cc447047ff..15d69f6ec66d9bd9428a3ff1d2f1890db0e58956 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -1,8 +1,11 @@
 # $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)
index 84763ddec0ef24bed2634b8ba5a2a1836689ebcf..2a903119688e5b70fde8f005f78bc14057bd28f4 100644 (file)
@@ -9,7 +9,15 @@ $umask = 0775;
 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
index ea7dadc34424ade09d636783e88ec42d37e67fc6..f65658d5d892ea7c9888a1b7f28822e1cc00781c 100644 (file)
@@ -70,6 +70,10 @@ function &serendipity_db_query($sql, $single = false, $result_type = "both", $re
 
     // highlight_string(var_export($sql, 1));
 
+    if (!is_resource($serendipity['dbConn'])) {
+        return false;
+    }
+
     if ($expectError) {
         $c = @mysql_query($sql, $serendipity['dbConn']);
     } else {
index 057fa35c622c3ed1ad39a7676184e6f4fdbfd0e5..2cf87e988d4e0f2963a48e2e2b57acf275aaaf8f 100644 (file)
@@ -179,6 +179,9 @@ function serendipity_query_default($optname, $default, $usertemplate = false, $t
             $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;
             }
index 6e25d0b08a9b2b8f75d287d8af5e8d3c42f9d500..b1c5d654e2ae7ac94cef82d66a47c002fd76707a 100644 (file)
@@ -1,6 +1,7 @@
 <?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');
index 73b387395a328c45f570081356bd1406745cf881..a25ce960847e03c85f71c1a48a7dd6a65e95adec 100644 (file)
@@ -21,7 +21,7 @@ if (IS_installed === true && !defined('IN_serendipity')) {
 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';
@@ -162,7 +162,11 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . '/se
     $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';
 }