* adjust for vs code and php8.0.
This commit is contained in:
@@ -376,7 +376,7 @@ class deptModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getUsers($browseType = 'inside', $deptID, $pager = null, $orderBy = 'id')
|
||||
public function getUsers($browseType = 'inside', $deptID = 0, $pager = null, $orderBy = 'id')
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_USER)
|
||||
->where('deleted')->eq(0)
|
||||
|
||||
@@ -31,7 +31,8 @@ class product extends control
|
||||
|
||||
/* Get all products, if no, goto the create page. */
|
||||
$this->products = $this->product->getPairs('nocode|all');
|
||||
if(empty($this->products) and strpos(',create,index,showerrornone,ajaxgetdropmenu,kanban', $this->methodName) === false and $this->app->getViewType() != 'mhtml') $this->locate($this->createLink('product', 'create'));
|
||||
$isAPI = (defined('RUN_MODE') && RUN_MODE == 'api');
|
||||
if(empty($this->products) and strpos(',create,index,showerrornone,ajaxgetdropmenu,kanban', $this->methodName) === false and $this->app->getViewType() != 'mhtml' and !$isAPI) $this->locate($this->createLink('product', 'create'));
|
||||
$this->view->products = $this->products;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user