From 3b3accf6ce5d29449ee4d556b6277d92a1830680 Mon Sep 17 00:00:00 2001 From: Seokseong Jeon <6747391+gsongsong@users.noreply.github.com> Date: Tue, 5 Feb 2019 23:05:40 +0900 Subject: i18n Korean (#2242) --- cli/i18n/ignore/kr.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'cli') diff --git a/cli/i18n/ignore/kr.php b/cli/i18n/ignore/kr.php index 24cfbc86a..bbccb2d7d 100644 --- a/cli/i18n/ignore/kr.php +++ b/cli/i18n/ignore/kr.php @@ -8,6 +8,18 @@ return array( 'conf.sharing.shaarli', 'conf.sharing.twitter', 'conf.sharing.wallabag', + 'gen.date.Apr', + 'gen.date.Aug', + 'gen.date.Dec', + 'gen.date.Feb', + 'gen.date.Jan', + 'gen.date.Jul', + 'gen.date.Jun', + 'gen.date.Mar', + 'gen.date.May', + 'gen.date.Nov', + 'gen.date.Oct', + 'gen.date.Sep', 'gen.lang.cz', 'gen.lang.de', 'gen.lang.en', @@ -17,6 +29,7 @@ return array( 'gen.lang.it', 'gen.lang.kr', 'gen.lang.nl', + 'gen.lang.oc', 'gen.lang.pt-br', 'gen.lang.ru', 'gen.lang.tr', @@ -29,8 +42,11 @@ return array( 'gen.share.g+', 'gen.share.gnusocial', 'gen.share.jdh', + 'gen.share.linkedin', 'gen.share.mastodon', 'gen.share.movim', + 'gen.share.pinboard', + 'gen.share.pocket', 'gen.share.shaarli', 'gen.share.twitter', 'gen.share.wallabag', -- cgit v1.2.3 From e6888bbf232de5547560ea3af56ed760cb11c4ae Mon Sep 17 00:00:00 2001 From: hoilc Date: Mon, 18 Mar 2019 17:55:50 +0800 Subject: update zh-cn (i18n) (#2280) --- app/i18n/zh-cn/admin.php | 20 ++++++++++---------- app/i18n/zh-cn/conf.php | 26 +++++++++++++------------- app/i18n/zh-cn/feedback.php | 10 +++++----- app/i18n/zh-cn/gen.php | 2 +- app/i18n/zh-cn/index.php | 6 +++--- app/i18n/zh-cn/install.php | 4 ++-- app/i18n/zh-cn/sub.php | 14 +++++++------- cli/i18n/ignore/zh-cn.php | 4 ++++ 8 files changed, 45 insertions(+), 41 deletions(-) (limited to 'cli') diff --git a/app/i18n/zh-cn/admin.php b/app/i18n/zh-cn/admin.php index e34070526..74f57b6e8 100644 --- a/app/i18n/zh-cn/admin.php +++ b/app/i18n/zh-cn/admin.php @@ -64,11 +64,11 @@ return array( 'files' => '文件相关', 'json' => array( 'nok' => '找不到 JSON 扩展 (php-json ) 。', - 'ok' => '已找到 JSON 扩展', + 'ok' => '已找到 JSON 扩展。', ), 'mbstring' => array( - 'nok' => 'Cannot find the recommended library mbstring for Unicode.', //TODO - Translation - 'ok' => 'You have the recommended library mbstring for Unicode.', //TODO - Translation + 'nok' => '找不到推荐的 Unicode 解析库 (mbstring)。', + 'ok' => '已找到推荐的 Unicode 解析库 (mbstring)。', ), 'minz' => array( 'nok' => '找不到 Minz 框架。', @@ -163,8 +163,8 @@ return array( 'max-categories' => '每用户分类限制', 'max-feeds' => '每用户 RSS 源限制', 'cookie-duration' => array( - 'help' => 'in seconds', // @todo translate - 'number' => 'Duration to keep logged in', // @todo translate + 'help' => '单位(秒)', + 'number' => '保持登录的时长', ), 'registration' => array( 'help' => '0 表示无账户数限制', @@ -183,15 +183,15 @@ return array( 'user' => array( 'articles_and_size' => '%s 篇文章 (%s)', 'create' => '创建新用户', - 'delete_users' => 'Delete user', //TODO - Translation + 'delete_users' => '删除用户', 'language' => '语言', - 'number' => '已有 %d 个帐户', - 'numbers' => '已有 %d 个帐户', + 'number' => '已有 %d 个用户', + 'numbers' => '已有 %d 个用户', 'password_form' => '密码
(用于 Web-form 登录方式)', 'password_format' => '至少 7 个字符', - 'selected' => 'Selected user', //TODO - Translation + 'selected' => '已选中用户', 'title' => '用户管理', - 'update_users' => 'Update user', //TODO - Translation + 'update_users' => '更新用户', 'user_list' => '用户列表', 'username' => '用户名', 'users' => '用户', diff --git a/app/i18n/zh-cn/conf.php b/app/i18n/zh-cn/conf.php index 1216aaaca..535dfd358 100644 --- a/app/i18n/zh-cn/conf.php +++ b/app/i18n/zh-cn/conf.php @@ -28,7 +28,7 @@ return array( 'seconds' => '秒 (0 表示不超时)', 'timeout' => 'HTML5 通知超时时间', ), - 'show_nav_buttons' => 'Show the navigation buttons', //TODO - Translation + 'show_nav_buttons' => '显示导航按钮', 'theme' => '主题', 'title' => '显示', 'width' => array( @@ -53,7 +53,7 @@ return array( 'query' => array( '_' => '自定义查询', 'deprecated' => '此查询不再有效。相关的分类或 RSS 源已被删除。', - 'display' => 'Display user query results', //TODO - Translation + 'display' => '显示查询结果', 'filter' => '生效的过滤器:', 'get_all' => '显示所有文章', 'get_category' => '显示分类 "%s"', @@ -64,7 +64,7 @@ return array( 'number' => '查询 n°%d', 'order_asc' => '由旧到新显示文章', 'order_desc' => '由新到旧显示文章', - 'remove' => 'Remove user query', //TODO - Translation + 'remove' => '删除查询', 'search' => '搜索 "%s"', 'state_0' => '显示所有文章', 'state_1' => '显示已读文章', @@ -128,7 +128,7 @@ return array( ), 'sharing' => array( '_' => '分享', - 'add' => 'Add a sharing method', //TODO - Translation + 'add' => '添加分享方式', 'blogotext' => 'Blogotext', 'diaspora' => 'Diaspora*', 'email' => 'Email', @@ -136,7 +136,7 @@ return array( 'g+' => 'Google+', 'more_information' => '更多信息', 'print' => '打印', - 'remove' => 'Remove sharing method', //TODO - Translation + 'remove' => '删除分享方式', 'shaarli' => 'Shaarli', 'share_name' => '名称', 'share_url' => '地址', @@ -148,31 +148,31 @@ return array( '_' => '快捷键', 'article_action' => '文章操作', 'auto_share' => '分享', - 'auto_share_help' => '如果有多种分享模式,则会按照它们的编号依次访问。', + 'auto_share_help' => '如果有多种分享方式,则会按照它们的编号依次访问。', 'close_dropdown' => '关闭菜单', 'collapse_article' => '收起文章', - 'first_article' => '跳转到第一篇文章', + 'first_article' => '打开第一篇文章', 'focus_search' => '聚焦到搜索框', 'global_view' => '切换到全屏视图', 'help' => '显示帮助文档', 'javascript' => '若要使用快捷键,必须启用 JavaScript', - 'last_article' => '跳转到最后一篇文章', + 'last_article' => '打开最后一篇文章', 'load_more' => '载入更多文章', 'mark_favorite' => '加入收藏', 'mark_read' => '设为已读', 'navigation' => '浏览', 'navigation_help' => '搭配 "Shift" 键,浏览快捷键将生效于 RSS 源。
搭配 "Alt" 键,浏览快捷键将生效于分类。', - 'navigation_no_mod_help' => 'The following navigation shortcuts do not support modifiers.', //TODO - Translation - 'next_article' => '跳转到下一篇文章', + 'navigation_no_mod_help' => '以下快捷键不支持组合键 (Shift 或 Alt)', + 'next_article' => '打开下一篇文章', 'normal_view' => '切换到普通视图', 'other_action' => '其他操作', - 'previous_article' => '跳转到上一篇文章', + 'previous_article' => '打开上一篇文章', 'reading_view' => '切换到阅读视图', 'rss_view' => '在新标签中打开 RSS 视图', 'see_on_website' => '在原网站上查看', 'shift_for_all_read' => '+ shift 可以将全部文章设为已读', - 'skip_next_article' => 'Focus next without opening', //TODO - Translation - 'skip_previous_article' => 'Focus previous without opening', //TODO - Translation + 'skip_next_article' => '跳转到下一篇文章而不打开', + 'skip_previous_article' => '跳转到上一篇文章而不打开', 'title' => '快捷键', 'user_filter' => '显示自定义查询', 'user_filter_help' => '如果有多个自定义过滤器,则会按照它们的编号依次访问。', diff --git a/app/i18n/zh-cn/feedback.php b/app/i18n/zh-cn/feedback.php index e1778a9f2..e8ee969b0 100644 --- a/app/i18n/zh-cn/feedback.php +++ b/app/i18n/zh-cn/feedback.php @@ -57,8 +57,8 @@ return array( 'sub' => array( 'actualize' => '获取', 'articles' => array( - 'marked_read' => 'The selected articles have been marked as read.', //TODO - Translation - 'marked_unread' => 'The articles have been marked as unread.', //TODO - Translation + 'marked_read' => '选中文章已标记为已读', + 'marked_unread' => '文章已标记为未读', ), 'category' => array( 'created' => '分类 %s 已创建。', @@ -80,7 +80,7 @@ return array( 'already_subscribed' => '你已订阅 %s', 'deleted' => 'RSS 源已删除', 'error' => 'RSS 源更新失败', - 'internal_problem' => 'RSS 源添加失败。检查 FreshRSS 日志 查看详情。', //TODO - Translation + 'internal_problem' => 'RSS 源添加失败。检查 FreshRSS 日志 查看详情。你可以在URL后附加 #force_feed 从而尝试强制添加。', 'invalid_url' => 'URL %s 无效', 'n_actualized' => '%d 个 RSS 源已更新', 'n_entries_deleted' => '%d 篇文章已删除', @@ -109,8 +109,8 @@ return array( 'error' => '用户 %s 删除失败', ), 'updated' => array( - '_' => 'User %s has been updated', //TODO - Translation - 'error' => 'User %s has not been updated', //TODO - Translation + '_' => '用户 %s 已更新', + 'error' => '用户 %s 更新失败', ), ), ); diff --git a/app/i18n/zh-cn/gen.php b/app/i18n/zh-cn/gen.php index 1dcd95233..11d4efdb3 100644 --- a/app/i18n/zh-cn/gen.php +++ b/app/i18n/zh-cn/gen.php @@ -19,7 +19,7 @@ return array( 'see_website' => '查看网站', 'submit' => '提交', 'truncate' => '删除所有文章', - 'update' => 'Update', //TODO - Translation + 'update' => '更新', //TODO - Translation ), 'auth' => array( 'email' => 'Email 地址', diff --git a/app/i18n/zh-cn/index.php b/app/i18n/zh-cn/index.php index 3f6b44701..018813c3e 100644 --- a/app/i18n/zh-cn/index.php +++ b/app/i18n/zh-cn/index.php @@ -40,7 +40,7 @@ return array( 'mark_all_read' => '全部设为已读', 'mark_cat_read' => '此分类设为已读', 'mark_feed_read' => '此源设为已读', - 'mark_selection_unread' => 'Mark selection as unread', //TODO - Translation + 'mark_selection_unread' => '选中设为已读', 'newer_first' => '由新到旧', 'non-starred' => '显示未收藏', 'normal_view' => '普通视图', @@ -53,11 +53,11 @@ return array( 'starred' => '显示收藏', 'stats' => '统计', 'subscription' => '订阅管理', - 'tags' => 'My labels', //TODO - Translation + 'tags' => '我的标签', 'unread' => '显示未读', ), 'share' => '分享', 'tag' => array( - 'related' => '相关标签', //TODO - Translation + 'related' => '文章标签', ), ); diff --git a/app/i18n/zh-cn/install.php b/app/i18n/zh-cn/install.php index 29647932a..da231917b 100644 --- a/app/i18n/zh-cn/install.php +++ b/app/i18n/zh-cn/install.php @@ -69,8 +69,8 @@ return array( 'ok' => '已找到推荐的 JSON 解析库。', ), 'mbstring' => array( - 'nok' => 'Cannot find the recommended library mbstring for Unicode.', //TODO - Translation - 'ok' => 'You have the recommended library mbstring for Unicode.', //TODO - Translation + 'nok' => '找不到推荐的 Unicode 解析库 (mbstring)。', + 'ok' => '已找到推荐的 Unicode 解析库 (mbstring)。', ), 'minz' => array( 'nok' => '找不到 Minz 框架。', diff --git a/app/i18n/zh-cn/sub.php b/app/i18n/zh-cn/sub.php index 3a9623468..f84d08cdf 100644 --- a/app/i18n/zh-cn/sub.php +++ b/app/i18n/zh-cn/sub.php @@ -27,7 +27,7 @@ return array( 'password' => 'HTTP 密码', 'username' => 'HTTP 用户名', ), - 'clear_cache' => 'Always clear cache', //TODO - Translation + 'clear_cache' => '总是清除缓存', 'css_help' => '用于获取全文(注意,这将耗费更多时间!)', 'css_path' => '原文的 CSS 选择器', 'description' => '描述', @@ -47,16 +47,16 @@ return array( ), 'websub' => 'WebSub 即时通知', 'show' => array( - 'all' => 'Show all feeds', //TODO - Translation - 'error' => 'Show only feeds with error', //TODO - Translation + 'all' => '显示所有 RSS 源', + 'error' => '仅显示有错误的 RSS 源', ), 'showing' => array( - 'error' => 'Showing only feeds with error', //TODO - Translation + 'error' => '正在显示有错误的 RSS 源', ), - 'ssl_verify' => 'Verify SSL security', //TODO - Translation + 'ssl_verify' => '验证 SSL 安全', 'stats' => '统计', 'think_to_add' => '你可以添加一些 RSS 源。', - 'timeout' => 'Timeout in seconds', //TODO - Translation + 'timeout' => '超时时间(秒)', 'title' => '标题', 'title_add' => '添加 RSS 源', 'ttl' => '最小自动更新时间', @@ -72,7 +72,7 @@ return array( 'export' => '导出', 'export_opml' => '导出 RSS 源列表 (OPML)', 'export_starred' => '导出你的收藏', - 'export_labelled' => 'Export your labelled articles', //TODO + 'export_labelled' => '导出有标签的文章', 'feed_list' => '%s 文章列表', 'file_to_import' => '需要导入的文件
(OPML, JSON 或 ZIP)', 'file_to_import_no_zip' => '需要导入的文件
(OPML 或 JSON)', diff --git a/cli/i18n/ignore/zh-cn.php b/cli/i18n/ignore/zh-cn.php index c00ac79d3..d55071d10 100644 --- a/cli/i18n/ignore/zh-cn.php +++ b/cli/i18n/ignore/zh-cn.php @@ -18,6 +18,7 @@ return array( 'gen.lang.it', 'gen.lang.kr', 'gen.lang.nl', + 'gen.lang.oc', 'gen.lang.pt-br', 'gen.lang.ru', 'gen.lang.tr', @@ -29,8 +30,11 @@ return array( 'gen.share.g+', 'gen.share.gnusocial', 'gen.share.jdh', + 'gen.share.linkedin', 'gen.share.mastodon', 'gen.share.movim', + 'gen.share.pinboard', + 'gen.share.pocket', 'gen.share.shaarli', 'gen.share.twitter', 'gen.share.wallabag', -- cgit v1.2.3 From 71b4226dc721bc0f23cc594760329f29e51defac Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Tue, 19 Mar 2019 20:27:06 +0100 Subject: Add an option validation on cli commands (#2278) If an option used on cli is not recognized, the command aborts and displays an error message. If the typed option is similar to one of the recognized options, a hint is displayed. At the moment, there is a limitation on long options. Short options are not validated at the moment. See #2046 --- cli/_cli.php | 25 +++++++++++++++++++++++++ cli/_update-or-create-user.php | 2 +- cli/actualize-user.php | 10 ++++++---- cli/db-optimize.php | 10 ++++++---- cli/delete-user.php | 10 ++++++---- cli/do-install.php | 6 +++--- cli/export-opml-for-user.php | 10 ++++++---- cli/export-zip-for-user.php | 12 +++++++----- cli/import-for-user.php | 12 +++++++----- cli/reconfigure.php | 8 ++++++++ 10 files changed, 75 insertions(+), 30 deletions(-) (limited to 'cli') diff --git a/cli/_cli.php b/cli/_cli.php index e8fb6ae42..dec244bc3 100644 --- a/cli/_cli.php +++ b/cli/_cli.php @@ -3,6 +3,9 @@ if (php_sapi_name() !== 'cli') { die('FreshRSS error: This PHP script may only be invoked from command line!'); } +const REGEX_INPUT_OPTIONS = '/^--/'; +const REGEX_PARAM_OPTIONS = '/:*$/'; + require(__DIR__ . '/../constants.php'); require(LIB_PATH . '/lib_rss.php'); //Includes class autoloader require(LIB_PATH . '/lib_install.php'); @@ -64,3 +67,25 @@ function performRequirementCheck($databaseType) { fail($message); } } + +function getLongOptions($options, $regex) { + $longOptions = array_filter($options, function($a) use ($regex) { + return preg_match($regex, $a); + }); + return array_map(function($a) use ($regex) { + return preg_replace($regex, '', $a); + }, $longOptions); +} + +function validateOptions($input, $params) { + $sanitizeInput = getLongOptions($input, REGEX_INPUT_OPTIONS); + $sanitizeParams = getLongOptions($params, REGEX_PARAM_OPTIONS); + $unknownOptions = array_diff($sanitizeInput, $sanitizeParams); + + if (0 === count($unknownOptions)) { + return true; + } + + fwrite(STDERR, sprintf("FreshRSS error: unknown options: %s\n", implode (', ', $unknownOptions))); + return false; +} diff --git a/cli/_update-or-create-user.php b/cli/_update-or-create-user.php index a5960b58a..eda597f19 100644 --- a/cli/_update-or-create-user.php +++ b/cli/_update-or-create-user.php @@ -22,7 +22,7 @@ if (!$isUpdate) { $options = getopt('', $params); -if (empty($options['user'])) { +if (!validateOptions($argv, $params) || empty($options['user'])) { fail('Usage: ' . basename($_SERVER['SCRIPT_FILENAME']) . " --user username ( --password 'password' --api_password 'api_password'" . " --language en --email user@example.net --token 'longRandomString'" . diff --git a/cli/actualize-user.php b/cli/actualize-user.php index dd07fc142..08e17de98 100755 --- a/cli/actualize-user.php +++ b/cli/actualize-user.php @@ -2,11 +2,13 @@ /path/to/file.opml.xml"); } diff --git a/cli/export-zip-for-user.php b/cli/export-zip-for-user.php index 86113d9fa..b89a55104 100755 --- a/cli/export-zip-for-user.php +++ b/cli/export-zip-for-user.php @@ -2,12 +2,14 @@ /path/to/file.zip"); } diff --git a/cli/import-for-user.php b/cli/import-for-user.php index 95ff18c8c..7c66fbef2 100755 --- a/cli/import-for-user.php +++ b/cli/import-for-user.php @@ -2,12 +2,14 @@ Date: Sat, 23 Mar 2019 12:08:35 +0100 Subject: CLI user-info fixes (#2292) * CLI missing exit codes https://github.com/FreshRSS/FreshRSS/issues/2291 * CLI catch for outdated databases https://github.com/FreshRSS/FreshRSS/issues/2291#issuecomment-475856890 --- app/Models/TagDAO.php | 14 +++++++++++--- cli/list-users.php | 2 ++ cli/user-info.php | 2 ++ 3 files changed, 15 insertions(+), 3 deletions(-) (limited to 'cli') diff --git a/app/Models/TagDAO.php b/app/Models/TagDAO.php index 0b4428f17..297d24c96 100644 --- a/app/Models/TagDAO.php +++ b/app/Models/TagDAO.php @@ -187,9 +187,17 @@ class FreshRSS_TagDAO extends Minz_ModelPdo implements FreshRSS_Searchable { public function count() { $sql = 'SELECT COUNT(*) AS count FROM `' . $this->prefix . 'tag`'; $stm = $this->bd->prepare($sql); - $stm->execute(); - $res = $stm->fetchAll(PDO::FETCH_ASSOC); - return $res[0]['count']; + if ($stm && $stm->execute()) { + $res = $stm->fetchAll(PDO::FETCH_ASSOC); + return $res[0]['count']; + } else { + $info = $stm == null ? array(0 => '', 1 => '', 2 => 'syntax error') : $stm->errorInfo(); + if ($this->autoUpdateDb($info)) { + return $this->count(); + } + Minz_Log::error('SQL error TagDAO::count: ' . $info[2]); + return false; + } } public function countEntries($id) { diff --git a/cli/list-users.php b/cli/list-users.php index 758bbdb46..b3ce9936f 100755 --- a/cli/list-users.php +++ b/cli/list-users.php @@ -13,3 +13,5 @@ if (FreshRSS_Context::$system_conf->default_user !== '' foreach ($users as $user) { echo $user, "\n"; } + +done(); diff --git a/cli/user-info.php b/cli/user-info.php index 043bebf7c..125408c10 100755 --- a/cli/user-info.php +++ b/cli/user-info.php @@ -51,3 +51,5 @@ foreach ($users as $username) { "\n"; } } + +done(); -- cgit v1.2.3 From f2925594c7caf2753e1ac44941e029a3c1496117 Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Sat, 23 Mar 2019 23:17:22 +0100 Subject: Add header to cli (#2296) * Add header to cli Now there is a switch to display the header on user info. While doing that, I've changed how the command is working to display all users by default and to accept more than one user at once. I also changed the display to make it more pleasing. As this command displays all users by default. I wonder if we still need the list user command. See #2294 * Minor format --- cli/user-info.php | 77 ++++++++++++++++++++++++++++++++++--------------------- lib/lib_rss.php | 2 +- 2 files changed, 49 insertions(+), 30 deletions(-) (limited to 'cli') diff --git a/cli/user-info.php b/cli/user-info.php index 125408c10..aa4db7c2f 100755 --- a/cli/user-info.php +++ b/cli/user-info.php @@ -2,19 +2,46 @@ default_user ? '*' : ' ', "\t"; $catDAO = FreshRSS_Factory::createCategoryDao(); $feedDAO = FreshRSS_Factory::createFeedDao($username); @@ -25,31 +52,23 @@ foreach ($users as $username) { $nbEntries = $entryDAO->countUnreadRead(); $nbFavorites = $entryDAO->countUnreadReadFavorites(); + $data = array( + 'default' => $username === FreshRSS_Context::$system_conf->default_user ? '*' : '', + 'user' => $username, + 'lastUpdate' => FreshRSS_UserDAO::mtime($username), + 'spaceUsed' => $databaseDAO->size(), + 'categories' => $catDAO->count(), + 'feeds' => count($feedDAO->listFeedsIds()), + 'reads' => $nbEntries['read'], + 'unreads' => $nbEntries['unread'], + 'favourites' => $nbFavorites['all'], + 'tags' => $tagDAO->count(), + ); if (isset($options['h'])) { //Human format - echo - $username, "\t", - date('c', FreshRSS_UserDAO::mtime($username)), "\t", - format_bytes($databaseDAO->size()), "\t", - $catDAO->count(), " categories\t", - count($feedDAO->listFeedsIds()), " feeds\t", - $nbEntries['read'], " reads\t", - $nbEntries['unread'], " unreads\t", - $nbFavorites['all'], " favourites\t", - $tagDAO->count(), " tags\t", - "\n"; - } else { - echo - $username, "\t", - FreshRSS_UserDAO::mtime($username), "\t", - $databaseDAO->size(), "\t", - $catDAO->count(), "\t", - count($feedDAO->listFeedsIds()), "\t", - $nbEntries['read'], "\t", - $nbEntries['unread'], "\t", - $nbFavorites['all'], "\t", - $tagDAO->count(), "\t", - "\n"; + $data['lastUpdate'] = date('c', $data['lastUpdate']); + $data['spaceUsed'] = format_bytes($data['spaceUsed']); } + vprintf(DATA_FORMAT, $data); } done(); diff --git a/lib/lib_rss.php b/lib/lib_rss.php index bff59d5cc..3e0033a61 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -170,7 +170,7 @@ function format_bytes($bytes, $precision = 2, $system = 'IEC') { $pow = $bytes === 0 ? 0 : floor(log($bytes) / log($base)); $pow = min($pow, count($units) - 1); $bytes /= pow($base, $pow); - return format_number($bytes, $precision) . ' ' . $units[$pow]; + return format_number($bytes, $precision) . ' ' . $units[$pow]; } function timestamptodate ($t, $hour = true) { -- cgit v1.2.3