Commit e0b29e26 authored by wmortada's avatar wmortada

Check for existence of functions in case they haven't been defined

parent ac2b0d29
......@@ -1840,9 +1840,19 @@ function getSiteDir($cmsPath, $str) {
* @param $showRefer
*/
function errorDisplayPage($errorTitle, $errorMsg, $showRefer = TRUE) {
// Add a link to the documentation
if ($showRefer) {
$docLink = CRM_Utils_System::docURL2('Installation and Upgrades', FALSE, 'Installation Guide', NULL, NULL, "wiki");
$errorMsg .= '<p>' . ts("Refer to the online documentation for more information: ") . $docLink . '</p>';
if (is_callable(array('CRM_Utils_System', 'docURL2'))) {
$docLink = CRM_Utils_System::docURL2('Installation and Upgrades', FALSE, 'Installation Guide', NULL, NULL, "wiki");
}
if (function_exists('ts')) {
$errorMsg .= '<p>' . ts("Refer to the online documentation for more information: ") . $docLink . '</p>';
}
else {
$errorMsg .= '<p>' . 'Refer to the online documentation for more information: ' . $docLink . '</p>';
}
}
include 'error.html';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment