From 6212acfc813781501177674baa3139ceef62f78f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 15 Apr 2014 21:49:00 +0200 Subject: [fix] rss feed content type set to text/xml #636 --- inc/3rdparty/libraries/feedwriter/FeedWriter.php | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'inc') 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); */ public function genarateFeed() { - if ($this->version == RSS2) { -// header('Content-type: text/xml; charset=UTF-8'); - // this line prevents Chrome 20 from prompting download - // used by Google: https://news.google.com/news/feeds?ned=us&topic=b&output=rss -// header('X-content-type-options: nosniff'); - } elseif ($this->version == JSON) { -// header('Content-type: application/json; charset=UTF-8'); - $this->json = new stdClass(); - } elseif ($this->version == JSONP) { -// header('Content-type: application/javascript; charset=UTF-8'); - $this->json = new stdClass(); - } + header('Content-type: text/xml; charset=UTF-8'); + // this line prevents Chrome 20 from prompting download + // used by Google: https://news.google.com/news/feeds?ned=us&topic=b&output=rss + header('X-content-type-options: nosniff'); + $this->printHead(); $this->printChannels(); $this->printItems(); -- cgit v1.2.3 From c2cf7075c24c1539befd4ba09881eed761c9d769 Mon Sep 17 00:00:00 2001 From: Maryana Rozhankivska Date: Tue, 22 Apr 2014 10:45:09 +0300 Subject: 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 --- inc/poche/Poche.class.php | 16 ++++++++++++++-- inc/poche/config.inc.php.new | 4 ++++ 2 files changed, 18 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 811895dc..dcfdc167 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -434,12 +434,24 @@ class Poche case 'toggle_fav' : $this->store->favoriteById($id, $this->user->getId()); Tools::logm('mark as favorite link #' . $id); - Tools::redirect(); + if ( Tools::isAjaxRequest() ) { + echo 1; + exit; + } + else { + Tools::redirect(); + } break; case 'toggle_archive' : $this->store->archiveById($id, $this->user->getId()); Tools::logm('archive link #' . $id); - Tools::redirect(); + if ( Tools::isAjaxRequest() ) { + echo 1; + exit; + } + else { + Tools::redirect(); + } break; case 'archive_all' : $this->store->archiveAll($this->user->getId()); diff --git a/inc/poche/config.inc.php.new b/inc/poche/config.inc.php.new index 83b3c4c0..3b08c212 100755 --- a/inc/poche/config.inc.php.new +++ b/inc/poche/config.inc.php.new @@ -42,6 +42,10 @@ define ('FLATTR_API', 'https://api.flattr.com/rest/v2/things/lookup/?url='); define ('NOT_FLATTRABLE', '0'); define ('FLATTRABLE', '1'); define ('FLATTRED', '2'); +// display or not print link in article view +define ('SHOW_PRINTLINK', '1'); +// display or not percent of read in article view. Affects only default theme. +define ('SHOW_READPERCENT', '1'); define ('ABS_PATH', 'assets/'); define ('DEFAULT_THEME', 'baggy'); -- cgit v1.2.3 From 03303cd71b61f194d3460898c0544186e4c9b85f Mon Sep 17 00:00:00 2001 From: jmlrt Date: Tue, 22 Apr 2014 14:44:31 +0200 Subject: parse mobile.lemondeinformatique.fr site_config file created because the title isn't parsed by default for mobile version of lemondeinformatique.fr --- inc/3rdparty/site_config/custom/mobile.lemondeinformatique.fr.txt | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 inc/3rdparty/site_config/custom/mobile.lemondeinformatique.fr.txt (limited to 'inc') 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 @@ +title: //h2 +body: div[@id='illustration'] | //p +prune: no +tidy: no + +test_url: http://mobile.lemondeinformatique.fr/actualites/lire-les-datacenters-d-apple-google-et-facebook-eco-responsables-selon-greenpeace-le-monde-informatique-57122.html -- cgit v1.2.3 From a4a870e1ec3ee075b8c1020f9030859beb1f23da Mon Sep 17 00:00:00 2001 From: Maryana Rozhankivska Date: Tue, 22 Apr 2014 19:11:26 +0300 Subject: default config is included after user config to prevent undefined constant warning --- inc/poche/global.inc.php | 1 + 1 file changed, 1 insertion(+) mode change 100644 => 100755 inc/poche/global.inc.php (limited to 'inc') diff --git a/inc/poche/global.inc.php b/inc/poche/global.inc.php old mode 100644 new mode 100755 index 15091387..a77081a2 --- a/inc/poche/global.inc.php +++ b/inc/poche/global.inc.php @@ -43,6 +43,7 @@ if (! file_exists(INCLUDES . '/poche/config.inc.php')) { Poche::$configFileAvailable = false; } else { require_once INCLUDES . '/poche/config.inc.php'; + require_once INCLUDES . '/poche/config.inc.php.new'; } if (Poche::$configFileAvailable && DOWNLOAD_PICTURES) { -- cgit v1.2.3 From 43c7b978c31bcbf9e8e5202ecbb7b6fccba6a7fa Mon Sep 17 00:00:00 2001 From: Maryana Rozhankivska Date: Tue, 22 Apr 2014 20:58:40 +0300 Subject: config.inc.php.new renamed in config.inc.default.php --- inc/poche/Poche.class.php | 9 +-------- inc/poche/global.inc.php | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) (limited to 'inc') diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index dcfdc167..66710ecb 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -101,7 +101,7 @@ class Poche public function configFileIsAvailable() { if (! self::$configFileAvailable) { - $this->notInstalledMessage[] = 'You have to rename inc/poche/config.inc.php.new to inc/poche/config.inc.php.'; + $this->notInstalledMessage[] = 'You have to copy (don\'t just rename!) inc/poche/config.inc.default.php to inc/poche/config.inc.php.'; return false; } @@ -834,13 +834,6 @@ class Poche */ public function import() { - if (!defined('IMPORT_LIMIT')) { - define('IMPORT_LIMIT', 5); - } - if (!defined('IMPORT_DELAY')) { - define('IMPORT_DELAY', 5); - } - if ( isset($_FILES['file']) ) { Tools::logm('Import stated: parsing file'); diff --git a/inc/poche/global.inc.php b/inc/poche/global.inc.php index a77081a2..14e9dd93 100755 --- a/inc/poche/global.inc.php +++ b/inc/poche/global.inc.php @@ -43,7 +43,7 @@ if (! file_exists(INCLUDES . '/poche/config.inc.php')) { Poche::$configFileAvailable = false; } else { require_once INCLUDES . '/poche/config.inc.php'; - require_once INCLUDES . '/poche/config.inc.php.new'; + require_once INCLUDES . '/poche/config.inc.default.php'; } if (Poche::$configFileAvailable && DOWNLOAD_PICTURES) { -- cgit v1.2.3 From fd86559a5b8a82ced3dcac97e7a8280b6abc2fa4 Mon Sep 17 00:00:00 2001 From: Maryana Rozhankivska Date: Tue, 22 Apr 2014 21:39:03 +0300 Subject: inc/poche/config.inc.php.new removed --- inc/poche/config.inc.php.new | 63 -------------------------------------------- 1 file changed, 63 deletions(-) delete mode 100755 inc/poche/config.inc.php.new (limited to 'inc') diff --git a/inc/poche/config.inc.php.new b/inc/poche/config.inc.php.new deleted file mode 100755 index 3b08c212..00000000 --- a/inc/poche/config.inc.php.new +++ /dev/null @@ -1,63 +0,0 @@ - - * @copyright 2013 - * @license http://www.wtfpl.net/ see COPYING file - */ - -define ('SALT', ''); # put a strong string here -define ('LANG', 'en_EN.utf8'); - -define ('STORAGE', 'sqlite'); # postgres, mysql or sqlite - -define ('STORAGE_SQLITE', ROOT . '/db/poche.sqlite'); # if you are using sqlite, where the database file is located - -# only for postgres & mysql -define ('STORAGE_SERVER', 'localhost'); -define ('STORAGE_DB', 'poche'); -define ('STORAGE_USER', 'poche'); -define ('STORAGE_PASSWORD', 'poche'); - -################################################################################# -# Do not trespass unless you know what you are doing -################################################################################# - -// Change this if not using the standart port for SSL - i.e you server is behind sslh -define ('SSL_PORT', 443); - -define ('MODE_DEMO', FALSE); -define ('DEBUG_POCHE', FALSE); -define ('DOWNLOAD_PICTURES', FALSE); -define ('CONVERT_LINKS_FOOTNOTES', FALSE); -define ('REVERT_FORCED_PARAGRAPH_ELEMENTS', FALSE); -define ('SHARE_TWITTER', TRUE); -define ('SHARE_MAIL', TRUE); -define ('SHARE_SHAARLI', FALSE); -define ('SHAARLI_URL', 'http://myshaarliurl.com'); -define ('FLATTR', TRUE); -define ('FLATTR_API', 'https://api.flattr.com/rest/v2/things/lookup/?url='); -define ('NOT_FLATTRABLE', '0'); -define ('FLATTRABLE', '1'); -define ('FLATTRED', '2'); -// display or not print link in article view -define ('SHOW_PRINTLINK', '1'); -// display or not percent of read in article view. Affects only default theme. -define ('SHOW_READPERCENT', '1'); -define ('ABS_PATH', 'assets/'); - -define ('DEFAULT_THEME', 'baggy'); - -define ('THEME', ROOT . '/themes'); -define ('LOCALE', ROOT . '/locale'); -define ('CACHE', ROOT . '/cache'); - -define ('PAGINATION', '10'); - -//limit for download of articles during import -define ('IMPORT_LIMIT', 5); -//delay between downloads (in sec) -define ('IMPORT_DELAY', 5); - -- cgit v1.2.3 From 4dbba60439c0e6164fcdce0c25b31409a7c509e3 Mon Sep 17 00:00:00 2001 From: Maryana Rozhankivska Date: Tue, 22 Apr 2014 22:38:10 +0300 Subject: last error: config.inc.default.php missed --- inc/poche/config.inc.default.php | 63 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100755 inc/poche/config.inc.default.php (limited to 'inc') diff --git a/inc/poche/config.inc.default.php b/inc/poche/config.inc.default.php new file mode 100755 index 00000000..3b08c212 --- /dev/null +++ b/inc/poche/config.inc.default.php @@ -0,0 +1,63 @@ + + * @copyright 2013 + * @license http://www.wtfpl.net/ see COPYING file + */ + +define ('SALT', ''); # put a strong string here +define ('LANG', 'en_EN.utf8'); + +define ('STORAGE', 'sqlite'); # postgres, mysql or sqlite + +define ('STORAGE_SQLITE', ROOT . '/db/poche.sqlite'); # if you are using sqlite, where the database file is located + +# only for postgres & mysql +define ('STORAGE_SERVER', 'localhost'); +define ('STORAGE_DB', 'poche'); +define ('STORAGE_USER', 'poche'); +define ('STORAGE_PASSWORD', 'poche'); + +################################################################################# +# Do not trespass unless you know what you are doing +################################################################################# + +// Change this if not using the standart port for SSL - i.e you server is behind sslh +define ('SSL_PORT', 443); + +define ('MODE_DEMO', FALSE); +define ('DEBUG_POCHE', FALSE); +define ('DOWNLOAD_PICTURES', FALSE); +define ('CONVERT_LINKS_FOOTNOTES', FALSE); +define ('REVERT_FORCED_PARAGRAPH_ELEMENTS', FALSE); +define ('SHARE_TWITTER', TRUE); +define ('SHARE_MAIL', TRUE); +define ('SHARE_SHAARLI', FALSE); +define ('SHAARLI_URL', 'http://myshaarliurl.com'); +define ('FLATTR', TRUE); +define ('FLATTR_API', 'https://api.flattr.com/rest/v2/things/lookup/?url='); +define ('NOT_FLATTRABLE', '0'); +define ('FLATTRABLE', '1'); +define ('FLATTRED', '2'); +// display or not print link in article view +define ('SHOW_PRINTLINK', '1'); +// display or not percent of read in article view. Affects only default theme. +define ('SHOW_READPERCENT', '1'); +define ('ABS_PATH', 'assets/'); + +define ('DEFAULT_THEME', 'baggy'); + +define ('THEME', ROOT . '/themes'); +define ('LOCALE', ROOT . '/locale'); +define ('CACHE', ROOT . '/cache'); + +define ('PAGINATION', '10'); + +//limit for download of articles during import +define ('IMPORT_LIMIT', 5); +//delay between downloads (in sec) +define ('IMPORT_DELAY', 5); + -- cgit v1.2.3