Changeset - b9442a8b5e02
[Not reviewed]
beta
0 3 0
Marcin Kuzminski - 15 years ago 2010-11-14 01:30:02
marcin@python-works.com
fixed admin settings form resubmition bug.
removed obsolete whoosh index location. Some small templates fixes
3 files changed with 10 insertions and 14 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/admin/settings.py
Show inline comments
 
@@ -286,16 +286,19 @@ class SettingsController(BaseController)
 
            user_model.update_my_account(uid, form_result)
 
            h.flash(_('Your account was updated succesfully'),
 
                    category='success')
 

	
 
        except formencode.Invalid, errors:
 
            c.user = user_model.get(c.rhodecode_user.user_id, cache=False)
 
            c.user_repos = []
 
            for repo in c.cached_repo_list.values():
 
                if repo.dbrepo.user.username == c.user.username:
 
                    c.user_repos.append(repo)
 
            c.user = UserModel(self.sa).get(c.rhodecode_user.user_id, cache=False)
 
            all_repos = self.sa.query(Repository)\
 
                .filter(Repository.user_id == c.user.user_id)\
 
                .order_by(func.lower(Repository.repo_name))\
 
                .all()
 
            c.user_repos = HgModel().get_repos(all_repos)
 

	
 
            return htmlfill.render(
 
                render('admin/users/user_edit_my_account.html'),
 
                defaults=errors.value,
 
                errors=errors.error_dict or {},
 
                prefix_error=False,
 
                encoding="UTF-8")
rhodecode/lib/indexers/__init__.py
Show inline comments
 
@@ -16,16 +16,12 @@ from whoosh.fields import TEXT, ID, STOR
 
from whoosh.index import create_in, open_dir
 
from whoosh.formats import Characters
 
from whoosh.highlight import highlight, SimpleFragmenter, HtmlFormatter
 

	
 
import traceback
 

	
 

	
 
#LOCATION WE KEEP THE INDEX
 
IDX_LOCATION = jn(dn(dn(dn(dn(os.path.abspath(__file__))))), 'data', 'index')
 

	
 
#EXTENSIONS WE WANT TO INDEX CONTENT OFF
 
INDEX_EXTENSIONS = ['action', 'adp', 'ashx', 'asmx', 'aspx', 'asx', 'axd', 'c',
 
                    'cfg', 'cfm', 'cpp', 'cs', 'css', 'diff', 'do', 'el', 'erl',
 
                    'h', 'htm', 'html', 'ini', 'java', 'js', 'jsp', 'jspx', 'lisp',
 
                    'lua', 'm', 'mako', 'ml', 'pas', 'patch', 'php', 'php3',
 
                    'php4', 'phtml', 'pm', 'py', 'rb', 'rst', 's', 'sh', 'sql',
rhodecode/templates/changelog/changelog.html
Show inline comments
 
@@ -55,18 +55,15 @@ ${c.repo_name} ${_('Changelog')} - ${c.r
 
								<span><a href="mailto:${h.email_or_none(cs.author)}">${h.email_or_none(cs.author)}</a></span><br/>
 
							</div>
 
							<div class="message">${h.link_to(h.wrap_paragraphs(cs.message),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div>
 
						</div>	
 
						<div class="right">
 
									<div class="changes">
 
										<span class="removed" title="${_('removed')}: ${' | '.join([x.name for x in cs.removed])}">
 
										${len(cs.removed)}</span>
 
										<span class="changed" title="${_('changed')}: ${' | '.join([x.name for x in cs.changed])}">
 
										${len(cs.changed)}</span>
 
										<span class="added" title="${_('added')}: ${' | '.join([x.name for x in cs.added])}">
 
										${len(cs.added)}</span>
 
										<span class="removed" title="${_('removed')}: ${' | '.join([x.name for x in cs.removed])}">${len(cs.removed)}</span>
 
										<span class="changed" title="${_('changed')}: ${' | '.join([x.name for x in cs.changed])}">${len(cs.changed)}</span>
 
										<span class="added" title="${_('added')}: ${' | '.join([x.name for x in cs.added])}">${len(cs.added)}</span>
 
									</div>					
 
										%if len(cs.parents)>1:
 
										<div class="merge">
 
											${_('merge')}<img alt="merge" src="/images/icons/arrow_join.png"/>
 
										</div>
 
										%endif
0 comments (0 inline, 0 general)