This repository was archived by the owner on Dec 14, 2023. It is now read-only.
File tree 1 file changed +7
-6
lines changed
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 74
74
// ============
75
75
// UNINSTALLING
76
76
// ============
77
-
78
77
if ("uninstall " === $ _GET ['action ' ]) {
79
78
// Remove the old plugin
80
79
for ($ i = 0 ; $ i < count ($ ICEcoder ["plugins " ]); $ i ++) {
81
80
if ($ ICEcoder ["plugins " ][$ i ][0 ] === $ pluginsData [$ _GET ['plugin ' ]]['name ' ]) {
82
- unset ($ ICEcoder ["plugins " ][ $ i ] );
81
+ array_splice ($ ICEcoder ["plugins " ], $ i , 1 );
83
82
}
84
83
}
85
84
95
94
96
95
if ("update " === $ _GET ['action ' ]) {
97
96
// Redo the arrays using the form data
98
- for ($ i = 0 ; $ i < count ($ ICEcoder ["plugins " ]); $ i ++) {
97
+ $ numPlugins = count ($ ICEcoder ["plugins " ]);
98
+ for ($ i = 0 ; $ i < $ numPlugins ; $ i ++) {
99
99
$ timer = intval ($ _POST ['timer ' . $ i ]);
100
- if ($ timer == 0 ) {
100
+ if (0 === $ timer ) {
101
101
$ timer = "" ;
102
102
}
103
- $ ICEcoder ["plugins " ][] = [
103
+ $ ICEcoder ["plugins " ][$ i ] = [
104
104
$ _POST ['name ' . $ i ],
105
105
$ _POST ['icon ' . $ i ],
106
106
$ _POST ['style ' . $ i ],
120
120
header ("Location: plugins-manager.php?updatedPlugins&csrf= " . $ _SESSION ["csrf " ]);
121
121
echo "<script>window.location = 'plugins-manager.php?updatedPlugins&csrf=' + ICEcoder.csrf;</script> " ;
122
122
}
123
- die ("<span style='color: #fff'> " . $ t ['saving plugins ' ] . "</span> " );
123
+ exit ;
124
+ // die("<span style='color: #fff'>" . $t['saving plugins'] . "</span>");
124
125
} else {
125
126
echo "<script>parent.ICEcoder.message(' " . $ t ['Cannot update config... ' ] . " data/ " . $ settingsFile . " " . $ t ['and try again ' ] . "');</script> " ;
126
127
}
You can’t perform that action at this time.
0 commit comments