本文整理汇总了PHP中Model_Base::clean_data方法的典型用法代码示例。如果您正苦于以下问题:PHP Model_Base::clean_data方法的具体用法?PHP Model_Base::clean_data怎么用?PHP Model_Base::clean_data使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Model_Base
的用法示例。
在下文中一共展示了Model_Base::clean_data方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: action_list
public function action_list()
{
$page = $this->get_query('page', 1);
$filter = array('pid' => $this->get_query('pid'), 'author_id' => $this->get_query('uid'));
$filter = Model_Base::clean_data($filter);
$topic_list = Model_Topic::page($filter, $page, OJ::per_page);
$total = Model_Topic::count($filter);
$this->template_data['topic_list'] = $topic_list;
$this->template_data['total'] = ceil($total / OJ::per_page);
$this->template_data['title'] = __('discuss.list.discuss');
}
示例2: action_talk
public function action_talk()
{
$cid = $this->get_query('cid');
$contest = Model_Contest::find_by_id($cid);
$this->check_permission($contest);
$page = $this->get_query('page', 1);
$filter = array('cid' => $cid);
$filter = Model_Base::clean_data($filter);
$topic_list = Model_Topic::page($filter, $page, OJ::per_page);
$total = Model_Topic::count($filter);
$this->view = 'discuss/list';
$this->template_data['contest'] = $contest;
$this->template_data['cid'] = $cid;
$this->template_data['topic_list'] = $topic_list;
$this->template_data['total'] = ceil($total / OJ::per_page);
$this->template_data['title'] = sprintf('%s - Discuss', $contest->title);
}