Skip to content

Commit

Permalink
Temporarily disable refreshing premium extensions cache and premium e…
Browse files Browse the repository at this point in the history
…xtensions sources until #45 gets fixed.
  • Loading branch information
rob006 committed Dec 29, 2024
1 parent 003ece2 commit aa84813
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cron
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

./yii self-update;
./yii extensions/update-cache --frequency=21600 --push;
#./yii extensions/update-cache --frequency=21600 --push;
./yii config/update --frequency=21600 --push;
./yii translations/update --frequency=21600 --push;
./yii translations/split --frequency=21600 --push;
Expand Down
4 changes: 2 additions & 2 deletions models/PremiumExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function getRepositoryUrl(): string {
}

public function getTranslationSourceUrl(): string {
return "https://raw.githubusercontent.com/flarum-com/premium-translations/master/{$this->getId()}.yml";
return "https://raw.githubusercontent.com/flarum-com/premium-translations/bef89cfb5e916b4186d22033e697932f0f51f487/{$this->getId()}.yml";
}

public function isAbandoned(): bool {
Expand All @@ -70,7 +70,7 @@ public function getSubscriptionPlansCount(): int {
}

public function hasTranslationSource(): bool {
$url = Yii::$app->extensionsRepository->detectTranslationSourceUrl('https://github.com/flarum-com/premium-translations', 'master', [
$url = Yii::$app->extensionsRepository->detectTranslationSourceUrl('https://github.com/flarum-com/premium-translations', 'bef89cfb5e916b4186d22033e697932f0f51f487', [
"{$this->getId()}.yml",
]);
return $url !== null && strpos($url, ExtensionsRepository::NO_TRANSLATION_FILE) === false;
Expand Down

0 comments on commit aa84813

Please sign in to comment.