- Remove tutorialModel::checkNovice and its unit test, it's not used.

This commit is contained in:
liumengyi
2023-12-07 16:07:29 +08:00
parent 06d51287b4
commit 30f0bf9d16
3 changed files with 2 additions and 61 deletions
+1 -21
View File
@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/**
* The model file of tutorial module of ZenTaoCMS.
*
@@ -11,27 +12,6 @@
*/
class tutorialModel extends model
{
/**
* 检查新手模式配置。
* Check novice mode config.
*
* @access public
* @return bool
*/
public function checkNovice(): bool
{
$account = $this->app->user->account;
if($account == 'guest') return false;
if(!empty($this->app->user->modifyPassword)) 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.novice', 0);
return false;
}
/**
* 获取新手模式产品键值对。
* Get tutorial product pairs.