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.
remotes/origin/ldap_group_count
Vincent Petry 12 years ago
parent 491c96eaa9
commit 65b3d293ce
  1. 1
      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);

Loading…
Cancel
Save