From 2469a0dd13695aef1d8fe989f39b968d3f334405 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 14 Jan 2014 20:10:48 -0800 Subject: [PATCH] GenCode - Cleanup --- CRM/Core/CodeGen/Util/File.php | 5 ++--- xml/GenCode.php | 18 +++++++++--------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/CRM/Core/CodeGen/Util/File.php b/CRM/Core/CodeGen/Util/File.php index 630e07026e..cb5f4f2c2d 100644 --- a/CRM/Core/CodeGen/Util/File.php +++ b/CRM/Core/CodeGen/Util/File.php @@ -48,9 +48,9 @@ class CRM_Core_CodeGen_Util_File { } /** - * Find the paths to all key files involved in the gen-code process + * Find the path to the main Civi source tree * - * @return array + * @return string * @throws RuntimeException */ static function findCoreSourceDir() { @@ -65,7 +65,6 @@ class CRM_Core_CodeGen_Util_File { /** * Find files in several directories using several filename patterns * - * * @param array $pairs each item is an array(0 => $searchBaseDir, 1 => $filePattern) * @return array of file paths */ diff --git a/xml/GenCode.php b/xml/GenCode.php index 797bad1434..285582a9c0 100644 --- a/xml/GenCode.php +++ b/xml/GenCode.php @@ -22,14 +22,14 @@ CRM_Core_ClassLoader::singleton()->register(); # TODO: pull these settings from configuration $genCode = new CRM_Core_CodeGen_Main( - '../CRM/Core/DAO/', // $CoreDAOCodePath - '../sql/', // $sqlCodePath - '../', // $phpCodePath - '../templates/', // $tplCodePath - array('../packages/Smarty/plugins', '../CRM/Core/Smarty/plugins'), // smarty plugin dirs - @$argv[3], // cms - empty($argv[2]) ? NULL : $argv[2], // db version - empty($argv[1]) ? 'schema/Schema.xml' : $argv[1], // schem afile - getenv('CIVICRM_GENCODE_DIGEST') ? getenv('CIVICRM_GENCODE_DIGEST') : NULL + '../CRM/Core/DAO/', // $CoreDAOCodePath + '../sql/', // $sqlCodePath + '../', // $phpCodePath + '../templates/', // $tplCodePath + array('../packages/Smarty/plugins', '../CRM/Core/Smarty/plugins'), // smarty plugin dirs + @$argv[3], // cms + empty($argv[2]) ? NULL : $argv[2], // db version + empty($argv[1]) ? 'schema/Schema.xml' : $argv[1], // schema file + getenv('CIVICRM_GENCODE_DIGEST') ? getenv('CIVICRM_GENCODE_DIGEST') : NULL // path to digest file ); $genCode->main(); -- 2.25.1