+ add the feature of custom fields.

This commit is contained in:
wangchunsheng
2010-07-28 06:14:58 +00:00
parent 7a3bd1996e
commit ac7b3f2051
7 changed files with 216 additions and 0 deletions
+13
View File
@@ -460,4 +460,17 @@ class bugModel extends model
->get();
$this->dao->insert(TABLE_USERTPL)->data($template)->autoCheck('title, content', 'notempty')->check('title', 'unique')->exec();
}
/* 给一个字段的列表,返回字段和相应语言解释的键值对。*/
public function getFieldPairs($fields)
{
$fields = explode(',', $fields);
foreach($fields as $key => $field)
{
$field = trim($field);
$fields[$field] = $this->lang->bug->$field;
unset($fields[$key]);
}
return $fields;
}
}