Update of /cvsroot/php-blog/serendipity/plugins/serendipity_plugin_history
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32702/plugins/serendipity_plugin_history
Modified Files:
serendipity_plugin_history.php
Log Message:
Will I ever get it right?
Index: serendipity_plugin_history.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/plugins/serendipity_plugin_history/serendipity_plugin_history.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- serendipity_plugin_history.php 28 Sep 2004 18:38:24 -0000 1.13
+++ serendipity_plugin_history.php 1 Oct 2004 15:47:23 -0000 1.14
@@ -174,31 +174,31 @@
$dateformat = $this->get_config('dateformat');
$full = ($this->get_config('full', 'false') != 'true') ? false : true;
- if (!$min_age || !is_numeric($min_age) || $min_age < 1 || $specialage == 'year') {
+ if (!is_numeric($min_age) || $min_age < 0 || $specialage == 'year') {
$min_age = 365 + date('L');
}
- if (!$max_age || !is_numeric($max_age) || $max_age < 1 || $specialage == 'year') {
+ if (!is_numeric($max_age) || $max_age < 1 || $specialage == 'year') {
$max_age = 365 + date('L');
}
- if (!$max_entries || !is_numeric($max_entries) || $max_entries < 1) {
+ if (!is_numeric($max_entries) || $max_entries < 1) {
$max_entries = 5;
}
- if (!$maxlength ||!is_numeric($maxlength) ||$maxlength <0)
+ if (!is_numeric($maxlength) ||$maxlength <0)
$maxlength = 30;
- if (!$dateformat || strlen($dateformat) < 1) {
+ if (strlen($dateformat) < 1) {
$dateformat = '%a, %d.%m.%Y %H:%M';
}
$maxts = mktime(23, 59, 59, date('m'), date('d'), date('Y'));
$mints = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
- $e = serendipity_fetchEntries(array(($mints-$min_age*86400),
- ($maxts-$max_age*86400)), $full, 15);
+ $e = serendipity_fetchEntries(array(($mints-$max_age*86400),
+ ($maxts-$min_age*86400)), $full, $max_entries);
echo (empty($intro)) ? '' : "$intro<br />";
-
+
if (!is_array($e)) return false;
$e_c = @count($e);
if ($e_c==0) return false;
|