Nextcloud Server
Go to file
Daniel Calviño Sánchez be56374c51 Fix sorting of favorite files
The sort comparator checks the "isFavorite" property of the FileInfo
objects to compare. That property is set when the file list is loaded
and the response from the server is parsed, and thus a freshly loaded
file list has the proper sorting for favorite files. However, the
property is not set in other cases, like when the FileInfo objects are
derived from FileInfoModels due to a file being marked as a favorite or
a text editor being closed, which causes the file to be sorted in the
wrong position.

There is no need to add the property in those situations, though; in all
cases the TagsPlugin adds a "tags" array property that contains an
OC.TAG_FAVORITE tag, so that tag can be checked instead of "isFavorite".
Moreover, although "isFavorite" was added by the main "_parseFileInfo"
function it did not really belong there but to the "FileInfoParser" from
the TagsPlugin; however, as that property now is not used anywhere it
was removed altogether.

A cleaner solution would have been to make the sort comparator
extensible by plugins like other behaviours of the file list and then
add the sorting logic related to favorite files to the TagsPlugin.
However, right now only the TagsPlugin would need to alter the main
sorting logic, and it seems like a corner case anyway. Even if it is
implemented as a plugin, favorite files is a core feature, so for the
time being it will be taken into account directly in the main sorting
logic; making the sort comparator extensible by plugins is defered until
there are other use cases for that.

Fixes #5410

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-07-05 15:01:23 +02:00
.idea
3rdparty@cae79927de Update third-party ref 2017-06-13 13:28:29 +02:00
apps Fix sorting of favorite files 2017-07-05 15:01:23 +02:00
build Prevent sending second WWW-Authenticate header 2017-06-13 13:54:52 +02:00
config Allow to force a language and set it via the ocs api 2017-06-21 11:34:52 +02:00
contribute
core Fix sorting of favorite files 2017-07-05 15:01:23 +02:00
l10n
lib Merge pull request #5591 from nextcloud/move-client-info-to-firstrunwizard 2017-07-04 11:39:21 +02:00
ocs
ocs-provider
resources bycatch, x-ldif entry was missing 2017-06-14 11:47:44 +02:00
settings Merge pull request #5591 from nextcloud/move-client-info-to-firstrunwizard 2017-07-04 11:39:21 +02:00
tests Add acceptance tests for sorting of favorite files 2017-07-05 14:54:26 +02:00
themes Simplified Nextcloud logo icon 2017-07-02 14:14:49 +02:00
.bowerrc
.codecov.yml
.drone.yml Update integration tests composer cache 2017-06-14 09:37:47 +02:00
.gitignore
.gitmodules
.htaccess
.jshintrc
.lgtm
.mailmap
.mention-bot
.scrutinizer.yml
.tag
.user.ini
AUTHORS
autotest-checkers.sh
autotest-external.sh
autotest-hhvm.sh
autotest-js.sh
autotest.sh
bower.json
buildjsdocs.sh
CHANGELOG.md
composer.json
console.php
CONTRIBUTING.md
COPYING
COPYING-README
cron.php
db_structure.xml Adopt DB and Manager to personal settings structure 2017-06-23 12:36:38 +02:00
index.html
index.php
issue_template.md
occ
public.php
README.md
remote.php
robots.txt
status.php
version.php Adopt DB and Manager to personal settings structure 2017-06-23 12:36:38 +02:00

Nextcloud Server

Scrutinizer Code Quality codecov CII Best Practices irc irc

A safe home for all your data.

Why is this so awesome?

  • 📁 Access your Data You can store your files, contacts, calendars and more on a server of your choosing.
  • 📦 Sync your Data You keep your files, contacts, calendars and more synchronized amongst your devices.
  • 🔄 Share your Data …by giving others access to the stuff you want them to see or to collaborate with.
  • 🚀 Expandable with dozens of Apps ...like Calendar, Contacts, Mail and all those you can discover in our App Store
  • 🔒 Security with our encryption mechanisms, HackerOne bounty program and two-factor authentification.

You want to learn more about how you can use Nextcloud to access, share and protect your files, calendars, contacts, communication & more at home and at your Enterprise? Learn about all our Features.

Get your Nextcloud

Enterprise? Public Sector or Education user? You may want to have a look into the Enterprise Support Subscription provided by the Nextcloud GmbH

Get in touch

…learn more about how to get support for Nextcloud here!

Contribution Guidelines

All contributions to this repository from June, 16 2016 on are considered to be licensed under the AGPLv3 or any later version.

Nextcloud doesn't require a CLA (Contributor License Agreement). The copyright belongs to all the individual contributors. Therefore we recommend that every contributor adds following line to the header of a file, if they changed it substantially:

@copyright Copyright (c) <year>, <your name> (<your email address>)

Please read the Code of Conduct. This document offers some guidance to ensure Nextcloud participants can cooperate effectively in a positive and inspiring atmosphere, and to explain how together we can strengthen and support each other.

Please review the guidelines for contributing to this repository.

More information how to contribute: https://nextcloud.com/contribute/

Running master checkouts

Third-party components are handled as git submodules which have to be initialized first. So aside from the regular git checkout invoking git submodule update --init or a similar command is needed, for details see Git documentation.

Several apps by default included in regular releases like firstrunwizard or gallery are missing in master and have to be installed manually as required.

That aside Git checkouts can be handled the same as release archives.

Note they should never be used on production systems.