]> git.mjollnir.org Git - s9y.git/commitdiff
Commit some code changes; include_once vs. include.
authorgarvinhicking <garvinhicking>
Thu, 6 Apr 2006 09:14:11 +0000 (09:14 +0000)
committergarvinhicking <garvinhicking>
Thu, 6 Apr 2006 09:14:11 +0000 (09:14 +0000)
Define framework constants.

28 files changed:
comment.php
docs/NEWS
exit.php
include/compat.inc.php
include/db/db.inc.php
include/functions.inc.php
include/functions_calendars.inc.php
include/functions_comments.inc.php
include/functions_entries.inc.php
include/functions_entries_admin.inc.php
include/functions_images.inc.php
include/functions_installer.inc.php
include/functions_permalinks.inc.php
include/functions_plugins_admin.inc.php
include/functions_rss.inc.php
include/functions_trackbacks.inc.php
include/functions_upgrader.inc.php
include/genpage.inc.php
include/lang.inc.php
include/plugin_api.inc.php
index.php
rss.php
serendipity.css.php
serendipity_admin.php
serendipity_define.js.php
serendipity_xmlrpc.php
sql/db.sql
wfwcomment.php

index f849e142f6741ca69d930eca45851513849192f8..2aa7502fdb3f36beb53aa4d1c430ee7901cd1fe1 100644 (file)
@@ -2,8 +2,8 @@
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 
-include_once('serendipity_config.inc.php');
-include_once S9Y_INCLUDE_PATH . 'include/functions_entries_admin.inc.php';
+include('serendipity_config.inc.php');
+include S9Y_INCLUDE_PATH . 'include/functions_entries_admin.inc.php';
 
 header('Content-Type: text/html; charset=' . LANG_CHARSET);
 
index 1ebda64096116a0c0a8d590e327481d942d1fd27..4fc4d47b9081f83f9ccd3ff7b99f6c3b4cd00915 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -3,10 +3,14 @@
 Version 1.1-alpha1()
 ------------------------------------------------------------------------
 
+   * Create a new index on the plugin DB table, optimize fetching config
+     values for plugins. Load language file when permissions could not
+     allow reading the config file. (garvinhicking)
+
    * Fix blocking site during file requests by writing session data to
      disk. Thanks to jgoerzen! (garvinhicking)
 
-   * Make categories sidebar plugin able to only show categories 
+   * Make categories sidebar plugin able to only show categories
      readable for logged in user (garvinhicking)
 
    * Fix getting multiple images for directories that were put into
@@ -53,7 +57,7 @@ Version 1.0 ()
 
    * Fix UTF-8 encoding of $i18n_filename_* variables for building
      permalinks (Bug #1461754, Thanks to Kim Sullivan) (garvinhicking)
-     
+
    * Fix messing up comment count when deleting a trackback from admin
      panel (garvinhicking)
 
index b3554fc05efc4827a551ea8d4bc8c93d7cbd6c8e..98c5c8e939c20c7909f704b153d741e590823a50 100644 (file)
--- a/exit.php
+++ b/exit.php
@@ -2,7 +2,7 @@
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 
-include_once 'serendipity_config.inc.php';
+include 'serendipity_config.inc.php';
 
 $url      = $serendipity['baseURL'];
 
index 4f380b85c6e65d2fac4aaaf9ed77e8c485a5a906..cf79b9ec3ab94ba89501c09434a5a0f8c65b88c5 100644 (file)
@@ -2,6 +2,11 @@
 # 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_COMPAT')) {
+    return;
+}
+@define('S9Y_FRAMEWORK_COMPAT', true);
+
 $serendipity = array();
 @ini_set('magic_quotes_runtime', 'off');
 
@@ -235,7 +240,7 @@ function serendipity_detectLang($use_include = false) {
             $preferred_language = strtolower(preg_replace('@^([^\-_;]*)_?.*$@', '\1', $lang));
             if (in_array($preferred_language, $supported_languages)) {
                 if ($use_include) {
-                    @include_once(S9Y_INCLUDE_PATH . 'lang/' . $charset . 'serendipity_lang_' . $preferred_language . '.inc.php');
+                    @include(S9Y_INCLUDE_PATH . 'lang/' . $charset . 'serendipity_lang_' . $preferred_language . '.inc.php');
                     $serendipity['autolang'] = $preferred_language;
                 }
                 return $preferred_language;
index c891c401aef4853af1c3d6e88b21426d03081c22..7dd278309da6560926a09969844a14fb8405a5c2 100644 (file)
@@ -2,7 +2,12 @@
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 
-if (@include_once(S9Y_INCLUDE_PATH . "include/db/{$serendipity['dbType']}.inc.php")) {
+if (defined('S9Y_FRAMEWORK_DB')) {
+    return;
+}
+@define('S9Y_FRAMEWORK_DB', true);
+
+if (@include(S9Y_INCLUDE_PATH . "include/db/{$serendipity['dbType']}.inc.php")) {
     @define('S9Y_DB_INCLUDED', TRUE);
 }
 
index 1d0529a58ee0088adc72f434ddf889deeabaf2c0..eb9382d83e81ef87cdd464a283673ce256f14e22 100644 (file)
@@ -2,18 +2,42 @@
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 
-$serendipity['imageList'] = array();
-include_once(S9Y_INCLUDE_PATH . "include/db/db.inc.php");
-include_once(S9Y_INCLUDE_PATH . "include/compat.inc.php");
-include_once(S9Y_INCLUDE_PATH . "include/functions_config.inc.php");
-include_once(S9Y_INCLUDE_PATH . "include/plugin_api.inc.php");
-include_once(S9Y_INCLUDE_PATH . "include/functions_images.inc.php");
-include_once(S9Y_INCLUDE_PATH . "include/functions_installer.inc.php");
-include_once(S9Y_INCLUDE_PATH . "include/functions_entries.inc.php");
-include_once(S9Y_INCLUDE_PATH . "include/functions_comments.inc.php");
-include_once(S9Y_INCLUDE_PATH . "include/functions_permalinks.inc.php");
-include_once(S9Y_INCLUDE_PATH . "include/functions_smarty.inc.php");
+if (defined('S9Y_FRAMEWORK_FUNCTIONS')) {
+    return;
+}
+@define('S9Y_FRAMEWORK_FUNCTIONS', true);
 
+$serendipity['imageList'] = array();
+if (!defined('S9Y_FRAMEWORK_DB')) {
+    include(S9Y_INCLUDE_PATH . "include/db/db.inc.php");
+}
+if (!defined('S9Y_FRAMEWORK_COMPAT')) {
+    include(S9Y_INCLUDE_PATH . "include/compat.inc.php");
+}
+if (!defined('S9Y_FRAMEWORK_CONFIG')) {
+    include(S9Y_INCLUDE_PATH . "include/functions_config.inc.php");
+}
+if (!defined('S9Y_FRAMEWORK_PLUGIN_API')) {
+    include(S9Y_INCLUDE_PATH . "include/plugin_api.inc.php");
+}
+if (!defined('S9Y_FRAMEWORK_IMAGES')) {
+    include(S9Y_INCLUDE_PATH . "include/functions_images.inc.php");
+}
+if (!defined('S9Y_FRAMEWORK_INSTALLER')) {
+    include(S9Y_INCLUDE_PATH . "include/functions_installer.inc.php");
+}
+if (!defined('S9Y_FRAMEWORK_ENTRIES')) {
+    include(S9Y_INCLUDE_PATH . "include/functions_entries.inc.php");
+}
+if (!defined('S9Y_FRAMEWORK_COMMENTS')) {
+    include(S9Y_INCLUDE_PATH . "include/functions_comments.inc.php");
+}
+if (!defined('S9Y_FRAMEWORK_PERMALINKS')) {
+    include(S9Y_INCLUDE_PATH . "include/functions_permalinks.inc.php");
+}
+if (!defined('S9Y_FRAMEWORK_SMARTY')) {
+    include(S9Y_INCLUDE_PATH . "include/functions_smarty.inc.php");
+}
 /**
  * Truncate a string to a specific length, multibyte aware. Appends '...' if successfully truncated
  *
index 6cfb6139fc5ff9d7aa0cb5afba19b49b52cb6e61..e25ffae99a17433dd87443b9b7282312c5357e3f 100644 (file)
@@ -2,6 +2,11 @@
 # 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_CALENDARS')) {
+    return;
+}
+@define('S9Y_FRAMEWORK_CALENDARS', true);
+
 /**
  * Gregorian to Persian Convertor
  *
index e2929267046f0b6220a2f9a8c92983acbc6801e9..ed3fa7a68fd7fc6235e2b6c62b41f3b52a240292 100644 (file)
@@ -2,6 +2,11 @@
 # 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_COMMENTS')) {
+    return;
+}
+@define('S9Y_FRAMEWORK_COMMENTS', true);
+
 /**
  * Store the personal details of a commenting user in a cookie (or delete that cookie)
  *
index 2501b15af21bd61b41dc4cb4acea46be17223d29..03a074ebc442bb71e25cf6da5ee380b689fd86b3 100644 (file)
@@ -2,6 +2,11 @@
 # 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_ENTRIES')) {
+    return;
+}
+@define('S9Y_FRAMEWORK_ENTRIES', true);
+
 /**
  * Delete a category or range of categories
  *
@@ -1060,7 +1065,7 @@ function serendipity_purgeEntry($id, $timestamp = null) {
 function serendipity_updertEntry($entry) {
     global $serendipity;
 
-    include_once S9Y_INCLUDE_PATH . 'include/functions_entries_admin.inc.php';
+    include S9Y_INCLUDE_PATH . 'include/functions_entries_admin.inc.php';
 
     $errors = array();
     serendipity_plugin_api::hook_event('backend_entry_updertEntry', $errors, $entry);
index 7d5d433697ec3759f136b8141bd427dcf2a25d31..4effa9f59af78cdce52110cf5781b49c9ddab50c 100644 (file)
@@ -2,7 +2,14 @@
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 
-include_once(S9Y_INCLUDE_PATH . "include/functions_trackbacks.inc.php");
+if (defined('S9Y_FRAMEWORK_ENTRIES_ADMIN')) {
+    return;
+}
+@define('S9Y_FRAMEWORK_ENTRIES_ADMIN', true);
+
+if (!defined('S9Y_FRAMEWORK_TRACKBACKS')) {
+    include(S9Y_INCLUDE_PATH . "include/functions_trackbacks.inc.php");
+}
 
 /**
  * Prints the form for editing/creating new blog entries
index e33affaee36d7dc61a4ade1faa1401f20d43d78a..9b24023eaf4a2c5bef6afbe766434fc481c33325 100644 (file)
@@ -2,6 +2,11 @@
 # 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_IMAGES')) {
+    return;
+}
+@define('S9Y_FRAMEWORK_IMAGES', true);
+
 /**
  * Check if an uploaded file is "evil"
  *
index 07c9eab741192f4208db3f70d91f95dc29b0d872..cc91f4b5148d4f1b0e5e521601e2ec12e5eff89f 100644 (file)
@@ -3,6 +3,11 @@
 # All rights reserved.  See LICENSE file for licensing details
 
 
+if (defined('S9Y_FRAMEWORK_INSTALLER')) {
+    return;
+}
+@define('S9Y_FRAMEWORK_INSTALLER', true);
+
 /**
  * Convert a PHP Ini setting to a boolean flag
  *
index de575a870f2bd6878a7b4206803bdf2c9f9f1cd6..fd4557b1b13a959ae6a26034b4113a907e0158a1 100644 (file)
@@ -2,6 +2,11 @@
 # 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_PERMALINKS')) {
+    return;
+}
+@define('S9Y_FRAMEWORK_PERMALINKS', true);
+
 /**
  * Converts a string into a filename that can be used safely in HTTP URLs
  *
index 44fefffc72a91622af17b81bed3cd492e95b5bcb..bfa9933f46e80af63addb94136a491e139d7b72f 100644 (file)
@@ -2,6 +2,11 @@
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)\r
 # All rights reserved.  See LICENSE file for licensing details\r
 \r
+if (defined('S9Y_FRAMEWORK_PLUGINS_ADMIN')) {\r
+    return;\r
+}\r
+@define('S9Y_FRAMEWORK_PLUGINS_ADMIN', true);\r
+\r
 /**\r
  * Returns the name of a usergroup.\r
  *\r
index af1701018b89a808c05c3cc6167b17942debb71c..12e597050663097e8c07122dcabcab56602b4a00 100644 (file)
@@ -2,6 +2,11 @@
 # 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_RSS')) {
+    return;
+}
+@define('S9Y_FRAMEWORK_RSS', true);
+
 /**
  * Parses entries to display them for RSS/Atom feeds to be passed on to generic Smarty templates
  *
index 17cdc14a9f828371da75d6169800d65ee19064d1..83f3bb94f58095d45234144943b5636ec3dea0cd 100644 (file)
@@ -2,6 +2,11 @@
 # 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_TRACKBACKS')) {
+    return;
+}
+@define('S9Y_FRAMEWORK_TRACKBACKS', true);
+
 /**
  * Check a HTTP response if it is a valid XML trackback response
  *
index 6045123fece8b51bfa028f195329ce0d4e502f17..515bcf534a1634e2b1bf0bb6ff470ecc636d220c 100644 (file)
@@ -2,6 +2,11 @@
 # 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_UPGRADER')) {
+    return;
+}
+@define('S9Y_FRAMEWORK_UPGRADER', true);
+
 /**
  * This is a list of functions that are used by the upgrader. Define functions here that
  * are not used within usual Serendipity control flow
index b71ed688943321f3eaf83decee448d083346f02b..9ade1a7beaf347b5a6613725931aabf98854f5eb 100644 (file)
@@ -2,9 +2,17 @@
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 
-include_once('serendipity_config.inc.php');
-include_once(S9Y_INCLUDE_PATH . 'include/plugin_api.inc.php');
-include_once(S9Y_INCLUDE_PATH . 'include/plugin_internal.inc.php');
+if (!defined('S9Y_FRAMEWORK')) {
+    include('serendipity_config.inc.php');
+}
+
+if (!defined('S9Y_FRAMEWORK_PLUGIN_API')) {
+    include(S9Y_INCLUDE_PATH . 'include/plugin_api.inc.php');
+}
+
+if (!defined('S9Y_FRAMEWORK_PLUGIN_INTERNAL')) {
+    include(S9Y_INCLUDE_PATH . 'include/plugin_internal.inc.php');
+}
 
 $uri_addData = array(
     'startpage' => false,
@@ -27,7 +35,7 @@ $serendipity['smarty']->assign(
 
 if ($serendipity['smarty_raw_mode']) {
     /* For BC reasons, we have to ask for layout.php */
-    @include_once(serendipity_getTemplateFile('layout.php', 'serendipityPath'));
+    @include(serendipity_getTemplateFile('layout.php', 'serendipityPath'));
 } else {
     switch ($serendipity['GET']['action']) {
         // User wants to read the diary
index 1b13a2625b091238c9022996a1ea928a5001416d..a0bf0e98e60f29c66c1ec6ca3a2a268857b58254 100644 (file)
@@ -17,7 +17,7 @@ if (!defined('serendipity_LANG_LOADED') || serendipity_LANG_LOADED !== true) {
 
     // Do fallback to english
     if (IS_installed === false || (defined('IS_up2date') && IS_up2date === false)) {
-        @include_once(S9Y_INCLUDE_PATH . 'lang/' . $charset . 'serendipity_lang_en.inc.php');
+        @include(S9Y_INCLUDE_PATH . 'lang/' . $charset . 'serendipity_lang_en.inc.php');
     }
 }
 
index 0eef23b9d5540f35571c1ae7d70999cd17fe7040..04eb621b693d9146e6fd377df96ee54bc9cac4d0 100644 (file)
@@ -6,7 +6,14 @@ if (IN_serendipity !== true) {
     die ('Don\'t hack!');
 }
 
-include_once S9Y_INCLUDE_PATH . 'include/functions.inc.php';
+if (defined('S9Y_FRAMEWORK_PLUGIN_API')) {
+    return;
+}
+@define('S9Y_FRAMEWORK_PLUGIN_API', true);
+
+if (!defined('S9Y_FRAMEWORK_FUNCTIONS')) {
+    include S9Y_INCLUDE_PATH . 'include/functions.inc.php';
+}
 
 /* This file defines the plugin API for serendipity.
  * By extending these classes, you can add your own code
@@ -534,7 +541,7 @@ class serendipity_plugin_api {
 
         if (!class_exists($class_name) && !empty($pluginFile)) {
             // $serendipity['debug']['pluginload'][] = "Classname does not exist. Including $pluginFile.";
-            include_once($pluginFile);
+            include($pluginFile);
         }
 
         if (!class_exists($class_name)) {
@@ -1526,6 +1533,8 @@ class serendipity_event extends serendipity_plugin {
     }
 }
 
-include_once S9Y_INCLUDE_PATH . 'include/plugin_internal.inc.php';
+if (!defined('S9Y_FRAMEWORK_PLUGIN_INTERNAL')) {
+    include S9Y_INCLUDE_PATH . 'include/plugin_internal.inc.php';
+}
 
 /* vim: set sts=4 ts=4 expandtab : */
index b6c04b178bffb0e3ac503bd61e4223912701c3fc..561b24c6c329a5afbd791428f424a085b074f3cf 100644 (file)
--- a/index.php
+++ b/index.php
@@ -21,7 +21,7 @@ header('X-Blog: Serendipity'); // Used for installer detection
 
 // Session are needed to also remember an autologin user on the frontend
 ob_start();
-include_once('serendipity_config.inc.php');
+include('serendipity_config.inc.php');
 header('Content-Type: text/html; charset='. LANG_CHARSET);
 $track_referer = true;
 $uri = $_SERVER['REQUEST_URI'];
@@ -201,7 +201,7 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
     }
 
     ob_start();
-    include_once(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
+    include(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
     $data = ob_get_contents();
     ob_end_clean();
 
@@ -255,7 +255,7 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
     }
 
     ob_start();
-    include_once(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
+    include(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
     $data = ob_get_contents();
     ob_end_clean();
 
@@ -289,7 +289,7 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
     }
 
     ob_start();
-    include_once(S9Y_INCLUDE_PATH . 'rss.php');
+    include(S9Y_INCLUDE_PATH . 'rss.php');
     $data = ob_get_contents();
     ob_end_clean();
 
@@ -328,7 +328,7 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
         }
     }
 
-    include_once(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
+    include(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
 } else if (preg_match(PAT_PLUGIN, $uri, $matches)) {
     serendipity_plugin_api::hook_event('external_plugin', $matches[2]);
     if (!defined('NO_EXIT')) {
@@ -373,7 +373,7 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
     $serendipity['head_title']    = $cInfo['category_name'];
     $serendipity['head_subtitle'] = $serendipity['blogTitle'];
 
-    include_once(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
+    include(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
 } else if ($is_multiauth || preg_match(PAT_PERMALINK_AUTHORS, $uri, $matches)) {
     if ($is_multiauth) {
         $serendipity['GET']['viewAuthor'] = implode(';', $serendipity['POST']['multiAuth']);
@@ -410,7 +410,7 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
     $serendipity['head_title']    = sprintf(ENTRIES_BY, $uInfo[0]['realname']);
     $serendipity['head_subtitle'] = $serendipity['blogTitle'];
 
-    include_once(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
+    include(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
 } else if (preg_match(PAT_SEARCH, $uri, $matches)) {
     $_args = $serendipity['uriArguments'];
 
@@ -435,10 +435,10 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
 
     $serendipity['GET']['action']     = 'search';
     $serendipity['GET']['searchTerm'] = urldecode(htmlspecialchars(strip_tags(implode(' ', $search))));
-    include_once(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
+    include(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
 } elseif (preg_match(PAT_CSS, $uri, $matches)) {
     $css_mode = $matches[1];
-    include_once(S9Y_INCLUDE_PATH . 'serendipity.css.php');
+    include(S9Y_INCLUDE_PATH . 'serendipity.css.php');
     exit;
 } else if (preg_match('@/(index(\.php|\.html)?)|'. preg_quote($serendipity['indexFile']) .'@', $uri) ||
            preg_match('@^/' . preg_quote(trim($serendipity['serendipityHTTPPath'], '/')) . '/?(\?.*)?$@', $uri)) {
@@ -449,10 +449,10 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
         $serendipity['uriArguments'][] = PATH_ARCHIVES;
     }
 
-    include_once(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
+    include(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
 } else {
     header('HTTP/1.0 404 Not found');
-    include_once(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
+    include(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
     // printf('<div class="serendipity_msg_important">' . DOCUMENT_NOT_FOUND . '</div>', $uri);
 }
 
diff --git a/rss.php b/rss.php
index 101f1e7ceb20c647f360f6adb5a334a3266b4d65..c1167e4b2be6f0e0e1e9ec13a4491f347f7c0ef3 100644 (file)
--- a/rss.php
+++ b/rss.php
@@ -4,8 +4,8 @@
 
 header('Content-Type: text/xml; charset=utf-8');
 session_cache_limiter('public');
-include_once('serendipity_config.inc.php');
-include_once(S9Y_INCLUDE_PATH . 'include/functions_rss.inc.php');
+include('serendipity_config.inc.php');
+include(S9Y_INCLUDE_PATH . 'include/functions_rss.inc.php');
 
 $version         = $_GET['version'];
 $description     = $serendipity['blogDescription'];
@@ -111,7 +111,9 @@ $metadata = array(
     'version'           => $version
 );
 
-include_once(S9Y_INCLUDE_PATH . 'include/plugin_api.inc.php');
+if (!defined('S9Y_FRAMEWORK_PLUGIN_API')) {
+    include(S9Y_INCLUDE_PATH . 'include/plugin_api.inc.php');
+}
 $plugins = serendipity_plugin_api::enum_plugins();
 
 if (is_array($plugins)) {
index b7019ede7c9631804858a5b325c3f2062915c6cf..e8ea1379debdea751f3648c8d9d05f9d958535f1 100644 (file)
@@ -8,7 +8,9 @@ define('IN_upgrader', true);
 define('IN_CSS', true);
 
 session_cache_limiter('public');
-include_once('serendipity_config.inc.php');
+if (!defined('S9Y_FRAMEWORK')) {
+    include('serendipity_config.inc.php');
+}
 
 if (!isset($css_mode)) {
     if (!empty($serendipity['GET']['css_mode'])) {
index 5d5cd98030fad2a21fe064b4ea427bdf2b9a3789..6c4ce540202955c84e8f04f253cbd1cef9d0e3c7 100644 (file)
@@ -11,9 +11,9 @@ include('serendipity_config.inc.php');
 header('Content-Type: text/html; charset=' . LANG_CHARSET);
 
 if (IS_installed === false) {
-    require_once(S9Y_INCLUDE_PATH . 'include/functions_permalinks.inc.php');
-    require_once(S9Y_INCLUDE_PATH . 'include/functions_installer.inc.php');
-    require_once S9Y_INCLUDE_PATH . 'include/functions_config.inc.php';
+    require(S9Y_INCLUDE_PATH . 'include/functions_permalinks.inc.php');
+    require(S9Y_INCLUDE_PATH . 'include/functions_installer.inc.php');
+    require(S9Y_INCLUDE_PATH . 'include/functions_config.inc.php');
     $css_file = 'serendipity.css.php?serendipity[css_mode]=serendipity_admin.css';
 } else {
     $css_file = serendipity_rewriteURL('serendipity_admin.css');
@@ -114,7 +114,7 @@ if (!isset($serendipity['serendipityPath']) || IS_installed === false || IS_up2d
     }
 ?>
                 <td class="serendipityAdminContent" colspan="2">
-                    <?php require_once(S9Y_INCLUDE_PATH . $file); ?>
+                    <?php require(S9Y_INCLUDE_PATH . $file); ?>
 <?php
 
 
index 23693cf02b06880fd5662fc62552dcf166c27867..148b371545551a8138d0eff91119501ea1a580d9 100644 (file)
@@ -4,7 +4,7 @@
 /* vim: set sts=4 ts=4 expandtab : */
 
 header('Content-type: application/x-javascript');
-include_once('serendipity_config.inc.php');
+include('serendipity_config.inc.php');
 ?>
 <!-- // Hide from older browsers
 // This page serves to carry through any variables without having to parse a complete .js file as .php
index f5e793eb22bfb27be03fd653f7d2af26804fbef1..3baeada40ca38032fbcb18f37967c6ca1f2344fd 100644 (file)
@@ -2,7 +2,9 @@
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 
-require_once 'serendipity_config.inc.php';
+if (!defined('S9Y_FRAMEWORK')) {
+    require 'serendipity_config.inc.php';
+}
 
 $data = array();
 serendipity_plugin_api::hook_event('frontend_xmlrpc', $data);
index 18d31ce7e487dc319b842141092cdd23a95e5895..a9340447d7483f59eda9c181db543d734663abda 100644 (file)
@@ -197,6 +197,7 @@ CREATE TABLE {PREFIX}plugins (
 
 CREATE INDEX pluginauthorid_idx ON {PREFIX}plugins (authorid);
 CREATE INDEX pluginplace_idx ON {PREFIX}plugins (placement);
+CREATE INDEX pluginretr_idx ON {PREFIX}plugins (placement, sort_order);
 
 CREATE TABLE {PREFIX}category (
   categoryid {AUTOINCREMENT} {PRIMARY},
index 98356856ec13c63edeb541123d715fbc551c7924..4ab15bd6456ac88dd2a2dd0a4d8412c36f1454a3 100644 (file)
@@ -2,7 +2,7 @@
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 
-include_once('serendipity_config.inc.php');
+include('serendipity_config.inc.php');
 
 if ($_REQUEST['cid'] != '' && $HTTP_RAW_POST_DATA != '') {
     $comment = array();