Changeset - 9c85d884315b
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2012-10-23 15:27:06
marcin@python-works.com
don't use config for visual settings. It totally doesn't work on multi instance mode
1 file changed with 8 insertions and 6 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/base.py
Show inline comments
 
@@ -21,13 +21,13 @@ from rhodecode.lib.utils2 import str2boo
 
    safe_str
 
from rhodecode.lib.auth import AuthUser, get_container_username, authfunc,\
 
    HasPermissionAnyMiddleware, CookieStoreWrapper
 
from rhodecode.lib.utils import get_repo_slug, invalidate_cache
 
from rhodecode.model import meta
 

	
 
from rhodecode.model.db import Repository, RhodeCodeUi, User
 
from rhodecode.model.db import Repository, RhodeCodeUi, User, RhodeCodeSetting
 
from rhodecode.model.notification import NotificationModel
 
from rhodecode.model.scm import ScmModel
 
from rhodecode.model.meta import Session
 

	
 
log = logging.getLogger(__name__)
 

	
 
@@ -239,17 +239,19 @@ class BaseController(WSGIController):
 
        c.rhodecode_instanceid = config.get('instance_id')
 
        c.rhodecode_name = config.get('rhodecode_title')
 
        c.use_gravatar = str2bool(config.get('use_gravatar'))
 
        c.ga_code = config.get('rhodecode_ga_code')
 
        # Visual options
 
        c.visual = AttributeDict({})
 
        c.visual.show_public_icon = str2bool(config.get('rhodecode_show_public_icon'))
 
        c.visual.show_private_icon = str2bool(config.get('rhodecode_show_private_icon'))
 
        c.visual.stylify_metatags = str2bool(config.get('rhodecode_stylify_metatags'))
 
        c.visual.lightweight_dashboard = str2bool(config.get('rhodecode_lightweight_dashboard'))
 
        c.visual.lightweight_journal = str2bool(config.get('rhodecode_lightweight_dashboard'))
 
        rc_config = RhodeCodeSetting.get_app_settings()
 

	
 
        c.visual.show_public_icon = str2bool(rc_config.get('rhodecode_show_public_icon'))
 
        c.visual.show_private_icon = str2bool(rc_config.get('rhodecode_show_private_icon'))
 
        c.visual.stylify_metatags = str2bool(rc_config.get('rhodecode_stylify_metatags'))
 
        c.visual.lightweight_dashboard = str2bool(rc_config.get('rhodecode_lightweight_dashboard'))
 
        c.visual.lightweight_journal = str2bool(rc_config.get('rhodecode_lightweight_dashboard'))
 

	
 
        c.repo_name = get_repo_slug(request)
 
        c.backends = BACKENDS.keys()
 
        c.unread_notifications = NotificationModel()\
 
                        .get_unread_cnt_for_user(c.rhodecode_user.user_id)
 
        self.cut_off_limit = int(config.get('cut_off_limit'))
0 comments (0 inline, 0 general)