Function without <base> tag

Closes #23
This commit is contained in:
Jonathon Menz 2016-07-22 15:26:01 -07:00
parent 1a02603fb4
commit 58fe5c8dd6
2 changed files with 5 additions and 5 deletions

View File

@ -35,7 +35,7 @@ class BetterNavigatorExtension extends DataExtension {
}
}
// Only show edit link if user has permission to edit this page
$editLink = (($this->owner->dataRecord->canEdit() && Permission::check('CMS_ACCESS_CMSMain')) || $isDev) ? $nav['CMSLink']['Link'] : false;
$editLink = (($this->owner->dataRecord->canEdit() && Permission::check('CMS_ACCESS_CMSMain')) || $isDev) ? Controller::join_links('/', $nav['CMSLink']['Link']) : false;
// Is the logged in member nominated as a developer?
$member = Member::currentUser();
@ -49,8 +49,8 @@ class BetterNavigatorExtension extends DataExtension {
'Member' => $member,
'Stage' => Versioned::current_stage(),
'Viewing' => $viewing, // What we're viewing doesn't necessarily align with the active Stage
'LoginLink' => Config::inst()->get('Security', 'login_url') . $backURL,
'LogoutLink' => 'Security/logout' . $backURL,
'LoginLink' => Controller::join_links('/', Config::inst()->get('Security', 'login_url'), $backURL),
'LogoutLink' => Controller::join_links('/Security/logout', $backURL),
'EditLink' => $editLink,
'Mode' => Director::get_environment_type(),
'IsDeveloper' => $isDeveloper

View File

@ -60,8 +60,8 @@
<% end_if %>
<a href="$Link?flush=1" title="Flush templates and manifest, and regenerate images for this page (behaviour varies by Framework version)"><span class="bn-icon-flush"></span>Flush caches</a>
<a href="dev/build/?flush=1" target="_blank" title="Build database and flush caches (excludes template caches pre SS-3.1.7)"><span class="bn-icon-db"></span>Build database</a>
<a href="dev" target="_blank"><span class="bn-icon-tools"></span>Dev menu</a>
<a href="/dev/build/?flush=1" target="_blank" title="Build database and flush caches (excludes template caches pre SS-3.1.7)"><span class="bn-icon-db"></span>Build database</a>
<a href="/dev/" target="_blank"><span class="bn-icon-tools"></span>Dev menu</a>
</div>