diff --git a/model/File.py b/model/File.py index 3189eb1..3f620be 100644 --- a/model/File.py +++ b/model/File.py @@ -96,7 +96,7 @@ class File( Persistent ): self.__size_bytes or 'null', quote( self.__content_type ), quote( self.object_id ) ) def sql_delete( self ): - return "delete from file where file_id = %s;" % quote( self.object_id ) + return "delete from file where id = %s;" % quote( self.object_id ) def to_dict( self ): d = Persistent.to_dict( self ) diff --git a/static/js/Wiki.js b/static/js/Wiki.js index 0112404..f24bf7e 100644 --- a/static/js/Wiki.js +++ b/static/js/Wiki.js @@ -2482,6 +2482,9 @@ File_link_pulldown.prototype.delete_button_clicked = function ( event ) { }, function ( result ) { self.wiki.display_storage_usage( result.storage_bytes ); } ); + + this.link.href = "/files/new"; + this.editor.focus(); } File_link_pulldown.prototype.update_position = function ( anchor, relative_to ) {