| 135 |
* Content |
* Content |
| 136 |
* /$option/$task/$sectionid/$id/$Itemid/$limit/$limitstart |
* /$option/$task/$sectionid/$id/$Itemid/$limit/$limitstart |
| 137 |
*/ |
*/ |
| 138 |
|
if ($url_array[2] == 'syndstyle') { |
| 139 |
|
array_splice($url_array, 2, 1); |
| 140 |
|
$_REQUEST['syndstyle'] = $_GET['syndstyle'] = $syndstyle = 'yes'; |
| 141 |
|
$QUERY_STRING = 'syndstyle=yes&'; |
| 142 |
|
} |
| 143 |
|
else $QUERY_STRING = ''; |
| 144 |
$foundit = false; |
$foundit = false; |
| 145 |
if ($url_array[1] == 'content') { |
if ($url_array[1] == 'content') { |
| 146 |
$foundit = true; |
$foundit = true; |
| 163 |
$task = array_search($parms[0], $this->sef_content_task); |
$task = array_search($parms[0], $this->sef_content_task); |
| 164 |
if ($task === false OR $task === null) return 1; |
if ($task === false OR $task === null) return 1; |
| 165 |
$_REQUEST['task'] = $_GET['task'] = $task; |
$_REQUEST['task'] = $_GET['task'] = $task; |
| 166 |
$QUERY_STRING = "option=com_content&task=$task"; |
$QUERY_STRING .= "option=com_content&task=$task"; |
| 167 |
if ($task == 'archivecategory') { |
if ($task == 'archivecategory') { |
| 168 |
$_REQUEST['year'] = $_GET['year'] = $year = intval(@$parms[1]); |
$_REQUEST['year'] = $_GET['year'] = $year = intval(@$parms[1]); |
| 169 |
$_REQUEST['month'] = $_GET['month'] = $month = intval(@$parms[2]); |
$_REQUEST['month'] = $_GET['month'] = $month = intval(@$parms[2]); |
| 207 |
http://www.domain.com/component/$name,$value |
http://www.domain.com/component/$name,$value |
| 208 |
*/ |
*/ |
| 209 |
elseif ($url_array[1] == 'component') { |
elseif ($url_array[1] == 'component') { |
| 210 |
$QUERY_STRING = $this->default_revert('component'); |
$QUERY_STRING .= $this->default_revert('component'); |
| 211 |
if ($QUERY_STRING) $foundit = true; |
if ($QUERY_STRING) $foundit = true; |
| 212 |
} |
} |
| 213 |
elseif ($url_array[1] == $this->prefix) { |
elseif ($url_array[1] == $this->prefix) { |
| 218 |
$_REQUEST['Itemid'] = $_GET['Itemid'] = $Itemid = $menuhandler->getIDLikeLink("index.php?option=$origname"); |
$_REQUEST['Itemid'] = $_GET['Itemid'] = $Itemid = $menuhandler->getIDLikeLink("index.php?option=$origname"); |
| 219 |
mamboCore::set('Itemid', $Itemid); |
mamboCore::set('Itemid', $Itemid); |
| 220 |
if ($this->custom_PHP[$i]) { |
if ($this->custom_PHP[$i]) { |
| 221 |
$fixup = '$QUERY_STRING = "option='.$origname.'&Itemid=".$Itemid.sef_'.$this->custom_short[$i].'::revert($url_array,1);'; |
$fixup = '$QUERY_STRING .= "option='.$origname.'&Itemid=".$Itemid.sef_'.$this->custom_short[$i].'::revert($url_array,1);'; |
| 222 |
eval($fixup); |
eval($fixup); |
| 223 |
} |
} |
| 224 |
else $QUERY_STRING = "option=$origname&Itemid=$Itemid".$this->default_revert($compname); |
else $QUERY_STRING .= "option=$origname&Itemid=$Itemid".$this->default_revert($compname); |
| 225 |
$_REQUEST['option'] = $this->custom_code[$i]; |
$_REQUEST['option'] = $this->custom_code[$i]; |
| 226 |
$foundit = true; |
$foundit = true; |
| 227 |
break; |
break; |
| 231 |
$content_sef = mamboCore::get('mosConfig_absolute_path').'/components/com_content/sef_ext.php'; |
$content_sef = mamboCore::get('mosConfig_absolute_path').'/components/com_content/sef_ext.php'; |
| 232 |
if (file_exists($content_sef)) { |
if (file_exists($content_sef)) { |
| 233 |
require_once($content_sef); |
require_once($content_sef); |
| 234 |
$QUERY_STRING = sef_content::revert($url_array,1); |
$crevert = sef_content::revert($url_array,1); |
| 235 |
if ($QUERY_STRING) $foundit = true; |
if ($crevert) { |
| 236 |
|
$foundit = true; |
| 237 |
|
$QUERY_STRING .= $crevert; |
| 238 |
|
} |
| 239 |
} |
} |
| 240 |
} |
} |
| 241 |
} |
} |
| 277 |
$server = mamboCore::get('mosConfig_live_site'); |
$server = mamboCore::get('mosConfig_live_site'); |
| 278 |
if ($string == 'index.php') return $server.'/'; |
if ($string == 'index.php') return $server.'/'; |
| 279 |
|
|
| 280 |
if (!mamboCore::get('mosConfig_sef') OR strtolower(substr($string,0,9)) != 'index.php' OR eregi('^(([^:/?#]+):)',$string)) return $string; |
if (strtolower(substr($string,0,9)) != 'index.php' OR eregi('^(([^:/?#]+):)',$string)) return $string; |
| 281 |
|
if (mosGetParam($_GET, 'syndstyle', '') == 'yes') $string .= '&syndstyle=yes'; |
| 282 |
|
if (!mamboCore::get('mosConfig_sef')) return $string; |
| 283 |
|
|
| 284 |
$passed_string = str_replace('&', '&', $string); |
$passed_string = str_replace('&', '&', $string); |
| 285 |
$string = substr($passed_string,10); |
$string = substr($passed_string,10); |
| 288 |
} |
} |
| 289 |
$option = $task = ''; |
$option = $task = ''; |
| 290 |
$oktasks = true; |
$oktasks = true; |
| 291 |
|
$syndmark = ''; |
| 292 |
parse_str($string, $params); |
parse_str($string, $params); |
| 293 |
foreach ($params as $key=>$value) { |
foreach ($params as $key=>$value) { |
| 294 |
$lowkey = strtolower($key); |
$lowkey = strtolower($key); |
| 302 |
$task = $value; |
$task = $value; |
| 303 |
if ($lowvalue == 'new' OR $lowvalue == 'edit') $oktasks = false; |
if ($lowvalue == 'new' OR $lowvalue == 'edit') $oktasks = false; |
| 304 |
break; |
break; |
| 305 |
|
case 'syndstyle': |
| 306 |
|
$syndmark = '/syndstyle'; |
| 307 |
|
break; |
| 308 |
default: |
default: |
| 309 |
$check_params[$lowkey] = $key; |
$check_params[$lowkey] = $key; |
| 310 |
$unset = false; |
$unset = false; |
| 321 |
$content_sef = mamboCore::get('mosConfig_absolute_path').'/components/com_content/sef_ext.php'; |
$content_sef = mamboCore::get('mosConfig_absolute_path').'/components/com_content/sef_ext.php'; |
| 322 |
if (file_exists($content_sef)) { |
if (file_exists($content_sef)) { |
| 323 |
require_once($content_sef); |
require_once($content_sef); |
| 324 |
return $server.'/'.$this->prefix.sef_content::create($task, $params); |
return $server.'/'.$this->prefix.$syndmark.sef_content::create($task, $params); |
| 325 |
} |
} |
| 326 |
$keys = array('sectionid', 'id', 'itemid', 'limit', 'limitstart', 'year', 'month', 'module', 'lang'); |
$keys = array('sectionid', 'id', 'itemid', 'limit', 'limitstart', 'year', 'month', 'module', 'lang'); |
| 327 |
$string = "/content/$task/"; |
$string = '/content'.$syndmark.'/'.$task.'/'; |
| 328 |
foreach ($keys as $key) { |
foreach ($keys as $key) { |
| 329 |
if (isset($check_params[$key])) { |
if (isset($check_params[$key])) { |
| 330 |
$pkey = $check_params[$key]; |
$pkey = $check_params[$key]; |
| 344 |
if ($i !== false AND $i !== null) { |
if ($i !== false AND $i !== null) { |
| 345 |
if ($this->custom_PHP[$i]) eval('$string = sef_'.$this->custom_short[$i].'::create($passed_string);'); |
if ($this->custom_PHP[$i]) eval('$string = sef_'.$this->custom_short[$i].'::create($passed_string);'); |
| 346 |
else $string = $this->componentDetails($params,$task); |
else $string = $this->componentDetails($params,$task); |
| 347 |
return $server.'/'.$this->prefix.'/'.$this->custom_name[$i].'/'.$string; |
return $server.'/'.$this->prefix.$syndmark.'/'.$this->custom_name[$i].'/'.$string; |
| 348 |
} |
} |
| 349 |
// Process ordinary components |
// Process ordinary components |
| 350 |
if (strpos($option,'com_')===0 AND $option != 'com_registration' AND $oktasks) { |
if (strpos($option,'com_')===0 AND $option != 'com_registration' AND $oktasks) { |
| 351 |
return "$server/component/option,$option/".$this->componentDetails($params,$task); |
return "$server/component$syndmark/option,$option/".$this->componentDetails($params,$task); |
| 352 |
} |
} |
| 353 |
// Anything else is returned as received, except it is guaranteed that & will be & |
// Anything else is returned as received, except it is guaranteed that & will be & |
| 354 |
return $server.'/'.str_replace( '&', '&', $passed_string ); |
return $server.'/'.str_replace( '&', '&', $passed_string ); |