File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
package/system/controllers/api/api_actions Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -282,7 +282,7 @@ public function run($ctype_name){
282282 if ($ items ){
283283 foreach ($ items as $ key => $ item ) {
284284
285- $ is_private = $ item ['is_private ' ] && !$ item ['user ' ]['is_friend ' ];
285+ $ is_private = $ item ['is_private ' ] == 1 && !$ item ['user ' ]['is_friend ' ];
286286
287287 $ item ['ctype ' ] = $ this ->ctype ;
288288
Original file line number Diff line number Diff line change @@ -106,11 +106,12 @@ public function validateApiRequest($ctype_name=null) {
106106 }
107107
108108 // Проверяем ограничения доступа из других контроллеров
109- if ($ this ->item ['is_parent_hidden ' ]){
109+ if ($ this ->item ['is_parent_hidden ' ] || $ this -> item [ ' is_private ' ] ){
110110 $ is_parent_viewable_result = cmsEventsManager::hook ('content_view_hidden ' , array (
111111 'viewable ' => true ,
112112 'item ' => $ this ->item ,
113- 'is_moderator ' => $ is_moderator
113+ 'is_moderator ' => $ is_moderator ,
114+ 'ctype ' => $ this ->ctype
114115 ));
115116 if (!$ is_parent_viewable_result ['viewable ' ]){
116117 return array (
You can’t perform that action at this time.
0 commit comments