diff options
750 files changed, 19618 insertions, 12463 deletions
diff --git a/.gitignore b/.gitignore index c0d44301d57..93bacf9b07e 100644 --- a/.gitignore +++ b/.gitignore @@ -92,6 +92,12 @@ nbproject /build/jsdocs/ /npm-debug.log +# puphpet +puphpet + +# vagrant +.vagrant +Vagrantfile # Tests - auto-generated files /data-autotest diff --git a/.htaccess b/.htaccess index e45810d0a05..10adb902ff5 100644 --- a/.htaccess +++ b/.htaccess @@ -25,6 +25,8 @@ RewriteRule ^\.well-known/caldav /remote.php/caldav/ [R] RewriteRule ^apps/calendar/caldav\.php remote.php/caldav/ [QSA,L] RewriteRule ^apps/contacts/carddav\.php remote.php/carddav/ [QSA,L] RewriteRule ^remote/(.*) remote.php [QSA,L] +RewriteRule ^(build|tests|config|lib|3rdparty|templates)/.* - [R=404,L] +RewriteRule ^(\.|autotest|occ|issue|indie|db_|console).* - [R=404,L] </IfModule> <IfModule mod_mime.c> AddType image/svg+xml svg svgz diff --git a/apps/files/ajax/delete.php b/apps/files/ajax/delete.php index 323b70706ce..4d4232e872e 100644 --- a/apps/files/ajax/delete.php +++ b/apps/files/ajax/delete.php @@ -27,7 +27,9 @@ $success = true; //Now delete foreach ($files as $file) { if (\OC\Files\Filesystem::file_exists($dir . '/' . $file) && - !\OC\Files\Filesystem::unlink($dir . '/' . $file)) { + !(\OC\Files\Filesystem::isDeletable($dir . '/' . $file) && + \OC\Files\Filesystem::unlink($dir . '/' . $file)) + ) { $filesWithError .= $file . "\n"; $success = false; } diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php index b960e02ced7..eb99d0644f7 100644 --- a/apps/files/ajax/upload.php +++ b/apps/files/ajax/upload.php @@ -1,5 +1,7 @@ <?php +\OC::$server->getSession()->close(); + // Firefox and Konqueror tries to download application/json for me. --Arthur OCP\JSON::setContentTypeHeader('text/plain'); @@ -7,7 +9,7 @@ OCP\JSON::setContentTypeHeader('text/plain'); // If not, check the login. // If no token is sent along, rely on login only -$allowedPermissions = OCP\PERMISSION_ALL; +$allowedPermissions = \OCP\Constants::PERMISSION_ALL; $errorCode = null; $l = \OC::$server->getL10N('files'); @@ -27,7 +29,7 @@ if (empty($_POST['dirToken'])) { \OC_User::setIncognitoMode(true); // return only read permissions for public upload - $allowedPermissions = OCP\PERMISSION_READ; + $allowedPermissions = \OCP\Constants::PERMISSION_READ; $publicDirectory = !empty($_POST['subdir']) ? $_POST['subdir'] : '/'; $linkItem = OCP\Share::getShareByToken($_POST['dirToken']); @@ -36,7 +38,7 @@ if (empty($_POST['dirToken'])) { die(); } - if (!($linkItem['permissions'] & OCP\PERMISSION_CREATE)) { + if (!($linkItem['permissions'] & \OCP\Constants::PERMISSION_CREATE)) { OCP\JSON::checkLoggedIn(); } else { // resolve reshares @@ -64,13 +66,7 @@ if (empty($_POST['dirToken'])) { } } - OCP\JSON::callCheck(); -if (!\OCP\App::isEnabled('files_encryption')) { - // encryption app need to create keys later, so can't close too early - \OC::$server->getSession()->close(); -} - // get array with current storage stats (e.g. max file size) $storageStats = \OCA\Files\Helper::buildFileStorageStatistics($dir); diff --git a/apps/files/appinfo/remote.php b/apps/files/appinfo/remote.php index 3ba25085bad..26bef966f79 100644 --- a/apps/files/appinfo/remote.php +++ b/apps/files/appinfo/remote.php @@ -38,7 +38,7 @@ $server->setBaseUri($baseuri); $defaults = new OC_Defaults(); $server->addPlugin(new \Sabre\DAV\Auth\Plugin($authBackend, $defaults->getName())); $server->addPlugin(new \Sabre\DAV\Locks\Plugin($lockBackend)); -$server->addPlugin(new \Sabre\DAV\Browser\Plugin(false)); // Show something in the Browser, but no upload +$server->addPlugin(new \Sabre\DAV\Browser\Plugin(false, false)); // Show something in the Browser, but no upload $server->addPlugin(new OC_Connector_Sabre_FilesPlugin()); $server->addPlugin(new OC_Connector_Sabre_MaintenancePlugin()); $server->addPlugin(new OC_Connector_Sabre_ExceptionLoggerPlugin('webdav')); diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index bec0155e90e..6ffc10cdcbd 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -526,7 +526,8 @@ mimetype: $el.attr('data-mime'), type: $el.attr('data-type'), size: parseInt($el.attr('data-size'), 10), - etag: $el.attr('data-etag') + etag: $el.attr('data-etag'), + permissions: parseInt($el.attr('data-permissions'), 10) }; }, @@ -1636,7 +1637,7 @@ this.$el.find('.selectedActions').addClass('hidden'); } else { - canDelete = (this.getDirectoryPermissions() & OC.PERMISSION_DELETE); + canDelete = (this.getDirectoryPermissions() & OC.PERMISSION_DELETE) && this.isSelectedDeletable(); this.$el.find('.selectedActions').removeClass('hidden'); this.$el.find('#headerSize a>span:first').text(OC.Util.humanFileSize(summary.totalSize)); var selection = ''; @@ -1657,6 +1658,15 @@ }, /** + * Check whether all selected files are deletable + */ + isSelectedDeletable: function() { + return _.reduce(this.getSelectedFiles(), function(deletable, file) { + return deletable && (file.permissions & OC.PERMISSION_DELETE); + }, true); + }, + + /** * Returns whether all files are selected * @return true if all files are selected, false otherwise */ diff --git a/apps/files/l10n/af_ZA.js b/apps/files/l10n/af_ZA.js index 1a4639183ed..8671027db6e 100644 --- a/apps/files/l10n/af_ZA.js +++ b/apps/files/l10n/af_ZA.js @@ -3,6 +3,7 @@ OC.L10N.register( { "Share" : "Deel", "Unshare" : "Deel terug neem", + "Error" : "Fout", "_%n folder_::_%n folders_" : ["",""], "_%n file_::_%n files_" : ["",""], "_Uploading %n file_::_Uploading %n files_" : ["",""], diff --git a/apps/files/l10n/af_ZA.json b/apps/files/l10n/af_ZA.json index 0e7116887f0..cd3182e3f69 100644 --- a/apps/files/l10n/af_ZA.json +++ b/apps/files/l10n/af_ZA.json @@ -1,6 +1,7 @@ { "translations": { "Share" : "Deel", "Unshare" : "Deel terug neem", + "Error" : "Fout", "_%n folder_::_%n folders_" : ["",""], "_%n file_::_%n files_" : ["",""], "_Uploading %n file_::_Uploading %n files_" : ["",""], diff --git a/apps/files/l10n/ca.js b/apps/files/l10n/ca.js index 8a4b5c42d24..0885794ea43 100644 --- a/apps/files/l10n/ca.js +++ b/apps/files/l10n/ca.js @@ -6,6 +6,7 @@ OC.L10N.register( "Unknown error" : "Error desconegut", "Could not move %s - File with this name already exists" : "No s'ha pogut moure %s - Ja hi ha un fitxer amb aquest nom", "Could not move %s" : " No s'ha pogut moure %s", + "Permission denied" : "Permís denegat", "File name cannot be empty." : "El nom del fitxer no pot ser buit.", "\"%s\" is an invalid file name." : "\"%s\" no es un fitxer vàlid.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." : "El nóm no és vàlid, '\\', '/', '<', '>', ':', '\"', '|', '?' i '*' no estan permesos.", diff --git a/apps/files/l10n/ca.json b/apps/files/l10n/ca.json index 91e96f5742d..2b767a9aaed 100644 --- a/apps/files/l10n/ca.json +++ b/apps/files/l10n/ca.json @@ -4,6 +4,7 @@ "Unknown error" : "Error desconegut", "Could not move %s - File with this name already exists" : "No s'ha pogut moure %s - Ja hi ha un fitxer amb aquest nom", "Could not move %s" : " No s'ha pogut moure %s", + "Permission denied" : "Permís denegat", "File name cannot be empty." : "El nom del fitxer no pot ser buit.", "\"%s\" is an invalid file name." : "\"%s\" no es un fitxer vàlid.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." : "El nóm no és vàlid, '\\', '/', '<', '>', ':', '\"', '|', '?' i '*' no estan permesos.", diff --git a/apps/files/l10n/fr.js b/apps/files/l10n/fr.js index 719d3355bca..a5a4f25bf1d 100644 --- a/apps/files/l10n/fr.js +++ b/apps/files/l10n/fr.js @@ -70,7 +70,7 @@ OC.L10N.register( "Your storage is almost full ({usedSpacePercent}%)" : "Votre espace de stockage est presque plein ({usedSpacePercent}%)", "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "L'application de chiffrement est activée mais vos clés ne sont pas initialisées, veuillez vous déconnecter et ensuite vous reconnecter.", "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Votre clef privée pour l'application de chiffrement est invalide ! Veuillez mettre à jour le mot de passe de votre clef privée dans vos paramètres personnels pour récupérer l'accès à vos fichiers chiffrés.", - "Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." : "Le chiffrement était désactivé mais vos fichiers sont toujours chiffrés. Veuillez vous rendre sur vos Paramètres personnels pour déchiffrer vos fichiers.", + "Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." : "Le chiffrement a été désactivé mais vos fichiers sont toujours chiffrés. Veuillez vous rendre sur vos paramètres personnels pour déchiffrer vos fichiers.", "{dirs} and {files}" : "{dirs} et {files}", "%s could not be renamed as it has been deleted" : "%s ne peut être renommé car il a été supprimé ", "%s could not be renamed" : "%s ne peut être renommé", diff --git a/apps/files/l10n/fr.json b/apps/files/l10n/fr.json index 8501a8551b7..26707810a75 100644 --- a/apps/files/l10n/fr.json +++ b/apps/files/l10n/fr.json @@ -68,7 +68,7 @@ "Your storage is almost full ({usedSpacePercent}%)" : "Votre espace de stockage est presque plein ({usedSpacePercent}%)", "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "L'application de chiffrement est activée mais vos clés ne sont pas initialisées, veuillez vous déconnecter et ensuite vous reconnecter.", "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Votre clef privée pour l'application de chiffrement est invalide ! Veuillez mettre à jour le mot de passe de votre clef privée dans vos paramètres personnels pour récupérer l'accès à vos fichiers chiffrés.", - "Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." : "Le chiffrement était désactivé mais vos fichiers sont toujours chiffrés. Veuillez vous rendre sur vos Paramètres personnels pour déchiffrer vos fichiers.", + "Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." : "Le chiffrement a été désactivé mais vos fichiers sont toujours chiffrés. Veuillez vous rendre sur vos paramètres personnels pour déchiffrer vos fichiers.", "{dirs} and {files}" : "{dirs} et {files}", "%s could not be renamed as it has been deleted" : "%s ne peut être renommé car il a été supprimé ", "%s could not be renamed" : "%s ne peut être renommé", diff --git a/apps/files/l10n/gl.js b/apps/files/l10n/gl.js index a169f5c21cf..53757da49b5 100644 --- a/apps/files/l10n/gl.js +++ b/apps/files/l10n/gl.js @@ -6,6 +6,7 @@ OC.L10N.register( "Unknown error" : "Produciuse un erro descoñecido", "Could not move %s - File with this name already exists" : "Non foi posíbel mover %s; Xa existe un ficheiro con ese nome.", "Could not move %s" : "Non foi posíbel mover %s", + "Permission denied" : "Permiso denegado", "File name cannot be empty." : "O nome de ficheiro non pode estar baleiro", "\"%s\" is an invalid file name." : "«%s» é un nome incorrecto de ficheiro.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." : "Nome incorrecto, non se permite «\\», «/», «<», «>», «:», «\"», «|», «?» e «*».", diff --git a/apps/files/l10n/gl.json b/apps/files/l10n/gl.json index cf1f30dcfc4..0e131a0ffa6 100644 --- a/apps/files/l10n/gl.json +++ b/apps/files/l10n/gl.json @@ -4,6 +4,7 @@ "Unknown error" : "Produciuse un erro descoñecido", "Could not move %s - File with this name already exists" : "Non foi posíbel mover %s; Xa existe un ficheiro con ese nome.", "Could not move %s" : "Non foi posíbel mover %s", + "Permission denied" : "Permiso denegado", "File name cannot be empty." : "O nome de ficheiro non pode estar baleiro", "\"%s\" is an invalid file name." : "«%s» é un nome incorrecto de ficheiro.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." : "Nome incorrecto, non se permite «\\», «/», «<», «>», «:», «\"», «|», «?» e «*».", diff --git a/apps/files/lib/helper.php b/apps/files/lib/helper.php index aa5a2f8c68a..97b9d8e7044 100644 --- a/apps/files/lib/helper.php +++ b/apps/files/lib/helper.php @@ -82,7 +82,7 @@ class Helper public static function compareTimestamp(FileInfo $a, FileInfo $b) { $aTime = $a->getMTime(); $bTime = $b->getMTime(); - return $aTime - $bTime; + return ($aTime < $bTime) ? -1 : 1; } /** diff --git a/apps/files/tests/helper.php b/apps/files/tests/helper.php index da902f4f78a..1b7c8eef43a 100644 --- a/apps/files/tests/helper.php +++ b/apps/files/tests/helper.php @@ -33,10 +33,10 @@ class Test_Files_Helper extends \Test\TestCase { */ private function getTestFileList() { return array( - self::makeFileInfo('a.txt', 4, 1000), + self::makeFileInfo('a.txt', 4, 2.3 * pow(10, 9)), self::makeFileInfo('q.txt', 5, 150), self::makeFileInfo('subdir2', 87, 128, true), - self::makeFileInfo('b.txt', 166, 800), + self::makeFileInfo('b.txt', 2.2 * pow(10, 9), 800), self::makeFileInfo('o.txt', 12, 100), self::makeFileInfo('subdir', 88, 125, true), ); diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js index a7fa14eb14a..21f8a12f4b5 100644 --- a/apps/files/tests/js/filelistSpec.js +++ b/apps/files/tests/js/filelistSpec.js @@ -97,7 +97,8 @@ describe('OCA.Files.FileList tests', function() { name: 'One.txt', mimetype: 'text/plain', size: 12, - etag: 'abc' + etag: 'abc', + permissions: OC.PERMISSION_ALL }, { id: 2, type: 'file', @@ -105,6 +106,7 @@ describe('OCA.Files.FileList tests', function() { mimetype: 'image/jpeg', size: 12049, etag: 'def', + permissions: OC.PERMISSION_ALL }, { id: 3, type: 'file', @@ -112,13 +114,15 @@ describe('OCA.Files.FileList tests', function() { mimetype: 'application/pdf', size: 58009, etag: '123', + permissions: OC.PERMISSION_ALL }, { id: 4, type: 'dir', name: 'somedir', mimetype: 'httpd/unix-directory', size: 250, - etag: '456' + etag: '456', + permissions: OC.PERMISSION_ALL }]; pageSizeStub = sinon.stub(OCA.Files.FileList.prototype, 'pageSize').returns(20); fileList = new OCA.Files.FileList($('#app-content-files')); @@ -1479,6 +1483,17 @@ describe('OCA.Files.FileList tests', function() { $('.select-all').click(); expect(fileList.$el.find('.delete-selected').hasClass('hidden')).toEqual(true); }); + it('show doesnt show the delete action if one or more files are not deletable', function () { + fileList.setFiles(testFiles); + $('#permissions').val(OC.PERMISSION_READ | OC.PERMISSION_DELETE); + $('.select-all').click(); + expect(fileList.$el.find('.delete-selected').hasClass('hidden')).toEqual(false); + testFiles[0].permissions = OC.PERMISSION_READ; + $('.select-all').click(); + fileList.setFiles(testFiles); + $('.select-all').click(); + expect(fileList.$el.find('.delete-selected').hasClass('hidden')).toEqual(true); + }); }); describe('Actions', function() { beforeEach(function() { @@ -1495,7 +1510,8 @@ describe('OCA.Files.FileList tests', function() { mimetype: 'text/plain', type: 'file', size: 12, - etag: 'abc' + etag: 'abc', + permissions: OC.PERMISSION_ALL }); expect(files[1]).toEqual({ id: 3, @@ -1503,7 +1519,8 @@ describe('OCA.Files.FileList tests', function() { name: 'Three.pdf', mimetype: 'application/pdf', size: 58009, - etag: '123' + etag: '123', + permissions: OC.PERMISSION_ALL }); expect(files[2]).toEqual({ id: 4, @@ -1511,7 +1528,8 @@ describe('OCA.Files.FileList tests', function() { name: 'somedir', mimetype: 'httpd/unix-directory', size: 250, - etag: '456' + etag: '456', + permissions: OC.PERMISSION_ALL }); }); it('Removing a file removes it from the selection', function() { @@ -1524,7 +1542,8 @@ describe('OCA.Files.FileList tests', function() { mimetype: 'text/plain', type: 'file', size: 12, - etag: 'abc' + etag: 'abc', + permissions: OC.PERMISSION_ALL }); expect(files[1]).toEqual({ id: 4, @@ -1532,7 +1551,8 @@ describe('OCA.Files.FileList tests', function() { name: 'somedir', mimetype: 'httpd/unix-directory', size: 250, - etag: '456' + etag: '456', + permissions: OC.PERMISSION_ALL }); }); describe('Download', function() { diff --git a/apps/files_encryption/ajax/changeRecoveryPassword.php b/apps/files_encryption/ajax/changeRecoveryPassword.php index bf647f2c8fa..01b76a969b6 100644 --- a/apps/files_encryption/ajax/changeRecoveryPassword.php +++ b/apps/files_encryption/ajax/changeRecoveryPassword.php @@ -55,16 +55,15 @@ $proxyStatus = \OC_FileProxy::$enabled; \OC_FileProxy::$enabled = false; $keyId = $util->getRecoveryKeyId(); -$keyPath = '/owncloud_private_key/' . $keyId . '.private.key'; -$encryptedRecoveryKey = $view->file_get_contents($keyPath); -$decryptedRecoveryKey = \OCA\Encryption\Crypt::decryptPrivateKey($encryptedRecoveryKey, $oldPassword); +$encryptedRecoveryKey = Encryption\Keymanager::getPrivateSystemKey($keyId); +$decryptedRecoveryKey = $encryptedRecoveryKey ? \OCA\Encryption\Crypt::decryptPrivateKey($encryptedRecoveryKey, $oldPassword) : false; if ($decryptedRecoveryKey) { $cipher = \OCA\Encryption\Helper::getCipher(); $encryptedKey = \OCA\Encryption\Crypt::symmetricEncryptFileContent($decryptedRecoveryKey, $newPassword, $cipher); if ($encryptedKey) { - \OCA\Encryption\Keymanager::setPrivateSystemKey($encryptedKey, $keyId . '.private.key'); + \OCA\Encryption\Keymanager::setPrivateSystemKey($encryptedKey, $keyId); $return = true; } } diff --git a/apps/files_encryption/ajax/updatePrivateKeyPassword.php b/apps/files_encryption/ajax/updatePrivateKeyPassword.php index 0f182e93831..97da3811a0f 100644 --- a/apps/files_encryption/ajax/updatePrivateKeyPassword.php +++ b/apps/files_encryption/ajax/updatePrivateKeyPassword.php @@ -26,19 +26,18 @@ $newPassword = $_POST['newPassword']; $view = new \OC\Files\View('/'); $session = new \OCA\Encryption\Session($view); $user = \OCP\User::getUser(); +$loginName = \OC::$server->getUserSession()->getLoginName(); // check new password -$passwordCorrect = \OCP\User::checkPassword($user, $newPassword); +$passwordCorrect = \OCP\User::checkPassword($loginName, $newPassword); if ($passwordCorrect !== false) { $proxyStatus = \OC_FileProxy::$enabled; \OC_FileProxy::$enabled = false; -$keyPath = '/' . $user . '/files_encryption/' . $user . '.private.key'; - -$encryptedKey = $view->file_get_contents($keyPath); -$decryptedKey = \OCA\Encryption\Crypt::decryptPrivateKey($encryptedKey, $oldPassword); +$encryptedKey = Encryption\Keymanager::getPrivateKey($view, $user); +$decryptedKey = $encryptedKey ? \OCA\Encryption\Crypt::decryptPrivateKey($encryptedKey, $oldPassword) : false; if ($decryptedKey) { $cipher = \OCA\Encryption\Helper::getCipher(); diff --git a/apps/files_encryption/appinfo/update.php b/apps/files_encryption/appinfo/update.php index a29667ec6b6..957cf746974 100644 --- a/apps/files_encryption/appinfo/update.php +++ b/apps/files_encryption/appinfo/update.php @@ -4,7 +4,8 @@ use OCA\Files_Encryption\Migration; $installedVersion=OCP\Config::getAppValue('files_encryption', 'installed_version'); -if (version_compare($installedVersion, '0.6', '<')) { +// Migration OC7 -> OC8 +if (version_compare($installedVersion, '0.7', '<')) { $m = new Migration(); - $m->dropTableEncryption(); + $m->reorganizeFolderStructure(); } diff --git a/apps/files_encryption/appinfo/version b/apps/files_encryption/appinfo/version index ee6cdce3c29..faef31a4357 100644 --- a/apps/files_encryption/appinfo/version +++ b/apps/files_encryption/appinfo/version @@ -1 +1 @@ -0.6.1 +0.7.0 diff --git a/apps/files_encryption/exception/encryptionException.php b/apps/files_encryption/exception/encryptionException.php index c51a3b3439f..de1f16b4f4b 100644 --- a/apps/files_encryption/exception/encryptionException.php +++ b/apps/files_encryption/exception/encryptionException.php @@ -27,7 +27,7 @@ namespace OCA\Encryption\Exception; * Base class for all encryption exception * * Possible Error Codes: - * 10 - unknown error + * 10 - generic error * 20 - unexpected end of encryption header * 30 - unexpected blog size * 40 - encryption header to large @@ -38,7 +38,7 @@ namespace OCA\Encryption\Exception; * 90 - private key missing */ class EncryptionException extends \Exception { - const UNKNOWN = 10; + const GENERIC = 10; const UNEXPECTED_END_OF_ENCRYPTION_HEADER = 20; const UNEXPECTED_BLOG_SIZE = 30; const ENCRYPTION_HEADER_TO_LARGE = 40; diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php index eadd2b64b80..a6b7555b376 100644 --- a/apps/files_encryption/hooks/hooks.php +++ b/apps/files_encryption/hooks/hooks.php @@ -3,8 +3,10 @@ /**
* ownCloud
*
- * @author Sam Tuke
- * @copyright 2012 Sam Tuke samtuke@owncloud.org
+ * @copyright (C) 2014 ownCloud, Inc.
+ *
+ * @author Sam Tuke <samtuke@owncloud.org>
+ * @author Bjoern Schiessle <schiessle@owncloud.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
@@ -35,7 +37,7 @@ class Hooks { // file for which we want to delete the keys after the delete operation was successful
private static $deleteFiles = array();
// file for which we want to delete the keys after the delete operation was successful
- private static $umountedFiles = array();
+ private static $unmountedFiles = array();
/**
* Startup encryption backend upon user login
@@ -64,7 +66,7 @@ class Hooks { //check if all requirements are met
if (!Helper::checkRequirements() || !Helper::checkConfiguration()) {
$error_msg = $l->t("Missing requirements.");
- $hint = $l->t('Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled.');
+ $hint = $l->t('Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled.');
\OC_App::disable('files_encryption');
\OCP\Util::writeLog('Encryption library', $error_msg . ' ' . $hint, \OCP\Util::ERROR);
\OCP\Template::printErrorPage($error_msg, $hint);
@@ -150,18 +152,7 @@ class Hooks { public static function postDeleteUser($params) {
if (\OCP\App::isEnabled('files_encryption')) {
- $view = new \OC\Files\View('/');
-
- // cleanup public key
- $publicKey = '/public-keys/' . $params['uid'] . '.public.key';
-
- // Disable encryption proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
- $view->unlink($publicKey);
-
- \OC_FileProxy::$enabled = $proxyStatus;
+ Keymanager::deletePublicKey(new \OC\Files\View(), $params['uid']);
}
}
@@ -242,7 +233,7 @@ class Hooks { \OC_FileProxy::$enabled = false;
// Save public key
- $view->file_put_contents('/public-keys/' . $user . '.public.key', $keypair['publicKey']);
+ Keymanager::setPublicKey($keypair['publicKey'], $user);
// Encrypt private key with new password
$encryptedKey = \OCA\Encryption\Crypt::symmetricEncryptFileContent($keypair['privateKey'], $newUserPassword, Helper::getCipher());
@@ -290,7 +281,7 @@ class Hooks { $l = new \OC_L10N('files_encryption');
$users = array();
- $view = new \OC\Files\View('/public-keys/');
+ $view = new \OC\Files\View('/');
switch ($params['shareType']) {
case \OCP\Share::SHARE_TYPE_USER:
@@ -303,7 +294,7 @@ class Hooks { $notConfigured = array();
foreach ($users as $user) {
- if (!$view->file_exists($user . '.public.key')) {
+ if (!Keymanager::publicKeyExists($view, $user)) {
$notConfigured[] = $user;
}
}
@@ -328,7 +319,7 @@ class Hooks { $path = \OC\Files\Filesystem::getPath($params['fileSource']);
- self::updateKeyfiles($path, $params['itemType']);
+ self::updateKeyfiles($path);
}
}
@@ -336,9 +327,8 @@ class Hooks { * update keyfiles and share keys recursively
*
* @param string $path to the file/folder
- * @param string $type 'file' or 'folder'
*/
- private static function updateKeyfiles($path, $type) {
+ private static function updateKeyfiles($path) {
$view = new \OC\Files\View('/');
$userId = \OCP\User::getUser();
$session = new \OCA\Encryption\Session($view);
@@ -350,7 +340,7 @@ class Hooks { $mountPoint = $mount->getMountPoint();
// if a folder was shared, get a list of all (sub-)folders
- if ($type === 'folder') {
+ if ($view->is_dir('/' . $userId . '/files' . $path)) {
$allFiles = $util->getAllFiles($path, $mountPoint);
} else {
$allFiles = array($path);
@@ -407,11 +397,10 @@ class Hooks { // Unshare every user who no longer has access to the file
$delUsers = array_diff($userIds, $sharingUsers);
-
- list($owner, $ownerPath) = $util->getUidAndFilename($path);
+ $keyPath = Keymanager::getKeyPath($view, $util, $path);
// delete share key
- Keymanager::delShareKey($view, $delUsers, $ownerPath, $owner);
+ Keymanager::delShareKey($view, $delUsers, $keyPath, $userId, $path);
}
}
@@ -437,37 +426,24 @@ class Hooks { $user = \OCP\User::getUser();
$view = new \OC\Files\View('/');
$util = new Util($view, $user);
- list($ownerOld, $pathOld) = $util->getUidAndFilename($params['oldpath']);
// we only need to rename the keys if the rename happens on the same mountpoint
// otherwise we perform a stream copy, so we get a new set of keys
$mp1 = $view->getMountPoint('/' . $user . '/files/' . $params['oldpath']);
$mp2 = $view->getMountPoint('/' . $user . '/files/' . $params['newpath']);
- $type = $view->is_dir('/' . $user . '/files/' . $params['oldpath']) ? 'folder' : 'file';
+ $oldKeysPath = Keymanager::getKeyPath($view, $util, $params['oldpath']);
if ($mp1 === $mp2) {
- if ($util->isSystemWideMountPoint($pathOld)) {
- $oldShareKeyPath = 'files_encryption/share-keys/' . $pathOld;
- } else {
- $oldShareKeyPath = $ownerOld . '/' . 'files_encryption/share-keys/' . $pathOld;
- }
- // gather share keys here because in postRename() the file will be moved already
- $oldShareKeys = Helper::findShareKeys($pathOld, $oldShareKeyPath, $view);
- if (count($oldShareKeys) === 0) {
- \OC_Log::write(
- 'Encryption library', 'No share keys found for "' . $pathOld . '"',
- \OC_Log::WARN
- );
- }
self::$renamedFiles[$params['oldpath']] = array(
- 'uid' => $ownerOld,
- 'path' => $pathOld,
- 'type' => $type,
'operation' => $operation,
- 'sharekeys' => $oldShareKeys
+ 'oldKeysPath' => $oldKeysPath,
+ );
+ } else {
+ self::$renamedFiles[$params['oldpath']] = array(
+ 'operation' => 'cleanup',
+ 'oldKeysPath' => $oldKeysPath,
);
-
}
}
@@ -482,81 +458,40 @@ class Hooks { return true;
}
- // Disable encryption proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
$view = new \OC\Files\View('/');
$userId = \OCP\User::getUser();
$util = new Util($view, $userId);
- $oldShareKeys = null;
- if (isset(self::$renamedFiles[$params['oldpath']]['uid']) &&
- isset(self::$renamedFiles[$params['oldpath']]['path'])) {
- $ownerOld = self::$renamedFiles[$params['oldpath']]['uid'];
- $pathOld = self::$renamedFiles[$params['oldpath']]['path'];
- $type = self::$renamedFiles[$params['oldpath']]['type'];
+ if (isset(self::$renamedFiles[$params['oldpath']]['operation']) &&
+ isset(self::$renamedFiles[$params['oldpath']]['oldKeysPath'])) {
$operation = self::$renamedFiles[$params['oldpath']]['operation'];
- $oldShareKeys = self::$renamedFiles[$params['oldpath']]['sharekeys'];
+ $oldKeysPath = self::$renamedFiles[$params['oldpath']]['oldKeysPath'];
unset(self::$renamedFiles[$params['oldpath']]);
+ if ($operation === 'cleanup') {
+ return $view->unlink($oldKeysPath);
+ }
} else {
\OCP\Util::writeLog('Encryption library', "can't get path and owner from the file before it was renamed", \OCP\Util::DEBUG);
- \OC_FileProxy::$enabled = $proxyStatus;
return false;
}
list($ownerNew, $pathNew) = $util->getUidAndFilename($params['newpath']);
- // Format paths to be relative to user files dir
- if ($util->isSystemWideMountPoint($pathOld)) {
- $oldKeyfilePath = 'files_encryption/keyfiles/' . $pathOld;
- $oldShareKeyPath = 'files_encryption/share-keys/' . $pathOld;
- } else {
- $oldKeyfilePath = $ownerOld . '/' . 'files_encryption/keyfiles/' . $pathOld;
- $oldShareKeyPath = $ownerOld . '/' . 'files_encryption/share-keys/' . $pathOld;
- }
-
if ($util->isSystemWideMountPoint($pathNew)) {
- $newKeyfilePath = 'files_encryption/keyfiles/' . $pathNew;
- $newShareKeyPath = 'files_encryption/share-keys/' . $pathNew;
- } else {
- $newKeyfilePath = $ownerNew . '/files_encryption/keyfiles/' . $pathNew;
- $newShareKeyPath = $ownerNew . '/files_encryption/share-keys/' . $pathNew;
- }
-
- // create new key folders if it doesn't exists
- if (!$view->file_exists(dirname($newShareKeyPath))) {
- $view->mkdir(dirname($newShareKeyPath));
- }
- if (!$view->file_exists(dirname($newKeyfilePath))) {
- $view->mkdir(dirname($newKeyfilePath));
- }
-
- // handle share keys
- if ($type === 'file') {
- $oldKeyfilePath .= '.key';
- $newKeyfilePath .= '.key';
-
- foreach ($oldShareKeys as $src) {
- $dst = \OC\Files\Filesystem::normalizePath(str_replace($pathOld, $pathNew, $src));
- $view->$operation($src, $dst);
- }
-
+ $newKeysPath = 'files_encryption/keys/' . $pathNew;
} else {
- // handle share-keys folders
- $view->$operation($oldShareKeyPath, $newShareKeyPath);
+ $newKeysPath = $ownerNew . '/files_encryption/keys/' . $pathNew;
}
- // Rename keyfile so it isn't orphaned
- if ($view->file_exists($oldKeyfilePath)) {
- $view->$operation($oldKeyfilePath, $newKeyfilePath);
+ // create key folders if it doesn't exists
+ if (!$view->file_exists(dirname($newKeysPath))) {
+ $view->mkdir(dirname($newKeysPath));
}
+ $view->$operation($oldKeysPath, $newKeysPath);
// update sharing-keys
- self::updateKeyfiles($params['newpath'], $type);
-
- \OC_FileProxy::$enabled = $proxyStatus;
+ self::updateKeyfiles($params['newpath']);
}
/**
@@ -592,37 +527,28 @@ class Hooks { */
public static function postDelete($params) {
- if (!isset(self::$deleteFiles[$params[\OC\Files\Filesystem::signal_param_path]])) {
+ $path = $params[\OC\Files\Filesystem::signal_param_path];
+
+ if (!isset(self::$deleteFiles[$path])) {
return true;
}
- $deletedFile = self::$deleteFiles[$params[\OC\Files\Filesystem::signal_param_path]];
- $path = $deletedFile['path'];
- $user = $deletedFile['uid'];
+ $deletedFile = self::$deleteFiles[$path];
+ $keyPath = $deletedFile['keyPath'];
// we don't need to remember the file any longer
- unset(self::$deleteFiles[$params[\OC\Files\Filesystem::signal_param_path]]);
+ unset(self::$deleteFiles[$path]);
$view = new \OC\Files\View('/');
// return if the file still exists and wasn't deleted correctly
- if ($view->file_exists('/' . $user . '/files/' . $path)) {
+ if ($view->file_exists('/' . \OCP\User::getUser() . '/files/' . $path)) {
return true;
}
- // Disable encryption proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
// Delete keyfile & shareKey so it isn't orphaned
- if (!Keymanager::deleteFileKey($view, $path, $user)) {
- \OCP\Util::writeLog('Encryption library',
- 'Keyfile or shareKey could not be deleted for file "' . $user.'/files/'.$path . '"', \OCP\Util::ERROR);
- }
-
- Keymanager::delAllShareKeys($view, $user, $path);
+ $view->unlink($keyPath);
- \OC_FileProxy::$enabled = $proxyStatus;
}
/**
@@ -631,6 +557,7 @@ class Hooks { * @return boolean|null
*/
public static function preDelete($params) {
+ $view = new \OC\Files\View('/');
$path = $params[\OC\Files\Filesystem::signal_param_path];
// skip this method if the trash bin is enabled or if we delete a file
@@ -639,68 +566,61 @@ class Hooks { return true;
}
- $util = new Util(new \OC\Files\View('/'), \OCP\USER::getUser());
- list($owner, $ownerPath) = $util->getUidAndFilename($path);
+ $util = new Util($view, \OCP\USER::getUser());
- self::$deleteFiles[$params[\OC\Files\Filesystem::signal_param_path]] = array(
- 'uid' => $owner,
- 'path' => $ownerPath);
+ $keysPath = Keymanager::getKeyPath($view, $util, $path);
+
+ self::$deleteFiles[$path] = array(
+ 'keyPath' => $keysPath);
}
/**
* unmount file from yourself
* remember files/folders which get unmounted
*/
- public static function preUmount($params) {
+ public static function preUnmount($params) {
+ $view = new \OC\Files\View('/');
+ $user = \OCP\User::getUser();
$path = $params[\OC\Files\Filesystem::signal_param_path];
- $user = \OCP\USER::getUser();
-
- $view = new \OC\Files\View();
- $itemType = $view->is_dir('/' . $user . '/files' . $path) ? 'folder' : 'file';
$util = new Util($view, $user);
list($owner, $ownerPath) = $util->getUidAndFilename($path);
- self::$umountedFiles[$params[\OC\Files\Filesystem::signal_param_path]] = array(
- 'uid' => $owner,
- 'path' => $ownerPath,
- 'itemType' => $itemType);
+ $keysPath = Keymanager::getKeyPath($view, $util, $path);
+
+ self::$unmountedFiles[$path] = array(
+ 'keyPath' => $keysPath,
+ 'owner' => $owner,
+ 'ownerPath' => $ownerPath
+ );
}
/**
* unmount file from yourself
*/
- public static function postUmount($params) {
+ public static function postUnmount($params) {
- if (!isset(self::$umountedFiles[$params[\OC\Files\Filesystem::signal_param_path]])) {
+ $path = $params[\OC\Files\Filesystem::signal_param_path];
+ $user = \OCP\User::getUser();
+
+ if (!isset(self::$unmountedFiles[$path])) {
return true;
}
- $umountedFile = self::$umountedFiles[$params[\OC\Files\Filesystem::signal_param_path]];
- $path = $umountedFile['path'];
- $user = $umountedFile['uid'];
- $itemType = $umountedFile['itemType'];
+ $umountedFile = self::$unmountedFiles[$path];
+ $keyPath = $umountedFile['keyPath'];
+ $owner = $umountedFile['owner'];
+ $ownerPath = $umountedFile['ownerPath'];
$view = new \OC\Files\View();
- $util = new Util($view, $user);
// we don't need to remember the file any longer
- unset(self::$umountedFiles[$params[\OC\Files\Filesystem::signal_param_path]]);
+ unset(self::$unmountedFiles[$path]);
- // if we unshare a folder we need a list of all (sub-)files
- if ($itemType === 'folder') {
- $allFiles = $util->getAllFiles($path);
- } else {
- $allFiles = array($path);
- }
-
- foreach ($allFiles as $path) {
-
- // check if the user still has access to the file, otherwise delete share key
- $sharingUsers = \OCP\Share::getUsersSharingFile($path, $user);
- if (!in_array(\OCP\User::getUser(), $sharingUsers['users'])) {
- Keymanager::delShareKey($view, array(\OCP\User::getUser()), $path, $user);
- }
+ // check if the user still has access to the file, otherwise delete share key
+ $sharingUsers = \OCP\Share::getUsersSharingFile($path, $user);
+ if (!in_array(\OCP\User::getUser(), $sharingUsers['users'])) {
+ Keymanager::delShareKey($view, array(\OCP\User::getUser()), $keyPath, $owner, $ownerPath);
}
}
diff --git a/apps/files_encryption/l10n/ar.js b/apps/files_encryption/l10n/ar.js index 9f51322cf92..ce9c2e91fb8 100644 --- a/apps/files_encryption/l10n/ar.js +++ b/apps/files_encryption/l10n/ar.js @@ -15,7 +15,6 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "لا يمكن فك التشفير من هذا الملف, من الممكن ان يكون هذا الملف مُشارك. يرجى سؤال صاحب الملف لإعادة مشاركتة معك.", "Unknown error. Please check your system settings or contact your administrator" : "خطأ غير معروف, الرجاء التحقق من إعدادات نظامك أو راسل المدير", "Missing requirements." : "متطلبات ناقصة.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "يرجى التاكد من ان اصدار PHP 5.3.3 او احدث , مثبت و التاكد من ان OpenSSL مفعل و مهيئ بشكل صحيح. حتى الان برنامج التتشفير تم تعطيلة.", "Following users are not set up for encryption:" : "المستخدمين التاليين لم يتم تعيين لهم التشفيير:", "Initial encryption started... This can take some time. Please wait." : "بدأ التشفير... من الممكن ان ياخذ بعض الوقت. يرجى الانتظار.", "Initial encryption running... Please try again later." : "جاري تفعيل التشفير المبدئي ، الرجاء المحاولة لاحقا", diff --git a/apps/files_encryption/l10n/ar.json b/apps/files_encryption/l10n/ar.json index d7caa1b31d0..d43201b8cd5 100644 --- a/apps/files_encryption/l10n/ar.json +++ b/apps/files_encryption/l10n/ar.json @@ -13,7 +13,6 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "لا يمكن فك التشفير من هذا الملف, من الممكن ان يكون هذا الملف مُشارك. يرجى سؤال صاحب الملف لإعادة مشاركتة معك.", "Unknown error. Please check your system settings or contact your administrator" : "خطأ غير معروف, الرجاء التحقق من إعدادات نظامك أو راسل المدير", "Missing requirements." : "متطلبات ناقصة.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "يرجى التاكد من ان اصدار PHP 5.3.3 او احدث , مثبت و التاكد من ان OpenSSL مفعل و مهيئ بشكل صحيح. حتى الان برنامج التتشفير تم تعطيلة.", "Following users are not set up for encryption:" : "المستخدمين التاليين لم يتم تعيين لهم التشفيير:", "Initial encryption started... This can take some time. Please wait." : "بدأ التشفير... من الممكن ان ياخذ بعض الوقت. يرجى الانتظار.", "Initial encryption running... Please try again later." : "جاري تفعيل التشفير المبدئي ، الرجاء المحاولة لاحقا", diff --git a/apps/files_encryption/l10n/ast.js b/apps/files_encryption/l10n/ast.js index c909d4ee021..c350f3605c2 100644 --- a/apps/files_encryption/l10n/ast.js +++ b/apps/files_encryption/l10n/ast.js @@ -15,7 +15,6 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Nun pudo descifrase esti ficheru, dablemente seya un ficheru compartíu. Solicita al propietariu del mesmu que vuelva a compartilu contigo.", "Unknown error. Please check your system settings or contact your administrator" : "Fallu desconocíu. Por favor, comprueba los axustes del sistema o contauta col alministrador", "Missing requirements." : "Requisitos incompletos.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Por favor, asegúrate de que PHP 5.3.3 o postreru ta instaláu y que la estensión OpenSSL de PHP ta habilitada y configurada correutamente. Pel momentu, l'aplicación de cifráu deshabilitóse.", "Following users are not set up for encryption:" : "Los siguientes usuarios nun se configuraron pal cifráu:", "Initial encryption started... This can take some time. Please wait." : "Cifráu aniciáu..... Esto pue llevar un tiempu. Por favor espera.", "Initial encryption running... Please try again later." : "Cifráu inicial en cursu... Inténtalo dempués.", diff --git a/apps/files_encryption/l10n/ast.json b/apps/files_encryption/l10n/ast.json index d34a727863d..6418e044717 100644 --- a/apps/files_encryption/l10n/ast.json +++ b/apps/files_encryption/l10n/ast.json @@ -13,7 +13,6 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Nun pudo descifrase esti ficheru, dablemente seya un ficheru compartíu. Solicita al propietariu del mesmu que vuelva a compartilu contigo.", "Unknown error. Please check your system settings or contact your administrator" : "Fallu desconocíu. Por favor, comprueba los axustes del sistema o contauta col alministrador", "Missing requirements." : "Requisitos incompletos.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Por favor, asegúrate de que PHP 5.3.3 o postreru ta instaláu y que la estensión OpenSSL de PHP ta habilitada y configurada correutamente. Pel momentu, l'aplicación de cifráu deshabilitóse.", "Following users are not set up for encryption:" : "Los siguientes usuarios nun se configuraron pal cifráu:", "Initial encryption started... This can take some time. Please wait." : "Cifráu aniciáu..... Esto pue llevar un tiempu. Por favor espera.", "Initial encryption running... Please try again later." : "Cifráu inicial en cursu... Inténtalo dempués.", diff --git a/apps/files_encryption/l10n/bg_BG.js b/apps/files_encryption/l10n/bg_BG.js index 87ffacc697d..258c9d2723e 100644 --- a/apps/files_encryption/l10n/bg_BG.js +++ b/apps/files_encryption/l10n/bg_BG.js @@ -24,7 +24,6 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Неуспешно разшифроване на този файл, вероятно това е споделен файл. Моля, поискай собственика на файла да го сподели повторно с теб.", "Unknown error. Please check your system settings or contact your administrator" : "Непозната грешка. Моля, провери системните настройки или се свържи с администратора.", "Missing requirements." : "Липсва задължителна информация.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Моля, увери се, че PHP 5.3.3 или по-нова версия е инсталирана, и че OpenSSL заедно съответната PHP добавка са включени и правилно настроени. За сега, криптиращото приложение ще бъде изключено.", "Following users are not set up for encryption:" : "Следните потребители не са настроени за криптиране:", "Initial encryption started... This can take some time. Please wait." : "Първоначалното криптиране започна... Това може да отнеме време. Моля изчакай.", "Initial encryption running... Please try again later." : "Тече първоначално криптиране... Моля опитай по-късно.", diff --git a/apps/files_encryption/l10n/bg_BG.json b/apps/files_encryption/l10n/bg_BG.json index 6e0ac83b494..8a2abbfc5c4 100644 --- a/apps/files_encryption/l10n/bg_BG.json +++ b/apps/files_encryption/l10n/bg_BG.json @@ -22,7 +22,6 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Неуспешно разшифроване на този файл, вероятно това е споделен файл. Моля, поискай собственика на файла да го сподели повторно с теб.", "Unknown error. Please check your system settings or contact your administrator" : "Непозната грешка. Моля, провери системните настройки или се свържи с администратора.", "Missing requirements." : "Липсва задължителна информация.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Моля, увери се, че PHP 5.3.3 или по-нова версия е инсталирана, и че OpenSSL заедно съответната PHP добавка са включени и правилно настроени. За сега, криптиращото приложение ще бъде изключено.", "Following users are not set up for encryption:" : "Следните потребители не са настроени за криптиране:", "Initial encryption started... This can take some time. Please wait." : "Първоначалното криптиране започна... Това може да отнеме време. Моля изчакай.", "Initial encryption running... Please try again later." : "Тече първоначално криптиране... Моля опитай по-късно.", diff --git a/apps/files_encryption/l10n/ca.js b/apps/files_encryption/l10n/ca.js index 2cc924a7523..033792d4233 100644 --- a/apps/files_encryption/l10n/ca.js +++ b/apps/files_encryption/l10n/ca.js @@ -15,7 +15,6 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "No es pot desencriptar aquest fitxer, probablement és un fitxer compartit. Demaneu al propietari del fitxer que el comparteixi de nou amb vós.", "Unknown error. Please check your system settings or contact your administrator" : "Error desconegut. Comproveu l'arranjament del sistema o aviseu a l'administrador", "Missing requirements." : "Manca de requisits.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Assegureu-vos que teniu instal·lat PHP 5.3.3 o una versió superior i que està activat Open SSL i habilitada i configurada correctament l'extensió de PHP. De moment, l'aplicació d'encriptació s'ha desactivat.", "Following users are not set up for encryption:" : "Els usuaris següents no estan configurats per a l'encriptació:", "Initial encryption started... This can take some time. Please wait." : "La encriptació inicial ha començat... Pot trigar una estona, espereu.", "Initial encryption running... Please try again later." : "encriptació inicial en procés... Proveu-ho més tard.", diff --git a/apps/files_encryption/l10n/ca.json b/apps/files_encryption/l10n/ca.json index 378af112cf2..85130ff900e 100644 --- a/apps/files_encryption/l10n/ca.json +++ b/apps/files_encryption/l10n/ca.json @@ -13,7 +13,6 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "No es pot desencriptar aquest fitxer, probablement és un fitxer compartit. Demaneu al propietari del fitxer que el comparteixi de nou amb vós.", "Unknown error. Please check your system settings or contact your administrator" : "Error desconegut. Comproveu l'arranjament del sistema o aviseu a l'administrador", "Missing requirements." : "Manca de requisits.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Assegureu-vos que teniu instal·lat PHP 5.3.3 o una versió superior i que està activat Open SSL i habilitada i configurada correctament l'extensió de PHP. De moment, l'aplicació d'encriptació s'ha desactivat.", "Following users are not set up for encryption:" : "Els usuaris següents no estan configurats per a l'encriptació:", "Initial encryption started... This can take some time. Please wait." : "La encriptació inicial ha començat... Pot trigar una estona, espereu.", "Initial encryption running... Please try again later." : "encriptació inicial en procés... Proveu-ho més tard.", diff --git a/apps/files_encryption/l10n/cs_CZ.js b/apps/files_encryption/l10n/cs_CZ.js index 5d4d36557b7..bb0087002d2 100644 --- a/apps/files_encryption/l10n/cs_CZ.js +++ b/apps/files_encryption/l10n/cs_CZ.js @@ -24,7 +24,7 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Tento soubor se nepodařilo dešifrovat, pravděpodobně je sdílený. Požádejte prosím majitele souboru, aby jej s vámi znovu sdílel.", "Unknown error. Please check your system settings or contact your administrator" : "Neznámá chyba. Zkontrolujte nastavení systému nebo kontaktujte vašeho správce.", "Missing requirements." : "Nesplněné závislosti.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Ujistěte se prosím, že máte nainstalované PHP 5.3.3 nebo novější a že máte povolené a správně nakonfigurované OpenSSL včetně jeho rozšíření pro PHP. Prozatím byla aplikace pro šifrování vypnuta.", + "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Ujistěte se prosím, že máte máte povolené a správně nakonfigurované OpenSSL včetně jeho rozšíření pro PHP. Aplikace pro šifrování byla prozatím vypnuta.", "Following users are not set up for encryption:" : "Následující uživatelé nemají nastavené šifrování:", "Initial encryption started... This can take some time. Please wait." : "Počáteční šifrování zahájeno... Toto může chvíli trvat. Počkejte prosím.", "Initial encryption running... Please try again later." : "Probíhá počáteční šifrování... Zkuste to prosím znovu později.", diff --git a/apps/files_encryption/l10n/cs_CZ.json b/apps/files_encryption/l10n/cs_CZ.json index 3f25a78695e..7ec10517aad 100644 --- a/apps/files_encryption/l10n/cs_CZ.json +++ b/apps/files_encryption/l10n/cs_CZ.json @@ -22,7 +22,7 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Tento soubor se nepodařilo dešifrovat, pravděpodobně je sdílený. Požádejte prosím majitele souboru, aby jej s vámi znovu sdílel.", "Unknown error. Please check your system settings or contact your administrator" : "Neznámá chyba. Zkontrolujte nastavení systému nebo kontaktujte vašeho správce.", "Missing requirements." : "Nesplněné závislosti.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Ujistěte se prosím, že máte nainstalované PHP 5.3.3 nebo novější a že máte povolené a správně nakonfigurované OpenSSL včetně jeho rozšíření pro PHP. Prozatím byla aplikace pro šifrování vypnuta.", + "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Ujistěte se prosím, že máte máte povolené a správně nakonfigurované OpenSSL včetně jeho rozšíření pro PHP. Aplikace pro šifrování byla prozatím vypnuta.", "Following users are not set up for encryption:" : "Následující uživatelé nemají nastavené šifrování:", "Initial encryption started... This can take some time. Please wait." : "Počáteční šifrování zahájeno... Toto může chvíli trvat. Počkejte prosím.", "Initial encryption running... Please try again later." : "Probíhá počáteční šifrování... Zkuste to prosím znovu později.", diff --git a/apps/files_encryption/l10n/da.js b/apps/files_encryption/l10n/da.js index 95e3a115cd7..93c718357c9 100644 --- a/apps/files_encryption/l10n/da.js +++ b/apps/files_encryption/l10n/da.js @@ -24,7 +24,7 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Kan ikke kryptere denne fil, sandsynligvis fordi felen er delt. Bed venligst filens ejer om at dele den med dig på ny.", "Unknown error. Please check your system settings or contact your administrator" : "Ukendt fejl. Venligst tjek dine systemindstillinger eller kontakt din systemadministrator", "Missing requirements." : "Manglende betingelser.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Sørg for at PHP 5.3.3 eller nyere er installeret og at OpenSSL sammen med PHP-udvidelsen er aktiveret og korrekt konfigureret. Indtil videre er krypteringsprogrammet deaktiveret.", + "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Sørg for at OpenSSL, sammen med PHP-udvidelsen, er aktiveret og korrekt konfigureret. Indtil videre er krypteringsprogrammet deaktiveret.", "Following users are not set up for encryption:" : "Følgende brugere er ikke sat op til kryptering:", "Initial encryption started... This can take some time. Please wait." : "Førstegangskrypteringen er påbegyndt... Dette kan tage nogen tid. Vent venligst.", "Initial encryption running... Please try again later." : "Kryptering foretages... Prøv venligst igen senere.", diff --git a/apps/files_encryption/l10n/da.json b/apps/files_encryption/l10n/da.json index 141d6998d47..cd77a31993e 100644 --- a/apps/files_encryption/l10n/da.json +++ b/apps/files_encryption/l10n/da.json @@ -22,7 +22,7 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Kan ikke kryptere denne fil, sandsynligvis fordi felen er delt. Bed venligst filens ejer om at dele den med dig på ny.", "Unknown error. Please check your system settings or contact your administrator" : "Ukendt fejl. Venligst tjek dine systemindstillinger eller kontakt din systemadministrator", "Missing requirements." : "Manglende betingelser.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Sørg for at PHP 5.3.3 eller nyere er installeret og at OpenSSL sammen med PHP-udvidelsen er aktiveret og korrekt konfigureret. Indtil videre er krypteringsprogrammet deaktiveret.", + "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Sørg for at OpenSSL, sammen med PHP-udvidelsen, er aktiveret og korrekt konfigureret. Indtil videre er krypteringsprogrammet deaktiveret.", "Following users are not set up for encryption:" : "Følgende brugere er ikke sat op til kryptering:", "Initial encryption started... This can take some time. Please wait." : "Førstegangskrypteringen er påbegyndt... Dette kan tage nogen tid. Vent venligst.", "Initial encryption running... Please try again later." : "Kryptering foretages... Prøv venligst igen senere.", diff --git a/apps/files_encryption/l10n/de.js b/apps/files_encryption/l10n/de.js index e02b6cd473c..9687e081c76 100644 --- a/apps/files_encryption/l10n/de.js +++ b/apps/files_encryption/l10n/de.js @@ -24,7 +24,7 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Die Datei kann nicht entschlüsselt werden, da die Datei möglicherweise eine geteilte Datei ist. Bitte frage den Dateibesitzer, ob er die Datei nochmals mit Dir teilt.", "Unknown error. Please check your system settings or contact your administrator" : "Unbekannter Fehler. Bitte prüfe Deine Systemeinstellungen oder kontaktiere Deinen Administrator", "Missing requirements." : "Fehlende Vorraussetzungen", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Bitte stelle sicher, dass PHP 5.3.3 oder neuer installiert und das OpenSSL zusammen mit der PHP-Erweiterung aktiviert und richtig konfiguriert ist. Zur Zeit ist die Verschlüsselungs-App deaktiviert.", + "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Bitte stelle sicher, dass OpenSSL zusammen mit der PHP-Erweiterung aktiviert und richtig konfiguriert ist. Die Verschlüsselungsanwendung ist vorerst deaktiviert.", "Following users are not set up for encryption:" : "Für folgende Nutzer ist keine Verschlüsselung eingerichtet:", "Initial encryption started... This can take some time. Please wait." : "Initialverschlüsselung gestartet... Dies kann einige Zeit dauern. Bitte warten.", "Initial encryption running... Please try again later." : "Anfangsverschlüsselung läuft … Bitte versuche es später wieder.", diff --git a/apps/files_encryption/l10n/de.json b/apps/files_encryption/l10n/de.json index c3077fc61a9..5fc3fb822fd 100644 --- a/apps/files_encryption/l10n/de.json +++ b/apps/files_encryption/l10n/de.json @@ -22,7 +22,7 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Die Datei kann nicht entschlüsselt werden, da die Datei möglicherweise eine geteilte Datei ist. Bitte frage den Dateibesitzer, ob er die Datei nochmals mit Dir teilt.", "Unknown error. Please check your system settings or contact your administrator" : "Unbekannter Fehler. Bitte prüfe Deine Systemeinstellungen oder kontaktiere Deinen Administrator", "Missing requirements." : "Fehlende Vorraussetzungen", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Bitte stelle sicher, dass PHP 5.3.3 oder neuer installiert und das OpenSSL zusammen mit der PHP-Erweiterung aktiviert und richtig konfiguriert ist. Zur Zeit ist die Verschlüsselungs-App deaktiviert.", + "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Bitte stelle sicher, dass OpenSSL zusammen mit der PHP-Erweiterung aktiviert und richtig konfiguriert ist. Die Verschlüsselungsanwendung ist vorerst deaktiviert.", "Following users are not set up for encryption:" : "Für folgende Nutzer ist keine Verschlüsselung eingerichtet:", "Initial encryption started... This can take some time. Please wait." : "Initialverschlüsselung gestartet... Dies kann einige Zeit dauern. Bitte warten.", "Initial encryption running... Please try again later." : "Anfangsverschlüsselung läuft … Bitte versuche es später wieder.", diff --git a/apps/files_encryption/l10n/de_DE.js b/apps/files_encryption/l10n/de_DE.js index 84dd13df2a9..01420b52e8d 100644 --- a/apps/files_encryption/l10n/de_DE.js +++ b/apps/files_encryption/l10n/de_DE.js @@ -24,7 +24,7 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Die Datei kann nicht entschlüsselt werden, da die Datei möglicherweise eine geteilte Datei ist. Bitte fragen Sie den Dateibesitzer, dass er die Datei nochmals mit Ihnen teilt.", "Unknown error. Please check your system settings or contact your administrator" : "Unbekannter Fehler. Bitte prüfen Sie die Systemeinstellungen oder kontaktieren Sie Ihren Administrator", "Missing requirements." : "Fehlende Voraussetzungen", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Bitte stellen Sie sicher, dass PHP 5.3.3 oder neuer installiert und das OpenSSL zusammen mit der PHP-Erweiterung aktiviert und richtig konfiguriert ist. Zur Zeit ist die Verschlüsselungs-App deaktiviert.", + "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Bitte stellen Sie sicher, dass OpenSSL zusammen mit der PHP-Erweiterung aktiviert und richtig konfiguriert ist. Die Verschlüsselungsanwendung ist vorerst deaktiviert.", "Following users are not set up for encryption:" : "Für folgende Nutzer ist keine Verschlüsselung eingerichtet:", "Initial encryption started... This can take some time. Please wait." : "Anfangsverschlüsselung gestartet … Dieses kann einige Zeit dauern. Bitte warten.", "Initial encryption running... Please try again later." : "Anfangsverschlüsselung läuft … Bitte versuchen Sie es später wieder.", diff --git a/apps/files_encryption/l10n/de_DE.json b/apps/files_encryption/l10n/de_DE.json index 0e9ee5084c4..9105dc1e4c3 100644 --- a/apps/files_encryption/l10n/de_DE.json +++ b/apps/files_encryption/l10n/de_DE.json @@ -22,7 +22,7 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Die Datei kann nicht entschlüsselt werden, da die Datei möglicherweise eine geteilte Datei ist. Bitte fragen Sie den Dateibesitzer, dass er die Datei nochmals mit Ihnen teilt.", "Unknown error. Please check your system settings or contact your administrator" : "Unbekannter Fehler. Bitte prüfen Sie die Systemeinstellungen oder kontaktieren Sie Ihren Administrator", "Missing requirements." : "Fehlende Voraussetzungen", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Bitte stellen Sie sicher, dass PHP 5.3.3 oder neuer installiert und das OpenSSL zusammen mit der PHP-Erweiterung aktiviert und richtig konfiguriert ist. Zur Zeit ist die Verschlüsselungs-App deaktiviert.", + "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Bitte stellen Sie sicher, dass OpenSSL zusammen mit der PHP-Erweiterung aktiviert und richtig konfiguriert ist. Die Verschlüsselungsanwendung ist vorerst deaktiviert.", "Following users are not set up for encryption:" : "Für folgende Nutzer ist keine Verschlüsselung eingerichtet:", "Initial encryption started... This can take some time. Please wait." : "Anfangsverschlüsselung gestartet … Dieses kann einige Zeit dauern. Bitte warten.", "Initial encryption running... Please try again later." : "Anfangsverschlüsselung läuft … Bitte versuchen Sie es später wieder.", diff --git a/apps/files_encryption/l10n/el.js b/apps/files_encryption/l10n/el.js index 03a94c2a85e..4f29f7adf96 100644 --- a/apps/files_encryption/l10n/el.js +++ b/apps/files_encryption/l10n/el.js @@ -22,7 +22,6 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Δεν ήταν δυνατό να αποκρυπτογραφηθεί αυτό το αρχείο, πιθανόν πρόκειται για κοινόχρηστο αρχείο. Παρακαλώ ζητήστε από τον ιδιοκτήτη του αρχείου να το ξαναμοιραστεί μαζί σας.", "Unknown error. Please check your system settings or contact your administrator" : "Άγνωστο σφάλμα. Παρακαλώ ελέγξτε τις ρυθμίσεις του συστήματό σας ή επικοινωνήστε με τον διαχειριστή συστημάτων σας", "Missing requirements." : "Προαπαιτούμενα που απουσιάζουν.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Παρακαλώ επιβεβαιώστε ότι η PHP 5.3.3 ή νεότερη είναι εγκατεστημένη και ότι το OpenSSL μαζί με το PHP extension είναι ενεργοποιήμένο και έχει ρυθμιστεί σωστά. Προς το παρόν, η εφαρμογή κρυπτογράφησης είναι απενεργοποιημένη.", "Following users are not set up for encryption:" : "Οι κάτωθι χρήστες δεν έχουν ρυθμιστεί για κρυπογράφηση:", "Initial encryption started... This can take some time. Please wait." : "Η αρχική κρυπτογράφηση άρχισε... Αυτό μπορεί να πάρει κάποια ώρα. Παρακαλώ περιμένετε.", "Initial encryption running... Please try again later." : "Εκτέλεση αρχικής κρυπτογράφησης... Παρακαλώ προσπαθήστε αργότερα.", diff --git a/apps/files_encryption/l10n/el.json b/apps/files_encryption/l10n/el.json index 13ed5ab7755..1157966dcef 100644 --- a/apps/files_encryption/l10n/el.json +++ b/apps/files_encryption/l10n/el.json @@ -20,7 +20,6 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Δεν ήταν δυνατό να αποκρυπτογραφηθεί αυτό το αρχείο, πιθανόν πρόκειται για κοινόχρηστο αρχείο. Παρακαλώ ζητήστε από τον ιδιοκτήτη του αρχείου να το ξαναμοιραστεί μαζί σας.", "Unknown error. Please check your system settings or contact your administrator" : "Άγνωστο σφάλμα. Παρακαλώ ελέγξτε τις ρυθμίσεις του συστήματό σας ή επικοινωνήστε με τον διαχειριστή συστημάτων σας", "Missing requirements." : "Προαπαιτούμενα που απουσιάζουν.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Παρακαλώ επιβεβαιώστε ότι η PHP 5.3.3 ή νεότερη είναι εγκατεστημένη και ότι το OpenSSL μαζί με το PHP extension είναι ενεργοποιήμένο και έχει ρυθμιστεί σωστά. Προς το παρόν, η εφαρμογή κρυπτογράφησης είναι απενεργοποιημένη.", "Following users are not set up for encryption:" : "Οι κάτωθι χρήστες δεν έχουν ρυθμιστεί για κρυπογράφηση:", "Initial encryption started... This can take some time. Please wait." : "Η αρχική κρυπτογράφηση άρχισε... Αυτό μπορεί να πάρει κάποια ώρα. Παρακαλώ περιμένετε.", "Initial encryption running... Please try again later." : "Εκτέλεση αρχικής κρυπτογράφησης... Παρακαλώ προσπαθήστε αργότερα.", diff --git a/apps/files_encryption/l10n/en_GB.js b/apps/files_encryption/l10n/en_GB.js index cae7d2c9679..1e5e07d450d 100644 --- a/apps/files_encryption/l10n/en_GB.js +++ b/apps/files_encryption/l10n/en_GB.js @@ -24,7 +24,7 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Cannot decrypt this file, which is probably a shared file. Please ask the file owner to reshare the file with you.", "Unknown error. Please check your system settings or contact your administrator" : "Unknown error. Please check your system settings or contact your administrator", "Missing requirements." : "Missing requirements.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled.", + "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Please make sure that OpenSSL together with the PHP extension is enabled and properly configured. For now, the encryption app has been disabled.", "Following users are not set up for encryption:" : "Following users are not set up for encryption:", "Initial encryption started... This can take some time. Please wait." : "Initial encryption started... This can take some time. Please wait.", "Initial encryption running... Please try again later." : "Initial encryption running... Please try again later.", diff --git a/apps/files_encryption/l10n/en_GB.json b/apps/files_encryption/l10n/en_GB.json index d0b9ece1781..68478b60d68 100644 --- a/apps/files_encryption/l10n/en_GB.json +++ b/apps/files_encryption/l10n/en_GB.json @@ -22,7 +22,7 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Cannot decrypt this file, which is probably a shared file. Please ask the file owner to reshare the file with you.", "Unknown error. Please check your system settings or contact your administrator" : "Unknown error. Please check your system settings or contact your administrator", "Missing requirements." : "Missing requirements.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled.", + "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Please make sure that OpenSSL together with the PHP extension is enabled and properly configured. For now, the encryption app has been disabled.", "Following users are not set up for encryption:" : "Following users are not set up for encryption:", "Initial encryption started... This can take some time. Please wait." : "Initial encryption started... This can take some time. Please wait.", "Initial encryption running... Please try again later." : "Initial encryption running... Please try again later.", diff --git a/apps/files_encryption/l10n/es.js b/apps/files_encryption/l10n/es.js index 28f52666d45..c70ea8e341d 100644 --- a/apps/files_encryption/l10n/es.js +++ b/apps/files_encryption/l10n/es.js @@ -24,7 +24,7 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "No fue posible descifrar este archivo, probablemente se trate de un archivo compartido. Solicite al propietario del mismo que vuelva a compartirlo con usted.", "Unknown error. Please check your system settings or contact your administrator" : "Error desconocido. Revise la configuración de su sistema o contacte a su administrador", "Missing requirements." : "Requisitos incompletos.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Por favor, asegúrese de que PHP 5.3.3 o posterior está instalado y que la extensión OpenSSL de PHP está habilitada y configurada correctamente. Por el momento, la aplicación de cifrado ha sido deshabilitada.", + "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Asegúrese de que OpenSSL y la extensión de PHP estén habilitados y configurados correctamente. Por el momento, la aplicación de cifrado ha sido deshabilitada.", "Following users are not set up for encryption:" : "Los siguientes usuarios no han sido configurados para el cifrado:", "Initial encryption started... This can take some time. Please wait." : "Encriptación iniciada..... Esto puede tomar un tiempo. Por favor espere.", "Initial encryption running... Please try again later." : "Cifrado inicial en curso... Inténtelo más tarde.", diff --git a/apps/files_encryption/l10n/es.json b/apps/files_encryption/l10n/es.json index 8bed1ad1aba..ab62508b000 100644 --- a/apps/files_encryption/l10n/es.json +++ b/apps/files_encryption/l10n/es.json @@ -22,7 +22,7 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "No fue posible descifrar este archivo, probablemente se trate de un archivo compartido. Solicite al propietario del mismo que vuelva a compartirlo con usted.", "Unknown error. Please check your system settings or contact your administrator" : "Error desconocido. Revise la configuración de su sistema o contacte a su administrador", "Missing requirements." : "Requisitos incompletos.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Por favor, asegúrese de que PHP 5.3.3 o posterior está instalado y que la extensión OpenSSL de PHP está habilitada y configurada correctamente. Por el momento, la aplicación de cifrado ha sido deshabilitada.", + "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Asegúrese de que OpenSSL y la extensión de PHP estén habilitados y configurados correctamente. Por el momento, la aplicación de cifrado ha sido deshabilitada.", "Following users are not set up for encryption:" : "Los siguientes usuarios no han sido configurados para el cifrado:", "Initial encryption started... This can take some time. Please wait." : "Encriptación iniciada..... Esto puede tomar un tiempo. Por favor espere.", "Initial encryption running... Please try again later." : "Cifrado inicial en curso... Inténtelo más tarde.", diff --git a/apps/files_encryption/l10n/es_AR.js b/apps/files_encryption/l10n/es_AR.js index bde0e920689..e0da73dae9b 100644 --- a/apps/files_encryption/l10n/es_AR.js +++ b/apps/files_encryption/l10n/es_AR.js @@ -14,7 +14,6 @@ OC.L10N.register( "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "¡Tu llave privada no es válida! Aparenta que tu clave fue cambiada fuera de %s (de tus directorios). Puedes actualizar la contraseña de tu clave privadaen las configuraciones personales para recobrar el acceso a tus archivos encriptados.", "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "No se puede descibrar este archivo, probablemente sea un archivo compartido. Por favor pídele al dueño que recomparta el archivo contigo.", "Missing requirements." : "Requisitos incompletos.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Por favor, asegúrese de que PHP 5.3.3 o una versión más reciente esté instalado y que OpenSSL junto con la extensión PHP esté habilitado y configurado apropiadamente. Por ahora, la aplicación de encriptación ha sido deshabilitada.", "Following users are not set up for encryption:" : "Los siguientes usuarios no fueron configurados para encriptar:", "Initial encryption started... This can take some time. Please wait." : "Encriptación inicial comenzada... Esto puede durar un tiempo. Por favor espere.", "Initial encryption running... Please try again later." : "Encriptación inicial corriendo... Por favor intente mas tarde. ", diff --git a/apps/files_encryption/l10n/es_AR.json b/apps/files_encryption/l10n/es_AR.json index 6251abd7ec6..ac76c994787 100644 --- a/apps/files_encryption/l10n/es_AR.json +++ b/apps/files_encryption/l10n/es_AR.json @@ -12,7 +12,6 @@ "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "¡Tu llave privada no es válida! Aparenta que tu clave fue cambiada fuera de %s (de tus directorios). Puedes actualizar la contraseña de tu clave privadaen las configuraciones personales para recobrar el acceso a tus archivos encriptados.", "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "No se puede descibrar este archivo, probablemente sea un archivo compartido. Por favor pídele al dueño que recomparta el archivo contigo.", "Missing requirements." : "Requisitos incompletos.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Por favor, asegúrese de que PHP 5.3.3 o una versión más reciente esté instalado y que OpenSSL junto con la extensión PHP esté habilitado y configurado apropiadamente. Por ahora, la aplicación de encriptación ha sido deshabilitada.", "Following users are not set up for encryption:" : "Los siguientes usuarios no fueron configurados para encriptar:", "Initial encryption started... This can take some time. Please wait." : "Encriptación inicial comenzada... Esto puede durar un tiempo. Por favor espere.", "Initial encryption running... Please try again later." : "Encriptación inicial corriendo... Por favor intente mas tarde. ", diff --git a/apps/files_encryption/l10n/es_MX.js b/apps/files_encryption/l10n/es_MX.js index 99a633c6e43..e445cd03b05 100644 --- a/apps/files_encryption/l10n/es_MX.js +++ b/apps/files_encryption/l10n/es_MX.js @@ -14,7 +14,6 @@ OC.L10N.register( "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "¡Su clave privada no es válida! Tal vez su contraseña ha sido cambiada desde fuera. de %s (Ej:Su directorio corporativo). Puede actualizar la contraseña de su clave privada en sus opciones personales para recuperar el acceso a sus archivos.", "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "No fue posible descifrar este archivo, probablemente se trate de un archivo compartido. Solicite al propietario del mismo que vuelva a compartirlo con usted.", "Missing requirements." : "Requisitos incompletos.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Por favor, asegúrese de que PHP 5.3.3 o posterior está instalado y que la extensión OpenSSL de PHP está habilitada y configurada correctamente. Por el momento, la aplicación de cifrado ha sido deshabilitada.", "Following users are not set up for encryption:" : "Los siguientes usuarios no han sido configurados para el cifrado:", "Initial encryption started... This can take some time. Please wait." : "Encriptación iniciada... Esto puede tomar un tiempo. Por favor espere.", "Encryption" : "Cifrado", diff --git a/apps/files_encryption/l10n/es_MX.json b/apps/files_encryption/l10n/es_MX.json index fe257ee670a..3ca4e51a139 100644 --- a/apps/files_encryption/l10n/es_MX.json +++ b/apps/files_encryption/l10n/es_MX.json @@ -12,7 +12,6 @@ "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "¡Su clave privada no es válida! Tal vez su contraseña ha sido cambiada desde fuera. de %s (Ej:Su directorio corporativo). Puede actualizar la contraseña de su clave privada en sus opciones personales para recuperar el acceso a sus archivos.", "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "No fue posible descifrar este archivo, probablemente se trate de un archivo compartido. Solicite al propietario del mismo que vuelva a compartirlo con usted.", "Missing requirements." : "Requisitos incompletos.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Por favor, asegúrese de que PHP 5.3.3 o posterior está instalado y que la extensión OpenSSL de PHP está habilitada y configurada correctamente. Por el momento, la aplicación de cifrado ha sido deshabilitada.", "Following users are not set up for encryption:" : "Los siguientes usuarios no han sido configurados para el cifrado:", "Initial encryption started... This can take some time. Please wait." : "Encriptación iniciada... Esto puede tomar un tiempo. Por favor espere.", "Encryption" : "Cifrado", diff --git a/apps/files_encryption/l10n/et_EE.js b/apps/files_encryption/l10n/et_EE.js index 93fa8084ff9..57297e8b9a3 100644 --- a/apps/files_encryption/l10n/et_EE.js +++ b/apps/files_encryption/l10n/et_EE.js @@ -24,7 +24,6 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Sa ei saa seda faili dekrüpteerida, see on tõenäoliselt jagatud fail. Palun lase omanikul seda faili sinuga uuesti jagada.", "Unknown error. Please check your system settings or contact your administrator" : "Tundmatu viga. Palun võta ühendust oma administraatoriga.", "Missing requirements." : "Nõutavad on puudu.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Palun veendu, et on paigaldatud PHP 5.3.3 või uuem ning PHP OpenSSL laiendus on lubatud ning seadistatud korrektselt. Hetkel krüpteerimise rakendus on peatatud.", "Following users are not set up for encryption:" : "Järgmised kasutajad pole seadistatud krüpteeringuks:", "Initial encryption started... This can take some time. Please wait." : "Algne krüpteerimine käivitati... See võib võtta natuke aega. Palun oota.", "Initial encryption running... Please try again later." : "Toimub esmane krüpteerimine... Palun proovi hiljem uuesti.", diff --git a/apps/files_encryption/l10n/et_EE.json b/apps/files_encryption/l10n/et_EE.json index 873bc8945d7..364eb02ef4f 100644 --- a/apps/files_encryption/l10n/et_EE.json +++ b/apps/files_encryption/l10n/et_EE.json @@ -22,7 +22,6 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Sa ei saa seda faili dekrüpteerida, see on tõenäoliselt jagatud fail. Palun lase omanikul seda faili sinuga uuesti jagada.", "Unknown error. Please check your system settings or contact your administrator" : "Tundmatu viga. Palun võta ühendust oma administraatoriga.", "Missing requirements." : "Nõutavad on puudu.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Palun veendu, et on paigaldatud PHP 5.3.3 või uuem ning PHP OpenSSL laiendus on lubatud ning seadistatud korrektselt. Hetkel krüpteerimise rakendus on peatatud.", "Following users are not set up for encryption:" : "Järgmised kasutajad pole seadistatud krüpteeringuks:", "Initial encryption started... This can take some time. Please wait." : "Algne krüpteerimine käivitati... See võib võtta natuke aega. Palun oota.", "Initial encryption running... Please try again later." : "Toimub esmane krüpteerimine... Palun proovi hiljem uuesti.", diff --git a/apps/files_encryption/l10n/eu.js b/apps/files_encryption/l10n/eu.js index d5c23d016f0..65242e2da90 100644 --- a/apps/files_encryption/l10n/eu.js +++ b/apps/files_encryption/l10n/eu.js @@ -21,7 +21,6 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Ezin izan da fitxategi hau deszifratu, ziurrenik elkarbanatutako fitxategi bat da. Mesdez, eskatu fitxategiaren jabeari fitxategia zurekin berriz elkarbana dezan.", "Unknown error. Please check your system settings or contact your administrator" : "Errore ezezaguna. Mesedez, egiaztatu zure sistemaren ezarpenak edo jarri zure administrariarekin kontaktuan.", "Missing requirements." : "Eskakizun batzuk ez dira betetzen.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Mesedez ziurtatu PHP 5.3.3 edo berriago bat instalatuta dagoela eta OpenSSL PHP hedapenarekin gaitua eta ongi konfiguratuta dagoela. Oraingoz, enkriptazio aplikazioa desgaituta dago.", "Following users are not set up for encryption:" : "Hurrengo erabiltzaileak ez daude enktriptatzeko konfiguratutak:", "Initial encryption started... This can take some time. Please wait." : "Hasierako enkriptazioa hasi da... Honek denbora har dezake. Mesedez itxaron.", "Initial encryption running... Please try again later." : "Hasierako enkriptaketa abian... mesedez, saiatu beranduago.", diff --git a/apps/files_encryption/l10n/eu.json b/apps/files_encryption/l10n/eu.json index 3b932fd769e..961ffe3270a 100644 --- a/apps/files_encryption/l10n/eu.json +++ b/apps/files_encryption/l10n/eu.json @@ -19,7 +19,6 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Ezin izan da fitxategi hau deszifratu, ziurrenik elkarbanatutako fitxategi bat da. Mesdez, eskatu fitxategiaren jabeari fitxategia zurekin berriz elkarbana dezan.", "Unknown error. Please check your system settings or contact your administrator" : "Errore ezezaguna. Mesedez, egiaztatu zure sistemaren ezarpenak edo jarri zure administrariarekin kontaktuan.", "Missing requirements." : "Eskakizun batzuk ez dira betetzen.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Mesedez ziurtatu PHP 5.3.3 edo berriago bat instalatuta dagoela eta OpenSSL PHP hedapenarekin gaitua eta ongi konfiguratuta dagoela. Oraingoz, enkriptazio aplikazioa desgaituta dago.", "Following users are not set up for encryption:" : "Hurrengo erabiltzaileak ez daude enktriptatzeko konfiguratutak:", "Initial encryption started... This can take some time. Please wait." : "Hasierako enkriptazioa hasi da... Honek denbora har dezake. Mesedez itxaron.", "Initial encryption running... Please try again later." : "Hasierako enkriptaketa abian... mesedez, saiatu beranduago.", diff --git a/apps/files_encryption/l10n/fr.js b/apps/files_encryption/l10n/fr.js index b5bcaff19c2..34d5f7a13f2 100644 --- a/apps/files_encryption/l10n/fr.js +++ b/apps/files_encryption/l10n/fr.js @@ -24,7 +24,7 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Impossible de déchiffrer ce fichier, il s'agit probablement d'un fichier partagé. Veuillez demander au propriétaire de ce fichier de le repartager avec vous.", "Unknown error. Please check your system settings or contact your administrator" : "Erreur inconnue. Veuillez vérifier vos paramètres système ou contacter un administrateur.", "Missing requirements." : "Système minimum requis non respecté.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Veuillez vous assurer qu'une version de PHP 5.3.3 ou supérieure est installée et qu'OpenSSL et son extension PHP sont activés et configurés correctement. En attendant, l'application de chiffrement été désactivée.", + "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Merci de vous assurer que OpenSSL et son extension PHP sont activés et configurés correctement. Pour l'instant, l'application de chiffrement a été désactivée.", "Following users are not set up for encryption:" : "Les utilisateurs suivants ne sont pas configurés pour le chiffrement :", "Initial encryption started... This can take some time. Please wait." : "Chiffrement initial démarré... Cela peut prendre un certain temps. Veuillez patienter.", "Initial encryption running... Please try again later." : "Chiffrement initial en cours... Veuillez re-essayer ultérieurement.", diff --git a/apps/files_encryption/l10n/fr.json b/apps/files_encryption/l10n/fr.json index 24de660bb3c..998947b8053 100644 --- a/apps/files_encryption/l10n/fr.json +++ b/apps/files_encryption/l10n/fr.json @@ -22,7 +22,7 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Impossible de déchiffrer ce fichier, il s'agit probablement d'un fichier partagé. Veuillez demander au propriétaire de ce fichier de le repartager avec vous.", "Unknown error. Please check your system settings or contact your administrator" : "Erreur inconnue. Veuillez vérifier vos paramètres système ou contacter un administrateur.", "Missing requirements." : "Système minimum requis non respecté.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Veuillez vous assurer qu'une version de PHP 5.3.3 ou supérieure est installée et qu'OpenSSL et son extension PHP sont activés et configurés correctement. En attendant, l'application de chiffrement été désactivée.", + "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Merci de vous assurer que OpenSSL et son extension PHP sont activés et configurés correctement. Pour l'instant, l'application de chiffrement a été désactivée.", "Following users are not set up for encryption:" : "Les utilisateurs suivants ne sont pas configurés pour le chiffrement :", "Initial encryption started... This can take some time. Please wait." : "Chiffrement initial démarré... Cela peut prendre un certain temps. Veuillez patienter.", "Initial encryption running... Please try again later." : "Chiffrement initial en cours... Veuillez re-essayer ultérieurement.", diff --git a/apps/files_encryption/l10n/gl.js b/apps/files_encryption/l10n/gl.js index d32e9f600fb..d85841118a6 100644 --- a/apps/files_encryption/l10n/gl.js +++ b/apps/files_encryption/l10n/gl.js @@ -3,16 +3,19 @@ OC.L10N.register( { "Unknown error" : "Produciuse un erro descoñecido", "Missing recovery key password" : "Falta a chave de recuperación", - "Please repeat the recovery key password" : "Por favor repita a chave de recuperación", - "Repeated recovery key password does not match the provided recovery key password" : "A repetición da chave de recuperación non coincide coa chave de recuperación establecida", + "Please repeat the recovery key password" : "Repita a chave de recuperación", + "Repeated recovery key password does not match the provided recovery key password" : "A repetición da chave de recuperación non coincide coa chave de recuperación estabelecida", "Recovery key successfully enabled" : "Activada satisfactoriamente a chave de recuperación", "Could not disable recovery key. Please check your recovery key password!" : "Non foi posíbel desactivar a chave de recuperación. Comprobe o contrasinal da chave de recuperación!", "Recovery key successfully disabled" : "Desactivada satisfactoriamente a chave de recuperación", - "Please provide the old recovery password" : "Por favor introduza a chave de recuperación anterior", - "Please provide a new recovery password" : "Por favor introduza a nova chave de recuperación", + "Please provide the old recovery password" : "Introduza a chave de recuperación antiga", + "Please provide a new recovery password" : "Introduza a nova chave de recuperación", "Please repeat the new recovery password" : "Por favor repita a nova chave de recuperación", "Password successfully changed." : "O contrasinal foi cambiado satisfactoriamente", "Could not change the password. Maybe the old password was not correct." : "Non foi posíbel cambiar o contrasinal. Probabelmente o contrasinal antigo non é o correcto.", + "Could not update the private key password." : "Non foi posíbel actualizar o contrasinal da chave privada.", + "The old password was not correct, please try again." : "O contrasinal antigo non é correcto, ténteo de novo.", + "The current log-in password was not correct, please try again." : "O actual contrasinal de acceso non é correcto, ténteo de novo.", "Private key password successfully updated." : "A chave privada foi actualizada correctamente.", "File recovery settings updated" : "Actualizouse o ficheiro de axustes de recuperación", "Could not update file recovery" : "Non foi posíbel actualizar o ficheiro de recuperación", @@ -21,7 +24,6 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Non foi posíbel descifrar o ficheiro, probabelmente tratase dun ficheiro compartido. Pídalle ao propietario do ficheiro que volva compartir o ficheiro con vostede.", "Unknown error. Please check your system settings or contact your administrator" : "Produciuse un erro descoñecido. Comprobe os axustes do sistema ou contacte co administrador", "Missing requirements." : "Non se cumpren os requisitos.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Asegúrese de que está instalado o PHP 5.3.3 ou posterior e de que o OpenSSL xunto coa extensión PHP estean activados e configurados correctamente. Polo de agora foi desactivada a aplicación de cifrado.", "Following users are not set up for encryption:" : "Os seguintes usuarios non teñen configuración para o cifrado:", "Initial encryption started... This can take some time. Please wait." : "Comezou o cifrado inicial... Isto pode levar bastante tempo. Agarde.", "Initial encryption running... Please try again later." : "O cifrado inicial está en execución... Tenteo máis tarde.", diff --git a/apps/files_encryption/l10n/gl.json b/apps/files_encryption/l10n/gl.json index 8ffcafe8e88..cb8f65d575f 100644 --- a/apps/files_encryption/l10n/gl.json +++ b/apps/files_encryption/l10n/gl.json @@ -1,16 +1,19 @@ { "translations": { "Unknown error" : "Produciuse un erro descoñecido", "Missing recovery key password" : "Falta a chave de recuperación", - "Please repeat the recovery key password" : "Por favor repita a chave de recuperación", - "Repeated recovery key password does not match the provided recovery key password" : "A repetición da chave de recuperación non coincide coa chave de recuperación establecida", + "Please repeat the recovery key password" : "Repita a chave de recuperación", + "Repeated recovery key password does not match the provided recovery key password" : "A repetición da chave de recuperación non coincide coa chave de recuperación estabelecida", "Recovery key successfully enabled" : "Activada satisfactoriamente a chave de recuperación", "Could not disable recovery key. Please check your recovery key password!" : "Non foi posíbel desactivar a chave de recuperación. Comprobe o contrasinal da chave de recuperación!", "Recovery key successfully disabled" : "Desactivada satisfactoriamente a chave de recuperación", - "Please provide the old recovery password" : "Por favor introduza a chave de recuperación anterior", - "Please provide a new recovery password" : "Por favor introduza a nova chave de recuperación", + "Please provide the old recovery password" : "Introduza a chave de recuperación antiga", + "Please provide a new recovery password" : "Introduza a nova chave de recuperación", "Please repeat the new recovery password" : "Por favor repita a nova chave de recuperación", "Password successfully changed." : "O contrasinal foi cambiado satisfactoriamente", "Could not change the password. Maybe the old password was not correct." : "Non foi posíbel cambiar o contrasinal. Probabelmente o contrasinal antigo non é o correcto.", + "Could not update the private key password." : "Non foi posíbel actualizar o contrasinal da chave privada.", + "The old password was not correct, please try again." : "O contrasinal antigo non é correcto, ténteo de novo.", + "The current log-in password was not correct, please try again." : "O actual contrasinal de acceso non é correcto, ténteo de novo.", "Private key password successfully updated." : "A chave privada foi actualizada correctamente.", "File recovery settings updated" : "Actualizouse o ficheiro de axustes de recuperación", "Could not update file recovery" : "Non foi posíbel actualizar o ficheiro de recuperación", @@ -19,7 +22,6 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Non foi posíbel descifrar o ficheiro, probabelmente tratase dun ficheiro compartido. Pídalle ao propietario do ficheiro que volva compartir o ficheiro con vostede.", "Unknown error. Please check your system settings or contact your administrator" : "Produciuse un erro descoñecido. Comprobe os axustes do sistema ou contacte co administrador", "Missing requirements." : "Non se cumpren os requisitos.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Asegúrese de que está instalado o PHP 5.3.3 ou posterior e de que o OpenSSL xunto coa extensión PHP estean activados e configurados correctamente. Polo de agora foi desactivada a aplicación de cifrado.", "Following users are not set up for encryption:" : "Os seguintes usuarios non teñen configuración para o cifrado:", "Initial encryption started... This can take some time. Please wait." : "Comezou o cifrado inicial... Isto pode levar bastante tempo. Agarde.", "Initial encryption running... Please try again later." : "O cifrado inicial está en execución... Tenteo máis tarde.", diff --git a/apps/files_encryption/l10n/hr.js b/apps/files_encryption/l10n/hr.js index f20ce757c05..0474a024642 100644 --- a/apps/files_encryption/l10n/hr.js +++ b/apps/files_encryption/l10n/hr.js @@ -15,7 +15,6 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Ovu datoteku nije moguće dešifrirati, vjerojatno je riječ o zajedničkoj datoteci. Molimopitajte vlasnika datoteke da je ponovo podijeli s vama.", "Unknown error. Please check your system settings or contact your administrator" : "Pogreška nepoznata. Molimo provjerite svoje sistemske postavke ili kontaktirajte svog administratora.", "Missing requirements." : "Nedostaju preduvjeti.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Molimo osigurajte da je instaliran PHP 5.3.3 ili noviji i da je OpenSSL zajedno s PHP ekstenzijom propisno aktivirani konfiguriran. Za sada, aplikacija šifriranja je deaktivirana.", "Following users are not set up for encryption:" : "Sljedeći korisnici nisu određeni za šifriranje:", "Initial encryption started... This can take some time. Please wait." : "Počelo inicijalno šifriranje... To može potrajati neko vrijeme. Molimo, pričekajte.", "Initial encryption running... Please try again later." : "Inicijalno šifriranje u tijeku... Molimo, pokušajte ponovno kasnije.", diff --git a/apps/files_encryption/l10n/hr.json b/apps/files_encryption/l10n/hr.json index 04e664336d3..7c2af923fbd 100644 --- a/apps/files_encryption/l10n/hr.json +++ b/apps/files_encryption/l10n/hr.json @@ -13,7 +13,6 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Ovu datoteku nije moguće dešifrirati, vjerojatno je riječ o zajedničkoj datoteci. Molimopitajte vlasnika datoteke da je ponovo podijeli s vama.", "Unknown error. Please check your system settings or contact your administrator" : "Pogreška nepoznata. Molimo provjerite svoje sistemske postavke ili kontaktirajte svog administratora.", "Missing requirements." : "Nedostaju preduvjeti.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Molimo osigurajte da je instaliran PHP 5.3.3 ili noviji i da je OpenSSL zajedno s PHP ekstenzijom propisno aktivirani konfiguriran. Za sada, aplikacija šifriranja je deaktivirana.", "Following users are not set up for encryption:" : "Sljedeći korisnici nisu određeni za šifriranje:", "Initial encryption started... This can take some time. Please wait." : "Počelo inicijalno šifriranje... To može potrajati neko vrijeme. Molimo, pričekajte.", "Initial encryption running... Please try again later." : "Inicijalno šifriranje u tijeku... Molimo, pokušajte ponovno kasnije.", diff --git a/apps/files_encryption/l10n/hu_HU.js b/apps/files_encryption/l10n/hu_HU.js index f30194e0578..92538d1ce56 100644 --- a/apps/files_encryption/l10n/hu_HU.js +++ b/apps/files_encryption/l10n/hu_HU.js @@ -14,7 +14,6 @@ OC.L10N.register( "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Az állományok titkosításához használt titkos kulcsa érvénytelen. Valószínűleg a %s rendszeren kívül változtatta meg a jelszavát (pl. a munkahelyi címtárban). A személyes beállításoknál frissítheti a titkos kulcsát, hogy ismét elérhesse a titkosított állományait.", "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Az állományt nem sikerült dekódolni, valószínűleg ez egy megosztott fájl. Kérje meg az állomány tulajdonosát, hogy újra ossza meg Önnel ezt az állományt!", "Missing requirements." : "Hiányzó követelmények.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Kérem gondoskodjon arról, hogy PHP 5.3.3 vagy annál frissebb legyen telepítve, továbbá az OpenSSL a megfelelő PHP-bővítménnyel együtt rendelkezésre álljon és helyesen legyen konfigurálva! A titkosító modul egyelőre kikapcsolásra került.", "Following users are not set up for encryption:" : "A következő felhasználók nem állították be a titkosítást:", "Initial encryption started... This can take some time. Please wait." : "A titkosítási folyamat megkezdődött... Ez hosszabb ideig is eltarthat. Kérem várjon.", "Initial encryption running... Please try again later." : "Kezedeti titkosítás fut... Próbálja később.", diff --git a/apps/files_encryption/l10n/hu_HU.json b/apps/files_encryption/l10n/hu_HU.json index 510bf199284..023cb51fc5a 100644 --- a/apps/files_encryption/l10n/hu_HU.json +++ b/apps/files_encryption/l10n/hu_HU.json @@ -12,7 +12,6 @@ "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Az állományok titkosításához használt titkos kulcsa érvénytelen. Valószínűleg a %s rendszeren kívül változtatta meg a jelszavát (pl. a munkahelyi címtárban). A személyes beállításoknál frissítheti a titkos kulcsát, hogy ismét elérhesse a titkosított állományait.", "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Az állományt nem sikerült dekódolni, valószínűleg ez egy megosztott fájl. Kérje meg az állomány tulajdonosát, hogy újra ossza meg Önnel ezt az állományt!", "Missing requirements." : "Hiányzó követelmények.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Kérem gondoskodjon arról, hogy PHP 5.3.3 vagy annál frissebb legyen telepítve, továbbá az OpenSSL a megfelelő PHP-bővítménnyel együtt rendelkezésre álljon és helyesen legyen konfigurálva! A titkosító modul egyelőre kikapcsolásra került.", "Following users are not set up for encryption:" : "A következő felhasználók nem állították be a titkosítást:", "Initial encryption started... This can take some time. Please wait." : "A titkosítási folyamat megkezdődött... Ez hosszabb ideig is eltarthat. Kérem várjon.", "Initial encryption running... Please try again later." : "Kezedeti titkosítás fut... Próbálja később.", diff --git a/apps/files_encryption/l10n/id.js b/apps/files_encryption/l10n/id.js index 805d7878436..6c621bddd04 100644 --- a/apps/files_encryption/l10n/id.js +++ b/apps/files_encryption/l10n/id.js @@ -21,7 +21,6 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Tidak dapat mendekripsi berkas ini, mungkin ini adalah berkas bersama. Silakan meminta pemilik berkas ini untuk membagikan kembali dengan Anda.", "Unknown error. Please check your system settings or contact your administrator" : "Kesalahan tidak diketahui. Silakan periksa pengaturan sistem Anda atau hubungi administrator", "Missing requirements." : "Persyaratan tidak terpenuhi.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Pastikan bahwa PHP 5.3.3 atau yang lebih baru telah diinstal dan OpenSSL bersama ekstensi PHP telah diaktifkan dan dikonfigurasi dengan benar. Untuk saat ini, aplikasi enkripsi akan dinonaktifkan.", "Following users are not set up for encryption:" : "Pengguna berikut belum diatur untuk enkripsi:", "Initial encryption started... This can take some time. Please wait." : "Enskripsi awal dijalankan... Ini dapat memakan waktu. Silakan tunggu.", "Initial encryption running... Please try again later." : "Enkripsi awal sedang berjalan... Sialakn coba lagi nanti.", diff --git a/apps/files_encryption/l10n/id.json b/apps/files_encryption/l10n/id.json index 826ebdba373..090e56c76b2 100644 --- a/apps/files_encryption/l10n/id.json +++ b/apps/files_encryption/l10n/id.json @@ -19,7 +19,6 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Tidak dapat mendekripsi berkas ini, mungkin ini adalah berkas bersama. Silakan meminta pemilik berkas ini untuk membagikan kembali dengan Anda.", "Unknown error. Please check your system settings or contact your administrator" : "Kesalahan tidak diketahui. Silakan periksa pengaturan sistem Anda atau hubungi administrator", "Missing requirements." : "Persyaratan tidak terpenuhi.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Pastikan bahwa PHP 5.3.3 atau yang lebih baru telah diinstal dan OpenSSL bersama ekstensi PHP telah diaktifkan dan dikonfigurasi dengan benar. Untuk saat ini, aplikasi enkripsi akan dinonaktifkan.", "Following users are not set up for encryption:" : "Pengguna berikut belum diatur untuk enkripsi:", "Initial encryption started... This can take some time. Please wait." : "Enskripsi awal dijalankan... Ini dapat memakan waktu. Silakan tunggu.", "Initial encryption running... Please try again later." : "Enkripsi awal sedang berjalan... Sialakn coba lagi nanti.", diff --git a/apps/files_encryption/l10n/it.js b/apps/files_encryption/l10n/it.js index d253dae8f68..08167b8ea7c 100644 --- a/apps/files_encryption/l10n/it.js +++ b/apps/files_encryption/l10n/it.js @@ -24,7 +24,7 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Impossibile decifrare questo file, probabilmente è un file condiviso. Chiedi al proprietario del file di condividere nuovamente il file con te.", "Unknown error. Please check your system settings or contact your administrator" : "Errore sconosciuto. Controlla le impostazioni di sistema o contatta il tuo amministratore", "Missing requirements." : "Requisiti mancanti.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Assicurati che sia installato PHP 5.3.3 o versioni successive e che l'estensione OpenSSL di PHP sia abilitata e configurata correttamente. Per ora, l'applicazione di cifratura è disabilitata.", + "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Assicurati che OpenSSL e l'estensione PHP sia abilitatati e configurati correttamente. Per ora, l'applicazione di cifratura è disabilitata.", "Following users are not set up for encryption:" : "I seguenti utenti non sono configurati per la cifratura:", "Initial encryption started... This can take some time. Please wait." : "Cifratura iniziale avviata... Potrebbe richiedere del tempo. Attendi.", "Initial encryption running... Please try again later." : "Cifratura iniziale in esecuzione... Riprova più tardi.", diff --git a/apps/files_encryption/l10n/it.json b/apps/files_encryption/l10n/it.json index d5257715faa..15d2b1b0343 100644 --- a/apps/files_encryption/l10n/it.json +++ b/apps/files_encryption/l10n/it.json @@ -22,7 +22,7 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Impossibile decifrare questo file, probabilmente è un file condiviso. Chiedi al proprietario del file di condividere nuovamente il file con te.", "Unknown error. Please check your system settings or contact your administrator" : "Errore sconosciuto. Controlla le impostazioni di sistema o contatta il tuo amministratore", "Missing requirements." : "Requisiti mancanti.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Assicurati che sia installato PHP 5.3.3 o versioni successive e che l'estensione OpenSSL di PHP sia abilitata e configurata correttamente. Per ora, l'applicazione di cifratura è disabilitata.", + "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Assicurati che OpenSSL e l'estensione PHP sia abilitatati e configurati correttamente. Per ora, l'applicazione di cifratura è disabilitata.", "Following users are not set up for encryption:" : "I seguenti utenti non sono configurati per la cifratura:", "Initial encryption started... This can take some time. Please wait." : "Cifratura iniziale avviata... Potrebbe richiedere del tempo. Attendi.", "Initial encryption running... Please try again later." : "Cifratura iniziale in esecuzione... Riprova più tardi.", diff --git a/apps/files_encryption/l10n/ja.js b/apps/files_encryption/l10n/ja.js index a21870de7c2..765d1193de4 100644 --- a/apps/files_encryption/l10n/ja.js +++ b/apps/files_encryption/l10n/ja.js @@ -24,7 +24,6 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "このファイルを復号化できません、共有ファイルの可能性があります。ファイルの所有者にお願いして、ファイルを共有しなおしてもらってください。", "Unknown error. Please check your system settings or contact your administrator" : "不明なエラーです。システム設定を確認するか、管理者に問い合わせてください。", "Missing requirements." : "必要要件が満たされていません。", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "必ず、PHP 5.3.3もしくはそれ以上をインストールし、同時にOpenSSLのPHP拡張を有効にした上でOpenSSLも同様にインストール、適切に設定してください。現時点では暗号化アプリは無効になっています。", "Following users are not set up for encryption:" : "以下のユーザーは、暗号化設定がされていません:", "Initial encryption started... This can take some time. Please wait." : "暗号化の初期化作業を開始しました... この処理にはしばらく時間がかかります。お待ちください。", "Initial encryption running... Please try again later." : "初期暗号化実行中... 後でもう一度お試しください。", diff --git a/apps/files_encryption/l10n/ja.json b/apps/files_encryption/l10n/ja.json index d689ca954d0..1bfa3c4b650 100644 --- a/apps/files_encryption/l10n/ja.json +++ b/apps/files_encryption/l10n/ja.json @@ -22,7 +22,6 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "このファイルを復号化できません、共有ファイルの可能性があります。ファイルの所有者にお願いして、ファイルを共有しなおしてもらってください。", "Unknown error. Please check your system settings or contact your administrator" : "不明なエラーです。システム設定を確認するか、管理者に問い合わせてください。", "Missing requirements." : "必要要件が満たされていません。", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "必ず、PHP 5.3.3もしくはそれ以上をインストールし、同時にOpenSSLのPHP拡張を有効にした上でOpenSSLも同様にインストール、適切に設定してください。現時点では暗号化アプリは無効になっています。", "Following users are not set up for encryption:" : "以下のユーザーは、暗号化設定がされていません:", "Initial encryption started... This can take some time. Please wait." : "暗号化の初期化作業を開始しました... この処理にはしばらく時間がかかります。お待ちください。", "Initial encryption running... Please try again later." : "初期暗号化実行中... 後でもう一度お試しください。", diff --git a/apps/files_encryption/l10n/ko.js b/apps/files_encryption/l10n/ko.js index 223fe99f990..82c29ecb11a 100644 --- a/apps/files_encryption/l10n/ko.js +++ b/apps/files_encryption/l10n/ko.js @@ -14,7 +14,6 @@ OC.L10N.register( "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "개인 키가 올바르지 않습니다! 암호가 %s(예: 회사 디렉터리) 외부에서 변경된 것 같습니다. 암호화된 파일에 다시 접근하려면 개인 설정에서 개인 키 암호를 수정하십시오.", "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "이 파일을 복호화할 수 없습니다. 공유된 파일일 수도 있습니다. 파일 소유자에게 공유를 다시 요청하십시오.", "Missing requirements." : "요구 사항이 부족합니다.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "PHP 5.3.3 이상 설치 여부, PHP의 OpenSSL 확장 기능 활성화 및 설정 여부를 확인하십시오. 암호화 앱이 비활성화 되었습니다.", "Following users are not set up for encryption:" : "다음 사용자는 암호화를 사용할 수 없습니다:", "Initial encryption started... This can take some time. Please wait." : "초기 암호화가 시작되었습니다... 시간이 걸릴 수도 있으니 기다려 주십시오.", "Encryption" : "암호화", diff --git a/apps/files_encryption/l10n/ko.json b/apps/files_encryption/l10n/ko.json index bb5ff7df70c..e1b53e0983e 100644 --- a/apps/files_encryption/l10n/ko.json +++ b/apps/files_encryption/l10n/ko.json @@ -12,7 +12,6 @@ "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "개인 키가 올바르지 않습니다! 암호가 %s(예: 회사 디렉터리) 외부에서 변경된 것 같습니다. 암호화된 파일에 다시 접근하려면 개인 설정에서 개인 키 암호를 수정하십시오.", "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "이 파일을 복호화할 수 없습니다. 공유된 파일일 수도 있습니다. 파일 소유자에게 공유를 다시 요청하십시오.", "Missing requirements." : "요구 사항이 부족합니다.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "PHP 5.3.3 이상 설치 여부, PHP의 OpenSSL 확장 기능 활성화 및 설정 여부를 확인하십시오. 암호화 앱이 비활성화 되었습니다.", "Following users are not set up for encryption:" : "다음 사용자는 암호화를 사용할 수 없습니다:", "Initial encryption started... This can take some time. Please wait." : "초기 암호화가 시작되었습니다... 시간이 걸릴 수도 있으니 기다려 주십시오.", "Encryption" : "암호화", diff --git a/apps/files_encryption/l10n/lt_LT.js b/apps/files_encryption/l10n/lt_LT.js index afcc478e34c..98541b865fe 100644 --- a/apps/files_encryption/l10n/lt_LT.js +++ b/apps/files_encryption/l10n/lt_LT.js @@ -14,7 +14,6 @@ OC.L10N.register( "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Jūsų privatus raktas yra netinkamas! Panašu, kad Jūsų slaptažodis buvo pakeistas už %s (pvz. Jūsų organizacijos kataloge). Galite atnaujinti savo privataus rakto slaptažodį savo asmeniniuose nustatymuose, kad atkurti prieigą prie savo šifruotų failų.", "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Failo iššifruoti nepavyko, gali būti jog jis yra pasidalintas su jumis. Paprašykite failo savininko, kad jums iš naujo pateiktų šį failą.", "Missing requirements." : "Trūkstami laukai.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Prašome įsitikinti, kad PHP 5.3.3 ar naujesnė yra įdiegta ir kad OpenSSL kartu su PHP plėtiniu yra šjungti ir teisingai sukonfigūruoti. Kol kas šifravimo programa bus išjungta.", "Following users are not set up for encryption:" : "Sekantys naudotojai nenustatyti šifravimui:", "Initial encryption started... This can take some time. Please wait." : "Pradėtas pirminis šifravimas... Tai gali užtrukti. Prašome palaukti.", "Encryption" : "Šifravimas", diff --git a/apps/files_encryption/l10n/lt_LT.json b/apps/files_encryption/l10n/lt_LT.json index c2ffc891638..e0e486d020b 100644 --- a/apps/files_encryption/l10n/lt_LT.json +++ b/apps/files_encryption/l10n/lt_LT.json @@ -12,7 +12,6 @@ "Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." : "Jūsų privatus raktas yra netinkamas! Panašu, kad Jūsų slaptažodis buvo pakeistas už %s (pvz. Jūsų organizacijos kataloge). Galite atnaujinti savo privataus rakto slaptažodį savo asmeniniuose nustatymuose, kad atkurti prieigą prie savo šifruotų failų.", "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Failo iššifruoti nepavyko, gali būti jog jis yra pasidalintas su jumis. Paprašykite failo savininko, kad jums iš naujo pateiktų šį failą.", "Missing requirements." : "Trūkstami laukai.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Prašome įsitikinti, kad PHP 5.3.3 ar naujesnė yra įdiegta ir kad OpenSSL kartu su PHP plėtiniu yra šjungti ir teisingai sukonfigūruoti. Kol kas šifravimo programa bus išjungta.", "Following users are not set up for encryption:" : "Sekantys naudotojai nenustatyti šifravimui:", "Initial encryption started... This can take some time. Please wait." : "Pradėtas pirminis šifravimas... Tai gali užtrukti. Prašome palaukti.", "Encryption" : "Šifravimas", diff --git a/apps/files_encryption/l10n/nb_NO.js b/apps/files_encryption/l10n/nb_NO.js index f690a78e5f8..10c96516b1c 100644 --- a/apps/files_encryption/l10n/nb_NO.js +++ b/apps/files_encryption/l10n/nb_NO.js @@ -15,7 +15,6 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Kan ikke dekryptere denne filen. Dette er sannsynligvis en delt fil. Spør eieren av filen om å dele den med deg på nytt.", "Unknown error. Please check your system settings or contact your administrator" : "Ukjent feil. Sjekk systeminnstillingene eller kontakt administratoren.", "Missing requirements." : "Manglende krav.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Vennligst se til at PHP 5.3.3 eller nyere er installert og at OpenSSL sammen med PHP-utvidelsen er aktivert og riktig konfigurert. Enn så lenge er krypterings-appen deaktivert.", "Following users are not set up for encryption:" : "Følgende brukere er ikke satt opp for kryptering:", "Initial encryption started... This can take some time. Please wait." : "Førstegangs kryptering startet... Dette kan ta litt tid. Vennligst vent.", "Initial encryption running... Please try again later." : "Førstegangs kryptering kjører... Prøv igjen senere.", diff --git a/apps/files_encryption/l10n/nb_NO.json b/apps/files_encryption/l10n/nb_NO.json index f525462cd74..772b2ff61b7 100644 --- a/apps/files_encryption/l10n/nb_NO.json +++ b/apps/files_encryption/l10n/nb_NO.json @@ -13,7 +13,6 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Kan ikke dekryptere denne filen. Dette er sannsynligvis en delt fil. Spør eieren av filen om å dele den med deg på nytt.", "Unknown error. Please check your system settings or contact your administrator" : "Ukjent feil. Sjekk systeminnstillingene eller kontakt administratoren.", "Missing requirements." : "Manglende krav.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Vennligst se til at PHP 5.3.3 eller nyere er installert og at OpenSSL sammen med PHP-utvidelsen er aktivert og riktig konfigurert. Enn så lenge er krypterings-appen deaktivert.", "Following users are not set up for encryption:" : "Følgende brukere er ikke satt opp for kryptering:", "Initial encryption started... This can take some time. Please wait." : "Førstegangs kryptering startet... Dette kan ta litt tid. Vennligst vent.", "Initial encryption running... Please try again later." : "Førstegangs kryptering kjører... Prøv igjen senere.", diff --git a/apps/files_encryption/l10n/nl.js b/apps/files_encryption/l10n/nl.js index 4587f707f0a..0400accd2bd 100644 --- a/apps/files_encryption/l10n/nl.js +++ b/apps/files_encryption/l10n/nl.js @@ -24,7 +24,7 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Kan dit bestand niet ontcijferen, waarschijnlijk is het een gedeeld bestand, Vraag de eigenaar om het bestand opnieuw met u te delen.", "Unknown error. Please check your system settings or contact your administrator" : "Onbekende fout. Controleer uw systeeminstellingen of neem contact op met de beheerder", "Missing requirements." : "Missende benodigdheden.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Wees er zeker van dat PHP5.3.3 of nieuwer is geïstalleerd en dat de OpenSSL PHP extensie is ingeschakeld en correct geconfigureerd. De versleutel-app is voorlopig uitgeschakeld.", + "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Weed er zeker van dat OpenSSL met de PHP extensie is ingeschakeld en goed geconfigureerd. Op dit moment is de encryptie app uitgeschakeld.", "Following users are not set up for encryption:" : "De volgende gebruikers hebben geen configuratie voor encryptie:", "Initial encryption started... This can take some time. Please wait." : "initiële versleuteling gestart... Dit kan even duren, geduld a.u.b.", "Initial encryption running... Please try again later." : "Initiële versleuteling bezig... Probeer het later opnieuw.", diff --git a/apps/files_encryption/l10n/nl.json b/apps/files_encryption/l10n/nl.json index cd456faa614..eb2ea89428b 100644 --- a/apps/files_encryption/l10n/nl.json +++ b/apps/files_encryption/l10n/nl.json @@ -22,7 +22,7 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Kan dit bestand niet ontcijferen, waarschijnlijk is het een gedeeld bestand, Vraag de eigenaar om het bestand opnieuw met u te delen.", "Unknown error. Please check your system settings or contact your administrator" : "Onbekende fout. Controleer uw systeeminstellingen of neem contact op met de beheerder", "Missing requirements." : "Missende benodigdheden.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Wees er zeker van dat PHP5.3.3 of nieuwer is geïstalleerd en dat de OpenSSL PHP extensie is ingeschakeld en correct geconfigureerd. De versleutel-app is voorlopig uitgeschakeld.", + "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Weed er zeker van dat OpenSSL met de PHP extensie is ingeschakeld en goed geconfigureerd. Op dit moment is de encryptie app uitgeschakeld.", "Following users are not set up for encryption:" : "De volgende gebruikers hebben geen configuratie voor encryptie:", "Initial encryption started... This can take some time. Please wait." : "initiële versleuteling gestart... Dit kan even duren, geduld a.u.b.", "Initial encryption running... Please try again later." : "Initiële versleuteling bezig... Probeer het later opnieuw.", diff --git a/apps/files_encryption/l10n/pl.js b/apps/files_encryption/l10n/pl.js index 29b67619139..26f3cff7397 100644 --- a/apps/files_encryption/l10n/pl.js +++ b/apps/files_encryption/l10n/pl.js @@ -24,7 +24,6 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Nie można odszyfrować tego pliku, prawdopodobnie jest to plik udostępniony. Poproś właściciela pliku o ponowne udostępnianie pliku Tobie.", "Unknown error. Please check your system settings or contact your administrator" : "Nieznany błąd. Proszę sprawdzić ustawienia systemowe lub skontaktować się z administratorem", "Missing requirements." : "Brak wymagań.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Proszę upewnić się, że PHP 5.3.3 lub nowszy jest zainstalowany i że OpenSSL oraz rozszerzenie PHP jest włączone i poprawnie skonfigurowane. Obecnie szyfrowanie aplikacji zostało wyłączone.", "Following users are not set up for encryption:" : "Następujący użytkownicy nie mają skonfigurowanego szyfrowania:", "Initial encryption started... This can take some time. Please wait." : "Rozpoczęto szyfrowanie... To może chwilę potrwać. Proszę czekać.", "Initial encryption running... Please try again later." : "Trwa szyfrowanie początkowe...Spróbuj ponownie.", diff --git a/apps/files_encryption/l10n/pl.json b/apps/files_encryption/l10n/pl.json index 8d70e50340e..ae2b3f06218 100644 --- a/apps/files_encryption/l10n/pl.json +++ b/apps/files_encryption/l10n/pl.json @@ -22,7 +22,6 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Nie można odszyfrować tego pliku, prawdopodobnie jest to plik udostępniony. Poproś właściciela pliku o ponowne udostępnianie pliku Tobie.", "Unknown error. Please check your system settings or contact your administrator" : "Nieznany błąd. Proszę sprawdzić ustawienia systemowe lub skontaktować się z administratorem", "Missing requirements." : "Brak wymagań.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Proszę upewnić się, że PHP 5.3.3 lub nowszy jest zainstalowany i że OpenSSL oraz rozszerzenie PHP jest włączone i poprawnie skonfigurowane. Obecnie szyfrowanie aplikacji zostało wyłączone.", "Following users are not set up for encryption:" : "Następujący użytkownicy nie mają skonfigurowanego szyfrowania:", "Initial encryption started... This can take some time. Please wait." : "Rozpoczęto szyfrowanie... To może chwilę potrwać. Proszę czekać.", "Initial encryption running... Please try again later." : "Trwa szyfrowanie początkowe...Spróbuj ponownie.", diff --git a/apps/files_encryption/l10n/pt_BR.js b/apps/files_encryption/l10n/pt_BR.js index bd0c47ce98e..2bcf3bc345b 100644 --- a/apps/files_encryption/l10n/pt_BR.js +++ b/apps/files_encryption/l10n/pt_BR.js @@ -24,7 +24,7 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Este arquivo não pode ser decriptado, provavelmente este é um arquivo compartilhado. Poe favoe peça ao dono do arquivo para compartilha-lo com você.", "Unknown error. Please check your system settings or contact your administrator" : "Erro desconhecido. Por favor, verifique as configurações do sistema ou entre em contato com o administrador", "Missing requirements." : "Requisitos não encontrados.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Por favor, certifique-se que o PHP 5.3.3 ou mais recente está instalado e que a extensão PHP OpenSSL está habilitado e configurado corretamente. Por enquanto, o aplicativo de criptografia foi desativado.", + "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Por favor, certifique-se de que o OpenSSL em conjunto com a extensão PHP está habilitado e configurado corretamente. Por enquanto, o aplicativo de criptografia foi desativado.", "Following users are not set up for encryption:" : "Seguintes usuários não estão configurados para criptografia:", "Initial encryption started... This can take some time. Please wait." : "Criptografia inicial inicializada... Isto pode tomar algum tempo. Por favor espere.", "Initial encryption running... Please try again later." : "Criptografia inicial em execução ... Por favor, tente novamente mais tarde.", diff --git a/apps/files_encryption/l10n/pt_BR.json b/apps/files_encryption/l10n/pt_BR.json index aa9404beb68..d078c218ad3 100644 --- a/apps/files_encryption/l10n/pt_BR.json +++ b/apps/files_encryption/l10n/pt_BR.json @@ -22,7 +22,7 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Este arquivo não pode ser decriptado, provavelmente este é um arquivo compartilhado. Poe favoe peça ao dono do arquivo para compartilha-lo com você.", "Unknown error. Please check your system settings or contact your administrator" : "Erro desconhecido. Por favor, verifique as configurações do sistema ou entre em contato com o administrador", "Missing requirements." : "Requisitos não encontrados.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Por favor, certifique-se que o PHP 5.3.3 ou mais recente está instalado e que a extensão PHP OpenSSL está habilitado e configurado corretamente. Por enquanto, o aplicativo de criptografia foi desativado.", + "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Por favor, certifique-se de que o OpenSSL em conjunto com a extensão PHP está habilitado e configurado corretamente. Por enquanto, o aplicativo de criptografia foi desativado.", "Following users are not set up for encryption:" : "Seguintes usuários não estão configurados para criptografia:", "Initial encryption started... This can take some time. Please wait." : "Criptografia inicial inicializada... Isto pode tomar algum tempo. Por favor espere.", "Initial encryption running... Please try again later." : "Criptografia inicial em execução ... Por favor, tente novamente mais tarde.", diff --git a/apps/files_encryption/l10n/pt_PT.js b/apps/files_encryption/l10n/pt_PT.js index 3a642a27cc4..b08e0c4b05c 100644 --- a/apps/files_encryption/l10n/pt_PT.js +++ b/apps/files_encryption/l10n/pt_PT.js @@ -24,7 +24,6 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Não é possível desencriptar este ficheiro, provavelmente é um ficheiro partilhado. Por favor, peça ao proprietário do ficheiro para voltar a partilhar o ficheiro consigo.", "Unknown error. Please check your system settings or contact your administrator" : "Erro desconhecido. Por favor, verifique as configurações do sistema ou entre em contacto com o seu administrador ", "Missing requirements." : "Requisitos em falta.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Por favor, certifique-se que o PHP 5.3.3 ou superior está instalado e que o OpenSSL juntamente com a extensão PHP estão ativados e devidamente configurados. Por agora, a app de encriptação foi desativada.", "Following users are not set up for encryption:" : "Os utilizadores seguintes não estão configurados para encriptação:", "Initial encryption started... This can take some time. Please wait." : "A encriptação inicial foi iniciada ... Esta pode demorar algum tempo. Aguarde, por favor.", "Initial encryption running... Please try again later." : "A encriptação inicial está em execução ... Por favor, tente de novo mais tarde.", diff --git a/apps/files_encryption/l10n/pt_PT.json b/apps/files_encryption/l10n/pt_PT.json index f90e10625cc..b51554eaae3 100644 --- a/apps/files_encryption/l10n/pt_PT.json +++ b/apps/files_encryption/l10n/pt_PT.json @@ -22,7 +22,6 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Não é possível desencriptar este ficheiro, provavelmente é um ficheiro partilhado. Por favor, peça ao proprietário do ficheiro para voltar a partilhar o ficheiro consigo.", "Unknown error. Please check your system settings or contact your administrator" : "Erro desconhecido. Por favor, verifique as configurações do sistema ou entre em contacto com o seu administrador ", "Missing requirements." : "Requisitos em falta.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Por favor, certifique-se que o PHP 5.3.3 ou superior está instalado e que o OpenSSL juntamente com a extensão PHP estão ativados e devidamente configurados. Por agora, a app de encriptação foi desativada.", "Following users are not set up for encryption:" : "Os utilizadores seguintes não estão configurados para encriptação:", "Initial encryption started... This can take some time. Please wait." : "A encriptação inicial foi iniciada ... Esta pode demorar algum tempo. Aguarde, por favor.", "Initial encryption running... Please try again later." : "A encriptação inicial está em execução ... Por favor, tente de novo mais tarde.", diff --git a/apps/files_encryption/l10n/ru.js b/apps/files_encryption/l10n/ru.js index 965f383691f..e43a6430f27 100644 --- a/apps/files_encryption/l10n/ru.js +++ b/apps/files_encryption/l10n/ru.js @@ -24,7 +24,6 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Не могу расшифровать файл, возможно это опубликованный файл. Пожалуйста, попросите владельца файла поделиться им с вами еще раз.", "Unknown error. Please check your system settings or contact your administrator" : "Неизвестная ошибка. Пожалуйста, проверьте системные настройки или свяжитесь с администратором", "Missing requirements." : "Требования отсутствуют.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Пожалуйста, убедитесь, что версия PHP 5.3.3 или новее, а также, что OpenSSL и соответствующее расширение PHP включены и правильно настроены. На данный момент приложение шифрования отключено.", "Following users are not set up for encryption:" : "Для следующих пользователей шифрование не настроено:", "Initial encryption started... This can take some time. Please wait." : "Начато начальное шифрование... Это может занять какое-то время. Пожалуйста, подождите.", "Initial encryption running... Please try again later." : "Работает первоначальное шифрование... Пожалуйста, повторите попытку позже.", diff --git a/apps/files_encryption/l10n/ru.json b/apps/files_encryption/l10n/ru.json index 7548e510c43..93584da0cc4 100644 --- a/apps/files_encryption/l10n/ru.json +++ b/apps/files_encryption/l10n/ru.json @@ -22,7 +22,6 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Не могу расшифровать файл, возможно это опубликованный файл. Пожалуйста, попросите владельца файла поделиться им с вами еще раз.", "Unknown error. Please check your system settings or contact your administrator" : "Неизвестная ошибка. Пожалуйста, проверьте системные настройки или свяжитесь с администратором", "Missing requirements." : "Требования отсутствуют.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Пожалуйста, убедитесь, что версия PHP 5.3.3 или новее, а также, что OpenSSL и соответствующее расширение PHP включены и правильно настроены. На данный момент приложение шифрования отключено.", "Following users are not set up for encryption:" : "Для следующих пользователей шифрование не настроено:", "Initial encryption started... This can take some time. Please wait." : "Начато начальное шифрование... Это может занять какое-то время. Пожалуйста, подождите.", "Initial encryption running... Please try again later." : "Работает первоначальное шифрование... Пожалуйста, повторите попытку позже.", diff --git a/apps/files_encryption/l10n/sk_SK.js b/apps/files_encryption/l10n/sk_SK.js index cf7606bb1ad..19b2e9d1e39 100644 --- a/apps/files_encryption/l10n/sk_SK.js +++ b/apps/files_encryption/l10n/sk_SK.js @@ -15,7 +15,6 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Tento súbor sa nepodarilo dešifrovať, pravdepodobne je zdieľaný. Požiadajte majiteľa súboru, aby ho s vami znovu vyzdieľal.", "Unknown error. Please check your system settings or contact your administrator" : "Neznáma chyba. Skontrolujte si vaše systémové nastavenia alebo kontaktujte administrátora", "Missing requirements." : "Chýbajúce požiadavky.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Prosím uistite sa, že PHP verzie 5.3.3 alebo novšej je nainštalované a tiež, že OpenSSL knižnica spolu z PHP rozšírením je povolená a konfigurovaná správne. Nateraz bola aplikácia šifrovania zablokovaná.", "Following users are not set up for encryption:" : "Nasledujúci používatelia nie sú nastavení pre šifrovanie:", "Initial encryption started... This can take some time. Please wait." : "Počiatočné šifrovanie započalo ... To môže nejakú dobu trvať. Čakajte prosím.", "Initial encryption running... Please try again later." : "Počiatočné šifrovanie beží... Skúste to neskôr znovu.", diff --git a/apps/files_encryption/l10n/sk_SK.json b/apps/files_encryption/l10n/sk_SK.json index 6229150b737..6e61effcf65 100644 --- a/apps/files_encryption/l10n/sk_SK.json +++ b/apps/files_encryption/l10n/sk_SK.json @@ -13,7 +13,6 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Tento súbor sa nepodarilo dešifrovať, pravdepodobne je zdieľaný. Požiadajte majiteľa súboru, aby ho s vami znovu vyzdieľal.", "Unknown error. Please check your system settings or contact your administrator" : "Neznáma chyba. Skontrolujte si vaše systémové nastavenia alebo kontaktujte administrátora", "Missing requirements." : "Chýbajúce požiadavky.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Prosím uistite sa, že PHP verzie 5.3.3 alebo novšej je nainštalované a tiež, že OpenSSL knižnica spolu z PHP rozšírením je povolená a konfigurovaná správne. Nateraz bola aplikácia šifrovania zablokovaná.", "Following users are not set up for encryption:" : "Nasledujúci používatelia nie sú nastavení pre šifrovanie:", "Initial encryption started... This can take some time. Please wait." : "Počiatočné šifrovanie započalo ... To môže nejakú dobu trvať. Čakajte prosím.", "Initial encryption running... Please try again later." : "Počiatočné šifrovanie beží... Skúste to neskôr znovu.", diff --git a/apps/files_encryption/l10n/sl.js b/apps/files_encryption/l10n/sl.js index 3bb41a62f22..678709ab891 100644 --- a/apps/files_encryption/l10n/sl.js +++ b/apps/files_encryption/l10n/sl.js @@ -24,7 +24,7 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Te datoteke ni mogoče šifrirati, ker je to najverjetneje datoteka v souporabi. Prosite lastnika datoteke, da jo da ponovno v souporabo.", "Unknown error. Please check your system settings or contact your administrator" : "Neznana napaka. Preverite nastavitve sistema ali pa stopite v stik s skrbnikom sistema.", "Missing requirements." : "Manjkajoče zahteve", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Preverite, ali je na strežniku nameščen paket PHP 5.3.3 ali novejši, da je omogočen in pravilno nastavljen PHP OpenSSL. Z obstoječimi možnostmi šifriranje ni mogoče.", + "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Preverite, ali je OpenSSL z ustrezno razširitvijo PHP omogočen in ustrezno nastavljen. Trenutno je šifriranje onemogočeno.", "Following users are not set up for encryption:" : "Navedeni uporabniki še nimajo nastavljenega šifriranja:", "Initial encryption started... This can take some time. Please wait." : "Začetno šifriranje je začeto ... Opravilo je lahko dolgotrajno.", "Initial encryption running... Please try again later." : "Začetno šifriranje je v teku ... Poskusite kasneje.", diff --git a/apps/files_encryption/l10n/sl.json b/apps/files_encryption/l10n/sl.json index a9909c6551a..943fe8a96c1 100644 --- a/apps/files_encryption/l10n/sl.json +++ b/apps/files_encryption/l10n/sl.json @@ -22,7 +22,7 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Te datoteke ni mogoče šifrirati, ker je to najverjetneje datoteka v souporabi. Prosite lastnika datoteke, da jo da ponovno v souporabo.", "Unknown error. Please check your system settings or contact your administrator" : "Neznana napaka. Preverite nastavitve sistema ali pa stopite v stik s skrbnikom sistema.", "Missing requirements." : "Manjkajoče zahteve", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Preverite, ali je na strežniku nameščen paket PHP 5.3.3 ali novejši, da je omogočen in pravilno nastavljen PHP OpenSSL. Z obstoječimi možnostmi šifriranje ni mogoče.", + "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Preverite, ali je OpenSSL z ustrezno razširitvijo PHP omogočen in ustrezno nastavljen. Trenutno je šifriranje onemogočeno.", "Following users are not set up for encryption:" : "Navedeni uporabniki še nimajo nastavljenega šifriranja:", "Initial encryption started... This can take some time. Please wait." : "Začetno šifriranje je začeto ... Opravilo je lahko dolgotrajno.", "Initial encryption running... Please try again later." : "Začetno šifriranje je v teku ... Poskusite kasneje.", diff --git a/apps/files_encryption/l10n/sq.js b/apps/files_encryption/l10n/sq.js index f3c5d10cf0a..ffab720cfda 100644 --- a/apps/files_encryption/l10n/sq.js +++ b/apps/files_encryption/l10n/sq.js @@ -2,6 +2,7 @@ OC.L10N.register( "files_encryption", { "Unknown error" : "Gabim panjohur", - "Encryption" : "Kodifikimi" + "Encryption" : "Kodifikimi", + "Enabled" : "Aktivizuar" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files_encryption/l10n/sq.json b/apps/files_encryption/l10n/sq.json index b4fe571e7e0..dee4c42e547 100644 --- a/apps/files_encryption/l10n/sq.json +++ b/apps/files_encryption/l10n/sq.json @@ -1,5 +1,6 @@ { "translations": { "Unknown error" : "Gabim panjohur", - "Encryption" : "Kodifikimi" + "Encryption" : "Kodifikimi", + "Enabled" : "Aktivizuar" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files_encryption/l10n/sv.js b/apps/files_encryption/l10n/sv.js index 44d58564ba7..2631dc969b9 100644 --- a/apps/files_encryption/l10n/sv.js +++ b/apps/files_encryption/l10n/sv.js @@ -15,7 +15,6 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Kan ej dekryptera denna fil, förmodligen är det en delad fil. Be ägaren av filen att dela den med dig.", "Unknown error. Please check your system settings or contact your administrator" : "Okänt fel. Kontrollera dina systeminställningar eller kontakta din administratör", "Missing requirements." : "Krav som saknas", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Kontrollera att PHP 5.3.3 eller senare är installerad och att tillägget OpenSSL PHP är aktiverad och korrekt konfigurerad. Kryptering är tillsvidare inaktiverad.", "Following users are not set up for encryption:" : "Följande användare har inte aktiverat kryptering:", "Initial encryption started... This can take some time. Please wait." : "Initiala krypteringen har påbörjats... Detta kan ta lite tid. Var god vänta.", "Initial encryption running... Please try again later." : "Initiala krypteringen körs... Var god försök igen senare.", diff --git a/apps/files_encryption/l10n/sv.json b/apps/files_encryption/l10n/sv.json index 5ee6606b665..46f738de914 100644 --- a/apps/files_encryption/l10n/sv.json +++ b/apps/files_encryption/l10n/sv.json @@ -13,7 +13,6 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Kan ej dekryptera denna fil, förmodligen är det en delad fil. Be ägaren av filen att dela den med dig.", "Unknown error. Please check your system settings or contact your administrator" : "Okänt fel. Kontrollera dina systeminställningar eller kontakta din administratör", "Missing requirements." : "Krav som saknas", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Kontrollera att PHP 5.3.3 eller senare är installerad och att tillägget OpenSSL PHP är aktiverad och korrekt konfigurerad. Kryptering är tillsvidare inaktiverad.", "Following users are not set up for encryption:" : "Följande användare har inte aktiverat kryptering:", "Initial encryption started... This can take some time. Please wait." : "Initiala krypteringen har påbörjats... Detta kan ta lite tid. Var god vänta.", "Initial encryption running... Please try again later." : "Initiala krypteringen körs... Var god försök igen senare.", diff --git a/apps/files_encryption/l10n/tr.js b/apps/files_encryption/l10n/tr.js index 41240bf5ed6..43a05a696a6 100644 --- a/apps/files_encryption/l10n/tr.js +++ b/apps/files_encryption/l10n/tr.js @@ -24,7 +24,7 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Bu dosya muhtemelen bir paylaşılan dosya olduğundan şifrelemesi kaldırılamıyor. Lütfen dosyayı sizinle bir daha paylaşması için dosya sahibi ile iletişime geçin.", "Unknown error. Please check your system settings or contact your administrator" : "Bilinmeyen hata. Lütfen sistem ayarlarınızı denetleyin veya yöneticiniz ile iletişime geçin", "Missing requirements." : "Gereklilikler eksik.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "PHP 5.3.3 veya daha sürümü ile birlikte OpenSSL ve OpenSSL PHP uzantısının birlikte etkin olduğundan ve doğru bir şekilde yapılandırıldığından emin olun. Şimdilik şifreleme uygulaması devre dışı bırakıldı.", + "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "OpenSSL'nin PHP uzantısıyla birlikte etkin ve düzgün yapılandırılmış olduğundan emin olun. Şimdilik şifreleme uygulaması devre dışı bırakıldı.", "Following users are not set up for encryption:" : "Aşağıdaki kullanıcılar şifreleme için ayarlanmamış:", "Initial encryption started... This can take some time. Please wait." : "İlk şifreleme başladı... Bu biraz zaman alabilir. Lütfen bekleyin.", "Initial encryption running... Please try again later." : "İlk şifreleme çalışıyor... Lütfen daha sonra tekrar deneyin.", diff --git a/apps/files_encryption/l10n/tr.json b/apps/files_encryption/l10n/tr.json index d951321dd82..e78f8fb5203 100644 --- a/apps/files_encryption/l10n/tr.json +++ b/apps/files_encryption/l10n/tr.json @@ -22,7 +22,7 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Bu dosya muhtemelen bir paylaşılan dosya olduğundan şifrelemesi kaldırılamıyor. Lütfen dosyayı sizinle bir daha paylaşması için dosya sahibi ile iletişime geçin.", "Unknown error. Please check your system settings or contact your administrator" : "Bilinmeyen hata. Lütfen sistem ayarlarınızı denetleyin veya yöneticiniz ile iletişime geçin", "Missing requirements." : "Gereklilikler eksik.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "PHP 5.3.3 veya daha sürümü ile birlikte OpenSSL ve OpenSSL PHP uzantısının birlikte etkin olduğundan ve doğru bir şekilde yapılandırıldığından emin olun. Şimdilik şifreleme uygulaması devre dışı bırakıldı.", + "Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "OpenSSL'nin PHP uzantısıyla birlikte etkin ve düzgün yapılandırılmış olduğundan emin olun. Şimdilik şifreleme uygulaması devre dışı bırakıldı.", "Following users are not set up for encryption:" : "Aşağıdaki kullanıcılar şifreleme için ayarlanmamış:", "Initial encryption started... This can take some time. Please wait." : "İlk şifreleme başladı... Bu biraz zaman alabilir. Lütfen bekleyin.", "Initial encryption running... Please try again later." : "İlk şifreleme çalışıyor... Lütfen daha sonra tekrar deneyin.", diff --git a/apps/files_encryption/l10n/uk.js b/apps/files_encryption/l10n/uk.js index db740bc45e6..15783a5172e 100644 --- a/apps/files_encryption/l10n/uk.js +++ b/apps/files_encryption/l10n/uk.js @@ -24,7 +24,6 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Не можу розшифрувати цей файл, можливо він опублікований. Будь ласка, попросіть власника опублікувати його заново.", "Unknown error. Please check your system settings or contact your administrator" : "Невідома помилка. Будь ласка, перевірте налаштування системи або зверніться до адміністратора.", "Missing requirements." : "Відсутні вимоги.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Будь ласка, впевніться, що встановлена версія PHP 5.3.3 або новіша, а також, що OpenSSL та інші розширення PHP підключені та вірно налаштовані. На даний момент додаток шифрування відключений.", "Following users are not set up for encryption:" : "Для наступних користувачів шифрування не налаштоване:", "Initial encryption started... This can take some time. Please wait." : "Початкове шифрування почалося... Це може зайняти деякий час. Будь ласка, почекайте.", "Initial encryption running... Please try again later." : "Початкове шифрування працює... Це може зайняти деякий час. Будь ласка, почекайте.", diff --git a/apps/files_encryption/l10n/uk.json b/apps/files_encryption/l10n/uk.json index b2953e5e53c..69444961860 100644 --- a/apps/files_encryption/l10n/uk.json +++ b/apps/files_encryption/l10n/uk.json @@ -22,7 +22,6 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Не можу розшифрувати цей файл, можливо він опублікований. Будь ласка, попросіть власника опублікувати його заново.", "Unknown error. Please check your system settings or contact your administrator" : "Невідома помилка. Будь ласка, перевірте налаштування системи або зверніться до адміністратора.", "Missing requirements." : "Відсутні вимоги.", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "Будь ласка, впевніться, що встановлена версія PHP 5.3.3 або новіша, а також, що OpenSSL та інші розширення PHP підключені та вірно налаштовані. На даний момент додаток шифрування відключений.", "Following users are not set up for encryption:" : "Для наступних користувачів шифрування не налаштоване:", "Initial encryption started... This can take some time. Please wait." : "Початкове шифрування почалося... Це може зайняти деякий час. Будь ласка, почекайте.", "Initial encryption running... Please try again later." : "Початкове шифрування працює... Це може зайняти деякий час. Будь ласка, почекайте.", diff --git a/apps/files_encryption/l10n/zh_CN.js b/apps/files_encryption/l10n/zh_CN.js index 17995f4597e..a7da9155ef6 100644 --- a/apps/files_encryption/l10n/zh_CN.js +++ b/apps/files_encryption/l10n/zh_CN.js @@ -15,7 +15,6 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : " 无法解密这个文件(或许这是一个共享文件?),请询问文件所有者重新与您分享这个文件。", "Unknown error. Please check your system settings or contact your administrator" : "未知错误。请检查系统设置或联系您的管理员", "Missing requirements." : "必填项未填写。", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "请确认安装了 PHP 5.3.3 或更新版本,且 OpenSSL 及其 PHP 扩展已经启用并正确配置。加密应用现在已被禁用。", "Following users are not set up for encryption:" : "以下用户还没有设置加密:", "Initial encryption started... This can take some time. Please wait." : "初始加密启动中....这可能会花一些时间,请稍后再试。", "Initial encryption running... Please try again later." : "初始加密运行中....请稍后再试。", diff --git a/apps/files_encryption/l10n/zh_CN.json b/apps/files_encryption/l10n/zh_CN.json index fa6de35d12a..34576ee72d0 100644 --- a/apps/files_encryption/l10n/zh_CN.json +++ b/apps/files_encryption/l10n/zh_CN.json @@ -13,7 +13,6 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : " 无法解密这个文件(或许这是一个共享文件?),请询问文件所有者重新与您分享这个文件。", "Unknown error. Please check your system settings or contact your administrator" : "未知错误。请检查系统设置或联系您的管理员", "Missing requirements." : "必填项未填写。", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "请确认安装了 PHP 5.3.3 或更新版本,且 OpenSSL 及其 PHP 扩展已经启用并正确配置。加密应用现在已被禁用。", "Following users are not set up for encryption:" : "以下用户还没有设置加密:", "Initial encryption started... This can take some time. Please wait." : "初始加密启动中....这可能会花一些时间,请稍后再试。", "Initial encryption running... Please try again later." : "初始加密运行中....请稍后再试。", diff --git a/apps/files_encryption/l10n/zh_TW.js b/apps/files_encryption/l10n/zh_TW.js index e344178a333..3bd3143c5b9 100644 --- a/apps/files_encryption/l10n/zh_TW.js +++ b/apps/files_encryption/l10n/zh_TW.js @@ -15,7 +15,6 @@ OC.L10N.register( "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "無法解密這個檔案,也許這是分享的檔案。請詢問檔案所有人重新分享檔案給您。", "Unknown error. Please check your system settings or contact your administrator" : "未知錯誤請檢查您的系統設定或是聯絡您的管理員", "Missing requirements." : "遺失必要條件。", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "請確認已安裝 PHP 5.3.3 或是更新的版本以及 OpenSSL 也一併安裝在 PHP extension 裡面並啟用及設置完成。現在,加密功能是停用的。", "Following users are not set up for encryption:" : "以下的使用者無法設定加密:", "Initial encryption started... This can take some time. Please wait." : "加密初始已啟用...這個需要一些時間。請稍等。", "Initial encryption running... Please try again later." : "加密初始執行中...請晚點再試。", diff --git a/apps/files_encryption/l10n/zh_TW.json b/apps/files_encryption/l10n/zh_TW.json index 44b48c9ccc3..cf85da08c9f 100644 --- a/apps/files_encryption/l10n/zh_TW.json +++ b/apps/files_encryption/l10n/zh_TW.json @@ -13,7 +13,6 @@ "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "無法解密這個檔案,也許這是分享的檔案。請詢問檔案所有人重新分享檔案給您。", "Unknown error. Please check your system settings or contact your administrator" : "未知錯誤請檢查您的系統設定或是聯絡您的管理員", "Missing requirements." : "遺失必要條件。", - "Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." : "請確認已安裝 PHP 5.3.3 或是更新的版本以及 OpenSSL 也一併安裝在 PHP extension 裡面並啟用及設置完成。現在,加密功能是停用的。", "Following users are not set up for encryption:" : "以下的使用者無法設定加密:", "Initial encryption started... This can take some time. Please wait." : "加密初始已啟用...這個需要一些時間。請稍等。", "Initial encryption running... Please try again later." : "加密初始執行中...請晚點再試。", diff --git a/apps/files_encryption/lib/helper.php b/apps/files_encryption/lib/helper.php index 7a50ade82f3..34deb112798 100644 --- a/apps/files_encryption/lib/helper.php +++ b/apps/files_encryption/lib/helper.php @@ -3,8 +3,10 @@ /** * ownCloud * - * @author Florin Peter - * @copyright 2013 Florin Peter <owncloud@florin-peter.de> + * @copyright (C) 2014 ownCloud, Inc. + * + * @author Florin Peter <owncloud@florin-peter.de> + * @author Bjoern Schiessle <schiessle@owncloud.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE @@ -68,9 +70,9 @@ class Helper { \OCP\Util::connectHook('OC_Filesystem', 'post_copy', 'OCA\Encryption\Hooks', 'postRenameOrCopy'); \OCP\Util::connectHook('OC_Filesystem', 'post_delete', 'OCA\Encryption\Hooks', 'postDelete'); \OCP\Util::connectHook('OC_Filesystem', 'delete', 'OCA\Encryption\Hooks', 'preDelete'); - \OCP\Util::connectHook('OC_Filesystem', 'post_umount', 'OCA\Encryption\Hooks', 'postUmount'); - \OCP\Util::connectHook('OC_Filesystem', 'umount', 'OCA\Encryption\Hooks', 'preUmount'); \OCP\Util::connectHook('\OC\Core\LostPassword\Controller\LostController', 'post_passwordReset', 'OCA\Encryption\Hooks', 'postPasswordReset'); + \OCP\Util::connectHook('OC_Filesystem', 'post_umount', 'OCA\Encryption\Hooks', 'postUnmount'); + \OCP\Util::connectHook('OC_Filesystem', 'umount', 'OCA\Encryption\Hooks', 'preUnmount'); } /** @@ -106,6 +108,25 @@ class Helper { } /** + * get recovery key id + * + * @return string|bool recovery key ID or false + */ + public static function getRecoveryKeyId() { + $appConfig = \OC::$server->getAppConfig(); + $key = $appConfig->getValue('files_encryption', 'recoveryKeyId'); + + return ($key === null) ? false : $key; + } + + public static function getPublicShareKeyId() { + $appConfig = \OC::$server->getAppConfig(); + $key = $appConfig->getValue('files_encryption', 'publicShareKeyId'); + + return ($key === null) ? false : $key; + } + + /** * enable recovery * * @param string $recoveryKeyId @@ -124,38 +145,22 @@ class Helper { $appConfig->setValue('files_encryption', 'recoveryKeyId', $recoveryKeyId); } - if (!$view->is_dir('/owncloud_private_key')) { - $view->mkdir('/owncloud_private_key'); - } - - if ( - (!$view->file_exists("/public-keys/" . $recoveryKeyId . ".public.key") - || !$view->file_exists("/owncloud_private_key/" . $recoveryKeyId . ".private.key")) - ) { + if (!Keymanager::recoveryKeyExists($view)) { $keypair = \OCA\Encryption\Crypt::createKeypair(); - \OC_FileProxy::$enabled = false; - // Save public key - - if (!$view->is_dir('/public-keys')) { - $view->mkdir('/public-keys'); - } - - $view->file_put_contents('/public-keys/' . $recoveryKeyId . '.public.key', $keypair['publicKey']); + Keymanager::setPublicKey($keypair['publicKey'], $recoveryKeyId); $cipher = \OCA\Encryption\Helper::getCipher(); $encryptedKey = \OCA\Encryption\Crypt::symmetricEncryptFileContent($keypair['privateKey'], $recoveryPassword, $cipher); if ($encryptedKey) { - Keymanager::setPrivateSystemKey($encryptedKey, $recoveryKeyId . '.private.key'); + Keymanager::setPrivateSystemKey($encryptedKey, $recoveryKeyId); // Set recoveryAdmin as enabled $appConfig->setValue('files_encryption', 'recoveryAdminEnabled', 1); $return = true; } - \OC_FileProxy::$enabled = true; - } else { // get recovery key and check the password $util = new \OCA\Encryption\Util(new \OC\Files\View('/'), \OCP\User::getUser()); $return = $util->checkRecoveryPassword($recoveryPassword); @@ -387,14 +392,10 @@ class Helper { * @return bool true if requirements are met */ public static function checkRequirements() { - $result = true; //openssl extension needs to be loaded - $result &= extension_loaded("openssl"); - // we need php >= 5.3.3 - $result &= version_compare(phpversion(), '5.3.3', '>='); + return extension_loaded("openssl"); - return (bool) $result; } /** @@ -433,47 +434,6 @@ class Helper { } /** - * find all share keys for a given file - * - * @param string $filePath path to the file name relative to the user's files dir - * for example "subdir/filename.txt" - * @param string $shareKeyPath share key prefix path relative to the user's data dir - * for example "user1/files_encryption/share-keys/subdir/filename.txt" - * @param \OC\Files\View $rootView root view, relative to data/ - * @return array list of share key files, path relative to data/$user - */ - public static function findShareKeys($filePath, $shareKeyPath, \OC\Files\View $rootView) { - $result = array(); - - $user = \OCP\User::getUser(); - $util = new Util($rootView, $user); - // get current sharing state - $sharingEnabled = \OCP\Share::isEnabled(); - - // get users sharing this file - $usersSharing = $util->getSharingUsersArray($sharingEnabled, $filePath); - - $pathinfo = pathinfo($shareKeyPath); - - $baseDir = $pathinfo['dirname'] . '/'; - $fileName = $pathinfo['basename']; - foreach ($usersSharing as $user) { - $keyName = $fileName . '.' . $user . '.shareKey'; - if ($rootView->file_exists($baseDir . $keyName)) { - $result[] = $baseDir . $keyName; - } else { - \OC_Log::write( - 'Encryption library', - 'No share key found for user "' . $user . '" for file "' . $fileName . '"', - \OC_Log::WARN - ); - } - } - - return $result; - } - - /** * remember from which file the tmp file (getLocalFile() call) was created * @param string $tmpFile path of tmp file * @param string $originalFile path of the original file relative to data/ diff --git a/apps/files_encryption/lib/keymanager.php b/apps/files_encryption/lib/keymanager.php index 9560126ef33..c8de1a73d27 100644 --- a/apps/files_encryption/lib/keymanager.php +++ b/apps/files_encryption/lib/keymanager.php @@ -3,8 +3,9 @@ /** * ownCloud * - * @author Bjoern Schiessle - * @copyright 2012 Bjoern Schiessle <schiessle@owncloud.com> + * @copyright (C) 2014 ownCloud, Inc. + * + * @author Bjoern Schiessle <schiessle@owncloud.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE @@ -29,22 +30,22 @@ namespace OCA\Encryption; */ class Keymanager { + // base dir where all the file related keys are stored + private static $keys_base_dir = '/files_encryption/keys/'; + private static $encryption_base_dir = '/files_encryption'; + private static $public_key_dir = '/files_encryption/public_keys'; + /** - * retrieve the ENCRYPTED private key from a user + * read key from hard disk * - * @param \OC\Files\View $view - * @param string $user - * @return string private key or false (hopefully) - * @note the key returned by this method must be decrypted before use + * @param string $path to key + * @return string|bool either the key or false */ - public static function getPrivateKey(\OC\Files\View $view, $user) { - - $path = '/' . $user . '/' . 'files_encryption' . '/' . $user . '.private.key'; - $key = false; - + private static function getKey($path, $view) { $proxyStatus = \OC_FileProxy::$enabled; \OC_FileProxy::$enabled = false; + $key = false; if ($view->file_exists($path)) { $key = $view->file_get_contents($path); } @@ -55,22 +56,53 @@ class Keymanager { } /** - * retrieve public key for a specified user + * write key to disk + * + * + * @param string $path path to key directory + * @param string $name key name + * @param string $key key * @param \OC\Files\View $view - * @param string $userId - * @return string public key or false + * @return bool */ - public static function getPublicKey(\OC\Files\View $view, $userId) { - + private static function setKey($path, $name, $key, $view) { $proxyStatus = \OC_FileProxy::$enabled; \OC_FileProxy::$enabled = false; - $result = $view->file_get_contents('/public-keys/' . $userId . '.public.key'); + self::keySetPreparation($view, $path); + $result = $view->file_put_contents($path . '/' . $name, $key); \OC_FileProxy::$enabled = $proxyStatus; - return $result; + return (is_int($result) && $result > 0) ? true : false; + } + + /** + * retrieve the ENCRYPTED private key from a user + * + * @param \OC\Files\View $view + * @param string $user + * @return string private key or false (hopefully) + * @note the key returned by this method must be decrypted before use + */ + public static function getPrivateKey(\OC\Files\View $view, $user) { + $path = '/' . $user . '/' . 'files_encryption' . '/' . $user . '.privateKey'; + return self::getKey($path, $view); + } + + /** + * retrieve public key for a specified user + * @param \OC\Files\View $view + * @param string $userId + * @return string public key or false + */ + public static function getPublicKey(\OC\Files\View $view, $userId) { + $path = self::$public_key_dir . '/' . $userId . '.publicKey'; + return self::getKey($path, $view); + } + public static function getPublicKeyPath() { + return self::$public_key_dir; } /** @@ -97,11 +129,8 @@ class Keymanager { public static function getPublicKeys(\OC\Files\View $view, array $userIds) { $keys = array(); - foreach ($userIds as $userId) { - $keys[$userId] = self::getPublicKey($view, $userId); - } return $keys; @@ -120,39 +149,97 @@ class Keymanager { * asymmetrically encrypt the keyfile before passing it to this method */ public static function setFileKey(\OC\Files\View $view, $util, $path, $catfile) { + $path = self::getKeyPath($view, $util, $path); + return self::setKey($path, 'fileKey', $catfile, $view); - $proxyStatus = \OC_FileProxy::$enabled; - \OC_FileProxy::$enabled = false; + } + + /** + * get path to key folder for a given file + * + * @param \OC\Files\View $view relative to data directory + * @param \OCA\Encryption\Util $util + * @param string $path path to the file, relative to the users file directory + * @return string + */ + public static function getKeyPath($view, $util, $path) { + + if ($view->is_dir('/' . \OCP\User::getUser() . '/' . $path)) { + throw new Exception\EncryptionException('file was expected but directoy was given', Exception\EncryptionException::GENERIC); + } list($owner, $filename) = $util->getUidAndFilename($path); + $filename = Helper::stripPartialFileExtension($filename); + $filePath_f = ltrim($filename, '/'); // in case of system wide mount points the keys are stored directly in the data directory if ($util->isSystemWideMountPoint($filename)) { - $basePath = '/files_encryption/keyfiles'; + $keyPath = self::$keys_base_dir . $filePath_f . '/'; } else { - $basePath = '/' . $owner . '/files_encryption/keyfiles'; + $keyPath = '/' . $owner . self::$keys_base_dir . $filePath_f . '/'; } - $targetPath = self::keySetPreparation($view, $filename, $basePath); + return $keyPath; + } - // try reusing key file if part file - if (Helper::isPartialFilePath($targetPath)) { + /** + * get path to file key for a given file + * + * @param \OC\Files\View $view relative to data directory + * @param \OCA\Encryption\Util $util + * @param string $path path to the file, relative to the users file directory + * @return string + */ + public static function getFileKeyPath($view, $util, $path) { + $keyDir = self::getKeyPath($view, $util, $path); + return $keyDir . 'fileKey'; + } - $result = $view->file_put_contents( - $basePath . '/' . Helper::stripPartialFileExtension($targetPath) . '.key', $catfile); + /** + * get path to share key for a given user + * + * @param \OC\Files\View $view relateive to data directory + * @param \OCA\Encryption\Util $util + * @param string $path path to file relative to the users files directoy + * @param string $uid user for whom we want the share-key path + * @retrun string + */ + public static function getShareKeyPath($view, $util, $path, $uid) { + $keyDir = self::getKeyPath($view, $util, $path); + return $keyDir . $uid . '.shareKey'; + } - } else { + /** + * delete public key from a given user + * + * @param \OC\Files\View $view + * @param string $uid user + * @return bool + */ + public static function deletePublicKey($view, $uid) { - $result = $view->file_put_contents($basePath . '/' . $targetPath . '.key', $catfile); + $result = false; + if (!\OCP\User::userExists($uid)) { + $publicKey = self::$public_key_dir . '/' . $uid . '.publicKey'; + $result = $view->unlink($publicKey); } - \OC_FileProxy::$enabled = $proxyStatus; - return $result; + } + /** + * check if public key for user exists + * + * @param \OC\Files\View $view + * @param string $uid + */ + public static function publicKeyExists($view, $uid) { + return $view->file_exists(self::$public_key_dir . '/'. $uid . '.publicKey'); } + + /** * retrieve keyfile for an encrypted file * @param \OC\Files\View $view @@ -164,176 +251,97 @@ class Keymanager { * of the keyfile must be performed by client code */ public static function getFileKey($view, $util, $filePath) { + $path = self::getFileKeyPath($view, $util, $filePath); + return self::getKey($path, $view); + } + /** + * store private key from the user + * @param string $key + * @return bool + * @note Encryption of the private key must be performed by client code + * as no encryption takes place here + */ + public static function setPrivateKey($key, $user = '') { - list($owner, $filename) = $util->getUidAndFilename($filePath); - $filename = Helper::stripPartialFileExtension($filename); - $filePath_f = ltrim($filename, '/'); - - // in case of system wide mount points the keys are stored directly in the data directory - if ($util->isSystemWideMountPoint($filename)) { - $keyfilePath = '/files_encryption/keyfiles/' . $filePath_f . '.key'; - } else { - $keyfilePath = '/' . $owner . '/files_encryption/keyfiles/' . $filePath_f . '.key'; - } - - $proxyStatus = \OC_FileProxy::$enabled; - \OC_FileProxy::$enabled = false; - - if ($view->file_exists($keyfilePath)) { - - $result = $view->file_get_contents($keyfilePath); - - } else { - - $result = false; - - } - - \OC_FileProxy::$enabled = $proxyStatus; + $user = $user === '' ? \OCP\User::getUser() : $user; + $path = '/' . $user . '/files_encryption'; + $header = Crypt::generateHeader(); - return $result; + return self::setKey($path, $user . '.privateKey', $header . $key, new \OC\Files\View()); } /** - * Delete a keyfile + * check if recovery key exists * * @param \OC\Files\View $view - * @param string $path path of the file the key belongs to - * @param string $userId the user to whom the file belongs - * @return bool Outcome of unlink operation - * @note $path must be relative to data/user/files. e.g. mydoc.txt NOT - * /data/admin/files/mydoc.txt + * @return bool */ - public static function deleteFileKey($view, $path, $userId=null) { - - $trimmed = ltrim($path, '/'); + public static function recoveryKeyExists($view) { - if ($trimmed === '') { - \OCP\Util::writeLog('Encryption library', - 'Can\'t delete file-key empty path given!', \OCP\Util::ERROR); - return false; - } + $result = false; - if ($userId === null) { - $userId = Helper::getUser($path); + $recoveryKeyId = Helper::getRecoveryKeyId(); + if ($recoveryKeyId) { + $result = ($view->file_exists(self::$public_key_dir . '/' . $recoveryKeyId . ".publicKey") + && $view->file_exists(self::$encryption_base_dir . '/' . $recoveryKeyId . ".privateKey")); } - $util = new Util($view, $userId); - if($util->isSystemWideMountPoint($path)) { - $keyPath = '/files_encryption/keyfiles/' . $trimmed; - } else { - $keyPath = '/' . $userId . '/files_encryption/keyfiles/' . $trimmed; - } + return $result; + } + public static function publicShareKeyExists($view) { $result = false; - $fileExists = $view->file_exists('/' . $userId . '/files/' . $trimmed); - if ($view->is_dir($keyPath) && !$fileExists) { - \OCP\Util::writeLog('files_encryption', 'deleteFileKey: delete file key: ' . $keyPath, \OCP\Util::DEBUG); - $result = $view->unlink($keyPath); - } elseif ($view->file_exists($keyPath . '.key') && !$fileExists) { - \OCP\Util::writeLog('files_encryption', 'deleteFileKey: delete file key: ' . $keyPath, \OCP\Util::DEBUG); - $result = $view->unlink($keyPath . '.key'); - - } + $publicShareKeyId = Helper::getPublicShareKeyId(); + if ($publicShareKeyId) { + $result = ($view->file_exists(self::$public_key_dir . '/' . $publicShareKeyId . ".publicKey") + && $view->file_exists(self::$encryption_base_dir . '/' . $publicShareKeyId . ".privateKey")); - if ($fileExists) { - \OCP\Util::writeLog('Encryption library', - 'Did not delete the file key, file still exists: ' . '/' . $userId . '/files/' . $trimmed, \OCP\Util::ERROR); - } elseif (!$result) { - \OCP\Util::writeLog('Encryption library', - 'Could not delete keyfile; does not exist: "' . $keyPath, \OCP\Util::ERROR); } return $result; - } /** - * store private key from the user + * store public key from the user * @param string $key + * @param string $user + * * @return bool - * @note Encryption of the private key must be performed by client code - * as no encryption takes place here */ - public static function setPrivateKey($key, $user = '') { - - if ($user === '') { - $user = \OCP\User::getUser(); - } - - $header = Crypt::generateHeader(); - - $view = new \OC\Files\View('/' . $user . '/files_encryption'); - - $proxyStatus = \OC_FileProxy::$enabled; - \OC_FileProxy::$enabled = false; - - if (!$view->file_exists('')) { - $view->mkdir(''); - } - - $result = $view->file_put_contents($user . '.private.key', $header . $key); - - \OC_FileProxy::$enabled = $proxyStatus; + public static function setPublicKey($key, $user = '') { - return $result; + $user = $user === '' ? \OCP\User::getUser() : $user; + return self::setKey(self::$public_key_dir, $user . '.publicKey', $key, new \OC\Files\View('/')); } /** * write private system key (recovery and public share key) to disk * * @param string $key encrypted key - * @param string $keyName name of the key file + * @param string $keyName name of the key * @return boolean */ public static function setPrivateSystemKey($key, $keyName) { + $keyName = $keyName . '.privateKey'; $header = Crypt::generateHeader(); - $view = new \OC\Files\View('/owncloud_private_key'); - - $proxyStatus = \OC_FileProxy::$enabled; - \OC_FileProxy::$enabled = false; - - if (!$view->file_exists('')) { - $view->mkdir(''); - } - - $result = $view->file_put_contents($keyName, $header . $key); - - \OC_FileProxy::$enabled = $proxyStatus; - - return $result; + return self::setKey(self::$encryption_base_dir, $keyName,$header . $key, new \OC\Files\View()); } /** - * store share key + * read private system key (recovery and public share key) from disk * - * @param \OC\Files\View $view - * @param string $path where the share key is stored - * @param string $shareKey - * @return bool true/false - * @note The keyfile is not encrypted here. Client code must - * asymmetrically encrypt the keyfile before passing it to this method + * @param string $keyName name of the key + * @return string|boolean private system key or false */ - private static function setShareKey(\OC\Files\View $view, $path, $shareKey) { - - $proxyStatus = \OC_FileProxy::$enabled; - \OC_FileProxy::$enabled = false; - - $result = $view->file_put_contents($path, $shareKey); - - \OC_FileProxy::$enabled = $proxyStatus; - - if (is_int($result) && $result > 0) { - return true; - } else { - return false; - } + public static function getPrivateSystemKey($keyName) { + $path = $keyName . '.privateKey'; + return self::getKey($path, new \OC\Files\View(self::$encryption_base_dir)); } /** @@ -344,35 +352,17 @@ class Keymanager { * @param array $shareKeys * @return bool */ - public static function setShareKeys(\OC\Files\View $view, $util, $path, array $shareKeys) { - - // $shareKeys must be an array with the following format: - // [userId] => [encrypted key] - - list($owner, $filename) = $util->getUidAndFilename($path); + public static function setShareKeys($view, $util, $path, array $shareKeys) { // in case of system wide mount points the keys are stored directly in the data directory - if ($util->isSystemWideMountPoint($filename)) { - $basePath = '/files_encryption/share-keys'; - } else { - $basePath = '/' . $owner . '/files_encryption/share-keys'; - } + $basePath = Keymanager::getKeyPath($view, $util, $path); - $shareKeyPath = self::keySetPreparation($view, $filename, $basePath); + self::keySetPreparation($view, $basePath); $result = true; foreach ($shareKeys as $userId => $shareKey) { - - // try reusing key file if part file - if (Helper::isPartialFilePath($shareKeyPath)) { - $writePath = $basePath . '/' . Helper::stripPartialFileExtension($shareKeyPath) . '.' . $userId . '.shareKey'; - } else { - $writePath = $basePath . '/' . $shareKeyPath . '.' . $userId . '.shareKey'; - } - - if (!self::setShareKey($view, $writePath, $shareKey)) { - + if (!self::setKey($basePath, $userId . '.shareKey', $shareKey, $view)) { // If any of the keys are not set, flag false $result = false; } @@ -392,89 +382,9 @@ class Keymanager { * @note The sharekey returned is encrypted. Decryption * of the keyfile must be performed by client code */ - public static function getShareKey(\OC\Files\View $view, $userId, $util, $filePath) { - - // try reusing key file if part file - $proxyStatus = \OC_FileProxy::$enabled; - \OC_FileProxy::$enabled = false; - - list($owner, $filename) = $util->getUidAndFilename($filePath); - $filename = Helper::stripPartialFileExtension($filename); - // in case of system wide mount points the keys are stored directly in the data directory - if ($util->isSystemWideMountPoint($filename)) { - $shareKeyPath = '/files_encryption/share-keys/' . $filename . '.' . $userId . '.shareKey'; - } else { - $shareKeyPath = '/' . $owner . '/files_encryption/share-keys/' . $filename . '.' . $userId . '.shareKey'; - } - - if ($view->file_exists($shareKeyPath)) { - - $result = $view->file_get_contents($shareKeyPath); - - } else { - - $result = false; - - } - - \OC_FileProxy::$enabled = $proxyStatus; - - return $result; - - } - - /** - * delete all share keys of a given file - * @param \OC\Files\View $view - * @param string $userId owner of the file - * @param string $filePath path to the file, relative to the owners file dir - */ - public static function delAllShareKeys($view, $userId, $filePath) { - - $filePath = ltrim($filePath, '/'); - - if ($view->file_exists('/' . $userId . '/files/' . $filePath)) { - \OCP\Util::writeLog('Encryption library', - 'File still exists, stop deleting share keys!', \OCP\Util::ERROR); - return false; - } - - if ($filePath === '') { - \OCP\Util::writeLog('Encryption library', - 'Can\'t delete share-keys empty path given!', \OCP\Util::ERROR); - return false; - } - - $util = new util($view, $userId); - - if ($util->isSystemWideMountPoint($filePath)) { - $baseDir = '/files_encryption/share-keys/'; - } else { - $baseDir = $userId . '/files_encryption/share-keys/'; - } - - $result = true; - - if ($view->is_dir($baseDir . $filePath)) { - \OCP\Util::writeLog('files_encryption', 'delAllShareKeys: delete share keys: ' . $baseDir . $filePath, \OCP\Util::DEBUG); - $result = $view->unlink($baseDir . $filePath); - } else { - $sharingEnabled = \OCP\Share::isEnabled(); - $users = $util->getSharingUsersArray($sharingEnabled, $filePath); - foreach($users as $user) { - $keyName = $baseDir . $filePath . '.' . $user . '.shareKey'; - if ($view->file_exists($keyName)) { - \OCP\Util::writeLog( - 'files_encryption', - 'dellAllShareKeys: delete share keys: "' . $keyName . '"', - \OCP\Util::DEBUG - ); - $result &= $view->unlink($keyName); - } - } - } - - return (bool)$result; + public static function getShareKey($view, $userId, $util, $filePath) { + $path = self::getShareKeyPath($view, $util, $filePath, $userId); + return self::getKey($path, $view); } /** @@ -482,45 +392,19 @@ class Keymanager { * * @param \OC\Files\View $view relative to data/ * @param array $userIds list of users we want to remove - * @param string $filename the owners name of the file for which we want to remove the users relative to data/user/files - * @param string $owner owner of the file + * @param string $keyPath + * @param string $owner the owner of the file + * @param string $ownerPath the owners name of the file for which we want to remove the users relative to data/user/files */ - public static function delShareKey($view, $userIds, $filename, $owner) { + public static function delShareKey($view, $userIds, $keysPath, $owner, $ownerPath) { - $proxyStatus = \OC_FileProxy::$enabled; - \OC_FileProxy::$enabled = false; - - $util = new Util($view, $owner); - - if ($util->isSystemWideMountPoint($filename)) { - $shareKeyPath = \OC\Files\Filesystem::normalizePath('/files_encryption/share-keys/' . $filename); - } else { - $shareKeyPath = \OC\Files\Filesystem::normalizePath('/' . $owner . '/files_encryption/share-keys/' . $filename); + $key = array_search($owner, $userIds, true); + if ($key !== false && $view->file_exists('/' . $owner . '/files/' . $ownerPath)) { + unset($userIds[$key]); } - if ($view->is_dir($shareKeyPath)) { - - self::recursiveDelShareKeys($shareKeyPath, $userIds, $owner, $view); - - } else { - - foreach ($userIds as $userId) { + self::recursiveDelShareKeys($keysPath, $userIds, $view); - if ($userId === $owner && $view->file_exists('/' . $owner . '/files/' . $filename)) { - \OCP\Util::writeLog('files_encryption', 'Tried to delete owner key, but the file still exists!', \OCP\Util::FATAL); - continue; - } - $result = $view->unlink($shareKeyPath . '.' . $userId . '.shareKey'); - \OCP\Util::writeLog('files_encryption', 'delShareKey: delete share key: ' . $shareKeyPath . '.' . $userId . '.shareKey' , \OCP\Util::DEBUG); - if (!$result) { - \OCP\Util::writeLog('Encryption library', - 'Could not delete shareKey; does not exist: "' . $shareKeyPath . '.' . $userId - . '.shareKey"', \OCP\Util::ERROR); - } - } - } - - \OC_FileProxy::$enabled = $proxyStatus; } /** @@ -528,35 +412,23 @@ class Keymanager { * * @param string $dir directory * @param array $userIds user ids for which the share keys should be deleted - * @param string $owner owner of the file * @param \OC\Files\View $view view relative to data/ */ - private static function recursiveDelShareKeys($dir, $userIds, $owner, $view) { + private static function recursiveDelShareKeys($dir, $userIds, $view) { $dirContent = $view->opendir($dir); - $dirSlices = explode('/', ltrim($dir, '/')); - $realFileDir = '/' . $owner . '/files/' . implode('/', array_slice($dirSlices, 3)) . '/'; if (is_resource($dirContent)) { while (($file = readdir($dirContent)) !== false) { if (!\OC\Files\Filesystem::isIgnoredDir($file)) { if ($view->is_dir($dir . '/' . $file)) { - self::recursiveDelShareKeys($dir . '/' . $file, $userIds, $owner, $view); + self::recursiveDelShareKeys($dir . '/' . $file, $userIds, $view); } else { foreach ($userIds as $userId) { - $fileNameFromShareKey = self::getFilenameFromShareKey($file, $userId); - if (!$fileNameFromShareKey) { - continue; - } - $realFile = $realFileDir . $fileNameFromShareKey; - - if ($userId === $owner && - $view->file_exists($realFile)) { - \OCP\Util::writeLog('files_encryption', 'original file still exists, keep owners share key!', \OCP\Util::ERROR); - continue; + if ($userId . '.shareKey' === $file) { + \OCP\Util::writeLog('files_encryption', 'recursiveDelShareKey: delete share key: ' . $file, \OCP\Util::DEBUG); + $view->unlink($dir . '/' . $file); } - \OCP\Util::writeLog('files_encryption', 'recursiveDelShareKey: delete share key: ' . $file, \OCP\Util::DEBUG); - $view->unlink($dir . '/' . $file); } } } @@ -567,21 +439,15 @@ class Keymanager { /** * Make preparations to vars and filesystem for saving a keyfile - * @param string|boolean $path + * + * @param \OC\Files\View $view + * @param string $path relatvie to the views root * @param string $basePath */ - protected static function keySetPreparation(\OC\Files\View $view, $path, $basePath) { - - $targetPath = ltrim($path, '/'); - - $path_parts = pathinfo($targetPath); - + protected static function keySetPreparation($view, $path) { // If the file resides within a subdirectory, create it - if ( - isset($path_parts['dirname']) - && !$view->file_exists($basePath . '/' . $path_parts['dirname']) - ) { - $sub_dirs = explode('/', $basePath . '/' . $path_parts['dirname']); + if (!$view->file_exists($path)) { + $sub_dirs = explode('/', $path); $dir = ''; foreach ($sub_dirs as $sub_dir) { $dir .= '/' . $sub_dir; @@ -590,27 +456,6 @@ class Keymanager { } } } - - return $targetPath; - } - /** - * extract filename from share key name - * @param string $shareKey (filename.userid.sharekey) - * @param string $userId - * @return string|false filename or false - */ - protected static function getFilenameFromShareKey($shareKey, $userId) { - $expectedSuffix = '.' . $userId . '.' . 'shareKey'; - $suffixLen = strlen($expectedSuffix); - - $suffix = substr($shareKey, -$suffixLen); - - if ($suffix !== $expectedSuffix) { - return false; - } - - return substr($shareKey, 0, -$suffixLen); - } } diff --git a/apps/files_encryption/lib/migration.php b/apps/files_encryption/lib/migration.php index 59389911b5b..ee2e52114cf 100644 --- a/apps/files_encryption/lib/migration.php +++ b/apps/files_encryption/lib/migration.php @@ -2,8 +2,9 @@ /** * ownCloud * - * @author Thomas Müller - * @copyright 2014 Thomas Müller deepdiver@owncloud.com + * @copyright (C) 2014 ownCloud, Inc. + * + * @author Bjoern Schiessle <schiessle@owncloud.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE @@ -25,26 +26,257 @@ namespace OCA\Files_Encryption; class Migration { - public function __construct($tableName = 'encryption') { - $this->tableName = $tableName; + /** + * @var \OC\Files\View + */ + private $view; + private $public_share_key_id; + private $recovery_key_id; + + public function __construct() { + $this->view = new \OC\Files\View(); + $this->public_share_key_id = \OCA\Encryption\Helper::getPublicShareKeyId(); + $this->recovery_key_id = \OCA\Encryption\Helper::getRecoveryKeyId(); + } + + public function reorganizeFolderStructure() { + + $this->createPathForKeys('/files_encryption'); + + // backup system wide folders + $this->backupSystemWideKeys(); + + // rename public keys + $this->renamePublicKeys(); + + // rename system wide mount point + $this->renameFileKeys('', '/files_encryption/keyfiles'); + + // rename system private keys + $this->renameSystemPrivateKeys(); + + // delete old system wide folders + $this->view->deleteAll('/public-keys'); + $this->view->deleteAll('/owncloud_private_key'); + $this->view->deleteAll('/files_encryption/share-keys'); + $this->view->deleteAll('/files_encryption/keyfiles'); + + $users = \OCP\User::getUsers(); + foreach ($users as $user) { + // backup all keys + if ($this->backupUserKeys($user)) { + // create new 'key' folder + $this->view->mkdir($user . '/files_encryption/keys'); + // rename users private key + $this->renameUsersPrivateKey($user); + // rename file keys + $path = $user . '/files_encryption/keyfiles'; + $this->renameFileKeys($user, $path); + $trashPath = $user . '/files_trashbin/keyfiles'; + if (\OC_App::isEnabled('files_trashbin') && $this->view->is_dir($trashPath)) { + $this->renameFileKeys($user, $trashPath, true); + $this->view->deleteAll($trashPath); + $this->view->deleteAll($user . '/files_trashbin/share-keys'); + } + // delete old folders + $this->deleteOldKeys($user); + } + } + } + + private function backupSystemWideKeys() { + $backupDir = 'encryption_migration_backup_' . date("Y-m-d_H-i-s"); + $this->view->mkdir($backupDir); + $this->view->copy('owncloud_private_key', $backupDir . '/owncloud_private_key'); + $this->view->copy('public-keys', $backupDir . '/public-keys'); + $this->view->copy('files_encryption', $backupDir . '/files_encryption'); + } + + private function backupUserKeys($user) { + $encryptionDir = $user . '/files_encryption'; + if ($this->view->is_dir($encryptionDir)) { + $backupDir = $user . '/encryption_migration_backup_' . date("Y-m-d_H-i-s"); + $this->view->mkdir($backupDir); + $this->view->copy($encryptionDir, $backupDir); + return true; + } + return false; + } + + private function renamePublicKeys() { + $dh = $this->view->opendir('public-keys'); + + $this->createPathForKeys('files_encryption/public_keys'); + + if (is_resource($dh)) { + while (($oldPublicKey = readdir($dh)) !== false) { + if (!\OC\Files\Filesystem::isIgnoredDir($oldPublicKey)) { + $newPublicKey = substr($oldPublicKey, 0, strlen($oldPublicKey) - strlen('.public.key')) . '.publicKey'; + $this->view->rename('public-keys/' . $oldPublicKey , 'files_encryption/public_keys/' . $newPublicKey); + } + } + closedir($dh); + } + } + + private function renameSystemPrivateKeys() { + $dh = $this->view->opendir('owncloud_private_key'); + + if (is_resource($dh)) { + while (($oldPrivateKey = readdir($dh)) !== false) { + if (!\OC\Files\Filesystem::isIgnoredDir($oldPrivateKey)) { + $newPrivateKey = substr($oldPrivateKey, 0, strlen($oldPrivateKey) - strlen('.private.key')) . '.privateKey'; + $this->view->rename('owncloud_private_key/' . $oldPrivateKey , 'files_encryption/' . $newPrivateKey); + } + } + closedir($dh); + } + } + + private function renameUsersPrivateKey($user) { + $oldPrivateKey = $user . '/files_encryption/' . $user . '.private.key'; + $newPrivateKey = substr($oldPrivateKey, 0, strlen($oldPrivateKey) - strlen('.private.key')) . '.privateKey'; + + $this->view->rename($oldPrivateKey, $newPrivateKey); + } + + private function getFileName($file, $trash) { + + $extLength = strlen('.key'); + + if ($trash) { + $parts = explode('.', $file); + if ($parts[count($parts) - 1] !== 'key') { + $extLength = $extLength + strlen('.' . $parts[count($parts) - 1]); + } + } + + $filename = substr($file, 0, strlen($file) - $extLength); + + return $filename; + } + + private function getExtension($file, $trash) { + + $extension = ''; + + if ($trash) { + $parts = explode('.', $file); + if ($parts[count($parts) - 1] !== 'key') { + $extension = '.' . $parts[count($parts) - 1]; + } + } + + return $extension; + } + + private function getFilePath($path, $user, $trash) { + $offset = $trash ? strlen($user . '/files_trashbin/keyfiles') : strlen($user . '/files_encryption/keyfiles'); + return substr($path, $offset); + } + + private function getTargetDir($user, $filePath, $filename, $extension, $trash) { + if ($trash) { + $targetDir = $user . '/files_trashbin/keys/' . $filePath . '/' . $filename . $extension; + } else { + $targetDir = $user . '/files_encryption/keys/' . $filePath . '/' . $filename . $extension; + } + + return $targetDir; + } + + private function renameFileKeys($user, $path, $trash = false) { + + $dh = $this->view->opendir($path); + + if (is_resource($dh)) { + while (($file = readdir($dh)) !== false) { + if (!\OC\Files\Filesystem::isIgnoredDir($file)) { + if ($this->view->is_dir($path . '/' . $file)) { + $this->renameFileKeys($user, $path . '/' . $file, $trash); + } else { + $filename = $this->getFileName($file, $trash); + $filePath = $this->getFilePath($path, $user, $trash); + $extension = $this->getExtension($file, $trash); + $targetDir = $this->getTargetDir($user, $filePath, $filename, $extension, $trash); + $this->createPathForKeys($targetDir); + $this->view->copy($path . '/' . $file, $targetDir . '/fileKey'); + $this->renameShareKeys($user, $filePath, $filename, $targetDir, $trash); + } + } + } + closedir($dh); + } } - // migrate settings from oc_encryption to oc_preferences - public function dropTableEncryption() { - $tableName = $this->tableName; - if (!\OC_DB::tableExists($tableName)) { - return; + private function getOldShareKeyPath($user, $filePath, $trash) { + if ($trash) { + $oldShareKeyPath = $user . '/files_trashbin/share-keys/' . $filePath; + } else { + $oldShareKeyPath = $user . '/files_encryption/share-keys/' . $filePath; } - $sql = "select `uid`, max(`recovery_enabled`) as `recovery_enabled`, min(`migration_status`) as `migration_status` from `*PREFIX*$tableName` group by `uid`"; - $query = \OCP\DB::prepare($sql); - $result = $query->execute(array())->fetchAll(); - foreach ($result as $row) { - \OC_Preferences::setValue($row['uid'], 'files_encryption', 'recovery_enabled', $row['recovery_enabled']); - \OC_Preferences::setValue($row['uid'], 'files_encryption', 'migration_status', $row['migration_status']); + return $oldShareKeyPath; + } + + private function getUidFromShareKey($file, $filename, $trash) { + $extLength = strlen('.shareKey'); + if ($trash) { + $parts = explode('.', $file); + if ($parts[count($parts) - 1] !== 'shareKey') { + $extLength = $extLength + strlen('.' . $parts[count($parts) - 1]); + } } - \OC_DB::dropTable($tableName); + $uid = substr($file, strlen($filename) + 1, $extLength * -1); + + return $uid; } + private function renameShareKeys($user, $filePath, $filename, $target, $trash) { + $oldShareKeyPath = $this->getOldShareKeyPath($user, $filePath, $trash); + $dh = $this->view->opendir($oldShareKeyPath); + + if (is_resource($dh)) { + while (($file = readdir($dh)) !== false) { + if (!\OC\Files\Filesystem::isIgnoredDir($file)) { + if ($this->view->is_dir($oldShareKeyPath . '/' . $file)) { + continue; + } else { + if (substr($file, 0, strlen($filename) +1) === $filename . '.') { + + $uid = $this->getUidFromShareKey($file, $filename, $trash); + if ($uid === $this->public_share_key_id || + $uid === $this->recovery_key_id || + \OCP\User::userExists($uid)) { + $this->view->copy($oldShareKeyPath . '/' . $file, $target . '/' . $uid . '.shareKey'); + } + } + } + + } + } + closedir($dh); + } + } + + private function deleteOldKeys($user) { + $this->view->deleteAll($user . '/files_encryption/keyfiles'); + $this->view->deleteAll($user . '/files_encryption/share-keys'); + } + + private function createPathForKeys($path) { + if (!$this->view->file_exists($path)) { + $sub_dirs = explode('/', $path); + $dir = ''; + foreach ($sub_dirs as $sub_dir) { + $dir .= '/' . $sub_dir; + if (!$this->view->is_dir($dir)) { + $this->view->mkdir($dir); + } + } + } + } + + } diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php index 55f2df783c4..0e8ca7319f0 100644 --- a/apps/files_encryption/lib/proxy.php +++ b/apps/files_encryption/lib/proxy.php @@ -3,10 +3,11 @@ /** * ownCloud * - * @author Bjoern Schiessle, Sam Tuke, Robin Appelman - * @copyright 2012 Sam Tuke <samtuke@owncloud.com> - * 2012 Robin Appelman <icewind1991@gmail.com> - * 2014 Bjoern Schiessle <schiessle@owncloud.com> + * @copyright (C) 2014 ownCloud, Inc. + * + * @author Bjoern Schiessle <schiessle@owncloud.com> + * @author Sam Tuke <samtuke@owncloud.com> + * @author Robin Appelman <icewind1991@gmail.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE @@ -91,7 +92,6 @@ class Proxy extends \OC_FileProxy { private function shouldEncrypt($path, $mode = 'w') { $userId = Helper::getUser($path); - $session = new Session(new \OC\Files\View()); // don't call the crypt stream wrapper, if... if ( @@ -205,11 +205,11 @@ class Proxy extends \OC_FileProxy { public function postFile_get_contents($path, $data) { $plainData = null; - $view = new \OC\Files\View('/'); // If data is a catfile if ( Crypt::mode() === 'server' + && $this->shouldEncrypt($path) && Crypt::isCatfileContent($data) ) { diff --git a/apps/files_encryption/lib/session.php b/apps/files_encryption/lib/session.php index 7bd4fd02421..7f1e0664cdc 100644 --- a/apps/files_encryption/lib/session.php +++ b/apps/files_encryption/lib/session.php @@ -2,8 +2,10 @@ /** * ownCloud * - * @author Sam Tuke - * @copyright 2012 Sam Tuke samtuke@owncloud.com + * @copyright (C) 2014 ownCloud, Inc. + * + * @author Sam Tuke <samtuke@owncloud.com> + * @author Bjoern Schiessle <schiessle@owncloud.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE @@ -29,6 +31,7 @@ namespace OCA\Encryption; class Session { private $view; + private static $publicShareKey = false; const NOT_INITIALIZED = '0'; const INIT_EXECUTED = '1'; @@ -45,64 +48,48 @@ class Session { $this->view = $view; - if (!$this->view->is_dir('owncloud_private_key')) { + if (!$this->view->is_dir('files_encryption')) { - $this->view->mkdir('owncloud_private_key'); + $this->view->mkdir('files_encryption'); } $appConfig = \OC::$server->getAppConfig(); - $publicShareKeyId = $appConfig->getValue('files_encryption', 'publicShareKeyId'); + $publicShareKeyId = Helper::getPublicShareKeyId(); - if ($publicShareKeyId === null) { + if ($publicShareKeyId === false) { $publicShareKeyId = 'pubShare_' . substr(md5(time()), 0, 8); $appConfig->setValue('files_encryption', 'publicShareKeyId', $publicShareKeyId); } - if ( - !$this->view->file_exists("/public-keys/" . $publicShareKeyId . ".public.key") - || !$this->view->file_exists("/owncloud_private_key/" . $publicShareKeyId . ".private.key") - ) { + if (!Keymanager::publicShareKeyExists($view)) { $keypair = Crypt::createKeypair(); - // Disable encryption proxy to prevent recursive calls - $proxyStatus = \OC_FileProxy::$enabled; - \OC_FileProxy::$enabled = false; // Save public key - - if (!$view->is_dir('/public-keys')) { - $view->mkdir('/public-keys'); - } - - $this->view->file_put_contents('/public-keys/' . $publicShareKeyId . '.public.key', $keypair['publicKey']); + Keymanager::setPublicKey($keypair['publicKey'], $publicShareKeyId); // Encrypt private key empty passphrase $cipher = \OCA\Encryption\Helper::getCipher(); $encryptedKey = \OCA\Encryption\Crypt::symmetricEncryptFileContent($keypair['privateKey'], '', $cipher); if ($encryptedKey) { - Keymanager::setPrivateSystemKey($encryptedKey, $publicShareKeyId . '.private.key'); + Keymanager::setPrivateSystemKey($encryptedKey, $publicShareKeyId); } else { \OCP\Util::writeLog('files_encryption', 'Could not create public share keys', \OCP\Util::ERROR); } - \OC_FileProxy::$enabled = $proxyStatus; - } - if (\OCA\Encryption\Helper::isPublicAccess()) { + if (\OCA\Encryption\Helper::isPublicAccess() && !self::getPublicSharePrivateKey()) { // Disable encryption proxy to prevent recursive calls $proxyStatus = \OC_FileProxy::$enabled; \OC_FileProxy::$enabled = false; - $encryptedKey = $this->view->file_get_contents( - '/owncloud_private_key/' . $publicShareKeyId . '.private.key'); + $encryptedKey = Keymanager::getPrivateSystemKey($publicShareKeyId); $privateKey = Crypt::decryptPrivateKey($encryptedKey, ''); - $this->setPublicSharePrivateKey($privateKey); - - $this->setInitialized(\OCA\Encryption\Session::INIT_SUCCESSFUL); + self::setPublicSharePrivateKey($privateKey); \OC_FileProxy::$enabled = $proxyStatus; } @@ -127,8 +114,8 @@ class Session { * remove keys from session */ public function removeKeys() { - \OC::$session->remove('publicSharePrivateKey'); - \OC::$session->remove('privateKey'); + \OC::$server->getSession()->remove('publicSharePrivateKey'); + \OC::$server->getSession()->remove('privateKey'); } /** @@ -164,6 +151,8 @@ class Session { public function getInitialized() { if (!is_null(\OC::$server->getSession()->get('encryptionInitialized'))) { return \OC::$server->getSession()->get('encryptionInitialized'); + } else if (\OCA\Encryption\Helper::isPublicAccess() && self::getPublicSharePrivateKey()) { + return self::INIT_SUCCESSFUL; } else { return self::NOT_INITIALIZED; } @@ -177,7 +166,7 @@ class Session { public function getPrivateKey() { // return the public share private key if this is a public access if (\OCA\Encryption\Helper::isPublicAccess()) { - return $this->getPublicSharePrivateKey(); + return self::getPublicSharePrivateKey(); } else { if (!is_null(\OC::$server->getSession()->get('privateKey'))) { return \OC::$server->getSession()->get('privateKey'); @@ -192,12 +181,9 @@ class Session { * @param string $privateKey * @return bool */ - public function setPublicSharePrivateKey($privateKey) { - - \OC::$server->getSession()->set('publicSharePrivateKey', $privateKey); - + private static function setPublicSharePrivateKey($privateKey) { + self::$publicShareKey = $privateKey; return true; - } /** @@ -205,13 +191,8 @@ class Session { * @return string $privateKey * */ - public function getPublicSharePrivateKey() { - - if (!is_null(\OC::$server->getSession()->get('publicSharePrivateKey'))) { - return \OC::$server->getSession()->get('publicSharePrivateKey'); - } else { - return false; - } + private static function getPublicSharePrivateKey() { + return self::$publicShareKey; } } diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php index d214d13de69..42a7e20c87f 100644 --- a/apps/files_encryption/lib/util.php +++ b/apps/files_encryption/lib/util.php @@ -2,10 +2,11 @@ /** * ownCloud * - * @author Sam Tuke, Frank Karlitschek, Bjoern Schiessle - * @copyright 2012 Sam Tuke <samtuke@owncloud.com>, - * Frank Karlitschek <frank@owncloud.org>, - * Bjoern Schiessle <schiessle@owncloud.com> + * @copyright (C) 2014 ownCloud, Inc. + * + * @author Sam Tuke <samtuke@owncloud.com>, + * @author Frank Karlitschek <frank@owncloud.org>, + * @author Bjoern Schiessle <schiessle@owncloud.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE @@ -44,10 +45,10 @@ class Util { private $client; // Client side encryption mode flag private $publicKeyDir; // Dir containing all public user keys private $encryptionDir; // Dir containing user's files_encryption - private $keyfilesPath; // Dir containing user's keyfiles - private $shareKeysPath; // Dir containing env keys for shared files + private $keysPath; // Dir containing all file related encryption keys private $publicKeyPath; // Path to user's public key private $privateKeyPath; // Path to user's private key + private $userFilesDir; private $publicShareKeyId; private $recoveryKeyId; private $isPublic; @@ -72,14 +73,13 @@ class Util { $this->fileFolderName = 'files'; $this->userFilesDir = '/' . $userId . '/' . $this->fileFolderName; // TODO: Does this need to be user configurable? - $this->publicKeyDir = '/' . 'public-keys'; + $this->publicKeyDir = Keymanager::getPublicKeyPath(); $this->encryptionDir = '/' . $this->userId . '/' . 'files_encryption'; - $this->keyfilesPath = $this->encryptionDir . '/' . 'keyfiles'; - $this->shareKeysPath = $this->encryptionDir . '/' . 'share-keys'; + $this->keysPath = $this->encryptionDir . '/' . 'keys'; $this->publicKeyPath = - $this->publicKeyDir . '/' . $this->userId . '.public.key'; // e.g. data/public-keys/admin.public.key + $this->publicKeyDir . '/' . $this->userId . '.publicKey'; // e.g. data/public-keys/admin.publicKey $this->privateKeyPath = - $this->encryptionDir . '/' . $this->userId . '.private.key'; // e.g. data/admin/admin.private.key + $this->encryptionDir . '/' . $this->userId . '.privateKey'; // e.g. data/admin/admin.privateKey // make sure that the owners home is mounted \OC\Files\Filesystem::initMountPoints($userId); @@ -99,8 +99,7 @@ class Util { if ( !$this->view->file_exists($this->encryptionDir) - or !$this->view->file_exists($this->keyfilesPath) - or !$this->view->file_exists($this->shareKeysPath) + or !$this->view->file_exists($this->keysPath) or !$this->view->file_exists($this->publicKeyPath) or !$this->view->file_exists($this->privateKeyPath) ) { @@ -149,8 +148,7 @@ class Util { $this->userDir, $this->publicKeyDir, $this->encryptionDir, - $this->keyfilesPath, - $this->shareKeysPath + $this->keysPath ); // Check / create all necessary dirs @@ -727,8 +725,8 @@ class Util { } if ($successful) { - $this->view->rename($this->keyfilesPath, $this->keyfilesPath . '.backup'); - $this->view->rename($this->shareKeysPath, $this->shareKeysPath . '.backup'); + $this->backupAllKeys('decryptAll'); + $this->view->deleteAll($this->keysPath); } \OC_FileProxy::$enabled = true; @@ -845,9 +843,9 @@ class Util { break; - case 'keyfilesPath': + case 'keysPath': - return $this->keyfilesPath; + return $this->keysPath; break; @@ -1365,22 +1363,14 @@ class Util { public function checkRecoveryPassword($password) { $result = false; - $pathKey = '/owncloud_private_key/' . $this->recoveryKeyId . ".private.key"; - - $proxyStatus = \OC_FileProxy::$enabled; - \OC_FileProxy::$enabled = false; - - $recoveryKey = $this->view->file_get_contents($pathKey); + $recoveryKey = Keymanager::getPrivateSystemKey($this->recoveryKeyId); $decryptedRecoveryKey = Crypt::decryptPrivateKey($recoveryKey, $password); if ($decryptedRecoveryKey) { $result = true; } - \OC_FileProxy::$enabled = $proxyStatus; - - return $result; } @@ -1395,19 +1385,17 @@ class Util { * add recovery key to all encrypted files */ public function addRecoveryKeys($path = '/') { - $dirContent = $this->view->getDirectoryContent($this->keyfilesPath . $path); + $dirContent = $this->view->getDirectoryContent($this->keysPath . '/' . $path); foreach ($dirContent as $item) { // get relative path from files_encryption/keyfiles/ - $filePath = substr($item['path'], strlen('files_encryption/keyfiles')); - if ($item['type'] === 'dir') { + $filePath = substr($item['path'], strlen('files_encryption/keys')); + if ($this->view->is_dir($this->userFilesDir . '/' . $filePath)) { $this->addRecoveryKeys($filePath . '/'); } else { $session = new \OCA\Encryption\Session(new \OC\Files\View('/')); $sharingEnabled = \OCP\Share::isEnabled(); - // remove '.key' extension from path e.g. 'file.txt.key' to 'file.txt' - $file = substr($filePath, 0, -4); - $usersSharing = $this->getSharingUsersArray($sharingEnabled, $file); - $this->setSharedFileKeyfiles($session, $usersSharing, $file); + $usersSharing = $this->getSharingUsersArray($sharingEnabled, $filePath); + $this->setSharedFileKeyfiles($session, $usersSharing, $filePath); } } } @@ -1416,16 +1404,14 @@ class Util { * remove recovery key to all encrypted files */ public function removeRecoveryKeys($path = '/') { - $dirContent = $this->view->getDirectoryContent($this->keyfilesPath . $path); + $dirContent = $this->view->getDirectoryContent($this->keysPath . '/' . $path); foreach ($dirContent as $item) { // get relative path from files_encryption/keyfiles - $filePath = substr($item['path'], strlen('files_encryption/keyfiles')); - if ($item['type'] === 'dir') { + $filePath = substr($item['path'], strlen('files_encryption/keys')); + if ($this->view->is_dir($this->userFilesDir . '/' . $filePath)) { $this->removeRecoveryKeys($filePath . '/'); } else { - // remove '.key' extension from path e.g. 'file.txt.key' to 'file.txt' - $file = substr($filePath, 0, -4); - $this->view->unlink($this->shareKeysPath . '/' . $file . '.' . $this->recoveryKeyId . '.shareKey'); + $this->view->unlink($this->keysPath . '/' . $filePath . '/' . $this->recoveryKeyId . '.shareKey'); } } } @@ -1455,27 +1441,17 @@ class Util { } $filteredUids = $this->filterShareReadyUsers($userIds); - $proxyStatus = \OC_FileProxy::$enabled; - \OC_FileProxy::$enabled = false; - //decrypt file key - $encKeyfile = $this->view->file_get_contents($this->keyfilesPath . $file . ".key"); - $shareKey = $this->view->file_get_contents( - $this->shareKeysPath . $file . "." . $this->recoveryKeyId . ".shareKey"); + $encKeyfile = Keymanager::getFileKey($this->view, $this, $file); + $shareKey = Keymanager::getShareKey($this->view, $this->recoveryKeyId, $this, $file); $plainKeyfile = Crypt::multiKeyDecrypt($encKeyfile, $shareKey, $privateKey); // encrypt file key again to all users, this time with the new public key for the recovered use $userPubKeys = Keymanager::getPublicKeys($this->view, $filteredUids['ready']); $multiEncKey = Crypt::multiKeyEncrypt($plainKeyfile, $userPubKeys); - // write new keys to filesystem TDOO! - $this->view->file_put_contents($this->keyfilesPath . $file . '.key', $multiEncKey['data']); - foreach ($multiEncKey['keys'] as $userId => $shareKey) { - $shareKeyPath = $this->shareKeysPath . $file . '.' . $userId . '.shareKey'; - $this->view->file_put_contents($shareKeyPath, $shareKey); - } + Keymanager::setFileKey($this->view, $this, $file, $multiEncKey['data']); + Keymanager::setShareKeys($this->view, $this, $file, $multiEncKey['keys']); - // Return proxy to original status - \OC_FileProxy::$enabled = $proxyStatus; } /** @@ -1484,16 +1460,14 @@ class Util { * @param string $privateKey private recovery key which is used to decrypt the files */ private function recoverAllFiles($path, $privateKey) { - $dirContent = $this->view->getDirectoryContent($this->keyfilesPath . $path); + $dirContent = $this->view->getDirectoryContent($this->keysPath . '/' . $path); foreach ($dirContent as $item) { // get relative path from files_encryption/keyfiles - $filePath = substr($item['path'], strlen('files_encryption/keyfiles')); - if ($item['type'] === 'dir') { + $filePath = substr($item['path'], strlen('files_encryption/keys')); + if ($this->view->is_dir($this->userFilesDir . '/' . $filePath)) { $this->recoverAllFiles($filePath . '/', $privateKey); } else { - // remove '.key' extension from path e.g. 'file.txt.key' to 'file.txt' - $file = substr($filePath, 0, -4); - $this->recoverFile($file, $privateKey); + $this->recoverFile($filePath, $privateKey); } } } @@ -1504,16 +1478,9 @@ class Util { */ public function recoverUsersFiles($recoveryPassword) { - // Disable encryption proxy to prevent recursive calls - $proxyStatus = \OC_FileProxy::$enabled; - \OC_FileProxy::$enabled = false; - - $encryptedKey = $this->view->file_get_contents( - '/owncloud_private_key/' . $this->recoveryKeyId . '.private.key'); + $encryptedKey = Keymanager::getPrivateSystemKey( $this->recoveryKeyId); $privateKey = Crypt::decryptPrivateKey($encryptedKey, $recoveryPassword); - \OC_FileProxy::$enabled = $proxyStatus; - $this->recoverAllFiles('/', $privateKey); } @@ -1527,10 +1494,9 @@ class Util { $backupDir = $this->encryptionDir . '/backup.'; $backupDir .= ($purpose === '') ? date("Y-m-d_H-i-s") . '/' : $purpose . '.' . date("Y-m-d_H-i-s") . '/'; $this->view->mkdir($backupDir); - $this->view->copy($this->shareKeysPath, $backupDir . 'share-keys/'); - $this->view->copy($this->keyfilesPath, $backupDir . 'keyfiles/'); - $this->view->copy($this->privateKeyPath, $backupDir . $this->userId . '.private.key'); - $this->view->copy($this->publicKeyPath, $backupDir . $this->userId . '.public.key'); + $this->view->copy($this->keysPath, $backupDir . 'keys/'); + $this->view->copy($this->privateKeyPath, $backupDir . $this->userId . '.privateKey'); + $this->view->copy($this->publicKeyPath, $backupDir . $this->userId . '.publicKey'); } /** @@ -1590,7 +1556,10 @@ class Util { $encryptedKey = Keymanager::getPrivateKey($this->view, $params['uid']); - $privateKey = Crypt::decryptPrivateKey($encryptedKey, $params['password']); + $privateKey = false; + if ($encryptedKey) { + $privateKey = Crypt::decryptPrivateKey($encryptedKey, $params['password']); + } if ($privateKey === false) { \OCP\Util::writeLog('Encryption library', 'Private key for user "' . $params['uid'] diff --git a/apps/files_encryption/tests/crypt.php b/apps/files_encryption/tests/crypt.php index 7369be8ff05..ab2ce066cdb 100755 --- a/apps/files_encryption/tests/crypt.php +++ b/apps/files_encryption/tests/crypt.php @@ -33,20 +33,6 @@ class Test_Encryption_Crypt extends \OCA\Files_Encryption\Tests\TestCase { public static function setUpBeforeClass() { parent::setUpBeforeClass(); - // reset backend - \OC_User::clearBackends(); - \OC_User::useBackend('database'); - - // Filesystem related hooks - \OCA\Encryption\Helper::registerFilesystemHooks(); - - // Filesystem related hooks - \OCA\Encryption\Helper::registerUserHooks(); - - // clear and register hooks - \OC_FileProxy::clearProxies(); - \OC_FileProxy::register(new OCA\Encryption\Proxy()); - // create test user self::loginHelper(\Test_Encryption_Crypt::TEST_ENCRYPTION_CRYPT_USER1, true); } @@ -99,14 +85,6 @@ class Test_Encryption_Crypt extends \OCA\Files_Encryption\Tests\TestCase { // cleanup test user \OC_User::deleteUser(\Test_Encryption_Crypt::TEST_ENCRYPTION_CRYPT_USER1); - \OC_Hook::clear(); - \OC_FileProxy::clearProxies(); - - // Delete keys in /data/ - $view = new \OC\Files\View('/'); - $view->rmdir('public-keys'); - $view->rmdir('owncloud_private_key'); - parent::tearDownAfterClass(); } @@ -211,8 +189,6 @@ class Test_Encryption_Crypt extends \OCA\Files_Encryption\Tests\TestCase { // Teardown $this->view->unlink($this->userId . '/files/' . $filename); - - Encryption\Keymanager::deleteFileKey($this->view, $filename); } /** @@ -252,8 +228,6 @@ class Test_Encryption_Crypt extends \OCA\Files_Encryption\Tests\TestCase { // Teardown $this->view->unlink($this->userId . '/files/' . $filename); - - Encryption\Keymanager::deleteFileKey($this->view, $filename); } /** @@ -293,11 +267,7 @@ class Test_Encryption_Crypt extends \OCA\Files_Encryption\Tests\TestCase { $this->assertEquals($this->dataLong . $this->dataLong, $decrypted); // Teardown - $this->view->unlink($this->userId . '/files/' . $filename); - - Encryption\Keymanager::deleteFileKey($this->view, $filename); - } /** @@ -341,11 +311,7 @@ class Test_Encryption_Crypt extends \OCA\Files_Encryption\Tests\TestCase { $this->assertEquals($this->dataLong . $this->dataLong, $decrypted); // Teardown - $this->view->unlink($this->userId . '/files/' . $filename); - - Encryption\Keymanager::deleteFileKey($this->view, $filename); - } /** @@ -393,11 +359,7 @@ class Test_Encryption_Crypt extends \OCA\Files_Encryption\Tests\TestCase { $this->assertEquals($this->dataLong . $this->dataLong, $decrypted); // Teardown - $this->view->unlink($this->userId . '/files/' . $filename); - - Encryption\Keymanager::deleteFileKey($this->view, $filename); - } /** diff --git a/apps/files_encryption/tests/helper.php b/apps/files_encryption/tests/helper.php index fcde7dc5df3..88ba9f20d53 100644 --- a/apps/files_encryption/tests/helper.php +++ b/apps/files_encryption/tests/helper.php @@ -38,14 +38,6 @@ class Test_Encryption_Helper extends \OCA\Files_Encryption\Tests\TestCase { } public static function tearDownAfterClass() { - \OC_Hook::clear(); - \OC_FileProxy::clearProxies(); - - // Delete keys in /data/ - $view = new \OC\Files\View('/'); - $view->rmdir('public-keys'); - $view->rmdir('owncloud_private_key'); - parent::tearDownAfterClass(); } @@ -125,56 +117,4 @@ class Test_Encryption_Helper extends \OCA\Files_Encryption\Tests\TestCase { self::cleanUpUsers(); } - function userNamesProvider() { - return array( - array('testuser' . $this->getUniqueID()), - array('user.name.with.dots'), - ); - } - - /** - * Tests whether share keys can be found - * - * @dataProvider userNamesProvider - */ - function testFindShareKeys($userName) { - self::setUpUsers(); - // note: not using dataProvider as we want to make - // sure that the correct keys are match and not any - // other ones that might happen to have similar names - self::setupHooks(); - self::loginHelper($userName, true); - $testDir = 'testFindShareKeys' . $this->getUniqueID() . '/'; - $baseDir = $userName . '/files/' . $testDir; - $fileList = array( - 't est.txt', - 't est_.txt', - 't est.doc.txt', - 't est(.*).txt', // make sure the regexp is escaped - 'multiple.dots.can.happen.too.txt', - 't est.' . $userName . '.txt', - 't est_.' . $userName . '.shareKey.txt', - 'who would upload their.shareKey', - 'user ones file.txt', - 'user ones file.txt.backup', - '.t est.txt' - ); - - $rootView = new \OC\Files\View('/'); - $rootView->mkdir($baseDir); - foreach ($fileList as $fileName) { - $rootView->file_put_contents($baseDir . $fileName, 'dummy'); - } - - $shareKeysDir = $userName . '/files_encryption/share-keys/' . $testDir; - foreach ($fileList as $fileName) { - // make sure that every file only gets its correct respective keys - $result = Encryption\Helper::findShareKeys($baseDir . $fileName, $shareKeysDir . $fileName, $rootView); - $this->assertEquals( - array($shareKeysDir . $fileName . '.' . $userName . '.shareKey'), - $result - ); - } - self::cleanUpUsers(); - } } diff --git a/apps/files_encryption/tests/hooks.php b/apps/files_encryption/tests/hooks.php index 9ea84cc94c2..d5a30f5074a 100644 --- a/apps/files_encryption/tests/hooks.php +++ b/apps/files_encryption/tests/hooks.php @@ -63,28 +63,6 @@ class Test_Encryption_Hooks extends \OCA\Files_Encryption\Tests\TestCase { '.t est.txt' ); - // reset backend - \OC_User::clearBackends(); - \OC_User::useBackend('database'); - - \OC_Hook::clear('OC_Filesystem'); - \OC_Hook::clear('OC_User'); - - // clear share hooks - \OC_Hook::clear('OCP\\Share'); - \OC::registerShareHooks(); - \OCP\Util::connectHook('OC_Filesystem', 'setup', '\OC\Files\Storage\Shared', 'setup'); - - // Filesystem related hooks - \OCA\Encryption\Helper::registerFilesystemHooks(); - - // Sharing related hooks - \OCA\Encryption\Helper::registerShareHooks(); - - // clear and register proxies - \OC_FileProxy::clearProxies(); - \OC_FileProxy::register(new OCA\Encryption\Proxy()); - // create test user self::loginHelper(\Test_Encryption_Hooks::TEST_ENCRYPTION_HOOKS_USER1, true); self::loginHelper(\Test_Encryption_Hooks::TEST_ENCRYPTION_HOOKS_USER2, true); @@ -114,14 +92,6 @@ class Test_Encryption_Hooks extends \OCA\Files_Encryption\Tests\TestCase { \OC_User::deleteUser(\Test_Encryption_Hooks::TEST_ENCRYPTION_HOOKS_USER1); \OC_User::deleteUser(\Test_Encryption_Hooks::TEST_ENCRYPTION_HOOKS_USER2); - \OC_Hook::clear(); - \OC_FileProxy::clearProxies(); - - // Delete keys in /data/ - $view = new \OC\Files\View('/'); - $view->rmdir('public-keys'); - $view->rmdir('owncloud_private_key'); - parent::tearDownAfterClass(); } @@ -163,10 +133,10 @@ class Test_Encryption_Hooks extends \OCA\Files_Encryption\Tests\TestCase { // check if all keys are generated $this->assertTrue($this->rootView->file_exists( - self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/share-keys/' - . $this->filename . '.' . \Test_Encryption_Hooks::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey')); + self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' + . $this->filename . '/' . \Test_Encryption_Hooks::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey')); $this->assertTrue($this->rootView->file_exists( - self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keyfiles/' . $this->filename . '.key')); + self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' . $this->filename . '/fileKey')); self::logoutHelper(); @@ -178,10 +148,10 @@ class Test_Encryption_Hooks extends \OCA\Files_Encryption\Tests\TestCase { // check if all keys are generated $this->assertTrue($this->rootView->file_exists( - self::TEST_ENCRYPTION_HOOKS_USER2 . '/files_encryption/share-keys/' - . $this->filename . '.' . \Test_Encryption_Hooks::TEST_ENCRYPTION_HOOKS_USER2 . '.shareKey')); + self::TEST_ENCRYPTION_HOOKS_USER2 . '/files_encryption/keys/' + . $this->filename . '/' . \Test_Encryption_Hooks::TEST_ENCRYPTION_HOOKS_USER2 . '.shareKey')); $this->assertTrue($this->rootView->file_exists( - self::TEST_ENCRYPTION_HOOKS_USER2 . '/files_encryption/keyfiles/' . $this->filename . '.key')); + self::TEST_ENCRYPTION_HOOKS_USER2 . '/files_encryption/keys/' . $this->filename . '/fileKey')); // create a dummy file that we can delete something outside of data/user/files @@ -193,10 +163,10 @@ class Test_Encryption_Hooks extends \OCA\Files_Encryption\Tests\TestCase { // all keys should still exist $this->assertTrue($this->rootView->file_exists( - self::TEST_ENCRYPTION_HOOKS_USER2 . '/files_encryption/share-keys/' - . $this->filename . '.' . \Test_Encryption_Hooks::TEST_ENCRYPTION_HOOKS_USER2 . '.shareKey')); + self::TEST_ENCRYPTION_HOOKS_USER2 . '/files_encryption/keys/' + . $this->filename . '/' . \Test_Encryption_Hooks::TEST_ENCRYPTION_HOOKS_USER2 . '.shareKey')); $this->assertTrue($this->rootView->file_exists( - self::TEST_ENCRYPTION_HOOKS_USER2 . '/files_encryption/keyfiles/' . $this->filename . '.key')); + self::TEST_ENCRYPTION_HOOKS_USER2 . '/files_encryption/keys/' . $this->filename . '/fileKey')); // delete the file in data/user/files @@ -205,17 +175,17 @@ class Test_Encryption_Hooks extends \OCA\Files_Encryption\Tests\TestCase { // check if keys from user2 are really deleted $this->assertFalse($this->rootView->file_exists( - self::TEST_ENCRYPTION_HOOKS_USER2 . '/files_encryption/share-keys/' - . $this->filename . '.' . \Test_Encryption_Hooks::TEST_ENCRYPTION_HOOKS_USER2 . '.shareKey')); + self::TEST_ENCRYPTION_HOOKS_USER2 . '/files_encryption/keys/' + . $this->filename . '/' . \Test_Encryption_Hooks::TEST_ENCRYPTION_HOOKS_USER2 . '.shareKey')); $this->assertFalse($this->rootView->file_exists( - self::TEST_ENCRYPTION_HOOKS_USER2 . '/files_encryption/keyfiles/' . $this->filename . '.key')); + self::TEST_ENCRYPTION_HOOKS_USER2 . '/files_encryption/keys/' . $this->filename . '/fileKey')); // but user1 keys should still exist $this->assertTrue($this->rootView->file_exists( - self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/share-keys/' - . $this->filename . '.' . \Test_Encryption_Hooks::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey')); + self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' + . $this->filename . '/' . \Test_Encryption_Hooks::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey')); $this->assertTrue($this->rootView->file_exists( - self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keyfiles/' . $this->filename . '.key')); + self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' . $this->filename . '/fileKey')); if ($stateFilesTrashbin) { OC_App::enable('files_trashbin'); @@ -244,10 +214,10 @@ class Test_Encryption_Hooks extends \OCA\Files_Encryption\Tests\TestCase { // check if all keys are generated $this->assertTrue($this->rootView->file_exists( - self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/share-keys/' - . $this->filename . '.' . \Test_Encryption_Hooks::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey')); + self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' + . $this->filename . '/' . \Test_Encryption_Hooks::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey')); $this->assertTrue($this->rootView->file_exists( - self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keyfiles/' . $this->filename . '.key')); + self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' . $this->filename . '/fileKey')); // get the file info from previous created file $fileInfo = $this->user1View->getFileInfo($this->filename); @@ -256,12 +226,12 @@ class Test_Encryption_Hooks extends \OCA\Files_Encryption\Tests\TestCase { $this->assertTrue($fileInfo instanceof \OC\Files\FileInfo); // share the file with user2 - \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_ENCRYPTION_HOOKS_USER2, OCP\PERMISSION_ALL); + \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_ENCRYPTION_HOOKS_USER2, \OCP\Constants::PERMISSION_ALL); // check if new share key exists $this->assertTrue($this->rootView->file_exists( - self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/share-keys/' - . $this->filename . '.' . \Test_Encryption_Hooks::TEST_ENCRYPTION_HOOKS_USER2 . '.shareKey')); + self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' + . $this->filename . '/' . \Test_Encryption_Hooks::TEST_ENCRYPTION_HOOKS_USER2 . '.shareKey')); self::logoutHelper(); self::loginHelper(\Test_Encryption_Hooks::TEST_ENCRYPTION_HOOKS_USER2); @@ -272,10 +242,10 @@ class Test_Encryption_Hooks extends \OCA\Files_Encryption\Tests\TestCase { // keys should be stored at user1s dir, not in user2s $this->assertFalse($this->rootView->file_exists( - self::TEST_ENCRYPTION_HOOKS_USER2 . '/files_encryption/share-keys/' - . $this->filename . '.' . \Test_Encryption_Hooks::TEST_ENCRYPTION_HOOKS_USER2 . '.shareKey')); + self::TEST_ENCRYPTION_HOOKS_USER2 . '/files_encryption/keys/' + . $this->filename . '/' . \Test_Encryption_Hooks::TEST_ENCRYPTION_HOOKS_USER2 . '.shareKey')); $this->assertFalse($this->rootView->file_exists( - self::TEST_ENCRYPTION_HOOKS_USER2 . '/files_encryption/keyfiles/' . $this->filename . '.key')); + self::TEST_ENCRYPTION_HOOKS_USER2 . '/files_encryption/keys/' . $this->filename . '/fileKey')); // delete the Shared file from user1 in data/user2/files/Shared $result = $this->user2View->unlink($this->filename); @@ -284,13 +254,13 @@ class Test_Encryption_Hooks extends \OCA\Files_Encryption\Tests\TestCase { // share key for user2 from user1s home should be gone, all other keys should still exists $this->assertTrue($this->rootView->file_exists( - self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/share-keys/' - . $this->filename . '.' . \Test_Encryption_Hooks::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey')); + self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' + . $this->filename . '/' . \Test_Encryption_Hooks::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey')); $this->assertFalse($this->rootView->file_exists( - self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/share-keys/' - . $this->filename . '.' . \Test_Encryption_Hooks::TEST_ENCRYPTION_HOOKS_USER2 . '.shareKey')); + self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' + . $this->filename . '/' . \Test_Encryption_Hooks::TEST_ENCRYPTION_HOOKS_USER2 . '.shareKey')); $this->assertTrue($this->rootView->file_exists( - self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keyfiles/' . $this->filename . '.key')); + self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' . $this->filename . '/fileKey')); // cleanup @@ -327,12 +297,12 @@ class Test_Encryption_Hooks extends \OCA\Files_Encryption\Tests\TestCase { function doTestRenameHook($filename) { // check if keys exists $this->assertTrue($this->rootView->file_exists( - '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/share-keys/' - . $filename . '.' . self::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey')); + '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' + . $filename . '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey')); $this->assertTrue($this->rootView->file_exists( - '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keyfiles/' - . $filename . '.key')); + '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' + . $filename . '/fileKey')); // make subfolder and sub-subfolder $this->rootView->mkdir('/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files/' . $this->folder); @@ -351,18 +321,18 @@ class Test_Encryption_Hooks extends \OCA\Files_Encryption\Tests\TestCase { // keys should be renamed too $this->assertFalse($this->rootView->file_exists( - '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/share-keys/' - . $filename . '.' . self::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey')); + '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' + . $filename . '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey')); $this->assertFalse($this->rootView->file_exists( - '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keyfiles/' - . $filename . '.key')); + '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' + . $filename . '/fileKey')); $this->assertTrue($this->rootView->file_exists( - '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/share-keys/' . $this->folder . '/' . $this->folder . '/' - . $filename . '.' . self::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey')); + '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' . $this->folder . '/' . $this->folder . '/' + . $filename . '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey')); $this->assertTrue($this->rootView->file_exists( - '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keyfiles/' . $this->folder . '/' . $this->folder . '/' - . $filename . '.key')); + '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' . $this->folder . '/' . $this->folder . '/' + . $filename . '/fileKey')); // cleanup $this->rootView->unlink('/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files/' . $this->folder); @@ -389,12 +359,12 @@ class Test_Encryption_Hooks extends \OCA\Files_Encryption\Tests\TestCase { function doTestCopyHook($filename) { // check if keys exists $this->assertTrue($this->rootView->file_exists( - '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/share-keys/' - . $filename . '.' . self::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey')); + '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' + . $filename . '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey')); $this->assertTrue($this->rootView->file_exists( - '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keyfiles/' - . $filename . '.key')); + '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' + . $filename . '/fileKey')); // make subfolder and sub-subfolder $this->rootView->mkdir('/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files/' . $this->folder); @@ -410,18 +380,18 @@ class Test_Encryption_Hooks extends \OCA\Files_Encryption\Tests\TestCase { // keys should be copied too $this->assertTrue($this->rootView->file_exists( - '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/share-keys/' - . $filename . '.' . self::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey')); + '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' + . $filename . '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey')); $this->assertTrue($this->rootView->file_exists( - '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keyfiles/' - . $filename . '.key')); + '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' + . $filename . '/fileKey')); $this->assertTrue($this->rootView->file_exists( - '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/share-keys/' . $this->folder . '/' . $this->folder . '/' - . $filename . '.' . self::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey')); + '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' . $this->folder . '/' . $this->folder . '/' + . $filename . '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey')); $this->assertTrue($this->rootView->file_exists( - '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keyfiles/' . $this->folder . '/' . $this->folder . '/' - . $filename . '.key')); + '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' . $this->folder . '/' . $this->folder . '/' + . $filename . '/fileKey')); // cleanup $this->rootView->unlink('/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '/files/' . $this->folder); @@ -439,8 +409,8 @@ class Test_Encryption_Hooks extends \OCA\Files_Encryption\Tests\TestCase { // set user password for the first time \OCA\Encryption\Hooks::postCreateUser(array('uid' => 'newUser', 'password' => 'newUserPassword')); - $this->assertTrue($view->file_exists('public-keys/newUser.public.key')); - $this->assertTrue($view->file_exists('newUser/files_encryption/newUser.private.key')); + $this->assertTrue($view->file_exists(\OCA\Encryption\Keymanager::getPublicKeyPath() . '/newUser.publicKey')); + $this->assertTrue($view->file_exists('newUser/files_encryption/newUser.privateKey')); // check if we are able to decrypt the private key $encryptedKey = \OCA\Encryption\Keymanager::getPrivateKey($view, 'newUser'); diff --git a/apps/files_encryption/tests/keymanager.php b/apps/files_encryption/tests/keymanager.php index b4dc6ddeb56..21f03839430 100644 --- a/apps/files_encryption/tests/keymanager.php +++ b/apps/files_encryption/tests/keymanager.php @@ -28,17 +28,6 @@ class Test_Encryption_Keymanager extends \OCA\Files_Encryption\Tests\TestCase { public static function setUpBeforeClass() { parent::setUpBeforeClass(); - // reset backend - \OC_User::clearBackends(); - \OC_User::useBackend('database'); - - // Filesystem related hooks - \OCA\Encryption\Helper::registerFilesystemHooks(); - - // clear and register hooks - \OC_FileProxy::clearProxies(); - \OC_FileProxy::register(new OCA\Encryption\Proxy()); - // disable file proxy by default \OC_FileProxy::$enabled = false; @@ -78,9 +67,7 @@ class Test_Encryption_Keymanager extends \OCA\Files_Encryption\Tests\TestCase { } function tearDown() { - $this->view->deleteAll('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys'); - $this->view->deleteAll('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keyfiles'); - + $this->view->deleteAll('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys'); parent::tearDown(); } @@ -94,14 +81,6 @@ class Test_Encryption_Keymanager extends \OCA\Files_Encryption\Tests\TestCase { OC_App::enable('files_trashbin'); } - \OC_Hook::clear(); - \OC_FileProxy::clearProxies(); - - // Delete keys in /data/ - $view = new \OC\Files\View('/'); - $view->rmdir('public-keys'); - $view->rmdir('owncloud_private_key'); - parent::tearDownAfterClass(); } @@ -140,27 +119,6 @@ class Test_Encryption_Keymanager extends \OCA\Files_Encryption\Tests\TestCase { $this->assertArrayHasKey('key', $sslInfo); } - function fileNameFromShareKeyProvider() { - return array( - array('file.user.shareKey', 'user', 'file'), - array('file.name.with.dots.user.shareKey', 'user', 'file.name.with.dots'), - array('file.name.user.with.dots.shareKey', 'user.with.dots', 'file.name'), - array('file.txt', 'user', false), - array('user.shareKey', 'user', false), - ); - } - - /** - * @small - * - * @dataProvider fileNameFromShareKeyProvider - */ - function testGetFilenameFromShareKey($fileName, $user, $expectedFileName) { - $this->assertEquals($expectedFileName, - \TestProtectedKeymanagerMethods::testGetFilenameFromShareKey($fileName, $user) - ); - } - /** * @medium */ @@ -180,7 +138,7 @@ class Test_Encryption_Keymanager extends \OCA\Files_Encryption\Tests\TestCase { Encryption\Keymanager::setFileKey($this->view, $util, $file, $key); - $this->assertTrue($this->view->file_exists('/' . $this->userId . '/files_encryption/keyfiles/' . $file . '.key')); + $this->assertTrue($this->view->file_exists('/' . $this->userId . '/files_encryption/keys/' . $file . '/fileKey')); // cleanup $this->view->unlink('/' . $this->userId . '/files/' . $file); @@ -198,7 +156,7 @@ class Test_Encryption_Keymanager extends \OCA\Files_Encryption\Tests\TestCase { Encryption\Keymanager::setPrivateKey($key, 'dummyUser'); - $this->assertTrue($this->view->file_exists('/dummyUser/files_encryption/dummyUser.private.key')); + $this->assertTrue($this->view->file_exists('/dummyUser/files_encryption/dummyUser.privateKey')); //clean up $this->view->deleteAll('/dummyUser'); @@ -210,14 +168,19 @@ class Test_Encryption_Keymanager extends \OCA\Files_Encryption\Tests\TestCase { function testSetPrivateSystemKey() { $key = "dummy key"; - $keyName = "myDummyKey.private.key"; + $keyName = "myDummyKey"; + $encHeader = Encryption\Crypt::generateHeader(); Encryption\Keymanager::setPrivateSystemKey($key, $keyName); - $this->assertTrue($this->view->file_exists('/owncloud_private_key/' . $keyName)); + $this->assertTrue($this->view->file_exists('/files_encryption/' . $keyName . '.privateKey')); + + $result = Encryption\Keymanager::getPrivateSystemKey($keyName); + + $this->assertSame($encHeader . $key, $result); // clean up - $this->view->unlink('/owncloud_private_key/' . $keyName); + $this->view->unlink('/files_encryption/' . $keyName.'.privateKey'); } @@ -256,70 +219,78 @@ class Test_Encryption_Keymanager extends \OCA\Files_Encryption\Tests\TestCase { $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files/folder1/existingFile.txt', 'data'); // create folder structure for some dummy share key files - $this->view->mkdir('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1'); - $this->view->mkdir('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/subfolder'); - $this->view->mkdir('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/subfolder/subsubfolder'); + $this->view->mkdir('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1'); + $this->view->mkdir('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/existingFile.txt'); + $this->view->mkdir('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/file1'); + $this->view->mkdir('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/file2'); + $this->view->mkdir('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/subfolder'); + $this->view->mkdir('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/subfolder/file2'); + $this->view->mkdir('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/subfolder/subsubfolder'); + $this->view->mkdir('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/subfolder/subsubfolder/file1'); + $this->view->mkdir('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/subfolder/subsubfolder/file2'); // create some dummy share keys - $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/existingFile.txt.user1.shareKey', 'data'); - $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/existingFile.txt.' . Test_Encryption_Keymanager::TEST_USER . '.shareKey', 'data'); - $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/file1.user1.shareKey', 'data'); - $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/file1.user1.test.shareKey', 'data'); - $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/file1.test-keymanager-userxdot.shareKey', 'data'); - $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/file1.userx.' . Test_Encryption_Keymanager::TEST_USER . '.shareKey', 'data'); - $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/file1.' . Test_Encryption_Keymanager::TEST_USER . '.userx.shareKey', 'data'); - $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/file1.user1.' . Test_Encryption_Keymanager::TEST_USER . '.shareKey', 'data'); - $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/file1.' . Test_Encryption_Keymanager::TEST_USER . '.user1.shareKey', 'data'); - $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/file2.user2.shareKey', 'data'); - $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/file2.user3.shareKey', 'data'); - $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/subfolder/file2.user3.shareKey', 'data'); - $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/subfolder/subsubfolder/file1.user1.shareKey', 'data'); - $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/subfolder/subsubfolder/file2.user2.shareKey', 'data'); - $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/subfolder/subsubfolder/file2.user3.shareKey', 'data'); + $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/existingFile.txt/user1.shareKey', 'data'); + $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/existingFile.txt/' . Test_Encryption_Keymanager::TEST_USER . '.shareKey', 'data'); + $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/file1/user1.shareKey', 'data'); + $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/file1/user1.test.shareKey', 'data'); + $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/file1/test-keymanager-userxdot.shareKey', 'data'); + $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/file1/userx.' . Test_Encryption_Keymanager::TEST_USER . '.shareKey', 'data'); + $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/file1/' . Test_Encryption_Keymanager::TEST_USER . '.userx.shareKey', 'data'); + $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/file1/user1.' . Test_Encryption_Keymanager::TEST_USER . '.shareKey', 'data'); + $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/file1/' . Test_Encryption_Keymanager::TEST_USER . '.user1.shareKey', 'data'); + $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/file2/user2.shareKey', 'data'); + $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/file2/user3.shareKey', 'data'); + $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/subfolder/file2/user3.shareKey', 'data'); + $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/subfolder/subsubfolder/file1/user1.shareKey', 'data'); + $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/subfolder/subsubfolder/file2/user2.shareKey', 'data'); + $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/subfolder/subsubfolder/file2/user3.shareKey', 'data'); // recursive delete share keys from user1 and user2 - Encryption\Keymanager::delShareKey($this->view, array('user1', 'user2', Test_Encryption_Keymanager::TEST_USER), '/folder1/', Test_Encryption_Keymanager::TEST_USER); + Encryption\Keymanager::delShareKey($this->view, + array('user1', 'user2', Test_Encryption_Keymanager::TEST_USER), + Encryption\Keymanager::getKeyPath($this->view, new Encryption\Util($this->view, Test_Encryption_Keymanager::TEST_USER), '/folder1'), + Test_Encryption_Keymanager::TEST_USER, + '/folder1'); // check if share keys from user1 and user2 are deleted $this->assertFalse($this->view->file_exists( - '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/existingFile.user1.shareKey')); + '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/existingFile.txt/user1.shareKey')); $this->assertFalse($this->view->file_exists( - '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/file1.user1.shareKey')); + '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/file1/user1.shareKey')); $this->assertFalse($this->view->file_exists( - '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/file2.user2.shareKey')); + '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/file2/user2.shareKey')); $this->assertFalse($this->view->file_exists( - '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/subfolder/subsubfolder/file1.user1.shareKey')); + '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/subfolder/subsubfolder/file1/user1.shareKey')); $this->assertFalse($this->view->file_exists( - '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/subfolder/subsubfolder/file2.user2.shareKey')); + '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/subfolder/subsubfolder/file2/user2.shareKey')); // check if share keys from user3 still exists $this->assertTrue($this->view->file_exists( - '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/file2.user3.shareKey')); + '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/file2/user3.shareKey')); $this->assertTrue($this->view->file_exists( - '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/subfolder/subsubfolder/file2.user3.shareKey')); + '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/subfolder/subsubfolder/file2/user3.shareKey')); $this->assertTrue($this->view->file_exists( - '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/subfolder/file2.user3.shareKey')); + '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/subfolder/file2/user3.shareKey')); - // check if share keys for user or file with similar name + // check if share keys for user or file with similar name $this->assertTrue($this->view->file_exists( - '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/file1.user1.test.shareKey')); + '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/file1/user1.test.shareKey')); $this->assertTrue($this->view->file_exists( - '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/file1.test-keymanager-userxdot.shareKey')); + '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/file1/test-keymanager-userxdot.shareKey')); $this->assertTrue($this->view->file_exists( - '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/file1.' . Test_Encryption_Keymanager::TEST_USER . '.userx.shareKey')); + '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/file1/' . Test_Encryption_Keymanager::TEST_USER . '.userx.shareKey')); // FIXME: this case currently cannot be distinguished, needs further fixing - /* $this->assertTrue($this->view->file_exists( - '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/file1.userx.' . Test_Encryption_Keymanager::TEST_USER . '.shareKey')); + '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/file1/userx.' . Test_Encryption_Keymanager::TEST_USER . '.shareKey')); $this->assertTrue($this->view->file_exists( - '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/file1.user1.' . Test_Encryption_Keymanager::TEST_USER . '.shareKey')); + '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/file1/user1.' . Test_Encryption_Keymanager::TEST_USER . '.shareKey')); $this->assertTrue($this->view->file_exists( - '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/file1.' . Test_Encryption_Keymanager::TEST_USER . '.user1.shareKey')); - */ + '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/file1/' . Test_Encryption_Keymanager::TEST_USER . '.user1.shareKey')); // owner key from existing file should still exists because the file is still there $this->assertTrue($this->view->file_exists( - '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/existingFile.txt.' . Test_Encryption_Keymanager::TEST_USER . '.shareKey')); + '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keys/folder1/existingFile.txt/' . Test_Encryption_Keymanager::TEST_USER . '.shareKey')); // cleanup $this->view->deleteAll('/'.Test_Encryption_Keymanager::TEST_USER.'/files/folder1'); @@ -344,7 +315,12 @@ class Test_Encryption_Keymanager extends \OCA\Files_Encryption\Tests\TestCase { $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/existingFile.txt.' . Test_Encryption_Keymanager::TEST_USER . '.shareKey', 'data'); // recursive delete share keys from user1 and user2 - Encryption\Keymanager::delShareKey($this->view, array('user1', 'user2', Test_Encryption_Keymanager::TEST_USER), '/folder1/existingFile.txt', Test_Encryption_Keymanager::TEST_USER); + Encryption\Keymanager::delShareKey($this->view, + array('user1', 'user2', Test_Encryption_Keymanager::TEST_USER), + Encryption\Keymanager::getKeyPath($this->view, new Encryption\Util($this->view, Test_Encryption_Keymanager::TEST_USER), '/folder1/existingFile.txt'), + Test_Encryption_Keymanager::TEST_USER, + '/folder1/existingFile.txt'); + // check if share keys from user1 and user2 are deleted $this->assertFalse($this->view->file_exists( @@ -362,147 +338,16 @@ class Test_Encryption_Keymanager extends \OCA\Files_Encryption\Tests\TestCase { } - /** - * @medium - */ - function testDeleteFileKey() { - - $this->view->mkdir('/'.Test_Encryption_Keymanager::TEST_USER.'/files/folder1'); - $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files/folder1/existingFile.txt', 'data'); - - // create folder structure for some dummy file key files - $this->view->mkdir('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keyfiles/folder1'); - - // create dummy keyfile - $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keyfiles/folder1/dummyFile.txt.key', 'data'); - - // recursive delete share keys from user1 and user2 - $result = Encryption\Keymanager::deleteFileKey($this->view, '/folder1/existingFile.txt'); - $this->assertFalse($result); - - $result2 = Encryption\Keymanager::deleteFileKey($this->view, '/folder1/dummyFile.txt'); - $this->assertTrue($result2); - - // check if file key from dummyFile was deleted - $this->assertFalse($this->view->file_exists( - '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keyfiles/folder1/dummyFile.txt.key')); - - // check if file key from existing file still exists - $this->assertTrue($this->view->file_exists( - '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keyfiles/folder1/existingFile.txt.key')); - - // cleanup - $this->view->deleteAll('/'.Test_Encryption_Keymanager::TEST_USER.'/files/folder1'); - - } - - /** - * @medium - */ - function testDeleteFileKeyFolder() { - - $this->view->mkdir('/'.Test_Encryption_Keymanager::TEST_USER.'/files/folder1'); - $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files/folder1/existingFile.txt', 'data'); - - // create folder structure for some dummy file key files - $this->view->mkdir('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keyfiles/folder1'); - - // create dummy keyfile - $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keyfiles/folder1/dummyFile.txt.key', 'data'); - - // recursive delete share keys from user1 and user2 - $result = Encryption\Keymanager::deleteFileKey($this->view, '/folder1'); - $this->assertFalse($result); - - // all file keys should still exists if we try to delete a folder with keys for which some files still exists - $this->assertTrue($this->view->file_exists( - '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keyfiles/folder1/dummyFile.txt.key')); - $this->assertTrue($this->view->file_exists( - '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keyfiles/folder1/existingFile.txt.key')); - - // delete folder - $this->view->unlink('/'.Test_Encryption_Keymanager::TEST_USER.'/files/folder1'); - // create dummy keyfile - $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keyfiles/folder1/dummyFile.txt.key', 'data'); - - // now file keys should be deleted since the folder no longer exists - $result = Encryption\Keymanager::deleteFileKey($this->view, '/folder1'); - $this->assertTrue($result); - - $this->assertFalse($this->view->file_exists( - '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/keyfiles/folder1')); - - // cleanup - $this->view->deleteAll('/'.Test_Encryption_Keymanager::TEST_USER.'/files/folder1'); - - } - - function testDelAllShareKeysFile() { - $this->view->mkdir('/'.Test_Encryption_Keymanager::TEST_USER.'/files/folder1'); - $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files/folder1/existingFile.txt', 'data'); - - // create folder structure for some dummy share key files - $this->view->mkdir('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1'); - - // create some dummy share keys for the existing file - $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/existingFile.txt.user1.shareKey', 'data'); - $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/existingFile.txt.user2.shareKey', 'data'); - $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/existingFile.txt.user3.shareKey', 'data'); - $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/existingFile.txt.' . Test_Encryption_Keymanager::TEST_USER . '.shareKey', 'data'); - - // create some dummy share keys for a non-existing file - $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/nonexistingFile.txt.user1.shareKey', 'data'); - $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/nonexistingFile.txt.user2.shareKey', 'data'); - $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/nonexistingFile.txt.user3.shareKey', 'data'); - $this->view->file_put_contents('/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/nonexistingFile.txt.' . Test_Encryption_Keymanager::TEST_USER . '.shareKey', 'data'); - - // try to del all share keys from a existing file, should fail because the file still exists - $result = Encryption\Keymanager::delAllShareKeys($this->view, Test_Encryption_Keymanager::TEST_USER, 'folder1/existingFile.txt'); - $this->assertFalse($result); - - // check if share keys still exists - $this->assertTrue($this->view->file_exists( - '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/existingFile.txt.' . Test_Encryption_Keymanager::TEST_USER . '.shareKey')); - $this->assertTrue($this->view->file_exists( - '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/existingFile.txt.user1.shareKey')); - $this->assertTrue($this->view->file_exists( - '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/existingFile.txt.user2.shareKey')); - $this->assertTrue($this->view->file_exists( - '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/existingFile.txt.user3.shareKey')); - - // try to del all share keys from file, should succeed because the does not exist any more - $result2 = Encryption\Keymanager::delAllShareKeys($this->view, Test_Encryption_Keymanager::TEST_USER, 'folder1/nonexistingFile.txt'); - $this->assertTrue($result2); - - // check if share keys are really gone - $this->assertFalse($this->view->file_exists( - '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/nonexistingFile.txt.' . Test_Encryption_Keymanager::TEST_USER . '.shareKey')); - // check that it only deleted keys or users who had access, others remain - $this->assertTrue($this->view->file_exists( - '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/nonexistingFile.txt.user1.shareKey')); - $this->assertTrue($this->view->file_exists( - '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/nonexistingFile.txt.user2.shareKey')); - $this->assertTrue($this->view->file_exists( - '/'.Test_Encryption_Keymanager::TEST_USER.'/files_encryption/share-keys/folder1/nonexistingFile.txt.user3.shareKey')); - - // cleanup - $this->view->deleteAll('/'.Test_Encryption_Keymanager::TEST_USER.'/files/folder1'); - - } - function testKeySetPreperation() { $basePath = '/'.Test_Encryption_Keymanager::TEST_USER.'/files'; $path = '/folder1/subfolder/subsubfolder/file.txt'; $this->assertFalse($this->view->is_dir($basePath . '/testKeySetPreperation')); - $result = TestProtectedKeymanagerMethods::testKeySetPreperation($this->view, $path, $basePath); - - // return path without leading slash - $this->assertSame('folder1/subfolder/subsubfolder/file.txt', $result); + TestProtectedKeymanagerMethods::testKeySetPreperation($this->view, $basePath . $path); // check if directory structure was created - $this->assertTrue($this->view->is_dir($basePath . '/folder1/subfolder/subsubfolder')); + $this->assertTrue($this->view->is_dir($basePath . $path)); // cleanup $this->view->deleteAll($basePath . '/folder1'); @@ -516,18 +361,11 @@ class Test_Encryption_Keymanager extends \OCA\Files_Encryption\Tests\TestCase { class TestProtectedKeymanagerMethods extends \OCA\Encryption\Keymanager { /** - * @param string $sharekey - */ - public static function testGetFilenameFromShareKey($sharekey, $user) { - return self::getFilenameFromShareKey($sharekey, $user); - } - - /** * @param \OC\Files\View $view relative to data/ * @param string $path * @param string $basePath */ - public static function testKeySetPreperation($view, $path, $basePath) { - return self::keySetPreparation($view, $path, $basePath); + public static function testKeySetPreperation($view, $path) { + return self::keySetPreparation($view, $path); } } diff --git a/apps/files_encryption/tests/migration.php b/apps/files_encryption/tests/migration.php index 8ca2e94c90a..21c4e354c29 100644 --- a/apps/files_encryption/tests/migration.php +++ b/apps/files_encryption/tests/migration.php @@ -2,8 +2,9 @@ /** * ownCloud * - * @author Thomas Müller - * @copyright 2014 Thomas Müller deepdiver@owncloud.com + * @copyright (C) 2014 ownCloud, Inc. + * + * @author Bjoern Schiessle <schiessle@owncloud.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE @@ -23,7 +24,29 @@ use OCA\Encryption; use OCA\Files_Encryption\Migration; -class Test_Migration extends \Test\TestCase { +class Test_Migration extends \OCA\Files_Encryption\Tests\TestCase { + + const TEST_ENCRYPTION_MIGRATION_USER1='test_encryption_user1'; + const TEST_ENCRYPTION_MIGRATION_USER2='test_encryption_user2'; + const TEST_ENCRYPTION_MIGRATION_USER3='test_encryption_user3'; + + private $view; + private $public_share_key_id; + private $recovery_key_id; + + public static function setUpBeforeClass() { + parent::setUpBeforeClass(); + self::loginHelper(self::TEST_ENCRYPTION_MIGRATION_USER1, true); + self::loginHelper(self::TEST_ENCRYPTION_MIGRATION_USER2, true); + self::loginHelper(self::TEST_ENCRYPTION_MIGRATION_USER3, true); + } + + public static function tearDownAfterClass() { + \OC_User::deleteUser(self::TEST_ENCRYPTION_MIGRATION_USER1); + \OC_User::deleteUser(self::TEST_ENCRYPTION_MIGRATION_USER2); + \OC_User::deleteUser(self::TEST_ENCRYPTION_MIGRATION_USER3); + parent::tearDownAfterClass(); + } protected function tearDown() { if (OC_DB::tableExists('encryption_test')) { @@ -34,26 +57,17 @@ class Test_Migration extends \Test\TestCase { parent::tearDown(); } - protected function setUp() { - parent::setUp(); - + public function setUp() { + $this->loginHelper(self::TEST_ENCRYPTION_MIGRATION_USER1); + $this->view = new \OC\Files\View(); + $this->public_share_key_id = Encryption\Helper::getPublicShareKeyId(); + $this->recovery_key_id = Encryption\Helper::getRecoveryKeyId(); if (OC_DB::tableExists('encryption_test')) { OC_DB::dropTable('encryption_test'); } $this->assertTableNotExist('encryption_test'); } - public function testEncryptionTableDoesNotExist() { - - $this->assertTableNotExist('encryption_test'); - - $migration = new Migration('encryption_test'); - $migration->dropTableEncryption(); - - $this->assertTableNotExist('encryption_test'); - - } - public function checkLastIndexId() { $query = \OC_DB::prepare('INSERT INTO `*PREFIX*share` (' .' `item_type`, `item_source`, `item_target`, `share_type`,' @@ -91,89 +105,160 @@ class Test_Migration extends \Test\TestCase { $this->checkLastIndexId(); } - public function testDataMigration() { - // TODO travis - if (getenv('TRAVIS')) { - $this->markTestSkipped('Fails on travis'); + /** + * @param string $table + */ + public function assertTableNotExist($table) { + $type=OC_Config::getValue( "dbtype", "sqlite" ); + if( $type == 'sqlite' || $type == 'sqlite3' ) { + // sqlite removes the tables after closing the DB + $this->assertTrue(true); + } else { + $this->assertFalse(OC_DB::tableExists($table), 'Table ' . $table . ' exists.'); } - - $this->assertTableNotExist('encryption_test'); - - // create test table - OC_DB::createDbFromStructure(__DIR__ . '/encryption_table.xml'); - $this->assertTableExist('encryption_test'); - - OC_DB::executeAudited('INSERT INTO `*PREFIX*encryption_test` values(?, ?, ?, ?)', - array('user1', 'server-side', 1, 1)); - - // preform migration - $migration = new Migration('encryption_test'); - $migration->dropTableEncryption(); - - // assert - $this->assertTableNotExist('encryption_test'); - - $rec = \OC_Preferences::getValue('user1', 'files_encryption', 'recovery_enabled'); - $mig = \OC_Preferences::getValue('user1', 'files_encryption', 'migration_status'); - - $this->assertEquals(1, $rec); - $this->assertEquals(1, $mig); } - public function testDuplicateDataMigration() { - // TODO travis - if (getenv('TRAVIS')) { - $this->markTestSkipped('Fails on travis'); + protected function createDummyShareKeys($uid) { + $this->view->mkdir($uid . '/files_encryption/share-keys/folder1/folder2/folder3'); + $this->view->mkdir($uid . '/files_encryption/share-keys/folder2/'); + $this->view->file_put_contents($uid . '/files_encryption/share-keys/folder1/folder2/folder3/file3.' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.shareKey' , 'data'); + $this->view->file_put_contents($uid . '/files_encryption/share-keys/folder1/folder2/folder3/file3.' . self::TEST_ENCRYPTION_MIGRATION_USER2 . '.shareKey' , 'data'); + $this->view->file_put_contents($uid . '/files_encryption/share-keys/folder1/folder2/folder3/file3.' . self::TEST_ENCRYPTION_MIGRATION_USER3 . '.shareKey' , 'data'); + $this->view->file_put_contents($uid . '/files_encryption/share-keys/folder1/folder2/file2.' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.shareKey' , 'data'); + $this->view->file_put_contents($uid . '/files_encryption/share-keys/folder1/folder2/file2.' . self::TEST_ENCRYPTION_MIGRATION_USER2 . '.shareKey' , 'data'); + $this->view->file_put_contents($uid . '/files_encryption/share-keys/folder1/folder2/file2.' . self::TEST_ENCRYPTION_MIGRATION_USER3 . '.shareKey' , 'data'); + $this->view->file_put_contents($uid . '/files_encryption/share-keys/folder1/file.1.' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.shareKey' , 'data'); + $this->view->file_put_contents($uid . '/files_encryption/share-keys/folder1/file.1.' . self::TEST_ENCRYPTION_MIGRATION_USER2 . '.shareKey' , 'data'); + $this->view->file_put_contents($uid . '/files_encryption/share-keys/folder1/file.1.' . self::TEST_ENCRYPTION_MIGRATION_USER3 . '.shareKey' , 'data'); + $this->view->file_put_contents($uid . '/files_encryption/share-keys/folder2/file.2.1.' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.shareKey' , 'data'); + $this->view->file_put_contents($uid . '/files_encryption/share-keys/folder2/file.2.1.' . self::TEST_ENCRYPTION_MIGRATION_USER2 . '.shareKey' , 'data'); + $this->view->file_put_contents($uid . '/files_encryption/share-keys/folder2/file.2.1.' . self::TEST_ENCRYPTION_MIGRATION_USER3 . '.shareKey' , 'data'); + if ($this->public_share_key_id) { + $this->view->file_put_contents($uid . '/files_encryption/share-keys/folder2/file.2.1.' . $this->public_share_key_id . '.shareKey' , 'data'); } - - // create test table - OC_DB::createDbFromStructure(__DIR__ . '/encryption_table.xml'); - - // in case of duplicate entries we want to preserve 0 on migration status and 1 on recovery - $data = array( - array('user1', 'server-side', 1, 1), - array('user1', 'server-side', 1, 0), - array('user1', 'server-side', 0, 1), - array('user1', 'server-side', 0, 0), - ); - foreach ($data as $d) { - OC_DB::executeAudited( - 'INSERT INTO `*PREFIX*encryption_test` values(?, ?, ?, ?)', - $d); + if ($this->recovery_key_id) { + $this->view->file_put_contents($uid . '/files_encryption/share-keys/folder2/file.2.1.' . $this->recovery_key_id . '.shareKey' , 'data'); } + } - // preform migration - $migration = new Migration('encryption_test'); - $migration->dropTableEncryption(); + protected function createDummyFileKeys($uid) { + $this->view->mkdir($uid . '/files_encryption/keyfiles/folder1/folder2/folder3'); + $this->view->mkdir($uid . '/files_encryption/keyfiles/folder2/'); + $this->view->file_put_contents($uid . '/files_encryption/keyfiles/folder1/folder2/folder3/file3.key' , 'data'); + $this->view->file_put_contents($uid . '/files_encryption/keyfiles/folder1/folder2/file2.key' , 'data'); + $this->view->file_put_contents($uid . '/files_encryption/keyfiles/folder1/file.1.key' , 'data'); + $this->view->file_put_contents($uid . '/files_encryption/keyfiles/folder2/file.2.1.key' , 'data'); + } - // assert - $this->assertTableNotExist('encryption_test'); + protected function createDummyFilesInTrash($uid) { + $this->view->mkdir($uid . '/files_trashbin/share-keys'); + $this->view->mkdir($uid . '/files_trashbin/share-keys/folder1.d7437648723'); + $this->view->file_put_contents($uid . '/files_trashbin/share-keys/file1.' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.shareKey.d5457864' , 'data'); + $this->view->file_put_contents($uid . '/files_trashbin/share-keys/file1.' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.shareKey.d5457864' , 'data'); + $this->view->file_put_contents($uid . '/files_trashbin/share-keys/folder1.d7437648723/file2.' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.shareKey' , 'data'); + + $this->view->mkdir($uid . '/files_trashbin/keyfiles'); + $this->view->mkdir($uid . '/files_trashbin/keyfiles/folder1.d7437648723'); + $this->view->file_put_contents($uid . '/files_trashbin/keyfiles/file1.key.d5457864' , 'data'); + $this->view->file_put_contents($uid . '/files_trashbin/keyfiles/folder1.d7437648723/file2.key' , 'data'); + } + + protected function createDummySystemWideKeys() { + $this->view->mkdir('owncloud_private_key'); + $this->view->file_put_contents('owncloud_private_key/systemwide_1.private.key', 'data'); + $this->view->file_put_contents('owncloud_private_key/systemwide_2.private.key', 'data'); + } - $rec = \OC_Preferences::getValue('user1', 'files_encryption', 'recovery_enabled'); - $mig = \OC_Preferences::getValue('user1', 'files_encryption', 'migration_status'); + public function testMigrateToNewFolderStructure() { + + // go back to the state before migration + $this->view->rename('/files_encryption/public_keys', '/public-keys'); + $this->view->rename('/public-keys/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.publicKey', '/public-keys/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.public.key'); + $this->view->rename('/public-keys/' . self::TEST_ENCRYPTION_MIGRATION_USER2 . '.publicKey', '/public-keys/' . self::TEST_ENCRYPTION_MIGRATION_USER2 . '.public.key'); + $this->view->rename('/public-keys/' . self::TEST_ENCRYPTION_MIGRATION_USER3 . '.publicKey', '/public-keys/' . self::TEST_ENCRYPTION_MIGRATION_USER3 . '.public.key'); + $this->view->deleteAll(self::TEST_ENCRYPTION_MIGRATION_USER1 . '/files_encryption/keys'); + $this->view->deleteAll(self::TEST_ENCRYPTION_MIGRATION_USER2 . '/files_encryption/keys'); + $this->view->deleteAll(self::TEST_ENCRYPTION_MIGRATION_USER3 . '/files_encryption/keys'); + $this->view->rename(self::TEST_ENCRYPTION_MIGRATION_USER1 . '/files_encryption/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.privateKey', + self::TEST_ENCRYPTION_MIGRATION_USER1 . '/files_encryption/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.private.key'); + $this->view->rename(self::TEST_ENCRYPTION_MIGRATION_USER2 . '/files_encryption/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.privateKey', + self::TEST_ENCRYPTION_MIGRATION_USER2 . '/files_encryption/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.private.key'); + $this->view->rename(self::TEST_ENCRYPTION_MIGRATION_USER3 . '/files_encryption/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.privateKey', + self::TEST_ENCRYPTION_MIGRATION_USER3 . '/files_encryption/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.private.key'); + + $this->createDummyShareKeys(self::TEST_ENCRYPTION_MIGRATION_USER1); + $this->createDummyShareKeys(self::TEST_ENCRYPTION_MIGRATION_USER2); + $this->createDummyShareKeys(self::TEST_ENCRYPTION_MIGRATION_USER3); + + $this->createDummyFileKeys(self::TEST_ENCRYPTION_MIGRATION_USER1); + $this->createDummyFileKeys(self::TEST_ENCRYPTION_MIGRATION_USER2); + $this->createDummyFileKeys(self::TEST_ENCRYPTION_MIGRATION_USER3); + + $this->createDummyFilesInTrash(self::TEST_ENCRYPTION_MIGRATION_USER2); + + // no user for system wide mount points + $this->createDummyFileKeys(''); + $this->createDummyShareKeys(''); + + $this->createDummySystemWideKeys(); + + $m = new \OCA\Files_Encryption\Migration(); + $m->reorganizeFolderStructure(); + + // TODO Verify that all files at the right place + $this->assertTrue($this->view->file_exists('/files_encryption/public_keys/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.publicKey')); + $this->assertTrue($this->view->file_exists('/files_encryption/public_keys/' . self::TEST_ENCRYPTION_MIGRATION_USER2 . '.publicKey')); + $this->assertTrue($this->view->file_exists('/files_encryption/public_keys/' . self::TEST_ENCRYPTION_MIGRATION_USER3 . '.publicKey')); + $this->verifyNewKeyPath(self::TEST_ENCRYPTION_MIGRATION_USER1); + $this->verifyNewKeyPath(self::TEST_ENCRYPTION_MIGRATION_USER2); + $this->verifyNewKeyPath(self::TEST_ENCRYPTION_MIGRATION_USER3); + // system wide keys + $this->verifyNewKeyPath(''); + // trash + $this->verifyFilesInTrash(self::TEST_ENCRYPTION_MIGRATION_USER2); - $this->assertEquals(1, $rec); - $this->assertEquals(0, $mig); } - /** - * @param string $table - */ - public function assertTableExist($table) { - $this->assertTrue(OC_DB::tableExists($table), 'Table ' . $table . ' does not exist'); + protected function verifyFilesInTrash($uid) { + // share keys + $this->view->file_exists($uid . '/files_trashbin/keys/file1.d5457864/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.shareKey.d5457864' , 'data'); + $this->view->file_exists($uid . '/files_trashbin/keys/file1.d5457864/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.shareKey.d5457864' , 'data'); + $this->view->file_exists($uid . '/files_trashbin/keys/folder1.d7437648723/file2/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.shareKey' , 'data'); + + // file keys + $this->view->file_exists($uid . '/files_trashbin/keys/file1.d5457864/fileKey.d5457864' , 'data'); + $this->view->file_exists($uid . '/files_trashbin/keyfiles/file1.d5457864/fileKey.d5457864' , 'data'); + $this->view->file_exists($uid . '/files_trashbin/keyfiles/folder1.d7437648723/file2/fileKey' , 'data'); } - /** - * @param string $table - */ - public function assertTableNotExist($table) { - $type=OC_Config::getValue( "dbtype", "sqlite" ); - if( $type == 'sqlite' || $type == 'sqlite3' ) { - // sqlite removes the tables after closing the DB - $this->assertTrue(true); - } else { - $this->assertFalse(OC_DB::tableExists($table), 'Table ' . $table . ' exists.'); + protected function verifyNewKeyPath($uid) { + // private key + if ($uid !== '') { + $this->assertTrue($this->view->file_exists($uid . '/files_encryption/' . $uid . '.privateKey')); + } + // file keys + $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder1/folder2/folder3/file3/fileKey')); + $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder1/folder2/file2/fileKey')); + $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder1/file.1/fileKey')); + $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder2/file.2.1/fileKey')); + // share keys + $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder1/folder2/folder3/file3/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.shareKey')); + $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder1/folder2/folder3/file3/' . self::TEST_ENCRYPTION_MIGRATION_USER2 . '.shareKey')); + $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder1/folder2/folder3/file3/' . self::TEST_ENCRYPTION_MIGRATION_USER3 . '.shareKey')); + $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder1/folder2/file2/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.shareKey')); + $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder1/folder2/file2/' . self::TEST_ENCRYPTION_MIGRATION_USER2 . '.shareKey')); + $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder1/folder2/file2/' . self::TEST_ENCRYPTION_MIGRATION_USER3 . '.shareKey')); + $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder1/file.1/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.shareKey')); + $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder1/file.1/' . self::TEST_ENCRYPTION_MIGRATION_USER2 . '.shareKey')); + $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder1/file.1/' . self::TEST_ENCRYPTION_MIGRATION_USER3 . '.shareKey')); + $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder2/file.2.1/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.shareKey')); + $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder2/file.2.1/' . self::TEST_ENCRYPTION_MIGRATION_USER2 . '.shareKey')); + $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder2/file.2.1/' . self::TEST_ENCRYPTION_MIGRATION_USER3 . '.shareKey')); + if ($this->public_share_key_id) { + $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder2/file.2.1/' . $this->public_share_key_id . '.shareKey')); + } + if ($this->recovery_key_id) { + $this->assertTrue($this->view->file_exists($uid . '/files_encryption/keys/folder2/file.2.1/' . $this->recovery_key_id . '.shareKey')); } } - } diff --git a/apps/files_encryption/tests/proxy.php b/apps/files_encryption/tests/proxy.php index a91222327f1..72a9a9a5551 100644 --- a/apps/files_encryption/tests/proxy.php +++ b/apps/files_encryption/tests/proxy.php @@ -44,20 +44,6 @@ class Test_Encryption_Proxy extends \OCA\Files_Encryption\Tests\TestCase { public static function setUpBeforeClass() { parent::setUpBeforeClass(); - // reset backend - \OC_User::clearBackends(); - \OC_User::useBackend('database'); - - \OC_Hook::clear('OC_Filesystem'); - \OC_Hook::clear('OC_User'); - - // Filesystem related hooks - \OCA\Encryption\Helper::registerFilesystemHooks(); - - // clear and register hooks - \OC_FileProxy::clearProxies(); - \OC_FileProxy::register(new OCA\Encryption\Proxy()); - // create test user self::loginHelper(\Test_Encryption_Proxy::TEST_ENCRYPTION_PROXY_USER1, true); } @@ -85,14 +71,6 @@ class Test_Encryption_Proxy extends \OCA\Files_Encryption\Tests\TestCase { // cleanup test user \OC_User::deleteUser(\Test_Encryption_Proxy::TEST_ENCRYPTION_PROXY_USER1); - \OC_Hook::clear(); - \OC_FileProxy::clearProxies(); - - // Delete keys in /data/ - $view = new \OC\Files\View('/'); - $view->rmdir('public-keys'); - $view->rmdir('owncloud_private_key'); - parent::tearDownAfterClass(); } diff --git a/apps/files_encryption/tests/share.php b/apps/files_encryption/tests/share.php index 20ee2cc7064..f827017569f 100755 --- a/apps/files_encryption/tests/share.php +++ b/apps/files_encryption/tests/share.php @@ -47,30 +47,15 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { public static function setUpBeforeClass() { parent::setUpBeforeClass(); - // reset backend - \OC_User::clearBackends(); - \OC_User::useBackend('database'); - // enable resharing \OC::$server->getAppConfig()->setValue('core', 'shareapi_allow_resharing', 'yes'); - // clear share hooks - \OC_Hook::clear('OCP\\Share'); - // register share hooks \OC::registerShareHooks(); \OCA\Files_Sharing\Helper::registerHooks(); - // Sharing related hooks - \OCA\Encryption\Helper::registerShareHooks(); - - // Filesystem related hooks - \OCA\Encryption\Helper::registerFilesystemHooks(); - // clear and register hooks - \OC_FileProxy::clearProxies(); \OC_FileProxy::register(new OCA\Files\Share\Proxy()); - \OC_FileProxy::register(new OCA\Encryption\Proxy()); // create users self::loginHelper(\Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1, true); @@ -127,14 +112,6 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { \OC_User::deleteUser(\Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3); \OC_User::deleteUser(\Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER4); - \OC_Hook::clear(); - \OC_FileProxy::clearProxies(); - - // Delete keys in /data/ - $view = new \OC\Files\View('/'); - $view->rmdir('public-keys'); - $view->rmdir('owncloud_private_key'); - parent::tearDownAfterClass(); } @@ -171,15 +148,15 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { \OC_FileProxy::$enabled = $proxyStatus; // share the file - \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2, OCP\PERMISSION_ALL); + \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2, \OCP\Constants::PERMISSION_ALL); // login as admin self::loginHelper(\Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1); // check if share key for user1 exists $this->assertTrue($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); // login as user1 self::loginHelper(\Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2); @@ -202,8 +179,8 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { // check if share key not exists $this->assertFalse($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); // cleanup $this->view->chroot('/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files/'); @@ -212,8 +189,8 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { // check if share key not exists $this->assertFalse($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey')); + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey')); } } @@ -232,15 +209,15 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '/files/' . $this->filename); // share the file with user3 - \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3, OCP\PERMISSION_ALL); + \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3, \OCP\Constants::PERMISSION_ALL); // login as admin self::loginHelper(\Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1); // check if share key for user2 exists $this->assertTrue($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3 . '.shareKey')); + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3 . '.shareKey')); // login as user2 self::loginHelper(\Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3); @@ -266,16 +243,16 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { // check if share key not exists $this->assertFalse($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3 . '.shareKey')); + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3 . '.shareKey')); // unshare the file with user1 \OCP\Share::unshare('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2); // check if share key not exists $this->assertFalse($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); // cleanup $this->view->chroot('/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files/'); @@ -284,8 +261,8 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { // check if share key not exists $this->assertFalse($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey')); + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey')); } } @@ -328,16 +305,16 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { \OC_FileProxy::$enabled = $proxyStatus; // share the folder with user1 - \OCP\Share::shareItem('folder', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2, OCP\PERMISSION_ALL); + \OCP\Share::shareItem('folder', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2, \OCP\Constants::PERMISSION_ALL); // login as admin self::loginHelper(\Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1); // check if share key for user1 exists $this->assertTrue($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys' . $this->folder1 + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys' . $this->folder1 . $this->subfolder . $this->subsubfolder . '/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); // login as user1 self::loginHelper(\Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2); @@ -361,9 +338,9 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { // check if share key not exists $this->assertFalse($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys' + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys' . $this->folder1 . $this->subfolder . $this->subsubfolder . '/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); // cleanup $this->view->chroot('/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files'); @@ -372,9 +349,9 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { // check if share key not exists $this->assertFalse($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys' + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys' . $this->folder1 . $this->subfolder . $this->subsubfolder . '/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey')); + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey')); } return $fileInfo; @@ -406,16 +383,16 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { \OC_FileProxy::$enabled = $proxyStatus; // share the file with user3 - \OCP\Share::shareItem('folder', $fileInfoSubFolder['fileid'], \OCP\Share::SHARE_TYPE_USER, \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3, OCP\PERMISSION_ALL); + \OCP\Share::shareItem('folder', $fileInfoSubFolder['fileid'], \OCP\Share::SHARE_TYPE_USER, \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3, \OCP\Constants::PERMISSION_ALL); // login as admin self::loginHelper(\Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1); // check if share key for user3 exists $this->assertTrue($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys' . $this->folder1 + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys' . $this->folder1 . $this->subfolder . $this->subsubfolder . '/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3 . '.shareKey')); + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3 . '.shareKey')); // login as user3 self::loginHelper(\Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3); @@ -437,16 +414,16 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { $this->assertTrue($fileInfo instanceof \OC\Files\FileInfo); // share the file with user3 - \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER4, OCP\PERMISSION_ALL); + \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER4, \OCP\Constants::PERMISSION_ALL); // login as admin self::loginHelper(\Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1); // check if share key for user3 exists $this->assertTrue($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys' . $this->folder1 + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys' . $this->folder1 . $this->subfolder . $this->subsubfolder . '/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER4 . '.shareKey')); + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER4 . '.shareKey')); // login as user3 self::loginHelper(\Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER4); @@ -469,9 +446,9 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { // check if share key not exists $this->assertFalse($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys' + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys' . $this->folder1 . $this->subfolder . $this->subsubfolder . '/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER4 . '.shareKey')); + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER4 . '.shareKey')); // login as user1 self::loginHelper(\Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2); @@ -481,9 +458,9 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { // check if share key not exists $this->assertFalse($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys' + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys' . $this->folder1 . $this->subfolder . $this->subsubfolder . '/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3 . '.shareKey')); + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3 . '.shareKey')); // login as admin self::loginHelper(\Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1); @@ -493,9 +470,9 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { // check if share key not exists $this->assertFalse($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys' + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys' . $this->folder1 . $this->subfolder . $this->subsubfolder . '/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); // cleanup $this->view->chroot('/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files'); @@ -504,9 +481,9 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { // check if share key not exists $this->assertFalse($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys' + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys' . $this->folder1 . $this->subfolder . $this->subsubfolder . '/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey')); + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey')); } } @@ -539,7 +516,7 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { \OC_FileProxy::$enabled = $proxyStatus; // share the file - \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_LINK, false, OCP\PERMISSION_ALL); + \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_LINK, false, \OCP\Constants::PERMISSION_ALL); // login as admin self::loginHelper(\Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1); @@ -548,8 +525,8 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { // check if share key for public exists $this->assertTrue($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys/' - . $this->filename . '.' . $publicShareKeyId . '.shareKey')); + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' + . $this->filename . '/' . $publicShareKeyId . '.shareKey')); // some hacking to simulate public link //$GLOBALS['app'] = 'files_sharing'; @@ -572,8 +549,8 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { // check if share key not exists $this->assertFalse($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys/' - . $this->filename . '.' . $publicShareKeyId . '.shareKey')); + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' + . $this->filename . '/' . $publicShareKeyId . '.shareKey')); // cleanup $this->view->chroot('/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files/'); @@ -582,8 +559,8 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { // check if share key not exists $this->assertFalse($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey')); + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey')); } /** @@ -617,18 +594,18 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { \OC_FileProxy::$enabled = $proxyStatus; // share the file - \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_GROUP, \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_GROUP1, OCP\PERMISSION_ALL); + \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_GROUP, \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_GROUP1, \OCP\Constants::PERMISSION_ALL); // login as admin self::loginHelper(\Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1); // check if share key for user2 and user3 exists $this->assertTrue($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3 . '.shareKey')); + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3 . '.shareKey')); $this->assertTrue($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER4 . '.shareKey')); + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER4 . '.shareKey')); // login as user1 self::loginHelper(\Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3); @@ -648,11 +625,11 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { // check if share key not exists $this->assertFalse($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3 . '.shareKey')); + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3 . '.shareKey')); $this->assertFalse($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER4 . '.shareKey')); + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER4 . '.shareKey')); // cleanup $this->view->chroot('/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files/'); @@ -661,8 +638,8 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { // check if share key not exists $this->assertFalse($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey')); + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey')); } @@ -708,19 +685,19 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { // check if share key for admin and recovery exists $this->assertTrue($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey')); + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey')); $this->assertTrue($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys/' - . $this->filename . '.' . $recoveryKeyId . '.shareKey')); + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' + . $this->filename . '/' . $recoveryKeyId . '.shareKey')); $this->assertTrue($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys/' . $this->folder1 + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' . $this->folder1 . $this->subfolder . $this->subsubfolder . '/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey')); + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey')); $this->assertTrue($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys/' . $this->folder1 + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' . $this->folder1 . $this->subfolder . $this->subsubfolder . '/' - . $this->filename . '.' . $recoveryKeyId . '.shareKey')); + . $this->filename . '/' . $recoveryKeyId . '.shareKey')); // disable recovery for admin $this->assertTrue($util->setRecoveryForUser(0)); @@ -730,12 +707,12 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { // check if share key for recovery not exists $this->assertFalse($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys/' - . $this->filename . '.' . $recoveryKeyId . '.shareKey')); + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' + . $this->filename . '/' . $recoveryKeyId . '.shareKey')); $this->assertFalse($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys/' . $this->folder1 + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' . $this->folder1 . $this->subfolder . $this->subsubfolder . '/' - . $this->filename . '.' . $recoveryKeyId . '.shareKey')); + . $this->filename . '/' . $recoveryKeyId . '.shareKey')); // enable recovery for admin $this->assertTrue($util->setRecoveryForUser(1)); @@ -745,12 +722,12 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { // check if share key for admin and recovery exists $this->assertTrue($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys/' - . $this->filename . '.' . $recoveryKeyId . '.shareKey')); + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' + . $this->filename . '/' . $recoveryKeyId . '.shareKey')); $this->assertTrue($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys/' . $this->folder1 + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' . $this->folder1 . $this->subfolder . $this->subsubfolder . '/' - . $this->filename . '.' . $recoveryKeyId . '.shareKey')); + . $this->filename . '/' . $recoveryKeyId . '.shareKey')); // cleanup $this->view->chroot('/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files/'); @@ -760,12 +737,12 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { // check if share key for recovery not exists $this->assertFalse($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys/' - . $this->filename . '.' . $recoveryKeyId . '.shareKey')); + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' + . $this->filename . '/' . $recoveryKeyId . '.shareKey')); $this->assertFalse($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys/' . $this->folder1 + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' . $this->folder1 . $this->subfolder . $this->subsubfolder . '/' - . $this->filename . '.' . $recoveryKeyId . '.shareKey')); + . $this->filename . '/' . $recoveryKeyId . '.shareKey')); $this->assertTrue(\OCA\Encryption\Helper::adminEnableRecovery(null, 'test123')); $this->assertTrue(\OCA\Encryption\Helper::adminDisableRecovery('test123')); @@ -815,19 +792,19 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { // check if share key for user and recovery exists $this->assertTrue($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '/files_encryption/share-keys/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '/files_encryption/keys/' + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); $this->assertTrue($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '/files_encryption/share-keys/' - . $this->filename . '.' . $recoveryKeyId . '.shareKey')); + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '/files_encryption/keys/' + . $this->filename . '/' . $recoveryKeyId . '.shareKey')); $this->assertTrue($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '/files_encryption/share-keys/' . $this->folder1 + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '/files_encryption/keys/' . $this->folder1 . $this->subfolder . $this->subsubfolder . '/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); $this->assertTrue($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '/files_encryption/share-keys/' . $this->folder1 + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '/files_encryption/keys/' . $this->folder1 . $this->subfolder . $this->subsubfolder . '/' - . $this->filename . '.' . $recoveryKeyId . '.shareKey')); + . $this->filename . '/' . $recoveryKeyId . '.shareKey')); // login as admin self::loginHelper(\Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1); @@ -859,19 +836,19 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { // check if share key for user and recovery exists $this->assertFalse($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '/files_encryption/share-keys/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '/files_encryption/keys/' + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); $this->assertFalse($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '/files_encryption/share-keys/' - . $this->filename . '.' . $recoveryKeyId . '.shareKey')); + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '/files_encryption/keys/' + . $this->filename . '/' . $recoveryKeyId . '.shareKey')); $this->assertFalse($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '/files_encryption/share-keys/' . $this->folder1 + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '/files_encryption/keys/' . $this->folder1 . $this->subfolder . $this->subsubfolder . '/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); $this->assertFalse($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '/files_encryption/share-keys/' . $this->folder1 + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '/files_encryption/keys/' . $this->folder1 . $this->subfolder . $this->subsubfolder . '/' - . $this->filename . '.' . $recoveryKeyId . '.shareKey')); + . $this->filename . '/' . $recoveryKeyId . '.shareKey')); // enable recovery for admin $this->assertTrue($util->setRecoveryForUser(0)); @@ -915,15 +892,15 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { $this->assertGreaterThan(0, $fileInfo['unencrypted_size']); // break users public key - $this->view->rename('/public-keys/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3 . '.public.key', - '/public-keys/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3 . '.public.key_backup'); + $this->view->rename(\OCA\Encryption\Keymanager::getPublicKeyPath() . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3 . '.publicKey', + \OCA\Encryption\Keymanager::getPublicKeyPath() . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3 . '.publicKey_backup'); // re-enable the file proxy \OC_FileProxy::$enabled = $proxyStatus; // share the file try { - \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_GROUP, \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_GROUP1, OCP\PERMISSION_ALL); + \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_GROUP, \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_GROUP1, \OCP\Constants::PERMISSION_ALL); } catch (Exception $e) { $this->assertEquals(0, strpos($e->getMessage(), "Following users are not set up for encryption")); } @@ -934,8 +911,8 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { // check if share key for user1 not exists $this->assertFalse($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3 . '.shareKey')); + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3 . '.shareKey')); // disable encryption proxy to prevent recursive calls $proxyStatus = \OC_FileProxy::$enabled; @@ -943,12 +920,12 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { // break user1 public key $this->view->rename( - '/public-keys/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3 . '.public.key_backup', - '/public-keys/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3 . '.public.key'); + \OCA\Encryption\Keymanager::getPublicKeyPath() . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3 . '.publicKey_backup', + \OCA\Encryption\Keymanager::getPublicKeyPath() . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3 . '.publicKey'); // remove share file - $this->view->unlink('/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3 + $this->view->unlink('/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3 . '.shareKey'); // re-enable the file proxy @@ -959,8 +936,8 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { // check if share key not exists $this->assertFalse($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3 . '.shareKey')); + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER3 . '.shareKey')); // cleanup $this->view->chroot('/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files/'); @@ -991,12 +968,12 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { $this->assertTrue($fileInfo instanceof \OC\Files\FileInfo); // share the file - \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2, OCP\PERMISSION_ALL); + \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2, \OCP\Constants::PERMISSION_ALL); // check if share key for user2 exists $this->assertTrue($this->view->file_exists( - '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/share-keys/' - . $this->filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); + '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files_encryption/keys/' + . $this->filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); // login as user2 @@ -1059,7 +1036,7 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { $this->assertTrue($fileInfo instanceof \OC\Files\FileInfo); // share the folder - \OCP\Share::shareItem('folder', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2, OCP\PERMISSION_ALL); + \OCP\Share::shareItem('folder', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2, \OCP\Constants::PERMISSION_ALL); \OC\Files\Filesystem::rename($folder, $newFolder); @@ -1068,10 +1045,10 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { $this->assertEquals($this->dataShort, $newDecrypt); // check if additional share key for user2 exists - $this->assertTrue($view->file_exists('files_encryption/share-keys' . $newFolder . '/' . $filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); + $this->assertTrue($view->file_exists('files_encryption/keys' . $newFolder . '/' . $filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); // check that old keys were removed/moved properly - $this->assertFalse($view->file_exists('files_encryption/share-keys' . $folder . '/' . $filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); + $this->assertFalse($view->file_exists('files_encryption/keys' . $folder . '/' . $filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); // tear down \OC\Files\Filesystem::unlink($newFolder); @@ -1117,11 +1094,11 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { $this->assertTrue($fileInfo instanceof \OC\Files\FileInfo); // share the folder - \OCP\Share::shareItem('folder', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2, OCP\PERMISSION_ALL); + \OCP\Share::shareItem('folder', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2, \OCP\Constants::PERMISSION_ALL); // check that the share keys exist - $this->assertTrue($view->file_exists('files_encryption/share-keys' . $folder . '/' . $filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey')); - $this->assertTrue($view->file_exists('files_encryption/share-keys' . $folder . '/' . $filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); + $this->assertTrue($view->file_exists('files_encryption/keys' . $folder . '/' . $filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey')); + $this->assertTrue($view->file_exists('files_encryption/keys' . $folder . '/' . $filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); // move the file into the subfolder as the test user self::loginHelper($userId); @@ -1133,12 +1110,12 @@ class Test_Encryption_Share extends \OCA\Files_Encryption\Tests\TestCase { $this->assertEquals($this->dataShort, $newDecrypt); // check if additional share key for user2 exists - $this->assertTrue($view->file_exists('files_encryption/share-keys' . $subFolder . '/' . $filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey')); - $this->assertTrue($view->file_exists('files_encryption/share-keys' . $subFolder . '/' . $filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); + $this->assertTrue($view->file_exists('files_encryption/keys' . $subFolder . '/' . $filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey')); + $this->assertTrue($view->file_exists('files_encryption/keys' . $subFolder . '/' . $filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); // check that old keys were removed/moved properly - $this->assertFalse($view->file_exists('files_encryption/share-keys' . $folder . '/' . $filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey')); - $this->assertFalse($view->file_exists('files_encryption/share-keys' . $folder . '/' . $filename . '.' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); + $this->assertFalse($view->file_exists('files_encryption/keys' . $folder . '/' . $filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '.shareKey')); + $this->assertFalse($view->file_exists('files_encryption/keys' . $folder . '/' . $filename . '/' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2 . '.shareKey')); // tear down \OC\Files\Filesystem::unlink($subFolder); diff --git a/apps/files_encryption/tests/stream.php b/apps/files_encryption/tests/stream.php index b1404ca282a..f4824935ca0 100644 --- a/apps/files_encryption/tests/stream.php +++ b/apps/files_encryption/tests/stream.php @@ -42,17 +42,6 @@ class Test_Encryption_Stream extends \OCA\Files_Encryption\Tests\TestCase { public static function setUpBeforeClass() { parent::setUpBeforeClass(); - // reset backend - \OC_User::clearBackends(); - \OC_User::useBackend('database'); - - // Filesystem related hooks - \OCA\Encryption\Helper::registerFilesystemHooks(); - - // clear and register hooks - \OC_FileProxy::clearProxies(); - \OC_FileProxy::register(new OCA\Encryption\Proxy()); - // create test user self::loginHelper(\Test_Encryption_Stream::TEST_ENCRYPTION_STREAM_USER1, true); } @@ -94,14 +83,6 @@ class Test_Encryption_Stream extends \OCA\Files_Encryption\Tests\TestCase { // cleanup test user \OC_User::deleteUser(\Test_Encryption_Stream::TEST_ENCRYPTION_STREAM_USER1); - \OC_Hook::clear(); - \OC_FileProxy::clearProxies(); - - // Delete keys in /data/ - $view = new \OC\Files\View('/'); - $view->rmdir('public-keys'); - $view->rmdir('owncloud_private_key'); - parent::tearDownAfterClass(); } diff --git a/apps/files_encryption/tests/testcase.php b/apps/files_encryption/tests/testcase.php index 3106aeda8ea..743a876ab45 100644 --- a/apps/files_encryption/tests/testcase.php +++ b/apps/files_encryption/tests/testcase.php @@ -14,6 +14,7 @@ use OCA\Encryption; * Class Test_Encryption_TestCase */ abstract class TestCase extends \Test\TestCase { + /** * @param string $user * @param bool $create @@ -50,4 +51,34 @@ abstract class TestCase extends \Test\TestCase { \OC_User::setUserId(false); \OC\Files\Filesystem::tearDown(); } + + public static function setUpBeforeClass() { + parent::setUpBeforeClass(); + + // reset backend + \OC_User::clearBackends(); + \OC_User::useBackend('database'); + + \OCA\Encryption\Helper::registerFilesystemHooks(); + \OCA\Encryption\Helper::registerUserHooks(); + \OCA\Encryption\Helper::registerShareHooks(); + + \OC::registerShareHooks(); + \OCP\Util::connectHook('OC_Filesystem', 'setup', '\OC\Files\Storage\Shared', 'setup'); + + // clear and register hooks + \OC_FileProxy::clearProxies(); + \OC_FileProxy::register(new \OCA\Encryption\Proxy()); + } + + public static function tearDownAfterClass() { + \OC_Hook::clear(); + \OC_FileProxy::clearProxies(); + + // Delete keys in /data/ + $view = new \OC\Files\View('/'); + $view->deleteAll('files_encryption'); + + parent::tearDownAfterClass(); + } } diff --git a/apps/files_encryption/tests/trashbin.php b/apps/files_encryption/tests/trashbin.php index a43e8f964a2..de5b8bd6edb 100755 --- a/apps/files_encryption/tests/trashbin.php +++ b/apps/files_encryption/tests/trashbin.php @@ -45,23 +45,9 @@ class Test_Encryption_Trashbin extends \OCA\Files_Encryption\Tests\TestCase { public static function setUpBeforeClass() { parent::setUpBeforeClass(); - // reset backend - \OC_User::clearBackends(); - \OC_User::useBackend('database'); - - \OC_Hook::clear('OC_Filesystem'); - \OC_Hook::clear('OC_User'); - // trashbin hooks \OCA\Files_Trashbin\Trashbin::registerHooks(); - // Filesystem related hooks - \OCA\Encryption\Helper::registerFilesystemHooks(); - - // clear and register hooks - \OC_FileProxy::clearProxies(); - \OC_FileProxy::register(new OCA\Encryption\Proxy()); - // create test user self::loginHelper(self::TEST_ENCRYPTION_TRASHBIN_USER1, true); } @@ -107,14 +93,6 @@ class Test_Encryption_Trashbin extends \OCA\Files_Encryption\Tests\TestCase { // cleanup test user \OC_User::deleteUser(self::TEST_ENCRYPTION_TRASHBIN_USER1); - \OC_Hook::clear(); - \OC_FileProxy::clearProxies(); - - // Delete keys in /data/ - $view = new \OC\Files\View('/'); - $view->rmdir('public-keys'); - $view->rmdir('owncloud_private_key'); - parent::tearDownAfterClass(); } @@ -138,22 +116,20 @@ class Test_Encryption_Trashbin extends \OCA\Files_Encryption\Tests\TestCase { // check if key for admin exists $this->assertTrue($this->view->file_exists( - '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keyfiles/' . $filename - . '.key')); + '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/' . $filename . '/fileKey')); $this->assertTrue($this->view->file_exists( - '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keyfiles/' . $filename2 - . '.key')); + '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/' . $filename2 . '/fileKey')); // check if share key for admin exists $this->assertTrue($this->view->file_exists( - '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/share-keys/' - . $filename . '.' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey')); + '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/' + . $filename . '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey')); $this->assertTrue($this->view->file_exists( - '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/share-keys/' - . $filename2 . '.' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey')); + '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/' + . $filename2 . '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey')); // delete first file - \OC\FIles\Filesystem::unlink($filename); + \OC\Files\Filesystem::unlink($filename); // check if file not exists $this->assertFalse($this->view->file_exists( @@ -161,13 +137,12 @@ class Test_Encryption_Trashbin extends \OCA\Files_Encryption\Tests\TestCase { // check if key for admin not exists $this->assertFalse($this->view->file_exists( - '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keyfiles/' . $filename - . '.key')); + '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/' . $filename . '/fileKey')); // check if share key for admin not exists $this->assertFalse($this->view->file_exists( - '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/share-keys/' - . $filename . '.' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey')); + '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/' + . $filename . '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey')); // check that second file still exists $this->assertTrue($this->view->file_exists( @@ -175,13 +150,12 @@ class Test_Encryption_Trashbin extends \OCA\Files_Encryption\Tests\TestCase { // check that key for second file still exists $this->assertTrue($this->view->file_exists( - '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keyfiles/' . $filename2 - . '.key')); + '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/' . $filename2 . '/fileKey')); // check that share key for second file still exists $this->assertTrue($this->view->file_exists( - '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/share-keys/' - . $filename2 . '.' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey')); + '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/' + . $filename2 . '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey')); // get files $trashFiles = $this->view->getDirectoryContent( @@ -199,15 +173,16 @@ class Test_Encryption_Trashbin extends \OCA\Files_Encryption\Tests\TestCase { // check if we found the file we created $this->assertNotNull($trashFileSuffix); + $this->assertTrue($this->view->is_dir('/' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_trashbin/keys/' . $filename . '.' . $trashFileSuffix)); + // check if key for admin not exists $this->assertTrue($this->view->file_exists( - '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_trashbin/keyfiles/' . $filename - . '.key.' . $trashFileSuffix)); + '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_trashbin/keys/' . $filename . '.' . $trashFileSuffix . '/fileKey')); // check if share key for admin not exists $this->assertTrue($this->view->file_exists( - '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_trashbin/share-keys/' . $filename - . '.' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey.' . $trashFileSuffix)); + '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_trashbin/keys/' . $filename + . '.' . $trashFileSuffix . '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey')); } /** @@ -242,6 +217,13 @@ class Test_Encryption_Trashbin extends \OCA\Files_Encryption\Tests\TestCase { // prepare file information $timestamp = str_replace('d', '', $trashFileSuffix); + // before calling the restore operation the keys shouldn't be there + $this->assertFalse($this->view->file_exists( + '/' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/' . $filename . '/fileKey')); + $this->assertFalse($this->view->file_exists( + '/' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/' + . $filename . '/' . \Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey')); + // restore first file $this->assertTrue(\OCA\Files_Trashbin\Trashbin::restore($filename . '.' . $trashFileSuffix, $filename, $timestamp)); @@ -251,13 +233,12 @@ class Test_Encryption_Trashbin extends \OCA\Files_Encryption\Tests\TestCase { // check if key for admin exists $this->assertTrue($this->view->file_exists( - '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keyfiles/' - . $filename . '.key')); + '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/' . $filename . '/fileKey')); // check if share key for admin exists $this->assertTrue($this->view->file_exists( - '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/share-keys/' - . $filename . '.' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey')); + '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/' + . $filename . '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey')); // check that second file was NOT restored $this->assertFalse($this->view->file_exists( @@ -265,13 +246,12 @@ class Test_Encryption_Trashbin extends \OCA\Files_Encryption\Tests\TestCase { // check if key for admin exists $this->assertFalse($this->view->file_exists( - '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keyfiles/' - . $filename2 . '.key')); + '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/' . $filename2 . '/fileKey')); // check if share key for admin exists $this->assertFalse($this->view->file_exists( - '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/share-keys/' - . $filename2 . '.' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey')); + '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/' + . $filename2 . '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey')); } /** @@ -291,13 +271,12 @@ class Test_Encryption_Trashbin extends \OCA\Files_Encryption\Tests\TestCase { // check if key for admin exists $this->assertTrue($this->view->file_exists( - '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keyfiles/' . $filename - . '.key')); + '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/' . $filename . '/fileKey')); // check if share key for admin exists $this->assertTrue($this->view->file_exists( - '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/share-keys/' - . $filename . '.' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey')); + '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/' + . $filename . '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey')); // delete file \OC\Files\Filesystem::unlink($filename); @@ -308,13 +287,13 @@ class Test_Encryption_Trashbin extends \OCA\Files_Encryption\Tests\TestCase { // check if key for admin not exists $this->assertFalse($this->view->file_exists( - '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keyfiles/' . $filename - . '.key')); + '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/' . $filename . '/' + . $filename . '.key')); // check if share key for admin not exists $this->assertFalse($this->view->file_exists( - '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/share-keys/' - . $filename . '.' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey')); + '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_encryption/keys/' + . $filename . '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey')); // find created file with timestamp $query = \OC_DB::prepare('SELECT `timestamp`,`type` FROM `*PREFIX*files_trash`' @@ -328,13 +307,13 @@ class Test_Encryption_Trashbin extends \OCA\Files_Encryption\Tests\TestCase { // check if key for admin exists $this->assertTrue($this->view->file_exists( - '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_trashbin/keyfiles/' . $filename - . '.key.' . $trashFileSuffix)); + '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_trashbin/keys/' . $filename + . '.' . $trashFileSuffix . '/fileKey')); // check if share key for admin exists $this->assertTrue($this->view->file_exists( - '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_trashbin/share-keys/' . $filename - . '.' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey.' . $trashFileSuffix)); + '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_trashbin/keys/' + . $filename . '.' . $trashFileSuffix . '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey')); // get timestamp from file $timestamp = str_replace('d', '', $trashFileSuffix); @@ -349,13 +328,13 @@ class Test_Encryption_Trashbin extends \OCA\Files_Encryption\Tests\TestCase { // check if key for admin not exists $this->assertFalse($this->view->file_exists( - '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_trashbin/keyfiles/' . $filename - . '.key.' . $trashFileSuffix)); + '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_trashbin/keys/' . $filename + . '.' . $trashFileSuffix . '/fileKey')); // check if share key for admin not exists $this->assertFalse($this->view->file_exists( - '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_trashbin/share-keys/' . $filename - . '.' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey.' . $trashFileSuffix)); + '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '/files_trashbin/keys/' . $filename + . '.' . $trashFileSuffix . '/' . self::TEST_ENCRYPTION_TRASHBIN_USER1 . '.shareKey')); } } diff --git a/apps/files_encryption/tests/util.php b/apps/files_encryption/tests/util.php index b8057202a07..8d9aba423cd 100755 --- a/apps/files_encryption/tests/util.php +++ b/apps/files_encryption/tests/util.php @@ -43,12 +43,6 @@ class Test_Encryption_Util extends \OCA\Files_Encryption\Tests\TestCase { public static function setUpBeforeClass() { parent::setUpBeforeClass(); - // reset backend - \OC_User::clearBackends(); - \OC_User::useBackend('database'); - - self::setupHooks(); - // create test user self::loginHelper(self::TEST_ENCRYPTION_UTIL_USER1, true); self::loginHelper(self::TEST_ENCRYPTION_UTIL_USER2, true); @@ -85,13 +79,13 @@ class Test_Encryption_Util extends \OCA\Files_Encryption\Tests\TestCase { $this->genPublicKey = $keypair['publicKey']; $this->genPrivateKey = $keypair['privateKey']; - $this->publicKeyDir = '/' . 'public-keys'; + $this->publicKeyDir = \OCA\Encryption\Keymanager::getPublicKeyPath(); $this->encryptionDir = '/' . $this->userId . '/' . 'files_encryption'; - $this->keyfilesPath = $this->encryptionDir . '/' . 'keyfiles'; + $this->keysPath = $this->encryptionDir . '/' . 'keys'; $this->publicKeyPath = - $this->publicKeyDir . '/' . $this->userId . '.public.key'; // e.g. data/public-keys/admin.public.key + $this->publicKeyDir . '/' . $this->userId . '.publicKey'; // e.g. data/public-keys/admin.publicKey $this->privateKeyPath = - $this->encryptionDir . '/' . $this->userId . '.private.key'; // e.g. data/admin/admin.private.key + $this->encryptionDir . '/' . $this->userId . '.privateKey'; // e.g. data/admin/admin.privateKey $this->view = new \OC\Files\View('/'); @@ -126,26 +120,9 @@ class Test_Encryption_Util extends \OCA\Files_Encryption\Tests\TestCase { \OC_Group::deleteGroup(self::TEST_ENCRYPTION_UTIL_GROUP1); \OC_Group::deleteGroup(self::TEST_ENCRYPTION_UTIL_GROUP2); - \OC_Hook::clear(); - \OC_FileProxy::clearProxies(); - - // Delete keys in /data/ - $view = new \OC\Files\View('/'); - $view->rmdir('public-keys'); - $view->rmdir('owncloud_private_key'); - parent::tearDownAfterClass(); } - public static function setupHooks() { - // Filesystem related hooks - \OCA\Encryption\Helper::registerFilesystemHooks(); - - // clear and register hooks - \OC_FileProxy::clearProxies(); - \OC_FileProxy::register(new OCA\Encryption\Proxy()); - } - /** * @medium * test that paths set during User construction are correct @@ -155,7 +132,7 @@ class Test_Encryption_Util extends \OCA\Files_Encryption\Tests\TestCase { $this->assertEquals($this->publicKeyDir, $util->getPath('publicKeyDir')); $this->assertEquals($this->encryptionDir, $util->getPath('encryptionDir')); - $this->assertEquals($this->keyfilesPath, $util->getPath('keyfilesPath')); + $this->assertEquals($this->keysPath, $util->getPath('keysPath')); $this->assertEquals($this->publicKeyPath, $util->getPath('publicKeyPath')); $this->assertEquals($this->privateKeyPath, $util->getPath('privateKeyPath')); @@ -396,16 +373,18 @@ class Test_Encryption_Util extends \OCA\Files_Encryption\Tests\TestCase { // file should no longer be encrypted $this->assertEquals(0, $fileInfoUnencrypted['encrypted']); + $backupPath = $this->getBackupPath('decryptAll'); + // check if the keys where moved to the backup location - $this->assertTrue($this->view->is_dir($this->userId . '/files_encryption/keyfiles.backup')); - $this->assertTrue($this->view->file_exists($this->userId . '/files_encryption/keyfiles.backup/' . $filename . '.key')); - $this->assertTrue($this->view->is_dir($this->userId . '/files_encryption/share-keys.backup')); - $this->assertTrue($this->view->file_exists($this->userId . '/files_encryption/share-keys.backup/' . $filename . '.' . $user . '.shareKey')); + $this->assertTrue($this->view->is_dir($backupPath . '/keys')); + $this->assertTrue($this->view->file_exists($backupPath . '/keys/' . $filename . '/fileKey')); + $this->assertTrue($this->view->file_exists($backupPath . '/keys/' . $filename . '/' . $user . '.shareKey')); + $this->assertTrue($this->view->file_exists($backupPath . '/' . $user . '.privateKey')); + $this->assertTrue($this->view->file_exists($backupPath . '/' . $user . '.publicKey')); // cleanup $this->view->unlink($this->userId . '/files/' . $filename); - $this->view->deleteAll($this->userId . '/files_encryption/keyfiles.backup'); - $this->view->deleteAll($this->userId . '/files_encryption/share-keys.backup'); + $this->view->deleteAll($backupPath); OC_App::enable('files_encryption'); } @@ -418,38 +397,28 @@ class Test_Encryption_Util extends \OCA\Files_Encryption\Tests\TestCase { // create some dummy key files $encPath = '/' . self::TEST_ENCRYPTION_UTIL_USER1 . '/files_encryption'; - $this->view->file_put_contents($encPath . '/keyfiles/foo.key', 'key'); - $this->view->file_put_contents($encPath . '/share-keys/foo.user1.shareKey', 'share key'); + $this->view->mkdir($encPath . '/keys/foo'); + $this->view->file_put_contents($encPath . '/keys/foo/fileKey', 'key'); + $this->view->file_put_contents($encPath . '/keys/foo/user1.shareKey', 'share key'); $util = new \OCA\Encryption\Util($this->view, self::TEST_ENCRYPTION_UTIL_USER1); - $util->backupAllKeys('testing'); + $util->backupAllKeys('testBackupAllKeys'); - $encFolderContent = $this->view->getDirectoryContent($encPath); - - $backupPath = ''; - foreach ($encFolderContent as $c) { - $name = $c['name']; - if (substr($name, 0, strlen('backup')) === 'backup') { - $backupPath = $encPath . '/'. $c['name']; - break; - } - } - - $this->assertTrue($backupPath !== ''); + $backupPath = $this->getBackupPath('testBackupAllKeys'); // check backupDir Content - $this->assertTrue($this->view->is_dir($backupPath . '/keyfiles')); - $this->assertTrue($this->view->is_dir($backupPath . '/share-keys')); - $this->assertTrue($this->view->file_exists($backupPath . '/keyfiles/foo.key')); - $this->assertTrue($this->view->file_exists($backupPath . '/share-keys/foo.user1.shareKey')); - $this->assertTrue($this->view->file_exists($backupPath . '/' . self::TEST_ENCRYPTION_UTIL_USER1 . '.private.key')); - $this->assertTrue($this->view->file_exists($backupPath . '/' . self::TEST_ENCRYPTION_UTIL_USER1 . '.public.key')); + $this->assertTrue($this->view->is_dir($backupPath . '/keys')); + $this->assertTrue($this->view->is_dir($backupPath . '/keys/foo')); + $this->assertTrue($this->view->file_exists($backupPath . '/keys/foo/fileKey')); + $this->assertTrue($this->view->file_exists($backupPath . '/keys/foo/user1.shareKey')); + $this->assertTrue($this->view->file_exists($backupPath . '/' . self::TEST_ENCRYPTION_UTIL_USER1 . '.privateKey')); + $this->assertTrue($this->view->file_exists($backupPath . '/' . self::TEST_ENCRYPTION_UTIL_USER1 . '.publicKey')); //cleanup $this->view->deleteAll($backupPath); - $this->view->unlink($encPath . '/keyfiles/foo.key', 'key'); - $this->view->unlink($encPath . '/share-keys/foo.user1.shareKey', 'share key'); + $this->view->unlink($encPath . '/keys/foo/fileKey'); + $this->view->unlink($encPath . '/keys/foo/user1.shareKey'); } @@ -473,8 +442,8 @@ class Test_Encryption_Util extends \OCA\Files_Encryption\Tests\TestCase { // rename keyfile for file1 so that the decryption for file1 fails // Expected behaviour: decryptAll() returns false, file2 gets decrypted anyway - $this->view->rename($this->userId . '/files_encryption/keyfiles/' . $file1 . '.key', - $this->userId . '/files_encryption/keyfiles/' . $file1 . '.key.moved'); + $this->view->rename($this->userId . '/files_encryption/keys/' . $file1 . '/fileKey', + $this->userId . '/files_encryption/keys/' . $file1 . '/fileKey.moved'); // decrypt all encrypted files $result = $util->decryptAll(); @@ -492,12 +461,13 @@ class Test_Encryption_Util extends \OCA\Files_Encryption\Tests\TestCase { $this->assertEquals(0, $fileInfoUnencrypted2['encrypted']); // keyfiles and share keys should still exist - $this->assertTrue($this->view->is_dir($this->userId . '/files_encryption/keyfiles/')); - $this->assertTrue($this->view->is_dir($this->userId . '/files_encryption/share-keys/')); + $this->assertTrue($this->view->is_dir($this->userId . '/files_encryption/keys/')); + $this->assertTrue($this->view->file_exists($this->userId . '/files_encryption/keys/' . $file1 . '/fileKey.moved')); + $this->assertTrue($this->view->file_exists($this->userId . '/files_encryption/keys/' . $file1 . '/' . $this->userId . '.shareKey')); // rename the keyfile for file1 back - $this->view->rename($this->userId . '/files_encryption/keyfiles/' . $file1 . '.key.moved', - $this->userId . '/files_encryption/keyfiles/' . $file1 . '.key'); + $this->view->rename($this->userId . '/files_encryption/keys/' . $file1 . '/fileKey.moved', + $this->userId . '/files_encryption/keys/' . $file1 . '/fileKey'); // try again to decrypt all encrypted files $result = $util->decryptAll(); @@ -515,15 +485,30 @@ class Test_Encryption_Util extends \OCA\Files_Encryption\Tests\TestCase { $this->assertEquals(0, $fileInfoUnencrypted2['encrypted']); // keyfiles and share keys should be deleted - $this->assertFalse($this->view->is_dir($this->userId . '/files_encryption/keyfiles/')); - $this->assertFalse($this->view->is_dir($this->userId . '/files_encryption/share-keys/')); + $this->assertFalse($this->view->is_dir($this->userId . '/files_encryption/keys/')); //cleanup + $backupPath = $this->getBackupPath('decryptAll'); $this->view->unlink($this->userId . '/files/' . $file1); $this->view->unlink($this->userId . '/files/' . $file2); - $this->view->deleteAll($this->userId . '/files_encryption/keyfiles.backup'); - $this->view->deleteAll($this->userId . '/files_encryption/share-keys.backup'); + $this->view->deleteAll($backupPath); + + } + + function getBackupPath($extension) { + $encPath = '/' . self::TEST_ENCRYPTION_UTIL_USER1 . '/files_encryption'; + $encFolderContent = $this->view->getDirectoryContent($encPath); + + $backupPath = ''; + foreach ($encFolderContent as $c) { + $name = $c['name']; + if (substr($name, 0, strlen('backup.' . $extension)) === 'backup.' . $extension) { + $backupPath = $encPath . '/'. $c['name']; + break; + } + } + return $backupPath; } /** diff --git a/apps/files_encryption/tests/webdav.php b/apps/files_encryption/tests/webdav.php index 7cadeaf0ba9..a04a7621291 100755 --- a/apps/files_encryption/tests/webdav.php +++ b/apps/files_encryption/tests/webdav.php @@ -45,20 +45,6 @@ class Test_Encryption_Webdav extends \OCA\Files_Encryption\Tests\TestCase { public static function setUpBeforeClass() { parent::setUpBeforeClass(); - // reset backend - \OC_User::clearBackends(); - \OC_User::useBackend('database'); - - // Filesystem related hooks - \OCA\Encryption\Helper::registerFilesystemHooks(); - - // Filesystem related hooks - \OCA\Encryption\Helper::registerUserHooks(); - - // clear and register hooks - \OC_FileProxy::clearProxies(); - \OC_FileProxy::register(new OCA\Encryption\Proxy()); - // create test user self::loginHelper(\Test_Encryption_Webdav::TEST_ENCRYPTION_WEBDAV_USER1, true); @@ -106,14 +92,6 @@ class Test_Encryption_Webdav extends \OCA\Files_Encryption\Tests\TestCase { // cleanup test user \OC_User::deleteUser(\Test_Encryption_Webdav::TEST_ENCRYPTION_WEBDAV_USER1); - \OC_Hook::clear(); - \OC_FileProxy::clearProxies(); - - // Delete keys in /data/ - $view = new \OC\Files\View('/'); - $view->rmdir('public-keys'); - $view->rmdir('owncloud_private_key'); - parent::tearDownAfterClass(); } @@ -143,11 +121,11 @@ class Test_Encryption_Webdav extends \OCA\Files_Encryption\Tests\TestCase { // check if key-file was created $this->assertTrue($this->view->file_exists( - '/' . $this->userId . '/files_encryption/keyfiles/' . $filename . '.key')); + '/' . $this->userId . '/files_encryption/keys/' . $filename . '/fileKey')); // check if shareKey-file was created $this->assertTrue($this->view->file_exists( - '/' . $this->userId . '/files_encryption/share-keys/' . $filename . '.' . $this->userId . '.shareKey')); + '/' . $this->userId . '/files_encryption/keys/' . $filename . '/' . $this->userId . '.shareKey')); // disable encryption proxy to prevent recursive calls $proxyStatus = \OC_FileProxy::$enabled; @@ -217,11 +195,11 @@ class Test_Encryption_Webdav extends \OCA\Files_Encryption\Tests\TestCase { // check if key-file was removed $this->assertFalse($this->view->file_exists( - '/' . $this->userId . '/files_encryption/keyfiles' . $filename . '.key')); + '/' . $this->userId . '/files_encryption/keys/' . $filename . '/fileKey')); // check if shareKey-file was removed $this->assertFalse($this->view->file_exists( - '/' . $this->userId . '/files_encryption/share-keys' . $filename . '.' . $this->userId . '.shareKey')); + '/' . $this->userId . '/files_encryption/keys/' . $filename . '/' . $this->userId . '.shareKey')); } /** diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Aws.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Aws.php index 1824e09c664..9cd4ae2e16f 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Aws.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Aws.php @@ -28,7 +28,7 @@ class Aws extends ServiceBuilder /** * @var string Current version of the SDK */ - const VERSION = '2.6.15'; + const VERSION = '2.7.5'; /** * Create a new service locator for the AWS SDK diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Client/AbstractClient.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Client/AbstractClient.php index 0e2aa1a88ed..c9ee86a66ff 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Client/AbstractClient.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Client/AbstractClient.php @@ -17,7 +17,6 @@ namespace Aws\Common\Client; use Aws\Common\Aws; -use Aws\Common\Credentials\Credentials; use Aws\Common\Credentials\CredentialsInterface; use Aws\Common\Credentials\NullCredentials; use Aws\Common\Enum\ClientOptions as Options; @@ -111,13 +110,7 @@ abstract class AbstractClient extends Client implements AwsClientInterface /** * Get an endpoint for a specific region from a service description - * - * @param ServiceDescriptionInterface $description Service description - * @param string $region Region of the endpoint - * @param string $scheme URL scheme - * - * @return string - * @throws InvalidArgumentException + * @deprecated This function will no longer be updated to work with new regions. */ public static function getEndpoint(ServiceDescriptionInterface $description, $region, $scheme) { @@ -177,12 +170,27 @@ abstract class AbstractClient extends Client implements AwsClientInterface $config = $this->getConfig(); $formerRegion = $config->get(Options::REGION); $global = $this->serviceDescription->getData('globalEndpoint'); + $provider = $config->get('endpoint_provider'); + + if (!$provider) { + throw new \RuntimeException('No endpoint provider configured'); + } // Only change the region if the service does not have a global endpoint if (!$global || $this->serviceDescription->getData('namespace') === 'S3') { - $baseUrl = self::getEndpoint($this->serviceDescription, $region, $config->get(Options::SCHEME)); - $this->setBaseUrl($baseUrl); - $config->set(Options::BASE_URL, $baseUrl)->set(Options::REGION, $region); + + $endpoint = call_user_func( + $provider, + array( + 'scheme' => $config->get(Options::SCHEME), + 'region' => $region, + 'service' => $config->get(Options::SERVICE) + ) + ); + + $this->setBaseUrl($endpoint['endpoint']); + $config->set(Options::BASE_URL, $endpoint['endpoint']); + $config->set(Options::REGION, $region); // Update the signature if necessary $signature = $this->getSignature(); diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Client/ClientBuilder.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Client/ClientBuilder.php index dd81cba2351..b34a67ffd92 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Client/ClientBuilder.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Client/ClientBuilder.php @@ -20,13 +20,13 @@ use Aws\Common\Credentials\Credentials; use Aws\Common\Credentials\CredentialsInterface; use Aws\Common\Credentials\NullCredentials; use Aws\Common\Enum\ClientOptions as Options; -use Aws\Common\Enum\Region; use Aws\Common\Exception\ExceptionListener; use Aws\Common\Exception\InvalidArgumentException; use Aws\Common\Exception\NamespaceExceptionFactory; use Aws\Common\Exception\Parser\DefaultXmlExceptionParser; use Aws\Common\Exception\Parser\ExceptionParserInterface; use Aws\Common\Iterator\AwsResourceIteratorFactory; +use Aws\Common\RulesEndpointProvider; use Aws\Common\Signature\EndpointSignatureInterface; use Aws\Common\Signature\SignatureInterface; use Aws\Common\Signature\SignatureV2; @@ -38,7 +38,6 @@ use Guzzle\Plugin\Backoff\CurlBackoffStrategy; use Guzzle\Plugin\Backoff\ExponentialBackoffStrategy; use Guzzle\Plugin\Backoff\HttpBackoffStrategy; use Guzzle\Plugin\Backoff\TruncatedBackoffStrategy; -use Guzzle\Service\Client; use Guzzle\Service\Description\ServiceDescription; use Guzzle\Service\Resource\ResourceIteratorClassFactory; use Guzzle\Log\LogAdapterInterface; @@ -200,6 +199,10 @@ class ClientBuilder (self::$commonConfigRequirements + $this->configRequirements) ); + if (!isset($config['endpoint_provider'])) { + $config['endpoint_provider'] = RulesEndpointProvider::fromDefaults(); + } + // Resolve the endpoint, signature, and credentials $description = $this->updateConfigFromDescription($config); $signature = $this->getSignature($description, $config); @@ -366,33 +369,36 @@ class ClientBuilder $this->setIteratorsConfig($iterators); } - // Ensure that the service description has regions - if (!$description->getData('regions')) { - throw new InvalidArgumentException( - 'No regions found in the ' . $description->getData('serviceFullName'). ' description' - ); - } - // Make sure a valid region is set $region = $config->get(Options::REGION); $global = $description->getData('globalEndpoint'); + if (!$global && !$region) { throw new InvalidArgumentException( 'A region is required when using ' . $description->getData('serviceFullName') - . '. Set "region" to one of: ' . implode(', ', array_keys($description->getData('regions'))) ); } elseif ($global && (!$region || $description->getData('namespace') !== 'S3')) { - $region = Region::US_EAST_1; - $config->set(Options::REGION, $region); + $region = 'us-east-1'; + $config->set(Options::REGION, 'us-east-1'); } if (!$config->get(Options::BASE_URL)) { - // Set the base URL using the scheme and hostname of the service's region - $config->set(Options::BASE_URL, AbstractClient::getEndpoint( - $description, - $region, - $config->get(Options::SCHEME) - )); + $endpoint = call_user_func( + $config->get('endpoint_provider'), + array( + 'scheme' => $config->get(Options::SCHEME), + 'region' => $region, + 'service' => $config->get(Options::SERVICE) + ) + ); + $config->set(Options::BASE_URL, $endpoint['endpoint']); + + // Set a signature if one was not explicitly provided. + if (!$config->hasKey(Options::SIGNATURE) + && isset($endpoint['signatureVersion']) + ) { + $config->set(Options::SIGNATURE, $endpoint['signatureVersion']); + } } return $description; diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Enum/Region.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Enum/Region.php index b44bd971beb..017d1d7e16c 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Enum/Region.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Enum/Region.php @@ -39,6 +39,9 @@ class Region extends Enum const EU_WEST_1 = 'eu-west-1'; const IRELAND = 'eu-west-1'; + + const EU_CENTRAL_1 = 'eu-central-1'; + const FRANKFURT = 'eu-central-1'; const AP_SOUTHEAST_1 = 'ap-southeast-1'; const SINGAPORE = 'ap-southeast-1'; diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Hash/HashUtils.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Hash/HashUtils.php index dd82ff75edd..f66af6edf53 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Hash/HashUtils.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Hash/HashUtils.php @@ -38,6 +38,10 @@ class HashUtils $useNative = function_exists('hex2bin'); } + if (!$useNative && strlen($hash) % 2 !== 0) { + $hash = '0' . $hash; + } + return $useNative ? hex2bin($hash) : pack("H*", $hash); } diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Model/MultipartUpload/AbstractUploadBuilder.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Model/MultipartUpload/AbstractUploadBuilder.php index a1ad678610c..8690d5cb562 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Model/MultipartUpload/AbstractUploadBuilder.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Model/MultipartUpload/AbstractUploadBuilder.php @@ -49,7 +49,7 @@ abstract class AbstractUploadBuilder /** * Return a new instance of the UploadBuilder * - * @return self + * @return static */ public static function newInstance() { @@ -61,7 +61,7 @@ abstract class AbstractUploadBuilder * * @param AwsClientInterface $client Client to use * - * @return self + * @return $this */ public function setClient(AwsClientInterface $client) { @@ -78,7 +78,7 @@ abstract class AbstractUploadBuilder * multipart upload. When an ID is passed, the builder will create a * state object using the data from a ListParts API response. * - * @return self + * @return $this */ public function resumeFrom($state) { @@ -94,7 +94,7 @@ abstract class AbstractUploadBuilder * You can also stream from a resource returned from fopen or a Guzzle * {@see EntityBody} object. * - * @return self + * @return $this * @throws InvalidArgumentException when the source cannot be found or opened */ public function setSource($source) @@ -123,7 +123,7 @@ abstract class AbstractUploadBuilder * * @param array $headers Headers to add to the uploaded object * - * @return self + * @return $this */ public function setHeaders(array $headers) { diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Resources/aws-config.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Resources/aws-config.php index 6a1e30c6413..710ad0d3385 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Resources/aws-config.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Resources/aws-config.php @@ -78,6 +78,12 @@ return array( 'class' => 'Aws\CloudWatch\CloudWatchClient' ), + 'cloudwatchlogs' => array( + 'alias' => 'CloudWatchLogs', + 'extends' => 'default_settings', + 'class' => 'Aws\CloudWatchLogs\CloudWatchLogsClient' + ), + 'cognito-identity' => array( 'alias' => 'CognitoIdentity', 'extends' => 'default_settings', @@ -94,10 +100,16 @@ return array( 'cognitosync' => array('extends' => 'cognito-sync'), - 'cloudwatchlogs' => array( - 'alias' => 'CloudWatchLogs', + 'codedeploy' => array( + 'alias' => 'CodeDeploy', 'extends' => 'default_settings', - 'class' => 'Aws\CloudWatchLogs\CloudWatchLogsClient' + 'class' => 'Aws\CodeDeploy\CodeDeployClient' + ), + + 'config' => array( + 'alias' => 'ConfigService', + 'extends' => 'default_settings', + 'class' => 'Aws\ConfigService\ConfigServiceClient' ), 'datapipeline' => array( @@ -173,6 +185,18 @@ return array( 'class' => 'Aws\Kinesis\KinesisClient' ), + 'kms' => array( + 'alias' => 'Kms', + 'extends' => 'default_settings', + 'class' => 'Aws\Kms\KmsClient' + ), + + 'lambda' => array( + 'alias' => 'Lambda', + 'extends' => 'default_settings', + 'class' => 'Aws\Lambda\LambdaClient' + ), + 'iam' => array( 'alias' => 'Iam', 'extends' => 'default_settings', diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Resources/public-endpoints.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Resources/public-endpoints.php new file mode 100644 index 00000000000..f24f3404f21 --- /dev/null +++ b/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Resources/public-endpoints.php @@ -0,0 +1,64 @@ +<?php +return array( + 'version' => 2, + 'endpoints' => array( + '*/*' => array( + 'endpoint' => '{service}.{region}.amazonaws.com' + ), + 'cn-north-1/*' => array( + 'endpoint' => '{service}.{region}.amazonaws.com.cn', + 'signatureVersion' => 'v4' + ), + 'us-gov-west-1/iam' => array( + 'endpoint' => 'iam.us-gov.amazonaws.com' + ), + 'us-gov-west-1/sts' => array( + 'endpoint' => 'sts.us-gov.amazonaws.com' + ), + 'us-gov-west-1/s3' => array( + 'endpoint' => 's3-{region}.amazonaws.com' + ), + '*/cloudfront' => array( + 'endpoint' => 'cloudfront.amazonaws.com' + ), + '*/iam' => array( + 'endpoint' => 'iam.amazonaws.com' + ), + '*/importexport' => array( + 'endpoint' => 'importexport.amazonaws.com' + ), + '*/route53' => array( + 'endpoint' => 'route53.amazonaws.com' + ), + '*/sts' => array( + 'endpoint' => 'sts.amazonaws.com' + ), + 'us-east-1/sdb' => array( + 'endpoint' => 'sdb.amazonaws.com' + ), + 'us-east-1/s3' => array( + 'endpoint' => 's3.amazonaws.com' + ), + 'us-west-1/s3' => array( + 'endpoint' => 's3-{region}.amazonaws.com' + ), + 'us-west-2/s3' => array( + 'endpoint' => 's3-{region}.amazonaws.com' + ), + 'eu-west-1/s3' => array( + 'endpoint' => 's3-{region}.amazonaws.com' + ), + 'ap-southeast-1/s3' => array( + 'endpoint' => 's3-{region}.amazonaws.com' + ), + 'ap-southeast-2/s3' => array( + 'endpoint' => 's3-{region}.amazonaws.com' + ), + 'ap-northeast-1/s3' => array( + 'endpoint' => 's3-{region}.amazonaws.com' + ), + 'sa-east-1/s3' => array( + 'endpoint' => 's3-{region}.amazonaws.com' + ) + ) +); diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/RulesEndpointProvider.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/RulesEndpointProvider.php new file mode 100644 index 00000000000..ec57cb862ca --- /dev/null +++ b/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/RulesEndpointProvider.php @@ -0,0 +1,67 @@ +<?php +namespace Aws\Common; + +/** + * Provides endpoints based on a rules configuration file. + */ +class RulesEndpointProvider +{ + /** @var array */ + private $patterns; + + /** + * @param array $patterns Hash of endpoint patterns mapping to endpoint + * configurations. + */ + public function __construct(array $patterns) + { + $this->patterns = $patterns; + } + + /** + * Creates and returns the default RulesEndpointProvider based on the + * public rule sets. + * + * @return self + */ + public static function fromDefaults() + { + return new self(require __DIR__ . '/Resources/public-endpoints.php'); + } + + public function __invoke(array $args = array()) + { + if (!isset($args['service'])) { + throw new \InvalidArgumentException('Requires a "service" value'); + } + + if (!isset($args['region'])) { + throw new \InvalidArgumentException('Requires a "region" value'); + } + + foreach ($this->getKeys($args['region'], $args['service']) as $key) { + if (isset($this->patterns['endpoints'][$key])) { + return $this->expand($this->patterns['endpoints'][$key], $args); + } + } + + throw new \RuntimeException('Could not resolve endpoint'); + } + + private function expand(array $config, array $args) + { + $scheme = isset($args['scheme']) ? $args['scheme'] : 'https'; + $config['endpoint'] = $scheme . '://' . str_replace( + array('{service}', '{region}'), + array($args['service'], $args['region']), + $config['endpoint'] + ); + + return $config; + } + + private function getKeys($region, $service) + { + return array("$region/$service", "$region/*", "*/$service", "*/*"); + } +} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Signature/SignatureV4.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Signature/SignatureV4.php index fda63a95fc4..38b60b4594b 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Signature/SignatureV4.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Aws/Common/Signature/SignatureV4.php @@ -19,7 +19,6 @@ namespace Aws\Common\Signature; use Aws\Common\Credentials\CredentialsInterface; use Aws\Common\Enum\DateFormat; use Aws\Common\HostNameUtils; -use Guzzle\Http\Message\EntityEnclosingRequest; use Guzzle\Http\Message\EntityEnclosingRequestInterface; use Guzzle\Http\Message\RequestFactory; use Guzzle\Http\Message\RequestInterface; @@ -304,43 +303,42 @@ class SignatureV4 extends AbstractSignature implements EndpointSignatureInterfac */ private function createSigningContext(RequestInterface $request, $payload) { + $signable = array( + 'host' => true, + 'date' => true, + 'content-md5' => true + ); + // Normalize the path as required by SigV4 and ensure it's absolute $canon = $request->getMethod() . "\n" . $this->createCanonicalizedPath($request) . "\n" . $this->getCanonicalizedQueryString($request) . "\n"; - // Create the canonical headers - $headers = array(); + $canonHeaders = array(); + foreach ($request->getHeaders()->getAll() as $key => $values) { $key = strtolower($key); - if ($key != 'user-agent') { - $headers[$key] = array(); - foreach ($values as $value) { - $headers[$key][] = preg_replace('/\s+/', ' ', trim($value)); - } - // Sort the value if there is more than one - if (count($values) > 1) { - sort($headers[$key]); + if (isset($signable[$key]) || substr($key, 0, 6) === 'x-amz-') { + $values = $values->toArray(); + if (count($values) == 1) { + $values = $values[0]; + } else { + sort($values); + $values = implode(',', $values); } + $canonHeaders[$key] = $key . ':' . preg_replace('/\s+/', ' ', $values); } } - // The headers must be sorted - ksort($headers); - - // Continue to build the canonical request by adding headers - foreach ($headers as $key => $values) { - // Combine multi-value headers into a comma separated list - $canon .= $key . ':' . implode(',', $values) . "\n"; - } - - // Create the signed headers - $signedHeaders = implode(';', array_keys($headers)); - $canon .= "\n{$signedHeaders}\n{$payload}"; + ksort($canonHeaders); + $signedHeadersString = implode(';', array_keys($canonHeaders)); + $canon .= implode("\n", $canonHeaders) . "\n\n" + . $signedHeadersString . "\n" + . $payload; return array( 'canonical_request' => $canon, - 'signed_headers' => $signedHeaders + 'signed_headers' => $signedHeadersString ); } @@ -394,6 +392,8 @@ class SignatureV4 extends AbstractSignature implements EndpointSignatureInterfac foreach ($queryParams as $key => $values) { if (is_array($values)) { sort($values); + } elseif ($values === 0) { + $values = array('0'); } elseif (!$values) { $values = array(''); } diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/Acp.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/Acp.php index 8325a2b6570..6c19f668400 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/Acp.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/Acp.php @@ -54,7 +54,7 @@ class Acp implements ToArrayInterface, \IteratorAggregate, \Countable * * @param array $data Array of ACP data * - * @return self + * @return Acp */ public static function fromArray(array $data) { @@ -100,7 +100,7 @@ class Acp implements ToArrayInterface, \IteratorAggregate, \Countable * * @param Grantee $owner ACP policy owner * - * @return self + * @return $this * * @throws InvalidArgumentException if the grantee does not have an ID set */ @@ -130,7 +130,7 @@ class Acp implements ToArrayInterface, \IteratorAggregate, \Countable * * @param array|\Traversable $grants List of grants for the ACP * - * @return self + * @return $this * * @throws InvalidArgumentException */ @@ -167,7 +167,7 @@ class Acp implements ToArrayInterface, \IteratorAggregate, \Countable * * @param Grant $grant Grant to add * - * @return self + * @return $this */ public function addGrant(Grant $grant) { @@ -205,7 +205,7 @@ class Acp implements ToArrayInterface, \IteratorAggregate, \Countable * * @param AbstractCommand $command Command to be updated * - * @return self + * @return $this */ public function updateCommand(AbstractCommand $command) { diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/AcpBuilder.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/AcpBuilder.php index 0e41c3cb0a0..b6d1be72167 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/AcpBuilder.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/AcpBuilder.php @@ -36,11 +36,11 @@ class AcpBuilder /** * Static method for chainable instantiation * - * @return self + * @return static */ public static function newInstance() { - return new self; + return new static; } /** @@ -49,7 +49,7 @@ class AcpBuilder * @param string $id Owner identifier * @param string $displayName Owner display name * - * @return self + * @return $this */ public function setOwner($id, $displayName = null) { @@ -65,7 +65,7 @@ class AcpBuilder * @param string $id Grantee identifier * @param string $displayName Grantee display name * - * @return self + * @return $this */ public function addGrantForUser($permission, $id, $displayName = null) { @@ -81,7 +81,7 @@ class AcpBuilder * @param string $permission Permission for the Grant * @param string $email Grantee email address * - * @return self + * @return $this */ public function addGrantForEmail($permission, $email) { @@ -97,7 +97,7 @@ class AcpBuilder * @param string $permission Permission for the Grant * @param string $group Grantee group * - * @return self + * @return $this */ public function addGrantForGroup($permission, $group) { @@ -113,7 +113,7 @@ class AcpBuilder * @param string $permission Permission for the Grant * @param Grantee $grantee The Grantee for the Grant * - * @return self + * @return $this */ public function addGrant($permission, Grantee $grantee) { diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/ClearBucket.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/ClearBucket.php index 77ce9378f45..09982d8ae7d 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/ClearBucket.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/ClearBucket.php @@ -81,7 +81,7 @@ class ClearBucket extends AbstractHasDispatcher * * @param string $bucket Name of the bucket to clear * - * @return self + * @return $this */ public function setBucket($bucket) { @@ -114,7 +114,7 @@ class ClearBucket extends AbstractHasDispatcher * * @param \Iterator $iterator Iterator used to yield the keys to be deleted * - * @return self + * @return $this */ public function setIterator(\Iterator $iterator) { @@ -129,7 +129,7 @@ class ClearBucket extends AbstractHasDispatcher * @param string $mfa MFA token to send with each request. The value is the concatenation of the authentication * device's serial number, a space, and the value displayed on your authentication device. * - * @return self + * @return $this */ public function setMfa($mfa) { diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/DeleteObjectsBatch.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/DeleteObjectsBatch.php index 17d8af33a73..ab6425bbb87 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/DeleteObjectsBatch.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/DeleteObjectsBatch.php @@ -38,7 +38,7 @@ class DeleteObjectsBatch extends AbstractBatchDecorator * @param string $bucket Bucket that contains the objects to delete * @param string $mfa MFA token to use with the request * - * @return self + * @return static */ public static function factory(AwsClientInterface $client, $bucket, $mfa = null) { @@ -47,7 +47,7 @@ class DeleteObjectsBatch extends AbstractBatchDecorator ->transferWith(new DeleteObjectsTransfer($client, $bucket, $mfa)) ->build(); - return new self($batch); + return new static($batch); } /** @@ -56,7 +56,7 @@ class DeleteObjectsBatch extends AbstractBatchDecorator * @param string $key Key of the object * @param string $versionId VersionID of the object * - * @return self + * @return $this */ public function addKey($key, $versionId = null) { @@ -82,6 +82,6 @@ class DeleteObjectsBatch extends AbstractBatchDecorator throw new InvalidArgumentException('Item must be a DeleteObject command or array containing a Key and VersionId key.'); } - return $this->decoratedBatch->add($item); + return parent::add($item); } } diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/DeleteObjectsTransfer.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/DeleteObjectsTransfer.php index c3d3828c4e3..5918ff18ff7 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/DeleteObjectsTransfer.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/DeleteObjectsTransfer.php @@ -64,7 +64,7 @@ class DeleteObjectsTransfer implements BatchTransferInterface * * @param string $token MFA token * - * @return self + * @return $this */ public function setMfa($token) { diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/Grant.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/Grant.php index afc2757e8cc..2e35f059511 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/Grant.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/Grant.php @@ -63,7 +63,7 @@ class Grant implements ToArrayInterface * * @param Grantee $grantee Affected grantee * - * @return self + * @return $this */ public function setGrantee(Grantee $grantee) { @@ -87,7 +87,7 @@ class Grant implements ToArrayInterface * * @param string $permission Permission applied * - * @return self + * @return $this * * @throws InvalidArgumentException */ diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/Grantee.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/Grantee.php index f49c70fca1c..7634b84a350 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/Grantee.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/Grantee.php @@ -214,7 +214,7 @@ class Grantee implements ToArrayInterface */ public function getHeaderValue() { - $key = self::$headerMap[$this->type]; + $key = static::$headerMap[$this->type]; return "{$key}=\"{$this->id}\""; } diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/MultipartUpload/UploadBuilder.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/MultipartUpload/UploadBuilder.php index cae7658d72e..e30f23a36cf 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/MultipartUpload/UploadBuilder.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Model/MultipartUpload/UploadBuilder.php @@ -67,7 +67,7 @@ class UploadBuilder extends AbstractUploadBuilder * * @param string $bucket Name of the bucket * - * @return self + * @return $this */ public function setBucket($bucket) { @@ -79,7 +79,7 @@ class UploadBuilder extends AbstractUploadBuilder * * @param string $key Key of the object to upload * - * @return self + * @return $this */ public function setKey($key) { @@ -91,7 +91,7 @@ class UploadBuilder extends AbstractUploadBuilder * * @param int $minSize Minimum acceptable part size in bytes * - * @return self + * @return $this */ public function setMinPartSize($minSize) { @@ -107,7 +107,7 @@ class UploadBuilder extends AbstractUploadBuilder * * @param int $concurrency Concurrency level * - * @return self + * @return $this */ public function setConcurrency($concurrency) { @@ -121,7 +121,7 @@ class UploadBuilder extends AbstractUploadBuilder * * @param string $md5 MD5 hash of the entire body * - * @return self + * @return $this */ public function setMd5($md5) { @@ -137,7 +137,7 @@ class UploadBuilder extends AbstractUploadBuilder * * @param bool $calculateMd5 Set to true to calculate the MD5 hash of the body * - * @return self + * @return $this */ public function calculateMd5($calculateMd5) { @@ -152,7 +152,7 @@ class UploadBuilder extends AbstractUploadBuilder * * @param bool $usePartMd5 Set to true to calculate the MD5 has of each part * - * @return self + * @return $this */ public function calculatePartMd5($usePartMd5) { @@ -166,7 +166,7 @@ class UploadBuilder extends AbstractUploadBuilder * * @param Acp $acp ACP to set on the object * - * @return self + * @return $this */ public function setAcp(Acp $acp) { @@ -179,7 +179,7 @@ class UploadBuilder extends AbstractUploadBuilder * @param string $name Option name * @param string $value Option value * - * @return self + * @return $this */ public function setOption($name, $value) { @@ -193,7 +193,7 @@ class UploadBuilder extends AbstractUploadBuilder * * @param array $options Array of CreateMultipartUpload operation parameters * - * @return self + * @return $this */ public function addOptions(array $options) { @@ -207,7 +207,7 @@ class UploadBuilder extends AbstractUploadBuilder * * @param array $options Transfer options * - * @return self + * @return $this */ public function setTransferOptions(array $options) { diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Resources/s3-2006-03-01.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Resources/s3-2006-03-01.php index 8739cef6a04..0d7b023f029 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Resources/s3-2006-03-01.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Resources/s3-2006-03-01.php @@ -45,6 +45,11 @@ return array ( 'https' => true, 'hostname' => 's3-eu-west-1.amazonaws.com', ), + 'eu-central-1' => array( + 'http' => true, + 'https' => true, + 'hostname' => 's3-eu-central-1.amazonaws.com', + ), 'ap-northeast-1' => array( 'http' => true, 'https' => true, @@ -355,6 +360,11 @@ return array ( 'location' => 'header', 'sentAs' => 'x-amz-copy-source-server-side-encryption-customer-key-MD5', ), + 'CopySourceSSEKMSKeyId' => array( + 'type' => 'string', + 'location' => 'header', + 'sentAs' => 'x-amz-copy-source-server-side-encryption-aws-kms-key-id', + ), 'ACP' => array( 'type' => 'object', 'additionalProperties' => true, @@ -564,6 +574,11 @@ return array ( 'location' => 'header', 'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5', ), + 'SSEKMSKeyId' => array( + 'type' => 'string', + 'location' => 'header', + 'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id', + ), 'ACP' => array( 'type' => 'object', 'additionalProperties' => true, @@ -1068,6 +1083,11 @@ return array ( 'location' => 'header', 'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5', ), + 'SSEKMSKeyId' => array( + 'type' => 'string', + 'location' => 'header', + 'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id', + ), 'SaveAs' => array( 'location' => 'response_body', ), @@ -1236,6 +1256,11 @@ return array ( 'location' => 'header', 'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5', ), + 'SSEKMSKeyId' => array( + 'type' => 'string', + 'location' => 'header', + 'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id', + ), ), 'errorResponses' => array( array( @@ -1843,10 +1868,22 @@ return array ( 'location' => 'uri', ), 'TopicConfiguration' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( + 'Id' => array( + 'type' => 'string', + ), + 'Events' => array( + 'type' => 'array', + 'data' => array( + 'xmlFlattened' => true, + ), + 'items' => array( + 'name' => 'Event', + 'type' => 'string', + ), + ), 'Event' => array( 'type' => 'string', ), @@ -1855,6 +1892,59 @@ return array ( ), ), ), + 'QueueConfiguration' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Id' => array( + 'type' => 'string', + ), + 'Event' => array( + 'type' => 'string', + ), + 'Events' => array( + 'type' => 'array', + 'data' => array( + 'xmlFlattened' => true, + ), + 'items' => array( + 'name' => 'Event', + 'type' => 'string', + ), + ), + 'Queue' => array( + 'type' => 'string', + ), + ), + ), + 'CloudFunctionConfiguration' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Id' => array( + 'type' => 'string', + ), + 'Event' => array( + 'type' => 'string', + ), + 'Events' => array( + 'type' => 'array', + 'data' => array( + 'xmlFlattened' => true, + ), + 'items' => array( + 'name' => 'Event', + 'type' => 'string', + ), + ), + 'CloudFunction' => array( + 'type' => 'string', + ), + 'InvocationRole' => array( + 'type' => 'string', + ), + ), + ), ), ), 'PutBucketPolicy' => array( @@ -2241,6 +2331,11 @@ return array ( 'location' => 'header', 'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5', ), + 'SSEKMSKeyId' => array( + 'type' => 'string', + 'location' => 'header', + 'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id', + ), 'ACP' => array( 'type' => 'object', 'additionalProperties' => true, @@ -2399,6 +2494,11 @@ return array ( 'Aws\\S3\\S3Client::explodeKey', ), ), + 'VersionId' => array( + 'type' => 'string', + 'location' => 'query', + 'sentAs' => 'versionId', + ), 'Days' => array( 'required' => true, 'type' => 'numeric', @@ -2488,6 +2588,11 @@ return array ( 'location' => 'header', 'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5', ), + 'SSEKMSKeyId' => array( + 'type' => 'string', + 'location' => 'header', + 'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id', + ), ), ), 'UploadPartCopy' => array( @@ -2602,6 +2707,11 @@ return array ( 'location' => 'header', 'sentAs' => 'x-amz-copy-source-server-side-encryption-customer-key-MD5', ), + 'CopySourceSSEKMSKeyId' => array( + 'type' => 'string', + 'location' => 'header', + 'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id', + ), 'command.expects' => array( 'static' => true, 'default' => 'application/xml', @@ -2655,6 +2765,11 @@ return array ( 'location' => 'header', 'sentAs' => 'x-amz-version-id', ), + 'SSEKMSKeyId' => array( + 'type' => 'string', + 'location' => 'header', + 'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id', + ), 'RequestId' => array( 'location' => 'header', 'sentAs' => 'x-amz-request-id', @@ -2698,6 +2813,11 @@ return array ( 'location' => 'header', 'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5', ), + 'SSEKMSKeyId' => array( + 'type' => 'string', + 'location' => 'header', + 'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id', + ), 'RequestId' => array( 'location' => 'header', 'sentAs' => 'x-amz-request-id', @@ -2750,6 +2870,11 @@ return array ( 'location' => 'header', 'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5', ), + 'SSEKMSKeyId' => array( + 'type' => 'string', + 'location' => 'header', + 'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id', + ), 'RequestId' => array( 'location' => 'header', 'sentAs' => 'x-amz-request-id', @@ -3197,6 +3322,21 @@ return array ( 'type' => 'object', 'location' => 'xml', 'properties' => array( + 'Id' => array( + 'type' => 'string', + ), + 'Events' => array( + 'type' => 'array', + 'sentAs' => 'Event', + 'data' => array( + 'xmlFlattened' => true, + ), + 'items' => array( + 'name' => 'Event', + 'type' => 'string', + 'sentAs' => 'Event', + ), + ), 'Event' => array( 'type' => 'string', ), @@ -3205,6 +3345,63 @@ return array ( ), ), ), + 'QueueConfiguration' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Id' => array( + 'type' => 'string', + ), + 'Event' => array( + 'type' => 'string', + ), + 'Events' => array( + 'type' => 'array', + 'sentAs' => 'Event', + 'data' => array( + 'xmlFlattened' => true, + ), + 'items' => array( + 'name' => 'Event', + 'type' => 'string', + 'sentAs' => 'Event', + ), + ), + 'Queue' => array( + 'type' => 'string', + ), + ), + ), + 'CloudFunctionConfiguration' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Id' => array( + 'type' => 'string', + ), + 'Event' => array( + 'type' => 'string', + ), + 'Events' => array( + 'type' => 'array', + 'sentAs' => 'Event', + 'data' => array( + 'xmlFlattened' => true, + ), + 'items' => array( + 'name' => 'Event', + 'type' => 'string', + 'sentAs' => 'Event', + ), + ), + 'CloudFunction' => array( + 'type' => 'string', + ), + 'InvocationRole' => array( + 'type' => 'string', + ), + ), + ), 'RequestId' => array( 'location' => 'header', 'sentAs' => 'x-amz-request-id', @@ -3478,6 +3675,11 @@ return array ( 'location' => 'header', 'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5', ), + 'SSEKMSKeyId' => array( + 'type' => 'string', + 'location' => 'header', + 'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id', + ), 'RequestId' => array( 'location' => 'header', 'sentAs' => 'x-amz-request-id', @@ -3676,6 +3878,11 @@ return array ( 'location' => 'header', 'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5', ), + 'SSEKMSKeyId' => array( + 'type' => 'string', + 'location' => 'header', + 'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id', + ), 'RequestId' => array( 'location' => 'header', 'sentAs' => 'x-amz-request-id', @@ -3745,6 +3952,10 @@ return array ( 'type' => 'string', 'location' => 'xml', ), + 'Delimiter' => array( + 'type' => 'string', + 'location' => 'xml', + ), 'NextUploadIdMarker' => array( 'type' => 'string', 'location' => 'xml', @@ -3949,6 +4160,10 @@ return array ( 'type' => 'string', 'location' => 'xml', ), + 'Delimiter' => array( + 'type' => 'string', + 'location' => 'xml', + ), 'MaxKeys' => array( 'type' => 'numeric', 'location' => 'xml', @@ -4042,6 +4257,10 @@ return array ( 'type' => 'string', 'location' => 'xml', ), + 'Delimiter' => array( + 'type' => 'string', + 'location' => 'xml', + ), 'MaxKeys' => array( 'type' => 'numeric', 'location' => 'xml', @@ -4298,6 +4517,11 @@ return array ( 'location' => 'header', 'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5', ), + 'SSEKMSKeyId' => array( + 'type' => 'string', + 'location' => 'header', + 'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id', + ), 'RequestId' => array( 'location' => 'header', 'sentAs' => 'x-amz-request-id', @@ -4349,6 +4573,11 @@ return array ( 'location' => 'header', 'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5', ), + 'SSEKMSKeyId' => array( + 'type' => 'string', + 'location' => 'header', + 'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id', + ), 'RequestId' => array( 'location' => 'header', 'sentAs' => 'x-amz-request-id', @@ -4387,6 +4616,11 @@ return array ( 'location' => 'header', 'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5', ), + 'SSEKMSKeyId' => array( + 'type' => 'string', + 'location' => 'header', + 'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id', + ), 'RequestId' => array( 'location' => 'header', 'sentAs' => 'x-amz-request-id', diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/S3Client.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/S3Client.php index 219e37eb92d..7f7c7cf22c4 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/S3Client.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/S3Client.php @@ -24,7 +24,6 @@ use Aws\Common\Enum\ClientOptions as Options; use Aws\Common\Exception\RuntimeException; use Aws\Common\Exception\InvalidArgumentException; use Aws\Common\Signature\SignatureV4; -use Aws\Common\Signature\SignatureInterface; use Aws\Common\Model\MultipartUpload\AbstractTransfer; use Aws\S3\Exception\AccessDeniedException; use Aws\S3\Exception\Parser\S3ExceptionParser; @@ -156,7 +155,7 @@ class S3Client extends AbstractClient * * @param array|Collection $config Client configuration data * - * @return self + * @return S3Client * @link http://docs.aws.amazon.com/aws-sdk-php/guide/latest/configuration.html#client-configuration-options */ public static function factory($config = array()) @@ -165,10 +164,10 @@ class S3Client extends AbstractClient // Configure the custom exponential backoff plugin for retrying S3 specific errors if (!isset($config[Options::BACKOFF])) { - $config[Options::BACKOFF] = self::createBackoffPlugin($exceptionParser); + $config[Options::BACKOFF] = static::createBackoffPlugin($exceptionParser); } - $config[Options::SIGNATURE] = $signature = self::createSignature($config); + $config[Options::SIGNATURE] = $signature = static::createSignature($config); $client = ClientBuilder::factory(__NAMESPACE__) ->setConfig($config) @@ -222,7 +221,7 @@ class S3Client extends AbstractClient // Add aliases for some S3 operations $default = CompositeFactory::getDefaultChain($client); $default->add( - new AliasFactory($client, self::$commandAliases), + new AliasFactory($client, static::$commandAliases), 'Guzzle\Service\Command\Factory\ServiceDescriptionFactory' ); $client->setCommandFactory($default); @@ -266,11 +265,16 @@ class S3Client extends AbstractClient { $currentValue = isset($config[Options::SIGNATURE]) ? $config[Options::SIGNATURE] : null; + // Force v4 if no value is provided, a region is in the config, and + // the region starts with "cn-" or "eu-central-". + $requiresV4 = !$currentValue + && isset($config['region']) + && (strpos($config['region'], 'eu-central-') === 0 + || strpos($config['region'], 'cn-') === 0); + // Use the Amazon S3 signature V4 when the value is set to "v4" or when // the value is not set and the region starts with "cn-". - if ($currentValue == 'v4' || - (!$currentValue && isset($config['region']) && substr($config['region'], 0, 3) == 'cn-') - ) { + if ($currentValue == 'v4' || $requiresV4) { // Force SignatureV4 for specific regions or if specified in the config $currentValue = new S3SignatureV4('s3'); } elseif (!$currentValue || $currentValue == 's3') { @@ -456,7 +460,7 @@ class S3Client extends AbstractClient /** * Register the Amazon S3 stream wrapper and associates it with this client object * - * @return self + * @return $this */ public function registerStreamWrapper() { @@ -515,8 +519,7 @@ class S3Client extends AbstractClient ->setTransferOptions($options->toArray()) ->addOptions($options['params']) ->setOption('ACL', $acl) - ->build() - ->upload(); + ->build(); if ($options['before_upload']) { $transfer->getEventDispatcher()->addListener( @@ -525,7 +528,7 @@ class S3Client extends AbstractClient ); } - return $transfer; + return $transfer->upload(); } /** diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/S3SignatureV4.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/S3SignatureV4.php index 7587af0fcba..edbb4fcd082 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/S3SignatureV4.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/S3SignatureV4.php @@ -32,7 +32,10 @@ class S3SignatureV4 extends SignatureV4 implements S3SignatureInterface public function signRequest(RequestInterface $request, CredentialsInterface $credentials) { if (!$request->hasHeader('x-amz-content-sha256')) { - $request->setHeader('x-amz-content-sha256', $this->getPresignedPayload($request)); + $request->setHeader( + 'x-amz-content-sha256', + $this->getPayload($request) + ); } parent::signRequest($request, $credentials); @@ -44,14 +47,7 @@ class S3SignatureV4 extends SignatureV4 implements S3SignatureInterface */ protected function getPresignedPayload(RequestInterface $request) { - $result = parent::getPresignedPayload($request); - - // If the body is empty, then sign with 'UNSIGNED-PAYLOAD' - if ($result === self::DEFAULT_PAYLOAD) { - $result = hash('sha256', 'UNSIGNED-PAYLOAD'); - } - - return $result; + return 'UNSIGNED-PAYLOAD'; } /** diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/StreamWrapper.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/StreamWrapper.php index 3bb85aae6df..b0bdb21f564 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/StreamWrapper.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/StreamWrapper.php @@ -133,7 +133,7 @@ class StreamWrapper } stream_wrapper_register('s3', get_called_class(), STREAM_IS_URL); - self::$client = $client; + static::$client = $client; } /** @@ -172,7 +172,7 @@ class StreamWrapper } // When using mode "x" validate if the file exists before attempting to read - if ($mode == 'x' && self::$client->doesObjectExist($params['Bucket'], $params['Key'], $this->getOptions())) { + if ($mode == 'x' && static::$client->doesObjectExist($params['Bucket'], $params['Key'], $this->getOptions())) { $errors[] = "{$path} already exists on Amazon S3"; } @@ -219,7 +219,7 @@ class StreamWrapper } try { - self::$client->putObject($params); + static::$client->putObject($params); return true; } catch (\Exception $e) { return $this->triggerError($e->getMessage()); @@ -283,7 +283,7 @@ class StreamWrapper { try { $this->clearStatInfo($path); - self::$client->deleteObject($this->getParams($path)); + static::$client->deleteObject($this->getParams($path)); return true; } catch (\Exception $e) { return $this->triggerError($e->getMessage()); @@ -316,15 +316,15 @@ class StreamWrapper public function url_stat($path, $flags) { // Check if this path is in the url_stat cache - if (isset(self::$nextStat[$path])) { - return self::$nextStat[$path]; + if (isset(static::$nextStat[$path])) { + return static::$nextStat[$path]; } $parts = $this->getParams($path); if (!$parts['Key']) { // Stat "directories": buckets, or "s3://" - if (!$parts['Bucket'] || self::$client->doesBucketExist($parts['Bucket'])) { + if (!$parts['Bucket'] || static::$client->doesBucketExist($parts['Bucket'])) { return $this->formatUrlStat($path); } else { return $this->triggerError("File or directory not found: {$path}", $flags); @@ -333,7 +333,7 @@ class StreamWrapper try { try { - $result = self::$client->headObject($parts)->toArray(); + $result = static::$client->headObject($parts)->toArray(); if (substr($parts['Key'], -1, 1) == '/' && $result['ContentLength'] == 0) { // Return as if it is a bucket to account for console bucket objects (e.g., zero-byte object "foo/") return $this->formatUrlStat($path); @@ -343,7 +343,7 @@ class StreamWrapper } } catch (NoSuchKeyException $e) { // Maybe this isn't an actual key, but a prefix. Do a prefix listing of objects to determine. - $result = self::$client->listObjects(array( + $result = static::$client->listObjects(array( 'Bucket' => $parts['Bucket'], 'Prefix' => rtrim($parts['Key'], '/') . '/', 'MaxKeys' => 1 @@ -404,7 +404,7 @@ class StreamWrapper try { if (!$params['Key']) { - self::$client->deleteBucket(array('Bucket' => $params['Bucket'])); + static::$client->deleteBucket(array('Bucket' => $params['Bucket'])); $this->clearStatInfo($path); return true; } @@ -412,7 +412,7 @@ class StreamWrapper // Use a key that adds a trailing slash if needed. $prefix = rtrim($params['Key'], '/') . '/'; - $result = self::$client->listObjects(array( + $result = static::$client->listObjects(array( 'Bucket' => $params['Bucket'], 'Prefix' => $prefix, 'MaxKeys' => 1 @@ -476,7 +476,7 @@ class StreamWrapper $operationParams['Delimiter'] = $delimiter; } - $objectIterator = self::$client->getIterator('ListObjects', $operationParams, array( + $objectIterator = static::$client->getIterator('ListObjects', $operationParams, array( 'return_prefixes' => true, 'sort_results' => true )); @@ -554,7 +554,7 @@ class StreamWrapper // Cache the object data for quick url_stat lookups used with // RecursiveDirectoryIterator. - self::$nextStat = array($key => $stat); + static::$nextStat = array($key => $stat); $this->objectIterator->next(); return $result; @@ -582,14 +582,14 @@ class StreamWrapper try { // Copy the object and allow overriding default parameters if desired, but by default copy metadata - self::$client->copyObject($this->getOptions() + array( + static::$client->copyObject($this->getOptions() + array( 'Bucket' => $partsTo['Bucket'], 'Key' => $partsTo['Key'], 'CopySource' => '/' . $partsFrom['Bucket'] . '/' . rawurlencode($partsFrom['Key']), 'MetadataDirective' => 'COPY' )); // Delete the original object - self::$client->deleteObject(array( + static::$client->deleteObject(array( 'Bucket' => $partsFrom['Bucket'], 'Key' => $partsFrom['Key'] ) + $this->getOptions()); @@ -685,7 +685,7 @@ class StreamWrapper protected function openReadStream(array $params, array &$errors) { // Create the command and serialize the request - $request = $this->getSignedRequest(self::$client->getCommand('GetObject', $params)); + $request = $this->getSignedRequest(static::$client->getCommand('GetObject', $params)); // Create a stream that uses the EntityBody object $factory = $this->getOption('stream_factory') ?: new PhpStreamRequestFactory(); $this->body = $factory->fromRequest($request, array(), array('stream_class' => 'Guzzle\Http\EntityBody')); @@ -723,7 +723,7 @@ class StreamWrapper { try { // Get the body of the object - $this->body = self::$client->getObject($params)->get('Body'); + $this->body = static::$client->getObject($params)->get('Body'); $this->body->seek(0, SEEK_END); } catch (S3Exception $e) { // The object does not exist, so use a simple write stream @@ -810,7 +810,7 @@ class StreamWrapper */ protected function clearStatInfo($path = null) { - self::$nextStat = array(); + static::$nextStat = array(); if ($path) { clearstatcache(true, $path); } @@ -826,12 +826,12 @@ class StreamWrapper */ private function createBucket($path, array $params) { - if (self::$client->doesBucketExist($params['Bucket'])) { + if (static::$client->doesBucketExist($params['Bucket'])) { return $this->triggerError("Directory already exists: {$path}"); } try { - self::$client->createBucket($params); + static::$client->createBucket($params); $this->clearStatInfo($path); return true; } catch (\Exception $e) { @@ -854,12 +854,12 @@ class StreamWrapper $params['Body'] = ''; // Fail if this pseudo directory key already exists - if (self::$client->doesObjectExist($params['Bucket'], $params['Key'])) { + if (static::$client->doesObjectExist($params['Bucket'], $params['Key'])) { return $this->triggerError("Directory already exists: {$path}"); } try { - self::$client->putObject($params); + static::$client->putObject($params); $this->clearStatInfo($path); return true; } catch (\Exception $e) { diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/AbstractSyncBuilder.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/AbstractSyncBuilder.php index a2fe0fc5b8f..df69f4a8519 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/AbstractSyncBuilder.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/AbstractSyncBuilder.php @@ -65,7 +65,7 @@ abstract class AbstractSyncBuilder protected $debug; /** - * @return self + * @return static */ public static function getInstance() { @@ -77,7 +77,7 @@ abstract class AbstractSyncBuilder * * @param string $bucket Amazon S3 bucket name * - * @return self + * @return $this */ public function setBucket($bucket) { @@ -91,7 +91,7 @@ abstract class AbstractSyncBuilder * * @param S3Client $client Amazon S3 client * - * @return self + * @return $this */ public function setClient(S3Client $client) { @@ -105,7 +105,7 @@ abstract class AbstractSyncBuilder * * @param \Iterator $iterator * - * @return self + * @return $this */ public function setSourceIterator(\Iterator $iterator) { @@ -119,7 +119,7 @@ abstract class AbstractSyncBuilder * * @param FileNameConverterInterface $converter Filename to object key provider * - * @return self + * @return $this */ public function setSourceFilenameConverter(FilenameConverterInterface $converter) { @@ -133,7 +133,7 @@ abstract class AbstractSyncBuilder * * @param FileNameConverterInterface $converter Filename to object key provider * - * @return self + * @return $this */ public function setTargetFilenameConverter(FilenameConverterInterface $converter) { @@ -148,7 +148,7 @@ abstract class AbstractSyncBuilder * * @param string $baseDir Base directory, which will be deleted from each uploaded object key * - * @return self + * @return $this */ public function setBaseDir($baseDir) { @@ -164,7 +164,7 @@ abstract class AbstractSyncBuilder * * @param string $keyPrefix Prefix for each uploaded key * - * @return self + * @return $this */ public function setKeyPrefix($keyPrefix) { @@ -179,7 +179,7 @@ abstract class AbstractSyncBuilder * * @param string $delimiter Delimiter to use to separate paths * - * @return self + * @return $this */ public function setDelimiter($delimiter) { @@ -193,7 +193,7 @@ abstract class AbstractSyncBuilder * * @param array $params Associative array of PutObject (upload) GetObject (download) parameters * - * @return self + * @return $this */ public function setOperationParams(array $params) { @@ -207,7 +207,7 @@ abstract class AbstractSyncBuilder * * @param int $concurrency Number of concurrent transfers * - * @return self + * @return $this */ public function setConcurrency($concurrency) { @@ -221,7 +221,7 @@ abstract class AbstractSyncBuilder * * @param bool $force Set to true to force transfers without checking if it has changed * - * @return self + * @return $this */ public function force($force = false) { @@ -235,7 +235,7 @@ abstract class AbstractSyncBuilder * * @param bool|resource $enabledOrResource Set to true or false to enable or disable debug output. Pass an opened * fopen resource to write to instead of writing to standard out. - * @return self + * @return $this */ public function enableDebugOutput($enabledOrResource = true) { @@ -249,7 +249,7 @@ abstract class AbstractSyncBuilder * * @param string $search Regular expression search (in preg_match format). Any filename that matches this regex * will not be transferred. - * @return self + * @return $this */ public function addRegexFilter($search) { @@ -301,7 +301,7 @@ abstract class AbstractSyncBuilder /** * Hook to implement in subclasses * - * @return self + * @return AbstractSync */ abstract protected function specificBuild(); diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/DownloadSyncBuilder.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/DownloadSyncBuilder.php index b0a1e8cda4c..d9cd044449a 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/DownloadSyncBuilder.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/DownloadSyncBuilder.php @@ -38,7 +38,7 @@ class DownloadSyncBuilder extends AbstractSyncBuilder * * @param string $directory Directory * - * @return self + * @return $this */ public function setDirectory($directory) { diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/UploadSyncBuilder.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/UploadSyncBuilder.php index ad6333d687b..20830590692 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/UploadSyncBuilder.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/Sync/UploadSyncBuilder.php @@ -36,7 +36,7 @@ class UploadSyncBuilder extends AbstractSyncBuilder * * @param string $path Path that contains files to upload * - * @return self + * @return $this */ public function uploadFromDirectory($path) { @@ -54,7 +54,7 @@ class UploadSyncBuilder extends AbstractSyncBuilder * * @param string $glob Glob expression * - * @return self + * @return $this * @link http://www.php.net/manual/en/function.glob.php */ public function uploadFromGlob($glob) @@ -71,7 +71,7 @@ class UploadSyncBuilder extends AbstractSyncBuilder * * @param string $acl Canned ACL for each upload * - * @return self + * @return $this */ public function setAcl($acl) { @@ -85,7 +85,7 @@ class UploadSyncBuilder extends AbstractSyncBuilder * * @param Acp $acp Access control policy * - * @return self + * @return $this */ public function setAcp(Acp $acp) { @@ -100,7 +100,7 @@ class UploadSyncBuilder extends AbstractSyncBuilder * * @param int $size Size threshold * - * @return self + * @return $this */ public function setMultipartUploadSize($size) { diff --git a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/ApcClassLoader.php b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/ApcClassLoader.php index 8ee49fb45d3..513362a5030 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/ApcClassLoader.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/ApcClassLoader.php @@ -15,7 +15,7 @@ namespace Symfony\Component\ClassLoader; * ApcClassLoader implements a wrapping autoloader cached in APC for PHP 5.3. * * It expects an object implementing a findFile method to find the file. This - * allow using it as a wrapper around the other loaders of the component (the + * allows using it as a wrapper around the other loaders of the component (the * ClassLoader and the UniversalClassLoader for instance) but also around any * other autoloader following this convention (the Composer one for instance) * @@ -46,7 +46,7 @@ class ApcClassLoader /** * The class loader object being decorated. * - * @var \Symfony\Component\ClassLoader\ClassLoader + * @var object * A class loader object that implements the findFile() method. */ protected $decorated; @@ -133,5 +133,4 @@ class ApcClassLoader { return call_user_func_array(array($this->decorated, $method), $args); } - } diff --git a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/ClassMapGenerator.php b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/ClassMapGenerator.php index 7f83dbc5592..efc95ec8be9 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/ClassMapGenerator.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/ClassMapGenerator.php @@ -71,7 +71,6 @@ class ClassMapGenerator foreach ($classes as $class) { $map[$class] = $path; } - } return $map; diff --git a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Psr4ClassLoader.php b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Psr4ClassLoader.php index 429812d1156..1c0c37e0988 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Psr4ClassLoader.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Psr4ClassLoader.php @@ -32,7 +32,7 @@ class Psr4ClassLoader public function addPrefix($prefix, $baseDir) { $prefix = trim($prefix, '\\').'\\'; - $baseDir = rtrim($baseDir, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; + $baseDir = rtrim($baseDir, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR; $this->prefixes[] = array($prefix, $baseDir); } @@ -49,7 +49,7 @@ class Psr4ClassLoader list($currentPrefix, $currentBaseDir) = $current; if (0 === strpos($class, $currentPrefix)) { $classWithoutPrefix = substr($class, strlen($currentPrefix)); - $file = $currentBaseDir . str_replace('\\', DIRECTORY_SEPARATOR, $classWithoutPrefix) . '.php'; + $file = $currentBaseDir.str_replace('\\', DIRECTORY_SEPARATOR, $classWithoutPrefix).'.php'; if (file_exists($file)) { return $file; } diff --git a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/README.md b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/README.md index fc222b1c9e3..3c785049d20 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/README.md +++ b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/README.md @@ -9,51 +9,63 @@ standard or the PEAR naming convention. First, register the autoloader: - require_once __DIR__.'/src/Symfony/Component/ClassLoader/UniversalClassLoader.php'; +```php +require_once __DIR__.'/src/Symfony/Component/ClassLoader/UniversalClassLoader.php'; - use Symfony\Component\ClassLoader\UniversalClassLoader; +use Symfony\Component\ClassLoader\UniversalClassLoader; - $loader = new UniversalClassLoader(); - $loader->register(); +$loader = new UniversalClassLoader(); +$loader->register(); +``` Then, register some namespaces with the `registerNamespace()` method: - $loader->registerNamespace('Symfony', __DIR__.'/src'); - $loader->registerNamespace('Monolog', __DIR__.'/vendor/monolog/src'); +```php +$loader->registerNamespace('Symfony', __DIR__.'/src'); +$loader->registerNamespace('Monolog', __DIR__.'/vendor/monolog/src'); +``` The `registerNamespace()` method takes a namespace prefix and a path where to look for the classes as arguments. You can also register a sub-namespaces: - $loader->registerNamespace('Doctrine\\Common', __DIR__.'/vendor/doctrine-common/lib'); +```php +$loader->registerNamespace('Doctrine\\Common', __DIR__.'/vendor/doctrine-common/lib'); +``` The order of registration is significant and the first registered namespace takes precedence over later registered one. You can also register more than one path for a given namespace: - $loader->registerNamespace('Symfony', array(__DIR__.'/src', __DIR__.'/symfony/src')); +```php +$loader->registerNamespace('Symfony', array(__DIR__.'/src', __DIR__.'/symfony/src')); +``` Alternatively, you can use the `registerNamespaces()` method to register more than one namespace at once: - $loader->registerNamespaces(array( - 'Symfony' => array(__DIR__.'/src', __DIR__.'/symfony/src'), - 'Doctrine\\Common' => __DIR__.'/vendor/doctrine-common/lib', - 'Doctrine' => __DIR__.'/vendor/doctrine/lib', - 'Monolog' => __DIR__.'/vendor/monolog/src', - )); +```php +$loader->registerNamespaces(array( + 'Symfony' => array(__DIR__.'/src', __DIR__.'/symfony/src'), + 'Doctrine\\Common' => __DIR__.'/vendor/doctrine-common/lib', + 'Doctrine' => __DIR__.'/vendor/doctrine/lib', + 'Monolog' => __DIR__.'/vendor/monolog/src', +)); +``` For better performance, you can use the APC based version of the universal class loader: - require_once __DIR__.'/src/Symfony/Component/ClassLoader/UniversalClassLoader.php'; - require_once __DIR__.'/src/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php'; +```php +require_once __DIR__.'/src/Symfony/Component/ClassLoader/UniversalClassLoader.php'; +require_once __DIR__.'/src/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php'; - use Symfony\Component\ClassLoader\ApcUniversalClassLoader; +use Symfony\Component\ClassLoader\ApcUniversalClassLoader; - $loader = new ApcUniversalClassLoader('apc.prefix.'); +$loader = new ApcUniversalClassLoader('apc.prefix.'); +``` Furthermore, the component provides tools to aggregate classes into a single file, which is especially useful to improve performance on servers that do not diff --git a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/ApcUniversalClassLoaderTest.php b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/ApcUniversalClassLoaderTest.php index 38a17f28453..9755256c79a 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/ApcUniversalClassLoaderTest.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/ApcUniversalClassLoaderTest.php @@ -55,13 +55,13 @@ class ApcUniversalClassLoaderTest extends \PHPUnit_Framework_TestCase $this->assertTrue(class_exists($className), $message); } - public function getLoadClassTests() - { - return array( + public function getLoadClassTests() + { + return array( array('\\Apc\\Namespaced\\Foo', 'Apc\\Namespaced\\Foo', '->loadClass() loads Apc\Namespaced\Foo class'), array('Apc_Pearlike_Foo', 'Apc_Pearlike_Foo', '->loadClass() loads Apc_Pearlike_Foo class'), ); - } + } /** * @dataProvider getLoadClassFromFallbackTests @@ -77,15 +77,15 @@ class ApcUniversalClassLoaderTest extends \PHPUnit_Framework_TestCase $this->assertTrue(class_exists($className), $message); } - public function getLoadClassFromFallbackTests() - { - return array( + public function getLoadClassFromFallbackTests() + { + return array( array('\\Apc\\Namespaced\\Baz', 'Apc\\Namespaced\\Baz', '->loadClass() loads Apc\Namespaced\Baz class'), array('Apc_Pearlike_Baz', 'Apc_Pearlike_Baz', '->loadClass() loads Apc_Pearlike_Baz class'), array('\\Apc\\Namespaced\\FooBar', 'Apc\\Namespaced\\FooBar', '->loadClass() loads Apc\Namespaced\Baz class from fallback dir'), array('Apc_Pearlike_FooBar', 'Apc_Pearlike_FooBar', '->loadClass() loads Apc_Pearlike_Baz class from fallback dir'), ); - } + } /** * @dataProvider getLoadClassNamespaceCollisionTests @@ -100,9 +100,9 @@ class ApcUniversalClassLoaderTest extends \PHPUnit_Framework_TestCase $this->assertTrue(class_exists($className), $message); } - public function getLoadClassNamespaceCollisionTests() - { - return array( + public function getLoadClassNamespaceCollisionTests() + { + return array( array( array( 'Apc\\NamespaceCollision\\A' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/Apc/alpha', @@ -136,7 +136,7 @@ class ApcUniversalClassLoaderTest extends \PHPUnit_Framework_TestCase '->loadClass() loads NamespaceCollision\A\B\Bar from beta.', ), ); - } + } /** * @dataProvider getLoadClassPrefixCollisionTests @@ -150,9 +150,9 @@ class ApcUniversalClassLoaderTest extends \PHPUnit_Framework_TestCase $this->assertTrue(class_exists($className), $message); } - public function getLoadClassPrefixCollisionTests() - { - return array( + public function getLoadClassPrefixCollisionTests() + { + return array( array( array( 'ApcPrefixCollision_A_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/Apc/alpha/Apc', @@ -186,5 +186,5 @@ class ApcUniversalClassLoaderTest extends \PHPUnit_Framework_TestCase '->loadClass() loads ApcPrefixCollision_A_B_Bar from beta.', ), ); - } + } } diff --git a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/ClassMapGeneratorTest.php b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/ClassMapGeneratorTest.php index b8600fc54ed..35617e363ea 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/ClassMapGeneratorTest.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/ClassMapGeneratorTest.php @@ -76,7 +76,7 @@ class ClassMapGeneratorTest extends \PHPUnit_Framework_TestCase 'Namespaced\\Foo' => realpath(__DIR__).'/Fixtures/Namespaced/Foo.php', 'Namespaced\\Baz' => realpath(__DIR__).'/Fixtures/Namespaced/Baz.php', 'Namespaced\\WithComments' => realpath(__DIR__).'/Fixtures/Namespaced/WithComments.php', - ) + ), ), array(__DIR__.'/Fixtures/beta/NamespaceCollision', array( 'NamespaceCollision\\A\\B\\Bar' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/A/B/Bar.php', diff --git a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/ClassesWithParents/A.php b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/ClassesWithParents/A.php index dff891dcb79..b0f9425950f 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/ClassesWithParents/A.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/ClassesWithParents/A.php @@ -2,4 +2,6 @@ namespace ClassesWithParents; -class A extends B {} +class A extends B +{ +} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/ClassesWithParents/B.php b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/ClassesWithParents/B.php index 196bf7a2d31..22c751a7e5d 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/ClassesWithParents/B.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/ClassesWithParents/B.php @@ -2,4 +2,6 @@ namespace ClassesWithParents; -class B implements CInterface {} +class B implements CInterface +{ +} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/SomeClass.php b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/SomeClass.php index 26fabbd96e2..c63cef9233e 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/SomeClass.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/SomeClass.php @@ -13,5 +13,4 @@ namespace ClassMap; class SomeClass extends SomeParent implements SomeInterface { - } diff --git a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/SomeInterface.php b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/SomeInterface.php index 09d7a8f35a4..1fe5e09aa1f 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/SomeInterface.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/SomeInterface.php @@ -13,5 +13,4 @@ namespace ClassMap; interface SomeInterface { - } diff --git a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/SomeParent.php b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/SomeParent.php index 5a859a94607..ce2f9fc6c47 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/SomeParent.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/SomeParent.php @@ -13,5 +13,4 @@ namespace ClassMap; abstract class SomeParent { - } diff --git a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/multipleNs.php b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/multipleNs.php index d19e07fc11a..7db8cd3b67c 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/multipleNs.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/multipleNs.php @@ -1,14 +1,24 @@ <?php namespace { - class A {} + class A + { + } } namespace Alpha { - class A {} - class B {} + class A + { + } + class B + { + } } namespace Beta { - class A {} - class B {} + class A + { + } + class B + { + } } diff --git a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/sameNsMultipleClasses.php b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/sameNsMultipleClasses.php index d5ef5e5aa25..b34b9dd28be 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/sameNsMultipleClasses.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/sameNsMultipleClasses.php @@ -11,5 +11,9 @@ namespace Foo\Bar; -class A {} -class B {} +class A +{ +} +class B +{ +} diff --git a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/deps/traits.php b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/deps/traits.php index a5537ac92fa..82b30a6f9d0 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/deps/traits.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/deps/traits.php @@ -1,7 +1,8 @@ <?php trait TD -{} +{ +} trait TZ { diff --git a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/php5.4/traits.php b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/php5.4/traits.php index 2d92c378e1a..70950be6ff2 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/php5.4/traits.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/php5.4/traits.php @@ -25,6 +25,7 @@ namespace Foo { class CBar implements IBar { - use TBar, TFooBar; + use TBar; + use TFooBar; } } diff --git a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Psr4ClassLoaderTest.php b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Psr4ClassLoaderTest.php index 65cae485ad2..21a7afbd6e7 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Psr4ClassLoaderTest.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Psr4ClassLoaderTest.php @@ -24,7 +24,7 @@ class Psr4ClassLoaderTest extends \PHPUnit_Framework_TestCase $loader = new Psr4ClassLoader(); $loader->addPrefix( 'Acme\\DemoLib', - __DIR__ . DIRECTORY_SEPARATOR . 'Fixtures' . DIRECTORY_SEPARATOR . 'psr-4' + __DIR__.DIRECTORY_SEPARATOR.'Fixtures'.DIRECTORY_SEPARATOR.'psr-4' ); $loader->loadClass($className); $this->assertTrue(class_exists($className), sprintf('loadClass() should load %s', $className)); @@ -39,7 +39,7 @@ class Psr4ClassLoaderTest extends \PHPUnit_Framework_TestCase array('Acme\\DemoLib\\Foo'), array('Acme\\DemoLib\\Class_With_Underscores'), array('Acme\\DemoLib\\Lets\\Go\\Deeper\\Foo'), - array('Acme\\DemoLib\\Lets\\Go\\Deeper\\Class_With_Underscores') + array('Acme\\DemoLib\\Lets\\Go\\Deeper\\Class_With_Underscores'), ); } @@ -52,7 +52,7 @@ class Psr4ClassLoaderTest extends \PHPUnit_Framework_TestCase $loader = new Psr4ClassLoader(); $loader->addPrefix( 'Acme\\DemoLib', - __DIR__ . DIRECTORY_SEPARATOR . 'Fixtures' . DIRECTORY_SEPARATOR . 'psr-4' + __DIR__.DIRECTORY_SEPARATOR.'Fixtures'.DIRECTORY_SEPARATOR.'psr-4' ); $loader->loadClass($className); $this->assertFalse(class_exists($className), sprintf('loadClass() should not load %s', $className)); @@ -65,7 +65,7 @@ class Psr4ClassLoaderTest extends \PHPUnit_Framework_TestCase { return array( array('Acme\\DemoLib\\I_Do_Not_Exist'), - array('UnknownVendor\\SomeLib\\I_Do_Not_Exist') + array('UnknownVendor\\SomeLib\\I_Do_Not_Exist'), ); } } diff --git a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/UniversalClassLoader.php b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/UniversalClassLoader.php index 43f9a7d02c4..8a3149f3198 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/UniversalClassLoader.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/UniversalClassLoader.php @@ -287,7 +287,6 @@ class UniversalClassLoader return $file; } } - } else { // PEAR-like class name $normalizedClass = str_replace('_', DIRECTORY_SEPARATOR, $class).'.php'; diff --git a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/XcacheClassLoader.php b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/XcacheClassLoader.php index 299a79af932..30096bc83f1 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/XcacheClassLoader.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/XcacheClassLoader.php @@ -12,7 +12,7 @@ namespace Symfony\Component\ClassLoader; /** - * XcacheClassLoader implements a wrapping autoloader cached in Xcache for PHP 5.3. + * XcacheClassLoader implements a wrapping autoloader cached in XCache for PHP 5.3. * * It expects an object implementing a findFile method to find the file. This * allows using it as a wrapper around the other loaders of the component (the @@ -43,31 +43,35 @@ namespace Symfony\Component\ClassLoader; class XcacheClassLoader { private $prefix; - private $classFinder; + + /** + * @var object A class loader object that implements the findFile() method + */ + private $decorated; /** * Constructor. * - * @param string $prefix A prefix to create a namespace in Xcache - * @param object $classFinder An object that implements findFile() method. + * @param string $prefix The XCache namespace prefix to use. + * @param object $decorated A class loader object that implements the findFile() method. * * @throws \RuntimeException * @throws \InvalidArgumentException * * @api */ - public function __construct($prefix, $classFinder) + public function __construct($prefix, $decorated) { - if (!extension_loaded('Xcache')) { - throw new \RuntimeException('Unable to use XcacheClassLoader as Xcache is not enabled.'); + if (!extension_loaded('xcache')) { + throw new \RuntimeException('Unable to use XcacheClassLoader as XCache is not enabled.'); } - if (!method_exists($classFinder, 'findFile')) { + if (!method_exists($decorated, 'findFile')) { throw new \InvalidArgumentException('The class finder must implement a "findFile" method.'); } $this->prefix = $prefix; - $this->classFinder = $classFinder; + $this->decorated = $decorated; } /** @@ -116,10 +120,18 @@ class XcacheClassLoader if (xcache_isset($this->prefix.$class)) { $file = xcache_get($this->prefix.$class); } else { - $file = $this->classFinder->findFile($class); + $file = $this->decorated->findFile($class); xcache_set($this->prefix.$class, $file); } return $file; } + + /** + * Passes through all unknown calls onto the decorated object. + */ + public function __call($method, $args) + { + return call_user_func_array(array($this->decorated, $method), $args); + } } diff --git a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php index 410226bb363..b797667208b 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php @@ -271,7 +271,7 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface if ($listener instanceof \Closure) { $info += array( 'type' => 'Closure', - 'pretty' => 'closure' + 'pretty' => 'closure', ); } elseif (is_string($listener)) { try { diff --git a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/EventDispatcherInterface.php b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/EventDispatcherInterface.php index 3fdbfd8822e..c85ebdafc15 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/EventDispatcherInterface.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/EventDispatcherInterface.php @@ -64,8 +64,8 @@ interface EventDispatcherInterface /** * Removes an event listener from the specified events. * - * @param string|array $eventName The event(s) to remove a listener from - * @param callable $listener The listener to remove + * @param string $eventName The event to remove a listener from + * @param callable $listener The listener to remove */ public function removeListener($eventName, $listener); diff --git a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/README.md b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/README.md index 22bf74fdc9d..c928f136692 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/README.md +++ b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/README.md @@ -4,16 +4,18 @@ EventDispatcher Component The Symfony2 EventDispatcher component implements the Mediator pattern in a simple and effective way to make your projects truly extensible. - use Symfony\Component\EventDispatcher\EventDispatcher; - use Symfony\Component\EventDispatcher\Event; +```php +use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\EventDispatcher\Event; - $dispatcher = new EventDispatcher(); +$dispatcher = new EventDispatcher(); - $dispatcher->addListener('event_name', function (Event $event) { - // ... - }); +$dispatcher->addListener('event_name', function (Event $event) { + // ... +}); - $dispatcher->dispatch('event_name'); +$dispatcher->dispatch('event_name'); +``` Resources --------- diff --git a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/Tests/Debug/TraceableEventDispatcherTest.php b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/Tests/Debug/TraceableEventDispatcherTest.php index 8ccfabb1ca4..47dd5da1682 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/Tests/Debug/TraceableEventDispatcherTest.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/Tests/Debug/TraceableEventDispatcherTest.php @@ -24,7 +24,7 @@ class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase $dispatcher = new EventDispatcher(); $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch()); - $tdispatcher->addListener('foo', $listener = function () { ; }); + $tdispatcher->addListener('foo', $listener = function () {; }); $listeners = $dispatcher->getListeners('foo'); $this->assertCount(1, $listeners); $this->assertSame($listener, $listeners[0]); @@ -38,7 +38,7 @@ class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase $dispatcher = new EventDispatcher(); $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch()); - $tdispatcher->addListener('foo', $listener = function () { ; }); + $tdispatcher->addListener('foo', $listener = function () {; }); $this->assertSame($dispatcher->getListeners('foo'), $tdispatcher->getListeners('foo')); } @@ -50,7 +50,7 @@ class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase $this->assertFalse($dispatcher->hasListeners('foo')); $this->assertFalse($tdispatcher->hasListeners('foo')); - $tdispatcher->addListener('foo', $listener = function () { ; }); + $tdispatcher->addListener('foo', $listener = function () {; }); $this->assertTrue($dispatcher->hasListeners('foo')); $this->assertTrue($tdispatcher->hasListeners('foo')); } @@ -75,7 +75,7 @@ class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase { $dispatcher = new EventDispatcher(); $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch()); - $tdispatcher->addListener('foo', $listener = function () { ; }); + $tdispatcher->addListener('foo', $listener = function () {; }); $this->assertEquals(array(), $tdispatcher->getCalledListeners()); $this->assertEquals(array('foo.closure' => array('event' => 'foo', 'type' => 'Closure', 'pretty' => 'closure')), $tdispatcher->getNotCalledListeners()); @@ -92,8 +92,8 @@ class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase $dispatcher = new EventDispatcher(); $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch(), $logger); - $tdispatcher->addListener('foo', $listener1 = function () { ; }); - $tdispatcher->addListener('foo', $listener2 = function () { ; }); + $tdispatcher->addListener('foo', $listener1 = function () {; }); + $tdispatcher->addListener('foo', $listener2 = function () {; }); $logger->expects($this->at(0))->method('debug')->with("Notified event \"foo\" to listener \"closure\"."); $logger->expects($this->at(1))->method('debug')->with("Notified event \"foo\" to listener \"closure\"."); @@ -108,7 +108,7 @@ class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase $dispatcher = new EventDispatcher(); $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch(), $logger); $tdispatcher->addListener('foo', $listener1 = function (Event $event) { $event->stopPropagation(); }); - $tdispatcher->addListener('foo', $listener2 = function () { ; }); + $tdispatcher->addListener('foo', $listener2 = function () {; }); $logger->expects($this->at(0))->method('debug')->with("Notified event \"foo\" to listener \"closure\"."); $logger->expects($this->at(1))->method('debug')->with("Listener \"closure\" stopped propagation of the event \"foo\"."); diff --git a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/Tests/DependencyInjection/RegisterListenersPassTest.php b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/Tests/DependencyInjection/RegisterListenersPassTest.php index 5959db0d422..b291e1ee3c4 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/Tests/DependencyInjection/RegisterListenersPassTest.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/Tests/DependencyInjection/RegisterListenersPassTest.php @@ -37,7 +37,10 @@ class RegisterListenersPassTest extends \PHPUnit_Framework_TestCase ->method('getClass') ->will($this->returnValue('stdClass')); - $builder = $this->getMock('Symfony\Component\DependencyInjection\ContainerBuilder'); + $builder = $this->getMock( + 'Symfony\Component\DependencyInjection\ContainerBuilder', + array('hasDefinition', 'findTaggedServiceIds', 'getDefinition') + ); $builder->expects($this->any()) ->method('hasDefinition') ->will($this->returnValue(true)); @@ -69,7 +72,10 @@ class RegisterListenersPassTest extends \PHPUnit_Framework_TestCase ->method('getClass') ->will($this->returnValue('Symfony\Component\EventDispatcher\Tests\DependencyInjection\SubscriberService')); - $builder = $this->getMock('Symfony\Component\DependencyInjection\ContainerBuilder'); + $builder = $this->getMock( + 'Symfony\Component\DependencyInjection\ContainerBuilder', + array('hasDefinition', 'findTaggedServiceIds', 'getDefinition', 'findDefinition') + ); $builder->expects($this->any()) ->method('hasDefinition') ->will($this->returnValue(true)); @@ -136,5 +142,7 @@ class RegisterListenersPassTest extends \PHPUnit_Framework_TestCase class SubscriberService implements \Symfony\Component\EventDispatcher\EventSubscriberInterface { - public static function getSubscribedEvents() {} + public static function getSubscribedEvents() + { + } } diff --git a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php index efc0c29fab8..2bd0750b141 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php @@ -362,7 +362,7 @@ class TestEventSubscriberWithMultipleListeners implements EventSubscriberInterfa { return array('pre.foo' => array( array('preFoo1'), - array('preFoo2', 10) + array('preFoo2', 10), )); } } diff --git a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/Tests/GenericEventTest.php b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/Tests/GenericEventTest.php index 5dfda92f2af..1090bcb2960 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/Tests/GenericEventTest.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/Tests/GenericEventTest.php @@ -18,7 +18,6 @@ use Symfony\Component\EventDispatcher\GenericEvent; */ class GenericEventTest extends \PHPUnit_Framework_TestCase { - /** * @var GenericEvent */ diff --git a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/composer.json b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/composer.json index 3715ece302f..75fd243d529 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/composer.json +++ b/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/EventDispatcher/composer.json @@ -19,7 +19,7 @@ "php": ">=5.3.3" }, "require-dev": { - "symfony/dependency-injection": "~2.0", + "symfony/dependency-injection": "~2.0,<2.6.0", "symfony/config": "~2.0", "symfony/stopwatch": "~2.2", "psr/log": "~1.0" diff --git a/apps/files_external/3rdparty/google-api-php-client/NOTICE b/apps/files_external/3rdparty/google-api-php-client/NOTICE deleted file mode 100644 index 22d7cb59867..00000000000 --- a/apps/files_external/3rdparty/google-api-php-client/NOTICE +++ /dev/null @@ -1,4 +0,0 @@ -This product contains the following libraries: - -XRDS-Simple library from http://code.google.com/p/diso/ -Apache License 2.0 diff --git a/apps/files_external/3rdparty/google-api-php-client/README b/apps/files_external/3rdparty/google-api-php-client/README deleted file mode 100644 index 42c42c0d5c7..00000000000 --- a/apps/files_external/3rdparty/google-api-php-client/README +++ /dev/null @@ -1,40 +0,0 @@ -Google APIs Client Library for PHP -===================================== - -== Description -The Google API Client Library enables you to work with Google APIs such as Google+, Drive, Tasks, or Latitude on your server. - -Requirements: - PHP 5.2.x or higher [http://www.php.net/] - PHP Curl extension [http://www.php.net/manual/en/intro.curl.php] - PHP JSON extension [http://php.net/manual/en/book.json.php] - -Project page: - http://code.google.com/p/google-api-php-client - -OAuth 2 instructions: - http://code.google.com/p/google-api-php-client/wiki/OAuth2 - -Report a defect or feature request here: - http://code.google.com/p/google-api-php-client/issues/entry - -Subscribe to project updates in your feed reader: - http://code.google.com/feeds/p/google-api-php-client/updates/basic - -Supported sample applications: - http://code.google.com/p/google-api-php-client/wiki/Samples - -== Basic Example - <?php - require_once 'path/to/src/Google_Client.php'; - require_once 'path/to/src/contrib/apiBooksService.php'; - - $client = new Google_Client(); - $service = new Google_BooksService($client); - - $optParams = array('filter' => 'free-ebooks'); - $results = $service->volumes->listVolumes('Henry David Thoreau', $optParams); - - foreach ($results['items'] as $item) { - print($item['volumeInfo']['title'] . '<br>'); - } diff --git a/apps/files_external/3rdparty/google-api-php-client/README.md b/apps/files_external/3rdparty/google-api-php-client/README.md new file mode 100644 index 00000000000..e799f6725da --- /dev/null +++ b/apps/files_external/3rdparty/google-api-php-client/README.md @@ -0,0 +1,77 @@ +[](https://travis-ci.org/google/google-api-php-client) + +# Google APIs Client Library for PHP # + +## Description ## +The Google API Client Library enables you to work with Google APIs such as Google+, Drive, or YouTube on your server. + +## Beta ## +This library is in Beta. We're comfortable enough with the stability and features of the library that we want you to build real production applications on it. We will make an effort to support the public and protected surface of the library and maintain backwards compatibility in the future. While we are still in Beta, we reserve the right to make incompatible changes. If we do remove some functionality (typically because better functionality exists or if the feature proved infeasible), our intention is to deprecate and provide ample time for developers to update their code. + +## Requirements ## +* [PHP 5.2.1 or higher](http://www.php.net/) +* [PHP JSON extension](http://php.net/manual/en/book.json.php) + +*Note*: some features (service accounts and id token verification) require PHP 5.3.0 and above due to cryptographic algorithm requirements. + +## Developer Documentation ## +http://developers.google.com/api-client-library/php + +## Installation ## + +For the latest installation and setup instructions, see [the documentation](https://developers.google.com/api-client-library/php/start/installation). + +## Basic Example ## +See the examples/ directory for examples of the key client features. +```PHP +<?php + require_once 'google-api-php-client/autoload.php'; // or wherever autoload.php is located + $client = new Google_Client(); + $client->setApplicationName("Client_Library_Examples"); + $client->setDeveloperKey("YOUR_APP_KEY"); + $service = new Google_Service_Books($client); + $optParams = array('filter' => 'free-ebooks'); + $results = $service->volumes->listVolumes('Henry David Thoreau', $optParams); + + foreach ($results as $item) { + echo $item['volumeInfo']['title'], "<br /> \n"; + } +``` + +## Frequently Asked Questions ## + +### What do I do if something isn't working? ### + +For support with the library the best place to ask is via the google-api-php-client tag on StackOverflow: http://stackoverflow.com/questions/tagged/google-api-php-client + +If there is a specific bug with the library, please file a issue in the Github issues tracker, including a (minimal) example of the failing code and any specific errors retrieved. Feature requests can also be filed, as long as they are core library requests, and not-API specific: for those, refer to the documentation for the individual APIs for the best place to file requests. Please try to provide a clear statement of the problem that the feature would address. + +### How do I contribute? ### + +We accept contributions via Github Pull Requests, but all contributors need to be covered by the standard Google Contributor License Agreement. You can find links, and more instructions, in the documentation: https://developers.google.com/api-client-library/php/contribute + +### Why do you still support 5.2? ### + +When we started working on the 1.0.0 branch we knew there were several fundamental issues to fix with the 0.6 releases of the library. At that time we looked at the usage of the library, and other related projects, and determined that there was still a large and active base of PHP 5.2 installs. You can see this in statistics such as the PHP versions chart in the WordPress stats: http://wordpress.org/about/stats/. We will keep looking at the types of usage we see, and try to take advantage of newer PHP features where possible. + +### Why does Google_..._Service have weird names? ### + +The _Service classes are generally automatically generated from the API discovery documents: https://developers.google.com/discovery/. Sometimes new features are added to APIs with unusual names, which can cause some unexpected or non-standard style naming in the PHP classes. + +### How do I deal with non-JSON response types? ### + +Some services return XML or similar by default, rather than JSON, which is what the library supports. You can request a JSON response by adding an 'alt' argument to optional params that is normally the last argument to a method call: + +``` +$opt_params = array( + 'alt' => "json" +); +``` + +## Code Quality ## + +Copy the ruleset.xml in style/ into a new directory named GAPI/ in your +/usr/share/php/PHP/CodeSniffer/Standards (or appropriate equivalent directory), +and run code sniffs with: + + phpcs --standard=GAPI src/ diff --git a/apps/files_external/3rdparty/google-api-php-client/src/auth/Google_Auth.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Auth/Abstract.php index 010782d4a60..0832df3a408 100644 --- a/apps/files_external/3rdparty/google-api-php-client/src/auth/Google_Auth.php +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Auth/Abstract.php @@ -14,23 +14,22 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -require_once "Google_AuthNone.php"; -require_once "Google_OAuth2.php"; +require_once "Google/Http/Request.php"; /** * Abstract class for the Authentication in the API client * @author Chris Chabot <chabotc@google.com> * */ -abstract class Google_Auth { - abstract public function authenticate($service); - abstract public function sign(Google_HttpRequest $request); - abstract public function createAuthUrl($scope); - - abstract public function getAccessToken(); - abstract public function setAccessToken($accessToken); - abstract public function setDeveloperKey($developerKey); - abstract public function refreshToken($refreshToken); - abstract public function revokeToken(); +abstract class Google_Auth_Abstract +{ + /** + * An utility function that first calls $this->auth->sign($request) and then + * executes makeRequest() on that signed request. Used for when a request + * should be authenticated + * @param Google_Http_Request $request + * @return Google_Http_Request $request + */ + abstract public function authenticatedRequest(Google_Http_Request $request); + abstract public function sign(Google_Http_Request $request); } diff --git a/apps/files_external/3rdparty/google-api-php-client/src/auth/Google_AssertionCredentials.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Auth/AssertionCredentials.php index d9b4394ba38..3db0a779df3 100644 --- a/apps/files_external/3rdparty/google-api-php-client/src/auth/Google_AssertionCredentials.php +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Auth/AssertionCredentials.php @@ -15,12 +15,17 @@ * limitations under the License. */ +require_once "Google/Auth/OAuth2.php"; +require_once "Google/Signer/P12.php"; +require_once "Google/Utils.php"; + /** * Credentials object used for OAuth 2.0 Signed JWT assertion grants. * * @author Chirag Shah <chirags@google.com> */ -class Google_AssertionCredentials { +class Google_Auth_AssertionCredentials +{ const MAX_TOKEN_LIFETIME_SECS = 3600; public $serviceAccountName; @@ -34,6 +39,7 @@ class Google_AssertionCredentials { * @link http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-06 */ public $prn; + private $useCache; /** * @param $serviceAccountName @@ -42,8 +48,9 @@ class Google_AssertionCredentials { * @param string $privateKeyPassword * @param string $assertionType * @param bool|string $sub The email address of the user for which the - * application is requesting delegated access. - * + * application is requesting delegated access. + * @param bool useCache Whether to generate a cache key and allow + * automatic caching of the generated token. */ public function __construct( $serviceAccountName, @@ -51,7 +58,9 @@ class Google_AssertionCredentials { $privateKey, $privateKeyPassword = 'notasecret', $assertionType = 'http://oauth.net/grant_type/jwt/1.0/bearer', - $sub = false) { + $sub = false, + $useCache = true + ) { $this->serviceAccountName = $serviceAccountName; $this->scopes = is_string($scopes) ? $scopes : implode(' ', $scopes); $this->privateKey = $privateKey; @@ -59,13 +68,32 @@ class Google_AssertionCredentials { $this->assertionType = $assertionType; $this->sub = $sub; $this->prn = $sub; + $this->useCache = $useCache; + } + + /** + * Generate a unique key to represent this credential. + * @return string + */ + public function getCacheKey() + { + if (!$this->useCache) { + return false; + } + $h = $this->sub; + $h .= $this->assertionType; + $h .= $this->privateKey; + $h .= $this->scopes; + $h .= $this->serviceAccountName; + return md5($h); } - public function generateAssertion() { + public function generateAssertion() + { $now = time(); $jwtParams = array( - 'aud' => Google_OAuth2::OAUTH2_TOKEN_URI, + 'aud' => Google_Auth_OAuth2::OAUTH2_TOKEN_URI, 'scope' => $this->scopes, 'iat' => $now, 'exp' => $now + self::MAX_TOKEN_LIFETIME_SECS, @@ -86,16 +114,22 @@ class Google_AssertionCredentials { * @param array $payload * @return string The signed JWT. */ - private function makeSignedJwt($payload) { + private function makeSignedJwt($payload) + { $header = array('typ' => 'JWT', 'alg' => 'RS256'); + $payload = json_encode($payload); + // Handle some overzealous escaping in PHP json that seemed to cause some errors + // with claimsets. + $payload = str_replace('\/', '/', $payload); + $segments = array( Google_Utils::urlSafeB64Encode(json_encode($header)), - Google_Utils::urlSafeB64Encode(json_encode($payload)) + Google_Utils::urlSafeB64Encode($payload) ); $signingInput = implode('.', $segments); - $signer = new Google_P12Signer($this->privateKey, $this->privateKeyPassword); + $signer = new Google_Signer_P12($this->privateKey, $this->privateKeyPassword); $signature = $signer->sign($signingInput); $segments[] = Google_Utils::urlSafeB64Encode($signature); diff --git a/apps/files_external/3rdparty/google-api-php-client/src/Google/Auth/Exception.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Auth/Exception.php new file mode 100644 index 00000000000..65067ee4436 --- /dev/null +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Auth/Exception.php @@ -0,0 +1,22 @@ +<?php +/* + * Copyright 2013 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +require_once "Google/Exception.php"; + +class Google_Auth_Exception extends Google_Exception +{ +} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/auth/Google_LoginTicket.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Auth/LoginTicket.php index c0ce614232b..bcf798ae5ff 100644 --- a/apps/files_external/3rdparty/google-api-php-client/src/auth/Google_LoginTicket.php +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Auth/LoginTicket.php @@ -15,13 +15,16 @@ * limitations under the License. */ +require_once "Google/Auth/Exception.php"; + /** * Class to hold information about an authenticated login. * * @author Brian Eaton <beaton@google.com> */ -class Google_LoginTicket { - const USER_ATTR = "id"; +class Google_Auth_LoginTicket +{ + const USER_ATTR = "sub"; // Information from id token envelope. private $envelope; @@ -35,21 +38,23 @@ class Google_LoginTicket { * @param string $envelope Header from a verified authentication token. * @param string $payload Information from a verified authentication token. */ - public function __construct($envelope, $payload) { + public function __construct($envelope, $payload) + { $this->envelope = $envelope; $this->payload = $payload; } /** * Returns the numeric identifier for the user. - * @throws Google_AuthException + * @throws Google_Auth_Exception * @return */ - public function getUserId() { + public function getUserId() + { if (array_key_exists(self::USER_ATTR, $this->payload)) { return $this->payload[self::USER_ATTR]; } - throw new Google_AuthException("No user_id in token"); + throw new Google_Auth_Exception("No user_id in token"); } /** @@ -57,7 +62,8 @@ class Google_LoginTicket { * various information about the user session. * @return array */ - public function getAttributes() { + public function getAttributes() + { return array("envelope" => $this->envelope, "payload" => $this->payload); } } diff --git a/apps/files_external/3rdparty/google-api-php-client/src/Google/Auth/OAuth2.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Auth/OAuth2.php new file mode 100644 index 00000000000..5630d755e04 --- /dev/null +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Auth/OAuth2.php @@ -0,0 +1,620 @@ +<?php +/* + * Copyright 2008 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +require_once "Google/Auth/Abstract.php"; +require_once "Google/Auth/AssertionCredentials.php"; +require_once "Google/Auth/Exception.php"; +require_once "Google/Auth/LoginTicket.php"; +require_once "Google/Client.php"; +require_once "Google/Http/Request.php"; +require_once "Google/Utils.php"; +require_once "Google/Verifier/Pem.php"; + +/** + * Authentication class that deals with the OAuth 2 web-server authentication flow + * + * @author Chris Chabot <chabotc@google.com> + * @author Chirag Shah <chirags@google.com> + * + */ +class Google_Auth_OAuth2 extends Google_Auth_Abstract +{ + const OAUTH2_REVOKE_URI = 'https://accounts.google.com/o/oauth2/revoke'; + const OAUTH2_TOKEN_URI = 'https://accounts.google.com/o/oauth2/token'; + const OAUTH2_AUTH_URL = 'https://accounts.google.com/o/oauth2/auth'; + const CLOCK_SKEW_SECS = 300; // five minutes in seconds + const AUTH_TOKEN_LIFETIME_SECS = 300; // five minutes in seconds + const MAX_TOKEN_LIFETIME_SECS = 86400; // one day in seconds + const OAUTH2_ISSUER = 'accounts.google.com'; + + /** @var Google_Auth_AssertionCredentials $assertionCredentials */ + private $assertionCredentials; + + /** + * @var string The state parameters for CSRF and other forgery protection. + */ + private $state; + + /** + * @var array The token bundle. + */ + private $token = array(); + + /** + * @var Google_Client the base client + */ + private $client; + + /** + * Instantiates the class, but does not initiate the login flow, leaving it + * to the discretion of the caller. + */ + public function __construct(Google_Client $client) + { + $this->client = $client; + } + + /** + * Perform an authenticated / signed apiHttpRequest. + * This function takes the apiHttpRequest, calls apiAuth->sign on it + * (which can modify the request in what ever way fits the auth mechanism) + * and then calls apiCurlIO::makeRequest on the signed request + * + * @param Google_Http_Request $request + * @return Google_Http_Request The resulting HTTP response including the + * responseHttpCode, responseHeaders and responseBody. + */ + public function authenticatedRequest(Google_Http_Request $request) + { + $request = $this->sign($request); + return $this->client->getIo()->makeRequest($request); + } + + /** + * @param string $code + * @throws Google_Auth_Exception + * @return string + */ + public function authenticate($code) + { + if (strlen($code) == 0) { + throw new Google_Auth_Exception("Invalid code"); + } + + // We got here from the redirect from a successful authorization grant, + // fetch the access token + $request = new Google_Http_Request( + self::OAUTH2_TOKEN_URI, + 'POST', + array(), + array( + 'code' => $code, + 'grant_type' => 'authorization_code', + 'redirect_uri' => $this->client->getClassConfig($this, 'redirect_uri'), + 'client_id' => $this->client->getClassConfig($this, 'client_id'), + 'client_secret' => $this->client->getClassConfig($this, 'client_secret') + ) + ); + $request->disableGzip(); + $response = $this->client->getIo()->makeRequest($request); + + if ($response->getResponseHttpCode() == 200) { + $this->setAccessToken($response->getResponseBody()); + $this->token['created'] = time(); + return $this->getAccessToken(); + } else { + $decodedResponse = json_decode($response->getResponseBody(), true); + if ($decodedResponse != null && $decodedResponse['error']) { + $decodedResponse = $decodedResponse['error']; + if (isset($decodedResponse['error_description'])) { + $decodedResponse .= ": " . $decodedResponse['error_description']; + } + } + throw new Google_Auth_Exception( + sprintf( + "Error fetching OAuth2 access token, message: '%s'", + $decodedResponse + ), + $response->getResponseHttpCode() + ); + } + } + + /** + * Create a URL to obtain user authorization. + * The authorization endpoint allows the user to first + * authenticate, and then grant/deny the access request. + * @param string $scope The scope is expressed as a list of space-delimited strings. + * @return string + */ + public function createAuthUrl($scope) + { + $params = array( + 'response_type' => 'code', + 'redirect_uri' => $this->client->getClassConfig($this, 'redirect_uri'), + 'client_id' => $this->client->getClassConfig($this, 'client_id'), + 'scope' => $scope, + 'access_type' => $this->client->getClassConfig($this, 'access_type'), + ); + + $params = $this->maybeAddParam($params, 'approval_prompt'); + $params = $this->maybeAddParam($params, 'login_hint'); + $params = $this->maybeAddParam($params, 'hd'); + $params = $this->maybeAddParam($params, 'openid.realm'); + $params = $this->maybeAddParam($params, 'prompt'); + $params = $this->maybeAddParam($params, 'include_granted_scopes'); + + // If the list of scopes contains plus.login, add request_visible_actions + // to auth URL. + $rva = $this->client->getClassConfig($this, 'request_visible_actions'); + if (strpos($scope, 'plus.login') && strlen($rva) > 0) { + $params['request_visible_actions'] = $rva; + } + + if (isset($this->state)) { + $params['state'] = $this->state; + } + + return self::OAUTH2_AUTH_URL . "?" . http_build_query($params, '', '&'); + } + + /** + * @param string $token + * @throws Google_Auth_Exception + */ + public function setAccessToken($token) + { + $token = json_decode($token, true); + if ($token == null) { + throw new Google_Auth_Exception('Could not json decode the token'); + } + if (! isset($token['access_token'])) { + throw new Google_Auth_Exception("Invalid token format"); + } + $this->token = $token; + } + + public function getAccessToken() + { + return json_encode($this->token); + } + + public function getRefreshToken() + { + if (array_key_exists('refresh_token', $this->token)) { + return $this->token['refresh_token']; + } else { + return null; + } + } + + public function setState($state) + { + $this->state = $state; + } + + public function setAssertionCredentials(Google_Auth_AssertionCredentials $creds) + { + $this->assertionCredentials = $creds; + } + + /** + * Include an accessToken in a given apiHttpRequest. + * @param Google_Http_Request $request + * @return Google_Http_Request + * @throws Google_Auth_Exception + */ + public function sign(Google_Http_Request $request) + { + // add the developer key to the request before signing it + if ($this->client->getClassConfig($this, 'developer_key')) { + $request->setQueryParam('key', $this->client->getClassConfig($this, 'developer_key')); + } + + // Cannot sign the request without an OAuth access token. + if (null == $this->token && null == $this->assertionCredentials) { + return $request; + } + + // Check if the token is set to expire in the next 30 seconds + // (or has already expired). + if ($this->isAccessTokenExpired()) { + if ($this->assertionCredentials) { + $this->refreshTokenWithAssertion(); + } else { + if (! array_key_exists('refresh_token', $this->token)) { + throw new Google_Auth_Exception( + "The OAuth 2.0 access token has expired," + ." and a refresh token is not available. Refresh tokens" + ." are not returned for responses that were auto-approved." + ); + } + $this->refreshToken($this->token['refresh_token']); + } + } + + // Add the OAuth2 header to the request + $request->setRequestHeaders( + array('Authorization' => 'Bearer ' . $this->token['access_token']) + ); + + return $request; + } + + /** + * Fetches a fresh access token with the given refresh token. + * @param string $refreshToken + * @return void + */ + public function refreshToken($refreshToken) + { + $this->refreshTokenRequest( + array( + 'client_id' => $this->client->getClassConfig($this, 'client_id'), + 'client_secret' => $this->client->getClassConfig($this, 'client_secret'), + 'refresh_token' => $refreshToken, + 'grant_type' => 'refresh_token' + ) + ); + } + + /** + * Fetches a fresh access token with a given assertion token. + * @param Google_Auth_AssertionCredentials $assertionCredentials optional. + * @return void + */ + public function refreshTokenWithAssertion($assertionCredentials = null) + { + if (!$assertionCredentials) { + $assertionCredentials = $this->assertionCredentials; + } + + $cacheKey = $assertionCredentials->getCacheKey(); + + if ($cacheKey) { + // We can check whether we have a token available in the + // cache. If it is expired, we can retrieve a new one from + // the assertion. + $token = $this->client->getCache()->get($cacheKey); + if ($token) { + $this->setAccessToken($token); + } + if (!$this->isAccessTokenExpired()) { + return; + } + } + + $this->refreshTokenRequest( + array( + 'grant_type' => 'assertion', + 'assertion_type' => $assertionCredentials->assertionType, + 'assertion' => $assertionCredentials->generateAssertion(), + ) + ); + + if ($cacheKey) { + // Attempt to cache the token. + $this->client->getCache()->set( + $cacheKey, + $this->getAccessToken() + ); + } + } + + private function refreshTokenRequest($params) + { + $http = new Google_Http_Request( + self::OAUTH2_TOKEN_URI, + 'POST', + array(), + $params + ); + $http->disableGzip(); + $request = $this->client->getIo()->makeRequest($http); + + $code = $request->getResponseHttpCode(); + $body = $request->getResponseBody(); + if (200 == $code) { + $token = json_decode($body, true); + if ($token == null) { + throw new Google_Auth_Exception("Could not json decode the access token"); + } + + if (! isset($token['access_token']) || ! isset($token['expires_in'])) { + throw new Google_Auth_Exception("Invalid token format"); + } + + if (isset($token['id_token'])) { + $this->token['id_token'] = $token['id_token']; + } + $this->token['access_token'] = $token['access_token']; + $this->token['expires_in'] = $token['expires_in']; + $this->token['created'] = time(); + } else { + throw new Google_Auth_Exception("Error refreshing the OAuth2 token, message: '$body'", $code); + } + } + + /** + * Revoke an OAuth2 access token or refresh token. This method will revoke the current access + * token, if a token isn't provided. + * @throws Google_Auth_Exception + * @param string|null $token The token (access token or a refresh token) that should be revoked. + * @return boolean Returns True if the revocation was successful, otherwise False. + */ + public function revokeToken($token = null) + { + if (!$token) { + if (!$this->token) { + // Not initialized, no token to actually revoke + return false; + } elseif (array_key_exists('refresh_token', $this->token)) { + $token = $this->token['refresh_token']; + } else { + $token = $this->token['access_token']; + } + } + $request = new Google_Http_Request( + self::OAUTH2_REVOKE_URI, + 'POST', + array(), + "token=$token" + ); + $request->disableGzip(); + $response = $this->client->getIo()->makeRequest($request); + $code = $response->getResponseHttpCode(); + if ($code == 200) { + $this->token = null; + return true; + } + + return false; + } + + /** + * Returns if the access_token is expired. + * @return bool Returns True if the access_token is expired. + */ + public function isAccessTokenExpired() + { + if (!$this->token || !isset($this->token['created'])) { + return true; + } + + // If the token is set to expire in the next 30 seconds. + $expired = ($this->token['created'] + + ($this->token['expires_in'] - 30)) < time(); + + return $expired; + } + + // Gets federated sign-on certificates to use for verifying identity tokens. + // Returns certs as array structure, where keys are key ids, and values + // are PEM encoded certificates. + private function getFederatedSignOnCerts() + { + return $this->retrieveCertsFromLocation( + $this->client->getClassConfig($this, 'federated_signon_certs_url') + ); + } + + /** + * Retrieve and cache a certificates file. + * @param $url location + * @return array certificates + */ + public function retrieveCertsFromLocation($url) + { + // If we're retrieving a local file, just grab it. + if ("http" != substr($url, 0, 4)) { + $file = file_get_contents($url); + if ($file) { + return json_decode($file, true); + } else { + throw new Google_Auth_Exception( + "Failed to retrieve verification certificates: '" . + $url . "'." + ); + } + } + + // This relies on makeRequest caching certificate responses. + $request = $this->client->getIo()->makeRequest( + new Google_Http_Request( + $url + ) + ); + if ($request->getResponseHttpCode() == 200) { + $certs = json_decode($request->getResponseBody(), true); + if ($certs) { + return $certs; + } + } + throw new Google_Auth_Exception( + "Failed to retrieve verification certificates: '" . + $request->getResponseBody() . "'.", + $request->getResponseHttpCode() + ); + } + + /** + * Verifies an id token and returns the authenticated apiLoginTicket. + * Throws an exception if the id token is not valid. + * The audience parameter can be used to control which id tokens are + * accepted. By default, the id token must have been issued to this OAuth2 client. + * + * @param $id_token + * @param $audience + * @return Google_Auth_LoginTicket + */ + public function verifyIdToken($id_token = null, $audience = null) + { + if (!$id_token) { + $id_token = $this->token['id_token']; + } + $certs = $this->getFederatedSignonCerts(); + if (!$audience) { + $audience = $this->client->getClassConfig($this, 'client_id'); + } + + return $this->verifySignedJwtWithCerts($id_token, $certs, $audience, self::OAUTH2_ISSUER); + } + + /** + * Verifies the id token, returns the verified token contents. + * + * @param $jwt the token + * @param $certs array of certificates + * @param $required_audience the expected consumer of the token + * @param [$issuer] the expected issues, defaults to Google + * @param [$max_expiry] the max lifetime of a token, defaults to MAX_TOKEN_LIFETIME_SECS + * @return token information if valid, false if not + */ + public function verifySignedJwtWithCerts( + $jwt, + $certs, + $required_audience, + $issuer = null, + $max_expiry = null + ) { + if (!$max_expiry) { + // Set the maximum time we will accept a token for. + $max_expiry = self::MAX_TOKEN_LIFETIME_SECS; + } + + $segments = explode(".", $jwt); + if (count($segments) != 3) { + throw new Google_Auth_Exception("Wrong number of segments in token: $jwt"); + } + $signed = $segments[0] . "." . $segments[1]; + $signature = Google_Utils::urlSafeB64Decode($segments[2]); + + // Parse envelope. + $envelope = json_decode(Google_Utils::urlSafeB64Decode($segments[0]), true); + if (!$envelope) { + throw new Google_Auth_Exception("Can't parse token envelope: " . $segments[0]); + } + + // Parse token + $json_body = Google_Utils::urlSafeB64Decode($segments[1]); + $payload = json_decode($json_body, true); + if (!$payload) { + throw new Google_Auth_Exception("Can't parse token payload: " . $segments[1]); + } + + // Check signature + $verified = false; + foreach ($certs as $keyName => $pem) { + $public_key = new Google_Verifier_Pem($pem); + if ($public_key->verify($signed, $signature)) { + $verified = true; + break; + } + } + + if (!$verified) { + throw new Google_Auth_Exception("Invalid token signature: $jwt"); + } + + // Check issued-at timestamp + $iat = 0; + if (array_key_exists("iat", $payload)) { + $iat = $payload["iat"]; + } + if (!$iat) { + throw new Google_Auth_Exception("No issue time in token: $json_body"); + } + $earliest = $iat - self::CLOCK_SKEW_SECS; + + // Check expiration timestamp + $now = time(); + $exp = 0; + if (array_key_exists("exp", $payload)) { + $exp = $payload["exp"]; + } + if (!$exp) { + throw new Google_Auth_Exception("No expiration time in token: $json_body"); + } + if ($exp >= $now + $max_expiry) { + throw new Google_Auth_Exception( + sprintf("Expiration time too far in future: %s", $json_body) + ); + } + + $latest = $exp + self::CLOCK_SKEW_SECS; + if ($now < $earliest) { + throw new Google_Auth_Exception( + sprintf( + "Token used too early, %s < %s: %s", + $now, + $earliest, + $json_body + ) + ); + } + if ($now > $latest) { + throw new Google_Auth_Exception( + sprintf( + "Token used too late, %s > %s: %s", + $now, + $latest, + $json_body + ) + ); + } + + $iss = $payload['iss']; + if ($issuer && $iss != $issuer) { + throw new Google_Auth_Exception( + sprintf( + "Invalid issuer, %s != %s: %s", + $iss, + $issuer, + $json_body + ) + ); + } + + // Check audience + $aud = $payload["aud"]; + if ($aud != $required_audience) { + throw new Google_Auth_Exception( + sprintf( + "Wrong recipient, %s != %s:", + $aud, + $required_audience, + $json_body + ) + ); + } + + // All good. + return new Google_Auth_LoginTicket($envelope, $payload); + } + + /** + * Add a parameter to the auth params if not empty string. + */ + private function maybeAddParam($params, $name) + { + $param = $this->client->getClassConfig($this, $name); + if ($param != '') { + $params[$name] = $param; + } + return $params; + } +} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/Google/Auth/Simple.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Auth/Simple.php new file mode 100644 index 00000000000..e83900fc26f --- /dev/null +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Auth/Simple.php @@ -0,0 +1,62 @@ +<?php +/* + * Copyright 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +require_once "Google/Auth/Abstract.php"; +require_once "Google/Http/Request.php"; + +/** + * Simple API access implementation. Can either be used to make requests + * completely unauthenticated, or by using a Simple API Access developer + * key. + * @author Chris Chabot <chabotc@google.com> + * @author Chirag Shah <chirags@google.com> + */ +class Google_Auth_Simple extends Google_Auth_Abstract +{ + private $key = null; + private $client; + + public function __construct(Google_Client $client, $config = null) + { + $this->client = $client; + } + + /** + * Perform an authenticated / signed apiHttpRequest. + * This function takes the apiHttpRequest, calls apiAuth->sign on it + * (which can modify the request in what ever way fits the auth mechanism) + * and then calls apiCurlIO::makeRequest on the signed request + * + * @param Google_Http_Request $request + * @return Google_Http_Request The resulting HTTP response including the + * responseHttpCode, responseHeaders and responseBody. + */ + public function authenticatedRequest(Google_Http_Request $request) + { + $request = $this->sign($request); + return $this->io->makeRequest($request); + } + + public function sign(Google_Http_Request $request) + { + $key = $this->client->getClassConfig($this, 'developer_key'); + if ($key) { + $request->setQueryParam('key', $key); + } + return $request; + } +} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/cache/Google_Cache.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Cache/Abstract.php index 809c55e2b15..ff19f36ac46 100644 --- a/apps/files_external/3rdparty/google-api-php-client/src/cache/Google_Cache.php +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Cache/Abstract.php @@ -15,15 +15,15 @@ * limitations under the License. */ -require_once "Google_FileCache.php"; -require_once "Google_MemcacheCache.php"; - /** * Abstract storage class * * @author Chris Chabot <chabotc@google.com> */ -abstract class Google_Cache { +abstract class Google_Cache_Abstract +{ + + abstract public function __construct(Google_Client $client); /** * Retrieves the data for the given key, or false if they @@ -33,7 +33,7 @@ abstract class Google_Cache { * @param boolean|int $expiration Expiration time in seconds * */ - abstract function get($key, $expiration = false); + abstract public function get($key, $expiration = false); /** * Store the key => $value set. The $value is serialized @@ -42,14 +42,12 @@ abstract class Google_Cache { * @param string $key Key of the data * @param string $value data */ - abstract function set($key, $value); + abstract public function set($key, $value); /** * Removes the key/data pair for the given $key * * @param String $key */ - abstract function delete($key); + abstract public function delete($key); } - - diff --git a/apps/files_external/3rdparty/google-api-php-client/src/Google/Cache/Apc.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Cache/Apc.php new file mode 100644 index 00000000000..051b537a4e1 --- /dev/null +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Cache/Apc.php @@ -0,0 +1,73 @@ +<?php +/* + * Copyright 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +require_once "Google/Cache/Abstract.php"; +require_once "Google/Cache/Exception.php"; + +/** + * A persistent storage class based on the APC cache, which is not + * really very persistent, as soon as you restart your web server + * the storage will be wiped, however for debugging and/or speed + * it can be useful, and cache is a lot cheaper then storage. + * + * @author Chris Chabot <chabotc@google.com> + */ +class Google_Cache_Apc extends Google_Cache_Abstract +{ + public function __construct(Google_Client $client) + { + if (! function_exists('apc_add') ) { + throw new Google_Cache_Exception("Apc functions not available"); + } + } + + /** + * @inheritDoc + */ + public function get($key, $expiration = false) + { + $ret = apc_fetch($key); + if ($ret === false) { + return false; + } + if (is_numeric($expiration) && (time() - $ret['time'] > $expiration)) { + $this->delete($key); + return false; + } + return $ret['data']; + } + + /** + * @inheritDoc + */ + public function set($key, $value) + { + $rc = apc_store($key, array('time' => time(), 'data' => $value)); + if ($rc == false) { + throw new Google_Cache_Exception("Couldn't store data"); + } + } + + /** + * @inheritDoc + * @param String $key + */ + public function delete($key) + { + apc_delete($key); + } +} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/Google/Cache/Exception.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Cache/Exception.php new file mode 100644 index 00000000000..23b624608e8 --- /dev/null +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Cache/Exception.php @@ -0,0 +1,21 @@ +<?php +/* + * Copyright 2013 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +require_once "Google/Exception.php"; + +class Google_Cache_Exception extends Google_Exception +{ +} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/Google/Cache/File.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Cache/File.php new file mode 100644 index 00000000000..8d0d62fe88c --- /dev/null +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Cache/File.php @@ -0,0 +1,145 @@ +<?php +/* + * Copyright 2008 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +require_once "Google/Cache/Abstract.php"; +require_once "Google/Cache/Exception.php"; + +/* + * This class implements a basic on disk storage. While that does + * work quite well it's not the most elegant and scalable solution. + * It will also get you into a heap of trouble when you try to run + * this in a clustered environment. + * + * @author Chris Chabot <chabotc@google.com> + */ +class Google_Cache_File extends Google_Cache_Abstract +{ + const MAX_LOCK_RETRIES = 10; + private $path; + private $fh; + + public function __construct(Google_Client $client) + { + $this->path = $client->getClassConfig($this, 'directory'); + } + + public function get($key, $expiration = false) + { + $storageFile = $this->getCacheFile($key); + $data = false; + + if (!file_exists($storageFile)) { + return false; + } + + if ($expiration) { + $mtime = filemtime($storageFile); + if ((time() - $mtime) >= $expiration) { + $this->delete($key); + return false; + } + } + + if ($this->acquireReadLock($storageFile)) { + $data = fread($this->fh, filesize($storageFile)); + $data = unserialize($data); + $this->unlock($storageFile); + } + + return $data; + } + + public function set($key, $value) + { + $storageFile = $this->getWriteableCacheFile($key); + if ($this->acquireWriteLock($storageFile)) { + // We serialize the whole request object, since we don't only want the + // responseContent but also the postBody used, headers, size, etc. + $data = serialize($value); + $result = fwrite($this->fh, $data); + $this->unlock($storageFile); + } + } + + public function delete($key) + { + $file = $this->getCacheFile($key); + if (file_exists($file) && !unlink($file)) { + throw new Google_Cache_Exception("Cache file could not be deleted"); + } + } + + private function getWriteableCacheFile($file) + { + return $this->getCacheFile($file, true); + } + + private function getCacheFile($file, $forWrite = false) + { + return $this->getCacheDir($file, $forWrite) . '/' . md5($file); + } + + private function getCacheDir($file, $forWrite) + { + // use the first 2 characters of the hash as a directory prefix + // this should prevent slowdowns due to huge directory listings + // and thus give some basic amount of scalability + $storageDir = $this->path . '/' . substr(md5($file), 0, 2); + if ($forWrite && ! is_dir($storageDir)) { + if (! mkdir($storageDir, 0755, true)) { + throw new Google_Cache_Exception("Could not create storage directory: $storageDir"); + } + } + return $storageDir; + } + + private function acquireReadLock($storageFile) + { + return $this->acquireLock(LOCK_SH, $storageFile); + } + + private function acquireWriteLock($storageFile) + { + $rc = $this->acquireLock(LOCK_EX, $storageFile); + if (!$rc) { + $this->delete($storageFile); + } + return $rc; + } + + private function acquireLock($type, $storageFile) + { + $mode = $type == LOCK_EX ? "w" : "r"; + $this->fh = fopen($storageFile, $mode); + $count = 0; + while (!flock($this->fh, $type | LOCK_NB)) { + // Sleep for 10ms. + usleep(10000); + if (++$count < self::MAX_LOCK_RETRIES) { + return false; + } + } + return true; + } + + public function unlock($storageFile) + { + if ($this->fh) { + flock($this->fh, LOCK_UN); + } + } +} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/Google/Cache/Memcache.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Cache/Memcache.php new file mode 100644 index 00000000000..1104afb8aeb --- /dev/null +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Cache/Memcache.php @@ -0,0 +1,137 @@ +<?php +/* + * Copyright 2008 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +require_once "Google/Cache/Abstract.php"; +require_once "Google/Cache/Exception.php"; + +/** + * A persistent storage class based on the memcache, which is not + * really very persistent, as soon as you restart your memcache daemon + * the storage will be wiped. + * + * Will use either the memcache or memcached extensions, preferring + * memcached. + * + * @author Chris Chabot <chabotc@google.com> + */ +class Google_Cache_Memcache extends Google_Cache_Abstract +{ + private $connection = false; + private $mc = false; + private $host; + private $port; + + public function __construct(Google_Client $client) + { + if (!function_exists('memcache_connect') && !class_exists("Memcached")) { + throw new Google_Cache_Exception("Memcache functions not available"); + } + if ($client->isAppEngine()) { + // No credentials needed for GAE. + $this->mc = new Memcached(); + $this->connection = true; + } else { + $this->host = $client->getClassConfig($this, 'host'); + $this->port = $client->getClassConfig($this, 'port'); + if (empty($this->host) || (empty($this->port) && (string) $this->port != "0")) { + throw new Google_Cache_Exception("You need to supply a valid memcache host and port"); + } + } + } + + /** + * @inheritDoc + */ + public function get($key, $expiration = false) + { + $this->connect(); + $ret = false; + if ($this->mc) { + $ret = $this->mc->get($key); + } else { + $ret = memcache_get($this->connection, $key); + } + if ($ret === false) { + return false; + } + if (is_numeric($expiration) && (time() - $ret['time'] > $expiration)) { + $this->delete($key); + return false; + } + return $ret['data']; + } + + /** + * @inheritDoc + * @param string $key + * @param string $value + * @throws Google_Cache_Exception + */ + public function set($key, $value) + { + $this->connect(); + // we store it with the cache_time default expiration so objects will at + // least get cleaned eventually. + $data = array('time' => time(), 'data' => $value); + $rc = false; + if ($this->mc) { + $rc = $this->mc->set($key, $data); + } else { + $rc = memcache_set($this->connection, $key, $data, false); + } + if ($rc == false) { + throw new Google_Cache_Exception("Couldn't store data in cache"); + } + } + + /** + * @inheritDoc + * @param String $key + */ + public function delete($key) + { + $this->connect(); + if ($this->mc) { + $this->mc->delete($key, 0); + } else { + memcache_delete($this->connection, $key, 0); + } + } + + /** + * Lazy initialiser for memcache connection. Uses pconnect for to take + * advantage of the persistence pool where possible. + */ + private function connect() + { + if ($this->connection) { + return; + } + + if (class_exists("Memcached")) { + $this->mc = new Memcached(); + $this->mc->addServer($this->host, $this->port); + $this->connection = true; + } else { + $this->connection = memcache_pconnect($this->host, $this->port); + } + + if (! $this->connection) { + throw new Google_Cache_Exception("Couldn't connect to memcache server"); + } + } +} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/Google/Client.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Client.php new file mode 100644 index 00000000000..e15b4f4ea3c --- /dev/null +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Client.php @@ -0,0 +1,665 @@ +<?php +/* + * Copyright 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +require_once 'Google/Auth/AssertionCredentials.php'; +require_once 'Google/Cache/File.php'; +require_once 'Google/Cache/Memcache.php'; +require_once 'Google/Config.php'; +require_once 'Google/Collection.php'; +require_once 'Google/Exception.php'; +require_once 'Google/IO/Curl.php'; +require_once 'Google/IO/Stream.php'; +require_once 'Google/Model.php'; +require_once 'Google/Service.php'; +require_once 'Google/Service/Resource.php'; + +/** + * The Google API Client + * http://code.google.com/p/google-api-php-client/ + * + * @author Chris Chabot <chabotc@google.com> + * @author Chirag Shah <chirags@google.com> + */ +class Google_Client +{ + const LIBVER = "1.0.6-beta"; + const USER_AGENT_SUFFIX = "google-api-php-client/"; + /** + * @var Google_Auth_Abstract $auth + */ + private $auth; + + /** + * @var Google_IO_Abstract $io + */ + private $io; + + /** + * @var Google_Cache_Abstract $cache + */ + private $cache; + + /** + * @var Google_Config $config + */ + private $config; + + /** + * @var boolean $deferExecution + */ + private $deferExecution = false; + + /** @var array $scopes */ + // Scopes requested by the client + protected $requestedScopes = array(); + + // definitions of services that are discovered. + protected $services = array(); + + // Used to track authenticated state, can't discover services after doing authenticate() + private $authenticated = false; + + /** + * Construct the Google Client. + * + * @param $config Google_Config or string for the ini file to load + */ + public function __construct($config = null) + { + if (is_string($config) && strlen($config)) { + $config = new Google_Config($config); + } else if ( !($config instanceof Google_Config)) { + $config = new Google_Config(); + + if ($this->isAppEngine()) { + // Automatically use Memcache if we're in AppEngine. + $config->setCacheClass('Google_Cache_Memcache'); + } + + if (version_compare(phpversion(), "5.3.4", "<=") || $this->isAppEngine()) { + // Automatically disable compress.zlib, as currently unsupported. + $config->setClassConfig('Google_Http_Request', 'disable_gzip', true); + } + } + + if ($config->getIoClass() == Google_Config::USE_AUTO_IO_SELECTION) { + if (function_exists('curl_version') && function_exists('curl_exec')) { + $config->setIoClass("Google_IO_Curl"); + } else { + $config->setIoClass("Google_IO_Stream"); + } + } + + $this->config = $config; + } + + /** + * Get a string containing the version of the library. + * + * @return string + */ + public function getLibraryVersion() + { + return self::LIBVER; + } + + /** + * Attempt to exchange a code for an valid authentication token. + * Helper wrapped around the OAuth 2.0 implementation. + * + * @param $code string code from accounts.google.com + * @return string token + */ + public function authenticate($code) + { + $this->authenticated = true; + return $this->getAuth()->authenticate($code); + } + + /** + * Set the auth config from the JSON string provided. + * This structure should match the file downloaded from + * the "Download JSON" button on in the Google Developer + * Console. + * @param string $json the configuration json + */ + public function setAuthConfig($json) + { + $data = json_decode($json); + $key = isset($data->installed) ? 'installed' : 'web'; + if (!isset($data->$key)) { + throw new Google_Exception("Invalid client secret JSON file."); + } + $this->setClientId($data->$key->client_id); + $this->setClientSecret($data->$key->client_secret); + if (isset($data->$key->redirect_uris)) { + $this->setRedirectUri($data->$key->redirect_uris[0]); + } + } + + /** + * Set the auth config from the JSON file in the path + * provided. This should match the file downloaded from + * the "Download JSON" button on in the Google Developer + * Console. + * @param string $file the file location of the client json + */ + public function setAuthConfigFile($file) + { + $this->setAuthConfig(file_get_contents($file)); + } + + /** + * @return array + * @visible For Testing + */ + public function prepareScopes() + { + if (empty($this->requestedScopes)) { + throw new Google_Auth_Exception("No scopes specified"); + } + $scopes = implode(' ', $this->requestedScopes); + return $scopes; + } + + /** + * Set the OAuth 2.0 access token using the string that resulted from calling createAuthUrl() + * or Google_Client#getAccessToken(). + * @param string $accessToken JSON encoded string containing in the following format: + * {"access_token":"TOKEN", "refresh_token":"TOKEN", "token_type":"Bearer", + * "expires_in":3600, "id_token":"TOKEN", "created":1320790426} + */ + public function setAccessToken($accessToken) + { + if ($accessToken == 'null') { + $accessToken = null; + } + $this->getAuth()->setAccessToken($accessToken); + } + + + + /** + * Set the authenticator object + * @param Google_Auth_Abstract $auth + */ + public function setAuth(Google_Auth_Abstract $auth) + { + $this->config->setAuthClass(get_class($auth)); + $this->auth = $auth; + } + + /** + * Set the IO object + * @param Google_Io_Abstract $auth + */ + public function setIo(Google_Io_Abstract $io) + { + $this->config->setIoClass(get_class($io)); + $this->io = $io; + } + + /** + * Set the Cache object + * @param Google_Cache_Abstract $auth + */ + public function setCache(Google_Cache_Abstract $cache) + { + $this->config->setCacheClass(get_class($cache)); + $this->cache = $cache; + } + + /** + * Construct the OAuth 2.0 authorization request URI. + * @return string + */ + public function createAuthUrl() + { + $scopes = $this->prepareScopes(); + return $this->getAuth()->createAuthUrl($scopes); + } + + /** + * Get the OAuth 2.0 access token. + * @return string $accessToken JSON encoded string in the following format: + * {"access_token":"TOKEN", "refresh_token":"TOKEN", "token_type":"Bearer", + * "expires_in":3600,"id_token":"TOKEN", "created":1320790426} + */ + public function getAccessToken() + { + $token = $this->getAuth()->getAccessToken(); + // The response is json encoded, so could be the string null. + // It is arguable whether this check should be here or lower + // in the library. + return (null == $token || 'null' == $token || '[]' == $token) ? null : $token; + } + + /** + * Get the OAuth 2.0 refresh token. + * @return string $refreshToken refresh token or null if not available + */ + public function getRefreshToken() + { + return $this->getAuth()->getRefreshToken(); + } + + /** + * Returns if the access_token is expired. + * @return bool Returns True if the access_token is expired. + */ + public function isAccessTokenExpired() + { + return $this->getAuth()->isAccessTokenExpired(); + } + + /** + * Set OAuth 2.0 "state" parameter to achieve per-request customization. + * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-22#section-3.1.2.2 + * @param string $state + */ + public function setState($state) + { + $this->getAuth()->setState($state); + } + + /** + * @param string $accessType Possible values for access_type include: + * {@code "offline"} to request offline access from the user. + * {@code "online"} to request online access from the user. + */ + public function setAccessType($accessType) + { + $this->config->setAccessType($accessType); + } + + /** + * @param string $approvalPrompt Possible values for approval_prompt include: + * {@code "force"} to force the approval UI to appear. (This is the default value) + * {@code "auto"} to request auto-approval when possible. + */ + public function setApprovalPrompt($approvalPrompt) + { + $this->config->setApprovalPrompt($approvalPrompt); + } + + /** + * Set the login hint, email address or sub id. + * @param string $loginHint + */ + public function setLoginHint($loginHint) + { + $this->config->setLoginHint($loginHint); + } + + /** + * Set the application name, this is included in the User-Agent HTTP header. + * @param string $applicationName + */ + public function setApplicationName($applicationName) + { + $this->config->setApplicationName($applicationName); + } + + /** + * Set the OAuth 2.0 Client ID. + * @param string $clientId + */ + public function setClientId($clientId) + { + $this->config->setClientId($clientId); + } + + /** + * Set the OAuth 2.0 Client Secret. + * @param string $clientSecret + */ + public function setClientSecret($clientSecret) + { + $this->config->setClientSecret($clientSecret); + } + + /** + * Set the OAuth 2.0 Redirect URI. + * @param string $redirectUri + */ + public function setRedirectUri($redirectUri) + { + $this->config->setRedirectUri($redirectUri); + } + + /** + * If 'plus.login' is included in the list of requested scopes, you can use + * this method to define types of app activities that your app will write. + * You can find a list of available types here: + * @link https://developers.google.com/+/api/moment-types + * + * @param array $requestVisibleActions Array of app activity types + */ + public function setRequestVisibleActions($requestVisibleActions) + { + if (is_array($requestVisibleActions)) { + $requestVisibleActions = join(" ", $requestVisibleActions); + } + $this->config->setRequestVisibleActions($requestVisibleActions); + } + + /** + * Set the developer key to use, these are obtained through the API Console. + * @see http://code.google.com/apis/console-help/#generatingdevkeys + * @param string $developerKey + */ + public function setDeveloperKey($developerKey) + { + $this->config->setDeveloperKey($developerKey); + } + + /** + * Set the hd (hosted domain) parameter streamlines the login process for + * Google Apps hosted accounts. By including the domain of the user, you + * restrict sign-in to accounts at that domain. + * @param $hd string - the domain to use. + */ + public function setHostedDomain($hd) + { + $this->config->setHostedDomain($hd); + } + + /** + * Set the prompt hint. Valid values are none, consent and select_account. + * If no value is specified and the user has not previously authorized + * access, then the user is shown a consent screen. + * @param $prompt string + */ + public function setPrompt($prompt) + { + $this->config->setPrompt($prompt); + } + + /** + * openid.realm is a parameter from the OpenID 2.0 protocol, not from OAuth + * 2.0. It is used in OpenID 2.0 requests to signify the URL-space for which + * an authentication request is valid. + * @param $realm string - the URL-space to use. + */ + public function setOpenidRealm($realm) + { + $this->config->setOpenidRealm($realm); + } + + /** + * If this is provided with the value true, and the authorization request is + * granted, the authorization will include any previous authorizations + * granted to this user/application combination for other scopes. + * @param $include boolean - the URL-space to use. + */ + public function setIncludeGrantedScopes($include) + { + $this->config->setIncludeGrantedScopes($include); + } + + /** + * Fetches a fresh OAuth 2.0 access token with the given refresh token. + * @param string $refreshToken + * @return void + */ + public function refreshToken($refreshToken) + { + return $this->getAuth()->refreshToken($refreshToken); + } + + /** + * Revoke an OAuth2 access token or refresh token. This method will revoke the current access + * token, if a token isn't provided. + * @throws Google_Auth_Exception + * @param string|null $token The token (access token or a refresh token) that should be revoked. + * @return boolean Returns True if the revocation was successful, otherwise False. + */ + public function revokeToken($token = null) + { + return $this->getAuth()->revokeToken($token); + } + + /** + * Verify an id_token. This method will verify the current id_token, if one + * isn't provided. + * @throws Google_Auth_Exception + * @param string|null $token The token (id_token) that should be verified. + * @return Google_Auth_LoginTicket Returns an apiLoginTicket if the verification was + * successful. + */ + public function verifyIdToken($token = null) + { + return $this->getAuth()->verifyIdToken($token); + } + + /** + * Verify a JWT that was signed with your own certificates. + * + * @param $jwt the token + * @param $certs array of certificates + * @param $required_audience the expected consumer of the token + * @param [$issuer] the expected issues, defaults to Google + * @param [$max_expiry] the max lifetime of a token, defaults to MAX_TOKEN_LIFETIME_SECS + * @return token information if valid, false if not + */ + public function verifySignedJwt($id_token, $cert_location, $audience, $issuer, $max_expiry = null) + { + $auth = new Google_Auth_OAuth2($this); + $certs = $auth->retrieveCertsFromLocation($cert_location); + return $auth->verifySignedJwtWithCerts($id_token, $certs, $audience, $issuer, $max_expiry); + } + + /** + * @param Google_Auth_AssertionCredentials $creds + * @return void + */ + public function setAssertionCredentials(Google_Auth_AssertionCredentials $creds) + { + $this->getAuth()->setAssertionCredentials($creds); + } + + /** + * Set the scopes to be requested. Must be called before createAuthUrl(). + * Will remove any previously configured scopes. + * @param array $scopes, ie: array('https://www.googleapis.com/auth/plus.login', + * 'https://www.googleapis.com/auth/moderator') + */ + public function setScopes($scopes) + { + $this->requestedScopes = array(); + $this->addScope($scopes); + } + + /** + * This functions adds a scope to be requested as part of the OAuth2.0 flow. + * Will append any scopes not previously requested to the scope parameter. + * A single string will be treated as a scope to request. An array of strings + * will each be appended. + * @param $scope_or_scopes string|array e.g. "profile" + */ + public function addScope($scope_or_scopes) + { + if (is_string($scope_or_scopes) && !in_array($scope_or_scopes, $this->requestedScopes)) { + $this->requestedScopes[] = $scope_or_scopes; + } else if (is_array($scope_or_scopes)) { + foreach ($scope_or_scopes as $scope) { + $this->addScope($scope); + } + } + } + + /** + * Returns the list of scopes requested by the client + * @return array the list of scopes + * + */ + public function getScopes() + { + return $this->requestedScopes; + } + + /** + * Declare whether batch calls should be used. This may increase throughput + * by making multiple requests in one connection. + * + * @param boolean $useBatch True if the batch support should + * be enabled. Defaults to False. + */ + public function setUseBatch($useBatch) + { + // This is actually an alias for setDefer. + $this->setDefer($useBatch); + } + + /** + * Declare whether making API calls should make the call immediately, or + * return a request which can be called with ->execute(); + * + * @param boolean $defer True if calls should not be executed right away. + */ + public function setDefer($defer) + { + $this->deferExecution = $defer; + } + + /** + * Helper method to execute deferred HTTP requests. + * + * @return object of the type of the expected class or array. + */ + public function execute($request) + { + if ($request instanceof Google_Http_Request) { + $request->setUserAgent( + $this->getApplicationName() + . " " . self::USER_AGENT_SUFFIX + . $this->getLibraryVersion() + ); + if (!$this->getClassConfig("Google_Http_Request", "disable_gzip")) { + $request->enableGzip(); + } + $request->maybeMoveParametersToBody(); + return Google_Http_REST::execute($this, $request); + } else if ($request instanceof Google_Http_Batch) { + return $request->execute(); + } else { + throw new Google_Exception("Do not know how to execute this type of object."); + } + } + + /** + * Whether or not to return raw requests + * @return boolean + */ + public function shouldDefer() + { + return $this->deferExecution; + } + + /** + * @return Google_Auth_Abstract Authentication implementation + */ + public function getAuth() + { + if (!isset($this->auth)) { + $class = $this->config->getAuthClass(); + $this->auth = new $class($this); + } + return $this->auth; + } + + /** + * @return Google_IO_Abstract IO implementation + */ + public function getIo() + { + if (!isset($this->io)) { + $class = $this->config->getIoClass(); + $this->io = new $class($this); + } + return $this->io; + } + + /** + * @return Google_Cache_Abstract Cache implementation + */ + public function getCache() + { + if (!isset($this->cache)) { + $class = $this->config->getCacheClass(); + $this->cache = new $class($this); + } + return $this->cache; + } + + /** + * Retrieve custom configuration for a specific class. + * @param $class string|object - class or instance of class to retrieve + * @param $key string optional - key to retrieve + */ + public function getClassConfig($class, $key = null) + { + if (!is_string($class)) { + $class = get_class($class); + } + return $this->config->getClassConfig($class, $key); + } + + /** + * Set configuration specific to a given class. + * $config->setClassConfig('Google_Cache_File', + * array('directory' => '/tmp/cache')); + * @param $class The class name for the configuration + * @param $config string key or an array of configuration values + * @param $value optional - if $config is a key, the value + * + */ + public function setClassConfig($class, $config, $value = null) + { + if (!is_string($class)) { + $class = get_class($class); + } + return $this->config->setClassConfig($class, $config, $value); + + } + + /** + * @return string the base URL to use for calls to the APIs + */ + public function getBasePath() + { + return $this->config->getBasePath(); + } + + /** + * @return string the name of the application + */ + public function getApplicationName() + { + return $this->config->getApplicationName(); + } + + /** + * Are we running in Google AppEngine? + * return bool + */ + public function isAppEngine() + { + return (isset($_SERVER['SERVER_SOFTWARE']) && + strpos($_SERVER['SERVER_SOFTWARE'], 'Google App Engine') !== false); + } +} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/Google/Collection.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Collection.php new file mode 100644 index 00000000000..6e7bf9b0f1e --- /dev/null +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Collection.php @@ -0,0 +1,96 @@ +<?php + +require_once "Google/Model.php"; + +/** + * Extension to the regular Google_Model that automatically + * exposes the items array for iteration, so you can just + * iterate over the object rather than a reference inside. + */ +class Google_Collection extends Google_Model implements Iterator, Countable +{ + protected $collection_key = 'items'; + + public function rewind() + { + if (isset($this->modelData[$this->collection_key]) + && is_array($this->modelData[$this->collection_key])) { + reset($this->modelData[$this->collection_key]); + } + } + + public function current() + { + $this->coerceType($this->key()); + if (is_array($this->modelData[$this->collection_key])) { + return current($this->modelData[$this->collection_key]); + } + } + + public function key() + { + if (isset($this->modelData[$this->collection_key]) + && is_array($this->modelData[$this->collection_key])) { + return key($this->modelData[$this->collection_key]); + } + } + + public function next() + { + return next($this->modelData[$this->collection_key]); + } + + public function valid() + { + $key = $this->key(); + return $key !== null && $key !== false; + } + + public function count() + { + return count($this->modelData[$this->collection_key]); + } + + public function offsetExists ($offset) + { + if (!is_numeric($offset)) { + return parent::offsetExists($offset); + } + return isset($this->modelData[$this->collection_key][$offset]); + } + + public function offsetGet($offset) + { + if (!is_numeric($offset)) { + return parent::offsetGet($offset); + } + $this->coerceType($offset); + return $this->modelData[$this->collection_key][$offset]; + } + + public function offsetSet($offset, $value) + { + if (!is_numeric($offset)) { + return parent::offsetSet($offset, $value); + } + $this->modelData[$this->collection_key][$offset] = $value; + } + + public function offsetUnset($offset) + { + if (!is_numeric($offset)) { + return parent::offsetUnset($offset); + } + unset($this->modelData[$this->collection_key][$offset]); + } + + private function coerceType($offset) + { + $typeKey = $this->keyType($this->collection_key); + if (isset($this->$typeKey) && !is_object($this->modelData[$this->collection_key][$offset])) { + $type = $this->$typeKey; + $this->modelData[$this->collection_key][$offset] = + new $type($this->modelData[$this->collection_key][$offset]); + } + } +} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/Google/Config.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Config.php new file mode 100644 index 00000000000..84083058fe5 --- /dev/null +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Config.php @@ -0,0 +1,371 @@ +<?php +/* + * Copyright 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A class to contain the library configuration for the Google API client. + */ +class Google_Config +{ + const GZIP_DISABLED = true; + const GZIP_ENABLED = false; + const GZIP_UPLOADS_ENABLED = true; + const GZIP_UPLOADS_DISABLED = false; + const USE_AUTO_IO_SELECTION = "auto"; + protected $configuration; + + /** + * Create a new Google_Config. Can accept an ini file location with the + * local configuration. For example: + * application_name="My App" + * + * @param [$ini_file_location] - optional - The location of the ini file to load + */ + public function __construct($ini_file_location = null) + { + $this->configuration = array( + // The application_name is included in the User-Agent HTTP header. + 'application_name' => '', + + // Which Authentication, Storage and HTTP IO classes to use. + 'auth_class' => 'Google_Auth_OAuth2', + 'io_class' => self::USE_AUTO_IO_SELECTION, + 'cache_class' => 'Google_Cache_File', + + // Don't change these unless you're working against a special development + // or testing environment. + 'base_path' => 'https://www.googleapis.com', + + // Definition of class specific values, like file paths and so on. + 'classes' => array( + 'Google_IO_Abstract' => array( + 'request_timeout_seconds' => 100, + ), + 'Google_Http_Request' => array( + // Disable the use of gzip on calls if set to true. Defaults to false. + 'disable_gzip' => self::GZIP_ENABLED, + + // We default gzip to disabled on uploads even if gzip is otherwise + // enabled, due to some issues seen with small packet sizes for uploads. + // Please test with this option before enabling gzip for uploads in + // a production environment. + 'enable_gzip_for_uploads' => self::GZIP_UPLOADS_DISABLED, + ), + // If you want to pass in OAuth 2.0 settings, they will need to be + // structured like this. + 'Google_Auth_OAuth2' => array( + // Keys for OAuth 2.0 access, see the API console at + // https://developers.google.com/console + 'client_id' => '', + 'client_secret' => '', + 'redirect_uri' => '', + + // Simple API access key, also from the API console. Ensure you get + // a Server key, and not a Browser key. + 'developer_key' => '', + + // Other parameters. + 'hd' => '', + 'prompt' => '', + 'openid.realm' => '', + 'include_granted_scopes' => '', + 'login_hint' => '', + 'request_visible_actions' => '', + 'access_type' => 'online', + 'approval_prompt' => 'auto', + 'federated_signon_certs_url' => + 'https://www.googleapis.com/oauth2/v1/certs', + ), + // Set a default directory for the file cache. + 'Google_Cache_File' => array( + 'directory' => sys_get_temp_dir() . '/Google_Client' + ) + ), + ); + if ($ini_file_location) { + $ini = parse_ini_file($ini_file_location, true); + if (is_array($ini) && count($ini)) { + $this->configuration = array_merge($this->configuration, $ini); + } + } + } + + /** + * Set configuration specific to a given class. + * $config->setClassConfig('Google_Cache_File', + * array('directory' => '/tmp/cache')); + * @param $class The class name for the configuration + * @param $config string key or an array of configuration values + * @param $value optional - if $config is a key, the value + */ + public function setClassConfig($class, $config, $value = null) + { + if (!is_array($config)) { + if (!isset($this->configuration['classes'][$class])) { + $this->configuration['classes'][$class] = array(); + } + $this->configuration['classes'][$class][$config] = $value; + } else { + $this->configuration['classes'][$class] = $config; + } + } + + public function getClassConfig($class, $key = null) + { + if (!isset($this->configuration['classes'][$class])) { + return null; + } + if ($key === null) { + return $this->configuration['classes'][$class]; + } else { + return $this->configuration['classes'][$class][$key]; + } + } + + /** + * Return the configured cache class. + * @return string + */ + public function getCacheClass() + { + return $this->configuration['cache_class']; + } + + /** + * Return the configured Auth class. + * @return string + */ + public function getAuthClass() + { + return $this->configuration['auth_class']; + } + + /** + * Set the auth class. + * + * @param $class the class name to set + */ + public function setAuthClass($class) + { + $prev = $this->configuration['auth_class']; + if (!isset($this->configuration['classes'][$class]) && + isset($this->configuration['classes'][$prev])) { + $this->configuration['classes'][$class] = + $this->configuration['classes'][$prev]; + } + $this->configuration['auth_class'] = $class; + } + + /** + * Set the IO class. + * + * @param $class the class name to set + */ + public function setIoClass($class) + { + $prev = $this->configuration['io_class']; + if (!isset($this->configuration['classes'][$class]) && + isset($this->configuration['classes'][$prev])) { + $this->configuration['classes'][$class] = + $this->configuration['classes'][$prev]; + } + $this->configuration['io_class'] = $class; + } + + /** + * Set the cache class. + * + * @param $class the class name to set + */ + public function setCacheClass($class) + { + $prev = $this->configuration['cache_class']; + if (!isset($this->configuration['classes'][$class]) && + isset($this->configuration['classes'][$prev])) { + $this->configuration['classes'][$class] = + $this->configuration['classes'][$prev]; + } + $this->configuration['cache_class'] = $class; + } + + /** + * Return the configured IO class. + * @return string + */ + public function getIoClass() + { + return $this->configuration['io_class']; + } + + /** + * Set the application name, this is included in the User-Agent HTTP header. + * @param string $name + */ + public function setApplicationName($name) + { + $this->configuration['application_name'] = $name; + } + + /** + * @return string the name of the application + */ + public function getApplicationName() + { + return $this->configuration['application_name']; + } + + /** + * Set the client ID for the auth class. + * @param $key string - the API console client ID + */ + public function setClientId($clientId) + { + $this->setAuthConfig('client_id', $clientId); + } + + /** + * Set the client secret for the auth class. + * @param $key string - the API console client secret + */ + public function setClientSecret($secret) + { + $this->setAuthConfig('client_secret', $secret); + } + + /** + * Set the redirect uri for the auth class. Note that if using the + * Javascript based sign in flow, this should be the string 'postmessage'. + * @param $key string - the URI that users should be redirected to + */ + public function setRedirectUri($uri) + { + $this->setAuthConfig('redirect_uri', $uri); + } + + /** + * Set the app activities for the auth class. + * @param $rva string a space separated list of app activity types + */ + public function setRequestVisibleActions($rva) + { + $this->setAuthConfig('request_visible_actions', $rva); + } + + /** + * Set the the access type requested (offline or online.) + * @param $access string - the access type + */ + public function setAccessType($access) + { + $this->setAuthConfig('access_type', $access); + } + + /** + * Set when to show the approval prompt (auto or force) + * @param $approval string - the approval request + */ + public function setApprovalPrompt($approval) + { + $this->setAuthConfig('approval_prompt', $approval); + } + + /** + * Set the login hint (email address or sub identifier) + * @param $hint string + */ + public function setLoginHint($hint) + { + $this->setAuthConfig('login_hint', $hint); + } + + /** + * Set the developer key for the auth class. Note that this is separate value + * from the client ID - if it looks like a URL, its a client ID! + * @param $key string - the API console developer key + */ + public function setDeveloperKey($key) + { + $this->setAuthConfig('developer_key', $key); + } + + /** + * Set the hd (hosted domain) parameter streamlines the login process for + * Google Apps hosted accounts. By including the domain of the user, you + * restrict sign-in to accounts at that domain. + * @param $hd string - the domain to use. + */ + public function setHostedDomain($hd) + { + $this->setAuthConfig('hd', $hd); + } + + /** + * Set the prompt hint. Valid values are none, consent and select_account. + * If no value is specified and the user has not previously authorized + * access, then the user is shown a consent screen. + * @param $prompt string + */ + public function setPrompt($prompt) + { + $this->setAuthConfig('prompt', $prompt); + } + + /** + * openid.realm is a parameter from the OpenID 2.0 protocol, not from OAuth + * 2.0. It is used in OpenID 2.0 requests to signify the URL-space for which + * an authentication request is valid. + * @param $realm string - the URL-space to use. + */ + public function setOpenidRealm($realm) + { + $this->setAuthConfig('openid.realm', $realm); + } + + /** + * If this is provided with the value true, and the authorization request is + * granted, the authorization will include any previous authorizations + * granted to this user/application combination for other scopes. + * @param $include boolean - the URL-space to use. + */ + public function setIncludeGrantedScopes($include) + { + $this->setAuthConfig( + 'include_granted_scopes', + $include ? "true" : "false" + ); + } + + /** + * @return string the base URL to use for API calls + */ + public function getBasePath() + { + return $this->configuration['base_path']; + } + + /** + * Set the auth configuration for the current auth class. + * @param $key - the key to set + * @param $value - the parameter value + */ + private function setAuthConfig($key, $value) + { + if (!isset($this->configuration['classes'][$this->getAuthClass()])) { + $this->configuration['classes'][$this->getAuthClass()] = array(); + } + $this->configuration['classes'][$this->getAuthClass()][$key] = $value; + } +} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/service/Google_Service.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Exception.php index 1f4731fb2f4..af80269718a 100644 --- a/apps/files_external/3rdparty/google-api-php-client/src/service/Google_Service.php +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Exception.php @@ -1,6 +1,6 @@ <?php /* - * Copyright 2010 Google Inc. + * Copyright 2013 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,8 +15,6 @@ * limitations under the License. */ -class Google_Service { - public $version; - public $servicePath; - public $resource; +class Google_Exception extends Exception +{ } diff --git a/apps/files_external/3rdparty/google-api-php-client/src/service/Google_BatchRequest.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Http/Batch.php index 3916b223a7e..d851da50499 100644 --- a/apps/files_external/3rdparty/google-api-php-client/src/service/Google_BatchRequest.php +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Http/Batch.php @@ -15,22 +15,39 @@ * limitations under the License. */ +require_once 'Google/Client.php'; +require_once 'Google/Http/Request.php'; +require_once 'Google/Http/REST.php'; + /** * @author Chirag Shah <chirags@google.com> */ -class Google_BatchRequest { +class Google_Http_Batch +{ /** @var string Multipart Boundary. */ private $boundary; /** @var array service requests to be executed. */ private $requests = array(); - public function __construct($boundary = false) { + /** @var Google_Client */ + private $client; + + private $expected_classes = array(); + + private $base_path; + + public function __construct(Google_Client $client, $boundary = false) + { + $this->client = $client; + $this->base_path = $this->client->getBasePath(); + $this->expected_classes = array(); $boundary = (false == $boundary) ? mt_rand() : $boundary; $this->boundary = str_replace('"', '', $boundary); } - public function add(Google_HttpRequest $request, $key = false) { + public function add(Google_Http_Request $request, $key = false) + { if (false == $key) { $key = mt_rand(); } @@ -38,36 +55,38 @@ class Google_BatchRequest { $this->requests[$key] = $request; } - public function execute() { + public function execute() + { $body = ''; - /** @var Google_HttpRequest $req */ - foreach($this->requests as $key => $req) { + /** @var Google_Http_Request $req */ + foreach ($this->requests as $key => $req) { $body .= "--{$this->boundary}\n"; $body .= $req->toBatchString($key) . "\n"; + $this->expected_classes["response-" . $key] = $req->getExpectedClass(); } $body = rtrim($body); $body .= "\n--{$this->boundary}--"; - global $apiConfig; - $url = $apiConfig['basePath'] . '/batch'; - $httpRequest = new Google_HttpRequest($url, 'POST'); - $httpRequest->setRequestHeaders(array( - 'Content-Type' => 'multipart/mixed; boundary=' . $this->boundary)); + $url = $this->base_path . '/batch'; + $httpRequest = new Google_Http_Request($url, 'POST'); + $httpRequest->setRequestHeaders( + array('Content-Type' => 'multipart/mixed; boundary=' . $this->boundary) + ); $httpRequest->setPostBody($body); - $response = Google_Client::$io->makeRequest($httpRequest); + $response = $this->client->getIo()->makeRequest($httpRequest); - $response = $this->parseResponse($response); - return $response; + return $this->parseResponse($response); } - public function parseResponse(Google_HttpRequest $response) { + public function parseResponse(Google_Http_Request $response) + { $contentType = $response->getResponseHeader('content-type'); $contentType = explode(';', $contentType); $boundary = false; - foreach($contentType as $part) { + foreach ($contentType as $part) { $part = (explode('=', $part, 2)); if (isset($part[0]) && 'boundary' == trim($part[0])) { $boundary = $part[1]; @@ -80,25 +99,39 @@ class Google_BatchRequest { $parts = explode("--$boundary", $body); $responses = array(); - foreach($parts as $part) { + foreach ($parts as $part) { $part = trim($part); if (!empty($part)) { list($metaHeaders, $part) = explode("\r\n\r\n", $part, 2); - $metaHeaders = Google_CurlIO::parseResponseHeaders($metaHeaders); + $metaHeaders = $this->client->getIo()->getHttpResponseHeaders($metaHeaders); $status = substr($part, 0, strpos($part, "\n")); $status = explode(" ", $status); $status = $status[1]; - list($partHeaders, $partBody) = Google_CurlIO::parseHttpResponse($part, false); - $response = new Google_HttpRequest(""); + list($partHeaders, $partBody) = $this->client->getIo()->ParseHttpResponse($part, false); + $response = new Google_Http_Request(""); $response->setResponseHttpCode($status); $response->setResponseHeaders($partHeaders); $response->setResponseBody($partBody); - $response = Google_REST::decodeHttpResponse($response); // Need content id. - $responses[$metaHeaders['content-id']] = $response; + $key = $metaHeaders['content-id']; + + if (isset($this->expected_classes[$key]) && + strlen($this->expected_classes[$key]) > 0) { + $class = $this->expected_classes[$key]; + $response->setExpectedClass($class); + } + + try { + $response = Google_Http_REST::decodeHttpResponse($response); + $responses[$key] = $response; + } catch (Google_Service_Exception $e) { + // Store the exception as the response, so succesful responses + // can be processed. + $responses[$key] = $e; + } } } @@ -107,4 +140,4 @@ class Google_BatchRequest { return null; } -}
\ No newline at end of file +} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/io/Google_CacheParser.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Http/CacheParser.php index 7f5accfefe9..83f1c8d2f42 100644 --- a/apps/files_external/3rdparty/google-api-php-client/src/io/Google_CacheParser.php +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Http/CacheParser.php @@ -14,26 +14,29 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +require_once 'Google/Http/Request.php'; + /** * Implement the caching directives specified in rfc2616. This * implementation is guided by the guidance offered in rfc2616-sec13. * @author Chirag Shah <chirags@google.com> */ -class Google_CacheParser { +class Google_Http_CacheParser +{ public static $CACHEABLE_HTTP_METHODS = array('GET', 'HEAD'); public static $CACHEABLE_STATUS_CODES = array('200', '203', '300', '301'); - private function __construct() {} - /** * Check if an HTTP request can be cached by a private local cache. * * @static - * @param Google_HttpRequest $resp + * @param Google_Http_Request $resp * @return bool True if the request is cacheable. * False if the request is uncacheable. */ - public static function isRequestCacheable (Google_HttpRequest $resp) { + public static function isRequestCacheable(Google_Http_Request $resp) + { $method = $resp->getRequestMethod(); if (! in_array($method, self::$CACHEABLE_HTTP_METHODS)) { return false; @@ -54,11 +57,12 @@ class Google_CacheParser { * Check if an HTTP response can be cached by a private local cache. * * @static - * @param Google_HttpRequest $resp + * @param Google_Http_Request $resp * @return bool True if the response is cacheable. * False if the response is un-cacheable. */ - public static function isResponseCacheable (Google_HttpRequest $resp) { + public static function isResponseCacheable(Google_Http_Request $resp) + { // First, check if the HTTP request was cacheable before inspecting the // HTTP response. if (false == self::isRequestCacheable($resp)) { @@ -105,15 +109,17 @@ class Google_CacheParser { /** * @static - * @param Google_HttpRequest $resp + * @param Google_Http_Request $resp * @return bool True if the HTTP response is considered to be expired. * False if it is considered to be fresh. */ - public static function isExpired(Google_HttpRequest $resp) { + public static function isExpired(Google_Http_Request $resp) + { // HTTP/1.1 clients and caches MUST treat other invalid date formats, // especially including the value “0”, as in the past. $parsedExpires = false; $responseHeaders = $resp->getResponseHeaders(); + if (isset($responseHeaders['expires'])) { $rawExpires = $responseHeaders['expires']; // Check for a malformed expires header first. @@ -139,8 +145,12 @@ class Google_CacheParser { $parsedDate = strtotime($rawDate); if (empty($rawDate) || false == $parsedDate) { - $parsedDate = time(); + // We can't default this to now, as that means future cache reads + // will always pass with the logic below, so we will require a + // date be injected if not supplied. + throw new Google_Exception("All cacheable requests must have creation dates."); } + if (false == $freshnessLifetime && isset($responseHeaders['expires'])) { $freshnessLifetime = $parsedExpires - $parsedDate; } @@ -161,13 +171,14 @@ class Google_CacheParser { /** * Determine if a cache entry should be revalidated with by the origin. * - * @param Google_HttpRequest $response + * @param Google_Http_Request $response * @return bool True if the entry is expired, else return false. */ - public static function mustRevalidate(Google_HttpRequest $response) { + public static function mustRevalidate(Google_Http_Request $response) + { // [13.3] When a cache has a stale entry that it would like to use as a // response to a client's request, it first has to check with the origin // server to see if its cached entry is still usable. return self::isExpired($response); } -}
\ No newline at end of file +} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/Google/Http/MediaFileUpload.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Http/MediaFileUpload.php new file mode 100644 index 00000000000..8005db4bb48 --- /dev/null +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Http/MediaFileUpload.php @@ -0,0 +1,301 @@ +<?php +/** + * Copyright 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +require_once 'Google/Client.php'; +require_once 'Google/Exception.php'; +require_once 'Google/Http/Request.php'; +require_once 'Google/Http/REST.php'; +require_once 'Google/Utils.php'; + +/** + * @author Chirag Shah <chirags@google.com> + * + */ +class Google_Http_MediaFileUpload +{ + const UPLOAD_MEDIA_TYPE = 'media'; + const UPLOAD_MULTIPART_TYPE = 'multipart'; + const UPLOAD_RESUMABLE_TYPE = 'resumable'; + + /** @var string $mimeType */ + private $mimeType; + + /** @var string $data */ + private $data; + + /** @var bool $resumable */ + private $resumable; + + /** @var int $chunkSize */ + private $chunkSize; + + /** @var int $size */ + private $size; + + /** @var string $resumeUri */ + private $resumeUri; + + /** @var int $progress */ + private $progress; + + /** @var Google_Client */ + private $client; + + /** @var Google_Http_Request */ + private $request; + + /** @var string */ + private $boundary; + + /** + * Result code from last HTTP call + * @var int + */ + private $httpResultCode; + + /** + * @param $mimeType string + * @param $data string The bytes you want to upload. + * @param $resumable bool + * @param bool $chunkSize File will be uploaded in chunks of this many bytes. + * only used if resumable=True + */ + public function __construct( + Google_Client $client, + Google_Http_Request $request, + $mimeType, + $data, + $resumable = false, + $chunkSize = false, + $boundary = false + ) { + $this->client = $client; + $this->request = $request; + $this->mimeType = $mimeType; + $this->data = $data; + $this->size = strlen($this->data); + $this->resumable = $resumable; + if (!$chunkSize) { + $chunkSize = 256 * 1024; + } + $this->chunkSize = $chunkSize; + $this->progress = 0; + $this->boundary = $boundary; + + // Process Media Request + $this->process(); + } + + /** + * Set the size of the file that is being uploaded. + * @param $size - int file size in bytes + */ + public function setFileSize($size) + { + $this->size = $size; + } + + /** + * Return the progress on the upload + * @return int progress in bytes uploaded. + */ + public function getProgress() + { + return $this->progress; + } + + /** + * Return the HTTP result code from the last call made. + * @return int code + */ + public function getHttpResultCode() + { + return $this->httpResultCode; + } + + /** + * Send the next part of the file to upload. + * @param [$chunk] the next set of bytes to send. If false will used $data passed + * at construct time. + */ + public function nextChunk($chunk = false) + { + if (false == $this->resumeUri) { + $this->resumeUri = $this->getResumeUri(); + } + + if (false == $chunk) { + $chunk = substr($this->data, $this->progress, $this->chunkSize); + } + + $lastBytePos = $this->progress + strlen($chunk) - 1; + $headers = array( + 'content-range' => "bytes $this->progress-$lastBytePos/$this->size", + 'content-type' => $this->request->getRequestHeader('content-type'), + 'content-length' => $this->chunkSize, + 'expect' => '', + ); + + $httpRequest = new Google_Http_Request( + $this->resumeUri, + 'PUT', + $headers, + $chunk + ); + + if ($this->client->getClassConfig("Google_Http_Request", "enable_gzip_for_uploads")) { + $httpRequest->enableGzip(); + } else { + $httpRequest->disableGzip(); + } + + $response = $this->client->getIo()->makeRequest($httpRequest); + $response->setExpectedClass($this->request->getExpectedClass()); + $code = $response->getResponseHttpCode(); + $this->httpResultCode = $code; + + if (308 == $code) { + // Track the amount uploaded. + $range = explode('-', $response->getResponseHeader('range')); + $this->progress = $range[1] + 1; + + // Allow for changing upload URLs. + $location = $response->getResponseHeader('location'); + if ($location) { + $this->resumeUri = $location; + } + + // No problems, but upload not complete. + return false; + } else { + return Google_Http_REST::decodeHttpResponse($response); + } + } + + /** + * @param $meta + * @param $params + * @return array|bool + * @visible for testing + */ + private function process() + { + $postBody = false; + $contentType = false; + + $meta = $this->request->getPostBody(); + $meta = is_string($meta) ? json_decode($meta, true) : $meta; + + $uploadType = $this->getUploadType($meta); + $this->request->setQueryParam('uploadType', $uploadType); + $this->transformToUploadUrl(); + $mimeType = $this->mimeType ? + $this->mimeType : + $this->request->getRequestHeader('content-type'); + + if (self::UPLOAD_RESUMABLE_TYPE == $uploadType) { + $contentType = $mimeType; + $postBody = is_string($meta) ? $meta : json_encode($meta); + } else if (self::UPLOAD_MEDIA_TYPE == $uploadType) { + $contentType = $mimeType; + $postBody = $this->data; + } else if (self::UPLOAD_MULTIPART_TYPE == $uploadType) { + // This is a multipart/related upload. + $boundary = $this->boundary ? $this->boundary : mt_rand(); + $boundary = str_replace('"', '', $boundary); + $contentType = 'multipart/related; boundary=' . $boundary; + $related = "--$boundary\r\n"; + $related .= "Content-Type: application/json; charset=UTF-8\r\n"; + $related .= "\r\n" . json_encode($meta) . "\r\n"; + $related .= "--$boundary\r\n"; + $related .= "Content-Type: $mimeType\r\n"; + $related .= "Content-Transfer-Encoding: base64\r\n"; + $related .= "\r\n" . base64_encode($this->data) . "\r\n"; + $related .= "--$boundary--"; + $postBody = $related; + } + + $this->request->setPostBody($postBody); + + if (isset($contentType) && $contentType) { + $contentTypeHeader['content-type'] = $contentType; + $this->request->setRequestHeaders($contentTypeHeader); + } + } + + private function transformToUploadUrl() + { + $base = $this->request->getBaseComponent(); + $this->request->setBaseComponent($base . '/upload'); + } + + /** + * Valid upload types: + * - resumable (UPLOAD_RESUMABLE_TYPE) + * - media (UPLOAD_MEDIA_TYPE) + * - multipart (UPLOAD_MULTIPART_TYPE) + * @param $meta + * @return string + * @visible for testing + */ + public function getUploadType($meta) + { + if ($this->resumable) { + return self::UPLOAD_RESUMABLE_TYPE; + } + + if (false == $meta && $this->data) { + return self::UPLOAD_MEDIA_TYPE; + } + + return self::UPLOAD_MULTIPART_TYPE; + } + + private function getResumeUri() + { + $result = null; + $body = $this->request->getPostBody(); + if ($body) { + $headers = array( + 'content-type' => 'application/json; charset=UTF-8', + 'content-length' => Google_Utils::getStrLen($body), + 'x-upload-content-type' => $this->mimeType, + 'x-upload-content-length' => $this->size, + 'expect' => '', + ); + $this->request->setRequestHeaders($headers); + } + + $response = $this->client->getIo()->makeRequest($this->request); + $location = $response->getResponseHeader('location'); + $code = $response->getResponseHttpCode(); + + if (200 == $code && true == $location) { + return $location; + } + $message = $code; + $body = @json_decode($response->getResponseBody()); + if (!empty( $body->error->errors ) ) { + $message .= ': '; + foreach ($body->error->errors as $error) { + $message .= "{$error->domain}, {$error->message};"; + } + $message = rtrim($message, ';'); + } + throw new Google_Exception("Failed to start the resumable upload (HTTP {$message})"); + } +} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/io/Google_REST.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Http/REST.php index d0f3b3d564c..3c318e44ceb 100644 --- a/apps/files_external/3rdparty/google-api-php-client/src/io/Google_REST.php +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Http/REST.php @@ -15,47 +15,54 @@ * limitations under the License. */ +require_once 'Google/Client.php'; +require_once 'Google/Http/Request.php'; +require_once 'Google/Service/Exception.php'; +require_once 'Google/Utils/URITemplate.php'; + /** * This class implements the RESTful transport of apiServiceRequest()'s * * @author Chris Chabot <chabotc@google.com> * @author Chirag Shah <chirags@google.com> */ -class Google_REST { +class Google_Http_REST +{ /** - * Executes a apiServiceRequest using a RESTful call by transforming it into - * an apiHttpRequest, and executed via apiIO::authenticatedRequest(). + * Executes a Google_Http_Request * - * @param Google_HttpRequest $req + * @param Google_Client $client + * @param Google_Http_Request $req * @return array decoded result - * @throws Google_ServiceException on server side error (ie: not authenticated, + * @throws Google_Service_Exception on server side error (ie: not authenticated, * invalid or malformed post body, invalid url) */ - static public function execute(Google_HttpRequest $req) { - $httpRequest = Google_Client::$io->makeRequest($req); - $decodedResponse = self::decodeHttpResponse($httpRequest); - $ret = isset($decodedResponse['data']) - ? $decodedResponse['data'] : $decodedResponse; - return $ret; + public static function execute(Google_Client $client, Google_Http_Request $req) + { + $httpRequest = $client->getIo()->makeRequest($req); + $httpRequest->setExpectedClass($req->getExpectedClass()); + return self::decodeHttpResponse($httpRequest); } - /** * Decode an HTTP Response. * @static - * @throws Google_ServiceException - * @param Google_HttpRequest $response The http response to be decoded. + * @throws Google_Service_Exception + * @param Google_Http_Request $response The http response to be decoded. * @return mixed|null */ - public static function decodeHttpResponse($response) { + public static function decodeHttpResponse($response) + { $code = $response->getResponseHttpCode(); $body = $response->getResponseBody(); $decoded = null; - + if ((intVal($code)) >= 300) { $decoded = json_decode($body, true); $err = 'Error calling ' . $response->getRequestMethod() . ' ' . $response->getUrl(); - if ($decoded != null && isset($decoded['error']['message']) && isset($decoded['error']['code'])) { + if (isset($decoded['error']) && + isset($decoded['error']['message']) && + isset($decoded['error']['code'])) { // if we're getting a json encoded error definition, use that instead of the raw response // body for improved readability $err .= ": ({$decoded['error']['code']}) {$decoded['error']['message']}"; @@ -63,14 +70,25 @@ class Google_REST { $err .= ": ($code) $body"; } - throw new Google_ServiceException($err, $code, null, $decoded['error']['errors']); + $errors = null; + // Specific check for APIs which don't return error details, such as Blogger. + if (isset($decoded['error']) && isset($decoded['error']['errors'])) { + $errors = $decoded['error']['errors']; + } + + throw new Google_Service_Exception($err, $code, null, $errors); } - + // Only attempt to decode the response, if the response code wasn't (204) 'no content' if ($code != '204') { $decoded = json_decode($body, true); if ($decoded === null || $decoded === "") { - throw new Google_ServiceException("Invalid json in service response: $body"); + throw new Google_Service_Exception("Invalid json in service response: $body"); + } + + if ($response->getExpectedClass()) { + $class = $response->getExpectedClass(); + $decoded = new $class($decoded); } } return $decoded; @@ -85,22 +103,18 @@ class Google_REST { * @param array $params * @return string $requestUrl */ - static function createRequestUri($servicePath, $restPath, $params) { + public static function createRequestUri($servicePath, $restPath, $params) + { $requestUrl = $servicePath . $restPath; $uriTemplateVars = array(); $queryVars = array(); foreach ($params as $paramName => $paramSpec) { - // Discovery v1.0 puts the canonical location under the 'location' field. - if (! isset($paramSpec['location'])) { - $paramSpec['location'] = $paramSpec['restParameterType']; - } - if ($paramSpec['type'] == 'boolean') { $paramSpec['value'] = ($paramSpec['value']) ? 'true' : 'false'; } if ($paramSpec['location'] == 'path') { $uriTemplateVars[$paramName] = $paramSpec['value']; - } else { + } else if ($paramSpec['location'] == 'query') { if (isset($paramSpec['repeated']) && is_array($paramSpec['value'])) { foreach ($paramSpec['value'] as $value) { $queryVars[] = $paramName . '=' . rawurlencode($value); @@ -112,12 +126,9 @@ class Google_REST { } if (count($uriTemplateVars)) { - $uriTemplateParser = new URI_Template_Parser($requestUrl); - $requestUrl = $uriTemplateParser->expand($uriTemplateVars); + $uriTemplateParser = new Google_Utils_URITemplate(); + $requestUrl = $uriTemplateParser->parse($requestUrl, $uriTemplateVars); } - //FIXME work around for the the uri template lib which url encodes - // the @'s & confuses our servers. - $requestUrl = str_replace('%40', '@', $requestUrl); if (count($queryVars)) { $requestUrl .= '?' . implode($queryVars, '&'); diff --git a/apps/files_external/3rdparty/google-api-php-client/src/Google/Http/Request.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Http/Request.php new file mode 100644 index 00000000000..8643694da89 --- /dev/null +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Http/Request.php @@ -0,0 +1,476 @@ +<?php +/* + * Copyright 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +require_once 'Google/Utils.php'; + +/** + * HTTP Request to be executed by IO classes. Upon execution, the + * responseHttpCode, responseHeaders and responseBody will be filled in. + * + * @author Chris Chabot <chabotc@google.com> + * @author Chirag Shah <chirags@google.com> + * + */ +class Google_Http_Request +{ + const GZIP_UA = " (gzip)"; + + private $batchHeaders = array( + 'Content-Type' => 'application/http', + 'Content-Transfer-Encoding' => 'binary', + 'MIME-Version' => '1.0', + ); + + protected $queryParams; + protected $requestMethod; + protected $requestHeaders; + protected $baseComponent = null; + protected $path; + protected $postBody; + protected $userAgent; + protected $canGzip = null; + + protected $responseHttpCode; + protected $responseHeaders; + protected $responseBody; + + protected $expectedClass; + + public $accessKey; + + public function __construct( + $url, + $method = 'GET', + $headers = array(), + $postBody = null + ) { + $this->setUrl($url); + $this->setRequestMethod($method); + $this->setRequestHeaders($headers); + $this->setPostBody($postBody); + } + + /** + * Misc function that returns the base url component of the $url + * used by the OAuth signing class to calculate the base string + * @return string The base url component of the $url. + */ + public function getBaseComponent() + { + return $this->baseComponent; + } + + /** + * Set the base URL that path and query parameters will be added to. + * @param $baseComponent string + */ + public function setBaseComponent($baseComponent) + { + $this->baseComponent = $baseComponent; + } + + /** + * Enable support for gzipped responses with this request. + */ + public function enableGzip() + { + $this->setRequestHeaders(array("Accept-Encoding" => "gzip")); + $this->canGzip = true; + $this->setUserAgent($this->userAgent); + } + + /** + * Disable support for gzip responses with this request. + */ + public function disableGzip() + { + if ( + isset($this->requestHeaders['accept-encoding']) && + $this->requestHeaders['accept-encoding'] == "gzip" + ) { + unset($this->requestHeaders['accept-encoding']); + } + $this->canGzip = false; + $this->userAgent = str_replace(self::GZIP_UA, "", $this->userAgent); + } + + /** + * Can this request accept a gzip response? + * @return bool + */ + public function canGzip() + { + return $this->canGzip; + } + + /** + * Misc function that returns an array of the query parameters of the current + * url used by the OAuth signing class to calculate the signature + * @return array Query parameters in the query string. + */ + public function getQueryParams() + { + return $this->queryParams; + } + + /** + * Set a new query parameter. + * @param $key - string to set, does not need to be URL encoded + * @param $value - string to set, does not need to be URL encoded + */ + public function setQueryParam($key, $value) + { + $this->queryParams[$key] = $value; + } + + /** + * @return string HTTP Response Code. + */ + public function getResponseHttpCode() + { + return (int) $this->responseHttpCode; + } + + /** + * @param int $responseHttpCode HTTP Response Code. + */ + public function setResponseHttpCode($responseHttpCode) + { + $this->responseHttpCode = $responseHttpCode; + } + + /** + * @return $responseHeaders (array) HTTP Response Headers. + */ + public function getResponseHeaders() + { + return $this->responseHeaders; + } + + /** + * @return string HTTP Response Body + */ + public function getResponseBody() + { + return $this->responseBody; + } + + /** + * Set the class the response to this request should expect. + * + * @param $class string the class name + */ + public function setExpectedClass($class) + { + $this->expectedClass = $class; + } + + /** + * Retrieve the expected class the response should expect. + * @return string class name + */ + public function getExpectedClass() + { + return $this->expectedClass; + } + + /** + * @param array $headers The HTTP response headers + * to be normalized. + */ + public function setResponseHeaders($headers) + { + $headers = Google_Utils::normalize($headers); + if ($this->responseHeaders) { + $headers = array_merge($this->responseHeaders, $headers); + } + + $this->responseHeaders = $headers; + } + + /** + * @param string $key + * @return array|boolean Returns the requested HTTP header or + * false if unavailable. + */ + public function getResponseHeader($key) + { + return isset($this->responseHeaders[$key]) + ? $this->responseHeaders[$key] + : false; + } + + /** + * @param string $responseBody The HTTP response body. + */ + public function setResponseBody($responseBody) + { + $this->responseBody = $responseBody; + } + + /** + * @return string $url The request URL. + */ + public function getUrl() + { + return $this->baseComponent . $this->path . + (count($this->queryParams) ? + "?" . $this->buildQuery($this->queryParams) : + ''); + } + + /** + * @return string $method HTTP Request Method. + */ + public function getRequestMethod() + { + return $this->requestMethod; + } + + /** + * @return array $headers HTTP Request Headers. + */ + public function getRequestHeaders() + { + return $this->requestHeaders; + } + + /** + * @param string $key + * @return array|boolean Returns the requested HTTP header or + * false if unavailable. + */ + public function getRequestHeader($key) + { + return isset($this->requestHeaders[$key]) + ? $this->requestHeaders[$key] + : false; + } + + /** + * @return string $postBody HTTP Request Body. + */ + public function getPostBody() + { + return $this->postBody; + } + + /** + * @param string $url the url to set + */ + public function setUrl($url) + { + if (substr($url, 0, 4) != 'http') { + // Force the path become relative. + if (substr($url, 0, 1) !== '/') { + $url = '/' . $url; + } + } + $parts = parse_url($url); + if (isset($parts['host'])) { + $this->baseComponent = sprintf( + "%s%s%s", + isset($parts['scheme']) ? $parts['scheme'] . "://" : '', + isset($parts['host']) ? $parts['host'] : '', + isset($parts['port']) ? ":" . $parts['port'] : '' + ); + } + $this->path = isset($parts['path']) ? $parts['path'] : ''; + $this->queryParams = array(); + if (isset($parts['query'])) { + $this->queryParams = $this->parseQuery($parts['query']); + } + } + + /** + * @param string $method Set he HTTP Method and normalize + * it to upper-case, as required by HTTP. + * + */ + public function setRequestMethod($method) + { + $this->requestMethod = strtoupper($method); + } + + /** + * @param array $headers The HTTP request headers + * to be set and normalized. + */ + public function setRequestHeaders($headers) + { + $headers = Google_Utils::normalize($headers); + if ($this->requestHeaders) { + $headers = array_merge($this->requestHeaders, $headers); + } + $this->requestHeaders = $headers; + } + + /** + * @param string $postBody the postBody to set + */ + public function setPostBody($postBody) + { + $this->postBody = $postBody; + } + + /** + * Set the User-Agent Header. + * @param string $userAgent The User-Agent. + */ + public function setUserAgent($userAgent) + { + $this->userAgent = $userAgent; + if ($this->canGzip) { + $this->userAgent = $userAgent . self::GZIP_UA; + } + } + + /** + * @return string The User-Agent. + */ + public function getUserAgent() + { + return $this->userAgent; + } + + /** + * Returns a cache key depending on if this was an OAuth signed request + * in which case it will use the non-signed url and access key to make this + * cache key unique per authenticated user, else use the plain request url + * @return string The md5 hash of the request cache key. + */ + public function getCacheKey() + { + $key = $this->getUrl(); + + if (isset($this->accessKey)) { + $key .= $this->accessKey; + } + + if (isset($this->requestHeaders['authorization'])) { + $key .= $this->requestHeaders['authorization']; + } + + return md5($key); + } + + public function getParsedCacheControl() + { + $parsed = array(); + $rawCacheControl = $this->getResponseHeader('cache-control'); + if ($rawCacheControl) { + $rawCacheControl = str_replace(', ', '&', $rawCacheControl); + parse_str($rawCacheControl, $parsed); + } + + return $parsed; + } + + /** + * @param string $id + * @return string A string representation of the HTTP Request. + */ + public function toBatchString($id) + { + $str = ''; + $path = parse_url($this->getUrl(), PHP_URL_PATH) . "?" . + http_build_query($this->queryParams); + $str .= $this->getRequestMethod() . ' ' . $path . " HTTP/1.1\n"; + + foreach ($this->getRequestHeaders() as $key => $val) { + $str .= $key . ': ' . $val . "\n"; + } + + if ($this->getPostBody()) { + $str .= "\n"; + $str .= $this->getPostBody(); + } + + $headers = ''; + foreach ($this->batchHeaders as $key => $val) { + $headers .= $key . ': ' . $val . "\n"; + } + + $headers .= "Content-ID: $id\n"; + $str = $headers . "\n" . $str; + + return $str; + } + + /** + * Our own version of parse_str that allows for multiple variables + * with the same name. + * @param $string - the query string to parse + */ + private function parseQuery($string) + { + $return = array(); + $parts = explode("&", $string); + foreach ($parts as $part) { + list($key, $value) = explode('=', $part, 2); + $value = urldecode($value); + if (isset($return[$key])) { + if (!is_array($return[$key])) { + $return[$key] = array($return[$key]); + } + $return[$key][] = $value; + } else { + $return[$key] = $value; + } + } + return $return; + } + + /** + * A version of build query that allows for multiple + * duplicate keys. + * @param $parts array of key value pairs + */ + private function buildQuery($parts) + { + $return = array(); + foreach ($parts as $key => $value) { + if (is_array($value)) { + foreach ($value as $v) { + $return[] = urlencode($key) . "=" . urlencode($v); + } + } else { + $return[] = urlencode($key) . "=" . urlencode($value); + } + } + return implode('&', $return); + } + + /** + * If we're POSTing and have no body to send, we can send the query + * parameters in there, which avoids length issues with longer query + * params. + */ + public function maybeMoveParametersToBody() + { + if ($this->getRequestMethod() == "POST" && empty($this->postBody)) { + $this->setRequestHeaders( + array( + "content-type" => + "application/x-www-form-urlencoded; charset=UTF-8" + ) + ); + $this->setPostBody($this->buildQuery($this->queryParams)); + $this->queryParams = array(); + } + } +} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/Google/IO/Abstract.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/IO/Abstract.php new file mode 100644 index 00000000000..a4025e874ad --- /dev/null +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/IO/Abstract.php @@ -0,0 +1,332 @@ +<?php +/* + * Copyright 2013 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Abstract IO base class + */ + +require_once 'Google/Client.php'; +require_once 'Google/IO/Exception.php'; +require_once 'Google/Http/CacheParser.php'; +require_once 'Google/Http/Request.php'; + +abstract class Google_IO_Abstract +{ + const UNKNOWN_CODE = 0; + const FORM_URLENCODED = 'application/x-www-form-urlencoded'; + private static $CONNECTION_ESTABLISHED_HEADERS = array( + "HTTP/1.0 200 Connection established\r\n\r\n", + "HTTP/1.1 200 Connection established\r\n\r\n", + ); + private static $ENTITY_HTTP_METHODS = array("POST" => null, "PUT" => null); + + /** @var Google_Client */ + protected $client; + + public function __construct(Google_Client $client) + { + $this->client = $client; + $timeout = $client->getClassConfig('Google_IO_Abstract', 'request_timeout_seconds'); + if ($timeout > 0) { + $this->setTimeout($timeout); + } + } + + /** + * Executes a Google_Http_Request and returns the resulting populated Google_Http_Request + * @param Google_Http_Request $request + * @return Google_Http_Request $request + */ + abstract public function executeRequest(Google_Http_Request $request); + + /** + * Set options that update the transport implementation's behavior. + * @param $options + */ + abstract public function setOptions($options); + + /** + * Set the maximum request time in seconds. + * @param $timeout in seconds + */ + abstract public function setTimeout($timeout); + + /** + * Get the maximum request time in seconds. + * @return timeout in seconds + */ + abstract public function getTimeout(); + + /** + * Test for the presence of a cURL header processing bug + * + * The cURL bug was present in versions prior to 7.30.0 and caused the header + * length to be miscalculated when a "Connection established" header added by + * some proxies was present. + * + * @return boolean + */ + abstract protected function needsQuirk(); + + /** + * @visible for testing. + * Cache the response to an HTTP request if it is cacheable. + * @param Google_Http_Request $request + * @return bool Returns true if the insertion was successful. + * Otherwise, return false. + */ + public function setCachedRequest(Google_Http_Request $request) + { + // Determine if the request is cacheable. + if (Google_Http_CacheParser::isResponseCacheable($request)) { + $this->client->getCache()->set($request->getCacheKey(), $request); + return true; + } + + return false; + } + + /** + * Execute an HTTP Request + * + * @param Google_HttpRequest $request the http request to be executed + * @return Google_HttpRequest http request with the response http code, + * response headers and response body filled in + * @throws Google_IO_Exception on curl or IO error + */ + public function makeRequest(Google_Http_Request $request) + { + // First, check to see if we have a valid cached version. + $cached = $this->getCachedRequest($request); + if ($cached !== false && $cached instanceof Google_Http_Request) { + if (!$this->checkMustRevalidateCachedRequest($cached, $request)) { + return $cached; + } + } + + if (array_key_exists($request->getRequestMethod(), self::$ENTITY_HTTP_METHODS)) { + $request = $this->processEntityRequest($request); + } + + list($responseData, $responseHeaders, $respHttpCode) = $this->executeRequest($request); + + if ($respHttpCode == 304 && $cached) { + // If the server responded NOT_MODIFIED, return the cached request. + $this->updateCachedRequest($cached, $responseHeaders); + return $cached; + } + + if (!isset($responseHeaders['Date']) && !isset($responseHeaders['date'])) { + $responseHeaders['Date'] = date("r"); + } + + $request->setResponseHttpCode($respHttpCode); + $request->setResponseHeaders($responseHeaders); + $request->setResponseBody($responseData); + // Store the request in cache (the function checks to see if the request + // can actually be cached) + $this->setCachedRequest($request); + return $request; + } + + /** + * @visible for testing. + * @param Google_Http_Request $request + * @return Google_Http_Request|bool Returns the cached object or + * false if the operation was unsuccessful. + */ + public function getCachedRequest(Google_Http_Request $request) + { + if (false === Google_Http_CacheParser::isRequestCacheable($request)) { + return false; + } + + return $this->client->getCache()->get($request->getCacheKey()); + } + + /** + * @visible for testing + * Process an http request that contains an enclosed entity. + * @param Google_Http_Request $request + * @return Google_Http_Request Processed request with the enclosed entity. + */ + public function processEntityRequest(Google_Http_Request $request) + { + $postBody = $request->getPostBody(); + $contentType = $request->getRequestHeader("content-type"); + + // Set the default content-type as application/x-www-form-urlencoded. + if (false == $contentType) { + $contentType = self::FORM_URLENCODED; + $request->setRequestHeaders(array('content-type' => $contentType)); + } + + // Force the payload to match the content-type asserted in the header. + if ($contentType == self::FORM_URLENCODED && is_array($postBody)) { + $postBody = http_build_query($postBody, '', '&'); + $request->setPostBody($postBody); + } + + // Make sure the content-length header is set. + if (!$postBody || is_string($postBody)) { + $postsLength = strlen($postBody); + $request->setRequestHeaders(array('content-length' => $postsLength)); + } + + return $request; + } + + /** + * Check if an already cached request must be revalidated, and if so update + * the request with the correct ETag headers. + * @param Google_Http_Request $cached A previously cached response. + * @param Google_Http_Request $request The outbound request. + * return bool If the cached object needs to be revalidated, false if it is + * still current and can be re-used. + */ + protected function checkMustRevalidateCachedRequest($cached, $request) + { + if (Google_Http_CacheParser::mustRevalidate($cached)) { + $addHeaders = array(); + if ($cached->getResponseHeader('etag')) { + // [13.3.4] If an entity tag has been provided by the origin server, + // we must use that entity tag in any cache-conditional request. + $addHeaders['If-None-Match'] = $cached->getResponseHeader('etag'); + } elseif ($cached->getResponseHeader('date')) { + $addHeaders['If-Modified-Since'] = $cached->getResponseHeader('date'); + } + + $request->setRequestHeaders($addHeaders); + return true; + } else { + return false; + } + } + + /** + * Update a cached request, using the headers from the last response. + * @param Google_HttpRequest $cached A previously cached response. + * @param mixed Associative array of response headers from the last request. + */ + protected function updateCachedRequest($cached, $responseHeaders) + { + if (isset($responseHeaders['connection'])) { + $hopByHop = array_merge( + self::$HOP_BY_HOP, + explode( + ',', + $responseHeaders['connection'] + ) + ); + + $endToEnd = array(); + foreach ($hopByHop as $key) { + if (isset($responseHeaders[$key])) { + $endToEnd[$key] = $responseHeaders[$key]; + } + } + $cached->setResponseHeaders($endToEnd); + } + } + + /** + * Used by the IO lib and also the batch processing. + * + * @param $respData + * @param $headerSize + * @return array + */ + public function parseHttpResponse($respData, $headerSize) + { + // check proxy header + foreach (self::$CONNECTION_ESTABLISHED_HEADERS as $established_header) { + if (stripos($respData, $established_header) !== false) { + // existed, remove it + $respData = str_ireplace($established_header, '', $respData); + // Subtract the proxy header size unless the cURL bug prior to 7.30.0 + // is present which prevented the proxy header size from being taken into + // account. + if (!$this->needsQuirk()) { + $headerSize -= strlen($established_header); + } + break; + } + } + + if ($headerSize) { + $responseBody = substr($respData, $headerSize); + $responseHeaders = substr($respData, 0, $headerSize); + } else { + $responseSegments = explode("\r\n\r\n", $respData, 2); + $responseHeaders = $responseSegments[0]; + $responseBody = isset($responseSegments[1]) ? $responseSegments[1] : + null; + } + + $responseHeaders = $this->getHttpResponseHeaders($responseHeaders); + return array($responseHeaders, $responseBody); + } + + /** + * Parse out headers from raw headers + * @param rawHeaders array or string + * @return array + */ + public function getHttpResponseHeaders($rawHeaders) + { + if (is_array($rawHeaders)) { + return $this->parseArrayHeaders($rawHeaders); + } else { + return $this->parseStringHeaders($rawHeaders); + } + } + + private function parseStringHeaders($rawHeaders) + { + $headers = array(); + $responseHeaderLines = explode("\r\n", $rawHeaders); + foreach ($responseHeaderLines as $headerLine) { + if ($headerLine && strpos($headerLine, ':') !== false) { + list($header, $value) = explode(': ', $headerLine, 2); + $header = strtolower($header); + if (isset($headers[$header])) { + $headers[$header] .= "\n" . $value; + } else { + $headers[$header] = $value; + } + } + } + return $headers; + } + + private function parseArrayHeaders($rawHeaders) + { + $header_count = count($rawHeaders); + $headers = array(); + + for ($i = 0; $i < $header_count; $i++) { + $header = $rawHeaders[$i]; + // Times will have colons in - so we just want the first match. + $header_parts = explode(': ', $header, 2); + if (count($header_parts) == 2) { + $headers[$header_parts[0]] = $header_parts[1]; + } + } + + return $headers; + } +} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/Google/IO/Curl.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/IO/Curl.php new file mode 100644 index 00000000000..57a057114cc --- /dev/null +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/IO/Curl.php @@ -0,0 +1,137 @@ +<?php +/* + * Copyright 2014 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Curl based implementation of Google_IO. + * + * @author Stuart Langley <slangley@google.com> + */ + +require_once 'Google/IO/Abstract.php'; + +class Google_IO_Curl extends Google_IO_Abstract +{ + // cURL hex representation of version 7.30.0 + const NO_QUIRK_VERSION = 0x071E00; + + private $options = array(); + /** + * Execute an HTTP Request + * + * @param Google_HttpRequest $request the http request to be executed + * @return Google_HttpRequest http request with the response http code, + * response headers and response body filled in + * @throws Google_IO_Exception on curl or IO error + */ + public function executeRequest(Google_Http_Request $request) + { + $curl = curl_init(); + + if ($request->getPostBody()) { + curl_setopt($curl, CURLOPT_POSTFIELDS, $request->getPostBody()); + } + + $requestHeaders = $request->getRequestHeaders(); + if ($requestHeaders && is_array($requestHeaders)) { + $curlHeaders = array(); + foreach ($requestHeaders as $k => $v) { + $curlHeaders[] = "$k: $v"; + } + curl_setopt($curl, CURLOPT_HTTPHEADER, $curlHeaders); + } + + curl_setopt($curl, CURLOPT_URL, $request->getUrl()); + + curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $request->getRequestMethod()); + curl_setopt($curl, CURLOPT_USERAGENT, $request->getUserAgent()); + + curl_setopt($curl, CURLOPT_FOLLOWLOCATION, false); + curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true); + curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); + curl_setopt($curl, CURLOPT_HEADER, true); + + if ($request->canGzip()) { + curl_setopt($curl, CURLOPT_ENCODING, 'gzip,deflate'); + } + + foreach ($this->options as $key => $var) { + curl_setopt($curl, $key, $var); + } + + if (!isset($this->options[CURLOPT_CAINFO])) { + curl_setopt($curl, CURLOPT_CAINFO, dirname(__FILE__) . '/cacerts.pem'); + } + + $response = curl_exec($curl); + if ($response === false) { + throw new Google_IO_Exception(curl_error($curl)); + } + $headerSize = curl_getinfo($curl, CURLINFO_HEADER_SIZE); + + list($responseHeaders, $responseBody) = $this->parseHttpResponse($response, $headerSize); + + $responseCode = curl_getinfo($curl, CURLINFO_HTTP_CODE); + + return array($responseBody, $responseHeaders, $responseCode); + } + + /** + * Set options that update the transport implementation's behavior. + * @param $options + */ + public function setOptions($options) + { + $this->options = $options + $this->options; + } + + /** + * Set the maximum request time in seconds. + * @param $timeout in seconds + */ + public function setTimeout($timeout) + { + // Since this timeout is really for putting a bound on the time + // we'll set them both to the same. If you need to specify a longer + // CURLOPT_TIMEOUT, or a tigher CONNECTTIMEOUT, the best thing to + // do is use the setOptions method for the values individually. + $this->options[CURLOPT_CONNECTTIMEOUT] = $timeout; + $this->options[CURLOPT_TIMEOUT] = $timeout; + } + + /** + * Get the maximum request time in seconds. + * @return timeout in seconds + */ + public function getTimeout() + { + return $this->options[CURLOPT_TIMEOUT]; + } + + /** + * Test for the presence of a cURL header processing bug + * + * {@inheritDoc} + * + * @return boolean + */ + protected function needsQuirk() + { + $ver = curl_version(); + $versionNum = $ver['version_number']; + return $versionNum < Google_IO_Curl::NO_QUIRK_VERSION; + } +} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/Google/IO/Exception.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/IO/Exception.php new file mode 100644 index 00000000000..28c2d8ce645 --- /dev/null +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/IO/Exception.php @@ -0,0 +1,22 @@ +<?php +/* + * Copyright 2013 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +require_once 'Google/Exception.php'; + +class Google_IO_Exception extends Google_Exception +{ +} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/Google/IO/Stream.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/IO/Stream.php new file mode 100644 index 00000000000..917578d87a0 --- /dev/null +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/IO/Stream.php @@ -0,0 +1,211 @@ +<?php +/* + * Copyright 2013 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Http Streams based implementation of Google_IO. + * + * @author Stuart Langley <slangley@google.com> + */ + +require_once 'Google/IO/Abstract.php'; + +class Google_IO_Stream extends Google_IO_Abstract +{ + const TIMEOUT = "timeout"; + const ZLIB = "compress.zlib://"; + private $options = array(); + private $trappedErrorNumber; + private $trappedErrorString; + + private static $DEFAULT_HTTP_CONTEXT = array( + "follow_location" => 0, + "ignore_errors" => 1, + ); + + private static $DEFAULT_SSL_CONTEXT = array( + "verify_peer" => true, + ); + + /** + * Execute an HTTP Request + * + * @param Google_HttpRequest $request the http request to be executed + * @return Google_HttpRequest http request with the response http code, + * response headers and response body filled in + * @throws Google_IO_Exception on curl or IO error + */ + public function executeRequest(Google_Http_Request $request) + { + $default_options = stream_context_get_options(stream_context_get_default()); + + $requestHttpContext = array_key_exists('http', $default_options) ? + $default_options['http'] : array(); + + if ($request->getPostBody()) { + $requestHttpContext["content"] = $request->getPostBody(); + } + + $requestHeaders = $request->getRequestHeaders(); + if ($requestHeaders && is_array($requestHeaders)) { + $headers = ""; + foreach ($requestHeaders as $k => $v) { + $headers .= "$k: $v\r\n"; + } + $requestHttpContext["header"] = $headers; + } + + $requestHttpContext["method"] = $request->getRequestMethod(); + $requestHttpContext["user_agent"] = $request->getUserAgent(); + + $requestSslContext = array_key_exists('ssl', $default_options) ? + $default_options['ssl'] : array(); + + if (!array_key_exists("cafile", $requestSslContext)) { + $requestSslContext["cafile"] = dirname(__FILE__) . '/cacerts.pem'; + } + + $options = array( + "http" => array_merge( + self::$DEFAULT_HTTP_CONTEXT, + $requestHttpContext + ), + "ssl" => array_merge( + self::$DEFAULT_SSL_CONTEXT, + $requestSslContext + ) + ); + + $context = stream_context_create($options); + + $url = $request->getUrl(); + + if ($request->canGzip()) { + $url = self::ZLIB . $url; + } + + // We are trapping any thrown errors in this method only and + // throwing an exception. + $this->trappedErrorNumber = null; + $this->trappedErrorString = null; + + // START - error trap. + set_error_handler(array($this, 'trapError')); + $fh = fopen($url, 'r', false, $context); + restore_error_handler(); + // END - error trap. + + if ($this->trappedErrorNumber) { + throw new Google_IO_Exception( + sprintf( + "HTTP Error: Unable to connect: '%s'", + $this->trappedErrorString + ), + $this->trappedErrorNumber + ); + } + + $response_data = false; + $respHttpCode = self::UNKNOWN_CODE; + if ($fh) { + if (isset($this->options[self::TIMEOUT])) { + stream_set_timeout($fh, $this->options[self::TIMEOUT]); + } + + $response_data = stream_get_contents($fh); + fclose($fh); + + $respHttpCode = $this->getHttpResponseCode($http_response_header); + } + + if (false === $response_data) { + throw new Google_IO_Exception( + sprintf( + "HTTP Error: Unable to connect: '%s'", + $respHttpCode + ), + $respHttpCode + ); + } + + $responseHeaders = $this->getHttpResponseHeaders($http_response_header); + + return array($response_data, $responseHeaders, $respHttpCode); + } + + /** + * Set options that update the transport implementation's behavior. + * @param $options + */ + public function setOptions($options) + { + $this->options = $options + $this->options; + } + + /** + * Method to handle errors, used for error handling around + * stream connection methods. + */ + public function trapError($errno, $errstr) + { + $this->trappedErrorNumber = $errno; + $this->trappedErrorString = $errstr; + } + + /** + * Set the maximum request time in seconds. + * @param $timeout in seconds + */ + public function setTimeout($timeout) + { + $this->options[self::TIMEOUT] = $timeout; + } + + /** + * Get the maximum request time in seconds. + * @return timeout in seconds + */ + public function getTimeout() + { + return $this->options[self::TIMEOUT]; + } + + /** + * Test for the presence of a cURL header processing bug + * + * {@inheritDoc} + * + * @return boolean + */ + protected function needsQuirk() + { + return false; + } + + protected function getHttpResponseCode($response_headers) + { + $header_count = count($response_headers); + + for ($i = 0; $i < $header_count; $i++) { + $header = $response_headers[$i]; + if (strncasecmp("HTTP", $header, strlen("HTTP")) == 0) { + $response = explode(' ', $header); + return $response[1]; + } + } + return self::UNKNOWN_CODE; + } +} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/io/cacerts.pem b/apps/files_external/3rdparty/google-api-php-client/src/Google/IO/cacerts.pem index da36ed1ba6d..79a49289cbe 100644 --- a/apps/files_external/3rdparty/google-api-php-client/src/io/cacerts.pem +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/IO/cacerts.pem @@ -712,3 +712,27 @@ IYEZoDJJKPTEjlbVUjP9UNV+mWwD5MlM/Mtsq2azSiGM5bUMMj4QssxsodyamEwC W/POuZ6lcg5Ktz885hZo+L7tdEy8W9ViH0Pd -----END CERTIFICATE----- +GeoTrust Global CA +================== + +-----BEGIN CERTIFICATE----- +MIIDfTCCAuagAwIBAgIDErvmMA0GCSqGSIb3DQEBBQUAME4xCzAJBgNVBAYTAlVT +MRAwDgYDVQQKEwdFcXVpZmF4MS0wKwYDVQQLEyRFcXVpZmF4IFNlY3VyZSBDZXJ0 +aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDIwNTIxMDQwMDAwWhcNMTgwODIxMDQwMDAw +WjBCMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UE +AxMSR2VvVHJ1c3QgR2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB +CgKCAQEA2swYYzD99BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9m +OSm9BXiLnTjoBbdqfnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIu +T8rxh0PBFpVXLVDviS2Aelet8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6c +JmTM386DGXHKTubU1XupGc1V3sjs0l44U+VcT4wt/lAjNvxm5suOpDkZALeVAjmR +Cw7+OC7RHQWa9k0+bw8HHa8sHo9gOeL6NlMTOdReJivbPagUvTLrGAMoUgRx5asz +PeE4uwc2hGKceeoWMPRfwCvocWvk+QIDAQABo4HwMIHtMB8GA1UdIwQYMBaAFEjm +aPkr0rKV10fYIyAQTzOYkJ/UMB0GA1UdDgQWBBTAephojYn7qwVkDBF9qn1luMrM +TjAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjA6BgNVHR8EMzAxMC+g +LaArhilodHRwOi8vY3JsLmdlb3RydXN0LmNvbS9jcmxzL3NlY3VyZWNhLmNybDBO +BgNVHSAERzBFMEMGBFUdIAAwOzA5BggrBgEFBQcCARYtaHR0cHM6Ly93d3cuZ2Vv +dHJ1c3QuY29tL3Jlc291cmNlcy9yZXBvc2l0b3J5MA0GCSqGSIb3DQEBBQUAA4GB +AHbhEm5OSxYShjAGsoEIz/AIx8dxfmbuwu3UOx//8PDITtZDOLC5MH0Y0FWDomrL +NhGc6Ehmo21/uBPUR/6LWlxz/K7ZGzIZOKuXNBSqltLroxwUCEm2u+WR74M26x1W +b8ravHNjkOR/ez4iyz0H7V84dJzjA1BOoa+Y7mHyhD8S +-----END CERTIFICATE----- diff --git a/apps/files_external/3rdparty/google-api-php-client/src/Google/Model.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Model.php new file mode 100644 index 00000000000..2bb9a333d66 --- /dev/null +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Model.php @@ -0,0 +1,265 @@ +<?php +/* + * Copyright 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * This class defines attributes, valid values, and usage which is generated + * from a given json schema. + * http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5 + * + * @author Chirag Shah <chirags@google.com> + * + */ +class Google_Model implements ArrayAccess +{ + protected $internal_gapi_mappings = array(); + protected $modelData = array(); + protected $processed = array(); + + /** + * Polymorphic - accepts a variable number of arguments dependent + * on the type of the model subclass. + */ + public function __construct() + { + if (func_num_args() == 1 && is_array(func_get_arg(0))) { + // Initialize the model with the array's contents. + $array = func_get_arg(0); + $this->mapTypes($array); + } + } + + public function __get($key) + { + $keyTypeName = $this->keyType($key); + $keyDataType = $this->dataType($key); + if (isset($this->$keyTypeName) && !isset($this->processed[$key])) { + if (isset($this->modelData[$key])) { + $val = $this->modelData[$key]; + } else if (isset($this->$keyDataType) && + ($this->$keyDataType == 'array' || $this->$keyDataType == 'map')) { + $val = array(); + } else { + $val = null; + } + + if ($this->isAssociativeArray($val)) { + if (isset($this->$keyDataType) && 'map' == $this->$keyDataType) { + foreach ($val as $arrayKey => $arrayItem) { + $this->modelData[$key][$arrayKey] = + $this->createObjectFromName($keyTypeName, $arrayItem); + } + } else { + $this->modelData[$key] = $this->createObjectFromName($keyTypeName, $val); + } + } else if (is_array($val)) { + $arrayObject = array(); + foreach ($val as $arrayIndex => $arrayItem) { + $arrayObject[$arrayIndex] = + $this->createObjectFromName($keyTypeName, $arrayItem); + } + $this->modelData[$key] = $arrayObject; + } + $this->processed[$key] = true; + } + + return isset($this->modelData[$key]) ? $this->modelData[$key] : null; + } + + /** + * Initialize this object's properties from an array. + * + * @param array $array Used to seed this object's properties. + * @return void + */ + protected function mapTypes($array) + { + // Hard initilise simple types, lazy load more complex ones. + foreach ($array as $key => $val) { + if ( !property_exists($this, $this->keyType($key)) && + property_exists($this, $key)) { + $this->$key = $val; + unset($array[$key]); + } elseif (property_exists($this, $camelKey = Google_Utils::camelCase($key))) { + // This checks if property exists as camelCase, leaving it in array as snake_case + // in case of backwards compatibility issues. + $this->$camelKey = $val; + } + } + $this->modelData = $array; + } + + /** + * Create a simplified object suitable for straightforward + * conversion to JSON. This is relatively expensive + * due to the usage of reflection, but shouldn't be called + * a whole lot, and is the most straightforward way to filter. + */ + public function toSimpleObject() + { + $object = new stdClass(); + + // Process all other data. + foreach ($this->modelData as $key => $val) { + $result = $this->getSimpleValue($val); + if ($result !== null) { + $object->$key = $result; + } + } + + // Process all public properties. + $reflect = new ReflectionObject($this); + $props = $reflect->getProperties(ReflectionProperty::IS_PUBLIC); + foreach ($props as $member) { + $name = $member->getName(); + $result = $this->getSimpleValue($this->$name); + if ($result !== null) { + $name = $this->getMappedName($name); + $object->$name = $result; + } + } + + return $object; + } + + /** + * Handle different types of values, primarily + * other objects and map and array data types. + */ + private function getSimpleValue($value) + { + if ($value instanceof Google_Model) { + return $value->toSimpleObject(); + } else if (is_array($value)) { + $return = array(); + foreach ($value as $key => $a_value) { + $a_value = $this->getSimpleValue($a_value); + if ($a_value !== null) { + $key = $this->getMappedName($key); + $return[$key] = $a_value; + } + } + return $return; + } + return $value; + } + + /** + * If there is an internal name mapping, use that. + */ + private function getMappedName($key) + { + if (isset($this->internal_gapi_mappings) && + isset($this->internal_gapi_mappings[$key])) { + $key = $this->internal_gapi_mappings[$key]; + } + return $key; + } + + /** + * Returns true only if the array is associative. + * @param array $array + * @return bool True if the array is associative. + */ + protected function isAssociativeArray($array) + { + if (!is_array($array)) { + return false; + } + $keys = array_keys($array); + foreach ($keys as $key) { + if (is_string($key)) { + return true; + } + } + return false; + } + + /** + * Given a variable name, discover its type. + * + * @param $name + * @param $item + * @return object The object from the item. + */ + private function createObjectFromName($name, $item) + { + $type = $this->$name; + return new $type($item); + } + + /** + * Verify if $obj is an array. + * @throws Google_Exception Thrown if $obj isn't an array. + * @param array $obj Items that should be validated. + * @param string $method Method expecting an array as an argument. + */ + public function assertIsArray($obj, $method) + { + if ($obj && !is_array($obj)) { + throw new Google_Exception( + "Incorrect parameter type passed to $method(). Expected an array." + ); + } + } + + public function offsetExists($offset) + { + return isset($this->$offset) || isset($this->modelData[$offset]); + } + + public function offsetGet($offset) + { + return isset($this->$offset) ? + $this->$offset : + $this->__get($offset); + } + + public function offsetSet($offset, $value) + { + if (property_exists($this, $offset)) { + $this->$offset = $value; + } else { + $this->modelData[$offset] = $value; + $this->processed[$offset] = true; + } + } + + public function offsetUnset($offset) + { + unset($this->modelData[$offset]); + } + + protected function keyType($key) + { + return $key . "Type"; + } + + protected function dataType($key) + { + return $key . "DataType"; + } + + public function __isset($key) + { + return isset($this->modelData[$key]); + } + + public function __unset($key) + { + unset($this->modelData[$key]); + } +} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/Google/Service.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Service.php new file mode 100644 index 00000000000..2e0b6c52282 --- /dev/null +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Service.php @@ -0,0 +1,39 @@ +<?php +/* + * Copyright 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class Google_Service +{ + public $version; + public $servicePath; + public $availableScopes; + public $resource; + private $client; + + public function __construct(Google_Client $client) + { + $this->client = $client; + } + + /** + * Return the associated Google_Client class. + * @return Google_Client + */ + public function getClient() + { + return $this->client; + } +} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/Google/Service/Drive.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Service/Drive.php new file mode 100644 index 00000000000..291a6091232 --- /dev/null +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Service/Drive.php @@ -0,0 +1,6136 @@ +<?php +/* + * Copyright 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +/** + * Service definition for Drive (v2). + * + * <p> + * The API to interact with Drive. + * </p> + * + * <p> + * For more information about this service, see the API + * <a href="https://developers.google.com/drive/" target="_blank">Documentation</a> + * </p> + * + * @author Google, Inc. + */ +class Google_Service_Drive extends Google_Service +{ + /** View and manage the files and documents in your Google Drive. */ + const DRIVE = "https://www.googleapis.com/auth/drive"; + /** View and manage its own configuration data in your Google Drive. */ + const DRIVE_APPDATA = "https://www.googleapis.com/auth/drive.appdata"; + /** View your Google Drive apps. */ + const DRIVE_APPS_READONLY = "https://www.googleapis.com/auth/drive.apps.readonly"; + /** View and manage Google Drive files that you have opened or created with this app. */ + const DRIVE_FILE = "https://www.googleapis.com/auth/drive.file"; + /** View metadata for files and documents in your Google Drive. */ + const DRIVE_METADATA_READONLY = "https://www.googleapis.com/auth/drive.metadata.readonly"; + /** View the files and documents in your Google Drive. */ + const DRIVE_READONLY = "https://www.googleapis.com/auth/drive.readonly"; + /** Modify your Google Apps Script scripts' behavior. */ + const DRIVE_SCRIPTS = "https://www.googleapis.com/auth/drive.scripts"; + + public $about; + public $apps; + public $changes; + public $channels; + public $children; + public $comments; + public $files; + public $parents; + public $permissions; + public $properties; + public $realtime; + public $replies; + public $revisions; + + + /** + * Constructs the internal representation of the Drive service. + * + * @param Google_Client $client + */ + public function __construct(Google_Client $client) + { + parent::__construct($client); + $this->servicePath = 'drive/v2/'; + $this->version = 'v2'; + $this->serviceName = 'drive'; + + $this->about = new Google_Service_Drive_About_Resource( + $this, + $this->serviceName, + 'about', + array( + 'methods' => array( + 'get' => array( + 'path' => 'about', + 'httpMethod' => 'GET', + 'parameters' => array( + 'includeSubscribed' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + 'maxChangeIdCount' => array( + 'location' => 'query', + 'type' => 'string', + ), + 'startChangeId' => array( + 'location' => 'query', + 'type' => 'string', + ), + ), + ), + ) + ) + ); + $this->apps = new Google_Service_Drive_Apps_Resource( + $this, + $this->serviceName, + 'apps', + array( + 'methods' => array( + 'get' => array( + 'path' => 'apps/{appId}', + 'httpMethod' => 'GET', + 'parameters' => array( + 'appId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ),'list' => array( + 'path' => 'apps', + 'httpMethod' => 'GET', + 'parameters' => array( + 'languageCode' => array( + 'location' => 'query', + 'type' => 'string', + ), + 'appFilterExtensions' => array( + 'location' => 'query', + 'type' => 'string', + ), + 'appFilterMimeTypes' => array( + 'location' => 'query', + 'type' => 'string', + ), + ), + ), + ) + ) + ); + $this->changes = new Google_Service_Drive_Changes_Resource( + $this, + $this->serviceName, + 'changes', + array( + 'methods' => array( + 'get' => array( + 'path' => 'changes/{changeId}', + 'httpMethod' => 'GET', + 'parameters' => array( + 'changeId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ),'list' => array( + 'path' => 'changes', + 'httpMethod' => 'GET', + 'parameters' => array( + 'includeSubscribed' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + 'startChangeId' => array( + 'location' => 'query', + 'type' => 'string', + ), + 'includeDeleted' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + 'maxResults' => array( + 'location' => 'query', + 'type' => 'integer', + ), + 'pageToken' => array( + 'location' => 'query', + 'type' => 'string', + ), + ), + ),'watch' => array( + 'path' => 'changes/watch', + 'httpMethod' => 'POST', + 'parameters' => array( + 'includeSubscribed' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + 'startChangeId' => array( + 'location' => 'query', + 'type' => 'string', + ), + 'includeDeleted' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + 'maxResults' => array( + 'location' => 'query', + 'type' => 'integer', + ), + 'pageToken' => array( + 'location' => 'query', + 'type' => 'string', + ), + ), + ), + ) + ) + ); + $this->channels = new Google_Service_Drive_Channels_Resource( + $this, + $this->serviceName, + 'channels', + array( + 'methods' => array( + 'stop' => array( + 'path' => 'channels/stop', + 'httpMethod' => 'POST', + 'parameters' => array(), + ), + ) + ) + ); + $this->children = new Google_Service_Drive_Children_Resource( + $this, + $this->serviceName, + 'children', + array( + 'methods' => array( + 'delete' => array( + 'path' => 'files/{folderId}/children/{childId}', + 'httpMethod' => 'DELETE', + 'parameters' => array( + 'folderId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'childId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ),'get' => array( + 'path' => 'files/{folderId}/children/{childId}', + 'httpMethod' => 'GET', + 'parameters' => array( + 'folderId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'childId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ),'insert' => array( + 'path' => 'files/{folderId}/children', + 'httpMethod' => 'POST', + 'parameters' => array( + 'folderId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ),'list' => array( + 'path' => 'files/{folderId}/children', + 'httpMethod' => 'GET', + 'parameters' => array( + 'folderId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'q' => array( + 'location' => 'query', + 'type' => 'string', + ), + 'pageToken' => array( + 'location' => 'query', + 'type' => 'string', + ), + 'maxResults' => array( + 'location' => 'query', + 'type' => 'integer', + ), + ), + ), + ) + ) + ); + $this->comments = new Google_Service_Drive_Comments_Resource( + $this, + $this->serviceName, + 'comments', + array( + 'methods' => array( + 'delete' => array( + 'path' => 'files/{fileId}/comments/{commentId}', + 'httpMethod' => 'DELETE', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'commentId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ),'get' => array( + 'path' => 'files/{fileId}/comments/{commentId}', + 'httpMethod' => 'GET', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'commentId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'includeDeleted' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + ), + ),'insert' => array( + 'path' => 'files/{fileId}/comments', + 'httpMethod' => 'POST', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ),'list' => array( + 'path' => 'files/{fileId}/comments', + 'httpMethod' => 'GET', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'pageToken' => array( + 'location' => 'query', + 'type' => 'string', + ), + 'updatedMin' => array( + 'location' => 'query', + 'type' => 'string', + ), + 'includeDeleted' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + 'maxResults' => array( + 'location' => 'query', + 'type' => 'integer', + ), + ), + ),'patch' => array( + 'path' => 'files/{fileId}/comments/{commentId}', + 'httpMethod' => 'PATCH', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'commentId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ),'update' => array( + 'path' => 'files/{fileId}/comments/{commentId}', + 'httpMethod' => 'PUT', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'commentId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ), + ) + ) + ); + $this->files = new Google_Service_Drive_Files_Resource( + $this, + $this->serviceName, + 'files', + array( + 'methods' => array( + 'copy' => array( + 'path' => 'files/{fileId}/copy', + 'httpMethod' => 'POST', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'convert' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + 'ocrLanguage' => array( + 'location' => 'query', + 'type' => 'string', + ), + 'visibility' => array( + 'location' => 'query', + 'type' => 'string', + ), + 'pinned' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + 'ocr' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + 'timedTextTrackName' => array( + 'location' => 'query', + 'type' => 'string', + ), + 'timedTextLanguage' => array( + 'location' => 'query', + 'type' => 'string', + ), + ), + ),'delete' => array( + 'path' => 'files/{fileId}', + 'httpMethod' => 'DELETE', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ),'emptyTrash' => array( + 'path' => 'files/trash', + 'httpMethod' => 'DELETE', + 'parameters' => array(), + ),'get' => array( + 'path' => 'files/{fileId}', + 'httpMethod' => 'GET', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'updateViewedDate' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + 'projection' => array( + 'location' => 'query', + 'type' => 'string', + ), + ), + ),'insert' => array( + 'path' => 'files', + 'httpMethod' => 'POST', + 'parameters' => array( + 'convert' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + 'useContentAsIndexableText' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + 'ocrLanguage' => array( + 'location' => 'query', + 'type' => 'string', + ), + 'visibility' => array( + 'location' => 'query', + 'type' => 'string', + ), + 'pinned' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + 'ocr' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + 'timedTextTrackName' => array( + 'location' => 'query', + 'type' => 'string', + ), + 'timedTextLanguage' => array( + 'location' => 'query', + 'type' => 'string', + ), + ), + ),'list' => array( + 'path' => 'files', + 'httpMethod' => 'GET', + 'parameters' => array( + 'q' => array( + 'location' => 'query', + 'type' => 'string', + ), + 'pageToken' => array( + 'location' => 'query', + 'type' => 'string', + ), + 'corpus' => array( + 'location' => 'query', + 'type' => 'string', + ), + 'projection' => array( + 'location' => 'query', + 'type' => 'string', + ), + 'maxResults' => array( + 'location' => 'query', + 'type' => 'integer', + ), + ), + ),'patch' => array( + 'path' => 'files/{fileId}', + 'httpMethod' => 'PATCH', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'addParents' => array( + 'location' => 'query', + 'type' => 'string', + ), + 'updateViewedDate' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + 'removeParents' => array( + 'location' => 'query', + 'type' => 'string', + ), + 'setModifiedDate' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + 'convert' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + 'useContentAsIndexableText' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + 'ocrLanguage' => array( + 'location' => 'query', + 'type' => 'string', + ), + 'pinned' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + 'newRevision' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + 'ocr' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + 'timedTextLanguage' => array( + 'location' => 'query', + 'type' => 'string', + ), + 'timedTextTrackName' => array( + 'location' => 'query', + 'type' => 'string', + ), + ), + ),'touch' => array( + 'path' => 'files/{fileId}/touch', + 'httpMethod' => 'POST', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ),'trash' => array( + 'path' => 'files/{fileId}/trash', + 'httpMethod' => 'POST', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ),'untrash' => array( + 'path' => 'files/{fileId}/untrash', + 'httpMethod' => 'POST', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ),'update' => array( + 'path' => 'files/{fileId}', + 'httpMethod' => 'PUT', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'addParents' => array( + 'location' => 'query', + 'type' => 'string', + ), + 'updateViewedDate' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + 'removeParents' => array( + 'location' => 'query', + 'type' => 'string', + ), + 'setModifiedDate' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + 'convert' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + 'useContentAsIndexableText' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + 'ocrLanguage' => array( + 'location' => 'query', + 'type' => 'string', + ), + 'pinned' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + 'newRevision' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + 'ocr' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + 'timedTextLanguage' => array( + 'location' => 'query', + 'type' => 'string', + ), + 'timedTextTrackName' => array( + 'location' => 'query', + 'type' => 'string', + ), + ), + ),'watch' => array( + 'path' => 'files/{fileId}/watch', + 'httpMethod' => 'POST', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'updateViewedDate' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + 'projection' => array( + 'location' => 'query', + 'type' => 'string', + ), + ), + ), + ) + ) + ); + $this->parents = new Google_Service_Drive_Parents_Resource( + $this, + $this->serviceName, + 'parents', + array( + 'methods' => array( + 'delete' => array( + 'path' => 'files/{fileId}/parents/{parentId}', + 'httpMethod' => 'DELETE', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'parentId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ),'get' => array( + 'path' => 'files/{fileId}/parents/{parentId}', + 'httpMethod' => 'GET', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'parentId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ),'insert' => array( + 'path' => 'files/{fileId}/parents', + 'httpMethod' => 'POST', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ),'list' => array( + 'path' => 'files/{fileId}/parents', + 'httpMethod' => 'GET', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ), + ) + ) + ); + $this->permissions = new Google_Service_Drive_Permissions_Resource( + $this, + $this->serviceName, + 'permissions', + array( + 'methods' => array( + 'delete' => array( + 'path' => 'files/{fileId}/permissions/{permissionId}', + 'httpMethod' => 'DELETE', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'permissionId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ),'get' => array( + 'path' => 'files/{fileId}/permissions/{permissionId}', + 'httpMethod' => 'GET', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'permissionId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ),'getIdForEmail' => array( + 'path' => 'permissionIds/{email}', + 'httpMethod' => 'GET', + 'parameters' => array( + 'email' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ),'insert' => array( + 'path' => 'files/{fileId}/permissions', + 'httpMethod' => 'POST', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'emailMessage' => array( + 'location' => 'query', + 'type' => 'string', + ), + 'sendNotificationEmails' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + ), + ),'list' => array( + 'path' => 'files/{fileId}/permissions', + 'httpMethod' => 'GET', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ),'patch' => array( + 'path' => 'files/{fileId}/permissions/{permissionId}', + 'httpMethod' => 'PATCH', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'permissionId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'transferOwnership' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + ), + ),'update' => array( + 'path' => 'files/{fileId}/permissions/{permissionId}', + 'httpMethod' => 'PUT', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'permissionId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'transferOwnership' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + ), + ), + ) + ) + ); + $this->properties = new Google_Service_Drive_Properties_Resource( + $this, + $this->serviceName, + 'properties', + array( + 'methods' => array( + 'delete' => array( + 'path' => 'files/{fileId}/properties/{propertyKey}', + 'httpMethod' => 'DELETE', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'propertyKey' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'visibility' => array( + 'location' => 'query', + 'type' => 'string', + ), + ), + ),'get' => array( + 'path' => 'files/{fileId}/properties/{propertyKey}', + 'httpMethod' => 'GET', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'propertyKey' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'visibility' => array( + 'location' => 'query', + 'type' => 'string', + ), + ), + ),'insert' => array( + 'path' => 'files/{fileId}/properties', + 'httpMethod' => 'POST', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ),'list' => array( + 'path' => 'files/{fileId}/properties', + 'httpMethod' => 'GET', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ),'patch' => array( + 'path' => 'files/{fileId}/properties/{propertyKey}', + 'httpMethod' => 'PATCH', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'propertyKey' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'visibility' => array( + 'location' => 'query', + 'type' => 'string', + ), + ), + ),'update' => array( + 'path' => 'files/{fileId}/properties/{propertyKey}', + 'httpMethod' => 'PUT', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'propertyKey' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'visibility' => array( + 'location' => 'query', + 'type' => 'string', + ), + ), + ), + ) + ) + ); + $this->realtime = new Google_Service_Drive_Realtime_Resource( + $this, + $this->serviceName, + 'realtime', + array( + 'methods' => array( + 'get' => array( + 'path' => 'files/{fileId}/realtime', + 'httpMethod' => 'GET', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'revision' => array( + 'location' => 'query', + 'type' => 'integer', + ), + ), + ),'update' => array( + 'path' => 'files/{fileId}/realtime', + 'httpMethod' => 'PUT', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'baseRevision' => array( + 'location' => 'query', + 'type' => 'string', + ), + ), + ), + ) + ) + ); + $this->replies = new Google_Service_Drive_Replies_Resource( + $this, + $this->serviceName, + 'replies', + array( + 'methods' => array( + 'delete' => array( + 'path' => 'files/{fileId}/comments/{commentId}/replies/{replyId}', + 'httpMethod' => 'DELETE', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'commentId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'replyId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ),'get' => array( + 'path' => 'files/{fileId}/comments/{commentId}/replies/{replyId}', + 'httpMethod' => 'GET', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'commentId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'replyId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'includeDeleted' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + ), + ),'insert' => array( + 'path' => 'files/{fileId}/comments/{commentId}/replies', + 'httpMethod' => 'POST', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'commentId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ),'list' => array( + 'path' => 'files/{fileId}/comments/{commentId}/replies', + 'httpMethod' => 'GET', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'commentId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'pageToken' => array( + 'location' => 'query', + 'type' => 'string', + ), + 'includeDeleted' => array( + 'location' => 'query', + 'type' => 'boolean', + ), + 'maxResults' => array( + 'location' => 'query', + 'type' => 'integer', + ), + ), + ),'patch' => array( + 'path' => 'files/{fileId}/comments/{commentId}/replies/{replyId}', + 'httpMethod' => 'PATCH', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'commentId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'replyId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ),'update' => array( + 'path' => 'files/{fileId}/comments/{commentId}/replies/{replyId}', + 'httpMethod' => 'PUT', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'commentId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'replyId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ), + ) + ) + ); + $this->revisions = new Google_Service_Drive_Revisions_Resource( + $this, + $this->serviceName, + 'revisions', + array( + 'methods' => array( + 'delete' => array( + 'path' => 'files/{fileId}/revisions/{revisionId}', + 'httpMethod' => 'DELETE', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'revisionId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ),'get' => array( + 'path' => 'files/{fileId}/revisions/{revisionId}', + 'httpMethod' => 'GET', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'revisionId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ),'list' => array( + 'path' => 'files/{fileId}/revisions', + 'httpMethod' => 'GET', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ),'patch' => array( + 'path' => 'files/{fileId}/revisions/{revisionId}', + 'httpMethod' => 'PATCH', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'revisionId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ),'update' => array( + 'path' => 'files/{fileId}/revisions/{revisionId}', + 'httpMethod' => 'PUT', + 'parameters' => array( + 'fileId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + 'revisionId' => array( + 'location' => 'path', + 'type' => 'string', + 'required' => true, + ), + ), + ), + ) + ) + ); + } +} + + +/** + * The "about" collection of methods. + * Typical usage is: + * <code> + * $driveService = new Google_Service_Drive(...); + * $about = $driveService->about; + * </code> + */ +class Google_Service_Drive_About_Resource extends Google_Service_Resource +{ + + /** + * Gets the information about the current user along with Drive API settings + * (about.get) + * + * @param array $optParams Optional parameters. + * + * @opt_param bool includeSubscribed + * When calculating the number of remaining change IDs, whether to include public files the user + * has opened and shared files. When set to false, this counts only change IDs for owned files and + * any shared or public files that the user has explicitly added to a folder they own. + * @opt_param string maxChangeIdCount + * Maximum number of remaining change IDs to count + * @opt_param string startChangeId + * Change ID to start counting from when calculating number of remaining change IDs + * @return Google_Service_Drive_About + */ + public function get($optParams = array()) + { + $params = array(); + $params = array_merge($params, $optParams); + return $this->call('get', array($params), "Google_Service_Drive_About"); + } +} + +/** + * The "apps" collection of methods. + * Typical usage is: + * <code> + * $driveService = new Google_Service_Drive(...); + * $apps = $driveService->apps; + * </code> + */ +class Google_Service_Drive_Apps_Resource extends Google_Service_Resource +{ + + /** + * Gets a specific app. (apps.get) + * + * @param string $appId + * The ID of the app. + * @param array $optParams Optional parameters. + * @return Google_Service_Drive_App + */ + public function get($appId, $optParams = array()) + { + $params = array('appId' => $appId); + $params = array_merge($params, $optParams); + return $this->call('get', array($params), "Google_Service_Drive_App"); + } + /** + * Lists a user's installed apps. (apps.listApps) + * + * @param array $optParams Optional parameters. + * + * @opt_param string languageCode + * A language or locale code, as defined by BCP 47, with some extensions from Unicode's LDML format + * (http://www.unicode.org/reports/tr35/). + * @opt_param string appFilterExtensions + * A comma-separated list of file extensions for open with filtering. All apps within the given app + * query scope which can open any of the given file extensions will be included in the response. If + * appFilterMimeTypes are provided as well, the result is a union of the two resulting app lists. + * @opt_param string appFilterMimeTypes + * A comma-separated list of MIME types for open with filtering. All apps within the given app + * query scope which can open any of the given MIME types will be included in the response. If + * appFilterExtensions are provided as well, the result is a union of the two resulting app lists. + * @return Google_Service_Drive_AppList + */ + public function listApps($optParams = array()) + { + $params = array(); + $params = array_merge($params, $optParams); + return $this->call('list', array($params), "Google_Service_Drive_AppList"); + } +} + +/** + * The "changes" collection of methods. + * Typical usage is: + * <code> + * $driveService = new Google_Service_Drive(...); + * $changes = $driveService->changes; + * </code> + */ +class Google_Service_Drive_Changes_Resource extends Google_Service_Resource +{ + + /** + * Gets a specific change. (changes.get) + * + * @param string $changeId + * The ID of the change. + * @param array $optParams Optional parameters. + * @return Google_Service_Drive_Change + */ + public function get($changeId, $optParams = array()) + { + $params = array('changeId' => $changeId); + $params = array_merge($params, $optParams); + return $this->call('get', array($params), "Google_Service_Drive_Change"); + } + /** + * Lists the changes for a user. (changes.listChanges) + * + * @param array $optParams Optional parameters. + * + * @opt_param bool includeSubscribed + * Whether to include public files the user has opened and shared files. When set to false, the + * list only includes owned files plus any shared or public files the user has explicitly added to + * a folder they own. + * @opt_param string startChangeId + * Change ID to start listing changes from. + * @opt_param bool includeDeleted + * Whether to include deleted items. + * @opt_param int maxResults + * Maximum number of changes to return. + * @opt_param string pageToken + * Page token for changes. + * @return Google_Service_Drive_ChangeList + */ + public function listChanges($optParams = array()) + { + $params = array(); + $params = array_merge($params, $optParams); + return $this->call('list', array($params), "Google_Service_Drive_ChangeList"); + } + /** + * Subscribe to changes for a user. (changes.watch) + * + * @param Google_Channel $postBody + * @param array $optParams Optional parameters. + * + * @opt_param bool includeSubscribed + * Whether to include public files the user has opened and shared files. When set to false, the + * list only includes owned files plus any shared or public files the user has explicitly added to + * a folder they own. + * @opt_param string startChangeId + * Change ID to start listing changes from. + * @opt_param bool includeDeleted + * Whether to include deleted items. + * @opt_param int maxResults + * Maximum number of changes to return. + * @opt_param string pageToken + * Page token for changes. + * @return Google_Service_Drive_Channel + */ + public function watch(Google_Service_Drive_Channel $postBody, $optParams = array()) + { + $params = array('postBody' => $postBody); + $params = array_merge($params, $optParams); + return $this->call('watch', array($params), "Google_Service_Drive_Channel"); + } +} + +/** + * The "channels" collection of methods. + * Typical usage is: + * <code> + * $driveService = new Google_Service_Drive(...); + * $channels = $driveService->channels; + * </code> + */ +class Google_Service_Drive_Channels_Resource extends Google_Service_Resource +{ + + /** + * Stop watching resources through this channel (channels.stop) + * + * @param Google_Channel $postBody + * @param array $optParams Optional parameters. + */ + public function stop(Google_Service_Drive_Channel $postBody, $optParams = array()) + { + $params = array('postBody' => $postBody); + $params = array_merge($params, $optParams); + return $this->call('stop', array($params)); + } +} + +/** + * The "children" collection of methods. + * Typical usage is: + * <code> + * $driveService = new Google_Service_Drive(...); + * $children = $driveService->children; + * </code> + */ +class Google_Service_Drive_Children_Resource extends Google_Service_Resource +{ + + /** + * Removes a child from a folder. (children.delete) + * + * @param string $folderId + * The ID of the folder. + * @param string $childId + * The ID of the child. + * @param array $optParams Optional parameters. + */ + public function delete($folderId, $childId, $optParams = array()) + { + $params = array('folderId' => $folderId, 'childId' => $childId); + $params = array_merge($params, $optParams); + return $this->call('delete', array($params)); + } + /** + * Gets a specific child reference. (children.get) + * + * @param string $folderId + * The ID of the folder. + * @param string $childId + * The ID of the child. + * @param array $optParams Optional parameters. + * @return Google_Service_Drive_ChildReference + */ + public function get($folderId, $childId, $optParams = array()) + { + $params = array('folderId' => $folderId, 'childId' => $childId); + $params = array_merge($params, $optParams); + return $this->call('get', array($params), "Google_Service_Drive_ChildReference"); + } + /** + * Inserts a file into a folder. (children.insert) + * + * @param string $folderId + * The ID of the folder. + * @param Google_ChildReference $postBody + * @param array $optParams Optional parameters. + * @return Google_Service_Drive_ChildReference + */ + public function insert($folderId, Google_Service_Drive_ChildReference $postBody, $optParams = array()) + { + $params = array('folderId' => $folderId, 'postBody' => $postBody); + $params = array_merge($params, $optParams); + return $this->call('insert', array($params), "Google_Service_Drive_ChildReference"); + } + /** + * Lists a folder's children. (children.listChildren) + * + * @param string $folderId + * The ID of the folder. + * @param array $optParams Optional parameters. + * + * @opt_param string q + * Query string for searching children. + * @opt_param string pageToken + * Page token for children. + * @opt_param int maxResults + * Maximum number of children to return. + * @return Google_Service_Drive_ChildList + */ + public function listChildren($folderId, $optParams = array()) + { + $params = array('folderId' => $folderId); + $params = array_merge($params, $optParams); + return $this->call('list', array($params), "Google_Service_Drive_ChildList"); + } +} + +/** + * The "comments" collection of methods. + * Typical usage is: + * <code> + * $driveService = new Google_Service_Drive(...); + * $comments = $driveService->comments; + * </code> + */ +class Google_Service_Drive_Comments_Resource extends Google_Service_Resource +{ + + /** + * Deletes a comment. (comments.delete) + * + * @param string $fileId + * The ID of the file. + * @param string $commentId + * The ID of the comment. + * @param array $optParams Optional parameters. + */ + public function delete($fileId, $commentId, $optParams = array()) + { + $params = array('fileId' => $fileId, 'commentId' => $commentId); + $params = array_merge($params, $optParams); + return $this->call('delete', array($params)); + } + /** + * Gets a comment by ID. (comments.get) + * + * @param string $fileId + * The ID of the file. + * @param string $commentId + * The ID of the comment. + * @param array $optParams Optional parameters. + * + * @opt_param bool includeDeleted + * If set, this will succeed when retrieving a deleted comment, and will include any deleted + * replies. + * @return Google_Service_Drive_Comment + */ + public function get($fileId, $commentId, $optParams = array()) + { + $params = array('fileId' => $fileId, 'commentId' => $commentId); + $params = array_merge($params, $optParams); + return $this->call('get', array($params), "Google_Service_Drive_Comment"); + } + /** + * Creates a new comment on the given file. (comments.insert) + * + * @param string $fileId + * The ID of the file. + * @param Google_Comment $postBody + * @param array $optParams Optional parameters. + * @return Google_Service_Drive_Comment + */ + public function insert($fileId, Google_Service_Drive_Comment $postBody, $optParams = array()) + { + $params = array('fileId' => $fileId, 'postBody' => $postBody); + $params = array_merge($params, $optParams); + return $this->call('insert', array($params), "Google_Service_Drive_Comment"); + } + /** + * Lists a file's comments. (comments.listComments) + * + * @param string $fileId + * The ID of the file. + * @param array $optParams Optional parameters. + * + * @opt_param string pageToken + * The continuation token, used to page through large result sets. To get the next page of results, + * set this parameter to the value of "nextPageToken" from the previous response. + * @opt_param string updatedMin + * Only discussions that were updated after this timestamp will be returned. Formatted as an RFC + * 3339 timestamp. + * @opt_param bool includeDeleted + * If set, all comments and replies, including deleted comments and replies (with content stripped) + * will be returned. + * @opt_param int maxResults + * The maximum number of discussions to include in the response, used for paging. + * @return Google_Service_Drive_CommentList + */ + public function listComments($fileId, $optParams = array()) + { + $params = array('fileId' => $fileId); + $params = array_merge($params, $optParams); + return $this->call('list', array($params), "Google_Service_Drive_CommentList"); + } + /** + * Updates an existing comment. This method supports patch semantics. + * (comments.patch) + * + * @param string $fileId + * The ID of the file. + * @param string $commentId + * The ID of the comment. + * @param Google_Comment $postBody + * @param array $optParams Optional parameters. + * @return Google_Service_Drive_Comment + */ + public function patch($fileId, $commentId, Google_Service_Drive_Comment $postBody, $optParams = array()) + { + $params = array('fileId' => $fileId, 'commentId' => $commentId, 'postBody' => $postBody); + $params = array_merge($params, $optParams); + return $this->call('patch', array($params), "Google_Service_Drive_Comment"); + } + /** + * Updates an existing comment. (comments.update) + * + * @param string $fileId + * The ID of the file. + * @param string $commentId + * The ID of the comment. + * @param Google_Comment $postBody + * @param array $optParams Optional parameters. + * @return Google_Service_Drive_Comment + */ + public function update($fileId, $commentId, Google_Service_Drive_Comment $postBody, $optParams = array()) + { + $params = array('fileId' => $fileId, 'commentId' => $commentId, 'postBody' => $postBody); + $params = array_merge($params, $optParams); + return $this->call('update', array($params), "Google_Service_Drive_Comment"); + } +} + +/** + * The "files" collection of methods. + * Typical usage is: + * <code> + * $driveService = new Google_Service_Drive(...); + * $files = $driveService->files; + * </code> + */ +class Google_Service_Drive_Files_Resource extends Google_Service_Resource +{ + + /** + * Creates a copy of the specified file. (files.copy) + * + * @param string $fileId + * The ID of the file to copy. + * @param Google_DriveFile $postBody + * @param array $optParams Optional parameters. + * + * @opt_param bool convert + * Whether to convert this file to the corresponding Google Docs format. + * @opt_param string ocrLanguage + * If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes. + * @opt_param string visibility + * The visibility of the new file. This parameter is only relevant when the source is not a native + * Google Doc and convert=false. + * @opt_param bool pinned + * Whether to pin the head revision of the new copy. A file can have a maximum of 200 pinned + * revisions. + * @opt_param bool ocr + * Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. + * @opt_param string timedTextTrackName + * The timed text track name. + * @opt_param string timedTextLanguage + * The language of the timed text. + * @return Google_Service_Drive_DriveFile + */ + public function copy($fileId, Google_Service_Drive_DriveFile $postBody, $optParams = array()) + { + $params = array('fileId' => $fileId, 'postBody' => $postBody); + $params = array_merge($params, $optParams); + return $this->call('copy', array($params), "Google_Service_Drive_DriveFile"); + } + /** + * Permanently deletes a file by ID. Skips the trash. (files.delete) + * + * @param string $fileId + * The ID of the file to delete. + * @param array $optParams Optional parameters. + */ + public function delete($fileId, $optParams = array()) + { + $params = array('fileId' => $fileId); + $params = array_merge($params, $optParams); + return $this->call('delete', array($params)); + } + /** + * Permanently deletes all of the user's trashed files. (files.emptyTrash) + * + * @param array $optParams Optional parameters. + */ + public function emptyTrash($optParams = array()) + { + $params = array(); + $params = array_merge($params, $optParams); + return $this->call('emptyTrash', array($params)); + } + /** + * Gets a file's metadata by ID. (files.get) + * + * @param string $fileId + * The ID for the file in question. + * @param array $optParams Optional parameters. + * + * @opt_param bool updateViewedDate + * Whether to update the view date after successfully retrieving the file. + * @opt_param string projection + * This parameter is deprecated and has no function. + * @return Google_Service_Drive_DriveFile + */ + public function get($fileId, $optParams = array()) + { + $params = array('fileId' => $fileId); + $params = array_merge($params, $optParams); + return $this->call('get', array($params), "Google_Service_Drive_DriveFile"); + } + /** + * Insert a new file. (files.insert) + * + * @param Google_DriveFile $postBody + * @param array $optParams Optional parameters. + * + * @opt_param bool convert + * Whether to convert this file to the corresponding Google Docs format. + * @opt_param bool useContentAsIndexableText + * Whether to use the content as indexable text. + * @opt_param string ocrLanguage + * If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes. + * @opt_param string visibility + * The visibility of the new file. This parameter is only relevant when convert=false. + * @opt_param bool pinned + * Whether to pin the head revision of the uploaded file. A file can have a maximum of 200 pinned + * revisions. + * @opt_param bool ocr + * Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. + * @opt_param string timedTextTrackName + * The timed text track name. + * @opt_param string timedTextLanguage + * The language of the timed text. + * @return Google_Service_Drive_DriveFile + */ + public function insert(Google_Service_Drive_DriveFile $postBody, $optParams = array()) + { + $params = array('postBody' => $postBody); + $params = array_merge($params, $optParams); + return $this->call('insert', array($params), "Google_Service_Drive_DriveFile"); + } + /** + * Lists the user's files. (files.listFiles) + * + * @param array $optParams Optional parameters. + * + * @opt_param string q + * Query string for searching files. + * @opt_param string pageToken + * Page token for files. + * @opt_param string corpus + * The body of items (files/documents) to which the query applies. + * @opt_param string projection + * This parameter is deprecated and has no function. + * @opt_param int maxResults + * Maximum number of files to return. + * @return Google_Service_Drive_FileList + */ + public function listFiles($optParams = array()) + { + $params = array(); + $params = array_merge($params, $optParams); + return $this->call('list', array($params), "Google_Service_Drive_FileList"); + } + /** + * Updates file metadata and/or content. This method supports patch semantics. + * (files.patch) + * + * @param string $fileId + * The ID of the file to update. + * @param Google_DriveFile $postBody + * @param array $optParams Optional parameters. + * + * @opt_param string addParents + * Comma-separated list of parent IDs to add. + * @opt_param bool updateViewedDate + * Whether to update the view date after successfully updating the file. + * @opt_param string removeParents + * Comma-separated list of parent IDs to remove. + * @opt_param bool setModifiedDate + * Whether to set the modified date with the supplied modified date. + * @opt_param bool convert + * Whether to convert this file to the corresponding Google Docs format. + * @opt_param bool useContentAsIndexableText + * Whether to use the content as indexable text. + * @opt_param string ocrLanguage + * If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes. + * @opt_param bool pinned + * Whether to pin the new revision. A file can have a maximum of 200 pinned revisions. + * @opt_param bool newRevision + * Whether a blob upload should create a new revision. If false, the blob data in the current head + * revision is replaced. If true or not set, a new blob is created as head revision, and previous + * revisions are preserved (causing increased use of the user's data storage quota). + * @opt_param bool ocr + * Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. + * @opt_param string timedTextLanguage + * The language of the timed text. + * @opt_param string timedTextTrackName + * The timed text track name. + * @return Google_Service_Drive_DriveFile + */ + public function patch($fileId, Google_Service_Drive_DriveFile $postBody, $optParams = array()) + { + $params = array('fileId' => $fileId, 'postBody' => $postBody); + $params = array_merge($params, $optParams); + return $this->call('patch', array($params), "Google_Service_Drive_DriveFile"); + } + /** + * Set the file's updated time to the current server time. (files.touch) + * + * @param string $fileId + * The ID of the file to update. + * @param array $optParams Optional parameters. + * @return Google_Service_Drive_DriveFile + */ + public function touch($fileId, $optParams = array()) + { + $params = array('fileId' => $fileId); + $params = array_merge($params, $optParams); + return $this->call('touch', array($params), "Google_Service_Drive_DriveFile"); + } + /** + * Moves a file to the trash. (files.trash) + * + * @param string $fileId + * The ID of the file to trash. + * @param array $optParams Optional parameters. + * @return Google_Service_Drive_DriveFile + */ + public function trash($fileId, $optParams = array()) + { + $params = array('fileId' => $fileId); + $params = array_merge($params, $optParams); + return $this->call('trash', array($params), "Google_Service_Drive_DriveFile"); + } + /** + * Restores a file from the trash. (files.untrash) + * + * @param string $fileId + * The ID of the file to untrash. + * @param array $optParams Optional parameters. + * @return Google_Service_Drive_DriveFile + */ + public function untrash($fileId, $optParams = array()) + { + $params = array('fileId' => $fileId); + $params = array_merge($params, $optParams); + return $this->call('untrash', array($params), "Google_Service_Drive_DriveFile"); + } + /** + * Updates file metadata and/or content. (files.update) + * + * @param string $fileId + * The ID of the file to update. + * @param Google_DriveFile $postBody + * @param array $optParams Optional parameters. + * + * @opt_param string addParents + * Comma-separated list of parent IDs to add. + * @opt_param bool updateViewedDate + * Whether to update the view date after successfully updating the file. + * @opt_param string removeParents + * Comma-separated list of parent IDs to remove. + * @opt_param bool setModifiedDate + * Whether to set the modified date with the supplied modified date. + * @opt_param bool convert + * Whether to convert this file to the corresponding Google Docs format. + * @opt_param bool useContentAsIndexableText + * Whether to use the content as indexable text. + * @opt_param string ocrLanguage + * If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes. + * @opt_param bool pinned + * Whether to pin the new revision. A file can have a maximum of 200 pinned revisions. + * @opt_param bool newRevision + * Whether a blob upload should create a new revision. If false, the blob data in the current head + * revision is replaced. If true or not set, a new blob is created as head revision, and previous + * revisions are preserved (causing increased use of the user's data storage quota). + * @opt_param bool ocr + * Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. + * @opt_param string timedTextLanguage + * The language of the timed text. + * @opt_param string timedTextTrackName + * The timed text track name. + * @return Google_Service_Drive_DriveFile + */ + public function update($fileId, Google_Service_Drive_DriveFile $postBody, $optParams = array()) + { + $params = array('fileId' => $fileId, 'postBody' => $postBody); + $params = array_merge($params, $optParams); + return $this->call('update', array($params), "Google_Service_Drive_DriveFile"); + } + /** + * Subscribe to changes on a file (files.watch) + * + * @param string $fileId + * The ID for the file in question. + * @param Google_Channel $postBody + * @param array $optParams Optional parameters. + * + * @opt_param bool updateViewedDate + * Whether to update the view date after successfully retrieving the file. + * @opt_param string projection + * This parameter is deprecated and has no function. + * @return Google_Service_Drive_Channel + */ + public function watch($fileId, Google_Service_Drive_Channel $postBody, $optParams = array()) + { + $params = array('fileId' => $fileId, 'postBody' => $postBody); + $params = array_merge($params, $optParams); + return $this->call('watch', array($params), "Google_Service_Drive_Channel"); + } +} + +/** + * The "parents" collection of methods. + * Typical usage is: + * <code> + * $driveService = new Google_Service_Drive(...); + * $parents = $driveService->parents; + * </code> + */ +class Google_Service_Drive_Parents_Resource extends Google_Service_Resource +{ + + /** + * Removes a parent from a file. (parents.delete) + * + * @param string $fileId + * The ID of the file. + * @param string $parentId + * The ID of the parent. + * @param array $optParams Optional parameters. + */ + public function delete($fileId, $parentId, $optParams = array()) + { + $params = array('fileId' => $fileId, 'parentId' => $parentId); + $params = array_merge($params, $optParams); + return $this->call('delete', array($params)); + } + /** + * Gets a specific parent reference. (parents.get) + * + * @param string $fileId + * The ID of the file. + * @param string $parentId + * The ID of the parent. + * @param array $optParams Optional parameters. + * @return Google_Service_Drive_ParentReference + */ + public function get($fileId, $parentId, $optParams = array()) + { + $params = array('fileId' => $fileId, 'parentId' => $parentId); + $params = array_merge($params, $optParams); + return $this->call('get', array($params), "Google_Service_Drive_ParentReference"); + } + /** + * Adds a parent folder for a file. (parents.insert) + * + * @param string $fileId + * The ID of the file. + * @param Google_ParentReference $postBody + * @param array $optParams Optional parameters. + * @return Google_Service_Drive_ParentReference + */ + public function insert($fileId, Google_Service_Drive_ParentReference $postBody, $optParams = array()) + { + $params = array('fileId' => $fileId, 'postBody' => $postBody); + $params = array_merge($params, $optParams); + return $this->call('insert', array($params), "Google_Service_Drive_ParentReference"); + } + /** + * Lists a file's parents. (parents.listParents) + * + * @param string $fileId + * The ID of the file. + * @param array $optParams Optional parameters. + * @return Google_Service_Drive_ParentList + */ + public function listParents($fileId, $optParams = array()) + { + $params = array('fileId' => $fileId); + $params = array_merge($params, $optParams); + return $this->call('list', array($params), "Google_Service_Drive_ParentList"); + } +} + +/** + * The "permissions" collection of methods. + * Typical usage is: + * <code> + * $driveService = new Google_Service_Drive(...); + * $permissions = $driveService->permissions; + * </code> + */ +class Google_Service_Drive_Permissions_Resource extends Google_Service_Resource +{ + + /** + * Deletes a permission from a file. (permissions.delete) + * + * @param string $fileId + * The ID for the file. + * @param string $permissionId + * The ID for the permission. + * @param array $optParams Optional parameters. + */ + public function delete($fileId, $permissionId, $optParams = array()) + { + $params = array('fileId' => $fileId, 'permissionId' => $permissionId); + $params = array_merge($params, $optParams); + return $this->call('delete', array($params)); + } + /** + * Gets a permission by ID. (permissions.get) + * + * @param string $fileId + * The ID for the file. + * @param string $permissionId + * The ID for the permission. + * @param array $optParams Optional parameters. + * @return Google_Service_Drive_Permission + */ + public function get($fileId, $permissionId, $optParams = array()) + { + $params = array('fileId' => $fileId, 'permissionId' => $permissionId); + $params = array_merge($params, $optParams); + return $this->call('get', array($params), "Google_Service_Drive_Permission"); + } + /** + * Returns the permission ID for an email address. (permissions.getIdForEmail) + * + * @param string $email + * The email address for which to return a permission ID + * @param array $optParams Optional parameters. + * @return Google_Service_Drive_PermissionId + */ + public function getIdForEmail($email, $optParams = array()) + { + $params = array('email' => $email); + $params = array_merge($params, $optParams); + return $this->call('getIdForEmail', array($params), "Google_Service_Drive_PermissionId"); + } + /** + * Inserts a permission for a file. (permissions.insert) + * + * @param string $fileId + * The ID for the file. + * @param Google_Permission $postBody + * @param array $optParams Optional parameters. + * + * @opt_param string emailMessage + * A custom message to include in notification emails. + * @opt_param bool sendNotificationEmails + * Whether to send notification emails when sharing to users or groups. This parameter is ignored + * and an email is sent if the role is owner. + * @return Google_Service_Drive_Permission + */ + public function insert($fileId, Google_Service_Drive_Permission $postBody, $optParams = array()) + { + $params = array('fileId' => $fileId, 'postBody' => $postBody); + $params = array_merge($params, $optParams); + return $this->call('insert', array($params), "Google_Service_Drive_Permission"); + } + /** + * Lists a file's permissions. (permissions.listPermissions) + * + * @param string $fileId + * The ID for the file. + * @param array $optParams Optional parameters. + * @return Google_Service_Drive_PermissionList + */ + public function listPermissions($fileId, $optParams = array()) + { + $params = array('fileId' => $fileId); + $params = array_merge($params, $optParams); + return $this->call('list', array($params), "Google_Service_Drive_PermissionList"); + } + /** + * Updates a permission. This method supports patch semantics. + * (permissions.patch) + * + * @param string $fileId + * The ID for the file. + * @param string $permissionId + * The ID for the permission. + * @param Google_Permission $postBody + * @param array $optParams Optional parameters. + * + * @opt_param bool transferOwnership + * Whether changing a role to 'owner' should also downgrade the current owners to writers. + * @return Google_Service_Drive_Permission + */ + public function patch($fileId, $permissionId, Google_Service_Drive_Permission $postBody, $optParams = array()) + { + $params = array('fileId' => $fileId, 'permissionId' => $permissionId, 'postBody' => $postBody); + $params = array_merge($params, $optParams); + return $this->call('patch', array($params), "Google_Service_Drive_Permission"); + } + /** + * Updates a permission. (permissions.update) + * + * @param string $fileId + * The ID for the file. + * @param string $permissionId + * The ID for the permission. + * @param Google_Permission $postBody + * @param array $optParams Optional parameters. + * + * @opt_param bool transferOwnership + * Whether changing a role to 'owner' should also downgrade the current owners to writers. + * @return Google_Service_Drive_Permission + */ + public function update($fileId, $permissionId, Google_Service_Drive_Permission $postBody, $optParams = array()) + { + $params = array('fileId' => $fileId, 'permissionId' => $permissionId, 'postBody' => $postBody); + $params = array_merge($params, $optParams); + return $this->call('update', array($params), "Google_Service_Drive_Permission"); + } +} + +/** + * The "properties" collection of methods. + * Typical usage is: + * <code> + * $driveService = new Google_Service_Drive(...); + * $properties = $driveService->properties; + * </code> + */ +class Google_Service_Drive_Properties_Resource extends Google_Service_Resource +{ + + /** + * Deletes a property. (properties.delete) + * + * @param string $fileId + * The ID of the file. + * @param string $propertyKey + * The key of the property. + * @param array $optParams Optional parameters. + * + * @opt_param string visibility + * The visibility of the property. + */ + public function delete($fileId, $propertyKey, $optParams = array()) + { + $params = array('fileId' => $fileId, 'propertyKey' => $propertyKey); + $params = array_merge($params, $optParams); + return $this->call('delete', array($params)); + } + /** + * Gets a property by its key. (properties.get) + * + * @param string $fileId + * The ID of the file. + * @param string $propertyKey + * The key of the property. + * @param array $optParams Optional parameters. + * + * @opt_param string visibility + * The visibility of the property. + * @return Google_Service_Drive_Property + */ + public function get($fileId, $propertyKey, $optParams = array()) + { + $params = array('fileId' => $fileId, 'propertyKey' => $propertyKey); + $params = array_merge($params, $optParams); + return $this->call('get', array($params), "Google_Service_Drive_Property"); + } + /** + * Adds a property to a file. (properties.insert) + * + * @param string $fileId + * The ID of the file. + * @param Google_Property $postBody + * @param array $optParams Optional parameters. + * @return Google_Service_Drive_Property + */ + public function insert($fileId, Google_Service_Drive_Property $postBody, $optParams = array()) + { + $params = array('fileId' => $fileId, 'postBody' => $postBody); + $params = array_merge($params, $optParams); + return $this->call('insert', array($params), "Google_Service_Drive_Property"); + } + /** + * Lists a file's properties. (properties.listProperties) + * + * @param string $fileId + * The ID of the file. + * @param array $optParams Optional parameters. + * @return Google_Service_Drive_PropertyList + */ + public function listProperties($fileId, $optParams = array()) + { + $params = array('fileId' => $fileId); + $params = array_merge($params, $optParams); + return $this->call('list', array($params), "Google_Service_Drive_PropertyList"); + } + /** + * Updates a property. This method supports patch semantics. (properties.patch) + * + * @param string $fileId + * The ID of the file. + * @param string $propertyKey + * The key of the property. + * @param Google_Property $postBody + * @param array $optParams Optional parameters. + * + * @opt_param string visibility + * The visibility of the property. + * @return Google_Service_Drive_Property + */ + public function patch($fileId, $propertyKey, Google_Service_Drive_Property $postBody, $optParams = array()) + { + $params = array('fileId' => $fileId, 'propertyKey' => $propertyKey, 'postBody' => $postBody); + $params = array_merge($params, $optParams); + return $this->call('patch', array($params), "Google_Service_Drive_Property"); + } + /** + * Updates a property. (properties.update) + * + * @param string $fileId + * The ID of the file. + * @param string $propertyKey + * The key of the property. + * @param Google_Property $postBody + * @param array $optParams Optional parameters. + * + * @opt_param string visibility + * The visibility of the property. + * @return Google_Service_Drive_Property + */ + public function update($fileId, $propertyKey, Google_Service_Drive_Property $postBody, $optParams = array()) + { + $params = array('fileId' => $fileId, 'propertyKey' => $propertyKey, 'postBody' => $postBody); + $params = array_merge($params, $optParams); + return $this->call('update', array($params), "Google_Service_Drive_Property"); + } +} + +/** + * The "realtime" collection of methods. + * Typical usage is: + * <code> + * $driveService = new Google_Service_Drive(...); + * $realtime = $driveService->realtime; + * </code> + */ +class Google_Service_Drive_Realtime_Resource extends Google_Service_Resource +{ + + /** + * Exports the contents of the Realtime API data model associated with this file + * as JSON. (realtime.get) + * + * @param string $fileId + * The ID of the file that the Realtime API data model is associated with. + * @param array $optParams Optional parameters. + * + * @opt_param int revision + * The revision of the Realtime API data model to export. Revisions start at 1 (the initial empty + * data model) and are incremented with each change. If this parameter is excluded, the most recent + * data model will be returned. + */ + public function get($fileId, $optParams = array()) + { + $params = array('fileId' => $fileId); + $params = array_merge($params, $optParams); + return $this->call('get', array($params)); + } + /** + * Overwrites the Realtime API data model associated with this file with the + * provided JSON data model. (realtime.update) + * + * @param string $fileId + * The ID of the file that the Realtime API data model is associated with. + * @param array $optParams Optional parameters. + * + * @opt_param string baseRevision + * The revision of the model to diff the uploaded model against. If set, the uploaded model is + * diffed against the provided revision and those differences are merged with any changes made to + * the model after the provided revision. If not set, the uploaded model replaces the current model + * on the server. + */ + public function update($fileId, $optParams = array()) + { + $params = array('fileId' => $fileId); + $params = array_merge($params, $optParams); + return $this->call('update', array($params)); + } +} + +/** + * The "replies" collection of methods. + * Typical usage is: + * <code> + * $driveService = new Google_Service_Drive(...); + * $replies = $driveService->replies; + * </code> + */ +class Google_Service_Drive_Replies_Resource extends Google_Service_Resource +{ + + /** + * Deletes a reply. (replies.delete) + * + * @param string $fileId + * The ID of the file. + * @param string $commentId + * The ID of the comment. + * @param string $replyId + * The ID of the reply. + * @param array $optParams Optional parameters. + */ + public function delete($fileId, $commentId, $replyId, $optParams = array()) + { + $params = array('fileId' => $fileId, 'commentId' => $commentId, 'replyId' => $replyId); + $params = array_merge($params, $optParams); + return $this->call('delete', array($params)); + } + /** + * Gets a reply. (replies.get) + * + * @param string $fileId + * The ID of the file. + * @param string $commentId + * The ID of the comment. + * @param string $replyId + * The ID of the reply. + * @param array $optParams Optional parameters. + * + * @opt_param bool includeDeleted + * If set, this will succeed when retrieving a deleted reply. + * @return Google_Service_Drive_CommentReply + */ + public function get($fileId, $commentId, $replyId, $optParams = array()) + { + $params = array('fileId' => $fileId, 'commentId' => $commentId, 'replyId' => $replyId); + $params = array_merge($params, $optParams); + return $this->call('get', array($params), "Google_Service_Drive_CommentReply"); + } + /** + * Creates a new reply to the given comment. (replies.insert) + * + * @param string $fileId + * The ID of the file. + * @param string $commentId + * The ID of the comment. + * @param Google_CommentReply $postBody + * @param array $optParams Optional parameters. + * @return Google_Service_Drive_CommentReply + */ + public function insert($fileId, $commentId, Google_Service_Drive_CommentReply $postBody, $optParams = array()) + { + $params = array('fileId' => $fileId, 'commentId' => $commentId, 'postBody' => $postBody); + $params = array_merge($params, $optParams); + return $this->call('insert', array($params), "Google_Service_Drive_CommentReply"); + } + /** + * Lists all of the replies to a comment. (replies.listReplies) + * + * @param string $fileId + * The ID of the file. + * @param string $commentId + * The ID of the comment. + * @param array $optParams Optional parameters. + * + * @opt_param string pageToken + * The continuation token, used to page through large result sets. To get the next page of results, + * set this parameter to the value of "nextPageToken" from the previous response. + * @opt_param bool includeDeleted + * If set, all replies, including deleted replies (with content stripped) will be returned. + * @opt_param int maxResults + * The maximum number of replies to include in the response, used for paging. + * @return Google_Service_Drive_CommentReplyList + */ + public function listReplies($fileId, $commentId, $optParams = array()) + { + $params = array('fileId' => $fileId, 'commentId' => $commentId); + $params = array_merge($params, $optParams); + return $this->call('list', array($params), "Google_Service_Drive_CommentReplyList"); + } + /** + * Updates an existing reply. This method supports patch semantics. + * (replies.patch) + * + * @param string $fileId + * The ID of the file. + * @param string $commentId + * The ID of the comment. + * @param string $replyId + * The ID of the reply. + * @param Google_CommentReply $postBody + * @param array $optParams Optional parameters. + * @return Google_Service_Drive_CommentReply + */ + public function patch($fileId, $commentId, $replyId, Google_Service_Drive_CommentReply $postBody, $optParams = array()) + { + $params = array('fileId' => $fileId, 'commentId' => $commentId, 'replyId' => $replyId, 'postBody' => $postBody); + $params = array_merge($params, $optParams); + return $this->call('patch', array($params), "Google_Service_Drive_CommentReply"); + } + /** + * Updates an existing reply. (replies.update) + * + * @param string $fileId + * The ID of the file. + * @param string $commentId + * The ID of the comment. + * @param string $replyId + * The ID of the reply. + * @param Google_CommentReply $postBody + * @param array $optParams Optional parameters. + * @return Google_Service_Drive_CommentReply + */ + public function update($fileId, $commentId, $replyId, Google_Service_Drive_CommentReply $postBody, $optParams = array()) + { + $params = array('fileId' => $fileId, 'commentId' => $commentId, 'replyId' => $replyId, 'postBody' => $postBody); + $params = array_merge($params, $optParams); + return $this->call('update', array($params), "Google_Service_Drive_CommentReply"); + } +} + +/** + * The "revisions" collection of methods. + * Typical usage is: + * <code> + * $driveService = new Google_Service_Drive(...); + * $revisions = $driveService->revisions; + * </code> + */ +class Google_Service_Drive_Revisions_Resource extends Google_Service_Resource +{ + + /** + * Removes a revision. (revisions.delete) + * + * @param string $fileId + * The ID of the file. + * @param string $revisionId + * The ID of the revision. + * @param array $optParams Optional parameters. + */ + public function delete($fileId, $revisionId, $optParams = array()) + { + $params = array('fileId' => $fileId, 'revisionId' => $revisionId); + $params = array_merge($params, $optParams); + return $this->call('delete', array($params)); + } + /** + * Gets a specific revision. (revisions.get) + * + * @param string $fileId + * The ID of the file. + * @param string $revisionId + * The ID of the revision. + * @param array $optParams Optional parameters. + * @return Google_Service_Drive_Revision + */ + public function get($fileId, $revisionId, $optParams = array()) + { + $params = array('fileId' => $fileId, 'revisionId' => $revisionId); + $params = array_merge($params, $optParams); + return $this->call('get', array($params), "Google_Service_Drive_Revision"); + } + /** + * Lists a file's revisions. (revisions.listRevisions) + * + * @param string $fileId + * The ID of the file. + * @param array $optParams Optional parameters. + * @return Google_Service_Drive_RevisionList + */ + public function listRevisions($fileId, $optParams = array()) + { + $params = array('fileId' => $fileId); + $params = array_merge($params, $optParams); + return $this->call('list', array($params), "Google_Service_Drive_RevisionList"); + } + /** + * Updates a revision. This method supports patch semantics. (revisions.patch) + * + * @param string $fileId + * The ID for the file. + * @param string $revisionId + * The ID for the revision. + * @param Google_Revision $postBody + * @param array $optParams Optional parameters. + * @return Google_Service_Drive_Revision + */ + public function patch($fileId, $revisionId, Google_Service_Drive_Revision $postBody, $optParams = array()) + { + $params = array('fileId' => $fileId, 'revisionId' => $revisionId, 'postBody' => $postBody); + $params = array_merge($params, $optParams); + return $this->call('patch', array($params), "Google_Service_Drive_Revision"); + } + /** + * Updates a revision. (revisions.update) + * + * @param string $fileId + * The ID for the file. + * @param string $revisionId + * The ID for the revision. + * @param Google_Revision $postBody + * @param array $optParams Optional parameters. + * @return Google_Service_Drive_Revision + */ + public function update($fileId, $revisionId, Google_Service_Drive_Revision $postBody, $optParams = array()) + { + $params = array('fileId' => $fileId, 'revisionId' => $revisionId, 'postBody' => $postBody); + $params = array_merge($params, $optParams); + return $this->call('update', array($params), "Google_Service_Drive_Revision"); + } +} + + + + +class Google_Service_Drive_About extends Google_Collection +{ + protected $collection_key = 'quotaBytesByService'; + protected $internal_gapi_mappings = array( + ); + protected $additionalRoleInfoType = 'Google_Service_Drive_AboutAdditionalRoleInfo'; + protected $additionalRoleInfoDataType = 'array'; + public $domainSharingPolicy; + public $etag; + protected $exportFormatsType = 'Google_Service_Drive_AboutExportFormats'; + protected $exportFormatsDataType = 'array'; + protected $featuresType = 'Google_Service_Drive_AboutFeatures'; + protected $featuresDataType = 'array'; + protected $importFormatsType = 'Google_Service_Drive_AboutImportFormats'; + protected $importFormatsDataType = 'array'; + public $isCurrentAppInstalled; + public $kind; + public $languageCode; + public $largestChangeId; + protected $maxUploadSizesType = 'Google_Service_Drive_AboutMaxUploadSizes'; + protected $maxUploadSizesDataType = 'array'; + public $name; + public $permissionId; + protected $quotaBytesByServiceType = 'Google_Service_Drive_AboutQuotaBytesByService'; + protected $quotaBytesByServiceDataType = 'array'; + public $quotaBytesTotal; + public $quotaBytesUsed; + public $quotaBytesUsedAggregate; + public $quotaBytesUsedInTrash; + public $quotaType; + public $remainingChangeIds; + public $rootFolderId; + public $selfLink; + protected $userType = 'Google_Service_Drive_User'; + protected $userDataType = ''; + + public function setAdditionalRoleInfo($additionalRoleInfo) + { + $this->additionalRoleInfo = $additionalRoleInfo; + } + + public function getAdditionalRoleInfo() + { + return $this->additionalRoleInfo; + } + + public function setDomainSharingPolicy($domainSharingPolicy) + { + $this->domainSharingPolicy = $domainSharingPolicy; + } + + public function getDomainSharingPolicy() + { + return $this->domainSharingPolicy; + } + + public function setEtag($etag) + { + $this->etag = $etag; + } + + public function getEtag() + { + return $this->etag; + } + + public function setExportFormats($exportFormats) + { + $this->exportFormats = $exportFormats; + } + + public function getExportFormats() + { + return $this->exportFormats; + } + + public function setFeatures($features) + { + $this->features = $features; + } + + public function getFeatures() + { + return $this->features; + } + + public function setImportFormats($importFormats) + { + $this->importFormats = $importFormats; + } + + public function getImportFormats() + { + return $this->importFormats; + } + + public function setIsCurrentAppInstalled($isCurrentAppInstalled) + { + $this->isCurrentAppInstalled = $isCurrentAppInstalled; + } + + public function getIsCurrentAppInstalled() + { + return $this->isCurrentAppInstalled; + } + + public function setKind($kind) + { + $this->kind = $kind; + } + + public function getKind() + { + return $this->kind; + } + + public function setLanguageCode($languageCode) + { + $this->languageCode = $languageCode; + } + + public function getLanguageCode() + { + return $this->languageCode; + } + + public function setLargestChangeId($largestChangeId) + { + $this->largestChangeId = $largestChangeId; + } + + public function getLargestChangeId() + { + return $this->largestChangeId; + } + + public function setMaxUploadSizes($maxUploadSizes) + { + $this->maxUploadSizes = $maxUploadSizes; + } + + public function getMaxUploadSizes() + { + return $this->maxUploadSizes; + } + + public function setName($name) + { + $this->name = $name; + } + + public function getName() + { + return $this->name; + } + + public function setPermissionId($permissionId) + { + $this->permissionId = $permissionId; + } + + public function getPermissionId() + { + return $this->permissionId; + } + + public function setQuotaBytesByService($quotaBytesByService) + { + $this->quotaBytesByService = $quotaBytesByService; + } + + public function getQuotaBytesByService() + { + return $this->quotaBytesByService; + } + + public function setQuotaBytesTotal($quotaBytesTotal) + { + $this->quotaBytesTotal = $quotaBytesTotal; + } + + public function getQuotaBytesTotal() + { + return $this->quotaBytesTotal; + } + + public function setQuotaBytesUsed($quotaBytesUsed) + { + $this->quotaBytesUsed = $quotaBytesUsed; + } + + public function getQuotaBytesUsed() + { + return $this->quotaBytesUsed; + } + + public function setQuotaBytesUsedAggregate($quotaBytesUsedAggregate) + { + $this->quotaBytesUsedAggregate = $quotaBytesUsedAggregate; + } + + public function getQuotaBytesUsedAggregate() + { + return $this->quotaBytesUsedAggregate; + } + + public function setQuotaBytesUsedInTrash($quotaBytesUsedInTrash) + { + $this->quotaBytesUsedInTrash = $quotaBytesUsedInTrash; + } + + public function getQuotaBytesUsedInTrash() + { + return $this->quotaBytesUsedInTrash; + } + + public function setQuotaType($quotaType) + { + $this->quotaType = $quotaType; + } + + public function getQuotaType() + { + return $this->quotaType; + } + + public function setRemainingChangeIds($remainingChangeIds) + { + $this->remainingChangeIds = $remainingChangeIds; + } + + public function getRemainingChangeIds() + { + return $this->remainingChangeIds; + } + + public function setRootFolderId($rootFolderId) + { + $this->rootFolderId = $rootFolderId; + } + + public function getRootFolderId() + { + return $this->rootFolderId; + } + + public function setSelfLink($selfLink) + { + $this->selfLink = $selfLink; + } + + public function getSelfLink() + { + return $this->selfLink; + } + + public function setUser(Google_Service_Drive_User $user) + { + $this->user = $user; + } + + public function getUser() + { + return $this->user; + } +} + +class Google_Service_Drive_AboutAdditionalRoleInfo extends Google_Collection +{ + protected $collection_key = 'roleSets'; + protected $internal_gapi_mappings = array( + ); + protected $roleSetsType = 'Google_Service_Drive_AboutAdditionalRoleInfoRoleSets'; + protected $roleSetsDataType = 'array'; + public $type; + + public function setRoleSets($roleSets) + { + $this->roleSets = $roleSets; + } + + public function getRoleSets() + { + return $this->roleSets; + } + + public function setType($type) + { + $this->type = $type; + } + + public function getType() + { + return $this->type; + } +} + +class Google_Service_Drive_AboutAdditionalRoleInfoRoleSets extends Google_Collection +{ + protected $collection_key = 'additionalRoles'; + protected $internal_gapi_mappings = array( + ); + public $additionalRoles; + public $primaryRole; + + public function setAdditionalRoles($additionalRoles) + { + $this->additionalRoles = $additionalRoles; + } + + public function getAdditionalRoles() + { + return $this->additionalRoles; + } + + public function setPrimaryRole($primaryRole) + { + $this->primaryRole = $primaryRole; + } + + public function getPrimaryRole() + { + return $this->primaryRole; + } +} + +class Google_Service_Drive_AboutExportFormats extends Google_Collection +{ + protected $collection_key = 'targets'; + protected $internal_gapi_mappings = array( + ); + public $source; + public $targets; + + public function setSource($source) + { + $this->source = $source; + } + + public function getSource() + { + return $this->source; + } + + public function setTargets($targets) + { + $this->targets = $targets; + } + + public function getTargets() + { + return $this->targets; + } +} + +class Google_Service_Drive_AboutFeatures extends Google_Model +{ + protected $internal_gapi_mappings = array( + ); + public $featureName; + public $featureRate; + + public function setFeatureName($featureName) + { + $this->featureName = $featureName; + } + + public function getFeatureName() + { + return $this->featureName; + } + + public function setFeatureRate($featureRate) + { + $this->featureRate = $featureRate; + } + + public function getFeatureRate() + { + return $this->featureRate; + } +} + +class Google_Service_Drive_AboutImportFormats extends Google_Collection +{ + protected $collection_key = 'targets'; + protected $internal_gapi_mappings = array( + ); + public $source; + public $targets; + + public function setSource($source) + { + $this->source = $source; + } + + public function getSource() + { + return $this->source; + } + + public function setTargets($targets) + { + $this->targets = $targets; + } + + public function getTargets() + { + return $this->targets; + } +} + +class Google_Service_Drive_AboutMaxUploadSizes extends Google_Model +{ + protected $internal_gapi_mappings = array( + ); + public $size; + public $type; + + public function setSize($size) + { + $this->size = $size; + } + + public function getSize() + { + return $this->size; + } + + public function setType($type) + { + $this->type = $type; + } + + public function getType() + { + return $this->type; + } +} + +class Google_Service_Drive_AboutQuotaBytesByService extends Google_Model +{ + protected $internal_gapi_mappings = array( + ); + public $bytesUsed; + public $serviceName; + + public function setBytesUsed($bytesUsed) + { + $this->bytesUsed = $bytesUsed; + } + + public function getBytesUsed() + { + return $this->bytesUsed; + } + + public function setServiceName($serviceName) + { + $this->serviceName = $serviceName; + } + + public function getServiceName() + { + return $this->serviceName; + } +} + +class Google_Service_Drive_App extends Google_Collection +{ + protected $collection_key = 'secondaryMimeTypes'; + protected $internal_gapi_mappings = array( + ); + public $authorized; + public $createInFolderTemplate; + public $createUrl; + public $hasDriveWideScope; + protected $iconsType = 'Google_Service_Drive_AppIcons'; + protected $iconsDataType = 'array'; + public $id; + public $installed; + public $kind; + public $longDescription; + public $name; + public $objectType; + public $openUrlTemplate; + public $primaryFileExtensions; + public $primaryMimeTypes; + public $productId; + public $productUrl; + public $secondaryFileExtensions; + public $secondaryMimeTypes; + public $shortDescription; + public $supportsCreate; + public $supportsImport; + public $supportsMultiOpen; + public $supportsOfflineCreate; + public $useByDefault; + + public function setAuthorized($authorized) + { + $this->authorized = $authorized; + } + + public function getAuthorized() + { + return $this->authorized; + } + + public function setCreateInFolderTemplate($createInFolderTemplate) + { + $this->createInFolderTemplate = $createInFolderTemplate; + } + + public function getCreateInFolderTemplate() + { + return $this->createInFolderTemplate; + } + + public function setCreateUrl($createUrl) + { + $this->createUrl = $createUrl; + } + + public function getCreateUrl() + { + return $this->createUrl; + } + + public function setHasDriveWideScope($hasDriveWideScope) + { + $this->hasDriveWideScope = $hasDriveWideScope; + } + + public function getHasDriveWideScope() + { + return $this->hasDriveWideScope; + } + + public function setIcons($icons) + { + $this->icons = $icons; + } + + public function getIcons() + { + return $this->icons; + } + + public function setId($id) + { + $this->id = $id; + } + + public function getId() + { + return $this->id; + } + + public function setInstalled($installed) + { + $this->installed = $installed; + } + + public function getInstalled() + { + return $this->installed; + } + + public function setKind($kind) + { + $this->kind = $kind; + } + + public function getKind() + { + return $this->kind; + } + + public function setLongDescription($longDescription) + { + $this->longDescription = $longDescription; + } + + public function getLongDescription() + { + return $this->longDescription; + } + + public function setName($name) + { + $this->name = $name; + } + + public function getName() + { + return $this->name; + } + + public function setObjectType($objectType) + { + $this->objectType = $objectType; + } + + public function getObjectType() + { + return $this->objectType; + } + + public function setOpenUrlTemplate($openUrlTemplate) + { + $this->openUrlTemplate = $openUrlTemplate; + } + + public function getOpenUrlTemplate() + { + return $this->openUrlTemplate; + } + + public function setPrimaryFileExtensions($primaryFileExtensions) + { + $this->primaryFileExtensions = $primaryFileExtensions; + } + + public function getPrimaryFileExtensions() + { + return $this->primaryFileExtensions; + } + + public function setPrimaryMimeTypes($primaryMimeTypes) + { + $this->primaryMimeTypes = $primaryMimeTypes; + } + + public function getPrimaryMimeTypes() + { + return $this->primaryMimeTypes; + } + + public function setProductId($productId) + { + $this->productId = $productId; + } + + public function getProductId() + { + return $this->productId; + } + + public function setProductUrl($productUrl) + { + $this->productUrl = $productUrl; + } + + public function getProductUrl() + { + return $this->productUrl; + } + + public function setSecondaryFileExtensions($secondaryFileExtensions) + { + $this->secondaryFileExtensions = $secondaryFileExtensions; + } + + public function getSecondaryFileExtensions() + { + return $this->secondaryFileExtensions; + } + + public function setSecondaryMimeTypes($secondaryMimeTypes) + { + $this->secondaryMimeTypes = $secondaryMimeTypes; + } + + public function getSecondaryMimeTypes() + { + return $this->secondaryMimeTypes; + } + + public function setShortDescription($shortDescription) + { + $this->shortDescription = $shortDescription; + } + + public function getShortDescription() + { + return $this->shortDescription; + } + + public function setSupportsCreate($supportsCreate) + { + $this->supportsCreate = $supportsCreate; + } + + public function getSupportsCreate() + { + return $this->supportsCreate; + } + + public function setSupportsImport($supportsImport) + { + $this->supportsImport = $supportsImport; + } + + public function getSupportsImport() + { + return $this->supportsImport; + } + + public function setSupportsMultiOpen($supportsMultiOpen) + { + $this->supportsMultiOpen = $supportsMultiOpen; + } + + public function getSupportsMultiOpen() + { + return $this->supportsMultiOpen; + } + + public function setSupportsOfflineCreate($supportsOfflineCreate) + { + $this->supportsOfflineCreate = $supportsOfflineCreate; + } + + public function getSupportsOfflineCreate() + { + return $this->supportsOfflineCreate; + } + + public function setUseByDefault($useByDefault) + { + $this->useByDefault = $useByDefault; + } + + public function getUseByDefault() + { + return $this->useByDefault; + } +} + +class Google_Service_Drive_AppIcons extends Google_Model +{ + protected $internal_gapi_mappings = array( + ); + public $category; + public $iconUrl; + public $size; + + public function setCategory($category) + { + $this->category = $category; + } + + public function getCategory() + { + return $this->category; + } + + public function setIconUrl($iconUrl) + { + $this->iconUrl = $iconUrl; + } + + public function getIconUrl() + { + return $this->iconUrl; + } + + public function setSize($size) + { + $this->size = $size; + } + + public function getSize() + { + return $this->size; + } +} + +class Google_Service_Drive_AppList extends Google_Collection +{ + protected $collection_key = 'items'; + protected $internal_gapi_mappings = array( + ); + public $defaultAppIds; + public $etag; + protected $itemsType = 'Google_Service_Drive_App'; + protected $itemsDataType = 'array'; + public $kind; + public $selfLink; + + public function setDefaultAppIds($defaultAppIds) + { + $this->defaultAppIds = $defaultAppIds; + } + + public function getDefaultAppIds() + { + return $this->defaultAppIds; + } + + public function setEtag($etag) + { + $this->etag = $etag; + } + + public function getEtag() + { + return $this->etag; + } + + public function setItems($items) + { + $this->items = $items; + } + + public function getItems() + { + return $this->items; + } + + public function setKind($kind) + { + $this->kind = $kind; + } + + public function getKind() + { + return $this->kind; + } + + public function setSelfLink($selfLink) + { + $this->selfLink = $selfLink; + } + + public function getSelfLink() + { + return $this->selfLink; + } +} + +class Google_Service_Drive_Change extends Google_Model +{ + protected $internal_gapi_mappings = array( + ); + public $deleted; + protected $fileType = 'Google_Service_Drive_DriveFile'; + protected $fileDataType = ''; + public $fileId; + public $id; + public $kind; + public $modificationDate; + public $selfLink; + + public function setDeleted($deleted) + { + $this->deleted = $deleted; + } + + public function getDeleted() + { + return $this->deleted; + } + + public function setFile(Google_Service_Drive_DriveFile $file) + { + $this->file = $file; + } + + public function getFile() + { + return $this->file; + } + + public function setFileId($fileId) + { + $this->fileId = $fileId; + } + + public function getFileId() + { + return $this->fileId; + } + + public function setId($id) + { + $this->id = $id; + } + + public function getId() + { + return $this->id; + } + + public function setKind($kind) + { + $this->kind = $kind; + } + + public function getKind() + { + return $this->kind; + } + + public function setModificationDate($modificationDate) + { + $this->modificationDate = $modificationDate; + } + + public function getModificationDate() + { + return $this->modificationDate; + } + + public function setSelfLink($selfLink) + { + $this->selfLink = $selfLink; + } + + public function getSelfLink() + { + return $this->selfLink; + } +} + +class Google_Service_Drive_ChangeList extends Google_Collection +{ + protected $collection_key = 'items'; + protected $internal_gapi_mappings = array( + ); + public $etag; + protected $itemsType = 'Google_Service_Drive_Change'; + protected $itemsDataType = 'array'; + public $kind; + public $largestChangeId; + public $nextLink; + public $nextPageToken; + public $selfLink; + + public function setEtag($etag) + { + $this->etag = $etag; + } + + public function getEtag() + { + return $this->etag; + } + + public function setItems($items) + { + $this->items = $items; + } + + public function getItems() + { + return $this->items; + } + + public function setKind($kind) + { + $this->kind = $kind; + } + + public function getKind() + { + return $this->kind; + } + + public function setLargestChangeId($largestChangeId) + { + $this->largestChangeId = $largestChangeId; + } + + public function getLargestChangeId() + { + return $this->largestChangeId; + } + + public function setNextLink($nextLink) + { + $this->nextLink = $nextLink; + } + + public function getNextLink() + { + return $this->nextLink; + } + + public function setNextPageToken($nextPageToken) + { + $this->nextPageToken = $nextPageToken; + } + + public function getNextPageToken() + { + return $this->nextPageToken; + } + + public function setSelfLink($selfLink) + { + $this->selfLink = $selfLink; + } + + public function getSelfLink() + { + return $this->selfLink; + } +} + +class Google_Service_Drive_Channel extends Google_Model +{ + protected $internal_gapi_mappings = array( + ); + public $address; + public $expiration; + public $id; + public $kind; + public $params; + public $payload; + public $resourceId; + public $resourceUri; + public $token; + public $type; + + public function setAddress($address) + { + $this->address = $address; + } + + public function getAddress() + { + return $this->address; + } + + public function setExpiration($expiration) + { + $this->expiration = $expiration; + } + + public function getExpiration() + { + return $this->expiration; + } + + public function setId($id) + { + $this->id = $id; + } + + public function getId() + { + return $this->id; + } + + public function setKind($kind) + { + $this->kind = $kind; + } + + public function getKind() + { + return $this->kind; + } + + public function setParams($params) + { + $this->params = $params; + } + + public function getParams() + { + return $this->params; + } + + public function setPayload($payload) + { + $this->payload = $payload; + } + + public function getPayload() + { + return $this->payload; + } + + public function setResourceId($resourceId) + { + $this->resourceId = $resourceId; + } + + public function getResourceId() + { + return $this->resourceId; + } + + public function setResourceUri($resourceUri) + { + $this->resourceUri = $resourceUri; + } + + public function getResourceUri() + { + return $this->resourceUri; + } + + public function setToken($token) + { + $this->token = $token; + } + + public function getToken() + { + return $this->token; + } + + public function setType($type) + { + $this->type = $type; + } + + public function getType() + { + return $this->type; + } +} + +class Google_Service_Drive_ChannelParams extends Google_Model +{ + protected $internal_gapi_mappings = array( + ); +} + +class Google_Service_Drive_ChildList extends Google_Collection +{ + protected $collection_key = 'items'; + protected $internal_gapi_mappings = array( + ); + public $etag; + protected $itemsType = 'Google_Service_Drive_ChildReference'; + protected $itemsDataType = 'array'; + public $kind; + public $nextLink; + public $nextPageToken; + public $selfLink; + + public function setEtag($etag) + { + $this->etag = $etag; + } + + public function getEtag() + { + return $this->etag; + } + + public function setItems($items) + { + $this->items = $items; + } + + public function getItems() + { + return $this->items; + } + + public function setKind($kind) + { + $this->kind = $kind; + } + + public function getKind() + { + return $this->kind; + } + + public function setNextLink($nextLink) + { + $this->nextLink = $nextLink; + } + + public function getNextLink() + { + return $this->nextLink; + } + + public function setNextPageToken($nextPageToken) + { + $this->nextPageToken = $nextPageToken; + } + + public function getNextPageToken() + { + return $this->nextPageToken; + } + + public function setSelfLink($selfLink) + { + $this->selfLink = $selfLink; + } + + public function getSelfLink() + { + return $this->selfLink; + } +} + +class Google_Service_Drive_ChildReference extends Google_Model +{ + protected $internal_gapi_mappings = array( + ); + public $childLink; + public $id; + public $kind; + public $selfLink; + + public function setChildLink($childLink) + { + $this->childLink = $childLink; + } + + public function getChildLink() + { + return $this->childLink; + } + + public function setId($id) + { + $this->id = $id; + } + + public function getId() + { + return $this->id; + } + + public function setKind($kind) + { + $this->kind = $kind; + } + + public function getKind() + { + return $this->kind; + } + + public function setSelfLink($selfLink) + { + $this->selfLink = $selfLink; + } + + public function getSelfLink() + { + return $this->selfLink; + } +} + +class Google_Service_Drive_Comment extends Google_Collection +{ + protected $collection_key = 'replies'; + protected $internal_gapi_mappings = array( + ); + public $anchor; + protected $authorType = 'Google_Service_Drive_User'; + protected $authorDataType = ''; + public $commentId; + public $content; + protected $contextType = 'Google_Service_Drive_CommentContext'; + protected $contextDataType = ''; + public $createdDate; + public $deleted; + public $fileId; + public $fileTitle; + public $htmlContent; + public $kind; + public $modifiedDate; + protected $repliesType = 'Google_Service_Drive_CommentReply'; + protected $repliesDataType = 'array'; + public $selfLink; + public $status; + + public function setAnchor($anchor) + { + $this->anchor = $anchor; + } + + public function getAnchor() + { + return $this->anchor; + } + + public function setAuthor(Google_Service_Drive_User $author) + { + $this->author = $author; + } + + public function getAuthor() + { + return $this->author; + } + + public function setCommentId($commentId) + { + $this->commentId = $commentId; + } + + public function getCommentId() + { + return $this->commentId; + } + + public function setContent($content) + { + $this->content = $content; + } + + public function getContent() + { + return $this->content; + } + + public function setContext(Google_Service_Drive_CommentContext $context) + { + $this->context = $context; + } + + public function getContext() + { + return $this->context; + } + + public function setCreatedDate($createdDate) + { + $this->createdDate = $createdDate; + } + + public function getCreatedDate() + { + return $this->createdDate; + } + + public function setDeleted($deleted) + { + $this->deleted = $deleted; + } + + public function getDeleted() + { + return $this->deleted; + } + + public function setFileId($fileId) + { + $this->fileId = $fileId; + } + + public function getFileId() + { + return $this->fileId; + } + + public function setFileTitle($fileTitle) + { + $this->fileTitle = $fileTitle; + } + + public function getFileTitle() + { + return $this->fileTitle; + } + + public function setHtmlContent($htmlContent) + { + $this->htmlContent = $htmlContent; + } + + public function getHtmlContent() + { + return $this->htmlContent; + } + + public function setKind($kind) + { + $this->kind = $kind; + } + + public function getKind() + { + return $this->kind; + } + + public function setModifiedDate($modifiedDate) + { + $this->modifiedDate = $modifiedDate; + } + + public function getModifiedDate() + { + return $this->modifiedDate; + } + + public function setReplies($replies) + { + $this->replies = $replies; + } + + public function getReplies() + { + return $this->replies; + } + + public function setSelfLink($selfLink) + { + $this->selfLink = $selfLink; + } + + public function getSelfLink() + { + return $this->selfLink; + } + + public function setStatus($status) + { + $this->status = $status; + } + + public function getStatus() + { + return $this->status; + } +} + +class Google_Service_Drive_CommentContext extends Google_Model +{ + protected $internal_gapi_mappings = array( + ); + public $type; + public $value; + + public function setType($type) + { + $this->type = $type; + } + + public function getType() + { + return $this->type; + } + + public function setValue($value) + { + $this->value = $value; + } + + public function getValue() + { + return $this->value; + } +} + +class Google_Service_Drive_CommentList extends Google_Collection +{ + protected $collection_key = 'items'; + protected $internal_gapi_mappings = array( + ); + protected $itemsType = 'Google_Service_Drive_Comment'; + protected $itemsDataType = 'array'; + public $kind; + public $nextLink; + public $nextPageToken; + public $selfLink; + + public function setItems($items) + { + $this->items = $items; + } + + public function getItems() + { + return $this->items; + } + + public function setKind($kind) + { + $this->kind = $kind; + } + + public function getKind() + { + return $this->kind; + } + + public function setNextLink($nextLink) + { + $this->nextLink = $nextLink; + } + + public function getNextLink() + { + return $this->nextLink; + } + + public function setNextPageToken($nextPageToken) + { + $this->nextPageToken = $nextPageToken; + } + + public function getNextPageToken() + { + return $this->nextPageToken; + } + + public function setSelfLink($selfLink) + { + $this->selfLink = $selfLink; + } + + public function getSelfLink() + { + return $this->selfLink; + } +} + +class Google_Service_Drive_CommentReply extends Google_Model +{ + protected $internal_gapi_mappings = array( + ); + protected $authorType = 'Google_Service_Drive_User'; + protected $authorDataType = ''; + public $content; + public $createdDate; + public $deleted; + public $htmlContent; + public $kind; + public $modifiedDate; + public $replyId; + public $verb; + + public function setAuthor(Google_Service_Drive_User $author) + { + $this->author = $author; + } + + public function getAuthor() + { + return $this->author; + } + + public function setContent($content) + { + $this->content = $content; + } + + public function getContent() + { + return $this->content; + } + + public function setCreatedDate($createdDate) + { + $this->createdDate = $createdDate; + } + + public function getCreatedDate() + { + return $this->createdDate; + } + + public function setDeleted($deleted) + { + $this->deleted = $deleted; + } + + public function getDeleted() + { + return $this->deleted; + } + + public function setHtmlContent($htmlContent) + { + $this->htmlContent = $htmlContent; + } + + public function getHtmlContent() + { + return $this->htmlContent; + } + + public function setKind($kind) + { + $this->kind = $kind; + } + + public function getKind() + { + return $this->kind; + } + + public function setModifiedDate($modifiedDate) + { + $this->modifiedDate = $modifiedDate; + } + + public function getModifiedDate() + { + return $this->modifiedDate; + } + + public function setReplyId($replyId) + { + $this->replyId = $replyId; + } + + public function getReplyId() + { + return $this->replyId; + } + + public function setVerb($verb) + { + $this->verb = $verb; + } + + public function getVerb() + { + return $this->verb; + } +} + +class Google_Service_Drive_CommentReplyList extends Google_Collection +{ + protected $collection_key = 'items'; + protected $internal_gapi_mappings = array( + ); + protected $itemsType = 'Google_Service_Drive_CommentReply'; + protected $itemsDataType = 'array'; + public $kind; + public $nextLink; + public $nextPageToken; + public $selfLink; + + public function setItems($items) + { + $this->items = $items; + } + + public function getItems() + { + return $this->items; + } + + public function setKind($kind) + { + $this->kind = $kind; + } + + public function getKind() + { + return $this->kind; + } + + public function setNextLink($nextLink) + { + $this->nextLink = $nextLink; + } + + public function getNextLink() + { + return $this->nextLink; + } + + public function setNextPageToken($nextPageToken) + { + $this->nextPageToken = $nextPageToken; + } + + public function getNextPageToken() + { + return $this->nextPageToken; + } + + public function setSelfLink($selfLink) + { + $this->selfLink = $selfLink; + } + + public function getSelfLink() + { + return $this->selfLink; + } +} + +class Google_Service_Drive_DriveFile extends Google_Collection +{ + protected $collection_key = 'properties'; + protected $internal_gapi_mappings = array( + ); + public $alternateLink; + public $appDataContents; + public $copyable; + public $createdDate; + public $defaultOpenWithLink; + public $description; + public $downloadUrl; + public $editable; + public $embedLink; + public $etag; + public $explicitlyTrashed; + public $exportLinks; + public $fileExtension; + public $fileSize; + public $headRevisionId; + public $iconLink; + public $id; + protected $imageMediaMetadataType = 'Google_Service_Drive_DriveFileImageMediaMetadata'; + protected $imageMediaMetadataDataType = ''; + protected $indexableTextType = 'Google_Service_Drive_DriveFileIndexableText'; + protected $indexableTextDataType = ''; + public $kind; + protected $labelsType = 'Google_Service_Drive_DriveFileLabels'; + protected $labelsDataType = ''; + protected $lastModifyingUserType = 'Google_Service_Drive_User'; + protected $lastModifyingUserDataType = ''; + public $lastModifyingUserName; + public $lastViewedByMeDate; + public $markedViewedByMeDate; + public $md5Checksum; + public $mimeType; + public $modifiedByMeDate; + public $modifiedDate; + public $openWithLinks; + public $originalFilename; + public $ownerNames; + protected $ownersType = 'Google_Service_Drive_User'; + protected $ownersDataType = 'array'; + protected $parentsType = 'Google_Service_Drive_ParentReference'; + protected $parentsDataType = 'array'; + protected $permissionsType = 'Google_Service_Drive_Permission'; + protected $permissionsDataType = 'array'; + protected $propertiesType = 'Google_Service_Drive_Property'; + protected $propertiesDataType = 'array'; + public $quotaBytesUsed; + public $selfLink; + public $shared; + public $sharedWithMeDate; + protected $sharingUserType = 'Google_Service_Drive_User'; + protected $sharingUserDataType = ''; + protected $thumbnailType = 'Google_Service_Drive_DriveFileThumbnail'; + protected $thumbnailDataType = ''; + public $thumbnailLink; + public $title; + protected $userPermissionType = 'Google_Service_Drive_Permission'; + protected $userPermissionDataType = ''; + public $version; + protected $videoMediaMetadataType = 'Google_Service_Drive_DriveFileVideoMediaMetadata'; + protected $videoMediaMetadataDataType = ''; + public $webContentLink; + public $webViewLink; + public $writersCanShare; + + public function setAlternateLink($alternateLink) + { + $this->alternateLink = $alternateLink; + } + + public function getAlternateLink() + { + return $this->alternateLink; + } + + public function setAppDataContents($appDataContents) + { + $this->appDataContents = $appDataContents; + } + + public function getAppDataContents() + { + return $this->appDataContents; + } + + public function setCopyable($copyable) + { + $this->copyable = $copyable; + } + + public function getCopyable() + { + return $this->copyable; + } + + public function setCreatedDate($createdDate) + { + $this->createdDate = $createdDate; + } + + public function getCreatedDate() + { + return $this->createdDate; + } + + public function setDefaultOpenWithLink($defaultOpenWithLink) + { + $this->defaultOpenWithLink = $defaultOpenWithLink; + } + + public function getDefaultOpenWithLink() + { + return $this->defaultOpenWithLink; + } + + public function setDescription($description) + { + $this->description = $description; + } + + public function getDescription() + { + return $this->description; + } + + public function setDownloadUrl($downloadUrl) + { + $this->downloadUrl = $downloadUrl; + } + + public function getDownloadUrl() + { + return $this->downloadUrl; + } + + public function setEditable($editable) + { + $this->editable = $editable; + } + + public function getEditable() + { + return $this->editable; + } + + public function setEmbedLink($embedLink) + { + $this->embedLink = $embedLink; + } + + public function getEmbedLink() + { + return $this->embedLink; + } + + public function setEtag($etag) + { + $this->etag = $etag; + } + + public function getEtag() + { + return $this->etag; + } + + public function setExplicitlyTrashed($explicitlyTrashed) + { + $this->explicitlyTrashed = $explicitlyTrashed; + } + + public function getExplicitlyTrashed() + { + return $this->explicitlyTrashed; + } + + public function setExportLinks($exportLinks) + { + $this->exportLinks = $exportLinks; + } + + public function getExportLinks() + { + return $this->exportLinks; + } + + public function setFileExtension($fileExtension) + { + $this->fileExtension = $fileExtension; + } + + public function getFileExtension() + { + return $this->fileExtension; + } + + public function setFileSize($fileSize) + { + $this->fileSize = $fileSize; + } + + public function getFileSize() + { + return $this->fileSize; + } + + public function setHeadRevisionId($headRevisionId) + { + $this->headRevisionId = $headRevisionId; + } + + public function getHeadRevisionId() + { + return $this->headRevisionId; + } + + public function setIconLink($iconLink) + { + $this->iconLink = $iconLink; + } + + public function getIconLink() + { + return $this->iconLink; + } + + public function setId($id) + { + $this->id = $id; + } + + public function getId() + { + return $this->id; + } + + public function setImageMediaMetadata(Google_Service_Drive_DriveFileImageMediaMetadata $imageMediaMetadata) + { + $this->imageMediaMetadata = $imageMediaMetadata; + } + + public function getImageMediaMetadata() + { + return $this->imageMediaMetadata; + } + + public function setIndexableText(Google_Service_Drive_DriveFileIndexableText $indexableText) + { + $this->indexableText = $indexableText; + } + + public function getIndexableText() + { + return $this->indexableText; + } + + public function setKind($kind) + { + $this->kind = $kind; + } + + public function getKind() + { + return $this->kind; + } + + public function setLabels(Google_Service_Drive_DriveFileLabels $labels) + { + $this->labels = $labels; + } + + public function getLabels() + { + return $this->labels; + } + + public function setLastModifyingUser(Google_Service_Drive_User $lastModifyingUser) + { + $this->lastModifyingUser = $lastModifyingUser; + } + + public function getLastModifyingUser() + { + return $this->lastModifyingUser; + } + + public function setLastModifyingUserName($lastModifyingUserName) + { + $this->lastModifyingUserName = $lastModifyingUserName; + } + + public function getLastModifyingUserName() + { + return $this->lastModifyingUserName; + } + + public function setLastViewedByMeDate($lastViewedByMeDate) + { + $this->lastViewedByMeDate = $lastViewedByMeDate; + } + + public function getLastViewedByMeDate() + { + return $this->lastViewedByMeDate; + } + + public function setMarkedViewedByMeDate($markedViewedByMeDate) + { + $this->markedViewedByMeDate = $markedViewedByMeDate; + } + + public function getMarkedViewedByMeDate() + { + return $this->markedViewedByMeDate; + } + + public function setMd5Checksum($md5Checksum) + { + $this->md5Checksum = $md5Checksum; + } + + public function getMd5Checksum() + { + return $this->md5Checksum; + } + + public function setMimeType($mimeType) + { + $this->mimeType = $mimeType; + } + + public function getMimeType() + { + return $this->mimeType; + } + + public function setModifiedByMeDate($modifiedByMeDate) + { + $this->modifiedByMeDate = $modifiedByMeDate; + } + + public function getModifiedByMeDate() + { + return $this->modifiedByMeDate; + } + + public function setModifiedDate($modifiedDate) + { + $this->modifiedDate = $modifiedDate; + } + + public function getModifiedDate() + { + return $this->modifiedDate; + } + + public function setOpenWithLinks($openWithLinks) + { + $this->openWithLinks = $openWithLinks; + } + + public function getOpenWithLinks() + { + return $this->openWithLinks; + } + + public function setOriginalFilename($originalFilename) + { + $this->originalFilename = $originalFilename; + } + + public function getOriginalFilename() + { + return $this->originalFilename; + } + + public function setOwnerNames($ownerNames) + { + $this->ownerNames = $ownerNames; + } + + public function getOwnerNames() + { + return $this->ownerNames; + } + + public function setOwners($owners) + { + $this->owners = $owners; + } + + public function getOwners() + { + return $this->owners; + } + + public function setParents($parents) + { + $this->parents = $parents; + } + + public function getParents() + { + return $this->parents; + } + + public function setPermissions($permissions) + { + $this->permissions = $permissions; + } + + public function getPermissions() + { + return $this->permissions; + } + + public function setProperties($properties) + { + $this->properties = $properties; + } + + public function getProperties() + { + return $this->properties; + } + + public function setQuotaBytesUsed($quotaBytesUsed) + { + $this->quotaBytesUsed = $quotaBytesUsed; + } + + public function getQuotaBytesUsed() + { + return $this->quotaBytesUsed; + } + + public function setSelfLink($selfLink) + { + $this->selfLink = $selfLink; + } + + public function getSelfLink() + { + return $this->selfLink; + } + + public function setShared($shared) + { + $this->shared = $shared; + } + + public function getShared() + { + return $this->shared; + } + + public function setSharedWithMeDate($sharedWithMeDate) + { + $this->sharedWithMeDate = $sharedWithMeDate; + } + + public function getSharedWithMeDate() + { + return $this->sharedWithMeDate; + } + + public function setSharingUser(Google_Service_Drive_User $sharingUser) + { + $this->sharingUser = $sharingUser; + } + + public function getSharingUser() + { + return $this->sharingUser; + } + + public function setThumbnail(Google_Service_Drive_DriveFileThumbnail $thumbnail) + { + $this->thumbnail = $thumbnail; + } + + public function getThumbnail() + { + return $this->thumbnail; + } + + public function setThumbnailLink($thumbnailLink) + { + $this->thumbnailLink = $thumbnailLink; + } + + public function getThumbnailLink() + { + return $this->thumbnailLink; + } + + public function setTitle($title) + { + $this->title = $title; + } + + public function getTitle() + { + return $this->title; + } + + public function setUserPermission(Google_Service_Drive_Permission $userPermission) + { + $this->userPermission = $userPermission; + } + + public function getUserPermission() + { + return $this->userPermission; + } + + public function setVersion($version) + { + $this->version = $version; + } + + public function getVersion() + { + return $this->version; + } + + public function setVideoMediaMetadata(Google_Service_Drive_DriveFileVideoMediaMetadata $videoMediaMetadata) + { + $this->videoMediaMetadata = $videoMediaMetadata; + } + + public function getVideoMediaMetadata() + { + return $this->videoMediaMetadata; + } + + public function setWebContentLink($webContentLink) + { + $this->webContentLink = $webContentLink; + } + + public function getWebContentLink() + { + return $this->webContentLink; + } + + public function setWebViewLink($webViewLink) + { + $this->webViewLink = $webViewLink; + } + + public function getWebViewLink() + { + return $this->webViewLink; + } + + public function setWritersCanShare($writersCanShare) + { + $this->writersCanShare = $writersCanShare; + } + + public function getWritersCanShare() + { + return $this->writersCanShare; + } +} + +class Google_Service_Drive_DriveFileExportLinks extends Google_Model +{ + protected $internal_gapi_mappings = array( + ); +} + +class Google_Service_Drive_DriveFileImageMediaMetadata extends Google_Model +{ + protected $internal_gapi_mappings = array( + ); + public $aperture; + public $cameraMake; + public $cameraModel; + public $colorSpace; + public $date; + public $exposureBias; + public $exposureMode; + public $exposureTime; + public $flashUsed; + public $focalLength; + public $height; + public $isoSpeed; + public $lens; + protected $locationType = 'Google_Service_Drive_DriveFileImageMediaMetadataLocation'; + protected $locationDataType = ''; + public $maxApertureValue; + public $meteringMode; + public $rotation; + public $sensor; + public $subjectDistance; + public $whiteBalance; + public $width; + + public function setAperture($aperture) + { + $this->aperture = $aperture; + } + + public function getAperture() + { + return $this->aperture; + } + + public function setCameraMake($cameraMake) + { + $this->cameraMake = $cameraMake; + } + + public function getCameraMake() + { + return $this->cameraMake; + } + + public function setCameraModel($cameraModel) + { + $this->cameraModel = $cameraModel; + } + + public function getCameraModel() + { + return $this->cameraModel; + } + + public function setColorSpace($colorSpace) + { + $this->colorSpace = $colorSpace; + } + + public function getColorSpace() + { + return $this->colorSpace; + } + + public function setDate($date) + { + $this->date = $date; + } + + public function getDate() + { + return $this->date; + } + + public function setExposureBias($exposureBias) + { + $this->exposureBias = $exposureBias; + } + + public function getExposureBias() + { + return $this->exposureBias; + } + + public function setExposureMode($exposureMode) + { + $this->exposureMode = $exposureMode; + } + + public function getExposureMode() + { + return $this->exposureMode; + } + + public function setExposureTime($exposureTime) + { + $this->exposureTime = $exposureTime; + } + + public function getExposureTime() + { + return $this->exposureTime; + } + + public function setFlashUsed($flashUsed) + { + $this->flashUsed = $flashUsed; + } + + public function getFlashUsed() + { + return $this->flashUsed; + } + + public function setFocalLength($focalLength) + { + $this->focalLength = $focalLength; + } + + public function getFocalLength() + { + return $this->focalLength; + } + + public function setHeight($height) + { + $this->height = $height; + } + + public function getHeight() + { + return $this->height; + } + + public function setIsoSpeed($isoSpeed) + { + $this->isoSpeed = $isoSpeed; + } + + public function getIsoSpeed() + { + return $this->isoSpeed; + } + + public function setLens($lens) + { + $this->lens = $lens; + } + + public function getLens() + { + return $this->lens; + } + + public function setLocation(Google_Service_Drive_DriveFileImageMediaMetadataLocation $location) + { + $this->location = $location; + } + + public function getLocation() + { + return $this->location; + } + + public function setMaxApertureValue($maxApertureValue) + { + $this->maxApertureValue = $maxApertureValue; + } + + public function getMaxApertureValue() + { + return $this->maxApertureValue; + } + + public function setMeteringMode($meteringMode) + { + $this->meteringMode = $meteringMode; + } + + public function getMeteringMode() + { + return $this->meteringMode; + } + + public function setRotation($rotation) + { + $this->rotation = $rotation; + } + + public function getRotation() + { + return $this->rotation; + } + + public function setSensor($sensor) + { + $this->sensor = $sensor; + } + + public function getSensor() + { + return $this->sensor; + } + + public function setSubjectDistance($subjectDistance) + { + $this->subjectDistance = $subjectDistance; + } + + public function getSubjectDistance() + { + return $this->subjectDistance; + } + + public function setWhiteBalance($whiteBalance) + { + $this->whiteBalance = $whiteBalance; + } + + public function getWhiteBalance() + { + return $this->whiteBalance; + } + + public function setWidth($width) + { + $this->width = $width; + } + + public function getWidth() + { + return $this->width; + } +} + +class Google_Service_Drive_DriveFileImageMediaMetadataLocation extends Google_Model +{ + protected $internal_gapi_mappings = array( + ); + public $altitude; + public $latitude; + public $longitude; + + public function setAltitude($altitude) + { + $this->altitude = $altitude; + } + + public function getAltitude() + { + return $this->altitude; + } + + public function setLatitude($latitude) + { + $this->latitude = $latitude; + } + + public function getLatitude() + { + return $this->latitude; + } + + public function setLongitude($longitude) + { + $this->longitude = $longitude; + } + + public function getLongitude() + { + return $this->longitude; + } +} + +class Google_Service_Drive_DriveFileIndexableText extends Google_Model +{ + protected $internal_gapi_mappings = array( + ); + public $text; + + public function setText($text) + { + $this->text = $text; + } + + public function getText() + { + return $this->text; + } +} + +class Google_Service_Drive_DriveFileLabels extends Google_Model +{ + protected $internal_gapi_mappings = array( + ); + public $hidden; + public $restricted; + public $starred; + public $trashed; + public $viewed; + + public function setHidden($hidden) + { + $this->hidden = $hidden; + } + + public function getHidden() + { + return $this->hidden; + } + + public function setRestricted($restricted) + { + $this->restricted = $restricted; + } + + public function getRestricted() + { + return $this->restricted; + } + + public function setStarred($starred) + { + $this->starred = $starred; + } + + public function getStarred() + { + return $this->starred; + } + + public function setTrashed($trashed) + { + $this->trashed = $trashed; + } + + public function getTrashed() + { + return $this->trashed; + } + + public function setViewed($viewed) + { + $this->viewed = $viewed; + } + + public function getViewed() + { + return $this->viewed; + } +} + +class Google_Service_Drive_DriveFileOpenWithLinks extends Google_Model +{ + protected $internal_gapi_mappings = array( + ); +} + +class Google_Service_Drive_DriveFileThumbnail extends Google_Model +{ + protected $internal_gapi_mappings = array( + ); + public $image; + public $mimeType; + + public function setImage($image) + { + $this->image = $image; + } + + public function getImage() + { + return $this->image; + } + + public function setMimeType($mimeType) + { + $this->mimeType = $mimeType; + } + + public function getMimeType() + { + return $this->mimeType; + } +} + +class Google_Service_Drive_DriveFileVideoMediaMetadata extends Google_Model +{ + protected $internal_gapi_mappings = array( + ); + public $durationMillis; + public $height; + public $width; + + public function setDurationMillis($durationMillis) + { + $this->durationMillis = $durationMillis; + } + + public function getDurationMillis() + { + return $this->durationMillis; + } + + public function setHeight($height) + { + $this->height = $height; + } + + public function getHeight() + { + return $this->height; + } + + public function setWidth($width) + { + $this->width = $width; + } + + public function getWidth() + { + return $this->width; + } +} + +class Google_Service_Drive_FileList extends Google_Collection +{ + protected $collection_key = 'items'; + protected $internal_gapi_mappings = array( + ); + public $etag; + protected $itemsType = 'Google_Service_Drive_DriveFile'; + protected $itemsDataType = 'array'; + public $kind; + public $nextLink; + public $nextPageToken; + public $selfLink; + + public function setEtag($etag) + { + $this->etag = $etag; + } + + public function getEtag() + { + return $this->etag; + } + + public function setItems($items) + { + $this->items = $items; + } + + public function getItems() + { + return $this->items; + } + + public function setKind($kind) + { + $this->kind = $kind; + } + + public function getKind() + { + return $this->kind; + } + + public function setNextLink($nextLink) + { + $this->nextLink = $nextLink; + } + + public function getNextLink() + { + return $this->nextLink; + } + + public function setNextPageToken($nextPageToken) + { + $this->nextPageToken = $nextPageToken; + } + + public function getNextPageToken() + { + return $this->nextPageToken; + } + + public function setSelfLink($selfLink) + { + $this->selfLink = $selfLink; + } + + public function getSelfLink() + { + return $this->selfLink; + } +} + +class Google_Service_Drive_ParentList extends Google_Collection +{ + protected $collection_key = 'items'; + protected $internal_gapi_mappings = array( + ); + public $etag; + protected $itemsType = 'Google_Service_Drive_ParentReference'; + protected $itemsDataType = 'array'; + public $kind; + public $selfLink; + + public function setEtag($etag) + { + $this->etag = $etag; + } + + public function getEtag() + { + return $this->etag; + } + + public function setItems($items) + { + $this->items = $items; + } + + public function getItems() + { + return $this->items; + } + + public function setKind($kind) + { + $this->kind = $kind; + } + + public function getKind() + { + return $this->kind; + } + + public function setSelfLink($selfLink) + { + $this->selfLink = $selfLink; + } + + public function getSelfLink() + { + return $this->selfLink; + } +} + +class Google_Service_Drive_ParentReference extends Google_Model +{ + protected $internal_gapi_mappings = array( + ); + public $id; + public $isRoot; + public $kind; + public $parentLink; + public $selfLink; + + public function setId($id) + { + $this->id = $id; + } + + public function getId() + { + return $this->id; + } + + public function setIsRoot($isRoot) + { + $this->isRoot = $isRoot; + } + + public function getIsRoot() + { + return $this->isRoot; + } + + public function setKind($kind) + { + $this->kind = $kind; + } + + public function getKind() + { + return $this->kind; + } + + public function setParentLink($parentLink) + { + $this->parentLink = $parentLink; + } + + public function getParentLink() + { + return $this->parentLink; + } + + public function setSelfLink($selfLink) + { + $this->selfLink = $selfLink; + } + + public function getSelfLink() + { + return $this->selfLink; + } +} + +class Google_Service_Drive_Permission extends Google_Collection +{ + protected $collection_key = 'additionalRoles'; + protected $internal_gapi_mappings = array( + ); + public $additionalRoles; + public $authKey; + public $domain; + public $emailAddress; + public $etag; + public $id; + public $kind; + public $name; + public $photoLink; + public $role; + public $selfLink; + public $type; + public $value; + public $withLink; + + public function setAdditionalRoles($additionalRoles) + { + $this->additionalRoles = $additionalRoles; + } + + public function getAdditionalRoles() + { + return $this->additionalRoles; + } + + public function setAuthKey($authKey) + { + $this->authKey = $authKey; + } + + public function getAuthKey() + { + return $this->authKey; + } + + public function setDomain($domain) + { + $this->domain = $domain; + } + + public function getDomain() + { + return $this->domain; + } + + public function setEmailAddress($emailAddress) + { + $this->emailAddress = $emailAddress; + } + + public function getEmailAddress() + { + return $this->emailAddress; + } + + public function setEtag($etag) + { + $this->etag = $etag; + } + + public function getEtag() + { + return $this->etag; + } + + public function setId($id) + { + $this->id = $id; + } + + public function getId() + { + return $this->id; + } + + public function setKind($kind) + { + $this->kind = $kind; + } + + public function getKind() + { + return $this->kind; + } + + public function setName($name) + { + $this->name = $name; + } + + public function getName() + { + return $this->name; + } + + public function setPhotoLink($photoLink) + { + $this->photoLink = $photoLink; + } + + public function getPhotoLink() + { + return $this->photoLink; + } + + public function setRole($role) + { + $this->role = $role; + } + + public function getRole() + { + return $this->role; + } + + public function setSelfLink($selfLink) + { + $this->selfLink = $selfLink; + } + + public function getSelfLink() + { + return $this->selfLink; + } + + public function setType($type) + { + $this->type = $type; + } + + public function getType() + { + return $this->type; + } + + public function setValue($value) + { + $this->value = $value; + } + + public function getValue() + { + return $this->value; + } + + public function setWithLink($withLink) + { + $this->withLink = $withLink; + } + + public function getWithLink() + { + return $this->withLink; + } +} + +class Google_Service_Drive_PermissionId extends Google_Model +{ + protected $internal_gapi_mappings = array( + ); + public $id; + public $kind; + + public function setId($id) + { + $this->id = $id; + } + + public function getId() + { + return $this->id; + } + + public function setKind($kind) + { + $this->kind = $kind; + } + + public function getKind() + { + return $this->kind; + } +} + +class Google_Service_Drive_PermissionList extends Google_Collection +{ + protected $collection_key = 'items'; + protected $internal_gapi_mappings = array( + ); + public $etag; + protected $itemsType = 'Google_Service_Drive_Permission'; + protected $itemsDataType = 'array'; + public $kind; + public $selfLink; + + public function setEtag($etag) + { + $this->etag = $etag; + } + + public function getEtag() + { + return $this->etag; + } + + public function setItems($items) + { + $this->items = $items; + } + + public function getItems() + { + return $this->items; + } + + public function setKind($kind) + { + $this->kind = $kind; + } + + public function getKind() + { + return $this->kind; + } + + public function setSelfLink($selfLink) + { + $this->selfLink = $selfLink; + } + + public function getSelfLink() + { + return $this->selfLink; + } +} + +class Google_Service_Drive_Property extends Google_Model +{ + protected $internal_gapi_mappings = array( + ); + public $etag; + public $key; + public $kind; + public $selfLink; + public $value; + public $visibility; + + public function setEtag($etag) + { + $this->etag = $etag; + } + + public function getEtag() + { + return $this->etag; + } + + public function setKey($key) + { + $this->key = $key; + } + + public function getKey() + { + return $this->key; + } + + public function setKind($kind) + { + $this->kind = $kind; + } + + public function getKind() + { + return $this->kind; + } + + public function setSelfLink($selfLink) + { + $this->selfLink = $selfLink; + } + + public function getSelfLink() + { + return $this->selfLink; + } + + public function setValue($value) + { + $this->value = $value; + } + + public function getValue() + { + return $this->value; + } + + public function setVisibility($visibility) + { + $this->visibility = $visibility; + } + + public function getVisibility() + { + return $this->visibility; + } +} + +class Google_Service_Drive_PropertyList extends Google_Collection +{ + protected $collection_key = 'items'; + protected $internal_gapi_mappings = array( + ); + public $etag; + protected $itemsType = 'Google_Service_Drive_Property'; + protected $itemsDataType = 'array'; + public $kind; + public $selfLink; + + public function setEtag($etag) + { + $this->etag = $etag; + } + + public function getEtag() + { + return $this->etag; + } + + public function setItems($items) + { + $this->items = $items; + } + + public function getItems() + { + return $this->items; + } + + public function setKind($kind) + { + $this->kind = $kind; + } + + public function getKind() + { + return $this->kind; + } + + public function setSelfLink($selfLink) + { + $this->selfLink = $selfLink; + } + + public function getSelfLink() + { + return $this->selfLink; + } +} + +class Google_Service_Drive_Revision extends Google_Model +{ + protected $internal_gapi_mappings = array( + ); + public $downloadUrl; + public $etag; + public $exportLinks; + public $fileSize; + public $id; + public $kind; + protected $lastModifyingUserType = 'Google_Service_Drive_User'; + protected $lastModifyingUserDataType = ''; + public $lastModifyingUserName; + public $md5Checksum; + public $mimeType; + public $modifiedDate; + public $originalFilename; + public $pinned; + public $publishAuto; + public $published; + public $publishedLink; + public $publishedOutsideDomain; + public $selfLink; + + public function setDownloadUrl($downloadUrl) + { + $this->downloadUrl = $downloadUrl; + } + + public function getDownloadUrl() + { + return $this->downloadUrl; + } + + public function setEtag($etag) + { + $this->etag = $etag; + } + + public function getEtag() + { + return $this->etag; + } + + public function setExportLinks($exportLinks) + { + $this->exportLinks = $exportLinks; + } + + public function getExportLinks() + { + return $this->exportLinks; + } + + public function setFileSize($fileSize) + { + $this->fileSize = $fileSize; + } + + public function getFileSize() + { + return $this->fileSize; + } + + public function setId($id) + { + $this->id = $id; + } + + public function getId() + { + return $this->id; + } + + public function setKind($kind) + { + $this->kind = $kind; + } + + public function getKind() + { + return $this->kind; + } + + public function setLastModifyingUser(Google_Service_Drive_User $lastModifyingUser) + { + $this->lastModifyingUser = $lastModifyingUser; + } + + public function getLastModifyingUser() + { + return $this->lastModifyingUser; + } + + public function setLastModifyingUserName($lastModifyingUserName) + { + $this->lastModifyingUserName = $lastModifyingUserName; + } + + public function getLastModifyingUserName() + { + return $this->lastModifyingUserName; + } + + public function setMd5Checksum($md5Checksum) + { + $this->md5Checksum = $md5Checksum; + } + + public function getMd5Checksum() + { + return $this->md5Checksum; + } + + public function setMimeType($mimeType) + { + $this->mimeType = $mimeType; + } + + public function getMimeType() + { + return $this->mimeType; + } + + public function setModifiedDate($modifiedDate) + { + $this->modifiedDate = $modifiedDate; + } + + public function getModifiedDate() + { + return $this->modifiedDate; + } + + public function setOriginalFilename($originalFilename) + { + $this->originalFilename = $originalFilename; + } + + public function getOriginalFilename() + { + return $this->originalFilename; + } + + public function setPinned($pinned) + { + $this->pinned = $pinned; + } + + public function getPinned() + { + return $this->pinned; + } + + public function setPublishAuto($publishAuto) + { + $this->publishAuto = $publishAuto; + } + + public function getPublishAuto() + { + return $this->publishAuto; + } + + public function setPublished($published) + { + $this->published = $published; + } + + public function getPublished() + { + return $this->published; + } + + public function setPublishedLink($publishedLink) + { + $this->publishedLink = $publishedLink; + } + + public function getPublishedLink() + { + return $this->publishedLink; + } + + public function setPublishedOutsideDomain($publishedOutsideDomain) + { + $this->publishedOutsideDomain = $publishedOutsideDomain; + } + + public function getPublishedOutsideDomain() + { + return $this->publishedOutsideDomain; + } + + public function setSelfLink($selfLink) + { + $this->selfLink = $selfLink; + } + + public function getSelfLink() + { + return $this->selfLink; + } +} + +class Google_Service_Drive_RevisionExportLinks extends Google_Model +{ + protected $internal_gapi_mappings = array( + ); +} + +class Google_Service_Drive_RevisionList extends Google_Collection +{ + protected $collection_key = 'items'; + protected $internal_gapi_mappings = array( + ); + public $etag; + protected $itemsType = 'Google_Service_Drive_Revision'; + protected $itemsDataType = 'array'; + public $kind; + public $selfLink; + + public function setEtag($etag) + { + $this->etag = $etag; + } + + public function getEtag() + { + return $this->etag; + } + + public function setItems($items) + { + $this->items = $items; + } + + public function getItems() + { + return $this->items; + } + + public function setKind($kind) + { + $this->kind = $kind; + } + + public function getKind() + { + return $this->kind; + } + + public function setSelfLink($selfLink) + { + $this->selfLink = $selfLink; + } + + public function getSelfLink() + { + return $this->selfLink; + } +} + +class Google_Service_Drive_User extends Google_Model +{ + protected $internal_gapi_mappings = array( + ); + public $displayName; + public $emailAddress; + public $isAuthenticatedUser; + public $kind; + public $permissionId; + protected $pictureType = 'Google_Service_Drive_UserPicture'; + protected $pictureDataType = ''; + + public function setDisplayName($displayName) + { + $this->displayName = $displayName; + } + + public function getDisplayName() + { + return $this->displayName; + } + + public function setEmailAddress($emailAddress) + { + $this->emailAddress = $emailAddress; + } + + public function getEmailAddress() + { + return $this->emailAddress; + } + + public function setIsAuthenticatedUser($isAuthenticatedUser) + { + $this->isAuthenticatedUser = $isAuthenticatedUser; + } + + public function getIsAuthenticatedUser() + { + return $this->isAuthenticatedUser; + } + + public function setKind($kind) + { + $this->kind = $kind; + } + + public function getKind() + { + return $this->kind; + } + + public function setPermissionId($permissionId) + { + $this->permissionId = $permissionId; + } + + public function getPermissionId() + { + return $this->permissionId; + } + + public function setPicture(Google_Service_Drive_UserPicture $picture) + { + $this->picture = $picture; + } + + public function getPicture() + { + return $this->picture; + } +} + +class Google_Service_Drive_UserPicture extends Google_Model +{ + protected $internal_gapi_mappings = array( + ); + public $url; + + public function setUrl($url) + { + $this->url = $url; + } + + public function getUrl() + { + return $this->url; + } +} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/Google/Service/Exception.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Service/Exception.php new file mode 100644 index 00000000000..a780ff7b47c --- /dev/null +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Service/Exception.php @@ -0,0 +1,53 @@ +<?php + +require_once 'Google/Exception.php'; + +class Google_Service_Exception extends Google_Exception +{ + /** + * Optional list of errors returned in a JSON body of an HTTP error response. + */ + protected $errors = array(); + + /** + * Override default constructor to add ability to set $errors. + * + * @param string $message + * @param int $code + * @param Exception|null $previous + * @param [{string, string}] errors List of errors returned in an HTTP + * response. Defaults to []. + */ + public function __construct( + $message, + $code = 0, + Exception $previous = null, + $errors = array() + ) { + if (version_compare(PHP_VERSION, '5.3.0') >= 0) { + parent::__construct($message, $code, $previous); + } else { + parent::__construct($message, $code); + } + + $this->errors = $errors; + } + + /** + * An example of the possible errors returned. + * + * { + * "domain": "global", + * "reason": "authError", + * "message": "Invalid Credentials", + * "locationType": "header", + * "location": "Authorization", + * } + * + * @return [{string, string}] List of errors return in an HTTP response or []. + */ + public function getErrors() + { + return $this->errors; + } +} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/Google/Service/Resource.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Service/Resource.php new file mode 100644 index 00000000000..d396907e1d0 --- /dev/null +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Service/Resource.php @@ -0,0 +1,210 @@ +<?php +/** + * Copyright 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +require_once 'Google/Client.php'; +require_once 'Google/Exception.php'; +require_once 'Google/Utils.php'; +require_once 'Google/Http/Request.php'; +require_once 'Google/Http/MediaFileUpload.php'; +require_once 'Google/Http/REST.php'; + +/** + * Implements the actual methods/resources of the discovered Google API using magic function + * calling overloading (__call()), which on call will see if the method name (plus.activities.list) + * is available in this service, and if so construct an apiHttpRequest representing it. + * + * @author Chris Chabot <chabotc@google.com> + * @author Chirag Shah <chirags@google.com> + * + */ +class Google_Service_Resource +{ + // Valid query parameters that work, but don't appear in discovery. + private $stackParameters = array( + 'alt' => array('type' => 'string', 'location' => 'query'), + 'fields' => array('type' => 'string', 'location' => 'query'), + 'trace' => array('type' => 'string', 'location' => 'query'), + 'userIp' => array('type' => 'string', 'location' => 'query'), + 'userip' => array('type' => 'string', 'location' => 'query'), + 'quotaUser' => array('type' => 'string', 'location' => 'query'), + 'data' => array('type' => 'string', 'location' => 'body'), + 'mimeType' => array('type' => 'string', 'location' => 'header'), + 'uploadType' => array('type' => 'string', 'location' => 'query'), + 'mediaUpload' => array('type' => 'complex', 'location' => 'query'), + ); + + /** @var Google_Service $service */ + private $service; + + /** @var Google_Client $client */ + private $client; + + /** @var string $serviceName */ + private $serviceName; + + /** @var string $resourceName */ + private $resourceName; + + /** @var array $methods */ + private $methods; + + public function __construct($service, $serviceName, $resourceName, $resource) + { + $this->service = $service; + $this->client = $service->getClient(); + $this->serviceName = $serviceName; + $this->resourceName = $resourceName; + $this->methods = isset($resource['methods']) ? + $resource['methods'] : + array($resourceName => $resource); + } + + /** + * TODO(ianbarber): This function needs simplifying. + * @param $name + * @param $arguments + * @param $expected_class - optional, the expected class name + * @return Google_Http_Request|expected_class + * @throws Google_Exception + */ + public function call($name, $arguments, $expected_class = null) + { + if (! isset($this->methods[$name])) { + throw new Google_Exception( + "Unknown function: " . + "{$this->serviceName}->{$this->resourceName}->{$name}()" + ); + } + $method = $this->methods[$name]; + $parameters = $arguments[0]; + + // postBody is a special case since it's not defined in the discovery + // document as parameter, but we abuse the param entry for storing it. + $postBody = null; + if (isset($parameters['postBody'])) { + if ($parameters['postBody'] instanceof Google_Model) { + // In the cases the post body is an existing object, we want + // to use the smart method to create a simple object for + // for JSONification. + $parameters['postBody'] = $parameters['postBody']->toSimpleObject(); + } else if (is_object($parameters['postBody'])) { + // If the post body is another kind of object, we will try and + // wrangle it into a sensible format. + $parameters['postBody'] = + $this->convertToArrayAndStripNulls($parameters['postBody']); + } + $postBody = json_encode($parameters['postBody']); + unset($parameters['postBody']); + } + + // TODO(ianbarber): optParams here probably should have been + // handled already - this may well be redundant code. + if (isset($parameters['optParams'])) { + $optParams = $parameters['optParams']; + unset($parameters['optParams']); + $parameters = array_merge($parameters, $optParams); + } + + if (!isset($method['parameters'])) { + $method['parameters'] = array(); + } + + $method['parameters'] = array_merge( + $method['parameters'], + $this->stackParameters + ); + foreach ($parameters as $key => $val) { + if ($key != 'postBody' && ! isset($method['parameters'][$key])) { + throw new Google_Exception("($name) unknown parameter: '$key'"); + } + } + + foreach ($method['parameters'] as $paramName => $paramSpec) { + if (isset($paramSpec['required']) && + $paramSpec['required'] && + ! isset($parameters[$paramName]) + ) { + throw new Google_Exception("($name) missing required param: '$paramName'"); + } + if (isset($parameters[$paramName])) { + $value = $parameters[$paramName]; + $parameters[$paramName] = $paramSpec; + $parameters[$paramName]['value'] = $value; + unset($parameters[$paramName]['required']); + } else { + // Ensure we don't pass nulls. + unset($parameters[$paramName]); + } + } + + $servicePath = $this->service->servicePath; + + $url = Google_Http_REST::createRequestUri( + $servicePath, + $method['path'], + $parameters + ); + $httpRequest = new Google_Http_Request( + $url, + $method['httpMethod'], + null, + $postBody + ); + $httpRequest->setBaseComponent($this->client->getBasePath()); + + if ($postBody) { + $contentTypeHeader = array(); + $contentTypeHeader['content-type'] = 'application/json; charset=UTF-8'; + $httpRequest->setRequestHeaders($contentTypeHeader); + $httpRequest->setPostBody($postBody); + } + + $httpRequest = $this->client->getAuth()->sign($httpRequest); + $httpRequest->setExpectedClass($expected_class); + + if (isset($parameters['data']) && + ($parameters['uploadType']['value'] == 'media' || $parameters['uploadType']['value'] == 'multipart')) { + // If we are doing a simple media upload, trigger that as a convenience. + $mfu = new Google_Http_MediaFileUpload( + $this->client, + $httpRequest, + isset($parameters['mimeType']) ? $parameters['mimeType']['value'] : 'application/octet-stream', + $parameters['data']['value'] + ); + } + + if ($this->client->shouldDefer()) { + // If we are in batch or upload mode, return the raw request. + return $httpRequest; + } + + return $this->client->execute($httpRequest); + } + + protected function convertToArrayAndStripNulls($o) + { + $o = (array) $o; + foreach ($o as $k => $v) { + if ($v === null) { + unset($o[$k]); + } elseif (is_object($v) || is_array($v)) { + $o[$k] = $this->convertToArrayAndStripNulls($o[$k]); + } + } + return $o; + } +} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/auth/Google_Signer.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Signer/Abstract.php index 7892baac8df..250180920db 100644 --- a/apps/files_external/3rdparty/google-api-php-client/src/auth/Google_Signer.php +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Signer/Abstract.php @@ -15,14 +15,13 @@ * limitations under the License. */ -require_once "Google_P12Signer.php"; - /** * Signs data. * * @author Brian Eaton <beaton@google.com> */ -abstract class Google_Signer { +abstract class Google_Signer_Abstract +{ /** * Signs data, returns the signature as binary data. */ diff --git a/apps/files_external/3rdparty/google-api-php-client/src/Google/Signer/P12.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Signer/P12.php new file mode 100644 index 00000000000..7cc6098bb63 --- /dev/null +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Signer/P12.php @@ -0,0 +1,91 @@ +<?php +/* + * Copyright 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +require_once 'Google/Auth/Exception.php'; +require_once 'Google/Signer/Abstract.php'; + +/** + * Signs data. + * + * Only used for testing. + * + * @author Brian Eaton <beaton@google.com> + */ +class Google_Signer_P12 extends Google_Signer_Abstract +{ + // OpenSSL private key resource + private $privateKey; + + // Creates a new signer from a .p12 file. + public function __construct($p12, $password) + { + if (!function_exists('openssl_x509_read')) { + throw new Google_Exception( + 'The Google PHP API library needs the openssl PHP extension' + ); + } + + // If the private key is provided directly, then this isn't in the p12 + // format. Different versions of openssl support different p12 formats + // and the key from google wasn't being accepted by the version available + // at the time. + if (!$password && strpos($p12, "-----BEGIN RSA PRIVATE KEY-----") !== false) { + $this->privateKey = openssl_pkey_get_private($p12); + } else { + // This throws on error + $certs = array(); + if (!openssl_pkcs12_read($p12, $certs, $password)) { + throw new Google_Auth_Exception( + "Unable to parse the p12 file. " . + "Is this a .p12 file? Is the password correct? OpenSSL error: " . + openssl_error_string() + ); + } + // TODO(beaton): is this part of the contract for the openssl_pkcs12_read + // method? What happens if there are multiple private keys? Do we care? + if (!array_key_exists("pkey", $certs) || !$certs["pkey"]) { + throw new Google_Auth_Exception("No private key found in p12 file."); + } + $this->privateKey = openssl_pkey_get_private($certs['pkey']); + } + + if (!$this->privateKey) { + throw new Google_Auth_Exception("Unable to load private key"); + } + } + + public function __destruct() + { + if ($this->privateKey) { + openssl_pkey_free($this->privateKey); + } + } + + public function sign($data) + { + if (version_compare(PHP_VERSION, '5.3.0') < 0) { + throw new Google_Auth_Exception( + "PHP 5.3.0 or higher is required to use service accounts." + ); + } + $hash = defined("OPENSSL_ALGO_SHA256") ? OPENSSL_ALGO_SHA256 : "sha256"; + if (!openssl_sign($data, $signature, $this->privateKey, $hash)) { + throw new Google_Auth_Exception("Unable to sign data"); + } + return $signature; + } +} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/service/Google_Utils.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Utils.php index be94902c2ed..f5ef32cd4d6 100644 --- a/apps/files_external/3rdparty/google-api-php-client/src/service/Google_Utils.php +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Utils.php @@ -21,25 +21,33 @@ * * @author Chirag Shah <chirags@google.com> */ -class Google_Utils { - public static function urlSafeB64Encode($data) { +class Google_Utils +{ + public static function urlSafeB64Encode($data) + { $b64 = base64_encode($data); - $b64 = str_replace(array('+', '/', '\r', '\n', '='), - array('-', '_'), - $b64); + $b64 = str_replace( + array('+', '/', '\r', '\n', '='), + array('-', '_'), + $b64 + ); return $b64; } - public static function urlSafeB64Decode($b64) { - $b64 = str_replace(array('-', '_'), - array('+', '/'), - $b64); + public static function urlSafeB64Decode($b64) + { + $b64 = str_replace( + array('-', '_'), + array('+', '/'), + $b64 + ); return base64_decode($b64); } /** - * Misc function used to count the number of bytes in a post body, in the world of multi-byte chars - * and the unpredictability of strlen/mb_strlen/sizeof, this is the only way to do that in a sane + * Misc function used to count the number of bytes in a post body, in the + * world of multi-byte chars and the unpredictability of + * strlen/mb_strlen/sizeof, this is the only way to do that in a sane * manner at the moment. * * This algorithm was originally developed for the @@ -51,7 +59,8 @@ class Google_Utils { * @param string $str * @return int The number of bytes in a string. */ - static public function getStrLen($str) { + public static function getStrLen($str) + { $strlenVar = strlen($str); $d = $ret = 0; for ($count = 0; $count < $strlenVar; ++ $count) { @@ -61,31 +70,26 @@ class Google_Utils { // characters U-00000000 - U-0000007F (same as ASCII) $ret ++; break; - case (($ordinalValue & 0xE0) == 0xC0): // characters U-00000080 - U-000007FF, mask 110XXXXX // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 $ret += 2; break; - case (($ordinalValue & 0xF0) == 0xE0): // characters U-00000800 - U-0000FFFF, mask 1110XXXX // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 $ret += 3; break; - case (($ordinalValue & 0xF8) == 0xF0): // characters U-00010000 - U-001FFFFF, mask 11110XXX // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 $ret += 4; break; - case (($ordinalValue & 0xFC) == 0xF8): // characters U-00200000 - U-03FFFFFF, mask 111110XX // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 $ret += 5; break; - case (($ordinalValue & 0xFE) == 0xFC): // characters U-04000000 - U-7FFFFFFF, mask 1111110X // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 @@ -103,7 +107,8 @@ class Google_Utils { * @param array $arr * @return array Normalized array. */ - public static function normalize($arr) { + public static function normalize($arr) + { if (!is_array($arr)) { return array(); } @@ -114,4 +119,17 @@ class Google_Utils { } return $normalized; } -}
\ No newline at end of file + + /** + * Convert a string to camelCase + * @param string $value + * @return string + */ + public static function camelCase($value) + { + $value = ucwords(str_replace(array('-', '_'), ' ', $value)); + $value = str_replace(' ', '', $value); + $value[0] = strtolower($value[0]); + return $value; + } +} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/Google/Utils/URITemplate.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Utils/URITemplate.php new file mode 100644 index 00000000000..f5ee38bb333 --- /dev/null +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Utils/URITemplate.php @@ -0,0 +1,333 @@ +<?php +/* + * Copyright 2013 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Implementation of levels 1-3 of the URI Template spec. + * @see http://tools.ietf.org/html/rfc6570 + */ +class Google_Utils_URITemplate +{ + const TYPE_MAP = "1"; + const TYPE_LIST = "2"; + const TYPE_SCALAR = "4"; + + /** + * @var $operators array + * These are valid at the start of a template block to + * modify the way in which the variables inside are + * processed. + */ + private $operators = array( + "+" => "reserved", + "/" => "segments", + "." => "dotprefix", + "#" => "fragment", + ";" => "semicolon", + "?" => "form", + "&" => "continuation" + ); + + /** + * @var reserved array + * These are the characters which should not be URL encoded in reserved + * strings. + */ + private $reserved = array( + "=", ",", "!", "@", "|", ":", "/", "?", "#", + "[", "]",'$', "&", "'", "(", ")", "*", "+", ";" + ); + private $reservedEncoded = array( + "%3D", "%2C", "%21", "%40", "%7C", "%3A", "%2F", "%3F", + "%23", "%5B", "%5D", "%24", "%26", "%27", "%28", "%29", + "%2A", "%2B", "%3B" + ); + + public function parse($string, array $parameters) + { + return $this->resolveNextSection($string, $parameters); + } + + /** + * This function finds the first matching {...} block and + * executes the replacement. It then calls itself to find + * subsequent blocks, if any. + */ + private function resolveNextSection($string, $parameters) + { + $start = strpos($string, "{"); + if ($start === false) { + return $string; + } + $end = strpos($string, "}"); + if ($end === false) { + return $string; + } + $string = $this->replace($string, $start, $end, $parameters); + return $this->resolveNextSection($string, $parameters); + } + + private function replace($string, $start, $end, $parameters) + { + // We know a data block will have {} round it, so we can strip that. + $data = substr($string, $start + 1, $end - $start - 1); + + // If the first character is one of the reserved operators, it effects + // the processing of the stream. + if (isset($this->operators[$data[0]])) { + $op = $this->operators[$data[0]]; + $data = substr($data, 1); + $prefix = ""; + $prefix_on_missing = false; + + switch ($op) { + case "reserved": + // Reserved means certain characters should not be URL encoded + $data = $this->replaceVars($data, $parameters, ",", null, true); + break; + case "fragment": + // Comma separated with fragment prefix. Bare values only. + $prefix = "#"; + $prefix_on_missing = true; + $data = $this->replaceVars($data, $parameters, ",", null, true); + break; + case "segments": + // Slash separated data. Bare values only. + $prefix = "/"; + $data =$this->replaceVars($data, $parameters, "/"); + break; + case "dotprefix": + // Dot separated data. Bare values only. + $prefix = "."; + $prefix_on_missing = true; + $data = $this->replaceVars($data, $parameters, "."); + break; + case "semicolon": + // Semicolon prefixed and separated. Uses the key name + $prefix = ";"; + $data = $this->replaceVars($data, $parameters, ";", "=", false, true, false); + break; + case "form": + // Standard URL format. Uses the key name + $prefix = "?"; + $data = $this->replaceVars($data, $parameters, "&", "="); + break; + case "continuation": + // Standard URL, but with leading ampersand. Uses key name. + $prefix = "&"; + $data = $this->replaceVars($data, $parameters, "&", "="); + break; + } + + // Add the initial prefix character if data is valid. + if ($data || ($data !== false && $prefix_on_missing)) { + $data = $prefix . $data; + } + + } else { + // If no operator we replace with the defaults. + $data = $this->replaceVars($data, $parameters); + } + // This is chops out the {...} and replaces with the new section. + return substr($string, 0, $start) . $data . substr($string, $end + 1); + } + + private function replaceVars( + $section, + $parameters, + $sep = ",", + $combine = null, + $reserved = false, + $tag_empty = false, + $combine_on_empty = true + ) { + if (strpos($section, ",") === false) { + // If we only have a single value, we can immediately process. + return $this->combine( + $section, + $parameters, + $sep, + $combine, + $reserved, + $tag_empty, + $combine_on_empty + ); + } else { + // If we have multiple values, we need to split and loop over them. + // Each is treated individually, then glued together with the + // separator character. + $vars = explode(",", $section); + return $this->combineList( + $vars, + $sep, + $parameters, + $combine, + $reserved, + false, // Never emit empty strings in multi-param replacements + $combine_on_empty + ); + } + } + + public function combine( + $key, + $parameters, + $sep, + $combine, + $reserved, + $tag_empty, + $combine_on_empty + ) { + $length = false; + $explode = false; + $skip_final_combine = false; + $value = false; + + // Check for length restriction. + if (strpos($key, ":") !== false) { + list($key, $length) = explode(":", $key); + } + + // Check for explode parameter. + if ($key[strlen($key) - 1] == "*") { + $explode = true; + $key = substr($key, 0, -1); + $skip_final_combine = true; + } + + // Define the list separator. + $list_sep = $explode ? $sep : ","; + + if (isset($parameters[$key])) { + $data_type = $this->getDataType($parameters[$key]); + switch($data_type) { + case self::TYPE_SCALAR: + $value = $this->getValue($parameters[$key], $length); + break; + case self::TYPE_LIST: + $values = array(); + foreach ($parameters[$key] as $pkey => $pvalue) { + $pvalue = $this->getValue($pvalue, $length); + if ($combine && $explode) { + $values[$pkey] = $key . $combine . $pvalue; + } else { + $values[$pkey] = $pvalue; + } + } + $value = implode($list_sep, $values); + if ($value == '') { + return ''; + } + break; + case self::TYPE_MAP: + $values = array(); + foreach ($parameters[$key] as $pkey => $pvalue) { + $pvalue = $this->getValue($pvalue, $length); + if ($explode) { + $pkey = $this->getValue($pkey, $length); + $values[] = $pkey . "=" . $pvalue; // Explode triggers = combine. + } else { + $values[] = $pkey; + $values[] = $pvalue; + } + } + $value = implode($list_sep, $values); + if ($value == '') { + return false; + } + break; + } + } else if ($tag_empty) { + // If we are just indicating empty values with their key name, return that. + return $key; + } else { + // Otherwise we can skip this variable due to not being defined. + return false; + } + + if ($reserved) { + $value = str_replace($this->reservedEncoded, $this->reserved, $value); + } + + // If we do not need to include the key name, we just return the raw + // value. + if (!$combine || $skip_final_combine) { + return $value; + } + + // Else we combine the key name: foo=bar, if value is not the empty string. + return $key . ($value != '' || $combine_on_empty ? $combine . $value : ''); + } + + /** + * Return the type of a passed in value + */ + private function getDataType($data) + { + if (is_array($data)) { + reset($data); + if (key($data) !== 0) { + return self::TYPE_MAP; + } + return self::TYPE_LIST; + } + return self::TYPE_SCALAR; + } + + /** + * Utility function that merges multiple combine calls + * for multi-key templates. + */ + private function combineList( + $vars, + $sep, + $parameters, + $combine, + $reserved, + $tag_empty, + $combine_on_empty + ) { + $ret = array(); + foreach ($vars as $var) { + $response = $this->combine( + $var, + $parameters, + $sep, + $combine, + $reserved, + $tag_empty, + $combine_on_empty + ); + if ($response === false) { + continue; + } + $ret[] = $response; + } + return implode($sep, $ret); + } + + /** + * Utility function to encode and trim values + */ + private function getValue($value, $length) + { + if ($length) { + $value = substr($value, 0, $length); + } + $value = rawurlencode($value); + return $value; + } +} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/auth/Google_Verifier.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Verifier/Abstract.php index 2839a371df1..e6c9eeb03cc 100644 --- a/apps/files_external/3rdparty/google-api-php-client/src/auth/Google_Verifier.php +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Verifier/Abstract.php @@ -15,14 +15,13 @@ * limitations under the License. */ -require_once "Google_PemVerifier.php"; - /** * Verifies signatures. * * @author Brian Eaton <beaton@google.com> */ -abstract class Google_Verifier { +abstract class Google_Verifier_Abstract +{ /** * Checks a signature, returns true if the signature is correct, * false otherwise. diff --git a/apps/files_external/3rdparty/google-api-php-client/src/auth/Google_PemVerifier.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Verifier/Pem.php index 6c1c85fa20e..f281575e172 100644 --- a/apps/files_external/3rdparty/google-api-php-client/src/auth/Google_PemVerifier.php +++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Verifier/Pem.php @@ -14,13 +14,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +require_once 'Google/Auth/Exception.php'; +require_once 'Google/Verifier/Abstract.php'; /** * Verifies signatures using PEM encoded certificates. * * @author Brian Eaton <beaton@google.com> */ -class Google_PemVerifier extends Google_Verifier { +class Google_Verifier_Pem extends Google_Verifier_Abstract +{ private $publicKey; /** @@ -28,20 +32,22 @@ class Google_PemVerifier extends Google_Verifier { * * $pem: a PEM encoded certificate (not a file). * @param $pem - * @throws Google_AuthException + * @throws Google_Auth_Exception * @throws Google_Exception */ - function __construct($pem) { + public function __construct($pem) + { if (!function_exists('openssl_x509_read')) { throw new Google_Exception('Google API PHP client needs the openssl PHP extension'); } $this->publicKey = openssl_x509_read($pem); if (!$this->publicKey) { - throw new Google_AuthException("Unable to parse PEM: $pem"); + throw new Google_Auth_Exception("Unable to parse PEM: $pem"); } } - function __destruct() { + public function __destruct() + { if ($this->publicKey) { openssl_x509_free($this->publicKey); } @@ -53,13 +59,15 @@ class Google_PemVerifier extends Google_Verifier { * Returns true if the signature is valid, false otherwise. * @param $data * @param $signature - * @throws Google_AuthException + * @throws Google_Auth_Exception * @return bool */ - function verify($data, $signature) { - $status = openssl_verify($data, $signature, $this->publicKey, "sha256"); + public function verify($data, $signature) + { + $hash = defined("OPENSSL_ALGO_SHA256") ? OPENSSL_ALGO_SHA256 : "sha256"; + $status = openssl_verify($data, $signature, $this->publicKey, $hash); if ($status === -1) { - throw new Google_AuthException('Signature verification error: ' . openssl_error_string()); + throw new Google_Auth_Exception('Signature verification error: ' . openssl_error_string()); } return $status === 1; } diff --git a/apps/files_external/3rdparty/google-api-php-client/src/Google_Client.php b/apps/files_external/3rdparty/google-api-php-client/src/Google_Client.php deleted file mode 100644 index 498d3a8e9dd..00000000000 --- a/apps/files_external/3rdparty/google-api-php-client/src/Google_Client.php +++ /dev/null @@ -1,462 +0,0 @@ -<?php -/* - * Copyright 2010 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// Check for the required json and curl extensions, the Google APIs PHP Client -// won't function without them. -if (! function_exists('curl_init')) { - throw new Exception('Google PHP API Client requires the CURL PHP extension'); -} - -if (! function_exists('json_decode')) { - throw new Exception('Google PHP API Client requires the JSON PHP extension'); -} - -if (! function_exists('http_build_query')) { - throw new Exception('Google PHP API Client requires http_build_query()'); -} - -if (! ini_get('date.timezone') && function_exists('date_default_timezone_set')) { - date_default_timezone_set('UTC'); -} - -// hack around with the include paths a bit so the library 'just works' -set_include_path(dirname(__FILE__) . PATH_SEPARATOR . get_include_path()); - -require_once "config.php"; -// If a local configuration file is found, merge it's values with the default configuration -if (file_exists(dirname(__FILE__) . '/local_config.php')) { - $defaultConfig = $apiConfig; - require_once (dirname(__FILE__) . '/local_config.php'); - $apiConfig = array_merge($defaultConfig, $apiConfig); -} - -// Include the top level classes, they each include their own dependencies -require_once 'service/Google_Model.php'; -require_once 'service/Google_Service.php'; -require_once 'service/Google_ServiceResource.php'; -require_once 'auth/Google_AssertionCredentials.php'; -require_once 'auth/Google_Signer.php'; -require_once 'auth/Google_P12Signer.php'; -require_once 'service/Google_BatchRequest.php'; -require_once 'external/URITemplateParser.php'; -require_once 'auth/Google_Auth.php'; -require_once 'cache/Google_Cache.php'; -require_once 'io/Google_IO.php'; -require_once('service/Google_MediaFileUpload.php'); - -/** - * The Google API Client - * http://code.google.com/p/google-api-php-client/ - * - * @author Chris Chabot <chabotc@google.com> - * @author Chirag Shah <chirags@google.com> - */ -class Google_Client { - /** - * @static - * @var Google_Auth $auth - */ - static $auth; - - /** - * @static - * @var Google_IO $io - */ - static $io; - - /** - * @static - * @var Google_Cache $cache - */ - static $cache; - - /** - * @static - * @var boolean $useBatch - */ - static $useBatch = false; - - /** @var array $scopes */ - protected $scopes = array(); - - /** @var bool $useObjects */ - protected $useObjects = false; - - // definitions of services that are discovered. - protected $services = array(); - - // Used to track authenticated state, can't discover services after doing authenticate() - private $authenticated = false; - - public function __construct($config = array()) { - global $apiConfig; - $apiConfig = array_merge($apiConfig, $config); - self::$cache = new $apiConfig['cacheClass'](); - self::$auth = new $apiConfig['authClass'](); - self::$io = new $apiConfig['ioClass'](); - } - - /** - * Add a service - */ - public function addService($service, $version = false) { - global $apiConfig; - if ($this->authenticated) { - throw new Google_Exception('Cant add services after having authenticated'); - } - $this->services[$service] = array(); - if (isset($apiConfig['services'][$service])) { - // Merge the service descriptor with the default values - $this->services[$service] = array_merge($this->services[$service], $apiConfig['services'][$service]); - } - } - - public function authenticate($code = null) { - $service = $this->prepareService(); - $this->authenticated = true; - return self::$auth->authenticate($service, $code); - } - - /** - * @return array - * @visible For Testing - */ - public function prepareService() { - $service = array(); - $scopes = array(); - if ($this->scopes) { - $scopes = $this->scopes; - } else { - foreach ($this->services as $key => $val) { - if (isset($val['scope'])) { - if (is_array($val['scope'])) { - $scopes = array_merge($val['scope'], $scopes); - } else { - $scopes[] = $val['scope']; - } - } else { - $scopes[] = 'https://www.googleapis.com/auth/' . $key; - } - unset($val['discoveryURI']); - unset($val['scope']); - $service = array_merge($service, $val); - } - } - $service['scope'] = implode(' ', $scopes); - return $service; - } - - /** - * Set the OAuth 2.0 access token using the string that resulted from calling authenticate() - * or Google_Client#getAccessToken(). - * @param string $accessToken JSON encoded string containing in the following format: - * {"access_token":"TOKEN", "refresh_token":"TOKEN", "token_type":"Bearer", - * "expires_in":3600, "id_token":"TOKEN", "created":1320790426} - */ - public function setAccessToken($accessToken) { - if ($accessToken == null || 'null' == $accessToken) { - $accessToken = null; - } - self::$auth->setAccessToken($accessToken); - } - - /** - * Set the type of Auth class the client should use. - * @param string $authClassName - */ - public function setAuthClass($authClassName) { - self::$auth = new $authClassName(); - } - - /** - * Construct the OAuth 2.0 authorization request URI. - * @return string - */ - public function createAuthUrl() { - $service = $this->prepareService(); - return self::$auth->createAuthUrl($service['scope']); - } - - /** - * Get the OAuth 2.0 access token. - * @return string $accessToken JSON encoded string in the following format: - * {"access_token":"TOKEN", "refresh_token":"TOKEN", "token_type":"Bearer", - * "expires_in":3600,"id_token":"TOKEN", "created":1320790426} - */ - public function getAccessToken() { - $token = self::$auth->getAccessToken(); - return (null == $token || 'null' == $token) ? null : $token; - } - - /** - * Returns if the access_token is expired. - * @return bool Returns True if the access_token is expired. - */ - public function isAccessTokenExpired() { - return self::$auth->isAccessTokenExpired(); - } - - /** - * Set the developer key to use, these are obtained through the API Console. - * @see http://code.google.com/apis/console-help/#generatingdevkeys - * @param string $developerKey - */ - public function setDeveloperKey($developerKey) { - self::$auth->setDeveloperKey($developerKey); - } - - /** - * Set OAuth 2.0 "state" parameter to achieve per-request customization. - * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-22#section-3.1.2.2 - * @param string $state - */ - public function setState($state) { - self::$auth->setState($state); - } - - /** - * @param string $accessType Possible values for access_type include: - * {@code "offline"} to request offline access from the user. (This is the default value) - * {@code "online"} to request online access from the user. - */ - public function setAccessType($accessType) { - self::$auth->setAccessType($accessType); - } - - /** - * @param string $approvalPrompt Possible values for approval_prompt include: - * {@code "force"} to force the approval UI to appear. (This is the default value) - * {@code "auto"} to request auto-approval when possible. - */ - public function setApprovalPrompt($approvalPrompt) { - self::$auth->setApprovalPrompt($approvalPrompt); - } - - /** - * Set the application name, this is included in the User-Agent HTTP header. - * @param string $applicationName - */ - public function setApplicationName($applicationName) { - global $apiConfig; - $apiConfig['application_name'] = $applicationName; - } - - /** - * Set the OAuth 2.0 Client ID. - * @param string $clientId - */ - public function setClientId($clientId) { - global $apiConfig; - $apiConfig['oauth2_client_id'] = $clientId; - self::$auth->clientId = $clientId; - } - - /** - * Get the OAuth 2.0 Client ID. - */ - public function getClientId() { - return self::$auth->clientId; - } - - /** - * Set the OAuth 2.0 Client Secret. - * @param string $clientSecret - */ - public function setClientSecret($clientSecret) { - global $apiConfig; - $apiConfig['oauth2_client_secret'] = $clientSecret; - self::$auth->clientSecret = $clientSecret; - } - - /** - * Get the OAuth 2.0 Client Secret. - */ - public function getClientSecret() { - return self::$auth->clientSecret; - } - - /** - * Set the OAuth 2.0 Redirect URI. - * @param string $redirectUri - */ - public function setRedirectUri($redirectUri) { - global $apiConfig; - $apiConfig['oauth2_redirect_uri'] = $redirectUri; - self::$auth->redirectUri = $redirectUri; - } - - /** - * Get the OAuth 2.0 Redirect URI. - */ - public function getRedirectUri() { - return self::$auth->redirectUri; - } - - /** - * Fetches a fresh OAuth 2.0 access token with the given refresh token. - * @param string $refreshToken - * @return void - */ - public function refreshToken($refreshToken) { - self::$auth->refreshToken($refreshToken); - } - - /** - * Revoke an OAuth2 access token or refresh token. This method will revoke the current access - * token, if a token isn't provided. - * @throws Google_AuthException - * @param string|null $token The token (access token or a refresh token) that should be revoked. - * @return boolean Returns True if the revocation was successful, otherwise False. - */ - public function revokeToken($token = null) { - self::$auth->revokeToken($token); - } - - /** - * Verify an id_token. This method will verify the current id_token, if one - * isn't provided. - * @throws Google_AuthException - * @param string|null $token The token (id_token) that should be verified. - * @return Google_LoginTicket Returns an apiLoginTicket if the verification was - * successful. - */ - public function verifyIdToken($token = null) { - return self::$auth->verifyIdToken($token); - } - - /** - * @param Google_AssertionCredentials $creds - * @return void - */ - public function setAssertionCredentials(Google_AssertionCredentials $creds) { - self::$auth->setAssertionCredentials($creds); - } - - /** - * This function allows you to overrule the automatically generated scopes, - * so that you can ask for more or less permission in the auth flow - * Set this before you call authenticate() though! - * @param array $scopes, ie: array('https://www.googleapis.com/auth/plus.me', 'https://www.googleapis.com/auth/moderator') - */ - public function setScopes($scopes) { - $this->scopes = is_string($scopes) ? explode(" ", $scopes) : $scopes; - } - - /** - * Returns the list of scopes set on the client - * @return array the list of scopes - * - */ - public function getScopes() { - return $this->scopes; - } - - /** - * Declare if objects should be returned by the api service classes. - * - * @param boolean $useObjects True if objects should be returned by the service classes. - * False if associative arrays should be returned (default behavior). - * @experimental - */ - public function setUseObjects($useObjects) { - global $apiConfig; - $apiConfig['use_objects'] = $useObjects; - } - - /** - * Declare if objects should be returned by the api service classes. - * - * @param boolean $useBatch True if the experimental batch support should - * be enabled. Defaults to False. - * @experimental - */ - public function setUseBatch($useBatch) { - self::$useBatch = $useBatch; - } - - /** - * @static - * @return Google_Auth the implementation of apiAuth. - */ - public static function getAuth() { - return Google_Client::$auth; - } - - /** - * @static - * @return Google_IO the implementation of apiIo. - */ - public static function getIo() { - return Google_Client::$io; - } - - /** - * @return Google_Cache the implementation of apiCache. - */ - public function getCache() { - return Google_Client::$cache; - } -} - -// Exceptions that the Google PHP API Library can throw -class Google_Exception extends Exception {} -class Google_AuthException extends Google_Exception {} -class Google_CacheException extends Google_Exception {} -class Google_IOException extends Google_Exception {} -class Google_ServiceException extends Google_Exception { - /** - * Optional list of errors returned in a JSON body of an HTTP error response. - */ - protected $errors = array(); - - /** - * Override default constructor to add ability to set $errors. - * - * @param string $message - * @param int $code - * @param Exception|null $previous - * @param [{string, string}] errors List of errors returned in an HTTP - * response. Defaults to []. - */ - public function __construct($message, $code = 0, Exception $previous = null, - $errors = array()) { - if(version_compare(PHP_VERSION, '5.3.0') >= 0) { - parent::__construct($message, $code, $previous); - } else { - parent::__construct($message, $code); - } - - $this->errors = $errors; - } - - /** - * An example of the possible errors returned. - * - * { - * "domain": "global", - * "reason": "authError", - * "message": "Invalid Credentials", - * "locationType": "header", - * "location": "Authorization", - * } - * - * @return [{string, string}] List of errors return in an HTTP response or []. - */ - public function getErrors() { - return $this->errors; - } -} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/auth/Google_AuthNone.php b/apps/files_external/3rdparty/google-api-php-client/src/auth/Google_AuthNone.php deleted file mode 100644 index 6ca6bc2b0db..00000000000 --- a/apps/files_external/3rdparty/google-api-php-client/src/auth/Google_AuthNone.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php -/* - * Copyright 2010 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Do-nothing authentication implementation, use this if you want to make un-authenticated calls - * @author Chris Chabot <chabotc@google.com> - * @author Chirag Shah <chirags@google.com> - */ -class Google_AuthNone extends Google_Auth { - public $key = null; - - public function __construct() { - global $apiConfig; - if (!empty($apiConfig['developer_key'])) { - $this->setDeveloperKey($apiConfig['developer_key']); - } - } - - public function setDeveloperKey($key) {$this->key = $key;} - public function authenticate($service) {/*noop*/} - public function setAccessToken($accessToken) {/* noop*/} - public function getAccessToken() {return null;} - public function createAuthUrl($scope) {return null;} - public function refreshToken($refreshToken) {/* noop*/} - public function revokeToken() {/* noop*/} - - public function sign(Google_HttpRequest $request) { - if ($this->key) { - $request->setUrl($request->getUrl() . ((strpos($request->getUrl(), '?') === false) ? '?' : '&') - . 'key='.urlencode($this->key)); - } - return $request; - } -} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/auth/Google_OAuth2.php b/apps/files_external/3rdparty/google-api-php-client/src/auth/Google_OAuth2.php deleted file mode 100644 index a07d4365a7a..00000000000 --- a/apps/files_external/3rdparty/google-api-php-client/src/auth/Google_OAuth2.php +++ /dev/null @@ -1,445 +0,0 @@ -<?php -/* - * Copyright 2008 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -require_once "Google_Verifier.php"; -require_once "Google_LoginTicket.php"; -require_once "service/Google_Utils.php"; - -/** - * Authentication class that deals with the OAuth 2 web-server authentication flow - * - * @author Chris Chabot <chabotc@google.com> - * @author Chirag Shah <chirags@google.com> - * - */ -class Google_OAuth2 extends Google_Auth { - public $clientId; - public $clientSecret; - public $developerKey; - public $token; - public $redirectUri; - public $state; - public $accessType = 'offline'; - public $approvalPrompt = 'force'; - - /** @var Google_AssertionCredentials $assertionCredentials */ - public $assertionCredentials; - - const OAUTH2_REVOKE_URI = 'https://accounts.google.com/o/oauth2/revoke'; - const OAUTH2_TOKEN_URI = 'https://accounts.google.com/o/oauth2/token'; - const OAUTH2_AUTH_URL = 'https://accounts.google.com/o/oauth2/auth'; - const OAUTH2_FEDERATED_SIGNON_CERTS_URL = 'https://www.googleapis.com/oauth2/v1/certs'; - const CLOCK_SKEW_SECS = 300; // five minutes in seconds - const AUTH_TOKEN_LIFETIME_SECS = 300; // five minutes in seconds - const MAX_TOKEN_LIFETIME_SECS = 86400; // one day in seconds - - /** - * Instantiates the class, but does not initiate the login flow, leaving it - * to the discretion of the caller (which is done by calling authenticate()). - */ - public function __construct() { - global $apiConfig; - - if (! empty($apiConfig['developer_key'])) { - $this->developerKey = $apiConfig['developer_key']; - } - - if (! empty($apiConfig['oauth2_client_id'])) { - $this->clientId = $apiConfig['oauth2_client_id']; - } - - if (! empty($apiConfig['oauth2_client_secret'])) { - $this->clientSecret = $apiConfig['oauth2_client_secret']; - } - - if (! empty($apiConfig['oauth2_redirect_uri'])) { - $this->redirectUri = $apiConfig['oauth2_redirect_uri']; - } - - if (! empty($apiConfig['oauth2_access_type'])) { - $this->accessType = $apiConfig['oauth2_access_type']; - } - - if (! empty($apiConfig['oauth2_approval_prompt'])) { - $this->approvalPrompt = $apiConfig['oauth2_approval_prompt']; - } - - } - - /** - * @param $service - * @param string|null $code - * @throws Google_AuthException - * @return string - */ - public function authenticate($service, $code = null) { - if (!$code && isset($_GET['code'])) { - $code = $_GET['code']; - } - - if ($code) { - // We got here from the redirect from a successful authorization grant, fetch the access token - $request = Google_Client::$io->makeRequest(new Google_HttpRequest(self::OAUTH2_TOKEN_URI, 'POST', array(), array( - 'code' => $code, - 'grant_type' => 'authorization_code', - 'redirect_uri' => $this->redirectUri, - 'client_id' => $this->clientId, - 'client_secret' => $this->clientSecret - ))); - - if ($request->getResponseHttpCode() == 200) { - $this->setAccessToken($request->getResponseBody()); - $this->token['created'] = time(); - return $this->getAccessToken(); - } else { - $response = $request->getResponseBody(); - $decodedResponse = json_decode($response, true); - if ($decodedResponse != null && $decodedResponse['error']) { - $response = $decodedResponse['error']; - } - throw new Google_AuthException("Error fetching OAuth2 access token, message: '$response'", $request->getResponseHttpCode()); - } - } - - $authUrl = $this->createAuthUrl($service['scope']); - header('Location: ' . $authUrl); - return true; - } - - /** - * Create a URL to obtain user authorization. - * The authorization endpoint allows the user to first - * authenticate, and then grant/deny the access request. - * @param string $scope The scope is expressed as a list of space-delimited strings. - * @return string - */ - public function createAuthUrl($scope) { - $params = array( - 'response_type=code', - 'redirect_uri=' . urlencode($this->redirectUri), - 'client_id=' . urlencode($this->clientId), - 'scope=' . urlencode($scope), - 'access_type=' . urlencode($this->accessType), - 'approval_prompt=' . urlencode($this->approvalPrompt), - ); - - if (isset($this->state)) { - $params[] = 'state=' . urlencode($this->state); - } - $params = implode('&', $params); - return self::OAUTH2_AUTH_URL . "?$params"; - } - - /** - * @param string $token - * @throws Google_AuthException - */ - public function setAccessToken($token) { - $token = json_decode($token, true); - if ($token == null) { - throw new Google_AuthException('Could not json decode the token'); - } - if (! isset($token['access_token'])) { - throw new Google_AuthException("Invalid token format"); - } - $this->token = $token; - } - - public function getAccessToken() { - return json_encode($this->token); - } - - public function setDeveloperKey($developerKey) { - $this->developerKey = $developerKey; - } - - public function setState($state) { - $this->state = $state; - } - - public function setAccessType($accessType) { - $this->accessType = $accessType; - } - - public function setApprovalPrompt($approvalPrompt) { - $this->approvalPrompt = $approvalPrompt; - } - - public function setAssertionCredentials(Google_AssertionCredentials $creds) { - $this->assertionCredentials = $creds; - } - - /** - * Include an accessToken in a given apiHttpRequest. - * @param Google_HttpRequest $request - * @return Google_HttpRequest - * @throws Google_AuthException - */ - public function sign(Google_HttpRequest $request) { - // add the developer key to the request before signing it - if ($this->developerKey) { - $requestUrl = $request->getUrl(); - $requestUrl .= (strpos($request->getUrl(), '?') === false) ? '?' : '&'; - $requestUrl .= 'key=' . urlencode($this->developerKey); - $request->setUrl($requestUrl); - } - - // Cannot sign the request without an OAuth access token. - if (null == $this->token && null == $this->assertionCredentials) { - return $request; - } - - // Check if the token is set to expire in the next 30 seconds - // (or has already expired). - if ($this->isAccessTokenExpired()) { - if ($this->assertionCredentials) { - $this->refreshTokenWithAssertion(); - } else { - if (! array_key_exists('refresh_token', $this->token)) { - throw new Google_AuthException("The OAuth 2.0 access token has expired, " - . "and a refresh token is not available. Refresh tokens are not " - . "returned for responses that were auto-approved."); - } - $this->refreshToken($this->token['refresh_token']); - } - } - - // Add the OAuth2 header to the request - $request->setRequestHeaders( - array('Authorization' => 'Bearer ' . $this->token['access_token']) - ); - - return $request; - } - - /** - * Fetches a fresh access token with the given refresh token. - * @param string $refreshToken - * @return void - */ - public function refreshToken($refreshToken) { - $this->refreshTokenRequest(array( - 'client_id' => $this->clientId, - 'client_secret' => $this->clientSecret, - 'refresh_token' => $refreshToken, - 'grant_type' => 'refresh_token' - )); - } - - /** - * Fetches a fresh access token with a given assertion token. - * @param Google_AssertionCredentials $assertionCredentials optional. - * @return void - */ - public function refreshTokenWithAssertion($assertionCredentials = null) { - if (!$assertionCredentials) { - $assertionCredentials = $this->assertionCredentials; - } - - $this->refreshTokenRequest(array( - 'grant_type' => 'assertion', - 'assertion_type' => $assertionCredentials->assertionType, - 'assertion' => $assertionCredentials->generateAssertion(), - )); - } - - private function refreshTokenRequest($params) { - $http = new Google_HttpRequest(self::OAUTH2_TOKEN_URI, 'POST', array(), $params); - $request = Google_Client::$io->makeRequest($http); - - $code = $request->getResponseHttpCode(); - $body = $request->getResponseBody(); - if (200 == $code) { - $token = json_decode($body, true); - if ($token == null) { - throw new Google_AuthException("Could not json decode the access token"); - } - - if (! isset($token['access_token']) || ! isset($token['expires_in'])) { - throw new Google_AuthException("Invalid token format"); - } - - $this->token['access_token'] = $token['access_token']; - $this->token['expires_in'] = $token['expires_in']; - $this->token['created'] = time(); - } else { - throw new Google_AuthException("Error refreshing the OAuth2 token, message: '$body'", $code); - } - } - - /** - * Revoke an OAuth2 access token or refresh token. This method will revoke the current access - * token, if a token isn't provided. - * @throws Google_AuthException - * @param string|null $token The token (access token or a refresh token) that should be revoked. - * @return boolean Returns True if the revocation was successful, otherwise False. - */ - public function revokeToken($token = null) { - if (!$token) { - $token = $this->token['access_token']; - } - $request = new Google_HttpRequest(self::OAUTH2_REVOKE_URI, 'POST', array(), "token=$token"); - $response = Google_Client::$io->makeRequest($request); - $code = $response->getResponseHttpCode(); - if ($code == 200) { - $this->token = null; - return true; - } - - return false; - } - - /** - * Returns if the access_token is expired. - * @return bool Returns True if the access_token is expired. - */ - public function isAccessTokenExpired() { - if (null == $this->token) { - return true; - } - - // If the token is set to expire in the next 30 seconds. - $expired = ($this->token['created'] - + ($this->token['expires_in'] - 30)) < time(); - - return $expired; - } - - // Gets federated sign-on certificates to use for verifying identity tokens. - // Returns certs as array structure, where keys are key ids, and values - // are PEM encoded certificates. - private function getFederatedSignOnCerts() { - // This relies on makeRequest caching certificate responses. - $request = Google_Client::$io->makeRequest(new Google_HttpRequest( - self::OAUTH2_FEDERATED_SIGNON_CERTS_URL)); - if ($request->getResponseHttpCode() == 200) { - $certs = json_decode($request->getResponseBody(), true); - if ($certs) { - return $certs; - } - } - throw new Google_AuthException( - "Failed to retrieve verification certificates: '" . - $request->getResponseBody() . "'.", - $request->getResponseHttpCode()); - } - - /** - * Verifies an id token and returns the authenticated apiLoginTicket. - * Throws an exception if the id token is not valid. - * The audience parameter can be used to control which id tokens are - * accepted. By default, the id token must have been issued to this OAuth2 client. - * - * @param $id_token - * @param $audience - * @return Google_LoginTicket - */ - public function verifyIdToken($id_token = null, $audience = null) { - if (!$id_token) { - $id_token = $this->token['id_token']; - } - - $certs = $this->getFederatedSignonCerts(); - if (!$audience) { - $audience = $this->clientId; - } - return $this->verifySignedJwtWithCerts($id_token, $certs, $audience); - } - - // Verifies the id token, returns the verified token contents. - // Visible for testing. - function verifySignedJwtWithCerts($jwt, $certs, $required_audience) { - $segments = explode(".", $jwt); - if (count($segments) != 3) { - throw new Google_AuthException("Wrong number of segments in token: $jwt"); - } - $signed = $segments[0] . "." . $segments[1]; - $signature = Google_Utils::urlSafeB64Decode($segments[2]); - - // Parse envelope. - $envelope = json_decode(Google_Utils::urlSafeB64Decode($segments[0]), true); - if (!$envelope) { - throw new Google_AuthException("Can't parse token envelope: " . $segments[0]); - } - - // Parse token - $json_body = Google_Utils::urlSafeB64Decode($segments[1]); - $payload = json_decode($json_body, true); - if (!$payload) { - throw new Google_AuthException("Can't parse token payload: " . $segments[1]); - } - - // Check signature - $verified = false; - foreach ($certs as $keyName => $pem) { - $public_key = new Google_PemVerifier($pem); - if ($public_key->verify($signed, $signature)) { - $verified = true; - break; - } - } - - if (!$verified) { - throw new Google_AuthException("Invalid token signature: $jwt"); - } - - // Check issued-at timestamp - $iat = 0; - if (array_key_exists("iat", $payload)) { - $iat = $payload["iat"]; - } - if (!$iat) { - throw new Google_AuthException("No issue time in token: $json_body"); - } - $earliest = $iat - self::CLOCK_SKEW_SECS; - - // Check expiration timestamp - $now = time(); - $exp = 0; - if (array_key_exists("exp", $payload)) { - $exp = $payload["exp"]; - } - if (!$exp) { - throw new Google_AuthException("No expiration time in token: $json_body"); - } - if ($exp >= $now + self::MAX_TOKEN_LIFETIME_SECS) { - throw new Google_AuthException( - "Expiration time too far in future: $json_body"); - } - - $latest = $exp + self::CLOCK_SKEW_SECS; - if ($now < $earliest) { - throw new Google_AuthException( - "Token used too early, $now < $earliest: $json_body"); - } - if ($now > $latest) { - throw new Google_AuthException( - "Token used too late, $now > $latest: $json_body"); - } - - // TODO(beaton): check issuer field? - - // Check audience - $aud = $payload["aud"]; - if ($aud != $required_audience) { - throw new Google_AuthException("Wrong recipient, $aud != $required_audience: $json_body"); - } - - // All good. - return new Google_LoginTicket($envelope, $payload); - } -} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/auth/Google_P12Signer.php b/apps/files_external/3rdparty/google-api-php-client/src/auth/Google_P12Signer.php deleted file mode 100644 index 1bed5909913..00000000000 --- a/apps/files_external/3rdparty/google-api-php-client/src/auth/Google_P12Signer.php +++ /dev/null @@ -1,70 +0,0 @@ -<?php -/* - * Copyright 2011 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Signs data. - * - * Only used for testing. - * - * @author Brian Eaton <beaton@google.com> - */ -class Google_P12Signer extends Google_Signer { - // OpenSSL private key resource - private $privateKey; - - // Creates a new signer from a .p12 file. - function __construct($p12, $password) { - if (!function_exists('openssl_x509_read')) { - throw new Exception( - 'The Google PHP API library needs the openssl PHP extension'); - } - - // This throws on error - $certs = array(); - if (!openssl_pkcs12_read($p12, $certs, $password)) { - throw new Google_AuthException("Unable to parse the p12 file. " . - "Is this a .p12 file? Is the password correct? OpenSSL error: " . - openssl_error_string()); - } - // TODO(beaton): is this part of the contract for the openssl_pkcs12_read - // method? What happens if there are multiple private keys? Do we care? - if (!array_key_exists("pkey", $certs) || !$certs["pkey"]) { - throw new Google_AuthException("No private key found in p12 file."); - } - $this->privateKey = openssl_pkey_get_private($certs["pkey"]); - if (!$this->privateKey) { - throw new Google_AuthException("Unable to load private key in "); - } - } - - function __destruct() { - if ($this->privateKey) { - openssl_pkey_free($this->privateKey); - } - } - - function sign($data) { - if(version_compare(PHP_VERSION, '5.3.0') < 0) { - throw new Google_AuthException( - "PHP 5.3.0 or higher is required to use service accounts."); - } - if (!openssl_sign($data, $signature, $this->privateKey, "sha256")) { - throw new Google_AuthException("Unable to sign data"); - } - return $signature; - } -} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/cache/Google_ApcCache.php b/apps/files_external/3rdparty/google-api-php-client/src/cache/Google_ApcCache.php deleted file mode 100644 index 3523c98dcca..00000000000 --- a/apps/files_external/3rdparty/google-api-php-client/src/cache/Google_ApcCache.php +++ /dev/null @@ -1,98 +0,0 @@ -<?php -/* - * Copyright 2010 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * A persistent storage class based on the APC cache, which is not - * really very persistent, as soon as you restart your web server - * the storage will be wiped, however for debugging and/or speed - * it can be useful, kinda, and cache is a lot cheaper then storage. - * - * @author Chris Chabot <chabotc@google.com> - */ -class googleApcCache extends Google_Cache { - - public function __construct() { - if (! function_exists('apc_add')) { - throw new Google_CacheException("Apc functions not available"); - } - } - - private function isLocked($key) { - if ((@apc_fetch($key . '.lock')) === false) { - return false; - } - return true; - } - - private function createLock($key) { - // the interesting thing is that this could fail if the lock was created in the meantime.. - // but we'll ignore that out of convenience - @apc_add($key . '.lock', '', 5); - } - - private function removeLock($key) { - // suppress all warnings, if some other process removed it that's ok too - @apc_delete($key . '.lock'); - } - - private function waitForLock($key) { - // 20 x 250 = 5 seconds - $tries = 20; - $cnt = 0; - do { - // 250 ms is a long time to sleep, but it does stop the server from burning all resources on polling locks.. - usleep(250); - $cnt ++; - } while ($cnt <= $tries && $this->isLocked($key)); - if ($this->isLocked($key)) { - // 5 seconds passed, assume the owning process died off and remove it - $this->removeLock($key); - } - } - - /** - * @inheritDoc - */ - public function get($key, $expiration = false) { - - if (($ret = @apc_fetch($key)) === false) { - return false; - } - if (!$expiration || (time() - $ret['time'] > $expiration)) { - $this->delete($key); - return false; - } - return unserialize($ret['data']); - } - - /** - * @inheritDoc - */ - public function set($key, $value) { - if (@apc_store($key, array('time' => time(), 'data' => serialize($value))) == false) { - throw new Google_CacheException("Couldn't store data"); - } - } - - /** - * @inheritDoc - * @param String $key - */ - public function delete($key) { - @apc_delete($key); - } -} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/cache/Google_FileCache.php b/apps/files_external/3rdparty/google-api-php-client/src/cache/Google_FileCache.php deleted file mode 100644 index 1e32859a48b..00000000000 --- a/apps/files_external/3rdparty/google-api-php-client/src/cache/Google_FileCache.php +++ /dev/null @@ -1,137 +0,0 @@ -<?php -/* - * Copyright 2008 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * This class implements a basic on disk storage. While that does - * work quite well it's not the most elegant and scalable solution. - * It will also get you into a heap of trouble when you try to run - * this in a clustered environment. In those cases please use the - * MySql back-end - * - * @author Chris Chabot <chabotc@google.com> - */ -class Google_FileCache extends Google_Cache { - private $path; - - public function __construct() { - global $apiConfig; - $this->path = $apiConfig['ioFileCache_directory']; - } - - private function isLocked($storageFile) { - // our lock file convention is simple: /the/file/path.lock - return file_exists($storageFile . '.lock'); - } - - private function createLock($storageFile) { - $storageDir = dirname($storageFile); - if (! is_dir($storageDir)) { - // @codeCoverageIgnoreStart - if (! @mkdir($storageDir, 0755, true)) { - // make sure the failure isn't because of a concurrency issue - if (! is_dir($storageDir)) { - throw new Google_CacheException("Could not create storage directory: $storageDir"); - } - } - // @codeCoverageIgnoreEnd - } - @touch($storageFile . '.lock'); - } - - private function removeLock($storageFile) { - // suppress all warnings, if some other process removed it that's ok too - @unlink($storageFile . '.lock'); - } - - private function waitForLock($storageFile) { - // 20 x 250 = 5 seconds - $tries = 20; - $cnt = 0; - do { - // make sure PHP picks up on file changes. This is an expensive action but really can't be avoided - clearstatcache(); - // 250 ms is a long time to sleep, but it does stop the server from burning all resources on polling locks.. - usleep(250); - $cnt ++; - } while ($cnt <= $tries && $this->isLocked($storageFile)); - if ($this->isLocked($storageFile)) { - // 5 seconds passed, assume the owning process died off and remove it - $this->removeLock($storageFile); - } - } - - private function getCacheDir($hash) { - // use the first 2 characters of the hash as a directory prefix - // this should prevent slowdowns due to huge directory listings - // and thus give some basic amount of scalability - return $this->path . '/' . substr($hash, 0, 2); - } - - private function getCacheFile($hash) { - return $this->getCacheDir($hash) . '/' . $hash; - } - - public function get($key, $expiration = false) { - $storageFile = $this->getCacheFile(md5($key)); - // See if this storage file is locked, if so we wait up to 5 seconds for the lock owning process to - // complete it's work. If the lock is not released within that time frame, it's cleaned up. - // This should give us a fair amount of 'Cache Stampeding' protection - if ($this->isLocked($storageFile)) { - $this->waitForLock($storageFile); - } - if (file_exists($storageFile) && is_readable($storageFile)) { - $now = time(); - if (! $expiration || (($mtime = @filemtime($storageFile)) !== false && ($now - $mtime) < $expiration)) { - if (($data = @file_get_contents($storageFile)) !== false) { - $data = unserialize($data); - return $data; - } - } - } - return false; - } - - public function set($key, $value) { - $storageDir = $this->getCacheDir(md5($key)); - $storageFile = $this->getCacheFile(md5($key)); - if ($this->isLocked($storageFile)) { - // some other process is writing to this file too, wait until it's done to prevent hiccups - $this->waitForLock($storageFile); - } - if (! is_dir($storageDir)) { - if (! @mkdir($storageDir, 0755, true)) { - throw new Google_CacheException("Could not create storage directory: $storageDir"); - } - } - // we serialize the whole request object, since we don't only want the - // responseContent but also the postBody used, headers, size, etc - $data = serialize($value); - $this->createLock($storageFile); - if (! @file_put_contents($storageFile, $data)) { - $this->removeLock($storageFile); - throw new Google_CacheException("Could not store data in the file"); - } - $this->removeLock($storageFile); - } - - public function delete($key) { - $file = $this->getCacheFile(md5($key)); - if (! @unlink($file)) { - throw new Google_CacheException("Cache file could not be deleted"); - } - } -} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/cache/Google_MemcacheCache.php b/apps/files_external/3rdparty/google-api-php-client/src/cache/Google_MemcacheCache.php deleted file mode 100644 index 22493f8b1ec..00000000000 --- a/apps/files_external/3rdparty/google-api-php-client/src/cache/Google_MemcacheCache.php +++ /dev/null @@ -1,130 +0,0 @@ -<?php -/* - * Copyright 2008 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * A persistent storage class based on the memcache, which is not - * really very persistent, as soon as you restart your memcache daemon - * the storage will be wiped, however for debugging and/or speed - * it can be useful, kinda, and cache is a lot cheaper then storage. - * - * @author Chris Chabot <chabotc@google.com> - */ -class Google_MemcacheCache extends Google_Cache { - private $connection = false; - - public function __construct() { - global $apiConfig; - if (! function_exists('memcache_connect')) { - throw new Google_CacheException("Memcache functions not available"); - } - $this->host = $apiConfig['ioMemCacheCache_host']; - $this->port = $apiConfig['ioMemCacheCache_port']; - if (empty($this->host) || empty($this->port)) { - throw new Google_CacheException("You need to supply a valid memcache host and port"); - } - } - - private function isLocked($key) { - $this->check(); - if ((@memcache_get($this->connection, $key . '.lock')) === false) { - return false; - } - return true; - } - - private function createLock($key) { - $this->check(); - // the interesting thing is that this could fail if the lock was created in the meantime.. - // but we'll ignore that out of convenience - @memcache_add($this->connection, $key . '.lock', '', 0, 5); - } - - private function removeLock($key) { - $this->check(); - // suppress all warnings, if some other process removed it that's ok too - @memcache_delete($this->connection, $key . '.lock'); - } - - private function waitForLock($key) { - $this->check(); - // 20 x 250 = 5 seconds - $tries = 20; - $cnt = 0; - do { - // 250 ms is a long time to sleep, but it does stop the server from burning all resources on polling locks.. - usleep(250); - $cnt ++; - } while ($cnt <= $tries && $this->isLocked($key)); - if ($this->isLocked($key)) { - // 5 seconds passed, assume the owning process died off and remove it - $this->removeLock($key); - } - } - - // I prefer lazy initialization since the cache isn't used every request - // so this potentially saves a lot of overhead - private function connect() { - if (! $this->connection = @memcache_pconnect($this->host, $this->port)) { - throw new Google_CacheException("Couldn't connect to memcache server"); - } - } - - private function check() { - if (! $this->connection) { - $this->connect(); - } - } - - /** - * @inheritDoc - */ - public function get($key, $expiration = false) { - $this->check(); - if (($ret = @memcache_get($this->connection, $key)) === false) { - return false; - } - if (! $expiration || (time() - $ret['time'] > $expiration)) { - $this->delete($key); - return false; - } - return $ret['data']; - } - - /** - * @inheritDoc - * @param string $key - * @param string $value - * @throws Google_CacheException - */ - public function set($key, $value) { - $this->check(); - // we store it with the cache_time default expiration so objects will at least get cleaned eventually. - if (@memcache_set($this->connection, $key, array('time' => time(), - 'data' => $value), false) == false) { - throw new Google_CacheException("Couldn't store data in cache"); - } - } - - /** - * @inheritDoc - * @param String $key - */ - public function delete($key) { - $this->check(); - @memcache_delete($this->connection, $key); - } -} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/config.php b/apps/files_external/3rdparty/google-api-php-client/src/config.php deleted file mode 100644 index e3a57138d05..00000000000 --- a/apps/files_external/3rdparty/google-api-php-client/src/config.php +++ /dev/null @@ -1,81 +0,0 @@ -<?php -/* - * Copyright 2010 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -global $apiConfig; -$apiConfig = array( - // True if objects should be returned by the service classes. - // False if associative arrays should be returned (default behavior). - 'use_objects' => false, - - // The application_name is included in the User-Agent HTTP header. - 'application_name' => '', - - // OAuth2 Settings, you can get these keys at https://code.google.com/apis/console - 'oauth2_client_id' => '', - 'oauth2_client_secret' => '', - 'oauth2_redirect_uri' => '', - - // The developer key, you get this at https://code.google.com/apis/console - 'developer_key' => '', - - // Site name to show in the Google's OAuth 1 authentication screen. - 'site_name' => 'www.example.org', - - // Which Authentication, Storage and HTTP IO classes to use. - 'authClass' => 'Google_OAuth2', - 'ioClass' => 'Google_CurlIO', - 'cacheClass' => 'Google_FileCache', - - // Don't change these unless you're working against a special development or testing environment. - 'basePath' => 'https://www.googleapis.com', - - // IO Class dependent configuration, you only have to configure the values - // for the class that was configured as the ioClass above - 'ioFileCache_directory' => - (function_exists('sys_get_temp_dir') ? - sys_get_temp_dir() . '/Google_Client' : - '/tmp/Google_Client'), - - // Definition of service specific values like scopes, oauth token URLs, etc - 'services' => array( - 'analytics' => array('scope' => 'https://www.googleapis.com/auth/analytics.readonly'), - 'calendar' => array( - 'scope' => array( - "https://www.googleapis.com/auth/calendar", - "https://www.googleapis.com/auth/calendar.readonly", - ) - ), - 'books' => array('scope' => 'https://www.googleapis.com/auth/books'), - 'latitude' => array( - 'scope' => array( - 'https://www.googleapis.com/auth/latitude.all.best', - 'https://www.googleapis.com/auth/latitude.all.city', - ) - ), - 'moderator' => array('scope' => 'https://www.googleapis.com/auth/moderator'), - 'oauth2' => array( - 'scope' => array( - 'https://www.googleapis.com/auth/userinfo.profile', - 'https://www.googleapis.com/auth/userinfo.email', - ) - ), - 'plus' => array('scope' => 'https://www.googleapis.com/auth/plus.login'), - 'siteVerification' => array('scope' => 'https://www.googleapis.com/auth/siteverification'), - 'tasks' => array('scope' => 'https://www.googleapis.com/auth/tasks'), - 'urlshortener' => array('scope' => 'https://www.googleapis.com/auth/urlshortener') - ) -); diff --git a/apps/files_external/3rdparty/google-api-php-client/src/contrib/Google_DriveService.php b/apps/files_external/3rdparty/google-api-php-client/src/contrib/Google_DriveService.php deleted file mode 100644 index 896e8b93826..00000000000 --- a/apps/files_external/3rdparty/google-api-php-client/src/contrib/Google_DriveService.php +++ /dev/null @@ -1,3143 +0,0 @@ -<?php -/* - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - - - /** - * The "about" collection of methods. - * Typical usage is: - * <code> - * $driveService = new Google_DriveService(...); - * $about = $driveService->about; - * </code> - */ - class Google_AboutServiceResource extends Google_ServiceResource { - - - /** - * Gets the information about the current user along with Drive API settings (about.get) - * - * @param array $optParams Optional parameters. - * - * @opt_param bool includeSubscribed When calculating the number of remaining change IDs, whether to include shared files and public files the user has opened. When set to false, this counts only change IDs for owned files and any shared or public files that the user has explictly added to a folder in Drive. - * @opt_param string maxChangeIdCount Maximum number of remaining change IDs to count - * @opt_param string startChangeId Change ID to start counting from when calculating number of remaining change IDs - * @return Google_About - */ - public function get($optParams = array()) { - $params = array(); - $params = array_merge($params, $optParams); - $data = $this->__call('get', array($params)); - if ($this->useObjects()) { - return new Google_About($data); - } else { - return $data; - } - } - } - - /** - * The "apps" collection of methods. - * Typical usage is: - * <code> - * $driveService = new Google_DriveService(...); - * $apps = $driveService->apps; - * </code> - */ - class Google_AppsServiceResource extends Google_ServiceResource { - - - /** - * Gets a specific app. (apps.get) - * - * @param string $appId The ID of the app. - * @param array $optParams Optional parameters. - * @return Google_App - */ - public function get($appId, $optParams = array()) { - $params = array('appId' => $appId); - $params = array_merge($params, $optParams); - $data = $this->__call('get', array($params)); - if ($this->useObjects()) { - return new Google_App($data); - } else { - return $data; - } - } - /** - * Lists a user's installed apps. (apps.list) - * - * @param array $optParams Optional parameters. - * @return Google_AppList - */ - public function listApps($optParams = array()) { - $params = array(); - $params = array_merge($params, $optParams); - $data = $this->__call('list', array($params)); - if ($this->useObjects()) { - return new Google_AppList($data); - } else { - return $data; - } - } - } - - /** - * The "changes" collection of methods. - * Typical usage is: - * <code> - * $driveService = new Google_DriveService(...); - * $changes = $driveService->changes; - * </code> - */ - class Google_ChangesServiceResource extends Google_ServiceResource { - - - /** - * Gets a specific change. (changes.get) - * - * @param string $changeId The ID of the change. - * @param array $optParams Optional parameters. - * @return Google_Change - */ - public function get($changeId, $optParams = array()) { - $params = array('changeId' => $changeId); - $params = array_merge($params, $optParams); - $data = $this->__call('get', array($params)); - if ($this->useObjects()) { - return new Google_Change($data); - } else { - return $data; - } - } - /** - * Lists the changes for a user. (changes.list) - * - * @param array $optParams Optional parameters. - * - * @opt_param bool includeDeleted Whether to include deleted items. - * @opt_param bool includeSubscribed Whether to include shared files and public files the user has opened. When set to false, the list will include owned files plus any shared or public files the user has explictly added to a folder in Drive. - * @opt_param int maxResults Maximum number of changes to return. - * @opt_param string pageToken Page token for changes. - * @opt_param string startChangeId Change ID to start listing changes from. - * @return Google_ChangeList - */ - public function listChanges($optParams = array()) { - $params = array(); - $params = array_merge($params, $optParams); - $data = $this->__call('list', array($params)); - if ($this->useObjects()) { - return new Google_ChangeList($data); - } else { - return $data; - } - } - } - - /** - * The "children" collection of methods. - * Typical usage is: - * <code> - * $driveService = new Google_DriveService(...); - * $children = $driveService->children; - * </code> - */ - class Google_ChildrenServiceResource extends Google_ServiceResource { - - - /** - * Removes a child from a folder. (children.delete) - * - * @param string $folderId The ID of the folder. - * @param string $childId The ID of the child. - * @param array $optParams Optional parameters. - */ - public function delete($folderId, $childId, $optParams = array()) { - $params = array('folderId' => $folderId, 'childId' => $childId); - $params = array_merge($params, $optParams); - $data = $this->__call('delete', array($params)); - return $data; - } - /** - * Gets a specific child reference. (children.get) - * - * @param string $folderId The ID of the folder. - * @param string $childId The ID of the child. - * @param array $optParams Optional parameters. - * @return Google_ChildReference - */ - public function get($folderId, $childId, $optParams = array()) { - $params = array('folderId' => $folderId, 'childId' => $childId); - $params = array_merge($params, $optParams); - $data = $this->__call('get', array($params)); - if ($this->useObjects()) { - return new Google_ChildReference($data); - } else { - return $data; - } - } - /** - * Inserts a file into a folder. (children.insert) - * - * @param string $folderId The ID of the folder. - * @param Google_ChildReference $postBody - * @param array $optParams Optional parameters. - * @return Google_ChildReference - */ - public function insert($folderId, Google_ChildReference $postBody, $optParams = array()) { - $params = array('folderId' => $folderId, 'postBody' => $postBody); - $params = array_merge($params, $optParams); - $data = $this->__call('insert', array($params)); - if ($this->useObjects()) { - return new Google_ChildReference($data); - } else { - return $data; - } - } - /** - * Lists a folder's children. (children.list) - * - * @param string $folderId The ID of the folder. - * @param array $optParams Optional parameters. - * - * @opt_param int maxResults Maximum number of children to return. - * @opt_param string pageToken Page token for children. - * @opt_param string q Query string for searching children. - * @return Google_ChildList - */ - public function listChildren($folderId, $optParams = array()) { - $params = array('folderId' => $folderId); - $params = array_merge($params, $optParams); - $data = $this->__call('list', array($params)); - if ($this->useObjects()) { - return new Google_ChildList($data); - } else { - return $data; - } - } - } - - /** - * The "comments" collection of methods. - * Typical usage is: - * <code> - * $driveService = new Google_DriveService(...); - * $comments = $driveService->comments; - * </code> - */ - class Google_CommentsServiceResource extends Google_ServiceResource { - - - /** - * Deletes a comment. (comments.delete) - * - * @param string $fileId The ID of the file. - * @param string $commentId The ID of the comment. - * @param array $optParams Optional parameters. - */ - public function delete($fileId, $commentId, $optParams = array()) { - $params = array('fileId' => $fileId, 'commentId' => $commentId); - $params = array_merge($params, $optParams); - $data = $this->__call('delete', array($params)); - return $data; - } - /** - * Gets a comment by ID. (comments.get) - * - * @param string $fileId The ID of the file. - * @param string $commentId The ID of the comment. - * @param array $optParams Optional parameters. - * - * @opt_param bool includeDeleted If set, this will succeed when retrieving a deleted comment, and will include any deleted replies. - * @return Google_Comment - */ - public function get($fileId, $commentId, $optParams = array()) { - $params = array('fileId' => $fileId, 'commentId' => $commentId); - $params = array_merge($params, $optParams); - $data = $this->__call('get', array($params)); - if ($this->useObjects()) { - return new Google_Comment($data); - } else { - return $data; - } - } - /** - * Creates a new comment on the given file. (comments.insert) - * - * @param string $fileId The ID of the file. - * @param Google_Comment $postBody - * @param array $optParams Optional parameters. - * @return Google_Comment - */ - public function insert($fileId, Google_Comment $postBody, $optParams = array()) { - $params = array('fileId' => $fileId, 'postBody' => $postBody); - $params = array_merge($params, $optParams); - $data = $this->__call('insert', array($params)); - if ($this->useObjects()) { - return new Google_Comment($data); - } else { - return $data; - } - } - /** - * Lists a file's comments. (comments.list) - * - * @param string $fileId The ID of the file. - * @param array $optParams Optional parameters. - * - * @opt_param bool includeDeleted If set, all comments and replies, including deleted comments and replies (with content stripped) will be returned. - * @opt_param int maxResults The maximum number of discussions to include in the response, used for paging. - * @opt_param string pageToken The continuation token, used to page through large result sets. To get the next page of results, set this parameter to the value of "nextPageToken" from the previous response. - * @opt_param string updatedMin Only discussions that were updated after this timestamp will be returned. Formatted as an RFC 3339 timestamp. - * @return Google_CommentList - */ - public function listComments($fileId, $optParams = array()) { - $params = array('fileId' => $fileId); - $params = array_merge($params, $optParams); - $data = $this->__call('list', array($params)); - if ($this->useObjects()) { - return new Google_CommentList($data); - } else { - return $data; - } - } - /** - * Updates an existing comment. This method supports patch semantics. (comments.patch) - * - * @param string $fileId The ID of the file. - * @param string $commentId The ID of the comment. - * @param Google_Comment $postBody - * @param array $optParams Optional parameters. - * @return Google_Comment - */ - public function patch($fileId, $commentId, Google_Comment $postBody, $optParams = array()) { - $params = array('fileId' => $fileId, 'commentId' => $commentId, 'postBody' => $postBody); - $params = array_merge($params, $optParams); - $data = $this->__call('patch', array($params)); - if ($this->useObjects()) { - return new Google_Comment($data); - } else { - return $data; - } - } - /** - * Updates an existing comment. (comments.update) - * - * @param string $fileId The ID of the file. - * @param string $commentId The ID of the comment. - * @param Google_Comment $postBody - * @param array $optParams Optional parameters. - * @return Google_Comment - */ - public function update($fileId, $commentId, Google_Comment $postBody, $optParams = array()) { - $params = array('fileId' => $fileId, 'commentId' => $commentId, 'postBody' => $postBody); - $params = array_merge($params, $optParams); - $data = $this->__call('update', array($params)); - if ($this->useObjects()) { - return new Google_Comment($data); - } else { - return $data; - } - } - } - - /** - * The "files" collection of methods. - * Typical usage is: - * <code> - * $driveService = new Google_DriveService(...); - * $files = $driveService->files; - * </code> - */ - class Google_FilesServiceResource extends Google_ServiceResource { - - - /** - * Creates a copy of the specified file. (files.copy) - * - * @param string $fileId The ID of the file to copy. - * @param Google_DriveFile $postBody - * @param array $optParams Optional parameters. - * - * @opt_param bool convert Whether to convert this file to the corresponding Google Docs format. - * @opt_param bool ocr Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. - * @opt_param string ocrLanguage If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes. - * @opt_param bool pinned Whether to pin the head revision of the new copy. - * @opt_param string timedTextLanguage The language of the timed text. - * @opt_param string timedTextTrackName The timed text track name. - * @return Google_DriveFile - */ - public function copy($fileId, Google_DriveFile $postBody, $optParams = array()) { - $params = array('fileId' => $fileId, 'postBody' => $postBody); - $params = array_merge($params, $optParams); - $data = $this->__call('copy', array($params)); - if ($this->useObjects()) { - return new Google_DriveFile($data); - } else { - return $data; - } - } - /** - * Permanently deletes a file by ID. Skips the trash. (files.delete) - * - * @param string $fileId The ID of the file to delete. - * @param array $optParams Optional parameters. - */ - public function delete($fileId, $optParams = array()) { - $params = array('fileId' => $fileId); - $params = array_merge($params, $optParams); - $data = $this->__call('delete', array($params)); - return $data; - } - /** - * Gets a file's metadata by ID. (files.get) - * - * @param string $fileId The ID for the file in question. - * @param array $optParams Optional parameters. - * - * @opt_param string projection This parameter is deprecated and has no function. - * @opt_param bool updateViewedDate Whether to update the view date after successfully retrieving the file. - * @return Google_DriveFile - */ - public function get($fileId, $optParams = array()) { - $params = array('fileId' => $fileId); - $params = array_merge($params, $optParams); - $data = $this->__call('get', array($params)); - if ($this->useObjects()) { - return new Google_DriveFile($data); - } else { - return $data; - } - } - /** - * Insert a new file. (files.insert) - * - * @param Google_DriveFile $postBody - * @param array $optParams Optional parameters. - * - * @opt_param bool convert Whether to convert this file to the corresponding Google Docs format. - * @opt_param bool ocr Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. - * @opt_param string ocrLanguage If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes. - * @opt_param bool pinned Whether to pin the head revision of the uploaded file. - * @opt_param string timedTextLanguage The language of the timed text. - * @opt_param string timedTextTrackName The timed text track name. - * @opt_param bool useContentAsIndexableText Whether to use the content as indexable text. - * @return Google_DriveFile - */ - public function insert(Google_DriveFile $postBody, $optParams = array()) { - $params = array('postBody' => $postBody); - $params = array_merge($params, $optParams); - $data = $this->__call('insert', array($params)); - if ($this->useObjects()) { - return new Google_DriveFile($data); - } else { - return $data; - } - } - /** - * Lists the user's files. (files.list) - * - * @param array $optParams Optional parameters. - * - * @opt_param int maxResults Maximum number of files to return. - * @opt_param string pageToken Page token for files. - * @opt_param string projection This parameter is deprecated and has no function. - * @opt_param string q Query string for searching files. - * @return Google_FileList - */ - public function listFiles($optParams = array()) { - $params = array(); - $params = array_merge($params, $optParams); - $data = $this->__call('list', array($params)); - if ($this->useObjects()) { - return new Google_FileList($data); - } else { - return $data; - } - } - /** - * Updates file metadata and/or content. This method supports patch semantics. (files.patch) - * - * @param string $fileId The ID of the file to update. - * @param Google_DriveFile $postBody - * @param array $optParams Optional parameters. - * - * @opt_param bool convert Whether to convert this file to the corresponding Google Docs format. - * @opt_param bool newRevision Whether a blob upload should create a new revision. If not set or false, the blob data in the current head revision is replaced. If true, a new blob is created as head revision, and previous revisions are preserved (causing increased use of the user's data storage quota). - * @opt_param bool ocr Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. - * @opt_param string ocrLanguage If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes. - * @opt_param bool pinned Whether to pin the new revision. - * @opt_param bool setModifiedDate Whether to set the modified date with the supplied modified date. - * @opt_param string timedTextLanguage The language of the timed text. - * @opt_param string timedTextTrackName The timed text track name. - * @opt_param bool updateViewedDate Whether to update the view date after successfully updating the file. - * @opt_param bool useContentAsIndexableText Whether to use the content as indexable text. - * @return Google_DriveFile - */ - public function patch($fileId, Google_DriveFile $postBody, $optParams = array()) { - $params = array('fileId' => $fileId, 'postBody' => $postBody); - $params = array_merge($params, $optParams); - $data = $this->__call('patch', array($params)); - if ($this->useObjects()) { - return new Google_DriveFile($data); - } else { - return $data; - } - } - /** - * Set the file's updated time to the current server time. (files.touch) - * - * @param string $fileId The ID of the file to update. - * @param array $optParams Optional parameters. - * @return Google_DriveFile - */ - public function touch($fileId, $optParams = array()) { - $params = array('fileId' => $fileId); - $params = array_merge($params, $optParams); - $data = $this->__call('touch', array($params)); - if ($this->useObjects()) { - return new Google_DriveFile($data); - } else { - return $data; - } - } - /** - * Moves a file to the trash. (files.trash) - * - * @param string $fileId The ID of the file to trash. - * @param array $optParams Optional parameters. - * @return Google_DriveFile - */ - public function trash($fileId, $optParams = array()) { - $params = array('fileId' => $fileId); - $params = array_merge($params, $optParams); - $data = $this->__call('trash', array($params)); - if ($this->useObjects()) { - return new Google_DriveFile($data); - } else { - return $data; - } - } - /** - * Restores a file from the trash. (files.untrash) - * - * @param string $fileId The ID of the file to untrash. - * @param array $optParams Optional parameters. - * @return Google_DriveFile - */ - public function untrash($fileId, $optParams = array()) { - $params = array('fileId' => $fileId); - $params = array_merge($params, $optParams); - $data = $this->__call('untrash', array($params)); - if ($this->useObjects()) { - return new Google_DriveFile($data); - } else { - return $data; - } - } - /** - * Updates file metadata and/or content. (files.update) - * - * @param string $fileId The ID of the file to update. - * @param Google_DriveFile $postBody - * @param array $optParams Optional parameters. - * - * @opt_param bool convert Whether to convert this file to the corresponding Google Docs format. - * @opt_param bool newRevision Whether a blob upload should create a new revision. If not set or false, the blob data in the current head revision is replaced. If true, a new blob is created as head revision, and previous revisions are preserved (causing increased use of the user's data storage quota). - * @opt_param bool ocr Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. - * @opt_param string ocrLanguage If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes. - * @opt_param bool pinned Whether to pin the new revision. - * @opt_param bool setModifiedDate Whether to set the modified date with the supplied modified date. - * @opt_param string timedTextLanguage The language of the timed text. - * @opt_param string timedTextTrackName The timed text track name. - * @opt_param bool updateViewedDate Whether to update the view date after successfully updating the file. - * @opt_param bool useContentAsIndexableText Whether to use the content as indexable text. - * @return Google_DriveFile - */ - public function update($fileId, Google_DriveFile $postBody, $optParams = array()) { - $params = array('fileId' => $fileId, 'postBody' => $postBody); - $params = array_merge($params, $optParams); - $data = $this->__call('update', array($params)); - if ($this->useObjects()) { - return new Google_DriveFile($data); - } else { - return $data; - } - } - } - - /** - * The "parents" collection of methods. - * Typical usage is: - * <code> - * $driveService = new Google_DriveService(...); - * $parents = $driveService->parents; - * </code> - */ - class Google_ParentsServiceResource extends Google_ServiceResource { - - - /** - * Removes a parent from a file. (parents.delete) - * - * @param string $fileId The ID of the file. - * @param string $parentId The ID of the parent. - * @param array $optParams Optional parameters. - */ - public function delete($fileId, $parentId, $optParams = array()) { - $params = array('fileId' => $fileId, 'parentId' => $parentId); - $params = array_merge($params, $optParams); - $data = $this->__call('delete', array($params)); - return $data; - } - /** - * Gets a specific parent reference. (parents.get) - * - * @param string $fileId The ID of the file. - * @param string $parentId The ID of the parent. - * @param array $optParams Optional parameters. - * @return Google_ParentReference - */ - public function get($fileId, $parentId, $optParams = array()) { - $params = array('fileId' => $fileId, 'parentId' => $parentId); - $params = array_merge($params, $optParams); - $data = $this->__call('get', array($params)); - if ($this->useObjects()) { - return new Google_ParentReference($data); - } else { - return $data; - } - } - /** - * Adds a parent folder for a file. (parents.insert) - * - * @param string $fileId The ID of the file. - * @param Google_ParentReference $postBody - * @param array $optParams Optional parameters. - * @return Google_ParentReference - */ - public function insert($fileId, Google_ParentReference $postBody, $optParams = array()) { - $params = array('fileId' => $fileId, 'postBody' => $postBody); - $params = array_merge($params, $optParams); - $data = $this->__call('insert', array($params)); - if ($this->useObjects()) { - return new Google_ParentReference($data); - } else { - return $data; - } - } - /** - * Lists a file's parents. (parents.list) - * - * @param string $fileId The ID of the file. - * @param array $optParams Optional parameters. - * @return Google_ParentList - */ - public function listParents($fileId, $optParams = array()) { - $params = array('fileId' => $fileId); - $params = array_merge($params, $optParams); - $data = $this->__call('list', array($params)); - if ($this->useObjects()) { - return new Google_ParentList($data); - } else { - return $data; - } - } - } - - /** - * The "permissions" collection of methods. - * Typical usage is: - * <code> - * $driveService = new Google_DriveService(...); - * $permissions = $driveService->permissions; - * </code> - */ - class Google_PermissionsServiceResource extends Google_ServiceResource { - - - /** - * Deletes a permission from a file. (permissions.delete) - * - * @param string $fileId The ID for the file. - * @param string $permissionId The ID for the permission. - * @param array $optParams Optional parameters. - */ - public function delete($fileId, $permissionId, $optParams = array()) { - $params = array('fileId' => $fileId, 'permissionId' => $permissionId); - $params = array_merge($params, $optParams); - $data = $this->__call('delete', array($params)); - return $data; - } - /** - * Gets a permission by ID. (permissions.get) - * - * @param string $fileId The ID for the file. - * @param string $permissionId The ID for the permission. - * @param array $optParams Optional parameters. - * @return Google_Permission - */ - public function get($fileId, $permissionId, $optParams = array()) { - $params = array('fileId' => $fileId, 'permissionId' => $permissionId); - $params = array_merge($params, $optParams); - $data = $this->__call('get', array($params)); - if ($this->useObjects()) { - return new Google_Permission($data); - } else { - return $data; - } - } - /** - * Inserts a permission for a file. (permissions.insert) - * - * @param string $fileId The ID for the file. - * @param Google_Permission $postBody - * @param array $optParams Optional parameters. - * - * @opt_param string emailMessage A custom message to include in notification emails. - * @opt_param bool sendNotificationEmails Whether to send notification emails when sharing to users or groups. - * @return Google_Permission - */ - public function insert($fileId, Google_Permission $postBody, $optParams = array()) { - $params = array('fileId' => $fileId, 'postBody' => $postBody); - $params = array_merge($params, $optParams); - $data = $this->__call('insert', array($params)); - if ($this->useObjects()) { - return new Google_Permission($data); - } else { - return $data; - } - } - /** - * Lists a file's permissions. (permissions.list) - * - * @param string $fileId The ID for the file. - * @param array $optParams Optional parameters. - * @return Google_PermissionList - */ - public function listPermissions($fileId, $optParams = array()) { - $params = array('fileId' => $fileId); - $params = array_merge($params, $optParams); - $data = $this->__call('list', array($params)); - if ($this->useObjects()) { - return new Google_PermissionList($data); - } else { - return $data; - } - } - /** - * Updates a permission. This method supports patch semantics. (permissions.patch) - * - * @param string $fileId The ID for the file. - * @param string $permissionId The ID for the permission. - * @param Google_Permission $postBody - * @param array $optParams Optional parameters. - * - * @opt_param bool transferOwnership Whether changing a role to 'owner' should also downgrade the current owners to writers. - * @return Google_Permission - */ - public function patch($fileId, $permissionId, Google_Permission $postBody, $optParams = array()) { - $params = array('fileId' => $fileId, 'permissionId' => $permissionId, 'postBody' => $postBody); - $params = array_merge($params, $optParams); - $data = $this->__call('patch', array($params)); - if ($this->useObjects()) { - return new Google_Permission($data); - } else { - return $data; - } - } - /** - * Updates a permission. (permissions.update) - * - * @param string $fileId The ID for the file. - * @param string $permissionId The ID for the permission. - * @param Google_Permission $postBody - * @param array $optParams Optional parameters. - * - * @opt_param bool transferOwnership Whether changing a role to 'owner' should also downgrade the current owners to writers. - * @return Google_Permission - */ - public function update($fileId, $permissionId, Google_Permission $postBody, $optParams = array()) { - $params = array('fileId' => $fileId, 'permissionId' => $permissionId, 'postBody' => $postBody); - $params = array_merge($params, $optParams); - $data = $this->__call('update', array($params)); - if ($this->useObjects()) { - return new Google_Permission($data); - } else { - return $data; - } - } - } - - /** - * The "properties" collection of methods. - * Typical usage is: - * <code> - * $driveService = new Google_DriveService(...); - * $properties = $driveService->properties; - * </code> - */ - class Google_PropertiesServiceResource extends Google_ServiceResource { - - - /** - * Deletes a property. (properties.delete) - * - * @param string $fileId The ID of the file. - * @param string $propertyKey The key of the property. - * @param array $optParams Optional parameters. - * - * @opt_param string visibility The visibility of the property. - */ - public function delete($fileId, $propertyKey, $optParams = array()) { - $params = array('fileId' => $fileId, 'propertyKey' => $propertyKey); - $params = array_merge($params, $optParams); - $data = $this->__call('delete', array($params)); - return $data; - } - /** - * Gets a property by its key. (properties.get) - * - * @param string $fileId The ID of the file. - * @param string $propertyKey The key of the property. - * @param array $optParams Optional parameters. - * - * @opt_param string visibility The visibility of the property. - * @return Google_Property - */ - public function get($fileId, $propertyKey, $optParams = array()) { - $params = array('fileId' => $fileId, 'propertyKey' => $propertyKey); - $params = array_merge($params, $optParams); - $data = $this->__call('get', array($params)); - if ($this->useObjects()) { - return new Google_Property($data); - } else { - return $data; - } - } - /** - * Adds a property to a file. (properties.insert) - * - * @param string $fileId The ID of the file. - * @param Google_Property $postBody - * @param array $optParams Optional parameters. - * @return Google_Property - */ - public function insert($fileId, Google_Property $postBody, $optParams = array()) { - $params = array('fileId' => $fileId, 'postBody' => $postBody); - $params = array_merge($params, $optParams); - $data = $this->__call('insert', array($params)); - if ($this->useObjects()) { - return new Google_Property($data); - } else { - return $data; - } - } - /** - * Lists a file's properties. (properties.list) - * - * @param string $fileId The ID of the file. - * @param array $optParams Optional parameters. - * @return Google_PropertyList - */ - public function listProperties($fileId, $optParams = array()) { - $params = array('fileId' => $fileId); - $params = array_merge($params, $optParams); - $data = $this->__call('list', array($params)); - if ($this->useObjects()) { - return new Google_PropertyList($data); - } else { - return $data; - } - } - /** - * Updates a property. This method supports patch semantics. (properties.patch) - * - * @param string $fileId The ID of the file. - * @param string $propertyKey The key of the property. - * @param Google_Property $postBody - * @param array $optParams Optional parameters. - * - * @opt_param string visibility The visibility of the property. - * @return Google_Property - */ - public function patch($fileId, $propertyKey, Google_Property $postBody, $optParams = array()) { - $params = array('fileId' => $fileId, 'propertyKey' => $propertyKey, 'postBody' => $postBody); - $params = array_merge($params, $optParams); - $data = $this->__call('patch', array($params)); - if ($this->useObjects()) { - return new Google_Property($data); - } else { - return $data; - } - } - /** - * Updates a property. (properties.update) - * - * @param string $fileId The ID of the file. - * @param string $propertyKey The key of the property. - * @param Google_Property $postBody - * @param array $optParams Optional parameters. - * - * @opt_param string visibility The visibility of the property. - * @return Google_Property - */ - public function update($fileId, $propertyKey, Google_Property $postBody, $optParams = array()) { - $params = array('fileId' => $fileId, 'propertyKey' => $propertyKey, 'postBody' => $postBody); - $params = array_merge($params, $optParams); - $data = $this->__call('update', array($params)); - if ($this->useObjects()) { - return new Google_Property($data); - } else { - return $data; - } - } - } - - /** - * The "replies" collection of methods. - * Typical usage is: - * <code> - * $driveService = new Google_DriveService(...); - * $replies = $driveService->replies; - * </code> - */ - class Google_RepliesServiceResource extends Google_ServiceResource { - - - /** - * Deletes a reply. (replies.delete) - * - * @param string $fileId The ID of the file. - * @param string $commentId The ID of the comment. - * @param string $replyId The ID of the reply. - * @param array $optParams Optional parameters. - */ - public function delete($fileId, $commentId, $replyId, $optParams = array()) { - $params = array('fileId' => $fileId, 'commentId' => $commentId, 'replyId' => $replyId); - $params = array_merge($params, $optParams); - $data = $this->__call('delete', array($params)); - return $data; - } - /** - * Gets a reply. (replies.get) - * - * @param string $fileId The ID of the file. - * @param string $commentId The ID of the comment. - * @param string $replyId The ID of the reply. - * @param array $optParams Optional parameters. - * - * @opt_param bool includeDeleted If set, this will succeed when retrieving a deleted reply. - * @return Google_CommentReply - */ - public function get($fileId, $commentId, $replyId, $optParams = array()) { - $params = array('fileId' => $fileId, 'commentId' => $commentId, 'replyId' => $replyId); - $params = array_merge($params, $optParams); - $data = $this->__call('get', array($params)); - if ($this->useObjects()) { - return new Google_CommentReply($data); - } else { - return $data; - } - } - /** - * Creates a new reply to the given comment. (replies.insert) - * - * @param string $fileId The ID of the file. - * @param string $commentId The ID of the comment. - * @param Google_CommentReply $postBody - * @param array $optParams Optional parameters. - * @return Google_CommentReply - */ - public function insert($fileId, $commentId, Google_CommentReply $postBody, $optParams = array()) { - $params = array('fileId' => $fileId, 'commentId' => $commentId, 'postBody' => $postBody); - $params = array_merge($params, $optParams); - $data = $this->__call('insert', array($params)); - if ($this->useObjects()) { - return new Google_CommentReply($data); - } else { - return $data; - } - } - /** - * Lists all of the replies to a comment. (replies.list) - * - * @param string $fileId The ID of the file. - * @param string $commentId The ID of the comment. - * @param array $optParams Optional parameters. - * - * @opt_param bool includeDeleted If set, all replies, including deleted replies (with content stripped) will be returned. - * @opt_param int maxResults The maximum number of replies to include in the response, used for paging. - * @opt_param string pageToken The continuation token, used to page through large result sets. To get the next page of results, set this parameter to the value of "nextPageToken" from the previous response. - * @return Google_CommentReplyList - */ - public function listReplies($fileId, $commentId, $optParams = array()) { - $params = array('fileId' => $fileId, 'commentId' => $commentId); - $params = array_merge($params, $optParams); - $data = $this->__call('list', array($params)); - if ($this->useObjects()) { - return new Google_CommentReplyList($data); - } else { - return $data; - } - } - /** - * Updates an existing reply. This method supports patch semantics. (replies.patch) - * - * @param string $fileId The ID of the file. - * @param string $commentId The ID of the comment. - * @param string $replyId The ID of the reply. - * @param Google_CommentReply $postBody - * @param array $optParams Optional parameters. - * @return Google_CommentReply - */ - public function patch($fileId, $commentId, $replyId, Google_CommentReply $postBody, $optParams = array()) { - $params = array('fileId' => $fileId, 'commentId' => $commentId, 'replyId' => $replyId, 'postBody' => $postBody); - $params = array_merge($params, $optParams); - $data = $this->__call('patch', array($params)); - if ($this->useObjects()) { - return new Google_CommentReply($data); - } else { - return $data; - } - } - /** - * Updates an existing reply. (replies.update) - * - * @param string $fileId The ID of the file. - * @param string $commentId The ID of the comment. - * @param string $replyId The ID of the reply. - * @param Google_CommentReply $postBody - * @param array $optParams Optional parameters. - * @return Google_CommentReply - */ - public function update($fileId, $commentId, $replyId, Google_CommentReply $postBody, $optParams = array()) { - $params = array('fileId' => $fileId, 'commentId' => $commentId, 'replyId' => $replyId, 'postBody' => $postBody); - $params = array_merge($params, $optParams); - $data = $this->__call('update', array($params)); - if ($this->useObjects()) { - return new Google_CommentReply($data); - } else { - return $data; - } - } - } - - /** - * The "revisions" collection of methods. - * Typical usage is: - * <code> - * $driveService = new Google_DriveService(...); - * $revisions = $driveService->revisions; - * </code> - */ - class Google_RevisionsServiceResource extends Google_ServiceResource { - - - /** - * Removes a revision. (revisions.delete) - * - * @param string $fileId The ID of the file. - * @param string $revisionId The ID of the revision. - * @param array $optParams Optional parameters. - */ - public function delete($fileId, $revisionId, $optParams = array()) { - $params = array('fileId' => $fileId, 'revisionId' => $revisionId); - $params = array_merge($params, $optParams); - $data = $this->__call('delete', array($params)); - return $data; - } - /** - * Gets a specific revision. (revisions.get) - * - * @param string $fileId The ID of the file. - * @param string $revisionId The ID of the revision. - * @param array $optParams Optional parameters. - * @return Google_Revision - */ - public function get($fileId, $revisionId, $optParams = array()) { - $params = array('fileId' => $fileId, 'revisionId' => $revisionId); - $params = array_merge($params, $optParams); - $data = $this->__call('get', array($params)); - if ($this->useObjects()) { - return new Google_Revision($data); - } else { - return $data; - } - } - /** - * Lists a file's revisions. (revisions.list) - * - * @param string $fileId The ID of the file. - * @param array $optParams Optional parameters. - * @return Google_RevisionList - */ - public function listRevisions($fileId, $optParams = array()) { - $params = array('fileId' => $fileId); - $params = array_merge($params, $optParams); - $data = $this->__call('list', array($params)); - if ($this->useObjects()) { - return new Google_RevisionList($data); - } else { - return $data; - } - } - /** - * Updates a revision. This method supports patch semantics. (revisions.patch) - * - * @param string $fileId The ID for the file. - * @param string $revisionId The ID for the revision. - * @param Google_Revision $postBody - * @param array $optParams Optional parameters. - * @return Google_Revision - */ - public function patch($fileId, $revisionId, Google_Revision $postBody, $optParams = array()) { - $params = array('fileId' => $fileId, 'revisionId' => $revisionId, 'postBody' => $postBody); - $params = array_merge($params, $optParams); - $data = $this->__call('patch', array($params)); - if ($this->useObjects()) { - return new Google_Revision($data); - } else { - return $data; - } - } - /** - * Updates a revision. (revisions.update) - * - * @param string $fileId The ID for the file. - * @param string $revisionId The ID for the revision. - * @param Google_Revision $postBody - * @param array $optParams Optional parameters. - * @return Google_Revision - */ - public function update($fileId, $revisionId, Google_Revision $postBody, $optParams = array()) { - $params = array('fileId' => $fileId, 'revisionId' => $revisionId, 'postBody' => $postBody); - $params = array_merge($params, $optParams); - $data = $this->__call('update', array($params)); - if ($this->useObjects()) { - return new Google_Revision($data); - } else { - return $data; - } - } - } - -/** - * Service definition for Google_Drive (v2). - * - * <p> - * The API to interact with Drive. - * </p> - * - * <p> - * For more information about this service, see the - * <a href="https://developers.google.com/drive/" target="_blank">API Documentation</a> - * </p> - * - * @author Google, Inc. - */ -class Google_DriveService extends Google_Service { - public $about; - public $apps; - public $changes; - public $children; - public $comments; - public $files; - public $parents; - public $permissions; - public $properties; - public $replies; - public $revisions; - /** - * Constructs the internal representation of the Drive service. - * - * @param Google_Client $client - */ - public function __construct(Google_Client $client) { - $this->servicePath = 'drive/v2/'; - $this->version = 'v2'; - $this->serviceName = 'drive'; - - $client->addService($this->serviceName, $this->version); - $this->about = new Google_AboutServiceResource($this, $this->serviceName, 'about', json_decode('{"methods": {"get": {"id": "drive.about.get", "path": "about", "httpMethod": "GET", "parameters": {"includeSubscribed": {"type": "boolean", "default": "true", "location": "query"}, "maxChangeIdCount": {"type": "string", "default": "1", "format": "int64", "location": "query"}, "startChangeId": {"type": "string", "format": "int64", "location": "query"}}, "response": {"$ref": "About"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.metadata.readonly", "https://www.googleapis.com/auth/drive.readonly"]}}}', true)); - $this->apps = new Google_AppsServiceResource($this, $this->serviceName, 'apps', json_decode('{"methods": {"get": {"id": "drive.apps.get", "path": "apps/{appId}", "httpMethod": "GET", "parameters": {"appId": {"type": "string", "required": true, "location": "path"}}, "response": {"$ref": "App"}, "scopes": ["https://www.googleapis.com/auth/drive.apps.readonly"]}, "list": {"id": "drive.apps.list", "path": "apps", "httpMethod": "GET", "response": {"$ref": "AppList"}, "scopes": ["https://www.googleapis.com/auth/drive.apps.readonly"]}}}', true)); - $this->changes = new Google_ChangesServiceResource($this, $this->serviceName, 'changes', json_decode('{"methods": {"get": {"id": "drive.changes.get", "path": "changes/{changeId}", "httpMethod": "GET", "parameters": {"changeId": {"type": "string", "required": true, "location": "path"}}, "response": {"$ref": "Change"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.metadata.readonly", "https://www.googleapis.com/auth/drive.readonly"]}, "list": {"id": "drive.changes.list", "path": "changes", "httpMethod": "GET", "parameters": {"includeDeleted": {"type": "boolean", "default": "true", "location": "query"}, "includeSubscribed": {"type": "boolean", "default": "true", "location": "query"}, "maxResults": {"type": "integer", "default": "100", "format": "int32", "minimum": "0", "location": "query"}, "pageToken": {"type": "string", "location": "query"}, "startChangeId": {"type": "string", "format": "int64", "location": "query"}}, "response": {"$ref": "ChangeList"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.metadata.readonly", "https://www.googleapis.com/auth/drive.readonly"], "supportsSubscription": true}}}', true)); - $this->children = new Google_ChildrenServiceResource($this, $this->serviceName, 'children', json_decode('{"methods": {"delete": {"id": "drive.children.delete", "path": "files/{folderId}/children/{childId}", "httpMethod": "DELETE", "parameters": {"childId": {"type": "string", "required": true, "location": "path"}, "folderId": {"type": "string", "required": true, "location": "path"}}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"]}, "get": {"id": "drive.children.get", "path": "files/{folderId}/children/{childId}", "httpMethod": "GET", "parameters": {"childId": {"type": "string", "required": true, "location": "path"}, "folderId": {"type": "string", "required": true, "location": "path"}}, "response": {"$ref": "ChildReference"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.metadata.readonly", "https://www.googleapis.com/auth/drive.readonly"]}, "insert": {"id": "drive.children.insert", "path": "files/{folderId}/children", "httpMethod": "POST", "parameters": {"folderId": {"type": "string", "required": true, "location": "path"}}, "request": {"$ref": "ChildReference"}, "response": {"$ref": "ChildReference"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"]}, "list": {"id": "drive.children.list", "path": "files/{folderId}/children", "httpMethod": "GET", "parameters": {"folderId": {"type": "string", "required": true, "location": "path"}, "maxResults": {"type": "integer", "default": "100", "format": "int32", "minimum": "0", "location": "query"}, "pageToken": {"type": "string", "location": "query"}, "q": {"type": "string", "location": "query"}}, "response": {"$ref": "ChildList"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.metadata.readonly", "https://www.googleapis.com/auth/drive.readonly"]}}}', true)); - $this->comments = new Google_CommentsServiceResource($this, $this->serviceName, 'comments', json_decode('{"methods": {"delete": {"id": "drive.comments.delete", "path": "files/{fileId}/comments/{commentId}", "httpMethod": "DELETE", "parameters": {"commentId": {"type": "string", "required": true, "location": "path"}, "fileId": {"type": "string", "required": true, "location": "path"}}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.readonly"]}, "get": {"id": "drive.comments.get", "path": "files/{fileId}/comments/{commentId}", "httpMethod": "GET", "parameters": {"commentId": {"type": "string", "required": true, "location": "path"}, "fileId": {"type": "string", "required": true, "location": "path"}, "includeDeleted": {"type": "boolean", "default": "false", "location": "query"}}, "response": {"$ref": "Comment"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.readonly"]}, "insert": {"id": "drive.comments.insert", "path": "files/{fileId}/comments", "httpMethod": "POST", "parameters": {"fileId": {"type": "string", "required": true, "location": "path"}}, "request": {"$ref": "Comment"}, "response": {"$ref": "Comment"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.readonly"]}, "list": {"id": "drive.comments.list", "path": "files/{fileId}/comments", "httpMethod": "GET", "parameters": {"fileId": {"type": "string", "required": true, "location": "path"}, "includeDeleted": {"type": "boolean", "default": "false", "location": "query"}, "maxResults": {"type": "integer", "default": "20", "format": "int32", "minimum": "0", "maximum": "100", "location": "query"}, "pageToken": {"type": "string", "location": "query"}, "updatedMin": {"type": "string", "location": "query"}}, "response": {"$ref": "CommentList"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.readonly"]}, "patch": {"id": "drive.comments.patch", "path": "files/{fileId}/comments/{commentId}", "httpMethod": "PATCH", "parameters": {"commentId": {"type": "string", "required": true, "location": "path"}, "fileId": {"type": "string", "required": true, "location": "path"}}, "request": {"$ref": "Comment"}, "response": {"$ref": "Comment"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"]}, "update": {"id": "drive.comments.update", "path": "files/{fileId}/comments/{commentId}", "httpMethod": "PUT", "parameters": {"commentId": {"type": "string", "required": true, "location": "path"}, "fileId": {"type": "string", "required": true, "location": "path"}}, "request": {"$ref": "Comment"}, "response": {"$ref": "Comment"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"]}}}', true)); - $this->files = new Google_FilesServiceResource($this, $this->serviceName, 'files', json_decode('{"methods": {"copy": {"id": "drive.files.copy", "path": "files/{fileId}/copy", "httpMethod": "POST", "parameters": {"convert": {"type": "boolean", "default": "false", "location": "query"}, "fileId": {"type": "string", "required": true, "location": "path"}, "ocr": {"type": "boolean", "default": "false", "location": "query"}, "ocrLanguage": {"type": "string", "location": "query"}, "pinned": {"type": "boolean", "default": "false", "location": "query"}, "timedTextLanguage": {"type": "string", "location": "query"}, "timedTextTrackName": {"type": "string", "location": "query"}}, "request": {"$ref": "File"}, "response": {"$ref": "File"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"]}, "delete": {"id": "drive.files.delete", "path": "files/{fileId}", "httpMethod": "DELETE", "parameters": {"fileId": {"type": "string", "required": true, "location": "path"}}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"]}, "get": {"id": "drive.files.get", "path": "files/{fileId}", "httpMethod": "GET", "parameters": {"fileId": {"type": "string", "required": true, "location": "path"}, "projection": {"type": "string", "enum": ["BASIC", "FULL"], "location": "query"}, "updateViewedDate": {"type": "boolean", "default": "false", "location": "query"}}, "response": {"$ref": "File"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.metadata.readonly", "https://www.googleapis.com/auth/drive.readonly"], "supportsSubscription": true}, "insert": {"id": "drive.files.insert", "path": "files", "httpMethod": "POST", "parameters": {"convert": {"type": "boolean", "default": "false", "location": "query"}, "ocr": {"type": "boolean", "default": "false", "location": "query"}, "ocrLanguage": {"type": "string", "location": "query"}, "pinned": {"type": "boolean", "default": "false", "location": "query"}, "timedTextLanguage": {"type": "string", "location": "query"}, "timedTextTrackName": {"type": "string", "location": "query"}, "useContentAsIndexableText": {"type": "boolean", "default": "false", "location": "query"}}, "request": {"$ref": "File"}, "response": {"$ref": "File"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"], "supportsMediaUpload": true, "mediaUpload": {"accept": ["*/*"], "maxSize": "10GB", "protocols": {"simple": {"multipart": true, "path": "/upload/drive/v2/files"}, "resumable": {"multipart": true, "path": "/resumable/upload/drive/v2/files"}}}, "supportsSubscription": true}, "list": {"id": "drive.files.list", "path": "files", "httpMethod": "GET", "parameters": {"maxResults": {"type": "integer", "default": "100", "format": "int32", "minimum": "0", "location": "query"}, "pageToken": {"type": "string", "location": "query"}, "projection": {"type": "string", "enum": ["BASIC", "FULL"], "location": "query"}, "q": {"type": "string", "location": "query"}}, "response": {"$ref": "FileList"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.metadata.readonly", "https://www.googleapis.com/auth/drive.readonly"]}, "patch": {"id": "drive.files.patch", "path": "files/{fileId}", "httpMethod": "PATCH", "parameters": {"convert": {"type": "boolean", "default": "false", "location": "query"}, "fileId": {"type": "string", "required": true, "location": "path"}, "newRevision": {"type": "boolean", "default": "true", "location": "query"}, "ocr": {"type": "boolean", "default": "false", "location": "query"}, "ocrLanguage": {"type": "string", "location": "query"}, "pinned": {"type": "boolean", "default": "false", "location": "query"}, "setModifiedDate": {"type": "boolean", "default": "false", "location": "query"}, "timedTextLanguage": {"type": "string", "location": "query"}, "timedTextTrackName": {"type": "string", "location": "query"}, "updateViewedDate": {"type": "boolean", "default": "true", "location": "query"}, "useContentAsIndexableText": {"type": "boolean", "default": "false", "location": "query"}}, "request": {"$ref": "File"}, "response": {"$ref": "File"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.scripts"]}, "touch": {"id": "drive.files.touch", "path": "files/{fileId}/touch", "httpMethod": "POST", "parameters": {"fileId": {"type": "string", "required": true, "location": "path"}}, "response": {"$ref": "File"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"]}, "trash": {"id": "drive.files.trash", "path": "files/{fileId}/trash", "httpMethod": "POST", "parameters": {"fileId": {"type": "string", "required": true, "location": "path"}}, "response": {"$ref": "File"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"]}, "untrash": {"id": "drive.files.untrash", "path": "files/{fileId}/untrash", "httpMethod": "POST", "parameters": {"fileId": {"type": "string", "required": true, "location": "path"}}, "response": {"$ref": "File"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"]}, "update": {"id": "drive.files.update", "path": "files/{fileId}", "httpMethod": "PUT", "parameters": {"convert": {"type": "boolean", "default": "false", "location": "query"}, "fileId": {"type": "string", "required": true, "location": "path"}, "newRevision": {"type": "boolean", "default": "true", "location": "query"}, "ocr": {"type": "boolean", "default": "false", "location": "query"}, "ocrLanguage": {"type": "string", "location": "query"}, "pinned": {"type": "boolean", "default": "false", "location": "query"}, "setModifiedDate": {"type": "boolean", "default": "false", "location": "query"}, "timedTextLanguage": {"type": "string", "location": "query"}, "timedTextTrackName": {"type": "string", "location": "query"}, "updateViewedDate": {"type": "boolean", "default": "true", "location": "query"}, "useContentAsIndexableText": {"type": "boolean", "default": "false", "location": "query"}}, "request": {"$ref": "File"}, "response": {"$ref": "File"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.scripts"], "supportsMediaUpload": true, "mediaUpload": {"accept": ["*/*"], "maxSize": "10GB", "protocols": {"simple": {"multipart": true, "path": "/upload/drive/v2/files/{fileId}"}, "resumable": {"multipart": true, "path": "/resumable/upload/drive/v2/files/{fileId}"}}}}}}', true)); - $this->parents = new Google_ParentsServiceResource($this, $this->serviceName, 'parents', json_decode('{"methods": {"delete": {"id": "drive.parents.delete", "path": "files/{fileId}/parents/{parentId}", "httpMethod": "DELETE", "parameters": {"fileId": {"type": "string", "required": true, "location": "path"}, "parentId": {"type": "string", "required": true, "location": "path"}}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"]}, "get": {"id": "drive.parents.get", "path": "files/{fileId}/parents/{parentId}", "httpMethod": "GET", "parameters": {"fileId": {"type": "string", "required": true, "location": "path"}, "parentId": {"type": "string", "required": true, "location": "path"}}, "response": {"$ref": "ParentReference"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.metadata.readonly", "https://www.googleapis.com/auth/drive.readonly"]}, "insert": {"id": "drive.parents.insert", "path": "files/{fileId}/parents", "httpMethod": "POST", "parameters": {"fileId": {"type": "string", "required": true, "location": "path"}}, "request": {"$ref": "ParentReference"}, "response": {"$ref": "ParentReference"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"]}, "list": {"id": "drive.parents.list", "path": "files/{fileId}/parents", "httpMethod": "GET", "parameters": {"fileId": {"type": "string", "required": true, "location": "path"}}, "response": {"$ref": "ParentList"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.metadata.readonly", "https://www.googleapis.com/auth/drive.readonly"]}}}', true)); - $this->permissions = new Google_PermissionsServiceResource($this, $this->serviceName, 'permissions', json_decode('{"methods": {"delete": {"id": "drive.permissions.delete", "path": "files/{fileId}/permissions/{permissionId}", "httpMethod": "DELETE", "parameters": {"fileId": {"type": "string", "required": true, "location": "path"}, "permissionId": {"type": "string", "required": true, "location": "path"}}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"]}, "get": {"id": "drive.permissions.get", "path": "files/{fileId}/permissions/{permissionId}", "httpMethod": "GET", "parameters": {"fileId": {"type": "string", "required": true, "location": "path"}, "permissionId": {"type": "string", "required": true, "location": "path"}}, "response": {"$ref": "Permission"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.metadata.readonly", "https://www.googleapis.com/auth/drive.readonly"]}, "insert": {"id": "drive.permissions.insert", "path": "files/{fileId}/permissions", "httpMethod": "POST", "parameters": {"emailMessage": {"type": "string", "location": "query"}, "fileId": {"type": "string", "required": true, "location": "path"}, "sendNotificationEmails": {"type": "boolean", "default": "true", "location": "query"}}, "request": {"$ref": "Permission"}, "response": {"$ref": "Permission"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"]}, "list": {"id": "drive.permissions.list", "path": "files/{fileId}/permissions", "httpMethod": "GET", "parameters": {"fileId": {"type": "string", "required": true, "location": "path"}}, "response": {"$ref": "PermissionList"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.metadata.readonly", "https://www.googleapis.com/auth/drive.readonly"]}, "patch": {"id": "drive.permissions.patch", "path": "files/{fileId}/permissions/{permissionId}", "httpMethod": "PATCH", "parameters": {"fileId": {"type": "string", "required": true, "location": "path"}, "permissionId": {"type": "string", "required": true, "location": "path"}, "transferOwnership": {"type": "boolean", "default": "false", "location": "query"}}, "request": {"$ref": "Permission"}, "response": {"$ref": "Permission"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"]}, "update": {"id": "drive.permissions.update", "path": "files/{fileId}/permissions/{permissionId}", "httpMethod": "PUT", "parameters": {"fileId": {"type": "string", "required": true, "location": "path"}, "permissionId": {"type": "string", "required": true, "location": "path"}, "transferOwnership": {"type": "boolean", "default": "false", "location": "query"}}, "request": {"$ref": "Permission"}, "response": {"$ref": "Permission"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"]}}}', true)); - $this->properties = new Google_PropertiesServiceResource($this, $this->serviceName, 'properties', json_decode('{"methods": {"delete": {"id": "drive.properties.delete", "path": "files/{fileId}/properties/{propertyKey}", "httpMethod": "DELETE", "parameters": {"fileId": {"type": "string", "required": true, "location": "path"}, "propertyKey": {"type": "string", "required": true, "location": "path"}, "visibility": {"type": "string", "default": "private", "location": "query"}}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"]}, "get": {"id": "drive.properties.get", "path": "files/{fileId}/properties/{propertyKey}", "httpMethod": "GET", "parameters": {"fileId": {"type": "string", "required": true, "location": "path"}, "propertyKey": {"type": "string", "required": true, "location": "path"}, "visibility": {"type": "string", "default": "private", "location": "query"}}, "response": {"$ref": "Property"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.metadata.readonly", "https://www.googleapis.com/auth/drive.readonly"]}, "insert": {"id": "drive.properties.insert", "path": "files/{fileId}/properties", "httpMethod": "POST", "parameters": {"fileId": {"type": "string", "required": true, "location": "path"}}, "request": {"$ref": "Property"}, "response": {"$ref": "Property"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"]}, "list": {"id": "drive.properties.list", "path": "files/{fileId}/properties", "httpMethod": "GET", "parameters": {"fileId": {"type": "string", "required": true, "location": "path"}}, "response": {"$ref": "PropertyList"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.metadata.readonly", "https://www.googleapis.com/auth/drive.readonly"]}, "patch": {"id": "drive.properties.patch", "path": "files/{fileId}/properties/{propertyKey}", "httpMethod": "PATCH", "parameters": {"fileId": {"type": "string", "required": true, "location": "path"}, "propertyKey": {"type": "string", "required": true, "location": "path"}, "visibility": {"type": "string", "default": "private", "location": "query"}}, "request": {"$ref": "Property"}, "response": {"$ref": "Property"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"]}, "update": {"id": "drive.properties.update", "path": "files/{fileId}/properties/{propertyKey}", "httpMethod": "PUT", "parameters": {"fileId": {"type": "string", "required": true, "location": "path"}, "propertyKey": {"type": "string", "required": true, "location": "path"}, "visibility": {"type": "string", "default": "private", "location": "query"}}, "request": {"$ref": "Property"}, "response": {"$ref": "Property"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"]}}}', true)); - $this->replies = new Google_RepliesServiceResource($this, $this->serviceName, 'replies', json_decode('{"methods": {"delete": {"id": "drive.replies.delete", "path": "files/{fileId}/comments/{commentId}/replies/{replyId}", "httpMethod": "DELETE", "parameters": {"commentId": {"type": "string", "required": true, "location": "path"}, "fileId": {"type": "string", "required": true, "location": "path"}, "replyId": {"type": "string", "required": true, "location": "path"}}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"]}, "get": {"id": "drive.replies.get", "path": "files/{fileId}/comments/{commentId}/replies/{replyId}", "httpMethod": "GET", "parameters": {"commentId": {"type": "string", "required": true, "location": "path"}, "fileId": {"type": "string", "required": true, "location": "path"}, "includeDeleted": {"type": "boolean", "default": "false", "location": "query"}, "replyId": {"type": "string", "required": true, "location": "path"}}, "response": {"$ref": "CommentReply"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.readonly"]}, "insert": {"id": "drive.replies.insert", "path": "files/{fileId}/comments/{commentId}/replies", "httpMethod": "POST", "parameters": {"commentId": {"type": "string", "required": true, "location": "path"}, "fileId": {"type": "string", "required": true, "location": "path"}}, "request": {"$ref": "CommentReply"}, "response": {"$ref": "CommentReply"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"]}, "list": {"id": "drive.replies.list", "path": "files/{fileId}/comments/{commentId}/replies", "httpMethod": "GET", "parameters": {"commentId": {"type": "string", "required": true, "location": "path"}, "fileId": {"type": "string", "required": true, "location": "path"}, "includeDeleted": {"type": "boolean", "default": "false", "location": "query"}, "maxResults": {"type": "integer", "default": "20", "format": "int32", "minimum": "0", "maximum": "100", "location": "query"}, "pageToken": {"type": "string", "location": "query"}}, "response": {"$ref": "CommentReplyList"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.readonly"]}, "patch": {"id": "drive.replies.patch", "path": "files/{fileId}/comments/{commentId}/replies/{replyId}", "httpMethod": "PATCH", "parameters": {"commentId": {"type": "string", "required": true, "location": "path"}, "fileId": {"type": "string", "required": true, "location": "path"}, "replyId": {"type": "string", "required": true, "location": "path"}}, "request": {"$ref": "CommentReply"}, "response": {"$ref": "CommentReply"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"]}, "update": {"id": "drive.replies.update", "path": "files/{fileId}/comments/{commentId}/replies/{replyId}", "httpMethod": "PUT", "parameters": {"commentId": {"type": "string", "required": true, "location": "path"}, "fileId": {"type": "string", "required": true, "location": "path"}, "replyId": {"type": "string", "required": true, "location": "path"}}, "request": {"$ref": "CommentReply"}, "response": {"$ref": "CommentReply"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"]}}}', true)); - $this->revisions = new Google_RevisionsServiceResource($this, $this->serviceName, 'revisions', json_decode('{"methods": {"delete": {"id": "drive.revisions.delete", "path": "files/{fileId}/revisions/{revisionId}", "httpMethod": "DELETE", "parameters": {"fileId": {"type": "string", "required": true, "location": "path"}, "revisionId": {"type": "string", "required": true, "location": "path"}}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"]}, "get": {"id": "drive.revisions.get", "path": "files/{fileId}/revisions/{revisionId}", "httpMethod": "GET", "parameters": {"fileId": {"type": "string", "required": true, "location": "path"}, "revisionId": {"type": "string", "required": true, "location": "path"}}, "response": {"$ref": "Revision"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.metadata.readonly", "https://www.googleapis.com/auth/drive.readonly"]}, "list": {"id": "drive.revisions.list", "path": "files/{fileId}/revisions", "httpMethod": "GET", "parameters": {"fileId": {"type": "string", "required": true, "location": "path"}}, "response": {"$ref": "RevisionList"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.metadata.readonly", "https://www.googleapis.com/auth/drive.readonly"]}, "patch": {"id": "drive.revisions.patch", "path": "files/{fileId}/revisions/{revisionId}", "httpMethod": "PATCH", "parameters": {"fileId": {"type": "string", "required": true, "location": "path"}, "revisionId": {"type": "string", "required": true, "location": "path"}}, "request": {"$ref": "Revision"}, "response": {"$ref": "Revision"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"]}, "update": {"id": "drive.revisions.update", "path": "files/{fileId}/revisions/{revisionId}", "httpMethod": "PUT", "parameters": {"fileId": {"type": "string", "required": true, "location": "path"}, "revisionId": {"type": "string", "required": true, "location": "path"}}, "request": {"$ref": "Revision"}, "response": {"$ref": "Revision"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"]}}}', true)); - - } -} - - - -class Google_About extends Google_Model { - protected $__additionalRoleInfoType = 'Google_AboutAdditionalRoleInfo'; - protected $__additionalRoleInfoDataType = 'array'; - public $additionalRoleInfo; - public $domainSharingPolicy; - public $etag; - protected $__exportFormatsType = 'Google_AboutExportFormats'; - protected $__exportFormatsDataType = 'array'; - public $exportFormats; - protected $__featuresType = 'Google_AboutFeatures'; - protected $__featuresDataType = 'array'; - public $features; - protected $__importFormatsType = 'Google_AboutImportFormats'; - protected $__importFormatsDataType = 'array'; - public $importFormats; - public $isCurrentAppInstalled; - public $kind; - public $largestChangeId; - protected $__maxUploadSizesType = 'Google_AboutMaxUploadSizes'; - protected $__maxUploadSizesDataType = 'array'; - public $maxUploadSizes; - public $name; - public $permissionId; - public $quotaBytesTotal; - public $quotaBytesUsed; - public $quotaBytesUsedAggregate; - public $quotaBytesUsedInTrash; - public $remainingChangeIds; - public $rootFolderId; - public $selfLink; - protected $__userType = 'Google_User'; - protected $__userDataType = ''; - public $user; - public function setAdditionalRoleInfo(/* array(Google_AboutAdditionalRoleInfo) */ $additionalRoleInfo) { - $this->assertIsArray($additionalRoleInfo, 'Google_AboutAdditionalRoleInfo', __METHOD__); - $this->additionalRoleInfo = $additionalRoleInfo; - } - public function getAdditionalRoleInfo() { - return $this->additionalRoleInfo; - } - public function setDomainSharingPolicy($domainSharingPolicy) { - $this->domainSharingPolicy = $domainSharingPolicy; - } - public function getDomainSharingPolicy() { - return $this->domainSharingPolicy; - } - public function setEtag($etag) { - $this->etag = $etag; - } - public function getEtag() { - return $this->etag; - } - public function setExportFormats(/* array(Google_AboutExportFormats) */ $exportFormats) { - $this->assertIsArray($exportFormats, 'Google_AboutExportFormats', __METHOD__); - $this->exportFormats = $exportFormats; - } - public function getExportFormats() { - return $this->exportFormats; - } - public function setFeatures(/* array(Google_AboutFeatures) */ $features) { - $this->assertIsArray($features, 'Google_AboutFeatures', __METHOD__); - $this->features = $features; - } - public function getFeatures() { - return $this->features; - } - public function setImportFormats(/* array(Google_AboutImportFormats) */ $importFormats) { - $this->assertIsArray($importFormats, 'Google_AboutImportFormats', __METHOD__); - $this->importFormats = $importFormats; - } - public function getImportFormats() { - return $this->importFormats; - } - public function setIsCurrentAppInstalled($isCurrentAppInstalled) { - $this->isCurrentAppInstalled = $isCurrentAppInstalled; - } - public function getIsCurrentAppInstalled() { - return $this->isCurrentAppInstalled; - } - public function setKind($kind) { - $this->kind = $kind; - } - public function getKind() { - return $this->kind; - } - public function setLargestChangeId($largestChangeId) { - $this->largestChangeId = $largestChangeId; - } - public function getLargestChangeId() { - return $this->largestChangeId; - } - public function setMaxUploadSizes(/* array(Google_AboutMaxUploadSizes) */ $maxUploadSizes) { - $this->assertIsArray($maxUploadSizes, 'Google_AboutMaxUploadSizes', __METHOD__); - $this->maxUploadSizes = $maxUploadSizes; - } - public function getMaxUploadSizes() { - return $this->maxUploadSizes; - } - public function setName($name) { - $this->name = $name; - } - public function getName() { - return $this->name; - } - public function setPermissionId($permissionId) { - $this->permissionId = $permissionId; - } - public function getPermissionId() { - return $this->permissionId; - } - public function setQuotaBytesTotal($quotaBytesTotal) { - $this->quotaBytesTotal = $quotaBytesTotal; - } - public function getQuotaBytesTotal() { - return $this->quotaBytesTotal; - } - public function setQuotaBytesUsed($quotaBytesUsed) { - $this->quotaBytesUsed = $quotaBytesUsed; - } - public function getQuotaBytesUsed() { - return $this->quotaBytesUsed; - } - public function setQuotaBytesUsedAggregate($quotaBytesUsedAggregate) { - $this->quotaBytesUsedAggregate = $quotaBytesUsedAggregate; - } - public function getQuotaBytesUsedAggregate() { - return $this->quotaBytesUsedAggregate; - } - public function setQuotaBytesUsedInTrash($quotaBytesUsedInTrash) { - $this->quotaBytesUsedInTrash = $quotaBytesUsedInTrash; - } - public function getQuotaBytesUsedInTrash() { - return $this->quotaBytesUsedInTrash; - } - public function setRemainingChangeIds($remainingChangeIds) { - $this->remainingChangeIds = $remainingChangeIds; - } - public function getRemainingChangeIds() { - return $this->remainingChangeIds; - } - public function setRootFolderId($rootFolderId) { - $this->rootFolderId = $rootFolderId; - } - public function getRootFolderId() { - return $this->rootFolderId; - } - public function setSelfLink($selfLink) { - $this->selfLink = $selfLink; - } - public function getSelfLink() { - return $this->selfLink; - } - public function setUser(Google_User $user) { - $this->user = $user; - } - public function getUser() { - return $this->user; - } -} - -class Google_AboutAdditionalRoleInfo extends Google_Model { - protected $__roleSetsType = 'Google_AboutAdditionalRoleInfoRoleSets'; - protected $__roleSetsDataType = 'array'; - public $roleSets; - public $type; - public function setRoleSets(/* array(Google_AboutAdditionalRoleInfoRoleSets) */ $roleSets) { - $this->assertIsArray($roleSets, 'Google_AboutAdditionalRoleInfoRoleSets', __METHOD__); - $this->roleSets = $roleSets; - } - public function getRoleSets() { - return $this->roleSets; - } - public function setType($type) { - $this->type = $type; - } - public function getType() { - return $this->type; - } -} - -class Google_AboutAdditionalRoleInfoRoleSets extends Google_Model { - public $additionalRoles; - public $primaryRole; - public function setAdditionalRoles(/* array(Google_string) */ $additionalRoles) { - $this->assertIsArray($additionalRoles, 'Google_string', __METHOD__); - $this->additionalRoles = $additionalRoles; - } - public function getAdditionalRoles() { - return $this->additionalRoles; - } - public function setPrimaryRole($primaryRole) { - $this->primaryRole = $primaryRole; - } - public function getPrimaryRole() { - return $this->primaryRole; - } -} - -class Google_AboutExportFormats extends Google_Model { - public $source; - public $targets; - public function setSource($source) { - $this->source = $source; - } - public function getSource() { - return $this->source; - } - public function setTargets(/* array(Google_string) */ $targets) { - $this->assertIsArray($targets, 'Google_string', __METHOD__); - $this->targets = $targets; - } - public function getTargets() { - return $this->targets; - } -} - -class Google_AboutFeatures extends Google_Model { - public $featureName; - public $featureRate; - public function setFeatureName($featureName) { - $this->featureName = $featureName; - } - public function getFeatureName() { - return $this->featureName; - } - public function setFeatureRate($featureRate) { - $this->featureRate = $featureRate; - } - public function getFeatureRate() { - return $this->featureRate; - } -} - -class Google_AboutImportFormats extends Google_Model { - public $source; - public $targets; - public function setSource($source) { - $this->source = $source; - } - public function getSource() { - return $this->source; - } - public function setTargets(/* array(Google_string) */ $targets) { - $this->assertIsArray($targets, 'Google_string', __METHOD__); - $this->targets = $targets; - } - public function getTargets() { - return $this->targets; - } -} - -class Google_AboutMaxUploadSizes extends Google_Model { - public $size; - public $type; - public function setSize($size) { - $this->size = $size; - } - public function getSize() { - return $this->size; - } - public function setType($type) { - $this->type = $type; - } - public function getType() { - return $this->type; - } -} - -class Google_App extends Google_Model { - public $authorized; - protected $__iconsType = 'Google_AppIcons'; - protected $__iconsDataType = 'array'; - public $icons; - public $id; - public $installed; - public $kind; - public $name; - public $objectType; - public $primaryFileExtensions; - public $primaryMimeTypes; - public $productUrl; - public $secondaryFileExtensions; - public $secondaryMimeTypes; - public $supportsCreate; - public $supportsImport; - public $useByDefault; - public function setAuthorized($authorized) { - $this->authorized = $authorized; - } - public function getAuthorized() { - return $this->authorized; - } - public function setIcons(/* array(Google_AppIcons) */ $icons) { - $this->assertIsArray($icons, 'Google_AppIcons', __METHOD__); - $this->icons = $icons; - } - public function getIcons() { - return $this->icons; - } - public function setId($id) { - $this->id = $id; - } - public function getId() { - return $this->id; - } - public function setInstalled($installed) { - $this->installed = $installed; - } - public function getInstalled() { - return $this->installed; - } - public function setKind($kind) { - $this->kind = $kind; - } - public function getKind() { - return $this->kind; - } - public function setName($name) { - $this->name = $name; - } - public function getName() { - return $this->name; - } - public function setObjectType($objectType) { - $this->objectType = $objectType; - } - public function getObjectType() { - return $this->objectType; - } - public function setPrimaryFileExtensions(/* array(Google_string) */ $primaryFileExtensions) { - $this->assertIsArray($primaryFileExtensions, 'Google_string', __METHOD__); - $this->primaryFileExtensions = $primaryFileExtensions; - } - public function getPrimaryFileExtensions() { - return $this->primaryFileExtensions; - } - public function setPrimaryMimeTypes(/* array(Google_string) */ $primaryMimeTypes) { - $this->assertIsArray($primaryMimeTypes, 'Google_string', __METHOD__); - $this->primaryMimeTypes = $primaryMimeTypes; - } - public function getPrimaryMimeTypes() { - return $this->primaryMimeTypes; - } - public function setProductUrl($productUrl) { - $this->productUrl = $productUrl; - } - public function getProductUrl() { - return $this->productUrl; - } - public function setSecondaryFileExtensions(/* array(Google_string) */ $secondaryFileExtensions) { - $this->assertIsArray($secondaryFileExtensions, 'Google_string', __METHOD__); - $this->secondaryFileExtensions = $secondaryFileExtensions; - } - public function getSecondaryFileExtensions() { - return $this->secondaryFileExtensions; - } - public function setSecondaryMimeTypes(/* array(Google_string) */ $secondaryMimeTypes) { - $this->assertIsArray($secondaryMimeTypes, 'Google_string', __METHOD__); - $this->secondaryMimeTypes = $secondaryMimeTypes; - } - public function getSecondaryMimeTypes() { - return $this->secondaryMimeTypes; - } - public function setSupportsCreate($supportsCreate) { - $this->supportsCreate = $supportsCreate; - } - public function getSupportsCreate() { - return $this->supportsCreate; - } - public function setSupportsImport($supportsImport) { - $this->supportsImport = $supportsImport; - } - public function getSupportsImport() { - return $this->supportsImport; - } - public function setUseByDefault($useByDefault) { - $this->useByDefault = $useByDefault; - } - public function getUseByDefault() { - return $this->useByDefault; - } -} - -class Google_AppIcons extends Google_Model { - public $category; - public $iconUrl; - public $size; - public function setCategory($category) { - $this->category = $category; - } - public function getCategory() { - return $this->category; - } - public function setIconUrl($iconUrl) { - $this->iconUrl = $iconUrl; - } - public function getIconUrl() { - return $this->iconUrl; - } - public function setSize($size) { - $this->size = $size; - } - public function getSize() { - return $this->size; - } -} - -class Google_AppList extends Google_Model { - public $etag; - protected $__itemsType = 'Google_App'; - protected $__itemsDataType = 'array'; - public $items; - public $kind; - public $selfLink; - public function setEtag($etag) { - $this->etag = $etag; - } - public function getEtag() { - return $this->etag; - } - public function setItems(/* array(Google_App) */ $items) { - $this->assertIsArray($items, 'Google_App', __METHOD__); - $this->items = $items; - } - public function getItems() { - return $this->items; - } - public function setKind($kind) { - $this->kind = $kind; - } - public function getKind() { - return $this->kind; - } - public function setSelfLink($selfLink) { - $this->selfLink = $selfLink; - } - public function getSelfLink() { - return $this->selfLink; - } -} - -class Google_Change extends Google_Model { - public $deleted; - protected $__fileType = 'Google_DriveFile'; - protected $__fileDataType = ''; - public $file; - public $fileId; - public $id; - public $kind; - public $selfLink; - public function setDeleted($deleted) { - $this->deleted = $deleted; - } - public function getDeleted() { - return $this->deleted; - } - public function setFile(Google_DriveFile $file) { - $this->file = $file; - } - public function getFile() { - return $this->file; - } - public function setFileId($fileId) { - $this->fileId = $fileId; - } - public function getFileId() { - return $this->fileId; - } - public function setId($id) { - $this->id = $id; - } - public function getId() { - return $this->id; - } - public function setKind($kind) { - $this->kind = $kind; - } - public function getKind() { - return $this->kind; - } - public function setSelfLink($selfLink) { - $this->selfLink = $selfLink; - } - public function getSelfLink() { - return $this->selfLink; - } -} - -class Google_ChangeList extends Google_Model { - public $etag; - protected $__itemsType = 'Google_Change'; - protected $__itemsDataType = 'array'; - public $items; - public $kind; - public $largestChangeId; - public $nextLink; - public $nextPageToken; - public $selfLink; - public function setEtag($etag) { - $this->etag = $etag; - } - public function getEtag() { - return $this->etag; - } - public function setItems(/* array(Google_Change) */ $items) { - $this->assertIsArray($items, 'Google_Change', __METHOD__); - $this->items = $items; - } - public function getItems() { - return $this->items; - } - public function setKind($kind) { - $this->kind = $kind; - } - public function getKind() { - return $this->kind; - } - public function setLargestChangeId($largestChangeId) { - $this->largestChangeId = $largestChangeId; - } - public function getLargestChangeId() { - return $this->largestChangeId; - } - public function setNextLink($nextLink) { - $this->nextLink = $nextLink; - } - public function getNextLink() { - return $this->nextLink; - } - public function setNextPageToken($nextPageToken) { - $this->nextPageToken = $nextPageToken; - } - public function getNextPageToken() { - return $this->nextPageToken; - } - public function setSelfLink($selfLink) { - $this->selfLink = $selfLink; - } - public function getSelfLink() { - return $this->selfLink; - } -} - -class Google_ChildList extends Google_Model { - public $etag; - protected $__itemsType = 'Google_ChildReference'; - protected $__itemsDataType = 'array'; - public $items; - public $kind; - public $nextLink; - public $nextPageToken; - public $selfLink; - public function setEtag($etag) { - $this->etag = $etag; - } - public function getEtag() { - return $this->etag; - } - public function setItems(/* array(Google_ChildReference) */ $items) { - $this->assertIsArray($items, 'Google_ChildReference', __METHOD__); - $this->items = $items; - } - public function getItems() { - return $this->items; - } - public function setKind($kind) { - $this->kind = $kind; - } - public function getKind() { - return $this->kind; - } - public function setNextLink($nextLink) { - $this->nextLink = $nextLink; - } - public function getNextLink() { - return $this->nextLink; - } - public function setNextPageToken($nextPageToken) { - $this->nextPageToken = $nextPageToken; - } - public function getNextPageToken() { - return $this->nextPageToken; - } - public function setSelfLink($selfLink) { - $this->selfLink = $selfLink; - } - public function getSelfLink() { - return $this->selfLink; - } -} - -class Google_ChildReference extends Google_Model { - public $childLink; - public $id; - public $kind; - public $selfLink; - public function setChildLink($childLink) { - $this->childLink = $childLink; - } - public function getChildLink() { - return $this->childLink; - } - public function setId($id) { - $this->id = $id; - } - public function getId() { - return $this->id; - } - public function setKind($kind) { - $this->kind = $kind; - } - public function getKind() { - return $this->kind; - } - public function setSelfLink($selfLink) { - $this->selfLink = $selfLink; - } - public function getSelfLink() { - return $this->selfLink; - } -} - -class Google_Comment extends Google_Model { - public $anchor; - protected $__authorType = 'Google_User'; - protected $__authorDataType = ''; - public $author; - public $commentId; - public $content; - protected $__contextType = 'Google_CommentContext'; - protected $__contextDataType = ''; - public $context; - public $createdDate; - public $deleted; - public $fileId; - public $fileTitle; - public $htmlContent; - public $kind; - public $modifiedDate; - protected $__repliesType = 'Google_CommentReply'; - protected $__repliesDataType = 'array'; - public $replies; - public $selfLink; - public $status; - public function setAnchor($anchor) { - $this->anchor = $anchor; - } - public function getAnchor() { - return $this->anchor; - } - public function setAuthor(Google_User $author) { - $this->author = $author; - } - public function getAuthor() { - return $this->author; - } - public function setCommentId($commentId) { - $this->commentId = $commentId; - } - public function getCommentId() { - return $this->commentId; - } - public function setContent($content) { - $this->content = $content; - } - public function getContent() { - return $this->content; - } - public function setContext(Google_CommentContext $context) { - $this->context = $context; - } - public function getContext() { - return $this->context; - } - public function setCreatedDate($createdDate) { - $this->createdDate = $createdDate; - } - public function getCreatedDate() { - return $this->createdDate; - } - public function setDeleted($deleted) { - $this->deleted = $deleted; - } - public function getDeleted() { - return $this->deleted; - } - public function setFileId($fileId) { - $this->fileId = $fileId; - } - public function getFileId() { - return $this->fileId; - } - public function setFileTitle($fileTitle) { - $this->fileTitle = $fileTitle; - } - public function getFileTitle() { - return $this->fileTitle; - } - public function setHtmlContent($htmlContent) { - $this->htmlContent = $htmlContent; - } - public function getHtmlContent() { - return $this->htmlContent; - } - public function setKind($kind) { - $this->kind = $kind; - } - public function getKind() { - return $this->kind; - } - public function setModifiedDate($modifiedDate) { - $this->modifiedDate = $modifiedDate; - } - public function getModifiedDate() { - return $this->modifiedDate; - } - public function setReplies(/* array(Google_CommentReply) */ $replies) { - $this->assertIsArray($replies, 'Google_CommentReply', __METHOD__); - $this->replies = $replies; - } - public function getReplies() { - return $this->replies; - } - public function setSelfLink($selfLink) { - $this->selfLink = $selfLink; - } - public function getSelfLink() { - return $this->selfLink; - } - public function setStatus($status) { - $this->status = $status; - } - public function getStatus() { - return $this->status; - } -} - -class Google_CommentContext extends Google_Model { - public $type; - public $value; - public function setType($type) { - $this->type = $type; - } - public function getType() { - return $this->type; - } - public function setValue($value) { - $this->value = $value; - } - public function getValue() { - return $this->value; - } -} - -class Google_CommentList extends Google_Model { - protected $__itemsType = 'Google_Comment'; - protected $__itemsDataType = 'array'; - public $items; - public $kind; - public $nextPageToken; - public function setItems(/* array(Google_Comment) */ $items) { - $this->assertIsArray($items, 'Google_Comment', __METHOD__); - $this->items = $items; - } - public function getItems() { - return $this->items; - } - public function setKind($kind) { - $this->kind = $kind; - } - public function getKind() { - return $this->kind; - } - public function setNextPageToken($nextPageToken) { - $this->nextPageToken = $nextPageToken; - } - public function getNextPageToken() { - return $this->nextPageToken; - } -} - -class Google_CommentReply extends Google_Model { - protected $__authorType = 'Google_User'; - protected $__authorDataType = ''; - public $author; - public $content; - public $createdDate; - public $deleted; - public $htmlContent; - public $kind; - public $modifiedDate; - public $replyId; - public $verb; - public function setAuthor(Google_User $author) { - $this->author = $author; - } - public function getAuthor() { - return $this->author; - } - public function setContent($content) { - $this->content = $content; - } - public function getContent() { - return $this->content; - } - public function setCreatedDate($createdDate) { - $this->createdDate = $createdDate; - } - public function getCreatedDate() { - return $this->createdDate; - } - public function setDeleted($deleted) { - $this->deleted = $deleted; - } - public function getDeleted() { - return $this->deleted; - } - public function setHtmlContent($htmlContent) { - $this->htmlContent = $htmlContent; - } - public function getHtmlContent() { - return $this->htmlContent; - } - public function setKind($kind) { - $this->kind = $kind; - } - public function getKind() { - return $this->kind; - } - public function setModifiedDate($modifiedDate) { - $this->modifiedDate = $modifiedDate; - } - public function getModifiedDate() { - return $this->modifiedDate; - } - public function setReplyId($replyId) { - $this->replyId = $replyId; - } - public function getReplyId() { - return $this->replyId; - } - public function setVerb($verb) { - $this->verb = $verb; - } - public function getVerb() { - return $this->verb; - } -} - -class Google_CommentReplyList extends Google_Model { - protected $__itemsType = 'Google_CommentReply'; - protected $__itemsDataType = 'array'; - public $items; - public $kind; - public $nextPageToken; - public function setItems(/* array(Google_CommentReply) */ $items) { - $this->assertIsArray($items, 'Google_CommentReply', __METHOD__); - $this->items = $items; - } - public function getItems() { - return $this->items; - } - public function setKind($kind) { - $this->kind = $kind; - } - public function getKind() { - return $this->kind; - } - public function setNextPageToken($nextPageToken) { - $this->nextPageToken = $nextPageToken; - } - public function getNextPageToken() { - return $this->nextPageToken; - } -} - -class Google_DriveFile extends Google_Model { - public $alternateLink; - public $appDataContents; - public $createdDate; - public $description; - public $downloadUrl; - public $editable; - public $embedLink; - public $etag; - public $explicitlyTrashed; - public $exportLinks; - public $fileExtension; - public $fileSize; - public $iconLink; - public $id; - protected $__imageMediaMetadataType = 'Google_DriveFileImageMediaMetadata'; - protected $__imageMediaMetadataDataType = ''; - public $imageMediaMetadata; - protected $__indexableTextType = 'Google_DriveFileIndexableText'; - protected $__indexableTextDataType = ''; - public $indexableText; - public $kind; - protected $__labelsType = 'Google_DriveFileLabels'; - protected $__labelsDataType = ''; - public $labels; - protected $__lastModifyingUserType = 'Google_User'; - protected $__lastModifyingUserDataType = ''; - public $lastModifyingUser; - public $lastModifyingUserName; - public $lastViewedByMeDate; - public $md5Checksum; - public $mimeType; - public $modifiedByMeDate; - public $modifiedDate; - public $originalFilename; - public $ownerNames; - protected $__ownersType = 'Google_User'; - protected $__ownersDataType = 'array'; - public $owners; - protected $__parentsType = 'Google_ParentReference'; - protected $__parentsDataType = 'array'; - public $parents; - public $quotaBytesUsed; - public $selfLink; - public $shared; - public $sharedWithMeDate; - protected $__thumbnailType = 'Google_DriveFileThumbnail'; - protected $__thumbnailDataType = ''; - public $thumbnail; - public $thumbnailLink; - public $title; - protected $__userPermissionType = 'Google_Permission'; - protected $__userPermissionDataType = ''; - public $userPermission; - public $webContentLink; - public $webViewLink; - public $writersCanShare; - public function setAlternateLink($alternateLink) { - $this->alternateLink = $alternateLink; - } - public function getAlternateLink() { - return $this->alternateLink; - } - public function setAppDataContents($appDataContents) { - $this->appDataContents = $appDataContents; - } - public function getAppDataContents() { - return $this->appDataContents; - } - public function setCreatedDate($createdDate) { - $this->createdDate = $createdDate; - } - public function getCreatedDate() { - return $this->createdDate; - } - public function setDescription($description) { - $this->description = $description; - } - public function getDescription() { - return $this->description; - } - public function setDownloadUrl($downloadUrl) { - $this->downloadUrl = $downloadUrl; - } - public function getDownloadUrl() { - return $this->downloadUrl; - } - public function setEditable($editable) { - $this->editable = $editable; - } - public function getEditable() { - return $this->editable; - } - public function setEmbedLink($embedLink) { - $this->embedLink = $embedLink; - } - public function getEmbedLink() { - return $this->embedLink; - } - public function setEtag($etag) { - $this->etag = $etag; - } - public function getEtag() { - return $this->etag; - } - public function setExplicitlyTrashed($explicitlyTrashed) { - $this->explicitlyTrashed = $explicitlyTrashed; - } - public function getExplicitlyTrashed() { - return $this->explicitlyTrashed; - } - public function setExportLinks($exportLinks) { - $this->exportLinks = $exportLinks; - } - public function getExportLinks() { - return $this->exportLinks; - } - public function setFileExtension($fileExtension) { - $this->fileExtension = $fileExtension; - } - public function getFileExtension() { - return $this->fileExtension; - } - public function setFileSize($fileSize) { - $this->fileSize = $fileSize; - } - public function getFileSize() { - return $this->fileSize; - } - public function setIconLink($iconLink) { - $this->iconLink = $iconLink; - } - public function getIconLink() { - return $this->iconLink; - } - public function setId($id) { - $this->id = $id; - } - public function getId() { - return $this->id; - } - public function setImageMediaMetadata(Google_DriveFileImageMediaMetadata $imageMediaMetadata) { - $this->imageMediaMetadata = $imageMediaMetadata; - } - public function getImageMediaMetadata() { - return $this->imageMediaMetadata; - } - public function setIndexableText(Google_DriveFileIndexableText $indexableText) { - $this->indexableText = $indexableText; - } - public function getIndexableText() { - return $this->indexableText; - } - public function setKind($kind) { - $this->kind = $kind; - } - public function getKind() { - return $this->kind; - } - public function setLabels(Google_DriveFileLabels $labels) { - $this->labels = $labels; - } - public function getLabels() { - return $this->labels; - } - public function setLastModifyingUser(Google_User $lastModifyingUser) { - $this->lastModifyingUser = $lastModifyingUser; - } - public function getLastModifyingUser() { - return $this->lastModifyingUser; - } - public function setLastModifyingUserName($lastModifyingUserName) { - $this->lastModifyingUserName = $lastModifyingUserName; - } - public function getLastModifyingUserName() { - return $this->lastModifyingUserName; - } - public function setLastViewedByMeDate($lastViewedByMeDate) { - $this->lastViewedByMeDate = $lastViewedByMeDate; - } - public function getLastViewedByMeDate() { - return $this->lastViewedByMeDate; - } - public function setMd5Checksum($md5Checksum) { - $this->md5Checksum = $md5Checksum; - } - public function getMd5Checksum() { - return $this->md5Checksum; - } - public function setMimeType($mimeType) { - $this->mimeType = $mimeType; - } - public function getMimeType() { - return $this->mimeType; - } - public function setModifiedByMeDate($modifiedByMeDate) { - $this->modifiedByMeDate = $modifiedByMeDate; - } - public function getModifiedByMeDate() { - return $this->modifiedByMeDate; - } - public function setModifiedDate($modifiedDate) { - $this->modifiedDate = $modifiedDate; - } - public function getModifiedDate() { - return $this->modifiedDate; - } - public function setOriginalFilename($originalFilename) { - $this->originalFilename = $originalFilename; - } - public function getOriginalFilename() { - return $this->originalFilename; - } - public function setOwnerNames(/* array(Google_string) */ $ownerNames) { - $this->assertIsArray($ownerNames, 'Google_string', __METHOD__); - $this->ownerNames = $ownerNames; - } - public function getOwnerNames() { - return $this->ownerNames; - } - public function setOwners(/* array(Google_User) */ $owners) { - $this->assertIsArray($owners, 'Google_User', __METHOD__); - $this->owners = $owners; - } - public function getOwners() { - return $this->owners; - } - public function setParents(/* array(Google_ParentReference) */ $parents) { - $this->assertIsArray($parents, 'Google_ParentReference', __METHOD__); - $this->parents = $parents; - } - public function getParents() { - return $this->parents; - } - public function setQuotaBytesUsed($quotaBytesUsed) { - $this->quotaBytesUsed = $quotaBytesUsed; - } - public function getQuotaBytesUsed() { - return $this->quotaBytesUsed; - } - public function setSelfLink($selfLink) { - $this->selfLink = $selfLink; - } - public function getSelfLink() { - return $this->selfLink; - } - public function setShared($shared) { - $this->shared = $shared; - } - public function getShared() { - return $this->shared; - } - public function setSharedWithMeDate($sharedWithMeDate) { - $this->sharedWithMeDate = $sharedWithMeDate; - } - public function getSharedWithMeDate() { - return $this->sharedWithMeDate; - } - public function setThumbnail(Google_DriveFileThumbnail $thumbnail) { - $this->thumbnail = $thumbnail; - } - public function getThumbnail() { - return $this->thumbnail; - } - public function setThumbnailLink($thumbnailLink) { - $this->thumbnailLink = $thumbnailLink; - } - public function getThumbnailLink() { - return $this->thumbnailLink; - } - public function setTitle($title) { - $this->title = $title; - } - public function getTitle() { - return $this->title; - } - public function setUserPermission(Google_Permission $userPermission) { - $this->userPermission = $userPermission; - } - public function getUserPermission() { - return $this->userPermission; - } - public function setWebContentLink($webContentLink) { - $this->webContentLink = $webContentLink; - } - public function getWebContentLink() { - return $this->webContentLink; - } - public function setWebViewLink($webViewLink) { - $this->webViewLink = $webViewLink; - } - public function getWebViewLink() { - return $this->webViewLink; - } - public function setWritersCanShare($writersCanShare) { - $this->writersCanShare = $writersCanShare; - } - public function getWritersCanShare() { - return $this->writersCanShare; - } -} - -class Google_DriveFileImageMediaMetadata extends Google_Model { - public $aperture; - public $cameraMake; - public $cameraModel; - public $colorSpace; - public $date; - public $exposureBias; - public $exposureMode; - public $exposureTime; - public $flashUsed; - public $focalLength; - public $height; - public $isoSpeed; - public $lens; - protected $__locationType = 'Google_DriveFileImageMediaMetadataLocation'; - protected $__locationDataType = ''; - public $location; - public $maxApertureValue; - public $meteringMode; - public $rotation; - public $sensor; - public $subjectDistance; - public $whiteBalance; - public $width; - public function setAperture($aperture) { - $this->aperture = $aperture; - } - public function getAperture() { - return $this->aperture; - } - public function setCameraMake($cameraMake) { - $this->cameraMake = $cameraMake; - } - public function getCameraMake() { - return $this->cameraMake; - } - public function setCameraModel($cameraModel) { - $this->cameraModel = $cameraModel; - } - public function getCameraModel() { - return $this->cameraModel; - } - public function setColorSpace($colorSpace) { - $this->colorSpace = $colorSpace; - } - public function getColorSpace() { - return $this->colorSpace; - } - public function setDate($date) { - $this->date = $date; - } - public function getDate() { - return $this->date; - } - public function setExposureBias($exposureBias) { - $this->exposureBias = $exposureBias; - } - public function getExposureBias() { - return $this->exposureBias; - } - public function setExposureMode($exposureMode) { - $this->exposureMode = $exposureMode; - } - public function getExposureMode() { - return $this->exposureMode; - } - public function setExposureTime($exposureTime) { - $this->exposureTime = $exposureTime; - } - public function getExposureTime() { - return $this->exposureTime; - } - public function setFlashUsed($flashUsed) { - $this->flashUsed = $flashUsed; - } - public function getFlashUsed() { - return $this->flashUsed; - } - public function setFocalLength($focalLength) { - $this->focalLength = $focalLength; - } - public function getFocalLength() { - return $this->focalLength; - } - public function setHeight($height) { - $this->height = $height; - } - public function getHeight() { - return $this->height; - } - public function setIsoSpeed($isoSpeed) { - $this->isoSpeed = $isoSpeed; - } - public function getIsoSpeed() { - return $this->isoSpeed; - } - public function setLens($lens) { - $this->lens = $lens; - } - public function getLens() { - return $this->lens; - } - public function setLocation(Google_DriveFileImageMediaMetadataLocation $location) { - $this->location = $location; - } - public function getLocation() { - return $this->location; - } - public function setMaxApertureValue($maxApertureValue) { - $this->maxApertureValue = $maxApertureValue; - } - public function getMaxApertureValue() { - return $this->maxApertureValue; - } - public function setMeteringMode($meteringMode) { - $this->meteringMode = $meteringMode; - } - public function getMeteringMode() { - return $this->meteringMode; - } - public function setRotation($rotation) { - $this->rotation = $rotation; - } - public function getRotation() { - return $this->rotation; - } - public function setSensor($sensor) { - $this->sensor = $sensor; - } - public function getSensor() { - return $this->sensor; - } - public function setSubjectDistance($subjectDistance) { - $this->subjectDistance = $subjectDistance; - } - public function getSubjectDistance() { - return $this->subjectDistance; - } - public function setWhiteBalance($whiteBalance) { - $this->whiteBalance = $whiteBalance; - } - public function getWhiteBalance() { - return $this->whiteBalance; - } - public function setWidth($width) { - $this->width = $width; - } - public function getWidth() { - return $this->width; - } -} - -class Google_DriveFileImageMediaMetadataLocation extends Google_Model { - public $altitude; - public $latitude; - public $longitude; - public function setAltitude($altitude) { - $this->altitude = $altitude; - } - public function getAltitude() { - return $this->altitude; - } - public function setLatitude($latitude) { - $this->latitude = $latitude; - } - public function getLatitude() { - return $this->latitude; - } - public function setLongitude($longitude) { - $this->longitude = $longitude; - } - public function getLongitude() { - return $this->longitude; - } -} - -class Google_DriveFileIndexableText extends Google_Model { - public $text; - public function setText($text) { - $this->text = $text; - } - public function getText() { - return $this->text; - } -} - -class Google_DriveFileLabels extends Google_Model { - public $hidden; - public $restricted; - public $starred; - public $trashed; - public $viewed; - public function setHidden($hidden) { - $this->hidden = $hidden; - } - public function getHidden() { - return $this->hidden; - } - public function setRestricted($restricted) { - $this->restricted = $restricted; - } - public function getRestricted() { - return $this->restricted; - } - public function setStarred($starred) { - $this->starred = $starred; - } - public function getStarred() { - return $this->starred; - } - public function setTrashed($trashed) { - $this->trashed = $trashed; - } - public function getTrashed() { - return $this->trashed; - } - public function setViewed($viewed) { - $this->viewed = $viewed; - } - public function getViewed() { - return $this->viewed; - } -} - -class Google_DriveFileThumbnail extends Google_Model { - public $image; - public $mimeType; - public function setImage($image) { - $this->image = $image; - } - public function getImage() { - return $this->image; - } - public function setMimeType($mimeType) { - $this->mimeType = $mimeType; - } - public function getMimeType() { - return $this->mimeType; - } -} - -class Google_FileList extends Google_Model { - public $etag; - protected $__itemsType = 'Google_DriveFile'; - protected $__itemsDataType = 'array'; - public $items; - public $kind; - public $nextLink; - public $nextPageToken; - public $selfLink; - public function setEtag($etag) { - $this->etag = $etag; - } - public function getEtag() { - return $this->etag; - } - public function setItems(/* array(Google_DriveFile) */ $items) { - $this->assertIsArray($items, 'Google_DriveFile', __METHOD__); - $this->items = $items; - } - public function getItems() { - return $this->items; - } - public function setKind($kind) { - $this->kind = $kind; - } - public function getKind() { - return $this->kind; - } - public function setNextLink($nextLink) { - $this->nextLink = $nextLink; - } - public function getNextLink() { - return $this->nextLink; - } - public function setNextPageToken($nextPageToken) { - $this->nextPageToken = $nextPageToken; - } - public function getNextPageToken() { - return $this->nextPageToken; - } - public function setSelfLink($selfLink) { - $this->selfLink = $selfLink; - } - public function getSelfLink() { - return $this->selfLink; - } -} - -class Google_ParentList extends Google_Model { - public $etag; - protected $__itemsType = 'Google_ParentReference'; - protected $__itemsDataType = 'array'; - public $items; - public $kind; - public $selfLink; - public function setEtag($etag) { - $this->etag = $etag; - } - public function getEtag() { - return $this->etag; - } - public function setItems(/* array(Google_ParentReference) */ $items) { - $this->assertIsArray($items, 'Google_ParentReference', __METHOD__); - $this->items = $items; - } - public function getItems() { - return $this->items; - } - public function setKind($kind) { - $this->kind = $kind; - } - public function getKind() { - return $this->kind; - } - public function setSelfLink($selfLink) { - $this->selfLink = $selfLink; - } - public function getSelfLink() { - return $this->selfLink; - } -} - -class Google_ParentReference extends Google_Model { - public $id; - public $isRoot; - public $kind; - public $parentLink; - public $selfLink; - public function setId($id) { - $this->id = $id; - } - public function getId() { - return $this->id; - } - public function setIsRoot($isRoot) { - $this->isRoot = $isRoot; - } - public function getIsRoot() { - return $this->isRoot; - } - public function setKind($kind) { - $this->kind = $kind; - } - public function getKind() { - return $this->kind; - } - public function setParentLink($parentLink) { - $this->parentLink = $parentLink; - } - public function getParentLink() { - return $this->parentLink; - } - public function setSelfLink($selfLink) { - $this->selfLink = $selfLink; - } - public function getSelfLink() { - return $this->selfLink; - } -} - -class Google_Permission extends Google_Model { - public $additionalRoles; - public $authKey; - public $etag; - public $id; - public $kind; - public $name; - public $photoLink; - public $role; - public $selfLink; - public $type; - public $value; - public $withLink; - public function setAdditionalRoles(/* array(Google_string) */ $additionalRoles) { - $this->assertIsArray($additionalRoles, 'Google_string', __METHOD__); - $this->additionalRoles = $additionalRoles; - } - public function getAdditionalRoles() { - return $this->additionalRoles; - } - public function setAuthKey($authKey) { - $this->authKey = $authKey; - } - public function getAuthKey() { - return $this->authKey; - } - public function setEtag($etag) { - $this->etag = $etag; - } - public function getEtag() { - return $this->etag; - } - public function setId($id) { - $this->id = $id; - } - public function getId() { - return $this->id; - } - public function setKind($kind) { - $this->kind = $kind; - } - public function getKind() { - return $this->kind; - } - public function setName($name) { - $this->name = $name; - } - public function getName() { - return $this->name; - } - public function setPhotoLink($photoLink) { - $this->photoLink = $photoLink; - } - public function getPhotoLink() { - return $this->photoLink; - } - public function setRole($role) { - $this->role = $role; - } - public function getRole() { - return $this->role; - } - public function setSelfLink($selfLink) { - $this->selfLink = $selfLink; - } - public function getSelfLink() { - return $this->selfLink; - } - public function setType($type) { - $this->type = $type; - } - public function getType() { - return $this->type; - } - public function setValue($value) { - $this->value = $value; - } - public function getValue() { - return $this->value; - } - public function setWithLink($withLink) { - $this->withLink = $withLink; - } - public function getWithLink() { - return $this->withLink; - } -} - -class Google_PermissionList extends Google_Model { - public $etag; - protected $__itemsType = 'Google_Permission'; - protected $__itemsDataType = 'array'; - public $items; - public $kind; - public $selfLink; - public function setEtag($etag) { - $this->etag = $etag; - } - public function getEtag() { - return $this->etag; - } - public function setItems(/* array(Google_Permission) */ $items) { - $this->assertIsArray($items, 'Google_Permission', __METHOD__); - $this->items = $items; - } - public function getItems() { - return $this->items; - } - public function setKind($kind) { - $this->kind = $kind; - } - public function getKind() { - return $this->kind; - } - public function setSelfLink($selfLink) { - $this->selfLink = $selfLink; - } - public function getSelfLink() { - return $this->selfLink; - } -} - -class Google_Property extends Google_Model { - public $etag; - public $key; - public $kind; - public $selfLink; - public $value; - public $visibility; - public function setEtag($etag) { - $this->etag = $etag; - } - public function getEtag() { - return $this->etag; - } - public function setKey($key) { - $this->key = $key; - } - public function getKey() { - return $this->key; - } - public function setKind($kind) { - $this->kind = $kind; - } - public function getKind() { - return $this->kind; - } - public function setSelfLink($selfLink) { - $this->selfLink = $selfLink; - } - public function getSelfLink() { - return $this->selfLink; - } - public function setValue($value) { - $this->value = $value; - } - public function getValue() { - return $this->value; - } - public function setVisibility($visibility) { - $this->visibility = $visibility; - } - public function getVisibility() { - return $this->visibility; - } -} - -class Google_PropertyList extends Google_Model { - public $etag; - protected $__itemsType = 'Google_Property'; - protected $__itemsDataType = 'array'; - public $items; - public $kind; - public $selfLink; - public function setEtag($etag) { - $this->etag = $etag; - } - public function getEtag() { - return $this->etag; - } - public function setItems(/* array(Google_Property) */ $items) { - $this->assertIsArray($items, 'Google_Property', __METHOD__); - $this->items = $items; - } - public function getItems() { - return $this->items; - } - public function setKind($kind) { - $this->kind = $kind; - } - public function getKind() { - return $this->kind; - } - public function setSelfLink($selfLink) { - $this->selfLink = $selfLink; - } - public function getSelfLink() { - return $this->selfLink; - } -} - -class Google_Revision extends Google_Model { - public $downloadUrl; - public $etag; - public $exportLinks; - public $fileSize; - public $id; - public $kind; - protected $__lastModifyingUserType = 'Google_User'; - protected $__lastModifyingUserDataType = ''; - public $lastModifyingUser; - public $lastModifyingUserName; - public $md5Checksum; - public $mimeType; - public $modifiedDate; - public $originalFilename; - public $pinned; - public $publishAuto; - public $published; - public $publishedLink; - public $publishedOutsideDomain; - public $selfLink; - public function setDownloadUrl($downloadUrl) { - $this->downloadUrl = $downloadUrl; - } - public function getDownloadUrl() { - return $this->downloadUrl; - } - public function setEtag($etag) { - $this->etag = $etag; - } - public function getEtag() { - return $this->etag; - } - public function setExportLinks($exportLinks) { - $this->exportLinks = $exportLinks; - } - public function getExportLinks() { - return $this->exportLinks; - } - public function setFileSize($fileSize) { - $this->fileSize = $fileSize; - } - public function getFileSize() { - return $this->fileSize; - } - public function setId($id) { - $this->id = $id; - } - public function getId() { - return $this->id; - } - public function setKind($kind) { - $this->kind = $kind; - } - public function getKind() { - return $this->kind; - } - public function setLastModifyingUser(Google_User $lastModifyingUser) { - $this->lastModifyingUser = $lastModifyingUser; - } - public function getLastModifyingUser() { - return $this->lastModifyingUser; - } - public function setLastModifyingUserName($lastModifyingUserName) { - $this->lastModifyingUserName = $lastModifyingUserName; - } - public function getLastModifyingUserName() { - return $this->lastModifyingUserName; - } - public function setMd5Checksum($md5Checksum) { - $this->md5Checksum = $md5Checksum; - } - public function getMd5Checksum() { - return $this->md5Checksum; - } - public function setMimeType($mimeType) { - $this->mimeType = $mimeType; - } - public function getMimeType() { - return $this->mimeType; - } - public function setModifiedDate($modifiedDate) { - $this->modifiedDate = $modifiedDate; - } - public function getModifiedDate() { - return $this->modifiedDate; - } - public function setOriginalFilename($originalFilename) { - $this->originalFilename = $originalFilename; - } - public function getOriginalFilename() { - return $this->originalFilename; - } - public function setPinned($pinned) { - $this->pinned = $pinned; - } - public function getPinned() { - return $this->pinned; - } - public function setPublishAuto($publishAuto) { - $this->publishAuto = $publishAuto; - } - public function getPublishAuto() { - return $this->publishAuto; - } - public function setPublished($published) { - $this->published = $published; - } - public function getPublished() { - return $this->published; - } - public function setPublishedLink($publishedLink) { - $this->publishedLink = $publishedLink; - } - public function getPublishedLink() { - return $this->publishedLink; - } - public function setPublishedOutsideDomain($publishedOutsideDomain) { - $this->publishedOutsideDomain = $publishedOutsideDomain; - } - public function getPublishedOutsideDomain() { - return $this->publishedOutsideDomain; - } - public function setSelfLink($selfLink) { - $this->selfLink = $selfLink; - } - public function getSelfLink() { - return $this->selfLink; - } -} - -class Google_RevisionList extends Google_Model { - public $etag; - protected $__itemsType = 'Google_Revision'; - protected $__itemsDataType = 'array'; - public $items; - public $kind; - public $selfLink; - public function setEtag($etag) { - $this->etag = $etag; - } - public function getEtag() { - return $this->etag; - } - public function setItems(/* array(Google_Revision) */ $items) { - $this->assertIsArray($items, 'Google_Revision', __METHOD__); - $this->items = $items; - } - public function getItems() { - return $this->items; - } - public function setKind($kind) { - $this->kind = $kind; - } - public function getKind() { - return $this->kind; - } - public function setSelfLink($selfLink) { - $this->selfLink = $selfLink; - } - public function getSelfLink() { - return $this->selfLink; - } -} - -class Google_User extends Google_Model { - public $displayName; - public $isAuthenticatedUser; - public $kind; - public $permissionId; - protected $__pictureType = 'Google_UserPicture'; - protected $__pictureDataType = ''; - public $picture; - public function setDisplayName($displayName) { - $this->displayName = $displayName; - } - public function getDisplayName() { - return $this->displayName; - } - public function setIsAuthenticatedUser($isAuthenticatedUser) { - $this->isAuthenticatedUser = $isAuthenticatedUser; - } - public function getIsAuthenticatedUser() { - return $this->isAuthenticatedUser; - } - public function setKind($kind) { - $this->kind = $kind; - } - public function getKind() { - return $this->kind; - } - public function setPermissionId($permissionId) { - $this->permissionId = $permissionId; - } - public function getPermissionId() { - return $this->permissionId; - } - public function setPicture(Google_UserPicture $picture) { - $this->picture = $picture; - } - public function getPicture() { - return $this->picture; - } -} - -class Google_UserPicture extends Google_Model { - public $url; - public function setUrl($url) { - $this->url = $url; - } - public function getUrl() { - return $this->url; - } -} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/external/URITemplateParser.php b/apps/files_external/3rdparty/google-api-php-client/src/external/URITemplateParser.php deleted file mode 100644 index 594adbb15e2..00000000000 --- a/apps/files_external/3rdparty/google-api-php-client/src/external/URITemplateParser.php +++ /dev/null @@ -1,209 +0,0 @@ -<?php -/* -Copyright (c) 2010 Kevin M Burns Jr, http://kevburnsjr.com/ - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -/** - * A URI Template Parser which is used by the apiREST class to resolve the REST requests - * Blogpost: http://lab.kevburnsjr.com/php-uri-template-parser - * Source: http://github.com/KevBurnsJr/php-uri-template-parser - */ -class URI_Template_Parser { - - public static $operators = array('+', ';', '?', '/', '.'); - public static $reserved_operators = array('|', '!', '@'); - public static $explode_modifiers = array('+', '*'); - public static $partial_modifiers = array(':', '^'); - - public static $gen_delims = array(':', '/', '?', '#', '[', ']', '@'); - public static $gen_delims_pct = array('%3A', '%2F', '%3F', '%23', '%5B', '%5D', '%40'); - public static $sub_delims = array('!', '$', '&', '\'', '(', ')', '*', '+', ',', ';', '='); - public static $sub_delims_pct = array('%21', '%24', '%26', '%27', '%28', '%29', '%2A', '%2B', '%2C', '%3B', '%3D'); - public static $reserved; - public static $reserved_pct; - - public function __construct($template) { - self::$reserved = array_merge(self::$gen_delims, self::$sub_delims); - self::$reserved_pct = array_merge(self::$gen_delims_pct, self::$sub_delims_pct); - $this->template = $template; - } - - public function expand($data) { - // Modification to make this a bit more performant (since gettype is very slow) - if (! is_array($data)) { - $data = (array)$data; - } - /* - // Original code, which uses a slow gettype() statement, kept in place for if the assumption that is_array always works here is incorrect - switch (gettype($data)) { - case "boolean": - case "integer": - case "double": - case "string": - case "object": - $data = (array)$data; - break; - } -*/ - - // Resolve template vars - preg_match_all('/\{([^\}]*)\}/', $this->template, $em); - - foreach ($em[1] as $i => $bare_expression) { - preg_match('/^([\+\;\?\/\.]{1})?(.*)$/', $bare_expression, $lm); - $exp = new StdClass(); - $exp->expression = $em[0][$i]; - $exp->operator = $lm[1]; - $exp->variable_list = $lm[2]; - $exp->varspecs = explode(',', $exp->variable_list); - $exp->vars = array(); - foreach ($exp->varspecs as $varspec) { - preg_match('/^([a-zA-Z0-9_]+)([\*\+]{1})?([\:\^][0-9-]+)?(\=[^,]+)?$/', $varspec, $vm); - $var = new StdClass(); - $var->name = $vm[1]; - $var->modifier = isset($vm[2]) && $vm[2] ? $vm[2] : null; - $var->modifier = isset($vm[3]) && $vm[3] ? $vm[3] : $var->modifier; - $var->default = isset($vm[4]) ? substr($vm[4], 1) : null; - $exp->vars[] = $var; - } - - // Add processing flags - $exp->reserved = false; - $exp->prefix = ''; - $exp->delimiter = ','; - switch ($exp->operator) { - case '+': - $exp->reserved = 'true'; - break; - case ';': - $exp->prefix = ';'; - $exp->delimiter = ';'; - break; - case '?': - $exp->prefix = '?'; - $exp->delimiter = '&'; - break; - case '/': - $exp->prefix = '/'; - $exp->delimiter = '/'; - break; - case '.': - $exp->prefix = '.'; - $exp->delimiter = '.'; - break; - } - $expressions[] = $exp; - } - - // Expansion - $this->expansion = $this->template; - - foreach ($expressions as $exp) { - $part = $exp->prefix; - $exp->one_var_defined = false; - foreach ($exp->vars as $var) { - $val = ''; - if ($exp->one_var_defined && isset($data[$var->name])) { - $part .= $exp->delimiter; - } - // Variable present - if (isset($data[$var->name])) { - $exp->one_var_defined = true; - $var->data = $data[$var->name]; - - $val = self::val_from_var($var, $exp); - - // Variable missing - } else { - if ($var->default) { - $exp->one_var_defined = true; - $val = $var->default; - } - } - $part .= $val; - } - if (! $exp->one_var_defined) $part = ''; - $this->expansion = str_replace($exp->expression, $part, $this->expansion); - } - - return $this->expansion; - } - - private function val_from_var($var, $exp) { - $val = ''; - if (is_array($var->data)) { - $i = 0; - if ($exp->operator == '?' && ! $var->modifier) { - $val .= $var->name . '='; - } - foreach ($var->data as $k => $v) { - $del = $var->modifier ? $exp->delimiter : ','; - $ek = rawurlencode($k); - $ev = rawurlencode($v); - - // Array - if ($k !== $i) { - if ($var->modifier == '+') { - $val .= $var->name . '.'; - } - if ($exp->operator == '?' && $var->modifier || $exp->operator == ';' && $var->modifier == '*' || $exp->operator == ';' && $var->modifier == '+') { - $val .= $ek . '='; - } else { - $val .= $ek . $del; - } - - // List - } else { - if ($var->modifier == '+') { - if ($exp->operator == ';' && $var->modifier == '*' || $exp->operator == ';' && $var->modifier == '+' || $exp->operator == '?' && $var->modifier == '+') { - $val .= $var->name . '='; - } else { - $val .= $var->name . '.'; - } - } - } - $val .= $ev . $del; - $i ++; - } - $val = trim($val, $del); - - // Strings, numbers, etc. - } else { - if ($exp->operator == '?') { - $val = $var->name . (isset($var->data) ? '=' : ''); - } else if ($exp->operator == ';') { - $val = $var->name . ($var->data ? '=' : ''); - } - $val .= rawurlencode($var->data); - if ($exp->operator == '+') { - $val = str_replace(self::$reserved_pct, self::$reserved, $val); - } - } - return $val; - } - - public function match($uri) {} - - public function __toString() { - return $this->template; - } -} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/io/Google_CurlIO.php b/apps/files_external/3rdparty/google-api-php-client/src/io/Google_CurlIO.php deleted file mode 100644 index 65352f29882..00000000000 --- a/apps/files_external/3rdparty/google-api-php-client/src/io/Google_CurlIO.php +++ /dev/null @@ -1,278 +0,0 @@ -<?php -/* - * Copyright 2010 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Curl based implementation of apiIO. - * - * @author Chris Chabot <chabotc@google.com> - * @author Chirag Shah <chirags@google.com> - */ - -require_once 'Google_CacheParser.php'; - -class Google_CurlIO implements Google_IO { - const CONNECTION_ESTABLISHED = "HTTP/1.0 200 Connection established\r\n\r\n"; - const FORM_URLENCODED = 'application/x-www-form-urlencoded'; - - private static $ENTITY_HTTP_METHODS = array("POST" => null, "PUT" => null); - private static $HOP_BY_HOP = array( - 'connection', 'keep-alive', 'proxy-authenticate', 'proxy-authorization', - 'te', 'trailers', 'transfer-encoding', 'upgrade'); - - private $curlParams = array ( - CURLOPT_RETURNTRANSFER => true, - CURLOPT_FOLLOWLOCATION => 0, - CURLOPT_FAILONERROR => false, - CURLOPT_SSL_VERIFYPEER => true, - CURLOPT_HEADER => true, - CURLOPT_VERBOSE => false, - ); - - /** - * Perform an authenticated / signed apiHttpRequest. - * This function takes the apiHttpRequest, calls apiAuth->sign on it - * (which can modify the request in what ever way fits the auth mechanism) - * and then calls apiCurlIO::makeRequest on the signed request - * - * @param Google_HttpRequest $request - * @return Google_HttpRequest The resulting HTTP response including the - * responseHttpCode, responseHeaders and responseBody. - */ - public function authenticatedRequest(Google_HttpRequest $request) { - $request = Google_Client::$auth->sign($request); - return $this->makeRequest($request); - } - - /** - * Execute a apiHttpRequest - * - * @param Google_HttpRequest $request the http request to be executed - * @return Google_HttpRequest http request with the response http code, response - * headers and response body filled in - * @throws Google_IOException on curl or IO error - */ - public function makeRequest(Google_HttpRequest $request) { - // First, check to see if we have a valid cached version. - $cached = $this->getCachedRequest($request); - if ($cached !== false) { - if (Google_CacheParser::mustRevalidate($cached)) { - $addHeaders = array(); - if ($cached->getResponseHeader('etag')) { - // [13.3.4] If an entity tag has been provided by the origin server, - // we must use that entity tag in any cache-conditional request. - $addHeaders['If-None-Match'] = $cached->getResponseHeader('etag'); - } elseif ($cached->getResponseHeader('date')) { - $addHeaders['If-Modified-Since'] = $cached->getResponseHeader('date'); - } - - $request->setRequestHeaders($addHeaders); - } else { - // No need to revalidate the request, return it directly - return $cached; - } - } - - if (array_key_exists($request->getRequestMethod(), - self::$ENTITY_HTTP_METHODS)) { - $request = $this->processEntityRequest($request); - } - - $ch = curl_init(); - curl_setopt_array($ch, $this->curlParams); - curl_setopt($ch, CURLOPT_URL, $request->getUrl()); - if ($request->getPostBody()) { - curl_setopt($ch, CURLOPT_POSTFIELDS, $request->getPostBody()); - } - - $requestHeaders = $request->getRequestHeaders(); - if ($requestHeaders && is_array($requestHeaders)) { - $parsed = array(); - foreach ($requestHeaders as $k => $v) { - $parsed[] = "$k: $v"; - } - curl_setopt($ch, CURLOPT_HTTPHEADER, $parsed); - } - - curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $request->getRequestMethod()); - curl_setopt($ch, CURLOPT_USERAGENT, $request->getUserAgent()); - $respData = curl_exec($ch); - - // Retry if certificates are missing. - if (curl_errno($ch) == CURLE_SSL_CACERT) { - error_log('SSL certificate problem, verify that the CA cert is OK.' - . ' Retrying with the CA cert bundle from google-api-php-client.'); - curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/cacerts.pem'); - $respData = curl_exec($ch); - } - - $respHeaderSize = curl_getinfo($ch, CURLINFO_HEADER_SIZE); - $respHttpCode = (int) curl_getinfo($ch, CURLINFO_HTTP_CODE); - $curlErrorNum = curl_errno($ch); - $curlError = curl_error($ch); - curl_close($ch); - if ($curlErrorNum != CURLE_OK) { - throw new Google_IOException("HTTP Error: ($respHttpCode) $curlError"); - } - - // Parse out the raw response into usable bits - list($responseHeaders, $responseBody) = - self::parseHttpResponse($respData, $respHeaderSize); - - if ($respHttpCode == 304 && $cached) { - // If the server responded NOT_MODIFIED, return the cached request. - if (isset($responseHeaders['connection'])) { - $hopByHop = array_merge( - self::$HOP_BY_HOP, - explode(',', $responseHeaders['connection']) - ); - - $endToEnd = array(); - foreach($hopByHop as $key) { - if (isset($responseHeaders[$key])) { - $endToEnd[$key] = $responseHeaders[$key]; - } - } - $cached->setResponseHeaders($endToEnd); - } - return $cached; - } - - // Fill in the apiHttpRequest with the response values - $request->setResponseHttpCode($respHttpCode); - $request->setResponseHeaders($responseHeaders); - $request->setResponseBody($responseBody); - // Store the request in cache (the function checks to see if the request - // can actually be cached) - $this->setCachedRequest($request); - // And finally return it - return $request; - } - - /** - * @visible for testing. - * Cache the response to an HTTP request if it is cacheable. - * @param Google_HttpRequest $request - * @return bool Returns true if the insertion was successful. - * Otherwise, return false. - */ - public function setCachedRequest(Google_HttpRequest $request) { - // Determine if the request is cacheable. - if (Google_CacheParser::isResponseCacheable($request)) { - Google_Client::$cache->set($request->getCacheKey(), $request); - return true; - } - - return false; - } - - /** - * @visible for testing. - * @param Google_HttpRequest $request - * @return Google_HttpRequest|bool Returns the cached object or - * false if the operation was unsuccessful. - */ - public function getCachedRequest(Google_HttpRequest $request) { - if (false == Google_CacheParser::isRequestCacheable($request)) { - false; - } - - return Google_Client::$cache->get($request->getCacheKey()); - } - - /** - * @param $respData - * @param $headerSize - * @return array - */ - public static function parseHttpResponse($respData, $headerSize) { - if (stripos($respData, self::CONNECTION_ESTABLISHED) !== false) { - $respData = str_ireplace(self::CONNECTION_ESTABLISHED, '', $respData); - } - - if ($headerSize) { - $responseBody = substr($respData, $headerSize); - $responseHeaders = substr($respData, 0, $headerSize); - } else { - list($responseHeaders, $responseBody) = explode("\r\n\r\n", $respData, 2); - } - - $responseHeaders = self::parseResponseHeaders($responseHeaders); - return array($responseHeaders, $responseBody); - } - - public static function parseResponseHeaders($rawHeaders) { - $responseHeaders = array(); - - $responseHeaderLines = explode("\r\n", $rawHeaders); - foreach ($responseHeaderLines as $headerLine) { - if ($headerLine && strpos($headerLine, ':') !== false) { - list($header, $value) = explode(': ', $headerLine, 2); - $header = strtolower($header); - if (isset($responseHeaders[$header])) { - $responseHeaders[$header] .= "\n" . $value; - } else { - $responseHeaders[$header] = $value; - } - } - } - return $responseHeaders; - } - - /** - * @visible for testing - * Process an http request that contains an enclosed entity. - * @param Google_HttpRequest $request - * @return Google_HttpRequest Processed request with the enclosed entity. - */ - public function processEntityRequest(Google_HttpRequest $request) { - $postBody = $request->getPostBody(); - $contentType = $request->getRequestHeader("content-type"); - - // Set the default content-type as application/x-www-form-urlencoded. - if (false == $contentType) { - $contentType = self::FORM_URLENCODED; - $request->setRequestHeaders(array('content-type' => $contentType)); - } - - // Force the payload to match the content-type asserted in the header. - if ($contentType == self::FORM_URLENCODED && is_array($postBody)) { - $postBody = http_build_query($postBody, '', '&'); - $request->setPostBody($postBody); - } - - // Make sure the content-length header is set. - if (!$postBody || is_string($postBody)) { - $postsLength = strlen($postBody); - $request->setRequestHeaders(array('content-length' => $postsLength)); - } - - return $request; - } - - /** - * Set options that update cURL's default behavior. - * The list of accepted options are: - * {@link http://php.net/manual/en/function.curl-setopt.php] - * - * @param array $optCurlParams Multiple options used by a cURL session. - */ - public function setOptions($optCurlParams) { - foreach ($optCurlParams as $key => $val) { - $this->curlParams[$key] = $val; - } - } -}
\ No newline at end of file diff --git a/apps/files_external/3rdparty/google-api-php-client/src/io/Google_HttpRequest.php b/apps/files_external/3rdparty/google-api-php-client/src/io/Google_HttpRequest.php deleted file mode 100644 index b98eae54008..00000000000 --- a/apps/files_external/3rdparty/google-api-php-client/src/io/Google_HttpRequest.php +++ /dev/null @@ -1,304 +0,0 @@ -<?php -/* - * Copyright 2010 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * HTTP Request to be executed by apiIO classes. Upon execution, the - * responseHttpCode, responseHeaders and responseBody will be filled in. - * - * @author Chris Chabot <chabotc@google.com> - * @author Chirag Shah <chirags@google.com> - * - */ -class Google_HttpRequest { - const USER_AGENT_SUFFIX = "google-api-php-client/0.6.0"; - private $batchHeaders = array( - 'Content-Type' => 'application/http', - 'Content-Transfer-Encoding' => 'binary', - 'MIME-Version' => '1.0', - 'Content-Length' => '' - ); - - protected $url; - protected $requestMethod; - protected $requestHeaders; - protected $postBody; - protected $userAgent; - - protected $responseHttpCode; - protected $responseHeaders; - protected $responseBody; - - public $accessKey; - - public function __construct($url, $method = 'GET', $headers = array(), $postBody = null) { - $this->setUrl($url); - $this->setRequestMethod($method); - $this->setRequestHeaders($headers); - $this->setPostBody($postBody); - - global $apiConfig; - if (empty($apiConfig['application_name'])) { - $this->userAgent = self::USER_AGENT_SUFFIX; - } else { - $this->userAgent = $apiConfig['application_name'] . " " . self::USER_AGENT_SUFFIX; - } - } - - /** - * Misc function that returns the base url component of the $url - * used by the OAuth signing class to calculate the base string - * @return string The base url component of the $url. - * @see http://oauth.net/core/1.0a/#anchor13 - */ - public function getBaseUrl() { - if ($pos = strpos($this->url, '?')) { - return substr($this->url, 0, $pos); - } - return $this->url; - } - - /** - * Misc function that returns an array of the query parameters of the current - * url used by the OAuth signing class to calculate the signature - * @return array Query parameters in the query string. - */ - public function getQueryParams() { - if ($pos = strpos($this->url, '?')) { - $queryStr = substr($this->url, $pos + 1); - $params = array(); - parse_str($queryStr, $params); - return $params; - } - return array(); - } - - /** - * @return string HTTP Response Code. - */ - public function getResponseHttpCode() { - return (int) $this->responseHttpCode; - } - - /** - * @param int $responseHttpCode HTTP Response Code. - */ - public function setResponseHttpCode($responseHttpCode) { - $this->responseHttpCode = $responseHttpCode; - } - - /** - * @return $responseHeaders (array) HTTP Response Headers. - */ - public function getResponseHeaders() { - return $this->responseHeaders; - } - - /** - * @return string HTTP Response Body - */ - public function getResponseBody() { - return $this->responseBody; - } - - /** - * @param array $headers The HTTP response headers - * to be normalized. - */ - public function setResponseHeaders($headers) { - $headers = Google_Utils::normalize($headers); - if ($this->responseHeaders) { - $headers = array_merge($this->responseHeaders, $headers); - } - - $this->responseHeaders = $headers; - } - - /** - * @param string $key - * @return array|boolean Returns the requested HTTP header or - * false if unavailable. - */ - public function getResponseHeader($key) { - return isset($this->responseHeaders[$key]) - ? $this->responseHeaders[$key] - : false; - } - - /** - * @param string $responseBody The HTTP response body. - */ - public function setResponseBody($responseBody) { - $this->responseBody = $responseBody; - } - - /** - * @return string $url The request URL. - */ - - public function getUrl() { - return $this->url; - } - - /** - * @return string $method HTTP Request Method. - */ - public function getRequestMethod() { - return $this->requestMethod; - } - - /** - * @return array $headers HTTP Request Headers. - */ - public function getRequestHeaders() { - return $this->requestHeaders; - } - - /** - * @param string $key - * @return array|boolean Returns the requested HTTP header or - * false if unavailable. - */ - public function getRequestHeader($key) { - return isset($this->requestHeaders[$key]) - ? $this->requestHeaders[$key] - : false; - } - - /** - * @return string $postBody HTTP Request Body. - */ - public function getPostBody() { - return $this->postBody; - } - - /** - * @param string $url the url to set - */ - public function setUrl($url) { - if (substr($url, 0, 4) == 'http') { - $this->url = $url; - } else { - // Force the path become relative. - if (substr($url, 0, 1) !== '/') { - $url = '/' . $url; - } - global $apiConfig; - $this->url = $apiConfig['basePath'] . $url; - } - } - - /** - * @param string $method Set he HTTP Method and normalize - * it to upper-case, as required by HTTP. - * - */ - public function setRequestMethod($method) { - $this->requestMethod = strtoupper($method); - } - - /** - * @param array $headers The HTTP request headers - * to be set and normalized. - */ - public function setRequestHeaders($headers) { - $headers = Google_Utils::normalize($headers); - if ($this->requestHeaders) { - $headers = array_merge($this->requestHeaders, $headers); - } - $this->requestHeaders = $headers; - } - - /** - * @param string $postBody the postBody to set - */ - public function setPostBody($postBody) { - $this->postBody = $postBody; - } - - /** - * Set the User-Agent Header. - * @param string $userAgent The User-Agent. - */ - public function setUserAgent($userAgent) { - $this->userAgent = $userAgent; - } - - /** - * @return string The User-Agent. - */ - public function getUserAgent() { - return $this->userAgent; - } - - /** - * Returns a cache key depending on if this was an OAuth signed request - * in which case it will use the non-signed url and access key to make this - * cache key unique per authenticated user, else use the plain request url - * @return string The md5 hash of the request cache key. - */ - public function getCacheKey() { - $key = $this->getUrl(); - - if (isset($this->accessKey)) { - $key .= $this->accessKey; - } - - if (isset($this->requestHeaders['authorization'])) { - $key .= $this->requestHeaders['authorization']; - } - - return md5($key); - } - - public function getParsedCacheControl() { - $parsed = array(); - $rawCacheControl = $this->getResponseHeader('cache-control'); - if ($rawCacheControl) { - $rawCacheControl = str_replace(', ', '&', $rawCacheControl); - parse_str($rawCacheControl, $parsed); - } - - return $parsed; - } - - /** - * @param string $id - * @return string A string representation of the HTTP Request. - */ - public function toBatchString($id) { - $str = ''; - foreach($this->batchHeaders as $key => $val) { - $str .= $key . ': ' . $val . "\n"; - } - - $str .= "Content-ID: $id\n"; - $str .= "\n"; - - $path = parse_url($this->getUrl(), PHP_URL_PATH); - $str .= $this->getRequestMethod() . ' ' . $path . " HTTP/1.1\n"; - foreach($this->getRequestHeaders() as $key => $val) { - $str .= $key . ': ' . $val . "\n"; - } - - if ($this->getPostBody()) { - $str .= "\n"; - $str .= $this->getPostBody(); - } - - return $str; - } -} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/io/Google_IO.php b/apps/files_external/3rdparty/google-api-php-client/src/io/Google_IO.php deleted file mode 100644 index 5445e699038..00000000000 --- a/apps/files_external/3rdparty/google-api-php-client/src/io/Google_IO.php +++ /dev/null @@ -1,49 +0,0 @@ -<?php -/** - * Copyright 2010 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -require_once 'io/Google_HttpRequest.php'; -require_once 'io/Google_CurlIO.php'; -require_once 'io/Google_REST.php'; - -/** - * Abstract IO class - * - * @author Chris Chabot <chabotc@google.com> - */ -interface Google_IO { - /** - * An utility function that first calls $this->auth->sign($request) and then executes makeRequest() - * on that signed request. Used for when a request should be authenticated - * @param Google_HttpRequest $request - * @return Google_HttpRequest $request - */ - public function authenticatedRequest(Google_HttpRequest $request); - - /** - * Executes a apIHttpRequest and returns the resulting populated httpRequest - * @param Google_HttpRequest $request - * @return Google_HttpRequest $request - */ - public function makeRequest(Google_HttpRequest $request); - - /** - * Set options that update the transport implementation's behavior. - * @param $options - */ - public function setOptions($options); - -} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/service/Google_MediaFileUpload.php b/apps/files_external/3rdparty/google-api-php-client/src/service/Google_MediaFileUpload.php deleted file mode 100644 index c64e18851df..00000000000 --- a/apps/files_external/3rdparty/google-api-php-client/src/service/Google_MediaFileUpload.php +++ /dev/null @@ -1,262 +0,0 @@ -<?php -/** - * Copyright 2012 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @author Chirag Shah <chirags@google.com> - * - */ -class Google_MediaFileUpload { - const UPLOAD_MEDIA_TYPE = 'media'; - const UPLOAD_MULTIPART_TYPE = 'multipart'; - const UPLOAD_RESUMABLE_TYPE = 'resumable'; - - /** @var string $mimeType */ - public $mimeType; - - /** @var string $data */ - public $data; - - /** @var bool $resumable */ - public $resumable; - - /** @var int $chunkSize */ - public $chunkSize; - - /** @var int $size */ - public $size; - - /** @var string $resumeUri */ - public $resumeUri; - - /** @var int $progress */ - public $progress; - - /** - * @param $mimeType string - * @param $data string The bytes you want to upload. - * @param $resumable bool - * @param bool $chunkSize File will be uploaded in chunks of this many bytes. - * only used if resumable=True - */ - public function __construct($mimeType, $data, $resumable=false, $chunkSize=false) { - $this->mimeType = $mimeType; - $this->data = $data; - $this->size = strlen($this->data); - $this->resumable = $resumable; - if(!$chunkSize) { - $chunkSize = 256 * 1024; - } - $this->chunkSize = $chunkSize; - $this->progress = 0; - } - - public function setFileSize($size) { - $this->size = $size; - } - - /** - * @static - * @param $meta - * @param $params - * @return array|bool - */ - public static function process($meta, &$params) { - $payload = array(); - $meta = is_string($meta) ? json_decode($meta, true) : $meta; - $uploadType = self::getUploadType($meta, $payload, $params); - if (!$uploadType) { - // Process as a normal API request. - return false; - } - - // Process as a media upload request. - $params['uploadType'] = array( - 'type' => 'string', - 'location' => 'query', - 'value' => $uploadType, - ); - - $mimeType = isset($params['mimeType']) - ? $params['mimeType']['value'] - : false; - unset($params['mimeType']); - - if (!$mimeType) { - $mimeType = $payload['content-type']; - } - - if (isset($params['file'])) { - // This is a standard file upload with curl. - $file = $params['file']['value']; - unset($params['file']); - return self::processFileUpload($file, $mimeType); - } - - $data = isset($params['data']) - ? $params['data']['value'] - : false; - unset($params['data']); - - if (self::UPLOAD_RESUMABLE_TYPE == $uploadType) { - $payload['content-type'] = $mimeType; - $payload['postBody'] = is_string($meta) ? $meta : json_encode($meta); - - } elseif (self::UPLOAD_MEDIA_TYPE == $uploadType) { - // This is a simple media upload. - $payload['content-type'] = $mimeType; - $payload['postBody'] = $data; - } - - elseif (self::UPLOAD_MULTIPART_TYPE == $uploadType) { - // This is a multipart/related upload. - $boundary = isset($params['boundary']['value']) ? $params['boundary']['value'] : mt_rand(); - $boundary = str_replace('"', '', $boundary); - $payload['content-type'] = 'multipart/related; boundary=' . $boundary; - $related = "--$boundary\r\n"; - $related .= "Content-Type: application/json; charset=UTF-8\r\n"; - $related .= "\r\n" . json_encode($meta) . "\r\n"; - $related .= "--$boundary\r\n"; - $related .= "Content-Type: $mimeType\r\n"; - $related .= "Content-Transfer-Encoding: base64\r\n"; - $related .= "\r\n" . base64_encode($data) . "\r\n"; - $related .= "--$boundary--"; - $payload['postBody'] = $related; - } - - return $payload; - } - - /** - * Prepares a standard file upload via cURL. - * @param $file - * @param $mime - * @return array Includes the processed file name. - * @visible For testing. - */ - public static function processFileUpload($file, $mime) { - if (!$file) return array(); - if (substr($file, 0, 1) != '@') { - $file = '@' . $file; - } - - // This is a standard file upload with curl. - $params = array('postBody' => array('file' => $file)); - if ($mime) { - $params['content-type'] = $mime; - } - - return $params; - } - - /** - * Valid upload types: - * - resumable (UPLOAD_RESUMABLE_TYPE) - * - media (UPLOAD_MEDIA_TYPE) - * - multipart (UPLOAD_MULTIPART_TYPE) - * - none (false) - * @param $meta - * @param $payload - * @param $params - * @return bool|string - */ - public static function getUploadType($meta, &$payload, &$params) { - if (isset($params['mediaUpload']) - && get_class($params['mediaUpload']['value']) == 'Google_MediaFileUpload') { - $upload = $params['mediaUpload']['value']; - unset($params['mediaUpload']); - $payload['content-type'] = $upload->mimeType; - if (isset($upload->resumable) && $upload->resumable) { - return self::UPLOAD_RESUMABLE_TYPE; - } - } - - // Allow the developer to override the upload type. - if (isset($params['uploadType'])) { - return $params['uploadType']['value']; - } - - $data = isset($params['data']['value']) - ? $params['data']['value'] : false; - - if (false == $data && false == isset($params['file'])) { - // No upload data available. - return false; - } - - if (isset($params['file'])) { - return self::UPLOAD_MEDIA_TYPE; - } - - if (false == $meta) { - return self::UPLOAD_MEDIA_TYPE; - } - - return self::UPLOAD_MULTIPART_TYPE; - } - - - public function nextChunk(Google_HttpRequest $req, $chunk=false) { - if (false == $this->resumeUri) { - $this->resumeUri = $this->getResumeUri($req); - } - - if (false == $chunk) { - $chunk = substr($this->data, $this->progress, $this->chunkSize); - } - - $lastBytePos = $this->progress + strlen($chunk) - 1; - $headers = array( - 'content-range' => "bytes $this->progress-$lastBytePos/$this->size", - 'content-type' => $req->getRequestHeader('content-type'), - 'content-length' => $this->chunkSize, - 'expect' => '', - ); - - $httpRequest = new Google_HttpRequest($this->resumeUri, 'PUT', $headers, $chunk); - $response = Google_Client::$io->authenticatedRequest($httpRequest); - $code = $response->getResponseHttpCode(); - if (308 == $code) { - $range = explode('-', $response->getResponseHeader('range')); - $this->progress = $range[1] + 1; - return false; - } else { - return Google_REST::decodeHttpResponse($response); - } - } - - private function getResumeUri(Google_HttpRequest $httpRequest) { - $result = null; - $body = $httpRequest->getPostBody(); - if ($body) { - $httpRequest->setRequestHeaders(array( - 'content-type' => 'application/json; charset=UTF-8', - 'content-length' => Google_Utils::getStrLen($body), - 'x-upload-content-type' => $this->mimeType, - 'x-upload-content-length' => $this->size, - 'expect' => '', - )); - } - - $response = Google_Client::$io->makeRequest($httpRequest); - $location = $response->getResponseHeader('location'); - $code = $response->getResponseHttpCode(); - if (200 == $code && true == $location) { - return $location; - } - throw new Google_Exception("Failed to start the resumable upload"); - } -}
\ No newline at end of file diff --git a/apps/files_external/3rdparty/google-api-php-client/src/service/Google_Model.php b/apps/files_external/3rdparty/google-api-php-client/src/service/Google_Model.php deleted file mode 100644 index cb44cb25748..00000000000 --- a/apps/files_external/3rdparty/google-api-php-client/src/service/Google_Model.php +++ /dev/null @@ -1,115 +0,0 @@ -<?php -/* - * Copyright 2011 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * This class defines attributes, valid values, and usage which is generated from - * a given json schema. http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5 - * - * @author Chirag Shah <chirags@google.com> - * - */ -class Google_Model { - public function __construct( /* polymorphic */ ) { - if (func_num_args() == 1 && is_array(func_get_arg(0))) { - // Initialize the model with the array's contents. - $array = func_get_arg(0); - $this->mapTypes($array); - } - } - - /** - * Initialize this object's properties from an array. - * - * @param array $array Used to seed this object's properties. - * @return void - */ - protected function mapTypes($array) { - foreach ($array as $key => $val) { - $this->$key = $val; - - $keyTypeName = "__$key" . 'Type'; - $keyDataType = "__$key" . 'DataType'; - if ($this->useObjects() && property_exists($this, $keyTypeName)) { - if ($this->isAssociativeArray($val)) { - if (isset($this->$keyDataType) && 'map' == $this->$keyDataType) { - foreach($val as $arrayKey => $arrayItem) { - $val[$arrayKey] = $this->createObjectFromName($keyTypeName, $arrayItem); - } - $this->$key = $val; - } else { - $this->$key = $this->createObjectFromName($keyTypeName, $val); - } - } else if (is_array($val)) { - $arrayObject = array(); - foreach ($val as $arrayIndex => $arrayItem) { - $arrayObject[$arrayIndex] = $this->createObjectFromName($keyTypeName, $arrayItem); - } - $this->$key = $arrayObject; - } - } - } - } - - /** - * Returns true only if the array is associative. - * @param array $array - * @return bool True if the array is associative. - */ - protected function isAssociativeArray($array) { - if (!is_array($array)) { - return false; - } - $keys = array_keys($array); - foreach($keys as $key) { - if (is_string($key)) { - return true; - } - } - return false; - } - - /** - * Given a variable name, discover its type. - * - * @param $name - * @param $item - * @return object The object from the item. - */ - private function createObjectFromName($name, $item) { - $type = $this->$name; - return new $type($item); - } - - protected function useObjects() { - global $apiConfig; - return (isset($apiConfig['use_objects']) && $apiConfig['use_objects']); - } - - /** - * Verify if $obj is an array. - * @throws Google_Exception Thrown if $obj isn't an array. - * @param array $obj Items that should be validated. - * @param string $type Array items should be of this type. - * @param string $method Method expecting an array as an argument. - */ - public function assertIsArray($obj, $type, $method) { - if ($obj && !is_array($obj)) { - throw new Google_Exception("Incorrect parameter type passed to $method(), expected an" - . " array containing items of type $type."); - } - } -} diff --git a/apps/files_external/3rdparty/google-api-php-client/src/service/Google_ServiceResource.php b/apps/files_external/3rdparty/google-api-php-client/src/service/Google_ServiceResource.php deleted file mode 100644 index bb3af4db809..00000000000 --- a/apps/files_external/3rdparty/google-api-php-client/src/service/Google_ServiceResource.php +++ /dev/null @@ -1,205 +0,0 @@ -<?php -/** - * Copyright 2010 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Implements the actual methods/resources of the discovered Google API using magic function - * calling overloading (__call()), which on call will see if the method name (plus.activities.list) - * is available in this service, and if so construct an apiHttpRequest representing it. - * - * @author Chris Chabot <chabotc@google.com> - * @author Chirag Shah <chirags@google.com> - * - */ -class Google_ServiceResource { - // Valid query parameters that work, but don't appear in discovery. - private $stackParameters = array( - 'alt' => array('type' => 'string', 'location' => 'query'), - 'boundary' => array('type' => 'string', 'location' => 'query'), - 'fields' => array('type' => 'string', 'location' => 'query'), - 'trace' => array('type' => 'string', 'location' => 'query'), - 'userIp' => array('type' => 'string', 'location' => 'query'), - 'userip' => array('type' => 'string', 'location' => 'query'), - 'quotaUser' => array('type' => 'string', 'location' => 'query'), - 'file' => array('type' => 'complex', 'location' => 'body'), - 'data' => array('type' => 'string', 'location' => 'body'), - 'mimeType' => array('type' => 'string', 'location' => 'header'), - 'uploadType' => array('type' => 'string', 'location' => 'query'), - 'mediaUpload' => array('type' => 'complex', 'location' => 'query'), - ); - - /** @var Google_Service $service */ - private $service; - - /** @var string $serviceName */ - private $serviceName; - - /** @var string $resourceName */ - private $resourceName; - - /** @var array $methods */ - private $methods; - - public function __construct($service, $serviceName, $resourceName, $resource) { - $this->service = $service; - $this->serviceName = $serviceName; - $this->resourceName = $resourceName; - $this->methods = isset($resource['methods']) ? $resource['methods'] : array($resourceName => $resource); - } - - /** - * @param $name - * @param $arguments - * @return Google_HttpRequest|array - * @throws Google_Exception - */ - public function __call($name, $arguments) { - if (! isset($this->methods[$name])) { - throw new Google_Exception("Unknown function: {$this->serviceName}->{$this->resourceName}->{$name}()"); - } - $method = $this->methods[$name]; - $parameters = $arguments[0]; - - // postBody is a special case since it's not defined in the discovery document as parameter, but we abuse the param entry for storing it - $postBody = null; - if (isset($parameters['postBody'])) { - if (is_object($parameters['postBody'])) { - $this->stripNull($parameters['postBody']); - } - - // Some APIs require the postBody to be set under the data key. - if (is_array($parameters['postBody']) && 'latitude' == $this->serviceName) { - if (!isset($parameters['postBody']['data'])) { - $rawBody = $parameters['postBody']; - unset($parameters['postBody']); - $parameters['postBody']['data'] = $rawBody; - } - } - - $postBody = is_array($parameters['postBody']) || is_object($parameters['postBody']) - ? json_encode($parameters['postBody']) - : $parameters['postBody']; - unset($parameters['postBody']); - - if (isset($parameters['optParams'])) { - $optParams = $parameters['optParams']; - unset($parameters['optParams']); - $parameters = array_merge($parameters, $optParams); - } - } - - if (!isset($method['parameters'])) { - $method['parameters'] = array(); - } - - $method['parameters'] = array_merge($method['parameters'], $this->stackParameters); - foreach ($parameters as $key => $val) { - if ($key != 'postBody' && ! isset($method['parameters'][$key])) { - throw new Google_Exception("($name) unknown parameter: '$key'"); - } - } - if (isset($method['parameters'])) { - foreach ($method['parameters'] as $paramName => $paramSpec) { - if (isset($paramSpec['required']) && $paramSpec['required'] && ! isset($parameters[$paramName])) { - throw new Google_Exception("($name) missing required param: '$paramName'"); - } - if (isset($parameters[$paramName])) { - $value = $parameters[$paramName]; - $parameters[$paramName] = $paramSpec; - $parameters[$paramName]['value'] = $value; - unset($parameters[$paramName]['required']); - } else { - unset($parameters[$paramName]); - } - } - } - - // Discovery v1.0 puts the canonical method id under the 'id' field. - if (! isset($method['id'])) { - $method['id'] = $method['rpcMethod']; - } - - // Discovery v1.0 puts the canonical path under the 'path' field. - if (! isset($method['path'])) { - $method['path'] = $method['restPath']; - } - - $servicePath = $this->service->servicePath; - - // Process Media Request - $contentType = false; - if (isset($method['mediaUpload'])) { - $media = Google_MediaFileUpload::process($postBody, $parameters); - if ($media) { - $contentType = isset($media['content-type']) ? $media['content-type']: null; - $postBody = isset($media['postBody']) ? $media['postBody'] : null; - $servicePath = $method['mediaUpload']['protocols']['simple']['path']; - $method['path'] = ''; - } - } - - $url = Google_REST::createRequestUri($servicePath, $method['path'], $parameters); - $httpRequest = new Google_HttpRequest($url, $method['httpMethod'], null, $postBody); - if ($postBody) { - $contentTypeHeader = array(); - if (isset($contentType) && $contentType) { - $contentTypeHeader['content-type'] = $contentType; - } else { - $contentTypeHeader['content-type'] = 'application/json; charset=UTF-8'; - $contentTypeHeader['content-length'] = Google_Utils::getStrLen($postBody); - } - $httpRequest->setRequestHeaders($contentTypeHeader); - } - - $httpRequest = Google_Client::$auth->sign($httpRequest); - if (Google_Client::$useBatch) { - return $httpRequest; - } - - // Terminate immediately if this is a resumable request. - if (isset($parameters['uploadType']['value']) - && Google_MediaFileUpload::UPLOAD_RESUMABLE_TYPE == $parameters['uploadType']['value']) { - $contentTypeHeader = array(); - if (isset($contentType) && $contentType) { - $contentTypeHeader['content-type'] = $contentType; - } - $httpRequest->setRequestHeaders($contentTypeHeader); - if ($postBody) { - $httpRequest->setPostBody($postBody); - } - return $httpRequest; - } - - return Google_REST::execute($httpRequest); - } - - public function useObjects() { - global $apiConfig; - return (isset($apiConfig['use_objects']) && $apiConfig['use_objects']); - } - - protected function stripNull(&$o) { - $o = (array) $o; - foreach ($o as $k => $v) { - if ($v === null || strstr($k, "\0*\0__")) { - unset($o[$k]); - } - elseif (is_object($v) || is_array($v)) { - $this->stripNull($o[$k]); - } - } - } -} diff --git a/apps/files_external/ajax/google.php b/apps/files_external/ajax/google.php index 40c10aa5d07..b80f24bbd2c 100644 --- a/apps/files_external/ajax/google.php +++ b/apps/files_external/ajax/google.php @@ -1,7 +1,7 @@ <?php set_include_path(get_include_path().PATH_SEPARATOR. \OC_App::getAppPath('files_external').'/3rdparty/google-api-php-client/src'); -require_once 'Google_Client.php'; +require_once 'Google/Client.php'; OCP\JSON::checkAppEnabled('files_external'); OCP\JSON::checkLoggedIn(); @@ -14,6 +14,7 @@ if (isset($_POST['client_id']) && isset($_POST['client_secret']) && isset($_POST $client->setClientSecret($_POST['client_secret']); $client->setRedirectUri($_POST['redirect']); $client->setScopes(array('https://www.googleapis.com/auth/drive')); + $client->setAccessType('offline'); if (isset($_POST['step'])) { $step = $_POST['step']; if ($step == 1) { diff --git a/apps/files_external/l10n/ast.js b/apps/files_external/l10n/ast.js index d1d9f05b498..b8f3b1b366d 100644 --- a/apps/files_external/l10n/ast.js +++ b/apps/files_external/l10n/ast.js @@ -54,7 +54,6 @@ OC.L10N.register( "(group)" : "(grupu)", "Saved" : "Guardáu", "<b>Note:</b> " : "<b>Nota:</b> ", - " and " : "y", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> El soporte de cURL en PHP nun ta activáu o instaláu. Nun pue montase %s. Pídi-y al alministrador de sistema que lu instale.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> El soporte de FTP en PHP nun ta activáu o instaláu. Nun pue montase %s. Pídi-y al alministrador de sistema que lu instale.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> \"%s\" nun ta instaláu. Nun pue montase %s. Pídi-y al alministrador de sistema que lu instale.", diff --git a/apps/files_external/l10n/ast.json b/apps/files_external/l10n/ast.json index eeca7714b31..675949ef750 100644 --- a/apps/files_external/l10n/ast.json +++ b/apps/files_external/l10n/ast.json @@ -52,7 +52,6 @@ "(group)" : "(grupu)", "Saved" : "Guardáu", "<b>Note:</b> " : "<b>Nota:</b> ", - " and " : "y", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> El soporte de cURL en PHP nun ta activáu o instaláu. Nun pue montase %s. Pídi-y al alministrador de sistema que lu instale.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> El soporte de FTP en PHP nun ta activáu o instaláu. Nun pue montase %s. Pídi-y al alministrador de sistema que lu instale.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> \"%s\" nun ta instaláu. Nun pue montase %s. Pídi-y al alministrador de sistema que lu instale.", diff --git a/apps/files_external/l10n/bg_BG.js b/apps/files_external/l10n/bg_BG.js index 1944af503f1..6f292358c18 100644 --- a/apps/files_external/l10n/bg_BG.js +++ b/apps/files_external/l10n/bg_BG.js @@ -54,7 +54,6 @@ OC.L10N.register( "(group)" : "(група)", "Saved" : "Запазено", "<b>Note:</b> " : "<b>Бележка:</b> ", - " and " : "и", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Note:</b> PHP подръжката на cURL не е включена или инсталирана. Прикачването на %s не е възможно. Моля, поискай системния администратор да я инсталира.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Note:</b> PHP подръжката на FTP не е включена или инсталирана. Прикачването на %s не е възможно. Моля, поискай системния администратор да я инсталира.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Note:</b> \"%s\" не е инсталиран. Прикачването на %s не е възможно. Моля, поискай системния администратор да я инсталира.", diff --git a/apps/files_external/l10n/bg_BG.json b/apps/files_external/l10n/bg_BG.json index 0564415c3d6..a068e6dce3d 100644 --- a/apps/files_external/l10n/bg_BG.json +++ b/apps/files_external/l10n/bg_BG.json @@ -52,7 +52,6 @@ "(group)" : "(група)", "Saved" : "Запазено", "<b>Note:</b> " : "<b>Бележка:</b> ", - " and " : "и", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Note:</b> PHP подръжката на cURL не е включена или инсталирана. Прикачването на %s не е възможно. Моля, поискай системния администратор да я инсталира.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Note:</b> PHP подръжката на FTP не е включена или инсталирана. Прикачването на %s не е възможно. Моля, поискай системния администратор да я инсталира.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Note:</b> \"%s\" не е инсталиран. Прикачването на %s не е възможно. Моля, поискай системния администратор да я инсталира.", diff --git a/apps/files_external/l10n/bn_BD.js b/apps/files_external/l10n/bn_BD.js index 1afb8c66ee1..9d53353d107 100644 --- a/apps/files_external/l10n/bn_BD.js +++ b/apps/files_external/l10n/bn_BD.js @@ -33,7 +33,6 @@ OC.L10N.register( "(group)" : "(গোষ্ঠি)", "Saved" : "সংরক্ষণ করা হলো", "<b>Note:</b> " : "<b>দ্রষ্টব্য:</b> ", - " and " : "এবং", "Name" : "রাম", "External Storage" : "বাহ্যিক সংরক্ষণাগার", "Folder name" : "ফোলডারের নাম", diff --git a/apps/files_external/l10n/bn_BD.json b/apps/files_external/l10n/bn_BD.json index 975bf7cace7..907cc52d1b0 100644 --- a/apps/files_external/l10n/bn_BD.json +++ b/apps/files_external/l10n/bn_BD.json @@ -31,7 +31,6 @@ "(group)" : "(গোষ্ঠি)", "Saved" : "সংরক্ষণ করা হলো", "<b>Note:</b> " : "<b>দ্রষ্টব্য:</b> ", - " and " : "এবং", "Name" : "রাম", "External Storage" : "বাহ্যিক সংরক্ষণাগার", "Folder name" : "ফোলডারের নাম", diff --git a/apps/files_external/l10n/ca.js b/apps/files_external/l10n/ca.js index 4663654f63c..027abb551a3 100644 --- a/apps/files_external/l10n/ca.js +++ b/apps/files_external/l10n/ca.js @@ -54,7 +54,6 @@ OC.L10N.register( "(group)" : "(grup)", "Saved" : "Desat", "<b>Note:</b> " : "<b>Nota:</b> ", - " and " : "i", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> El suport cURL no està activat o instal·lat a PHP. No es pot muntar %s. Demaneu a l'administrador del sistema que l'instal·li.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> El suport FTP per PHP no està activat o no està instal·lat. No es pot muntar %s. Demaneu a l'administrador del sistema que l'instal·li.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> %s no està instal·lat. No es pot muntar %s. Demaneu a l'administrador del sistema que l'instal·li.", diff --git a/apps/files_external/l10n/ca.json b/apps/files_external/l10n/ca.json index 6bd1dcca39b..4ebb0c708a7 100644 --- a/apps/files_external/l10n/ca.json +++ b/apps/files_external/l10n/ca.json @@ -52,7 +52,6 @@ "(group)" : "(grup)", "Saved" : "Desat", "<b>Note:</b> " : "<b>Nota:</b> ", - " and " : "i", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> El suport cURL no està activat o instal·lat a PHP. No es pot muntar %s. Demaneu a l'administrador del sistema que l'instal·li.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> El suport FTP per PHP no està activat o no està instal·lat. No es pot muntar %s. Demaneu a l'administrador del sistema que l'instal·li.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> %s no està instal·lat. No es pot muntar %s. Demaneu a l'administrador del sistema que l'instal·li.", diff --git a/apps/files_external/l10n/cs_CZ.js b/apps/files_external/l10n/cs_CZ.js index 29af393cf07..1ea73814e78 100644 --- a/apps/files_external/l10n/cs_CZ.js +++ b/apps/files_external/l10n/cs_CZ.js @@ -54,7 +54,6 @@ OC.L10N.register( "(group)" : "(skupina)", "Saved" : "Uloženo", "<b>Note:</b> " : "<b>Poznámka:</b>", - " and " : "a", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Poznámka:</b> cURL podpora v PHP není povolena nebo nainstalována. Není možné připojení %s. Prosím požádejte svého správce systému ať ji nainstaluje.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Poznámka:</b> FTP podpora v PHP není povolena nebo nainstalována. Není možné připojení %s. Prosím požádejte svého správce systému ať ji nainstaluje.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Poznámka:</b> \"%s\" není instalováno. Není možné připojení %s. Prosím požádejte svého správce systému o instalaci.", diff --git a/apps/files_external/l10n/cs_CZ.json b/apps/files_external/l10n/cs_CZ.json index f8acc7d469d..1a81f064016 100644 --- a/apps/files_external/l10n/cs_CZ.json +++ b/apps/files_external/l10n/cs_CZ.json @@ -52,7 +52,6 @@ "(group)" : "(skupina)", "Saved" : "Uloženo", "<b>Note:</b> " : "<b>Poznámka:</b>", - " and " : "a", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Poznámka:</b> cURL podpora v PHP není povolena nebo nainstalována. Není možné připojení %s. Prosím požádejte svého správce systému ať ji nainstaluje.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Poznámka:</b> FTP podpora v PHP není povolena nebo nainstalována. Není možné připojení %s. Prosím požádejte svého správce systému ať ji nainstaluje.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Poznámka:</b> \"%s\" není instalováno. Není možné připojení %s. Prosím požádejte svého správce systému o instalaci.", diff --git a/apps/files_external/l10n/da.js b/apps/files_external/l10n/da.js index 5420917e2a9..0bfd8240dbe 100644 --- a/apps/files_external/l10n/da.js +++ b/apps/files_external/l10n/da.js @@ -54,7 +54,6 @@ OC.L10N.register( "(group)" : "(gruppe)", "Saved" : "Gemt", "<b>Note:</b> " : "<b>Note:</b> ", - " and " : "og", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Bemærk:</b> cURL-understøttelsen i PHP er enten ikke aktiveret eller installeret. Monteringen af %s er ikke mulig. Anmod din systemadministrator om at installere det.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Bemærk:</b> FTP understøttelsen i PHP er enten ikke aktiveret eller installeret. Montering af %s er ikke muligt. Anmod din systemadministrator om at installere det.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Bemærk:</b> \"%s\" er ikke installeret. Monteringen af %s er ikke mulig. Anmod din systemadministrator om at installere det.", diff --git a/apps/files_external/l10n/da.json b/apps/files_external/l10n/da.json index d5c468a5d8e..99563195a88 100644 --- a/apps/files_external/l10n/da.json +++ b/apps/files_external/l10n/da.json @@ -52,7 +52,6 @@ "(group)" : "(gruppe)", "Saved" : "Gemt", "<b>Note:</b> " : "<b>Note:</b> ", - " and " : "og", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Bemærk:</b> cURL-understøttelsen i PHP er enten ikke aktiveret eller installeret. Monteringen af %s er ikke mulig. Anmod din systemadministrator om at installere det.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Bemærk:</b> FTP understøttelsen i PHP er enten ikke aktiveret eller installeret. Montering af %s er ikke muligt. Anmod din systemadministrator om at installere det.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Bemærk:</b> \"%s\" er ikke installeret. Monteringen af %s er ikke mulig. Anmod din systemadministrator om at installere det.", diff --git a/apps/files_external/l10n/de.js b/apps/files_external/l10n/de.js index d67bda49b4d..b2c777c6076 100644 --- a/apps/files_external/l10n/de.js +++ b/apps/files_external/l10n/de.js @@ -54,7 +54,6 @@ OC.L10N.register( "(group)" : "(group)", "Saved" : "Gespeichert", "<b>Note:</b> " : "<b>Hinweis:</b> ", - " and " : "und", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Hinweis:</b> Die cURL-Unterstützung von PHP ist nicht aktiviert oder installiert. Das Hinzufügen von %s ist nicht möglich. Bitte wende Dich zur Installation an Deinen Systemadministrator.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Hinweis:</b> Die FTP Unterstützung von PHP ist nicht aktiviert oder installiert. Das Hinzufügen von %s ist nicht möglich. Bitte wende Dich sich zur Installation an Deinen Systemadministrator.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Hinweis:</b> \"%s\" ist nicht installiert. Das Hinzufügen von %s ist nicht möglich. Bitte wende Dich sich zur Installation an Deinen Systemadministrator.", diff --git a/apps/files_external/l10n/de.json b/apps/files_external/l10n/de.json index fb4467cc1f2..51f286aebf9 100644 --- a/apps/files_external/l10n/de.json +++ b/apps/files_external/l10n/de.json @@ -52,7 +52,6 @@ "(group)" : "(group)", "Saved" : "Gespeichert", "<b>Note:</b> " : "<b>Hinweis:</b> ", - " and " : "und", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Hinweis:</b> Die cURL-Unterstützung von PHP ist nicht aktiviert oder installiert. Das Hinzufügen von %s ist nicht möglich. Bitte wende Dich zur Installation an Deinen Systemadministrator.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Hinweis:</b> Die FTP Unterstützung von PHP ist nicht aktiviert oder installiert. Das Hinzufügen von %s ist nicht möglich. Bitte wende Dich sich zur Installation an Deinen Systemadministrator.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Hinweis:</b> \"%s\" ist nicht installiert. Das Hinzufügen von %s ist nicht möglich. Bitte wende Dich sich zur Installation an Deinen Systemadministrator.", diff --git a/apps/files_external/l10n/de_DE.js b/apps/files_external/l10n/de_DE.js index d12b171f639..65f4e6352e2 100644 --- a/apps/files_external/l10n/de_DE.js +++ b/apps/files_external/l10n/de_DE.js @@ -54,7 +54,6 @@ OC.L10N.register( "(group)" : "(group)", "Saved" : "Gespeichert", "<b>Note:</b> " : "<b>Hinweis:</b> ", - " and " : "und", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Hinweis:</b> Die cURL-Unterstützung von PHP ist nicht aktiviert oder installiert. Das Hinzufügen von %s ist nicht möglich. Bitte wenden Sie sich zur Installation an Ihren Systemadministrator.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Hinweis:</b> Die FTP Unterstützung von PHP ist nicht aktiviert oder installiert. Das Hinzufügen von %s ist nicht möglich. Bitte wenden Sie sich zur Installation an Ihren Systemadministrator.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Hinweis:</b> \"%s\" ist nicht installiert. Das Hinzufügen von %s ist nicht möglich. Bitte wenden Sie sich zur Installation an Ihren Systemadministrator.", diff --git a/apps/files_external/l10n/de_DE.json b/apps/files_external/l10n/de_DE.json index 43c24e0c94a..df6a0087dd0 100644 --- a/apps/files_external/l10n/de_DE.json +++ b/apps/files_external/l10n/de_DE.json @@ -52,7 +52,6 @@ "(group)" : "(group)", "Saved" : "Gespeichert", "<b>Note:</b> " : "<b>Hinweis:</b> ", - " and " : "und", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Hinweis:</b> Die cURL-Unterstützung von PHP ist nicht aktiviert oder installiert. Das Hinzufügen von %s ist nicht möglich. Bitte wenden Sie sich zur Installation an Ihren Systemadministrator.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Hinweis:</b> Die FTP Unterstützung von PHP ist nicht aktiviert oder installiert. Das Hinzufügen von %s ist nicht möglich. Bitte wenden Sie sich zur Installation an Ihren Systemadministrator.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Hinweis:</b> \"%s\" ist nicht installiert. Das Hinzufügen von %s ist nicht möglich. Bitte wenden Sie sich zur Installation an Ihren Systemadministrator.", diff --git a/apps/files_external/l10n/el.js b/apps/files_external/l10n/el.js index 28105a01d6b..0860e1998f7 100644 --- a/apps/files_external/l10n/el.js +++ b/apps/files_external/l10n/el.js @@ -54,7 +54,6 @@ OC.L10N.register( "(group)" : "(ομάδα)", "Saved" : "Αποθηκεύτηκαν", "<b>Note:</b> " : "<b>Σημείωση:</b> ", - " and " : "και", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Σημείωση:</b> Η υποστήριξη cURL στην PHP δεν είναι ενεργοποιημένη ή εγκατεστημένη. Η προσάρτηση του %s δεν είναι δυνατή. Παρακαλώ ζητήστε από τον διαχειριστή συστημάτων σας να την εγκαταστήσει.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Σημείωση:</b> Η υποστήριξη FTP στην PHP δεν είναι ενεργοποιημένη ή εγκατεστημένη. Δεν είναι δυνατή η προσάρτηση του %s. Παρακαλώ ζητήστε από τον διαχειριστή συστημάτων σας να την εγκαταστήσει.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Σημείωση:</b> Η επέκταση \"%s\" δεν είναι εγκατεστημένη. Δεν είναι δυνατή η προσάρτηση %s. Παρακαλώ ζητήστε από τον διαχειριστή συστημάτων σας να την εγκαταστήσει.", diff --git a/apps/files_external/l10n/el.json b/apps/files_external/l10n/el.json index 4be10506a02..e0cbb6c29a2 100644 --- a/apps/files_external/l10n/el.json +++ b/apps/files_external/l10n/el.json @@ -52,7 +52,6 @@ "(group)" : "(ομάδα)", "Saved" : "Αποθηκεύτηκαν", "<b>Note:</b> " : "<b>Σημείωση:</b> ", - " and " : "και", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Σημείωση:</b> Η υποστήριξη cURL στην PHP δεν είναι ενεργοποιημένη ή εγκατεστημένη. Η προσάρτηση του %s δεν είναι δυνατή. Παρακαλώ ζητήστε από τον διαχειριστή συστημάτων σας να την εγκαταστήσει.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Σημείωση:</b> Η υποστήριξη FTP στην PHP δεν είναι ενεργοποιημένη ή εγκατεστημένη. Δεν είναι δυνατή η προσάρτηση του %s. Παρακαλώ ζητήστε από τον διαχειριστή συστημάτων σας να την εγκαταστήσει.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Σημείωση:</b> Η επέκταση \"%s\" δεν είναι εγκατεστημένη. Δεν είναι δυνατή η προσάρτηση %s. Παρακαλώ ζητήστε από τον διαχειριστή συστημάτων σας να την εγκαταστήσει.", diff --git a/apps/files_external/l10n/en_GB.js b/apps/files_external/l10n/en_GB.js index 9f97d2c488c..e88a83ab598 100644 --- a/apps/files_external/l10n/en_GB.js +++ b/apps/files_external/l10n/en_GB.js @@ -54,7 +54,6 @@ OC.L10N.register( "(group)" : "(group)", "Saved" : "Saved", "<b>Note:</b> " : "<b>Note:</b> ", - " and " : " and ", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it.", diff --git a/apps/files_external/l10n/en_GB.json b/apps/files_external/l10n/en_GB.json index d4e7ad11bbe..b95652f0d08 100644 --- a/apps/files_external/l10n/en_GB.json +++ b/apps/files_external/l10n/en_GB.json @@ -52,7 +52,6 @@ "(group)" : "(group)", "Saved" : "Saved", "<b>Note:</b> " : "<b>Note:</b> ", - " and " : " and ", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it.", diff --git a/apps/files_external/l10n/eo.js b/apps/files_external/l10n/eo.js index 1d5014cdf23..5e9b6aa2ae1 100644 --- a/apps/files_external/l10n/eo.js +++ b/apps/files_external/l10n/eo.js @@ -38,7 +38,6 @@ OC.L10N.register( "Personal" : "Persona", "Saved" : "Konservita", "<b>Note:</b> " : "<b>Noto:</b>", - " and " : "kaj", "Name" : "Nomo", "External Storage" : "Malena memorilo", "Folder name" : "Dosierujnomo", diff --git a/apps/files_external/l10n/eo.json b/apps/files_external/l10n/eo.json index cf63614fb88..79e4c5cbbfb 100644 --- a/apps/files_external/l10n/eo.json +++ b/apps/files_external/l10n/eo.json @@ -36,7 +36,6 @@ "Personal" : "Persona", "Saved" : "Konservita", "<b>Note:</b> " : "<b>Noto:</b>", - " and " : "kaj", "Name" : "Nomo", "External Storage" : "Malena memorilo", "Folder name" : "Dosierujnomo", diff --git a/apps/files_external/l10n/es.js b/apps/files_external/l10n/es.js index 9306558b346..6109982bec9 100644 --- a/apps/files_external/l10n/es.js +++ b/apps/files_external/l10n/es.js @@ -54,7 +54,6 @@ OC.L10N.register( "(group)" : "(grupo)", "Saved" : "Guardado", "<b>Note:</b> " : "<b>Nota:</b> ", - " and " : "y", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> El soporte de cURL en PHP no está activado o instalado. No se puede montar %s. Pídale al administrador de sistema que lo instale.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> El soporte de FTP en PHP no está activado o instalado. No se puede montar %s. Pídale al administrador de sistema que lo instale.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> \"%s\" no está instalado. No se puede montar %s. Pídale al administrador de sistema que lo instale.", diff --git a/apps/files_external/l10n/es.json b/apps/files_external/l10n/es.json index 1d9067106eb..3fb0639bf6a 100644 --- a/apps/files_external/l10n/es.json +++ b/apps/files_external/l10n/es.json @@ -52,7 +52,6 @@ "(group)" : "(grupo)", "Saved" : "Guardado", "<b>Note:</b> " : "<b>Nota:</b> ", - " and " : "y", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> El soporte de cURL en PHP no está activado o instalado. No se puede montar %s. Pídale al administrador de sistema que lo instale.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> El soporte de FTP en PHP no está activado o instalado. No se puede montar %s. Pídale al administrador de sistema que lo instale.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> \"%s\" no está instalado. No se puede montar %s. Pídale al administrador de sistema que lo instale.", diff --git a/apps/files_external/l10n/et_EE.js b/apps/files_external/l10n/et_EE.js index 226190cb5f8..58daa2d3524 100644 --- a/apps/files_external/l10n/et_EE.js +++ b/apps/files_external/l10n/et_EE.js @@ -54,7 +54,6 @@ OC.L10N.register( "(group)" : "(grupp)", "Saved" : "Salvestatud", "<b>Note:</b> " : "<b>Märkus:</b>", - " and " : "ja", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Märkus:</b> cURL tugi puudub PHP paigalduses. FTP %s hoidla ühendamine pole võimalik. Palu oma süsteemihalduril paigaldata cURL tugi.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Märkus:</b> FTP tugi puudub PHP paigalduses. FTP %s hoidla ühendamine pole võimalik. Palu oma süsteemihalduril paigaldata FTP tugi.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Märkus:</b> \"%s\" pole paigaldatud. Hoidla %s ühendamine pole võimalik. Palu oma süsteemihalduril paigaldata vajalik tugi.", diff --git a/apps/files_external/l10n/et_EE.json b/apps/files_external/l10n/et_EE.json index a32eca9e8c2..4b401317634 100644 --- a/apps/files_external/l10n/et_EE.json +++ b/apps/files_external/l10n/et_EE.json @@ -52,7 +52,6 @@ "(group)" : "(grupp)", "Saved" : "Salvestatud", "<b>Note:</b> " : "<b>Märkus:</b>", - " and " : "ja", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Märkus:</b> cURL tugi puudub PHP paigalduses. FTP %s hoidla ühendamine pole võimalik. Palu oma süsteemihalduril paigaldata cURL tugi.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Märkus:</b> FTP tugi puudub PHP paigalduses. FTP %s hoidla ühendamine pole võimalik. Palu oma süsteemihalduril paigaldata FTP tugi.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Märkus:</b> \"%s\" pole paigaldatud. Hoidla %s ühendamine pole võimalik. Palu oma süsteemihalduril paigaldata vajalik tugi.", diff --git a/apps/files_external/l10n/eu.js b/apps/files_external/l10n/eu.js index db535359491..b8da6ca803e 100644 --- a/apps/files_external/l10n/eu.js +++ b/apps/files_external/l10n/eu.js @@ -53,7 +53,6 @@ OC.L10N.register( "(group)" : "(taldea)", "Saved" : "Gordeta", "<b>Note:</b> " : "<b>Oharra:</b>", - " and " : "eta", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Oharra:</b> :PHPko cURL euskarria ez dago instalatuta edo gaitua. Ezinezko da %s muntatzea. Mesedez eskatu sistema administratzaleari instala dezan. ", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Oharra:</b> :PHPko FTP euskarria ez dago instalatuta edo gaitua. Ezinezko da %s muntatzea. Mesedez eskatu sistema administratzaleari instala dezan. ", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Oharra:</b>\"%s\" euskarria ez dago instalatuta Ezinezko da %s muntatzea. Mesedez eskatu sistema administratzaleari instala dezan. ", diff --git a/apps/files_external/l10n/eu.json b/apps/files_external/l10n/eu.json index a5c642bd772..9469c7fc45c 100644 --- a/apps/files_external/l10n/eu.json +++ b/apps/files_external/l10n/eu.json @@ -51,7 +51,6 @@ "(group)" : "(taldea)", "Saved" : "Gordeta", "<b>Note:</b> " : "<b>Oharra:</b>", - " and " : "eta", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Oharra:</b> :PHPko cURL euskarria ez dago instalatuta edo gaitua. Ezinezko da %s muntatzea. Mesedez eskatu sistema administratzaleari instala dezan. ", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Oharra:</b> :PHPko FTP euskarria ez dago instalatuta edo gaitua. Ezinezko da %s muntatzea. Mesedez eskatu sistema administratzaleari instala dezan. ", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Oharra:</b>\"%s\" euskarria ez dago instalatuta Ezinezko da %s muntatzea. Mesedez eskatu sistema administratzaleari instala dezan. ", diff --git a/apps/files_external/l10n/fi_FI.js b/apps/files_external/l10n/fi_FI.js index f7895f842c3..8c24e0b3890 100644 --- a/apps/files_external/l10n/fi_FI.js +++ b/apps/files_external/l10n/fi_FI.js @@ -31,7 +31,6 @@ OC.L10N.register( "(group)" : "(ryhmä)", "Saved" : "Tallennettu", "<b>Note:</b> " : "<b>Huomio:</b> ", - " and " : "ja", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Huomio:</b> PHP:n cURL-tuki ei ole käytössä tai sitä ei ole asennettu. Kohteen %s liittäminen ei ole mahdollista. Pyydä järjestelmän ylläpitäjää ottamaan cURL-tuki käyttöön.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Huomio:</b> PHP:n FTP-tuki ei ole käytössä tai sitä ei ole asennettu. Kohteen %s liittäminen ei ole mahdollista. Pyydä järjestelmän ylläpitäjää ottamaan FTP-tuki käyttöön.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Huomio:</b> \"%s\" ei ole asennettu. Kohteen %s liittäminen ei ole mahdollista. Pyydä järjestelmän ylläpitäjää asentamaan puuttuva kohde.", diff --git a/apps/files_external/l10n/fi_FI.json b/apps/files_external/l10n/fi_FI.json index dad235128fb..29d9a65058d 100644 --- a/apps/files_external/l10n/fi_FI.json +++ b/apps/files_external/l10n/fi_FI.json @@ -29,7 +29,6 @@ "(group)" : "(ryhmä)", "Saved" : "Tallennettu", "<b>Note:</b> " : "<b>Huomio:</b> ", - " and " : "ja", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Huomio:</b> PHP:n cURL-tuki ei ole käytössä tai sitä ei ole asennettu. Kohteen %s liittäminen ei ole mahdollista. Pyydä järjestelmän ylläpitäjää ottamaan cURL-tuki käyttöön.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Huomio:</b> PHP:n FTP-tuki ei ole käytössä tai sitä ei ole asennettu. Kohteen %s liittäminen ei ole mahdollista. Pyydä järjestelmän ylläpitäjää ottamaan FTP-tuki käyttöön.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Huomio:</b> \"%s\" ei ole asennettu. Kohteen %s liittäminen ei ole mahdollista. Pyydä järjestelmän ylläpitäjää asentamaan puuttuva kohde.", diff --git a/apps/files_external/l10n/fr.js b/apps/files_external/l10n/fr.js index 7f827ec6fd4..180aff63e40 100644 --- a/apps/files_external/l10n/fr.js +++ b/apps/files_external/l10n/fr.js @@ -50,11 +50,10 @@ OC.L10N.register( "Error configuring Google Drive storage" : "Erreur lors de la configuration du support de stockage Google Drive", "Personal" : "Personnel", "System" : "Système", - "All users. Type to select user or group." : "Tous les utilisateurs. Commencez à saisir pour sélectionner un utilisateur ou un groupe.", + "All users. Type to select user or group." : "Tous les utilisateurs. Cliquez ici pour restreindre.", "(group)" : "(groupe)", "Saved" : "Sauvegarder", "<b>Note:</b> " : "<b>Attention :</b>", - " and " : "et", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Attention :</b> La prise en charge de cURL par PHP n'est pas activée ou installée. Le montage de %s n'est pas possible. Contactez votre administrateur système pour l'installer.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Attention : </b> La prise en charge du FTP par PHP n'est pas activée ou installée. Le montage de %s n'est pas possible. Contactez votre administrateur système pour l'installer.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Attention : </b> \"%s\" n'est pas installé. Le montage de %s n'est pas possible. Contactez votre administrateur système pour l'installer.", diff --git a/apps/files_external/l10n/fr.json b/apps/files_external/l10n/fr.json index e8a9e299c24..25441ee90be 100644 --- a/apps/files_external/l10n/fr.json +++ b/apps/files_external/l10n/fr.json @@ -48,11 +48,10 @@ "Error configuring Google Drive storage" : "Erreur lors de la configuration du support de stockage Google Drive", "Personal" : "Personnel", "System" : "Système", - "All users. Type to select user or group." : "Tous les utilisateurs. Commencez à saisir pour sélectionner un utilisateur ou un groupe.", + "All users. Type to select user or group." : "Tous les utilisateurs. Cliquez ici pour restreindre.", "(group)" : "(groupe)", "Saved" : "Sauvegarder", "<b>Note:</b> " : "<b>Attention :</b>", - " and " : "et", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Attention :</b> La prise en charge de cURL par PHP n'est pas activée ou installée. Le montage de %s n'est pas possible. Contactez votre administrateur système pour l'installer.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Attention : </b> La prise en charge du FTP par PHP n'est pas activée ou installée. Le montage de %s n'est pas possible. Contactez votre administrateur système pour l'installer.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Attention : </b> \"%s\" n'est pas installé. Le montage de %s n'est pas possible. Contactez votre administrateur système pour l'installer.", diff --git a/apps/files_external/l10n/gl.js b/apps/files_external/l10n/gl.js index 0ff342e958d..704be53702a 100644 --- a/apps/files_external/l10n/gl.js +++ b/apps/files_external/l10n/gl.js @@ -18,7 +18,7 @@ OC.L10N.register( "Secret Key" : "Clave secreta", "Hostname" : "Nome de máquina", "Port" : "Porto", - "Region" : "Autonomía", + "Region" : "Rexión", "Enable SSL" : "Activar SSL", "Enable Path Style" : "Activar o estilo de ruta", "App key" : "Clave da API", @@ -54,7 +54,6 @@ OC.L10N.register( "(group)" : "(grupo)", "Saved" : "Gardado", "<b>Note:</b> " : "<b>Nota:</b> ", - " and " : "e", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> A compatibilidade de cURL en PHP non está activada, ou non está instalado. Non é posíbel a montaxe de %s. Consulte co administrador do sistema como instalalo.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> A compatibilidade de FTP en PHP non está activada, ou non está instalado. Non é posíbel a montaxe de %s. Consulte co administrador do sistema como instalalo.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> «%s» non está instalado. Non é posíbel a montaxe de %s. Consulte co administrador do sistema como instalalo.", diff --git a/apps/files_external/l10n/gl.json b/apps/files_external/l10n/gl.json index 549de28f928..5039cde2c4b 100644 --- a/apps/files_external/l10n/gl.json +++ b/apps/files_external/l10n/gl.json @@ -16,7 +16,7 @@ "Secret Key" : "Clave secreta", "Hostname" : "Nome de máquina", "Port" : "Porto", - "Region" : "Autonomía", + "Region" : "Rexión", "Enable SSL" : "Activar SSL", "Enable Path Style" : "Activar o estilo de ruta", "App key" : "Clave da API", @@ -52,7 +52,6 @@ "(group)" : "(grupo)", "Saved" : "Gardado", "<b>Note:</b> " : "<b>Nota:</b> ", - " and " : "e", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> A compatibilidade de cURL en PHP non está activada, ou non está instalado. Non é posíbel a montaxe de %s. Consulte co administrador do sistema como instalalo.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> A compatibilidade de FTP en PHP non está activada, ou non está instalado. Non é posíbel a montaxe de %s. Consulte co administrador do sistema como instalalo.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> «%s» non está instalado. Non é posíbel a montaxe de %s. Consulte co administrador do sistema como instalalo.", diff --git a/apps/files_external/l10n/hr.js b/apps/files_external/l10n/hr.js index c166841d9c6..8c595cae15e 100644 --- a/apps/files_external/l10n/hr.js +++ b/apps/files_external/l10n/hr.js @@ -54,7 +54,6 @@ OC.L10N.register( "(group)" : "(grupa)", "Saved" : "Spremljeno", "<b>Note:</b> " : "<b>Bilješka:</b>", - " and " : " i ", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Note:</b> Podrška cURL u PHP nije omogućena ili nije instalirana. Postavljanje%s nije moguće. Molimo zamolite svog administratora sustava da je instalira.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Note:</b> Podrška FTP u PHP nije omogućena ili nije instalirana. Postavljanje%s nije moguće. Molimo zamolite svotg administratora sustava da je instalira.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Note:</b> \"%s\" nije instaliran. Postavljanje %s nije moguće. Molimo zamolitesvog administratora sustava da ga instalira.", diff --git a/apps/files_external/l10n/hr.json b/apps/files_external/l10n/hr.json index 069af3fa6c8..f2159e72bf4 100644 --- a/apps/files_external/l10n/hr.json +++ b/apps/files_external/l10n/hr.json @@ -52,7 +52,6 @@ "(group)" : "(grupa)", "Saved" : "Spremljeno", "<b>Note:</b> " : "<b>Bilješka:</b>", - " and " : " i ", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Note:</b> Podrška cURL u PHP nije omogućena ili nije instalirana. Postavljanje%s nije moguće. Molimo zamolite svog administratora sustava da je instalira.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Note:</b> Podrška FTP u PHP nije omogućena ili nije instalirana. Postavljanje%s nije moguće. Molimo zamolite svotg administratora sustava da je instalira.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Note:</b> \"%s\" nije instaliran. Postavljanje %s nije moguće. Molimo zamolitesvog administratora sustava da ga instalira.", diff --git a/apps/files_external/l10n/id.js b/apps/files_external/l10n/id.js index 8b0f4f28fbc..4a7991641c1 100644 --- a/apps/files_external/l10n/id.js +++ b/apps/files_external/l10n/id.js @@ -54,7 +54,6 @@ OC.L10N.register( "(group)" : "(grup)", "Saved" : "Disimpan", "<b>Note:</b> " : "<b>Catatan:</b> ", - " and " : "dan", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Catatan:</b> Dukungan cURL di PHP tidak diaktifkan atau belum diinstal. Mengaitkan %s tidak dimungkinkan. Silakan minta administrator sistem Anda untuk menginstalnya.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Catatan:</b> Dukungan FTP di PHP tidak diaktifkan atau belum diinstal. Mengaitkan %s tidak dimungkinkan. Silakan minta administrator sistem Anda untuk menginstalnya.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Catatan:</b> \"%s\" belum diinstal. Mengaitkan %s tidak dimungkinkan. Silakan minta administrator sistem Anda untuk menginstalnya.", diff --git a/apps/files_external/l10n/id.json b/apps/files_external/l10n/id.json index 8f8179d7627..67389e54d15 100644 --- a/apps/files_external/l10n/id.json +++ b/apps/files_external/l10n/id.json @@ -52,7 +52,6 @@ "(group)" : "(grup)", "Saved" : "Disimpan", "<b>Note:</b> " : "<b>Catatan:</b> ", - " and " : "dan", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Catatan:</b> Dukungan cURL di PHP tidak diaktifkan atau belum diinstal. Mengaitkan %s tidak dimungkinkan. Silakan minta administrator sistem Anda untuk menginstalnya.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Catatan:</b> Dukungan FTP di PHP tidak diaktifkan atau belum diinstal. Mengaitkan %s tidak dimungkinkan. Silakan minta administrator sistem Anda untuk menginstalnya.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Catatan:</b> \"%s\" belum diinstal. Mengaitkan %s tidak dimungkinkan. Silakan minta administrator sistem Anda untuk menginstalnya.", diff --git a/apps/files_external/l10n/it.js b/apps/files_external/l10n/it.js index 5834ff25f0b..ed612e34bf7 100644 --- a/apps/files_external/l10n/it.js +++ b/apps/files_external/l10n/it.js @@ -54,7 +54,6 @@ OC.L10N.register( "(group)" : "(gruppo)", "Saved" : "Salvato", "<b>Note:</b> " : "<b>Nota:</b>", - " and " : "e", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> il supporto a cURL di PHP non è abilitato o installato. Impossibile montare %s. Chiedi al tuo amministratore di sistema di installarlo.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> il supporto a FTP in PHP non è abilitato o installato. Impossibile montare %s. Chiedi al tuo amministratore di sistema di installarlo.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> \"%s\" non è installato. Impossibile montare %s. Chiedi al tuo amministratore di sistema di installarlo.", diff --git a/apps/files_external/l10n/it.json b/apps/files_external/l10n/it.json index b780cae57a6..cc20825a4c8 100644 --- a/apps/files_external/l10n/it.json +++ b/apps/files_external/l10n/it.json @@ -52,7 +52,6 @@ "(group)" : "(gruppo)", "Saved" : "Salvato", "<b>Note:</b> " : "<b>Nota:</b>", - " and " : "e", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> il supporto a cURL di PHP non è abilitato o installato. Impossibile montare %s. Chiedi al tuo amministratore di sistema di installarlo.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> il supporto a FTP in PHP non è abilitato o installato. Impossibile montare %s. Chiedi al tuo amministratore di sistema di installarlo.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> \"%s\" non è installato. Impossibile montare %s. Chiedi al tuo amministratore di sistema di installarlo.", diff --git a/apps/files_external/l10n/ja.js b/apps/files_external/l10n/ja.js index d4ef6347664..fd1285c04cc 100644 --- a/apps/files_external/l10n/ja.js +++ b/apps/files_external/l10n/ja.js @@ -54,7 +54,6 @@ OC.L10N.register( "(group)" : "(グループ)", "Saved" : "保存されました", "<b>Note:</b> " : "<b>注意:</b> ", - " and " : "と", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>注意:</b> PHPにcURLのエクステンションが入っていないか、有効ではありません。%s をマウントすることができません。このシステムの管理者にインストールをお願いしてください。", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>注意:</b> PHPにFTPのエクステンションが入っていないか、有効ではありません。%s をマウントすることができません。このシステムの管理者にインストールをお願いしてください。", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>注意:</b> \"%s\" がインストールされていません。%sをマウントできません。このシステムの管理者にインストールをお願いしてください。", diff --git a/apps/files_external/l10n/ja.json b/apps/files_external/l10n/ja.json index d630e19904d..df7332347de 100644 --- a/apps/files_external/l10n/ja.json +++ b/apps/files_external/l10n/ja.json @@ -52,7 +52,6 @@ "(group)" : "(グループ)", "Saved" : "保存されました", "<b>Note:</b> " : "<b>注意:</b> ", - " and " : "と", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>注意:</b> PHPにcURLのエクステンションが入っていないか、有効ではありません。%s をマウントすることができません。このシステムの管理者にインストールをお願いしてください。", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>注意:</b> PHPにFTPのエクステンションが入っていないか、有効ではありません。%s をマウントすることができません。このシステムの管理者にインストールをお願いしてください。", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>注意:</b> \"%s\" がインストールされていません。%sをマウントできません。このシステムの管理者にインストールをお願いしてください。", diff --git a/apps/files_external/l10n/nb_NO.js b/apps/files_external/l10n/nb_NO.js index ebf113068a2..c04dccf75fa 100644 --- a/apps/files_external/l10n/nb_NO.js +++ b/apps/files_external/l10n/nb_NO.js @@ -54,7 +54,6 @@ OC.L10N.register( "(group)" : "(gruppe)", "Saved" : "Lagret", "<b>Note:</b> " : "<b>Merk:</b> ", - " and " : " og ", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Merk:</b> Støtte for cURL i PHP er ikke aktivert eller installert. Oppkobling av %s er ikke mulig. Be systemadministratoren om å installere det.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Merk:</b> FTP-støtte i PHP er ikke slått på eller installert. Kan ikke koble opp %s. Ta kontakt med systemadministratoren for å installere det.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Merk:</b> \"%s\" er ikke installert. Oppkobling av %s er ikke mulig. Spør systemadministratoren om å installere det.", diff --git a/apps/files_external/l10n/nb_NO.json b/apps/files_external/l10n/nb_NO.json index b9b736fb13a..f6aaf962872 100644 --- a/apps/files_external/l10n/nb_NO.json +++ b/apps/files_external/l10n/nb_NO.json @@ -52,7 +52,6 @@ "(group)" : "(gruppe)", "Saved" : "Lagret", "<b>Note:</b> " : "<b>Merk:</b> ", - " and " : " og ", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Merk:</b> Støtte for cURL i PHP er ikke aktivert eller installert. Oppkobling av %s er ikke mulig. Be systemadministratoren om å installere det.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Merk:</b> FTP-støtte i PHP er ikke slått på eller installert. Kan ikke koble opp %s. Ta kontakt med systemadministratoren for å installere det.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Merk:</b> \"%s\" er ikke installert. Oppkobling av %s er ikke mulig. Spør systemadministratoren om å installere det.", diff --git a/apps/files_external/l10n/nl.js b/apps/files_external/l10n/nl.js index 0dcbe8556a3..1b11c71f307 100644 --- a/apps/files_external/l10n/nl.js +++ b/apps/files_external/l10n/nl.js @@ -54,7 +54,6 @@ OC.L10N.register( "(group)" : "(groep)", "Saved" : "Bewaard", "<b>Note:</b> " : "<b>Let op:</b> ", - " and " : "en", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Let op:</b> Curl ondersteuning in PHP is niet geactiveerd of geïnstalleerd. Mounten van %s is niet mogelijk. Vraag uw systeembeheerder dit te installeren.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Let op:</b> FTP ondersteuning in PHP is niet geactiveerd of geïnstalleerd. Mounten van %s is niet mogelijk. Vraag uw beheerder dit te installeren.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Let op:</b> \"%s\" is niet geïnstalleerd. Mounten van %s is niet mogelijk. Vraag uw beheerder om dit te installeren.", diff --git a/apps/files_external/l10n/nl.json b/apps/files_external/l10n/nl.json index 135aea89664..eee9eba7365 100644 --- a/apps/files_external/l10n/nl.json +++ b/apps/files_external/l10n/nl.json @@ -52,7 +52,6 @@ "(group)" : "(groep)", "Saved" : "Bewaard", "<b>Note:</b> " : "<b>Let op:</b> ", - " and " : "en", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Let op:</b> Curl ondersteuning in PHP is niet geactiveerd of geïnstalleerd. Mounten van %s is niet mogelijk. Vraag uw systeembeheerder dit te installeren.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Let op:</b> FTP ondersteuning in PHP is niet geactiveerd of geïnstalleerd. Mounten van %s is niet mogelijk. Vraag uw beheerder dit te installeren.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Let op:</b> \"%s\" is niet geïnstalleerd. Mounten van %s is niet mogelijk. Vraag uw beheerder om dit te installeren.", diff --git a/apps/files_external/l10n/pl.js b/apps/files_external/l10n/pl.js index a20f61c4677..6112182db3d 100644 --- a/apps/files_external/l10n/pl.js +++ b/apps/files_external/l10n/pl.js @@ -54,7 +54,6 @@ OC.L10N.register( "(group)" : "(grupa)", "Saved" : "Zapisano", "<b>Note:</b> " : "<b>Uwaga:</b> ", - " and " : "oraz", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Uwaga:</b> Wsparcie dla cURL w PHP nie zostało włączone lub zainstalowane. Zamontowanie %s nie jest możliwe. Proszę poproś Twojego administratora o zainstalowanie go.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Uwaga:</b> Wsparcie dla FTP w PHP nie zostało włączone lub zainstalowane. Zamontowanie %s nie jest możliwe. Proszę poproś Twojego administratora o zainstalowanie go.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Uwaga:</b> \"%s\" nie jest zainstalowane. Zamontowanie %s nie jest możliwe. Proszę poproś Twojego administratora o zainstalowanie go.", diff --git a/apps/files_external/l10n/pl.json b/apps/files_external/l10n/pl.json index c838595674d..d412d38c8df 100644 --- a/apps/files_external/l10n/pl.json +++ b/apps/files_external/l10n/pl.json @@ -52,7 +52,6 @@ "(group)" : "(grupa)", "Saved" : "Zapisano", "<b>Note:</b> " : "<b>Uwaga:</b> ", - " and " : "oraz", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Uwaga:</b> Wsparcie dla cURL w PHP nie zostało włączone lub zainstalowane. Zamontowanie %s nie jest możliwe. Proszę poproś Twojego administratora o zainstalowanie go.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Uwaga:</b> Wsparcie dla FTP w PHP nie zostało włączone lub zainstalowane. Zamontowanie %s nie jest możliwe. Proszę poproś Twojego administratora o zainstalowanie go.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Uwaga:</b> \"%s\" nie jest zainstalowane. Zamontowanie %s nie jest możliwe. Proszę poproś Twojego administratora o zainstalowanie go.", diff --git a/apps/files_external/l10n/pt_BR.js b/apps/files_external/l10n/pt_BR.js index e9ec582e182..2f0b37465fe 100644 --- a/apps/files_external/l10n/pt_BR.js +++ b/apps/files_external/l10n/pt_BR.js @@ -54,7 +54,6 @@ OC.L10N.register( "(group)" : "(grupo)", "Saved" : "Salvo", "<b>Note:</b> " : "<b>Nota:</b>", - " and " : "e", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> O suporte cURL do PHP não está habilitado ou instalado. Montagem de %s não é possível. Por favor, solicite ao seu administrador do sistema para instalá-lo.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> O suporte FTP no PHP não está habilitado ou instalado. Montagem de %s não é possível. Por favor, solicite ao seu administrador do sistema para instalá-lo.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> \"%s\" não está instalado. Montagem de %s não é possível. Por favor, solicite ao seu administrador do sistema para instalá-lo.", diff --git a/apps/files_external/l10n/pt_BR.json b/apps/files_external/l10n/pt_BR.json index 9f0907b9d20..be10eab946e 100644 --- a/apps/files_external/l10n/pt_BR.json +++ b/apps/files_external/l10n/pt_BR.json @@ -52,7 +52,6 @@ "(group)" : "(grupo)", "Saved" : "Salvo", "<b>Note:</b> " : "<b>Nota:</b>", - " and " : "e", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> O suporte cURL do PHP não está habilitado ou instalado. Montagem de %s não é possível. Por favor, solicite ao seu administrador do sistema para instalá-lo.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> O suporte FTP no PHP não está habilitado ou instalado. Montagem de %s não é possível. Por favor, solicite ao seu administrador do sistema para instalá-lo.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Nota:</b> \"%s\" não está instalado. Montagem de %s não é possível. Por favor, solicite ao seu administrador do sistema para instalá-lo.", diff --git a/apps/files_external/l10n/pt_PT.js b/apps/files_external/l10n/pt_PT.js index 2d3f342e9e9..d2af54cfda9 100644 --- a/apps/files_external/l10n/pt_PT.js +++ b/apps/files_external/l10n/pt_PT.js @@ -54,7 +54,6 @@ OC.L10N.register( "(group)" : "(grupo)", "Saved" : "Guardado", "<b>Note:</b> " : "<b>Aviso:</b> ", - " and " : "e", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Aviso:</b> O suporte cURL no PHP não está activo ou instalado. Não é possível montar %s. Peça ao seu administrador para instalar.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Aviso:</b> O suporte FTP no PHP não está activo ou instalado. Não é possível montar %s. Peça ao seu administrador para instalar.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Aviso:</b> O cliente\"%s\" não está instalado. Não é possível montar \"%s\" . Peça ao seu administrador para instalar.", diff --git a/apps/files_external/l10n/pt_PT.json b/apps/files_external/l10n/pt_PT.json index cee9e1b7f1a..cb7411b9d33 100644 --- a/apps/files_external/l10n/pt_PT.json +++ b/apps/files_external/l10n/pt_PT.json @@ -52,7 +52,6 @@ "(group)" : "(grupo)", "Saved" : "Guardado", "<b>Note:</b> " : "<b>Aviso:</b> ", - " and " : "e", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Aviso:</b> O suporte cURL no PHP não está activo ou instalado. Não é possível montar %s. Peça ao seu administrador para instalar.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Aviso:</b> O suporte FTP no PHP não está activo ou instalado. Não é possível montar %s. Peça ao seu administrador para instalar.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Aviso:</b> O cliente\"%s\" não está instalado. Não é possível montar \"%s\" . Peça ao seu administrador para instalar.", diff --git a/apps/files_external/l10n/ru.js b/apps/files_external/l10n/ru.js index 35eec150d01..37ec9648d44 100644 --- a/apps/files_external/l10n/ru.js +++ b/apps/files_external/l10n/ru.js @@ -54,7 +54,6 @@ OC.L10N.register( "(group)" : "(группа)", "Saved" : "Сохранено", "<b>Note:</b> " : "<b>Примечание:</b> ", - " and " : "и", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Примечание:</b> Поддержка cURL в PHP не включена или не установлена. Монтирование %s невозможно. Обратитесь к вашему системному администратору.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Примечание:</b> Поддержка FTP в PHP не включена или не установлена. Монтирование %s невозможно. Пожалуйста, обратитесь к системному администратору.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Примечание:</b> \"%s\" не установлен. Монтирование %s невозможно. Пожалуйста, обратитесь к системному администратору.", diff --git a/apps/files_external/l10n/ru.json b/apps/files_external/l10n/ru.json index 85b9bf38e4c..62c2b338d2f 100644 --- a/apps/files_external/l10n/ru.json +++ b/apps/files_external/l10n/ru.json @@ -52,7 +52,6 @@ "(group)" : "(группа)", "Saved" : "Сохранено", "<b>Note:</b> " : "<b>Примечание:</b> ", - " and " : "и", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Примечание:</b> Поддержка cURL в PHP не включена или не установлена. Монтирование %s невозможно. Обратитесь к вашему системному администратору.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Примечание:</b> Поддержка FTP в PHP не включена или не установлена. Монтирование %s невозможно. Пожалуйста, обратитесь к системному администратору.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Примечание:</b> \"%s\" не установлен. Монтирование %s невозможно. Пожалуйста, обратитесь к системному администратору.", diff --git a/apps/files_external/l10n/sk_SK.js b/apps/files_external/l10n/sk_SK.js index 636953c42ea..2a83a6d2330 100644 --- a/apps/files_external/l10n/sk_SK.js +++ b/apps/files_external/l10n/sk_SK.js @@ -54,7 +54,6 @@ OC.L10N.register( "(group)" : "(skupina)", "Saved" : "Uložené", "<b>Note:</b> " : "<b>Poznámka:</b> ", - " and " : "a", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Poznámka:</b> cURL podpora v PHP nie je zapnutá alebo nainštalovaná. Pripojenie %s nie je možné. Požiadajte správcu systému, aby ju nainštaloval.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Poznámka:</b> FTP podpora v PHP nie je zapnutá alebo nainštalovaná. Pripojenie %s nie je možné. Požiadajte správcu systému, aby ju nainštaloval.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Poznámka:</b> \"%s\" nie je nainštalovaná. Pripojenie %s nie je možné. Požiadajte správcu systému, aby ju nainštaloval.", diff --git a/apps/files_external/l10n/sk_SK.json b/apps/files_external/l10n/sk_SK.json index 5d2ca0a95a0..ee47ebc7808 100644 --- a/apps/files_external/l10n/sk_SK.json +++ b/apps/files_external/l10n/sk_SK.json @@ -52,7 +52,6 @@ "(group)" : "(skupina)", "Saved" : "Uložené", "<b>Note:</b> " : "<b>Poznámka:</b> ", - " and " : "a", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Poznámka:</b> cURL podpora v PHP nie je zapnutá alebo nainštalovaná. Pripojenie %s nie je možné. Požiadajte správcu systému, aby ju nainštaloval.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Poznámka:</b> FTP podpora v PHP nie je zapnutá alebo nainštalovaná. Pripojenie %s nie je možné. Požiadajte správcu systému, aby ju nainštaloval.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Poznámka:</b> \"%s\" nie je nainštalovaná. Pripojenie %s nie je možné. Požiadajte správcu systému, aby ju nainštaloval.", diff --git a/apps/files_external/l10n/sl.js b/apps/files_external/l10n/sl.js index 690fd9ae322..8effd328630 100644 --- a/apps/files_external/l10n/sl.js +++ b/apps/files_external/l10n/sl.js @@ -54,7 +54,6 @@ OC.L10N.register( "(group)" : "(skupina)", "Saved" : "Shranjeno", "<b>Note:</b> " : "<b>Opomba:</b> ", - " and " : "in", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Opomba:</b> Podpora za naslove cURL v PHP ni omogočena, ali pa ni ustrezno nameščenih programov. Priklapljanje %s ni mogoče. Za pomoč pri namestitvi se obrnite na sistemskega skrbnika.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Opomba:</b> Podpora za protokol FTP v PHP ni omogočena, ali pa ni ustrezno nameščenih programov. Priklapljanje %s ni mogoče. Za pomoč pri namestitvi se obrnite na sistemskega skrbnika.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Opomba:</b> Program \"%s\" ni nameščen. Priklapljanje %s ni mogoče. Za pomoč pri namestitvi se obrnite na sistemskega skrbnika.", diff --git a/apps/files_external/l10n/sl.json b/apps/files_external/l10n/sl.json index c92e9a310d8..d1cc0330f93 100644 --- a/apps/files_external/l10n/sl.json +++ b/apps/files_external/l10n/sl.json @@ -52,7 +52,6 @@ "(group)" : "(skupina)", "Saved" : "Shranjeno", "<b>Note:</b> " : "<b>Opomba:</b> ", - " and " : "in", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Opomba:</b> Podpora za naslove cURL v PHP ni omogočena, ali pa ni ustrezno nameščenih programov. Priklapljanje %s ni mogoče. Za pomoč pri namestitvi se obrnite na sistemskega skrbnika.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Opomba:</b> Podpora za protokol FTP v PHP ni omogočena, ali pa ni ustrezno nameščenih programov. Priklapljanje %s ni mogoče. Za pomoč pri namestitvi se obrnite na sistemskega skrbnika.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Opomba:</b> Program \"%s\" ni nameščen. Priklapljanje %s ni mogoče. Za pomoč pri namestitvi se obrnite na sistemskega skrbnika.", diff --git a/apps/files_external/l10n/sv.js b/apps/files_external/l10n/sv.js index cb12208c49a..3127293488a 100644 --- a/apps/files_external/l10n/sv.js +++ b/apps/files_external/l10n/sv.js @@ -48,7 +48,6 @@ OC.L10N.register( "System" : "System", "Saved" : "Sparad", "<b>Note:</b> " : "<b> OBS: </ b>", - " and " : "och", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b> OBS: </ b> cURL stöd i PHP inte är aktiverat eller installeras. Montering av %s är inte möjlig. Be din systemadministratör att installera det.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b> OBS: </ b> Den FTP-stöd i PHP inte är aktiverat eller installeras. Montering av %s är inte möjlig. Be din systemadministratör att installera det.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b> OBS: </ b> \"%s\" är inte installerat. Montering av %s är inte möjlig. Be din systemadministratör att installera det.", diff --git a/apps/files_external/l10n/sv.json b/apps/files_external/l10n/sv.json index 12b9f36fd5d..a549ae33680 100644 --- a/apps/files_external/l10n/sv.json +++ b/apps/files_external/l10n/sv.json @@ -46,7 +46,6 @@ "System" : "System", "Saved" : "Sparad", "<b>Note:</b> " : "<b> OBS: </ b>", - " and " : "och", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b> OBS: </ b> cURL stöd i PHP inte är aktiverat eller installeras. Montering av %s är inte möjlig. Be din systemadministratör att installera det.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b> OBS: </ b> Den FTP-stöd i PHP inte är aktiverat eller installeras. Montering av %s är inte möjlig. Be din systemadministratör att installera det.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b> OBS: </ b> \"%s\" är inte installerat. Montering av %s är inte möjlig. Be din systemadministratör att installera det.", diff --git a/apps/files_external/l10n/tr.js b/apps/files_external/l10n/tr.js index cbe240b5818..435bb2873b9 100644 --- a/apps/files_external/l10n/tr.js +++ b/apps/files_external/l10n/tr.js @@ -54,7 +54,6 @@ OC.L10N.register( "(group)" : "(grup)", "Saved" : "Kaydedildi", "<b>Note:</b> " : "<b>Not:</b> ", - " and " : "ve", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Not:</b> PHP'de cURL desteği etkin veya kurulu değil. %s bağlaması mümkün olmayacak. Lütfen kurulumu için sistem yöneticilerinizle iletişime geçin.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Not:</b> PHP'de FTP desteği etkin veya kurulu değil. %s bağlaması mümkün olmayacak. Lütfen kurulumu için sistem yöneticilerinizle iletişime geçin.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Not:</b> \"%s\" kurulu değil. %s bağlaması mümkün olmayacak. Lütfen kurulumu için sistem yöneticilerinizle iletişime geçin.", diff --git a/apps/files_external/l10n/tr.json b/apps/files_external/l10n/tr.json index 669608cca27..8731e609b2b 100644 --- a/apps/files_external/l10n/tr.json +++ b/apps/files_external/l10n/tr.json @@ -52,7 +52,6 @@ "(group)" : "(grup)", "Saved" : "Kaydedildi", "<b>Note:</b> " : "<b>Not:</b> ", - " and " : "ve", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Not:</b> PHP'de cURL desteği etkin veya kurulu değil. %s bağlaması mümkün olmayacak. Lütfen kurulumu için sistem yöneticilerinizle iletişime geçin.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Not:</b> PHP'de FTP desteği etkin veya kurulu değil. %s bağlaması mümkün olmayacak. Lütfen kurulumu için sistem yöneticilerinizle iletişime geçin.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Not:</b> \"%s\" kurulu değil. %s bağlaması mümkün olmayacak. Lütfen kurulumu için sistem yöneticilerinizle iletişime geçin.", diff --git a/apps/files_external/l10n/uk.js b/apps/files_external/l10n/uk.js index 7cf8533fd24..9d6548ab320 100644 --- a/apps/files_external/l10n/uk.js +++ b/apps/files_external/l10n/uk.js @@ -54,7 +54,6 @@ OC.L10N.register( "(group)" : "(група)", "Saved" : "Збереженно", "<b>Note:</b> " : "<b>Примітка:</b>", - " and " : "та", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Примітка:</b> Підтримку cURL в PHP не ввімкнено чи не встановлена. Під'єднатися до %s неможливо. Зверніться до системного адміністратора.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Примітка:</b> Підтримку FTP в PHP не ввімкнено чи не встановлена. Під'єднатися до %s неможливо. Зверніться до системного адміністратора.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Примітка:</b> \"%s\" не встановлено. Під'єднатися до %s неможливо. Зверніться до системного адміністратора.", diff --git a/apps/files_external/l10n/uk.json b/apps/files_external/l10n/uk.json index 8ebccaf5c1c..d47a45bbaf4 100644 --- a/apps/files_external/l10n/uk.json +++ b/apps/files_external/l10n/uk.json @@ -52,7 +52,6 @@ "(group)" : "(група)", "Saved" : "Збереженно", "<b>Note:</b> " : "<b>Примітка:</b>", - " and " : "та", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Примітка:</b> Підтримку cURL в PHP не ввімкнено чи не встановлена. Під'єднатися до %s неможливо. Зверніться до системного адміністратора.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Примітка:</b> Підтримку FTP в PHP не ввімкнено чи не встановлена. Під'єднатися до %s неможливо. Зверніться до системного адміністратора.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Примітка:</b> \"%s\" не встановлено. Під'єднатися до %s неможливо. Зверніться до системного адміністратора.", diff --git a/apps/files_external/l10n/zh_CN.js b/apps/files_external/l10n/zh_CN.js index 8c71da68db7..2b6f673e759 100644 --- a/apps/files_external/l10n/zh_CN.js +++ b/apps/files_external/l10n/zh_CN.js @@ -34,7 +34,6 @@ OC.L10N.register( "System" : "系统", "Saved" : "已保存", "<b>Note:</b> " : "<b>注意:</b>", - " and " : "和", "You don't have any external storages" : "您没有外部存储", "Name" : "名称", "Storage type" : "存储类型", diff --git a/apps/files_external/l10n/zh_CN.json b/apps/files_external/l10n/zh_CN.json index ba2ca93be86..a910b475d78 100644 --- a/apps/files_external/l10n/zh_CN.json +++ b/apps/files_external/l10n/zh_CN.json @@ -32,7 +32,6 @@ "System" : "系统", "Saved" : "已保存", "<b>Note:</b> " : "<b>注意:</b>", - " and " : "和", "You don't have any external storages" : "您没有外部存储", "Name" : "名称", "Storage type" : "存储类型", diff --git a/apps/files_external/l10n/zh_TW.js b/apps/files_external/l10n/zh_TW.js index a1f2d8a226d..f77bf964932 100644 --- a/apps/files_external/l10n/zh_TW.js +++ b/apps/files_external/l10n/zh_TW.js @@ -25,7 +25,6 @@ OC.L10N.register( "System" : "系統", "Saved" : "已儲存", "<b>Note:</b> " : "<b>警告:</b> ", - " and " : "與", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>警告:</b> PHP 並未啓用 Curl 的支援,因此無法掛載 %s 。請洽您的系統管理員將其安裝並啓用。", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>警告</b>:PHP 並未啓用 FTP 的支援,因此無法掛載 %s,請洽您的系統管理員將其安裝並啓用。", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>警告</b>並未安裝 \"%s\",因此無法掛載 %s。請洽您的系統管理員將其安裝並啓用。", diff --git a/apps/files_external/l10n/zh_TW.json b/apps/files_external/l10n/zh_TW.json index 03a20a3215e..25eb370a33a 100644 --- a/apps/files_external/l10n/zh_TW.json +++ b/apps/files_external/l10n/zh_TW.json @@ -23,7 +23,6 @@ "System" : "系統", "Saved" : "已儲存", "<b>Note:</b> " : "<b>警告:</b> ", - " and " : "與", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>警告:</b> PHP 並未啓用 Curl 的支援,因此無法掛載 %s 。請洽您的系統管理員將其安裝並啓用。", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>警告</b>:PHP 並未啓用 FTP 的支援,因此無法掛載 %s,請洽您的系統管理員將其安裝並啓用。", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>警告</b>並未安裝 \"%s\",因此無法掛載 %s。請洽您的系統管理員將其安裝並啓用。", diff --git a/apps/files_external/lib/api.php b/apps/files_external/lib/api.php index 81ebd4e886a..3b5e0e1759a 100644 --- a/apps/files_external/lib/api.php +++ b/apps/files_external/lib/api.php @@ -45,10 +45,10 @@ class Api { $isSystemMount = !$mountConfig['personal']; - $permissions = \OCP\PERMISSION_READ; + $permissions = \OCP\Constants::PERMISSION_READ; // personal mounts can be deleted if (!$isSystemMount) { - $permissions |= \OCP\PERMISSION_DELETE; + $permissions |= \OCP\Constants::PERMISSION_DELETE; } $entry = array( diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index 9400bbdedc0..898dc0c8543 100644 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -729,7 +729,7 @@ class OC_Mount_Config { $backends = ''; for ($i = 0; $i < $dependencyGroupCount; $i++) { if ($i > 0 && $i === $dependencyGroupCount - 1) { - $backends .= $l->t(' and '); + $backends .= ' '.$l->t('and').' '; } elseif ($i > 0) { $backends .= ', '; } diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php index a4337bc937b..c414e34fad4 100644 --- a/apps/files_external/lib/google.php +++ b/apps/files_external/lib/google.php @@ -23,11 +23,12 @@ namespace OC\Files\Storage; set_include_path(get_include_path().PATH_SEPARATOR. \OC_App::getAppPath('files_external').'/3rdparty/google-api-php-client/src'); -require_once 'Google_Client.php'; -require_once 'contrib/Google_DriveService.php'; +require_once 'Google/Client.php'; +require_once 'Google/Service/Drive.php'; class Google extends \OC\Files\Storage\Common { + private $client; private $id; private $service; private $driveFiles; @@ -46,14 +47,19 @@ class Google extends \OC\Files\Storage\Common { && isset($params['client_id']) && isset($params['client_secret']) && isset($params['token']) ) { - $client = new \Google_Client(); - $client->setClientId($params['client_id']); - $client->setClientSecret($params['client_secret']); - $client->setScopes(array('https://www.googleapis.com/auth/drive')); - $client->setUseObjects(true); - $client->setAccessToken($params['token']); + $this->client = new \Google_Client(); + $this->client->setClientId($params['client_id']); + $this->client->setClientSecret($params['client_secret']); + $this->client->setScopes(array('https://www.googleapis.com/auth/drive')); + $this->client->setAccessToken($params['token']); + // if curl isn't available we're likely to run into + // https://github.com/google/google-api-php-client/issues/59 + // - disable gzip to avoid it. + if (!function_exists('curl_version') || !function_exists('curl_exec')) { + $this->client->setClassConfig("Google_Http_Request", "disable_gzip", true); + } // note: API connection is lazy - $this->service = new \Google_DriveService($client); + $this->service = new \Google_Service_Drive($this->client); $token = json_decode($params['token'], true); $this->id = 'google::'.substr($params['client_id'], 0, 30).$token['created']; } else { @@ -66,9 +72,10 @@ class Google extends \OC\Files\Storage\Common { } /** - * Get the Google_DriveFile object for the specified path + * Get the Google_Service_Drive_DriveFile object for the specified path. + * Returns false on failure. * @param string $path - * @return string + * @return \Google_Service_Drive_DriveFile|false */ private function getDriveFile($path) { // Remove leading and trailing slashes @@ -115,7 +122,7 @@ class Google extends \OC\Files\Storage\Common { $pathWithoutExt = substr($path, 0, $pos); $file = $this->getDriveFile($pathWithoutExt); if ($file) { - // Switch cached Google_DriveFile to the correct index + // Switch cached Google_Service_Drive_DriveFile to the correct index unset($this->driveFiles[$pathWithoutExt]); $this->driveFiles[$path] = $file; $parentId = $file->getId(); @@ -133,9 +140,9 @@ class Google extends \OC\Files\Storage\Common { } /** - * Set the Google_DriveFile object in the cache + * Set the Google_Service_Drive_DriveFile object in the cache * @param string $path - * @param Google_DriveFile|false $file + * @param Google_Service_Drive_DriveFile|false $file */ private function setDriveFile($path, $file) { $path = trim($path, '/'); @@ -188,10 +195,10 @@ class Google extends \OC\Files\Storage\Common { if (!$this->is_dir($path)) { $parentFolder = $this->getDriveFile(dirname($path)); if ($parentFolder) { - $folder = new \Google_DriveFile(); + $folder = new \Google_Service_Drive_DriveFile(); $folder->setTitle(basename($path)); $folder->setMimeType(self::FOLDER); - $parent = new \Google_ParentReference(); + $parent = new \Google_Service_Drive_ParentReference(); $parent->setId($parentFolder->getId()); $folder->setParents(array($parent)); $result = $this->service->files->insert($folder); @@ -266,7 +273,7 @@ class Google extends \OC\Files\Storage\Common { $this->onDuplicateFileDetected($filepath); } } else { - // Cache the Google_DriveFile for future use + // Cache the Google_Service_Drive_DriveFile for future use $this->setDriveFile($filepath, $child); $files[] = $name; } @@ -356,7 +363,7 @@ class Google extends \OC\Files\Storage\Common { // Change file parent $parentFolder2 = $this->getDriveFile(dirname($path2)); if ($parentFolder2) { - $parent = new \Google_ParentReference(); + $parent = new \Google_Service_Drive_ParentReference(); $parent->setId($parentFolder2->getId()); $file->setParents(array($parent)); } else { @@ -395,8 +402,8 @@ class Google extends \OC\Files\Storage\Common { $downloadUrl = $file->getDownloadUrl(); } if (isset($downloadUrl)) { - $request = new \Google_HttpRequest($downloadUrl, 'GET', null, null); - $httpRequest = \Google_Client::$io->authenticatedRequest($request); + $request = new \Google_Http_Request($downloadUrl, 'GET', null, null); + $httpRequest = $this->client->getAuth()->authenticatedRequest($request); if ($httpRequest->getResponseHttpCode() == 200) { $tmpFile = \OC_Helper::tmpFile($ext); $data = $httpRequest->getResponseBody(); @@ -440,16 +447,17 @@ class Google extends \OC\Files\Storage\Common { $params = array( 'data' => $data, 'mimeType' => $mimetype, + 'uploadType' => 'media' ); $result = false; if ($this->file_exists($path)) { $file = $this->getDriveFile($path); $result = $this->service->files->update($file->getId(), $file, $params); } else { - $file = new \Google_DriveFile(); + $file = new \Google_Service_Drive_DriveFile(); $file->setTitle(basename($path)); $file->setMimeType($mimetype); - $parent = new \Google_ParentReference(); + $parent = new \Google_Service_Drive_ParentReference(); $parent->setId($parentFolder->getId()); $file->setParents(array($parent)); $result = $this->service->files->insert($file, $params); @@ -509,9 +517,9 @@ class Google extends \OC\Files\Storage\Common { } else { $parentFolder = $this->getDriveFile(dirname($path)); if ($parentFolder) { - $file = new \Google_DriveFile(); + $file = new \Google_Service_Drive_DriveFile(); $file->setTitle(basename($path)); - $parent = new \Google_ParentReference(); + $parent = new \Google_Service_Drive_ParentReference(); $parent->setId($parentFolder->getId()); $file->setParents(array($parent)); $result = $this->service->files->insert($file); diff --git a/apps/files_external/lib/smb.php b/apps/files_external/lib/smb.php index 6e53c4a9931..3f0b0f45bfb 100644 --- a/apps/files_external/lib/smb.php +++ b/apps/files_external/lib/smb.php @@ -139,13 +139,8 @@ class SMB extends \OC\Files\Storage\StreamWrapper{ * check if smbclient is installed */ public static function checkDependencies() { - if (function_exists('shell_exec')) { - $output=shell_exec('command -v smbclient 2> /dev/null'); - if (!empty($output)) { - return true; - } - } - return array('smbclient'); + $smbClientExists = (bool) \OC_Helper::findBinaryPath('smbclient'); + return $smbClientExists ? true : array('smbclient'); } } diff --git a/apps/files_external/lib/smb_oc.php b/apps/files_external/lib/smb_oc.php index e6f3aaf4052..a7c93d97fd1 100644 --- a/apps/files_external/lib/smb_oc.php +++ b/apps/files_external/lib/smb_oc.php @@ -13,12 +13,16 @@ require_once __DIR__ . '/../3rdparty/smb4php/smb.php'; class SMB_OC extends \OC\Files\Storage\SMB { private $username_as_share; + /** + * @param array $params + * @throws \Exception + */ public function __construct($params) { if (isset($params['host']) && \OC::$server->getSession()->exists('smb-credentials')) { $host=$params['host']; $this->username_as_share = ($params['username_as_share'] === 'true'); - $params_auth = \OC::$server->getSession()->get('smb-credentials'); + $params_auth = json_decode(\OC::$server->getCrypto()->decrypt(\OC::$server->getSession()->get('smb-credentials')), true); $user = \OC::$server->getSession()->get('loginname'); $password = $params_auth['password']; @@ -44,14 +48,35 @@ class SMB_OC extends \OC\Files\Storage\SMB { } } - public static function login( $params ) { - \OC::$server->getSession()->set('smb-credentials', $params); + + /** + * Intercepts the user credentials on login and stores them + * encrypted inside the session if SMB_OC storage is enabled. + * @param array $params + */ + public static function login($params) { + $mountpoints = \OC_Mount_Config::getAbsoluteMountPoints($params['uid']); + $mountpointClasses = array(); + foreach($mountpoints as $mountpoint) { + $mountpointClasses[$mountpoint['class']] = true; + } + if(isset($mountpointClasses['\OC\Files\Storage\SMB_OC'])) { + \OC::$server->getSession()->set('smb-credentials', \OC::$server->getCrypto()->encrypt(json_encode($params))); + } } + /** + * @param string $path + * @return boolean + */ public function isSharable($path) { return false; } + /** + * @param bool $isPersonal + * @return bool + */ public function test($isPersonal = true) { if ($isPersonal) { if ($this->stat('')) { diff --git a/apps/files_external/tests/mountconfig.php b/apps/files_external/tests/mountconfig.php index ab65e648643..342f020d3a9 100644 --- a/apps/files_external/tests/mountconfig.php +++ b/apps/files_external/tests/mountconfig.php @@ -296,10 +296,6 @@ class Test_Mount_Config extends \Test\TestCase { * @dataProvider applicableConfigProvider */ public function testReadWriteGlobalConfig($mountType, $applicable, $expectApplicableArray) { - // TODO travis: samba share test doesn't work on travis - if (getenv('TRAVIS')) { - $this->markTestSkipped('samba share test doesn\'t work on travis'); - } $mountType = $mountType; $applicable = $applicable; @@ -340,10 +336,6 @@ class Test_Mount_Config extends \Test\TestCase { * Test reading and writing config */ public function testReadWritePersonalConfig() { - // TODO travis: samba share test doesn't work on travis - if (getenv('TRAVIS')) { - $this->markTestSkipped('samba share test doesn\'t work on travis'); - } $mountType = OC_Mount_Config::MOUNT_TYPE_USER; $applicable = self::TEST_USER1; @@ -479,10 +471,6 @@ class Test_Mount_Config extends \Test\TestCase { * Test password obfuscation */ public function testPasswordObfuscation() { - // TODO travis: samba share test doesn't work on travis - if (getenv('TRAVIS')) { - $this->markTestSkipped('samba share test doesn\'t work on travis'); - } $mountType = OC_Mount_Config::MOUNT_TYPE_USER; $applicable = self::TEST_USER1; @@ -524,10 +512,6 @@ class Test_Mount_Config extends \Test\TestCase { * Test read legacy passwords */ public function testReadLegacyPassword() { - // TODO travis: samba share test doesn't work on travis - if (getenv('TRAVIS')) { - $this->markTestSkipped('samba share test doesn\'t work on travis'); - } $mountType = OC_Mount_Config::MOUNT_TYPE_USER; $applicable = self::TEST_USER1; @@ -640,10 +624,6 @@ class Test_Mount_Config extends \Test\TestCase { * @param bool $expectVisible whether to expect the mount point to be visible for $testUser */ public function testMount($isPersonal, $mountType, $applicable, $testUser, $expectVisible) { - // TODO travis: samba share test doesn't work on travis - if (getenv('TRAVIS')) { - $this->markTestSkipped('samba share test doesn\'t work on travis'); - } $mountConfig = array( 'host' => 'someost', @@ -684,10 +664,6 @@ class Test_Mount_Config extends \Test\TestCase { * The config will be merged by getSystemMountPoints(). */ public function testConfigMerging() { - // TODO travis: samba share test doesn't work on travis - if (getenv('TRAVIS')) { - $this->markTestSkipped('samba share test doesn\'t work on travis'); - } $mountType = OC_Mount_Config::MOUNT_TYPE_USER; $isPersonal = false; @@ -759,10 +735,6 @@ class Test_Mount_Config extends \Test\TestCase { * have the same path, the config must NOT be merged. */ public function testRereadMountpointWithSamePath() { - // TODO travis: samba share test doesn't work on travis - if (getenv('TRAVIS')) { - $this->markTestSkipped('samba share test doesn\'t work on travis'); - } $mountType = OC_Mount_Config::MOUNT_TYPE_USER; $isPersonal = false; @@ -895,10 +867,6 @@ class Test_Mount_Config extends \Test\TestCase { * @param int $expected index of expected visible mount */ public function testPriority($mounts, $expected) { - // TODO travis: samba share test doesn't work on travis - if (getenv('TRAVIS')) { - $this->markTestSkipped('samba share test doesn\'t work on travis'); - } $mountConfig = array( 'host' => 'somehost', @@ -933,10 +901,6 @@ class Test_Mount_Config extends \Test\TestCase { * Test for persistence of priority when changing mount options */ public function testPriorityPersistence() { - // TODO travis: samba share test doesn't work on travis - if (getenv('TRAVIS')) { - $this->markTestSkipped('samba share test doesn\'t work on travis'); - } $class = '\OC\Files\Storage\SMB'; $priority = 123; @@ -986,10 +950,6 @@ class Test_Mount_Config extends \Test\TestCase { * Test for correct personal configuration loading in file sharing scenarios */ public function testMultiUserPersonalConfigLoading() { - // TODO travis: multi user config test doesn't work on travis - if (getenv('TRAVIS')) { - $this->markTestSkipped('multi user config test doesn\'t work on travis'); - } $mountConfig = array( 'host' => 'somehost', 'user' => 'someuser', diff --git a/apps/files_sharing/ajax/list.php b/apps/files_sharing/ajax/list.php index 7e2e54a1bd9..073c86365be 100644 --- a/apps/files_sharing/ajax/list.php +++ b/apps/files_sharing/ajax/list.php @@ -65,7 +65,7 @@ $formattedFiles = array(); foreach ($files as $file) { $entry = \OCA\Files\Helper::formatFileInfo($file); unset($entry['directory']); // for now - $entry['permissions'] = \OCP\PERMISSION_READ; + $entry['permissions'] = \OCP\Constants::PERMISSION_READ; $formattedFiles[] = $entry; } @@ -78,7 +78,7 @@ $permissions = $linkItem['permissions']; // if globally disabled if (\OC::$server->getAppConfig()->getValue('core', 'shareapi_allow_public_upload', 'yes') === 'no') { // only allow reading - $permissions = \OCP\PERMISSION_READ; + $permissions = \OCP\Constants::PERMISSION_READ; } $data['permissions'] = $permissions; diff --git a/apps/files_sharing/ajax/shareinfo.php b/apps/files_sharing/ajax/shareinfo.php index e87b0779e8d..f196a67a9dd 100644 --- a/apps/files_sharing/ajax/shareinfo.php +++ b/apps/files_sharing/ajax/shareinfo.php @@ -31,7 +31,7 @@ $linkItem = $data['linkItem']; // Load the files $path = $data['realPath']; -$isWritable = $linkItem['permissions'] & (\OCP\PERMISSION_UPDATE | \OCP\PERMISSION_CREATE); +$isWritable = $linkItem['permissions'] & (\OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_CREATE); if (!$isWritable) { \OC\Files\Filesystem::addStorageWrapper('readonly', function ($mountPoint, $storage) { return new \OCA\Files_Sharing\ReadOnlyWrapper(array('storage' => $storage)); diff --git a/apps/files_sharing/l10n/ca.js b/apps/files_sharing/l10n/ca.js index 51153252cba..4a22d71fb59 100644 --- a/apps/files_sharing/l10n/ca.js +++ b/apps/files_sharing/l10n/ca.js @@ -4,10 +4,10 @@ OC.L10N.register( "Server to server sharing is not enabled on this server" : "La compartició entre servidors no està activada en aquest servidor", "Invalid or untrusted SSL certificate" : "El certificat SSL és invàlid o no és fiable", "Couldn't add remote share" : "No s'ha pogut afegir una compartició remota", - "Shared with you" : "Compartit amb vós", - "Shared with others" : "Compartit amb altres", + "Shared with you" : "Us han compartit", + "Shared with others" : "Heu compartit", "Shared by link" : "Compartit amb enllaç", - "No files have been shared with you yet." : "Encara no hi ha fitxers compartits amb vós.", + "No files have been shared with you yet." : "Encara no us han compartit fitxters.", "You haven't shared any files yet." : "Encara no heu compartit cap fitxer.", "You haven't shared any files by link yet." : "Encara no heu compartit cap fitxer amb enllaç.", "Do you want to add the remote share {name} from {owner}@{remote}?" : "Voleu afegir la compartició remota {nom} des de {owner}@{remote}?", diff --git a/apps/files_sharing/l10n/ca.json b/apps/files_sharing/l10n/ca.json index 88d2fa70811..83668750494 100644 --- a/apps/files_sharing/l10n/ca.json +++ b/apps/files_sharing/l10n/ca.json @@ -2,10 +2,10 @@ "Server to server sharing is not enabled on this server" : "La compartició entre servidors no està activada en aquest servidor", "Invalid or untrusted SSL certificate" : "El certificat SSL és invàlid o no és fiable", "Couldn't add remote share" : "No s'ha pogut afegir una compartició remota", - "Shared with you" : "Compartit amb vós", - "Shared with others" : "Compartit amb altres", + "Shared with you" : "Us han compartit", + "Shared with others" : "Heu compartit", "Shared by link" : "Compartit amb enllaç", - "No files have been shared with you yet." : "Encara no hi ha fitxers compartits amb vós.", + "No files have been shared with you yet." : "Encara no us han compartit fitxters.", "You haven't shared any files yet." : "Encara no heu compartit cap fitxer.", "You haven't shared any files by link yet." : "Encara no heu compartit cap fitxer amb enllaç.", "Do you want to add the remote share {name} from {owner}@{remote}?" : "Voleu afegir la compartició remota {nom} des de {owner}@{remote}?", diff --git a/apps/files_sharing/l10n/gl.js b/apps/files_sharing/l10n/gl.js index 45d20914ee8..0a2396b1ceb 100644 --- a/apps/files_sharing/l10n/gl.js +++ b/apps/files_sharing/l10n/gl.js @@ -2,6 +2,7 @@ OC.L10N.register( "files_sharing", { "Server to server sharing is not enabled on this server" : "Neste servidor non está activada a compartición de servidor a servidor", + "The mountpoint name contains invalid characters." : "O nome do punto de montaxe contén caracteres inválidos.", "Invalid or untrusted SSL certificate" : "Certificado SSL incorrecto ou non fiábel", "Couldn't add remote share" : "Non foi posíbel engadir a compartición remota", "Shared with you" : "Compartido con vostede", @@ -32,6 +33,9 @@ OC.L10N.register( "Add to your ownCloud" : "Engadir ao seu ownCloud", "Download" : "Descargar", "Download %s" : "Descargar %s", - "Direct link" : "Ligazón directa" + "Direct link" : "Ligazón directa", + "Server-to-Server Sharing" : "Compartición Servidor-a-Servidor", + "Allow users on this server to send shares to other servers" : "Permitir aos ususarios de este servidor enviar comparticións a outros servidores", + "Allow users on this server to receive shares from other servers" : "Permitir aos usuarios de este servidor recibir comparticións de outros servidores" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files_sharing/l10n/gl.json b/apps/files_sharing/l10n/gl.json index 5ddd5b02155..c26585047ee 100644 --- a/apps/files_sharing/l10n/gl.json +++ b/apps/files_sharing/l10n/gl.json @@ -1,5 +1,6 @@ { "translations": { "Server to server sharing is not enabled on this server" : "Neste servidor non está activada a compartición de servidor a servidor", + "The mountpoint name contains invalid characters." : "O nome do punto de montaxe contén caracteres inválidos.", "Invalid or untrusted SSL certificate" : "Certificado SSL incorrecto ou non fiábel", "Couldn't add remote share" : "Non foi posíbel engadir a compartición remota", "Shared with you" : "Compartido con vostede", @@ -30,6 +31,9 @@ "Add to your ownCloud" : "Engadir ao seu ownCloud", "Download" : "Descargar", "Download %s" : "Descargar %s", - "Direct link" : "Ligazón directa" + "Direct link" : "Ligazón directa", + "Server-to-Server Sharing" : "Compartición Servidor-a-Servidor", + "Allow users on this server to send shares to other servers" : "Permitir aos ususarios de este servidor enviar comparticións a outros servidores", + "Allow users on this server to receive shares from other servers" : "Permitir aos usuarios de este servidor recibir comparticións de outros servidores" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files_sharing/l10n/ru.js b/apps/files_sharing/l10n/ru.js index f6a24253590..f8a73755cd1 100644 --- a/apps/files_sharing/l10n/ru.js +++ b/apps/files_sharing/l10n/ru.js @@ -33,6 +33,9 @@ OC.L10N.register( "Add to your ownCloud" : "Добавить в свой ownCloud", "Download" : "Скачать", "Download %s" : "Скачать %s", - "Direct link" : "Прямая ссылка" + "Direct link" : "Прямая ссылка", + "Server-to-Server Sharing" : "Общий доступ Сервер-Сервер", + "Allow users on this server to send shares to other servers" : "Разрешить пользователям на этом сервере отправлять файлы на другие сервера", + "Allow users on this server to receive shares from other servers" : "Разрешить пользователям на том сервере получать файлы с других серверов" }, "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"); diff --git a/apps/files_sharing/l10n/ru.json b/apps/files_sharing/l10n/ru.json index 9eaf51586d4..ab20e0c3e92 100644 --- a/apps/files_sharing/l10n/ru.json +++ b/apps/files_sharing/l10n/ru.json @@ -31,6 +31,9 @@ "Add to your ownCloud" : "Добавить в свой ownCloud", "Download" : "Скачать", "Download %s" : "Скачать %s", - "Direct link" : "Прямая ссылка" + "Direct link" : "Прямая ссылка", + "Server-to-Server Sharing" : "Общий доступ Сервер-Сервер", + "Allow users on this server to send shares to other servers" : "Разрешить пользователям на этом сервере отправлять файлы на другие сервера", + "Allow users on this server to receive shares from other servers" : "Разрешить пользователям на том сервере получать файлы с других серверов" },"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" }
\ No newline at end of file diff --git a/apps/files_sharing/l10n/tr.js b/apps/files_sharing/l10n/tr.js index 7bbeefc9622..1b0082f6c1f 100644 --- a/apps/files_sharing/l10n/tr.js +++ b/apps/files_sharing/l10n/tr.js @@ -36,6 +36,6 @@ OC.L10N.register( "Direct link" : "Doğrudan bağlantı", "Server-to-Server Sharing" : "Sunucu-Sunucu Paylaşımı", "Allow users on this server to send shares to other servers" : "Bu sunucudaki kullanıcıların diğer sunuculara paylaşım göndermelerine izin ver", - "Allow users on this server to receive shares from other servers" : "Bu sunucudaki kullanıcıların diğer sunucularda paylaşım almalarına izin ver" + "Allow users on this server to receive shares from other servers" : "Bu sunucudaki kullanıcıların diğer sunuculardan paylaşım almalarına izin ver" }, "nplurals=2; plural=(n > 1);"); diff --git a/apps/files_sharing/l10n/tr.json b/apps/files_sharing/l10n/tr.json index f91ab02288b..b9b4e46569e 100644 --- a/apps/files_sharing/l10n/tr.json +++ b/apps/files_sharing/l10n/tr.json @@ -34,6 +34,6 @@ "Direct link" : "Doğrudan bağlantı", "Server-to-Server Sharing" : "Sunucu-Sunucu Paylaşımı", "Allow users on this server to send shares to other servers" : "Bu sunucudaki kullanıcıların diğer sunuculara paylaşım göndermelerine izin ver", - "Allow users on this server to receive shares from other servers" : "Bu sunucudaki kullanıcıların diğer sunucularda paylaşım almalarına izin ver" + "Allow users on this server to receive shares from other servers" : "Bu sunucudaki kullanıcıların diğer sunuculardan paylaşım almalarına izin ver" },"pluralForm" :"nplurals=2; plural=(n > 1);" }
\ No newline at end of file diff --git a/apps/files_sharing/lib/controllers/sharecontroller.php b/apps/files_sharing/lib/controllers/sharecontroller.php index 552d9164344..0a0594ed8ff 100644 --- a/apps/files_sharing/lib/controllers/sharecontroller.php +++ b/apps/files_sharing/lib/controllers/sharecontroller.php @@ -23,7 +23,6 @@ use OCP\AppFramework\Controller; use OCP\IRequest; use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Http\RedirectResponse; -use OCP\AppFramework\IApi; use OC\URLGenerator; use OC\AppConfig; use OCP\ILogger; @@ -84,7 +83,6 @@ class ShareController extends Controller { * @NoCSRFRequired * * @param string $token - * * @return TemplateResponse|RedirectResponse */ public function showAuthenticate($token) { @@ -127,7 +125,6 @@ class ShareController extends Controller { * * @param string $token * @param string $path - * * @return TemplateResponse */ public function showShare($token, $path = '') { @@ -161,7 +158,6 @@ class ShareController extends Controller { $originalSharePath .= $path; } - $dir = dirname($originalSharePath); $file = basename($originalSharePath); $shareTmpl = array(); @@ -173,7 +169,7 @@ class ShareController extends Controller { $shareTmpl['sharingToken'] = $token; $shareTmpl['server2serversharing'] = Helper::isOutgoingServer2serverShareEnabled(); $shareTmpl['protected'] = isset($linkItem['share_with']) ? 'true' : 'false'; - $shareTmpl['dir'] = $dir; + $shareTmpl['dir'] = ''; $shareTmpl['fileSize'] = \OCP\Util::humanFileSize(\OC\Files\Filesystem::filesize($originalSharePath)); // Show file list @@ -186,7 +182,7 @@ class ShareController extends Controller { $folder = new Template('files', 'list', ''); $folder->assign('dir', $getPath); $folder->assign('dirToken', $linkItem['token']); - $folder->assign('permissions', OCP\PERMISSION_READ); + $folder->assign('permissions', \OCP\Constants::PERMISSION_READ); $folder->assign('isPublic', true); $folder->assign('publicUploadEnabled', 'no'); $folder->assign('files', $files); @@ -207,6 +203,7 @@ class ShareController extends Controller { /** * @PublicPage * @NoCSRFRequired + * * @param string $token * @param string $files * @param string $path @@ -240,7 +237,7 @@ class ShareController extends Controller { } // FIXME: The exit is required here because otherwise the AppFramework is trying to add headers as well - // after dispatching the request which results in a "Cannot modify header information" notice. + // after dispatching the request which results in a "Cannot modify header information" notice. OC_Files::get($originalSharePath, $files_list, $_SERVER['REQUEST_METHOD'] == 'HEAD'); exit(); } else { diff --git a/apps/files_sharing/lib/readonlycache.php b/apps/files_sharing/lib/readonlycache.php index f129ca49433..6dd3b9cf61d 100644 --- a/apps/files_sharing/lib/readonlycache.php +++ b/apps/files_sharing/lib/readonlycache.php @@ -13,14 +13,14 @@ use OC\Files\Cache\Cache; class ReadOnlyCache extends Cache { public function get($path) { $data = parent::get($path); - $data['permissions'] &= (\OCP\PERMISSION_READ | \OCP\PERMISSION_SHARE); + $data['permissions'] &= (\OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_SHARE); return $data; } public function getFolderContents($path) { $content = parent::getFolderContents($path); foreach ($content as &$data) { - $data['permissions'] &= (\OCP\PERMISSION_READ | \OCP\PERMISSION_SHARE); + $data['permissions'] &= (\OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_SHARE); } return $content; } diff --git a/apps/files_sharing/lib/readonlywrapper.php b/apps/files_sharing/lib/readonlywrapper.php index 45ed3fd68bb..58a5695aff8 100644 --- a/apps/files_sharing/lib/readonlywrapper.php +++ b/apps/files_sharing/lib/readonlywrapper.php @@ -24,7 +24,7 @@ class ReadOnlyWrapper extends Wrapper { } public function getPermissions($path) { - return $this->storage->getPermissions($path) & (\OCP\PERMISSION_READ | \OCP\PERMISSION_SHARE); + return $this->storage->getPermissions($path) & (\OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_SHARE); } public function rename($path1, $path2) { diff --git a/apps/files_sharing/lib/share/folder.php b/apps/files_sharing/lib/share/folder.php index 2671f5738b7..f86e9624432 100644 --- a/apps/files_sharing/lib/share/folder.php +++ b/apps/files_sharing/lib/share/folder.php @@ -26,13 +26,14 @@ class OC_Share_Backend_Folder extends OC_Share_Backend_File implements OCP\Share * * @param int $itemSource item source ID * @param string $shareWith with whom should the item be shared + * @param string $owner owner of the item * @return array with shares */ - public function getParents($itemSource, $shareWith = null) { + public function getParents($itemSource, $shareWith = null, $owner = null) { $result = array(); $parent = $this->getParentId($itemSource); while ($parent) { - $shares = \OCP\Share::getItemSharedWithUser('folder', $parent, $shareWith); + $shares = \OCP\Share::getItemSharedWithUser('folder', $parent, $shareWith, $owner); if ($shares) { foreach ($shares as $share) { $name = substr($share['path'], strrpos($share['path'], '/') + 1); diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php index 19ee6085e47..1ac57053e25 100644 --- a/apps/files_sharing/lib/sharedstorage.php +++ b/apps/files_sharing/lib/sharedstorage.php @@ -67,7 +67,7 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage { if ($source) { $source['path'] .= '.part'; // All partial files have delete permission - $source['permissions'] |= \OCP\PERMISSION_DELETE; + $source['permissions'] |= \OCP\Constants::PERMISSION_DELETE; } } else { $source = \OC_Share_Backend_File::getSource($target, $this->getMountPoint(), $this->getItemType()); @@ -109,11 +109,11 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage { $permissions = $this->share['permissions']; // part files and the mount point always have delete permissions if ($target === '' || pathinfo($target, PATHINFO_EXTENSION) === 'part') { - $permissions |= \OCP\PERMISSION_DELETE; + $permissions |= \OCP\Constants::PERMISSION_DELETE; } if (\OC_Util::isSharingDisabledForUser()) { - $permissions &= ~\OCP\PERMISSION_SHARE; + $permissions &= ~\OCP\Constants::PERMISSION_SHARE; } return $permissions; @@ -197,7 +197,7 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage { } public function isCreatable($path) { - return ($this->getPermissions($path) & \OCP\PERMISSION_CREATE); + return ($this->getPermissions($path) & \OCP\Constants::PERMISSION_CREATE); } public function isReadable($path) { @@ -205,18 +205,18 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage { } public function isUpdatable($path) { - return ($this->getPermissions($path) & \OCP\PERMISSION_UPDATE); + return ($this->getPermissions($path) & \OCP\Constants::PERMISSION_UPDATE); } public function isDeletable($path) { - return ($this->getPermissions($path) & \OCP\PERMISSION_DELETE); + return ($this->getPermissions($path) & \OCP\Constants::PERMISSION_DELETE); } public function isSharable($path) { if (\OCP\Util::isSharingDisabledForUser()) { return false; } - return ($this->getPermissions($path) & \OCP\PERMISSION_SHARE); + return ($this->getPermissions($path) & \OCP\Constants::PERMISSION_SHARE); } public function file_exists($path) { diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index d9b8f0f4f30..d9d14f67c33 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -12,6 +12,6 @@ $urlGenerator = new \OC\URLGenerator(\OC::$server->getConfig()); $token = isset($_GET['t']) ? $_GET['t'] : ''; -$route = isset($_GET['download']) ? 'files_sharing.sharecontroller.downloadshare' : 'files_sharing.sharecontroller.showshare'; +$route = isset($_GET['download']) ? 'files_sharing.sharecontroller.downloadShare' : 'files_sharing.sharecontroller.showShare'; OC_Response::redirect($urlGenerator->linkToRoute($route, array('token' => $token))); diff --git a/apps/files_sharing/publicwebdav.php b/apps/files_sharing/publicwebdav.php index 03e43967a40..2c7ccf8d92c 100644 --- a/apps/files_sharing/publicwebdav.php +++ b/apps/files_sharing/publicwebdav.php @@ -41,7 +41,7 @@ $server->addPlugin(new OC_Connector_Sabre_ExceptionLoggerPlugin('webdav')); $server->subscribeEvent('beforeMethod', function () use ($server, $objectTree, $authBackend) { $share = $authBackend->getShare(); $owner = $share['uid_owner']; - $isWritable = $share['permissions'] & (\OCP\PERMISSION_UPDATE | \OCP\PERMISSION_CREATE); + $isWritable = $share['permissions'] & (\OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_CREATE); $fileId = $share['file_source']; if (!$isWritable) { diff --git a/apps/files_sharing/tests/api.php b/apps/files_sharing/tests/api.php index e550dcc27db..1259197423b 100644 --- a/apps/files_sharing/tests/api.php +++ b/apps/files_sharing/tests/api.php @@ -788,7 +788,7 @@ class Test_Files_Sharing_Api extends TestCase { $fileInfo = $this->view->getFileInfo($this->filename); $result = \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, - \Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2, \OCP\PERMISSION_ALL); + \Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2, \OCP\Constants::PERMISSION_ALL); // share was successful? $this->assertTrue($result); @@ -822,7 +822,7 @@ class Test_Files_Sharing_Api extends TestCase { // check if share have expected permissions, single shared files never have // delete permissions - $this->assertEquals(\OCP\PERMISSION_ALL & ~\OCP\PERMISSION_DELETE, $userShare['permissions']); + $this->assertEquals(\OCP\Constants::PERMISSION_ALL & ~\OCP\Constants::PERMISSION_DELETE, $userShare['permissions']); // update permissions @@ -1228,7 +1228,7 @@ class Test_Files_Sharing_Api extends TestCase { $info = OC\Files\Filesystem::getFileInfo($this->filename); $this->assertTrue($info instanceof \OC\Files\FileInfo); - $result = \OCP\Share::shareItem('file', $info->getId(), \OCP\Share::SHARE_TYPE_LINK, null, \OCP\PERMISSION_READ); + $result = \OCP\Share::shareItem('file', $info->getId(), \OCP\Share::SHARE_TYPE_LINK, null, \OCP\Constants::PERMISSION_READ); $this->assertTrue(is_string($result)); $result = \OCP\Share::shareItem('file', $info->getId(), \OCP\Share::SHARE_TYPE_USER, \Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2, 31); diff --git a/apps/files_sharing/tests/cache.php b/apps/files_sharing/tests/cache.php index b6a44f464f9..aec1983bad3 100644 --- a/apps/files_sharing/tests/cache.php +++ b/apps/files_sharing/tests/cache.php @@ -348,7 +348,7 @@ class Test_Files_Sharing_Cache extends TestCase { self::loginHelper(self::TEST_FILES_SHARING_API_USER1); \OC\Files\Filesystem::file_put_contents('test.txt', 'foo'); $info = \OC\Files\Filesystem::getFileInfo('test.txt'); - \OCP\Share::shareItem('file', $info->getId(), \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2, \OCP\PERMISSION_ALL); + \OCP\Share::shareItem('file', $info->getId(), \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2, \OCP\Constants::PERMISSION_ALL); \OC_Util::tearDownFS(); self::loginHelper(self::TEST_FILES_SHARING_API_USER2); @@ -369,7 +369,7 @@ class Test_Files_Sharing_Cache extends TestCase { \OC\Files\Filesystem::touch('foo/bar/test.txt'); $folderInfo = \OC\Files\Filesystem::getFileInfo('foo'); $fileInfo = \OC\Files\Filesystem::getFileInfo('foo/bar/test.txt'); - \OCP\Share::shareItem('folder', $folderInfo->getId(), \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2, \OCP\PERMISSION_ALL); + \OCP\Share::shareItem('folder', $folderInfo->getId(), \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2, \OCP\Constants::PERMISSION_ALL); \OC_Util::tearDownFS(); self::loginHelper(self::TEST_FILES_SHARING_API_USER2); diff --git a/apps/files_sharing/tests/controller/sharecontroller.php b/apps/files_sharing/tests/controller/sharecontroller.php index 8dcb2475564..f13e5b2e497 100644 --- a/apps/files_sharing/tests/controller/sharecontroller.php +++ b/apps/files_sharing/tests/controller/sharecontroller.php @@ -153,7 +153,7 @@ class ShareControllerTest extends \PHPUnit_Framework_TestCase { 'sharingToken' => $this->token, 'server2serversharing' => true, 'protected' => 'true', - 'dir' => '/', + 'dir' => '', 'downloadURL' => null, 'fileSize' => '33 B' ); diff --git a/apps/files_sharing/tests/share.php b/apps/files_sharing/tests/share.php index 4318d3c510e..f76f92734d0 100644 --- a/apps/files_sharing/tests/share.php +++ b/apps/files_sharing/tests/share.php @@ -105,12 +105,12 @@ class Test_Files_Sharing extends OCA\Files_sharing\Tests\TestCase { $fileinfo = $this->view->getFileInfo($this->filename); $result = \OCP\Share::shareItem('file', $fileinfo['fileid'], \OCP\Share::SHARE_TYPE_GROUP, - \Test_Files_Sharing::TEST_FILES_SHARING_API_GROUP1, \OCP\PERMISSION_READ); + \Test_Files_Sharing::TEST_FILES_SHARING_API_GROUP1, \OCP\Constants::PERMISSION_READ); $this->assertTrue($result); $result = \OCP\Share::shareItem('file', $fileinfo['fileid'], \OCP\Share::SHARE_TYPE_USER, - \Test_Files_Sharing::TEST_FILES_SHARING_API_USER2, \OCP\PERMISSION_UPDATE); + \Test_Files_Sharing::TEST_FILES_SHARING_API_USER2, \OCP\Constants::PERMISSION_UPDATE); $this->assertTrue($result); @@ -124,7 +124,7 @@ class Test_Files_Sharing extends OCA\Files_sharing\Tests\TestCase { $this->assertSame(1, count($result)); $share = reset($result); - $this->assertSame(\OCP\PERMISSION_READ | \OCP\PERMISSION_UPDATE, $share['permissions']); + $this->assertSame(\OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE, $share['permissions']); \OC\Files\Filesystem::rename($this->filename, $this->filename . '-renamed'); @@ -136,7 +136,7 @@ class Test_Files_Sharing extends OCA\Files_sharing\Tests\TestCase { $this->assertSame(1, count($result)); $share = reset($result); - $this->assertSame(\OCP\PERMISSION_READ | \OCP\PERMISSION_UPDATE, $share['permissions']); + $this->assertSame(\OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE, $share['permissions']); $this->assertSame($this->filename . '-renamed', $share['file_target']); self::loginHelper(self::TEST_FILES_SHARING_API_USER1); @@ -157,7 +157,7 @@ class Test_Files_Sharing extends OCA\Files_sharing\Tests\TestCase { $share = reset($result); // only the group share permissions should be available now - $this->assertSame(\OCP\PERMISSION_READ, $share['permissions']); + $this->assertSame(\OCP\Constants::PERMISSION_READ, $share['permissions']); $this->assertSame($this->filename . '-renamed', $share['file_target']); } @@ -172,8 +172,8 @@ class Test_Files_Sharing extends OCA\Files_sharing\Tests\TestCase { $fileinfo = $this->view->getFileInfo($this->filename); // share the file to group1 (user2 is a member of this group) and explicitely to user2 - \OCP\Share::shareItem('file', $fileinfo['fileid'], \OCP\Share::SHARE_TYPE_GROUP, self::TEST_FILES_SHARING_API_GROUP1, \OCP\PERMISSION_ALL); - \OCP\Share::shareItem('file', $fileinfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2, \OCP\PERMISSION_ALL); + \OCP\Share::shareItem('file', $fileinfo['fileid'], \OCP\Share::SHARE_TYPE_GROUP, self::TEST_FILES_SHARING_API_GROUP1, \OCP\Constants::PERMISSION_ALL); + \OCP\Share::shareItem('file', $fileinfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2, \OCP\Constants::PERMISSION_ALL); // user1 should have to shared files $shares = \OCP\Share::getItemsShared('file'); @@ -203,7 +203,7 @@ class Test_Files_Sharing extends OCA\Files_sharing\Tests\TestCase { $this->assertSame(1, count($shares)); // user1 shares a gain the file directly to user2 - \OCP\Share::shareItem('file', $fileinfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2, \OCP\PERMISSION_ALL); + \OCP\Share::shareItem('file', $fileinfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2, \OCP\Constants::PERMISSION_ALL); // user2 should see again welcome.txt and the shared file \Test_Files_Sharing::loginHelper(self::TEST_FILES_SHARING_API_USER2); @@ -271,14 +271,14 @@ class Test_Files_Sharing extends OCA\Files_sharing\Tests\TestCase { } function DataProviderTestFileSharePermissions() { - $permission1 = \OCP\PERMISSION_ALL; - $permission3 = \OCP\PERMISSION_READ; - $permission4 = \OCP\PERMISSION_READ | \OCP\PERMISSION_UPDATE; - $permission5 = \OCP\PERMISSION_READ | \OCP\PERMISSION_DELETE; - $permission6 = \OCP\PERMISSION_READ | \OCP\PERMISSION_UPDATE | \OCP\PERMISSION_DELETE; + $permission1 = \OCP\Constants::PERMISSION_ALL; + $permission3 = \OCP\Constants::PERMISSION_READ; + $permission4 = \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE; + $permission5 = \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_DELETE; + $permission6 = \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_DELETE; return array( - array($permission1, \OCP\PERMISSION_ALL & ~\OCP\PERMISSION_DELETE), + array($permission1, \OCP\Constants::PERMISSION_ALL & ~\OCP\Constants::PERMISSION_DELETE), array($permission3, $permission3), array($permission4, $permission4), array($permission5, $permission3), diff --git a/apps/files_trashbin/appinfo/app.php b/apps/files_trashbin/appinfo/app.php index 7df52da6314..0e2cbaa529f 100644 --- a/apps/files_trashbin/appinfo/app.php +++ b/apps/files_trashbin/appinfo/app.php @@ -3,8 +3,6 @@ $l = \OC::$server->getL10N('files_trashbin'); OCP\Util::addTranslations('files_trashbin'); -OC::$CLASSPATH['OCA\Files_Trashbin\Exceptions\CopyRecursiveException'] = 'files_trashbin/lib/exceptions.php'; - // register hooks \OCA\Files_Trashbin\Trashbin::registerHooks(); diff --git a/apps/files_trashbin/l10n/af_ZA.js b/apps/files_trashbin/l10n/af_ZA.js new file mode 100644 index 00000000000..bde70775250 --- /dev/null +++ b/apps/files_trashbin/l10n/af_ZA.js @@ -0,0 +1,6 @@ +OC.L10N.register( + "files_trashbin", + { + "Error" : "Fout" +}, +"nplurals=2; plural=(n != 1);"); diff --git a/apps/files_trashbin/l10n/af_ZA.json b/apps/files_trashbin/l10n/af_ZA.json new file mode 100644 index 00000000000..0ed511058ba --- /dev/null +++ b/apps/files_trashbin/l10n/af_ZA.json @@ -0,0 +1,4 @@ +{ "translations": { + "Error" : "Fout" +},"pluralForm" :"nplurals=2; plural=(n != 1);" +}
\ No newline at end of file diff --git a/apps/files_trashbin/lib/exceptions.php b/apps/files_trashbin/lib/exceptions/copyrecursiveexception.php index 23e50293b77..23e50293b77 100644 --- a/apps/files_trashbin/lib/exceptions.php +++ b/apps/files_trashbin/lib/exceptions/copyrecursiveexception.php diff --git a/apps/files_trashbin/lib/helper.php b/apps/files_trashbin/lib/helper.php index c2b81e3dbc8..c99662480df 100644 --- a/apps/files_trashbin/lib/helper.php +++ b/apps/files_trashbin/lib/helper.php @@ -88,7 +88,7 @@ class Helper $entry = \OCA\Files\Helper::formatFileInfo($i); $entry['id'] = $id++; $entry['etag'] = $entry['mtime']; // add fake etag, it is only needed to identify the preview image - $entry['permissions'] = \OCP\PERMISSION_READ; + $entry['permissions'] = \OCP\Constants::PERMISSION_READ; if (\OCP\App::isEnabled('files_encryption')) { $entry['isPreviewAvailable'] = false; } diff --git a/apps/files_trashbin/lib/trashbin.php b/apps/files_trashbin/lib/trashbin.php index 52d24143902..661fc271dfc 100644 --- a/apps/files_trashbin/lib/trashbin.php +++ b/apps/files_trashbin/lib/trashbin.php @@ -92,11 +92,8 @@ class Trashbin { if (!$view->is_dir('files_trashbin/versions')) { $view->mkdir('files_trashbin/versions'); } - if (!$view->is_dir('files_trashbin/keyfiles')) { - $view->mkdir('files_trashbin/keyfiles'); - } - if (!$view->is_dir('files_trashbin/share-keys')) { - $view->mkdir('files_trashbin/share-keys'); + if (!$view->is_dir('files_trashbin/keys')) { + $view->mkdir('files_trashbin/keys'); } } @@ -277,78 +274,23 @@ class Trashbin { return 0; } - $util = new \OCA\Encryption\Util(new \OC\Files\View('/'), $user); + $util = new \OCA\Encryption\Util($rootView, $user); - // disable proxy to prevent recursive calls - $proxyStatus = \OC_FileProxy::$enabled; - \OC_FileProxy::$enabled = false; - - if ($util->isSystemWideMountPoint($ownerPath)) { - $baseDir = '/files_encryption/'; - } else { - $baseDir = $owner . '/files_encryption/'; - } - - $keyfile = \OC\Files\Filesystem::normalizePath($baseDir . '/keyfiles/' . $ownerPath); - - if ($rootView->is_dir($keyfile) || $rootView->file_exists($keyfile . '.key')) { - // move keyfiles - if ($rootView->is_dir($keyfile)) { - $size += self::calculateSize(new \OC\Files\View($keyfile)); - if ($owner !== $user) { - self::copy_recursive($keyfile, $owner . '/files_trashbin/keyfiles/' . basename($ownerPath) . '.d' . $timestamp, $rootView); - } - $rootView->rename($keyfile, $user . '/files_trashbin/keyfiles/' . $filename . '.d' . $timestamp); - } else { - $size += $rootView->filesize($keyfile . '.key'); - if ($owner !== $user) { - $rootView->copy($keyfile . '.key', $owner . '/files_trashbin/keyfiles/' . basename($ownerPath) . '.key.d' . $timestamp); - } - $rootView->rename($keyfile . '.key', $user . '/files_trashbin/keyfiles/' . $filename . '.key.d' . $timestamp); - } + $baseDir = '/files_encryption/'; + if (!$util->isSystemWideMountPoint($ownerPath)) { + $baseDir = $owner . $baseDir; } - // retain share keys - $sharekeys = \OC\Files\Filesystem::normalizePath($baseDir . '/share-keys/' . $ownerPath); + $keyfiles = \OC\Files\Filesystem::normalizePath($baseDir . '/keys/' . $ownerPath); - if ($rootView->is_dir($sharekeys)) { - $size += self::calculateSize(new \OC\Files\View($sharekeys)); + if ($rootView->is_dir($keyfiles)) { + $size += self::calculateSize(new \OC\Files\View($keyfiles)); if ($owner !== $user) { - self::copy_recursive($sharekeys, $owner . '/files_trashbin/share-keys/' . basename($ownerPath) . '.d' . $timestamp, $rootView); - } - $rootView->rename($sharekeys, $user . '/files_trashbin/share-keys/' . $filename . '.d' . $timestamp); - } else { - // handle share-keys - $matches = \OCA\Encryption\Helper::findShareKeys($ownerPath, $sharekeys, $rootView); - foreach ($matches as $src) { - // get source file parts - $pathinfo = pathinfo($src); - - // we only want to keep the users key so we can access the private key - $userShareKey = $filename . '.' . $user . '.shareKey'; - - // if we found the share-key for the owner, we need to move it to files_trashbin - if ($pathinfo['basename'] == $userShareKey) { - - // calculate size - $size += $rootView->filesize($sharekeys . '.' . $user . '.shareKey'); - - // move file - $rootView->rename($sharekeys . '.' . $user . '.shareKey', $user . '/files_trashbin/share-keys/' . $userShareKey . '.d' . $timestamp); - } elseif ($owner !== $user) { - $ownerShareKey = basename($ownerPath) . '.' . $owner . '.shareKey'; - if ($pathinfo['basename'] == $ownerShareKey) { - $rootView->rename($sharekeys . '.' . $owner . '.shareKey', $owner . '/files_trashbin/share-keys/' . $ownerShareKey . '.d' . $timestamp); - } - } else { - // don't keep other share-keys - unlink($src); - } + self::copy_recursive($keyfiles, $owner . '/files_trashbin/keys/' . basename($ownerPath) . '.d' . $timestamp, $rootView); } + $rootView->rename($keyfiles, $user . '/files_trashbin/keys/' . $filename . '.d' . $timestamp); } - // enable proxy - \OC_FileProxy::$enabled = $proxyStatus; } return $size; } @@ -492,7 +434,7 @@ class Trashbin { * @return bool */ private static function restoreEncryptionKeys(\OC\Files\View $view, $file, $filename, $uniqueFilename, $location, $timestamp) { - // Take care of encryption keys TODO! Get '.key' in file between file name and delete date (also for permanent delete!) + if (\OCP\App::isEnabled('files_encryption')) { $user = \OCP\User::getUser(); $rootView = new \OC\Files\View('/'); @@ -506,84 +448,31 @@ class Trashbin { return false; } - $util = new \OCA\Encryption\Util(new \OC\Files\View('/'), $user); + $util = new \OCA\Encryption\Util($rootView, $user); - if ($util->isSystemWideMountPoint($ownerPath)) { - $baseDir = '/files_encryption/'; - } else { - $baseDir = $owner . '/files_encryption/'; + $baseDir = '/files_encryption/'; + if (!$util->isSystemWideMountPoint($ownerPath)) { + $baseDir = $owner . $baseDir; } - $path_parts = pathinfo($file); - $source_location = $path_parts['dirname']; + $source_location = dirname($file); - if ($view->is_dir('/files_trashbin/keyfiles/' . $file)) { + if ($view->is_dir('/files_trashbin/keys/' . $file)) { if ($source_location != '.') { - $keyfile = \OC\Files\Filesystem::normalizePath($user . '/files_trashbin/keyfiles/' . $source_location . '/' . $filename); - $sharekey = \OC\Files\Filesystem::normalizePath($user . '/files_trashbin/share-keys/' . $source_location . '/' . $filename); + $keyfile = \OC\Files\Filesystem::normalizePath($user . '/files_trashbin/keys/' . $source_location . '/' . $filename); } else { - $keyfile = \OC\Files\Filesystem::normalizePath($user . '/files_trashbin/keyfiles/' . $filename); - $sharekey = \OC\Files\Filesystem::normalizePath($user . '/files_trashbin/share-keys/' . $filename); + $keyfile = \OC\Files\Filesystem::normalizePath($user . '/files_trashbin/keys/' . $filename); } - } else { - $keyfile = \OC\Files\Filesystem::normalizePath($user . '/files_trashbin/keyfiles/' . $source_location . '/' . $filename . '.key'); } if ($timestamp) { $keyfile .= '.d' . $timestamp; } - // disable proxy to prevent recursive calls - $proxyStatus = \OC_FileProxy::$enabled; - \OC_FileProxy::$enabled = false; - - if ($rootView->file_exists($keyfile)) { - // handle directory - if ($rootView->is_dir($keyfile)) { - - // handle keyfiles - $rootView->rename($keyfile, $baseDir . '/keyfiles/' . $ownerPath); - - // handle share-keys - if ($timestamp) { - $sharekey .= '.d' . $timestamp; - } - $rootView->rename($sharekey, $baseDir . '/share-keys/' . $ownerPath); - } else { - // handle keyfiles - $rootView->rename($keyfile, $baseDir . '/keyfiles/' . $ownerPath . '.key'); - - // handle share-keys - $ownerShareKey = \OC\Files\Filesystem::normalizePath($user . '/files_trashbin/share-keys/' . $source_location . '/' . $filename . '.' . $user . '.shareKey'); - if ($timestamp) { - $ownerShareKey .= '.d' . $timestamp; - } - - // move only owners key - $rootView->rename($ownerShareKey, $baseDir . '/share-keys/' . $ownerPath . '.' . $user . '.shareKey'); - - // try to re-share if file is shared - $filesystemView = new \OC\Files\View('/'); - $session = new \OCA\Encryption\Session($filesystemView); - $util = new \OCA\Encryption\Util($filesystemView, $user); - - // fix the file size - $absolutePath = \OC\Files\Filesystem::normalizePath('/' . $owner . '/files/' . $ownerPath); - $util->fixFileSize($absolutePath); - - // get current sharing state - $sharingEnabled = \OCP\Share::isEnabled(); - - // get users sharing this file - $usersSharing = $util->getSharingUsersArray($sharingEnabled, $target); - - // Attempt to set shareKey - $util->setSharedFileKeyfiles($session, $usersSharing, $target); - } + if ($rootView->is_dir($keyfile)) { + $rootView->rename($keyfile, $baseDir . '/keys/' . $ownerPath); } - // enable proxy - \OC_FileProxy::$enabled = $proxyStatus; } } @@ -678,27 +567,15 @@ class Trashbin { if (\OCP\App::isEnabled('files_encryption')) { $user = \OCP\User::getUser(); - if ($view->is_dir('/files_trashbin/files/' . $file)) { - $keyfile = \OC\Files\Filesystem::normalizePath('files_trashbin/keyfiles/' . $filename); - $sharekeys = \OC\Files\Filesystem::normalizePath('files_trashbin/share-keys/' . $filename); - } else { - $keyfile = \OC\Files\Filesystem::normalizePath('files_trashbin/keyfiles/' . $filename . '.key'); - $sharekeys = \OC\Files\Filesystem::normalizePath('files_trashbin/share-keys/' . $filename . '.' . $user . '.shareKey'); - } + $keyfiles = \OC\Files\Filesystem::normalizePath('files_trashbin/keys/' . $filename); + if ($timestamp) { - $keyfile .= '.d' . $timestamp; - $sharekeys .= '.d' . $timestamp; + $keyfiles .= '.d' . $timestamp; } - if ($view->file_exists($keyfile)) { - if ($view->is_dir($keyfile)) { - $size += self::calculateSize(new \OC\Files\View('/' . $user . '/' . $keyfile)); - $size += self::calculateSize(new \OC\Files\View('/' . $user . '/' . $sharekeys)); - } else { - $size += $view->filesize($keyfile); - $size += $view->filesize($sharekeys); - } - $view->unlink($keyfile); - $view->unlink($sharekeys); + if ($view->is_dir($keyfiles)) { + $size += self::calculateSize(new \OC\Files\View('/' . $user . '/' . $keyfiles)); + $view->deleteAll($keyfiles); + } } return $size; diff --git a/apps/files_versions/appinfo/app.php b/apps/files_versions/appinfo/app.php index 78de1528f32..ae29bceb37c 100644 --- a/apps/files_versions/appinfo/app.php +++ b/apps/files_versions/appinfo/app.php @@ -1,10 +1,5 @@ <?php -//require_once 'files_versions/versions.php'; -OC::$CLASSPATH['OCA\Files_Versions\Storage'] = 'files_versions/lib/versions.php'; -OC::$CLASSPATH['OCA\Files_Versions\Hooks'] = 'files_versions/lib/hooks.php'; -OC::$CLASSPATH['OCA\Files_Versions\Capabilities'] = 'files_versions/lib/capabilities.php'; - OCP\Util::addTranslations('files_versions'); OCP\Util::addscript('files_versions', 'versions'); OCP\Util::addStyle('files_versions', 'versions'); diff --git a/apps/files_versions/appinfo/routes.php b/apps/files_versions/appinfo/routes.php index 057834213e4..83c7746d1e7 100644 --- a/apps/files_versions/appinfo/routes.php +++ b/apps/files_versions/appinfo/routes.php @@ -11,6 +11,8 @@ function() { require_once __DIR__ . '/../ajax/preview.php'; }); +$this->create('files_versions_download', 'download.php') + ->actionInclude('files_versions/download.php'); $this->create('files_versions_ajax_getVersions', 'ajax/getVersions.php') ->actionInclude('files_versions/ajax/getVersions.php'); $this->create('files_versions_ajax_rollbackVersion', 'ajax/rollbackVersion.php') diff --git a/apps/files_versions/download.php b/apps/files_versions/download.php index 2fe56d2e638..e5139450f5e 100644 --- a/apps/files_versions/download.php +++ b/apps/files_versions/download.php @@ -22,7 +22,7 @@ */ OCP\JSON::checkAppEnabled('files_versions'); -//OCP\JSON::callCheck(); +OCP\JSON::checkLoggedIn(); $file = $_GET['file']; $revision=(int)$_GET['revision']; diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/storage.php index 82e0ecc3e2f..82e0ecc3e2f 100644 --- a/apps/files_versions/lib/versions.php +++ b/apps/files_versions/lib/storage.php diff --git a/apps/files_versions/tests/versions.php b/apps/files_versions/tests/versions.php index 436863b28dc..cf0ffb320e2 100644 --- a/apps/files_versions/tests/versions.php +++ b/apps/files_versions/tests/versions.php @@ -21,7 +21,6 @@ */ require_once __DIR__ . '/../appinfo/app.php'; -require_once __DIR__ . '/../lib/versions.php'; /** * Class Test_Files_versions @@ -277,7 +276,7 @@ class Test_Files_Versioning extends \Test\TestCase { $this->rootView->file_put_contents($v1, 'version1'); $this->rootView->file_put_contents($v2, 'version2'); - \OCP\Share::shareItem('folder', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_VERSIONS_USER2, OCP\PERMISSION_ALL); + \OCP\Share::shareItem('folder', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_VERSIONS_USER2, \OCP\Constants::PERMISSION_ALL); self::loginHelper(self::TEST_VERSIONS_USER2); @@ -320,7 +319,7 @@ class Test_Files_Versioning extends \Test\TestCase { $this->rootView->file_put_contents($v1, 'version1'); $this->rootView->file_put_contents($v2, 'version2'); - \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_VERSIONS_USER2, OCP\PERMISSION_ALL); + \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_VERSIONS_USER2, \OCP\Constants::PERMISSION_ALL); self::loginHelper(self::TEST_VERSIONS_USER2); diff --git a/apps/user_ldap/ajax/wizard.php b/apps/user_ldap/ajax/wizard.php index ef1241b9147..6d7d70c8c5a 100644 --- a/apps/user_ldap/ajax/wizard.php +++ b/apps/user_ldap/ajax/wizard.php @@ -62,6 +62,7 @@ switch($action) { case 'guessPortAndTLS': case 'guessBaseDN': case 'detectEmailAttribute': + case 'detectUserDisplayNameAttribute': case 'determineGroupMemberAssoc': case 'determineUserObjectClasses': case 'determineGroupObjectClasses': @@ -115,4 +116,3 @@ switch($action) { //TODO: return 4xx error break; } - diff --git a/apps/user_ldap/appinfo/register_command.php b/apps/user_ldap/appinfo/register_command.php index f65b9773388..1a0227db95e 100644 --- a/apps/user_ldap/appinfo/register_command.php +++ b/apps/user_ldap/appinfo/register_command.php @@ -11,3 +11,4 @@ $application->add(new OCA\user_ldap\Command\SetConfig()); $application->add(new OCA\user_ldap\Command\TestConfig()); $application->add(new OCA\user_ldap\Command\CreateEmptyConfig()); $application->add(new OCA\user_ldap\Command\DeleteConfig()); +$application->add(new OCA\user_ldap\Command\Search()); diff --git a/apps/user_ldap/command/search.php b/apps/user_ldap/command/search.php new file mode 100644 index 00000000000..e20255510d8 --- /dev/null +++ b/apps/user_ldap/command/search.php @@ -0,0 +1,100 @@ +<?php +/** + * Copyright (c) 2014 Arthur Schiwon <blizzz@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OCA\user_ldap\Command; + +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; + +use OCA\user_ldap\User_Proxy; +use OCA\user_ldap\Group_Proxy; +use OCA\user_ldap\lib\Helper; +use OCA\user_ldap\lib\LDAP; + +class Search extends Command { + protected function configure() { + $this + ->setName('ldap:search') + ->setDescription('executes a user or group search') + ->addArgument( + 'search', + InputArgument::REQUIRED, + 'the search string (can be empty)' + ) + ->addOption( + 'group', + null, + InputOption::VALUE_NONE, + 'searches groups instead of users' + ) + ->addOption( + 'offset', + null, + InputOption::VALUE_REQUIRED, + 'The offset of the result set. Needs to be a multiple of limit. defaults to 0.', + 0 + ) + ->addOption( + 'limit', + null, + InputOption::VALUE_REQUIRED, + 'limit the results. 0 means no limit, defaults to 15', + 15 + ) + ; + } + + /** + * Tests whether the offset and limit options are valid + * @param int $offset + * @param int $limit + * @throws \InvalidArgumentException + */ + protected function validateOffsetAndLimit($offset, $limit) { + if($limit < 0) { + throw new \InvalidArgumentException('limit must be 0 or greater'); + } + if($offset < 0) { + throw new \InvalidArgumentException('offset must be 0 or greater'); + } + if($limit === 0 && $offset !== 0) { + throw new \InvalidArgumentException('offset must be 0 if limit is also set to 0'); + } + if($offset > 0 && ($offset % $limit !== 0)) { + throw new \InvalidArgumentException('offset must be a multiple of limit'); + } + } + + protected function execute(InputInterface $input, OutputInterface $output) { + $configPrefixes = Helper::getServerConfigurationPrefixes(true); + $ldapWrapper = new LDAP(); + + $offset = intval($input->getOption('offset')); + $limit = intval($input->getOption('limit')); + $this->validateOffsetAndLimit($offset, $limit); + + if($input->getOption('group')) { + $proxy = new Group_Proxy($configPrefixes, $ldapWrapper); + $getMethod = 'getGroups'; + $printID = false; + } else { + $proxy = new User_Proxy($configPrefixes, $ldapWrapper); + $getMethod = 'getDisplayNames'; + $printID = true; + } + + $result = $proxy->$getMethod($input->getArgument('search'), $limit, $offset); + foreach($result as $id => $name) { + $line = $name . ($printID ? ' ('.$id.')' : ''); + $output->writeln($line); + } + } +} diff --git a/apps/user_ldap/js/ldapFilter.js b/apps/user_ldap/js/ldapFilter.js index bb66c1df2ee..0f7d240adac 100644 --- a/apps/user_ldap/js/ldapFilter.js +++ b/apps/user_ldap/js/ldapFilter.js @@ -8,6 +8,7 @@ function LdapFilter(target, determineModeCallback) { this.determineModeCallback = determineModeCallback; this.foundFeatures = false; this.activated = false; + this.countPending = false; if( target === 'User' || target === 'Login' || @@ -25,9 +26,13 @@ LdapFilter.prototype.activate = function() { this.determineMode(); }; -LdapFilter.prototype.compose = function(callback) { +LdapFilter.prototype.compose = function(updateCount) { var action; + if(updateCount === true) { + this.countPending = updateCount; + } + if(this.locked) { this.lazyRunCompose = true; return false; @@ -54,22 +59,36 @@ LdapFilter.prototype.compose = function(callback) { LdapWizard.ajax(param, function(result) { - LdapWizard.applyChanges(result); - filter.updateCount(); - if(filter.target === 'Group') { - LdapWizard.detectGroupMemberAssoc(); - } - if(typeof callback !== 'undefined') { - callback(); - } + filter.afterComposeSuccess(result); }, function () { + filter.countPending = false; console.log('LDAP Wizard: could not compose filter. '+ 'Please check owncloud.log'); } ); }; +/** + * this function is triggered after attribute detectors have completed in + * LdapWizard + */ +LdapFilter.prototype.afterDetectorsRan = function() { + this.updateCount(); +}; + +/** + * this function is triggered after LDAP filters have been composed successfully + * @param {object} result returned by the ajax call + */ +LdapFilter.prototype.afterComposeSuccess = function(result) { + LdapWizard.applyChanges(result); + if(this.countPending) { + this.countPending = false; + this.updateCount(); + } +}; + LdapFilter.prototype.determineMode = function() { var param = 'action=get'+encodeURIComponent(this.target)+'FilterMode'+ '&ldap_serverconfig_chooser='+ @@ -145,10 +164,26 @@ LdapFilter.prototype.findFeatures = function() { } }; +/** + * this function is triggered before user and group counts are executed + * resolving the passed status variable will fire up counting + * @param {object} status an instance of $.Deferred + */ +LdapFilter.prototype.beforeUpdateCount = function() { + var status = $.Deferred(); + LdapWizard.runDetectors(this.target, function() { + status.resolve(); + }); + return status; +}; + LdapFilter.prototype.updateCount = function(doneCallback) { - if(this.target === 'User') { - LdapWizard.countUsers(doneCallback); - } else if (this.target === 'Group') { - LdapWizard.countGroups(doneCallback); - } + var filter = this; + $.when(this.beforeUpdateCount()).done(function() { + if(filter.target === 'User') { + LdapWizard.countUsers(doneCallback); + } else if (filter.target === 'Group') { + LdapWizard.countGroups(doneCallback); + } + }); }; diff --git a/apps/user_ldap/js/settings.js b/apps/user_ldap/js/settings.js index fa40aba73b4..6db210fe435 100644 --- a/apps/user_ldap/js/settings.js +++ b/apps/user_ldap/js/settings.js @@ -151,8 +151,10 @@ var LdapWizard = { ajaxRequests: {}, ajax: function(param, fnOnSuccess, fnOnError, reqID) { - if(reqID !== undefined) { + if(!_.isUndefined(reqID)) { if(LdapWizard.ajaxRequests.hasOwnProperty(reqID)) { + console.log('aborting ' + reqID); + console.log(param); LdapWizard.ajaxRequests[reqID].abort(); } } @@ -167,9 +169,10 @@ var LdapWizard = { } } ); - if(reqID !== undefined) { + if(!_.isUndefined(reqID)) { LdapWizard.ajaxRequests[reqID] = request; } + return request; }, applyChanges: function (result) { @@ -342,7 +345,7 @@ var LdapWizard = { }, _countThings: function(method, spinnerID, doneCallback) { - param = 'action='+method+ + var param = 'action='+method+ '&ldap_serverconfig_chooser='+ encodeURIComponent($('#ldap_serverconfig_chooser').val()); @@ -351,14 +354,14 @@ var LdapWizard = { function(result) { LdapWizard.applyChanges(result); LdapWizard.hideSpinner(spinnerID); - if(doneCallback !== undefined) { + if(!_.isUndefined(doneCallback)) { doneCallback(method); } }, function (result) { OC.Notification.show('Counting the entries failed with, ' + result.message); LdapWizard.hideSpinner(spinnerID); - if(doneCallback !== undefined) { + if(!_.isUndefined(doneCallback)) { doneCallback(method); } }, @@ -374,12 +377,54 @@ var LdapWizard = { LdapWizard._countThings('countUsers', '#ldap_user_count', doneCallback); }, + /** + * called after detectors have run + * @callback runDetectorsCallback + */ + + /** + * runs detectors to determine appropriate attributes, e.g. displayName + * @param {string} type either "User" or "Group" + * @param {runDetectorsCallback} triggered after all detectors have completed + */ + runDetectors: function(type, callback) { + if(type === 'Group') { + $.when(LdapWizard.detectGroupMemberAssoc()) + .then(callback, callback); + if( LdapWizard.admin.isExperienced + && !(LdapWizard.detectorsRunInXPMode & LdapWizard.groupDetectors)) { + LdapWizard.detectorsRunInXPMode += LdapWizard.groupDetectors; + } + } else if(type === 'User') { + var req1 = LdapWizard.detectUserDisplayNameAttribute(); + var req2 = LdapWizard.detectEmailAttribute(); + $.when(req1, req2) + .then(callback, callback); + if( LdapWizard.admin.isExperienced + && !(LdapWizard.detectorsRunInXPMode & LdapWizard.userDetectors)) { + LdapWizard.detectorsRunInXPMode += LdapWizard.userDetectors; + } + } + }, + + /** + * runs detector to find out a fitting user display name attribute + */ + detectUserDisplayNameAttribute: function() { + var param = 'action=detectUserDisplayNameAttribute' + + '&ldap_serverconfig_chooser='+ + encodeURIComponent($('#ldap_serverconfig_chooser').val()); + + //runs in the background, no callbacks necessary + return LdapWizard.ajax(param, LdapWizard.applyChanges, function(){}, 'detectUserDisplayNameAttribute'); + }, + detectEmailAttribute: function() { - param = 'action=detectEmailAttribute'+ + var param = 'action=detectEmailAttribute'+ '&ldap_serverconfig_chooser='+ encodeURIComponent($('#ldap_serverconfig_chooser').val()); //runs in the background, no callbacks necessary - LdapWizard.ajax(param, LdapWizard.applyChanges, function(){}, 'detectEmailAttribute'); + return LdapWizard.ajax(param, LdapWizard.applyChanges, function(){}, 'detectEmailAttribute'); }, detectGroupMemberAssoc: function() { @@ -387,7 +432,7 @@ var LdapWizard = { '&ldap_serverconfig_chooser='+ encodeURIComponent($('#ldap_serverconfig_chooser').val()); - LdapWizard.ajax(param, + return LdapWizard.ajax(param, function(result) { //pure background story }, @@ -409,7 +454,7 @@ var LdapWizard = { $('#ldap_loginfilter_attributes').find('option').remove(); for (var i in result.options['ldap_loginfilter_attributes']) { //FIXME: move HTML into template - attr = result.options['ldap_loginfilter_attributes'][i]; + var attr = result.options['ldap_loginfilter_attributes'][i]; $('#ldap_loginfilter_attributes').append( "<option value='"+attr+"'>"+attr+"</option>"); } @@ -566,8 +611,12 @@ var LdapWizard = { }, isConfigurationActiveControlLocked: true, + detectorsRunInXPMode: 0, + userDetectors: 1, + groupDetectors: 2, init: function() { + LdapWizard.detectorsRunInXPMode = 0; LdapWizard.instantiateFilters(); LdapWizard.admin.setExperienced($('#ldap_experienced_admin').is(':checked')); LdapWizard.basicStatusCheck(); @@ -620,8 +669,9 @@ var LdapWizard = { instantiateFilters: function() { delete LdapWizard.userFilter; LdapWizard.userFilter = new LdapFilter('User', function(mode) { - if(mode === LdapWizard.filterModeAssisted) { - LdapWizard.groupFilter.updateCount(); + if( !LdapWizard.admin.isExperienced() + || mode === LdapWizard.filterModeAssisted) { + LdapWizard.userFilter.updateCount(); } LdapWizard.userFilter.findFeatures(); }); @@ -630,7 +680,6 @@ var LdapWizard = { $('#ldap_user_count').text(''); LdapWizard.showSpinner('#rawUserFilterContainer .ldapGetEntryCount'); LdapWizard.userFilter.updateCount(LdapWizard.hideTestSpinner); - LdapWizard.detectEmailAttribute(); $('#ldap_user_count').removeClass('hidden'); }); @@ -641,7 +690,8 @@ var LdapWizard = { delete LdapWizard.groupFilter; LdapWizard.groupFilter = new LdapFilter('Group', function(mode) { - if(mode === LdapWizard.filterModeAssisted) { + if( !LdapWizard.admin.isExperienced() + || mode === LdapWizard.filterModeAssisted) { LdapWizard.groupFilter.updateCount(); } LdapWizard.groupFilter.findFeatures(); @@ -651,7 +701,6 @@ var LdapWizard = { $('#ldap_group_count').text(''); LdapWizard.showSpinner('#rawGroupFilterContainer .ldapGetEntryCount'); LdapWizard.groupFilter.updateCount(LdapWizard.hideTestSpinner); - LdapWizard.detectGroupMemberAssoc(); $('#ldap_group_count').removeClass('hidden'); }); }, @@ -668,7 +717,7 @@ var LdapWizard = { postInitUserFilter: function() { if(LdapWizard.userFilterObjectClassesHasRun && LdapWizard.userFilterAvailableGroupsHasRun) { - LdapWizard.userFilter.compose(LdapWizard.detectEmailAttribute); + LdapWizard.userFilter.compose(); } }, @@ -679,7 +728,7 @@ var LdapWizard = { //do not allow to switch tabs as long as a save process is active return false; } - newTabIndex = 0; + var newTabIndex = 0; if(ui.newTab[0].id === '#ldapWizard2') { LdapWizard.initUserFilter(); newTabIndex = 1; @@ -691,9 +740,23 @@ var LdapWizard = { newTabIndex = 3; } - curTabIndex = $('#ldapSettings').tabs('option', 'active'); + var curTabIndex = $('#ldapSettings').tabs('option', 'active'); if(curTabIndex >= 0 && curTabIndex <= 3) { LdapWizard.controlUpdate(newTabIndex); + //run detectors in XP mode, when "Test Filter" button has not been + //clicked in order to make sure that email, displayname, member- + //group association attributes are properly set. + if( curTabIndex === 1 + && LdapWizard.admin.isExperienced + && !(LdapWizard.detecorsRunInXPMode & LdapWizard.userDetectors) + ) { + LdapWizard.runDetectors('User', function(){}); + } else if( curTabIndex === 3 + && LdapWizard.admin.isExperienced + && !(LdapWizard.detecorsRunInXPMode & LdapWizard.groupDetectors) + ) { + LdapWizard.runDetectors('Group', function(){}); + } } }, @@ -711,15 +774,15 @@ var LdapWizard = { } } - if(triggerObj.id === 'ldap_userlist_filter' && !LdapWizard.admin.isExperienced()) { - LdapWizard.detectEmailAttribute(); - } else if(triggerObj.id === 'ldap_group_filter' && !LdapWizard.admin.isExperienced()) { - LdapWizard.detectGroupMemberAssoc(); - } - if(triggerObj.id === 'ldap_loginfilter_username' || triggerObj.id === 'ldap_loginfilter_email') { LdapWizard.loginFilter.compose(); + } else if (!LdapWizard.admin.isExperienced()) { + if(triggerObj.id === 'ldap_userlist_filter') { + LdapWizard.userFilter.updateCount(); + } else if (triggerObj.id === 'ldap_group_filter') { + LdapWizard.groupFilter.updateCount(); + } } if($('#ldapSettings').tabs('option', 'active') == 0) { @@ -749,7 +812,7 @@ var LdapWizard = { LdapWizard._save($('#'+originalObj)[0], $.trim(values)); if(originalObj === 'ldap_userfilter_objectclass' || originalObj === 'ldap_userfilter_groups') { - LdapWizard.userFilter.compose(LdapWizard.detectEmailAttribute); + LdapWizard.userFilter.compose(true); //when user filter is changed afterwards, login filter needs to //be adjusted, too if(!LdapWizard.loginFilter) { @@ -760,7 +823,7 @@ var LdapWizard = { LdapWizard.loginFilter.compose(); } else if(originalObj === 'ldap_groupfilter_objectclass' || originalObj === 'ldap_groupfilter_groups') { - LdapWizard.groupFilter.compose(); + LdapWizard.groupFilter.compose(true); } }, @@ -830,10 +893,10 @@ var LdapWizard = { LdapWizard._save({ id: modeKey }, LdapWizard.filterModeAssisted); if(isUser) { LdapWizard.blacklistRemove('ldap_userlist_filter'); - LdapWizard.userFilter.compose(LdapWizard.detectEmailAttribute); + LdapWizard.userFilter.compose(true); } else { LdapWizard.blacklistRemove('ldap_group_filter'); - LdapWizard.groupFilter.compose(); + LdapWizard.groupFilter.compose(true); } } }, diff --git a/apps/user_ldap/l10n/af_ZA.js b/apps/user_ldap/l10n/af_ZA.js index fc00b542daa..610359a094c 100644 --- a/apps/user_ldap/l10n/af_ZA.js +++ b/apps/user_ldap/l10n/af_ZA.js @@ -1,6 +1,7 @@ OC.L10N.register( "user_ldap", { + "Error" : "Fout", "_%s group found_::_%s groups found_" : ["",""], "_%s user found_::_%s users found_" : ["",""], "Help" : "Hulp", diff --git a/apps/user_ldap/l10n/af_ZA.json b/apps/user_ldap/l10n/af_ZA.json index ec83ea0849a..05463be095e 100644 --- a/apps/user_ldap/l10n/af_ZA.json +++ b/apps/user_ldap/l10n/af_ZA.json @@ -1,4 +1,5 @@ { "translations": { + "Error" : "Fout", "_%s group found_::_%s groups found_" : ["",""], "_%s user found_::_%s users found_" : ["",""], "Help" : "Hulp", diff --git a/apps/user_ldap/l10n/cs_CZ.js b/apps/user_ldap/l10n/cs_CZ.js index 2b8142bced6..f4782d57d66 100644 --- a/apps/user_ldap/l10n/cs_CZ.js +++ b/apps/user_ldap/l10n/cs_CZ.js @@ -33,6 +33,7 @@ OC.L10N.register( "Confirm Deletion" : "Potvrdit smazání", "_%s group found_::_%s groups found_" : ["nalezena %s skupina","nalezeny %s skupiny","nalezeno %s skupin"], "_%s user found_::_%s users found_" : ["nalezen %s uživatel","nalezeni %s uživatelé","nalezeno %s uživatelů"], + "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Nelze detekovat atribut pro zobrazení jména uživatele. Upřesněte ho prosím sami v rozšířeném nastavení LDAP.", "Could not find the desired feature" : "Nelze nalézt požadovanou vlastnost", "Invalid Host" : "Neplatný hostitel", "Server" : "Server", diff --git a/apps/user_ldap/l10n/cs_CZ.json b/apps/user_ldap/l10n/cs_CZ.json index 819f4e6d534..e3e51560987 100644 --- a/apps/user_ldap/l10n/cs_CZ.json +++ b/apps/user_ldap/l10n/cs_CZ.json @@ -31,6 +31,7 @@ "Confirm Deletion" : "Potvrdit smazání", "_%s group found_::_%s groups found_" : ["nalezena %s skupina","nalezeny %s skupiny","nalezeno %s skupin"], "_%s user found_::_%s users found_" : ["nalezen %s uživatel","nalezeni %s uživatelé","nalezeno %s uživatelů"], + "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Nelze detekovat atribut pro zobrazení jména uživatele. Upřesněte ho prosím sami v rozšířeném nastavení LDAP.", "Could not find the desired feature" : "Nelze nalézt požadovanou vlastnost", "Invalid Host" : "Neplatný hostitel", "Server" : "Server", diff --git a/apps/user_ldap/l10n/da.js b/apps/user_ldap/l10n/da.js index 91bce8c777e..fb6feccc4b6 100644 --- a/apps/user_ldap/l10n/da.js +++ b/apps/user_ldap/l10n/da.js @@ -33,6 +33,7 @@ OC.L10N.register( "Confirm Deletion" : "Bekræft Sletning", "_%s group found_::_%s groups found_" : ["Der blev fundet %s gruppe","Der blev fundet %s grupper"], "_%s user found_::_%s users found_" : ["Der blev fundet %s bruger","Der blev fundet %s brugere"], + "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Kunne ikke registrere navneattributten for visning af bruger. Angiv den venligst selv i de avancerede ldap-indstillinger.", "Could not find the desired feature" : "Fandt ikke den ønskede funktion", "Invalid Host" : "Ugyldig vært", "Server" : "Server", diff --git a/apps/user_ldap/l10n/da.json b/apps/user_ldap/l10n/da.json index 97d0c0ca403..0332afc101d 100644 --- a/apps/user_ldap/l10n/da.json +++ b/apps/user_ldap/l10n/da.json @@ -31,6 +31,7 @@ "Confirm Deletion" : "Bekræft Sletning", "_%s group found_::_%s groups found_" : ["Der blev fundet %s gruppe","Der blev fundet %s grupper"], "_%s user found_::_%s users found_" : ["Der blev fundet %s bruger","Der blev fundet %s brugere"], + "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Kunne ikke registrere navneattributten for visning af bruger. Angiv den venligst selv i de avancerede ldap-indstillinger.", "Could not find the desired feature" : "Fandt ikke den ønskede funktion", "Invalid Host" : "Ugyldig vært", "Server" : "Server", diff --git a/apps/user_ldap/l10n/de.js b/apps/user_ldap/l10n/de.js index 94f388b0df4..545fb9c194f 100644 --- a/apps/user_ldap/l10n/de.js +++ b/apps/user_ldap/l10n/de.js @@ -33,6 +33,7 @@ OC.L10N.register( "Confirm Deletion" : "Löschung bestätigen", "_%s group found_::_%s groups found_" : ["%s Gruppe gefunden","%s Gruppen gefunden"], "_%s user found_::_%s users found_" : ["%s Benutzer gefunden","%s Benutzer gefunden"], + "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Das Benutzeranzeigename-Attribut konnte nicht gefunden werden. Bitte gib es selber in den erweiterten LDAP-Einstellungen an.", "Could not find the desired feature" : "Konnte die gewünschte Funktion nicht finden", "Invalid Host" : "Ungültiger Host", "Server" : "Server", diff --git a/apps/user_ldap/l10n/de.json b/apps/user_ldap/l10n/de.json index f3524664fc1..df0f777536a 100644 --- a/apps/user_ldap/l10n/de.json +++ b/apps/user_ldap/l10n/de.json @@ -31,6 +31,7 @@ "Confirm Deletion" : "Löschung bestätigen", "_%s group found_::_%s groups found_" : ["%s Gruppe gefunden","%s Gruppen gefunden"], "_%s user found_::_%s users found_" : ["%s Benutzer gefunden","%s Benutzer gefunden"], + "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Das Benutzeranzeigename-Attribut konnte nicht gefunden werden. Bitte gib es selber in den erweiterten LDAP-Einstellungen an.", "Could not find the desired feature" : "Konnte die gewünschte Funktion nicht finden", "Invalid Host" : "Ungültiger Host", "Server" : "Server", diff --git a/apps/user_ldap/l10n/de_DE.js b/apps/user_ldap/l10n/de_DE.js index 3cefc2ec625..c89d7793a4a 100644 --- a/apps/user_ldap/l10n/de_DE.js +++ b/apps/user_ldap/l10n/de_DE.js @@ -33,6 +33,7 @@ OC.L10N.register( "Confirm Deletion" : "Löschung bestätigen", "_%s group found_::_%s groups found_" : ["%s Gruppe gefunden","%s Gruppen gefunden"], "_%s user found_::_%s users found_" : ["%s Benutzer gefunden","%s Benutzer gefunden"], + "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Das Benutzeranzeigename-Attribut konnte nicht gefunden werden. Bitte geben Sie es selber in den erweiterten LDAP-Einstellungen an.", "Could not find the desired feature" : "Konnte die gewünschte Funktion nicht finden", "Invalid Host" : "Ungültiger Host", "Server" : "Server", diff --git a/apps/user_ldap/l10n/de_DE.json b/apps/user_ldap/l10n/de_DE.json index cf823ca29d4..7b047cbcd2f 100644 --- a/apps/user_ldap/l10n/de_DE.json +++ b/apps/user_ldap/l10n/de_DE.json @@ -31,6 +31,7 @@ "Confirm Deletion" : "Löschung bestätigen", "_%s group found_::_%s groups found_" : ["%s Gruppe gefunden","%s Gruppen gefunden"], "_%s user found_::_%s users found_" : ["%s Benutzer gefunden","%s Benutzer gefunden"], + "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Das Benutzeranzeigename-Attribut konnte nicht gefunden werden. Bitte geben Sie es selber in den erweiterten LDAP-Einstellungen an.", "Could not find the desired feature" : "Konnte die gewünschte Funktion nicht finden", "Invalid Host" : "Ungültiger Host", "Server" : "Server", diff --git a/apps/user_ldap/l10n/en_GB.js b/apps/user_ldap/l10n/en_GB.js index d87ce836807..9476b44dde0 100644 --- a/apps/user_ldap/l10n/en_GB.js +++ b/apps/user_ldap/l10n/en_GB.js @@ -33,6 +33,7 @@ OC.L10N.register( "Confirm Deletion" : "Confirm Deletion", "_%s group found_::_%s groups found_" : ["%s group found","%s groups found"], "_%s user found_::_%s users found_" : ["%s user found","%s users found"], + "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings.", "Could not find the desired feature" : "Could not find the desired feature", "Invalid Host" : "Invalid Host", "Server" : "Server", diff --git a/apps/user_ldap/l10n/en_GB.json b/apps/user_ldap/l10n/en_GB.json index 8fd6ed30d4f..fd6861a5184 100644 --- a/apps/user_ldap/l10n/en_GB.json +++ b/apps/user_ldap/l10n/en_GB.json @@ -31,6 +31,7 @@ "Confirm Deletion" : "Confirm Deletion", "_%s group found_::_%s groups found_" : ["%s group found","%s groups found"], "_%s user found_::_%s users found_" : ["%s user found","%s users found"], + "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings.", "Could not find the desired feature" : "Could not find the desired feature", "Invalid Host" : "Invalid Host", "Server" : "Server", diff --git a/apps/user_ldap/l10n/es.js b/apps/user_ldap/l10n/es.js index 172d32c9092..3ad81e2aa76 100644 --- a/apps/user_ldap/l10n/es.js +++ b/apps/user_ldap/l10n/es.js @@ -33,6 +33,7 @@ OC.L10N.register( "Confirm Deletion" : "Confirmar eliminación", "_%s group found_::_%s groups found_" : ["Grupo %s encontrado","Grupos %s encontrados"], "_%s user found_::_%s users found_" : ["Usuario %s encontrado","Usuarios %s encontrados"], + "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "No se pudo detectar el atributo de nombre de usuario pantalla. Por favor especifique lo mismo en ajustes avanzados ldap.", "Could not find the desired feature" : "No se puede encontrar la función deseada.", "Invalid Host" : "Host inválido", "Server" : "Servidor", diff --git a/apps/user_ldap/l10n/es.json b/apps/user_ldap/l10n/es.json index b0308c4cbaf..f76ab313190 100644 --- a/apps/user_ldap/l10n/es.json +++ b/apps/user_ldap/l10n/es.json @@ -31,6 +31,7 @@ "Confirm Deletion" : "Confirmar eliminación", "_%s group found_::_%s groups found_" : ["Grupo %s encontrado","Grupos %s encontrados"], "_%s user found_::_%s users found_" : ["Usuario %s encontrado","Usuarios %s encontrados"], + "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "No se pudo detectar el atributo de nombre de usuario pantalla. Por favor especifique lo mismo en ajustes avanzados ldap.", "Could not find the desired feature" : "No se puede encontrar la función deseada.", "Invalid Host" : "Host inválido", "Server" : "Servidor", diff --git a/apps/user_ldap/l10n/fr.js b/apps/user_ldap/l10n/fr.js index 3736ade73ce..3aeaaf0bb5c 100644 --- a/apps/user_ldap/l10n/fr.js +++ b/apps/user_ldap/l10n/fr.js @@ -33,6 +33,7 @@ OC.L10N.register( "Confirm Deletion" : "Confirmer la suppression", "_%s group found_::_%s groups found_" : ["%s groupe trouvé","%s groupes trouvés"], "_%s user found_::_%s users found_" : ["%s utilisateur trouvé","%s utilisateurs trouvés"], + "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Impossible de détecter l'attribut contenant le nom d'affichage des utilisateurs. Veuillez l'indiquer vous-même dans les paramètres ldap avancés.", "Could not find the desired feature" : "Impossible de trouver la fonction souhaitée", "Invalid Host" : "Hôte invalide", "Server" : "Serveur", @@ -96,13 +97,13 @@ OC.L10N.register( "in seconds. A change empties the cache." : "en secondes. Tout changement vide le cache.", "Directory Settings" : "Paramètres du répertoire", "User Display Name Field" : "Champ \"nom d'affichage\" de l'utilisateur", - "The LDAP attribute to use to generate the user's display name." : "L'attribut LDAP utilisé pour générer le nom d'utilisateur affiché.", + "The LDAP attribute to use to generate the user's display name." : "L'attribut LDAP utilisé pour générer le nom d'affichage de l'utilisateur.", "Base User Tree" : "DN racine de l'arbre utilisateurs", "One User Base DN per line" : "Un DN racine utilisateur par ligne", "User Search Attributes" : "Recherche des attributs utilisateur", "Optional; one attribute per line" : "Optionnel, un attribut par ligne", "Group Display Name Field" : "Champ \"nom d'affichage\" du groupe", - "The LDAP attribute to use to generate the groups's display name." : "L'attribut LDAP utilisé pour générer le nom de groupe affiché.", + "The LDAP attribute to use to generate the groups's display name." : "L'attribut LDAP utilisé pour générer le nom d'affichage du groupe.", "Base Group Tree" : "DN racine de l'arbre groupes", "One Group Base DN per line" : "Un DN racine groupe par ligne", "Group Search Attributes" : "Recherche des attributs du groupe", @@ -119,7 +120,7 @@ OC.L10N.register( "User Home Folder Naming Rule" : "Convention de nommage du répertoire utilisateur", "Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." : "Laisser vide ", "Internal Username" : "Nom d'utilisateur interne", - "By default the internal username will be created from the UUID attribute. It makes sure that the username is unique and characters do not need to be converted. The internal username has the restriction that only these characters are allowed: [ a-zA-Z0-9_.@- ]. Other characters are replaced with their ASCII correspondence or simply omitted. On collisions a number will be added/increased. The internal username is used to identify a user internally. It is also the default name for the user home folder. It is also a part of remote URLs, for instance for all *DAV services. With this setting, the default behavior can be overridden. To achieve a similar behavior as before ownCloud 5 enter the user display name attribute in the following field. Leave it empty for default behavior. Changes will have effect only on newly mapped (added) LDAP users." : "Par défaut le nom d'utilisateur interne sera créé à partir de l'attribut UUID. Ceci permet d'assurer que le nom d'utilisateur est unique et que les caractères ne nécessitent pas de conversion. Le nom d'utilisateur interne doit contenir uniquement les caractères suivants : [ a-zA-Z0-9_.@- ]. Les autres caractères sont remplacés par leur correspondance ASCII ou simplement omis. En cas de collision, un nombre est incrémenté/décrémenté. Le nom d'utilisateur interne est utilisé pour identifier l'utilisateur au sein du système. C'est aussi le nom par défaut du répertoire utilisateur dans ownCloud. C'est aussi le port d'URLs distants, par exemple pour tous les services *DAV. Le comportement par défaut peut être modifié à l'aide de ce paramètre. Pour obtenir un comportement similaire aux versions précédentes à ownCloud 5, saisir le nom d'utilisateur à afficher dans le champ suivant. Laissez à blanc pour le comportement par défaut. Les modifications prendront effet seulement pour les nouveaux (ajoutés) utilisateurs LDAP.", + "By default the internal username will be created from the UUID attribute. It makes sure that the username is unique and characters do not need to be converted. The internal username has the restriction that only these characters are allowed: [ a-zA-Z0-9_.@- ]. Other characters are replaced with their ASCII correspondence or simply omitted. On collisions a number will be added/increased. The internal username is used to identify a user internally. It is also the default name for the user home folder. It is also a part of remote URLs, for instance for all *DAV services. With this setting, the default behavior can be overridden. To achieve a similar behavior as before ownCloud 5 enter the user display name attribute in the following field. Leave it empty for default behavior. Changes will have effect only on newly mapped (added) LDAP users." : "Par défaut le nom d'utilisateur interne sera créé à partir de l'attribut UUID. Ceci permet d'assurer que le nom d'utilisateur est unique et que les caractères ne nécessitent pas de conversion. Le nom d'utilisateur interne doit contenir uniquement les caractères suivants : [ a-zA-Z0-9_.@- ]. Les autres caractères sont remplacés par leur correspondance ASCII ou simplement omis. En cas de collision, un nombre est ajouté/incrémenté. Le nom d'utilisateur interne est utilisé pour identifier l'utilisateur au sein du système. C'est aussi le nom par défaut du répertoire utilisateur dans ownCloud. Il fait aussi partie de certains URL de services, par exemple pour tous les services *DAV. Le comportement par défaut peut être modifié à l'aide de ce paramètre. Pour obtenir un comportement similaire aux versions précédentes à ownCloud 5, saisir le nom d'utilisateur à afficher dans le champ suivant. Laissez à blanc pour le comportement par défaut. Les modifications prendront effet seulement pour les nouveaux (ajoutés) utilisateurs LDAP.", "Internal Username Attribute:" : "Nom d'utilisateur interne :", "Override UUID detection" : "Surcharger la détection d'UUID", "By default, the UUID attribute is automatically detected. The UUID attribute is used to doubtlessly identify LDAP users and groups. Also, the internal username will be created based on the UUID, if not specified otherwise above. You can override the setting and pass an attribute of your choice. You must make sure that the attribute of your choice can be fetched for both users and groups and it is unique. Leave it empty for default behavior. Changes will have effect only on newly mapped (added) LDAP users and groups." : "Par défaut, l'attribut UUID est automatiquement détecté. Cet attribut est utilisé pour identifier les utilisateurs et groupes de façon fiable. Un nom d'utilisateur interne basé sur l'UUID sera automatiquement créé, sauf s'il est spécifié autrement ci-dessus. Vous pouvez modifier ce comportement et définir l'attribut de votre choix. Vous devez alors vous assurer que l'attribut de votre choix peut être récupéré pour les utilisateurs ainsi que pour les groupes et qu'il soit unique. Laisser à blanc pour le comportement par défaut. Les modifications seront effectives uniquement pour les nouveaux (ajoutés) utilisateurs et groupes LDAP.", diff --git a/apps/user_ldap/l10n/fr.json b/apps/user_ldap/l10n/fr.json index 58ac6f3d248..31d56f28b40 100644 --- a/apps/user_ldap/l10n/fr.json +++ b/apps/user_ldap/l10n/fr.json @@ -31,6 +31,7 @@ "Confirm Deletion" : "Confirmer la suppression", "_%s group found_::_%s groups found_" : ["%s groupe trouvé","%s groupes trouvés"], "_%s user found_::_%s users found_" : ["%s utilisateur trouvé","%s utilisateurs trouvés"], + "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Impossible de détecter l'attribut contenant le nom d'affichage des utilisateurs. Veuillez l'indiquer vous-même dans les paramètres ldap avancés.", "Could not find the desired feature" : "Impossible de trouver la fonction souhaitée", "Invalid Host" : "Hôte invalide", "Server" : "Serveur", @@ -94,13 +95,13 @@ "in seconds. A change empties the cache." : "en secondes. Tout changement vide le cache.", "Directory Settings" : "Paramètres du répertoire", "User Display Name Field" : "Champ \"nom d'affichage\" de l'utilisateur", - "The LDAP attribute to use to generate the user's display name." : "L'attribut LDAP utilisé pour générer le nom d'utilisateur affiché.", + "The LDAP attribute to use to generate the user's display name." : "L'attribut LDAP utilisé pour générer le nom d'affichage de l'utilisateur.", "Base User Tree" : "DN racine de l'arbre utilisateurs", "One User Base DN per line" : "Un DN racine utilisateur par ligne", "User Search Attributes" : "Recherche des attributs utilisateur", "Optional; one attribute per line" : "Optionnel, un attribut par ligne", "Group Display Name Field" : "Champ \"nom d'affichage\" du groupe", - "The LDAP attribute to use to generate the groups's display name." : "L'attribut LDAP utilisé pour générer le nom de groupe affiché.", + "The LDAP attribute to use to generate the groups's display name." : "L'attribut LDAP utilisé pour générer le nom d'affichage du groupe.", "Base Group Tree" : "DN racine de l'arbre groupes", "One Group Base DN per line" : "Un DN racine groupe par ligne", "Group Search Attributes" : "Recherche des attributs du groupe", @@ -117,7 +118,7 @@ "User Home Folder Naming Rule" : "Convention de nommage du répertoire utilisateur", "Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." : "Laisser vide ", "Internal Username" : "Nom d'utilisateur interne", - "By default the internal username will be created from the UUID attribute. It makes sure that the username is unique and characters do not need to be converted. The internal username has the restriction that only these characters are allowed: [ a-zA-Z0-9_.@- ]. Other characters are replaced with their ASCII correspondence or simply omitted. On collisions a number will be added/increased. The internal username is used to identify a user internally. It is also the default name for the user home folder. It is also a part of remote URLs, for instance for all *DAV services. With this setting, the default behavior can be overridden. To achieve a similar behavior as before ownCloud 5 enter the user display name attribute in the following field. Leave it empty for default behavior. Changes will have effect only on newly mapped (added) LDAP users." : "Par défaut le nom d'utilisateur interne sera créé à partir de l'attribut UUID. Ceci permet d'assurer que le nom d'utilisateur est unique et que les caractères ne nécessitent pas de conversion. Le nom d'utilisateur interne doit contenir uniquement les caractères suivants : [ a-zA-Z0-9_.@- ]. Les autres caractères sont remplacés par leur correspondance ASCII ou simplement omis. En cas de collision, un nombre est incrémenté/décrémenté. Le nom d'utilisateur interne est utilisé pour identifier l'utilisateur au sein du système. C'est aussi le nom par défaut du répertoire utilisateur dans ownCloud. C'est aussi le port d'URLs distants, par exemple pour tous les services *DAV. Le comportement par défaut peut être modifié à l'aide de ce paramètre. Pour obtenir un comportement similaire aux versions précédentes à ownCloud 5, saisir le nom d'utilisateur à afficher dans le champ suivant. Laissez à blanc pour le comportement par défaut. Les modifications prendront effet seulement pour les nouveaux (ajoutés) utilisateurs LDAP.", + "By default the internal username will be created from the UUID attribute. It makes sure that the username is unique and characters do not need to be converted. The internal username has the restriction that only these characters are allowed: [ a-zA-Z0-9_.@- ]. Other characters are replaced with their ASCII correspondence or simply omitted. On collisions a number will be added/increased. The internal username is used to identify a user internally. It is also the default name for the user home folder. It is also a part of remote URLs, for instance for all *DAV services. With this setting, the default behavior can be overridden. To achieve a similar behavior as before ownCloud 5 enter the user display name attribute in the following field. Leave it empty for default behavior. Changes will have effect only on newly mapped (added) LDAP users." : "Par défaut le nom d'utilisateur interne sera créé à partir de l'attribut UUID. Ceci permet d'assurer que le nom d'utilisateur est unique et que les caractères ne nécessitent pas de conversion. Le nom d'utilisateur interne doit contenir uniquement les caractères suivants : [ a-zA-Z0-9_.@- ]. Les autres caractères sont remplacés par leur correspondance ASCII ou simplement omis. En cas de collision, un nombre est ajouté/incrémenté. Le nom d'utilisateur interne est utilisé pour identifier l'utilisateur au sein du système. C'est aussi le nom par défaut du répertoire utilisateur dans ownCloud. Il fait aussi partie de certains URL de services, par exemple pour tous les services *DAV. Le comportement par défaut peut être modifié à l'aide de ce paramètre. Pour obtenir un comportement similaire aux versions précédentes à ownCloud 5, saisir le nom d'utilisateur à afficher dans le champ suivant. Laissez à blanc pour le comportement par défaut. Les modifications prendront effet seulement pour les nouveaux (ajoutés) utilisateurs LDAP.", "Internal Username Attribute:" : "Nom d'utilisateur interne :", "Override UUID detection" : "Surcharger la détection d'UUID", "By default, the UUID attribute is automatically detected. The UUID attribute is used to doubtlessly identify LDAP users and groups. Also, the internal username will be created based on the UUID, if not specified otherwise above. You can override the setting and pass an attribute of your choice. You must make sure that the attribute of your choice can be fetched for both users and groups and it is unique. Leave it empty for default behavior. Changes will have effect only on newly mapped (added) LDAP users and groups." : "Par défaut, l'attribut UUID est automatiquement détecté. Cet attribut est utilisé pour identifier les utilisateurs et groupes de façon fiable. Un nom d'utilisateur interne basé sur l'UUID sera automatiquement créé, sauf s'il est spécifié autrement ci-dessus. Vous pouvez modifier ce comportement et définir l'attribut de votre choix. Vous devez alors vous assurer que l'attribut de votre choix peut être récupéré pour les utilisateurs ainsi que pour les groupes et qu'il soit unique. Laisser à blanc pour le comportement par défaut. Les modifications seront effectives uniquement pour les nouveaux (ajoutés) utilisateurs et groupes LDAP.", diff --git a/apps/user_ldap/l10n/gl.js b/apps/user_ldap/l10n/gl.js index ef75c8df65c..a2359d41ebc 100644 --- a/apps/user_ldap/l10n/gl.js +++ b/apps/user_ldap/l10n/gl.js @@ -33,6 +33,7 @@ OC.L10N.register( "Confirm Deletion" : "Confirmar a eliminación", "_%s group found_::_%s groups found_" : ["Atopouse %s grupo","Atopáronse %s grupos"], "_%s user found_::_%s users found_" : ["Atopouse %s usuario","Atopáronse %s usuarios"], + "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Non foi posíbel detectar o atributo nome de usuario que mostrar. Especifiqueo vostede mesmo nos axustes avanzados de LDAP.", "Could not find the desired feature" : "Non foi posíbel atopar a función desexada", "Invalid Host" : "Máquina incorrecta", "Server" : "Servidor", @@ -48,6 +49,7 @@ OC.L10N.register( "Edit raw filter instead" : "Editar, no seu canto, o filtro en bruto", "Raw LDAP filter" : "Filtro LDAP en bruto", "The filter specifies which LDAP groups shall have access to the %s instance." : "O filtro especifica que grupos LDAP teñen acceso á instancia %s.", + "Test Filter" : "Filtro de probas", "groups found" : "atopáronse grupos", "Users login with this attribute:" : "Os usuarios inician sesión con este atributo:", "LDAP Username:" : "Nome de usuario LDAP:", @@ -67,11 +69,15 @@ OC.L10N.register( "For anonymous access, leave DN and Password empty." : "Para o acceso anónimo deixe o DN e o contrasinal baleiros.", "One Base DN per line" : "Un DN base por liña", "You can specify Base DN for users and groups in the Advanced tab" : "Pode especificar a DN base para usuarios e grupos na lapela de «Avanzado»", + "Avoids automatic LDAP requests. Better for bigger setups, but requires some LDAP knowledge." : "Evita as peticións LDAP automáticas. E o mellor para as configuracións máis grandes, mais require algúns coñecementos de LDAP.", + "Manually enter LDAP filters (recommended for large directories)" : "Introduza manualmente os filtros LDAP (recomendado para directorios grandes)", "Limit %s access to users meeting these criteria:" : "Limitar o acceso a %s para os usuarios que cumpren con estes criterios:", "The filter specifies which LDAP users shall have access to the %s instance." : "O filtro especifica que usuarios LDAP teñen acceso á instancia %s.", "users found" : "atopáronse usuarios", + "Saving" : "Gardando", "Back" : "Atrás", "Continue" : "Continuar", + "LDAP" : "LDAP", "Expert" : "Experto", "Advanced" : "Avanzado", "<b>Warning:</b> Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behavior. Please ask your system administrator to disable one of them." : "<b>Aviso:</b> As aplicacións user_ldap e user_webdavauth son incompatíbeis. Pode acontecer un comportamento estraño. Consulte co administrador do sistema para desactivar unha delas.", diff --git a/apps/user_ldap/l10n/gl.json b/apps/user_ldap/l10n/gl.json index 99b0807ef54..0f6d4e00cdf 100644 --- a/apps/user_ldap/l10n/gl.json +++ b/apps/user_ldap/l10n/gl.json @@ -31,6 +31,7 @@ "Confirm Deletion" : "Confirmar a eliminación", "_%s group found_::_%s groups found_" : ["Atopouse %s grupo","Atopáronse %s grupos"], "_%s user found_::_%s users found_" : ["Atopouse %s usuario","Atopáronse %s usuarios"], + "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Non foi posíbel detectar o atributo nome de usuario que mostrar. Especifiqueo vostede mesmo nos axustes avanzados de LDAP.", "Could not find the desired feature" : "Non foi posíbel atopar a función desexada", "Invalid Host" : "Máquina incorrecta", "Server" : "Servidor", @@ -46,6 +47,7 @@ "Edit raw filter instead" : "Editar, no seu canto, o filtro en bruto", "Raw LDAP filter" : "Filtro LDAP en bruto", "The filter specifies which LDAP groups shall have access to the %s instance." : "O filtro especifica que grupos LDAP teñen acceso á instancia %s.", + "Test Filter" : "Filtro de probas", "groups found" : "atopáronse grupos", "Users login with this attribute:" : "Os usuarios inician sesión con este atributo:", "LDAP Username:" : "Nome de usuario LDAP:", @@ -65,11 +67,15 @@ "For anonymous access, leave DN and Password empty." : "Para o acceso anónimo deixe o DN e o contrasinal baleiros.", "One Base DN per line" : "Un DN base por liña", "You can specify Base DN for users and groups in the Advanced tab" : "Pode especificar a DN base para usuarios e grupos na lapela de «Avanzado»", + "Avoids automatic LDAP requests. Better for bigger setups, but requires some LDAP knowledge." : "Evita as peticións LDAP automáticas. E o mellor para as configuracións máis grandes, mais require algúns coñecementos de LDAP.", + "Manually enter LDAP filters (recommended for large directories)" : "Introduza manualmente os filtros LDAP (recomendado para directorios grandes)", "Limit %s access to users meeting these criteria:" : "Limitar o acceso a %s para os usuarios que cumpren con estes criterios:", "The filter specifies which LDAP users shall have access to the %s instance." : "O filtro especifica que usuarios LDAP teñen acceso á instancia %s.", "users found" : "atopáronse usuarios", + "Saving" : "Gardando", "Back" : "Atrás", "Continue" : "Continuar", + "LDAP" : "LDAP", "Expert" : "Experto", "Advanced" : "Avanzado", "<b>Warning:</b> Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behavior. Please ask your system administrator to disable one of them." : "<b>Aviso:</b> As aplicacións user_ldap e user_webdavauth son incompatíbeis. Pode acontecer un comportamento estraño. Consulte co administrador do sistema para desactivar unha delas.", diff --git a/apps/user_ldap/l10n/it.js b/apps/user_ldap/l10n/it.js index d7a4e192ec6..30b9a39f0ea 100644 --- a/apps/user_ldap/l10n/it.js +++ b/apps/user_ldap/l10n/it.js @@ -33,6 +33,7 @@ OC.L10N.register( "Confirm Deletion" : "Conferma l'eliminazione", "_%s group found_::_%s groups found_" : ["%s gruppo trovato","%s gruppi trovati"], "_%s user found_::_%s users found_" : ["%s utente trovato","%s utenti trovati"], + "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Impossibile rilevare l'attributo nome visualizzato dell'utente. Specificalo nelle impostazioni avanzate di ldap.", "Could not find the desired feature" : "Impossibile trovare la funzionalità desiderata", "Invalid Host" : "Host non valido", "Server" : "Server", diff --git a/apps/user_ldap/l10n/it.json b/apps/user_ldap/l10n/it.json index 44a529bc0c5..58b405730a4 100644 --- a/apps/user_ldap/l10n/it.json +++ b/apps/user_ldap/l10n/it.json @@ -31,6 +31,7 @@ "Confirm Deletion" : "Conferma l'eliminazione", "_%s group found_::_%s groups found_" : ["%s gruppo trovato","%s gruppi trovati"], "_%s user found_::_%s users found_" : ["%s utente trovato","%s utenti trovati"], + "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Impossibile rilevare l'attributo nome visualizzato dell'utente. Specificalo nelle impostazioni avanzate di ldap.", "Could not find the desired feature" : "Impossibile trovare la funzionalità desiderata", "Invalid Host" : "Host non valido", "Server" : "Server", diff --git a/apps/user_ldap/l10n/ja.js b/apps/user_ldap/l10n/ja.js index 6494fbb5142..b139c5b3fb4 100644 --- a/apps/user_ldap/l10n/ja.js +++ b/apps/user_ldap/l10n/ja.js @@ -33,6 +33,7 @@ OC.L10N.register( "Confirm Deletion" : "削除の確認", "_%s group found_::_%s groups found_" : ["%s グループが見つかりました"], "_%s user found_::_%s users found_" : ["%s ユーザーが見つかりました"], + "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "ユーザー表示名の属性を検出できませんでした。詳細設定で対応する属性を指定してください。", "Could not find the desired feature" : "望ましい機能は見つかりませんでした", "Invalid Host" : "無効なホスト", "Server" : "サーバー", diff --git a/apps/user_ldap/l10n/ja.json b/apps/user_ldap/l10n/ja.json index 2e714112f19..25ad7f73bd8 100644 --- a/apps/user_ldap/l10n/ja.json +++ b/apps/user_ldap/l10n/ja.json @@ -31,6 +31,7 @@ "Confirm Deletion" : "削除の確認", "_%s group found_::_%s groups found_" : ["%s グループが見つかりました"], "_%s user found_::_%s users found_" : ["%s ユーザーが見つかりました"], + "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "ユーザー表示名の属性を検出できませんでした。詳細設定で対応する属性を指定してください。", "Could not find the desired feature" : "望ましい機能は見つかりませんでした", "Invalid Host" : "無効なホスト", "Server" : "サーバー", diff --git a/apps/user_ldap/l10n/nl.js b/apps/user_ldap/l10n/nl.js index e448b161f00..ae280e1a05e 100644 --- a/apps/user_ldap/l10n/nl.js +++ b/apps/user_ldap/l10n/nl.js @@ -33,6 +33,7 @@ OC.L10N.register( "Confirm Deletion" : "Bevestig verwijderen", "_%s group found_::_%s groups found_" : ["%s groep gevonden","%s groepen gevonden"], "_%s user found_::_%s users found_" : ["%s gebruiker gevonden","%s gebruikers gevonden"], + "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Kon het weergavenaam attribuut van de gebruiker niet vinden. Geef het zelf op in de geavanceerde ldap instellingen.", "Could not find the desired feature" : "Kon de gewenste functie niet vinden", "Invalid Host" : "Ongeldige server", "Server" : "Server", diff --git a/apps/user_ldap/l10n/nl.json b/apps/user_ldap/l10n/nl.json index eb1eecf8201..ed0ce08501a 100644 --- a/apps/user_ldap/l10n/nl.json +++ b/apps/user_ldap/l10n/nl.json @@ -31,6 +31,7 @@ "Confirm Deletion" : "Bevestig verwijderen", "_%s group found_::_%s groups found_" : ["%s groep gevonden","%s groepen gevonden"], "_%s user found_::_%s users found_" : ["%s gebruiker gevonden","%s gebruikers gevonden"], + "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Kon het weergavenaam attribuut van de gebruiker niet vinden. Geef het zelf op in de geavanceerde ldap instellingen.", "Could not find the desired feature" : "Kon de gewenste functie niet vinden", "Invalid Host" : "Ongeldige server", "Server" : "Server", diff --git a/apps/user_ldap/l10n/pt_BR.js b/apps/user_ldap/l10n/pt_BR.js index 32b7697df3e..a4a481524ba 100644 --- a/apps/user_ldap/l10n/pt_BR.js +++ b/apps/user_ldap/l10n/pt_BR.js @@ -33,6 +33,7 @@ OC.L10N.register( "Confirm Deletion" : "Confirmar Exclusão", "_%s group found_::_%s groups found_" : ["grupo% s encontrado","grupos% s encontrado"], "_%s user found_::_%s users found_" : ["usuário %s encontrado","usuários %s encontrados"], + "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Não foi possível detectar o nome de exibição do atributo do usuário. Por favor, indique-o você mesmo em configurações avançadas do LDAP.", "Could not find the desired feature" : "Não foi possível encontrar a função desejada", "Invalid Host" : "Host Inválido", "Server" : "Servidor", diff --git a/apps/user_ldap/l10n/pt_BR.json b/apps/user_ldap/l10n/pt_BR.json index ea59ed7b4d8..4dd9088b727 100644 --- a/apps/user_ldap/l10n/pt_BR.json +++ b/apps/user_ldap/l10n/pt_BR.json @@ -31,6 +31,7 @@ "Confirm Deletion" : "Confirmar Exclusão", "_%s group found_::_%s groups found_" : ["grupo% s encontrado","grupos% s encontrado"], "_%s user found_::_%s users found_" : ["usuário %s encontrado","usuários %s encontrados"], + "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Não foi possível detectar o nome de exibição do atributo do usuário. Por favor, indique-o você mesmo em configurações avançadas do LDAP.", "Could not find the desired feature" : "Não foi possível encontrar a função desejada", "Invalid Host" : "Host Inválido", "Server" : "Servidor", diff --git a/apps/user_ldap/l10n/sl.js b/apps/user_ldap/l10n/sl.js index 1437afcf5ba..04ea48e11ec 100644 --- a/apps/user_ldap/l10n/sl.js +++ b/apps/user_ldap/l10n/sl.js @@ -33,6 +33,7 @@ OC.L10N.register( "Confirm Deletion" : "Potrdi brisanje", "_%s group found_::_%s groups found_" : ["%s najdena skupina","%s najdeni skupini","%s najdene skupine","%s najdenih skupin"], "_%s user found_::_%s users found_" : ["%s najden uporabnik","%s najdena uporabnika","%s najdeni uporabniki","%s najdenih uporabnikov"], + "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Ni mogoče prebrati atributa prikaznega imena. Določiti ga je treba ročno med nastavitvami LDAP.", "Could not find the desired feature" : "Želene zmožnosti ni mogoče najti", "Invalid Host" : "Neveljaven gostitelj", "Server" : "Strežnik", diff --git a/apps/user_ldap/l10n/sl.json b/apps/user_ldap/l10n/sl.json index 56bf65210c3..ef7bdd1ce32 100644 --- a/apps/user_ldap/l10n/sl.json +++ b/apps/user_ldap/l10n/sl.json @@ -31,6 +31,7 @@ "Confirm Deletion" : "Potrdi brisanje", "_%s group found_::_%s groups found_" : ["%s najdena skupina","%s najdeni skupini","%s najdene skupine","%s najdenih skupin"], "_%s user found_::_%s users found_" : ["%s najden uporabnik","%s najdena uporabnika","%s najdeni uporabniki","%s najdenih uporabnikov"], + "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Ni mogoče prebrati atributa prikaznega imena. Določiti ga je treba ročno med nastavitvami LDAP.", "Could not find the desired feature" : "Želene zmožnosti ni mogoče najti", "Invalid Host" : "Neveljaven gostitelj", "Server" : "Strežnik", diff --git a/apps/user_ldap/l10n/sq.js b/apps/user_ldap/l10n/sq.js index 056458c24b6..b436bef7bf2 100644 --- a/apps/user_ldap/l10n/sq.js +++ b/apps/user_ldap/l10n/sq.js @@ -32,6 +32,7 @@ OC.L10N.register( "For anonymous access, leave DN and Password empty." : "Për tu lidhur në mënyre anonime, lini bosh hapsirat e DN dhe fjalëkalim", "One Base DN per line" : "Një baze DN për rrjesht", "You can specify Base DN for users and groups in the Advanced tab" : "Ju mund të specifikoni Bazen DN për përdorues dhe grupe në butonin 'Të Përparuara'", + "Continue" : "Vazhdo", "Advanced" : "E përparuar", "<b>Warning:</b> The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." : "<b>Njoftim:</b> moduli PHP LDAP nuk është instaluar, motori nuk do të funksionojë.Kontaktoni me administratorin e sistemit.", "Connection Settings" : "Të dhënat e lidhjes", diff --git a/apps/user_ldap/l10n/sq.json b/apps/user_ldap/l10n/sq.json index a3e87869355..5b81af7100d 100644 --- a/apps/user_ldap/l10n/sq.json +++ b/apps/user_ldap/l10n/sq.json @@ -30,6 +30,7 @@ "For anonymous access, leave DN and Password empty." : "Për tu lidhur në mënyre anonime, lini bosh hapsirat e DN dhe fjalëkalim", "One Base DN per line" : "Një baze DN për rrjesht", "You can specify Base DN for users and groups in the Advanced tab" : "Ju mund të specifikoni Bazen DN për përdorues dhe grupe në butonin 'Të Përparuara'", + "Continue" : "Vazhdo", "Advanced" : "E përparuar", "<b>Warning:</b> The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." : "<b>Njoftim:</b> moduli PHP LDAP nuk është instaluar, motori nuk do të funksionojë.Kontaktoni me administratorin e sistemit.", "Connection Settings" : "Të dhënat e lidhjes", diff --git a/apps/user_ldap/l10n/tr.js b/apps/user_ldap/l10n/tr.js index 75f3678fdd9..a4c308e5354 100644 --- a/apps/user_ldap/l10n/tr.js +++ b/apps/user_ldap/l10n/tr.js @@ -33,6 +33,7 @@ OC.L10N.register( "Confirm Deletion" : "Silmeyi onayla", "_%s group found_::_%s groups found_" : ["%s grup bulundu","%s grup bulundu"], "_%s user found_::_%s users found_" : ["%s kullanıcı bulundu","%s kullanıcı bulundu"], + "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Görüntülenecek kullanıcı adı özelliği algılanamadı. Lütfen gelişmiş ldap ayarlarına girerek kendiniz belirleyin.", "Could not find the desired feature" : "İstenen özellik bulunamadı", "Invalid Host" : "Geçersiz Makine", "Server" : "Sunucu", diff --git a/apps/user_ldap/l10n/tr.json b/apps/user_ldap/l10n/tr.json index 9b6f3a37ade..dbd4a9b7406 100644 --- a/apps/user_ldap/l10n/tr.json +++ b/apps/user_ldap/l10n/tr.json @@ -31,6 +31,7 @@ "Confirm Deletion" : "Silmeyi onayla", "_%s group found_::_%s groups found_" : ["%s grup bulundu","%s grup bulundu"], "_%s user found_::_%s users found_" : ["%s kullanıcı bulundu","%s kullanıcı bulundu"], + "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Görüntülenecek kullanıcı adı özelliği algılanamadı. Lütfen gelişmiş ldap ayarlarına girerek kendiniz belirleyin.", "Could not find the desired feature" : "İstenen özellik bulunamadı", "Invalid Host" : "Geçersiz Makine", "Server" : "Sunucu", diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php index d89029abf17..5a4d324fba2 100644 --- a/apps/user_ldap/lib/access.php +++ b/apps/user_ldap/lib/access.php @@ -403,6 +403,8 @@ class Access extends LDAPUtility implements user\IUserTools { //a new user/group! Add it only if it doesn't conflict with other backend's users or existing groups //disabling Cache is required to avoid that the new user is cached as not-existing in fooExists check + //NOTE: mind, disabling cache affects only this instance! Using it + // outside of core user management will still cache the user as non-existing. $originalTTL = $this->connection->ldapCacheTTL; $this->connection->setConfiguration(array('ldapCacheTTL' => 0)); if(($isUser && !\OCP\User::userExists($intName)) @@ -507,6 +509,7 @@ class Access extends LDAPUtility implements user\IUserTools { if($isUsers) { //cache the user names so it does not need to be retrieved //again later (e.g. sharing dialogue). + $this->cacheUserExists($ocName); $this->cacheUserDisplayName($ocName, $nameByLDAP); } } @@ -516,6 +519,14 @@ class Access extends LDAPUtility implements user\IUserTools { } /** + * caches a user as existing + * @param string $ocName the internal ownCloud username + */ + public function cacheUserExists($ocName) { + $this->connection->writeToCache('userExists'.$ocName, true); + } + + /** * caches the user display name * @param string $ocName the internal ownCloud username * @param string $displayName the display name @@ -813,7 +824,7 @@ class Access extends LDAPUtility implements user\IUserTools { } //check whether paged search should be attempted - $pagedSearchOK = $this->initPagedSearch($filter, $base, $attr, $limit, $offset); + $pagedSearchOK = $this->initPagedSearch($filter, $base, $attr, intval($limit), $offset); $linkResources = array_pad(array(), count($base), $cr); $sr = $this->ldap->search($linkResources, $base, $filter, $attr); @@ -887,8 +898,9 @@ class Access extends LDAPUtility implements user\IUserTools { private function count($filter, $base, $attr = null, $limit = null, $offset = null, $skipHandling = false) { \OCP\Util::writeLog('user_ldap', 'Count filter: '.print_r($filter, true), \OCP\Util::DEBUG); - if(is_null($limit) || $limit <= 0) { - $limit = intval($this->connection->ldapPagingSize); + $limitPerPage = intval($this->connection->ldapPagingSize); + if(!is_null($limit) && $limit < $limitPerPage && $limit > 0) { + $limitPerPage = $limit; } $counter = 0; @@ -898,19 +910,19 @@ class Access extends LDAPUtility implements user\IUserTools { do { $continue = false; $search = $this->executeSearch($filter, $base, $attr, - $limit, $offset); + $limitPerPage, $offset); if($search === false) { return $counter > 0 ? $counter : false; } list($sr, $pagedSearchOK) = $search; - $count = $this->countEntriesInSearchResults($sr, $limit, $continue); + $count = $this->countEntriesInSearchResults($sr, $limitPerPage, $continue); $counter += $count; - $this->processPagedSearchStatus($sr, $filter, $base, $count, $limit, + $this->processPagedSearchStatus($sr, $filter, $base, $count, $limitPerPage, $offset, $pagedSearchOK, $skipHandling); - $offset += $limit; - } while($continue); + $offset += $limitPerPage; + } while($continue && (is_null($limit) || $limit <= 0 || $limit > $counter)); return $counter; } @@ -1141,6 +1153,33 @@ class Access extends LDAPUtility implements user\IUserTools { } /** + * creates a filter part for searches by splitting up the given search + * string into single words + * @param string $search the search term + * @param string[] $searchAttributes needs to have at least two attributes, + * otherwise it does not make sense :) + * @return string the final filter part to use in LDAP searches + * @throws \Exception + */ + private function getAdvancedFilterPartForSearch($search, $searchAttributes) { + if(!is_array($searchAttributes) || count($searchAttributes) < 2) { + throw new \Exception('searchAttributes must be an array with at least two string'); + } + $searchWords = explode(' ', trim($search)); + $wordFilters = array(); + foreach($searchWords as $word) { + $word .= '*'; + //every word needs to appear at least once + $wordMatchOneAttrFilters = array(); + foreach($searchAttributes as $attr) { + $wordMatchOneAttrFilters[] = $attr . '=' . $word; + } + $wordFilters[] = $this->combineFilterWithOr($wordMatchOneAttrFilters); + } + return $this->combineFilterWithAnd($wordFilters); + } + + /** * creates a filter part for searches * @param string $search the search term * @param string[]|null $searchAttributes @@ -1150,7 +1189,19 @@ class Access extends LDAPUtility implements user\IUserTools { */ private function getFilterPartForSearch($search, $searchAttributes, $fallbackAttribute) { $filter = array(); - $search = empty($search) ? '*' : '*'.$search.'*'; + $haveMultiSearchAttributes = (is_array($searchAttributes) && count($searchAttributes) > 0); + if($haveMultiSearchAttributes && strpos(trim($search), ' ') !== false) { + try { + return $this->getAdvancedFilterPartForSearch($search, $searchAttributes); + } catch(\Exception $e) { + \OCP\Util::writeLog( + 'user_ldap', + 'Creating advanced filter for search failed, falling back to simple method.', + \OCP\Util::INFO + ); + } + } + $search = empty($search) ? '*' : $search.'*'; if(!is_array($searchAttributes) || count($searchAttributes) === 0) { if(empty($fallbackAttribute)) { return ''; @@ -1168,6 +1219,19 @@ class Access extends LDAPUtility implements user\IUserTools { } /** + * returns the filter used for counting users + * @return string + */ + public function getFilterForUserCount() { + $filter = $this->combineFilterWithAnd(array( + $this->connection->ldapUserFilter, + $this->connection->ldapUserDisplayName . '=*' + )); + + return $filter; + } + + /** * @param string $name * @param string $password * @return bool @@ -1457,7 +1521,7 @@ class Access extends LDAPUtility implements user\IUserTools { */ private function initPagedSearch($filter, $bases, $attr, $limit, $offset) { $pagedSearchOK = false; - if($this->connection->hasPagedResultSupport && !is_null($limit)) { + if($this->connection->hasPagedResultSupport && ($limit !== 0)) { $offset = intval($offset); //can be null \OCP\Util::writeLog('user_ldap', 'initializing paged search for Filter '.$filter.' base '.print_r($bases, true) diff --git a/apps/user_ldap/lib/wizard.php b/apps/user_ldap/lib/wizard.php index 1d7701440e9..578a920f00e 100644 --- a/apps/user_ldap/lib/wizard.php +++ b/apps/user_ldap/lib/wizard.php @@ -56,7 +56,7 @@ class Wizard extends LDAPUtility { Wizard::$l = \OC::$server->getL10N('user_ldap'); } $this->access = $access; - $this->result = new WizardResult; + $this->result = new WizardResult(); } public function __destruct() { @@ -120,7 +120,7 @@ class Wizard extends LDAPUtility { * @throws \Exception */ public function countUsers() { - $filter = $this->configuration->ldapUserFilter; + $filter = $this->access->getFilterForUserCount(); $usersTotal = $this->countEntries($filter, 'users'); $usersTotal = ($usersTotal !== false) ? $usersTotal : 0; @@ -132,9 +132,10 @@ class Wizard extends LDAPUtility { /** * counts users with a specified attribute * @param string $attr + * @param bool $existsCheck * @return int|bool */ - public function countUsersWithAttribute($attr) { + public function countUsersWithAttribute($attr, $existsCheck = false) { if(!$this->checkRequirements(array('ldapHost', 'ldapPort', 'ldapBase', @@ -148,7 +149,51 @@ class Wizard extends LDAPUtility { $attr . '=*' )); - return $this->access->countUsers($filter); + $limit = ($existsCheck === false) ? null : 1; + + return $this->access->countUsers($filter, array('dn'), $limit); + } + + /** + * detects the display name attribute. If a setting is already present that + * returns at least one hit, the detection will be canceled. + * @return WizardResult|bool + * @throws \Exception + */ + public function detectUserDisplayNameAttribute() { + if(!$this->checkRequirements(array('ldapHost', + 'ldapPort', + 'ldapBase', + 'ldapUserFilter', + ))) { + return false; + } + + $attr = $this->configuration->ldapUserDisplayName; + if($attr !== 'displayName' && !empty($attr)) { + // most likely not the default value with upper case N, + // verify it still produces a result + $count = intval($this->countUsersWithAttribute($attr, true)); + if($count > 0) { + //no change, but we sent it back to make sure the user interface + //is still correct, even if the ajax call was cancelled inbetween + $this->result->addChange('ldap_display_name', $attr); + return $this->result; + } + } + + // first attribute that has at least one result wins + $displayNameAttrs = array('displayname', 'cn'); + foreach ($displayNameAttrs as $attr) { + $count = intval($this->countUsersWithAttribute($attr, true)); + + if($count > 0) { + $this->applyFind('ldap_display_name', $attr); + return $this->result; + } + }; + + throw new \Exception(self::$l->t('Could not detect user display name attribute. Please specify it yourself in advanced ldap settings.')); } /** @@ -168,7 +213,7 @@ class Wizard extends LDAPUtility { $attr = $this->configuration->ldapEmailAttribute; if(!empty($attr)) { - $count = intval($this->countUsersWithAttribute($attr)); + $count = intval($this->countUsersWithAttribute($attr, true)); if($count > 0) { return false; } @@ -189,7 +234,7 @@ class Wizard extends LDAPUtility { } if($winner !== '') { - $this->result->addChange('ldap_email_attr', $winner); + $this->applyFind('ldap_email_attr', $winner); if($writeLog) { \OCP\Util::writeLog('user_ldap', 'The mail attribute has ' . 'automatically been reset, because the original value ' . diff --git a/apps/user_ldap/tests/user_ldap.php b/apps/user_ldap/tests/user_ldap.php index e91404d47f2..33cec0247b6 100644 --- a/apps/user_ldap/tests/user_ldap.php +++ b/apps/user_ldap/tests/user_ldap.php @@ -552,23 +552,9 @@ class Test_User_Ldap_Direct extends \Test\TestCase { public function testCountUsers() { $access = $this->getAccessMock(); - $access->connection->expects($this->once()) - ->method('__get') - ->will($this->returnCallback(function($name) { - if($name === 'ldapLoginFilter') { - return 'uid=%uid'; - } - return null; - })); - $access->expects($this->once()) ->method('countUsers') - ->will($this->returnCallback(function($filter, $a, $b, $c) { - if($filter !== 'uid=*') { - return false; - } - return 5; - })); + ->will($this->returnValue(5)); $backend = new UserLDAP($access); @@ -579,23 +565,9 @@ class Test_User_Ldap_Direct extends \Test\TestCase { public function testCountUsersFailing() { $access = $this->getAccessMock(); - $access->connection->expects($this->once()) - ->method('__get') - ->will($this->returnCallback(function($name) { - if($name === 'ldapLoginFilter') { - return 'invalidFilter'; - } - return null; - })); - $access->expects($this->once()) ->method('countUsers') - ->will($this->returnCallback(function($filter, $a, $b, $c) { - if($filter !== 'uid=*') { - return false; - } - return 5; - })); + ->will($this->returnValue(false)); $backend = new UserLDAP($access); diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php index 6e244311d4a..38c32cbda4a 100644 --- a/apps/user_ldap/user_ldap.php +++ b/apps/user_ldap/user_ldap.php @@ -290,9 +290,13 @@ class USER_LDAP extends BackendUtility implements \OCP\UserInterface { * @return int|bool */ public function countUsers() { - $filter = \OCP\Util::mb_str_replace( - '%uid', '*', $this->access->connection->ldapLoginFilter, 'UTF-8'); + $filter = $this->access->getFilterForUserCount(); + $cacheKey = 'countUsers-'.$filter; + if(!is_null($entries = $this->access->connection->getFromCache($cacheKey))) { + return $entries; + } $entries = $this->access->countUsers($filter); + $this->access->connection->writeToCache($cacheKey, $entries); return $entries; } } diff --git a/autotest.cmd b/autotest.cmd index 5f1b1ae3a1d..2129e2d30d6 100644 --- a/autotest.cmd +++ b/autotest.cmd @@ -7,8 +7,10 @@ :: @copyright 2012, 2013 Thomas Müller thomas.mueller@tmit.eu :: -set DATADIR=data-autotest +@echo off + set BASEDIR=%~dp0 +set DATADIR=%BASEDIR%data-autotest :: create autoconfig for sqlite, mysql, postgresql and mssql echo ^<?php > .\tests\autoconfig-sqlite.php @@ -18,7 +20,7 @@ echo 'dbtype' ^=^> 'sqlite'^, >> .\tests\autoconfig-sqlite.ph echo 'dbtableprefix' ^=^> 'oc_'^, >> .\tests\autoconfig-sqlite.php echo 'adminlogin' ^=^> 'admin'^, >> .\tests\autoconfig-sqlite.php echo 'adminpass' ^=^> 'admin'^, >> .\tests\autoconfig-sqlite.php -echo 'directory' ^=^> '%BASEDIR%%DATADIR%'^, >> .\tests\autoconfig-sqlite.php +echo 'directory' ^=^> '%DATADIR%'^, >> .\tests\autoconfig-sqlite.php echo ^)^; >> .\tests\autoconfig-sqlite.php echo ^<?php > .\tests\autoconfig-mysql.php @@ -28,7 +30,7 @@ echo 'dbtype' ^=^> 'mysql'^, >> .\tests\autoconfig-mysql.php echo 'dbtableprefix' ^=^> 'oc_'^, >> .\tests\autoconfig-mysql.php echo 'adminlogin' ^=^> 'admin'^, >> .\tests\autoconfig-mysql.php echo 'adminpass' ^=^> 'admin'^, >> .\tests\autoconfig-mysql.php -echo 'directory' ^=^> '%BASEDIR%%DATADIR%'^, >> .\tests\autoconfig-mysql.php +echo 'directory' ^=^> '%DATADIR%'^, >> .\tests\autoconfig-mysql.php echo 'dbuser' ^=^> 'oc_autotest'^, >> .\tests\autoconfig-mysql.php echo 'dbname' ^=^> 'oc_autotest'^, >> .\tests\autoconfig-mysql.php echo 'dbhost' ^=^> 'localhost'^, >> .\tests\autoconfig-mysql.php @@ -42,7 +44,7 @@ echo 'dbtype' ^=^> 'pgsql'^, >> .\tests\autoconfig-pgsql.php echo 'dbtableprefix' ^=^> 'oc_'^, >> .\tests\autoconfig-pgsql.php echo 'adminlogin' ^=^> 'admin'^, >> .\tests\autoconfig-pgsql.php echo 'adminpass' ^=^> 'admin'^, >> .\tests\autoconfig-pgsql.php -echo 'directory' ^=^> '%BASEDIR%%DATADIR%'^, >> .\tests\autoconfig-pgsql.php +echo 'directory' ^=^> '%DATADIR%'^, >> .\tests\autoconfig-pgsql.php echo 'dbuser' ^=^> 'oc_autotest'^, >> .\tests\autoconfig-pgsql.php echo 'dbname' ^=^> 'oc_autotest'^, >> .\tests\autoconfig-pgsql.php echo 'dbhost' ^=^> 'localhost'^, >> .\tests\autoconfig-pgsql.php @@ -56,7 +58,7 @@ echo 'dbtype' ^=^> 'mssql'^, >> .\tests\autoconfig-mssql.php echo 'dbtableprefix' ^=^> 'oc_'^, >> .\tests\autoconfig-mssql.php echo 'adminlogin' ^=^> 'admin'^, >> .\tests\autoconfig-mssql.php echo 'adminpass' ^=^> 'admin'^, >> .\tests\autoconfig-mssql.php -echo 'directory' ^=^> '%BASEDIR%%DATADIR%'^, >> .\tests\autoconfig-mssql.php +echo 'directory' ^=^> '%DATADIR%'^, >> .\tests\autoconfig-mssql.php echo 'dbuser' ^=^> 'oc_autotest'^, >> .\tests\autoconfig-mssql.php echo 'dbname' ^=^> 'oc_autotest'^, >> .\tests\autoconfig-mssql.php echo 'dbhost' ^=^> 'localhost\sqlexpress'^, >> .\tests\autoconfig-mssql.php @@ -65,24 +67,40 @@ echo ^)^; >> .\tests\autoconfig-mssql.php echo localhost:5432:*:oc_autotest:owncloud > %APPDATA%\postgresql\pgpass.conf +@echo on + +:: Back up existing (dev) config if one exists +if exist config\config.php ( + copy /y config\config.php config\config-autotest-backup.php +) + :: :: start test execution :: if [%1] == [] ( - echo "Running on all database backends" - call:execute_tests "sqlite" - call:execute_tests "mysql" - call:execute_tests "mssql" - ::call:execute_tests "ora" - call:execute_tests "pgsql" + @echo "Running on all database backends" + call:execute_tests "sqlite" "%2" + call:execute_tests "mysql" "%2" + call:execute_tests "mssql" "%2" + ::call:execute_tests "ora" "%2" + call:execute_tests "pgsql" "%2" ) else ( - call:execute_tests "%1" + call:execute_tests "%1" "%2" ) +goto:restore_config + +goto:eof + +:restore_config + :: Restore existing config + if exist config\config-autotest-backup.php ( + copy /y config\config-autotest-backup.php config\config.php + ) goto:eof :execute_tests - echo "Setup environment for %~1 testing ..." + @echo "Setup environment for %~1 testing ..." :: back to root folder cd %BASEDIR% @@ -109,22 +127,25 @@ goto:eof copy /y %BASEDIR%\tests\autoconfig-%~1.php %BASEDIR%\config\autoconfig.php :: trigger installation - php -f index.php + @echo INDEX + call php -f index.php + @echo END INDEX ::test execution - echo "Testing with %~1 ..." + @echo "Testing with %~1 ..." cd tests rmdir /s /q coverage-html-%~1 md coverage-html-%~1 php -f enable_all.php + :: no external files on windows for now cd .. php occ app:disable files_external cd tests - call phpunit --bootstrap bootstrap.php --configuration phpunit-autotest.xml --log-junit autotest-results-%~1.xml --coverage-clover autotest-clover-%~1.xml --coverage-html coverage-html-%~1 + call phpunit --bootstrap bootstrap.php --configuration phpunit-autotest.xml --log-junit autotest-results-%~1.xml --coverage-clover autotest-clover-%~1.xml --coverage-html coverage-html-%~1 %~2 - echo "Done with testing %~1 ..." + @echo "Done with testing %~1 ..." cd %BASEDIR% goto:eof diff --git a/bower.json b/bower.json index b18078f6fc4..5b025791dfe 100644 --- a/bower.json +++ b/bower.json @@ -13,15 +13,16 @@ "tests" ], "dependencies": { - "blueimp-md5": "1.0.1", - "handlebars": "1.3.0", + "blueimp-md5": "~1.0.1", + "handlebars": "~1.3.0", "jcrop": "~0.9.12", "jquery": "~1.10.0", + "jsTimezoneDetect": "~1.0.5", "moment": "~2.8.3", - "select2": "3.4.8", + "select2": "~3.4.8", "zxcvbn": "*", - "snapjs": "2.0.0-rc1", + "snapjs": "~2.0.0-rc1", "strengthify": "*", - "underscore": "1.6.0" + "underscore": "~1.6.0" } } diff --git a/config/config.sample.php b/config/config.sample.php index 2287b7af7dd..791ffa3df90 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -53,6 +53,9 @@ $CONFIG = array( * all your passwords. This example is for documentation only, * and you should never use it. * + * @deprecated This salt is deprecated and only used for legacy-compatibility, developers + * should *NOT* use this value for anything nowadays. + * *'passwordsalt' => 'd3c944a9af095aa08f', */ 'passwordsalt' => '', @@ -77,7 +80,8 @@ $CONFIG = array( /** * Where user files are stored; this defaults to ``data/`` in the ownCloud - * directory. The SQLite database is also stored here, when you use SQLite. + * directory. The SQLite database is also stored here, when you use SQLite. (SQLite is + * available only in ownCloud Community Edition) */ 'datadirectory' => '/var/www/owncloud/data', @@ -88,8 +92,15 @@ $CONFIG = array( 'version' => '', /** - * Identifies the database used with this installation: ``sqlite``, ``mysql``, - * ``pgsql``, ``oci``, or ``mssql``. + * Identifies the database used with this installation. See also config option + * ``supportedDatabases`` + * + * Available: + * - sqlite (SQLite3 - Community Edition Only) + * - mysql (MySQL) + * - pgsql (PostgreSQL) + * - oci (Oracle - Enterprise Edition Only) + * - mssql (Microsoft SQL Server - Enterprise Edition Only) */ 'dbtype' => 'sqlite', @@ -134,6 +145,12 @@ $CONFIG = array( ), /** + * sqlite3 journal mode can be specified using this config parameter - can be 'WAL' or 'DELETE' + * see for more details https://www.sqlite.org/wal.html + */ +'sqlite.journal_mode' => 'DELETE', + +/** * Indicates whether the ownCloud instance was installed successfully; ``true`` * indicates a successful installation, and ``false`` indicates an unsuccessful * installation. @@ -434,6 +451,15 @@ $CONFIG = array( */ 'check_for_working_htaccess' => true, +/** + * In certain environments it is desired to have a read-only config file. + * When this switch is set to ``true`` ownCloud will not verify whether the + * configuration is writable. However, it will not be possible to configure + * all options via the web-interface. Furthermore, when updating ownCloud + * it is required to make the config file writable again for the update + * process. + */ +'config_is_read_only' => false, /** * Logging @@ -441,8 +467,10 @@ $CONFIG = array( /** * By default the ownCloud logs are sent to the ``owncloud.log`` file in the - * default ownCloud data directory. If syslogging is desired, set this parameter - * to ``syslog``. + * default ownCloud data directory. + * If syslogging is desired, set this parameter to ``syslog``. + * Setting this parameter to ``errorlog`` will use the PHP error_log function + * for logging. */ 'log_type' => 'owncloud', @@ -527,6 +555,7 @@ $CONFIG = array( /** * When enabled, admins may install apps from the ownCloud app store. + * The app store is disabled by default for ownCloud Enterprise Edition */ 'appstoreenabled' => true, @@ -617,7 +646,7 @@ $CONFIG = array( * concerns: * * - OC\Preview\Illustrator - * - OC\Preview\Movies + * - OC\Preview\Movie * - OC\Preview\MSOffice2003 * - OC\Preview\MSOffice2007 * - OC\Preview\MSOfficeDoc @@ -825,11 +854,11 @@ $CONFIG = array( * Database types that are supported for installation. * * Available: - * - sqlite (SQLite3) + * - sqlite (SQLite3 - Community Edition Only) * - mysql (MySQL) * - pgsql (PostgreSQL) - * - oci (Oracle) - * - mssql (Microsoft SQL Server) + * - oci (Oracle - Enterprise Edition Only) + * - mssql (Microsoft SQL Server - Enterprise Edition Only) */ 'supportedDatabases' => array( 'sqlite', diff --git a/core/css/header.css b/core/css/header.css index 026240ea1b0..02e47ad0966 100644 --- a/core/css/header.css +++ b/core/css/header.css @@ -273,8 +273,8 @@ z-index: 2000; display: none; background-color: #383c43; - border-bottom-left-radius:7px; border-bottom:1px #333 solid; border-left:1px #333 solid; - box-shadow:0 0 7px rgb(29,45,68); + border-bottom-left-radius: 7px; + box-shadow: 0 0 7px rgb(29,45,68); -moz-box-sizing: border-box; box-sizing: border-box; } #expanddiv a { diff --git a/core/img/filetypes/image-svg+xml.png b/core/img/filetypes/image-vector.png Binary files differindex a847f78fcd8..a847f78fcd8 100644 --- a/core/img/filetypes/image-svg+xml.png +++ b/core/img/filetypes/image-vector.png diff --git a/core/img/filetypes/image-svg+xml.svg b/core/img/filetypes/image-vector.svg index 1f0a54a21ca..1f0a54a21ca 100644 --- a/core/img/filetypes/image-svg+xml.svg +++ b/core/img/filetypes/image-vector.svg diff --git a/core/img/filetypes/image.png b/core/img/filetypes/image.png Binary files differindex 5cdc05029af..305c3d4db27 100644 --- a/core/img/filetypes/image.png +++ b/core/img/filetypes/image.png diff --git a/core/img/filetypes/image.svg b/core/img/filetypes/image.svg index 86cbb633bf3..0159eed6482 100644 --- a/core/img/filetypes/image.svg +++ b/core/img/filetypes/image.svg @@ -1,57 +1,39 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="32" width="32" version="1.0" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/"> +<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="32" width="32" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/"> <defs> - <radialGradient id="t" xlink:href="#a" gradientUnits="userSpaceOnUse" cy="486.65" cx="605.71" gradientTransform="matrix(.028917 0 0 .012353 26.973 38.471)" r="117.14"/> <linearGradient id="a"> <stop offset="0"/> <stop stop-opacity="0" offset="1"/> </linearGradient> - <radialGradient id="u" xlink:href="#a" gradientUnits="userSpaceOnUse" cy="486.65" cx="605.71" gradientTransform="matrix(-.028917 0 0 .012353 21.027 38.471)" r="117.14"/> - <linearGradient id="l" x1="302.86" gradientUnits="userSpaceOnUse" y1="366.65" gradientTransform="matrix(.084497 0 0 .012353 -6.5396 38.471)" x2="302.86" y2="609.51"> - <stop stop-opacity="0" offset="0"/> - <stop offset=".5"/> - <stop stop-opacity="0" offset="1"/> - </linearGradient> - <linearGradient id="r" x1="16.626" gradientUnits="userSpaceOnUse" y1="15.298" gradientTransform="matrix(.57894 0 0 .65062 2.0784 1.9502)" x2="20.055" y2="24.628"> + <linearGradient id="f" y2="43" gradientUnits="userSpaceOnUse" y1="5.5641" gradientTransform="matrix(.56757 0 0 .72973 2.3784 -2.5135)" x2="24" x1="24"> <stop stop-color="#fff" offset="0"/> - <stop stop-color="#fff" stop-opacity="0" offset="1"/> + <stop stop-opacity=".23529" stop-color="#fff" offset=".036262"/> + <stop stop-opacity=".15686" stop-color="#fff" offset=".95056"/> + <stop stop-opacity=".39216" stop-color="#fff" offset="1"/> </linearGradient> - <linearGradient id="o" x1="24" gradientUnits="userSpaceOnUse" y1="5.5641" gradientTransform="matrix(.77477 0 0 .61261 -2.5946 1.2973)" x2="24" y2="43"> - <stop stop-color="#fff" offset="0"/> - <stop stop-color="#fff" stop-opacity=".23529" offset=".036262"/> - <stop stop-color="#fff" stop-opacity=".15686" offset=".95056"/> - <stop stop-color="#fff" stop-opacity=".39216" offset="1"/> - </linearGradient> - <linearGradient id="p" x1="25.132" gradientUnits="userSpaceOnUse" y1=".98521" gradientTransform="matrix(.85714 0 0 .52148 -4.5714 2.6844)" x2="25.132" y2="47.013"> + <linearGradient id="e" y2="47.013" gradientUnits="userSpaceOnUse" y1=".98521" gradientTransform="matrix(.65714 0 0 .63012 .22856 -1.0896)" x2="25.132" x1="25.132"> <stop stop-color="#f4f4f4" offset="0"/> <stop stop-color="#dbdbdb" offset="1"/> </linearGradient> - <linearGradient id="q" x1="-51.786" gradientUnits="userSpaceOnUse" y1="50.786" gradientTransform="matrix(.69214 0 0 .48803 46.352 2.1033)" x2="-51.786" y2="2.9062"> - <stop stop-color="#a0a0a0" offset="0"/> - <stop stop-color="#bebebe" offset="1"/> - </linearGradient> - <linearGradient id="m" x1="45.414" gradientUnits="userSpaceOnUse" y1="15.27" gradientTransform="matrix(.32723 0 0 .25356 -38.234 -30.559)" x2="45.567" y2="96.253"> - <stop stop-color="#262626" offset="0"/> - <stop stop-color="#4d4d4d" offset="1"/> - </linearGradient> - <linearGradient id="n" x1="-24.032" gradientUnits="userSpaceOnUse" y1="-13.091" gradientTransform="matrix(.74286 0 0 .74074 1.8384 4.0069)" x2="-24.098" y2="-40.164"> - <stop stop-color="#1d1d1d" offset="0"/> - <stop offset="1"/> - </linearGradient> - <linearGradient id="s" x1="149.98" gradientUnits="userSpaceOnUse" y1="-104.24" gradientTransform="matrix(.28088 0 0 .28276 -22.128 49.806)" x2="149.98" y2="-174.97"> - <stop stop-color="#272727" offset="0"/> - <stop stop-color="#454545" offset="1"/> + <radialGradient id="c" xlink:href="#a" gradientUnits="userSpaceOnUse" cy="486.65" cx="605.71" gradientTransform="matrix(.015663 0 0 .0082353 17.61 25.981)" r="117.14"/> + <radialGradient id="b" xlink:href="#a" gradientUnits="userSpaceOnUse" cy="486.65" cx="605.71" gradientTransform="matrix(-.015663 0 0 .0082353 14.39 25.981)" r="117.14"/> + <linearGradient id="d" y2="609.51" gradientUnits="userSpaceOnUse" y1="366.65" gradientTransform="matrix(.045769 0 0 .0082353 -.54232 25.981)" x2="302.86" x1="302.86"> + <stop stop-opacity="0" offset="0"/> + <stop offset=".5"/> + <stop stop-opacity="0" offset="1"/> </linearGradient> </defs> - <g opacity=".4" stroke-width=".0225" transform="matrix(.66667 0 0 .66667 0 -1.6667)"> - <rect y="43" width="40.8" fill="url(#l)" x="3.6" height="3"/> - <path d="m3.6 43v2.9998c-1.4891 0.006-3.6-0.672-3.6-1.5s1.6618-1.5 3.6-1.5z" fill="url(#u)"/> - <path d="m44.4 43v2.9998c1.4891 0.0056 3.6-0.67211 3.6-1.5001 0-0.828-1.6618-1.4997-3.6-1.4997z" fill="url(#t)"/> + <g> + <rect opacity=".15" height="2" width="22.1" y="29" x="4.95" fill="url(#d)"/> + <path opacity=".15" fill="url(#b)" d="m4.95 29v1.9999c-0.8066 0.004-1.95-0.448-1.95-1s0.9001-1 1.95-1z"/> + <path opacity=".15" fill="url(#c)" d="m27.05 29v1.9999c0.80661 0.0038 1.95-0.44807 1.95-1.0001 0-0.552-0.90012-0.99982-1.95-0.99982z"/> + <path fill="url(#e)" d="m4.5 0.49996c5.2705 0 23 0.00185 23 0.00185l0.000028 28.998h-23v-29z"/> + <path stroke-linejoin="round" d="m26.5 28.5h-21v-27h21z" stroke="url(#f)" stroke-linecap="round" fill="none"/> + <path opacity=".3" stroke-linejoin="round" d="m4.5 0.49996c5.2705 0 23 0.00185 23 0.00185l0.000028 28.998h-23v-29z" stroke="#000" stroke-width=".99992" fill="none"/> + </g> + <g> + <path opacity="0.898" d="m7.7886 21.255h16.423v-15.51h-16.423m3.628 2.8735c1.0944 0 1.981 0.8261 1.981 1.8451s-0.88656 1.8458-1.981 1.8458c-1.0938 0-1.9796-0.8261-1.9796-1.8458 0-1.019 0.88588-1.8451 1.9796-1.8451zm-2.6108 9.4533 2.9348-2.2011 1.4939 1.0904 5.9206-4.3819 2.2011 1.6359 1.4932-1.0897v4.9464z" fill-rule="evenodd" clip-rule="evenodd" fill="#5b2d8d"/> + <path fill="#fff" d="m10.658 12.066c-1.8593-0.82639-1.2884-3.3318 0.75961-3.3335 1.9297-0.00157 2.6205 2.394 0.93791 3.2524-0.61512 0.31381-1.1197 0.33792-1.6975 0.08111z"/> + <path fill="#fff" d="m10.392 16.949 1.3399-1.004 0.73508 0.52638c0.4043 0.28951 0.80332 0.48661 0.88673 0.43799 0.0834-0.04861 1.4203-1.0288 2.9709-2.1782l2.8192-2.0899 0.43502 0.32295c0.23926 0.17762 0.7424 0.5447 1.1181 0.81574l0.68306 0.49279 0.70677-0.53895 0.70677-0.53895v2.3791 2.3791h-6.8707-6.8707l1.3399-1.004z"/> </g> - <path stroke-linejoin="round" stroke="url(#q)" stroke-width=".0066667" d="m0.99997 4c6.8745 0 30 0.0015 30 0.0015l0.000036 23.999h-30v-24z" fill="url(#p)"/> - <path stroke-linejoin="round" d="m30.333 27.333h-28.667v-22.667h28.667z" stroke="url(#o)" stroke-linecap="round" stroke-width=".0066667" fill="none"/> - <rect ry="0" rx="0" transform="matrix(-.99999 .0037552 .0024409 -1 0 0)" height="19.903" width="25.952" stroke="url(#n)" stroke-linecap="round" y="-26.012" x="-29.015" stroke-width=".0066668" fill="url(#m)"/> - <path style="color:#000000" d="m14.458 9.5417c-0.73638 0-1.3333 1.1939-1.3333 2.6667 0 0.24505 0.01072 0.48294 0.04167 0.70833-0.15826-0.15989-0.30816-0.33156-0.5-0.47917-1.1673-0.89808-2.4885-1.1461-2.9375-0.5625-0.44904 0.58363 0.14525 1.7894 1.3125 2.6875 0.22148 0.1704 0.44175 0.29391 0.66667 0.41667-0.25479 0.03257-0.52266 0.08822-0.79167 0.16667-1.4139 0.41232-2.3937 1.3347-2.1875 2.0417 0.20616 0.70693 1.5236 0.93315 2.9375 0.52083 0.2651-0.07731 0.52042-0.1633 0.75-0.27083-0.05604 0.10202-0.11595 0.20204-0.16667 0.3125-2.7782 2.4796-5.0625 7.2292-5.0625 7.2292l0.95833 0.02083c0.5207-1.25 1.8077-3.994 3.7925-6.293-0.28085 1.1684-0.0992 2.2006 0.5 2.4167 0.69271 0.24982 1.667-0.67708 2.1667-2.0625 0.04494-0.12462 0.06976-0.25209 0.10417-0.375 0.05396 0.11891 0.10152 0.23517 0.16667 0.35417 0.70727 1.2918 1.8124 2.062 2.4583 1.7083 0.64591-0.35364 0.58227-1.6874-0.125-2.9792-0.04035-0.07369-0.08227-0.13821-0.125-0.20833 0.07835 0.02437 0.14794 0.04131 0.22917 0.0625 1.4251 0.37181 2.7308 0.10836 2.9167-0.60417 0.18591-0.71253-0.82495-1.5865-2.25-1.9583-0.02183-0.0057-0.04073-0.01544-0.0625-0.02083 0.01921-0.01078 0.04331-0.0098 0.0625-0.02083 1.2754-0.73638 2.014-1.8623 1.6458-2.5-0.36819-0.63772-1.7037-0.54888-2.9792 0.1875-0.40854 0.23587-0.74162 0.50638-1.0208 0.79167 0.10589-0.38234 0.16667-0.82364 0.16667-1.2917 0-1.4728-0.59695-2.6667-1.3333-2.6667zm0.042 4.4583c0.92048 0 1.6667 0.74619 1.6667 1.6667 0 0.92047-0.74619 1.6667-1.6667 1.6667-0.92048 0-1.6667-0.74619-1.6667-1.6667 0-0.921 0.747-1.667 1.667-1.667z" fill="url(#s)"/> - <path d="m14.458 10.188c-0.73638 0-1.3333 1.1939-1.3333 2.6667 0 0.24504 0.01072 0.48294 0.04167 0.70833-0.15826-0.15989-0.30816-0.33156-0.5-0.47917-1.1673-0.89808-2.4885-1.1461-2.9375-0.5625-0.44904 0.58363 0.14525 1.7894 1.3125 2.6875 0.22148 0.1704 0.44175 0.29391 0.66667 0.41667-0.25479 0.03257-0.52266 0.08822-0.79167 0.16667-1.4139 0.41232-2.3937 1.3347-2.1875 2.0417 0.20616 0.70693 1.5236 0.93315 2.9375 0.52083 0.2651-0.07731 0.52042-0.1633 0.75-0.27083-0.05604 0.10202-0.11595 0.20204-0.16667 0.3125-2.7782 2.479-5.0625 7.229-5.0625 7.229l0.95833 0.02083c0.52039-1.2493 1.8073-3.9927 3.7917-6.2917-0.28085 1.1684-0.0992 2.2006 0.5 2.4167 0.69271 0.24982 1.667-0.67708 2.1667-2.0625 0.04494-0.12462 0.06976-0.25209 0.10417-0.375 0.05396 0.11891 0.10152 0.23517 0.16667 0.35417 0.70727 1.2918 1.8124 2.062 2.4583 1.7083 0.64591-0.35364 0.58227-1.6874-0.125-2.9792-0.04035-0.07369-0.08227-0.13821-0.125-0.20833 0.07835 0.02437 0.14794 0.04131 0.22917 0.0625 1.4251 0.37181 2.7308 0.10836 2.9167-0.60417 0.18591-0.71253-0.82495-1.5865-2.25-1.9583-0.02183-0.0057-0.04073-0.01544-0.0625-0.02083 0.01921-0.01078 0.04331-0.0098 0.0625-0.02083 1.2754-0.73638 2.014-1.8623 1.6458-2.5-0.36819-0.63772-1.7037-0.54888-2.9792 0.1875-0.40854 0.23587-0.74162 0.50638-1.0208 0.79167 0.10589-0.38234 0.16667-0.82364 0.16667-1.2917 0-1.4728-0.59695-2.6667-1.3333-2.6667zm0.042 4.458c0.92048 0 1.6667 0.74619 1.6667 1.6667 0 0.92048-0.74619 1.6667-1.6667 1.6667-0.92048 0-1.6667-0.74619-1.6667-1.6667 0-0.92048 0.74619-1.6667 1.6667-1.6667z" fill="#d2d2d2"/> - <path opacity=".15" fill="url(#r)" d="m2.6667 5.6667 0.0087 12c0.7672-0.012 26.076-4.424 26.658-4.636l-0.000092-7.3644z" fill-rule="evenodd"/> </svg> diff --git a/core/js/jstz.js b/core/js/jstz.js deleted file mode 100644 index 0f9abe8b78d..00000000000 --- a/core/js/jstz.js +++ /dev/null @@ -1,358 +0,0 @@ -/** - * This script gives you the zone info key representing your device's time zone setting. - * - * @name jsTimezoneDetect - * @version 1.0.5 - * @author Jon Nylander - * @license MIT License - http://www.opensource.org/licenses/mit-license.php - * - * For usage and examples, visit: - * http://pellepim.bitbucket.org/jstz/ - * - * Copyright (c) Jon Nylander - */ - -/*jslint undef: true */ -/*global console, exports*/ - -(function(root) { - /** - * Namespace to hold all the code for timezone detection. - */ - var jstz = (function () { - 'use strict'; - var HEMISPHERE_SOUTH = 's', - - /** - * Gets the offset in minutes from UTC for a certain date. - * @param {Date} date - * @returns {Number} - */ - get_date_offset = function (date) { - var offset = -date.getTimezoneOffset(); - return (offset !== null ? offset : 0); - }, - - get_date = function (year, month, date) { - var d = new Date(); - if (year !== undefined) { - d.setFullYear(year); - } - d.setMonth(month); - d.setDate(date); - return d; - }, - - get_january_offset = function (year) { - return get_date_offset(get_date(year, 0 ,2)); - }, - - get_june_offset = function (year) { - return get_date_offset(get_date(year, 5, 2)); - }, - - /** - * Private method. - * Checks whether a given date is in daylight saving time. - * If the date supplied is after august, we assume that we're checking - * for southern hemisphere DST. - * @param {Date} date - * @returns {Boolean} - */ - date_is_dst = function (date) { - var is_southern = date.getMonth() > 7, - base_offset = is_southern ? get_june_offset(date.getFullYear()) : - get_january_offset(date.getFullYear()), - date_offset = get_date_offset(date), - is_west = base_offset < 0, - dst_offset = base_offset - date_offset; - - if (!is_west && !is_southern) { - return dst_offset < 0; - } - - return dst_offset !== 0; - }, - - /** - * This function does some basic calculations to create information about - * the user's timezone. It uses REFERENCE_YEAR as a solid year for which - * the script has been tested rather than depend on the year set by the - * client device. - * - * Returns a key that can be used to do lookups in jstz.olson.timezones. - * eg: "720,1,2". - * - * @returns {String} - */ - - lookup_key = function () { - var january_offset = get_january_offset(), - june_offset = get_june_offset(), - diff = january_offset - june_offset; - - if (diff < 0) { - return january_offset + ",1"; - } else if (diff > 0) { - return june_offset + ",1," + HEMISPHERE_SOUTH; - } - - return january_offset + ",0"; - }, - - /** - * Uses get_timezone_info() to formulate a key to use in the olson.timezones dictionary. - * - * Returns a primitive object on the format: - * {'timezone': TimeZone, 'key' : 'the key used to find the TimeZone object'} - * - * @returns Object - */ - determine = function () { - var key = lookup_key(); - return new jstz.TimeZone(jstz.olson.timezones[key]); - }, - - /** - * This object contains information on when daylight savings starts for - * different timezones. - * - * The list is short for a reason. Often we do not have to be very specific - * to single out the correct timezone. But when we do, this list comes in - * handy. - * - * Each value is a date denoting when daylight savings starts for that timezone. - */ - dst_start_for = function (tz_name) { - - var ru_pre_dst_change = new Date(2010, 6, 15, 1, 0, 0, 0), // In 2010 Russia had DST, this allows us to detect Russia :) - dst_starts = { - 'America/Denver': new Date(2011, 2, 13, 3, 0, 0, 0), - 'America/Mazatlan': new Date(2011, 3, 3, 3, 0, 0, 0), - 'America/Chicago': new Date(2011, 2, 13, 3, 0, 0, 0), - 'America/Mexico_City': new Date(2011, 3, 3, 3, 0, 0, 0), - 'America/Asuncion': new Date(2012, 9, 7, 3, 0, 0, 0), - 'America/Santiago': new Date(2012, 9, 3, 3, 0, 0, 0), - 'America/Campo_Grande': new Date(2012, 9, 21, 5, 0, 0, 0), - 'America/Montevideo': new Date(2011, 9, 2, 3, 0, 0, 0), - 'America/Sao_Paulo': new Date(2011, 9, 16, 5, 0, 0, 0), - 'America/Los_Angeles': new Date(2011, 2, 13, 8, 0, 0, 0), - 'America/Santa_Isabel': new Date(2011, 3, 5, 8, 0, 0, 0), - 'America/Havana': new Date(2012, 2, 10, 2, 0, 0, 0), - 'America/New_York': new Date(2012, 2, 10, 7, 0, 0, 0), - 'Europe/Helsinki': new Date(2013, 2, 31, 5, 0, 0, 0), - 'Pacific/Auckland': new Date(2011, 8, 26, 7, 0, 0, 0), - 'America/Halifax': new Date(2011, 2, 13, 6, 0, 0, 0), - 'America/Goose_Bay': new Date(2011, 2, 13, 2, 1, 0, 0), - 'America/Miquelon': new Date(2011, 2, 13, 5, 0, 0, 0), - 'America/Godthab': new Date(2011, 2, 27, 1, 0, 0, 0), - 'Europe/Moscow': ru_pre_dst_change, - 'Asia/Amman': new Date(2013, 2, 29, 1, 0, 0, 0), - 'Asia/Beirut': new Date(2013, 2, 31, 2, 0, 0, 0), - 'Asia/Damascus': new Date(2013, 3, 6, 2, 0, 0, 0), - 'Asia/Jerusalem': new Date(2013, 2, 29, 5, 0, 0, 0), - 'Asia/Yekaterinburg': ru_pre_dst_change, - 'Asia/Omsk': ru_pre_dst_change, - 'Asia/Krasnoyarsk': ru_pre_dst_change, - 'Asia/Irkutsk': ru_pre_dst_change, - 'Asia/Yakutsk': ru_pre_dst_change, - 'Asia/Vladivostok': ru_pre_dst_change, - 'Asia/Baku': new Date(2013, 2, 31, 4, 0, 0), - 'Asia/Yerevan': new Date(2013, 2, 31, 3, 0, 0), - 'Asia/Kamchatka': ru_pre_dst_change, - 'Asia/Gaza': new Date(2010, 2, 27, 4, 0, 0), - 'Africa/Cairo': new Date(2010, 4, 1, 3, 0, 0), - 'Europe/Minsk': ru_pre_dst_change, - 'Pacific/Apia': new Date(2010, 10, 1, 1, 0, 0, 0), - 'Pacific/Fiji': new Date(2010, 11, 1, 0, 0, 0), - 'Australia/Perth': new Date(2008, 10, 1, 1, 0, 0, 0) - }; - - return dst_starts[tz_name]; - }; - - return { - determine: determine, - date_is_dst: date_is_dst, - dst_start_for: dst_start_for - }; - }()); - - /** - * Simple object to perform ambiguity check and to return name of time zone. - */ - jstz.TimeZone = function (tz_name) { - 'use strict'; - /** - * The keys in this object are timezones that we know may be ambiguous after - * a preliminary scan through the olson_tz object. - * - * The array of timezones to compare must be in the order that daylight savings - * starts for the regions. - */ - var AMBIGUITIES = { - 'America/Denver': ['America/Denver', 'America/Mazatlan'], - 'America/Chicago': ['America/Chicago', 'America/Mexico_City'], - 'America/Santiago': ['America/Santiago', 'America/Asuncion', 'America/Campo_Grande'], - 'America/Montevideo': ['America/Montevideo', 'America/Sao_Paulo'], - 'Asia/Beirut': ['Asia/Amman', 'Asia/Jerusalem', 'Asia/Beirut', 'Europe/Helsinki','Asia/Damascus'], - 'Pacific/Auckland': ['Pacific/Auckland', 'Pacific/Fiji'], - 'America/Los_Angeles': ['America/Los_Angeles', 'America/Santa_Isabel'], - 'America/New_York': ['America/Havana', 'America/New_York'], - 'America/Halifax': ['America/Goose_Bay', 'America/Halifax'], - 'America/Godthab': ['America/Miquelon', 'America/Godthab'], - 'Asia/Dubai': ['Europe/Moscow'], - 'Asia/Dhaka': ['Asia/Yekaterinburg'], - 'Asia/Jakarta': ['Asia/Omsk'], - 'Asia/Shanghai': ['Asia/Krasnoyarsk', 'Australia/Perth'], - 'Asia/Tokyo': ['Asia/Irkutsk'], - 'Australia/Brisbane': ['Asia/Yakutsk'], - 'Pacific/Noumea': ['Asia/Vladivostok'], - 'Pacific/Tarawa': ['Asia/Kamchatka', 'Pacific/Fiji'], - 'Pacific/Tongatapu': ['Pacific/Apia'], - 'Asia/Baghdad': ['Europe/Minsk'], - 'Asia/Baku': ['Asia/Yerevan','Asia/Baku'], - 'Africa/Johannesburg': ['Asia/Gaza', 'Africa/Cairo'] - }, - - timezone_name = tz_name, - - /** - * Checks if a timezone has possible ambiguities. I.e timezones that are similar. - * - * For example, if the preliminary scan determines that we're in America/Denver. - * We double check here that we're really there and not in America/Mazatlan. - * - * This is done by checking known dates for when daylight savings start for different - * timezones during 2010 and 2011. - */ - ambiguity_check = function () { - var ambiguity_list = AMBIGUITIES[timezone_name], - length = ambiguity_list.length, - i = 0, - tz = ambiguity_list[0]; - - for (; i < length; i += 1) { - tz = ambiguity_list[i]; - - if (jstz.date_is_dst(jstz.dst_start_for(tz))) { - timezone_name = tz; - return; - } - } - }, - - /** - * Checks if it is possible that the timezone is ambiguous. - */ - is_ambiguous = function () { - return typeof (AMBIGUITIES[timezone_name]) !== 'undefined'; - }; - - if (is_ambiguous()) { - ambiguity_check(); - } - - return { - name: function () { - return timezone_name; - } - }; - }; - - jstz.olson = {}; - - /* - * The keys in this dictionary are comma separated as such: - * - * First the offset compared to UTC time in minutes. - * - * Then a flag which is 0 if the timezone does not take daylight savings into account and 1 if it - * does. - * - * Thirdly an optional 's' signifies that the timezone is in the southern hemisphere, - * only interesting for timezones with DST. - * - * The mapped arrays is used for constructing the jstz.TimeZone object from within - * jstz.determine_timezone(); - */ - jstz.olson.timezones = { - '-720,0' : 'Pacific/Majuro', - '-660,0' : 'Pacific/Pago_Pago', - '-600,1' : 'America/Adak', - '-600,0' : 'Pacific/Honolulu', - '-570,0' : 'Pacific/Marquesas', - '-540,0' : 'Pacific/Gambier', - '-540,1' : 'America/Anchorage', - '-480,1' : 'America/Los_Angeles', - '-480,0' : 'Pacific/Pitcairn', - '-420,0' : 'America/Phoenix', - '-420,1' : 'America/Denver', - '-360,0' : 'America/Guatemala', - '-360,1' : 'America/Chicago', - '-360,1,s' : 'Pacific/Easter', - '-300,0' : 'America/Bogota', - '-300,1' : 'America/New_York', - '-270,0' : 'America/Caracas', - '-240,1' : 'America/Halifax', - '-240,0' : 'America/Santo_Domingo', - '-240,1,s' : 'America/Santiago', - '-210,1' : 'America/St_Johns', - '-180,1' : 'America/Godthab', - '-180,0' : 'America/Argentina/Buenos_Aires', - '-180,1,s' : 'America/Montevideo', - '-120,0' : 'America/Noronha', - '-120,1' : 'America/Noronha', - '-60,1' : 'Atlantic/Azores', - '-60,0' : 'Atlantic/Cape_Verde', - '0,0' : 'UTC', - '0,1' : 'Europe/London', - '60,1' : 'Europe/Berlin', - '60,0' : 'Africa/Lagos', - '60,1,s' : 'Africa/Windhoek', - '120,1' : 'Asia/Beirut', - '120,0' : 'Africa/Johannesburg', - '180,0' : 'Asia/Baghdad', - '180,1' : 'Europe/Moscow', - '210,1' : 'Asia/Tehran', - '240,0' : 'Asia/Dubai', - '240,1' : 'Asia/Baku', - '270,0' : 'Asia/Kabul', - '300,1' : 'Asia/Yekaterinburg', - '300,0' : 'Asia/Karachi', - '330,0' : 'Asia/Kolkata', - '345,0' : 'Asia/Kathmandu', - '360,0' : 'Asia/Dhaka', - '360,1' : 'Asia/Omsk', - '390,0' : 'Asia/Rangoon', - '420,1' : 'Asia/Krasnoyarsk', - '420,0' : 'Asia/Jakarta', - '480,0' : 'Asia/Shanghai', - '480,1' : 'Asia/Irkutsk', - '525,0' : 'Australia/Eucla', - '525,1,s' : 'Australia/Eucla', - '540,1' : 'Asia/Yakutsk', - '540,0' : 'Asia/Tokyo', - '570,0' : 'Australia/Darwin', - '570,1,s' : 'Australia/Adelaide', - '600,0' : 'Australia/Brisbane', - '600,1' : 'Asia/Vladivostok', - '600,1,s' : 'Australia/Sydney', - '630,1,s' : 'Australia/Lord_Howe', - '660,1' : 'Asia/Kamchatka', - '660,0' : 'Pacific/Noumea', - '690,0' : 'Pacific/Norfolk', - '720,1,s' : 'Pacific/Auckland', - '720,0' : 'Pacific/Tarawa', - '765,1,s' : 'Pacific/Chatham', - '780,0' : 'Pacific/Tongatapu', - '780,1,s' : 'Pacific/Apia', - '840,0' : 'Pacific/Kiritimati' - }; - - if (typeof exports !== 'undefined') { - exports.jstz = jstz; - } else { - root.jstz = jstz; - } -})(this); diff --git a/core/js/lostpassword.js b/core/js/lostpassword.js index 35173fd3d33..294a9d8c1cf 100644 --- a/core/js/lostpassword.js +++ b/core/js/lostpassword.js @@ -112,7 +112,11 @@ OC.Lostpassword = { }, redirect : function(msg){ - window.location = OC.webroot; + if(OC.webroot !== '') { + window.location = OC.webroot; + } else { + window.location = '/'; + } }, resetError : function(msg){ diff --git a/core/js/oc-requesttoken.js b/core/js/oc-requesttoken.js index 02175a3d674..2f7548ecb77 100644 --- a/core/js/oc-requesttoken.js +++ b/core/js/oc-requesttoken.js @@ -1,3 +1,4 @@ $(document).on('ajaxSend',function(elm, xhr) { xhr.setRequestHeader('requesttoken', oc_requesttoken); -});
\ No newline at end of file + xhr.setRequestHeader('OCS-APIREQUEST', 'true'); +}); diff --git a/core/js/setupchecks.js b/core/js/setupchecks.js index f351c1b451a..db5365c124d 100644 --- a/core/js/setupchecks.js +++ b/core/js/setupchecks.js @@ -49,11 +49,16 @@ var afterCall = function(data, statusText, xhr) { var messages = []; if (xhr.status === 200 && data) { - if (!data.serverhasinternetconnection) { + if (!data.serverHasInternetConnection) { messages.push( t('core', 'This server has no working internet connection. This means that some of the features like mounting of external storage, notifications about updates or installation of 3rd party apps don´t work. Accessing files from remote and sending of notification emails might also not work. We suggest to enable internet connection for this server if you want to have all features.') ); } + if(!data.dataDirectoryProtected) { + messages.push( + t('core', 'Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root.') + ); + } } else { messages.push(t('core', 'Error occurred while checking server setup')); } diff --git a/core/js/share.js b/core/js/share.js index d9ae0168129..b856363d157 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -447,7 +447,7 @@ OC.Share={ $('#shareWith').autocomplete({minLength: 2, delay: 750, source: function(search, response) { var $loading = $('#dropdown .shareWithLoading'); $loading.removeClass('hidden'); - $.get(OC.filePath('core', 'ajax', 'share.php'), { fetch: 'getShareWith', search: search.term, itemShares: OC.Share.itemShares }, function(result) { + $.get(OC.filePath('core', 'ajax', 'share.php'), { fetch: 'getShareWith', search: search.term.trim(), itemShares: OC.Share.itemShares }, function(result) { $loading.addClass('hidden'); if (result.status == 'success' && result.data.length > 0) { $( "#shareWith" ).autocomplete( "option", "autoFocus", true ); diff --git a/core/l10n/ca.js b/core/l10n/ca.js index ee837ea7b7f..edec2f989f6 100644 --- a/core/l10n/ca.js +++ b/core/l10n/ca.js @@ -184,7 +184,7 @@ OC.L10N.register( "This means only administrators can use the instance." : "Això significa que només els administradors poden usar la instància.", "Contact your system administrator if this message persists or appeared unexpectedly." : "Contacteu amb l'administrador del sistema si aquest missatge persisteix o apareix inesperadament.", "Thank you for your patience." : "Gràcies per la paciència.", - "You are accessing the server from an untrusted domain." : "Esteu accedint el servidor des d'un domini no fiable", + "You are accessing the server from an untrusted domain." : "Esteu accedint al servidor des d'un domini no fiable", "Please contact your administrator. If you are an administrator of this instance, configure the \"trusted_domain\" setting in config/config.php. An example configuration is provided in config/config.sample.php." : "Contacteu amb l'administrador. Si sou un administrador d'aquesta instància, configureu el paràmetre \"trusted_domain\" a config/config.php. Hi ha un exemple de configuració a config/config.sampe.php", "Depending on your configuration, as an administrator you might also be able to use the button below to trust this domain." : "En funció de la teva configuració, com a administrador podries utilitzar el botó d'abaix per confiar en aquest domini.", "Add \"%s\" as trusted domain" : "Afegeix \"%s\" com a domini de confiança", diff --git a/core/l10n/ca.json b/core/l10n/ca.json index 374e9a51440..fea3cdefec2 100644 --- a/core/l10n/ca.json +++ b/core/l10n/ca.json @@ -182,7 +182,7 @@ "This means only administrators can use the instance." : "Això significa que només els administradors poden usar la instància.", "Contact your system administrator if this message persists or appeared unexpectedly." : "Contacteu amb l'administrador del sistema si aquest missatge persisteix o apareix inesperadament.", "Thank you for your patience." : "Gràcies per la paciència.", - "You are accessing the server from an untrusted domain." : "Esteu accedint el servidor des d'un domini no fiable", + "You are accessing the server from an untrusted domain." : "Esteu accedint al servidor des d'un domini no fiable", "Please contact your administrator. If you are an administrator of this instance, configure the \"trusted_domain\" setting in config/config.php. An example configuration is provided in config/config.sample.php." : "Contacteu amb l'administrador. Si sou un administrador d'aquesta instància, configureu el paràmetre \"trusted_domain\" a config/config.php. Hi ha un exemple de configuració a config/config.sampe.php", "Depending on your configuration, as an administrator you might also be able to use the button below to trust this domain." : "En funció de la teva configuració, com a administrador podries utilitzar el botó d'abaix per confiar en aquest domini.", "Add \"%s\" as trusted domain" : "Afegeix \"%s\" com a domini de confiança", diff --git a/core/l10n/da.js b/core/l10n/da.js index a1222792fc5..ea228ee8b81 100644 --- a/core/l10n/da.js +++ b/core/l10n/da.js @@ -106,9 +106,9 @@ OC.L10N.register( "Enter new" : "Indtast nyt", "Delete" : "Slet", "Add" : "Tilføj", - "Edit tags" : "Rediger tags", + "Edit tags" : "Redigér mærker", "Error loading dialog template: {error}" : "Fejl ved indlæsning dialog skabelon: {error}", - "No tags selected for deletion." : "Ingen tags markeret til sletning.", + "No tags selected for deletion." : "Ingen mærker markeret til sletning.", "unknown text" : "ukendt tekst", "Hello world!" : "Hej verden!", "sunny" : "solrigt", @@ -133,11 +133,11 @@ OC.L10N.register( "Apps" : "Apps", "Admin" : "Admin", "Help" : "Hjælp", - "Error loading tags" : "Fejl ved indlæsning af tags", - "Tag already exists" : "Tag eksistere allerede", - "Error deleting tag(s)" : "Fejl ved sletning af tag(s)", - "Error tagging" : "Fejl ved tagging", - "Error untagging" : "Fejl ved fjernelse af tag", + "Error loading tags" : "Fejl ved indlæsning af mærker", + "Tag already exists" : "Mærket eksisterer allerede", + "Error deleting tag(s)" : "Fejl ved sletning af mærke(r)", + "Error tagging" : "Fejl ved opmærkning", + "Error untagging" : "Fejl ved fjernelse af opmærkning", "Error favoriting" : "Fejl ved favoritering", "Error unfavoriting" : "Fejl ved fjernelse af favorisering.", "Access forbidden" : "Adgang forbudt", diff --git a/core/l10n/da.json b/core/l10n/da.json index 5111e5d3e05..021d43e8c7b 100644 --- a/core/l10n/da.json +++ b/core/l10n/da.json @@ -104,9 +104,9 @@ "Enter new" : "Indtast nyt", "Delete" : "Slet", "Add" : "Tilføj", - "Edit tags" : "Rediger tags", + "Edit tags" : "Redigér mærker", "Error loading dialog template: {error}" : "Fejl ved indlæsning dialog skabelon: {error}", - "No tags selected for deletion." : "Ingen tags markeret til sletning.", + "No tags selected for deletion." : "Ingen mærker markeret til sletning.", "unknown text" : "ukendt tekst", "Hello world!" : "Hej verden!", "sunny" : "solrigt", @@ -131,11 +131,11 @@ "Apps" : "Apps", "Admin" : "Admin", "Help" : "Hjælp", - "Error loading tags" : "Fejl ved indlæsning af tags", - "Tag already exists" : "Tag eksistere allerede", - "Error deleting tag(s)" : "Fejl ved sletning af tag(s)", - "Error tagging" : "Fejl ved tagging", - "Error untagging" : "Fejl ved fjernelse af tag", + "Error loading tags" : "Fejl ved indlæsning af mærker", + "Tag already exists" : "Mærket eksisterer allerede", + "Error deleting tag(s)" : "Fejl ved sletning af mærke(r)", + "Error tagging" : "Fejl ved opmærkning", + "Error untagging" : "Fejl ved fjernelse af opmærkning", "Error favoriting" : "Fejl ved favoritering", "Error unfavoriting" : "Fejl ved fjernelse af favorisering.", "Access forbidden" : "Adgang forbudt", diff --git a/core/l10n/fr.js b/core/l10n/fr.js index 87e8b017832..0155b0c90c4 100644 --- a/core/l10n/fr.js +++ b/core/l10n/fr.js @@ -62,7 +62,7 @@ OC.L10N.register( "So-so password" : "Mot de passe tout juste acceptable", "Good password" : "Mot de passe de sécurité suffisante", "Strong password" : "Mot de passe fort", - "Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." : "Votre serveur web n'est pas correctement configuré pour permettre la synchronisation des fichiers, car l'interface WebDav semble ne pas fonctionner.", + "Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." : "Votre serveur web n'est pas correctement configuré pour permettre la synchronisation des fichiers car l'interface WebDav semble ne pas fonctionner.", "This server has no working internet connection. This means that some of the features like mounting of external storage, notifications about updates or installation of 3rd party apps don´t work. Accessing files from remote and sending of notification emails might also not work. We suggest to enable internet connection for this server if you want to have all features." : "Ce serveur ne peut se connecter à internet. Cela signifie que certaines fonctionnalités, telles que le montage de supports de stockage distants, les notifications de mises à jour ou l'installation d'applications tierces ne fonctionneront pas. L'accès aux fichiers à distance, ainsi que les notifications par courriel ne fonctionneront pas non plus. Il est recommandé d'activer la connexion internet pour ce serveur si vous souhaitez disposer de l'ensemble des fonctionnalités offertes.", "Error occurred while checking server setup" : "Une erreur s'est produite lors de la vérification de la configuration du serveur", "Shared" : "Partagé", diff --git a/core/l10n/fr.json b/core/l10n/fr.json index 5b57d86f532..2ddd7d91a39 100644 --- a/core/l10n/fr.json +++ b/core/l10n/fr.json @@ -60,7 +60,7 @@ "So-so password" : "Mot de passe tout juste acceptable", "Good password" : "Mot de passe de sécurité suffisante", "Strong password" : "Mot de passe fort", - "Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." : "Votre serveur web n'est pas correctement configuré pour permettre la synchronisation des fichiers, car l'interface WebDav semble ne pas fonctionner.", + "Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." : "Votre serveur web n'est pas correctement configuré pour permettre la synchronisation des fichiers car l'interface WebDav semble ne pas fonctionner.", "This server has no working internet connection. This means that some of the features like mounting of external storage, notifications about updates or installation of 3rd party apps don´t work. Accessing files from remote and sending of notification emails might also not work. We suggest to enable internet connection for this server if you want to have all features." : "Ce serveur ne peut se connecter à internet. Cela signifie que certaines fonctionnalités, telles que le montage de supports de stockage distants, les notifications de mises à jour ou l'installation d'applications tierces ne fonctionneront pas. L'accès aux fichiers à distance, ainsi que les notifications par courriel ne fonctionneront pas non plus. Il est recommandé d'activer la connexion internet pour ce serveur si vous souhaitez disposer de l'ensemble des fonctionnalités offertes.", "Error occurred while checking server setup" : "Une erreur s'est produite lors de la vérification de la configuration du serveur", "Shared" : "Partagé", diff --git a/core/l10n/ru.js b/core/l10n/ru.js index f3e11f7abda..858595bab64 100644 --- a/core/l10n/ru.js +++ b/core/l10n/ru.js @@ -113,7 +113,7 @@ OC.L10N.register( "Hello world!" : "Привет мир!", "sunny" : "солнечно", "Hello {name}, the weather is {weather}" : "Здравствуйте {name}, погода {weather}", - "_download %n file_::_download %n files_" : ["","",""], + "_download %n file_::_download %n files_" : ["загрузить %n файл","загрузить %n файла","загрузить %n файлов"], "Updating {productName} to version {version}, this may take a while." : "Обновление {productName} до версии {version}, пожалуйста, подождите.", "Please reload the page." : "Пожалуйста, перезагрузите страницу.", "The update was unsuccessful." : "Обновление не удалось.", diff --git a/core/l10n/ru.json b/core/l10n/ru.json index a77cf869064..990a6e9bf9c 100644 --- a/core/l10n/ru.json +++ b/core/l10n/ru.json @@ -111,7 +111,7 @@ "Hello world!" : "Привет мир!", "sunny" : "солнечно", "Hello {name}, the weather is {weather}" : "Здравствуйте {name}, погода {weather}", - "_download %n file_::_download %n files_" : ["","",""], + "_download %n file_::_download %n files_" : ["загрузить %n файл","загрузить %n файла","загрузить %n файлов"], "Updating {productName} to version {version}, this may take a while." : "Обновление {productName} до версии {version}, пожалуйста, подождите.", "Please reload the page." : "Пожалуйста, перезагрузите страницу.", "The update was unsuccessful." : "Обновление не удалось.", diff --git a/core/l10n/sk_SK.js b/core/l10n/sk_SK.js index 28e3a3b4a4d..791863c0e48 100644 --- a/core/l10n/sk_SK.js +++ b/core/l10n/sk_SK.js @@ -173,6 +173,7 @@ OC.L10N.register( "SQLite will be used as database. For larger installations we recommend to change this." : "Ako databáza bude použitá SQLite. Pri väčších inštaláciách odporúčame zmeniť na inú.", "Finish setup" : "Dokončiť inštaláciu", "Finishing …" : "Dokončujem...", + "This application requires JavaScript for correct operation. Please <a href=\"http://enable-javascript.com/\" target=\"_blank\">enable JavaScript</a> and reload the page." : "Táto aplikácia potrebuje JavaScript pre správne fungovanie. Prosím <a href=\"http://enable-javascript.com/\" target=\"_blank\">zapnite si JavaScript</a> a obnovte stránku", "%s is available. Get more information on how to update." : "%s je dostupná. Získajte viac informácií o postupe aktualizácie.", "Log out" : "Odhlásiť", "Server side authentication failed!" : "Autentifikácia na serveri zlyhala!", diff --git a/core/l10n/sk_SK.json b/core/l10n/sk_SK.json index 17daa232693..6a539ccd773 100644 --- a/core/l10n/sk_SK.json +++ b/core/l10n/sk_SK.json @@ -171,6 +171,7 @@ "SQLite will be used as database. For larger installations we recommend to change this." : "Ako databáza bude použitá SQLite. Pri väčších inštaláciách odporúčame zmeniť na inú.", "Finish setup" : "Dokončiť inštaláciu", "Finishing …" : "Dokončujem...", + "This application requires JavaScript for correct operation. Please <a href=\"http://enable-javascript.com/\" target=\"_blank\">enable JavaScript</a> and reload the page." : "Táto aplikácia potrebuje JavaScript pre správne fungovanie. Prosím <a href=\"http://enable-javascript.com/\" target=\"_blank\">zapnite si JavaScript</a> a obnovte stránku", "%s is available. Get more information on how to update." : "%s je dostupná. Získajte viac informácií o postupe aktualizácie.", "Log out" : "Odhlásiť", "Server side authentication failed!" : "Autentifikácia na serveri zlyhala!", diff --git a/core/l10n/sq.js b/core/l10n/sq.js index 246c12bd9ec..d0692b8a63e 100644 --- a/core/l10n/sq.js +++ b/core/l10n/sq.js @@ -35,14 +35,38 @@ OC.L10N.register( "December" : "Dhjetor", "Settings" : "Parametra", "Saving..." : "Duke ruajtur...", + "Couldn't send reset email. Please contact your administrator." : "Emaili i rivendosjes nuk mund të dërgohet. Ju lutem kontaktoni me administratorin.", + "The link to reset your password has been sent to your email. If you do not receive it within a reasonable amount of time, check your spam/junk folders.<br>If it is not there ask your local administrator." : "Lidhja për rivendosjen e kodit tuaj u dërgua tek email-i juaj. Nëse nuk e merrni brenda një kohe të arsyeshme, kontrolloni dosjet e postës së padëshirueshme spam.<br>Nëse nuk është as aty, pyesni administratorin tuaj.", + "Your files are encrypted. If you haven't enabled the recovery key, there will be no way to get your data back after your password is reset.<br />If you are not sure what to do, please contact your administrator before you continue. <br />Do you really want to continue?" : "Skedarët tuaj janë të kodifikuar. Nëse nuk keni aktivizuar çelësin e restaurimit, të dhënat tuaja nuk do të jenë të arritshme pasi të keni rivendosur kodin.<br />Nëse nuk jeni i sigurt, ju lutemi kontaktoni administratorin tuaj përpara se të vazhdoni. Jeni i sigurt që dëshironi të vazhdoni?", + "I know what I'm doing" : "Unë e di se çfarë po bëj", + "Password can not be changed. Please contact your administrator." : "Fjalëkalimi nuk mund të ndryshohet. Ju lutem kontaktoni me administratorin.", "No" : "Jo", "Yes" : "Po", "Choose" : "Zgjidh", + "Error loading file picker template: {error}" : "Gabim gjatë ngarkimit të shabllonit të zgjedhësit të skedarëve: {error}", "Ok" : "Në rregull", - "_{count} file conflict_::_{count} file conflicts_" : ["",""], + "Error loading message template: {error}" : "Gabim gjatë ngarkimit të shabllonit të mesazheve: {error}", + "_{count} file conflict_::_{count} file conflicts_" : ["{count} konflikt skedari","{count} konflikte skedarësh"], + "One file conflict" : "Një konflikt skedari", + "New Files" : "Skedarë të rinj", + "Already existing files" : "Skedarë ekzistues", + "Which files do you want to keep?" : "Cilët skedarë dëshironi të mbani?", + "If you select both versions, the copied file will have a number added to its name." : "Nëse i zgjidhni të dyja versionet, skedarit të kopjuar do ti shtohet një numër në emrin e tij.", "Cancel" : "Anulo", + "Continue" : "Vazhdo", + "(all selected)" : "(të gjitha të zgjedhura)", + "({count} selected)" : "({count} të zgjedhur)", + "Error loading file exists template" : "Gabim gjatë ngarkimit të shabllonit të skedarit ekzistues", + "Very weak password" : "Fjalëkalim shumë i dobët", + "Weak password" : "Fjalëkalim i dobët", + "So-so password" : "Fjalëkalim i pranueshëm", + "Good password" : "Fjalëkalim i mirë", + "Strong password" : "Fjalëkalim shumë i mirë", "Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." : "Web Serveri juaj nuk është konfigurar sic duhet në mënyre që të lejojë sinkronizimin e skedare pasi ndërfaqja WevDAV duket të jetë e demtuar.", + "This server has no working internet connection. This means that some of the features like mounting of external storage, notifications about updates or installation of 3rd party apps don´t work. Accessing files from remote and sending of notification emails might also not work. We suggest to enable internet connection for this server if you want to have all features." : "Ky server nuk ka lidhje në internet. Kjo dmth qe disa nga funksionalitetet si të montohet ruajtje e jashtme, njoftime mbi versione të reja apo instalimi i aplikacioneve nga palë të 3ta nuk do të funksionojnë. Qasja në distancë e skedarëve dhe dërgimi i emaileve njoftues gjithashtu mund të mos funksionojnë. Ju sugjerojmë që të aktivizoni lidhjen në internet për këtë server nëse dëshironi ti keni të gjitha funksionalitetet.", + "Error occurred while checking server setup" : "Gabim gjatë kontrollit të konfigurimit të serverit", "Shared" : "Ndarë", + "Shared with {recipients}" : "Ndarë me {recipients}", "Share" : "Nda", "Error" : "Veprim i gabuar", "Error while sharing" : "Veprim i gabuar gjatë ndarjes", @@ -50,16 +74,22 @@ OC.L10N.register( "Error while changing permissions" : "Veprim i gabuar gjatë ndryshimit të lejeve", "Shared with you and the group {group} by {owner}" : "Ndarë me ju dhe me grupin {group} nga {owner}", "Shared with you by {owner}" : "Ndarë me ju nga {owner}", + "Share with user or group …" : "Ndajeni me përdorues ose grup ...", + "Share link" : "Ndaje lidhjen", + "The public link will expire no later than {days} days after it is created" : "Lidhja publike do të skadojë jo më vonë se {days} ditë pas krijimit", "Password protect" : "Mbro me kod", + "Choose a password for the public link" : "Zgjidhni një fjalëkalim për lidhjen publike", "Allow Public Upload" : "Lejo Ngarkimin Publik", "Email link to person" : "Dërgo email me lidhjen", "Send" : "Dërgo", "Set expiration date" : "Cakto datën e përfundimit", "Expiration date" : "Data e përfundimit", + "Adding user..." : "Duke shtuar përdoruesin ...", "group" : "grupi", "Resharing is not allowed" : "Rindarja nuk lejohet", "Shared in {item} with {user}" : "Ndarë në {item} me {user}", "Unshare" : "Hiq ndarjen", + "notify by email" : "njofto me email", "can share" : "mund të ndajnë", "can edit" : "mund të ndryshosh", "access control" : "kontrollimi i hyrjeve", @@ -71,21 +101,64 @@ OC.L10N.register( "Error setting expiration date" : "Veprim i gabuar gjatë caktimit të datës së përfundimit", "Sending ..." : "Duke dërguar...", "Email sent" : "Email-i u dërgua", + "Warning" : "Kujdes", "The object type is not specified." : "Nuk është specifikuar tipi i objektit.", + "Enter new" : "Jep të re", "Delete" : "Elimino", "Add" : "Shto", - "_download %n file_::_download %n files_" : ["",""], + "Edit tags" : "Modifiko tag", + "Error loading dialog template: {error}" : "Gabim gjatë ngarkimit të shabllonit: {error}", + "No tags selected for deletion." : "Nuk është zgjedhur asnjë tag për fshirje.", + "unknown text" : "tekst i panjohur", + "Hello world!" : "Përshendetje të gjithëve!", + "sunny" : "diell", + "Hello {name}, the weather is {weather}" : "Përshëndetje {name}, koha është {weather}", + "_download %n file_::_download %n files_" : ["shkarko %n skedar","shkarko %n skedarë"], + "Updating {productName} to version {version}, this may take a while." : "Po përditësoj {productName} në versionin {version}, kjo mund të zgjasë pak.", + "Please reload the page." : "Ju lutem ringarkoni faqen.", + "The update was unsuccessful." : "Përditësimi nuk rezultoi me sukses.", "The update was successful. Redirecting you to ownCloud now." : "Azhurnimi u krye. Tani do t'ju kaloj tek ownCloud-i.", + "Couldn't reset password because the token is invalid" : "Nuk mund të rivendos fjalëkalimin sepse shenja është e pavlefshme.", + "Couldn't send reset email. Please make sure your username is correct." : "Emaili i rivendosjes nuk mund të dërgohet. Ju lutem sigurohuni që përdoruesi juaj është i saktë.", + "Couldn't send reset email because there is no email address for this username. Please contact your administrator." : "Emaili i rivendosjes nuk mund të dërgohet sepse nuk ekziston asnjë adresë email për këtë përdorues. Ju lutem kontaktoni me administratorin.", "%s password reset" : "Kodi i %s -it u rivendos", "Use the following link to reset your password: {link}" : "Përdorni lidhjen në vijim për të rivendosur kodin: {link}", "New password" : "Kodi i ri", + "New Password" : "Fjalëkalim i ri", "Reset password" : "Rivendos kodin", + "Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Mac OS X nuk është i mbështetur dhe %s nuk do të funksionojë si duhet në këtë platformë. Përdoreni nën përgjegjësinë tuaj!", + "For the best results, please consider using a GNU/Linux server instead." : "Për të arritur rezultatet më të mira të mundshme, ju lutem më mirë konsideroni përdorimin e një serveri GNU/Linux.", "Personal" : "Personale", "Users" : "Përdoruesit", "Apps" : "App", "Admin" : "Admin", "Help" : "Ndihmë", + "Error loading tags" : "Gabim gjatë ngarkimit të etiketave.", + "Tag already exists" : "Etiketa ekziston", + "Error deleting tag(s)" : "Gabim gjatë fshirjes së etiketës(ave)", + "Error tagging" : "Gabim etiketimi", + "Error untagging" : "Gabim në heqjen e etiketës", + "Error favoriting" : "Gabim në ruajtjen si të preferuar", + "Error unfavoriting" : "Gabim në heqjen nga të preferuarat", "Access forbidden" : "Ndalohet hyrja", + "File not found" : "Skedari nuk mund të gjendet", + "The specified document has not been found on the server." : "Dokumenti i përcaktuar nuk mund të gjendet në server.", + "You can click here to return to %s." : "Ju mund të klikoni këtu për tu kthyer në %s.", + "Hey there,\n\njust letting you know that %s shared %s with you.\nView it: %s\n\n" : "Tungjatjeta,\n\nju njoftojmë se %s ka ndarë %s me ju.\nShikojeni në: %s\n\n", + "The share will expire on %s." : "Ndarja do të skadojë në %s.", + "Cheers!" : "Gjithë të mirat", + "Internal Server Error" : "Gabim i brendshëm në server", + "The server encountered an internal error and was unable to complete your request." : "Serveri u përball me një gabim të brendshem dhe nuk mundet të mbarojë detyrën që i keni ngarkuar.", + "Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report." : "Ju lutem kontaktoni me administratorin e serverit nëse ky gabim shfaqet herë të tjera, ju lutem përfshini dhe detajet e mëposhtme teknike në raportin tuaj.", + "More details can be found in the server log." : "Detaje të mëtejshme mund të gjenden në listën e veprimeve të serverit.", + "Technical details" : "Detaje teknike", + "Remote Address: %s" : "Adresa tjetër: %s", + "Request ID: %s" : "ID e kërkesës: %s", + "Code: %s" : "Kodi: %s", + "Message: %s" : "Mesazhi: %s", + "File: %s" : "Skedari: %s", + "Line: %s" : "Rreshti: %s", + "Trace" : "Gjurmim", "Security Warning" : "Paralajmërim sigurie", "Your PHP version is vulnerable to the NULL Byte attack (CVE-2006-7243)" : "Versioni juaj i PHP-së është i cënueshëm nga sulmi NULL Byte (CVE-2006-7243)", "Please update your PHP installation to use %s securely." : "Ju lutem azhurnoni instalimin tuaj të PHP-së që të përdorni %s -in në mënyrë të sigurt.", @@ -94,18 +167,43 @@ OC.L10N.register( "Create an <strong>admin account</strong>" : "Krijo një <strong>llogari administruesi</strong>", "Username" : "Përdoruesi", "Password" : "Kodi", + "Storage & database" : "Ruajtja dhe baza e të dhënave", "Data folder" : "Emri i dosjes", "Configure the database" : "Konfiguro database-in", + "Only %s is available." : "Vetëm %s është e disponueshme.", "Database user" : "Përdoruesi i database-it", "Database password" : "Kodi i database-it", "Database name" : "Emri i database-it", "Database tablespace" : "Tablespace-i i database-it", "Database host" : "Pozicioni (host) i database-it", + "SQLite will be used as database. For larger installations we recommend to change this." : "SQLite do të përdoret si bazë të dhënash. Për instalime më të mëdha ju rekomandojmë që ta ndryshoni këtë.", "Finish setup" : "Mbaro setup-in", + "Finishing …" : "Duke përfunduar ...", + "This application requires JavaScript for correct operation. Please <a href=\"http://enable-javascript.com/\" target=\"_blank\">enable JavaScript</a> and reload the page." : "Këtij aplikacioni i nevojitet JavaScript për funksionim të rregullt. Ju lutem <a href=\"http://enable-javascript.com/\" target=\"_blank\">aktivizoni JavaScript</a> dhe ringarkoni faqen.", "%s is available. Get more information on how to update." : "%s është i disponueshëm. Merrni më shumë informacione mbi azhurnimin.", "Log out" : "Dalje", + "Server side authentication failed!" : "Verifikimi në krahun e serverit dështoi!", + "Please contact your administrator." : "Ju lutem kontaktoni administratorin.", + "Forgot your password? Reset it!" : "Keni harruar fjalëkalimin tuaj? Rivendoseni!", "remember" : "kujto", "Log in" : "Hyrje", - "Alternative Logins" : "Hyrje alternative" + "Alternative Logins" : "Hyrje alternative", + "Hey there,<br><br>just letting you know that %s shared <strong>%s</strong> with you.<br><a href=\"%s\">View it!</a><br><br>" : "Tungjatjeta,<br><br>dëshirojmë t'ju njoftojmë se %s ka ndarë <strong>%s</strong> me ju.<br><a href=\"%s\">Klikoni këtu për ta shikuar!</a><br>", + "This ownCloud instance is currently in single user mode." : "Kjo instancë ownCloud është aktualisht në gjendje me përdorues të vetëm.", + "This means only administrators can use the instance." : "Kjo dmth që vetëm administratorët mund të shfrytëzojnë instancën.", + "Contact your system administrator if this message persists or appeared unexpectedly." : "Kontaktoni administratorin e sistemit nëse ky mesazh vazhdon ose është shfaqur papritmas.", + "Thank you for your patience." : "Ju faleminderit për durimin tuaj.", + "You are accessing the server from an untrusted domain." : "Ju po qaseni në server nga një domain jo i besuar.", + "Please contact your administrator. If you are an administrator of this instance, configure the \"trusted_domain\" setting in config/config.php. An example configuration is provided in config/config.sample.php." : "Ju lutem kontaktoni me administratorin. Nëse jeni administrator i kësaj instance, konfiguroni parametrin \"domain i besuar\" në config/config.php . Një konfigurim shembull është dhënë në 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." : "Në varësi të konfigurimit tuaj, ju si administrator mundet gjithashtu të jeni i aftë të përdorni butonin e mëposhtëm për ti dhënë besim këtij domain.", + "Add \"%s\" as trusted domain" : "Shtoni \"%s\" si domain të besuar", + "%s will be updated to version %s." : "%s to të përditësohet në versionin %s.", + "The following apps will be disabled:" : "Keto aplikacione do të bllokohen:", + "The theme %s has been disabled." : "Tema %s u bllokua.", + "Please make sure that the database, the config folder and the data folder have been backed up before proceeding." : "Ju lutem sigurohuni që bazës së të dhënave, dosjes së konfigurimit dhe dosjes së të dhënave ti jetë bërë një kopje rezervë përpara se të vazhdoni më tutje.", + "Start update" : "Fillo përditësimin.", + "To avoid timeouts with larger installations, you can instead run the following command from your installation directory:" : "Për të shmangur momente bllokimi gjatë punës me instalime të mëdha, në vend të kësaj ju mund të kryeni komandën e mëposhtme nga dosja juaj e instalimit:", + "This %s instance is currently being updated, which may take a while." : "Kjo instancë %s është në proces përditësimi, i cili mund të zgjasë pak kohë.", + "This page will refresh itself when the %s instance is available again." : "Kjo faqe do të ringarkohet automatikisht kur instanca %s të jetë sërish e disponueshme." }, "nplurals=2; plural=(n != 1);"); diff --git a/core/l10n/sq.json b/core/l10n/sq.json index e183fafb33c..3cf8cae21d3 100644 --- a/core/l10n/sq.json +++ b/core/l10n/sq.json @@ -33,14 +33,38 @@ "December" : "Dhjetor", "Settings" : "Parametra", "Saving..." : "Duke ruajtur...", + "Couldn't send reset email. Please contact your administrator." : "Emaili i rivendosjes nuk mund të dërgohet. Ju lutem kontaktoni me administratorin.", + "The link to reset your password has been sent to your email. If you do not receive it within a reasonable amount of time, check your spam/junk folders.<br>If it is not there ask your local administrator." : "Lidhja për rivendosjen e kodit tuaj u dërgua tek email-i juaj. Nëse nuk e merrni brenda një kohe të arsyeshme, kontrolloni dosjet e postës së padëshirueshme spam.<br>Nëse nuk është as aty, pyesni administratorin tuaj.", + "Your files are encrypted. If you haven't enabled the recovery key, there will be no way to get your data back after your password is reset.<br />If you are not sure what to do, please contact your administrator before you continue. <br />Do you really want to continue?" : "Skedarët tuaj janë të kodifikuar. Nëse nuk keni aktivizuar çelësin e restaurimit, të dhënat tuaja nuk do të jenë të arritshme pasi të keni rivendosur kodin.<br />Nëse nuk jeni i sigurt, ju lutemi kontaktoni administratorin tuaj përpara se të vazhdoni. Jeni i sigurt që dëshironi të vazhdoni?", + "I know what I'm doing" : "Unë e di se çfarë po bëj", + "Password can not be changed. Please contact your administrator." : "Fjalëkalimi nuk mund të ndryshohet. Ju lutem kontaktoni me administratorin.", "No" : "Jo", "Yes" : "Po", "Choose" : "Zgjidh", + "Error loading file picker template: {error}" : "Gabim gjatë ngarkimit të shabllonit të zgjedhësit të skedarëve: {error}", "Ok" : "Në rregull", - "_{count} file conflict_::_{count} file conflicts_" : ["",""], + "Error loading message template: {error}" : "Gabim gjatë ngarkimit të shabllonit të mesazheve: {error}", + "_{count} file conflict_::_{count} file conflicts_" : ["{count} konflikt skedari","{count} konflikte skedarësh"], + "One file conflict" : "Një konflikt skedari", + "New Files" : "Skedarë të rinj", + "Already existing files" : "Skedarë ekzistues", + "Which files do you want to keep?" : "Cilët skedarë dëshironi të mbani?", + "If you select both versions, the copied file will have a number added to its name." : "Nëse i zgjidhni të dyja versionet, skedarit të kopjuar do ti shtohet një numër në emrin e tij.", "Cancel" : "Anulo", + "Continue" : "Vazhdo", + "(all selected)" : "(të gjitha të zgjedhura)", + "({count} selected)" : "({count} të zgjedhur)", + "Error loading file exists template" : "Gabim gjatë ngarkimit të shabllonit të skedarit ekzistues", + "Very weak password" : "Fjalëkalim shumë i dobët", + "Weak password" : "Fjalëkalim i dobët", + "So-so password" : "Fjalëkalim i pranueshëm", + "Good password" : "Fjalëkalim i mirë", + "Strong password" : "Fjalëkalim shumë i mirë", "Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." : "Web Serveri juaj nuk është konfigurar sic duhet në mënyre që të lejojë sinkronizimin e skedare pasi ndërfaqja WevDAV duket të jetë e demtuar.", + "This server has no working internet connection. This means that some of the features like mounting of external storage, notifications about updates or installation of 3rd party apps don´t work. Accessing files from remote and sending of notification emails might also not work. We suggest to enable internet connection for this server if you want to have all features." : "Ky server nuk ka lidhje në internet. Kjo dmth qe disa nga funksionalitetet si të montohet ruajtje e jashtme, njoftime mbi versione të reja apo instalimi i aplikacioneve nga palë të 3ta nuk do të funksionojnë. Qasja në distancë e skedarëve dhe dërgimi i emaileve njoftues gjithashtu mund të mos funksionojnë. Ju sugjerojmë që të aktivizoni lidhjen në internet për këtë server nëse dëshironi ti keni të gjitha funksionalitetet.", + "Error occurred while checking server setup" : "Gabim gjatë kontrollit të konfigurimit të serverit", "Shared" : "Ndarë", + "Shared with {recipients}" : "Ndarë me {recipients}", "Share" : "Nda", "Error" : "Veprim i gabuar", "Error while sharing" : "Veprim i gabuar gjatë ndarjes", @@ -48,16 +72,22 @@ "Error while changing permissions" : "Veprim i gabuar gjatë ndryshimit të lejeve", "Shared with you and the group {group} by {owner}" : "Ndarë me ju dhe me grupin {group} nga {owner}", "Shared with you by {owner}" : "Ndarë me ju nga {owner}", + "Share with user or group …" : "Ndajeni me përdorues ose grup ...", + "Share link" : "Ndaje lidhjen", + "The public link will expire no later than {days} days after it is created" : "Lidhja publike do të skadojë jo më vonë se {days} ditë pas krijimit", "Password protect" : "Mbro me kod", + "Choose a password for the public link" : "Zgjidhni një fjalëkalim për lidhjen publike", "Allow Public Upload" : "Lejo Ngarkimin Publik", "Email link to person" : "Dërgo email me lidhjen", "Send" : "Dërgo", "Set expiration date" : "Cakto datën e përfundimit", "Expiration date" : "Data e përfundimit", + "Adding user..." : "Duke shtuar përdoruesin ...", "group" : "grupi", "Resharing is not allowed" : "Rindarja nuk lejohet", "Shared in {item} with {user}" : "Ndarë në {item} me {user}", "Unshare" : "Hiq ndarjen", + "notify by email" : "njofto me email", "can share" : "mund të ndajnë", "can edit" : "mund të ndryshosh", "access control" : "kontrollimi i hyrjeve", @@ -69,21 +99,64 @@ "Error setting expiration date" : "Veprim i gabuar gjatë caktimit të datës së përfundimit", "Sending ..." : "Duke dërguar...", "Email sent" : "Email-i u dërgua", + "Warning" : "Kujdes", "The object type is not specified." : "Nuk është specifikuar tipi i objektit.", + "Enter new" : "Jep të re", "Delete" : "Elimino", "Add" : "Shto", - "_download %n file_::_download %n files_" : ["",""], + "Edit tags" : "Modifiko tag", + "Error loading dialog template: {error}" : "Gabim gjatë ngarkimit të shabllonit: {error}", + "No tags selected for deletion." : "Nuk është zgjedhur asnjë tag për fshirje.", + "unknown text" : "tekst i panjohur", + "Hello world!" : "Përshendetje të gjithëve!", + "sunny" : "diell", + "Hello {name}, the weather is {weather}" : "Përshëndetje {name}, koha është {weather}", + "_download %n file_::_download %n files_" : ["shkarko %n skedar","shkarko %n skedarë"], + "Updating {productName} to version {version}, this may take a while." : "Po përditësoj {productName} në versionin {version}, kjo mund të zgjasë pak.", + "Please reload the page." : "Ju lutem ringarkoni faqen.", + "The update was unsuccessful." : "Përditësimi nuk rezultoi me sukses.", "The update was successful. Redirecting you to ownCloud now." : "Azhurnimi u krye. Tani do t'ju kaloj tek ownCloud-i.", + "Couldn't reset password because the token is invalid" : "Nuk mund të rivendos fjalëkalimin sepse shenja është e pavlefshme.", + "Couldn't send reset email. Please make sure your username is correct." : "Emaili i rivendosjes nuk mund të dërgohet. Ju lutem sigurohuni që përdoruesi juaj është i saktë.", + "Couldn't send reset email because there is no email address for this username. Please contact your administrator." : "Emaili i rivendosjes nuk mund të dërgohet sepse nuk ekziston asnjë adresë email për këtë përdorues. Ju lutem kontaktoni me administratorin.", "%s password reset" : "Kodi i %s -it u rivendos", "Use the following link to reset your password: {link}" : "Përdorni lidhjen në vijim për të rivendosur kodin: {link}", "New password" : "Kodi i ri", + "New Password" : "Fjalëkalim i ri", "Reset password" : "Rivendos kodin", + "Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Mac OS X nuk është i mbështetur dhe %s nuk do të funksionojë si duhet në këtë platformë. Përdoreni nën përgjegjësinë tuaj!", + "For the best results, please consider using a GNU/Linux server instead." : "Për të arritur rezultatet më të mira të mundshme, ju lutem më mirë konsideroni përdorimin e një serveri GNU/Linux.", "Personal" : "Personale", "Users" : "Përdoruesit", "Apps" : "App", "Admin" : "Admin", "Help" : "Ndihmë", + "Error loading tags" : "Gabim gjatë ngarkimit të etiketave.", + "Tag already exists" : "Etiketa ekziston", + "Error deleting tag(s)" : "Gabim gjatë fshirjes së etiketës(ave)", + "Error tagging" : "Gabim etiketimi", + "Error untagging" : "Gabim në heqjen e etiketës", + "Error favoriting" : "Gabim në ruajtjen si të preferuar", + "Error unfavoriting" : "Gabim në heqjen nga të preferuarat", "Access forbidden" : "Ndalohet hyrja", + "File not found" : "Skedari nuk mund të gjendet", + "The specified document has not been found on the server." : "Dokumenti i përcaktuar nuk mund të gjendet në server.", + "You can click here to return to %s." : "Ju mund të klikoni këtu për tu kthyer në %s.", + "Hey there,\n\njust letting you know that %s shared %s with you.\nView it: %s\n\n" : "Tungjatjeta,\n\nju njoftojmë se %s ka ndarë %s me ju.\nShikojeni në: %s\n\n", + "The share will expire on %s." : "Ndarja do të skadojë në %s.", + "Cheers!" : "Gjithë të mirat", + "Internal Server Error" : "Gabim i brendshëm në server", + "The server encountered an internal error and was unable to complete your request." : "Serveri u përball me një gabim të brendshem dhe nuk mundet të mbarojë detyrën që i keni ngarkuar.", + "Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report." : "Ju lutem kontaktoni me administratorin e serverit nëse ky gabim shfaqet herë të tjera, ju lutem përfshini dhe detajet e mëposhtme teknike në raportin tuaj.", + "More details can be found in the server log." : "Detaje të mëtejshme mund të gjenden në listën e veprimeve të serverit.", + "Technical details" : "Detaje teknike", + "Remote Address: %s" : "Adresa tjetër: %s", + "Request ID: %s" : "ID e kërkesës: %s", + "Code: %s" : "Kodi: %s", + "Message: %s" : "Mesazhi: %s", + "File: %s" : "Skedari: %s", + "Line: %s" : "Rreshti: %s", + "Trace" : "Gjurmim", "Security Warning" : "Paralajmërim sigurie", "Your PHP version is vulnerable to the NULL Byte attack (CVE-2006-7243)" : "Versioni juaj i PHP-së është i cënueshëm nga sulmi NULL Byte (CVE-2006-7243)", "Please update your PHP installation to use %s securely." : "Ju lutem azhurnoni instalimin tuaj të PHP-së që të përdorni %s -in në mënyrë të sigurt.", @@ -92,18 +165,43 @@ "Create an <strong>admin account</strong>" : "Krijo një <strong>llogari administruesi</strong>", "Username" : "Përdoruesi", "Password" : "Kodi", + "Storage & database" : "Ruajtja dhe baza e të dhënave", "Data folder" : "Emri i dosjes", "Configure the database" : "Konfiguro database-in", + "Only %s is available." : "Vetëm %s është e disponueshme.", "Database user" : "Përdoruesi i database-it", "Database password" : "Kodi i database-it", "Database name" : "Emri i database-it", "Database tablespace" : "Tablespace-i i database-it", "Database host" : "Pozicioni (host) i database-it", + "SQLite will be used as database. For larger installations we recommend to change this." : "SQLite do të përdoret si bazë të dhënash. Për instalime më të mëdha ju rekomandojmë që ta ndryshoni këtë.", "Finish setup" : "Mbaro setup-in", + "Finishing …" : "Duke përfunduar ...", + "This application requires JavaScript for correct operation. Please <a href=\"http://enable-javascript.com/\" target=\"_blank\">enable JavaScript</a> and reload the page." : "Këtij aplikacioni i nevojitet JavaScript për funksionim të rregullt. Ju lutem <a href=\"http://enable-javascript.com/\" target=\"_blank\">aktivizoni JavaScript</a> dhe ringarkoni faqen.", "%s is available. Get more information on how to update." : "%s është i disponueshëm. Merrni më shumë informacione mbi azhurnimin.", "Log out" : "Dalje", + "Server side authentication failed!" : "Verifikimi në krahun e serverit dështoi!", + "Please contact your administrator." : "Ju lutem kontaktoni administratorin.", + "Forgot your password? Reset it!" : "Keni harruar fjalëkalimin tuaj? Rivendoseni!", "remember" : "kujto", "Log in" : "Hyrje", - "Alternative Logins" : "Hyrje alternative" + "Alternative Logins" : "Hyrje alternative", + "Hey there,<br><br>just letting you know that %s shared <strong>%s</strong> with you.<br><a href=\"%s\">View it!</a><br><br>" : "Tungjatjeta,<br><br>dëshirojmë t'ju njoftojmë se %s ka ndarë <strong>%s</strong> me ju.<br><a href=\"%s\">Klikoni këtu për ta shikuar!</a><br>", + "This ownCloud instance is currently in single user mode." : "Kjo instancë ownCloud është aktualisht në gjendje me përdorues të vetëm.", + "This means only administrators can use the instance." : "Kjo dmth që vetëm administratorët mund të shfrytëzojnë instancën.", + "Contact your system administrator if this message persists or appeared unexpectedly." : "Kontaktoni administratorin e sistemit nëse ky mesazh vazhdon ose është shfaqur papritmas.", + "Thank you for your patience." : "Ju faleminderit për durimin tuaj.", + "You are accessing the server from an untrusted domain." : "Ju po qaseni në server nga një domain jo i besuar.", + "Please contact your administrator. If you are an administrator of this instance, configure the \"trusted_domain\" setting in config/config.php. An example configuration is provided in config/config.sample.php." : "Ju lutem kontaktoni me administratorin. Nëse jeni administrator i kësaj instance, konfiguroni parametrin \"domain i besuar\" në config/config.php . Një konfigurim shembull është dhënë në 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." : "Në varësi të konfigurimit tuaj, ju si administrator mundet gjithashtu të jeni i aftë të përdorni butonin e mëposhtëm për ti dhënë besim këtij domain.", + "Add \"%s\" as trusted domain" : "Shtoni \"%s\" si domain të besuar", + "%s will be updated to version %s." : "%s to të përditësohet në versionin %s.", + "The following apps will be disabled:" : "Keto aplikacione do të bllokohen:", + "The theme %s has been disabled." : "Tema %s u bllokua.", + "Please make sure that the database, the config folder and the data folder have been backed up before proceeding." : "Ju lutem sigurohuni që bazës së të dhënave, dosjes së konfigurimit dhe dosjes së të dhënave ti jetë bërë një kopje rezervë përpara se të vazhdoni më tutje.", + "Start update" : "Fillo përditësimin.", + "To avoid timeouts with larger installations, you can instead run the following command from your installation directory:" : "Për të shmangur momente bllokimi gjatë punës me instalime të mëdha, në vend të kësaj ju mund të kryeni komandën e mëposhtme nga dosja juaj e instalimit:", + "This %s instance is currently being updated, which may take a while." : "Kjo instancë %s është në proces përditësimi, i cili mund të zgjasë pak kohë.", + "This page will refresh itself when the %s instance is available again." : "Kjo faqe do të ringarkohet automatikisht kur instanca %s të jetë sërish e disponueshme." },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/core/setup/controller.php b/core/setup/controller.php index 39272120106..5a52b18f73b 100644 --- a/core/setup/controller.php +++ b/core/setup/controller.php @@ -12,13 +12,21 @@ namespace OC\Core\Setup; use OCP\IConfig; class Controller { - /** @var \OCP\IConfig */ + /** + * @var \OCP\IConfig + */ protected $config; /** + * @var string + */ + private $autoConfigFile; + + /** * @param IConfig $config */ function __construct(IConfig $config) { + $this->autoConfigFile = \OC::$SERVERROOT.'/config/autoconfig.php'; $this->config = $config; } @@ -64,15 +72,17 @@ class Controller { } public function finishSetup() { + if( file_exists( $this->autoConfigFile )) { + unlink($this->autoConfigFile); + } \OC_Util::redirectToDefaultPage(); } public function loadAutoConfig($post) { - $autosetup_file = \OC::$SERVERROOT.'/config/autoconfig.php'; - if( file_exists( $autosetup_file )) { + if( file_exists($this->autoConfigFile)) { \OC_Log::write('core', 'Autoconfig file found, setting up owncloud...', \OC_Log::INFO); $AUTOCONFIG = array(); - include $autosetup_file; + include $this->autoConfigFile; $post = array_merge ($post, $AUTOCONFIG); } @@ -82,9 +92,6 @@ class Controller { if ($dbIsSet AND $directoryIsSet AND $adminAccountIsSet) { $post['install'] = 'true'; - if( file_exists( $autosetup_file )) { - unlink($autosetup_file); - } } $post['dbIsSet'] = $dbIsSet; $post['directoryIsSet'] = $directoryIsSet; diff --git a/core/templates/login.php b/core/templates/login.php index 425c3db75c8..86a1b605df5 100644 --- a/core/templates/login.php +++ b/core/templates/login.php @@ -1,5 +1,5 @@ <?php /** @var $l OC_L10N */ ?> -<?php script('core', 'jstz') ?> +<?php vendor_script('jsTimezoneDetect/jstz') ?> <!--[if IE 8]><style>input[type="checkbox"]{padding:0;}</style><![endif]--> <form method="post" name="login"> diff --git a/core/vendor/.gitignore b/core/vendor/.gitignore index e76afeb476d..36748f845a6 100644 --- a/core/vendor/.gitignore +++ b/core/vendor/.gitignore @@ -1,6 +1,5 @@ test/ src/ -.bower.json bower.json .gitignore .jshintrc @@ -8,12 +7,14 @@ bower.json CHANGELOG* Gemfile gruntfile.js +Gruntfile.js Makefile package.json README* # underscore underscore/** +!underscore/.bower.json !underscore/underscore.js !underscore/LICENSE @@ -28,10 +29,12 @@ moment/benchmarks moment/locale moment/min/** moment/moment.js +moment/scripts !moment/min/moment-with-locales.js # jquery jquery/** +!jquery/.bower.json !jquery/jquery* !jquery/MIT-LICENSE.txt @@ -42,12 +45,17 @@ jcrop/css/jquery.Jcrop.min.css jcrop/js/** !jcrop/js/jquery.Jcrop.js +# jsTimezoneDetect +jsTimezoneDetect/jstz.min.js + # handlebars handlebars/** +!handlebars/.bower.json !handlebars/handlebars.js # select2 select2/** +!select2/.bower.json !select2/select2.js !select2/select2.css !select2/select2.png @@ -57,6 +65,7 @@ select2/** #zxcvbn zxcvbn/** +!zxcvbn/.bower.json !zxcvbn/zxcvbn.js !zxcvbn/LICENSE.txt diff --git a/core/vendor/blueimp-md5/.bower.json b/core/vendor/blueimp-md5/.bower.json new file mode 100644 index 00000000000..89288baad76 --- /dev/null +++ b/core/vendor/blueimp-md5/.bower.json @@ -0,0 +1,53 @@ +{ + "name": "blueimp-md5", + "version": "1.0.3", + "title": "JavaScript MD5", + "description": "JavaScript MD5 implementation.", + "keywords": [ + "javascript", + "md5" + ], + "homepage": "https://github.com/blueimp/JavaScript-MD5", + "author": { + "name": "Sebastian Tschan", + "url": "https://blueimp.net" + }, + "maintainers": [ + { + "name": "Sebastian Tschan", + "url": "https://blueimp.net" + } + ], + "contributors": [ + { + "name": "Paul Johnston", + "url": "http://pajhome.org.uk/crypt/md5" + } + ], + "repository": { + "type": "git", + "url": "git://github.com/blueimp/JavaScript-MD5.git" + }, + "bugs": "https://github.com/blueimp/JavaScript-MD5/issues", + "licenses": [ + { + "type": "MIT", + "url": "http://www.opensource.org/licenses/MIT" + } + ], + "devDependencies": { + "mocha": "1.11.0", + "expect.js": "0.2.0", + "uglify-js": "2.3.6" + }, + "main": "js/md5.js", + "_release": "1.0.3", + "_resolution": { + "type": "version", + "tag": "1.0.3", + "commit": "299407012031ac6f60f832d3b5fa975fcb88b550" + }, + "_source": "git://github.com/blueimp/JavaScript-MD5.git", + "_target": "~1.0.1", + "_originalSource": "blueimp-md5" +}
\ No newline at end of file diff --git a/core/vendor/handlebars/.bower.json b/core/vendor/handlebars/.bower.json new file mode 100644 index 00000000000..2d17a2faacb --- /dev/null +++ b/core/vendor/handlebars/.bower.json @@ -0,0 +1,16 @@ +{ + "name": "handlebars", + "version": "1.3.0", + "main": "handlebars.js", + "dependencies": {}, + "homepage": "https://github.com/components/handlebars.js", + "_release": "1.3.0", + "_resolution": { + "type": "version", + "tag": "v1.3.0", + "commit": "ddd21a44be399ae4de486ddd868bacf84e92b9c4" + }, + "_source": "git://github.com/components/handlebars.js.git", + "_target": "~1.3.0", + "_originalSource": "handlebars" +}
\ No newline at end of file diff --git a/core/vendor/jcrop/.bower.json b/core/vendor/jcrop/.bower.json new file mode 100644 index 00000000000..4fba44732cf --- /dev/null +++ b/core/vendor/jcrop/.bower.json @@ -0,0 +1,14 @@ +{ + "name": "jcrop", + "homepage": "https://github.com/tapmodo/Jcrop", + "version": "0.9.12", + "_release": "0.9.12", + "_resolution": { + "type": "version", + "tag": "v0.9.12", + "commit": "1902fbc6afa14481dc019a17e0dcb7d62b808a98" + }, + "_source": "git://github.com/tapmodo/Jcrop.git", + "_target": "~0.9.12", + "_originalSource": "jcrop" +}
\ No newline at end of file diff --git a/core/vendor/jquery/.bower.json b/core/vendor/jquery/.bower.json new file mode 100644 index 00000000000..72b99da7090 --- /dev/null +++ b/core/vendor/jquery/.bower.json @@ -0,0 +1,21 @@ +{ + "name": "jquery", + "version": "1.10.2", + "description": "jQuery component", + "keywords": [ + "jquery", + "component" + ], + "main": "jquery.js", + "license": "MIT", + "homepage": "https://github.com/jquery/jquery", + "_release": "1.10.2", + "_resolution": { + "type": "version", + "tag": "1.10.2", + "commit": "16b079b164d62bd807c612806842a13bf9b04d17" + }, + "_source": "git://github.com/jquery/jquery.git", + "_target": "~1.10.0", + "_originalSource": "jquery" +}
\ No newline at end of file diff --git a/core/vendor/jsTimezoneDetect/.bower.json b/core/vendor/jsTimezoneDetect/.bower.json new file mode 100644 index 00000000000..2a3668ff309 --- /dev/null +++ b/core/vendor/jsTimezoneDetect/.bower.json @@ -0,0 +1,23 @@ +{ + "name": "jstzdetect", + "version": "1.0.6", + "main": "jstz.min.js", + "ignore": [ + "**/.*", + "node_modules", + "components", + "bower_components", + "test", + "tests" + ], + "homepage": "https://github.com/HenningM/jstimezonedetect", + "_release": "1.0.6", + "_resolution": { + "type": "version", + "tag": "v1.0.6", + "commit": "bd595ed253292934991a414979007f3d51a1547d" + }, + "_source": "git://github.com/HenningM/jstimezonedetect.git", + "_target": "~1.0.5", + "_originalSource": "jsTimezoneDetect" +}
\ No newline at end of file diff --git a/core/vendor/jsTimezoneDetect/LICENCE.txt b/core/vendor/jsTimezoneDetect/LICENCE.txt new file mode 100644 index 00000000000..c48af16c647 --- /dev/null +++ b/core/vendor/jsTimezoneDetect/LICENCE.txt @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2012 Jon Nylander, project maintained at +https://bitbucket.org/pellepim/jstimezonedetect + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to +do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE.
\ No newline at end of file diff --git a/core/vendor/jsTimezoneDetect/jstz.js b/core/vendor/jsTimezoneDetect/jstz.js new file mode 100644 index 00000000000..6f38183f856 --- /dev/null +++ b/core/vendor/jsTimezoneDetect/jstz.js @@ -0,0 +1,358 @@ +/**
+ * This script gives you the zone info key representing your device's time zone setting.
+ *
+ * @name jsTimezoneDetect
+ * @version 1.0.5
+ * @author Jon Nylander
+ * @license MIT License - http://www.opensource.org/licenses/mit-license.php
+ *
+ * For usage and examples, visit:
+ * http://pellepim.bitbucket.org/jstz/
+ *
+ * Copyright (c) Jon Nylander
+ */
+
+/*jslint undef: true */
+/*global console, exports*/
+
+(function(root) {
+ /**
+ * Namespace to hold all the code for timezone detection.
+ */
+ var jstz = (function () {
+ 'use strict';
+ var HEMISPHERE_SOUTH = 's',
+
+ /**
+ * Gets the offset in minutes from UTC for a certain date.
+ * @param {Date} date
+ * @returns {Number}
+ */
+ get_date_offset = function (date) {
+ var offset = -date.getTimezoneOffset();
+ return (offset !== null ? offset : 0);
+ },
+
+ get_date = function (year, month, date) {
+ var d = new Date();
+ if (year !== undefined) {
+ d.setFullYear(year);
+ }
+ d.setMonth(month);
+ d.setDate(date);
+ return d;
+ },
+
+ get_january_offset = function (year) {
+ return get_date_offset(get_date(year, 0 ,2));
+ },
+
+ get_june_offset = function (year) {
+ return get_date_offset(get_date(year, 5, 2));
+ },
+
+ /**
+ * Private method.
+ * Checks whether a given date is in daylight saving time.
+ * If the date supplied is after august, we assume that we're checking
+ * for southern hemisphere DST.
+ * @param {Date} date
+ * @returns {Boolean}
+ */
+ date_is_dst = function (date) {
+ var is_southern = date.getMonth() > 7,
+ base_offset = is_southern ? get_june_offset(date.getFullYear()) :
+ get_january_offset(date.getFullYear()),
+ date_offset = get_date_offset(date),
+ is_west = base_offset < 0,
+ dst_offset = base_offset - date_offset;
+
+ if (!is_west && !is_southern) {
+ return dst_offset < 0;
+ }
+
+ return dst_offset !== 0;
+ },
+
+ /**
+ * This function does some basic calculations to create information about
+ * the user's timezone. It uses REFERENCE_YEAR as a solid year for which
+ * the script has been tested rather than depend on the year set by the
+ * client device.
+ *
+ * Returns a key that can be used to do lookups in jstz.olson.timezones.
+ * eg: "720,1,2".
+ *
+ * @returns {String}
+ */
+
+ lookup_key = function () {
+ var january_offset = get_january_offset(),
+ june_offset = get_june_offset(),
+ diff = january_offset - june_offset;
+
+ if (diff < 0) {
+ return january_offset + ",1";
+ } else if (diff > 0) {
+ return june_offset + ",1," + HEMISPHERE_SOUTH;
+ }
+
+ return january_offset + ",0";
+ },
+
+ /**
+ * Uses get_timezone_info() to formulate a key to use in the olson.timezones dictionary.
+ *
+ * Returns a primitive object on the format:
+ * {'timezone': TimeZone, 'key' : 'the key used to find the TimeZone object'}
+ *
+ * @returns Object
+ */
+ determine = function () {
+ var key = lookup_key();
+ return new jstz.TimeZone(jstz.olson.timezones[key]);
+ },
+
+ /**
+ * This object contains information on when daylight savings starts for
+ * different timezones.
+ *
+ * The list is short for a reason. Often we do not have to be very specific
+ * to single out the correct timezone. But when we do, this list comes in
+ * handy.
+ *
+ * Each value is a date denoting when daylight savings starts for that timezone.
+ */
+ dst_start_for = function (tz_name) {
+
+ var ru_pre_dst_change = new Date(2010, 6, 15, 1, 0, 0, 0), // In 2010 Russia had DST, this allows us to detect Russia :)
+ dst_starts = {
+ 'America/Denver': new Date(2011, 2, 13, 3, 0, 0, 0),
+ 'America/Mazatlan': new Date(2011, 3, 3, 3, 0, 0, 0),
+ 'America/Chicago': new Date(2011, 2, 13, 3, 0, 0, 0),
+ 'America/Mexico_City': new Date(2011, 3, 3, 3, 0, 0, 0),
+ 'America/Asuncion': new Date(2012, 9, 7, 3, 0, 0, 0),
+ 'America/Santiago': new Date(2012, 9, 3, 3, 0, 0, 0),
+ 'America/Campo_Grande': new Date(2012, 9, 21, 5, 0, 0, 0),
+ 'America/Montevideo': new Date(2011, 9, 2, 3, 0, 0, 0),
+ 'America/Sao_Paulo': new Date(2011, 9, 16, 5, 0, 0, 0),
+ 'America/Los_Angeles': new Date(2011, 2, 13, 8, 0, 0, 0),
+ 'America/Santa_Isabel': new Date(2011, 3, 5, 8, 0, 0, 0),
+ 'America/Havana': new Date(2012, 2, 10, 2, 0, 0, 0),
+ 'America/New_York': new Date(2012, 2, 10, 7, 0, 0, 0),
+ 'Europe/Helsinki': new Date(2013, 2, 31, 5, 0, 0, 0),
+ 'Pacific/Auckland': new Date(2011, 8, 26, 7, 0, 0, 0),
+ 'America/Halifax': new Date(2011, 2, 13, 6, 0, 0, 0),
+ 'America/Goose_Bay': new Date(2011, 2, 13, 2, 1, 0, 0),
+ 'America/Miquelon': new Date(2011, 2, 13, 5, 0, 0, 0),
+ 'America/Godthab': new Date(2011, 2, 27, 1, 0, 0, 0),
+ 'Europe/Moscow': ru_pre_dst_change,
+ 'Asia/Amman': new Date(2013, 2, 29, 1, 0, 0, 0),
+ 'Asia/Beirut': new Date(2013, 2, 31, 2, 0, 0, 0),
+ 'Asia/Damascus': new Date(2013, 3, 6, 2, 0, 0, 0),
+ 'Asia/Jerusalem': new Date(2013, 2, 29, 5, 0, 0, 0),
+ 'Asia/Yekaterinburg': ru_pre_dst_change,
+ 'Asia/Omsk': ru_pre_dst_change,
+ 'Asia/Krasnoyarsk': ru_pre_dst_change,
+ 'Asia/Irkutsk': ru_pre_dst_change,
+ 'Asia/Yakutsk': ru_pre_dst_change,
+ 'Asia/Vladivostok': ru_pre_dst_change,
+ 'Asia/Baku': new Date(2013, 2, 31, 4, 0, 0),
+ 'Asia/Yerevan': new Date(2013, 2, 31, 3, 0, 0),
+ 'Asia/Kamchatka': ru_pre_dst_change,
+ 'Asia/Gaza': new Date(2010, 2, 27, 4, 0, 0),
+ 'Africa/Cairo': new Date(2010, 4, 1, 3, 0, 0),
+ 'Europe/Minsk': ru_pre_dst_change,
+ 'Pacific/Apia': new Date(2010, 10, 1, 1, 0, 0, 0),
+ 'Pacific/Fiji': new Date(2010, 11, 1, 0, 0, 0),
+ 'Australia/Perth': new Date(2008, 10, 1, 1, 0, 0, 0)
+ };
+
+ return dst_starts[tz_name];
+ };
+
+ return {
+ determine: determine,
+ date_is_dst: date_is_dst,
+ dst_start_for: dst_start_for
+ };
+ }());
+
+ /**
+ * Simple object to perform ambiguity check and to return name of time zone.
+ */
+ jstz.TimeZone = function (tz_name) {
+ 'use strict';
+ /**
+ * The keys in this object are timezones that we know may be ambiguous after
+ * a preliminary scan through the olson_tz object.
+ *
+ * The array of timezones to compare must be in the order that daylight savings
+ * starts for the regions.
+ */
+ var AMBIGUITIES = {
+ 'America/Denver': ['America/Denver', 'America/Mazatlan'],
+ 'America/Chicago': ['America/Chicago', 'America/Mexico_City'],
+ 'America/Santiago': ['America/Santiago', 'America/Asuncion', 'America/Campo_Grande'],
+ 'America/Montevideo': ['America/Montevideo', 'America/Sao_Paulo'],
+ 'Asia/Beirut': ['Asia/Amman', 'Asia/Jerusalem', 'Asia/Beirut', 'Europe/Helsinki','Asia/Damascus'],
+ 'Pacific/Auckland': ['Pacific/Auckland', 'Pacific/Fiji'],
+ 'America/Los_Angeles': ['America/Los_Angeles', 'America/Santa_Isabel'],
+ 'America/New_York': ['America/Havana', 'America/New_York'],
+ 'America/Halifax': ['America/Goose_Bay', 'America/Halifax'],
+ 'America/Godthab': ['America/Miquelon', 'America/Godthab'],
+ 'Asia/Dubai': ['Europe/Moscow'],
+ 'Asia/Dhaka': ['Asia/Yekaterinburg'],
+ 'Asia/Jakarta': ['Asia/Omsk'],
+ 'Asia/Shanghai': ['Asia/Krasnoyarsk', 'Australia/Perth'],
+ 'Asia/Tokyo': ['Asia/Irkutsk'],
+ 'Australia/Brisbane': ['Asia/Yakutsk'],
+ 'Pacific/Noumea': ['Asia/Vladivostok'],
+ 'Pacific/Tarawa': ['Asia/Kamchatka', 'Pacific/Fiji'],
+ 'Pacific/Tongatapu': ['Pacific/Apia'],
+ 'Asia/Baghdad': ['Europe/Minsk'],
+ 'Asia/Baku': ['Asia/Yerevan','Asia/Baku'],
+ 'Africa/Johannesburg': ['Asia/Gaza', 'Africa/Cairo']
+ },
+
+ timezone_name = tz_name,
+
+ /**
+ * Checks if a timezone has possible ambiguities. I.e timezones that are similar.
+ *
+ * For example, if the preliminary scan determines that we're in America/Denver.
+ * We double check here that we're really there and not in America/Mazatlan.
+ *
+ * This is done by checking known dates for when daylight savings start for different
+ * timezones during 2010 and 2011.
+ */
+ ambiguity_check = function () {
+ var ambiguity_list = AMBIGUITIES[timezone_name],
+ length = ambiguity_list.length,
+ i = 0,
+ tz = ambiguity_list[0];
+
+ for (; i < length; i += 1) {
+ tz = ambiguity_list[i];
+
+ if (jstz.date_is_dst(jstz.dst_start_for(tz))) {
+ timezone_name = tz;
+ return;
+ }
+ }
+ },
+
+ /**
+ * Checks if it is possible that the timezone is ambiguous.
+ */
+ is_ambiguous = function () {
+ return typeof (AMBIGUITIES[timezone_name]) !== 'undefined';
+ };
+
+ if (is_ambiguous()) {
+ ambiguity_check();
+ }
+
+ return {
+ name: function () {
+ return timezone_name;
+ }
+ };
+ };
+
+ jstz.olson = {};
+
+ /*
+ * The keys in this dictionary are comma separated as such:
+ *
+ * First the offset compared to UTC time in minutes.
+ *
+ * Then a flag which is 0 if the timezone does not take daylight savings into account and 1 if it
+ * does.
+ *
+ * Thirdly an optional 's' signifies that the timezone is in the southern hemisphere,
+ * only interesting for timezones with DST.
+ *
+ * The mapped arrays is used for constructing the jstz.TimeZone object from within
+ * jstz.determine_timezone();
+ */
+ jstz.olson.timezones = {
+ '-720,0' : 'Pacific/Majuro',
+ '-660,0' : 'Pacific/Pago_Pago',
+ '-600,1' : 'America/Adak',
+ '-600,0' : 'Pacific/Honolulu',
+ '-570,0' : 'Pacific/Marquesas',
+ '-540,0' : 'Pacific/Gambier',
+ '-540,1' : 'America/Anchorage',
+ '-480,1' : 'America/Los_Angeles',
+ '-480,0' : 'Pacific/Pitcairn',
+ '-420,0' : 'America/Phoenix',
+ '-420,1' : 'America/Denver',
+ '-360,0' : 'America/Guatemala',
+ '-360,1' : 'America/Chicago',
+ '-360,1,s' : 'Pacific/Easter',
+ '-300,0' : 'America/Bogota',
+ '-300,1' : 'America/New_York',
+ '-270,0' : 'America/Caracas',
+ '-240,1' : 'America/Halifax',
+ '-240,0' : 'America/Santo_Domingo',
+ '-240,1,s' : 'America/Santiago',
+ '-210,1' : 'America/St_Johns',
+ '-180,1' : 'America/Godthab',
+ '-180,0' : 'America/Argentina/Buenos_Aires',
+ '-180,1,s' : 'America/Montevideo',
+ '-120,0' : 'America/Noronha',
+ '-120,1' : 'America/Noronha',
+ '-60,1' : 'Atlantic/Azores',
+ '-60,0' : 'Atlantic/Cape_Verde',
+ '0,0' : 'Etc/UTC',
+ '0,1' : 'Europe/London',
+ '60,1' : 'Europe/Berlin',
+ '60,0' : 'Africa/Lagos',
+ '60,1,s' : 'Africa/Windhoek',
+ '120,1' : 'Asia/Beirut',
+ '120,0' : 'Africa/Johannesburg',
+ '180,0' : 'Asia/Baghdad',
+ '180,1' : 'Europe/Moscow',
+ '210,1' : 'Asia/Tehran',
+ '240,0' : 'Asia/Dubai',
+ '240,1' : 'Asia/Baku',
+ '270,0' : 'Asia/Kabul',
+ '300,1' : 'Asia/Yekaterinburg',
+ '300,0' : 'Asia/Karachi',
+ '330,0' : 'Asia/Kolkata',
+ '345,0' : 'Asia/Kathmandu',
+ '360,0' : 'Asia/Dhaka',
+ '360,1' : 'Asia/Omsk',
+ '390,0' : 'Asia/Rangoon',
+ '420,1' : 'Asia/Krasnoyarsk',
+ '420,0' : 'Asia/Jakarta',
+ '480,0' : 'Asia/Shanghai',
+ '480,1' : 'Asia/Irkutsk',
+ '525,0' : 'Australia/Eucla',
+ '525,1,s' : 'Australia/Eucla',
+ '540,1' : 'Asia/Yakutsk',
+ '540,0' : 'Asia/Tokyo',
+ '570,0' : 'Australia/Darwin',
+ '570,1,s' : 'Australia/Adelaide',
+ '600,0' : 'Australia/Brisbane',
+ '600,1' : 'Asia/Vladivostok',
+ '600,1,s' : 'Australia/Sydney',
+ '630,1,s' : 'Australia/Lord_Howe',
+ '660,1' : 'Asia/Kamchatka',
+ '660,0' : 'Pacific/Noumea',
+ '690,0' : 'Pacific/Norfolk',
+ '720,1,s' : 'Pacific/Auckland',
+ '720,0' : 'Pacific/Tarawa',
+ '765,1,s' : 'Pacific/Chatham',
+ '780,0' : 'Pacific/Tongatapu',
+ '780,1,s' : 'Pacific/Apia',
+ '840,0' : 'Pacific/Kiritimati'
+ };
+
+ if (typeof exports !== 'undefined') {
+ exports.jstz = jstz;
+ } else {
+ root.jstz = jstz;
+ }
+})(this);
diff --git a/core/vendor/moment/.bower.json b/core/vendor/moment/.bower.json new file mode 100644 index 00000000000..e9bdc9bda6f --- /dev/null +++ b/core/vendor/moment/.bower.json @@ -0,0 +1,30 @@ +{ + "name": "moment", + "version": "2.8.4", + "main": "moment.js", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests", + "tasks", + "component.json", + "composer.json", + "CONTRIBUTING.md", + "ender.js", + "Gruntfile.js", + "package.js", + "package.json" + ], + "homepage": "https://github.com/moment/moment", + "_release": "2.8.4", + "_resolution": { + "type": "version", + "tag": "2.8.4", + "commit": "7ae59de2fc3a1298ae829f6369fe3589b2cd87f8" + }, + "_source": "git://github.com/moment/moment.git", + "_target": "~2.8.3", + "_originalSource": "moment" +}
\ No newline at end of file diff --git a/core/vendor/select2/.bower.json b/core/vendor/select2/.bower.json new file mode 100644 index 00000000000..0c915721f10 --- /dev/null +++ b/core/vendor/select2/.bower.json @@ -0,0 +1,24 @@ +{ + "name": "select2", + "version": "3.4.8", + "main": [ + "select2.js", + "select2.css", + "select2.png", + "select2x2.png", + "select2-spinner.gif" + ], + "dependencies": { + "jquery": ">= 1.7.1" + }, + "homepage": "https://github.com/ivaynberg/select2", + "_release": "3.4.8", + "_resolution": { + "type": "version", + "tag": "3.4.8", + "commit": "ee0f36a47e2133b23330fbec740b2d3a17a0d9c2" + }, + "_source": "git://github.com/ivaynberg/select2.git", + "_target": "~3.4.8", + "_originalSource": "select2" +}
\ No newline at end of file diff --git a/core/vendor/snapjs/.bower.json b/core/vendor/snapjs/.bower.json new file mode 100644 index 00000000000..b10afbb2d87 --- /dev/null +++ b/core/vendor/snapjs/.bower.json @@ -0,0 +1,31 @@ +{ + "name": "Snap.js", + "description": "A Library for creating beautiful mobile shelfs in Javascript (Facebook and Path style side menus)", + "version": "2.0.0-rc1", + "author": "Jacob Kelley <jakie8@gmail.com>", + "keywords": [ + "mobile shelfs", + "nav", + "menu", + "mobile", + "side menu" + ], + "license": "MIT", + "main": [ + "./dist/latest/snap.js", + "./dist/latest/snap.css" + ], + "scripts": [ + "snap.js" + ], + "homepage": "https://github.com/jakiestfu/Snap.js", + "_release": "2.0.0-rc1", + "_resolution": { + "type": "version", + "tag": "v2.0.0-rc1", + "commit": "15c77da330d9e8ca580a922bc748d88553838a73" + }, + "_source": "git://github.com/jakiestfu/Snap.js.git", + "_target": "~2.0.0-rc1", + "_originalSource": "snapjs" +}
\ No newline at end of file diff --git a/core/vendor/strengthify/.bower.json b/core/vendor/strengthify/.bower.json new file mode 100644 index 00000000000..abba0d7e00e --- /dev/null +++ b/core/vendor/strengthify/.bower.json @@ -0,0 +1,19 @@ +{ + "name": "strengthify", + "homepage": "https://github.com/MorrisJobke/strengthify", + "authors": [ + "Morris Jobke <hey@morrisjobke.de>" + ], + "description": "Combine jQuery and zxcvbn to create a password strength meter.", + "main": "jquery.strengthify.js", + "license": "MIT", + "_release": "f1dd3eaf28", + "_resolution": { + "type": "branch", + "branch": "master", + "commit": "f1dd3eaf289be559885325a6585f6dd6ae2fa8c3" + }, + "_source": "git://github.com/MorrisJobke/strengthify.git", + "_target": "*", + "_originalSource": "strengthify" +}
\ No newline at end of file diff --git a/core/vendor/underscore/.bower.json b/core/vendor/underscore/.bower.json new file mode 100644 index 00000000000..2389206fd47 --- /dev/null +++ b/core/vendor/underscore/.bower.json @@ -0,0 +1,33 @@ +{ + "name": "underscore", + "version": "1.6.0", + "main": "underscore.js", + "keywords": [ + "util", + "functional", + "server", + "client", + "browser" + ], + "ignore": [ + "underscore-min.js", + "docs", + "test", + "*.yml", + "*.map", + "CNAME", + "index.html", + "favicon.ico", + "CONTRIBUTING.md" + ], + "homepage": "https://github.com/jashkenas/underscore", + "_release": "1.6.0", + "_resolution": { + "type": "version", + "tag": "1.6.0", + "commit": "1f4bf626f23a99f7a676f5076dc1b1475554c8f7" + }, + "_source": "git://github.com/jashkenas/underscore.git", + "_target": "~1.6.0", + "_originalSource": "underscore" +}
\ No newline at end of file diff --git a/core/vendor/zxcvbn/.bower.json b/core/vendor/zxcvbn/.bower.json new file mode 100644 index 00000000000..8c86cd8c0e4 --- /dev/null +++ b/core/vendor/zxcvbn/.bower.json @@ -0,0 +1,14 @@ +{ + "name": "zxcvbn", + "main": "zxcvbn.js", + "homepage": "https://github.com/lowe/zxcvbn", + "_release": "f2a8cda13d", + "_resolution": { + "type": "branch", + "branch": "master", + "commit": "f2a8cda13d247f4956d3334ee7cbae80a2c61a97" + }, + "_source": "git://github.com/lowe/zxcvbn.git", + "_target": "*", + "_originalSource": "zxcvbn" +}
\ No newline at end of file diff --git a/lib/base.php b/lib/base.php index 82c0c7aa6d0..a019e9a0009 100644 --- a/lib/base.php +++ b/lib/base.php @@ -66,17 +66,11 @@ class OC { public static $REQUESTEDAPP = ''; /** - * check if owncloud runs in cli mode + * check if ownCloud runs in cli mode */ public static $CLI = false; /** - * @deprecated use \OC::$server->getSession() instead - * @var \OC\Session\Session - */ - public static $session = null; - - /** * @var \OC\Autoloader $loader */ public static $loader = null; @@ -194,9 +188,17 @@ class OC { public static function checkConfig() { $l = \OC::$server->getL10N('lib'); - if (file_exists(self::$configDir . "/config.php") - and !is_writable(self::$configDir . "/config.php") - ) { + + // Create config in case it does not already exists + $configFilePath = self::$configDir .'/config.php'; + if(!file_exists($configFilePath)) { + @touch($configFilePath); + } + + // Check if config is writable + $configFileWritable = is_writable($configFilePath); + if (!$configFileWritable && !OC_Helper::isReadOnlyConfigEnabled() + || !$configFileWritable && \OCP\Util::needUpgrade()) { if (self::$CLI) { echo $l->t('Cannot write into "config" directory!')."\n"; echo $l->t('This can usually be fixed by giving the webserver write access to the config directory')."\n"; @@ -472,7 +474,7 @@ class OC { } // setup the basic server - self::$server = new \OC\Server(); + self::$server = new \OC\Server(\OC::$WEBROOT); \OC::$server->getEventLogger()->log('autoloader', 'Autoloader', $loaderStart, $loaderEnd); \OC::$server->getEventLogger()->start('boot', 'Initialize'); @@ -487,10 +489,6 @@ class OC { date_default_timezone_set('UTC'); ini_set('arg_separator.output', '&'); - // try to switch magic quotes off. - if (get_magic_quotes_gpc() == 1) { - ini_set('magic_quotes_runtime', 0); - } //try to configure php to enable big file uploads. //this doesn´t work always depending on the webserver and php configuration. //Let´s try to overwrite some defaults anyways @@ -531,9 +529,7 @@ class OC { \OC::$server->getEventLogger()->start('init_session', 'Initialize session'); OC_App::loadApps(array('session')); - if (self::$CLI) { - self::$session = new \OC\Session\Memory(''); - } else { + if (!self::$CLI) { self::initSession(); } \OC::$server->getEventLogger()->end('init_session'); diff --git a/lib/l10n/ast.js b/lib/l10n/ast.js index 7c1dd6ed304..492b9bc4bf2 100644 --- a/lib/l10n/ast.js +++ b/lib/l10n/ast.js @@ -7,6 +7,7 @@ OC.L10N.register( "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Davezu esto pue iguase %sdándo-y al sirvidor web accesu d'escritura al direutoriu de configuración%s.", "Sample configuration detected" : "Configuración d'amuesa detectada", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Detectose que la configuración d'amuesa copiose. Esto pue encaboxar la instalación y dexala ensín soporte. Llee la documentación enantes de facer cambéos en config.php", + "PHP %s or higher is required." : "Necesítase PHP %s o superior", "Help" : "Ayuda", "Personal" : "Personal", "Settings" : "Axustes", @@ -103,12 +104,7 @@ OC.L10N.register( "Please install one of these locales on your system and restart your webserver." : "Instala ún d'estos locales nel to sistema y reanicia'l sirvidor web", "Please ask your server administrator to install the module." : "Por favor, entrúga-y al to alministrador del sirvidor pa instalar el módulu.", "PHP module %s not installed." : "Nun ta instaláu'l módulu PHP %s", - "PHP %s or higher is required." : "Necesítase PHP %s o superior", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Por favor, entrúga-y al to alministrador del sirvidor p'anovar PHP a la cabera versión. La to versión PHP nun ta sofitada por ownCloud y la comunidá PHP.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "Ta habilitáu'l mou seguru de PHP. ownCloud requier que tea deshabilitáu pa furrular afayadízamente", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Mou seguru de PHP ye un entornu en desusu que tien de desactivase. Contauta col alministrador del sirvidor pa desactivalu en php.ini o na configuración del sirvidor web.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Tán habilitaes les Magic Quotes. ownCloud requier que les deshabilites pa funcionar afayadizamente.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes ye un entornu en desusu y tien de desactivase. Consulta col alministrador del sirvidor pa desactivalu en php.ini o na configuración del sirvidor web.", "PHP modules have been installed, but they are still listed as missing?" : "Instaláronse los módulos PHP, ¿pero tán entá llistaos como faltantes?", "Please ask your server administrator to restart the web server." : "Por favor, entruga al to alministrador pa reaniciar el sirvidor web.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 requeríu", diff --git a/lib/l10n/ast.json b/lib/l10n/ast.json index 8585975ac12..45b9312f8f7 100644 --- a/lib/l10n/ast.json +++ b/lib/l10n/ast.json @@ -5,6 +5,7 @@ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Davezu esto pue iguase %sdándo-y al sirvidor web accesu d'escritura al direutoriu de configuración%s.", "Sample configuration detected" : "Configuración d'amuesa detectada", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Detectose que la configuración d'amuesa copiose. Esto pue encaboxar la instalación y dexala ensín soporte. Llee la documentación enantes de facer cambéos en config.php", + "PHP %s or higher is required." : "Necesítase PHP %s o superior", "Help" : "Ayuda", "Personal" : "Personal", "Settings" : "Axustes", @@ -101,12 +102,7 @@ "Please install one of these locales on your system and restart your webserver." : "Instala ún d'estos locales nel to sistema y reanicia'l sirvidor web", "Please ask your server administrator to install the module." : "Por favor, entrúga-y al to alministrador del sirvidor pa instalar el módulu.", "PHP module %s not installed." : "Nun ta instaláu'l módulu PHP %s", - "PHP %s or higher is required." : "Necesítase PHP %s o superior", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Por favor, entrúga-y al to alministrador del sirvidor p'anovar PHP a la cabera versión. La to versión PHP nun ta sofitada por ownCloud y la comunidá PHP.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "Ta habilitáu'l mou seguru de PHP. ownCloud requier que tea deshabilitáu pa furrular afayadízamente", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Mou seguru de PHP ye un entornu en desusu que tien de desactivase. Contauta col alministrador del sirvidor pa desactivalu en php.ini o na configuración del sirvidor web.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Tán habilitaes les Magic Quotes. ownCloud requier que les deshabilites pa funcionar afayadizamente.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes ye un entornu en desusu y tien de desactivase. Consulta col alministrador del sirvidor pa desactivalu en php.ini o na configuración del sirvidor web.", "PHP modules have been installed, but they are still listed as missing?" : "Instaláronse los módulos PHP, ¿pero tán entá llistaos como faltantes?", "Please ask your server administrator to restart the web server." : "Por favor, entruga al to alministrador pa reaniciar el sirvidor web.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 requeríu", diff --git a/lib/l10n/bg_BG.js b/lib/l10n/bg_BG.js index a0c0dc3b8e7..d604be0059c 100644 --- a/lib/l10n/bg_BG.js +++ b/lib/l10n/bg_BG.js @@ -7,6 +7,7 @@ OC.L10N.register( "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Това обикновено може да бъде оправено като %s даде разрешение на уеб сървъра да записва в config папката %s.", "Sample configuration detected" : "Открита е примерна конфигурация", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Усетено беше че примерната конфигурация е копирана. Това може да развли инсталацията ти и не се поддържа. Моля, прочети документацията преди да правиш промени на config.php", + "PHP %s or higher is required." : "Изисква се PHP %s или по-нова.", "Help" : "Помощ", "Personal" : "Лични", "Settings" : "Настройки", @@ -105,12 +106,7 @@ OC.L10N.register( "Please install one of these locales on your system and restart your webserver." : "Моля, инсталирай едно от следните език-държава на сървъра и рестартирай уеб сървъра.", "Please ask your server administrator to install the module." : "Моля, поискай твоят администратор да инсталира модула.", "PHP module %s not installed." : "PHP модулът %s не е инсталиран.", - "PHP %s or higher is required." : "Изисква се PHP %s или по-нова.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Моля, поискай твоят администратор да обнови PHP до най-новата верския. Твоята PHP версия вече не се поддържа от ownCloud и PHP общността.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP Safe Mode е включен. ownCloud изисква този режим да бъде изключен, за да функионира нормално.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP Safe Mode е непропръчителна и общо взето безсмислена настройка и трябва да бъде изключена. Моля, поискай твоя администратор да я изключи ви php.ini или в конфигурацията на уве сървъра.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes е включен. ownCloud изисква да е изключен, за да функнионира нормално.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes е непропръчителна и общо взето безсмислена настройка и трябва да бъде изключена. Моля, поискай твоя администратор да я изключи ви php.ini или в конфигурацията на уве сървъра.", "PHP modules have been installed, but they are still listed as missing?" : "PHP модулите са инсталирани, но все още се обявяват като липсващи?", "Please ask your server administrator to restart the web server." : "Моля, поискай от своя администратор да рестартира уеб сървъра.", "PostgreSQL >= 9 required" : "Изисква се PostgreSQL >= 9", diff --git a/lib/l10n/bg_BG.json b/lib/l10n/bg_BG.json index aedb28be19e..f55c50537da 100644 --- a/lib/l10n/bg_BG.json +++ b/lib/l10n/bg_BG.json @@ -5,6 +5,7 @@ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Това обикновено може да бъде оправено като %s даде разрешение на уеб сървъра да записва в config папката %s.", "Sample configuration detected" : "Открита е примерна конфигурация", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Усетено беше че примерната конфигурация е копирана. Това може да развли инсталацията ти и не се поддържа. Моля, прочети документацията преди да правиш промени на config.php", + "PHP %s or higher is required." : "Изисква се PHP %s или по-нова.", "Help" : "Помощ", "Personal" : "Лични", "Settings" : "Настройки", @@ -103,12 +104,7 @@ "Please install one of these locales on your system and restart your webserver." : "Моля, инсталирай едно от следните език-държава на сървъра и рестартирай уеб сървъра.", "Please ask your server administrator to install the module." : "Моля, поискай твоят администратор да инсталира модула.", "PHP module %s not installed." : "PHP модулът %s не е инсталиран.", - "PHP %s or higher is required." : "Изисква се PHP %s или по-нова.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Моля, поискай твоят администратор да обнови PHP до най-новата верския. Твоята PHP версия вече не се поддържа от ownCloud и PHP общността.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP Safe Mode е включен. ownCloud изисква този режим да бъде изключен, за да функионира нормално.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP Safe Mode е непропръчителна и общо взето безсмислена настройка и трябва да бъде изключена. Моля, поискай твоя администратор да я изключи ви php.ini или в конфигурацията на уве сървъра.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes е включен. ownCloud изисква да е изключен, за да функнионира нормално.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes е непропръчителна и общо взето безсмислена настройка и трябва да бъде изключена. Моля, поискай твоя администратор да я изключи ви php.ini или в конфигурацията на уве сървъра.", "PHP modules have been installed, but they are still listed as missing?" : "PHP модулите са инсталирани, но все още се обявяват като липсващи?", "Please ask your server administrator to restart the web server." : "Моля, поискай от своя администратор да рестартира уеб сървъра.", "PostgreSQL >= 9 required" : "Изисква се PostgreSQL >= 9", diff --git a/lib/l10n/bn_BD.js b/lib/l10n/bn_BD.js index ea94de9912e..8516384bf65 100644 --- a/lib/l10n/bn_BD.js +++ b/lib/l10n/bn_BD.js @@ -39,7 +39,6 @@ OC.L10N.register( "last month" : "গত মাস", "_%n month ago_::_%n months ago_" : ["",""], "last year" : "গত বছর", - "years ago" : "বছর পূর্বে", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "পিএইচপি সেফ মোড কার্যকর আছে। গউনক্লাউড সঠিকভাবে কাজ করতে হলে এটি অকার্যকর করা প্রয়োজন।" + "years ago" : "বছর পূর্বে" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/bn_BD.json b/lib/l10n/bn_BD.json index bcf7ae8e1b7..4088eaf2670 100644 --- a/lib/l10n/bn_BD.json +++ b/lib/l10n/bn_BD.json @@ -37,7 +37,6 @@ "last month" : "গত মাস", "_%n month ago_::_%n months ago_" : ["",""], "last year" : "গত বছর", - "years ago" : "বছর পূর্বে", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "পিএইচপি সেফ মোড কার্যকর আছে। গউনক্লাউড সঠিকভাবে কাজ করতে হলে এটি অকার্যকর করা প্রয়োজন।" + "years ago" : "বছর পূর্বে" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/ca.js b/lib/l10n/ca.js index d416b93503a..e709c6f310d 100644 --- a/lib/l10n/ca.js +++ b/lib/l10n/ca.js @@ -7,11 +7,13 @@ OC.L10N.register( "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Això normalment es pot solucionar donant a %s permís d'escriptura a la carpeta de configuració %s", "Sample configuration detected" : "Configuració d'exemple detectada", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "S'ha detectat que la configuració d'exemple ha estat copiada. Això no està suportat, i podria corrompre la vostra instalació. Siusplau, llegiu la documentació abans de realitzar canvis a config.php", + "PHP %s or higher is required." : "Es requereix PHP %s o superior.", "Help" : "Ajuda", "Personal" : "Personal", "Settings" : "Configuració", "Users" : "Usuaris", "Admin" : "Administració", + "Recommended" : "Recomanat", "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "L'aplicació \\\"%s\\\" no es pot instal·lar perquè no es compatible amb aquesta versió de ownCloud.", "No app name specified" : "No heu especificat cap nom d'aplicació", "Unknown filetype" : "Tipus de fitxer desconegut", @@ -101,12 +103,7 @@ OC.L10N.register( "Please install one of these locales on your system and restart your webserver." : "Siusplau, instal·li un d'aquests arxius de localització en el seu sistema, i reinicii el seu servidor web.", "Please ask your server administrator to install the module." : "Demaneu a l'administrador del sistema que instal·li el mòdul.", "PHP module %s not installed." : "El mòdul PHP %s no està instal·lat.", - "PHP %s or higher is required." : "Es requereix PHP %s o superior.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Demaneu a l'administrador que actualitzi PHP a l'última versió. La versió que teniu instal·lada no té suport d'ownCloud ni de la comunitat PHP.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "El mode segur de PHP està activat. OwnCloud requereix que es desactivi per funcionar correctament.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "El mode segur de PHP està desfasat i és principalment inútil i hauria de desactivar-se. Demaneu a l'administrador que el desactivi a php.ini o a la configuració del servidor web.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Les Magic Quotes estan activades. OwnCloud requereix que les desactiveu per funcionar correctament.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes està desfassat i és principalment inútil i hauria de desactivar-se. Demaneu a l'administrador que el desactivi a php.ini o a la configuració del servidor web.", "PHP modules have been installed, but they are still listed as missing?" : "S'han instal·lat mòduls PHP, però encara es llisten com una mancança?", "Please ask your server administrator to restart the web server." : "Demaneu a l'administrador que reinici el servidor web.", "PostgreSQL >= 9 required" : "Es requereix PostgreSQL >= 9", diff --git a/lib/l10n/ca.json b/lib/l10n/ca.json index 2698ed1846f..23e83e79b09 100644 --- a/lib/l10n/ca.json +++ b/lib/l10n/ca.json @@ -5,11 +5,13 @@ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Això normalment es pot solucionar donant a %s permís d'escriptura a la carpeta de configuració %s", "Sample configuration detected" : "Configuració d'exemple detectada", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "S'ha detectat que la configuració d'exemple ha estat copiada. Això no està suportat, i podria corrompre la vostra instalació. Siusplau, llegiu la documentació abans de realitzar canvis a config.php", + "PHP %s or higher is required." : "Es requereix PHP %s o superior.", "Help" : "Ajuda", "Personal" : "Personal", "Settings" : "Configuració", "Users" : "Usuaris", "Admin" : "Administració", + "Recommended" : "Recomanat", "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "L'aplicació \\\"%s\\\" no es pot instal·lar perquè no es compatible amb aquesta versió de ownCloud.", "No app name specified" : "No heu especificat cap nom d'aplicació", "Unknown filetype" : "Tipus de fitxer desconegut", @@ -99,12 +101,7 @@ "Please install one of these locales on your system and restart your webserver." : "Siusplau, instal·li un d'aquests arxius de localització en el seu sistema, i reinicii el seu servidor web.", "Please ask your server administrator to install the module." : "Demaneu a l'administrador del sistema que instal·li el mòdul.", "PHP module %s not installed." : "El mòdul PHP %s no està instal·lat.", - "PHP %s or higher is required." : "Es requereix PHP %s o superior.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Demaneu a l'administrador que actualitzi PHP a l'última versió. La versió que teniu instal·lada no té suport d'ownCloud ni de la comunitat PHP.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "El mode segur de PHP està activat. OwnCloud requereix que es desactivi per funcionar correctament.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "El mode segur de PHP està desfasat i és principalment inútil i hauria de desactivar-se. Demaneu a l'administrador que el desactivi a php.ini o a la configuració del servidor web.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Les Magic Quotes estan activades. OwnCloud requereix que les desactiveu per funcionar correctament.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes està desfassat i és principalment inútil i hauria de desactivar-se. Demaneu a l'administrador que el desactivi a php.ini o a la configuració del servidor web.", "PHP modules have been installed, but they are still listed as missing?" : "S'han instal·lat mòduls PHP, però encara es llisten com una mancança?", "Please ask your server administrator to restart the web server." : "Demaneu a l'administrador que reinici el servidor web.", "PostgreSQL >= 9 required" : "Es requereix PostgreSQL >= 9", diff --git a/lib/l10n/cs_CZ.js b/lib/l10n/cs_CZ.js index b4419c8ef99..fdbc0a9a5bb 100644 --- a/lib/l10n/cs_CZ.js +++ b/lib/l10n/cs_CZ.js @@ -7,6 +7,9 @@ OC.L10N.register( "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "To lze obvykle vyřešit %spovolením zápisu webovému serveru do konfiguračního adresáře%s.", "Sample configuration detected" : "Byla detekována vzorová konfigurace", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Pravděpodobně byla zkopírována konfigurační nastavení ze vzorových souborů. Toto není podporováno a může poškodit vaši instalaci. Nahlédněte prosím do dokumentace před prováděním změn v souboru config.php", + "PHP %s or higher is required." : "Je vyžadováno PHP %s nebo vyšší.", + "PHP with a version less then %s is required." : "Je vyžadováno PHP ve verzi nižší než %s.", + "Following databases are supported: %s" : "Jsou podporovány následující databáze: %s", "Help" : "Nápověda", "Personal" : "Osobní", "Settings" : "Nastavení", @@ -105,12 +108,7 @@ OC.L10N.register( "Please install one of these locales on your system and restart your webserver." : "Prosím nainstalujte alespoň jeden z těchto jazyků do svého systému a restartujte webový server.", "Please ask your server administrator to install the module." : "Požádejte svého správce systému o instalaci tohoto modulu.", "PHP module %s not installed." : "PHP modul %s není nainstalován.", - "PHP %s or higher is required." : "Je vyžadováno PHP %s nebo vyšší.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Požádejte svého správce systému o aktualizaci PHP na nejnovější verzi. Vaše verze PHP již není podporována komunitami ownCloud a PHP.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "Je zapnut PHP Safe Mode. Pro správnou funkčnost ownCloud je třeba toto vypnout.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP Safe Mode je zastaralé a většinou zbytečné nastavení, které je třeba vypnout. Požádejte prosím správce systému o jeho zákaz v php.ini nebo v konfiguraci webového serveru.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Je povoleno nastavení Magic Quotes. Pro správnou funkčnost ownCloud je třeba toto vypnout.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes je zastaralé a většinou zbytečné nastavení, které je třeba vypnout. Požádejte prosím správce systému o jeho zákaz v php.ini nebo v konfiguraci webového serveru.", "PHP modules have been installed, but they are still listed as missing?" : "PHP moduly jsou nainstalovány, ale stále se tváří jako chybějící?", "Please ask your server administrator to restart the web server." : "Požádejte svého správce systému o restart webového serveru.", "PostgreSQL >= 9 required" : "Je vyžadováno PostgreSQL >= 9", diff --git a/lib/l10n/cs_CZ.json b/lib/l10n/cs_CZ.json index a487b849291..a038a180dae 100644 --- a/lib/l10n/cs_CZ.json +++ b/lib/l10n/cs_CZ.json @@ -5,6 +5,9 @@ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "To lze obvykle vyřešit %spovolením zápisu webovému serveru do konfiguračního adresáře%s.", "Sample configuration detected" : "Byla detekována vzorová konfigurace", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Pravděpodobně byla zkopírována konfigurační nastavení ze vzorových souborů. Toto není podporováno a může poškodit vaši instalaci. Nahlédněte prosím do dokumentace před prováděním změn v souboru config.php", + "PHP %s or higher is required." : "Je vyžadováno PHP %s nebo vyšší.", + "PHP with a version less then %s is required." : "Je vyžadováno PHP ve verzi nižší než %s.", + "Following databases are supported: %s" : "Jsou podporovány následující databáze: %s", "Help" : "Nápověda", "Personal" : "Osobní", "Settings" : "Nastavení", @@ -103,12 +106,7 @@ "Please install one of these locales on your system and restart your webserver." : "Prosím nainstalujte alespoň jeden z těchto jazyků do svého systému a restartujte webový server.", "Please ask your server administrator to install the module." : "Požádejte svého správce systému o instalaci tohoto modulu.", "PHP module %s not installed." : "PHP modul %s není nainstalován.", - "PHP %s or higher is required." : "Je vyžadováno PHP %s nebo vyšší.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Požádejte svého správce systému o aktualizaci PHP na nejnovější verzi. Vaše verze PHP již není podporována komunitami ownCloud a PHP.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "Je zapnut PHP Safe Mode. Pro správnou funkčnost ownCloud je třeba toto vypnout.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP Safe Mode je zastaralé a většinou zbytečné nastavení, které je třeba vypnout. Požádejte prosím správce systému o jeho zákaz v php.ini nebo v konfiguraci webového serveru.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Je povoleno nastavení Magic Quotes. Pro správnou funkčnost ownCloud je třeba toto vypnout.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes je zastaralé a většinou zbytečné nastavení, které je třeba vypnout. Požádejte prosím správce systému o jeho zákaz v php.ini nebo v konfiguraci webového serveru.", "PHP modules have been installed, but they are still listed as missing?" : "PHP moduly jsou nainstalovány, ale stále se tváří jako chybějící?", "Please ask your server administrator to restart the web server." : "Požádejte svého správce systému o restart webového serveru.", "PostgreSQL >= 9 required" : "Je vyžadováno PostgreSQL >= 9", diff --git a/lib/l10n/da.js b/lib/l10n/da.js index af85c3e93d1..035431694e0 100644 --- a/lib/l10n/da.js +++ b/lib/l10n/da.js @@ -7,6 +7,9 @@ OC.L10N.register( "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Dette kan som regel rettes ved at %sgive webserveren skriveadgang til config-mappen%s.", "Sample configuration detected" : "Eksempel for konfiguration registreret", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Der er registreret at eksempel for konfiguration er blevet kopieret. Dette kan ødelægge din installation og understøttes ikke. Læs venligst dokumentationen før der foretages ændringer i config.php", + "PHP %s or higher is required." : "Der kræves PHP %s eller nyere.", + "PHP with a version less then %s is required." : "Der kræves PHP i en version mindre end %s.", + "Following databases are supported: %s" : "Følgende databaser understøttes: %s", "Help" : "Hjælp", "Personal" : "Personligt", "Settings" : "Indstillinger", @@ -30,7 +33,7 @@ OC.L10N.register( "App does not provide an info.xml file" : "Der følger ingen info.xml-fil med appen", "App can't be installed because of not allowed code in the App" : "Appen kan ikke installeres, da den indeholder ikke-tilladt kode", "App can't be installed because it is not compatible with this version of ownCloud" : "Appen kan ikke installeres, da den ikke er kompatibel med denne version af ownCloud.", - "App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" : "Appen kan ikke installeres, da den indeholder taget\n<shipped>\n\ntrue\n</shipped>\n\nhvilket ikke er tilladt for ikke-medfølgende apps", + "App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" : "Appen kan ikke installeres, da den indeholder mærket <shipped>true</shipped>, hvilket ikke er tilladt for ikke-medfølgende apps", "App can't be installed because the version in info.xml/version is not the same as the version reported from the app store" : "App kan ikke installeres, da versionen i info.xml/version ikke er den samme som versionen rapporteret fra app-storen", "Application is not enabled" : "Programmet er ikke aktiveret", "Authentication error" : "Adgangsfejl", @@ -105,12 +108,7 @@ OC.L10N.register( "Please install one of these locales on your system and restart your webserver." : "Installér venligst én af disse lokaliteter på dit system, og genstart din webserver.", "Please ask your server administrator to install the module." : "Du bedes anmode din serveradministrator om at installere modulet.", "PHP module %s not installed." : "PHP-modulet %s er ikke installeret.", - "PHP %s or higher is required." : "Der kræves PHP %s eller nyere.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Bed venligst din serveradministrator om at opdatere PHP til seneste version. Din PHP-version understøttes ikke længere af ownCload og PHP-fællesskabet.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP Safe Mode er slået til. ownCload kræver at denne er slået fra, for at fungere ordentligt.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP Safe Mode er udgået og stort set en ubrugelig indstilling, der bør slås fra. Spørg venligst din serveradministrator om at slå den fra i php.ini eller din webeserver-konfiguration.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes er slået til. ownCloud kræver at denne er slået fra, for at fungere ordentligt.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes er udgået og stort set en ubrugelig indstilling, der bør slås fra. Spørg venligst din serveradministrator om at slå den fra i php.ini eller din webeserver-konfiguration.", "PHP modules have been installed, but they are still listed as missing?" : "Der er installeret PHP-moduler, men de fremgår stadig som fraværende?", "Please ask your server administrator to restart the web server." : "Du bedes anmode din serveradministrator om at genstarte webserveren.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 kræves", diff --git a/lib/l10n/da.json b/lib/l10n/da.json index 59ff0e87b98..abe888d4022 100644 --- a/lib/l10n/da.json +++ b/lib/l10n/da.json @@ -5,6 +5,9 @@ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Dette kan som regel rettes ved at %sgive webserveren skriveadgang til config-mappen%s.", "Sample configuration detected" : "Eksempel for konfiguration registreret", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Der er registreret at eksempel for konfiguration er blevet kopieret. Dette kan ødelægge din installation og understøttes ikke. Læs venligst dokumentationen før der foretages ændringer i config.php", + "PHP %s or higher is required." : "Der kræves PHP %s eller nyere.", + "PHP with a version less then %s is required." : "Der kræves PHP i en version mindre end %s.", + "Following databases are supported: %s" : "Følgende databaser understøttes: %s", "Help" : "Hjælp", "Personal" : "Personligt", "Settings" : "Indstillinger", @@ -28,7 +31,7 @@ "App does not provide an info.xml file" : "Der følger ingen info.xml-fil med appen", "App can't be installed because of not allowed code in the App" : "Appen kan ikke installeres, da den indeholder ikke-tilladt kode", "App can't be installed because it is not compatible with this version of ownCloud" : "Appen kan ikke installeres, da den ikke er kompatibel med denne version af ownCloud.", - "App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" : "Appen kan ikke installeres, da den indeholder taget\n<shipped>\n\ntrue\n</shipped>\n\nhvilket ikke er tilladt for ikke-medfølgende apps", + "App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" : "Appen kan ikke installeres, da den indeholder mærket <shipped>true</shipped>, hvilket ikke er tilladt for ikke-medfølgende apps", "App can't be installed because the version in info.xml/version is not the same as the version reported from the app store" : "App kan ikke installeres, da versionen i info.xml/version ikke er den samme som versionen rapporteret fra app-storen", "Application is not enabled" : "Programmet er ikke aktiveret", "Authentication error" : "Adgangsfejl", @@ -103,12 +106,7 @@ "Please install one of these locales on your system and restart your webserver." : "Installér venligst én af disse lokaliteter på dit system, og genstart din webserver.", "Please ask your server administrator to install the module." : "Du bedes anmode din serveradministrator om at installere modulet.", "PHP module %s not installed." : "PHP-modulet %s er ikke installeret.", - "PHP %s or higher is required." : "Der kræves PHP %s eller nyere.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Bed venligst din serveradministrator om at opdatere PHP til seneste version. Din PHP-version understøttes ikke længere af ownCload og PHP-fællesskabet.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP Safe Mode er slået til. ownCload kræver at denne er slået fra, for at fungere ordentligt.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP Safe Mode er udgået og stort set en ubrugelig indstilling, der bør slås fra. Spørg venligst din serveradministrator om at slå den fra i php.ini eller din webeserver-konfiguration.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes er slået til. ownCloud kræver at denne er slået fra, for at fungere ordentligt.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes er udgået og stort set en ubrugelig indstilling, der bør slås fra. Spørg venligst din serveradministrator om at slå den fra i php.ini eller din webeserver-konfiguration.", "PHP modules have been installed, but they are still listed as missing?" : "Der er installeret PHP-moduler, men de fremgår stadig som fraværende?", "Please ask your server administrator to restart the web server." : "Du bedes anmode din serveradministrator om at genstarte webserveren.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 kræves", diff --git a/lib/l10n/de.js b/lib/l10n/de.js index 215052da7f9..41732c87a2b 100644 --- a/lib/l10n/de.js +++ b/lib/l10n/de.js @@ -7,6 +7,9 @@ OC.L10N.register( "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Dies kann normalerweise repariert werden, indem dem Webserver %s Schreibzugriff auf das config-Verzeichnis %s gegeben wird.", "Sample configuration detected" : "Beispielkonfiguration gefunden", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Es wurde festgestellt, dass die Beispielkonfiguration kopiert wurde, Dies wird nicht unterstützt kann zum Abruch Ihrer Installation führen. Bitte lese die Dokumentation vor der Änderung an der config.php.", + "PHP %s or higher is required." : "PHP %s oder höher wird benötigt.", + "PHP with a version less then %s is required." : "PHP wird in einer früheren Version als %s benötigt.", + "Following databases are supported: %s" : "Die folgenden Datenbanken werden unterstützt: %s", "Help" : "Hilfe", "Personal" : "Persönlich", "Settings" : "Einstellungen", @@ -105,12 +108,7 @@ OC.L10N.register( "Please install one of these locales on your system and restart your webserver." : "Bitte installiere eine dieser Sprachen auf Deinem System und starte den Webserver neu.", "Please ask your server administrator to install the module." : "Bitte frage, für die Installation des Moduls, Deinen Server-Administrator.", "PHP module %s not installed." : "PHP-Modul %s nicht installiert.", - "PHP %s or higher is required." : "PHP %s oder höher wird benötigt.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Bitte frage zur Aktualisierung von PHP auf die letzte Version Deinen Server-Administrator. Deine PHP-Version wird nicht länger durch ownCloud und der PHP-Gemeinschaft unterstützt.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP-Sicherheitsmodus ist aktiviert. ownCloud benötigt für eine korrekte Funktion eine Deaktivierung von diesem Modus.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Der PHP-Sicherheitsmodus ist eine veraltete und meist nutzlose Einstellung, die deaktiviert werden sollte. Bitte frage Deinen Server-Administrator zur Deaktivierung in der php.ini oder Deiner Webserver-Konfiguration.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes ist aktiviert. ownCloud benötigt für eine korrekte Funktion eine Deaktivierung von diesem Modus.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes ist eine veraltete und meist nutzlose Einstellung, die deaktiviert werden sollte. Bitte frage Deinen Server-Administrator zur Deaktivierung in der php.ini oder Deiner Webserver-Konfiguration.", "PHP modules have been installed, but they are still listed as missing?" : "PHP-Module wurden installiert, werden aber als noch fehlend gelistet?", "Please ask your server administrator to restart the web server." : "Bitte frage Deinen Server-Administrator zum Neustart des Webservers.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 benötigt", diff --git a/lib/l10n/de.json b/lib/l10n/de.json index 086fc888986..f7c8a139860 100644 --- a/lib/l10n/de.json +++ b/lib/l10n/de.json @@ -5,6 +5,9 @@ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Dies kann normalerweise repariert werden, indem dem Webserver %s Schreibzugriff auf das config-Verzeichnis %s gegeben wird.", "Sample configuration detected" : "Beispielkonfiguration gefunden", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Es wurde festgestellt, dass die Beispielkonfiguration kopiert wurde, Dies wird nicht unterstützt kann zum Abruch Ihrer Installation führen. Bitte lese die Dokumentation vor der Änderung an der config.php.", + "PHP %s or higher is required." : "PHP %s oder höher wird benötigt.", + "PHP with a version less then %s is required." : "PHP wird in einer früheren Version als %s benötigt.", + "Following databases are supported: %s" : "Die folgenden Datenbanken werden unterstützt: %s", "Help" : "Hilfe", "Personal" : "Persönlich", "Settings" : "Einstellungen", @@ -103,12 +106,7 @@ "Please install one of these locales on your system and restart your webserver." : "Bitte installiere eine dieser Sprachen auf Deinem System und starte den Webserver neu.", "Please ask your server administrator to install the module." : "Bitte frage, für die Installation des Moduls, Deinen Server-Administrator.", "PHP module %s not installed." : "PHP-Modul %s nicht installiert.", - "PHP %s or higher is required." : "PHP %s oder höher wird benötigt.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Bitte frage zur Aktualisierung von PHP auf die letzte Version Deinen Server-Administrator. Deine PHP-Version wird nicht länger durch ownCloud und der PHP-Gemeinschaft unterstützt.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP-Sicherheitsmodus ist aktiviert. ownCloud benötigt für eine korrekte Funktion eine Deaktivierung von diesem Modus.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Der PHP-Sicherheitsmodus ist eine veraltete und meist nutzlose Einstellung, die deaktiviert werden sollte. Bitte frage Deinen Server-Administrator zur Deaktivierung in der php.ini oder Deiner Webserver-Konfiguration.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes ist aktiviert. ownCloud benötigt für eine korrekte Funktion eine Deaktivierung von diesem Modus.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes ist eine veraltete und meist nutzlose Einstellung, die deaktiviert werden sollte. Bitte frage Deinen Server-Administrator zur Deaktivierung in der php.ini oder Deiner Webserver-Konfiguration.", "PHP modules have been installed, but they are still listed as missing?" : "PHP-Module wurden installiert, werden aber als noch fehlend gelistet?", "Please ask your server administrator to restart the web server." : "Bitte frage Deinen Server-Administrator zum Neustart des Webservers.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 benötigt", diff --git a/lib/l10n/de_DE.js b/lib/l10n/de_DE.js index 6d99b090604..19ea55ea2b8 100644 --- a/lib/l10n/de_DE.js +++ b/lib/l10n/de_DE.js @@ -7,6 +7,9 @@ OC.L10N.register( "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Dies kann normalerweise repariert werden, indem dem Webserver %s Schreibzugriff auf das config-Verzeichnis %s gegeben wird.", "Sample configuration detected" : "Beispielkonfiguration gefunden", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Es wurde festgestellt, dass die Beispielkonfiguration kopiert wurde, Dies wird nicht unterstützt kann zum Abruch Ihrer Installation führen. Bitte lesen Sie die Dokumentation vor der Änderung an der config.php.", + "PHP %s or higher is required." : "PHP %s oder höher wird benötigt.", + "PHP with a version less then %s is required." : "PHP wird in einer früheren Version als %s benötigt.", + "Following databases are supported: %s" : "Die folgenden Datenbanken werden unterstützt: %s", "Help" : "Hilfe", "Personal" : "Persönlich", "Settings" : "Einstellungen", @@ -105,12 +108,7 @@ OC.L10N.register( "Please install one of these locales on your system and restart your webserver." : "Bitte installieren Sie eine dieser Sprachen auf Ihrem System und starten Sie den Webserver neu.", "Please ask your server administrator to install the module." : "Bitte fragen Sie, für die Installation des Moduls, Ihren Server-Administrator.", "PHP module %s not installed." : "PHP-Modul %s nicht installiert.", - "PHP %s or higher is required." : "PHP %s oder höher wird benötigt.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Bitte fragen Sie zur Aktualisierung von PHP auf die letzte Version Ihren Server-Administrator. Ihre PHP-Version wird nicht länger durch ownCloud und der PHP-Gemeinschaft unterstützt.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP-Sicherheitsmodus ist aktiviert. ownCloud benötigt für eine korrekte Funktion eine Deaktivierung von diesem Modus.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Der PHP-Sicherheitsmodus ist eine veraltete und meist nutzlose Einstellung, die deaktiviert werden sollte. Bitte fragen Sie Ihren Server-Administrator zur Deaktivierung in der php.ini oder Ihrer Webserver-Konfiguration.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes ist aktiviert. ownCloud benötigt für eine korrekte Funktion eine Deaktivierung von diesem Modus.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes ist eine veraltete und meist nutzlose Einstellung, die deaktiviert werden sollte. Bitte fragen Sie Ihren Server-Administrator zur Deaktivierung in der php.ini oder Ihrer Webserver-Konfiguration.", "PHP modules have been installed, but they are still listed as missing?" : "PHP-Module wurden installiert, werden aber als noch fehlend gelistet?", "Please ask your server administrator to restart the web server." : "Bitte fragen Sie Ihren Server-Administrator zum Neustart des Webservers.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 benötigt", diff --git a/lib/l10n/de_DE.json b/lib/l10n/de_DE.json index fd16f063b78..801beb7fb3b 100644 --- a/lib/l10n/de_DE.json +++ b/lib/l10n/de_DE.json @@ -5,6 +5,9 @@ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Dies kann normalerweise repariert werden, indem dem Webserver %s Schreibzugriff auf das config-Verzeichnis %s gegeben wird.", "Sample configuration detected" : "Beispielkonfiguration gefunden", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Es wurde festgestellt, dass die Beispielkonfiguration kopiert wurde, Dies wird nicht unterstützt kann zum Abruch Ihrer Installation führen. Bitte lesen Sie die Dokumentation vor der Änderung an der config.php.", + "PHP %s or higher is required." : "PHP %s oder höher wird benötigt.", + "PHP with a version less then %s is required." : "PHP wird in einer früheren Version als %s benötigt.", + "Following databases are supported: %s" : "Die folgenden Datenbanken werden unterstützt: %s", "Help" : "Hilfe", "Personal" : "Persönlich", "Settings" : "Einstellungen", @@ -103,12 +106,7 @@ "Please install one of these locales on your system and restart your webserver." : "Bitte installieren Sie eine dieser Sprachen auf Ihrem System und starten Sie den Webserver neu.", "Please ask your server administrator to install the module." : "Bitte fragen Sie, für die Installation des Moduls, Ihren Server-Administrator.", "PHP module %s not installed." : "PHP-Modul %s nicht installiert.", - "PHP %s or higher is required." : "PHP %s oder höher wird benötigt.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Bitte fragen Sie zur Aktualisierung von PHP auf die letzte Version Ihren Server-Administrator. Ihre PHP-Version wird nicht länger durch ownCloud und der PHP-Gemeinschaft unterstützt.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP-Sicherheitsmodus ist aktiviert. ownCloud benötigt für eine korrekte Funktion eine Deaktivierung von diesem Modus.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Der PHP-Sicherheitsmodus ist eine veraltete und meist nutzlose Einstellung, die deaktiviert werden sollte. Bitte fragen Sie Ihren Server-Administrator zur Deaktivierung in der php.ini oder Ihrer Webserver-Konfiguration.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes ist aktiviert. ownCloud benötigt für eine korrekte Funktion eine Deaktivierung von diesem Modus.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes ist eine veraltete und meist nutzlose Einstellung, die deaktiviert werden sollte. Bitte fragen Sie Ihren Server-Administrator zur Deaktivierung in der php.ini oder Ihrer Webserver-Konfiguration.", "PHP modules have been installed, but they are still listed as missing?" : "PHP-Module wurden installiert, werden aber als noch fehlend gelistet?", "Please ask your server administrator to restart the web server." : "Bitte fragen Sie Ihren Server-Administrator zum Neustart des Webservers.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 benötigt", diff --git a/lib/l10n/el.js b/lib/l10n/el.js index 5d0048837fb..187b4629024 100644 --- a/lib/l10n/el.js +++ b/lib/l10n/el.js @@ -7,6 +7,7 @@ OC.L10N.register( "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Αυτό μπορεί συνήθως να διορθωθεί %sπαρέχοντας δικαιώματα εγγραφής για το φάκελο config στο διακομιστή δικτύου%s.", "Sample configuration detected" : "Ανιχνεύθηκε δείγμα εγκατάστασης", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Έχει ανιχνευθεί ότι το δείγμα εγκατάστασης έχει αντιγραφεί. Αυτό μπορεί να σπάσει την εγκατάστασή σας και δεν υποστηρίζεται. Παρακαλώ διαβάστε την τεκμηρίωση πριν εκτελέσετε αλλαγές στο config.php", + "PHP %s or higher is required." : "PHP %s ή νεώτερη απαιτείται.", "Help" : "Βοήθεια", "Personal" : "Προσωπικά", "Settings" : "Ρυθμίσεις", @@ -103,12 +104,7 @@ OC.L10N.register( "Please install one of these locales on your system and restart your webserver." : "Παρακαλώ να εγκαταστήσετε μία από αυτές τις τοπικές ρυθμίσεις στο σύστημά σας και να επανεκκινήσετε τον διακομιστή δικτύου σας.", "Please ask your server administrator to install the module." : "Παρακαλώ ζητήστε από το διαχειριστή του διακομιστή σας να εγκαταστήσει τη μονάδα.", "PHP module %s not installed." : "Η μονάδα %s PHP δεν είναι εγκατεστημένη. ", - "PHP %s or higher is required." : "PHP %s ή νεώτερη απαιτείται.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Παρακαλώ ζητήστε από το διαχειριστή του διακομιστή σας να ενημερώσει τον PHP στη νεώτερη έκδοση. Η έκδοση του PHP σας δεν υποστηρίζεται πλεον από το ownCloud και την κοινότητα PHP.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "Η Ασφαλής Λειτουργία PHP έχει ενεργοποιηθεί. Το ownCloud απαιτεί να είναι απενεργοποιημένη για να λειτουργεί σωστά.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Η Ασφαλής Λειτουργεία PHP είναι μια ξεπερασμένη και κατά κύριο λόγο άχρηστη ρύθμιση που θα πρέπει να είναι απενεργοποιημένη. Παρακαλώ ζητήστε από το διαχειριστή του διακομιστή σας να την απενεργοποιήσει στο php.ini ή στις ρυθμίσεις του διακομιστή δικτύου σας.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Οι Magic Quotes είναι ενεργοποιημένες. Το ownCloud απαιτεί να είναι απενεργοποιημένες για να λειτουργεί σωστά.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Οι Magic Quotes είναι μια ξεπερασμένη και κατά κύριο λόγο άχρηστη ρύθμιση που θα πρέπει να είναι απενεργοποιημένη. Παρακαλώ ζητήστε από το διαχειριστή του διακομιστή σας να την απενεργοποιήσει στο php.ini ή στις ρυθμίσεις του διακομιστή δικτύου σας.", "PHP modules have been installed, but they are still listed as missing?" : "Κάποιες μονάδες PHP έχουν εγκατασταθεί, αλλά είναι ακόμα καταγεγραμμένες ως απούσες;", "Please ask your server administrator to restart the web server." : "Παρακαλώ ζητήστε από το διαχειριστή του διακομιστή σας να επανεκκινήσει το διακομιστή δικτύου σας.", "PostgreSQL >= 9 required" : "Απαιτείται PostgreSQL >= 9", diff --git a/lib/l10n/el.json b/lib/l10n/el.json index 65ff3ab3aa1..34636128e1d 100644 --- a/lib/l10n/el.json +++ b/lib/l10n/el.json @@ -5,6 +5,7 @@ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Αυτό μπορεί συνήθως να διορθωθεί %sπαρέχοντας δικαιώματα εγγραφής για το φάκελο config στο διακομιστή δικτύου%s.", "Sample configuration detected" : "Ανιχνεύθηκε δείγμα εγκατάστασης", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Έχει ανιχνευθεί ότι το δείγμα εγκατάστασης έχει αντιγραφεί. Αυτό μπορεί να σπάσει την εγκατάστασή σας και δεν υποστηρίζεται. Παρακαλώ διαβάστε την τεκμηρίωση πριν εκτελέσετε αλλαγές στο config.php", + "PHP %s or higher is required." : "PHP %s ή νεώτερη απαιτείται.", "Help" : "Βοήθεια", "Personal" : "Προσωπικά", "Settings" : "Ρυθμίσεις", @@ -101,12 +102,7 @@ "Please install one of these locales on your system and restart your webserver." : "Παρακαλώ να εγκαταστήσετε μία από αυτές τις τοπικές ρυθμίσεις στο σύστημά σας και να επανεκκινήσετε τον διακομιστή δικτύου σας.", "Please ask your server administrator to install the module." : "Παρακαλώ ζητήστε από το διαχειριστή του διακομιστή σας να εγκαταστήσει τη μονάδα.", "PHP module %s not installed." : "Η μονάδα %s PHP δεν είναι εγκατεστημένη. ", - "PHP %s or higher is required." : "PHP %s ή νεώτερη απαιτείται.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Παρακαλώ ζητήστε από το διαχειριστή του διακομιστή σας να ενημερώσει τον PHP στη νεώτερη έκδοση. Η έκδοση του PHP σας δεν υποστηρίζεται πλεον από το ownCloud και την κοινότητα PHP.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "Η Ασφαλής Λειτουργία PHP έχει ενεργοποιηθεί. Το ownCloud απαιτεί να είναι απενεργοποιημένη για να λειτουργεί σωστά.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Η Ασφαλής Λειτουργεία PHP είναι μια ξεπερασμένη και κατά κύριο λόγο άχρηστη ρύθμιση που θα πρέπει να είναι απενεργοποιημένη. Παρακαλώ ζητήστε από το διαχειριστή του διακομιστή σας να την απενεργοποιήσει στο php.ini ή στις ρυθμίσεις του διακομιστή δικτύου σας.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Οι Magic Quotes είναι ενεργοποιημένες. Το ownCloud απαιτεί να είναι απενεργοποιημένες για να λειτουργεί σωστά.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Οι Magic Quotes είναι μια ξεπερασμένη και κατά κύριο λόγο άχρηστη ρύθμιση που θα πρέπει να είναι απενεργοποιημένη. Παρακαλώ ζητήστε από το διαχειριστή του διακομιστή σας να την απενεργοποιήσει στο php.ini ή στις ρυθμίσεις του διακομιστή δικτύου σας.", "PHP modules have been installed, but they are still listed as missing?" : "Κάποιες μονάδες PHP έχουν εγκατασταθεί, αλλά είναι ακόμα καταγεγραμμένες ως απούσες;", "Please ask your server administrator to restart the web server." : "Παρακαλώ ζητήστε από το διαχειριστή του διακομιστή σας να επανεκκινήσει το διακομιστή δικτύου σας.", "PostgreSQL >= 9 required" : "Απαιτείται PostgreSQL >= 9", diff --git a/lib/l10n/en_GB.js b/lib/l10n/en_GB.js index 9e5400deb2d..e7ce6a3259a 100644 --- a/lib/l10n/en_GB.js +++ b/lib/l10n/en_GB.js @@ -7,6 +7,9 @@ OC.L10N.register( "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "This can usually be fixed by %sgiving the webserver write access to the config directory%s.", "Sample configuration detected" : "Sample configuration detected", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php", + "PHP %s or higher is required." : "PHP %s or higher is required.", + "PHP with a version less then %s is required." : "PHP with a version earlier than %s is required.", + "Following databases are supported: %s" : "Following databases are supported: %s", "Help" : "Help", "Personal" : "Personal", "Settings" : "Settings", @@ -105,12 +108,7 @@ OC.L10N.register( "Please install one of these locales on your system and restart your webserver." : "Please install one of these locales on your system and restart your webserver.", "Please ask your server administrator to install the module." : "Please ask your server administrator to install the module.", "PHP module %s not installed." : "PHP module %s not installed.", - "PHP %s or higher is required." : "PHP %s or higher is required.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config.", "PHP modules have been installed, but they are still listed as missing?" : "PHP modules have been installed, but they are still listed as missing?", "Please ask your server administrator to restart the web server." : "Please ask your server administrator to restart the web server.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 required", diff --git a/lib/l10n/en_GB.json b/lib/l10n/en_GB.json index e3a44ec8e9b..40a7a5f7204 100644 --- a/lib/l10n/en_GB.json +++ b/lib/l10n/en_GB.json @@ -5,6 +5,9 @@ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "This can usually be fixed by %sgiving the webserver write access to the config directory%s.", "Sample configuration detected" : "Sample configuration detected", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php", + "PHP %s or higher is required." : "PHP %s or higher is required.", + "PHP with a version less then %s is required." : "PHP with a version earlier than %s is required.", + "Following databases are supported: %s" : "Following databases are supported: %s", "Help" : "Help", "Personal" : "Personal", "Settings" : "Settings", @@ -103,12 +106,7 @@ "Please install one of these locales on your system and restart your webserver." : "Please install one of these locales on your system and restart your webserver.", "Please ask your server administrator to install the module." : "Please ask your server administrator to install the module.", "PHP module %s not installed." : "PHP module %s not installed.", - "PHP %s or higher is required." : "PHP %s or higher is required.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config.", "PHP modules have been installed, but they are still listed as missing?" : "PHP modules have been installed, but they are still listed as missing?", "Please ask your server administrator to restart the web server." : "Please ask your server administrator to restart the web server.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 required", diff --git a/lib/l10n/eo.js b/lib/l10n/eo.js index ea912c1cca0..92c9bf52df5 100644 --- a/lib/l10n/eo.js +++ b/lib/l10n/eo.js @@ -2,6 +2,7 @@ OC.L10N.register( "lib", { "See %s" : "Vidi %s", + "PHP %s or higher is required." : "PHP %s aŭ pli alta necesas.", "Help" : "Helpo", "Personal" : "Persona", "Settings" : "Agordo", @@ -50,7 +51,6 @@ OC.L10N.register( "The username is already being used" : "La uzantonomo jam uzatas", "Please ask your server administrator to install the module." : "Bonvolu peti vian sistemadministranton, ke ĝi instalu la modulon.", "PHP module %s not installed." : "La PHP-modulo %s ne instalitas.", - "PHP %s or higher is required." : "PHP %s aŭ pli alta necesas.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 necesas" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/eo.json b/lib/l10n/eo.json index 7e1ed7bb813..b1d12a9ce7b 100644 --- a/lib/l10n/eo.json +++ b/lib/l10n/eo.json @@ -1,5 +1,6 @@ { "translations": { "See %s" : "Vidi %s", + "PHP %s or higher is required." : "PHP %s aŭ pli alta necesas.", "Help" : "Helpo", "Personal" : "Persona", "Settings" : "Agordo", @@ -48,7 +49,6 @@ "The username is already being used" : "La uzantonomo jam uzatas", "Please ask your server administrator to install the module." : "Bonvolu peti vian sistemadministranton, ke ĝi instalu la modulon.", "PHP module %s not installed." : "La PHP-modulo %s ne instalitas.", - "PHP %s or higher is required." : "PHP %s aŭ pli alta necesas.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 necesas" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/es.js b/lib/l10n/es.js index 9cdd328e974..ed0097df95d 100644 --- a/lib/l10n/es.js +++ b/lib/l10n/es.js @@ -7,6 +7,7 @@ OC.L10N.register( "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Esto puede ser facilmente solucionado, %sdando permisos de escritura al directorio de configuración en el servidor Web%s.", "Sample configuration detected" : "Ejemplo de configuración detectado", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que el ejemplo de configuración ha sido copiado. Esto puede arruinar su instalación y es un caso para el que no se brinda soporte. Lea la documentación antes de hacer cambios en config.php", + "PHP %s or higher is required." : "Se requiere PHP %s o superior.", "Help" : "Ayuda", "Personal" : "Personal", "Settings" : "Ajustes", @@ -105,12 +106,7 @@ OC.L10N.register( "Please install one of these locales on your system and restart your webserver." : "Instale uno de estos idiomas en su sistema y reinicie su servidor web.", "Please ask your server administrator to install the module." : "Consulte al administrador de su servidor para instalar el módulo.", "PHP module %s not installed." : "El ódulo PHP %s no está instalado.", - "PHP %s or higher is required." : "Se requiere PHP %s o superior.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Consulte a su administrador del servidor para actualizar PHP a la versión más reciente. Su versión de PHP ya no es apoyado por ownCloud y la comunidad PHP.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP Safe mode está habilitado. ownCloud requiere que se desactive para que funcione correctamente.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Modo Seguro de PHP es un entorno en desuso y en su mayoría inútil que debe ser desactivada. Contacte al administrador del servidor para desactivarlo en php.ini o en la configuración del servidor web.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes está habilitado. ownCloud requiere que se desactive para que funcione correctamente.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes es un entorno en desuso y en su mayoría inútil que debe ser desactivada. Consulte a su administrador del servidor para desactivarlo en php.ini o en la configuración del servidor web.", "PHP modules have been installed, but they are still listed as missing?" : "Los módulos PHP se han instalado, pero aparecen listados como si faltaran", "Please ask your server administrator to restart the web server." : "Consulte al administrador de su servidor para reiniciar el servidor web.", "PostgreSQL >= 9 required" : "PostgreSQL 9 o superior requerido.", diff --git a/lib/l10n/es.json b/lib/l10n/es.json index c14b03c15df..6d6cb243808 100644 --- a/lib/l10n/es.json +++ b/lib/l10n/es.json @@ -5,6 +5,7 @@ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Esto puede ser facilmente solucionado, %sdando permisos de escritura al directorio de configuración en el servidor Web%s.", "Sample configuration detected" : "Ejemplo de configuración detectado", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que el ejemplo de configuración ha sido copiado. Esto puede arruinar su instalación y es un caso para el que no se brinda soporte. Lea la documentación antes de hacer cambios en config.php", + "PHP %s or higher is required." : "Se requiere PHP %s o superior.", "Help" : "Ayuda", "Personal" : "Personal", "Settings" : "Ajustes", @@ -103,12 +104,7 @@ "Please install one of these locales on your system and restart your webserver." : "Instale uno de estos idiomas en su sistema y reinicie su servidor web.", "Please ask your server administrator to install the module." : "Consulte al administrador de su servidor para instalar el módulo.", "PHP module %s not installed." : "El ódulo PHP %s no está instalado.", - "PHP %s or higher is required." : "Se requiere PHP %s o superior.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Consulte a su administrador del servidor para actualizar PHP a la versión más reciente. Su versión de PHP ya no es apoyado por ownCloud y la comunidad PHP.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP Safe mode está habilitado. ownCloud requiere que se desactive para que funcione correctamente.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Modo Seguro de PHP es un entorno en desuso y en su mayoría inútil que debe ser desactivada. Contacte al administrador del servidor para desactivarlo en php.ini o en la configuración del servidor web.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes está habilitado. ownCloud requiere que se desactive para que funcione correctamente.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes es un entorno en desuso y en su mayoría inútil que debe ser desactivada. Consulte a su administrador del servidor para desactivarlo en php.ini o en la configuración del servidor web.", "PHP modules have been installed, but they are still listed as missing?" : "Los módulos PHP se han instalado, pero aparecen listados como si faltaran", "Please ask your server administrator to restart the web server." : "Consulte al administrador de su servidor para reiniciar el servidor web.", "PostgreSQL >= 9 required" : "PostgreSQL 9 o superior requerido.", diff --git a/lib/l10n/et_EE.js b/lib/l10n/et_EE.js index 8fbc25c4403..a3e587a13af 100644 --- a/lib/l10n/et_EE.js +++ b/lib/l10n/et_EE.js @@ -7,6 +7,7 @@ OC.L10N.register( "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Tavaliselt saab selle lahendada %s andes veebiserverile seadete kataloogile \"config\" kirjutusõigused %s", "Sample configuration detected" : "Tuvastati näidisseaded", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Tuvastati, et kopeeriti näidisseaded. See võib lõhkuda sinu saidi ja see pole toetatud. Palun loe enne faili config.php muutmist dokumentatsiooni", + "PHP %s or higher is required." : "PHP %s või uuem on nõutav.", "Help" : "Abiinfo", "Personal" : "Isiklik", "Settings" : "Seaded", @@ -103,12 +104,7 @@ OC.L10N.register( "Please install one of these locales on your system and restart your webserver." : "Palun paigalda mõni neist lokaatides oma süsteemi ning taaskäivita veebiserver.", "Please ask your server administrator to install the module." : "Palu oma serveri haldajal moodul paigadalda.", "PHP module %s not installed." : "PHP moodulit %s pole paigaldatud.", - "PHP %s or higher is required." : "PHP %s või uuem on nõutav.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Palu oma serveri haldajal uuendada PHP viimasele versioonile. Sinu PHP versioon pole enam toetatud ownCloud-i ja PHP kogukonna poolt.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP Safe Mode on lubatud. ownCloud vajab normaalseks toimimiseks, et see oleks keelatud.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP Safe Mode on aegunud ja üldiselt kasutu seadistus, mis tuleks keelata. Palu oma serveri haldajal see keelata php.ini failis või veebiserveri seadetes.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes on lubatud. ownCloud vajab normaalseks toimimiseks, et see oleks keelatud.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes on aegunud ja üldiselt kasutu seadistus, mis tuleks keelata. Palu oma serveri haldajal see keelata php.ini failis või veebiserveri seadetes.", "PHP modules have been installed, but they are still listed as missing?" : "PHP moodulid on paigaldatud, kuid neid näitatakse endiselt kui puuduolevad?", "Please ask your server administrator to restart the web server." : "Palu oma serveri haldajal veebiserver taaskäivitada.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 on nõutav", diff --git a/lib/l10n/et_EE.json b/lib/l10n/et_EE.json index 099000bd74a..e0da0ed615f 100644 --- a/lib/l10n/et_EE.json +++ b/lib/l10n/et_EE.json @@ -5,6 +5,7 @@ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Tavaliselt saab selle lahendada %s andes veebiserverile seadete kataloogile \"config\" kirjutusõigused %s", "Sample configuration detected" : "Tuvastati näidisseaded", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Tuvastati, et kopeeriti näidisseaded. See võib lõhkuda sinu saidi ja see pole toetatud. Palun loe enne faili config.php muutmist dokumentatsiooni", + "PHP %s or higher is required." : "PHP %s või uuem on nõutav.", "Help" : "Abiinfo", "Personal" : "Isiklik", "Settings" : "Seaded", @@ -101,12 +102,7 @@ "Please install one of these locales on your system and restart your webserver." : "Palun paigalda mõni neist lokaatides oma süsteemi ning taaskäivita veebiserver.", "Please ask your server administrator to install the module." : "Palu oma serveri haldajal moodul paigadalda.", "PHP module %s not installed." : "PHP moodulit %s pole paigaldatud.", - "PHP %s or higher is required." : "PHP %s või uuem on nõutav.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Palu oma serveri haldajal uuendada PHP viimasele versioonile. Sinu PHP versioon pole enam toetatud ownCloud-i ja PHP kogukonna poolt.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP Safe Mode on lubatud. ownCloud vajab normaalseks toimimiseks, et see oleks keelatud.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP Safe Mode on aegunud ja üldiselt kasutu seadistus, mis tuleks keelata. Palu oma serveri haldajal see keelata php.ini failis või veebiserveri seadetes.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes on lubatud. ownCloud vajab normaalseks toimimiseks, et see oleks keelatud.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes on aegunud ja üldiselt kasutu seadistus, mis tuleks keelata. Palu oma serveri haldajal see keelata php.ini failis või veebiserveri seadetes.", "PHP modules have been installed, but they are still listed as missing?" : "PHP moodulid on paigaldatud, kuid neid näitatakse endiselt kui puuduolevad?", "Please ask your server administrator to restart the web server." : "Palu oma serveri haldajal veebiserver taaskäivitada.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 on nõutav", diff --git a/lib/l10n/eu.js b/lib/l10n/eu.js index b5b6b7d364b..a6ee6287893 100644 --- a/lib/l10n/eu.js +++ b/lib/l10n/eu.js @@ -7,6 +7,7 @@ OC.L10N.register( "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Hau normalean konpondu daiteke %sweb zerbitzarira config karpetan idazteko baimenak emanez%s.", "Sample configuration detected" : "Adibide-ezarpena detektatua", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Detektatu da adibide-ezarpena kopiatu dela. Honek zure instalazioa apur dezake eta ez da onartzen. Irakurri dokumentazioa config.php fitxategia aldatu aurretik.", + "PHP %s or higher is required." : "PHP %s edo berriagoa behar da.", "Help" : "Laguntza", "Personal" : "Pertsonala", "Settings" : "Ezarpenak", @@ -103,12 +104,7 @@ OC.L10N.register( "Please install one of these locales on your system and restart your webserver." : "Instalatu hauetako lokal bat zure sisteman eta berrabiarazi zure web zerbitzaria.", "Please ask your server administrator to install the module." : "Mesedez eskatu zure zerbitzariaren kudeatzaileari modulua instala dezan.", "PHP module %s not installed." : "PHPren %s modulua ez dago instalaturik.", - "PHP %s or higher is required." : "PHP %s edo berriagoa behar da.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Mesedez eskatu zure zerbitzariaren kudeatzaileari PHP azkenengo bertsiora eguneratzea. Zure PHP bertsioa ez dute ez ownCloud eta ez PHP komunitateek mantentzen.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP SafeMode gaitua dago. ownCloudek ongi funtzionatzeko desgaitua behar du.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP Safe Mode ia erabiligabeko ezarpen zahar bat da eta desgaituta egon beharko luke. Mesedez eskatu zerbitzariaren kudeatzaileari php.ini edo zure web zerbitzariaren konfigurazioan desgaitu dezan.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes gaitua dago. ownCloudek ongi funtzionatzeko desgaitua behar du.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes ia erabiligabeko ezarpen zahar bat da eta desgaituta egon beharko luke. Mesedez eskatu zerbitzariaren kudeatzaileari php.ini edo zure web zerbitzariaren konfigurazioan desgaitu dezan.", "PHP modules have been installed, but they are still listed as missing?" : "PHP moduluak instalatu dira, baina oraindik faltan bezala markatuta daude?", "Please ask your server administrator to restart the web server." : "Mesedez eskatu zerbitzariaren kudeatzaileari web zerbitzaria berrabiarazteko.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 behar da", diff --git a/lib/l10n/eu.json b/lib/l10n/eu.json index 77a7f6f095e..3c7705352c2 100644 --- a/lib/l10n/eu.json +++ b/lib/l10n/eu.json @@ -5,6 +5,7 @@ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Hau normalean konpondu daiteke %sweb zerbitzarira config karpetan idazteko baimenak emanez%s.", "Sample configuration detected" : "Adibide-ezarpena detektatua", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Detektatu da adibide-ezarpena kopiatu dela. Honek zure instalazioa apur dezake eta ez da onartzen. Irakurri dokumentazioa config.php fitxategia aldatu aurretik.", + "PHP %s or higher is required." : "PHP %s edo berriagoa behar da.", "Help" : "Laguntza", "Personal" : "Pertsonala", "Settings" : "Ezarpenak", @@ -101,12 +102,7 @@ "Please install one of these locales on your system and restart your webserver." : "Instalatu hauetako lokal bat zure sisteman eta berrabiarazi zure web zerbitzaria.", "Please ask your server administrator to install the module." : "Mesedez eskatu zure zerbitzariaren kudeatzaileari modulua instala dezan.", "PHP module %s not installed." : "PHPren %s modulua ez dago instalaturik.", - "PHP %s or higher is required." : "PHP %s edo berriagoa behar da.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Mesedez eskatu zure zerbitzariaren kudeatzaileari PHP azkenengo bertsiora eguneratzea. Zure PHP bertsioa ez dute ez ownCloud eta ez PHP komunitateek mantentzen.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP SafeMode gaitua dago. ownCloudek ongi funtzionatzeko desgaitua behar du.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP Safe Mode ia erabiligabeko ezarpen zahar bat da eta desgaituta egon beharko luke. Mesedez eskatu zerbitzariaren kudeatzaileari php.ini edo zure web zerbitzariaren konfigurazioan desgaitu dezan.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes gaitua dago. ownCloudek ongi funtzionatzeko desgaitua behar du.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes ia erabiligabeko ezarpen zahar bat da eta desgaituta egon beharko luke. Mesedez eskatu zerbitzariaren kudeatzaileari php.ini edo zure web zerbitzariaren konfigurazioan desgaitu dezan.", "PHP modules have been installed, but they are still listed as missing?" : "PHP moduluak instalatu dira, baina oraindik faltan bezala markatuta daude?", "Please ask your server administrator to restart the web server." : "Mesedez eskatu zerbitzariaren kudeatzaileari web zerbitzaria berrabiarazteko.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 behar da", diff --git a/lib/l10n/fi_FI.js b/lib/l10n/fi_FI.js index 1097dd20850..3dbf12577e0 100644 --- a/lib/l10n/fi_FI.js +++ b/lib/l10n/fi_FI.js @@ -6,6 +6,8 @@ OC.L10N.register( "See %s" : "Katso %s", "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Tämän voi yleensä korjata antamalla %shttp-palvelimelle kirjoitusoikeuden asetushakemistoon%s.", "Sample configuration detected" : "Esimerkkimääritykset havaittu", + "PHP %s or higher is required." : "PHP %s tai sitä uudempi vaaditaan.", + "Following databases are supported: %s" : "Seuraavat tietokannat ovat tuettuja: %s", "Help" : "Ohje", "Personal" : "Henkilökohtainen", "Settings" : "Asetukset", @@ -92,12 +94,7 @@ OC.L10N.register( "Please install one of these locales on your system and restart your webserver." : "Asenna ainakin yksi kyseisistä maa-asetuksista järjestelmään ja käynnistä http-palvelin uudelleen.", "Please ask your server administrator to install the module." : "Pyydä palvelimen ylläpitäjää asentamaan moduulin.", "PHP module %s not installed." : "PHP-moduulia %s ei ole asennettu.", - "PHP %s or higher is required." : "PHP %s tai sitä uudempi vaaditaan.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Pyydä palvelimen ylläpitäjää päivittämään PHP uusimpaan versioon. Käyttämäsi PHP-versio ei ole enää tuettu ownCloud- ja PHP-yhteisön toimesta.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP:n \"Safe Mode\" on käytössä. ownCloud vaatii toimiakseen \"Safe Moden\" poistamisen käytöstä.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP:n Safe Mode on vanhennettu ja muutenkin lähes hyödytön asetus, joka tulee poistaa käytöstä. Pyydä järjestelmän ylläpitäjää poistamaan ominaisuus käytöstä php.ini-tiedoston kautta tai http-palvelimen asetuksista.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes -asetus on käytössä. ownCloud vaatii toimiakseen kyseisen asetuksen poistamisen käytöstä.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes -asetus on vanhennettu ja pääosin hyödytön, joten se tulisi poistaa käytöstä. Pyydä palvelimen ylläpitäjää poistamaan asetus käytöstä php.ini-tiedoston avulla tai http-palvelimen asetuksista.", "PHP modules have been installed, but they are still listed as missing?" : "PHP-moduulit on asennettu, mutta ovatko ne vieläkin listattu puuttuviksi?", "Please ask your server administrator to restart the web server." : "Pyydä palvelimen ylläpitäjää käynnistämään web-palvelin uudelleen.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 vaaditaan", diff --git a/lib/l10n/fi_FI.json b/lib/l10n/fi_FI.json index 2bd73df0379..9412f99262e 100644 --- a/lib/l10n/fi_FI.json +++ b/lib/l10n/fi_FI.json @@ -4,6 +4,8 @@ "See %s" : "Katso %s", "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Tämän voi yleensä korjata antamalla %shttp-palvelimelle kirjoitusoikeuden asetushakemistoon%s.", "Sample configuration detected" : "Esimerkkimääritykset havaittu", + "PHP %s or higher is required." : "PHP %s tai sitä uudempi vaaditaan.", + "Following databases are supported: %s" : "Seuraavat tietokannat ovat tuettuja: %s", "Help" : "Ohje", "Personal" : "Henkilökohtainen", "Settings" : "Asetukset", @@ -90,12 +92,7 @@ "Please install one of these locales on your system and restart your webserver." : "Asenna ainakin yksi kyseisistä maa-asetuksista järjestelmään ja käynnistä http-palvelin uudelleen.", "Please ask your server administrator to install the module." : "Pyydä palvelimen ylläpitäjää asentamaan moduulin.", "PHP module %s not installed." : "PHP-moduulia %s ei ole asennettu.", - "PHP %s or higher is required." : "PHP %s tai sitä uudempi vaaditaan.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Pyydä palvelimen ylläpitäjää päivittämään PHP uusimpaan versioon. Käyttämäsi PHP-versio ei ole enää tuettu ownCloud- ja PHP-yhteisön toimesta.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP:n \"Safe Mode\" on käytössä. ownCloud vaatii toimiakseen \"Safe Moden\" poistamisen käytöstä.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP:n Safe Mode on vanhennettu ja muutenkin lähes hyödytön asetus, joka tulee poistaa käytöstä. Pyydä järjestelmän ylläpitäjää poistamaan ominaisuus käytöstä php.ini-tiedoston kautta tai http-palvelimen asetuksista.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes -asetus on käytössä. ownCloud vaatii toimiakseen kyseisen asetuksen poistamisen käytöstä.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes -asetus on vanhennettu ja pääosin hyödytön, joten se tulisi poistaa käytöstä. Pyydä palvelimen ylläpitäjää poistamaan asetus käytöstä php.ini-tiedoston avulla tai http-palvelimen asetuksista.", "PHP modules have been installed, but they are still listed as missing?" : "PHP-moduulit on asennettu, mutta ovatko ne vieläkin listattu puuttuviksi?", "Please ask your server administrator to restart the web server." : "Pyydä palvelimen ylläpitäjää käynnistämään web-palvelin uudelleen.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 vaaditaan", diff --git a/lib/l10n/fr.js b/lib/l10n/fr.js index ec7e949abcc..0b926564748 100644 --- a/lib/l10n/fr.js +++ b/lib/l10n/fr.js @@ -7,6 +7,9 @@ OC.L10N.register( "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Ce problème est généralement résolu %sen donnant au serveur web un accès en écriture au répertoire de configuration%s.", "Sample configuration detected" : "Configuration d'exemple détectée", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Il a été détecté que la configuration donnée à titre d'exemple a été copiée. Cela peut rendre votre installation inopérante et n'est pas pris en charge. Veuillez lire la documentation avant d'effectuer des modifications dans config.php", + "PHP %s or higher is required." : "PHP %s ou supérieur est requis.", + "PHP with a version less then %s is required." : "PHP avec une version antérieure à %s est requis.", + "Following databases are supported: %s" : "Les bases de données suivantes sont supportées: %s", "Help" : "Aide", "Personal" : "Personnel", "Settings" : "Paramètres", @@ -102,15 +105,10 @@ OC.L10N.register( "Cannot create \"data\" directory (%s)" : "Impossible de créer le répertoire \"data\" (%s)", "This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Ce problème est généralement résolu <a href=\"%s\" target=\"_blank\">en donnant au serveur web un accès en écriture au répertoire racine</a>.", "Setting locale to %s failed" : "Le choix de la langue pour %s a échoué", - "Please install one of these locales on your system and restart your webserver." : "Veuillez installer l'une de ces langues sur votre système et redémarrer votre serveur web.", + "Please install one of these locales on your system and restart your webserver." : "Veuillez installer l'un de ces paramètres régionaux sur votre système et redémarrer votre serveur web.", "Please ask your server administrator to install the module." : "Veuillez demander à votre administrateur d’installer le module.", "PHP module %s not installed." : "Le module PHP %s n’est pas installé.", - "PHP %s or higher is required." : "PHP %s ou supérieur est requis.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Veuillez demander à votre administrateur de mettre à jour PHP vers sa dernière version disponible. La vôtre n’est plus prise en charge par ownCloud ni par la communauté PHP.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP Safe Mode est activé. ownCloud requiert sa désactivation afin de fonctionner correctement.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP Safe Mode est déprécié, inutile la plupart du temps, et doit être désactivé. Veuillez demander à votre administrateur serveur de le désactiver dans le fichier php.ini ou dans votre configuration du serveur web.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes est activé. ownCloud requiert sa désactivation afin de fonctionner correctement.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes est déprécié, inutile la plupart du temps, et doit être désactivé. Veuillez demander à votre administrateur serveur de le désactiver dans le fichier php.ini ou dans votre configuration du serveur web.", "PHP modules have been installed, but they are still listed as missing?" : "Les modules PHP ont été installés mais sont toujours indiqués comme manquants ?", "Please ask your server administrator to restart the web server." : "Veuillez demander à votre administrateur serveur de redémarrer le serveur web.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 requis", diff --git a/lib/l10n/fr.json b/lib/l10n/fr.json index ecba239d076..f08527d29c3 100644 --- a/lib/l10n/fr.json +++ b/lib/l10n/fr.json @@ -5,6 +5,9 @@ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Ce problème est généralement résolu %sen donnant au serveur web un accès en écriture au répertoire de configuration%s.", "Sample configuration detected" : "Configuration d'exemple détectée", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Il a été détecté que la configuration donnée à titre d'exemple a été copiée. Cela peut rendre votre installation inopérante et n'est pas pris en charge. Veuillez lire la documentation avant d'effectuer des modifications dans config.php", + "PHP %s or higher is required." : "PHP %s ou supérieur est requis.", + "PHP with a version less then %s is required." : "PHP avec une version antérieure à %s est requis.", + "Following databases are supported: %s" : "Les bases de données suivantes sont supportées: %s", "Help" : "Aide", "Personal" : "Personnel", "Settings" : "Paramètres", @@ -100,15 +103,10 @@ "Cannot create \"data\" directory (%s)" : "Impossible de créer le répertoire \"data\" (%s)", "This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Ce problème est généralement résolu <a href=\"%s\" target=\"_blank\">en donnant au serveur web un accès en écriture au répertoire racine</a>.", "Setting locale to %s failed" : "Le choix de la langue pour %s a échoué", - "Please install one of these locales on your system and restart your webserver." : "Veuillez installer l'une de ces langues sur votre système et redémarrer votre serveur web.", + "Please install one of these locales on your system and restart your webserver." : "Veuillez installer l'un de ces paramètres régionaux sur votre système et redémarrer votre serveur web.", "Please ask your server administrator to install the module." : "Veuillez demander à votre administrateur d’installer le module.", "PHP module %s not installed." : "Le module PHP %s n’est pas installé.", - "PHP %s or higher is required." : "PHP %s ou supérieur est requis.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Veuillez demander à votre administrateur de mettre à jour PHP vers sa dernière version disponible. La vôtre n’est plus prise en charge par ownCloud ni par la communauté PHP.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP Safe Mode est activé. ownCloud requiert sa désactivation afin de fonctionner correctement.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP Safe Mode est déprécié, inutile la plupart du temps, et doit être désactivé. Veuillez demander à votre administrateur serveur de le désactiver dans le fichier php.ini ou dans votre configuration du serveur web.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes est activé. ownCloud requiert sa désactivation afin de fonctionner correctement.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes est déprécié, inutile la plupart du temps, et doit être désactivé. Veuillez demander à votre administrateur serveur de le désactiver dans le fichier php.ini ou dans votre configuration du serveur web.", "PHP modules have been installed, but they are still listed as missing?" : "Les modules PHP ont été installés mais sont toujours indiqués comme manquants ?", "Please ask your server administrator to restart the web server." : "Veuillez demander à votre administrateur serveur de redémarrer le serveur web.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 requis", diff --git a/lib/l10n/gl.js b/lib/l10n/gl.js index 596b302009c..3d9642fe220 100644 --- a/lib/l10n/gl.js +++ b/lib/l10n/gl.js @@ -5,6 +5,9 @@ OC.L10N.register( "This can usually be fixed by giving the webserver write access to the config directory" : "Polo xeral, isto pode ser fixado para permitirlle ao servidor web acceso de escritura ao directorio «config»", "See %s" : "Vexa %s", "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Polo xeral, isto pode ser fixado para %spermitirlle ao servidor web acceso de escritura ao directorio «config»%s.", + "Sample configuration detected" : "Detectouse a configuración de exemplo", + "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Detectouse que foi copiada a configuración de exemplo. Isto pode rachar a súa instalación e non é compatíbel. Lea a documentación antes de facer cambios en config.php", + "PHP %s or higher is required." : "Requirese PHP %s ou superior.", "Help" : "Axuda", "Personal" : "Persoal", "Settings" : "Axustes", @@ -15,6 +18,8 @@ OC.L10N.register( "No app name specified" : "Non se especificou o nome da aplicación", "Unknown filetype" : "Tipo de ficheiro descoñecido", "Invalid image" : "Imaxe incorrecta", + "Database Error" : "Produciuse un erro na base de datos", + "Please contact your system administrator." : "Contacte co administrador.", "web services under your control" : "servizos web baixo o seu control", "App directory already exists" : "Xa existe o directorio da aplicación", "Can't create app folder. Please fix permissions. %s" : "Non é posíbel crear o cartafol de aplicacións. Corrixa os permisos. %s", @@ -50,6 +55,7 @@ OC.L10N.register( "PostgreSQL username and/or password not valid" : "Nome de usuario e/ou contrasinal de PostgreSQL incorrecto", "Set an admin username." : "Estabeleza un nome de usuario administrador", "Set an admin password." : "Estabeleza un contrasinal de administrador", + "Can't create or write into the data directory %s" : "Non é posíbel crear ou escribir o directorio «data» %s", "%s shared »%s« with you" : "%s compartiu «%s» con vostede", "Sharing %s failed, because the file does not exist" : "Fallou a compartición de %s, o ficheiro non existe", "You are not allowed to share %s" : "Non ten permiso para compartir %s", @@ -100,12 +106,7 @@ OC.L10N.register( "Please install one of these locales on your system and restart your webserver." : "Instale unha destas configuracións locais no seu sistema e reinicie o servidor web.", "Please ask your server administrator to install the module." : "Pregúntelle ao administrador do servidor pola instalación do módulo.", "PHP module %s not installed." : "O módulo PHP %s non está instalado.", - "PHP %s or higher is required." : "Requirese PHP %s ou superior.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Pregúntelle ao administrador do servidor pola actualización de PHP á versión máis recente. A súa versión de PHP xa non é asistida polas comunidades de ownCloud e PHP.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "O modo seguro de PHP está activado. ownCloud precisa que estea desactivado para traballar doadamente.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "O modo seguro de PHP é un entorno en desuso e maiormente inútil que ten que seren desactivado. Pregúntelle ao administrador do servidor pola desactivación en php.ini ou na configuración do servidor web.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "«Magic Quotes» está activado. ownCloud precisa que estea desactivado para traballar doadamente.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "«Magic Quotes» é un entorno en desuso e maiormente inútil que ten que seren desactivado. Pregúntelle ao administrador do servidor pola desactivación en php.ini ou na configuración do servidor web.", "PHP modules have been installed, but they are still listed as missing?" : "Instaláronse os módulos de PHP, mais aínda aparecen listados como perdidos?", "Please ask your server administrator to restart the web server." : "Pregúntelle ao administrador do servidor polo reinicio do servidor web..", "PostgreSQL >= 9 required" : "Requírese PostgreSQL >= 9", diff --git a/lib/l10n/gl.json b/lib/l10n/gl.json index 2b65b3a8f89..aec2b151977 100644 --- a/lib/l10n/gl.json +++ b/lib/l10n/gl.json @@ -3,6 +3,9 @@ "This can usually be fixed by giving the webserver write access to the config directory" : "Polo xeral, isto pode ser fixado para permitirlle ao servidor web acceso de escritura ao directorio «config»", "See %s" : "Vexa %s", "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Polo xeral, isto pode ser fixado para %spermitirlle ao servidor web acceso de escritura ao directorio «config»%s.", + "Sample configuration detected" : "Detectouse a configuración de exemplo", + "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Detectouse que foi copiada a configuración de exemplo. Isto pode rachar a súa instalación e non é compatíbel. Lea a documentación antes de facer cambios en config.php", + "PHP %s or higher is required." : "Requirese PHP %s ou superior.", "Help" : "Axuda", "Personal" : "Persoal", "Settings" : "Axustes", @@ -13,6 +16,8 @@ "No app name specified" : "Non se especificou o nome da aplicación", "Unknown filetype" : "Tipo de ficheiro descoñecido", "Invalid image" : "Imaxe incorrecta", + "Database Error" : "Produciuse un erro na base de datos", + "Please contact your system administrator." : "Contacte co administrador.", "web services under your control" : "servizos web baixo o seu control", "App directory already exists" : "Xa existe o directorio da aplicación", "Can't create app folder. Please fix permissions. %s" : "Non é posíbel crear o cartafol de aplicacións. Corrixa os permisos. %s", @@ -48,6 +53,7 @@ "PostgreSQL username and/or password not valid" : "Nome de usuario e/ou contrasinal de PostgreSQL incorrecto", "Set an admin username." : "Estabeleza un nome de usuario administrador", "Set an admin password." : "Estabeleza un contrasinal de administrador", + "Can't create or write into the data directory %s" : "Non é posíbel crear ou escribir o directorio «data» %s", "%s shared »%s« with you" : "%s compartiu «%s» con vostede", "Sharing %s failed, because the file does not exist" : "Fallou a compartición de %s, o ficheiro non existe", "You are not allowed to share %s" : "Non ten permiso para compartir %s", @@ -98,12 +104,7 @@ "Please install one of these locales on your system and restart your webserver." : "Instale unha destas configuracións locais no seu sistema e reinicie o servidor web.", "Please ask your server administrator to install the module." : "Pregúntelle ao administrador do servidor pola instalación do módulo.", "PHP module %s not installed." : "O módulo PHP %s non está instalado.", - "PHP %s or higher is required." : "Requirese PHP %s ou superior.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Pregúntelle ao administrador do servidor pola actualización de PHP á versión máis recente. A súa versión de PHP xa non é asistida polas comunidades de ownCloud e PHP.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "O modo seguro de PHP está activado. ownCloud precisa que estea desactivado para traballar doadamente.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "O modo seguro de PHP é un entorno en desuso e maiormente inútil que ten que seren desactivado. Pregúntelle ao administrador do servidor pola desactivación en php.ini ou na configuración do servidor web.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "«Magic Quotes» está activado. ownCloud precisa que estea desactivado para traballar doadamente.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "«Magic Quotes» é un entorno en desuso e maiormente inútil que ten que seren desactivado. Pregúntelle ao administrador do servidor pola desactivación en php.ini ou na configuración do servidor web.", "PHP modules have been installed, but they are still listed as missing?" : "Instaláronse os módulos de PHP, mais aínda aparecen listados como perdidos?", "Please ask your server administrator to restart the web server." : "Pregúntelle ao administrador do servidor polo reinicio do servidor web..", "PostgreSQL >= 9 required" : "Requírese PostgreSQL >= 9", diff --git a/lib/l10n/hr.js b/lib/l10n/hr.js index ead1e15d2cf..5e7a5e5cd54 100644 --- a/lib/l10n/hr.js +++ b/lib/l10n/hr.js @@ -7,6 +7,7 @@ OC.L10N.register( "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Ovo se obično može popraviti %sdavanjem pristupa web poslužitelju za pisanje u config direktoriju%s.", "Sample configuration detected" : "Nađena ogledna konfiguracija", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Otkriveno je da je ogledna konfiguracija kopirana. To može vašu instalaciju prekinuti i nije podržano.Molimo pročitajte dokumentaciju prije nego li izvršite promjene na config.php", + "PHP %s or higher is required." : "PHP verzija treba biti %s ili viša.", "Help" : "Pomoć", "Personal" : "Osobno", "Settings" : "Postavke", @@ -101,12 +102,7 @@ OC.L10N.register( "Please install one of these locales on your system and restart your webserver." : "Molimo instalirajte jednu od ovih regionalnih shema u svoj sustav i ponovno pokrenite svoj web poslužitelj.", "Please ask your server administrator to install the module." : "Molimo zamolite svog administratora poslužitelja da instalira modul.", "PHP module %s not installed." : "PHP modul %s nije instaliran.", - "PHP %s or higher is required." : "PHP verzija treba biti %s ili viša.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Molimo zamolite svog administratora poslužitelja da ažurira PHP na najnoviju verziju.Vašu PHP verziju ownCloud i PHP zajednica više ne podržavaju.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "Aktiviran je PHP siguran način rada. Da bi ownCloud radio kako treba, taj mod treba oemogućiti.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP siguran način rada je zastarjela i uglavnom beskorisna postavka koju treba onemogućiti. Molimo zamolite svogadministratora poslužitelja da je onemogući, bilo u php.ini ili u vašoj konfiguraciji web poslužitelja.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Postavka Magic Quotes je omogućena. Da bi ownCloud radio kako treba, tu postavku treba onemogućiti.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes je zastarjela i uglavnom beskorisna postavka koju treba onemogućiti. MOlimo zamolite svogadministratora poslužitelja da je onemogući, bilo u php.ini ili u vašoj konfiguraciji web poslužitelja.", "PHP modules have been installed, but they are still listed as missing?" : "PHP moduli su instalirani, ali još uvijek su na popisu onih koji nedostaju?", "Please ask your server administrator to restart the web server." : "Molimo zamolite svog administratora poslužitelja da ponovno pokrene web poslužitelj.", "PostgreSQL >= 9 required" : "Potreban je PostgreSQL >= 9", diff --git a/lib/l10n/hr.json b/lib/l10n/hr.json index 01bd54eccfc..7a2e62439c2 100644 --- a/lib/l10n/hr.json +++ b/lib/l10n/hr.json @@ -5,6 +5,7 @@ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Ovo se obično može popraviti %sdavanjem pristupa web poslužitelju za pisanje u config direktoriju%s.", "Sample configuration detected" : "Nađena ogledna konfiguracija", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Otkriveno je da je ogledna konfiguracija kopirana. To može vašu instalaciju prekinuti i nije podržano.Molimo pročitajte dokumentaciju prije nego li izvršite promjene na config.php", + "PHP %s or higher is required." : "PHP verzija treba biti %s ili viša.", "Help" : "Pomoć", "Personal" : "Osobno", "Settings" : "Postavke", @@ -99,12 +100,7 @@ "Please install one of these locales on your system and restart your webserver." : "Molimo instalirajte jednu od ovih regionalnih shema u svoj sustav i ponovno pokrenite svoj web poslužitelj.", "Please ask your server administrator to install the module." : "Molimo zamolite svog administratora poslužitelja da instalira modul.", "PHP module %s not installed." : "PHP modul %s nije instaliran.", - "PHP %s or higher is required." : "PHP verzija treba biti %s ili viša.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Molimo zamolite svog administratora poslužitelja da ažurira PHP na najnoviju verziju.Vašu PHP verziju ownCloud i PHP zajednica više ne podržavaju.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "Aktiviran je PHP siguran način rada. Da bi ownCloud radio kako treba, taj mod treba oemogućiti.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP siguran način rada je zastarjela i uglavnom beskorisna postavka koju treba onemogućiti. Molimo zamolite svogadministratora poslužitelja da je onemogući, bilo u php.ini ili u vašoj konfiguraciji web poslužitelja.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Postavka Magic Quotes je omogućena. Da bi ownCloud radio kako treba, tu postavku treba onemogućiti.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes je zastarjela i uglavnom beskorisna postavka koju treba onemogućiti. MOlimo zamolite svogadministratora poslužitelja da je onemogući, bilo u php.ini ili u vašoj konfiguraciji web poslužitelja.", "PHP modules have been installed, but they are still listed as missing?" : "PHP moduli su instalirani, ali još uvijek su na popisu onih koji nedostaju?", "Please ask your server administrator to restart the web server." : "Molimo zamolite svog administratora poslužitelja da ponovno pokrene web poslužitelj.", "PostgreSQL >= 9 required" : "Potreban je PostgreSQL >= 9", diff --git a/lib/l10n/hu_HU.js b/lib/l10n/hu_HU.js index be14e2d1f66..2d41b982344 100644 --- a/lib/l10n/hu_HU.js +++ b/lib/l10n/hu_HU.js @@ -7,6 +7,7 @@ OC.L10N.register( "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Ez rendszerint úgy oldható meg, hogy %sírási jogot adunk a webszervernek a config könyvtárra%s.", "Sample configuration detected" : "A példabeállítások vannak beállítva", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Úgy tűnik a példakonfigurációt próbálja ténylegesen használni. Ez nem támogatott, és működésképtelenné teheti a telepítést. Kérjük olvassa el a dokumentációt és azt követően változtasson a config.php-n!", + "PHP %s or higher is required." : "PHP %s vagy ennél újabb szükséges.", "Help" : "Súgó", "Personal" : "Személyes", "Settings" : "Beállítások", @@ -103,12 +104,7 @@ OC.L10N.register( "Please install one of these locales on your system and restart your webserver." : "Kérjük állítsa be a következő lokalizációk valamelyikét a rendszeren és indítsa újra a webszervert!", "Please ask your server administrator to install the module." : "Kérje meg a rendszergazdát, hogy telepítse a modult!", "PHP module %s not installed." : "A %s PHP modul nincs telepítve.", - "PHP %s or higher is required." : "PHP %s vagy ennél újabb szükséges.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Kérje meg a rendszergazdát, hogy frissítse a PHP-t újabb változatra! Ezt a PHP változatot már nem támogatja az ownCloud és a PHP fejlesztői közösség.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "Be van állítva a PHP Safe Mode. Az ownCloud megfelelő működéséhez szükséges, hogy ez ki legyen kapcsolva.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "A PHP Safe Mode egy régi, már nem támogatott és haszontalan üzemmód, amit érdemes letiltani. Kérje meg a rendszergazdát, hogy tiltsa le vagy a php.ini-ben, vagy a webszerver beállításokban!", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Be van álltva a Magic Quotes. Az ownCloud megfelelő működéséhez szükséges, hogy ez le legyen tiltva.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "A Magic Quotes egy régi, már nem támogatott és haszontalan üzemmód, amit érdemes letiltani. Kérje meg a rendszergazdát, hogy tiltsa le vagy a php.ini-ben, vagy a webszerver beállításokban!", "PHP modules have been installed, but they are still listed as missing?" : "A PHP modulok telepítve vannak, de a listában mégsincsenek felsorolva?", "Please ask your server administrator to restart the web server." : "Kérje meg a rendszergazdát, hogy indítsa újra a webszervert!", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 szükséges", diff --git a/lib/l10n/hu_HU.json b/lib/l10n/hu_HU.json index 434b2bbde9b..a0d58b87d81 100644 --- a/lib/l10n/hu_HU.json +++ b/lib/l10n/hu_HU.json @@ -5,6 +5,7 @@ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Ez rendszerint úgy oldható meg, hogy %sírási jogot adunk a webszervernek a config könyvtárra%s.", "Sample configuration detected" : "A példabeállítások vannak beállítva", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Úgy tűnik a példakonfigurációt próbálja ténylegesen használni. Ez nem támogatott, és működésképtelenné teheti a telepítést. Kérjük olvassa el a dokumentációt és azt követően változtasson a config.php-n!", + "PHP %s or higher is required." : "PHP %s vagy ennél újabb szükséges.", "Help" : "Súgó", "Personal" : "Személyes", "Settings" : "Beállítások", @@ -101,12 +102,7 @@ "Please install one of these locales on your system and restart your webserver." : "Kérjük állítsa be a következő lokalizációk valamelyikét a rendszeren és indítsa újra a webszervert!", "Please ask your server administrator to install the module." : "Kérje meg a rendszergazdát, hogy telepítse a modult!", "PHP module %s not installed." : "A %s PHP modul nincs telepítve.", - "PHP %s or higher is required." : "PHP %s vagy ennél újabb szükséges.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Kérje meg a rendszergazdát, hogy frissítse a PHP-t újabb változatra! Ezt a PHP változatot már nem támogatja az ownCloud és a PHP fejlesztői közösség.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "Be van állítva a PHP Safe Mode. Az ownCloud megfelelő működéséhez szükséges, hogy ez ki legyen kapcsolva.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "A PHP Safe Mode egy régi, már nem támogatott és haszontalan üzemmód, amit érdemes letiltani. Kérje meg a rendszergazdát, hogy tiltsa le vagy a php.ini-ben, vagy a webszerver beállításokban!", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Be van álltva a Magic Quotes. Az ownCloud megfelelő működéséhez szükséges, hogy ez le legyen tiltva.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "A Magic Quotes egy régi, már nem támogatott és haszontalan üzemmód, amit érdemes letiltani. Kérje meg a rendszergazdát, hogy tiltsa le vagy a php.ini-ben, vagy a webszerver beállításokban!", "PHP modules have been installed, but they are still listed as missing?" : "A PHP modulok telepítve vannak, de a listában mégsincsenek felsorolva?", "Please ask your server administrator to restart the web server." : "Kérje meg a rendszergazdát, hogy indítsa újra a webszervert!", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 szükséges", diff --git a/lib/l10n/id.js b/lib/l10n/id.js index 368cb6b7921..a8f327a3181 100644 --- a/lib/l10n/id.js +++ b/lib/l10n/id.js @@ -7,6 +7,7 @@ OC.L10N.register( "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Hal ini biasanya dapat diperbaiki dengan %s memberikan akses tulis bagi situs web ke %s direktori config.", "Sample configuration detected" : "Konfigurasi sampel ditemukan", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Ditemukan bahwa konfigurasi sampel telah disalin. Hal ini dapat merusak instalasi Anda dan tidak didukung. Silahkan baca dokumentasi sebelum melakukan perubahan pada config.php", + "PHP %s or higher is required." : "Diperlukan PHP %s atau yang lebih tinggi.", "Help" : "Bantuan", "Personal" : "Pribadi", "Settings" : "Pengaturan", @@ -99,9 +100,7 @@ OC.L10N.register( "Please install one of these locales on your system and restart your webserver." : "Mohon instal paling tidak satu lokal pada sistem Anda dan jalankan ulang server web.", "Please ask your server administrator to install the module." : "Mohon tanyakan administrator Anda untuk menginstal module.", "PHP module %s not installed." : "Module PHP %s tidak terinstal.", - "PHP %s or higher is required." : "Diperlukan PHP %s atau yang lebih tinggi.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Mohon tanyakan administrator Anda untuk memperbarui PHP ke versi terkini. Versi PHP Anda tidak lagi didukung oleh ownCloud dan komunitas PHP.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP Safe Mode diaktifkan. ownCloud memerlukan ini untuk dinonaktifkan untuk dapat bekerja dengan banar.", "PHP modules have been installed, but they are still listed as missing?" : "Modul PHP telah terinstal, tetapi mereka terlihat tidak ada?", "Please ask your server administrator to restart the web server." : "Mohon minta administrator Anda untuk menjalankan ulang server web.", "PostgreSQL >= 9 required" : "Diperlukan PostgreSQL >= 9", diff --git a/lib/l10n/id.json b/lib/l10n/id.json index e2b1712e1c5..4bc491e7101 100644 --- a/lib/l10n/id.json +++ b/lib/l10n/id.json @@ -5,6 +5,7 @@ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Hal ini biasanya dapat diperbaiki dengan %s memberikan akses tulis bagi situs web ke %s direktori config.", "Sample configuration detected" : "Konfigurasi sampel ditemukan", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Ditemukan bahwa konfigurasi sampel telah disalin. Hal ini dapat merusak instalasi Anda dan tidak didukung. Silahkan baca dokumentasi sebelum melakukan perubahan pada config.php", + "PHP %s or higher is required." : "Diperlukan PHP %s atau yang lebih tinggi.", "Help" : "Bantuan", "Personal" : "Pribadi", "Settings" : "Pengaturan", @@ -97,9 +98,7 @@ "Please install one of these locales on your system and restart your webserver." : "Mohon instal paling tidak satu lokal pada sistem Anda dan jalankan ulang server web.", "Please ask your server administrator to install the module." : "Mohon tanyakan administrator Anda untuk menginstal module.", "PHP module %s not installed." : "Module PHP %s tidak terinstal.", - "PHP %s or higher is required." : "Diperlukan PHP %s atau yang lebih tinggi.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Mohon tanyakan administrator Anda untuk memperbarui PHP ke versi terkini. Versi PHP Anda tidak lagi didukung oleh ownCloud dan komunitas PHP.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP Safe Mode diaktifkan. ownCloud memerlukan ini untuk dinonaktifkan untuk dapat bekerja dengan banar.", "PHP modules have been installed, but they are still listed as missing?" : "Modul PHP telah terinstal, tetapi mereka terlihat tidak ada?", "Please ask your server administrator to restart the web server." : "Mohon minta administrator Anda untuk menjalankan ulang server web.", "PostgreSQL >= 9 required" : "Diperlukan PostgreSQL >= 9", diff --git a/lib/l10n/it.js b/lib/l10n/it.js index eb25f2fc086..1fecfef15fe 100644 --- a/lib/l10n/it.js +++ b/lib/l10n/it.js @@ -7,6 +7,9 @@ OC.L10N.register( "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Ciò può essere normalmente corretto %sfornendo al server web accesso in scrittura alla cartella \"config\"%s", "Sample configuration detected" : "Configurazione di esempio rilevata", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "È stato rilevato che la configurazione di esempio è stata copiata. Ciò può compromettere la tua installazione e non è supportato. Leggi la documentazione prima di modificare il file config.php", + "PHP %s or higher is required." : "Richiesto PHP %s o superiore", + "PHP with a version less then %s is required." : "È richiesta una versione di PHP inferiore a %s.", + "Following databases are supported: %s" : "I seguenti database sono supportati: %s", "Help" : "Aiuto", "Personal" : "Personale", "Settings" : "Impostazioni", @@ -105,12 +108,7 @@ OC.L10N.register( "Please install one of these locales on your system and restart your webserver." : "Installa una delle seguenti localizzazioni sul tuo sistema e riavvia il server web.", "Please ask your server administrator to install the module." : "Chiedi all'amministratore del tuo server di installare il modulo.", "PHP module %s not installed." : "Il modulo PHP %s non è installato.", - "PHP %s or higher is required." : "Richiesto PHP %s o superiore", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Chiedi al tuo amministratore di aggiornare PHP all'ultima versione. La tua versione di PHP non è più supportata da ownCloud e dalla comunità di PHP.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP Safe Mode è abilitato. ownCloud richiede che sia disabilitato per funzionare correttamente.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP Safe Mode è un'impostazione sconsigliata e solitamente inutile che dovrebbe essere disabilitata. Chiedi al tuo amministratore di disabilitarlo nel file php.ini o nella configurazione del server web.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes è abilitato. ownCloud richiede che sia disabilitato per funzionare correttamente.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes è un'impostazione sconsigliata e solitamente inutile che dovrebbe essere disabilitata. Chiedi al tuo amministratore di disabilitarlo nel file php.ini o nella configurazione del server web.", "PHP modules have been installed, but they are still listed as missing?" : "Sono stati installati moduli PHP, ma sono elencati ancora come mancanti?", "Please ask your server administrator to restart the web server." : "Chiedi all'amministratore di riavviare il server web.", "PostgreSQL >= 9 required" : "Richiesto PostgreSQL >= 9", diff --git a/lib/l10n/it.json b/lib/l10n/it.json index ef4ae9ab370..aef8740c7f9 100644 --- a/lib/l10n/it.json +++ b/lib/l10n/it.json @@ -5,6 +5,9 @@ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Ciò può essere normalmente corretto %sfornendo al server web accesso in scrittura alla cartella \"config\"%s", "Sample configuration detected" : "Configurazione di esempio rilevata", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "È stato rilevato che la configurazione di esempio è stata copiata. Ciò può compromettere la tua installazione e non è supportato. Leggi la documentazione prima di modificare il file config.php", + "PHP %s or higher is required." : "Richiesto PHP %s o superiore", + "PHP with a version less then %s is required." : "È richiesta una versione di PHP inferiore a %s.", + "Following databases are supported: %s" : "I seguenti database sono supportati: %s", "Help" : "Aiuto", "Personal" : "Personale", "Settings" : "Impostazioni", @@ -103,12 +106,7 @@ "Please install one of these locales on your system and restart your webserver." : "Installa una delle seguenti localizzazioni sul tuo sistema e riavvia il server web.", "Please ask your server administrator to install the module." : "Chiedi all'amministratore del tuo server di installare il modulo.", "PHP module %s not installed." : "Il modulo PHP %s non è installato.", - "PHP %s or higher is required." : "Richiesto PHP %s o superiore", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Chiedi al tuo amministratore di aggiornare PHP all'ultima versione. La tua versione di PHP non è più supportata da ownCloud e dalla comunità di PHP.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP Safe Mode è abilitato. ownCloud richiede che sia disabilitato per funzionare correttamente.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP Safe Mode è un'impostazione sconsigliata e solitamente inutile che dovrebbe essere disabilitata. Chiedi al tuo amministratore di disabilitarlo nel file php.ini o nella configurazione del server web.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes è abilitato. ownCloud richiede che sia disabilitato per funzionare correttamente.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes è un'impostazione sconsigliata e solitamente inutile che dovrebbe essere disabilitata. Chiedi al tuo amministratore di disabilitarlo nel file php.ini o nella configurazione del server web.", "PHP modules have been installed, but they are still listed as missing?" : "Sono stati installati moduli PHP, ma sono elencati ancora come mancanti?", "Please ask your server administrator to restart the web server." : "Chiedi all'amministratore di riavviare il server web.", "PostgreSQL >= 9 required" : "Richiesto PostgreSQL >= 9", diff --git a/lib/l10n/ja.js b/lib/l10n/ja.js index e6b0b3240f1..ff29fa5f174 100644 --- a/lib/l10n/ja.js +++ b/lib/l10n/ja.js @@ -7,6 +7,9 @@ OC.L10N.register( "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "多くの場合、これは %s Webサーバーにconfigディレクトリ %s への書き込み権限を与えることで解決できます。", "Sample configuration detected" : "サンプル設定が見つかりました。", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "サンプル設定がコピーされてそのままです。このままではインストールが失敗し、サポート対象外になります。config.phpを変更する前にドキュメントを確認してください。", + "PHP %s or higher is required." : "PHP %s 以上が必要です。", + "PHP with a version less then %s is required." : "%s 以前のバージョンのPHPが必要です。", + "Following databases are supported: %s" : "次のデータベースをサポートしています: %s", "Help" : "ヘルプ", "Personal" : "個人", "Settings" : "設定", @@ -105,12 +108,7 @@ OC.L10N.register( "Please install one of these locales on your system and restart your webserver." : "これらのロケールのうちいずれかをシステムにインストールし、Webサーバーを再起動してください。", "Please ask your server administrator to install the module." : "サーバー管理者にモジュールのインストールを依頼してください。", "PHP module %s not installed." : "PHP のモジュール %s がインストールされていません。", - "PHP %s or higher is required." : "PHP %s 以上が必要です。", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "PHPを最新バージョンに更新するようサーバー管理者に依頼してください。現在のPHPのバージョンは、ownCloudおよびPHPコミュニティでサポートされていません。", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHPセーフモードは有効です。ownCloudを適切に動作させるには無効化する必要があります。", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHPセーフモードは推奨されておらず、ほとんど役に立たない設定のため、無効化すべきです。サーバー管理者に、php.iniもしくはWebサーバー設定で無効化するよう依頼してください。", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "マジッククォートは有効です。ownCloudを適切に動作させるには無効にする必要があります。", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "マジッククォートは推奨されておらず、ほとんど役に立たない設定のため、無効化すべきです。サーバー管理者に、php.iniもしくはWebサーバー設定で無効化するよう依頼してください。", "PHP modules have been installed, but they are still listed as missing?" : "PHP モジュールはインストールされていますが、まだ一覧に表示されていますか?", "Please ask your server administrator to restart the web server." : "サーバー管理者にWebサーバーを再起動するよう依頼してください。", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 が必要です", diff --git a/lib/l10n/ja.json b/lib/l10n/ja.json index 722f5235c6f..d7d4f0ae7ff 100644 --- a/lib/l10n/ja.json +++ b/lib/l10n/ja.json @@ -5,6 +5,9 @@ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "多くの場合、これは %s Webサーバーにconfigディレクトリ %s への書き込み権限を与えることで解決できます。", "Sample configuration detected" : "サンプル設定が見つかりました。", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "サンプル設定がコピーされてそのままです。このままではインストールが失敗し、サポート対象外になります。config.phpを変更する前にドキュメントを確認してください。", + "PHP %s or higher is required." : "PHP %s 以上が必要です。", + "PHP with a version less then %s is required." : "%s 以前のバージョンのPHPが必要です。", + "Following databases are supported: %s" : "次のデータベースをサポートしています: %s", "Help" : "ヘルプ", "Personal" : "個人", "Settings" : "設定", @@ -103,12 +106,7 @@ "Please install one of these locales on your system and restart your webserver." : "これらのロケールのうちいずれかをシステムにインストールし、Webサーバーを再起動してください。", "Please ask your server administrator to install the module." : "サーバー管理者にモジュールのインストールを依頼してください。", "PHP module %s not installed." : "PHP のモジュール %s がインストールされていません。", - "PHP %s or higher is required." : "PHP %s 以上が必要です。", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "PHPを最新バージョンに更新するようサーバー管理者に依頼してください。現在のPHPのバージョンは、ownCloudおよびPHPコミュニティでサポートされていません。", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHPセーフモードは有効です。ownCloudを適切に動作させるには無効化する必要があります。", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHPセーフモードは推奨されておらず、ほとんど役に立たない設定のため、無効化すべきです。サーバー管理者に、php.iniもしくはWebサーバー設定で無効化するよう依頼してください。", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "マジッククォートは有効です。ownCloudを適切に動作させるには無効にする必要があります。", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "マジッククォートは推奨されておらず、ほとんど役に立たない設定のため、無効化すべきです。サーバー管理者に、php.iniもしくはWebサーバー設定で無効化するよう依頼してください。", "PHP modules have been installed, but they are still listed as missing?" : "PHP モジュールはインストールされていますが、まだ一覧に表示されていますか?", "Please ask your server administrator to restart the web server." : "サーバー管理者にWebサーバーを再起動するよう依頼してください。", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 が必要です", diff --git a/lib/l10n/ko.js b/lib/l10n/ko.js index 22f8cb191ae..97acbb9c006 100644 --- a/lib/l10n/ko.js +++ b/lib/l10n/ko.js @@ -1,6 +1,7 @@ OC.L10N.register( "lib", { + "PHP %s or higher is required." : "%s 버전의 PHP 혹은 높은 버전을 필요로 합니다.", "Help" : "도움말", "Personal" : "개인", "Settings" : "설정", @@ -61,7 +62,6 @@ OC.L10N.register( "A valid password must be provided" : "올바른 암호를 입력해야 함", "The username is already being used" : "이 사용자명은 현재 사용중입니다", "PHP module %s not installed." : "%s PHP 모듈이 설치되지 않았습니다.", - "PHP %s or higher is required." : "%s 버전의 PHP 혹은 높은 버전을 필요로 합니다.", "PostgreSQL >= 9 required" : "PostgreSQL 9 혹은 이상 버전을 필요로합니다", "Please upgrade your database version" : "데이터베이스 버전을 업그레이드 하십시오", "Error occurred while checking PostgreSQL version" : "PostgreSQL 버전을 확인하던중 오류가 발생하였습니다" diff --git a/lib/l10n/ko.json b/lib/l10n/ko.json index 4743476540c..b3d3abcffb9 100644 --- a/lib/l10n/ko.json +++ b/lib/l10n/ko.json @@ -1,4 +1,5 @@ { "translations": { + "PHP %s or higher is required." : "%s 버전의 PHP 혹은 높은 버전을 필요로 합니다.", "Help" : "도움말", "Personal" : "개인", "Settings" : "설정", @@ -59,7 +60,6 @@ "A valid password must be provided" : "올바른 암호를 입력해야 함", "The username is already being used" : "이 사용자명은 현재 사용중입니다", "PHP module %s not installed." : "%s PHP 모듈이 설치되지 않았습니다.", - "PHP %s or higher is required." : "%s 버전의 PHP 혹은 높은 버전을 필요로 합니다.", "PostgreSQL >= 9 required" : "PostgreSQL 9 혹은 이상 버전을 필요로합니다", "Please upgrade your database version" : "데이터베이스 버전을 업그레이드 하십시오", "Error occurred while checking PostgreSQL version" : "PostgreSQL 버전을 확인하던중 오류가 발생하였습니다" diff --git a/lib/l10n/nb_NO.js b/lib/l10n/nb_NO.js index c50537ce67d..821dfba8c79 100644 --- a/lib/l10n/nb_NO.js +++ b/lib/l10n/nb_NO.js @@ -7,6 +7,7 @@ OC.L10N.register( "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Dette kan vanligvis ordnes ved %så gi web-serveren skrivetilgang til config-mappen%s.", "Sample configuration detected" : "Eksempelkonfigurasjon oppdaget", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Det ble oppdaget at eksempelkonfigurasjonen er blitt kopiert. Dette kan ødelegge installasjonen din og støttes ikke. Les dokumentasjonen før du gjør endringer i config.php", + "PHP %s or higher is required." : "PHP %s eller nyere kreves.", "Help" : "Hjelp", "Personal" : "Personlig", "Settings" : "Innstillinger", @@ -102,12 +103,7 @@ OC.L10N.register( "Please install one of these locales on your system and restart your webserver." : "Vennligst installer en av disse nasjonale innstillingene på systemet ditt og start webserveren på nytt.", "Please ask your server administrator to install the module." : "Be server-administratoren om å installere modulen.", "PHP module %s not installed." : "PHP-modul %s er ikke installert.", - "PHP %s or higher is required." : "PHP %s eller nyere kreves.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Be server-administratoren om å oppdatere PHP til nyeste versjon. PHP-versjonen du bruker støttes ikke lenger av ownCloud og PHP-fellesskapet.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP Safe Mode er aktivert. ownCloud krever at det deaktiveres for å fungere korrekt.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP Safe Mode er en avskrevet og stort sett unyttig innstilling som bør deaktiveres. Be server-administratoren om å deaktivere det i php.ini eller i konfigurasjonen for web-serveren.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes er aktivert. ownCloud krever at det deaktiveres for å fungere korrekt.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes er en avskrevet og stort sett unyttig innstilling som bør deaktiveres. Be server-administratoren om å deaktivere det i php.ini eller i konfigurasjonen for web-serveren.", "PHP modules have been installed, but they are still listed as missing?" : "PHP-moduler har blitt installert, men de listes fortsatt som fraværende?", "Please ask your server administrator to restart the web server." : "Be server-administratoren om å starte web-serveren på nytt.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 kreves", diff --git a/lib/l10n/nb_NO.json b/lib/l10n/nb_NO.json index 4fe3148dc19..1a14f078ef0 100644 --- a/lib/l10n/nb_NO.json +++ b/lib/l10n/nb_NO.json @@ -5,6 +5,7 @@ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Dette kan vanligvis ordnes ved %så gi web-serveren skrivetilgang til config-mappen%s.", "Sample configuration detected" : "Eksempelkonfigurasjon oppdaget", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Det ble oppdaget at eksempelkonfigurasjonen er blitt kopiert. Dette kan ødelegge installasjonen din og støttes ikke. Les dokumentasjonen før du gjør endringer i config.php", + "PHP %s or higher is required." : "PHP %s eller nyere kreves.", "Help" : "Hjelp", "Personal" : "Personlig", "Settings" : "Innstillinger", @@ -100,12 +101,7 @@ "Please install one of these locales on your system and restart your webserver." : "Vennligst installer en av disse nasjonale innstillingene på systemet ditt og start webserveren på nytt.", "Please ask your server administrator to install the module." : "Be server-administratoren om å installere modulen.", "PHP module %s not installed." : "PHP-modul %s er ikke installert.", - "PHP %s or higher is required." : "PHP %s eller nyere kreves.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Be server-administratoren om å oppdatere PHP til nyeste versjon. PHP-versjonen du bruker støttes ikke lenger av ownCloud og PHP-fellesskapet.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP Safe Mode er aktivert. ownCloud krever at det deaktiveres for å fungere korrekt.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP Safe Mode er en avskrevet og stort sett unyttig innstilling som bør deaktiveres. Be server-administratoren om å deaktivere det i php.ini eller i konfigurasjonen for web-serveren.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes er aktivert. ownCloud krever at det deaktiveres for å fungere korrekt.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes er en avskrevet og stort sett unyttig innstilling som bør deaktiveres. Be server-administratoren om å deaktivere det i php.ini eller i konfigurasjonen for web-serveren.", "PHP modules have been installed, but they are still listed as missing?" : "PHP-moduler har blitt installert, men de listes fortsatt som fraværende?", "Please ask your server administrator to restart the web server." : "Be server-administratoren om å starte web-serveren på nytt.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 kreves", diff --git a/lib/l10n/nl.js b/lib/l10n/nl.js index 4fdff3c67ef..0f6aae6f39d 100644 --- a/lib/l10n/nl.js +++ b/lib/l10n/nl.js @@ -7,6 +7,9 @@ OC.L10N.register( "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Dit kan hersteld worden door de webserver %sschrijfrechten te geven op de de config directory%s", "Sample configuration detected" : "Voorbeeldconfiguratie gevonden", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Blijkbaar is de voorbeeldconfiguratie gekopieerd. Dit kan uw installatie beschadigen en wordt niet dan ook ondersteund. Lees de documentatie voordat u wijzigingen aan config.php doorvoert", + "PHP %s or higher is required." : "PHP %s of hoger vereist.", + "PHP with a version less then %s is required." : "PHP met een versie lager dan %s is vereist.", + "Following databases are supported: %s" : "De volgende databases worden ondersteund: %s", "Help" : "Help", "Personal" : "Persoonlijk", "Settings" : "Instellingen", @@ -105,12 +108,7 @@ OC.L10N.register( "Please install one of these locales on your system and restart your webserver." : "Installeer één van de talen op uw systeem en herstart uw webserver.", "Please ask your server administrator to install the module." : "Vraag uw beheerder om de module te installeren.", "PHP module %s not installed." : "PHP module %s niet geïnstalleerd.", - "PHP %s or higher is required." : "PHP %s of hoger vereist.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Vraag uw beheerder om PHP bij te werken tot de laatste versie. Uw PHP versie wordt niet langer ondersteund door ownCloud en de PHP community.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP Safe Mode is ingeschakeld. Voor een goede werking van ownCloud moet die modus zijn uitgeschakeld.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP Safe Mode is niet langer zinvol en zou eigenlijk gedeactiveerd moeten worden. Vraag uw beheerder om Safe Mode in php.ini of in de webserver configuratie te deactiveren.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes is geactiveerd. Voor een goede werking van ownCloud moet dit zijn uitgeschakeld.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes is niet langer zinvol en zou eigenlijk gedeactiveerd moeten worden. Vraag uw beheerder om Safe Mode in php.ini of in de webserver configuratie te deactiveren.", "PHP modules have been installed, but they are still listed as missing?" : "PHP modules zijn geïnstalleerd, maar worden ze nog steeds als ontbrekend aangegeven?", "Please ask your server administrator to restart the web server." : "Vraag uw beheerder de webserver opnieuw op te starten.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 vereist", diff --git a/lib/l10n/nl.json b/lib/l10n/nl.json index be980d330d6..9df7fdfaba7 100644 --- a/lib/l10n/nl.json +++ b/lib/l10n/nl.json @@ -5,6 +5,9 @@ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Dit kan hersteld worden door de webserver %sschrijfrechten te geven op de de config directory%s", "Sample configuration detected" : "Voorbeeldconfiguratie gevonden", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Blijkbaar is de voorbeeldconfiguratie gekopieerd. Dit kan uw installatie beschadigen en wordt niet dan ook ondersteund. Lees de documentatie voordat u wijzigingen aan config.php doorvoert", + "PHP %s or higher is required." : "PHP %s of hoger vereist.", + "PHP with a version less then %s is required." : "PHP met een versie lager dan %s is vereist.", + "Following databases are supported: %s" : "De volgende databases worden ondersteund: %s", "Help" : "Help", "Personal" : "Persoonlijk", "Settings" : "Instellingen", @@ -103,12 +106,7 @@ "Please install one of these locales on your system and restart your webserver." : "Installeer één van de talen op uw systeem en herstart uw webserver.", "Please ask your server administrator to install the module." : "Vraag uw beheerder om de module te installeren.", "PHP module %s not installed." : "PHP module %s niet geïnstalleerd.", - "PHP %s or higher is required." : "PHP %s of hoger vereist.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Vraag uw beheerder om PHP bij te werken tot de laatste versie. Uw PHP versie wordt niet langer ondersteund door ownCloud en de PHP community.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP Safe Mode is ingeschakeld. Voor een goede werking van ownCloud moet die modus zijn uitgeschakeld.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP Safe Mode is niet langer zinvol en zou eigenlijk gedeactiveerd moeten worden. Vraag uw beheerder om Safe Mode in php.ini of in de webserver configuratie te deactiveren.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes is geactiveerd. Voor een goede werking van ownCloud moet dit zijn uitgeschakeld.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes is niet langer zinvol en zou eigenlijk gedeactiveerd moeten worden. Vraag uw beheerder om Safe Mode in php.ini of in de webserver configuratie te deactiveren.", "PHP modules have been installed, but they are still listed as missing?" : "PHP modules zijn geïnstalleerd, maar worden ze nog steeds als ontbrekend aangegeven?", "Please ask your server administrator to restart the web server." : "Vraag uw beheerder de webserver opnieuw op te starten.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 vereist", diff --git a/lib/l10n/pl.js b/lib/l10n/pl.js index a766151eab2..931c2f683dd 100644 --- a/lib/l10n/pl.js +++ b/lib/l10n/pl.js @@ -7,6 +7,7 @@ OC.L10N.register( "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Można to zwykle rozwiązać przez %sdodanie serwerowi www uprawnień zapisu do katalogu config%s.", "Sample configuration detected" : "Wykryto przykładową konfigurację", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Wykryto skopiowanie przykładowej konfiguracji. To może popsuć Twoją instalację i nie jest wspierane. Proszę przeczytać dokumentację przed dokonywaniem zmian w config.php", + "PHP %s or higher is required." : "PHP %s lub wyższe jest wymagane.", "Help" : "Pomoc", "Personal" : "Osobiste", "Settings" : "Ustawienia", @@ -103,12 +104,7 @@ OC.L10N.register( "Please install one of these locales on your system and restart your webserver." : "Proszę zainstalować jedno z poniższych locale w Twoim systemie i uruchomić ponownie serwer www.", "Please ask your server administrator to install the module." : "Proszę poproś administratora serwera aby zainstalował ten moduł.", "PHP module %s not installed." : "Moduł PHP %s nie jest zainstalowany.", - "PHP %s or higher is required." : "PHP %s lub wyższe jest wymagane.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Proszę poproś administratora serwera aby zaktualizował PHP do najnowszej wersji. Twoja wersja PHP nie jest już dłużej wspierana przez ownCloud i społeczność PHP.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "Bezpieczny tryb PHP jest aktywny. ownCloud do poprawnej pracy wymaga aby był on wyłączony.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Bezpieczny tryb PHP jest przestarzały i w większości bezużyteczny i powinien być wyłączony. Proszę poproś administratora serwera aby wyłączył go w php.ini lub w pliku konfiguracyjnym serwera www.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes są włączone. Do poprawnego działania ownCloud wymagane jest ich wyłączenie.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes to przestarzałe i zasadniczo bezużyteczne ustawienie, które powinno być wyłączone. Poproś administratora serwera, by wyłączył je w php.ini albo w konfiguracji serwera www.", "PHP modules have been installed, but they are still listed as missing?" : "Moduły PHP zostały zainstalowane, ale nadal brakuje ich na liście?", "Please ask your server administrator to restart the web server." : "Poproś administratora serwera o restart serwera www.", "PostgreSQL >= 9 required" : "Wymagany PostgreSQL >= 9", diff --git a/lib/l10n/pl.json b/lib/l10n/pl.json index c546a115f5e..4570867fae9 100644 --- a/lib/l10n/pl.json +++ b/lib/l10n/pl.json @@ -5,6 +5,7 @@ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Można to zwykle rozwiązać przez %sdodanie serwerowi www uprawnień zapisu do katalogu config%s.", "Sample configuration detected" : "Wykryto przykładową konfigurację", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Wykryto skopiowanie przykładowej konfiguracji. To może popsuć Twoją instalację i nie jest wspierane. Proszę przeczytać dokumentację przed dokonywaniem zmian w config.php", + "PHP %s or higher is required." : "PHP %s lub wyższe jest wymagane.", "Help" : "Pomoc", "Personal" : "Osobiste", "Settings" : "Ustawienia", @@ -101,12 +102,7 @@ "Please install one of these locales on your system and restart your webserver." : "Proszę zainstalować jedno z poniższych locale w Twoim systemie i uruchomić ponownie serwer www.", "Please ask your server administrator to install the module." : "Proszę poproś administratora serwera aby zainstalował ten moduł.", "PHP module %s not installed." : "Moduł PHP %s nie jest zainstalowany.", - "PHP %s or higher is required." : "PHP %s lub wyższe jest wymagane.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Proszę poproś administratora serwera aby zaktualizował PHP do najnowszej wersji. Twoja wersja PHP nie jest już dłużej wspierana przez ownCloud i społeczność PHP.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "Bezpieczny tryb PHP jest aktywny. ownCloud do poprawnej pracy wymaga aby był on wyłączony.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Bezpieczny tryb PHP jest przestarzały i w większości bezużyteczny i powinien być wyłączony. Proszę poproś administratora serwera aby wyłączył go w php.ini lub w pliku konfiguracyjnym serwera www.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes są włączone. Do poprawnego działania ownCloud wymagane jest ich wyłączenie.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes to przestarzałe i zasadniczo bezużyteczne ustawienie, które powinno być wyłączone. Poproś administratora serwera, by wyłączył je w php.ini albo w konfiguracji serwera www.", "PHP modules have been installed, but they are still listed as missing?" : "Moduły PHP zostały zainstalowane, ale nadal brakuje ich na liście?", "Please ask your server administrator to restart the web server." : "Poproś administratora serwera o restart serwera www.", "PostgreSQL >= 9 required" : "Wymagany PostgreSQL >= 9", diff --git a/lib/l10n/pt_BR.js b/lib/l10n/pt_BR.js index 370bff17480..e0e6fe6c4bd 100644 --- a/lib/l10n/pt_BR.js +++ b/lib/l10n/pt_BR.js @@ -7,6 +7,9 @@ OC.L10N.register( "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Isso geralmente pode ser corrigido dando permissão de gravação %sgiving ao webserver para o directory%s de configuração.", "Sample configuration detected" : "Exemplo de configuração detectada", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Foi detectado que a configuração exemplo foi copiada. Isso pode desestabilizar sua instalação e não é suportado. Por favor, leia a documentação antes de realizar mudanças no config.php", + "PHP %s or higher is required." : "É requerido PHP %s ou superior.", + "PHP with a version less then %s is required." : "É requerida uma versão PHP mais antiga que a %s .", + "Following databases are supported: %s" : "Following databases are supported: %s", "Help" : "Ajuda", "Personal" : "Pessoal", "Settings" : "Configurações", @@ -105,12 +108,7 @@ OC.L10N.register( "Please install one of these locales on your system and restart your webserver." : "Por favor, defina uma dessas localizações em seu sistema e reinicie o seu servidor web.", "Please ask your server administrator to install the module." : "Por favor, peça ao seu administrador do servidor para instalar o módulo.", "PHP module %s not installed." : "Módulo PHP %s não instalado.", - "PHP %s or higher is required." : "É requerido PHP %s ou superior.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Por favor, peça ao seu administrador do servidor para atualizar o PHP para a versão mais recente. A sua versão do PHP não é mais suportado pelo ownCloud e a comunidade PHP.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP Safe Mode está habilitado. ownCloud exige que ele esteja desativado para funcionar corretamente.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP Safe Mode é um cenário obsoleto e praticamente inútil que deve ser desativado. Por favor, peça ao seu administrador do servidor para desativá-lo no php.ini ou na sua configuração webserver.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes está habilitado. ownCloud exige que ele esteja desativado para funcionar corretamente.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes é um cenário obsoleto e praticamente inútil que deve ser desativado. Por favor, peça ao seu administrador do servidor para desativá-lo no php.ini ou na sua configuração webserver.", "PHP modules have been installed, but they are still listed as missing?" : "Módulos do PHP foram instalados, mas eles ainda estão listados como desaparecidos?", "Please ask your server administrator to restart the web server." : "Por favor, peça ao seu administrador do servidor para reiniciar o servidor web.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 requirido", diff --git a/lib/l10n/pt_BR.json b/lib/l10n/pt_BR.json index 465d0d2bf29..c7d01ed1386 100644 --- a/lib/l10n/pt_BR.json +++ b/lib/l10n/pt_BR.json @@ -5,6 +5,9 @@ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Isso geralmente pode ser corrigido dando permissão de gravação %sgiving ao webserver para o directory%s de configuração.", "Sample configuration detected" : "Exemplo de configuração detectada", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Foi detectado que a configuração exemplo foi copiada. Isso pode desestabilizar sua instalação e não é suportado. Por favor, leia a documentação antes de realizar mudanças no config.php", + "PHP %s or higher is required." : "É requerido PHP %s ou superior.", + "PHP with a version less then %s is required." : "É requerida uma versão PHP mais antiga que a %s .", + "Following databases are supported: %s" : "Following databases are supported: %s", "Help" : "Ajuda", "Personal" : "Pessoal", "Settings" : "Configurações", @@ -103,12 +106,7 @@ "Please install one of these locales on your system and restart your webserver." : "Por favor, defina uma dessas localizações em seu sistema e reinicie o seu servidor web.", "Please ask your server administrator to install the module." : "Por favor, peça ao seu administrador do servidor para instalar o módulo.", "PHP module %s not installed." : "Módulo PHP %s não instalado.", - "PHP %s or higher is required." : "É requerido PHP %s ou superior.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Por favor, peça ao seu administrador do servidor para atualizar o PHP para a versão mais recente. A sua versão do PHP não é mais suportado pelo ownCloud e a comunidade PHP.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP Safe Mode está habilitado. ownCloud exige que ele esteja desativado para funcionar corretamente.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP Safe Mode é um cenário obsoleto e praticamente inútil que deve ser desativado. Por favor, peça ao seu administrador do servidor para desativá-lo no php.ini ou na sua configuração webserver.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes está habilitado. ownCloud exige que ele esteja desativado para funcionar corretamente.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes é um cenário obsoleto e praticamente inútil que deve ser desativado. Por favor, peça ao seu administrador do servidor para desativá-lo no php.ini ou na sua configuração webserver.", "PHP modules have been installed, but they are still listed as missing?" : "Módulos do PHP foram instalados, mas eles ainda estão listados como desaparecidos?", "Please ask your server administrator to restart the web server." : "Por favor, peça ao seu administrador do servidor para reiniciar o servidor web.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 requirido", diff --git a/lib/l10n/pt_PT.js b/lib/l10n/pt_PT.js index 0bbac09c9b1..980f0f6036a 100644 --- a/lib/l10n/pt_PT.js +++ b/lib/l10n/pt_PT.js @@ -7,6 +7,7 @@ OC.L10N.register( "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Isto pode ser resolvido normalmente %sdando ao servidor web direitos de escrita no directório de configuração%s.", "Sample configuration detected" : "Exemplo de configuração detectada", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Foi detectado que a configuração de amostra foi copiada. Isso pode danificar a sua instalação e não é suportado. Por favor, leia a documentação antes de realizar mudanças no config.php", + "PHP %s or higher is required." : "Necessário PHP %s ou maior.", "Help" : "Ajuda", "Personal" : "Pessoal", "Settings" : "Configurações", @@ -105,12 +106,7 @@ OC.L10N.register( "Please install one of these locales on your system and restart your webserver." : "Por favor instale um destes locais no seu sistema e reinicie o seu servidor web.", "Please ask your server administrator to install the module." : "Por favor pergunte ao seu administrador do servidor para instalar o modulo.", "PHP module %s not installed." : "O modulo %s PHP não está instalado.", - "PHP %s or higher is required." : "Necessário PHP %s ou maior.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Por favor pessa ao seu administrador de servidor para actualizar o PHP para a ultima versão. A sua versão de PHP não é mais suportada pelo owncloud e a comunidade PHP.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "O modo seguro de PHP está activo. O ownCloud requer que isto esteja desactivado para funcionar em condições.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "O modo seguro PHP está obsoleto e a maior parte das definições inúteis devem ser desactivadas. Por favor pessa ao seu administrador de servidor para desactivar isto em php.ini ou no seu config do servidor web.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Aspas mágicas estão activadas. O ownCloud requere que isto esteja desactivado para trabalhar em condições.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "As aspas mágicas é uma definição obsoleta e inútil que deve ser desactivada. Por favor pessa ao seu administrador do servidor para desactivar isto em php.ini ou no config do seu servidor web.", "PHP modules have been installed, but they are still listed as missing?" : "Os módulos PHP foram instalados, mas eles ainda estão listados como desaparecidos?", "Please ask your server administrator to restart the web server." : "Pro favor pergunte ao seu administrador do servidor para reiniciar o servidor da internet.", "PostgreSQL >= 9 required" : "Necessita PostgreSQL >= 9", diff --git a/lib/l10n/pt_PT.json b/lib/l10n/pt_PT.json index 067dc4b9751..3f15e50b95f 100644 --- a/lib/l10n/pt_PT.json +++ b/lib/l10n/pt_PT.json @@ -5,6 +5,7 @@ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Isto pode ser resolvido normalmente %sdando ao servidor web direitos de escrita no directório de configuração%s.", "Sample configuration detected" : "Exemplo de configuração detectada", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Foi detectado que a configuração de amostra foi copiada. Isso pode danificar a sua instalação e não é suportado. Por favor, leia a documentação antes de realizar mudanças no config.php", + "PHP %s or higher is required." : "Necessário PHP %s ou maior.", "Help" : "Ajuda", "Personal" : "Pessoal", "Settings" : "Configurações", @@ -103,12 +104,7 @@ "Please install one of these locales on your system and restart your webserver." : "Por favor instale um destes locais no seu sistema e reinicie o seu servidor web.", "Please ask your server administrator to install the module." : "Por favor pergunte ao seu administrador do servidor para instalar o modulo.", "PHP module %s not installed." : "O modulo %s PHP não está instalado.", - "PHP %s or higher is required." : "Necessário PHP %s ou maior.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Por favor pessa ao seu administrador de servidor para actualizar o PHP para a ultima versão. A sua versão de PHP não é mais suportada pelo owncloud e a comunidade PHP.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "O modo seguro de PHP está activo. O ownCloud requer que isto esteja desactivado para funcionar em condições.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "O modo seguro PHP está obsoleto e a maior parte das definições inúteis devem ser desactivadas. Por favor pessa ao seu administrador de servidor para desactivar isto em php.ini ou no seu config do servidor web.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Aspas mágicas estão activadas. O ownCloud requere que isto esteja desactivado para trabalhar em condições.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "As aspas mágicas é uma definição obsoleta e inútil que deve ser desactivada. Por favor pessa ao seu administrador do servidor para desactivar isto em php.ini ou no config do seu servidor web.", "PHP modules have been installed, but they are still listed as missing?" : "Os módulos PHP foram instalados, mas eles ainda estão listados como desaparecidos?", "Please ask your server administrator to restart the web server." : "Pro favor pergunte ao seu administrador do servidor para reiniciar o servidor da internet.", "PostgreSQL >= 9 required" : "Necessita PostgreSQL >= 9", diff --git a/lib/l10n/ro.js b/lib/l10n/ro.js index baedf6b6f51..e7596313c1f 100644 --- a/lib/l10n/ro.js +++ b/lib/l10n/ro.js @@ -3,6 +3,7 @@ OC.L10N.register( { "Cannot write into \"config\" directory!" : "Nu se poate scrie în folderul \"config\"!", "See %s" : "Vezi %s", + "PHP %s or higher is required." : "Versiunea PHP %s sau mai mare este necesară.", "Help" : "Ajutor", "Personal" : "Personal", "Settings" : "Setări", @@ -49,7 +50,6 @@ OC.L10N.register( "Cannot write into \"config\" directory" : "Nu se poate scrie în folderul \"config\"", "Cannot write into \"apps\" directory" : "Nu se poate scrie în folderul \"apps\"", "PHP module %s not installed." : "Modulul PHP %s nu este instalat.", - "PHP %s or higher is required." : "Versiunea PHP %s sau mai mare este necesară.", "PHP modules have been installed, but they are still listed as missing?" : "Modulele PHP au fost instalate, dar apar ca lipsind?", "PostgreSQL >= 9 required" : "Este necesară versiunea 9 sau mai mare a PostgreSQL", "Please upgrade your database version" : "Actualizați baza de date la o versiune mai nouă", diff --git a/lib/l10n/ro.json b/lib/l10n/ro.json index ba971437442..9fb7f014389 100644 --- a/lib/l10n/ro.json +++ b/lib/l10n/ro.json @@ -1,6 +1,7 @@ { "translations": { "Cannot write into \"config\" directory!" : "Nu se poate scrie în folderul \"config\"!", "See %s" : "Vezi %s", + "PHP %s or higher is required." : "Versiunea PHP %s sau mai mare este necesară.", "Help" : "Ajutor", "Personal" : "Personal", "Settings" : "Setări", @@ -47,7 +48,6 @@ "Cannot write into \"config\" directory" : "Nu se poate scrie în folderul \"config\"", "Cannot write into \"apps\" directory" : "Nu se poate scrie în folderul \"apps\"", "PHP module %s not installed." : "Modulul PHP %s nu este instalat.", - "PHP %s or higher is required." : "Versiunea PHP %s sau mai mare este necesară.", "PHP modules have been installed, but they are still listed as missing?" : "Modulele PHP au fost instalate, dar apar ca lipsind?", "PostgreSQL >= 9 required" : "Este necesară versiunea 9 sau mai mare a PostgreSQL", "Please upgrade your database version" : "Actualizați baza de date la o versiune mai nouă", diff --git a/lib/l10n/ru.js b/lib/l10n/ru.js index 490a3f6a1e2..bcf66828811 100644 --- a/lib/l10n/ru.js +++ b/lib/l10n/ru.js @@ -7,6 +7,7 @@ OC.L10N.register( "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Обычно это можно исправить, %sпредоставив веб-серверу права на запись в папке конфигурации%s.", "Sample configuration detected" : "Обнаружена конфигурация из примера", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Была обнаружена конфигурация из примера. Это может повредить вашей системе и это не поддерживается. Пожалуйста прочтите доументацию перед внесением изменений в файл config.php", + "PHP %s or higher is required." : "Требуется PHP %s или выше", "Help" : "Помощь", "Personal" : "Личное", "Settings" : "Настройки", @@ -105,12 +106,7 @@ OC.L10N.register( "Please install one of these locales on your system and restart your webserver." : "Установите одну из этих локалей на вашей системе и перезапустите веб-сервер.", "Please ask your server administrator to install the module." : "Пожалуйста, попростите администратора сервера установить модуль.", "PHP module %s not installed." : "Не установлен PHP-модуль %s.", - "PHP %s or higher is required." : "Требуется PHP %s или выше", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Пожалуйста, обратитесь к администратору сервера, чтобы обновить PHP до последней версии. Ваша версия PHP больше не поддерживается ownCloud и сообществом PHP.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "Включен безопасный режим PHP. ownCloud требует, чтобы он был выключен для корректной работы.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Безопасный режим PHP не поддерживается и его следует выключить как практически бесполезную настройку. Пожалуйста, попросите администратора сервера выключить его в php.ini либо в вашей конфигурации веб-сервера.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Включен режим Magic Quotes. ownCloud требует, чтобы он был выключен для корректной работы.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes не поддерживается и его следует выключить как практически бесполезную настройку. Пожалуйста, попросите администратора сервера выключить его в php.ini либо в вашей конфигурации веб-сервера.", "PHP modules have been installed, but they are still listed as missing?" : "Модули PHP был установлены, но все еще в списке как недостающие?", "Please ask your server administrator to restart the web server." : "Пожалуйста, попросите администратора вашего сервера перезапустить веб-сервер.", "PostgreSQL >= 9 required" : "Требуется PostgreSQL >= 9", diff --git a/lib/l10n/ru.json b/lib/l10n/ru.json index 103121a374a..c18d9de810d 100644 --- a/lib/l10n/ru.json +++ b/lib/l10n/ru.json @@ -5,6 +5,7 @@ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Обычно это можно исправить, %sпредоставив веб-серверу права на запись в папке конфигурации%s.", "Sample configuration detected" : "Обнаружена конфигурация из примера", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Была обнаружена конфигурация из примера. Это может повредить вашей системе и это не поддерживается. Пожалуйста прочтите доументацию перед внесением изменений в файл config.php", + "PHP %s or higher is required." : "Требуется PHP %s или выше", "Help" : "Помощь", "Personal" : "Личное", "Settings" : "Настройки", @@ -103,12 +104,7 @@ "Please install one of these locales on your system and restart your webserver." : "Установите одну из этих локалей на вашей системе и перезапустите веб-сервер.", "Please ask your server administrator to install the module." : "Пожалуйста, попростите администратора сервера установить модуль.", "PHP module %s not installed." : "Не установлен PHP-модуль %s.", - "PHP %s or higher is required." : "Требуется PHP %s или выше", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Пожалуйста, обратитесь к администратору сервера, чтобы обновить PHP до последней версии. Ваша версия PHP больше не поддерживается ownCloud и сообществом PHP.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "Включен безопасный режим PHP. ownCloud требует, чтобы он был выключен для корректной работы.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Безопасный режим PHP не поддерживается и его следует выключить как практически бесполезную настройку. Пожалуйста, попросите администратора сервера выключить его в php.ini либо в вашей конфигурации веб-сервера.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Включен режим Magic Quotes. ownCloud требует, чтобы он был выключен для корректной работы.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes не поддерживается и его следует выключить как практически бесполезную настройку. Пожалуйста, попросите администратора сервера выключить его в php.ini либо в вашей конфигурации веб-сервера.", "PHP modules have been installed, but they are still listed as missing?" : "Модули PHP был установлены, но все еще в списке как недостающие?", "Please ask your server administrator to restart the web server." : "Пожалуйста, попросите администратора вашего сервера перезапустить веб-сервер.", "PostgreSQL >= 9 required" : "Требуется PostgreSQL >= 9", diff --git a/lib/l10n/sk_SK.js b/lib/l10n/sk_SK.js index a2e87c5b631..1a0c9f7f217 100644 --- a/lib/l10n/sk_SK.js +++ b/lib/l10n/sk_SK.js @@ -7,6 +7,7 @@ OC.L10N.register( "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "To je zvyčajne možné opraviť tým, že %sudelíte webovému serveru oprávnenie na zápis k adresáru s konfiguráciou%s.", "Sample configuration detected" : "Detekovaná bola vzorová konfigurácia", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Zistilo sa, že konfigurácia bola skopírovaná zo vzorových súborov. Takáto konfigurácia nie je podporovaná a môže poškodiť vašu inštaláciu. Prečítajte si dokumentáciu pred vykonaním zmien v config.php", + "PHP %s or higher is required." : "Požadovaná verzia PHP %s alebo vyššia.", "Help" : "Pomoc", "Personal" : "Osobné", "Settings" : "Nastavenia", @@ -17,6 +18,8 @@ OC.L10N.register( "No app name specified" : "Nešpecifikované meno aplikácie", "Unknown filetype" : "Neznámy typ súboru", "Invalid image" : "Chybný obrázok", + "Database Error" : "Error databázy", + "Please contact your system administrator." : "Prosím kontaktujte administrátora.", "web services under your control" : "webové služby pod Vašou kontrolou", "App directory already exists" : "Aplikačný priečinok už existuje", "Can't create app folder. Please fix permissions. %s" : "Nemožno vytvoriť aplikačný priečinok. Prosím upravte povolenia. %s", @@ -102,12 +105,7 @@ OC.L10N.register( "Please install one of these locales on your system and restart your webserver." : "Prosím, nainštalujte si aspoň jeden z týchto jazykov so svojho systému a reštartujte webserver.", "Please ask your server administrator to install the module." : "Prosím, požiadajte administrátora vášho servera o inštaláciu modulu.", "PHP module %s not installed." : "PHP modul %s nie je nainštalovaný.", - "PHP %s or higher is required." : "Požadovaná verzia PHP %s alebo vyššia.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Prosím, požiadajte administrátora vášho servera o aktualizáciu PHP na najnovšiu verziu. Vaša verzia PHP už nie je podporovaná ownCloud-om a PHP komunitou.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP Safe Mode je zapnutý. ownCloud pre správnu funkčnosť vyžaduje, aby bol vypnutý.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP Safe Mode je zastarané a väčšinou zbytočné nastavenie, ktoré by malo byť vypnuté. Prosím, požiadajte administrátora vášho serveru o jeho vypnutie v php.ini alebo v nastaveniach webového servera.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes sú povolené. ownCloud pre správnu funkčnosť vyžaduje, aby boli vypnuté.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes je zavrhovanou a zbytočnou voľbou, ktorú by ste mali ponechať vypnutú. Prosím, požiadajte správcu svojho servera, aby ju vypol v php.ini alebo v konfigurácii vášho webového servera.", "PHP modules have been installed, but they are still listed as missing?" : "PHP moduly boli nainštalované, ale stále sú uvedené ako chýbajúce?", "Please ask your server administrator to restart the web server." : "Prosím, požiadajte administrátora vášho servera o reštartovanie webového servera.", "PostgreSQL >= 9 required" : "Vyžadované PostgreSQL >= 9", diff --git a/lib/l10n/sk_SK.json b/lib/l10n/sk_SK.json index 84ab8c4a007..d9fe20ccb78 100644 --- a/lib/l10n/sk_SK.json +++ b/lib/l10n/sk_SK.json @@ -5,6 +5,7 @@ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "To je zvyčajne možné opraviť tým, že %sudelíte webovému serveru oprávnenie na zápis k adresáru s konfiguráciou%s.", "Sample configuration detected" : "Detekovaná bola vzorová konfigurácia", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Zistilo sa, že konfigurácia bola skopírovaná zo vzorových súborov. Takáto konfigurácia nie je podporovaná a môže poškodiť vašu inštaláciu. Prečítajte si dokumentáciu pred vykonaním zmien v config.php", + "PHP %s or higher is required." : "Požadovaná verzia PHP %s alebo vyššia.", "Help" : "Pomoc", "Personal" : "Osobné", "Settings" : "Nastavenia", @@ -15,6 +16,8 @@ "No app name specified" : "Nešpecifikované meno aplikácie", "Unknown filetype" : "Neznámy typ súboru", "Invalid image" : "Chybný obrázok", + "Database Error" : "Error databázy", + "Please contact your system administrator." : "Prosím kontaktujte administrátora.", "web services under your control" : "webové služby pod Vašou kontrolou", "App directory already exists" : "Aplikačný priečinok už existuje", "Can't create app folder. Please fix permissions. %s" : "Nemožno vytvoriť aplikačný priečinok. Prosím upravte povolenia. %s", @@ -100,12 +103,7 @@ "Please install one of these locales on your system and restart your webserver." : "Prosím, nainštalujte si aspoň jeden z týchto jazykov so svojho systému a reštartujte webserver.", "Please ask your server administrator to install the module." : "Prosím, požiadajte administrátora vášho servera o inštaláciu modulu.", "PHP module %s not installed." : "PHP modul %s nie je nainštalovaný.", - "PHP %s or higher is required." : "Požadovaná verzia PHP %s alebo vyššia.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Prosím, požiadajte administrátora vášho servera o aktualizáciu PHP na najnovšiu verziu. Vaša verzia PHP už nie je podporovaná ownCloud-om a PHP komunitou.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP Safe Mode je zapnutý. ownCloud pre správnu funkčnosť vyžaduje, aby bol vypnutý.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP Safe Mode je zastarané a väčšinou zbytočné nastavenie, ktoré by malo byť vypnuté. Prosím, požiadajte administrátora vášho serveru o jeho vypnutie v php.ini alebo v nastaveniach webového servera.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes sú povolené. ownCloud pre správnu funkčnosť vyžaduje, aby boli vypnuté.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes je zavrhovanou a zbytočnou voľbou, ktorú by ste mali ponechať vypnutú. Prosím, požiadajte správcu svojho servera, aby ju vypol v php.ini alebo v konfigurácii vášho webového servera.", "PHP modules have been installed, but they are still listed as missing?" : "PHP moduly boli nainštalované, ale stále sú uvedené ako chýbajúce?", "Please ask your server administrator to restart the web server." : "Prosím, požiadajte administrátora vášho servera o reštartovanie webového servera.", "PostgreSQL >= 9 required" : "Vyžadované PostgreSQL >= 9", diff --git a/lib/l10n/sl.js b/lib/l10n/sl.js index aa783fbd69e..0a50257326d 100644 --- a/lib/l10n/sl.js +++ b/lib/l10n/sl.js @@ -7,6 +7,9 @@ OC.L10N.register( "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Napako je mogoče odpraviti z %sdodelitvijo dovoljenja spletnemu strežniku za pisanje v nastavitveno mapo%s.", "Sample configuration detected" : "Zaznana je neustrezna preizkusna nastavitev", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Zaznano je, da je bila v sistem kopirana datoteka z enostavno nastavitvijo. To lahko vpliva na namestitev in zato možnost ni podprta. Pred spremembami datoteke config.php si natančno preberite dokumentacijo.", + "PHP %s or higher is required." : "Zahtevana je različica PHP %s ali višja.", + "PHP with a version less then %s is required." : "Zahtevana je različica PHP manj kot %s.", + "Following databases are supported: %s" : "Podprte so navedene podatkovne zbirke: %s", "Help" : "Pomoč", "Personal" : "Osebno", "Settings" : "Nastavitve", @@ -17,6 +20,8 @@ OC.L10N.register( "No app name specified" : "Ni podanega imena programa", "Unknown filetype" : "Neznana vrsta datoteke", "Invalid image" : "Neveljavna slika", + "Database Error" : "Napaka podatkovne zbirke", + "Please contact your system administrator." : "Stopite v stik s skrbnikom sistema.", "web services under your control" : "spletne storitve pod vašim nadzorom", "App directory already exists" : "Programska mapa že obstaja", "Can't create app folder. Please fix permissions. %s" : "Programske mape ni mogoče ustvariti. Ni ustreznih dovoljenj. %s", @@ -103,12 +108,7 @@ OC.L10N.register( "Please install one of these locales on your system and restart your webserver." : "Namestiti je treba podporo za vsaj eno od navedenih jezikovnih določil v sistemu in nato ponovno zagnati spletni strežnik.", "Please ask your server administrator to install the module." : "Obvestite skrbnika strežnika, da je treba namestiti manjkajoč modul.", "PHP module %s not installed." : "Modul PHP %s ni nameščen.", - "PHP %s or higher is required." : "Zahtevana je različica PHP %s ali višja.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Obvestite skrbnika strežnika, da je treba posodobiti okolje PHP na najnovejšo različico. Trenutno nameščene različice skupnost PHP in ownCloud ne podpira več.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "Omogočen je varni način PHP. Za pravilno delovanje system ownCloud je treba možnost onemogočiti.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Možnost varnega načina PHP je opuščena in jo je priporočljivo onemogočiti. Stopite v stik s skrbnikom sistema oziroma onemogočite možnost v datoteki php.ini ali med nastavitvami spletnega strežnika.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Omogočena je možnost Magic Quotes. Za pravilno delovanje sistema ownCloud je treba možnost onemogočiti.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Možnost Magic Quotes je opuščena in jo je priporočljivo onemogočiti. Stopite v stik s skrbnikom sistema oziroma onemogočite možnost v datoteki php.ini ali med nastavitvami spletnega strežnika.", "PHP modules have been installed, but they are still listed as missing?" : "Ali so bili moduli PHP nameščeni, pa so še vedno označeni kot manjkajoči?", "Please ask your server administrator to restart the web server." : "Obvestite skrbnika strežnika, da je treba ponovno zagnati spletni strežnik.", "PostgreSQL >= 9 required" : "Zahtevana je različica PostgreSQL >= 9.", diff --git a/lib/l10n/sl.json b/lib/l10n/sl.json index c0cbf41f719..ba7d63e08df 100644 --- a/lib/l10n/sl.json +++ b/lib/l10n/sl.json @@ -5,6 +5,9 @@ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Napako je mogoče odpraviti z %sdodelitvijo dovoljenja spletnemu strežniku za pisanje v nastavitveno mapo%s.", "Sample configuration detected" : "Zaznana je neustrezna preizkusna nastavitev", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Zaznano je, da je bila v sistem kopirana datoteka z enostavno nastavitvijo. To lahko vpliva na namestitev in zato možnost ni podprta. Pred spremembami datoteke config.php si natančno preberite dokumentacijo.", + "PHP %s or higher is required." : "Zahtevana je različica PHP %s ali višja.", + "PHP with a version less then %s is required." : "Zahtevana je različica PHP manj kot %s.", + "Following databases are supported: %s" : "Podprte so navedene podatkovne zbirke: %s", "Help" : "Pomoč", "Personal" : "Osebno", "Settings" : "Nastavitve", @@ -15,6 +18,8 @@ "No app name specified" : "Ni podanega imena programa", "Unknown filetype" : "Neznana vrsta datoteke", "Invalid image" : "Neveljavna slika", + "Database Error" : "Napaka podatkovne zbirke", + "Please contact your system administrator." : "Stopite v stik s skrbnikom sistema.", "web services under your control" : "spletne storitve pod vašim nadzorom", "App directory already exists" : "Programska mapa že obstaja", "Can't create app folder. Please fix permissions. %s" : "Programske mape ni mogoče ustvariti. Ni ustreznih dovoljenj. %s", @@ -101,12 +106,7 @@ "Please install one of these locales on your system and restart your webserver." : "Namestiti je treba podporo za vsaj eno od navedenih jezikovnih določil v sistemu in nato ponovno zagnati spletni strežnik.", "Please ask your server administrator to install the module." : "Obvestite skrbnika strežnika, da je treba namestiti manjkajoč modul.", "PHP module %s not installed." : "Modul PHP %s ni nameščen.", - "PHP %s or higher is required." : "Zahtevana je različica PHP %s ali višja.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Obvestite skrbnika strežnika, da je treba posodobiti okolje PHP na najnovejšo različico. Trenutno nameščene različice skupnost PHP in ownCloud ne podpira več.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "Omogočen je varni način PHP. Za pravilno delovanje system ownCloud je treba možnost onemogočiti.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Možnost varnega načina PHP je opuščena in jo je priporočljivo onemogočiti. Stopite v stik s skrbnikom sistema oziroma onemogočite možnost v datoteki php.ini ali med nastavitvami spletnega strežnika.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Omogočena je možnost Magic Quotes. Za pravilno delovanje sistema ownCloud je treba možnost onemogočiti.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Možnost Magic Quotes je opuščena in jo je priporočljivo onemogočiti. Stopite v stik s skrbnikom sistema oziroma onemogočite možnost v datoteki php.ini ali med nastavitvami spletnega strežnika.", "PHP modules have been installed, but they are still listed as missing?" : "Ali so bili moduli PHP nameščeni, pa so še vedno označeni kot manjkajoči?", "Please ask your server administrator to restart the web server." : "Obvestite skrbnika strežnika, da je treba ponovno zagnati spletni strežnik.", "PostgreSQL >= 9 required" : "Zahtevana je različica PostgreSQL >= 9.", diff --git a/lib/l10n/sq.js b/lib/l10n/sq.js index f547c7b9104..c3be28ef1c6 100644 --- a/lib/l10n/sq.js +++ b/lib/l10n/sq.js @@ -6,6 +6,7 @@ OC.L10N.register( "Settings" : "Parametra", "Users" : "Përdoruesit", "Admin" : "Admin", + "Recommended" : "E rekomanduar", "Unknown filetype" : "Tip i panjohur skedari", "Invalid image" : "Imazh i pavlefshëm", "web services under your control" : "shërbime web nën kontrollin tënd", diff --git a/lib/l10n/sq.json b/lib/l10n/sq.json index 8f2d062b91b..cd10a590bd1 100644 --- a/lib/l10n/sq.json +++ b/lib/l10n/sq.json @@ -4,6 +4,7 @@ "Settings" : "Parametra", "Users" : "Përdoruesit", "Admin" : "Admin", + "Recommended" : "E rekomanduar", "Unknown filetype" : "Tip i panjohur skedari", "Invalid image" : "Imazh i pavlefshëm", "web services under your control" : "shërbime web nën kontrollin tënd", diff --git a/lib/l10n/sv.js b/lib/l10n/sv.js index 9bfaa59074c..07d3f6fa825 100644 --- a/lib/l10n/sv.js +++ b/lib/l10n/sv.js @@ -4,6 +4,7 @@ OC.L10N.register( "Cannot write into \"config\" directory!" : "Kan inte skriva till \"config\" katalogen!", "This can usually be fixed by giving the webserver write access to the config directory" : "Detta kan vanligtvis åtgärdas genom att ge skrivrättigheter till config katalgogen", "See %s" : "Se %s", + "PHP %s or higher is required." : "PHP %s eller högre krävs.", "Help" : "Hjälp", "Personal" : "Personligt", "Settings" : "Inställningar", @@ -93,10 +94,7 @@ OC.L10N.register( "This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Detta kan vanligtvis åtgärdas genom att ge <a href=\"%s\" target=\"_blank\">webservern skrivrättigheter till rootkatalogen</a>.", "Please ask your server administrator to install the module." : "Vänligen be din administratör att installera modulen.", "PHP module %s not installed." : "PHP modulen %s är inte installerad.", - "PHP %s or higher is required." : "PHP %s eller högre krävs.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Vänligen be serveradministratören uppdatera PHP till den senaste versionen. Din PHP-version stöds inte längre av ownCloud.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP Safe Mode är aktiverat. ownCloud kräver att det är deaktiverat för att fungera korrekt.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes är aktiverat. ownCloud kräver att det är deaktiverat för att fungera korrekt.", "Please ask your server administrator to restart the web server." : "Vänligen be din serveradministratör att starta om webservern.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 krävs", "Please upgrade your database version" : "Vänligen uppgradera din databas-version", diff --git a/lib/l10n/sv.json b/lib/l10n/sv.json index 299911142a3..894502df1be 100644 --- a/lib/l10n/sv.json +++ b/lib/l10n/sv.json @@ -2,6 +2,7 @@ "Cannot write into \"config\" directory!" : "Kan inte skriva till \"config\" katalogen!", "This can usually be fixed by giving the webserver write access to the config directory" : "Detta kan vanligtvis åtgärdas genom att ge skrivrättigheter till config katalgogen", "See %s" : "Se %s", + "PHP %s or higher is required." : "PHP %s eller högre krävs.", "Help" : "Hjälp", "Personal" : "Personligt", "Settings" : "Inställningar", @@ -91,10 +92,7 @@ "This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Detta kan vanligtvis åtgärdas genom att ge <a href=\"%s\" target=\"_blank\">webservern skrivrättigheter till rootkatalogen</a>.", "Please ask your server administrator to install the module." : "Vänligen be din administratör att installera modulen.", "PHP module %s not installed." : "PHP modulen %s är inte installerad.", - "PHP %s or higher is required." : "PHP %s eller högre krävs.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Vänligen be serveradministratören uppdatera PHP till den senaste versionen. Din PHP-version stöds inte längre av ownCloud.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP Safe Mode är aktiverat. ownCloud kräver att det är deaktiverat för att fungera korrekt.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes är aktiverat. ownCloud kräver att det är deaktiverat för att fungera korrekt.", "Please ask your server administrator to restart the web server." : "Vänligen be din serveradministratör att starta om webservern.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 krävs", "Please upgrade your database version" : "Vänligen uppgradera din databas-version", diff --git a/lib/l10n/tr.js b/lib/l10n/tr.js index 17a97c31e8a..4fab0909e92 100644 --- a/lib/l10n/tr.js +++ b/lib/l10n/tr.js @@ -7,6 +7,9 @@ OC.L10N.register( "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Bu genellikle, %sweb sunucusuna config dizinine yazma erişimi verilerek%s çözülebilir", "Sample configuration detected" : "Örnek yapılandırma tespit edildi", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Örnek yapılandırmanın kopyalanmış olabileceği tespit edildi. Bu kurulumunuzu bozabilir ve desteklenmemektedir. Lütfen config.php dosyasında değişiklik yapmadan önce belgelendirmeyi okuyun", + "PHP %s or higher is required." : "PHP %s veya daha üst sürümü gerekli.", + "PHP with a version less then %s is required." : "PHP'nin %s sürümü öncesi gerekli.", + "Following databases are supported: %s" : "Şu veritabanları desteklenmekte: %s", "Help" : "Yardım", "Personal" : "Kişisel", "Settings" : "Ayarlar", @@ -105,12 +108,7 @@ OC.L10N.register( "Please install one of these locales on your system and restart your webserver." : "Lütfen bu yerellerden birini sisteminize yükleyin ve web sunucunuzu yeniden başlatın.", "Please ask your server administrator to install the module." : "Lütfen modülün kurulması için sunucu yöneticinize danışın.", "PHP module %s not installed." : "PHP modülü %s yüklü değil.", - "PHP %s or higher is required." : "PHP %s veya daha üst sürümü gerekli.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Lütfen PHP'yi en son sürüme güncellemesi için sunucu yönetinize danışın. PHP sürümünüz ownCloud ve PHP topluluğu tarafından artık desteklenmemektedir.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP Güvenli Kip (Safe Mode) etkin. ownCloud düzgün çalışabilmesi için bunun devre dışı olmasını gerektirir.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP Güvenli Kip (Safe Mode), eskimiş ve devre dışı bırakılması gereken en kullanışsız ayardır. Lütfen php.ini veya web sunucu yapılandırması içerisinde devre dışı bırakması için sunucu yöneticinize danışın.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Sihirli Tırnaklar (Magic Quotes) etkin. ownCloud çalışabilmesi için bunun devre dışı bırakılması gerekli.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Sihirli Tırnaklar (Magic Quotes), eskimiş ve devre dışı bırakılması gereken en kullanışsız ayardır. Lütfen php.ini veya web sunucu yapılandırması içerisinde devre dışı bırakması için sunucu yöneticinize danışın.", "PHP modules have been installed, but they are still listed as missing?" : "PHP modülleri yüklü, ancak hala eksik olarak mı görünüyorlar?", "Please ask your server administrator to restart the web server." : "Lütfen web sunucusunu yeniden başlatması için sunucu yöneticinize danışın.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 gerekli", diff --git a/lib/l10n/tr.json b/lib/l10n/tr.json index b6023ba4e08..1a16d30517c 100644 --- a/lib/l10n/tr.json +++ b/lib/l10n/tr.json @@ -5,6 +5,9 @@ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Bu genellikle, %sweb sunucusuna config dizinine yazma erişimi verilerek%s çözülebilir", "Sample configuration detected" : "Örnek yapılandırma tespit edildi", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Örnek yapılandırmanın kopyalanmış olabileceği tespit edildi. Bu kurulumunuzu bozabilir ve desteklenmemektedir. Lütfen config.php dosyasında değişiklik yapmadan önce belgelendirmeyi okuyun", + "PHP %s or higher is required." : "PHP %s veya daha üst sürümü gerekli.", + "PHP with a version less then %s is required." : "PHP'nin %s sürümü öncesi gerekli.", + "Following databases are supported: %s" : "Şu veritabanları desteklenmekte: %s", "Help" : "Yardım", "Personal" : "Kişisel", "Settings" : "Ayarlar", @@ -103,12 +106,7 @@ "Please install one of these locales on your system and restart your webserver." : "Lütfen bu yerellerden birini sisteminize yükleyin ve web sunucunuzu yeniden başlatın.", "Please ask your server administrator to install the module." : "Lütfen modülün kurulması için sunucu yöneticinize danışın.", "PHP module %s not installed." : "PHP modülü %s yüklü değil.", - "PHP %s or higher is required." : "PHP %s veya daha üst sürümü gerekli.", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Lütfen PHP'yi en son sürüme güncellemesi için sunucu yönetinize danışın. PHP sürümünüz ownCloud ve PHP topluluğu tarafından artık desteklenmemektedir.", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP Güvenli Kip (Safe Mode) etkin. ownCloud düzgün çalışabilmesi için bunun devre dışı olmasını gerektirir.", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP Güvenli Kip (Safe Mode), eskimiş ve devre dışı bırakılması gereken en kullanışsız ayardır. Lütfen php.ini veya web sunucu yapılandırması içerisinde devre dışı bırakması için sunucu yöneticinize danışın.", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Sihirli Tırnaklar (Magic Quotes) etkin. ownCloud çalışabilmesi için bunun devre dışı bırakılması gerekli.", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Sihirli Tırnaklar (Magic Quotes), eskimiş ve devre dışı bırakılması gereken en kullanışsız ayardır. Lütfen php.ini veya web sunucu yapılandırması içerisinde devre dışı bırakması için sunucu yöneticinize danışın.", "PHP modules have been installed, but they are still listed as missing?" : "PHP modülleri yüklü, ancak hala eksik olarak mı görünüyorlar?", "Please ask your server administrator to restart the web server." : "Lütfen web sunucusunu yeniden başlatması için sunucu yöneticinize danışın.", "PostgreSQL >= 9 required" : "PostgreSQL >= 9 gerekli", diff --git a/lib/l10n/uk.js b/lib/l10n/uk.js index 5afce6b2ced..4512cb25227 100644 --- a/lib/l10n/uk.js +++ b/lib/l10n/uk.js @@ -17,6 +17,8 @@ OC.L10N.register( "No app name specified" : "Не вказано ім'я додатку", "Unknown filetype" : "Невідомий тип файлу", "Invalid image" : "Невірне зображення", + "Database Error" : "Помилка бази даних", + "Please contact your system administrator." : "Будь ласка, зверніться до системного адміністратора.", "web services under your control" : "підконтрольні Вам веб-сервіси", "App directory already exists" : "Тека додатку вже існує", "Can't create app folder. Please fix permissions. %s" : "Неможливо створити теку додатку. Будь ласка, виправте права доступу. %s", @@ -77,6 +79,7 @@ OC.L10N.register( "years ago" : "роки тому", "A valid username must be provided" : "Потрібно задати вірне ім'я користувача", "A valid password must be provided" : "Потрібно задати вірний пароль", + "The username is already being used" : "Ім'я користувача вже використовується", "No database drivers (sqlite, mysql, or postgresql) installed." : "Не встановлено драйвер бази даних (sqlite, mysql, or postgresql).", "Cannot write into \"config\" directory" : "Не можу писати у теку \"config\"", "Cannot write into \"apps\" directory" : "Не можу писати у теку \"apps\"", diff --git a/lib/l10n/uk.json b/lib/l10n/uk.json index 9c632437ac2..87f34e15657 100644 --- a/lib/l10n/uk.json +++ b/lib/l10n/uk.json @@ -15,6 +15,8 @@ "No app name specified" : "Не вказано ім'я додатку", "Unknown filetype" : "Невідомий тип файлу", "Invalid image" : "Невірне зображення", + "Database Error" : "Помилка бази даних", + "Please contact your system administrator." : "Будь ласка, зверніться до системного адміністратора.", "web services under your control" : "підконтрольні Вам веб-сервіси", "App directory already exists" : "Тека додатку вже існує", "Can't create app folder. Please fix permissions. %s" : "Неможливо створити теку додатку. Будь ласка, виправте права доступу. %s", @@ -75,6 +77,7 @@ "years ago" : "роки тому", "A valid username must be provided" : "Потрібно задати вірне ім'я користувача", "A valid password must be provided" : "Потрібно задати вірний пароль", + "The username is already being used" : "Ім'я користувача вже використовується", "No database drivers (sqlite, mysql, or postgresql) installed." : "Не встановлено драйвер бази даних (sqlite, mysql, or postgresql).", "Cannot write into \"config\" directory" : "Не можу писати у теку \"config\"", "Cannot write into \"apps\" directory" : "Не можу писати у теку \"apps\"", diff --git a/lib/l10n/zh_CN.js b/lib/l10n/zh_CN.js index 54d9afc315b..fd30e9ed45f 100644 --- a/lib/l10n/zh_CN.js +++ b/lib/l10n/zh_CN.js @@ -3,6 +3,7 @@ OC.L10N.register( { "Cannot write into \"config\" directory!" : "无法写入“config”目录!", "See %s" : "查看 %s", + "PHP %s or higher is required." : "要求 PHP 版本 %s 或者更高。", "Help" : "帮助", "Personal" : "个人", "Settings" : "设置", @@ -89,12 +90,7 @@ OC.L10N.register( "Setting locale to %s failed" : "设置语言为 %s 失败", "Please ask your server administrator to install the module." : "请联系服务器管理员安装模块。", "PHP module %s not installed." : "PHP %s 模块未安装。", - "PHP %s or higher is required." : "要求 PHP 版本 %s 或者更高。", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "请联系服务器管理员升级 PHP 到最新的版本。ownCloud 和 PHP 社区已经不再支持此版本的 PHP。", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP Safe Mode 已经启用,ownCloud 需要 Safe Mode 停用以正常工作。", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP Safe Mode 已经被废弃并且应当被停用。请联系服务器管理员在 php.ini 或您的服务器设置中停用 Safe Mode。", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes 已经启用,ownCloud 需要 Magic Quotes 停用以正常工作。", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes 已经被废弃并且应当被停用。请联系服务器管理员在 php.ini 或您的服务器设置中停用 Magic Quotes。", "PHP modules have been installed, but they are still listed as missing?" : "PHP 模块已经安装,但仍然显示未安装?", "Please ask your server administrator to restart the web server." : "请联系服务器管理员重启网页服务器。", "PostgreSQL >= 9 required" : "要求 PostgreSQL >= 9", diff --git a/lib/l10n/zh_CN.json b/lib/l10n/zh_CN.json index 3168f94af58..5d4a134221c 100644 --- a/lib/l10n/zh_CN.json +++ b/lib/l10n/zh_CN.json @@ -1,6 +1,7 @@ { "translations": { "Cannot write into \"config\" directory!" : "无法写入“config”目录!", "See %s" : "查看 %s", + "PHP %s or higher is required." : "要求 PHP 版本 %s 或者更高。", "Help" : "帮助", "Personal" : "个人", "Settings" : "设置", @@ -87,12 +88,7 @@ "Setting locale to %s failed" : "设置语言为 %s 失败", "Please ask your server administrator to install the module." : "请联系服务器管理员安装模块。", "PHP module %s not installed." : "PHP %s 模块未安装。", - "PHP %s or higher is required." : "要求 PHP 版本 %s 或者更高。", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "请联系服务器管理员升级 PHP 到最新的版本。ownCloud 和 PHP 社区已经不再支持此版本的 PHP。", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP Safe Mode 已经启用,ownCloud 需要 Safe Mode 停用以正常工作。", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP Safe Mode 已经被废弃并且应当被停用。请联系服务器管理员在 php.ini 或您的服务器设置中停用 Safe Mode。", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes 已经启用,ownCloud 需要 Magic Quotes 停用以正常工作。", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes 已经被废弃并且应当被停用。请联系服务器管理员在 php.ini 或您的服务器设置中停用 Magic Quotes。", "PHP modules have been installed, but they are still listed as missing?" : "PHP 模块已经安装,但仍然显示未安装?", "Please ask your server administrator to restart the web server." : "请联系服务器管理员重启网页服务器。", "PostgreSQL >= 9 required" : "要求 PostgreSQL >= 9", diff --git a/lib/l10n/zh_TW.js b/lib/l10n/zh_TW.js index 18fcfe06de9..fad510621cb 100644 --- a/lib/l10n/zh_TW.js +++ b/lib/l10n/zh_TW.js @@ -7,6 +7,7 @@ OC.L10N.register( "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "%s允許網頁伺服器寫入設定目錄%s通常可以解決這個問題", "Sample configuration detected" : "偵測到範本設定", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "看來您直接複製了範本設定來使用,這可能會毀掉你的安裝,請閱讀說明文件後對 config.php 進行適當的修改", + "PHP %s or higher is required." : "需要 PHP %s 或更高版本", "Help" : "說明", "Personal" : "個人", "Settings" : "設定", @@ -103,12 +104,7 @@ OC.L10N.register( "Please install one of these locales on your system and restart your webserver." : "請在系統中安裝這些語系的其中一個,然後重啓網頁伺服器", "Please ask your server administrator to install the module." : "請詢問系統管理員來安裝這些模組", "PHP module %s not installed." : "未安裝 PHP 模組 %s", - "PHP %s or higher is required." : "需要 PHP %s 或更高版本", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "請詢問系統管理員將 PHP 升級至最新版,目前的 PHP 版本已經不再被 ownCloud 和 PHP 社群支援", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP 安全模式已經啟動,ownCloud 需要您將它關閉才能正常運作", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP 安全模式已經被棄用,並且在大多數狀況下無助於提升安全性,它應該被關閉。請詢問系統管理員將其在 php.ini 或網頁伺服器當中關閉。", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes 已經被啟用,ownCloud 需要您將其關閉以正常運作", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes 功能在大多數狀況下不會使用到,已經被上游棄用,因此它應該被停用。請詢問系統管理員將其在 php.ini 或網頁伺服器當中停用。", "PHP modules have been installed, but they are still listed as missing?" : "你已經安裝了指定的 PHP 模組,可是還是顯示為找不到嗎?", "Please ask your server administrator to restart the web server." : "請聯絡您的系統管理員重新啟動網頁伺服器", "PostgreSQL >= 9 required" : "需要 PostgreSQL 版本 >= 9", diff --git a/lib/l10n/zh_TW.json b/lib/l10n/zh_TW.json index f6befb07d0a..810962d9e14 100644 --- a/lib/l10n/zh_TW.json +++ b/lib/l10n/zh_TW.json @@ -5,6 +5,7 @@ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "%s允許網頁伺服器寫入設定目錄%s通常可以解決這個問題", "Sample configuration detected" : "偵測到範本設定", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "看來您直接複製了範本設定來使用,這可能會毀掉你的安裝,請閱讀說明文件後對 config.php 進行適當的修改", + "PHP %s or higher is required." : "需要 PHP %s 或更高版本", "Help" : "說明", "Personal" : "個人", "Settings" : "設定", @@ -101,12 +102,7 @@ "Please install one of these locales on your system and restart your webserver." : "請在系統中安裝這些語系的其中一個,然後重啓網頁伺服器", "Please ask your server administrator to install the module." : "請詢問系統管理員來安裝這些模組", "PHP module %s not installed." : "未安裝 PHP 模組 %s", - "PHP %s or higher is required." : "需要 PHP %s 或更高版本", "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "請詢問系統管理員將 PHP 升級至最新版,目前的 PHP 版本已經不再被 ownCloud 和 PHP 社群支援", - "PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." : "PHP 安全模式已經啟動,ownCloud 需要您將它關閉才能正常運作", - "PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "PHP 安全模式已經被棄用,並且在大多數狀況下無助於提升安全性,它應該被關閉。請詢問系統管理員將其在 php.ini 或網頁伺服器當中關閉。", - "Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." : "Magic Quotes 已經被啟用,ownCloud 需要您將其關閉以正常運作", - "Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." : "Magic Quotes 功能在大多數狀況下不會使用到,已經被上游棄用,因此它應該被停用。請詢問系統管理員將其在 php.ini 或網頁伺服器當中停用。", "PHP modules have been installed, but they are still listed as missing?" : "你已經安裝了指定的 PHP 模組,可是還是顯示為找不到嗎?", "Please ask your server administrator to restart the web server." : "請聯絡您的系統管理員重新啟動網頁伺服器", "PostgreSQL >= 9 required" : "需要 PostgreSQL 版本 >= 9", diff --git a/lib/private/activitymanager.php b/lib/private/activitymanager.php index f31b121c8e8..e0ee7c1b055 100644 --- a/lib/private/activitymanager.php +++ b/lib/private/activitymanager.php @@ -247,16 +247,28 @@ class ActivityManager implements IManager { * @return array */ function getQueryForFilter($filter) { + + $conditions = array(); + $parameters = array(); + foreach($this->extensions as $extension) { $c = $extension(); if ($c instanceof IExtension) { $result = $c->getQueryForFilter($filter); if (is_array($result)) { - return $result; + list($condition, $parameter) = $result; + if ($condition && is_array($parameter)) { + $conditions[] = $condition; + $parameters = array_merge($parameters, $parameter); + } } } } - return array(null, null); + if (empty($conditions)) { + return array(null, null); + } + + return array(' and ((' . implode(') or (', $conditions) . '))', $parameters); } } diff --git a/lib/private/api.php b/lib/private/api.php index f5576af2ad8..66b763fdc3e 100644 --- a/lib/private/api.php +++ b/lib/private/api.php @@ -132,7 +132,7 @@ class OC_API { * @return array|\OC_OCS_Result */ public static function mergeResponses($responses) { - // Sort into shipped and thirdparty + // Sort into shipped and third-party $shipped = array( 'succeeded' => array(), 'failed' => array(), @@ -162,7 +162,7 @@ class OC_API { if(!empty($shipped['failed'])) { // Which shipped response do we use if they all failed? // They may have failed for different reasons (different status codes) - // Which reponse code should we return? + // Which response code should we return? // Maybe any that are not OC_API::RESPOND_SERVER_ERROR // Merge failed responses if more than one $data = array(); @@ -273,26 +273,32 @@ class OC_API { // reuse existing login $loggedIn = OC_User::isLoggedIn(); - $ocsApiRequest = isset($_SERVER['HTTP_OCS_APIREQUEST']) ? $_SERVER['HTTP_OCS_APIREQUEST'] === 'true' : false; - if ($loggedIn === true && $ocsApiRequest) { + if ($loggedIn === true) { + $ocsApiRequest = isset($_SERVER['HTTP_OCS_APIREQUEST']) ? $_SERVER['HTTP_OCS_APIREQUEST'] === 'true' : false; + if ($ocsApiRequest) { - // initialize the user's filesystem - \OC_Util::setUpFS(\OC_User::getUser()); + // initialize the user's filesystem + \OC_Util::setUpFS(\OC_User::getUser()); - return OC_User::getUser(); + return OC_User::getUser(); + } + return false; } - // basic auth - $authUser = isset($_SERVER['PHP_AUTH_USER']) ? $_SERVER['PHP_AUTH_USER'] : ''; - $authPw = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : ''; - $return = OC_User::login($authUser, $authPw); - if ($return === true) { - self::$logoutRequired = true; + // basic auth - because OC_User::login will create a new session we shall only try to login + // if user and pass are set + if(isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW']) ) { + $authUser = $_SERVER['PHP_AUTH_USER']; + $authPw = $_SERVER['PHP_AUTH_PW']; + $return = OC_User::login($authUser, $authPw); + if ($return === true) { + self::$logoutRequired = true; - // initialize the user's filesystem - \OC_Util::setUpFS(\OC_User::getUser()); + // initialize the user's filesystem + \OC_Util::setUpFS(\OC_User::getUser()); - return $authUser; + return $authUser; + } } return false; diff --git a/lib/private/app.php b/lib/private/app.php index bc9ca0351ea..86db8fd9f55 100644 --- a/lib/private/app.php +++ b/lib/private/app.php @@ -635,63 +635,10 @@ class OC_App { } $file = self::getAppPath($appId) . '/appinfo/info.xml'; } - $data = array(); - if (!file_exists($file)) { - return null; - } - $content = @file_get_contents($file); - if (!$content) { - return null; - } - $xml = new SimpleXMLElement($content); - $data['info'] = array(); - $data['remote'] = array(); - $data['public'] = array(); - foreach ($xml->children() as $child) { - /** - * @var $child SimpleXMLElement - */ - if ($child->getName() == 'remote') { - foreach ($child->children() as $remote) { - /** - * @var $remote SimpleXMLElement - */ - $data['remote'][$remote->getName()] = (string)$remote; - } - } elseif ($child->getName() == 'public') { - foreach ($child->children() as $public) { - /** - * @var $public SimpleXMLElement - */ - $data['public'][$public->getName()] = (string)$public; - } - } elseif ($child->getName() == 'types') { - $data['types'] = array(); - foreach ($child->children() as $type) { - /** - * @var $type SimpleXMLElement - */ - $data['types'][] = $type->getName(); - } - } elseif ($child->getName() == 'description') { - $xml = (string)$child->asXML(); - $data[$child->getName()] = substr($xml, 13, -14); //script <description> tags - } elseif ($child->getName() == 'documentation') { - foreach ($child as $subChild) { - $url = (string) $subChild; - - // If it is not an absolute URL we assume it is a key - // i.e. admin-ldap will get converted to go.php?to=admin-ldap - if(!\OC::$server->getHTTPHelper()->isHTTPURL($url)) { - $url = OC_Helper::linkToDocs($url); - } - $data["documentation"][$subChild->getName()] = $url; - } - } else { - $data[$child->getName()] = (string)$child; - } - } + $parser = new \OC\App\InfoParser(\OC::$server->getHTTPHelper(), \OC::$server->getURLGenerator()); + $data = $parser->parse($file); + self::$appInfo[$appId] = $data; return $data; @@ -862,7 +809,7 @@ class OC_App { if(isset($info['shipped']) and ($info['shipped'] == 'true')) { $info['internal'] = true; - $info['internallabel'] = $l->t('Recommended'); + $info['internallabel'] = (string)$l->t('Recommended'); $info['internalclass'] = 'recommendedapp'; $info['removable'] = false; } else { @@ -973,7 +920,7 @@ class OC_App { $app1[$i]['score'] = $app['score']; $app1[$i]['removable'] = false; if ($app['label'] == 'recommended') { - $app1[$i]['internallabel'] = $l->t('Recommended'); + $app1[$i]['internallabel'] = (string)$l->t('Recommended'); $app1[$i]['internalclass'] = 'recommendedapp'; } diff --git a/lib/private/app/dependencyanalyzer.php b/lib/private/app/dependencyanalyzer.php new file mode 100644 index 00000000000..fb4b3761656 --- /dev/null +++ b/lib/private/app/dependencyanalyzer.php @@ -0,0 +1,87 @@ +<?php + /** + * @author Thomas Müller + * @copyright 2014 Thomas Müller deepdiver@owncloud.com + * + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OC\App; + +class DependencyAnalyzer { + + /** @var Platform */ + private $system; + + /** @var \OCP\IL10N */ + private $l; + + /** @var array */ + private $missing; + + /** @var array */ + private $dependencies; + + /** + * @param array $app + * @param Platform $platform + * @param \OCP\IL10N $l + */ + function __construct(array $app, $platform, $l) { + $this->system = $platform; + $this->l = $l; + $this->missing = array(); + $this->dependencies = array(); + if (array_key_exists('dependencies', $app)) { + $this->dependencies = $app['dependencies']; + } + } + + /** + * @param array $app + * @returns array of missing dependencies + */ + public function analyze() { + $this->analysePhpVersion(); + $this->analyseSupportedDatabases(); + return $this->missing; + } + + private function analysePhpVersion() { + if (isset($this->dependencies['php']['@attributes']['min-version'])) { + $minVersion = $this->dependencies['php']['@attributes']['min-version']; + if (version_compare($this->system->getPhpVersion(), $minVersion, '<')) { + $this->missing[] = (string)$this->l->t('PHP %s or higher is required.', $minVersion); + } + } + if (isset($this->dependencies['php']['@attributes']['max-version'])) { + $maxVersion = $this->dependencies['php']['@attributes']['max-version']; + if (version_compare($this->system->getPhpVersion(), $maxVersion, '>')) { + $this->missing[] = (string)$this->l->t('PHP with a version less then %s is required.', $maxVersion); + } + } + } + + private function analyseSupportedDatabases() { + if (!isset($this->dependencies['database'])) { + return; + } + + $supportedDatabases = $this->dependencies['database']; + if (empty($supportedDatabases)) { + return; + } + $supportedDatabases = array_map(function($db) { + if (isset($db['@value'])) { + return $db['@value']; + } + return $db; + }, $supportedDatabases); + $currentDatabase = $this->system->getDatabase(); + if (!in_array($currentDatabase, $supportedDatabases)) { + $this->missing[] = (string)$this->l->t('Following databases are supported: %s', join(', ', $supportedDatabases)); + } + } +} diff --git a/lib/private/app/infoparser.php b/lib/private/app/infoparser.php new file mode 100644 index 00000000000..0bfbf6bd139 --- /dev/null +++ b/lib/private/app/infoparser.php @@ -0,0 +1,148 @@ +<?php + /** + * @author Thomas Müller + * @copyright 2014 Thomas Müller deepdiver@owncloud.com + * + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OC\App; + +use OCP\IURLGenerator; + +class InfoParser { + /** + * @var \OC\HTTPHelper + */ + private $httpHelper; + + /** + * @var IURLGenerator + */ + private $urlGenerator; + + /** + * @param \OC\HTTPHelper $httpHelper + * @param IURLGenerator $urlGenerator + */ + public function __construct(\OC\HTTPHelper $httpHelper, IURLGenerator $urlGenerator) { + $this->httpHelper = $httpHelper; + $this->urlGenerator = $urlGenerator; + } + + /** + * @param string $file the xml file to be loaded + * @return null|array where null is an indicator for an error + */ + public function parse($file) { + if (!file_exists($file)) { + return null; + } + + $loadEntities = libxml_disable_entity_loader(false); + $xml = @simplexml_load_file($file); + libxml_disable_entity_loader($loadEntities); + if ($xml == false) { + return null; + } + $array = $this->xmlToArray($xml, false); + if (is_null($array)) { + return null; + } + if (!array_key_exists('info', $array)) { + $array['info'] = array(); + } + if (!array_key_exists('remote', $array)) { + $array['remote'] = array(); + } + if (!array_key_exists('public', $array)) { + $array['public'] = array(); + } + if (!array_key_exists('types', $array)) { + $array['types'] = array(); + } + + if (array_key_exists('documentation', $array) && is_array($array['documentation'])) { + foreach ($array['documentation'] as $key => $url) { + // If it is not an absolute URL we assume it is a key + // i.e. admin-ldap will get converted to go.php?to=admin-ldap + if (!$this->httpHelper->isHTTPURL($url)) { + $url = $this->urlGenerator->linkToDocs($url); + } + + $array['documentation'][$key] = $url; + } + } + if (array_key_exists('types', $array)) { + if (is_array($array['types'])) { + foreach ($array['types'] as $type => $v) { + unset($array['types'][$type]); + if (is_string($type)) { + $array['types'][] = $type; + } + } + } else { + $array['types'] = array(); + } + } + + return $array; + } + + /** + * @param \SimpleXMLElement $xml + * @return array + */ + function xmlToArray($xml) { + if (!$xml->children()) { + return (string)$xml; + } + + $array = array(); + foreach ($xml->children() as $element => $node) { + $totalElement = count($xml->{$element}); + + if (!isset($array[$element])) { + $array[$element] = ""; + } + /** + * @var \SimpleXMLElement $node + */ + + // Has attributes + if ($attributes = $node->attributes()) { + $data = array( + '@attributes' => array(), + ); + if (!count($node->children())){ + $value = (string)$node; + if (!empty($value)) { + $data['@value'] = (string)$node; + } + } else { + $data = array_merge($data, $this->xmlToArray($node)); + } + foreach ($attributes as $attr => $value) { + $data['@attributes'][$attr] = (string)$value; + } + + if ($totalElement > 1) { + $array[$element][] = $data; + } else { + $array[$element] = $data; + } + // Just a value + } else { + if ($totalElement > 1) { + $array[$element][] = $this->xmlToArray($node); + } else { + $array[$element] = $this->xmlToArray($node); + } + } + } + + return $array; + } +} diff --git a/lib/private/app/platform.php b/lib/private/app/platform.php new file mode 100644 index 00000000000..39f8a2979f9 --- /dev/null +++ b/lib/private/app/platform.php @@ -0,0 +1,33 @@ +<?php + /** + * @author Thomas Müller + * @copyright 2014 Thomas Müller deepdiver@owncloud.com + * + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OC\App; + +use OCP\IConfig; + +class Platform { + + function __construct(IConfig $config) { + $this->config = $config; + } + + public function getPhpVersion() { + return phpversion(); + } + + public function getDatabase() { + $dbType = $this->config->getSystemValue('dbtype', 'sqlite'); + if ($dbType === 'sqlite3') { + $dbType = 'sqlite'; + } + + return $dbType; + } +} diff --git a/lib/private/appframework/app.php b/lib/private/appframework/app.php index baf52d02054..f56ba4af870 100644 --- a/lib/private/appframework/app.php +++ b/lib/private/appframework/app.php @@ -53,7 +53,7 @@ class App { // initialize the dispatcher and run all the middleware before the controller $dispatcher = $container['Dispatcher']; - list($httpHeaders, $responseHeaders, $output) = + list($httpHeaders, $responseHeaders, $responseCookies, $output) = $dispatcher->dispatch($controller, $methodName); if(!is_null($httpHeaders)) { @@ -64,6 +64,14 @@ class App { header($name . ': ' . $value); } + foreach($responseCookies as $name => $value) { + $expireDate = null; + if($value['expireDate'] instanceof \DateTime) { + $expireDate = $value['expireDate']->getTimestamp(); + } + setcookie($name, $value['value'], $expireDate, $container->getServer()->getWebRoot(), null, $container->getServer()->getConfig()->getSystemValue('forcessl', false), true); + } + if(!is_null($output)) { header('Content-Length: ' . strlen($output)); print($output); diff --git a/lib/private/appframework/core/api.php b/lib/private/appframework/core/api.php index 279f4bf97f7..f68c677d106 100644 --- a/lib/private/appframework/core/api.php +++ b/lib/private/appframework/core/api.php @@ -49,6 +49,7 @@ class API implements IApi{ /** * Gets the userid of the current user * @return string the user id of the current user + * @deprecated Use \OC::$server->getUserSession()->getUser()->getUID() */ public function getUserId(){ return \OCP\User::getUser(); @@ -112,6 +113,7 @@ class API implements IApi{ /** * used to return and open a new event source * @return \OCP\IEventSource a new open EventSource class + * @deprecated Use \OC::$server->createEventSource(); */ public function openEventSource(){ return \OC::$server->createEventSource(); @@ -159,6 +161,7 @@ class API implements IApi{ * @param string $className full namespace and class name of the class * @param string $methodName the name of the static method that should be * called + * @deprecated Use \OC::$server->getJobList()->add(); */ public function addRegularTask($className, $methodName) { \OCP\Backgroundjob::addRegularTask($className, $methodName); diff --git a/lib/private/appframework/http/dispatcher.php b/lib/private/appframework/http/dispatcher.php index 29a661d5743..24540ef3c94 100644 --- a/lib/private/appframework/http/dispatcher.php +++ b/lib/private/appframework/http/dispatcher.php @@ -48,7 +48,7 @@ class Dispatcher { * @param Http $protocol the http protocol with contains all status headers * @param MiddlewareDispatcher $middlewareDispatcher the dispatcher which * runs the middleware - * @param ControllerMethodReflector the reflector that is used to inject + * @param ControllerMethodReflector $reflector the reflector that is used to inject * the arguments for the controller * @param IRequest $request the incoming request */ @@ -71,6 +71,7 @@ class Dispatcher { * @return array $array[0] contains a string with the http main header, * $array[1] contains headers in the form: $key => value, $array[2] contains * the response output + * @throws \Exception */ public function dispatch(Controller $controller, $methodName) { $out = array(null, array(), null); @@ -102,13 +103,14 @@ class Dispatcher { // get the output which should be printed and run the after output // middleware to modify the response $output = $response->render(); - $out[2] = $this->middlewareDispatcher->beforeOutput( + $out[3] = $this->middlewareDispatcher->beforeOutput( $controller, $methodName, $output); // depending on the cache object the headers need to be changed $out[0] = $this->protocol->getStatusHeader($response->getStatus(), $response->getLastModified(), $response->getETag()); - $out[1] = $response->getHeaders(); + $out[1] = array_merge($response->getHeaders()); + $out[2] = $response->getCookies(); return $out; } diff --git a/lib/private/appframework/routing/routeconfig.php b/lib/private/appframework/routing/routeconfig.php index 91687b9c83c..9816b062b8d 100644 --- a/lib/private/appframework/routing/routeconfig.php +++ b/lib/private/appframework/routing/routeconfig.php @@ -69,6 +69,12 @@ class RouteConfig { $simpleRoutes = isset($routes['routes']) ? $routes['routes'] : array(); foreach ($simpleRoutes as $simpleRoute) { $name = $simpleRoute['name']; + $postfix = ''; + + if (isset($simpleRoute['postfix'])) { + $postfix = $simpleRoute['postfix']; + } + $url = $simpleRoute['url']; $verb = isset($simpleRoute['verb']) ? strtoupper($simpleRoute['verb']) : 'GET'; @@ -84,7 +90,7 @@ class RouteConfig { // register the route $handler = new RouteActionHandler($this->container, $controllerName, $actionName); - $router = $this->router->create($this->appName.'.'.$controller.'.'.$action, $url) + $router = $this->router->create($this->appName.'.'.$controller.'.'.$action . $postfix, $url) ->method($verb) ->action($handler); diff --git a/lib/private/arrayparser.php b/lib/private/arrayparser.php index dab1817c2ed..1cf3355d6fa 100644 --- a/lib/private/arrayparser.php +++ b/lib/private/arrayparser.php @@ -21,9 +21,6 @@ namespace OC; -class SyntaxException extends \Exception { -} - class ArrayParser { const TYPE_NUM = 1; const TYPE_BOOL = 2; @@ -209,7 +206,7 @@ class ArrayParser { $bracketDepth++; } elseif ($char === ')') { if ($bracketDepth <= 0) { - throw new SyntaxException; + throw new UnexpectedValueException(); } else { $bracketDepth--; } diff --git a/lib/private/contacts/localaddressbook.php b/lib/private/contacts/localaddressbook.php index 483bbee83f8..91ddb5798f2 100644 --- a/lib/private/contacts/localaddressbook.php +++ b/lib/private/contacts/localaddressbook.php @@ -91,7 +91,7 @@ class LocalAddressBook implements \OCP\IAddressBook { * @return int */ public function getPermissions() { - return \OCP\PERMISSION_READ; + return \OCP\Constants::PERMISSION_READ; } /** diff --git a/lib/private/contactsmanager.php b/lib/private/contactsmanager.php index 338cc048651..737fc4f0e3a 100644 --- a/lib/private/contactsmanager.php +++ b/lib/private/contactsmanager.php @@ -62,7 +62,7 @@ namespace OC { return null; } - if ($addressBook->getPermissions() & \OCP\PERMISSION_DELETE) { + if ($addressBook->getPermissions() & \OCP\Constants::PERMISSION_DELETE) { return null; } @@ -83,7 +83,7 @@ namespace OC { return null; } - if ($addressBook->getPermissions() & \OCP\PERMISSION_CREATE) { + if ($addressBook->getPermissions() & \OCP\Constants::PERMISSION_CREATE) { return null; } diff --git a/lib/private/databaseexception.php b/lib/private/databaseexception.php new file mode 100644 index 00000000000..1135621ead2 --- /dev/null +++ b/lib/private/databaseexception.php @@ -0,0 +1,23 @@ +<?php +/** + * Copyright (c) 2012 Frank Karlitschek <frank@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OC; + +class DatabaseException extends \Exception { + private $query; + + //FIXME getQuery seems to be unused, maybe use parent constructor with $message, $code and $previous + public function __construct($message, $query = null){ + parent::__construct($message); + $this->query = $query; + } + + public function getQuery() { + return $this->query; + } +} diff --git a/lib/private/databasesetupexception.php b/lib/private/databasesetupexception.php new file mode 100644 index 00000000000..9235cda8c0e --- /dev/null +++ b/lib/private/databasesetupexception.php @@ -0,0 +1,12 @@ +<?php +/** + * Copyright (c) 2014 Lukas Reschke <lukas@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OC; + +class DatabaseSetupException extends HintException { +} diff --git a/lib/private/db.php b/lib/private/db.php index b820281b8a3..f8015133682 100644 --- a/lib/private/db.php +++ b/lib/private/db.php @@ -22,20 +22,6 @@ define('MDB2_SCHEMA_DUMP_STRUCTURE', '1'); -class DatabaseException extends Exception { - private $query; - - //FIXME getQuery seems to be unused, maybe use parent constructor with $message, $code and $previous - public function __construct($message, $query = null){ - parent::__construct($message); - $this->query = $query; - } - - public function getQuery() { - return $this->query; - } -} - /** * This class manages the access to the database. It basically is a wrapper for * Doctrine with some adaptions. @@ -65,7 +51,7 @@ class OC_DB { * @param int $limit * @param int $offset * @param bool $isManipulation - * @throws DatabaseException + * @throws \OC\DatabaseException * @return OC_DB_StatementWrapper prepared SQL query * * SQL query via Doctrine prepare(), needs to be execute()'d! @@ -82,7 +68,7 @@ class OC_DB { try { $result =$connection->prepare($query, $limit, $offset); } catch (\Doctrine\DBAL\DBALException $e) { - throw new \DatabaseException($e->getMessage(), $query); + throw new \OC\DatabaseException($e->getMessage(), $query); } // differentiate between query and manipulation $result = new OC_DB_StatementWrapper($result, $isManipulation); @@ -123,7 +109,7 @@ class OC_DB { * .. or a simple sql query string * @param array $parameters * @return OC_DB_StatementWrapper - * @throws DatabaseException + * @throws \OC\DatabaseException */ static public function executeAudited( $stmt, array $parameters = null) { if (is_string($stmt)) { @@ -132,7 +118,7 @@ class OC_DB { // TODO try to convert LIMIT OFFSET notation to parameters, see fixLimitClauseForMSSQL $message = 'LIMIT and OFFSET are forbidden for portability reasons,' . ' pass an array with \'limit\' and \'offset\' instead'; - throw new DatabaseException($message); + throw new \OC\DatabaseException($message); } $stmt = array('sql' => $stmt, 'limit' => null, 'offset' => null); } @@ -140,7 +126,7 @@ class OC_DB { // convert to prepared statement if ( ! array_key_exists('sql', $stmt) ) { $message = 'statement array must at least contain key \'sql\''; - throw new DatabaseException($message); + throw new \OC\DatabaseException($message); } if ( ! array_key_exists('limit', $stmt) ) { $stmt['limit'] = null; @@ -160,7 +146,7 @@ class OC_DB { } else { $message = 'Expected a prepared statement or array got ' . gettype($stmt); } - throw new DatabaseException($message); + throw new \OC\DatabaseException($message); } return $result; } @@ -169,7 +155,7 @@ class OC_DB { * gets last value of autoincrement * @param string $table The optional table name (will replace *PREFIX*) and add sequence suffix * @return string id - * @throws DatabaseException + * @throws \OC\DatabaseException * * \Doctrine\DBAL\Connection lastInsertId * @@ -312,7 +298,7 @@ class OC_DB { * @param mixed $result * @param string $message * @return void - * @throws DatabaseException + * @throws \OC\DatabaseException */ public static function raiseExceptionOnError($result, $message = null) { if(self::isError($result)) { @@ -321,7 +307,7 @@ class OC_DB { } else { $message .= ', Root cause:' . self::getErrorMessage($result); } - throw new DatabaseException($message, self::getErrorCode($result)); + throw new \OC\DatabaseException($message, self::getErrorCode($result)); } } @@ -345,7 +331,7 @@ class OC_DB { * * @param string $table * @return bool - * @throws DatabaseException + * @throws \OC\DatabaseException */ public static function tableExists($table) { @@ -381,7 +367,7 @@ class OC_DB { $result = \OC_DB::executeAudited($sql, array($table)); break; default: - throw new DatabaseException("Unknown database type: $dbType"); + throw new \OC\DatabaseException("Unknown database type: $dbType"); } return $result->fetchOne() === $table; diff --git a/lib/private/db/connectionfactory.php b/lib/private/db/connectionfactory.php index f6253e09b95..58043b30440 100644 --- a/lib/private/db/connectionfactory.php +++ b/lib/private/db/connectionfactory.php @@ -90,7 +90,8 @@ class ConnectionFactory { $eventManager->addEventSubscriber(new \Doctrine\DBAL\Event\Listeners\OracleSessionInit); break; case 'sqlite3': - $eventManager->addEventSubscriber(new SQLiteSessionInit); + $journalMode = $additionalConnectionParams['sqlite.journal_mode']; + $eventManager->addEventSubscriber(new SQLiteSessionInit(true, $journalMode)); break; } $connection = \Doctrine\DBAL\DriverManager::getConnection( @@ -153,6 +154,7 @@ class ConnectionFactory { } $connectionParams['tablePrefix'] = $config->getSystemValue('dbtableprefix', 'oc_'); + $connectionParams['sqlite.journal_mode'] = $config->getSystemValue('sqlite.journal_mode', 'WAL'); //additional driver options, eg. for mysql ssl $driverOptions = $config->getSystemValue('dbdriveroptions', null); diff --git a/lib/private/db/sqlitesessioninit.php b/lib/private/db/sqlitesessioninit.php index 7e1166be95b..1fff22b883a 100644 --- a/lib/private/db/sqlitesessioninit.php +++ b/lib/private/db/sqlitesessioninit.php @@ -19,12 +19,19 @@ class SQLiteSessionInit implements EventSubscriber { private $caseSensitiveLike; /** + * @var string + */ + private $journalMode; + + /** * Configure case sensitive like for each connection * * @param bool $caseSensitiveLike + * @param string $journalMode */ - public function __construct($caseSensitiveLike = true) { + public function __construct($caseSensitiveLike, $journalMode) { $this->caseSensitiveLike = $caseSensitiveLike; + $this->journalMode = $journalMode; } /** @@ -34,6 +41,7 @@ class SQLiteSessionInit implements EventSubscriber { public function postConnect(ConnectionEventArgs $args) { $sensitive = ($this->caseSensitiveLike) ? 'true' : 'false'; $args->getConnection()->executeUpdate('PRAGMA case_sensitive_like = ' . $sensitive); + $args->getConnection()->executeUpdate('PRAGMA journal_mode = ' . $this->journalMode); } public function getSubscribedEvents() { diff --git a/lib/private/files.php b/lib/private/files.php index 571d3215caa..98f3c52d6c6 100644 --- a/lib/private/files.php +++ b/lib/private/files.php @@ -24,17 +24,14 @@ // TODO: get rid of this using proper composer packages require_once 'mcnetic/phpzipstreamer/ZipStreamer.php'; -class GET_TYPE { - const FILE = 1; - const ZIP_FILES = 2; - const ZIP_DIR = 3; -} - /** * Class for file server access * */ class OC_Files { + const FILE = 1; + const ZIP_FILES = 2; + const ZIP_DIR = 3; /** * @param string $filename @@ -76,7 +73,7 @@ class OC_Files { } if (is_array($files)) { - $get_type = GET_TYPE::ZIP_FILES; + $get_type = self::ZIP_FILES; $basename = basename($dir); if ($basename) { $name = $basename . '.zip'; @@ -88,7 +85,7 @@ class OC_Files { } else { $filename = $dir . '/' . $files; if (\OC\Files\Filesystem::is_dir($dir . '/' . $files)) { - $get_type = GET_TYPE::ZIP_DIR; + $get_type = self::ZIP_DIR; // downloading root ? if ($files === '') { $name = 'download.zip'; @@ -97,12 +94,12 @@ class OC_Files { } } else { - $get_type = GET_TYPE::FILE; + $get_type = self::FILE; $name = $files; } } - if ($get_type === GET_TYPE::FILE) { + if ($get_type === self::FILE) { $zip = false; if ($xsendfile && OC_App::isEnabled('files_encryption')) { $xsendfile = false; @@ -127,7 +124,7 @@ class OC_Files { if ($zip) { $executionTime = intval(ini_get('max_execution_time')); set_time_limit(0); - if ($get_type === GET_TYPE::ZIP_FILES) { + if ($get_type === self::ZIP_FILES) { foreach ($files as $file) { $file = $dir . '/' . $file; if (\OC\Files\Filesystem::is_file($file)) { @@ -138,7 +135,7 @@ class OC_Files { self::zipAddDir($file, $zip); } } - } elseif ($get_type === GET_TYPE::ZIP_DIR) { + } elseif ($get_type === self::ZIP_DIR) { $file = $dir . '/' . $files; self::zipAddDir($file, $zip); } diff --git a/lib/private/files/cache/cache.php b/lib/private/files/cache/cache.php index 2c12f834518..4157da2281c 100644 --- a/lib/private/files/cache/cache.php +++ b/lib/private/files/cache/cache.php @@ -585,7 +585,7 @@ class Cache { /** * find a folder in the cache which has not been fully scanned * - * If multiply incomplete folders are in the cache, the one with the highest id will be returned, + * If multiple incomplete folders are in the cache, the one with the highest id will be returned, * use the one with the highest id gives the best result with the background scanner, since that is most * likely the folder where we stopped scanning previously * diff --git a/lib/private/files/cache/wrapper/cachejail.php b/lib/private/files/cache/wrapper/cachejail.php new file mode 100644 index 00000000000..7982293f5ed --- /dev/null +++ b/lib/private/files/cache/wrapper/cachejail.php @@ -0,0 +1,255 @@ +<?php +/** + * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OC\Files\Cache\Wrapper; + +/** + * Jail to a subdirectory of the wrapped cache + */ +class CacheJail extends CacheWrapper { + /** + * @var string + */ + protected $root; + + /** + * @param \OC\Files\Cache\Cache $cache + * @param string $root + */ + public function __construct($cache, $root) { + parent::__construct($cache); + $this->root = $root; + } + + protected function getSourcePath($path) { + if ($path === '') { + return $this->root; + } else { + return $this->root . '/' . $path; + } + } + + /** + * @param string $path + * @return null|string the jailed path or null if the path is outside the jail + */ + protected function getJailedPath($path) { + $rootLength = strlen($this->root) + 1; + if ($path === $this->root) { + return ''; + } else if (substr($path, 0, $rootLength) === $this->root . '/') { + return substr($path, $rootLength); + } else { + return null; + } + } + + /** + * @param array $entry + * @return array + */ + protected function formatCacheEntry($entry) { + if (isset($entry['path'])) { + $entry['path'] = $this->getJailedPath($entry['path']); + } + return $entry; + } + + protected function filterCacheEntry($entry) { + $rootLength = strlen($this->root) + 1; + return ($entry['path'] === $this->root) or (substr($entry['path'], 0, $rootLength) === $this->root . '/'); + } + + /** + * get the stored metadata of a file or folder + * + * @param string /int $file + * @return array|false + */ + public function get($file) { + if (is_string($file) or $file == '') { + $file = $this->getSourcePath($file); + } + return parent::get($file); + } + + /** + * store meta data for a file or folder + * + * @param string $file + * @param array $data + * + * @return int file id + */ + public function put($file, array $data) { + return $this->cache->put($this->getSourcePath($file), $data); + } + + /** + * update the metadata in the cache + * + * @param int $id + * @param array $data + */ + public function update($id, array $data) { + $this->cache->update($this->getSourcePath($id), $data); + } + + /** + * get the file id for a file + * + * @param string $file + * @return int + */ + public function getId($file) { + return $this->cache->getId($this->getSourcePath($file)); + } + + /** + * get the id of the parent folder of a file + * + * @param string $file + * @return int + */ + public function getParentId($file) { + if ($file === '') { + return -1; + } else { + return $this->cache->getParentId($this->getSourcePath($file)); + } + } + + /** + * check if a file is available in the cache + * + * @param string $file + * @return bool + */ + public function inCache($file) { + return $this->cache->inCache($this->getSourcePath($file)); + } + + /** + * remove a file or folder from the cache + * + * @param string $file + */ + public function remove($file) { + $this->cache->remove($this->getSourcePath($file)); + } + + /** + * Move a file or folder in the cache + * + * @param string $source + * @param string $target + */ + public function move($source, $target) { + $this->cache->move($this->getSourcePath($source), $this->getSourcePath($target)); + } + + /** + * remove all entries for files that are stored on the storage from the cache + */ + public function clear() { + $this->cache->remove($this->root); + } + + /** + * @param string $file + * + * @return int, Cache::NOT_FOUND, Cache::PARTIAL, Cache::SHALLOW or Cache::COMPLETE + */ + public function getStatus($file) { + return $this->cache->getStatus($this->getSourcePath($file)); + } + + private function formatSearchResults($results) { + $results = array_filter($results, array($this, 'filterCacheEntry')); + $results = array_values($results); + return array_map(array($this, 'formatCacheEntry'), $results); + } + + /** + * search for files matching $pattern + * + * @param string $pattern + * @return array an array of file data + */ + public function search($pattern) { + $results = $this->cache->search($pattern); + return $this->formatSearchResults($results); + } + + /** + * search for files by mimetype + * + * @param string $mimetype + * @return array + */ + public function searchByMime($mimetype) { + $results = $this->cache->searchByMime($mimetype); + return $this->formatSearchResults($results); + } + + /** + * update the folder size and the size of all parent folders + * + * @param string|boolean $path + * @param array $data (optional) meta data of the folder + */ + public function correctFolderSize($path, $data = null) { + $this->cache->correctFolderSize($this->getSourcePath($path), $data); + } + + /** + * get the size of a folder and set it in the cache + * + * @param string $path + * @param array $entry (optional) meta data of the folder + * @return int + */ + public function calculateFolderSize($path, $entry = null) { + return $this->cache->calculateFolderSize($this->getSourcePath($path), $entry); + } + + /** + * get all file ids on the files on the storage + * + * @return int[] + */ + public function getAll() { + // not supported + return array(); + } + + /** + * find a folder in the cache which has not been fully scanned + * + * If multiply incomplete folders are in the cache, the one with the highest id will be returned, + * use the one with the highest id gives the best result with the background scanner, since that is most + * likely the folder where we stopped scanning previously + * + * @return string|bool the path of the folder or false when no folder matched + */ + public function getIncomplete() { + // not supported + return false; + } + + /** + * get the path of a file on this storage by it's id + * + * @param int $id + * @return string|null + */ + public function getPathById($id) { + $path = $this->cache->getPathById($id); + return $this->getJailedPath($path); + } +} diff --git a/lib/private/files/cache/wrapper/cachepermissionsmask.php b/lib/private/files/cache/wrapper/cachepermissionsmask.php new file mode 100644 index 00000000000..6ce6a4ebc44 --- /dev/null +++ b/lib/private/files/cache/wrapper/cachepermissionsmask.php @@ -0,0 +1,32 @@ +<?php +/** + * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OC\Files\Cache\Wrapper; + +class CachePermissionsMask extends CacheWrapper { + /** + * @var int + */ + protected $mask; + + /** + * @param \OC\Files\Cache\Cache $cache + * @param int $mask + */ + public function __construct($cache, $mask) { + parent::__construct($cache); + $this->mask = $mask; + } + + protected function formatCacheEntry($entry) { + if (isset($entry['permissions'])) { + $entry['permissions'] &= $this->mask; + } + return $entry; + } +} diff --git a/lib/private/files/cache/wrapper/cachewrapper.php b/lib/private/files/cache/wrapper/cachewrapper.php new file mode 100644 index 00000000000..040358ec657 --- /dev/null +++ b/lib/private/files/cache/wrapper/cachewrapper.php @@ -0,0 +1,247 @@ +<?php +/** + * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OC\Files\Cache\Wrapper; + +use OC\Files\Cache\Cache; + +class CacheWrapper extends Cache { + /** + * @var \OC\Files\Cache\Cache + */ + protected $cache; + + /** + * @param \OC\Files\Cache\Cache $cache + */ + public function __construct($cache) { + $this->cache = $cache; + } + + /** + * Make it easy for wrappers to modify every returned cache entry + * + * @param array $entry + * @return array + */ + protected function formatCacheEntry($entry) { + return $entry; + } + + /** + * get the stored metadata of a file or folder + * + * @param string /int $file + * @return array|false + */ + public function get($file) { + $result = $this->cache->get($file); + if ($result) { + $result = $this->formatCacheEntry($result); + } + return $result; + } + + /** + * get the metadata of all files stored in $folder + * + * @param string $folder + * @return array + */ + public function getFolderContents($folder) { + // cant do a simple $this->cache->.... call here since getFolderContentsById needs to be called on this + // and not the wrapped cache + $fileId = $this->getId($folder); + return $this->getFolderContentsById($fileId); + } + + /** + * get the metadata of all files stored in $folder + * + * @param int $fileId the file id of the folder + * @return array + */ + public function getFolderContentsById($fileId) { + $results = $this->cache->getFolderContentsById($fileId); + return array_map(array($this, 'formatCacheEntry'), $results); + } + + /** + * store meta data for a file or folder + * + * @param string $file + * @param array $data + * + * @return int file id + */ + public function put($file, array $data) { + return $this->cache->put($file, $data); + } + + /** + * update the metadata in the cache + * + * @param int $id + * @param array $data + */ + public function update($id, array $data) { + $this->cache->update($id, $data); + } + + /** + * get the file id for a file + * + * @param string $file + * @return int + */ + public function getId($file) { + return $this->cache->getId($file); + } + + /** + * get the id of the parent folder of a file + * + * @param string $file + * @return int + */ + public function getParentId($file) { + return $this->cache->getParentId($file); + } + + /** + * check if a file is available in the cache + * + * @param string $file + * @return bool + */ + public function inCache($file) { + return $this->cache->inCache($file); + } + + /** + * remove a file or folder from the cache + * + * @param string $file + */ + public function remove($file) { + $this->cache->remove($file); + } + + /** + * Move a file or folder in the cache + * + * @param string $source + * @param string $target + */ + public function move($source, $target) { + $this->cache->move($source, $target); + } + + /** + * remove all entries for files that are stored on the storage from the cache + */ + public function clear() { + $this->cache->clear(); + } + + /** + * @param string $file + * + * @return int, Cache::NOT_FOUND, Cache::PARTIAL, Cache::SHALLOW or Cache::COMPLETE + */ + public function getStatus($file) { + return $this->cache->getStatus($file); + } + + /** + * search for files matching $pattern + * + * @param string $pattern + * @return array an array of file data + */ + public function search($pattern) { + $results = $this->cache->search($pattern); + return array_map(array($this, 'formatCacheEntry'), $results); + } + + /** + * search for files by mimetype + * + * @param string $mimetype + * @return array + */ + public function searchByMime($mimetype) { + $results = $this->cache->searchByMime($mimetype); + return array_map(array($this, 'formatCacheEntry'), $results); + } + + /** + * update the folder size and the size of all parent folders + * + * @param string|boolean $path + * @param array $data (optional) meta data of the folder + */ + public function correctFolderSize($path, $data = null) { + $this->cache->correctFolderSize($path, $data); + } + + /** + * get the size of a folder and set it in the cache + * + * @param string $path + * @param array $entry (optional) meta data of the folder + * @return int + */ + public function calculateFolderSize($path, $entry = null) { + return $this->cache->calculateFolderSize($path, $entry); + } + + /** + * get all file ids on the files on the storage + * + * @return int[] + */ + public function getAll() { + return $this->cache->getAll(); + } + + /** + * find a folder in the cache which has not been fully scanned + * + * If multiple incomplete folders are in the cache, the one with the highest id will be returned, + * use the one with the highest id gives the best result with the background scanner, since that is most + * likely the folder where we stopped scanning previously + * + * @return string|bool the path of the folder or false when no folder matched + */ + public function getIncomplete() { + return $this->cache->getIncomplete(); + } + + /** + * get the path of a file on this storage by it's id + * + * @param int $id + * @return string|null + */ + public function getPathById($id) { + return $this->cache->getPathById($id); + } + + /** + * get the storage id of the storage for a file and the internal path of the file + * unlike getPathById this does not limit the search to files on this storage and + * instead does a global search in the cache table + * + * @param int $id + * @return array, first element holding the storage id, second the path + */ + static public function getById($id) { + return parent::getById($id); + } +} diff --git a/lib/private/files/fileinfo.php b/lib/private/files/fileinfo.php index d6d6a245e44..8bab51f0737 100644 --- a/lib/private/files/fileinfo.php +++ b/lib/private/files/fileinfo.php @@ -173,14 +173,14 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess { * @return bool */ public function isReadable() { - return $this->checkPermissions(\OCP\PERMISSION_READ); + return $this->checkPermissions(\OCP\Constants::PERMISSION_READ); } /** * @return bool */ public function isUpdateable() { - return $this->checkPermissions(\OCP\PERMISSION_UPDATE); + return $this->checkPermissions(\OCP\Constants::PERMISSION_UPDATE); } /** @@ -189,21 +189,21 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess { * @return bool */ public function isCreatable() { - return $this->checkPermissions(\OCP\PERMISSION_CREATE); + return $this->checkPermissions(\OCP\Constants::PERMISSION_CREATE); } /** * @return bool */ public function isDeletable() { - return $this->checkPermissions(\OCP\PERMISSION_DELETE); + return $this->checkPermissions(\OCP\Constants::PERMISSION_DELETE); } /** * @return bool */ public function isShareable() { - return $this->checkPermissions(\OCP\PERMISSION_SHARE); + return $this->checkPermissions(\OCP\Constants::PERMISSION_SHARE); } /** diff --git a/lib/private/files/node/file.php b/lib/private/files/node/file.php index 75d5e0166b6..1c47294cdae 100644 --- a/lib/private/files/node/file.php +++ b/lib/private/files/node/file.php @@ -16,7 +16,7 @@ class File extends Node implements \OCP\Files\File { * @throws \OCP\Files\NotPermittedException */ public function getContent() { - if ($this->checkPermissions(\OCP\PERMISSION_READ)) { + if ($this->checkPermissions(\OCP\Constants::PERMISSION_READ)) { /** * @var \OC\Files\Storage\Storage $storage; */ @@ -31,9 +31,10 @@ class File extends Node implements \OCP\Files\File { * @throws \OCP\Files\NotPermittedException */ public function putContent($data) { - if ($this->checkPermissions(\OCP\PERMISSION_UPDATE)) { + if ($this->checkPermissions(\OCP\Constants::PERMISSION_UPDATE)) { $this->sendHooks(array('preWrite')); $this->view->file_put_contents($this->path, $data); + $this->fileInfo = null; $this->sendHooks(array('postWrite')); } else { throw new NotPermittedException(); @@ -41,13 +42,6 @@ class File extends Node implements \OCP\Files\File { } /** - * @return string - */ - public function getMimeType() { - return $this->view->getMimeType($this->path); - } - - /** * @param string $mode * @return resource * @throws \OCP\Files\NotPermittedException @@ -55,7 +49,7 @@ class File extends Node implements \OCP\Files\File { public function fopen($mode) { $preHooks = array(); $postHooks = array(); - $requiredPermissions = \OCP\PERMISSION_READ; + $requiredPermissions = \OCP\Constants::PERMISSION_READ; switch ($mode) { case 'r+': case 'rb+': @@ -73,7 +67,7 @@ class File extends Node implements \OCP\Files\File { case 'ab': $preHooks[] = 'preWrite'; $postHooks[] = 'postWrite'; - $requiredPermissions |= \OCP\PERMISSION_UPDATE; + $requiredPermissions |= \OCP\Constants::PERMISSION_UPDATE; break; } @@ -88,12 +82,13 @@ class File extends Node implements \OCP\Files\File { } public function delete() { - if ($this->checkPermissions(\OCP\PERMISSION_DELETE)) { + if ($this->checkPermissions(\OCP\Constants::PERMISSION_DELETE)) { $this->sendHooks(array('preDelete')); $this->view->unlink($this->path); $nonExisting = new NonExistingFile($this->root, $this->view, $this->path); $this->root->emit('\OC\Files', 'postDelete', array($nonExisting)); $this->exists = false; + $this->fileInfo = null; } else { throw new NotPermittedException(); } @@ -138,6 +133,7 @@ class File extends Node implements \OCP\Files\File { $this->root->emit('\OC\Files', 'postRename', array($this, $targetNode)); $this->root->emit('\OC\Files', 'postWrite', array($targetNode)); $this->path = $targetPath; + $this->fileInfo = null; return $targetNode; } else { throw new NotPermittedException(); diff --git a/lib/private/files/node/folder.php b/lib/private/files/node/folder.php index 8c7acc339ae..54a699be532 100644 --- a/lib/private/files/node/folder.php +++ b/lib/private/files/node/folder.php @@ -180,7 +180,7 @@ class Folder extends Node implements \OCP\Files\Folder { * @throws \OCP\Files\NotPermittedException */ public function newFolder($path) { - if ($this->checkPermissions(\OCP\PERMISSION_CREATE)) { + if ($this->checkPermissions(\OCP\Constants::PERMISSION_CREATE)) { $fullPath = $this->getFullPath($path); $nonExisting = new NonExistingFolder($this->root, $this->view, $fullPath); $this->root->emit('\OC\Files', 'preWrite', array($nonExisting)); @@ -201,7 +201,7 @@ class Folder extends Node implements \OCP\Files\Folder { * @throws \OCP\Files\NotPermittedException */ public function newFile($path) { - if ($this->checkPermissions(\OCP\PERMISSION_CREATE)) { + if ($this->checkPermissions(\OCP\Constants::PERMISSION_CREATE)) { $fullPath = $this->getFullPath($path); $nonExisting = new NonExistingFile($this->root, $this->view, $fullPath); $this->root->emit('\OC\Files', 'preWrite', array($nonExisting)); @@ -321,15 +321,8 @@ class Folder extends Node implements \OCP\Files\Folder { return $this->view->free_space($this->path); } - /** - * @return bool - */ - public function isCreatable() { - return $this->checkPermissions(\OCP\PERMISSION_CREATE); - } - public function delete() { - if ($this->checkPermissions(\OCP\PERMISSION_DELETE)) { + if ($this->checkPermissions(\OCP\Constants::PERMISSION_DELETE)) { $this->sendHooks(array('preDelete')); $this->view->rmdir($this->path); $nonExisting = new NonExistingFolder($this->root, $this->view, $this->path); diff --git a/lib/private/files/node/node.php b/lib/private/files/node/node.php index bc075911749..b80db28e8ec 100644 --- a/lib/private/files/node/node.php +++ b/lib/private/files/node/node.php @@ -8,10 +8,10 @@ namespace OC\Files\Node; -use OCP\Files\NotFoundException; +use OCP\Files\FileInfo; use OCP\Files\NotPermittedException; -class Node implements \OCP\Files\Node { +class Node implements \OCP\Files\Node, FileInfo { /** * @var \OC\Files\View $view */ @@ -28,6 +28,11 @@ class Node implements \OCP\Files\Node { protected $path; /** + * @var \OCP\Files\FileInfo + */ + protected $fileInfo; + + /** * @param \OC\Files\View $view * @param \OC\Files\Node\Root $root * @param string $path @@ -38,6 +43,13 @@ class Node implements \OCP\Files\Node { $this->path = $path; } + private function getFileInfo() { + if (!$this->fileInfo) { + $this->fileInfo = $this->view->getFileInfo($this->path); + } + return $this->fileInfo; + } + /** * @param string[] $hooks */ @@ -81,10 +93,16 @@ class Node implements \OCP\Files\Node { * @throws \OCP\Files\NotPermittedException */ public function touch($mtime = null) { - if ($this->checkPermissions(\OCP\PERMISSION_UPDATE)) { + if ($this->checkPermissions(\OCP\Constants::PERMISSION_UPDATE)) { $this->sendHooks(array('preTouch')); $this->view->touch($this->path, $mtime); $this->sendHooks(array('postTouch')); + if ($this->fileInfo) { + if (is_null($mtime)) { + $mtime = time(); + } + $this->fileInfo['mtime'] = $mtime; + } } else { throw new NotPermittedException(); } @@ -118,8 +136,7 @@ class Node implements \OCP\Files\Node { * @return int */ public function getId() { - $info = $this->view->getFileInfo($this->path); - return $info['fileid']; + return $this->getFileInfo()->getId(); } /** @@ -133,58 +150,60 @@ class Node implements \OCP\Files\Node { * @return int */ public function getMTime() { - return $this->view->filemtime($this->path); + return $this->getFileInfo()->getMTime(); } /** * @return int */ public function getSize() { - return $this->view->filesize($this->path); + return $this->getFileInfo()->getSize(); } /** * @return string */ public function getEtag() { - $info = $this->view->getFileInfo($this->path); - return $info['etag']; + return $this->getFileInfo()->getEtag(); } /** * @return int */ public function getPermissions() { - $info = $this->view->getFileInfo($this->path); - return $info['permissions']; + return $this->getFileInfo()->getPermissions(); } /** * @return bool */ public function isReadable() { - return $this->checkPermissions(\OCP\PERMISSION_READ); + return $this->getFileInfo()->isReadable(); } /** * @return bool */ public function isUpdateable() { - return $this->checkPermissions(\OCP\PERMISSION_UPDATE); + return $this->getFileInfo()->isUpdateable(); } /** * @return bool */ public function isDeletable() { - return $this->checkPermissions(\OCP\PERMISSION_DELETE); + return $this->getFileInfo()->isDeletable(); } /** * @return bool */ public function isShareable() { - return $this->checkPermissions(\OCP\PERMISSION_SHARE); + return $this->getFileInfo()->isShareable(); + } + + public function isCreatable() { + return $this->getFileInfo()->isCreatable(); } /** @@ -240,4 +259,28 @@ class Node implements \OCP\Files\Node { } return true; } + + public function isMounted() { + return $this->getFileInfo()->isMounted(); + } + + public function isShared() { + return $this->getFileInfo()->isShared(); + } + + public function getMimeType() { + return $this->getFileInfo()->getMimetype(); + } + + public function getMimePart() { + return $this->getFileInfo()->getMimePart(); + } + + public function getType() { + return $this->getFileInfo()->getType(); + } + + public function isEncrypted() { + return $this->getFileInfo()->isEncrypted(); + } } diff --git a/lib/private/files/node/root.php b/lib/private/files/node/root.php index 18e7a6b681a..1e8387dc5cb 100644 --- a/lib/private/files/node/root.php +++ b/lib/private/files/node/root.php @@ -262,7 +262,7 @@ class Root extends Folder implements Emitter { * @return int */ public function getPermissions() { - return \OCP\PERMISSION_CREATE; + return \OCP\Constants::PERMISSION_CREATE; } /** diff --git a/lib/private/files/objectstore/objectstorestorage.php b/lib/private/files/objectstore/objectstorestorage.php index ae8bff52896..b0095ad94bb 100644 --- a/lib/private/files/objectstore/objectstorestorage.php +++ b/lib/private/files/objectstore/objectstorestorage.php @@ -72,7 +72,7 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common { 'size' => 0, 'mtime' => $mTime, 'storage_mtime' => $mTime, - 'permissions' => \OCP\PERMISSION_ALL, + 'permissions' => \OCP\Constants::PERMISSION_ALL, ); if ($dirName === '' && !$parentExists) { @@ -332,7 +332,7 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common { 'size' => 0, 'mtime' => $mtime, 'storage_mtime' => $mtime, - 'permissions' => \OCP\PERMISSION_ALL, + 'permissions' => \OCP\Constants::PERMISSION_ALL, ); $fileId = $this->getCache()->put($path, $stat); try { @@ -357,7 +357,7 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common { if (empty($stat)) { // create new file $stat = array( - 'permissions' => \OCP\PERMISSION_ALL, + 'permissions' => \OCP\Constants::PERMISSION_ALL, ); } // update stat with new data diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php index 518d3ec400c..d76c6aa031b 100644 --- a/lib/private/files/storage/common.php +++ b/lib/private/files/storage/common.php @@ -113,19 +113,19 @@ abstract class Common implements \OC\Files\Storage\Storage { public function getPermissions($path) { $permissions = 0; if ($this->isCreatable($path)) { - $permissions |= \OCP\PERMISSION_CREATE; + $permissions |= \OCP\Constants::PERMISSION_CREATE; } if ($this->isReadable($path)) { - $permissions |= \OCP\PERMISSION_READ; + $permissions |= \OCP\Constants::PERMISSION_READ; } if ($this->isUpdatable($path)) { - $permissions |= \OCP\PERMISSION_UPDATE; + $permissions |= \OCP\Constants::PERMISSION_UPDATE; } if ($this->isDeletable($path)) { - $permissions |= \OCP\PERMISSION_DELETE; + $permissions |= \OCP\Constants::PERMISSION_DELETE; } if ($this->isSharable($path)) { - $permissions |= \OCP\PERMISSION_SHARE; + $permissions |= \OCP\Constants::PERMISSION_SHARE; } return $permissions; } diff --git a/lib/private/files/storage/dav.php b/lib/private/files/storage/dav.php index 26fa69408a8..a2832bce009 100644 --- a/lib/private/files/storage/dav.php +++ b/lib/private/files/storage/dav.php @@ -416,19 +416,19 @@ class DAV extends \OC\Files\Storage\Common { } public function isUpdatable($path) { - return (bool)($this->getPermissions($path) & \OCP\PERMISSION_UPDATE); + return (bool)($this->getPermissions($path) & \OCP\Constants::PERMISSION_UPDATE); } public function isCreatable($path) { - return (bool)($this->getPermissions($path) & \OCP\PERMISSION_CREATE); + return (bool)($this->getPermissions($path) & \OCP\Constants::PERMISSION_CREATE); } public function isSharable($path) { - return (bool)($this->getPermissions($path) & \OCP\PERMISSION_SHARE); + return (bool)($this->getPermissions($path) & \OCP\Constants::PERMISSION_SHARE); } public function isDeletable($path) { - return (bool)($this->getPermissions($path) & \OCP\PERMISSION_DELETE); + return (bool)($this->getPermissions($path) & \OCP\Constants::PERMISSION_DELETE); } public function getPermissions($path) { @@ -438,9 +438,9 @@ class DAV extends \OC\Files\Storage\Common { if (isset($response['{http://owncloud.org/ns}permissions'])) { return $this->parsePermissions($response['{http://owncloud.org/ns}permissions']); } else if ($this->is_dir($path)) { - return \OCP\PERMISSION_ALL; + return \OCP\Constants::PERMISSION_ALL; } else if ($this->file_exists($path)) { - return \OCP\PERMISSION_ALL - \OCP\PERMISSION_CREATE; + return \OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_CREATE; } else { return 0; } @@ -451,19 +451,19 @@ class DAV extends \OC\Files\Storage\Common { * @return int */ protected function parsePermissions($permissionsString) { - $permissions = \OCP\PERMISSION_READ; + $permissions = \OCP\Constants::PERMISSION_READ; if (strpos($permissionsString, 'R') !== false) { - $permissions |= \OCP\PERMISSION_SHARE; + $permissions |= \OCP\Constants::PERMISSION_SHARE; } if (strpos($permissionsString, 'D') !== false) { - $permissions |= \OCP\PERMISSION_DELETE; + $permissions |= \OCP\Constants::PERMISSION_DELETE; } if (strpos($permissionsString, 'W') !== false) { - $permissions |= \OCP\PERMISSION_UPDATE; + $permissions |= \OCP\Constants::PERMISSION_UPDATE; } if (strpos($permissionsString, 'CK') !== false) { - $permissions |= \OCP\PERMISSION_CREATE; - $permissions |= \OCP\PERMISSION_UPDATE; + $permissions |= \OCP\Constants::PERMISSION_CREATE; + $permissions |= \OCP\Constants::PERMISSION_UPDATE; } return $permissions; } diff --git a/lib/private/files/storage/local.php b/lib/private/files/storage/local.php index 1c5fafc12fa..e8be7daba7e 100644 --- a/lib/private/files/storage/local.php +++ b/lib/private/files/storage/local.php @@ -35,7 +35,7 @@ if (\OC_Util::runningOnWindows()) { } public function mkdir($path) { - return @mkdir($this->datadir . $path, 0777, true); + return @mkdir($this->getSourcePath($path), 0777, true); } public function rmdir($path) { @@ -44,7 +44,7 @@ if (\OC_Util::runningOnWindows()) { } try { $it = new \RecursiveIteratorIterator( - new \RecursiveDirectoryIterator($this->datadir . $path), + new \RecursiveDirectoryIterator($this->getSourcePath($path)), \RecursiveIteratorIterator::CHILD_FIRST ); /** @@ -68,30 +68,30 @@ if (\OC_Util::runningOnWindows()) { } $it->next(); } - return rmdir($this->datadir . $path); + return rmdir($this->getSourcePath($path)); } catch (\UnexpectedValueException $e) { return false; } } public function opendir($path) { - return opendir($this->datadir . $path); + return opendir($this->getSourcePath($path)); } public function is_dir($path) { if (substr($path, -1) == '/') { $path = substr($path, 0, -1); } - return is_dir($this->datadir . $path); + return is_dir($this->getSourcePath($path)); } public function is_file($path) { - return is_file($this->datadir . $path); + return is_file($this->getSourcePath($path)); } public function stat($path) { clearstatcache(); - $fullPath = $this->datadir . $path; + $fullPath = $this->getSourcePath($path); $statResult = stat($fullPath); if (PHP_INT_SIZE === 4 && !$this->is_dir($path)) { $filesize = $this->filesize($path); @@ -102,9 +102,9 @@ if (\OC_Util::runningOnWindows()) { } public function filetype($path) { - $filetype = filetype($this->datadir . $path); + $filetype = filetype($this->getSourcePath($path)); if ($filetype == 'link') { - $filetype = filetype(realpath($this->datadir . $path)); + $filetype = filetype(realpath($this->getSourcePath($path))); } return $filetype; } @@ -113,7 +113,7 @@ if (\OC_Util::runningOnWindows()) { if ($this->is_dir($path)) { return 0; } - $fullPath = $this->datadir . $path; + $fullPath = $this->getSourcePath($path); if (PHP_INT_SIZE === 4) { $helper = new \OC\LargeFileHelper; return $helper->getFilesize($fullPath); @@ -122,19 +122,20 @@ if (\OC_Util::runningOnWindows()) { } public function isReadable($path) { - return is_readable($this->datadir . $path); + return is_readable($this->getSourcePath($path)); } public function isUpdatable($path) { - return is_writable($this->datadir . $path); + return is_writable($this->getSourcePath($path)); } public function file_exists($path) { - return file_exists($this->datadir . $path); + return file_exists($this->getSourcePath($path)); } public function filemtime($path) { - return filemtime($this->datadir . $path); + clearstatcache($this->getSourcePath($path)); + return filemtime($this->getSourcePath($path)); } public function touch($path, $mtime = null) { @@ -145,30 +146,30 @@ if (\OC_Util::runningOnWindows()) { return false; } if (!is_null($mtime)) { - $result = touch($this->datadir . $path, $mtime); + $result = touch($this->getSourcePath($path), $mtime); } else { - $result = touch($this->datadir . $path); + $result = touch($this->getSourcePath($path)); } if ($result) { - clearstatcache(true, $this->datadir . $path); + clearstatcache(true, $this->getSourcePath($path)); } return $result; } public function file_get_contents($path) { - return file_get_contents($this->datadir . $path); + return file_get_contents($this->getSourcePath($path)); } - public function file_put_contents($path, $data) { //trigger_error("$path = ".var_export($path, 1)); - return file_put_contents($this->datadir . $path, $data); + public function file_put_contents($path, $data) { + return file_put_contents($this->getSourcePath($path), $data); } public function unlink($path) { if ($this->is_dir($path)) { return $this->rmdir($path); } else if ($this->is_file($path)) { - return unlink($this->datadir . $path); + return unlink($this->getSourcePath($path)); } else { return false; } @@ -200,27 +201,27 @@ if (\OC_Util::runningOnWindows()) { $this->unlink($path2); } - return rename($this->datadir . $path1, $this->datadir . $path2); + return rename($this->getSourcePath($path1), $this->getSourcePath($path2)); } public function copy($path1, $path2) { if ($this->is_dir($path1)) { return parent::copy($path1, $path2); } else { - return copy($this->datadir . $path1, $this->datadir . $path2); + return copy($this->getSourcePath($path1), $this->getSourcePath($path2)); } } public function fopen($path, $mode) { - return fopen($this->datadir . $path, $mode); + return fopen($this->getSourcePath($path), $mode); } public function hash($type, $path, $raw = false) { - return hash_file($type, $this->datadir . $path, $raw); + return hash_file($type, $this->getSourcePath($path), $raw); } public function free_space($path) { - $space = @disk_free_space($this->datadir . $path); + $space = @disk_free_space($this->getSourcePath($path)); if ($space === false || is_null($space)) { return \OCP\Files\FileInfo::SPACE_UNKNOWN; } @@ -232,11 +233,11 @@ if (\OC_Util::runningOnWindows()) { } public function getLocalFile($path) { - return $this->datadir . $path; + return $this->getSourcePath($path); } public function getLocalFolder($path) { - return $this->datadir . $path; + return $this->getSourcePath($path); } /** @@ -244,12 +245,16 @@ if (\OC_Util::runningOnWindows()) { */ protected function searchInDir($query, $dir = '') { $files = array(); - foreach (scandir($this->datadir . $dir) as $item) { - if ($item == '.' || $item == '..') continue; + $physicalDir = $this->getSourcePath($dir); + foreach (scandir($physicalDir) as $item) { + if ($item == '.' || $item == '..') + continue; + $physicalItem = $physicalDir . '/' . $item; + if (strstr(strtolower($item), strtolower($query)) !== false) { $files[] = $dir . '/' . $item; } - if (is_dir($this->datadir . $dir . '/' . $item)) { + if (is_dir($physicalItem)) { $files = array_merge($files, $this->searchInDir($query, $dir . '/' . $item)); } } @@ -272,6 +277,17 @@ if (\OC_Util::runningOnWindows()) { } /** + * Get the source path (on disk) of a given path + * + * @param string $path + * @return string + */ + protected function getSourcePath($path) { + $fullPath = $this->datadir . $path; + return $fullPath; + } + + /** * {@inheritdoc} */ public function isLocal() { diff --git a/lib/private/files/storage/mappedlocal.php b/lib/private/files/storage/mappedlocal.php index c232c0298b1..8f813f973b9 100644 --- a/lib/private/files/storage/mappedlocal.php +++ b/lib/private/files/storage/mappedlocal.php @@ -31,7 +31,7 @@ class MappedLocal extends \OC\Files\Storage\Common { } public function mkdir($path) { - return @mkdir($this->buildPath($path), 0777, true); + return @mkdir($this->getSourcePath($path), 0777, true); } public function rmdir($path) { @@ -40,7 +40,7 @@ class MappedLocal extends \OC\Files\Storage\Common { } try { $it = new \RecursiveIteratorIterator( - new \RecursiveDirectoryIterator($this->buildPath($path)), + new \RecursiveDirectoryIterator($this->getSourcePath($path)), \RecursiveIteratorIterator::CHILD_FIRST ); /** @@ -64,7 +64,7 @@ class MappedLocal extends \OC\Files\Storage\Common { } $it->next(); } - if ($result = @rmdir($this->buildPath($path))) { + if ($result = @rmdir($this->getSourcePath($path))) { $this->cleanMapper($path); } return $result; @@ -75,7 +75,7 @@ class MappedLocal extends \OC\Files\Storage\Common { public function opendir($path) { $files = array('.', '..'); - $physicalPath = $this->buildPath($path); + $physicalPath = $this->getSourcePath($path); $logicalPath = $this->mapper->physicalToLogic($physicalPath); $dh = opendir($physicalPath); @@ -101,15 +101,16 @@ class MappedLocal extends \OC\Files\Storage\Common { if (substr($path, -1) == '/') { $path = substr($path, 0, -1); } - return is_dir($this->buildPath($path)); + return is_dir($this->getSourcePath($path)); } public function is_file($path) { - return is_file($this->buildPath($path)); + return is_file($this->getSourcePath($path)); } public function stat($path) { - $fullPath = $this->buildPath($path); + clearstatcache(); + $fullPath = $this->getSourcePath($path); $statResult = stat($fullPath); if (PHP_INT_SIZE === 4 && !$this->is_dir($path)) { $filesize = $this->filesize($path); @@ -120,9 +121,9 @@ class MappedLocal extends \OC\Files\Storage\Common { } public function filetype($path) { - $filetype = filetype($this->buildPath($path)); + $filetype = filetype($this->getSourcePath($path)); if ($filetype == 'link') { - $filetype = filetype(realpath($this->buildPath($path))); + $filetype = filetype(realpath($this->getSourcePath($path))); } return $filetype; } @@ -131,7 +132,7 @@ class MappedLocal extends \OC\Files\Storage\Common { if ($this->is_dir($path)) { return 0; } - $fullPath = $this->buildPath($path); + $fullPath = $this->getSourcePath($path); if (PHP_INT_SIZE === 4) { $helper = new \OC\LargeFileHelper; return $helper->getFilesize($fullPath); @@ -140,43 +141,47 @@ class MappedLocal extends \OC\Files\Storage\Common { } public function isReadable($path) { - return is_readable($this->buildPath($path)); + return is_readable($this->getSourcePath($path)); } public function isUpdatable($path) { - return is_writable($this->buildPath($path)); + return is_writable($this->getSourcePath($path)); } public function file_exists($path) { - return file_exists($this->buildPath($path)); + return file_exists($this->getSourcePath($path)); } public function filemtime($path) { - return filemtime($this->buildPath($path)); + clearstatcache($this->getSourcePath($path)); + return filemtime($this->getSourcePath($path)); } public function touch($path, $mtime = null) { // sets the modification time of the file to the given value. // If mtime is nil the current time is set. // note that the access time of the file always changes to the current time. + if ($this->file_exists($path) and !$this->isUpdatable($path)) { + return false; + } if (!is_null($mtime)) { - $result = touch($this->buildPath($path), $mtime); + $result = touch($this->getSourcePath($path), $mtime); } else { - $result = touch($this->buildPath($path)); + $result = touch($this->getSourcePath($path)); } if ($result) { - clearstatcache(true, $this->buildPath($path)); + clearstatcache(true, $this->getSourcePath($path)); } return $result; } public function file_get_contents($path) { - return file_get_contents($this->buildPath($path)); + return file_get_contents($this->getSourcePath($path)); } public function file_put_contents($path, $data) { - return file_put_contents($this->buildPath($path), $data); + return file_put_contents($this->getSourcePath($path), $data); } public function unlink($path) { @@ -208,8 +213,8 @@ class MappedLocal extends \OC\Files\Storage\Common { $this->unlink($path2); } - $physicPath1 = $this->buildPath($path1); - $physicPath2 = $this->buildPath($path2); + $physicPath1 = $this->getSourcePath($path1); + $physicPath2 = $this->getSourcePath($path2); if ($return = rename($physicPath1, $physicPath2)) { // mapper needs to create copies or all children $this->copyMapping($path1, $path2); @@ -237,7 +242,7 @@ class MappedLocal extends \OC\Files\Storage\Common { closedir($dir); return true; } else { - if ($return = copy($this->buildPath($path1), $this->buildPath($path2))) { + if ($return = copy($this->getSourcePath($path1), $this->getSourcePath($path2))) { $this->copyMapping($path1, $path2); } return $return; @@ -245,7 +250,7 @@ class MappedLocal extends \OC\Files\Storage\Common { } public function fopen($path, $mode) { - return fopen($this->buildPath($path), $mode); + return fopen($this->getSourcePath($path), $mode); } /** @@ -256,7 +261,7 @@ class MappedLocal extends \OC\Files\Storage\Common { private function delTree($dir, $isLogicPath = true) { $dirRelative = $dir; if ($isLogicPath) { - $dir = $this->buildPath($dir); + $dir = $this->getSourcePath($dir); } if (!file_exists($dir)) { return true; @@ -288,11 +293,15 @@ class MappedLocal extends \OC\Files\Storage\Common { } public function hash($type, $path, $raw = false) { - return hash_file($type, $this->buildPath($path), $raw); + return hash_file($type, $this->getSourcePath($path), $raw); } public function free_space($path) { - return @disk_free_space($this->buildPath($path)); + $space = @disk_free_space($this->getSourcePath($path)); + if ($space === false || is_null($space)) { + return \OCP\Files\FileInfo::SPACE_UNKNOWN; + } + return $space; } public function search($query) { @@ -300,11 +309,11 @@ class MappedLocal extends \OC\Files\Storage\Common { } public function getLocalFile($path) { - return $this->buildPath($path); + return $this->getSourcePath($path); } public function getLocalFolder($path) { - return $this->buildPath($path); + return $this->getSourcePath($path); } /** @@ -312,7 +321,7 @@ class MappedLocal extends \OC\Files\Storage\Common { */ protected function searchInDir($query, $dir = '') { $files = array(); - $physicalDir = $this->buildPath($dir); + $physicalDir = $this->getSourcePath($dir); foreach (scandir($physicalDir) as $item) { if ($item == '.' || $item == '..') continue; @@ -337,18 +346,30 @@ class MappedLocal extends \OC\Files\Storage\Common { * @return bool */ public function hasUpdated($path, $time) { - return $this->filemtime($path) > $time; + if ($this->file_exists($path)) { + return $this->filemtime($path) > $time; + } else { + return true; + } } /** + * Get the source path (on disk) of a given path + * * @param string $path - * @param bool $create * @return string */ - private function buildPath($path, $create = true) { + protected function getSourcePath($path) { $path = $this->stripLeading($path); $fullPath = $this->datadir . $path; - return $this->mapper->logicToPhysical($fullPath, $create); + return $this->mapper->logicToPhysical($fullPath, true); + } + + /** + * {@inheritdoc} + */ + public function isLocal() { + return true; } /** diff --git a/lib/private/files/storage/wrapper/jail.php b/lib/private/files/storage/wrapper/jail.php new file mode 100644 index 00000000000..22b96765757 --- /dev/null +++ b/lib/private/files/storage/wrapper/jail.php @@ -0,0 +1,413 @@ +<?php +/** + * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OC\Files\Storage\Wrapper; + +use OC\Files\Cache\Wrapper\CacheJail; + +/** + * Jail to a subdirectory of the wrapped storage + * + * This restricts access to a subfolder of the wrapped storage with the subfolder becoming the root folder new storage + */ +class Jail extends Wrapper { + /** + * @var string + */ + protected $rootPath; + + /** + * @param array $arguments ['storage' => $storage, 'mask' => $root] + * + * $storage: The storage that will be wrapper + * $root: The folder in the wrapped storage that will become the root folder of the wrapped storage + */ + public function __construct($arguments) { + parent::__construct($arguments); + $this->rootPath = $arguments['root']; + } + + protected function getSourcePath($path) { + if ($path === '') { + return $this->rootPath; + } else { + return $this->rootPath . '/' . $path; + } + } + + public function getId() { + return 'link:' . parent::getId() . ':' . $this->rootPath; + } + + /** + * see http://php.net/manual/en/function.mkdir.php + * + * @param string $path + * @return bool + */ + public function mkdir($path) { + return $this->storage->mkdir($this->getSourcePath($path)); + } + + /** + * see http://php.net/manual/en/function.rmdir.php + * + * @param string $path + * @return bool + */ + public function rmdir($path) { + return $this->storage->rmdir($this->getSourcePath($path)); + } + + /** + * see http://php.net/manual/en/function.opendir.php + * + * @param string $path + * @return resource + */ + public function opendir($path) { + return $this->storage->opendir($this->getSourcePath($path)); + } + + /** + * see http://php.net/manual/en/function.is_dir.php + * + * @param string $path + * @return bool + */ + public function is_dir($path) { + return $this->storage->is_dir($this->getSourcePath($path)); + } + + /** + * see http://php.net/manual/en/function.is_file.php + * + * @param string $path + * @return bool + */ + public function is_file($path) { + return $this->storage->is_file($this->getSourcePath($path)); + } + + /** + * see http://php.net/manual/en/function.stat.php + * only the following keys are required in the result: size and mtime + * + * @param string $path + * @return array + */ + public function stat($path) { + return $this->storage->stat($this->getSourcePath($path)); + } + + /** + * see http://php.net/manual/en/function.filetype.php + * + * @param string $path + * @return bool + */ + public function filetype($path) { + return $this->storage->filetype($this->getSourcePath($path)); + } + + /** + * see http://php.net/manual/en/function.filesize.php + * The result for filesize when called on a folder is required to be 0 + * + * @param string $path + * @return int + */ + public function filesize($path) { + return $this->storage->filesize($this->getSourcePath($path)); + } + + /** + * check if a file can be created in $path + * + * @param string $path + * @return bool + */ + public function isCreatable($path) { + return $this->storage->isCreatable($this->getSourcePath($path)); + } + + /** + * check if a file can be read + * + * @param string $path + * @return bool + */ + public function isReadable($path) { + return $this->storage->isReadable($this->getSourcePath($path)); + } + + /** + * check if a file can be written to + * + * @param string $path + * @return bool + */ + public function isUpdatable($path) { + return $this->storage->isUpdatable($this->getSourcePath($path)); + } + + /** + * check if a file can be deleted + * + * @param string $path + * @return bool + */ + public function isDeletable($path) { + return $this->storage->isDeletable($this->getSourcePath($path)); + } + + /** + * check if a file can be shared + * + * @param string $path + * @return bool + */ + public function isSharable($path) { + return $this->storage->isSharable($this->getSourcePath($path)); + } + + /** + * get the full permissions of a path. + * Should return a combination of the PERMISSION_ constants defined in lib/public/constants.php + * + * @param string $path + * @return int + */ + public function getPermissions($path) { + return $this->storage->getPermissions($this->getSourcePath($path)); + } + + /** + * see http://php.net/manual/en/function.file_exists.php + * + * @param string $path + * @return bool + */ + public function file_exists($path) { + return $this->storage->file_exists($this->getSourcePath($path)); + } + + /** + * see http://php.net/manual/en/function.filemtime.php + * + * @param string $path + * @return int + */ + public function filemtime($path) { + return $this->storage->filemtime($this->getSourcePath($path)); + } + + /** + * see http://php.net/manual/en/function.file_get_contents.php + * + * @param string $path + * @return string + */ + public function file_get_contents($path) { + return $this->storage->file_get_contents($this->getSourcePath($path)); + } + + /** + * see http://php.net/manual/en/function.file_put_contents.php + * + * @param string $path + * @param string $data + * @return bool + */ + public function file_put_contents($path, $data) { + return $this->storage->file_put_contents($this->getSourcePath($path), $data); + } + + /** + * see http://php.net/manual/en/function.unlink.php + * + * @param string $path + * @return bool + */ + public function unlink($path) { + return $this->storage->unlink($this->getSourcePath($path)); + } + + /** + * see http://php.net/manual/en/function.rename.php + * + * @param string $path1 + * @param string $path2 + * @return bool + */ + public function rename($path1, $path2) { + return $this->storage->rename($this->getSourcePath($path1), $this->getSourcePath($path2)); + } + + /** + * see http://php.net/manual/en/function.copy.php + * + * @param string $path1 + * @param string $path2 + * @return bool + */ + public function copy($path1, $path2) { + return $this->storage->copy($this->getSourcePath($path1), $this->getSourcePath($path2)); + } + + /** + * see http://php.net/manual/en/function.fopen.php + * + * @param string $path + * @param string $mode + * @return resource + */ + public function fopen($path, $mode) { + return $this->storage->fopen($this->getSourcePath($path), $mode); + } + + /** + * get the mimetype for a file or folder + * The mimetype for a folder is required to be "httpd/unix-directory" + * + * @param string $path + * @return string + */ + public function getMimeType($path) { + return $this->storage->getMimeType($this->getSourcePath($path)); + } + + /** + * see http://php.net/manual/en/function.hash.php + * + * @param string $type + * @param string $path + * @param bool $raw + * @return string + */ + public function hash($type, $path, $raw = false) { + return $this->storage->hash($type, $this->getSourcePath($path), $raw); + } + + /** + * see http://php.net/manual/en/function.free_space.php + * + * @param string $path + * @return int + */ + public function free_space($path) { + return $this->storage->free_space($this->getSourcePath($path)); + } + + /** + * search for occurrences of $query in file names + * + * @param string $query + * @return array + */ + public function search($query) { + return $this->storage->search($query); + } + + /** + * see http://php.net/manual/en/function.touch.php + * If the backend does not support the operation, false should be returned + * + * @param string $path + * @param int $mtime + * @return bool + */ + public function touch($path, $mtime = null) { + return $this->storage->touch($this->getSourcePath($path), $mtime); + } + + /** + * get the path to a local version of the file. + * The local version of the file can be temporary and doesn't have to be persistent across requests + * + * @param string $path + * @return string + */ + public function getLocalFile($path) { + return $this->storage->getLocalFile($this->getSourcePath($path)); + } + + /** + * get the path to a local version of the folder. + * The local version of the folder can be temporary and doesn't have to be persistent across requests + * + * @param string $path + * @return string + */ + public function getLocalFolder($path) { + return $this->storage->getLocalFolder($this->getSourcePath($path)); + } + + /** + * check if a file or folder has been updated since $time + * + * @param string $path + * @param int $time + * @return bool + * + * hasUpdated for folders should return at least true if a file inside the folder is add, removed or renamed. + * returning true for other changes in the folder is optional + */ + public function hasUpdated($path, $time) { + return $this->storage->hasUpdated($this->getSourcePath($path), $time); + } + + /** + * get a cache instance for the storage + * + * @param string $path + * @param \OC\Files\Storage\Storage (optional) the storage to pass to the cache + * @return \OC\Files\Cache\Cache + */ + public function getCache($path = '', $storage = null) { + if (!$storage) { + $storage = $this; + } + $sourceCache = $this->storage->getCache($this->getSourcePath($path), $storage); + return new CacheJail($sourceCache, $this->rootPath); + } + + /** + * get the user id of the owner of a file or folder + * + * @param string $path + * @return string + */ + public function getOwner($path) { + return $this->storage->getOwner($this->getSourcePath($path)); + } + + /** + * get a watcher instance for the cache + * + * @param string $path + * @param \OC\Files\Storage\Storage (optional) the storage to pass to the watcher + * @return \OC\Files\Cache\Watcher + */ + public function getWatcher($path = '', $storage = null) { + if (!$storage) { + $storage = $this; + } + return $this->storage->getWatcher($this->getSourcePath($path), $storage); + } + + /** + * get the ETag for a file or folder + * + * @param string $path + * @return string + */ + public function getETag($path) { + return $this->storage->getETag($this->getSourcePath($path)); + } +} diff --git a/lib/private/files/storage/wrapper/permissionsmask.php b/lib/private/files/storage/wrapper/permissionsmask.php new file mode 100644 index 00000000000..955cb54591b --- /dev/null +++ b/lib/private/files/storage/wrapper/permissionsmask.php @@ -0,0 +1,111 @@ +<?php +/** + * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OC\Files\Storage\Wrapper; + +use OC\Files\Cache\Wrapper\CachePermissionsMask; +use OCP\Constants; + +/** + * Mask the permissions of a storage + * + * This can be used to restrict update, create, delete and/or share permissions of a storage + * + * Note that the read permissions cant be masked + */ +class PermissionsMask extends Wrapper { + /** + * @var int the permissions bits we want to keep + */ + private $mask; + + /** + * @param array $arguments ['storage' => $storage, 'mask' => $mask] + * + * $storage: The storage the permissions mask should be applied on + * $mask: The permission bits that should be kept, a combination of the \OCP\Constant::PERMISSION_ constants + */ + public function __construct($arguments) { + parent::__construct($arguments); + $this->mask = $arguments['mask']; + } + + private function checkMask($permissions) { + return ($this->mask & $permissions) === $permissions; + } + + public function isUpdatable($path) { + return $this->checkMask(Constants::PERMISSION_UPDATE) and parent::isUpdatable($path); + } + + public function isCreatable($path) { + return $this->checkMask(Constants::PERMISSION_CREATE) and parent::isCreatable($path); + } + + public function isDeletable($path) { + return $this->checkMask(Constants::PERMISSION_DELETE) and parent::isDeletable($path); + } + + public function getPermissions($path) { + return $this->storage->getPermissions($path) & $this->mask; + } + + public function rename($path1, $path2) { + return $this->checkMask(Constants::PERMISSION_UPDATE) and parent::rename($path1, $path2); + } + + public function copy($path1, $path2) { + return $this->checkMask(Constants::PERMISSION_CREATE) and parent::copy($path1, $path2); + } + + public function touch($path, $mtime = null) { + $permissions = $this->file_exists($path) ? Constants::PERMISSION_UPDATE : Constants::PERMISSION_CREATE; + return $this->checkMask($permissions) and parent::touch($path, $mtime); + } + + public function mkdir($path) { + return $this->checkMask(Constants::PERMISSION_CREATE) and parent::mkdir($path); + } + + public function rmdir($path) { + return $this->checkMask(Constants::PERMISSION_DELETE) and parent::rmdir($path); + } + + public function unlink($path) { + return $this->checkMask(Constants::PERMISSION_DELETE) and parent::unlink($path); + } + + public function file_put_contents($path, $data) { + $permissions = $this->file_exists($path) ? Constants::PERMISSION_UPDATE : Constants::PERMISSION_CREATE; + return $this->checkMask($permissions) and parent::file_put_contents($path, $data); + } + + public function fopen($path, $mode) { + if ($mode === 'r' or $mode === 'rb') { + return parent::fopen($path, $mode); + } else { + $permissions = $this->file_exists($path) ? Constants::PERMISSION_UPDATE : Constants::PERMISSION_CREATE; + return $this->checkMask($permissions) ? parent::fopen($path, $mode) : false; + } + } + + /** + * get a cache instance for the storage + * + * @param string $path + * @param \OC\Files\Storage\Storage (optional) the storage to pass to the cache + * @return \OC\Files\Cache\Cache + */ + public function getCache($path = '', $storage = null) { + if (!$storage) { + $storage = $this; + } + $sourceCache = parent::getCache($path, $storage); + return new CachePermissionsMask($sourceCache, $this->mask); + } +} diff --git a/lib/private/files/view.php b/lib/private/files/view.php index 19676524a0e..331ab9ba6cd 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -933,7 +933,7 @@ class View { } if ($mount instanceof MoveableMount && $internalPath === '') { - $data['permissions'] |= \OCP\PERMISSION_DELETE | \OCP\PERMISSION_UPDATE; + $data['permissions'] |= \OCP\Constants::PERMISSION_DELETE | \OCP\Constants::PERMISSION_UPDATE; } $data = \OC_FileProxy::runPostProxies('getFileInfo', $path, $data); @@ -988,7 +988,7 @@ class View { } // if sharing was disabled for the user we remove the share permissions if (\OCP\Util::isSharingDisabledForUser()) { - $content['permissions'] = $content['permissions'] & ~\OCP\PERMISSION_SHARE; + $content['permissions'] = $content['permissions'] & ~\OCP\Constants::PERMISSION_SHARE; } $files[] = new FileInfo($path . '/' . $content['name'], $storage, $content['path'], $content); } @@ -1025,9 +1025,9 @@ class View { // do not allow renaming/deleting the mount point if they are not shared files/folders // for shared files/folders we use the permissions given by the owner if ($mount instanceof MoveableMount) { - $rootEntry['permissions'] = $permissions | \OCP\PERMISSION_UPDATE | \OCP\PERMISSION_DELETE; + $rootEntry['permissions'] = $permissions | \OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_DELETE; } else { - $rootEntry['permissions'] = $permissions & (\OCP\PERMISSION_ALL - (\OCP\PERMISSION_UPDATE | \OCP\PERMISSION_DELETE)); + $rootEntry['permissions'] = $permissions & (\OCP\Constants::PERMISSION_ALL - (\OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_DELETE)); } //remove any existing entry with the same name @@ -1041,7 +1041,7 @@ class View { // if sharing was disabled for the user we remove the share permissions if (\OCP\Util::isSharingDisabledForUser()) { - $content['permissions'] = $content['permissions'] & ~\OCP\PERMISSION_SHARE; + $content['permissions'] = $content['permissions'] & ~\OCP\Constants::PERMISSION_SHARE; } $files[] = new FileInfo($path . '/' . $rootEntry['name'], $subStorage, '', $rootEntry); diff --git a/lib/private/group/backend.php b/lib/private/group/backend.php index ab694268bb3..9348463a53c 100644 --- a/lib/private/group/backend.php +++ b/lib/private/group/backend.php @@ -23,29 +23,51 @@ /** * error code for functions not provided by the group backend + * @deprecated Use \OC_Group_Backend::NOT_IMPLEMENTED instead */ define('OC_GROUP_BACKEND_NOT_IMPLEMENTED', -501); /** * actions that user backends can define */ +/** @deprecated Use \OC_Group_Backend::CREATE_GROUP instead */ define('OC_GROUP_BACKEND_CREATE_GROUP', 0x00000001); +/** @deprecated Use \OC_Group_Backend::DELETE_GROUP instead */ define('OC_GROUP_BACKEND_DELETE_GROUP', 0x00000010); +/** @deprecated Use \OC_Group_Backend::ADD_TO_GROUP instead */ define('OC_GROUP_BACKEND_ADD_TO_GROUP', 0x00000100); +/** @deprecated Use \OC_Group_Backend::REMOVE_FROM_GOUP instead */ define('OC_GROUP_BACKEND_REMOVE_FROM_GOUP', 0x00001000); +/** @deprecated Obsolete */ define('OC_GROUP_BACKEND_GET_DISPLAYNAME', 0x00010000); //OBSOLETE +/** @deprecated Use \OC_Group_Backend::COUNT_USERS instead */ define('OC_GROUP_BACKEND_COUNT_USERS', 0x00100000); /** * Abstract base class for user management */ abstract class OC_Group_Backend implements OC_Group_Interface { + /** + * error code for functions not provided by the group backend + */ + const NOT_IMPLEMENTED = -501; + + /** + * actions that user backends can define + */ + const CREATE_GROUP = 0x00000001; + const DELETE_GROUP = 0x00000010; + const ADD_TO_GROUP = 0x00000100; + const REMOVE_FROM_GOUP = 0x00001000; + //OBSOLETE const GET_DISPLAYNAME = 0x00010000; + const COUNT_USERS = 0x00100000; + protected $possibleActions = array( - OC_GROUP_BACKEND_CREATE_GROUP => 'createGroup', - OC_GROUP_BACKEND_DELETE_GROUP => 'deleteGroup', - OC_GROUP_BACKEND_ADD_TO_GROUP => 'addToGroup', - OC_GROUP_BACKEND_REMOVE_FROM_GOUP => 'removeFromGroup', - OC_GROUP_BACKEND_COUNT_USERS => 'countUsersInGroup', + self::CREATE_GROUP => 'createGroup', + self::DELETE_GROUP => 'deleteGroup', + self::ADD_TO_GROUP => 'addToGroup', + self::REMOVE_FROM_GOUP => 'removeFromGroup', + self::COUNT_USERS => 'countUsersInGroup', ); /** diff --git a/lib/private/group/database.php b/lib/private/group/database.php index 6bad55c8d5e..2069e99599f 100644 --- a/lib/private/group/database.php +++ b/lib/private/group/database.php @@ -220,7 +220,7 @@ class OC_Group_Database extends OC_Group_Backend { * @param string $gid * @param string $search * @return int|false - * @throws DatabaseException + * @throws \OC\DatabaseException */ public function countUsersInGroup($gid, $search = '') { $stmt = OC_DB::prepare('SELECT COUNT(`uid`) AS `count` FROM `*PREFIX*group_user` WHERE `gid` = ? AND `uid` LIKE ?'); diff --git a/lib/private/group/group.php b/lib/private/group/group.php index 6f8b84dff1a..6111051ea09 100644 --- a/lib/private/group/group.php +++ b/lib/private/group/group.php @@ -118,7 +118,7 @@ class Group implements IGroup { $this->emitter->emit('\OC\Group', 'preAddUser', array($this, $user)); } foreach ($this->backends as $backend) { - if ($backend->implementsActions(OC_GROUP_BACKEND_ADD_TO_GROUP)) { + if ($backend->implementsActions(\OC_Group_Backend::ADD_TO_GROUP)) { $backend->addToGroup($user->getUID(), $this->gid); if ($this->users) { $this->users[$user->getUID()] = $user; @@ -142,7 +142,7 @@ class Group implements IGroup { $this->emitter->emit('\OC\Group', 'preRemoveUser', array($this, $user)); } foreach ($this->backends as $backend) { - if ($backend->implementsActions(OC_GROUP_BACKEND_REMOVE_FROM_GOUP) and $backend->inGroup($user->getUID(), $this->gid)) { + if ($backend->implementsActions(\OC_Group_Backend::REMOVE_FROM_GOUP) and $backend->inGroup($user->getUID(), $this->gid)) { $backend->removeFromGroup($user->getUID(), $this->gid); $result = true; } @@ -191,7 +191,7 @@ class Group implements IGroup { public function count($search = '') { $users = false; foreach ($this->backends as $backend) { - if($backend->implementsActions(OC_GROUP_BACKEND_COUNT_USERS)) { + if($backend->implementsActions(\OC_Group_Backend::COUNT_USERS)) { if($users === false) { //we could directly add to a bool variable, but this would //be ugly @@ -234,7 +234,7 @@ class Group implements IGroup { $this->emitter->emit('\OC\Group', 'preDelete', array($this)); } foreach ($this->backends as $backend) { - if ($backend->implementsActions(OC_GROUP_BACKEND_DELETE_GROUP)) { + if ($backend->implementsActions(\OC_Group_Backend::DELETE_GROUP)) { $result = true; $backend->deleteGroup($this->gid); } diff --git a/lib/private/group/interface.php b/lib/private/group/interface.php index ee5c2d635d6..ee2d718e5dd 100644 --- a/lib/private/group/interface.php +++ b/lib/private/group/interface.php @@ -28,7 +28,7 @@ interface OC_Group_Interface { * @return boolean * * Returns the supported actions as int to be - * compared with OC_GROUP_BACKEND_CREATE_GROUP etc. + * compared with \OC_Group_Backend::CREATE_GROUP etc. */ public function implementsActions($actions); diff --git a/lib/private/group/manager.php b/lib/private/group/manager.php index 417be79ab30..be7bf972693 100644 --- a/lib/private/group/manager.php +++ b/lib/private/group/manager.php @@ -134,7 +134,7 @@ class Manager extends PublicEmitter implements IGroupManager { } else { $this->emit('\OC\Group', 'preCreate', array($gid)); foreach ($this->backends as $backend) { - if ($backend->implementsActions(OC_GROUP_BACKEND_CREATE_GROUP)) { + if ($backend->implementsActions(\OC_Group_Backend::CREATE_GROUP)) { $backend->createGroup($gid); $group = $this->getGroupObject($gid); $this->emit('\OC\Group', 'postCreate', array($group)); diff --git a/lib/private/helper.php b/lib/private/helper.php index 5b1d31bfc59..fb4ddfae3b7 100644 --- a/lib/private/helper.php +++ b/lib/private/helper.php @@ -58,12 +58,11 @@ class OC_Helper { } /** - * @param $key + * @param string $key * @return string url to the online documentation */ public static function linkToDocs($key) { - $theme = new OC_Defaults(); - return $theme->buildDocLinkToKey($key); + return OC::$server->getURLGenerator()->linkToDocs($key); } /** @@ -159,7 +158,10 @@ class OC_Helper { $alias = array( 'application/octet-stream' => 'file', // use file icon as fallback - 'application/illustrator' => 'image', + 'application/illustrator' => 'image/vector', + 'application/postscript' => 'image/vector', + 'image/svg+xml' => 'image/vector', + 'application/coreldraw' => 'image', 'application/x-gimp' => 'image', 'application/x-photoshop' => 'image', @@ -873,6 +875,23 @@ class OC_Helper { } /** + * Try to find a program + * Note: currently windows is not supported + * + * @param string $program + * @return null|string + */ + public static function findBinaryPath($program) { + if (!\OC_Util::runningOnWindows() && self::is_function_enabled('exec')) { + exec('command -v ' . escapeshellarg($program) . ' 2> /dev/null', $output, $returnCode); + if ($returnCode === 0 && count($output) > 0) { + return escapeshellcmd($output[0]); + } + } + return null; + } + + /** * Calculate the disc space for the given path * * @param string $path @@ -957,4 +976,12 @@ class OC_Helper { return array('free' => $free, 'used' => $used, 'total' => $total, 'relative' => $relative); } + + /** + * Returns whether the config file is set manually to read-only + * @return bool + */ + public static function isReadOnlyConfigEnabled() { + return \OC::$server->getConfig()->getSystemValue('config_is_read_only', false); + } } diff --git a/lib/private/httphelper.php b/lib/private/httphelper.php index 8b7aebb3d4d..dfc1bcf47cd 100644 --- a/lib/private/httphelper.php +++ b/lib/private/httphelper.php @@ -72,7 +72,7 @@ class HTTPHelper { curl_setopt($curl, CURLOPT_PROXYUSERPWD, $proxyUserPwd); } - if (ini_get('open_basedir') === '' && (ini_get('safe_mode') === false) || strtolower(ini_get('safe_mode')) === 'off') { + if (ini_get('open_basedir') === '') { curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($curl, CURLOPT_MAXREDIRS, $max_redirects); $data = curl_exec($curl); diff --git a/lib/private/image.php b/lib/private/image.php index bab91745c05..78cacc84452 100644 --- a/lib/private/image.php +++ b/lib/private/image.php @@ -1,25 +1,17 @@ <?php /** -* ownCloud -* -* @author Thomas Tanghus -* @copyright 2011 Thomas Tanghus <thomas@tanghus.net> -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the License, or any later version. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. If not, see <http://www.gnu.org/licenses/>. -* -*/ + * ownCloud + * + * @author Thomas Tanghus + * @copyright 2011 Thomas Tanghus <thomas@tanghus.net> + * + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + * + */ + /** * Class for basic image manipulation */ @@ -33,10 +25,16 @@ class OC_Image { private $fileInfo; /** - * Get mime type for an image file. - * @param string|null $filePath The path to a local image file. - * @return string The mime type if the it could be determined, otherwise an empty string. - */ + * @var \OCP\ILogger + */ + private $logger; + + /** + * Get mime type for an image file. + * + * @param string|null $filePath The path to a local image file. + * @return string The mime type if the it could be determined, otherwise an empty string. + */ static public function getMimeTypeForFile($filePath) { // exif_imagetype throws "read error!" if file is less than 12 byte if (filesize($filePath) > 11) { @@ -49,14 +47,19 @@ class OC_Image { /** * Constructor. + * * @param resource|string $imageRef The path to a local file, a base64 encoded string or a resource created by * an imagecreate* function. - * @return \OC_Image False on error + * @param \OCP\ILogger $logger */ - public function __construct($imageRef = null) { - //OC_Log::write('core',__METHOD__.'(): start', OC_Log::DEBUG); - if(!extension_loaded('gd') || !function_exists('gd_info')) { - OC_Log::write('core', __METHOD__.'(): GD module not installed', OC_Log::ERROR); + public function __construct($imageRef = null, $logger = null) { + $this->logger = $logger; + if (is_null($logger)) { + $this->logger = \OC::$server->getLogger(); + } + + if (!extension_loaded('gd') || !function_exists('gd_info')) { + $this->logger->error(__METHOD__ . '(): GD module not installed', array('app' => 'core')); return false; } @@ -64,51 +67,56 @@ class OC_Image { $this->fileInfo = new finfo(FILEINFO_MIME_TYPE); } - if(!is_null($imageRef)) { + if (!is_null($imageRef)) { $this->load($imageRef); } } /** - * Determine whether the object contains an image resource. - * @return bool - */ + * Determine whether the object contains an image resource. + * + * @return bool + */ public function valid() { // apparently you can't name a method 'empty'... return is_resource($this->resource); } /** - * Returns the MIME type of the image or an empty string if no image is loaded. - * @return string - */ + * Returns the MIME type of the image or an empty string if no image is loaded. + * + * @return string + */ public function mimeType() { return $this->valid() ? $this->mimeType : ''; } /** - * Returns the width of the image or -1 if no image is loaded. - * @return int - */ + * Returns the width of the image or -1 if no image is loaded. + * + * @return int + */ public function width() { return $this->valid() ? imagesx($this->resource) : -1; } /** - * Returns the height of the image or -1 if no image is loaded. - * @return int - */ + * Returns the height of the image or -1 if no image is loaded. + * + * @return int + */ public function height() { return $this->valid() ? imagesy($this->resource) : -1; } /** - * Returns the width when the image orientation is top-left. - * @return int - */ + * Returns the width when the image orientation is top-left. + * + * @return int + */ public function widthTopLeft() { $o = $this->getOrientation(); - OC_Log::write('core', 'OC_Image->widthTopLeft() Orientation: '.$o, OC_Log::DEBUG); - switch($o) { + $this->logger->debug('OC_Image->widthTopLeft() Orientation: ' . $o, array('app' => 'core')); + switch ($o) { case -1: case 1: case 2: // Not tested @@ -125,13 +133,14 @@ class OC_Image { } /** - * Returns the height when the image orientation is top-left. - * @return int - */ + * Returns the height when the image orientation is top-left. + * + * @return int + */ public function heightTopLeft() { $o = $this->getOrientation(); - OC_Log::write('core', 'OC_Image->heightTopLeft() Orientation: '.$o, OC_Log::DEBUG); - switch($o) { + $this->logger->debug('OC_Image->heightTopLeft() Orientation: ' . $o, array('app' => 'core')); + switch ($o) { case -1: case 1: case 2: // Not tested @@ -149,32 +158,34 @@ class OC_Image { /** * Outputs the image. + * * @param string $mimeType * @return bool */ - public function show($mimeType=null) { - if($mimeType === null) { + public function show($mimeType = null) { + if ($mimeType === null) { $mimeType = $this->mimeType(); } - header('Content-Type: '.$mimeType); + header('Content-Type: ' . $mimeType); return $this->_output(null, $mimeType); } /** * Saves the image. + * * @param string $filePath * @param string $mimeType * @return bool */ - public function save($filePath=null, $mimeType=null) { - if($mimeType === null) { + public function save($filePath = null, $mimeType = null) { + if ($mimeType === null) { $mimeType = $this->mimeType(); } - if($filePath === null && $this->filePath === null) { - OC_Log::write('core', __METHOD__.'(): called with no path.', OC_Log::ERROR); + if ($filePath === null && $this->filePath === null) { + $this->logger->error(__METHOD__ . '(): called with no path.', array('app' => 'core')); return false; - } elseif($filePath === null && $this->filePath !== null) { + } elseif ($filePath === null && $this->filePath !== null) { $filePath = $this->filePath; } return $this->_output($filePath, $mimeType); @@ -182,22 +193,21 @@ class OC_Image { /** * Outputs/saves the image. + * * @param string $filePath * @param string $mimeType * @return bool * @throws Exception */ - private function _output($filePath=null, $mimeType=null) { - if($filePath) { + private function _output($filePath = null, $mimeType = null) { + if ($filePath) { if (!file_exists(dirname($filePath))) mkdir(dirname($filePath), 0777, true); - if(!is_writable(dirname($filePath))) { - OC_Log::write('core', - __METHOD__.'(): Directory \''.dirname($filePath).'\' is not writable.', - OC_Log::ERROR); + if (!is_writable(dirname($filePath))) { + $this->logger->error(__METHOD__ . '(): Directory \'' . dirname($filePath) . '\' is not writable.', array('app' => 'core')); return false; - } elseif(is_writable(dirname($filePath)) && file_exists($filePath) && !is_writable($filePath)) { - OC_Log::write('core', __METHOD__.'(): File \''.$filePath.'\' is not writable.', OC_Log::ERROR); + } elseif (is_writable(dirname($filePath)) && file_exists($filePath) && !is_writable($filePath)) { + $this->logger->error(__METHOD__ . '(): File \'' . $filePath . '\' is not writable.', array('app' => 'core')); return false; } } @@ -206,8 +216,8 @@ class OC_Image { } $imageType = $this->imageType; - if($mimeType !== null) { - switch($mimeType) { + if ($mimeType !== null) { + switch ($mimeType) { case 'image/gif': $imageType = IMAGETYPE_GIF; break; @@ -228,7 +238,7 @@ class OC_Image { } } - switch($imageType) { + switch ($imageType) { case IMAGETYPE_GIF: $retVal = imagegif($this->resource, $filePath); break; @@ -259,22 +269,22 @@ class OC_Image { } /** - * Prints the image when called as $image(). - */ + * Prints the image when called as $image(). + */ public function __invoke() { return $this->show(); } /** - * @return resource Returns the image resource in any. - */ + * @return resource Returns the image resource in any. + */ public function resource() { return $this->resource; } /** - * @return string Returns the raw image data. - */ + * @return string Returns the raw image data. + */ function data() { ob_start(); switch ($this->mimeType) { @@ -289,11 +299,11 @@ class OC_Image { break; default: $res = imagepng($this->resource); - OC_Log::write('core', 'OC_Image->data. Couldn\'t guess mimetype, defaulting to png', OC_Log::INFO); + $this->logger->info('OC_Image->data. Could not guess mime-type, defaulting to png', array('app' => 'core')); break; } if (!$res) { - OC_Log::write('core', 'OC_Image->data. Error getting image data.', OC_Log::ERROR); + $this->logger->error('OC_Image->data. Error getting image data.', array('app' => 'core')); } return ob_get_clean(); } @@ -306,43 +316,49 @@ class OC_Image { } /** - * (I'm open for suggestions on better method name ;) - * Get the orientation based on EXIF data. - * @return int The orientation or -1 if no EXIF data is available. - */ + * (I'm open for suggestions on better method name ;) + * Get the orientation based on EXIF data. + * + * @return int The orientation or -1 if no EXIF data is available. + */ public function getOrientation() { - if(!is_callable('exif_read_data')) { - OC_Log::write('core', 'OC_Image->fixOrientation() Exif module not enabled.', OC_Log::DEBUG); + if ($this->imageType !== IMAGETYPE_JPEG) { + $this->logger->debug('OC_Image->fixOrientation() Image is not a JPEG.', array('app' => 'core')); return -1; } - if(!$this->valid()) { - OC_Log::write('core', 'OC_Image->fixOrientation() No image loaded.', OC_Log::DEBUG); + if (!is_callable('exif_read_data')) { + $this->logger->debug('OC_Image->fixOrientation() Exif module not enabled.', array('app' => 'core')); return -1; } - if(is_null($this->filePath) || !is_readable($this->filePath)) { - OC_Log::write('core', 'OC_Image->fixOrientation() No readable file path set.', OC_Log::DEBUG); + if (!$this->valid()) { + $this->logger->debug('OC_Image->fixOrientation() No image loaded.', array('app' => 'core')); + return -1; + } + if (is_null($this->filePath) || !is_readable($this->filePath)) { + $this->logger->debug('OC_Image->fixOrientation() No readable file path set.', array('app' => 'core')); return -1; } $exif = @exif_read_data($this->filePath, 'IFD0'); - if(!$exif) { + if (!$exif) { return -1; } - if(!isset($exif['Orientation'])) { + if (!isset($exif['Orientation'])) { return -1; } return $exif['Orientation']; } /** - * (I'm open for suggestions on better method name ;) - * Fixes orientation based on EXIF data. - * @return bool. - */ + * (I'm open for suggestions on better method name ;) + * Fixes orientation based on EXIF data. + * + * @return bool. + */ public function fixOrientation() { $o = $this->getOrientation(); - OC_Log::write('core', 'OC_Image->fixOrientation() Orientation: '.$o, OC_Log::DEBUG); + $this->logger->debug('OC_Image->fixOrientation() Orientation: ' . $o, array('app' => 'core')); $rotate = 0; - switch($o) { + switch ($o) { case -1: return false; //Nothing to fix case 1: @@ -371,24 +387,24 @@ class OC_Image { $rotate = 90; break; } - if($rotate) { + if ($rotate) { $res = imagerotate($this->resource, $rotate, 0); - if($res) { - if(imagealphablending($res, true)) { - if(imagesavealpha($res, true)) { + if ($res) { + if (imagealphablending($res, true)) { + if (imagesavealpha($res, true)) { imagedestroy($this->resource); $this->resource = $res; return true; } else { - OC_Log::write('core', 'OC_Image->fixOrientation() Error during alphasaving.', OC_Log::DEBUG); + $this->logger->debug('OC_Image->fixOrientation() Error during alpha-saving', array('app' => 'core')); return false; } } else { - OC_Log::write('core', 'OC_Image->fixOrientation() Error during alphablending.', OC_Log::DEBUG); + $this->logger->debug('OC_Image->fixOrientation() Error during alpha-blending', array('app' => 'core')); return false; } } else { - OC_Log::write('core', 'OC_Image->fixOrientation() Error during oriention fixing.', OC_Log::DEBUG); + $this->logger->debug('OC_Image->fixOrientation() Error during orientation fixing', array('app' => 'core')); return false; } } @@ -397,52 +413,54 @@ class OC_Image { /** * Loads an image from a local file, a base64 encoded string or a resource created by an imagecreate* function. + * * @param resource|string $imageRef The path to a local file, a base64 encoded string or a resource created by an imagecreate* function or a file resource (file handle ). * @return resource|false An image resource or false on error */ public function load($imageRef) { - if(is_resource($imageRef)) { - if(get_resource_type($imageRef) == 'gd') { + if (is_resource($imageRef)) { + if (get_resource_type($imageRef) == 'gd') { $this->resource = $imageRef; return $this->resource; - } elseif(in_array(get_resource_type($imageRef), array('file', 'stream'))) { + } elseif (in_array(get_resource_type($imageRef), array('file', 'stream'))) { return $this->loadFromFileHandle($imageRef); } - } elseif($this->loadFromBase64($imageRef) !== false) { + } elseif ($this->loadFromBase64($imageRef) !== false) { return $this->resource; - } elseif($this->loadFromFile($imageRef) !== false) { + } elseif ($this->loadFromFile($imageRef) !== false) { return $this->resource; - } elseif($this->loadFromData($imageRef) !== false) { + } elseif ($this->loadFromData($imageRef) !== false) { return $this->resource; - } else { - OC_Log::write('core', __METHOD__.'(): couldn\'t load anything. Giving up!', OC_Log::DEBUG); - return false; } + $this->logger->debug(__METHOD__ . '(): could not load anything. Giving up!', array('app' => 'core')); + return false; } /** - * Loads an image from an open file handle. - * It is the responsibility of the caller to position the pointer at the correct place and to close the handle again. - * @param resource $handle - * @return resource|false An image resource or false on error - */ + * Loads an image from an open file handle. + * It is the responsibility of the caller to position the pointer at the correct place and to close the handle again. + * + * @param resource $handle + * @return resource|false An image resource or false on error + */ public function loadFromFileHandle($handle) { - OC_Log::write('core', __METHOD__.'(): Trying', OC_Log::DEBUG); $contents = stream_get_contents($handle); - if($this->loadFromData($contents)) { + if ($this->loadFromData($contents)) { return $this->resource; } + return false; } /** - * Loads an image from a local file. - * @param bool|string $imagePath The path to a local file. - * @return bool|resource An image resource or false on error - */ - public function loadFromFile($imagePath=false) { + * Loads an image from a local file. + * + * @param bool|string $imagePath The path to a local file. + * @return bool|resource An image resource or false on error + */ + public function loadFromFile($imagePath = false) { // exif_imagetype throws "read error!" if file is less than 12 byte - if(!@is_file($imagePath) || !file_exists($imagePath) || filesize($imagePath) < 12 || !is_readable($imagePath)) { - OC_Log::write('core', 'OC_Image->loadFromFile, couldn\'t load: ' . (string) urlencode($imagePath), OC_Log::DEBUG); + if (!@is_file($imagePath) || !file_exists($imagePath) || filesize($imagePath) < 12 || !is_readable($imagePath)) { + $this->logger->debug('OC_Image->loadFromFile, could not load: ' . (string)urlencode($imagePath), array('app' => 'core')); return false; } $iType = exif_imagetype($imagePath); @@ -454,18 +472,14 @@ class OC_Image { imagealphablending($this->resource, true); imagesavealpha($this->resource, true); } else { - OC_Log::write('core', - 'OC_Image->loadFromFile, GIF images not supported: '.$imagePath, - OC_Log::DEBUG); + $this->logger->debug('OC_Image->loadFromFile, GIF images not supported: ' . $imagePath, array('app' => 'core')); } break; case IMAGETYPE_JPEG: if (imagetypes() & IMG_JPG) { $this->resource = imagecreatefromjpeg($imagePath); } else { - OC_Log::write('core', - 'OC_Image->loadFromFile, JPG images not supported: '.$imagePath, - OC_Log::DEBUG); + $this->logger->debug('OC_Image->loadFromFile, JPG images not supported: ' . $imagePath, array('app' => 'core')); } break; case IMAGETYPE_PNG: @@ -475,31 +489,25 @@ class OC_Image { imagealphablending($this->resource, true); imagesavealpha($this->resource, true); } else { - OC_Log::write('core', - 'OC_Image->loadFromFile, PNG images not supported: '.$imagePath, - OC_Log::DEBUG); + $this->logger->debug('OC_Image->loadFromFile, PNG images not supported: ' . $imagePath, array('app' => 'core')); } break; case IMAGETYPE_XBM: if (imagetypes() & IMG_XPM) { $this->resource = imagecreatefromxbm($imagePath); } else { - OC_Log::write('core', - 'OC_Image->loadFromFile, XBM/XPM images not supported: '.$imagePath, - OC_Log::DEBUG); + $this->logger->debug('OC_Image->loadFromFile, XBM/XPM images not supported: ' . $imagePath, array('app' => 'core')); } break; case IMAGETYPE_WBMP: if (imagetypes() & IMG_WBMP) { $this->resource = imagecreatefromwbmp($imagePath); } else { - OC_Log::write('core', - 'OC_Image->loadFromFile, WBMP images not supported: '.$imagePath, - OC_Log::DEBUG); + $this->logger->debug('OC_Image->loadFromFile, WBMP images not supported: ' . $imagePath, array('app' => 'core')); } break; case IMAGETYPE_BMP: - $this->resource = $this->imagecreatefrombmp($imagePath); + $this->resource = $this->imagecreatefrombmp($imagePath); break; /* case IMAGETYPE_TIFF_II: // (intel byte order) @@ -530,10 +538,10 @@ class OC_Image { // this is mostly file created from encrypted file $this->resource = imagecreatefromstring(\OC\Files\Filesystem::file_get_contents(\OC\Files\Filesystem::getLocalPath($imagePath))); $iType = IMAGETYPE_PNG; - OC_Log::write('core', 'OC_Image->loadFromFile, Default', OC_Log::DEBUG); + $this->logger->debug('OC_Image->loadFromFile, Default', array('app' => 'core')); break; } - if($this->valid()) { + if ($this->valid()) { $this->imageType = $iType; $this->mimeType = image_type_to_mime_type($iType); $this->filePath = $imagePath; @@ -542,47 +550,49 @@ class OC_Image { } /** - * Loads an image from a string of data. - * @param string $str A string of image data as read from a file. - * @return bool|resource An image resource or false on error - */ + * Loads an image from a string of data. + * + * @param string $str A string of image data as read from a file. + * @return bool|resource An image resource or false on error + */ public function loadFromData($str) { - if(is_resource($str)) { + if (is_resource($str)) { return false; } $this->resource = @imagecreatefromstring($str); if ($this->fileInfo) { $this->mimeType = $this->fileInfo->buffer($str); } - if(is_resource($this->resource)) { + if (is_resource($this->resource)) { imagealphablending($this->resource, false); imagesavealpha($this->resource, true); } - if(!$this->resource) { - OC_Log::write('core', 'OC_Image->loadFromData, couldn\'t load', OC_Log::DEBUG); + if (!$this->resource) { + $this->logger->debug('OC_Image->loadFromFile, could not load', array('app' => 'core')); return false; } return $this->resource; } /** - * Loads an image from a base64 encoded string. - * @param string $str A string base64 encoded string of image data. - * @return bool|resource An image resource or false on error - */ + * Loads an image from a base64 encoded string. + * + * @param string $str A string base64 encoded string of image data. + * @return bool|resource An image resource or false on error + */ public function loadFromBase64($str) { - if(!is_string($str)) { + if (!is_string($str)) { return false; } $data = base64_decode($str); - if($data) { // try to load from string data + if ($data) { // try to load from string data $this->resource = @imagecreatefromstring($data); if ($this->fileInfo) { $this->mimeType = $this->fileInfo->buffer($data); } - if(!$this->resource) { - OC_Log::write('core', 'OC_Image->loadFromBase64, couldn\'t load', OC_Log::DEBUG); + if (!$this->resource) { + $this->logger->debug('OC_Image->loadFromBase64, could not load', array('app' => 'core')); return false; } return $this->resource; @@ -593,6 +603,7 @@ class OC_Image { /** * Create a new image from file or URL + * * @link http://www.programmierer-forum.de/function-imagecreatefrombmp-laeuft-mit-allen-bitraten-t143137.htm * @version 1.00 * @param string $fileName <p> @@ -602,7 +613,7 @@ class OC_Image { */ private function imagecreatefrombmp($fileName) { if (!($fh = fopen($fileName, 'rb'))) { - trigger_error('imagecreatefrombmp: Can not open ' . $fileName, E_USER_WARNING); + $this->logger->warning('imagecreatefrombmp: Can not open ' . $fileName, array('app' => 'core')); return false; } // read file header @@ -610,7 +621,7 @@ class OC_Image { // check for bitmap if ($meta['type'] != 19778) { fclose($fh); - trigger_error('imagecreatefrombmp: ' . $fileName . ' is not a bitmap!', E_USER_WARNING); + $this->logger->warning('imagecreatefrombmp: Can not open ' . $fileName . ' is not a bitmap!', array('app' => 'core')); return false; } // read image header @@ -622,7 +633,7 @@ class OC_Image { // set bytes and padding $meta['bytes'] = $meta['bits'] / 8; $this->bitDepth = $meta['bits']; //remember the bit depth for the imagebmp call - $meta['decal'] = 4 - (4 * (($meta['width'] * $meta['bytes'] / 4)- floor($meta['width'] * $meta['bytes'] / 4))); + $meta['decal'] = 4 - (4 * (($meta['width'] * $meta['bytes'] / 4) - floor($meta['width'] * $meta['bytes'] / 4))); if ($meta['decal'] == 4) { $meta['decal'] = 0; } @@ -634,7 +645,7 @@ class OC_Image { $meta['imagesize'] = @filesize($fileName) - $meta['offset']; if ($meta['imagesize'] < 1) { fclose($fh); - trigger_error('imagecreatefrombmp: Can not obtain filesize of ' . $fileName . '!', E_USER_WARNING); + $this->logger->warning('imagecreatefrombmp: Can not obtain file size of ' . $fileName . ' is not a bitmap!', array('app' => 'core')); return false; } } @@ -654,6 +665,14 @@ class OC_Image { } // create gd image $im = imagecreatetruecolor($meta['width'], $meta['height']); + if ($im == false) { + fclose($fh); + $this->logger->warning( + 'imagecreatefrombmp: imagecreatetruecolor failed for file "' . $fileName . '" with dimensions ' . $meta['width'] . 'x' . $meta['height'], + array('app' => 'core')); + return false; + } + $data = fread($fh, $meta['imagesize']); $p = 0; $vide = chr(0); @@ -667,7 +686,7 @@ class OC_Image { case 32: case 24: if (!($part = substr($data, $p, 3))) { - trigger_error($error, E_USER_WARNING); + $this->logger->warning($error, array('app' => 'core')); return $im; } $color = unpack('V', $part . $vide); @@ -675,7 +694,7 @@ class OC_Image { case 16: if (!($part = substr($data, $p, 2))) { fclose($fh); - trigger_error($error, E_USER_WARNING); + $this->logger->warning($error, array('app' => 'core')); return $im; } $color = unpack('v', $part); @@ -683,12 +702,12 @@ class OC_Image { break; case 8: $color = unpack('n', $vide . substr($data, $p, 1)); - $color[1] = $palette[ $color[1] + 1 ]; + $color[1] = $palette[$color[1] + 1]; break; case 4: $color = unpack('n', $vide . substr($data, floor($p), 1)); $color[1] = ($p * 2) % 2 == 0 ? $color[1] >> 4 : $color[1] & 0x0F; - $color[1] = $palette[ $color[1] + 1 ]; + $color[1] = $palette[$color[1] + 1]; break; case 1: $color = unpack('n', $vide . substr($data, floor($p), 1)); @@ -718,13 +737,11 @@ class OC_Image { $color[1] = ($color[1] & 0x1); break; } - $color[1] = $palette[ $color[1] + 1 ]; + $color[1] = $palette[$color[1] + 1]; break; default: fclose($fh); - trigger_error('imagecreatefrombmp: ' - . $fileName . ' has ' . $meta['bits'] . ' bits and this is not supported!', - E_USER_WARNING); + $this->logger->warning('imagecreatefrombmp: ' . $fileName . ' has ' . $meta['bits'] . ' bits and this is not supported!', array('app' => 'core')); return false; } imagesetpixel($im, $x, $y, $color[1]); @@ -739,24 +756,25 @@ class OC_Image { } /** - * Resizes the image preserving ratio. - * @param integer $maxSize The maximum size of either the width or height. - * @return bool - */ + * Resizes the image preserving ratio. + * + * @param integer $maxSize The maximum size of either the width or height. + * @return bool + */ public function resize($maxSize) { - if(!$this->valid()) { - OC_Log::write('core', __METHOD__.'(): No image loaded', OC_Log::ERROR); + if (!$this->valid()) { + $this->logger->error(__METHOD__ . '(): No image loaded', array('app' => 'core')); return false; } - $widthOrig=imageSX($this->resource); - $heightOrig=imageSY($this->resource); - $ratioOrig = $widthOrig/$heightOrig; + $widthOrig = imageSX($this->resource); + $heightOrig = imageSY($this->resource); + $ratioOrig = $widthOrig / $heightOrig; if ($ratioOrig > 1) { - $newHeight = round($maxSize/$ratioOrig); + $newHeight = round($maxSize / $ratioOrig); $newWidth = $maxSize; } else { - $newWidth = round($maxSize*$ratioOrig); + $newWidth = round($maxSize * $ratioOrig); $newHeight = $maxSize; } @@ -771,21 +789,21 @@ class OC_Image { */ public function preciseResize($width, $height) { if (!$this->valid()) { - OC_Log::write('core', __METHOD__.'(): No image loaded', OC_Log::ERROR); + $this->logger->error(__METHOD__ . '(): No image loaded', array('app' => 'core')); return false; } - $widthOrig=imageSX($this->resource); - $heightOrig=imageSY($this->resource); + $widthOrig = imageSX($this->resource); + $heightOrig = imageSY($this->resource); $process = imagecreatetruecolor($width, $height); if ($process == false) { - OC_Log::write('core', __METHOD__.'(): Error creating true color image', OC_Log::ERROR); + $this->logger->error(__METHOD__ . '(): Error creating true color image', array('app' => 'core')); imagedestroy($process); return false; } // preserve transparency - if($this->imageType == IMAGETYPE_GIF or $this->imageType == IMAGETYPE_PNG) { + if ($this->imageType == IMAGETYPE_GIF or $this->imageType == IMAGETYPE_PNG) { imagecolortransparent($process, imagecolorallocatealpha($process, 0, 0, 0, 127)); imagealphablending($process, false); imagesavealpha($process, true); @@ -793,7 +811,7 @@ class OC_Image { imagecopyresampled($process, $this->resource, 0, 0, 0, 0, $width, $height, $widthOrig, $heightOrig); if ($process == false) { - OC_Log::write('core', __METHOD__.'(): Error resampling process image '.$width.'x'.$height, OC_Log::ERROR); + $this->logger->error(__METHOD__ . '(): Error re-sampling process image', array('app' => 'core')); imagedestroy($process); return false; } @@ -803,46 +821,47 @@ class OC_Image { } /** - * Crops the image to the middle square. If the image is already square it just returns. - * @param int $size maximum size for the result (optional) - * @return bool for success or failure - */ - public function centerCrop($size=0) { - if(!$this->valid()) { - OC_Log::write('core', 'OC_Image->centerCrop, No image loaded', OC_Log::ERROR); + * Crops the image to the middle square. If the image is already square it just returns. + * + * @param int $size maximum size for the result (optional) + * @return bool for success or failure + */ + public function centerCrop($size = 0) { + if (!$this->valid()) { + $this->logger->error('OC_Image->centerCrop, No image loaded', array('app' => 'core')); return false; } - $widthOrig=imageSX($this->resource); - $heightOrig=imageSY($this->resource); - if($widthOrig === $heightOrig and $size==0) { + $widthOrig = imageSX($this->resource); + $heightOrig = imageSY($this->resource); + if ($widthOrig === $heightOrig and $size == 0) { return true; } - $ratioOrig = $widthOrig/$heightOrig; + $ratioOrig = $widthOrig / $heightOrig; $width = $height = min($widthOrig, $heightOrig); if ($ratioOrig > 1) { - $x = ($widthOrig/2) - ($width/2); + $x = ($widthOrig / 2) - ($width / 2); $y = 0; } else { - $y = ($heightOrig/2) - ($height/2); + $y = ($heightOrig / 2) - ($height / 2); $x = 0; } - if($size>0) { - $targetWidth=$size; - $targetHeight=$size; - }else{ - $targetWidth=$width; - $targetHeight=$height; + if ($size > 0) { + $targetWidth = $size; + $targetHeight = $size; + } else { + $targetWidth = $width; + $targetHeight = $height; } $process = imagecreatetruecolor($targetWidth, $targetHeight); if ($process == false) { - OC_Log::write('core', 'OC_Image->centerCrop. Error creating true color image', OC_Log::ERROR); + $this->logger->error('OC_Image->centerCrop, Error creating true color image', array('app' => 'core')); imagedestroy($process); return false; } // preserve transparency - if($this->imageType == IMAGETYPE_GIF or $this->imageType == IMAGETYPE_PNG) { + if ($this->imageType == IMAGETYPE_GIF or $this->imageType == IMAGETYPE_PNG) { imagecolortransparent($process, imagecolorallocatealpha($process, 0, 0, 0, 127)); imagealphablending($process, false); imagesavealpha($process, true); @@ -850,9 +869,7 @@ class OC_Image { imagecopyresampled($process, $this->resource, 0, 0, $x, $y, $targetWidth, $targetHeight, $width, $height); if ($process == false) { - OC_Log::write('core', - 'OC_Image->centerCrop. Error resampling process image '.$width.'x'.$height, - OC_Log::ERROR); + $this->logger->error('OC_Image->centerCrop, Error re-sampling process image ' . $width . 'x' . $height, array('app' => 'core')); imagedestroy($process); return false; } @@ -862,27 +879,28 @@ class OC_Image { } /** - * Crops the image from point $x$y with dimension $wx$h. - * @param int $x Horizontal position - * @param int $y Vertical position - * @param int $w Width - * @param int $h Height - * @return bool for success or failure - */ + * Crops the image from point $x$y with dimension $wx$h. + * + * @param int $x Horizontal position + * @param int $y Vertical position + * @param int $w Width + * @param int $h Height + * @return bool for success or failure + */ public function crop($x, $y, $w, $h) { - if(!$this->valid()) { - OC_Log::write('core', __METHOD__.'(): No image loaded', OC_Log::ERROR); + if (!$this->valid()) { + $this->logger->error(__METHOD__ . '(): No image loaded', array('app' => 'core')); return false; } $process = imagecreatetruecolor($w, $h); if ($process == false) { - OC_Log::write('core', __METHOD__.'(): Error creating true color image', OC_Log::ERROR); + $this->logger->error(__METHOD__ . '(): Error creating true color image', array('app' => 'core')); imagedestroy($process); return false; } // preserve transparency - if($this->imageType == IMAGETYPE_GIF or $this->imageType == IMAGETYPE_PNG) { + if ($this->imageType == IMAGETYPE_GIF or $this->imageType == IMAGETYPE_PNG) { imagecolortransparent($process, imagecolorallocatealpha($process, 0, 0, 0, 127)); imagealphablending($process, false); imagesavealpha($process, true); @@ -890,7 +908,7 @@ class OC_Image { imagecopyresampled($process, $this->resource, 0, 0, $x, $y, $w, $h, $w, $h); if ($process == false) { - OC_Log::write('core', __METHOD__.'(): Error resampling process image '.$w.'x'.$h, OC_Log::ERROR); + $this->logger->error(__METHOD__ . '(): Error re-sampling process image ' . $w . 'x' . $h, array('app' => 'core')); imagedestroy($process); return false; } @@ -900,41 +918,44 @@ class OC_Image { } /** - * Resizes the image to fit within a boundry while preserving ratio. + * Resizes the image to fit within a boundary while preserving ratio. + * * @param integer $maxWidth * @param integer $maxHeight * @return bool */ public function fitIn($maxWidth, $maxHeight) { - if(!$this->valid()) { - OC_Log::write('core', __METHOD__.'(): No image loaded', OC_Log::ERROR); + if (!$this->valid()) { + $this->logger->error(__METHOD__ . '(): No image loaded', array('app' => 'core')); return false; } - $widthOrig=imageSX($this->resource); - $heightOrig=imageSY($this->resource); - $ratio = $widthOrig/$heightOrig; + $widthOrig = imageSX($this->resource); + $heightOrig = imageSY($this->resource); + $ratio = $widthOrig / $heightOrig; - $newWidth = min($maxWidth, $ratio*$maxHeight); - $newHeight = min($maxHeight, $maxWidth/$ratio); + $newWidth = min($maxWidth, $ratio * $maxHeight); + $newHeight = min($maxHeight, $maxWidth / $ratio); $this->preciseResize(round($newWidth), round($newHeight)); return true; } public function destroy() { - if($this->valid()) { + if ($this->valid()) { imagedestroy($this->resource); } - $this->resource=null; + $this->resource = null; } public function __destruct() { $this->destroy(); } } -if ( ! function_exists( 'imagebmp') ) { + +if (!function_exists('imagebmp')) { /** * Output a BMP image to either the browser or a file + * * @link http://www.ugia.cn/wp-data/imagebmp.php * @author legend <legendsky@hotmail.com> * @link http://www.programmierer-forum.de/imagebmp-gute-funktion-gefunden-t143716.htm @@ -945,11 +966,10 @@ if ( ! function_exists( 'imagebmp') ) { * @param int $compression [optional] * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. */ - function imagebmp($im, $fileName='', $bit=24, $compression=0) { + function imagebmp($im, $fileName = '', $bit = 24, $compression = 0) { if (!in_array($bit, array(1, 4, 8, 16, 24, 32))) { $bit = 24; - } - else if ($bit == 32) { + } else if ($bit == 32) { $bit = 24; } $bits = pow(2, $bit); @@ -971,7 +991,7 @@ if ( ! function_exists( 'imagebmp') ) { if ($padding % 4 != 0) { $extra = str_repeat("\0", $padding); } - for ($j = $height - 1; $j >= 0; $j --) { + for ($j = $height - 1; $j >= 0; $j--) { $i = 0; while ($i < $width) { $bin = 0; @@ -985,8 +1005,7 @@ if ( ! function_exists( 'imagebmp') ) { } $bmpData .= $extra; } - } - // RLE8 + } // RLE8 else if ($compression == 1 && $bit == 8) { for ($j = $height - 1; $j >= 0; $j--) { $lastIndex = "\0"; @@ -999,8 +1018,7 @@ if ( ! function_exists( 'imagebmp') ) { } $lastIndex = $index; $sameNum = 1; - } - else { + } else { $sameNum++; } } @@ -1010,8 +1028,7 @@ if ( ! function_exists( 'imagebmp') ) { } $sizeQuad = strlen($rgbQuad); $sizeData = strlen($bmpData); - } - else { + } else { $extra = ''; $padding = 4 - ($width * ($bit / 8)) % 4; if ($padding % 4 != 0) { @@ -1020,7 +1037,7 @@ if ( ! function_exists( 'imagebmp') ) { $bmpData = ''; for ($j = $height - 1; $j >= 0; $j--) { for ($i = 0; $i < $width; $i++) { - $index = imagecolorat($im, $i, $j); + $index = imagecolorat($im, $i, $j); $colors = imagecolorsforindex($im, $index); if ($bit == 16) { $bin = 0 << $bit; @@ -1028,8 +1045,7 @@ if ( ! function_exists( 'imagebmp') ) { $bin |= ($colors['green'] >> 3) << 5; $bin |= $colors['blue'] >> 3; $bmpData .= pack("v", $bin); - } - else { + } else { $bmpData .= pack("c*", $colors['blue'], $colors['green'], $colors['red']); } } @@ -1047,20 +1063,21 @@ if ( ! function_exists( 'imagebmp') ) { fclose($fp); return true; } - echo $fileHeader . $infoHeader. $rgbQuad . $bmpData; + echo $fileHeader . $infoHeader . $rgbQuad . $bmpData; return true; } } -if ( ! function_exists( 'exif_imagetype' ) ) { +if (!function_exists('exif_imagetype')) { /** * Workaround if exif_imagetype does not exist + * * @link http://www.php.net/manual/en/function.exif-imagetype.php#80383 * @param string $fileName * @return string|boolean */ - function exif_imagetype ( $fileName ) { - if ( ( $info = getimagesize( $fileName ) ) !== false ) { + function exif_imagetype($fileName) { + if (($info = getimagesize($fileName)) !== false) { return $info[2]; } return false; diff --git a/lib/private/installer.php b/lib/private/installer.php index cd1d8ce392f..60ed06ae352 100644 --- a/lib/private/installer.php +++ b/lib/private/installer.php @@ -558,8 +558,8 @@ class OC_Installer{ // is the code checker enabled? if(OC_Config::getValue('appcodechecker', true)) { // check if grep is installed - $grep = exec('command -v grep'); - if($grep=='') { + $grep = \OC_Helper::findBinaryPath('grep'); + if (!$grep) { OC_Log::write('core', 'grep not installed. So checking the code of the app "'.$appname.'" was not possible', OC_Log::ERROR); @@ -568,7 +568,7 @@ class OC_Installer{ // iterate the bad patterns foreach($blacklist as $bl) { - $cmd = 'grep -ri '.escapeshellarg($bl).' '.$folder.''; + $cmd = 'grep --include \\*.php -ri '.escapeshellarg($bl).' '.$folder.''; $result = exec($cmd); // bad pattern found if($result<>'') { diff --git a/lib/private/l10n.php b/lib/private/l10n.php index 6ec4e967c7f..bc4e53e975c 100644 --- a/lib/private/l10n.php +++ b/lib/private/l10n.php @@ -7,19 +7,9 @@ * @copyright 2012 Frank Karlitschek frank@owncloud.org * @copyright 2013 Jakob Sack * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU AFFERO GENERAL PUBLIC LICENSE for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - * + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. */ /** @@ -30,6 +20,7 @@ class OC_L10N implements \OCP\IL10N { * cache */ protected static $cache = array(); + protected static $availableLanguages = array(); /** * The best language @@ -89,7 +80,8 @@ class OC_L10N implements \OCP\IL10N { } /** - * @param string $transFile + * @param $transFile + * @param bool $mergeTranslations * @return bool */ public function load($transFile, $mergeTranslations = false) { @@ -141,8 +133,8 @@ class OC_L10N implements \OCP\IL10N { // load the translations file if($this->load($transFile)) { //merge with translations from theme - $theme = OC_Config::getValue( "theme" ); - if (!is_null($theme)) { + $theme = \OC::$server->getConfig()->getSystemValue('theme'); + if (!empty($theme)) { $transFile = OC::$SERVERROOT.'/themes/'.$theme.substr($transFile, strlen(OC::$SERVERROOT)); if (file_exists($transFile)) { $this->load($transFile, true); @@ -285,7 +277,8 @@ class OC_L10N implements \OCP\IL10N { * Localization * @param string $type Type of localization * @param array|int|string $data parameters for this localization - * @return String or false + * @param array $options + * @return string|false * * Returns the localized data. * @@ -393,8 +386,8 @@ class OC_L10N implements \OCP\IL10N { return self::$language; } - if(OC_User::getUser() && OC_Preferences::getValue(OC_User::getUser(), 'core', 'lang')) { - $lang = OC_Preferences::getValue(OC_User::getUser(), 'core', 'lang'); + if(OC_User::getUser() && \OC::$server->getConfig()->getUserValue(OC_User::getUser(), 'core', 'lang')) { + $lang = \OC::$server->getConfig()->getUserValue(OC_User::getUser(), 'core', 'lang'); self::$language = $lang; if(is_array($app)) { $available = $app; @@ -407,7 +400,7 @@ class OC_L10N implements \OCP\IL10N { } } - $default_language = OC_Config::getValue('default_language', false); + $default_language = \OC::$server->getConfig()->getSystemValue('default_language', false); if($default_language !== false) { return $default_language; @@ -457,17 +450,17 @@ class OC_L10N implements \OCP\IL10N { */ protected static function findI18nDir($app) { // find the i18n dir - $i18ndir = OC::$SERVERROOT.'/core/l10n/'; + $i18nDir = OC::$SERVERROOT.'/core/l10n/'; if($app != '') { // Check if the app is in the app folder if(file_exists(OC_App::getAppPath($app).'/l10n/')) { - $i18ndir = OC_App::getAppPath($app).'/l10n/'; + $i18nDir = OC_App::getAppPath($app).'/l10n/'; } else{ - $i18ndir = OC::$SERVERROOT.'/'.$app.'/l10n/'; + $i18nDir = OC::$SERVERROOT.'/'.$app.'/l10n/'; } } - return $i18ndir; + return $i18nDir; } /** @@ -476,6 +469,9 @@ class OC_L10N implements \OCP\IL10N { * @return array an array of available languages */ public static function findAvailableLanguages($app=null) { + if(!empty(self::$availableLanguages)) { + return self::$availableLanguages; + } $available=array('en');//english is always available $dir = self::findI18nDir($app); if(is_dir($dir)) { @@ -487,6 +483,8 @@ class OC_L10N implements \OCP\IL10N { } } } + + self::$availableLanguages = $available; return $available; } @@ -496,7 +494,7 @@ class OC_L10N implements \OCP\IL10N { * @return bool */ public static function languageExists($app, $lang) { - if ($lang == 'en') {//english is always available + if ($lang === 'en') {//english is always available return true; } $dir = self::findI18nDir($app); diff --git a/lib/private/log/errorlog.php b/lib/private/log/errorlog.php new file mode 100644 index 00000000000..007ab307722 --- /dev/null +++ b/lib/private/log/errorlog.php @@ -0,0 +1,48 @@ +<?php +/** + * The MIT License (MIT) + * + * Copyright (c) 2014 Christian Kampka <christian@kampka.net> + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +class OC_Log_Errorlog { + + + /** + * Init class data + */ + public static function init() { + } + + /** + * write a message in the log + * @param string $app + * @param string $message + * @param int $level + */ + public static function write($app, $message, $level) { + $minLevel = min(OC_Config::getValue("loglevel", OC_Log::WARN), OC_Log::ERROR); + if ($level >= $minLevel) { + error_log('[owncloud]['.$app.'] '.$message); + } + } +} + diff --git a/lib/private/migrate.php b/lib/private/migrate.php deleted file mode 100644 index 8351155aa55..00000000000 --- a/lib/private/migrate.php +++ /dev/null @@ -1,626 +0,0 @@ -<?php -/** - * ownCloud - * - * @author Tom Needham - * @copyright 2012 Tom Needham tom@owncloud.com - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU AFFERO GENERAL PUBLIC LICENSE for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - * - */ - - -/** - * provides an interface to migrate users and whole ownclouds - */ -class OC_Migrate{ - - - // Array of OC_Migration_Provider objects - static private $providers=array(); - // User id of the user to import/export - static private $uid=false; - // Holds the ZipArchive object - static private $zip=false; - // Stores the type of export - static private $exporttype=false; - // Holds the db object - static private $migration_database=false; - // Path to the sqlite db - static private $dbpath=false; - // Holds the path to the zip file - static private $zippath=false; - // Holds the OC_Migration_Content object - static private $content=false; - - /** - * register a new migration provider - * @param OC_Migration_Provider $provider - */ - public static function registerProvider($provider) { - self::$providers[]=$provider; - } - - /** - * finds and loads the providers - */ - static private function findProviders() { - // Find the providers - $apps = OC_App::getAllApps(); - - foreach($apps as $app) { - $path = OC_App::getAppPath($app) . '/appinfo/migrate.php'; - if( file_exists( $path ) ) { - include_once $path; - } - } - } - - /** - * exports a user, or owncloud instance - * @param string $uid user id of user to export if export type is user, defaults to current - * @param string $type type of export, defualts to user - * @param string $path path to zip output folder - * @return string on error, path to zip on success - */ - public static function export( $uid=null, $type='user', $path=null ) { - $datadir = OC_Config::getValue( 'datadirectory' ); - // Validate export type - $types = array( 'user', 'instance', 'system', 'userfiles' ); - if( !in_array( $type, $types ) ) { - OC_Log::write( 'migration', 'Invalid export type', OC_Log::ERROR ); - return json_encode( array( 'success' => false ) ); - } - self::$exporttype = $type; - // Userid? - if( self::$exporttype == 'user' ) { - // Check user exists - self::$uid = is_null($uid) ? OC_User::getUser() : $uid; - if(!OC_User::userExists(self::$uid)) { - return json_encode( array( 'success' => false) ); - } - } - // Calculate zipname - if( self::$exporttype == 'user' ) { - $zipname = 'oc_export_' . self::$uid . '_' . date("y-m-d_H-i-s") . '.zip'; - } else { - $zipname = 'oc_export_' . self::$exporttype . '_' . date("y-m-d_H-i-s") . '.zip'; - } - // Calculate path - if( self::$exporttype == 'user' ) { - self::$zippath = $datadir . '/' . self::$uid . '/' . $zipname; - } else { - if( !is_null( $path ) ) { - // Validate custom path - if( !file_exists( $path ) || !is_writeable( $path ) ) { - OC_Log::write( 'migration', 'Path supplied is invalid.', OC_Log::ERROR ); - return json_encode( array( 'success' => false ) ); - } - self::$zippath = $path . $zipname; - } else { - // Default path - self::$zippath = get_temp_dir() . '/' . $zipname; - } - } - // Create the zip object - if( !self::createZip() ) { - return json_encode( array( 'success' => false ) ); - } - // Do the export - self::findProviders(); - $exportdata = array(); - switch( self::$exporttype ) { - case 'user': - // Connect to the db - self::$dbpath = $datadir . '/' . self::$uid . '/migration.db'; - if( !self::connectDB() ) { - return json_encode( array( 'success' => false ) ); - } - self::$content = new OC_Migration_Content( self::$zip, self::$migration_database ); - // Export the app info - $exportdata = self::exportAppData(); - // Add the data dir to the zip - self::$content->addDir(OC_User::getHome(self::$uid), true, '/' ); - break; - case 'instance': - self::$content = new OC_Migration_Content( self::$zip ); - // Creates a zip that is compatable with the import function - $dbfile = tempnam( get_temp_dir(), "owncloud_export_data_" ); - OC_DB::getDbStructure( $dbfile, 'MDB2_SCHEMA_DUMP_ALL'); - - // Now add in *dbname* and *dbprefix* - $dbexport = file_get_contents( $dbfile ); - $dbnamestring = "<database>\n\n <name>" . OC_Config::getValue( "dbname", "owncloud" ); - $dbtableprefixstring = "<table>\n\n <name>" . OC_Config::getValue( "dbtableprefix", "oc_" ); - $dbexport = str_replace( $dbnamestring, "<database>\n\n <name>*dbname*", $dbexport ); - $dbexport = str_replace( $dbtableprefixstring, "<table>\n\n <name>*dbprefix*", $dbexport ); - // Add the export to the zip - self::$content->addFromString( $dbexport, "dbexport.xml" ); - // Add user data - foreach(OC_User::getUsers() as $user) { - self::$content->addDir(OC_User::getHome($user), true, "/userdata/" ); - } - break; - case 'userfiles': - self::$content = new OC_Migration_Content( self::$zip ); - // Creates a zip with all of the users files - foreach(OC_User::getUsers() as $user) { - self::$content->addDir(OC_User::getHome($user), true, "/" ); - } - break; - case 'system': - self::$content = new OC_Migration_Content( self::$zip ); - // Creates a zip with the owncloud system files - self::$content->addDir( OC::$SERVERROOT . '/', false, '/'); - foreach (array( - ".git", - "3rdparty", - "apps", - "core", - "files", - "l10n", - "lib", - "ocs", - "search", - "settings", - "tests" - ) as $dir) { - self::$content->addDir( OC::$SERVERROOT . '/' . $dir, true, "/"); - } - break; - } - if( !$info = self::getExportInfo( $exportdata ) ) { - return json_encode( array( 'success' => false ) ); - } - // Add the export info json to the export zip - self::$content->addFromString( $info, 'export_info.json' ); - if( !self::$content->finish() ) { - return json_encode( array( 'success' => false ) ); - } - return json_encode( array( 'success' => true, 'data' => self::$zippath ) ); - } - - /** - * imports a user, or owncloud instance - * @param string $path path to zip - * @param string $type type of import (user or instance) - * @param string|null|int $uid userid of new user - * @return string - */ - public static function import( $path, $type='user', $uid=null ) { - - $datadir = OC_Config::getValue( 'datadirectory' ); - // Extract the zip - if( !$extractpath = self::extractZip( $path ) ) { - return json_encode( array( 'success' => false ) ); - } - // Get export_info.json - $scan = scandir( $extractpath ); - // Check for export_info.json - if( !in_array( 'export_info.json', $scan ) ) { - OC_Log::write( 'migration', 'Invalid import file, export_info.json not found', OC_Log::ERROR ); - return json_encode( array( 'success' => false ) ); - } - $json = json_decode( file_get_contents( $extractpath . 'export_info.json' ) ); - if( $json->exporttype != $type ) { - OC_Log::write( 'migration', 'Invalid import file', OC_Log::ERROR ); - return json_encode( array( 'success' => false ) ); - } - self::$exporttype = $type; - - $currentuser = OC_User::getUser(); - - // Have we got a user if type is user - if( self::$exporttype == 'user' ) { - self::$uid = !is_null($uid) ? $uid : $currentuser; - } - - // We need to be an admin if we are not importing our own data - if(($type == 'user' && self::$uid != $currentuser) || $type != 'user' ) { - if( !OC_User::isAdminUser($currentuser)) { - // Naughty. - OC_Log::write( 'migration', 'Import not permitted.', OC_Log::ERROR ); - return json_encode( array( 'success' => false ) ); - } - } - - // Handle export types - switch( self::$exporttype ) { - case 'user': - // Check user availability - if( !OC_User::userExists( self::$uid ) ) { - OC_Log::write( 'migration', 'User doesn\'t exist', OC_Log::ERROR ); - return json_encode( array( 'success' => false ) ); - } - - // Check if the username is valid - if( preg_match( '/[^a-zA-Z0-9 _\.@\-]/', $json->exporteduser )) { - OC_Log::write( 'migration', 'Username is not valid', OC_Log::ERROR ); - return json_encode( array( 'success' => false ) ); - } - - // Copy data - $userfolder = $extractpath . $json->exporteduser; - $newuserfolder = $datadir . '/' . self::$uid; - foreach(scandir($userfolder) as $file){ - if($file !== '.' && $file !== '..' && is_dir($userfolder.'/'.$file)) { - $file = str_replace(array('/', '\\'), '', $file); - - // Then copy the folder over - OC_Helper::copyr($userfolder.'/'.$file, $newuserfolder.'/'.$file); - } - } - // Import user app data - if(file_exists($extractpath . $json->exporteduser . '/migration.db')) { - if( !$appsimported = self::importAppData( $extractpath . $json->exporteduser . '/migration.db', - $json, - self::$uid ) ) { - return json_encode( array( 'success' => false ) ); - } - } - // All done! - if( !self::unlink_r( $extractpath ) ) { - OC_Log::write( 'migration', 'Failed to delete the extracted zip', OC_Log::ERROR ); - } - return json_encode( array( 'success' => true, 'data' => $appsimported ) ); - break; - case 'instance': - /* - * EXPERIMENTAL - // Check for new data dir and dbexport before doing anything - // TODO - - // Delete current data folder. - OC_Log::write( 'migration', "Deleting current data dir", OC_Log::INFO ); - if( !self::unlink_r( $datadir, false ) ) { - OC_Log::write( 'migration', 'Failed to delete the current data dir', OC_Log::ERROR ); - return json_encode( array( 'success' => false ) ); - } - - // Copy over data - if( !self::copy_r( $extractpath . 'userdata', $datadir ) ) { - OC_Log::write( 'migration', 'Failed to copy over data directory', OC_Log::ERROR ); - return json_encode( array( 'success' => false ) ); - } - - // Import the db - if( !OC_DB::replaceDB( $extractpath . 'dbexport.xml' ) ) { - return json_encode( array( 'success' => false ) ); - } - // Done - return json_encode( array( 'success' => true ) ); - */ - break; - } - - } - - /** - * recursively deletes a directory - * @param string $dir path of dir to delete - * @param bool $deleteRootToo delete the root directory - * @return bool - */ - private static function unlink_r( $dir, $deleteRootToo=true ) { - if( !$dh = @opendir( $dir ) ) { - return false; - } - while (false !== ($obj = readdir($dh))) { - if($obj == '.' || $obj == '..') { - continue; - } - if (!@unlink($dir . '/' . $obj)) { - self::unlink_r($dir.'/'.$obj, true); - } - } - closedir($dh); - if ( $deleteRootToo ) { - @rmdir($dir); - } - return true; - } - - /** - * tries to extract the import zip - * @param string $path path to the zip - * @return string path to extract location (with a trailing slash) or false on failure - */ - static private function extractZip( $path ) { - self::$zip = new ZipArchive; - // Validate path - if( !file_exists( $path ) ) { - OC_Log::write( 'migration', 'Zip not found', OC_Log::ERROR ); - return false; - } - if ( self::$zip->open( $path ) != true ) { - OC_Log::write( 'migration', "Failed to open zip file", OC_Log::ERROR ); - return false; - } - $to = get_temp_dir() . '/oc_import_' . self::$exporttype . '_' . date("y-m-d_H-i-s") . '/'; - if( !self::$zip->extractTo( $to ) ) { - return false; - } - self::$zip->close(); - return $to; - } - - /** - * creates a migration.db in the users data dir with their app data in - * @return bool whether operation was successfull - */ - private static function exportAppData( ) { - - $success = true; - $return = array(); - - // Foreach provider - foreach( self::$providers as $provider ) { - // Check if the app is enabled - if( OC_App::isEnabled( $provider->getID() ) ) { - $success = true; - // Does this app use the database? - if( file_exists( OC_App::getAppPath($provider->getID()).'/appinfo/database.xml' ) ) { - // Create some app tables - $tables = self::createAppTables( $provider->getID() ); - if( is_array( $tables ) ) { - // Save the table names - foreach($tables as $table) { - $return['apps'][$provider->getID()]['tables'][] = $table; - } - } else { - // It failed to create the tables - $success = false; - } - } - - // Run the export function? - if( $success ) { - // Set the provider properties - $provider->setData( self::$uid, self::$content ); - $return['apps'][$provider->getID()]['success'] = $provider->export(); - } else { - $return['apps'][$provider->getID()]['success'] = false; - $return['apps'][$provider->getID()]['message'] = 'failed to create the app tables'; - } - - // Now add some app info the the return array - $appinfo = OC_App::getAppInfo( $provider->getID() ); - $return['apps'][$provider->getID()]['version'] = OC_App::getAppVersion($provider->getID()); - } - } - - return $return; - - } - - - /** - * generates json containing export info, and merges any data supplied - * @param array $array of data to include in the returned json - * @return string - */ - static private function getExportInfo( $array=array() ) { - $info = array( - 'ocversion' => OC_Util::getVersion(), - 'exporttime' => time(), - 'exportedby' => OC_User::getUser(), - 'exporttype' => self::$exporttype, - 'exporteduser' => self::$uid - ); - - if( !is_array( $array ) ) { - OC_Log::write( 'migration', 'Supplied $array was not an array in getExportInfo()', OC_Log::ERROR ); - } - // Merge in other data - $info = array_merge( $info, (array)$array ); - // Create json - $json = json_encode( $info ); - return $json; - } - - /** - * connects to migration.db, or creates if not found - * @param string $path to migration.db, defaults to user data dir - * @return bool whether the operation was successful - */ - static private function connectDB( $path=null ) { - // Has the dbpath been set? - self::$dbpath = !is_null( $path ) ? $path : self::$dbpath; - if( !self::$dbpath ) { - OC_Log::write( 'migration', 'connectDB() was called without dbpath being set', OC_Log::ERROR ); - return false; - } - // Already connected - if(!self::$migration_database) { - $datadir = OC_Config::getValue( "datadirectory", OC::$SERVERROOT."/data" ); - $connectionParams = array( - 'path' => self::$dbpath, - 'driver' => 'pdo_sqlite', - ); - $connectionParams['adapter'] = '\OC\DB\AdapterSqlite'; - $connectionParams['wrapperClass'] = 'OC\DB\Connection'; - $connectionParams['tablePrefix'] = ''; - - // Try to establish connection - self::$migration_database = \Doctrine\DBAL\DriverManager::getConnection($connectionParams); - } - return true; - - } - - /** - * creates the tables in migration.db from an apps database.xml - * @param string $appid id of the app - * @return bool whether the operation was successful - */ - static private function createAppTables( $appid ) { - $schema_manager = new OC\DB\MDB2SchemaManager(self::$migration_database); - - // There is a database.xml file - $content = file_get_contents(OC_App::getAppPath($appid) . '/appinfo/database.xml' ); - - $file2 = 'static://db_scheme'; - // TODO get the relative path to migration.db from the data dir - // For now just cheat - $path = pathinfo( self::$dbpath ); - $content = str_replace( '*dbname*', self::$uid.'/migration', $content ); - $content = str_replace( '*dbprefix*', '', $content ); - - $xml = new SimpleXMLElement($content); - foreach($xml->table as $table) { - $tables[] = (string)$table->name; - } - - file_put_contents( $file2, $content ); - - // Try to create tables - try { - $schema_manager->createDbFromStructure($file2); - } catch(Exception $e) { - unlink( $file2 ); - OC_Log::write( 'migration', 'Failed to create tables for: '.$appid, OC_Log::FATAL ); - OC_Log::write( 'migration', $e->getMessage(), OC_Log::FATAL ); - return false; - } - - return $tables; - } - - /** - * tries to create the zip - * @return bool - */ - static private function createZip() { - self::$zip = new ZipArchive; - // Check if properties are set - if( !self::$zippath ) { - OC_Log::write('migration', 'createZip() called but $zip and/or $zippath have not been set', OC_Log::ERROR); - return false; - } - if ( self::$zip->open( self::$zippath, ZIPARCHIVE::CREATE | ZIPARCHIVE::OVERWRITE ) !== true ) { - OC_Log::write('migration', - 'Failed to create the zip with error: '.self::$zip->getStatusString(), - OC_Log::ERROR); - return false; - } else { - return true; - } - } - - /** - * returns an array of apps that support migration - * @return array - */ - static public function getApps() { - $allapps = OC_App::getAllApps(); - foreach($allapps as $app) { - $path = self::getAppPath($app) . '/lib/migrate.php'; - if( file_exists( $path ) ) { - $supportsmigration[] = $app; - } - } - return $supportsmigration; - } - - /** - * imports a new user - * @param string $db string path to migration.db - * @param object $info object of migration info - * @param string|null|int $uid uid to use - * @return array an array of apps with import statuses, or false on failure. - */ - public static function importAppData( $db, $info, $uid=null ) { - // Check if the db exists - if( file_exists( $db ) ) { - // Connect to the db - if(!self::connectDB( $db )) { - OC_Log::write('migration', 'Failed to connect to migration.db', OC_Log::ERROR); - return false; - } - } else { - OC_Log::write('migration', 'Migration.db not found at: '.$db, OC_Log::FATAL ); - return false; - } - - // Find providers - self::findProviders(); - - // Generate importinfo array - $importinfo = array( - 'olduid' => $info->exporteduser, - 'newuid' => self::$uid - ); - - foreach( self::$providers as $provider) { - // Is the app in the export? - $id = $provider->getID(); - if( isset( $info->apps->$id ) ) { - // Is the app installed - if( !OC_App::isEnabled( $id ) ) { - OC_Log::write( 'migration', - 'App: ' . $id . ' is not installed, can\'t import data.', - OC_Log::INFO ); - $appsstatus[$id] = 'notsupported'; - } else { - // Did it succeed on export? - if( $info->apps->$id->success ) { - // Give the provider the content object - if( !self::connectDB( $db ) ) { - return false; - } - $content = new OC_Migration_Content( self::$zip, self::$migration_database ); - $provider->setData( self::$uid, $content, $info ); - // Then do the import - if( !$appsstatus[$id] = $provider->import( $info->apps->$id, $importinfo ) ) { - // Failed to import app - OC_Log::write( 'migration', - 'Failed to import app data for user: ' . self::$uid . ' for app: ' . $id, - OC_Log::ERROR ); - } - } else { - // Add to failed list - $appsstatus[$id] = false; - } - } - } - } - - return $appsstatus; - - } - - /** - * creates a new user in the database - * @param string $uid user_id of the user to be created - * @param string $hash hash of the user to be created - * @return bool result of user creation - */ - public static function createUser( $uid, $hash ) { - - // Check if userid exists - if(OC_User::userExists( $uid )) { - return false; - } - - // Create the user - $query = OC_DB::prepare( "INSERT INTO `*PREFIX*users` ( `uid`, `password` ) VALUES( ?, ? )" ); - $result = $query->execute( array( $uid, $hash)); - if( !$result ) { - OC_Log::write('migration', 'Failed to create the new user "'.$uid."", OC_Log::ERROR); - } - return $result ? true : false; - - } - -} diff --git a/lib/private/migration/content.php b/lib/private/migration/content.php deleted file mode 100644 index cb5d9ad1472..00000000000 --- a/lib/private/migration/content.php +++ /dev/null @@ -1,246 +0,0 @@ -<?php -/** - * ownCloud - * - * @author Tom Needham - * @copyright 2012 Tom Needham tom@owncloud.com - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU AFFERO GENERAL PUBLIC LICENSE for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - * - */ - - -/** - * provides methods to add and access data from the migration - */ -class OC_Migration_Content{ - - private $zip=false; - // Holds the database object - private $db=null; - // Holds an array of tmpfiles to delete after zip creation - private $tmpfiles=array(); - - /** - * sets up the - * @param ZipArchive $zip ZipArchive object - * @param object $db a database object (required for exporttype user) - * @return bool|null - */ - public function __construct( $zip, $db=null ) { - - $this->zip = $zip; - $this->db = $db; - - } - - /** - * prepares the db - * @param string $query the sql query to prepare - */ - public function prepare( $query ) { - - // Only add database to tmpfiles if actually used - if( !is_null( $this->db ) ) { - // Get db path - $db = $this->db->getDatabase(); - if(!in_array($db, $this->tmpfiles)) { - $this->tmpfiles[] = $db; - } - } - - // Optimize the query - $query = $this->processQuery( $query ); - - // Optimize the query - $query = $this->db->prepare( $query ); - $query = new OC_DB_StatementWrapper($query, false); - - return $query; - } - - /** - * processes the db query - * @param string $query the query to process - * @return string of processed query - */ - private function processQuery( $query ) { - $query = str_replace( '`', '\'', $query ); - $query = str_replace( 'NOW()', 'datetime(\'now\')', $query ); - $query = str_replace( 'now()', 'datetime(\'now\')', $query ); - // remove table prefixes - $query = str_replace( '*PREFIX*', '', $query ); - return $query; - } - - /** - * copys rows to migration.db from the main database - * @param array $options array of options. - * @return bool - */ - public function copyRows( $options ) { - if( !array_key_exists( 'table', $options ) ) { - return false; - } - - $return = array(); - - // Need to include 'where' in the query? - if( array_key_exists( 'matchval', $options ) && array_key_exists( 'matchcol', $options ) ) { - - // If only one matchval, create an array - if(!is_array($options['matchval'])) { - $options['matchval'] = array( $options['matchval'] ); - } - - foreach( $options['matchval'] as $matchval ) { - // Run the query for this match value (where x = y value) - $sql = 'SELECT * FROM `*PREFIX*' . $options['table'] . '` WHERE `' . $options['matchcol'] . '` = ?'; - $query = OC_DB::prepare( $sql ); - $results = $query->execute( array( $matchval ) ); - $newreturns = $this->insertData( $results, $options ); - $return = array_merge( $return, $newreturns ); - } - - } else { - // Just get everything - $sql = 'SELECT * FROM `*PREFIX*' . $options['table'] . '`'; - $query = OC_DB::prepare( $sql ); - $results = $query->execute(); - $return = $this->insertData( $results, $options ); - - } - - return $return; - - } - - /** - * saves a sql data set into migration.db - * @param OC_DB_StatementWrapper $data a sql data set returned from self::prepare()->query() - * @param array $options array of copyRows options - * @return void - */ - private function insertData( $data, $options ) { - $return = array(); - // Foreach row of data to insert - while( $row = $data->fetchRow() ) { - // Now save all this to the migration.db - foreach($row as $field=>$value) { - $fields[] = $field; - $values[] = $value; - } - - // Generate some sql - $sql = "INSERT INTO `" . $options['table'] . '` ( `'; - $fieldssql = implode( '`, `', $fields ); - $sql .= $fieldssql . "` ) VALUES( "; - $valuessql = substr( str_repeat( '?, ', count( $fields ) ), 0, -2 ); - $sql .= $valuessql . " )"; - // Make the query - $query = $this->prepare( $sql ); - $query->execute( $values ); - // Do we need to return some values? - if( array_key_exists( 'idcol', $options ) ) { - // Yes we do - $return[] = $row[$options['idcol']]; - } else { - // Take a guess and return the first field :) - $return[] = reset($row); - } - $fields = ''; - $values = ''; - } - return $return; - } - - /** - * adds a directory to the zip object - * @param boolean|string $dir string path of the directory to add - * @param bool $recursive - * @param string $internaldir path of folder to add dir to in zip - * @return bool - */ - public function addDir( $dir, $recursive=true, $internaldir='' ) { - $dirname = basename($dir); - $this->zip->addEmptyDir($internaldir . $dirname); - $internaldir.=$dirname.='/'; - if( !file_exists( $dir ) ) { - return false; - } - $dirhandle = opendir($dir); - if(is_resource($dirhandle)) { - while (false !== ( $file = readdir($dirhandle))) { - - if (( $file != '.' ) && ( $file != '..' )) { - - if (is_dir($dir . '/' . $file) && $recursive) { - $this->addDir($dir . '/' . $file, $recursive, $internaldir); - } elseif (is_file($dir . '/' . $file)) { - $this->zip->addFile($dir . '/' . $file, $internaldir . $file); - } - } - } - closedir($dirhandle); - } else { - OC_Log::write('admin_export', "Was not able to open directory: " . $dir, OC_Log::ERROR); - return false; - } - return true; - } - - /** - * adds a file to the zip from a given string - * @param string $data string of data to add - * @param string $path the relative path inside of the zip to save the file to - * @return bool - */ - public function addFromString( $data, $path ) { - // Create a temp file - $file = tempnam( get_temp_dir(). '/', 'oc_export_tmp_' ); - $this->tmpfiles[] = $file; - if( !file_put_contents( $file, $data ) ) { - OC_Log::write( 'migation', 'Failed to save data to a temporary file', OC_Log::ERROR ); - return false; - } - // Add file to the zip - $this->zip->addFile( $file, $path ); - return true; - } - - /** - * closes the zip, removes temp files - * @return bool - */ - public function finish() { - if( !$this->zip->close() ) { - OC_Log::write( 'migration', - 'Failed to write the zip file with error: '.$this->zip->getStatusString(), - OC_Log::ERROR ); - return false; - } - $this->cleanup(); - return true; - } - - /** - * cleans up after the zip - */ - private function cleanup() { - // Delete tmp files - foreach($this->tmpfiles as $i) { - unlink( $i ); - } - } -} diff --git a/lib/private/migration/provider.php b/lib/private/migration/provider.php deleted file mode 100644 index a7c611dcdd4..00000000000 --- a/lib/private/migration/provider.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php -/** - * provides search functionalty - */ -abstract class OC_Migration_Provider{ - - protected $id=false; - protected $content=false; - protected $uid=false; - protected $olduid=false; - protected $appinfo=false; - - public function __construct( $appid ) { - // Set the id - $this->id = $appid; - OC_Migrate::registerProvider( $this ); - } - - /** - * exports data for apps - * @return array appdata to be exported - */ - abstract function export( ); - - /** - * imports data for the app - * @return void - */ - abstract function import( ); - - /** - * sets the OC_Migration_Content object to $this->content - * @param OC_Migration_Content $content a OC_Migration_Content object - */ - public function setData( $uid, $content, $info=null ) { - $this->content = $content; - $this->uid = $uid; - $id = $this->id; - if( !is_null( $info ) ) { - $this->olduid = $info->exporteduser; - $this->appinfo = $info->apps->$id; - } - } - - /** - * returns the appid of the provider - * @return string - */ - public function getID() { - return $this->id; - } -} diff --git a/lib/private/naturalsort.php b/lib/private/naturalsort.php index eb00f99a672..6e259630f79 100644 --- a/lib/private/naturalsort.php +++ b/lib/private/naturalsort.php @@ -9,16 +9,6 @@ namespace OC; -class NaturalSort_DefaultCollator { - - public function compare($a, $b) { - if ($a === $b) { - return 0; - } - return ($a < $b) ? -1 : 1; - } -} - class NaturalSort { private static $instance; private $collator; @@ -114,4 +104,3 @@ class NaturalSort { return self::$instance; } } - diff --git a/lib/private/naturalsort_defaultcollator.php b/lib/private/naturalsort_defaultcollator.php new file mode 100644 index 00000000000..e1007f8d7b4 --- /dev/null +++ b/lib/private/naturalsort_defaultcollator.php @@ -0,0 +1,19 @@ +<?php +/** + * Copyright (c) 2014 Vincent Petry <PVince81@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + * + */ + +namespace OC; + +class NaturalSort_DefaultCollator { + public function compare($a, $b) { + if ($a === $b) { + return 0; + } + return ($a < $b) ? -1 : 1; + } +} diff --git a/lib/private/preview.php b/lib/private/preview.php index f50bdcb4c9e..7305bf1cc0e 100644 --- a/lib/private/preview.php +++ b/lib/private/preview.php @@ -16,14 +16,6 @@ namespace OC; use OC\Preview\Provider; use OCP\Files\NotFoundException; -require_once 'preview/image.php'; -require_once 'preview/movies.php'; -require_once 'preview/mp3.php'; -require_once 'preview/svg.php'; -require_once 'preview/txt.php'; -require_once 'preview/office.php'; -require_once 'preview/bitmap.php'; - class Preview { //the thumbnail folder const THUMBNAILS_FOLDER = 'thumbnails'; @@ -106,7 +98,7 @@ class Preview { self::initProviders(); } - if (empty(self::$providers)) { + if (empty(self::$providers) && \OC::$server->getConfig()->getSystemValue('enable_previews', true)) { \OC_Log::write('core', 'No preview providers exist', \OC_Log::ERROR); throw new \Exception('No preview providers'); } @@ -713,7 +705,7 @@ class Preview { * - OC\Preview\OpenDocument * - OC\Preview\StarOffice * - OC\Preview\SVG - * - OC\Preview\Movies + * - OC\Preview\Movie * - OC\Preview\PDF * - OC\Preview\TIFF * - OC\Preview\Illustrator @@ -744,10 +736,11 @@ class Preview { return; } - if (count(self::$providers) > 0) { + if (!empty(self::$providers)) { return; } + self::registerCoreProviders(); foreach (self::$registeredProviders as $provider) { $class = $provider['class']; $options = $provider['options']; @@ -759,7 +752,74 @@ class Preview { $keys = array_map('strlen', array_keys(self::$providers)); array_multisort($keys, SORT_DESC, self::$providers); + } + protected static function registerCoreProviders() { + self::registerProvider('OC\Preview\TXT'); + self::registerProvider('OC\Preview\MarkDown'); + self::registerProvider('OC\Preview\Image'); + self::registerProvider('OC\Preview\MP3'); + + // SVG, Office and Bitmap require imagick + if (extension_loaded('imagick')) { + $checkImagick = new \Imagick(); + + $imagickProviders = array( + 'SVG' => 'OC\Preview\SVG', + 'TIFF' => 'OC\Preview\TIFF', + 'PDF' => 'OC\Preview\PDF', + 'AI' => 'OC\Preview\Illustrator', + 'PSD' => 'OC\Preview\Photoshop', + // Requires adding 'eps' => array('application/postscript', null), to lib/private/mimetypes.list.php + 'EPS' => 'OC\Preview\Postscript', + ); + + foreach ($imagickProviders as $queryFormat => $provider) { + if (count($checkImagick->queryFormats($queryFormat)) === 1) { + self::registerProvider($provider); + } + } + + if (count($checkImagick->queryFormats('PDF')) === 1) { + // Office previews are currently not supported on Windows + if (!\OC_Util::runningOnWindows() && \OC_Helper::is_function_enabled('shell_exec')) { + $officeFound = is_string(\OC::$server->getConfig()->getSystemValue('preview_libreoffice_path', null)); + + if (!$officeFound) { + //let's see if there is libreoffice or openoffice on this machine + $whichLibreOffice = shell_exec('command -v libreoffice'); + $officeFound = !empty($whichLibreOffice); + if (!$officeFound) { + $whichOpenOffice = shell_exec('command -v openoffice'); + $officeFound = !empty($whichOpenOffice); + } + } + + if ($officeFound) { + self::registerProvider('OC\Preview\MSOfficeDoc'); + self::registerProvider('OC\Preview\MSOffice2003'); + self::registerProvider('OC\Preview\MSOffice2007'); + self::registerProvider('OC\Preview\OpenDocument'); + self::registerProvider('OC\Preview\StarOffice'); + } + } + } + } + + // Video requires avconv or ffmpeg and is therefor + // currently not supported on Windows. + if (!\OC_Util::runningOnWindows()) { + $avconvBinary = \OC_Helper::findBinaryPath('avconv'); + $ffmpegBinary = ($avconvBinary) ? null : \OC_Helper::findBinaryPath('ffmpeg'); + + if ($avconvBinary || $ffmpegBinary) { + // FIXME // a bit hacky but didn't want to use subclasses + \OC\Preview\Movie::$avconvBinary = $avconvBinary; + \OC\Preview\Movie::$ffmpegBinary = $ffmpegBinary; + + self::registerProvider('OC\Preview\Movie'); + } + } } /** @@ -892,16 +952,6 @@ class Preview { self::initProviders(); } - // FIXME: Ugly hack to prevent SVG of being returned if the SVG - // provider is not enabled. - // This is required because the preview system is designed in a - // bad way and relies on opt-in with asterisks (i.e. image/*) - // which will lead to the fact that a SVG will also match the image - // provider. - if($mimeType === 'image/svg+xml' && !array_key_exists('/image\/svg\+xml/', self::$providers)) { - return false; - } - foreach(self::$providers as $supportedMimetype => $provider) { if(preg_match($supportedMimetype, $mimeType)) { return true; diff --git a/lib/private/preview/bitmap.php b/lib/private/preview/bitmap.php index 748a63a6afa..25f65cf7fc9 100644 --- a/lib/private/preview/bitmap.php +++ b/lib/private/preview/bitmap.php @@ -5,113 +5,33 @@ * later. * See the COPYING-README file. */ -namespace OC\Preview; - -use Imagick; - -if (extension_loaded('imagick')) { - - $checkImagick = new Imagick(); - - class Bitmap extends Provider { - - public function getMimeType() { - return null; - } - - public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview) { - $tmpPath = $fileview->toTmpFile($path); - //create imagick object from bitmap or vector file - try{ - // Layer 0 contains either the bitmap or - // a flat representation of all vector layers - $bp = new Imagick($tmpPath . '[0]'); - - $bp->setImageFormat('png'); - } catch (\Exception $e) { - \OC_Log::write('core', $e->getmessage(), \OC_Log::ERROR); - return false; - } - - unlink($tmpPath); - - //new bitmap image object - $image = new \OC_Image($bp); - //check if image object is valid - return $image->valid() ? $image : false; - } - - } - - if(count($checkImagick->queryFormats('PDF')) === 1) { - - //.pdf - class PDF extends Bitmap { - - public function getMimeType() { - return '/application\/pdf/'; - } - - } - - \OC\Preview::registerProvider('OC\Preview\PDF'); - } - - if(count($checkImagick->queryFormats('TIFF')) === 1) { - - //.tiff - class TIFF extends Bitmap { - - public function getMimeType() { - return '/image\/tiff/'; - } - - } - - \OC\Preview::registerProvider('OC\Preview\TIFF'); - } - - if(count($checkImagick->queryFormats('AI')) === 1) { - - //.ai - class Illustrator extends Bitmap { - - public function getMimeType() { - return '/application\/illustrator/'; - } - - } - - \OC\Preview::registerProvider('OC\Preview\Illustrator'); - } - - // Requires adding 'eps' => array('application/postscript', null), to lib/private/mimetypes.list.php - if(count($checkImagick->queryFormats('EPS')) === 1) { - - //.eps - class Postscript extends Bitmap { - - public function getMimeType() { - return '/application\/postscript/'; - } +namespace OC\Preview; +abstract class Bitmap extends Provider { + /** + * {@inheritDoc} + */ + public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview) { + $tmpPath = $fileview->toTmpFile($path); + + //create imagick object from bitmap or vector file + try { + // Layer 0 contains either the bitmap or + // a flat representation of all vector layers + $bp = new \Imagick($tmpPath . '[0]'); + + $bp->setImageFormat('png'); + } catch (\Exception $e) { + \OC_Log::write('core', $e->getmessage(), \OC_Log::ERROR); + return false; } - \OC\Preview::registerProvider('OC\Preview\Postscript'); - } - - if(count($checkImagick->queryFormats('PSD')) === 1) { - - //.psd - class Photoshop extends Bitmap { - - public function getMimeType() { - return '/application\/x-photoshop/'; - } + unlink($tmpPath); - } - - \OC\Preview::registerProvider('OC\Preview\Photoshop'); + //new bitmap image object + $image = new \OC_Image($bp); + //check if image object is valid + return $image->valid() ? $image : false; } } diff --git a/lib/private/preview/illustrator.php b/lib/private/preview/illustrator.php new file mode 100644 index 00000000000..e88c305f708 --- /dev/null +++ b/lib/private/preview/illustrator.php @@ -0,0 +1,19 @@ +<?php +/** + * Copyright (c) 2013-2014 Georg Ehrke georg@ownCloud.com + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OC\Preview; + +//.ai +class Illustrator extends Bitmap { + /** + * {@inheritDoc} + */ + public function getMimeType() { + return '/application\/illustrator/'; + } +} diff --git a/lib/private/preview/image.php b/lib/private/preview/image.php index ec5b87befea..986a44b48fd 100644 --- a/lib/private/preview/image.php +++ b/lib/private/preview/image.php @@ -9,11 +9,16 @@ namespace OC\Preview; class Image extends Provider { - + /** + * {@inheritDoc} + */ public function getMimeType() { - return '/image\/.*/'; + return '/image\/(?!tiff$)(?!svg.*).*/'; } + /** + * {@inheritDoc} + */ public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview) { //get fileinfo $fileInfo = $fileview->getFileInfo($path); @@ -35,5 +40,3 @@ class Image extends Provider { } } - -\OC\Preview::registerProvider('OC\Preview\Image'); diff --git a/lib/private/preview/markdown.php b/lib/private/preview/markdown.php new file mode 100644 index 00000000000..1be01fcdd4c --- /dev/null +++ b/lib/private/preview/markdown.php @@ -0,0 +1,18 @@ +<?php +/** + * Copyright (c) 2013 Georg Ehrke georg@ownCloud.com + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ +namespace OC\Preview; + +class MarkDown extends TXT { + /** + * {@inheritDoc} + */ + public function getMimeType() { + return '/text\/(x-)?markdown/'; + } + +} diff --git a/lib/private/preview/movie.php b/lib/private/preview/movie.php new file mode 100644 index 00000000000..06353ddebb7 --- /dev/null +++ b/lib/private/preview/movie.php @@ -0,0 +1,94 @@ +<?php +/** + * Copyright (c) 2013 Frank Karlitschek frank@owncloud.org + * Copyright (c) 2013 Georg Ehrke georg@ownCloud.com + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ +namespace OC\Preview; + +class Movie extends Provider { + public static $avconvBinary; + public static $ffmpegBinary; + + /** + * {@inheritDoc} + */ + public function getMimeType() { + return '/video\/.*/'; + } + + /** + * {@inheritDoc} + */ + public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview) { + // TODO: use proc_open() and stream the source file ? + + $fileInfo = $fileview->getFileInfo($path); + $useFileDirectly = (!$fileInfo->isEncrypted() && !$fileInfo->isMounted()); + + if ($useFileDirectly) { + $absPath = $fileview->getLocalFile($path); + } else { + $absPath = \OC_Helper::tmpFile(); + + $handle = $fileview->fopen($path, 'rb'); + + // we better use 5MB (1024 * 1024 * 5 = 5242880) instead of 1MB. + // in some cases 1MB was no enough to generate thumbnail + $firstmb = stream_get_contents($handle, 5242880); + file_put_contents($absPath, $firstmb); + } + + $result = $this->generateThumbNail($maxX, $maxY, $absPath, 5); + if ($result === false) { + $result = $this->generateThumbNail($maxX, $maxY, $absPath, 1); + if ($result === false) { + $result = $this->generateThumbNail($maxX, $maxY, $absPath, 0); + } + } + + if (!$useFileDirectly) { + unlink($absPath); + } + + return $result; + } + + /** + * @param int $maxX + * @param int $maxY + * @param string $absPath + * @param int $second + * @return bool|\OC_Image + */ + private function generateThumbNail($maxX, $maxY, $absPath, $second) { + $tmpPath = \OC_Helper::tmpFile(); + + if (self::$avconvBinary) { + $cmd = self::$avconvBinary . ' -an -y -ss ' . escapeshellarg($second) . + ' -i ' . escapeshellarg($absPath) . + ' -f mjpeg -vframes 1 -vsync 1 ' . escapeshellarg($tmpPath) . + ' > /dev/null 2>&1'; + } else { + $cmd = self::$ffmpegBinary . ' -y -ss ' . escapeshellarg($second) . + ' -i ' . escapeshellarg($absPath) . + ' -f mjpeg -vframes 1' . + ' -s ' . escapeshellarg($maxX) . 'x' . escapeshellarg($maxY) . + ' ' . escapeshellarg($tmpPath) . + ' > /dev/null 2>&1'; + } + + exec($cmd, $output, $returnCode); + + if ($returnCode === 0) { + $image = new \OC_Image(); + $image->loadFromFile($tmpPath); + unlink($tmpPath); + return $image->valid() ? $image : false; + } + unlink($tmpPath); + return false; + } +} diff --git a/lib/private/preview/movies.php b/lib/private/preview/movies.php deleted file mode 100644 index 2a23c2141c1..00000000000 --- a/lib/private/preview/movies.php +++ /dev/null @@ -1,122 +0,0 @@ -<?php -/** - * Copyright (c) 2013 Frank Karlitschek frank@owncloud.org - * Copyright (c) 2013 Georg Ehrke georg@ownCloud.com - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ -namespace OC\Preview; - -function findBinaryPath($program) { - exec('command -v ' . escapeshellarg($program) . ' 2> /dev/null', $output, $returnCode); - if ($returnCode === 0 && count($output) > 0) { - return escapeshellcmd($output[0]); - } - return null; -} - -// movie preview is currently not supported on Windows -if (!\OC_Util::runningOnWindows()) { - $isExecEnabled = \OC_Helper::is_function_enabled('exec'); - $ffmpegBinary = null; - $avconvBinary = null; - - if ($isExecEnabled) { - $avconvBinary = findBinaryPath('avconv'); - if (!$avconvBinary) { - $ffmpegBinary = findBinaryPath('ffmpeg'); - } - } - - if($isExecEnabled && ( $avconvBinary || $ffmpegBinary )) { - - class Movie extends Provider { - public static $avconvBinary; - public static $ffmpegBinary; - - public function getMimeType() { - return '/video\/.*/'; - } - - public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview) { - // TODO: use proc_open() and stream the source file ? - - $fileInfo = $fileview->getFileInfo($path); - $useFileDirectly = (!$fileInfo->isEncrypted() && !$fileInfo->isMounted()); - - if ($useFileDirectly) { - $absPath = $fileview->getLocalFile($path); - } else { - $absPath = \OC_Helper::tmpFile(); - - $handle = $fileview->fopen($path, 'rb'); - - // we better use 5MB (1024 * 1024 * 5 = 5242880) instead of 1MB. - // in some cases 1MB was no enough to generate thumbnail - $firstmb = stream_get_contents($handle, 5242880); - file_put_contents($absPath, $firstmb); - } - - $result = $this->generateThumbNail($maxX, $maxY, $absPath, 5); - if ($result === false) { - $result = $this->generateThumbNail($maxX, $maxY, $absPath, 1); - if ($result === false) { - $result = $this->generateThumbNail($maxX, $maxY, $absPath, 0); - } - } - - if (!$useFileDirectly) { - unlink($absPath); - } - - return $result; - } - - /** - * @param int $maxX - * @param int $maxY - * @param string $absPath - * @param string $tmpPath - * @param int $second - * @return bool|\OC_Image - */ - private function generateThumbNail($maxX, $maxY, $absPath, $second) - { - $tmpPath = \OC_Helper::tmpFile(); - - if (self::$avconvBinary) { - $cmd = self::$avconvBinary . ' -an -y -ss ' . escapeshellarg($second) . - ' -i ' . escapeshellarg($absPath) . - ' -f mjpeg -vframes 1 -vsync 1 ' . escapeshellarg($tmpPath) . - ' > /dev/null 2>&1'; - } else { - $cmd = self::$ffmpegBinary . ' -y -ss ' . escapeshellarg($second) . - ' -i ' . escapeshellarg($absPath) . - ' -f mjpeg -vframes 1' . - ' -s ' . escapeshellarg($maxX) . 'x' . escapeshellarg($maxY) . - ' ' . escapeshellarg($tmpPath) . - ' > /dev/null 2>&1'; - } - - exec($cmd, $output, $returnCode); - - if ($returnCode === 0) { - $image = new \OC_Image(); - $image->loadFromFile($tmpPath); - unlink($tmpPath); - return $image->valid() ? $image : false; - } - unlink($tmpPath); - return false; - } - } - - // a bit hacky but didn't want to use subclasses - Movie::$avconvBinary = $avconvBinary; - Movie::$ffmpegBinary = $ffmpegBinary; - - \OC\Preview::registerProvider('OC\Preview\Movie'); - } -} - diff --git a/lib/private/preview/mp3.php b/lib/private/preview/mp3.php index bb4d3dfce86..f1a50d99e13 100644 --- a/lib/private/preview/mp3.php +++ b/lib/private/preview/mp3.php @@ -8,11 +8,16 @@ namespace OC\Preview; class MP3 extends Provider { - + /** + * {@inheritDoc} + */ public function getMimeType() { return '/audio\/mpeg/'; } + /** + * {@inheritDoc} + */ public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview) { $getID3 = new \getID3(); @@ -31,6 +36,12 @@ class MP3 extends Provider { return $this->getNoCoverThumbnail(); } + /** + * Generates a default image when the file has no cover + * + * @return false|\OC_Image False if the default image is missing or invalid, + * otherwise the image is returned as \OC_Image + */ private function getNoCoverThumbnail() { $icon = \OC::$SERVERROOT . '/core/img/filetypes/audio.png'; @@ -44,5 +55,3 @@ class MP3 extends Provider { } } - -\OC\Preview::registerProvider('OC\Preview\MP3'); diff --git a/lib/private/preview/msoffice2003.php b/lib/private/preview/msoffice2003.php new file mode 100644 index 00000000000..55fbe708435 --- /dev/null +++ b/lib/private/preview/msoffice2003.php @@ -0,0 +1,18 @@ +<?php +/** + * Copyright (c) 2013 Georg Ehrke georg@ownCloud.com + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ +namespace OC\Preview; + +//.docm, .dotm, .xls(m), .xlt(m), .xla(m), .ppt(m), .pot(m), .pps(m), .ppa(m) +class MSOffice2003 extends Office { + /** + * {@inheritDoc} + */ + public function getMimeType() { + return '/application\/vnd.ms-.*/'; + } +} diff --git a/lib/private/preview/msoffice2007.php b/lib/private/preview/msoffice2007.php new file mode 100644 index 00000000000..ace246eb6d9 --- /dev/null +++ b/lib/private/preview/msoffice2007.php @@ -0,0 +1,18 @@ +<?php +/** + * Copyright (c) 2013 Georg Ehrke georg@ownCloud.com + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ +namespace OC\Preview; + +//.docx, .dotx, .xlsx, .xltx, .pptx, .potx, .ppsx +class MSOffice2007 extends Office { + /** + * {@inheritDoc} + */ + public function getMimeType() { + return '/application\/vnd.openxmlformats-officedocument.*/'; + } +} diff --git a/lib/private/preview/msofficedoc.php b/lib/private/preview/msofficedoc.php new file mode 100644 index 00000000000..42507af2233 --- /dev/null +++ b/lib/private/preview/msofficedoc.php @@ -0,0 +1,18 @@ +<?php +/** + * Copyright (c) 2013 Georg Ehrke georg@ownCloud.com + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ +namespace OC\Preview; + +//.doc, .dot +class MSOfficeDoc extends Office { + /** + * {@inheritDoc} + */ + public function getMimeType() { + return '/application\/msword/'; + } +} diff --git a/lib/private/preview/office-cl.php b/lib/private/preview/office-cl.php deleted file mode 100644 index f5c791e37f2..00000000000 --- a/lib/private/preview/office-cl.php +++ /dev/null @@ -1,138 +0,0 @@ -<?php -/** - * Copyright (c) 2013 Georg Ehrke georg@ownCloud.com - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ -namespace OC\Preview; - -// office preview is currently not supported on Windows -if (!\OC_Util::runningOnWindows()) { - - //we need imagick to convert - class Office extends Provider { - - private $cmd; - - public function getMimeType() { - return null; - } - - public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview) { - $this->initCmd(); - if(is_null($this->cmd)) { - return false; - } - - $absPath = $fileview->toTmpFile($path); - - $tmpDir = get_temp_dir(); - - $defaultParameters = ' -env:UserInstallation=file://' . escapeshellarg($tmpDir . '/owncloud-' . \OC_Util::getInstanceId().'/') . ' --headless --nologo --nofirststartwizard --invisible --norestore --convert-to pdf --outdir '; - $clParameters = \OCP\Config::getSystemValue('preview_office_cl_parameters', $defaultParameters); - - $exec = $this->cmd . $clParameters . escapeshellarg($tmpDir) . ' ' . escapeshellarg($absPath); - - shell_exec($exec); - - //create imagick object from pdf - try{ - $pdf = new \imagick($absPath . '.pdf' . '[0]'); - $pdf->setImageFormat('jpg'); - } catch (\Exception $e) { - unlink($absPath); - unlink($absPath . '.pdf'); - \OC_Log::write('core', $e->getmessage(), \OC_Log::ERROR); - return false; - } - - $image = new \OC_Image(); - $image->loadFromData($pdf); - - unlink($absPath); - unlink($absPath . '.pdf'); - - return $image->valid() ? $image : false; - } - - private function initCmd() { - $cmd = ''; - - if(is_string(\OC_Config::getValue('preview_libreoffice_path', null))) { - $cmd = \OC_Config::getValue('preview_libreoffice_path', null); - } - - $whichLibreOffice = shell_exec('command -v libreoffice'); - if($cmd === '' && !empty($whichLibreOffice)) { - $cmd = 'libreoffice'; - } - - $whichOpenOffice = shell_exec('command -v openoffice'); - if($cmd === '' && !empty($whichOpenOffice)) { - $cmd = 'openoffice'; - } - - if($cmd === '') { - $cmd = null; - } - - $this->cmd = $cmd; - } - } - - //.doc, .dot - class MSOfficeDoc extends Office { - - public function getMimeType() { - return '/application\/msword/'; - } - - } - - \OC\Preview::registerProvider('OC\Preview\MSOfficeDoc'); - - //.docm, .dotm, .xls(m), .xlt(m), .xla(m), .ppt(m), .pot(m), .pps(m), .ppa(m) - class MSOffice2003 extends Office { - - public function getMimeType() { - return '/application\/vnd.ms-.*/'; - } - - } - - \OC\Preview::registerProvider('OC\Preview\MSOffice2003'); - - //.docx, .dotx, .xlsx, .xltx, .pptx, .potx, .ppsx - class MSOffice2007 extends Office { - - public function getMimeType() { - return '/application\/vnd.openxmlformats-officedocument.*/'; - } - - } - - \OC\Preview::registerProvider('OC\Preview\MSOffice2007'); - - //.odt, .ott, .oth, .odm, .odg, .otg, .odp, .otp, .ods, .ots, .odc, .odf, .odb, .odi, .oxt - class OpenDocument extends Office { - - public function getMimeType() { - return '/application\/vnd.oasis.opendocument.*/'; - } - - } - - \OC\Preview::registerProvider('OC\Preview\OpenDocument'); - - //.sxw, .stw, .sxc, .stc, .sxd, .std, .sxi, .sti, .sxg, .sxm - class StarOffice extends Office { - - public function getMimeType() { - return '/application\/vnd.sun.xml.*/'; - } - - } - - \OC\Preview::registerProvider('OC\Preview\StarOffice'); -} diff --git a/lib/private/preview/office.php b/lib/private/preview/office.php index b47cbc6e08f..5bd61bde3be 100644 --- a/lib/private/preview/office.php +++ b/lib/private/preview/office.php @@ -5,24 +5,72 @@ * later. * See the COPYING-README file. */ -//both, libreoffice backend and php fallback, need imagick -if (extension_loaded('imagick')) { - - $checkImagick = new Imagick(); - - if(count($checkImagick->queryFormats('PDF')) === 1) { - $isShellExecEnabled = \OC_Helper::is_function_enabled('shell_exec'); - - // LibreOffice preview is currently not supported on Windows - if (!\OC_Util::runningOnWindows()) { - $whichLibreOffice = ($isShellExecEnabled ? shell_exec('command -v libreoffice') : ''); - $isLibreOfficeAvailable = !empty($whichLibreOffice); - $whichOpenOffice = ($isShellExecEnabled ? shell_exec('command -v openoffice') : ''); - $isOpenOfficeAvailable = !empty($whichOpenOffice); - //let's see if there is libreoffice or openoffice on this machine - if($isShellExecEnabled && ($isLibreOfficeAvailable || $isOpenOfficeAvailable || is_string(\OC_Config::getValue('preview_libreoffice_path', null)))) { - require_once('office-cl.php'); - } +namespace OC\Preview; + +abstract class Office extends Provider { + private $cmd; + + /** + * {@inheritDoc} + */ + public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview) { + $this->initCmd(); + if(is_null($this->cmd)) { + return false; + } + + $absPath = $fileview->toTmpFile($path); + + $tmpDir = get_temp_dir(); + + $defaultParameters = ' -env:UserInstallation=file://' . escapeshellarg($tmpDir . '/owncloud-' . \OC_Util::getInstanceId().'/') . ' --headless --nologo --nofirststartwizard --invisible --norestore --convert-to pdf --outdir '; + $clParameters = \OCP\Config::getSystemValue('preview_office_cl_parameters', $defaultParameters); + + $exec = $this->cmd . $clParameters . escapeshellarg($tmpDir) . ' ' . escapeshellarg($absPath); + + shell_exec($exec); + + //create imagick object from pdf + try{ + $pdf = new \imagick($absPath . '.pdf' . '[0]'); + $pdf->setImageFormat('jpg'); + } catch (\Exception $e) { + unlink($absPath); + unlink($absPath . '.pdf'); + \OC_Log::write('core', $e->getmessage(), \OC_Log::ERROR); + return false; } + + $image = new \OC_Image(); + $image->loadFromData($pdf); + + unlink($absPath); + unlink($absPath . '.pdf'); + + return $image->valid() ? $image : false; + } + + private function initCmd() { + $cmd = ''; + + if(is_string(\OC_Config::getValue('preview_libreoffice_path', null))) { + $cmd = \OC_Config::getValue('preview_libreoffice_path', null); + } + + $whichLibreOffice = shell_exec('command -v libreoffice'); + if($cmd === '' && !empty($whichLibreOffice)) { + $cmd = 'libreoffice'; + } + + $whichOpenOffice = shell_exec('command -v openoffice'); + if($cmd === '' && !empty($whichOpenOffice)) { + $cmd = 'openoffice'; + } + + if($cmd === '') { + $cmd = null; + } + + $this->cmd = $cmd; } } diff --git a/lib/private/preview/opendocument.php b/lib/private/preview/opendocument.php new file mode 100644 index 00000000000..fe1468ee941 --- /dev/null +++ b/lib/private/preview/opendocument.php @@ -0,0 +1,18 @@ +<?php +/** + * Copyright (c) 2013 Georg Ehrke georg@ownCloud.com + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ +namespace OC\Preview; + +//.odt, .ott, .oth, .odm, .odg, .otg, .odp, .otp, .ods, .ots, .odc, .odf, .odb, .odi, .oxt +class OpenDocument extends Office { + /** + * {@inheritDoc} + */ + public function getMimeType() { + return '/application\/vnd.oasis.opendocument.*/'; + } +} diff --git a/lib/private/preview/pdf.php b/lib/private/preview/pdf.php new file mode 100644 index 00000000000..cb13074ff60 --- /dev/null +++ b/lib/private/preview/pdf.php @@ -0,0 +1,19 @@ +<?php +/** + * Copyright (c) 2013-2014 Georg Ehrke georg@ownCloud.com + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OC\Preview; + +//.pdf +class PDF extends Bitmap { + /** + * {@inheritDoc} + */ + public function getMimeType() { + return '/application\/pdf/'; + } +} diff --git a/lib/private/preview/photoshop.php b/lib/private/preview/photoshop.php new file mode 100644 index 00000000000..f5f60ce4de8 --- /dev/null +++ b/lib/private/preview/photoshop.php @@ -0,0 +1,19 @@ +<?php +/** + * Copyright (c) 2013-2014 Georg Ehrke georg@ownCloud.com + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OC\Preview; + +//.psd +class Photoshop extends Bitmap { + /** + * {@inheritDoc} + */ + public function getMimeType() { + return '/application\/x-photoshop/'; + } +} diff --git a/lib/private/preview/postscript.php b/lib/private/preview/postscript.php new file mode 100644 index 00000000000..7c8b089d92e --- /dev/null +++ b/lib/private/preview/postscript.php @@ -0,0 +1,19 @@ +<?php +/** + * Copyright (c) 2013-2014 Georg Ehrke georg@ownCloud.com + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OC\Preview; + +//.eps +class Postscript extends Bitmap { + /** + * {@inheritDoc} + */ + public function getMimeType() { + return '/application\/postscript/'; + } +} diff --git a/lib/private/preview/provider.php b/lib/private/preview/provider.php index f544c2c4b13..ead67eaeef7 100644 --- a/lib/private/preview/provider.php +++ b/lib/private/preview/provider.php @@ -5,18 +5,21 @@ abstract class Provider { private $options; public function __construct($options) { - $this->options=$options; + $this->options = $options; } + /** + * @return string Regex with the mimetypes that are supported by this provider + */ abstract public function getMimeType(); /** * Check if a preview can be generated for $path * - * @param string $path + * @param \OC\Files\FileInfo $file * @return bool */ - public function isAvailable($path) { + public function isAvailable($file) { return true; } @@ -26,11 +29,10 @@ abstract class Provider { * @param int $maxX The maximum X size of the thumbnail. It can be smaller depending on the shape of the image * @param int $maxY The maximum Y size of the thumbnail. It can be smaller depending on the shape of the image * @param bool $scalingup Disable/Enable upscaling of previews - * @param object $fileview fileview object of user folder + * @param \OC\Files\View $fileview fileview object of user folder * @return mixed * false if no preview was generated * OC_Image object of the preview */ abstract public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview); - } diff --git a/lib/private/preview/staroffice.php b/lib/private/preview/staroffice.php new file mode 100644 index 00000000000..73ad368b341 --- /dev/null +++ b/lib/private/preview/staroffice.php @@ -0,0 +1,18 @@ +<?php +/** + * Copyright (c) 2013 Georg Ehrke georg@ownCloud.com + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ +namespace OC\Preview; + +//.sxw, .stw, .sxc, .stc, .sxd, .std, .sxi, .sti, .sxg, .sxm +class StarOffice extends Office { + /** + * {@inheritDoc} + */ + public function getMimeType() { + return '/application\/vnd.sun.xml.*/'; + } +} diff --git a/lib/private/preview/svg.php b/lib/private/preview/svg.php index 0b5dbc9716f..561e87a6500 100644 --- a/lib/private/preview/svg.php +++ b/lib/private/preview/svg.php @@ -7,52 +7,43 @@ */ namespace OC\Preview; -use Imagick; - -if (extension_loaded('imagick')) { - - $checkImagick = new Imagick(); - - if(count($checkImagick->queryFormats('SVG')) === 1) { - - class SVG extends Provider { +class SVG extends Provider { + /** + * {@inheritDoc} + */ + public function getMimeType() { + return '/image\/svg\+xml/'; + } - public function getMimeType() { - return '/image\/svg\+xml/'; + /** + * {@inheritDoc} + */ + public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview) { + try{ + $svg = new \Imagick(); + $svg->setBackgroundColor(new \ImagickPixel('transparent')); + + $content = stream_get_contents($fileview->fopen($path, 'r')); + if(substr($content, 0, 5) !== '<?xml') { + $content = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>' . $content; } - public function getThumbnail($path,$maxX,$maxY,$scalingup,$fileview) { - try{ - $svg = new Imagick(); - $svg->setBackgroundColor(new \ImagickPixel('transparent')); - - $content = stream_get_contents($fileview->fopen($path, 'r')); - if(substr($content, 0, 5) !== '<?xml') { - $content = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>' . $content; - } - - // Do not parse SVG files with references - if(stripos($content, 'xlink:href') !== false) { - return false; - } - - $svg->readImageBlob($content); - $svg->setImageFormat('png32'); - } catch (\Exception $e) { - \OC_Log::write('core', $e->getmessage(), \OC_Log::ERROR); - return false; - } - - - //new image object - $image = new \OC_Image(); - $image->loadFromData($svg); - //check if image object is valid - return $image->valid() ? $image : false; + // Do not parse SVG files with references + if(stripos($content, 'xlink:href') !== false) { + return false; } + $svg->readImageBlob($content); + $svg->setImageFormat('png32'); + } catch (\Exception $e) { + \OC_Log::write('core', $e->getmessage(), \OC_Log::ERROR); + return false; } - \OC\Preview::registerProvider('OC\Preview\SVG'); + //new image object + $image = new \OC_Image(); + $image->loadFromData($svg); + //check if image object is valid + return $image->valid() ? $image : false; } } diff --git a/lib/private/preview/tiff.php b/lib/private/preview/tiff.php new file mode 100644 index 00000000000..0a1e8e8ecec --- /dev/null +++ b/lib/private/preview/tiff.php @@ -0,0 +1,19 @@ +<?php +/** + * Copyright (c) 2013-2014 Georg Ehrke georg@ownCloud.com + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OC\Preview; + +//.tiff +class TIFF extends Bitmap { + /** + * {@inheritDoc} + */ + public function getMimeType() { + return '/image\/tiff/'; + } +} diff --git a/lib/private/preview/txt.php b/lib/private/preview/txt.php index 7f01b980c0e..8b414dc5726 100644 --- a/lib/private/preview/txt.php +++ b/lib/private/preview/txt.php @@ -8,31 +8,24 @@ namespace OC\Preview; class TXT extends Provider { - + /** + * {@inheritDoc} + */ public function getMimeType() { return '/text\/plain/'; } /** - * Check if a preview can be generated for $path - * - * @param \OC\Files\FileInfo $file - * @return bool + * {@inheritDoc} */ public function isAvailable($file) { return $file->getSize() > 5; } /** - * @param string $path - * @param int $maxX - * @param int $maxY - * @param boolean $scalingup - * @param \OC\Files\View $fileview - * @return bool|\OC_Image + * {@inheritDoc} */ public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview) { - $content = $fileview->fopen($path, 'r'); $content = stream_get_contents($content,3000); @@ -79,15 +72,3 @@ class TXT extends Provider { return $image->valid() ? $image : false; } } - -\OC\Preview::registerProvider('OC\Preview\TXT'); - -class MarkDown extends TXT { - - public function getMimeType() { - return '/text\/(x-)?markdown/'; - } - -} - -\OC\Preview::registerProvider('OC\Preview\MarkDown'); diff --git a/lib/private/repair.php b/lib/private/repair.php index b5c1e9db58e..be607b44ed8 100644 --- a/lib/private/repair.php +++ b/lib/private/repair.php @@ -101,7 +101,7 @@ class Repair extends BasicEmitter { //only 7.0.0 through 7.0.2 generated broken previews $currentVersion = \OC::$server->getConfig()->getSystemValue('version'); if (version_compare($currentVersion, '7.0.0.0', '>=') && - version_compare($currentVersion, '7.0.2.2', '<=')) { + version_compare($currentVersion, '7.0.3.4', '<=')) { $steps[] = new \OC\Repair\Preview(); } diff --git a/lib/private/request.php b/lib/private/request.php index d079dc110d1..3c33dfc340a 100644 --- a/lib/private/request.php +++ b/lib/private/request.php @@ -66,23 +66,33 @@ class OC_Request { } /** + * Strips a potential port from a domain (in format domain:port) + * @param $host + * @return string $host without appended port + */ + public static function getDomainWithoutPort($host) { + $pos = strrpos($host, ':'); + if ($pos !== false) { + $port = substr($host, $pos + 1); + if (is_numeric($port)) { + $host = substr($host, 0, $pos); + } + } + return $host; + } + + /** * Checks whether a domain is considered as trusted from the list * of trusted domains. If no trusted domains have been configured, returns * true. * This is used to prevent Host Header Poisoning. - * @param string $domain + * @param string $domainWithPort * @return bool true if the given domain is trusted or if no trusted domains * have been configured */ - public static function isTrustedDomain($domain) { + public static function isTrustedDomain($domainWithPort) { // Extract port from domain if needed - $pos = strrpos($domain, ':'); - if ($pos !== false) { - $port = substr($domain, $pos + 1); - if (is_numeric($port)) { - $domain = substr($domain, 0, $pos); - } - } + $domain = self::getDomainWithoutPort($domainWithPort); // FIXME: Empty config array defaults to true for now. - Deprecate this behaviour with ownCloud 8. $trustedList = \OC::$server->getConfig()->getSystemValue('trusted_domains', array()); @@ -90,6 +100,11 @@ class OC_Request { return true; } + // FIXME: Workaround for older instances still with port applied. Remove for ownCloud 9. + if(in_array($domainWithPort, $trustedList)) { + return true; + } + // Always allow access from localhost if (preg_match(self::REGEX_LOCALHOST, $domain) === 1) { return true; diff --git a/lib/private/security/crypto.php b/lib/private/security/crypto.php index 498e15d6bc3..6fdff8d92a2 100644 --- a/lib/private/security/crypto.php +++ b/lib/private/security/crypto.php @@ -43,22 +43,6 @@ class Crypto implements ICrypto { } /** - * Custom implementation of hex2bin since the function is only available starting - * with PHP 5.4 - * - * @TODO Remove this once 5.3 support for ownCloud is dropped - * @param $message - * @return string - */ - protected static function hexToBin($message) { - if (function_exists('hex2bin')) { - return hex2bin($message); - } - - return pack("H*", $message); - } - - /** * @param string $message The message to authenticate * @param string $password Password to use (defaults to `secret` in config.php) * @return string Calculated HMAC @@ -115,9 +99,9 @@ class Crypto implements ICrypto { throw new \Exception('Authenticated ciphertext could not be decoded.'); } - $ciphertext = self::hexToBin($parts[0]); + $ciphertext = hex2bin($parts[0]); $iv = $parts[1]; - $hmac = self::hexToBin($parts[2]); + $hmac = hex2bin($parts[2]); $this->cipher->setIV($iv); diff --git a/lib/private/server.php b/lib/private/server.php index c413ee8bf6d..7bd7f8ca45d 100644 --- a/lib/private/server.php +++ b/lib/private/server.php @@ -29,19 +29,27 @@ use OC\Tagging\TagMapper; * TODO: hookup all manager classes */ class Server extends SimpleContainer implements IServerContainer { - function __construct() { + /** @var string */ + private $webRoot; + + /** + * @param string $webRoot + */ + function __construct($webRoot) { + $this->webRoot = $webRoot; + $this->registerService('ContactsManager', function ($c) { return new ContactsManager(); }); - $this->registerService('Request', function ($c) { + $this->registerService('Request', function (Server $c) { if (isset($c['urlParams'])) { $urlParams = $c['urlParams']; } else { $urlParams = array(); } - if (\OC::$server->getSession()->exists('requesttoken')) { - $requestToken = \OC::$server->getSession()->get('requesttoken'); + if ($c->getSession()->exists('requesttoken')) { + $requestToken = $c->getSession()->get('requesttoken'); } else { $requestToken = false; } @@ -205,7 +213,7 @@ class Server extends SimpleContainer implements IServerContainer { $factory = new \OC\DB\ConnectionFactory(); $type = $c->getConfig()->getSystemValue('dbtype', 'sqlite'); if (!$factory->isValidType($type)) { - throw new \DatabaseException('Invalid database type'); + throw new \OC\DatabaseException('Invalid database type'); } $connectionParams = $factory->createConnectionParams($c->getConfig()); $connection = $factory->getConnection($type, $connectionParams); @@ -233,8 +241,7 @@ class Server extends SimpleContainer implements IServerContainer { return new NullQueryLogger(); } }); - $this->registerService('TempManager', function ($c) { - /** @var Server $c */ + $this->registerService('TempManager', function (Server $c) { return new TempManager(get_temp_dir(), $c->getLogger()); }); $this->registerService('AppManager', function(Server $c) { @@ -631,4 +638,13 @@ class Server extends SimpleContainer implements IServerContainer { function getAppManager() { return $this->query('AppManager'); } + + /** + * Get the webroot + * + * @return string + */ + function getWebRoot() { + return $this->webRoot; + } } diff --git a/lib/private/setup.php b/lib/private/setup.php index 1125933c8e9..e5eb2bac194 100644 --- a/lib/private/setup.php +++ b/lib/private/setup.php @@ -8,9 +8,6 @@ use OCP\IConfig; -class DatabaseSetupException extends \OC\HintException { -} - class OC_Setup { /** @var IConfig */ protected $config; @@ -91,7 +88,7 @@ class OC_Setup { ) ); $configuredDatabases = $this->config->getSystemValue('supportedDatabases', - array('sqlite', 'mysql', 'pgsql', 'oci', 'mssql')); + array('sqlite', 'mysql', 'pgsql')); if(!is_array($configuredDatabases)) { throw new Exception('Supported databases are not properly configured.'); } @@ -165,7 +162,7 @@ class OC_Setup { && is_array($options['trusted_domains'])) { $trustedDomains = $options['trusted_domains']; } else { - $trustedDomains = array(OC_Request::serverHost()); + $trustedDomains = array(\OC_Request::getDomainWithoutPort(\OC_Request::serverHost())); } if (OC_Util::runningOnWindows()) { @@ -195,7 +192,7 @@ class OC_Setup { try { $dbSetup->initialize($options); $dbSetup->setupDatabase($username); - } catch (DatabaseSetupException $e) { + } catch (\OC\DatabaseSetupException $e) { $error[] = array( 'error' => $e->getMessage(), 'hint' => $e->getHint() diff --git a/lib/private/setup/mssql.php b/lib/private/setup/mssql.php index b8329f99079..5143545b76f 100644 --- a/lib/private/setup/mssql.php +++ b/lib/private/setup/mssql.php @@ -17,7 +17,7 @@ class MSSQL extends AbstractDatabase { } else { $entry = ''; } - throw new \DatabaseSetupException($this->trans->t('MS SQL username and/or password not valid: %s', array($entry)), + throw new \OC\DatabaseSetupException($this->trans->t('MS SQL username and/or password not valid: %s', array($entry)), $this->trans->t('You need to enter either an existing account or the administrator.')); } diff --git a/lib/private/setup/mysql.php b/lib/private/setup/mysql.php index 5558a2d1e51..8f8d86d388c 100644 --- a/lib/private/setup/mysql.php +++ b/lib/private/setup/mysql.php @@ -9,7 +9,7 @@ class MySQL extends AbstractDatabase { //check if the database user has admin right $connection = @mysql_connect($this->dbhost, $this->dbuser, $this->dbpassword); if(!$connection) { - throw new \DatabaseSetupException($this->trans->t('MySQL/MariaDB username and/or password not valid'), + throw new \OC\DatabaseSetupException($this->trans->t('MySQL/MariaDB username and/or password not valid'), $this->trans->t('You need to enter either an existing account or the administrator.')); } //user already specified in config @@ -96,13 +96,13 @@ class MySQL extends AbstractDatabase { $query = "CREATE USER '$name'@'localhost' IDENTIFIED BY '$password'"; $result = mysql_query($query, $connection); if (!$result) { - throw new \DatabaseSetupException($this->trans->t("MySQL/MariaDB user '%s'@'localhost' exists already.", array($name)), + throw new \OC\DatabaseSetupException($this->trans->t("MySQL/MariaDB user '%s'@'localhost' exists already.", array($name)), $this->trans->t("Drop this user from MySQL/MariaDB", array($name))); } $query = "CREATE USER '$name'@'%' IDENTIFIED BY '$password'"; $result = mysql_query($query, $connection); if (!$result) { - throw new \DatabaseSetupException($this->trans->t("MySQL/MariaDB user '%s'@'%%' already exists", array($name)), + throw new \OC\DatabaseSetupException($this->trans->t("MySQL/MariaDB user '%s'@'%%' already exists", array($name)), $this->trans->t("Drop this user from MySQL/MariaDB.")); } } diff --git a/lib/private/setup/oci.php b/lib/private/setup/oci.php index 23b5232438a..b75b658bae2 100644 --- a/lib/private/setup/oci.php +++ b/lib/private/setup/oci.php @@ -45,14 +45,14 @@ class OCI extends AbstractDatabase { if(!$connection) { $errorMessage = $this->getLastError(); if ($errorMessage) { - throw new \DatabaseSetupException($this->trans->t('Oracle connection could not be established'), + throw new \OC\DatabaseSetupException($this->trans->t('Oracle connection could not be established'), $errorMessage.' Check environment: ORACLE_HOME='.getenv('ORACLE_HOME') .' ORACLE_SID='.getenv('ORACLE_SID') .' LD_LIBRARY_PATH='.getenv('LD_LIBRARY_PATH') .' NLS_LANG='.getenv('NLS_LANG') .' tnsnames.ora is '.(is_readable(getenv('ORACLE_HOME').'/network/admin/tnsnames.ora')?'':'not ').'readable'); } - throw new \DatabaseSetupException($this->trans->t('Oracle username and/or password not valid'), + throw new \OC\DatabaseSetupException($this->trans->t('Oracle username and/or password not valid'), 'Check environment: ORACLE_HOME='.getenv('ORACLE_HOME') .' ORACLE_SID='.getenv('ORACLE_SID') .' LD_LIBRARY_PATH='.getenv('LD_LIBRARY_PATH') @@ -124,7 +124,7 @@ class OCI extends AbstractDatabase { } $connection = @oci_connect($this->dbuser, $this->dbpassword, $easy_connect_string); if(!$connection) { - throw new \DatabaseSetupException($this->trans->t('Oracle username and/or password not valid'), + throw new \OC\DatabaseSetupException($this->trans->t('Oracle username and/or password not valid'), $this->trans->t('You need to enter either an existing account or the administrator.')); } $query = "SELECT count(*) FROM user_tables WHERE table_name = :un"; diff --git a/lib/private/setup/postgresql.php b/lib/private/setup/postgresql.php index 4d0c9b52a4d..3777d1620bc 100644 --- a/lib/private/setup/postgresql.php +++ b/lib/private/setup/postgresql.php @@ -27,7 +27,7 @@ class PostgreSQL extends AbstractDatabase { $connection = @pg_connect($connection_string); if(!$connection) - throw new \DatabaseSetupException($this->trans->t('PostgreSQL username and/or password not valid'), + throw new \OC\DatabaseSetupException($this->trans->t('PostgreSQL username and/or password not valid'), $this->trans->t('You need to enter either an existing account or the administrator.')); } $e_user = pg_escape_string($this->dbuser); @@ -80,7 +80,7 @@ class PostgreSQL extends AbstractDatabase { $connection_string = "host='$e_host' dbname='$e_dbname' user='$e_user' port='$port' password='$e_password'"; $connection = @pg_connect($connection_string); if(!$connection) { - throw new \DatabaseSetupException($this->trans->t('PostgreSQL username and/or password not valid'), + throw new \OC\DatabaseSetupException($this->trans->t('PostgreSQL username and/or password not valid'), $this->trans->t('You need to enter either an existing account or the administrator.')); } $query = "select count(*) FROM pg_class WHERE relname='".$this->tableprefix."users' limit 1"; diff --git a/lib/private/share/helper.php b/lib/private/share/helper.php index 2418535c9d5..6bbb101db3a 100644 --- a/lib/private/share/helper.php +++ b/lib/private/share/helper.php @@ -189,20 +189,23 @@ class Helper extends \OC\Share\Constants { public static function calculateExpireDate($defaultExpireSettings, $creationTime, $userExpireDate = null) { $expires = false; + $defaultExpires = null; if (!empty($defaultExpireSettings['defaultExpireDateSet'])) { - $expires = $creationTime + $defaultExpireSettings['expireAfterDays'] * 86400; + $defaultExpires = $creationTime + $defaultExpireSettings['expireAfterDays'] * 86400; } if (isset($userExpireDate)) { // if the admin decided to enforce the default expire date then we only take // the user defined expire date of it is before the default expire date - if ($expires && !empty($defaultExpireSettings['enforceExpireDate'])) { - $expires = min($userExpireDate, $expires); + if ($defaultExpires && !empty($defaultExpireSettings['enforceExpireDate'])) { + $expires = min($userExpireDate, $defaultExpires); } else { $expires = $userExpireDate; } + } else if ($defaultExpires && !empty($defaultExpireSettings['enforceExpireDate'])) { + $expires = $defaultExpires; } return $expires; diff --git a/lib/private/share/share.php b/lib/private/share/share.php index a8febc9aca7..c6fd1604ac7 100644 --- a/lib/private/share/share.php +++ b/lib/private/share/share.php @@ -287,12 +287,12 @@ class Share extends \OC\Share\Constants { * Get the item of item type shared with a given user by source * @param string $itemType * @param string $itemSource - * @param string $user User user to whom the item was shared + * @param string $user User to whom the item was shared + * @param string $owner Owner of the share * @param int $shareType only look for a specific share type * @return array Return list of items with file_target, permissions and expiration */ - public static function getItemSharedWithUser($itemType, $itemSource, $user, $shareType = null) { - + public static function getItemSharedWithUser($itemType, $itemSource, $user, $owner = null, $shareType = null) { $shares = array(); $fileDependend = false; @@ -320,6 +320,11 @@ class Share extends \OC\Share\Constants { $arguments[] = $shareType; } + if ($owner !== null) { + $where .= ' AND `uid_owner` = ? '; + $arguments[] = $owner; + } + $query = \OC_DB::prepare('SELECT ' . $select . ' FROM `*PREFIX*share` '. $where); $result = \OC_DB::executeAudited($query, $arguments); @@ -542,7 +547,7 @@ class Share extends \OC\Share\Constants { // single file shares should never have delete permissions if ($itemType === 'file') { - $permissions = (int)$permissions & ~\OCP\PERMISSION_DELETE; + $permissions = (int)$permissions & ~\OCP\Constants::PERMISSION_DELETE; } // Verify share type and sharing conditions are met @@ -701,7 +706,7 @@ class Share extends \OC\Share\Constants { // check if it is a valid itemType self::getBackend($itemType); - $items = self::getItemSharedWithUser($itemType, $itemSource, $shareWith, $shareType); + $items = self::getItemSharedWithUser($itemType, $itemSource, $shareWith, null, $shareType); $toDelete = array(); $newParent = null; @@ -924,7 +929,7 @@ class Share extends \OC\Share\Constants { // Check if permissions were removed if ($item['permissions'] & ~$permissions) { // If share permission is removed all reshares must be deleted - if (($item['permissions'] & \OCP\PERMISSION_SHARE) && (~$permissions & \OCP\PERMISSION_SHARE)) { + if (($item['permissions'] & \OCP\Constants::PERMISSION_SHARE) && (~$permissions & \OCP\Constants::PERMISSION_SHARE)) { Helper::delete($item['id'], true); } else { $ids = array(); @@ -1453,8 +1458,8 @@ class Share extends \OC\Share\Constants { } // Switch ids if sharing permission is granted on only // one share to ensure correct parent is used if resharing - if (~(int)$items[$id]['permissions'] & \OCP\PERMISSION_SHARE - && (int)$row['permissions'] & \OCP\PERMISSION_SHARE) { + if (~(int)$items[$id]['permissions'] & \OCP\Constants::PERMISSION_SHARE + && (int)$row['permissions'] & \OCP\Constants::PERMISSION_SHARE) { $items[$row['id']] = $items[$id]; $switchedItems[$id] = $row['id']; unset($items[$id]); @@ -1511,7 +1516,7 @@ class Share extends \OC\Share\Constants { } // Check if resharing is allowed, if not remove share permission if (isset($row['permissions']) && (!self::isResharingAllowed() | \OC_Util::isSharingDisabledForUser())) { - $row['permissions'] &= ~\OCP\PERMISSION_SHARE; + $row['permissions'] &= ~\OCP\Constants::PERMISSION_SHARE; } // Add display names to result if ( isset($row['share_with']) && $row['share_with'] != '' && @@ -1629,7 +1634,7 @@ class Share extends \OC\Share\Constants { // Need to find a solution which works for all back-ends $collectionItems = array(); $collectionBackend = self::getBackend('folder'); - $sharedParents = $collectionBackend->getParents($item, $shareWith); + $sharedParents = $collectionBackend->getParents($item, $shareWith, $uidOwner); foreach ($sharedParents as $parent) { $collectionItems[] = $parent; } @@ -1906,7 +1911,7 @@ class Share extends \OC\Share\Constants { } // Check if share permissions is granted - if (self::isResharingAllowed() && (int)$checkReshare['permissions'] & \OCP\PERMISSION_SHARE) { + if (self::isResharingAllowed() && (int)$checkReshare['permissions'] & \OCP\Constants::PERMISSION_SHARE) { if (~(int)$checkReshare['permissions'] & $permissions) { $message = 'Sharing %s failed, because the permissions exceed permissions granted to %s'; $message_t = $l->t('Sharing %s failed, because the permissions exceed permissions granted to %s', array($itemSourceName, $uidOwner)); diff --git a/lib/private/urlgenerator.php b/lib/private/urlgenerator.php index e50e9eed6af..d263d25aeef 100644 --- a/lib/private/urlgenerator.php +++ b/lib/private/urlgenerator.php @@ -8,6 +8,7 @@ */ namespace OC; +use OC_Defaults; use OCP\IURLGenerator; use RuntimeException; @@ -156,7 +157,7 @@ class URLGenerator implements IURLGenerator { /** * Makes an URL absolute - * @param string $url the url in the owncloud host + * @param string $url the url in the ownCloud host * @return string the absolute version of the url */ public function getAbsoluteURL($url) { @@ -173,4 +174,13 @@ class URLGenerator implements IURLGenerator { return \OC_Request::serverProtocol() . '://' . \OC_Request::serverHost(). $webRoot . $separator . $url; } + + /** + * @param string $key + * @return string url to the online documentation + */ + public function linkToDocs($key) { + $theme = new OC_Defaults(); + return $theme->buildDocLinkToKey($key); + } } diff --git a/lib/private/user/backend.php b/lib/private/user/backend.php index 1f0a524117d..5e0eef4771a 100644 --- a/lib/private/user/backend.php +++ b/lib/private/user/backend.php @@ -25,19 +25,28 @@ /** * error code for functions not provided by the user backend + * @deprecated Use \OC_User_Backend::NOT_IMPLEMENTED instead */ define('OC_USER_BACKEND_NOT_IMPLEMENTED', -501); /** * actions that user backends can define */ +/** @deprecated Use \OC_User_Backend::CREATE_USER instead */ define('OC_USER_BACKEND_CREATE_USER', 1 << 0); +/** @deprecated Use \OC_User_Backend::SET_PASSWORD instead */ define('OC_USER_BACKEND_SET_PASSWORD', 1 << 4); +/** @deprecated Use \OC_User_Backend::CHECK_PASSWORD instead */ define('OC_USER_BACKEND_CHECK_PASSWORD', 1 << 8); +/** @deprecated Use \OC_User_Backend::GET_HOME instead */ define('OC_USER_BACKEND_GET_HOME', 1 << 12); +/** @deprecated Use \OC_User_Backend::GET_DISPLAYNAME instead */ define('OC_USER_BACKEND_GET_DISPLAYNAME', 1 << 16); +/** @deprecated Use \OC_User_Backend::SET_DISPLAYNAME instead */ define('OC_USER_BACKEND_SET_DISPLAYNAME', 1 << 20); +/** @deprecated Use \OC_User_Backend::PROVIDE_AVATAR instead */ define('OC_USER_BACKEND_PROVIDE_AVATAR', 1 << 24); +/** @deprecated Use \OC_User_Backend::COUNT_USERS instead */ define('OC_USER_BACKEND_COUNT_USERS', 1 << 28); /** @@ -47,16 +56,32 @@ define('OC_USER_BACKEND_COUNT_USERS', 1 << 28); * Subclass this for your own backends, and see OC_User_Example for descriptions */ abstract class OC_User_Backend implements OC_User_Interface { + /** + * error code for functions not provided by the user backend + */ + const NOT_IMPLEMENTED = -501; + + /** + * actions that user backends can define + */ + const CREATE_USER = 1; // 1 << 0 + const SET_PASSWORD = 16; // 1 << 4 + const CHECK_PASSWORD = 256; // 1 << 8 + const GET_HOME = 4096; // 1 << 12 + const GET_DISPLAYNAME = 65536; // 1 << 16 + const SET_DISPLAYNAME = 1048576; // 1 << 20 + const PROVIDE_AVATAR = 16777216; // 1 << 24 + const COUNT_USERS = 268435456; // 1 << 28 protected $possibleActions = array( - OC_USER_BACKEND_CREATE_USER => 'createUser', - OC_USER_BACKEND_SET_PASSWORD => 'setPassword', - OC_USER_BACKEND_CHECK_PASSWORD => 'checkPassword', - OC_USER_BACKEND_GET_HOME => 'getHome', - OC_USER_BACKEND_GET_DISPLAYNAME => 'getDisplayName', - OC_USER_BACKEND_SET_DISPLAYNAME => 'setDisplayName', - OC_USER_BACKEND_PROVIDE_AVATAR => 'canChangeAvatar', - OC_USER_BACKEND_COUNT_USERS => 'countUsers', + self::CREATE_USER => 'createUser', + self::SET_PASSWORD => 'setPassword', + self::CHECK_PASSWORD => 'checkPassword', + self::GET_HOME => 'getHome', + self::GET_DISPLAYNAME => 'getDisplayName', + self::SET_DISPLAYNAME => 'setDisplayName', + self::PROVIDE_AVATAR => 'canChangeAvatar', + self::COUNT_USERS => 'countUsers', ); /** @@ -64,7 +89,7 @@ abstract class OC_User_Backend implements OC_User_Interface { * @return int bitwise-or'ed actions * * Returns the supported actions as int to be - * compared with OC_USER_BACKEND_CREATE_USER etc. + * compared with self::CREATE_USER etc. */ public function getSupportedActions() { $actions = 0; @@ -83,7 +108,7 @@ abstract class OC_User_Backend implements OC_User_Interface { * @return boolean * * Returns the supported actions as int to be - * compared with OC_USER_BACKEND_CREATE_USER etc. + * compared with self::CREATE_USER etc. */ public function implementsActions($actions) { return (bool)($this->getSupportedActions() & $actions); diff --git a/lib/private/user/interface.php b/lib/private/user/interface.php index 4cdc47479a3..624d36e6fe5 100644 --- a/lib/private/user/interface.php +++ b/lib/private/user/interface.php @@ -25,11 +25,11 @@ interface OC_User_Interface { /** * Check if backend implements actions - * @param $actions bitwise-or'ed actions + * @param int $actions bitwise-or'ed actions * @return boolean * * Returns the supported actions as int to be - * compared with OC_USER_BACKEND_CREATE_USER etc. + * compared with \OC_User_Backend::CREATE_USER etc. */ public function implementsActions($actions); diff --git a/lib/private/user/manager.php b/lib/private/user/manager.php index 4d1612a35ce..0c01f957bd3 100644 --- a/lib/private/user/manager.php +++ b/lib/private/user/manager.php @@ -143,7 +143,7 @@ class Manager extends PublicEmitter implements IUserManager { */ public function checkPassword($loginname, $password) { foreach ($this->backends as $backend) { - if ($backend->implementsActions(\OC_USER_BACKEND_CHECK_PASSWORD)) { + if ($backend->implementsActions(\OC_User_Backend::CHECK_PASSWORD)) { $uid = $backend->checkPassword($loginname, $password); if ($uid !== false) { return $this->getUserObject($uid, $backend); @@ -246,7 +246,7 @@ class Manager extends PublicEmitter implements IUserManager { $this->emit('\OC\User', 'preCreateUser', array($uid, $password)); foreach ($this->backends as $backend) { - if ($backend->implementsActions(\OC_USER_BACKEND_CREATE_USER)) { + if ($backend->implementsActions(\OC_User_Backend::CREATE_USER)) { $backend->createUser($uid, $password); $user = $this->getUserObject($uid, $backend); $this->emit('\OC\User', 'postCreateUser', array($user, $password)); @@ -264,7 +264,7 @@ class Manager extends PublicEmitter implements IUserManager { public function countUsers() { $userCountStatistics = array(); foreach ($this->backends as $backend) { - if ($backend->implementsActions(\OC_USER_BACKEND_COUNT_USERS)) { + if ($backend->implementsActions(\OC_User_Backend::COUNT_USERS)) { $backendusers = $backend->countUsers(); if($backendusers !== false) { if(isset($userCountStatistics[get_class($backend)])) { diff --git a/lib/private/user/session.php b/lib/private/user/session.php index ca0265dfb23..94abaca3e76 100644 --- a/lib/private/user/session.php +++ b/lib/private/user/session.php @@ -88,15 +88,6 @@ class Session implements IUserSession, Emitter { * @return \OCP\ISession */ public function getSession() { - // fetch the deprecated \OC::$session if it changed for backwards compatibility - if (isset(\OC::$session) && \OC::$session !== $this->session) { - \OC::$server->getLogger()->warning( - 'One of your installed apps still seems to use the deprecated ' . - '\OC::$session and has replaced it with a new instance. Please file a bug against it.' . - 'Closing and replacing session in UserSession instance.' - ); - $this->setSession(\OC::$session); - } return $this->session; } @@ -111,14 +102,6 @@ class Session implements IUserSession, Emitter { } $this->session = $session; $this->activeUser = null; - - // maintain deprecated \OC::$session - if (\OC::$session !== $this->session) { - if (\OC::$session instanceof \OCP\ISession) { - \OC::$session->close(); - } - \OC::$session = $session; - } } /** diff --git a/lib/private/user/user.php b/lib/private/user/user.php index 729abdc6227..9ad2f5f0d3a 100644 --- a/lib/private/user/user.php +++ b/lib/private/user/user.php @@ -90,7 +90,7 @@ class User implements IUser { public function getDisplayName() { if (!isset($this->displayName)) { $displayName = ''; - if ($this->backend and $this->backend->implementsActions(OC_USER_BACKEND_GET_DISPLAYNAME)) { + if ($this->backend and $this->backend->implementsActions(\OC_User_Backend::GET_DISPLAYNAME)) { // get display name and strip whitespace from the beginning and end of it $backendDisplayName = $this->backend->getDisplayName($this->uid); if (is_string($backendDisplayName)) { @@ -115,7 +115,7 @@ class User implements IUser { */ public function setDisplayName($displayName) { $displayName = trim($displayName); - if ($this->backend->implementsActions(\OC_USER_BACKEND_SET_DISPLAYNAME) && !empty($displayName)) { + if ($this->backend->implementsActions(\OC_User_Backend::SET_DISPLAYNAME) && !empty($displayName)) { $this->displayName = $displayName; $result = $this->backend->setDisplayName($this->uid, $displayName); return $result !== false; @@ -170,7 +170,7 @@ class User implements IUser { if ($this->emitter) { $this->emitter->emit('\OC\User', 'preSetPassword', array($this, $password, $recoveryPassword)); } - if ($this->backend->implementsActions(\OC_USER_BACKEND_SET_PASSWORD)) { + if ($this->backend->implementsActions(\OC_User_Backend::SET_PASSWORD)) { $result = $this->backend->setPassword($this->uid, $password); if ($this->emitter) { $this->emitter->emit('\OC\User', 'postSetPassword', array($this, $password, $recoveryPassword)); @@ -188,7 +188,7 @@ class User implements IUser { */ public function getHome() { if (!$this->home) { - if ($this->backend->implementsActions(\OC_USER_BACKEND_GET_HOME) and $home = $this->backend->getHome($this->uid)) { + if ($this->backend->implementsActions(\OC_User_Backend::GET_HOME) and $home = $this->backend->getHome($this->uid)) { $this->home = $home; } elseif ($this->config) { $this->home = $this->config->getSystemValue('datadirectory') . '/' . $this->uid; @@ -205,7 +205,7 @@ class User implements IUser { * @return bool */ public function canChangeAvatar() { - if ($this->backend->implementsActions(\OC_USER_BACKEND_PROVIDE_AVATAR)) { + if ($this->backend->implementsActions(\OC_User_Backend::PROVIDE_AVATAR)) { return $this->backend->canChangeAvatar($this->uid); } return true; @@ -217,7 +217,7 @@ class User implements IUser { * @return bool */ public function canChangePassword() { - return $this->backend->implementsActions(\OC_USER_BACKEND_SET_PASSWORD); + return $this->backend->implementsActions(\OC_User_Backend::SET_PASSWORD); } /** @@ -229,7 +229,7 @@ class User implements IUser { if ($this->config and $this->config->getSystemValue('allow_user_to_change_display_name') === false) { return false; } else { - return $this->backend->implementsActions(\OC_USER_BACKEND_SET_DISPLAYNAME); + return $this->backend->implementsActions(\OC_User_Backend::SET_DISPLAYNAME); } } diff --git a/lib/private/util.php b/lib/private/util.php index 4190f0aa3d8..d28fa80160c 100644 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -605,34 +605,14 @@ class OC_Util { $webServerRestart = true; } - if (version_compare(phpversion(), '5.3.3', '<')) { + if (version_compare(phpversion(), '5.4.0', '<')) { $errors[] = array( - 'error' => $l->t('PHP %s or higher is required.', '5.3.3'), + 'error' => $l->t('PHP %s or higher is required.', '5.4.0'), 'hint' => $l->t('Please ask your server administrator to update PHP to the latest version.' . ' Your PHP version is no longer supported by ownCloud and the PHP community.') ); $webServerRestart = true; } - if (((strtolower(@ini_get('safe_mode')) == 'on') - || (strtolower(@ini_get('safe_mode')) == 'yes') - || (strtolower(@ini_get('safe_mode')) == 'true') - || (ini_get("safe_mode") == 1)) - ) { - $errors[] = array( - 'error' => $l->t('PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly.'), - 'hint' => $l->t('PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. ' - . 'Please ask your server administrator to disable it in php.ini or in your webserver config.') - ); - $webServerRestart = true; - } - if (get_magic_quotes_gpc() == 1) { - $errors[] = array( - 'error' => $l->t('Magic Quotes is enabled. ownCloud requires that it is disabled to work properly.'), - 'hint' => $l->t('Magic Quotes is a deprecated and mostly useless setting that should be disabled. ' - . 'Please ask your server administrator to disable it in php.ini or in your webserver config.') - ); - $webServerRestart = true; - } if (!self::isAnnotationsWorking()) { $errors[] = array( 'error' => 'PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible.', @@ -1114,15 +1094,6 @@ class OC_Util { } /** - * Check if a PHP version older then 5.3.8 is installed. - * - * @return bool - */ - public static function isPHPoutdated() { - return version_compare(phpversion(), '5.3.8', '<'); - } - - /** * Check if the ownCloud server can connect to the internet * * @return bool @@ -1336,7 +1307,7 @@ class OC_Util { return false; } foreach (str_split($trimmed) as $char) { - if (strpos(\OCP\FILENAME_INVALID_CHARS, $char) !== false) { + if (strpos(\OCP\Constants::FILENAME_INVALID_CHARS, $char) !== false) { return false; } } diff --git a/lib/public/activity/iextension.php b/lib/public/activity/iextension.php index 6bb403a8896..e78ae0043a6 100644 --- a/lib/public/activity/iextension.php +++ b/lib/public/activity/iextension.php @@ -30,6 +30,13 @@ namespace OCP\Activity; interface IExtension { + + const PRIORITY_VERYLOW = 10; + const PRIORITY_LOW = 20; + const PRIORITY_MEDIUM = 30; + const PRIORITY_HIGH = 40; + const PRIORITY_VERYHIGH = 50; + /** * The extension can return an array of additional notification types. * If no additional types are to be added false is to be returned diff --git a/lib/public/appframework/controller.php b/lib/public/appframework/controller.php index 398304e6feb..00981df05ba 100644 --- a/lib/public/appframework/controller.php +++ b/lib/public/appframework/controller.php @@ -70,7 +70,7 @@ abstract class Controller { $data->getData(), $data->getStatus() ); - $response->setHeaders($data->getHeaders()); + $response->setHeaders(array_merge($data->getHeaders(), $response->getHeaders())); return $response; } else { return new JSONResponse($data); diff --git a/lib/public/appframework/http/response.php b/lib/public/appframework/http/response.php index 354911fee21..67e72cff6d9 100644 --- a/lib/public/appframework/http/response.php +++ b/lib/public/appframework/http/response.php @@ -46,8 +46,15 @@ class Response { /** + * Cookies that will be need to be constructed as header + * @var array + */ + private $cookies = array(); + + + /** * HTTP status code - defaults to STATUS OK - * @var string + * @var int */ private $status = Http::STATUS_OK; @@ -70,6 +77,7 @@ class Response { * Caches the response * @param int $cacheSeconds the amount of seconds that should be cached * if 0 then caching will be disabled + * @return $this */ public function cacheFor($cacheSeconds) { @@ -83,13 +91,68 @@ class Response { return $this; } + /** + * Adds a new cookie to the response + * @param string $name The name of the cookie + * @param string $value The value of the cookie + * @param \DateTime|null $expireDate Date on that the cookie should expire, if set + * to null cookie will be considered as session + * cookie. + * @return $this + */ + public function addCookie($name, $value, \DateTime $expireDate = null) { + $this->cookies[$name] = array('value' => $value, 'expireDate' => $expireDate); + return $this; + } + + + /** + * Set the specified cookies + * @param array $cookies array('foo' => array('value' => 'bar', 'expire' => null)) + * @return $this + */ + public function setCookies(array $cookies) { + $this->cookies = $cookies; + return $this; + } + + + /** + * Invalidates the specified cookie + * @param string $name + * @return $this + */ + public function invalidateCookie($name) { + $this->addCookie($name, 'expired', new \DateTime('1971-01-01 00:00')); + return $this; + } + + /** + * Invalidates the specified cookies + * @param array $cookieNames array('foo', 'bar') + * @return $this + */ + public function invalidateCookies(array $cookieNames) { + foreach($cookieNames as $cookieName) { + $this->invalidateCookie($cookieName); + } + return $this; + } + + /** + * Returns the cookies + * @return array + */ + public function getCookies() { + return $this->cookies; + } /** * Adds a new header to the response that will be called before the render * function * @param string $name The name of the HTTP header * @param string $value The value, null will delete it - * @return Response Reference to this object + * @return $this */ public function addHeader($name, $value) { $name = trim($name); // always remove leading and trailing whitespace @@ -108,10 +171,10 @@ class Response { /** * Set the headers - * @param array key value header pairs - * @return Response Reference to this object + * @param array $headers value header pairs + * @return $this */ - public function setHeaders($headers) { + public function setHeaders(array $headers) { $this->headers = $headers; return $this; diff --git a/lib/public/appframework/iapi.php b/lib/public/appframework/iapi.php index 9af251be850..ecbc0fd1900 100644 --- a/lib/public/appframework/iapi.php +++ b/lib/public/appframework/iapi.php @@ -37,6 +37,7 @@ interface IApi { /** * Gets the userid of the current user * @return string the user id of the current user + * @deprecated Use \OC::$server->getUserSession()->getUser()->getUID() */ function getUserId(); diff --git a/lib/public/constants.php b/lib/public/constants.php index 350646a0ac0..78cafd11847 100644 --- a/lib/public/constants.php +++ b/lib/public/constants.php @@ -26,15 +26,37 @@ namespace OCP; -/** - * CRUDS permissions. - */ +/** @deprecated Use \OCP\Constants::PERMISSION_CREATE instead */ const PERMISSION_CREATE = 4; + +/** @deprecated Use \OCP\Constants::PERMISSION_READ instead */ const PERMISSION_READ = 1; + +/** @deprecated Use \OCP\Constants::PERMISSION_UPDATE instead */ const PERMISSION_UPDATE = 2; + +/** @deprecated Use \OCP\Constants::PERMISSION_DELETE instead */ const PERMISSION_DELETE = 8; + +/** @deprecated Use \OCP\Constants::PERMISSION_SHARE instead */ const PERMISSION_SHARE = 16; + +/** @deprecated Use \OCP\Constants::PERMISSION_ALL instead */ const PERMISSION_ALL = 31; +/** @deprecated Use \OCP\Constants::FILENAME_INVALID_CHARS instead */ const FILENAME_INVALID_CHARS = "\\/<>:\"|?*\n"; +class Constants { + /** + * CRUDS permissions. + */ + const PERMISSION_CREATE = 4; + const PERMISSION_READ = 1; + const PERMISSION_UPDATE = 2; + const PERMISSION_DELETE = 8; + const PERMISSION_SHARE = 16; + const PERMISSION_ALL = 31; + + const FILENAME_INVALID_CHARS = "\\/<>:\"|?*\n"; +} diff --git a/lib/public/defaults.php b/lib/public/defaults.php index 662071a29a9..315cf547385 100644 --- a/lib/public/defaults.php +++ b/lib/public/defaults.php @@ -144,4 +144,12 @@ class Defaults { public function getLongFooter() { return $this->defaults->getLongFooter(); } + + /** + * Returns the AppId for the App Store for the iOS Client + * @return string AppId + */ + public function getiTunesAppId() { + return $this->defaults->getiTunesAppId(); + } } diff --git a/lib/public/files/fileinfo.php b/lib/public/files/fileinfo.php index ec81a541564..3a407ed67ca 100644 --- a/lib/public/files/fileinfo.php +++ b/lib/public/files/fileinfo.php @@ -103,12 +103,12 @@ interface FileInfo { /** * Get the permissions of the file or folder as bitmasked combination of the following constants - * \OCP\PERMISSION_CREATE - * \OCP\PERMISSION_READ - * \OCP\PERMISSION_UPDATE - * \OCP\PERMISSION_DELETE - * \OCP\PERMISSION_SHARE - * \OCP\PERMISSION_ALL + * \OCP\Constants::PERMISSION_CREATE + * \OCP\Constants::PERMISSION_READ + * \OCP\Constants::PERMISSION_UPDATE + * \OCP\Constants::PERMISSION_DELETE + * \OCP\Constants::PERMISSION_SHARE + * \OCP\Constants::PERMISSION_ALL * * @return int */ diff --git a/lib/public/files/ihomestorage.php b/lib/public/files/ihomestorage.php new file mode 100644 index 00000000000..717ef946750 --- /dev/null +++ b/lib/public/files/ihomestorage.php @@ -0,0 +1,24 @@ +<?php +/** + * ownCloud + * + * @author Robin Appelman + * @copyright 2012 Robin Appelman icewind@owncloud.com + * + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +/** + * Public interface of ownCloud for apps to use. + * Files/Storage interface + */ + +// use OCP namespace for all classes that are considered public. +// This means that they should be used by apps instead of the internal ownCloud classes +namespace OCP\Files; + +interface IHomeStorage { + +} diff --git a/lib/public/files/node.php b/lib/public/files/node.php index a380394095b..35c20b487c9 100644 --- a/lib/public/files/node.php +++ b/lib/public/files/node.php @@ -128,11 +128,11 @@ interface Node { /** * Get the permissions of the file or folder as a combination of one or more of the following constants: - * - \OCP\PERMISSION_READ - * - \OCP\PERMISSION_UPDATE - * - \OCP\PERMISSION_CREATE - * - \OCP\PERMISSION_DELETE - * - \OCP\PERMISSION_SHARE + * - \OCP\Constants::PERMISSION_READ + * - \OCP\Constants::PERMISSION_UPDATE + * - \OCP\Constants::PERMISSION_CREATE + * - \OCP\Constants::PERMISSION_DELETE + * - \OCP\Constants::PERMISSION_SHARE * * @return int */ diff --git a/lib/public/files/storage.php b/lib/public/files/storage.php index 8f8d7852ee4..323d20db564 100644 --- a/lib/public/files/storage.php +++ b/lib/public/files/storage.php @@ -336,7 +336,3 @@ interface Storage { */ public function instanceOfStorage($class); } - -interface IHomeStorage { - -} diff --git a/lib/public/iavatar.php b/lib/public/iavatar.php index 1e80682c4f7..213d2e6cef5 100644 --- a/lib/public/iavatar.php +++ b/lib/public/iavatar.php @@ -23,9 +23,9 @@ interface IAvatar { /** * sets the users avatar * @param Image $data mixed imagedata or path to set a new avatar - * @throws Exception if the provided file is not a jpg or png image - * @throws Exception if the provided image is not valid - * @throws \OCP\NotSquareException if the image is not square + * @throws \Exception if the provided file is not a jpg or png image + * @throws \Exception if the provided image is not valid + * @throws \OC\NotSquareException if the image is not square * @return void */ function set($data); diff --git a/lib/public/iservercontainer.php b/lib/public/iservercontainer.php index b734d1b4161..301f47c68fa 100644 --- a/lib/public/iservercontainer.php +++ b/lib/public/iservercontainer.php @@ -298,4 +298,11 @@ interface IServerContainer { * @return \OCP\App\IAppManager */ function getAppManager(); + + /** + * Get the webroot + * + * @return string + */ + function getWebRoot(); } diff --git a/lib/public/iurlgenerator.php b/lib/public/iurlgenerator.php index dbbd8a3bb63..fa817c10ea5 100644 --- a/lib/public/iurlgenerator.php +++ b/lib/public/iurlgenerator.php @@ -69,8 +69,14 @@ interface IURLGenerator { /** * Makes an URL absolute - * @param string $url the url in the owncloud host + * @param string $url the url in the ownCloud host * @return string the absolute version of the url */ public function getAbsoluteURL($url); + + /** + * @param string $key + * @return string url to the online documentation + */ + public function linkToDocs($key); } diff --git a/lib/public/share.php b/lib/public/share.php index 449d1fa211e..b3ece8fab94 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -125,11 +125,12 @@ class Share extends \OC\Share\Constants { * Get the item of item type shared with a given user by source * @param string $itemType * @param string $itemSource - * @param string $user User user to whom the item was shared + * @param string $user User to whom the item was shared + * @param string $owner Owner of the share * @return array Return list of items with file_target, permissions and expiration */ - public static function getItemSharedWithUser($itemType, $itemSource, $user) { - return \OC\Share\Share::getItemSharedWithUser($itemType, $itemSource, $user); + public static function getItemSharedWithUser($itemType, $itemSource, $user, $owner = null) { + return \OC\Share\Share::getItemSharedWithUser($itemType, $itemSource, $user, $owner); } /** @@ -341,86 +342,3 @@ class Share extends \OC\Share\Constants { return \OC\Share\Share::isResharingAllowed(); } } - -/** - * Interface that apps must implement to share content. - */ -interface Share_Backend { - - /** - * Check if this $itemSource exist for the user - * @param string $itemSource - * @param string $uidOwner Owner of the item - * @return boolean|null Source - * - * Return false if the item does not exist for the user - */ - public function isValidSource($itemSource, $uidOwner); - - /** - * Get a unique name of the item for the specified user - * @param string $itemSource - * @param string|false $shareWith User the item is being shared with - * @param array|null $exclude List of similar item names already existing as shared items @deprecated since version OC7 - * @return string Target name - * - * This function needs to verify that the user does not already have an item with this name. - * If it does generate a new name e.g. name_# - */ - public function generateTarget($itemSource, $shareWith, $exclude = null); - - /** - * Converts the shared item sources back into the item in the specified format - * @param array $items Shared items - * @param int $format - * @return TODO - * - * The items array is a 3-dimensional array with the item_source as the - * first key and the share id as the second key to an array with the share - * info. - * - * The key/value pairs included in the share info depend on the function originally called: - * If called by getItem(s)Shared: id, item_type, item, item_source, - * share_type, share_with, permissions, stime, file_source - * - * If called by getItem(s)SharedWith: id, item_type, item, item_source, - * item_target, share_type, share_with, permissions, stime, file_source, - * file_target - * - * This function allows the backend to control the output of shared items with custom formats. - * It is only called through calls to the public getItem(s)Shared(With) functions. - */ - public function formatItems($items, $format, $parameters = null); - -} - -/** - * Interface for share backends that share content that is dependent on files. - * Extends the Share_Backend interface. - */ -interface Share_Backend_File_Dependent extends Share_Backend { - - /** - * Get the file path of the item - * @param string $itemSource - * @param string $uidOwner User that is the owner of shared item - * @return string|false - */ - public function getFilePath($itemSource, $uidOwner); - -} - -/** - * Interface for collections of of items implemented by another share backend. - * Extends the Share_Backend interface. - */ -interface Share_Backend_Collection extends Share_Backend { - - /** - * Get the sources of the children of the item - * @param string $itemSource - * @return array Returns an array of children each inside an array with the keys: source, target, and file_path if applicable - */ - public function getChildren($itemSource); - -} diff --git a/lib/public/share_backend.php b/lib/public/share_backend.php new file mode 100644 index 00000000000..6ab234aecf0 --- /dev/null +++ b/lib/public/share_backend.php @@ -0,0 +1,68 @@ +<?php +/** + * ownCloud + * + * @author Bjoern Schiessle, Michael Gapczynski + * @copyright 2012 Michael Gapczynski <mtgap@owncloud.com> + * 2014 Bjoern Schiessle <schiessle@owncloud.com> + * + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +// use OCP namespace for all classes that are considered public. +// This means that they should be used by apps instead of the internal ownCloud classes +namespace OCP; + +/** + * Interface that apps must implement to share content. + */ +interface Share_Backend { + + /** + * Check if this $itemSource exist for the user + * @param string $itemSource + * @param string $uidOwner Owner of the item + * @return boolean|null Source + * + * Return false if the item does not exist for the user + */ + public function isValidSource($itemSource, $uidOwner); + + /** + * Get a unique name of the item for the specified user + * @param string $itemSource + * @param string|false $shareWith User the item is being shared with + * @param array|null $exclude List of similar item names already existing as shared items @deprecated since version OC7 + * @return string Target name + * + * This function needs to verify that the user does not already have an item with this name. + * If it does generate a new name e.g. name_# + */ + public function generateTarget($itemSource, $shareWith, $exclude = null); + + /** + * Converts the shared item sources back into the item in the specified format + * @param array $items Shared items + * @param int $format + * @return TODO + * + * The items array is a 3-dimensional array with the item_source as the + * first key and the share id as the second key to an array with the share + * info. + * + * The key/value pairs included in the share info depend on the function originally called: + * If called by getItem(s)Shared: id, item_type, item, item_source, + * share_type, share_with, permissions, stime, file_source + * + * If called by getItem(s)SharedWith: id, item_type, item, item_source, + * item_target, share_type, share_with, permissions, stime, file_source, + * file_target + * + * This function allows the backend to control the output of shared items with custom formats. + * It is only called through calls to the public getItem(s)Shared(With) functions. + */ + public function formatItems($items, $format, $parameters = null); + +} diff --git a/lib/public/share_backend_collection.php b/lib/public/share_backend_collection.php new file mode 100644 index 00000000000..0292222c74f --- /dev/null +++ b/lib/public/share_backend_collection.php @@ -0,0 +1,29 @@ +<?php +/** + * ownCloud + * + * @author Bjoern Schiessle, Michael Gapczynski + * @copyright 2012 Michael Gapczynski <mtgap@owncloud.com> + * 2014 Bjoern Schiessle <schiessle@owncloud.com> + * + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +// use OCP namespace for all classes that are considered public. +// This means that they should be used by apps instead of the internal ownCloud classes +namespace OCP; + +/** + * Interface for collections of of items implemented by another share backend. + * Extends the Share_Backend interface. + */ +interface Share_Backend_Collection extends Share_Backend { + /** + * Get the sources of the children of the item + * @param string $itemSource + * @return array Returns an array of children each inside an array with the keys: source, target, and file_path if applicable + */ + public function getChildren($itemSource); +} diff --git a/lib/public/share_backend_file_dependent.php b/lib/public/share_backend_file_dependent.php new file mode 100644 index 00000000000..b666e504008 --- /dev/null +++ b/lib/public/share_backend_file_dependent.php @@ -0,0 +1,31 @@ +<?php +/** + * ownCloud + * + * @author Bjoern Schiessle, Michael Gapczynski + * @copyright 2012 Michael Gapczynski <mtgap@owncloud.com> + * 2014 Bjoern Schiessle <schiessle@owncloud.com> + * + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +// use OCP namespace for all classes that are considered public. +// This means that they should be used by apps instead of the internal ownCloud classes +namespace OCP; + +/** + * Interface for share backends that share content that is dependent on files. + * Extends the Share_Backend interface. + */ +interface Share_Backend_File_Dependent extends Share_Backend { + /** + * Get the file path of the item + * @param string $itemSource + * @param string $uidOwner User that is the owner of shared item + * @return string|false + */ + public function getFilePath($itemSource, $uidOwner); + +} diff --git a/lib/public/template.php b/lib/public/template.php index 2e265bb5e8e..93af794ba62 100644 --- a/lib/public/template.php +++ b/lib/public/template.php @@ -38,6 +38,7 @@ namespace OCP; * @return string to the image * * @see OC_Helper::imagePath + * @deprecated Use \OCP\Template::image_path() instead */ function image_path( $app, $image ) { return(\image_path( $app, $image )); @@ -48,6 +49,7 @@ function image_path( $app, $image ) { * Make OC_Helper::mimetypeIcon available as a simple function * @param string $mimetype * @return string to the image of this file type. + * @deprecated Use \OCP\Template::mimetype_icon() instead */ function mimetype_icon( $mimetype ) { return(\mimetype_icon( $mimetype )); @@ -57,6 +59,7 @@ function mimetype_icon( $mimetype ) { * Make preview_icon available as a simple function * @param string $path path to file * @return string to the preview of the image + * @deprecated Use \OCP\Template::preview_icon() instead */ function preview_icon( $path ) { return(\preview_icon( $path )); @@ -68,6 +71,7 @@ function preview_icon( $path ) { * @param string $path of file * @param string $token * @return string link to the preview + * @deprecated Use \OCP\Template::publicPreview_icon() instead */ function publicPreview_icon ( $path, $token ) { return(\publicPreview_icon( $path, $token )); @@ -76,8 +80,9 @@ function publicPreview_icon ( $path, $token ) { /** * Make OC_Helper::humanFileSize available as a simple function * Example: 2048 to 2 kB. - * @param int $size in bytes + * @param int $bytes in bytes * @return string size as string + * @deprecated Use \OCP\Template::human_file_size() instead */ function human_file_size( $bytes ) { return(\human_file_size( $bytes )); @@ -88,7 +93,8 @@ function human_file_size( $bytes ) { * Return the relative date in relation to today. Returns something like "last hour" or "two month ago" * @param int $timestamp unix timestamp * @param boolean $dateOnly - * @return OC_L10N_String human readable interpretation of the timestamp + * @return \OC_L10N_String human readable interpretation of the timestamp + * @deprecated Use \OCP\Template::relative_modified_date() instead */ function relative_modified_date( $timestamp, $dateOnly = false ) { return(\relative_modified_date($timestamp, null, $dateOnly)); @@ -97,9 +103,9 @@ function relative_modified_date( $timestamp, $dateOnly = false ) { /** * Return a human readable outout for a file size. - * @deprecated use human_file_size() instead * @param integer $bytes size of a file in byte * @return string human readable interpretation of a file size + * @deprecated Use \OCP\Template::human_file_size() instead */ function simple_file_size($bytes) { return(\human_file_size($bytes)); @@ -112,6 +118,7 @@ function simple_file_size($bytes) { * @param mixed $selected which one is selected? * @param array $params the parameters * @return string html options + * @deprecated Use \OCP\Template::html_select_options() instead */ function html_select_options($options, $selected, $params=array()) { return(\html_select_options($options, $selected, $params)); @@ -123,5 +130,83 @@ function html_select_options($options, $selected, $params=array()) { * specific templates, add data and generate the html code */ class Template extends \OC_Template { - + /** + * Make OC_Helper::imagePath available as a simple function + * + * @see OC_Helper::imagePath + * + * @param string $app + * @param string $image + * @return string to the image + */ + public static function image_path($app, $image) { + return \image_path($app, $image); + } + + + /** + * Make OC_Helper::mimetypeIcon available as a simple function + * + * @param string $mimetype + * @return string to the image of this file type. + */ + public static function mimetype_icon($mimetype) { + return \mimetype_icon($mimetype); + } + + /** + * Make preview_icon available as a simple function + * + * @param string $path path to file + * @return string to the preview of the image + */ + public static function preview_icon($path) { + return \preview_icon($path); + } + + /** + * Make publicpreview_icon available as a simple function + * Returns the path to the preview of the image. + * + * @param string $path of file + * @param string $token + * @return string link to the preview + */ + public static function publicPreview_icon($path, $token) { + return \publicPreview_icon($path, $token); + } + + /** + * Make OC_Helper::humanFileSize available as a simple function + * Example: 2048 to 2 kB. + * + * @param int $bytes in bytes + * @return string size as string + */ + public static function human_file_size($bytes) { + return \human_file_size($bytes); + } + + /** + * Return the relative date in relation to today. Returns something like "last hour" or "two month ago" + * + * @param int $timestamp unix timestamp + * @param boolean $dateOnly + * @return \OC_L10N_String human readable interpretation of the timestamp + */ + public static function relative_modified_date($timestamp, $dateOnly = false) { + return \relative_modified_date($timestamp, null, $dateOnly); + } + + /** + * Generate html code for an options block. + * + * @param array $options the options + * @param mixed $selected which one is selected? + * @param array $params the parameters + * @return string html options + */ + public static function html_select_options($options, $selected, $params=array()) { + return \html_select_options($options, $selected, $params); + } } diff --git a/lib/public/user.php b/lib/public/user.php index 925410d37d5..e9835620433 100644 --- a/lib/public/user.php +++ b/lib/public/user.php @@ -38,6 +38,7 @@ class User { /** * Get the user id of the user currently logged in. * @return string uid or false + * @deprecated Use \OC::$server->getUserSession()->getUser()->getUID() */ public static function getUser() { return \OC_User::getUser(); @@ -94,6 +95,7 @@ class User { /** * Logs the user out including all the session data * Logout, destroys session + * @deprecated Use \OC::$server->getUserSession()->logout(); */ public static function logout() { \OC_User::logout(); @@ -106,6 +108,7 @@ class User { * @return string|false username on success, false otherwise * * Check if the password is correct without logging in the user + * @deprecated Use \OC::$server->getUserManager()->checkPassword(); */ public static function checkPassword( $uid, $password ) { return \OC_User::checkPassword( $uid, $password ); diff --git a/lib/public/util.php b/lib/public/util.php index a87d26a4004..793a16c4d84 100644 --- a/lib/public/util.php +++ b/lib/public/util.php @@ -508,8 +508,8 @@ class Util { /** * Compare two strings to provide a natural sort - * @param $a first string to compare - * @param $b second string to compare + * @param string $a first string to compare + * @param string $b second string to compare * @return -1 if $b comes before $a, 1 if $a comes before $b * or 0 if the strings are identical */ @@ -1,4 +1,4 @@ -#!/usr/bin/php +#!/usr/bin/env php <?php /** * Copyright (c) 2013 Thomas Müller <thomas.mueller@tmit.eu> diff --git a/settings/admin.php b/settings/admin.php index d1ed6e75f50..4b70848bd5b 100644 --- a/settings/admin.php +++ b/settings/admin.php @@ -9,7 +9,6 @@ OC_Util::checkAdminUser(); OC_App::setActiveNavigationEntry("admin"); $template = new OC_Template('settings', 'admin', 'user'); -$htAccessWorking = OC_Util::isHtaccessWorking(); $entries = OC_Log_Owncloud::getEntries(3); $entriesRemaining = count(OC_Log_Owncloud::getEntries(4)) > 3; @@ -17,7 +16,7 @@ $config = \OC::$server->getConfig(); $appConfig = \OC::$server->getAppConfig(); // Should we display sendmail as an option? -$template->assign('sendmail_is_available', (bool)findBinaryPath('sendmail')); +$template->assign('sendmail_is_available', (bool) \OC_Helper::findBinaryPath('sendmail')); $template->assign('loglevel', $config->getSystemValue("loglevel", 2)); $template->assign('mail_domain', $config->getSystemValue("mail_domain", '')); @@ -32,12 +31,11 @@ $template->assign('mail_smtpname', $config->getSystemValue("mail_smtpname", '')) $template->assign('mail_smtppassword', $config->getSystemValue("mail_smtppassword", '')); $template->assign('entries', $entries); $template->assign('entriesremain', $entriesRemaining); -$template->assign('htaccessworking', $htAccessWorking); +$template->assign('readOnlyConfigEnabled', OC_Helper::isReadOnlyConfigEnabled()); $template->assign('isLocaleWorking', OC_Util::isSetLocaleWorking()); $template->assign('isPhpCharSetUtf8', OC_Util::isPhpCharSetUtf8()); $template->assign('isAnnotationsWorking', OC_Util::isAnnotationsWorking()); $template->assign('has_fileinfo', OC_Util::fileInfoLoaded()); -$template->assign('old_php', OC_Util::isPHPoutdated()); $template->assign('backgroundjobs_mode', $appConfig->getValue('core', 'backgroundjobs_mode', 'ajax')); $template->assign('cron_log', $config->getSystemValue('cron_log', true)); $template->assign('lastcron', $appConfig->getValue('core', 'lastcron', false)); @@ -80,7 +78,7 @@ $l = OC_L10N::get('settings'); $formsAndMore = array(); if (OC_Request::serverProtocol() !== 'https' || !$htAccessWorking || !OC_Util::isAnnotationsWorking() || $suggestedOverwriteWebRoot || !OC_Util::isSetLocaleWorking() || !OC_Util::isPhpCharSetUtf8() || - OC_Util::isPHPoutdated() || !OC_Util::fileInfoLoaded() || $databaseOverload + !OC_Util::fileInfoLoaded() || $databaseOverload ) { $formsAndMore[] = array('anchor' => 'security-warning', 'section-name' => $l->t('Security & Setup Warnings')); } @@ -115,19 +113,3 @@ $formsAndMore[] = array('anchor' => 'log-section', 'section-name' => $l->t('Log' $template->assign('forms', $formsAndMore); $template->printPage(); - -/** - * Try to find a program - * - * @param string $program - * @return null|string - */ -function findBinaryPath($program) { - if (OC_Helper::is_function_enabled('exec')) { - exec('command -v ' . escapeshellarg($program) . ' 2> /dev/null', $output, $returnCode); - if ($returnCode === 0 && count($output) > 0) { - return escapeshellcmd($output[0]); - } - } - return null; -} diff --git a/settings/ajax/checksetup.php b/settings/ajax/checksetup.php index 6bf5bc5642e..64718933317 100644 --- a/settings/ajax/checksetup.php +++ b/settings/ajax/checksetup.php @@ -17,7 +17,8 @@ if (OC_Util::isInternetConnectionEnabled()) { } OCP\JSON::success( - array( - 'serverhasinternetconnection' => $hasInternet + array ( + 'serverHasInternetConnection' => $hasInternet, + 'dataDirectoryProtected' => OC_Util::isHtaccessWorking() ) ); diff --git a/settings/controller/appsettingscontroller.php b/settings/controller/appsettingscontroller.php index 27205400aff..3ad52bd2187 100644 --- a/settings/controller/appsettingscontroller.php +++ b/settings/controller/appsettingscontroller.php @@ -11,6 +11,8 @@ namespace OC\Settings\Controller; +use OC\App\DependencyAnalyzer; +use OC\App\Platform; use \OCP\AppFramework\Controller; use OCP\IRequest; use OCP\IL10N; @@ -123,10 +125,16 @@ class AppSettingsController extends Controller { } $app['groups'] = $groups; $app['canUnInstall'] = !$app['active'] && $app['removable']; + + // analyse dependencies + $dependencyAnalyzer = new DependencyAnalyzer($app, new Platform($this->config), $this->l10n); + $missing = $dependencyAnalyzer->analyze(); + + $app['canInstall'] = empty($missing); + $app['missingDependencies'] = $missing; return $app; }, $apps); return array('apps' => $apps, 'status' => 'success'); } - } diff --git a/settings/css/settings.css b/settings/css/settings.css index c18d5913b6f..4594a22c6d0 100644 --- a/settings/css/settings.css +++ b/settings/css/settings.css @@ -200,6 +200,12 @@ span.version { margin-left:1em; margin-right:1em; color:#555; } border-bottom: 1px solid #e8e8e8; } +.missing-dependencies { + list-style: initial; + list-style-type: initial; + list-style-position: inside; +} + /* Transition to complete width! */ .app:hover, .app:active { max-width: inherit; } diff --git a/settings/js/users/filter.js b/settings/js/users/filter.js index c5944e9b4b1..72f2cfc6d24 100644 --- a/settings/js/users/filter.js +++ b/settings/js/users/filter.js @@ -70,7 +70,14 @@ UserManagementFilter.prototype.run = _.debounce(function() { * @returns string */ UserManagementFilter.prototype.getPattern = function() { - return this.filterInput.val(); + var input = this.filterInput.val(), + html = $('html'), + isIE8or9 = html.hasClass('lte9'); + // FIXME - TODO - once support for IE8 and IE9 is dropped + if(isIE8or9 && input == this.filterInput.attr('placeholder')) { + input = ''; + } + return input; }; /** diff --git a/settings/l10n/ar.js b/settings/l10n/ar.js index 7f3695a1df6..f3e4d498cbd 100644 --- a/settings/l10n/ar.js +++ b/settings/l10n/ar.js @@ -76,8 +76,6 @@ OC.L10N.register( "Setup Warning" : "تحذير في التنصيب", "Module 'fileinfo' missing" : "الموديل 'fileinfo' مفقود", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "موديل 'fileinfo' الخاص بالـPHP مفقود . نوصي بتفعيل هذا الموديل للحصول على أفضل النتائج مع خاصية التحقق ", - "Your PHP version is outdated" : "اصدار PHP الخاص بك قديم", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "اصدار PHP الخاص بك قديم. نحن نقترح لك باصرار ان يتم ترقية الاصدار الى 5.3.8 او احدث بسبب ان الاصدارات القديمة معروفة انها مهمشة. من الممكن ان التنزيل قد لا يتم بصورة صحيحة.", "Locale not working" : "اللغه لا تعمل", "System locale can not be set to a one which supports UTF-8." : "لا يمكن تعيين لغة النظام الى احد اللغات التي تدعم UTF-8.", "This means that there might be problems with certain characters in file names." : "هذا يعني انه من الممكن ان يكون هناك مشكلة في بعض الاحرف في اسم الملف.", diff --git a/settings/l10n/ar.json b/settings/l10n/ar.json index 5e2fc16b24e..bd5171b4350 100644 --- a/settings/l10n/ar.json +++ b/settings/l10n/ar.json @@ -74,8 +74,6 @@ "Setup Warning" : "تحذير في التنصيب", "Module 'fileinfo' missing" : "الموديل 'fileinfo' مفقود", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "موديل 'fileinfo' الخاص بالـPHP مفقود . نوصي بتفعيل هذا الموديل للحصول على أفضل النتائج مع خاصية التحقق ", - "Your PHP version is outdated" : "اصدار PHP الخاص بك قديم", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "اصدار PHP الخاص بك قديم. نحن نقترح لك باصرار ان يتم ترقية الاصدار الى 5.3.8 او احدث بسبب ان الاصدارات القديمة معروفة انها مهمشة. من الممكن ان التنزيل قد لا يتم بصورة صحيحة.", "Locale not working" : "اللغه لا تعمل", "System locale can not be set to a one which supports UTF-8." : "لا يمكن تعيين لغة النظام الى احد اللغات التي تدعم UTF-8.", "This means that there might be problems with certain characters in file names." : "هذا يعني انه من الممكن ان يكون هناك مشكلة في بعض الاحرف في اسم الملف.", diff --git a/settings/l10n/ast.js b/settings/l10n/ast.js index 12482c4ddb5..3c0e0cbd58a 100644 --- a/settings/l10n/ast.js +++ b/settings/l10n/ast.js @@ -109,8 +109,6 @@ OC.L10N.register( "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "Ta usándose SQLite como base de datos. Pa instalaciones más grandes, recomendamos cambiar esto. Pa migrar a otra base de datos, usa la ferramienta de llinia de comandos: 'occ db:convert-type'", "Module 'fileinfo' missing" : "Nun s'atopó'l módulu \"fileinfo\"", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "Nun s'atopó'l módulu PHP 'fileinfo'. Encamentámoste qu'habilites esti módulu pa obtener meyores resultaos cola deteición de tribes MIME.", - "Your PHP version is outdated" : "La versión de PHP nun ta anovada", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "La versión de PHP caducó. Suxerímose que l'anueves a 5.3.8 o a una más nueva porque davezu, les versiones vieyes nun funcionen bien. Puede ser qu'esta instalación nun tea funcionando bien.", "PHP charset is not set to UTF-8" : "El xuegu de caracteres de PHP nun ta afitáu pa UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "El xuegu de caracteres de PHP nun ta afitáu pa UTF-8. Esto pue causar problemes graves con nomes d'archivos que nun contengan caracteres ASCII. Encamentamos camudar el valor de 'default_charset' a 'UTF-8'.", "Locale not working" : "La configuración rexonal nun ta funcionando", diff --git a/settings/l10n/ast.json b/settings/l10n/ast.json index 8ab5e2e448a..2d1a48006c7 100644 --- a/settings/l10n/ast.json +++ b/settings/l10n/ast.json @@ -107,8 +107,6 @@ "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "Ta usándose SQLite como base de datos. Pa instalaciones más grandes, recomendamos cambiar esto. Pa migrar a otra base de datos, usa la ferramienta de llinia de comandos: 'occ db:convert-type'", "Module 'fileinfo' missing" : "Nun s'atopó'l módulu \"fileinfo\"", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "Nun s'atopó'l módulu PHP 'fileinfo'. Encamentámoste qu'habilites esti módulu pa obtener meyores resultaos cola deteición de tribes MIME.", - "Your PHP version is outdated" : "La versión de PHP nun ta anovada", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "La versión de PHP caducó. Suxerímose que l'anueves a 5.3.8 o a una más nueva porque davezu, les versiones vieyes nun funcionen bien. Puede ser qu'esta instalación nun tea funcionando bien.", "PHP charset is not set to UTF-8" : "El xuegu de caracteres de PHP nun ta afitáu pa UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "El xuegu de caracteres de PHP nun ta afitáu pa UTF-8. Esto pue causar problemes graves con nomes d'archivos que nun contengan caracteres ASCII. Encamentamos camudar el valor de 'default_charset' a 'UTF-8'.", "Locale not working" : "La configuración rexonal nun ta funcionando", diff --git a/settings/l10n/az.js b/settings/l10n/az.js index 1150aecda59..a1843da2ca2 100644 --- a/settings/l10n/az.js +++ b/settings/l10n/az.js @@ -89,7 +89,6 @@ OC.L10N.register( "Setup Warning" : "Quruluş xəbərdarlığı", "Database Performance Info" : "Verilənlər bazasının davamiyyəti məlumatı", "Module 'fileinfo' missing" : "'fileinfo' modulu çatışmır", - "Your PHP version is outdated" : "Sizin PHP versiyası köhnəlib", "PHP charset is not set to UTF-8" : "PHP simvol tipi UTF-8 deyil", "Send mode" : "Göndərmə rejimi", "Authentication method" : "Qeydiyyat metodikası", diff --git a/settings/l10n/az.json b/settings/l10n/az.json index 6325a20b196..37e8fe44761 100644 --- a/settings/l10n/az.json +++ b/settings/l10n/az.json @@ -87,7 +87,6 @@ "Setup Warning" : "Quruluş xəbərdarlığı", "Database Performance Info" : "Verilənlər bazasının davamiyyəti məlumatı", "Module 'fileinfo' missing" : "'fileinfo' modulu çatışmır", - "Your PHP version is outdated" : "Sizin PHP versiyası köhnəlib", "PHP charset is not set to UTF-8" : "PHP simvol tipi UTF-8 deyil", "Send mode" : "Göndərmə rejimi", "Authentication method" : "Qeydiyyat metodikası", diff --git a/settings/l10n/bg_BG.js b/settings/l10n/bg_BG.js index e072dd080f8..506f44c4407 100644 --- a/settings/l10n/bg_BG.js +++ b/settings/l10n/bg_BG.js @@ -110,8 +110,6 @@ OC.L10N.register( "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "Настоящата база данни е SQLite. За по-големи инсталации препоръчваме да я смениш. За да преминеш към друга база данни използвай следната команда от командния ред: 'occ db:convert-type'", "Module 'fileinfo' missing" : "Модулът 'fileinfo' липсва", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "PHP модулът 'fileinfo' липсва. Силно препоръчваме този модъл да бъде добавен, за да бъдат постигнати най-добри резултати при mime-type откриването.", - "Your PHP version is outdated" : "PHP версията е остаряла.", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "PHP версията е остаряла. Силно препоръчваме да я обновиш на 5.3.8 или по-нова, защото по-старите версии създават проблеми. Възможно е тази инсталация да не работи правилно.", "PHP charset is not set to UTF-8" : "PHP таблицата от символи не е настроена за UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "PHP таблицата от символи не е настроена за UTF-8. Това може да предизвика големи проблеми с не ASCII символи в имена на файлове. Силно перпоръчваме да промените стойноста на 'defaul_charset' в php.ini до 'UTF-8'.", "Locale not working" : "Местоположението не работи", diff --git a/settings/l10n/bg_BG.json b/settings/l10n/bg_BG.json index a4eee134950..2c000622209 100644 --- a/settings/l10n/bg_BG.json +++ b/settings/l10n/bg_BG.json @@ -108,8 +108,6 @@ "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "Настоящата база данни е SQLite. За по-големи инсталации препоръчваме да я смениш. За да преминеш към друга база данни използвай следната команда от командния ред: 'occ db:convert-type'", "Module 'fileinfo' missing" : "Модулът 'fileinfo' липсва", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "PHP модулът 'fileinfo' липсва. Силно препоръчваме този модъл да бъде добавен, за да бъдат постигнати най-добри резултати при mime-type откриването.", - "Your PHP version is outdated" : "PHP версията е остаряла.", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "PHP версията е остаряла. Силно препоръчваме да я обновиш на 5.3.8 или по-нова, защото по-старите версии създават проблеми. Възможно е тази инсталация да не работи правилно.", "PHP charset is not set to UTF-8" : "PHP таблицата от символи не е настроена за UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "PHP таблицата от символи не е настроена за UTF-8. Това може да предизвика големи проблеми с не ASCII символи в имена на файлове. Силно перпоръчваме да промените стойноста на 'defaul_charset' в php.ini до 'UTF-8'.", "Locale not working" : "Местоположението не работи", diff --git a/settings/l10n/ca.js b/settings/l10n/ca.js index 7a3e95c7cbd..a37af93933d 100644 --- a/settings/l10n/ca.js +++ b/settings/l10n/ca.js @@ -1,6 +1,7 @@ OC.L10N.register( "settings", { + "Security & Setup Warnings" : "Avisos de seguretat i configuració", "Cron" : "Cron", "Sharing" : "Compartir", "Security" : "Seguretat", @@ -36,11 +37,16 @@ OC.L10N.register( "Back-end doesn't support password change, but the users encryption key was successfully updated." : "El dorsal no permet canviar la contrasenya, però la clau d'encripació d'usuaris s'ha actualitzat correctament.", "Unable to change password" : "No es pot canviar la contrasenya", "Enabled" : "Activat", + "Not enabled" : "Desactivat", + "Recommended" : "Recomanat", "Saved" : "Desat", "test email settings" : "prova l'arranjament del correu", "If you received this email, the settings seem to be correct." : "Si rebeu aquest correu sembla que l'arranjament del correu és correcte.", + "A problem occurred while sending the email. Please revise your settings." : "Hi ha hagut un problema enviant el correu. Reviseu la configuració.", "Email sent" : "El correu electrónic s'ha enviat", "You need to set your user email before being able to send test emails." : "Heu d'establir un nom d'usuari abans de poder enviar correus de prova.", + "Are you really sure you want add \"{domain}\" as trusted domain?" : "Esteu seguir que voleu afegir \"{domain}\" com a un domini de confiança?", + "Add trusted domain" : "Afegir domini de confiança", "Sending..." : "Enviant...", "All" : "Tots", "Please wait...." : "Espereu...", @@ -60,6 +66,7 @@ OC.L10N.register( "So-so password" : "Contrasenya passable", "Good password" : "Contrasenya bona", "Strong password" : "Contrasenya forta", + "Valid until {date}" : "Vàlid fins {date}", "Delete" : "Esborra", "Decrypting files... Please wait, this can take some time." : "Desencriptant fitxers... Espereu, això pot trigar una estona.", "Delete encryption keys permanently." : "Esborra les claus d'encriptació permanentment.", @@ -70,6 +77,7 @@ OC.L10N.register( "A valid group name must be provided" : "Heu de facilitar un nom de grup vàlid", "deleted {groupName}" : "eliminat {groupName}", "undo" : "desfés", + "no group" : "sense grup", "never" : "mai", "deleted {userName}" : "eliminat {userName}", "add group" : "afegeix grup", @@ -78,6 +86,7 @@ OC.L10N.register( "A valid password must be provided" : "Heu de facilitar una contrasenya vàlida", "Warning: Home directory for user \"{user}\" already exists" : "Avís: la carpeta Home per l'usuari \"{user}\" ja existeix", "__language_name__" : "Català", + "Personal Info" : "Informació personal", "SSL root certificates" : "Certificats SSL root", "Encryption" : "Xifrat", "Everything (fatal issues, errors, warnings, info, debug)" : "Tot (problemes fatals, errors, avisos, informació, depuració)", @@ -92,7 +101,7 @@ OC.L10N.register( "SSL" : "SSL", "TLS" : "TLS", "Security Warning" : "Avís de seguretat", - "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "Esteu accedint %s a través de HTTP. Us recomanem fermament que configureu el servidor perquè requereixi HTTPS.", + "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "Esteu accedint a %s a través de HTTP. Us recomanem fermament que configureu el servidor perquè requereixi HTTPS.", "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "La carpeta de dades i els vostres fitxersprobablement són accessibles des d'Internet. La fitxer .htaccess no funciona. Us recomanem que configureu el servidor web de tal manera que la carpeta de dades no sigui accessible o que moveu la carpeta de dades fora de l'arrel de documents del servidor web.", "Setup Warning" : "Avís de configuració", "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "Aparentment PHP està configurat per mostrar blocs en línia de documentació. Això farà que algunes aplicacions core siguin inaccessibles.", @@ -101,17 +110,22 @@ OC.L10N.register( "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "S'utilitza SQLite com a base de dades. Per instal·lacions grans recomanem que la canvieu. Per migrar a una altra base de dades useu l'eina d'intèrpret d'ordres 'occ db:convert-type'", "Module 'fileinfo' missing" : "No s'ha trobat el mòdul 'fileinfo'", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "El mòdul de PHP 'fileinfo' no s'ha trobat. Us recomanem que habiliteu aquest mòdul per obtenir millors resultats amb la detecció mime-type.", - "Your PHP version is outdated" : "La versió de PHP és obsoleta", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "La versió de PHP és obsoleta. Us recomanem fermament que actualitzeu a la versió 5.3.8 o superior perquè les versions anteriors no funcionen. La instal·lació podria no funcionar correctament.", + "PHP charset is not set to UTF-8" : "El codi de caràcters del php no és UTF-8", + "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "El codi de caràcters del php no és UTF-8. Això pot provocar greus problemes amb caràcter no-ASCII. Recomanem fermament canviar el valor del 'default_charset' del php.ini a 'UTF-8'", "Locale not working" : "Locale no funciona", "System locale can not be set to a one which supports UTF-8." : "No s'ha pogut establir cap localització del sistema amb suport per UTF-8.", "This means that there might be problems with certain characters in file names." : "Això podria comportar problemes amb alguns caràcters en els noms dels fitxer.", + "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Recomanem fermament que instal·leu els paquets requerits en el vostre sistema per suportar un dels següents idiomes: %s", + "URL generation in notification emails" : "Generar URL en els correus de notificació", + "Connectivity Checks" : "Verificacions de connectivitat", + "No problems found" : "No hem trovat problemes", "Please double check the <a href='%s'>installation guides</a>." : "Comproveu les <a href='%s'>guies d'instal·lació</a>.", "Last cron was executed at %s." : "L'últim cron s'ha executat el %s", "Last cron was executed at %s. This is more than an hour ago, something seems wrong." : "L'últim cron es va executar a %s. Fa més d'una hora, alguna cosa sembla que va malament.", "Cron was not executed yet!" : "El cron encara no s'ha executat!", "Execute one task with each page loaded" : "Executa una tasca per cada paquet carregat", "cron.php is registered at a webcron service to call cron.php every 15 minutes over http." : "cron.php està registrat en un servei webcron que fa una crida a cron.php cada 15 minuts a través de http.", + "Use system's cron service to call the cron.php file every 15 minutes." : "Fer servir el cron del sistema per cridar el cron.php cada 15 minuts.", "Allow apps to use the Share API" : "Permet que les aplicacions utilitzin l'API de compartir", "Allow users to share via link" : "Permet als usuaris compartir a través d'enllaços", "Enforce password protection" : "Reforça la protecció amb contrasenya", @@ -127,6 +141,8 @@ OC.L10N.register( "These groups will still be able to receive shares, but not to initiate them." : "Aquests fitxers encara podran rebre compartits, però no podran iniciar-los.", "Enforce HTTPS" : "Força HTTPS", "Forces the clients to connect to %s via an encrypted connection." : "Força la connexió dels clients a %s a través d'una connexió encriptada.", + "Enforce HTTPS for subdomains" : "Forçar HTTPS per subdominis", + "Forces the clients to connect to %s and subdomains via an encrypted connection." : "Força els clients a connectar-se a %s i els subdominis amb una connexió xifrada.", "Please connect to your %s via HTTPS to enable or disable the SSL enforcement." : "Connecteu a %s a través de HTTPS per habilitar o inhabilitar l'accés SSL.", "This is used for sending out notifications." : "S'usa per enviar notificacions.", "Send mode" : "Mode d'enviament", @@ -139,6 +155,7 @@ OC.L10N.register( "Credentials" : "Credencials", "SMTP Username" : "Nom d'usuari SMTP", "SMTP Password" : "Contrasenya SMTP", + "Store credentials" : "Emmagatzemar credencials", "Test email settings" : "Prova l'arranjament del correu", "Send email" : "Envia correu", "Log level" : "Nivell de registre", @@ -147,10 +164,13 @@ OC.L10N.register( "Version" : "Versió", "Developed by the <a href=\"http://ownCloud.org/contact\" target=\"_blank\">ownCloud community</a>, the <a href=\"https://github.com/owncloud\" target=\"_blank\">source code</a> is licensed under the <a href=\"http://www.gnu.org/licenses/agpl-3.0.html\" target=\"_blank\"><abbr title=\"Affero General Public License\">AGPL</abbr></a>." : "Desenvolupat per la <a href=\"http://ownCloud.org/contact\" target=\"_blank\">comunitat ownCloud</a>, el <a href=\"https://github.com/owncloud\" target=\"_blank\">codi font</a> té llicència <a href=\"http://www.gnu.org/licenses/agpl-3.0.html\" target=\"_blank\"><abbr title=\"Affero General Public License\">AGPL</abbr></a>.", "More apps" : "Més aplicacions", + "Add your app" : "Afegiu la vostra app", "by" : "per", + "licensed" : "llicenciat/da", "Documentation:" : "Documentació:", "User Documentation" : "Documentació d'usuari", "Admin Documentation" : "Documentació d'administrador", + "Update to %s" : "Actualitzar a %s", "Enable only for specific groups" : "Activa només per grups específics", "Uninstall App" : "Desinstal·la l'aplicació", "Administrator Documentation" : "Documentació d'administrador", @@ -182,6 +202,10 @@ OC.L10N.register( "Choose as profile image" : "Selecciona com a imatge de perfil", "Language" : "Idioma", "Help translate" : "Ajudeu-nos amb la traducció", + "Common Name" : "Nom comú", + "Valid until" : "Valid fins", + "Issued By" : "Emès Per", + "Valid until %s" : "Vàlid fins %s", "Import Root Certificate" : "Importa certificat root", "The encryption app is no longer enabled, please decrypt all your files" : "L'aplicació d'encriptació ja no està activada, desencripteu tots els vostres fitxers", "Log-in password" : "Contrasenya d'accés", @@ -189,10 +213,13 @@ OC.L10N.register( "Your encryption keys are moved to a backup location. If something went wrong you can restore the keys. Only delete them permanently if you are sure that all files are decrypted correctly." : "Les claus d'encriptació s'han mogut a una còpia de seguretat. Si alguna cosa va malament les podreu restablir. Esborreu-les permanentment només si esteu segur que tots els fitxers es desencripten correctament.", "Restore Encryption Keys" : "Restableix les claus d'encriptació", "Delete Encryption Keys" : "Esborra les claus d'encriptació", + "Show storage location" : "Mostra la ubicació del magatzem", + "Show last log in" : "Mostrar l'últim accés", "Username" : "Nom d'usuari", "Create" : "Crea", "Admin Recovery Password" : "Recuperació de contrasenya d'administrador", "Enter the recovery password in order to recover the users files during password change" : "Escriviu la contrasenya de recuperació per a poder recuperar els fitxers dels usuaris en canviar la contrasenya", + "Search Users" : "Buscar usuaris", "Add Group" : "Afegeix grup", "Group" : "Grup", "Everyone" : "Tothom", @@ -201,6 +228,7 @@ OC.L10N.register( "Please enter storage quota (ex: \"512 MB\" or \"12 GB\")" : "Escriviu la quota d'emmagatzemament (per ex.: \"512 MB\" o \"12 GB\")", "Unlimited" : "Il·limitat", "Other" : "Un altre", + "Group Admin for" : "Grup Admin per", "Quota" : "Quota", "Storage Location" : "Ubicació de l'emmagatzemament", "Last Login" : "Últim accés", diff --git a/settings/l10n/ca.json b/settings/l10n/ca.json index 9298c84ae75..c8145ed03e2 100644 --- a/settings/l10n/ca.json +++ b/settings/l10n/ca.json @@ -1,4 +1,5 @@ { "translations": { + "Security & Setup Warnings" : "Avisos de seguretat i configuració", "Cron" : "Cron", "Sharing" : "Compartir", "Security" : "Seguretat", @@ -34,11 +35,16 @@ "Back-end doesn't support password change, but the users encryption key was successfully updated." : "El dorsal no permet canviar la contrasenya, però la clau d'encripació d'usuaris s'ha actualitzat correctament.", "Unable to change password" : "No es pot canviar la contrasenya", "Enabled" : "Activat", + "Not enabled" : "Desactivat", + "Recommended" : "Recomanat", "Saved" : "Desat", "test email settings" : "prova l'arranjament del correu", "If you received this email, the settings seem to be correct." : "Si rebeu aquest correu sembla que l'arranjament del correu és correcte.", + "A problem occurred while sending the email. Please revise your settings." : "Hi ha hagut un problema enviant el correu. Reviseu la configuració.", "Email sent" : "El correu electrónic s'ha enviat", "You need to set your user email before being able to send test emails." : "Heu d'establir un nom d'usuari abans de poder enviar correus de prova.", + "Are you really sure you want add \"{domain}\" as trusted domain?" : "Esteu seguir que voleu afegir \"{domain}\" com a un domini de confiança?", + "Add trusted domain" : "Afegir domini de confiança", "Sending..." : "Enviant...", "All" : "Tots", "Please wait...." : "Espereu...", @@ -58,6 +64,7 @@ "So-so password" : "Contrasenya passable", "Good password" : "Contrasenya bona", "Strong password" : "Contrasenya forta", + "Valid until {date}" : "Vàlid fins {date}", "Delete" : "Esborra", "Decrypting files... Please wait, this can take some time." : "Desencriptant fitxers... Espereu, això pot trigar una estona.", "Delete encryption keys permanently." : "Esborra les claus d'encriptació permanentment.", @@ -68,6 +75,7 @@ "A valid group name must be provided" : "Heu de facilitar un nom de grup vàlid", "deleted {groupName}" : "eliminat {groupName}", "undo" : "desfés", + "no group" : "sense grup", "never" : "mai", "deleted {userName}" : "eliminat {userName}", "add group" : "afegeix grup", @@ -76,6 +84,7 @@ "A valid password must be provided" : "Heu de facilitar una contrasenya vàlida", "Warning: Home directory for user \"{user}\" already exists" : "Avís: la carpeta Home per l'usuari \"{user}\" ja existeix", "__language_name__" : "Català", + "Personal Info" : "Informació personal", "SSL root certificates" : "Certificats SSL root", "Encryption" : "Xifrat", "Everything (fatal issues, errors, warnings, info, debug)" : "Tot (problemes fatals, errors, avisos, informació, depuració)", @@ -90,7 +99,7 @@ "SSL" : "SSL", "TLS" : "TLS", "Security Warning" : "Avís de seguretat", - "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "Esteu accedint %s a través de HTTP. Us recomanem fermament que configureu el servidor perquè requereixi HTTPS.", + "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "Esteu accedint a %s a través de HTTP. Us recomanem fermament que configureu el servidor perquè requereixi HTTPS.", "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "La carpeta de dades i els vostres fitxersprobablement són accessibles des d'Internet. La fitxer .htaccess no funciona. Us recomanem que configureu el servidor web de tal manera que la carpeta de dades no sigui accessible o que moveu la carpeta de dades fora de l'arrel de documents del servidor web.", "Setup Warning" : "Avís de configuració", "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "Aparentment PHP està configurat per mostrar blocs en línia de documentació. Això farà que algunes aplicacions core siguin inaccessibles.", @@ -99,17 +108,22 @@ "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "S'utilitza SQLite com a base de dades. Per instal·lacions grans recomanem que la canvieu. Per migrar a una altra base de dades useu l'eina d'intèrpret d'ordres 'occ db:convert-type'", "Module 'fileinfo' missing" : "No s'ha trobat el mòdul 'fileinfo'", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "El mòdul de PHP 'fileinfo' no s'ha trobat. Us recomanem que habiliteu aquest mòdul per obtenir millors resultats amb la detecció mime-type.", - "Your PHP version is outdated" : "La versió de PHP és obsoleta", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "La versió de PHP és obsoleta. Us recomanem fermament que actualitzeu a la versió 5.3.8 o superior perquè les versions anteriors no funcionen. La instal·lació podria no funcionar correctament.", + "PHP charset is not set to UTF-8" : "El codi de caràcters del php no és UTF-8", + "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "El codi de caràcters del php no és UTF-8. Això pot provocar greus problemes amb caràcter no-ASCII. Recomanem fermament canviar el valor del 'default_charset' del php.ini a 'UTF-8'", "Locale not working" : "Locale no funciona", "System locale can not be set to a one which supports UTF-8." : "No s'ha pogut establir cap localització del sistema amb suport per UTF-8.", "This means that there might be problems with certain characters in file names." : "Això podria comportar problemes amb alguns caràcters en els noms dels fitxer.", + "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Recomanem fermament que instal·leu els paquets requerits en el vostre sistema per suportar un dels següents idiomes: %s", + "URL generation in notification emails" : "Generar URL en els correus de notificació", + "Connectivity Checks" : "Verificacions de connectivitat", + "No problems found" : "No hem trovat problemes", "Please double check the <a href='%s'>installation guides</a>." : "Comproveu les <a href='%s'>guies d'instal·lació</a>.", "Last cron was executed at %s." : "L'últim cron s'ha executat el %s", "Last cron was executed at %s. This is more than an hour ago, something seems wrong." : "L'últim cron es va executar a %s. Fa més d'una hora, alguna cosa sembla que va malament.", "Cron was not executed yet!" : "El cron encara no s'ha executat!", "Execute one task with each page loaded" : "Executa una tasca per cada paquet carregat", "cron.php is registered at a webcron service to call cron.php every 15 minutes over http." : "cron.php està registrat en un servei webcron que fa una crida a cron.php cada 15 minuts a través de http.", + "Use system's cron service to call the cron.php file every 15 minutes." : "Fer servir el cron del sistema per cridar el cron.php cada 15 minuts.", "Allow apps to use the Share API" : "Permet que les aplicacions utilitzin l'API de compartir", "Allow users to share via link" : "Permet als usuaris compartir a través d'enllaços", "Enforce password protection" : "Reforça la protecció amb contrasenya", @@ -125,6 +139,8 @@ "These groups will still be able to receive shares, but not to initiate them." : "Aquests fitxers encara podran rebre compartits, però no podran iniciar-los.", "Enforce HTTPS" : "Força HTTPS", "Forces the clients to connect to %s via an encrypted connection." : "Força la connexió dels clients a %s a través d'una connexió encriptada.", + "Enforce HTTPS for subdomains" : "Forçar HTTPS per subdominis", + "Forces the clients to connect to %s and subdomains via an encrypted connection." : "Força els clients a connectar-se a %s i els subdominis amb una connexió xifrada.", "Please connect to your %s via HTTPS to enable or disable the SSL enforcement." : "Connecteu a %s a través de HTTPS per habilitar o inhabilitar l'accés SSL.", "This is used for sending out notifications." : "S'usa per enviar notificacions.", "Send mode" : "Mode d'enviament", @@ -137,6 +153,7 @@ "Credentials" : "Credencials", "SMTP Username" : "Nom d'usuari SMTP", "SMTP Password" : "Contrasenya SMTP", + "Store credentials" : "Emmagatzemar credencials", "Test email settings" : "Prova l'arranjament del correu", "Send email" : "Envia correu", "Log level" : "Nivell de registre", @@ -145,10 +162,13 @@ "Version" : "Versió", "Developed by the <a href=\"http://ownCloud.org/contact\" target=\"_blank\">ownCloud community</a>, the <a href=\"https://github.com/owncloud\" target=\"_blank\">source code</a> is licensed under the <a href=\"http://www.gnu.org/licenses/agpl-3.0.html\" target=\"_blank\"><abbr title=\"Affero General Public License\">AGPL</abbr></a>." : "Desenvolupat per la <a href=\"http://ownCloud.org/contact\" target=\"_blank\">comunitat ownCloud</a>, el <a href=\"https://github.com/owncloud\" target=\"_blank\">codi font</a> té llicència <a href=\"http://www.gnu.org/licenses/agpl-3.0.html\" target=\"_blank\"><abbr title=\"Affero General Public License\">AGPL</abbr></a>.", "More apps" : "Més aplicacions", + "Add your app" : "Afegiu la vostra app", "by" : "per", + "licensed" : "llicenciat/da", "Documentation:" : "Documentació:", "User Documentation" : "Documentació d'usuari", "Admin Documentation" : "Documentació d'administrador", + "Update to %s" : "Actualitzar a %s", "Enable only for specific groups" : "Activa només per grups específics", "Uninstall App" : "Desinstal·la l'aplicació", "Administrator Documentation" : "Documentació d'administrador", @@ -180,6 +200,10 @@ "Choose as profile image" : "Selecciona com a imatge de perfil", "Language" : "Idioma", "Help translate" : "Ajudeu-nos amb la traducció", + "Common Name" : "Nom comú", + "Valid until" : "Valid fins", + "Issued By" : "Emès Per", + "Valid until %s" : "Vàlid fins %s", "Import Root Certificate" : "Importa certificat root", "The encryption app is no longer enabled, please decrypt all your files" : "L'aplicació d'encriptació ja no està activada, desencripteu tots els vostres fitxers", "Log-in password" : "Contrasenya d'accés", @@ -187,10 +211,13 @@ "Your encryption keys are moved to a backup location. If something went wrong you can restore the keys. Only delete them permanently if you are sure that all files are decrypted correctly." : "Les claus d'encriptació s'han mogut a una còpia de seguretat. Si alguna cosa va malament les podreu restablir. Esborreu-les permanentment només si esteu segur que tots els fitxers es desencripten correctament.", "Restore Encryption Keys" : "Restableix les claus d'encriptació", "Delete Encryption Keys" : "Esborra les claus d'encriptació", + "Show storage location" : "Mostra la ubicació del magatzem", + "Show last log in" : "Mostrar l'últim accés", "Username" : "Nom d'usuari", "Create" : "Crea", "Admin Recovery Password" : "Recuperació de contrasenya d'administrador", "Enter the recovery password in order to recover the users files during password change" : "Escriviu la contrasenya de recuperació per a poder recuperar els fitxers dels usuaris en canviar la contrasenya", + "Search Users" : "Buscar usuaris", "Add Group" : "Afegeix grup", "Group" : "Grup", "Everyone" : "Tothom", @@ -199,6 +226,7 @@ "Please enter storage quota (ex: \"512 MB\" or \"12 GB\")" : "Escriviu la quota d'emmagatzemament (per ex.: \"512 MB\" o \"12 GB\")", "Unlimited" : "Il·limitat", "Other" : "Un altre", + "Group Admin for" : "Grup Admin per", "Quota" : "Quota", "Storage Location" : "Ubicació de l'emmagatzemament", "Last Login" : "Últim accés", diff --git a/settings/l10n/cs_CZ.js b/settings/l10n/cs_CZ.js index b16dbe013b8..8b5228de302 100644 --- a/settings/l10n/cs_CZ.js +++ b/settings/l10n/cs_CZ.js @@ -103,6 +103,8 @@ OC.L10N.register( "Security Warning" : "Bezpečnostní upozornění", "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "Přistupujete na %s protokolem HTTP. Důrazně doporučujeme nakonfigurovat server pro použití HTTPS.", "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "Váš datový adresář i vaše soubory jsou pravděpodobně přístupné z internetu. Soubor .htaccess nefunguje. Důrazně doporučujeme nakonfigurovat webový server tak, aby datový adresář nebyl nadále přístupný, nebo přesunout datový adresář mimo prostor zpřístupňovaný webovým serverem.", + "Read-Only config enabled" : "Konfigurační soubor pouze pro čtení", + "The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update." : "Konfigurační soubor je pouze pro čtení. Toto omezuje možnost nastavení přes webové rozhraní. Dále musí být pro každou změnu povolen zápis do souboru ručně.", "Setup Warning" : "Upozornění nastavení", "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP je patrně nastaveno tak, aby odstraňovalo bloky komentářů. Toto bude mít za následek nedostupnost množství hlavních aplikací.", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Toto je pravděpodobně způsobeno aplikacemi pro urychlení načítání jako jsou Zend OPcache nebo eAccelerator.", @@ -110,13 +112,12 @@ OC.L10N.register( "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "Je použita databáze SQLite. Pro větší instalace doporučujeme toto změnit. Pro migraci na jiný typ databáze lze použít nástroj pro příkazový řádek: 'occ db:convert-type'", "Module 'fileinfo' missing" : "Schází modul 'fileinfo'", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "Schází PHP modul 'fileinfo'. Doporučujeme jej povolit pro nejlepší výsledky detekce typů MIME.", - "Your PHP version is outdated" : "Vaše verze PHP je zastaralá", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Vámi používaná verze PHP je zastaralá. Důrazně doporučujeme aktualizovat na verzi 5.3.8 nebo novější, protože starší verze obsahují chyby. Je možné, že tato instalace nebude fungovat správně.", "PHP charset is not set to UTF-8" : "Znaková sada PHP není nastavena na UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "Znaková sada PHP není nastavena na UTF-8. To může způsobit závažné problémy se jmény souborů se znaky neobsaženými v ASCII. Důrazně doporučujeme změnit hodnotu 'default_charset' v php.ini na 'UTF-8'.", "Locale not working" : "Lokalizace nefunguje", "System locale can not be set to a one which supports UTF-8." : "Není možné nastavit znakovou sadu, která podporuje UTF-8.", "This means that there might be problems with certain characters in file names." : "To znamená, že se mohou vyskytnout problémy s určitými znaky v názvech souborů.", + "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.", "URL generation in notification emails" : "Generování adresy URL v oznamovacích e-mailech", "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 \"overwritewebroot\" 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ě \"overwritewebroot\" (Doporučujeme: \"%s\")", "Connectivity Checks" : "Ověřování připojení", @@ -172,6 +173,7 @@ OC.L10N.register( "Documentation:" : "Dokumentace:", "User Documentation" : "Uživatelská dokumentace", "Admin Documentation" : "Dokumentace pro administrátory", + "This app cannot be installed because the following dependencies are not fulfilled:" : "Tuto aplikaci nelze nainstalovat, protože nejsou splněny následující závislosti:", "Update to %s" : "Aktualizovat na %s", "Enable only for specific groups" : "Povolit pouze pro vybrané skupiny", "Uninstall App" : "Odinstalovat aplikaci", diff --git a/settings/l10n/cs_CZ.json b/settings/l10n/cs_CZ.json index c6059695c26..c5547a00be6 100644 --- a/settings/l10n/cs_CZ.json +++ b/settings/l10n/cs_CZ.json @@ -101,6 +101,8 @@ "Security Warning" : "Bezpečnostní upozornění", "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "Přistupujete na %s protokolem HTTP. Důrazně doporučujeme nakonfigurovat server pro použití HTTPS.", "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "Váš datový adresář i vaše soubory jsou pravděpodobně přístupné z internetu. Soubor .htaccess nefunguje. Důrazně doporučujeme nakonfigurovat webový server tak, aby datový adresář nebyl nadále přístupný, nebo přesunout datový adresář mimo prostor zpřístupňovaný webovým serverem.", + "Read-Only config enabled" : "Konfigurační soubor pouze pro čtení", + "The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update." : "Konfigurační soubor je pouze pro čtení. Toto omezuje možnost nastavení přes webové rozhraní. Dále musí být pro každou změnu povolen zápis do souboru ručně.", "Setup Warning" : "Upozornění nastavení", "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP je patrně nastaveno tak, aby odstraňovalo bloky komentářů. Toto bude mít za následek nedostupnost množství hlavních aplikací.", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Toto je pravděpodobně způsobeno aplikacemi pro urychlení načítání jako jsou Zend OPcache nebo eAccelerator.", @@ -108,13 +110,12 @@ "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "Je použita databáze SQLite. Pro větší instalace doporučujeme toto změnit. Pro migraci na jiný typ databáze lze použít nástroj pro příkazový řádek: 'occ db:convert-type'", "Module 'fileinfo' missing" : "Schází modul 'fileinfo'", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "Schází PHP modul 'fileinfo'. Doporučujeme jej povolit pro nejlepší výsledky detekce typů MIME.", - "Your PHP version is outdated" : "Vaše verze PHP je zastaralá", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Vámi používaná verze PHP je zastaralá. Důrazně doporučujeme aktualizovat na verzi 5.3.8 nebo novější, protože starší verze obsahují chyby. Je možné, že tato instalace nebude fungovat správně.", "PHP charset is not set to UTF-8" : "Znaková sada PHP není nastavena na UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "Znaková sada PHP není nastavena na UTF-8. To může způsobit závažné problémy se jmény souborů se znaky neobsaženými v ASCII. Důrazně doporučujeme změnit hodnotu 'default_charset' v php.ini na 'UTF-8'.", "Locale not working" : "Lokalizace nefunguje", "System locale can not be set to a one which supports UTF-8." : "Není možné nastavit znakovou sadu, která podporuje UTF-8.", "This means that there might be problems with certain characters in file names." : "To znamená, že se mohou vyskytnout problémy s určitými znaky v názvech souborů.", + "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.", "URL generation in notification emails" : "Generování adresy URL v oznamovacích e-mailech", "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 \"overwritewebroot\" 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ě \"overwritewebroot\" (Doporučujeme: \"%s\")", "Connectivity Checks" : "Ověřování připojení", @@ -170,6 +171,7 @@ "Documentation:" : "Dokumentace:", "User Documentation" : "Uživatelská dokumentace", "Admin Documentation" : "Dokumentace pro administrátory", + "This app cannot be installed because the following dependencies are not fulfilled:" : "Tuto aplikaci nelze nainstalovat, protože nejsou splněny následující závislosti:", "Update to %s" : "Aktualizovat na %s", "Enable only for specific groups" : "Povolit pouze pro vybrané skupiny", "Uninstall App" : "Odinstalovat aplikaci", diff --git a/settings/l10n/da.js b/settings/l10n/da.js index 6f5112cad1f..16b4ef6e651 100644 --- a/settings/l10n/da.js +++ b/settings/l10n/da.js @@ -103,6 +103,8 @@ OC.L10N.register( "Security Warning" : "Sikkerhedsadvarsel", "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "Du tilgår %s via HTTP. Vi anbefaler at du konfigurerer din server til i stedet at kræve HTTPS.", "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "Din data mappe og dine filer er muligvis tilgængelige fra internettet. .htaccess filen virker ikke. Vi anbefaler på det kraftigste at du konfigurerer din webserver så data mappen ikke længere er tilgængelig, eller at du flytter data mappen uden for webserverens dokument rod. ", + "Read-Only config enabled" : "Skrivebeskyttet konfig. slået til", + "The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update." : "Den skrivebeskyttede konfiguration er blevet slået til. Dette forhindrer indstillinger af nogle konfigurationer via webgrænsefladen. I tillæg skal filen gøres skrivbar manuelt for hver opdatering.", "Setup Warning" : "Opsætnings Advarsel", "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP opsætning blokere \"inline doc blocks\". dette gør at flere grundlæggende apps utilgængelige", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Dette er sansynligvis forårsaget af et accelerator eller cache som Zend OPcache eller eAccelerator", @@ -110,13 +112,12 @@ OC.L10N.register( "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite er benyttet som database. Ved store installationer anbefaler vi at ændre dette. For at migrere til en anden database benyt 'occ db:convert-type' værktøjet i et kommandovindue.", "Module 'fileinfo' missing" : "Module 'fileinfo' mangler", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "PHP modulet 'fileinfo' mangler. Vi anbefaler stærkt at aktivere dette modul til at få de bedste resultater med mime-type detektion.", - "Your PHP version is outdated" : "Din PHP-version er forældet", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Din PHP-version er forældet. Vi anbefaler at du opgraderer til 5.3.8 eller nyere, fordi ældre versioner har kendte fejl. Det er derfor muligt at installationen ikke fungerer korrekt.", "PHP charset is not set to UTF-8" : "PHP-tegnsættet er ikke angivet til UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "PHP-tegnsættet er ikke angivet til UTF-8. Denne kan føre til store problemer med tegn som ikke er af typen ASCII i filnavne. Vi anbefaler kraftigt at ændre værdien for 'default_charset' i php.ini til 'UTF-8'.", "Locale not working" : "Landestandard fungerer ikke", "System locale can not be set to a one which supports UTF-8." : "Systemets locale kan ikke sættes til et der bruger UTF-8.", "This means that there might be problems with certain characters in file names." : "Det betyder at der kan være problemer med visse tegn i filnavne.", + "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Vi anbefaler kraftigt, at du installerer den krævede pakke på dit system, for at understøtte følgende lokaliteter: %s.", "URL generation in notification emails" : "URL-oprettelse i e-mailnotifikationer.", "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 \"overwritewebroot\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Hvis din installation ikke er installeret i roden af domænet, og bruger systemets cron, så kan der være problemer med URL-oprettelsen. For at undgå disse problemer, så angiv tilvalget \"overwritewebroot\" i din fil config.php til webrodens sti for din installation (foreslået værdi: \"%s\")", "Connectivity Checks" : "Forbindelsestjek", @@ -172,6 +173,7 @@ OC.L10N.register( "Documentation:" : "Dokumentation:", "User Documentation" : "Brugerdokumentation", "Admin Documentation" : "Administrator Dokumentation", + "This app cannot be installed because the following dependencies are not fulfilled:" : "Dette program kan ikke installeres, da følgende afhængigheder ikke imødekommes:", "Update to %s" : "Opdatér til %s", "Enable only for specific groups" : "Aktivér kun for udvalgte grupper", "Uninstall App" : "Afinstallér app", diff --git a/settings/l10n/da.json b/settings/l10n/da.json index 33deff944cb..79505bcd12f 100644 --- a/settings/l10n/da.json +++ b/settings/l10n/da.json @@ -101,6 +101,8 @@ "Security Warning" : "Sikkerhedsadvarsel", "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "Du tilgår %s via HTTP. Vi anbefaler at du konfigurerer din server til i stedet at kræve HTTPS.", "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "Din data mappe og dine filer er muligvis tilgængelige fra internettet. .htaccess filen virker ikke. Vi anbefaler på det kraftigste at du konfigurerer din webserver så data mappen ikke længere er tilgængelig, eller at du flytter data mappen uden for webserverens dokument rod. ", + "Read-Only config enabled" : "Skrivebeskyttet konfig. slået til", + "The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update." : "Den skrivebeskyttede konfiguration er blevet slået til. Dette forhindrer indstillinger af nogle konfigurationer via webgrænsefladen. I tillæg skal filen gøres skrivbar manuelt for hver opdatering.", "Setup Warning" : "Opsætnings Advarsel", "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP opsætning blokere \"inline doc blocks\". dette gør at flere grundlæggende apps utilgængelige", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Dette er sansynligvis forårsaget af et accelerator eller cache som Zend OPcache eller eAccelerator", @@ -108,13 +110,12 @@ "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite er benyttet som database. Ved store installationer anbefaler vi at ændre dette. For at migrere til en anden database benyt 'occ db:convert-type' værktøjet i et kommandovindue.", "Module 'fileinfo' missing" : "Module 'fileinfo' mangler", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "PHP modulet 'fileinfo' mangler. Vi anbefaler stærkt at aktivere dette modul til at få de bedste resultater med mime-type detektion.", - "Your PHP version is outdated" : "Din PHP-version er forældet", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Din PHP-version er forældet. Vi anbefaler at du opgraderer til 5.3.8 eller nyere, fordi ældre versioner har kendte fejl. Det er derfor muligt at installationen ikke fungerer korrekt.", "PHP charset is not set to UTF-8" : "PHP-tegnsættet er ikke angivet til UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "PHP-tegnsættet er ikke angivet til UTF-8. Denne kan føre til store problemer med tegn som ikke er af typen ASCII i filnavne. Vi anbefaler kraftigt at ændre værdien for 'default_charset' i php.ini til 'UTF-8'.", "Locale not working" : "Landestandard fungerer ikke", "System locale can not be set to a one which supports UTF-8." : "Systemets locale kan ikke sættes til et der bruger UTF-8.", "This means that there might be problems with certain characters in file names." : "Det betyder at der kan være problemer med visse tegn i filnavne.", + "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Vi anbefaler kraftigt, at du installerer den krævede pakke på dit system, for at understøtte følgende lokaliteter: %s.", "URL generation in notification emails" : "URL-oprettelse i e-mailnotifikationer.", "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 \"overwritewebroot\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Hvis din installation ikke er installeret i roden af domænet, og bruger systemets cron, så kan der være problemer med URL-oprettelsen. For at undgå disse problemer, så angiv tilvalget \"overwritewebroot\" i din fil config.php til webrodens sti for din installation (foreslået værdi: \"%s\")", "Connectivity Checks" : "Forbindelsestjek", @@ -170,6 +171,7 @@ "Documentation:" : "Dokumentation:", "User Documentation" : "Brugerdokumentation", "Admin Documentation" : "Administrator Dokumentation", + "This app cannot be installed because the following dependencies are not fulfilled:" : "Dette program kan ikke installeres, da følgende afhængigheder ikke imødekommes:", "Update to %s" : "Opdatér til %s", "Enable only for specific groups" : "Aktivér kun for udvalgte grupper", "Uninstall App" : "Afinstallér app", diff --git a/settings/l10n/de.js b/settings/l10n/de.js index 01068350307..34b2d9eb433 100644 --- a/settings/l10n/de.js +++ b/settings/l10n/de.js @@ -103,6 +103,8 @@ OC.L10N.register( "Security Warning" : "Sicherheitswarnung", "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "Du greifst auf %s via HTTP zu. Wir empfehlen Dir dringend, Deinen Server so konfigurieren, dass stattdessen HTTPS verlangt wird.", "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "Dein Datenverzeichnis und deine Dateien sind möglicherweise aus dem Internet erreichbar. Die .htaccess-Datei funktioniert nicht. Wir raten dir dringend, dass du deinen Webserver dahingehend konfigurierst, dass dein Datenverzeichnis nicht länger aus dem Internet erreichbar ist, oder du verschiebst das Datenverzeichnis ausserhalb des Wurzelverzeichnisses des Webservers.", + "Read-Only config enabled" : "Schreibgeschützte Konfiguration aktiviert", + "The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update." : "Die schreibgeschützte Konfiguration wurde aktiviert. Dies schützt die Änderung einiger Konfigurationen über die Web-Schnittstelle. Weiterhin muss für die Datei der Schreibzugriff bei jedem Update händisch aktiviert werden.", "Setup Warning" : "Einrichtungswarnung", "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP ist offenbar so konfiguriert, dass PHPDoc-Blöcke in der Anweisung entfernt werden. Dadurch sind mehrere Kern-Apps nicht erreichbar.", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Dies wird wahrscheinlich durch Zwischenspeicher/Beschleuniger wie z.B. OPcache oder eAccelerator verursacht.", @@ -110,13 +112,12 @@ OC.L10N.register( "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite wird als Datenbank verwendet. Für größere Installationen muss dies geändert werden. Zur Migration in eine andere Datenbank muss der Komandozeilenbefehl: 'occ db:convert-type' verwendet werden.", "Module 'fileinfo' missing" : "Modul 'fileinfo' fehlt ", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "Das PHP-Modul 'fileinfo' fehlt. Wir empfehlen dieses Modul zu aktivieren um die besten Resultate bei der Erkennung der Dateitypen zu erreichen.", - "Your PHP version is outdated" : "Deine PHP-Version ist veraltet", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Deine PHP-Version ist veraltet. Wir empfehlen dringend auf die Version 5.3.8 oder neuer zu aktualisieren, da ältere Versionen kompromittiert werden können. Es ist möglich, dass diese Installation nicht richtig funktioniert.", "PHP charset is not set to UTF-8" : "PHP-Zeichensatz ist nicht auf UTF-8 gesetzt", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "PHP-Zeichensatz ist nicht auf UTF-8 gesetzt. Dies kann Fehler mit Nicht-ASCII Zeichen in Dateinamen verursachen. Wir empfehlen daher den Wert von 'default_charset' in der php.ini auf 'UTF-8' zu ändern.", "Locale not working" : "Ländereinstellung funktioniert nicht", "System locale can not be set to a one which supports UTF-8." : "Systemgebietsschema kann nicht auf eine UTF-8 unterstützende eingestellt werden.", "This means that there might be problems with certain characters in file names." : "Dies bedeutet, dass Probleme mit bestimmten Zeichen in den Dateinamen geben kann.", + "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 eine der folgenden Gebietsschemas unterstützt wird: %s.", "URL generation in notification emails" : "URL-Generierung in Mail-Benachrichtungen", "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 \"overwritewebroot\" 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 \"overwritewebroot\"-Option in Deiner config.php auf das Web-Wurzelverzeichnis Deiner Installation (Vorschlag: \"%s\").", "Connectivity Checks" : "Verbindungsüberprüfungen", @@ -172,6 +173,7 @@ OC.L10N.register( "Documentation:" : "Dokumentation:", "User Documentation" : "Dokumentation für Benutzer", "Admin Documentation" : "Admin-Dokumentation", + "This app cannot be installed because the following dependencies are not fulfilled:" : "Die App kann nicht installiert werden, weil die folgenden Abhängigkeiten nicht erfüllt sind:", "Update to %s" : "Aktualisierung auf %s", "Enable only for specific groups" : "Nur für spezifizierte Gruppen aktivieren", "Uninstall App" : "App deinstallieren", diff --git a/settings/l10n/de.json b/settings/l10n/de.json index b63775263e7..972be151da1 100644 --- a/settings/l10n/de.json +++ b/settings/l10n/de.json @@ -101,6 +101,8 @@ "Security Warning" : "Sicherheitswarnung", "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "Du greifst auf %s via HTTP zu. Wir empfehlen Dir dringend, Deinen Server so konfigurieren, dass stattdessen HTTPS verlangt wird.", "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "Dein Datenverzeichnis und deine Dateien sind möglicherweise aus dem Internet erreichbar. Die .htaccess-Datei funktioniert nicht. Wir raten dir dringend, dass du deinen Webserver dahingehend konfigurierst, dass dein Datenverzeichnis nicht länger aus dem Internet erreichbar ist, oder du verschiebst das Datenverzeichnis ausserhalb des Wurzelverzeichnisses des Webservers.", + "Read-Only config enabled" : "Schreibgeschützte Konfiguration aktiviert", + "The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update." : "Die schreibgeschützte Konfiguration wurde aktiviert. Dies schützt die Änderung einiger Konfigurationen über die Web-Schnittstelle. Weiterhin muss für die Datei der Schreibzugriff bei jedem Update händisch aktiviert werden.", "Setup Warning" : "Einrichtungswarnung", "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP ist offenbar so konfiguriert, dass PHPDoc-Blöcke in der Anweisung entfernt werden. Dadurch sind mehrere Kern-Apps nicht erreichbar.", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Dies wird wahrscheinlich durch Zwischenspeicher/Beschleuniger wie z.B. OPcache oder eAccelerator verursacht.", @@ -108,13 +110,12 @@ "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite wird als Datenbank verwendet. Für größere Installationen muss dies geändert werden. Zur Migration in eine andere Datenbank muss der Komandozeilenbefehl: 'occ db:convert-type' verwendet werden.", "Module 'fileinfo' missing" : "Modul 'fileinfo' fehlt ", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "Das PHP-Modul 'fileinfo' fehlt. Wir empfehlen dieses Modul zu aktivieren um die besten Resultate bei der Erkennung der Dateitypen zu erreichen.", - "Your PHP version is outdated" : "Deine PHP-Version ist veraltet", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Deine PHP-Version ist veraltet. Wir empfehlen dringend auf die Version 5.3.8 oder neuer zu aktualisieren, da ältere Versionen kompromittiert werden können. Es ist möglich, dass diese Installation nicht richtig funktioniert.", "PHP charset is not set to UTF-8" : "PHP-Zeichensatz ist nicht auf UTF-8 gesetzt", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "PHP-Zeichensatz ist nicht auf UTF-8 gesetzt. Dies kann Fehler mit Nicht-ASCII Zeichen in Dateinamen verursachen. Wir empfehlen daher den Wert von 'default_charset' in der php.ini auf 'UTF-8' zu ändern.", "Locale not working" : "Ländereinstellung funktioniert nicht", "System locale can not be set to a one which supports UTF-8." : "Systemgebietsschema kann nicht auf eine UTF-8 unterstützende eingestellt werden.", "This means that there might be problems with certain characters in file names." : "Dies bedeutet, dass Probleme mit bestimmten Zeichen in den Dateinamen geben kann.", + "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 eine der folgenden Gebietsschemas unterstützt wird: %s.", "URL generation in notification emails" : "URL-Generierung in Mail-Benachrichtungen", "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 \"overwritewebroot\" 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 \"overwritewebroot\"-Option in Deiner config.php auf das Web-Wurzelverzeichnis Deiner Installation (Vorschlag: \"%s\").", "Connectivity Checks" : "Verbindungsüberprüfungen", @@ -170,6 +171,7 @@ "Documentation:" : "Dokumentation:", "User Documentation" : "Dokumentation für Benutzer", "Admin Documentation" : "Admin-Dokumentation", + "This app cannot be installed because the following dependencies are not fulfilled:" : "Die App kann nicht installiert werden, weil die folgenden Abhängigkeiten nicht erfüllt sind:", "Update to %s" : "Aktualisierung auf %s", "Enable only for specific groups" : "Nur für spezifizierte Gruppen aktivieren", "Uninstall App" : "App deinstallieren", diff --git a/settings/l10n/de_DE.js b/settings/l10n/de_DE.js index 7869e5583e9..3aa6a0aaacb 100644 --- a/settings/l10n/de_DE.js +++ b/settings/l10n/de_DE.js @@ -103,6 +103,8 @@ OC.L10N.register( "Security Warning" : "Sicherheitshinweis", "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "Sie greifen auf %s via HTTP zu. Wir empfehlen Ihnen dringend, Ihren Server so konfigurieren, dass stattdessen HTTPS verlangt wird.", "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "Ihr Datenverzeichnis und Ihre Dateien sind möglicherweise aus dem Internet erreichbar. Die .htaccess-Datei funktioniert nicht. Wir raten Ihnen dringend, dass Sie Ihren Webserver dahingehend konfigurieren, dass Ihr Datenverzeichnis nicht länger aus dem Internet erreichbar ist, oder Sie verschieben das Datenverzeichnis außerhalb des Wurzelverzeichnisses des Webservers.", + "Read-Only config enabled" : "Schreibgeschützte Konfiguration aktiviert", + "The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update." : "Die schreibgeschützte Konfiguration wurde aktiviert. Dies schützt die Änderung einiger Konfigurationen über die Web-Schnittstelle. Weiterhin muss für die Datei der Schreibzugriff bei jedem Update händisch aktiviert werden.", "Setup Warning" : "Einrichtungswarnung", "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP ist offenbar so konfiguriert, dass PHPDoc-Blöcke in der Anweisung entfernt werden. Dadurch sind mehrere Kern-Apps nicht erreichbar.", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Dies wird wahrscheinlich durch Zwischenspeicher/Beschleuniger wie z.B. OPcache oder eAccelerator verursacht.", @@ -110,13 +112,12 @@ OC.L10N.register( "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite wird als Datenbank verwendet. Für größere Installationen muss das geändert werden. Zur Migration in eine andere Datenbank muss in der Befehlszeile »occ db:convert-type« verwendet werden.", "Module 'fileinfo' missing" : "Das Modul 'fileinfo' fehlt", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "Das PHP-Modul 'fileinfo' fehlt. Wir empfehlen Ihnen dieses Modul zu aktivieren, um die besten Resultate bei der Bestimmung der Dateitypen zu erzielen.", - "Your PHP version is outdated" : "Ihre PHP-Version ist veraltet", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Ihre PHP-Version ist veraltet. Wir empfehlen dringend auf die Version 5.3.8 oder neuer zu aktualisieren, da ältere Versionen kompromittiert werden können. Es ist möglich, dass diese Installation nicht richtig funktioniert.", "PHP charset is not set to UTF-8" : "PHP-Zeichensatz ist nicht auf UTF-8 eingestellt", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "PHP-Zeichensatz ist nicht auf UTF-8 eingestellt. Das kann Fehler mit Nicht-ASCII-Zeichen in Dateinamen verursachen. Wir empfehlen daher den Wert von »default_charset« in der php.ini auf »UTF-8« zu ändern.", "Locale not working" : "Die Lokalisierung funktioniert nicht", "System locale can not be set to a one which supports UTF-8." : "Systemgebietsschema kann nicht auf eine UTF-8 unterstützende eingestellt werden.", "This means that there might be problems with certain characters in file names." : "Dieses bedeutet, dass es Probleme mit bestimmten Zeichen in den Dateinamen geben kann.", + "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 eine der folgenden Gebietsschemas unterstützt wird: %s.", "URL generation in notification emails" : "Adresserstellung in E-Mail-Benachrichtungen", "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 \"overwritewebroot\" 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 Adresserstellung kommen. Um dieses zu verhindern, stellen Sie bitte die »overwritewebroot«-Option in Ihrer config.php auf das Internetwurzelverzeichnis Ihrer Installation (Vorschlag: »%s«).", "Connectivity Checks" : "Verbindungsüberprüfungen", @@ -172,6 +173,7 @@ OC.L10N.register( "Documentation:" : "Dokumentation:", "User Documentation" : "Dokumentation für Benutzer", "Admin Documentation" : "Dokumentation für Administratoren", + "This app cannot be installed because the following dependencies are not fulfilled:" : "Diese App kann nicht installiert werden, weil die folgenden Abhängigkeiten nicht erfüllt sind:", "Update to %s" : "Aktualisierung auf %s", "Enable only for specific groups" : "Nur für bestimmte Gruppen aktivieren", "Uninstall App" : "App deinstallieren", diff --git a/settings/l10n/de_DE.json b/settings/l10n/de_DE.json index 9466f295c4a..626de67634a 100644 --- a/settings/l10n/de_DE.json +++ b/settings/l10n/de_DE.json @@ -101,6 +101,8 @@ "Security Warning" : "Sicherheitshinweis", "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "Sie greifen auf %s via HTTP zu. Wir empfehlen Ihnen dringend, Ihren Server so konfigurieren, dass stattdessen HTTPS verlangt wird.", "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "Ihr Datenverzeichnis und Ihre Dateien sind möglicherweise aus dem Internet erreichbar. Die .htaccess-Datei funktioniert nicht. Wir raten Ihnen dringend, dass Sie Ihren Webserver dahingehend konfigurieren, dass Ihr Datenverzeichnis nicht länger aus dem Internet erreichbar ist, oder Sie verschieben das Datenverzeichnis außerhalb des Wurzelverzeichnisses des Webservers.", + "Read-Only config enabled" : "Schreibgeschützte Konfiguration aktiviert", + "The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update." : "Die schreibgeschützte Konfiguration wurde aktiviert. Dies schützt die Änderung einiger Konfigurationen über die Web-Schnittstelle. Weiterhin muss für die Datei der Schreibzugriff bei jedem Update händisch aktiviert werden.", "Setup Warning" : "Einrichtungswarnung", "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP ist offenbar so konfiguriert, dass PHPDoc-Blöcke in der Anweisung entfernt werden. Dadurch sind mehrere Kern-Apps nicht erreichbar.", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Dies wird wahrscheinlich durch Zwischenspeicher/Beschleuniger wie z.B. OPcache oder eAccelerator verursacht.", @@ -108,13 +110,12 @@ "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite wird als Datenbank verwendet. Für größere Installationen muss das geändert werden. Zur Migration in eine andere Datenbank muss in der Befehlszeile »occ db:convert-type« verwendet werden.", "Module 'fileinfo' missing" : "Das Modul 'fileinfo' fehlt", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "Das PHP-Modul 'fileinfo' fehlt. Wir empfehlen Ihnen dieses Modul zu aktivieren, um die besten Resultate bei der Bestimmung der Dateitypen zu erzielen.", - "Your PHP version is outdated" : "Ihre PHP-Version ist veraltet", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Ihre PHP-Version ist veraltet. Wir empfehlen dringend auf die Version 5.3.8 oder neuer zu aktualisieren, da ältere Versionen kompromittiert werden können. Es ist möglich, dass diese Installation nicht richtig funktioniert.", "PHP charset is not set to UTF-8" : "PHP-Zeichensatz ist nicht auf UTF-8 eingestellt", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "PHP-Zeichensatz ist nicht auf UTF-8 eingestellt. Das kann Fehler mit Nicht-ASCII-Zeichen in Dateinamen verursachen. Wir empfehlen daher den Wert von »default_charset« in der php.ini auf »UTF-8« zu ändern.", "Locale not working" : "Die Lokalisierung funktioniert nicht", "System locale can not be set to a one which supports UTF-8." : "Systemgebietsschema kann nicht auf eine UTF-8 unterstützende eingestellt werden.", "This means that there might be problems with certain characters in file names." : "Dieses bedeutet, dass es Probleme mit bestimmten Zeichen in den Dateinamen geben kann.", + "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 eine der folgenden Gebietsschemas unterstützt wird: %s.", "URL generation in notification emails" : "Adresserstellung in E-Mail-Benachrichtungen", "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 \"overwritewebroot\" 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 Adresserstellung kommen. Um dieses zu verhindern, stellen Sie bitte die »overwritewebroot«-Option in Ihrer config.php auf das Internetwurzelverzeichnis Ihrer Installation (Vorschlag: »%s«).", "Connectivity Checks" : "Verbindungsüberprüfungen", @@ -170,6 +171,7 @@ "Documentation:" : "Dokumentation:", "User Documentation" : "Dokumentation für Benutzer", "Admin Documentation" : "Dokumentation für Administratoren", + "This app cannot be installed because the following dependencies are not fulfilled:" : "Diese App kann nicht installiert werden, weil die folgenden Abhängigkeiten nicht erfüllt sind:", "Update to %s" : "Aktualisierung auf %s", "Enable only for specific groups" : "Nur für bestimmte Gruppen aktivieren", "Uninstall App" : "App deinstallieren", diff --git a/settings/l10n/el.js b/settings/l10n/el.js index 149d7ffef0b..545b39b7687 100644 --- a/settings/l10n/el.js +++ b/settings/l10n/el.js @@ -110,8 +110,6 @@ OC.L10N.register( "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "Ως βάση δεδομένων χρησιμοποιείται η SQLite. Για μεγαλύτερες εγκαταστάσεις συνιστούμε να την αλλάξετε. Για να μετακινηθείτε σε μια άλλη βάση δεδομένων χρησιμοποιείστε το εργαλείο γραμμής εντολών: 'occ db:convert-type'", "Module 'fileinfo' missing" : "Η ενοτητα 'fileinfo' λειπει", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "Η PHP ενοτητα 'fileinfo' λειπει. Σας συνιστούμε να ενεργοποιήσετε αυτή την ενότητα για να έχετε καλύτερα αποτελέσματα με τον εντοπισμό τύπου MIME. ", - "Your PHP version is outdated" : "Η έκδοση PHP είναι απαρχαιωμένη", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Η έκδοση PHP είναι απαρχαιωμένη. Συνιστούμε ανεπιφύλακτα να ενημερώσετε στην 5.3.8 ή νεώτερη καθώς παλαιότερες εκδόσεις είναι γνωστό πως περιέχουν σφάλματα. Είναι πιθανόν ότι αυτή η εγκατάσταση δεν λειτουργεί σωστά.", "PHP charset is not set to UTF-8" : "Το σύνολο χαρακτήρων PHP δεν έχει οριστεί στο UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "Το σύνολο χαρακτήρων PHP δεν έχει οριστεί στο UTF-8. Αυτό μπορεί να προκαλέσει τεράστια ζητήματα με χωρίς-ASCII χαρακτήρες στα ονόματα των αρχείων. Συνιστούμε ανεπιφύλακτα να αλλάξετε την αξία του 'default_charset' php.ini στο 'UTF-8'.", "Locale not working" : "Η μετάφραση δεν δουλεύει", diff --git a/settings/l10n/el.json b/settings/l10n/el.json index 258846d9be3..7ac46e926d0 100644 --- a/settings/l10n/el.json +++ b/settings/l10n/el.json @@ -108,8 +108,6 @@ "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "Ως βάση δεδομένων χρησιμοποιείται η SQLite. Για μεγαλύτερες εγκαταστάσεις συνιστούμε να την αλλάξετε. Για να μετακινηθείτε σε μια άλλη βάση δεδομένων χρησιμοποιείστε το εργαλείο γραμμής εντολών: 'occ db:convert-type'", "Module 'fileinfo' missing" : "Η ενοτητα 'fileinfo' λειπει", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "Η PHP ενοτητα 'fileinfo' λειπει. Σας συνιστούμε να ενεργοποιήσετε αυτή την ενότητα για να έχετε καλύτερα αποτελέσματα με τον εντοπισμό τύπου MIME. ", - "Your PHP version is outdated" : "Η έκδοση PHP είναι απαρχαιωμένη", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Η έκδοση PHP είναι απαρχαιωμένη. Συνιστούμε ανεπιφύλακτα να ενημερώσετε στην 5.3.8 ή νεώτερη καθώς παλαιότερες εκδόσεις είναι γνωστό πως περιέχουν σφάλματα. Είναι πιθανόν ότι αυτή η εγκατάσταση δεν λειτουργεί σωστά.", "PHP charset is not set to UTF-8" : "Το σύνολο χαρακτήρων PHP δεν έχει οριστεί στο UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "Το σύνολο χαρακτήρων PHP δεν έχει οριστεί στο UTF-8. Αυτό μπορεί να προκαλέσει τεράστια ζητήματα με χωρίς-ASCII χαρακτήρες στα ονόματα των αρχείων. Συνιστούμε ανεπιφύλακτα να αλλάξετε την αξία του 'default_charset' php.ini στο 'UTF-8'.", "Locale not working" : "Η μετάφραση δεν δουλεύει", diff --git a/settings/l10n/en_GB.js b/settings/l10n/en_GB.js index 07f565291be..f3bb9d009fd 100644 --- a/settings/l10n/en_GB.js +++ b/settings/l10n/en_GB.js @@ -103,6 +103,8 @@ OC.L10N.register( "Security Warning" : "Security Warning", "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead.", "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root.", + "Read-Only config enabled" : "Read-Only config enabled", + "The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update." : "The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update.", "Setup Warning" : "Setup Warning", "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible.", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator.", @@ -110,13 +112,12 @@ OC.L10N.register( "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite is used as database. For larger installations we recommend changing this. To migrate to another database use the command line tool: 'occ db:convert-type'", "Module 'fileinfo' missing" : "Module 'fileinfo' missing", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "The PHP module 'fileinfo' is missing. We strongly recommend enabling this module to get best results with mime-type detection.", - "Your PHP version is outdated" : "Your PHP version is outdated", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly.", "PHP charset is not set to UTF-8" : "PHP charset is not set to UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'.", "Locale not working" : "Locale not working", "System locale can not be set to a one which supports UTF-8." : "System locale can not be set to a one which supports UTF-8.", "This means that there might be problems with certain characters in file names." : "This means that there might be problems with certain characters in file names.", + "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "We strongly suggest installing the required packages on your system to support one of the following locales: %s.", "URL generation in notification emails" : "URL generation in notification emails", "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 \"overwritewebroot\" option in your config.php file to the webroot path of your installation (Suggested: \"%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 \"overwritewebroot\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")", "Connectivity Checks" : "Connectivity Checks", @@ -172,6 +173,7 @@ OC.L10N.register( "Documentation:" : "Documentation:", "User Documentation" : "User Documentation", "Admin Documentation" : "Admin Documentation", + "This app cannot be installed because the following dependencies are not fulfilled:" : "This app cannot be installed because the following dependencies are not fulfilled:", "Update to %s" : "Update to %s", "Enable only for specific groups" : "Enable only for specific groups", "Uninstall App" : "Uninstall App", diff --git a/settings/l10n/en_GB.json b/settings/l10n/en_GB.json index ca307c39c23..551bcdff39d 100644 --- a/settings/l10n/en_GB.json +++ b/settings/l10n/en_GB.json @@ -101,6 +101,8 @@ "Security Warning" : "Security Warning", "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead.", "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root.", + "Read-Only config enabled" : "Read-Only config enabled", + "The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update." : "The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update.", "Setup Warning" : "Setup Warning", "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible.", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator.", @@ -108,13 +110,12 @@ "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite is used as database. For larger installations we recommend changing this. To migrate to another database use the command line tool: 'occ db:convert-type'", "Module 'fileinfo' missing" : "Module 'fileinfo' missing", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "The PHP module 'fileinfo' is missing. We strongly recommend enabling this module to get best results with mime-type detection.", - "Your PHP version is outdated" : "Your PHP version is outdated", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly.", "PHP charset is not set to UTF-8" : "PHP charset is not set to UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'.", "Locale not working" : "Locale not working", "System locale can not be set to a one which supports UTF-8." : "System locale can not be set to a one which supports UTF-8.", "This means that there might be problems with certain characters in file names." : "This means that there might be problems with certain characters in file names.", + "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "We strongly suggest installing the required packages on your system to support one of the following locales: %s.", "URL generation in notification emails" : "URL generation in notification emails", "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 \"overwritewebroot\" option in your config.php file to the webroot path of your installation (Suggested: \"%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 \"overwritewebroot\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")", "Connectivity Checks" : "Connectivity Checks", @@ -170,6 +171,7 @@ "Documentation:" : "Documentation:", "User Documentation" : "User Documentation", "Admin Documentation" : "Admin Documentation", + "This app cannot be installed because the following dependencies are not fulfilled:" : "This app cannot be installed because the following dependencies are not fulfilled:", "Update to %s" : "Update to %s", "Enable only for specific groups" : "Enable only for specific groups", "Uninstall App" : "Uninstall App", diff --git a/settings/l10n/es.js b/settings/l10n/es.js index feb83325f3e..6cb89eb6776 100644 --- a/settings/l10n/es.js +++ b/settings/l10n/es.js @@ -103,6 +103,8 @@ OC.L10N.register( "Security Warning" : "Advertencia de seguridad", "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "Está ingresando a %s vía HTTP. Le recomendamos encarecidamente que configure su servidor para que requiera HTTPS.", "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "Su directorio de datos y archivos es probablemente accesible desde Internet pues el archivo .htaccess no está funcionando. Le sugerimos encarecidamente que configure su servidor web de modo que el directorio de datos no sea accesible o que mueva dicho directorio fuera de la raíz de documentos del servidor web.", + "Read-Only config enabled" : "Configuración de solo lectura activada", + "The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update." : "Se ha habilitado la configuración de sólo lectura. Esto evita que ajustar algunas configuraciones a través de la interfaz web. Además, el archivo debe hacerse modificable manualmente para cada actualización.", "Setup Warning" : "Advertencia de configuración", "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP está aparentemente configurado para eliminar bloques de documentos en línea. Esto hará que varias aplicaciones del principales no estén accesibles.", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Probablemente esto sea causado por un cache o acelerador, como por ejemplo Zend OPcache o eAccelerator.", @@ -110,13 +112,12 @@ OC.L10N.register( "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "Se está usando SQLite como base de datos. Para instalaciones más grandes, recomendamos cambiar esto. Para migrar a otra base de datos, use la herramienta de línea de comandos: 'occ db:convert-type'", "Module 'fileinfo' missing" : "No se ha encontrado el módulo \"fileinfo\"", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "No se ha encontrado el modulo PHP 'fileinfo'. Le recomendamos encarecidamente que habilite este módulo para obtener mejores resultados con la detección de tipos MIME.", - "Your PHP version is outdated" : "Su versión de PHP no está actualizada", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Su versión de PHP ha caducado. Le sugerimos encarecidamente que la actualize a 5.3.8 o a una más nueva porque normalmente las versiones antiguas no funcionan bien. Puede ser que esta instalación no esté funcionando bien por ello.", "PHP charset is not set to UTF-8" : "El conjunto de caracteres de PHP no está establecido en UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "El set de caracteres usado por PHP no es UTF-8. Esto puede causar grandes problemas con nombres de archivos que contengan caracteres que no sean ASCII. Recomendamos encarecidamente cambiar el valor de 'default_charset' en php.ini a 'UTF-8'.", "Locale not working" : "La configuración regional no está funcionando", "System locale can not be set to a one which supports UTF-8." : "No se puede escoger una configuración regional que soporte UTF-8.", "This means that there might be problems with certain characters in file names." : "Esto significa que puede haber problemas con ciertos caracteres en los nombres de los archivos.", + "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Es muy recomendable instalar los paquetes necesarios para poder soportar una de las siguientes configuraciones regionales: %s. ", "URL generation in notification emails" : "Generación de URL en mensajes de notificación", "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 \"overwritewebroot\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Si su instalación no está ubicada en la raíz del dominio y usa el cron del sistema, puede haber problemas al generarse los URL. Para evitarlos, configure la opción \"overwritewebroot\" en su archivo config.php para que use la ruta de la raíz del sitio web de su instalación (sugerencia: \"%s\")", "Connectivity Checks" : "Probar la Conectividad", @@ -172,6 +173,7 @@ OC.L10N.register( "Documentation:" : "Documentación:", "User Documentation" : "Documentación de usuario", "Admin Documentation" : "Documentación para administradores", + "This app cannot be installed because the following dependencies are not fulfilled:" : "Esta aplicación no puede ser instalada porque las siguientes dependencias no se han cumplido:", "Update to %s" : "Actualizado a %s", "Enable only for specific groups" : "Activar solamente para grupos específicos", "Uninstall App" : "Desinstalar aplicación", diff --git a/settings/l10n/es.json b/settings/l10n/es.json index 21b02b3797e..bfb36af0c7c 100644 --- a/settings/l10n/es.json +++ b/settings/l10n/es.json @@ -101,6 +101,8 @@ "Security Warning" : "Advertencia de seguridad", "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "Está ingresando a %s vía HTTP. Le recomendamos encarecidamente que configure su servidor para que requiera HTTPS.", "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "Su directorio de datos y archivos es probablemente accesible desde Internet pues el archivo .htaccess no está funcionando. Le sugerimos encarecidamente que configure su servidor web de modo que el directorio de datos no sea accesible o que mueva dicho directorio fuera de la raíz de documentos del servidor web.", + "Read-Only config enabled" : "Configuración de solo lectura activada", + "The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update." : "Se ha habilitado la configuración de sólo lectura. Esto evita que ajustar algunas configuraciones a través de la interfaz web. Además, el archivo debe hacerse modificable manualmente para cada actualización.", "Setup Warning" : "Advertencia de configuración", "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP está aparentemente configurado para eliminar bloques de documentos en línea. Esto hará que varias aplicaciones del principales no estén accesibles.", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Probablemente esto sea causado por un cache o acelerador, como por ejemplo Zend OPcache o eAccelerator.", @@ -108,13 +110,12 @@ "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "Se está usando SQLite como base de datos. Para instalaciones más grandes, recomendamos cambiar esto. Para migrar a otra base de datos, use la herramienta de línea de comandos: 'occ db:convert-type'", "Module 'fileinfo' missing" : "No se ha encontrado el módulo \"fileinfo\"", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "No se ha encontrado el modulo PHP 'fileinfo'. Le recomendamos encarecidamente que habilite este módulo para obtener mejores resultados con la detección de tipos MIME.", - "Your PHP version is outdated" : "Su versión de PHP no está actualizada", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Su versión de PHP ha caducado. Le sugerimos encarecidamente que la actualize a 5.3.8 o a una más nueva porque normalmente las versiones antiguas no funcionan bien. Puede ser que esta instalación no esté funcionando bien por ello.", "PHP charset is not set to UTF-8" : "El conjunto de caracteres de PHP no está establecido en UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "El set de caracteres usado por PHP no es UTF-8. Esto puede causar grandes problemas con nombres de archivos que contengan caracteres que no sean ASCII. Recomendamos encarecidamente cambiar el valor de 'default_charset' en php.ini a 'UTF-8'.", "Locale not working" : "La configuración regional no está funcionando", "System locale can not be set to a one which supports UTF-8." : "No se puede escoger una configuración regional que soporte UTF-8.", "This means that there might be problems with certain characters in file names." : "Esto significa que puede haber problemas con ciertos caracteres en los nombres de los archivos.", + "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Es muy recomendable instalar los paquetes necesarios para poder soportar una de las siguientes configuraciones regionales: %s. ", "URL generation in notification emails" : "Generación de URL en mensajes de notificación", "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 \"overwritewebroot\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Si su instalación no está ubicada en la raíz del dominio y usa el cron del sistema, puede haber problemas al generarse los URL. Para evitarlos, configure la opción \"overwritewebroot\" en su archivo config.php para que use la ruta de la raíz del sitio web de su instalación (sugerencia: \"%s\")", "Connectivity Checks" : "Probar la Conectividad", @@ -170,6 +171,7 @@ "Documentation:" : "Documentación:", "User Documentation" : "Documentación de usuario", "Admin Documentation" : "Documentación para administradores", + "This app cannot be installed because the following dependencies are not fulfilled:" : "Esta aplicación no puede ser instalada porque las siguientes dependencias no se han cumplido:", "Update to %s" : "Actualizado a %s", "Enable only for specific groups" : "Activar solamente para grupos específicos", "Uninstall App" : "Desinstalar aplicación", diff --git a/settings/l10n/es_AR.js b/settings/l10n/es_AR.js index 058acf4e9ad..b681fa8d077 100644 --- a/settings/l10n/es_AR.js +++ b/settings/l10n/es_AR.js @@ -80,8 +80,6 @@ OC.L10N.register( "Setup Warning" : "Alerta de Configuración", "Module 'fileinfo' missing" : "El módulo 'fileinfo' no existe", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "El módulo PHP 'fileinfo' no existe. Es recomendable que actives este módulo para obtener mejores resultados con la detección mime-type", - "Your PHP version is outdated" : "Su versión de PHP está fuera de término", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Su versión de PHP está fuera de término. Recomendamos fuertemente actualizar a 5.3.8 o a una más nueva porque se sabe que versiones anteriores están falladas. Es posible que esta instalación no funcione adecuadamente.", "Locale not working" : "\"Locale\" no está funcionando", "System locale can not be set to a one which supports UTF-8." : "La localización del sistema no puede cambiarse a una que soporta UTF-8", "This means that there might be problems with certain characters in file names." : "Esto significa que puede haber problemas con ciertos caracteres en los nombres de archivos.", diff --git a/settings/l10n/es_AR.json b/settings/l10n/es_AR.json index 3ac7316db00..14ce77fbb88 100644 --- a/settings/l10n/es_AR.json +++ b/settings/l10n/es_AR.json @@ -78,8 +78,6 @@ "Setup Warning" : "Alerta de Configuración", "Module 'fileinfo' missing" : "El módulo 'fileinfo' no existe", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "El módulo PHP 'fileinfo' no existe. Es recomendable que actives este módulo para obtener mejores resultados con la detección mime-type", - "Your PHP version is outdated" : "Su versión de PHP está fuera de término", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Su versión de PHP está fuera de término. Recomendamos fuertemente actualizar a 5.3.8 o a una más nueva porque se sabe que versiones anteriores están falladas. Es posible que esta instalación no funcione adecuadamente.", "Locale not working" : "\"Locale\" no está funcionando", "System locale can not be set to a one which supports UTF-8." : "La localización del sistema no puede cambiarse a una que soporta UTF-8", "This means that there might be problems with certain characters in file names." : "Esto significa que puede haber problemas con ciertos caracteres en los nombres de archivos.", diff --git a/settings/l10n/es_MX.js b/settings/l10n/es_MX.js index c91d1cf742e..ff7bc009b82 100644 --- a/settings/l10n/es_MX.js +++ b/settings/l10n/es_MX.js @@ -63,8 +63,6 @@ OC.L10N.register( "Setup Warning" : "Advertencia de configuración", "Module 'fileinfo' missing" : "No se ha encontrado el módulo \"fileinfo\"", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "No se ha encontrado el modulo PHP 'fileinfo'. Le recomendamos encarecidamente que habilite este módulo para obtener mejores resultados con la detección de tipos MIME.", - "Your PHP version is outdated" : "Su versión de PHP ha caducado", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Su versión de PHP ha caducado. Le sugerimos encarecidamente que la actualize a 5.3.8 o a una más nueva porque normalmente las versiones antiguas no funcionan bien. Puede ser que esta instalación no esté funcionando bien por ello.", "Locale not working" : "La configuración regional no está funcionando", "System locale can not be set to a one which supports UTF-8." : "No se puede escoger una configuración regional que soporte UTF-8.", "This means that there might be problems with certain characters in file names." : "Esto significa que puede haber problemas con ciertos caracteres en los nombres de los archivos.", diff --git a/settings/l10n/es_MX.json b/settings/l10n/es_MX.json index 0d7969e3a5a..8e6456ec85b 100644 --- a/settings/l10n/es_MX.json +++ b/settings/l10n/es_MX.json @@ -61,8 +61,6 @@ "Setup Warning" : "Advertencia de configuración", "Module 'fileinfo' missing" : "No se ha encontrado el módulo \"fileinfo\"", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "No se ha encontrado el modulo PHP 'fileinfo'. Le recomendamos encarecidamente que habilite este módulo para obtener mejores resultados con la detección de tipos MIME.", - "Your PHP version is outdated" : "Su versión de PHP ha caducado", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Su versión de PHP ha caducado. Le sugerimos encarecidamente que la actualize a 5.3.8 o a una más nueva porque normalmente las versiones antiguas no funcionan bien. Puede ser que esta instalación no esté funcionando bien por ello.", "Locale not working" : "La configuración regional no está funcionando", "System locale can not be set to a one which supports UTF-8." : "No se puede escoger una configuración regional que soporte UTF-8.", "This means that there might be problems with certain characters in file names." : "Esto significa que puede haber problemas con ciertos caracteres en los nombres de los archivos.", diff --git a/settings/l10n/et_EE.js b/settings/l10n/et_EE.js index a294c7c5ab5..18d7cff60f9 100644 --- a/settings/l10n/et_EE.js +++ b/settings/l10n/et_EE.js @@ -110,8 +110,6 @@ OC.L10N.register( "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "Andmebaasina kasutatakse SQLite-t. Suuremate paigalduste puhul me soovitame seda muuta. Migreerimaks teisele andmebaasile kasuta seda käsurea vahendit: 'occ db:convert-type'", "Module 'fileinfo' missing" : "Moodul 'fileinfo' puudub", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "PHP moodul 'fileinfo' puudub. Soovitame tungivalt see lisada saavutamaks parimaid tulemusi failitüüpide tuvastamisel.", - "Your PHP version is outdated" : "PHP versioon on aegunud", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Sinu PHP versioon on aegunud. Soovitame tungivalt uuenda versioonile 5.3.8 või uuemale, kuna varasemad versioonid on teadaolevalt vigased. On võimalik, et see käesolev paigaldus ei toimi korrektselt.", "PHP charset is not set to UTF-8" : "PHP märgistik pole UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "PHP märgistikuks pole määratud UTF-8. See võib tekitada failinimedes mitte-ASCII märkidega suuri probleeme. Me soovitame tungivalt panna failis php.ini sätte 'default_charset' väärtuseks 'UTF-8'.", "Locale not working" : "Lokalisatsioon ei toimi", diff --git a/settings/l10n/et_EE.json b/settings/l10n/et_EE.json index 8582084d420..0b2c35b5f1f 100644 --- a/settings/l10n/et_EE.json +++ b/settings/l10n/et_EE.json @@ -108,8 +108,6 @@ "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "Andmebaasina kasutatakse SQLite-t. Suuremate paigalduste puhul me soovitame seda muuta. Migreerimaks teisele andmebaasile kasuta seda käsurea vahendit: 'occ db:convert-type'", "Module 'fileinfo' missing" : "Moodul 'fileinfo' puudub", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "PHP moodul 'fileinfo' puudub. Soovitame tungivalt see lisada saavutamaks parimaid tulemusi failitüüpide tuvastamisel.", - "Your PHP version is outdated" : "PHP versioon on aegunud", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Sinu PHP versioon on aegunud. Soovitame tungivalt uuenda versioonile 5.3.8 või uuemale, kuna varasemad versioonid on teadaolevalt vigased. On võimalik, et see käesolev paigaldus ei toimi korrektselt.", "PHP charset is not set to UTF-8" : "PHP märgistik pole UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "PHP märgistikuks pole määratud UTF-8. See võib tekitada failinimedes mitte-ASCII märkidega suuri probleeme. Me soovitame tungivalt panna failis php.ini sätte 'default_charset' väärtuseks 'UTF-8'.", "Locale not working" : "Lokalisatsioon ei toimi", diff --git a/settings/l10n/eu.js b/settings/l10n/eu.js index b56cdeaef72..eeff2dd7dbd 100644 --- a/settings/l10n/eu.js +++ b/settings/l10n/eu.js @@ -108,8 +108,6 @@ OC.L10N.register( "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite erabili da datu-base gisa. Instalazio handiagoetarako gomendatzen dugu aldatzea. Beste datu base batera migratzeko erabili komando-lerro tresna hau: 'occ db:convert-type'", "Module 'fileinfo' missing" : "'fileinfo' modulua falta da", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "PHP 'fileinfo' modulua falta da. Modulu hau gaitzea aholkatzen dizugu mime-type ezberdinak hobe detektatzeko.", - "Your PHP version is outdated" : "Zure PHP bertsioa zaharkituta dago", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Zure PHP bertsioa zaharkituta dago. Gure aholkua 5.3.8 edo bertsio berriago batera eguneratzea da, bertsio zaharragoak arazoak ematen baitituzte. Posible da instalazio honek ez funtzionatzea ongi.", "PHP charset is not set to UTF-8" : "PHP charset ez da UTF-8 gisa ezartzen", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "PHP charset ez da UTF-8 gisa ezartzen. Honek arazo larriak sor ditzake fitxategien izenetan ascii ez diren karaktereekin. Gomendatzen dizugu php.ini-ko 'default_charset'-en ordez 'UTF-8' ezartzea.", "Locale not working" : "Lokala ez dabil", diff --git a/settings/l10n/eu.json b/settings/l10n/eu.json index 8d27d47188b..3405967c4a9 100644 --- a/settings/l10n/eu.json +++ b/settings/l10n/eu.json @@ -106,8 +106,6 @@ "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite erabili da datu-base gisa. Instalazio handiagoetarako gomendatzen dugu aldatzea. Beste datu base batera migratzeko erabili komando-lerro tresna hau: 'occ db:convert-type'", "Module 'fileinfo' missing" : "'fileinfo' modulua falta da", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "PHP 'fileinfo' modulua falta da. Modulu hau gaitzea aholkatzen dizugu mime-type ezberdinak hobe detektatzeko.", - "Your PHP version is outdated" : "Zure PHP bertsioa zaharkituta dago", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Zure PHP bertsioa zaharkituta dago. Gure aholkua 5.3.8 edo bertsio berriago batera eguneratzea da, bertsio zaharragoak arazoak ematen baitituzte. Posible da instalazio honek ez funtzionatzea ongi.", "PHP charset is not set to UTF-8" : "PHP charset ez da UTF-8 gisa ezartzen", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "PHP charset ez da UTF-8 gisa ezartzen. Honek arazo larriak sor ditzake fitxategien izenetan ascii ez diren karaktereekin. Gomendatzen dizugu php.ini-ko 'default_charset'-en ordez 'UTF-8' ezartzea.", "Locale not working" : "Lokala ez dabil", diff --git a/settings/l10n/fa.js b/settings/l10n/fa.js index 624c124888b..c3ba168338d 100644 --- a/settings/l10n/fa.js +++ b/settings/l10n/fa.js @@ -91,7 +91,6 @@ OC.L10N.register( "Database Performance Info" : "اطلاعات کارایی پایگاه داده", "Module 'fileinfo' missing" : "ماژول 'fileinfo' از کار افتاده", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "ماژول 'fileinfo' PHP از کار افتاده است.ما اکیدا توصیه می کنیم که این ماژول را فعال کنید تا نتایج بهتری به وسیله ی mime-type detection دریافت کنید.", - "Your PHP version is outdated" : "نسخه PHP شما قدیمی است", "Locale not working" : "زبان محلی کار نمی کند.", "Please double check the <a href='%s'>installation guides</a>." : "لطفاً دوباره <a href='%s'>راهنمای نصب</a>را بررسی کنید.", "Last cron was executed at %s." : "کران قبلی در %s اجرا شد.", diff --git a/settings/l10n/fa.json b/settings/l10n/fa.json index 793551cfe56..766ffa4381e 100644 --- a/settings/l10n/fa.json +++ b/settings/l10n/fa.json @@ -89,7 +89,6 @@ "Database Performance Info" : "اطلاعات کارایی پایگاه داده", "Module 'fileinfo' missing" : "ماژول 'fileinfo' از کار افتاده", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "ماژول 'fileinfo' PHP از کار افتاده است.ما اکیدا توصیه می کنیم که این ماژول را فعال کنید تا نتایج بهتری به وسیله ی mime-type detection دریافت کنید.", - "Your PHP version is outdated" : "نسخه PHP شما قدیمی است", "Locale not working" : "زبان محلی کار نمی کند.", "Please double check the <a href='%s'>installation guides</a>." : "لطفاً دوباره <a href='%s'>راهنمای نصب</a>را بررسی کنید.", "Last cron was executed at %s." : "کران قبلی در %s اجرا شد.", diff --git a/settings/l10n/fi_FI.js b/settings/l10n/fi_FI.js index 762eda8c7b4..f37634c262a 100644 --- a/settings/l10n/fi_FI.js +++ b/settings/l10n/fi_FI.js @@ -102,18 +102,18 @@ OC.L10N.register( "Security Warning" : "Turvallisuusvaroitus", "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "Käytät %sia HTTP-yhteydellä. Suosittelemme määrittämään palvelimen vaatimaan salattua HTTPS-yhteyttä.", "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "Datahakemistosi ja kaikki tiedostosi ovat luultavasti käytettävissä suoraan internetistä. .htaccess-tiedosto ei toimi tällä hetkellä. Määritä verkkopalvelimen asetukset siten, ettei datahakemistosi ole suoraan käytettävissä tai siirrä kyseinen hakemisto pois verkkopalvelimen dokumenttijuuresta.", + "Read-Only config enabled" : "Vain luku -määritykset otettu käyttöön", "Setup Warning" : "Asetusvaroitus", "Database Performance Info" : "Tietokannan suorituskyvyn tiedot", "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLitea käytetään tietokantana. Laajoja asennuksia varten tämä asetus kannattaa muuttaa. Käytä komentorivityökalua 'occ db:convert-type' siirtyäksesi toiseen tietokantaan.", "Module 'fileinfo' missing" : "Moduuli 'fileinfo' puuttuu", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "PHP-moduuli \"fileinfo\" puuttuu. Sen käyttö on erittäin suositeltavaa, jotta MIME-tyypin havaitseminen onnistuu parhaalla mahdollisella tavalla.", - "Your PHP version is outdated" : "Käytössä oleva PHP-versio on vanhentunut", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Käytössä oleva PHP on vanhentunut. Päivitä versioon 5.3.8 tai uudempaan, koska aiemmat versiot eivät ole toimivia. On mahdollista, että tämä ownCloud-asennus ei toimi kunnolla.", "PHP charset is not set to UTF-8" : "PHP:n merkistöä ei ole asetettu UTF-8:ksi", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "PHP:n merkistöä ei ole asetettu UTF-8:ksi. Tämä saattaa aiheuttaa suuria ongelmia sellaisten tiedostojen kanssa, joiden nimi koostuu muista kuin ASCII-merkeistä. Suosittelemme asettamaan php.ini-tiedoston kohdan 'default_charset' arvoon 'UTF-8'.", "Locale not working" : "Maa-asetus ei toimi", "System locale can not be set to a one which supports UTF-8." : "Järjestelmän maa-asetusta ei voi asettaa UTF-8:aa tukevaksi.", "This means that there might be problems with certain characters in file names." : "Tämä tarkoittaa, että tiettyjen merkkien kanssa tiedostojen nimissä saattaa olla ongelmia.", + "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Suosittelemme asentamaan vaaditut paketit järjestelmään, jotta järjestelmässä on tuki yhdelle seuraavista maa-asetuksista: %s.", "URL generation in notification emails" : "Verkko-osoitteiden luominen sähköposti-ilmoituksissa", "No problems found" : "Ongelmia ei löytynyt", "Please double check the <a href='%s'>installation guides</a>." : "Lue tarkasti <a href='%s'>asennusohjeet</a>.", @@ -166,6 +166,7 @@ OC.L10N.register( "Documentation:" : "Ohjeistus:", "User Documentation" : "Käyttäjäohjeistus", "Admin Documentation" : "Ylläpitäjän ohjeistus", + "This app cannot be installed because the following dependencies are not fulfilled:" : "Tätä sovellusta ei voi asentaa, koska seuraavat riippuvuudet eivät täyty:", "Update to %s" : "Päivitä versioon %s", "Enable only for specific groups" : "Salli vain tietyille ryhmille", "Uninstall App" : "Poista sovelluksen asennus", diff --git a/settings/l10n/fi_FI.json b/settings/l10n/fi_FI.json index fea5b3b00ae..355cfe7f324 100644 --- a/settings/l10n/fi_FI.json +++ b/settings/l10n/fi_FI.json @@ -100,18 +100,18 @@ "Security Warning" : "Turvallisuusvaroitus", "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "Käytät %sia HTTP-yhteydellä. Suosittelemme määrittämään palvelimen vaatimaan salattua HTTPS-yhteyttä.", "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "Datahakemistosi ja kaikki tiedostosi ovat luultavasti käytettävissä suoraan internetistä. .htaccess-tiedosto ei toimi tällä hetkellä. Määritä verkkopalvelimen asetukset siten, ettei datahakemistosi ole suoraan käytettävissä tai siirrä kyseinen hakemisto pois verkkopalvelimen dokumenttijuuresta.", + "Read-Only config enabled" : "Vain luku -määritykset otettu käyttöön", "Setup Warning" : "Asetusvaroitus", "Database Performance Info" : "Tietokannan suorituskyvyn tiedot", "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLitea käytetään tietokantana. Laajoja asennuksia varten tämä asetus kannattaa muuttaa. Käytä komentorivityökalua 'occ db:convert-type' siirtyäksesi toiseen tietokantaan.", "Module 'fileinfo' missing" : "Moduuli 'fileinfo' puuttuu", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "PHP-moduuli \"fileinfo\" puuttuu. Sen käyttö on erittäin suositeltavaa, jotta MIME-tyypin havaitseminen onnistuu parhaalla mahdollisella tavalla.", - "Your PHP version is outdated" : "Käytössä oleva PHP-versio on vanhentunut", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Käytössä oleva PHP on vanhentunut. Päivitä versioon 5.3.8 tai uudempaan, koska aiemmat versiot eivät ole toimivia. On mahdollista, että tämä ownCloud-asennus ei toimi kunnolla.", "PHP charset is not set to UTF-8" : "PHP:n merkistöä ei ole asetettu UTF-8:ksi", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "PHP:n merkistöä ei ole asetettu UTF-8:ksi. Tämä saattaa aiheuttaa suuria ongelmia sellaisten tiedostojen kanssa, joiden nimi koostuu muista kuin ASCII-merkeistä. Suosittelemme asettamaan php.ini-tiedoston kohdan 'default_charset' arvoon 'UTF-8'.", "Locale not working" : "Maa-asetus ei toimi", "System locale can not be set to a one which supports UTF-8." : "Järjestelmän maa-asetusta ei voi asettaa UTF-8:aa tukevaksi.", "This means that there might be problems with certain characters in file names." : "Tämä tarkoittaa, että tiettyjen merkkien kanssa tiedostojen nimissä saattaa olla ongelmia.", + "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Suosittelemme asentamaan vaaditut paketit järjestelmään, jotta järjestelmässä on tuki yhdelle seuraavista maa-asetuksista: %s.", "URL generation in notification emails" : "Verkko-osoitteiden luominen sähköposti-ilmoituksissa", "No problems found" : "Ongelmia ei löytynyt", "Please double check the <a href='%s'>installation guides</a>." : "Lue tarkasti <a href='%s'>asennusohjeet</a>.", @@ -164,6 +164,7 @@ "Documentation:" : "Ohjeistus:", "User Documentation" : "Käyttäjäohjeistus", "Admin Documentation" : "Ylläpitäjän ohjeistus", + "This app cannot be installed because the following dependencies are not fulfilled:" : "Tätä sovellusta ei voi asentaa, koska seuraavat riippuvuudet eivät täyty:", "Update to %s" : "Päivitä versioon %s", "Enable only for specific groups" : "Salli vain tietyille ryhmille", "Uninstall App" : "Poista sovelluksen asennus", diff --git a/settings/l10n/fr.js b/settings/l10n/fr.js index 5a99912aeed..28b2290b47b 100644 --- a/settings/l10n/fr.js +++ b/settings/l10n/fr.js @@ -103,6 +103,8 @@ OC.L10N.register( "Security Warning" : "Avertissement de sécurité", "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "Vous accédez à %s via HTTP. Nous vous recommandons fortement de configurer votre serveur pour forcer l'utilisation de HTTPS à la place.", "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "Votre dossier de données et vos fichiers sont probablement accessibles depuis internet. Le fichier .htaccess ne fonctionne pas. Nous vous recommandons vivement de configurer votre serveur web de façon à ce que ce dossier de données ne soit plus accessible, ou bien de le déplacer à l'extérieur de la racine du serveur web.", + "Read-Only config enabled" : "Configuration en mode lecture seule activée", + "The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update." : "La configuration est en mode lecture seule. Ceci empêche la modification de certaines configurations via l'interface web. De plus, les fichiers doivent être passés manuellement en lecture-écriture pour chaque mise à jour.", "Setup Warning" : "Avertissement, problème de configuration", "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP est apparemment configuré pour supprimer les blocs de documentation internes. Cela rendra plusieurs applications de base inaccessibles.", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "La raison est probablement l'utilisation d'un cache / accélérateur tel que Zend OPcache ou eAccelerator.", @@ -110,13 +112,12 @@ OC.L10N.register( "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite est utilisée comme base de donnée. Pour des installations plus volumineuse, nous vous conseillons de changer ce réglage. Pour migrer vers une autre base de donnée, utilisez la commande : \"occ db:convert-type\"", "Module 'fileinfo' missing" : "Module 'fileinfo' manquant", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "Le module PHP 'fileinfo' est manquant. Il est vivement recommandé de l'activer afin d'obtenir de meilleurs résultats pour la détection des types de fichiers.", - "Your PHP version is outdated" : "Votre version de PHP est trop ancienne", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Votre version de PHP est trop ancienne. Nous vous recommandons fortement de migrer vers une version 5.3.8 ou plus récente encore, car les versions antérieures sont réputées problématiques. Il est possible que cette installation ne fonctionne pas correctement.", "PHP charset is not set to UTF-8" : "Le jeu de caractères PHP n'est pas réglé sur UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "Le jeu de caractères PHP n'est pas réglé sur UTF-8. Ceci peut entraîner des problèmes majeurs avec les noms de fichiers contenant des caractère non-ASCII. Nous recommandons fortement de changer la valeur de 'default_charset' dans php.ini par 'UTF-8'.", "Locale not working" : "Localisation non fonctionnelle", "System locale can not be set to a one which supports UTF-8." : "Les paramètres régionaux ne peuvent pas être configurés avec prise en charge d'UTF-8.", "This means that there might be problems with certain characters in file names." : "Cela signifie qu'il pourrait y avoir des problèmes avec certains caractères dans les noms de fichier.", + "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 requis à la prise en charge de l'un des paramètres régionaux suivants : %s", "URL generation in notification emails" : "Génération d'URL dans les mails de notification", "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 \"overwritewebroot\" 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 \"overwritewebroot\" de votre fichier config.php avec le chemin de la racine de votre installation (suggéré : \"%s\")", "Connectivity Checks" : "Vérification de la connectivité", @@ -172,6 +173,7 @@ OC.L10N.register( "Documentation:" : "Documentation :", "User Documentation" : "Documentation utilisateur", "Admin Documentation" : "Documentation administrateur", + "This app cannot be installed because the following dependencies are not fulfilled:" : "Cette application ne peut être installée à cause de ces dépendances non satisfaites:", "Update to %s" : "Mettre à niveau vers la version %s", "Enable only for specific groups" : "Activer uniquement pour certains groupes", "Uninstall App" : "Désinstaller l'application", diff --git a/settings/l10n/fr.json b/settings/l10n/fr.json index 433816d2316..167939bb628 100644 --- a/settings/l10n/fr.json +++ b/settings/l10n/fr.json @@ -101,6 +101,8 @@ "Security Warning" : "Avertissement de sécurité", "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "Vous accédez à %s via HTTP. Nous vous recommandons fortement de configurer votre serveur pour forcer l'utilisation de HTTPS à la place.", "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "Votre dossier de données et vos fichiers sont probablement accessibles depuis internet. Le fichier .htaccess ne fonctionne pas. Nous vous recommandons vivement de configurer votre serveur web de façon à ce que ce dossier de données ne soit plus accessible, ou bien de le déplacer à l'extérieur de la racine du serveur web.", + "Read-Only config enabled" : "Configuration en mode lecture seule activée", + "The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update." : "La configuration est en mode lecture seule. Ceci empêche la modification de certaines configurations via l'interface web. De plus, les fichiers doivent être passés manuellement en lecture-écriture pour chaque mise à jour.", "Setup Warning" : "Avertissement, problème de configuration", "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP est apparemment configuré pour supprimer les blocs de documentation internes. Cela rendra plusieurs applications de base inaccessibles.", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "La raison est probablement l'utilisation d'un cache / accélérateur tel que Zend OPcache ou eAccelerator.", @@ -108,13 +110,12 @@ "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite est utilisée comme base de donnée. Pour des installations plus volumineuse, nous vous conseillons de changer ce réglage. Pour migrer vers une autre base de donnée, utilisez la commande : \"occ db:convert-type\"", "Module 'fileinfo' missing" : "Module 'fileinfo' manquant", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "Le module PHP 'fileinfo' est manquant. Il est vivement recommandé de l'activer afin d'obtenir de meilleurs résultats pour la détection des types de fichiers.", - "Your PHP version is outdated" : "Votre version de PHP est trop ancienne", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Votre version de PHP est trop ancienne. Nous vous recommandons fortement de migrer vers une version 5.3.8 ou plus récente encore, car les versions antérieures sont réputées problématiques. Il est possible que cette installation ne fonctionne pas correctement.", "PHP charset is not set to UTF-8" : "Le jeu de caractères PHP n'est pas réglé sur UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "Le jeu de caractères PHP n'est pas réglé sur UTF-8. Ceci peut entraîner des problèmes majeurs avec les noms de fichiers contenant des caractère non-ASCII. Nous recommandons fortement de changer la valeur de 'default_charset' dans php.ini par 'UTF-8'.", "Locale not working" : "Localisation non fonctionnelle", "System locale can not be set to a one which supports UTF-8." : "Les paramètres régionaux ne peuvent pas être configurés avec prise en charge d'UTF-8.", "This means that there might be problems with certain characters in file names." : "Cela signifie qu'il pourrait y avoir des problèmes avec certains caractères dans les noms de fichier.", + "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 requis à la prise en charge de l'un des paramètres régionaux suivants : %s", "URL generation in notification emails" : "Génération d'URL dans les mails de notification", "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 \"overwritewebroot\" 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 \"overwritewebroot\" de votre fichier config.php avec le chemin de la racine de votre installation (suggéré : \"%s\")", "Connectivity Checks" : "Vérification de la connectivité", @@ -170,6 +171,7 @@ "Documentation:" : "Documentation :", "User Documentation" : "Documentation utilisateur", "Admin Documentation" : "Documentation administrateur", + "This app cannot be installed because the following dependencies are not fulfilled:" : "Cette application ne peut être installée à cause de ces dépendances non satisfaites:", "Update to %s" : "Mettre à niveau vers la version %s", "Enable only for specific groups" : "Activer uniquement pour certains groupes", "Uninstall App" : "Désinstaller l'application", diff --git a/settings/l10n/gl.js b/settings/l10n/gl.js index 9aa4d527e77..64e73cf0d0e 100644 --- a/settings/l10n/gl.js +++ b/settings/l10n/gl.js @@ -103,6 +103,8 @@ OC.L10N.register( "Security Warning" : "Aviso de seguranza", "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "Está accedendo a %s a través de HTTP. Suxerímoslle que configure o seu servidor para requirir, no seu canto, o uso de HTTPS.", "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "O seu cartafol de datos e os seus ficheiros probabelmente sexan accesíbeis a través de internet. O ficheiro .htaccess non está a traballar. Suxerímoslle que configure o seu servidor web de tal maneira que o cartafol de datos non estea accesíbel ou que mova o o directorio de datos fóra da raíz de documentos do servidor web.", + "Read-Only config enabled" : "Activada a restrición da configuración a só lectura", + "The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update." : "Foi activada a restrición da configuración a só lectura. Isto impide o estabelecemento dalgunhas configuracións a través da interface web. Ademais, ten que facer escribíbel manualmente o ficheiro para cada actualización.", "Setup Warning" : "Configurar os avisos", "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "Parece que PHP foi configuración para substituír bloques de documentos en liña. Isto fará que varias aplicacións sexan inaccesíbeis.", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Isto probabelmente se debe unha caché/acelerador como Zend OPcache ou eAccelerator.", @@ -110,13 +112,12 @@ OC.L10N.register( "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "Empregarase SQLite como base de datos. Para instalacións máis grandes recomendámoslle que cambie isto. Para migrar a outra base de datos use a ferramenta en liña de ordes: «occ db:convert-type»", "Module 'fileinfo' missing" : "Non se atopou o módulo «fileinfo»", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "Non se atopou o módulo de PHP «fileinfo». É recomendábel activar este módulo para obter os mellores resultados coa detección do tipo MIME.", - "Your PHP version is outdated" : "A versión de PHP está desactualizada", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "A versión de PHP está desactualizada. Recomendámoslle que a actualice á versión 5.3.8 ou posterior xa que as versións anteriores son coñecidas por estragarse. É probábel que esta instalación no estea a funcionar correctamente.", "PHP charset is not set to UTF-8" : "O xogo de caracteres de PHP non está estabelecido a UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "O xogo de caracteres de PHP non está estabelecido a UTF-8. Isto pode causar problemas importantes con caracteres non-ASCII nos nomes de ficheiro. Recomendámoslle que cambie o valor de php.ini «default_charset» a «UTF-8».", "Locale not working" : "A configuración rexional non funciona", "System locale can not be set to a one which supports UTF-8." : "Non é posíbel estabelecer a configuración rexional do sistema a unha que admita UTF-8.", "This means that there might be problems with certain characters in file names." : "Isto significa que pode haber problemas con certos caracteres en nomes de ficheiro.", + "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Recomendámoslle que instale no sistema os paquetes necesarios para admitir unha das seguintes configuracións rexionais: %s.", "URL generation in notification emails" : "Xeración dos URL nos correos de notificación", "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 \"overwritewebroot\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Se a instalación non foi feita na raíz do dominio e usa o sistema de cron, poden xurdir problemas coa xeración dos URL. Para evitar estes problemas, axuste a opción «overwritewebroot» no ficheiro config.php ás ruta de webroot da súa instalación (suxírese: «%s»)", "Connectivity Checks" : "Comprobacións de conectividade", @@ -143,6 +144,8 @@ OC.L10N.register( "These groups will still be able to receive shares, but not to initiate them." : "Estes grupos poderán recibir comparticións, mais non inicialas.", "Enforce HTTPS" : "Forzar HTTPS", "Forces the clients to connect to %s via an encrypted connection." : "Forzar que os clientes se conecten a %s empregando unha conexión cifrada.", + "Enforce HTTPS for subdomains" : "Forzar HTTPS para os subdominios", + "Forces the clients to connect to %s and subdomains via an encrypted connection." : "Forzar que os clientes se conecten a %s e aos subdominios empregando unha conexión cifrada.", "Please connect to your %s via HTTPS to enable or disable the SSL enforcement." : "Conéctese a %s empregando HTTPS para activar ou desactivar o forzado de SSL.", "This is used for sending out notifications." : "Isto utilizase para o envío de notificacións.", "Send mode" : "Modo de envío", @@ -219,6 +222,7 @@ OC.L10N.register( "Create" : "Crear", "Admin Recovery Password" : "Contrasinal de recuperación do administrador", "Enter the recovery password in order to recover the users files during password change" : "Introduza o contrasinal de recuperación para recuperar os ficheiros dos usuarios durante o cambio de contrasinal", + "Search Users" : "Busca de usuarios", "Add Group" : "Engadir un grupo", "Group" : "Grupo", "Everyone" : "Todos", diff --git a/settings/l10n/gl.json b/settings/l10n/gl.json index d1d3265b170..f72ae5d272f 100644 --- a/settings/l10n/gl.json +++ b/settings/l10n/gl.json @@ -101,6 +101,8 @@ "Security Warning" : "Aviso de seguranza", "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "Está accedendo a %s a través de HTTP. Suxerímoslle que configure o seu servidor para requirir, no seu canto, o uso de HTTPS.", "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "O seu cartafol de datos e os seus ficheiros probabelmente sexan accesíbeis a través de internet. O ficheiro .htaccess non está a traballar. Suxerímoslle que configure o seu servidor web de tal maneira que o cartafol de datos non estea accesíbel ou que mova o o directorio de datos fóra da raíz de documentos do servidor web.", + "Read-Only config enabled" : "Activada a restrición da configuración a só lectura", + "The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update." : "Foi activada a restrición da configuración a só lectura. Isto impide o estabelecemento dalgunhas configuracións a través da interface web. Ademais, ten que facer escribíbel manualmente o ficheiro para cada actualización.", "Setup Warning" : "Configurar os avisos", "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "Parece que PHP foi configuración para substituír bloques de documentos en liña. Isto fará que varias aplicacións sexan inaccesíbeis.", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Isto probabelmente se debe unha caché/acelerador como Zend OPcache ou eAccelerator.", @@ -108,13 +110,12 @@ "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "Empregarase SQLite como base de datos. Para instalacións máis grandes recomendámoslle que cambie isto. Para migrar a outra base de datos use a ferramenta en liña de ordes: «occ db:convert-type»", "Module 'fileinfo' missing" : "Non se atopou o módulo «fileinfo»", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "Non se atopou o módulo de PHP «fileinfo». É recomendábel activar este módulo para obter os mellores resultados coa detección do tipo MIME.", - "Your PHP version is outdated" : "A versión de PHP está desactualizada", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "A versión de PHP está desactualizada. Recomendámoslle que a actualice á versión 5.3.8 ou posterior xa que as versións anteriores son coñecidas por estragarse. É probábel que esta instalación no estea a funcionar correctamente.", "PHP charset is not set to UTF-8" : "O xogo de caracteres de PHP non está estabelecido a UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "O xogo de caracteres de PHP non está estabelecido a UTF-8. Isto pode causar problemas importantes con caracteres non-ASCII nos nomes de ficheiro. Recomendámoslle que cambie o valor de php.ini «default_charset» a «UTF-8».", "Locale not working" : "A configuración rexional non funciona", "System locale can not be set to a one which supports UTF-8." : "Non é posíbel estabelecer a configuración rexional do sistema a unha que admita UTF-8.", "This means that there might be problems with certain characters in file names." : "Isto significa que pode haber problemas con certos caracteres en nomes de ficheiro.", + "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Recomendámoslle que instale no sistema os paquetes necesarios para admitir unha das seguintes configuracións rexionais: %s.", "URL generation in notification emails" : "Xeración dos URL nos correos de notificación", "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 \"overwritewebroot\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Se a instalación non foi feita na raíz do dominio e usa o sistema de cron, poden xurdir problemas coa xeración dos URL. Para evitar estes problemas, axuste a opción «overwritewebroot» no ficheiro config.php ás ruta de webroot da súa instalación (suxírese: «%s»)", "Connectivity Checks" : "Comprobacións de conectividade", @@ -141,6 +142,8 @@ "These groups will still be able to receive shares, but not to initiate them." : "Estes grupos poderán recibir comparticións, mais non inicialas.", "Enforce HTTPS" : "Forzar HTTPS", "Forces the clients to connect to %s via an encrypted connection." : "Forzar que os clientes se conecten a %s empregando unha conexión cifrada.", + "Enforce HTTPS for subdomains" : "Forzar HTTPS para os subdominios", + "Forces the clients to connect to %s and subdomains via an encrypted connection." : "Forzar que os clientes se conecten a %s e aos subdominios empregando unha conexión cifrada.", "Please connect to your %s via HTTPS to enable or disable the SSL enforcement." : "Conéctese a %s empregando HTTPS para activar ou desactivar o forzado de SSL.", "This is used for sending out notifications." : "Isto utilizase para o envío de notificacións.", "Send mode" : "Modo de envío", @@ -217,6 +220,7 @@ "Create" : "Crear", "Admin Recovery Password" : "Contrasinal de recuperación do administrador", "Enter the recovery password in order to recover the users files during password change" : "Introduza o contrasinal de recuperación para recuperar os ficheiros dos usuarios durante o cambio de contrasinal", + "Search Users" : "Busca de usuarios", "Add Group" : "Engadir un grupo", "Group" : "Grupo", "Everyone" : "Todos", diff --git a/settings/l10n/hr.js b/settings/l10n/hr.js index e0f07974723..ff690b743e3 100644 --- a/settings/l10n/hr.js +++ b/settings/l10n/hr.js @@ -104,8 +104,6 @@ OC.L10N.register( "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite se koristi kao baza podataka. Za veće instalacije preporučujemo da se to promijeni.Za migraciju na neku drugu bazu podataka koristite naredbeni redak: 'occ db: convert-type'", "Module 'fileinfo' missing" : "Nedostaje modul 'fileinfo'", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "PHP modul 'fileinfo' nedostaje. Tolo vam preporučjemo da taj modul omogućitekako biste dobili najbolje rezultate u detekciji mime vrste.", - "Your PHP version is outdated" : "Vaša verzija PHP je zastarjela", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Vaša verzija PHP je zastarjela. Tolo vam preporučujemo da je ažurirate na 5.3.8.ili još novije jer je poznato da su starije verzije neispravne. Moguće je da ovainstalacija ne radi ispravno.", "PHP charset is not set to UTF-8" : "PHP Charset nije postavljen na UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "PHP charset nije postavljen na UTF-8. To može prouzročiti ozbiljne probleme s non-ASCII znakovimau nazivima datoteka. Toplo vam preporučujemo da vrijednost 'default_charset' php.ini promijeniteu 'UTF-8'.", "Locale not working" : "Regionalna shema ne radi", diff --git a/settings/l10n/hr.json b/settings/l10n/hr.json index 78af9502520..4f28ba64adc 100644 --- a/settings/l10n/hr.json +++ b/settings/l10n/hr.json @@ -102,8 +102,6 @@ "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite se koristi kao baza podataka. Za veće instalacije preporučujemo da se to promijeni.Za migraciju na neku drugu bazu podataka koristite naredbeni redak: 'occ db: convert-type'", "Module 'fileinfo' missing" : "Nedostaje modul 'fileinfo'", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "PHP modul 'fileinfo' nedostaje. Tolo vam preporučjemo da taj modul omogućitekako biste dobili najbolje rezultate u detekciji mime vrste.", - "Your PHP version is outdated" : "Vaša verzija PHP je zastarjela", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Vaša verzija PHP je zastarjela. Tolo vam preporučujemo da je ažurirate na 5.3.8.ili još novije jer je poznato da su starije verzije neispravne. Moguće je da ovainstalacija ne radi ispravno.", "PHP charset is not set to UTF-8" : "PHP Charset nije postavljen na UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "PHP charset nije postavljen na UTF-8. To može prouzročiti ozbiljne probleme s non-ASCII znakovimau nazivima datoteka. Toplo vam preporučujemo da vrijednost 'default_charset' php.ini promijeniteu 'UTF-8'.", "Locale not working" : "Regionalna shema ne radi", diff --git a/settings/l10n/hu_HU.js b/settings/l10n/hu_HU.js index e7cd62bf80f..4a83a78a977 100644 --- a/settings/l10n/hu_HU.js +++ b/settings/l10n/hu_HU.js @@ -104,8 +104,6 @@ OC.L10N.register( "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "A kiválasztott adatbázis az SQLite. Nagyobb telepítések esetén ezt érdemes megváltoztatni. Másik adatbázisra való áttéréshez használja a következő parancssori eszközt: 'occ db:convert-type'", "Module 'fileinfo' missing" : "A 'fileinfo' modul hiányzik", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "A 'fileinfo' PHP modul hiányzik. Erősen javasolt ennek a modulnak a telepítése, mert ezzel lényegesen jobb a MIME-típusok felismerése.", - "Your PHP version is outdated" : "A PHP verzió túl régi", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "A PHP verzió túl régi. Nagyon ajánlott legalább az 5.3.8-as vagy újabb verzióra frissíteni, mert a régebbi verziónál léteznek ismert hibák. Ezért lehetséges, hogy ez a telepítés majd nem működik megfelelően.", "PHP charset is not set to UTF-8" : "A PHP-karakterkészlet nem UTF-8-ra van állítva", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "A PHP-karakterkészlet nem UTF-8-ra van állítva. Ez komoly problémákat okozhat, ha valaki olyan fájlnevet használ, amiben nem csupán ASCII karakterek fordulnak elő. Feltétlenül javasoljuk, hogy a php.ini-ben a 'default_charset' paramétert állítsa 'UTF-8'-ra!", "Locale not working" : "A nyelvi lokalizáció nem működik", diff --git a/settings/l10n/hu_HU.json b/settings/l10n/hu_HU.json index 6e209dc8f81..01895bb8b9f 100644 --- a/settings/l10n/hu_HU.json +++ b/settings/l10n/hu_HU.json @@ -102,8 +102,6 @@ "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "A kiválasztott adatbázis az SQLite. Nagyobb telepítések esetén ezt érdemes megváltoztatni. Másik adatbázisra való áttéréshez használja a következő parancssori eszközt: 'occ db:convert-type'", "Module 'fileinfo' missing" : "A 'fileinfo' modul hiányzik", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "A 'fileinfo' PHP modul hiányzik. Erősen javasolt ennek a modulnak a telepítése, mert ezzel lényegesen jobb a MIME-típusok felismerése.", - "Your PHP version is outdated" : "A PHP verzió túl régi", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "A PHP verzió túl régi. Nagyon ajánlott legalább az 5.3.8-as vagy újabb verzióra frissíteni, mert a régebbi verziónál léteznek ismert hibák. Ezért lehetséges, hogy ez a telepítés majd nem működik megfelelően.", "PHP charset is not set to UTF-8" : "A PHP-karakterkészlet nem UTF-8-ra van állítva", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "A PHP-karakterkészlet nem UTF-8-ra van állítva. Ez komoly problémákat okozhat, ha valaki olyan fájlnevet használ, amiben nem csupán ASCII karakterek fordulnak elő. Feltétlenül javasoljuk, hogy a php.ini-ben a 'default_charset' paramétert állítsa 'UTF-8'-ra!", "Locale not working" : "A nyelvi lokalizáció nem működik", diff --git a/settings/l10n/id.js b/settings/l10n/id.js index 3240c893669..c772bc8127c 100644 --- a/settings/l10n/id.js +++ b/settings/l10n/id.js @@ -109,8 +109,6 @@ OC.L10N.register( "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite akan digunakan sebagai basis data. Untuk instalasi besar, kami merekomendasikan untuk mengubahnya. Untuk berpindah ke basis data lainnya, gunakan alat baris perintah: 'occ db:convert-type'", "Module 'fileinfo' missing" : "Modul 'fileinfo' tidak ada", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "Module 'fileinfo' pada PHP tidak ada. Kami sangat menyarankan untuk mengaktifkan modul ini untuk mendapatkan hasil terbaik pada proses pendeteksian mime-type.", - "Your PHP version is outdated" : "Versi PHP telah usang", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Versi PHP telah usang. Kami sangat menyarankan untuk diperbarui ke versi 5.3.8 atau yang lebih baru karena versi lama diketahui rusak. Ada kemungkinan bahwa instalasi ini tidak bekerja dengan benar.", "PHP charset is not set to UTF-8" : "Charset PHP tidak disetel ke UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "Charset PHP tidak disetel ke UTF-8. Hal ini dapat menyebabkan masalah besar dengan karakter non-ASCII di nama berkas. Kami sangat merekomendasikan untuk mengubah nilai 'default_charset' php.ini ke 'UTF-8'.", "Locale not working" : "Kode pelokalan tidak berfungsi", diff --git a/settings/l10n/id.json b/settings/l10n/id.json index eadfcf6c2db..5a507822b59 100644 --- a/settings/l10n/id.json +++ b/settings/l10n/id.json @@ -107,8 +107,6 @@ "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite akan digunakan sebagai basis data. Untuk instalasi besar, kami merekomendasikan untuk mengubahnya. Untuk berpindah ke basis data lainnya, gunakan alat baris perintah: 'occ db:convert-type'", "Module 'fileinfo' missing" : "Modul 'fileinfo' tidak ada", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "Module 'fileinfo' pada PHP tidak ada. Kami sangat menyarankan untuk mengaktifkan modul ini untuk mendapatkan hasil terbaik pada proses pendeteksian mime-type.", - "Your PHP version is outdated" : "Versi PHP telah usang", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Versi PHP telah usang. Kami sangat menyarankan untuk diperbarui ke versi 5.3.8 atau yang lebih baru karena versi lama diketahui rusak. Ada kemungkinan bahwa instalasi ini tidak bekerja dengan benar.", "PHP charset is not set to UTF-8" : "Charset PHP tidak disetel ke UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "Charset PHP tidak disetel ke UTF-8. Hal ini dapat menyebabkan masalah besar dengan karakter non-ASCII di nama berkas. Kami sangat merekomendasikan untuk mengubah nilai 'default_charset' php.ini ke 'UTF-8'.", "Locale not working" : "Kode pelokalan tidak berfungsi", diff --git a/settings/l10n/it.js b/settings/l10n/it.js index 91d79356a1e..9416a0ed2af 100644 --- a/settings/l10n/it.js +++ b/settings/l10n/it.js @@ -103,6 +103,8 @@ OC.L10N.register( "Security Warning" : "Avviso di sicurezza", "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "Sei connesso a %s tramite HTTP. Ti suggeriamo vivamente di configurare il tuo server per richiedere l'utilizzo del protocollo HTTPS al posto di HTTP.", "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "La cartella dei dati e i tuoi file sono probabilmente accessibili da Internet.\nIl file .htaccess non funziona. Ti consigliamo vivamente di configurare il server web in modo che la cartella dei dati non sia più accessibile o spostare la cartella fuori dalla radice del server web.", + "Read-Only config enabled" : "Configurazione di sola lettura abilitata", + "The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update." : "La configurazione di sola lettura è stata abilitata. Ciò impedisce l'impostazione di alcune configurazioni tramite l'interfaccia web. Inoltre, i file devono essere resi scrivibili manualmente per ogni aggiornamento.", "Setup Warning" : "Avviso di configurazione", "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "Sembra che PHP sia configurato per rimuovere i blocchi di documentazione in linea. Ciò renderà inaccessibili diverse applicazioni principali.", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Ciò è causato probabilmente da una cache/acceleratore come Zend OPcache o eAccelerator.", @@ -110,13 +112,12 @@ OC.L10N.register( "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite è utilizzato come database. Per installazioni grandi, consigliamo di cambiarlo. Per migrare a un altro database, utilizzare lo strumento da riga di comando: 'occ db:convert-type'", "Module 'fileinfo' missing" : "Modulo 'fileinfo' mancante", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "Il modulo PHP 'fileinfo' non è presente. Consigliamo vivamente di abilitare questo modulo per ottenere risultati migliori con il rilevamento dei tipi MIME.", - "Your PHP version is outdated" : "La tua versione di PHP è obsoleta", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "La tua versione di PHP è obsoleta. Ti consigliamo vivamente di aggiornare alla versione 5.3.8 o successiva poiché sono noti problemi con le vecchie versioni. L'installazione attuale potrebbe non funzionare correttamente.", "PHP charset is not set to UTF-8" : "Il set di caratteri di PHP non è impostato a UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "Il set di caratteri di PHP non è impostato a UTF-8. Ciò può essere causa di problemi con i caratteri non ASCII nei nomi dei file. Consigliamo vivamente di cambiare il valore di 'default_charset' nel file php.ini a 'UTF-8'.", "Locale not working" : "Locale non funzionante", "System locale can not be set to a one which supports UTF-8." : "La localizzazione di sistema non può essere impostata a una che supporta UTF-8.", "This means that there might be problems with certain characters in file names." : "Ciò significa che potrebbero esserci problemi con alcuni caratteri nei nomi dei file.", + "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Consigliamo vivamente di installare i pacchetti richiesti sul tuo sistema per supportare una delle localizzazioni seguenti: %s.", "URL generation in notification emails" : "Generazione di URL nelle email di notifica", "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 \"overwritewebroot\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Se la tua installazione non si trova nella radice del dominio e utilizza il cron di sistema, potrebbero esserci problemi con la generazione degli URL. Per evitare questi problemi, imposta l'opzione \"overwritewebroot\" nel file config.php al percorso della radice del sito della tua installazione (Suggerito: \"%s\")", "Connectivity Checks" : "Controlli di connettività", @@ -172,6 +173,7 @@ OC.L10N.register( "Documentation:" : "Documentazione:", "User Documentation" : "Documentazione utente", "Admin Documentation" : "Documentazione di amministrazione", + "This app cannot be installed because the following dependencies are not fulfilled:" : "Questa applicazione non può essere installata perché le seguenti dipendenze non sono soddisfatte:", "Update to %s" : "Aggiornato a %s", "Enable only for specific groups" : "Abilita solo per gruppi specifici", "Uninstall App" : "Disinstalla applicazione", diff --git a/settings/l10n/it.json b/settings/l10n/it.json index d34110e6162..586c153998e 100644 --- a/settings/l10n/it.json +++ b/settings/l10n/it.json @@ -101,6 +101,8 @@ "Security Warning" : "Avviso di sicurezza", "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "Sei connesso a %s tramite HTTP. Ti suggeriamo vivamente di configurare il tuo server per richiedere l'utilizzo del protocollo HTTPS al posto di HTTP.", "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "La cartella dei dati e i tuoi file sono probabilmente accessibili da Internet.\nIl file .htaccess non funziona. Ti consigliamo vivamente di configurare il server web in modo che la cartella dei dati non sia più accessibile o spostare la cartella fuori dalla radice del server web.", + "Read-Only config enabled" : "Configurazione di sola lettura abilitata", + "The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update." : "La configurazione di sola lettura è stata abilitata. Ciò impedisce l'impostazione di alcune configurazioni tramite l'interfaccia web. Inoltre, i file devono essere resi scrivibili manualmente per ogni aggiornamento.", "Setup Warning" : "Avviso di configurazione", "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "Sembra che PHP sia configurato per rimuovere i blocchi di documentazione in linea. Ciò renderà inaccessibili diverse applicazioni principali.", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Ciò è causato probabilmente da una cache/acceleratore come Zend OPcache o eAccelerator.", @@ -108,13 +110,12 @@ "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite è utilizzato come database. Per installazioni grandi, consigliamo di cambiarlo. Per migrare a un altro database, utilizzare lo strumento da riga di comando: 'occ db:convert-type'", "Module 'fileinfo' missing" : "Modulo 'fileinfo' mancante", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "Il modulo PHP 'fileinfo' non è presente. Consigliamo vivamente di abilitare questo modulo per ottenere risultati migliori con il rilevamento dei tipi MIME.", - "Your PHP version is outdated" : "La tua versione di PHP è obsoleta", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "La tua versione di PHP è obsoleta. Ti consigliamo vivamente di aggiornare alla versione 5.3.8 o successiva poiché sono noti problemi con le vecchie versioni. L'installazione attuale potrebbe non funzionare correttamente.", "PHP charset is not set to UTF-8" : "Il set di caratteri di PHP non è impostato a UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "Il set di caratteri di PHP non è impostato a UTF-8. Ciò può essere causa di problemi con i caratteri non ASCII nei nomi dei file. Consigliamo vivamente di cambiare il valore di 'default_charset' nel file php.ini a 'UTF-8'.", "Locale not working" : "Locale non funzionante", "System locale can not be set to a one which supports UTF-8." : "La localizzazione di sistema non può essere impostata a una che supporta UTF-8.", "This means that there might be problems with certain characters in file names." : "Ciò significa che potrebbero esserci problemi con alcuni caratteri nei nomi dei file.", + "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Consigliamo vivamente di installare i pacchetti richiesti sul tuo sistema per supportare una delle localizzazioni seguenti: %s.", "URL generation in notification emails" : "Generazione di URL nelle email di notifica", "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 \"overwritewebroot\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Se la tua installazione non si trova nella radice del dominio e utilizza il cron di sistema, potrebbero esserci problemi con la generazione degli URL. Per evitare questi problemi, imposta l'opzione \"overwritewebroot\" nel file config.php al percorso della radice del sito della tua installazione (Suggerito: \"%s\")", "Connectivity Checks" : "Controlli di connettività", @@ -170,6 +171,7 @@ "Documentation:" : "Documentazione:", "User Documentation" : "Documentazione utente", "Admin Documentation" : "Documentazione di amministrazione", + "This app cannot be installed because the following dependencies are not fulfilled:" : "Questa applicazione non può essere installata perché le seguenti dipendenze non sono soddisfatte:", "Update to %s" : "Aggiornato a %s", "Enable only for specific groups" : "Abilita solo per gruppi specifici", "Uninstall App" : "Disinstalla applicazione", diff --git a/settings/l10n/ja.js b/settings/l10n/ja.js index a6328f23586..2e773c29723 100644 --- a/settings/l10n/ja.js +++ b/settings/l10n/ja.js @@ -110,13 +110,12 @@ OC.L10N.register( "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite をデータベースとして利用しています。大規模な運用では、利用しないことをお勧めします。別のデータベースへ移行する場合は、コマンドラインツール: 'occ db:convert-type'を使ってください。", "Module 'fileinfo' missing" : "モジュール 'fileinfo' が見つかりません", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "PHP のモジュール 'fileinfo' が見つかりません。mimeタイプの検出を精度良く行うために、このモジュールを有効にすることを強くお勧めします。", - "Your PHP version is outdated" : "PHPバーションが古くなっています。", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "PHPバーションが古くなっています。古いバージョンには既知の問題があるため、5.3.8以降のバージョンにアップデートすることを強く推奨します。このインストール状態では正常に動作しない可能性があります。", "PHP charset is not set to UTF-8" : "PHP の文字コードは UTF-8 に設定されていません", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "PHP の文字コードは UTF-8 に設定されていません。ファイル名に非アスキー文字が含まれる場合は、大きな問題となる可能性があります。php.ini の 'default_charset' の値を 'UTF-8' に変更することを強くお勧めします。", "Locale not working" : "ロケールが動作していません", "System locale can not be set to a one which supports UTF-8." : "システムロケールを UTF-8 をサポートするロケールに設定できません。", "This means that there might be problems with certain characters in file names." : "これは、ファイル名の特定の文字に問題があることを意味しています。", + "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "次のロケールをサポートするために、システムに必要なパッケージをインストールすることを強くおすすめします: %s。", "URL generation in notification emails" : "通知メールにURLを生成", "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 \"overwritewebroot\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "もし、URLがドメインのルート(/)で終わっていない場合で、システムのcronを利用している場合、URLの生成に問題が発生します。その場合は、config.php ファイルの中の \"overwritewebroot\" オプションをインストールしたパスに設定してください。(推奨: \"%s\")", "Connectivity Checks" : "接続の確認", @@ -221,6 +220,7 @@ OC.L10N.register( "Create" : "作成", "Admin Recovery Password" : "管理者リカバリパスワード", "Enter the recovery password in order to recover the users files during password change" : "パスワード変更時のユーザーのファイルを回復するため、リカバリパスワードを入力してください", + "Search Users" : "ユーザーを検索", "Add Group" : "グループを追加", "Group" : "グループ", "Everyone" : "すべてのユーザー", diff --git a/settings/l10n/ja.json b/settings/l10n/ja.json index c628fdc6ff4..06b43ee0a51 100644 --- a/settings/l10n/ja.json +++ b/settings/l10n/ja.json @@ -108,13 +108,12 @@ "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite をデータベースとして利用しています。大規模な運用では、利用しないことをお勧めします。別のデータベースへ移行する場合は、コマンドラインツール: 'occ db:convert-type'を使ってください。", "Module 'fileinfo' missing" : "モジュール 'fileinfo' が見つかりません", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "PHP のモジュール 'fileinfo' が見つかりません。mimeタイプの検出を精度良く行うために、このモジュールを有効にすることを強くお勧めします。", - "Your PHP version is outdated" : "PHPバーションが古くなっています。", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "PHPバーションが古くなっています。古いバージョンには既知の問題があるため、5.3.8以降のバージョンにアップデートすることを強く推奨します。このインストール状態では正常に動作しない可能性があります。", "PHP charset is not set to UTF-8" : "PHP の文字コードは UTF-8 に設定されていません", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "PHP の文字コードは UTF-8 に設定されていません。ファイル名に非アスキー文字が含まれる場合は、大きな問題となる可能性があります。php.ini の 'default_charset' の値を 'UTF-8' に変更することを強くお勧めします。", "Locale not working" : "ロケールが動作していません", "System locale can not be set to a one which supports UTF-8." : "システムロケールを UTF-8 をサポートするロケールに設定できません。", "This means that there might be problems with certain characters in file names." : "これは、ファイル名の特定の文字に問題があることを意味しています。", + "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "次のロケールをサポートするために、システムに必要なパッケージをインストールすることを強くおすすめします: %s。", "URL generation in notification emails" : "通知メールにURLを生成", "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 \"overwritewebroot\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "もし、URLがドメインのルート(/)で終わっていない場合で、システムのcronを利用している場合、URLの生成に問題が発生します。その場合は、config.php ファイルの中の \"overwritewebroot\" オプションをインストールしたパスに設定してください。(推奨: \"%s\")", "Connectivity Checks" : "接続の確認", @@ -219,6 +218,7 @@ "Create" : "作成", "Admin Recovery Password" : "管理者リカバリパスワード", "Enter the recovery password in order to recover the users files during password change" : "パスワード変更時のユーザーのファイルを回復するため、リカバリパスワードを入力してください", + "Search Users" : "ユーザーを検索", "Add Group" : "グループを追加", "Group" : "グループ", "Everyone" : "すべてのユーザー", diff --git a/settings/l10n/ko.js b/settings/l10n/ko.js index 6d828ee47ec..e55c4c75dab 100644 --- a/settings/l10n/ko.js +++ b/settings/l10n/ko.js @@ -84,8 +84,6 @@ OC.L10N.register( "Database Performance Info" : "데이터베이스 성능 정보", "Module 'fileinfo' missing" : "모듈 'fileinfo'가 없음", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "PHP 모듈 'fileinfo'가 존재하지 않습니다. MIME 형식 감지 결과를 향상시키기 위하여 이 모듈을 활성화하는 것을 추천합니다.", - "Your PHP version is outdated" : "PHP 버전이 오래됨", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "PHP 버전이 오래되었습니다. 오래된 버전은 작동하지 않을 수도 있기 때문에 PHP 5.3.8 이상을 사용하는 것을 추천합니다.", "Locale not working" : "로캘이 작동하지 않음", "System locale can not be set to a one which supports UTF-8." : "UTF-8을 지원하는 시스템 로캘을 사용할 수 없습니다.", "This means that there might be problems with certain characters in file names." : "파일 이름의 일부 문자에 문제가 생길 수도 있습니다.", diff --git a/settings/l10n/ko.json b/settings/l10n/ko.json index 121627253e2..2415c30316d 100644 --- a/settings/l10n/ko.json +++ b/settings/l10n/ko.json @@ -82,8 +82,6 @@ "Database Performance Info" : "데이터베이스 성능 정보", "Module 'fileinfo' missing" : "모듈 'fileinfo'가 없음", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "PHP 모듈 'fileinfo'가 존재하지 않습니다. MIME 형식 감지 결과를 향상시키기 위하여 이 모듈을 활성화하는 것을 추천합니다.", - "Your PHP version is outdated" : "PHP 버전이 오래됨", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "PHP 버전이 오래되었습니다. 오래된 버전은 작동하지 않을 수도 있기 때문에 PHP 5.3.8 이상을 사용하는 것을 추천합니다.", "Locale not working" : "로캘이 작동하지 않음", "System locale can not be set to a one which supports UTF-8." : "UTF-8을 지원하는 시스템 로캘을 사용할 수 없습니다.", "This means that there might be problems with certain characters in file names." : "파일 이름의 일부 문자에 문제가 생길 수도 있습니다.", diff --git a/settings/l10n/mk.js b/settings/l10n/mk.js index 57245605ae0..2f857a61b33 100644 --- a/settings/l10n/mk.js +++ b/settings/l10n/mk.js @@ -75,7 +75,6 @@ OC.L10N.register( "Security Warning" : "Безбедносно предупредување", "Setup Warning" : "Предупредување при подесување", "Database Performance Info" : "Информација за перформансите на базата на податоци", - "Your PHP version is outdated" : "Вашаа верзија на PHP е застарена", "Locale not working" : "Локалето не функционира", "Execute one task with each page loaded" : "Изврши по една задача со секоја вчитана страница", "Allow apps to use the Share API" : "Дозволете апликациите да го користат API-то за споделување", diff --git a/settings/l10n/mk.json b/settings/l10n/mk.json index 4445c65d6ec..44cfb40a7b4 100644 --- a/settings/l10n/mk.json +++ b/settings/l10n/mk.json @@ -73,7 +73,6 @@ "Security Warning" : "Безбедносно предупредување", "Setup Warning" : "Предупредување при подесување", "Database Performance Info" : "Информација за перформансите на базата на податоци", - "Your PHP version is outdated" : "Вашаа верзија на PHP е застарена", "Locale not working" : "Локалето не функционира", "Execute one task with each page loaded" : "Изврши по една задача со секоја вчитана страница", "Allow apps to use the Share API" : "Дозволете апликациите да го користат API-то за споделување", diff --git a/settings/l10n/nb_NO.js b/settings/l10n/nb_NO.js index 1f27d37d7f9..cf73debd87d 100644 --- a/settings/l10n/nb_NO.js +++ b/settings/l10n/nb_NO.js @@ -104,8 +104,6 @@ OC.L10N.register( "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite brukes som database. For større installasjoner anbefaler vi å endre dette. For å migrere til en annen database, bruk kommandolinjeverktøyet: 'occ db:convert-type'", "Module 'fileinfo' missing" : "Modulen 'fileinfo' mangler", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "PHP modulen 'fileinfo' mangler. Vi anbefaler at du aktiverer denne modulen for å kunne detektere mime-typen korrekt.", - "Your PHP version is outdated" : "Din PHP-versjon er udatert", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "PHP-versjonen din er utdatert. Vi anbefaler på det sterkeste at du oppdaterer til 5.3.8 eller nyere fordi eldre versjoner ikke vil virke. Det er mulig at denne installasjoner ikke fungerer korrekt.", "PHP charset is not set to UTF-8" : "PHP-tegnsett er ikke satt til UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "PHP-tegnsett er ikke satt til UTF-8. Dette kan forårsake store problemer med tegn som ikke er ASCII i filnavn. Vi anbefaler på det sterkeste å endre verdien av 'default_charset' i php.ini til 'UTF-8'.", "Locale not working" : "Nasjonale innstillinger virker ikke", diff --git a/settings/l10n/nb_NO.json b/settings/l10n/nb_NO.json index bd43183da4a..0c4614c1cfa 100644 --- a/settings/l10n/nb_NO.json +++ b/settings/l10n/nb_NO.json @@ -102,8 +102,6 @@ "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite brukes som database. For større installasjoner anbefaler vi å endre dette. For å migrere til en annen database, bruk kommandolinjeverktøyet: 'occ db:convert-type'", "Module 'fileinfo' missing" : "Modulen 'fileinfo' mangler", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "PHP modulen 'fileinfo' mangler. Vi anbefaler at du aktiverer denne modulen for å kunne detektere mime-typen korrekt.", - "Your PHP version is outdated" : "Din PHP-versjon er udatert", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "PHP-versjonen din er utdatert. Vi anbefaler på det sterkeste at du oppdaterer til 5.3.8 eller nyere fordi eldre versjoner ikke vil virke. Det er mulig at denne installasjoner ikke fungerer korrekt.", "PHP charset is not set to UTF-8" : "PHP-tegnsett er ikke satt til UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "PHP-tegnsett er ikke satt til UTF-8. Dette kan forårsake store problemer med tegn som ikke er ASCII i filnavn. Vi anbefaler på det sterkeste å endre verdien av 'default_charset' i php.ini til 'UTF-8'.", "Locale not working" : "Nasjonale innstillinger virker ikke", diff --git a/settings/l10n/nl.js b/settings/l10n/nl.js index 21bd2f1ec7a..81b224a60e4 100644 --- a/settings/l10n/nl.js +++ b/settings/l10n/nl.js @@ -103,6 +103,8 @@ OC.L10N.register( "Security Warning" : "Beveiligingswaarschuwing", "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "U bent met %s verbonden over HTTP. We adviseren met klem uw server zo te configureren dat alleen HTTPS kan worden gebruikt.", "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "Uw data folder en uw bestanden zijn waarschijnlijk vanaf het internet bereikbaar. Het .htaccess-bestand werkt niet. We raden ten zeerste aan aan om uw webserver zodanig te configureren, dat de datamap niet bereikbaar is vanaf het internet of om uw datamap te verplaatsen naar een locatie buiten de document root van de webserver.", + "Read-Only config enabled" : "Alleen-lezen config geactiveerd", + "The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update." : "De Alleen-lezen config is geactiveerd. Dit voorkomt het via de webinterface wijzigen van verschillende instellingen. Bovendien moet het bestand voor elke aanpassing handmatig op beschrijfbaar worden ingesteld.", "Setup Warning" : "Instellingswaarschuwing", "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP is blijkbaar zo ingesteld dat inline doc blokken worden gestript. Hierdoor worden verschillende kernmodules onbruikbaar.", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Dit wordt vermoedelijk veroorzaakt door een cache/accelerator, zoals Zend OPcache of eAccelerator.", @@ -110,13 +112,12 @@ OC.L10N.register( "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite wordt gebruikt als database. Voor grotere installaties adviseren we dit aan te passen. Om te migreren naar een andere database moet u deze commandoregel tool gebruiken: 'occ db:convert-type'", "Module 'fileinfo' missing" : "Module 'fileinfo' ontbreekt", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "De PHP module 'fileinfo' ontbreekt. We adviseren met klem om deze module te activeren om de beste resultaten te bereiken voor mime-type detectie.", - "Your PHP version is outdated" : "Uw PHP versie is verouderd", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Uw PHP versie is verouderd. We adviseren met klem om bij te werken naar versie 5.3.8 of later, omdat oudere versies corrupt kunnen zijn. Het is mogelijk dat deze installatie niet goed werkt.", "PHP charset is not set to UTF-8" : "PHP characterset is niet ingesteld op UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "PHP characterset is niet ingesteld op UTF-8. Dit kan flinke problemen opleveren met niet-ASCII tekens in bestandsnamen. We adviseren om de waarde van 'default_charset' in php.ini te wijzigen in 'UTF-8'.", "Locale not working" : "Taalbestand werkt niet", "System locale can not be set to a one which supports UTF-8." : "De systeemtaal kan niet worden ingesteld op een taal die UTF-8 ondersteunt.", "This means that there might be problems with certain characters in file names." : "Dat betekent dat er problemen kunnen optreden met bepaalde tekens in bestandsnamen.", + "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "We adviseren met klem om de noodzakelijke pakketten op uw systeem te installeren om een van de volgende talen te ondersteunen: %s.", "URL generation in notification emails" : "URL genereren in notificatie e-mails", "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 \"overwritewebroot\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Als uw installatie niet in de hoofddirectory van het domein staat, maar wel cron gebruikt, dan kunnen er problemen ontstaan bij het genereren van URL's. Om deze problemen te voorkomen zou u de \"overwritewebroot\" optie in config.php moeten instellen op het webroot pad van uw ownCloud (aanbevolen: \"%s\") ", "Connectivity Checks" : "Verbindingscontroles", @@ -172,6 +173,7 @@ OC.L10N.register( "Documentation:" : "Documentatie:", "User Documentation" : "Gebruikersdocumentatie", "Admin Documentation" : "Beheerdocumentatie", + "This app cannot be installed because the following dependencies are not fulfilled:" : "Deze app kan niet worden geïnstalleerd omdat de volgende afhankelijkheden niet zijn ingevuld:", "Update to %s" : "Bijgewerkt naar %s", "Enable only for specific groups" : "Alleen voor bepaalde groepen activeren", "Uninstall App" : "De-installeren app", diff --git a/settings/l10n/nl.json b/settings/l10n/nl.json index 75870735391..83f1d869c1c 100644 --- a/settings/l10n/nl.json +++ b/settings/l10n/nl.json @@ -101,6 +101,8 @@ "Security Warning" : "Beveiligingswaarschuwing", "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "U bent met %s verbonden over HTTP. We adviseren met klem uw server zo te configureren dat alleen HTTPS kan worden gebruikt.", "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "Uw data folder en uw bestanden zijn waarschijnlijk vanaf het internet bereikbaar. Het .htaccess-bestand werkt niet. We raden ten zeerste aan aan om uw webserver zodanig te configureren, dat de datamap niet bereikbaar is vanaf het internet of om uw datamap te verplaatsen naar een locatie buiten de document root van de webserver.", + "Read-Only config enabled" : "Alleen-lezen config geactiveerd", + "The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update." : "De Alleen-lezen config is geactiveerd. Dit voorkomt het via de webinterface wijzigen van verschillende instellingen. Bovendien moet het bestand voor elke aanpassing handmatig op beschrijfbaar worden ingesteld.", "Setup Warning" : "Instellingswaarschuwing", "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP is blijkbaar zo ingesteld dat inline doc blokken worden gestript. Hierdoor worden verschillende kernmodules onbruikbaar.", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Dit wordt vermoedelijk veroorzaakt door een cache/accelerator, zoals Zend OPcache of eAccelerator.", @@ -108,13 +110,12 @@ "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite wordt gebruikt als database. Voor grotere installaties adviseren we dit aan te passen. Om te migreren naar een andere database moet u deze commandoregel tool gebruiken: 'occ db:convert-type'", "Module 'fileinfo' missing" : "Module 'fileinfo' ontbreekt", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "De PHP module 'fileinfo' ontbreekt. We adviseren met klem om deze module te activeren om de beste resultaten te bereiken voor mime-type detectie.", - "Your PHP version is outdated" : "Uw PHP versie is verouderd", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Uw PHP versie is verouderd. We adviseren met klem om bij te werken naar versie 5.3.8 of later, omdat oudere versies corrupt kunnen zijn. Het is mogelijk dat deze installatie niet goed werkt.", "PHP charset is not set to UTF-8" : "PHP characterset is niet ingesteld op UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "PHP characterset is niet ingesteld op UTF-8. Dit kan flinke problemen opleveren met niet-ASCII tekens in bestandsnamen. We adviseren om de waarde van 'default_charset' in php.ini te wijzigen in 'UTF-8'.", "Locale not working" : "Taalbestand werkt niet", "System locale can not be set to a one which supports UTF-8." : "De systeemtaal kan niet worden ingesteld op een taal die UTF-8 ondersteunt.", "This means that there might be problems with certain characters in file names." : "Dat betekent dat er problemen kunnen optreden met bepaalde tekens in bestandsnamen.", + "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "We adviseren met klem om de noodzakelijke pakketten op uw systeem te installeren om een van de volgende talen te ondersteunen: %s.", "URL generation in notification emails" : "URL genereren in notificatie e-mails", "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 \"overwritewebroot\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Als uw installatie niet in de hoofddirectory van het domein staat, maar wel cron gebruikt, dan kunnen er problemen ontstaan bij het genereren van URL's. Om deze problemen te voorkomen zou u de \"overwritewebroot\" optie in config.php moeten instellen op het webroot pad van uw ownCloud (aanbevolen: \"%s\") ", "Connectivity Checks" : "Verbindingscontroles", @@ -170,6 +171,7 @@ "Documentation:" : "Documentatie:", "User Documentation" : "Gebruikersdocumentatie", "Admin Documentation" : "Beheerdocumentatie", + "This app cannot be installed because the following dependencies are not fulfilled:" : "Deze app kan niet worden geïnstalleerd omdat de volgende afhankelijkheden niet zijn ingevuld:", "Update to %s" : "Bijgewerkt naar %s", "Enable only for specific groups" : "Alleen voor bepaalde groepen activeren", "Uninstall App" : "De-installeren app", diff --git a/settings/l10n/pl.js b/settings/l10n/pl.js index 4206c0eb587..b1f268c1373 100644 --- a/settings/l10n/pl.js +++ b/settings/l10n/pl.js @@ -109,8 +109,6 @@ OC.L10N.register( "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "Jako baza danych został użyty SQLite. Dla większych instalacji doradzamy zmianę na inną. Aby zmigrować do innej bazy danych, użyj narzędzia linii poleceń: 'occ db:convert-type'", "Module 'fileinfo' missing" : "Brak modułu „fileinfo”", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "Brak modułu PHP „fileinfo”. Zalecamy włączenie tego modułu, aby uzyskać najlepsze wyniki podczas wykrywania typów MIME.", - "Your PHP version is outdated" : "Twoja wersja PHP jest za stara", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Twoja wersja PHP jest za stara. Rekomendujemy przynajmniej wersje 5.3.8. Jeśli masz starsza wersję ownCloud może nie działać poprawnie.", "PHP charset is not set to UTF-8" : "Kodowanie PHP nie jest ustawione na UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "Zestaw znaków PHP nie jest ustawiony na UTF-8. Może to spowodować poważne problemy ze znakami non-ASCII w nazwach plików. Gorąco doradzamy zmianę wartości 'default_charset' w php.ini na 'UTF-8'.", "Locale not working" : "Lokalizacja nie działa", diff --git a/settings/l10n/pl.json b/settings/l10n/pl.json index e4761e4ba47..3e2c17d3140 100644 --- a/settings/l10n/pl.json +++ b/settings/l10n/pl.json @@ -107,8 +107,6 @@ "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "Jako baza danych został użyty SQLite. Dla większych instalacji doradzamy zmianę na inną. Aby zmigrować do innej bazy danych, użyj narzędzia linii poleceń: 'occ db:convert-type'", "Module 'fileinfo' missing" : "Brak modułu „fileinfo”", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "Brak modułu PHP „fileinfo”. Zalecamy włączenie tego modułu, aby uzyskać najlepsze wyniki podczas wykrywania typów MIME.", - "Your PHP version is outdated" : "Twoja wersja PHP jest za stara", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Twoja wersja PHP jest za stara. Rekomendujemy przynajmniej wersje 5.3.8. Jeśli masz starsza wersję ownCloud może nie działać poprawnie.", "PHP charset is not set to UTF-8" : "Kodowanie PHP nie jest ustawione na UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "Zestaw znaków PHP nie jest ustawiony na UTF-8. Może to spowodować poważne problemy ze znakami non-ASCII w nazwach plików. Gorąco doradzamy zmianę wartości 'default_charset' w php.ini na 'UTF-8'.", "Locale not working" : "Lokalizacja nie działa", diff --git a/settings/l10n/pt_BR.js b/settings/l10n/pt_BR.js index 81be17f00cb..e84af745c16 100644 --- a/settings/l10n/pt_BR.js +++ b/settings/l10n/pt_BR.js @@ -103,6 +103,8 @@ OC.L10N.register( "Security Warning" : "Aviso de Segurança", "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "Você está acessando %s via HTTP. Sugerimos você configurar o servidor para exigir o uso de HTTPS em seu lugar.", "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "Seu diretório de dados e seus arquivos são, provavelmente, acessíveis a partir da internet. O arquivo htaccess. não está funcionando. Nós sugerimos fortemente que você configure o seu servidor web de uma forma que o diretório de dados não esteja mais acessível ou mova o diretório de dados para fora do raiz do servidor.", + "Read-Only config enabled" : "Somente-Leitura configuração ativada", + "The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update." : "A configuração Somente-Leitura foi habilitada. Isso impede que algumas configurações sejam definidas via a interface web. Além disso, o arquivo precisa ter permissão de escrita manual para cada atualização.", "Setup Warning" : "Aviso de Configuração", "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP é, aparentemente, a configuração para retirar blocos doc inline. Isso fará com que vários aplicativos do núcleo fiquem inacessíveis.", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Isso provavelmente é causado por uma cache/acelerador, como Zend OPcache ou eAccelerator.", @@ -110,13 +112,12 @@ OC.L10N.register( "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite é usada como base de dados. Para grandes instalações recomendamos mudar isso. Para migrar para outro banco de dados usar a ferramenta de linha de comando: 'occ db: converter-type'", "Module 'fileinfo' missing" : "Módulo 'fileinfo' faltando", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "O módulo PHP 'fileinfo' está faltando. Recomendamos que ative este módulo para obter uma melhor detecção do tipo de mídia (mime-type).", - "Your PHP version is outdated" : "Sua versão de PHP está desatualizada", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "A sua versão do PHP está desatualizada. Recomendamos a atualização para 5.3.8 ou mais recente, pois as versões mais antigas são conhecidas por serem quebradas. É possível que esta instalação não esteja funcionando corretamente.", "PHP charset is not set to UTF-8" : "A configuração de caracteres no PHP não está definida para UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "A configuração de caracteres para o PHP não está definida para UTF-8. Isto pode causar problemas com caracteres não-ASCII em nomes de arquivos. Nós fortemente recomendamos a troca da definição de caracteres de 'default_charset' no arquivo de configuração php.ini para 'UTF-8'.", "Locale not working" : "Localização não funcionando", "System locale can not be set to a one which supports UTF-8." : "Localidade do sistema não pode ser definido como um que suporta UTF-8.", "This means that there might be problems with certain characters in file names." : "Isso significa que pode haver problemas com certos caracteres nos nomes de arquivo.", + "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Nós sugerimos a instalação dos pacotes necessários em seu sistema para suportar um dos seguintes locais: %s.", "URL generation in notification emails" : "Geração de URL em e-mails de notificação", "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 \"overwritewebroot\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Se a sua instalação não estiver instalada na raiz do domínio e usa cron do sistema, pode haver problemas com a geração de URL. Para evitar esses problemas, por favor, defina a opção \"overwritewebroot\" em seu arquivo config.php para o caminho webroot de sua instalação (Sugestão: \"%s\")", "Connectivity Checks" : "Verificações de Conectividade", @@ -172,6 +173,7 @@ OC.L10N.register( "Documentation:" : "Documentação:", "User Documentation" : "Documentação de Usuário", "Admin Documentation" : "Documentação de Administrador", + "This app cannot be installed because the following dependencies are not fulfilled:" : "Este aplicativo não pode ser instalado porque as seguintes dependências não forão cumpridas:", "Update to %s" : "Atualizado para %s", "Enable only for specific groups" : "Ativar apenas para grupos específicos", "Uninstall App" : "Desinstalar Aplicativo", diff --git a/settings/l10n/pt_BR.json b/settings/l10n/pt_BR.json index 440cb24b158..c45d88f2432 100644 --- a/settings/l10n/pt_BR.json +++ b/settings/l10n/pt_BR.json @@ -101,6 +101,8 @@ "Security Warning" : "Aviso de Segurança", "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "Você está acessando %s via HTTP. Sugerimos você configurar o servidor para exigir o uso de HTTPS em seu lugar.", "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "Seu diretório de dados e seus arquivos são, provavelmente, acessíveis a partir da internet. O arquivo htaccess. não está funcionando. Nós sugerimos fortemente que você configure o seu servidor web de uma forma que o diretório de dados não esteja mais acessível ou mova o diretório de dados para fora do raiz do servidor.", + "Read-Only config enabled" : "Somente-Leitura configuração ativada", + "The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update." : "A configuração Somente-Leitura foi habilitada. Isso impede que algumas configurações sejam definidas via a interface web. Além disso, o arquivo precisa ter permissão de escrita manual para cada atualização.", "Setup Warning" : "Aviso de Configuração", "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP é, aparentemente, a configuração para retirar blocos doc inline. Isso fará com que vários aplicativos do núcleo fiquem inacessíveis.", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Isso provavelmente é causado por uma cache/acelerador, como Zend OPcache ou eAccelerator.", @@ -108,13 +110,12 @@ "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite é usada como base de dados. Para grandes instalações recomendamos mudar isso. Para migrar para outro banco de dados usar a ferramenta de linha de comando: 'occ db: converter-type'", "Module 'fileinfo' missing" : "Módulo 'fileinfo' faltando", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "O módulo PHP 'fileinfo' está faltando. Recomendamos que ative este módulo para obter uma melhor detecção do tipo de mídia (mime-type).", - "Your PHP version is outdated" : "Sua versão de PHP está desatualizada", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "A sua versão do PHP está desatualizada. Recomendamos a atualização para 5.3.8 ou mais recente, pois as versões mais antigas são conhecidas por serem quebradas. É possível que esta instalação não esteja funcionando corretamente.", "PHP charset is not set to UTF-8" : "A configuração de caracteres no PHP não está definida para UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "A configuração de caracteres para o PHP não está definida para UTF-8. Isto pode causar problemas com caracteres não-ASCII em nomes de arquivos. Nós fortemente recomendamos a troca da definição de caracteres de 'default_charset' no arquivo de configuração php.ini para 'UTF-8'.", "Locale not working" : "Localização não funcionando", "System locale can not be set to a one which supports UTF-8." : "Localidade do sistema não pode ser definido como um que suporta UTF-8.", "This means that there might be problems with certain characters in file names." : "Isso significa que pode haver problemas com certos caracteres nos nomes de arquivo.", + "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Nós sugerimos a instalação dos pacotes necessários em seu sistema para suportar um dos seguintes locais: %s.", "URL generation in notification emails" : "Geração de URL em e-mails de notificação", "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 \"overwritewebroot\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Se a sua instalação não estiver instalada na raiz do domínio e usa cron do sistema, pode haver problemas com a geração de URL. Para evitar esses problemas, por favor, defina a opção \"overwritewebroot\" em seu arquivo config.php para o caminho webroot de sua instalação (Sugestão: \"%s\")", "Connectivity Checks" : "Verificações de Conectividade", @@ -170,6 +171,7 @@ "Documentation:" : "Documentação:", "User Documentation" : "Documentação de Usuário", "Admin Documentation" : "Documentação de Administrador", + "This app cannot be installed because the following dependencies are not fulfilled:" : "Este aplicativo não pode ser instalado porque as seguintes dependências não forão cumpridas:", "Update to %s" : "Atualizado para %s", "Enable only for specific groups" : "Ativar apenas para grupos específicos", "Uninstall App" : "Desinstalar Aplicativo", diff --git a/settings/l10n/pt_PT.js b/settings/l10n/pt_PT.js index cf82312e466..93fad6a87be 100644 --- a/settings/l10n/pt_PT.js +++ b/settings/l10n/pt_PT.js @@ -15,79 +15,79 @@ OC.L10N.register( "Files decrypted successfully" : "Ficheiros desencriptados com sucesso", "Couldn't decrypt your files, please check your owncloud.log or ask your administrator" : "Não foi possível descodificar os seus ficheiros. Por favor, verifique a sua owncloud.log ou pergunte ao seu administrador", "Couldn't decrypt your files, check your password and try again" : "Não foi possível descodificar os seus ficheiros. Por favor, verifique a sua palavra-passe e tente novamente", - "Encryption keys deleted permanently" : "A chave de encriptação foi eliminada permanentemente", - "Couldn't permanently delete your encryption keys, please check your owncloud.log or ask your administrator" : "Não foi possível excluir permanentemente a sua chave de encriptação. Verifique a sua owncloud.log ou pergunte ao seu administrador", + "Encryption keys deleted permanently" : "As chaves de encriptação foram eliminadas para sempre", + "Couldn't permanently delete your encryption keys, please check your owncloud.log or ask your administrator" : "Não foi possível apagar as suas chaves de encriptação. Por favor, verifique a sua owncloud.log ou pergunte ao seu administrador", "Couldn't remove app." : "Não foi possível remover a aplicação.", "Email saved" : "E-mail guardado", "Invalid email" : "e-mail inválido", "Unable to delete group" : "Não é possível apagar o grupo", "Unable to delete user" : "Não é possível apagar o utilizador", - "Backups restored successfully" : "Cópias de segurança foram restauradas com sucesso", - "Couldn't restore your encryption keys, please check your owncloud.log or ask your administrator" : "Nao foi possivel restaurar as suas chaves de encriptacao. Verifique a sua owncloud.log ou pergunte ao seu administrador", + "Backups restored successfully" : "Cópias de segurança restauradas com sucesso", + "Couldn't restore your encryption keys, please check your owncloud.log or ask your administrator" : "Não foi possivel restaurar as suas chaves de encriptacao. Por favor, verifique a sua owncloud.log ou pergunte ao seu administrador", "Language changed" : "Idioma alterado", "Invalid request" : "Pedido Inválido", "Admins can't remove themself from the admin group" : "Os administradores não se podem remover a eles próprios do grupo 'admin'.", - "Unable to add user to group %s" : "Impossível acrescentar utilizador ao grupo %s", - "Unable to remove user from group %s" : "Impossível apagar utilizador do grupo %s", - "Couldn't update app." : "Não foi possível actualizar a aplicação.", + "Unable to add user to group %s" : "Não é possível adicionar o utilizador ao grupo %s", + "Unable to remove user from group %s" : "Não é possível remover o utilizador do grupo %s", + "Couldn't update app." : "Não foi possível atualizar a app.", "Wrong password" : "Palavra-passe errada", - "No user supplied" : "Nenhum utilizador especificado.", + "No user supplied" : "Nenhum utilizador especificado", "Please provide an admin recovery password, otherwise all user data will be lost" : "Por favor, forneça uma palavra-passe de recuperação de administrador, caso contrário seráo perdidos todos os dados", "Wrong admin recovery password. Please check the password and try again." : "Palavra-passe de recuperação de administrador errada. Por favor, verifique a palavra-passe e tente novamente.", "Back-end doesn't support password change, but the users encryption key was successfully updated." : "Não foi possível alterar a sua palavra-passe, mas a chave de codificação foi atualizada com sucesso.", "Unable to change password" : "Não foi possível alterar a sua palavra-passe ", "Enabled" : "Ativada", - "Not enabled" : "Desactivado", + "Not enabled" : "Desativada", "Recommended" : "Recomendado", "Saved" : "Guardado", "test email settings" : "testar as definições de e-mail", - "If you received this email, the settings seem to be correct." : "Se você recebeu este e-mail as configurações parecem estar correctas", - "A problem occurred while sending the email. Please revise your settings." : "Um problema ocorreu ao enviar o email. Por favor verifique as suas definições.", - "Email sent" : "E-mail enviado", + "If you received this email, the settings seem to be correct." : "Se recebeu este e-mail, as configurações parecem estar corretas", + "A problem occurred while sending the email. Please revise your settings." : "Ocorreu um problema durante o envio do e-mail. Por favor, verifique as suas configurações..", + "Email sent" : "Mensagem enviada", "You need to set your user email before being able to send test emails." : "Você precisa de configurar o seu e-mail de usuário antes de ser capaz de enviar e-mails de teste", "Are you really sure you want add \"{domain}\" as trusted domain?" : "Você tem certeza que quer adicionar \"{domain}\" como domínio confiável?", "Add trusted domain" : "Adicionar domínio confiável ", - "Sending..." : "A enviar ...", + "Sending..." : "A enviar...", "All" : "Todos", - "Please wait...." : "Por favor aguarde...", - "Error while disabling app" : "Ocorreu um erro enquanto desativava a aplicação", + "Please wait...." : "Por favor, aguarde...", + "Error while disabling app" : "Ocorreu um erro enquanto desativava a app", "Disable" : "Desativar", "Enable" : "Ativar", - "Error while enabling app" : "Ocorreu um erro enquanto ativava a aplicação", - "Updating...." : "A Actualizar...", - "Error while updating app" : "Ocorreu um erro enquanto atualizava a aplicação", - "Updated" : "Actualizado", - "Uninstalling ...." : "A desinstalar ....", - "Error while uninstalling app" : "Erro durante a desinstalação da aplicação", + "Error while enabling app" : "Ocorreu um erro enquanto ativava a app", + "Updating...." : "A atualizar...", + "Error while updating app" : "Ocorreu um erro enquanto atualizava a app", + "Updated" : "Atualizada", + "Uninstalling ...." : "A desinstalar....", + "Error while uninstalling app" : "Ocorreu um erro durante a desinstalação da app", "Uninstall" : "Desinstalar", - "Select a profile picture" : "Seleccione uma fotografia de perfil", + "Select a profile picture" : "Selecione uma fotografia de perfil", "Very weak password" : "Palavra-passe muito fraca", "Weak password" : "Palavra-passe fraca", "So-so password" : "Palavra-passe aceitável", "Good password" : "Palavra-passe boa", "Strong password" : "Palavra-passe forte", - "Valid until {date}" : "Válido até {date}", + "Valid until {date}" : "Válida até {date}", "Delete" : "Apagar", - "Decrypting files... Please wait, this can take some time." : "A desencriptar os ficheiros... Por favor aguarde, esta operação pode demorar algum tempo.", - "Delete encryption keys permanently." : "Excluir as chaves encriptadas de forma permanente.", - "Restore encryption keys." : "Restaurar chaves encriptadas.", + "Decrypting files... Please wait, this can take some time." : "A descodificar os ficheiros... Por favor, aguarde, esta operação pode demorar algum tempo.", + "Delete encryption keys permanently." : "Apagar as chaves encriptadas para sempre.", + "Restore encryption keys." : "Restaurar as chaves encriptadas.", "Groups" : "Grupos", - "Unable to delete {objName}" : "Impossível apagar {objNome}", - "Error creating group" : "Erro ao criar grupo", - "A valid group name must be provided" : "Um nome válido do grupo tem de ser fornecido", + "Unable to delete {objName}" : "Não é possível apagar {objNome}", + "Error creating group" : "Ocorreu um erro ao criar o grupo", + "A valid group name must be provided" : "Deve ser indicado um nome de grupo válido", "deleted {groupName}" : "{groupName} apagado", "undo" : "Anular", "no group" : "sem grupo", "never" : "nunca", "deleted {userName}" : "{userName} apagado", "add group" : "Adicionar grupo", - "A valid username must be provided" : "Um nome de utilizador válido deve ser fornecido", - "Error creating user" : "Erro a criar utilizador", - "A valid password must be provided" : "Deve ser fornecida uma palavra-passe válida", - "Warning: Home directory for user \"{user}\" already exists" : "Atenção: a pasta pessoal do utilizador \"{user}\" já existe", + "A valid username must be provided" : "Deve ser indicado um nome de utilizador válido", + "Error creating user" : "Ocorreu um erro ao criar o utilizador", + "A valid password must be provided" : "Deve ser indicada uma palavra-passe válida", + "Warning: Home directory for user \"{user}\" already exists" : "Atenção: A pasta pessoal do utilizador \"{user}\" já existe", "__language_name__" : "__language_name__", "Personal Info" : "Informação Pessoal", - "SSL root certificates" : "Certificados SSL de raiz", + "SSL root certificates" : "Certificados de raiz SSL", "Encryption" : "Encriptação", "Everything (fatal issues, errors, warnings, info, debug)" : "Tudo (problemas fatais, erros, avisos, informação, depuração)", "Info, warnings, errors and fatal issues" : "Informação, avisos, erros e problemas fatais", @@ -101,22 +101,23 @@ OC.L10N.register( "SSL" : "SSL", "TLS" : "TLS", "Security Warning" : "Aviso de Segurança", - "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "Está a aceder %s via HTTP. Recomendamos vivamente que configure o servidor para forçar o uso de HTTPS.", - "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "A sua pasta com os dados e os seus ficheiros estão provavelmente acessíveis a partir das internet. O seu ficheiro .htaccess não está a funcionar corretamente. Sugerimos veementemente que configure o seu servidor web de maneira a que a pasta com os dados deixe de ficar acessível, ou mova a pasta com os dados para fora da raiz de documentos do servidor web.", - "Setup Warning" : "Aviso de setup", + "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "Está a aceder a %s via HTTP. Nós recomendamos vivamente que configure o seu servidor para requerer a utilização de HTTPS.", + "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "A sua pasta dos dados e os seus ficheiros estão provavelmente acessíveis a partir da Internet. O ficheiro .htaccess não está a funcionar corretamente. Nós sugerimos fortemente que configure o seu servidor da Web de maneira a que a pasta dos dados deixe de ficar acessível, ou mova-a para fora da diretoria raiz dos documentos do servidor da Web.", + "Read-Only config enabled" : "Configuração Só-de-Leitura ativada", + "The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update." : "A configuração Só-de-Leitura foi ativada. Isto evita definir algumas configurações através da interface da Web. Além disso, o ficheiro precisa de ser definido gravável manualmente para cada atualização.", + "Setup Warning" : "Aviso de Configuração", "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP está aparentemente configurado a remover blocos doc em linha. Isto vai fazer algumas aplicações basicas inacessíveis.", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Isto é provavelmente causado por uma cache/acelerador como o Zend OPcache or eAcelerador.", - "Database Performance Info" : "Informação sobre desempenho da Base de Dados", + "Database Performance Info" : "Informação do Desempenho da Base de Dados", "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite é usado como base de dados. Para grandes instalações nós recomendamos a alterar isso. Para mudar para outra base de dados use o comando de linha: 'occ db:convert-type'", - "Module 'fileinfo' missing" : "Falta o módulo 'fileinfo'", + "Module 'fileinfo' missing" : "Módulo 'fileinfo' em falta", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "O Módulo PHP 'fileinfo' não se encontra instalado/activado. É fortemente recomendado que active este módulo para obter os melhores resultado com a detecção dos tipos de mime.", - "Your PHP version is outdated" : "A sua versão do PHP está ultrapassada", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "A sua versão do PHP está ultrapassada. Recomendamos que actualize para a versão 5.3.8 ou mais recente, devido às versões anteriores conterem problemas. É também possível que esta instalação não esteja a funcionar correctamente.", - "PHP charset is not set to UTF-8" : "PHP charset não está definido para UTF-8", + "PHP charset is not set to UTF-8" : "O conjunto de carateres PHP não está definido para UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "PHP charset não está definido como UTF-8. Isso pode causar grandes problemas com caracteres não-ASCII em nomes de arquivo. Recomendamos para alterar o valor de php.ini 'default_charset' para 'UTF-8'.", - "Locale not working" : "Internacionalização não está a funcionar", - "System locale can not be set to a one which supports UTF-8." : "Não é possível pôr as definições de sistema compatíveis com UTF-8.", + "Locale not working" : "A internacionalização não está a funcionar", + "System locale can not be set to a one which supports UTF-8." : "Não é possível definir a internacionalização do sistema para um que suporte o UTF-8.", "This means that there might be problems with certain characters in file names." : "Isto significa que podem haver problemas com alguns caracteres nos nomes dos ficheiros.", + "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Nós recomendamos fortemente que instale no seu sistema os pacotes necessários para suportar uma das seguintes locallidades: %s.", "URL generation in notification emails" : "Geração URL em e-mails de notificação", "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 \"overwritewebroot\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Se a sua instalação não está instalada na raiz do domínio e usa o sistema cron, pode haver problemas com a geração de URL. Para evitar esses problemas, por favor, defina a opção \"overwritewebroot\" no ficheiro config.php para o caminho webroot da sua instalação (sugestão: \"%s\")", "Connectivity Checks" : "Verificações de Conetividade", diff --git a/settings/l10n/pt_PT.json b/settings/l10n/pt_PT.json index b0b3984a956..d46aabb68b0 100644 --- a/settings/l10n/pt_PT.json +++ b/settings/l10n/pt_PT.json @@ -13,79 +13,79 @@ "Files decrypted successfully" : "Ficheiros desencriptados com sucesso", "Couldn't decrypt your files, please check your owncloud.log or ask your administrator" : "Não foi possível descodificar os seus ficheiros. Por favor, verifique a sua owncloud.log ou pergunte ao seu administrador", "Couldn't decrypt your files, check your password and try again" : "Não foi possível descodificar os seus ficheiros. Por favor, verifique a sua palavra-passe e tente novamente", - "Encryption keys deleted permanently" : "A chave de encriptação foi eliminada permanentemente", - "Couldn't permanently delete your encryption keys, please check your owncloud.log or ask your administrator" : "Não foi possível excluir permanentemente a sua chave de encriptação. Verifique a sua owncloud.log ou pergunte ao seu administrador", + "Encryption keys deleted permanently" : "As chaves de encriptação foram eliminadas para sempre", + "Couldn't permanently delete your encryption keys, please check your owncloud.log or ask your administrator" : "Não foi possível apagar as suas chaves de encriptação. Por favor, verifique a sua owncloud.log ou pergunte ao seu administrador", "Couldn't remove app." : "Não foi possível remover a aplicação.", "Email saved" : "E-mail guardado", "Invalid email" : "e-mail inválido", "Unable to delete group" : "Não é possível apagar o grupo", "Unable to delete user" : "Não é possível apagar o utilizador", - "Backups restored successfully" : "Cópias de segurança foram restauradas com sucesso", - "Couldn't restore your encryption keys, please check your owncloud.log or ask your administrator" : "Nao foi possivel restaurar as suas chaves de encriptacao. Verifique a sua owncloud.log ou pergunte ao seu administrador", + "Backups restored successfully" : "Cópias de segurança restauradas com sucesso", + "Couldn't restore your encryption keys, please check your owncloud.log or ask your administrator" : "Não foi possivel restaurar as suas chaves de encriptacao. Por favor, verifique a sua owncloud.log ou pergunte ao seu administrador", "Language changed" : "Idioma alterado", "Invalid request" : "Pedido Inválido", "Admins can't remove themself from the admin group" : "Os administradores não se podem remover a eles próprios do grupo 'admin'.", - "Unable to add user to group %s" : "Impossível acrescentar utilizador ao grupo %s", - "Unable to remove user from group %s" : "Impossível apagar utilizador do grupo %s", - "Couldn't update app." : "Não foi possível actualizar a aplicação.", + "Unable to add user to group %s" : "Não é possível adicionar o utilizador ao grupo %s", + "Unable to remove user from group %s" : "Não é possível remover o utilizador do grupo %s", + "Couldn't update app." : "Não foi possível atualizar a app.", "Wrong password" : "Palavra-passe errada", - "No user supplied" : "Nenhum utilizador especificado.", + "No user supplied" : "Nenhum utilizador especificado", "Please provide an admin recovery password, otherwise all user data will be lost" : "Por favor, forneça uma palavra-passe de recuperação de administrador, caso contrário seráo perdidos todos os dados", "Wrong admin recovery password. Please check the password and try again." : "Palavra-passe de recuperação de administrador errada. Por favor, verifique a palavra-passe e tente novamente.", "Back-end doesn't support password change, but the users encryption key was successfully updated." : "Não foi possível alterar a sua palavra-passe, mas a chave de codificação foi atualizada com sucesso.", "Unable to change password" : "Não foi possível alterar a sua palavra-passe ", "Enabled" : "Ativada", - "Not enabled" : "Desactivado", + "Not enabled" : "Desativada", "Recommended" : "Recomendado", "Saved" : "Guardado", "test email settings" : "testar as definições de e-mail", - "If you received this email, the settings seem to be correct." : "Se você recebeu este e-mail as configurações parecem estar correctas", - "A problem occurred while sending the email. Please revise your settings." : "Um problema ocorreu ao enviar o email. Por favor verifique as suas definições.", - "Email sent" : "E-mail enviado", + "If you received this email, the settings seem to be correct." : "Se recebeu este e-mail, as configurações parecem estar corretas", + "A problem occurred while sending the email. Please revise your settings." : "Ocorreu um problema durante o envio do e-mail. Por favor, verifique as suas configurações..", + "Email sent" : "Mensagem enviada", "You need to set your user email before being able to send test emails." : "Você precisa de configurar o seu e-mail de usuário antes de ser capaz de enviar e-mails de teste", "Are you really sure you want add \"{domain}\" as trusted domain?" : "Você tem certeza que quer adicionar \"{domain}\" como domínio confiável?", "Add trusted domain" : "Adicionar domínio confiável ", - "Sending..." : "A enviar ...", + "Sending..." : "A enviar...", "All" : "Todos", - "Please wait...." : "Por favor aguarde...", - "Error while disabling app" : "Ocorreu um erro enquanto desativava a aplicação", + "Please wait...." : "Por favor, aguarde...", + "Error while disabling app" : "Ocorreu um erro enquanto desativava a app", "Disable" : "Desativar", "Enable" : "Ativar", - "Error while enabling app" : "Ocorreu um erro enquanto ativava a aplicação", - "Updating...." : "A Actualizar...", - "Error while updating app" : "Ocorreu um erro enquanto atualizava a aplicação", - "Updated" : "Actualizado", - "Uninstalling ...." : "A desinstalar ....", - "Error while uninstalling app" : "Erro durante a desinstalação da aplicação", + "Error while enabling app" : "Ocorreu um erro enquanto ativava a app", + "Updating...." : "A atualizar...", + "Error while updating app" : "Ocorreu um erro enquanto atualizava a app", + "Updated" : "Atualizada", + "Uninstalling ...." : "A desinstalar....", + "Error while uninstalling app" : "Ocorreu um erro durante a desinstalação da app", "Uninstall" : "Desinstalar", - "Select a profile picture" : "Seleccione uma fotografia de perfil", + "Select a profile picture" : "Selecione uma fotografia de perfil", "Very weak password" : "Palavra-passe muito fraca", "Weak password" : "Palavra-passe fraca", "So-so password" : "Palavra-passe aceitável", "Good password" : "Palavra-passe boa", "Strong password" : "Palavra-passe forte", - "Valid until {date}" : "Válido até {date}", + "Valid until {date}" : "Válida até {date}", "Delete" : "Apagar", - "Decrypting files... Please wait, this can take some time." : "A desencriptar os ficheiros... Por favor aguarde, esta operação pode demorar algum tempo.", - "Delete encryption keys permanently." : "Excluir as chaves encriptadas de forma permanente.", - "Restore encryption keys." : "Restaurar chaves encriptadas.", + "Decrypting files... Please wait, this can take some time." : "A descodificar os ficheiros... Por favor, aguarde, esta operação pode demorar algum tempo.", + "Delete encryption keys permanently." : "Apagar as chaves encriptadas para sempre.", + "Restore encryption keys." : "Restaurar as chaves encriptadas.", "Groups" : "Grupos", - "Unable to delete {objName}" : "Impossível apagar {objNome}", - "Error creating group" : "Erro ao criar grupo", - "A valid group name must be provided" : "Um nome válido do grupo tem de ser fornecido", + "Unable to delete {objName}" : "Não é possível apagar {objNome}", + "Error creating group" : "Ocorreu um erro ao criar o grupo", + "A valid group name must be provided" : "Deve ser indicado um nome de grupo válido", "deleted {groupName}" : "{groupName} apagado", "undo" : "Anular", "no group" : "sem grupo", "never" : "nunca", "deleted {userName}" : "{userName} apagado", "add group" : "Adicionar grupo", - "A valid username must be provided" : "Um nome de utilizador válido deve ser fornecido", - "Error creating user" : "Erro a criar utilizador", - "A valid password must be provided" : "Deve ser fornecida uma palavra-passe válida", - "Warning: Home directory for user \"{user}\" already exists" : "Atenção: a pasta pessoal do utilizador \"{user}\" já existe", + "A valid username must be provided" : "Deve ser indicado um nome de utilizador válido", + "Error creating user" : "Ocorreu um erro ao criar o utilizador", + "A valid password must be provided" : "Deve ser indicada uma palavra-passe válida", + "Warning: Home directory for user \"{user}\" already exists" : "Atenção: A pasta pessoal do utilizador \"{user}\" já existe", "__language_name__" : "__language_name__", "Personal Info" : "Informação Pessoal", - "SSL root certificates" : "Certificados SSL de raiz", + "SSL root certificates" : "Certificados de raiz SSL", "Encryption" : "Encriptação", "Everything (fatal issues, errors, warnings, info, debug)" : "Tudo (problemas fatais, erros, avisos, informação, depuração)", "Info, warnings, errors and fatal issues" : "Informação, avisos, erros e problemas fatais", @@ -99,22 +99,23 @@ "SSL" : "SSL", "TLS" : "TLS", "Security Warning" : "Aviso de Segurança", - "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "Está a aceder %s via HTTP. Recomendamos vivamente que configure o servidor para forçar o uso de HTTPS.", - "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "A sua pasta com os dados e os seus ficheiros estão provavelmente acessíveis a partir das internet. O seu ficheiro .htaccess não está a funcionar corretamente. Sugerimos veementemente que configure o seu servidor web de maneira a que a pasta com os dados deixe de ficar acessível, ou mova a pasta com os dados para fora da raiz de documentos do servidor web.", - "Setup Warning" : "Aviso de setup", + "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "Está a aceder a %s via HTTP. Nós recomendamos vivamente que configure o seu servidor para requerer a utilização de HTTPS.", + "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "A sua pasta dos dados e os seus ficheiros estão provavelmente acessíveis a partir da Internet. O ficheiro .htaccess não está a funcionar corretamente. Nós sugerimos fortemente que configure o seu servidor da Web de maneira a que a pasta dos dados deixe de ficar acessível, ou mova-a para fora da diretoria raiz dos documentos do servidor da Web.", + "Read-Only config enabled" : "Configuração Só-de-Leitura ativada", + "The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update." : "A configuração Só-de-Leitura foi ativada. Isto evita definir algumas configurações através da interface da Web. Além disso, o ficheiro precisa de ser definido gravável manualmente para cada atualização.", + "Setup Warning" : "Aviso de Configuração", "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP está aparentemente configurado a remover blocos doc em linha. Isto vai fazer algumas aplicações basicas inacessíveis.", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Isto é provavelmente causado por uma cache/acelerador como o Zend OPcache or eAcelerador.", - "Database Performance Info" : "Informação sobre desempenho da Base de Dados", + "Database Performance Info" : "Informação do Desempenho da Base de Dados", "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite é usado como base de dados. Para grandes instalações nós recomendamos a alterar isso. Para mudar para outra base de dados use o comando de linha: 'occ db:convert-type'", - "Module 'fileinfo' missing" : "Falta o módulo 'fileinfo'", + "Module 'fileinfo' missing" : "Módulo 'fileinfo' em falta", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "O Módulo PHP 'fileinfo' não se encontra instalado/activado. É fortemente recomendado que active este módulo para obter os melhores resultado com a detecção dos tipos de mime.", - "Your PHP version is outdated" : "A sua versão do PHP está ultrapassada", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "A sua versão do PHP está ultrapassada. Recomendamos que actualize para a versão 5.3.8 ou mais recente, devido às versões anteriores conterem problemas. É também possível que esta instalação não esteja a funcionar correctamente.", - "PHP charset is not set to UTF-8" : "PHP charset não está definido para UTF-8", + "PHP charset is not set to UTF-8" : "O conjunto de carateres PHP não está definido para UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "PHP charset não está definido como UTF-8. Isso pode causar grandes problemas com caracteres não-ASCII em nomes de arquivo. Recomendamos para alterar o valor de php.ini 'default_charset' para 'UTF-8'.", - "Locale not working" : "Internacionalização não está a funcionar", - "System locale can not be set to a one which supports UTF-8." : "Não é possível pôr as definições de sistema compatíveis com UTF-8.", + "Locale not working" : "A internacionalização não está a funcionar", + "System locale can not be set to a one which supports UTF-8." : "Não é possível definir a internacionalização do sistema para um que suporte o UTF-8.", "This means that there might be problems with certain characters in file names." : "Isto significa que podem haver problemas com alguns caracteres nos nomes dos ficheiros.", + "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Nós recomendamos fortemente que instale no seu sistema os pacotes necessários para suportar uma das seguintes locallidades: %s.", "URL generation in notification emails" : "Geração URL em e-mails de notificação", "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 \"overwritewebroot\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Se a sua instalação não está instalada na raiz do domínio e usa o sistema cron, pode haver problemas com a geração de URL. Para evitar esses problemas, por favor, defina a opção \"overwritewebroot\" no ficheiro config.php para o caminho webroot da sua instalação (sugestão: \"%s\")", "Connectivity Checks" : "Verificações de Conetividade", diff --git a/settings/l10n/ro.js b/settings/l10n/ro.js index 122c53f2737..84b1e8d202e 100644 --- a/settings/l10n/ro.js +++ b/settings/l10n/ro.js @@ -68,7 +68,6 @@ OC.L10N.register( "Setup Warning" : "Atenţie la implementare", "Module 'fileinfo' missing" : "Modulul \"Fileinfo\" lipsește", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "Modulul PHP \"Fileinfo\" lipsește. Va recomandam sa activaţi acest modul pentru a obține cele mai bune rezultate cu detectarea mime-type.", - "Your PHP version is outdated" : "Versiunea PHP folosită este învechită", "Locale not working" : "Localizarea nu funcționează", "Please double check the <a href='%s'>installation guides</a>." : "Vă rugăm să verificați <a href='%s'>ghiduri de instalare</a>.", "Execute one task with each page loaded" : "Execută o sarcină la fiecare pagină încărcată", diff --git a/settings/l10n/ro.json b/settings/l10n/ro.json index 68c3b2335fc..090b6dada69 100644 --- a/settings/l10n/ro.json +++ b/settings/l10n/ro.json @@ -66,7 +66,6 @@ "Setup Warning" : "Atenţie la implementare", "Module 'fileinfo' missing" : "Modulul \"Fileinfo\" lipsește", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "Modulul PHP \"Fileinfo\" lipsește. Va recomandam sa activaţi acest modul pentru a obține cele mai bune rezultate cu detectarea mime-type.", - "Your PHP version is outdated" : "Versiunea PHP folosită este învechită", "Locale not working" : "Localizarea nu funcționează", "Please double check the <a href='%s'>installation guides</a>." : "Vă rugăm să verificați <a href='%s'>ghiduri de instalare</a>.", "Execute one task with each page loaded" : "Execută o sarcină la fiecare pagină încărcată", diff --git a/settings/l10n/ru.js b/settings/l10n/ru.js index 0ea525bf955..863e74ba137 100644 --- a/settings/l10n/ru.js +++ b/settings/l10n/ru.js @@ -110,13 +110,12 @@ OC.L10N.register( "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "В качестве Базы Данных используется SQLite. Для больших установок рекомендуется использовать другие типы Баз Данных. Чтобы переехать на другую Базу Данных используйте инструмент командной строки: 'ooc: db:conver-type'", "Module 'fileinfo' missing" : "Модуль 'fileinfo' отсутствует", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "PHP-модуль 'fileinfo' отсутствует. Мы настоятельно рекомендуем включить этот модуль для улучшения определения типов (mime-type) файлов.", - "Your PHP version is outdated" : "Ваша версия PHP устарела", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Ваша версия PHP устарела. Мы настоятельно рекомендуем обновиться до 5.3.8 или новее, так как старые версии работают не корректно. Вполне возможно, что эта установка не работает должным образом.", "PHP charset is not set to UTF-8" : "Кодировка PHP не совпадает с UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "Кодировка PHP не совпадает с UTF-8. Это может вызвать трудности с именами файлов, содержащими нелатинские символы. Мы настоятельно рекомендуем сменить значение переменной default_charset в файле php.ini на UTF-8.", "Locale not working" : "Локализация не работает", "System locale can not be set to a one which supports UTF-8." : "Невозможно установить системную локаль, поддерживающую UTF-8", "This means that there might be problems with certain characters in file names." : "Это значит, что могут быть проблемы с некоторыми символами в именах файлов.", + "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Мы рекомендуем установить требуемые пакеты для вашей системы для поддержки одного из следующих языков: %s.", "URL generation in notification emails" : "Генерирование URL в уведомляющих электронных письмах", "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 \"overwritewebroot\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Если ваша копия ownCloud установлена не в корне домена и использует планировщик cron системы, возможны проблемы с правильной генерацией URL. Чтобы избежать этого, установите опцию verwritewebroot файла config.php равной пути папки установки. (Вероятно, это \"%s\".)", "Connectivity Checks" : "Проверка соединения", @@ -221,6 +220,7 @@ OC.L10N.register( "Create" : "Создать", "Admin Recovery Password" : "Восстановление пароля администратора", "Enter the recovery password in order to recover the users files during password change" : "Введите пароль для того, чтобы восстановить файлы пользователей при смене пароля", + "Search Users" : "Искать пользователей", "Add Group" : "Добавить группу", "Group" : "Группа", "Everyone" : "Все", diff --git a/settings/l10n/ru.json b/settings/l10n/ru.json index 0c9ae6e5b27..052861fd163 100644 --- a/settings/l10n/ru.json +++ b/settings/l10n/ru.json @@ -108,13 +108,12 @@ "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "В качестве Базы Данных используется SQLite. Для больших установок рекомендуется использовать другие типы Баз Данных. Чтобы переехать на другую Базу Данных используйте инструмент командной строки: 'ooc: db:conver-type'", "Module 'fileinfo' missing" : "Модуль 'fileinfo' отсутствует", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "PHP-модуль 'fileinfo' отсутствует. Мы настоятельно рекомендуем включить этот модуль для улучшения определения типов (mime-type) файлов.", - "Your PHP version is outdated" : "Ваша версия PHP устарела", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Ваша версия PHP устарела. Мы настоятельно рекомендуем обновиться до 5.3.8 или новее, так как старые версии работают не корректно. Вполне возможно, что эта установка не работает должным образом.", "PHP charset is not set to UTF-8" : "Кодировка PHP не совпадает с UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "Кодировка PHP не совпадает с UTF-8. Это может вызвать трудности с именами файлов, содержащими нелатинские символы. Мы настоятельно рекомендуем сменить значение переменной default_charset в файле php.ini на UTF-8.", "Locale not working" : "Локализация не работает", "System locale can not be set to a one which supports UTF-8." : "Невозможно установить системную локаль, поддерживающую UTF-8", "This means that there might be problems with certain characters in file names." : "Это значит, что могут быть проблемы с некоторыми символами в именах файлов.", + "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Мы рекомендуем установить требуемые пакеты для вашей системы для поддержки одного из следующих языков: %s.", "URL generation in notification emails" : "Генерирование URL в уведомляющих электронных письмах", "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 \"overwritewebroot\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Если ваша копия ownCloud установлена не в корне домена и использует планировщик cron системы, возможны проблемы с правильной генерацией URL. Чтобы избежать этого, установите опцию verwritewebroot файла config.php равной пути папки установки. (Вероятно, это \"%s\".)", "Connectivity Checks" : "Проверка соединения", @@ -219,6 +218,7 @@ "Create" : "Создать", "Admin Recovery Password" : "Восстановление пароля администратора", "Enter the recovery password in order to recover the users files during password change" : "Введите пароль для того, чтобы восстановить файлы пользователей при смене пароля", + "Search Users" : "Искать пользователей", "Add Group" : "Добавить группу", "Group" : "Группа", "Everyone" : "Все", diff --git a/settings/l10n/sk_SK.js b/settings/l10n/sk_SK.js index 3e44cd259e4..3d9fe53c946 100644 --- a/settings/l10n/sk_SK.js +++ b/settings/l10n/sk_SK.js @@ -110,8 +110,6 @@ OC.L10N.register( "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "Ako databáza je použitá SQLite. Pre väčšie inštalácie vám to odporúčame zmeniť. Na prenos do inej databázy použite nástroj príkazového riadka: \"occ db:convert-typ\"", "Module 'fileinfo' missing" : "Chýba modul 'fileinfo'", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "Chýba modul 'fileinfo'. Dôrazne doporučujeme ho povoliť pre dosiahnutie najlepších výsledkov zisťovania mime-typu.", - "Your PHP version is outdated" : "Vaša PHP verzia je zastaraná", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Táto verzia PHP je zastaraná. Dôrazne vám odporúčame aktualizovať na verziu 5.3.8 alebo novšiu, lebo staršie verzie sú chybné. Je možné, že táto inštalácia nebude fungovať správne.", "PHP charset is not set to UTF-8" : "Znaková sada PHP nie je nastavená na UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "Predvolená znaková sada PHP nie je nastavená na UTF-8. To môže spôsobiť veľké problémy v prípade ne-ASCII znakov v názvoch súborov. Dôrazne odporúčame zmeniť hodnotu \"default_charset\" v php.ini na \"UTF-8\".", "Locale not working" : "Lokalizácia nefunguje", @@ -219,6 +217,7 @@ OC.L10N.register( "Create" : "Vytvoriť", "Admin Recovery Password" : "Obnovenie hesla administrátora", "Enter the recovery password in order to recover the users files during password change" : "Zadajte heslo pre obnovenie súborov používateľa pri zmene hesla", + "Search Users" : "Hľadať používateľov", "Add Group" : "Pridať skupinu", "Group" : "Skupina", "Everyone" : "Všetci", diff --git a/settings/l10n/sk_SK.json b/settings/l10n/sk_SK.json index f5fd698cd2a..95c4c76b74b 100644 --- a/settings/l10n/sk_SK.json +++ b/settings/l10n/sk_SK.json @@ -108,8 +108,6 @@ "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "Ako databáza je použitá SQLite. Pre väčšie inštalácie vám to odporúčame zmeniť. Na prenos do inej databázy použite nástroj príkazového riadka: \"occ db:convert-typ\"", "Module 'fileinfo' missing" : "Chýba modul 'fileinfo'", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "Chýba modul 'fileinfo'. Dôrazne doporučujeme ho povoliť pre dosiahnutie najlepších výsledkov zisťovania mime-typu.", - "Your PHP version is outdated" : "Vaša PHP verzia je zastaraná", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Táto verzia PHP je zastaraná. Dôrazne vám odporúčame aktualizovať na verziu 5.3.8 alebo novšiu, lebo staršie verzie sú chybné. Je možné, že táto inštalácia nebude fungovať správne.", "PHP charset is not set to UTF-8" : "Znaková sada PHP nie je nastavená na UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "Predvolená znaková sada PHP nie je nastavená na UTF-8. To môže spôsobiť veľké problémy v prípade ne-ASCII znakov v názvoch súborov. Dôrazne odporúčame zmeniť hodnotu \"default_charset\" v php.ini na \"UTF-8\".", "Locale not working" : "Lokalizácia nefunguje", @@ -217,6 +215,7 @@ "Create" : "Vytvoriť", "Admin Recovery Password" : "Obnovenie hesla administrátora", "Enter the recovery password in order to recover the users files during password change" : "Zadajte heslo pre obnovenie súborov používateľa pri zmene hesla", + "Search Users" : "Hľadať používateľov", "Add Group" : "Pridať skupinu", "Group" : "Skupina", "Everyone" : "Všetci", diff --git a/settings/l10n/sl.js b/settings/l10n/sl.js index 74f41f79bc3..cd8a932499d 100644 --- a/settings/l10n/sl.js +++ b/settings/l10n/sl.js @@ -107,12 +107,11 @@ OC.L10N.register( "Database Performance Info" : "Podrobnosti delovanja podatkovne zbirke", "Module 'fileinfo' missing" : "Manjka modul 'fileinfo'.", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "Manjka modul PHP 'fileinfo'. Priporočljivo je omogočiti ta modul za popolno zaznavanje vrst MIME.", - "Your PHP version is outdated" : "Nameščena različica PHP je zastarela", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Nameščena različica PHP je zastarela. Priporočljivo je posodobiti namestitev na različico 5.3.8 ali novejše, saj starejše različice ne podpirajo vseh zmožnosti. Mogoče je, da namestitev ne deluje pravilno.", "PHP charset is not set to UTF-8" : "Jezikovni znakovni nabor PHP ni določen kot UTF-8", "Locale not working" : "Jezikovne prilagoditve ne delujejo.", "System locale can not be set to a one which supports UTF-8." : "Sistemskih jezikovnih nastavitev ni mogoče nastaviti na možnost, ki podpira nabor UTF-8.", "This means that there might be problems with certain characters in file names." : "To pomeni, da se lahko pojavijo napake pri nekaterih znakih v imenih datotek.", + "URL generation in notification emails" : "Ustvarjanje naslova URL v elektronskih sporočilih", "Connectivity Checks" : "Preverjanje povezav", "No problems found" : "Ni zaznanih težav", "Please double check the <a href='%s'>installation guides</a>." : "Preverite <a href='%s'>navodila namestitve</a>.", @@ -211,6 +210,7 @@ OC.L10N.register( "Create" : "Ustvari", "Admin Recovery Password" : "Obnovitev skrbniškega gesla", "Enter the recovery password in order to recover the users files during password change" : "Vnesite geslo, ki omogoča obnovitev uporabniških datotek med spreminjanjem gesla", + "Search Users" : "Poišči med uporabniki", "Add Group" : "Dodaj skupino", "Group" : "Skupina", "Everyone" : "Vsi", diff --git a/settings/l10n/sl.json b/settings/l10n/sl.json index 0a539fcde4f..831ca55d515 100644 --- a/settings/l10n/sl.json +++ b/settings/l10n/sl.json @@ -105,12 +105,11 @@ "Database Performance Info" : "Podrobnosti delovanja podatkovne zbirke", "Module 'fileinfo' missing" : "Manjka modul 'fileinfo'.", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "Manjka modul PHP 'fileinfo'. Priporočljivo je omogočiti ta modul za popolno zaznavanje vrst MIME.", - "Your PHP version is outdated" : "Nameščena različica PHP je zastarela", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Nameščena različica PHP je zastarela. Priporočljivo je posodobiti namestitev na različico 5.3.8 ali novejše, saj starejše različice ne podpirajo vseh zmožnosti. Mogoče je, da namestitev ne deluje pravilno.", "PHP charset is not set to UTF-8" : "Jezikovni znakovni nabor PHP ni določen kot UTF-8", "Locale not working" : "Jezikovne prilagoditve ne delujejo.", "System locale can not be set to a one which supports UTF-8." : "Sistemskih jezikovnih nastavitev ni mogoče nastaviti na možnost, ki podpira nabor UTF-8.", "This means that there might be problems with certain characters in file names." : "To pomeni, da se lahko pojavijo napake pri nekaterih znakih v imenih datotek.", + "URL generation in notification emails" : "Ustvarjanje naslova URL v elektronskih sporočilih", "Connectivity Checks" : "Preverjanje povezav", "No problems found" : "Ni zaznanih težav", "Please double check the <a href='%s'>installation guides</a>." : "Preverite <a href='%s'>navodila namestitve</a>.", @@ -209,6 +208,7 @@ "Create" : "Ustvari", "Admin Recovery Password" : "Obnovitev skrbniškega gesla", "Enter the recovery password in order to recover the users files during password change" : "Vnesite geslo, ki omogoča obnovitev uporabniških datotek med spreminjanjem gesla", + "Search Users" : "Poišči med uporabniki", "Add Group" : "Dodaj skupino", "Group" : "Skupina", "Everyone" : "Vsi", diff --git a/settings/l10n/sq.js b/settings/l10n/sq.js index ec4d9667170..fbb926feeb7 100644 --- a/settings/l10n/sq.js +++ b/settings/l10n/sq.js @@ -1,17 +1,29 @@ OC.L10N.register( "settings", { + "Security & Setup Warnings" : "Paralajmërimet e Sigurisë dhe Konfigurimit", "Cron" : "Cron", "Sharing" : "Ndarje", "Security" : "Siguria", + "Email Server" : "Serveri Email", "Log" : "Historik aktiviteti", "Authentication error" : "Gabim autentifikimi", + "Your full name has been changed." : "Emri juaj i plotë ka ndryshuar.", + "Unable to change full name" : "Nuk mund të ndryshohet emri i plotë", "Group already exists" : "Grupi ekziston", "Unable to add group" : "E pamundur të shtohet grupi", + "Files decrypted successfully" : "Skedarët janë dëshifruar me sukses", + "Couldn't decrypt your files, please check your owncloud.log or ask your administrator" : "Nuk mund të dëshifrohen skedarët tuaj, ju lutem kontrolloni owncloud.log ose pyesni administratorin tuaj.", + "Couldn't decrypt your files, check your password and try again" : "Nuk mund të dëshifrohen skedarët tuaj, ju lutem kontrolloni fjalëkalimin tuaj dhe provoni përsëri.", + "Encryption keys deleted permanently" : "Çelësat e shifrimit u fshinë përfundimisht", + "Couldn't permanently delete your encryption keys, please check your owncloud.log or ask your administrator" : "Nuk mund të fshihen përfundimisht çelësat tuaj të shifrimit, ju lutem kontrolloni owncloud.log ose pyesni administratorin tuaj.", + "Couldn't remove app." : "Nuk mund të hiqet aplikacioni.", "Email saved" : "Email u ruajt", "Invalid email" : "Email jo i vlefshëm", "Unable to delete group" : "E pamundur të fshihet grupi", "Unable to delete user" : "E pamundur të fshihet përdoruesi", + "Backups restored successfully" : "Kopjet rezervë u restauruan me sukses", + "Couldn't restore your encryption keys, please check your owncloud.log or ask your administrator" : "Nuk mund të restaurohen çelësat tuaj të shifrimit, ju lutem kontrolloni owncloud.log ose pyesni administratorin tuaj.", "Language changed" : "Gjuha u ndryshua", "Invalid request" : "Kërkesë e pavlefshme", "Admins can't remove themself from the admin group" : "Administratorët nuk mund të heqin vehten prej grupit admin", @@ -19,8 +31,16 @@ OC.L10N.register( "Unable to remove user from group %s" : "E pamundur të hiqet përdoruesi nga grupi %s", "Couldn't update app." : "E pamundur të përditësohet app.", "Wrong password" : "Fjalëkalim i gabuar", + "No user supplied" : "Nuk është dhënë asnjë përdorues", + "Please provide an admin recovery password, otherwise all user data will be lost" : "Ju lutem jepni një fjalëkalim restaurimi administrativ, në të kundërt të gjitha të dhënat do humbasin", + "Wrong admin recovery password. Please check the password and try again." : "Fjalëkalim i gabuar restaurimi administrativ. Ju lutem kontrolloni fjalëkalimin dhe provoni përsëri.", + "Back-end doesn't support password change, but the users encryption key was successfully updated." : "Paneli i kontrollit nuk mbështet ndryshimin e fjalëkalimit, por çelësi i shifrimit të përdoruesit u modifikua me sukses.", "Unable to change password" : "Fjalëkalimi nuk mund të ndryshohet", + "Enabled" : "Aktivizuar", + "Not enabled" : "Jo aktive", + "Recommended" : "E rekomanduar", "Saved" : "U ruajt", + "test email settings" : "parametra test për email", "Email sent" : "Email-i u dërgua", "Sending..." : "Duke dërguar", "All" : "Të gjitha", @@ -31,6 +51,11 @@ OC.L10N.register( "Error while updating app" : "Gabim gjatë përditësimit të app", "Updated" : "I përditësuar", "Select a profile picture" : "Zgjidh një foto profili", + "Very weak password" : "Fjalëkalim shumë i dobët", + "Weak password" : "Fjalëkalim i dobët", + "So-so password" : "Fjalëkalim i pranueshëm", + "Good password" : "Fjalëkalim i mirë", + "Strong password" : "Fjalëkalim shumë i mirë", "Delete" : "Fshi", "Groups" : "Grupet", "deleted {groupName}" : "u fshi {groupName}", diff --git a/settings/l10n/sq.json b/settings/l10n/sq.json index 4c8a590d48c..2fa9c2f6d17 100644 --- a/settings/l10n/sq.json +++ b/settings/l10n/sq.json @@ -1,15 +1,27 @@ { "translations": { + "Security & Setup Warnings" : "Paralajmërimet e Sigurisë dhe Konfigurimit", "Cron" : "Cron", "Sharing" : "Ndarje", "Security" : "Siguria", + "Email Server" : "Serveri Email", "Log" : "Historik aktiviteti", "Authentication error" : "Gabim autentifikimi", + "Your full name has been changed." : "Emri juaj i plotë ka ndryshuar.", + "Unable to change full name" : "Nuk mund të ndryshohet emri i plotë", "Group already exists" : "Grupi ekziston", "Unable to add group" : "E pamundur të shtohet grupi", + "Files decrypted successfully" : "Skedarët janë dëshifruar me sukses", + "Couldn't decrypt your files, please check your owncloud.log or ask your administrator" : "Nuk mund të dëshifrohen skedarët tuaj, ju lutem kontrolloni owncloud.log ose pyesni administratorin tuaj.", + "Couldn't decrypt your files, check your password and try again" : "Nuk mund të dëshifrohen skedarët tuaj, ju lutem kontrolloni fjalëkalimin tuaj dhe provoni përsëri.", + "Encryption keys deleted permanently" : "Çelësat e shifrimit u fshinë përfundimisht", + "Couldn't permanently delete your encryption keys, please check your owncloud.log or ask your administrator" : "Nuk mund të fshihen përfundimisht çelësat tuaj të shifrimit, ju lutem kontrolloni owncloud.log ose pyesni administratorin tuaj.", + "Couldn't remove app." : "Nuk mund të hiqet aplikacioni.", "Email saved" : "Email u ruajt", "Invalid email" : "Email jo i vlefshëm", "Unable to delete group" : "E pamundur të fshihet grupi", "Unable to delete user" : "E pamundur të fshihet përdoruesi", + "Backups restored successfully" : "Kopjet rezervë u restauruan me sukses", + "Couldn't restore your encryption keys, please check your owncloud.log or ask your administrator" : "Nuk mund të restaurohen çelësat tuaj të shifrimit, ju lutem kontrolloni owncloud.log ose pyesni administratorin tuaj.", "Language changed" : "Gjuha u ndryshua", "Invalid request" : "Kërkesë e pavlefshme", "Admins can't remove themself from the admin group" : "Administratorët nuk mund të heqin vehten prej grupit admin", @@ -17,8 +29,16 @@ "Unable to remove user from group %s" : "E pamundur të hiqet përdoruesi nga grupi %s", "Couldn't update app." : "E pamundur të përditësohet app.", "Wrong password" : "Fjalëkalim i gabuar", + "No user supplied" : "Nuk është dhënë asnjë përdorues", + "Please provide an admin recovery password, otherwise all user data will be lost" : "Ju lutem jepni një fjalëkalim restaurimi administrativ, në të kundërt të gjitha të dhënat do humbasin", + "Wrong admin recovery password. Please check the password and try again." : "Fjalëkalim i gabuar restaurimi administrativ. Ju lutem kontrolloni fjalëkalimin dhe provoni përsëri.", + "Back-end doesn't support password change, but the users encryption key was successfully updated." : "Paneli i kontrollit nuk mbështet ndryshimin e fjalëkalimit, por çelësi i shifrimit të përdoruesit u modifikua me sukses.", "Unable to change password" : "Fjalëkalimi nuk mund të ndryshohet", + "Enabled" : "Aktivizuar", + "Not enabled" : "Jo aktive", + "Recommended" : "E rekomanduar", "Saved" : "U ruajt", + "test email settings" : "parametra test për email", "Email sent" : "Email-i u dërgua", "Sending..." : "Duke dërguar", "All" : "Të gjitha", @@ -29,6 +49,11 @@ "Error while updating app" : "Gabim gjatë përditësimit të app", "Updated" : "I përditësuar", "Select a profile picture" : "Zgjidh një foto profili", + "Very weak password" : "Fjalëkalim shumë i dobët", + "Weak password" : "Fjalëkalim i dobët", + "So-so password" : "Fjalëkalim i pranueshëm", + "Good password" : "Fjalëkalim i mirë", + "Strong password" : "Fjalëkalim shumë i mirë", "Delete" : "Fshi", "Groups" : "Grupet", "deleted {groupName}" : "u fshi {groupName}", diff --git a/settings/l10n/sv.js b/settings/l10n/sv.js index afd8122c7f3..ca4fac8cdd1 100644 --- a/settings/l10n/sv.js +++ b/settings/l10n/sv.js @@ -104,8 +104,6 @@ OC.L10N.register( "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite används som databas. För större installationer rekommenderar vi att ändra på detta. För att migrera till en annan databas, använd kommandoverktyget: 'occ db:convert-type'", "Module 'fileinfo' missing" : "Modulen \"fileinfo\" saknas", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "PHP-modulen 'fileinfo' saknas. Vi rekommenderar starkt att aktivera den här modulen för att kunna upptäcka korrekt mime-typ.", - "Your PHP version is outdated" : "Din PHP version är föråldrad", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Din PHP version är föråldrad. Vi rekommenderar starkt att uppdatera till 5.3.8 eller nyare eftersom äldre versioner är obrukbara. Det är möjligt att denna installation inte fungerar korrekt.", "Locale not working" : "Locale fungerar inte", "System locale can not be set to a one which supports UTF-8." : "Systemspråk kan inte ställas in till ett som stödjer UTF-8.", "This means that there might be problems with certain characters in file names." : "Detta betyder att där kan komma att uppstå problem med vissa tecken i filnamn.", diff --git a/settings/l10n/sv.json b/settings/l10n/sv.json index 0a0ba0bcf72..d3e685a8432 100644 --- a/settings/l10n/sv.json +++ b/settings/l10n/sv.json @@ -102,8 +102,6 @@ "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite används som databas. För större installationer rekommenderar vi att ändra på detta. För att migrera till en annan databas, använd kommandoverktyget: 'occ db:convert-type'", "Module 'fileinfo' missing" : "Modulen \"fileinfo\" saknas", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "PHP-modulen 'fileinfo' saknas. Vi rekommenderar starkt att aktivera den här modulen för att kunna upptäcka korrekt mime-typ.", - "Your PHP version is outdated" : "Din PHP version är föråldrad", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Din PHP version är föråldrad. Vi rekommenderar starkt att uppdatera till 5.3.8 eller nyare eftersom äldre versioner är obrukbara. Det är möjligt att denna installation inte fungerar korrekt.", "Locale not working" : "Locale fungerar inte", "System locale can not be set to a one which supports UTF-8." : "Systemspråk kan inte ställas in till ett som stödjer UTF-8.", "This means that there might be problems with certain characters in file names." : "Detta betyder att där kan komma att uppstå problem med vissa tecken i filnamn.", diff --git a/settings/l10n/tr.js b/settings/l10n/tr.js index 273874bdfe3..4af533a0835 100644 --- a/settings/l10n/tr.js +++ b/settings/l10n/tr.js @@ -103,6 +103,8 @@ OC.L10N.register( "Security Warning" : "Güvenlik Uyarısı", "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "%s erişiminiz HTTP aracılığıyla yapılıyor. Sunucunuzu, HTTPS kullanımını zorlamak üzere yapılandırmanızı şiddetle öneririz.", "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "Veri dizininiz ve dosyalarınız muhtemelen İnternet üzerinden erişilebilir. .htaccess dosyası çalışmıyor. Web sunucunuzu yapılandırarak veri dizinine erişimi kapatmanızı veya veri dizinini web sunucu belge kök dizini dışına almanızı şiddetle tavsiye ederiz.", + "Read-Only config enabled" : "Salt Okunur yapılandırma etkin", + "The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update." : "Salt Okunur yapılandırma etkinleştirilmiş. Bu, bazı ayarların web arayüzü ile yapılandırılmasını önler. Ayrıca, bu dosya her güncelleme sırasında el ile yazılabilir yapılmalıdır.", "Setup Warning" : "Kurulum Uyarısı", "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP satırıçi doc bloklarını ayıklamak üzere yapılandırılmış gibi görünüyor. Bu, bazı çekirdek (core) uygulamalarını erişilemez yapacak.", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Bu, muhtemelen Zend OPcache veya eAccelerator gibi bir önbellek/hızlandırıcı nedeniyle gerçekleşir.", @@ -110,13 +112,12 @@ OC.L10N.register( "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "Veritabanı olarak SQLite kullanılıyor. Daha büyük kurulumlar için bunu değiştirmenizi öneririz. Farklı bir veritabanına geçiş yapmak için komut satırı aracını kullanın: 'occ db:convert-type'", "Module 'fileinfo' missing" : "Modül 'fileinfo' kayıp", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "PHP modülü 'fileinfo' kayıp. MIME türü tanıma ile en iyi sonuçları elde etmek için bu modülü etkinleştirmenizi öneririz.", - "Your PHP version is outdated" : "PHP sürümünüz eski", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "PHP sürümünüz eski. Eski sürümlerde sorun olduğundan 5.3.8 veya daha yeni bir sürüme güncellemenizi şiddetle tavsiye ederiz. Bu kurulumun da doğru çalışmaması da olasıdır.", "PHP charset is not set to UTF-8" : "PHP karakter kümesi UTF-8 olarak ayarlı değil", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "PHP karakter kümesi UTF-8 olarak ayarlı değil. Bu, dosya isimlerindeki ASCII olmayan karakterler için büyük sorunlara yol açabilir. php.ini içerisindeki 'default_charset' ayarını 'UTF-8' olarak ayarlamanızı şiddetle tavsiye ediyoruz.", "Locale not working" : "Yerel çalışmıyor", "System locale can not be set to a one which supports UTF-8." : "Sistem yereli, UTF-8 destekleyenlerden biri olarak ayarlanamadı.", "This means that there might be problems with certain characters in file names." : "Bu, dosya adlarında belirli karakterlerde problem olabileceği anlamına gelir.", + "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Şu dillerden birini desteklemesi için sisteminize gerekli paketleri kurmanızı şiddetle tavsiye ederiz: %s.", "URL generation in notification emails" : "Bildirim e-postalarında URL oluşturulması", "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 \"overwritewebroot\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Eğer kurulumunuz alan adının köküne yapılmamışsa ve sistem cron'u kullanıyorsa, URL oluşturma ile ilgili sorunlar olabilir. Bu sorunların önüne geçmek için, kurulumunuzun web kök yolundaki config.php dosyasında \"overwritewebroot\" seçeneğini ayarlayın (Önerilen: \"%s\")", "Connectivity Checks" : "Bağlantı Kontrolleri", @@ -137,7 +138,7 @@ OC.L10N.register( "days" : "gün sonra dolsun", "Enforce expiration date" : "Son kullanma tarihini zorla", "Allow resharing" : "Yeniden paylaşıma izin ver", - "Restrict users to only share with users in their groups" : "Kullanıcıların sadece kendi gruplarındaki kullanıcılarla paylaşmasına sınırla", + "Restrict users to only share with users in their groups" : "Kullanıcıların, dosyaları sadece kendi gruplarındaki kullanıcılarla paylaşmasına izin ver", "Allow users to send mail notification for shared files" : "Paylaşılmış dosyalar için kullanıcıların posta bildirimi göndermesine izin ver", "Exclude groups from sharing" : "Grupları paylaşma eyleminden hariç tut", "These groups will still be able to receive shares, but not to initiate them." : "Bu gruplar hala paylaşımları alabilecek, ancak başlatamayacaktır.", @@ -165,13 +166,14 @@ OC.L10N.register( "Less" : "Daha az", "Version" : "Sürüm", "Developed by the <a href=\"http://ownCloud.org/contact\" target=\"_blank\">ownCloud community</a>, the <a href=\"https://github.com/owncloud\" target=\"_blank\">source code</a> is licensed under the <a href=\"http://www.gnu.org/licenses/agpl-3.0.html\" target=\"_blank\"><abbr title=\"Affero General Public License\">AGPL</abbr></a>." : "<a href=\"http://ownCloud.org/contact\" target=\"_blank\">ownCloud topluluğu</a> tarafından geliştirilmiş olup, <a href=\"https://github.com/owncloud\" target=\"_blank\">kaynak kodu</a>, <a href=\"http://www.gnu.org/licenses/agpl-3.0.html\" target=\"_blank\"><abbr title=\"Affero General Public License\">AGPL</abbr></a> altında lisanslanmıştır.", - "More apps" : "Daha fazla Uygulama", + "More apps" : "Daha fazla uygulama", "Add your app" : "Uygulamanızı ekleyin", "by" : "oluşturan", "licensed" : "lisanslı", "Documentation:" : "Belgelendirme:", "User Documentation" : "Kullanıcı Belgelendirmesi", "Admin Documentation" : "Yönetici Belgelendirmesi", + "This app cannot be installed because the following dependencies are not fulfilled:" : "Bu uygulama, aşağıdaki bağımlılıklar sağlanmadığından yüklenemiyor:", "Update to %s" : "%s sürümüne güncelle", "Enable only for specific groups" : "Sadece belirli gruplar için etkinleştir", "Uninstall App" : "Uygulamayı Kaldır", diff --git a/settings/l10n/tr.json b/settings/l10n/tr.json index 9aec853988f..956c694f98f 100644 --- a/settings/l10n/tr.json +++ b/settings/l10n/tr.json @@ -101,6 +101,8 @@ "Security Warning" : "Güvenlik Uyarısı", "You are accessing %s via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "%s erişiminiz HTTP aracılığıyla yapılıyor. Sunucunuzu, HTTPS kullanımını zorlamak üzere yapılandırmanızı şiddetle öneririz.", "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "Veri dizininiz ve dosyalarınız muhtemelen İnternet üzerinden erişilebilir. .htaccess dosyası çalışmıyor. Web sunucunuzu yapılandırarak veri dizinine erişimi kapatmanızı veya veri dizinini web sunucu belge kök dizini dışına almanızı şiddetle tavsiye ederiz.", + "Read-Only config enabled" : "Salt Okunur yapılandırma etkin", + "The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update." : "Salt Okunur yapılandırma etkinleştirilmiş. Bu, bazı ayarların web arayüzü ile yapılandırılmasını önler. Ayrıca, bu dosya her güncelleme sırasında el ile yazılabilir yapılmalıdır.", "Setup Warning" : "Kurulum Uyarısı", "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP satırıçi doc bloklarını ayıklamak üzere yapılandırılmış gibi görünüyor. Bu, bazı çekirdek (core) uygulamalarını erişilemez yapacak.", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Bu, muhtemelen Zend OPcache veya eAccelerator gibi bir önbellek/hızlandırıcı nedeniyle gerçekleşir.", @@ -108,13 +110,12 @@ "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "Veritabanı olarak SQLite kullanılıyor. Daha büyük kurulumlar için bunu değiştirmenizi öneririz. Farklı bir veritabanına geçiş yapmak için komut satırı aracını kullanın: 'occ db:convert-type'", "Module 'fileinfo' missing" : "Modül 'fileinfo' kayıp", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "PHP modülü 'fileinfo' kayıp. MIME türü tanıma ile en iyi sonuçları elde etmek için bu modülü etkinleştirmenizi öneririz.", - "Your PHP version is outdated" : "PHP sürümünüz eski", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "PHP sürümünüz eski. Eski sürümlerde sorun olduğundan 5.3.8 veya daha yeni bir sürüme güncellemenizi şiddetle tavsiye ederiz. Bu kurulumun da doğru çalışmaması da olasıdır.", "PHP charset is not set to UTF-8" : "PHP karakter kümesi UTF-8 olarak ayarlı değil", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "PHP karakter kümesi UTF-8 olarak ayarlı değil. Bu, dosya isimlerindeki ASCII olmayan karakterler için büyük sorunlara yol açabilir. php.ini içerisindeki 'default_charset' ayarını 'UTF-8' olarak ayarlamanızı şiddetle tavsiye ediyoruz.", "Locale not working" : "Yerel çalışmıyor", "System locale can not be set to a one which supports UTF-8." : "Sistem yereli, UTF-8 destekleyenlerden biri olarak ayarlanamadı.", "This means that there might be problems with certain characters in file names." : "Bu, dosya adlarında belirli karakterlerde problem olabileceği anlamına gelir.", + "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Şu dillerden birini desteklemesi için sisteminize gerekli paketleri kurmanızı şiddetle tavsiye ederiz: %s.", "URL generation in notification emails" : "Bildirim e-postalarında URL oluşturulması", "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 \"overwritewebroot\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Eğer kurulumunuz alan adının köküne yapılmamışsa ve sistem cron'u kullanıyorsa, URL oluşturma ile ilgili sorunlar olabilir. Bu sorunların önüne geçmek için, kurulumunuzun web kök yolundaki config.php dosyasında \"overwritewebroot\" seçeneğini ayarlayın (Önerilen: \"%s\")", "Connectivity Checks" : "Bağlantı Kontrolleri", @@ -135,7 +136,7 @@ "days" : "gün sonra dolsun", "Enforce expiration date" : "Son kullanma tarihini zorla", "Allow resharing" : "Yeniden paylaşıma izin ver", - "Restrict users to only share with users in their groups" : "Kullanıcıların sadece kendi gruplarındaki kullanıcılarla paylaşmasına sınırla", + "Restrict users to only share with users in their groups" : "Kullanıcıların, dosyaları sadece kendi gruplarındaki kullanıcılarla paylaşmasına izin ver", "Allow users to send mail notification for shared files" : "Paylaşılmış dosyalar için kullanıcıların posta bildirimi göndermesine izin ver", "Exclude groups from sharing" : "Grupları paylaşma eyleminden hariç tut", "These groups will still be able to receive shares, but not to initiate them." : "Bu gruplar hala paylaşımları alabilecek, ancak başlatamayacaktır.", @@ -163,13 +164,14 @@ "Less" : "Daha az", "Version" : "Sürüm", "Developed by the <a href=\"http://ownCloud.org/contact\" target=\"_blank\">ownCloud community</a>, the <a href=\"https://github.com/owncloud\" target=\"_blank\">source code</a> is licensed under the <a href=\"http://www.gnu.org/licenses/agpl-3.0.html\" target=\"_blank\"><abbr title=\"Affero General Public License\">AGPL</abbr></a>." : "<a href=\"http://ownCloud.org/contact\" target=\"_blank\">ownCloud topluluğu</a> tarafından geliştirilmiş olup, <a href=\"https://github.com/owncloud\" target=\"_blank\">kaynak kodu</a>, <a href=\"http://www.gnu.org/licenses/agpl-3.0.html\" target=\"_blank\"><abbr title=\"Affero General Public License\">AGPL</abbr></a> altında lisanslanmıştır.", - "More apps" : "Daha fazla Uygulama", + "More apps" : "Daha fazla uygulama", "Add your app" : "Uygulamanızı ekleyin", "by" : "oluşturan", "licensed" : "lisanslı", "Documentation:" : "Belgelendirme:", "User Documentation" : "Kullanıcı Belgelendirmesi", "Admin Documentation" : "Yönetici Belgelendirmesi", + "This app cannot be installed because the following dependencies are not fulfilled:" : "Bu uygulama, aşağıdaki bağımlılıklar sağlanmadığından yüklenemiyor:", "Update to %s" : "%s sürümüne güncelle", "Enable only for specific groups" : "Sadece belirli gruplar için etkinleştir", "Uninstall App" : "Uygulamayı Kaldır", diff --git a/settings/l10n/uk.js b/settings/l10n/uk.js index 6cdef63b2ec..e46e32c1a2e 100644 --- a/settings/l10n/uk.js +++ b/settings/l10n/uk.js @@ -110,13 +110,12 @@ OC.L10N.register( "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "В якості бази даних використовується SQLite. Для більш навантажених серверів, ми рекомендуємо користуватися іншими типами баз даних. Для зміни типу бази даних використовуйте інструмент командного рядка: 'occ db:convert-type'", "Module 'fileinfo' missing" : "Модуль 'fileinfo' відсутній", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "PHP модуль 'fileinfo' відсутній. Ми наполегливо рекомендуємо увімкнути цей модуль, щоб отримати кращі результати при виявленні MIME-типів.", - "Your PHP version is outdated" : "Ваш версія PHP застаріла", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Ваш версія PHP застаріла. Ми наполегливо рекомендуємо оновитися до версії 5.3.8 або новішої, оскільки старі версії працюють не правильно. ", "PHP charset is not set to UTF-8" : "Кодування PHP не співпадає з UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "Кодування PHP не співпадає з UTF-8. Це може викликати проблеми іменами файлів, які містять нелатинські символи. Ми наполегливо рекомендуємо змінити значення перемінної default_charset у файлі php.ini на UTF-8.", "Locale not working" : "Локалізація не працює", "System locale can not be set to a one which supports UTF-8." : "Неможливо встановити системну локаль, яка б підтримувала UTF-8.", "This means that there might be problems with certain characters in file names." : "Це означає, що можуть виникати проблеми з деякими символами в іменах файлів.", + "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Пропонуємо встановити необхідні пакети для вашої системи для підтримки однієї з наступних мов %s.", "URL generation in notification emails" : "Генерування URL для повідомлень в електроних листах", "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 \"overwritewebroot\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Якщо ваша копія ownCloud встановлена не в корені домену та використовує систему планування CRON, можливі проблеми з генерацією правильних URL. Щоб уникнути цього, встановіть опцію overwritewebroot файла config.php відповідно до теки розташування установки (Ймовірніше за все, це \"%s\")", "Connectivity Checks" : "Перевірка З'єднання", @@ -143,6 +142,8 @@ OC.L10N.register( "These groups will still be able to receive shares, but not to initiate them." : "Ці групи зможуть отримувати спільні файли, але не зможуть відправляти їх.", "Enforce HTTPS" : "Примусове застосування HTTPS", "Forces the clients to connect to %s via an encrypted connection." : "Зобов'язати клієнтів під'єднуватись до %s через шифроване з'єднання.", + "Enforce HTTPS for subdomains" : "Примусове застосувати HTTPS для піддоменів", + "Forces the clients to connect to %s and subdomains via an encrypted connection." : "Змушувати клієнтів під'єднуватися до %s та піддоменів за допомогою зашифрованого з'єднання.", "Please connect to your %s via HTTPS to enable or disable the SSL enforcement." : "Будь ласка, під'єднайтесь до цього %s за допомогою HTTPS, щоб увімкнути або вимкнути використання SSL.", "This is used for sending out notifications." : "Використовується для відсилання повідомлень.", "Send mode" : "Надіслати повідомлення", @@ -219,6 +220,7 @@ OC.L10N.register( "Create" : "Створити", "Admin Recovery Password" : "Пароль адміністратора для відновлення", "Enter the recovery password in order to recover the users files during password change" : "Введіть пароль для того, щоб відновити файли користувачів при зміні паролю", + "Search Users" : "Шукати користувачів", "Add Group" : "Додати групу", "Group" : "Група", "Everyone" : "Всі", diff --git a/settings/l10n/uk.json b/settings/l10n/uk.json index b05f4e95e32..03455e50155 100644 --- a/settings/l10n/uk.json +++ b/settings/l10n/uk.json @@ -108,13 +108,12 @@ "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "В якості бази даних використовується SQLite. Для більш навантажених серверів, ми рекомендуємо користуватися іншими типами баз даних. Для зміни типу бази даних використовуйте інструмент командного рядка: 'occ db:convert-type'", "Module 'fileinfo' missing" : "Модуль 'fileinfo' відсутній", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "PHP модуль 'fileinfo' відсутній. Ми наполегливо рекомендуємо увімкнути цей модуль, щоб отримати кращі результати при виявленні MIME-типів.", - "Your PHP version is outdated" : "Ваш версія PHP застаріла", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "Ваш версія PHP застаріла. Ми наполегливо рекомендуємо оновитися до версії 5.3.8 або новішої, оскільки старі версії працюють не правильно. ", "PHP charset is not set to UTF-8" : "Кодування PHP не співпадає з UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "Кодування PHP не співпадає з UTF-8. Це може викликати проблеми іменами файлів, які містять нелатинські символи. Ми наполегливо рекомендуємо змінити значення перемінної default_charset у файлі php.ini на UTF-8.", "Locale not working" : "Локалізація не працює", "System locale can not be set to a one which supports UTF-8." : "Неможливо встановити системну локаль, яка б підтримувала UTF-8.", "This means that there might be problems with certain characters in file names." : "Це означає, що можуть виникати проблеми з деякими символами в іменах файлів.", + "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Пропонуємо встановити необхідні пакети для вашої системи для підтримки однієї з наступних мов %s.", "URL generation in notification emails" : "Генерування URL для повідомлень в електроних листах", "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 \"overwritewebroot\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Якщо ваша копія ownCloud встановлена не в корені домену та використовує систему планування CRON, можливі проблеми з генерацією правильних URL. Щоб уникнути цього, встановіть опцію overwritewebroot файла config.php відповідно до теки розташування установки (Ймовірніше за все, це \"%s\")", "Connectivity Checks" : "Перевірка З'єднання", @@ -141,6 +140,8 @@ "These groups will still be able to receive shares, but not to initiate them." : "Ці групи зможуть отримувати спільні файли, але не зможуть відправляти їх.", "Enforce HTTPS" : "Примусове застосування HTTPS", "Forces the clients to connect to %s via an encrypted connection." : "Зобов'язати клієнтів під'єднуватись до %s через шифроване з'єднання.", + "Enforce HTTPS for subdomains" : "Примусове застосувати HTTPS для піддоменів", + "Forces the clients to connect to %s and subdomains via an encrypted connection." : "Змушувати клієнтів під'єднуватися до %s та піддоменів за допомогою зашифрованого з'єднання.", "Please connect to your %s via HTTPS to enable or disable the SSL enforcement." : "Будь ласка, під'єднайтесь до цього %s за допомогою HTTPS, щоб увімкнути або вимкнути використання SSL.", "This is used for sending out notifications." : "Використовується для відсилання повідомлень.", "Send mode" : "Надіслати повідомлення", @@ -217,6 +218,7 @@ "Create" : "Створити", "Admin Recovery Password" : "Пароль адміністратора для відновлення", "Enter the recovery password in order to recover the users files during password change" : "Введіть пароль для того, щоб відновити файли користувачів при зміні паролю", + "Search Users" : "Шукати користувачів", "Add Group" : "Додати групу", "Group" : "Група", "Everyone" : "Всі", diff --git a/settings/l10n/zh_CN.js b/settings/l10n/zh_CN.js index f68a3366103..15ff53307d3 100644 --- a/settings/l10n/zh_CN.js +++ b/settings/l10n/zh_CN.js @@ -104,8 +104,6 @@ OC.L10N.register( "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite 正在使用。我们建议大型网站切换到其他数据库。请使用命令行工具:“occ db:convert-type”迁移数据库", "Module 'fileinfo' missing" : "模块'文件信息'丢失", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "PHP模块'文件信息'丢失. 我们强烈建议启用此模块以便mime类型检测取得最佳结果.", - "Your PHP version is outdated" : "您的 PHP 版本不是最新版", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "您的 PHP 版本已过期。强烈建议更新至 5.3.8 或者更新版本因为老版本存在已知问题。本次安装可能并未正常工作。", "PHP charset is not set to UTF-8" : "PHP字符集没有设置为UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "PHP字符集没有设置为UTF-8。这会导致非ASC||字符的文件名出现乱码。我们强烈建议修改php.ini文件中的'default_charset' 的值为 'UTF-8'", "Locale not working" : "本地化无法工作", diff --git a/settings/l10n/zh_CN.json b/settings/l10n/zh_CN.json index 1b81ca42119..776ca101012 100644 --- a/settings/l10n/zh_CN.json +++ b/settings/l10n/zh_CN.json @@ -102,8 +102,6 @@ "SQLite is used as database. For larger installations we recommend to change this. To migrate to another database use the command line tool: 'occ db:convert-type'" : "SQLite 正在使用。我们建议大型网站切换到其他数据库。请使用命令行工具:“occ db:convert-type”迁移数据库", "Module 'fileinfo' missing" : "模块'文件信息'丢失", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "PHP模块'文件信息'丢失. 我们强烈建议启用此模块以便mime类型检测取得最佳结果.", - "Your PHP version is outdated" : "您的 PHP 版本不是最新版", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "您的 PHP 版本已过期。强烈建议更新至 5.3.8 或者更新版本因为老版本存在已知问题。本次安装可能并未正常工作。", "PHP charset is not set to UTF-8" : "PHP字符集没有设置为UTF-8", "PHP charset is not set to UTF-8. This can cause major issues with non-ASCII characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'." : "PHP字符集没有设置为UTF-8。这会导致非ASC||字符的文件名出现乱码。我们强烈建议修改php.ini文件中的'default_charset' 的值为 'UTF-8'", "Locale not working" : "本地化无法工作", diff --git a/settings/l10n/zh_TW.js b/settings/l10n/zh_TW.js index cc668b41086..1a2b20e3f1d 100644 --- a/settings/l10n/zh_TW.js +++ b/settings/l10n/zh_TW.js @@ -83,8 +83,6 @@ OC.L10N.register( "Setup Warning" : "設定警告", "Module 'fileinfo' missing" : "遺失 'fileinfo' 模組", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "未偵測到 PHP 模組 'fileinfo'。我們強烈建議啟用這個模組以取得最好的 mime-type 支援。", - "Your PHP version is outdated" : "您的 PHP 版本已過期", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "您的 PHP 版本已過期。我們強烈建議更新到 5.3.8 或更新的版本,因為舊的版本已知會毀損。這個可能會在安裝後無法使用。", "Locale not working" : "語系無法運作", "System locale can not be set to a one which supports UTF-8." : "系統語系無法設定只支援 UTF-8", "This means that there might be problems with certain characters in file names." : "這個意思是指在檔名中使用一些字元可能會有問題", diff --git a/settings/l10n/zh_TW.json b/settings/l10n/zh_TW.json index 0a5baf7639f..030d0f30720 100644 --- a/settings/l10n/zh_TW.json +++ b/settings/l10n/zh_TW.json @@ -81,8 +81,6 @@ "Setup Warning" : "設定警告", "Module 'fileinfo' missing" : "遺失 'fileinfo' 模組", "The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "未偵測到 PHP 模組 'fileinfo'。我們強烈建議啟用這個模組以取得最好的 mime-type 支援。", - "Your PHP version is outdated" : "您的 PHP 版本已過期", - "Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly." : "您的 PHP 版本已過期。我們強烈建議更新到 5.3.8 或更新的版本,因為舊的版本已知會毀損。這個可能會在安裝後無法使用。", "Locale not working" : "語系無法運作", "System locale can not be set to a one which supports UTF-8." : "系統語系無法設定只支援 UTF-8", "This means that there might be problems with certain characters in file names." : "這個意思是指在檔名中使用一些字元可能會有問題", diff --git a/settings/templates/admin.php b/settings/templates/admin.php index 166e36a3605..a2380a92650 100644 --- a/settings/templates/admin.php +++ b/settings/templates/admin.php @@ -83,17 +83,17 @@ if (!$_['isConnectedViaHTTPS']) { <?php } -// is htaccess working ? -if (!$_['htaccessworking']) { - ?> +// is read only config enabled +if ($_['readOnlyConfigEnabled']) { +?> <div class="section"> - <h2><?php p($l->t('Security Warning'));?></h2> + <h2><?php p($l->t('Read-Only config enabled'));?></h2> <span class="securitywarning"> - <?php p($l->t('Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root.')); ?> + <?php p($l->t('The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update.')); ?> </span> -</div> + </div> <?php } // Are doc blocks accessible? @@ -139,20 +139,6 @@ if (!$_['has_fileinfo']) { <?php } -// is PHP at least at 5.3.8? -if ($_['old_php']) { - ?> - <div class="section"> - <h2><?php p($l->t('Your PHP version is outdated'));?></h2> - - <span class="connectionwarning"> - <?php p($l->t('Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly.')); ?> - </span> - - </div> -<?php -} - // is PHP charset set to UTF8? if (!$_['isPhpCharSetUtf8']) { ?> @@ -206,7 +192,7 @@ if ($_['suggestedOverwriteWebroot']) { } ?> <div id="postsetupchecks" class="section"> - <h2><?php p($l->t('Connectivity Checks'));?></h2> + <h2><?php p($l->t('Configuration Checks'));?></h2> <div class="loading"></div> <div class="success hidden"><?php p($l->t('No problems found'));?></div> <div class="errors hidden"></div> @@ -412,7 +398,7 @@ if ($_['suggestedOverwriteWebroot']) { <p> <label for="mail_from_address"><?php p($l->t( 'From address' )); ?></label> <input type="text" name='mail_from_address' id="mail_from_address" placeholder="<?php p($l->t('mail'))?>" - value='<?php p($_['mail_from_address']) ?>' /> + value='<?php p($_['mail_from_address']) ?>' />@ <input type="text" name='mail_domain' id="mail_domain" placeholder="example.com" value='<?php p($_['mail_domain']) ?>' /> </p> diff --git a/settings/templates/apps.php b/settings/templates/apps.php index 1ad37000f39..3bb0d45f582 100644 --- a/settings/templates/apps.php +++ b/settings/templates/apps.php @@ -51,6 +51,15 @@ {{/if}} </p> {{/if}} + {{#unless canInstall}} + <div><?php p($l->t('This app cannot be installed because the following dependencies are not fulfilled:')); ?></div> + <ul class="missing-dependencies"> + {{#each missingDependencies}} + <li>{{this}}</li> + {{/each}} + </ul> + {{/unless}} + {{#if update}} <input class="update" type="submit" value="<?php p($l->t('Update to %s', array('{{update}}'))); ?>" data-appid="{{id}}" /> {{/if}} @@ -61,8 +70,10 @@ <br /> <input type="hidden" id="group_select" title="<?php p($l->t('All')); ?>" style="width: 200px"> {{else}} + {{#if canInstall}} <input class="enable" type="submit" data-appid="{{id}}" data-active="false" value="<?php p($l->t("Enable"));?>"/> {{/if}} + {{/if}} {{#if canUnInstall}} <input class="uninstall" type="submit" value="<?php p($l->t('Uninstall App')); ?>" data-appid="{{id}}" /> {{/if}} diff --git a/tests/core/lostpassword/controller/lostcontrollertest.php b/tests/core/lostpassword/controller/lostcontrollertest.php index 5da9e5ce48d..2ed7692a32f 100644 --- a/tests/core/lostpassword/controller/lostcontrollertest.php +++ b/tests/core/lostpassword/controller/lostcontrollertest.php @@ -102,6 +102,14 @@ class LostControllerTest extends \PHPUnit_Framework_TestCase { } public function testEmailSuccessful() { + /** + * FIXME: Disable test for systems where no sendmail is available since code is static. + * @link https://github.com/owncloud/core/pull/12085 + */ + if (is_null(\OC_Helper::findBinaryPath('sendmail'))) { + $this->markTestSkipped('sendmail is not available'); + } + $randomToken = $this->container['SecureRandom']; $this->container['SecureRandom'] ->expects($this->once()) diff --git a/tests/data/app/expected-info.json b/tests/data/app/expected-info.json new file mode 100644 index 00000000000..fc0ab224977 --- /dev/null +++ b/tests/data/app/expected-info.json @@ -0,0 +1,49 @@ +{ + "info": [], + "remote": [], + "public": [], + "id": "files_encryption", + "name": "Server-side Encryption", + "description": "\n\tThis application encrypts all files accessed by ownCloud at rest, wherever they are stored. As an example, with this application enabled, external cloud based Amazon S3 storage will be encrypted, protecting this data on storage outside of the control of the Admin. When this application is enabled for the first time, all files are encrypted as users log in and are prompted for their password. The recommended recovery key option enables recovery of files in case the key is lost. \n\tNote that this app encrypts all files that are touched by ownCloud, so external storage providers and applications such as SharePoint will see new files encrypted when they are accessed. Encryption is based on AES 128 or 256 bit keys. More information is available in the Encryption documentation \n\t", + "licence": "AGPL", + "author": "Sam Tuke, Bjoern Schiessle, Florin Peter", + "requiremin": "4", + "shipped": "true", + "documentation": { + "user": "https://docs.example.com/server/go.php?to=user-encryption", + "admin": "https://docs.example.com/server/go.php?to=admin-encryption" + }, + "rememberlogin": "false", + "types": ["filesystem"], + "ocsid": "166047", + "dependencies": { + "php": { + "@attributes" : { + "min-version": "5.4", + "max-version": "5.5" + } + }, + "database": [ + { + "@attributes" : { + "min-version": "3.0" + }, + "@value": "sqlite"}, + "mysql" + ], + "command": [ + { + "@attributes" : { + "os": "linux" + }, + "@value": "grep" + }, + { + "@attributes" : { + "os": "windows" + }, + "@value": "notepad.exe" + } + ] + } +} diff --git a/tests/data/app/invalid-info.xml b/tests/data/app/invalid-info.xml new file mode 100644 index 00000000000..3947f5420c2 --- /dev/null +++ b/tests/data/app/invalid-info.xml @@ -0,0 +1,22 @@ +<?xml version="1.0"?> +<info + <id>files_encryption</id> + <name>Server-side Encryption</name> + <description> + This application encrypts all files accessed by ownCloud at rest, wherever they are stored. As an example, with this application enabled, external cloud based Amazon S3 storage will be encrypted, protecting this data on storage outside of the control of the Admin. When this application is enabled for the first time, all files are encrypted as users log in and are prompted for their password. The recommended recovery key option enables recovery of files in case the key is lost. + Note that this app encrypts all files that are touched by ownCloud, so external storage providers and applications such as SharePoint will see new files encrypted when they are accessed. Encryption is based on AES 128 or 256 bit keys. More information is available in the Encryption documentation + </description> + <licence>AGPL</licence> + <author>Sam Tuke, Bjoern Schiessle, Florin Peter</author> + <requiremin>4</requiremin> + <shipped>true</shipped> + <documentation> + <user>user-encryption</user> + <admin>admin-encryption</admin> + </documentation> + <rememberlogin>false</rememberlogin> + <types> + <filesystem/> + </types> + <ocsid>166047</ocsid> +</info> diff --git a/tests/data/app/valid-info.xml b/tests/data/app/valid-info.xml new file mode 100644 index 00000000000..f01f5fd55ea --- /dev/null +++ b/tests/data/app/valid-info.xml @@ -0,0 +1,29 @@ +<?xml version="1.0"?> +<info> + <id>files_encryption</id> + <name>Server-side Encryption</name> + <description> + This application encrypts all files accessed by ownCloud at rest, wherever they are stored. As an example, with this application enabled, external cloud based Amazon S3 storage will be encrypted, protecting this data on storage outside of the control of the Admin. When this application is enabled for the first time, all files are encrypted as users log in and are prompted for their password. The recommended recovery key option enables recovery of files in case the key is lost. + Note that this app encrypts all files that are touched by ownCloud, so external storage providers and applications such as SharePoint will see new files encrypted when they are accessed. Encryption is based on AES 128 or 256 bit keys. More information is available in the Encryption documentation + </description> + <licence>AGPL</licence> + <author>Sam Tuke, Bjoern Schiessle, Florin Peter</author> + <requiremin>4</requiremin> + <shipped>true</shipped> + <documentation> + <user>user-encryption</user> + <admin>admin-encryption</admin> + </documentation> + <rememberlogin>false</rememberlogin> + <types> + <filesystem/> + </types> + <ocsid>166047</ocsid> + <dependencies> + <php min-version="5.4" max-version="5.5"/> + <database min-version="3.0">sqlite</database> + <database>mysql</database> + <command os="linux">grep</command> + <command os="windows">notepad.exe</command> + </dependencies> +</info> diff --git a/tests/enable_all.php b/tests/enable_all.php index 2368a194944..d6c3184edd6 100644 --- a/tests/enable_all.php +++ b/tests/enable_all.php @@ -19,7 +19,6 @@ function enableApp($app) { enableApp('files_sharing'); enableApp('files_trashbin'); enableApp('files_encryption'); -enableApp('files_external'); enableApp('user_ldap'); enableApp('files_versions'); diff --git a/tests/lib/activitymanager.php b/tests/lib/activitymanager.php index 85f8320de09..0683eb68193 100644 --- a/tests/lib/activitymanager.php +++ b/tests/lib/activitymanager.php @@ -87,11 +87,14 @@ class Test_ActivityManager extends \Test\TestCase { } public function testQueryForFilter() { + $this->activityManager->registerExtension(function() { + return new SimpleExtension(); + }); $result = $this->activityManager->getQueryForFilter('filter1'); $this->assertEquals( array( - '`app` = ? and `message` like ?', - array('mail', 'ownCloud%') + ' and ((`app` = ? and `message` like ?) or (`app` = ? and `message` like ?))', + array('mail', 'ownCloud%', 'mail', 'ownCloud%') ), $result ); diff --git a/tests/lib/api.php b/tests/lib/api.php index bf9748a6040..3b925a63960 100644 --- a/tests/lib/api.php +++ b/tests/lib/api.php @@ -17,7 +17,7 @@ class Test_API extends \Test\TestCase { return array( 'shipped' => $shipped, 'response' => new OC_OCS_Result($data, $code, $message), - 'app' => uniqid('testapp_', true), + 'app' => $this->getUniqueID('testapp_'), ); } diff --git a/tests/lib/app/dependencyanalyzer.php b/tests/lib/app/dependencyanalyzer.php new file mode 100644 index 00000000000..7d06842e8ad --- /dev/null +++ b/tests/lib/app/dependencyanalyzer.php @@ -0,0 +1,109 @@ +<?php + +/** + * @author Thomas Müller + * @copyright 2014 Thomas Müller deepdiver@owncloud.com + * later. + * See the COPYING-README file. + */ + +namespace Test\App; + +use OC; +use OC\App\Platform; +use OCP\IL10N; + +class DependencyAnalyzer extends \PHPUnit_Framework_TestCase { + + /** + * @var Platform + */ + private $platformMock; + + /** + * @var IL10N + */ + private $l10nMock; + + public function setUp() { + $this->platformMock = $this->getMockBuilder('\OC\App\Platform') + ->disableOriginalConstructor() + ->getMock(); + $this->platformMock->expects($this->any()) + ->method('getPhpVersion') + ->will( $this->returnValue('5.4.3')); + $this->platformMock->expects($this->any()) + ->method('getDatabase') + ->will( $this->returnValue('mysql')); + $this->l10nMock = $this->getMockBuilder('\OCP\IL10N') + ->disableOriginalConstructor() + ->getMock(); + $this->l10nMock->expects($this->any()) + ->method('t') + ->will($this->returnCallback(function($text, $parameters = array()) { + return vsprintf($text, $parameters); + })); + } + + /** + * @dataProvider providesPhpVersion + */ + public function testPhpVersion($expectedMissing, $minVersion, $maxVersion) { + $app = array( + 'dependencies' => array( + 'php' => array() + ) + ); + if (!is_null($minVersion)) { + $app['dependencies']['php']['@attributes']['min-version'] = $minVersion; + } + if (!is_null($maxVersion)) { + $app['dependencies']['php']['@attributes']['max-version'] = $maxVersion; + } + $analyser = new \OC\App\DependencyAnalyzer($app, $this->platformMock, $this->l10nMock); + $missing = $analyser->analyze(); + + $this->assertTrue(is_array($missing)); + $this->assertEquals(count($expectedMissing), count($missing)); + $this->assertEquals($expectedMissing, $missing); + } + + /** + * @dataProvider providesDatabases + */ + public function testDatabases($expectedMissing, $databases) { + $app = array( + 'dependencies' => array( + ) + ); + if (!is_null($databases)) { + $app['dependencies']['database'] = $databases; + } + $analyser = new \OC\App\DependencyAnalyzer($app, $this->platformMock, $this->l10nMock); + $missing = $analyser->analyze(); + + $this->assertTrue(is_array($missing)); + $this->assertEquals(count($expectedMissing), count($missing)); + $this->assertEquals($expectedMissing, $missing); + } + + function providesDatabases() { + return array( + // non BC - in case on databases are defined -> all are supported + array(array(), null), + array(array(), array()), + array(array('Following databases are supported: sqlite, postgres'), array('sqlite', array('@value' => 'postgres'))), + ); + } + + function providesPhpVersion() { + return array( + array(array(), null, null), + array(array(), '5.4', null), + array(array(), null, '5.5'), + array(array(), '5.4', '5.5'), + array(array('PHP 5.4.4 or higher is required.'), '5.4.4', null), + array(array('PHP with a version less then 5.4.2 is required.'), null, '5.4.2'), + ); + } +} diff --git a/tests/lib/app/infoparser.php b/tests/lib/app/infoparser.php new file mode 100644 index 00000000000..13c0b51e117 --- /dev/null +++ b/tests/lib/app/infoparser.php @@ -0,0 +1,61 @@ +<?php + +/** + * @author Thomas Müller + * @copyright 2014 Thomas Müller deepdiver@owncloud.com + * later. + * See the COPYING-README file. + */ + +namespace Test\App; + +use OC; + +class InfoParser extends \PHPUnit_Framework_TestCase { + + /** + * @var \OC\App\InfoParser + */ + private $parser; + + public function setUp() { + $config = $this->getMockBuilder('\OC\AllConfig') + ->disableOriginalConstructor()->getMock(); + $httpHelper = $this->getMockBuilder('\OC\HTTPHelper') + ->setConstructorArgs(array($config)) + ->setMethods(array('getHeaders')) + ->getMock(); + $urlGenerator = $this->getMockBuilder('\OCP\IURLGenerator') + ->disableOriginalConstructor() + ->getMock(); + + //linkToDocs + $urlGenerator->expects($this->any()) + ->method('linkToDocs') + ->will($this->returnCallback(function ($url) { + return "https://docs.example.com/server/go.php?to=$url"; + })); + + $this->parser = new \OC\App\InfoParser($httpHelper, $urlGenerator); + } + + /** + * @dataProvider providesInfoXml + */ + public function testParsingValidXml($expectedJson, $xmlFile) { + $expectedData = null; + if (!is_null($expectedJson)) { + $expectedData = json_decode(file_get_contents(OC::$SERVERROOT . "/tests/data/app/$expectedJson"), true); + } + $data = $this->parser->parse(OC::$SERVERROOT. "/tests/data/app/$xmlFile"); + + $this->assertEquals($expectedData, $data); + } + + function providesInfoXml() { + return array( + array('expected-info.json', 'valid-info.xml'), + array(null, 'invalid-info.xml'), + ); + } +} diff --git a/tests/lib/appframework/AppTest.php b/tests/lib/appframework/AppTest.php index bd565e9765e..86128db118f 100644 --- a/tests/lib/appframework/AppTest.php +++ b/tests/lib/appframework/AppTest.php @@ -63,7 +63,7 @@ class AppTest extends \Test\TestCase { public function testControllerNameAndMethodAreBeingPassed(){ - $return = array(null, array(), null); + $return = array(null, array(), array(), null); $this->dispatcher->expects($this->once()) ->method('dispatch') ->with($this->equalTo($this->controller), diff --git a/tests/lib/appframework/controller/ControllerTest.php b/tests/lib/appframework/controller/ControllerTest.php index d186651dc23..18d47d00f6b 100644 --- a/tests/lib/appframework/controller/ControllerTest.php +++ b/tests/lib/appframework/controller/ControllerTest.php @@ -173,7 +173,8 @@ class ControllerTest extends \Test\TestCase { public function testFormatDataResponseJSON() { $expectedHeaders = array( 'test' => 'something', - 'Cache-Control' => 'no-cache, must-revalidate' + 'Cache-Control' => 'no-cache, must-revalidate', + 'Content-Type' => 'application/json; charset=utf-8' ); $response = $this->controller->customDataResponse(array('hi')); diff --git a/tests/lib/appframework/http/DispatcherTest.php b/tests/lib/appframework/http/DispatcherTest.php index f92e7161e6b..3933e00804b 100644 --- a/tests/lib/appframework/http/DispatcherTest.php +++ b/tests/lib/appframework/http/DispatcherTest.php @@ -227,15 +227,11 @@ class DispatcherTest extends \Test\TestCase { $this->assertEquals($httpHeaders, $response[0]); $this->assertEquals($responseHeaders, $response[1]); - $this->assertEquals($out, $response[2]); + $this->assertEquals($out, $response[3]); } public function testExceptionCallsAfterException() { - // TODO fails on PHP 5.3 - if (version_compare(PHP_VERSION, '5.4.0', '<')) { - $this->markTestSkipped('Fails on PHP 5.3'); - } $out = 'yo'; $httpHeaders = 'Http'; $responseHeaders = array('hell' => 'yeah'); @@ -246,15 +242,11 @@ class DispatcherTest extends \Test\TestCase { $this->assertEquals($httpHeaders, $response[0]); $this->assertEquals($responseHeaders, $response[1]); - $this->assertEquals($out, $response[2]); + $this->assertEquals($out, $response[3]); } public function testExceptionThrowsIfCanNotBeHandledByAfterException() { - // TODO fails on PHP 5.3 and crashed travis (10 minute timeout) - if (version_compare(PHP_VERSION, '5.4.0', '<')) { - $this->markTestSkipped('Fails on PHP 5.3 and causes infinite loop - travis fails after 10 minute timeout'); - } $out = 'yo'; $httpHeaders = 'Http'; $responseHeaders = array('hell' => 'yeah'); @@ -301,7 +293,7 @@ class DispatcherTest extends \Test\TestCase { $this->dispatcherPassthrough(); $response = $this->dispatcher->dispatch($controller, 'exec'); - $this->assertEquals('[3,true,4,1]', $response[2]); + $this->assertEquals('[3,true,4,1]', $response[3]); } @@ -324,7 +316,7 @@ class DispatcherTest extends \Test\TestCase { $this->dispatcherPassthrough(); $response = $this->dispatcher->dispatch($controller, 'exec'); - $this->assertEquals('[3,true,4,7]', $response[2]); + $this->assertEquals('[3,true,4,7]', $response[3]); } @@ -350,7 +342,7 @@ class DispatcherTest extends \Test\TestCase { $this->dispatcherPassthrough(); $response = $this->dispatcher->dispatch($controller, 'exec'); - $this->assertEquals('{"text":[3,false,4,1]}', $response[2]); + $this->assertEquals('{"text":[3,false,4,1]}', $response[3]); } @@ -375,7 +367,7 @@ class DispatcherTest extends \Test\TestCase { $this->dispatcherPassthrough(); $response = $this->dispatcher->dispatch($controller, 'execDataResponse'); - $this->assertEquals('{"text":[3,false,4,1]}', $response[2]); + $this->assertEquals('{"text":[3,false,4,1]}', $response[3]); } @@ -401,7 +393,7 @@ class DispatcherTest extends \Test\TestCase { $this->dispatcherPassthrough(); $response = $this->dispatcher->dispatch($controller, 'exec'); - $this->assertEquals('{"text":[3,false,4,1]}', $response[2]); + $this->assertEquals('{"text":[3,false,4,1]}', $response[3]); } @@ -429,7 +421,7 @@ class DispatcherTest extends \Test\TestCase { $this->dispatcherPassthrough(); $response = $this->dispatcher->dispatch($controller, 'exec'); - $this->assertEquals('{"text":[3,true,4,1]}', $response[2]); + $this->assertEquals('{"text":[3,true,4,1]}', $response[3]); } diff --git a/tests/lib/appframework/http/ResponseTest.php b/tests/lib/appframework/http/ResponseTest.php index 04e19fdaf71..b4352348bae 100644 --- a/tests/lib/appframework/http/ResponseTest.php +++ b/tests/lib/appframework/http/ResponseTest.php @@ -76,6 +76,92 @@ class ResponseTest extends \Test\TestCase { } + public function testAddCookie() { + $this->childResponse->addCookie('foo', 'bar'); + $this->childResponse->addCookie('bar', 'foo', new \DateTime('1970-01-01')); + + $expectedResponse = array( + 'foo' => array( + 'value' => 'bar', + 'expireDate' => null, + ), + 'bar' => array( + 'value' => 'foo', + 'expireDate' => new \DateTime('1970-01-01') + ) + ); + $this->assertEquals($expectedResponse, $this->childResponse->getCookies()); + } + + + function testSetCookies() { + $expected = array( + 'foo' => array( + 'value' => 'bar', + 'expireDate' => null, + ), + 'bar' => array( + 'value' => 'foo', + 'expireDate' => new \DateTime('1970-01-01') + ) + ); + + $this->childResponse->setCookies($expected); + $cookies = $this->childResponse->getCookies(); + + $this->assertEquals($expected, $cookies); + } + + + function testInvalidateCookie() { + $this->childResponse->addCookie('foo', 'bar'); + $this->childResponse->invalidateCookie('foo'); + $expected = array( + 'foo' => array( + 'value' => 'expired', + 'expireDate' => new \DateTime('1971-01-01') + ) + ); + + $cookies = $this->childResponse->getCookies(); + + $this->assertEquals($expected, $cookies); + } + + + function testInvalidateCookies() { + $this->childResponse->addCookie('foo', 'bar'); + $this->childResponse->addCookie('bar', 'foo'); + $expected = array( + 'foo' => array( + 'value' => 'bar', + 'expireDate' => null + ), + 'bar' => array( + 'value' => 'foo', + 'expireDate' => null + ) + ); + $cookies = $this->childResponse->getCookies(); + $this->assertEquals($expected, $cookies); + + $this->childResponse->invalidateCookies(array('foo', 'bar')); + $expected = array( + 'foo' => array( + 'value' => 'expired', + 'expireDate' => new \DateTime('1971-01-01') + ), + 'bar' => array( + 'value' => 'expired', + 'expireDate' => new \DateTime('1971-01-01') + ) + ); + + $cookies = $this->childResponse->getCookies(); + $this->assertEquals($expected, $cookies); + } + + public function testRenderReturnNullByDefault(){ $this->assertEquals(null, $this->childResponse->render()); } diff --git a/tests/lib/appframework/routing/RoutingTest.php b/tests/lib/appframework/routing/RoutingTest.php index 276307680af..4ee3ed58807 100644 --- a/tests/lib/appframework/routing/RoutingTest.php +++ b/tests/lib/appframework/routing/RoutingTest.php @@ -54,6 +54,15 @@ class RoutingTest extends \Test\TestCase $this->assertSimpleRoute($routes, 'folders.open', 'DELETE', '/folders/{folderId}/open', 'FoldersController', 'open', array(), array('param' => 'foobar')); } + public function testSimpleRouteWithPostfix() + { + $routes = array('routes' => array( + array('name' => 'folders#open', 'url' => '/folders/{folderId}/open', 'verb' => 'delete', 'postfix' => '_something') + )); + + $this->assertSimpleRoute($routes, 'folders.open', 'DELETE', '/folders/{folderId}/open', 'FoldersController', 'open', array(), array(), '_something'); + } + /** * @expectedException \UnexpectedValueException @@ -104,8 +113,12 @@ class RoutingTest extends \Test\TestCase * @param string $controllerName * @param string $actionName */ - private function assertSimpleRoute($routes, $name, $verb, $url, $controllerName, $actionName, array $requirements=array(), array $defaults=array()) + private function assertSimpleRoute($routes, $name, $verb, $url, $controllerName, $actionName, array $requirements=array(), array $defaults=array(), $postfix='') { + if ($postfix) { + $name .= $postfix; + } + // route mocks $route = $this->mockRoute($verb, $controllerName, $actionName, $requirements, $defaults); diff --git a/tests/lib/connector/sabre/file.php b/tests/lib/connector/sabre/file.php index cfc6e29ae74..b4fdd91f512 100644 --- a/tests/lib/connector/sabre/file.php +++ b/tests/lib/connector/sabre/file.php @@ -23,7 +23,7 @@ class Test_OC_Connector_Sabre_File extends \Test\TestCase { ->will($this->returnValue('/test.txt')); $info = new \OC\Files\FileInfo('/test.txt', null, null, array( - 'permissions'=>\OCP\PERMISSION_ALL + 'permissions'=>\OCP\Constants::PERMISSION_ALL )); $file = new OC_Connector_Sabre_File($view, $info); @@ -58,7 +58,7 @@ class Test_OC_Connector_Sabre_File extends \Test\TestCase { $_SERVER['REQUEST_METHOD'] = 'PUT'; $info = new \OC\Files\FileInfo('/test.txt', null, null, array( - 'permissions' => \OCP\PERMISSION_ALL + 'permissions' => \OCP\Constants::PERMISSION_ALL )); $file = new OC_Connector_Sabre_File($view, $info); @@ -82,7 +82,7 @@ class Test_OC_Connector_Sabre_File extends \Test\TestCase { ->will($this->returnValue('/super*star.txt')); $info = new \OC\Files\FileInfo('/super*star.txt', null, null, array( - 'permissions' => \OCP\PERMISSION_ALL + 'permissions' => \OCP\Constants::PERMISSION_ALL )); $file = new OC_Connector_Sabre_File($view, $info); @@ -103,7 +103,7 @@ class Test_OC_Connector_Sabre_File extends \Test\TestCase { ->will($this->returnValue('/super*star.txt')); $info = new \OC\Files\FileInfo('/super*star.txt', null, null, array( - 'permissions' => \OCP\PERMISSION_ALL + 'permissions' => \OCP\Constants::PERMISSION_ALL )); $file = new OC_Connector_Sabre_File($view, $info); $file->setName('/super*star.txt'); @@ -135,7 +135,7 @@ class Test_OC_Connector_Sabre_File extends \Test\TestCase { $_SERVER['REQUEST_METHOD'] = 'PUT'; $info = new \OC\Files\FileInfo('/test.txt', null, null, array( - 'permissions' => \OCP\PERMISSION_ALL + 'permissions' => \OCP\Constants::PERMISSION_ALL )); $file = new OC_Connector_Sabre_File($view, $info); @@ -157,7 +157,7 @@ class Test_OC_Connector_Sabre_File extends \Test\TestCase { ->will($this->returnValue(true)); $info = new \OC\Files\FileInfo('/test.txt', null, null, array( - 'permissions' => \OCP\PERMISSION_ALL + 'permissions' => \OCP\Constants::PERMISSION_ALL )); $file = new OC_Connector_Sabre_File($view, $info); @@ -198,7 +198,7 @@ class Test_OC_Connector_Sabre_File extends \Test\TestCase { ->will($this->returnValue(false)); $info = new \OC\Files\FileInfo('/test.txt', null, null, array( - 'permissions' => \OCP\PERMISSION_ALL + 'permissions' => \OCP\Constants::PERMISSION_ALL )); $file = new OC_Connector_Sabre_File($view, $info); diff --git a/tests/lib/connector/sabre/node.php b/tests/lib/connector/sabre/node.php index 9a2bf41bd19..1e927deed44 100644 --- a/tests/lib/connector/sabre/node.php +++ b/tests/lib/connector/sabre/node.php @@ -15,15 +15,15 @@ use OC\Files\View; class Node extends \Test\TestCase { public function davPermissionsProvider() { return array( - array(\OCP\PERMISSION_ALL, 'file', false, false, 'RDNVW'), - array(\OCP\PERMISSION_ALL, 'dir', false, false, 'RDNVCK'), - array(\OCP\PERMISSION_ALL, 'file', true, false, 'SRDNVW'), - array(\OCP\PERMISSION_ALL, 'file', true, true, 'SRMDNVW'), - array(\OCP\PERMISSION_ALL - \OCP\PERMISSION_SHARE, 'file', true, false, 'SDNVW'), - array(\OCP\PERMISSION_ALL - \OCP\PERMISSION_UPDATE, 'file', false, false, 'RDNV'), - array(\OCP\PERMISSION_ALL - \OCP\PERMISSION_DELETE, 'file', false, false, 'RW'), - array(\OCP\PERMISSION_ALL - \OCP\PERMISSION_CREATE, 'file', false, false, 'RDNVW'), - array(\OCP\PERMISSION_ALL - \OCP\PERMISSION_CREATE, 'dir', false, false, 'RDNV'), + array(\OCP\Constants::PERMISSION_ALL, 'file', false, false, 'RDNVW'), + array(\OCP\Constants::PERMISSION_ALL, 'dir', false, false, 'RDNVCK'), + array(\OCP\Constants::PERMISSION_ALL, 'file', true, false, 'SRDNVW'), + array(\OCP\Constants::PERMISSION_ALL, 'file', true, true, 'SRMDNVW'), + array(\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_SHARE, 'file', true, false, 'SDNVW'), + array(\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_UPDATE, 'file', false, false, 'RDNV'), + array(\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_DELETE, 'file', false, false, 'RW'), + array(\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_CREATE, 'file', false, false, 'RDNVW'), + array(\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_CREATE, 'dir', false, false, 'RDNV'), ); } diff --git a/tests/lib/db.php b/tests/lib/db.php index a401aded62a..aefbb3624ed 100644 --- a/tests/lib/db.php +++ b/tests/lib/db.php @@ -265,7 +265,7 @@ class Test_DB extends \Test\TestCase { protected function insertCardData($fullname, $uri) { $query = OC_DB::prepare("INSERT INTO `*PREFIX*{$this->table2}` (`fullname`, `uri`, `carddata`) VALUES (?, ?, ?)"); - $this->assertSame(1, $query->execute(array($fullname, $uri, uniqid()))); + $this->assertSame(1, $query->execute(array($fullname, $uri, $this->getUniqueID()))); } protected function updateCardData($fullname, $uri) { diff --git a/tests/lib/db/migrator.php b/tests/lib/db/migrator.php index 7acd3382fe2..1a1d530f1d2 100644 --- a/tests/lib/db/migrator.php +++ b/tests/lib/db/migrator.php @@ -39,7 +39,7 @@ class Migrator extends \Test\TestCase { $this->markTestSkipped('DB migration tests are not supported on MSSQL'); } $this->manager = new \OC\DB\MDB2SchemaManager($this->connection); - $this->tableName = 'test_' . uniqid(); + $this->tableName = strtolower($this->getUniqueID('test_')); } protected function tearDown() { diff --git a/tests/lib/db/mysqlmigration.php b/tests/lib/db/mysqlmigration.php index 70199147760..6c283e6c59c 100644 --- a/tests/lib/db/mysqlmigration.php +++ b/tests/lib/db/mysqlmigration.php @@ -23,7 +23,7 @@ class TestMySqlMigration extends \Test\TestCase { } $dbPrefix = \OC::$server->getConfig()->getSystemValue("dbtableprefix"); - $this->tableName = uniqid($dbPrefix . "_enum_bit_test"); + $this->tableName = $this->getUniqueID($dbPrefix . '_enum_bit_test'); $this->connection->exec("CREATE TABLE $this->tableName(b BIT, e ENUM('1','2','3','4'))"); } diff --git a/tests/lib/db/sqlitemigration.php b/tests/lib/db/sqlitemigration.php index e3d0e386ab5..9206381ff71 100644 --- a/tests/lib/db/sqlitemigration.php +++ b/tests/lib/db/sqlitemigration.php @@ -23,7 +23,7 @@ class TestSqliteMigration extends \Test\TestCase { } $dbPrefix = \OC::$server->getConfig()->getSystemValue("dbtableprefix"); - $this->tableName = uniqid($dbPrefix . "_enum_bit_test"); + $this->tableName = $this->getUniqueID($dbPrefix . '_enum_bit_test'); $this->connection->exec("CREATE TABLE $this->tableName(t0 tinyint unsigned, t1 tinyint)"); } diff --git a/tests/lib/files/cache/cache.php b/tests/lib/files/cache/cache.php index 02c45a16571..7360e9885c1 100644 --- a/tests/lib/files/cache/cache.php +++ b/tests/lib/files/cache/cache.php @@ -20,20 +20,20 @@ class Cache extends \Test\TestCase { /** * @var \OC\Files\Storage\Temporary $storage ; */ - private $storage; + protected $storage; /** * @var \OC\Files\Storage\Temporary $storage2 ; */ - private $storage2; + protected $storage2; /** * @var \OC\Files\Cache\Cache $cache */ - private $cache; + protected $cache; /** * @var \OC\Files\Cache\Cache $cache2 */ - private $cache2; + protected $cache2; public function testSimple() { $file1 = 'foo'; diff --git a/tests/lib/files/cache/updaterlegacy.php b/tests/lib/files/cache/updaterlegacy.php index 7c05800cd6b..7cf4dc6df5f 100644 --- a/tests/lib/files/cache/updaterlegacy.php +++ b/tests/lib/files/cache/updaterlegacy.php @@ -58,7 +58,7 @@ class UpdaterLegacy extends \Test\TestCase { $this->originalStorage = Filesystem::getStorage('/'); Filesystem::tearDown(); if (!self::$user) { - self::$user = uniqid(); + self::$user = $this->getUniqueID(); } \OC_User::createUser(self::$user, 'password'); diff --git a/tests/lib/files/cache/wrapper/cachejail.php b/tests/lib/files/cache/wrapper/cachejail.php new file mode 100644 index 00000000000..13f3dc8858e --- /dev/null +++ b/tests/lib/files/cache/wrapper/cachejail.php @@ -0,0 +1,67 @@ +<?php +/** + * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace Test\Files\Cache\Wrapper; + +use Test\Files\Cache\Cache; + +class CacheJail extends Cache { + /** + * @var \OC\Files\Cache\Cache $sourceCache + */ + protected $sourceCache; + + public function setUp() { + parent::setUp(); + $this->storage->mkdir('foo'); + $this->sourceCache = $this->cache; + $this->cache = new \OC\Files\Cache\Wrapper\CacheJail($this->sourceCache, 'foo'); + } + + function testSearchOutsideJail() { + $file1 = 'foo/foobar'; + $file2 = 'folder/foobar'; + $data1 = array('size' => 100, 'mtime' => 50, 'mimetype' => 'foo/folder'); + + $this->sourceCache->put($file1, $data1); + $this->sourceCache->put($file2, $data1); + + $this->assertCount(2, $this->sourceCache->search('%foobar')); + + $result = $this->cache->search('%foobar%'); + $this->assertCount(1, $result); + $this->assertEquals('foobar', $result[0]['path']); + } + + function testClearKeepEntriesOutsideJail() { + $file1 = 'foo/foobar'; + $file2 = 'foo/foobar/asd'; + $file3 = 'folder/foobar'; + $data1 = array('size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory'); + + $this->sourceCache->put('foo', $data1); + $this->sourceCache->put($file1, $data1); + $this->sourceCache->put($file2, $data1); + $this->sourceCache->put($file3, $data1); + + $this->cache->clear(); + + $this->assertFalse($this->cache->inCache('foobar')); + $this->assertTrue($this->sourceCache->inCache('folder/foobar')); + } + + function testGetById() { + //not supported + $this->assertTrue(true); + } + + function testGetIncomplete() { + //not supported + $this->assertTrue(true); + } +} diff --git a/tests/lib/files/cache/wrapper/cachepermissionsmask.php b/tests/lib/files/cache/wrapper/cachepermissionsmask.php new file mode 100644 index 00000000000..72fd22741d3 --- /dev/null +++ b/tests/lib/files/cache/wrapper/cachepermissionsmask.php @@ -0,0 +1,94 @@ +<?php +/** + * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace Test\Files\Cache\Wrapper; + +use OCP\Constants; +use Test\Files\Cache\Cache; + +class CachePermissionsMask extends Cache { + /** + * @var \OC\Files\Cache\Cache $sourceCache + */ + protected $sourceCache; + + public function setUp() { + parent::setUp(); + $this->storage->mkdir('foo'); + $this->sourceCache = $this->cache; + $this->cache = $this->getMaskedCached(Constants::PERMISSION_ALL); + } + + protected function getMaskedCached($mask) { + return new \OC\Files\Cache\Wrapper\CachePermissionsMask($this->sourceCache, $mask); + } + + public function maskProvider() { + return array( + array(Constants::PERMISSION_ALL), + array(Constants::PERMISSION_ALL - Constants::PERMISSION_SHARE), + array(Constants::PERMISSION_ALL - Constants::PERMISSION_UPDATE), + array(Constants::PERMISSION_READ) + ); + } + + /** + * @dataProvider maskProvider + * @param int $mask + */ + public function testGetMasked($mask) { + $cache = $this->getMaskedCached($mask); + $data = array('size' => 100, 'mtime' => 50, 'mimetype' => 'text/plain', 'permissions' => Constants::PERMISSION_ALL); + $this->sourceCache->put('foo', $data); + $result = $cache->get('foo'); + $this->assertEquals($mask, $result['permissions']); + + $data = array('size' => 100, 'mtime' => 50, 'mimetype' => 'text/plain', 'permissions' => Constants::PERMISSION_ALL - Constants::PERMISSION_DELETE); + $this->sourceCache->put('bar', $data); + $result = $cache->get('bar'); + $this->assertEquals($mask & ~Constants::PERMISSION_DELETE, $result['permissions']); + } + + /** + * @dataProvider maskProvider + * @param int $mask + */ + public function testGetFolderContentMasked($mask) { + $this->storage->mkdir('foo'); + $this->storage->file_put_contents('foo/bar', 'asd'); + $this->storage->file_put_contents('foo/asd', 'bar'); + $this->storage->getScanner()->scan(''); + + $cache = $this->getMaskedCached($mask); + $files = $cache->getFolderContents('foo'); + $this->assertCount(2, $files); + + foreach ($files as $file) { + $this->assertEquals($mask & ~Constants::PERMISSION_CREATE, $file['permissions']); + } + } + + /** + * @dataProvider maskProvider + * @param int $mask + */ + public function testSearchMasked($mask) { + $this->storage->mkdir('foo'); + $this->storage->file_put_contents('foo/bar', 'asd'); + $this->storage->file_put_contents('foo/foobar', 'bar'); + $this->storage->getScanner()->scan(''); + + $cache = $this->getMaskedCached($mask); + $files = $cache->search('%bar'); + $this->assertCount(2, $files); + + foreach ($files as $file) { + $this->assertEquals($mask & ~Constants::PERMISSION_CREATE, $file['permissions']); + } + } +} diff --git a/tests/lib/files/filesystem.php b/tests/lib/files/filesystem.php index 746600c7d15..1b84db0fc0d 100644 --- a/tests/lib/files/filesystem.php +++ b/tests/lib/files/filesystem.php @@ -189,7 +189,7 @@ class Filesystem extends \Test\TestCase { if (\OC\Files\Filesystem::getView()) { $user = \OC_User::getUser(); } else { - $user = uniqid(); + $user = $this->getUniqueID(); \OC\Files\Filesystem::init($user, '/' . $user . '/files'); } \OC_Hook::clear('OC_Filesystem'); @@ -217,7 +217,7 @@ class Filesystem extends \Test\TestCase { */ public function testLocalMountWhenUserDoesNotExist() { $datadir = \OC_Config::getValue("datadirectory", \OC::$SERVERROOT . "/data"); - $userId = uniqid('user_'); + $userId = $this->getUniqueID('user_'); \OC\Files\Filesystem::initMountPoints($userId); @@ -231,7 +231,7 @@ class Filesystem extends \Test\TestCase { * Tests that the home storage is used for the user's mount point */ public function testHomeMount() { - $userId = uniqid('user_'); + $userId = $this->getUniqueID('user_'); \OC_User::createUser($userId, $userId); @@ -251,7 +251,7 @@ class Filesystem extends \Test\TestCase { */ public function testLegacyHomeMount() { $datadir = \OC_Config::getValue("datadirectory", \OC::$SERVERROOT . "/data"); - $userId = uniqid('user_'); + $userId = $this->getUniqueID('user_'); // insert storage into DB by constructing it // to make initMountsPoint find its existence @@ -281,7 +281,7 @@ class Filesystem extends \Test\TestCase { * Test that the default cache dir is part of the user's home */ public function testMountDefaultCacheDir() { - $userId = uniqid('user_'); + $userId = $this->getUniqueID('user_'); $oldCachePath = \OC_Config::getValue('cache_path', ''); // no cache path configured \OC_Config::setValue('cache_path', ''); @@ -306,7 +306,7 @@ class Filesystem extends \Test\TestCase { * the user's home */ public function testMountExternalCacheDir() { - $userId = uniqid('user_'); + $userId = $this->getUniqueID('user_'); $oldCachePath = \OC_Config::getValue('cache_path', ''); // set cache path to temp dir diff --git a/tests/lib/files/node/file.php b/tests/lib/files/node/file.php index 34ec7dee213..a1d2266edf7 100644 --- a/tests/lib/files/node/file.php +++ b/tests/lib/files/node/file.php @@ -8,6 +8,7 @@ namespace Test\Files\Node; +use OC\Files\FileInfo; use OCP\Files\NotFoundException; use OCP\Files\NotPermittedException; use OC\Files\View; @@ -20,6 +21,10 @@ class File extends \Test\TestCase { $this->user = new \OC\User\User('', new \OC_User_Dummy); } + protected function getFileInfo($data) { + return new FileInfo('', null, '', $data); + } + public function testDelete() { $manager = $this->getMock('\OC\Files\Mount\Manager'); @@ -39,7 +44,7 @@ class File extends \Test\TestCase { $view->expects($this->once()) ->method('getFileInfo') ->with('/bar/foo') - ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_ALL))); + ->will($this->returnValue($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_ALL)))); $view->expects($this->once()) ->method('unlink') @@ -89,7 +94,7 @@ class File extends \Test\TestCase { $view->expects($this->any()) ->method('getFileInfo') ->with('/bar/foo') - ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_ALL, 'fileid' => 1))); + ->will($this->returnValue($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_ALL, 'fileid' => 1)))); $view->expects($this->once()) ->method('unlink') @@ -124,7 +129,7 @@ class File extends \Test\TestCase { $view->expects($this->once()) ->method('getFileInfo') ->with('/bar/foo') - ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_READ))); + ->will($this->returnValue($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_READ)))); $node = new \OC\Files\Node\File($root, $view, '/bar/foo'); $node->delete(); @@ -156,7 +161,7 @@ class File extends \Test\TestCase { $view->expects($this->once()) ->method('getFileInfo') ->with('/bar/foo') - ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_READ))); + ->will($this->returnValue($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_READ)))); $node = new \OC\Files\Node\File($root, $view, '/bar/foo'); $this->assertEquals('bar', $node->getContent()); @@ -180,7 +185,7 @@ class File extends \Test\TestCase { $view->expects($this->once()) ->method('getFileInfo') ->with('/bar/foo') - ->will($this->returnValue(array('permissions' => 0))); + ->will($this->returnValue($this->getFileInfo(array('permissions' => 0)))); $node = new \OC\Files\Node\File($root, $view, '/bar/foo'); $node->getContent(); @@ -201,7 +206,7 @@ class File extends \Test\TestCase { $view->expects($this->once()) ->method('getFileInfo') ->with('/bar/foo') - ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_ALL))); + ->will($this->returnValue($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_ALL)))); $view->expects($this->once()) ->method('file_put_contents') @@ -226,7 +231,7 @@ class File extends \Test\TestCase { $view->expects($this->once()) ->method('getFileInfo') ->with('/bar/foo') - ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_READ))); + ->will($this->returnValue($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_READ)))); $node = new \OC\Files\Node\File($root, $view, '/bar/foo'); $node->putContent('bar'); @@ -241,9 +246,9 @@ class File extends \Test\TestCase { $root = $this->getMock('\OC\Files\Node\Root', array(), array($manager, $view, $this->user)); $view->expects($this->once()) - ->method('getMimeType') + ->method('getFileInfo') ->with('/bar/foo') - ->will($this->returnValue('text/plain')); + ->will($this->returnValue($this->getFileInfo(array('mimetype' => 'text/plain')))); $node = new \OC\Files\Node\File($root, $view, '/bar/foo'); $this->assertEquals('text/plain', $node->getMimeType()); @@ -279,7 +284,7 @@ class File extends \Test\TestCase { $view->expects($this->once()) ->method('getFileInfo') ->with('/bar/foo') - ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_ALL))); + ->will($this->returnValue($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_ALL)))); $node = new \OC\Files\Node\File($root, $view, '/bar/foo'); $fh = $node->fopen('r'); @@ -316,7 +321,7 @@ class File extends \Test\TestCase { $view->expects($this->once()) ->method('getFileInfo') ->with('/bar/foo') - ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_ALL))); + ->will($this->returnValue($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_ALL)))); $node = new \OC\Files\Node\File($root, $view, '/bar/foo'); $fh = $node->fopen('w'); @@ -348,7 +353,7 @@ class File extends \Test\TestCase { $view->expects($this->once()) ->method('getFileInfo') ->with('/bar/foo') - ->will($this->returnValue(array('permissions' => 0))); + ->will($this->returnValue($this->getFileInfo(array('permissions' => 0)))); $node = new \OC\Files\Node\File($root, $view, '/bar/foo'); $node->fopen('r'); @@ -375,7 +380,7 @@ class File extends \Test\TestCase { $view->expects($this->once()) ->method('getFileInfo') ->with('/bar/foo') - ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_UPDATE))); + ->will($this->returnValue($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_UPDATE)))); $node = new \OC\Files\Node\File($root, $view, '/bar/foo'); $node->fopen('w'); @@ -402,7 +407,7 @@ class File extends \Test\TestCase { $view->expects($this->once()) ->method('getFileInfo') ->with('/bar/foo') - ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_READ))); + ->will($this->returnValue($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_READ)))); $node = new \OC\Files\Node\File($root, $view, '/bar/foo'); $node->fopen('w'); @@ -425,7 +430,7 @@ class File extends \Test\TestCase { $view->expects($this->any()) ->method('getFileInfo') - ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_ALL, 'fileid' => 3))); + ->will($this->returnValue($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_ALL, 'fileid' => 3)))); $node = new \OC\Files\Node\File($root, $view, '/bar/foo'); $parentNode = new \OC\Files\Node\Folder($root, $view, '/bar'); @@ -469,7 +474,7 @@ class File extends \Test\TestCase { $view->expects($this->any()) ->method('getFileInfo') - ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_READ, 'fileid' => 3))); + ->will($this->returnValue($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_READ, 'fileid' => 3)))); $node = new \OC\Files\Node\File($root, $view, '/bar/foo'); $parentNode = new \OC\Files\Node\Folder($root, $view, '/bar'); @@ -556,7 +561,7 @@ class File extends \Test\TestCase { $view->expects($this->any()) ->method('getFileInfo') - ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_ALL, 'fileid' => 1))); + ->will($this->returnValue($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_ALL, 'fileid' => 1)))); $node = new \OC\Files\Node\File($root, $view, '/bar/foo'); $parentNode = new \OC\Files\Node\Folder($root, $view, '/bar'); @@ -587,7 +592,7 @@ class File extends \Test\TestCase { $view->expects($this->any()) ->method('getFileInfo') - ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_READ))); + ->will($this->returnValue($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_READ)))); $view->expects($this->never()) ->method('rename'); diff --git a/tests/lib/files/node/folder.php b/tests/lib/files/node/folder.php index e348e452f6f..4aa57aa9373 100644 --- a/tests/lib/files/node/folder.php +++ b/tests/lib/files/node/folder.php @@ -9,6 +9,7 @@ namespace Test\Files\Node; use OC\Files\Cache\Cache; +use OC\Files\FileInfo; use OC\Files\Mount\Mount; use OC\Files\Node\Node; use OCP\Files\NotFoundException; @@ -23,6 +24,10 @@ class Folder extends \Test\TestCase { $this->user = new \OC\User\User('', new \OC_User_Dummy); } + protected function getFileInfo($data) { + return new FileInfo('', null, '', $data); + } + public function testDelete() { $manager = $this->getMock('\OC\Files\Mount\Manager'); /** @@ -39,7 +44,7 @@ class Folder extends \Test\TestCase { $view->expects($this->any()) ->method('getFileInfo') - ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_ALL))); + ->will($this->returnValue($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_ALL)))); $view->expects($this->once()) ->method('rmdir') @@ -87,7 +92,7 @@ class Folder extends \Test\TestCase { $view->expects($this->any()) ->method('getFileInfo') - ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_ALL, 'fileid' => 1))); + ->will($this->returnValue($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_ALL, 'fileid' => 1)))); $view->expects($this->once()) ->method('rmdir') @@ -121,7 +126,7 @@ class Folder extends \Test\TestCase { $view->expects($this->once()) ->method('getFileInfo') ->with('/bar/foo') - ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_READ))); + ->will($this->returnValue($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_READ)))); $node = new \OC\Files\Node\Folder($root, $view, '/bar/foo'); $node->delete(); @@ -255,7 +260,7 @@ class Folder extends \Test\TestCase { $view->expects($this->once()) ->method('getFileInfo') ->with('/bar/foo') - ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_ALL))); + ->will($this->returnValue($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_ALL)))); $view->expects($this->once()) ->method('mkdir') @@ -285,7 +290,7 @@ class Folder extends \Test\TestCase { $view->expects($this->once()) ->method('getFileInfo') ->with('/bar/foo') - ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_READ))); + ->will($this->returnValue($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_READ)))); $node = new \OC\Files\Node\Folder($root, $view, '/bar/foo'); $node->newFolder('asd'); @@ -305,7 +310,7 @@ class Folder extends \Test\TestCase { $view->expects($this->once()) ->method('getFileInfo') ->with('/bar/foo') - ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_ALL))); + ->will($this->returnValue($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_ALL)))); $view->expects($this->once()) ->method('touch') @@ -335,7 +340,7 @@ class Folder extends \Test\TestCase { $view->expects($this->once()) ->method('getFileInfo') ->with('/bar/foo') - ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_READ))); + ->will($this->returnValue($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_READ)))); $node = new \OC\Files\Node\Folder($root, $view, '/bar/foo'); $node->newFile('asd'); diff --git a/tests/lib/files/node/integration.php b/tests/lib/files/node/integration.php index fd777460ec6..d8c180cc844 100644 --- a/tests/lib/files/node/integration.php +++ b/tests/lib/files/node/integration.php @@ -48,7 +48,7 @@ class IntegrationTests extends \Test\TestCase { \OC_Hook::connect('OC_Filesystem', 'post_rename', '\OC\Files\Cache\Updater', 'renameHook'); \OC_Hook::connect('OC_Filesystem', 'post_touch', '\OC\Files\Cache\Updater', 'touchHook'); - $user = new User(uniqid('user'), new \OC_User_Dummy); + $user = new User($this->getUniqueID('user'), new \OC_User_Dummy); \OC_User::setUserId($user->getUID()); $this->view = new View(); $this->root = new Root($manager, $this->view, $user); diff --git a/tests/lib/files/node/node.php b/tests/lib/files/node/node.php index 80e3ac6f80a..4697479ba95 100644 --- a/tests/lib/files/node/node.php +++ b/tests/lib/files/node/node.php @@ -8,6 +8,8 @@ namespace Test\Files\Node; +use OC\Files\FileInfo; + class Node extends \Test\TestCase { private $user; @@ -16,6 +18,10 @@ class Node extends \Test\TestCase { $this->user = new \OC\User\User('', new \OC_User_Dummy); } + protected function getFileInfo($data) { + return new FileInfo('', null, '', $data); + } + public function testStat() { $manager = $this->getMock('\OC\Files\Mount\Manager'); /** @@ -55,12 +61,12 @@ class Node extends \Test\TestCase { ->method('getUser') ->will($this->returnValue($this->user)); - $stat = array( + $stat = $this->getFileInfo(array( 'fileid' => 1, 'size' => 100, 'etag' => 'qwerty', 'mtime' => 50 - ); + )); $view->expects($this->once()) ->method('getFileInfo') @@ -82,10 +88,18 @@ class Node extends \Test\TestCase { ->method('getUser') ->will($this->returnValue($this->user)); + + $stat = $this->getFileInfo(array( + 'fileid' => 1, + 'size' => 100, + 'etag' => 'qwerty', + 'mtime' => 50 + )); + $view->expects($this->once()) - ->method('filesize') + ->method('getFileInfo') ->with('/bar/foo') - ->will($this->returnValue(100)); + ->will($this->returnValue($stat)); $node = new \OC\Files\Node\File($root, $view, '/bar/foo'); $this->assertEquals(100, $node->getSize()); @@ -102,12 +116,12 @@ class Node extends \Test\TestCase { ->method('getUser') ->will($this->returnValue($this->user)); - $stat = array( + $stat = $this->getFileInfo(array( 'fileid' => 1, 'size' => 100, 'etag' => 'qwerty', 'mtime' => 50 - ); + )); $view->expects($this->once()) ->method('getFileInfo') @@ -128,15 +142,18 @@ class Node extends \Test\TestCase { $root->expects($this->any()) ->method('getUser') ->will($this->returnValue($this->user)); - /** - * @var \OC\Files\Storage\Storage | \PHPUnit_Framework_MockObject_MockObject $storage - */ - $storage = $this->getMock('\OC\Files\Storage\Storage'); + + $stat = $this->getFileInfo(array( + 'fileid' => 1, + 'size' => 100, + 'etag' => 'qwerty', + 'mtime' => 50 + )); $view->expects($this->once()) - ->method('filemtime') + ->method('getFileInfo') ->with('/bar/foo') - ->will($this->returnValue(50)); + ->will($this->returnValue($stat)); $node = new \OC\Files\Node\File($root, $view, '/bar/foo'); $this->assertEquals(50, $node->getMTime()); @@ -239,14 +256,9 @@ class Node extends \Test\TestCase { ->will($this->returnValue(true)); $view->expects($this->once()) - ->method('filemtime') - ->with('/bar/foo') - ->will($this->returnValue(100)); - - $view->expects($this->once()) ->method('getFileInfo') ->with('/bar/foo') - ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_ALL))); + ->will($this->returnValue($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_ALL)))); $node = new \OC\Files\Node\Node($root, $view, '/bar/foo'); $node->touch(100); @@ -299,7 +311,7 @@ class Node extends \Test\TestCase { $view->expects($this->any()) ->method('getFileInfo') ->with('/bar/foo') - ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_ALL))); + ->will($this->returnValue($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_ALL)))); $node = new \OC\Files\Node\Node($root, $view, '/bar/foo'); $node->touch(100); @@ -323,7 +335,7 @@ class Node extends \Test\TestCase { $view->expects($this->any()) ->method('getFileInfo') ->with('/bar/foo') - ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_READ))); + ->will($this->returnValue($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_READ)))); $node = new \OC\Files\Node\Node($root, $view, '/bar/foo'); $node->touch(100); diff --git a/tests/lib/files/node/root.php b/tests/lib/files/node/root.php index fcce7070f5d..35bd462157e 100644 --- a/tests/lib/files/node/root.php +++ b/tests/lib/files/node/root.php @@ -8,6 +8,7 @@ namespace Test\Files\Node; +use OC\Files\FileInfo; use OCP\Files\NotPermittedException; use OC\Files\Mount\Manager; @@ -19,6 +20,10 @@ class Root extends \Test\TestCase { $this->user = new \OC\User\User('', new \OC_User_Dummy); } + protected function getFileInfo($data) { + return new FileInfo('', null, '', $data); + } + public function testGet() { $manager = new Manager(); /** @@ -34,7 +39,7 @@ class Root extends \Test\TestCase { $view->expects($this->once()) ->method('getFileInfo') ->with('/bar/foo') - ->will($this->returnValue(array('fileid' => 10, 'path' => 'bar/foo', 'name', 'mimetype' => 'text/plain'))); + ->will($this->returnValue($this->getFileInfo(array('fileid' => 10, 'path' => 'bar/foo', 'name', 'mimetype' => 'text/plain')))); $view->expects($this->once()) ->method('is_dir') diff --git a/tests/lib/files/objectstore/swift.php b/tests/lib/files/objectstore/swift.php index f2c4a983cf2..30c60598277 100644 --- a/tests/lib/files/objectstore/swift.php +++ b/tests/lib/files/objectstore/swift.php @@ -34,7 +34,7 @@ class Swift extends \Test\Files\Storage\Storage { parent::setUp(); if (!getenv('RUN_OBJECTSTORE_TESTS')) { - $this->markTestSkipped('objectstore tests are unreliable on travis'); + $this->markTestSkipped('objectstore tests are unreliable in some environments'); } \OC_App::disable('files_sharing'); @@ -87,10 +87,6 @@ class Swift extends \Test\Files\Storage\Storage { } public function testStat() { - // TODO travis - if (getenv('TRAVIS')) { - $this->markTestSkipped('Fails on travis - connection times out sometimes'); - } $textFile = \OC::$SERVERROOT . '/tests/data/lorem.txt'; $ctimeStart = time(); diff --git a/tests/lib/files/storage/wrapper/jail.php b/tests/lib/files/storage/wrapper/jail.php new file mode 100644 index 00000000000..270ce750ecf --- /dev/null +++ b/tests/lib/files/storage/wrapper/jail.php @@ -0,0 +1,55 @@ +<?php +/** + * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace Test\Files\Storage\Wrapper; + +class Jail extends \Test\Files\Storage\Storage { + /** + * @var string tmpDir + */ + private $tmpDir; + + /** + * @var \OC\Files\Storage\Temporary + */ + private $sourceStorage; + + public function setUp() { + parent::setUp(); + $this->sourceStorage = new \OC\Files\Storage\Temporary(array()); + $this->sourceStorage->mkdir('foo'); + $this->instance = new \OC\Files\Storage\Wrapper\Jail(array( + 'storage' => $this->sourceStorage, + 'root' => 'foo' + )); + } + + public function tearDown() { + // test that nothing outside our jail is touched + $contents = array(); + $dh = $this->sourceStorage->opendir(''); + while ($file = readdir($dh)) { + if ($file !== '.' and $file !== '..') { + $contents[] = $file; + } + } + $this->assertEquals(array('foo'), $contents); + $this->sourceStorage->cleanUp(); + parent::tearDown(); + } + + public function testMkDirRooted() { + $this->instance->mkdir('bar'); + $this->assertTrue($this->sourceStorage->is_dir('foo/bar')); + } + + public function testFilePutContentsRooted() { + $this->instance->file_put_contents('bar', 'asd'); + $this->assertEquals('asd', $this->sourceStorage->file_get_contents('foo/bar')); + } +} diff --git a/tests/lib/files/storage/wrapper/permissionsmask.php b/tests/lib/files/storage/wrapper/permissionsmask.php new file mode 100644 index 00000000000..7e8c387677c --- /dev/null +++ b/tests/lib/files/storage/wrapper/permissionsmask.php @@ -0,0 +1,105 @@ +<?php +/** + * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace Test\Files\Storage\Wrapper; + +use OCP\Constants; + +class PermissionsMask extends \Test\Files\Storage\Storage { + + /** + * @var \OC\Files\Storage\Temporary + */ + private $sourceStorage; + + public function setUp() { + parent::setUp(); + $this->sourceStorage = new \OC\Files\Storage\Temporary(array()); + $this->instance = $this->getMaskedStorage(Constants::PERMISSION_ALL); + } + + public function tearDown() { + $this->sourceStorage->cleanUp(); + parent::tearDown(); + } + + protected function getMaskedStorage($mask) { + return new \OC\Files\Storage\Wrapper\PermissionsMask(array( + 'storage' => $this->sourceStorage, + 'mask' => $mask + )); + } + + public function testMkdirNoCreate() { + $storage = $this->getMaskedStorage(Constants::PERMISSION_ALL - Constants::PERMISSION_CREATE); + $this->assertFalse($storage->mkdir('foo')); + $this->assertFalse($storage->file_exists('foo')); + } + + public function testRmdirNoDelete() { + $storage = $this->getMaskedStorage(Constants::PERMISSION_ALL - Constants::PERMISSION_DELETE); + $this->assertTrue($storage->mkdir('foo')); + $this->assertTrue($storage->file_exists('foo')); + $this->assertFalse($storage->rmdir('foo')); + $this->assertTrue($storage->file_exists('foo')); + } + + public function testTouchNewFileNoCreate() { + $storage = $this->getMaskedStorage(Constants::PERMISSION_ALL - Constants::PERMISSION_CREATE); + $this->assertFalse($storage->touch('foo')); + $this->assertFalse($storage->file_exists('foo')); + } + + public function testTouchNewFileNoUpdate() { + $storage = $this->getMaskedStorage(Constants::PERMISSION_ALL - Constants::PERMISSION_UPDATE); + $this->assertTrue($storage->touch('foo')); + $this->assertTrue($storage->file_exists('foo')); + } + + public function testTouchExistingFileNoUpdate() { + $this->sourceStorage->touch('foo'); + $storage = $this->getMaskedStorage(Constants::PERMISSION_ALL - Constants::PERMISSION_UPDATE); + $this->assertFalse($storage->touch('foo')); + } + + public function testUnlinkNoDelete() { + $storage = $this->getMaskedStorage(Constants::PERMISSION_ALL - Constants::PERMISSION_DELETE); + $this->assertTrue($storage->touch('foo')); + $this->assertTrue($storage->file_exists('foo')); + $this->assertFalse($storage->unlink('foo')); + $this->assertTrue($storage->file_exists('foo')); + } + + public function testPutContentsNewFileNoUpdate() { + $storage = $this->getMaskedStorage(Constants::PERMISSION_ALL - Constants::PERMISSION_UPDATE); + $this->assertTrue($storage->file_put_contents('foo', 'bar')); + $this->assertEquals('bar', $storage->file_get_contents('foo')); + } + + public function testPutContentsNewFileNoCreate() { + $storage = $this->getMaskedStorage(Constants::PERMISSION_ALL - Constants::PERMISSION_CREATE); + $this->assertFalse($storage->file_put_contents('foo', 'bar')); + } + + public function testPutContentsExistingFileNoUpdate() { + $this->sourceStorage->touch('foo'); + $storage = $this->getMaskedStorage(Constants::PERMISSION_ALL - Constants::PERMISSION_UPDATE); + $this->assertFalse($storage->file_put_contents('foo', 'bar')); + } + + public function testFopenExistingFileNoUpdate() { + $this->sourceStorage->touch('foo'); + $storage = $this->getMaskedStorage(Constants::PERMISSION_ALL - Constants::PERMISSION_UPDATE); + $this->assertFalse($storage->fopen('foo', 'w')); + } + + public function testFopenNewFileNoCreate() { + $storage = $this->getMaskedStorage(Constants::PERMISSION_ALL - Constants::PERMISSION_CREATE); + $this->assertFalse($storage->fopen('foo', 'w')); + } +} diff --git a/tests/lib/files/view.php b/tests/lib/files/view.php index d6dd176bba9..8bb4e0ac2cc 100644 --- a/tests/lib/files/view.php +++ b/tests/lib/files/view.php @@ -71,7 +71,7 @@ class View extends \Test\TestCase { $storage1 = $this->getTestStorage(); $storage2 = $this->getTestStorage(); $storage3 = $this->getTestStorage(); - $root = '/' . uniqid(); + $root = $this->getUniqueID('/'); \OC\Files\Filesystem::mount($storage1, array(), $root . '/'); \OC\Files\Filesystem::mount($storage2, array(), $root . '/substorage'); \OC\Files\Filesystem::mount($storage3, array(), $root . '/folder/anotherstorage'); diff --git a/tests/lib/httphelper.php b/tests/lib/httphelper.php index 34dee35fe02..eb58508f158 100644 --- a/tests/lib/httphelper.php +++ b/tests/lib/httphelper.php @@ -24,7 +24,7 @@ class TestHTTPHelper extends \Test\TestCase { ->getMock(); } - public function testIsHTTPProvider() { + public function isHttpTestData() { return array( array('http://wwww.owncloud.org/enterprise/', true), array('https://wwww.owncloud.org/enterprise/', true), @@ -81,7 +81,7 @@ class TestHTTPHelper extends \Test\TestCase { } /** - * @dataProvider testIsHTTPProvider + * @dataProvider isHttpTestData */ public function testIsHTTP($url, $expected) { $this->assertSame($expected, $this->httpHelperMock->isHTTPURL($url)); diff --git a/tests/lib/memcache/apc.php b/tests/lib/memcache/apc.php index 550d5068dc1..fdb785b9dc5 100644 --- a/tests/lib/memcache/apc.php +++ b/tests/lib/memcache/apc.php @@ -21,6 +21,6 @@ class APC extends Cache { $this->markTestSkipped('The apc extension is emulated by ACPu.'); return; } - $this->instance=new \OC\Memcache\APC(uniqid()); + $this->instance=new \OC\Memcache\APC($this->getUniqueID()); } } diff --git a/tests/lib/memcache/apcu.php b/tests/lib/memcache/apcu.php index 1b849e1c54d..afcaa99bfbe 100644 --- a/tests/lib/memcache/apcu.php +++ b/tests/lib/memcache/apcu.php @@ -17,6 +17,6 @@ class APCu extends Cache { $this->markTestSkipped('The APCu extension is not available.'); return; } - $this->instance=new \OC\Memcache\APCu(uniqid()); + $this->instance=new \OC\Memcache\APCu($this->getUniqueID()); } } diff --git a/tests/lib/memcache/memcached.php b/tests/lib/memcache/memcached.php index a94b809a7b5..51a78996dd4 100644 --- a/tests/lib/memcache/memcached.php +++ b/tests/lib/memcache/memcached.php @@ -16,14 +16,14 @@ class Memcached extends Cache { if (!\OC\Memcache\Memcached::isAvailable()) { self::markTestSkipped('The memcached extension is not available.'); } - $instance = new \OC\Memcache\Memcached(uniqid()); - if ($instance->set(uniqid(), uniqid()) === false) { + $instance = new \OC\Memcache\Memcached(self::getUniqueID()); + if ($instance->set(self::getUniqueID(), self::getUniqueID()) === false) { self::markTestSkipped('memcached server seems to be down.'); } } protected function setUp() { parent::setUp(); - $this->instance = new \OC\Memcache\Memcached(uniqid()); + $this->instance = new \OC\Memcache\Memcached($this->getUniqueID()); } } diff --git a/tests/lib/memcache/xcache.php b/tests/lib/memcache/xcache.php index b97d5545c6e..36efe0b220a 100644 --- a/tests/lib/memcache/xcache.php +++ b/tests/lib/memcache/xcache.php @@ -17,6 +17,6 @@ class XCache extends Cache { $this->markTestSkipped('The xcache extension is not available.'); return; } - $this->instance = new \OC\Memcache\XCache(uniqid()); + $this->instance = new \OC\Memcache\XCache($this->getUniqueID()); } } diff --git a/tests/lib/migrate.php b/tests/lib/migrate.php deleted file mode 100644 index 9c1e980c445..00000000000 --- a/tests/lib/migrate.php +++ /dev/null @@ -1,98 +0,0 @@ -<?php -/** - * Copyright (c) 2014 Tom Needham <tom@owncloud.com> - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ - -class Test_Migrate extends \Test\TestCase { - - public $users; - public $tmpfiles = array(); - - /** @var \OC\Files\Storage\Storage */ - private $originalStorage; - - protected function setUp() { - parent::setUp(); - - $this->originalStorage = \OC\Files\Filesystem::getStorage('/'); - } - - protected function tearDown() { - $u = new OC_User(); - foreach($this->users as $user) { - $u->deleteUser($user); - } - foreach($this->tmpfiles as $file) { - \OC_Helper::rmdirr($file); - } - - \OC\Files\Filesystem::mount($this->originalStorage, array(), '/'); - parent::tearDown(); - } - - /** - * Generates a test user and sets up their file system - * @return string the test users id - */ - public function generateUser() { - $username = $this->getUniqueID(); - \OC_User::createUser($username, 'password'); - \OC_Util::tearDownFS(); - \OC_User::setUserId(''); - \OC\Files\Filesystem::tearDown(); - \OC_Util::setupFS($username); - $this->users[] = $username; - return $username; - } - - /** - * validates an export for a user - * checks for existence of export_info.json and file folder - * @param string $exportedUser the user that was exported - * @param string $path the path to the .zip export - * @param string $exportedBy - */ - public function validateUserExport($exportedBy, $exportedUser, $path) { - $this->assertTrue(file_exists($path)); - // Extract - $extract = get_temp_dir() . '/oc_import_' . uniqid(); - //mkdir($extract); - $this->tmpfiles[] = $extract; - $zip = new ZipArchive; - $zip->open($path); - $zip->extractTo($extract); - $zip->close(); - $this->assertTrue(file_exists($extract.'/export_info.json')); - $exportInfo = file_get_contents($extract.'/export_info.json'); - $exportInfo = json_decode($exportInfo); - $this->assertNotNull($exportInfo); - $this->assertEquals($exportedUser, $exportInfo->exporteduser); - $this->assertEquals($exportedBy, $exportInfo->exportedby); - $this->assertTrue(file_exists($extract.'/'.$exportedUser.'/files')); - } - - public function testUserSelfExport() { - // Create a user - $user = $this->generateUser(); - \OC_User::setUserId($user); - $export = \OC_Migrate::export($user); - // Check it succeeded and exists - $this->assertTrue(json_decode($export)->success); - // Validate the export - $this->validateUserExport($user, $user, json_decode($export)->data); - } - - public function testUserOtherExport() { - $user = $this->generateUser(); - $user2 = $this->generateUser(); - \OC_User::setUserId($user2); - $export = \OC_Migrate::export($user); - // Check it succeeded and exists - $this->assertTrue(json_decode($export)->success); - // Validate the export - $this->validateUserExport($user2, $user, json_decode($export)->data); - } -} diff --git a/tests/lib/ocs/privatedata.php b/tests/lib/ocs/privatedata.php index 20f1dd38362..a9300f5beac 100644 --- a/tests/lib/ocs/privatedata.php +++ b/tests/lib/ocs/privatedata.php @@ -26,7 +26,7 @@ class Test_OC_OCS_Privatedata extends \Test\TestCase { protected function setUp() { parent::setUp(); \OC::$server->getSession()->set('user_id', 'user1'); - $this->appKey = uniqid('app'); + $this->appKey = $this->getUniqueID('app'); } public function testGetEmptyOne() { diff --git a/tests/lib/repair/repaircollation.php b/tests/lib/repair/repaircollation.php index e711fcd9d83..29dad190008 100644 --- a/tests/lib/repair/repaircollation.php +++ b/tests/lib/repair/repaircollation.php @@ -53,7 +53,7 @@ class TestRepairCollation extends \Test\TestCase { } $dbPrefix = $this->config->getSystemValue("dbtableprefix"); - $this->tableName = uniqid($dbPrefix . "_collation_test"); + $this->tableName = $this->getUniqueID($dbPrefix . "_collation_test"); $this->connection->exec("CREATE TABLE $this->tableName(text VARCHAR(16)) COLLATE utf8_unicode_ci"); $this->repair = new TestCollationRepair($this->config, $this->connection); diff --git a/tests/lib/repair/repairinnodb.php b/tests/lib/repair/repairinnodb.php index 21d7d978821..d4039472a6b 100644 --- a/tests/lib/repair/repairinnodb.php +++ b/tests/lib/repair/repairinnodb.php @@ -31,7 +31,7 @@ class TestRepairInnoDB extends \Test\TestCase { } $dbPrefix = \OC::$server->getConfig()->getSystemValue("dbtableprefix"); - $this->tableName = uniqid($dbPrefix . "_innodb_test"); + $this->tableName = $this->getUniqueID($dbPrefix . "_innodb_test"); $this->connection->exec("CREATE TABLE $this->tableName(id INT) ENGINE MyISAM"); $this->repair = new \OC\Repair\InnoDB(); diff --git a/tests/lib/repair/repairlegacystorage.php b/tests/lib/repair/repairlegacystorage.php index ac845657cd9..f08393300e1 100644 --- a/tests/lib/repair/repairlegacystorage.php +++ b/tests/lib/repair/repairlegacystorage.php @@ -13,6 +13,8 @@ */ class TestRepairLegacyStorages extends \Test\TestCase { + private $connection; + private $config; private $user; private $repair; @@ -247,12 +249,12 @@ class TestRepairLegacyStorages extends \Test\TestCase { // regular data dir array( '/tmp/oc-autotest/datadir/', - uniqid('user_'), + $this->getUniqueID('user_'), ), // long datadir / short user array( '/tmp/oc-autotest/datadir01234567890123456789012345678901234567890123456789END/', - uniqid('user_'), + $this->getUniqueID('user_'), ), // short datadir / long user array( @@ -271,7 +273,7 @@ class TestRepairLegacyStorages extends \Test\TestCase { $output[] = 'info: ' . $description; }); - $this->prepareSettings('/tmp/oc-autotest/datadir', uniqid('user_')); + $this->prepareSettings('/tmp/oc-autotest/datadir', $this->getUniqueID('user_')); $this->assertNotEquals('yes', $this->config->getAppValue('core', 'repairlegacystoragesdone')); $this->repair->run(); $this->assertEquals(1, count($output)); diff --git a/tests/lib/request.php b/tests/lib/request.php index 254048723e7..ea3722b90a6 100644 --- a/tests/lib/request.php +++ b/tests/lib/request.php @@ -228,6 +228,23 @@ class Test_Request extends \Test\TestCase { OC_Config::deleteKey('overwritehost'); } + public function hostWithPortProvider() { + return array( + array('localhost:500', 'localhost'), + array('foo.com', 'foo.com'), + array('[1fff:0:a88:85a3::ac1f]:801', '[1fff:0:a88:85a3::ac1f]'), + array('[1fff:0:a88:85a3::ac1f]', '[1fff:0:a88:85a3::ac1f]') + ); + } + + /** + * @dataProvider hostWithPortProvider + */ + public function testGetDomainWithoutPort($hostWithPort, $host) { + $this->assertEquals($host, OC_Request::getDomainWithoutPort($hostWithPort)); + + } + /** * @dataProvider trustedDomainDataProvider */ diff --git a/tests/lib/session/memory.php b/tests/lib/session/memory.php index 84dee548a1e..1ca4956c6ea 100644 --- a/tests/lib/session/memory.php +++ b/tests/lib/session/memory.php @@ -12,6 +12,6 @@ namespace Test\Session; class Memory extends Session { protected function setUp() { parent::setUp(); - $this->instance = new \OC\Session\Memory(uniqid()); + $this->instance = new \OC\Session\Memory($this->getUniqueID()); } } diff --git a/tests/lib/share/backend.php b/tests/lib/share/backend.php index 61b8f262a42..07958266947 100644 --- a/tests/lib/share/backend.php +++ b/tests/lib/share/backend.php @@ -19,8 +19,6 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ -OC::$CLASSPATH['OCP\Share_Backend']='lib/public/share.php'; - class Test_Share_Backend implements OCP\Share_Backend { const FORMAT_SOURCE = 0; diff --git a/tests/lib/share/helper.php b/tests/lib/share/helper.php index 76046d360bc..7a546410aea 100644 --- a/tests/lib/share/helper.php +++ b/tests/lib/share/helper.php @@ -27,8 +27,8 @@ class Test_Share_Helper extends \Test\TestCase { array(array('defaultExpireDateSet' => false), 2000000000, 2000010000, 2000010000), // no default expire date and no user defined expire date, return false array(array('defaultExpireDateSet' => false), 2000000000, null, false), - // unenforced expire data and no user defined expire date, take default expire date - array(array('defaultExpireDateSet' => true, 'expireAfterDays' => 1, 'enforceExpireDate' => false), 2000000000, null, 2000086400), + // unenforced expire data and no user defined expire date, return false (because the default is not enforced) + array(array('defaultExpireDateSet' => true, 'expireAfterDays' => 1, 'enforceExpireDate' => false), 2000000000, null, false), // enforced expire date and no user defined expire date, take default expire date array(array('defaultExpireDateSet' => true, 'expireAfterDays' => 1, 'enforceExpireDate' => true), 2000000000, null, 2000086400), // unenforced expire date and user defined date > default expire date, take users expire date @@ -49,6 +49,4 @@ class Test_Share_Helper extends \Test\TestCase { $result = \OC\Share\Helper::calculateExpireDate($defaultExpireSettings, $creationTime, $userExpireDate); $this->assertSame($expected, $result); } - - } diff --git a/tests/lib/share/share.php b/tests/lib/share/share.php index 7ae458a797d..1f95502919d 100644 --- a/tests/lib/share/share.php +++ b/tests/lib/share/share.php @@ -89,7 +89,7 @@ class Test_Share extends \Test\TestCase { public function testShareInvalidShareType() { $message = 'Share type foobar is not valid for test.txt'; try { - OCP\Share::shareItem('test', 'test.txt', 'foobar', $this->user2, OCP\PERMISSION_READ); + OCP\Share::shareItem('test', 'test.txt', 'foobar', $this->user2, \OCP\Constants::PERMISSION_READ); } catch (Exception $exception) { $this->assertEquals($message, $exception->getMessage()); } @@ -98,7 +98,7 @@ class Test_Share extends \Test\TestCase { public function testInvalidItemType() { $message = 'Sharing backend for foobar not found'; try { - OCP\Share::shareItem('foobar', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, OCP\PERMISSION_READ); + OCP\Share::shareItem('foobar', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, \OCP\Constants::PERMISSION_READ); $this->fail('Exception was expected: '.$message); } catch (Exception $exception) { $this->assertEquals($message, $exception->getMessage()); @@ -134,7 +134,7 @@ class Test_Share extends \Test\TestCase { $this->assertEquals($message, $exception->getMessage()); } try { - OCP\Share::setPermissions('foobar', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, OCP\PERMISSION_UPDATE); + OCP\Share::setPermissions('foobar', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, \OCP\Constants::PERMISSION_UPDATE); $this->fail('Exception was expected: '.$message); } catch (Exception $exception) { $this->assertEquals($message, $exception->getMessage()); @@ -144,7 +144,7 @@ class Test_Share extends \Test\TestCase { protected function shareUserOneTestFileWithUserTwo() { OC_User::setUserId($this->user1); $this->assertTrue( - OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, OCP\PERMISSION_READ), + OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, \OCP\Constants::PERMISSION_READ), 'Failed asserting that user 1 successfully shared text.txt with user 2.' ); $this->assertContains( @@ -163,7 +163,7 @@ class Test_Share extends \Test\TestCase { protected function shareUserTestFileAsLink() { OC_User::setUserId($this->user1); - $result = OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_LINK, null, OCP\PERMISSION_READ); + $result = OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_LINK, null, \OCP\Constants::PERMISSION_READ); $this->assertTrue(is_string($result)); } @@ -174,7 +174,7 @@ class Test_Share extends \Test\TestCase { protected function shareUserTestFileWithUser($sharer, $receiver) { OC_User::setUserId($sharer); $this->assertTrue( - OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $receiver, OCP\PERMISSION_READ | OCP\PERMISSION_SHARE), + OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $receiver, \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_SHARE), 'Failed asserting that ' . $sharer . ' successfully shared text.txt with ' . $receiver . '.' ); $this->assertContains( @@ -195,21 +195,21 @@ class Test_Share extends \Test\TestCase { // Invalid shares $message = 'Sharing test.txt failed, because the user '.$this->user1.' is the item owner'; try { - OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user1, OCP\PERMISSION_READ); + OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user1, \OCP\Constants::PERMISSION_READ); $this->fail('Exception was expected: '.$message); } catch (Exception $exception) { $this->assertEquals($message, $exception->getMessage()); } $message = 'Sharing test.txt failed, because the user foobar does not exist'; try { - OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, 'foobar', OCP\PERMISSION_READ); + OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, 'foobar', \OCP\Constants::PERMISSION_READ); $this->fail('Exception was expected: '.$message); } catch (Exception $exception) { $this->assertEquals($message, $exception->getMessage()); } $message = 'Sharing foobar failed, because the sharing backend for test could not find its source'; try { - OCP\Share::shareItem('test', 'foobar', OCP\Share::SHARE_TYPE_USER, $this->user2, OCP\PERMISSION_READ); + OCP\Share::shareItem('test', 'foobar', OCP\Share::SHARE_TYPE_USER, $this->user2, \OCP\Constants::PERMISSION_READ); $this->fail('Exception was expected: '.$message); } catch (Exception $exception) { $this->assertEquals($message, $exception->getMessage()); @@ -222,7 +222,7 @@ class Test_Share extends \Test\TestCase { OC_User::setUserId($this->user1); $message = 'Sharing test.txt failed, because this item is already shared with '.$this->user2; try { - OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, OCP\PERMISSION_READ); + OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, \OCP\Constants::PERMISSION_READ); $this->fail('Exception was expected: '.$message); } catch (Exception $exception) { $this->assertEquals($message, $exception->getMessage()); @@ -232,7 +232,7 @@ class Test_Share extends \Test\TestCase { OC_User::setUserId($this->user2); $message = 'Sharing test.txt failed, because the user '.$this->user1.' is the original sharer'; try { - OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user1, OCP\PERMISSION_READ); + OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user1, \OCP\Constants::PERMISSION_READ); $this->fail('Exception was expected: '.$message); } catch (Exception $exception) { $this->assertEquals($message, $exception->getMessage()); @@ -243,11 +243,11 @@ class Test_Share extends \Test\TestCase { $this->assertTrue(OCP\Share::unshare('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2)); // Attempt reshare without share permission - $this->assertTrue(OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, OCP\PERMISSION_READ)); + $this->assertTrue(OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, \OCP\Constants::PERMISSION_READ)); OC_User::setUserId($this->user2); $message = 'Sharing test.txt failed, because resharing is not allowed'; try { - OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user3, OCP\PERMISSION_READ); + OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user3, \OCP\Constants::PERMISSION_READ); $this->fail('Exception was expected: '.$message); } catch (Exception $exception) { $this->assertEquals($message, $exception->getMessage()); @@ -255,30 +255,30 @@ class Test_Share extends \Test\TestCase { // Owner grants share and update permission OC_User::setUserId($this->user1); - $this->assertTrue(OCP\Share::setPermissions('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, OCP\PERMISSION_READ | OCP\PERMISSION_UPDATE | OCP\PERMISSION_SHARE)); + $this->assertTrue(OCP\Share::setPermissions('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_SHARE)); // Attempt reshare with escalated permissions OC_User::setUserId($this->user2); $message = 'Sharing test.txt failed, because the permissions exceed permissions granted to '.$this->user2; try { - OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user3, OCP\PERMISSION_READ | OCP\PERMISSION_DELETE); + OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user3, \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_DELETE); $this->fail('Exception was expected: '.$message); } catch (Exception $exception) { $this->assertEquals($message, $exception->getMessage()); } // Valid reshare - $this->assertTrue(OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user3, OCP\PERMISSION_READ | OCP\PERMISSION_UPDATE)); + $this->assertTrue(OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user3, \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE)); $this->assertEquals(array('test.txt'), OCP\Share::getItemShared('test', 'test.txt', Test_Share_Backend::FORMAT_SOURCE)); OC_User::setUserId($this->user3); $this->assertEquals(array('test.txt'), OCP\Share::getItemSharedWith('test', 'test.txt', Test_Share_Backend::FORMAT_SOURCE)); - $this->assertEquals(array(OCP\PERMISSION_READ | OCP\PERMISSION_UPDATE), OCP\Share::getItemSharedWith('test', 'test.txt', Test_Share_Backend::FORMAT_PERMISSIONS)); + $this->assertEquals(array(\OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE), OCP\Share::getItemSharedWith('test', 'test.txt', Test_Share_Backend::FORMAT_PERMISSIONS)); // Attempt to escalate permissions OC_User::setUserId($this->user2); $message = 'Setting permissions for test.txt failed, because the permissions exceed permissions granted to '.$this->user2; try { - OCP\Share::setPermissions('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user3, OCP\PERMISSION_READ | OCP\PERMISSION_DELETE); + OCP\Share::setPermissions('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user3, \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_DELETE); $this->fail('Exception was expected: '.$message); } catch (Exception $exception) { $this->assertEquals($message, $exception->getMessage()); @@ -286,25 +286,25 @@ class Test_Share extends \Test\TestCase { // Remove update permission OC_User::setUserId($this->user1); - $this->assertTrue(OCP\Share::setPermissions('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, OCP\PERMISSION_READ | OCP\PERMISSION_SHARE)); + $this->assertTrue(OCP\Share::setPermissions('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_SHARE)); OC_User::setUserId($this->user2); - $this->assertEquals(array(OCP\PERMISSION_READ | OCP\PERMISSION_SHARE), OCP\Share::getItemSharedWith('test', 'test.txt', Test_Share_Backend::FORMAT_PERMISSIONS)); + $this->assertEquals(array(\OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_SHARE), OCP\Share::getItemSharedWith('test', 'test.txt', Test_Share_Backend::FORMAT_PERMISSIONS)); OC_User::setUserId($this->user3); - $this->assertEquals(array(OCP\PERMISSION_READ), OCP\Share::getItemSharedWith('test', 'test.txt', Test_Share_Backend::FORMAT_PERMISSIONS)); + $this->assertEquals(array(\OCP\Constants::PERMISSION_READ), OCP\Share::getItemSharedWith('test', 'test.txt', Test_Share_Backend::FORMAT_PERMISSIONS)); // Remove share permission OC_User::setUserId($this->user1); - $this->assertTrue(OCP\Share::setPermissions('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, OCP\PERMISSION_READ)); + $this->assertTrue(OCP\Share::setPermissions('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, \OCP\Constants::PERMISSION_READ)); OC_User::setUserId($this->user2); - $this->assertEquals(array(OCP\PERMISSION_READ), OCP\Share::getItemSharedWith('test', 'test.txt', Test_Share_Backend::FORMAT_PERMISSIONS)); + $this->assertEquals(array(\OCP\Constants::PERMISSION_READ), OCP\Share::getItemSharedWith('test', 'test.txt', Test_Share_Backend::FORMAT_PERMISSIONS)); OC_User::setUserId($this->user3); $this->assertSame(array(), OCP\Share::getItemSharedWith('test', 'test.txt')); // Reshare again, and then have owner unshare OC_User::setUserId($this->user1); - $this->assertTrue(OCP\Share::setPermissions('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, OCP\PERMISSION_READ | OCP\PERMISSION_SHARE)); + $this->assertTrue(OCP\Share::setPermissions('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_SHARE)); OC_User::setUserId($this->user2); - $this->assertTrue(OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user3, OCP\PERMISSION_READ)); + $this->assertTrue(OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user3, \OCP\Constants::PERMISSION_READ)); OC_User::setUserId($this->user1); $this->assertTrue(OCP\Share::unshare('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2)); OC_User::setUserId($this->user2); @@ -314,9 +314,9 @@ class Test_Share extends \Test\TestCase { // Attempt target conflict OC_User::setUserId($this->user1); - $this->assertTrue(OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, OCP\PERMISSION_READ)); + $this->assertTrue(OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, \OCP\Constants::PERMISSION_READ)); OC_User::setUserId($this->user3); - $this->assertTrue(OCP\Share::shareItem('test', 'share.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, OCP\PERMISSION_READ)); + $this->assertTrue(OCP\Share::shareItem('test', 'share.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, \OCP\Constants::PERMISSION_READ)); OC_User::setUserId($this->user2); $to_test = OCP\Share::getItemsSharedWith('test', Test_Share_Backend::FORMAT_TARGET); @@ -333,9 +333,9 @@ class Test_Share extends \Test\TestCase { $this->assertEquals(array(), OCP\Share::getItemsSharedWith('test', Test_Share_Backend::FORMAT_TARGET)); OC_User::setUserId($this->user1); - $this->assertTrue(OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, OCP\PERMISSION_READ)); + $this->assertTrue(OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, \OCP\Constants::PERMISSION_READ)); OC_User::setUserId($this->user3); - $this->assertTrue(OCP\Share::shareItem('test', 'share.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, OCP\PERMISSION_READ)); + $this->assertTrue(OCP\Share::shareItem('test', 'share.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, \OCP\Constants::PERMISSION_READ)); OC_User::setUserId($this->user2); $to_test = OCP\Share::getItemsSharedWith('test', Test_Share_Backend::FORMAT_TARGET); @@ -412,7 +412,7 @@ class Test_Share extends \Test\TestCase { OC_User::setUserId($this->user1); $this->assertTrue( - OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user4, OCP\PERMISSION_ALL), + OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user4, \OCP\Constants::PERMISSION_ALL), 'Failed asserting that user 1 successfully shared text.txt with user 4.' ); $this->assertContains( @@ -429,7 +429,7 @@ class Test_Share extends \Test\TestCase { $share = OCP\Share::getItemSharedWith('test', 'test.txt'); - $this->assertSame(\OCP\PERMISSION_ALL & ~OCP\PERMISSION_SHARE, $share['permissions'], + $this->assertSame(\OCP\Constants::PERMISSION_ALL & ~\OCP\Constants::PERMISSION_SHARE, $share['permissions'], 'Failed asserting that user 4 is excluded from re-sharing'); \OC_Appconfig::deleteKey('core', 'shareapi_exclude_groups_list'); @@ -440,7 +440,7 @@ class Test_Share extends \Test\TestCase { protected function shareUserOneTestFileWithGroupOne() { OC_User::setUserId($this->user1); $this->assertTrue( - OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_GROUP, $this->group1, OCP\PERMISSION_READ), + OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_GROUP, $this->group1, \OCP\Constants::PERMISSION_READ), 'Failed asserting that user 1 successfully shared text.txt with group 1.' ); $this->assertContains( @@ -468,7 +468,7 @@ class Test_Share extends \Test\TestCase { // Invalid shares $message = 'Sharing test.txt failed, because the group foobar does not exist'; try { - OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_GROUP, 'foobar', OCP\PERMISSION_READ); + OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_GROUP, 'foobar', \OCP\Constants::PERMISSION_READ); $this->fail('Exception was expected: '.$message); } catch (Exception $exception) { $this->assertEquals($message, $exception->getMessage()); @@ -477,7 +477,7 @@ class Test_Share extends \Test\TestCase { OC_Appconfig::setValue('core', 'shareapi_only_share_with_group_members', 'yes'); $message = 'Sharing test.txt failed, because '.$this->user1.' is not a member of the group '.$this->group2; try { - OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_GROUP, $this->group2, OCP\PERMISSION_READ); + OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_GROUP, $this->group2, \OCP\Constants::PERMISSION_READ); $this->fail('Exception was expected: '.$message); } catch (Exception $exception) { $this->assertEquals($message, $exception->getMessage()); @@ -491,7 +491,7 @@ class Test_Share extends \Test\TestCase { OC_User::setUserId($this->user1); $message = 'Sharing test.txt failed, because this item is already shared with '.$this->group1; try { - OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_GROUP, $this->group1, OCP\PERMISSION_READ); + OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_GROUP, $this->group1, \OCP\Constants::PERMISSION_READ); $this->fail('Exception was expected: '.$message); } catch (Exception $exception) { $this->assertEquals($message, $exception->getMessage()); @@ -501,7 +501,7 @@ class Test_Share extends \Test\TestCase { OC_User::setUserId($this->user2); $message = 'Sharing test.txt failed, because the user '.$this->user1.' is the original sharer'; try { - OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user1, OCP\PERMISSION_READ); + OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user1, \OCP\Constants::PERMISSION_READ); $this->fail('Exception was expected: '.$message); } catch (Exception $exception) { $this->assertEquals($message, $exception->getMessage()); @@ -510,7 +510,7 @@ class Test_Share extends \Test\TestCase { // Attempt to share back to group $message = 'Sharing test.txt failed, because this item is already shared with '.$this->group1; try { - OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_GROUP, $this->group1, OCP\PERMISSION_READ); + OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_GROUP, $this->group1, \OCP\Constants::PERMISSION_READ); $this->fail('Exception was expected: '.$message); } catch (Exception $exception) { $this->assertEquals($message, $exception->getMessage()); @@ -519,7 +519,7 @@ class Test_Share extends \Test\TestCase { // Attempt to share back to member of group $message ='Sharing test.txt failed, because this item is already shared with '.$this->user3; try { - OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user3, OCP\PERMISSION_READ); + OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user3, \OCP\Constants::PERMISSION_READ); $this->fail('Exception was expected: '.$message); } catch (Exception $exception) { $this->assertEquals($message, $exception->getMessage()); @@ -530,18 +530,18 @@ class Test_Share extends \Test\TestCase { $this->assertTrue(OCP\Share::unshare('test', 'test.txt', OCP\Share::SHARE_TYPE_GROUP, $this->group1)); // Valid share with same person - user then group - $this->assertTrue(OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, OCP\PERMISSION_READ | OCP\PERMISSION_DELETE | OCP\PERMISSION_SHARE)); - $this->assertTrue(OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_GROUP, $this->group1, OCP\PERMISSION_READ | OCP\PERMISSION_UPDATE)); + $this->assertTrue(OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_DELETE | \OCP\Constants::PERMISSION_SHARE)); + $this->assertTrue(OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_GROUP, $this->group1, \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE)); OC_User::setUserId($this->user2); $this->assertEquals(array('test.txt'), OCP\Share::getItemsSharedWith('test', Test_Share_Backend::FORMAT_TARGET)); - $this->assertEquals(array(OCP\PERMISSION_READ | OCP\PERMISSION_UPDATE | OCP\PERMISSION_DELETE | OCP\PERMISSION_SHARE), OCP\Share::getItemSharedWith('test', 'test.txt', Test_Share_Backend::FORMAT_PERMISSIONS)); + $this->assertEquals(array(\OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_DELETE | \OCP\Constants::PERMISSION_SHARE), OCP\Share::getItemSharedWith('test', 'test.txt', Test_Share_Backend::FORMAT_PERMISSIONS)); OC_User::setUserId($this->user3); $this->assertEquals(array('test.txt'), OCP\Share::getItemsSharedWith('test', Test_Share_Backend::FORMAT_TARGET)); - $this->assertEquals(array(OCP\PERMISSION_READ | OCP\PERMISSION_UPDATE), OCP\Share::getItemSharedWith('test', 'test.txt', Test_Share_Backend::FORMAT_PERMISSIONS)); + $this->assertEquals(array(\OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE), OCP\Share::getItemSharedWith('test', 'test.txt', Test_Share_Backend::FORMAT_PERMISSIONS)); // Valid reshare OC_User::setUserId($this->user2); - $this->assertTrue(OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user4, OCP\PERMISSION_READ)); + $this->assertTrue(OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user4, \OCP\Constants::PERMISSION_READ)); OC_User::setUserId($this->user4); $this->assertEquals(array('test.txt'), OCP\Share::getItemsSharedWith('test', Test_Share_Backend::FORMAT_TARGET)); @@ -549,26 +549,26 @@ class Test_Share extends \Test\TestCase { OC_User::setUserId($this->user1); $this->assertTrue(OCP\Share::unshare('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2)); OC_User::setUserId($this->user2); - $this->assertEquals(array(OCP\PERMISSION_READ | OCP\PERMISSION_UPDATE), OCP\Share::getItemSharedWith('test', 'test.txt', Test_Share_Backend::FORMAT_PERMISSIONS)); + $this->assertEquals(array(\OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE), OCP\Share::getItemSharedWith('test', 'test.txt', Test_Share_Backend::FORMAT_PERMISSIONS)); OC_User::setUserId($this->user4); $this->assertEquals(array('test.txt'), OCP\Share::getItemsSharedWith('test', Test_Share_Backend::FORMAT_TARGET)); // Valid share with same person - group then user OC_User::setUserId($this->user1); - $this->assertTrue(OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, OCP\PERMISSION_READ | OCP\PERMISSION_DELETE)); + $this->assertTrue(OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_DELETE)); OC_User::setUserId($this->user2); $this->assertEquals(array('test.txt'), OCP\Share::getItemsSharedWith('test', Test_Share_Backend::FORMAT_TARGET)); - $this->assertEquals(array(OCP\PERMISSION_READ | OCP\PERMISSION_UPDATE | OCP\PERMISSION_DELETE), OCP\Share::getItemSharedWith('test', 'test.txt', Test_Share_Backend::FORMAT_PERMISSIONS)); + $this->assertEquals(array(\OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_DELETE), OCP\Share::getItemSharedWith('test', 'test.txt', Test_Share_Backend::FORMAT_PERMISSIONS)); // Unshare from group only OC_User::setUserId($this->user1); $this->assertTrue(OCP\Share::unshare('test', 'test.txt', OCP\Share::SHARE_TYPE_GROUP, $this->group1)); OC_User::setUserId($this->user2); - $this->assertEquals(array(OCP\PERMISSION_READ | OCP\PERMISSION_DELETE), OCP\Share::getItemSharedWith('test', 'test.txt', Test_Share_Backend::FORMAT_PERMISSIONS)); + $this->assertEquals(array(\OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_DELETE), OCP\Share::getItemSharedWith('test', 'test.txt', Test_Share_Backend::FORMAT_PERMISSIONS)); // Attempt user specific target conflict OC_User::setUserId($this->user3); - $this->assertTrue(OCP\Share::shareItem('test', 'share.txt', OCP\Share::SHARE_TYPE_GROUP, $this->group1, OCP\PERMISSION_READ | OCP\PERMISSION_SHARE)); + $this->assertTrue(OCP\Share::shareItem('test', 'share.txt', OCP\Share::SHARE_TYPE_GROUP, $this->group1, \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_SHARE)); OC_User::setUserId($this->user2); $to_test = OCP\Share::getItemsSharedWith('test', Test_Share_Backend::FORMAT_TARGET); $this->assertEquals(2, count($to_test)); @@ -576,7 +576,7 @@ class Test_Share extends \Test\TestCase { $this->assertTrue(in_array('test1.txt', $to_test)); // Valid reshare - $this->assertTrue(OCP\Share::shareItem('test', 'share.txt', OCP\Share::SHARE_TYPE_USER, $this->user4, OCP\PERMISSION_READ | OCP\PERMISSION_SHARE)); + $this->assertTrue(OCP\Share::shareItem('test', 'share.txt', OCP\Share::SHARE_TYPE_USER, $this->user4, \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_SHARE)); OC_User::setUserId($this->user4); $this->assertEquals(array('test1.txt'), OCP\Share::getItemsSharedWith('test', Test_Share_Backend::FORMAT_TARGET)); @@ -628,7 +628,7 @@ class Test_Share extends \Test\TestCase { $this->assertTrue(OCP\Share::unshareAll('test', 'test.txt')); $this->assertTrue( - OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_GROUP, $this->groupAndUser, OCP\PERMISSION_READ), + OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_GROUP, $this->groupAndUser, \OCP\Constants::PERMISSION_READ), 'Failed asserting that user 1 successfully shared text.txt with group 1.' ); @@ -658,9 +658,53 @@ class Test_Share extends \Test\TestCase { return $row; } + public function testGetItemSharedWithUser() { + OC_User::setUserId($this->user1); + + //add dummy values to the share table + $query = \OC_DB::prepare('INSERT INTO `*PREFIX*share` (' + .' `item_type`, `item_source`, `item_target`, `share_type`,' + .' `share_with`, `uid_owner`) VALUES (?,?,?,?,?,?)'); + $args = array('test', 99, 'target1', OCP\Share::SHARE_TYPE_USER, $this->user2, $this->user1); + $query->execute($args); + $args = array('test', 99, 'target2', OCP\Share::SHARE_TYPE_USER, $this->user4, $this->user1); + $query->execute($args); + $args = array('test', 99, 'target3', OCP\Share::SHARE_TYPE_USER, $this->user3, $this->user2); + $query->execute($args); + $args = array('test', 99, 'target4', OCP\Share::SHARE_TYPE_USER, $this->user3, $this->user4); + $query->execute($args); + + + $result1 = \OCP\Share::getItemSharedWithUser('test', 99, $this->user2, $this->user1); + $this->assertSame(1, count($result1)); + $this->verifyResult($result1, array('target1')); + + $result2 = \OCP\Share::getItemSharedWithUser('test', 99, null, $this->user1); + $this->assertSame(2, count($result2)); + $this->verifyResult($result2, array('target1', 'target2')); + + $result3 = \OCP\Share::getItemSharedWithUser('test', 99, $this->user3); + $this->assertSame(2, count($result3)); + $this->verifyResult($result3, array('target3', 'target4')); + + $result4 = \OCP\Share::getItemSharedWithUser('test', 99, null, null); + $this->assertSame(4, count($result4)); + $this->verifyResult($result4, array('target1', 'target2', 'target3', 'target4')); + } + + public function verifyResult($result, $expected) { + foreach ($result as $r) { + if (in_array($r['item_target'], $expected)) { + $key = array_search($r['item_target'], $expected); + unset($expected[$key]); + } + } + $this->assertEmpty($expected, 'did not found all expected values'); + } + public function testShareItemWithLink() { OC_User::setUserId($this->user1); - $token = OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_LINK, null, OCP\PERMISSION_READ); + $token = OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_LINK, null, \OCP\Constants::PERMISSION_READ); $this->assertInternalType( 'string', $token, @@ -706,7 +750,7 @@ class Test_Share extends \Test\TestCase { \OC_Appconfig::setValue('core', 'shareapi_default_expire_date', 'yes'); \OC_Appconfig::setValue('core', 'shareapi_expire_after_n_days', '2'); - $token = OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_LINK, null, OCP\PERMISSION_READ); + $token = OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_LINK, null, \OCP\Constants::PERMISSION_READ); $this->assertInternalType( 'string', $token, @@ -832,20 +876,20 @@ class Test_Share extends \Test\TestCase { // one array with one share array( array( // input - array('item_source' => 1, 'permissions' => \OCP\PERMISSION_ALL, 'item_target' => 't1')), + array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_ALL, 'item_target' => 't1')), array( // expected result - array('item_source' => 1, 'permissions' => \OCP\PERMISSION_ALL, 'item_target' => 't1'))), + array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_ALL, 'item_target' => 't1'))), // two shares both point to the same source array( array( // input - array('item_source' => 1, 'permissions' => \OCP\PERMISSION_READ, 'item_target' => 't1'), - array('item_source' => 1, 'permissions' => \OCP\PERMISSION_UPDATE, 'item_target' => 't1'), + array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ, 'item_target' => 't1'), + array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't1'), ), array( // expected result - array('item_source' => 1, 'permissions' => \OCP\PERMISSION_READ | \OCP\PERMISSION_UPDATE, 'item_target' => 't1', + array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't1', 'grouped' => array( - array('item_source' => 1, 'permissions' => \OCP\PERMISSION_READ, 'item_target' => 't1'), - array('item_source' => 1, 'permissions' => \OCP\PERMISSION_UPDATE, 'item_target' => 't1'), + array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ, 'item_target' => 't1'), + array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't1'), ) ), ) @@ -853,29 +897,29 @@ class Test_Share extends \Test\TestCase { // two shares both point to the same source but with different targets array( array( // input - array('item_source' => 1, 'permissions' => \OCP\PERMISSION_READ, 'item_target' => 't1'), - array('item_source' => 1, 'permissions' => \OCP\PERMISSION_UPDATE, 'item_target' => 't2'), + array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ, 'item_target' => 't1'), + array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't2'), ), array( // expected result - array('item_source' => 1, 'permissions' => \OCP\PERMISSION_READ, 'item_target' => 't1'), - array('item_source' => 1, 'permissions' => \OCP\PERMISSION_UPDATE, 'item_target' => 't2'), + array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ, 'item_target' => 't1'), + array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't2'), ) ), // three shares two point to the same source array( array( // input - array('item_source' => 1, 'permissions' => \OCP\PERMISSION_READ, 'item_target' => 't1'), - array('item_source' => 2, 'permissions' => \OCP\PERMISSION_CREATE, 'item_target' => 't2'), - array('item_source' => 1, 'permissions' => \OCP\PERMISSION_UPDATE, 'item_target' => 't1'), + array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ, 'item_target' => 't1'), + array('item_source' => 2, 'permissions' => \OCP\Constants::PERMISSION_CREATE, 'item_target' => 't2'), + array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't1'), ), array( // expected result - array('item_source' => 1, 'permissions' => \OCP\PERMISSION_READ | \OCP\PERMISSION_UPDATE, 'item_target' => 't1', + array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't1', 'grouped' => array( - array('item_source' => 1, 'permissions' => \OCP\PERMISSION_READ, 'item_target' => 't1'), - array('item_source' => 1, 'permissions' => \OCP\PERMISSION_UPDATE, 'item_target' => 't1'), + array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ, 'item_target' => 't1'), + array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't1'), ) ), - array('item_source' => 2, 'permissions' => \OCP\PERMISSION_CREATE, 'item_target' => 't2'), + array('item_source' => 2, 'permissions' => \OCP\Constants::PERMISSION_CREATE, 'item_target' => 't2'), ) ), ); diff --git a/tests/lib/tags.php b/tests/lib/tags.php index ab714bde3df..533e6a19add 100644 --- a/tests/lib/tags.php +++ b/tests/lib/tags.php @@ -25,14 +25,18 @@ class Test_Tags extends \Test\TestCase { protected $objectType; protected $user; protected $backupGlobals = FALSE; + /** @var \OC\Tagging\TagMapper */ + protected $tagMapper; + /** @var \OC\TagManager */ + protected $tagMgr; protected function setUp() { parent::setUp(); OC_User::clearBackends(); OC_User::useBackend('dummy'); - $this->user = uniqid('user_'); - $this->objectType = uniqid('type_'); + $this->user = $this->getUniqueID('user_'); + $this->objectType = $this->getUniqueID('type_'); OC_User::createUser($this->user, 'pass'); OC_User::setUserId($this->user); $this->tagMapper = new OC\Tagging\TagMapper(\OC::$server->getDb()); @@ -205,7 +209,7 @@ class Test_Tags extends \Test\TestCase { $tagger = $this->tagMgr->load('test'); $tagger->tagAs(1, $test_tag); - $other_user = uniqid('user2_'); + $other_user = $this->getUniqueID('user2_'); OC_User::createUser($other_user, 'pass'); OC_User::setUserId($other_user); @@ -214,7 +218,7 @@ class Test_Tags extends \Test\TestCase { $this->assertFalse($other_tagger->hasTag($test_tag)); OC_User::setUserId($this->user); - OCP\Share::shareItem('test', 1, OCP\Share::SHARE_TYPE_USER, $other_user, OCP\PERMISSION_READ); + OCP\Share::shareItem('test', 1, OCP\Share::SHARE_TYPE_USER, $other_user, \OCP\Constants::PERMISSION_READ); OC_User::setUserId($other_user); $other_tagger = $other_tagMgr->load('test', array(), true); // Update tags, load shared ones. diff --git a/tests/lib/tempmanager.php b/tests/lib/tempmanager.php index 05311e820a7..c030eef2c9e 100644 --- a/tests/lib/tempmanager.php +++ b/tests/lib/tempmanager.php @@ -27,7 +27,7 @@ class TempManager extends \Test\TestCase { protected function setUp() { parent::setUp(); - $this->baseDir = get_temp_dir() . '/oc_tmp_test'; + $this->baseDir = get_temp_dir() . $this->getUniqueID('/oc_tmp_test'); if (!is_dir($this->baseDir)) { mkdir($this->baseDir); } @@ -39,7 +39,7 @@ class TempManager extends \Test\TestCase { } /** - * @param \Psr\Log\LoggerInterface $logger + * @param \OCP\ILogger $logger * @return \OC\TempManager */ protected function getManager($logger = null) { diff --git a/tests/lib/testcase.php b/tests/lib/testcase.php index 315cd6858ed..27c28329535 100644 --- a/tests/lib/testcase.php +++ b/tests/lib/testcase.php @@ -22,22 +22,130 @@ namespace Test; +use OCP\Security\ISecureRandom; + abstract class TestCase extends \PHPUnit_Framework_TestCase { - protected function getUniqueID($prefix = '', $length = 13) { - // Do not use dots and slashes as we use the value for file names + /** + * Returns a unique identifier as uniqid() is not reliable sometimes + * + * @param string $prefix + * @param int $length + * @return string + */ + protected static function getUniqueID($prefix = '', $length = 13) { return $prefix . \OC::$server->getSecureRandom()->getLowStrengthGenerator()->generate( $length, - '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' + // Do not use dots and slashes as we use the value for file names + ISecureRandom::CHAR_DIGITS . ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_UPPER ); } public static function tearDownAfterClass() { + $dataDir = \OC::$server->getConfig()->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data-autotest'); + + self::tearDownAfterClassCleanFileMapper($dataDir); + self::tearDownAfterClassCleanStorages(); + self::tearDownAfterClassCleanFileCache(); + self::tearDownAfterClassCleanStrayDataFiles($dataDir); + self::tearDownAfterClassCleanStrayHooks(); + self::tearDownAfterClassCleanProxies(); + + parent::tearDownAfterClass(); + } + + /** + * Remove all entries from the files map table + * @param string $dataDir + */ + static protected function tearDownAfterClassCleanFileMapper($dataDir) { if (\OC_Util::runningOnWindows()) { - $rootDirectory = \OC::$server->getConfig()->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data-autotest'); - $mapper = new \OC\Files\Mapper($rootDirectory); - $mapper->removePath($rootDirectory, true, true); + $mapper = new \OC\Files\Mapper($dataDir); + $mapper->removePath($dataDir, true, true); } + } - parent::tearDownAfterClass(); + /** + * Remove all entries from the storages table + * @throws \OC\DatabaseException + */ + static protected function tearDownAfterClassCleanStorages() { + $sql = 'DELETE FROM `*PREFIX*storages`'; + $query = \OC_DB::prepare($sql); + $query->execute(); + } + + /** + * Remove all entries from the filecache table + * @throws \OC\DatabaseException + */ + static protected function tearDownAfterClassCleanFileCache() { + $sql = 'DELETE FROM `*PREFIX*filecache`'; + $query = \OC_DB::prepare($sql); + $query->execute(); + } + + /** + * Remove all unused files from the data dir + * + * @param string $dataDir + */ + static protected function tearDownAfterClassCleanStrayDataFiles($dataDir) { + $knownEntries = array( + 'owncloud.log' => true, + 'owncloud.db' => true, + '.ocdata' => true, + '..' => true, + '.' => true, + ); + + if ($dh = opendir($dataDir)) { + while (($file = readdir($dh)) !== false) { + if (!isset($knownEntries[$file])) { + self::tearDownAfterClassCleanStrayDataUnlinkDir($dataDir . '/' . $file); + } + } + closedir($dh); + } + } + + /** + * Recursive delete files and folders from a given directory + * + * @param string $dir + */ + static protected function tearDownAfterClassCleanStrayDataUnlinkDir($dir) { + if ($dh = @opendir($dir)) { + while (($file = readdir($dh)) !== false) { + if ($file === '..' || $file === '.') { + continue; + } + $path = $dir . '/' . $file; + if (is_dir($path)) { + self::tearDownAfterClassCleanStrayDataUnlinkDir($path); + } + else { + @unlink($path); + } + } + closedir($dh); + } + @rmdir($dir); + } + + /** + * Clean up the list of hooks + */ + static protected function tearDownAfterClassCleanStrayHooks() { + \OC_Hook::clear(); + } + + /** + * Clean up the list of file proxies + * + * Also reenables file proxies, in case a test disabled them + */ + static protected function tearDownAfterClassCleanProxies() { + \OC_FileProxy::$enabled = true; + \OC_FileProxy::clearProxies(); } } diff --git a/tests/lib/updater.php b/tests/lib/updater.php index cc82450cfb6..155dccf78a7 100644 --- a/tests/lib/updater.php +++ b/tests/lib/updater.php @@ -10,7 +10,7 @@ namespace OC; class UpdaterTest extends \Test\TestCase { - public function testVersionCompatbility() { + public function versionCompatibilityTestData() { return array( array('1.0.0.0', '2.2.0', true), array('1.1.1.1', '2.0.0', true), @@ -24,7 +24,7 @@ class UpdaterTest extends \Test\TestCase { } /** - * @dataProvider testVersionCompatbility + * @dataProvider versionCompatibilityTestData */ function testIsUpgradePossible($oldVersion, $newVersion, $result) { $updater = new Updater(); diff --git a/tests/lib/util.php b/tests/lib/util.php index 6de599b070e..1ddbd2aba2b 100644 --- a/tests/lib/util.php +++ b/tests/lib/util.php @@ -150,7 +150,7 @@ class Test_Util extends \Test\TestCase { * Tests that the home storage is not wrapped when no quota exists. */ function testHomeStorageWrapperWithoutQuota() { - $user1 = uniqid(); + $user1 = $this->getUniqueID(); \OC_User::createUser($user1, 'test'); OC_Preferences::setValue($user1, 'files', 'quota', 'none'); \OC_User::setUserId($user1); @@ -172,7 +172,7 @@ class Test_Util extends \Test\TestCase { * Tests that the home storage is not wrapped when no quota exists. */ function testHomeStorageWrapperWithQuota() { - $user1 = uniqid(); + $user1 = $this->getUniqueID(); \OC_User::createUser($user1, 'test'); OC_Preferences::setValue($user1, 'files', 'quota', '1024'); \OC_User::setUserId($user1); @@ -331,7 +331,7 @@ class Test_Util extends \Test\TestCase { Dummy_OC_App::setEnabledApps($enabledApps); // need to set a user id to make sure enabled apps are read from cache - \OC_User::setUserId(uniqid()); + \OC_User::setUserId($this->getUniqueID()); \OCP\Config::setSystemValue('defaultapp', $defaultAppConfig); $this->assertEquals('http://localhost/' . $expectedPath, \OC_Util::getDefaultPageUrl()); diff --git a/tests/phpunit-autotest.xml b/tests/phpunit-autotest.xml index 282f5477c30..15e0e3dd408 100644 --- a/tests/phpunit-autotest.xml +++ b/tests/phpunit-autotest.xml @@ -20,8 +20,7 @@ <exclude> <directory suffix=".php">../3rdparty</directory> <directory suffix=".php">../apps/files/l10n</directory> - <directory suffix=".php">../apps/files_external/l10n</directory> - <directory suffix=".php">../apps/files_external/3rdparty</directory> + <directory suffix=".php">../apps/files_external</directory> <directory suffix=".php">../apps/files_versions/l10n</directory> <directory suffix=".php">../apps/files_encryption/l10n</directory> <directory suffix=".php">../apps/files_encryption/3rdparty</directory> @@ -39,11 +38,6 @@ </filter> <listeners> <listener class="StartSessionListener" file="startsessionlistener.php" /> - <listener class="TestCleanupListener" file="testcleanuplistener.php"> - <arguments> - <string>detail</string> - </arguments> - </listener> </listeners> </phpunit> diff --git a/tests/preseed-config.php b/tests/preseed-config.php index 3fd5b3cb7fc..3f41573bf29 100644 --- a/tests/preseed-config.php +++ b/tests/preseed-config.php @@ -1,22 +1,21 @@ <?php $CONFIG = array ( - "appstoreenabled" => false, - 'apps_paths' => - array ( - 0 => - array ( - 'path' => OC::$SERVERROOT.'/apps', - 'url' => '/apps', - 'writable' => true, - ), - 1 => - array ( - 'path' => OC::$SERVERROOT.'/apps2', - 'url' => '/apps2', - 'writable' => false, - ) - ), - + "appstoreenabled" => false, + 'apps_paths' => + array ( + 0 => + array ( + 'path' => OC::$SERVERROOT.'/apps', + 'url' => '/apps', + 'writable' => true, + ), + 1 => + array ( + 'path' => OC::$SERVERROOT.'/apps2', + 'url' => '/apps2', + 'writable' => false, + ) + ), ); if(substr(strtolower(PHP_OS), 0, 3) == "win") { diff --git a/tests/testcleanuplistener.php b/tests/testcleanuplistener.php deleted file mode 100644 index 7b442bbd4f7..00000000000 --- a/tests/testcleanuplistener.php +++ /dev/null @@ -1,176 +0,0 @@ -<?php -/** - * Copyright (c) 2013 Vincent Petry <pvince81@owncloud.com> - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ - -/** - * Detects tests that didn't clean up properly, show a warning, then clean up after them. - */ -class TestCleanupListener implements PHPUnit_Framework_TestListener { - private $verbosity; - - public function __construct($verbosity = 'verbose') { - $this->verbosity = $verbosity; - } - - public function addError(PHPUnit_Framework_Test $test, Exception $e, $time) { - } - - public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time) { - } - - public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time) { - } - - public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time) { - } - - public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time) { - } - - public function startTest(PHPUnit_Framework_Test $test) { - } - - public function endTest(PHPUnit_Framework_Test $test, $time) { - } - - public function startTestSuite(PHPUnit_Framework_TestSuite $suite) { - } - - public function endTestSuite(PHPUnit_Framework_TestSuite $suite) { - // don't clean up the test environment if a data provider finished - if (!($suite instanceof PHPUnit_Framework_TestSuite_DataProvider)) { - if ($this->cleanStorages() && $this->isShowSuiteWarning()) { - printf("TestSuite '%s': Did not clean up storages\n", $suite->getName()); - } - if ($this->cleanFileCache() && $this->isShowSuiteWarning()) { - printf("TestSuite '%s': Did not clean up file cache\n", $suite->getName()); - } - if ($this->cleanStrayDataFiles() && $this->isShowSuiteWarning()) { - printf("TestSuite '%s': Did not clean up data dir\n", $suite->getName()); - } - if ($this->cleanStrayHooks() && $this->isShowSuiteWarning()) { - printf("TestSuite '%s': Did not clean up hooks\n", $suite->getName()); - } - if ($this->cleanProxies() && $this->isShowSuiteWarning()) { - printf("TestSuite '%s': Did not clean up proxies\n", $suite->getName()); - } - } - } - - private function isShowSuiteWarning() { - return $this->verbosity === 'suite' || $this->verbosity === 'detail'; - } - - private function isShowDetail() { - return $this->verbosity === 'detail'; - } - - /** - * @param string $dir - */ - private function unlinkDir($dir) { - if ($dh = @opendir($dir)) { - while (($file = readdir($dh)) !== false) { - if ($file === '..' || $file === '.') { - continue; - } - $path = $dir . '/' . $file; - if (is_dir($path)) { - $this->unlinkDir($path); - } - else { - @unlink($path); - } - } - closedir($dh); - } - @rmdir($dir); - } - - private function cleanStrayDataFiles() { - $knownEntries = array( - 'owncloud.log' => true, - 'owncloud.db' => true, - '.ocdata' => true, - '..' => true, - '.' => true - ); - $datadir = \OC_Config::getValue('datadirectory', \OC::$SERVERROOT . '/data'); - $entries = array(); - if ($dh = opendir($datadir)) { - while (($file = readdir($dh)) !== false) { - if (!isset($knownEntries[$file])) { - $entries[] = $file; - } - } - closedir($dh); - } - - if (count($entries) > 0) { - foreach ($entries as $entry) { - $this->unlinkDir($datadir . '/' . $entry); - if ($this->isShowDetail()) { - printf("Stray datadir entry: %s\n", $entry); - } - } - return true; - } - - return false; - } - - private function cleanStorages() { - $sql = 'DELETE FROM `*PREFIX*storages`'; - $query = \OC_DB::prepare( $sql ); - $result = $query->execute(); - if ($result > 0) { - return true; - } - return false; - } - - private function cleanFileCache() { - $sql = 'DELETE FROM `*PREFIX*filecache`'; - $query = \OC_DB::prepare( $sql ); - $result = $query->execute(); - if ($result > 0) { - return true; - } - return false; - } - - private function cleanStrayHooks() { - $hasHooks = false; - $hooks = OC_Hook::getHooks(); - if (!$hooks || sizeof($hooks) === 0) { - return false; - } - - foreach ($hooks as $signalClass => $signals) { - if (sizeof($signals)) { - foreach ($signals as $signalName => $handlers ) { - if (sizeof($handlers) > 0) { - $hasHooks = true; - OC_Hook::clear($signalClass, $signalName); - if ($this->isShowDetail()) { - printf("Stray hook: \"%s\" \"%s\"\n", $signalClass, $signalName); - } - } - } - } - } - return $hasHooks; - } - - private function cleanProxies() { - $proxies = OC_FileProxy::getProxies(); - OC_FileProxy::clearProxies(); - // reenable in case some test failed to reenable them - OC_FileProxy::$enabled = true; - return count($proxies) > 0; - } -} |