Skip to content
Browse files

Fixes in datalib and backuplib for postgres invalid sql

  • Loading branch information...
1 parent 1e47ecd commit d13e627af5c0e858855647015aeb00104e6f3377 mjollnir_ committed Nov 22, 2004
Showing with 2 additions and 2 deletions.
  1. +1 −1 backup/backuplib.php
  2. +1 −1 lib/datalib.php
View
2 backup/backuplib.php
@@ -9,7 +9,7 @@ function insert_category_ids ($course,$backup_unique_code) {
$status = true;
$status = execute_sql("INSERT INTO {$CFG->prefix}backup_ids
(backup_code, table_name, old_id)
- SELECT DISTINCT '$backup_unique_code','quiz_categories',t.category
+ SELECT DISTINCT $backup_unique_code,'quiz_categories',t.category
FROM {$CFG->prefix}quiz_questions t,
{$CFG->prefix}quiz_question_grades g,
{$CFG->prefix}quiz q
View
2 lib/datalib.php
@@ -1814,7 +1814,7 @@ function get_courses_page($categoryid="all", $sort="c.sortorder ASC", $fields="c
global $USER, $CFG;
$categoryselect = "";
- if ($categoryid != "all") {
+ if ($categoryid != "all" && is_numeric($categoryid)) {
$categoryselect = "c.category = '$categoryid'";
}

0 comments on commit d13e627

Please sign in to comment.
Something went wrong with that request. Please try again.