Hi,
I am with 0.9beta1 but I am behind firewall in intranet so no public URL is available.
The versions:
Code: Select all
serendipity_event_filter_entries.php,v 1.3 2005/08/01 18:18:52
...
$propbag->add('version', '1.0');
Code: Select all
serendipity_plugin_recententries.php 346 2005-08-01 17:35:25
....
$propbag->add('version', '1.3');
I did some debugging:
This is control output operator:
Code: Select all
if (isset($entries) && is_array($entries)) { // line 153
.....
} else {
echo '<div class="serendipitySideBarDate">------</div><br />';
echo '<div class="serendipitySideBarDate">isset($entries) returns ';
echo isset($entries) ? 'true' : 'false' . '</div><br>';
echo '<div class="serendipitySideBarDate">is_array($entries) returns ';
echo is_array($entries) ? 'true' : 'false' . '</div><br>';
}
The 'else' part is added by me and it is executed, but not 'if' part. The output is:
Code: Select all
------
isset($entries) returns true
is_array($entries) returns false
$entries contains result of a serendipity_db_query($entries_query) function. Here is what contains $entries_query just before serendipity_db_query() call, when regular entries are shown and no filter is applied:
Code: Select all
SELECT id, title, timestamp FROM serendipity_entries WHERE isdraft = 'false' AND timestamp <= 1130324536 ORDER BY timestamp DESC LIMIT , 10
Now when filter IS applied:
Code: Select all
$entries_query is
SELECT id, title, timestamp FROM serendipity_entries WHERE isdraft = 'false' AND timestamp <= 1130326632 ORDER BY timestamp DESC LIMIT 12, 10
After 'DESC LIMIT there is a constant 12, that is not present in abowe query!!!
The value of $category after line 114
Code: Select all
$category = $this->get_config('category', 'none');
is 'none' (I checked this with control echo operator) at the beginning of function generate_content(&$title), and may be here is the cause... because next lines
Code: Select all
$sql_join = '';
$sql_where = '';
if ($category != 'none' && is_numeric($category)) {
$sql_join = 'LEFT OUTER JOIN ' . $serendipity['dbPrefix'] . 'entrycat AS ec ON id = ec.entryid
LEFT OUTER JOIN ' . $serendipity['dbPrefix'] . 'category AS c ON ec.categoryid = c.categoryid';
$sql_where = ' AND (c.category_left BETWEEN ' . implode(' AND ', serendipity_fetchCategoryRange($category)) . ')';
}
leave $sql_join and $sql_where empty.
BUT, when I applied the plugin_filter, the $category remained 'none' and the entries titles appeared.
Regards,
Ivan Cenov