Posted on: 09/26/06 01:14pm
By: LWC
Let's say you want to change a certain table's name inside your plugin - currently you have to scan your entire archive and search and replace every occurence of the old one.
Which led me to think - is it even important that Geeklog itself would know about a plugin's tables? I mean, isn't the plugin in charge of everything regarding its tables - be it installing, modifying or uninstalling them?
So why do the plugins even use $_TABLE? Isn't it better to use, say, "ALTER TABLE {$_CONF_MYPLUGIN['table']} SET..." as $_CONF_MYPLUGIN['table'] could be changed in an instant in the plugin's config.php?
The only difference is that every relevant global would contain $_CONF_MYPLUGIN instead of $_TABLE.
The only reason I can think of that $_TABLE helps is if Geeklog needs to know about the plugins' tables itself.
So does it?
$_TABLE vs. Automation
Posted on: 09/26/06 01:57pm
By: machinari
It is as you say, for the sake of convenience. My plugins make frequent use of regular Geeklog tables at the same time as its own tables. Accessing one array instead of two is, for me, more convenient especially when I'm writing the code.
$_TABLE vs. Automation
Posted on: 09/26/06 02:09pm
By: Dirk
It also makes doing things like
this[*1] much easier ...
bye, Dirk
$_TABLE vs. Automation
Posted on: 09/26/06 05:48pm
By: jmucchiello
Automated backup programs would also benefit from having a single a _TABLES array.