From: tcit Date: Wed, 23 Apr 2014 08:34:22 +0000 (+0200) Subject: Merge branch 'dev' of https://github.com/wallabag/wallabag into dev X-Git-Tag: 1.7.0^2~19 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=c97d23c5334b363250a1d7cfc5cffd0087f35c21;hp=4d99bae893eb47505f8ff6976917ef3af363ff5b;p=github%2Fwallabag%2Fwallabag.git Merge branch 'dev' of https://github.com/wallabag/wallabag into dev --- 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(); 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 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 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; } @@ -486,12 +486,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()); @@ -876,13 +888,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/config.inc.php.new b/inc/poche/config.inc.default.php similarity index 90% rename from inc/poche/config.inc.php.new rename to 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='); 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'); diff --git a/inc/poche/global.inc.php b/inc/poche/global.inc.php old mode 100644 new mode 100755 index 15091387..14e9dd93 --- 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.default.php'; } if (Poche::$configFileAvailable && DOWNLOAD_PICTURES) { diff --git a/install/index.php b/install/index.php old mode 100644 new mode 100755 index e02952e0..b6c6abec --- a/install/index.php +++ b/install/index.php @@ -53,7 +53,7 @@ else if (isset($_POST['install'])) { else { $continue = true; // Create config.inc.php - if (!copy('inc/poche/config.inc.php.new', 'inc/poche/config.inc.php')) { + if (!copy('inc/poche/config.inc.default.php', 'inc/poche/config.inc.php')) { $errors[] = 'Installation aborted, impossible to create inc/poche/config.inc.php file. Maybe you don\'t have write access to create it.'; $continue = false; } diff --git a/themes/baggy/css/main.css b/themes/baggy/css/main.css index 0991dbed..52d8ecaa 100755 --- a/themes/baggy/css/main.css +++ b/themes/baggy/css/main.css @@ -746,6 +746,9 @@ margin-top:1em; .icon-rss:before { content: "\e808"; } +.icon-print:before { + content: "\e80d"; +} /* ========================================================================== Icon selected diff --git a/themes/baggy/css/print.css b/themes/baggy/css/print.css index 9aefa779..9dd6d295 100755 --- a/themes/baggy/css/print.css +++ b/themes/baggy/css/print.css @@ -17,6 +17,7 @@ img { /* Hide useless blocks */ body > header, +#article_toolbar, #links, #sort, body > footer, @@ -46,3 +47,16 @@ abbr[title]:after { .pagination span.current { border-style: dashed; } + +#main { + width: 100%; + padding: 0; + margin: 0; + margin-left: 0; + padding-right: 0; + padding-bottom: 0; +} + +#article { + width: 100%; +} diff --git a/themes/baggy/fonts/icomoon.eot b/themes/baggy/fonts/icomoon.eot old mode 100755 new mode 100644 index 02f53b36..56323516 Binary files a/themes/baggy/fonts/icomoon.eot and b/themes/baggy/fonts/icomoon.eot differ diff --git a/themes/baggy/fonts/icomoon.svg b/themes/baggy/fonts/icomoon.svg old mode 100755 new mode 100644 index d9c35b98..b4586136 --- a/themes/baggy/fonts/icomoon.svg +++ b/themes/baggy/fonts/icomoon.svg @@ -1,7 +1,21 @@ -Generated by IcoMoon + + +{ + "fontFamily": "icomoon", + "majorVersion": 1, + "minorVersion": 0, + "version": "Version 1.0", + "fontId": "icomoon", + "psName": "icomoon", + "subFamily": "Regular", + "fullName": "icomoon", + "description": "Generated by IcoMoon" +} + + @@ -23,4 +37,5 @@ + \ No newline at end of file diff --git a/themes/baggy/fonts/icomoon.ttf b/themes/baggy/fonts/icomoon.ttf old mode 100755 new mode 100644 index 3860dd04..bb1f21f8 Binary files a/themes/baggy/fonts/icomoon.ttf and b/themes/baggy/fonts/icomoon.ttf differ diff --git a/themes/baggy/fonts/icomoon.woff b/themes/baggy/fonts/icomoon.woff old mode 100755 new mode 100644 index c3a91ed7..bab13779 Binary files a/themes/baggy/fonts/icomoon.woff and b/themes/baggy/fonts/icomoon.woff differ diff --git a/themes/baggy/view.twig b/themes/baggy/view.twig index ffb512a3..62af2516 100755 --- a/themes/baggy/view.twig +++ b/themes/baggy/view.twig @@ -8,13 +8,14 @@ @@ -32,6 +33,50 @@