Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update civicrmtheme module to use new isFrontEndPage function on user… #581

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions modules/civicrmtheme/civicrmtheme.module
Original file line number Diff line number Diff line change
Expand Up @@ -117,17 +117,10 @@ function civicrmtheme_custom_theme() {
return;
}

// Get the menu items.
$args = explode('?', $_GET['q']);
$path = $args[0];

// Get the menu for above URL.
$item = CRM_Core_Menu::get($path);

// Check for public pages
// If public page and civicrm public theme is set, apply civicrm public theme
// If user does not have access to CiviCRM use the public page for the error message
if (!user_access('access CiviCRM') || CRM_Utils_Array::value('is_public', $item)) {
if (!user_access('access CiviCRM') || CRM_Core_Config::singleton()->userSystem->isFrontEndPage()) {
if ($public_theme) {
return $public_theme;
}
Expand Down