I have made a modification to farCry\fourq\tags\contentobjectgetmultiple.cfm
so it still returns a structure for objects that dont exist - phantom link

code snippet (page attached)
if (not len(contenttype)) {
                //AJM: no object - create dummy
                stObj = structNew();
                stTmp[i] = Duplicate(stObj);
                stTmp[i].objectID = i;
                stTmp[i].title = '<i style="color: purple" title="Ghost who walks
and never dies">Phantom detected</i>';
                continue; // ie. go to next iteration
        }

So now when looking at related links in an object, eg dmHTML, you will
see all the related links even if the object doesnt exist and can then
delete them.


This requires manual intervention. I think an admin function that
cleans out related links for the whole site would be a good idea. Does
this sould like a good idea to anyone?

Think out aloud, I think it would be a matter of detirmining all
object types,  eg dmHTML, looking for the related links table, eg 2
dmHTML_aReletedIDs, then go looking for each object in that table in
all of the object type tables.

Would use
   q4 = createObject("component", "farcry.fourq.fourq");
   contenttype = q4.findType(objectid=i,dsn=attributes.dsn);
   o = createObject("component", "#attributes.typename#");
rather than going to the dataabase directly.

Sould about right??


On Fri, 18 Jun 2004 15:00:16 +0800, Andrew Mercer <[EMAIL PROTECTED]> wrote:
> 
> How would you go about cleaning up related links in an object like
> dmHTML where the object the links refer to have been deleted?
> 
> When I do a dump of the object the array in ARELATEDIDS has lots of items.
> I have the following in my code:
> 
> <cfif isDefined("stObj.aRelatedIDs") AND NOT arrayisEmpty(stObj.aRelatedIDs)>
>                                         <span class="breadcrumb"><strong>Related 
> Links</strong></span>
>                                         <skin:relatedLinks 
> aRelatedIDs="#stObj.aRelatedIDs#"
> class="crumbpath" r_qlinks="rl_qry" output="true">
> 
>                                         </cfif>
> 
> but skin:relatedLinks is not returning anything.
> 
> I am thinking of something along the line of listing all the related
> links when editing the objects related links with a flag/icon next to
> the ones where the object does not exisit so the user can delete them.
> 
> Or maybe just a script to clean up dead links.
>

Attachment: contentobjectgetmultiple.cfm
Description: Binary data

---
You are currently subscribed to farcry-dev as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to