On Thu, Jun 16, 2011 at 4:41 PM, rg1024 <[email protected]> wrote:
> This is not compatible. We must revise all files:!!
> $config[SITENAME][OPTION];
>
> another idea can be encapsulated config in a class and make changes like
> this, more easy.
I completely agree...this improves our api as well. The site needs to
be able to run without a config.php and with a config.php that
overrides the db values, and operate for one or more sites. Where the
one/default site would set defaults for one or more sites, until more
specific constraints existed.
> For example:
> $aiki->config->get("db_name");
> $aiki->config->set("debug","on"); // set only for actual page
> $aiki->config->store("language","es"); // store permanently
> $aiki->config->remeber("records-per-page",50); // set only for actual session.
>
> The class must:
> - determine how store the variable.
> - determine if it a user, sites o aiki variable
>
> For some time we can use $global config in this class to provide
> compatibility.
> class config {
>
> function get ($var) {
> global $config;
> if ( isset($config[$var])) return $config[$var]
>
> .....our new algorithm..
>
> }
I think that sounds like a plan. So then would that multi-dimensional
array allow for storing multiple sites and configuration options?
Is that sound? Is this designing too far ahead? Possibly?
Jon
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/795393
>
> Title:
> the config coptions in config.php not ready for multiple sites
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/aikiframework/+bug/795393/+subscriptions
>
--
Jon Phillips
http://rejon.org/ | http://fabricatorz.com/
chat/skype: kidproto | irc: rejon
+1.415.830.3884 (global) | +1-510-499-0894 (sf)
+86-187-1003-9974 (beijing)
--
You received this bug notification because you are a member of Aiki
Framework Admins, which is subscribed to aikiframework.
https://bugs.launchpad.net/bugs/795393
Title:
the config coptions in config.php not ready for multiple sites
Status in Aiki Framework:
Confirmed
Bug description:
The config options in configs/config.php are not ready for multiple
sites. Need to figure out some structure for multi-sites.
For backwards compatibility could do:
$config[SITENAME][OPTION];
ex:
$config['example.org']['db_name'] = 'example_org';
Any other thoughts?
But have to think this through, since no current option could have an
OPTION name
To manage notifications about this bug go to:
https://bugs.launchpad.net/aikiframework/+bug/795393/+subscriptions
_______________________________________________
Mailing list: https://launchpad.net/~aikiframework.admins
Post to : [email protected]
Unsubscribe : https://launchpad.net/~aikiframework.admins
More help : https://help.launchpad.net/ListHelp