From 6d015e29cc8e0200e3234ece107f3c6fa01cb62a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Mudr=C3=A1k?= <david@moodle.com>
Date: Mon, 30 Sep 2019 13:03:48 +0200
Subject: [PATCH] MDL-66118 hub: Define the new sites directory URL

The Moodle sites now register with stats.moodle.org so use that as a new
official hub's URL. Beside that, allow for the alternative value be
provided in config.php for development and testing purposes.
---
 lib/moodlelib.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/moodlelib.php b/lib/moodlelib.php
index fb1423b91f9..dc8b0b0d547 100644
--- a/lib/moodlelib.php
+++ b/lib/moodlelib.php
@@ -487,9 +487,9 @@ define('HOMEPAGE_MY', 1);
 define('HOMEPAGE_USER', 2);
 
 /**
- * Moodle.net url (should be moodle.net)
+ * URL of the Moodle sites registration portal.
  */
-define('HUB_MOODLEORGHUBURL', "https://moodle.net");
+defined('HUB_MOODLEORGHUBURL') || define('HUB_MOODLEORGHUBURL', 'https://stats.moodle.org');
 
 /**
  * Moodle mobile app service name