From 3408ed48ba66db8d93207507777be42759f7eb0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 20 Sep 2013 14:09:26 +0200 Subject: fix bug #225: blank page on article page --- inc/poche/Poche.class.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'inc/poche/Poche.class.php') diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 18860ddc..561de808 100644 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -381,17 +381,17 @@ class Poche $tidy = tidy_parse_string($content, array('indent'=>true, 'show-body-only' => true), 'UTF8'); $tidy->cleanRepair(); $content = $tidy->value; + } - # flattr checking - $flattr = new FlattrItem(); - $flattr->checkItem($entry['url']); + # flattr checking + $flattr = new FlattrItem(); + $flattr->checkItem($entry['url']); - $tpl_vars = array( - 'entry' => $entry, - 'content' => $content, - 'flattr' => $flattr - ); - } + $tpl_vars = array( + 'entry' => $entry, + 'content' => $content, + 'flattr' => $flattr + ); } else { Tools::logm('error in view call : entry is null'); -- cgit v1.2.3 From 3cc22aab829f339ac6e1ce1af63d646efe4a227c Mon Sep 17 00:00:00 2001 From: NumEricR Date: Thu, 26 Sep 2013 23:37:07 +0200 Subject: Avoid ".git" option in themes list of config page --- inc/poche/Poche.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/poche/Poche.class.php') diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 561de808..1bae2751 100644 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -255,7 +255,7 @@ class Poche while (($theme = readdir($handle)) !== false) { # Themes are stored in a directory, so all directory names are themes # @todo move theme installation data to database - if (! is_dir(THEME . '/' . $theme) || in_array($theme, array('..', '.'))) { + if (! is_dir(THEME . '/' . $theme) || in_array($theme, array('..', '.', '.git'))) { continue; } -- cgit v1.2.3 From 4e5b04113d923b54206436c74ce1fa8649854046 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 27 Sep 2013 11:11:45 +0200 Subject: Changed Flattr Caching System From md5(url) to the ID of an article. Easier and faster. --- inc/poche/Poche.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/poche/Poche.class.php') diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 561de808..6907e649 100644 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -385,7 +385,7 @@ class Poche # flattr checking $flattr = new FlattrItem(); - $flattr->checkItem($entry['url']); + $flattr->checkItem($entry['url'],$entry['id']); $tpl_vars = array( 'entry' => $entry, -- cgit v1.2.3 From 7f17a38d358bdec609a98827991108032e9257ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 3 Oct 2013 14:23:03 +0200 Subject: change instructions messages --- inc/poche/Poche.class.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'inc/poche/Poche.class.php') diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 1bae2751..d6dbd19a 100644 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -109,6 +109,14 @@ class Poche return false; } + + if (! is_writable(CACHE)) { + $this->notInstalledMessage = '

error

You don\'t have write access on cache directory.

'; + + self::$canRenderTemplates = false; + + return false; + } # Check if the selected theme and its requirements are present if (! is_dir(THEME . '/' . $this->getTheme())) { @@ -145,16 +153,11 @@ class Poche if (empty($configSalt)) { $msg = '

error

You have not yet filled in the SALT value in the config.inc.php file.

'; - } else if (! is_writable(CACHE)) { - Tools::logm('you don\'t have write access on cache directory'); - $msg = '

error

You don\'t have write access on cache directory.

'; } else if (STORAGE == 'sqlite' && ! file_exists(STORAGE_SQLITE)) { Tools::logm('sqlite file doesn\'t exist'); $msg = '

error

sqlite file doesn\'t exist, you can find it in install folder. Copy it in /db folder.

'; - } else if (file_exists(ROOT . '/install/update.php') && ! DEBUG_POCHE) { - $msg = '

setup

It\'s your first time here? Please copy /install/poche.sqlite in db folder. Then, delete install folder.
If you have already installed poche, an update is needed by clicking here.

'; } else if (is_dir(ROOT . '/install') && ! DEBUG_POCHE) { - $msg = '

setup

If you want to update your poche, you just have to delete /install folder.
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.

'; + $msg = '

install folder

you have to delete the /install folder before using poche.

'; } else if (STORAGE == 'sqlite' && ! is_writable(STORAGE_SQLITE)) { Tools::logm('you don\'t have write access on sqlite file'); $msg = '

error

You don\'t have write access on sqlite file.

'; -- cgit v1.2.3 From 34d67c835e250c853fc8ff4230abd24ba521b878 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 3 Oct 2013 14:46:46 +0200 Subject: bug fix #219: when archive last poched links from a page, redirect to an other page --- inc/poche/Poche.class.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'inc/poche/Poche.class.php') diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index d6dbd19a..ffef1c3e 100644 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -407,6 +407,12 @@ class Poche 'page_links' => '', 'nb_results' => '', ); + + # want to display a page too far? + if ((count($entries) % PAGINATION) + 1 < $_GET['p']) { + Tools::redirect(''); + } + if (count($entries) > 0) { $this->pagination->set_total(count($entries)); $page_links = $this->pagination->page_links('?view=' . $view . '&sort=' . $_SESSION['sort'] . '&'); -- cgit v1.2.3 From 6cd8af85dac4a30784ff3cbeaaca91b8af8a44af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 3 Oct 2013 14:48:53 +0200 Subject: bug fix #227: Deleting element in archive redirect to home --- inc/poche/Poche.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/poche/Poche.class.php') diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index ffef1c3e..8567cd8f 100644 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -333,7 +333,7 @@ class Poche $msg = 'error : can\'t delete link #' . $id; } Tools::logm($msg); - Tools::redirect('?'); + Tools::redirect(); break; case 'toggle_fav' : $this->store->favoriteById($id, $this->user->getId()); -- cgit v1.2.3 From 47baa1077e2923b8a87e458a6e826c2823ed3614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 3 Oct 2013 15:43:24 +0200 Subject: reopen #219 when archive last poched links from a page, redirect to an other page --- inc/poche/Poche.class.php | 5 ----- 1 file changed, 5 deletions(-) (limited to 'inc/poche/Poche.class.php') diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 8f54267d..8fe7a4f5 100644 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -407,11 +407,6 @@ class Poche 'page_links' => '', 'nb_results' => '', ); - - # want to display a page too far? - if ((count($entries) % PAGINATION) + 1 < $_GET['p']) { - Tools::redirect(''); - } if (count($entries) > 0) { $this->pagination->set_total(count($entries)); -- cgit v1.2.3 From d47d2533accb30a69fbbb964f63793b821300974 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 3 Oct 2013 19:03:52 +0200 Subject: change doc link --- inc/poche/Poche.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/poche/Poche.class.php') diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 8fe7a4f5..1ba8e7c1 100644 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -105,7 +105,7 @@ class Poche public function themeIsInstalled() { # Twig is an absolute requirement for Poche to function. Abort immediately if the Composer installer hasn't been run yet if (! self::$canRenderTemplates) { - $this->notInstalledMessage = 'Twig does not seem to be installed. Please initialize the Composer installation to automatically fetch dependencies. Have a look at the documentation.'; + $this->notInstalledMessage = 'Twig does not seem to be installed. Please initialize the Composer installation to automatically fetch dependencies. Have a look at the documentation.'; return false; } -- cgit v1.2.3