/** * Checking for newer version at klarnas website. * If a new version is found it outputs information about it as HTML. * * @return void */ public function checkForLatestVersion() { $sURL = 'http://static.klarna.com:80/external/msbo/' . 'xtc304.latestversion.txt'; $version = KlarnaCore::getCurrentVersion(); $latest = @file_get_contents($sURL); $templateLoader = KiTT::templateLoader(KiTT::Locale($this->_country)); /* if (version_compare($latest, $version, '>')) { $latestVersion = $templateLoader->load('newversion.mustache'); echo $latestVersion->render( array( 'version' => $version, 'latest' => $latest ) ); }*/ }
/** * Build the apropriate description for the admin page. * * @return string */ private function _buildDescription() { $data = array(); if ($this->_isInvoice()) { $data['desc'] = KiTT::translator($this->_locale)->translate('INVOICE_TEXT_DESCRIPTION'); } elseif ($this->_isPart()) { $data['desc'] = KiTT::translator($this->_locale)->translate('PARTPAY_TEXT_DESCRIPTION'); } elseif ($this->_isSpec()) { $data['desc'] = KiTT::translator($this->_locale)->translate('SPEC_TEXT_DESCRIPTION'); } else { return ''; } $data['version'] = KlarnaCore::getCurrentVersion(); if (KlarnaConstant::isAdmin() && KlarnaConstant::isEnabled($this->_option, $this->_country) && ($this->_isPart() || $this->_isSpec())) { $data['code'] = $this->code; $data['pclasses'] = true; } $templateLoader = KiTT::templateLoader($this->_locale); return $templateLoader->load('description.mustache')->render($data); }