From: stronk7 Date: Sun, 28 Nov 2004 23:54:11 +0000 (+0000) Subject: Changed some parameters. SC#33. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=1c144d0eed5e36b7c89869651bfcf00a9dddc86c;p=moodle.git Changed some parameters. SC#33. Merged from MOODLE_14_STABLE --- diff --git a/mod/glossary/print.php b/mod/glossary/print.php index 1bd38bac7a..538a099a68 100644 --- a/mod/glossary/print.php +++ b/mod/glossary/print.php @@ -7,7 +7,7 @@ require_variable($id); // Course Module ID optional_variable($sortorder,"asc"); // Sorting order - optional_variable($offset); // number of entries to bypass + optional_variable($offset,0,PARAM_INT); // number of entries to bypass optional_variable($displayformat,-1); $mode = required_param('mode'); // mode to show the entries diff --git a/mod/glossary/sql.php b/mod/glossary/sql.php index e578be30a4..8ad7ea961b 100644 --- a/mod/glossary/sql.php +++ b/mod/glossary/sql.php @@ -9,6 +9,9 @@ /// Creating the SQL statements +/// Initialise some variables + $sqlorderby = ''; + /// Pivot is the field that set the break by groups (category, initial, author name, etc) /// fullpivot indicate if the whole pivot should be compared agasint the db or just the first letter @@ -182,7 +185,7 @@ case 'entry': $printpivot = 0; - $where = "AND ge.id = $hook"; + $where = "AND ge.id = '$hook'"; break; case 'letter': diff --git a/mod/glossary/view.php b/mod/glossary/view.php index 3a7915f8bc..3ce65b107d 100644 --- a/mod/glossary/view.php +++ b/mod/glossary/view.php @@ -20,8 +20,8 @@ $fullsearch = optional_param('fullsearch',0);// full search (concept and definition) when searching? $sortkey = optional_param('sortkey'); // Sorted view: CREATION | UPDATE | FIRSTNAME | LASTNAME... $sortorder = optional_param('sortorder'); // it defines the order of the sorting (ASC or DESC) - $offset = optional_param('offset',0); // entries to bypass (for paging purpouses) - $page = optional_param('page',0); // Page to show (for paging purpouses) + $offset = optional_param('offset',0,PARAM_INT); // entries to bypass (for paging purpouses) + $page = optional_param('page',0,PARAM_INT); // Page to show (for paging purpouses) $show = optional_param('show'); // [ concept | alias ] => mode=term hook=$show if (!empty($id)) {