Explorar el Código

fixed Api Xsd - skip tables with #

Piotr Labudda hace 9 años
padre
commit
c62edd4082
Se han modificado 1 ficheros con 5 adiciones y 9 borrados
  1. 5 9
      SE/se-lib/Api/Xsd.php

+ 5 - 9
SE/se-lib/Api/Xsd.php

@@ -15,6 +15,7 @@ class Api_Xsd extends ApiRouteBase {
 		if (!$this->_apiUser->isAdmin()) {
 			throw new HttpException("Forbidden", 403);
 		}
+		session_write_close();
 
 		IF(V::get('DBG','',$_GET)){echo'<pre style="max-height:200px;overflow:auto;border:1px solid red;text-align:left;">request->segments (' . __CLASS__ . '::' . __FUNCTION__ . ':' . __LINE__ . '): ';print_r($request->segments);echo'</pre>';}
 		if (empty($request->segments) || !is_array($request->segments)) return;
@@ -37,15 +38,10 @@ class Api_Xsd extends ApiRouteBase {
 					$tblName = get_object_vars($r);
 					$tblName = array_values($tblName);
 					$tblName = reset($tblName);
-					if ('DEALS_TABLE_2015_03_17_zest_dla_zubryka' == $tblName) {
-						continue;// fields name 'grup_concat(...'
-					}
-					if ('KSIEG_DOKUMENTY' == $tblName) {
-						continue;// fields name '201_...'
-					}
-					if ('KSIEG_DOKUMENTY_HIST' == $tblName) {
-						continue;// fields name '201_...'
-					}
+
+					if ('DEALS_TABLE_2015_03_17_zest_dla_zubryka' == $tblName) continue;// fields name 'grup_concat(...'
+					if (false !== strpos($tblName, '#')) continue;
+
 					$ds = new Data_Source();
 					$ds->set_table($tblName);
 					$ds->get_cols();