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 fd3fe7bb125839c00529be0c342f211d2e17ae17 (commit)
from 0f1eafc3627eb8dd6702fa77e91cbc08e48e207a (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 fd3fe7bb125839c00529be0c342f211d2e17ae17
Author: Ivan1986 <iva...@li...>
Date: Mon Apr 26 16:31:04 2010 +0400
В конфиге автоудаление дефолтовых MCA
diff --git a/QFW/QuickFW/Plugs.php b/QFW/QuickFW/Plugs.php
index 6ee9603..daf570e 100644
--- a/QFW/QuickFW/Plugs.php
+++ b/QFW/QuickFW/Plugs.php
@@ -27,6 +27,8 @@ class QuickFW_Plugs
public function siteUrl($url, $get='')
{
+ if (QFW::$config['redirection']['delDef'])
+ $url = QFW::$router->delDef($url);
if (QFW::$config['redirection']['useRewrite'])
$url = QFW::$router->backrewrite($url);
if (is_array($get) && count($get))
diff --git a/QFW/QuickFW/Url.php b/QFW/QuickFW/Url.php
index 6981730..d121285 100644
--- a/QFW/QuickFW/Url.php
+++ b/QFW/QuickFW/Url.php
@@ -114,6 +114,8 @@ class Url
$this->u = $begin.trim($url, QuickFW_Router::PATH_SEPARATOR);
$this->get = $get;
$this->ancor = ltrim($ancor, '#');
+ if (self::$config['delDef'])
+ $this->u = QFW::$router->delDef($this->u);
}
/** @var string внутреннее представление адреса */
diff --git a/QFW/config.php b/QFW/config.php
index 4fd5b91..742fd6e 100644
--- a/QFW/config.php
+++ b/QFW/config.php
@@ -26,6 +26,7 @@ $config['redirection']=array(
'defExt' => '',
'useRewrite' => true,
'useBlockRewrite' => false,
+ 'delDef' => true,
);
/**
diff --git a/application/default.php b/application/default.php
index 71235fe..91dfb89 100644
--- a/application/default.php
+++ b/application/default.php
@@ -30,6 +30,7 @@ $config['redirection']=array(
'defExt' => '', //или пусто или .html например
'useRewrite' => true,
'useBlockRewrite' => false,
+ 'delDef' => true,
);
/**
-----------------------------------------------------------------------
Summary of changes:
QFW/QuickFW/Plugs.php | 2 ++
QFW/QuickFW/Url.php | 2 ++
QFW/config.php | 1 +
application/default.php | 1 +
4 files changed, 6 insertions(+), 0 deletions(-)
hooks/post-receive
--
quickfw
|