diff options
author | Terry | 2019-03-29 09:15:58 -0300 |
---|---|---|
committer | Terry | 2019-03-29 09:15:58 -0300 |
commit | 48c2355d0ac6e433769d0e3dfc5df33df405fb78 (patch) | |
tree | 72c9fb2e553c537fd946bd25d116bcca02d9f750 | |
parent | 2f7bc2a8e8daf338621736b78916f07af254ba68 (diff) | |
download | weabot-48c2355d0ac6e433769d0e3dfc5df33df405fb78.tar.gz weabot-48c2355d0ac6e433769d0e3dfc5df33df405fb78.tar.xz weabot-48c2355d0ac6e433769d0e3dfc5df33df405fb78.zip |
Fix menor en delpost + css
-rw-r--r-- | cgi/post.py | 4 | ||||
-rwxr-xr-x | cgi/weabot.py | 3 | ||||
-rw-r--r-- | static/css/txt/bbs.css | 8 |
3 files changed, 8 insertions, 7 deletions
diff --git a/cgi/post.py b/cgi/post.py index f0ee814..2c14004 100644 --- a/cgi/post.py +++ b/cgi/post.py @@ -692,9 +692,9 @@ def deletePost(postid, password, deltype='0', imageonly=False, quick=False): if password: if password != post['password']: raise UserError, "No tienes permiso para eliminar este mensaje." - if post["parentid"] == '0' and int(post["length"]) >= Settings.DELETE_FORBID_LENGTH: + elif post["parentid"] == '0' and int(post["length"]) >= Settings.DELETE_FORBID_LENGTH: raise UserError, "No puedes eliminar un hilo con tantas respuestas." - if (int(time.time()) - int(post["timestamp"])) > 86400: + elif (int(time.time()) - int(post["timestamp"])) > 86400: raise UserError, "No puedes eliminar un post tan viejo." # just update the DB if deleting only the image, otherwise delete whole post diff --git a/cgi/weabot.py b/cgi/weabot.py index 056a933..736ed85 100755 --- a/cgi/weabot.py +++ b/cgi/weabot.py @@ -795,7 +795,6 @@ class weabot(object): return (post_url, ttaken) def delete_post(self, boarddir, postid, imageonly, password, mobile=False): - # open database OpenDb() # set the board @@ -821,7 +820,7 @@ class weabot(object): # delete posts if board['board_type'] == '1' and len(to_delete) == 1: # we should be deleting only one (textboard) - # check if it's the last post and delete it completely if it is + # check if it's the last post and delete permanently if so deltype = '0' post = FetchOne("SELECT `id`, `timestamp`, `parentid` FROM `posts` WHERE `boardid` = %s AND `id` = %s LIMIT 1" % (board["id"], str(to_delete[0]))) if post['parentid'] != '0': diff --git a/static/css/txt/bbs.css b/static/css/txt/bbs.css index fa7cc16..fbe23ed 100644 --- a/static/css/txt/bbs.css +++ b/static/css/txt/bbs.css @@ -10,6 +10,8 @@ h3{font-size:19px;font-weight:normal;margin:8px 0} h4{clear:both;font-weight:normal;margin:0} h5{margin-bottom:8px} input[type="text"],textarea{background:#FFF;border:1px inset #DDD;color:#000} +input[type=submit],input[type=button],button{border:1px outset #DDD;background:#EEE;color:#333;padding:1px 9px} +input[type=submit]:active,input[type=button]:active,button:active{border-style:inset} .banner{display:block;margin:0 auto} #rules{line-height:1.25em;margin:8px 0} .spoil{background:#000;color:#000}.spoil:hover{color:#fff} @@ -26,7 +28,7 @@ pre{line-height:125%;margin:0;white-space:pre-wrap} .links{font-size:14px;text-align:center} #threadlinks{margin-bottom:7px;text-align:center} #threadlinks a{margin:0 4px} -#threadlist{font-size:14px;line-height:1;max-height:11em;padding:7px;overflow-y:scroll} +#threadlist{font-size:14px;line-height:1;max-height:16em;padding:7px;overflow-y:scroll} #threadlist a{text-decoration:none} #thread_nav{padding-left:6px} .mainpage .postform,.formpad{padding-left:40px} @@ -70,11 +72,11 @@ form .msg{margin:0;padding:8px 2px;text-align:left} #content.grid{display:flex;flex-flow:row wrap;justify-content:space-around} #content.grid .row{flex:1 1 auto;padding:5px} #content.grid .row div{display:inline} -@media(min-height:999px){#threadlist{max-height:16em}} @media(max-width:720px){ body{font-size:15px} .banner{width:100%!important;height:auto!important;margin-top:1em} .outerbox,.mainpage .thread,#footer,#content{margin:1em 0} + br{line-height:.5em} h2 a{font-size:19px} h4,h2 span,#rules{font-size:12px} .pblock,#footer,.end{font-size:14px} @@ -92,4 +94,4 @@ form .msg{margin:0;padding:8px 2px;text-align:left} form,#thread_nav,#footer,.end,.locked{text-align:center} #footer a{display:block} #content.list .row div{padding:0 2px} -} +}
\ No newline at end of file |