From 1854075a62c6ca0422040b4e5ebf89088b0d02b2 Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Tue, 15 Feb 2011 00:32:19 +0000 Subject: added wiki - part 1 --- h-source/Application/Models/WikitalkModel.php | 50 +++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 h-source/Application/Models/WikitalkModel.php (limited to 'h-source/Application/Models/WikitalkModel.php') diff --git a/h-source/Application/Models/WikitalkModel.php b/h-source/Application/Models/WikitalkModel.php new file mode 100644 index 0000000..2de10ba --- /dev/null +++ b/h-source/Application/Models/WikitalkModel.php @@ -0,0 +1,50 @@ +. + +if (!defined('EG')) die('Direct access not allowed!'); + +class WikitalkModel extends Model_Tree +{ + + public function __construct() { + $this->_tables = 'wiki_talk'; + $this->_idFields = 'id_talk'; + + $this->orderBy = 'talk.id_talk'; + + $this->strongConditions['insert'] = array( + "checkLength|99" => 'title', + "+checkLength|5000" => 'message', + ); + + parent::__construct(); + } + + public $formStruct = array( + 'entries' => array( + 'title' => array(), + 'message' => array('type'=>'Textarea'), + 'id_talk' => array( + 'type' => 'Hidden' + ) + ), + ); + +} \ No newline at end of file -- cgit v1.2.3