# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
+if (defined('S9Y_FRAMEWORK')) {
+ return;
+}
+
+@define('S9Y_FRAMEWORK', true);
+
if (!headers_sent()) {
session_start();
}
define('IN_serendipity', true);
}
-include_once(S9Y_INCLUDE_PATH . 'include/compat.inc.php');
+include(S9Y_INCLUDE_PATH . 'include/compat.inc.php');
// The version string
-$serendipity['version'] = '1.0.1';
-
-// Name of folder for the default theme
-$serendipity['defaultTemplate'] = 'carl_contest';
+$serendipity['version'] = '1.1-beta1';
// Setting this to 'false' will enable debugging output. All alpa/beta/cvs snapshot versions will emit debug information by default. To increase the debug level (to enable Smarty debugging), set this flag to 'debug'.
$serendipity['production'] = (preg_match('@\-(alpha|beta|cvs)@', $serendipity['version']) ? false : true);
$serendipity['fetchLimit'] = 15;
}
+if (!isset($serendipity['RSSfetchLimit'])) {
+ $serendipity['RSSfetchLimit'] = 15;
+}
+
+if (!isset($serendipity['mediaProperties'])) {
+ $serendipity['mediaProperties'] = 'DPI;COPYRIGHT;TITLE;COMMENT1:MULTI;COMMENT2:MULTI';
+}
+
if (!isset($serendipity['use_PEAR'])) {
- $serendipity['use_PEAR'] = false;
+ $serendipity['use_PEAR'] = true;
}
// Should IFRAMEs be used for previewing entries and sending trackbacks?
/* Default language for autodetection */
$serendipity['autolang'] = 'en';
+/* Name of folder for the default theme */
+$serendipity['defaultTemplate'] = 'carl_contest';
+
/* Availiable languages */
$serendipity['languages'] = array('en' => 'English',
'de' => 'German',
'cn' => 'Simplified Chinese (UTF-8)',
'ja' => 'Japanese',
'ko' => 'Korean',
+ 'sa' => 'Arabic',
'ta' => 'Tamil');
/* Available Calendars */
$serendipity['calendars'] = array('gregorian' => 'Gregorian',
- 'jalali-utf8' => 'Jalali (utf8)');
+ 'persian-utf8' => 'Persian (utf8)');
/*
* Load main language file
serendipity_die(sprintf(SERENDIPITY_NOT_INSTALLED, 'serendipity_admin.php'));
}
-// Check whether local or global PEAR should be used. You can put a
-// $serendipity['use_PEAR'] = true;
-// in your serendipity_config_local.inc.php file to enable this.
-// The required PEAR (and other) packages are mentioned in the file
-// bundled-libs/.current_version
-$old_include = @ini_get('include_path');
-if (@ini_set('include_path', $old_include . PATH_SEPARATOR . $serendipity['serendipityPath'] . PATH_SEPARATOR . $serendipity['serendipityPath'] . 'bundled-libs/') && $serendipity['use_PEAR']) {
- @define('S9Y_PEAR', true);
+/* Do the PEAR dance. If $serendipity['use_PEAR'] is set to FALSE, Serendipity will first put its own PEAR include path.
+ By default, a local PEAR will be used. */
+if (function_exists('get_include_path')) {
+ $old_include = @get_include_path();
+} else {
+ $old_include = @ini_get('include_path');
+}
+
+
+$new_include = ($serendipity['use_PEAR'] ? $old_include . PATH_SEPARATOR : '')
+ . S9Y_INCLUDE_PATH . 'bundled-libs/' . PATH_SEPARATOR
+ . S9Y_INCLUDE_PATH . 'bundled-libs/Smarty/libs/' . PATH_SEPARATOR
+ . $serendipity['serendipityPath'] . PATH_SEPARATOR
+ . (!$serendipity['use_PEAR'] ? $old_include . PATH_SEPARATOR : '');
+
+if (function_exists('set_include_path')) {
+ $use_include = @set_include_path($new_include);
+} else {
+ $use_include = @ini_set('include_path', $new_include);
+}
+
+if ($use_include) {
+ @define('S9Y_PEAR', true);
@define('S9Y_PEAR_PATH', '');
} else {
@define('S9Y_PEAR', false);
@define('S9Y_PEAR_PATH', S9Y_INCLUDE_PATH . 'bundled-libs/');
}
+/* PEAR path setup inclusion finished */
if (defined('IN_installer') && IS_installed === false) {
$serendipity['lang'] = $serendipity['autolang'];
$local_config = S9Y_INCLUDE_PATH . '/serendipity_config_local.inc.php';
}
-if (is_readable($local_config)) {
- include_once($local_config);
-} else {
- serendipity_die(sprintf(INCLUDE_ERROR, $local_config));
+if (!is_readable($local_config)) {
+ $serendipity['lang'] = 'en';
+ include(S9Y_INCLUDE_PATH . 'include/lang.inc.php');
+ serendipity_die(sprintf(INCLUDE_ERROR . '<br />' . FILE_CREATE_YOURSELF, $local_config));
}
+include($local_config);
+
define('IS_up2date', version_compare($serendipity['version'], $serendipity['versionInstalled'], '<='));
/*
* Include main functions
*/
-include_once(S9Y_INCLUDE_PATH . 'include/functions.inc.php');
+include(S9Y_INCLUDE_PATH . 'include/functions.inc.php');
-if (serendipity_FUNCTIONS_LOADED!== true) {
- serendipity_die(sprintf(INCLUDE_ERROR, 'include/functions.inc.php'));
+if (serendipity_FUNCTIONS_LOADED !== true) {
+ $serendipity['lang'] = 'en';
+ include(S9Y_INCLUDE_PATH . 'include/lang.inc.php');
+ serendipity_die(sprintf(INCLUDE_ERROR . '<br />' . FILE_CREATE_YOURSELF, 'include/functions.inc.php'));
}
/*
* Attempt to connect to the database
*/
if (!serendipity_db_connect()) {
+ $serendipity['lang'] = 'en';
+ include(S9Y_INCLUDE_PATH . 'include/lang.inc.php');
serendipity_die(DATABASE_ERROR);
}
if (isset($_SESSION['serendipityEmail'])) {
$serendipity['email'] = $_SESSION['serendipityEmail'];
}
-
serendipity_plugin_api::hook_event('frontend_configure', $serendipity);
/* vim: set sts=4 ts=4 expandtab : */