aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc
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
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')
-rwxr-xr-xinc/3rdparty/libraries/feedwriter/FeedWriter.php17
-rw-r--r--inc/3rdparty/site_config/custom/mobile.lemondeinformatique.fr.txt6
-rwxr-xr-xinc/poche/Poche.class.php25
-rwxr-xr-xinc/poche/config.inc.default.php (renamed from inc/poche/config.inc.php.new)4
-rwxr-xr-x[-rw-r--r--]inc/poche/global.inc.php1
5 files changed, 31 insertions, 22 deletions
diff --git a/inc/3rdparty/libraries/feedwriter/FeedWriter.php b/inc/3rdparty/libraries/feedwriter/FeedWriter.php
index df4c8b4b..79639c0c 100755
--- a/inc/3rdparty/libraries/feedwriter/FeedWriter.php
+++ b/inc/3rdparty/libraries/feedwriter/FeedWriter.php
@@ -89,18 +89,11 @@ define('JSONP', 3, true);
89 */ 89 */
90 public function genarateFeed() 90 public function genarateFeed()
91 { 91 {
92 if ($this->version == RSS2) { 92 header('Content-type: text/xml; charset=UTF-8');
93// header('Content-type: text/xml; charset=UTF-8'); 93 // this line prevents Chrome 20 from prompting download
94 // this line prevents Chrome 20 from prompting download 94 // used by Google: https://news.google.com/news/feeds?ned=us&topic=b&output=rss
95 // used by Google: https://news.google.com/news/feeds?ned=us&topic=b&output=rss 95 header('X-content-type-options: nosniff');
96// header('X-content-type-options: nosniff'); 96
97 } elseif ($this->version == JSON) {
98// header('Content-type: application/json; charset=UTF-8');
99 $this->json = new stdClass();
100 } elseif ($this->version == JSONP) {
101// header('Content-type: application/javascript; charset=UTF-8');
102 $this->json = new stdClass();
103 }
104 $this->printHead(); 97 $this->printHead();
105 $this->printChannels(); 98 $this->printChannels();
106 $this->printItems(); 99 $this->printItems();
diff --git a/inc/3rdparty/site_config/custom/mobile.lemondeinformatique.fr.txt b/inc/3rdparty/site_config/custom/mobile.lemondeinformatique.fr.txt
new file mode 100644
index 00000000..24aec5c3
--- /dev/null
+++ b/inc/3rdparty/site_config/custom/mobile.lemondeinformatique.fr.txt
@@ -0,0 +1,6 @@
1title: //h2
2body: div[@id='illustration'] | //p
3prune: no
4tidy: no
5
6test_url: http://mobile.lemondeinformatique.fr/actualites/lire-les-datacenters-d-apple-google-et-facebook-eco-responsables-selon-greenpeace-le-monde-informatique-57122.html
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=');
42define ('NOT_FLATTRABLE', '0'); 42define ('NOT_FLATTRABLE', '0');
43define ('FLATTRABLE', '1'); 43define ('FLATTRABLE', '1');
44define ('FLATTRED', '2'); 44define ('FLATTRED', '2');
45// display or not print link in article view
46define ('SHOW_PRINTLINK', '1');
47// display or not percent of read in article view. Affects only default theme.
48define ('SHOW_READPERCENT', '1');
45define ('ABS_PATH', 'assets/'); 49define ('ABS_PATH', 'assets/');
46 50
47define ('DEFAULT_THEME', 'baggy'); 51define ('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
48if (Poche::$configFileAvailable && DOWNLOAD_PICTURES) { 49if (Poche::$configFileAvailable && DOWNLOAD_PICTURES) {