- Moderated by:
- Support Team
-
- rank:
-
Freshman
- registered:
- October 2002
- Status:
- offline
- last visit:
- 09.03.03
- Posts:
- 8
Fresh install of 7.2.2 the new (I think) search facility for the Members_List module appears to be failing -- as follows:
1. Search nickname -- works
2. URL -- Actually searches 'nickname' NOT URL -- thus works, but not as advertised!!
3. Search Real Name -- fails -- spewing forth following message:
Error accesing to the database
Program: /path/to/modules/Members_List/index.php - Line N.: 284
Database: nuke
Error (1054) : Unknown column 'Members_List' in 'order clause'
When I echo the actual query to the web page the problem appears to be that somehow $GLOBALS[sortby] value is "Members_List" .Can't figure out how that happens yet. -
- rank:
-
Software Foundation
- registered:
- December 1969
- Status:
- offline
- last visit:
- 15.11.08
- Posts:
- 4481
please check updated sources
--
regards from germany
..::[Zikula Application Framework]::.. ..::[SEO-Blog]::.. ..::[CMS Sicherheit]::.. -
- rank:
-
Freshman
- registered:
- October 2002
- Status:
- offline
- last visit:
- 09.03.03
- Posts:
- 8
As per subject line the link to the revised source was appreciated. Works great now. Several questions:
What was/were the necessary change(s) to make the fix and why? I spent some time looking at the file to try and figure it out -- and the answer would help me learn more about how things are put together PostNuke (and PHP) are new to me, and I Like to be able to fix my own problems -- maybe even help others.
Also -- How do I access code as you guys revise it -- presuming that other bugs emerge?
:D
Thanks. -
- rank:
-
Software Foundation
- registered:
- December 1969
- Status:
- offline
- last visit:
- 15.11.08
- Posts:
- 4481
as you can see in the diff
Code
Index: postnuke-devel/html/modules/Members_List/index.php
===================================================================
RCS file: /repository/postnuke-devel/html/modules/Members_List/index.php,v
retrieving revision 1.16
retrieving revision 1.14
diff -r1.16 -r1.14
1c1
< <?php // $Id: index.php,v 1.16 2002/12/04 21:59:45 larsneo Exp $ $Name: $
---
> <?php // $Id: index.php,v 1.14 2002/12/03 21:48:04 magicx Exp $ $Name: $
138,140c138,140
< <input type=\"radio\" name=\"sorting\" value=\"uname\" checked>"._MNICKNAME."
< <input type=\"radio\" name=\"sorting\" value=\"name\">"._MREALNAME."
< <input type=\"radio\" name=\"sorting\" value=\"url\">"._MURL."
---
> <input type=\"radio\" name=\"sortby\" value=\"uname\" checked>"._MNICKNAME."
> <input type=\"radio\" name=\"sortby\" value=\"name\">"._MREALNAME."
> <input type=\"radio\" name=\"sortby\" value=\"url\">"._MURL."
175c175
< $sortby = pnVarCleanFromInput(sortby);
---
> $sortby = pnVarCleanFromInput($GLOBALS[sortby]);
227c227,228
< $sorting = pnVarCleanFromInput(sorting);
---
> $sorting = pnVarCleanFromInput($GLOBALS[sorting]);
>
314c315
< echo "<font class=\"pn-normal\"><b>"._MURL." </b></font>";
---
> echo "<font class=\"pn-normal\"><b>>"._MURL."< </b></font>";
there were two minor bugs:
- the radiobutton were named wrong (sortby instead of sorting)
- the pnVarCleanFromInput used $GLOBALS[xxx] instead of xxx
and a cosmetic change for the URL when sorted by URL
if you want to take a closer peak to development check this ;)
--
regards from germany
..::[Zikula Application Framework]::.. ..::[SEO-Blog]::.. ..::[CMS Sicherheit]::..
