Compare commits

..

5 Commits
1.9RC1 ... 1.9

Author SHA1 Message Date
4b1fa4c2fe Merge pull request #1081 from wallabag/dev
Version 1.9.0
2015-02-18 19:17:31 +01:00
df89c6f71a Change message type from success to error
See #1096
2015-02-18 19:16:42 +01:00
aa245deedc Merge branch 'dev' of github.com:wallabag/wallabag into dev 2015-02-17 11:03:31 +01:00
d61e86a3d3 fix #1093 2015-02-17 11:03:17 +01:00
336797f309 adapt for php < 5.4
Still not obsolete. :(
2015-02-16 16:57:16 +01:00
2 changed files with 7 additions and 4 deletions

View File

@ -395,7 +395,8 @@ class Poche
case 'random':
Tools::logm('get a random article');
if ($this->store->getRandomId($this->user->getId())) {
$id = $this->store->getRandomId($this->user->getId())[0];
$id_array = $this->store->getRandomId($this->user->getId());
$id = $id_array[0];
Tools::redirect('?view=view&id=' . $id[0]);
Tools::logm('got the article with id ' . $id[0]);
}
@ -753,7 +754,7 @@ class Poche
Tools::logm('Import of articles finished: '.$i.' articles added (w/o content if not provided).');
}
else {
$this->messages->add('s', _('Did you forget to select a file?'));
$this->messages->add('e', _('Did you forget to select a file?'));
}
// file parsing finished here
// now download article contents if any

View File

@ -12,6 +12,7 @@ $errors = array();
$successes = array();
$final = false;
$email = "";
require_once('install_functions.php');
@ -61,6 +62,7 @@ else if (isset($_POST['install'])) {
// User informations
$username = trim($_POST['username']);
$password = trim($_POST['password']);
$email = trim($_POST['email']);
$salted_password = sha1($password . $username . $salt);
// Database informations
@ -140,8 +142,8 @@ else if (isset($_POST['install'])) {
if ($continue) {
$sql = "INSERT INTO users (username, password, name, email) VALUES (?, ?, ?, '')";
$params = array($username, $salted_password, $username);
$sql = "INSERT INTO users (username, password, name, email) VALUES (?, ?, ?, ?)";
$params = array($username, $salted_password, $username, $email);
$query = executeQuery($handle, $sql, $params);
$id_user = (int)$handle->lastInsertId('users_id_seq');