Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 09:18 am EDT

Geeklog Forums

$_TABLE vs. Automation


Status: offline

LWC

Forum User
Full Member
Registered: 02/19/04
Posts: 818
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?
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
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.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
It also makes doing things like this much easier ...

bye, Dirk
 Quote

Status: offline

jmucchiello

Forum User
Full Member
Registered: 08/29/05
Posts: 985
Automated backup programs would also benefit from having a single a _TABLES array.
 Quote

All times are EDT. The time is now 09:18 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content