Переглянути джерело

fixed update Storage schema list

Piotr Labudda 8 роки тому
батько
коміт
d04da5cadd
1 змінених файлів з 17 додано та 16 видалено
  1. 17 16
      SE/se-lib/Schema/SystemObjectStorageAcl.php

+ 17 - 16
SE/se-lib/Schema/SystemObjectStorageAcl.php

@@ -174,6 +174,7 @@ class Schema_SystemObjectStorageAcl extends Core_AclSimpleSchemaBase {
 								, t.TABLE_COMMENT as description
 							from INFORMATION_SCHEMA.TABLES t
 							where t.TABLE_SCHEMA = '{$dbName}'
+								and t.TABLE_NAME not like '%#%'
 							on duplicate key update _rootTableName = t.TABLE_NAME
 						");
 						DB::getPDO()->execSql("
@@ -205,21 +206,21 @@ class Schema_SystemObjectStorageAcl extends Core_AclSimpleSchemaBase {
 		}
 
 		// Ant objects in: SE/schema/ant-object/
-		foreach (glob(APP_PATH_SCHEMA . "/ant-object/*/*/build.xml", GLOB_NOSORT) as $file) {
+		foreach (glob(APP_PATH_SCHEMA . "/ant-object/*/*/build.xml", GLOB_NOSORT) as $buildXmlPath) {
 			// SE/schema/ant-object/default_db.test_perms/TestPermsAnt/build.xml
-			$file = substr($file, strlen(APP_PATH_SCHEMA . '/ant-object/'), -1 * strlen('/build.xml'));
-			DBG::nicePrint($file, '$file');
+			$file = substr($buildXmlPath, strlen(APP_PATH_SCHEMA . '/ant-object/'), -1 * strlen('/build.xml'));
+			DBG::nicePrint($file, "file({$file})");
 			list($partSource, $name) = explode('/', $file);
 			list($sourceName, $rootTableName) = explode('.', $partSource);
-			DBG::nicePrint([$sourceName, $rootTableName, $name], '[$lowerSource, $rootTableName, $name]');
+			DBG::nicePrint([$sourceName, $rootTableName], "\$name='{$name}' - [\$lowerSource, \$rootTableName]");
 			// $clsName = substr(basename($file), 0, -1 * strlen('StorageAcl.php'));
 			try {
-				Lib::loadClass('AntAclBase');
-				$acl = AntAclBase::buildInstance(0, [
-					'source' => $sourceName,
-					'rootTableName' => $rootTableName,
-					'name' => $name
-				]);
+				// Lib::loadClass('AntAclBase');
+				// $acl = AntAclBase::buildInstance(0, [
+				// 	'source' => $sourceName,
+				// 	'rootTableName' => $rootTableName,
+				// 	'name' => $name
+				// ]);
 				// $acl = SchemaFactory::loadDefaultObject($clsName);
 				// $namespace = $acl->getNamespace();
 				// $name = $acl->getName();
@@ -249,12 +250,12 @@ class Schema_SystemObjectStorageAcl extends Core_AclSimpleSchemaBase {
 				DBG::nicePrint([$sourceName, $rootTableName, $name], '[$lowerSource, $rootTableName, $name]');
 				// $clsName = substr(basename($file), 0, -1 * strlen('StorageAcl.php'));
 				try {
-					Lib::loadClass('AntAclBase');
-					$acl = AntAclBase::buildInstance(0, [
-						'source' => $sourceName,
-						'rootTableName' => $rootTableName,
-						'name' => $name
-					]);
+					// Lib::loadClass('AntAclBase');
+					// $acl = AntAclBase::buildInstance(0, [
+					// 	'source' => $sourceName,
+					// 	'rootTableName' => $rootTableName,
+					// 	'name' => $name
+					// ]);
 					// $acl = SchemaFactory::loadDefaultObject($clsName);
 					// $namespace = $acl->getNamespace();
 					// $name = $acl->getName();