diff options
103 files changed, 485 insertions, 248 deletions
diff --git a/.drone.yml b/.drone.yml index 6016ebd6981..70c5f246a6a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -4,13 +4,13 @@ build: commands: - ./autotest-js.sh nodb-php5.6: - image: nextcloudci/php5.6:1.0.6 + image: nextcloudci/php5.6:php5.6-1 commands: - rm -rf data/* config/config.php # TODO: remove this - temporary fix for CI issues - git submodule update --init - NOCOVERAGE=true TEST_SELECTION=NODB ./autotest.sh sqlite nodb-php7.0: - image: nextcloudci/php7.0:1.0.9 + image: nextcloudci/php7.0:php7.0-1 commands: - rm -rf data/* config/config.php # TODO: remove this - temporary fix for CI issues - git submodule update --init diff --git a/.gitignore b/.gitignore index 63a34beb978..0811a12f44b 100644 --- a/.gitignore +++ b/.gitignore @@ -107,6 +107,7 @@ nbproject /build/lib/ /build/jsdocs/ /npm-debug.log +/PhantomJS_* # puphpet puphpet diff --git a/apps/comments/js/commentstabview.js b/apps/comments/js/commentstabview.js index eae18c1d485..82244d61e9a 100644 --- a/apps/comments/js/commentstabview.js +++ b/apps/comments/js/commentstabview.js @@ -51,7 +51,7 @@ '{{#if isUserAuthor}}' + ' <a href="#" class="action edit icon icon-rename has-tooltip" title="{{editTooltip}}"></a>' + '{{/if}}' + - ' <div class="date has-tooltip" title="{{altDate}}">{{date}}</div>' + + ' <div class="date has-tooltip live-relative-timestamp" data-timestamp="{{timestamp}}" title="{{altDate}}">{{date}}</div>' + ' </div>' + ' <div class="message">{{{formattedMessage}}}</div>' + '{{#if isLong}}' + @@ -179,6 +179,7 @@ _formatItem: function(commentModel) { var timestamp = new Date(commentModel.get('creationDateTime')).getTime(); var data = _.extend({ + timestamp: timestamp, date: OC.Util.relativeModifiedDate(timestamp), altDate: OC.Util.formatDate(timestamp), formattedMessage: this._formatMessage(commentModel.get('message')) diff --git a/apps/comments/l10n/cs_CZ.js b/apps/comments/l10n/cs_CZ.js index 3e4c2ae1a98..609b74cdbab 100644 --- a/apps/comments/l10n/cs_CZ.js +++ b/apps/comments/l10n/cs_CZ.js @@ -1,12 +1,15 @@ OC.L10N.register( "comments", { + "New comment …" : "Nový komentář ...", "Delete comment" : "Smazat komentář", "Post" : "Zveřejnit", "Cancel" : "Zrušit", "Edit comment" : "Upravit komentář", "[Deleted user]" : "[Smazaný uživatel]", "Comments" : "Komentáře", + "No comments yet, start the conversation!" : "Zatím bez komentářů, začněte konverzaci!", + "More comments …" : "Více komentářů ...", "Save" : "Uložit", "Allowed characters {count} of {max}" : "Povolených znaků {count} z {max}", "Error occurred while retrieving comment with id {id}" : "Došlo k chybě při načítání komentáře s id {id}", diff --git a/apps/comments/l10n/cs_CZ.json b/apps/comments/l10n/cs_CZ.json index 1e7d98d52a0..5cc4e5dcc3c 100644 --- a/apps/comments/l10n/cs_CZ.json +++ b/apps/comments/l10n/cs_CZ.json @@ -1,10 +1,13 @@ { "translations": { + "New comment …" : "Nový komentář ...", "Delete comment" : "Smazat komentář", "Post" : "Zveřejnit", "Cancel" : "Zrušit", "Edit comment" : "Upravit komentář", "[Deleted user]" : "[Smazaný uživatel]", "Comments" : "Komentáře", + "No comments yet, start the conversation!" : "Zatím bez komentářů, začněte konverzaci!", + "More comments …" : "Více komentářů ...", "Save" : "Uložit", "Allowed characters {count} of {max}" : "Povolených znaků {count} z {max}", "Error occurred while retrieving comment with id {id}" : "Došlo k chybě při načítání komentáře s id {id}", diff --git a/apps/comments/l10n/de.js b/apps/comments/l10n/de.js index b919583f722..2f4bc6e0da1 100644 --- a/apps/comments/l10n/de.js +++ b/apps/comments/l10n/de.js @@ -1,12 +1,15 @@ OC.L10N.register( "comments", { + "New comment …" : "Neuer Kommentar ...", "Delete comment" : "Kommentar löschen", "Post" : "Speichern", "Cancel" : "Abbrechen", "Edit comment" : "Kommentar bearbeiten", "[Deleted user]" : "[Gelöschter Benutzer]", "Comments" : "Kommentare", + "No comments yet, start the conversation!" : "Keine Kommentare bisher. Beginne die Diskussion!", + "More comments …" : "Weitere Kommentare ...", "Save" : "Speichern", "Allowed characters {count} of {max}" : "Erlaubte Zeichen {count} von {max}", "Error occurred while retrieving comment with id {id}" : "Es ist ein Fehler beim Empfangen des Kommentars mit der ID {id} aufgetreten", diff --git a/apps/comments/l10n/de.json b/apps/comments/l10n/de.json index c3b005b50dc..5991a610794 100644 --- a/apps/comments/l10n/de.json +++ b/apps/comments/l10n/de.json @@ -1,10 +1,13 @@ { "translations": { + "New comment …" : "Neuer Kommentar ...", "Delete comment" : "Kommentar löschen", "Post" : "Speichern", "Cancel" : "Abbrechen", "Edit comment" : "Kommentar bearbeiten", "[Deleted user]" : "[Gelöschter Benutzer]", "Comments" : "Kommentare", + "No comments yet, start the conversation!" : "Keine Kommentare bisher. Beginne die Diskussion!", + "More comments …" : "Weitere Kommentare ...", "Save" : "Speichern", "Allowed characters {count} of {max}" : "Erlaubte Zeichen {count} von {max}", "Error occurred while retrieving comment with id {id}" : "Es ist ein Fehler beim Empfangen des Kommentars mit der ID {id} aufgetreten", diff --git a/apps/comments/l10n/de_DE.js b/apps/comments/l10n/de_DE.js index cef1f51b47c..b43c52dd44c 100644 --- a/apps/comments/l10n/de_DE.js +++ b/apps/comments/l10n/de_DE.js @@ -1,12 +1,15 @@ OC.L10N.register( "comments", { + "New comment …" : "Neuer Kommentar ...", "Delete comment" : "Kommentar löschen", "Post" : "Speichern", "Cancel" : "Abbrechen", "Edit comment" : "Kommentar bearbeiten", "[Deleted user]" : "[gelöschter Benutzer]", "Comments" : "Kommentare", + "No comments yet, start the conversation!" : "Keine Kommentare bisher. Beginnen Sie die Diskussion!", + "More comments …" : "Weitere Kommentare ...", "Save" : "Speichern", "Allowed characters {count} of {max}" : "{count} von {max} Zeichen benutzt", "Error occurred while retrieving comment with id {id}" : "Es ist ein Fehler beim Empfangen des Kommentars mit der ID {id} aufgetreten", diff --git a/apps/comments/l10n/de_DE.json b/apps/comments/l10n/de_DE.json index 599619b8254..3aee7152ff5 100644 --- a/apps/comments/l10n/de_DE.json +++ b/apps/comments/l10n/de_DE.json @@ -1,10 +1,13 @@ { "translations": { + "New comment …" : "Neuer Kommentar ...", "Delete comment" : "Kommentar löschen", "Post" : "Speichern", "Cancel" : "Abbrechen", "Edit comment" : "Kommentar bearbeiten", "[Deleted user]" : "[gelöschter Benutzer]", "Comments" : "Kommentare", + "No comments yet, start the conversation!" : "Keine Kommentare bisher. Beginnen Sie die Diskussion!", + "More comments …" : "Weitere Kommentare ...", "Save" : "Speichern", "Allowed characters {count} of {max}" : "{count} von {max} Zeichen benutzt", "Error occurred while retrieving comment with id {id}" : "Es ist ein Fehler beim Empfangen des Kommentars mit der ID {id} aufgetreten", diff --git a/apps/comments/l10n/fr.js b/apps/comments/l10n/fr.js index 98748b7c02d..746a71fcc01 100644 --- a/apps/comments/l10n/fr.js +++ b/apps/comments/l10n/fr.js @@ -1,12 +1,15 @@ OC.L10N.register( "comments", { + "New comment …" : "Nouveau commentaire...", "Delete comment" : "Supprimer le commentaire", "Post" : "Poster", "Cancel" : "Annuler", "Edit comment" : "Modifier le commentaire", "[Deleted user]" : "[Utilisateur supprimé]", "Comments" : "Commentaires", + "No comments yet, start the conversation!" : "Il n'y a aucun commentaire, démarrer la conversation!", + "More comments …" : "Plus de commentaires ...", "Save" : "Enregistrer", "Allowed characters {count} of {max}" : "{count} sur {max} caractères autorisés", "Error occurred while retrieving comment with id {id}" : "Une erreur est survenue lors de la récupération du commentaire avec l'id {id}", diff --git a/apps/comments/l10n/fr.json b/apps/comments/l10n/fr.json index 81be6acb0b5..d17d9d36789 100644 --- a/apps/comments/l10n/fr.json +++ b/apps/comments/l10n/fr.json @@ -1,10 +1,13 @@ { "translations": { + "New comment …" : "Nouveau commentaire...", "Delete comment" : "Supprimer le commentaire", "Post" : "Poster", "Cancel" : "Annuler", "Edit comment" : "Modifier le commentaire", "[Deleted user]" : "[Utilisateur supprimé]", "Comments" : "Commentaires", + "No comments yet, start the conversation!" : "Il n'y a aucun commentaire, démarrer la conversation!", + "More comments …" : "Plus de commentaires ...", "Save" : "Enregistrer", "Allowed characters {count} of {max}" : "{count} sur {max} caractères autorisés", "Error occurred while retrieving comment with id {id}" : "Une erreur est survenue lors de la récupération du commentaire avec l'id {id}", diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index ea5c09939a6..c99689619d8 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -133,6 +133,29 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription } /** + * Return the number of calendars for a principal + * + * By default this excludes the automatically generated birthday calendar + * + * @param $principalUri + * @param bool $excludeBirthday + * @return int + */ + public function getCalendarsForUserCount($principalUri, $excludeBirthday = true) { + $principalUri = $this->convertPrincipal($principalUri, true); + $query = $this->db->getQueryBuilder(); + $query->select($query->createFunction('COUNT(*)')) + ->from('calendars') + ->where($query->expr()->eq('principaluri', $query->createNamedParameter($principalUri))); + + if ($excludeBirthday) { + $query->andWhere($query->expr()->neq('uri', $query->createNamedParameter(BirthdayService::BIRTHDAY_CALENDAR_URI))); + } + + return $query->execute()->fetchColumn(); + } + + /** * Returns a list of calendars for a principal. * * Every project is an array with the following keys: diff --git a/apps/dav/lib/CardDAV/CardDavBackend.php b/apps/dav/lib/CardDAV/CardDavBackend.php index f6d80dfe701..48e3b04b38b 100644 --- a/apps/dav/lib/CardDAV/CardDavBackend.php +++ b/apps/dav/lib/CardDAV/CardDavBackend.php @@ -99,6 +99,22 @@ class CardDavBackend implements BackendInterface, SyncSupport { } /** + * Return the number of address books for a principal + * + * @param $principalUri + * @return int + */ + public function getAddressBooksForUserCount($principalUri) { + $principalUri = $this->convertPrincipal($principalUri, true); + $query = $this->db->getQueryBuilder(); + $query->select($query->createFunction('COUNT(*)')) + ->from('addressbooks') + ->where($query->expr()->eq('principaluri', $query->createNamedParameter($principalUri))); + + return $query->execute()->fetchColumn(); + } + + /** * Returns the list of address books for a specific user. * * Every addressbook should have the following properties: diff --git a/apps/dav/lib/HookManager.php b/apps/dav/lib/HookManager.php index d89c4b822ff..5a3e328f707 100644 --- a/apps/dav/lib/HookManager.php +++ b/apps/dav/lib/HookManager.php @@ -104,8 +104,7 @@ class HookManager { $user = $this->userManager->get($params['uid']); if (!is_null($user)) { $principal = 'principals/users/' . $user->getUID(); - $calendars = $this->calDav->getCalendarsForUser($principal); - if (empty($calendars) || (count($calendars) === 1 && $calendars[0]['uri'] === BirthdayService::BIRTHDAY_CALENDAR_URI)) { + if ($this->calDav->getCalendarsForUserCount($principal) === 0) { try { $this->calDav->createCalendar($principal, 'personal', [ '{DAV:}displayname' => 'Personal']); @@ -113,8 +112,7 @@ class HookManager { \OC::$server->getLogger()->logException($ex); } } - $books = $this->cardDav->getAddressBooksForUser($principal); - if (empty($books)) { + if ($this->cardDav->getAddressBooksForUserCount($principal) === 0) { try { $this->cardDav->createAddressBook($principal, 'contacts', [ '{DAV:}displayname' => 'Contacts']); diff --git a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php index 48434b2512d..1a5673161de 100644 --- a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php +++ b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php @@ -53,6 +53,7 @@ class CalDavBackendTest extends AbstractCalDavBackendTest { ]); $this->backend->updateCalendar($calendarId, $patch); $patch->commit(); + $this->assertEquals(1, $this->backend->getCalendarsForUserCount(self::UNIT_TEST_USER)); $books = $this->backend->getCalendarsForUser(self::UNIT_TEST_USER); $this->assertEquals(1, count($books)); $this->assertEquals('Unit test', $books[0]['{DAV:}displayname']); diff --git a/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php b/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php index bbeadf81277..cf5972f79bf 100644 --- a/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php +++ b/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php @@ -118,6 +118,7 @@ class CardDavBackendTest extends TestCase { // create a new address book $this->backend->createAddressBook(self::UNIT_TEST_USER, 'Example', []); + $this->assertEquals(1, $this->backend->getAddressBooksForUserCount(self::UNIT_TEST_USER)); $books = $this->backend->getAddressBooksForUser(self::UNIT_TEST_USER); $this->assertEquals(1, count($books)); $this->assertEquals('Example', $books[0]['{DAV:}displayname']); diff --git a/apps/dav/tests/unit/DAV/HookManagerTest.php b/apps/dav/tests/unit/DAV/HookManagerTest.php index 5e6e65e59b4..0db66bf76c1 100644 --- a/apps/dav/tests/unit/DAV/HookManagerTest.php +++ b/apps/dav/tests/unit/DAV/HookManagerTest.php @@ -53,7 +53,7 @@ class HookManagerTest extends TestCase { $cal = $this->getMockBuilder('OCA\DAV\CalDAV\CalDavBackend') ->disableOriginalConstructor() ->getMock(); - $cal->expects($this->once())->method('getCalendarsForUser')->willReturn([]); + $cal->expects($this->once())->method('getCalendarsForUserCount')->willReturn(0); $cal->expects($this->once())->method('createCalendar')->with( 'principals/users/newUser', 'personal', ['{DAV:}displayname' => 'Personal']); @@ -62,7 +62,7 @@ class HookManagerTest extends TestCase { $card = $this->getMockBuilder('OCA\DAV\CardDAV\CardDavBackend') ->disableOriginalConstructor() ->getMock(); - $card->expects($this->once())->method('getAddressBooksForUser')->willReturn([]); + $card->expects($this->once())->method('getAddressBooksForUserCount')->willReturn(0); $card->expects($this->once())->method('createAddressBook')->with( 'principals/users/newUser', 'contacts', ['{DAV:}displayname' => 'Contacts']); @@ -92,18 +92,14 @@ class HookManagerTest extends TestCase { $cal = $this->getMockBuilder('OCA\DAV\CalDAV\CalDavBackend') ->disableOriginalConstructor() ->getMock(); - $cal->expects($this->once())->method('getCalendarsForUser')->willReturn([ - ['uri' => 'my-events'] - ]); + $cal->expects($this->once())->method('getCalendarsForUserCount')->willReturn(1); $cal->expects($this->never())->method('createCalendar'); /** @var CardDavBackend | \PHPUnit_Framework_MockObject_MockObject $card */ $card = $this->getMockBuilder('OCA\DAV\CardDAV\CardDavBackend') ->disableOriginalConstructor() ->getMock(); - $card->expects($this->once())->method('getAddressBooksForUser')->willReturn([ - ['uri' => 'my-contacts'] - ]); + $card->expects($this->once())->method('getAddressBooksForUserCount')->willReturn(1); $card->expects($this->never())->method('createAddressBook'); $hm = new HookManager($userManager, $syncService, $cal, $card); @@ -131,9 +127,7 @@ class HookManagerTest extends TestCase { $cal = $this->getMockBuilder('OCA\DAV\CalDAV\CalDavBackend') ->disableOriginalConstructor() ->getMock(); - $cal->expects($this->once())->method('getCalendarsForUser')->willReturn([ - ['uri' => BirthdayService::BIRTHDAY_CALENDAR_URI] - ]); + $cal->expects($this->once())->method('getCalendarsForUserCount')->willReturn(0); $cal->expects($this->once())->method('createCalendar')->with( 'principals/users/newUser', 'personal', ['{DAV:}displayname' => 'Personal']); @@ -142,7 +136,7 @@ class HookManagerTest extends TestCase { $card = $this->getMockBuilder('OCA\DAV\CardDAV\CardDavBackend') ->disableOriginalConstructor() ->getMock(); - $card->expects($this->once())->method('getAddressBooksForUser')->willReturn([]); + $card->expects($this->once())->method('getAddressBooksForUserCount')->willReturn(0); $card->expects($this->once())->method('createAddressBook')->with( 'principals/users/newUser', 'contacts', ['{DAV:}displayname' => 'Contacts']); diff --git a/apps/federation/l10n/cs_CZ.js b/apps/federation/l10n/cs_CZ.js index 3fcb48e2983..fddb539d354 100644 --- a/apps/federation/l10n/cs_CZ.js +++ b/apps/federation/l10n/cs_CZ.js @@ -13,6 +13,7 @@ OC.L10N.register( "Nextcloud Server" : "Server Nextcloud", "Server added to the list of trusted Nextclouds" : "Server přidán do seznamu důvěryhodných serverů Nextcloud", "No Nextcloud server found" : "Nextcloud server nenalezen", + "Nextcloud Federation allows you to connect with other trusted Nextclouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "Sdružování vám umožňuje se připojit k dalším důvěryhodným serverům Nextcloud za účelem výměny uživatelských adresářů. Používá se to např. pro automatické doplňování uživatelů při sdruženém sdílení.", "Trusted Nextcloud Servers" : "Důvěryhodné Nextcloud servery" }, "nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;"); diff --git a/apps/federation/l10n/cs_CZ.json b/apps/federation/l10n/cs_CZ.json index 0d8bd1b74f3..bcfdb074088 100644 --- a/apps/federation/l10n/cs_CZ.json +++ b/apps/federation/l10n/cs_CZ.json @@ -11,6 +11,7 @@ "Nextcloud Server" : "Server Nextcloud", "Server added to the list of trusted Nextclouds" : "Server přidán do seznamu důvěryhodných serverů Nextcloud", "No Nextcloud server found" : "Nextcloud server nenalezen", + "Nextcloud Federation allows you to connect with other trusted Nextclouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "Sdružování vám umožňuje se připojit k dalším důvěryhodným serverům Nextcloud za účelem výměny uživatelských adresářů. Používá se to např. pro automatické doplňování uživatelů při sdruženém sdílení.", "Trusted Nextcloud Servers" : "Důvěryhodné Nextcloud servery" },"pluralForm" :"nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;" }
\ No newline at end of file diff --git a/apps/federation/lib/AppInfo/Application.php b/apps/federation/lib/AppInfo/Application.php index cdc6145dfb4..e5acab52857 100644 --- a/apps/federation/lib/AppInfo/Application.php +++ b/apps/federation/lib/AppInfo/Application.php @@ -100,40 +100,6 @@ class Application extends \OCP\AppFramework\App { } /** - * register OCS API Calls - */ - public function registerOCSApi() { - - $container = $this->getContainer(); - $server = $container->getServer(); - - $auth = new OCSAuthAPI( - $server->getRequest(), - $server->getSecureRandom(), - $server->getJobList(), - $container->query('TrustedServers'), - $container->query('DbHandler'), - $server->getLogger() - - ); - - API::register('get', - '/apps/federation/api/v1/shared-secret', - array($auth, 'getSharedSecret'), - 'federation', - API::GUEST_AUTH - ); - - API::register('post', - '/apps/federation/api/v1/request-shared-secret', - array($auth, 'requestSharedSecret'), - 'federation', - API::GUEST_AUTH - ); - - } - - /** * listen to federated_share_added hooks to auto-add new servers to the * list of trusted servers. */ diff --git a/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php b/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php index 0746c517fa7..fe7cc5cc337 100644 --- a/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php +++ b/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php @@ -73,15 +73,15 @@ class GetSharedSecretTest extends TestCase { public function setUp() { parent::setUp(); - $this->httpClient = $this->getMock('OCP\Http\Client\IClient'); - $this->jobList = $this->getMock('OCP\BackgroundJob\IJobList'); - $this->urlGenerator = $this->getMock('OCP\IURLGenerator'); - $this->trustedServers = $this->getMockBuilder('OCA\Federation\TrustedServers') + $this->httpClient = $this->getMockBuilder(IClient::class)->getMock(); + $this->jobList = $this->getMockBuilder(IJobList::class)->getMock(); + $this->urlGenerator = $this->getMockBuilder(IURLGenerator::class)->getMock(); + $this->trustedServers = $this->getMockBuilder(TrustedServers::class) ->disableOriginalConstructor()->getMock(); - $this->dbHandler = $this->getMockBuilder('OCA\Federation\DbHandler') + $this->dbHandler = $this->getMockBuilder(DbHandler::class) ->disableOriginalConstructor()->getMock(); - $this->logger = $this->getMock('OCP\ILogger'); - $this->response = $this->getMock('OCP\Http\Client\IResponse'); + $this->logger = $this->getMockBuilder(ILogger::class)->getMock(); + $this->response = $this->getMockBuilder(IResponse::class)->getMock(); $this->getSharedSecret = new GetSharedSecret( $this->httpClient, diff --git a/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php b/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php index 339a2cbad00..3fa2ca2973e 100644 --- a/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php +++ b/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php @@ -61,14 +61,14 @@ class RequestSharedSecretTest extends TestCase { public function setUp() { parent::setUp(); - $this->httpClient = $this->getMock('OCP\Http\Client\IClient'); - $this->jobList = $this->getMock('OCP\BackgroundJob\IJobList'); - $this->urlGenerator = $this->getMock('OCP\IURLGenerator'); - $this->trustedServers = $this->getMockBuilder('OCA\Federation\TrustedServers') + $this->httpClient = $this->getMockBuilder(IClient::class)->getMock(); + $this->jobList = $this->getMockBuilder(IJobList::class)->getMock(); + $this->urlGenerator = $this->getMockBuilder(IURLGenerator::class)->getMock(); + $this->trustedServers = $this->getMockBuilder(TrustedServers::class) ->disableOriginalConstructor()->getMock(); - $this->dbHandler = $this->getMockBuilder('OCA\Federation\DbHandler') + $this->dbHandler = $this->getMockBuilder(DbHandler::class) ->disableOriginalConstructor()->getMock(); - $this->response = $this->getMock('OCP\Http\Client\IResponse'); + $this->response = $this->getMockBuilder(IResponse::class)->getMock(); $this->requestSharedSecret = new RequestSharedSecret( $this->httpClient, diff --git a/apps/federation/tests/Controller/SettingsControllerTest.php b/apps/federation/tests/Controller/SettingsControllerTest.php index e73d1f47cdd..2f93ebfeaa1 100644 --- a/apps/federation/tests/Controller/SettingsControllerTest.php +++ b/apps/federation/tests/Controller/SettingsControllerTest.php @@ -25,7 +25,10 @@ namespace OCA\Federation\Tests\Controller; use OCA\Federation\Controller\SettingsController; +use OCA\Federation\TrustedServers; use OCP\AppFramework\Http\DataResponse; +use OCP\IL10N; +use OCP\IRequest; use Test\TestCase; class SettingsControllerTest extends TestCase { @@ -45,9 +48,9 @@ class SettingsControllerTest extends TestCase { public function setUp() { parent::setUp(); - $this->request = $this->getMock('OCP\IRequest'); - $this->l10n = $this->getMock('OCP\IL10N'); - $this->trustedServers = $this->getMockBuilder('OCA\Federation\TrustedServers') + $this->request = $this->getMockBuilder(IRequest::class)->getMock(); + $this->l10n = $this->getMockBuilder(IL10N::class)->getMock(); + $this->trustedServers = $this->getMockBuilder(TrustedServers::class) ->disableOriginalConstructor()->getMock(); $this->controller = new SettingsController( diff --git a/apps/federation/tests/DbHandlerTest.php b/apps/federation/tests/DbHandlerTest.php index f27317cfad9..d9f9cf162b6 100644 --- a/apps/federation/tests/DbHandlerTest.php +++ b/apps/federation/tests/DbHandlerTest.php @@ -53,7 +53,7 @@ class DbHandlerTest extends TestCase { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); - $this->il10n = $this->getMock('OCP\IL10N'); + $this->il10n = $this->getMockBuilder(IL10N::class)->getMock(); $this->dbHandler = new DbHandler( $this->connection, diff --git a/apps/federation/tests/Middleware/AddServerMiddlewareTest.php b/apps/federation/tests/Middleware/AddServerMiddlewareTest.php index 9eed79b0db0..b2096cb3730 100644 --- a/apps/federation/tests/Middleware/AddServerMiddlewareTest.php +++ b/apps/federation/tests/Middleware/AddServerMiddlewareTest.php @@ -29,6 +29,7 @@ use OC\HintException; use OCA\Federation\Middleware\AddServerMiddleware; use OCP\AppFramework\Controller; use OCP\AppFramework\Http; +use OCP\IL10N; use OCP\ILogger; use Test\TestCase; @@ -49,9 +50,9 @@ class AddServerMiddlewareTest extends TestCase { public function setUp() { parent::setUp(); - $this->logger = $this->getMock('OCP\ILogger'); - $this->l10n = $this->getMock('OCP\IL10N'); - $this->controller = $this->getMockBuilder('OCP\AppFramework\Controller') + $this->logger = $this->getMockBuilder(ILogger::class)->getMock(); + $this->l10n = $this->getMockBuilder(IL10N::class)->getMock(); + $this->controller = $this->getMockBuilder(Controller::class) ->disableOriginalConstructor()->getMock(); $this->middleware = new AddServerMiddleware( diff --git a/apps/federation/tests/TrustedServersTest.php b/apps/federation/tests/TrustedServersTest.php index 1bf1475aef2..d16c0908dd4 100644 --- a/apps/federation/tests/TrustedServersTest.php +++ b/apps/federation/tests/TrustedServersTest.php @@ -74,17 +74,17 @@ class TrustedServersTest extends TestCase { public function setUp() { parent::setUp(); - $this->dbHandler = $this->getMockBuilder('\OCA\Federation\DbHandler') + $this->dbHandler = $this->getMockBuilder(DbHandler::class) ->disableOriginalConstructor()->getMock(); - $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface') + $this->dispatcher = $this->getMockBuilder(EventDispatcherInterface::class) ->disableOriginalConstructor()->getMock(); - $this->httpClientService = $this->getMock('OCP\Http\Client\IClientService'); - $this->httpClient = $this->getMock('OCP\Http\Client\IClient'); - $this->response = $this->getMock('OCP\Http\Client\IResponse'); - $this->logger = $this->getMock('OCP\ILogger'); - $this->jobList = $this->getMock('OCP\BackgroundJob\IJobList'); - $this->secureRandom = $this->getMock('OCP\Security\ISecureRandom'); - $this->config = $this->getMock('OCP\IConfig'); + $this->httpClientService = $this->getMockBuilder(IClientService::class)->getMock(); + $this->httpClient = $this->getMockBuilder(IClient::class)->getMock(); + $this->response = $this->getMockBuilder(IResponse::class)->getMock(); + $this->logger = $this->getMockBuilder(ILogger::class)->getMock(); + $this->jobList = $this->getMockBuilder(IJobList::class)->getMock(); + $this->secureRandom = $this->getMockBuilder(ISecureRandom::class)->getMock(); + $this->config = $this->getMockBuilder(IConfig::class)->getMock(); $this->trustedServers = new TrustedServers( $this->dbHandler, diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index ca41012764a..26c6b34d098 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1202,8 +1202,9 @@ } td = $('<td></td>').attr({ "class": "date" }); td.append($('<span></span>').attr({ - "class": "modified", + "class": "modified live-relative-timestamp", "title": formatted, + "data-timestamp": mtime, "style": 'color:rgb('+modifiedColor+','+modifiedColor+','+modifiedColor+')' }).text(text) .tooltip({placement: 'top'}) @@ -1407,6 +1408,10 @@ return OC.linkTo('files', 'index.php')+"?dir="+ encodeURIComponent(dir).replace(/%2F/g, '/'); }, + /** + * @param {string} path + * @returns {boolean} + */ _isValidPath: function(path) { var sections = path.split('/'); for (var i = 0; i < sections.length; i++) { @@ -1414,7 +1419,9 @@ return false; } } - return true; + + return path.toLowerCase().indexOf(decodeURI('%0a')) === -1 && + path.toLowerCase().indexOf(decodeURI('%00')) === -1; }, /** diff --git a/apps/files/js/mainfileinfodetailview.js b/apps/files/js/mainfileinfodetailview.js index 30b2b531df7..20cedcf4e82 100644 --- a/apps/files/js/mainfileinfodetailview.js +++ b/apps/files/js/mainfileinfodetailview.js @@ -24,7 +24,7 @@ ' class="action action-favorite favorite">' + ' <img class="svg" alt="{{starAltText}}" src="{{starIcon}}" />' + ' </a>' + - ' {{#if hasSize}}<span class="size" title="{{altSize}}">{{size}}</span>, {{/if}}<span class="date" title="{{altDate}}">{{date}}</span>' + + ' {{#if hasSize}}<span class="size" title="{{altSize}}">{{size}}</span>, {{/if}}<span class="date live-relative-timestamp" data-timestamp="{{timestamp}}" title="{{altDate}}">{{date}}</span>' + ' </div>' + '</div>' + '<div class="hidden permalink-field">' + @@ -152,6 +152,7 @@ altSize: n('files', '%n byte', '%n bytes', this.model.get('size')), dateLabel: t('files', 'Modified'), altDate: OC.Util.formatDate(this.model.get('mtime')), + timestamp: this.model.get('mtime'), date: OC.Util.relativeModifiedDate(this.model.get('mtime')), starAltText: isFavorite ? t('files', 'Favorited') : t('files', 'Favorite'), starIcon: OC.imagePath('core', isFavorite ? 'actions/starred' : 'actions/star'), diff --git a/apps/files/l10n/cs_CZ.js b/apps/files/l10n/cs_CZ.js index 20f49a06449..766bd4b6177 100644 --- a/apps/files/l10n/cs_CZ.js +++ b/apps/files/l10n/cs_CZ.js @@ -74,6 +74,7 @@ OC.L10N.register( "_%n folder_::_%n folders_" : ["%n adresář","%n adresáře","%n adresářů"], "_%n file_::_%n files_" : ["%n soubor","%n soubory","%n souborů"], "{dirs} and {files}" : "{dirs} a {files}", + "_including %n hidden_::_including %n hidden_" : ["přidán %n skrytý","přidány %n skryté","přidáno %n skrytých"], "You don’t have permission to upload or create files here" : "Nemáte oprávnění sem nahrávat nebo vytvářet soubory", "_Uploading %n file_::_Uploading %n files_" : ["Nahrávám %n soubor","Nahrávám %n soubory","Nahrávám %n souborů"], "New" : "Nový", diff --git a/apps/files/l10n/cs_CZ.json b/apps/files/l10n/cs_CZ.json index 73ba2b50494..d5e7a34549e 100644 --- a/apps/files/l10n/cs_CZ.json +++ b/apps/files/l10n/cs_CZ.json @@ -72,6 +72,7 @@ "_%n folder_::_%n folders_" : ["%n adresář","%n adresáře","%n adresářů"], "_%n file_::_%n files_" : ["%n soubor","%n soubory","%n souborů"], "{dirs} and {files}" : "{dirs} a {files}", + "_including %n hidden_::_including %n hidden_" : ["přidán %n skrytý","přidány %n skryté","přidáno %n skrytých"], "You don’t have permission to upload or create files here" : "Nemáte oprávnění sem nahrávat nebo vytvářet soubory", "_Uploading %n file_::_Uploading %n files_" : ["Nahrávám %n soubor","Nahrávám %n soubory","Nahrávám %n souborů"], "New" : "Nový", diff --git a/apps/files/l10n/de.js b/apps/files/l10n/de.js index ebbcd3c7ff2..a318be3770e 100644 --- a/apps/files/l10n/de.js +++ b/apps/files/l10n/de.js @@ -74,6 +74,7 @@ OC.L10N.register( "_%n folder_::_%n folders_" : ["%n Ordner","%n Ordner"], "_%n file_::_%n files_" : ["%n Datei","%n Dateien"], "{dirs} and {files}" : "{dirs} und {files}", + "_including %n hidden_::_including %n hidden_" : ["%n versteckten eingeschlossen","%n versteckten eingeschlossen"], "You don’t have permission to upload or create files here" : "Du hast keine Berechtigung, hier Dateien hochzuladen oder zu erstellen", "_Uploading %n file_::_Uploading %n files_" : ["%n Datei wird hochgeladen","%n Dateien werden hochgeladen"], "New" : "Neu", diff --git a/apps/files/l10n/de.json b/apps/files/l10n/de.json index 350fdad28af..d16b46eb2f6 100644 --- a/apps/files/l10n/de.json +++ b/apps/files/l10n/de.json @@ -72,6 +72,7 @@ "_%n folder_::_%n folders_" : ["%n Ordner","%n Ordner"], "_%n file_::_%n files_" : ["%n Datei","%n Dateien"], "{dirs} and {files}" : "{dirs} und {files}", + "_including %n hidden_::_including %n hidden_" : ["%n versteckten eingeschlossen","%n versteckten eingeschlossen"], "You don’t have permission to upload or create files here" : "Du hast keine Berechtigung, hier Dateien hochzuladen oder zu erstellen", "_Uploading %n file_::_Uploading %n files_" : ["%n Datei wird hochgeladen","%n Dateien werden hochgeladen"], "New" : "Neu", diff --git a/apps/files/l10n/de_DE.js b/apps/files/l10n/de_DE.js index 075f3156ee5..3301b2caa38 100644 --- a/apps/files/l10n/de_DE.js +++ b/apps/files/l10n/de_DE.js @@ -74,6 +74,7 @@ OC.L10N.register( "_%n folder_::_%n folders_" : ["%n Ordner","%n Ordner"], "_%n file_::_%n files_" : ["%n Datei","%n Dateien"], "{dirs} and {files}" : "{dirs} und {files}", + "_including %n hidden_::_including %n hidden_" : ["%n versteckten eingeschlossen","%n versteckten eingeschlossen"], "You don’t have permission to upload or create files here" : "Sie haben keine Berechtigung, hier Dateien hochzuladen oder zu erstellen", "_Uploading %n file_::_Uploading %n files_" : ["%n Datei wird hoch geladen","%n Dateien werden hoch geladen"], "New" : "Neu", diff --git a/apps/files/l10n/de_DE.json b/apps/files/l10n/de_DE.json index 84b3e9393a0..44a2c3eb6f5 100644 --- a/apps/files/l10n/de_DE.json +++ b/apps/files/l10n/de_DE.json @@ -72,6 +72,7 @@ "_%n folder_::_%n folders_" : ["%n Ordner","%n Ordner"], "_%n file_::_%n files_" : ["%n Datei","%n Dateien"], "{dirs} and {files}" : "{dirs} und {files}", + "_including %n hidden_::_including %n hidden_" : ["%n versteckten eingeschlossen","%n versteckten eingeschlossen"], "You don’t have permission to upload or create files here" : "Sie haben keine Berechtigung, hier Dateien hochzuladen oder zu erstellen", "_Uploading %n file_::_Uploading %n files_" : ["%n Datei wird hoch geladen","%n Dateien werden hoch geladen"], "New" : "Neu", diff --git a/apps/files/l10n/fr.js b/apps/files/l10n/fr.js index 738b8562bd1..43d225ad93f 100644 --- a/apps/files/l10n/fr.js +++ b/apps/files/l10n/fr.js @@ -74,6 +74,7 @@ OC.L10N.register( "_%n folder_::_%n folders_" : ["%n dossier","%n dossiers"], "_%n file_::_%n files_" : ["%n fichier","%n fichiers"], "{dirs} and {files}" : "{dirs} et {files}", + "_including %n hidden_::_including %n hidden_" : ["inclus %n caché","inclus %n cachés"], "You don’t have permission to upload or create files here" : "Vous n'avez pas la permission d'ajouter des fichiers ici", "_Uploading %n file_::_Uploading %n files_" : ["Téléversement de %n fichier","Téléversement de %n fichiers"], "New" : "Nouveau", diff --git a/apps/files/l10n/fr.json b/apps/files/l10n/fr.json index 780408a904d..f6e7a3e0e04 100644 --- a/apps/files/l10n/fr.json +++ b/apps/files/l10n/fr.json @@ -72,6 +72,7 @@ "_%n folder_::_%n folders_" : ["%n dossier","%n dossiers"], "_%n file_::_%n files_" : ["%n fichier","%n fichiers"], "{dirs} and {files}" : "{dirs} et {files}", + "_including %n hidden_::_including %n hidden_" : ["inclus %n caché","inclus %n cachés"], "You don’t have permission to upload or create files here" : "Vous n'avez pas la permission d'ajouter des fichiers ici", "_Uploading %n file_::_Uploading %n files_" : ["Téléversement de %n fichier","Téléversement de %n fichiers"], "New" : "Nouveau", diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js index 0a4812f3a81..304f8438a59 100644 --- a/apps/files/tests/js/filelistSpec.js +++ b/apps/files/tests/js/filelistSpec.js @@ -1401,9 +1401,11 @@ describe('OCA.Files.FileList tests', function() { '/abc/..', '/abc/../', '/../abc/', + '/foo%0Abar/', + '/foo%00bar/', '/another\\subdir/../foo\\../bar\\..\\file/..\\folder/../' ], function(path) { - fileList.changeDirectory(path); + fileList.changeDirectory(decodeURI(path)); expect(fileList.getCurrentDirectory()).toEqual('/'); }); }); diff --git a/apps/files_external/l10n/cs_CZ.js b/apps/files_external/l10n/cs_CZ.js index 3bf004901fa..a6f1e34b8c6 100644 --- a/apps/files_external/l10n/cs_CZ.js +++ b/apps/files_external/l10n/cs_CZ.js @@ -90,6 +90,7 @@ OC.L10N.register( "Google Drive" : "Google Drive", "Local" : "Místní", "Location" : "Umístění", + "Nextcloud" : "Nextcloud", "SFTP" : "SFTP", "Root" : "Kořen", "SFTP with secret key login" : "SFTP login s tajným klíčem", diff --git a/apps/files_external/l10n/cs_CZ.json b/apps/files_external/l10n/cs_CZ.json index ba8a5c0af17..f98c2a98d2c 100644 --- a/apps/files_external/l10n/cs_CZ.json +++ b/apps/files_external/l10n/cs_CZ.json @@ -88,6 +88,7 @@ "Google Drive" : "Google Drive", "Local" : "Místní", "Location" : "Umístění", + "Nextcloud" : "Nextcloud", "SFTP" : "SFTP", "Root" : "Kořen", "SFTP with secret key login" : "SFTP login s tajným klíčem", diff --git a/apps/files_external/l10n/de.js b/apps/files_external/l10n/de.js index 7cd2b464d20..7415ab04c24 100644 --- a/apps/files_external/l10n/de.js +++ b/apps/files_external/l10n/de.js @@ -90,6 +90,7 @@ OC.L10N.register( "Google Drive" : "Google Drive", "Local" : "Lokal", "Location" : "Ort", + "Nextcloud" : "Nextcloud", "SFTP" : "SFTP", "Root" : "Root", "SFTP with secret key login" : "SFTP mit dem Login über einen geheimen Schlüssel", diff --git a/apps/files_external/l10n/de.json b/apps/files_external/l10n/de.json index 8625eeced89..2107e0869b3 100644 --- a/apps/files_external/l10n/de.json +++ b/apps/files_external/l10n/de.json @@ -88,6 +88,7 @@ "Google Drive" : "Google Drive", "Local" : "Lokal", "Location" : "Ort", + "Nextcloud" : "Nextcloud", "SFTP" : "SFTP", "Root" : "Root", "SFTP with secret key login" : "SFTP mit dem Login über einen geheimen Schlüssel", diff --git a/apps/files_external/l10n/de_DE.js b/apps/files_external/l10n/de_DE.js index 21f6db49ee4..9cd938efa6f 100644 --- a/apps/files_external/l10n/de_DE.js +++ b/apps/files_external/l10n/de_DE.js @@ -90,6 +90,7 @@ OC.L10N.register( "Google Drive" : "Google Drive", "Local" : "Lokal", "Location" : "Ort", + "Nextcloud" : "Nextcloud", "SFTP" : "SFTP", "Root" : "Root", "SFTP with secret key login" : "SFTP mit dem Login über einen geheimen Schlüssel", diff --git a/apps/files_external/l10n/de_DE.json b/apps/files_external/l10n/de_DE.json index ba8cf0ef19c..5cac03478dc 100644 --- a/apps/files_external/l10n/de_DE.json +++ b/apps/files_external/l10n/de_DE.json @@ -88,6 +88,7 @@ "Google Drive" : "Google Drive", "Local" : "Lokal", "Location" : "Ort", + "Nextcloud" : "Nextcloud", "SFTP" : "SFTP", "Root" : "Root", "SFTP with secret key login" : "SFTP mit dem Login über einen geheimen Schlüssel", diff --git a/apps/files_external/l10n/fr.js b/apps/files_external/l10n/fr.js index c613722f110..9349d6dde25 100644 --- a/apps/files_external/l10n/fr.js +++ b/apps/files_external/l10n/fr.js @@ -90,6 +90,7 @@ OC.L10N.register( "Google Drive" : "Google Drive", "Local" : "Local", "Location" : "Emplacement", + "Nextcloud" : "Nextcloud", "SFTP" : "SFTP", "Root" : "Racine", "SFTP with secret key login" : "SFTP avec identification par clé", diff --git a/apps/files_external/l10n/fr.json b/apps/files_external/l10n/fr.json index b0cbc47a67c..eb824a4b117 100644 --- a/apps/files_external/l10n/fr.json +++ b/apps/files_external/l10n/fr.json @@ -88,6 +88,7 @@ "Google Drive" : "Google Drive", "Local" : "Local", "Location" : "Emplacement", + "Nextcloud" : "Nextcloud", "SFTP" : "SFTP", "Root" : "Racine", "SFTP with secret key login" : "SFTP avec identification par clé", diff --git a/apps/files_versions/js/versionstabview.js b/apps/files_versions/js/versionstabview.js index 2424778b4ee..2e334edacb5 100644 --- a/apps/files_versions/js/versionstabview.js +++ b/apps/files_versions/js/versionstabview.js @@ -15,7 +15,7 @@ '<li data-revision="{{timestamp}}">' + '<img class="preview" src="{{previewUrl}}"/>' + '<a href="{{downloadUrl}}" class="downloadVersion"><img src="{{downloadIconUrl}}" />' + - '<span class="versiondate has-tooltip" title="{{formattedTimestamp}}">{{relativeTimestamp}}</span>' + + '<span class="versiondate has-tooltip live-relative-timestamp" data-timestamp="{{millisecondsTimestamp}}" title="{{formattedTimestamp}}">{{relativeTimestamp}}</span>' + '</a>' + '{{#canRevert}}' + '<a href="#" class="revertVersion" title="{{revertLabel}}"><img src="{{revertIconUrl}}" /></a>' + @@ -183,6 +183,7 @@ _formatItem: function(version) { var timestamp = version.get('timestamp') * 1000; return _.extend({ + millisecondsTimestamp: timestamp, formattedTimestamp: OC.Util.formatDate(timestamp), relativeTimestamp: OC.Util.relativeModifiedDate(timestamp), downloadUrl: version.getDownloadUrl(), diff --git a/apps/user_ldap/js/wizard/wizard.js b/apps/user_ldap/js/wizard/wizard.js index e8450d1c78f..62a3fccbdfb 100644 --- a/apps/user_ldap/js/wizard/wizard.js +++ b/apps/user_ldap/js/wizard/wizard.js @@ -70,7 +70,7 @@ OCA = OCA || {}; controller.setView(view); controller.setModel(model); controller.run(); - } + }; OCA.LDAP.Wizard.Wizard = Wizard; })(); diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php index 299ad581644..12d71b1528a 100644 --- a/apps/user_ldap/lib/Access.php +++ b/apps/user_ldap/lib/Access.php @@ -869,7 +869,7 @@ class Access extends LDAPUtility implements IUserTools { //browsing through prior pages to get the cookie for the new one if($skipHandling) { - return; + return false; } // if count is bigger, then the server does not support // paged search. Instead, he did a normal search. We set a @@ -983,7 +983,6 @@ class Access extends LDAPUtility implements IUserTools { $findings = array(); $savedoffset = $offset; do { - $continue = false; $search = $this->executeSearch($filter, $base, $attr, $limit, $offset); if($search === false) { return array(); diff --git a/apps/user_ldap/lib/Configuration.php b/apps/user_ldap/lib/Configuration.php index 2fa42efda26..54dfe6779ba 100644 --- a/apps/user_ldap/lib/Configuration.php +++ b/apps/user_ldap/lib/Configuration.php @@ -106,12 +106,13 @@ class Configuration { /** * @param string $name - * @return mixed|void + * @return mixed|null */ public function __get($name) { if(isset($this->config[$name])) { return $this->config[$name]; } + return null; } /** @@ -182,7 +183,7 @@ class Configuration { $applied[] = $inputKey; } } - + return null; } public function readConfiguration() { diff --git a/apps/user_ldap/lib/Connection.php b/apps/user_ldap/lib/Connection.php index 7fb26526195..07a595f0529 100644 --- a/apps/user_ldap/lib/Connection.php +++ b/apps/user_ldap/lib/Connection.php @@ -558,12 +558,13 @@ class Connection extends LDAPUtility { } return $bindStatus; } + return null; } /** * @param string $host * @param string $port - * @return false|void + * @return bool * @throws \OC\ServerNotAvailableException */ private function doConnect($host, $port) { @@ -580,6 +581,7 @@ class Connection extends LDAPUtility { } else { throw new \OC\ServerNotAvailableException('Could not set required LDAP Protocol version.'); } + return true; } /** diff --git a/apps/user_ldap/lib/Jobs/UpdateGroups.php b/apps/user_ldap/lib/Jobs/UpdateGroups.php index 047b95a6d9b..3b951d20c43 100644 --- a/apps/user_ldap/lib/Jobs/UpdateGroups.php +++ b/apps/user_ldap/lib/Jobs/UpdateGroups.php @@ -44,7 +44,6 @@ class UpdateGroups extends \OC\BackgroundJob\TimedJob { static private $groupsFromDB; static private $groupBE; - static private $connector; public function __construct(){ $this->interval = self::getRefreshInterval(); diff --git a/apps/user_ldap/lib/LDAP.php b/apps/user_ldap/lib/LDAP.php index 5376d92a742..74d83e4ab4f 100644 --- a/apps/user_ldap/lib/LDAP.php +++ b/apps/user_ldap/lib/LDAP.php @@ -259,6 +259,7 @@ class LDAP implements ILDAPWrapper { } return $result; } + return null; } /** diff --git a/apps/user_ldap/lib/User_LDAP.php b/apps/user_ldap/lib/User_LDAP.php index ce1aafc210e..13e61c63c08 100644 --- a/apps/user_ldap/lib/User_LDAP.php +++ b/apps/user_ldap/lib/User_LDAP.php @@ -189,11 +189,6 @@ class User_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserIn $this->access->connection->ldapUserDisplayName . '=*', $this->access->getFilterPartForUserSearch($search) )); - $attrs = array($this->access->connection->ldapUserDisplayName, 'dn'); - $additionalAttribute = $this->access->connection->ldapUserDisplayName2; - if(!empty($additionalAttribute)) { - $attrs[] = $additionalAttribute; - } \OCP\Util::writeLog('user_ldap', 'getUsers: Options: search '.$search.' limit '.$limit.' offset '.$offset.' Filter: '.$filter, diff --git a/apps/user_ldap/lib/Wizard.php b/apps/user_ldap/lib/Wizard.php index 573d30f0005..852c806b104 100644 --- a/apps/user_ldap/lib/Wizard.php +++ b/apps/user_ldap/lib/Wizard.php @@ -943,7 +943,6 @@ class Wizard extends LDAPUtility { $cns = $this->configuration->ldapGroupFilterGroups; if(is_array($cns) && count($cns) > 0) { $filter .= '(|'; - $base = $this->configuration->ldapBase[0]; foreach($cns as $cn) { $filter .= '(cn=' . $cn . ')'; } diff --git a/apps/user_ldap/tests/AccessTest.php b/apps/user_ldap/tests/AccessTest.php index 2fddafa214b..5e99583c70f 100644 --- a/apps/user_ldap/tests/AccessTest.php +++ b/apps/user_ldap/tests/AccessTest.php @@ -201,6 +201,7 @@ class AccessTest extends \Test\TestCase { return $case['interResult']; } } + return null; })); foreach($cases as $case) { diff --git a/apps/user_ldap/tests/ConfigurationTest.php b/apps/user_ldap/tests/ConfigurationTest.php index 9951b97e06c..797d2598be4 100644 --- a/apps/user_ldap/tests/ConfigurationTest.php +++ b/apps/user_ldap/tests/ConfigurationTest.php @@ -93,14 +93,6 @@ class ConfigurationTest extends \Test\TestCase { public function testSetValue($key, $input, $expected) { $configuration = new \OCA\User_LDAP\Configuration('t01', false); - $settingsInput = array( - 'ldapBaseUsers' => array( - 'cn=someUsers,dc=example,dc=org', - ' ', - ' cn=moreUsers,dc=example,dc=org ' - ) - ); - $configuration->setConfiguration([$key => $input]); $this->assertSame($configuration->$key, $expected); } diff --git a/apps/user_ldap/tests/Integration/Lib/IntegrationTestUserHome.php b/apps/user_ldap/tests/Integration/Lib/IntegrationTestUserHome.php index 95c14ca8947..2200ac327a1 100644 --- a/apps/user_ldap/tests/Integration/Lib/IntegrationTestUserHome.php +++ b/apps/user_ldap/tests/Integration/Lib/IntegrationTestUserHome.php @@ -111,7 +111,7 @@ class IntegrationTestUserHome extends AbstractIntegrationTest { */ protected function case2() { \OC::$server->getConfig()->setAppValue('user_ldap', 'enforce_home_folder_naming_rule', true); - $userManager = \oc::$server->getUserManager(); + $userManager = \OC::$server->getUserManager(); // clearing backends is critical, otherwise the userManager will have // the user objects cached and the value from case1 returned $userManager->clearBackends(); @@ -144,7 +144,7 @@ class IntegrationTestUserHome extends AbstractIntegrationTest { $this->connection->setConfiguration([ 'homeFolderNamingRule' => 'attr:', ]); - $userManager = \oc::$server->getUserManager(); + $userManager = \OC::$server->getUserManager(); $userManager->clearBackends(); $userManager->registerBackend($this->backend); $users = $userManager->search('', 5, 0); diff --git a/apps/user_ldap/tests/User/ManagerTest.php b/apps/user_ldap/tests/User/ManagerTest.php index 0c370f12c43..b3f22d6a068 100644 --- a/apps/user_ldap/tests/User/ManagerTest.php +++ b/apps/user_ldap/tests/User/ManagerTest.php @@ -208,7 +208,6 @@ class ManagerTest extends \Test\TestCase { list($access, $config, $filesys, $image, $log, $avaMgr, $dbc, $userMgr) = $this->getTestInstances(); - $dn = 'cn=foo,dc=foobar,dc=bar'; $uid = 'gone'; $access->expects($this->never()) diff --git a/core/js/js.js b/core/js/js.js index 799d2ba0b24..a123846a72e 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -1660,6 +1660,13 @@ function initCore() { $('body').delegate('#app-content', 'apprendered appresized', adjustControlsWidth); } + + // Update live timestamps every 30 seconds + setInterval(function() { + $('.live-relative-timestamp').each(function() { + $(this).text(OC.Util.relativeModifiedDate(parseInt($(this).attr('data-timestamp'), 10))); + }); + }, 30 * 1000); } $(document).ready(initCore); diff --git a/core/l10n/cs_CZ.js b/core/l10n/cs_CZ.js index 7431c6d8963..c8120c7ab45 100644 --- a/core/l10n/cs_CZ.js +++ b/core/l10n/cs_CZ.js @@ -155,6 +155,7 @@ OC.L10N.register( "Link" : "Odkaz", "Password protect" : "Chránit heslem", "Password" : "Heslo", + "Allow upload and editing" : "Povolit nahrávání a úpravy", "Hide file listing" : "Skrýt seznam souborů", "Email link to person" : "Odeslat osobě odkaz emailem", "Send" : "Odeslat", @@ -292,6 +293,10 @@ OC.L10N.register( "This means only administrators can use the instance." : "To znamená, že pouze správci systému mohou aplikaci používat.", "Contact your system administrator if this message persists or appeared unexpectedly." : "Kontaktujte prosím správce systému, pokud se tato zpráva objevuje opakovaně nebo nečekaně.", "Thank you for your patience." : "Děkujeme za vaši trpělivost.", + "Two-factor authentication" : "Dvoufaktorové přihlášení", + "Enhanced security is enabled for your account. Please authenticate using a second factor." : "Bylo zapnuto vylepšené zabezpečení pro tento účet. Přihlašte se za použití druhého faktoru.", + "Cancel log in" : "Zrušit přihlášení", + "Error while validating your second factor" : "Chyba při ověřování druhého faktoru", "You are accessing the server from an untrusted domain." : "Přistupujete na server z nedůvěryhodné domény.", "Please contact your administrator. If you are an administrator of this instance, configure the \"trusted_domains\" setting in config/config.php. An example configuration is provided in config/config.sample.php." : "Kontaktujte prosím svého správce. Pokud spravujete tuto instalaci, nastavte \"trusted_domains\" v souboru config/config.php. Příklad konfigurace najdete v souboru config/config.sample.php.", "Depending on your configuration, as an administrator you might also be able to use the button below to trust this domain." : "V závislosti na vaší konfiguraci vám může být, jako správci, umožněno použití tlačítka níže k označení této domény jako důvěryhodné.", diff --git a/core/l10n/cs_CZ.json b/core/l10n/cs_CZ.json index 7f39ab79792..71bfa5c39bc 100644 --- a/core/l10n/cs_CZ.json +++ b/core/l10n/cs_CZ.json @@ -153,6 +153,7 @@ "Link" : "Odkaz", "Password protect" : "Chránit heslem", "Password" : "Heslo", + "Allow upload and editing" : "Povolit nahrávání a úpravy", "Hide file listing" : "Skrýt seznam souborů", "Email link to person" : "Odeslat osobě odkaz emailem", "Send" : "Odeslat", @@ -290,6 +291,10 @@ "This means only administrators can use the instance." : "To znamená, že pouze správci systému mohou aplikaci používat.", "Contact your system administrator if this message persists or appeared unexpectedly." : "Kontaktujte prosím správce systému, pokud se tato zpráva objevuje opakovaně nebo nečekaně.", "Thank you for your patience." : "Děkujeme za vaši trpělivost.", + "Two-factor authentication" : "Dvoufaktorové přihlášení", + "Enhanced security is enabled for your account. Please authenticate using a second factor." : "Bylo zapnuto vylepšené zabezpečení pro tento účet. Přihlašte se za použití druhého faktoru.", + "Cancel log in" : "Zrušit přihlášení", + "Error while validating your second factor" : "Chyba při ověřování druhého faktoru", "You are accessing the server from an untrusted domain." : "Přistupujete na server z nedůvěryhodné domény.", "Please contact your administrator. If you are an administrator of this instance, configure the \"trusted_domains\" setting in config/config.php. An example configuration is provided in config/config.sample.php." : "Kontaktujte prosím svého správce. Pokud spravujete tuto instalaci, nastavte \"trusted_domains\" v souboru config/config.php. Příklad konfigurace najdete v souboru config/config.sample.php.", "Depending on your configuration, as an administrator you might also be able to use the button below to trust this domain." : "V závislosti na vaší konfiguraci vám může být, jako správci, umožněno použití tlačítka níže k označení této domény jako důvěryhodné.", diff --git a/core/l10n/de.js b/core/l10n/de.js index fff4d26394c..987bf0a9898 100644 --- a/core/l10n/de.js +++ b/core/l10n/de.js @@ -155,6 +155,7 @@ OC.L10N.register( "Link" : "Link", "Password protect" : "Passwortschutz", "Password" : "Passwort", + "Allow upload and editing" : "Hochladen und Bearbeiten erlauben", "Hide file listing" : "Dateiliste verbergen", "Email link to person" : "Link per E-Mail verschicken", "Send" : "Senden", @@ -292,6 +293,10 @@ OC.L10N.register( "This means only administrators can use the instance." : "Dies bedeutet, dass diese Instanz nur von Administratoren genutzt werden kann.", "Contact your system administrator if this message persists or appeared unexpectedly." : "Kontaktiere deinen Systemadministrator, wenn diese Meldung dauerhaft oder unerwartet erscheint.", "Thank you for your patience." : "Vielen Dank für Ihre Geduld.", + "Two-factor authentication" : "Zwei-Faktor Authentifizierung", + "Enhanced security is enabled for your account. Please authenticate using a second factor." : "Die erweiterte Sicherheit wurde für dein Konto aktiviert. Bitte authentifiziere dich mit einem zweiten Faktor. ", + "Cancel log in" : "Anmelden abbrechen", + "Error while validating your second factor" : "Fehler beim Bestätigen des zweiten Sicherheitsfaktors", "You are accessing the server from an untrusted domain." : "Du greifst von einer nicht vertrauenswürdigen Domäne auf den Server zu.", "Please contact your administrator. If you are an administrator of this instance, configure the \"trusted_domains\" setting in config/config.php. An example configuration is provided in config/config.sample.php." : "Bitte kontaktiere deinenAdministrator. Wenn du Administrator dieser Instanz bist, konfiguriere die \"TRUSTED_DOMAINS\" Einstellung in config/config.php .Eine Beispielkonfiguration ist in config/config.sample.php ersichtlich.", "Depending on your configuration, as an administrator you might also be able to use the button below to trust this domain." : "Wenn es deine Konfiguration zulässt, kannst du als Administrator die folgende Schaltfläche benutzen, um diese Domain als vertrauenswürdig einzustufen.", diff --git a/core/l10n/de.json b/core/l10n/de.json index 51e83125a4c..92de2fde9bf 100644 --- a/core/l10n/de.json +++ b/core/l10n/de.json @@ -153,6 +153,7 @@ "Link" : "Link", "Password protect" : "Passwortschutz", "Password" : "Passwort", + "Allow upload and editing" : "Hochladen und Bearbeiten erlauben", "Hide file listing" : "Dateiliste verbergen", "Email link to person" : "Link per E-Mail verschicken", "Send" : "Senden", @@ -290,6 +291,10 @@ "This means only administrators can use the instance." : "Dies bedeutet, dass diese Instanz nur von Administratoren genutzt werden kann.", "Contact your system administrator if this message persists or appeared unexpectedly." : "Kontaktiere deinen Systemadministrator, wenn diese Meldung dauerhaft oder unerwartet erscheint.", "Thank you for your patience." : "Vielen Dank für Ihre Geduld.", + "Two-factor authentication" : "Zwei-Faktor Authentifizierung", + "Enhanced security is enabled for your account. Please authenticate using a second factor." : "Die erweiterte Sicherheit wurde für dein Konto aktiviert. Bitte authentifiziere dich mit einem zweiten Faktor. ", + "Cancel log in" : "Anmelden abbrechen", + "Error while validating your second factor" : "Fehler beim Bestätigen des zweiten Sicherheitsfaktors", "You are accessing the server from an untrusted domain." : "Du greifst von einer nicht vertrauenswürdigen Domäne auf den Server zu.", "Please contact your administrator. If you are an administrator of this instance, configure the \"trusted_domains\" setting in config/config.php. An example configuration is provided in config/config.sample.php." : "Bitte kontaktiere deinenAdministrator. Wenn du Administrator dieser Instanz bist, konfiguriere die \"TRUSTED_DOMAINS\" Einstellung in config/config.php .Eine Beispielkonfiguration ist in config/config.sample.php ersichtlich.", "Depending on your configuration, as an administrator you might also be able to use the button below to trust this domain." : "Wenn es deine Konfiguration zulässt, kannst du als Administrator die folgende Schaltfläche benutzen, um diese Domain als vertrauenswürdig einzustufen.", diff --git a/core/l10n/de_DE.js b/core/l10n/de_DE.js index 1b7ca130c39..06722cdb1a1 100644 --- a/core/l10n/de_DE.js +++ b/core/l10n/de_DE.js @@ -155,6 +155,7 @@ OC.L10N.register( "Link" : "Link", "Password protect" : "Passwortschutz", "Password" : "Passwort", + "Allow upload and editing" : "Hochladen und Bearbeiten erlauben", "Hide file listing" : "Dateiliste verbergen", "Email link to person" : "Link per E-Mail verschicken", "Send" : "Senden", @@ -292,6 +293,10 @@ OC.L10N.register( "This means only administrators can use the instance." : "Das bedeutet, dass diese Instanz nur von Administratoren benutzt werden kann.", "Contact your system administrator if this message persists or appeared unexpectedly." : "Kontaktieren Sie Ihren Systemadministrator, wenn diese Meldung dauerhaft oder unerwartet erscheint.", "Thank you for your patience." : "Vielen Dank für Ihre Geduld.", + "Two-factor authentication" : "Zwei-Faktor Authentifizierung", + "Enhanced security is enabled for your account. Please authenticate using a second factor." : "Die erweiterte Sicherheit wurde für Ihr Konto aktiviert. Bitte authentifizieren Sie sich mit einem zweiten Faktor. ", + "Cancel log in" : "Anmelden abbrechen", + "Error while validating your second factor" : "Fehler beim Bestätigen des zweiten Sicherheitsfaktors", "You are accessing the server from an untrusted domain." : "Sie greifen von einer nicht vertrauenswürdigen Domain auf den Server zu.", "Please contact your administrator. If you are an administrator of this instance, configure the \"trusted_domains\" setting in config/config.php. An example configuration is provided in config/config.sample.php." : "Bitte kontaktieren Sie Ihren Administrator. Wenn Sie Administrator dieser Instanz sind, konfigurieren Sie bitte die „trusted_domain“-Einstellung in config/config.php. Eine Beispielkonfiguration wird unter config/config.sample.php bereitgestellt.", "Depending on your configuration, as an administrator you might also be able to use the button below to trust this domain." : "Wenn es Ihre Konfiguration zulässt, können Sie als Administrator gegebenenfalls den Button unten benutzen, um diese Domain als vertrauenswürdig einzustufen.", diff --git a/core/l10n/de_DE.json b/core/l10n/de_DE.json index 0a142d106f3..c09023d7388 100644 --- a/core/l10n/de_DE.json +++ b/core/l10n/de_DE.json @@ -153,6 +153,7 @@ "Link" : "Link", "Password protect" : "Passwortschutz", "Password" : "Passwort", + "Allow upload and editing" : "Hochladen und Bearbeiten erlauben", "Hide file listing" : "Dateiliste verbergen", "Email link to person" : "Link per E-Mail verschicken", "Send" : "Senden", @@ -290,6 +291,10 @@ "This means only administrators can use the instance." : "Das bedeutet, dass diese Instanz nur von Administratoren benutzt werden kann.", "Contact your system administrator if this message persists or appeared unexpectedly." : "Kontaktieren Sie Ihren Systemadministrator, wenn diese Meldung dauerhaft oder unerwartet erscheint.", "Thank you for your patience." : "Vielen Dank für Ihre Geduld.", + "Two-factor authentication" : "Zwei-Faktor Authentifizierung", + "Enhanced security is enabled for your account. Please authenticate using a second factor." : "Die erweiterte Sicherheit wurde für Ihr Konto aktiviert. Bitte authentifizieren Sie sich mit einem zweiten Faktor. ", + "Cancel log in" : "Anmelden abbrechen", + "Error while validating your second factor" : "Fehler beim Bestätigen des zweiten Sicherheitsfaktors", "You are accessing the server from an untrusted domain." : "Sie greifen von einer nicht vertrauenswürdigen Domain auf den Server zu.", "Please contact your administrator. If you are an administrator of this instance, configure the \"trusted_domains\" setting in config/config.php. An example configuration is provided in config/config.sample.php." : "Bitte kontaktieren Sie Ihren Administrator. Wenn Sie Administrator dieser Instanz sind, konfigurieren Sie bitte die „trusted_domain“-Einstellung in config/config.php. Eine Beispielkonfiguration wird unter config/config.sample.php bereitgestellt.", "Depending on your configuration, as an administrator you might also be able to use the button below to trust this domain." : "Wenn es Ihre Konfiguration zulässt, können Sie als Administrator gegebenenfalls den Button unten benutzen, um diese Domain als vertrauenswürdig einzustufen.", diff --git a/core/l10n/fr.js b/core/l10n/fr.js index d6d8d0856ae..37f2c823070 100644 --- a/core/l10n/fr.js +++ b/core/l10n/fr.js @@ -155,6 +155,7 @@ OC.L10N.register( "Link" : "Lien", "Password protect" : "Protéger par un mot de passe", "Password" : "Mot de passe", + "Allow upload and editing" : "Autoriser l'envoi et l'édition", "Hide file listing" : "Cacher la liste des fichiers", "Email link to person" : "Envoyer le lien par courriel", "Send" : "Envoyer", @@ -292,6 +293,10 @@ OC.L10N.register( "This means only administrators can use the instance." : "Cela signifie que seuls les administrateurs peuvent utiliser l'instance.", "Contact your system administrator if this message persists or appeared unexpectedly." : "Veuillez contacter votre administrateur système si ce message persiste ou apparaît de façon inattendue.", "Thank you for your patience." : "Merci de votre patience.", + "Two-factor authentication" : "Second facteur d'authentification", + "Enhanced security is enabled for your account. Please authenticate using a second factor." : "La sécurité renforcée est activée pour votre compte. Veuillez vous authentifier en utilisant un second facteur.", + "Cancel log in" : "Annuler l'authentification", + "Error while validating your second factor" : "Erreur lors de la validation de votre second facteur", "You are accessing the server from an untrusted domain." : "Vous accédez au serveur à partir d'un domaine non approuvé.", "Please contact your administrator. If you are an administrator of this instance, configure the \"trusted_domains\" setting in config/config.php. An example configuration is provided in config/config.sample.php." : "Veuillez contacter votre administrateur. Si vous être l'administrateur de cette instance, configurez la variable \"trusted_domains\" dans le fichier config/config.php. Un exemple de configuration est fournit dans le fichier config/config.sample.php.", "Depending on your configuration, as an administrator you might also be able to use the button below to trust this domain." : "En fonction de votre configuration, en tant qu'administrateur vous pouvez également utiliser le bouton ci-dessous pour approuver ce domaine.", diff --git a/core/l10n/fr.json b/core/l10n/fr.json index 8002fc1af65..de3ec024591 100644 --- a/core/l10n/fr.json +++ b/core/l10n/fr.json @@ -153,6 +153,7 @@ "Link" : "Lien", "Password protect" : "Protéger par un mot de passe", "Password" : "Mot de passe", + "Allow upload and editing" : "Autoriser l'envoi et l'édition", "Hide file listing" : "Cacher la liste des fichiers", "Email link to person" : "Envoyer le lien par courriel", "Send" : "Envoyer", @@ -290,6 +291,10 @@ "This means only administrators can use the instance." : "Cela signifie que seuls les administrateurs peuvent utiliser l'instance.", "Contact your system administrator if this message persists or appeared unexpectedly." : "Veuillez contacter votre administrateur système si ce message persiste ou apparaît de façon inattendue.", "Thank you for your patience." : "Merci de votre patience.", + "Two-factor authentication" : "Second facteur d'authentification", + "Enhanced security is enabled for your account. Please authenticate using a second factor." : "La sécurité renforcée est activée pour votre compte. Veuillez vous authentifier en utilisant un second facteur.", + "Cancel log in" : "Annuler l'authentification", + "Error while validating your second factor" : "Erreur lors de la validation de votre second facteur", "You are accessing the server from an untrusted domain." : "Vous accédez au serveur à partir d'un domaine non approuvé.", "Please contact your administrator. If you are an administrator of this instance, configure the \"trusted_domains\" setting in config/config.php. An example configuration is provided in config/config.sample.php." : "Veuillez contacter votre administrateur. Si vous être l'administrateur de cette instance, configurez la variable \"trusted_domains\" dans le fichier config/config.php. Un exemple de configuration est fournit dans le fichier config/config.sample.php.", "Depending on your configuration, as an administrator you might also be able to use the button below to trust this domain." : "En fonction de votre configuration, en tant qu'administrateur vous pouvez également utiliser le bouton ci-dessous pour approuver ce domaine.", diff --git a/core/templates/login.php b/core/templates/login.php index c5453c34497..49fa0dd6aff 100644 --- a/core/templates/login.php +++ b/core/templates/login.php @@ -43,7 +43,7 @@ script('core', [ placeholder="<?php p($l->t('Username or email')); ?>" value="<?php p($_['loginName']); ?>" <?php p($_['user_autofocus'] ? 'autofocus' : ''); ?> - autocomplete="on" autocapitalize="off" autocorrect="off" required> + autocomplete="on" autocapitalize="off" autocorrect="off" required tabindex="1"> <label for="user" class="infield"><?php p($l->t('Username or email')); ?></label> </p> @@ -51,9 +51,9 @@ script('core', [ <input type="password" name="password" id="password" value="" placeholder="<?php p($l->t('Password')); ?>" <?php p($_['user_autofocus'] ? '' : 'autofocus'); ?> - autocomplete="on" autocapitalize="off" autocorrect="off" required> + autocomplete="on" autocapitalize="off" autocorrect="off" required tabindex="2"> <label for="password" class="infield"><?php p($l->t('Password')); ?></label> - <input type="submit" id="submit" class="login primary icon-confirm" title="<?php p($l->t('Log in')); ?>" value="" disabled="disabled"/> + <input type="submit" id="submit" class="login primary icon-confirm" title="<?php p($l->t('Log in')); ?>" value="" disabled="disabled" tabindex="4" /> </p> <?php if (!empty($_['invalidpassword']) && !empty($_['canResetPassword'])) { ?> @@ -68,9 +68,9 @@ script('core', [ <?php if ($_['rememberLoginAllowed'] === true) : ?> <div class="remember-login-container"> <?php if ($_['rememberLoginState'] === 0) { ?> - <input type="checkbox" name="remember_login" value="1" id="remember_login" class="checkbox checkbox--white"> + <input type="checkbox" name="remember_login" value="1" id="remember_login" class="checkbox checkbox--white" tabindex="3"> <?php } else { ?> - <input type="checkbox" name="remember_login" value="1" id="remember_login" class="checkbox checkbox--white" checked="checked"> + <input type="checkbox" name="remember_login" value="1" id="remember_login" class="checkbox checkbox--white" checked="checked" tabindex="3"> <?php } ?> <label for="remember_login"><?php p($l->t('Stay logged in')); ?></label> </div> diff --git a/lib/private/AppFramework/App.php b/lib/private/AppFramework/App.php index c7670953b4e..427a850f396 100644 --- a/lib/private/AppFramework/App.php +++ b/lib/private/AppFramework/App.php @@ -30,6 +30,7 @@ namespace OC\AppFramework; use OC\AppFramework\Http\Dispatcher; use OC_App; use OC\AppFramework\DependencyInjection\DIContainer; +use OCP\AppFramework\Http; use OCP\AppFramework\QueryException; use OCP\AppFramework\Http\ICallbackResponse; @@ -41,6 +42,8 @@ use OCP\AppFramework\Http\ICallbackResponse; */ class App { + /** @var string[] */ + private static $nameSpaceCache = []; /** * Turns an app id into a namespace by either reading the appinfo.xml's @@ -51,6 +54,11 @@ class App { * @return string the starting namespace for the app */ public static function buildAppNamespace($appId, $topNamespace='OCA\\') { + // Hit the cache! + if (isset(self::$nameSpaceCache[$appId])) { + return $topNamespace . self::$nameSpaceCache[$appId]; + } + // first try to parse the app's appinfo/info.xml <namespace> tag $appPath = OC_App::getAppPath($appId); if ($appPath !== false) { @@ -62,14 +70,16 @@ class App { if ($xml) { $result = $xml->xpath('/info/namespace'); if ($result && count($result) > 0) { + self::$nameSpaceCache[$appId] = trim((string) $result[0]); // take first namespace result - return $topNamespace . trim((string) $result[0]); + return $topNamespace . self::$nameSpaceCache[$appId]; } } } } // if the tag is not found, fall back to uppercasing the first letter - return $topNamespace . ucfirst($appId); + self::$nameSpaceCache[$appId] = ucfirst($appId); + return $topNamespace . self::$nameSpaceCache[$appId]; } @@ -142,11 +152,19 @@ class App { ); } - if ($response instanceof ICallbackResponse) { - $response->callback($io); - } else if(!is_null($output)) { - $io->setHeader('Content-Length: ' . strlen($output)); - $io->setOutput($output); + /* + * Status 204 does not have a body and no Content Length + * Status 304 does not have a body and does not need a Content Length + * https://tools.ietf.org/html/rfc7230#section-3.3 + * https://tools.ietf.org/html/rfc7230#section-3.3.2 + */ + if ($httpHeaders !== Http::STATUS_NO_CONTENT && $httpHeaders !== Http::STATUS_NOT_MODIFIED) { + if ($response instanceof ICallbackResponse) { + $response->callback($io); + } else if (!is_null($output)) { + $io->setHeader('Content-Length: ' . strlen($output)); + $io->setOutput($output); + } } } diff --git a/lib/private/LargeFileHelper.php b/lib/private/LargeFileHelper.php index f89d3216a39..9d0fe864033 100644 --- a/lib/private/LargeFileHelper.php +++ b/lib/private/LargeFileHelper.php @@ -138,23 +138,6 @@ class LargeFileHelper { } /** - * @brief Tries to get the size of a file via the Windows DOM extension. - * - * @param string $filename Path to the file. - * - * @return null|int|float Number of bytes as number (float or int) or - * null on failure. - */ - public function getFileSizeViaCOM($filename) { - if (class_exists('COM')) { - $fsObj = new \COM("Scripting.FileSystemObject"); - $file = $fsObj->GetFile($filename); - return 0 + $file->Size; - } - return null; - } - - /** * @brief Tries to get the size of a file via an exec() call. * * @param string $filename Path to the file. diff --git a/lib/private/Memcache/APCu.php b/lib/private/Memcache/APCu.php index 713ed152648..70f0d73d2d4 100644 --- a/lib/private/Memcache/APCu.php +++ b/lib/private/Memcache/APCu.php @@ -88,7 +88,21 @@ class APCu extends Cache implements IMemcache { */ public function inc($key, $step = 1) { $this->add($key, 0); - return apcu_inc($this->getPrefix() . $key, $step); + /** + * TODO - hack around a PHP 7 specific issue in APCu + * + * on PHP 7 the apcu_inc method on a non-existing object will increment + * "0" and result in "1" as value - therefore we check for existence + * first + * + * on PHP 5.6 this is not the case + * + * see https://github.com/krakjoe/apcu/issues/183#issuecomment-244038221 + * for details + */ + return apcu_exists($this->getPrefix() . $key) + ? apcu_inc($this->getPrefix() . $key, $step) + : false; } /** @@ -99,7 +113,21 @@ class APCu extends Cache implements IMemcache { * @return int | bool */ public function dec($key, $step = 1) { - return apcu_dec($this->getPrefix() . $key, $step); + /** + * TODO - hack around a PHP 7 specific issue in APCu + * + * on PHP 7 the apcu_dec method on a non-existing object will decrement + * "0" and result in "-1" as value - therefore we check for existence + * first + * + * on PHP 5.6 this is not the case + * + * see https://github.com/krakjoe/apcu/issues/183#issuecomment-244038221 + * for details + */ + return apcu_exists($this->getPrefix() . $key) + ? apcu_dec($this->getPrefix() . $key, $step) + : false; } /** diff --git a/settings/l10n/cs_CZ.js b/settings/l10n/cs_CZ.js index 80e6468403f..6d49f6cea8d 100644 --- a/settings/l10n/cs_CZ.js +++ b/settings/l10n/cs_CZ.js @@ -116,6 +116,7 @@ OC.L10N.register( "Invalid quota value \"{val}\"" : "Neplatná hodnota kvóty \"{val}\"", "no group" : "není ve skupině", "Changing the password will result in data loss, because data recovery is not available for this user" : "Změna hesla bude mít za následek ztrátu dat, protože jejich obnova není pro tohoto uživatele dostupná.", + "Password successfully changed" : "Heslo úspěšně změněno", "A valid username must be provided" : "Musíte zadat platné uživatelské jméno", "Error creating user: {message}" : "Chyba vytvoření uživatele: {message}", "A valid password must be provided" : "Musíte zadat platné heslo", @@ -189,6 +190,7 @@ OC.L10N.register( "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Velmi doporučujeme nainstalovat požadované balíčky do systému, pro podporu jednoho z následujících národních prostředí: %s.", "If your installation is not installed in the root of the domain and uses system cron, there can be issues with the URL generation. To avoid these problems, please set the \"overwrite.cli.url\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Instalace mimo kořenový adresář domény a používání systémového příkazu cron může způsobit problém s generováním správné URL. Pro zabránění těmto chybám nastavte prosím správnou cestu ve svém config.php souboru v hodnotě \"overwrite.cli.url\" (Je doporučena tato: \"%s\")", "It was not possible to execute the cronjob via CLI. The following technical errors have appeared:" : "Nebylo možné spustit službu cron v CLI. Došlo k následujícím technickým chybám:", + "Please double check the <a target=\"_blank\" rel=\"noreferrer\" href=\"%s\">installation guides ↗</a>, and check for any errors or warnings in the <a href=\"%s\">log</a>." : "Prosím překontrolujte <a target=\"_blank\" rel=\"noreferrer\" href=\"%s\">instalační pokyny ↗</a> a najděte jakékoliv chyby a varování v <a href=\"%s\">logu</a>.", "All checks passed." : "Všechny testy byly úspěšné.", "Cron" : "Cron", "Last cron job execution: %s." : "Poslední cron proběhl: %s.", @@ -284,6 +286,7 @@ OC.L10N.register( "Desktop client" : "Aplikace pro počítač", "Android app" : "Aplikace pro Android", "iOS app" : "iOS aplikace", + "If you want to support the project\n\t\t<a href=\"https://nextcloud.com/contribute\"\n\t\t\ttarget=\"_blank\" rel=\"noreferrer\">join development</a>\n\t\tor\n\t\t<a href=\"https://nextcloud.com/contribute\"\n\t\t\ttarget=\"_blank\" rel=\"noreferrer\">spread the word</a>!" : "Chcete-li projekt podpořit\n\t\t<a href=\"https://nextcloud.com/contribute\"\n\t\t\ttarget=\"_blank\" rel=\"noreferrer\">připojte se k vývoji</a>\n\t\tnebo\n\t\t<a href=\"https://nextcloud.com/contribute\"\n\t\t\ttarget=\"_blank\" rel=\"noreferrer\">šiřte informace dál</a>!", "Show First Run Wizard again" : "Znovu zobrazit průvodce prvním spuštěním", "Web, desktop and mobile clients currently logged in to your account." : "Weboví, desktopoví a mobilní klienti aktuálně přihlášeni k vašemu účtu.", "Device" : "Přístroj", diff --git a/settings/l10n/cs_CZ.json b/settings/l10n/cs_CZ.json index d9fe033b743..9f4cedb4731 100644 --- a/settings/l10n/cs_CZ.json +++ b/settings/l10n/cs_CZ.json @@ -114,6 +114,7 @@ "Invalid quota value \"{val}\"" : "Neplatná hodnota kvóty \"{val}\"", "no group" : "není ve skupině", "Changing the password will result in data loss, because data recovery is not available for this user" : "Změna hesla bude mít za následek ztrátu dat, protože jejich obnova není pro tohoto uživatele dostupná.", + "Password successfully changed" : "Heslo úspěšně změněno", "A valid username must be provided" : "Musíte zadat platné uživatelské jméno", "Error creating user: {message}" : "Chyba vytvoření uživatele: {message}", "A valid password must be provided" : "Musíte zadat platné heslo", @@ -187,6 +188,7 @@ "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Velmi doporučujeme nainstalovat požadované balíčky do systému, pro podporu jednoho z následujících národních prostředí: %s.", "If your installation is not installed in the root of the domain and uses system cron, there can be issues with the URL generation. To avoid these problems, please set the \"overwrite.cli.url\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Instalace mimo kořenový adresář domény a používání systémového příkazu cron může způsobit problém s generováním správné URL. Pro zabránění těmto chybám nastavte prosím správnou cestu ve svém config.php souboru v hodnotě \"overwrite.cli.url\" (Je doporučena tato: \"%s\")", "It was not possible to execute the cronjob via CLI. The following technical errors have appeared:" : "Nebylo možné spustit službu cron v CLI. Došlo k následujícím technickým chybám:", + "Please double check the <a target=\"_blank\" rel=\"noreferrer\" href=\"%s\">installation guides ↗</a>, and check for any errors or warnings in the <a href=\"%s\">log</a>." : "Prosím překontrolujte <a target=\"_blank\" rel=\"noreferrer\" href=\"%s\">instalační pokyny ↗</a> a najděte jakékoliv chyby a varování v <a href=\"%s\">logu</a>.", "All checks passed." : "Všechny testy byly úspěšné.", "Cron" : "Cron", "Last cron job execution: %s." : "Poslední cron proběhl: %s.", @@ -282,6 +284,7 @@ "Desktop client" : "Aplikace pro počítač", "Android app" : "Aplikace pro Android", "iOS app" : "iOS aplikace", + "If you want to support the project\n\t\t<a href=\"https://nextcloud.com/contribute\"\n\t\t\ttarget=\"_blank\" rel=\"noreferrer\">join development</a>\n\t\tor\n\t\t<a href=\"https://nextcloud.com/contribute\"\n\t\t\ttarget=\"_blank\" rel=\"noreferrer\">spread the word</a>!" : "Chcete-li projekt podpořit\n\t\t<a href=\"https://nextcloud.com/contribute\"\n\t\t\ttarget=\"_blank\" rel=\"noreferrer\">připojte se k vývoji</a>\n\t\tnebo\n\t\t<a href=\"https://nextcloud.com/contribute\"\n\t\t\ttarget=\"_blank\" rel=\"noreferrer\">šiřte informace dál</a>!", "Show First Run Wizard again" : "Znovu zobrazit průvodce prvním spuštěním", "Web, desktop and mobile clients currently logged in to your account." : "Weboví, desktopoví a mobilní klienti aktuálně přihlášeni k vašemu účtu.", "Device" : "Přístroj", diff --git a/settings/l10n/de.js b/settings/l10n/de.js index 2057b775039..c03862c0249 100644 --- a/settings/l10n/de.js +++ b/settings/l10n/de.js @@ -116,6 +116,7 @@ OC.L10N.register( "Invalid quota value \"{val}\"" : "Ungültiger Grenzwert \"{val}\"", "no group" : "Keine Gruppe", "Changing the password will result in data loss, because data recovery is not available for this user" : "Die Änderung des Passworts führt zu Datenverlust, weil die Datenwiederherstellung für diesen Benutzer nicht verfügbar ist", + "Password successfully changed" : "Das Passwort wurde erfolgreich geändert", "A valid username must be provided" : "Es muss ein gültiger Benutzername angegeben werden", "Error creating user: {message}" : "Fehler beim Anlegen des Benutzers: {message}", "A valid password must be provided" : "Es muss ein gültiges Passwort angegeben werden", @@ -189,6 +190,7 @@ OC.L10N.register( "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Wir empfehlen dringend, die erforderlichen Pakete auf Ihrem System zu installieren, damit eines der folgenden Gebietsschemata unterstützt wird: %s.", "If your installation is not installed in the root of the domain and uses system cron, there can be issues with the URL generation. To avoid these problems, please set the \"overwrite.cli.url\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Wenn sich Deine Installation nicht im Wurzelverzeichnis der Domain befindet und Cron aus dem System genutzt wird, kann es zu Fehlern bei der URL-Generierung kommen. Um dies zu verhindern, setze bitte die „overwrite.cli.url“-Option in Deiner config.php auf das Web-Wurzelverzeichnis Deiner Installation (Vorschlag: „%s“).", "It was not possible to execute the cronjob via CLI. The following technical errors have appeared:" : "Die Ausführung des Cron-Jobs über die Kommandozeile war nicht möglich. Die folgenden technischen Fehler sind dabei aufgetreten:", + "Please double check the <a target=\"_blank\" rel=\"noreferrer\" href=\"%s\">installation guides ↗</a>, and check for any errors or warnings in the <a href=\"%s\">log</a>." : "Bitte überprüfe noch einmal die <a target=\"_blank\" rel=\"noreferrer\" href=\"%s\">Installationsanleitungen ↗</a> und kontrolliere das <a href=\"%s\">Log</a> auf mögliche Fehler oder Warnungen.", "All checks passed." : "Alle Überprüfungen bestanden.", "Cron" : "Cron", "Last cron job execution: %s." : "Letzte Cron-Job-Ausführung: %s.", @@ -284,6 +286,7 @@ OC.L10N.register( "Desktop client" : "Desktop-Client", "Android app" : "Android-App", "iOS app" : "iOS-App", + "If you want to support the project\n\t\t<a href=\"https://nextcloud.com/contribute\"\n\t\t\ttarget=\"_blank\" rel=\"noreferrer\">join development</a>\n\t\tor\n\t\t<a href=\"https://nextcloud.com/contribute\"\n\t\t\ttarget=\"_blank\" rel=\"noreferrer\">spread the word</a>!" : "Wenn du das Projekt unterstützen möchtest\n⇥⇥<a href=\"https://nextcloud.com/contribute\"\n⇥⇥⇥target=\"_blank\" rel=\"noreferrer\">hilf uns bei der Weiterentwicklung</a>\n⇥⇥oder\n⇥⇥<a href=\"https://nextcloud.com/contribute\"\n⇥⇥⇥target=\"_blank\" rel=\"noreferrer\">empfehle es weiter</a>!", "Show First Run Wizard again" : "Den Einrichtungsassistenten erneut anzeigen", "Web, desktop and mobile clients currently logged in to your account." : "Aktuell in Deinem Konto eingeloggte Web-, Desktop- und Mobil-Clients.", "Device" : "Gerät", diff --git a/settings/l10n/de.json b/settings/l10n/de.json index 0b3d2e711af..e2d6cf70595 100644 --- a/settings/l10n/de.json +++ b/settings/l10n/de.json @@ -114,6 +114,7 @@ "Invalid quota value \"{val}\"" : "Ungültiger Grenzwert \"{val}\"", "no group" : "Keine Gruppe", "Changing the password will result in data loss, because data recovery is not available for this user" : "Die Änderung des Passworts führt zu Datenverlust, weil die Datenwiederherstellung für diesen Benutzer nicht verfügbar ist", + "Password successfully changed" : "Das Passwort wurde erfolgreich geändert", "A valid username must be provided" : "Es muss ein gültiger Benutzername angegeben werden", "Error creating user: {message}" : "Fehler beim Anlegen des Benutzers: {message}", "A valid password must be provided" : "Es muss ein gültiges Passwort angegeben werden", @@ -187,6 +188,7 @@ "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Wir empfehlen dringend, die erforderlichen Pakete auf Ihrem System zu installieren, damit eines der folgenden Gebietsschemata unterstützt wird: %s.", "If your installation is not installed in the root of the domain and uses system cron, there can be issues with the URL generation. To avoid these problems, please set the \"overwrite.cli.url\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Wenn sich Deine Installation nicht im Wurzelverzeichnis der Domain befindet und Cron aus dem System genutzt wird, kann es zu Fehlern bei der URL-Generierung kommen. Um dies zu verhindern, setze bitte die „overwrite.cli.url“-Option in Deiner config.php auf das Web-Wurzelverzeichnis Deiner Installation (Vorschlag: „%s“).", "It was not possible to execute the cronjob via CLI. The following technical errors have appeared:" : "Die Ausführung des Cron-Jobs über die Kommandozeile war nicht möglich. Die folgenden technischen Fehler sind dabei aufgetreten:", + "Please double check the <a target=\"_blank\" rel=\"noreferrer\" href=\"%s\">installation guides ↗</a>, and check for any errors or warnings in the <a href=\"%s\">log</a>." : "Bitte überprüfe noch einmal die <a target=\"_blank\" rel=\"noreferrer\" href=\"%s\">Installationsanleitungen ↗</a> und kontrolliere das <a href=\"%s\">Log</a> auf mögliche Fehler oder Warnungen.", "All checks passed." : "Alle Überprüfungen bestanden.", "Cron" : "Cron", "Last cron job execution: %s." : "Letzte Cron-Job-Ausführung: %s.", @@ -282,6 +284,7 @@ "Desktop client" : "Desktop-Client", "Android app" : "Android-App", "iOS app" : "iOS-App", + "If you want to support the project\n\t\t<a href=\"https://nextcloud.com/contribute\"\n\t\t\ttarget=\"_blank\" rel=\"noreferrer\">join development</a>\n\t\tor\n\t\t<a href=\"https://nextcloud.com/contribute\"\n\t\t\ttarget=\"_blank\" rel=\"noreferrer\">spread the word</a>!" : "Wenn du das Projekt unterstützen möchtest\n⇥⇥<a href=\"https://nextcloud.com/contribute\"\n⇥⇥⇥target=\"_blank\" rel=\"noreferrer\">hilf uns bei der Weiterentwicklung</a>\n⇥⇥oder\n⇥⇥<a href=\"https://nextcloud.com/contribute\"\n⇥⇥⇥target=\"_blank\" rel=\"noreferrer\">empfehle es weiter</a>!", "Show First Run Wizard again" : "Den Einrichtungsassistenten erneut anzeigen", "Web, desktop and mobile clients currently logged in to your account." : "Aktuell in Deinem Konto eingeloggte Web-, Desktop- und Mobil-Clients.", "Device" : "Gerät", diff --git a/settings/l10n/de_DE.js b/settings/l10n/de_DE.js index cd657313300..f2ee2209197 100644 --- a/settings/l10n/de_DE.js +++ b/settings/l10n/de_DE.js @@ -116,6 +116,7 @@ OC.L10N.register( "Invalid quota value \"{val}\"" : "Ungültiger Grenzwert \"{val}\"", "no group" : "Keine Gruppe", "Changing the password will result in data loss, because data recovery is not available for this user" : "Die Änderung des Passworts führt zu Datenverlust, weil die Datenwiederherstellung für diesen Benutzer nicht verfügbar ist", + "Password successfully changed" : "Das Passwort wurde erfolgreich geändert", "A valid username must be provided" : "Es muss ein gültiger Benutzername angegeben werden", "Error creating user: {message}" : "Fehler beim Erstellen eines Benutzers: {message}", "A valid password must be provided" : "Es muss ein gültiges Passwort angegeben werden", @@ -189,6 +190,7 @@ OC.L10N.register( "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Wir empfehlen dringend, die erforderlichen Pakete auf Ihrem System zu installieren, damit eines der folgenden Gebietsschemata unterstützt wird: %s.", "If your installation is not installed in the root of the domain and uses system cron, there can be issues with the URL generation. To avoid these problems, please set the \"overwrite.cli.url\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Wenn sich Ihre Installation nicht im Wurzelverzeichnis der Domain befindet und Cron aus dem System genutzt wird, kann es zu Fehlern bei der URL-Generierung kommen. Um dies zu verhindern, setzen Sie bitte die „overwrite.cli.url“-Option in Ihrer config.php auf das Web-Wurzelverzeichnis Ihrer Installation (Vorschlag: „%s“).", "It was not possible to execute the cronjob via CLI. The following technical errors have appeared:" : "Die Ausführung des Cron-Jobs über die Kommandozeile war nicht möglich. Die folgenden technischen Fehler sind dabei aufgetreten:", + "Please double check the <a target=\"_blank\" rel=\"noreferrer\" href=\"%s\">installation guides ↗</a>, and check for any errors or warnings in the <a href=\"%s\">log</a>." : "Bitte überprüfen Sie noch einmal die <a target=\"_blank\" rel=\"noreferrer\" href=\"%s\">Installationsanleitungen ↗</a> und kontrollieren Sie das <a href=\"%s\">Log</a> auf mögliche Fehler oder Warnungen.", "All checks passed." : "Alle Checks bestanden.", "Cron" : "Cron", "Last cron job execution: %s." : "Letzte Cron-Job-Ausführung: %s.", @@ -284,6 +286,7 @@ OC.L10N.register( "Desktop client" : "Desktop-Client", "Android app" : "Android-App", "iOS app" : "iOS-App", + "If you want to support the project\n\t\t<a href=\"https://nextcloud.com/contribute\"\n\t\t\ttarget=\"_blank\" rel=\"noreferrer\">join development</a>\n\t\tor\n\t\t<a href=\"https://nextcloud.com/contribute\"\n\t\t\ttarget=\"_blank\" rel=\"noreferrer\">spread the word</a>!" : "Wenn Sie das Projekt unterstützen möchten\n⇥⇥<a href=\"https://nextcloud.com/contribute\"\n⇥⇥⇥target=\"_blank\" rel=\"noreferrer\">helfen Sie bei der Weiterentwicklung</a>\n⇥⇥oder\n⇥⇥<a href=\"https://nextcloud.com/contribute\"\n⇥⇥⇥target=\"_blank\" rel=\"noreferrer\">empfehlen Sie es weiter</a>!", "Show First Run Wizard again" : "Den Einrichtungsassistenten erneut anzeigen", "Web, desktop and mobile clients currently logged in to your account." : "Aktuell in Ihrem Konto eingeloggte Web-, Desktop- und Mobil-Clients.", "Device" : "Gerät", diff --git a/settings/l10n/de_DE.json b/settings/l10n/de_DE.json index ba3e19d1296..8dd7c3dbc5e 100644 --- a/settings/l10n/de_DE.json +++ b/settings/l10n/de_DE.json @@ -114,6 +114,7 @@ "Invalid quota value \"{val}\"" : "Ungültiger Grenzwert \"{val}\"", "no group" : "Keine Gruppe", "Changing the password will result in data loss, because data recovery is not available for this user" : "Die Änderung des Passworts führt zu Datenverlust, weil die Datenwiederherstellung für diesen Benutzer nicht verfügbar ist", + "Password successfully changed" : "Das Passwort wurde erfolgreich geändert", "A valid username must be provided" : "Es muss ein gültiger Benutzername angegeben werden", "Error creating user: {message}" : "Fehler beim Erstellen eines Benutzers: {message}", "A valid password must be provided" : "Es muss ein gültiges Passwort angegeben werden", @@ -187,6 +188,7 @@ "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Wir empfehlen dringend, die erforderlichen Pakete auf Ihrem System zu installieren, damit eines der folgenden Gebietsschemata unterstützt wird: %s.", "If your installation is not installed in the root of the domain and uses system cron, there can be issues with the URL generation. To avoid these problems, please set the \"overwrite.cli.url\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Wenn sich Ihre Installation nicht im Wurzelverzeichnis der Domain befindet und Cron aus dem System genutzt wird, kann es zu Fehlern bei der URL-Generierung kommen. Um dies zu verhindern, setzen Sie bitte die „overwrite.cli.url“-Option in Ihrer config.php auf das Web-Wurzelverzeichnis Ihrer Installation (Vorschlag: „%s“).", "It was not possible to execute the cronjob via CLI. The following technical errors have appeared:" : "Die Ausführung des Cron-Jobs über die Kommandozeile war nicht möglich. Die folgenden technischen Fehler sind dabei aufgetreten:", + "Please double check the <a target=\"_blank\" rel=\"noreferrer\" href=\"%s\">installation guides ↗</a>, and check for any errors or warnings in the <a href=\"%s\">log</a>." : "Bitte überprüfen Sie noch einmal die <a target=\"_blank\" rel=\"noreferrer\" href=\"%s\">Installationsanleitungen ↗</a> und kontrollieren Sie das <a href=\"%s\">Log</a> auf mögliche Fehler oder Warnungen.", "All checks passed." : "Alle Checks bestanden.", "Cron" : "Cron", "Last cron job execution: %s." : "Letzte Cron-Job-Ausführung: %s.", @@ -282,6 +284,7 @@ "Desktop client" : "Desktop-Client", "Android app" : "Android-App", "iOS app" : "iOS-App", + "If you want to support the project\n\t\t<a href=\"https://nextcloud.com/contribute\"\n\t\t\ttarget=\"_blank\" rel=\"noreferrer\">join development</a>\n\t\tor\n\t\t<a href=\"https://nextcloud.com/contribute\"\n\t\t\ttarget=\"_blank\" rel=\"noreferrer\">spread the word</a>!" : "Wenn Sie das Projekt unterstützen möchten\n⇥⇥<a href=\"https://nextcloud.com/contribute\"\n⇥⇥⇥target=\"_blank\" rel=\"noreferrer\">helfen Sie bei der Weiterentwicklung</a>\n⇥⇥oder\n⇥⇥<a href=\"https://nextcloud.com/contribute\"\n⇥⇥⇥target=\"_blank\" rel=\"noreferrer\">empfehlen Sie es weiter</a>!", "Show First Run Wizard again" : "Den Einrichtungsassistenten erneut anzeigen", "Web, desktop and mobile clients currently logged in to your account." : "Aktuell in Ihrem Konto eingeloggte Web-, Desktop- und Mobil-Clients.", "Device" : "Gerät", diff --git a/settings/l10n/fr.js b/settings/l10n/fr.js index 8a3ecd8caf1..4d1cc1892c8 100644 --- a/settings/l10n/fr.js +++ b/settings/l10n/fr.js @@ -116,6 +116,7 @@ OC.L10N.register( "Invalid quota value \"{val}\"" : "Valeur de quota invalide \"{val}\"", "no group" : "aucun groupe", "Changing the password will result in data loss, because data recovery is not available for this user" : "La modification du mot de passe entrainera la perte des données car la restauration de données n'est pas disponible pour cet utilisateur", + "Password successfully changed" : "Mot de passe changé avec succès", "A valid username must be provided" : "Un nom d'utilisateur valide doit être saisi", "Error creating user: {message}" : "Erreur a la création d'un utilisateur : {message}", "A valid password must be provided" : "Un mot de passe valide doit être saisi", @@ -189,6 +190,7 @@ OC.L10N.register( "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Nous vous recommandons d'installer sur votre système les paquets nécessaires à la prise en charge de l'un des paramètres régionaux suivants : %s", "If your installation is not installed in the root of the domain and uses system cron, there can be issues with the URL generation. To avoid these problems, please set the \"overwrite.cli.url\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Si votre installation n'a pas été effectuée à la racine du domaine et qu'elle utilise le cron du système, il peut y avoir des problèmes avec la génération d'URL. Pour les éviter, veuillez configurer l'option \"overwrite.cli.url\" de votre fichier config.php avec le chemin de la racine de votre installation (suggéré : \"%s\")", "It was not possible to execute the cronjob via CLI. The following technical errors have appeared:" : "La tâche cron n'a pu s'exécuter via CLI. Ces erreurs techniques sont apparues :", + "Please double check the <a target=\"_blank\" rel=\"noreferrer\" href=\"%s\">installation guides ↗</a>, and check for any errors or warnings in the <a href=\"%s\">log</a>." : "Merci de consulter les <a target=\"_blank\" rel=\"noreferrer\" href=\"%s\">guides d'installation ↗</a>, et vérifier les erreurs ou avertissements dans les <a href=\"%s\">logs</a>.", "All checks passed." : "Tous les tests ont réussi.", "Cron" : "Cron", "Last cron job execution: %s." : "Dernière tâche cron exécutée : %s.", @@ -284,6 +286,7 @@ OC.L10N.register( "Desktop client" : "Client de bureau", "Android app" : "Application Android", "iOS app" : "Application iOS", + "If you want to support the project\n\t\t<a href=\"https://nextcloud.com/contribute\"\n\t\t\ttarget=\"_blank\" rel=\"noreferrer\">join development</a>\n\t\tor\n\t\t<a href=\"https://nextcloud.com/contribute\"\n\t\t\ttarget=\"_blank\" rel=\"noreferrer\">spread the word</a>!" : "Si vous voulez supporter le projet\n⇥⇥<a href=\"https://nextcloud.com/contribute\"\n⇥⇥⇥target=\"_blank\" rel=\"noreferrer\">rejoindre le développement</a>\n⇥⇥ou\n⇥⇥<a href=\"https://nextcloud.com/contribute\"\n⇥⇥⇥target=\"_blank\" rel=\"noreferrer\">promouvoir</a> !", "Show First Run Wizard again" : "Revoir la fenêtre d'accueil affichée lors de votre première connexion", "Web, desktop and mobile clients currently logged in to your account." : "Clients web, desktop et mobiles actuellement connectés sur votre compte.", "Device" : "Périphérique", @@ -338,6 +341,7 @@ OC.L10N.register( "Redis" : "Redis", "External Storage" : "Stockage externe", "Updates" : "Mises à jour", + "Official apps are developed by and within the Nextcloud community. They offer functionality central to Nextcloud and are ready for production use." : "Les applications officielles sont développées par et pour al communauté Nextcloud. Elles offrent les fonctionnalités indispensables et sont prêtes pour être utilisées en production.", "No apps found for \"{query}\"" : "Aucune application trouvée pour \"{query}\"", "Please check the <a target=\"_blank\" href=\"%s\">installation documentation ↗</a> for php configuration notes and the php configuration of your server, especially when using php-fpm." : "Veuillez consulter <a target=\"_blank\" rel=\"noreferrer\" href=\"%s\">la documentation d'installation ↗</a> pour savoir comment configurer php sur votre serveur, en particulier en cas d'utilisation de php-fpm.", "Your database does not run with \"READ COMMITED\" transaction isolation level. This can cause problems when multiple actions are executed in parallel." : "Votre base de données ne fonctionne pas avec le niveau d'isolation de transaction \"READ COMMITED\". Ceci peut causer des problèmes quand plusieurs actions sont exécutées en parallèle.", diff --git a/settings/l10n/fr.json b/settings/l10n/fr.json index 1218f44fc22..d25cfb591ef 100644 --- a/settings/l10n/fr.json +++ b/settings/l10n/fr.json @@ -114,6 +114,7 @@ "Invalid quota value \"{val}\"" : "Valeur de quota invalide \"{val}\"", "no group" : "aucun groupe", "Changing the password will result in data loss, because data recovery is not available for this user" : "La modification du mot de passe entrainera la perte des données car la restauration de données n'est pas disponible pour cet utilisateur", + "Password successfully changed" : "Mot de passe changé avec succès", "A valid username must be provided" : "Un nom d'utilisateur valide doit être saisi", "Error creating user: {message}" : "Erreur a la création d'un utilisateur : {message}", "A valid password must be provided" : "Un mot de passe valide doit être saisi", @@ -187,6 +188,7 @@ "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Nous vous recommandons d'installer sur votre système les paquets nécessaires à la prise en charge de l'un des paramètres régionaux suivants : %s", "If your installation is not installed in the root of the domain and uses system cron, there can be issues with the URL generation. To avoid these problems, please set the \"overwrite.cli.url\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Si votre installation n'a pas été effectuée à la racine du domaine et qu'elle utilise le cron du système, il peut y avoir des problèmes avec la génération d'URL. Pour les éviter, veuillez configurer l'option \"overwrite.cli.url\" de votre fichier config.php avec le chemin de la racine de votre installation (suggéré : \"%s\")", "It was not possible to execute the cronjob via CLI. The following technical errors have appeared:" : "La tâche cron n'a pu s'exécuter via CLI. Ces erreurs techniques sont apparues :", + "Please double check the <a target=\"_blank\" rel=\"noreferrer\" href=\"%s\">installation guides ↗</a>, and check for any errors or warnings in the <a href=\"%s\">log</a>." : "Merci de consulter les <a target=\"_blank\" rel=\"noreferrer\" href=\"%s\">guides d'installation ↗</a>, et vérifier les erreurs ou avertissements dans les <a href=\"%s\">logs</a>.", "All checks passed." : "Tous les tests ont réussi.", "Cron" : "Cron", "Last cron job execution: %s." : "Dernière tâche cron exécutée : %s.", @@ -282,6 +284,7 @@ "Desktop client" : "Client de bureau", "Android app" : "Application Android", "iOS app" : "Application iOS", + "If you want to support the project\n\t\t<a href=\"https://nextcloud.com/contribute\"\n\t\t\ttarget=\"_blank\" rel=\"noreferrer\">join development</a>\n\t\tor\n\t\t<a href=\"https://nextcloud.com/contribute\"\n\t\t\ttarget=\"_blank\" rel=\"noreferrer\">spread the word</a>!" : "Si vous voulez supporter le projet\n⇥⇥<a href=\"https://nextcloud.com/contribute\"\n⇥⇥⇥target=\"_blank\" rel=\"noreferrer\">rejoindre le développement</a>\n⇥⇥ou\n⇥⇥<a href=\"https://nextcloud.com/contribute\"\n⇥⇥⇥target=\"_blank\" rel=\"noreferrer\">promouvoir</a> !", "Show First Run Wizard again" : "Revoir la fenêtre d'accueil affichée lors de votre première connexion", "Web, desktop and mobile clients currently logged in to your account." : "Clients web, desktop et mobiles actuellement connectés sur votre compte.", "Device" : "Périphérique", @@ -336,6 +339,7 @@ "Redis" : "Redis", "External Storage" : "Stockage externe", "Updates" : "Mises à jour", + "Official apps are developed by and within the Nextcloud community. They offer functionality central to Nextcloud and are ready for production use." : "Les applications officielles sont développées par et pour al communauté Nextcloud. Elles offrent les fonctionnalités indispensables et sont prêtes pour être utilisées en production.", "No apps found for \"{query}\"" : "Aucune application trouvée pour \"{query}\"", "Please check the <a target=\"_blank\" href=\"%s\">installation documentation ↗</a> for php configuration notes and the php configuration of your server, especially when using php-fpm." : "Veuillez consulter <a target=\"_blank\" rel=\"noreferrer\" href=\"%s\">la documentation d'installation ↗</a> pour savoir comment configurer php sur votre serveur, en particulier en cas d'utilisation de php-fpm.", "Your database does not run with \"READ COMMITED\" transaction isolation level. This can cause problems when multiple actions are executed in parallel." : "Votre base de données ne fonctionne pas avec le niveau d'isolation de transaction \"READ COMMITED\". Ceci peut causer des problèmes quand plusieurs actions sont exécutées en parallèle.", diff --git a/tests/Core/Command/Config/App/DeleteConfigTest.php b/tests/Core/Command/Config/App/DeleteConfigTest.php index 7056e1b1ff9..f74fd73d697 100644 --- a/tests/Core/Command/Config/App/DeleteConfigTest.php +++ b/tests/Core/Command/Config/App/DeleteConfigTest.php @@ -23,10 +23,13 @@ namespace Tests\Core\Command\Config\App; use OC\Core\Command\Config\App\DeleteConfig; +use OCP\IConfig; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class DeleteConfigTest extends TestCase { - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ protected $config; /** @var \PHPUnit_Framework_MockObject_MockObject */ @@ -40,14 +43,13 @@ class DeleteConfigTest extends TestCase { protected function setUp() { parent::setUp(); - $config = $this->config = $this->getMockBuilder('OCP\IConfig') + $this->config = $this->getMockBuilder(IConfig::class) ->disableOriginalConstructor() ->getMock(); - $this->consoleInput = $this->getMock('Symfony\Component\Console\Input\InputInterface'); - $this->consoleOutput = $this->getMock('Symfony\Component\Console\Output\OutputInterface'); + $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock(); + $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock(); - /** @var \OCP\IConfig $config */ - $this->command = new DeleteConfig($config); + $this->command = new DeleteConfig($this->config); } diff --git a/tests/Core/Command/Config/App/GetConfigTest.php b/tests/Core/Command/Config/App/GetConfigTest.php index 1ceeb16ccf4..2fac1572e37 100644 --- a/tests/Core/Command/Config/App/GetConfigTest.php +++ b/tests/Core/Command/Config/App/GetConfigTest.php @@ -23,6 +23,9 @@ namespace Tests\Core\Command\Config\App; use OC\Core\Command\Config\App\GetConfig; +use OCP\IConfig; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class GetConfigTest extends TestCase { @@ -40,11 +43,11 @@ class GetConfigTest extends TestCase { protected function setUp() { parent::setUp(); - $config = $this->config = $this->getMockBuilder('OCP\IConfig') + $config = $this->config = $this->getMockBuilder(IConfig::class) ->disableOriginalConstructor() ->getMock(); - $this->consoleInput = $this->getMock('Symfony\Component\Console\Input\InputInterface'); - $this->consoleOutput = $this->getMock('Symfony\Component\Console\Output\OutputInterface'); + $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock(); + $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock(); /** @var \OCP\IConfig $config */ $this->command = new GetConfig($config); diff --git a/tests/Core/Command/Config/App/SetConfigTest.php b/tests/Core/Command/Config/App/SetConfigTest.php index 14d7b0cb7b5..f66390871de 100644 --- a/tests/Core/Command/Config/App/SetConfigTest.php +++ b/tests/Core/Command/Config/App/SetConfigTest.php @@ -23,6 +23,9 @@ namespace Tests\Core\Command\Config\App; use OC\Core\Command\Config\App\SetConfig; +use OCP\IConfig; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class SetConfigTest extends TestCase { @@ -40,11 +43,11 @@ class SetConfigTest extends TestCase { protected function setUp() { parent::setUp(); - $config = $this->config = $this->getMockBuilder('OCP\IConfig') + $config = $this->config = $this->getMockBuilder(IConfig::class) ->disableOriginalConstructor() ->getMock(); - $this->consoleInput = $this->getMock('Symfony\Component\Console\Input\InputInterface'); - $this->consoleOutput = $this->getMock('Symfony\Component\Console\Output\OutputInterface'); + $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock(); + $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock(); /** @var \OCP\IConfig $config */ $this->command = new SetConfig($config); diff --git a/tests/Core/Command/Config/ImportTest.php b/tests/Core/Command/Config/ImportTest.php index f14880f8bf4..7afa47d3536 100644 --- a/tests/Core/Command/Config/ImportTest.php +++ b/tests/Core/Command/Config/ImportTest.php @@ -23,6 +23,9 @@ namespace Tests\Core\Command\Config; use OC\Core\Command\Config\Import; +use OCP\IConfig; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class ImportTest extends TestCase { @@ -40,11 +43,11 @@ class ImportTest extends TestCase { protected function setUp() { parent::setUp(); - $config = $this->config = $this->getMockBuilder('OCP\IConfig') + $config = $this->config = $this->getMockBuilder(IConfig::class) ->disableOriginalConstructor() ->getMock(); - $this->consoleInput = $this->getMock('Symfony\Component\Console\Input\InputInterface'); - $this->consoleOutput = $this->getMock('Symfony\Component\Console\Output\OutputInterface'); + $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock(); + $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock(); /** @var \OCP\IConfig $config */ $this->command = new Import($config); diff --git a/tests/Core/Command/Config/ListConfigsTest.php b/tests/Core/Command/Config/ListConfigsTest.php index bde6a1b0db3..0f170cee840 100644 --- a/tests/Core/Command/Config/ListConfigsTest.php +++ b/tests/Core/Command/Config/ListConfigsTest.php @@ -23,7 +23,11 @@ namespace Tests\Core\Command\Config; use OC\Core\Command\Config\ListConfigs; +use OC\SystemConfig; +use OCP\IAppConfig; use OCP\IConfig; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class ListConfigsTest extends TestCase { @@ -43,14 +47,14 @@ class ListConfigsTest extends TestCase { protected function setUp() { parent::setUp(); - $systemConfig = $this->systemConfig = $this->getMockBuilder('OC\SystemConfig') + $systemConfig = $this->systemConfig = $this->getMockBuilder(SystemConfig::class) ->disableOriginalConstructor() ->getMock(); - $appConfig = $this->appConfig = $this->getMockBuilder('OCP\IAppConfig') + $appConfig = $this->appConfig = $this->getMockBuilder(IAppConfig::class) ->disableOriginalConstructor() ->getMock(); - $this->consoleInput = $this->getMock('Symfony\Component\Console\Input\InputInterface'); - $this->consoleOutput = $this->getMock('Symfony\Component\Console\Output\OutputInterface'); + $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock(); + $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock(); /** @var \OC\SystemConfig $systemConfig */ /** @var \OCP\IAppConfig $appConfig */ diff --git a/tests/Core/Command/Config/System/DeleteConfigTest.php b/tests/Core/Command/Config/System/DeleteConfigTest.php index 11bfb6ae7ad..5ac4c853df3 100644 --- a/tests/Core/Command/Config/System/DeleteConfigTest.php +++ b/tests/Core/Command/Config/System/DeleteConfigTest.php @@ -23,6 +23,9 @@ namespace Tests\Core\Command\Config\System; use OC\Core\Command\Config\System\DeleteConfig; +use OC\SystemConfig; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class DeleteConfigTest extends TestCase { @@ -40,11 +43,11 @@ class DeleteConfigTest extends TestCase { protected function setUp() { parent::setUp(); - $systemConfig = $this->systemConfig = $this->getMockBuilder('OC\SystemConfig') + $systemConfig = $this->systemConfig = $this->getMockBuilder(SystemConfig::class) ->disableOriginalConstructor() ->getMock(); - $this->consoleInput = $this->getMock('Symfony\Component\Console\Input\InputInterface'); - $this->consoleOutput = $this->getMock('Symfony\Component\Console\Output\OutputInterface'); + $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock(); + $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock(); /** @var \OC\SystemConfig $systemConfig */ $this->command = new DeleteConfig($systemConfig); diff --git a/tests/Core/Command/Config/System/GetConfigTest.php b/tests/Core/Command/Config/System/GetConfigTest.php index ebbea634cde..943cc4cfa40 100644 --- a/tests/Core/Command/Config/System/GetConfigTest.php +++ b/tests/Core/Command/Config/System/GetConfigTest.php @@ -23,6 +23,9 @@ namespace Tests\Core\Command\Config\System; use OC\Core\Command\Config\System\GetConfig; +use OC\SystemConfig; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class GetConfigTest extends TestCase { @@ -40,11 +43,11 @@ class GetConfigTest extends TestCase { protected function setUp() { parent::setUp(); - $systemConfig = $this->systemConfig = $this->getMockBuilder('OC\SystemConfig') + $systemConfig = $this->systemConfig = $this->getMockBuilder(SystemConfig::class) ->disableOriginalConstructor() ->getMock(); - $this->consoleInput = $this->getMock('Symfony\Component\Console\Input\InputInterface'); - $this->consoleOutput = $this->getMock('Symfony\Component\Console\Output\OutputInterface'); + $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock(); + $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock(); /** @var \OC\SystemConfig $systemConfig */ $this->command = new GetConfig($systemConfig); diff --git a/tests/Core/Command/Config/System/SetConfigTest.php b/tests/Core/Command/Config/System/SetConfigTest.php index c0b664d7522..bb8d2c4b962 100644 --- a/tests/Core/Command/Config/System/SetConfigTest.php +++ b/tests/Core/Command/Config/System/SetConfigTest.php @@ -23,6 +23,9 @@ namespace Tests\Core\Command\Config\System; use OC\Core\Command\Config\System\SetConfig; +use OC\SystemConfig; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class SetConfigTest extends TestCase { @@ -40,11 +43,11 @@ class SetConfigTest extends TestCase { protected function setUp() { parent::setUp(); - $systemConfig = $this->systemConfig = $this->getMockBuilder('OC\SystemConfig') + $systemConfig = $this->systemConfig = $this->getMockBuilder(SystemConfig::class) ->disableOriginalConstructor() ->getMock(); - $this->consoleInput = $this->getMock('Symfony\Component\Console\Input\InputInterface'); - $this->consoleOutput = $this->getMock('Symfony\Component\Console\Output\OutputInterface'); + $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock(); + $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock(); /** @var \OC\SystemConfig $systemConfig */ $this->command = new SetConfig($systemConfig); diff --git a/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php b/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php index 2a1f48983f1..57eb2137ac1 100644 --- a/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php +++ b/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php @@ -28,6 +28,8 @@ use OC\Encryption\Util; use OC\Files\View; use OCP\IConfig; use OCP\IUserManager; +use OCP\UserInterface; +use Symfony\Component\Console\Formatter\OutputFormatterInterface; use Symfony\Component\Console\Helper\QuestionHelper; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -65,16 +67,16 @@ class ChangeKeyStorageRootTest extends TestCase { public function setUp() { parent::setUp(); - $this->view = $this->getMock('\OC\Files\View'); - $this->userManager = $this->getMock('\OCP\IUserManager'); - $this->config = $this->getMock('\OCP\IConfig'); + $this->view = $this->getMockBuilder(View::class)->getMock(); + $this->userManager = $this->getMockBuilder(IUserManager::class)->getMock(); + $this->config = $this->getMockBuilder(IConfig::class)->getMock(); $this->util = $this->getMockBuilder('OC\Encryption\Util')->disableOriginalConstructor()->getMock(); - $this->questionHelper = $this->getMock('Symfony\Component\Console\Helper\QuestionHelper'); - $this->inputInterface = $this->getMock('Symfony\Component\Console\Input\InputInterface'); - $this->outputInterface = $this->getMock('Symfony\Component\Console\Output\OutputInterface'); - $this->userInterface = $this->getMock('\OCP\UserInterface'); + $this->questionHelper = $this->getMockBuilder(QuestionHelper::class)->getMock(); + $this->inputInterface = $this->getMockBuilder(InputInterface::class)->getMock(); + $this->outputInterface = $this->getMockBuilder(OutputInterface::class)->getMock(); + $this->userInterface = $this->getMockBuilder(UserInterface::class)->getMock(); - $outputFormatterInterface = $this->getMock('Symfony\Component\Console\Formatter\OutputFormatterInterface'); + $outputFormatterInterface = $this->getMockBuilder(OutputFormatterInterface::class)->getMock(); $this->outputInterface->expects($this->any())->method('getFormatter') ->willReturn($outputFormatterInterface); diff --git a/tests/Core/Command/Encryption/DecryptAllTest.php b/tests/Core/Command/Encryption/DecryptAllTest.php index 972ea03150c..8f674aa5b44 100644 --- a/tests/Core/Command/Encryption/DecryptAllTest.php +++ b/tests/Core/Command/Encryption/DecryptAllTest.php @@ -24,6 +24,12 @@ namespace Tests\Core\Command\Encryption; use OC\Core\Command\Encryption\DecryptAll; +use OCP\App\IAppManager; +use OCP\Encryption\IManager; +use OCP\IConfig; +use Symfony\Component\Console\Helper\QuestionHelper; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class DecryptAllTest extends TestCase { @@ -52,22 +58,22 @@ class DecryptAllTest extends TestCase { public function setUp() { parent::setUp(); - $this->config = $this->getMockBuilder('OCP\IConfig') + $this->config = $this->getMockBuilder(IConfig::class) ->disableOriginalConstructor() ->getMock(); - $this->encryptionManager = $this->getMockBuilder('OCP\Encryption\IManager') + $this->encryptionManager = $this->getMockBuilder(IManager::class) ->disableOriginalConstructor() ->getMock(); - $this->appManager = $this->getMockBuilder('OCP\App\IAppManager') + $this->appManager = $this->getMockBuilder(IAppManager::class) ->disableOriginalConstructor() ->getMock(); - $this->questionHelper = $this->getMockBuilder('Symfony\Component\Console\Helper\QuestionHelper') + $this->questionHelper = $this->getMockBuilder(QuestionHelper::class) ->disableOriginalConstructor() ->getMock(); - $this->decryptAll = $this->getMockBuilder('OC\Encryption\DecryptAll') + $this->decryptAll = $this->getMockBuilder(\OC\Encryption\DecryptAll::class) ->disableOriginalConstructor()->getMock(); - $this->consoleInput = $this->getMock('Symfony\Component\Console\Input\InputInterface'); - $this->consoleOutput = $this->getMock('Symfony\Component\Console\Output\OutputInterface'); + $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock(); + $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock(); $this->config->expects($this->any()) ->method('getSystemValue') diff --git a/tests/Core/Command/Encryption/DisableTest.php b/tests/Core/Command/Encryption/DisableTest.php index dfd06e2e26e..77a690fe264 100644 --- a/tests/Core/Command/Encryption/DisableTest.php +++ b/tests/Core/Command/Encryption/DisableTest.php @@ -23,6 +23,9 @@ namespace Tests\Core\Command\Encryption; use OC\Core\Command\Encryption\Disable; +use OCP\IConfig; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class DisableTest extends TestCase { @@ -39,11 +42,11 @@ class DisableTest extends TestCase { protected function setUp() { parent::setUp(); - $config = $this->config = $this->getMockBuilder('OCP\IConfig') + $config = $this->config = $this->getMockBuilder(IConfig::class) ->disableOriginalConstructor() ->getMock(); - $this->consoleInput = $this->getMock('Symfony\Component\Console\Input\InputInterface'); - $this->consoleOutput = $this->getMock('Symfony\Component\Console\Output\OutputInterface'); + $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock(); + $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock(); /** @var \OCP\IConfig $config */ $this->command = new Disable($config); diff --git a/tests/Core/Command/Encryption/EnableTest.php b/tests/Core/Command/Encryption/EnableTest.php index e2357464aa1..eb1b7842385 100644 --- a/tests/Core/Command/Encryption/EnableTest.php +++ b/tests/Core/Command/Encryption/EnableTest.php @@ -23,6 +23,10 @@ namespace Tests\Core\Command\Encryption; use OC\Core\Command\Encryption\Enable; +use OCP\Encryption\IManager; +use OCP\IConfig; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class EnableTest extends TestCase { @@ -41,14 +45,14 @@ class EnableTest extends TestCase { protected function setUp() { parent::setUp(); - $config = $this->config = $this->getMockBuilder('OCP\IConfig') + $config = $this->config = $this->getMockBuilder(IConfig::class) ->disableOriginalConstructor() ->getMock(); - $manager = $this->manager = $this->getMockBuilder('OCP\Encryption\IManager') + $manager = $this->manager = $this->getMockBuilder(IManager::class) ->disableOriginalConstructor() ->getMock(); - $this->consoleInput = $this->getMock('Symfony\Component\Console\Input\InputInterface'); - $this->consoleOutput = $this->getMock('Symfony\Component\Console\Output\OutputInterface'); + $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock(); + $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock(); /** @var \OCP\IConfig $config */ /** @var \OCP\Encryption\IManager $manager */ diff --git a/tests/Core/Command/Encryption/EncryptAllTest.php b/tests/Core/Command/Encryption/EncryptAllTest.php index 128b4caa148..00895541782 100644 --- a/tests/Core/Command/Encryption/EncryptAllTest.php +++ b/tests/Core/Command/Encryption/EncryptAllTest.php @@ -24,6 +24,13 @@ namespace Tests\Core\Command\Encryption; use OC\Core\Command\Encryption\EncryptAll; +use OCP\App\IAppManager; +use OCP\Encryption\IEncryptionModule; +use OCP\Encryption\IManager; +use OCP\IConfig; +use Symfony\Component\Console\Helper\QuestionHelper; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class EncryptAllTest extends TestCase { @@ -55,23 +62,23 @@ class EncryptAllTest extends TestCase { protected function setUp() { parent::setUp(); - $this->config = $this->getMockBuilder('OCP\IConfig') + $this->config = $this->getMockBuilder(IConfig::class) ->disableOriginalConstructor() ->getMock(); - $this->encryptionManager = $this->getMockBuilder('OCP\Encryption\IManager') + $this->encryptionManager = $this->getMockBuilder(IManager::class) ->disableOriginalConstructor() ->getMock(); - $this->appManager = $this->getMockBuilder('OCP\App\IAppManager') + $this->appManager = $this->getMockBuilder(IAppManager::class) ->disableOriginalConstructor() ->getMock(); - $this->encryptionModule = $this->getMockBuilder('\OCP\Encryption\IEncryptionModule') + $this->encryptionModule = $this->getMockBuilder(IEncryptionModule::class) ->disableOriginalConstructor() ->getMock(); - $this->questionHelper = $this->getMockBuilder('Symfony\Component\Console\Helper\QuestionHelper') + $this->questionHelper = $this->getMockBuilder(QuestionHelper::class) ->disableOriginalConstructor() ->getMock(); - $this->consoleInput = $this->getMock('Symfony\Component\Console\Input\InputInterface'); - $this->consoleOutput = $this->getMock('Symfony\Component\Console\Output\OutputInterface'); + $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock(); + $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock(); } diff --git a/tests/Core/Command/Encryption/SetDefaultModuleTest.php b/tests/Core/Command/Encryption/SetDefaultModuleTest.php index 3230a57db07..3f04ba7e79d 100644 --- a/tests/Core/Command/Encryption/SetDefaultModuleTest.php +++ b/tests/Core/Command/Encryption/SetDefaultModuleTest.php @@ -23,6 +23,9 @@ namespace Tests\Core\Command\Encryption; use OC\Core\Command\Encryption\SetDefaultModule; +use OCP\Encryption\IManager; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class SetDefaultModuleTest extends TestCase { @@ -39,11 +42,11 @@ class SetDefaultModuleTest extends TestCase { protected function setUp() { parent::setUp(); - $manager = $this->manager = $this->getMockBuilder('OCP\Encryption\IManager') + $manager = $this->manager = $this->getMockBuilder(IManager::class) ->disableOriginalConstructor() ->getMock(); - $this->consoleInput = $this->getMock('Symfony\Component\Console\Input\InputInterface'); - $this->consoleOutput = $this->getMock('Symfony\Component\Console\Output\OutputInterface'); + $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock(); + $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock(); /** @var \OCP\Encryption\IManager $manager */ $this->command = new SetDefaultModule($manager); diff --git a/tests/Core/Command/Log/FileTest.php b/tests/Core/Command/Log/FileTest.php index f55f92901d6..4270684c9b6 100644 --- a/tests/Core/Command/Log/FileTest.php +++ b/tests/Core/Command/Log/FileTest.php @@ -23,6 +23,9 @@ namespace Tests\Core\Command\Log; use OC\Core\Command\Log\File; +use OCP\IConfig; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class FileTest extends TestCase { @@ -39,11 +42,11 @@ class FileTest extends TestCase { protected function setUp() { parent::setUp(); - $config = $this->config = $this->getMockBuilder('OCP\IConfig') + $config = $this->config = $this->getMockBuilder(IConfig::class) ->disableOriginalConstructor() ->getMock(); - $this->consoleInput = $this->getMock('Symfony\Component\Console\Input\InputInterface'); - $this->consoleOutput = $this->getMock('Symfony\Component\Console\Output\OutputInterface'); + $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock(); + $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock(); $this->command = new File($config); } diff --git a/tests/Core/Command/Log/ManageTest.php b/tests/Core/Command/Log/ManageTest.php index cf4506a64eb..4b026f14847 100644 --- a/tests/Core/Command/Log/ManageTest.php +++ b/tests/Core/Command/Log/ManageTest.php @@ -23,6 +23,9 @@ namespace Tests\Core\Command\Log; use OC\Core\Command\Log\Manage; +use OCP\IConfig; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class ManageTest extends TestCase { @@ -39,11 +42,11 @@ class ManageTest extends TestCase { protected function setUp() { parent::setUp(); - $config = $this->config = $this->getMockBuilder('OCP\IConfig') + $config = $this->config = $this->getMockBuilder(IConfig::class) ->disableOriginalConstructor() ->getMock(); - $this->consoleInput = $this->getMock('Symfony\Component\Console\Input\InputInterface'); - $this->consoleOutput = $this->getMock('Symfony\Component\Console\Output\OutputInterface'); + $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock(); + $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock(); $this->command = new Manage($config); } diff --git a/tests/Core/Command/Maintenance/DataFingerprintTest.php b/tests/Core/Command/Maintenance/DataFingerprintTest.php index 4d661b5c027..90ffa50c012 100644 --- a/tests/Core/Command/Maintenance/DataFingerprintTest.php +++ b/tests/Core/Command/Maintenance/DataFingerprintTest.php @@ -24,6 +24,8 @@ namespace Tests\Core\Command\Maintenance; use OC\Core\Command\Maintenance\DataFingerprint; use OCP\AppFramework\Utility\ITimeFactory; use OCP\IConfig; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class DataFingerprintTest extends TestCase { @@ -42,10 +44,10 @@ class DataFingerprintTest extends TestCase { protected function setUp() { parent::setUp(); - $this->config = $this->getMock('OCP\IConfig'); - $this->timeFactory = $this->getMock('OCP\AppFramework\Utility\ITimeFactory'); - $this->consoleInput = $this->getMock('Symfony\Component\Console\Input\InputInterface'); - $this->consoleOutput = $this->getMock('Symfony\Component\Console\Output\OutputInterface'); + $this->config = $this->getMockBuilder(IConfig::class)->getMock(); + $this->timeFactory = $this->getMockBuilder(ITimeFactory::class)->getMock(); + $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock(); + $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock(); /** @var \OCP\IConfig $config */ $this->command = new DataFingerprint($this->config, $this->timeFactory); diff --git a/tests/Core/Command/Maintenance/Mimetype/UpdateDBTest.php b/tests/Core/Command/Maintenance/Mimetype/UpdateDBTest.php index 217301102c5..8c023274da5 100644 --- a/tests/Core/Command/Maintenance/Mimetype/UpdateDBTest.php +++ b/tests/Core/Command/Maintenance/Mimetype/UpdateDBTest.php @@ -22,6 +22,10 @@ namespace Tests\Core\Command\Maintenance\Mimetype; use OC\Core\Command\Maintenance\Mimetype\UpdateDB; +use OC\Files\Type\Detection; +use OC\Files\Type\Loader; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; use OCP\Files\IMimeTypeDetector; use OCP\Files\IMimeTypeLoader; @@ -43,15 +47,15 @@ class UpdateDBTest extends TestCase { protected function setUp() { parent::setUp(); - $this->detector = $this->getMockBuilder('OC\Files\Type\Detection') + $this->detector = $this->getMockBuilder(Detection::class) ->disableOriginalConstructor() ->getMock(); - $this->loader = $this->getMockBuilder('OC\Files\Type\Loader') + $this->loader = $this->getMockBuilder(Loader::class) ->disableOriginalConstructor() ->getMock(); - $this->consoleInput = $this->getMock('Symfony\Component\Console\Input\InputInterface'); - $this->consoleOutput = $this->getMock('Symfony\Component\Console\Output\OutputInterface'); + $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock(); + $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock(); $this->command = new UpdateDB($this->detector, $this->loader); } diff --git a/tests/Core/Command/Maintenance/SingleUserTest.php b/tests/Core/Command/Maintenance/SingleUserTest.php index 6629f39564f..13efebacb0a 100644 --- a/tests/Core/Command/Maintenance/SingleUserTest.php +++ b/tests/Core/Command/Maintenance/SingleUserTest.php @@ -23,6 +23,9 @@ namespace Tests\Core\Command\Maintenance; use OC\Core\Command\Maintenance\SingleUser; +use OCP\IConfig; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class SingleUserTest extends TestCase { @@ -39,11 +42,11 @@ class SingleUserTest extends TestCase { protected function setUp() { parent::setUp(); - $config = $this->config = $this->getMockBuilder('OCP\IConfig') + $config = $this->config = $this->getMockBuilder(IConfig::class) ->disableOriginalConstructor() ->getMock(); - $this->consoleInput = $this->getMock('Symfony\Component\Console\Input\InputInterface'); - $this->consoleOutput = $this->getMock('Symfony\Component\Console\Output\OutputInterface'); + $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock(); + $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock(); /** @var \OCP\IConfig $config */ $this->command = new SingleUser($config); diff --git a/tests/Core/Command/User/DeleteTest.php b/tests/Core/Command/User/DeleteTest.php index bb813626d7a..1b94d37cfc4 100644 --- a/tests/Core/Command/User/DeleteTest.php +++ b/tests/Core/Command/User/DeleteTest.php @@ -23,6 +23,10 @@ namespace Tests\Core\Command\User; use OC\Core\Command\User\Delete; +use OCP\IUser; +use OCP\IUserManager; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class DeleteTest extends TestCase { @@ -39,11 +43,11 @@ class DeleteTest extends TestCase { protected function setUp() { parent::setUp(); - $userManager = $this->userManager = $this->getMockBuilder('OCP\IUserManager') + $userManager = $this->userManager = $this->getMockBuilder(IUserManager::class) ->disableOriginalConstructor() ->getMock(); - $this->consoleInput = $this->getMock('Symfony\Component\Console\Input\InputInterface'); - $this->consoleOutput = $this->getMock('Symfony\Component\Console\Output\OutputInterface'); + $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock(); + $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock(); /** @var \OCP\IUserManager $userManager */ $this->command = new Delete($userManager); @@ -64,7 +68,7 @@ class DeleteTest extends TestCase { * @param string $expectedString */ public function testValidUser($deleteSuccess, $expectedString) { - $user = $this->getMock('OCP\IUser'); + $user = $this->getMockBuilder(IUser::class)->getMock(); $user->expects($this->once()) ->method('delete') ->willReturn($deleteSuccess); diff --git a/tests/Core/Command/User/LastSeenTest.php b/tests/Core/Command/User/LastSeenTest.php index 84805f5c072..cceefb98810 100644 --- a/tests/Core/Command/User/LastSeenTest.php +++ b/tests/Core/Command/User/LastSeenTest.php @@ -23,6 +23,10 @@ namespace Tests\Core\Command\User; use OC\Core\Command\User\LastSeen; +use OCP\IUser; +use OCP\IUserManager; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class LastSeenTest extends TestCase { @@ -39,11 +43,11 @@ class LastSeenTest extends TestCase { protected function setUp() { parent::setUp(); - $userManager = $this->userManager = $this->getMockBuilder('OCP\IUserManager') + $userManager = $this->userManager = $this->getMockBuilder(IUserManager::class) ->disableOriginalConstructor() ->getMock(); - $this->consoleInput = $this->getMock('Symfony\Component\Console\Input\InputInterface'); - $this->consoleOutput = $this->getMock('Symfony\Component\Console\Output\OutputInterface'); + $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock(); + $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock(); /** @var \OCP\IUserManager $userManager */ $this->command = new LastSeen($userManager); @@ -63,7 +67,7 @@ class LastSeenTest extends TestCase { * @param string $expectedString */ public function testValidUser($lastSeen, $expectedString) { - $user = $this->getMock('OCP\IUser'); + $user = $this->getMockBuilder(IUser::class)->getMock(); $user->expects($this->once()) ->method('getLastLogin') ->willReturn($lastSeen); diff --git a/tests/Core/Command/User/SettingTest.php b/tests/Core/Command/User/SettingTest.php index 002e8dfef2f..56db670657a 100644 --- a/tests/Core/Command/User/SettingTest.php +++ b/tests/Core/Command/User/SettingTest.php @@ -23,6 +23,11 @@ namespace Tests\Core\Command\User; use OC\Core\Command\User\Setting; +use OCP\IConfig; +use OCP\IDBConnection; +use OCP\IUserManager; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class SettingTest extends TestCase { @@ -40,19 +45,19 @@ class SettingTest extends TestCase { protected function setUp() { parent::setUp(); - $this->userManager = $this->getMockBuilder('OCP\IUserManager') + $this->userManager = $this->getMockBuilder(IUserManager::class) ->disableOriginalConstructor() ->getMock(); - $this->config = $this->getMockBuilder('OCP\IConfig') + $this->config = $this->getMockBuilder(IConfig::class) ->disableOriginalConstructor() ->getMock(); - $this->connection = $this->getMockBuilder('OCP\IDBConnection') + $this->connection = $this->getMockBuilder(IDBConnection::class) ->disableOriginalConstructor() ->getMock(); - $this->consoleInput = $this->getMockBuilder('Symfony\Component\Console\Input\InputInterface') + $this->consoleInput = $this->getMockBuilder(InputInterface::class) ->disableOriginalConstructor() ->getMock(); - $this->consoleOutput = $this->getMockBuilder('Symfony\Component\Console\Output\OutputInterface') + $this->consoleOutput = $this->getMockBuilder(OutputInterface::class) ->disableOriginalConstructor() ->getMock(); } diff --git a/tests/lib/AppFramework/AppTest.php b/tests/lib/AppFramework/AppTest.php index 92ebd1f81e7..93b8768e674 100644 --- a/tests/lib/AppFramework/AppTest.php +++ b/tests/lib/AppFramework/AppTest.php @@ -25,6 +25,7 @@ namespace Test\AppFramework; use OC\AppFramework\App; +use OCP\AppFramework\Http; use OCP\AppFramework\Http\Response; @@ -134,7 +135,7 @@ class AppTest extends \Test\TestCase { public function testOutputIsPrinted(){ - $return = [null, [], [], $this->output, new Response()]; + $return = [Http::STATUS_OK, [], [], $this->output, new Response()]; $this->dispatcher->expects($this->once()) ->method('dispatch') ->with($this->equalTo($this->controller), @@ -146,6 +147,32 @@ class AppTest extends \Test\TestCase { App::main($this->controllerName, $this->controllerMethod, $this->container, []); } + public function dataNoOutput() { + return [ + [Http::STATUS_NO_CONTENT], + [Http::STATUS_NOT_MODIFIED], + ]; + } + + /** + * @dataProvider dataNoOutput + * @param int $statusCode + */ + public function testNoOutput($statusCode) { + $return = [$statusCode, [], [], $this->output, new Response()]; + $this->dispatcher->expects($this->once()) + ->method('dispatch') + ->with($this->equalTo($this->controller), + $this->equalTo($this->controllerMethod)) + ->will($this->returnValue($return)); + $this->io->expects($this->once()) + ->method('setHeader') + ->with($this->equalTo($statusCode)); + $this->io->expects($this->never()) + ->method('setOutput'); + App::main($this->controllerName, $this->controllerMethod, $this->container, []); + } + public function testCallbackIsCalled(){ $mock = $this->getMockBuilder('OCP\AppFramework\Http\ICallbackResponse') diff --git a/tests/lib/LargeFileHelperGetFileSizeTest.php b/tests/lib/LargeFileHelperGetFileSizeTest.php index 0c3a11e971a..b2735d7f619 100644 --- a/tests/lib/LargeFileHelperGetFileSizeTest.php +++ b/tests/lib/LargeFileHelperGetFileSizeTest.php @@ -57,21 +57,6 @@ class LargeFileHelperGetFileSizeTest extends TestCase { /** * @dataProvider dataFileNameProvider */ - public function testGetFileSizeViaCOM($filename, $fileSize) { - if (!extension_loaded('COM')) { - $this->markTestSkipped( - 'The PHP Windows COM extension is required for this test.' - ); - } - $this->assertSame( - $fileSize, - $this->helper->getFileSizeViaCOM($filename) - ); - } - - /** - * @dataProvider dataFileNameProvider - */ public function testGetFileSizeViaExec($filename, $fileSize) { if (!\OC_Helper::is_function_enabled('exec')) { $this->markTestSkipped( |