witten
/
luminotes
Archived
1
0
Fork 0

File deletion now works. Still need unit tests.

This commit is contained in:
Dan Helfman 2008-02-21 00:41:08 +00:00
parent eb18b6020d
commit e0c65a6ac4
2 changed files with 4 additions and 1 deletions

View File

@ -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 )

View File

@ -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 ) {