Commit Graph

4292 Commits

Author SHA1 Message Date
63fb6bea27 Add default value for flood_cache
The original code left flood_cache undefined, leading to errors in newer versions of PHP. See https://github.com/vichan-devel/vichan/issues/525
2024-01-30 10:05:43 -01:00
522d208099 Handle statistics case where query returns no posts 2024-01-30 10:05:43 -01:00
daeb7b709d Replace deprecated raw tags 2024-01-30 10:05:43 -01:00
Majin Bejitto
6e15e696ce fix "scandir should not need to sort in b.php (banner code)"
scandir by default sorts files in ascending order. this is unnecessary when you're picking a random file anyway. it's just wasting CPU cycles and increasing latency as more files are added.

currently it is

    $files = scandir($dir);

it should be

    $files = scandir($dir, SCANDIR_SORT_NONE);
2024-01-30 10:05:43 -01:00
deysu
582b123be4 Add banners as default functionality & display them on mod login / dashboard when enabled (#513)
* Add banner support as a default, integrated option.
Used lainchan's original banner script, authored by barrucadu

* Display banners on moderator login and dashboard

* Remove memes & better directory structure
2024-01-30 10:05:43 -01:00
清靈語
2d792c6be0 Replace Google reCAPTCHA API's domain (#507)
This makes it accessible in mainland China.

Sources:
google/recaptcha#227
https://developers.google.com/recaptcha/docs/faq#can-i-use-recaptcha-globally
https://meta.stackoverflow.com/questions/402339/please-change-the-recaptcha-link-to-ensure-the-site-is-accessible-in-china

Co-Authored-By: Fredrick Brennan <copypaste@kittens.ph>
2024-01-30 10:05:43 -01:00
runit
39a1d1952c I'd just like to interject for a moment. 2024-01-30 10:05:43 -01:00
Fred Brennan
704af3d64d Use ENT_QUOTES when converting UTF-8 to HTML (#448)
Closes #448.
2024-01-30 10:05:43 -01:00
sshscp15
02edb9a896 Fix display warning/errors (#496)
* prevent filling debug param when debug is off

* fix php warning: "$item" must be passed by reference
2024-01-30 10:05:43 -01:00
27chan
2216a0155c Removed regex with possibiblity of XSS
An anonymous user reported the issue to me
2024-01-30 10:05:43 -01:00
sshscp15
2587360989 fixes boardlist in catalog when in mod mode 2024-01-30 10:05:43 -01:00
sshscp15
ca4b9802b8 fix mod.php. check if key is there and is valid 2024-01-30 10:05:43 -01:00
Fred Brennan
2bc1a32105 Flip insane default for non-developers 2024-01-30 10:05:43 -01:00
Fred Brennan
fdc574906a Add support for APC(u) 2024-01-30 10:05:43 -01:00
C Hatfield
4026e4c448 Moved hardcoded html filepaths into config file for extensibility (#354)
Co-authored-by: chatfield <chatfield@creatuity.com>
Co-authored-by: Fred Brennan <copypaste@kittens.ph>
2024-01-30 10:05:43 -01:00
haruhianon609
139e975bfb Add yandex images as image identification option (#430)
* Add yandex images as image identification option

* Update image_identification.html

* Fix indentation

Co-authored-by: Fred Brennan <copypaste@kittens.ph>
2024-01-30 10:05:43 -01:00
Fredrick Brennan
56d67ab268 Change illogical default of $config[force_body]
Makes JS and non-JS enforcement equivalent while providing a downgrade path.

JS may not allow empty bodies even when $config[force_body] false. Don't care enough to fix. PR welcome.

Close #493.
2024-01-30 10:05:43 -01:00
370chan
74b9a4fd50 Fix files not being saved in certain cases (#483) 2024-01-30 10:05:43 -01:00
bebyx
ffcc496a6f Fix editing global pages for 7.4 (#487) 2024-01-30 10:05:43 -01:00
Junicchi
2103948afe fix Undefined index ip problem, fixes #434 2024-01-30 10:05:43 -01:00
ben2613
f9cde257c0 Fix mobile browser hang issue when auto-reload by reducing DOM modification in forloop 2024-01-30 10:05:43 -01:00
sshscp15
57ee34ad55 simple catalog support for moderators 2024-01-30 10:05:43 -01:00
27chan
4ee521dac7 Adjust css theme
Fix responsive
2024-01-30 10:05:43 -01:00
27chan
6c816c21af Updating information
Adding Redis in the recommendations section.
Inserting a demo section.
2024-01-30 10:05:43 -01:00
4b3101afeb Fix missing variable in auto-reload 2024-01-30 10:05:43 -01:00
3c8a8b77ac Add options for auto-reload.js, remove orphaned function call
How did that go missing?
2024-01-30 10:05:43 -01:00
e7303eb9fc Remove update thread on scroll to bottom of page
It was already half removed, this half needed to be too to avoid errors
2024-01-30 10:05:43 -01:00
17b5ad6cad Remove false requirement for banners enabled to use auto-reload.js 2024-01-30 10:05:43 -01:00
6b225625c4 Disable broken, unknown-purpose styling on boxs and tables 2024-01-30 10:05:43 -01:00
a12ca4e75f Make Ubuntu font local instead of Google API call 2024-01-30 10:05:43 -01:00
27ef8b8011 Add style to all a tags, not only links 2024-01-30 10:05:43 -01:00
a2d0a1fcd2 Remove static position from dark.css desktop style to fix topbar not following page and padding above the top bar 2024-01-30 10:05:43 -01:00
a01ce77666 Remove CSS external links, replace random filenames, move images into img folder 2024-01-30 10:05:43 -01:00
20a5490b65 Add CSS from lainchan
This overwites dark.css. terminal2.css was replaced with terminal_green.css
2024-01-30 10:05:43 -01:00
837fe4d6fa Check file exists before unlinking in 'file_unlink' 2024-01-30 10:05:43 -01:00
4eae6fd37e Check for file exif_stripped flag without accessing invalid key 2024-01-30 10:05:43 -01:00
8c9ef0d2bd Check temp file exists before unlinking when processing images 2024-01-30 10:05:43 -01:00
b80a7b00f0 Add status.php for mobile API 2024-01-30 10:05:43 -01:00
f17875da7a Enable compatibility with Twig 2.x 2024-01-30 10:05:43 -01:00
d69b30d83f Replace deprecated Twig 'filter' with 'apply'
Deprecated in Twig 2.9
2024-01-30 10:05:43 -01:00
419829f8aa Check files exist before deleting when rebuilding
This is most likely an effect of the @ operator changes in PHP 8.0.0
2024-01-30 10:05:43 -01:00
c228c5a7bb Unset $matches['token'] after use
Causes a parameter error in later versions of PHP
2024-01-30 10:05:43 -01:00
98ee082ea3 Handle empty page key index properly
Necessary for later versions of PHP
2024-01-30 10:05:43 -01:00
e307afd09f Prevent filling debug parameter when debug is turned off in config
The debug parameter can lead to memory exhaustion errors for some errors, this prevents it happening when debug output is disabled
2024-01-30 10:05:43 -01:00
7ba421ff24 Defer youtube.js 2024-01-30 10:05:43 -01:00
37b3a9a9ab Add labels to form input elements 2024-01-30 10:05:43 -01:00
71d9463e47 Add filename as alt text to images 2024-01-30 10:05:43 -01:00
745f1cbb23 Fix obsoleted getJSON(...).error function 2024-01-30 10:05:43 -01:00
c7c54a3d3e Add frame around forced anon options 2024-01-30 10:05:43 -01:00
47123a0f89 Remove some desktop CSS
literally 'i think it's ugly'
2024-01-30 10:05:43 -01:00