mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-05-18 21:34:35 -04:00
Fix Minz_Error::error() -> use default values
This commit is contained in:
@@ -19,8 +19,7 @@ class FreshRSS_auth_Controller extends Minz_ActionController {
|
||||
*/
|
||||
public function indexAction() {
|
||||
if (!FreshRSS_Auth::hasAccess('admin')) {
|
||||
Minz_Error::error(403,
|
||||
array('error' => array(_t('access_denied'))));
|
||||
Minz_Error::error(403);
|
||||
}
|
||||
|
||||
Minz_View::prependTitle(_t('gen.title.authentication') . ' · ');
|
||||
|
||||
@@ -13,10 +13,7 @@ class FreshRSS_category_Controller extends Minz_ActionController {
|
||||
*/
|
||||
public function firstAction() {
|
||||
if (!FreshRSS_Auth::hasAccess()) {
|
||||
Minz_Error::error(
|
||||
403,
|
||||
array('error' => array(_t('access_denied')))
|
||||
);
|
||||
Minz_Error::error(403);
|
||||
}
|
||||
|
||||
$catDAO = new FreshRSS_CategoryDAO();
|
||||
|
||||
@@ -11,10 +11,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
|
||||
*/
|
||||
public function firstAction() {
|
||||
if (!FreshRSS_Auth::hasAccess()) {
|
||||
Minz_Error::error(
|
||||
403,
|
||||
array('error' => array(_t('access_denied')))
|
||||
);
|
||||
Minz_Error::error(403);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,10 +11,7 @@ class FreshRSS_entry_Controller extends Minz_ActionController {
|
||||
*/
|
||||
public function firstAction() {
|
||||
if (!FreshRSS_Auth::hasAccess()) {
|
||||
Minz_Error::error(
|
||||
403,
|
||||
array('error' => array(_t('access_denied')))
|
||||
);
|
||||
Minz_Error::error(403);
|
||||
}
|
||||
|
||||
// If ajax request, we do not print layout
|
||||
|
||||
@@ -20,10 +20,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
|
||||
$action = Minz_Request::actionName();
|
||||
if ($action !== 'actualize' ||
|
||||
!(Minz_Configuration::allowAnonymousRefresh() || $token_is_ok)) {
|
||||
Minz_Error::error(
|
||||
403,
|
||||
array('error' => array(_t('access_denied')))
|
||||
);
|
||||
Minz_Error::error(403);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -442,10 +439,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
|
||||
} else {
|
||||
Minz_Log::warning('Cannot move feed `' . $feed_id . '` ' .
|
||||
'in the category `' . $cat_id . '`');
|
||||
Minz_Error::error(
|
||||
404,
|
||||
array('error' => array(_t('error_occurred')))
|
||||
);
|
||||
Minz_Error::error(404);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,10 +11,7 @@ class FreshRSS_importExport_Controller extends Minz_ActionController {
|
||||
*/
|
||||
public function firstAction() {
|
||||
if (!FreshRSS_Auth::hasAccess()) {
|
||||
Minz_Error::error(
|
||||
403,
|
||||
array('error' => array(_t('access_denied')))
|
||||
);
|
||||
Minz_Error::error(403);
|
||||
}
|
||||
|
||||
require_once(LIB_PATH . '/lib_opml.php');
|
||||
|
||||
@@ -5,6 +5,19 @@
|
||||
*/
|
||||
class FreshRSS_stats_Controller extends Minz_ActionController {
|
||||
|
||||
/**
|
||||
* This action is called before every other action in that class. It is
|
||||
* the common boiler plate for every action. It is triggered by the
|
||||
* underlying framework.
|
||||
*/
|
||||
public function firstAction() {
|
||||
if (!FreshRSS_Auth::hasAccess()) {
|
||||
Minz_Error::error(403);
|
||||
}
|
||||
|
||||
Minz_View::prependTitle(_t('stats') . ' · ');
|
||||
}
|
||||
|
||||
/**
|
||||
* This action handles the statistic main page.
|
||||
*
|
||||
@@ -111,20 +124,4 @@ class FreshRSS_stats_Controller extends Minz_ActionController {
|
||||
$this->view->repartitionMonth = $statsDAO->calculateEntryRepartitionPerFeedPerMonth($id);
|
||||
$this->view->averageMonth = $statsDAO->calculateEntryAveragePerFeedPerMonth($id);
|
||||
}
|
||||
|
||||
/**
|
||||
* This action is called before every other action in that class. It is
|
||||
* the common boiler plate for every action. It is triggered by the
|
||||
* underlying framework.
|
||||
*/
|
||||
public function firstAction() {
|
||||
if (!FreshRSS_Auth::hasAccess()) {
|
||||
Minz_Error::error(
|
||||
403, array('error' => array(_t('access_denied')))
|
||||
);
|
||||
}
|
||||
|
||||
Minz_View::prependTitle(_t('stats') . ' · ');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,10 +11,7 @@ class FreshRSS_subscription_Controller extends Minz_ActionController {
|
||||
*/
|
||||
public function firstAction() {
|
||||
if (!FreshRSS_Auth::hasAccess()) {
|
||||
Minz_Error::error(
|
||||
403,
|
||||
array('error' => array(_t('access_denied')))
|
||||
);
|
||||
Minz_Error::error(403);
|
||||
}
|
||||
|
||||
$catDAO = new FreshRSS_CategoryDAO();
|
||||
@@ -71,10 +68,7 @@ class FreshRSS_subscription_Controller extends Minz_ActionController {
|
||||
|
||||
$id = Minz_Request::param('id');
|
||||
if ($id === false || !isset($this->view->feeds[$id])) {
|
||||
Minz_Error::error(
|
||||
404,
|
||||
array('error' => array(_t('page_not_found')))
|
||||
);
|
||||
Minz_Error::error(404);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,10 +4,7 @@ class FreshRSS_update_Controller extends Minz_ActionController {
|
||||
public function firstAction() {
|
||||
$current_user = Minz_Session::param('currentUser', '');
|
||||
if (!FreshRSS_Auth::hasAccess('admin')) {
|
||||
Minz_Error::error(
|
||||
403,
|
||||
array('error' => array(_t('access_denied')))
|
||||
);
|
||||
Minz_Error::error(403);
|
||||
}
|
||||
|
||||
invalidateHttpCache();
|
||||
|
||||
@@ -15,10 +15,7 @@ class FreshRSS_user_Controller extends Minz_ActionController {
|
||||
*/
|
||||
public function firstAction() {
|
||||
if (!FreshRSS_Auth::hasAccess()) {
|
||||
Minz_Error::error(
|
||||
403,
|
||||
array('error' => array(_t('access_denied')))
|
||||
);
|
||||
Minz_Error::error(403);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,8 +85,7 @@ class FreshRSS_user_Controller extends Minz_ActionController {
|
||||
*/
|
||||
public function manageAction() {
|
||||
if (!FreshRSS_Auth::hasAccess('admin')) {
|
||||
Minz_Error::error(403,
|
||||
array('error' => array(_t('access_denied'))));
|
||||
Minz_Error::error(403);
|
||||
}
|
||||
|
||||
Minz_View::prependTitle(_t('gen.title.user_management') . ' · ');
|
||||
|
||||
Reference in New Issue
Block a user