Index: trunk/core/units/general/helpers/permissions_helper.php =================================================================== diff -u -N -r8446 -r8450 --- trunk/core/units/general/helpers/permissions_helper.php (.../permissions_helper.php) (revision 8446) +++ trunk/core/units/general/helpers/permissions_helper.php (.../permissions_helper.php) (revision 8450) @@ -137,10 +137,10 @@ $table_name = $this->Application->getUnitOption($prefix, 'TableName'); $ci_table = $this->Application->getUnitOption('ci', 'TableName'); - $sql = 'SELECT '.$id_field.', CreatedById, ci.CategoryId + $sql = 'SELECT item_table.'.$id_field.', item_table.CreatedById, ci.CategoryId FROM '.$table_name.' item_table LEFT JOIN '.$ci_table.' ci ON ci.ItemResourceId = item_table.ResourceId - WHERE '.$id_field.' IN ('.$ids.') AND (ci.PrimaryCat = 1)'; + WHERE item_table.'.$id_field.' IN ('.$ids.') AND (ci.PrimaryCat = 1)'; return $this->Conn->Query($sql, $id_field); } @@ -174,7 +174,7 @@ // item being created -> check by current (before editing started, saved in OnPreCreate event) category permissions $category_id = $this->Application->IsAdmin() ? $this->Application->RecallVar('m_cat_id') : $this->Application->GetVar('m_cat_id'); } - elseif ($top_prefix == 'c') { + elseif ($top_prefix == 'c' || $top_prefix == 'st') { $category_id = $id; } else {