aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Poche.class.php
diff options
context:
space:
mode:
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