forked from wallabag/wallabag
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4b1fa4c2fe | |||
| df89c6f71a | |||
| aa245deedc | |||
| d61e86a3d3 | |||
| 336797f309 |
@ -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
|
||||
|
||||
@ -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');
|
||||
|
||||
Reference in New Issue
Block a user