Always select item_source.

This commit is contained in:
Andreas Fischer 2013-10-10 18:56:50 +02:00 committed by Morris Jobke
parent fa56aec4b8
commit 7c1f0da0fe

View file

@ -1091,7 +1091,7 @@ class Share {
// TODO Optimize selects
if ($format == self::FORMAT_STATUSES) {
if ($itemType == 'file' || $itemType == 'folder') {
$select = '`*PREFIX*share`.`id`, `item_type`, `*PREFIX*share`.`parent`,'
$select = '`*PREFIX*share`.`id`, `item_type`, `item_source`, `*PREFIX*share`.`parent`,'
.' `share_type`, `file_source`, `path`, `expiration`, `storage`, `mail_send`';
} else {
$select = '`id`, `item_type`, `item_source`, `parent`, `share_type`, `expiration`, `mail_send`';
@ -1099,7 +1099,7 @@ class Share {
} else {
if (isset($uidOwner)) {
if ($itemType == 'file' || $itemType == 'folder') {
$select = '`*PREFIX*share`.`id`, `item_type`, `*PREFIX*share`.`parent`,'
$select = '`*PREFIX*share`.`id`, `item_type`, `item_source`, `*PREFIX*share`.`parent`,'
.' `share_type`, `share_with`, `file_source`, `path`, `permissions`, `stime`,'
.' `expiration`, `token`, `storage`, `mail_send`';
} else {
@ -1112,7 +1112,7 @@ class Share {
&& $format == \OC_Share_Backend_File::FORMAT_GET_FOLDER_CONTENTS
|| $format == \OC_Share_Backend_File::FORMAT_FILE_APP_ROOT
) {
$select = '`*PREFIX*share`.`id`, `item_type`, `*PREFIX*share`.`parent`, `uid_owner`, '
$select = '`*PREFIX*share`.`id`, `item_type`, `item_source`, `*PREFIX*share`.`parent`, `uid_owner`, '
.'`share_type`, `share_with`, `file_source`, `path`, `file_target`, '
.'`permissions`, `expiration`, `storage`, `*PREFIX*filecache`.`parent` as `file_parent`, '
.'`name`, `mtime`, `mimetype`, `mimepart`, `size`, `encrypted`, `etag`, `mail_send`';