diff --git a/src/addons/mod/forum/components/post-options-menu/post-options-menu.ts b/src/addons/mod/forum/components/post-options-menu/post-options-menu.ts
index f5e147ae8..a32c5f97e 100644
--- a/src/addons/mod/forum/components/post-options-menu/post-options-menu.ts
+++ b/src/addons/mod/forum/components/post-options-menu/post-options-menu.ts
@@ -86,6 +86,10 @@ export class AddonModForumPostOptionsMenuComponent implements OnInit {
*/
protected setOpenInBrowserUrl(): void {
const site = CoreSites.getRequiredCurrentSite();
+ if (!CoreSites.shouldDisplayInformativeLinks(site)) {
+ return;
+ }
+
this.url = site.createSiteUrl('/mod/forum/discuss.php', { d: this.post.discussionid.toString() }, 'p' + this.post.id);
}
diff --git a/src/addons/mod/forum/pages/discussion/discussion.ts b/src/addons/mod/forum/pages/discussion/discussion.ts
index 60117a03f..02c77a6c2 100644
--- a/src/addons/mod/forum/pages/discussion/discussion.ts
+++ b/src/addons/mod/forum/pages/discussion/discussion.ts
@@ -165,8 +165,11 @@ export class AddonModForumDiscussionPage implements OnInit, AfterViewInit, OnDes
return;
}
+ const currentSite = CoreSites.getCurrentSite();
this.isOnline = CoreNetwork.isOnline();
- this.externalUrl = CoreSites.getCurrentSite()?.createSiteUrl('/mod/forum/discuss.php', { d: this.discussionId.toString() });
+ this.externalUrl = currentSite && CoreSites.shouldDisplayInformativeLinks(currentSite) ?
+ currentSite.createSiteUrl('/mod/forum/discuss.php', { d: this.discussionId.toString() }) :
+ undefined;
this.onlineObserver = CoreNetwork.onChange().subscribe(() => {
// Execute the callback in the Angular zone, so change detection doesn't stop working.
NgZone.run(() => {
diff --git a/src/core/components/sites-list/sites-list.html b/src/core/components/sites-list/sites-list.html
index 99cc0bc53..d4f3b7e57 100644
--- a/src/core/components/sites-list/sites-list.html
+++ b/src/core/components/sites-list/sites-list.html
@@ -26,7 +26,7 @@
-
+
{{ site.siteUrlWithoutProtocol }}
diff --git a/src/core/components/sites-list/sites-list.ts b/src/core/components/sites-list/sites-list.ts
index 57477b125..b92dd59ca 100644
--- a/src/core/components/sites-list/sites-list.ts
+++ b/src/core/components/sites-list/sites-list.ts
@@ -14,7 +14,7 @@
import { Component, ContentChild, Input, Output, TemplateRef, EventEmitter } from '@angular/core';
-import { CoreSiteBasicInfo } from '@services/sites';
+import { CoreSiteBasicInfo, CoreSites } from '@services/sites';
import { CoreAccountsList } from '@features/login/services/login-helper';
/**
@@ -77,4 +77,14 @@ export class CoreSitesListComponent {
this.onSiteClicked.emit(site);
}
+ /**
+ * Check whether site URL should be displayed.
+ *
+ * @param site Site to check.
+ * @returns Whether to display URL.
+ */
+ displaySiteUrl(site: CoreSiteBasicInfo): boolean {
+ return CoreSites.shouldDisplayInformativeLinks(site.siteUrl);
+ }
+
}
diff --git a/src/core/features/contentlinks/components/choose-site-modal/choose-site-modal.html b/src/core/features/contentlinks/components/choose-site-modal/choose-site-modal.html
index 93d5b734e..49f14b326 100644
--- a/src/core/features/contentlinks/components/choose-site-modal/choose-site-modal.html
+++ b/src/core/features/contentlinks/components/choose-site-modal/choose-site-modal.html
@@ -16,7 +16,7 @@
{{ 'core.contentlinks.chooseaccounttoopenlink' | translate }}
- {{ url }}
+ {{ url }}
@@ -27,7 +27,7 @@
- {{site.siteUrl}}
+ {{site.siteUrl}}
diff --git a/src/core/features/contentlinks/components/choose-site-modal/choose-site-modal.ts b/src/core/features/contentlinks/components/choose-site-modal/choose-site-modal.ts
index 66297a2a8..1bcbe6325 100644
--- a/src/core/features/contentlinks/components/choose-site-modal/choose-site-modal.ts
+++ b/src/core/features/contentlinks/components/choose-site-modal/choose-site-modal.ts
@@ -34,6 +34,7 @@ export class CoreContentLinksChooseSiteModalComponent implements OnInit {
sites: CoreSiteBasicInfo[] = [];
loaded = false;
+ displaySiteUrl = false;
protected action?: CoreContentLinksAction;
protected isRootURL = false;
@@ -70,6 +71,9 @@ export class CoreContentLinksChooseSiteModalComponent implements OnInit {
// Get the sites that can perform the action.
this.sites = await CoreSites.getSites(siteIds);
+
+ // All sites have the same URL, use the first one.
+ this.displaySiteUrl = CoreSites.shouldDisplayInformativeLinks(this.sites[0].siteUrl);
} catch (error) {
CoreDomUtils.showErrorModalDefault(error, 'core.contentlinks.errornosites', true);
this.closeModal();
diff --git a/src/core/features/course/components/module-summary/module-summary.ts b/src/core/features/course/components/module-summary/module-summary.ts
index e2f1415a4..8500ecd47 100644
--- a/src/core/features/course/components/module-summary/module-summary.ts
+++ b/src/core/features/course/components/module-summary/module-summary.ts
@@ -101,7 +101,7 @@ export class CoreCourseModuleSummaryComponent implements OnInit, OnDestroy {
}
this.displayOptions = Object.assign({
- displayOpenInBrowser: true,
+ displayOpenInBrowser: CoreSites.shouldDisplayInformativeLinks(),
displayDescription: true,
displayRefresh: true,
displayPrefetch: true,
diff --git a/src/core/features/course/pages/course-summary/course-summary.html b/src/core/features/course/pages/course-summary/course-summary.html
index 373dda5ae..b491d89a5 100644
--- a/src/core/features/course/pages/course-summary/course-summary.html
+++ b/src/core/features/course/pages/course-summary/course-summary.html
@@ -45,7 +45,7 @@
-
diff --git a/src/core/features/course/pages/course-summary/course-summary.page.ts b/src/core/features/course/pages/course-summary/course-summary.page.ts
index b43a91a6f..4e6c5547b 100644
--- a/src/core/features/course/pages/course-summary/course-summary.page.ts
+++ b/src/core/features/course/pages/course-summary/course-summary.page.ts
@@ -72,6 +72,7 @@ export class CoreCourseSummaryPage implements OnInit, OnDestroy {
courseUrl = '';
progress?: number;
courseMenuHandlers: CoreCourseOptionsMenuHandlerToDisplay[] = [];
+ displayOpenInBrowser = false;
protected actionSheet?: HTMLIonActionSheetElement;
protected waitStart = 0;
@@ -137,6 +138,7 @@ export class CoreCourseSummaryPage implements OnInit, OnDestroy {
const currentSiteUrl = CoreSites.getRequiredCurrentSite().getURL();
this.enrolUrl = CorePath.concatenatePaths(currentSiteUrl, 'enrol/index.php?id=' + this.courseId);
this.courseUrl = CorePath.concatenatePaths(currentSiteUrl, 'course/view.php?id=' + this.courseId);
+ this.displayOpenInBrowser = CoreSites.shouldDisplayInformativeLinks();
await this.getCourse();
}
diff --git a/src/core/features/course/pages/module-preview/module-preview.html b/src/core/features/course/pages/module-preview/module-preview.html
index 7df03de9d..c6e3cb528 100644
--- a/src/core/features/course/pages/module-preview/module-preview.html
+++ b/src/core/features/course/pages/module-preview/module-preview.html
@@ -11,8 +11,8 @@
-
+
diff --git a/src/core/features/course/pages/module-preview/module-preview.ts b/src/core/features/course/pages/module-preview/module-preview.ts
index 5779ea379..fc154b4bd 100644
--- a/src/core/features/course/pages/module-preview/module-preview.ts
+++ b/src/core/features/course/pages/module-preview/module-preview.ts
@@ -22,6 +22,7 @@ import { CoreCourseHelper, CoreCourseModuleData, CoreCourseSection } from '@feat
import { CoreCourseModuleDelegate } from '@features/course/services/module-delegate';
import { IonRefresher } from '@ionic/angular';
import { CoreNavigator } from '@services/navigator';
+import { CoreSites } from '@services/sites';
import { CoreDomUtils } from '@services/utils/dom';
import { CoreUtils } from '@services/utils/utils';
@@ -43,6 +44,7 @@ export class CoreCourseModulePreviewPage implements OnInit {
unsupported = false;
isDisabledInSite = false;
showManualCompletion = false;
+ displayOpenInBrowser = false;
protected debouncedUpdateModule?: () => void; // Update the module after a certain time.
@@ -62,6 +64,7 @@ export class CoreCourseModulePreviewPage implements OnInit {
return;
}
+ this.displayOpenInBrowser = CoreSites.shouldDisplayInformativeLinks();
this.debouncedUpdateModule = CoreUtils.debounce(() => {
this.doRefresh();
}, 10000);
diff --git a/src/core/features/login/pages/credentials/credentials.html b/src/core/features/login/pages/credentials/credentials.html
index 3c76002c6..300cb545f 100644
--- a/src/core/features/login/pages/credentials/credentials.html
+++ b/src/core/features/login/pages/credentials/credentials.html
@@ -32,7 +32,7 @@
- {{siteUrl}}
+ {{siteUrl}}
= 3"
diff --git a/src/core/features/login/pages/credentials/credentials.ts b/src/core/features/login/pages/credentials/credentials.ts
index 0fd50c1a0..87dc45aaf 100644
--- a/src/core/features/login/pages/credentials/credentials.ts
+++ b/src/core/features/login/pages/credentials/credentials.ts
@@ -62,6 +62,7 @@ export class CoreLoginCredentialsPage implements OnInit, OnDestroy {
siteConfig?: CoreSitePublicConfigResponse;
siteCheckError = '';
isDemoModeSite = false;
+ displaySiteUrl = false;
protected siteCheck?: CoreSiteCheckResponse;
protected eventThrown = false;
@@ -97,6 +98,7 @@ export class CoreLoginCredentialsPage implements OnInit, OnDestroy {
undefined;
this.urlToOpen = CoreNavigator.getRouteParam('urlToOpen');
this.supportConfig = this.siteConfig && new CoreUserGuestSupportConfig(this.siteConfig);
+ this.displaySiteUrl = CoreSites.shouldDisplayInformativeLinks(this.siteUrl);
} catch (error) {
CoreDomUtils.showErrorModal(error);
diff --git a/src/core/features/login/pages/email-signup/email-signup.html b/src/core/features/login/pages/email-signup/email-signup.html
index bab9fbf09..cf0f19945 100644
--- a/src/core/features/login/pages/email-signup/email-signup.html
+++ b/src/core/features/login/pages/email-signup/email-signup.html
@@ -82,12 +82,12 @@
- {{siteUrl}}
+ {{siteUrl}}
- {{siteUrl}}
+ {{siteUrl}}
diff --git a/src/core/features/login/pages/email-signup/email-signup.ts b/src/core/features/login/pages/email-signup/email-signup.ts
index c3f2da50f..4f22041be 100644
--- a/src/core/features/login/pages/email-signup/email-signup.ts
+++ b/src/core/features/login/pages/email-signup/email-signup.ts
@@ -53,6 +53,7 @@ export class CoreLoginEmailSignupPage implements OnInit {
signupForm: FormGroup;
siteUrl!: string;
isDemoModeSite = false;
+ displaySiteUrl = false;
siteConfig?: CoreSitePublicConfigResponse;
siteName?: string;
authInstructions = '';
@@ -130,6 +131,7 @@ export class CoreLoginEmailSignupPage implements OnInit {
this.siteUrl = siteUrl;
this.isDemoModeSite = CoreLoginHelper.isDemoModeSite(this.siteUrl);
+ this.displaySiteUrl = CoreSites.shouldDisplayInformativeLinks(this.siteUrl);
// Fetch the data.
this.fetchData().finally(() => {
diff --git a/src/core/features/login/pages/reconnect/reconnect.html b/src/core/features/login/pages/reconnect/reconnect.html
index bfc6ed6b1..af0a6e681 100644
--- a/src/core/features/login/pages/reconnect/reconnect.html
+++ b/src/core/features/login/pages/reconnect/reconnect.html
@@ -40,7 +40,7 @@
- {{siteUrl}}
+ {{siteUrl}}
diff --git a/src/core/features/login/pages/reconnect/reconnect.ts b/src/core/features/login/pages/reconnect/reconnect.ts
index 3f808d09a..fced74706 100644
--- a/src/core/features/login/pages/reconnect/reconnect.ts
+++ b/src/core/features/login/pages/reconnect/reconnect.ts
@@ -48,6 +48,7 @@ export class CoreLoginReconnectPage implements OnInit, OnDestroy {
siteUrl!: string;
isDemoModeSite = false;
logoUrl?: string;
+ displaySiteUrl = false;
showForgottenPassword = true;
showUserAvatar = false;
isBrowserSSO = false;
@@ -103,6 +104,7 @@ export class CoreLoginReconnectPage implements OnInit, OnDestroy {
this.siteUrl = site.getURL();
this.isDemoModeSite = site.isDemoModeSite();
+ this.displaySiteUrl = CoreSites.shouldDisplayInformativeLinks(site);
this.siteInfo = {
id: this.siteId,
@@ -114,7 +116,6 @@ export class CoreLoginReconnectPage implements OnInit, OnDestroy {
siteName: await site.getSiteName(),
userpictureurl: site.infos.userpictureurl,
loggedOut: true, // Not used.
- isDemoModeSite: this.isDemoModeSite,
};
this.username = site.infos.username;
diff --git a/src/core/features/login/pages/site/site.html b/src/core/features/login/pages/site/site.html
index ae1a62c8b..d4dd1aae5 100644
--- a/src/core/features/login/pages/site/site.html
+++ b/src/core/features/login/pages/site/site.html
@@ -127,7 +127,7 @@
{{site.title}}
- {{site.noProtocolUrl}}
+ {{site.noProtocolUrl}}
{{site.location}}
diff --git a/src/core/features/login/pages/site/site.ts b/src/core/features/login/pages/site/site.ts
index c65c3035c..372d7786e 100644
--- a/src/core/features/login/pages/site/site.ts
+++ b/src/core/features/login/pages/site/site.ts
@@ -629,6 +629,20 @@ export class CoreLoginSitePage implements OnInit {
CoreNavigator.navigate('/settings');
}
+ /**
+ * Check whether site URL should be displayed.
+ *
+ * @param siteUrl Site URL.
+ * @returns Whether to display URL.
+ */
+ displaySiteUrl(siteUrl?: string): boolean {
+ if (!siteUrl) {
+ return false;
+ }
+
+ return CoreSites.shouldDisplayInformativeLinks(siteUrl);
+ }
+
}
/**
diff --git a/src/core/features/mainmenu/components/user-menu/user-menu.html b/src/core/features/mainmenu/components/user-menu/user-menu.html
index 5360b352a..de361493a 100644
--- a/src/core/features/mainmenu/components/user-menu/user-menu.html
+++ b/src/core/features/mainmenu/components/user-menu/user-menu.html
@@ -15,8 +15,9 @@
-