mirror of
https://github.com/Karaka-Management/oms-QA.git
synced 2026-01-11 15:48:42 +00:00
crash backup
This commit is contained in:
parent
1eb062db90
commit
cb7ba500b5
|
|
@ -19,9 +19,9 @@ use phpOMS\Uri\UriFactory;
|
|||
<div class="floater">
|
||||
<hr>
|
||||
<ul>
|
||||
<li><a href="<?= UriFactory::build('{/base}/{/app}/terms'); ?>">Terms</a>
|
||||
<li><a href="<?= UriFactory::build('{/base}/{/app}/privacy'); ?>">Data Protection</a>
|
||||
<li><a href="<?= UriFactory::build('{/base}/{/app}/imprint'); ?>">Imprint</a>
|
||||
<li><a href="<?= UriFactory::build('{/app}/terms'); ?>">Terms</a>
|
||||
<li><a href="<?= UriFactory::build('{/app}/privacy'); ?>">Data Protection</a>
|
||||
<li><a href="<?= UriFactory::build('{/app}/imprint'); ?>">Imprint</a>
|
||||
</ul>
|
||||
</div>
|
||||
</footer>
|
||||
|
|
@ -19,7 +19,7 @@ use phpOMS\Uri\UriFactory;
|
|||
<nav>
|
||||
<ul>
|
||||
<li><a href="<?= UriFactory::build('{/base}/{/app}'); ?>">Website</a>
|
||||
<li><a href="<?= UriFactory::build('{/base}/{/app}/components'); ?>">Profile</a>
|
||||
<li><a href="<?= UriFactory::build('{/app}/components'); ?>">Profile</a>
|
||||
</ul>
|
||||
</nav>
|
||||
<div id="search">
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ use phpOMS\Uri\UriFactory;
|
|||
$head = $this->head;
|
||||
|
||||
/** @var array $dispatch */
|
||||
$dispatch = $this->getData('dispatch') ?? [];
|
||||
$dispatch = $this->data['dispatch'] ?? [];
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?= $this->printHtml($this->response->header->l11n->language); ?>">
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user