From: toyomoyo Date: Wed, 15 Mar 2006 02:02:25 +0000 (+0000) Subject: more cleaning, filter do not process dates X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f99fee6c71d77030b95b2db972be076cc6abc3ed;p=moodle.git more cleaning, filter do not process dates --- diff --git a/blog/class.BlogFilter.php b/blog/class.BlogFilter.php index 425f38682d..bafdcc3d30 100755 --- a/blog/class.BlogFilter.php +++ b/blog/class.BlogFilter.php @@ -64,7 +64,7 @@ class BlogFilter { * @param int $courseid = if needed the entries can be restricted to those associated with a given course. * @param int $postid = a specific blog entry that is being sought */ - function BlogFilter($userid='', $postid='', $courseid='', $groupid='', $fetchlimit='', $fetchstart='', $startmonth='', $startday='', $startyear='', $endmonth='', $endday='', $endyear='', $filtertype='', $filterselect='', $tagid='', $tag ='', $sort='lastmodified DESC') { + function BlogFilter($userid='', $postid='', $fetchlimit='', $fetchstart='', $filtertype='', $filterselect='', $tagid='', $tag ='', $sort='lastmodified DESC') { global $CFG; //filter settings to be pass in for baseurl @@ -83,11 +83,6 @@ class BlogFilter { $this->blogtagline = &$this->blogInfo->blogtagline; } - if (!is_numeric($courseid) || $courseid == 0 || $courseid == 1) { - $this->courseid = ''; - } else { - $this->courseid = $courseid; - } if (! is_numeric($userid) ) { $this->userid = 0; } else { @@ -98,24 +93,15 @@ class BlogFilter { } else { $this->fetchstart = $fetchstart; } + if (!is_numeric($fetchlimit) ) { $this->fetchlimit = $CFG->blog_default_fetch_num_entries; } else { $this->fetchlimit = $fetchlimit; } - $this->postid = $postid; - $this->groupid = $groupid; - $this->startmonth = $startmonth; - $this->startday = $startday; - $this->startyear = $startyear; - $this->endmonth = $endmonth; - $this->endday = $endday; - $this->endyear = $endyear; - - $this->tstart = blog_get_month_time($startyear, $startmonth, $startday); - $this->tend = blog_get_month_time($endyear, $endmonth, $endday); + $this->postid = $postid; $this->sort = $sort; $this->filtertype = $filtertype; @@ -214,6 +200,7 @@ class BlogFilter { */ function fetch_entries($limit=true) { global $CFG, $USER; + /* echo "
filter trying to do its job"; echo "
filtertype = $this->filtertype"; diff --git a/blog/index.php b/blog/index.php index e8ef88d755..df07c1ee33 100755 --- a/blog/index.php +++ b/blog/index.php @@ -167,18 +167,16 @@ if ( empty($d) && !empty($m) && !empty($y) ) { if ($limit == 'none') { $limit = get_user_preferences('blogpagesize',8); } - + if ($formstart == 'none' || $formstart < 0) { $start = 0; } else { $start = $formstart; } -$blogFilter =& new BlogFilter($userid, '', $courseid, $groupid, $limit, $start, $m, $startday, $y, $m, $endday, $y,$filtertype, $filterselect, $tagid, $tag); +$blogFilter =& new BlogFilter($userid, '', $limit, $start,$filtertype, $filterselect, $tagid, $tag); //print_object($blogFilter); //debug -$pageNavigation = ''; - include($CFG->dirroot .'/blog/header.php'); //prints the tabs