Merge branch 'bzr/golem' of /Users/distler/Sites/code/instiki

This commit is contained in:
Jacques Distler 2011-10-26 14:23:21 -05:00
commit 4a3d7e0b78

View file

@ -14,7 +14,7 @@ class WikiFile < ActiveRecord::Base
def validate
if file_name
if ! is_valid?(file_name)
if ! WikiFile.is_valid?(file_name)
errors.add("file_name", "is invalid. Only latin characters, digits, dots, underscores, " +
"dashes and spaces are accepted")
elsif file_name == '.' or file_name == '..'