From 76feb5ac9b4242b57475c5ab072a08e79bbda758 Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Mon, 16 Oct 2017 19:16:17 +0200 Subject: [PATCH] MDL-57455 mod_data: table aliases cannot use AS for crossdb --- mod/data/lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/data/lib.php b/mod/data/lib.php index ad03007131a..60d90f47ccd 100644 --- a/mod/data/lib.php +++ b/mod/data/lib.php @@ -3933,11 +3933,11 @@ function data_get_recordids($alias, $searcharray, $dataid, $recordids) { $tagwhere = []; $tagselect = ''; foreach ($nestsearch->rawtagnames as $tagrawname) { - $tagselect .= " INNER JOIN {tag_instance} AS ti_$i + $tagselect .= " INNER JOIN {tag_instance} ti_$i ON ti_$i.component = 'mod_data' AND ti_$i.itemtype = 'data_records' AND ti_$i.itemid = r.id - INNER JOIN {tag} AS t_$i + INNER JOIN {tag} t_$i ON ti_$i.tagid = t_$i.id "; $tagwhere[] = " t_$i.rawname = :trawname_$i "; $params["trawname_$i"] = $tagrawname; -- 2.11.4.GIT