[EMAIL PROTECTED] wrote:
> > But a link can be broken, mgd_delete_article($real),
> > and with MySQL deleted article id can be reused linking to another one.
>
> If you want to handle this within Midgard (instead of in self-supplied
> php functions to wrap the create and delete functions) an
> article/topic could include a reference count to prohibit deletion
> of them while they are still linked to a topic.
>
> But links change the topic/topic and topic/article relationship
> from a one-to-many to a many-to-many relationship, which requires
> an extra table and changes to the topic/article implementation.
>
> Another way would be to create 'ghost' articles/topics whose
> sole purpose is to represent a link. Fetching a ghost article
> could then automatically fetch the linkee (taking into account
> links to links to links to...). The ghost records could double
> as a reference count.
>
> This is pretty straightforward, technically, but has performance
> implications, and might make access control more 'interesting'.
> And the Admin site would need a large rework, I guess.
Ideally you would want to support multiple levels of linking,
automatic link tracking and retargetting or removal of
links if the primary topic/article is moved or deleted, etc...
But maybe this is a case where the best is the enemy of
the good; a mininal set of features might be enough for
most application environments. For example, how about a
utility to create 'ghost' articles/toics to link only to 'real'
articles/topics, setting a flag in the target article/topic to
indicate that at least one linking article/topic exists. A separate
utility would be invoked to scan through the topic/article
database to identify and delete any links (and reset the link
flag of the target link flag) before removal of the target is
permitted.
Paul
--
This is The Midgard Project's mailing list. For more information,
please visit the project's web site at http://www.midgard-project.org
To unsubscribe the list, send an empty email message to address
[EMAIL PROTECTED]