<?php 
namespace Home\Behavior;
use Think\Behavior;
class ClickBehavior extends Behavior{
	public function run(&$params){
		// 判断是否开启点击数量记录
		if (!C('RECORD_CLICK')) {
			return;
		};
		$node = strtolower(CONTROLLER_NAME.'_'.ACTION_NAME);
		if (strtolower(CONTROLLER_NAME.'_'.ACTION_NAME) == 'content_detail') {
			$_where = array();
			$_where['id'] = array('eq',I('id'));
			M('Content') -> where($_where)->setInc('click');
		}
	}
}