+2009-02-18 Oliver Hader <oliver@typo3.org>
+
+ * Fixed bug #10452: Evaluation PATH_INFO in tslib_fe::checkAlternativeIdMethods() sets false positives and should be moved to tx_simulatestatic
+
2009-02-17 Jeff Segars <jeff@webempoweredchurch.org>
* Follow-up for feature #10374: Add helper function for additional frontend editing controllers and views
function checkAlternativeIdMethods() {
$this->siteScript = t3lib_div::getIndpEnv('TYPO3_SITE_SCRIPT');
- // If PATH_INFO
- if (t3lib_div::getIndpEnv('PATH_INFO')) { // If pathinfo contains stuff...
- $parts=t3lib_div::trimExplode('/',t3lib_div::getIndpEnv('PATH_INFO'),1);
- $parts[]='html';
- $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];
- }
- $this->absRefPrefix_force=1;
- }
-
// Call post processing function for custom URL methods.
if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkAlternativeIdMethods-PostProc'])) {
$_params = array('pObj' => &$this);
}
}
}
+
+ // If PATH_INFO is defined as simulateStaticDocuments mode and has information:
+ if ($this->conf['mode'] === 'PATH_INFO' && t3lib_div::getIndpEnv('PATH_INFO')) {
+ $parts = t3lib_div::trimExplode('/', t3lib_div::getIndpEnv('PATH_INFO'), true);
+ $pCount = count($parts);
+ if ($pCount > 1) {
+ $parentObject->type = intval($parts[$pCount-1]);
+ $parentObject->id = $parts[$pCount-2];
+ } else {
+ $parentObject->type = 0;
+ $parentObject->id = $parts[0];
+ }
+ $parentObject->absRefPrefix_force = 1;
+ }
}