* Adjust code.

This commit is contained in:
leiyong
2021-03-30 10:02:44 +03:00
parent 54f66b88e7
commit 467bfd85b8
10 changed files with 36 additions and 47 deletions
+1 -16
View File
@@ -23,22 +23,7 @@ class qaModel extends model
*/
public function setMenu($products, $productID, $branch = 0, $extra = '')
{
$selectHtml = $this->loadModel('product')->select($products, $productID, 'qa', 'index', $extra, $branch);
$productIndex = '';
$isMobile = $this->app->viewType == 'mhtml';
if($isMobile)
{
$productIndex = html::a(helper::createLink('qa', 'index'), $this->lang->qa->index) . $this->lang->colon;
$productIndex .= $selectHtml;
}
else
{
$currentMethod = $this->app->getMethodName();
$productIndex .= $selectHtml;
}
if(!in_array($this->app->rawModule, $this->config->qa->noDropMenuModule)) $this->lang->switcherMenu = $this->product->getSwitcher($productID, $extra, $branch);
if(!in_array($this->app->rawModule, $this->config->qa->noDropMenuModule)) $this->lang->switcherMenu = $this->loadModel('product')->getSwitcher($productID, $extra, $branch);
common::setMenuVars('qa', $productID);
}