Merge branch 'MDL-40424-master' of git://github.com/FMCorz/moodle

Conflicts:
	admin/oacleanup.php
This commit is contained in:
Eloy Lafuente (stronk7) 2013-07-17 01:21:51 +02:00
commit fb1788c598
18 changed files with 105 additions and 46 deletions

View file

@ -277,8 +277,10 @@ class restore_course_search extends restore_search_base {
protected function get_searchsql() {
global $DB;
list($ctxselect, $ctxjoin) = context_instance_preload_sql('c.id', CONTEXT_COURSE, 'ctx');
$ctxselect = ', ' . context_helper::get_preload_record_columns_sql('ctx');
$ctxjoin = "LEFT JOIN {context} ctx ON (ctx.instanceid = c.id AND ctx.contextlevel = :contextlevel)";
$params = array(
'contextlevel' => CONTEXT_COURSE,
'fullnamesearch' => '%'.$this->get_search().'%',
'shortnamesearch' => '%'.$this->get_search().'%',
'siteid' => SITEID
@ -326,8 +328,10 @@ class restore_category_search extends restore_search_base {
protected function get_searchsql() {
global $DB;
list($ctxselect, $ctxjoin) = context_instance_preload_sql('c.id', CONTEXT_COURSECAT, 'ctx');
$ctxselect = ', ' . context_helper::get_preload_record_columns_sql('ctx');
$ctxjoin = "LEFT JOIN {context} ctx ON (ctx.instanceid = c.id AND ctx.contextlevel = :contextlevel)";
$params = array(
'contextlevel' => CONTEXT_COURSECAT,
'namesearch' => '%'.$this->get_search().'%',
);