1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 21:22:40 +00:00

Minor fixes for correctness

This commit is contained in:
J. King 2021-03-02 11:27:48 -05:00
parent 458126416c
commit 8aca42c882
3 changed files with 3 additions and 2 deletions

View file

@ -718,7 +718,7 @@ class V1 extends \JKingWeb\Arsse\REST\AbstractHandler {
// otherwise we'd be deleting the entire tree // otherwise we'd be deleting the entire tree
$tr = Arsse::$db->begin(); $tr = Arsse::$db->begin();
foreach (Arsse::$db->subscriptionList(Arsse::$user->id, null, false) as $sub) { foreach (Arsse::$db->subscriptionList(Arsse::$user->id, null, false) as $sub) {
Arsse::$db->subscriptionRemove(Arsse::$user->id, $sub['id']); Arsse::$db->subscriptionRemove(Arsse::$user->id, (int) $sub['id']);
} }
$tr->commit(); $tr->commit();
} }

View file

@ -1357,7 +1357,7 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler {
'score' => 0, // score is not implemented as it is not modifiable from the TTRSS API 'score' => 0, // score is not implemented as it is not modifiable from the TTRSS API
'note' => strlen((string) $article['note']) ? $article['note'] : null, 'note' => strlen((string) $article['note']) ? $article['note'] : null,
'lang' => "", // FIXME: picoFeed should be able to retrieve this information 'lang' => "", // FIXME: picoFeed should be able to retrieve this information
'tags' => Arsse::$db->articleCategoriesGet(Arsse::$user->id, $article['id']), 'tags' => Arsse::$db->articleCategoriesGet(Arsse::$user->id, (int) $article['id']),
'comments_count' => 0, 'comments_count' => 0,
'comments_link' => "", 'comments_link' => "",
'always_display_attachments' => false, 'always_display_attachments' => false,

View file

@ -945,6 +945,7 @@ LONG_STRING;
[['label_id' => -1042, 'caption' => ""], [$this->userId, 18, ['name' => ""]], new ExceptionInput("missing"), $this->respGood()], [['label_id' => -1042, 'caption' => ""], [$this->userId, 18, ['name' => ""]], new ExceptionInput("missing"), $this->respGood()],
[['label_id' => -1042, 'caption' => " "], [$this->userId, 18, ['name' => " "]], new ExceptionInput("whitespace"), $this->respGood()], [['label_id' => -1042, 'caption' => " "], [$this->userId, 18, ['name' => " "]], new ExceptionInput("whitespace"), $this->respGood()],
[['label_id' => -1042], [$this->userId, 18, ['name' => ""]], new ExceptionInput("missing"), $this->respGood()], [['label_id' => -1042], [$this->userId, 18, ['name' => ""]], new ExceptionInput("missing"), $this->respGood()],
[['label_id' => -1042], [$this->userId, 18, ['name' => ""]], new ExceptionInput("typeViolation"), $this->respErr("INCORRECT_USAGE")],
[['label_id' => -1, 'caption' => "Ook"], null, null, $this->respErr("INCORRECT_USAGE")], [['label_id' => -1, 'caption' => "Ook"], null, null, $this->respErr("INCORRECT_USAGE")],
[['caption' => "Ook"], null, null, $this->respErr("INCORRECT_USAGE")], [['caption' => "Ook"], null, null, $this->respErr("INCORRECT_USAGE")],
[[], null, null, $this->respErr("INCORRECT_USAGE")], [[], null, null, $this->respErr("INCORRECT_USAGE")],