From ac578aa35961ef5df4f2128a07213284ccd12a25 Mon Sep 17 00:00:00 2001 From: avl Date: Mon, 1 Sep 2008 06:23:59 +0300 Subject: [PATCH] 0.4 beta --- ipf/admin/model.php | 24 +++++++++++++----------- ipf/auth/forms/profile.php | 18 ++++++++++++++++++ ipf/version.php | 2 +- 3 files changed, 32 insertions(+), 12 deletions(-) create mode 100644 ipf/auth/forms/profile.php diff --git a/ipf/admin/model.php b/ipf/admin/model.php index e13306a..6326be0 100644 --- a/ipf/admin/model.php +++ b/ipf/admin/model.php @@ -88,27 +88,29 @@ class IPF_Admin_Model{ } public function ListItemsQuery(){ - $query = IPF_ORM_Query::create(); - $this->q = $query->select("o.*")->from($this->modelName.' o'); + $this->q = IPF_ORM_Query::create()->from($this->modelName); } public function ListRow($o){ $row = array(); foreach($this->header as &$h){ - $t = $o->getTable()->getTypeOf($h['name']); - $str = $o->$h['name']; - if ($t=='boolean'){ - if ($str) - $str = 'True'; - else - $str = 'True'; + $listMethod = 'column_'.$h['name']; + if (method_exists($this,$listMethod)) + $str = $this->$listMethod(&$o); + else{ + $t = $o->getTable()->getTypeOf($h['name']); + $str = $o->$h['name']; + if ($t=='boolean'){ + if ($str) + $str = 'True'; + else + $str = 'False'; + } } $row[$h['name']] = $str; } $this->LinksRow(&$row, &$o); - - return $row; } diff --git a/ipf/auth/forms/profile.php b/ipf/auth/forms/profile.php new file mode 100644 index 0000000..f7a059a --- /dev/null +++ b/ipf/auth/forms/profile.php @@ -0,0 +1,18 @@ +fields['username']->help_text = 'Required. 32 characters or fewer. Alphanumeric characters only (letters, digits and underscores).'; + } +} diff --git a/ipf/version.php b/ipf/version.php index 8fb3868..ad59e8f 100644 --- a/ipf/version.php +++ b/ipf/version.php @@ -1,5 +1,5 @@