/** * Constructor. If nothing else, it also has to call the constructor of the parent * class, BlogAction with the same parameters */ function AdminEditTrackbacksAction($actionInfo, $request) { $this->AdminAction($actionInfo, $request); // data validation $this->registerFieldValidator("articleId", new IntegerValidator()); $view = new AdminPostsListView($this->_blogInfo); $view->setErrorMessage($this->_locale->tr("error_fetching_trackbacks")); $this->setValidationErrorView($view); }
/** * Constructor. If nothing else, it also has to call the constructor of the parent * class, BlogAction with the same parameters */ function AdminPostStatsAction($actionInfo, $request) { $this->AdminAction($actionInfo, $request); // data validatdion $this->registerFieldValidator("postId", new IntegerValidator()); $view = new AdminPostsListView($this->_blogInfo); $view->setErrorMessage($this->_locale->tr("error_incorrect_article_id")); $this->setValidationErrorView($view); }
/** * Constructor. If nothing else, it also has to call the constructor of the parent * class, BlogAction with the same parameters */ function AdminMarkCommentAction($actionInfo, $request) { $this->AdminAction($actionInfo, $request); // data validation $this->registerFieldValidator("commentId", new IntegerValidator()); $this->registerFieldValidator("articleId", new IntegerValidator()); $this->registerFieldValidator("mode", new IntegerValidator()); $view = new AdminPostsListView($this->_blogInfo); $view->setErrorMessage($this->_locale->tr("error_incorrect_comment_id")); $this->setValidationErrorView($view); }
/** * Constructor. If nothing else, it also has to call the constructor of the parent * class, BlogAction with the same parameters */ function AdminEditPostAction($actionInfo, $request) { $this->AdminAction($actionInfo, $request); // data validation $this->registerFieldValidator("postId", new IntegerValidator()); // if we don't register the fields below, the view will complain that they are // not valid! $this->registerField("postTopic"); $this->registerField("postText"); $this->registerField("postCategories"); $view = new AdminPostsListView($this->_blogInfo); $view->setErrorMessage($this->_locale->tr("error_incorrect_article_id")); $this->setValidationErrorView($view); }
/** * Constructor. If nothing else, it also has to call the constructor of the parent * class, BlogAction with the same parameters */ function AdminDeleteCommentAction($actionInfo, $request) { $this->AdminAction($actionInfo, $request); $this->_mode = $actionInfo->getActionParamValue(); $this->registerFieldValidator("articleId", new IntegerValidator()); if ($this->_mode == "deleteComment") { $this->registerFieldValidator("commentId", new IntegerValidator()); } else { $this->registerFieldValidator("commentIds", new ArrayValidator()); } $view = new AdminPostsListView($this->_blogInfo); $view->setErrorMessage($this->_locale->tr("error_deleting_comments")); $this->setValidationErrorView($view); }
/** * Constructor. If nothing else, it also has to call the constructor of the parent * class, BlogAction with the same parameters */ function AdminDeletePostAction($actionInfo, $request) { $this->AdminAction($actionInfo, $request); // data validation stuff... $this->_mode = $actionInfo->getActionParamValue(); if ($this->_mode == "deletePost") { $this->registerFieldValidator("postId", new IntegerValidator()); } else { $this->registerFieldValidator("postIds", new ArrayValidator()); } $view = new AdminPostsListView($this->_blogInfo); $view->setErrorMessage($this->_locale->tr("error_incorrect_article_id")); $this->setValidationErrorView($view); }