protected function display() { // get Latest info from http://codevtt.org if (1 == Constants::$isCheckLatestVersion) { $latestVersionInfo = Tools::getLatestVersionInfo(); if (FALSE !== $latestVersionInfo) { $this->smartyHelper->assign('latestVersionInfo', $latestVersionInfo); } } }
protected function display() { // Drifted tasks if (Tools::isConnectedUser()) { $isAdmin = $this->session_user->isTeamMember(Config::getInstance()->getValue(Config::id_adminTeamId)); $isManager = $this->session_user->isTeamManager($this->teamid); // check codevtt version if (1 == Constants::$isCheckLatestVersion) { try { if ($isAdmin || $isManager && date('d') < 4) { $latestVersionInfo = Tools::getLatestVersionInfo(3); if (FALSE !== $latestVersionInfo) { if (Config::codevVersion != $latestVersionInfo['version']) { $this->smartyHelper->assign('latestVersionInfo', $latestVersionInfo); } } } } catch (Exception $e) { // version check should never break CodevTT usage... // (no log, even logs could raise errors) } } // if CodevTT installed since at least 6 month, // then display FairPlay message every 3 month (mar, jun, sep, dec) during 3 days. if (($isManager || $isAdmin) && 0 == date('m') % 3 && date('d') > 27 && time() - Constants::$codevInstall_timestamp > 60 * 60 * 24 * 180) { $this->smartyHelper->assign('displayFairPlay', true); $this->smartyHelper->assign('codevInstall_date', date('Y-m-d', Constants::$codevInstall_timestamp)); } if ($isAdmin) { // check global configuration $cerrList = ConsistencyCheck2::checkMantisDefaultProjectWorkflow(); // add more checks here if (count($cerrList) > 0) { $systemConsistencyErrors = array(); foreach ($cerrList as $cerr) { $systemConsistencyErrors[] = array('severity' => $cerr->getLiteralSeverity(), 'desc' => $cerr->desc); } $this->smartyHelper->assign('systemConsistencyErrors', $systemConsistencyErrors); } } // updateBacklog DialogBox if (isset($_POST['bugid'])) { $bugid = Tools::getSecurePOSTStringValue('bugid'); $backlog = Tools::getSecurePOSTStringValue('backlog', ''); $issue = IssueCache::getInstance()->getIssue($bugid); $issue->setBacklog($backlog); } $driftedTasks = $this->getIssuesInDrift(); if (isset($driftedTasks)) { $this->smartyHelper->assign('driftedTasks', $driftedTasks); } // Consistency errors $consistencyErrors = $this->getConsistencyErrors(); // no specific Mgr errors right now #$consistencyErrorsMgr = $this->getConsistencyErrorsMgr($this->session_user); #$consistencyErrors = array_merge($consistencyErrors, $consistencyErrorsMgr); if (count($consistencyErrors) > 0) { $this->smartyHelper->assign('consistencyErrorsTitle', count($consistencyErrors) . ' ' . T_("Errors in your Tasks")); $this->smartyHelper->assign('consistencyErrors', $consistencyErrors); } } }