Changeset - a23b686fb14d
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 15 years ago 2010-11-18 02:25:12
marcin@python-works.com
bugfix for application name
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/admin/settings.py
Show inline comments
 
@@ -103,49 +103,49 @@ class SettingsController(BaseController)
 
            initial = ScmModel().repo_scan(g.paths[0][1], g.baseui)
 
            for repo_name in initial.keys():
 
                invalidate_cache('get_repo_cached_%s' % repo_name)
 

	
 
            repo2db_mapper(initial, rm_obsolete)
 

	
 
            h.flash(_('Repositories successfully rescanned'), category='success')
 

	
 
        if setting_id == 'whoosh':
 
            repo_location = get_hg_ui_settings()['paths_root_path']
 
            full_index = request.POST.get('full_index', False)
 
            task = run_task(tasks.whoosh_index, repo_location, full_index)
 

	
 
            h.flash(_('Whoosh reindex task scheduled'), category='success')
 
        if setting_id == 'global':
 

	
 
            application_form = ApplicationSettingsForm()()
 
            try:
 
                form_result = application_form.to_python(dict(request.POST))
 
                settings_model = SettingsModel()
 
                try:
 
                    hgsettings1 = settings_model.get('title')
 
                    hgsettings1.app_settings_value = form_result['rhodecode_title']
 

	
 
                    hgsettings2 = settings_model('realm')
 
                    hgsettings2 = settings_model.get('realm')
 
                    hgsettings2.app_settings_value = form_result['rhodecode_realm']
 

	
 

	
 
                    self.sa.add(hgsettings1)
 
                    self.sa.add(hgsettings2)
 
                    self.sa.commit()
 
                    set_rhodecode_config(config)
 
                    h.flash(_('Updated application settings'),
 
                            category='success')
 

	
 
                except:
 
                    log.error(traceback.format_exc())
 
                    h.flash(_('error occurred during updating application settings'),
 
                            category='error')
 

	
 
                    self.sa.rollback()
 

	
 

	
 
            except formencode.Invalid, errors:
 
                return htmlfill.render(
 
                     render('admin/settings/settings.html'),
 
                     defaults=errors.value,
 
                     errors=errors.error_dict or {},
 
                     prefix_error=False,
0 comments (0 inline, 0 general)