From 70c39d16185698c0cc937cc4104694cd97e36d33 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nicolas=20L=C5=93uillet?=
Date: Fri, 23 Aug 2013 21:07:32 +0200
Subject: [PATCH 15/54] tabs2spaces
---
inc/poche/Url.class.php | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/inc/poche/Url.class.php b/inc/poche/Url.class.php
index 36fdd0f..3c74fb4 100644
--- a/inc/poche/Url.class.php
+++ b/inc/poche/Url.class.php
@@ -65,13 +65,14 @@ class Url
$tidy = tidy_parse_string($html, array(), 'UTF8');
$tidy->cleanRepair();
- //Warning: tidy might fail so, ensure there is still a content
- $body = $tidy->body();
+ //Warning: tidy might fail so, ensure there is still a content
+ $body = $tidy->body();
- //hasChildren does not seem to work, just check the string
- //returned (and do not forget to clean the white spaces)
- if (preg_replace('/\s+/', '', $body->value) !== "")
- $html = $tidy->value;
+ //hasChildren does not seem to work, just check the string
+ //returned (and do not forget to clean the white spaces)
+ if (preg_replace('/\s+/', '', $body->value) !== "") {
+ $html = $tidy->value;
+ }
}
$parameters = array();
From b48fd706b72ddfd08ecf866e6b99c4733abb9ed6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nicolas=20L=C5=93uillet?=
Date: Fri, 23 Aug 2013 21:16:37 +0200
Subject: [PATCH 16/54] assets directory
---
assets/.gitignore | 0
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100755 assets/.gitignore
diff --git a/assets/.gitignore b/assets/.gitignore
new file mode 100755
index 0000000..e69de29
From 8be8c44596247fc7d9345a53ed0217dfcdcce6ca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nicolas=20L=C5=93uillet?=
Date: Fri, 23 Aug 2013 21:17:41 +0200
Subject: [PATCH 17/54] gitignore
---
.gitignore | 2 ++
cache/.gitignore | 1 -
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index d190a8b..25818a8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
+assets/*
+cache/*
vendor
composer.phar
db/poche.sqlite
diff --git a/cache/.gitignore b/cache/.gitignore
index f59ec20..e69de29 100644
--- a/cache/.gitignore
+++ b/cache/.gitignore
@@ -1 +0,0 @@
-*
\ No newline at end of file
From b64a882696ba6c403c36f9434230fc636741b7d1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nicolas=20L=C5=93uillet?=
Date: Fri, 23 Aug 2013 21:30:55 +0200
Subject: [PATCH 18/54] notice with poche_version undefined'
---
inc/poche/Tools.class.php | 31 +++++++++++++------------------
1 file changed, 13 insertions(+), 18 deletions(-)
diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php
index 1baf745..52d0f2d 100644
--- a/inc/poche/Tools.class.php
+++ b/inc/poche/Tools.class.php
@@ -238,25 +238,20 @@ class Tools
public static function createMyConfig()
{
$myconfig_file = './inc/poche/myconfig.inc.php';
+
+ if (!is_writable('./inc/poche/')) {
+ self::logm('you don\'t have write access to create ./inc/poche/myconfig.inc.php');
+ die('You don\'t have write access to create ./inc/poche/myconfig.inc.php.');
+ }
- if (version_compare(POCHE_VERSION, '1.0-beta3') == 1) {
- # $myconfig_file is only created with poche > 1.0-beta3
- # in 1.0-beta3, the update script creates $myconfig_file
-
- if (!is_writable('./inc/poche/')) {
- self::logm('you don\'t have write access to create ./inc/poche/myconfig.inc.php');
- die('You don\'t have write access to create ./inc/poche/myconfig.inc.php.');
- }
-
- if (!file_exists($myconfig_file))
- {
- $fp = fopen($myconfig_file, 'w');
- fwrite($fp, '
Date: Fri, 23 Aug 2013 22:01:17 +0200
Subject: [PATCH 19/54] fix bug #162 links to firefox / chrome / android apps
---
tpl/config.twig | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/tpl/config.twig b/tpl/config.twig
index 5324cda..8851c3d 100644
--- a/tpl/config.twig
+++ b/tpl/config.twig
@@ -11,11 +11,17 @@
{% endblock %}
{% block content %}
-
{% trans "Bookmarklet" %}
-
{% trans "Thanks to the bookmarklet, you will be able to easily add a link to your poche." %} {% trans "Have a look to this documentation:" %} inthepoche.com.
-
{% trans "Drag & drop this link to your bookmarks bar and have fun with poche." %}
-
-
-
\ No newline at end of file
diff --git a/install/update_sqlite_from_0_to_1.php b/install/update_sqlite_from_0_to_1.php
deleted file mode 100644
index 299abf4..0000000
--- a/install/update_sqlite_from_0_to_1.php
+++ /dev/null
@@ -1,72 +0,0 @@
-setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
-
-# Requêtes à exécuter pour mettre à jour poche.sqlite en 1.x
-
-# ajout d'un champ user_id sur la table entries
-$sql = 'ALTER TABLE entries RENAME TO tempEntries;';
-$query = $handle->prepare($sql);
-$query->execute();
-
-$sql = 'CREATE TABLE entries (id INTEGER PRIMARY KEY, title TEXT, url TEXT, is_read NUMERIC DEFAULT 0, is_fav NUMERIC DEFAULT 0, content BLOB, user_id NUMERIC);';
-$query = $handle->prepare($sql);
-$query->execute();
-
-$sql = 'INSERT INTO entries (id, title, url, is_read, is_fav, content) SELECT id, title, url, is_read, is_fav, content FROM tempEntries;';
-$query = $handle->prepare($sql);
-$query->execute();
-
-# Update tout pour mettre user_id = 1
-$sql = 'UPDATE entries SET user_id = 1;';
-$query = $handle->prepare($sql);
-$query->execute();
-
-# Changement des flags pour les lus / favoris
-$sql = 'UPDATE entries SET is_read = 1 WHERE is_read = -1;';
-$query = $handle->prepare($sql);
-$query->execute();
-
-$sql = 'UPDATE entries SET is_fav = 1 WHERE is_fav = -1;';
-$query = $handle->prepare($sql);
-$query->execute();
-
-# Création de la table users
-$sql = 'CREATE TABLE users (id INTEGER PRIMARY KEY, username TEXT, password TEXT, name TEXT, email TEXT);';
-$query = $handle->prepare($sql);
-$query->execute();
-
-$sql = 'INSERT INTO users (username) SELECT value FROM config WHERE name = "login";';
-$query = $handle->prepare($sql);
-$query->execute();
-
-$sql = "UPDATE users SET password = (SELECT value FROM config WHERE name = 'password')";
-$query = $handle->prepare($sql);
-$query->execute();
-
-# Création de la table users_config
-$sql = 'CREATE TABLE users_config (id INTEGER PRIMARY KEY, user_id NUMERIC, name TEXT, value TEXT);';
-$query = $handle->prepare($sql);
-$query->execute();
-
-$sql = 'INSERT INTO users_config (user_id, name, value) VALUES (1, "pager", "10");';
-$query = $handle->prepare($sql);
-$query->execute();
-
-$sql = 'INSERT INTO users_config (user_id, name, value) VALUES (1, "language", "en_EN.UTF8");';
-$query = $handle->prepare($sql);
-$query->execute();
-
-# Suppression de la table temporaire
-$sql = 'DROP TABLE tempEntries;';
-$query = $handle->prepare($sql);
-$query->execute();
-
-# Vidage de la table de config
-$sql = 'DELETE FROM config;';
-$query = $handle->prepare($sql);
-$query->execute();
-
-echo 'welcome to poche 1.0 !';
\ No newline at end of file
diff --git a/tpl/config.twig b/tpl/config.twig
index 5324cda..9f2fe5a 100644
--- a/tpl/config.twig
+++ b/tpl/config.twig
@@ -14,15 +14,14 @@
{% trans "Bookmarklet" %}
{% trans "Thanks to the bookmarklet, you will be able to easily add a link to your poche." %} {% trans "Have a look to this documentation:" %} inthepoche.com.
{% trans "Drag & drop this link to your bookmarks bar and have fun with poche." %}