diff options
Diffstat (limited to 'apps/updatenotification')
24 files changed, 213 insertions, 19 deletions
diff --git a/apps/updatenotification/composer/composer/InstalledVersions.php b/apps/updatenotification/composer/composer/InstalledVersions.php index d50e0c9fcc4..41bc143c114 100644 --- a/apps/updatenotification/composer/composer/InstalledVersions.php +++ b/apps/updatenotification/composer/composer/InstalledVersions.php @@ -21,6 +21,8 @@ use Composer\Semver\VersionParser; * See also https://getcomposer.org/doc/07-runtime.md#installed-versions * * To require its presence, you can require `composer-runtime-api ^2.0` + * + * @final */ class InstalledVersions { diff --git a/apps/updatenotification/composer/composer/autoload_classmap.php b/apps/updatenotification/composer/composer/autoload_classmap.php index af7ec72d8e1..9d31d6c36db 100644 --- a/apps/updatenotification/composer/composer/autoload_classmap.php +++ b/apps/updatenotification/composer/composer/autoload_classmap.php @@ -2,7 +2,7 @@ // autoload_classmap.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = $vendorDir; return array( diff --git a/apps/updatenotification/composer/composer/autoload_namespaces.php b/apps/updatenotification/composer/composer/autoload_namespaces.php index 71c9e91858d..3f5c9296251 100644 --- a/apps/updatenotification/composer/composer/autoload_namespaces.php +++ b/apps/updatenotification/composer/composer/autoload_namespaces.php @@ -2,7 +2,7 @@ // autoload_namespaces.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = $vendorDir; return array( diff --git a/apps/updatenotification/composer/composer/autoload_psr4.php b/apps/updatenotification/composer/composer/autoload_psr4.php index 361c205335a..c4e1b615fcc 100644 --- a/apps/updatenotification/composer/composer/autoload_psr4.php +++ b/apps/updatenotification/composer/composer/autoload_psr4.php @@ -2,7 +2,7 @@ // autoload_psr4.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = $vendorDir; return array( diff --git a/apps/updatenotification/composer/composer/autoload_real.php b/apps/updatenotification/composer/composer/autoload_real.php index 92169a76d4c..89854cd42f4 100644 --- a/apps/updatenotification/composer/composer/autoload_real.php +++ b/apps/updatenotification/composer/composer/autoload_real.php @@ -23,20 +23,11 @@ class ComposerAutoloaderInitUpdateNotification } spl_autoload_register(array('ComposerAutoloaderInitUpdateNotification', 'loadClassLoader'), true, true); - self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); + self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); spl_autoload_unregister(array('ComposerAutoloaderInitUpdateNotification', 'loadClassLoader')); - $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); - if ($useStaticLoader) { - require __DIR__ . '/autoload_static.php'; - - call_user_func(\Composer\Autoload\ComposerStaticInitUpdateNotification::getInitializer($loader)); - } else { - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); - } - } + require __DIR__ . '/autoload_static.php'; + \Composer\Autoload\ComposerStaticInitUpdateNotification::getInitializer($loader)(); $loader->setClassMapAuthoritative(true); $loader->register(true); diff --git a/apps/updatenotification/l10n/cs.js b/apps/updatenotification/l10n/cs.js index b10780960a7..172c2fc8584 100644 --- a/apps/updatenotification/l10n/cs.js +++ b/apps/updatenotification/l10n/cs.js @@ -16,6 +16,7 @@ OC.L10N.register( "Apps missing compatible version" : "Aplikace, které neexistují v kompatibilní verzi", "View in store" : "Zobrazit v katalogu aplikací", "Apps with compatible version" : "Aplikace, které existují v kompatibilní verzi", + "Please note that the web updater is not recommended with more than 100 users! Please use the command line updater instead!" : "Prosím mějte na paměti, že pro instance s více než 100 uživateli není doporučeno aktualizovat přes webový nástroj pro aktualizaci! V takovém případě namísto toho proveďte aktualizaci prostřednictvím příkazového řádku!", "Open updater" : "Otevřít nástroj pro aktualizaci", "Download now" : "Stáhnout nyní", "Please use the command line updater to update." : "Aktualizaci proveďte nástrojem z příkazového řádku.", @@ -23,6 +24,7 @@ OC.L10N.register( "The update check is not yet finished. Please refresh the page." : "Kontrola aktualizací ještě neskončila. Načtěte stránku znovu.", "Your version is up to date." : "Používáte nejnovější verzi.", "A non-default update server is in use to be checked for updates:" : "Pro kontrolu aktualizací se používá jiný než výchozí server:", + "You can change the update channel below which also affects the apps management page. E.g. after switching to the beta channel, beta app updates will be offered to you in the apps management page." : "Níže je možné změnit kanál aktualizací, což se projeví také na stránce pro správu aplikací. Např. po přepnutí kanálu na beta (testování před vydáním), budou zde nabízeny také aktualizace na testovací verze aplikací.", "Update channel:" : "Kanál aktualizací:", "You can always update to a newer version. But you can never downgrade to a more stable version." : "Vždy je možné přejít na novější verzi. Poté už se ale nelze vrátit zpět ke starší verzi ze stabilního kanálu.", "Notify members of the following groups about available updates:" : "Upozorňovat členy následujících skupin na dostupnost aktualizací:", diff --git a/apps/updatenotification/l10n/cs.json b/apps/updatenotification/l10n/cs.json index a870c2b0f5f..e53b0576977 100644 --- a/apps/updatenotification/l10n/cs.json +++ b/apps/updatenotification/l10n/cs.json @@ -14,6 +14,7 @@ "Apps missing compatible version" : "Aplikace, které neexistují v kompatibilní verzi", "View in store" : "Zobrazit v katalogu aplikací", "Apps with compatible version" : "Aplikace, které existují v kompatibilní verzi", + "Please note that the web updater is not recommended with more than 100 users! Please use the command line updater instead!" : "Prosím mějte na paměti, že pro instance s více než 100 uživateli není doporučeno aktualizovat přes webový nástroj pro aktualizaci! V takovém případě namísto toho proveďte aktualizaci prostřednictvím příkazového řádku!", "Open updater" : "Otevřít nástroj pro aktualizaci", "Download now" : "Stáhnout nyní", "Please use the command line updater to update." : "Aktualizaci proveďte nástrojem z příkazového řádku.", @@ -21,6 +22,7 @@ "The update check is not yet finished. Please refresh the page." : "Kontrola aktualizací ještě neskončila. Načtěte stránku znovu.", "Your version is up to date." : "Používáte nejnovější verzi.", "A non-default update server is in use to be checked for updates:" : "Pro kontrolu aktualizací se používá jiný než výchozí server:", + "You can change the update channel below which also affects the apps management page. E.g. after switching to the beta channel, beta app updates will be offered to you in the apps management page." : "Níže je možné změnit kanál aktualizací, což se projeví také na stránce pro správu aplikací. Např. po přepnutí kanálu na beta (testování před vydáním), budou zde nabízeny také aktualizace na testovací verze aplikací.", "Update channel:" : "Kanál aktualizací:", "You can always update to a newer version. But you can never downgrade to a more stable version." : "Vždy je možné přejít na novější verzi. Poté už se ale nelze vrátit zpět ke starší verzi ze stabilního kanálu.", "Notify members of the following groups about available updates:" : "Upozorňovat členy následujících skupin na dostupnost aktualizací:", diff --git a/apps/updatenotification/l10n/de_DE.js b/apps/updatenotification/l10n/de_DE.js index 58559faf459..f5af1009edc 100644 --- a/apps/updatenotification/l10n/de_DE.js +++ b/apps/updatenotification/l10n/de_DE.js @@ -16,6 +16,7 @@ OC.L10N.register( "Apps missing compatible version" : "Für diese Apps fehlen kompatible Versionen", "View in store" : "Im Store anzeigen", "Apps with compatible version" : "Für diese Apps gibt es kompatible Versionen", + "Please note that the web updater is not recommended with more than 100 users! Please use the command line updater instead!" : "Bitte beachten Sie, dass der Web Updater bei mehr als 100 Benutzern nicht empfohlen wird! Bitte verwenden Sie stattdessen den Befehlszeilen-Updater!", "Open updater" : "Updater öffnen", "Download now" : "Jetzt herunterladen", "Please use the command line updater to update." : "Verwenden Sie zum Aktualisieren den Befehlszeilen-Updater.", @@ -23,6 +24,7 @@ OC.L10N.register( "The update check is not yet finished. Please refresh the page." : "Die Aktualisierungsprüfung ist noch nicht abgeschlossen. Bitte die Seite neu laden.", "Your version is up to date." : "Ihre Version ist aktuell.", "A non-default update server is in use to be checked for updates:" : "Es wird ein Nicht-Standard-Aktualisierungsserver zum Prüfen auf Aktualisierungen verwendet:", + "You can change the update channel below which also affects the apps management page. E.g. after switching to the beta channel, beta app updates will be offered to you in the apps management page." : "Sie können den Aktualisierungskanal unten ändern, was sich auch auf die Verwaltungsseite der Apps auswirkt. Z.B. Nach dem Wechsel zum Beta-Kanal werden Ihnen Beta-App-Updates auf der App-Verwaltungsseite angeboten.", "Update channel:" : "Update-Kanal:", "You can always update to a newer version. But you can never downgrade to a more stable version." : "Es kann immer auf eine neuere Version aktualisiert werden. Jedoch kann kein Downgrade auf eine stabilere Version erfolgen. ", "Notify members of the following groups about available updates:" : "Informieren Sie die Mitglieder der folgenden Gruppen über verfügbare Updates:", diff --git a/apps/updatenotification/l10n/de_DE.json b/apps/updatenotification/l10n/de_DE.json index 2b54bb987bd..c8808c81e19 100644 --- a/apps/updatenotification/l10n/de_DE.json +++ b/apps/updatenotification/l10n/de_DE.json @@ -14,6 +14,7 @@ "Apps missing compatible version" : "Für diese Apps fehlen kompatible Versionen", "View in store" : "Im Store anzeigen", "Apps with compatible version" : "Für diese Apps gibt es kompatible Versionen", + "Please note that the web updater is not recommended with more than 100 users! Please use the command line updater instead!" : "Bitte beachten Sie, dass der Web Updater bei mehr als 100 Benutzern nicht empfohlen wird! Bitte verwenden Sie stattdessen den Befehlszeilen-Updater!", "Open updater" : "Updater öffnen", "Download now" : "Jetzt herunterladen", "Please use the command line updater to update." : "Verwenden Sie zum Aktualisieren den Befehlszeilen-Updater.", @@ -21,6 +22,7 @@ "The update check is not yet finished. Please refresh the page." : "Die Aktualisierungsprüfung ist noch nicht abgeschlossen. Bitte die Seite neu laden.", "Your version is up to date." : "Ihre Version ist aktuell.", "A non-default update server is in use to be checked for updates:" : "Es wird ein Nicht-Standard-Aktualisierungsserver zum Prüfen auf Aktualisierungen verwendet:", + "You can change the update channel below which also affects the apps management page. E.g. after switching to the beta channel, beta app updates will be offered to you in the apps management page." : "Sie können den Aktualisierungskanal unten ändern, was sich auch auf die Verwaltungsseite der Apps auswirkt. Z.B. Nach dem Wechsel zum Beta-Kanal werden Ihnen Beta-App-Updates auf der App-Verwaltungsseite angeboten.", "Update channel:" : "Update-Kanal:", "You can always update to a newer version. But you can never downgrade to a more stable version." : "Es kann immer auf eine neuere Version aktualisiert werden. Jedoch kann kein Downgrade auf eine stabilere Version erfolgen. ", "Notify members of the following groups about available updates:" : "Informieren Sie die Mitglieder der folgenden Gruppen über verfügbare Updates:", diff --git a/apps/updatenotification/l10n/hu.js b/apps/updatenotification/l10n/hu.js index fba74394c00..d535d99283e 100644 --- a/apps/updatenotification/l10n/hu.js +++ b/apps/updatenotification/l10n/hu.js @@ -16,6 +16,7 @@ OC.L10N.register( "Apps missing compatible version" : "Az alkalmazásoknak nincs kompatibilis verziója", "View in store" : "Megtekintés a tárban", "Apps with compatible version" : "Alkalmazások kompatibilis verzióval", + "Please note that the web updater is not recommended with more than 100 users! Please use the command line updater instead!" : "Vegye figyelembe, hogy a webes frissítő több mint 100 felhasználóval nem ajánlott. Használja helyette a parancssoros frissítőt.", "Open updater" : "Frissítő megnyitása", "Download now" : "Letöltés most", "Please use the command line updater to update." : "Az frissítéshez kérjük használja a parancssoros frissítéskezelőt.", @@ -23,6 +24,7 @@ OC.L10N.register( "The update check is not yet finished. Please refresh the page." : "A frissítéskeresés még nem ért véget. Frissítse az oldalt.", "Your version is up to date." : "A verziója naprakész.", "A non-default update server is in use to be checked for updates:" : "Egy nem alapértelmezett frissítési kiszolgáló van használatban a frissítések kereséséhez:", + "You can change the update channel below which also affects the apps management page. E.g. after switching to the beta channel, beta app updates will be offered to you in the apps management page." : "Alább módosíthatja a frissítési csatornát, amely érinti az alkalmazáskezelés oldalt is. Például ha a béta csatornára bált, akkor a béta alkalmazásfrissítések is fel lesznek kínálva az alkalmazáskezelés oldalon.", "Update channel:" : "Frissítési csatorna:", "You can always update to a newer version. But you can never downgrade to a more stable version." : "Bármikor frissíthet egy újabb verzióra, viszont sosem léphet vissza egy stabilabb verzióra.", "Notify members of the following groups about available updates:" : "A következő csoport tagjainak értesítése az elérhető frissítésekről:", diff --git a/apps/updatenotification/l10n/hu.json b/apps/updatenotification/l10n/hu.json index a8701d8b0e4..9b21c0b49d7 100644 --- a/apps/updatenotification/l10n/hu.json +++ b/apps/updatenotification/l10n/hu.json @@ -14,6 +14,7 @@ "Apps missing compatible version" : "Az alkalmazásoknak nincs kompatibilis verziója", "View in store" : "Megtekintés a tárban", "Apps with compatible version" : "Alkalmazások kompatibilis verzióval", + "Please note that the web updater is not recommended with more than 100 users! Please use the command line updater instead!" : "Vegye figyelembe, hogy a webes frissítő több mint 100 felhasználóval nem ajánlott. Használja helyette a parancssoros frissítőt.", "Open updater" : "Frissítő megnyitása", "Download now" : "Letöltés most", "Please use the command line updater to update." : "Az frissítéshez kérjük használja a parancssoros frissítéskezelőt.", @@ -21,6 +22,7 @@ "The update check is not yet finished. Please refresh the page." : "A frissítéskeresés még nem ért véget. Frissítse az oldalt.", "Your version is up to date." : "A verziója naprakész.", "A non-default update server is in use to be checked for updates:" : "Egy nem alapértelmezett frissítési kiszolgáló van használatban a frissítések kereséséhez:", + "You can change the update channel below which also affects the apps management page. E.g. after switching to the beta channel, beta app updates will be offered to you in the apps management page." : "Alább módosíthatja a frissítési csatornát, amely érinti az alkalmazáskezelés oldalt is. Például ha a béta csatornára bált, akkor a béta alkalmazásfrissítések is fel lesznek kínálva az alkalmazáskezelés oldalon.", "Update channel:" : "Frissítési csatorna:", "You can always update to a newer version. But you can never downgrade to a more stable version." : "Bármikor frissíthet egy újabb verzióra, viszont sosem léphet vissza egy stabilabb verzióra.", "Notify members of the following groups about available updates:" : "A következő csoport tagjainak értesítése az elérhető frissítésekről:", diff --git a/apps/updatenotification/l10n/lt_LT.js b/apps/updatenotification/l10n/lt_LT.js index 879f3377f30..835d04c6f95 100644 --- a/apps/updatenotification/l10n/lt_LT.js +++ b/apps/updatenotification/l10n/lt_LT.js @@ -1,7 +1,7 @@ OC.L10N.register( "updatenotification", { - "{version} is available. Get more information on how to update." : "Yra prieinama {version}. Gaukite daugiau informacijos apie tai kaip atnaujinti.", + "{version} is available. Get more information on how to update." : "Yra prieinama {version}. Gaukite daugiau informacijos apie tai, kaip atnaujinti.", "Channel updated" : "Kanalas atnaujintas", "Update notifications" : "Atnaujinimų pranešimai", "The update server could not be reached since %d days to check for new updates." : " Atnaujinimo serveris nepasiekiamas %d dienas.", diff --git a/apps/updatenotification/l10n/lt_LT.json b/apps/updatenotification/l10n/lt_LT.json index bf7df4f2c3d..9695c5ffefe 100644 --- a/apps/updatenotification/l10n/lt_LT.json +++ b/apps/updatenotification/l10n/lt_LT.json @@ -1,5 +1,5 @@ { "translations": { - "{version} is available. Get more information on how to update." : "Yra prieinama {version}. Gaukite daugiau informacijos apie tai kaip atnaujinti.", + "{version} is available. Get more information on how to update." : "Yra prieinama {version}. Gaukite daugiau informacijos apie tai, kaip atnaujinti.", "Channel updated" : "Kanalas atnaujintas", "Update notifications" : "Atnaujinimų pranešimai", "The update server could not be reached since %d days to check for new updates." : " Atnaujinimo serveris nepasiekiamas %d dienas.", diff --git a/apps/updatenotification/l10n/pl.js b/apps/updatenotification/l10n/pl.js index f979965cbd4..4c0a581e9a1 100644 --- a/apps/updatenotification/l10n/pl.js +++ b/apps/updatenotification/l10n/pl.js @@ -16,6 +16,7 @@ OC.L10N.register( "Apps missing compatible version" : "W aplikacjach brakuje zgodnej wersji", "View in store" : "Zobacz w sklepie", "Apps with compatible version" : "Aplikacje z kompatybilną wersją", + "Please note that the web updater is not recommended with more than 100 users! Please use the command line updater instead!" : "Należy pamiętać, że aktualizacja sieciowa nie jest zalecana przy więcej niż 100 użytkownikach! Zamiast tego użyj narzędzia do aktualizacji wiersza poleceń!", "Open updater" : "Otwórz aktualizator", "Download now" : "Pobierz teraz", "Please use the command line updater to update." : "Użyj wiersza poleceń do aktualizacji.", @@ -23,6 +24,7 @@ OC.L10N.register( "The update check is not yet finished. Please refresh the page." : "Sprawdzanie aktualizacji nie zostało jeszcze zakończone. Odśwież stronę.", "Your version is up to date." : "Posiadasz aktualną wersję.", "A non-default update server is in use to be checked for updates:" : "Do sprawdzania aktualizacji nie są używane domyślne serwery aktualizacji:", + "You can change the update channel below which also affects the apps management page. E.g. after switching to the beta channel, beta app updates will be offered to you in the apps management page." : "Możesz zmienić kanał aktualizacji poniżej, co wpływa również na stronę zarządzania aplikacjami. Np. po przejściu na kanał beta aktualizacje aplikacji beta będą dostępne na stronie zarządzania aplikacjami.", "Update channel:" : "Kanał aktualizacji:", "You can always update to a newer version. But you can never downgrade to a more stable version." : "Zawsze możesz zaktualizować do nowszej wersji. Ale nigdy nie możesz powrócić do wersji bardziej stabilnej.", "Notify members of the following groups about available updates:" : "Powiadom członków następujących grup o dostępnych aktualizacjach:", diff --git a/apps/updatenotification/l10n/pl.json b/apps/updatenotification/l10n/pl.json index 4a653ea5541..281cdbe998f 100644 --- a/apps/updatenotification/l10n/pl.json +++ b/apps/updatenotification/l10n/pl.json @@ -14,6 +14,7 @@ "Apps missing compatible version" : "W aplikacjach brakuje zgodnej wersji", "View in store" : "Zobacz w sklepie", "Apps with compatible version" : "Aplikacje z kompatybilną wersją", + "Please note that the web updater is not recommended with more than 100 users! Please use the command line updater instead!" : "Należy pamiętać, że aktualizacja sieciowa nie jest zalecana przy więcej niż 100 użytkownikach! Zamiast tego użyj narzędzia do aktualizacji wiersza poleceń!", "Open updater" : "Otwórz aktualizator", "Download now" : "Pobierz teraz", "Please use the command line updater to update." : "Użyj wiersza poleceń do aktualizacji.", @@ -21,6 +22,7 @@ "The update check is not yet finished. Please refresh the page." : "Sprawdzanie aktualizacji nie zostało jeszcze zakończone. Odśwież stronę.", "Your version is up to date." : "Posiadasz aktualną wersję.", "A non-default update server is in use to be checked for updates:" : "Do sprawdzania aktualizacji nie są używane domyślne serwery aktualizacji:", + "You can change the update channel below which also affects the apps management page. E.g. after switching to the beta channel, beta app updates will be offered to you in the apps management page." : "Możesz zmienić kanał aktualizacji poniżej, co wpływa również na stronę zarządzania aplikacjami. Np. po przejściu na kanał beta aktualizacje aplikacji beta będą dostępne na stronie zarządzania aplikacjami.", "Update channel:" : "Kanał aktualizacji:", "You can always update to a newer version. But you can never downgrade to a more stable version." : "Zawsze możesz zaktualizować do nowszej wersji. Ale nigdy nie możesz powrócić do wersji bardziej stabilnej.", "Notify members of the following groups about available updates:" : "Powiadom członków następujących grup o dostępnych aktualizacjach:", diff --git a/apps/updatenotification/l10n/tr.js b/apps/updatenotification/l10n/tr.js index d09d9f7df63..30dc1c81e84 100644 --- a/apps/updatenotification/l10n/tr.js +++ b/apps/updatenotification/l10n/tr.js @@ -16,6 +16,7 @@ OC.L10N.register( "Apps missing compatible version" : "Uyumlu sürümü olmayan uygulamalar", "View in store" : "Mağazada görüntüle", "Apps with compatible version" : "Uyumlu sürümü olan uygulamalar", + "Please note that the web updater is not recommended with more than 100 users! Please use the command line updater instead!" : "100 kullanıcı üzerinde web güncelleyicinin kullanılmasının önerilmediğini unutmayın! Lütfen bunun yerine komut satırı güncelleyicisini kullanın!", "Open updater" : "Güncelleyici aç", "Download now" : "İndir", "Please use the command line updater to update." : "Lütfen güncellemek için komut satırı güncelleyiciyi kullanın.", @@ -23,6 +24,7 @@ OC.L10N.register( "The update check is not yet finished. Please refresh the page." : "Güncelleme denetimi henüz tamamlanmadı. Lütfen sayfayı yenileyin.", "Your version is up to date." : "Sürümünüz güncel.", "A non-default update server is in use to be checked for updates:" : "Güncelleme denetimi için varsayılan sunucudan başka bir sunucu kullanılıyor:", + "You can change the update channel below which also affects the apps management page. E.g. after switching to the beta channel, beta app updates will be offered to you in the apps management page." : "Uygulama yönetimi sayfasını da etkileyen aşağıdaki güncelleme kanalını değiştirebilirsiniz. Örneğin. beta kanalına geçtikten sonra, uygulama yönetimi sayfasında beta uygulama güncellemeleri sunulur.", "Update channel:" : "Güncelleme kanalı:", "You can always update to a newer version. But you can never downgrade to a more stable version." : "Her zaman bir üst sürüme güncelleyebilirsiniz ancak asla daha kararlı bir eski sürüme dönemezsiniz.", "Notify members of the following groups about available updates:" : "Yayınlanan güncellemeler şu grupların üyelerine bildirilsin:", diff --git a/apps/updatenotification/l10n/tr.json b/apps/updatenotification/l10n/tr.json index 651f7e6765c..ca1c260bf21 100644 --- a/apps/updatenotification/l10n/tr.json +++ b/apps/updatenotification/l10n/tr.json @@ -14,6 +14,7 @@ "Apps missing compatible version" : "Uyumlu sürümü olmayan uygulamalar", "View in store" : "Mağazada görüntüle", "Apps with compatible version" : "Uyumlu sürümü olan uygulamalar", + "Please note that the web updater is not recommended with more than 100 users! Please use the command line updater instead!" : "100 kullanıcı üzerinde web güncelleyicinin kullanılmasının önerilmediğini unutmayın! Lütfen bunun yerine komut satırı güncelleyicisini kullanın!", "Open updater" : "Güncelleyici aç", "Download now" : "İndir", "Please use the command line updater to update." : "Lütfen güncellemek için komut satırı güncelleyiciyi kullanın.", @@ -21,6 +22,7 @@ "The update check is not yet finished. Please refresh the page." : "Güncelleme denetimi henüz tamamlanmadı. Lütfen sayfayı yenileyin.", "Your version is up to date." : "Sürümünüz güncel.", "A non-default update server is in use to be checked for updates:" : "Güncelleme denetimi için varsayılan sunucudan başka bir sunucu kullanılıyor:", + "You can change the update channel below which also affects the apps management page. E.g. after switching to the beta channel, beta app updates will be offered to you in the apps management page." : "Uygulama yönetimi sayfasını da etkileyen aşağıdaki güncelleme kanalını değiştirebilirsiniz. Örneğin. beta kanalına geçtikten sonra, uygulama yönetimi sayfasında beta uygulama güncellemeleri sunulur.", "Update channel:" : "Güncelleme kanalı:", "You can always update to a newer version. But you can never downgrade to a more stable version." : "Her zaman bir üst sürüme güncelleyebilirsiniz ancak asla daha kararlı bir eski sürüme dönemezsiniz.", "Notify members of the following groups about available updates:" : "Yayınlanan güncellemeler şu grupların üyelerine bildirilsin:", diff --git a/apps/updatenotification/l10n/zh_HK.js b/apps/updatenotification/l10n/zh_HK.js index 236b050ecde..8484706d735 100644 --- a/apps/updatenotification/l10n/zh_HK.js +++ b/apps/updatenotification/l10n/zh_HK.js @@ -16,6 +16,7 @@ OC.L10N.register( "Apps missing compatible version" : "應用程式缺少兼容版本", "View in store" : "在商店中檢視", "Apps with compatible version" : "具有兼容版本的應用程式", + "Please note that the web updater is not recommended with more than 100 users! Please use the command line updater instead!" : "請注意,不建議使用超過 100 個用戶的網絡更新程序! 請改用命令行更新程序!", "Open updater" : "打開更新程式", "Download now" : "立即下載", "Please use the command line updater to update." : "請使用命令行更新程序進行更新。", diff --git a/apps/updatenotification/l10n/zh_HK.json b/apps/updatenotification/l10n/zh_HK.json index e8b1f71eb1f..fb4bb9d55d7 100644 --- a/apps/updatenotification/l10n/zh_HK.json +++ b/apps/updatenotification/l10n/zh_HK.json @@ -14,6 +14,7 @@ "Apps missing compatible version" : "應用程式缺少兼容版本", "View in store" : "在商店中檢視", "Apps with compatible version" : "具有兼容版本的應用程式", + "Please note that the web updater is not recommended with more than 100 users! Please use the command line updater instead!" : "請注意,不建議使用超過 100 個用戶的網絡更新程序! 請改用命令行更新程序!", "Open updater" : "打開更新程式", "Download now" : "立即下載", "Please use the command line updater to update." : "請使用命令行更新程序進行更新。", diff --git a/apps/updatenotification/l10n/zh_TW.js b/apps/updatenotification/l10n/zh_TW.js index b0d2c6bc1b7..6f85eccc8c4 100644 --- a/apps/updatenotification/l10n/zh_TW.js +++ b/apps/updatenotification/l10n/zh_TW.js @@ -16,6 +16,7 @@ OC.L10N.register( "Apps missing compatible version" : "應用程式缺少相容的版本", "View in store" : "在商店中檢視", "Apps with compatible version" : "有相容版本的應用程式", + "Please note that the web updater is not recommended with more than 100 users! Please use the command line updater instead!" : "請注意,不建議超過 100 個使用者的站台使用網頁更新程式!請改用命令列更新程式!", "Open updater" : "打開更新程式", "Download now" : "現在下載", "Please use the command line updater to update." : "請使用命令列更新程式來更新。", @@ -23,6 +24,7 @@ OC.L10N.register( "The update check is not yet finished. Please refresh the page." : "更新檢查未完成。請重新整理此頁面。", "Your version is up to date." : "您的版本是最新版。", "A non-default update server is in use to be checked for updates:" : "使用非預設的更新伺服器檢查更新:", + "You can change the update channel below which also affects the apps management page. E.g. after switching to the beta channel, beta app updates will be offered to you in the apps management page." : "您可以變更下方的更新頻道,這也會影響應用程式管理頁面。例如,切換到測試版頻道後,在應用程式管理頁更新應用程式時也會提供測試版。", "Update channel:" : "更新頻道:", "You can always update to a newer version. But you can never downgrade to a more stable version." : "您始終可以更新到較新的版本。但您無法降級到較穩定的版本。", "Notify members of the following groups about available updates:" : "有可用更新時通知這些群組的成員:", diff --git a/apps/updatenotification/l10n/zh_TW.json b/apps/updatenotification/l10n/zh_TW.json index c23a320d644..6ba3b8ef7f1 100644 --- a/apps/updatenotification/l10n/zh_TW.json +++ b/apps/updatenotification/l10n/zh_TW.json @@ -14,6 +14,7 @@ "Apps missing compatible version" : "應用程式缺少相容的版本", "View in store" : "在商店中檢視", "Apps with compatible version" : "有相容版本的應用程式", + "Please note that the web updater is not recommended with more than 100 users! Please use the command line updater instead!" : "請注意,不建議超過 100 個使用者的站台使用網頁更新程式!請改用命令列更新程式!", "Open updater" : "打開更新程式", "Download now" : "現在下載", "Please use the command line updater to update." : "請使用命令列更新程式來更新。", @@ -21,6 +22,7 @@ "The update check is not yet finished. Please refresh the page." : "更新檢查未完成。請重新整理此頁面。", "Your version is up to date." : "您的版本是最新版。", "A non-default update server is in use to be checked for updates:" : "使用非預設的更新伺服器檢查更新:", + "You can change the update channel below which also affects the apps management page. E.g. after switching to the beta channel, beta app updates will be offered to you in the apps management page." : "您可以變更下方的更新頻道,這也會影響應用程式管理頁面。例如,切換到測試版頻道後,在應用程式管理頁更新應用程式時也會提供測試版。", "Update channel:" : "更新頻道:", "You can always update to a newer version. But you can never downgrade to a more stable version." : "您始終可以更新到較新的版本。但您無法降級到較穩定的版本。", "Notify members of the following groups about available updates:" : "有可用更新時通知這些群組的成員:", diff --git a/apps/updatenotification/lib/Settings/Admin.php b/apps/updatenotification/lib/Settings/Admin.php index 880b43906eb..b8062efd81f 100644 --- a/apps/updatenotification/lib/Settings/Admin.php +++ b/apps/updatenotification/lib/Settings/Admin.php @@ -29,6 +29,8 @@ declare(strict_types=1); */ namespace OCA\UpdateNotification\Settings; +use OC\User\Backend; +use OCP\User\Backend\ICountUsersBackend; use OCA\UpdateNotification\UpdateChecker; use OCP\AppFramework\Http\TemplateResponse; use OCP\IConfig; @@ -38,6 +40,8 @@ use OCP\L10N\IFactory; use OCP\Settings\ISettings; use OCP\Support\Subscription\IRegistry; use OCP\Util; +use OCP\IUserManager; +use Psr\Log\LoggerInterface; class Admin implements ISettings { /** @var IConfig */ @@ -52,6 +56,10 @@ class Admin implements ISettings { private $l10nFactory; /** @var IRegistry */ private $subscriptionRegistry; + /** @var IUserManager */ + private $userManager; + /** @var LoggerInterface */ + private $logger; public function __construct( IConfig $config, @@ -59,7 +67,9 @@ class Admin implements ISettings { IGroupManager $groupManager, IDateTimeFormatter $dateTimeFormatter, IFactory $l10nFactory, - IRegistry $subscriptionRegistry + IRegistry $subscriptionRegistry, + IUserManager $userManager, + LoggerInterface $logger ) { $this->config = $config; $this->updateChecker = $updateChecker; @@ -67,6 +77,8 @@ class Admin implements ISettings { $this->dateTimeFormatter = $dateTimeFormatter; $this->l10nFactory = $l10nFactory; $this->subscriptionRegistry = $subscriptionRegistry; + $this->userManager = $userManager; + $this->logger = $logger; } /** @@ -111,6 +123,7 @@ class Admin implements ISettings { 'downloadLink' => empty($updateState['downloadLink']) ? '' : $updateState['downloadLink'], 'changes' => $this->filterChanges($updateState['changes'] ?? []), 'webUpdaterEnabled' => !$this->config->getSystemValue('upgrade.disable-web', false), + 'isWebUpdaterRecommended' => $this->isWebUpdaterRecommended(), 'updaterEnabled' => empty($updateState['updaterEnabled']) ? false : $updateState['updaterEnabled'], 'versionIsEol' => empty($updateState['versionIsEol']) ? false : $updateState['versionIsEol'], 'isDefaultUpdateServerURL' => $isDefaultUpdateServerURL, @@ -184,4 +197,28 @@ class Admin implements ISettings { public function getPriority(): int { return 11; } + + private function isWebUpdaterRecommended(): bool { + return $this->getUserCount() < 100; + } + + /** + * @see https://github.com/nextcloud/server/blob/39494fbf794d982f6f6551c984e6ca4c4e947d01/lib/private/Support/Subscription/Registry.php#L188-L216 implementation reference + */ + private function getUserCount(): int { + $userCount = 0; + $backends = $this->userManager->getBackends(); + foreach ($backends as $backend) { + // TODO: change below to 'if ($backend instanceof ICountUsersBackend) {' + if ($backend->implementsActions(Backend::COUNT_USERS)) { + /** @var ICountUsersBackend $backend */ + $backendUsers = $backend->countUsers(); + if ($backendUsers !== false) { + $userCount += $backendUsers; + } + } + } + + return $userCount; + } } diff --git a/apps/updatenotification/src/components/UpdateNotification.vue b/apps/updatenotification/src/components/UpdateNotification.vue index 09c229fb36e..6fc48978852 100644 --- a/apps/updatenotification/src/components/UpdateNotification.vue +++ b/apps/updatenotification/src/components/UpdateNotification.vue @@ -41,6 +41,12 @@ </ul> </template> + <template v-if="!isWebUpdaterRecommended && updaterEnabled && webUpdaterEnabled"> + <h3 class="warning"> + {{ t('updatenotification', 'Please note that the web updater is not recommended with more than 100 users! Please use the command line updater instead!') }} + </h3> + </template> + <div> <a v-if="updaterEnabled && webUpdaterEnabled" href="#" @@ -78,6 +84,10 @@ </template> </div> + <div> + {{ t('updatenotification', 'You can change the update channel below which also affects the apps management page. E.g. after switching to the beta channel, beta app updates will be offered to you in the apps management page.') }} + </div> + <h3 class="update-channel-selector"> {{ t('updatenotification', 'Update channel:') }} <div v-click-outside="closeUpdateChannelMenu" class="update-menu"> @@ -136,6 +146,7 @@ export default { lastCheckedDate: '', isUpdateChecked: false, webUpdaterEnabled: true, + isWebUpdaterRecommended: true, updaterEnabled: true, versionIsEol: false, downloadLink: '', @@ -328,6 +339,7 @@ export default { this.lastCheckedDate = data.lastChecked this.isUpdateChecked = data.isUpdateChecked this.webUpdaterEnabled = data.webUpdaterEnabled + this.isWebUpdaterRecommended = data.isWebUpdaterRecommended this.updaterEnabled = data.updaterEnabled this.downloadLink = data.downloadLink this.isNewVersionAvailable = data.isNewVersionAvailable diff --git a/apps/updatenotification/tests/Settings/AdminTest.php b/apps/updatenotification/tests/Settings/AdminTest.php index 186c5a09070..852504fb45a 100644 --- a/apps/updatenotification/tests/Settings/AdminTest.php +++ b/apps/updatenotification/tests/Settings/AdminTest.php @@ -41,6 +41,8 @@ use OCP\L10N\ILanguageIterator; use OCP\Support\Subscription\IRegistry; use OCP\Util; use Test\TestCase; +use OCP\IUserManager; +use Psr\Log\LoggerInterface; class AdminTest extends TestCase { /** @var IFactory|\PHPUnit\Framework\MockObject\MockObject */ @@ -57,6 +59,10 @@ class AdminTest extends TestCase { private $dateTimeFormatter; /** @var IRegistry|\PHPUnit\Framework\MockObject\MockObject */ private $subscriptionRegistry; + /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */ + private $userManager; + /** @var LoggerInterface|\PHPUnit\Framework\MockObject\MockObject */ + private $logger; protected function setUp(): void { parent::setUp(); @@ -67,13 +73,58 @@ class AdminTest extends TestCase { $this->dateTimeFormatter = $this->createMock(IDateTimeFormatter::class); $this->l10nFactory = $this->createMock(IFactory::class); $this->subscriptionRegistry = $this->createMock(IRegistry::class); + $this->userManager = $this->createMock(IUserManager::class); + $this->logger = $this->createMock(LoggerInterface::class); $this->admin = new Admin( - $this->config, $this->updateChecker, $this->groupManager, $this->dateTimeFormatter, $this->l10nFactory, $this->subscriptionRegistry + $this->config, + $this->updateChecker, + $this->groupManager, + $this->dateTimeFormatter, + $this->l10nFactory, + $this->subscriptionRegistry, + $this->userManager, + $this->logger ); } public function testGetFormWithUpdate() { + $backend1 = $this->createMock(UserInterface::class); + $backend2 = $this->createMock(UserInterface::class); + $backend3 = $this->createMock(UserInterface::class); + $backend1 + ->expects($this->once()) + ->method('implementsActions') + ->with(Backend::COUNT_USERS) + ->willReturn(false); + $backend2 + ->expects($this->once()) + ->method('implementsActions') + ->with(Backend::COUNT_USERS) + ->willReturn(true); + $backend3 + ->expects($this->once()) + ->method('implementsActions') + ->with(Backend::COUNT_USERS) + ->willReturn(true); + $backend1 + ->expects($this->never()) + ->method('countUsers'); + $backend2 + ->expects($this->once()) + ->method('countUsers') + ->with() + ->willReturn(false); + $backend3 + ->expects($this->once()) + ->method('countUsers') + ->with() + ->willReturn(5); + $this->userManager + ->expects($this->once()) + ->method('getBackends') + ->with() + ->willReturn([$backend1, $backend2, $backend3]); $channels = [ 'daily', 'beta', @@ -145,6 +196,7 @@ class AdminTest extends TestCase { 'downloadLink' => 'https://downloads.nextcloud.org/server', 'changes' => [], 'webUpdaterEnabled' => true, + 'isWebUpdaterRecommended' => true, 'updaterEnabled' => true, 'versionIsEol' => false, 'isDefaultUpdateServerURL' => true, @@ -161,6 +213,42 @@ class AdminTest extends TestCase { } public function testGetFormWithUpdateAndChangedUpdateServer() { + $backend1 = $this->createMock(UserInterface::class); + $backend2 = $this->createMock(UserInterface::class); + $backend3 = $this->createMock(UserInterface::class); + $backend1 + ->expects($this->once()) + ->method('implementsActions') + ->with(Backend::COUNT_USERS) + ->willReturn(false); + $backend2 + ->expects($this->once()) + ->method('implementsActions') + ->with(Backend::COUNT_USERS) + ->willReturn(true); + $backend3 + ->expects($this->once()) + ->method('implementsActions') + ->with(Backend::COUNT_USERS) + ->willReturn(true); + $backend1 + ->expects($this->never()) + ->method('countUsers'); + $backend2 + ->expects($this->once()) + ->method('countUsers') + ->with() + ->willReturn(false); + $backend3 + ->expects($this->once()) + ->method('countUsers') + ->with() + ->willReturn(5); + $this->userManager + ->expects($this->once()) + ->method('getBackends') + ->with() + ->willReturn([$backend1, $backend2, $backend3]); $channels = [ 'daily', 'beta', @@ -232,6 +320,7 @@ class AdminTest extends TestCase { 'downloadLink' => 'https://downloads.nextcloud.org/server', 'changes' => [], 'webUpdaterEnabled' => false, + 'isWebUpdaterRecommended' => true, 'updaterEnabled' => true, 'versionIsEol' => false, 'isDefaultUpdateServerURL' => false, @@ -248,6 +337,42 @@ class AdminTest extends TestCase { } public function testGetFormWithUpdateAndCustomersUpdateServer() { + $backend1 = $this->createMock(UserInterface::class); + $backend2 = $this->createMock(UserInterface::class); + $backend3 = $this->createMock(UserInterface::class); + $backend1 + ->expects($this->once()) + ->method('implementsActions') + ->with(Backend::COUNT_USERS) + ->willReturn(false); + $backend2 + ->expects($this->once()) + ->method('implementsActions') + ->with(Backend::COUNT_USERS) + ->willReturn(true); + $backend3 + ->expects($this->once()) + ->method('implementsActions') + ->with(Backend::COUNT_USERS) + ->willReturn(true); + $backend1 + ->expects($this->never()) + ->method('countUsers'); + $backend2 + ->expects($this->once()) + ->method('countUsers') + ->with() + ->willReturn(false); + $backend3 + ->expects($this->once()) + ->method('countUsers') + ->with() + ->willReturn(5); + $this->userManager + ->expects($this->once()) + ->method('getBackends') + ->with() + ->willReturn([$backend1, $backend2, $backend3]); $channels = [ 'daily', 'beta', @@ -319,6 +444,7 @@ class AdminTest extends TestCase { 'downloadLink' => 'https://downloads.nextcloud.org/server', 'changes' => [], 'webUpdaterEnabled' => true, + 'isWebUpdaterRecommended' => true, 'updaterEnabled' => true, 'versionIsEol' => false, 'isDefaultUpdateServerURL' => true, |