Added feature #9094: Make simulate static a system extension
authorOliver Hader <oliver.hader@typo3.org>
Sat, 1 Nov 2008 14:40:00 +0000 (14:40 +0000)
committerOliver Hader <oliver.hader@typo3.org>
Sat, 1 Nov 2008 14:40:00 +0000 (14:40 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@4405 709f56b5-9817-0410-a4d7-c38de5d9e867

12 files changed:
ChangeLog
NEWS.txt
t3lib/class.t3lib_tstemplate.php
t3lib/config_default.php
typo3/sysext/cms/tslib/class.tslib_fe.php
typo3/sysext/cms/tslib/class.tslib_pagegen.php
typo3/sysext/install/ext_localconf.php
typo3/sysext/install/mod/class.tx_install.php
typo3/sysext/install/updates/class.tx_coreupdates_installsysexts.php [new file with mode: 0644]
typo3/sysext/simulatestatic/class.tx_simulatestatic.php [new file with mode: 0644]
typo3/sysext/simulatestatic/ext_emconf.php [new file with mode: 0644]
typo3/sysext/simulatestatic/ext_localconf.php [new file with mode: 0644]

index 5f6b735..b4921a3 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
 
        * Added feature #6637: Integrate possibility to reverse order of rootline HMENU (thanks to Ralf Hettinger)
        * Fixed bug #9715: Editing records with OpenDocs enabled does not work
+       * Added feature #9094: Make simulate static a system extension (patch by Benjamin Mack)
 
 2008-10-31  Jeff Segars  <jeff@webempoweredchurch.org>
 
index b96c028..9bc521c 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -49,6 +49,9 @@ Compatibility
        * The caching system has been revamped. It is not possible to query the cache tables directly.
          Any compliant extension has to use the new caching framework.
 
+       * The simulateStaticDocument functionality (URLs like "MyPage.13.0.html" instead of "index.php?id=13")
+         was extracted and put to a separate system extension "simulatestatic".
+
 Development
 ===========
 
index e0f8988..42fa05b 100755 (executable)
@@ -1366,7 +1366,7 @@ class t3lib_TStemplate    {
        /**
         * The mother of all functions creating links/URLs etc in a TypoScript environment.
         * See the references below.
-        * Basically this function takes care of issues such as type,id,alias and Mount Points, simulate static documents, M5/B6 encoded parameters etc.
+        * Basically this function takes care of issues such as type,id,alias and Mount Points, URL rewriting (through hooks), M5/B6 encoded parameters etc.
         * It is important to pass all links created through this function since this is the guarantee that globally configured settings for link creating are observed and that your applications will conform to the various/many configuration options in TypoScript Templates regarding this.
         *
         * @param       array           The page record of the page to which we are creating a link. Needed due to fields like uid, alias, target, no_cache, title and sectionIndex_uid.
@@ -1425,7 +1425,7 @@ class t3lib_TStemplate    {
                } else {
                        $LD['type'] = '';
                }
-               $LD['orig_type'] = $LD['type'];         // Preserving the type number. Will not be cleared if simulateStaticDocuments.
+               $LD['orig_type'] = $LD['type'];         // Preserving the type number.
 
                        // noCache
                $LD['no_cache'] = (trim($page['no_cache']) || $no_cache) ? '&no_cache=1' : '';
@@ -1441,37 +1441,6 @@ class t3lib_TStemplate   {
                        $LD['linkVars'] = $GLOBALS['TSFE']->linkVars.$addParams;
                }
 
-                       // If simulateStaticDocuments is enabled:
-               if ($GLOBALS['TSFE']->config['config']['simulateStaticDocuments'])      {
-                       $LD['type'] = '';
-                       $LD['url'] = '';
-
-                               // MD5/base64 method limitation:
-                       $remainLinkVars='';
-                       $flag_simulateStaticDocuments_pEnc = t3lib_div::inList('md5,base64',$GLOBALS['TSFE']->config['config']['simulateStaticDocuments_pEnc']) && !$LD['no_cache'];
-                       if ($flag_simulateStaticDocuments_pEnc) {
-                               list($LD['linkVars'], $remainLinkVars) = $GLOBALS['TSFE']->simulateStaticDocuments_pEnc_onlyP_proc($LD['linkVars']);
-                       }
-
-                       $LD['url'].=$GLOBALS['TSFE']->makeSimulFileName(
-                                                       $page['title'],
-                                                       $page['alias'] ? $page['alias'] : $page['uid'],
-                                                       intval($typeNum),
-                                                       $LD['linkVars'],
-                                                       $LD['no_cache'] ? true : false
-                                               );
-
-                       if ($flag_simulateStaticDocuments_pEnc) {
-                               $LD['linkVars']=$remainLinkVars;
-                       }
-                       if ($GLOBALS['TSFE']->config['config']['simulateStaticDocuments']=='PATH_INFO') {
-                               $LD['url'] = str_replace('.','/',$LD['url']);
-                               $LD['url'] = 'index.php/'.$LD['url'].'/?';
-                       } else {
-                               $LD['url'].= '.html?';
-                       }
-               }
-
                        // Add absRefPrefix if exists.
                $LD['url'] = $GLOBALS['TSFE']->absRefPrefix.$LD['url'];
 
index e4e73e8..657e87e 100755 (executable)
@@ -257,7 +257,7 @@ $TYPO3_CONF_VARS = Array(
                'addAllowedPaths' => '',                                // Additional relative paths (comma-list) to allow TypoScript resources be in. Should be prepended with '/'. If not, then any path where the first part is like this path will match. That is: 'myfolder/ , myarchive' will match eg. 'myfolder/', 'myarchive/', 'myarchive_one/', 'myarchive_2/' ... No check is done to see if this directory actually exists in the root of the site. Paths are matched by simply checking if these strings equals the first part of any TypoScript resource filepath. (See class template, function init() in t3lib/class.t3lib_tsparser.php)
                'allowedTempPaths' => '',                               // Additional paths allowed for temporary images. Used with imgResource. Eg. 'alttypo3temp/,another_temp_dir/';
                'debug' => 0,                                                   // Boolean. If set, some debug HTML-comments may be output somewhere. Can also be set by TypoScript.
-               'simulateStaticDocuments' => 0,                 // Boolean. This is the default value for simulateStaticDocuments (configurable with TypoScript which overrides this, if the TypoScript value is present)
+               'simulateStaticDocuments' => 0,                 // Boolean. This is the default value for simulateStaticDocuments (configurable with TypoScript which overrides this, if the TypoScript value is present), since TYPO3 4.3 you also need to install the system extension "simulatestatic" to get this to work.
                'noPHPscriptInclude' => 0,                              // Boolean. If set, PHP-scripts are not included by TypoScript configurations, unless they reside in 'media/scripts/'-folder. This is a security option to ensure that users with template-access do not terrorize
                'strictFormmail' => TRUE,                               // Boolean. If set, the internal "formmail" feature in TYPO3 will send mail ONLY to recipients which has been encoded by the system itself. This protects against spammers misusing the formmailer.
                'secureFormmail' => TRUE,                               // Boolean. If set, the internal "formmail" feature in TYPO3 will send mail ONLY to the recipients that are defined in the form CE record. This protects against spammers misusing the formmailer.
index b598daa..7d8dc25 100755 (executable)
@@ -354,7 +354,7 @@ require_once (PATH_t3lib.'class.t3lib_lock.php');
        var $uniqueString='';
        var $indexedDocTitle='';                        // This value will be used as the title for the page in the indexer (if indexing happens)
        var $altPageTitle='';                           // Alternative page title (normally the title of the page record). Can be set from applications you make.
-       var $pEncAllowedParamNames=array();     // An array that holds parameter names (keys) of GET parameters which MAY be MD5/base64 encoded with simulate_static_documents method.
+       var $pEncAllowedParamNames=array();     // An array that holds parameter names (keys) of GET parameters which MAY be MD5/base64 encoded with simulate_static_documents method. @deprecated since TYPO3 4.3, remove in TYPO3 4.5
        var $baseUrl='';                                        // The base URL set for the page header.
        var $anchorPrefix='';                           // The proper anchor prefix needed when using speaking urls. (only set if baseUrl is set)
 
@@ -697,46 +697,16 @@ require_once (PATH_t3lib.'class.t3lib_lock.php');
        /**
         * Provides ways to bypass the '?id=[xxx]&type=[xx]' format, using either PATH_INFO or virtual HTML-documents (using Apache mod_rewrite)
         *
-        * Three options:
-        * 1) Apache mod_rewrite: Here a .htaccess file maps all .html-files to index.php and then we extract the id and type from the name of that HTML-file. (AKA "simulateStaticDocuments")
-        * 2) Use PATH_INFO (also Apache) to extract id and type from that var. Does not require any special modules compiled with apache. (less typical)
-        * 3) Using hook which enables features like those provided from "realurl" extension (AKA "Speaking URLs")
-        *
-        * Support for RewriteRule to generate   (simulateStaticDocuments)
-        * With the mod_rewrite compiled into apache, put these lines into a .htaccess in this directory:
-        * RewriteEngine On
-        * RewriteRule   ^[^/]*\.html$  index.php
-        * The url must end with '.html' and the format must comply with either of these:
-        * 1:      '[title].[id].[type].html'                   - title is just for easy recognition in the logfile!; no practical use of the title for TYPO3.
-        * 2:      '[id].[type].html'                                   - above, but title is omitted; no practical use of the title for TYPO3.
-        * 3:      '[id].html'                                                  - only id, type is set to the default, zero!
-        * NOTE: In all case 'id' may be the uid-number OR the page alias (if any)
+        * Two options:
+        * 1) Use PATH_INFO (also Apache) to extract id and type from that var. Does not require any special modules compiled with apache. (less typical)
+        * 2) Using hook which enables features like those provided from "simulatestatic" or "realurl" extension (AKA "Speaking URLs")
         *
         * @return      void
         * @link http://typo3.org/doc.0.html?&tx_extrepmgm_pi1[extUid]=270&cHash=4ad9d7acb4
         */
        function checkAlternativeIdMethods()    {
-
                $this->siteScript = t3lib_div::getIndpEnv('TYPO3_SITE_SCRIPT');
 
-                       // Resolving of "simulateStaticDocuments" URLs:
-               if ($this->siteScript && substr($this->siteScript,0,9)!='index.php')    {               // If there has been a redirect (basically; we arrived here otherwise than via "index.php" in the URL) this can happend either due to a CGI-script or because of reWrite rule. Earlier we used $_SERVER['REDIRECT_URL'] to check but
-                       $uParts = parse_url($this->siteScript); // Parse the path:
-                       $fI = t3lib_div::split_fileref($uParts['path']);
-
-                       if (!$fI['path'] && $fI['file'] && substr($fI['file'],-5)=='.html')     {
-                               $parts = explode('.',$fI['file']);
-                               $pCount = count($parts);
-                               if ($pCount>2)  {
-                                       $this->type = intval($parts[$pCount-2]);
-                                       $this->id = $parts[$pCount-3];
-                               } else {
-                                       $this->type = 0;
-                                       $this->id = $parts[0];
-                               }
-                       }
-               }
-
                        // If PATH_INFO
                if (t3lib_div::getIndpEnv('PATH_INFO')) {               // If pathinfo contains stuff...
                        $parts=t3lib_div::trimExplode('/',t3lib_div::getIndpEnv('PATH_INFO'),1);
@@ -1609,6 +1579,7 @@ require_once (PATH_t3lib.'class.t3lib_lock.php');
         * @param       string          String to analyze
         * @return      void
         * @access private
+        * @deprecated since TYPO3 4.3, will be removed in TYPO3 4.5, please use the "simulatestatic" sysext directly
         */
        function idPartsAnalyze($str)   {
                $GET_VARS = '';
@@ -2050,15 +2021,6 @@ require_once (PATH_t3lib.'class.t3lib_lock.php');
                                                $this->config['config'] = t3lib_div::array_merge_recursive_overrule($this->config['config'], $this->pSetup['config.']);
                                        }
 
-                                               // if .simulateStaticDocuments was not present, the default value will rule.
-                                       if (!isset($this->config['config']['simulateStaticDocuments'])) {
-                                               $this->config['config']['simulateStaticDocuments'] = trim($this->TYPO3_CONF_VARS['FE']['simulateStaticDocuments']);
-                                       }
-                                       if ($this->config['config']['simulateStaticDocuments']) {
-                                                       // Set replacement char only if it is needed
-                                               $this->setSimulReplacementChar();
-                                       }
-
                                        if ($this->config['config']['typolinkEnableLinksAcrossDomains']) {
                                                $this->config['config']['typolinkCheckRootline'] = true;
                                        }
@@ -2111,23 +2073,13 @@ require_once (PATH_t3lib.'class.t3lib_lock.php');
                        // No cache
                if ($this->config['config']['no_cache'])        { $this->set_no_cache(); }              // Set $this->no_cache true if the config.no_cache value is set!
 
-                       // Check PATH_INFO url
-               if ($this->absRefPrefix_force && strcmp($this->config['config']['simulateStaticDocuments'],'PATH_INFO'))        {
-                       $redirectUrl = t3lib_div::getIndpEnv('TYPO3_REQUEST_DIR').'index.php?id='.$this->id.'&type='.$this->type;
-                       if ($this->config['config']['simulateStaticDocuments_dontRedirectPathInfoError'])       {
-                               if ($this->checkPageUnavailableHandler())       {
-                                       $this->pageUnavailableAndExit('PATH_INFO was not configured for this website, and the URL tries to find the page by PATH_INFO!');
-                               } else {
-                                       $message = 'PATH_INFO was not configured for this website, and the URL tries to find the page by PATH_INFO!';
-                                       header('HTTP/1.0 503 Service Temporarily Unavailable');
-                                       t3lib_div::sysLog($message, 'cms', t3lib_div::SYSLOG_SEVERITY_ERROR);
-                                       $this->printError($message.'<br /><br /><a href="'.htmlspecialchars($redirectUrl).'">Click here to get to the right page.</a>','Error: PATH_INFO not configured');
-                               }
-                       } else {
-                               header('Location: '.t3lib_div::locationHeaderUrl($redirectUrl));
+
+                       // Hook for postProcessing the configuration array
+               if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['configArrayPostProc'])) {
+                       $params = array('config' => &$this->config['config']);
+                       foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['configArrayPostProc'] as $funcRef) {
+                               t3lib_div::callUserFunction($funcRef, $params, $this);
                        }
-                       exit;
-//                     $this->set_no_cache();  // Set no_cache if PATH_INFO is NOT used as simulateStaticDoc. and if absRefPrefix_force shows that such an URL has been passed along.
                }
        }
 
@@ -3814,46 +3766,23 @@ if (version == "n3") {
         * @param       string          Query-parameters to encode (will be done only if caching is enabled and TypoScript configured for it. I don't know it this makes much sense in fact...)
         * @param       boolean         The "no_cache" status of the link.
         * @return      string          The body of the filename.
-        * @see getSimulFileName(), t3lib_tstemplate::linkData(), tslib_frameset::frameParams()
-        */
-       function makeSimulFileName($inTitle,$page,$type,$addParams='',$no_cache=false)  {
-               $titleChars = intval($this->config['config']['simulateStaticDocuments_addTitle']);
-                       // Default value is 30 but values > 1 will be override this
-               if($titleChars==1)      { $titleChars = 30; }
-
-               $out = '';
-               if ($titleChars)        {
-                       $out = $this->fileNameASCIIPrefix($inTitle, $titleChars);
-               }
-               $enc = '';
-
-               if (strcmp($addParams,'') && !$no_cache)        {
-                       switch ((string)$this->config['config']['simulateStaticDocuments_pEnc'])        {
-                               case 'md5':
-                                       $md5 = substr(md5($addParams),0,10);
-                                       $enc = '+M5'.$md5;
-
-                                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('md5hash', 'cache_md5params', 'md5hash='.$GLOBALS['TYPO3_DB']->fullQuoteStr($md5, 'cache_md5params'));
-                                       if (!$GLOBALS['TYPO3_DB']->sql_num_rows($res))  {
-                                               $insertFields = array(
-                                                       'md5hash' => $md5,
-                                                       'tstamp' => time(),
-                                                       'type' => 1,
-                                                       'params' => $addParams
-                                               );
-
-                                               $GLOBALS['TYPO3_DB']->exec_INSERTquery('cache_md5params', $insertFields);
-                                       }
-                               break;
-                               case 'base64':
-                                       $enc = '+B6'.str_replace('=','_',str_replace('/','-',base64_encode($addParams)));
-                               break;
-                       }
+        * @see getSimulFileName(), t3lib_tstemplate::linkData(), tslib_frameset::frameParams(), tx_
+        * @deprecated since TYPO3 4.3, will be removed in TYPO3 4.5, please use the "simulatestatic" sysext directly
+        */
+       function makeSimulFileName($inTitle, $page, $type, $addParams = '', $no_cache = false) {
+               if (t3lib_extMgm::isLoaded('simulatestatic')) {
+                       return t3lib_div::callUserFunc(
+                               'EXT:simulatestatic/class.tx_simulatestatic.php:&tx_simulatestatic->makeSimulatedFileNameCompat',
+                               array(
+                                       'inTitle' => $inTitle,
+                                       'page' => $page,
+                                       'type' => $type,
+                                       'addParams' => $addParams,
+                                       'no_cache' => $no_cache
+                               ), $this);
+               } else {
+                       return false;
                }
-                       // Setting page and type number:
-               $url = $out.$page.$enc;
-               $url.= ($type || $out || !$this->config['config']['simulateStaticDocuments_noTypeIfNoTitle']) ? '.'.$type : '';
-               return $url;
        }
 
        /**
@@ -3862,28 +3791,18 @@ if (version == "n3") {
         * @param       string          Query string to analyse
         * @return      array           Two num keys returned, first is the parameters that MAY be encoded, second is the non-encodable parameters.
         * @see makeSimulFileName(), t3lib_tstemplate::linkData()
+        * @deprecated since TYPO3 4.3, will be removed in TYPO3 4.5, please use the "simulatestatic" sysext directly
         */
        function simulateStaticDocuments_pEnc_onlyP_proc($linkVars)     {
-               $remainLinkVars = '';
-               if (strcmp($linkVars,''))       {
-                       $p = explode('&',$linkVars);
-                       sort($p);       // This sorts the parameters - and may not be needed and further it will generate new MD5 hashes in many cases. Maybe not so smart. Hmm?
-                       $rem = array();
-                       foreach($p as $k => $v) {
-                               if (strlen($v)) {
-                                       list($pName) = explode('=',$v,2);
-                                       $pName = rawurldecode($pName);
-                                       if (!$this->pEncAllowedParamNames[$pName])      {
-                                               unset($p[$k]);
-                                               $rem[] = $v;
-                                       }
-                               } else unset($p[$k]);
-                       }
-
-                       $linkVars = count($p) ? '&'.implode('&',$p) : '';
-                       $remainLinkVars = count($rem) ? '&'.implode('&',$rem) : '';
+               if (t3lib_extMgm::isLoaded('simulatestatic')) {
+                       return t3lib_div::callUserFunc(
+                               'EXT:simulatestatic/class.tx_simulatestatic.php:&tx_simulatestatic->processEncodedQueryString',
+                               $linkVars,
+                               $this
+                       );
+               } else {
+                       return false;
                }
-               return array($linkVars, $remainLinkVars);
        }
 
        /**
@@ -3891,17 +3810,21 @@ if (version == "n3") {
         *
         * @return      string          The filename (without path)
         * @see makeSimulFileName(), publish.php
+        * @deprecated since TYPO3 4.3, will be removed in TYPO3 4.5, please use the "simulatestatic" sysext directly
         */
        function getSimulFileName()     {
-               $url = '';
-               $url.= $this->makeSimulFileName($this->page['title'], $this->page['alias']?$this->page['alias']:$this->id, $this->type).'.html';
-               return $url;
+               return $this->makeSimulFileName(
+                       $this->page['title'],
+                       ($this->page['alias'] ? $this->page['alias'] : $this->id),
+                       $this->type
+               ) . '.html';
        }
 
        /**
         * Checks and sets replacement character for simulateStaticDocuments. Default is underscore.
         *
         * @return      void
+        * @deprecated since TYPO3 4.3, will be removed in TYPO3 4.5, please use the "simulatestatic" sysext directly
         */
        function setSimulReplacementChar() {
                $replacement = $defChar = t3lib_div::compat_version('4.0') ? '-' : '_';
@@ -3922,6 +3845,7 @@ if (version == "n3") {
         * @param       integer         Number of characters in the string
         * @param       string          Character to put in the end of string to merge it with the next value.
         * @return      string          String
+        * @deprecated since TYPO3, 4.3, will be removed in TYPO3 4.5, please use the "simulatestatic" sysext directly
         */
        function fileNameASCIIPrefix($inTitle,$titleChars,$mergeChar='.')       {
                $out = $this->csConvObj->specCharsToASCII($this->renderCharset, $inTitle);
index 16df438..7ff3547 100755 (executable)
@@ -112,13 +112,6 @@ class TSpagegen {
                                }
                        }
                }
-               if ($GLOBALS['TSFE']->config['config']['simulateStaticDocuments_pEnc_onlyP'])   {
-                       $temp_parts = t3lib_div::trimExplode(',',$GLOBALS['TSFE']->config['config']['simulateStaticDocuments_pEnc_onlyP'],1);
-                       foreach ($temp_parts as $temp_p)        {
-                               $GLOBALS['TSFE']->pEncAllowedParamNames[$temp_p]=1;
-                       }
-               }
-
 
                        // Global vars...
                $GLOBALS['TSFE']->indexedDocTitle = $GLOBALS['TSFE']->page['title'];
@@ -153,12 +146,7 @@ See <a href="http://wiki.typo3.org/index.php/TYPO3_3.8.1" target="_blank">wiki.t
                        $GLOBALS['TSFE']->spamProtectEmailAddresses = t3lib_div::intInRange($GLOBALS['TSFE']->config['config']['spamProtectEmailAddresses'],-10,10,0);
                }
 
-
-               $GLOBALS['TSFE']->absRefPrefix = trim(''.$GLOBALS['TSFE']->config['config']['absRefPrefix']);
-               if ((!strcmp($GLOBALS['TSFE']->config['config']['simulateStaticDocuments'],'PATH_INFO') || $GLOBALS['TSFE']->absRefPrefix_force)
-                               && !$GLOBALS['TSFE']->absRefPrefix)     {
-                       $GLOBALS['TSFE']->absRefPrefix=t3lib_div::dirname(t3lib_div::getIndpEnv('SCRIPT_NAME')).'/';
-               }               // Force absRefPrefix to this value is PATH_INFO is used.
+               $GLOBALS['TSFE']->absRefPrefix = ($GLOBALS['TSFE']->config['config']['absRefPrefix'] ? trim($GLOBALS['TSFE']->config['config']['absRefPrefix']) : '');
 
                if ($GLOBALS['TSFE']->type && $GLOBALS['TSFE']->config['config']['frameReloadIfNotInFrameset']) {
                        $tdlLD = $GLOBALS['TSFE']->tmpl->linkData($GLOBALS['TSFE']->page,'_top',$GLOBALS['TSFE']->no_cache,'');
index d6787e3..b2e6ce6 100644 (file)
@@ -10,4 +10,7 @@ $TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['update']['removeNotInMenuDoktypeC
        // remove pagetype "advanced" since TYPO3 4.2
        // this is merged with doctype "standard" with tab view to edit
 $TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['update']['mergeAdvancedDoktypeConversion'] = 'tx_coreupdates_mergeadvanced';
+
+       // add outsourced system extensions since TYPO3 4.3
+$TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['update']['installSystemExtensions'] = 'tx_coreupdates_installsysexts';
 ?>
\ No newline at end of file
index 954ce7f..cb2b2cf 100755 (executable)
@@ -155,6 +155,7 @@ require_once (PATH_t3lib.'class.t3lib_stdgraphic.php');
 require_once(t3lib_extMgm::extPath('install').'updates/class.tx_coreupdates_compatversion.php');
 require_once(t3lib_extMgm::extPath('install').'updates/class.tx_coreupdates_notinmenu.php');
 require_once(t3lib_extMgm::extPath('install').'updates/class.tx_coreupdates_mergeadvanced.php');
+require_once(t3lib_extMgm::extPath('install').'updates/class.tx_coreupdates_installsysexts.php');
 
 
 /**
diff --git a/typo3/sysext/install/updates/class.tx_coreupdates_installsysexts.php b/typo3/sysext/install/updates/class.tx_coreupdates_installsysexts.php
new file mode 100644 (file)
index 0000000..abe2fdb
--- /dev/null
@@ -0,0 +1,121 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2008 Benjamin Mack <benni@typo3.org>
+*  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.
+*  A copy is found in the textfile GPL.txt and important notices to the license
+*  from the author is found in LICENSE.txt distributed with these scripts.
+*
+*
+*  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!
+***************************************************************/
+
+/**
+ * Contains the update class for adding the system extension "simulate static".
+ *
+ * $Id$
+ *
+ * @author Benjamin Mack <benni@typo3.org>
+ */
+class tx_coreupdates_installsysexts {
+       public $versionNumber;  // version number coming from t3lib_div::int_from_ver()
+
+       /**
+        * parent object
+        *
+        * @var tx_install
+        */
+       public $pObj;
+       public $userInput;      // user input
+
+
+       /**
+        * Checks if an update is needed
+        *
+        * @param       string          &$description: The description for the update
+        * @return      boolean         whether an update is needed (true) or not (false)
+        */
+       public function checkForUpdate(&$description) {
+               $result = false;
+               $description = 'Installs the System Extension "simulatestatic" if you do not want to use RealURL or CoolURI but still want the Speaking URL feature. This feature was moved from the core to an extension and can be installed if used. If you used "config.simulatestaticdocuments = 1" in this installation before, you should install this system extension. Be sure to read the manual of "simulatestatic".';
+
+               if (!t3lib_extMgm::isLoaded('simulatestatic')) {
+                       $result = true;
+               }
+               return $result;
+       }
+
+
+       /**
+        * Adds the extension "simulate static" to the extList in TYPO3_CONF_VARS
+        *
+        * @param       array           &$dbQueries: queries done in this update
+        * @param       mixed           &$customMessages: custom messages
+        * @return      boolean         whether it worked (true) or not (false)
+        */
+       public function performUpdate(&$dbQueries, &$customMessages) {
+               $result = false;
+               $extList = $this->addExtToList('simulatestatic');
+               if ($extList) {
+                       $this->writeNewExtensionList($extList);
+                       $result = true;
+               }
+               return $result;
+       }
+
+
+       /**
+        * Adds extension to extension list and returns new list. If -1 is returned, an error happend.
+        * Does NOT check dependencies yet.
+        *
+        * @param       string          Extension key
+        * @return      string          New list of installed extensions or -1 if error
+        */
+       function addExtToList($extKey) {
+                       // Get list of installed extensions and add this one.
+               $listArr = array_keys($GLOBALS['TYPO3_LOADED_EXT']);
+               $listArr[] = $extKey;
+
+                       // Implode unique list of extensions to load and return:
+               return implode(',', array_unique($listArr));
+       }
+
+
+       /**
+        * Writes the extension list to "localconf.php" file
+        * Removes the temp_CACHED* files before return.
+        *
+        * @param       string          List of extensions
+        * @return      void
+        */
+       protected function writeNewExtensionList($newExtList)   {
+                       // Instance of install tool
+               $instObj = new t3lib_install;
+               $instObj->allowUpdateLocalConf = 1;
+               $instObj->updateIdentity = 'TYPO3 Core Update Manager';
+
+                       // Get lines from localconf file
+               $lines = $instObj->writeToLocalconf_control();
+               $instObj->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\'EXT\'][\'extList\']', $newExtList);
+               $instObj->writeToLocalconf_control($lines);
+
+               $GLOBALS['TYPO3_CONF_VARS']['EXT']['extList'] = $newExtList;
+               t3lib_extMgm::removeCacheFiles();
+       }
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/simulatestatic/class.tx_simulatestatic.php b/typo3/sysext/simulatestatic/class.tx_simulatestatic.php
new file mode 100644 (file)
index 0000000..441a9e8
--- /dev/null
@@ -0,0 +1,404 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 1999-2008 Kasper Skaarhoj <kasperYYYY@typo3.com>
+*  (c) 2008 Benjamin Mack <benni . typo3 . o)rg>
+*  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.
+*  A copy is found in the textfile GPL.txt and important notices to the license
+*  from the author is found in LICENSE.txt distributed with these scripts.
+*
+*
+*  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!
+***************************************************************/
+/**
+ * Class that does the simulatestatic feature (Speaking URLs)
+ * Was extracted for TYPO3 4.3 from the core
+ *
+ * $Id$
+ *
+ * @author     Kasper Skaarhoj <kasperYYYY@typo3.com>
+ * @author     Benjamin Mack <benni . typo3 . o)rg>
+ */
+class tx_simulatestatic {
+       public $enabled = false;
+       public $replacementChar = '';
+       public $conf = array();
+       public $pEncodingAllowedParamNames = array();
+
+       /**
+        * Initializes the extension, sets some configuration options and does some basic checks
+        *
+        * @param       array           holds all the information about the link that is about to be created
+        * @param       tslib_fe        is a reference to the parent object that calls the hook
+        * @return      void
+        */
+       public function hookInitConfig(array &$parameters, tslib_fe &$parentObject) {
+               $TSconf = &$parameters['config'];
+
+               // if .simulateStaticDocuments was not present, the installation-wide default value will be used
+               if (!isset($TSconf['simulateStaticDocuments'])) {
+                       $TSconf['simulateStaticDocuments'] = trim($parentObject->TYPO3_CONF_VARS['FE']['simulateStaticDocuments']);
+               }
+
+               // simulateStatic was not activated
+               if (!$TSconf['simulateStaticDocuments']) {
+                       return;
+               }
+
+               $this->enabled = true;
+
+               // setting configuration options
+               $this->conf = array(
+                       'mode' => $TSconf['simulateStaticDocuments'],
+                       'dontRedirectPathInfoError' => ($TSconf['simulateStaticDocuments_dontRedirectPathInfoError'] ? $TSconf['simulateStaticDocuments_dontRedirectPathInfoError'] : $TSconf['simulateStaticDocuments.']['dontRedirectPathInfoError']),
+                       'pEncoding' => ($TSconf['simulateStaticDocuments_pEnc'] ? $TSconf['simulateStaticDocuments_pEnc'] : $TSconf['simulateStaticDocuments.']['pEncoding']),
+                       'pEncodingOnlyP' => ($TSconf['simulateStaticDocuments_pEnc_onlyP'] ? $TSconf['simulateStaticDocuments_pEnc_onlyP'] : $TSconf['simulateStaticDocuments.']['pEncoding_onlyP']),
+                       'addTitle'  => ($TSconf['simulateStaticDocuments_addTitle'] ? $TSconf['simulateStaticDocuments_addTitle'] : $TSconf['simulateStaticDocuments.']['addTitle']),
+                       'noTypeIfNoTitle' => ($TSconf['simulateStaticDocuments_noTypeIfNoTitle'] ? $TSconf['simulateStaticDocuments_noTypeIfNoTitle'] : $TSconf['simulateStaticDocuments.']['noTypeIfNoTitle']),
+                       'replacementChar' => (t3lib_div::compat_version('4.0') ? '-' : '_')
+               );
+
+               if ($this->conf['pEncodingOnlyP']) {
+                       $tempParts = t3lib_div::trimExplode(',', $this->conf['pEncodingOnlyP'], 1);
+                       foreach ($tempParts as $tempPart) {
+                               $this->pEncodingAllowedParamNames[$tempPart] = 1;
+                       }
+               }
+
+
+               // Checks and sets replacement character for simulateStaticDocuments.
+               $replacement = trim($TSconf['simulateStaticDocuments_replacementChar'] ? $TSconf['simulateStaticDocuments_replacementChar'] : $TSconf['simulateStaticDocuments.']['replacementChar']);
+               if ($replacement && (urlencode($replacement) == $replacement)) {
+                       $this->conf['replacementChar'] = $replacement;
+               }
+
+               // Force absRefPrefix to this value is PATH_INFO is used.
+               $absRefPrefix = $TSconf['absRefPrefix'];
+               $absRefPrefix = trim($absRefPrefix);
+               if ((!strcmp($mode['conf'], 'PATH_INFO') || $parentObject->absRefPrefix_force) && !$absRefPrefix) {
+                       $absRefPrefix = t3lib_div::dirname(t3lib_div::getIndpEnv('SCRIPT_NAME')) . '/';
+               }
+               $parentObject->absRefPrefix = $absRefPrefix;
+               $parentObject->config['config']['absRefPrefix'] = $absRefPrefix;
+
+
+               // Check PATH_INFO url
+               if ($parentObject->absRefPrefix_force && strcmp($this->conf['mode'], 'PATH_INFO')) {
+                       $redirectUrl = t3lib_div::getIndpEnv('TYPO3_REQUEST_DIR') . 'index.php?id=' . $parentObject->id . '&type='.$parentObject->type;
+                       if ($this->conf['dontRedirectPathInfoError']) {
+                               if ($parentObject->checkPageUnavailableHandler()) {
+                                       $parentObject->pageUnavailableAndExit('PATH_INFO was not configured for this website, and the URL tries to find the page by PATH_INFO!');
+                               } else {
+                                       $message = 'PATH_INFO was not configured for this website, and the URL tries to find the page by PATH_INFO!';
+                                       header(t3lib_div::HTTP_STATUS_503);
+                                       t3lib_div::sysLog($message, 'cms', t3lib_div::SYSLOG_SEVERITY_ERROR);
+                                       $parentObject->printError($message.'<br /><br /><a href="' . htmlspecialchars($redirectUrl) . '">Click here to get to the right page.</a>','Error: PATH_INFO not configured');
+                               }
+                       } else {
+                               t3lib_div::redirect(t3lib_div::locationHeaderUrl($redirectUrl));
+                       }
+                       exit;
+                       // Set no_cache if PATH_INFO is NOT used as simulateStaticDoc.
+                       // and if absRefPrefix_force shows that such an URL has been passed along.
+                       // $this->set_no_cache();
+               }
+       }
+
+
+       /**
+        * Hook for creating a speaking URL when using the generic linkData function
+        *
+        * @param       array                           holds all the information about the link that is about to be created
+        * @param       t3lib_TStemplate        is a reference to the parent object that calls the hook
+        * @return      void
+        */
+       public function hookLinkDataPostProc(array &$parameters, t3lib_TStemplate &$parentObject) {
+               if (!$this->enabled) {
+                       return;
+               }
+
+               $LD = &$parameters['LD'];
+               $page = &$parameters['args']['page'];
+               $LD['type'] = '';
+
+               // MD5/base64 method limitation
+               $remainLinkVars = '';
+               $flag_pEncoding = (t3lib_div::inList('md5,base64', $this->conf['pEncoding']) && !$LD['no_cache']);
+               if ($flag_pEncoding) {
+                       list($LD['linkVars'], $remainLinkVars) = $this->processEncodedQueryString($LD['linkVars']);
+               }
+
+               $url = $this->makeSimulatedFileName(
+                       $page['title'],
+                       ($page['alias'] ? $page['alias'] : $page['uid']),
+                       intval($parameters['typeNum']),
+                       $LD['linkVars'],
+                       ($LD['no_cache'] ? true : false)
+               );
+               if ($this->conf['mode'] == 'PATH_INFO') {
+                       $url = 'index.php/' . str_replace('.', '/', $url) . '/';
+               } else {
+                       $url .= '.html';
+               }
+               $LD['url'] = $GLOBALS['TSFE']->absRefPrefix . $url . '?';
+
+               if ($flag_pEncoding) {
+                       $LD['linkVars'] = $remainLinkVars;
+               }
+
+               // If the special key 'sectionIndex_uid' (added 'manually' in tslib/menu.php to the page-record) is set,
+               // then the link jumps directly to a section on the page.
+               $LD['sectionIndex'] = ($page['sectionIndex_uid'] ? '#c'.$page['sectionIndex_uid'] : '');
+
+                       // Compile the normal total url
+               $LD['totalURL'] = $parentObject->removeQueryString($LD['url'] . $LD['type'] . $LD['no_cache'] . $LD['linkVars'] . $GLOBALS['TSFE']->getMethodUrlIdToken) . $LD['sectionIndex'];
+       }
+
+
+       /**
+        * Hook for checking to see if the URL is a speaking URL
+        *
+        * Here a .htaccess file maps all .html-files to index.php and
+        *  then we extract the id and type from the name of that HTML-file. (AKA "simulateStaticDocuments")
+        * Support for RewriteRule to generate   (simulateStaticDocuments)
+        * With the mod_rewrite compiled into apache, put these lines into a .htaccess in this directory:
+        * RewriteEngine On
+        * RewriteRule   ^[^/]*\.html$  index.php
+        * The url must end with '.html' and the format must comply with either of these:
+        * 1:      '[title].[id].[type].html'  - title is just for easy recognition in the
+        *                                       logfile!; no practical use of the title for TYPO3.
+        * 2:      '[id].[type].html'          - above, but title is omitted; no practical use of
+        *                                       the title for TYPO3.
+        * 3:      '[id].html'                 - only id, type is set to the default, zero!
+        * NOTE: In all case 'id' may be the uid-number OR the page alias (if any)
+        *
+        * @param       array           includes a reference to the parent Object (which is the global TSFE)
+        * @param       tslib_fe        is a reference to the global TSFE
+        * @return      void
+        */
+       public function hookCheckAlternativeIDMethods(array &$parameters, tslib_fe &$parentObject) {
+               // If there has been a redirect (basically; we arrived here otherwise
+               // than via "index.php" in the URL)
+               // this can happend either due to a CGI-script or because of reWrite rule.
+               // Earlier we used $_SERVER['REDIRECT_URL'] to check
+               if ($parentObject->siteScript && substr($parentObject->siteScript, 0, 9) != 'index.php') {
+                       $uParts = parse_url($parentObject->siteScript);
+                       $fI = t3lib_div::split_fileref($uParts['path']);
+
+                       if (!$fI['path'] && $fI['file'] && substr($fI['file'], -5) == '.html') {
+                               $parts = explode('.', $fI['file']);
+                               $pCount = count($parts);
+                               if ($pCount > 2) {
+                                       $parentObject->type = intval($parts[$pCount-2]);
+                                       $parentObject->id = $parts[$pCount-3];
+                               } else {
+                                       $parentObject->type = 0;
+                                       $parentObject->id = $parts[0];
+                               }
+                       }
+               }
+       }
+
+
+       /**
+        * Analyzes the second part of a id-string (after the "+"), looking for B6 or M5 encoding
+        * and if found it will resolve it and restore the variables in global $_GET.
+        * If values for ->cHash, ->no_cache, ->jumpurl and ->MP is found,
+        * they are also loaded into the internal vars of this class.
+        * => Not yet used, could be ported from tslib_fe as well
+        *
+        * @param       string          String to analyze
+        * @return      void
+        */
+       protected function idPartsAnalyze($string) {
+               $getVars = '';
+               switch (substr($string, 0, 2)) {
+                       case 'B6':
+                               $addParams = base64_decode(str_replace('_', '=', str_replace('-', '/', substr($string, 2))));
+                               parse_str($addParams, $getVars);
+                       break;
+                       case 'M5':
+                               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('params', 'cache_md5params', 'md5hash=' . $GLOBALS['TYPO3_DB']->fullQuoteStr(substr($string, 2), 'cache_md5params'));
+                               $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
+
+                               $GLOBALS['TSFE']->updateMD5paramsRecord(substr($string, 2));
+                               parse_str($row['params'], $getVars);
+                       break;
+               }
+               $GLOBALS['TSFE']->mergingWithGetVars($getVars);
+       }
+
+
+
+
+       /********************************************
+        *
+        * Various internal API functions
+        *
+        *******************************************/
+
+       /**
+        * This is just a wrapper function to use the params from the array split up. Can be deleted once the function in class.t3lib_fe.php is deleted
+        *
+        * @param       array           Parameter array delivered from tslib_fe::makeSimulFileName
+        * @param       tslib_fe        Reference to the calling TSFE instance
+        * @return      string          The body of the filename.
+        * @see makeSimulatedFileName()
+        * @deprecated: Will be deleted in TYPO3 4.5
+        */
+       public function makeSimulatedFileNameCompat(array &$parameters, tslib_fe &$parentObject) {
+               return $this->makeSimulatedFileName(
+                       $parameters['inTitle'],
+                       $parameters['page'],
+                       $parameters['type'],
+                       $parameters['addParams'],
+                       $parameters['no_cache']
+               );
+       }
+
+
+       /**
+        * Make simulation filename (without the ".html" ending, only body of filename)
+        *
+        * @param       string          The page title to use
+        * @param       mixed           The page id (integer) or alias (string)
+        * @param       integer         The type number
+        * @param       string          Query-parameters to encode (will be done only if caching is enabled and TypoScript configured for it. I don't know it this makes much sense in fact...)
+        * @param       boolean         The "no_cache" status of the link.
+        * @return      string          The body of the filename.
+        * @see getSimulFileName(), t3lib_tstemplate::linkData(), tslib_frameset::frameParams()
+        */
+       public function makeSimulatedFileName($inTitle, $page, $type, $addParams = '', $no_cache = false) {
+                       // Default value is 30 but values > 1 will be override this
+               $titleChars = intval($this->conf['addTitle']);
+               if ($titleChars == 1) {
+                       $titleChars = 30;
+               }
+
+               $out = ($titleChars ? $this->fileNameASCIIPrefix($inTitle, $titleChars) : '');
+               $enc = '';
+
+               if (strcmp($addParams, '') && !$no_cache) {
+                       switch ((string)$this->conf['pEncoding']) {
+                               case 'md5':
+                                       $md5 = substr(md5($addParams), 0, 10);
+                                       $enc = '+M5'.$md5;
+
+                                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
+                                               'md5hash',
+                                               'cache_md5params',
+                                               'md5hash=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($md5, 'cache_md5params')
+                                       );
+                                       if (!$GLOBALS['TYPO3_DB']->sql_num_rows($res)) {
+                                               $insertFields = array(
+                                                       'md5hash' => $md5,
+                                                       'tstamp'  => time(),
+                                                       'type'    => 1,
+                                                       'params'  => $addParams
+                                               );
+
+                                               $GLOBALS['TYPO3_DB']->exec_INSERTquery('cache_md5params', $insertFields);
+                                       }
+                                       $GLOBALS['TYPO3_DB']->sql_free_result($res);
+                               break;
+                               case 'base64':
+                                       $enc = '+B6' . str_replace('=', '_', str_replace('/', '-', base64_encode($addParams)));
+                               break;
+                       }
+               }
+                       // Setting page and type number:
+               return $out . $page . $enc . (($type || $out || !$this->conf['noTypeIfNoTitle']) ? '.' . $type : '');
+       }
+
+
+       /**
+        * Returns the simulated static file name (*.html) for the current page (using the page record in $this->page)
+        *
+        * @return      string          The filename (without path)
+        * @see makeSimulatedFileName(), publish.php
+        */
+       public function getSimulatedFileName() {
+               return $this->makeSimulatedFileName(
+                       $GLOBALS['TSFE']->page['title'],
+                       ($GLOBALS['TSFE']->page['alias'] ? $GLOBALS['TSFE']->page['alias'] : $GLOBALS['TSFE']->id),
+                       $GLOBALS['TSFE']->type
+               ) . '.html';
+       }
+
+
+       /**
+        * Processes a query-string with GET-parameters and returns two strings, one with the parameters that CAN be encoded and one array with those which can't be encoded (encoded by the M5 or B6 methods)
+        *
+        * @param       string          Query string to analyse
+        * @return      array           Two num keys returned, first is the parameters that MAY be encoded, second is the non-encodable parameters.
+        * @see makeSimulatedFileName(), t3lib_tstemplate::linkData()
+        */
+       public function processEncodedQueryString($linkVars) {
+               $remainingLinkVars = '';
+               if (strcmp($linkVars, '')) {
+                       $parts = t3lib_div::trimExplode('&', $linkVars);
+                       // This sorts the parameters - and may not be needed and further
+                       // it will generate new MD5 hashes in many cases. Maybe not so smart. Hmm?
+                       sort($parts);   
+                       $remainingParts = array();
+                       foreach ($parts as $index => $value) {
+                               if (strlen($value)) {
+                                       list($parameterName) = explode('=', $value, 2);
+                                       $parameterName = rawurldecode($parameterName);
+                                       if (!$this->pEncodingAllowedParamNames[$parameterName]) {
+                                               unset($parts[$index]);
+                                               $remainingParts[] = $value;
+                                       }
+                               } else {
+                                       unset($parts[$index]);
+                               }
+                       }
+                       $linkVars = (count($parts) ? '&' . implode('&', $parts) : '');
+                       $remainingLinkVars = (count($remainingParts) ? '&' . implode('&', $remainingParts) : '');
+               }
+               return array($linkVars, $remainingLinkVars);
+       }
+
+
+       /**
+        * Converts input string to an ASCII based file name prefix
+        *
+        * @param       string          String to base output on
+        * @param       integer         Number of characters in the string
+        * @param       string          Character to put in the end of string to merge it with the next value.
+        * @return      string          Converted string
+        */
+       public function fileNameASCIIPrefix($inTitle, $maxTitleChars, $mergeChar = '.') {
+               $out = $GLOBALS['TSFE']->csConvObj->specCharsToASCII($GLOBALS['TSFE']->renderCharset, $inTitle);
+
+               // Get replacement character
+               $replacementChar = $this->conf['replacementChar'];
+               $replacementChars = '_\-' . ($replacementChar != '_' && $replacementChar != '-' ? $replacementChar : '');
+               $out = preg_replace('/[^A-Za-z0-9_-]/', $replacementChar, trim(substr($out, 0, $maxTitleChars)));
+               $out = preg_replace('/([' . $replacementChars . ']){2,}/', '\1', $out);
+               $out = preg_replace('/['  . $replacementChars . ']?$/', '', $out);
+               $out = preg_replace('/^[' . $replacementChars . ']?/', '', $out);
+
+               return (strlen($out) ? $out . $mergeChar : '');
+       }
+}
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/simulatestatic/class.tx_simulatestatic.php']) {
+       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/simulatestatic/class.tx_simulatestatic.php']);
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/simulatestatic/ext_emconf.php b/typo3/sysext/simulatestatic/ext_emconf.php
new file mode 100644 (file)
index 0000000..f2f6644
--- /dev/null
@@ -0,0 +1,51 @@
+<?php
+
+########################################################################
+# Extension Manager/Repository config file for ext: "simulatestatic"
+#
+# Auto generated 31-10-2008 22:05
+#
+# Manual updates:
+# Only the data in the array - anything else is removed by next write.
+# "version" and "dependencies" must not be touched!
+########################################################################
+
+$EM_CONF[$_EXTKEY] = array(
+       'title' => 'Simulate Static URLs',
+       'description' => 'Adds the possibility to have Speaking URLs in the TYPO3 Frontend pages.',
+       'category' => 'fe',
+       'shy' => 0,
+       'dependencies' => '',
+       'conflicts' => '',
+       'priority' => '',
+       'loadOrder' => '',
+       'module' => '',
+       'state' => 'stable',
+       'internal' => 0,
+       'uploadfolder' => 0,
+       'createDirs' => '',
+       'modify_tables' => '',
+       'clearCacheOnLoad' => 1,
+       'lockType' => '',
+       'author' => 'Benjamin Mack',
+       'author_email' => 'benni@typo3.org',
+       'author_company' => '',
+       'CGLcompliance' => '',
+       'CGLcompliance_note' => '',
+       'version' => '1.0.0',
+       '_md5_values_when_last_written' => 'a:2:{s:27:"class.tx_simulatestatic.php";s:4:"055c";s:17:"ext_localconf.php";s:4:"eace";}',
+       'constraints' => array(
+               'depends' => array(
+                       'php' => '5.1.0-0.0.0',
+                       'typo3' => '4.3.0-4.3.99',
+               ),
+               'conflicts' => array(
+               ),
+               'suggests' => array(
+               ),
+       ),
+       'suggests' => array(
+       ),
+);
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/simulatestatic/ext_localconf.php b/typo3/sysext/simulatestatic/ext_localconf.php
new file mode 100644 (file)
index 0000000..5dee48d
--- /dev/null
@@ -0,0 +1,9 @@
+<?php
+if (!defined('TYPO3_MODE')) {
+       die('Access denied.');
+}
+
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['configArrayPostProc'][$_EXTKEY] = 'EXT:simulatestatic/class.tx_simulatestatic.php:&tx_simulatestatic->hookInitConfig';
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tstemplate.php']['linkData-PostProc'][$_EXTKEY] = 'EXT:simulatestatic/class.tx_simulatestatic.php:&tx_simulatestatic->hookLinkDataPostProc';
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkAlternativeIdMethods-PostProc'][$_EXTKEY] = 'EXT:simulatestatic/class.tx_simulatestatic.php:&tx_simulatestatic->hookCheckAlternativeIDMethods';
+?>
\ No newline at end of file