This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "quickfw".
The branch, master has been updated
via 7d80383c4791c4e3b41684708c702d852190af66 (commit)
via e5c43509adb8f46b29c6d3bd4d6273489f38e804 (commit)
from 28954c12d93a7c8d03e14ca0646f6ebbe6f61e02 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 7d80383c4791c4e3b41684708c702d852190af66
Author: Ivan Borzenkov <iva...@li...>
Date: Mon May 24 23:48:09 2010 +0400
Обработка случая, когда PATH_SEPARATOR не / - замена слешей
diff --git a/QFW/QuickFW/Url.php b/QFW/QuickFW/Url.php
index e6d97d5..2703879 100644
--- a/QFW/QuickFW/Url.php
+++ b/QFW/QuickFW/Url.php
@@ -111,6 +111,9 @@ class Url
$this->ancor = $ancor ? ltrim($ancor, '#') : $url->ancor;
return;
}
+ //Заменяем / на QuickFW_Router::PATH_SEPARATOR
+ if (QuickFW_Router::PATH_SEPARATOR != '/')
+ $url = strtr($url, '/', QuickFW_Router::PATH_SEPARATOR);
$this->u = trim($begin.$url, QuickFW_Router::PATH_SEPARATOR);
$this->get = $get;
$this->ancor = ltrim($ancor, '#');
@@ -135,7 +138,7 @@ class Url
public function __toString()
{
return self::$config['base'].$this->u.
- ($this->u!==''?self::$config['ext']:'').
+ ($this->u!=='' ? self::$config['ext'] : '').
($this->get ? '?' . $this->get : '').
($this->ancor ? '#' . $this->ancor : '');
commit e5c43509adb8f46b29c6d3bd4d6273489f38e804
Author: Ivan Borzenkov <iva...@li...>
Date: Mon May 24 23:41:46 2010 +0400
Если PATH_SEPARATOR не / - не добавляется в конце урла
diff --git a/QFW/Init.php b/QFW/Init.php
index 8caad4d..c213fbd 100644
--- a/QFW/Init.php
+++ b/QFW/Init.php
@@ -59,10 +59,6 @@ class QFW
require QFWPATH.'/QuickFW/Cache.php';
require QFWPATH.'/QuickFW/Plugs.php';
- //хелпер для урлов
- require QFWPATH.'/QuickFW/Url.php';
- Url::Init();
-
//выставляем заголовок с нужной кодировкой
if (!empty(self::$config['host']['encoding']))
header("Content-Type: text/html; charset=".self::$config['host']['encoding']);
@@ -80,6 +76,9 @@ class QFW
require QFWPATH.'/QuickFW/Router.php';
self::$router = new QuickFW_Router(APPPATH);
+ //хелпер для урлов (зависит от QuickFW_Router)
+ require QFWPATH.'/QuickFW/Url.php';
+ Url::Init();
}
/**
diff --git a/QFW/QuickFW/Url.php b/QFW/QuickFW/Url.php
index 4dbd8ea..e6d97d5 100644
--- a/QFW/QuickFW/Url.php
+++ b/QFW/QuickFW/Url.php
@@ -85,8 +85,8 @@ class Url
self::$config = QFW::$config['redirection'];
self::$config['base'] = self::$config['baseUrl'].
(self::$config['useIndex'] ? 'index.php/' : '');
- self::$config['ext'] = self::$config['defExt'] ?
- self::$config['defExt'] : '/';
+ self::$config['ext'] = self::$config['defExt'] ? self::$config['defExt'] :
+ (QuickFW_Router::PATH_SEPARATOR == '/' ? '/' : '');
}
/** @var array QFW::$config['redirection'] */
-----------------------------------------------------------------------
Summary of changes:
QFW/Init.php | 7 +++----
QFW/QuickFW/Url.php | 9 ++++++---
2 files changed, 9 insertions(+), 7 deletions(-)
hooks/post-receive
--
quickfw
|