adapted favoritesController for method sortfolder