Установка модуля Gantt (KumbeGantt) в последние версии SugarCRM (на данный момент v.6.5.11) вызывает затруднение, т.к. модуль давно не обновлялся и предназначен для SugarCRM v.5.1. УстановкаСкачиваем модуль с sugarforge.org Переходим в меню "/index.php?module=Administration&action=UpgradeWizard&view=module": Admin -> Module Loader -> Выберите архив с модулем, загрузите, нажмите кнопку Install . Проверяем: переходим в Projects и ... ничего не находим. Теперь необходимо добавить пункт меню Gantt. НастройкаПроверяем, есть ли файл /custom/modules/Project/Ext/Menus/menu.ext.php, при отсутствии - создаем и вставляем: <?php require_once('include/database/PearDatabase.php'); // Gantt if(ACLController::checkAccess('Project', 'list', true)) { $module_menu[] = array('index.php?module=Project&action=gantt','Gantt' ); } ?> Вторая строка обязательна, проверьте! Далее проверяем наличие файла /include/database/PearDatabase.php, если нет - создаем и вставляем текст: <?php if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); require_once('include/database/DBManager.php'); /** * @deprecated */ class PearDatabase { /** * Returns DBManager instance * * @deprecated * @param string $instanceName optional, name of the instance * @return object DBManager instance */ public static function getInstance($instanceName='') { $GLOBALS['log']->info('call to PearDatabase::getInstance() is deprecated'); return DBManagerFactory::getInstance($instanceName); } /** * Returns a quoted string * * @deprecated * @param string $string * @param bool $isLike optional * @return string */ public static function quote( $string, $isLike = true ) { $GLOBALS['log']->info('call to PearDatabase::quote() is deprecated'); return $GLOBALS['db']->quote($string, $isLike); } /** * Returns a quoted string for email * * @deprecated * @param string $string * @param bool $isLike optional * @return string */ public static function quoteForEmail( $string, $isLike = true ) { $GLOBALS['log']->info('call to PearDatabase::quoteForEmail() is deprecated'); return $GLOBALS['db']->quoteForEmail($string, $isLike); } /** * Quotes each string in the given array * * @deprecated * @param array $array * @param bool $isLike optional * @return string */ public static function arrayQuote( array &$array, $isLike = true ) { $GLOBALS['log']->info('call to PearDatabase::arrayQuote() is deprecated'); return $GLOBALS['db']->arrayQuote($array, $isLike); } /** * Truncates a string to a given length * * @deprecated * @param string $string * @param int $len length to trim to * @param string */ public static function truncate( $string, $len ) { $GLOBALS['log']->info('call to PearDatabase::truncate() is deprecated'); if ( is_numeric($len) && $len > 0 ) $string=mb_substr($string,0,(int) $len); return $string; } } ?> Теперь открываем файл /custom/modules/Project/gantt.php и меняем строку 170 (для того, чтобы название задачи отображалось в нормальной кодировке, а не кракозябрами): $xml = utf8_encode(get_xml_sugar($db,$sugarfields,array("SUGARVERSION"=>"5","DEBUG"=>false,"CONDITIONS"=>$array_conditions))); на $xml = (get_xml_sugar($db,$sugarfields,array("SUGARVERSION"=>"5","DEBUG"=>false,"CONDITIONS"=>$array_conditions))); Проверяем )) UPD. Дмитрий Боровиков написал, что модуль Gantt работает и на SugarCRM 6.5.16 и предложил русификатор Kumbegantt-1.3_ru.zip |
