diff options
Diffstat (limited to 'inc/poche')
-rwxr-xr-x | inc/poche/Poche.class.php | 25 | ||||
-rwxr-xr-x | inc/poche/config.inc.default.php (renamed from inc/poche/config.inc.php.new) | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | inc/poche/global.inc.php | 1 |
3 files changed, 20 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 | ||
diff --git a/inc/poche/config.inc.php.new b/inc/poche/config.inc.default.php index 83b3c4c0..3b08c212 100755 --- a/inc/poche/config.inc.php.new +++ b/inc/poche/config.inc.default.php | |||
@@ -42,6 +42,10 @@ define ('FLATTR_API', 'https://api.flattr.com/rest/v2/things/lookup/?url='); | |||
42 | define ('NOT_FLATTRABLE', '0'); | 42 | define ('NOT_FLATTRABLE', '0'); |
43 | define ('FLATTRABLE', '1'); | 43 | define ('FLATTRABLE', '1'); |
44 | define ('FLATTRED', '2'); | 44 | define ('FLATTRED', '2'); |
45 | // display or not print link in article view | ||
46 | define ('SHOW_PRINTLINK', '1'); | ||
47 | // display or not percent of read in article view. Affects only default theme. | ||
48 | define ('SHOW_READPERCENT', '1'); | ||
45 | define ('ABS_PATH', 'assets/'); | 49 | define ('ABS_PATH', 'assets/'); |
46 | 50 | ||
47 | define ('DEFAULT_THEME', 'baggy'); | 51 | define ('DEFAULT_THEME', 'baggy'); |
diff --git a/inc/poche/global.inc.php b/inc/poche/global.inc.php index 15091387..14e9dd93 100644..100755 --- a/inc/poche/global.inc.php +++ b/inc/poche/global.inc.php | |||
@@ -43,6 +43,7 @@ if (! file_exists(INCLUDES . '/poche/config.inc.php')) { | |||
43 | Poche::$configFileAvailable = false; | 43 | Poche::$configFileAvailable = false; |
44 | } else { | 44 | } else { |
45 | require_once INCLUDES . '/poche/config.inc.php'; | 45 | require_once INCLUDES . '/poche/config.inc.php'; |
46 | require_once INCLUDES . '/poche/config.inc.default.php'; | ||
46 | } | 47 | } |
47 | 48 | ||
48 | if (Poche::$configFileAvailable && DOWNLOAD_PICTURES) { | 49 | if (Poche::$configFileAvailable && DOWNLOAD_PICTURES) { |