Commit 37ba5fd6 authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1811912: "Table 'tag' not exists" when upgrade from 18.04 to master



We get a problem with trying to call get_my_tags() on index page
before the new table exists

behatnotneeded

Change-Id: I54845e3f6361d17649bdcdc000c0603c46191ee8
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 38ddeda0
......@@ -3979,6 +3979,10 @@ function tag_weight($freq) {
function get_my_tags($limit=null, $cloud=true, $sort='freq', $excludeinstitutiontags=false) {
global $USER;
if (get_config('version') < 2018061801) {
// we are in upgrade before the table exists
return false;
}
$id = $USER->get('id');
if ($limit || $sort != 'alpha') {
$sort = 'COUNT(1) DESC'; // In this instance '1' is not a number but the column reference to 'tag' column
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment