Bug Page 403 ne peut s'afficher si Translate n'est pas instancié avant

https://github.com/FreshRSS/FreshRSS/issues/821
This commit is contained in:
Alexandre Alapetite
2015-05-10 18:21:21 +02:00
parent 0d0c6b7493
commit 79f0f2bbb4
2 changed files with 3 additions and 2 deletions

View File

@@ -146,7 +146,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
$name = $feed->name();
$feed = Minz_ExtensionManager::callHook('feed_before_insert', $feed);
if ($feed === null) {
Minz_Request::bad(_t('feed_not_added', $name), $url_redirect);
Minz_Request::bad(_t('feedback.sub.feed.not_added', $name), $url_redirect);
}
$values = array(

View File

@@ -63,10 +63,11 @@ class FreshRSS extends Minz_FrontController {
// Basic protection against XSRF attacks
FreshRSS_Auth::removeAccess();
$http_referer = empty($_SERVER['HTTP_REFERER']) ? '' : $_SERVER['HTTP_REFERER'];
Minz_Translate::init('en'); //TODO: Better choice of fallback language
Minz_Error::error(
403,
array('error' => array(
_t('access_denied'),
_t('feedback.access.denied'),
' [HTTP_REFERER=' . htmlspecialchars($http_referer) . ']'
))
);