|
@@ -34,6 +34,19 @@ class Schema_SystemObjectFieldStorageAcl extends Core_AclSimpleSchemaBase {
|
|
|
public $_rootTableName = 'CRM_#CACHE_ACL_OBJECT_FIELD';
|
|
public $_rootTableName = 'CRM_#CACHE_ACL_OBJECT_FIELD';
|
|
|
public $_version = '1';
|
|
public $_version = '1';
|
|
|
|
|
|
|
|
|
|
+ public static function getAntAclXsdBasePath($typeName) {
|
|
|
|
|
+ $antAclPath = null;
|
|
|
|
|
+ if ($activeProject = Config::getProjectPath()) {
|
|
|
|
|
+ $tryProjectSchemaPath = "{$activeProject}/schema/ant-object/" . str_replace(['__x3A__', ':'], ['.', '/'], $typeName);
|
|
|
|
|
+ if (file_exists($tryProjectSchemaPath)) {
|
|
|
|
|
+ $antAclPath = $tryProjectSchemaPath;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!$antAclPath) {
|
|
|
|
|
+ $antAclPath = APP_PATH_SCHEMA . DS . 'ant-object' . DS . str_replace(['__x3A__', ':'], ['.', '/'], $typeName);
|
|
|
|
|
+ }
|
|
|
|
|
+ return $antAclPath;
|
|
|
|
|
+ }
|
|
|
public function updateCache($namespace = null) {
|
|
public function updateCache($namespace = null) {
|
|
|
DBG::log("SystemObjectField::updateCache({$namespace})...");
|
|
DBG::log("SystemObjectField::updateCache({$namespace})...");
|
|
|
DB::getPDO()->execSql("
|
|
DB::getPDO()->execSql("
|
|
@@ -120,7 +133,7 @@ class Schema_SystemObjectFieldStorageAcl extends Core_AclSimpleSchemaBase {
|
|
|
|
|
|
|
|
public function updateCacheAntAcl($item) {
|
|
public function updateCacheAntAcl($item) {
|
|
|
Lib::loadClass('AntAclBase');
|
|
Lib::loadClass('AntAclBase');
|
|
|
- $antAclPath = APP_PATH_SCHEMA . DS . 'ant-object' . DS . str_replace(['__x3A__', ':'], ['.', '/'], $item['typeName']);
|
|
|
|
|
|
|
+ $antAclPath = Schema_SystemObjectFieldStorageAcl::getAntAclXsdBasePath($item['typeName']);
|
|
|
if (!file_exists("{$antAclPath}/build.xml")) throw new Exception("Ant build file not exists");
|
|
if (!file_exists("{$antAclPath}/build.xml")) throw new Exception("Ant build file not exists");
|
|
|
|
|
|
|
|
Lib::loadClass('XML');
|
|
Lib::loadClass('XML');
|