[pLog-svn] r2038 - in plog/branches/plog-1.0.1: . class/summary/action

Reto Hugi plog at hugi.to
Sun May 22 17:30:12 GMT 2005


I'm not sure I really understood your requirements about the db-upgrade
and the possibility to activate it as a "hidden feature" until v1.1 is
out, providing a radiobutton in the admin panel. So that's what I did:

Added this and *only this* line to the wizard:
$Inserts[113] = "INSERT INTO {dbprefix}config (config_key, config_value,
value_type) VALUES('use_http_accept_language_detection', '0', 1);

-> default value is deactivated. It accepts 0 or 1.

My intention was to add the config value as soon as the DB is upgraded
to 1.1 - is that the way to do it?

In the script itself the php define is just a "workaround" to have a
comfort way to use the feature even without admin panel and no upgraded DB:
elseif ( $this->_config->getValue( "use_http_accept_language_detection",
HTTP_ACCEPT_LANGUAGE_DETECTION) == 1 )

there the script asks for the config value, if there is none, the one
passed as a second parameter will be returned. As this value is defined
by HTTP_ACCEPT_LANGUAGE_DETECTION it's just a fallback for now, until
there is a config value in the db.

I may be too dumb to get the point. But I'd be glad to correct my
mess...just don't now how at the moment :)

reto


On 22.05.2005 18:18, Oscar Renalias wrote:
> aaah this looks very good :)
> 
> But I was wondering... could it be possible to use a configuration  
> key instead of a PHP define? I mean, something coming from the  
> plog_config table, just to be consistent with all the other plog  
> features, you know :))
> 
> Oscar
>



More information about the pLog-svn mailing list