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 5614f97533c515affe96dc367b3e80eadc006d20 (commit)
from 5172fd695b2165311b25c8473cda62903b64b904 (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 5614f97533c515affe96dc367b3e80eadc006d20
Author: Ivan1986 <iva...@li...>
Date: Tue Apr 27 17:03:51 2010 +0400
Добавлена настройка выборки из главной таблицы
diff --git a/lib/Modules/Scafold/ScafoldController.php b/lib/Modules/Scafold/ScafoldController.php
index a4bb15b..bafb53a 100644
--- a/lib/Modules/Scafold/ScafoldController.php
+++ b/lib/Modules/Scafold/ScafoldController.php
@@ -97,8 +97,9 @@ abstract class ScafoldController extends Controller
//Устанавливаем фильтр
if ($this->parentData)
{
- $parent = QFW::$db->selectCol('SELECT ?# AS ARRAY_KEY, ?# FROM ?#',
- $this->parentData['key'], $this->parentData['field'], $this->parentData['table']);
+ $parent = QFW::$db->selectCol('SELECT ?# AS ARRAY_KEY, ?# FROM ?# '.$this->parentData['other'],
+ $this->parentData['key'], $this->parentData['field'],
+ $this->parentData['table']);
$this->session();
if (isset($_POST['parent']))
{
@@ -288,19 +289,21 @@ abstract class ScafoldController extends Controller
*
* <br><br> Вызывается только в конструкторе
*
- * @param string $colum Колонка зависимости
- * @param string $table Главная таблица
- * @param string $id Ключ в главной таблице
- * @param string $name Заголовок в главной таблице
+ * @param string|DbSimple_SubQuery $colum Колонка зависимости
+ * @param string|DbSimple_SubQuery $table Главная таблица
+ * @param string|DbSimple_SubQuery $id Ключ в главной таблице
+ * @param string|DbSimple_SubQuery $name Заголовок в главной таблице
+ * @param string $other Дополнительные условия
* @return ScafoldController
*/
- protected function parent($colum, $table, $id, $name)
+ protected function parent($colum, $table, $id, $name, $other='')
{
$this->parentData = array(
'colum' => $colum,
'field' => $name,
'table' => $table,
'key' => $id,
+ 'other' => $other,
);
$this->getInfoClass($colum)->type = 'parent';
$this->getInfoClass($colum)->hide = true;
-----------------------------------------------------------------------
Summary of changes:
lib/Modules/Scafold/ScafoldController.php | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
hooks/post-receive
--
quickfw
|