X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCase%2FInfo.php;h=7ee506fe4a161bcffd79d2073a1185a21abe98a3;hb=266a559f66f8242321969f8181b9c0f8c1ef5799;hp=d62a10cbdbcddc6353a8e3c13837a1e30282b541;hpb=bf7fd3d7f05a24667f4130e67e42695fbb6cab54;p=civicrm-core.git diff --git a/CRM/Case/Info.php b/CRM/Case/Info.php index d62a10cbdb..7ee506fe4a 100644 --- a/CRM/Case/Info.php +++ b/CRM/Case/Info.php @@ -1,7 +1,7 @@ ts('Cases'), + return array( + 'title' => ts('Cases'), 'url' => 'case', 'weight' => 50, ); } - // docs inherited from interface /** + * @inheritDoc * @return array */ public function registerAdvancedSearchPane() { - return array('title' => ts('Cases'), + return array( + 'title' => ts('Cases'), 'weight' => 50, ); } - // docs inherited from interface /** + * @inheritDoc * @return null */ public function getActivityTypes() { return NULL; } - // add shortcut to Create New /** + * add shortcut to Create New * @param $shortCuts */ public function creatNewShortcut(&$shortCuts) { @@ -190,11 +194,13 @@ class CRM_Case_Info extends CRM_Core_Component_Info { ); if ($atype) { $shortCuts = array_merge($shortCuts, array( - array('path' => 'civicrm/case/add', - 'query' => "reset=1&action=add&atype=$atype&context=standalone", - 'ref' => 'new-case', - 'title' => ts('Case'), - ))); + array( + 'path' => 'civicrm/case/add', + 'query' => "reset=1&action=add&atype=$atype&context=standalone", + 'ref' => 'new-case', + 'title' => ts('Case'), + ), + )); } } } @@ -205,9 +211,12 @@ class CRM_Case_Info extends CRM_Core_Component_Info { * * If CiviCase is being enabled, load the case related sample data * - * @param array $oldValue List of component names - * @param array $newValue List of component names - * @param array $metadata Specification of the setting (per *.settings.php) + * @param array $oldValue + * List of component names. + * @param array $newValue + * List of component names. + * @param array $metadata + * Specification of the setting (per *.settings.php). */ public static function onToggleComponents($oldValue, $newValue, $metadata) { if ( @@ -215,8 +224,9 @@ class CRM_Case_Info extends CRM_Core_Component_Info { && (!$oldValue || !in_array('CiviCase', $oldValue)) ) { + $pathToCaseSampleTpl = __DIR__ . '/xml/configuration.sample/'; $config = CRM_Core_Config::singleton(); - CRM_Admin_Form_Setting_Component::loadCaseSampleData($config->dsn, $config->sqlDir . 'case_sample.mysql'); + CRM_Admin_Form_Setting_Component::loadCaseSampleData($config->dsn, $pathToCaseSampleTpl . 'case_sample.mysql.tpl'); if (!CRM_Case_BAO_Case::createCaseViews()) { $msg = ts("Could not create the MySQL views for CiviCase. Your mysql user needs to have the 'CREATE VIEW' permission"); CRM_Core_Error::fatal($msg); @@ -224,4 +234,3 @@ class CRM_Case_Info extends CRM_Core_Component_Info { } } } -