You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Admin: Users page: function call wrong arguments #26234
May take a long time to process the initialUsersToLoad.
Expected behaviour
Load in a reasonable time.
Actual behaviour
Makes browser to show the 'slow script' warning.
Server configuration
Operating system: Debian jessie
Web server: apache2-2.4.10
Database: mariadb-server-10.0.23
PHP version: 5.6
ownCloud version: 9.0.0 (but code provided is the same in master)
Are you using an external user-backend, if yes which one: IMAP
Client configuration
Browser: Firefox 49
Operating system: kubuntu 14.04
Hello guys!
If you see this file, there's a function call with arguments that I think don't match and are interpreted incorrectly. The file is settings/js/users/users.js
So, this is what I think is happening:
L399 calls the function add with 2nd to 4th parameters not corresponding with the ones add expects. 2nd and 4th arguments are already included in user object, so there's no need for those. And 3rd argument (false) seems to be the one expected as sort in definition of function add.
L174, within function add, checks sort which is an integer (corresponding to user.lastLogin) and the if condition goes true, doing the sort every time there's a call to add.
I did a quick workaround changing L174 with this: if (sort===true) {
to prevent taking an integer as true.
Hmmmm nice catch. I do remember seeing that the sort was done over and over again I thought it was expected behavior but never noticed this arguments discrepancy.
That's good, so this means there is potential to make this much faster. I'll have a look.
Activity
DeepDiver1975 commentedon Sep 29, 2016
@PVince81 @butonic mind taking a look? THX
PVince81 commentedon Oct 4, 2016
Hmmmm nice catch. I do remember seeing that the sort was done over and over again I thought it was expected behavior but never noticed this arguments discrepancy.
That's good, so this means there is potential to make this much faster. I'll have a look.
PVince81 commentedon Oct 5, 2016
Indeed, this is wrong. Let's do some git archeology to find out how it happened in the first place.
PVince81 commentedon Oct 5, 2016
Looks like it happened a long time ago in #12921 where the function signature was changed, but the call wasn't changed properly.
Will fix.
PVince81 commentedon Oct 5, 2016
Fix is here #26282
lock commentedon Jul 31, 2019
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.