mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
small fix and cleaning
This commit is contained in:
parent
71470b3bf1
commit
eccfc1cac0
@ -4,6 +4,11 @@ require_once('../config.php');
|
||||
include_once('lib.php');
|
||||
include_once('class.BlogInfo.php');
|
||||
require_login();
|
||||
|
||||
$userid = optional_param('userid', 0, PARAM_INT);
|
||||
$courseid = optional_param('courseid', SITEID, PARAM_INT);
|
||||
$act = optional_param('act','',PARAM_ALPHA);
|
||||
|
||||
// detemine where the user is coming from in case we need to send them back there
|
||||
if (isset($_SERVER['HTTP_REFERER'])) {
|
||||
$referrer = $_SERVER['HTTP_REFERER'];
|
||||
@ -54,7 +59,7 @@ if ( !blog_user_has_rights($PAGE->bloginfo) ) {
|
||||
|
||||
//////////// SECURITY AND SETUP COMPLETE - NOW PAGE LOGIC ///////////////////
|
||||
|
||||
if (isset($act) && $act == 'del' && confirm_sesskey())
|
||||
if (isset($act) && ($act == 'del') && confirm_sesskey())
|
||||
{
|
||||
$postid = required_param('postid', PARAM_INT);
|
||||
if (optional_param('confirm',0,PARAM_INT)) {
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php //$Id$
|
||||
|
||||
/// Sets up blocks and navigation for index.php, edit.php
|
||||
|
||||
require_once($CFG->dirroot .'/blog/lib.php');
|
||||
require_once($CFG->libdir .'/pagelib.php');
|
||||
require_once($CFG->dirroot .'/blog/blogpage.php');
|
||||
@ -9,15 +11,6 @@ require_once($CFG->dirroot .'/course/lib.php');
|
||||
$blockaction = optional_param('blockaction','', PARAM_ALPHA);
|
||||
$instanceid = optional_param('instanceid', 0, PARAM_INT);
|
||||
$blockid = optional_param('blockid', 0, PARAM_INT);
|
||||
$groupid = optional_param('groupid', 0, PARAM_INT);
|
||||
|
||||
if (!isset($userid)) {
|
||||
$userid = optional_param('userid', 0, PARAM_INT);
|
||||
}
|
||||
|
||||
if (!isset($courseid)) {
|
||||
$courseid = optional_param('courseid', SITEID, PARAM_INT);
|
||||
}
|
||||
|
||||
if (!$site = get_site()) {
|
||||
redirect($CFG->wwwroot.'/index.php');
|
||||
|
@ -10,22 +10,19 @@ if (!file_exists('../config.php')) {
|
||||
header('Location: ../install.php');
|
||||
die;
|
||||
}
|
||||
require_once('../config.php');
|
||||
|
||||
require_once('../config.php');
|
||||
require_once($CFG->dirroot .'/blog/lib.php');
|
||||
require_once($CFG->libdir .'/blocklib.php');
|
||||
|
||||
$id = optional_param('id', 0, PARAM_INT);
|
||||
$limit = optional_param('limit', 0, PARAM_INT);
|
||||
$start = optional_param('formstart', 0, PARAM_INT);
|
||||
|
||||
$userid = optional_param('userid',0,PARAM_INT);
|
||||
$groupid = optional_param('groupid',0,PARAM_INT);
|
||||
$courseid = optional_param('courseid',0,PARAM_INT);
|
||||
$tag = s(urldecode(optional_param('tag', '', PARAM_NOTAGS)));
|
||||
$tagid = optional_param('tagid', 0, PARAM_INT);
|
||||
$postid = optional_param('postid',0,PARAM_INT);
|
||||
|
||||
$filtertype = optional_param('filtertype', '', PARAM_ALPHA);
|
||||
$filterselect = optional_param('filterselect', 0, PARAM_INT);
|
||||
|
||||
@ -135,7 +132,7 @@ switch ($filtertype) {
|
||||
|
||||
//first set the start and end day equal to the day argument passed in from the get vars
|
||||
if ($limit == 'none') {
|
||||
$limit = get_user_preferences('blogpagesize',8);
|
||||
$limit = get_user_preferences('blogpagesize',10);
|
||||
}
|
||||
|
||||
$blogFilter =& new BlogFilter($userid, $postid, $limit, $start,$filtertype, $filterselect, $tagid, $tag);
|
||||
|
Loading…
x
Reference in New Issue
Block a user