# 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_CONFIG')) {
+ return;
+}
+@define('S9Y_FRAMEWORK_CONFIG', true);
+
/**
* Adds a new author account
*
$author_sql = '';
if (!empty($authorid)) {
$author_sql = "authorid = " . (int)$authorid . " AND ";
+ } elseif (isset($serendipity[$name])) {
+ return $serendipity[$name];
}
$r = serendipity_db_query("SELECT value FROM {$serendipity['dbPrefix']}config WHERE $author_sql name = '" . $name . "' LIMIT 1", true);
global $serendipity;
if ($serendipity['GET']['is_iframe'] && is_array($_SESSION['save_entry'])) {
- include_once S9Y_INCLUDE_PATH . 'include/functions_entries_admin.inc.php';
+ include S9Y_INCLUDE_PATH . 'include/functions_entries_admin.inc.php';
// An iframe may NOT contain <html> and </html> tags, that's why we emit different headers here than on serendipity_admin.php
// We need to restore GET/POST variables to that depending plugins inside the iframe
# 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.1-alpha1';
+$serendipity['version'] = '1.1-alpha2';
// Name of folder for the default theme
$serendipity['defaultTemplate'] = 'carl_contest';
$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'));
}
/*