public function getCurrentVersion($useFirst = true) { $rtn = $useFirst ? $rtn = $this->firstVersion : null; try { $this->initDbo(); $dh = CalemFactory::getDbHandler(); if (!$dh->tableExists($this->dbo, 'version')) { return $rtn; } $row = $this->dbo->fetchById(VERSION_ID); if ($this->logger->isInfoEnabled()) { $this->logger->info('Version row=' . var_export($row, true)); } $rtn = CalemVersion::decode($row); } catch (CalemDboDataNotFoundException $dn) { require_once _CALEM_DIR_ . 'server/include/util/CalemDebug.php'; $this->logger->warn('Data not found: ' . CalemDebug::toStackTrace($dn)); } return $rtn; }