|
|
Edit Story IndexLinks Gets Updated With Empty Results
Posted under General by mochaexpress (---.minnesota.com) on Tuesday February 20 2001 @ 02:44AM EST
|
jason,
i'm not sure if you intended this. say i have 2 indexlinks set up. when i enter a story, i enter 2 urls for the indexes. now i edit the story, and remove the indexes.
in pgsql i see this:
mnwork=# select * from t_indexlinks;
rid | parentrid | name | url | hits
-----+------------------+--------------+-----+------
22 | 01/02/18/3860987 | story url | | 0
19 | 01/02/13/0800968 | story url | | 0
25 | 01/02/15/6864308 | story url | | 0
26 | 01/02/15/6864308 | story images | | 0
function f_updateindexlinks() seems to delete all indexlinks with parentrid of $rid. then does a for loop and inserts values from the form we just updated. remember it's blank (i just removed it) so it's updating like the table above.
i don't think this is the right thing to do. i think if it's blank, it shouldn't insert anything into that table and leave it deleted.
if i'm correct, i'll fix the bug. if not, could elaborate on why the intended behavior?
|
|
|
jason writes on Tuesday February 20 2001 @ 01:03PM EST: [ reply | parent ]
You're correct. It was designed with the idea that the Index Links field(s) were changed, not deleted. Thanks for finding that.
|
|
|
|