Closed (fixed)
Project:
Domain
Version:
6.x-1.0-rc2
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
3 Jun 2008 at 15:45 UTC
Updated:
22 Jun 2008 at 15:32 UTC
Jump to comment: Most recent file
This is a patch to the settings_domain_prefix.inc and the domain.module so that it will allow hook_domaincron to change the the global $dbprefix variable so that it will allow domain prefixing changes on cron.
Enjoy!
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | table_prefix_switching_domaincron_d6.patch | 2.28 KB | grndlvl |
| table_prefix_switching_domaincron.patch | 4.63 KB | grndlvl |
Comments
Comment #1
agentrickardWhat, if anything did you change in the domain prefix include file? The patch rewrote the entire file, but I can't see why.
Comment #2
grndlvl commentedYa i do not know why the diff did the whole file really strange considering I only changed
and added this conditional in
If you would like I do a up and try to do the diff again.
Comment #3
agentrickardI wonder if we need to do the same for Domain Conf?
Comment #4
grndlvl commentedDo not commit this yet, there may be a problem. I need to retest a few things.
Thanks
Comment #5
grndlvl commentedThis patch does work perfectly for me and I am currently using it on http://wheretraveler.com/ just one issue that I found is that if the function that is being called within hook_domaincron has static variables inside it then the new queries for the table prefixing will not be taken into account.
For example:
***Note** One of the tables I have domain prefixed is term_hierarchy so that each domain can have its own separate parent child relationships with taxonomy.
I was calling a function within hook_domaincron that called taxonomy_get_tree() and it has static variables $children, $parents, $terms. This was a problem because where ever cron was being ran it would pull that domains parent child relation ship out of that specific domains table. So in order to remedy this I added an additional parameter to taxonomy_get_tree() that allows me to tell the function to not use the static variables when I run this from a specific function.
The Call
The fix
For more information on static variable fixes. See Here!
I will also roll this patch for the taxonomy module I will post the link here as soon as I do.The patch for taxonomy_get_tree
Comment #6
grndlvl commentedHere is a patch for 6.x, should work not tested I do not have a six install to test at the time.
Comment #7
agentrickardThere was a typo in the D6 patch, but this has ben committed to both branches.
Nice catch.
Comment #8
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.