Permalink
Browse files

A series of old fixes never committed

  • Loading branch information...
moodler
moodler committed Mar 13, 2006
1 parent ffa4458 commit 07264dd81f2de6ba857926c010c17696acf107f7
View
@@ -4,7 +4,7 @@
require_once("lib.php");
require_once("$CFG->libdir/rsslib.php");
optional_variable($id); // course
$id = optional_param('id', PARAM_INT); // course
if ($id) {
if (! $course = get_record("course", "id", $id)) {
View
@@ -1293,9 +1293,9 @@ function forum_get_discussions($forum="0", $forumsort="d.timemodified DESC",
} else {
return get_records_sql("SELECT $postdata, d.name, d.timemodified, d.usermodified, d.groupid,
u.firstname, u.lastname, u.email, u.picture $umfields
FROM {$CFG->prefix}forum_posts p,
FROM ({$CFG->prefix}forum_posts p,
{$CFG->prefix}user u,
{$CFG->prefix}forum_discussions d
{$CFG->prefix}forum_discussions d)
$umtable
WHERE d.forum = '$forum'
AND p.discussion = d.id
View
@@ -5,10 +5,10 @@
require_once("../../config.php");
require_once("lib.php");
require_variable($f); // The forum to mark
require_variable($mark); // Read or unread?
optional_variable($d); // Discussion to mark.
optional_variable($returnpage, 'index.php'); // Page to return to.
$f = required_param('f'); // The forum to mark
$mark = required_param('mark'); // Read or unread?
$d = optional_param('d'); // Discussion to mark.
$returnpage = optional_param('returnpage', 'index.php'); // Page to return to.
if (! $forum = get_record("forum", "id", $f)) {
error("Forum ID was incorrect");
View
@@ -10,7 +10,7 @@
error("Guests are not allowed to rate posts.", $_SERVER["HTTP_REFERER"]);
}
require_variable($id); // The course these ratings are part of
$id = required_param('id', PARAM_INT); // The course these ratings are part of
if (! $course = get_record("course", "id", $id)) {
error("Course ID was incorrect");
View
@@ -5,7 +5,7 @@
require_once("../../config.php");
require_once("lib.php");
require_variable($id);
$id = required_param('id', PARAM_INT);
if (! $post = get_record("forum_posts", "id", $id)) {
error("Post ID was incorrect");
@@ -5,8 +5,8 @@
require_once("../../config.php");
require_once("lib.php");
require_variable($id); // The forum to subscribe or unsubscribe to
optional_variable($returnpage, 'index.php'); // Page to return to.
$id = required_param('id', PARAM_INT); // The forum to subscribe or unsubscribe to
$returnpage = optional_param('returnpage', 'index.php'); // Page to return to.
if (! $forum = get_record("forum", "id", $id)) {
error("Forum ID was incorrect");
View
@@ -5,9 +5,9 @@
require_once("../../config.php");
require_once("lib.php");
require_variable($id); // The forum to subscribe or unsubscribe to
optional_variable($force); // Force everyone to be subscribed to this forum?
optional_variable($user);
$id = required_param('id', PARAM_INT); // The forum to subscribe or unsubscribe to
$force = optional_param('force'); // Force everyone to be subscribed to this forum?
$user = optional_param('user');
if (! $forum = get_record("forum", "id", $id)) {
error("Forum ID was incorrect");
@@ -3,10 +3,10 @@
require_once("../../config.php");
require_once("lib.php");
require_variable($id); // forum
optional_variable($group); // change of group
$id = required_param('id', PARAM_INT); // forum
$group = optional_param('group'); // change of group
optional_variable($edit); // Turn editing on and off
$edit = optional_param('edit'); // Turn editing on and off
if (! $forum = get_record("forum", "id", $id)) {
error("Forum ID is incorrect");

0 comments on commit 07264dd

Please sign in to comment.