#5 filetodb script and parent_id's

closed
nobody
None
5
2004-06-13
2004-03-10
bulgari
No

The example-filetodb.php script does not give correct
parent id's.

E.g. running the script out of the box for version 3.1.1
gives...

INSERT INTO phplayersmenu (id, parent_id, text, href,
title, icon, target, orderfield, expanded) VALUES ('10', '1',
'...GNU\'s Not Unix!', 'http://www.gnu.org/', 'The Free
Software Foundation', '', '', '10', '0');
INSERT INTO phplayersmenu (id, parent_id, text, href,
title, icon, target, orderfield, expanded) VALUES ('20', '1',
'Open Source', '', '', '', '', '20', '0');
INSERT INTO phplayersmenu (id, parent_id, text, href,
title, icon, target, orderfield, expanded) VALUES ('30', '1',
'Portals', '', '', '', '', '30', '0');

etc.....

i.e. all entries come out with a parent_id of 1.

Discussion

  • Marco Pratesi
    Marco Pratesi
    2004-04-08

    Logged In: YES
    user_id=65709

    The attached patch should fix the bug.

    The bug has been added in version 3.1.x
    simply splitting the methods in more classes,
    but leaving the ProcessLayersMenu class
    without a usable parseCommon method.
    Maybe a more clean fix can be found
    for this bug.
    I leave the bug open, I will close it
    when I will release a new version
    not affected by this bug;
    in the meantime, you can use this patch.

    Thank you so much for having discovered
    this bug.

    Marco Pratesi

     
  • Marco Pratesi
    Marco Pratesi
    2004-06-13

    • status: open --> closed
     
  • Marco Pratesi
    Marco Pratesi
    2004-06-13

    Logged In: YES
    user_id=65709

    Fixed in PHPLM 3.1.2, with a simpler patch,
    that does not affect example-filetodb.php
    Closed.

    Marco Pratesi