diff options
| author | 2017-02-25 10:20:59 +0100 | |
|---|---|---|
| committer | 2017-02-25 10:20:59 +0100 | |
| commit | 2e871a0adf131f53dcf345ad2dda73bdf7c1a2c9 (patch) | |
| tree | 2233e1528417ab7860dd3fe8d7a3823d964ea06f | |
| parent | 648fcb63b5170d07ad6d157249be398912da658f (diff) | |
| parent | 3684d201bda997fdbfd4460dae92100ee47dd7ef (diff) | |
Merge branch 'dev' into feature/username-in-cli
| -rw-r--r-- | CHANGELOG.md | 17 | ||||
| -rw-r--r-- | CREDITS.md | 6 | ||||
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | app/Controllers/updateController.php | 2 | ||||
| -rw-r--r-- | app/Models/EntryDAO.php | 2 | ||||
| -rw-r--r-- | app/Models/FeedDAO.php | 2 | ||||
| -rw-r--r-- | app/i18n/cz/gen.php | 2 | ||||
| -rw-r--r-- | app/i18n/de/gen.php | 2 | ||||
| -rw-r--r-- | app/i18n/en/gen.php | 2 | ||||
| -rw-r--r-- | app/i18n/fr/gen.php | 2 | ||||
| -rw-r--r-- | app/i18n/it/gen.php | 2 | ||||
| -rw-r--r-- | app/i18n/nl/gen.php | 4 | ||||
| -rw-r--r-- | app/i18n/ru/gen.php | 2 | ||||
| -rw-r--r-- | app/i18n/tr/gen.php | 2 | ||||
| -rw-r--r-- | app/layout/aside_configure.phtml | 2 | ||||
| -rw-r--r-- | app/layout/header.phtml | 2 | ||||
| -rw-r--r-- | app/views/index/about.phtml | 2 | ||||
| -rw-r--r-- | cli/README.md | 3 | ||||
| -rwxr-xr-x | cli/do-install.php | 5 | ||||
| -rwxr-xr-x | cli/reconfigure.php | 58 | ||||
| -rw-r--r-- | constants.php | 2 | ||||
| -rw-r--r-- | data/config.default.php | 3 | ||||
| -rw-r--r-- | data/shares.php | 20 | ||||
| -rw-r--r-- | p/scripts/main.js | 2 |
24 files changed, 135 insertions, 12 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index da73c285e..4738b7360 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # Changelog +## 2017-03-xx FreshRSS 1.6.3-dev + +* Features + * New option `disable_update` (also from CLI) to hide the system to update to new FreshRSS versions [#1436](https://github.com/FreshRSS/FreshRSS/pull/1436) + * Share with Ⓚnown [#1420](https://github.com/FreshRSS/FreshRSS/pull/1420) + * Share with GNU social [#1422](https://github.com/FreshRSS/FreshRSS/issues/1422) +* CLI + * New command `./cli/reconfigure.php` to update an existing installation [#1439](https://github.com/FreshRSS/FreshRSS/pull/1439) +* UI + * Chrome parity with Firefox: auto-focus tab when clicking on notification [#1409](https://github.com/FreshRSS/FreshRSS/pull/1409) +* Bug fixing + * Fix PostgreSQL bugs with API and feed modifications [#1417](https://github.com/FreshRSS/FreshRSS/pull/1417) + * Allow empty strings in CLI do-install [#1435](https://github.com/FreshRSS/FreshRSS/pull/1435) +* Security + * No version number for anonymous users [#1404](https://github.com/FreshRSS/FreshRSS/issues/1404) + + ## 2016-12-26 FreshRSS 1.6.2 * Features diff --git a/CREDITS.md b/CREDITS.md index 827a8cfd3..57635669a 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -11,11 +11,14 @@ People are sorted by name so please keep this order. * [Alwaysin](https://github.com/Alwaysin): [contributions](https://github.com/FreshRSS/FreshRSS/commits?author=Alwaysin) * [Amaury Carrade](https://github.com/AmauryCarrade): [contributions](https://github.com/FreshRSS/FreshRSS/commits?author=AmauryCarrade), [Web](https://amaury.carrade.eu/) * [ASMfreaK](https://github.com/ASMfreaK): [contributions](https://github.com/FreshRSS/FreshRSS/commits?author=ASMfreaK) -* [Damstre](https://github.com/Damstre): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:Damstre), +* [Crupuk](https://github.com/Crupuk): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:Crupuk) +* [Damstre](https://github.com/Damstre): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:Damstre) * [danc](https://github.com/danc): [contributions](https://github.com/FreshRSS/FreshRSS/commits?author=danc), [Web](http://tintouli.free.fr/) +* [dswd](https://github.com/dswd): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:dswd) * [ealdraed](https://github.com/ealdraed): [contributions](https://github.com/FreshRSS/FreshRSS/commits?author=ealdraed) * [Frans de Jonge](https://github.com/Frenzie): [contributions](https://github.com/FreshRSS/FreshRSS/commits?author=Frenzie), [Web](http://fransdejonge.com/) * [Guillaume Fillon](https://github.com/kokaz): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:kokaz), [Web](http://www.guillaume-fillon.com/) +* [Guillaume Hayot](https://github.com/postblue): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:postblue), [Web](https://postblue.info/) * [hckweb](https://github.com/hckweb): [contributions](https://github.com/FreshRSS/FreshRSS/commits?author=hckweb) * [Jaussoin Timothée](https://github.com/edhelas): [contributions](https://github.com/FreshRSS/FreshRSS/commits?author=edhelas), [Web](http://edhelas.movim.eu/) * [Julien Reichardt](https://github.com/j8r): [contributions](https://github.com/FreshRSS/FreshRSS/commits?author=j8r), [Web](https://blog.jrei.ch/) @@ -33,5 +36,6 @@ People are sorted by name so please keep this order. * [romibi](https://github.com/romibi): [contributions](https://github.com/FreshRSS/FreshRSS/commits/dev?author=romibi) * [subic](https://github.com/subic): [contributions](https://github.com/FreshRSS/documentation/commits?author=subic) * [Tets42](https://github.com/Tets42): [contributions](https://github.com/FreshRSS/FreshRSS/commits?author=Tets42) +* [Thomas Citharel](https://github.com/tcitworld): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:tomgue), [Web](https://www.tcit.fr/) * [tomgue](https://github.com/tomgue): [contributions](https://github.com/FreshRSS/FreshRSS/commits?author=tomgue) * [Wanabo](https://github.com/Wanabo): [contributions](https://github.com/FreshRSS/FreshRSS/commits?author=Wanabo) @@ -51,6 +51,7 @@ We are a friendly community. 6. Advanced configuration settings can be seen in [config.php](./data/config.default.php). ## Automated install +* [](https://cloudron.io/button.html?app=org.freshrss.cloudronapp) * [](https://dfabric.github.io/DPlatform-ShellCore) * [YunoHost](https://github.com/YunoHost-Apps/freshrss_ynh) diff --git a/app/Controllers/updateController.php b/app/Controllers/updateController.php index 8f939dbdb..b4e8a0bff 100644 --- a/app/Controllers/updateController.php +++ b/app/Controllers/updateController.php @@ -162,7 +162,7 @@ class FreshRSS_update_Controller extends Minz_ActionController { } public function applyAction() { - if (!file_exists(UPDATE_FILENAME) || !is_writable(FRESHRSS_PATH)) { + if (!file_exists(UPDATE_FILENAME) || !is_writable(FRESHRSS_PATH) || Minz_Configuration::get('system')->disable_update) { Minz_Request::forward(array('c' => 'update'), true); } diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php index 397471baa..afcde3d7f 100644 --- a/app/Models/EntryDAO.php +++ b/app/Models/EntryDAO.php @@ -649,7 +649,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { $values[] = intval($id); break; case 'A': - $where .= '1 '; + $where .= '1=1 '; break; default: throw new FreshRSS_EntriesGetter_Exception('Bad type in Entry->listByType: [' . $type . ']!'); diff --git a/app/Models/FeedDAO.php b/app/Models/FeedDAO.php index 68398efd5..0168aebd9 100644 --- a/app/Models/FeedDAO.php +++ b/app/Models/FeedDAO.php @@ -67,7 +67,7 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { $set = ''; foreach ($valuesTmp as $key => $v) { - $set .= $key . '=?, '; + $set .= '`' . $key . '`=?, '; if ($key == 'httpAuth') { $valuesTmp[$key] = base64_encode($v); diff --git a/app/i18n/cz/gen.php b/app/i18n/cz/gen.php index 3db3a31da..e6aadfc02 100644 --- a/app/i18n/cz/gen.php +++ b/app/i18n/cz/gen.php @@ -165,6 +165,8 @@ return array( 'wallabag' => 'wallabag v1', 'wallabagv2' => 'wallabag v2', 'jdh' => 'Journal du hacker', + 'Known' => 'Known based sites', + 'gnusocial' => 'GNU social', ), 'short' => array( 'attention' => 'Upozornění!', diff --git a/app/i18n/de/gen.php b/app/i18n/de/gen.php index c73aedbfe..4b171a04d 100644 --- a/app/i18n/de/gen.php +++ b/app/i18n/de/gen.php @@ -165,6 +165,8 @@ return array( 'wallabag' => 'wallabag v1', 'wallabagv2' => 'wallabag v2', 'jdh' => 'Journal du hacker', + 'Known' => 'Known based sites', + 'gnusocial' => 'GNU social', ), 'short' => array( 'attention' => 'Achtung!', diff --git a/app/i18n/en/gen.php b/app/i18n/en/gen.php index 3f86cfd19..1ee5336bd 100644 --- a/app/i18n/en/gen.php +++ b/app/i18n/en/gen.php @@ -165,6 +165,8 @@ return array( 'wallabag' => 'wallabag v1', 'wallabagv2' => 'wallabag v2', 'jdh' => 'Journal du hacker', + 'Known' => 'Known based sites', + 'gnusocial' => 'GNU social', ), 'short' => array( 'attention' => 'Warning!', diff --git a/app/i18n/fr/gen.php b/app/i18n/fr/gen.php index b5dc098ae..43825f798 100644 --- a/app/i18n/fr/gen.php +++ b/app/i18n/fr/gen.php @@ -165,6 +165,8 @@ return array( 'wallabag' => 'wallabag v1', 'wallabagv2' => 'wallabag v2', 'jdh' => 'Journal du hacker', + 'Known' => 'Sites basés sur Known', + 'gnusocial' => 'GNU social', ), 'short' => array( 'attention' => 'Attention !', diff --git a/app/i18n/it/gen.php b/app/i18n/it/gen.php index a9a8709d3..ec6de84de 100644 --- a/app/i18n/it/gen.php +++ b/app/i18n/it/gen.php @@ -165,6 +165,8 @@ return array( 'wallabag' => 'wallabag v1', 'wallabagv2' => 'wallabag v2', 'jdh' => 'Journal du hacker', + 'Known' => 'Siti basati su Known', + 'gnusocial' => 'GNU social', ), 'short' => array( 'attention' => 'Attenzione!', diff --git a/app/i18n/nl/gen.php b/app/i18n/nl/gen.php index 83811ce68..11e82cb4d 100644 --- a/app/i18n/nl/gen.php +++ b/app/i18n/nl/gen.php @@ -163,8 +163,10 @@ return array( 'shaarli' => 'Shaarli', 'twitter' => 'Twitter', 'wallabag' => 'wallabag v1', - 'wallabagv2' => 'wallabag v2', + 'wallabagv2' => 'wallabag v2', 'jdh' => 'Journal du hacker', + 'Known' => 'Known based sites', + 'gnusocial' => 'GNU social', ), 'short' => array( 'attention' => 'Attentie!', diff --git a/app/i18n/ru/gen.php b/app/i18n/ru/gen.php index bc42afaa8..c913b8720 100644 --- a/app/i18n/ru/gen.php +++ b/app/i18n/ru/gen.php @@ -165,6 +165,8 @@ return array( 'twitter' => 'Twitter', 'wallabag' => 'wallabag v1', 'wallabagv2' => 'wallabag v2', + 'Known' => 'Known based sites', + 'gnusocial' => 'GNU social', ), 'short' => array( 'attention' => 'Warning!', diff --git a/app/i18n/tr/gen.php b/app/i18n/tr/gen.php index bcc839daf..4da0206ec 100644 --- a/app/i18n/tr/gen.php +++ b/app/i18n/tr/gen.php @@ -165,6 +165,8 @@ return array( 'wallabag' => 'wallabag v1', 'wallabagv2' => 'wallabag v2', 'jdh' => 'Journal du hacker', + 'Known' => 'Known based sites', + 'gnusocial' => 'GNU social', ), 'short' => array( 'attention' => 'Tehlike!', diff --git a/app/layout/aside_configure.phtml b/app/layout/aside_configure.phtml index d956ec21f..94f5b1f6c 100644 --- a/app/layout/aside_configure.phtml +++ b/app/layout/aside_configure.phtml @@ -41,9 +41,11 @@ Minz_Request::actionName() === 'checkInstall' ? ' active' : ''; ?>"> <a href="<?php echo _url('update', 'checkInstall'); ?>"><?php echo _t('gen.menu.check_install'); ?></a> </li> + <?php if (!Minz_Configuration::get('system')->disable_update) { ?> <li class="item<?php echo Minz_Request::controllerName() === 'update' && Minz_Request::actionName() === 'index' ? ' active' : ''; ?>"> <a href="<?php echo _url('update', 'index'); ?>"><?php echo _t('gen.menu.update'); ?></a> </li> <?php } ?> + <?php } ?> </ul> diff --git a/app/layout/header.phtml b/app/layout/header.phtml index 238c664b0..e589ed7ef 100644 --- a/app/layout/header.phtml +++ b/app/layout/header.phtml @@ -71,8 +71,10 @@ if (FreshRSS_Auth::accessNeedsAction()) { <li class="item"><a href="<?php echo _url('user', 'manage'); ?>"><?php echo _t('gen.menu.user_management'); ?></a></li> <li class="item"><a href="<?php echo _url('auth', 'index'); ?>"><?php echo _t('gen.menu.authentication'); ?></a></li> <li class="item"><a href="<?php echo _url('update', 'checkInstall'); ?>"><?php echo _t('gen.menu.check_install'); ?></a></li> + <?php if (!Minz_Configuration::get('system')->disable_update) { ?> <li class="item"><a href="<?php echo _url('update', 'index'); ?>"><?php echo _t('gen.menu.update'); ?></a></li> <?php } ?> + <?php } ?> <li class="separator"></li> <li class="item"><a href="<?php echo _url('stats', 'index'); ?>"><?php echo _t('gen.menu.stats'); ?></a></li> <li class="item"><a href="<?php echo _url('index', 'logs'); ?>"><?php echo _t('gen.menu.logs'); ?></a></li> diff --git a/app/views/index/about.phtml b/app/views/index/about.phtml index 3fdb5160d..649729952 100644 --- a/app/views/index/about.phtml +++ b/app/views/index/about.phtml @@ -13,8 +13,10 @@ <dt><?php echo _t('index.about.license'); ?></dt> <dd><?php echo _t('index.about.agpl3'); ?></dd> + <?php if (FreshRSS_Auth::hasAccess()): ?> <dt><?php echo _t('index.about.version'); ?></dt> <dd><?php echo FRESHRSS_VERSION; ?></dd> + <?php endif; ?> </dl> <p><?php echo _t('index.about.freshrss_description'); ?></p> diff --git a/cli/README.md b/cli/README.md index e4d3409a2..5662e2d83 100644 --- a/cli/README.md +++ b/cli/README.md @@ -39,6 +39,9 @@ cd /usr/share/FreshRSS # --db-prefix is an optional prefix in front of the names of the tables. We suggest using 'freshrss_' # This command does not create the default user. Do that with ./cli/create-user.php +./cli/reconfigure.php +# Same parameters as for do-install.php. Used to update an existing installation. + ./cli/create-user.php --user username ( --password 'password' --api-password 'api_password' --language en --email user@example.net --token 'longRandomString' --no-default-feeds ) # --language can be: 'en' (default), 'fr', or one of the [supported languages](../app/i18n/) diff --git a/cli/do-install.php b/cli/do-install.php index 064a64ab2..c2f5b286d 100755 --- a/cli/do-install.php +++ b/cli/do-install.php @@ -13,6 +13,7 @@ $params = array( 'auth_type:', 'api_enabled', 'allow_robots', + 'disable_update', ); $dBparams = array( @@ -31,7 +32,7 @@ if (empty($options['default_user'])) { " --environment production --base_url https://rss.example.net/" . " --title FreshRSS --allow_anonymous --api_enabled" . " --db-type mysql --db-host localhost:3306 --db-user freshrss --db-password dbPassword123" . - " --db-base freshrss --db-prefix freshrss_ )"); + " --db-base freshrss --db-prefix freshrss_ --disable_update )"); } fwrite(STDERR, 'FreshRSS install…' . "\n"); @@ -73,7 +74,7 @@ if ((!empty($config['base_url'])) && server_is_public($config['base_url'])) { foreach ($dBparams as $dBparam) { $dBparam = rtrim($dBparam, ':'); - if (!empty($options[$dBparam])) { + if (isset($options[$dBparam])) { $param = substr($dBparam, strlen('db-')); $config['db'][$param] = $options[$dBparam]; } diff --git a/cli/reconfigure.php b/cli/reconfigure.php new file mode 100755 index 000000000..5294dd2df --- /dev/null +++ b/cli/reconfigure.php @@ -0,0 +1,58 @@ +#!/usr/bin/php +<?php +require('_cli.php'); + +$params = array( + 'environment:', + 'base_url:', + 'title:', + 'default_user:', + 'allow_anonymous', + 'allow_anonymous_refresh', + 'auth_type:', + 'api_enabled', + 'allow_robots', + 'disable_update', + ); + +$dBparams = array( + 'db-type:', + 'db-host:', + 'db-user:', + 'db-password:', + 'db-base:', + 'db-prefix:', + ); + +$options = getopt('', array_merge($params, $dBparams)); + +fwrite(STDERR, 'Reconfiguring FreshRSS…' . "\n"); + +$config = Minz_Configuration::get('system'); +foreach ($params as $param) { + $param = rtrim($param, ':'); + if (isset($options[$param])) { + $config->$param = $options[$param] === false ? true : $options[$param]; + } +} +$db = $config->db; +foreach ($dBparams as $dBparam) { + $dBparam = rtrim($dBparam, ':'); + if (isset($options[$dBparam])) { + $param = substr($dBparam, strlen('db-')); + $db[$param] = $options[$dBparam]; + } +} +$config->db = $db; + +if (!ctype_alnum($config->default_user)) { + fail('FreshRSS invalid default username (must be ASCII alphanumeric): ' . $config->default_user); +} + +if (isset($config->auth_type) && !in_array($config->auth_type, array('form', 'http_auth', 'none'))) { + fail('FreshRSS invalid authentication method (auth_type must be one of { form, http_auth, none }: ' . $config->auth_type); +} + +$config->save(); + +done(); diff --git a/constants.php b/constants.php index cb00839e2..184c9bbcb 100644 --- a/constants.php +++ b/constants.php @@ -1,5 +1,5 @@ <?php -define('FRESHRSS_VERSION', '1.6.2'); +define('FRESHRSS_VERSION', '1.6.3-dev'); define('FRESHRSS_WEBSITE', 'http://freshrss.org'); define('FRESHRSS_WIKI', 'http://doc.freshrss.org'); diff --git a/data/config.default.php b/data/config.default.php index 433207a9c..748df1884 100644 --- a/data/config.default.php +++ b/data/config.default.php @@ -146,4 +146,7 @@ return array( # List of enabled FreshRSS extensions. 'extensions_enabled' => array(), + + # Disable self-update, + 'disable_update' => false, ); diff --git a/data/shares.php b/data/shares.php index 1295a26ac..16e528d14 100644 --- a/data/shares.php +++ b/data/shares.php @@ -85,8 +85,20 @@ return array( 'form' => 'simple', ), 'jdh' => array( - 'url' => 'https://www.journalduhacker.net/stories/new?url=~LINK~&title=~TITLE~', - 'transform' => array('rawurlencode'), - 'form' => 'simple', - ), + 'url' => 'https://www.journalduhacker.net/stories/new?url=~LINK~&title=~TITLE~', + 'transform' => array('rawurlencode'), + 'form' => 'simple', + ), + 'Known' => array( + 'url' => '~URL~/share?share_url=~LINK~&share_title=~TITLE~', + 'transform' => array('rawurlencode'), + 'help' => 'https://withknown.com/', + 'form' => 'advanced', + ), + 'gnusocial' => array( + 'url' => '~URL~/notice/new?content=~TITLE~%20~LINK~', + 'transform' => array('urlencode'), + 'help' => 'https://gnu.io/social/', + 'form' => 'advanced', + ), ); diff --git a/p/scripts/main.js b/p/scripts/main.js index 14e0c5be5..ff1753b5f 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -935,6 +935,8 @@ function notifs_html5_show(nb) { notification.onclick = function() { window.location.reload(); + window.focus(); + notification.close(); }; if (context.html5_notif_timeout !== 0) { |
