Loading...
 
Skip to main content

userlist wiki plugin paramaters sort and group can't be used together

Status
Closed
Subject
userlist wiki plugin paramaters sort and group can't be used together
Version
6.x
Category
  • Error
Feature
Wiki Plugin (extends basic syntax)
Submitted by
xen
Lastmod by
xen
Rating
(0)
Description

sort and group parameters used together in th userlist plugin results in an error. The page says "An error occured while performing the request."

Example:



This error was traced to the order of the SQL query.

Solution

In lib/wiki-plugins/wikiplugin_userlist.php
In function wikiplugin_userlist($data, $params)

line 120, the sort code (the ORDER BY) should come after group code and not before. It works when rearranged like this:

if $group {
$from .= ", users_usergroups uug";
$mid .= ' and uug.`groupName` = ? and uu.`userId` = uug.`userId`';
$bindvars[] = $group;
}
if $sort {
$sort=strtolower($sort);
if | ($sort=='desc' {
$mid .= ' ORDER BY `login` '.$sort;
}
}

Priority
25
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
3850
Created
Thursday 14 April, 2011 22:30:46 UTC
by xen
LastModif
Thursday 26 May, 2011 02:59:05 UTC


Show PHP error messages