1
jegelstaff
fix for broken up/down buttons in iMenu

There is a bug with the up and down buttons in iMenu which manifests itself if register_globals is turned off in PHP (and that's been the default setting for a while now).

The up and down buttons don't work because the move() function in the admin/index.php file relies on $id and $weight being defined from params sent through the GET method, but that file does not explicitly define params sent from GET. Therefore, if register_globals is off, then the up and down buttons don't work.

To fix, just add these two lines (or similar) right before the call to im_admin_move (around line 32):

$id = $_GET['id'];
$weight = $_GET['weight'];

--Julian

2
Dave_L
Re: fix for broken up/down buttons in iMenu
  • 2005/2/19 5:04

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


While you're at it, you could also sanitize them:

$id = @intval($_GET['id']);
$weight = @intval($_GET['weight']);


That's assuming they're supposed to be integers, and they're not sanitized elsewhere.

3
jegelstaff
Re: fix for broken up/down buttons in iMenu

That's a good point. They are not sanitized elsewhere.

--Julian

Login

Who's Online

411 user(s) are online (273 user(s) are browsing Support Forums)


Members: 0


Guests: 411


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits