diff options
author | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-08-12 05:14:04 -0700 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-08-12 05:14:04 -0700 |
commit | 667009727a38890eb651815843c1bc02869a4119 (patch) | |
tree | fc3cdb9f2c7659c2d6a1bfe04a34d2430629612c /inc/poche/Poche.class.php | |
parent | 82757801b9e9cdc8806c0005c290f05124f91ba6 (diff) | |
parent | 15493df62db830a0834a74c240bbb9d8889ae1de (diff) | |
download | wallabag-667009727a38890eb651815843c1bc02869a4119.tar.gz wallabag-667009727a38890eb651815843c1bc02869a4119.tar.zst wallabag-667009727a38890eb651815843c1bc02869a4119.zip |
Merge pull request #132 from inthepoche/dev
merge with beta2
Diffstat (limited to 'inc/poche/Poche.class.php')
-rw-r--r-- | inc/poche/Poche.class.php | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 56910bc0..2af49acd 100644 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php | |||
@@ -18,6 +18,11 @@ class Poche | |||
18 | 18 | ||
19 | function __construct() | 19 | function __construct() |
20 | { | 20 | { |
21 | if (file_exists('./install') && !DEBUG_POCHE) { | ||
22 | Tools::logm('folder /install exists'); | ||
23 | die('To install your poche with sqlite, copy /install/poche.sqlite in /db and delete the folder /install. you have to delete the /install folder before using poche.'); | ||
24 | } | ||
25 | |||
21 | $this->store = new Database(); | 26 | $this->store = new Database(); |
22 | $this->init(); | 27 | $this->init(); |
23 | $this->messages = new Messages(); | 28 | $this->messages = new Messages(); |
@@ -31,11 +36,6 @@ class Poche | |||
31 | 36 | ||
32 | private function init() | 37 | private function init() |
33 | { | 38 | { |
34 | if (file_exists('./install') && !DEBUG_POCHE) { | ||
35 | Tools::logm('folder /install exists'); | ||
36 | die('the folder /install exists, you have to delete it before using poche.'); | ||
37 | } | ||
38 | |||
39 | Tools::initPhp(); | 39 | Tools::initPhp(); |
40 | Session::init(); | 40 | Session::init(); |
41 | 41 | ||
@@ -69,6 +69,10 @@ class Poche | |||
69 | $filter = new Twig_SimpleFilter('getDomain', 'Tools::getDomain'); | 69 | $filter = new Twig_SimpleFilter('getDomain', 'Tools::getDomain'); |
70 | $this->tpl->addFilter($filter); | 70 | $this->tpl->addFilter($filter); |
71 | 71 | ||
72 | # filter for reading time | ||
73 | $filter = new Twig_SimpleFilter('getReadingTime', 'Tools::getReadingTime'); | ||
74 | $this->tpl->addFilter($filter); | ||
75 | |||
72 | # Pagination | 76 | # Pagination |
73 | $this->pagination = new Paginator($this->user->getConfigValue('pager'), 'p'); | 77 | $this->pagination = new Paginator($this->user->getConfigValue('pager'), 'p'); |
74 | } | 78 | } |
@@ -122,6 +126,8 @@ class Poche | |||
122 | $last_id = $this->store->getLastId($sequence); | 126 | $last_id = $this->store->getLastId($sequence); |
123 | if (DOWNLOAD_PICTURES) { | 127 | if (DOWNLOAD_PICTURES) { |
124 | $content = filtre_picture($parametres_url['content'], $url->getUrl(), $last_id); | 128 | $content = filtre_picture($parametres_url['content'], $url->getUrl(), $last_id); |
129 | Tools::logm('updating content article'); | ||
130 | $this->store->updateContent($last_id, $content, $this->user->getId()); | ||
125 | } | 131 | } |
126 | if (!$import) { | 132 | if (!$import) { |
127 | $this->messages->add('s', _('the link has been added successfully')); | 133 | $this->messages->add('s', _('the link has been added successfully')); |
@@ -213,7 +219,7 @@ class Poche | |||
213 | ); | 219 | ); |
214 | } | 220 | } |
215 | else { | 221 | else { |
216 | Tools::logm('error in view call : entry is NULL'); | 222 | Tools::logm('error in view call : entry is null'); |
217 | } | 223 | } |
218 | break; | 224 | break; |
219 | default: # home view | 225 | default: # home view |