fixed rewriting, added further debug infos
Dieser Commit ist enthalten in:
Ursprung
e11792f616
Commit
d53c559871
4 geänderte Dateien mit 30 neuen und 21 gelöschten Zeilen
|
@ -53,6 +53,7 @@ class ModRewrite extends ModRewriteBase {
|
|||
*/
|
||||
public static function initialize($clientId) {
|
||||
mr_loadConfiguration($clientId, true);
|
||||
parent::initialize();
|
||||
self::$_db = new DB_Contenido();
|
||||
self::$_lookupTable = array();
|
||||
}
|
||||
|
|
|
@ -494,8 +494,6 @@ class ModRewriteController extends ModRewriteBase {
|
|||
// load_client is set in frontend/config.php
|
||||
$lang = (int) $load_lang;
|
||||
} else {
|
||||
// get client id from table
|
||||
cInclude('classes', 'contenido/class.clientslang.php');
|
||||
$clCol = new cApiClientLanguageCollection();
|
||||
$clCol->setWhere('idclient', $client);
|
||||
$clCol->query();
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* AMR url stack class
|
||||
*
|
||||
|
@ -12,7 +13,6 @@
|
|||
* @link http://www.4fb.de
|
||||
* @link http://www.contenido.org
|
||||
*/
|
||||
|
||||
if (!defined('CON_FRAMEWORK')) {
|
||||
die('Illegal call');
|
||||
}
|
||||
|
@ -175,7 +175,7 @@ class ModRewriteUrlStack {
|
|||
|
||||
$sStackId = $this->_aUrls[$url];
|
||||
if (!isset($this->_aStack[$sStackId]['urlpath'])) {
|
||||
$this->_chunkSetPrettyUrlParts();
|
||||
$this->_chunkSetPrettyUrlParts($sStackId);
|
||||
}
|
||||
$aPretty = array(
|
||||
'urlpath' => $this->_aStack[$sStackId]['urlpath'],
|
||||
|
@ -233,8 +233,11 @@ class ModRewriteUrlStack {
|
|||
*
|
||||
* Composes the query by looping thru stored but non processed urls, executes
|
||||
* the query and adds the (urlpath and urlname) result to the stack.
|
||||
*
|
||||
* @param type $sStackId
|
||||
* @return type
|
||||
*/
|
||||
private function _chunkSetPrettyUrlParts() {
|
||||
private function _chunkSetPrettyUrlParts($sStackId) {
|
||||
// collect stack parameter to get urlpath and urlname
|
||||
$aStack = array();
|
||||
foreach ($this->_aStack as $stackId => $item) {
|
||||
|
@ -247,6 +250,8 @@ class ModRewriteUrlStack {
|
|||
// now, it's time to compose the where clause of the query
|
||||
$sWhere = '';
|
||||
foreach ($aStack as $stackId => $item) {
|
||||
|
||||
if ($stackId == $sStackId) {
|
||||
$aP = $item['params'];
|
||||
if ((int) mr_arrayValue($aP, 'idart') > 0) {
|
||||
$sWhere .= '(al.idart = ' . $aP['idart'] . ' AND al.idlang = ' . $aP['lang'] . ') OR ';
|
||||
|
@ -260,10 +265,11 @@ class ModRewriteUrlStack {
|
|||
$sWhere .= '(cl.idcatlang = ' . $aP['idcatlang'] . ' AND cl.startidartlang = al.idartlang) OR ';
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($sWhere == '') {
|
||||
return;
|
||||
}
|
||||
$sWhere = substr($sWhere, 0, -4);
|
||||
$sWhere = cString::getPartOfString($sWhere, 0, -4);
|
||||
$sWhere = str_replace(' OR ', " OR \n", $sWhere);
|
||||
|
||||
// compose query and execute it
|
||||
|
|
|
@ -27,7 +27,7 @@ if (!defined('CON_FRAMEWORK')) {
|
|||
die('Illegal call');
|
||||
}
|
||||
|
||||
cInclude('classes', 'contenido/class.articlelanguage.php');
|
||||
global $_cecRegistry, $cfg, $contenido, $area, $client, $load_client;
|
||||
|
||||
/**
|
||||
* Processes cl-mod-rewrite related job for created new tree.
|
||||
|
@ -486,9 +486,13 @@ function mr_buildGeneratedCode($code) {
|
|||
// remove tinymce single quote entities:
|
||||
$code = str_replace("'", "'", $code);
|
||||
|
||||
// get base uri
|
||||
$sBaseUri = $cfgClient[$client]['path']['htmlpath'];
|
||||
$sBaseUri = CEC_Hook::execute("Contenido.Frontend.BaseHrefGeneration", $sBaseUri);
|
||||
$baseUri = cRegistry::getFrontendUrl();
|
||||
$baseUri = CEC_Hook::execute("Contenido.Frontend.BaseHrefGeneration", $baseUri);
|
||||
|
||||
// CON-1389 modifier /e is deprecated as of PHP 5.5
|
||||
$code = preg_replace_callback("/([\"|\'|=])upload\/(.?|.+?)([\"|\'|>])/i", function($match) use ($baseUri) {
|
||||
return stripslashes($match[1] . $baseUri . 'upload/' . $match[2] . $match[3]);
|
||||
}, $code);
|
||||
|
||||
// define some preparations to replace /front_content.php & ./front_content.php
|
||||
// against front_content.php, because urls should start with front_content.php
|
||||
|
|
Laden …
In neuem Issue referenzieren