aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Poche.class.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2014-04-22 20:18:46 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2014-04-22 20:18:46 +0200
commitd70dd7ac698a1f9e90c97fa7eb7b113bf84304fc (patch)
tree69c330e97e3de60dd6884ded76766426a598f30e /inc/poche/Poche.class.php
parentdfff18f81b04e4f66890c37dc2a7bc0537fd0b1b (diff)
parent43c7b978c31bcbf9e8e5202ecbb7b6fccba6a7fa (diff)
downloadwallabag-d70dd7ac698a1f9e90c97fa7eb7b113bf84304fc.tar.gz
wallabag-d70dd7ac698a1f9e90c97fa7eb7b113bf84304fc.tar.zst
wallabag-d70dd7ac698a1f9e90c97fa7eb7b113bf84304fc.zip
Merge pull request #653 from mariroz/dev
print view fixed in baggy; print link added; read percent added in default theme; archive and favorite re-factored to be ajax action in article view
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 811895dc..66710ecb 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 }
@@ -434,12 +434,24 @@ class Poche
434 case 'toggle_fav' : 434 case 'toggle_fav' :
435 $this->store->favoriteById($id, $this->user->getId()); 435 $this->store->favoriteById($id, $this->user->getId());
436 Tools::logm('mark as favorite link #' . $id); 436 Tools::logm('mark as favorite link #' . $id);
437 Tools::redirect(); 437 if ( Tools::isAjaxRequest() ) {
438 echo 1;
439 exit;
440 }
441 else {
442 Tools::redirect();
443 }
438 break; 444 break;
439 case 'toggle_archive' : 445 case 'toggle_archive' :
440 $this->store->archiveById($id, $this->user->getId()); 446 $this->store->archiveById($id, $this->user->getId());
441 Tools::logm('archive link #' . $id); 447 Tools::logm('archive link #' . $id);
442 Tools::redirect(); 448 if ( Tools::isAjaxRequest() ) {
449 echo 1;
450 exit;
451 }
452 else {
453 Tools::redirect();
454 }
443 break; 455 break;
444 case 'archive_all' : 456 case 'archive_all' :
445 $this->store->archiveAll($this->user->getId()); 457 $this->store->archiveAll($this->user->getId());
@@ -822,13 +834,6 @@ class Poche
822 */ 834 */
823 public function import() { 835 public function import() {
824 836
825 if (!defined('IMPORT_LIMIT')) {
826 define('IMPORT_LIMIT', 5);
827 }
828 if (!defined('IMPORT_DELAY')) {
829 define('IMPORT_DELAY', 5);
830 }
831
832 if ( isset($_FILES['file']) ) { 837 if ( isset($_FILES['file']) ) {
833 Tools::logm('Import stated: parsing file'); 838 Tools::logm('Import stated: parsing file');
834 839