Gerhard Schlager dac0e5b3cc
Merge pull request #10519 from gschlager/get-url
Fixes for getURL() in subfolders and basePath in translations
2020-08-25 11:42:50 +02:00

11 lines
398 B
JavaScript

import { registerUnbound } from "discourse-common/lib/helpers";
import getUrl from "discourse-common/lib/get-url";
import deprecated from "discourse-common/lib/deprecated";
registerUnbound("get-url", value => getUrl(value));
registerUnbound("base-url", () => {
deprecated("Use `{{base-path}}` instead of `{{base-url}}`");
return getUrl("");
});
registerUnbound("base-path", () => getUrl(""));