Merge branch 'main' into zentao_menu
This commit is contained in:
@@ -188,7 +188,7 @@ class adminModel extends model
|
||||
|
||||
if($menuKey == 'company' && $this->app->rawModule != 'convert')
|
||||
{
|
||||
$dept = $this->dao->select('id')->from(TABLE_DEPT)->fetch();
|
||||
$dept = $this->dao->select('id')->from(TABLE_DEPT)->limit(1)->fetch();
|
||||
if($dept && common::hasPriv('company', 'browse')) $menu['link'] = helper::createLink('company', 'browse');
|
||||
}
|
||||
|
||||
@@ -428,11 +428,9 @@ class adminModel extends model
|
||||
*/
|
||||
public function genDateUsed(): object
|
||||
{
|
||||
$firstUseDate = $this->dao->select('date')->from(TABLE_ACTION)
|
||||
->where('date')->gt('1970-01-01')
|
||||
$firstUseDate = $this->dao->select('min(`date`) as `date`')->from(TABLE_ACTION)
|
||||
->where('`date`')->gt('1970-01-01')
|
||||
->andWhere('actor')->eq($this->app->user->account)
|
||||
->orderBy('date_asc')
|
||||
->limit('1')
|
||||
->fetch('date');
|
||||
|
||||
if($firstUseDate) $firstUseDate = substr($firstUseDate, 0, 10);
|
||||
|
||||
Reference in New Issue
Block a user