*
* @access public
* @param mixed Restricts fetching entries to a specific timespan. Behaves differently depending on the type:
- * Numeric:
- * YYYYMMDD - Shows all entries from YYYY-MM-DD.
- * If DD is "00", it will show all entries from that month.
+ * Numeric:
+ * YYYYMMDD - Shows all entries from YYYY-MM-DD.
+ * If DD is "00", it will show all entries from that month.
* If DD is any other number, it will show entries of that specific day.
* 2-Dimensional Array:
* Key #0 - Specifies the start timestamp (unix seconds)
* Key #1 - Specifies the end timestamp (unix seconds)
* Other (null, 3-dimensional Array, ...):
- * Entries newer than $modified_since will be fetched
+ * Entries newer than $modified_since will be fetched
* @param boolean Indicates if the full entry will be fetched (body+extended: TRUE), or only the body (FALSE).
* @param string Holds a "Y" or "X, Y" string that tells which entries to fetch. X is the first entry offset, Y is number of entries. If not set, the global fetchLimit will be applied (15 entries by default)
* @param boolean Indicates whether drafts should be fetched (TRUE) or not
} elseif (isset($serendipity['GET']['hide_category'])) {
$cat_sql = serendipity_getMultiCategoriesSQL($serendipity['GET']['hide_category'], true);
}
-
+
if (!empty($cat_sql)) {
if (!empty($cond['and'])) {
$cond['and'] .= " AND ($cat_sql)";
$querystring .= "\n ORDER BY $order";
}
- return serendipity_db_query($querystring);
+ $ret = serendipity_db_query($querystring);
+ if (!is_array($ret)) {
+ echo "Query failed: $ret";
+ }
+ return $ret;
}
/**
} else {
$key = date('Ymd', serendipity_serverOffsetHour($entries[$x]['timestamp']));
}
-
+
$dategroup[$key]['date'] = $entries[$x]['timestamp'];
$dategroup[$key]['is_sticky'] = (isset($entries[$x]['is_sticky']) && serendipity_db_bool($entries[$x]['is_sticky']) ? true : false);
$dategroup[$key]['entries'][] = &$entries[$x];
foreach($dategroup as $properties) {
foreach($properties['entries'] as $x => $_entry) {
$entry = &$properties['entries'][$x]; // PHP4 Compat
-
+
if (!empty($entry['properties']['ep_cache_body'])) {
$entry['body'] = &$entry['properties']['ep_cache_body'];
$entry['is_cached'] = true;
}
-
+
if (!empty($entry['properties']['ep_cache_extended'])) {
$entry['extended'] = &$entry['properties']['ep_cache_extended'];
$entry['is_cached'] = true;
}
-
+
if ($preview) {
$entry['author'] = $entry['realname'];
$entry['authorid'] = $serendipity['authorid'];