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

fixed php fatal error call to unknown function getComponentHelper() #51

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
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
6 changes: 4 additions & 2 deletions SiteHelper.php
Original file line number Diff line number Diff line change
@@ -81,7 +81,8 @@ class SiteHelper extends OntoWiki_Component_Helper

public function init()
{
$this->_relativeTemplatePath = $this->_owApp->extensionManager->getExtensionConfig('site')->templates;
//removing possible trailing slash with rtrim
$this->_relativeTemplatePath = rtrim($this->_owApp->extensionManager->getExtensionConfig('site')->templates, '/');
}

public function onAnnounceWorker($event)
@@ -657,8 +658,9 @@ public function loadModel()
// TODO: what if no site model configured?
if (!Erfurt_Uri::check($siteConfig['model'])) {
$site = $this->_privateConfig->defaultSite;
$root = $this->getComponentHelper()->getComponentRoot();
$root = $this->getComponentRoot();
$configFilePath = sprintf('%s%s/%s/%s', $root, $this->_relativeTemplatePath, $site, SiteHelper::SITE_CONFIG_FILENAME);

throw new OntoWiki_Exception(
'No model selected! Please, configure a site model by setting the option '
. '"model=..." in "' . $configFilePath . '" or specify parameter m in the URL.'