From 311baf86befde0557faea614ca4d13bb2bd2cc66 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sun, 7 Dec 2014 23:36:35 +0100 Subject: implemented random button --- inc/poche/Poche.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'inc/poche') diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 27d6f4a6..2a8037cc 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -445,6 +445,7 @@ class Poche $tpl_vars['entries'] = $this->store->getEntriesByView($view, $this->user->getId(), $this->pagination->get_limit(), $id); $tpl_vars['page_links'] = $page_links; $tpl_vars['nb_results'] = $count; + $tpl_vars['random'] = rand(1,$count); } Tools::logm('display ' . $view . ' view'); break; @@ -812,4 +813,4 @@ class Poche } -} \ No newline at end of file +} -- cgit v1.2.3 From 44b95cb81deae35f58e0058910afde2f2ffb9a60 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sat, 13 Dec 2014 22:56:30 +0100 Subject: added reload function --- inc/poche/Poche.class.php | 11 ++++++++++- inc/poche/config.inc.default.php | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'inc/poche') diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 27d6f4a6..f5262a8e 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -303,6 +303,15 @@ class Poche $this->messages->add('s', _('The tag has been successfully deleted')); Tools::redirect(); break; + case 'reload_article' : + Tools::logm('reload article'); + $id = $_GET['id']; + $entry = $this->store->retrieveOneById($id, $this->user->getId()); + Tools::logm('reload url ' . $entry['url']); + $url = new Url(base64_encode($entry['url'])); + $this->action('add', $url); + break; + default: break; } @@ -812,4 +821,4 @@ class Poche } -} \ No newline at end of file +} diff --git a/inc/poche/config.inc.default.php b/inc/poche/config.inc.default.php index 3eaee3a3..0d249c64 100755 --- a/inc/poche/config.inc.default.php +++ b/inc/poche/config.inc.default.php @@ -56,6 +56,7 @@ @define ('SHOW_PRINTLINK', '1'); // display or not percent of read in article view. Affects only default theme. @define ('SHOW_READPERCENT', '1'); +@define ('RELOAD_ARTICLE', TRUE); @define ('ABS_PATH', 'assets/'); @define ('DEFAULT_THEME', 'baggy'); -- cgit v1.2.3 From e51487f93265521cf04d8752b0554bb1f05dd189 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 22 Dec 2014 16:19:29 +0100 Subject: implemented ?random url --- inc/poche/Poche.class.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'inc/poche') diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 2a8037cc..3c7a2c5a 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -303,6 +303,14 @@ class Poche $this->messages->add('s', _('The tag has been successfully deleted')); Tools::redirect(); break; + /* For some unknown reason I can't get displayView() to work here (it redirects to home view afterwards). So here's a dirty fix which redirects directly to URL */ + case 'random': + $count = $this->store->getEntriesByViewCount($view, $this->user->getId()); + $id = rand(1,$count); + Tools::logm('get a random article'); + Tools::redirect('?view=view&id=' . $id); + //$this->displayView('view', $id); + break; default: break; } @@ -445,7 +453,6 @@ class Poche $tpl_vars['entries'] = $this->store->getEntriesByView($view, $this->user->getId(), $this->pagination->get_limit(), $id); $tpl_vars['page_links'] = $page_links; $tpl_vars['nb_results'] = $count; - $tpl_vars['random'] = rand(1,$count); } Tools::logm('display ' . $view . ' view'); break; -- cgit v1.2.3 From a3a9e75e625b78de371dad2d319ee3a84b7a75c2 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sat, 24 Jan 2015 14:35:03 +0100 Subject: correct a bug when email was not sended when creating a new user --- inc/poche/Routing.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/poche') diff --git a/inc/poche/Routing.class.php b/inc/poche/Routing.class.php index be06a433..a8d00b89 100755 --- a/inc/poche/Routing.class.php +++ b/inc/poche/Routing.class.php @@ -116,7 +116,7 @@ class Routing // update password $this->wallabag->updatePassword($_POST['password'], $_POST['password_repeat']); } elseif (isset($_GET['newuser'])) { - $this->wallabag->createNewUser($_POST['newusername'], $_POST['password4newuser']); + $this->wallabag->createNewUser($_POST['newusername'], $_POST['password4newuser'], $_POST['newuseremail']); } elseif (isset($_GET['deluser'])) { $this->wallabag->deleteUser($_POST['password4deletinguser']); } elseif (isset($_GET['epub'])) { -- cgit v1.2.3 From 3e1daa4c9016944b444829151334ab87cd3d3dcb Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sat, 24 Jan 2015 15:09:18 +0100 Subject: allow to send confirmation emails when creating a new user --- inc/poche/Poche.class.php | 27 +++++++++++++++++++++++---- inc/poche/Routing.class.php | 2 +- 2 files changed, 24 insertions(+), 5 deletions(-) (limited to 'inc/poche') diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 81a18c86..adb335c9 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -74,16 +74,35 @@ class Poche /** * Creates a new user */ - public function createNewUser($username, $password, $email = "") + public function createNewUser($username, $password, $email = "", $internalRegistration = false) { if (!empty($username) && !empty($password)){ $newUsername = filter_var($username, FILTER_SANITIZE_STRING); $email = filter_var($email, FILTER_SANITIZE_STRING); if (!$this->store->userExists($newUsername)){ if ($this->store->install($newUsername, Tools::encodeString($password . $newUsername), $email)) { - Tools::logm('The new user ' . $newUsername . ' has been installed'); - $this->messages->add('s', sprintf(_('The new user %s has been installed. Do you want to logout ?'), $newUsername)); - Tools::redirect(); + if (SEND_CONFIRMATION_EMAIL && function_exists('mail')) { + // if internal registration + $body_internal = "Hi,\r\n\r\nSomeone just created an account for you on " . Tools::getPocheUrl() . ".\r\nHave fun with it !"; + // if external (public) registration + $body = "Hi, \r\n\r\nYou've just created an account on " . Tools::getPocheUrl() . . ".\r\nHave fun with it !"; + $body = $internalRegistration ? $body_internal : $body; + $body = wordwrap($body, 70, "\r\n"); // cut lines with more than 70 caracters (MIME standard) + if (mail($email, sprintf(_('Your new wallabag account on '), Tools::getPocheUrl()), $body, 'From: {$email}')) { + Tools::logm('The user ' . $newUsername . ' has been emailed'); + $this->messages->add('i', sprintf(_('The new user %1$s has been sent an email at %2$s.'), $newUsername, $email)); + + } else { + Tools::logm('A problem has been encountered while sending an email'); + $this->messages->add('e', _('A problem has been encountered while sending an email'); + } + } else { + Tools::logm('The user has been created, but the server did not authorize sending emails'); + $this->messages->add('i', _('The server did not authorize sending an email'); + } + Tools::logm('The new user ' . $newUsername . ' has been installed'); + $this->messages->add('s', sprintf(_('The new user %s has been installed. Do you want to logout ?'), $newUsername)); + Tools::redirect(); } else { Tools::logm('error during adding new user'); diff --git a/inc/poche/Routing.class.php b/inc/poche/Routing.class.php index a8d00b89..b8cab0ec 100755 --- a/inc/poche/Routing.class.php +++ b/inc/poche/Routing.class.php @@ -116,7 +116,7 @@ class Routing // update password $this->wallabag->updatePassword($_POST['password'], $_POST['password_repeat']); } elseif (isset($_GET['newuser'])) { - $this->wallabag->createNewUser($_POST['newusername'], $_POST['password4newuser'], $_POST['newuseremail']); + $this->wallabag->createNewUser($_POST['newusername'], $_POST['password4newuser'], $_POST['newuseremail'], true); } elseif (isset($_GET['deluser'])) { $this->wallabag->deleteUser($_POST['password4deletinguser']); } elseif (isset($_GET['epub'])) { -- cgit v1.2.3 From 1be071f9f0fba7c93f114a886ff19199955a3f02 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sat, 24 Jan 2015 15:43:45 +0100 Subject: fix syntax errors --- inc/poche/Poche.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'inc/poche') diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index adb335c9..e89e9d30 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -85,20 +85,20 @@ class Poche // if internal registration $body_internal = "Hi,\r\n\r\nSomeone just created an account for you on " . Tools::getPocheUrl() . ".\r\nHave fun with it !"; // if external (public) registration - $body = "Hi, \r\n\r\nYou've just created an account on " . Tools::getPocheUrl() . . ".\r\nHave fun with it !"; + $body = "Hi, \r\n\r\nYou've just created an account on " . Tools::getPocheUrl() . ".\r\nHave fun with it !"; $body = $internalRegistration ? $body_internal : $body; $body = wordwrap($body, 70, "\r\n"); // cut lines with more than 70 caracters (MIME standard) - if (mail($email, sprintf(_('Your new wallabag account on '), Tools::getPocheUrl()), $body, 'From: {$email}')) { + if (mail($email, sprintf(_('Your new wallabag account on '), Tools::getPocheUrl()), $body, 'X-Mailer: PHP/' . phpversion())) { Tools::logm('The user ' . $newUsername . ' has been emailed'); $this->messages->add('i', sprintf(_('The new user %1$s has been sent an email at %2$s.'), $newUsername, $email)); } else { Tools::logm('A problem has been encountered while sending an email'); - $this->messages->add('e', _('A problem has been encountered while sending an email'); + $this->messages->add('e', _('A problem has been encountered while sending an email')); } } else { Tools::logm('The user has been created, but the server did not authorize sending emails'); - $this->messages->add('i', _('The server did not authorize sending an email'); + $this->messages->add('i', _('The server did not authorize sending an email')); } Tools::logm('The new user ' . $newUsername . ' has been installed'); $this->messages->add('s', sprintf(_('The new user %s has been installed. Do you want to logout ?'), $newUsername)); -- cgit v1.2.3 From 42ac69337f6538593e4375a38fb410b13c6cb660 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 26 Jan 2015 00:16:14 +0100 Subject: fix for spaces in .mobi filenames --- inc/poche/WallabagEBooks.class.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'inc/poche') diff --git a/inc/poche/WallabagEBooks.class.php b/inc/poche/WallabagEBooks.class.php index d31939a1..afcf4dbf 100644 --- a/inc/poche/WallabagEBooks.class.php +++ b/inc/poche/WallabagEBooks.class.php @@ -202,6 +202,9 @@ class WallabagMobi extends WallabagEBooks } $mobi->setContentProvider($content); + // we strip spaces because the browser inside Kindle Devices doesn't likes spaces + $this->bookFileName = str_replace(' ', '_', $this->bookFileName); + // we offer file to download $mobi->download($this->bookFileName.'.mobi'); Tools::logm('Mobi file produced'); -- cgit v1.2.3 From 3829c54bc5ceff31cb72e686b3c020ea2ac2a5b2 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 26 Jan 2015 17:44:52 +0100 Subject: fix for special caracters in .mobi filenames --- inc/poche/WallabagEBooks.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'inc/poche') diff --git a/inc/poche/WallabagEBooks.class.php b/inc/poche/WallabagEBooks.class.php index afcf4dbf..55831571 100644 --- a/inc/poche/WallabagEBooks.class.php +++ b/inc/poche/WallabagEBooks.class.php @@ -202,8 +202,8 @@ class WallabagMobi extends WallabagEBooks } $mobi->setContentProvider($content); - // we strip spaces because the browser inside Kindle Devices doesn't likes spaces - $this->bookFileName = str_replace(' ', '_', $this->bookFileName); + // the browser inside Kindle Devices doesn't likes special caracters either, we limit to A-z/0-9 + $this->bookFileName = preg_replace('/[^A-Za-z0-9\-]/', '', $this->bookFileName); // we offer file to download $mobi->download($this->bookFileName.'.mobi'); -- cgit v1.2.3 From 89637c2a1dcc114b17a8f7eef493b51315e1a6ac Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sun, 1 Feb 2015 12:22:14 +0100 Subject: added reload icon and fixed a bug where random could redirect to deleted articles --- inc/poche/Poche.class.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'inc/poche') diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index fb74ab9a..f9928145 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -349,8 +349,11 @@ class Poche /* For some unknown reason I can't get displayView() to work here (it redirects to home view afterwards). So here's a dirty fix which redirects directly to URL */ case 'random': - $count = $this->store->getEntriesByViewCount($view, $this->user->getId()); - $id = rand(1,$count); + $id = 0; + while ($this->store->retrieveOneById($id,$this->user->getId()) == null) { + $count = $this->store->getEntriesByViewCount($view, $this->user->getId()); + $id = rand(1,$count); + } Tools::logm('get a random article'); Tools::redirect('?view=view&id=' . $id); //$this->displayView('view', $id); -- cgit v1.2.3 From 1c91178932cd5b48d793261c6631697186853a93 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 4 Feb 2015 23:37:37 +0100 Subject: fix autoclose (#984) and bookmarklet mode --- inc/poche/Poche.class.php | 4 ++-- inc/poche/Routing.class.php | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'inc/poche') diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index f9928145..a601f0a8 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -195,9 +195,9 @@ class Poche } if ($autoclose == TRUE) { - Tools::redirect('?view=home'); + Tools::redirect('?view=home&closewin=true'); } else { - Tools::redirect('?view=home&closewin=true'); + Tools::redirect('?view=home'); } return $last_id; break; diff --git a/inc/poche/Routing.class.php b/inc/poche/Routing.class.php index a8d00b89..709831d5 100755 --- a/inc/poche/Routing.class.php +++ b/inc/poche/Routing.class.php @@ -33,6 +33,7 @@ class Routing $this->view = Tools::checkVar('view', 'home'); $this->action = Tools::checkVar('action'); $this->id = Tools::checkVar('id'); + $this->autoclose = Tools::checkVar('autoclose',FALSE); $_SESSION['sort'] = Tools::checkVar('sort', 'id'); $this->url = new Url((isset ($_GET['url'])) ? $_GET['url'] : ''); } @@ -64,7 +65,7 @@ class Routing $tplVars = array(); if (\Session::isLogged()) { - $this->wallabag->action($this->action, $this->url, $this->id); + $this->wallabag->action($this->action, $this->url, $this->id, FALSE, $this->autoclose); $tplFile = Tools::getTplFile($this->view); $tplVars = array_merge($this->vars, $this->wallabag->displayView($this->view, $this->id)); } elseif(isset($_SERVER['PHP_AUTH_USER'])) { -- cgit v1.2.3 From 571b99e8045ab45bfa04bbc2a90dc566dba59452 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 4 Feb 2015 23:50:33 +0100 Subject: added evernote support --- inc/poche/config.inc.default.php | 1 + 1 file changed, 1 insertion(+) (limited to 'inc/poche') diff --git a/inc/poche/config.inc.default.php b/inc/poche/config.inc.default.php index aaaf12a6..91b50c24 100755 --- a/inc/poche/config.inc.default.php +++ b/inc/poche/config.inc.default.php @@ -44,6 +44,7 @@ @define ('SHARE_MAIL', TRUE); @define ('SHARE_SHAARLI', FALSE); @define ('SHAARLI_URL', 'http://myshaarliurl.com'); +@define ('SHARE_EVERNOTE', FALSE); @define ('SHARE_DIASPORA', FALSE); @define ('DIASPORA_URL', 'http://diasporapod.com'); # Don't add a / at the end @define ('FLATTR', TRUE); -- cgit v1.2.3 From fde4cf0616e68d7b94f0991c1fcb434de4567c17 Mon Sep 17 00:00:00 2001 From: Eric Priou aka erixtekila Date: Thu, 5 Feb 2015 14:19:03 +0100 Subject: Fix fetched entries when localized --- inc/poche/Database.class.php | 4 ++-- inc/poche/Poche.class.php | 28 +++++++++++++++++----------- 2 files changed, 19 insertions(+), 13 deletions(-) (limited to 'inc/poche') diff --git a/inc/poche/Database.class.php b/inc/poche/Database.class.php index f6ba4708..6bac0f5d 100755 --- a/inc/poche/Database.class.php +++ b/inc/poche/Database.class.php @@ -293,7 +293,7 @@ class Database { $sql_limit = "LIMIT ".$limit." OFFSET 0"; } - $sql = "SELECT * FROM entries WHERE (content = '' OR content IS NULL) AND title LIKE 'Untitled - Import%' AND user_id=? ORDER BY id " . $sql_limit; + $sql = "SELECT * FROM entries WHERE (content = '' OR content IS NULL) AND title LIKE '%Import%' AND user_id=? ORDER BY id " . $sql_limit; $query = $this->executeQuery($sql, array($user_id)); $entries = $query->fetchAll(); @@ -302,7 +302,7 @@ class Database { public function retrieveUnfetchedEntriesCount($user_id) { - $sql = "SELECT count(*) FROM entries WHERE (content = '' OR content IS NULL) AND title LIKE 'Untitled - Import%' AND user_id=?"; + $sql = "SELECT count(*) FROM entries WHERE (content = '' OR content IS NULL) AND title LIKE '%Import%' AND user_id=?"; $query = $this->executeQuery($sql, array($user_id)); list($count) = $query->fetch(); diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index a601f0a8..d096de91 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -740,17 +740,23 @@ class Poche $purifier = $this->_getPurifier(); foreach($items as $item) { $url = new Url(base64_encode($item['url'])); - Tools::logm('Fetching article ' . $item['id']); - $content = Tools::getPageContent($url); - $title = (($content['rss']['channel']['item']['title'] != '') ? $content['rss']['channel']['item']['title'] : _('Untitled')); - $body = (($content['rss']['channel']['item']['description'] != '') ? $content['rss']['channel']['item']['description'] : _('Undefined')); - - // clean content to prevent xss attack - - $title = $purifier->purify($title); - $body = $purifier->purify($body); - $this->store->updateContentAndTitle($item['id'], $title, $body, $this->user->getId()); - Tools::logm('Article ' . $item['id'] . ' updated.'); + if( $url->isCorrect() ) + { + Tools::logm('Fetching article ' . $item['id']); + $content = Tools::getPageContent($url); + $title = (($content['rss']['channel']['item']['title'] != '') ? $content['rss']['channel']['item']['title'] : _('Untitled')); + $body = (($content['rss']['channel']['item']['description'] != '') ? $content['rss']['channel']['item']['description'] : _('Undefined')); + + // clean content to prevent xss attack + + $title = $purifier->purify($title); + $body = $purifier->purify($body); + $this->store->updateContentAndTitle($item['id'], $title, $body, $this->user->getId()); + Tools::logm('Article ' . $item['id'] . ' updated.'); + } else + { + Tools::logm('Unvalid URL (' . $item['url'] .') to fetch for article ' . $item['id']); + } } } } -- cgit v1.2.3 From 6cb5e1c9f511996d52b45b459bb26047f0dead38 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 13 Feb 2015 19:10:22 +0100 Subject: improvements to internal registration and translations --- inc/poche/Poche.class.php | 47 ++++++++++++++++++++++++++-------------- inc/poche/config.inc.default.php | 3 +++ 2 files changed, 34 insertions(+), 16 deletions(-) (limited to 'inc/poche') diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index b26826f1..8ade91b4 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -81,25 +81,40 @@ class Poche $email = filter_var($email, FILTER_SANITIZE_STRING); if (!$this->store->userExists($newUsername)){ if ($this->store->install($newUsername, Tools::encodeString($password . $newUsername), $email)) { - if (SEND_CONFIRMATION_EMAIL && function_exists('mail')) { - // if internal registration - $body_internal = "Hi,\r\n\r\nSomeone just created an account for you on " . Tools::getPocheUrl() . ".\r\nHave fun with it !"; - // if external (public) registration - $body = "Hi, \r\n\r\nYou've just created an account on " . Tools::getPocheUrl() . ".\r\nHave fun with it !"; - $body = $internalRegistration ? $body_internal : $body; - $body = wordwrap($body, 70, "\r\n"); // cut lines with more than 70 caracters (MIME standard) - if (mail($email, sprintf(_('Your new wallabag account on '), Tools::getPocheUrl()), $body, 'X-Mailer: PHP/' . phpversion())) { - Tools::logm('The user ' . $newUsername . ' has been emailed'); - $this->messages->add('i', sprintf(_('The new user %1$s has been sent an email at %2$s.'), $newUsername, $email)); + if ($email != "") { // if email is filled + if (SEND_CONFIRMATION_EMAIL && function_exists('mail')) { + + // if internal registration + $body_internal = _('Hi,') . "\r\n\r\n" . sprintf(_('Someone just created a wallabag account for you on %1$s.'), Tools::getPocheUrl()) . + "\r\n\r\n" . sprintf(_('Your login is %1$s.'), $newUsername) ."\r\n\r\n" . + _('Note : The password has been chosen by the person who created your account. Get in touch with that person to know your password and change it as soon as possible') . "\r\n\r\n" . + _('Have fun with it !') . "\r\n\r\n" . + _('This is an automatically generated message, no one will answer if you respond to it.'); + // if external (public) registration + $body = "Hi, " . $newUsername . "\r\n\r\nYou've just created a wallabag account on " . Tools::getPocheUrl() . ".\r\nHave fun with it !"; + $body = $internalRegistration ? $body_internal : $body; + + $body = wordwrap($body, 70, "\r\n"); // cut lines with more than 70 caracters (MIME standard) + if (mail($email, sprintf(_('Your new wallabag account on %1$s'), Tools::getPocheUrl()), $body, + 'X-Mailer: PHP/' . phpversion() . "\r\n" . + 'Content-type: text/plain; charset=UTF-8' . "\r\n" . + "From: " . $newUsername . "@" . gethostname() . "\r\n")) { + Tools::logm('The user ' . $newUsername . ' has been emailed'); + $this->messages->add('i', sprintf(_('The new user %1$s has been sent an email at %2$s. You may have to check spam folder.'), $newUsername, $email)); + + } else { + Tools::logm('A problem has been encountered while sending an email'); + $this->messages->add('e', _('A problem has been encountered while sending an email')); + } } else { - Tools::logm('A problem has been encountered while sending an email'); - $this->messages->add('e', _('A problem has been encountered while sending an email')); + Tools::logm('The user has been created, but the server did not authorize sending emails'); + $this->messages->add('i', _('The server did not authorize sending a confirmation email')); } - } else { - Tools::logm('The user has been created, but the server did not authorize sending emails'); - $this->messages->add('i', _('The server did not authorize sending an email')); - } + } else { + Tools::logm('The user has been created, but no email was saved, so no confimation email was sent'); + $this->messages->add('i', _('The user was created, but no email was sent because email was not filled in')); + } Tools::logm('The new user ' . $newUsername . ' has been installed'); $this->messages->add('s', sprintf(_('The new user %s has been installed. Do you want to logout ?'), $newUsername)); Tools::redirect(); diff --git a/inc/poche/config.inc.default.php b/inc/poche/config.inc.default.php index 91b50c24..fbf4ae9a 100755 --- a/inc/poche/config.inc.default.php +++ b/inc/poche/config.inc.default.php @@ -59,6 +59,9 @@ @define ('MOBI', FALSE); @define ('PDF', FALSE); +// registration +@define ('SEND_CONFIRMATION_EMAIL', TRUE); + // display or not print link in article view @define ('SHOW_PRINTLINK', '1'); // display or not percent of read in article view. Affects only default theme. -- cgit v1.2.3 From dc6ec987585a1c51f678c404143e37b0d844d796 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 13 Feb 2015 19:14:56 +0100 Subject: just a reminder --- inc/poche/config.inc.default.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/poche') diff --git a/inc/poche/config.inc.default.php b/inc/poche/config.inc.default.php index fbf4ae9a..0fd9bc0e 100755 --- a/inc/poche/config.inc.default.php +++ b/inc/poche/config.inc.default.php @@ -60,7 +60,7 @@ @define ('PDF', FALSE); // registration -@define ('SEND_CONFIRMATION_EMAIL', TRUE); +@define ('SEND_CONFIRMATION_EMAIL', TRUE); // TO BE CHANGED DEPENDING ON POLL // display or not print link in article view @define ('SHOW_PRINTLINK', '1'); -- cgit v1.2.3