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 bdb96f73364b68aefecf116c1cd850f953036515 (commit)
from 31b59d46fb3ef0a120c1d9ad0fc35e65016ccc7b (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 bdb96f73364b68aefecf116c1cd850f953036515
Author: Ivan Borzenkov <iva...@li...>
Date: Fri Feb 18 15:08:19 2011 +0300
Небольшая оптимизация выбора action в loadMCA
diff --git a/QFW/QuickFW/Router.php b/QFW/QuickFW/Router.php
index 4ad2f98..33de1d1 100644
--- a/QFW/QuickFW/Router.php
+++ b/QFW/QuickFW/Router.php
@@ -512,29 +512,29 @@ SREG;
}
$vars = get_class_vars($class);
$acts = get_class_methods($class);
+ $defA = isset($vars['defA']) ? $vars['defA'] : $this->defA;
//Выполняется при первом вызове и сохраняет значение вызванного MCA
//Проверяем последний так как остальные уже записаны
if ($this->action == '')
{
- $aname = isset($data[0]) ? $data[0] :
- (isset($vars['defA']) ? $vars['defA'] : $this->defA);
- if (!in_array(strtr($aname,'.','_').$type, $acts))
- $aname = (isset($vars['defA']) ? $vars['defA'] : $this->defA);
+ $aname = isset($data[0]) ? strtr($data[0],'.','_') : $defA;
+ if (!in_array($aname.$type, $acts))
+ $aname = $defA;
$this->cAction = $this->action = $aname;
$this->type = $type;
}
$this->classes[$class_key] = array(
'i' => new $class,
- 'defA' => isset($vars['defA']) ? $vars['defA'] : $this->defA,
+ 'defA' => $defA,
'a' => $acts,
);
}
$MCA['Class'] = $this->classes[$class_key]['i'];
- $aname = isset($data[0]) ? $data[0] : $this->classes[$class_key]['defA'];
- $MCA['Action'] = strtr($aname,'.','_');
+ $aname = isset($data[0]) ? strtr($data[0],'.','_') : $this->classes[$class_key]['defA'];
+ $MCA['Action'] = $aname;
$MCA['Type'] = $type;
if (in_array($MCA['Action'].$MCA['Type'], $this->classes[$class_key]['a']))
@@ -542,7 +542,7 @@ SREG;
else
{
$aname = $this->classes[$class_key]['defA'];
- $MCA['Action'] = strtr($aname,'.','_');
+ $MCA['Action'] = $aname;
$MCA['Type'] = $type;
if (!in_array($aname.$type,$this->classes[$class_key]['a']))
{
-----------------------------------------------------------------------
Summary of changes:
QFW/QuickFW/Router.php | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
hooks/post-receive
--
quickfw
|