aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xTRANSLATION.md30
-rwxr-xr-x[-rw-r--r--]check_setup.php5
-rw-r--r--inc/3rdparty/site_config/custom/blogs.faz.net.txt45
-rw-r--r--[-rwxr-xr-x]inc/3rdparty/site_config/standard/faz.net.txt117
-rwxr-xr-xinc/poche/Database.class.php8
-rwxr-xr-xinc/poche/Poche.class.php86
-rwxr-xr-xinc/poche/Routing.class.php2
-rwxr-xr-xinc/poche/Tools.class.php19
-rw-r--r--inc/poche/WallabagEpub.class.php8
-rwxr-xr-xinc/poche/config.inc.default.php2
-rw-r--r--inc/poche/pochePictures.php2
-rwxr-xr-xindex.php2
-rwxr-xr-xinstall/index.php10
-rw-r--r--locale/en_EN.utf8/LC_MESSAGES/en_EN.utf8.mobin11884 -> 12917 bytes
-rw-r--r--locale/en_EN.utf8/LC_MESSAGES/en_EN.utf8.po99
-rw-r--r--locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mobin16343 -> 16505 bytes
-rw-r--r--locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.po13
-rwxr-xr-xthemes/baggy/_pocheit-form.twig2
-rwxr-xr-xthemes/baggy/config.twig14
-rwxr-xr-xthemes/baggy/css/main.css4
-rwxr-xr-xthemes/courgette/config.twig6
-rwxr-xr-xthemes/default/config.twig9
-rw-r--r--wallabag_compatibility_test.php111
23 files changed, 401 insertions, 193 deletions
diff --git a/TRANSLATION.md b/TRANSLATION.md
index 2e38d5cc..a033662c 100755
--- a/TRANSLATION.md
+++ b/TRANSLATION.md
@@ -1,10 +1,10 @@
1# How to manage translations of wallabag 1# How to manage translations for wallabag
2 2
3This guide will describe procedure of translation management of wallabag web application. 3This guide will describe the procedure of translation management of the wallabag web application.
4 4
5All translation are made using [gettext](http://en.wikipedia.org/wiki/Gettext) system and tools. 5All translations are made using [gettext](http://en.wikipedia.org/wiki/Gettext) system and tools.
6 6
7You will need [Poedit](http://www.poedit.net/download.php) editor to update, edit and create your translation files comfortably. In general, you can handle translations also without it: all can be done using gettext tools and your favorite plain text editor only. This guide, however, describes editing with Poedit. If you want to use gettext only, pls refer to xgettext manual page to update po files from sources (see also how it is used by Poedit below) and use msgunfmt tool to compile .mo files manually. 7You will need the [Poedit](http://www.poedit.net/download.php) editor to update, edit and create your translation files easily. However, you can also handle translations also without it: all can be done using gettext tools and your favorite plain text editor only. This guide, however, describes editing with Poedit. If you want to use gettext only, please refer to the xgettext manual page to update po files from sources (see also how it is used by Poedit below) and use msgunfmt tool to compile .mo files manually.
8 8
9You need to know, that translation phrases are stored in **".po"** files (for example: `locale/pl_PL.utf8/LC_MESSAGES/pl_PL.utf8.po`), which are then complied in **".mo"** files using **msgfmt** gettext tool or by Poedit, which will run msgfmt for you in background. 9You need to know, that translation phrases are stored in **".po"** files (for example: `locale/pl_PL.utf8/LC_MESSAGES/pl_PL.utf8.po`), which are then complied in **".mo"** files using **msgfmt** gettext tool or by Poedit, which will run msgfmt for you in background.
10 10
@@ -22,7 +22,7 @@ go to root of your installation of wallabag project and run next command:
22 22
23`rm -rf ./cache/*` 23`rm -rf ./cache/*`
24 24
25(this may require root privileges if you run, for example Apatche web server with mod_php) 25(this may require root privileges if you run, for example Apache web server with mod_php)
26 26
27### 2. Generate php files from all twig templates 27### 2. Generate php files from all twig templates
28Do this using next command: 28Do this using next command:
@@ -31,37 +31,37 @@ Do this using next command:
31 31
32OR 32OR
33 33
34from your browser: **http://your-wallabag-host.com/locale/tools/fillCache.php** (this may require removal of .htacces file in locale/ directory). 34from your browser: **http://your-wallabag-host.com/locale/tools/fillCache.php** (this may require removal of .htaccess file in locale/ directory).
35 35
36### 3. Configure your Poedit 36### 3. Configure your Poedit
37Open Poedit editor, open Edit->Preferences. Go to "Parsers" tab, click on PHP and press "Edit" button. Make sure your "Parser command:" looks like 37Open Poedit editor, open Edit->Preferences. Go to "Parsers" tab, click on PHP and press "Edit" button. Make sure your "Parser command:" looks like
38 38
39`xgettext --no-location --force-po -o %o %C %K %F` 39`xgettext --no-location --force-po -o %o %C %K %F`
40 40
41Usualy it is required to add "--no-location" to default value. 41Usually it is required to add "--no-location" to default value.
42 42
43### 4. Open .po file you want to edit in Poedit and change it's settings 43### 4. Open .po file you want to edit in Poedit and change its settings
44Open, for example `locale/pl_PL.utf8/LC_MESSAGES/pl_PL.utf8.po` file in your Poedit. 44Open, for example `locale/pl_PL.utf8/LC_MESSAGES/pl_PL.utf8.po` file in your Poedit.
45 45
46Go to "Catalog"->"Settings..." menu. Go to "Path" tab and add path to wallabag installaion in your local file system. This step can't be ommited as you will not be able to update phrases otherwise. 46Go to "Catalog"->"Settings..." menu. Then go to "Path" tab and add path to wallabag installation in your local file system. This step can't be omitted as you will not be able to update phrases otherwise.
47 47
48You can also check "project into" tab to be sure, that "Language" is set correctly (this will allow you to spell check your translation). 48You can also check "project into" tab to be sure, that "Language" is set correctly (this will allow you to spell check your translation).
49 49
50### 5. Update opened .po file from sources 50### 5. Update opened .po file from sources
51Once you have set your path correctly, you are able to update phrases from sources. Press "Update catalog - synchronize it with sources" button or go to "Catalog"->"Update from sources" menu. 51Once you have set your path correctly, you are able to update phrases from sources. Press "Update catalog - synchronize it with sources" button or go to "Catalog"->"Update from sources" menu.
52 52
53As a result you will see confirmation popup with two tabs: "New strings" and "Obsolete strings". Pls review and accept changes (or press "Undo" if you see too many obsolete strings, as Poedit will remove them all - in this case please make sure all previous steps are performed w/o errors). 53As a result you will see confirmation popup with two tabs: "New strings" and "Obsolete strings". Please review and accept changes (or press "Undo" if you see too many obsolete strings, as Poedit will remove them all - in this case please make sure all previous steps are performed w/o errors).
54 54
55### 6. Translate and save your .po file 55### 6. Translate and save your .po file
56If you have any dificulties on this step, please consult with Poedit manual. 56If you have any difficulties on this step, please consult with Poedit manual.
57Every time you save your .po file, Poedit will also comple appropriate .mo file by default (of course, if not disabled in preferences). 57Every time you save your .po file, Poedit will also compile appropriate .mo file by default (of course, if not disabled in preferences).
58 58
59So, you are almost done. 59You are now almost done.
60 60
61### 7. Clear cache again 61### 7. Clear cache again
62This step may be required if your web server runs php scripts in name of, say, www user (i.e. Apache with mod_php, not cgi). 62This step may be required if your web server runs php scripts in name of, say, www user (i.e. Apache with mod_php, not cgi).
63 63
64 64
65##To create new translation 65##To create new translation
66Please simple create appropriate directories in locale folder and perform all steps, described above. Instead of opening an existing file just create new one. 66You just have to copy the folder corresponding to the language you want to translate from, change language in the project settings and for the folder and files names. Then start replacing all existing translations with your own.
67 67
diff --git a/check_setup.php b/check_setup.php
index 7e378b15..cf02c34b 100644..100755
--- a/check_setup.php
+++ b/check_setup.php
@@ -5,11 +5,6 @@ if (! is_writable('cache')) {
5 die('The directory "cache" must be writeable by your web server user'); 5 die('The directory "cache" must be writeable by your web server user');
6} 6}
7 7
8// Check if /db is writeable
9if (! is_writable('db') && STORAGE === 'sqlite') {
10 die('The directory "db" must be writeable by your web server user');
11}
12
13// install folder still present, need to install wallabag 8// install folder still present, need to install wallabag
14if (is_dir('install')) { 9if (is_dir('install')) {
15 require('install/index.php'); 10 require('install/index.php');
diff --git a/inc/3rdparty/site_config/custom/blogs.faz.net.txt b/inc/3rdparty/site_config/custom/blogs.faz.net.txt
new file mode 100644
index 00000000..4f2626f1
--- /dev/null
+++ b/inc/3rdparty/site_config/custom/blogs.faz.net.txt
@@ -0,0 +1,45 @@
1# Author: zinnober
2
3tidy: no
4prune: no
5
6# Set author
7author: //a[@rel='author']
8
9# Set date
10date: //span[@class='Datum']
11
12# Content is here
13body: //div[@class='Artikel']
14
15# Tidy up before article
16strip: //div[@id='FAZHeaderNeu']
17strip: //h2[@itemprop='headline']
18strip: //span[@class='Datum']
19strip: //span[@class='Autor']
20strip_id_or_class: ArticlePagerTop
21strip: //div[@class='FAZArtikelEinleitung']/h2
22
23# General cleanup
24strip: //div[@class='clear']
25strip: //span[@class='Bildnachweis']
26strip: //iframe
27strip_id_or_class: Community
28strip: ' ยท '
29
30# Remove tracking and ads
31strip_image_src: /l.gif?
32strip: //img[@width='1']
33strip_id_or_class: invisible
34strip_id_or_class: Anzeige
35strip_id_or_class: billboard
36
37# Remove clutter after article
38strip_id_or_class: Tagline
39strip_id_or_class: ArtikelAbbinder
40strip_id_or_class: FAZArtikelKommentare
41strip_id_or_class: ArtikelKommentieren
42strip_id_or_class: FAZContentRight
43
44# Try it yourself
45test_url: http://blogs.faz.net/wost/2014/08/17/viel-fuck-und-wenig-guter-sex-1239/
diff --git a/inc/3rdparty/site_config/standard/faz.net.txt b/inc/3rdparty/site_config/standard/faz.net.txt
index d087d2aa..47048a1b 100755..100644
--- a/inc/3rdparty/site_config/standard/faz.net.txt
+++ b/inc/3rdparty/site_config/standard/faz.net.txt
@@ -1,36 +1,101 @@
1# Author: zinnober
2# Complete rewrite of the faz.net template as the standard one is broken
3# I tried to consider as many page variants as possible, which was some serious work
4
5tidy: no
6prune: no
7
1# Title 8# Title
2title: //p[@class='Content HeadlineShort'] 9title: //p[@class='Content HeadlineShort']
3 10
4# Authors 11# Set author
5# some are known and have a link, others don't 12author: substring-after(//span[@class='Autor'], 'von ')
6author: substring-after(//span[@class='Autor'], 'Von') 13author: //span[@class='caps last']/span[@class='caps last']
14author: //a[@rel='author']
7 15
8# Date 16# Set date
9date: //span[@class='Datum'] 17date: //span[@class='Datum']
18date: //span[@class='Datum'],/span
19
20# Fetch full multipage articles
21next_page_link: //a[@title='Nรคchste Seite']
10 22
11# Body 23# Content is here
12body: //div[@class='Artikel'] 24body: //div[@class='Artikel']
13 25
14# Removements before body text 26# Tidy up before article
15strip: //div[@class='Breadcrumbs'] 27strip: //div[@id='FAZHeaderNeu']
16strip: //div[@class='QuickSearchBox'] 28strip: //h2[@itemprop='headline']
17strip: //div[@class='FAZArtikelEinleitung'] 29strip: //span[@class='Datum']
18strip: //div[@class='FAZArtikelReiter'] 30strip: //span[@class='Autor']
31strip_id_or_class: ArticlePagerTop
32
33# General cleanup
19strip: //div[@class='clear'] 34strip: //div[@class='clear']
35strip: //a[@title='Zur Homepage FAZ.NET']
36strip: //iframe
37replace_string( ยท ):
38
39# Remove tracking and ads
40strip_image_src: /l.gif?
41strip: //div[contains(@style, 'background-image')]
42strip: //img[@width='1']
43strip_id_or_class: invisible
44strip_id_or_class: Anzeige
45strip_id_or_class: billboard
46
47# Remove various text boxes and social media foo
48strip_id_or_class: WeitereBeitraege
49strip_id_or_class: WBListe
50strip_id_or_class: AutorenModul
51strip_id_or_class: Community
52strip_id_or_class: SocialMediaStatus
53strip_id_or_class: RelatedLinkBox
54strip_id_or_class: MultimediaNavigation
55strip_id_or_class: IndexTitel
56
57# Fix picture caps and pictures (use better resolution and remove clutter)
58strip_id_or_class: LightBoxOverlay
59strip_id_or_class: exitLarge
60strip_id_or_class: PagerBox
61strip_id_or_class: Bildnachweis
62strip_id_or_class: Bildueberschrift
63strip_id_or_class: Bildbeschreibung
64strip_id_or_class: ArtikelBild610
65strip_id_or_class: MediaLink
66strip_id_or_class: FotoBoxInnerLeft
67strip_id_or_class: BilderRelatedLinks
68
69# Remove clutter after article
70strip_id_or_class: ArticlePagerBottom
71strip_id_or_class: backToHome
72strip_id_or_class: ArtikelAbbinder
73strip_id_or_class: lesermeinungscontainer
74strip_id_or_class: ThemenLinks
75strip_id_or_class: rechtehinweis
76strip_id_or_class: FAZArtikelMap
77strip_id_or_class: FAZArtikelKommentare
78strip_id_or_class: ArtikelKommentieren
79strip_id_or_class: FAZArtikelFunktionen
80strip_id_or_class: mailLB
81strip_id_or_class: FAZContentRight
82strip_id_or_class: stageModule
83strip_id_or_class: ContentFooter
84strip_id_or_class: ServicesFooter
85strip_id_or_class: FAZFooter
86
87# Clean up stuff present just in some articles
88strip_id_or_class: Teaser620
89strip_id_or_class: TeaserMultimedia
90strip_id_or_class: VideoBox
91
92# Remove as soon as Wallabag maight be able to embed flash video
93strip_id_or_class: mmoObjectAsTeaserInArticle
94strip_id_or_class: additionalStylesAudioVideo
95strip_id_or_class: hideMMElements
96
97# Try it yourself
98test_url: http://www.faz.net/aktuell/feuilleton/zum-tod-von-margaret-thatcher-die-reizfigur-12141919.html#Drucken
99test_url: http://www.faz.net/aktuell/politik/inland/allensbach-analyse-im-namen-des-volkes-13106492.html
100test_url: http://www.faz.net/aktuell/feuilleton/kino/video-filmkritiken/video-filmkritik-when-animals-dream-zerrissene-jugend-13105772.html
20 101
21# General removements
22strip: //span[@class='Bildnachweis']
23strip: //img[@class='MediaIcon']
24strip: //div[@class='ArtikelMediaLink']
25dissolve: //a[img]
26
27# Removements after body text
28strip: //div[@class='ArtikelAbbinder']
29strip: //div[@class='ArtikelKommentieren Artikelfuss GETS;tk;boxen.top-lesermeinungen;tp;content']
30strip: //div[@class='FAZArtikelKommentare FAZArtikelContent']
31strip: //div[@class='FAZArtikelFunktionen']
32strip: //div[@id='FAZContentRight']
33
34# Fix picture captions
35wrap_in(small): //span[@class='Bildunterschrift']/text()
36test_url: http://www.faz.net/aktuell/feuilleton/zum-tod-von-margaret-thatcher-die-reizfigur-12141919.html#Drucken \ No newline at end of file
diff --git a/inc/poche/Database.class.php b/inc/poche/Database.class.php
index 2c80b64b..b5dd2120 100755
--- a/inc/poche/Database.class.php
+++ b/inc/poche/Database.class.php
@@ -23,6 +23,10 @@ class Database {
23 { 23 {
24 switch (STORAGE) { 24 switch (STORAGE) {
25 case 'sqlite': 25 case 'sqlite':
26 // Check if /db is writeable
27 if ( !is_writable(STORAGE_SQLITE) || !is_writable(dirname(STORAGE_SQLITE))) {
28 die('An error occured: "db" directory must be writeable for your web server user!');
29 }
26 $db_path = 'sqlite:' . STORAGE_SQLITE; 30 $db_path = 'sqlite:' . STORAGE_SQLITE;
27 $this->handle = new PDO($db_path); 31 $this->handle = new PDO($db_path);
28 break; 32 break;
@@ -113,10 +117,10 @@ class Database {
113 $query = $this->executeQuery($sql, array()); 117 $query = $this->executeQuery($sql, array());
114 } 118 }
115 119
116 public function install($login, $password) 120 public function install($login, $password, $email = '')
117 { 121 {
118 $sql = 'INSERT INTO users ( username, password, name, email) VALUES (?, ?, ?, ?)'; 122 $sql = 'INSERT INTO users ( username, password, name, email) VALUES (?, ?, ?, ?)';
119 $params = array($login, $password, $login, ' '); 123 $params = array($login, $password, $login, $email);
120 $query = $this->executeQuery($sql, $params); 124 $query = $this->executeQuery($sql, $params);
121 125
122 $sequence = ''; 126 $sequence = '';
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php
index 098dd7c1..8cebafa3 100755
--- a/inc/poche/Poche.class.php
+++ b/inc/poche/Poche.class.php
@@ -74,12 +74,13 @@ class Poche
74 /** 74 /**
75 * Creates a new user 75 * Creates a new user
76 */ 76 */
77 public function createNewUser($username, $password) 77 public function createNewUser($username, $password, $email = "")
78 { 78 {
79 if (!empty($username) && !empty($password)){ 79 if (!empty($username) && !empty($password)){
80 $newUsername = filter_var($username, FILTER_SANITIZE_STRING); 80 $newUsername = filter_var($username, FILTER_SANITIZE_STRING);
81 $email = filter_var($email, FILTER_SANITIZE_STRING);
81 if (!$this->store->userExists($newUsername)){ 82 if (!$this->store->userExists($newUsername)){
82 if ($this->store->install($newUsername, Tools::encodeString($password . $newUsername))) { 83 if ($this->store->install($newUsername, Tools::encodeString($password . $newUsername), $email)) {
83 Tools::logm('The new user ' . $newUsername . ' has been installed'); 84 Tools::logm('The new user ' . $newUsername . ' has been installed');
84 $this->messages->add('s', sprintf(_('The new user %s has been installed. Do you want to <a href="?logout">logout ?</a>'), $newUsername)); 85 $this->messages->add('s', sprintf(_('The new user %s has been installed. Do you want to <a href="?logout">logout ?</a>'), $newUsername));
85 Tools::redirect(); 86 Tools::redirect();
@@ -524,6 +525,14 @@ class Poche
524 $longlastingsession = isset($_POST['longlastingsession']); 525 $longlastingsession = isset($_POST['longlastingsession']);
525 $passwordTest = ($isauthenticated) ? $user['password'] : Tools::encodeString($password . $login); 526 $passwordTest = ($isauthenticated) ? $user['password'] : Tools::encodeString($password . $login);
526 Session::login($user['username'], $user['password'], $login, $passwordTest, $longlastingsession, array('poche_user' => new User($user))); 527 Session::login($user['username'], $user['password'], $login, $passwordTest, $longlastingsession, array('poche_user' => new User($user)));
528
529 # reload l10n
530 $language = $user['config']['language'];
531 @putenv('LC_ALL=' . $language);
532 setlocale(LC_ALL, $language);
533 bindtextdomain($language, LOCALE);
534 textdomain($language);
535
527 $this->messages->add('s', _('welcome to your wallabag')); 536 $this->messages->add('s', _('welcome to your wallabag'));
528 Tools::logm('login successful'); 537 Tools::logm('login successful');
529 Tools::redirect($referer); 538 Tools::redirect($referer);
@@ -551,42 +560,39 @@ class Poche
551 * import datas into your wallabag 560 * import datas into your wallabag
552 * @return boolean 561 * @return boolean
553 */ 562 */
554 public function import()
555 {
556 if (isset($_FILES['file'])) {
557 Tools::logm('Import stated: parsing file');
558
559 // assume, that file is in json format
560
561 $str_data = file_get_contents($_FILES['file']['tmp_name']);
562 $data = json_decode($str_data, true);
563 if ($data === null) {
564
565 // not json - assume html
566
567 $html = new simple_html_dom();
568 $html->load_file($_FILES['file']['tmp_name']);
569 $data = array();
570 $read = 0;
571 foreach(array('ol','ul') as $list) {
572 foreach($html->find($list) as $ul) {
573 foreach($ul->find('li') as $li) {
574 $tmpEntry = array();
575 $a = $li->find('a');
576 $tmpEntry['url'] = $a[0]->href;
577 $tmpEntry['tags'] = $a[0]->tags;
578 $tmpEntry['is_read'] = $read;
579 if ($tmpEntry['url']) {
580 $data[] = $tmpEntry;
581 }
582 }
583
584 // the second <ol/ul> is for read links
585 563
586 $read = ((sizeof($data) && $read) ? 0 : 1); 564 public function import() {
587 } 565
588 } 566 if ( isset($_FILES['file']) && $_FILES['file']['tmp_name'] ) {
567 Tools::logm('Import stated: parsing file');
568
569 // assume, that file is in json format
570 $str_data = file_get_contents($_FILES['file']['tmp_name']);
571 $data = json_decode($str_data, true);
572
573 if ( $data === null ) {
574 //not json - assume html
575 $html = new simple_html_dom();
576 $html->load_file($_FILES['file']['tmp_name']);
577 $data = array();
578 $read = 0;
579 foreach (array('ol','ul') as $list) {
580 foreach ($html->find($list) as $ul) {
581 foreach ($ul->find('li') as $li) {
582 $tmpEntry = array();
583 $a = $li->find('a');
584 $tmpEntry['url'] = $a[0]->href;
585 $tmpEntry['tags'] = $a[0]->tags;
586 $tmpEntry['is_read'] = $read;
587 if ($tmpEntry['url']) {
588 $data[] = $tmpEntry;
589 }
590 }
591 # the second <ol/ul> is for read links
592 $read = ((sizeof($data) && $read)?0:1);
589 } 593 }
594 }
595 }
590 596
591 // for readability structure 597 // for readability structure
592 598
@@ -629,9 +635,11 @@ class Poche
629 $this->messages->add('s', _('Articles inserted: ') . $i . _('. Please note, that some may be marked as "read".')); 635 $this->messages->add('s', _('Articles inserted: ') . $i . _('. Please note, that some may be marked as "read".'));
630 } 636 }
631 637
632 Tools::logm('Import of articles finished: ' . $i . ' articles added (w/o content if not provided).'); 638 Tools::logm('Import of articles finished: '.$i.' articles added (w/o content if not provided).');
633 } 639 }
634 640 else {
641 $this->messages->add('s', _('Did you forget to select a file?'));
642 }
635 // file parsing finished here 643 // file parsing finished here
636 // now download article contents if any 644 // now download article contents if any
637 // check if we need to download any content 645 // check if we need to download any content
diff --git a/inc/poche/Routing.class.php b/inc/poche/Routing.class.php
index 004bd45a..0b373058 100755
--- a/inc/poche/Routing.class.php
+++ b/inc/poche/Routing.class.php
@@ -124,8 +124,6 @@ class Routing
124 } elseif (isset($_GET['import'])) { 124 } elseif (isset($_GET['import'])) {
125 $import = $this->wallabag->import(); 125 $import = $this->wallabag->import();
126 $tplVars = array_merge($this->vars, $import); 126 $tplVars = array_merge($this->vars, $import);
127 } elseif (isset($_GET['download'])) {
128 Tools::downloadDb();
129 } elseif (isset($_GET['empty-cache'])) { 127 } elseif (isset($_GET['empty-cache'])) {
130 Tools::emptyCache(); 128 Tools::emptyCache();
131 } elseif (isset($_GET['export'])) { 129 } elseif (isset($_GET['export'])) {
diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php
index 63137d76..93ec3fc6 100755
--- a/inc/poche/Tools.class.php
+++ b/inc/poche/Tools.class.php
@@ -54,6 +54,10 @@ final class Tools
54 || ($https && $_SERVER["SERVER_PORT"] == '443') 54 || ($https && $_SERVER["SERVER_PORT"] == '443')
55 || ($https && $_SERVER["SERVER_PORT"]==SSL_PORT) //Custom HTTPS port detection 55 || ($https && $_SERVER["SERVER_PORT"]==SSL_PORT) //Custom HTTPS port detection
56 ? '' : ':' . $_SERVER["SERVER_PORT"]); 56 ? '' : ':' . $_SERVER["SERVER_PORT"]);
57
58 if (isset($_SERVER["HTTP_X_FORWARDED_PORT"])) {
59 $serverport = ':' . $_SERVER["HTTP_X_FORWARDED_PORT"];
60 }
57 61
58 $scriptname = str_replace('/index.php', '/', $_SERVER["SCRIPT_NAME"]); 62 $scriptname = str_replace('/index.php', '/', $_SERVER["SCRIPT_NAME"]);
59 63
@@ -295,21 +299,6 @@ final class Tools
295 } 299 }
296 300
297 /** 301 /**
298 * Download the sqlite database
299 */
300 public static function downloadDb()
301 {
302 header('Content-Disposition: attachment; filename="poche.sqlite.gz"');
303 self::_status(200);
304
305 header('Content-Transfer-Encoding: binary');
306 header('Content-Type: application/octet-stream');
307 echo gzencode(file_get_contents(STORAGE_SQLITE));
308
309 exit;
310 }
311
312 /**
313 * Get the content for a given URL (by a call to FullTextFeed) 302 * Get the content for a given URL (by a call to FullTextFeed)
314 * 303 *
315 * @param Url $url 304 * @param Url $url
diff --git a/inc/poche/WallabagEpub.class.php b/inc/poche/WallabagEpub.class.php
index b81d9bfd..9c4d3566 100644
--- a/inc/poche/WallabagEpub.class.php
+++ b/inc/poche/WallabagEpub.class.php
@@ -12,14 +12,12 @@ class WallabagEpub
12{ 12{
13 protected $wallabag; 13 protected $wallabag;
14 protected $method; 14 protected $method;
15 protected $id;
16 protected $value; 15 protected $value;
17 16
18 public function __construct(Poche $wallabag, $method, $id, $value) 17 public function __construct(Poche $wallabag, $method, $value)
19 { 18 {
20 $this->wallabag = $wallabag; 19 $this->wallabag = $wallabag;
21 $this->method = $method; 20 $this->method = $method;
22 $this->id = $id;
23 $this->value = $value; 21 $this->value = $value;
24 } 22 }
25 23
@@ -30,7 +28,7 @@ class WallabagEpub
30 { 28 {
31 switch ($this->method) { 29 switch ($this->method) {
32 case 'id': 30 case 'id':
33 $entryID = filter_var($this->id, FILTER_SANITIZE_NUMBER_INT); 31 $entryID = filter_var($this->value, FILTER_SANITIZE_NUMBER_INT);
34 $entry = $this->wallabag->store->retrieveOneById($entryID, $this->wallabag->user->getId()); 32 $entry = $this->wallabag->store->retrieveOneById($entryID, $this->wallabag->user->getId());
35 $entries = array($entry); 33 $entries = array($entry);
36 $bookTitle = $entry['title']; 34 $bookTitle = $entry['title'];
@@ -87,7 +85,7 @@ class WallabagEpub
87 $log->logLine("getCurrentServerURL: " . $book->getCurrentServerURL()); 85 $log->logLine("getCurrentServerURL: " . $book->getCurrentServerURL());
88 $log->logLine("getCurrentPageURL..: " . $book->getCurrentPageURL()); 86 $log->logLine("getCurrentPageURL..: " . $book->getCurrentPageURL());
89 87
90 $book->setTitle(_('wallabag\'s articles')); 88 $book->setTitle($bookTitle);
91 $book->setIdentifier("http://$_SERVER[HTTP_HOST]", EPub::IDENTIFIER_URI); // Could also be the ISBN number, prefered for published books, or a UUID. 89 $book->setIdentifier("http://$_SERVER[HTTP_HOST]", EPub::IDENTIFIER_URI); // Could also be the ISBN number, prefered for published books, or a UUID.
92 //$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. 90 //$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.
93 $book->setDescription(_("Some articles saved on my wallabag")); 91 $book->setDescription(_("Some articles saved on my wallabag"));
diff --git a/inc/poche/config.inc.default.php b/inc/poche/config.inc.default.php
index 6f03af18..2a458544 100755
--- a/inc/poche/config.inc.default.php
+++ b/inc/poche/config.inc.default.php
@@ -59,7 +59,7 @@
59@define ('LOCALE', ROOT . '/locale'); 59@define ('LOCALE', ROOT . '/locale');
60@define ('CACHE', ROOT . '/cache'); 60@define ('CACHE', ROOT . '/cache');
61 61
62@define ('PAGINATION', '10'); 62@define ('PAGINATION', '12');
63 63
64//limit for download of articles during import 64//limit for download of articles during import
65@define ('IMPORT_LIMIT', 5); 65@define ('IMPORT_LIMIT', 5);
diff --git a/inc/poche/pochePictures.php b/inc/poche/pochePictures.php
index 7a914f90..52394c70 100644
--- a/inc/poche/pochePictures.php
+++ b/inc/poche/pochePictures.php
@@ -33,7 +33,7 @@ final class Picture
33 } 33 }
34 34
35 if (self::_downloadPictures($absolute_path, $fullpath) === true) { 35 if (self::_downloadPictures($absolute_path, $fullpath) === true) {
36 $content = str_replace($matches[$i][2], $fullpath, $content); 36 $content = str_replace($matches[$i][2], Tools::getPocheUrl() . $fullpath, $content);
37 } 37 }
38 38
39 $processing_pictures[] = $absolute_path; 39 $processing_pictures[] = $absolute_path;
diff --git a/index.php b/index.php
index f191d7e7..39990d55 100755
--- a/index.php
+++ b/index.php
@@ -10,8 +10,8 @@
10 10
11define ('POCHE', '1.8.0'); 11define ('POCHE', '1.8.0');
12require 'check_essentials.php'; 12require 'check_essentials.php';
13require_once 'inc/poche/global.inc.php';
14require 'check_setup.php'; 13require 'check_setup.php';
14require_once 'inc/poche/global.inc.php';
15 15
16// Start session 16// Start session
17Session::$sessionName = 'wallabag'; 17Session::$sessionName = 'wallabag';
diff --git a/install/index.php b/install/index.php
index 1ae782a2..e3965e97 100755
--- a/install/index.php
+++ b/install/index.php
@@ -141,16 +141,16 @@ else if (isset($_POST['install'])) {
141 } 141 }
142 142
143 // create database structure 143 // create database structure
144 $query = executeQuery($handle, $sql_structure, array()); 144 $query = $handle->exec($sql_structure);
145 145
146 // Create user 146 // Create user
147 $handle->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 147 $handle->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
148 148
149 $sql = 'INSERT INTO users (username, password, name) VALUES (?, ?, ?)'; 149 $sql = "INSERT INTO users (username, password, name, email) VALUES (?, ?, ?, '')";
150 $params = array($username, $salted_password, $username); 150 $params = array($username, $salted_password, $username);
151 $query = executeQuery($handle, $sql, $params); 151 $query = executeQuery($handle, $sql, $params);
152 152
153 $id_user = $handle->lastInsertId(); 153 $id_user = (int)$handle->lastInsertId('users_id_seq');
154 154
155 $sql = 'INSERT INTO users_config ( user_id, name, value ) VALUES (?, ?, ?)'; 155 $sql = 'INSERT INTO users_config ( user_id, name, value ) VALUES (?, ?, ?)';
156 $params = array($id_user, 'pager', '10'); 156 $params = array($id_user, 'pager', '10');
@@ -292,9 +292,11 @@ php composer.phar install</code></pre></li>
292 <p> 292 <p>
293 <label for="password">Password</label> 293 <label for="password">Password</label>
294 <input type="password" required id="password" name="password" value="wallabag" /> 294 <input type="password" required id="password" name="password" value="wallabag" />
295 <label for="show">Show password:</label> <input style="margin-left:-80px;" name="show" id="show" type="checkbox" onchange="document.getElementById('password').type = this.checked ? 'text' : 'password'">
295 </p> 296 </p>
296 <p> 297 <p>
297 <label for="show">Show password:</label> <input name="show" id="show" type="checkbox" onchange="document.getElementById('password').type = this.checked ? 'text' : 'password'"> 298 <label for="email">Email (not required)</label>
299 <input type="email" id="email" name="email" />
298 </p> 300 </p>
299 </fieldset> 301 </fieldset>
300 302
diff --git a/locale/en_EN.utf8/LC_MESSAGES/en_EN.utf8.mo b/locale/en_EN.utf8/LC_MESSAGES/en_EN.utf8.mo
index bf5f69e7..1f729b60 100644
--- a/locale/en_EN.utf8/LC_MESSAGES/en_EN.utf8.mo
+++ b/locale/en_EN.utf8/LC_MESSAGES/en_EN.utf8.mo
Binary files differ
diff --git a/locale/en_EN.utf8/LC_MESSAGES/en_EN.utf8.po b/locale/en_EN.utf8/LC_MESSAGES/en_EN.utf8.po
index 119fb060..8292a196 100644
--- a/locale/en_EN.utf8/LC_MESSAGES/en_EN.utf8.po
+++ b/locale/en_EN.utf8/LC_MESSAGES/en_EN.utf8.po
@@ -4,16 +4,14 @@ msgstr ""
4"Report-Msgid-Bugs-To: \n" 4"Report-Msgid-Bugs-To: \n"
5"POT-Creation-Date: 2014-02-25 15:17+0300\n" 5"POT-Creation-Date: 2014-02-25 15:17+0300\n"
6"PO-Revision-Date: \n" 6"PO-Revision-Date: \n"
7"Last-Translator: Maryana <mariroz@mr.lviv.ua>\n" 7"Last-Translator: tcit <tcit@tcit.fr>\n"
8"Language-Team: \n" 8"Language-Team: \n"
9"Language: \n" 9"Language: en\n"
10"MIME-Version: 1.0\n" 10"MIME-Version: 1.0\n"
11"Content-Type: text/plain; charset=UTF-8\n" 11"Content-Type: text/plain; charset=UTF-8\n"
12"Content-Transfer-Encoding: 8bit\n" 12"Content-Transfer-Encoding: 8bit\n"
13"X-Generator: Poedit 1.5.4\n" 13"X-Generator: Poedit 1.6.4\n"
14"X-Poedit-Language: English\n"
15"X-Poedit-Basepath: .\n" 14"X-Poedit-Basepath: .\n"
16"X-Poedit-SearchPath-0: /home/mariroz/_DEV/web/wallabag/wallabag-master-testing\n"
17 15
18msgid "wallabag, a read it later open source system" 16msgid "wallabag, a read it later open source system"
19msgstr "wallabag, a read it later open source system" 17msgstr "wallabag, a read it later open source system"
@@ -84,8 +82,12 @@ msgstr "A more recent development version is available."
84msgid "Feeds" 82msgid "Feeds"
85msgstr "Feeds" 83msgstr "Feeds"
86 84
87msgid "Your feed token is currently empty and must first be generated to enable feeds. Click <a href='?feed&amp;action=generate'>here to generate it</a>." 85msgid ""
88msgstr "Your feed token is currently empty and must first be generated to enable feeds. Click <a href='?feed&amp;action=generate'>here to generate it</a>." 86"Your feed token is currently empty and must first be generated to enable "
87"feeds. Click <a href='?feed&amp;action=generate'>here to generate it</a>."
88msgstr ""
89"Your feed token is currently empty and must first be generated to enable "
90"feeds. Click <a href='?feed&amp;action=generate'>here to generate it</a>."
89 91
90msgid "Unread feed" 92msgid "Unread feed"
91msgstr "Unread feed" 93msgstr "Unread feed"
@@ -102,8 +104,12 @@ msgstr "Your token:"
102msgid "Your user id:" 104msgid "Your user id:"
103msgstr "Your user id:" 105msgstr "Your user id:"
104 106
105msgid "You can regenerate your token: <a href='?feed&amp;action=generate'>generate!</a>." 107msgid ""
106msgstr "You can regenerate your token: <a href='?feed&amp;action=generate'>generate!</a>." 108"You can regenerate your token: <a href='?feed&amp;action=generate'>generate!"
109"</a>."
110msgstr ""
111"You can regenerate your token: <a href='?feed&amp;action=generate'>generate!"
112"</a>."
107 113
108msgid "Change your theme" 114msgid "Change your theme"
109msgstr "Change your theme" 115msgstr "Change your theme"
@@ -135,8 +141,10 @@ msgstr "Repeat your new password:"
135msgid "Import" 141msgid "Import"
136msgstr "Import" 142msgstr "Import"
137 143
138msgid "Please execute the import script locally as it can take a very long time." 144msgid ""
139msgstr "Please execute the import script locally as it can take a very long time." 145"Please execute the import script locally as it can take a very long time."
146msgstr ""
147"Please execute the import script locally as it can take a very long time."
140 148
141msgid "More info in the official documentation:" 149msgid "More info in the official documentation:"
142msgstr "More info in the official documentation:" 150msgstr "More info in the official documentation:"
@@ -184,8 +192,12 @@ msgstr "return to article"
184msgid "plop" 192msgid "plop"
185msgstr "plop" 193msgstr "plop"
186 194
187msgid "You can <a href='wallabag_compatibility_test.php'>check your configuration here</a>." 195msgid ""
188msgstr "You can <a href='wallabag_compatibility_test.php'>check your configuration here</a>." 196"You can <a href='wallabag_compatibility_test.php'>check your configuration "
197"here</a>."
198msgstr ""
199"You can <a href='wallabag_compatibility_test.php'>check your configuration "
200"here</a>."
189 201
190msgid "favoris" 202msgid "favoris"
191msgstr "favoris" 203msgstr "favoris"
@@ -247,8 +259,14 @@ msgstr "installation"
247msgid "install your wallabag" 259msgid "install your wallabag"
248msgstr "install your wallabag" 260msgstr "install your wallabag"
249 261
250msgid "wallabag is still not installed. Please fill the below form to install it. Don't hesitate to <a href='http://doc.wallabag.org/'>read the documentation on wallabag website</a>." 262msgid ""
251msgstr "wallabag is still not installed. Please fill the below form to install it. Don't hesitate to <a href='http://doc.wallabag.org/'>read the documentation on wallabag website</a>." 263"wallabag is still not installed. Please fill the below form to install it. "
264"Don't hesitate to <a href='http://doc.wallabag.org/'>read the documentation "
265"on wallabag website</a>."
266msgstr ""
267"wallabag is still not installed. Please fill the below form to install it. "
268"Don't hesitate to <a href='http://doc.wallabag.org/'>read the documentation "
269"on wallabag website</a>."
252 270
253msgid "Login" 271msgid "Login"
254msgstr "Login" 272msgstr "Login"
@@ -401,7 +419,8 @@ msgid "a more recent development version is available."
401msgstr "a more recent development version is available." 419msgstr "a more recent development version is available."
402 420
403msgid "Please execute the import script locally, it can take a very long time." 421msgid "Please execute the import script locally, it can take a very long time."
404msgstr "Please execute the import script locally, it can take a very long time." 422msgstr ""
423"Please execute the import script locally, it can take a very long time."
405 424
406msgid "More infos in the official doc:" 425msgid "More infos in the official doc:"
407msgstr "More infos in the official doc:" 426msgstr "More infos in the official doc:"
@@ -448,8 +467,12 @@ msgstr "in demo mode, you can't update your password"
448msgid "your password has been updated" 467msgid "your password has been updated"
449msgstr "your password has been updated" 468msgstr "your password has been updated"
450 469
451msgid "the two fields have to be filled & the password must be the same in the two fields" 470msgid ""
452msgstr "the two fields have to be filled & the password must be the same in the two fields" 471"the two fields have to be filled & the password must be the same in the two "
472"fields"
473msgstr ""
474"the two fields have to be filled & the password must be the same in the two "
475"fields"
453 476
454msgid "still using the \"" 477msgid "still using the \""
455msgstr "still using the \"" 478msgstr "still using the \""
@@ -505,6 +528,46 @@ msgstr "Cache deleted."
505msgid "Oops, it seems you don't have PHP 5." 528msgid "Oops, it seems you don't have PHP 5."
506msgstr "Oops, it seems you don't have PHP 5." 529msgstr "Oops, it seems you don't have PHP 5."
507 530
531msgid "Add user"
532msgstr "Add user"
533
534msgid "Add a new user :"
535msgstr "Add a new user :"
536
537msgid "Login for new user"
538msgstr "Login for new user"
539
540msgid "Password for new user"
541msgstr "Password for new user"
542
543msgid "Email for new user (not required)"
544msgstr "Email for new user (not required)"
545
546msgid "Send"
547msgstr "Send"
548
549msgid "Delete account"
550msgstr "Delete account"
551
552msgid "You can delete your account by entering your password and validating."
553msgstr "You can delete your account by entering your password and validating."
554
555msgid "Be careful, data will be erased forever (that is a very long time)."
556msgstr "Be careful, data will be erased forever (that is a very long time)."
557
558msgid "Type here your password"
559msgstr "Type here your password"
560
561msgid "You are the only user, you cannot delete your own account."
562msgstr "You are the only user, you cannot delete your own account."
563
564msgid ""
565"To completely remove wallabag, delete the wallabag folder on your web server "
566"(and eventual databases)."
567msgstr ""
568"To completely remove wallabag, delete the wallabag folder on your web server "
569"(and eventual databases)."
570
508#~ msgid "poche it!" 571#~ msgid "poche it!"
509#~ msgstr "poche it!" 572#~ msgstr "poche it!"
510 573
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 b625e346..d0f04615 100644
--- a/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo
+++ b/locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo
Binary files 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 0343bfec..e4e2ce56 100644
--- 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 ""
4"Report-Msgid-Bugs-To: \n" 4"Report-Msgid-Bugs-To: \n"
5"POT-Creation-Date: 2014-05-10 20:09+0100\n" 5"POT-Creation-Date: 2014-05-10 20:09+0100\n"
6"PO-Revision-Date: \n" 6"PO-Revision-Date: \n"
7"Last-Translator: Gilles Wittezaรซle <gilles.wittezaele@laposte.net>\n" 7"Last-Translator: tcit <tcit@tcit.fr>\n"
8"Language-Team: \n" 8"Language-Team: \n"
9"Language: fr_FR\n" 9"Language: fr_FR\n"
10"MIME-Version: 1.0\n" 10"MIME-Version: 1.0\n"
@@ -12,7 +12,7 @@ msgstr ""
12"Content-Transfer-Encoding: 8bit\n" 12"Content-Transfer-Encoding: 8bit\n"
13"X-Poedit-KeywordsList: _;gettext;gettext_noop\n" 13"X-Poedit-KeywordsList: _;gettext;gettext_noop\n"
14"X-Poedit-SourceCharset: UTF-8\n" 14"X-Poedit-SourceCharset: UTF-8\n"
15"X-Generator: Poedit 1.5.4\n" 15"X-Generator: Poedit 1.6.4\n"
16"Plural-Forms: nplurals=2; plural=(n != 1);\n" 16"Plural-Forms: nplurals=2; plural=(n != 1);\n"
17 17
18msgid "wallabag, a read it later open source system" 18msgid "wallabag, a read it later open source system"
@@ -298,6 +298,9 @@ msgstr "Nom d'utilisateur"
298msgid "Password for new user" 298msgid "Password for new user"
299msgstr "Mot de passe du nouvel utilisateur" 299msgstr "Mot de passe du nouvel utilisateur"
300 300
301msgid "Email for new user (not required)"
302msgstr "E-mail pour le nouvel utilisateur (facultatif)"
303
301msgid "Send" 304msgid "Send"
302msgstr "Envoyer" 305msgstr "Envoyer"
303 306
@@ -320,10 +323,12 @@ msgstr ""
320"Vous รชtes l'unique utilisateur, vous ne pouvez pas supprimer votre compte." 323"Vous รชtes l'unique utilisateur, vous ne pouvez pas supprimer votre compte."
321 324
322msgid "" 325msgid ""
323"To completely remove wallabag, delete the wallabag folder on your web server." 326"To completely remove wallabag, delete the wallabag folder on your web server "
327"(and eventual databases)."
324msgstr "" 328msgstr ""
325"Pour dรฉsinstaller complรจtement wallabag, supprimez le rรฉpertoire " 329"Pour dรฉsinstaller complรจtement wallabag, supprimez le rรฉpertoire "
326"<code>wallabag</code> de votre serveur Web." 330"<code>wallabag</code> de votre serveur Web (ainsi que les bases de donnรฉes "
331"รฉventuelles)."
327 332
328msgid "Save a link" 333msgid "Save a link"
329msgstr "Ajouter un lien" 334msgstr "Ajouter un lien"
diff --git a/themes/baggy/_pocheit-form.twig b/themes/baggy/_pocheit-form.twig
index 505ec368..57a928c0 100755
--- a/themes/baggy/_pocheit-form.twig
+++ b/themes/baggy/_pocheit-form.twig
@@ -4,7 +4,7 @@
4 {% trans "Save a link" %}</h2> 4 {% trans "Save a link" %}</h2>
5 <input type="hidden" name="autoclose" value="1" /> 5 <input type="hidden" name="autoclose" value="1" />
6 <input required placeholder="example.com/article" class="addurl" id="plainurl" name="plainurl" type="url" /> 6 <input required placeholder="example.com/article" class="addurl" id="plainurl" name="plainurl" type="url" />
7 <span id="add-link-result"></span>
7 <input type="submit" value="{% trans "save link!" %}" /> 8 <input type="submit" value="{% trans "save link!" %}" />
8 <div id="add-link-result"></div>
9 </form> 9 </form>
10</div> 10</div>
diff --git a/themes/baggy/config.twig b/themes/baggy/config.twig
index 46735f07..3523cd08 100755
--- a/themes/baggy/config.twig
+++ b/themes/baggy/config.twig
@@ -111,7 +111,7 @@
111 <fieldset class="w500p"> 111 <fieldset class="w500p">
112 <div class="row"> 112 <div class="row">
113 <label class="col w150p" for="file">{% trans "File:" %}</label> 113 <label class="col w150p" for="file">{% trans "File:" %}</label>
114 <input class="col" type="file" id="file" name="file" tabindex="4"> 114 <input class="col" type="file" id="file" name="file" tabindex="4" required="required">
115 </div> 115 </div>
116 <div class="row mts txtcenter"> 116 <div class="row mts txtcenter">
117 <button class="bouton" type="submit" tabindex="4">{% trans "Import" %}</button> 117 <button class="bouton" type="submit" tabindex="4">{% trans "Import" %}</button>
@@ -121,8 +121,6 @@
121 <p><a href="?import">{% trans "You can click here to fetch content for articles with no content." %}</a></p> 121 <p><a href="?import">{% trans "You can click here to fetch content for articles with no content." %}</a></p>
122 122
123 <h2>{% trans "Export your wallabag data" %}</h2> 123 <h2>{% trans "Export your wallabag data" %}</h2>
124 {% if constant('STORAGE') == 'sqlite' %}
125 <p><a href="?download" target="_blank">{% trans "Click here" %}</a> {% trans "to download your database." %}</p>{% endif %}
126 <p><a href="?export" target="_blank">{% trans "Click here" %}</a> {% trans "to export your wallabag data." %}</p> 124 <p><a href="?export" target="_blank">{% trans "Click here" %}</a> {% trans "to export your wallabag data." %}</p>
127 125
128 <h2>{% trans "Fancy an E-Book ?" %}</h2> 126 <h2>{% trans "Fancy an E-Book ?" %}</h2>
@@ -138,11 +136,15 @@
138 <fieldset class="w500p"> 136 <fieldset class="w500p">
139 <div class="row"> 137 <div class="row">
140 <label class="col w150p" for="newusername">{% trans 'Login for new user' %}</label> 138 <label class="col w150p" for="newusername">{% trans 'Login for new user' %}</label>
141 <input class="col" type="text" id="newusername" name="newusername" placeholder="{% trans 'Login' %}"> 139 <input class="col" type="text" id="newusername" name="newusername" placeholder="{% trans 'Login' %}" required>
142 </div> 140 </div>
143 <div class="row"> 141 <div class="row">
144 <label class="col w150p" for="password4newuser">{% trans "Password for new user" %}</label> 142 <label class="col w150p" for="password4newuser">{% trans "Password for new user" %}</label>
145 <input class="col" type="password" id="password4newuser" name="password4newuser" placeholder="{% trans "Password" %}"> 143 <input class="col" type="password" id="password4newuser" name="password4newuser" placeholder="{% trans 'Password' %}" required>
144 </div>
145 <div class="row">
146 <label class="col w150p" for="newuseremail">{% trans 'Email for new user (not required)' %}</label>
147 <input class="col" type="email" id="newuseremail" name="newuseremail" placeholder="{% trans 'Email' %}">
146 </div> 148 </div>
147 <div class="row mts txtcenter"> 149 <div class="row mts txtcenter">
148 <button type="submit">{% trans "Send" %}</button> 150 <button type="submit">{% trans "Send" %}</button>
@@ -163,5 +165,5 @@
163 </div> 165 </div>
164 </form> 166 </form>
165 {% else %}<p>{% trans "You are the only user, you cannot delete your own account." %}<br /> 167 {% else %}<p>{% trans "You are the only user, you cannot delete your own account." %}<br />
166 {% trans "To completely remove wallabag, delete the wallabag folder on your web server." %}</p>{% endif %} 168 {% trans "To completely remove wallabag, delete the wallabag folder on your web server (and eventual databases)." %}</p>{% endif %}
167{% endblock %} 169{% endblock %}
diff --git a/themes/baggy/css/main.css b/themes/baggy/css/main.css
index f8238744..b775a291 100755
--- a/themes/baggy/css/main.css
+++ b/themes/baggy/css/main.css
@@ -89,7 +89,7 @@ form fieldset {
89 margin: 0; 89 margin: 0;
90} 90}
91 91
92form input[type="text"], select, form input[type="password"], form input[type="url"] { 92form input[type="text"], select, form input[type="password"], form input[type="url"], form input[type="email"] {
93 border: 1px solid #999; 93 border: 1px solid #999;
94 padding: 0.5em 1em; 94 padding: 0.5em 1em;
95 min-width: 12em; 95 min-width: 12em;
@@ -630,7 +630,7 @@ a.add-to-wallabag-link-after:after {
630 630
631#add-link-result { 631#add-link-result {
632 font-weight: bold; 632 font-weight: bold;
633 margin-top: 10px; 633 font-size: 0.9em;
634} 634}
635 635
636/* ========================================================================== 636/* ==========================================================================
diff --git a/themes/courgette/config.twig b/themes/courgette/config.twig
index 9ab58461..c4933794 100755
--- a/themes/courgette/config.twig
+++ b/themes/courgette/config.twig
@@ -97,6 +97,10 @@
97 <label class="col w150p" for="password4newuser">{% trans "Password for new user" %}</label> 97 <label class="col w150p" for="password4newuser">{% trans "Password for new user" %}</label>
98 <input class="col" type="password" id="password4newuser" name="password4newuser" placeholder="{% trans "Password" %}"> 98 <input class="col" type="password" id="password4newuser" name="password4newuser" placeholder="{% trans "Password" %}">
99 </div> 99 </div>
100 <div class="row">
101 <label class="col w150p" for="newuseremail">{% trans 'Email for new user (not required)' %}</label>
102 <input class="col" type="email" id="newuseremail" name="newuseremail" placeholder="{% trans 'Email' %}">
103 </div>
100 <div class="row mts txtcenter"> 104 <div class="row mts txtcenter">
101 <button type="submit">{% trans "Send" %}</button> 105 <button type="submit">{% trans "Send" %}</button>
102 </div> 106 </div>
@@ -116,6 +120,6 @@
116 </div> 120 </div>
117 </form> 121 </form>
118 {% else %}<p>{% trans "You are the only user, you cannot delete your own account." %}<br /> 122 {% else %}<p>{% trans "You are the only user, you cannot delete your own account." %}<br />
119 {% trans "To completely remove wallabag, delete the wallabag folder on your web server." %}</p>{% endif %} 123 {% trans "To completely remove wallabag, delete the wallabag folder on your web server (and eventual databases)." %}</p>{% endif %}
120 </div> 124 </div>
121{% endblock %} 125{% endblock %}
diff --git a/themes/default/config.twig b/themes/default/config.twig
index 160f6046..c639ba9c 100755
--- a/themes/default/config.twig
+++ b/themes/default/config.twig
@@ -110,7 +110,7 @@
110 <fieldset class="w500p"> 110 <fieldset class="w500p">
111 <div class="row"> 111 <div class="row">
112 <label class="col w150p" for="file">{% trans "File:" %}</label> 112 <label class="col w150p" for="file">{% trans "File:" %}</label>
113 <input class="col" type="file" id="file" name="file" tabindex="4"> 113 <input class="col" type="file" id="file" name="file" tabindex="4" required="required">
114 </div> 114 </div>
115 <div class="row mts txtcenter"> 115 <div class="row mts txtcenter">
116 <button class="bouton" type="submit" tabindex="4">{% trans "Import" %}</button> 116 <button class="bouton" type="submit" tabindex="4">{% trans "Import" %}</button>
@@ -121,7 +121,6 @@
121 121
122 <h2>{% trans "Export your wallabag data" %}</h2> 122 <h2>{% trans "Export your wallabag data" %}</h2>
123 {% if constant('STORAGE') == 'sqlite' %} 123 {% if constant('STORAGE') == 'sqlite' %}
124 <p><a href="?download" target="_blank">{% trans "Click here" %}</a> {% trans "to download your database." %}</p>{% endif %}
125 <p><a href="?export" target="_blank">{% trans "Click here" %}</a> {% trans "to export your wallabag data." %}</p> 124 <p><a href="?export" target="_blank">{% trans "Click here" %}</a> {% trans "to export your wallabag data." %}</p>
126 125
127 <h2>{% trans "Cache" %}</h2> 126 <h2>{% trans "Cache" %}</h2>
@@ -143,6 +142,10 @@
143 <label class="col w150p" for="password4newuser">{% trans "Password for new user" %}</label> 142 <label class="col w150p" for="password4newuser">{% trans "Password for new user" %}</label>
144 <input class="col" type="password" id="password4newuser" name="password4newuser" placeholder="{% trans "Password" %}"> 143 <input class="col" type="password" id="password4newuser" name="password4newuser" placeholder="{% trans "Password" %}">
145 </div> 144 </div>
145 <div class="row">
146 <label class="col w150p" for="newuseremail">{% trans 'Email for new user (not required)' %}</label>
147 <input class="col" type="email" id="newuseremail" name="newuseremail" placeholder="{% trans 'Email' %}">
148 </div>
146 <div class="row mts txtcenter"> 149 <div class="row mts txtcenter">
147 <button type="submit">{% trans "Send" %}</button> 150 <button type="submit">{% trans "Send" %}</button>
148 </div> 151 </div>
@@ -162,5 +165,5 @@
162 </div> 165 </div>
163 </form> 166 </form>
164 {% else %}<p>{% trans "You are the only user, you cannot delete your own account." %}<br /> 167 {% else %}<p>{% trans "You are the only user, you cannot delete your own account." %}<br />
165 {% trans "To completely remove wallabag, delete the wallabag folder on your web server." %}</p>{% endif %} 168 {% trans "To completely remove wallabag, delete the wallabag folder on your web server (and eventual databases)." %}</p>{% endif %}
166{% endblock %} 169{% endblock %}
diff --git a/wallabag_compatibility_test.php b/wallabag_compatibility_test.php
index da078623..3f9ff59f 100644
--- a/wallabag_compatibility_test.php
+++ b/wallabag_compatibility_test.php
@@ -14,6 +14,7 @@ $php_ok = (function_exists('version_compare') && version_compare(phpversion(), '
14$pcre_ok = extension_loaded('pcre'); 14$pcre_ok = extension_loaded('pcre');
15$zlib_ok = extension_loaded('zlib'); 15$zlib_ok = extension_loaded('zlib');
16$mbstring_ok = extension_loaded('mbstring'); 16$mbstring_ok = extension_loaded('mbstring');
17$dom_ok = extension_loaded('DOM');
17$iconv_ok = extension_loaded('iconv'); 18$iconv_ok = extension_loaded('iconv');
18$tidy_ok = function_exists('tidy_parse_string'); 19$tidy_ok = function_exists('tidy_parse_string');
19$curl_ok = function_exists('curl_exec'); 20$curl_ok = function_exists('curl_exec');
@@ -22,6 +23,8 @@ $parallel_ok = ((extension_loaded('http') && class_exists('HttpRequestPool')) ||
22$allow_url_fopen_ok = (bool)ini_get('allow_url_fopen'); 23$allow_url_fopen_ok = (bool)ini_get('allow_url_fopen');
23$filter_ok = extension_loaded('filter'); 24$filter_ok = extension_loaded('filter');
24$gettext_ok = function_exists("gettext"); 25$gettext_ok = function_exists("gettext");
26$gd_ok = extension_loaded('gd');
27
25 28
26if (extension_loaded('xmlreader')) { 29if (extension_loaded('xmlreader')) {
27 $xml_ok = true; 30 $xml_ok = true;
@@ -232,10 +235,20 @@ if (isset($_GET['from'])){
232 <td>Enabled</td> 235 <td>Enabled</td>
233 <?php echo ($iconv_ok) ? '<td class="good">Enabled' : '<td class="bad">Disabled'; ?></td> 236 <?php echo ($iconv_ok) ? '<td class="good">Enabled' : '<td class="bad">Disabled'; ?></td>
234 </tr> --> 237 </tr> -->
238 <tr class="<?php echo ($dom_ok) ? 'enabled' : 'disabled'; ?>">
239 <td><a href="http://php.net/manual/en/book.dom.php">DOM / XML extension</a></td>
240 <td>Enabled</td>
241 <?php echo ($dom_ok) ? '<td class="good">Enabled' : '<td class="bad">Disabled'; ?></td>
242 </tr>
235 <tr class="<?php echo ($filter_ok) ? 'enabled' : 'disabled'; ?>"> 243 <tr class="<?php echo ($filter_ok) ? 'enabled' : 'disabled'; ?>">
236 <td><a href="http://uk.php.net/manual/en/book.filter.php">Data filtering</a></td> 244 <td><a href="http://uk.php.net/manual/en/book.filter.php">Data filtering</a></td>
237 <td>Enabled</td> 245 <td>Enabled</td>
238 <?php echo ($filter_ok) ? '<td class="good">Enabled' : '<td class="pass">Disabled'; ?></td> 246 <?php echo ($filter_ok) ? '<td class="good">Enabled' : '<td class="pass">Disabled'; ?></td>
247 </tr>
248 <tr class="<?php echo ($gd_ok) ? 'enabled' : 'disabled'; ?>">
249 <td><a href="http://php.net/manual/en/book.image.php">GD</a></td>
250 <td>Enabled</td>
251 <?php echo ($gd_ok) ? '<td class="good">Enabled' : '<td class="pass">Disabled'; ?></td>
239 </tr> 252 </tr>
240 <tr class="<?php echo ($tidy_ok) ? 'enabled' : 'disabled'; ?>"> 253 <tr class="<?php echo ($tidy_ok) ? 'enabled' : 'disabled'; ?>">
241 <td><a href="http://php.net/tidy">Tidy</a></td> 254 <td><a href="http://php.net/tidy">Tidy</a></td>
@@ -275,7 +288,7 @@ if (isset($_GET['from'])){
275 <h3>What does this mean?</h3> 288 <h3>What does this mean?</h3>
276 <ol> 289 <ol>
277 <?php //if ($php_ok && $xml_ok && $pcre_ok && $mbstring_ok && $iconv_ok && $filter_ok && $zlib_ok && $tidy_ok && $curl_ok && $parallel_ok && $allow_url_fopen_ok): ?> 290 <?php //if ($php_ok && $xml_ok && $pcre_ok && $mbstring_ok && $iconv_ok && $filter_ok && $zlib_ok && $tidy_ok && $curl_ok && $parallel_ok && $allow_url_fopen_ok): ?>
278 <?php if ($php_ok && $xml_ok && $pcre_ok && $filter_ok && $tidy_ok && $curl_ok && $parallel_ok && $allow_url_fopen_ok && $gettext_ok && $parse_ini_ok): ?> 291 <?php if ($php_ok && $xml_ok && $pcre_ok && $dom_ok && $filter_ok && $gd_ok && $tidy_ok && $curl_ok && $parallel_ok && $allow_url_fopen_ok && $gettext_ok && $parse_ini_ok): ?>
279 <li><em>You have everything you need to run <?php echo $app_name; ?> properly! Congratulations!</em></li> 292 <li><em>You have everything you need to run <?php echo $app_name; ?> properly! Congratulations!</em></li>
280 <?php else: ?> 293 <?php else: ?>
281 <?php if ($php_ok): ?> 294 <?php if ($php_ok): ?>
@@ -292,48 +305,62 @@ if (isset($_GET['from'])){
292 <li><strong>Gettext:</strong> You have <code>gettext</code> enabled. <em>No problems here.</em></li> 305 <li><strong>Gettext:</strong> You have <code>gettext</code> enabled. <em>No problems here.</em></li>
293 306
294 <?php if ($parse_ini_ok): ?> 307 <?php if ($parse_ini_ok): ?>
308 <li><strong>Parse ini:</strong> You can parse <em>ini</em> files. <em>No problems here.</em></li>
309
310 <?php if ($dom_ok): ?>
311 <li><strong>DOM/XML:</strong> You can parse <em>ini</em> files. <em>No problems here.</em></li>
295 312
296 <?php if ($filter_ok): ?> 313 <?php if ($filter_ok): ?>
297 <li><strong>Data filtering:</strong> You have the PHP filter extension enabled. <em>No problems here.</em></li> 314 <li><strong>Data filtering:</strong> You can use the PHP build-in DOM to operate on XML documents. <em>No problems here.</em></li>
298 315
299 <?php if ($zlib_ok): ?> 316 <?php if ($zlib_ok): ?>
300 <li><strong>Zlib:</strong> You have <code>Zlib</code> enabled. This allows SimplePie to support GZIP-encoded feeds. <em>No problems here.</em></li> 317 <li><strong>Zlib:</strong> You have <code>Zlib</code> enabled. This allows SimplePie to support GZIP-encoded feeds. <em>No problems here.</em></li>
301 <?php else: ?> 318 <?php else: ?>
302 <li><strong>Zlib:</strong> The <code>Zlib</code> extension is not available. SimplePie will ignore any GZIP-encoding, and instead handle feeds as uncompressed text.</li> 319 <li><strong>Zlib:</strong> The <code>Zlib</code> extension is not available. SimplePie will ignore any GZIP-encoding, and instead handle feeds as uncompressed text.</li>
303 <?php endif; ?> 320 <?php endif; ?>
304 321
305 <?php if ($mbstring_ok && $iconv_ok): ?> 322 <?php if ($mbstring_ok && $iconv_ok): ?>
306 <li><strong>mbstring and iconv:</strong> You have both <code>mbstring</code> and <code>iconv</code> installed! This will allow <?php echo $app_name; ?> to handle the greatest number of languages. <em>No problems here.</em></li> 323 <li><strong>mbstring and iconv:</strong> You have both <code>mbstring</code> and <code>iconv</code> installed! This will allow <?php echo $app_name; ?> to handle the greatest number of languages. <em>No problems here.</em></li>
307 <?php elseif ($mbstring_ok): ?> 324 <?php elseif ($mbstring_ok): ?>
308 <li><strong>mbstring:</strong> <code>mbstring</code> is installed, but <code>iconv</code> is not.</li> 325 <li><strong>mbstring:</strong> <code>mbstring</code> is installed, but <code>iconv</code> is not.</li>
309 <?php elseif ($iconv_ok): ?> 326 <?php elseif ($iconv_ok): ?>
310 <li><strong>iconv:</strong> <code>iconv</code> is installed, but <code>mbstring</code> is not.</li> 327 <li><strong>iconv:</strong> <code>iconv</code> is installed, but <code>mbstring</code> is not.</li>
311 <?php else: ?> 328 <?php else: ?>
312 <li><strong>mbstring and iconv:</strong> <em>You do not have either of the extensions installed.</em> This will significantly impair your ability to read non-English feeds, as well as even some English ones.</li> 329 <li><strong>mbstring and iconv:</strong> <em>You do not have either of the extensions installed.</em> This will significantly impair your ability to read non-English feeds, as well as even some English ones.</li>
313 <?php endif; ?> 330 <?php endif; ?>
314 331
315 <?php if ($tidy_ok): ?> 332 <?php if ($gd_ok): ?>
316 <li><strong>Tidy:</strong> You have <code>Tidy</code> support installed. <em>No problems here.</em></li> 333 <li><strong>GD:</strong> You have <code>GD</code> support installed. <em>No problems here.</em></li>
317 <?php else: ?> 334 <?php else: ?>
318 <li><strong>Tidy:</strong> The <code>Tidy</code> extension is not available. <?php echo $app_name; ?> should still work with most feeds, but you may experience problems with some.</li> 335 <li><strong>GD:</strong> The <code>GD</code> extension is not available. <?php echo $app_name; ?> will not be able to download pictures locally on your server.</li>
319 <?php endif; ?> 336 <?php endif; ?>
320 337
321 <?php if ($curl_ok): ?> 338 <?php if ($tidy_ok): ?>
322 <li><strong>cURL:</strong> You have <code>cURL</code> support installed. <em>No problems here.</em></li> 339 <li><strong>Tidy:</strong> You have <code>Tidy</code> support installed. <em>No problems here.</em></li>
323 <?php else: ?> 340 <?php else: ?>
324 <li><strong>cURL:</strong> The <code>cURL</code> extension is not available. SimplePie will use <code>fsockopen()</code> instead.</li> 341 <li><strong>Tidy:</strong> The <code>Tidy</code> extension is not available. <?php echo $app_name; ?> should still work with most feeds, but you may experience problems with some.</li>
325 <?php endif; ?> 342 <?php endif; ?>
326 343
327 <?php if ($parallel_ok): ?> 344 <?php if ($curl_ok): ?>
328 <li><strong>Parallel URL fetching:</strong> You have <code>HttpRequestPool</code> or <code>curl_multi</code> support installed. <em>No problems here.</em></li> 345 <li><strong>cURL:</strong> You have <code>cURL</code> support installed. <em>No problems here.</em></li>
329 <?php else: ?> 346 <?php else: ?>
330 <li><strong>Parallel URL fetching:</strong> <code>HttpRequestPool</code> or <code>curl_multi</code> support is not available. <?php echo $app_name; ?> will use <code>file_get_contents()</code> instead to fetch URLs sequentially rather than in parallel.</li> 347 <li><strong>cURL:</strong> The <code>cURL</code> extension is not available. SimplePie will use <code>fsockopen()</code> instead.</li>
331 <?php endif; ?> 348 <?php endif; ?>
332 349
333 <?php else: ?> 350 <?php if ($parallel_ok): ?>
334 <li><strong>Data filtering:</strong> Your PHP configuration has the filter extension disabled. <strong><?php echo $app_name; ?> will not work here.</strong></li> 351 <li><strong>Parallel URL fetching:</strong> You have <code>HttpRequestPool</code> or <code>curl_multi</code> support installed. <em>No problems here.</em></li>
335 <?php endif; ?> 352 <?php else: ?>
336 353 <li><strong>Parallel URL fetching:</strong> <code>HttpRequestPool</code> or <code>curl_multi</code> support is not available. <?php echo $app_name; ?> will use <code>file_get_contents()</code> instead to fetch URLs sequentially rather than in parallel.</li>
354 <?php endif; ?>
355
356 <?php else: ?>
357 <li><strong>Data filtering:</strong> Your PHP configuration has the filter extension disabled. <strong><?php echo $app_name; ?> will not work here.</strong></li>
358 <?php endif; ?>
359
360 <?php else: ?>
361 <li><strong>DOM/XML:</strong> Your PHP configuration isn't standard, you're missing PHP-DOM. You may try to install a package or recompile PHP. <strong><?php echo $app_name; ?> will not work here.</strong></li>
362 <?php endif; ?>
363
337 <?php else : ?> 364 <?php else : ?>
338 <li><strong>Parse ini files function :</strong> Bad luck : your webhost has decided to block the use of the <em>parse_ini_file</em> function. <strong><?php echo $app_name; ?> will not work here.</strong> 365 <li><strong>Parse ini files function :</strong> Bad luck : your webhost has decided to block the use of the <em>parse_ini_file</em> function. <strong><?php echo $app_name; ?> will not work here.</strong>
339 <?php endif; ?> 366 <?php endif; ?>