]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Merge pull request #1814 from wallabag/dev
authorNicolas Lœuillet <nicolas@loeuillet.org>
Mon, 18 Apr 2016 18:01:56 +0000 (20:01 +0200)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Mon, 18 Apr 2016 18:01:56 +0000 (20:01 +0200)
Wallabag 1.9.2

29 files changed:
inc/3rdparty/libraries/PHPePub/Zip.php
inc/3rdparty/site_config/standard/aclu.org.txt [new file with mode: 0644]
inc/3rdparty/site_config/standard/bez.es.txt [new file with mode: 0644]
inc/3rdparty/site_config/standard/blog.cloudflare.com.txt
inc/3rdparty/site_config/standard/caffereggio.net.txt [new file with mode: 0644]
inc/3rdparty/site_config/standard/chronicle.com.txt
inc/3rdparty/site_config/standard/deia.com.txt [new file with mode: 0644]
inc/3rdparty/site_config/standard/diagonalperiodico.net.txt [new file with mode: 0644]
inc/3rdparty/site_config/standard/esglobal.org.txt [new file with mode: 0644]
inc/3rdparty/site_config/standard/lawfareblog.com.txt [new file with mode: 0644]
inc/3rdparty/site_config/standard/letraslibres.com.txt [new file with mode: 0644]
inc/3rdparty/site_config/standard/naiz.eus.txt [new file with mode: 0644]
inc/3rdparty/site_config/standard/pieria.co.uk.txt [new file with mode: 0644]
inc/3rdparty/site_config/standard/popehat.com.txt [new file with mode: 0644]
inc/3rdparty/site_config/standard/rasgolatente.es.txt [new file with mode: 0644]
inc/3rdparty/site_config/standard/thenews.coop.txt [new file with mode: 0644]
inc/3rdparty/site_config/standard/timeshighereducation.com.txt [new file with mode: 0644]
inc/3rdparty/site_config/standard/wired.de.txt [new file with mode: 0644]
inc/poche/Poche.class.php
inc/poche/Tools.class.php
install/index.php
themes/baggy/_head.twig
themes/baggy/css/messages.css
themes/baggy/home.twig
themes/baggy/view.twig
themes/default/_head.twig
themes/default/_messages.twig
themes/default/home.twig
themes/default/view.twig

index 01e035662856f7da7b897493cc3aabee98e3631a..92e78e70351816de34d9ef1f833a09833adecdee 100644 (file)
@@ -569,7 +569,7 @@ class Zip {
                 if ($inline) {
                     $cd .= "inline";
                                } else{
-                    $cd .= "attached";
+                    $cd .= "attachment";
                                }
                 if ($fileName) {
                     $cd .= '; filename="' . $fileName . '"';
diff --git a/inc/3rdparty/site_config/standard/aclu.org.txt b/inc/3rdparty/site_config/standard/aclu.org.txt
new file mode 100644 (file)
index 0000000..74236e2
--- /dev/null
@@ -0,0 +1,5 @@
+body: //div[@class='panel-panel panel-main-3 content-column']
+title: //div[@class='panel-pane pane-node-title']
+date: //div[@class='updated-date']
+
+test_url: https://www.aclu.org/blog/free-future/chinas-nightmarish-citizen-scores-are-warning-americans
diff --git a/inc/3rdparty/site_config/standard/bez.es.txt b/inc/3rdparty/site_config/standard/bez.es.txt
new file mode 100644 (file)
index 0000000..cab7c6f
--- /dev/null
@@ -0,0 +1,5 @@
+body: //div[@class='text_art']
+strip: //div[@class='cab_datos_opinion']
+strip: //div[@class='sumario2_left']
+
+test_url: http://www.bez.es/382758623/otros-fracasos-empresas.html
index db80a35f71277f98a8d637169a0e76ae3221f855..2f9a5a2fee57fea75c108175b323951e33223d00 100755 (executable)
@@ -1,9 +1,10 @@
 # Instapaper gets this back to front and only gets the blog title instead of the article title.
-title: substring-before(//title, '-')
+title: //div[@class='title']
 
 author: //a[ contains(@href, '/people') ]
 
-body: //div[ @class='post' ]
+body: //div[ @class='post-content' ]
 
 # Date is impossible to retrieve since they use those stupid "fuzzy" dates, inserted through javascript, at posterous.
-test_url: http://blog.cloudflare.com/understanding-analytics-when-is-a-page-view-n
\ No newline at end of file
+test_url: http://blog.cloudflare.com/understanding-analytics-when-is-a-page-view-n
+test_url: https://blog.cloudflare.com/sha-1-deprecation-no-browser-left-behind
diff --git a/inc/3rdparty/site_config/standard/caffereggio.net.txt b/inc/3rdparty/site_config/standard/caffereggio.net.txt
new file mode 100644 (file)
index 0000000..08e1f05
--- /dev/null
@@ -0,0 +1,3 @@
+body: //div[@class="pf-content"]
+
+test_url: http://www.caffereggio.net/2016/01/16/115327/
index e86d3eca7fd5b6e1bf044ba4ea82160258b64644..227a03c7be6489b2bb0fffa5e01435a7334a932d 100755 (executable)
@@ -1,17 +1,10 @@
 title: //h1[contains(@class, "entry-title")]
 author: //p[contains(@class, "byline")]
 
-# blog articles (chronicle.com/blogs/*)
-body: //div[contains(@class, "abstract")]
-date: //p[contains(@class, "time")]
-
 # all (?) other articles
-body: //div[@id="article-body"]
+body: //div[@class="content-item__story"]
 date: //p[contains(@class, "dateline")]
 
-# remove sidebars containing images (I assume this is desired for Instapaper)
-strip: //div[@id="related"]
-strip: //div[contains(@class, "image")]
-
-# note that if you're not a Chronicle subscriber (personally or institutionally), you'll only see the first couple of paragraphs of the article, and Instapaper will display that with some crap above and below. thank goodness for that bookmarklet
-test_url: http://chronicle.com/article/In-a-Land-of-Second-Chances/128375/
\ No newline at end of file
+# note that if you're not a Chronicle subscriber (personally or institutionally), you'll only see the first couple of paragraphs of the article, and Instapaper $
+test_url: http://chronicle.com/article/In-a-Land-of-Second-Chances/128375/
+test_url: http://chronicle.com/blogs/wiredcampus/university-run-boot-camps-offer-students-marketable-skills-but-not-course-credit/57494
diff --git a/inc/3rdparty/site_config/standard/deia.com.txt b/inc/3rdparty/site_config/standard/deia.com.txt
new file mode 100644 (file)
index 0000000..d2f7823
--- /dev/null
@@ -0,0 +1,4 @@
+body: //div[@class='widget full_article']
+strip: //div[@class='Herramientas']
+
+test_url: http://www.deia.com/2015/10/03/politica/euskadi/el-envilecimiento-de-la-politica-y-de-los-medios-de-comunicacion
diff --git a/inc/3rdparty/site_config/standard/diagonalperiodico.net.txt b/inc/3rdparty/site_config/standard/diagonalperiodico.net.txt
new file mode 100644 (file)
index 0000000..f0681ba
--- /dev/null
@@ -0,0 +1,4 @@
+body: //div[@class='field__items']
+title: //div[@class='art_titulo']
+
+test_url: https://www.diagonalperiodico.net/global/27947-cuanto-mas-tiempo-nos-aferremos-este-sistema-peor-y-menores-seran-nuestras-opciones
diff --git a/inc/3rdparty/site_config/standard/esglobal.org.txt b/inc/3rdparty/site_config/standard/esglobal.org.txt
new file mode 100644 (file)
index 0000000..6408f44
--- /dev/null
@@ -0,0 +1,3 @@
+body: //div[@class='blog-content']
+
+test_url: http://www.esglobal.org/el-caos-en-el-este-los-socios-de-la-ue-necesitan-que-se-les-preste-atencion/
diff --git a/inc/3rdparty/site_config/standard/lawfareblog.com.txt b/inc/3rdparty/site_config/standard/lawfareblog.com.txt
new file mode 100644 (file)
index 0000000..49d858a
--- /dev/null
@@ -0,0 +1,4 @@
+body: //div[@class='field-items']
+title: //div[@class='title']
+
+test_url: https://lawfareblog.com/limits-panopticon
diff --git a/inc/3rdparty/site_config/standard/letraslibres.com.txt b/inc/3rdparty/site_config/standard/letraslibres.com.txt
new file mode 100644 (file)
index 0000000..cf271bc
--- /dev/null
@@ -0,0 +1,3 @@
+single_page_link: concat(link[@rel="canonical"], "?page=full")
+
+test_url: http://www.letraslibres.com/revista/dossier/quien-manda-en-europa
diff --git a/inc/3rdparty/site_config/standard/naiz.eus.txt b/inc/3rdparty/site_config/standard/naiz.eus.txt
new file mode 100644 (file)
index 0000000..9e48333
--- /dev/null
@@ -0,0 +1,4 @@
+body: //div[contains(@class,'widget full_article')]
+
+test_url: http://www.naiz.eus/eu/actualidad/noticia/20151002/adegi-afirma-que-los-jovenes-viven-una-vida-muy-comoda-y-no-tienen-hambre-para-emprender#
+test_url: http://www.naiz.eus/eu/actualidad/noticia/20151012/podemos-euskadi-critica-que-otegi-y-sus-companeros-quieran-pasar-por-grandes-pacifistas
diff --git a/inc/3rdparty/site_config/standard/pieria.co.uk.txt b/inc/3rdparty/site_config/standard/pieria.co.uk.txt
new file mode 100644 (file)
index 0000000..31f2c84
--- /dev/null
@@ -0,0 +1,3 @@
+body: //div[@id='article']
+
+test_url: http://www.pieria.co.uk/articles/need_a_fiscal_rule_george__try_get_the_economy_growing
diff --git a/inc/3rdparty/site_config/standard/popehat.com.txt b/inc/3rdparty/site_config/standard/popehat.com.txt
new file mode 100644 (file)
index 0000000..45b76ae
--- /dev/null
@@ -0,0 +1,6 @@
+title: //div[@class='entry-title']
+author: //div[@class='entry-author']
+date: //div[@class='entry-time']
+body: //div[@class='entry-content']
+
+test_url: https://popehat.com/2015/12/16/eric-posner-the-first-amendments-nemesis/
diff --git a/inc/3rdparty/site_config/standard/rasgolatente.es.txt b/inc/3rdparty/site_config/standard/rasgolatente.es.txt
new file mode 100644 (file)
index 0000000..fcdbbd9
--- /dev/null
@@ -0,0 +1,6 @@
+title: //div[@class='entry-title']
+author: //div[@class='entry-author']
+date: //div[@class='entry-time']
+body: //div[@class='entry-content']
+
+test_url: http://rasgolatente.es/estupidez-psicologia-estupidos/
diff --git a/inc/3rdparty/site_config/standard/thenews.coop.txt b/inc/3rdparty/site_config/standard/thenews.coop.txt
new file mode 100644 (file)
index 0000000..7d59380
--- /dev/null
@@ -0,0 +1,3 @@
+body: //div[@class='entry-content']
+
+test_url: http://www.thenews.coop/98221/news/co-operatives/jeremy-corbyn-needs-co-op-movement/
diff --git a/inc/3rdparty/site_config/standard/timeshighereducation.com.txt b/inc/3rdparty/site_config/standard/timeshighereducation.com.txt
new file mode 100644 (file)
index 0000000..ba52788
--- /dev/null
@@ -0,0 +1,3 @@
+body: //div[@class="col-md-12 radix-layouts-contentheader panel-panel"]
+strip: //div[@class="htmlContent subscribe_box"]
+test_url: https://www.timeshighereducation.com/blog/jeremy-corbyn-serious-about-free-higher-education
diff --git a/inc/3rdparty/site_config/standard/wired.de.txt b/inc/3rdparty/site_config/standard/wired.de.txt
new file mode 100644 (file)
index 0000000..da88362
--- /dev/null
@@ -0,0 +1,8 @@
+title: //meta[@name='Title']/@content
+author: //meta[@name='Author']/@content
+date: //meta[@name='DisplayDate']/@content
+body: //div[@class='article-content']
+strip: //div[@class='article-sidebar']
+
+test_url: https://www.wired.de/collection/latest/der-vw-skandal-zeigt-ohne-vertrauen-ist-software-nicht-mehr-als-bose-magie
+
index 9014f455f83e8b2b478bccf2093817f091317929..1476d158a268e9f5aeb8c407903e75ef61055fb6 100755 (executable)
@@ -190,7 +190,7 @@ class Poche
         {
             case 'add':
                 $content = Tools::getPageContent($url);
-                $title = ($content['rss']['channel']['item']['title'] != '') ? $content['rss']['channel']['item']['title'] : _('Untitled');
+                $title = ($content['rss']['channel']['item']['title'] != '') ? $content['rss']['channel']['item']['title'] : parse_url($url, PHP_URL_HOST);
                 $body = $content['rss']['channel']['item']['description'];
 
                 // clean content from prevent xss attack
@@ -908,7 +908,7 @@ class Poche
         $entries = $this->store->retrieveAllWithTags($this->user->getId());
         if ($entries) {
             echo $this->tpl->render('export.twig', array(
-            'export' => Tools::renderJson($entries),
+            'export' => Tools::renderJson(Tools::utf8ize($entries)),
             ));
             Tools::logm('export view');
         } else {
index 9c74839183c9368cbcdd117e2129fad65f31325e..263034f07d3363e5df1b23781dae68a46d5736b3 100755 (executable)
@@ -141,7 +141,7 @@ final class Tools
     public static function getFile($url)
     {
         $timeout = 15;
-        $useragent = "Mozilla/5.0 (Windows NT 5.1; rv:18.0) Gecko/20100101 Firefox/18.0";
+        $useragent = "Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0";
 
         if (in_array ('curl', get_loaded_extensions())) {
             # Fetch feed from URL
@@ -232,6 +232,27 @@ final class Tools
         exit();
     }
 
+    /**
+     * UTF-8 encode array of string
+     *
+     * @param $data
+     */
+    public static function utf8ize($data)
+    {
+        if (is_array($data))
+        {
+            foreach ($data as $k => $v)
+            {
+                $data[$k] = self::utf8ize($v);
+            }
+        }
+        else if (is_string ($data) && '' == mb_detect_encoding($data))
+        {
+            return utf8_encode($data);
+        }
+        return $data;
+    }
+
     /**
      * Create new line in log file
      *
index f5bce50d1bb09abbae631f9f8ca841f170a94e51..014fd3b4a3fdd8eabcdde4fb61e8a10a8471f344 100755 (executable)
@@ -704,7 +704,7 @@ php composer.phar install</code></pre>
                                  <li><label for="mysql_password">Password</label> <input type="password" placeholder="p4ssw0rd" id="mysql_password" name="mysql_password" /></li>
                                  <li><label for="mysql_utf8_mb4">Use UTF-8 MB4</label> <input id="mysql_utf8_mb4" type="checkbox" name="mysql_utf8_mb4">
                                  <div id="utf8_mb4_infos"><em>Warning :</em> UTF-8 MB4 is used to fully support unicode characters. It is available only with MySQL starting with version 5.5.3. 
-                                    Install will failed if you check this while using an older MySQL server.</div></li>
+                                    Install will fail if you check this while using an older MySQL server.</div></li>
                               </ul>
                               <?php } else { ?>
                                  <div class="messages notice">
index 9ca51cd2d21ff50997ac5d31d21fa0758725e167..e959ec3e1cbaa66e9d09d7fa023fb79c5f5c76f4 100755 (executable)
@@ -45,7 +45,6 @@
 
         <script>
         var baseurl = "{{ poche_url }}";
-        console.log(baseurl);
         var data = {
 
                 "name": "wallabag",
index 42da70b30dbc8a4d36a9caae3653e2eadbceb3ca..5854e7318089d21fd1ad888d4711296fb6b2d8a7 100755 (executable)
@@ -1,3 +1,20 @@
+.messages {
+    display: block;
+    clear: both;
+    width: 400px;
+    margin: 10px auto 10px;
+    padding: 10px 0;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+}
+
+.messages p {
+    margin: 3px 0 3px 10px !important;
+    padding: 0 10px 0 23px !important;
+    font-size: 14px;
+    line-height: 16px;
+}
+
 .messages.error.install {
     border: 1px solid #c42608;
     color: #c00 !important;
     border: 1px solid #6dc70c;
     background: #e0fbcc !important;
     text-align: left;
+}
+
+.messages.information,
+.messages.info {
+    border: 1px solid #82aee7;
+    background: #dfebfb;
 }
\ No newline at end of file
index e1b78a26fb85b947fa8ee65ae5316f2a44be7584..9518332f009f4642b8f04257b143fddd660a86a1 100755 (executable)
@@ -47,7 +47,7 @@
                         {{ nb_results }} {% trans "articles" %}
                     {% endif %}
                     {% if view == 'home' or view == 'fav' or view == 'archive' %}
-                    <a href="?action=random&amp;view={{ view }}" class="icon icon-random"><span> {% trans "random" %}</span></a>{% endif %}
+                    <a href="?action=random&amp;view={{ view }}" title="{% trans "random" %}" class="icon icon-random"><span> {% trans "random" %}</span></a>{% endif %}
                     </div>
                         {{ page_links | raw }}
                 </div>
index 9ee64fc0f6fd3ad24ceda6147832de89f842e1d0..1381519c84bfd56b02b4289c2b2a4668170ef58e 100755 (executable)
 
         // use keyboard to do actions
         actionArticle('{{ entry.id|e }}');
-
-        // swipe to right or left on mobile to navigate
-        $('article').on("swiperight", function(){
-            goLeft('?view=view&id={{ navigate.nextid|e }}');
-        });
-        $('article').on("swipeleft", function(){
-            goRight('?view=view&id={{ navigate.previousid|e }}');
-        });
-
         </script>
 {% endblock %}
index e3841c779c8b404730c4d2a702f0a7b17752fc94..2785fd2324d25d0e974c35e8565e17acf366d9e0 100755 (executable)
@@ -42,7 +42,6 @@
 
         <script>
         var baseurl = "{{ poche_url }}";
-        console.log(baseurl);
         var data = {
 
                 "name": "wallabag",
index 679aa09811b53046d93bc9615f77121200fa4fd7..80ae456dd5798b83f19204e1cc736b0a4561bc82 100644 (file)
@@ -1 +1,6 @@
-                {{ messages | raw }}
\ No newline at end of file
+                {{ messages | raw }}
+                {% if view == 'home' %}
+                <div class="messages information">
+                    <p><a href="http://doc.wallabag.org">wallabag v2 is out, please read the documentation to upgrade.</a></p>
+                </div>
+                {% endif %}
\ No newline at end of file
index a320cc7f0433c5d5062142e128ce723c27b2038a..08e33fadab1ebe31c0490ef3b6802376a3b4f243 100755 (executable)
@@ -52,7 +52,7 @@
                         {{ nb_results }} {% trans "articles" %}
                     {% endif %}
                     {% if view == 'home' or view == 'fav' or view == 'archive' %}
-                    <a href="?action=random&amp;view={{ view }}" class="icon icon-random"><span> {% trans "random" %}</span></a>{% endif %}
+                    <a href="?action=random&amp;view={{ view }}" title="{% trans "random" %}" class="icon icon-random"><span> {% trans "random" %}</span></a>{% endif %}
                     </div>
                         {{ page_links | raw }}
                 </div>
index 0010d18fb8da437899af6552f5ca46779fa5bb8f..d1b6496e9d4d705ed59a4d3a6e8fb58280dfb388 100755 (executable)
         // Use left and right arrow to navigate on with keyboard
         navigateKeyboard('?view=view&id={{ navigate.nextid|e }}','?view=view&id={{ navigate.previousid|e }}');
 
-        // swipe to right or left on mobile to navigate
-        $('article').on("swiperight", function(){
-            goLeft('?view=view&id={{ navigate.nextid|e }}');
-        });
-        $('article').on("swipeleft", function(){
-            goRight('?view=view&id={{ navigate.previousid|e }}');
-        });
-
         </script>
 {% endblock %}