Skip to content

Commit

Permalink
Merge pull request #122 from sudwebdesign/master
Browse files Browse the repository at this point in the history
5720, 5721 Fix content encoding error & enhancement auto selected options in search form
  • Loading branch information
ATutor committed Sep 5, 2016
2 parents b5b3c34 + 166d04e commit d66a086
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
19 changes: 10 additions & 9 deletions include/html/search.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,10 @@
$checked_display_as_summaries = ' checked="checked"';
}

// search within options
if ($_GET['search_within']=='content'){
$checked_sw_content = ' checked="checked"';
} elseif ($_GET['search_within']=='forums') {
$checked_sw_forums = ' checked="checked"';
} else {
$checked_sw_all = ' checked="checked"';
}

} else {
// default values:
$checked_include_all = ' checked="checked"';
$checked_sw_all = ' checked="checked"';

if ($_SESSION['course_id'] > 0) {
$checked_find_in_course = ' checked="checked"';
Expand All @@ -88,6 +79,16 @@
$checked_display_as_summaries = ' checked="checked"';
}
}

// search within options
if ($_GET['search_within']=='content'){
$checked_sw_content = ' checked="checked"';
} elseif ($_GET['search_within']=='forums') {
$checked_sw_forums = ' checked="checked"';
} else {
$checked_sw_all = ' checked="checked"';
}

if (isset($_GET['search']) && !$_GET['words']) {
$msg->printErrors('SEARCH_TERM_REQUIRED');
$_GET = array();
Expand Down
2 changes: 1 addition & 1 deletion include/lib/vital_funcs.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,7 @@ function escape_all_supers(){
if(!is_array($_GET[$key])){
$_GET[$key] = htmlspecialchars($_GET[$key]);
} else{
if($_GET['qti_export_version']){
if(isset($_GET['qti_export_version'])){
// don't do anything
// hack to prevent filter when selecting a question to edit.
// the array the URL has attached needs to stay intact for the question editor
Expand Down

0 comments on commit d66a086

Please sign in to comment.