Skip to content

Commit

Permalink
fix plugin enabled detection
Browse files Browse the repository at this point in the history
  • Loading branch information
tnqzh123 committed May 1, 2020
1 parent 24610b7 commit 77cd5de
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion purge-azure-global-cdn/package.json
@@ -1,6 +1,6 @@
{
"name": "purge-azure-global-cdn",
"version": "1.1.0",
"version": "1.1.1",
"title": "刷新 Azure 国际版 CDN",
"description": "当资源被更新时,自动刷新 Azure 国际版 CDN 的缓存。不适用于 Azure 中国版。",
"author": "Honoka Tech LTD(GB)",
Expand Down
6 changes: 3 additions & 3 deletions purge-azure-global-cdn/src/PurgeCDN.php
Expand Up @@ -38,17 +38,17 @@ public function handle(PluginManager $plugins)
// 列出需要刷新的 URL
$name = urlencode($this->player->name);
$urls = ['/'. $name.'.json', '/csl/'.$name.'.json'];
if (isset($usm) && $usm->enabled) {
if (isset($usm) && $usm->isEnabled()) {
$urls[] = '/usm/' . $name . '.json';
}
if (isset($legacy) && $legacy->enabled) {
if (isset($legacy) && $legacy->isEnabled()) {
array_push(
$urls,
'/skin/' . $name . '.png',
'/cape/' . $name . '.png'
);
}
if (isset($yggdrasil) && $yggdrasil->enabled) {
if (isset($yggdrasil) && $yggdrasil->isEnabled()) {
$uuid = DB::table('uuid')->where('name', $name)->value('uuid');
array_push(
$urls,
Expand Down
6 changes: 3 additions & 3 deletions refresh-qcloud-cdn/bootstrap.php
Expand Up @@ -19,19 +19,19 @@
$baseUrl . '/csl/' . $name . '.json',
];

if (isset($usm) && $usm->enabled) {
if (isset($usm) && $usm->isEnabled()) {
$urls[] = $baseUrl . '/usm/' . $name . '.json';
}

if (isset($legacy) && $legacy->enabled) {
if (isset($legacy) && $legacy->isEnabled()) {
array_push(
$urls,
$baseUrl . '/skin/' . $name . '.png',
$baseUrl . '/cape/' . $name . '.png'
);
}

if (isset($yggdrasil) && $yggdrasil->enabled) {
if (isset($yggdrasil) && $yggdrasil->isEnabled()) {
$uuid = DB::table('uuid')->where('name', $name)->value('uuid');
array_push(
$urls,
Expand Down
2 changes: 1 addition & 1 deletion refresh-qcloud-cdn/package.json
@@ -1,6 +1,6 @@
{
"name": "refresh-qcloud-cdn",
"version": "2.1.1",
"version": "2.1.2",
"title": "刷新腾讯云 CDN",
"description": "当角色信息被更新时,自动刷新 CDN 中的 JSON Profile。",
"author": "GPlane",
Expand Down

0 comments on commit 77cd5de

Please sign in to comment.