Skip to content

Commit

Permalink
Update oss-upload.php
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaomac committed Dec 30, 2019
1 parent 637add3 commit 8cf7ea1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion oss-upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ function oss_upload_admin_note(){
}

function oss_upload_admin_action(){
if(!$action = $_GET['action'] || !is_super_admin()) return;
if(!($action = $_GET['action']) || !is_super_admin()) return;
@set_time_limit(0);
ob_end_clean();
echo str_pad('',1024);
Expand Down Expand Up @@ -604,7 +604,9 @@ function oss_upload_admin_action(){
}
}
foreach ($paths as $path){
if(empty($path)) continue;
$imgs = oss_upload_readdir($path);
if(empty($imgs)) continue;
foreach ($imgs as $img) {
if(preg_match('/\-[0-9]+x[0-9]+\./', $img) && file_is_valid_image($img)){
if(@file_exists($img) && @unlink($img)){
Expand Down

0 comments on commit 8cf7ea1

Please sign in to comment.