Commit graph

342 commits

Author SHA1 Message Date
Matthew Barbour
826c623538 PageMode constants 2019-06-18 21:04:31 -05:00
Matthew Barbour
6f501a6e74 Database driver constants 2019-06-14 13:38:47 -05:00
Shish
2396ae2ef9 fix a bunch of lints 2019-05-28 20:27:23 +01:00
Shish
34b05cca7c PSR-2. I'm not a huge fan, but ugly consistency beats no consistency... 2019-05-28 17:59:38 +01:00
Shish
5ec3e89884 php7.1 all the things 2019-05-28 17:31:20 +01:00
Shish
60a28af000 s/implode/Tag::implode/ 2019-02-02 12:07:33 +00:00
Shish
9d3f4ea4b3 move ext-specific js into that ext 2018-11-05 23:12:18 +00:00
Shish
977c3db1e3 PHP7 type annotations 2017-09-21 05:21:42 +01:00
im-mi
c1083bbea1 Fixed comment-delete code-injection vulnerability 2016-09-14 17:42:32 -04:00
Shish
6febdec7b5 more explicit variable types 2016-06-19 23:05:57 +01:00
Shish
06ee5347c7 https support for gravatars 2016-06-18 15:56:24 +01:00
Daku
516488a625 load akismet via composer
note: we should probably be using a more recent library for this, but there doesn't seem to be any general ones..
2016-06-18 06:16:31 +01:00
Shish
cdcd762a52 more comments 2015-09-27 02:17:44 +01:00
Shish
ff13e58f8f clamp to a valid value 2015-09-26 20:03:30 +01:00
Shish
e482f97955 more clamping 2015-09-26 19:53:15 +01:00
Shish
5a8df90fd9 splitting up huge functions in ext/comment 2015-09-26 19:14:11 +01:00
Shish
8c1e3bc92a mark tests as public 2015-09-26 11:17:13 +01:00
Shish
c54e336695 mark tests as incomplete rather than commenting them out 2015-09-24 23:16:38 +01:00
Shish
90cd823ece fix liveness testing, and comments tests 2015-09-20 20:05:06 +01:00
Shish
9af5995dcc PHPUnit proof of concept 2015-09-20 20:03:29 +01:00
Shish
147b47a78c add comment style 2015-09-20 20:02:30 +01:00
Shish
35a4f385b3 phpstorm tidying 2015-09-12 11:43:28 +01:00
Shish
fa2f17817e scrutinizing 2015-08-04 13:53:58 +01:00
Shish
83435e3266 set cookies on Page object 2015-08-03 15:49:36 +01:00
Shish
bb490ac413 stop comment info from concealing comments 2015-04-26 12:54:54 +01:00
Shish
010b0620df add a user flag for bypassing comment checks 2014-11-30 13:52:29 +00:00
jgen
2a9f76d2f0 More comments, removing dead code, fixing small bugs. 2014-04-28 17:36:52 -04:00
jgen
4f51e942be Updating/Fixing/Adding more comments with the PHP Doc style. 2014-04-27 15:33:57 -04:00
jgen
298344048c Make these functions public to prevent scrutinizer from complaining. 2014-04-26 00:27:16 -04:00
jgen
4ec5a7ce52 Removing the closing PHP "?>" tag as per style guidelines. 2014-04-24 22:22:16 -04:00
jgen
ab3f9850e4 Removing the closing PHP "?>" tag as per style guidelines. 2014-04-24 19:01:47 -04:00
Shish
db5aa56300 remove a bunch of dead code 2014-03-29 11:44:34 +00:00
Shish
da29912646 tidy up a bunch of lint errors 2014-03-17 22:05:37 +00:00
jgen
cebc197fba Merge branch 'develop' of git://github.com/shish/shimmie2 2014-02-23 03:11:09 -05:00
jgen
cf35bf82a8 Postgres doesn't support the DATETIME field. 2014-02-22 23:30:58 -05:00
jgen
e30520a5ef Fixing typo. 2014-02-22 23:23:23 -05:00
jgen
9892d1f7fd PostgreSQL does not support INDEX() inside the CREATE TABLE method. You must create the index as a separate query. Fortunately MySQL also support this way of doing things as well. 2014-02-22 23:02:11 -05:00
Daku
16bb38f343 onSearchTermParse regex should be case insensitive 2014-02-15 21:26:31 +00:00
Daku
325da11119 artist/comment/numeric_score metatags now work using :
also updated docs
2014-01-13 09:13:56 +00:00
jgen
4635f333ae This should have been moved earlier in the fix for Issue 346. 2013-12-07 23:16:20 -05:00
jgen
1c8d07983e Fix for PHP Notice being generated.
"PHP Notice:  Trying to get property of non-object in /comment/main.php on line 325"
Details: We don't need to try and get comments for images that don't exist. This might also help speed things up a bit as it should eliminate an unnecessary database query.
2013-12-05 19:50:21 -05:00
jgen
a7ab12abdd Fix for issue 346 - "Only first page of comments is shown" 2013-12-03 14:39:12 -05:00
Shish
1b73dd4ddc add 'hellbanned' user class, with support from the comments extension 2013-09-09 13:41:08 +01:00
Shish
07304861f3 log IDs of things 2013-08-30 00:19:46 +01:00
Shish
279c3dd61a max-width 100% for images inside comments 2013-02-09 10:26:55 +00:00
Shish
471bc1805a escape title too 2013-01-04 22:40:16 +00:00
Shish
1664f932fe Merge pull request #269 from pachuco/master
Comment extension
2013-01-04 14:43:52 -08:00
Shish
78442e96c3 add daily cache breakage to gravatars 2012-12-30 18:08:58 +00:00
pachuco
15de0f7732 Added page title. 2012-12-19 01:18:30 +02:00
pachuco
ef8c60f032 Things were fetched from the currently logged user instead of the viewed one. My bad. 2012-12-18 17:29:07 +02:00
pachuco
cfe3fabd6d *Index link fixed in uaser and site comment navigators
*No bloody idea why I added the assertions in display_all_user_comments();
*Commented out some doohickey thing that did something and borke other stuff
*Added index link and paginator in user comment list
2012-11-24 20:36:00 +02:00
pachuco
f6f2638003 *Total number of pages correctly calculated for user comments
*Page number sanity checks for both user comments and site comments
2012-11-24 20:28:49 +02:00
Shish
fff8318f1f offset after limit 2012-10-17 00:05:48 +01:00
Shish
112130b8ad the start of full per-user comment history 2012-10-15 21:48:55 +01:00
Shish
6abf65c062 option for making samefags public 2012-10-03 21:28:29 +01:00
Shish
38f7555d98 get rid of direct references to Database's engine 2012-06-24 00:57:55 +01:00
Shish
239e028662 flash messages everywhere~ 2012-06-10 04:21:03 +01:00
Shish
82cc77817a delete comments by IP 2012-06-09 16:08:29 +01:00
Shish
b1e5ba794b update comment styles for new classes 2012-06-09 15:52:28 +01:00
Shish
8de1bd0c56 different classes for different types of comment list 2012-06-05 13:11:15 +01:00
Shish
58c06893e1 if the comment succeeds, we still want to set the 'user tried to comment' cookie :P 2012-03-19 20:05:19 +00:00
Shish
ee4b223f65 comment_anon bool -> create_comment perm 2012-03-19 13:17:47 +00:00
Shish
a23498a8d7 more recently updated comments 2012-03-15 06:17:19 +00:00
Shish
b4fb667eaa use URLs for linking to comments 2012-03-13 16:04:50 +00:00
Shish
947fbfd820 comment index -> comment/list, not post/list 2012-03-13 09:28:05 +00:00
Shish
9a0228720a truncate as a function, which works 2012-03-13 07:01:27 +00:00
Shish
41971f907f missed a bit 2012-03-12 05:36:39 +00:00
Shish
aaf9280ee4 more styling 2012-03-12 04:56:30 +00:00
Shish
40b09c8ee1 less divvy comments 2012-03-12 03:28:08 +00:00
Shish
9e65732ea1 mysql ignores the FK names anyway, so all they were doing was bothering me ~_~ 2012-03-11 01:52:25 +00:00
Shish
97eb527714 named constraints 2012-03-10 19:38:50 +00:00
Shish
6c459c8323 make it so 2012-03-10 19:13:41 +00:00
Shish
a2d2ceb015 foreign keys delete comments now 2012-03-10 19:07:40 +00:00
Shish
f62edc3e83 add FKs for comments 2012-03-10 19:07:02 +00:00
Shish
37672bc1ee comment schema wibbles 2012-03-10 18:57:35 +00:00
Shish
569e93cd6b postgres requires a sequence name to be passed to get_last_insert_id 2012-03-08 02:55:04 +00:00
Shish
58d533ceb9 put a snippet of each comment in the event log 2012-03-08 02:36:21 +00:00
Shish
cba1e76b1f only force-wrap comments 2012-03-05 10:24:01 +00:00
Shish
74f0d38c04 comment snippets should link to the specific comment 2012-03-02 21:15:04 +00:00
Shish
6222c0d093 redirect to the bottom of the thread when commenting 2012-02-22 13:25:03 +00:00
Shish
f8fec8a036 prefix comment ID with c, so it isn't just a random number 2012-02-22 13:07:04 +00:00
Shish
aaceb99aa5 rather than <a name=foo>, stick an ID on the comment 2012-02-22 13:05:17 +00:00
Shish
af7704825b use HTTP status codes with error messages 2012-02-16 15:37:05 +00:00
Shish
c2bf42ef5a less passing of $page 2012-02-15 08:59:24 +00:00
Shish
519e46578d more notation for which strings are HTML safe and which aren't 2012-02-13 20:51:34 +00:00
Shish
6c29ccee40 split extension styles, so other themes can use them better 2012-02-12 11:25:58 +00:00
Shish
e535b1f002 only show samefag ID if showing regular IDs 2012-02-11 10:37:50 +00:00
Shish
9aa5644504 colours don't scale either D: numbers then... 2012-02-11 08:33:09 +00:00
Shish
ce5db719c3 coloured anons 2012-02-11 08:18:51 +00:00
Shish
d83c596c01 consistent width for comment list tables 2012-02-11 04:27:00 +00:00
Shish
77fc6f22b2 colour anons by IP address, for easier samefag spotting (commented out atm though) 2012-02-10 02:16:44 +00:00
Shish
0b26eba141 gaaah inconsistent database schema 2012-02-10 01:55:33 +00:00
Shish
c627e564c4 Merge branch 'master' of github.com:shish/shimmie2 2012-02-10 01:29:49 +00:00
Shish
34fd9751db username CSS, so that the name can be consistent even when it's a non-linked anon 2012-02-10 01:29:31 +00:00
Shish
01b89c2a1b function for showing IPs with ban button 2012-02-09 22:51:41 +00:00
Shish
f8af5c0e07 link to IP ban page from comments and images 2012-02-09 22:21:54 +00:00
Shish
5f4f941444 half-logged-in only for one day 2012-02-09 17:11:03 +00:00
Shish
912f096d8c give nocache cookies to people who /attempt/ to post on old forms, not just those who succeed 2012-02-09 17:07:36 +00:00
Shish
3584f40551 Merge branch 'master' of github.com:shish/shimmie2 2012-02-09 01:07:21 +00:00
Shish
0698b780f9 remove regular Extension, have SimpleExtension take its place, optimise the event system based on SimpleExtension methods 2012-02-08 12:07:01 +00:00
green-ponies (jgen)
d69fa6ae9d Merge branch 'master' into speed_tweaks 2012-02-07 23:21:56 -05:00
Shish
0589f9d72e fine grained permission bits 2012-02-07 15:15:18 +00:00
Shish
a9ec9b6b70 comment info box 2012-02-06 14:42:38 +00:00
Shish
aa2696ca07 only add ellipsis if the comment actually is too long 2012-02-06 14:42:07 +00:00
Shish
e38f9e720f CSS has odd/even built-in now 2012-02-06 12:24:13 +00:00
Shish
d2d03396af info box 2012-02-06 12:23:56 +00:00
Shish
4e1300631b Merge branch 'master' of github.com:shish/shimmie2 2012-02-05 04:25:58 +00:00
Shish
0b13db8ed7 hide anonymous's user page - having made a million comments, it was taking upwards of 60 seconds to process that one page, triggering the DOS defences... 2012-02-05 04:25:50 +00:00
Shish
5843aae4f2 random unused global o_O 2012-02-05 04:20:42 +00:00
green-ponies (jgen)
68e9bd694e Storing copies of config variables outside of for loops. 2012-02-04 14:17:52 -05:00
Shish
dab85e5f26 merge type hints 2012-02-02 14:16:14 +00:00
Shish
cc8f1f35a5 more type hints 2012-02-02 14:14:33 +00:00
Shish
dc6c173efd type hints for hiphop 2012-02-02 08:07:57 +00:00
Shish
b3d5878ce8 use the param 2012-02-02 05:24:06 +00:00
Shish
aed5e1a30e hand merge of speed tweaks 2012-01-31 13:20:43 +00:00
Shish
8192f278d5 different sql for different databases :( 2012-01-31 12:15:25 +00:00
Shish
7af442855d this isn't so necessary with latest upstream changes 2012-01-30 02:18:16 +00:00
Shish
ddf61714f6 argh sql syntaxes 2012-01-22 14:54:03 +00:00
Shish
f5edb4fb4e the 24 hour limit can apply to the page count too, making that also 70x faster 2012-01-20 05:24:29 +00:00
Shish
4c2adce744 limiting by date at the database level is ~70x faster than limiting by page at the PHP level 2012-01-20 04:34:06 +00:00
Shish
f100e6a9d4 5 may have been a little extreme 2012-01-20 04:05:54 +00:00
Shish
36e443e07d the algorithm for listing old comments pages is *really* inefficient; the first few pages are quick, page 100 can take a few seconds to generate... rule34 has over 100,000 pages of comments. Limit to the first few pages for now, as I don't know anyone who even goes past the front page. 2012-01-20 03:12:48 +00:00
Shish
8ba22d8fbc same for user-agent 2012-01-19 15:28:55 +00:00
Shish
7608107232 lib/askismet expects the referrer to either be set manually, or exist; if it doesn't exist we need to set it manually 2012-01-19 15:20:32 +00:00
green-ponies (jgen)
d46244f926 Display message if no comments. 2012-01-16 20:54:34 +00:00
green-ponies (jgen)
cd7de93a0a Changing for-loops to use pre-calculated values.
Rather than calculating the value each time.
2012-01-16 00:07:04 -05:00
green-ponies (jgen)
fc12bbbfe5 More small changes to help save a few microseconds. 2012-01-12 15:46:34 -05:00
green-ponies (jgen)
f7fc253075 Display message if no comments. 2012-01-08 22:18:17 -05:00
Shish
c39697a40f stub for comment time-ago 2011-12-31 14:21:02 +00:00
Shish
1857075bd9 show comments made by user 2011-12-31 13:54:32 +00:00
Shish
5121e99dbe speed hax and niceurl forcing from r34 2011-12-24 14:49:55 +00:00
Shish
3d0cdfff56 mark users who have commented as interacting 2011-03-23 11:40:32 +00:00
Shish
b481db493c cache recent comments and comment page count 2011-03-23 11:37:46 +00:00
Shish
eda0d66bac make CommentList::get_hash static, for calling from other places 2011-03-06 12:44:38 +00:00
Shish
ce0d30e0db count() rather than RecordCount 2011-02-13 13:16:49 +00:00
Shish
8495a1ac89 typo fix 2011-02-13 13:10:55 +00:00
Shish
68585bb8c8 PDO compat for comments 2011-02-13 12:44:33 +00:00
Shish
ee3c24117b more pdo compat, database bits 2011-01-03 15:18:24 +00:00
Shish
d6baeab977 more pdo compat 2011-01-01 16:28:04 +00:00
Shish
8d978aa06a more pdo compat 2011-01-01 15:58:09 +00:00
Shish
9e00675900 pdo compat 2011-01-01 15:28:38 +00:00
Shish
ffb1762280 Insert_ID -> lastInsertId 2010-12-31 20:00:59 +00:00
Shish
1e04df7765 <form> -> make_form(), or add auth token manually 2010-10-07 21:26:27 +01:00
Shish
0d7efd0256 class type hints for hiphop's benefit 2010-05-15 12:17:32 +01:00
Shish
ee292c2a25 crudely hide explicit images from the comment list of anons 2010-04-23 04:08:22 +01:00
Shish
77934a7733 Comment::get_owner() function, as an official way to access user data (eg User::get_avatar()) 2010-04-07 13:38:44 +01:00
Shish
ec5b08f659 timestamped comments 2010-04-07 13:25:46 +01:00
Shish
e3c0b3fbc2 two comments should exist now 2010-03-22 04:00:26 +00:00
Shish
35b1972b90 test unicode comments 2010-03-14 20:51:15 +00:00
Shish
ca8fc63bf2 comment IDs to link to 2010-02-03 16:01:00 +00:00