|
|
@@ -13,7 +13,7 @@ class WakaPost(object): |
|
|
|
__slots__ = [ |
|
|
|
# columns copied directly from model.board |
|
|
|
'num', 'parent', 'timestamp', 'lasthit', 'ip', 'date', 'name', 'trip', |
|
|
|
'email', 'subject', 'password', 'comment', 'image', 'size', 'md5', |
|
|
|
'email', 'subject', 'password', 'comment', 'size', 'md5', |
|
|
|
'width', 'height', 'thumbnail', 'tn_width', 'tn_height', 'lastedit', |
|
|
|
'lastedit_ip', '_admin_post', 'stickied', 'locked', |
|
|
|
# extensions |
|
|
@@ -171,6 +171,14 @@ class WakaPost(object): |
|
|
|
# TODO: database migration / unfucking |
|
|
|
self._admin_post = (value in (True, 1, 'yes', 'True', '1')) |
|
|
|
|
|
|
|
@property |
|
|
|
def image(self): |
|
|
|
return self.filename |
|
|
|
|
|
|
|
@image.setter |
|
|
|
def image(self, value): |
|
|
|
self.filename = value |
|
|
|
|
|
|
|
def set_ip(self, numip, editing=None): |
|
|
|
'''Sets the ip or the lastedit ip''' |
|
|
|
if editing: |
|
|
|