On Saturday 09 October 2004 22:36, Bill Shupp wrote: > Bob Hutchinson wrote: > >I have written some code to enable sorting by column in domains.php, > >records.php and users.php > > > >It patches the above three files and their respective templates, > >list_domains.tpl, list_records.tpl and show_users.tpl > > > >It consists of a patch file, a README, install.sh and a couple of small > > images > > > >It should patch cleanly on vegadns-0.9b1 > > > >unpack the tarball in the application root, run ./install.sh and you're > > done. > > > >It can be found at > >http://midwales.com/downloads/vegadns/vegadns-0.9b1-sortpatch-0.1.tar.gz > > > >Comments/flames/LOL invited > > Thanks very much for the code. There were a few problems with it, such > as numerous undefined indexes (if(! $_REQUEST['sortway']) is no longer a > valid test of an existing index), and some of the logic was pretty > excessive. Also, it was not available to to all of the pagination > code. I rewrote much of it, and it seems pretty complete now. > > I have posted 0.9.5 www.vegadns.org which includes my version of this > code, along with fixes for the IE/PNG problems reported earlier this > week. Please help test, and report back to the list.
Many thanks for posting this up so promptly, Found so far: domains.php some headings not displaying properly line 143 $sort_array['Group Owner'] = 'group_owner_id'; should be $sort_array['Group_Owner'] = 'group_owner_id'; This leads to the group_owner_id column being headed by 'Group_Owner', with the underslash. A similar thing arises with the Accounts page. One solution might be to rename: $sort_array['Group'] = 'group_owner_id'; and edit the templates accordingly. This one is not really a bug at all, more of a preference: Line 145 $sortbaseurl = "$base_url&mode=domains&page=$page"; could be $sortbaseurl = "$base_url&mode=domains&page=".( ((isset($_REQUEST['page']) && $_REQUEST['page'] == 'all')) ? "all" : "$page").""; That way 'all' does not get lost. so far so good > > Cheers, > > Bill Shupp -- ----------------- Bob Hutchinson Midwales dot com -----------------
