From e247dabc3aea645387d8a35170e054289e8cc3fc Mon Sep 17 00:00:00 2001 From: Juan Leyva Date: Thu, 7 Feb 2019 13:27:29 +0100 Subject: [PATCH] MDL-64615 tool_mobile: Do not modify custom download URLs --- admin/tool/mobile/lib.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/admin/tool/mobile/lib.php b/admin/tool/mobile/lib.php index 0ecfeff7821..56465103dd1 100644 --- a/admin/tool/mobile/lib.php +++ b/admin/tool/mobile/lib.php @@ -66,6 +66,12 @@ function tool_mobile_create_app_download_url() { } $downloadurl = new moodle_url($mobilesettings->setuplink); + + // Do not update the URL if it is a custom one (we may break it completely). + if ($mobilesettings->setuplink != 'https://download.moodle.org/mobile') { + return $downloadurl; + } + $downloadurl->param('version', $CFG->version); $downloadurl->param('lang', current_language());