Unverified Commit 05c5e8cc by thopd88 Committed by GitHub

Update admin-categories.php

- add require 'app/cookies.php' in order to safely use qa_cookie_get()
- replace @ with isset
parent e20b488a
......@@ -204,6 +204,7 @@ if (qa_clicked('docancel')) {
// Perform appropriate database action
if (empty($errors)) {
require_once QA_INCLUDE_DIR . 'app/cookies.php';
if (isset($editcategory['categoryid'])) { // changing existing category
qa_db_category_rename($editcategory['categoryid'], $inname, $inslug);
......@@ -220,9 +221,9 @@ if (qa_clicked('docancel')) {
qa_report_event('cat_edit', qa_get_logged_in_userid(), qa_get_logged_in_handle(), qa_cookie_get(), array(
'categoryid' => $editcategory['categoryid'],
'parentid' => @$inparentid,
'content' => @$incontent,
'position' => @$inposition,
'parentid' => isset($inparentid)?$inparentid:null,
'content' => isset($incontent)?$incontent:null,
'position' => isset($inposition)?$inposition:null,
'name' => $inname,
'slug' => $inslug
));
......@@ -240,8 +241,8 @@ if (qa_clicked('docancel')) {
qa_report_event('cat_new', qa_get_logged_in_userid(), qa_get_logged_in_handle(), qa_cookie_get(), array(
'categoryid' => $categoryid,
'parentid' => $inparentid,
'content' => @$incontent,
'position' => @$inposition,
'content' => isset($incontent)?$incontent:null,
'position' => isset($inposition)?$inposition:null,
'name' => $inname,
'slug' => $inslug
));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment