diff --git a/Admin/Install/Application/QA/Themes/Default/tpl/footer.tpl.php b/Admin/Install/Application/QA/Themes/Default/tpl/footer.tpl.php
index 13433e3..09d803b 100755
--- a/Admin/Install/Application/QA/Themes/Default/tpl/footer.tpl.php
+++ b/Admin/Install/Application/QA/Themes/Default/tpl/footer.tpl.php
@@ -19,9 +19,9 @@ use phpOMS\Uri\UriFactory;
\ No newline at end of file
diff --git a/Admin/Install/Application/QA/Themes/Default/tpl/header.tpl.php b/Admin/Install/Application/QA/Themes/Default/tpl/header.tpl.php
index 52dcdc5..8a4f33a 100755
--- a/Admin/Install/Application/QA/Themes/Default/tpl/header.tpl.php
+++ b/Admin/Install/Application/QA/Themes/Default/tpl/header.tpl.php
@@ -19,7 +19,7 @@ use phpOMS\Uri\UriFactory;
diff --git a/Admin/Install/Application/QA/index.tpl.php b/Admin/Install/Application/QA/index.tpl.php
index 6b88906..5ae1a79 100755
--- a/Admin/Install/Application/QA/index.tpl.php
+++ b/Admin/Install/Application/QA/index.tpl.php
@@ -19,7 +19,7 @@ use phpOMS\Uri\UriFactory;
$head = $this->head;
/** @var array $dispatch */
-$dispatch = $this->getData('dispatch') ?? [];
+$dispatch = $this->data['dispatch'] ?? [];
?>
diff --git a/Controller/ApiController.php b/Controller/ApiController.php
index 674af19..8710f16 100755
--- a/Controller/ApiController.php
+++ b/Controller/ApiController.php
@@ -361,7 +361,7 @@ final class ApiController extends Controller
}
/** @var \Modules\QA\Models\QAAnswer $newAccepted */
- $newAccepted = QAAnswerMapper::get()->with('createdBy')->where('id', (int) $request->getData('id'))->execute();
+ $newAccepted = QAAnswerMapper::get()->with('createdBy')->where('id', $request->getDataInt('id') ?? 0)->execute();
$oldNewAccepted = clone $newAccepted;
/** @var \Modules\QA\Models\QAQuestion $question */
@@ -519,7 +519,7 @@ final class ApiController extends Controller
/** @var \Modules\QA\Models\QAQuestionVote $questionVote */
$questionVote = QAQuestionVoteMapper::get()
- ->where('question', (int) $request->getData('id'))
+ ->where('question', $request->getDataInt('id') ?? 0)
->where('createdBy', $request->header->account)
->execute();
@@ -527,7 +527,7 @@ final class ApiController extends Controller
/** @var \Modules\QA\Models\QAQuestion $question */
$question = QAQuestionMapper::get()
->with('createdBy')
- ->where('id', (int) $request->getData('id'))
+ ->where('id', $request->getDataInt('id') ?? 0)
->execute();
// You cannot upvote your own question
@@ -540,7 +540,7 @@ final class ApiController extends Controller
$new = new QAQuestionVote();
$new->score = \min(\max((int) $request->getData('type'), -1), 1);
- $new->question = (int) $request->getData('id');
+ $new->question = $request->getDataInt('id') ?? 0;
$new->createdBy = new NullAccount($request->header->account);
$new->createdFor = $question->createdBy->id;
@@ -603,7 +603,7 @@ final class ApiController extends Controller
/** @var \Modules\QA\Models\QAAnswerVote $answerVote */
$answerVote = QAAnswerVoteMapper::get()
- ->where('answer', (int) $request->getData('id'))
+ ->where('answer', $request->getDataInt('id') ?? 0)
->where('createdBy', $request->header->account)
->execute();
@@ -611,7 +611,7 @@ final class ApiController extends Controller
/** @var \Modules\QA\Models\QAAnswer $answer */
$answer = QAAnswerMapper::get()
->with('createdBy')
- ->where('id', (int) $request->getData('id'))
+ ->where('id', $request->getDataInt('id') ?? 0)
->execute();
// You cannot upvote your own answer
@@ -624,7 +624,7 @@ final class ApiController extends Controller
$new = new QAAnswerVote();
$new->score = \min(\max((int) $request->getData('type'), -1), 1);
- $new->answer = (int) $request->getData('id');
+ $new->answer = $request->getDataInt('id') ?? 0;
$new->createdBy = new NullAccount($request->header->account);
$new->createdFor = $answer->createdBy->id;
diff --git a/Controller/BackendController.php b/Controller/BackendController.php
index 177fdf0..428009b 100755
--- a/Controller/BackendController.php
+++ b/Controller/BackendController.php
@@ -86,7 +86,7 @@ final class BackendController extends Controller
->with('tags/title')
->where('tags/title/language', $response->header->l11n->language)
->where('language', $response->header->l11n->language)
- ->limit(50)
+ ->limit(25)
->executeGetArray();
$view->data['apps'] = QAAppMapper::getAll()
@@ -125,7 +125,7 @@ final class BackendController extends Controller
->with('tags')
->with('tags/title')
->with('files')
- ->where('id', (int) $request->getData('id'))
+ ->where('id', $request->getDataInt('id') ?? 0)
->where('tags/title/language', $response->header->l11n->language)
->execute();
@@ -305,7 +305,7 @@ final class BackendController extends Controller
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1006001001, $request, $response);
$view->data['app'] = QAAppMapper::get()
- ->where('id', (int) $request->getData('id'))
+ ->where('id', $request->getDataInt('id') ?? 0)
->execute();
return $view;