Skip to content

Commit

Permalink
CRM-19303 - Paths - Allow sysadmin to explicitly [civicrm.*] variables
Browse files Browse the repository at this point in the history
  • Loading branch information
totten committed Jun 15, 2017
1 parent 4ac7577 commit 313a57a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Civi/Core/Paths.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ public function register($name, $factory) {
public function getVariable($name, $attr) {
if (!isset($this->variables[$name])) {
$this->variables[$name] = call_user_func($this->variableFactory[$name]);
if (isset($GLOBALS['civicrm_paths'][$name])) {
$this->variables[$name] = array_merge($this->variables[$name], $GLOBALS['civicrm_paths'][$name]);
}
}
if (!isset($this->variables[$name][$attr])) {
throw new \RuntimeException("Cannot resolve path using \"$name.$attr\"");
Expand Down

0 comments on commit 313a57a

Please sign in to comment.