Disabled file uploads in preparation to release 0.10

This commit is contained in:
Alexey Verkhovsky 2005-04-03 04:22:46 +00:00
parent c646121b32
commit c0605f0b78
3 changed files with 28 additions and 11 deletions

View file

@ -1,18 +1,18 @@
HEAD: * 0.10.0:
RSS feeds accept query parameters, sush as Ported to ActionPack
http://localhost:2500/wiki/rss_with_headlines?start=2005-02-18&end=2005-02-19&limit=10 RedCloth 3.0.3 (mixing Textile and Markdown on the same page)
RedCloth 3.0.3 (mixing Textile and Markdown in the same page)
Files/pictures can be uploaded to a wiki and served from / displayed in wiki pages
Wiki link syntax doesn't conflict with Textile hyperlink syntax. Therefore
"textile link":LinkToSomePlace will not look insane.
Instiki can serve static content (such as HTML or plain-text files) from ./public Instiki can serve static content (such as HTML or plain-text files) from ./public
directory directory
Wiki search handles multibyte (UTF-8) characters correctly Much friendlier admin interface
Ported to ActionPack Wiki link syntax doesn't conflict with Textile hyperlink syntax. Therefore
"textile link":LinkToSomePlace will not look insane.
RSS feeds accept query parameters, sush as
http://localhost:2500/wiki/rss_with_headlines?start=2005-02-18&end=2005-02-19&limit=10
Madeleine will check every hour if there are new commands in the log or 24 hours have Madeleine will check every hour if there are new commands in the log or 24 hours have
passed since last snapshot, and take snapshot if either of these conditions is true passed since last snapshot, and take snapshot if either of these conditions is true
Madeleine will also not log read-only operations, resulting in a better performance Madeleine will also not log read-only operations, resulting in a better performance
Wiki extracts (to HTML and plain text) will leave only the last extract file in ./storage Wiki extracts (to HTML and plain text) will leave only the last extract file in ./storage
Wiki search handles multibyte (UTF-8) characters correctly
Local hyperlinks in published pages point to published pages [Michael DeHaan] Local hyperlinks in published pages point to published pages [Michael DeHaan]
Fixed a bug that sometimes caused all past revisions of a page to be "forgotten" on Fixed a bug that sometimes caused all past revisions of a page to be "forgotten" on
restart restart
@ -23,7 +23,7 @@ HEAD:
Automated tests for all controller actions Automated tests for all controller actions
category: lines are presented as links to "All Pages" for relevant categories category: lines are presented as links to "All Pages" for relevant categories
Search looks at page titles, as well as content Search looks at page titles, as well as content
Various other usability enhancements and bug fixes Multiple other usability enhancements and bug fixes
* 0.9.2: * 0.9.2:
Rollback takes the user to an edit form. The form has to be submitted for the change to Rollback takes the user to an edit form. The form has to be submitted for the change to

View file

@ -2,6 +2,9 @@ require 'fileutils'
require 'application' require 'application'
require 'instiki_errors' require 'instiki_errors'
# Controller that is responsible for serving files and pictures.
# Disabled in version 0.10
class FileController < ApplicationController class FileController < ApplicationController
layout 'default' layout 'default'
@ -45,6 +48,8 @@ class FileController < ApplicationController
end end
def import def import
return if file_uploads_disabled?
check_authorization check_authorization
if @params['file'] if @params['file']
@problems = [] @problems = []
@ -64,8 +69,15 @@ class FileController < ApplicationController
end end
protected protected
def check_allow_uploads def check_allow_uploads
# TODO enable file uploads again after 0.10 release
unless RAILS_ENV == 'test'
render_text 'File uploads are not ready for general use in Instiki 0.10', '403 Forbidden'
return false
end
unless @web.allow_uploads unless @web.allow_uploads
render_text 'File uploads are blocked by the webmaster', '403 Forbidden' render_text 'File uploads are blocked by the webmaster', '403 Forbidden'
return false return false

View file

@ -46,6 +46,10 @@
<input type="checkbox" name="count_pages" <%= 'checked="on"' if @web.count_pages %> /> <input type="checkbox" name="count_pages" <%= 'checked="on"' if @web.count_pages %> />
Count pages Count pages
<br/> <br/>
<!--
File uploads are not ready for gfeneral use, and therefore are disabled in release 0.10
TODO Enable these input elements again after release 0.10
<input type="checkbox" name="allow_uploads" <%= 'checked="on"' if @web.allow_uploads %> /> <input type="checkbox" name="allow_uploads" <%= 'checked="on"' if @web.allow_uploads %> />
Allow uploads of no more than Allow uploads of no more than
<input type="text" name="max_upload_size" value="<%= @web.max_upload_size %>" <input type="text" name="max_upload_size" value="<%= @web.max_upload_size %>"
@ -55,6 +59,7 @@
allow users to upload pictures and other files and include them on wiki pages allow users to upload pictures and other files and include them on wiki pages
</em> </em>
<br/> <br/>
-->
</small> </small>
</p> </p>