diff --git a/config.default.php b/config.default.php index 204d752..af2183e 100644 --- a/config.default.php +++ b/config.default.php @@ -4,7 +4,7 @@ define('HTTP_TIMEOUT', '20'); // HTTP_MAX_RESPONSE_SIZE => Maximum accepted size of the response body in MB (default 2MB) -defined('HTTP_MAX_RESPONSE_SIZE') or define('HTTP_MAX_RESPONSE_SIZE', 2097152); +define('HTTP_MAX_RESPONSE_SIZE', 2097152); // DATA_DIRECTORY => default is data (writable directory) define('DATA_DIRECTORY', __DIR__.'/data'); diff --git a/controllers/item.php b/controllers/item.php index 85dc9da..59e1b19 100644 --- a/controllers/item.php +++ b/controllers/item.php @@ -17,7 +17,7 @@ Router\get_action('unread', function() { $group_id = Request\int_param('group_id', null); $feed_ids = array(); - if (!is_null($group_id)) { + if (! is_null($group_id)) { $feed_ids = Model\Group\get_feeds_by_group($group_id); } diff --git a/lib/helpers.php b/lib/helpers.php index 756fee9..1b0e864 100644 --- a/lib/helpers.php +++ b/lib/helpers.php @@ -74,25 +74,13 @@ function escape($value) return htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false); } -function flash($html) +function flash($type, $html) { $data = ''; - if (isset($_SESSION['flash_message'])) { - $data = sprintf($html, escape($_SESSION['flash_message'])); - unset($_SESSION['flash_message']); - } - - return $data; -} - -function flash_error($html) -{ - $data = ''; - - if (isset($_SESSION['flash_error_message'])) { - $data = sprintf($html, escape($_SESSION['flash_error_message'])); - unset($_SESSION['flash_error_message']); + if (isset($_SESSION[$type])) { + $data = sprintf($html, escape($_SESSION[$type])); + unset($_SESSION[$type]); } return $data; diff --git a/models/group.php b/models/group.php index 4fadd94..d010edc 100644 --- a/models/group.php +++ b/models/group.php @@ -79,7 +79,7 @@ function get_group_id($title) /** * Get all feed ids assigned to a group * - * @param array $group_id + * @param integer $group_id * @return array */ function get_feeds_by_group($group_id) diff --git a/models/remember_me.php b/models/remember_me.php index 35d0c62..85543ed 100644 --- a/models/remember_me.php +++ b/models/remember_me.php @@ -103,7 +103,6 @@ function refresh() * Remove the current RememberMe session and the cookie * * @access public - * @param integer $user_id User id */ function destroy() { diff --git a/templates/layout.php b/templates/layout.php index 938b9b1..baf248f 100644 --- a/templates/layout.php +++ b/templates/layout.php @@ -51,8 +51,8 @@
- %s') ?> - %s') ?> + %s') ?> + %s') ?>