Re: 3 csets were pushed to modules/stable: Merge [email protected]:/var/bk/xaraya...

Jonn Beames <[email protected]>
Newsgroups gmane.comp.cms.xaraya.bk-notices
Organization Xaraya
Message-ID <[email protected]>
mikespub wrote:
> In article <[email protected]>, mikespub-111RdWWlOxkOkXtL6OYfHgC/[email protected] 
> (Michel Dalle) wrote:
> 
>>...    
>>     xarcachemanager/xarinit.php
>>       1.25 05/02/02 03:33:15 [email protected] +2 -1
>>       cache storage sync
>>...
> 
> 
> TODO: add new config options automatically to config.caching.php on update.
> 
> I know there are still some issues with the update method from previous
> versions (bug 3877), so I left that part open for now :-)

It's just the legacy updates that need some cleanup.  Take a look at the 
0.3.2 update case as an example.  You can get the new config options in 
by adding something like this to the 0.3.3 case:


     // get the existing settings
     $configSettings = xarModAPIFunc('xarcachemanager',
         'admin',
         'get_cachingconfig',
         array('from' => 'file',
               'cachingConfigFile' => $cachingConfigFile));

     // remove the file that is missing the option
     @unlink($cachingConfigFile);

     // copy in a fresh file from the dist
     copy($defaultConfigFile, $cachingConfigFile);

     // put the sites settings into the new file
     xarModAPIFunc('xarcachemanager', 'admin', 'save_cachingconfig',
                   array('configSettings' => $configSettings,
                         'cachingConfigFile' => $cachingConfigFile));

You can also pull the existing config values from the database by 
setting the get_cachingconfig 'from' arg  to 'db' - should you prefer 
(the config values are backuped up in modvars incase of trouble with the 
config file).

- Jonn
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.