Skip to content

Commit 4916441

Browse files
authored
Status erfolgreich geändert meldung (#37)
Co-authored-by: staabm <staabm@users.noreply.github.com>
1 parent 85120bb commit 4916441

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

lang/de_de.lang

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ old = alt
6464
new = neu
6565
modified = geändert
6666

67+
diff_detect_status_changed = Status von `{0}` erfolgreich zu `{1}` geändert.
6768
diff_detect_snapshot_created = Snapshot von `{0}` wurde erstellt.
6869
diff_detect_snapshot_not_created = Es wurde kein neuer Snapshot von `{0}` erstellt.
6970
diff_detect_snapshot_error = Snapshot von `{0}` konnte nicht erstellt werden. Fehlermeldung: `{1}`

pages/url.list.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@
55
use FriendsOfRedaxo\DiffDetect\Index;
66
use FriendsOfRedaxo\DiffDetect\Url;
77

8+
$addon = rex_addon::get('diff_detect');
9+
810
$id = rex_request('id', 'int');
911

1012
switch (rex_get('func')) {
1113
case 'status':
1214
if (0 < $id) {
15+
$Url = Url::get($id);
1316
$status = (bool) rex_get('status', 'bool');
1417

1518
$sql = rex_sql::factory();
@@ -18,6 +21,14 @@
1821
$sql->setValue('status', $status ? 1 : 0);
1922
$sql->addGlobalUpdateFields();
2023
$sql->update();
24+
25+
echo rex_view::success(
26+
rex_i18n::msg(
27+
'diff_detect_status_changed',
28+
$Url->getName(),
29+
$addon->i18n($status ? 'active' : 'inactive'),
30+
),
31+
);
2132
}
2233
break;
2334

@@ -124,7 +135,7 @@
124135
$urlParams = [
125136
'func' => 'status',
126137
'id' => $list->getValue('id'),
127-
'status' => ('0' === $list->getValue('status')) ? '0' : '1',
138+
'status' => ('0' == $list->getValue('status')) ? '1' : '0',
128139
];
129140

130141
$start = rex_request($startKey = $list->getName() . '_start', 'string', '');

0 commit comments

Comments
 (0)