Wiki links can now refer other project wikis, using this syntax:
[[project:]] -> wiki starting page [[project:page]] [[project:page|text]] where 'project' is the project name or identifier. git-svn-id: http://redmine.rubyforge.org/svn/trunk@643 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
1 parent
38e0c237a4
commit
a5849ee044
2 files changed
+24
-14
No files matched your search
+3
-3
@@ -20,7 +20,7 @@ class Wiki < ActiveRecord::Base
|
||||
has_many :pages, :class_name => 'WikiPage', :dependent => :destroy
|
||||
|
||||
validates_presence_of :start_page
|
||||
validates_format_of :start_page, :with => /^[^,\.\/\?\;\|]*$/
|
||||
validates_format_of :start_page, :with => /^[^,\.\/\?\;\|\:]*$/
|
||||
|
||||
# find the page with the given title
|
||||
# if page doesn't exist, return a new page
|
||||
@@ -38,9 +38,9 @@ class Wiki < ActiveRecord::Base
|
||||
# turn a string into a valid page title
|
||||
def self.titleize(title)
|
||||
# replace spaces with _ and remove unwanted caracters
|
||||
title = title.gsub(/\s+/, '_').delete(',./?;|') if title
|
||||
title = title.gsub(/\s+/, '_').delete(',./?;|:') if title
|
||||
# upcase the first letter
|
||||
title = title[0..0].upcase + title[1..-1] if title
|
||||
title = (title.length > 1 ? title.first.upcase + title[1..-1] : title.upcase) if title
|
||||
title
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user