PHP/Compat

* fixed misc issues Intellisense was nice enough to highlight.
 * mostly deprecated usage of uninitialized parameters
 * class GenericPage still needs a long, hard look and a refactor
This commit is contained in:
Sarjuuk
2024-03-11 19:40:30 +01:00
parent 3e6e43fd68
commit ec1a2afc5f
75 changed files with 387 additions and 223 deletions

View File

@@ -64,7 +64,7 @@ class AjaxAccount extends AjaxHandler
foreach ($ids as $typeId)
DB::Aowow()->query('INSERT INTO ?_account_excludes (`userId`, `type`, `typeId`, `mode`) VALUES (?a) ON DUPLICATE KEY UPDATE mode = (mode ^ 0x3)', array(
User::$id, $type, $typeId, in_array($includes, $typeId) ? 2 : 1
User::$id, $type, $typeId, in_array($typeId, $includes) ? 2 : 1
));
return;

View File

@@ -411,7 +411,8 @@ class AjaxComment extends AjaxHandler
return;
}
Util::createReport(1, 19, $this->_post['id'][0], '[General Reply Report]');
$report = new Report(Report::MODE_COMMENT, Report::CO_INAPPROPRIATE, $this->_post['id'][0]);
$report->create('Report Reply Button Click');
}
protected function handleReplyUpvote() : void

View File

@@ -29,7 +29,7 @@ class AjaxGotocomment extends AjaxHandler
if ($_ = DB::Aowow()->selectRow('SELECT IFNULL(c2.id, c1.id) AS id, IFNULL(c2.type, c1.type) AS type, IFNULL(c2.typeId, c1.typeId) AS typeId FROM ?_comments c1 LEFT JOIN ?_comments c2 ON c1.replyTo = c2.id WHERE c1.id = ?d', $this->_get['id']))
return '?'.Type::getFileString(intVal($_['type'])).'='.$_['typeId'].'#comments:id='.$_['id'].($_['id'] != $this->_get['id'] ? ':reply='.$this->_get['id'] : null);
else
trigger_error('AjaxGotocomment::handleGoToComment - could not find comment #'.$this->get['id'], E_USER_ERROR);
trigger_error('AjaxGotocomment::handleGoToComment - could not find comment #'.$this->_get['id'], E_USER_ERROR);
return '.';
}