Probably nothing, but it really depends what your plugin does. Do you have a github link or anything? Or at least post some example usage of your plugin.
Usually, if you are only querying channels you are fine, at least in most situations, since channels are unique to each site.
Hi Aaron,
If you take a look at the exp_channel_titles table, you’ll see a column labeled “site_id”; this is present for both MSM-enabled and non-MSM sites. When not running MSM, then the only site is the “default_site”, and the site_id is always going to be 1.
There’s also an exp_sites table should you be curious; again this exists even if MSM is not installed or being used.
So it is then always the case that whenever you get the EE object, you can retrieve the current site_id with:
$EE =& get_instance();
echo $EE->config->item('site_id');Having said all of that, I don’t believe you need to do anything to your plugin; your only required parameter, “entry_id” is unique to the exp_channel_titles table, so you do not run the risk of inadvertently retrieving erroneous relationships from other sites.
However if you were to amend your plugin to also accept a url_title as a lookup, then you would need to modify your query to take the current site_id into account.
That was a bit of a rushed response, but hope it helps!
Cheers, John
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.