aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Poche.class.php
diff options
context:
space:
mode:
authortcit <tcit@tcit.fr>2014-04-23 10:34:22 +0200
committertcit <tcit@tcit.fr>2014-04-23 10:34:22 +0200
commitc97d23c5334b363250a1d7cfc5cffd0087f35c21 (patch)
tree455a4cd0886c0beb51f036482811fb94cbc5fa5e /inc/poche/Poche.class.php
parent4d99bae893eb47505f8ff6976917ef3af363ff5b (diff)
parent2a6440c134ee2d90a84b3e3a2e039d8fb4d83d04 (diff)
downloadwallabag-c97d23c5334b363250a1d7cfc5cffd0087f35c21.tar.gz
wallabag-c97d23c5334b363250a1d7cfc5cffd0087f35c21.tar.zst
wallabag-c97d23c5334b363250a1d7cfc5cffd0087f35c21.zip
Merge branch 'dev' of https://github.com/wallabag/wallabag into dev
Diffstat (limited to 'inc/poche/Poche.class.php')
-rwxr-xr-xinc/poche/Poche.class.php25
1 files changed, 15 insertions, 10 deletions
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php
index aa313c25..7e3e6afe 100755
--- a/inc/poche/Poche.class.php
+++ b/inc/poche/Poche.class.php
@@ -101,7 +101,7 @@ class Poche
101 101
102 public function configFileIsAvailable() { 102 public function configFileIsAvailable() {
103 if (! self::$configFileAvailable) { 103 if (! self::$configFileAvailable) {
104 $this->notInstalledMessage[] = 'You have to rename inc/poche/config.inc.php.new to inc/poche/config.inc.php.'; 104 $this->notInstalledMessage[] = 'You have to copy (don\'t just rename!) inc/poche/config.inc.default.php to inc/poche/config.inc.php.';
105 105
106 return false; 106 return false;
107 } 107 }
@@ -486,12 +486,24 @@ class Poche
486 case 'toggle_fav' : 486 case 'toggle_fav' :
487 $this->store->favoriteById($id, $this->user->getId()); 487 $this->store->favoriteById($id, $this->user->getId());
488 Tools::logm('mark as favorite link #' . $id); 488 Tools::logm('mark as favorite link #' . $id);
489 Tools::redirect(); 489 if ( Tools::isAjaxRequest() ) {
490 echo 1;
491 exit;
492 }
493 else {
494 Tools::redirect();
495 }
490 break; 496 break;
491 case 'toggle_archive' : 497 case 'toggle_archive' :
492 $this->store->archiveById($id, $this->user->getId()); 498 $this->store->archiveById($id, $this->user->getId());
493 Tools::logm('archive link #' . $id); 499 Tools::logm('archive link #' . $id);
494 Tools::redirect(); 500 if ( Tools::isAjaxRequest() ) {
501 echo 1;
502 exit;
503 }
504 else {
505 Tools::redirect();
506 }
495 break; 507 break;
496 case 'archive_all' : 508 case 'archive_all' :
497 $this->store->archiveAll($this->user->getId()); 509 $this->store->archiveAll($this->user->getId());
@@ -876,13 +888,6 @@ class Poche
876 */ 888 */
877 public function import() { 889 public function import() {
878 890
879 if (!defined('IMPORT_LIMIT')) {
880 define('IMPORT_LIMIT', 5);
881 }
882 if (!defined('IMPORT_DELAY')) {
883 define('IMPORT_DELAY', 5);
884 }
885
886 if ( isset($_FILES['file']) ) { 891 if ( isset($_FILES['file']) ) {
887 Tools::logm('Import stated: parsing file'); 892 Tools::logm('Import stated: parsing file');
888 893