Closed (fixed)
Project:
Menu Firstchild
Version:
6.x-1.3
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Nov 2009 at 09:56 UTC
Updated:
29 Dec 2009 at 19:30 UTC
Here is a patch
Index: menu_firstchild.module
===================================================================
--- menu_firstchild.module (revision 4546)
+++ menu_firstchild.module (working copy)
@@ -61,7 +61,7 @@
function _menu_firstchild_get_firstchild_href($mlid) {
global $language;
- $result = db_query("SELECT mlid, link_path FROM {menu_links} WHERE plid = %d ORDER BY weight ASC", $mlid);
+ $result = db_query("SELECT mlid, link_path FROM {menu_links} WHERE plid = %d ORDER BY weight, link_title ASC", $mlid);
while ($m = db_fetch_array($result)) {
if ($m['link_path'] != '<firstchild>') {
$child = menu_link_load($m['mlid']);
Comments
Comment #1
_rune commentedComment #2
anrikun commentedThe reason I did not also used link_title is that it might not work on multilingual sites.
On an multilingual site, "link_title" field might not always contain a title written in the same language, so menu administrator should only rely on weight to order its items.
Comment #3
_rune commentedHi
Wauw did not see you reply until now. Wish there was a way of email subscribing to issues. Sorry.
I still think menu_firstchild should mirror the behavior of the menu in drupal and it looks like it first orders by weight and then by title if more than one item shares the same weight.
Cheers.
Comment #4
anrikun commentedOk _rune, you're right, I'll commit your change.
I'll release an updated version after I've fixed a very small bug I found today.
Hope you read this reply before next year ;-)
Comment #5
anrikun commentedAdded new 6.x-1.4 release!
http://drupal.org/node/660234
Comment #6
_rune commentedLOL
Discovered the track tab on my account page. Will keep an eye on it from now on :) Thx a lot for your help!
Take Care