Skip to content

Commit

Permalink
🔨 修复 自定义随机文章图 CDN rand 正则匹配有误问题 (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
bhaoo authored Oct 26, 2023
1 parent d056664 commit d0b0424
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ function randPic(){
preg_match('/\/random\/\S*\.(jpg|png|gif|webp)/', $openfile[$img], $out);
$output = Helper::options()->siteUrl.'usr/themes/Cuckoo'.$out[0];
}elseif ($setting == 'cdn'){
$output = preg_replace('{rand}', $rand, $setting_cdn);
$output = preg_replace('/{rand}/', $rand, $setting_cdn);
}elseif ($setting == '9jojo'){
$output = 'https://api.baka.fun/acgpic/?rand='.$rand;
}
Expand Down

0 comments on commit d0b0424

Please sign in to comment.