diff --git a/include/install/resources/utils.php b/include/install/resources/utils.php index ff4e437a..3196871d 100644 --- a/include/install/resources/utils.php +++ b/include/install/resources/utils.php @@ -135,7 +135,7 @@ static function checkDbConnection($db_type, $db_hostname, $db_hostport, $db_user $db_exist_status = true; if(!$db_utf8_support) { // Check if the database that we are going to use supports UTF-8 - $db_utf8_support = check_db_utf8_support($conn); + $db_utf8_support = self::check_db_utf8_support($conn); } } $conn->Close(); @@ -175,7 +175,7 @@ static function checkDbConnection($db_type, $db_hostname, $db_hostport, $db_user //crmv@208173 //Added to check database charset and $default_charset are set to UTF8. //If both are not set to be UTF-8, Then we will show an alert message. - function check_db_utf8_support($conn) { + static function check_db_utf8_support($conn) { global $db_type; //crmv@charset if($db_type !== 'mysql') @@ -1061,4 +1061,4 @@ function get_logo_install($mode){ return $logo_path; } //crmv@18123e -?> \ No newline at end of file +?> diff --git a/modules/ModComments/ModComments.php b/modules/ModComments/ModComments.php index 9e902085..154b3e33 100644 --- a/modules/ModComments/ModComments.php +++ b/modules/ModComments/ModComments.php @@ -94,9 +94,11 @@ static function addWidgetTo($moduleNames, $widgetType='DETAILVIEWWIDGET', $widge } if ($commentWidgetCount) { $modCommentsModule = Vtecrm_Module::getInstance('ModComments'); - $modCommentsModule->addLink('HEADERSCRIPT', 'ModCommentsCommonHeaderScript', 'modules/ModComments/ModCommentsCommon.js'); - $modCommentsRelatedToField = Vtecrm_Field::getInstance('related_to', $modCommentsModule); - $modCommentsRelatedToField->setRelatedModules($moduleNames); + if (is_object($modCommentsModule)) { + $modCommentsModule->addLink('HEADERSCRIPT', 'ModCommentsCommonHeaderScript', 'modules/ModComments/ModCommentsCommon.js'); + $modCommentsRelatedToField = Vtecrm_Field::getInstance('related_to', $modCommentsModule); + $modCommentsRelatedToField->setRelatedModules($moduleNames); + } } } @@ -149,4 +151,4 @@ function addWidgetToAll() { } } } -?> \ No newline at end of file +?> diff --git a/modules/MyNotes/MyNotes.php b/modules/MyNotes/MyNotes.php index 9cc720ed..be80b4e8 100644 --- a/modules/MyNotes/MyNotes.php +++ b/modules/MyNotes/MyNotes.php @@ -243,7 +243,7 @@ function addWidgetTo($moduleNames, $onlyWidget=false, $widgetType='DETAILVIEWWID Array($currentModuleInstance->id, $module->id, 'get_related_list', $moduleName)); if ($check && $adb->num_rows($check) > 0) { // do nothing - } else { + } else if (is_object($currentModuleInstance) && method_exists($currentModuleInstance,'setRelatedList')){ $currentModuleInstance->setRelatedList($module, $moduleName, Array('SELECT','ADD'), 'get_related_list'); } } @@ -374,4 +374,4 @@ function getAdvancedPermissionFunction($is_admin,$module,$actionname,$record_id) } } } -?> \ No newline at end of file +?>