mirror of
https://github.com/slawkens/myaac.git
synced 2025-05-04 21:29:21 +02:00
Cosmetics
This commit is contained in:
parent
3e7cbbb63b
commit
198cc5a09d
@ -49,12 +49,13 @@ if(!empty($action))
|
|||||||
$body = '';
|
$body = '';
|
||||||
$type = $where = $player_id = $create_date = 0;
|
$type = $where = $player_id = $create_date = 0;
|
||||||
|
|
||||||
success("Added successful.");
|
success('Added successful.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if($action == 'delete') {
|
else if($action == 'delete') {
|
||||||
Changelog::delete($id, $errors);
|
if (Changelog::delete($id, $errors)) {
|
||||||
success("Deleted successful.");
|
success('Deleted successful.');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if($action == 'edit')
|
else if($action == 'edit')
|
||||||
{
|
{
|
||||||
@ -71,13 +72,14 @@ if(!empty($action))
|
|||||||
$action = $body = '';
|
$action = $body = '';
|
||||||
$type = $where = $player_id = $create_date = 0;
|
$type = $where = $player_id = $create_date = 0;
|
||||||
|
|
||||||
success("Updated successful.");
|
success('Updated successful.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if($action == 'hide') {
|
else if($action == 'hide') {
|
||||||
Changelog::toggleHidden($id, $errors, $status);
|
if (Changelog::toggleHidden($id, $errors, $status)) {
|
||||||
success(($status == 1 ? 'Show' : 'Hide') . " successful.");
|
success(($status == 1 ? 'Show' : 'Hide') . ' successful.');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!empty($errors))
|
if(!empty($errors))
|
||||||
|
@ -91,8 +91,9 @@ if(!empty($action))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if($action == 'hide') {
|
else if($action == 'hide') {
|
||||||
News::toggleHidden($id, $errors, $status);
|
if (News::toggleHidden($id, $errors, $status)) {
|
||||||
success(($status == 1 ? 'Show' : 'Hide') . " successful.");
|
success(($status == 1 ? 'Show' : 'Hide') . ' successful.');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!empty($errors))
|
if(!empty($errors))
|
||||||
|
@ -89,9 +89,10 @@ if (!empty($action)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if ($action == 'hide') {
|
} else if ($action == 'hide') {
|
||||||
Pages::toggleHidden($id, $errors, $status);
|
if (Pages::toggleHidden($id, $errors, $status)) {
|
||||||
success(($status == 1 ? 'Show' : 'Hide') . ' successful.');
|
success(($status == 1 ? 'Show' : 'Hide') . ' successful.');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!empty($errors))
|
if (!empty($errors))
|
||||||
error(implode(", ", $errors));
|
error(implode(", ", $errors));
|
||||||
@ -238,7 +239,9 @@ class Pages
|
|||||||
$row = ModelsPages::find($id);
|
$row = ModelsPages::find($id);
|
||||||
if ($row) {
|
if ($row) {
|
||||||
$row->hidden = $row->hidden == 1 ? 0 : 1;
|
$row->hidden = $row->hidden == 1 ? 0 : 1;
|
||||||
$row->save();
|
if (!$row->save()) {
|
||||||
|
$errors[] = 'Fail during toggle hidden Page.';
|
||||||
|
}
|
||||||
$status = $row->hidden;
|
$status = $row->hidden;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -95,6 +95,7 @@ class Changelog
|
|||||||
if (!$row->save()) {
|
if (!$row->save()) {
|
||||||
$errors[] = 'Fail during toggle hidden Changelog.';
|
$errors[] = 'Fail during toggle hidden Changelog.';
|
||||||
}
|
}
|
||||||
|
$status = $row->hidden;
|
||||||
} else {
|
} else {
|
||||||
$errors[] = 'Changelog with id ' . $id . ' does not exists.';
|
$errors[] = 'Changelog with id ' . $id . ' does not exists.';
|
||||||
}
|
}
|
||||||
|
@ -153,7 +153,9 @@ class FAQ
|
|||||||
$row = ModelsFAQ::find($id);
|
$row = ModelsFAQ::find($id);
|
||||||
if ($row) {
|
if ($row) {
|
||||||
$row->hidden = ($row->hidden == 1 ? 0 : 1);
|
$row->hidden = ($row->hidden == 1 ? 0 : 1);
|
||||||
$row->save();
|
if (!$row->save()) {
|
||||||
|
$errors[] = 'Fail during toggle hidden FAQ.';
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$errors[] = 'FAQ with id ' . $id . ' does not exists.';
|
$errors[] = 'FAQ with id ' . $id . ' does not exists.';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user