Changeset 784
- Timestamp:
- 05/24/06 08:36:21 (3 years ago)
- Files:
-
- discussionplugin/0.9/tracdiscussion/core.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
discussionplugin/0.9/tracdiscussion/core.py
r783 r784 165 165 elif mode == 'topic-add': 166 166 req.perm.assert_permission('DISCUSSION_VIEW') 167 req.hdf['discussion.author'] = wiki_to_oneliner(req.args.get( 168 'body'), self.env) 169 req.hdf['discussion.body'] = wiki_to_html(req.args.get('body'), 170 self.env, req) 167 168 # Get from values 169 author = req.args.get('author') 170 body = req.args.get('body') 171 172 if author: 173 req.hdf['discussion.author'] = wiki_to_oneliner(author, self.env) 174 if body: 175 req.hdf['discussion.body'] = wiki_to_html(body, self.env, req) 171 176 elif mode == 'topic-post-add': 172 177 req.perm.assert_permission('DISCUSSION_VIEW') … … 186 191 elif mode == 'message-list': 187 192 req.perm.assert_permission('DISCUSSION_VIEW') 193 194 # Get form values 195 author = req.args.get('author') 196 body = req.args.get('body') 197 188 198 if action == 'post-add': 189 199 # Submit change? 190 200 if submit: 191 # Get form values192 author = req.args.get('author')193 body = req.args.get('body')194 195 201 self.add_message(cursor, forum['id'], topic['id'], reply, 196 202 author, body) 197 203 198 204 # Display messages 199 req.hdf['discussion.body'] = wiki_to_html(req.args.get('body'),200 self.env, req)201 req.hdf['discussion.author'] = wiki_to_oneliner(req.args.get(202 'author'), self.env)205 if author: 206 req.hdf['discussion.author'] = wiki_to_oneliner(author, self.env) 207 if body: 208 req.hdf['discussion.body'] = wiki_to_html(body, self.env, req) 203 209 req.hdf['discussion.messages'] = self.get_messages(cursor, 204 210 topic['id'], req)
