Merge branch 'MDL-64615-master' of git://github.com/jleyva/moodle
authorSara Arjona <sara@moodle.com>
Mon, 25 Mar 2019 17:20:01 +0000 (18:20 +0100)
committerSara Arjona <sara@moodle.com>
Mon, 25 Mar 2019 17:20:01 +0000 (18:20 +0100)
admin/tool/mobile/lib.php

index 0ecfeff..5646510 100644 (file)
@@ -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());