Jestem uparty:P:)
Korzystam z PSPada. Znalazłem zamknięcie, przynajmniej mam taką nadzieję
private static function _fUrlInit()
{
if ( ipsRegistry::$settings['use_friendly_urls'] )
{
/* Grab and store accessing URL */
self::$_uri = preg_replace( "/s=(&|$)/", '', str_replace( '/?', '/index.php?', $_SERVER['REQUEST_URI'] ) );
$_urlBits = array();
/* Grab FURL data... */
if ( ! IN_DEV AND file_exists( DOC_IPS_ROOT_PATH . 'cache/furlCache.php' ) )
{
require( DOC_IPS_ROOT_PATH . 'cache/furlCache.php' );
self::$_seoTemplates = $templates;
}
else
{
/* Attempt to write it */
self::$_seoTemplates = IPSLib::buildFurlTemplates();
try
{
IPSLib::cacheFurlTemplates();
}
catch( Exception $e )
{
}
}
if ( is_array( self::$_seoTemplates ) AND count( self::$_seoTemplates ) )
{
if ( !isset( $_SERVER['REQUEST_URI'] ) )
{
$_SERVER['REQUEST_URI'] = substr( $_SERVER['PHP_SELF'], 1 );
if ( isset( $_SERVER['QUERY_STRING'] ) )
{
$_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
}
}
//$qs = $_SERVER['QUERY_STRING'] ? $_SERVER['QUERY_STRING'] : @getenv('QUERY_STRING');
$uri = $_SERVER['REQUEST_URI'] ? $_SERVER['REQUEST_URI'] : @getenv('REQUEST_URI');
$_toTest = $uri; //( $qs ) ? $qs : $uri;
foreach( self::$_seoTemplates as $key => $data )
{
if ( ! isset( $data['in']['regex'] ) OR ! $data['in']['regex'] )
{
continue;
}
if ( preg_match( $data['in']['regex'], $_toTest, $matches ) )
{
if ( is_array( $data['in']['matches'] ) )
{
foreach( $data['in']['matches'] as $_replace )
{
$k = IPSText::parseCleanKey( $_replace[0] );
if ( strstr( $_replace[1], '$' ) )
{
$v = IPSText::parseCleanValue( $matches[ intval( str_replace( '$', '', $_replace[1] ) ) ] );
}
else
{
$v = IPSText::parseCleanValue( $_replace[1] );
}
$_GET[ $k ] = $v;
$_POST[ $k ] = $v;
$_REQUEST[ $k ] = $v;
$_urlBits[ $k ] = $v;
ipsRegistry::$request[ $k ] = $v;
}
}
if ( strstr( $_toTest, self::$_seoTemplates['__data__']['varBlock'] ) )
{
$_parse = substr( $_toTest, strpos( $_toTest, self::$_seoTemplates['__data__']['varBlock'] ) + strlen( self::$_seoTemplates['__data__']['varBlock'] ) );
$_data = explode( self::$_seoTemplates['__data__']['varSep'], $_parse );
$_c = 0;
foreach( $_data as $_v )
{
if ( ! $_c )
{
$k = IPSText::parseCleanKey( $_v );
$v = '';
$_c++;
}
else
{
$v = IPSText::parseCleanValue( $_v );
$_c = 0;
$_GET[ $k ] = $v;
$_POST[ $k ] = $v;
$_REQUEST[ $k ] = $v;
$_urlBits[ $k ] = $v;
ipsRegistry::$request[ $k ] = $v;
}
}
}
break;
}
}
//-----------------------------------------
// If using query string furl, extract any
// secondary query string.
// Ex: http://localhost/index.php?/path/file.html?key=value
// Will pull the key=value properly
//-----------------------------------------
if( substr_count( $_toTest, '?' ) > 1 )
{
$_secondQueryString = substr( $_toTest, strrpos( $_toTest, '?' ) + 1 );
$_secondParams = explode( '&', $_secondQueryString );
if( count($_secondParams) )
{
foreach( $_secondParams as $_param )
{
list( $k, $v ) = explode( '=', $_param );
$k = IPSText::parseCleanKey( $k );
$v = IPSText::parseCleanValue( $v );
$_GET[ $k ] = $v;
$_REQUEST[ $k ] = $v;
$_urlBits[ $k ] = $v;
ipsRegistry::$request[ $k ] = $v;
}
}
/* Now at this point, the preceeding value will have val?stuff=xxx as the value so we need to remove that */
preg_match( "#(?:^|&|&)([a-z0-9-_]+?)=([^\?=]+?)?#i", substr( $_toTest, strpos( $_toTest, '?' ) + 1 ), $match );
if ( $match[1] AND $match[2] )
{
$k = IPSText::parseCleanKey( $match[1] );
$v = IPSText::parseCleanValue( $match[2] );
$_GET[ $k ] = $v;
$_REQUEST[ $k ] = $v;
$_urlBits[ $k ] = $v;
ipsRegistry::$request[ $k ] = $v;
}
}
}
/* Reformat basic URL */
if ( is_array( $_urlBits ) )
{
ipsRegistry::$settings['query_string_real'] = '';
foreach( $_urlBits as $k => $v )
{
ipsRegistry::$settings['query_string_real'] .= '&' . $k . '=' . $v;
}
ipsRegistry::$settings['query_string_real'] = trim( ipsRegistry::$settings['query_string_real'], '&' );
}
}
}
Dobrze kombinuję?
Niestety kod wyszedł spłaczony, bo nie bardzo wiem jak go wkleić prawidłowo. W każdym bądź razie klamra otwarcia jest w tym samym pionie co zamknięcia.