mirror of
https://github.com/wallabag/wallabag.git
synced 2025-02-25 15:06:17 +00:00
[add] mark all as read #385
This commit is contained in:
parent
ed2853564e
commit
f14807de06
2 changed files with 13 additions and 0 deletions
|
@ -318,6 +318,12 @@ class Database {
|
||||||
$query = $this->executeQuery($sql_action, $params_action);
|
$query = $this->executeQuery($sql_action, $params_action);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function archiveAll($user_id) {
|
||||||
|
$sql_action = "UPDATE entries SET is_read=? WHERE user_id=? AND is_read=?";
|
||||||
|
$params_action = array($user_id, 1, 0);
|
||||||
|
$query = $this->executeQuery($sql_action, $params_action);
|
||||||
|
}
|
||||||
|
|
||||||
public function getLastId($column = '') {
|
public function getLastId($column = '') {
|
||||||
return $this->getHandle()->lastInsertId($column);
|
return $this->getHandle()->lastInsertId($column);
|
||||||
}
|
}
|
||||||
|
|
|
@ -434,6 +434,13 @@ class Poche
|
||||||
Tools::redirect();
|
Tools::redirect();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'archive_all' :
|
||||||
|
$this->store->archiveAll($this->user->getId());
|
||||||
|
Tools::logm('archive all links');
|
||||||
|
if (!$import) {
|
||||||
|
Tools::redirect();
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 'add_tag' :
|
case 'add_tag' :
|
||||||
$tags = explode(',', $_POST['value']);
|
$tags = explode(',', $_POST['value']);
|
||||||
$entry_id = $_POST['entry_id'];
|
$entry_id = $_POST['entry_id'];
|
||||||
|
|
Loading…
Reference in a new issue