summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files/l10n/en@pirate.js6
-rw-r--r--apps/files/l10n/en@pirate.json4
-rw-r--r--apps/files_external/l10n/en@pirate.js6
-rw-r--r--apps/files_external/l10n/en@pirate.json4
-rw-r--r--apps/files_external/l10n/ro.js47
-rw-r--r--apps/files_external/l10n/ro.json47
-rw-r--r--apps/files_sharing/l10n/en@pirate.js7
-rw-r--r--apps/files_sharing/l10n/en@pirate.json5
-rw-r--r--apps/user_ldap/l10n/en@pirate.js6
-rw-r--r--apps/user_ldap/l10n/en@pirate.json4
-rw-r--r--apps/user_ldap/l10n/fr.js1
-rw-r--r--apps/user_ldap/l10n/fr.json1
-rw-r--r--apps/user_ldap/l10n/pt_BR.js1
-rw-r--r--apps/user_ldap/l10n/pt_BR.json1
-rw-r--r--apps/user_ldap/user_ldap.php10
-rw-r--r--core/l10n/en@pirate.js6
-rw-r--r--core/l10n/en@pirate.json4
-rw-r--r--core/l10n/ro.js1
-rw-r--r--core/l10n/ro.json1
-rw-r--r--lib/base.php2
-rw-r--r--lib/l10n/de_DE.js2
-rw-r--r--lib/l10n/de_DE.json2
-rw-r--r--lib/l10n/en@pirate.js6
-rw-r--r--lib/l10n/en@pirate.json4
-rw-r--r--lib/private/User/Backend.php (renamed from lib/private/user/backend.php)28
-rw-r--r--lib/private/User/Database.php (renamed from lib/private/user/database.php)32
-rw-r--r--lib/private/User/LoginException.php (renamed from lib/private/user/loginexception.php)0
-rw-r--r--lib/private/User/Manager.php (renamed from lib/private/user/manager.php)6
-rw-r--r--lib/private/User/NoUserException.php (renamed from lib/private/user/nouserexception.php)0
-rw-r--r--lib/private/User/Session.php (renamed from lib/private/user/session.php)0
-rw-r--r--lib/private/User/User.php (renamed from lib/private/user/user.php)14
-rw-r--r--lib/private/legacy/helper.php31
-rw-r--r--lib/private/legacy/user.php2
-rw-r--r--lib/private/legacy/user/backend.php67
-rw-r--r--lib/private/legacy/user/interface.php (renamed from lib/private/user/interface.php)0
-rw-r--r--lib/private/template/functions.php6
-rw-r--r--settings/l10n/en@pirate.js6
-rw-r--r--settings/l10n/en@pirate.json4
-rw-r--r--settings/l10n/ro.js1
-rw-r--r--settings/l10n/ro.json1
-rw-r--r--tests/lib/user.php2
-rw-r--r--tests/lib/user/backend.php2
-rw-r--r--tests/lib/user/database.php2
-rw-r--r--tests/lib/user/manager.php4
-rw-r--r--tests/lib/user/user.php80
-rw-r--r--tests/lib/util/user/dummy.php4
-rw-r--r--tests/settings/controller/userscontrollertest.php4
47 files changed, 254 insertions, 220 deletions
diff --git a/apps/files/l10n/en@pirate.js b/apps/files/l10n/en@pirate.js
deleted file mode 100644
index 5c456a089fe..00000000000
--- a/apps/files/l10n/en@pirate.js
+++ /dev/null
@@ -1,6 +0,0 @@
-OC.L10N.register(
- "files",
- {
- "Download" : "Download"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files/l10n/en@pirate.json b/apps/files/l10n/en@pirate.json
deleted file mode 100644
index a8fb4073298..00000000000
--- a/apps/files/l10n/en@pirate.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{ "translations": {
- "Download" : "Download"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_external/l10n/en@pirate.js b/apps/files_external/l10n/en@pirate.js
deleted file mode 100644
index 7345429f750..00000000000
--- a/apps/files_external/l10n/en@pirate.js
+++ /dev/null
@@ -1,6 +0,0 @@
-OC.L10N.register(
- "files_external",
- {
- "Password" : "Secret Code"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_external/l10n/en@pirate.json b/apps/files_external/l10n/en@pirate.json
deleted file mode 100644
index bde5153f309..00000000000
--- a/apps/files_external/l10n/en@pirate.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{ "translations": {
- "Password" : "Secret Code"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/files_external/l10n/ro.js b/apps/files_external/l10n/ro.js
index e097cbb5c15..a7f40aa4544 100644
--- a/apps/files_external/l10n/ro.js
+++ b/apps/files_external/l10n/ro.js
@@ -1,36 +1,79 @@
OC.L10N.register(
"files_external",
{
+ "Step 1 failed. Exception: %s" : "Pasul 1 a eșuat. Excepție: %s",
+ "Step 2 failed. Exception: %s" : "Pasul 2 a eșuat. Excepție: %s",
"External storage" : "Stocare externă",
"Personal" : "Personal",
"Grant access" : "Permite accesul",
"Access granted" : "Acces permis",
+ "Generate keys" : "Generează chei",
+ "Error generating key pair" : "Eroarea la generarea cheilor",
+ "(group)" : "(grup)",
+ "Admin defined" : "Administrator definit",
"Saved" : "Salvat",
+ "Empty response from the server" : "Răspuns nul de la server",
+ "external-storage" : "Stocare externă",
"Username" : "Nume utilizator",
"Password" : "Parolă",
+ "Credentials saved" : "Detalii de autentificare salvate",
+ "Credentials saving failed" : "Salvarea detaliilor de autentificare a eșuat",
+ "Credentials required" : "Detalii de autentificare necesare",
"Save" : "Salvează",
+ "Access key" : "Cheie de acces",
+ "Secret key" : "Cheie secretă",
+ "Builtin" : "Inclus",
"None" : "Niciuna",
+ "OAuth1" : "OAuth1",
+ "App key" : "Cheie aplicație",
+ "App secret" : "Secret aplicație",
+ "OAuth2" : "OAuth2",
+ "Client ID" : "ID client",
+ "Client secret" : "Secret client",
+ "OpenStack" : "OpenStack",
+ "Tenant name" : "Nume titular",
"API key" : "Cheie API",
+ "Username and password" : "Nume de utilizator și parolă",
+ "RSA public key" : "Cheie publică RSA",
"Public key" : "Cheie publică",
"Amazon S3" : "Amazon S3",
- "Hostname" : "Hostname",
- "Port" : "Portul",
+ "Hostname" : "Nume mașină",
+ "Port" : "Port",
"Region" : "Regiune",
+ "Enable SSL" : "Activează SSL",
"WebDAV" : "WebDAV",
"URL" : "URL",
+ "Secure https://" : "https:// sigur",
"Dropbox" : "Dropbox",
+ "FTP" : "FTP",
"Host" : "Gazdă",
+ "Secure ftps://" : "ftps:// sigur",
+ "Google Drive" : "Google Drive",
"Local" : "Local",
"Location" : "Locație",
"ownCloud" : "ownCloud",
+ "SFTP" : "SFTP",
"Root" : "Root",
+ "SFTP with secret key login" : "SFTP cu cheie secretă de autentificare",
+ "SMB / CIFS" : "SMB / CIFS",
"Share" : "Partajează",
+ "Domain" : "Domeniu",
+ "SMB / CIFS using OC login" : "SMB / CIFS folosind autentificare OC",
+ "Service name" : "Nume serviciu",
"Name" : "Nume",
"Storage type" : "Tip stocare",
+ "Enable encryption" : "Activează criptarea",
+ "Enable previews" : "Activează previzualizările",
+ "Enable sharing" : "Activează partajarea",
+ "Check for changes" : "Verifică dacă au intervenit modificări",
+ "Never" : "Niciodată",
"External Storage" : "Stocare externă",
"Folder name" : "Denumire director",
+ "Authentication" : "Autentificare",
"Configuration" : "Configurație",
+ "Available for" : "Disponibil pentru",
"Add storage" : "Adauga stocare",
+ "Advanced settings" : "Setări avansate",
"Delete" : "Șterge",
"Allow users to mount the following external storage" : "Permite utilizatorilor să monteze următoarea unitate de stocare"
},
diff --git a/apps/files_external/l10n/ro.json b/apps/files_external/l10n/ro.json
index 14bfe656c1c..e8c158fbbc7 100644
--- a/apps/files_external/l10n/ro.json
+++ b/apps/files_external/l10n/ro.json
@@ -1,34 +1,77 @@
{ "translations": {
+ "Step 1 failed. Exception: %s" : "Pasul 1 a eșuat. Excepție: %s",
+ "Step 2 failed. Exception: %s" : "Pasul 2 a eșuat. Excepție: %s",
"External storage" : "Stocare externă",
"Personal" : "Personal",
"Grant access" : "Permite accesul",
"Access granted" : "Acces permis",
+ "Generate keys" : "Generează chei",
+ "Error generating key pair" : "Eroarea la generarea cheilor",
+ "(group)" : "(grup)",
+ "Admin defined" : "Administrator definit",
"Saved" : "Salvat",
+ "Empty response from the server" : "Răspuns nul de la server",
+ "external-storage" : "Stocare externă",
"Username" : "Nume utilizator",
"Password" : "Parolă",
+ "Credentials saved" : "Detalii de autentificare salvate",
+ "Credentials saving failed" : "Salvarea detaliilor de autentificare a eșuat",
+ "Credentials required" : "Detalii de autentificare necesare",
"Save" : "Salvează",
+ "Access key" : "Cheie de acces",
+ "Secret key" : "Cheie secretă",
+ "Builtin" : "Inclus",
"None" : "Niciuna",
+ "OAuth1" : "OAuth1",
+ "App key" : "Cheie aplicație",
+ "App secret" : "Secret aplicație",
+ "OAuth2" : "OAuth2",
+ "Client ID" : "ID client",
+ "Client secret" : "Secret client",
+ "OpenStack" : "OpenStack",
+ "Tenant name" : "Nume titular",
"API key" : "Cheie API",
+ "Username and password" : "Nume de utilizator și parolă",
+ "RSA public key" : "Cheie publică RSA",
"Public key" : "Cheie publică",
"Amazon S3" : "Amazon S3",
- "Hostname" : "Hostname",
- "Port" : "Portul",
+ "Hostname" : "Nume mașină",
+ "Port" : "Port",
"Region" : "Regiune",
+ "Enable SSL" : "Activează SSL",
"WebDAV" : "WebDAV",
"URL" : "URL",
+ "Secure https://" : "https:// sigur",
"Dropbox" : "Dropbox",
+ "FTP" : "FTP",
"Host" : "Gazdă",
+ "Secure ftps://" : "ftps:// sigur",
+ "Google Drive" : "Google Drive",
"Local" : "Local",
"Location" : "Locație",
"ownCloud" : "ownCloud",
+ "SFTP" : "SFTP",
"Root" : "Root",
+ "SFTP with secret key login" : "SFTP cu cheie secretă de autentificare",
+ "SMB / CIFS" : "SMB / CIFS",
"Share" : "Partajează",
+ "Domain" : "Domeniu",
+ "SMB / CIFS using OC login" : "SMB / CIFS folosind autentificare OC",
+ "Service name" : "Nume serviciu",
"Name" : "Nume",
"Storage type" : "Tip stocare",
+ "Enable encryption" : "Activează criptarea",
+ "Enable previews" : "Activează previzualizările",
+ "Enable sharing" : "Activează partajarea",
+ "Check for changes" : "Verifică dacă au intervenit modificări",
+ "Never" : "Niciodată",
"External Storage" : "Stocare externă",
"Folder name" : "Denumire director",
+ "Authentication" : "Autentificare",
"Configuration" : "Configurație",
+ "Available for" : "Disponibil pentru",
"Add storage" : "Adauga stocare",
+ "Advanced settings" : "Setări avansate",
"Delete" : "Șterge",
"Allow users to mount the following external storage" : "Permite utilizatorilor să monteze următoarea unitate de stocare"
},"pluralForm" :"nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));"
diff --git a/apps/files_sharing/l10n/en@pirate.js b/apps/files_sharing/l10n/en@pirate.js
deleted file mode 100644
index 84e0fabadc6..00000000000
--- a/apps/files_sharing/l10n/en@pirate.js
+++ /dev/null
@@ -1,7 +0,0 @@
-OC.L10N.register(
- "files_sharing",
- {
- "Password" : "Secret Code",
- "Download" : "Download"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/files_sharing/l10n/en@pirate.json b/apps/files_sharing/l10n/en@pirate.json
deleted file mode 100644
index ec5b5f4b272..00000000000
--- a/apps/files_sharing/l10n/en@pirate.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{ "translations": {
- "Password" : "Secret Code",
- "Download" : "Download"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/user_ldap/l10n/en@pirate.js b/apps/user_ldap/l10n/en@pirate.js
deleted file mode 100644
index 0670deb5fbc..00000000000
--- a/apps/user_ldap/l10n/en@pirate.js
+++ /dev/null
@@ -1,6 +0,0 @@
-OC.L10N.register(
- "user_ldap",
- {
- "Password" : "Passcode"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/user_ldap/l10n/en@pirate.json b/apps/user_ldap/l10n/en@pirate.json
deleted file mode 100644
index 6f74658eb82..00000000000
--- a/apps/user_ldap/l10n/en@pirate.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{ "translations": {
- "Password" : "Passcode"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/user_ldap/l10n/fr.js b/apps/user_ldap/l10n/fr.js
index 6f5679e0d6b..89f258bd750 100644
--- a/apps/user_ldap/l10n/fr.js
+++ b/apps/user_ldap/l10n/fr.js
@@ -96,6 +96,7 @@ OC.L10N.register(
"Test Base DN" : "Tester le DN de base",
"Avoids automatic LDAP requests. Better for bigger setups, but requires some LDAP knowledge." : "Évite les requêtes LDAP automatiques. Mieux pour les installations de grande ampleur, mais demande des connaissances en LDAP.",
"Manually enter LDAP filters (recommended for large directories)" : "Saisir les filtres LDAP manuellement (recommandé pour les annuaires de grande ampleur)",
+ "%s access is limited to users meeting these criteria:" : "L'accès à %s est limité aux utilisateurs validant ces critères :",
"The most common object classes for users are organizationalPerson, person, user, and inetOrgPerson. If you are not sure which object class to select, please consult your directory admin." : "Les classes d'objets fréquentes pour les utilisateurs sont : organizationalPerson, person, user et inetOrgPerson. Si vous n'êtes pas sûr de la classe à utiliser, demandez à l'administrateur de l'annuaire.",
"The filter specifies which LDAP users shall have access to the %s instance." : "Le filtre spécifie quels utilisateurs LDAP auront accès à l'instance %s.",
"Verify settings and count users" : "Vérifier les paramètres et compter les utilisateurs",
diff --git a/apps/user_ldap/l10n/fr.json b/apps/user_ldap/l10n/fr.json
index caa754af7d8..f5f0c2f6082 100644
--- a/apps/user_ldap/l10n/fr.json
+++ b/apps/user_ldap/l10n/fr.json
@@ -94,6 +94,7 @@
"Test Base DN" : "Tester le DN de base",
"Avoids automatic LDAP requests. Better for bigger setups, but requires some LDAP knowledge." : "Évite les requêtes LDAP automatiques. Mieux pour les installations de grande ampleur, mais demande des connaissances en LDAP.",
"Manually enter LDAP filters (recommended for large directories)" : "Saisir les filtres LDAP manuellement (recommandé pour les annuaires de grande ampleur)",
+ "%s access is limited to users meeting these criteria:" : "L'accès à %s est limité aux utilisateurs validant ces critères :",
"The most common object classes for users are organizationalPerson, person, user, and inetOrgPerson. If you are not sure which object class to select, please consult your directory admin." : "Les classes d'objets fréquentes pour les utilisateurs sont : organizationalPerson, person, user et inetOrgPerson. Si vous n'êtes pas sûr de la classe à utiliser, demandez à l'administrateur de l'annuaire.",
"The filter specifies which LDAP users shall have access to the %s instance." : "Le filtre spécifie quels utilisateurs LDAP auront accès à l'instance %s.",
"Verify settings and count users" : "Vérifier les paramètres et compter les utilisateurs",
diff --git a/apps/user_ldap/l10n/pt_BR.js b/apps/user_ldap/l10n/pt_BR.js
index ee03bdb2b5c..3674a7788fb 100644
--- a/apps/user_ldap/l10n/pt_BR.js
+++ b/apps/user_ldap/l10n/pt_BR.js
@@ -96,6 +96,7 @@ OC.L10N.register(
"Test Base DN" : "Teste Base DN",
"Avoids automatic LDAP requests. Better for bigger setups, but requires some LDAP knowledge." : "Evita pedidos LDAP automáticos. Melhor para configurações maiores, mas requer algum conhecimento LDAP.",
"Manually enter LDAP filters (recommended for large directories)" : "Inserir manualmente filtros LDAP (recomendado para grandes diretórios)",
+ "%s access is limited to users meeting these criteria:" : "%s o acesso está limitado aos usuários que atentam a esse critério:",
"The most common object classes for users are organizationalPerson, person, user, and inetOrgPerson. If you are not sure which object class to select, please consult your directory admin." : "As classes de objetos mais comuns para os usuários são organizationalPerson, pessoa, usuário e inetOrgPerson. Se você não tem certeza de qual classe de objeto selecionar, por favor, consulte o seu administrador do diretório.",
"The filter specifies which LDAP users shall have access to the %s instance." : "O filtro especifica quais usuários LDAP devem ter acesso à instância do %s.",
"Verify settings and count users" : "Verificar configurações e contas de usuários",
diff --git a/apps/user_ldap/l10n/pt_BR.json b/apps/user_ldap/l10n/pt_BR.json
index 18670bb715d..4d2ba5444c2 100644
--- a/apps/user_ldap/l10n/pt_BR.json
+++ b/apps/user_ldap/l10n/pt_BR.json
@@ -94,6 +94,7 @@
"Test Base DN" : "Teste Base DN",
"Avoids automatic LDAP requests. Better for bigger setups, but requires some LDAP knowledge." : "Evita pedidos LDAP automáticos. Melhor para configurações maiores, mas requer algum conhecimento LDAP.",
"Manually enter LDAP filters (recommended for large directories)" : "Inserir manualmente filtros LDAP (recomendado para grandes diretórios)",
+ "%s access is limited to users meeting these criteria:" : "%s o acesso está limitado aos usuários que atentam a esse critério:",
"The most common object classes for users are organizationalPerson, person, user, and inetOrgPerson. If you are not sure which object class to select, please consult your directory admin." : "As classes de objetos mais comuns para os usuários são organizationalPerson, pessoa, usuário e inetOrgPerson. Se você não tem certeza de qual classe de objeto selecionar, por favor, consulte o seu administrador do diretório.",
"The filter specifies which LDAP users shall have access to the %s instance." : "O filtro especifica quais usuários LDAP devem ter acesso à instância do %s.",
"Verify settings and count users" : "Verificar configurações e contas de usuários",
diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php
index 224cf5c9a35..d6b345faf4b 100644
--- a/apps/user_ldap/user_ldap.php
+++ b/apps/user_ldap/user_ldap.php
@@ -419,11 +419,11 @@ class USER_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserIn
* compared with OC_USER_BACKEND_CREATE_USER etc.
*/
public function implementsActions($actions) {
- return (bool)((\OC_User_Backend::CHECK_PASSWORD
- | \OC_User_Backend::GET_HOME
- | \OC_User_Backend::GET_DISPLAYNAME
- | \OC_User_Backend::PROVIDE_AVATAR
- | \OC_User_Backend::COUNT_USERS)
+ return (bool)((\OC\User\Backend::CHECK_PASSWORD
+ | \OC\User\Backend::GET_HOME
+ | \OC\User\Backend::GET_DISPLAYNAME
+ | \OC\User\Backend::PROVIDE_AVATAR
+ | \OC\User\Backend::COUNT_USERS)
& $actions);
}
diff --git a/core/l10n/en@pirate.js b/core/l10n/en@pirate.js
deleted file mode 100644
index adc62c8c962..00000000000
--- a/core/l10n/en@pirate.js
+++ /dev/null
@@ -1,6 +0,0 @@
-OC.L10N.register(
- "core",
- {
- "Password" : "Passcode"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/core/l10n/en@pirate.json b/core/l10n/en@pirate.json
deleted file mode 100644
index 6f74658eb82..00000000000
--- a/core/l10n/en@pirate.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{ "translations": {
- "Password" : "Passcode"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/core/l10n/ro.js b/core/l10n/ro.js
index 04cf948f6f0..156763ed6ae 100644
--- a/core/l10n/ro.js
+++ b/core/l10n/ro.js
@@ -136,6 +136,7 @@ OC.L10N.register(
"Could not unshare" : "Nu s-a putut elimina partajarea",
"Share details could not be loaded for this item." : "Nu s-au putut încărca detaliile de partajare pentru acest element.",
"Share" : "Partajează",
+ "Share with people on other ownClouds using the syntax username@example.com/owncloud" : "Partajează cu persoane din alte instanțe ownCloud folosind sintaxa nume_utilizator@exemplu.com/owncloud",
"Share with users…" : "Partajează cu utilizatori...",
"Warning" : "Atenție",
"invisible" : "invizibil",
diff --git a/core/l10n/ro.json b/core/l10n/ro.json
index 002f6a0c8dc..c2245791fa5 100644
--- a/core/l10n/ro.json
+++ b/core/l10n/ro.json
@@ -134,6 +134,7 @@
"Could not unshare" : "Nu s-a putut elimina partajarea",
"Share details could not be loaded for this item." : "Nu s-au putut încărca detaliile de partajare pentru acest element.",
"Share" : "Partajează",
+ "Share with people on other ownClouds using the syntax username@example.com/owncloud" : "Partajează cu persoane din alte instanțe ownCloud folosind sintaxa nume_utilizator@exemplu.com/owncloud",
"Share with users…" : "Partajează cu utilizatori...",
"Warning" : "Atenție",
"invisible" : "invizibil",
diff --git a/lib/base.php b/lib/base.php
index badbe3cd1f8..0ea8a117e98 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -619,7 +619,7 @@ class OC {
self::$server->getSession()->set('user_id', '');
}
- OC_User::useBackend(new OC_User_Database());
+ OC_User::useBackend(new \OC\User\Database());
OC_Group::useBackend(new OC_Group_Database());
// Subscribe to the hook
diff --git a/lib/l10n/de_DE.js b/lib/l10n/de_DE.js
index 6728937e1ba..2b3b63e254b 100644
--- a/lib/l10n/de_DE.js
+++ b/lib/l10n/de_DE.js
@@ -155,7 +155,7 @@ OC.L10N.register(
"Check the value of \"datadirectory\" in your configuration" : "Überprüfen Sie bitte die Angabe unter „datadirectory“ in Ihrer Konfiguration",
"Data directory (%s) is invalid" : "Daten-Verzeichnis (%s) ist ungültig",
"Please check that the data directory contains a file \".ocdata\" in its root." : "Bitte stellen Sie sicher, dass das Datenverzeichnis auf seiner ersten Ebene eine Datei namens „.ocdata“ enthält.",
- "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"" : "Nur die follgenden Zeichen sind im Benutzernamen erlaubt: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"",
+ "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"" : "Nur die folgenden Zeichen sind im Benutzernamen erlaubt: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"",
"A valid username must be provided" : "Es muss ein gültiger Benutzername angegeben werden",
"Username contains whitespace at the beginning or at the end" : "Benutzername enthält Leerzeichen am Anfang oder Ende",
"A valid password must be provided" : "Es muss ein gültiges Passwort angegeben werden",
diff --git a/lib/l10n/de_DE.json b/lib/l10n/de_DE.json
index 3823b09ada1..09bd0495259 100644
--- a/lib/l10n/de_DE.json
+++ b/lib/l10n/de_DE.json
@@ -153,7 +153,7 @@
"Check the value of \"datadirectory\" in your configuration" : "Überprüfen Sie bitte die Angabe unter „datadirectory“ in Ihrer Konfiguration",
"Data directory (%s) is invalid" : "Daten-Verzeichnis (%s) ist ungültig",
"Please check that the data directory contains a file \".ocdata\" in its root." : "Bitte stellen Sie sicher, dass das Datenverzeichnis auf seiner ersten Ebene eine Datei namens „.ocdata“ enthält.",
- "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"" : "Nur die follgenden Zeichen sind im Benutzernamen erlaubt: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"",
+ "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"" : "Nur die folgenden Zeichen sind im Benutzernamen erlaubt: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"",
"A valid username must be provided" : "Es muss ein gültiger Benutzername angegeben werden",
"Username contains whitespace at the beginning or at the end" : "Benutzername enthält Leerzeichen am Anfang oder Ende",
"A valid password must be provided" : "Es muss ein gültiges Passwort angegeben werden",
diff --git a/lib/l10n/en@pirate.js b/lib/l10n/en@pirate.js
deleted file mode 100644
index ade0ad04df4..00000000000
--- a/lib/l10n/en@pirate.js
+++ /dev/null
@@ -1,6 +0,0 @@
-OC.L10N.register(
- "lib",
- {
- "web services under your control" : "web services under your control"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/lib/l10n/en@pirate.json b/lib/l10n/en@pirate.json
deleted file mode 100644
index 8bbc4280fae..00000000000
--- a/lib/l10n/en@pirate.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{ "translations": {
- "web services under your control" : "web services under your control"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/lib/private/user/backend.php b/lib/private/User/Backend.php
index 2bb1df4d6b3..d5f82dc9621 100644
--- a/lib/private/user/backend.php
+++ b/lib/private/User/Backend.php
@@ -32,37 +32,13 @@
*
*/
-/**
- * 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);
+namespace OC\User;
/**
* Abstract base class for user management. Provides methods for querying backend
* capabilities.
*/
-abstract class OC_User_Backend implements \OCP\UserInterface {
+abstract class Backend implements \OCP\UserInterface {
/**
* error code for functions not provided by the user backend
*/
diff --git a/lib/private/user/database.php b/lib/private/User/Database.php
index fd273055ae1..7a4b58e6f40 100644
--- a/lib/private/user/database.php
+++ b/lib/private/User/Database.php
@@ -48,12 +48,14 @@
*
*/
+namespace OC\User;
+
use OC\Cache\CappedMemoryCache;
/**
* Class for user management in a SQL Database (e.g. MySQL, SQLite)
*/
-class OC_User_Database extends OC_User_Backend implements \OCP\IUserBackend {
+class Database extends \OC\User\Backend implements \OCP\IUserBackend {
/** @var CappedMemoryCache */
private $cache;
@@ -75,7 +77,7 @@ class OC_User_Database extends OC_User_Backend implements \OCP\IUserBackend {
*/
public function createUser($uid, $password) {
if (!$this->userExists($uid)) {
- $query = OC_DB::prepare('INSERT INTO `*PREFIX*users` ( `uid`, `password` ) VALUES( ?, ? )');
+ $query = \OC_DB::prepare('INSERT INTO `*PREFIX*users` ( `uid`, `password` ) VALUES( ?, ? )');
$result = $query->execute(array($uid, \OC::$server->getHasher()->hash($password)));
return $result ? true : false;
@@ -93,7 +95,7 @@ class OC_User_Database extends OC_User_Backend implements \OCP\IUserBackend {
*/
public function deleteUser($uid) {
// Delete user-group-relation
- $query = OC_DB::prepare('DELETE FROM `*PREFIX*users` WHERE `uid` = ?');
+ $query = \OC_DB::prepare('DELETE FROM `*PREFIX*users` WHERE `uid` = ?');
$result = $query->execute(array($uid));
if (isset($this->cache[$uid])) {
@@ -113,7 +115,7 @@ class OC_User_Database extends OC_User_Backend implements \OCP\IUserBackend {
*/
public function setPassword($uid, $password) {
if ($this->userExists($uid)) {
- $query = OC_DB::prepare('UPDATE `*PREFIX*users` SET `password` = ? WHERE `uid` = ?');
+ $query = \OC_DB::prepare('UPDATE `*PREFIX*users` SET `password` = ? WHERE `uid` = ?');
$result = $query->execute(array(\OC::$server->getHasher()->hash($password), $uid));
return $result ? true : false;
@@ -132,7 +134,7 @@ class OC_User_Database extends OC_User_Backend implements \OCP\IUserBackend {
*/
public function setDisplayName($uid, $displayName) {
if ($this->userExists($uid)) {
- $query = OC_DB::prepare('UPDATE `*PREFIX*users` SET `displayname` = ? WHERE LOWER(`uid`) = LOWER(?)');
+ $query = \OC_DB::prepare('UPDATE `*PREFIX*users` SET `displayname` = ? WHERE LOWER(`uid`) = LOWER(?)');
$query->execute(array($displayName, $uid));
$this->cache[$uid]['displayname'] = $displayName;
@@ -171,7 +173,7 @@ class OC_User_Database extends OC_User_Backend implements \OCP\IUserBackend {
}
$displayNames = array();
- $query = OC_DB::prepare('SELECT `uid`, `displayname` FROM `*PREFIX*users`'
+ $query = \OC_DB::prepare('SELECT `uid`, `displayname` FROM `*PREFIX*users`'
. $searchLike .' ORDER BY `uid` ASC', $limit, $offset);
$result = $query->execute($parameters);
while ($row = $result->fetchRow()) {
@@ -191,7 +193,7 @@ class OC_User_Database extends OC_User_Backend implements \OCP\IUserBackend {
* returns the user id or false
*/
public function checkPassword($uid, $password) {
- $query = OC_DB::prepare('SELECT `uid`, `password` FROM `*PREFIX*users` WHERE LOWER(`uid`) = LOWER(?)');
+ $query = \OC_DB::prepare('SELECT `uid`, `password` FROM `*PREFIX*users` WHERE LOWER(`uid`) = LOWER(?)');
$result = $query->execute(array($uid));
$row = $result->fetchRow();
@@ -217,11 +219,11 @@ class OC_User_Database extends OC_User_Backend implements \OCP\IUserBackend {
*/
private function loadUser($uid) {
if (empty($this->cache[$uid])) {
- $query = OC_DB::prepare('SELECT `uid`, `displayname` FROM `*PREFIX*users` WHERE LOWER(`uid`) = LOWER(?)');
+ $query = \OC_DB::prepare('SELECT `uid`, `displayname` FROM `*PREFIX*users` WHERE LOWER(`uid`) = LOWER(?)');
$result = $query->execute(array($uid));
if ($result === false) {
- \OCP\Util::writeLog('core', OC_DB::getErrorMessage(), \OCP\Util::ERROR);
+ \OCP\Util::writeLog('core', \OC_DB::getErrorMessage(), \OCP\Util::ERROR);
return false;
}
@@ -250,7 +252,7 @@ class OC_User_Database extends OC_User_Backend implements \OCP\IUserBackend {
$searchLike = ' WHERE LOWER(`uid`) LIKE LOWER(?)';
}
- $query = OC_DB::prepare('SELECT `uid` FROM `*PREFIX*users`' . $searchLike . ' ORDER BY `uid` ASC', $limit, $offset);
+ $query = \OC_DB::prepare('SELECT `uid` FROM `*PREFIX*users`' . $searchLike . ' ORDER BY `uid` ASC', $limit, $offset);
$result = $query->execute($parameters);
$users = array();
while ($row = $result->fetchRow()) {
@@ -276,7 +278,7 @@ class OC_User_Database extends OC_User_Backend implements \OCP\IUserBackend {
*/
public function getHome($uid) {
if ($this->userExists($uid)) {
- return \OC::$server->getConfig()->getSystemValue("datadirectory", OC::$SERVERROOT . "/data") . '/' . $uid;
+ return \OC::$server->getConfig()->getSystemValue("datadirectory", \OC::$SERVERROOT . "/data") . '/' . $uid;
}
return false;
@@ -295,10 +297,10 @@ class OC_User_Database extends OC_User_Backend implements \OCP\IUserBackend {
* @return int|bool
*/
public function countUsers() {
- $query = OC_DB::prepare('SELECT COUNT(*) FROM `*PREFIX*users`');
+ $query = \OC_DB::prepare('SELECT COUNT(*) FROM `*PREFIX*users`');
$result = $query->execute();
if ($result === false) {
- \OCP\Util::writeLog('core', OC_DB::getErrorMessage(), \OCP\Util::ERROR);
+ \OCP\Util::writeLog('core', \OC_DB::getErrorMessage(), \OCP\Util::ERROR);
return false;
}
return $result->fetchOne();
@@ -333,8 +335,8 @@ class OC_User_Database extends OC_User_Backend implements \OCP\IUserBackend {
$backends = \OC::$server->getUserManager()->getBackends();
foreach ($backends as $backend) {
- if ($backend instanceof \OC_User_Database) {
- /** @var \OC_User_Database $backend */
+ if ($backend instanceof \OC\User\Database) {
+ /** @var \OC\User\Database $backend */
$uid = $backend->loginName2UserName($param['uid']);
if ($uid !== false) {
$param['uid'] = $uid;
diff --git a/lib/private/user/loginexception.php b/lib/private/User/LoginException.php
index 84426f7f5da..84426f7f5da 100644
--- a/lib/private/user/loginexception.php
+++ b/lib/private/User/LoginException.php
diff --git a/lib/private/user/manager.php b/lib/private/User/Manager.php
index 37a3e5ba134..a9d9425e24d 100644
--- a/lib/private/user/manager.php
+++ b/lib/private/User/Manager.php
@@ -186,7 +186,7 @@ class Manager extends PublicEmitter implements IUserManager {
$password = str_replace("\0", '', $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);
@@ -290,7 +290,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));
@@ -308,7 +308,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($backend instanceof IUserBackend) {
diff --git a/lib/private/user/nouserexception.php b/lib/private/User/NoUserException.php
index afd5c729fcf..afd5c729fcf 100644
--- a/lib/private/user/nouserexception.php
+++ b/lib/private/User/NoUserException.php
diff --git a/lib/private/user/session.php b/lib/private/User/Session.php
index c7f8a6920de..c7f8a6920de 100644
--- a/lib/private/user/session.php
+++ b/lib/private/User/Session.php
diff --git a/lib/private/user/user.php b/lib/private/User/User.php
index 36680436769..66ecbd18534 100644
--- a/lib/private/user/user.php
+++ b/lib/private/User/User.php
@@ -110,7 +110,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)) {
@@ -135,7 +135,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)) {
$result = $this->backend->setDisplayName($this->uid, $displayName);
if ($result) {
$this->displayName = $displayName;
@@ -230,7 +230,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));
@@ -248,7 +248,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;
@@ -277,7 +277,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;
@@ -289,7 +289,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);
}
/**
@@ -301,7 +301,7 @@ class User implements IUser {
if ($this->config->getSystemValue('allow_user_to_change_display_name') === false) {
return false;
}
- return $this->backend->implementsActions(\OC_User_Backend::SET_DISPLAYNAME);
+ return $this->backend->implementsActions(\OC\User\Backend::SET_DISPLAYNAME);
}
/**
diff --git a/lib/private/legacy/helper.php b/lib/private/legacy/helper.php
index e6aaed0fd15..29ee1be76b4 100644
--- a/lib/private/legacy/helper.php
+++ b/lib/private/legacy/helper.php
@@ -67,21 +67,6 @@ class OC_Helper {
}
/**
- * get path to preview of file
- * @param string $path path
- * @return string the url
- *
- * Returns the path to the preview of the file.
- */
- public static function previewIcon($path) {
- return \OC::$server->getURLGenerator()->linkToRoute('core_ajax_preview', ['x' => 32, 'y' => 32, 'file' => $path]);
- }
-
- public static function publicPreviewIcon( $path, $token ) {
- return \OC::$server->getURLGenerator()->linkToRoute('core_ajax_public_preview', ['x' => 32, 'y' => 32, 'file' => $path, 't' => $token]);
- }
-
- /**
* Make a human file size
* @param int $bytes file size in bytes
* @return string a human readable file size
@@ -463,22 +448,6 @@ class OC_Helper {
}
/**
- * Shortens str to maxlen by replacing characters in the middle with '...', eg.
- * ellipsis('a very long string with lots of useless info to make a better example', 14) becomes 'a very ...example'
- *
- * @param string $str the string
- * @param string $maxlen the maximum length of the result
- * @return string with at most maxlen characters
- */
- public static function ellipsis($str, $maxlen) {
- if (strlen($str) > $maxlen) {
- $characters = floor($maxlen / 2);
- return substr($str, 0, $characters) . '...' . substr($str, -1 * $characters);
- }
- return $str;
- }
-
- /**
* calculates the maximum upload size respecting system settings, free space and user quota
*
* @param string $dir the current folder where the user currently operates
diff --git a/lib/private/legacy/user.php b/lib/private/legacy/user.php
index f0e829bbe33..7855b5e7059 100644
--- a/lib/private/legacy/user.php
+++ b/lib/private/legacy/user.php
@@ -94,7 +94,7 @@ class OC_User {
case 'mysql':
case 'sqlite':
\OCP\Util::writeLog('core', 'Adding user backend ' . $backend . '.', \OCP\Util::DEBUG);
- self::$_usedBackends[$backend] = new OC_User_Database();
+ self::$_usedBackends[$backend] = new \OC\User\Database();
\OC::$server->getUserManager()->registerBackend(self::$_usedBackends[$backend]);
break;
case 'dummy':
diff --git a/lib/private/legacy/user/backend.php b/lib/private/legacy/user/backend.php
new file mode 100644
index 00000000000..42c7b9aa126
--- /dev/null
+++ b/lib/private/legacy/user/backend.php
@@ -0,0 +1,67 @@
+<?php
+/**
+ * @author Aldo "xoen" Giambelluca <xoen@xoen.org>
+ * @author Bart Visscher <bartv@thisnet.nl>
+ * @author Björn Schießle <schiessle@owncloud.com>
+ * @author Dominik Schmidt <dev@dominik-schmidt.de>
+ * @author Georg Ehrke <georg@owncloud.com>
+ * @author Jakob Sack <mail@jakobsack.de>
+ * @author Joas Schilling <nickvergessen@owncloud.com>
+ * @author Jörn Friedrich Dreyer <jfd@butonic.de>
+ * @author Lukas Reschke <lukas@owncloud.com>
+ * @author Morris Jobke <hey@morrisjobke.de>
+ * @author Robin Appelman <icewind@owncloud.com>
+ * @author Sam Tuke <mail@samtuke.com>
+ * @author Thomas Müller <thomas.mueller@tmit.eu>
+ * @author Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
+ *
+ * @copyright Copyright (c) 2016, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+/**
+ * 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);
+
+/**
+ * Abstract base class for user management. Provides methods for querying backend
+ * capabilities.
+ */
+abstract class OC_User_Backend extends \OC\User\Backend implements \OCP\UserInterface {
+
+}
diff --git a/lib/private/user/interface.php b/lib/private/legacy/user/interface.php
index d2868a79c2c..d2868a79c2c 100644
--- a/lib/private/user/interface.php
+++ b/lib/private/legacy/user/interface.php
diff --git a/lib/private/template/functions.php b/lib/private/template/functions.php
index a57b3575ba9..a0540420e29 100644
--- a/lib/private/template/functions.php
+++ b/lib/private/template/functions.php
@@ -184,18 +184,16 @@ function mimetype_icon( $mimetype ) {
* Returns the path to the preview of the image.
* @param string $path path of file
* @return link to the preview
- *
- * For further information have a look at OC_Helper::previewIcon
*/
function preview_icon( $path ) {
- return OC_Helper::previewIcon( $path );
+ return \OC::$server->getURLGenerator()->linkToRoute('core_ajax_preview', ['x' => 32, 'y' => 32, 'file' => $path]);
}
/**
* @param string $path
*/
function publicPreview_icon ( $path, $token ) {
- return OC_Helper::publicPreviewIcon( $path, $token );
+ return \OC::$server->getURLGenerator()->linkToRoute('core_ajax_public_preview', ['x' => 32, 'y' => 32, 'file' => $path, 't' => $token]);
}
/**
diff --git a/settings/l10n/en@pirate.js b/settings/l10n/en@pirate.js
deleted file mode 100644
index f9293f8094c..00000000000
--- a/settings/l10n/en@pirate.js
+++ /dev/null
@@ -1,6 +0,0 @@
-OC.L10N.register(
- "settings",
- {
- "Password" : "Passcode"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/settings/l10n/en@pirate.json b/settings/l10n/en@pirate.json
deleted file mode 100644
index 6f74658eb82..00000000000
--- a/settings/l10n/en@pirate.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{ "translations": {
- "Password" : "Passcode"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/settings/l10n/ro.js b/settings/l10n/ro.js
index c0bbbd94f42..2484ce4b60d 100644
--- a/settings/l10n/ro.js
+++ b/settings/l10n/ro.js
@@ -73,6 +73,7 @@ OC.L10N.register(
"days" : "zile",
"Allow resharing" : "Permite repartajarea",
"Execute one task with each page loaded" : "Execută o sarcină la fiecare pagină încărcată",
+ "Enable encryption" : "Activează criptarea",
"Send mode" : "Modul de expediere",
"Encryption" : "Încriptare",
"Authentication method" : "Modul de autentificare",
diff --git a/settings/l10n/ro.json b/settings/l10n/ro.json
index 25028195714..e9807ae3359 100644
--- a/settings/l10n/ro.json
+++ b/settings/l10n/ro.json
@@ -71,6 +71,7 @@
"days" : "zile",
"Allow resharing" : "Permite repartajarea",
"Execute one task with each page loaded" : "Execută o sarcină la fiecare pagină încărcată",
+ "Enable encryption" : "Activează criptarea",
"Send mode" : "Modul de expediere",
"Encryption" : "Încriptare",
"Authentication method" : "Modul de autentificare",
diff --git a/tests/lib/user.php b/tests/lib/user.php
index c4c74cbc254..dc5551d1cad 100644
--- a/tests/lib/user.php
+++ b/tests/lib/user.php
@@ -18,7 +18,7 @@ namespace Test;
*/
class User extends TestCase {
/**
- * @var \OC_User_Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend
*/
private $backend;
diff --git a/tests/lib/user/backend.php b/tests/lib/user/backend.php
index c2040f4e3be..d5bbbe9f406 100644
--- a/tests/lib/user/backend.php
+++ b/tests/lib/user/backend.php
@@ -32,7 +32,7 @@
abstract class Test_User_Backend extends \Test\TestCase {
/**
- * @var OC_User_Backend $backend
+ * @var \OC\User\Backend $backend
*/
protected $backend;
diff --git a/tests/lib/user/database.php b/tests/lib/user/database.php
index ba44d333a8c..0dea037ad78 100644
--- a/tests/lib/user/database.php
+++ b/tests/lib/user/database.php
@@ -37,7 +37,7 @@ class Test_User_Database extends Test_User_Backend {
protected function setUp() {
parent::setUp();
- $this->backend=new OC_User_Database();
+ $this->backend=new \OC\User\Database();
}
protected function tearDown() {
diff --git a/tests/lib/user/manager.php b/tests/lib/user/manager.php
index 90e2f67c995..14221e4a665 100644
--- a/tests/lib/user/manager.php
+++ b/tests/lib/user/manager.php
@@ -118,7 +118,7 @@ class Manager extends \Test\TestCase {
public function testCheckPassword() {
/**
- * @var \OC_User_Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend
*/
$backend = $this->getMock('\Test\Util\User\Dummy');
$backend->expects($this->once())
@@ -145,7 +145,7 @@ class Manager extends \Test\TestCase {
public function testCheckPasswordNotSupported() {
/**
- * @var \OC_User_Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend
*/
$backend = $this->getMock('\Test\Util\User\Dummy');
$backend->expects($this->never())
diff --git a/tests/lib/user/user.php b/tests/lib/user/user.php
index a8d688d9c88..0a972f7bdaa 100644
--- a/tests/lib/user/user.php
+++ b/tests/lib/user/user.php
@@ -21,9 +21,9 @@ use OC\Hooks\PublicEmitter;
class User extends \Test\TestCase {
public function testDisplayName() {
/**
- * @var \OC_User_Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend
*/
- $backend = $this->getMock('\OC_User_Backend');
+ $backend = $this->getMock('\OC\User\Backend');
$backend->expects($this->once())
->method('getDisplayName')
->with($this->equalTo('foo'))
@@ -31,7 +31,7 @@ class User extends \Test\TestCase {
$backend->expects($this->any())
->method('implementsActions')
- ->with($this->equalTo(\OC_USER_BACKEND_GET_DISPLAYNAME))
+ ->with($this->equalTo(\OC\User\Backend::GET_DISPLAYNAME))
->will($this->returnValue(true));
$user = new \OC\User\User('foo', $backend);
@@ -43,9 +43,9 @@ class User extends \Test\TestCase {
*/
public function testDisplayNameEmpty() {
/**
- * @var \OC_User_Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend
*/
- $backend = $this->getMock('\OC_User_Backend');
+ $backend = $this->getMock('\OC\User\Backend');
$backend->expects($this->once())
->method('getDisplayName')
->with($this->equalTo('foo'))
@@ -53,7 +53,7 @@ class User extends \Test\TestCase {
$backend->expects($this->any())
->method('implementsActions')
- ->with($this->equalTo(\OC_USER_BACKEND_GET_DISPLAYNAME))
+ ->with($this->equalTo(\OC\User\Backend::GET_DISPLAYNAME))
->will($this->returnValue(true));
$user = new \OC\User\User('foo', $backend);
@@ -62,15 +62,15 @@ class User extends \Test\TestCase {
public function testDisplayNameNotSupported() {
/**
- * @var \OC_User_Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend
*/
- $backend = $this->getMock('\OC_User_Backend');
+ $backend = $this->getMock('\OC\User\Backend');
$backend->expects($this->never())
->method('getDisplayName');
$backend->expects($this->any())
->method('implementsActions')
- ->with($this->equalTo(\OC_USER_BACKEND_GET_DISPLAYNAME))
+ ->with($this->equalTo(\OC\User\Backend::GET_DISPLAYNAME))
->will($this->returnValue(false));
$user = new \OC\User\User('foo', $backend);
@@ -79,7 +79,7 @@ class User extends \Test\TestCase {
public function testSetPassword() {
/**
- * @var \OC_User_Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend
*/
$backend = $this->getMock('\Test\Util\User\Dummy');
$backend->expects($this->once())
@@ -89,7 +89,7 @@ class User extends \Test\TestCase {
$backend->expects($this->any())
->method('implementsActions')
->will($this->returnCallback(function ($actions) {
- if ($actions === \OC_USER_BACKEND_SET_PASSWORD) {
+ if ($actions === \OC\User\Backend::SET_PASSWORD) {
return true;
} else {
return false;
@@ -102,7 +102,7 @@ class User extends \Test\TestCase {
public function testSetPasswordNotSupported() {
/**
- * @var \OC_User_Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend
*/
$backend = $this->getMock('\Test\Util\User\Dummy');
$backend->expects($this->never())
@@ -118,7 +118,7 @@ class User extends \Test\TestCase {
public function testChangeAvatarSupportedYes() {
/**
- * @var \OC_User_Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend
*/
require_once 'avataruserdummy.php';
$backend = $this->getMock('Avatar_User_Dummy');
@@ -130,7 +130,7 @@ class User extends \Test\TestCase {
$backend->expects($this->any())
->method('implementsActions')
->will($this->returnCallback(function ($actions) {
- if ($actions === \OC_USER_BACKEND_PROVIDE_AVATAR) {
+ if ($actions === \OC\User\Backend::PROVIDE_AVATAR) {
return true;
} else {
return false;
@@ -143,7 +143,7 @@ class User extends \Test\TestCase {
public function testChangeAvatarSupportedNo() {
/**
- * @var \OC_User_Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend
*/
require_once 'avataruserdummy.php';
$backend = $this->getMock('Avatar_User_Dummy');
@@ -155,7 +155,7 @@ class User extends \Test\TestCase {
$backend->expects($this->any())
->method('implementsActions')
->will($this->returnCallback(function ($actions) {
- if ($actions === \OC_USER_BACKEND_PROVIDE_AVATAR) {
+ if ($actions === \OC\User\Backend::PROVIDE_AVATAR) {
return true;
} else {
return false;
@@ -168,7 +168,7 @@ class User extends \Test\TestCase {
public function testChangeAvatarNotSupported() {
/**
- * @var \OC_User_Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend
*/
require_once 'avataruserdummy.php';
$backend = $this->getMock('Avatar_User_Dummy');
@@ -187,7 +187,7 @@ class User extends \Test\TestCase {
public function testDelete() {
/**
- * @var \OC_User_Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend
*/
$backend = $this->getMock('\Test\Util\User\Dummy');
$backend->expects($this->once())
@@ -200,7 +200,7 @@ class User extends \Test\TestCase {
public function testGetHome() {
/**
- * @var \OC_User_Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend
*/
$backend = $this->getMock('\Test\Util\User\Dummy');
$backend->expects($this->once())
@@ -211,7 +211,7 @@ class User extends \Test\TestCase {
$backend->expects($this->any())
->method('implementsActions')
->will($this->returnCallback(function ($actions) {
- if ($actions === \OC_USER_BACKEND_GET_HOME) {
+ if ($actions === \OC\User\Backend::GET_HOME) {
return true;
} else {
return false;
@@ -225,13 +225,13 @@ class User extends \Test\TestCase {
public function testGetBackendClassName() {
$user = new \OC\User\User('foo', new \Test\Util\User\Dummy());
$this->assertEquals('Dummy', $user->getBackendClassName());
- $user = new \OC\User\User('foo', new \OC_User_Database());
+ $user = new \OC\User\User('foo', new \OC\User\Database());
$this->assertEquals('Database', $user->getBackendClassName());
}
public function testGetHomeNotSupported() {
/**
- * @var \OC_User_Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend
*/
$backend = $this->getMock('\Test\Util\User\Dummy');
$backend->expects($this->never())
@@ -258,14 +258,14 @@ class User extends \Test\TestCase {
public function testCanChangePassword() {
/**
- * @var \OC_User_Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend
*/
$backend = $this->getMock('\Test\Util\User\Dummy');
$backend->expects($this->any())
->method('implementsActions')
->will($this->returnCallback(function ($actions) {
- if ($actions === \OC_USER_BACKEND_SET_PASSWORD) {
+ if ($actions === \OC\User\Backend::SET_PASSWORD) {
return true;
} else {
return false;
@@ -278,7 +278,7 @@ class User extends \Test\TestCase {
public function testCanChangePasswordNotSupported() {
/**
- * @var \OC_User_Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend
*/
$backend = $this->getMock('\Test\Util\User\Dummy');
@@ -292,14 +292,14 @@ class User extends \Test\TestCase {
public function testCanChangeDisplayName() {
/**
- * @var \OC_User_Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend
*/
$backend = $this->getMock('\Test\Util\User\Dummy');
$backend->expects($this->any())
->method('implementsActions')
->will($this->returnCallback(function ($actions) {
- if ($actions === \OC_USER_BACKEND_SET_DISPLAYNAME) {
+ if ($actions === \OC\User\Backend::SET_DISPLAYNAME) {
return true;
} else {
return false;
@@ -312,7 +312,7 @@ class User extends \Test\TestCase {
public function testCanChangeDisplayNameNotSupported() {
/**
- * @var \OC_User_Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend
*/
$backend = $this->getMock('\Test\Util\User\Dummy');
@@ -326,14 +326,14 @@ class User extends \Test\TestCase {
public function testSetDisplayNameSupported() {
/**
- * @var \OC_User_Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend
*/
- $backend = $this->getMock('\OC_User_Database');
+ $backend = $this->getMock('\OC\User\Database');
$backend->expects($this->any())
->method('implementsActions')
->will($this->returnCallback(function ($actions) {
- if ($actions === \OC_USER_BACKEND_SET_DISPLAYNAME) {
+ if ($actions === \OC\User\Backend::SET_DISPLAYNAME) {
return true;
} else {
return false;
@@ -355,14 +355,14 @@ class User extends \Test\TestCase {
*/
public function testSetDisplayNameEmpty() {
/**
- * @var \OC_User_Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend
*/
- $backend = $this->getMock('\OC_User_Database');
+ $backend = $this->getMock('\OC\User\Database');
$backend->expects($this->any())
->method('implementsActions')
->will($this->returnCallback(function ($actions) {
- if ($actions === \OC_USER_BACKEND_SET_DISPLAYNAME) {
+ if ($actions === \OC\User\Backend::SET_DISPLAYNAME) {
return true;
} else {
return false;
@@ -376,9 +376,9 @@ class User extends \Test\TestCase {
public function testSetDisplayNameNotSupported() {
/**
- * @var \OC_User_Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend
*/
- $backend = $this->getMock('\OC_User_Database');
+ $backend = $this->getMock('\OC\User\Database');
$backend->expects($this->any())
->method('implementsActions')
@@ -399,7 +399,7 @@ class User extends \Test\TestCase {
$test = $this;
/**
- * @var \OC_User_Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend
*/
$backend = $this->getMock('\Test\Util\User\Dummy');
$backend->expects($this->once())
@@ -422,7 +422,7 @@ class User extends \Test\TestCase {
$backend->expects($this->any())
->method('implementsActions')
->will($this->returnCallback(function ($actions) {
- if ($actions === \OC_USER_BACKEND_SET_PASSWORD) {
+ if ($actions === \OC\User\Backend::SET_PASSWORD) {
return true;
} else {
return false;
@@ -440,7 +440,7 @@ class User extends \Test\TestCase {
$test = $this;
/**
- * @var \OC_User_Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend
*/
$backend = $this->getMock('\Test\Util\User\Dummy');
$backend->expects($this->once())
@@ -465,7 +465,7 @@ class User extends \Test\TestCase {
public function testGetCloudId() {
/**
- * @var \OC_User_Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend
*/
$backend = $this->getMock('\Test\Util\User\Dummy');
$urlGenerator = $this->getMockBuilder('\OC\URLGenerator')
diff --git a/tests/lib/util/user/dummy.php b/tests/lib/util/user/dummy.php
index 6e23e22ab67..ea47f5d7d15 100644
--- a/tests/lib/util/user/dummy.php
+++ b/tests/lib/util/user/dummy.php
@@ -27,12 +27,12 @@
namespace Test\Util\User;
-use OC_User_Backend;
+use \OC\User\Backend;
/**
* dummy user backend, does not keep state, only for testing use
*/
-class Dummy extends OC_User_Backend implements \OCP\IUserBackend {
+class Dummy extends Backend implements \OCP\IUserBackend {
private $users = array();
private $displayNames = array();
diff --git a/tests/settings/controller/userscontrollertest.php b/tests/settings/controller/userscontrollertest.php
index 6f07f34ba8d..2a2b53d8ff8 100644
--- a/tests/settings/controller/userscontrollertest.php
+++ b/tests/settings/controller/userscontrollertest.php
@@ -668,7 +668,7 @@ class UsersControllerTest extends \Test\TestCase {
$this->container['UserManager']
->expects($this->once())
->method('getBackends')
- ->will($this->returnValue([new \Test\Util\User\Dummy(), new \OC_User_Database()]));
+ ->will($this->returnValue([new \Test\Util\User\Dummy(), new \OC\User\Database()]));
$this->container['UserManager']
->expects($this->once())
->method('clearBackends');
@@ -716,7 +716,7 @@ class UsersControllerTest extends \Test\TestCase {
$this->container['UserManager']
->expects($this->once())
->method('getBackends')
- ->will($this->returnValue([new \Test\Util\User\Dummy(), new \OC_User_Database()]));
+ ->will($this->returnValue([new \Test\Util\User\Dummy(), new \OC\User\Database()]));
$this->container['UserManager']
->expects($this->once())
->method('search')