Update of /cvsroot/php-blog/serendipity/include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12510/include
Modified Files:
functions_entries.inc.php plugin_api.inc.php
Log Message:
* Fix fetching entryproperties - when 'cache' is disabled, several are not allowed to be fetched!
* Added ability that entryproperties plugin will always be last in the plugin queue
Index: plugin_api.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/include/plugin_api.inc.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- plugin_api.inc.php 26 Jan 2005 14:14:03 -0000 1.17
+++ plugin_api.inc.php 28 Jan 2005 11:16:56 -0000 1.18
@@ -80,6 +80,7 @@
}
serendipity_db_query("INSERT INTO {$serendipity['dbPrefix']}plugins (name, sort_order, placement, authorid, path) values ('$key', $nextidx, '$default_placement', '$authorid', '$pluginPath')");
+ serendipity_plugin_api::hook_event('backend_plugins_new_instance', $key, array('default_placement' => $default_placement));
/* Check for multiple dependencies */
$plugin =& serendipity_plugin_api::load_plugin($key, $authorid, $pluginPath);
Index: functions_entries.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/include/functions_entries.inc.php,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- functions_entries.inc.php 27 Jan 2005 15:02:00 -0000 1.52
+++ functions_entries.inc.php 28 Jan 2005 11:16:56 -0000 1.53
@@ -322,7 +322,6 @@
e.$key LIKE '" . serendipity_db_escape_string($val) . "'
{$cond['and']}
LIMIT 1";
-
$ret = serendipity_db_query($querystring, true);
if (is_array($ret)) {
$ret['categories'] = serendipity_fetchEntryCategories($ret['id']);
@@ -334,7 +333,11 @@
function serendipity_fetchEntryProperties($id) {
global $serendipity;
- $properties = serendipity_db_query("SELECT property, value FROM {$serendipity['dbPrefix']}entryproperties WHERE entryid = " . (int)$id);
+
+ $parts = array();
+ serendipity_plugin_api::hook_event('frontend_entryproperties_query', $parts);
+
+ $properties = serendipity_db_query("SELECT property, value FROM {$serendipity['dbPrefix']}entryproperties WHERE entryid = " . (int)$id . " " . $parts['and']);
if (!is_array($properties)) {
$properties = array();
}
@@ -346,6 +349,7 @@
return $property;
}
+
/**
* Fetches a users categories
**/
|