Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29422
Modified Files:
index.php serendipity.css.php serendipity_config.inc.php
Log Message:
* Move Smarty object instancing to a function call, so that is not
created when not needed (like for CSS)
* make head_title / head_subtitle globally available, so that plugins
can also use it
* Code optimizations: Queries, referenced variables, plugin API
* Improved entryproperties cache
* Improved Plugin API calls to fetch titles of entries
* Improved Plugin aPI calls to set the authorid of a plugin
* Improved some plugins to not create costy introspect() calls, and move
them to the introspect_config_item() part
* Fixed trackexits plugin to not abuse the query() function too often
Index: serendipity.css.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity.css.php,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- serendipity.css.php 25 Aug 2004 16:25:24 -0000 1.32
+++ serendipity.css.php 19 Nov 2004 11:24:34 -0000 1.33
@@ -26,6 +26,5 @@
serendipity_plugin_api::hook_event('css', $out);
echo $out;
-
/* vim: set sts=4 ts=4 expandtab : */
?>
Index: serendipity_config.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_config.inc.php,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -d -r1.101 -r1.102
--- serendipity_config.inc.php 19 Nov 2004 11:04:59 -0000 1.101
+++ serendipity_config.inc.php 19 Nov 2004 11:24:34 -0000 1.102
@@ -229,33 +229,5 @@
serendipity_plugin_api::hook_event('frontend_configure', $serendipity);
-define('SMARTY_DIR', S9Y_INCLUDE_PATH . 'bundled-libs/Smarty/libs/');
-require_once SMARTY_DIR . 'Smarty.class.php';
-$serendipity['smarty'] = new Smarty;
-if (!$serendipity['production']) {
- $serendipity['smarty']->force_compile = true;
- $serendipity['smarty']->debugging = true;
-}
-$serendipity['smarty']->template_dir = $serendipity['serendipityPath'] . $serendipity['templatePath'] . $serendipity['template'];
-$serendipity['smarty']->compile_dir = $serendipity['serendipityPath'] . PATH_SMARTY_COMPILE;
-$serendipity['smarty']->config_dir = &$serendipity['smarty']->template_dir;
-$serendipity['smarty']->secure_dir = array($serendipity['serendipityPath'] . $serendipity['templatePath']);
-$serendipity['smarty']->security_settings['MODIFIER_FUNCS'] = array('sprintf', 'sizeof', 'count');
-$serendipity['smarty']->security = true;
-$serendipity['smarty']->use_sub_dirs = false;
-$serendipity['smarty']->compile_check = true;
-$serendipity['smarty']->compile_id = &$serendipity['template'];
-
-$serendipity['smarty']->register_modifier('makeFilename', 'serendipity_makeFilename');
-$serendipity['smarty']->register_modifier('xhtml_target', 'serendipity_xhtml_target');
-$serendipity['smarty']->register_modifier('emptyPrefix', 'serendipity_emptyPrefix');
-$serendipity['smarty']->register_modifier('formatTime', 'serendipity_smarty_formatTime');
-$serendipity['smarty']->register_function('serendipity_printSidebar', 'serendipity_smarty_printSidebar');
-$serendipity['smarty']->register_function('serendipity_hookPlugin', 'serendipity_smarty_hookPlugin');
-$serendipity['smarty']->register_function('serendipity_getFile', 'serendipity_smarty_getFile');
-$serendipity['smarty']->register_function('serendipity_printComments', 'serendipity_smarty_printComments');
-$serendipity['smarty']->register_function('serendipity_printTrackbacks', 'serendipity_smarty_printTrackbacks');
-
-
/* vim: set sts=4 ts=4 expandtab : */
?>
Index: index.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/index.php,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- index.php 19 Nov 2004 11:04:58 -0000 1.54
+++ index.php 19 Nov 2004 11:24:34 -0000 1.55
@@ -1,7 +1,6 @@
<?php # $Id$
$global_debug = true;
-
if ($global_debug) {
#apd_set_pprof_trace();
@@ -143,9 +142,8 @@
$_GET['serendipity']['id'] = $id;
$title = serendipity_db_query("SELECT title FROM {$serendipity['dbPrefix']}entries WHERE id=$id", true);
- $title = $title[0];
-
- $serendipity['smarty']->assign(array('head_title' => $title, 'head_subtitle' => $serendipity['blogTitle']));
+ $serendipity['head_title'] = $title[0];
+ $serendipity['head_subtitle'] = $serendipity['blogTitle'];
ob_start();
include_once(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
@@ -235,7 +233,8 @@
if ($global_debug) {
/* TODO: Remove (hide) this debug */
- echo '<div id="s9y_debug" style="text-align: center; color: red; font-size: 10pt; font-weight: bold; padding: 10px">Page generated in '. round(microtime_float()-$time_start,6) .' seconds, '. sizeof(get_included_files()) .' files included</div>';
+ echo '<div id="s9y_debug" style="text-align: center; color: red; font-size: 10pt; font-weight: bold; padding: 10px">Page delivered in '. round(microtime_float()-$time_start,6) .' seconds, '. sizeof(get_included_files()) .' files included</div>';
+ echo '</div>';
}
/* vim: set sts=4 ts=4 expandtab : */
|