From cbc75befb5bdf368bec15f47413bd7669273a181 Mon Sep 17 00:00:00 2001 From: Maryana Rozhankivska Date: Fri, 30 May 2014 17:14:53 +0300 Subject: small xss vulnerability and translation ability fix --- inc/poche/Poche.class.php | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 37cf66a3..b0c0adf8 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -1083,11 +1083,10 @@ class Poche $config = $this->store->getConfigUser($user_id); if ($config == null) { - die(_('User with this id (' . $user_id . ') does not exist.')); + die(_( sprintf('User with this id (%d) does not exist.', $user_id) )); } - if (!in_array($type, $allowed_types) || - $token != $config['token']) { + if (!in_array($type, $allowed_types) || $token != $config['token']) { die(_('Uh, there is a problem while generating feeds.')); } // Check the token @@ -1150,12 +1149,12 @@ class Poche return new HTMLPurifier($config); } - + /** * handle epub */ public function createEpub() { - + switch ($_GET['method']) { case 'id': $entryID = filter_var($_GET['id'],FILTER_SANITIZE_NUMBER_INT); @@ -1191,7 +1190,7 @@ class Poche break; case 'default': die(_('Uh, there is a problem while generating epub.')); - + } $content_start = @@ -1204,11 +1203,11 @@ class Poche . "\n"; $bookEnd = "\n\n"; - + $log = new Logger("wallabag", TRUE); $fileDir = CACHE; - + $book = new EPub(EPub::BOOK_VERSION_EPUB3); $log->logLine("new EPub()"); $log->logLine("EPub class version: " . EPub::VERSION); @@ -1216,7 +1215,7 @@ class Poche $log->logLine("Zip version: " . Zip::VERSION); $log->logLine("getCurrentServerURL: " . $book->getCurrentServerURL()); $log->logLine("getCurrentPageURL..: " . $book->getCurrentPageURL()); - + $book->setTitle(_('wallabag\'s articles')); $book->setIdentifier("http://$_SERVER[HTTP_HOST]", EPub::IDENTIFIER_URI); // Could also be the ISBN number, prefered for published books, or a UUID. //$book->setLanguage("en"); // Not needed, but included for the example, Language is mandatory, but EPub defaults to "en". Use RFC3066 Language codes, such as "en", "da", "fr" etc. @@ -1226,39 +1225,39 @@ class Poche $book->setDate(time()); // Strictly not needed as the book date defaults to time(). //$book->setRights("Copyright and licence information specific for the book."); // As this is generated, this _could_ contain the name or licence information of the user who purchased the book, if needed. If this is used that way, the identifier must also be made unique for the book. $book->setSourceURL("http://$_SERVER[HTTP_HOST]"); - + $book->addDublinCoreMetadata(DublinCore::CONTRIBUTOR, "PHP"); $book->addDublinCoreMetadata(DublinCore::CONTRIBUTOR, "wallabag"); - + $cssData = "body {\n margin-left: .5em;\n margin-right: .5em;\n text-align: justify;\n}\n\np {\n font-family: serif;\n font-size: 10pt;\n text-align: justify;\n text-indent: 1em;\n margin-top: 0px;\n margin-bottom: 1ex;\n}\n\nh1, h2 {\n font-family: sans-serif;\n font-style: italic;\n text-align: center;\n background-color: #6b879c;\n color: white;\n width: 100%;\n}\n\nh1 {\n margin-bottom: 2px;\n}\n\nh2 {\n margin-top: -2px;\n margin-bottom: 2px;\n}\n"; - + $log->logLine("Add Cover"); - + $fullTitle = "

" . $bookTitle . "

\n"; - + $book->setCoverImage("Cover.png", file_get_contents("themes/baggy/img/apple-touch-icon-152.png"), "image/png", $fullTitle); - + $cover = $content_start . '

' . _('Produced by wallabag with PHPePub') . '

'. _('Please open an issue if you have trouble with the display of this E-Book on your device.') . '

' . $bookEnd; - + //$book->addChapter("Table of Contents", "TOC.xhtml", NULL, false, EPub::EXTERNAL_REF_IGNORE); $book->addChapter("Notices", "Cover2.html", $cover); - + $book->buildTOC(); - + foreach ($entries as $entry) { //set tags as subjects $tags = $this->store->retrieveTagsByEntry($entry['id']); foreach ($tags as $tag) { $book->setSubject($tag['value']); } - + $log->logLine("Set up parameters"); - + $chapter = $content_start . $entry['content'] . $bookEnd; $book->addChapter($entry['title'], htmlspecialchars($entry['title']) . ".html", $chapter, true, EPub::EXTERNAL_REF_ADD); $log->logLine("Added chapter " . $entry['title']); } - if (DEBUG_POCHE) { + if (DEBUG_POCHE) { $epuplog = $book->getLog(); $book->addChapter("Log", "Log.html", $content_start . $log->getLog() . "\n" . $bookEnd); // log generation } -- cgit v1.2.3 From 30bd273580a326db1fcc7263e1f52948672f9848 Mon Sep 17 00:00:00 2001 From: Maryana Rozhankivska Date: Fri, 30 May 2014 17:17:34 +0300 Subject: small xss vulnerability and translation ability fix --- inc/poche/Poche.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index b0c0adf8..3d1337f3 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -1083,7 +1083,7 @@ class Poche $config = $this->store->getConfigUser($user_id); if ($config == null) { - die(_( sprintf('User with this id (%d) does not exist.', $user_id) )); + die(sprintf(_('User with this id (%d) does not exist.'), $user_id)); } if (!in_array($type, $allowed_types) || $token != $config['token']) { -- cgit v1.2.3 From 1d14e653156399ef4759df3c0f39cebc5ee0102e Mon Sep 17 00:00:00 2001 From: Maryana Rozhankivska Date: Sun, 1 Jun 2014 19:49:22 +0300 Subject: fix of undefined ATOM constant warning in full-text-rss, will fix ios-app issue #14 --- inc/3rdparty/libraries/feedwriter/FeedWriter.php | 1 + 1 file changed, 1 insertion(+) diff --git a/inc/3rdparty/libraries/feedwriter/FeedWriter.php b/inc/3rdparty/libraries/feedwriter/FeedWriter.php index aa064afb..9446cddf 100755 --- a/inc/3rdparty/libraries/feedwriter/FeedWriter.php +++ b/inc/3rdparty/libraries/feedwriter/FeedWriter.php @@ -2,6 +2,7 @@ define('RSS2', 1, true); define('JSON', 2, true); define('JSONP', 3, true); +define('ATOM', 4, true); /** * Univarsel Feed Writer class -- cgit v1.2.3 From 752cd4a8ef7bbc8ebd6c481ed890e0d8e46819a8 Mon Sep 17 00:00:00 2001 From: Maryana Rozhankivska Date: Mon, 2 Jun 2014 18:00:09 +0300 Subject: error reporting level set in E_ALL & ~E_NOTICE by default, can be overriden in config --- inc/3rdparty/makefulltextfeed.php | 2 +- inc/poche/Tools.class.php | 4 +--- inc/poche/config.inc.default.php | 4 ++++ index.php | 5 +++++ 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/inc/3rdparty/makefulltextfeed.php b/inc/3rdparty/makefulltextfeed.php index 7a56be8c..62c050ec 100755 --- a/inc/3rdparty/makefulltextfeed.php +++ b/inc/3rdparty/makefulltextfeed.php @@ -28,7 +28,7 @@ along with this program. If not, see . // Request this file passing it a web page or feed URL in the querystring: makefulltextfeed.php?url=example.org/article // For more request parameters, see http://help.fivefilters.org/customer/portal/articles/226660-usage -error_reporting(E_ALL ^ E_NOTICE); +//error_reporting(E_ALL ^ E_NOTICE); ini_set("display_errors", 1); @set_time_limit(120); diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index 8073a3fe..1ef875c9 100755 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php @@ -18,8 +18,6 @@ class Tools die(_('Oops, it seems you don\'t have PHP 5.')); } - error_reporting(E_ALL); - function stripslashesDeep($value) { return is_array($value) ? array_map('stripslashesDeep', $value) @@ -64,7 +62,7 @@ class Tools if (strpos($host, ':') !== false) { $serverport = ''; } - + return 'http' . ($https ? 's' : '') . '://' . $host . $serverport . $scriptname; } diff --git a/inc/poche/config.inc.default.php b/inc/poche/config.inc.default.php index ffcd205d..95f727c6 100755 --- a/inc/poche/config.inc.default.php +++ b/inc/poche/config.inc.default.php @@ -30,6 +30,10 @@ @define ('MODE_DEMO', FALSE); @define ('DEBUG_POCHE', FALSE); + +//default level of error reporting in application. Developers should override it in their config.inc.php: set to E_ALL. +@define ('ERROR_REPORTING', E_ALL & ~E_NOTICE); + @define ('DOWNLOAD_PICTURES', FALSE); # This can slow down the process of adding articles @define ('REGENERATE_PICTURES_QUALITY', 75); @define ('CONVERT_LINKS_FOOTNOTES', FALSE); diff --git a/index.php b/index.php index 472e0fab..c134b103 100755 --- a/index.php +++ b/index.php @@ -12,6 +12,11 @@ define ('POCHE', '1.7.0'); require 'check_setup.php'; require_once 'inc/poche/global.inc.php'; +# Set error reporting level +if (defined('ERROR_REPORTING')) { + error_reporting(ERROR_REPORTING); +} + # Start session Session::$sessionName = 'poche'; Session::init(); -- cgit v1.2.3 From ec15d0a784a84e07b284c76e71fd8496e00559d5 Mon Sep 17 00:00:00 2001 From: tcit Date: Sat, 7 Jun 2014 15:53:39 +0200 Subject: do not debug inside an epub --- inc/3rdparty/libraries/PHPePub/EPub.php | 8 +++++++- inc/poche/Poche.class.php | 10 +++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/inc/3rdparty/libraries/PHPePub/EPub.php b/inc/3rdparty/libraries/PHPePub/EPub.php index f1f41bd5..d9b990b7 100644 --- a/inc/3rdparty/libraries/PHPePub/EPub.php +++ b/inc/3rdparty/libraries/PHPePub/EPub.php @@ -41,6 +41,8 @@ class EPub { private $bookVersion = EPub::BOOK_VERSION_EPUB2; + private $debugInside = FALSE; + public $maxImageWidth = 768; public $maxImageHeight = 1024; @@ -132,10 +134,14 @@ class EPub { * * @return void */ - function __construct($bookVersion = EPub::BOOK_VERSION_EPUB2, $languageCode = "en", $writingDirection = EPub::DIRECTION_LEFT_TO_RIGHT) { + function __construct($bookVersion = EPub::BOOK_VERSION_EPUB2, $debugInside = FALSE, $languageCode = "en", $writingDirection = EPub::DIRECTION_LEFT_TO_RIGHT) { include_once("Zip.php"); include_once("Logger.php"); + if (!$debugInside) { + error_reporting(E_ERROR | E_PARSE); + } + $this->bookVersion = $bookVersion; $this->writingDirection = $writingDirection; $this->languageCode = $languageCode; diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 1b69cd61..4139c4f4 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -1142,11 +1142,11 @@ class Poche * return new purifier object with actual config */ protected function getPurifier() { - $config = HTMLPurifier_Config::createDefault(); - $config->set('Cache.SerializerPath', CACHE); - $config->set('HTML.SafeIframe', true); + $config = HTMLPurifier_Config::createDefault(); + $config->set('Cache.SerializerPath', CACHE); + $config->set('HTML.SafeIframe', true); $config->set('URI.SafeIframeRegexp', '%^(https?:)?//(www\.youtube(?:-nocookie)?\.com/embed/|player\.vimeo\.com/video/)%'); //allow YouTube and Vimeo$purifier = new HTMLPurifier($config); - + return new HTMLPurifier($config); } @@ -1208,7 +1208,7 @@ class Poche $fileDir = CACHE; - $book = new EPub(EPub::BOOK_VERSION_EPUB3); + $book = new EPub(EPub::BOOK_VERSION_EPUB3, DEBUG_POCHE); $log->logLine("new EPub()"); $log->logLine("EPub class version: " . EPub::VERSION); $log->logLine("EPub Req. Zip version: " . EPub::REQ_ZIP_VERSION); -- cgit v1.2.3 From 97d54f2ac8abb31889112db2eff634bca71888b3 Mon Sep 17 00:00:00 2001 From: draky50110 Date: Thu, 12 Jun 2014 01:00:49 +0200 Subject: typo FR --- locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo | Bin 16403 -> 16339 bytes locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) mode change 100755 => 100644 locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo diff --git a/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo b/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo old mode 100755 new mode 100644 index fd0e23f6..25c1c05d Binary files a/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo and b/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo differ diff --git a/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po b/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po index 0b2a87dc..9789454f 100755 --- a/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po +++ b/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po @@ -4,7 +4,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-05-10 20:09+0100\n" "PO-Revision-Date: \n" -"Last-Translator: Mickaël RAYBAUD-ROIG \n" +"Last-Translator: Gilles Wittezaële \n" "Language-Team: \n" "Language: fr_FR\n" "MIME-Version: 1.0\n" @@ -628,16 +628,16 @@ msgid "click to finish import" msgstr "cliquez pour terminer l'importation" msgid "Articles inserted: " -msgstr "Articles ajoutés: " +msgstr "Articles ajoutés : " msgid ". Please note, that some may be marked as \"read\"." -msgstr ". Notez que certains pourraient être marqués comme lus." +msgstr ". Notez que certains pourraient être marqués comme \"lus\"." msgid "Import finished." msgstr "Importation terminée." msgid "Undefined" -msgstr "Non définit" +msgstr "Non défini" msgid "User with this id (" msgstr "Utilisateur avec cet identifiant (" -- cgit v1.2.3 From 7f186e21e0a121320485dca9c846b4c3df261deb Mon Sep 17 00:00:00 2001 From: draky50110 Date: Thu, 12 Jun 2014 18:55:38 +0200 Subject: Typo FR (suite) --- locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo | Bin 16339 -> 16348 bytes locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po | 34 ++++++++++++++-------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo b/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo index 25c1c05d..ada816a3 100644 Binary files a/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo and b/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo differ diff --git a/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po b/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po index 9789454f..0151ca13 100755 --- a/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po +++ b/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po @@ -259,7 +259,7 @@ msgstr "" "(le délai d'attente entre deux séquences de téléchargement)." msgid "File:" -msgstr "Fichier: " +msgstr "Fichier : " msgid "You can click here to fetch content for articles with no content." msgstr "" @@ -287,7 +287,7 @@ msgid "Add user" msgstr "Ajouter un utilisateur" msgid "Add a new user :" -msgstr "Ajouter un nouvel utilisateur: " +msgstr "Ajouter un nouvel utilisateur : " msgid "Login for new user" msgstr "Identifiant du nouvel utilisateur" @@ -296,10 +296,10 @@ msgid "Login" msgstr "Nom d'utilisateur" msgid "Password for new user" -msgstr "Mot de passe du nouvel utilisateur: " +msgstr "Mot de passe du nouvel utilisateur" msgid "Send" -msgstr "Imvoyer" +msgstr "Envoyer" msgid "Delete account" msgstr "Supprimer le compte" @@ -322,7 +322,7 @@ msgstr "" msgid "" "To completely remove wallabag, delete the wallabag folder on your web server." msgstr "" -"Pour déinstaller complètement Wallabag, supprimez le répertoire " +"Pour désinstaller complètement Wallabag, supprimez le répertoire " "wallabag de votre serveur Web." msgid "Save a link" @@ -418,17 +418,17 @@ msgid "More infos in the official doc:" msgstr "Plus d'infos dans la documentation officielle :" msgid "import from Pocket" -msgstr "importation depuis Pocket" +msgstr "importer depuis Pocket" #, php-format msgid "(you must have a %s file on your server)" msgstr "(le fichier %s doit être présent sur le serveur)" msgid "import from Readability" -msgstr "importation depuis Readability" +msgstr "importer depuis Readability" msgid "import from Instapaper" -msgstr "importation depuis Instapaper" +msgstr "importer depuis Instapaper" msgid "Start typing for auto complete." msgstr "Commencez à taper pour activer l'auto-complétion." @@ -525,13 +525,13 @@ msgid "Download required for " msgstr "Téléchargement requis pour " msgid "records" -msgstr " éléments." +msgstr " enregistrements" msgid "Downloading next " -msgstr "Téléchargement des " +msgstr "Téléchargement des prochains " msgid "articles, please wait" -msgstr " prochains éléments, veuillez patienter" +msgstr " articles, veuillez patienter" msgid "Enter your search here" msgstr "Entrez votre recherche ici" @@ -546,18 +546,18 @@ msgstr "" #, php-format msgid "Error : An user with the name %s already exists !" -msgstr "Erreur: Un utilisateur avec le nom « %s » existe déjà." +msgstr "Erreur : Un utilisateur avec le nom « %s » existe déjà !" #, php-format msgid "User %s has been successfully deleted !" -msgstr "L'utilisateur « %s » a bien été supprimé !" +msgstr "L'utilisateur « %s » a été supprimé avec succès !" msgid "Error : The password is wrong !" -msgstr "Erreur: Le mot de passe est incorrect !" +msgstr "Erreur : le mot de passe est incorrect !" msgid "Error : You are the only user, you cannot delete your account !" msgstr "" -"Erreur: Vous êtes l'unique utilisateur, vous ne pouvez pas supprimer votre " +"Erreur : Vous êtes l'unique utilisateur, vous ne pouvez pas supprimer votre " "compte !" msgid "Untitled" @@ -585,7 +585,7 @@ msgid "next" msgstr "suivant" msgid "in demo mode, you can't update your password" -msgstr "en mode démo, vous ne pouvez pas mettre à jour le mot de passe" +msgstr "en mode démo, vous ne pouvez pas mettre à jour votre mot de passe" msgid "your password has been updated" msgstr "votre mot de passe a été mis à jour" @@ -598,7 +598,7 @@ msgstr "" "dans les deux" msgid "still using the \"" -msgstr "Vous utilisez toujours \"" +msgstr "vous utilisez toujours \"" msgid "that theme does not seem to be installed" msgstr "ce thème ne semble pas installé" -- cgit v1.2.3 From ae43ec99d9f44f9295c107e0d36fdc2b24b954e0 Mon Sep 17 00:00:00 2001 From: draky50110 Date: Thu, 12 Jun 2014 20:32:02 +0200 Subject: typo FR 3 --- locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo | Bin 16348 -> 16348 bytes locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po | 78 ++-------------------------- 2 files changed, 5 insertions(+), 73 deletions(-) diff --git a/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo b/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo index ada816a3..84972fa2 100644 Binary files a/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo and b/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo differ diff --git a/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po b/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po index 0151ca13..3d59fb0c 100755 --- a/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po +++ b/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po @@ -1,6 +1,6 @@ msgid "" msgstr "" -"Project-Id-Version: wallabag 1.6.1\n" +"Project-Id-Version: wallabag 1.7\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-05-10 20:09+0100\n" "PO-Revision-Date: \n" @@ -131,7 +131,7 @@ msgid "via F-Droid" msgstr "via F-Droid" msgid " or " -msgstr "ou" +msgstr " ou " msgid "via Google Play" msgstr "via Google PlayStore" @@ -240,7 +240,7 @@ msgid "" "You can import your Pocket, Readability, Instapaper, Wallabag or any data in " "appropriate json or html format." msgstr "" -"Vous pouvez importer depuis Pocket, Readability, Instapaper, Wallabag, ou " +"Vous pouvez importer depuis Pocket, Readability, Instapaper, wallabag, ou " "n'importe quel fichier au format JSON ou HTML approprié." msgid "" @@ -251,7 +251,7 @@ msgid "" "IMPORT_DELAY (delay between fetch of next batch of articles)." msgstr "" "Sélectionner le fichier à importer sur votre disque dur, et pressez la " -"bouton « Importer » ci-dessous.
Wallabag analysera votre fichier, " +"bouton « Importer » ci-dessous.
wallabag analysera votre fichier, " "ajoutera toutes les URL trouvées et commencera à télécharger les contenus si " "nécessaire.
Le processus de téléchargement est contrôlé par deux " "constantes dans votre fichier de configuration:IMPORT_LIMITwallabag de votre serveur Web." msgid "Save a link" @@ -650,71 +650,3 @@ msgstr "Cache effacé." msgid "Oops, it seems you don't have PHP 5." msgstr "Oups, vous ne semblez pas avoir PHP 5." - -#~ msgid "" -#~ "Please execute the import script locally as it can take a very long time." -#~ msgstr "" -#~ "Merci d'exécuter le script d'importation en local car cela peut prendre " -#~ "du temps." - -#~ msgid "More info in the official documentation:" -#~ msgstr "Plus d'infos dans la documentation officielle :" - -#~ msgid "Import from Pocket" -#~ msgstr "Import depuis Pocket" - -#~ msgid "Import from Readability" -#~ msgstr "Importer depuis Readability" - -#~ msgid "Import from Instapaper" -#~ msgstr "Importer depuis Instapaper" - -#~ msgid "Import from wallabag" -#~ msgstr "Importer depuis wallabag" - -#~ msgid "import from instapaper completed" -#~ msgstr "Importation depuis Instapaper achevée" - -#~ msgid "import from pocket completed" -#~ msgstr "Importation depuis Pocket achevée" - -#~ msgid "import from Readability completed. " -#~ msgstr "Importation depuis Readability achevée" - -#~ msgid "import from Poche completed. " -#~ msgstr "Importation depuis Pocket achevée" - -#~ msgid "Unknown import provider." -#~ msgstr "Format d'importation inconnu." - -#~ msgid "Incomplete inc/poche/define.inc.php file, please define \"" -#~ msgstr "Fichier inc/poche/define.inc.php incomplet, merci de définir \"" - -#~ msgid "Could not find required \"" -#~ msgstr "Impossible de trouver \"" - -#~ msgid "poche it!" -#~ msgstr "pochez-le !" - -#~ msgid "Updating poche" -#~ msgstr "Mettre à jour poche" - -#, fuzzy -#~ msgid "Export your poche datas" -#~ msgstr "Exporter vos données de poche" - -#, fuzzy -#~ msgid "to export your poche datas." -#~ msgstr "pour exporter vos données de poche." - -#~ msgid "create an issue" -#~ msgstr "créez un ticket" - -#~ msgid "or" -#~ msgstr "ou" - -#~ msgid "contact us by mail" -#~ msgstr "contactez-nous par email" - -#~ msgid "your poche version:" -#~ msgstr "votre version de poche :" -- cgit v1.2.3 From 0bf95d865a6dd18e5a3a5fdc476db0a2a3673526 Mon Sep 17 00:00:00 2001 From: draky50110 Date: Thu, 12 Jun 2014 22:16:04 +0200 Subject: Revert "Typo FR (suite)" This reverts commit 7f186e21e0a121320485dca9c846b4c3df261deb. Conflicts: locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po --- locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po diff --git a/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po b/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po old mode 100755 new mode 100644 -- cgit v1.2.3 From 29cd317aff943f1ec0a893201f5726eaf5086078 Mon Sep 17 00:00:00 2001 From: draky50110 Date: Thu, 12 Jun 2014 22:21:44 +0200 Subject: fin de correction typo FR --- locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo | Bin 16348 -> 16341 bytes locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo b/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo index 84972fa2..c4c4e69a 100644 Binary files a/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo and b/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo differ diff --git a/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po b/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po index 3d59fb0c..433f6083 100644 --- a/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po +++ b/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po @@ -525,7 +525,7 @@ msgid "Download required for " msgstr "Téléchargement requis pour " msgid "records" -msgstr " enregistrements" +msgstr " articles" msgid "Downloading next " msgstr "Téléchargement des prochains " -- cgit v1.2.3 From ba22fb1cefb9b552c2ac8445742173935d255339 Mon Sep 17 00:00:00 2001 From: draky50110 Date: Thu, 12 Jun 2014 23:10:26 +0200 Subject: typo mineure --- locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo | Bin 16341 -> 16343 bytes locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo b/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo index c4c4e69a..b625e346 100644 Binary files a/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo and b/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo differ diff --git a/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po b/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po index 433f6083..0343bfec 100644 --- a/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po +++ b/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po @@ -528,10 +528,10 @@ msgid "records" msgstr " articles" msgid "Downloading next " -msgstr "Téléchargement des prochains " +msgstr "Téléchargement des " msgid "articles, please wait" -msgstr " articles, veuillez patienter" +msgstr " articles suivants, veuillez patienter..." msgid "Enter your search here" msgstr "Entrez votre recherche ici" -- cgit v1.2.3 From aa126ba458a02e8b1e43b15fc28f550ee72a9619 Mon Sep 17 00:00:00 2001 From: Maryana Rozhankivska Date: Wed, 25 Jun 2014 19:34:14 +0300 Subject: fix of issue #718: Error parsing file imported from Pocket #718 --- inc/3rdparty/simple_html_dom.php | 105 ++++++++++++++++++++++++--------------- 1 file changed, 65 insertions(+), 40 deletions(-) mode change 100644 => 100755 inc/3rdparty/simple_html_dom.php diff --git a/inc/3rdparty/simple_html_dom.php b/inc/3rdparty/simple_html_dom.php old mode 100644 new mode 100755 index 43b94e57..9b73b105 --- a/inc/3rdparty/simple_html_dom.php +++ b/inc/3rdparty/simple_html_dom.php @@ -34,7 +34,7 @@ * @author S.C. Chen * @author John Schlick * @author Rus Carroll - * @version 1.5 ($Rev: 202 $) + * @version 1.5 ($Rev: 210 $) * @package PlaceLocalInclude * @subpackage simple_html_dom */ @@ -269,7 +269,10 @@ class simple_html_dom_node { return $this->children; } - if (isset($this->children[$idx])) return $this->children[$idx]; + if (isset($this->children[$idx])) + { + return $this->children[$idx]; + } return null; } @@ -330,14 +333,14 @@ class simple_html_dom_node function find_ancestor_tag($tag) { global $debug_object; - if (is_object($debug_object)) { $debug_object->debugLogEntry(1); } + if (is_object($debug_object)) { $debug_object->debug_log_entry(1); } // Start by including ourselves in the comparison. $returnDom = $this; while (!is_null($returnDom)) { - if (is_object($debug_object)) { $debug_object->debugLog(2, "Current tag is: " . $returnDom->tag); } + if (is_object($debug_object)) { $debug_object->debug_log(2, "Current tag is: " . $returnDom->tag); } if ($returnDom->tag == $tag) { @@ -374,7 +377,7 @@ class simple_html_dom_node $text = " with text: " . $this->text; } } - $debug_object->debugLog(1, 'Innertext of tag: ' . $this->tag . $text); + $debug_object->debug_log(1, 'Innertext of tag: ' . $this->tag . $text); } if ($this->tag==='root') return $this->innertext(); @@ -532,7 +535,9 @@ class simple_html_dom_node foreach ($head as $k=>$v) { if (!isset($found_keys[$k])) + { $found_keys[$k] = 1; + } } } @@ -554,7 +559,7 @@ class simple_html_dom_node protected function seek($selector, &$ret, $lowercase=false) { global $debug_object; - if (is_object($debug_object)) { $debug_object->debugLogEntry(1); } + if (is_object($debug_object)) { $debug_object->debug_log_entry(1); } list($tag, $key, $val, $exp, $no_key) = $selector; @@ -615,7 +620,7 @@ class simple_html_dom_node // this is a normal search, we want the value of that attribute of the tag. $nodeKeyValue = $node->attr[$key]; } - if (is_object($debug_object)) {$debug_object->debugLog(2, "testing node: " . $node->tag . " for attribute: " . $key . $exp . $val . " where nodes value is: " . $nodeKeyValue);} + if (is_object($debug_object)) {$debug_object->debug_log(2, "testing node: " . $node->tag . " for attribute: " . $key . $exp . $val . " where nodes value is: " . $nodeKeyValue);} //PaperG - If lowercase is set, do a case insensitive test of the value of the selector. if ($lowercase) { @@ -623,7 +628,7 @@ class simple_html_dom_node } else { $check = $this->match($exp, $val, $nodeKeyValue); } - if (is_object($debug_object)) {$debug_object->debugLog(2, "after match: " . ($check ? "true" : "false"));} + if (is_object($debug_object)) {$debug_object->debug_log(2, "after match: " . ($check ? "true" : "false"));} // handle multiple class if (!$check && strcasecmp($key, 'class')===0) { @@ -645,12 +650,12 @@ class simple_html_dom_node unset($node); } // It's passed by reference so this is actually what this function returns. - if (is_object($debug_object)) {$debug_object->debugLog(1, "EXIT - ret: ", $ret);} + if (is_object($debug_object)) {$debug_object->debug_log(1, "EXIT - ret: ", $ret);} } protected function match($exp, $pattern, $value) { global $debug_object; - if (is_object($debug_object)) {$debug_object->debugLogEntry(1);} + if (is_object($debug_object)) {$debug_object->debug_log_entry(1);} switch ($exp) { case '=': @@ -672,7 +677,7 @@ class simple_html_dom_node protected function parse_selector($selector_string) { global $debug_object; - if (is_object($debug_object)) {$debug_object->debugLogEntry(1);} + if (is_object($debug_object)) {$debug_object->debug_log_entry(1);} // pattern of CSS selectors, modified from mootools // Paperg: Add the colon to the attrbute, so that it properly finds like google does. @@ -683,7 +688,7 @@ class simple_html_dom_node // $pattern = "/([\w-:\*]*)(?:\#([\w-]+)|\.([\w-]+))?(?:\[@?(!?[\w-]+)(?:([!*^$]?=)[\"']?(.*?)[\"']?)?\])?([\/, ]+)/is"; $pattern = "/([\w-:\*]*)(?:\#([\w-]+)|\.([\w-]+))?(?:\[@?(!?[\w-:]+)(?:([!*^$]?=)[\"']?(.*?)[\"']?)?\])?([\/, ]+)/is"; preg_match_all($pattern, trim($selector_string).' ', $matches, PREG_SET_ORDER); - if (is_object($debug_object)) {$debug_object->debugLog(2, "Matches Array: ", $matches);} + if (is_object($debug_object)) {$debug_object->debug_log(2, "Matches Array: ", $matches);} $selectors = array(); $result = array(); @@ -718,12 +723,14 @@ class simple_html_dom_node return $selectors; } - function __get($name) { + function __get($name) + { if (isset($this->attr[$name])) { return $this->convert_text($this->attr[$name]); } - switch ($name) { + switch ($name) + { case 'outertext': return $this->outertext(); case 'innertext': return $this->innertext(); case 'plaintext': return $this->text(); @@ -732,22 +739,30 @@ class simple_html_dom_node } } - function __set($name, $value) { - switch ($name) { + function __set($name, $value) + { + global $debug_object; + if (is_object($debug_object)) {$debug_object->debug_log_entry(1);} + + switch ($name) + { case 'outertext': return $this->_[HDOM_INFO_OUTER] = $value; case 'innertext': if (isset($this->_[HDOM_INFO_TEXT])) return $this->_[HDOM_INFO_TEXT] = $value; return $this->_[HDOM_INFO_INNER] = $value; } - if (!isset($this->attr[$name])) { + if (!isset($this->attr[$name])) + { $this->_[HDOM_INFO_SPACE][] = array(' ', '', ''); $this->_[HDOM_INFO_QUOTE][] = HDOM_QUOTE_DOUBLE; } $this->attr[$name] = $value; } - function __isset($name) { - switch ($name) { + function __isset($name) + { + switch ($name) + { case 'outertext': return true; case 'innertext': return true; case 'plaintext': return true; @@ -765,7 +780,7 @@ class simple_html_dom_node function convert_text($text) { global $debug_object; - if (is_object($debug_object)) {$debug_object->debugLogEntry(1);} + if (is_object($debug_object)) {$debug_object->debug_log_entry(1);} $converted_text = $text; @@ -777,7 +792,7 @@ class simple_html_dom_node $sourceCharset = strtoupper($this->dom->_charset); $targetCharset = strtoupper($this->dom->_target_charset); } - if (is_object($debug_object)) {$debug_object->debugLog(3, "source charset: " . $sourceCharset . " target charaset: " . $targetCharset);} + if (is_object($debug_object)) {$debug_object->debug_log(3, "source charset: " . $sourceCharset . " target charaset: " . $targetCharset);} if (!empty($sourceCharset) && !empty($targetCharset) && (strcasecmp($sourceCharset, $targetCharset) != 0)) { @@ -1045,10 +1060,10 @@ class simple_html_dom // prepare $this->prepare($str, $lowercase, $stripRN, $defaultBRText, $defaultSpanText); - // strip out comments - $this->remove_noise("''is"); // strip out cdata $this->remove_noise("''is", true); + // strip out comments + $this->remove_noise("''is"); // Per sourceforge http://sourceforge.net/tracker/?func=detail&aid=2949097&group_id=218559&atid=1044037 // Script tags removal now preceeds style tag removal. // strip out