File tree 1 file changed +18
-14
lines changed
1 file changed +18
-14
lines changed Original file line number Diff line number Diff line change 190
190
}
191
191
192
192
# validate and normalize MAC address
193
- if (strlen (@$ address ['mac ' ])>0 ) {
194
- if ($ User ->validate_mac ($ address ['mac ' ])===false ) {
195
- $ errors [] = _ ('Invalid MAC address ' )."! " ;
196
- }
197
- // normalize
198
- else {
199
- $ address ['mac ' ] = $ User ->reformat_mac_address ($ address ['mac ' ], 1 );
193
+ if ($ action !=="delete " ) {
194
+ if (strlen (@$ address ['mac ' ])>0 ) {
195
+ if ($ User ->validate_mac ($ address ['mac ' ])===false ) {
196
+ $ errors [] = _ ('Invalid MAC address ' )."! " ;
197
+ }
198
+ // normalize
199
+ else {
200
+ $ address ['mac ' ] = $ User ->reformat_mac_address ($ address ['mac ' ], 1 );
201
+ }
200
202
}
201
203
}
202
204
247
249
}
248
250
249
251
# validate and normalize MAC address
250
- if (strlen (@$ address ['mac ' ])>0 ) {
251
- if ($ User ->validate_mac ($ address ['mac ' ])===false ) {
252
- $ Result ->show ("danger " , _ ('Invalid MAC address ' )."! " , true );
253
- }
254
- // normalize
255
- else {
256
- $ address ['mac ' ] = $ User ->reformat_mac_address ($ address ['mac ' ], 1 );
252
+ if ($ action !=="delete " ) {
253
+ if (strlen (@$ address ['mac ' ])>0 ) {
254
+ if ($ User ->validate_mac ($ address ['mac ' ])===false ) {
255
+ $ Result ->show ("danger " , _ ('Invalid MAC address ' )."! " , true );
256
+ }
257
+ // normalize
258
+ else {
259
+ $ address ['mac ' ] = $ User ->reformat_mac_address ($ address ['mac ' ], 1 );
260
+ }
257
261
}
258
262
}
259
263
You can’t perform that action at this time.
0 commit comments