[TASK] Compatibility to TYPO3 7.x 31/40931/4
authorChristian Futterlieb <christian@futterlieb.ch>
Tue, 30 Jun 2015 10:49:38 +0000 (12:49 +0200)
committerChristian Futterlieb <christian@futterlieb.ch>
Fri, 10 Jul 2015 16:39:03 +0000 (18:39 +0200)
Resolves: #67642
Releases: master

Change-Id: I3c81dac3e8c1f5c8e476dd765b37dabd26072b5a
Reviewed-on: http://review.typo3.org/40931
Tested-by: Christian Futterlieb <christian@futterlieb.ch>
Reviewed-by: Christian Futterlieb <christian@futterlieb.ch>
12 files changed:
Classes/Controller/PagenotfoundController.php
Classes/Utility/LanguageUtility.php
Configuration/TCA/Overrides/TcaAdditions.php [deleted file]
Configuration/TCA/Overrides/sys_template.php [new file with mode: 0644]
README.txt
class.tx_pagenotfoundhandling.php [deleted file]
class.tx_pagenotfoundhandling_LanguageSelect.php [deleted file]
ext_autoload.php [deleted file]
ext_conf_template.txt
ext_localconf.php
ext_tables.php
res/defaultTemplate.tmpl [deleted file]

index db73fa4..bee2f11 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+namespace Aaw\Pagenotfoundhandling\Controller;
+
 /**
  * **************************************************************
  * Copyright notice
  * @version    $Id$
  */
 
+use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
+use TYPO3\CMS\Core\Utility\HttpUtility;
+use Aaw\Pagenotfoundhandling\Utility\LanguageUtility;
+
 /**
  * 404 handling controller
  *
  * @category TYPO3
  * @package  pagenotfoundhandling
  */
-class Tx_Pagenotfoundhandling_Controller_PagenotfoundController
+class PagenotfoundController
 {
     /**
-     * The params given from tslib_fe pageErrorHandler
+     * The params given from TypoScriptFrontendController pageErrorHandler
      *
-     * @see tslib_fe
+     * @see \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController
      * @var array
      */
     protected $_params = array();
@@ -175,15 +183,15 @@ class Tx_Pagenotfoundhandling_Controller_PagenotfoundController
     protected $_absoluteReferencePrefix = '';
 
        /**
-        * Main method called through tslib_fe::pageErrorHandler()
+        * Main method called through TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::pageErrorHandler()
         *
         * @param array $params
-        * @param tslib_fe $tslib_fe
+        * @param TypoScriptFrontendController $typoScriptFrontendController
         * @return string
         */
-    public function main($params, tslib_fe $tslib_fe)
+    public function main($params, TypoScriptFrontendController $typoScriptFrontendController)
     {
-        $this->_get = t3lib_div::_GET();
+        $this->_get = GeneralUtility::_GET();
 
         // prevent infinite loops
         if($this->_get['loopPrevention']) {
@@ -232,8 +240,8 @@ class Tx_Pagenotfoundhandling_Controller_PagenotfoundController
     {
         $lang = $this->_defaultLanguageKey;
 
-        if(t3lib_extMgm::isLoaded('static_info_tables') && !empty($this->_forceLanguage)) {
-            $res = $GLOBALS['TYPO3_DB']->sql_query('
+        if(ExtensionManagementUtility::isLoaded('static_info_tables') && !empty($this->_forceLanguage)) {
+            $res = $this->_getDatabaseConnection()->sql_query('
                 SELECT
                     *
                 FROM
@@ -244,7 +252,7 @@ class Tx_Pagenotfoundhandling_Controller_PagenotfoundController
                 WHERE
                     sys_language.uid='.$this->_forceLanguage.'
                 LIMIT 1');
-            if(($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))) {
+            if(($row = $this->_getDatabaseConnection()->sql_fetch_assoc($res))) {
                 // workaround for english because it has no lg_typo3 but is default language
                 if($row['lg_iso_2'] === 'EN') {
                     $lang = 'default';
@@ -254,9 +262,8 @@ class Tx_Pagenotfoundhandling_Controller_PagenotfoundController
             }
         }
 
-        require_once PATH_typo3 . 'sysext/lang/lang.php';
-        $language = t3lib_div::makeInstance('language');
-        $language instanceof language;
+        $language = GeneralUtility::makeInstance('TYPO3\\CMS\\Lang\\LanguageService');
+        //$language instanceof \TYPO3\CMS\Lang\LanguageService;
         $language->init($lang);
         $language->includeLLFile('EXT:pagenotfoundhandling/locallang_404.xml');
 
@@ -283,8 +290,7 @@ class Tx_Pagenotfoundhandling_Controller_PagenotfoundController
         $language = (int) $this->_get[$this->_languageParam];
 
         if($language) {
-            require_once t3lib_extMgm::extPath('pagenotfoundhandling') . 'class.tx_pagenotfoundhandling_LanguageSelect.php';
-            if(array_key_exists($language, tx_pagenotfoundhandling_LanguageSelect::getLanguages(true))) {
+            if(array_key_exists($language, LanguageUtility::getLanguages(true))) {
                 $this->_forceLanguage = $language;
             }
         }
@@ -297,11 +303,11 @@ class Tx_Pagenotfoundhandling_Controller_PagenotfoundController
      */
     protected function _loadDomainConfig()
     {
-        $domain = t3lib_div::getIndpEnv('TYPO3_HOST_ONLY');
-        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_domain', 'domainName=\'' . $domain . '\' AND hidden=0');
+        $domain = GeneralUtility::getIndpEnv('TYPO3_HOST_ONLY');
+        $res = $this->_getDatabaseConnection()->exec_SELECTquery('*', 'sys_domain', 'domainName=\'' . $domain . '\' AND hidden=0');
 
-        if($GLOBALS['TYPO3_DB']->sql_num_rows($res) == 1) {
-            if($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
+        if($this->_getDatabaseConnection()->sql_num_rows($res) == 1) {
+            if($row = $this->_getDatabaseConnection()->sql_fetch_assoc($res)) {
                 if($row['tx_pagenotfoundhandling_enable']) {
                     $this->_default404Page = (int) $row['tx_pagenotfoundhandling_default404Page'];
                     if ($row['tx_pagenotfoundhandling_defaultTemplateFile']) {
@@ -312,7 +318,7 @@ class Tx_Pagenotfoundhandling_Controller_PagenotfoundController
                     $this->_languageParam = $row['tx_pagenotfoundhandling_languageParam'];
                     $this->_passthroughContentTypeHeader = (bool) $row['tx_pagenotfoundhandling_passthroughContentTypeHeader'];
                     $this->_sendXForwardedForHeader = (bool) $row['tx_pagenotfoundhandling_sendXForwardedForHeader'];
-                    $this->_additionalHeaders = \t3lib_div::trimExplode('|', $row['tx_pagenotfoundhandling_additionalHeaders'], true);
+                    $this->_additionalHeaders = GeneralUtility::trimExplode('|', $row['tx_pagenotfoundhandling_additionalHeaders'], true);
 
                     // override 404 page with its 403 equivalent (if needed and configured so)
                     if($this->_isForbiddenError) {
@@ -325,6 +331,7 @@ class Tx_Pagenotfoundhandling_Controller_PagenotfoundController
                 }
             }
         }
+        $this->_getDatabaseConnection()->sql_free_result($res);
     }
 
     /**
@@ -399,7 +406,7 @@ class Tx_Pagenotfoundhandling_Controller_PagenotfoundController
         }
 
         if(isset($conf['additionalHeaders'])) {
-            $this->_additionalHeaders = \t3lib_div::trimExplode('|', $conf['additionalHeaders'], true);
+            $this->_additionalHeaders = GeneralUtility::trimExplode('|', $conf['additionalHeaders'], true);
         }
 
         if(isset($conf['absoluteReferencePrefix'])) {
@@ -428,10 +435,10 @@ class Tx_Pagenotfoundhandling_Controller_PagenotfoundController
                $now = $GLOBALS['SIM_ACCESS_TIME'];
                $where = 'uid=' . $this->_default404Page . ' AND deleted=0 AND hidden=0 AND (starttime=0 OR starttime =\'\' OR starttime<=' . $now .') AND (endtime=0 OR endtime =\'\' OR endtime>' . $now .')';
 
-                       $pageRow = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'pages', $where);
+                       $pageRow = $this->_getDatabaseConnection()->exec_SELECTgetRows('*', 'pages', $where);
                        if(count($pageRow) === 1) {
                                $pageRow = current($pageRow);
-                               $url = \t3lib_div::getIndpEnv('TYPO3_REQUEST_HOST') . '/';
+                               $url = GeneralUtility::getIndpEnv('TYPO3_REQUEST_HOST') . '/';
 
                                if ($this->_absoluteReferencePrefix) {
                                    $url .= $this->_absoluteReferencePrefix . '/';
@@ -456,19 +463,19 @@ class Tx_Pagenotfoundhandling_Controller_PagenotfoundController
                 $url = str_replace('###CURRENT_URL###', urlencode($this->_params['currentUrl']), $url);
 
                 $headers = array(
-                    'User-agent: ' . t3lib_div::getIndpEnv('HTTP_USER_AGENT'),
-                    'Referer: ' . t3lib_div::getIndpEnv('TYPO3_REQUEST_URL')
+                    'User-agent: ' . GeneralUtility::getIndpEnv('HTTP_USER_AGENT'),
+                    'Referer: ' . GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL')
                 );
 
                 if ($this->_sendXForwardedForHeader) {
-                    $headers[] = 'X-Forwarded-For: ' . t3lib_div::getIndpEnv('REMOTE_ADDR');
+                    $headers[] = 'X-Forwarded-For: ' . GeneralUtility::getIndpEnv('REMOTE_ADDR');
                 }
 
                 $report = array();
-                $html = t3lib_div::getURL($url, (int) $this->_passthroughContentTypeHeader, $headers, $report);
+                $html = GeneralUtility::getURL($url, (int) $this->_passthroughContentTypeHeader, $headers, $report);
                 if ($this->_passthroughContentTypeHeader && $html !== null) {
                     // split response header and body
-                    list ($responseHeaders, $html) = t3lib_div::trimExplode(CRLF . CRLF, $html, false, 2);
+                    list ($responseHeaders, $html) = GeneralUtility::trimExplode(CRLF . CRLF, $html, false, 2);
 
                     // content-type passthrough
                     if (array_key_exists('content_type', $report) && strlen($report['content_type'])) {
@@ -478,13 +485,7 @@ class Tx_Pagenotfoundhandling_Controller_PagenotfoundController
                        }
        }
        if($html === null && !empty($this->_defaultTemplateFile)) {
-                       $file = t3lib_div::getFileAbsFileName($this->_defaultTemplateFile);
-
-                       $oldTemplateFilePath = t3lib_extMgm::extPath('pagenotfoundhandling') . 'res/defaultTemplate.tmpl';
-                       if (\strcmp($file, $oldTemplateFilePath) === 0) {
-                t3lib_div::deprecationLog('pagenotfoundhandling: old defaultTemplate file (EXT:pagenotfoundhandling/res/defaultTemplate.tmpl) in use, deprecated since 2.0, will be removed in 2.2, use EXT:pagenotfoundhandling/Resources/Private/Templates/default.html instead');
-                       }
-
+                       $file = GeneralUtility::getFileAbsFileName($this->_defaultTemplateFile);
                        if(!empty($file) && is_readable($file)) {
                                $html = file_get_contents($file);
                        }
@@ -535,16 +536,16 @@ class Tx_Pagenotfoundhandling_Controller_PagenotfoundController
                 $this->_forbiddenHeader = '';
                 break;
             case 1:
-                $this->_forbiddenHeader = t3lib_utility_Http::HTTP_STATUS_400;
+                $this->_forbiddenHeader = HttpUtility::HTTP_STATUS_400;
                 break;
             case 2:
-                $this->_forbiddenHeader = t3lib_utility_Http::HTTP_STATUS_401;
+                $this->_forbiddenHeader = HttpUtility::HTTP_STATUS_401;
                 break;
             case 3:
-                $this->_forbiddenHeader = t3lib_utility_Http::HTTP_STATUS_402;
+                $this->_forbiddenHeader = HttpUtility::HTTP_STATUS_402;
                 break;
             case 4:
-                $this->_forbiddenHeader = t3lib_utility_Http::HTTP_STATUS_403;
+                $this->_forbiddenHeader = HttpUtility::HTTP_STATUS_403;
                 break;
             default :
                 if($overrideIfEmpty) {
@@ -563,7 +564,7 @@ class Tx_Pagenotfoundhandling_Controller_PagenotfoundController
     protected function _addAdditionalGetParams($params)
     {
         $params = $this->_normalizeGetParams($params);
-        $this->_additional404GetParams = array_merge($this->_additional404GetParams, t3lib_div::trimExplode('&', $params, true));
+        $this->_additional404GetParams = array_merge($this->_additional404GetParams, GeneralUtility::trimExplode('&', $params, true));
     }
 
     /**
@@ -575,7 +576,7 @@ class Tx_Pagenotfoundhandling_Controller_PagenotfoundController
     protected function _addAdditional403GetParams($params)
     {
         $params = $this->_normalizeGetParams($params);
-        $this->_additional403GetParams = array_merge($this->_additional403GetParams, t3lib_div::trimExplode('&', $params, true));
+        $this->_additional403GetParams = array_merge($this->_additional403GetParams, GeneralUtility::trimExplode('&', $params, true));
     }
 
     /**
@@ -589,4 +590,12 @@ class Tx_Pagenotfoundhandling_Controller_PagenotfoundController
         // strip out params that will be generated in _getHtml()
         return preg_replace('/&?(id|loopPrevention|' . $this->_languageParam . ')=[^&]*/', '', $params);
     }
+
+    /**
+     * @return \TYPO3\CMS\Core\Database\DatabaseConnection
+     */
+    protected function _getDatabaseConnection()
+    {
+        return $GLOBALS['TYPO3_DB'];
+    }
 }
index 5be7774..c16f711 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+namespace Aaw\Pagenotfoundhandling\Utility;
+
 /**
  * **************************************************************
  * Copyright notice
  * @category TYPO3
  * @package  pagenotfoundhandling
  */
-class Tx_Pagenotfoundhandling_Utility_LanguageUtility
+class LanguageUtility
 {
     /**
      * Returns a select box for use in TCA userFunc
      *
      * @param array $PA
-     * @param t3lib_TCEforms $fObj
+     * @param \TYPO3\CMS\Backend\Form\FormEngine $fObj
      * @return string
      */
-    public function tcaLanguageField($PA, \t3lib_TCEforms $fObj)
+    public function tcaLanguageField($PA, \TYPO3\CMS\Backend\Form\FormEngine $fObj)
     {
         $options = $this->_getLanguageSelector($PA['itemFormElValue']);
 
@@ -127,7 +129,7 @@ class Tx_Pagenotfoundhandling_Utility_LanguageUtility
     public static function getLanguages($asPairs = true)
     {
         $return = array();
-        $languages = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_language', 'hidden=0', '', 'title');
+        $languages = self::_getDatabaseConnection()->exec_SELECTgetRows('*', 'sys_language', 'hidden=0', '', 'title');
         if (is_array($languages)) {
             if ($asPairs) {
                 foreach ($languages as $language) {
@@ -140,4 +142,12 @@ class Tx_Pagenotfoundhandling_Utility_LanguageUtility
 
         return $return;
     }
+
+    /**
+     * @return \TYPO3\CMS\Core\Database\DatabaseConnection
+     */
+    protected static function _getDatabaseConnection()
+    {
+        return $GLOBALS['TYPO3_DB'];
+    }
 }
diff --git a/Configuration/TCA/Overrides/TcaAdditions.php b/Configuration/TCA/Overrides/TcaAdditions.php
deleted file mode 100644 (file)
index 97f9ab0..0000000
+++ /dev/null
@@ -1,207 +0,0 @@
-<?php
-/**
- * **************************************************************
- * Copyright notice
- *
- * (c) 2014 Agentur am Wasser | Maeder & Partner AG
- * All rights reserved
- *
- * This script is part of the TYPO3 project. The TYPO3 project is
- * free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * The GNU General Public License can be found at
- * http://www.gnu.org/copyleft/gpl.html.
- *
- * This script is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * This copyright notice MUST APPEAR in all copies of the script!
- * **************************************************************
- *
- * @author     Agentur am Wasser | Maeder & Partner AG <development@agenturamwasser.ch>
- * @copyright  Copyright (c) 2014 Agentur am Wasser | Maeder & Partner AG (http://www.agenturamwasser.ch)
- * @license    http://www.gnu.org/copyleft/gpl.html     GNU General Public License
- * @category   TYPO3
- * @package    pagenotfoundhandling
- * @version    $Id$
- */
-
-if (!defined ('TYPO3_MODE')) {
-     die ('Access denied.');
-}
-
-
-$conf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY]);
-
-// add the fields to tca of sys_domain
-if(!isset($conf['disableDomainConfig']) || empty($conf['disableDomainConfig'])) {
-
-    $tempColumns = array (
-        'tx_pagenotfoundhandling_enable' => array(
-            'onChange' => 'reload',
-            'exclude' => 1,
-            'label' => 'LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.sys_domain.enable',
-            'config' => array (
-                'type' => 'check',
-                'default' => '0',
-            )
-        ),
-        'tx_pagenotfoundhandling_default404Page' => array(
-            'exclude' => 1,
-            'label' => 'LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.sys_domain.default404Page',
-            'displayCond' => 'FIELD:tx_pagenotfoundhandling_enable:REQ:true',
-            'config' => array (
-                'type' => 'group',
-                'internal_type' => 'db',
-                'allowed' => 'pages',
-                'size' => 1,
-                'maxitems' => 1,
-                'minitems' => 0,
-                'wizards' => array(
-                    'suggest' => array('type' => 'suggest')
-                ),
-            )
-        ),
-        'tx_pagenotfoundhandling_defaultTemplateFile' => array(
-            'exclude' => 1,
-            'label' => 'LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.sys_domain.defaultTemplateFile',
-            'displayCond' => 'FIELD:tx_pagenotfoundhandling_enable:REQ:true',
-            'config' => array (
-                'type' => 'group',
-                'internal_type' => 'file',
-                'allowed' => 'html,htm,tmpl,txt',
-                'uploadfolder' => 'uploads/tx_pagenotfoundhandling',
-                'show_thumbs' => 1,
-                'size' => 1,
-                'maxitems' => 1,
-                'minitems' => 0,
-            )
-        ),
-        'tx_pagenotfoundhandling_default403Page' => array(
-            'exclude' => 1,
-            'label' => 'LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.sys_domain.default403Page',
-            'displayCond' => 'FIELD:tx_pagenotfoundhandling_enable:REQ:true',
-            'config' => array (
-                'type' => 'group',
-                'internal_type' => 'db',
-                'allowed' => 'pages',
-                'size' => 1,
-                'maxitems' => 1,
-                'minitems' => 0,
-                'wizards' => array(
-                    'suggest' => array('type' => 'suggest')
-                ),
-            )
-        ),
-        'tx_pagenotfoundhandling_default403Header' => array(
-            'exclude' => 1,
-            'label' => 'LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.sys_domain.default403Header',
-            'displayCond' => 'FIELD:tx_pagenotfoundhandling_enable:REQ:true',
-            'config' => array (
-                'type' => 'select',
-                'items' => array(
-                    array('LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.sys_domain.default403Header.none', -1),
-                    array('LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.sys_domain.default403Header.default', 0),
-                    array('HTTP/1.1 400 Bad Request', 1),
-                    array('HTTP/1.1 401 Unauthorized', 2),
-                    array('HTTP/1.1 402 Payment Required', 3),
-                    array('HTTP/1.1 403 Forbidden', 4),
-                ),
-                'size' => 1,
-                'maxitems' => 1,
-            )
-        ),
-        'tx_pagenotfoundhandling_ignoreLanguage' => array(
-            'exclude' => 1,
-            'label' => 'LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.sys_domain.ignoreLanguage',
-            'displayCond' => 'FIELD:tx_pagenotfoundhandling_enable:REQ:true',
-            'config' => array (
-                'type' => 'check',
-                'default' => '0',
-            )
-        ),
-        'tx_pagenotfoundhandling_forceLanguage' => array(
-            'exclude' => 1,
-            'label' => 'LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.sys_domain.forceLanguage',
-            'displayCond' => 'FIELD:tx_pagenotfoundhandling_enable:REQ:true',
-            'config' => array(
-                'type' => 'group',
-                'internal_type' => 'db',
-                'size' => 1,
-                'autoSizeMax' => 1,
-                'maxitems' => 1,
-                'minitems' => 0,
-                'allowed' => 'sys_language',
-                'wizards' => array(
-                    'suggest' => array('type' => 'suggest'),
-                ),
-            ),
-        ),
-        'tx_pagenotfoundhandling_languageParam' => array(
-            'exclude' => 1,
-            'label' => 'LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.sys_domain.languageParam',
-            'displayCond' => 'FIELD:tx_pagenotfoundhandling_enable:REQ:true',
-            'config' => array (
-                'type' => 'input',
-                'size' => '5',
-                'default' => 'L',
-            )
-        ),
-        'tx_pagenotfoundhandling_passthroughContentTypeHeader' => array(
-            'exclude' => 1,
-            'label' => 'LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.sys_domain.passthroughContentTypeHeader',
-            'displayCond' => 'FIELD:tx_pagenotfoundhandling_enable:REQ:true',
-            'config' => array (
-                'type' => 'check',
-                'default' => '0',
-            )
-        ),
-        'tx_pagenotfoundhandling_sendXForwardedForHeader' => array(
-            'exclude' => 1,
-            'label' => 'LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.sys_domain.sendXForwardedForHeader',
-            'displayCond' => 'FIELD:tx_pagenotfoundhandling_enable:REQ:true',
-            'config' => array (
-                'type' => 'check',
-                'default' => '0',
-            )
-        ),
-        'tx_pagenotfoundhandling_additionalHeaders' => array(
-            'exclude' => 1,
-            'label' => 'LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.sys_domain.additionalHeaders',
-            'displayCond' => 'FIELD:tx_pagenotfoundhandling_enable:REQ:true',
-            'config' => array (
-                'type' => 'input',
-                'default' => '',
-            )
-        ),
-    );
-
-    $GLOBALS['TCA']['sys_domain']['ctrl']['dividers2tabs'] = 1;
-    if($GLOBALS['TCA']['sys_domain']['ctrl']['requestUpdate']) {
-        $GLOBALS['TCA']['sys_domain']['ctrl']['requestUpdate'] .= ',tx_pagenotfoundhandling_enable';
-    } else {
-        $GLOBALS['TCA']['sys_domain']['ctrl']['requestUpdate'] = 'tx_pagenotfoundhandling_enable';
-    }
-
-    t3lib_extMgm::addTCAcolumns('sys_domain', $tempColumns, 1);
-
-    t3lib_extMgm::addToAllTCAtypes('sys_domain', '
-        --div--;LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.sys_domain.tcasheet.title,
-        tx_pagenotfoundhandling_enable;;;;1-1-1,
-        tx_pagenotfoundhandling_default404Page;;;;1-1-1,
-        tx_pagenotfoundhandling_defaultTemplateFile;;;;1-1-1,
-        tx_pagenotfoundhandling_default403Page;;;;1-1-1,
-        tx_pagenotfoundhandling_default403Header;;;;1-1-1,
-        tx_pagenotfoundhandling_ignoreLanguage;;;;1-1-1,
-        tx_pagenotfoundhandling_forceLanguage;;;;1-1-1,
-        tx_pagenotfoundhandling_languageParam;;;;1-1-1,
-        tx_pagenotfoundhandling_passthroughContentTypeHeader;;;;1-1-1,
-        tx_pagenotfoundhandling_sendXForwardedForHeader;;;;1-1-1,
-        tx_pagenotfoundhandling_additionalHeaders;;;;1-1-1');
-}
-
diff --git a/Configuration/TCA/Overrides/sys_template.php b/Configuration/TCA/Overrides/sys_template.php
new file mode 100644 (file)
index 0000000..7ce9d28
--- /dev/null
@@ -0,0 +1,207 @@
+<?php
+/**
+ * **************************************************************
+ * Copyright notice
+ *
+ * (c) 2014 Agentur am Wasser | Maeder & Partner AG
+ * All rights reserved
+ *
+ * This script is part of the TYPO3 project. The TYPO3 project is
+ * free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * The GNU General Public License can be found at
+ * http://www.gnu.org/copyleft/gpl.html.
+ *
+ * This script is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * This copyright notice MUST APPEAR in all copies of the script!
+ * **************************************************************
+ *
+ * @author     Agentur am Wasser | Maeder & Partner AG <development@agenturamwasser.ch>
+ * @copyright  Copyright (c) 2014 Agentur am Wasser | Maeder & Partner AG (http://www.agenturamwasser.ch)
+ * @license    http://www.gnu.org/copyleft/gpl.html     GNU General Public License
+ * @category   TYPO3
+ * @package    pagenotfoundhandling
+ * @version    $Id$
+ */
+
+if (!defined ('TYPO3_MODE')) {
+     die ('Access denied.');
+}
+
+
+$conf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY]);
+
+// add the fields to tca of sys_domain
+if(!isset($conf['disableDomainConfig']) || empty($conf['disableDomainConfig'])) {
+
+    $tempColumns = array (
+        'tx_pagenotfoundhandling_enable' => array(
+            'onChange' => 'reload',
+            'exclude' => 1,
+            'label' => 'LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.sys_domain.enable',
+            'config' => array (
+                'type' => 'check',
+                'default' => '0',
+            )
+        ),
+        'tx_pagenotfoundhandling_default404Page' => array(
+            'exclude' => 1,
+            'label' => 'LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.sys_domain.default404Page',
+            'displayCond' => 'FIELD:tx_pagenotfoundhandling_enable:REQ:true',
+            'config' => array (
+                'type' => 'group',
+                'internal_type' => 'db',
+                'allowed' => 'pages',
+                'size' => 1,
+                'maxitems' => 1,
+                'minitems' => 0,
+                'wizards' => array(
+                    'suggest' => array('type' => 'suggest')
+                ),
+            )
+        ),
+        'tx_pagenotfoundhandling_defaultTemplateFile' => array(
+            'exclude' => 1,
+            'label' => 'LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.sys_domain.defaultTemplateFile',
+            'displayCond' => 'FIELD:tx_pagenotfoundhandling_enable:REQ:true',
+            'config' => array (
+                'type' => 'group',
+                'internal_type' => 'file',
+                'allowed' => 'html,htm,tmpl,txt',
+                'uploadfolder' => 'uploads/tx_pagenotfoundhandling',
+                'show_thumbs' => 1,
+                'size' => 1,
+                'maxitems' => 1,
+                'minitems' => 0,
+            )
+        ),
+        'tx_pagenotfoundhandling_default403Page' => array(
+            'exclude' => 1,
+            'label' => 'LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.sys_domain.default403Page',
+            'displayCond' => 'FIELD:tx_pagenotfoundhandling_enable:REQ:true',
+            'config' => array (
+                'type' => 'group',
+                'internal_type' => 'db',
+                'allowed' => 'pages',
+                'size' => 1,
+                'maxitems' => 1,
+                'minitems' => 0,
+                'wizards' => array(
+                    'suggest' => array('type' => 'suggest')
+                ),
+            )
+        ),
+        'tx_pagenotfoundhandling_default403Header' => array(
+            'exclude' => 1,
+            'label' => 'LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.sys_domain.default403Header',
+            'displayCond' => 'FIELD:tx_pagenotfoundhandling_enable:REQ:true',
+            'config' => array (
+                'type' => 'select',
+                'items' => array(
+                    array('LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.sys_domain.default403Header.none', -1),
+                    array('LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.sys_domain.default403Header.default', 0),
+                    array('HTTP/1.1 400 Bad Request', 1),
+                    array('HTTP/1.1 401 Unauthorized', 2),
+                    array('HTTP/1.1 402 Payment Required', 3),
+                    array('HTTP/1.1 403 Forbidden', 4),
+                ),
+                'size' => 1,
+                'maxitems' => 1,
+            )
+        ),
+        'tx_pagenotfoundhandling_ignoreLanguage' => array(
+            'exclude' => 1,
+            'label' => 'LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.sys_domain.ignoreLanguage',
+            'displayCond' => 'FIELD:tx_pagenotfoundhandling_enable:REQ:true',
+            'config' => array (
+                'type' => 'check',
+                'default' => '0',
+            )
+        ),
+        'tx_pagenotfoundhandling_forceLanguage' => array(
+            'exclude' => 1,
+            'label' => 'LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.sys_domain.forceLanguage',
+            'displayCond' => 'FIELD:tx_pagenotfoundhandling_enable:REQ:true',
+            'config' => array(
+                'type' => 'group',
+                'internal_type' => 'db',
+                'size' => 1,
+                'autoSizeMax' => 1,
+                'maxitems' => 1,
+                'minitems' => 0,
+                'allowed' => 'sys_language',
+                'wizards' => array(
+                    'suggest' => array('type' => 'suggest'),
+                ),
+            ),
+        ),
+        'tx_pagenotfoundhandling_languageParam' => array(
+            'exclude' => 1,
+            'label' => 'LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.sys_domain.languageParam',
+            'displayCond' => 'FIELD:tx_pagenotfoundhandling_enable:REQ:true',
+            'config' => array (
+                'type' => 'input',
+                'size' => '5',
+                'default' => 'L',
+            )
+        ),
+        'tx_pagenotfoundhandling_passthroughContentTypeHeader' => array(
+            'exclude' => 1,
+            'label' => 'LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.sys_domain.passthroughContentTypeHeader',
+            'displayCond' => 'FIELD:tx_pagenotfoundhandling_enable:REQ:true',
+            'config' => array (
+                'type' => 'check',
+                'default' => '0',
+            )
+        ),
+        'tx_pagenotfoundhandling_sendXForwardedForHeader' => array(
+            'exclude' => 1,
+            'label' => 'LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.sys_domain.sendXForwardedForHeader',
+            'displayCond' => 'FIELD:tx_pagenotfoundhandling_enable:REQ:true',
+            'config' => array (
+                'type' => 'check',
+                'default' => '0',
+            )
+        ),
+        'tx_pagenotfoundhandling_additionalHeaders' => array(
+            'exclude' => 1,
+            'label' => 'LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.sys_domain.additionalHeaders',
+            'displayCond' => 'FIELD:tx_pagenotfoundhandling_enable:REQ:true',
+            'config' => array (
+                'type' => 'input',
+                'default' => '',
+            )
+        ),
+    );
+
+    $GLOBALS['TCA']['sys_domain']['ctrl']['dividers2tabs'] = 1;
+    if($GLOBALS['TCA']['sys_domain']['ctrl']['requestUpdate']) {
+        $GLOBALS['TCA']['sys_domain']['ctrl']['requestUpdate'] .= ',tx_pagenotfoundhandling_enable';
+    } else {
+        $GLOBALS['TCA']['sys_domain']['ctrl']['requestUpdate'] = 'tx_pagenotfoundhandling_enable';
+    }
+
+    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('sys_domain', $tempColumns);
+
+    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('sys_domain', '
+        --div--;LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.sys_domain.tcasheet.title,
+        tx_pagenotfoundhandling_enable;;;;1-1-1,
+        tx_pagenotfoundhandling_default404Page;;;;1-1-1,
+        tx_pagenotfoundhandling_defaultTemplateFile;;;;1-1-1,
+        tx_pagenotfoundhandling_default403Page;;;;1-1-1,
+        tx_pagenotfoundhandling_default403Header;;;;1-1-1,
+        tx_pagenotfoundhandling_ignoreLanguage;;;;1-1-1,
+        tx_pagenotfoundhandling_forceLanguage;;;;1-1-1,
+        tx_pagenotfoundhandling_languageParam;;;;1-1-1,
+        tx_pagenotfoundhandling_passthroughContentTypeHeader;;;;1-1-1,
+        tx_pagenotfoundhandling_sendXForwardedForHeader;;;;1-1-1,
+        tx_pagenotfoundhandling_additionalHeaders;;;;1-1-1');
+}
+
index 13e8f15..d5a1647 100644 (file)
@@ -1,4 +1,4 @@
 
-Please refer to the manual on TYPO3 forge:
+Please refer to the manual on:
 
-http://forge.typo3.org/projects/extension-pagenotfoundhandling/wiki/Extension_manual
\ No newline at end of file
+http://docs.typo3.org/typo3cms/extensions/pagenotfoundhandling/
\ No newline at end of file
diff --git a/class.tx_pagenotfoundhandling.php b/class.tx_pagenotfoundhandling.php
deleted file mode 100644 (file)
index 784f4d7..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-/**
- * **************************************************************
- * Copyright notice
- *
- * (c) 2010 Agentur am Wasser | Maeder & Partner AG
- * All rights reserved
- *
- * This script is part of the TYPO3 project. The TYPO3 project is
- * free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * The GNU General Public License can be found at
- * http://www.gnu.org/copyleft/gpl.html.
- *
- * This script is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * This copyright notice MUST APPEAR in all copies of the script!
- * **************************************************************
- *
- * @author     Agentur am Wasser | Maeder & Partner AG <development@agenturamwasser.ch>
- * @copyright  Copyright (c) 2010 Agentur am Wasser | Maeder & Partner AG (http://www.agenturamwasser.ch)
- * @license    http://www.gnu.org/copyleft/gpl.html     GNU General Public License
- * @category   TYPO3
- * @package    pagenotfoundhandling
- * @version    $Id$
- */
-
-/**
- * Main 404 handling class
- *
- * @author   Agentur am Wasser | Maeder & Partner AG <development@agenturamwasser.ch>
- * @category TYPO3
- * @package  pagenotfoundhandling
- */
-class tx_pagenotfoundhandling
-{
-       /**
-        * Main method called through tslib_fe::pageErrorHandler()
-        *
-        * @param array $params
-        * @param tslib_fe $tslib_fe
-        * @return string
-        * @deprecated since 2.0, will be removed in 2.2, use Tx_Pagenotfoundhandling_Controller_PagenotfoundController::main() instead
-        */
-    public function main($params, tslib_fe $tslib_fe)
-    {
-        t3lib_div::logDeprecatedFunction();
-        require_once \t3lib_extMgm::extPath('pagenotfoundhandling') . 'Classes/Controller/PagenotfoundController.php';
-
-        $pagenotfoundController = \t3lib_div::makeInstance('Tx_Pagenotfoundhandling_Controller_PagenotfoundController');
-        return $pagenotfoundController->main($params, $tslib_fe);
-    }
-}
-
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/pagenotfoundhandling/class.tx_pagenotfoundhandling.php']) {
-    include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/pagenotfoundhandling/class.tx_pagenotfoundhandling.php']);
-}
-?>
\ No newline at end of file
diff --git a/class.tx_pagenotfoundhandling_LanguageSelect.php b/class.tx_pagenotfoundhandling_LanguageSelect.php
deleted file mode 100644 (file)
index eef9109..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-<?php
-/**
- * **************************************************************
- * Copyright notice
- *
- * (c) 2010 Agentur am Wasser | Maeder & Partner AG
- * All rights reserved
- *
- * This script is part of the TYPO3 project. The TYPO3 project is
- * free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * The GNU General Public License can be found at
- * http://www.gnu.org/copyleft/gpl.html.
- *
- * This script is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * This copyright notice MUST APPEAR in all copies of the script!
- * **************************************************************
- *
- * @author     Agentur am Wasser | Maeder & Partner AG <development@agenturamwasser.ch>
- * @copyright  Copyright (c) 2010 Agentur am Wasser | Maeder & Partner AG (http://www.agenturamwasser.ch)
- * @license    http://www.gnu.org/copyleft/gpl.html     GNU General Public License
- * @category   TYPO3
- * @package    pagenotfoundhandling
- * @version    $Id$
- */
-
-/**
- * Language handling class
- *
- * @author   Agentur am Wasser | Maeder & Partner AG <development@agenturamwasser.ch>
- * @category TYPO3
- * @package  pagenotfoundhandling
- */
-
-class tx_pagenotfoundhandling_LanguageSelect
-{
-    /**
-     * Returns a select box for use in TCA userFunc
-     *
-     * @param array $PA
-     * @param t3lib_TCEforms $fObj
-     * @return string
-     * @deprecated since 2.0, will be removed in 2.2, use Tx_Pagenotfoundhandling_Utility_LanguageUtility::tca() instead
-     */
-    public function tca($PA, t3lib_TCEforms $fObj)
-    {
-        \t3lib_div::logDeprecatedFunction();
-        require_once \t3lib_extMgm::extPath('pagenotfoundhandling') . 'Classes/Utility/LanguageUtility.php';
-        $languageUtility = \t3lib_div::makeInstance('Tx_Pagenotfoundhandling_Utility_LanguageUtility');
-        return $languageUtility->tcaLanguageField($PA, $fObj);
-    }
-
-    /**
-     * Returns a select box for use in constants editor userFunc
-     *
-     * @param array $params
-     * @param $styleConfig
-     * @return string
-     * @deprecated since 2.0, will be removed in 2.2, use Tx_Pagenotfoundhandling_Utility_LanguageUtility::constantEditor() instead
-     */
-    public function constantEditor($params, $styleConfig)
-    {
-        \t3lib_div::logDeprecatedFunction();
-        require_once \t3lib_extMgm::extPath('pagenotfoundhandling') . 'Classes/Utility/LanguageUtility.php';
-        $languageUtility = \t3lib_div::makeInstance('Tx_Pagenotfoundhandling_Utility_LanguageUtility');
-        return $languageUtility->constantEditor($params, $styleConfig);
-    }
-
-    /**
-     * returns all visible entries from sys_language either as key=>value pairs
-     * array or as array containing all rows from sys_language
-     *
-     * @param boolean $asPairs
-     * @return array
-     * @deprecated since 2.0, will be removed in 2.2, use Tx_Pagenotfoundhandling_Utility_LanguageUtility::getLanguages() instead
-     */
-    public static function getLanguages($asPairs = true)
-    {
-        \t3lib_div::logDeprecatedFunction();
-        require_once \t3lib_extMgm::extPath('pagenotfoundhandling') . 'Classes/Utility/LanguageUtility.php';
-        return Tx_Pagenotfoundhandling_Utility_LanguageUtility::getLanguages($asPairs);
-    }
-}
-
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/pagenotfoundhandling/class.tx_pagenotfoundhandling_LanguageSelect.php']) {
-    include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/pagenotfoundhandling/class.tx_pagenotfoundhandling_LanguageSelect.php']);
-}
-?>
\ No newline at end of file
diff --git a/ext_autoload.php b/ext_autoload.php
deleted file mode 100644 (file)
index c929d8c..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-/**
- * **************************************************************
- * Copyright notice
- *
- * (c) 2014 Agentur am Wasser | Maeder & Partner AG
- * All rights reserved
- *
- * This script is part of the TYPO3 project. The TYPO3 project is
- * free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * The GNU General Public License can be found at
- * http://www.gnu.org/copyleft/gpl.html.
- *
- * This script is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * This copyright notice MUST APPEAR in all copies of the script!
- * **************************************************************
- *
- * @author     Agentur am Wasser | Maeder & Partner AG <development@agenturamwasser.ch>
- * @copyright  Copyright (c) 2014 Agentur am Wasser | Maeder & Partner AG (http://www.agenturamwasser.ch)
- * @license    http://www.gnu.org/copyleft/gpl.html     GNU General Public License
- * @category   TYPO3
- * @package    pagenotfoundhandling
- * @version    $Id$
- */
-
-if (version_compare(TYPO3_version, '4.7', '>=')) {
-    return array();
-}
-
-$extPath = t3lib_extMgm::extPath('pagenotfoundhandling');
-return array(
-    'tx_pagenotfoundhandling_controller_pagenotfoundcontroller' => $extPath . 'Classes/Controller/PagenotfoundController.php',
-    'tx_pagenotfoundhandling_utility_languageutility' => $extPath . 'Classes/Utility/LanguageUtility.php',
-);
\ No newline at end of file
index 5dab21d..b5f46e6 100644 (file)
@@ -37,7 +37,7 @@ additionalHeaders =
 # cat=basic/language; type=boolean; label=LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.constants.ignoreLanguage
 ignoreLanguage = 0
 
-# cat=basic/language; type=user[Tx_Pagenotfoundhandling_Utility_LanguageUtility->constantEditor]; label=LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.constants.forceLanguage
+# cat=basic/language; type=user[Aaw\Pagenotfoundhandling\Utility\LanguageUtility->constantEditor]; label=LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.constants.forceLanguage
 forceLanguage = 0
 
 # cat=basic/language; type=string; label=LLL:EXT:pagenotfoundhandling/locallang_db.xml:pagenotfoundhandling.constants.locallangFile
index 0a0412c..29bc105 100644 (file)
@@ -4,4 +4,4 @@ if (!defined ('TYPO3_MODE')) {
 }
 
 // register pageNotFound_handling
-$GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFound_handling'] = 'USER_FUNCTION:Tx_Pagenotfoundhandling_Controller_PagenotfoundController->main';
+$GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFound_handling'] = 'USER_FUNCTION:Aaw\\Pagenotfoundhandling\\Controller\\PagenotfoundController->main';
index 6c73792..963094d 100644 (file)
@@ -2,9 +2,3 @@
 if (!defined ('TYPO3_MODE')) {
        die ('Access denied.');
 }
-
-
-if (version_compare(TYPO3_version, '6.0', '<') || \TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version) < 6002001) {
-    require_once t3lib_extMgm::extPath($_EXTKEY) . 'Configuration/TCA/Overrides/TcaAdditions.php';
-}
-
diff --git a/res/defaultTemplate.tmpl b/res/defaultTemplate.tmpl
deleted file mode 100644 (file)
index 9a88782..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-    <head>
-        <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
-        <title>###TITLE###</title>
-        
-        <style type="text/css"><!--
-            body {
-                background-color:#F2F2F2;
-                color:#585858;
-            }
-            
-            #page {
-                background-color:#E6E6E6;
-                margin:50px auto;
-                width:500px;
-                padding:20px;
-            }
-            
-            #page .errorcode {
-                color:#848484;
-                font-size:4em;
-                font-weight:bold;
-                float:left;
-                height:100%;
-                width:25%;
-            }
-            
-            #page .content-right {
-                float:right;
-                width:75%
-            }
-            
-            #page h1 {
-                margin-top:15px;
-            }
-            
-            #page .clear {
-                clear:both;
-            }
-        //--></style>
-        
-    </head>
-    <body>
-        <div id="page">
-            <div class="errorcode">404</div>
-            <div class="content-right">
-                <h1>###TITLE###</h1>
-                <p>###REASON_TITLE###: ###REASON###</p>
-                <p>###CURRENT_URL_TITLE###: ###CURRENT_URL###</p>
-            </div>
-            <div class="clear"> </div>
-        </div>
-    </body>
-</html>
\ No newline at end of file