Commit graph

359 commits

Author SHA1 Message Date
Shish
67c026e8d8 unique request ID, for associating several log entries with one request 2013-09-12 16:29:38 +01:00
Shish
7c140680b7 log args 2013-08-30 00:19:46 +01:00
HungryFeline
65fcbcb9ba Actually set the cookie prefix
When COOKIE_PREFIX was not shm (the default) the script tried to read cookies prefixed with the new prefix but the script was setting the old default prefix from before the constants were implemented.
2013-07-02 06:46:54 +02:00
HungryFeline
616aa3300a Don't check the certificate when transloading
This allows the download of images via https even if the cert is self-signed.
2013-07-02 04:44:27 +02:00
Shish
dbfd747dd3 remove more slashes 2013-02-06 08:36:30 +00:00
green-ponies
ef44d6ccf3 Fix for issue 263 - ReCAPTCHA private and public keys reversed. 2012-11-03 13:49:10 -04:00
Shish
d8c670eaa6 move yet more stuff out of index.php 2012-10-16 23:05:11 +01:00
Shish
38fea60056 handle CLI_LOG_LEVEL not being set 2012-10-16 22:58:24 +01:00
Shish
073b21aaa1 split up event listener loading, so parts can be called individually 2012-10-16 22:31:50 +01:00
velocity37
52718b0590 util.inc: Default to static extension lookup
Magic can return invalid results for video files, breaking their playback. Default to the static extension lookup to avoid this problem but still return application/octet-stream if nothing works.
2012-10-16 18:56:39 +01:00
velocity37
0663bf54a0 Grr... 2012-10-16 18:55:43 +01:00
velocity37
1bd6f9f0ba Update core/util.inc.php 2012-10-16 18:55:38 +01:00
velocity37
412dcd05af Add video MIME types 2012-10-16 18:55:00 +01:00
Shish
e3d385aee5 Merge branch 'master' of github.com:shish/shimmie2 2012-09-24 22:36:28 +01:00
Shish
ac812b4a2a danbooru api updates 2012-09-24 22:36:09 +01:00
Shish
65ce0ff4e4 check filename extension by lowercased version of itself 2012-09-22 23:24:19 +01:00
Shish
06426bdfe6 when checking mime types, use the filename.ext from the DB, not the (non-existent) .ext on disk 2012-09-22 23:15:25 +01:00
Shish
d313cea8a7 create the DB connection on demand; some pages don't require one at all thanks to caching 2012-06-24 00:50:13 +01:00
Shish
1c5bf478d9 initialise global _execs, else we get 'page used queries' when we want 'page used 0 queries' 2012-06-23 23:37:41 +01:00
Shish
6181d59975 that slash needs to be there >_< 2012-06-22 20:02:53 +01:00
Shish
e7df4edbee slashes are removed already 2012-06-21 09:07:52 +01:00
Shish
2a18da523c the define wibbling for hiphop seems to work now 2012-06-18 01:23:31 +01:00
Shish
fd5b4c5910 more re-organisation for create_monolith / hiphop friendliness 2012-06-18 01:06:36 +01:00
Shish
78d701dd53 move stuff about to make create_monolith simpler 2012-06-18 00:45:32 +01:00
Shish
930de7fc8c remove built-in full-page caching; it doesn't do much any more, and everything it does do can be done better by Varnish 2012-06-18 00:07:12 +01:00
Shish
5519c3a320 lots of tidying and removal of duplicate code 2012-06-18 00:00:21 +01:00
Shish
082e6fa31b nice, event-based command line support; try 'php index.php' for info 2012-06-17 20:06:02 +01:00
Shish
239e028662 flash messages everywhere~ 2012-06-10 04:21:03 +01:00
Shish
61754b8dfe add a type arg, even if it's not used yet 2012-06-10 01:05:03 +01:00
Shish
37b3dd60b6 flash_message(str) function and support in themes 2012-06-09 17:00:25 +01:00
Shish
2e76add61b enhance zglob to allow really long patterns 2012-05-22 12:46:56 +01:00
Shish
f7e25daeb5 move getMimeType to utils 2012-05-14 06:43:23 +01:00
green-ponies (jgen)
3902036477 Avoid breaking things. 2012-04-18 02:20:42 -04:00
green-ponies (jgen)
2fcc271f3d Small typo. 2012-04-18 01:17:44 -04:00
green-ponies (jgen)
1615f79be4 Examine integers separately. Also, don't break search. >_< 2012-04-18 00:56:11 -04:00
green-ponies (jgen)
a79875c1eb The idn_to_ascii() function is only supported by PHP version 5.3 and up. 2012-04-16 16:42:32 -04:00
green-ponies (jgen)
a0a0ba5bbc A better version of bool_escape() that uses filter_var if possible.
Also removed undb_bool() as it was basically a copy of the old bool_escape function.
2012-04-15 19:28:27 -04:00
green-ponies (jgen)
372f4fad7c Use filter_var for function url_escape($input). 2012-04-15 18:59:23 -04:00
Shish
67f1c1c51d store enabled exts in a config file, rather than moving directories around 2012-03-31 18:59:28 +01:00
Shish
15df989f72 nicer error reporting 2012-03-31 17:07:11 +01:00
Shish
62e13eda96 always create 2012-03-30 20:28:09 +01:00
Shish
7cbb62c8cc move data to data folder 2012-03-30 18:21:35 +01:00
Shish
29cebb44f9 event_listeners is a bit of cached data 2012-03-30 18:07:40 +01:00
Shish
e210fe739b more spaced out priorities 2012-03-30 16:41:25 +01:00
Shish
b156d4f380 no need for 'load files in a good way' to be optional, just do it 2012-03-21 15:04:17 +00:00
Shish
144c1afcbc ffffff, PHP, doing something weird rather than having a userful error message 2012-03-14 20:35:15 +00:00
Shish
9a0228720a truncate as a function, which works 2012-03-13 07:01:27 +00:00
Shish
a5ba9279c4 modification dates on CSS/JS links 2012-03-12 23:17:20 +00:00
Shish
cf907237c6 with 5.2.1, we have an accurate, peak memory use 2012-03-11 04:33:24 +00:00
Shish
1b30aea557 compressed coverage logs 2012-03-11 00:36:57 +00:00
Shish
77b99adca7 remove more unused bits 2012-03-10 02:19:12 +00:00
Shish
b451f90b47 ip2color() was never used 2012-03-10 02:14:33 +00:00
Shish
bab3145fbc plural() was never used 2012-03-10 02:13:50 +00:00
Shish
f9910ba98f whitespace consistency 2012-03-09 22:27:12 +00:00
Shish
1f07a273f6 move copy & pasted transload code into a shared function 2012-03-09 21:07:21 +00:00
Shish
79ce40abd0 less code 2012-03-09 18:14:14 +00:00
Shish
88ee6ea148 get_theme_object is only used once, move it closer to where it's used 2012-03-05 14:21:41 +00:00
Shish
0351ffcd28 commit_hash is unknown by default 2012-02-22 13:33:35 +00:00
Shish
6410199a84 basic CLI support 2012-02-16 16:10:31 +00:00
Daku
bbb9d6bd4c update ext now grabs extra info via JSON 2012-02-16 07:50:28 +00:00
green-ponies (jgen)
f345fde006 Fixing function to get PHP's memory limit. 2012-02-12 19:48:07 -05:00
Shish
a54ab11205 all_events isn't used any more 2012-02-12 17:06:23 +00:00
Shish Moom
6da4da8060 Merge pull request #129 from green-ponies/master
Type hints
2012-02-11 01:22:43 -08:00
Shish
9aa5644504 colours don't scale either D: numbers then... 2012-02-11 08:33:09 +00:00
green-ponies (jgen)
30eb5ddd8b More type hints! 2012-02-09 23:04:37 -05: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
01b89c2a1b function for showing IPs with ban button 2012-02-09 22:51:41 +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)
5af54bb9e0 Added some more comments and type hints. 2012-02-07 20:05:38 -05:00
Shish
bff5a8453f start of fine-grained permissions 2012-02-07 13:44:54 +00:00
Shish
dab85e5f26 merge type hints 2012-02-02 14:16:14 +00:00
Shish
52ff412b38 hiphop type hint placeholders 2012-02-02 13:58:48 +00:00
Shish
e049ea874d require php 5.2.6 (debian-old's oldest version), get rid of ancient compat 2012-02-01 16:51:38 +00:00
Shish
e6d7e0c1d6 changes for easier monolithing 2012-02-01 16:41:18 +00:00
Shish
a70484be31 moving big functions out of index.php 2012-02-01 15:07:03 +00:00
Shish
04ed07a0df some image links are absolute for good reason (eg they point to a CDN with a different hostname) 2012-01-31 15:11:06 +00:00
Daku
bab893bbda really ugly update ext
(although it works, the code is a mess :x)
2012-01-31 14:58:52 +00:00
Shish
853ea10fea merge mass tagger 2012-01-31 14:28:34 +00:00
Shish
aed5e1a30e hand merge of speed tweaks 2012-01-31 13:20:43 +00:00
Shish
db609745d3 Merge remote branch 'snowstrypes/error_wdir' 2012-01-31 12:59:19 +00:00
Shish
6e6138793b DEBUG_SQL can be null for user-defined 2012-01-31 12:16:47 +00:00
Shish
55447d1aa8 toggle for sql debugging 2012-01-30 05:00:21 +00:00
Shish
6e64857936 wibble towards being totally SimpleExtension based, as that's easier to programatically optimise 2012-01-27 18:16:46 +00:00
Shish
70fc4b5a54 Currently SCore is pretty behind-the-scenes 2012-01-26 17:32:30 +00:00
Shish
54031fcb90 still bail on assert failures even when debug is off 2012-01-26 15:26:00 +00:00
Shish
96b3b5c72a subfolders in data/ 2012-01-23 05:39:47 +00:00
Shish
565b15c91e access the start time too... 2012-01-22 14:48:06 +00:00
Shish
da45389c42 have autodate include hours and minutes 2012-01-22 14:40:25 +00:00
Shish
208320f072 Reeeeeeally old bug that nobody cared about: getrusage returns CPU time used by the current process, not by the current page. PHP-FPM has many pages per process 2012-01-20 05:45:09 +00:00
Shish
49e7bfa1b2 tidy up some ancient base_href / data_href messes; base_href as a config variable is no longer used 2012-01-20 03:29:29 +00:00
Shish
18e36f9b31 Rather than three levels of configuration, let's have two (define()'d values in config.php for system-level stuff, the web-editable config table for user-level stuff). Basically switches database_dsn from a global variable to a defined constant. 2012-01-20 03:15:58 +00:00
Shish
cc3bda38f0 attempt to hand-merge jgen's revert by IP vits 2012-01-16 20:58:55 +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)
ea15574226 Changes and tweaks for speed.
Because every microsecond counts! :P
These changes are based on information from:
http://phpbench.com/
http://stackoverflow.com/questions/482202/is-there-a-performance-benefit-single-quote-vs-double-quote-in-php
2012-01-11 15:08:27 -05:00
Shish
5b717870d1 case sensitivity blargh 2012-01-01 17:13:50 +00:00
Daku
dff1eef51a make_form now has a onsubmit option 2011-12-31 14:18:55 +00:00
Shish
ad2bb8b8b6 switch timeago to a javascript implementation 2011-12-31 14:12:34 +00:00
Shish
b7bd74055d PHP is officially the worst web API ever 2011-12-25 17:57:15 +00:00
Shish
67e0c87b20 create a generic bool_escape function, use that 2011-12-25 15:11:26 +00:00
Shish
cd609141f4 optional warehouse split levels 2011-12-25 11:24:20 +00:00
Shish
6d3cdb208c those functions aren't /called/ unless coverage is set ._.;; 2011-12-24 21:55:33 +00:00
Shish
883c73c9ff even if xdebug is installed, only run coverage when told to 2011-12-24 21:51:48 +00:00
Shish
5121e99dbe speed hax and niceurl forcing from r34 2011-12-24 14:49:55 +00:00
Daku
c37569f3d4 Fixed reCaptcha. 2011-12-21 02:28:39 +00:00
green-ponies (jgen)
ef61a4cb4a Small patch for Blotter extension, and also added Version to debug output. 2011-10-23 21:54:04 -04:00
Shish
5a6501f2be log event handlers as well as events 2011-10-09 17:08:13 +01:00
Shish
eb7927b3b1 Merge branch 'master' of github.com:shish/shimmie2 2011-10-09 12:10:22 +01:00
Shish
4b86497816 support for Context profiling 2011-10-09 12:01:48 +01:00
Yaro
9e2522f86f fixed unpredictable working directory inside register_shutdown_function 2011-10-04 17:03:53 +04:00
green-ponies (jgen)
97d137f365 Working on Automatic Caching feature for CSS and JS files.
Added config options to main Shimmie config.
2011-09-25 13:40:34 -04:00
green-ponies (jgen)
3a4aea45d5 Small addition for giving forms unique IDs. Mainly so that javascript has
something to hook onto.
2011-08-12 21:56:48 -04:00
Shish
811f9e0f66 cd variable for sites who want /ab/cb/abcd 2011-03-23 11:19:34 +00:00
Diftraku
fb65286863 Critical change to deltree, it seems Windows version of PHP does not consider symlinks to be links when checked with is_link(). 2011-03-06 03:17:40 +02:00
Diftraku
93e2110056 Because Windows... shitty OS is shitty. Added a Windows-only fix to the extension symlink and deltree.
Windows will nag about file info not found on relative paths with symlink (php bug?).
Also, when deleting a symlink on Windows, it needs to be rmdir'd, no unlink'd (kept throwing permission denied for unlink).
2011-03-03 11:40:34 +02:00
Shish
dfef932463 use config.php as CSRF salt 2010-10-07 21:26:28 +01:00
Shish
1e04df7765 <form> -> make_form(), or add auth token manually 2010-10-07 21:26:27 +01:00
Shish
6cd53fed8a csrf functions 2010-10-07 21:26:15 +01:00
Christian Walde
52f5a265fa changed the windows coverage fix from closure to parameter passing, since older phps can't do that 2010-09-09 20:10:37 +02:00
Christian Walde
e5b3afb31c this makes coverage dumping work on windows; on windows the cwd is changed to the apache executable's path by the time the coverage end is reached, changing the coverage end function to a closure that gives back a function with the actual shimmie cwd stored fixes this 2010-09-09 20:10:24 +02:00
Christian Walde
cd6015203e replaced deprecated split with explode 2010-09-09 20:09:37 +02:00
Shish
c6f358a8fc split is deprecated in php5.3, use explode instead 2010-07-30 15:36:33 +01:00
Shish
c6e61b096b timeline function for profiling 2010-05-27 11:48:29 +01:00
Shish
2c1fa2fd7f move warehouse directory creation into a single place 2010-04-23 05:46:07 +01:00
Shish
dbf529825c double-escape backslashes as well as forward 2010-04-23 03:31:10 +01:00
Shish
20edd68093 avoid double escapes 2010-03-24 18:24:47 +00:00
Shish
f4cbd8b24f AHA! This bug took ages to track down, as the trigger was in a completely different system to the error message... Many, many thanks to zshall for managing to reproduce the error, then narrowing it down to a single line \o/ 2010-03-21 02:20:09 +00:00
Shish
2c710bb654 make captchas optional and off by default, some people are having problems 2010-03-14 02:14:28 +00:00
Shish
a214856481 post/view?search -> post/view#search for better caching 2010-02-09 10:06:21 +00:00
Shish
320877f80b URI based hash, for nginx compatability 2010-02-09 07:42:21 +00:00
Shish
05150706cc wtf git 2010-02-02 00:34:44 +00:00
Shish
9d40eda409 make memcaching work for pages, and log if DEBUG is set 2010-02-01 16:11:26 +00:00
Shish
d715c38341 disable captchas when debugging from localhost 2010-01-23 12:48:43 +00:00
Shish
ccaeca19eb make make_http not break with '' as an argument 2010-01-18 08:29:35 +00:00
Shish
af36f37902 documentation updates 2010-01-12 15:01:34 +00:00
Shish
f4a74c4d4c better logging 2010-01-05 10:52:23 +00:00
Shish
3bb3ee2e86 securimage support as an alternative captcha 2010-01-03 08:15:52 +00:00
Shish
694200d9f8 proper logging 2009-12-30 07:59:40 +00:00
Shish
a14b2a8a63 how did nobody spot this? x_x 2009-11-20 11:51:51 +00:00
Shish
6818e598e5 forgot to replace this 2009-11-15 12:09:09 +00:00
Shish
7f47c594c8 handle the case of the SQL log failing to open 2009-11-15 10:26:17 +00:00
Shish
7a46a9a962 html tooltip for autodates 2009-11-10 03:49:56 +00:00
Shish
ab4f69eb88 months and years for autodate 2009-11-10 03:36:39 +00:00
Shish
1d46dbbe18 this setting is used before the database is connected to... 2009-10-26 11:39:53 +00:00
Shish
71999a3065 find truth 2009-10-08 17:43:18 +01:00
Shish
a7caf1e060 prefixed cookies 2009-10-08 13:59:12 +01:00
Shish
304c479dba make debugging and coverage separate settings 2009-09-27 14:04:27 +01:00
Shish
bb4085972b code coverage stuff 2009-09-19 20:13:37 +01:00
Shish
f71a0e4390 configurable autodate format 2009-09-15 18:29:22 +01:00