Fixed a bug in which forum post permalinks didn't work on posts after the first ten in a particular thread.
This commit is contained in:
parent
070b55848d
commit
799e0c12b0
4
NEWS
4
NEWS
|
@ -2,9 +2,11 @@
|
||||||
* Added a font selection button to the toolbar.
|
* Added a font selection button to the toolbar.
|
||||||
* Decreased the default note text font size, so now you can see more of your
|
* Decreased the default note text font size, so now you can see more of your
|
||||||
note text at once.
|
note text at once.
|
||||||
* Added more rounded corners to several display elements.
|
* Added rounded corners to several display elements.
|
||||||
* Fixed a Luminotes Desktop bug in which creating and then clicking on a new
|
* Fixed a Luminotes Desktop bug in which creating and then clicking on a new
|
||||||
note link sometimes caused a red error message.
|
note link sometimes caused a red error message.
|
||||||
|
* Fixed a bug in which forum post permalinks didn't work on posts after the
|
||||||
|
first ten in a particular thread.
|
||||||
|
|
||||||
1.5.10: December 4, 2008
|
1.5.10: December 4, 2008
|
||||||
* Fixed a bug in which certain new installations of Luminotes Desktop
|
* Fixed a bug in which certain new installations of Luminotes Desktop
|
||||||
|
|
|
@ -212,7 +212,11 @@ class Forum( object ):
|
||||||
|
|
||||||
# if a single note was requested, just return that one note
|
# if a single note was requested, just return that one note
|
||||||
if note_id:
|
if note_id:
|
||||||
result[ "notes" ] = [ note for note in result[ "notes" ] if note.object_id == note_id ]
|
note = self.__database.load( Note, note_id )
|
||||||
|
if note:
|
||||||
|
result[ "notes" ] = [ note ]
|
||||||
|
else:
|
||||||
|
result[ "notes" ] = []
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
|
@ -268,6 +268,54 @@ class Test_forums( Test_controller ):
|
||||||
user = self.database.load( User, self.user.object_id )
|
user = self.database.load( User, self.user.object_id )
|
||||||
assert user.storage_bytes == 0
|
assert user.storage_bytes == 0
|
||||||
|
|
||||||
|
def test_general_thread_default_with_unknown_note_id( self ):
|
||||||
|
result = self.http_get( "/forums/general/%s?note_id=unknownid" % self.general_thread.object_id )
|
||||||
|
|
||||||
|
assert result.get( u"user" ).object_id == self.anonymous.object_id
|
||||||
|
assert len( result.get( u"notebooks" ) ) == 4
|
||||||
|
assert result.get( u"notebooks" )[ 0 ].object_id == self.anon_notebook.object_id
|
||||||
|
assert result.get( u"login_url" )
|
||||||
|
assert result.get( u"logout_url" )
|
||||||
|
assert result.get( u"rate_plan" )
|
||||||
|
assert result.get( u"notebook" ).object_id == self.general_thread.object_id
|
||||||
|
assert len( result.get( u"startup_notes" ) ) == 0
|
||||||
|
assert result.get( u"notes" ) == []
|
||||||
|
assert result.get( u"parent_id" ) == None
|
||||||
|
assert result.get( u"note_read_write" ) in ( None, True )
|
||||||
|
assert result.get( u"total_notes_count" ) == 0
|
||||||
|
|
||||||
|
invites = result[ "invites" ]
|
||||||
|
assert len( invites ) == 0
|
||||||
|
|
||||||
|
user = self.database.load( User, self.user.object_id )
|
||||||
|
assert user.storage_bytes == 0
|
||||||
|
|
||||||
|
def test_general_thread_default_with_note_id( self ):
|
||||||
|
self.__make_notes()
|
||||||
|
|
||||||
|
result = self.http_get( "/forums/general/%s?note_id=%s" % ( self.general_thread.object_id, self.note.object_id ) )
|
||||||
|
|
||||||
|
assert result.get( u"user" ).object_id == self.anonymous.object_id
|
||||||
|
assert len( result.get( u"notebooks" ) ) == 4
|
||||||
|
assert result.get( u"notebooks" )[ 0 ].object_id == self.anon_notebook.object_id
|
||||||
|
assert result.get( u"login_url" )
|
||||||
|
assert result.get( u"logout_url" )
|
||||||
|
assert result.get( u"rate_plan" )
|
||||||
|
assert result.get( u"notebook" ).object_id == self.general_thread.object_id
|
||||||
|
assert len( result.get( u"startup_notes" ) ) == 3
|
||||||
|
assert len( result.get( u"notes" ) ) == 1
|
||||||
|
assert result.get( u"notes" )[ 0 ].object_id == self.note.object_id
|
||||||
|
assert result[ u"notes" ][ 0 ].title == u"foo"
|
||||||
|
assert result.get( u"parent_id" ) == None
|
||||||
|
assert result.get( u"note_read_write" ) in ( None, True )
|
||||||
|
assert result.get( u"total_notes_count" ) == 3
|
||||||
|
|
||||||
|
invites = result[ "invites" ]
|
||||||
|
assert len( invites ) == 0
|
||||||
|
|
||||||
|
user = self.database.load( User, self.user.object_id )
|
||||||
|
assert user.storage_bytes == 0
|
||||||
|
|
||||||
def test_general_thread_default_with_login( self ):
|
def test_general_thread_default_with_login( self ):
|
||||||
self.login()
|
self.login()
|
||||||
|
|
||||||
|
|
Reference in New Issue