[DATABASE] Fix more incorrect uses of quotation in SQL

This commit is contained in:
Alexei Sorokin
2020-07-26 15:28:05 +03:00
parent 579120df70
commit 341f3d0ea5
3 changed files with 40 additions and 17 deletions

View File

@@ -361,9 +361,12 @@ function initNoticeReshare()
printfnq("Ensuring all reshares have the correct verb and object-type...");
$notice = new Notice();
$notice->whereAdd('repeat_of is not null');
$notice->whereAdd('(verb <> "' . ActivityVerb::SHARE
. '" OR object_type <> "' . ActivityObject::ACTIVITY . '")');
$notice->whereAdd('repeat_of IS NOT NULL');
$notice->whereAdd(sprintf(
'(verb <> %1$s OR object_type <> %2$s)',
$notice->_quote(ActivityVerb::SHARE),
$notice->_quote(ActivityObject::ACTIVITY)
));
if ($notice->find()) {
while ($notice->fetch()) {