diff options
| author | 2016-10-10 22:08:30 +0200 | |
|---|---|---|
| committer | 2016-10-10 22:08:30 +0200 | |
| commit | cdd01c3d28ef091004e3907e2616d3052516e573 (patch) | |
| tree | 99474af6a3199d0944b294c592fec4fc78dfe4b9 | |
| parent | c5c3011edfb93662cf1208ff38a26a781634c998 (diff) | |
| parent | cbb6c26db79b5a74e588110d2cf8fc8cf9137ab8 (diff) | |
Merge pull request #1300 from Alkarex/share-string-replace-global
Fix bug share
| -rwxr-xr-x | app/Controllers/configureController.php | 2 | ||||
| -rw-r--r-- | p/scripts/main.js | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php index 147a2fe06..e73f106a6 100755 --- a/app/Controllers/configureController.php +++ b/app/Controllers/configureController.php @@ -139,7 +139,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController { */ public function sharingAction() { if (Minz_Request::isPost()) { - $params = Minz_Request::fetchGET(); + $params = Minz_Request::fetchPOST(); FreshRSS_Context::$user_conf->sharing = $params['share']; FreshRSS_Context::$user_conf->save(); invalidateHttpCache(); diff --git a/p/scripts/main.js b/p/scripts/main.js index 3c0a36629..d42704f7a 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -1153,10 +1153,10 @@ function init_share_observers() { $('.share.add').on('click', function(e) { var opt = $(this).siblings('select').find(':selected'); var row = $(this).parents('form').data(opt.data('form')); - row = row.replace('##label##', opt.html().trim(), 'g'); - row = row.replace('##type##', opt.val(), 'g'); - row = row.replace('##help##', opt.data('help'), 'g'); - row = row.replace('##key##', shares, 'g'); + row = row.replace(/##label##/g, opt.html().trim()); + row = row.replace(/##type##/g, opt.val()); + row = row.replace(/##help##/g, opt.data('help')); + row = row.replace(/##key##/g, shares); $(this).parents('.form-group').before(row); shares++; |
