File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 12041204 if ( $ link_owner_class == 'Comment ' )
12051205 {
12061206 $ edited_Item = $ LinkOwner ->get_Item ();
1207- $ item_ID = $ edited_Item ->ID ;
12081207 }
12091208 else
12101209 {
1211- $ item_ID = $ LinkOwner ->link_Object -> ID ;
1210+ $ edited_Item = $ LinkOwner ->Item ;
12121211 }
1212+ $ item_ID = $ edited_Item ->ID ;
12131213
12141214 // Get list of comment IDs under Item or related to Comment:
12151215 $ comments_SQL = new SQL ( 'Get all the comments of an Item ' );
12161216 $ comments_SQL ->SELECT ( 'comment_ID ' );
12171217 $ comments_SQL ->FROM ( 'T_comments ' );
12181218 $ comments_SQL ->WHERE ( 'comment_item_ID = ' .$ DB ->quote ( $ item_ID ) );
1219+ if ( ! $ edited_Item ->can_meta_comment () )
1220+ { // If current User doesn't have an access to meta comments:
1221+ $ comments_SQL ->WHERE ( 'comment_type != "meta" ' );
1222+ }
12191223 $ comment_IDs = $ DB ->get_col ( $ comments_SQL );
12201224
12211225 $ links_SQL = new SQL ( 'Get all the links belonging to comments of an Item ' );
12411245 else
12421246 {
12431247 global $ Blog ;
1244-
1248+
12451249 if ( empty ( $ Blog ) )
12461250 {
1247- $ ItemCache = & get_ItemCache ();
1248- $ edited_Item = & $ ItemCache ->get_by_ID ( $ item_ID );
12491251 $ Blog = $ edited_Item ->get_Blog ();
12501252 }
12511253
You can’t perform that action at this time.
0 commit comments