diff options
Diffstat (limited to 'lib')
51 files changed, 450 insertions, 94 deletions
diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php index 203b6cfecda..7d8946e87c2 100644 --- a/lib/composer/composer/autoload_classmap.php +++ b/lib/composer/composer/autoload_classmap.php @@ -99,6 +99,7 @@ return array( 'OCP\\BackgroundJob\\Job' => $baseDir . '/lib/public/BackgroundJob/Job.php', 'OCP\\BackgroundJob\\QueuedJob' => $baseDir . '/lib/public/BackgroundJob/QueuedJob.php', 'OCP\\BackgroundJob\\TimedJob' => $baseDir . '/lib/public/BackgroundJob/TimedJob.php', + 'OCP\\Broadcast\\Events\\IBroadcastEvent' => $baseDir . '/lib/public/Broadcast/Events/IBroadcastEvent.php', 'OCP\\Calendar\\BackendTemporarilyUnavailableException' => $baseDir . '/lib/public/Calendar/BackendTemporarilyUnavailableException.php', 'OCP\\Calendar\\ICalendar' => $baseDir . '/lib/public/Calendar/ICalendar.php', 'OCP\\Calendar\\IManager' => $baseDir . '/lib/public/Calendar/IManager.php', @@ -174,6 +175,7 @@ return array( 'OCP\\Encryption\\IFile' => $baseDir . '/lib/public/Encryption/IFile.php', 'OCP\\Encryption\\IManager' => $baseDir . '/lib/public/Encryption/IManager.php', 'OCP\\Encryption\\Keys\\IStorage' => $baseDir . '/lib/public/Encryption/Keys/IStorage.php', + 'OCP\\EventDispatcher\\ABroadcastedEvent' => $baseDir . '/lib/public/EventDispatcher/ABroadcastedEvent.php', 'OCP\\EventDispatcher\\Event' => $baseDir . '/lib/public/EventDispatcher/Event.php', 'OCP\\EventDispatcher\\IEventDispatcher' => $baseDir . '/lib/public/EventDispatcher/IEventDispatcher.php', 'OCP\\EventDispatcher\\IEventListener' => $baseDir . '/lib/public/EventDispatcher/IEventListener.php', @@ -596,6 +598,7 @@ return array( 'OC\\BackgroundJob\\Legacy\\RegularJob' => $baseDir . '/lib/private/BackgroundJob/Legacy/RegularJob.php', 'OC\\BackgroundJob\\QueuedJob' => $baseDir . '/lib/private/BackgroundJob/QueuedJob.php', 'OC\\BackgroundJob\\TimedJob' => $baseDir . '/lib/private/BackgroundJob/TimedJob.php', + 'OC\\Broadcast\\Events\\BroadcastEvent' => $baseDir . '/lib/private/Broadcast/Events/BroadcastEvent.php', 'OC\\Cache\\CappedMemoryCache' => $baseDir . '/lib/private/Cache/CappedMemoryCache.php', 'OC\\Cache\\File' => $baseDir . '/lib/private/Cache/File.php', 'OC\\Calendar\\Manager' => $baseDir . '/lib/private/Calendar/Manager.php', @@ -653,6 +656,7 @@ return array( 'OC\\Core\\Command\\Background\\Cron' => $baseDir . '/core/Command/Background/Cron.php', 'OC\\Core\\Command\\Background\\WebCron' => $baseDir . '/core/Command/Background/WebCron.php', 'OC\\Core\\Command\\Base' => $baseDir . '/core/Command/Base.php', + 'OC\\Core\\Command\\Broadcast\\Test' => $baseDir . '/core/Command/Broadcast/Test.php', 'OC\\Core\\Command\\Check' => $baseDir . '/core/Command/Check.php', 'OC\\Core\\Command\\Config\\App\\Base' => $baseDir . '/core/Command/Config/App/Base.php', 'OC\\Core\\Command\\Config\\App\\DeleteConfig' => $baseDir . '/core/Command/Config/App/DeleteConfig.php', diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php index 7641293473c..c372f9cde9f 100644 --- a/lib/composer/composer/autoload_static.php +++ b/lib/composer/composer/autoload_static.php @@ -128,6 +128,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OCP\\BackgroundJob\\Job' => __DIR__ . '/../../..' . '/lib/public/BackgroundJob/Job.php', 'OCP\\BackgroundJob\\QueuedJob' => __DIR__ . '/../../..' . '/lib/public/BackgroundJob/QueuedJob.php', 'OCP\\BackgroundJob\\TimedJob' => __DIR__ . '/../../..' . '/lib/public/BackgroundJob/TimedJob.php', + 'OCP\\Broadcast\\Events\\IBroadcastEvent' => __DIR__ . '/../../..' . '/lib/public/Broadcast/Events/IBroadcastEvent.php', 'OCP\\Calendar\\BackendTemporarilyUnavailableException' => __DIR__ . '/../../..' . '/lib/public/Calendar/BackendTemporarilyUnavailableException.php', 'OCP\\Calendar\\ICalendar' => __DIR__ . '/../../..' . '/lib/public/Calendar/ICalendar.php', 'OCP\\Calendar\\IManager' => __DIR__ . '/../../..' . '/lib/public/Calendar/IManager.php', @@ -203,6 +204,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OCP\\Encryption\\IFile' => __DIR__ . '/../../..' . '/lib/public/Encryption/IFile.php', 'OCP\\Encryption\\IManager' => __DIR__ . '/../../..' . '/lib/public/Encryption/IManager.php', 'OCP\\Encryption\\Keys\\IStorage' => __DIR__ . '/../../..' . '/lib/public/Encryption/Keys/IStorage.php', + 'OCP\\EventDispatcher\\ABroadcastedEvent' => __DIR__ . '/../../..' . '/lib/public/EventDispatcher/ABroadcastedEvent.php', 'OCP\\EventDispatcher\\Event' => __DIR__ . '/../../..' . '/lib/public/EventDispatcher/Event.php', 'OCP\\EventDispatcher\\IEventDispatcher' => __DIR__ . '/../../..' . '/lib/public/EventDispatcher/IEventDispatcher.php', 'OCP\\EventDispatcher\\IEventListener' => __DIR__ . '/../../..' . '/lib/public/EventDispatcher/IEventListener.php', @@ -625,6 +627,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\BackgroundJob\\Legacy\\RegularJob' => __DIR__ . '/../../..' . '/lib/private/BackgroundJob/Legacy/RegularJob.php', 'OC\\BackgroundJob\\QueuedJob' => __DIR__ . '/../../..' . '/lib/private/BackgroundJob/QueuedJob.php', 'OC\\BackgroundJob\\TimedJob' => __DIR__ . '/../../..' . '/lib/private/BackgroundJob/TimedJob.php', + 'OC\\Broadcast\\Events\\BroadcastEvent' => __DIR__ . '/../../..' . '/lib/private/Broadcast/Events/BroadcastEvent.php', 'OC\\Cache\\CappedMemoryCache' => __DIR__ . '/../../..' . '/lib/private/Cache/CappedMemoryCache.php', 'OC\\Cache\\File' => __DIR__ . '/../../..' . '/lib/private/Cache/File.php', 'OC\\Calendar\\Manager' => __DIR__ . '/../../..' . '/lib/private/Calendar/Manager.php', @@ -682,6 +685,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\Core\\Command\\Background\\Cron' => __DIR__ . '/../../..' . '/core/Command/Background/Cron.php', 'OC\\Core\\Command\\Background\\WebCron' => __DIR__ . '/../../..' . '/core/Command/Background/WebCron.php', 'OC\\Core\\Command\\Base' => __DIR__ . '/../../..' . '/core/Command/Base.php', + 'OC\\Core\\Command\\Broadcast\\Test' => __DIR__ . '/../../..' . '/core/Command/Broadcast/Test.php', 'OC\\Core\\Command\\Check' => __DIR__ . '/../../..' . '/core/Command/Check.php', 'OC\\Core\\Command\\Config\\App\\Base' => __DIR__ . '/../../..' . '/core/Command/Config/App/Base.php', 'OC\\Core\\Command\\Config\\App\\DeleteConfig' => __DIR__ . '/../../..' . '/core/Command/Config/App/DeleteConfig.php', diff --git a/lib/l10n/cs.js b/lib/l10n/cs.js index 799a8af5b9d..445db174a4a 100644 --- a/lib/l10n/cs.js +++ b/lib/l10n/cs.js @@ -31,8 +31,14 @@ OC.L10N.register( "Server version %s or lower is required." : "Je potřeba verze serveru %s nebo nižší.", "Logged in user must be an admin or sub admin" : "Je třeba, aby přihlášený uživatel byl správcem či dílčím správcem", "Logged in user must be an admin" : "Je třeba, aby přihlášený uživatel byl správce", + "»%s« started remote wipe" : "»%s« vzdálené vymazání spuštěno", + "Device or application »%s« has started the remote wipe process. You will receive another email once the process has finished" : "Přístroj či aplikace »%s« spustila proces vzdáleného vymazání. Obdržíte další email poté co bude proces ukončen", + "»%s« finished remote wipe" : "»%s« vzdálené vymazání dokončeno", + "Device or application »%s« has finished the remote wipe process." : "Přístroj či aplikace »%s« dokončila proces vzdáleného vymazání.", "Remote wipe started" : "Vymazání na dálku zahájeno", + "A remote wipe was started on device %s" : "Vzdálené vymazání běží na přístroji %s", "Remote wipe finished" : "Vymazání na dálku dokončeno", + "The remote wipe on %s has finished" : "Vzdálené vymazání přístroje %s dokončeno", "Authentication" : "Ověření", "Unknown filetype" : "Neznámý typ souboru", "Invalid image" : "Chybný obrázek", @@ -99,9 +105,9 @@ OC.L10N.register( "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Úložiště pro sdílení %s musí implementovat rozhraní OCP\\Share_Backend", "Sharing backend %s not found" : "Úložiště sdílení %s nenalezeno", "Sharing backend for %s not found" : "Úložiště sdílení pro %s nenalezeno", - "%1$s shared »%2$s« with you and wants to add:" : "%1$s vám nasdílel(a) „%2$s“ a chce přidat:", - "%1$s shared »%2$s« with you and wants to add" : "%1$s vám nasdílel(a) „%2$s“ a chce přidat", - "»%s« added a note to a file shared with you" : "„%s“ přidal(a) poznámku k souboru, který je s vámi sdílený", + "%1$s shared »%2$s« with you and wants to add:" : "%1$s sdílí »%2$s« a dodává:", + "%1$s shared »%2$s« with you and wants to add" : "%1$s sdílí »%2$s« a dodává", + "»%s« added a note to a file shared with you" : "»%s« dodává poznámku k nasdílenému souboru ", "Open »%s«" : "Otevřít „%s“", "%1$s via %2$s" : "%1$s prostřednictvím %2$s", "You are not allowed to share %s" : "Nemáte povoleno sdílet %s", diff --git a/lib/l10n/cs.json b/lib/l10n/cs.json index 7ac6b2e30e9..7f39277882c 100644 --- a/lib/l10n/cs.json +++ b/lib/l10n/cs.json @@ -29,8 +29,14 @@ "Server version %s or lower is required." : "Je potřeba verze serveru %s nebo nižší.", "Logged in user must be an admin or sub admin" : "Je třeba, aby přihlášený uživatel byl správcem či dílčím správcem", "Logged in user must be an admin" : "Je třeba, aby přihlášený uživatel byl správce", + "»%s« started remote wipe" : "»%s« vzdálené vymazání spuštěno", + "Device or application »%s« has started the remote wipe process. You will receive another email once the process has finished" : "Přístroj či aplikace »%s« spustila proces vzdáleného vymazání. Obdržíte další email poté co bude proces ukončen", + "»%s« finished remote wipe" : "»%s« vzdálené vymazání dokončeno", + "Device or application »%s« has finished the remote wipe process." : "Přístroj či aplikace »%s« dokončila proces vzdáleného vymazání.", "Remote wipe started" : "Vymazání na dálku zahájeno", + "A remote wipe was started on device %s" : "Vzdálené vymazání běží na přístroji %s", "Remote wipe finished" : "Vymazání na dálku dokončeno", + "The remote wipe on %s has finished" : "Vzdálené vymazání přístroje %s dokončeno", "Authentication" : "Ověření", "Unknown filetype" : "Neznámý typ souboru", "Invalid image" : "Chybný obrázek", @@ -97,9 +103,9 @@ "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Úložiště pro sdílení %s musí implementovat rozhraní OCP\\Share_Backend", "Sharing backend %s not found" : "Úložiště sdílení %s nenalezeno", "Sharing backend for %s not found" : "Úložiště sdílení pro %s nenalezeno", - "%1$s shared »%2$s« with you and wants to add:" : "%1$s vám nasdílel(a) „%2$s“ a chce přidat:", - "%1$s shared »%2$s« with you and wants to add" : "%1$s vám nasdílel(a) „%2$s“ a chce přidat", - "»%s« added a note to a file shared with you" : "„%s“ přidal(a) poznámku k souboru, který je s vámi sdílený", + "%1$s shared »%2$s« with you and wants to add:" : "%1$s sdílí »%2$s« a dodává:", + "%1$s shared »%2$s« with you and wants to add" : "%1$s sdílí »%2$s« a dodává", + "»%s« added a note to a file shared with you" : "»%s« dodává poznámku k nasdílenému souboru ", "Open »%s«" : "Otevřít „%s“", "%1$s via %2$s" : "%1$s prostřednictvím %2$s", "You are not allowed to share %s" : "Nemáte povoleno sdílet %s", diff --git a/lib/l10n/eo.js b/lib/l10n/eo.js index 685735f3b79..4ae17009f00 100644 --- a/lib/l10n/eo.js +++ b/lib/l10n/eo.js @@ -231,8 +231,8 @@ OC.L10N.register( "Delete" : "Forigi", "Share" : "Kunhavigi", "Unlimited" : "Senlima", - "Verifying" : "Kontrolante", - "Verifying …" : "Kontrolante...", + "Verifying" : "Kontrolado", + "Verifying …" : "Kontrolado...", "Verify" : "Kontroli", "Sharing %s failed, because the backend does not allow shares from type %i" : "Kunhavigo de %s malsukcesis, ĉar la interna servo ne permesas kunhavon de tipo %i", "Sharing %s failed, because the file does not exist" : "Kunhavigo de %s malsukcesis, ĉar la dosiero ne ekzistas", diff --git a/lib/l10n/eo.json b/lib/l10n/eo.json index bc87696d8d7..080df7ce0c1 100644 --- a/lib/l10n/eo.json +++ b/lib/l10n/eo.json @@ -229,8 +229,8 @@ "Delete" : "Forigi", "Share" : "Kunhavigi", "Unlimited" : "Senlima", - "Verifying" : "Kontrolante", - "Verifying …" : "Kontrolante...", + "Verifying" : "Kontrolado", + "Verifying …" : "Kontrolado...", "Verify" : "Kontroli", "Sharing %s failed, because the backend does not allow shares from type %i" : "Kunhavigo de %s malsukcesis, ĉar la interna servo ne permesas kunhavon de tipo %i", "Sharing %s failed, because the file does not exist" : "Kunhavigo de %s malsukcesis, ĉar la dosiero ne ekzistas", diff --git a/lib/l10n/pl.js b/lib/l10n/pl.js index bde792a2bff..94c218d007b 100644 --- a/lib/l10n/pl.js +++ b/lib/l10n/pl.js @@ -43,7 +43,7 @@ OC.L10N.register( "A remote wipe was started on device %s" : "Zdalne czyszczenie zostało uruchomione na urządzeniu %s", "Remote wipe finished" : "Zdalne czyszczenie zakończone", "The remote wipe on %s has finished" : "Zakończono zdalne czyszczenie na %s", - "Authentication" : "Poświadczenie", + "Authentication" : "Uwierzytelnienie", "Unknown filetype" : "Nieznany typ pliku", "Invalid image" : "Błędne zdjęcie", "Avatar image is not square" : "Zdjęcie awatara nie jest kwadratowe", diff --git a/lib/l10n/pl.json b/lib/l10n/pl.json index 9829e4fe71b..167fe1bc8f8 100644 --- a/lib/l10n/pl.json +++ b/lib/l10n/pl.json @@ -41,7 +41,7 @@ "A remote wipe was started on device %s" : "Zdalne czyszczenie zostało uruchomione na urządzeniu %s", "Remote wipe finished" : "Zdalne czyszczenie zakończone", "The remote wipe on %s has finished" : "Zakończono zdalne czyszczenie na %s", - "Authentication" : "Poświadczenie", + "Authentication" : "Uwierzytelnienie", "Unknown filetype" : "Nieznany typ pliku", "Invalid image" : "Błędne zdjęcie", "Avatar image is not square" : "Zdjęcie awatara nie jest kwadratowe", diff --git a/lib/l10n/pt_BR.js b/lib/l10n/pt_BR.js index 4e999187662..be9b2196e50 100644 --- a/lib/l10n/pt_BR.js +++ b/lib/l10n/pt_BR.js @@ -225,7 +225,7 @@ OC.L10N.register( "Storage incomplete configuration. %s" : "Configuração incompleta do armazenamento. %s", "Storage connection error. %s" : "Erro na conexão de armazenamento. %s", "Storage is temporarily not available" : "Armazenamento temporariamente indisponível", - "Storage connection timeout. %s" : "Esgotado o tempo de conexão ao armazenamento. %s", + "Storage connection timeout. %s" : "Atingido o tempo limite de conexão ao armazenamento. %s", "Create" : "Criar", "Change" : "Mudar", "Delete" : "Excluir", diff --git a/lib/l10n/pt_BR.json b/lib/l10n/pt_BR.json index 5eb6f408c9c..d9546d03d4d 100644 --- a/lib/l10n/pt_BR.json +++ b/lib/l10n/pt_BR.json @@ -223,7 +223,7 @@ "Storage incomplete configuration. %s" : "Configuração incompleta do armazenamento. %s", "Storage connection error. %s" : "Erro na conexão de armazenamento. %s", "Storage is temporarily not available" : "Armazenamento temporariamente indisponível", - "Storage connection timeout. %s" : "Esgotado o tempo de conexão ao armazenamento. %s", + "Storage connection timeout. %s" : "Atingido o tempo limite de conexão ao armazenamento. %s", "Create" : "Criar", "Change" : "Mudar", "Delete" : "Excluir", diff --git a/lib/l10n/sl.js b/lib/l10n/sl.js index 0f1af99be4c..6d98f0f80cb 100644 --- a/lib/l10n/sl.js +++ b/lib/l10n/sl.js @@ -10,6 +10,9 @@ OC.L10N.register( "%1$s, %2$s and %3$s" : "%1$s, %2$s in %3$s", "%1$s, %2$s, %3$s and %4$s" : "%1$s, %2$s, %3$s in %4$s", "%1$s, %2$s, %3$s, %4$s and %5$s" : "%1$s, %2$s, %3$s, %4$s in %5$s", + "Enterprise bundle" : "Poslovni paket", + "Groupware bundle" : "Paket za skupinsko delo", + "Social sharing bundle" : "Paket družbene izmenjave", "PHP %s or higher is required." : "Zahtevana je različica PHP %s ali višja.", "PHP with a version lower than %s is required." : "Zahtevana je različica PHP manj kot %s.", "%sbit or higher PHP required." : "Zahtevana je različica PHP %s ali višja.", diff --git a/lib/l10n/sl.json b/lib/l10n/sl.json index 4167de9eee6..037f209a867 100644 --- a/lib/l10n/sl.json +++ b/lib/l10n/sl.json @@ -8,6 +8,9 @@ "%1$s, %2$s and %3$s" : "%1$s, %2$s in %3$s", "%1$s, %2$s, %3$s and %4$s" : "%1$s, %2$s, %3$s in %4$s", "%1$s, %2$s, %3$s, %4$s and %5$s" : "%1$s, %2$s, %3$s, %4$s in %5$s", + "Enterprise bundle" : "Poslovni paket", + "Groupware bundle" : "Paket za skupinsko delo", + "Social sharing bundle" : "Paket družbene izmenjave", "PHP %s or higher is required." : "Zahtevana je različica PHP %s ali višja.", "PHP with a version lower than %s is required." : "Zahtevana je različica PHP manj kot %s.", "%sbit or higher PHP required." : "Zahtevana je različica PHP %s ali višja.", diff --git a/lib/l10n/sv.js b/lib/l10n/sv.js index 53e0b834f48..ecb61688e66 100644 --- a/lib/l10n/sv.js +++ b/lib/l10n/sv.js @@ -9,7 +9,7 @@ OC.L10N.register( "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Eller, om du föredrar att behålla config.php skrivskyddad, sätt alternativet \"config_is_read_only\" till true i den. Se %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Filerna i appen %1$s ersattes inte korrekt. Kontrollera att det är en version som är kompatibel med servern.", "Sample configuration detected" : "Exempel-konfiguration detekterad", - "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Det har detekterats att exempel-konfigurationen har kopierats. Detta kan förstöra din installation och stöds ej. Vänligen läs dokumentationen innan ändringar på config.php utförs", + "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Det har upptäckts att provkonfigurationen har kopierats. Detta kan bryta din installation och stöds inte. Vänligen läs dokumentationen innan du utför ändringar på config.php", "%1$s and %2$s" : "%1$s och %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s och %3$s", "%1$s, %2$s, %3$s and %4$s" : "%1$s, %2$s, %3$s och %4$s", @@ -99,9 +99,9 @@ OC.L10N.register( "PostgreSQL username and/or password not valid" : "PostgreSQL-användarnamnet och/eller lösenordet är felaktigt", "You need to enter details of an existing account." : "Du måste ange inloggningsuppgifter av ett aktuellt konto.", "Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Mac OS X stöds inte och %s kommer inte att fungera korrekt på denna plattform. Använd på egen risk!", - "For the best results, please consider using a GNU/Linux server instead." : "För bästa resultat, överväg att använda en GNU/Linux server istället.", + "For the best results, please consider using a GNU/Linux server instead." : "För bästa resultat, överväg att använda en GNU/Linux-server istället.", "It seems that this %s instance is running on a 32-bit PHP environment and the open_basedir has been configured in php.ini. This will lead to problems with files over 4 GB and is highly discouraged." : "Det verkar som om denna %s instans körs på en 32-bitars PHP miljö och open_basedir har konfigurerats i php.ini. Detta kommer att leda till problem med filer över 4 GB och är verkligen inte rekommenderat!", - "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Ta bort open_basedir i din php.ini eller byt till 64-bitars PHP.", + "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Vänligen ta bort open_basedir-inställningen i din php.ini eller växla till 64-bitars PHP.", "Set an admin username." : "Ange ett användarnamn för administratören.", "Set an admin password." : "Ange ett administratörslösenord.", "Can't create or write into the data directory %s" : "Kan inte skapa eller skriva till data-katalogen %s", @@ -180,22 +180,22 @@ OC.L10N.register( "User disabled" : "Användare inaktiverad", "Login canceled by app" : "Inloggningen avbruten av appen", "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Appen \"%1$s\" kan inte installeras eftersom följande beroenden inte är uppfyllda: %2$s", - "a safe home for all your data" : "En säker lagringsplats för all din data", + "a safe home for all your data" : "ett säkert hem för alla dina data", "File is currently busy, please try again later" : "Filen är för tillfället upptagen, vänligen försök igen senare", "Can't read file" : "Kan ej läsa filen", "Application is not enabled" : "Applikationen är inte aktiverad", "Authentication error" : "Fel vid autentisering", - "Token expired. Please reload page." : "Ogiltig token. Ladda om sidan.", + "Token expired. Please reload page." : "Token har löpt ut. Vänligen uppdatera sidan.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Inga databasdrivrutiner (sqlite, mysql, eller postgresql) installerade.", "Cannot write into \"config\" directory" : "Kan inte skriva till \"config\" katalogen", "Cannot write into \"apps\" directory" : "Kan inte skriva till \"apps\" katalogen!", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file. See %s" : "Detta kan vanligtvis fixas genom att ge webbservern skrivåtkomst till mappen för appar eller genom att avaktivera App store i konfigurationsfilen. Se %s", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file. See %s" : "Detta kan vanligtvis lösas genom att ge webbservern skrivåtkomst till mappen för appar eller genom att inaktivera appbutiken i konfigurationsfilen. Se %s", "Cannot create \"data\" directory" : "Kan inte skapa \"datamapp\"", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Detta kan vanligtvis fixas genom att ge webbservern skrivåtkomst till rotkatalogen. Se %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Rättigheter kan vanligtvis fixas genom att ge webbservern skrivåtkomst till rotkatalogen. Se %s.", "Setting locale to %s failed" : "Sätta locale till %s misslyckades", - "Please install one of these locales on your system and restart your webserver." : "Vänligen installera en av dessa locale på din server och starta om din webbserver,", - "Please ask your server administrator to install the module." : "Vänligen be din administratör att installera modulen.", + "Please install one of these locales on your system and restart your webserver." : "Vänligen Installera en av dessa språk på ditt system och starta om webbservern.", + "Please ask your server administrator to install the module." : "Vänligen be serveradministratören att installera modulen.", "PHP module %s not installed." : "PHP-modulen %s är inte installerad.", "PHP setting \"%s\" is not set to \"%s\"." : "PHP-inställning \"%s\" är inte inställd på \"%s\".", "Adjusting this setting in php.ini will make Nextcloud run again" : "Att ändra denna inställning i php.ini kommer göra så att Nextcloud fungerar igen", @@ -208,8 +208,8 @@ OC.L10N.register( "PHP modules have been installed, but they are still listed as missing?" : "PHP-moduler har installerats, men de listas fortfarande som saknade?", "Please ask your server administrator to restart the web server." : "Vänligen be din serveradministratör att starta om webbservern.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 krävs", - "Please upgrade your database version" : "Vänligen uppgradera din databas-version", - "Please change the permissions to 0770 so that the directory cannot be listed by other users." : "Vänligen ändra rättigheterna till 0770 så att katalogen inte kan listas av andra användare.", + "Please upgrade your database version" : "Vänligen uppgradera din databasversion", + "Please change the permissions to 0770 so that the directory cannot be listed by other users." : "Vänligen ändra behörigheterna till 0770 så att katalogen inte kan listas av andra användare.", "Your data directory is readable by other users" : "Din datamapp är läsbar av andra användare", "Your data directory must be an absolute path" : "Du måste specificera en korrekt sökväg till datamappen", "Check the value of \"datadirectory\" in your configuration" : "Kontrollera värdet av \"datakatalog\" i din konfiguration", diff --git a/lib/l10n/sv.json b/lib/l10n/sv.json index 7b6ebeb1276..a39113ac1d7 100644 --- a/lib/l10n/sv.json +++ b/lib/l10n/sv.json @@ -7,7 +7,7 @@ "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Eller, om du föredrar att behålla config.php skrivskyddad, sätt alternativet \"config_is_read_only\" till true i den. Se %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Filerna i appen %1$s ersattes inte korrekt. Kontrollera att det är en version som är kompatibel med servern.", "Sample configuration detected" : "Exempel-konfiguration detekterad", - "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Det har detekterats att exempel-konfigurationen har kopierats. Detta kan förstöra din installation och stöds ej. Vänligen läs dokumentationen innan ändringar på config.php utförs", + "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Det har upptäckts att provkonfigurationen har kopierats. Detta kan bryta din installation och stöds inte. Vänligen läs dokumentationen innan du utför ändringar på config.php", "%1$s and %2$s" : "%1$s och %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s och %3$s", "%1$s, %2$s, %3$s and %4$s" : "%1$s, %2$s, %3$s och %4$s", @@ -97,9 +97,9 @@ "PostgreSQL username and/or password not valid" : "PostgreSQL-användarnamnet och/eller lösenordet är felaktigt", "You need to enter details of an existing account." : "Du måste ange inloggningsuppgifter av ett aktuellt konto.", "Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Mac OS X stöds inte och %s kommer inte att fungera korrekt på denna plattform. Använd på egen risk!", - "For the best results, please consider using a GNU/Linux server instead." : "För bästa resultat, överväg att använda en GNU/Linux server istället.", + "For the best results, please consider using a GNU/Linux server instead." : "För bästa resultat, överväg att använda en GNU/Linux-server istället.", "It seems that this %s instance is running on a 32-bit PHP environment and the open_basedir has been configured in php.ini. This will lead to problems with files over 4 GB and is highly discouraged." : "Det verkar som om denna %s instans körs på en 32-bitars PHP miljö och open_basedir har konfigurerats i php.ini. Detta kommer att leda till problem med filer över 4 GB och är verkligen inte rekommenderat!", - "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Ta bort open_basedir i din php.ini eller byt till 64-bitars PHP.", + "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Vänligen ta bort open_basedir-inställningen i din php.ini eller växla till 64-bitars PHP.", "Set an admin username." : "Ange ett användarnamn för administratören.", "Set an admin password." : "Ange ett administratörslösenord.", "Can't create or write into the data directory %s" : "Kan inte skapa eller skriva till data-katalogen %s", @@ -178,22 +178,22 @@ "User disabled" : "Användare inaktiverad", "Login canceled by app" : "Inloggningen avbruten av appen", "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Appen \"%1$s\" kan inte installeras eftersom följande beroenden inte är uppfyllda: %2$s", - "a safe home for all your data" : "En säker lagringsplats för all din data", + "a safe home for all your data" : "ett säkert hem för alla dina data", "File is currently busy, please try again later" : "Filen är för tillfället upptagen, vänligen försök igen senare", "Can't read file" : "Kan ej läsa filen", "Application is not enabled" : "Applikationen är inte aktiverad", "Authentication error" : "Fel vid autentisering", - "Token expired. Please reload page." : "Ogiltig token. Ladda om sidan.", + "Token expired. Please reload page." : "Token har löpt ut. Vänligen uppdatera sidan.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Inga databasdrivrutiner (sqlite, mysql, eller postgresql) installerade.", "Cannot write into \"config\" directory" : "Kan inte skriva till \"config\" katalogen", "Cannot write into \"apps\" directory" : "Kan inte skriva till \"apps\" katalogen!", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file. See %s" : "Detta kan vanligtvis fixas genom att ge webbservern skrivåtkomst till mappen för appar eller genom att avaktivera App store i konfigurationsfilen. Se %s", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file. See %s" : "Detta kan vanligtvis lösas genom att ge webbservern skrivåtkomst till mappen för appar eller genom att inaktivera appbutiken i konfigurationsfilen. Se %s", "Cannot create \"data\" directory" : "Kan inte skapa \"datamapp\"", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Detta kan vanligtvis fixas genom att ge webbservern skrivåtkomst till rotkatalogen. Se %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Rättigheter kan vanligtvis fixas genom att ge webbservern skrivåtkomst till rotkatalogen. Se %s.", "Setting locale to %s failed" : "Sätta locale till %s misslyckades", - "Please install one of these locales on your system and restart your webserver." : "Vänligen installera en av dessa locale på din server och starta om din webbserver,", - "Please ask your server administrator to install the module." : "Vänligen be din administratör att installera modulen.", + "Please install one of these locales on your system and restart your webserver." : "Vänligen Installera en av dessa språk på ditt system och starta om webbservern.", + "Please ask your server administrator to install the module." : "Vänligen be serveradministratören att installera modulen.", "PHP module %s not installed." : "PHP-modulen %s är inte installerad.", "PHP setting \"%s\" is not set to \"%s\"." : "PHP-inställning \"%s\" är inte inställd på \"%s\".", "Adjusting this setting in php.ini will make Nextcloud run again" : "Att ändra denna inställning i php.ini kommer göra så att Nextcloud fungerar igen", @@ -206,8 +206,8 @@ "PHP modules have been installed, but they are still listed as missing?" : "PHP-moduler har installerats, men de listas fortfarande som saknade?", "Please ask your server administrator to restart the web server." : "Vänligen be din serveradministratör att starta om webbservern.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 krävs", - "Please upgrade your database version" : "Vänligen uppgradera din databas-version", - "Please change the permissions to 0770 so that the directory cannot be listed by other users." : "Vänligen ändra rättigheterna till 0770 så att katalogen inte kan listas av andra användare.", + "Please upgrade your database version" : "Vänligen uppgradera din databasversion", + "Please change the permissions to 0770 so that the directory cannot be listed by other users." : "Vänligen ändra behörigheterna till 0770 så att katalogen inte kan listas av andra användare.", "Your data directory is readable by other users" : "Din datamapp är läsbar av andra användare", "Your data directory must be an absolute path" : "Du måste specificera en korrekt sökväg till datamappen", "Check the value of \"datadirectory\" in your configuration" : "Kontrollera värdet av \"datakatalog\" i din konfiguration", diff --git a/lib/private/AppFramework/DependencyInjection/DIContainer.php b/lib/private/AppFramework/DependencyInjection/DIContainer.php index 7f416c3ed90..5f3fa1b6dc6 100644 --- a/lib/private/AppFramework/DependencyInjection/DIContainer.php +++ b/lib/private/AppFramework/DependencyInjection/DIContainer.php @@ -279,7 +279,7 @@ class DIContainer extends SimpleContainer implements IAppContainer { ); foreach($this->middleWares as $middleWare) { - $dispatcher->registerMiddleware($c[$middleWare]); + $dispatcher->registerMiddleware($c->query($middleWare)); } $dispatcher->registerMiddleware( diff --git a/lib/private/AppFramework/Utility/ControllerMethodReflector.php b/lib/private/AppFramework/Utility/ControllerMethodReflector.php index ef4a1959d66..fd42606cf54 100644 --- a/lib/private/AppFramework/Utility/ControllerMethodReflector.php +++ b/lib/private/AppFramework/Utility/ControllerMethodReflector.php @@ -72,13 +72,10 @@ class ControllerMethodReflector implements IControllerMethodReflector { } foreach ($reflection->getParameters() as $param) { - // extract type information from PHP 7 scalar types and prefer them - // over phpdoc annotations - if (method_exists($param, 'getType')) { - $type = $param->getType(); - if ($type !== null) { - $this->types[$param->getName()] = (string) $type; - } + // extract type information from PHP 7 scalar types and prefer them over phpdoc annotations + $type = $param->getType(); + if ($type instanceof \ReflectionNamedType) { + $this->types[$param->getName()] = $type->getName(); } $default = null; diff --git a/lib/private/Broadcast/Events/BroadcastEvent.php b/lib/private/Broadcast/Events/BroadcastEvent.php new file mode 100644 index 00000000000..f3282b5207c --- /dev/null +++ b/lib/private/Broadcast/Events/BroadcastEvent.php @@ -0,0 +1,59 @@ +<?php declare(strict_types=1); + +/** + * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> + * + * @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +namespace OC\Broadcast\Events; + +use JsonSerializable; +use OCP\Broadcast\Events\IBroadcastEvent; +use OCP\EventDispatcher\ABroadcastedEvent; +use OCP\EventDispatcher\Event; + +class BroadcastEvent extends Event implements IBroadcastEvent { + + /** @var ABroadcastedEvent */ + private $event; + + public function __construct(ABroadcastedEvent $event) { + parent::__construct(); + + $this->event = $event; + } + + public function getName(): string { + return $this->event->broadcastAs(); + } + + public function getUids(): array { + return $this->event->getUids(); + } + + public function getPayload(): JsonSerializable { + return $this->event; + } + + public function setBroadcasted(): void { + $this->event->setBroadcasted(); + } + +} diff --git a/lib/private/Collaboration/Collaborators/RemoteGroupPlugin.php b/lib/private/Collaboration/Collaborators/RemoteGroupPlugin.php index 6e0979fe418..d9e1f2fd49a 100644 --- a/lib/private/Collaboration/Collaborators/RemoteGroupPlugin.php +++ b/lib/private/Collaboration/Collaborators/RemoteGroupPlugin.php @@ -57,11 +57,15 @@ class RemoteGroupPlugin implements ISearchPlugin { $resultType = new SearchResultType('remote_groups'); if ($this->enabled && $this->cloudIdManager->isValidCloudId($search) && $offset === 0) { + list($remoteGroup, $serverUrl) = $this->splitGroupRemote($search); $result['exact'][] = [ - 'label' => $search, + 'label' => $remoteGroup . " ($serverUrl)", + 'guid' => $remoteGroup, + 'name' => $remoteGroup, 'value' => [ 'shareType' => Share::SHARE_TYPE_REMOTE_GROUP, 'shareWith' => $search, + 'server' => $serverUrl, ], ]; } @@ -71,4 +75,20 @@ class RemoteGroupPlugin implements ISearchPlugin { return true; } + /** + * split group and remote from federated cloud id + * + * @param string $address federated share address + * @return array [user, remoteURL] + * @throws \InvalidArgumentException + */ + public function splitGroupRemote($address) { + try { + $cloudId = $this->cloudIdManager->resolveCloudId($address); + return [$cloudId->getUser(), $cloudId->getRemote()]; + } catch (\InvalidArgumentException $e) { + throw new \InvalidArgumentException('Invalid Federated Cloud ID', 0, $e); + } + } + } diff --git a/lib/private/Collaboration/Collaborators/RemotePlugin.php b/lib/private/Collaboration/Collaborators/RemotePlugin.php index d877346b155..fd14e7e03be 100644 --- a/lib/private/Collaboration/Collaborators/RemotePlugin.php +++ b/lib/private/Collaboration/Collaborators/RemotePlugin.php @@ -152,10 +152,13 @@ class RemotePlugin implements ISearchPlugin { $localUser = $this->userManager->get($remoteUser); if ($localUser === null || $search !== $localUser->getCloudId()) { $result['exact'][] = [ - 'label' => $search, + 'label' => $remoteUser . " ($serverUrl)", + 'uuid' => $remoteUser, + 'name' => $remoteUser, 'value' => [ 'shareType' => Share::SHARE_TYPE_REMOTE, 'shareWith' => $search, + 'server' => $serverUrl, ], ]; } diff --git a/lib/private/EventDispatcher/EventDispatcher.php b/lib/private/EventDispatcher/EventDispatcher.php index 8830bae79d8..d9d7985f7cc 100644 --- a/lib/private/EventDispatcher/EventDispatcher.php +++ b/lib/private/EventDispatcher/EventDispatcher.php @@ -25,7 +25,10 @@ declare(strict_types=1); namespace OC\EventDispatcher; +use OC\Broadcast\Events\BroadcastEvent; +use OCP\Broadcast\Events\IBroadcastEvent; use OCP\EventDispatcher\Event; +use OCP\EventDispatcher\ABroadcastedEvent; use OCP\EventDispatcher\IEventDispatcher; use OCP\IContainer; use OCP\ILogger; @@ -73,6 +76,14 @@ class EventDispatcher implements IEventDispatcher { public function dispatch(string $eventName, Event $event): void { $this->dispatcher->dispatch($event, $eventName); + + if ($event instanceof ABroadcastedEvent && !$event->isPropagationStopped()) { + // Propagate broadcast + $this->dispatch( + IBroadcastEvent::class, + new BroadcastEvent($event) + ); + } } public function dispatchTyped(Event $event): void { diff --git a/lib/private/EventDispatcher/SymfonyAdapter.php b/lib/private/EventDispatcher/SymfonyAdapter.php index f2f2fbf59fd..f8f80b6c5f8 100644 --- a/lib/private/EventDispatcher/SymfonyAdapter.php +++ b/lib/private/EventDispatcher/SymfonyAdapter.php @@ -25,9 +25,9 @@ declare(strict_types=1); namespace OC\EventDispatcher; +use OCP\ILogger; use function is_callable; use OCP\EventDispatcher\Event; -use Symfony\Component\EventDispatcher\Event as SymfonyEvent; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; @@ -35,9 +35,12 @@ class SymfonyAdapter implements EventDispatcherInterface { /** @var EventDispatcher */ private $eventDispatcher; + /** @var ILogger */ + private $logger; - public function __construct(EventDispatcher $eventDispatcher) { + public function __construct(EventDispatcher $eventDispatcher, ILogger $logger) { $this->eventDispatcher = $eventDispatcher; + $this->logger = $logger; } /** @@ -46,16 +49,21 @@ class SymfonyAdapter implements EventDispatcherInterface { * @param string $eventName The name of the event to dispatch. The name of * the event is the name of the method that is * invoked on listeners. - * @param SymfonyEvent|null $event The event to pass to the event handlers/listeners + * @param Event|null $event The event to pass to the event handlers/listeners * If not supplied, an empty Event instance is created * - * @return SymfonyEvent + * @return void */ - public function dispatch($eventName, SymfonyEvent $event = null) { + public function dispatch($eventName, $event = null) { + // type hinting is not possible, due to usage of GenericEvent if ($event instanceof Event) { $this->eventDispatcher->dispatch($eventName, $event); } else { // Legacy event + $this->logger->info( + 'Deprecated event type for {name}: {class}', + [ 'name' => $eventName, 'class' => is_object($event) ? get_class($event) : 'null' ] + ); $this->eventDispatcher->getSymfonyDispatcher()->dispatch($eventName, $event); } } diff --git a/lib/private/Files/Cache/AbstractCacheEvent.php b/lib/private/Files/Cache/AbstractCacheEvent.php index c8a41ce54d8..db1e7a1cf32 100644 --- a/lib/private/Files/Cache/AbstractCacheEvent.php +++ b/lib/private/Files/Cache/AbstractCacheEvent.php @@ -23,7 +23,7 @@ namespace OC\Files\Cache; use OCP\Files\Cache\ICacheEvent; use OCP\Files\Storage\IStorage; -use Symfony\Component\EventDispatcher\Event; +use OCP\EventDispatcher\Event; class AbstractCacheEvent extends Event implements ICacheEvent { protected $storage; diff --git a/lib/private/Files/Cache/QuerySearchHelper.php b/lib/private/Files/Cache/QuerySearchHelper.php index ac64ba5c592..2d9d8f374f7 100644 --- a/lib/private/Files/Cache/QuerySearchHelper.php +++ b/lib/private/Files/Cache/QuerySearchHelper.php @@ -136,16 +136,19 @@ class QuerySearchHelper { $type = $operator->getType(); if ($field === 'mimetype') { if ($operator->getType() === ISearchComparison::COMPARE_EQUAL) { - $value = $this->mimetypeLoader->getId($value); + $value = (int)$this->mimetypeLoader->getId($value); } else if ($operator->getType() === ISearchComparison::COMPARE_LIKE) { // transform "mimetype='foo/%'" to "mimepart='foo'" if (preg_match('|(.+)/%|', $value, $matches)) { $field = 'mimepart'; - $value = $this->mimetypeLoader->getId($matches[1]); + $value = (int)$this->mimetypeLoader->getId($matches[1]); $type = ISearchComparison::COMPARE_EQUAL; - } - if (strpos($value, '%') !== false) { + } else if (strpos($value, '%') !== false) { throw new \InvalidArgumentException('Unsupported query value for mimetype: ' . $value . ', only values in the format "mime/type" or "mime/%" are supported'); + } else { + $field = 'mimetype'; + $value = (int)$this->mimetypeLoader->getId($value); + $type = ISearchComparison::COMPARE_EQUAL; } } } else if ($field === 'favorite') { diff --git a/lib/private/Files/Type/TemplateManager.php b/lib/private/Files/Type/TemplateManager.php index 8b30eb6b4e8..08c4593bf87 100644 --- a/lib/private/Files/Type/TemplateManager.php +++ b/lib/private/Files/Type/TemplateManager.php @@ -24,6 +24,9 @@ namespace OC\Files\Type; +/** + * @deprecated 18.0.0 + */ class TemplateManager { protected $templates = array(); @@ -34,6 +37,7 @@ class TemplateManager { /** * get the path of the template for a mimetype * + * @deprecated 18.0.0 * @param string $mimetype * @return string|null */ @@ -48,6 +52,7 @@ class TemplateManager { /** * get the template content for a mimetype * + * @deprecated 18.0.0 * @param string $mimetype * @return string */ diff --git a/lib/private/Log.php b/lib/private/Log.php index 04148d549d6..da29c351185 100644 --- a/lib/private/Log.php +++ b/lib/private/Log.php @@ -324,7 +324,7 @@ class Log implements ILogger { try { if ($level >= $minLevel) { if (!$this->logger instanceof IFileBased) { - $data = json_encode($data, JSON_PARTIAL_OUTPUT_ON_ERROR); + $data = json_encode($data, JSON_PARTIAL_OUTPUT_ON_ERROR | JSON_UNESCAPED_SLASHES); } $this->writeLog($app, $data, $level); } diff --git a/lib/private/NavigationManager.php b/lib/private/NavigationManager.php index 2c41fbd88c2..2f6befc632c 100644 --- a/lib/private/NavigationManager.php +++ b/lib/private/NavigationManager.php @@ -199,7 +199,7 @@ class NavigationManager implements INavigationManager { 'type' => 'settings', 'id' => 'help', 'order' => 5, - 'href' => $this->urlGenerator->linkToRoute('settings_help'), + 'href' => $this->urlGenerator->linkToRoute('settings.Help.help'), 'name' => $l->t('Help'), 'icon' => $this->urlGenerator->imagePath('settings', 'help.svg'), ]); diff --git a/lib/private/Preview/Movie.php b/lib/private/Preview/Movie.php index 2f64811b45e..60fe443804a 100644 --- a/lib/private/Preview/Movie.php +++ b/lib/private/Preview/Movie.php @@ -88,8 +88,8 @@ class Movie extends ProviderV2 { if ($returnCode === 0) { $image = new \OC_Image(); $image->loadFromFile($tmpPath); - unlink($tmpPath); if ($image->valid()) { + unlink($tmpPath); $image->scaleDownToFit($maxX, $maxY); return $image; diff --git a/lib/private/Route/CachingRouter.php b/lib/private/Route/CachingRouter.php index cb1b98d77e6..a37bbf5b701 100644 --- a/lib/private/Route/CachingRouter.php +++ b/lib/private/Route/CachingRouter.php @@ -58,7 +58,9 @@ class CachingRouter extends Router { return $cachedKey; } else { $url = parent::generate($name, $parameters, $absolute); - $this->cache->set($key, $url, 3600); + if ($url) { + $this->cache->set($key, $url, 3600); + } return $url; } } diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php index aea50dfcdb6..05b3094e6a2 100644 --- a/lib/private/Share20/DefaultShareProvider.php +++ b/lib/private/Share20/DefaultShareProvider.php @@ -1382,4 +1382,30 @@ class DefaultShareProvider implements IShareProvider { } } + + public function getAllShares(): iterable { + $qb = $this->dbConn->getQueryBuilder(); + + $qb->select('*') + ->from('share') + ->where( + $qb->expr()->orX( + $qb->expr()->eq('share_type', $qb->createNamedParameter(\OCP\Share\IShare::TYPE_USER)), + $qb->expr()->eq('share_type', $qb->createNamedParameter(\OCP\Share\IShare::TYPE_GROUP)), + $qb->expr()->eq('share_type', $qb->createNamedParameter(\OCP\Share\IShare::TYPE_LINK)) + ) + ); + + $cursor = $qb->execute(); + while($data = $cursor->fetch()) { + try { + $share = $this->createShare($data); + } catch (InvalidShare $e) { + continue; + } + + yield $share; + } + $cursor->closeCursor(); + } } diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 2e8e6f9a3af..df537062e4a 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -1671,4 +1671,11 @@ class Manager implements IManager { return true; } + public function getAllShares(): iterable { + $providers = $this->factory->getAllProviders(); + + foreach ($providers as $provider) { + yield from $provider->getAllShares(); + } + } } diff --git a/lib/private/Template/SCSSCacher.php b/lib/private/Template/SCSSCacher.php index 9bdaca3a674..c6d5fc8ef71 100644 --- a/lib/private/Template/SCSSCacher.php +++ b/lib/private/Template/SCSSCacher.php @@ -117,7 +117,7 @@ class SCSSCacher { $this->serverRoot = $serverRoot; $this->cacheFactory = $cacheFactory; $this->depsCache = $cacheFactory->createDistributed('SCSS-deps-' . md5($this->urlGenerator->getBaseUrl())); - $this->isCachedCache = $cacheFactory->createLocal('SCSS-cached-' . md5($this->urlGenerator->getBaseUrl())); + $this->isCachedCache = $cacheFactory->createDistributed('SCSS-cached-' . md5($this->urlGenerator->getBaseUrl())); $lockingCache = $cacheFactory->createDistributed('SCSS-locks-' . md5($this->urlGenerator->getBaseUrl())); if (!($lockingCache instanceof IMemcache)) { $lockingCache = new NullCache(); @@ -269,8 +269,8 @@ class SCSSCacher { private function variablesChanged(): bool { $injectedVariables = $this->getInjectedVariables(); if ($this->config->getAppValue('core', 'theming.variables') !== md5($injectedVariables)) { - $this->resetCache(); $this->config->setAppValue('core', 'theming.variables', md5($injectedVariables)); + $this->resetCache(); return true; } return false; @@ -364,6 +364,9 @@ class SCSSCacher { * We need to regenerate all files when variables change */ public function resetCache() { + if (!$this->lockingCache->add('resetCache', 'locked!', 120)) { + return; + } $this->injectedVariables = null; // do not clear locks @@ -381,6 +384,7 @@ class SCSSCacher { } } $this->logger->debug('SCSSCacher: css cache cleared!'); + $this->lockingCache->remove('resetCache'); } /** diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index 94b39e951a5..6de6b33172c 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -43,6 +43,7 @@ use OC\Template\JSConfigHelper; use OC\Template\SCSSCacher; use OCP\Defaults; use OC\AppFramework\Http\Request; +use OCP\Support\Subscription\IRegistry; class TemplateLayout extends \OC_Template { @@ -134,7 +135,14 @@ class TemplateLayout extends \OC_Template { parent::__construct('core', 'layout.public'); $this->assign( 'appid', $appId ); $this->assign('bodyid', 'body-public'); - $this->assign('showSimpleSignUpLink', $this->config->getSystemValue('simpleSignUpLink.shown', true) !== false); + + /** @var IRegistry $subscription */ + $subscription = \OC::$server->query(IRegistry::class); + $showSimpleSignup = $this->config->getSystemValueBool('simpleSignUpLink.shown', true); + if ($showSimpleSignup && $subscription->delegateHasValidSubscription()) { + $showSimpleSignup = false; + } + $this->assign('showSimpleSignUpLink', $showSimpleSignup); } else { parent::__construct('core', 'layout.base'); @@ -142,7 +150,6 @@ class TemplateLayout extends \OC_Template { // Send the language and the locale to our layouts $lang = \OC::$server->getL10NFactory()->findLanguage(); $locale = \OC::$server->getL10NFactory()->findLocale($lang); - $localeLang = \OC::$server->getL10NFactory()->findLanguageFromLocale('lib', $locale); $lang = str_replace('_', '-', $lang); $this->assign('language', $lang); @@ -164,7 +171,7 @@ class TemplateLayout extends \OC_Template { if ($this->config->getSystemValue('installed', false) && $renderAs != 'error') { if (\OC::$server->getContentSecurityPolicyNonceManager()->browserSupportsCspV3()) { $jsConfigHelper = new JSConfigHelper( - \OC::$server->getL10N('lib', $localeLang ?: $lang), + \OC::$server->getL10N('lib'), \OC::$server->query(Defaults::class), \OC::$server->getAppManager(), \OC::$server->getSession(), diff --git a/lib/private/User/Database.php b/lib/private/User/Database.php index 3db96fa02e2..23dbe8c2334 100644 --- a/lib/private/User/Database.php +++ b/lib/private/User/Database.php @@ -259,6 +259,8 @@ class Database extends ABackend * @return array an array of all displayNames (value) and the corresponding uids (key) */ public function getDisplayNames($search = '', $limit = null, $offset = null) { + $limit = $this->fixLimit($limit); + $this->fixDI(); $query = $this->dbConn->getQueryBuilder(); @@ -380,6 +382,8 @@ class Database extends ABackend * @return string[] an array of all uids */ public function getUsers($search = '', $limit = null, $offset = null) { + $limit = $this->fixLimit($limit); + $users = $this->getDisplayNames($search, $limit, $offset); $userIds = array_map(function ($uid) { return (string)$uid; @@ -485,5 +489,11 @@ class Database extends ABackend return $this->cache[$uid]['uid']; } + private function fixLimit($limit) { + if (is_int($limit) && $limit >= 0) { + return $limit; + } + return null; + } } diff --git a/lib/private/legacy/defaults.php b/lib/private/legacy/defaults.php index d313366abe7..8633113ba5a 100644 --- a/lib/private/legacy/defaults.php +++ b/lib/private/legacy/defaults.php @@ -52,7 +52,6 @@ class OC_Defaults { private $defaultTextColorPrimary; public function __construct() { - $l10n = \OC::$server->getL10N('lib'); $config = \OC::$server->getConfig(); $this->defaultEntity = 'Nextcloud'; /* e.g. company name, used for footers and copyright notices */ @@ -65,7 +64,6 @@ class OC_Defaults { $this->defaultAndroidClientUrl = $config->getSystemValue('customclient_android', 'https://play.google.com/store/apps/details?id=com.nextcloud.client'); $this->defaultDocBaseUrl = 'https://docs.nextcloud.com'; $this->defaultDocVersion = \OC_Util::getVersion()[0]; // used to generate doc links - $this->defaultSlogan = $l10n->t('a safe home for all your data'); $this->defaultColorPrimary = '#0082c9'; $this->defaultTextColorPrimary = '#ffffff'; @@ -219,6 +217,10 @@ class OC_Defaults { if ($this->themeExist('getSlogan')) { return $this->theme->getSlogan(); } else { + if ($this->defaultSlogan === null) { + $l10n = \OC::$server->getL10N('lib'); + $this->defaultSlogan = $l10n->t('a safe home for all your data'); + } return $this->defaultSlogan; } } diff --git a/lib/private/legacy/helper.php b/lib/private/legacy/helper.php index a5ed3a3e24b..6faba3ebee2 100644 --- a/lib/private/legacy/helper.php +++ b/lib/private/legacy/helper.php @@ -189,6 +189,7 @@ class OC_Helper { } /** + * @deprecated 18.0.0 * @return \OC\Files\Type\TemplateManager */ static public function getFileTemplateManager() { diff --git a/lib/public/App/ManagerEvent.php b/lib/public/App/ManagerEvent.php index f46318c2621..27dc3a44dea 100644 --- a/lib/public/App/ManagerEvent.php +++ b/lib/public/App/ManagerEvent.php @@ -23,7 +23,7 @@ namespace OCP\App; -use Symfony\Component\EventDispatcher\Event; +use OCP\EventDispatcher\Event; /** * Class ManagerEvent diff --git a/lib/public/AppFramework/App.php b/lib/public/AppFramework/App.php index 06524e4bf02..3b42b28758d 100644 --- a/lib/public/AppFramework/App.php +++ b/lib/public/AppFramework/App.php @@ -34,6 +34,7 @@ declare(strict_types=1); namespace OCP\AppFramework; use OC\AppFramework\Routing\RouteConfig; +use OC\ServerContainer; use OCP\Route\IRouter; @@ -51,8 +52,8 @@ class App { private $container; /** - * Turns an app id into a namespace by convetion. The id is split at the - * underscores, all parts are camelcased and reassembled. e.g.: + * Turns an app id into a namespace by convention. The id is split at the + * underscores, all parts are CamelCased and reassembled. e.g.: * some_app_id -> OCA\SomeAppId * @param string $appId the app id * @param string $topNamespace the namespace which should be prepended to @@ -71,6 +72,28 @@ class App { * @since 6.0.0 */ public function __construct(string $appName, array $urlParams = []) { + if (\OC::$server->getConfig()->getSystemValueBool('debug')) { + $applicationClassName = get_class($this); + $e = new \RuntimeException('App class ' . $applicationClassName . ' is not setup via query() but directly'); + $setUpViaQuery = false; + + foreach ($e->getTrace() as $step) { + if (isset($step['class'], $step['function'], $step['args'][0]) && + $step['class'] === ServerContainer::class && + $step['function'] === 'query' && + $step['args'][0] === $applicationClassName) { + $setUpViaQuery = true; + break; + } + } + + if (!$setUpViaQuery) { + \OC::$server->getLogger()->logException($e, [ + 'app' => $appName, + ]); + } + } + try { $this->container = \OC::$server->getRegisteredAppContainer($appName); } catch (QueryException $e) { diff --git a/lib/public/AppFramework/Db/Entity.php b/lib/public/AppFramework/Db/Entity.php index e339707d85f..091b90257b4 100644 --- a/lib/public/AppFramework/Db/Entity.php +++ b/lib/public/AppFramework/Db/Entity.php @@ -24,6 +24,9 @@ namespace OCP\AppFramework\Db; +use function lcfirst; +use function substr; + /** * @method integer getId() * @method void setId(integer $id) @@ -139,16 +142,16 @@ abstract class Entity { * getter method * @since 7.0.0 */ - public function __call($methodName, $args){ - $attr = lcfirst( substr($methodName, 3) ); - - if(strpos($methodName, 'set') === 0){ - $this->setter($attr, $args); - } elseif(strpos($methodName, 'get') === 0) { - return $this->getter($attr); + public function __call($methodName, $args) { + if (strpos($methodName, 'set') === 0) { + $this->setter(lcfirst(substr($methodName, 3)), $args); + } elseif (strpos($methodName, 'get') === 0) { + return $this->getter(lcfirst(substr($methodName, 3))); + } elseif (strpos($methodName, 'is') === 0) { + return $this->getter(lcfirst(substr($methodName, 2))); } else { - throw new \BadFunctionCallException($methodName . - ' does not exist'); + throw new \BadFunctionCallException($methodName . + ' does not exist'); } } diff --git a/lib/public/Broadcast/Events/IBroadcastEvent.php b/lib/public/Broadcast/Events/IBroadcastEvent.php new file mode 100644 index 00000000000..0aa7ff45eec --- /dev/null +++ b/lib/public/Broadcast/Events/IBroadcastEvent.php @@ -0,0 +1,57 @@ +<?php declare(strict_types=1); + +/** + * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> + * + * @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +namespace OCP\Broadcast\Events; + +use JsonSerializable; + +/** + * @since 18.0.0 + */ +interface IBroadcastEvent { + + /** + * @return string the name of the event + * @since 18.0.0 + */ + public function getName(): string; + + /** + * @return string[] + * @since 18.0.0 + */ + public function getUids(): array; + + /** + * @return JsonSerializable the data to be sent to the client + * @since 18.0.0 + */ + public function getPayload(): JsonSerializable; + + /** + * @since 18.0.0 + */ + public function setBroadcasted(): void; + +} diff --git a/lib/public/Comments/CommentsEntityEvent.php b/lib/public/Comments/CommentsEntityEvent.php index fe8585a213e..d3ffb710e2e 100644 --- a/lib/public/Comments/CommentsEntityEvent.php +++ b/lib/public/Comments/CommentsEntityEvent.php @@ -22,7 +22,7 @@ namespace OCP\Comments; -use Symfony\Component\EventDispatcher\Event; +use OCP\EventDispatcher\Event; /** * Class CommentsEntityEvent diff --git a/lib/public/Comments/CommentsEvent.php b/lib/public/Comments/CommentsEvent.php index eba4cebb3bf..43b8366a22f 100644 --- a/lib/public/Comments/CommentsEvent.php +++ b/lib/public/Comments/CommentsEvent.php @@ -23,7 +23,7 @@ namespace OCP\Comments; -use Symfony\Component\EventDispatcher\Event; +use OCP\EventDispatcher\Event; /** * Class CommentsEvent diff --git a/lib/public/Console/ConsoleEvent.php b/lib/public/Console/ConsoleEvent.php index 7b3201999a3..6645b20ac2e 100644 --- a/lib/public/Console/ConsoleEvent.php +++ b/lib/public/Console/ConsoleEvent.php @@ -22,7 +22,7 @@ namespace OCP\Console; -use Symfony\Component\EventDispatcher\Event; +use OCP\EventDispatcher\Event; /** * Class ConsoleEvent diff --git a/lib/public/EventDispatcher/ABroadcastedEvent.php b/lib/public/EventDispatcher/ABroadcastedEvent.php new file mode 100644 index 00000000000..1c240b4fb73 --- /dev/null +++ b/lib/public/EventDispatcher/ABroadcastedEvent.php @@ -0,0 +1,71 @@ +<?php declare(strict_types=1); + +/** + * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> + * + * @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +namespace OCP\EventDispatcher; + +use JsonSerializable; + +/** + * @since 18.0.0 + */ +abstract class ABroadcastedEvent extends Event implements JsonSerializable { + + /** + * @since 18.0.0 + */ + private $broadcasted = false; + + /** + * Get the name of the event, as received on the client-side + * + * Uses the fully qualified event class name by default + * + * @return string + * @since 18.0.0 + */ + public function broadcastAs(): string { + return get_class($this); + } + + /** + * @return string[] + * @since 18.0.0 + */ + abstract public function getUids(): array; + + /** + * @since 18.0.0 + */ + public function setBroadcasted(): void { + $this->broadcasted = true; + } + + /** + * @since 18.0.0 + */ + public function isBroadcasted(): bool { + return $this->broadcasted; + } + +} diff --git a/lib/public/SabrePluginEvent.php b/lib/public/SabrePluginEvent.php index d75c84965f6..8f8d155ec10 100644 --- a/lib/public/SabrePluginEvent.php +++ b/lib/public/SabrePluginEvent.php @@ -26,7 +26,7 @@ namespace OCP; use OCP\AppFramework\Http; use Sabre\DAV\Server; -use Symfony\Component\EventDispatcher\Event; +use OCP\EventDispatcher\Event; /** * @since 8.2.0 diff --git a/lib/public/Share/IManager.php b/lib/public/Share/IManager.php index 302be523327..8bb7291d6ba 100644 --- a/lib/public/Share/IManager.php +++ b/lib/public/Share/IManager.php @@ -385,4 +385,16 @@ interface IManager { */ public function shareProviderExists($shareType); + /** + * @Internal + * + * Get all the shares as iterable to reduce memory overhead + * Note, since this opens up database cursors the iterable should + * be fully itterated. + * + * @return iterable + * @since 18.0.0 + */ + public function getAllShares(): iterable; + } diff --git a/lib/public/Share/IProviderFactory.php b/lib/public/Share/IProviderFactory.php index ad43b64229d..8d14b78f462 100644 --- a/lib/public/Share/IProviderFactory.php +++ b/lib/public/Share/IProviderFactory.php @@ -35,13 +35,6 @@ use OCP\IServerContainer; interface IProviderFactory { /** - * IProviderFactory constructor. - * @param IServerContainer $serverContainer - * @since 9.0.0 - */ - public function __construct(IServerContainer $serverContainer); - - /** * @param string $id * @return IShareProvider * @throws ProviderException diff --git a/lib/public/Share/IShareProvider.php b/lib/public/Share/IShareProvider.php index 6731bf8882b..c8815928269 100644 --- a/lib/public/Share/IShareProvider.php +++ b/lib/public/Share/IShareProvider.php @@ -217,4 +217,13 @@ interface IShareProvider { * @since 12 */ public function getAccessList($nodes, $currentAccess); + + /** + * Get all the shares in this provider returned as iterable to reduce memory + * overhead + * + * @return iterable + * @since 18.0.0 + */ + public function getAllShares(): iterable; } diff --git a/lib/public/SystemTag/ManagerEvent.php b/lib/public/SystemTag/ManagerEvent.php index 452c0d5da8f..41155a64ea2 100644 --- a/lib/public/SystemTag/ManagerEvent.php +++ b/lib/public/SystemTag/ManagerEvent.php @@ -24,7 +24,7 @@ declare(strict_types=1); namespace OCP\SystemTag; -use Symfony\Component\EventDispatcher\Event; +use OCP\EventDispatcher\Event; /** * Class ManagerEvent diff --git a/lib/public/SystemTag/MapperEvent.php b/lib/public/SystemTag/MapperEvent.php index d98caf1317b..4e2c84fecaf 100644 --- a/lib/public/SystemTag/MapperEvent.php +++ b/lib/public/SystemTag/MapperEvent.php @@ -23,7 +23,7 @@ declare(strict_types=1); namespace OCP\SystemTag; -use Symfony\Component\EventDispatcher\Event; +use OCP\EventDispatcher\Event; /** * Class MapperEvent diff --git a/lib/public/SystemTag/SystemTagsEntityEvent.php b/lib/public/SystemTag/SystemTagsEntityEvent.php index e439c16d9c6..cb4982ae282 100644 --- a/lib/public/SystemTag/SystemTagsEntityEvent.php +++ b/lib/public/SystemTag/SystemTagsEntityEvent.php @@ -23,7 +23,7 @@ declare(strict_types=1); namespace OCP\SystemTag; -use Symfony\Component\EventDispatcher\Event; +use OCP\EventDispatcher\Event; /** * Class SystemTagsEntityEvent diff --git a/lib/public/WorkflowEngine/IEntityCheck.php b/lib/public/WorkflowEngine/IEntityCheck.php index 7a4df0afd5f..d90535b4c99 100644 --- a/lib/public/WorkflowEngine/IEntityCheck.php +++ b/lib/public/WorkflowEngine/IEntityCheck.php @@ -24,9 +24,6 @@ declare(strict_types=1); namespace OCP\WorkflowEngine; - -use OCP\Files\Storage\IStorage; - /** * Interface IFileCheck * |