* Optimize code structure for tutorial.

This commit is contained in:
wangxuepeng
2023-11-14 17:01:17 +08:00
parent d9bc293904
commit 0a91ff2b24
7 changed files with 190 additions and 182 deletions
+2 -2
View File
@@ -40,7 +40,7 @@ class tutorial extends control
$this->view->title = $this->lang->tutorial->common;
$this->view->current = $task;
$this->view->tasks = $this->config->tutorial->tasks;
$this->view->tasks = $this->config->tutorial->tasksConfig;
$this->view->setting = $setting;
$this->view->referer = base64_decode($referer);
$this->view->mode = $this->setting->getItem('owner=system&module=common&section=global&key=mode');
@@ -116,7 +116,7 @@ class tutorial extends control
/* Check priv for tutorial. */
$hasPriv = false;
$moduleLower = strtolower($module);
foreach($this->lang->tutorial->tasks as $task)
foreach($this->config->tutorial->tasksConfig as $task)
{
$taskModule = strtolower($task['nav']['module']);
$taskMenuModule = strtolower($task['nav']['menuModule']);