Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packages order is weird #52

Closed
paveljanda opened this issue Mar 11, 2016 · 2 comments
Closed

Packages order is weird #52

paveljanda opened this issue Mar 11, 2016 · 2 comments
Assignees
Labels

Comments

@paveljanda
Copy link
Member

For example: https://componette.com/search/grid
There should be order by starts, shouldn't it?

@f3l1x f3l1x closed this as completed in 205e97b Mar 11, 2016
@f3l1x
Copy link
Member

f3l1x commented Mar 11, 2016

Fixed and specially deployed for you.

Order by popularity is not only stars.

        switch ($orderBy) {
            case 'push':
                $builder->orderBy('[g.pushed_at] DESC');
                break;
            case 'newest':
                $builder->orderBy('[a.created_at] DESC');
                break;
            case 'popularity':
                $builder->orderBy('IFNULL([g.stars], 0) * 2 + IFNULL([g.watchers], 0) + IFNULL([g.forks], 0) DESC');
                break;
        }

@paveljanda
Copy link
Member Author

Right. Thanks. :)

@f3l1x f3l1x added the bug label Mar 11, 2016
@f3l1x f3l1x added this to the v1.0.7 milestone Mar 11, 2016
@f3l1x f3l1x self-assigned this Mar 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants