SilverBullet
修改时间

修改人Silver Bullet(9700)
修改时间2013-8-29
文件名misc_stat.php
路径source/module/misc
原代码[mw_shl_code=php,true] $query = C::t('forum_forum')->fetch_all_by_status(); //Modified:Silver Bullet 20130829 1250Z

[/mw_shl_code]

现代码[mw_shl_code=php,true] $query = C::t('forum_forum')->fetch_all_without_status(); //Modified:Silver Bullet 20130829 1250Z

[/mw_shl_code]

备注修改函数调用,统计管理团队的时候能统计到所有板块,与下面的函数配合


修改人Silver Bullet(9700)
修改时间2013-8-29
文件名table_forum_forum.php
路径source/class/table
原代码[mw_shl_code=php,true] public function fetch_all_by_status($status, $orderby = 1) {

$status = $status ? 1 : 0;

$ordersql = $orderby ? 'ORDER BY t.type, t.displayorder' : '';

return DB::fetch_all('SELECT * FROM '.DB::table($this->_table)." t WHERE t.status='$status' $ordersql");

}[/mw_shl_code]

现代码[mw_shl_code=php,true] public function fetch_all_by_status($status, $orderby = 1) {

$status = $status ? 1 : 0;

$ordersql = $orderby ? 'ORDER BY t.type, t.displayorder' : '';

return DB::fetch_all('SELECT * FROM '.DB::table($this->_table)." t WHERE t.status='$status' $ordersql");

}

//Added by Silver Bullet at 20130829 2051ZULU

//Removed restrict of function fetch_all_by_status

public function fetch_all_without_status(){

return DB::fetch_all('SELECT * FROM '.DB::table($this->_table)." t ORDER BY t.type, t.displayorder");

}[/mw_shl_code]

备注加入新函数,是fetch_all_by_status函数取消条件判断的版本,可以查询到所有的板块