]> source.dussan.org Git - nextcloud-server.git/commitdiff
Merge branch 'master' into scrutinizer_documentation_patches
authorThomas Müller <thomas.mueller@tmit.eu>
Fri, 14 Feb 2014 22:03:27 +0000 (23:03 +0100)
committerThomas Müller <thomas.mueller@tmit.eu>
Fri, 14 Feb 2014 22:03:27 +0000 (23:03 +0100)
Conflicts:
lib/private/appconfig.php

24 files changed:
1  2 
apps/files_encryption/hooks/hooks.php
apps/files_encryption/tests/util.php
apps/files_external/lib/config.php
apps/files_sharing/lib/cache.php
apps/files_trashbin/lib/trashbin.php
apps/user_ldap/lib/access.php
apps/user_ldap/lib/ildapwrapper.php
apps/user_ldap/lib/ldap.php
apps/user_ldap/lib/wizard.php
apps/user_ldap/user_ldap.php
lib/private/appconfig.php
lib/private/db/statementwrapper.php
lib/private/files.php
lib/private/files/cache/storage.php
lib/private/files/storage/common.php
lib/private/files/storage/local.php
lib/private/files/view.php
lib/private/image.php
lib/private/l10n.php
lib/private/request.php
lib/private/response.php
lib/private/user.php
lib/public/files/storage.php
lib/public/share.php

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index f983c7835afd9a74bfe5d09cc606987bca962b5e,619a992bd122e2ba2b7d5c850c683c16a0f250b3..1088dafab7154e24a73cd7b1a2cdb8160f8b1d20
@@@ -137,11 -135,31 +135,31 @@@ class USER_LDAP extends BackendUtility 
                return false;
        }
  
+       /**
+        * @brief reads the image from LDAP that shall be used as Avatar
+        * @param $uid string, the ownCloud user name
+        * @param $dn string, the user DN
+        * @return image data (provided by LDAP) | false
+        */
+       private function getAvatarImage($uid, $dn) {
+               $attributes = array('jpegPhoto', 'thumbnailPhoto');
+               foreach($attributes as $attribute) {
+                       $result = $this->access->readAttribute($dn, $attribute);
+                       \OCP\Config::setUserValue($uid, 'user_ldap', 'lastJpegPhotoLookup',
+                                                                         time());
+                       if($result !== false && is_array($result) && isset($result[0])) {
+                               return $result[0];
+                       }
+               }
+               return false;
+       }
        /**
         * @brief Check if the password is correct
 -       * @param $uid The username
 -       * @param $password The password
 -       * @returns true/false
 +       * @param string $uid The username
 +       * @param string $password The password
 +       * @return boolean
         *
         * Check if the password is correct without logging in the user
         */
index 5da0a7e906b742f4852ddd00251f8336cb8af5f9,a47e1ad49e6eb45728cbb8f1130eedc618b67ec8..a32c1126c7bcd91f8687c5c2c81b527239c202d4
@@@ -180,16 -185,18 +185,16 @@@ class AppConfig implements \OCP\IAppCon
         * @param string $app app
         * @param string $key key
         * @return bool
 -       *
 -       * Deletes a key.
         */
-       public static function deleteKey($app, $key) {
-               // Boring!
-               $query = OC_DB::prepare('DELETE FROM `*PREFIX*appconfig` WHERE `appid` = ? AND `configkey` = ?');
-               $query->execute(array($app, $key));
-               if (isset(self::$cache[$app]) and isset(self::$cache[$app][$key])) {
-                       unset(self::$cache[$app][$key]);
+       public function deleteKey($app, $key) {
+               $where = array(
+                       'appid' => $app,
+                       'configkey' => $key,
+               );
+               $this->conn->delete('*PREFIX*appconfig', $where);
+               if (isset($this->cache[$app]) and isset($this->cache[$app][$key])) {
+                       unset($this->cache[$app][$key]);
                }
-               return true;
        }
  
        /**
        /**
         * get multiply values, either the app or key can be used as wildcard by setting it to false
         *
 -       * @param app
 -       * @param key
 +       * @param boolean $app
 +       * @param string $key
         * @return array
         */
-       public static function getValues($app, $key) {
-               if ($app !== false and $key !== false) {
+       public function getValues($app, $key) {
+               if (($app !== false) == ($key !== false)) {
                        return false;
                }
                $fields = '`configvalue`';
                $where = 'WHERE';
                $params = array();
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge