summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-06-11 14:28:30 +0200
committerVincent Petry <pvince81@owncloud.com>2014-06-11 14:28:30 +0200
commit65b3d293ce7446d8940820f78263a0d9862a3f40 (patch)
tree7318cbe5a2154c1b642ced13ab513a867cfaac9a
parent491c96eaa904e32677b0a446bfd9c662090b4382 (diff)
downloadnextcloud-server-65b3d293ce7446d8940820f78263a0d9862a3f40.tar.gz
nextcloud-server-65b3d293ce7446d8940820f78263a0d9862a3f40.zip
Added ORDER BY to enforce share entry order
Sometimes MySQL decides to return the shares in the wrong order, but some parts of the code seem to require the order to be known, at least so that the parent shares come before the children shares. This fix adds an ORDER BY clause to force the order by id.
-rw-r--r--lib/private/share/share.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index 883fbd1b298..a3de8ebc0ef 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -1211,6 +1211,7 @@ class Share extends \OC\Share\Constants {
}
} else {
$queryLimit = null;
+ $where .= ' ORDER BY `*PREFIX*share`.`id` ASC';
}
$select = self::createSelectStatement($format, $fileDependent, $uidOwner);
$root = strlen($root);