File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ old = alt
6464new = neu
6565modified = geändert
6666
67+ diff_detect_status_changed = Status von `{0}` erfolgreich zu `{1}` geändert.
6768diff_detect_snapshot_created = Snapshot von `{0}` wurde erstellt.
6869diff_detect_snapshot_not_created = Es wurde kein neuer Snapshot von `{0}` erstellt.
6970diff_detect_snapshot_error = Snapshot von `{0}` konnte nicht erstellt werden. Fehlermeldung: `{1}`
Original file line number Diff line number Diff line change 55use FriendsOfRedaxo \DiffDetect \Index ;
66use FriendsOfRedaxo \DiffDetect \Url ;
77
8+ $ addon = rex_addon::get ('diff_detect ' );
9+
810$ id = rex_request ('id ' , 'int ' );
911
1012switch (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 ();
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
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 ' , '' );
You can’t perform that action at this time.
0 commit comments