ignore words overflow

brnnrc - May 27, 2009 - 13:12
Project:Views Alpha Pager
Version:5.x-1.5
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

The module fails if you put a few words (over few chars) in the "ignore Leading Words".
In fact

$replace = array(
"SELECT DISTINCT $myfield FROM ",
" ORDER BY $myfield"

assigns an overflow string to the array that you are going to use as key fetching the query
$item->{$myfield}

$myfield become too big to be used as key.

So, here you have a patch that renames the field name:
$replace = array(
"SELECT DISTINCT $myfield as myfield FROM ",
" ORDER BY myfield",
"",
);

and use it as key.
Let me know...
Thanks

AttachmentSize
views_alpha_pager.patch1.02 KB
 
 

Drupal is a registered trademark of Dries Buytaert.