Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function appendSlashIfNecessary(accessUrl)
{
if (!accessUrl) {
return '';
}
if (!url.endsWithSlash(accessUrl) && !url.endsWithPhp(accessUrl)) {
accessUrl = accessUrl + '/';
}
return accessUrl;
}
function appendIndexPhpIfNecessary(accessUrl)
{
if (!accessUrl) {
return '';
}
accessUrl = appendSlashIfNecessary(accessUrl);
if (!url.endsWithPhp(accessUrl)) {
accessUrl = accessUrl + 'index.php';
}
return accessUrl;
}
getBasePath: function () {
var accessUrl = this.get('accessUrl');
if (!accessUrl) {
return '';
}
accessUrl = accessUrl + '';
if (url.endsWithPhp(accessUrl)) {
return url.getAbsolutePath(accessUrl);
}
accessUrl = appendSlashIfNecessary(accessUrl);
return accessUrl;
},