Skip to content

Commit

Permalink
Issue #12
Browse files Browse the repository at this point in the history
  • Loading branch information
rfdy committed Apr 20, 2015
1 parent de2e503 commit 58871b7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Event/TraderListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ public function posting_modify_template_vars(phpbbEvent $event) {
* @param phpbbEvent $event
*/
public function modify_posting_parameters(phpbbEvent $event) {
global $template;
$post = $this->request->get_super_global(\phpbb\request\request::POST);

// if this is not the first post, we don't need to catch any errors
Expand All @@ -342,7 +343,8 @@ public function modify_posting_parameters(phpbbEvent $event) {
$data = $event->get_data();

if (!empty($data['submit']) && empty($post['prefixfield'])) {
$data['error'][] = "Please select whether your intention is to Buy, Sell or Trade.";
$template->assign_var('HAS_ERROR', true);
$data['error'][] = '';
$event->set_data($data);
}
}
Expand Down

0 comments on commit 58871b7

Please sign in to comment.