Fixed a bug that prevented the autosaver from working on non-forum notebooks.
This commit is contained in:
parent
b1cdfad22b
commit
3c11526480
3
NEWS
3
NEWS
|
@ -1,3 +1,6 @@
|
|||
1.5.8:
|
||||
* Fixed a bug that prevented the autosaver from working on all notebooks.
|
||||
|
||||
1.5.7: November 18, 2008
|
||||
* Rearranged the links on the left and right side of the wiki editing page
|
||||
so that the note title links have a little more horizontal breathing room.
|
||||
|
|
|
@ -1 +1 @@
|
|||
VERSION = u"1.5.7"
|
||||
VERSION = u"1.5.8"
|
||||
|
|
|
@ -417,19 +417,20 @@ class User( Persistent ):
|
|||
def sql_calculate_storage( self, database_backend ):
|
||||
"""
|
||||
Return a SQL string to calculate the total bytes of storage usage by this user. This includes
|
||||
storage for all the user's notes (including past revisions) and their uploaded files. It does
|
||||
storage for all the user's notes (excluding past revisions) and their uploaded files. It does
|
||||
not include storage for the notebooks themselves.
|
||||
"""
|
||||
if database_backend == Persistent.POSTGRESQL_BACKEND:
|
||||
# this counts bytes for the contents of each column
|
||||
note_size_clause = "pg_column_size( note.* )"
|
||||
note_size_clause = "pg_column_size( note_current.* )"
|
||||
else:
|
||||
# this isn't perfect, because length() counts UTF-8 characters instead of bytes.
|
||||
# some columns are left out because they can be null, which screws up the addition
|
||||
note_size_clause = \
|
||||
"""
|
||||
length( note.id ) + length( note.revision ) + length( note.title ) + length( note.contents ) +
|
||||
length( note.notebook_id ) + length( note.startup ) + length( note.user_id )
|
||||
length( note_current.id ) + length( note_current.revision ) + length( note_current.title ) +
|
||||
length( note_current.contents ) + length( note_current.notebook_id ) +
|
||||
length( note_current.startup ) + length( note_current.user_id )
|
||||
"""
|
||||
|
||||
return \
|
||||
|
@ -438,11 +439,11 @@ class User( Persistent ):
|
|||
select
|
||||
coalesce( sum( %s ), 0 )
|
||||
from
|
||||
user_notebook, note
|
||||
user_notebook, note_current
|
||||
where
|
||||
user_notebook.user_id = %s and
|
||||
user_notebook.owner = 't' and
|
||||
note.notebook_id = user_notebook.notebook_id
|
||||
note_current.notebook_id = user_notebook.notebook_id
|
||||
) as note_storage,
|
||||
(
|
||||
select
|
||||
|
|
|
@ -66,7 +66,7 @@ function Wiki( invoker ) {
|
|||
this.display_message( "Luminotes support for your web browser (" + beta_agent + ") is currently in beta. If you encounter any problems, please contact support so that they can be fixed!" );
|
||||
}
|
||||
|
||||
if ( this.notebook_has_tag( this.notebook, "forum" ) )
|
||||
if ( !this.notebook_has_tag( this.notebook, "forum" ) )
|
||||
this.autosaver = Autosaver( this );
|
||||
|
||||
var deleted_id = getElement( "deleted_id" ).value;
|
||||
|
|
Reference in New Issue