Pluralise.
This commit is contained in:
parent
710049794f
commit
057551edb3
2 changed files with 3 additions and 3 deletions
|
@ -42,7 +42,7 @@ if($hasUserId) {
|
|||
|
||||
if($_SERVER['REQUEST_METHOD'] === 'GET' && filter_has_var(INPUT_GET, 'delete')) {
|
||||
if(CSRF::validateRequest()) {
|
||||
$modNotes->deleteNote($noteInfo);
|
||||
$modNotes->deleteNotes($noteInfo);
|
||||
$msz->createAuditLog('MOD_NOTE_DELETE', [$noteInfo->getId(), $noteInfo->getUserId()]);
|
||||
url_redirect('manage-users-notes', ['user' => $noteInfo->getUserId()]);
|
||||
} else render_error(403);
|
||||
|
|
|
@ -136,7 +136,7 @@ class ModNotes {
|
|||
return $this->getNote((string)$this->dbConn->getLastInsertId());
|
||||
}
|
||||
|
||||
public function deleteNote(ModNoteInfo|string|array $noteInfos): void {
|
||||
public function deleteNotes(ModNoteInfo|string|array $noteInfos): void {
|
||||
if(!is_array($noteInfos))
|
||||
$noteInfos = [$noteInfos];
|
||||
|
||||
|
@ -150,7 +150,7 @@ class ModNotes {
|
|||
if($noteInfo instanceof ModNoteInfo)
|
||||
$noteInfo = $noteInfo->getId();
|
||||
elseif(!is_string($noteInfo))
|
||||
throw new InvalidArgumentException('$noteInfos must be strings of instances of ModNoteInfo');
|
||||
throw new InvalidArgumentException('$noteInfos must be strings of instances of ModNoteInfo.');
|
||||
|
||||
$stmt->addParameter(++$args, $noteInfo);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue