打开viewnews.php文件,找到下面一句:- if($msg = $_SGLOBAL['db']->fetch_array($query)) {
复制代码 在后面添加下面的一段代码:- if( !empty($msg['relativeitemids']) ){
- $itemidarr = explode(',', $msg['relativeitemids']);
- $msg['relativeitemids'] = '';
- foreach ( $itemidarr as $key=>$titemid ) {
- $flag = $_SGLOBAL['db']->result($_SGLOBAL['db']->query('SELECT folder FROM '.tname('spaceitems').' WHERE itemid=\''.$titemid.'\''), 0);
- if ($flag == '1' ) {
- $msg['relativeitemids'] .= $titemid.',';
-
- }
- }
- $msg['relativeitemids'] = substr($msg['relativeitemids'], 0, -1);
- }
复制代码 |