diff options
Diffstat (limited to 'apps/user_ldap')
32 files changed, 141 insertions, 90 deletions
diff --git a/apps/user_ldap/appinfo/app.php b/apps/user_ldap/appinfo/app.php index 89410b5ef07..81eaa0404b7 100644 --- a/apps/user_ldap/appinfo/app.php +++ b/apps/user_ldap/appinfo/app.php @@ -24,7 +24,7 @@ OCP\App::registerAdmin('user_ldap', 'settings'); $configPrefixes = OCA\user_ldap\lib\Helper::getServerConfigurationPrefixes(true); -if(count($configPrefixes) == 1) { +if(count($configPrefixes) === 1) { $connector = new OCA\user_ldap\lib\Connection($configPrefixes[0]); $userBackend = new OCA\user_ldap\USER_LDAP(); $userBackend->setConnector($connector); diff --git a/apps/user_ldap/appinfo/install.php b/apps/user_ldap/appinfo/install.php index 378957ec409..c0c33a25c75 100644 --- a/apps/user_ldap/appinfo/install.php +++ b/apps/user_ldap/appinfo/install.php @@ -1,6 +1,6 @@ <?php $state = OCP\Config::getSystemValue('ldapIgnoreNamingRules', 'doSet'); -if($state == 'doSet') { +if($state === 'doSet') { OCP\Config::setSystemValue('ldapIgnoreNamingRules', false); } diff --git a/apps/user_ldap/appinfo/update.php b/apps/user_ldap/appinfo/update.php index 2fcbf1902ac..179451dad69 100644 --- a/apps/user_ldap/appinfo/update.php +++ b/apps/user_ldap/appinfo/update.php @@ -18,7 +18,7 @@ if(!is_null($pw)) { //detect if we can switch on naming guidelines. We won't do it on conflicts. //it's a bit spaghetti, but hey. $state = OCP\Config::getSystemValue('ldapIgnoreNamingRules', 'unset'); -if($state == 'unset') { +if($state === 'unset') { OCP\Config::setSystemValue('ldapIgnoreNamingRules', false); } @@ -48,7 +48,7 @@ foreach($objects as $object) { $newDN = escapeDN(mb_strtolower($dn['ldap_dn'], 'UTF-8')); if(!empty($dn['directory_uuid'])) { $uuid = $dn['directory_uuid']; - } elseif($object == 'user') { + } elseif($object === 'user') { $uuid = $userBE->getUUID($newDN); //fix home folder to avoid new ones depending on the configuration $userBE->getHome($dn['owncloud_name']); diff --git a/apps/user_ldap/group_ldap.php b/apps/user_ldap/group_ldap.php index 432ddd215db..04ff392f920 100644 --- a/apps/user_ldap/group_ldap.php +++ b/apps/user_ldap/group_ldap.php @@ -66,7 +66,7 @@ class GROUP_LDAP extends lib\Access implements \OCP\GroupInterface { //extra work if we don't get back user DNs //TODO: this can be done with one LDAP query - if(strtolower($this->connection->ldapGroupMemberAssocAttr) == 'memberuid') { + if(strtolower($this->connection->ldapGroupMemberAssocAttr) === 'memberuid') { $dns = array(); foreach($members as $mid) { $filter = str_replace('%uid', $mid, $this->connection->ldapLoginFilter); @@ -108,11 +108,11 @@ class GROUP_LDAP extends lib\Access implements \OCP\GroupInterface { } //uniqueMember takes DN, memberuid the uid, so we need to distinguish - if((strtolower($this->connection->ldapGroupMemberAssocAttr) == 'uniquemember') - || (strtolower($this->connection->ldapGroupMemberAssocAttr) == 'member') + if((strtolower($this->connection->ldapGroupMemberAssocAttr) === 'uniquemember') + || (strtolower($this->connection->ldapGroupMemberAssocAttr) === 'member') ) { $uid = $userDN; - } else if(strtolower($this->connection->ldapGroupMemberAssocAttr) == 'memberuid') { + } else if(strtolower($this->connection->ldapGroupMemberAssocAttr) === 'memberuid') { $result = $this->readAttribute($userDN, 'uid'); $uid = $result[0]; } else { @@ -157,7 +157,7 @@ class GROUP_LDAP extends lib\Access implements \OCP\GroupInterface { return $groupUsers; } - if($limit == -1) { + if($limit === -1) { $limit = null; } $groupDN = $this->groupname2dn($gid); @@ -175,7 +175,7 @@ class GROUP_LDAP extends lib\Access implements \OCP\GroupInterface { } $groupUsers = array(); - $isMemberUid = (strtolower($this->connection->ldapGroupMemberAssocAttr) == 'memberuid'); + $isMemberUid = (strtolower($this->connection->ldapGroupMemberAssocAttr) === 'memberuid'); foreach($members as $member) { if($isMemberUid) { //we got uids, need to get their DNs to 'tranlsate' them to usernames diff --git a/apps/user_ldap/js/settings.js b/apps/user_ldap/js/settings.js index e34849ec887..9279dc0203b 100644 --- a/apps/user_ldap/js/settings.js +++ b/apps/user_ldap/js/settings.js @@ -8,13 +8,13 @@ var LdapConfiguration = { OC.filePath('user_ldap','ajax','getConfiguration.php'), $('#ldap_serverconfig_chooser').serialize(), function (result) { - if(result.status == 'success') { + if(result.status === 'success') { $.each(result.configuration, function(configkey, configvalue) { elementID = '#'+configkey; //deal with Checkboxes if($(elementID).is('input[type=checkbox]')) { - if(configvalue == 1) { + if(configvalue === 1) { $(elementID).attr('checked', 'checked'); } else { $(elementID).removeAttr('checked'); @@ -37,13 +37,13 @@ var LdapConfiguration = { resetDefaults: function() { $('#ldap').find('input[type=text], input[type=number], input[type=password], textarea, select').each(function() { - if($(this).attr('id') == 'ldap_serverconfig_chooser') { + if($(this).attr('id') === 'ldap_serverconfig_chooser') { return; } $(this).val($(this).attr('data-default')); }); $('#ldap').find('input[type=checkbox]').each(function() { - if($(this).attr('data-default') == 1) { + if($(this).attr('data-default') === 1) { $(this).attr('checked', 'checked'); } else { $(this).removeAttr('checked'); @@ -56,7 +56,7 @@ var LdapConfiguration = { OC.filePath('user_ldap','ajax','deleteConfiguration.php'), $('#ldap_serverconfig_chooser').serialize(), function (result) { - if(result.status == 'success') { + if(result.status === 'success') { $('#ldap_serverconfig_chooser option:selected').remove(); $('#ldap_serverconfig_chooser option:first').select(); LdapConfiguration.refreshConfig(); @@ -74,7 +74,7 @@ var LdapConfiguration = { $.post( OC.filePath('user_ldap','ajax','getNewServerConfigPrefix.php'), function (result) { - if(result.status == 'success') { + if(result.status === 'success') { if(doNotAsk) { LdapConfiguration.resetDefaults(); } else { @@ -115,7 +115,7 @@ $(document).ready(function() { OC.filePath('user_ldap','ajax','testConfiguration.php'), $('#ldap').serialize(), function (result) { - if (result.status == 'success') { + if (result.status === 'success') { OC.dialogs.alert( result.message, t('user_ldap', 'Connection test succeeded') @@ -150,7 +150,7 @@ $(document).ready(function() { $('#ldap').serialize(), function (result) { bgcolor = $('#ldap_submit').css('background'); - if (result.status == 'success') { + if (result.status === 'success') { //the dealing with colors is a but ugly, but the jQuery version in use has issues with rgba colors $('#ldap_submit').css('background', '#fff'); $('#ldap_submit').effect('highlight', {'color':'#A8FA87'}, 5000, function() { @@ -168,7 +168,7 @@ $(document).ready(function() { $('#ldap_serverconfig_chooser').change(function(event) { value = $('#ldap_serverconfig_chooser option:selected:first').attr('value'); - if(value == 'NEW') { + if(value === 'NEW') { LdapConfiguration.addConfiguration(false); } else { LdapConfiguration.refreshConfig(); diff --git a/apps/user_ldap/l10n/ca.php b/apps/user_ldap/l10n/ca.php index abdecb164e8..8f2799b6e68 100644 --- a/apps/user_ldap/l10n/ca.php +++ b/apps/user_ldap/l10n/ca.php @@ -15,7 +15,7 @@ "<b>Warning:</b> The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Avís:</b> El mòdul PHP LDAP no està instal·lat, el dorsal no funcionarà. Demaneu a l'administrador del sistema que l'instal·li.", "Server configuration" => "Configuració del servidor", "Add Server Configuration" => "Afegeix la configuració del servidor", -"Host" => "Màquina", +"Host" => "Equip remot", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Podeu ometre el protocol, excepte si requeriu SSL. Llavors comenceu amb ldaps://", "Base DN" => "DN Base", "One Base DN per line" => "Una DN Base per línia", diff --git a/apps/user_ldap/l10n/de.php b/apps/user_ldap/l10n/de.php index e86d877ecd7..27f5adb8b6c 100644 --- a/apps/user_ldap/l10n/de.php +++ b/apps/user_ldap/l10n/de.php @@ -1,31 +1,31 @@ <?php $TRANSLATIONS = array( "Failed to delete the server configuration" => "Löschen der Serverkonfiguration fehlgeschlagen", -"The configuration is valid and the connection could be established!" => "Die Konfiguration war erfolgreich, die Verbindung konnte hergestellt werden!", -"The configuration is valid, but the Bind failed. Please check the server settings and credentials." => "Die Konfiguration ist gültig aber die Verbindung ist fehlgeschlagen. Bitte überprüfen Sie die Servereinstellungen und die Anmeldeinformationen.", -"The configuration is invalid. Please look in the ownCloud log for further details." => "Die Konfiguration ist ungültig, bitte sehen Sie für weitere Details im ownCloud Log nach", +"The configuration is valid and the connection could be established!" => "Die Konfiguration ist gültig und die Verbindung konnte hergestellt werden!", +"The configuration is valid, but the Bind failed. Please check the server settings and credentials." => "Die Konfiguration ist gültig aber die Verbindung ist fehlgeschlagen. Bitte überprüfe die Servereinstellungen und Anmeldeinformationen.", +"The configuration is invalid. Please look in the ownCloud log for further details." => "Die Konfiguration ist ungültig, sieh für weitere Details bitte im ownCloud Log nach", "Deletion failed" => "Löschen fehlgeschlagen", "Take over settings from recent server configuration?" => "Einstellungen von letzter Konfiguration übernehmen?", "Keep settings?" => "Einstellungen beibehalten?", -"Cannot add server configuration" => "Serverkonfiguration konnte nicht hinzugefügt werden.", +"Cannot add server configuration" => "Das Hinzufügen der Serverkonfiguration schlug fehl", "Connection test succeeded" => "Verbindungstest erfolgreich", "Connection test failed" => "Verbindungstest fehlgeschlagen", -"Do you really want to delete the current Server Configuration?" => "Wollen Sie die aktuelle Serverkonfiguration wirklich löschen?", +"Do you really want to delete the current Server Configuration?" => "Möchtest Du die aktuelle Serverkonfiguration wirklich löschen?", "Confirm Deletion" => "Löschung bestätigen", -"<b>Warning:</b> Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "<b>Warnung:</b> Die Anwendungen user_ldap und user_webdavauth sind inkompatibel. Es kann demzufolge zu unerwarteten Verhalten kommen. Bitte Deinen Systemadministator eine der beiden Anwendungen zu deaktivieren.", +"<b>Warning:</b> Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "<b>Warnung:</b> Die Anwendungen user_ldap und user_webdavauth sind inkompatibel. Es kann demzufolge zu unerwartetem Verhalten kommen. Bitte Deinen Systemadministator eine der beiden Anwendungen zu deaktivieren.", "<b>Warning:</b> The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Warnung:</b> Da das PHP-Modul für LDAP nicht installiert ist, wird das Backend nicht funktionieren. Bitte Deinen Systemadministrator das Modul zu installieren.", "Server configuration" => "Serverkonfiguration", "Add Server Configuration" => "Serverkonfiguration hinzufügen", "Host" => "Host", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Du kannst das Protokoll auslassen, außer wenn Du SSL benötigst. Beginne dann mit ldaps://", "Base DN" => "Basis-DN", -"One Base DN per line" => "Ein Base DN pro Zeile", +"One Base DN per line" => "Ein Basis-DN pro Zeile", "You can specify Base DN for users and groups in the Advanced tab" => "Du kannst Basis-DN für Benutzer und Gruppen in dem \"Erweitert\"-Reiter konfigurieren", "User DN" => "Benutzer-DN", "The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." => "Der DN des Benutzers für LDAP-Bind, z.B.: uid=agent,dc=example,dc=com. Für anonymen Zugriff lasse DN und Passwort leer.", "Password" => "Passwort", -"For anonymous access, leave DN and Password empty." => "Lasse die Felder von DN und Passwort für anonymen Zugang leer.", +"For anonymous access, leave DN and Password empty." => "Lasse die Felder DN und Passwort für anonymen Zugang leer.", "User Login Filter" => "Benutzer-Login-Filter", -"Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action." => "Bestimmt den angewendeten Filter, wenn eine Anmeldung versucht wird. %%uid ersetzt den Benutzernamen bei dem Anmeldeversuch.", +"Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action." => "Bestimmt den angewendeten Filter, wenn eine Anmeldung versucht wird. %%uid ersetzt den Benutzernamen beim Anmeldeversuch.", "use %%uid placeholder, e.g. \"uid=%%uid\"" => "verwende %%uid Platzhalter, z. B. \"uid=%%uid\"", "User List Filter" => "Benutzer-Filter-Liste", "Defines the filter to apply, when retrieving users." => "Definiert den Filter für die Anfrage der Benutzer.", @@ -54,13 +54,13 @@ "User Display Name Field" => "Feld für den Anzeigenamen des Benutzers", "The LDAP attribute to use to generate the user`s ownCloud name." => "Das LDAP-Attribut für die Generierung des Benutzernamens in ownCloud. ", "Base User Tree" => "Basis-Benutzerbaum", -"One User Base DN per line" => "Ein Benutzer Base DN pro Zeile", +"One User Base DN per line" => "Ein Benutzer Basis-DN pro Zeile", "User Search Attributes" => "Benutzersucheigenschaften", -"Optional; one attribute per line" => "Optional; eine Eigenschaft pro Zeile", +"Optional; one attribute per line" => "Optional; ein Attribut pro Zeile", "Group Display Name Field" => "Feld für den Anzeigenamen der Gruppe", "The LDAP attribute to use to generate the groups`s ownCloud name." => "Das LDAP-Attribut für die Generierung des Gruppennamens in ownCloud. ", "Base Group Tree" => "Basis-Gruppenbaum", -"One Group Base DN per line" => "Ein Gruppen Base DN pro Zeile", +"One Group Base DN per line" => "Ein Gruppen Basis-DN pro Zeile", "Group Search Attributes" => "Gruppensucheigenschaften", "Group-Member association" => "Assoziation zwischen Gruppe und Benutzer", "Special Attributes" => "Spezielle Eigenschaften", diff --git a/apps/user_ldap/l10n/de_DE.php b/apps/user_ldap/l10n/de_DE.php index 3b5d60387a6..488d8aad7c8 100644 --- a/apps/user_ldap/l10n/de_DE.php +++ b/apps/user_ldap/l10n/de_DE.php @@ -1,31 +1,31 @@ <?php $TRANSLATIONS = array( -"Failed to delete the server configuration" => "Das Löschen der Server-Konfiguration schlug fehl", +"Failed to delete the server configuration" => "Löschen der Serverkonfiguration fehlgeschlagen", "The configuration is valid and the connection could be established!" => "Die Konfiguration ist gültig und die Verbindung konnte hergestellt werden!", -"The configuration is valid, but the Bind failed. Please check the server settings and credentials." => "Die Konfiguration ist gültig, aber das Herstellen der Verbindung schlug fehl. Bitte überprüfen Sie die Server-Einstellungen und Zertifikate.", -"The configuration is invalid. Please look in the ownCloud log for further details." => "Die Konfiguration ist ungültig. Weitere Details können Sie im ownCloud-Log nachlesen.", +"The configuration is valid, but the Bind failed. Please check the server settings and credentials." => "Die Konfiguration ist gültig aber die Verbindung ist fehlgeschlagen. Bitte überprüfen Sie die Servereinstellungen und die Anmeldeinformationen.", +"The configuration is invalid. Please look in the ownCloud log for further details." => "Die Konfiguration ist ungültig, sehen Sie für weitere Details bitte im ownCloud Log nach", "Deletion failed" => "Löschen fehlgeschlagen", -"Take over settings from recent server configuration?" => "Sollen die Einstellungen der letzten Serverkonfiguration übernommen werden?", -"Keep settings?" => "Einstellungen behalten?", +"Take over settings from recent server configuration?" => "Einstellungen von letzter Konfiguration übernehmen?", +"Keep settings?" => "Einstellungen beibehalten?", "Cannot add server configuration" => "Das Hinzufügen der Serverkonfiguration schlug fehl", "Connection test succeeded" => "Verbindungstest erfolgreich", "Connection test failed" => "Verbindungstest fehlgeschlagen", -"Do you really want to delete the current Server Configuration?" => "Möchten Sie die Serverkonfiguration wirklich löschen?", +"Do you really want to delete the current Server Configuration?" => "Möchten Sie die aktuelle Serverkonfiguration wirklich löschen?", "Confirm Deletion" => "Löschung bestätigen", -"<b>Warning:</b> Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "<b>Warnung:</b> Die Anwendungen user_ldap und user_webdavauth sind inkompatibel. Es kann demzufolge zu unerwarteten Verhalten kommen. Bitten Sie Ihren Systemadministator eine der beiden Anwendungen zu deaktivieren.", +"<b>Warning:</b> Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "<b>Warnung:</b> Die Anwendungen user_ldap und user_webdavauth sind inkompatibel. Es kann demzufolge zu unerwartetem Verhalten kommen. Bitten Sie Ihren Systemadministator eine der beiden Anwendungen zu deaktivieren.", "<b>Warning:</b> The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Warnung:</b> Da das PHP-Modul für LDAP nicht installiert ist, wird das Backend nicht funktionieren. Bitten Sie Ihren Systemadministrator das Modul zu installieren.", "Server configuration" => "Serverkonfiguration", "Add Server Configuration" => "Serverkonfiguration hinzufügen", "Host" => "Host", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Sie können das Protokoll auslassen, außer wenn Sie SSL benötigen. Beginnen Sie dann mit ldaps://", "Base DN" => "Basis-DN", -"One Base DN per line" => "Ein Base DN pro Zeile", +"One Base DN per line" => "Ein Basis-DN pro Zeile", "You can specify Base DN for users and groups in the Advanced tab" => "Sie können Basis-DN für Benutzer und Gruppen in dem \"Erweitert\"-Reiter konfigurieren", "User DN" => "Benutzer-DN", "The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." => "Der DN des Benutzers für LDAP-Bind, z.B.: uid=agent,dc=example,dc=com. Für einen anonymen Zugriff lassen Sie DN und Passwort leer.", "Password" => "Passwort", -"For anonymous access, leave DN and Password empty." => "Lassen Sie die Felder von DN und Passwort für einen anonymen Zugang leer.", +"For anonymous access, leave DN and Password empty." => "Lassen Sie die Felder DN und Passwort für einen anonymen Zugang leer.", "User Login Filter" => "Benutzer-Login-Filter", -"Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action." => "Bestimmt den angewendeten Filter, wenn eine Anmeldung durchgeführt wird. %%uid ersetzt den Benutzernamen bei dem Anmeldeversuch.", +"Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action." => "Bestimmt den angewendeten Filter, wenn eine Anmeldung durchgeführt wird. %%uid ersetzt den Benutzernamen beim Anmeldeversuch.", "use %%uid placeholder, e.g. \"uid=%%uid\"" => "verwenden Sie %%uid Platzhalter, z. B. \"uid=%%uid\"", "User List Filter" => "Benutzer-Filter-Liste", "Defines the filter to apply, when retrieving users." => "Definiert den Filter für die Anfrage der Benutzer.", @@ -37,12 +37,12 @@ "Configuration Active" => "Konfiguration aktiv", "When unchecked, this configuration will be skipped." => "Wenn nicht angehakt, wird diese Konfiguration übersprungen.", "Port" => "Port", -"Backup (Replica) Host" => "Back-Up (Replikation) Host", -"Give an optional backup host. It must be a replica of the main LDAP/AD server." => "Geben Sie einen optionalen Backup-Host an. Es muss ein Replikat des Haupt-LDAP/AD Servers sein.", -"Backup (Replica) Port" => "Back-Up (Replikation) Port", +"Backup (Replica) Host" => "Backup Host (Kopie)", +"Give an optional backup host. It must be a replica of the main LDAP/AD server." => "Geben Sie einen optionalen Backup Host an. Es muss sich um eine Kopie des Haupt LDAP/AD Servers handeln.", +"Backup (Replica) Port" => "Backup Port", "Disable Main Server" => "Hauptserver deaktivieren", -"When switched on, ownCloud will only connect to the replica server." => "Wenn eingeschaltet, wird sich die ownCloud nur mit dem Replikat-Server verbinden.", -"Use TLS" => "Benutze TLS", +"When switched on, ownCloud will only connect to the replica server." => "Wenn aktiviert, wird ownCloud ausschließlich den Backupserver verwenden.", +"Use TLS" => "Nutze TLS", "Do not use it additionally for LDAPS connections, it will fail." => "Benutzen Sie es nicht in Verbindung mit LDAPS Verbindungen, es wird fehlschlagen.", "Case insensitve LDAP server (Windows)" => "LDAP-Server (Windows: Groß- und Kleinschreibung bleibt unbeachtet)", "Turn off SSL certificate validation." => "Schalten Sie die SSL-Zertifikatsprüfung aus.", @@ -50,20 +50,20 @@ "Not recommended, use for testing only." => "Nicht empfohlen, nur zu Testzwecken.", "Cache Time-To-Live" => "Speichere Time-To-Live zwischen", "in seconds. A change empties the cache." => "in Sekunden. Eine Änderung leert den Cache.", -"Directory Settings" => "Verzeichniseinstellungen", +"Directory Settings" => "Ordnereinstellungen", "User Display Name Field" => "Feld für den Anzeigenamen des Benutzers", "The LDAP attribute to use to generate the user`s ownCloud name." => "Das LDAP-Attribut für die Generierung des Benutzernamens in ownCloud. ", "Base User Tree" => "Basis-Benutzerbaum", -"One User Base DN per line" => "Ein Benutzer Base DN pro Zeile", -"User Search Attributes" => "Eigenschaften der Benutzer-Suche", +"One User Base DN per line" => "Ein Benutzer Basis-DN pro Zeile", +"User Search Attributes" => "Benutzersucheigenschaften", "Optional; one attribute per line" => "Optional; ein Attribut pro Zeile", "Group Display Name Field" => "Feld für den Anzeigenamen der Gruppe", "The LDAP attribute to use to generate the groups`s ownCloud name." => "Das LDAP-Attribut für die Generierung des Gruppennamens in ownCloud. ", "Base Group Tree" => "Basis-Gruppenbaum", -"One Group Base DN per line" => "Ein Gruppen Base DN pro Zeile", -"Group Search Attributes" => "Eigenschaften der Gruppen-Suche", +"One Group Base DN per line" => "Ein Gruppen Basis-DN pro Zeile", +"Group Search Attributes" => "Gruppensucheigenschaften", "Group-Member association" => "Assoziation zwischen Gruppe und Benutzer", -"Special Attributes" => "Besondere Eigenschaften", +"Special Attributes" => "Spezielle Eigenschaften", "Quota Field" => "Kontingent-Feld", "Quota Default" => "Standard-Kontingent", "in bytes" => "in Bytes", diff --git a/apps/user_ldap/l10n/en@pirate.php b/apps/user_ldap/l10n/en@pirate.php new file mode 100644 index 00000000000..482632f3fda --- /dev/null +++ b/apps/user_ldap/l10n/en@pirate.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"Password" => "Passcode" +); diff --git a/apps/user_ldap/l10n/et_EE.php b/apps/user_ldap/l10n/et_EE.php index 665e9d6fa2c..9a65455ed23 100644 --- a/apps/user_ldap/l10n/et_EE.php +++ b/apps/user_ldap/l10n/et_EE.php @@ -39,10 +39,10 @@ "Port" => "Port", "Backup (Replica) Host" => "Varuserver", "Give an optional backup host. It must be a replica of the main LDAP/AD server." => "Lisa täiendav LDAP/AD server, mida replikeeritakse peaserveriga.", -"Backup (Replica) Port" => "Varuserveri (replika) ldap port", +"Backup (Replica) Port" => "Varuserveri (replika) port", "Disable Main Server" => "Ära kasuta peaserverit", "When switched on, ownCloud will only connect to the replica server." => "Märgituna ownCloud ühendub ainult varuserverisse.", -"Use TLS" => "Kasutaja TLS", +"Use TLS" => "Kasuta TLS-i", "Do not use it additionally for LDAPS connections, it will fail." => "LDAPS puhul ära kasuta. Ühendus ei toimi.", "Case insensitve LDAP server (Windows)" => "Mittetõstutundlik LDAP server (Windows)", "Turn off SSL certificate validation." => "Lülita SSL sertifikaadi kontrollimine välja.", diff --git a/apps/user_ldap/l10n/fa.php b/apps/user_ldap/l10n/fa.php index 9a01a67703d..89fc40af4f1 100644 --- a/apps/user_ldap/l10n/fa.php +++ b/apps/user_ldap/l10n/fa.php @@ -10,7 +10,7 @@ "Server configuration" => "پیکربندی سرور", "Add Server Configuration" => "افزودن پیکربندی سرور", "Host" => "میزبانی", -"Password" => "رمز عبور", +"Password" => "گذرواژه", "Group Filter" => "فیلتر گروه", "Port" => "درگاه", "in bytes" => "در بایت", diff --git a/apps/user_ldap/l10n/gl.php b/apps/user_ldap/l10n/gl.php index deb6dbb5553..215d518e7a5 100644 --- a/apps/user_ldap/l10n/gl.php +++ b/apps/user_ldap/l10n/gl.php @@ -3,7 +3,7 @@ "The configuration is valid and the connection could be established!" => "A configuración é correcta e pode estabelecerse a conexión.", "The configuration is valid, but the Bind failed. Please check the server settings and credentials." => "A configuración é correcta, mais a ligazón non. Comprobe a configuración do servidor e as credenciais.", "The configuration is invalid. Please look in the ownCloud log for further details." => "A configuración non é correcta. Vexa o rexistro de ownCloud para máis detalles", -"Deletion failed" => "Fallou o borrado", +"Deletion failed" => "Produciuse un fallo ao eliminar", "Take over settings from recent server configuration?" => "Tomar os recentes axustes de configuración do servidor?", "Keep settings?" => "Manter os axustes?", "Cannot add server configuration" => "Non é posíbel engadir a configuración do servidor", diff --git a/apps/user_ldap/l10n/he.php b/apps/user_ldap/l10n/he.php index c9b0e282f1d..97259a0ddd5 100644 --- a/apps/user_ldap/l10n/he.php +++ b/apps/user_ldap/l10n/he.php @@ -1,5 +1,13 @@ <?php $TRANSLATIONS = array( "Deletion failed" => "מחיקה נכשלה", +"Keep settings?" => "האם לשמור את ההגדרות?", +"Cannot add server configuration" => "לא ניתן להוסיף את הגדרות השרת", +"Connection test succeeded" => "בדיקת החיבור עברה בהצלחה", +"Connection test failed" => "בדיקת החיבור נכשלה", +"Do you really want to delete the current Server Configuration?" => "האם אכן למחוק את הגדרות השרת הנוכחיות?", +"Confirm Deletion" => "אישור המחיקה", +"Server configuration" => "הגדרות השרת", +"Add Server Configuration" => "הוספת הגדרות השרת", "Host" => "מארח", "User DN" => "DN משתמש", "Password" => "סיסמא", diff --git a/apps/user_ldap/l10n/hi.php b/apps/user_ldap/l10n/hi.php index 60d4ea98e84..45166eb0e3e 100644 --- a/apps/user_ldap/l10n/hi.php +++ b/apps/user_ldap/l10n/hi.php @@ -1,3 +1,4 @@ <?php $TRANSLATIONS = array( +"Password" => "पासवर्ड", "Help" => "सहयोग" ); diff --git a/apps/user_ldap/l10n/hr.php b/apps/user_ldap/l10n/hr.php index 91503315066..005a76d4bbc 100644 --- a/apps/user_ldap/l10n/hr.php +++ b/apps/user_ldap/l10n/hr.php @@ -1,3 +1,4 @@ <?php $TRANSLATIONS = array( +"Password" => "Lozinka", "Help" => "Pomoć" ); diff --git a/apps/user_ldap/l10n/ia.php b/apps/user_ldap/l10n/ia.php index 3586bf5a2e7..38374abda7f 100644 --- a/apps/user_ldap/l10n/ia.php +++ b/apps/user_ldap/l10n/ia.php @@ -1,3 +1,4 @@ <?php $TRANSLATIONS = array( +"Password" => "Contrasigno", "Help" => "Adjuta" ); diff --git a/apps/user_ldap/l10n/id.php b/apps/user_ldap/l10n/id.php index 1f6d8fcffe3..5f76d6b99fb 100644 --- a/apps/user_ldap/l10n/id.php +++ b/apps/user_ldap/l10n/id.php @@ -3,7 +3,7 @@ "The configuration is valid and the connection could be established!" => "Konfigurasi valid dan koneksi dapat dilakukan!", "The configuration is valid, but the Bind failed. Please check the server settings and credentials." => "Konfigurasi valid, tetapi Bind gagal. Silakan cek pengaturan server dan keamanan.", "The configuration is invalid. Please look in the ownCloud log for further details." => "Konfigurasi salah. Silakan lihat log ownCloud untuk lengkapnya.", -"Deletion failed" => "penghapusan gagal", +"Deletion failed" => "Penghapusan gagal", "Take over settings from recent server configuration?" => "Ambil alih pengaturan dari konfigurasi server saat ini?", "Keep settings?" => "Biarkan pengaturan?", "Cannot add server configuration" => "Gagal menambah konfigurasi server", @@ -15,14 +15,14 @@ "<b>Warning:</b> The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Peringatan:</b> Modul LDAP PHP tidak terpasang, perangkat tidak akan bekerja. Silakan minta administrator sistem untuk memasangnya.", "Server configuration" => "Konfigurasi server", "Add Server Configuration" => "Tambah Konfigurasi Server", -"Host" => "host", +"Host" => "Host", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Protokol dapat tidak ditulis, kecuali anda menggunakan SSL. Lalu jalankan dengan ldaps://", "Base DN" => "Base DN", "One Base DN per line" => "Satu Base DN per baris", "You can specify Base DN for users and groups in the Advanced tab" => "Anda dapat menetapkan Base DN untuk pengguna dan grup dalam tab Lanjutan", "User DN" => "User DN", "The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." => "DN dari klien pengguna yang dengannya tautan akan diterapkan, mis. uid=agen,dc=contoh,dc=com. Untuk akses anonim, biarkan DN dan kata sandi kosong.", -"Password" => "kata kunci", +"Password" => "Sandi", "For anonymous access, leave DN and Password empty." => "Untuk akses anonim, biarkan DN dan Kata sandi kosong.", "User Login Filter" => "gunakan saringan login", "Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action." => "Definisikan filter untuk diterapkan, saat login dilakukan. %%uid menggantikan username saat login.", @@ -71,5 +71,5 @@ "User Home Folder Naming Rule" => "Aturan Penamaan Folder Home Pengguna", "Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "Biarkan nama pengguna kosong (default). Atau tetapkan atribut LDAP/AD.", "Test Configuration" => "Uji Konfigurasi", -"Help" => "bantuan" +"Help" => "Bantuan" ); diff --git a/apps/user_ldap/l10n/ja_JP.php b/apps/user_ldap/l10n/ja_JP.php index 3ae7d2e6392..8239ecf3cc9 100644 --- a/apps/user_ldap/l10n/ja_JP.php +++ b/apps/user_ldap/l10n/ja_JP.php @@ -70,6 +70,6 @@ "Email Field" => "メールフィールド", "User Home Folder Naming Rule" => "ユーザのホームフォルダ命名規則", "Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "ユーザ名を空のままにしてください(デフォルト)。そうでない場合は、LDAPもしくはADの属性を指定してください。", -"Test Configuration" => "テスト設定", +"Test Configuration" => "設定をテスト", "Help" => "ヘルプ" ); diff --git a/apps/user_ldap/l10n/ku_IQ.php b/apps/user_ldap/l10n/ku_IQ.php index 1ae808ddd91..f8f893834b1 100644 --- a/apps/user_ldap/l10n/ku_IQ.php +++ b/apps/user_ldap/l10n/ku_IQ.php @@ -1,3 +1,4 @@ <?php $TRANSLATIONS = array( +"Password" => "وشەی تێپەربو", "Help" => "یارمەتی" ); diff --git a/apps/user_ldap/l10n/ms_MY.php b/apps/user_ldap/l10n/ms_MY.php index 17a6cbe2cb6..88ed18346ca 100644 --- a/apps/user_ldap/l10n/ms_MY.php +++ b/apps/user_ldap/l10n/ms_MY.php @@ -1,4 +1,5 @@ <?php $TRANSLATIONS = array( "Deletion failed" => "Pemadaman gagal", +"Password" => "Kata laluan", "Help" => "Bantuan" ); diff --git a/apps/user_ldap/l10n/nn_NO.php b/apps/user_ldap/l10n/nn_NO.php index 54d1f158f65..9f84258c56d 100644 --- a/apps/user_ldap/l10n/nn_NO.php +++ b/apps/user_ldap/l10n/nn_NO.php @@ -1,3 +1,5 @@ <?php $TRANSLATIONS = array( +"Deletion failed" => "Feil ved sletting", +"Password" => "Passord", "Help" => "Hjelp" ); diff --git a/apps/user_ldap/l10n/oc.php b/apps/user_ldap/l10n/oc.php index a128638172a..49b6c5970cc 100644 --- a/apps/user_ldap/l10n/oc.php +++ b/apps/user_ldap/l10n/oc.php @@ -1,4 +1,5 @@ <?php $TRANSLATIONS = array( "Deletion failed" => "Fracàs d'escafatge", +"Password" => "Senhal", "Help" => "Ajuda" ); diff --git a/apps/user_ldap/l10n/pl.php b/apps/user_ldap/l10n/pl.php index 776aa445e4e..a5b620e48ba 100644 --- a/apps/user_ldap/l10n/pl.php +++ b/apps/user_ldap/l10n/pl.php @@ -3,7 +3,7 @@ "The configuration is valid and the connection could be established!" => "Konfiguracja jest prawidłowa i można ustanowić połączenie!", "The configuration is valid, but the Bind failed. Please check the server settings and credentials." => "Konfiguracja jest prawidłowa, ale Bind nie. Sprawdź ustawienia serwera i poświadczenia.", "The configuration is invalid. Please look in the ownCloud log for further details." => "Konfiguracja jest nieprawidłowa. Proszę przejrzeć logi dziennika ownCloud ", -"Deletion failed" => "Skasowanie nie powiodło się", +"Deletion failed" => "Usunięcie nie powiodło się", "Take over settings from recent server configuration?" => "Przejmij ustawienia z ostatnich konfiguracji serwera?", "Keep settings?" => "Zachować ustawienia?", "Cannot add server configuration" => "Nie można dodać konfiguracji serwera", diff --git a/apps/user_ldap/l10n/pt_PT.php b/apps/user_ldap/l10n/pt_PT.php index 3092d061437..02b03d5a752 100644 --- a/apps/user_ldap/l10n/pt_PT.php +++ b/apps/user_ldap/l10n/pt_PT.php @@ -22,7 +22,7 @@ "You can specify Base DN for users and groups in the Advanced tab" => "Pode especificar o ND Base para utilizadores e grupos no separador Avançado", "User DN" => "DN do utilizador", "The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." => "O DN to cliente ", -"Password" => "Palavra-passe", +"Password" => "Password", "For anonymous access, leave DN and Password empty." => "Para acesso anónimo, deixe DN e a Palavra-passe vazios.", "User Login Filter" => "Filtro de login de utilizador", "Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action." => "Define o filtro a aplicar, para aquando de uma tentativa de login. %%uid substitui o nome de utilizador utilizado.", diff --git a/apps/user_ldap/l10n/sr@latin.php b/apps/user_ldap/l10n/sr@latin.php index 91503315066..005a76d4bbc 100644 --- a/apps/user_ldap/l10n/sr@latin.php +++ b/apps/user_ldap/l10n/sr@latin.php @@ -1,3 +1,4 @@ <?php $TRANSLATIONS = array( +"Password" => "Lozinka", "Help" => "Pomoć" ); diff --git a/apps/user_ldap/l10n/tr.php b/apps/user_ldap/l10n/tr.php index e6d450301e5..6f75f4371db 100644 --- a/apps/user_ldap/l10n/tr.php +++ b/apps/user_ldap/l10n/tr.php @@ -1,4 +1,5 @@ <?php $TRANSLATIONS = array( +"Failed to delete the server configuration" => "Sunucu uyunlama basarmadi ", "The configuration is valid and the connection could be established!" => "Uyunlama mantikli ve baglama yerlestirmek edebilmi.", "The configuration is valid, but the Bind failed. Please check the server settings and credentials." => "Uyunlama gecerli, fakat Baglama yapamadi. Lutfen kontrol yapmak, eger bu iyi yerlertirdi. ", "The configuration is invalid. Please look in the ownCloud log for further details." => "Uyunma mantikli degil. Lutfen log daha kontrol yapmak. ", @@ -12,6 +13,8 @@ "Confirm Deletion" => "Silmeyi onayla", "<b>Warning:</b> Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "<b>Uyari </b> Apps kullanici_Idap ve user_webdavauth uyunmayan. Bu belki sik degil. Lutfen sistem yonetici sormak on aktif yapmaya. ", "<b>Warning:</b> The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Ihbar <b> Modulu PHP LDAP yuklemdi degil, backend calismacak. Lutfen sistem yonetici sormak yuklemek icin.", +"Server configuration" => "Sunucu uyunlama ", +"Add Server Configuration" => "Sunucu Uyunlama birlemek ", "Host" => "Sunucu", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Protokol atlamak edesin, sadece SSL istiyorsaniz. O zaman, idapsile baslamak. ", "Base DN" => "Ana DN", @@ -31,19 +34,32 @@ "Defines the filter to apply, when retrieving groups." => "Filter uyunmak icin tayin ediyor, ne zaman grubalari tekrar aliyor. ", "without any placeholder, e.g. \"objectClass=posixGroup\"." => "siz bir yer tutucu, mes. 'objectClass=posixGroup ('posixGrubu''. ", "Connection Settings" => "Bağlantı ayarları", +"When unchecked, this configuration will be skipped." => "Ne zaman iptal, bu uynnlama isletici ", "Port" => "Port", +"Backup (Replica) Host" => "Sigorta Kopya Cephe ", +"Give an optional backup host. It must be a replica of the main LDAP/AD server." => "Bir kopya cevre vermek, kopya sunucu onemli olmali. ", +"Backup (Replica) Port" => "Kopya Port ", "Disable Main Server" => "Ana sunucuyu devredışı birak", +"When switched on, ownCloud will only connect to the replica server." => "Ne zaman acik, ownCloud sadece sunuce replikayin baglamis.", "Use TLS" => "TLS kullan", +"Do not use it additionally for LDAPS connections, it will fail." => "Bu LDAPS baglama icin kullamaminiz, basamacak. ", +"Case insensitve LDAP server (Windows)" => "Dusme sunucu LDAP zor degil. (Windows)", "Turn off SSL certificate validation." => "SSL sertifika doğrulamasını kapat.", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Bagladiginda, bunla secene sadece calisiyor, sunucu LDAP SSL sunucun ithal etemek, dneyme sizine sunucu ownClouden. ", "Not recommended, use for testing only." => "Önerilmez, sadece test için kullanın.", +"Cache Time-To-Live" => "Cache Time-To-Live ", "in seconds. A change empties the cache." => "saniye cinsinden. Bir değişiklik önbelleği temizleyecektir.", +"Directory Settings" => "Parametrar Listesin Adresinin ", "User Display Name Field" => "Ekran Adi Kullanici, (Alan Adi Kullanici Ekrane)", +"The LDAP attribute to use to generate the user`s ownCloud name." => "LDAP kategori kullanmaya adi ownCloud kullanicin uremek icin. ", "Base User Tree" => "Temel Kullanıcı Ağacı", +"One User Base DN per line" => "Bir Temel Kullanici DN her dizgi ", +"User Search Attributes" => "Kategorii Arama Kullanici ", "Group Display Name Field" => "Grub Ekrane Alani Adi", "The LDAP attribute to use to generate the groups`s ownCloud name." => "LDAP kullamayin grub adi ownCloud uremek icin. ", "Base Group Tree" => "Temel Grup Ağacı", "One Group Base DN per line" => "Bir Grubu Tabani DN her dizgi. ", +"Group Search Attributes" => "Kategorii Arama Grubu", "Group-Member association" => "Grup-Üye işbirliği", "in bytes" => "byte cinsinden", "Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "Kullanıcı adı bölümünü boş bırakın (varsayılan). ", diff --git a/apps/user_ldap/l10n/ug.php b/apps/user_ldap/l10n/ug.php new file mode 100644 index 00000000000..05a7a3f9a06 --- /dev/null +++ b/apps/user_ldap/l10n/ug.php @@ -0,0 +1,13 @@ +<?php $TRANSLATIONS = array( +"Deletion failed" => "ئۆچۈرۈش مەغلۇپ بولدى", +"Host" => "باش ئاپپارات", +"Password" => "ئىم", +"User Login Filter" => "ئىشلەتكۈچى تىزىمغا كىرىش سۈزگۈچى", +"User List Filter" => "ئىشلەتكۈچى تىزىم سۈزگۈچى", +"Group Filter" => "گۇرۇپپا سۈزگۈچ", +"Connection Settings" => "باغلىنىش تەڭشىكى", +"Configuration Active" => "سەپلىمە ئاكتىپ", +"Port" => "ئېغىز", +"Use TLS" => "TLS ئىشلەت", +"Help" => "ياردەم" +); diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php index 6d32e9b2ab0..ad355ce5e24 100644 --- a/apps/user_ldap/lib/access.php +++ b/apps/user_ldap/lib/access.php @@ -87,7 +87,7 @@ abstract class Access { for($i=0;$i<$result[$attr]['count'];$i++) { if($this->resemblesDN($attr)) { $values[] = $this->sanitizeDN($result[$attr][$i]); - } elseif(strtolower($attr) == 'objectguid' || strtolower($attr) == 'guid') { + } elseif(strtolower($attr) === 'objectguid' || strtolower($attr) === 'guid') { $values[] = $this->convertObjectGUID2Str($result[$attr][$i]); } else { $values[] = $result[$attr][$i]; @@ -317,7 +317,7 @@ abstract class Access { } $ldapname = $ldapname[0]; } - $intname = $isUser ? $this->sanitizeUsername($uuid) : $this->sanitizeUsername($ldapname); + $intname = $isUser ? $this->sanitizeUsername($uuid) : $ldapname; //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 @@ -462,7 +462,7 @@ abstract class Access { while($row = $res->fetchRow()) { $usedNames[] = $row['owncloud_name']; } - if(!($usedNames) || count($usedNames) == 0) { + if(!($usedNames) || count($usedNames) === 0) { $lastNo = 1; //will become name_2 } else { natsort($usedNames); @@ -550,7 +550,7 @@ abstract class Access { $sqlAdjustment = ''; $dbtype = \OCP\Config::getSystemValue('dbtype'); - if($dbtype == 'mysql') { + if($dbtype === 'mysql') { $sqlAdjustment = 'FROM DUAL'; } @@ -574,7 +574,7 @@ abstract class Access { $insRows = $res->numRows(); - if($insRows == 0) { + if($insRows === 0) { return false; } @@ -656,7 +656,7 @@ abstract class Access { $linkResources = array_pad(array(), count($base), $link_resource); $sr = ldap_search($linkResources, $base, $filter, $attr); $error = ldap_errno($link_resource); - if(!is_array($sr) || $error != 0) { + if(!is_array($sr) || $error !== 0) { \OCP\Util::writeLog('user_ldap', 'Error when searching: '.ldap_error($link_resource).' code '.ldap_errno($link_resource), \OCP\Util::ERROR); @@ -724,7 +724,7 @@ abstract class Access { foreach($attr as $key) { $key = mb_strtolower($key, 'UTF-8'); if(isset($item[$key])) { - if($key != 'dn') { + if($key !== 'dn') { $selection[$i][$key] = $this->resemblesDN($key) ? $this->sanitizeDN($item[$key][0]) : $item[$key][0]; @@ -816,7 +816,7 @@ abstract class Access { private function combineFilter($filters, $operator) { $combinedFilter = '('.$operator; foreach($filters as $filter) { - if($filter[0] != '(') { + if($filter[0] !== '(') { $filter = '('.$filter.')'; } $combinedFilter.=$filter; @@ -857,7 +857,7 @@ abstract class Access { private function getFilterPartForSearch($search, $searchAttributes, $fallbackAttribute) { $filter = array(); $search = empty($search) ? '*' : '*'.$search.'*'; - if(!is_array($searchAttributes) || count($searchAttributes) == 0) { + if(!is_array($searchAttributes) || count($searchAttributes) === 0) { if(empty($fallbackAttribute)) { return ''; } @@ -867,7 +867,7 @@ abstract class Access { $filter[] = $attribute . '=' . $search; } } - if(count($filter) == 1) { + if(count($filter) === 1) { return '('.$filter[0].')'; } return $this->combineFilterWithOr($filter); @@ -893,7 +893,7 @@ abstract class Access { * @returns true on success, false otherwise */ private function detectUuidAttribute($dn, $force = false) { - if(($this->connection->ldapUuidAttribute != 'auto') && !$force) { + if(($this->connection->ldapUuidAttribute !== 'auto') && !$force) { return true; } @@ -1007,7 +1007,7 @@ abstract class Access { * @returns string containing the key or empty if none is cached */ private function getPagedResultCookie($base, $filter, $limit, $offset) { - if($offset == 0) { + if($offset === 0) { return ''; } $offset -= $limit; @@ -1031,7 +1031,7 @@ abstract class Access { */ private function setPagedResultCookie($base, $filter, $limit, $offset, $cookie) { if(!empty($cookie)) { - $cachekey = 'lc' . dechex(crc32($base)) . '-' . dechex(crc32($filter)) . '-' .$limit . '-' . $offset; + $cachekey = 'lc' . crc32($base) . '-' . crc32($filter) . '-' .$limit . '-' . $offset; $cookie = $this->connection->writeToCache($cachekey, $cookie); } } diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php index 20784570e93..88ff318586a 100644 --- a/apps/user_ldap/lib/connection.php +++ b/apps/user_ldap/lib/connection.php @@ -99,7 +99,7 @@ class Connection { public function __set($name, $value) { $changed = false; //only few options are writable - if($name == 'ldapUuidAttribute') { + if($name === 'ldapUuidAttribute') { \OCP\Util::writeLog('user_ldap', 'Set config ldapUuidAttribute to '.$value, \OCP\Util::DEBUG); $this->config[$name] = $value; if(!empty($this->configID)) { @@ -321,9 +321,9 @@ class Connection { $params = $this->getConfigTranslationArray(); foreach($config as $parameter => $value) { - if(($parameter == 'homeFolderNamingRule' + if(($parameter === 'homeFolderNamingRule' || (isset($params[$parameter]) - && $params[$parameter] == 'homeFolderNamingRule')) + && $params[$parameter] === 'homeFolderNamingRule')) && !empty($value)) { $value = 'attr:'.$value; } @@ -389,7 +389,7 @@ class Connection { $trans = $this->getConfigTranslationArray(); $config = array(); foreach($trans as $dbKey => $classKey) { - if($classKey == 'homeFolderNamingRule') { + if($classKey === 'homeFolderNamingRule') { if(strpos($this->config[$classKey], 'attr:') === 0) { $config[$dbKey] = substr($this->config[$classKey], 5); } else { @@ -427,7 +427,9 @@ class Connection { 'No group filter is specified, LDAP group feature will not be used.', \OCP\Util::INFO); } - if(!in_array($this->config['ldapUuidAttribute'], array('auto', 'entryuuid', 'nsuniqueid', 'objectguid')) + $uuidAttributes = array( + 'auto', 'entryuuid', 'nsuniqueid', 'objectguid', 'guid'); + if(!in_array($this->config['ldapUuidAttribute'], $uuidAttributes) && (!is_null($this->configID))) { \OCP\Config::setAppValue($this->configID, $this->configPrefix.'ldap_uuid_attribute', 'auto'); \OCP\Util::writeLog('user_ldap', @@ -440,7 +442,7 @@ class Connection { } foreach(array('ldapAttributesForUserSearch', 'ldapAttributesForGroupSearch') as $key) { if(is_array($this->config[$key]) - && count($this->config[$key]) == 1 + && count($this->config[$key]) === 1 && empty($this->config[$key][0])) { $this->config[$key] = array(); } @@ -588,12 +590,12 @@ class Connection { $error = null; //if LDAP server is not reachable, try the Backup (Replica!) Server - if((!$bindStatus && ($error == -1)) + if((!$bindStatus && ($error === -1)) || $this->config['ldapOverrideMainServer'] || $this->getFromCache('overrideMainServer')) { $this->doConnect($this->config['ldapBackupHost'], $this->config['ldapBackupPort']); $bindStatus = $this->bind(); - if($bindStatus && $error == -1) { + if($bindStatus && $error === -1) { //when bind to backup server succeeded and failed to main server, //skip contacting him until next cache refresh $this->writeToCache('overrideMainServer', true); diff --git a/apps/user_ldap/lib/helper.php b/apps/user_ldap/lib/helper.php index 612a088269b..8bebd84c12e 100644 --- a/apps/user_ldap/lib/helper.php +++ b/apps/user_ldap/lib/helper.php @@ -96,7 +96,7 @@ class Helper { return false; } - if($res->numRows() == 0) { + if($res->numRows() === 0) { return false; } diff --git a/apps/user_ldap/templates/settings.php b/apps/user_ldap/templates/settings.php index d3c2c298904..f0ee8c6b08a 100644 --- a/apps/user_ldap/templates/settings.php +++ b/apps/user_ldap/templates/settings.php @@ -14,7 +14,7 @@ <fieldset id="ldapSettings-1"> <p><label for="ldap_serverconfig_chooser"><?php p($l->t('Server configuration'));?></label> <select id="ldap_serverconfig_chooser" name="ldap_serverconfig_chooser"> - <?php if(count($_['serverConfigurationPrefixes']) == 0 ) { + <?php if(count($_['serverConfigurationPrefixes']) === 0 ) { ?> <option value="" selected>1. Server</option>'); <?php @@ -85,7 +85,7 @@ <p><label for="ldap_group_display_name"><?php p($l->t('Group Display Name Field'));?></label><input type="text" id="ldap_group_display_name" name="ldap_group_display_name" data-default="<?php p($_['ldap_group_display_name_default']); ?>" title="<?php p($l->t('The LDAP attribute to use to generate the groups`s ownCloud name.'));?>" /></p> <p><label for="ldap_base_groups"><?php p($l->t('Base Group Tree'));?></label><textarea id="ldap_base_groups" name="ldap_base_groups" placeholder="<?php p($l->t('One Group Base DN per line'));?>" data-default="<?php p($_['ldap_base_groups_default']); ?>" title="<?php p($l->t('Base Group Tree'));?>"></textarea></p> <p><label for="ldap_attributes_for_group_search"><?php p($l->t('Group Search Attributes'));?></label><textarea id="ldap_attributes_for_group_search" name="ldap_attributes_for_group_search" placeholder="<?php p($l->t('Optional; one attribute per line'));?>" data-default="<?php p($_['ldap_attributes_for_group_search_default']); ?>" title="<?php p($l->t('Group Search Attributes'));?>"></textarea></p> - <p><label for="ldap_group_member_assoc_attribute"><?php p($l->t('Group-Member association'));?></label><select id="ldap_group_member_assoc_attribute" name="ldap_group_member_assoc_attribute" data-default="<?php p($_['ldap_group_member_assoc_attribute_default']); ?>" ><option value="uniqueMember"<?php if (isset($_['ldap_group_member_assoc_attribute']) && ($_['ldap_group_member_assoc_attribute'] == 'uniqueMember')) p(' selected'); ?>>uniqueMember</option><option value="memberUid"<?php if (isset($_['ldap_group_member_assoc_attribute']) && ($_['ldap_group_member_assoc_attribute'] == 'memberUid')) p(' selected'); ?>>memberUid</option><option value="member"<?php if (isset($_['ldap_group_member_assoc_attribute']) && ($_['ldap_group_member_assoc_attribute'] == 'member')) p(' selected'); ?>>member (AD)</option></select></p> + <p><label for="ldap_group_member_assoc_attribute"><?php p($l->t('Group-Member association'));?></label><select id="ldap_group_member_assoc_attribute" name="ldap_group_member_assoc_attribute" data-default="<?php p($_['ldap_group_member_assoc_attribute_default']); ?>" ><option value="uniqueMember"<?php if (isset($_['ldap_group_member_assoc_attribute']) && ($_['ldap_group_member_assoc_attribute'] === 'uniqueMember')) p(' selected'); ?>>uniqueMember</option><option value="memberUid"<?php if (isset($_['ldap_group_member_assoc_attribute']) && ($_['ldap_group_member_assoc_attribute'] === 'memberUid')) p(' selected'); ?>>memberUid</option><option value="member"<?php if (isset($_['ldap_group_member_assoc_attribute']) && ($_['ldap_group_member_assoc_attribute'] === 'member')) p(' selected'); ?>>member (AD)</option></select></p> </div> <h3><?php p($l->t('Special Attributes'));?></h3> <div> diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php index 1277e074714..41e2926605e 100644 --- a/apps/user_ldap/user_ldap.php +++ b/apps/user_ldap/user_ldap.php @@ -197,9 +197,9 @@ class USER_LDAP extends lib\Access implements \OCP\UserInterface { //if attribute's value is an absolute path take this, otherwise append it to data dir //check for / at the beginning or pattern c:\ resp. c:/ if( - '/' == $path[0] + '/' === $path[0] || (3 < strlen($path) && ctype_alpha($path[0]) - && $path[1] == ':' && ('\\' == $path[2] || '/' == $path[2])) + && $path[1] === ':' && ('\\' === $path[2] || '/' === $path[2])) ) { $homedir = $path; } else { |