• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

allura


Commit MetaInfo

修订版4ece7f57b160b0ef251a67c3b44154ae277d43bf (tree)
时间2010-06-05 01:46:49
作者Jenny Steele <jsteele@geek...>
CommiterJenny Steele

Log Message

Fixed an issue with the empty string being set as a tag on wiki pages if no tag is entered.

更改概述

差异

--- a/ForgeWiki/forgewiki/templates/page_view.html
+++ b/ForgeWiki/forgewiki/templates/page_view.html
@@ -29,7 +29,7 @@
2929 </div>
3030 <div py:if="c.app.show_right_bar" id="sidebar-right" class="span-7 last">
3131 <div py:if="len(page.labels)">
32- Tags: <span py:for="label in page.labels"><a href="../browse_tags">$label (${page.artifacts_labeled_with(label).count()})</a></span>
32+ Tags: <span py:for="label in page.labels" py:if="label != ''"><a href="../browse_tags">$label (${page.artifacts_labeled_with(label).count()})</a></span>
3333 <hr/>
3434 </div>
3535 <div class="gravatar sm">
--- a/ForgeWiki/forgewiki/wiki_main.py
+++ b/ForgeWiki/forgewiki/wiki_main.py
@@ -492,7 +492,10 @@ class PageController(object):
492492 else:
493493 self.page.title = new_title
494494 self.page.text = text
495- self.page.labels = labels.split(',')
495+ if len(labels):
496+ self.page.labels = labels.split(',')
497+ else:
498+ self.page.labels = []
496499 self.page.commit()
497500 h.tag_artifact(self.page, c.user, tags)
498501 if new_viewable_by: