Skip to content

Commit

Permalink
Rename sharing action (FreshRSS#2643)
Browse files Browse the repository at this point in the history
Before, some ad-blocker rules were preventing to display the sharing page
because of its name. I've renamed that page to integration but kept every
thing else identical. So it's still called sharing through out the
application.
If needed, this can be addressed as well.

See FreshRSS#2509 and FreshRSS#2419
  • Loading branch information
aledeg authored and Alkarex committed Nov 8, 2019
1 parent 2f662c2 commit 95d6d9d
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 7 deletions.
11 changes: 7 additions & 4 deletions app/Controllers/configureController.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,21 +134,24 @@ public function readingAction() {
}

/**
* This action handles the sharing configuration page.
* This action handles the integration configuration page.
*
* It displays the sharing configuration page.
* It displays the integration configuration page.
* If this action is reached through a POST request, it stores all
* configuration values then sends a notification to the user.
*
* Before v1.16, we used sharing instead of integration. This has
* some unwanted behavior when the end-user was using an ad-blocker.
*/
public function sharingAction() {
public function integrationAction() {
if (Minz_Request::isPost()) {
$params = Minz_Request::fetchPOST();
FreshRSS_Context::$user_conf->sharing = $params['share'];
FreshRSS_Context::$user_conf->save();
invalidateHttpCache();

Minz_Request::good(_t('feedback.conf.updated'),
array('c' => 'configure', 'a' => 'sharing'));
array('c' => 'configure', 'a' => 'integration'));
}

Minz_View::prependTitle(_t('conf.sharing.title') . ' · ');
Expand Down
4 changes: 2 additions & 2 deletions app/layout/aside_configure.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<li class="item<?= Minz_Request::actionName() === 'archiving' ? ' active' : '' ?>">
<a href="<?= _url('configure', 'archiving') ?>"><?= _t('gen.menu.archiving') ?></a>
</li>
<li class="item<?= Minz_Request::actionName() === 'sharing' ? ' active' : '' ?>">
<a href="<?= _url('configure', 'sharing') ?>"><?= _t('gen.menu.sharing') ?></a>
<li class="item<?= Minz_Request::actionName() === 'integration' ? ' active' : '' ?>">
<a href="<?= _url('configure', 'integration') ?>"><?= _t('gen.menu.sharing') ?></a>
</li>
<li class="item<?= Minz_Request::actionName() === 'shortcut' ? ' active' : '' ?>">
<a href="<?= _url('configure', 'shortcut') ?>"><?= _t('gen.menu.shortcuts') ?></a>
Expand Down
2 changes: 1 addition & 1 deletion app/layout/header.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ if (FreshRSS_Auth::accessNeedsAction()) {
<li class="item"><a href="<?= _url('configure', 'display') ?>"><?= _t('gen.menu.display') ?></a></li>
<li class="item"><a href="<?= _url('configure', 'reading') ?>"><?= _t('gen.menu.reading') ?></a></li>
<li class="item"><a href="<?= _url('configure', 'archiving') ?>"><?= _t('gen.menu.archiving') ?></a></li>
<li class="item"><a href="<?= _url('configure', 'sharing') ?>"><?= _t('gen.menu.sharing') ?></a></li>
<li class="item"><a href="<?= _url('configure', 'integration') ?>"><?= _t('gen.menu.sharing') ?></a></li>
<li class="item"><a href="<?= _url('configure', 'shortcut') ?>"><?= _t('gen.menu.shortcuts') ?></a></li>
<li class="item"><a href="<?= _url('configure', 'queries') ?>"><?= _t('gen.menu.queries') ?></a></li>
<li class="item"><a href="<?= _url('user', 'profile') ?>"><?= _t('gen.menu.user_profile') ?></a></li>
Expand Down
File renamed without changes.
11 changes: 11 additions & 0 deletions docs/en/users/07_Frequently_Asked_Questions.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,14 @@ Some Linux distribution like Fedora or RedHat Enterprise Linux have SELinux syst
semanage fcontext -a -t httpd_sys_rw_content_t '/usr/share/FreshRSS/data(/.*)?'
restorecon -Rv /usr/share/FreshRSS/data
```

## Why do I have a blank page while trying to configure the sharing options?

The `sharing` word in the URL is a trigger word for some an-blocker rules. Starting at version 1.16, `sharing` has been replaced by `integration` in the faulty URL while keeping the exact same wording through out the application.

If you are using a version prior to 1.16, you can disable your ad-blocker for FreshRSS or you can add a rule to allow the `sharing` page to be accessed.

Examples with _uBlock_:

- Whitelist your FreshRSS instance by adding it in _uBlock > Open the dashboard > Whitelist_.
- Authorize your FreshRSS instance to call `sharing` configuration page by adding the rule `*sharing,domain=~yourdomain.com` in _uBlock > Open the dashboard > My filters_

0 comments on commit 95d6d9d

Please sign in to comment.