Skip to content
Snippets Groups Projects
Commit 0a67ff92 authored by jaapjansma's avatar jaapjansma
Browse files

Merge branch 'civix' into 'master'

Regenerate civix and fix php notice

See merge request !72
parents a7a45e0b 10cdfc46
No related branches found
No related tags found
1 merge request!72Regenerate civix and fix php notice
......@@ -31,7 +31,7 @@ class CRM_Dataprocessor_Upgrader_Base {
protected $extensionDir;
/**
* @var revisionNumber[]
* @var array
* sorted numerically
*/
private $revisions;
......@@ -47,10 +47,9 @@ class CRM_Dataprocessor_Upgrader_Base {
*/
public static function instance() {
if (!self::$instance) {
// FIXME auto-generate
self::$instance = new CRM_Dataprocessor_Upgrader(
'dataprocessor',
realpath(__DIR__ . '/../../../')
E::path()
);
}
return self::$instance;
......
......@@ -44,7 +44,7 @@ class CRM_DataprocessorSearch_Form_Search_Custom_DataprocessorSmartGroupIntegrat
* is saved.
* @param \Civi\Core\DAO\Event\PostUpdate $event
*/
public function alterSavedSearch(\Civi\Core\DAO\Event\PostUpdate $event) {
public static function alterSavedSearch(\Civi\Core\DAO\Event\PostUpdate $event) {
// Check whether we are saving saved search.
// And check whether a data processor search has been run.
if ($event->object instanceof \CRM_Contact_DAO_SavedSearch && self::$dataProcessorName) {
......
......@@ -7,9 +7,9 @@
* extension.
*/
class CRM_Dataprocessor_ExtensionUtil {
const SHORT_NAME = "dataprocessor";
const LONG_NAME = "dataprocessor";
const CLASS_PREFIX = "CRM_Dataprocessor";
const SHORT_NAME = 'dataprocessor';
const LONG_NAME = 'dataprocessor';
const CLASS_PREFIX = 'CRM_Dataprocessor';
/**
* Translate a string using the extension's domain.
......@@ -193,8 +193,9 @@ function _dataprocessor_civix_civicrm_disable() {
* @param $op string, the type of operation being performed; 'check' or 'enqueue'
* @param $queue CRM_Queue_Queue, (for 'enqueue') the modifiable list of pending up upgrade tasks
*
* @return mixed based on op. for 'check', returns array(boolean) (TRUE if upgrades are pending)
* for 'enqueue', returns void
* @return mixed
* based on op. for 'check', returns array(boolean) (TRUE if upgrades are pending)
* for 'enqueue', returns void
*
* @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_upgrade
*/
......@@ -225,7 +226,7 @@ function _dataprocessor_civix_upgrader() {
* @param string $dir base dir
* @param string $pattern , glob pattern, eg "*.txt"
*
* @return array(string)
* @return array
*/
function _dataprocessor_civix_find_files($dir, $pattern) {
if (is_callable(['CRM_Utils_File', 'findFiles'])) {
......@@ -244,7 +245,7 @@ function _dataprocessor_civix_find_files($dir, $pattern) {
if ($dh = opendir($subdir)) {
while (FALSE !== ($entry = readdir($dh))) {
$path = $subdir . DIRECTORY_SEPARATOR . $entry;
if ($entry{0} == '.') {
if ($entry[0] == '.') {
}
elseif (is_dir($path)) {
$todos[] = $path;
......@@ -255,6 +256,7 @@ function _dataprocessor_civix_find_files($dir, $pattern) {
}
return $result;
}
/**
* (Delegated) Implements hook_civicrm_managed().
*
......@@ -362,7 +364,7 @@ function _dataprocessor_civix_civicrm_themes(&$themes) {
* @link http://php.net/glob
* @param string $pattern
*
* @return array, possibly empty
* @return array
*/
function _dataprocessor_civix_glob($pattern) {
$result = glob($pattern);
......@@ -470,38 +472,32 @@ function _dataprocessor_civix_civicrm_alterSettingsFolders(&$metaDataFolders = N
*
* @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_entityTypes
*/
function _dataprocessor_civix_civicrm_entityTypes(&$entityTypes) {
$entityTypes = array_merge($entityTypes, array (
'CRM_Dataprocessor_DAO_DataProcessor' =>
array (
$entityTypes = array_merge($entityTypes, [
'CRM_Dataprocessor_DAO_DataProcessor' => [
'name' => 'DataProcessor',
'class' => 'CRM_Dataprocessor_DAO_DataProcessor',
'table' => 'civicrm_data_processor',
),
'CRM_Dataprocessor_DAO_DataProcessorField' =>
array (
],
'CRM_Dataprocessor_DAO_DataProcessorField' => [
'name' => 'DataProcessorField',
'class' => 'CRM_Dataprocessor_DAO_DataProcessorField',
'table' => 'civicrm_data_processor_field',
),
'CRM_Dataprocessor_DAO_DataProcessorFilter' =>
array (
],
'CRM_Dataprocessor_DAO_DataProcessorFilter' => [
'name' => 'DataProcessorFilter',
'class' => 'CRM_Dataprocessor_DAO_DataProcessorFilter',
'table' => 'civicrm_data_processor_filter',
),
'CRM_Dataprocessor_DAO_DataProcessorOutput' =>
array (
],
'CRM_Dataprocessor_DAO_DataProcessorOutput' => [
'name' => 'DataProcessorOutput',
'class' => 'CRM_Dataprocessor_DAO_DataProcessorOutput',
'table' => 'civicrm_data_processor_output',
),
'CRM_Dataprocessor_DAO_DataProcessorSource' =>
array (
],
'CRM_Dataprocessor_DAO_DataProcessorSource' => [
'name' => 'DataProcessorSource',
'class' => 'CRM_Dataprocessor_DAO_DataProcessorSource',
'table' => 'civicrm_data_processor_source',
),
));
],
]);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment