* adjust code.

This commit is contained in:
wangyidong
2016-05-03 10:10:51 +08:00
parent 2ea55f54f5
commit 9dd48a815e
47 changed files with 121 additions and 190 deletions
+19
View File
@@ -11,6 +11,25 @@
*/
class tutorialModel extends model
{
/**
* Check novice.
*
* @access public
* @return bool
*/
public function checkNovice()
{
$account = $this->app->user->account;
if($account == 'guest') return false;
$count = $this->dao->select('count(*) as count')->from(TABLE_ACTION)->where('actor')->eq($account)->fetch('count');
if($count < 10) return true;
$this->loadModel('setting')->setItem($account . '.common.global.nevice', 'false');
return false;
}
/**
* Get tutorial product pairs.
*