Skip to content
Browse files

Adds a new stage to the automatic configuration upgrade mechanism. It

covers the latest changes - related to bug #951.

git-svn-id: svn://cherokee-project.com/cherokee/trunk@5354 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information...
1 parent fde9b23 commit ff791414368914488b47f183e072ea04d4aff158 @alobbs alobbs committed Aug 9, 2010
Showing with 14 additions and 0 deletions.
  1. +14 −0 admin/config_version.py
View
14 admin/config_version.py
@@ -42,6 +42,16 @@ def upgrade_to_0_99_45 (cfg):
if 'None' in cfg.keys('source'):
del (cfg['source!None'])
+# Converts from 0.99.45 to 1.0.7
+def upgrade_to_1_0_7 (cfg):
+ # Adds 'check_local_file' to Extension php
+ # http://bugs.cherokee-project.com/951
+ for v in cfg.keys('vserver'):
+ for r in cfg.keys('vserver!%s!rule'%(v)):
+ if cfg.get_val('vserver!%s!rule!%s!match'%(v,r)) == 'extensions' and \
+ cfg.get_val('vserver!%s!rule!%s!match!extensions'%(v,r)) == 'php':
+ cfg['vserver!%s!rule!%s!match!check_local_file'%(v,r)] = '1'
+
def config_version_get_current():
ver = configured.VERSION.split ('b')[0]
@@ -108,5 +118,9 @@ def config_version_update_cfg (cfg):
if ver_config_i < 99045:
upgrade_to_0_99_45 (cfg)
+ # Update to.. 1.0.7
+ if ver_config_i < 1000007:
+ upgrade_to_1_0_7 (cfg)
+
cfg["config!version"] = ver_release_s
return True

0 comments on commit ff79141

Please sign in to comment.
Something went wrong with that request. Please try again.