wip
This commit is contained in:
@ -25,6 +25,7 @@ class ReviewForms extends Forms {
|
||||
self::addHandler( 'editReview', __CLASS__, 'editReview' );
|
||||
self::addHandler( 'categoryCreate', __CLASS__, 'categoryCreate' );
|
||||
self::addHandler( 'categoryEdit', __CLASS__, 'categoryEdit' );
|
||||
self::addHandler( 'reviewEditPublic', __CLASS__, 'reviewEditPublic' );
|
||||
}
|
||||
|
||||
/**
|
||||
@ -88,6 +89,21 @@ class ReviewForms extends Forms {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public static function reviewEditPublic() {
|
||||
if ( ! Input::exists( 'review' ) ) {
|
||||
Check::addUserError( 'You must provide a review.' );
|
||||
return false;
|
||||
}
|
||||
if ( ! Input::exists( 'title' ) ) {
|
||||
Check::addUserError( 'You must provide a title.' );
|
||||
return false;
|
||||
}
|
||||
if ( ! Input::exists( 'rating' ) ) {
|
||||
Check::addUserError( 'You must provide a rating.' );
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
new ReviewForms;
|
||||
|
Reference in New Issue
Block a user