diff options
author | Thomas Backlund <tmb@mageia.org> | 2014-10-12 12:27:45 +0300 |
---|---|---|
committer | Thomas Backlund <tmb@mageia.org> | 2014-10-12 12:27:45 +0300 |
commit | 9ce6d646ff718cd62f6434c9a4c94e450436612a (patch) | |
tree | 3ee82e5db7c0aee44a5573d9d17035c6ecac697d /apps/error/error_app.php | |
parent | a0b2d09125d7911656fe4cb286f20643c4432281 (diff) | |
download | www-9ce6d646ff718cd62f6434c9a4c94e450436612a.tar www-9ce6d646ff718cd62f6434c9a4c94e450436612a.tar.gz www-9ce6d646ff718cd62f6434c9a4c94e450436612a.tar.bz2 www-9ce6d646ff718cd62f6434c9a4c94e450436612a.tar.xz www-9ce6d646ff718cd62f6434c9a4c94e450436612a.zip |
Revert "Updated Estonian translation"
This reverts commit a0b2d09125d7911656fe4cb286f20643c4432281.
Diffstat (limited to 'apps/error/error_app.php')
-rw-r--r-- | apps/error/error_app.php | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/apps/error/error_app.php b/apps/error/error_app.php new file mode 100644 index 000000000..dc1d64cb2 --- /dev/null +++ b/apps/error/error_app.php @@ -0,0 +1,47 @@ +<?php +/** + * + * PHP version 5.4 + * + * @category Mageia + * @package Mageia\Web\www + * @author rda <rda@mageia.org> + * @license http://www.gnu.org/licenses/gpl-2.0.html GPL-2+ + * @link http://www.mageia.org/ + * +*/ + +class Error extends Pinq_App +{ + public function __construct($controller, $options) + { + $this->_control = $controller; + $this->_options = $options; + } + + public function run() + { + if ($this->_options['code'] == 404) { + return $this->_error_404(); + } + } + + private function _error_404() + { + define('HLANG', true); + require 'langs.php'; // needs absolute path in some form to be link depth independent + _lang_load($locale, '404'); + + ob_start(); + include 'templates/404.tpl'; + + return array( + 'headers' => array( + 'Mageia-Test: 1', + 'HTTP/1.0 404 Not Found', + 'Status: 404 Not Found' + ), + 'body' => ob_get_clean() + ); + } +}
\ No newline at end of file |