diff options
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/constants.php | 1 | ||||
-rw-r--r-- | lib/public/db.php | 6 | ||||
-rw-r--r-- | lib/public/share.php | 8 | ||||
-rw-r--r-- | lib/public/user.php | 2 |
4 files changed, 8 insertions, 9 deletions
diff --git a/lib/public/constants.php b/lib/public/constants.php index bc979c9031f..1495c620dc9 100644 --- a/lib/public/constants.php +++ b/lib/public/constants.php @@ -35,4 +35,3 @@ const PERMISSION_UPDATE = 2; const PERMISSION_DELETE = 8; const PERMISSION_SHARE = 16; const PERMISSION_ALL = 31; - diff --git a/lib/public/db.php b/lib/public/db.php index 5d4aadd22ae..932e79d9ef1 100644 --- a/lib/public/db.php +++ b/lib/public/db.php @@ -49,9 +49,9 @@ class DB { * @brief Insert a row if a matching row doesn't exists. * @param $table string The table name (will replace *PREFIX*) to perform the replace on. * @param $input array - * + * * The input array if in the form: - * + * * array ( 'id' => array ( 'value' => 6, * 'key' => true * ), @@ -65,7 +65,7 @@ class DB { public static function insertIfNotExist($table, $input) { return(\OC_DB::insertIfNotExist($table, $input)); } - + /** * @brief gets last value of autoincrement * @param $table string The optional table name (will replace *PREFIX*) and add sequence suffix diff --git a/lib/public/share.php b/lib/public/share.php index 7ed1c42490d..cda583aa073 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -351,14 +351,14 @@ class Share { //delete the old share self::delete($checkExists['id']); } - + // Generate hash of password - same method as user passwords if (isset($shareWith)) { $forcePortable = (CRYPT_BLOWFISH != 1); $hasher = new \PasswordHash(8, $forcePortable); $shareWith = $hasher->HashPassword($shareWith.\OC_Config::getValue('passwordsalt', '')); } - + // Generate token if (isset($oldToken)) { $token = $oldToken; @@ -415,7 +415,7 @@ class Share { if ($parentFolder && $files = \OC_Files::getDirectoryContent($itemSource)) { for ($i = 0; $i < count($files); $i++) { $name = substr($files[$i]['name'], strpos($files[$i]['name'], $itemSource) - strlen($itemSource)); - if ($files[$i]['mimetype'] == 'httpd/unix-directory' + if ($files[$i]['mimetype'] == 'httpd/unix-directory' && $children = \OC_Files::getDirectoryContent($name, '/') ) { // Continue scanning into child folders @@ -864,7 +864,7 @@ class Share { } } else { if ($fileDependent) { - if (($itemType == 'file' || $itemType == 'folder') + if (($itemType == 'file' || $itemType == 'folder') && $format == \OC_Share_Backend_File::FORMAT_FILE_APP || $format == \OC_Share_Backend_File::FORMAT_FILE_APP_ROOT ) { diff --git a/lib/public/user.php b/lib/public/user.php index e297b716dc2..204d8e4c0f1 100644 --- a/lib/public/user.php +++ b/lib/public/user.php @@ -65,7 +65,7 @@ class User { /** * @brief check if a user exists * @param string $uid the username - * @param string $excludingBackend (default none) + * @param string $excludingBackend (default none) * @return boolean */ public static function userExists( $uid, $excludingBackend = null ) { |