|
|
@@ -374,10 +374,10 @@ class UserAcl {
|
|
|
$this->_cache_save('permsByProcesID', $procesID);
|
|
|
}
|
|
|
|
|
|
- public function getPermsForTable($idTable) {
|
|
|
+ public function getPermsForTable($idTable) { // @returns [ permInfo group by ID_CELL ]; permInfo = [ ID_CELL, CELL_NAME, SORT_PRIO, PERM_R, PERM_W, PERM_... ]
|
|
|
$sqlIdProcesListSql = $this->getUsedUserProcesIdsSql();
|
|
|
if (!$sqlIdProcesListSql) return [];
|
|
|
- $tableCellToProcesSql = <<<SQL
|
|
|
+ $tableCellToProcesSql = "
|
|
|
select z.`ID` as `ID_CELL`
|
|
|
, z.`DESC` as `CELL_NAME`
|
|
|
, z.`DESC_PL` as `CELL_LABEL`
|
|
|
@@ -406,12 +406,12 @@ class UserAcl {
|
|
|
-- group by z.`ID`, wsk.`ID_PROCES`
|
|
|
group by z.`ID`
|
|
|
order by z.`SORT_PRIO`
|
|
|
-SQL;
|
|
|
- //echo'<pre>UserAcl::getPermsForTable('.$idTable.')::$tableCellToProcesSql ';print_r($tableCellToProcesSql);echo'</pre>';
|
|
|
+ ";
|
|
|
$userPermsForTable = array();
|
|
|
- $db = DB::getDB();
|
|
|
- $res = $db->query($tableCellToProcesSql);
|
|
|
- while ($h = $db->fetch_assoc($res)) {
|
|
|
+ // $db = DB::getDB();
|
|
|
+ // $res = $db->query($tableCellToProcesSql);
|
|
|
+ // while ($h = $db->fetch_assoc($res)) {
|
|
|
+ foreach (DB::getPDO()->fetchAll($tableCellToProcesSql) as $h) {
|
|
|
$idCell = $h['ID_CELL'];
|
|
|
$userPermsForTable[$idCell] = $h;
|
|
|
}
|