CRM-21787: Keep up-to-date without running GenCode on all builds
authordeb.monish <monish.deb@jmaconsulting.biz>
Wed, 21 Feb 2018 07:55:52 +0000 (13:25 +0530)
committerdeb.monish <monish.deb@jmaconsulting.biz>
Wed, 21 Feb 2018 09:42:20 +0000 (15:12 +0530)
CRM/Utils/System.php

index a253b091c047da1afb7db6ade020221cbc73312d..5d2e762622aea58e4684f28fa428def99fc12cde 100644 (file)
@@ -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