[FX.php List] FMStudio clone method replacement?

david weiner 1265 at lucerneblvd.org
Fri Sep 4 11:36:46 MDT 2009


Thanks Steve,
I'm going to explain a little more to see if maybe an idea sprouts  
somewhere.

I have a relatively large set of FMStudio generated files inside of a  
Drupal based CMS. The pages (nodes in drupal-speak) work great as-is,  
but when I do a search through the CMS search function using a keyword  
that appears in more than one FMStudio page I get a clone error  
because Drupal is essentially running through each node to show the  
search hit on a single view.

I've tried moving the clone function off the node and into the config  
file which is already pulled in with a require_once and it works when  
I view the individual node but fails on the search because it can't  
find the addDBParam function. I'm guessing this means by having the  
clone function in a page that is called as require_once it gets  
excluded from the search results loop and doesn't load in FX.php  
properly.

One thing I'm thinking may work but haven't tried yet is to  
standardize the queries so they all use the same clone statement, i.e.  
$db_find = clone($connect);

Anyone have any other ideas?
David


On Sep 4, 2009, at 12:25 AM, Steve Winter wrote:

> Hi David,
>
> I think you may have something of an apples and oranges situation  
> there, in that clone will produce a 'copy' of an object, where as  
> include is for pulling in additional code... if you were going to  
> try this then you'd need to know what code produced the $name object  
> in the first place, and be able to (exactly) replicate the same  
> function(s) again to build your new object...
>
> Cheers
> Steve
>
>
> On 4 Sep 2009, at 01:44, david weiner wrote:
>
>> Hi,
>> I just inherited a bunch of files made with FMStudio and they use  
>> clone($name) to call in all the connection variables.
>>
>> I need to somehow change this to be some kind of include_once  
>> statement and I've tried having the clone line as an include and  
>> adding it to the connection file itself but neither works.
>>
>> Does anyone on this list know of a way to do this?
>>
>> Thanks,
>> David
>>
>> (I'm waiting on approval for the fmwebschool list, so I'll ask  
>> there when I can)
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list



More information about the FX.php_List mailing list