Menu ▾ ▴

#123 5dev37: Personal Menu links dead

open
nobody
Interface (34)
5
2005-02-11
2005-02-11
No

Personal Menu doesn't save/use (don't know why) the
"New Link URL:" - this is the text of the link used in
left-nav box:
-------------------------------------------------------------
<div class="menuitem"><a href="">Slashdot</a></div>
<div class="menuitem"><a href="">Hotmail</a></div>
-------------------------------------------------------------

yet in Preferences, it shows the URL just fine:

-------------------------------------------------------------
Text Link
Slashdot http://www.slashdot.net/
Hotmail www.hotmail.com
-------------------------------------------------------------

This is caused by a bug in
modules/users/hooks/class.php around line 286; replace
function menu() with:
-------------------------------------------------------------
function menu($userid)
{
$sql = "SELECT text,url FROM menus ";
$sql .= "WHERE userid='$userid'";
$items = $_ENV['api']['dbi']->fetch_all($sql,"array");
if (is_array($items)) {
foreach ($items as $item) {
$menu[$item['text']] = $item['url']; //fmg: was
'ur'
}
}
return $menu;
}
-------------------------------------------------------------

Cheers,
Fil

Discussion


Log in to post a comment.