diff --git a/module/action/view/trash.html.php b/module/action/view/trash.html.php index 99c500d277..1e0f21625f 100755 --- a/module/action/view/trash.html.php +++ b/module/action/view/trash.html.php @@ -68,9 +68,9 @@ } else { - $app = ''; - if($action->objectType == 'meeting') $app = $action->project ? "data-app='project'" : "data-app='my'"; - echo html::a($this->createLink($module, $methodName, $params), $action->objectName, '_self', "title={$action->objectName} $app"); + $openApp = ''; + if($action->objectType == 'meeting') $openApp = $action->project ? "data-app='project'" : "data-app='my'"; + echo html::a($this->createLink($module, $methodName, $params), $action->objectName, '_self', "title={$action->objectName} $openApp"); } ?> diff --git a/module/block/control.php b/module/block/control.php index 6c8a84fe10..d5d9686b37 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -1755,7 +1755,7 @@ class block extends control $today = helper::today(); $now = date('H:i:s', strtotime(helper::now())); - $stmt = $this->dao->select('*')->from(TABLE_MEETING) + $meetings = $this->dao->select('*')->from(TABLE_MEETING) ->Where('deleted')->eq('0') ->andWhere('(date')->gt($today) ->orWhere('(begin')->gt($now) @@ -1764,9 +1764,9 @@ class block extends control ->andwhere('(host')->eq($this->app->user->account) ->orWhere('participant')->in($this->app->user->account) ->markRight(1) - ->orderBy('id_desc'); - if(isset($params->meetingNum)) $stmt->limit($params->meetingNum); - $meetings = $stmt->fetchAll(); + ->orderBy('id_desc') + ->beginIF(isset($params->meetingNum))->limit($params->meetingNum) + ->fetchAll(); $count['meeting'] = count($meetings); $this->view->meetings = $meetings;