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 255366db2a8070327209fadfb4a20c8a4c191d3b (commit)
from ab01232409e00dfd269a61c7b494094e78c8a19f (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 255366db2a8070327209fadfb4a20c8a4c191d3b
Author: Ivan1986 <iva...@li...>
Date: Tue Apr 27 17:22:14 2010 +0400
Скафолдинг - поддержка NULL
diff --git a/lib/Modules/Scafold/Fields.php b/lib/Modules/Scafold/Fields.php
index 310273b..b0c7d43 100644
--- a/lib/Modules/Scafold/Fields.php
+++ b/lib/Modules/Scafold/Fields.php
@@ -72,7 +72,8 @@ class Scafold_Field extends Scafold_Field_Info
*/
public function display($id, $value)
{
- return $value===null ? '-' : QFW::$view->esc($value);
+ return $value===null ? ( $this->fiendInfo['Null'] == 'YES' ? 'NULL' : '-')
+ : QFW::$view->esc($value);
}
/**
@@ -135,6 +136,8 @@ class Scafold_Field extends Scafold_Field_Info
*/
public function proccess($id, $value)
{
+ if ($this->fiendInfo['Null'] == 'YES' && $value=='')
+ return null;
return $value;
}
-----------------------------------------------------------------------
Summary of changes:
lib/Modules/Scafold/Fields.php | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
hooks/post-receive
--
quickfw
|