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 f7c33ff284b9d0ecfc96127fd4bac96dfc536b71 (commit)
from 7d80383c4791c4e3b41684708c702d852190af66 (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 f7c33ff284b9d0ecfc96127fd4bac96dfc536b71
Author: Ivan1986 <iva...@li...>
Date: Tue May 25 12:31:21 2010 +0400
Условие where в зависимом поле
diff --git a/lib/Modules/Scafold/Fields.php b/lib/Modules/Scafold/Fields.php
index 4bb373e..cc6dd17 100644
--- a/lib/Modules/Scafold/Fields.php
+++ b/lib/Modules/Scafold/Fields.php
@@ -213,11 +213,13 @@ class Scafold_Foreign extends Scafold_Field
/** @var array Зависимые поля */
protected $lookup;
- public function __construct($info)
+ public function __construct($info, $where = DBSIMPLE_SKIP)
{
+ if (!empty($info->typeParams))
+ $where = $info->typeParams;
parent::__construct($info);
- $this->lookup = QFW::$db->selectCol('SELECT ?# AS ARRAY_KEY_1, ?# FROM ?#',
- $info->foreign['key'], $info->foreign['field'], $info->foreign['table']);
+ $this->lookup = QFW::$db->selectCol('SELECT ?# AS ARRAY_KEY_1, ?# FROM ?# {WHERE ?s}',
+ $info->foreign['key'], $info->foreign['field'], $info->foreign['table'], $where);
}
public function editor($id, $value)
-----------------------------------------------------------------------
Summary of changes:
lib/Modules/Scafold/Fields.php | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
hooks/post-receive
--
quickfw
|