Skip to content

Commit

Permalink
Last commit of the glorious glossary files to 16_STABLE, performed now
Browse files Browse the repository at this point in the history
that everything is properly branched. See MDL-9032
  • Loading branch information
stronk7 committed Mar 25, 2007
1 parent 86f4390 commit 4afc877
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
32 changes: 19 additions & 13 deletions mod/glossary/sql.php
Expand Up @@ -14,10 +14,23 @@
$sqlsortkey = NULL;
$textlib = textlib_get_instance();

/// Pivot is the field that set the break by groups (category, initial, author name, etc)
/// Calculate the SQL sortkey to be used by the SQL statements later
switch ( $sortkey ) {
case "CREATION":
$sqlsortkey = "timecreated";
break;
case "UPDATE":
$sqlsortkey = "timemodified";
break;
case "FIRSTNAME":
$sqlsortkey = "firstname";
break;
case "LASTNAME":
$sqlsortkey = "lastname";
break;
}
$sqlsortorder = $sortorder;

/// fullpivot indicate if the whole pivot should be compared agasint the db or just the first letter
/// printpivot indicate if the pivot should be printed or not
switch ($CFG->dbtype) {
case 'postgres7':
$as = 'as';
Expand All @@ -27,17 +40,10 @@
break;
}

switch ( $sortkey ) {
case "CREATION":
$sqlsortkey = "timecreated";
break;

case "UPDATE":
$sqlsortkey = "timemodified";
break;
}
$sqlsortorder = $sortorder;
/// 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
/// printpivot indicate if the pivot should be printed or not
$fullpivot = 1;

$userid = '';
Expand Down
2 changes: 1 addition & 1 deletion mod/glossary/view.php
Expand Up @@ -13,7 +13,7 @@
$mode = optional_param('mode', '', PARAM_ALPHA); // term entry cat date letter search author approval
$hook = optional_param('hook', '', PARAM_CLEAN); // the term, entry, cat, etc... to look for based on mode
$fullsearch = optional_param('fullsearch', 0,PARAM_INT); // full search (concept and definition) when searching?
$sortkey = optional_param('sortkey', 'CREATION', PARAM_ALPHA);// Sorted view: CREATION | UPDATE | FIRSTNAME | LASTNAME...
$sortkey = optional_param('sortkey', '', PARAM_ALPHA);// Sorted view: CREATION | UPDATE | FIRSTNAME | LASTNAME...
$sortorder = optional_param('sortorder', 'ASC', PARAM_ALPHA); // it defines the order of the sorting (ASC or DESC)
$offset = optional_param('offset', 0,PARAM_INT); // entries to bypass (for paging purposes)
$page = optional_param('page', 0,PARAM_INT); // Page to show (for paging purposes)
Expand Down

0 comments on commit 4afc877

Please sign in to comment.