|
@@ 791-795 (lines=5) @@
|
| 788 |
|
|
| 789 |
|
$filepath = "$this->path/$filename"; |
| 790 |
|
|
| 791 |
|
if (!$this->canReadFile($filename)) { |
| 792 |
|
$msg = _elgg_services()->translator->translate('ElggPlugin:Exception:CannotIncludeFile', |
| 793 |
|
array($filename, $this->getID(), $this->guid, $this->path)); |
| 794 |
|
throw new \PluginException($msg); |
| 795 |
|
} |
| 796 |
|
|
| 797 |
|
return include $filepath; |
| 798 |
|
} |
|
@@ 817-821 (lines=5) @@
|
| 814 |
|
* @return void |
| 815 |
|
*/ |
| 816 |
|
protected function registerViews() { |
| 817 |
|
if (!_elgg_services()->views->registerPluginViews($this->path, $failed_dir)) { |
| 818 |
|
$msg = _elgg_services()->translator->translate('ElggPlugin:Exception:CannotRegisterViews', |
| 819 |
|
array($this->getID(), $this->guid, $failed_dir)); |
| 820 |
|
throw new \PluginException($msg); |
| 821 |
|
} |
| 822 |
|
} |
| 823 |
|
|
| 824 |
|
/** |
|
@@ 839-843 (lines=5) @@
|
| 836 |
|
} |
| 837 |
|
|
| 838 |
|
// but need to have working ones. |
| 839 |
|
if (!_elgg_services()->translator->registerTranslations($languages_path)) { |
| 840 |
|
$msg = _elgg_services()->translator->translate('ElggPlugin:Exception:CannotRegisterLanguages', |
| 841 |
|
array($this->getID(), $this->guid, $languages_path)); |
| 842 |
|
throw new \PluginException($msg); |
| 843 |
|
} |
| 844 |
|
|
| 845 |
|
return true; |
| 846 |
|
} |