* adjust for vs code and php8.0.

This commit is contained in:
王怡栋
2021-12-22 15:24:47 +08:00
parent 2eac7ba0d1
commit 49bfd2dd18
2 changed files with 3 additions and 2 deletions

View File

@@ -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)

View File

@@ -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;
}