* Fix a bug for ranzhi getting block form zentao.
This commit is contained in:
@@ -289,7 +289,7 @@ class block extends control
|
||||
{
|
||||
if(!$this->selfCall)
|
||||
{
|
||||
$lang = $this->get->lang;
|
||||
$lang = str_replace('_', '-', $this->get->lang);
|
||||
$this->app->setClientLang($lang);
|
||||
$this->app->loadLang('common');
|
||||
$this->app->loadLang('block');
|
||||
@@ -586,8 +586,9 @@ class block extends control
|
||||
{
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$num = isset($this->params->num) ? $this->params->num : 0;
|
||||
$type = isset($this->params->type) ? $this->params->type : '';
|
||||
$pager = pager::init(0, $num , 1);
|
||||
$this->view->productStats = $this->loadModel('product')->getStats('order_desc', $this->viewType != 'json' ? $pager : '', $this->params->type);
|
||||
$this->view->productStats = $this->loadModel('product')->getStats('order_desc', $this->viewType != 'json' ? $pager : '', $type);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+10
-10
@@ -187,14 +187,6 @@ class blockModel extends model
|
||||
public function getListParams($module = '')
|
||||
{
|
||||
$params = new stdclass();
|
||||
|
||||
if($module == 'project' or $module == 'product')
|
||||
{
|
||||
$params->type['name'] = $this->lang->block->type;
|
||||
$params->type['options'] = $this->lang->block->typeList->$module;
|
||||
$params->type['control'] = 'select';
|
||||
}
|
||||
|
||||
$params = $this->onlyNumParams($module, $params);
|
||||
return json_encode($params);
|
||||
}
|
||||
@@ -375,7 +367,11 @@ class blockModel extends model
|
||||
*/
|
||||
public function getProductParams($module = '')
|
||||
{
|
||||
return $this->getListParams($module);
|
||||
$params->type['name'] = $this->lang->block->type;
|
||||
$params->type['options'] = $this->lang->block->typeList->product;
|
||||
$params->type['control'] = 'select';
|
||||
|
||||
return json_encode($this->onlyNumParams($module, $params));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -386,7 +382,11 @@ class blockModel extends model
|
||||
*/
|
||||
public function getProjectParams($module = '')
|
||||
{
|
||||
return $this->getListParams($module);
|
||||
$params->type['name'] = $this->lang->block->type;
|
||||
$params->type['options'] = $this->lang->block->typeList->project;
|
||||
$params->type['control'] = 'select';
|
||||
|
||||
return json_encode($this->onlyNumParams($module, $params));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user