From e48985cac5f3a9201aa95b5747dd558d08460fce Mon Sep 17 00:00:00 2001 From: "deb.monish" Date: Wed, 21 Feb 2018 13:25:52 +0530 Subject: [PATCH] CRM-21787: Keep up-to-date without running GenCode on all builds --- CRM/Utils/System.php | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/CRM/Utils/System.php b/CRM/Utils/System.php index a253b091c0..5d2e762622 100644 --- a/CRM/Utils/System.php +++ b/CRM/Utils/System.php @@ -1074,25 +1074,12 @@ class CRM_Utils_System { if (!$version) { $verFile = implode(DIRECTORY_SEPARATOR, - array(dirname(__FILE__), '..', '..', 'civicrm-version.php') + array(dirname(__FILE__), '..', '..', 'xml', 'version.xml') ); if (file_exists($verFile)) { - require_once $verFile; - if (function_exists('civicrmVersion')) { - $info = civicrmVersion(); - $version = $info['version']; - } - } - else { - // svn installs don't have version.txt by default. In that case version.xml should help - - $verFile = implode(DIRECTORY_SEPARATOR, - array(dirname(__FILE__), '..', '..', 'xml', 'version.xml') - ); - if (file_exists($verFile)) { - $str = file_get_contents($verFile); - $xmlObj = simplexml_load_string($str); - $version = (string) $xmlObj->version_no; - } + $str = file_get_contents($verFile); + $xmlObj = simplexml_load_string($str); + $version = (string) $xmlObj->version_no; } // pattern check -- 2.25.1