6
Quote:
chrisz wrote:
It would be great if in module installations you could define the installation directory and table names so you could use the same module for multiple sections. Just my 2 cents.
Chris
It is more complicated than that, though. Throughout the code of any given module there are SQL statements with the EXACT names of the tables used. If the tables names are dynamic, every single one of these queries would have to be rewritten to pull the table name from somewhere. Not only would that be complicated, but it could potentially slow down the whole transaction.
One possible solution is to put the table names in the xoops_version.php file that is unique to each module, and make sure that each individual copy of the module has different table names. Then, the SQL statements could be rewritten to pull the table names from xoops_version instead of being hardcoded. Again, though, this involves a lot of dev work for EACH INDIVIDUAL MODULE. There is NO WAY to do this for all modules just by changing something the XOOPS core or kernel, I believe. It has to be done on an individual module basis.