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

UserManager.getUsersSitesFromAccess() doesn't order idsite #2151

Closed
julienmoumne opened this issue Mar 5, 2011 · 3 comments
Closed

UserManager.getUsersSitesFromAccess() doesn't order idsite #2151

julienmoumne opened this issue Mar 5, 2011 · 3 comments
Labels
Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Milestone

Comments

@julienmoumne
Copy link
Member

In my box test_setUserAccess_multipleCallDistinctAccessMultipleUser() fails because

$access1 = array( 'user1' => array(1,2), 'user2' => array(2,3) );
$wanted1 = array( 'user1' => array(1,2), 'user2' => array(3,2) );

This happens because getUsersSitesFromAccess() doesn't order column idsite.

Should we :

  • order idsite
  • sort the array before comparison
@robocoder
Copy link
Contributor

Interesting. Presumably, we can't expect login to be sorted either. I would add an "ORDER BY login,idsite" clause to the SQL.

@mattab
Copy link
Member

mattab commented Mar 5, 2011

sounds good

@julienmoumne
Copy link
Member Author

(In [4039]) fixes #2151 - ordering getUsersSitesFromAccess() SQL query, updating unit tests, should all API queries have an order by clause ?

@julienmoumne julienmoumne added this to the Piwik 1.2.1 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Projects
None yet
Development

No branches or pull requests

3 participants