Commit graph

439 commits

Author SHA1 Message Date
Visman
cb04b8657c Update DB\AbstractStatement 2021-12-23 13:21:21 +07:00
Visman
be04145130 Fix DB 2021-12-23 13:15:07 +07:00
Visman
d98b5c62d9 Fix DB 2021-12-23 13:04:51 +07:00
Visman
99243e23e1 Update DBStatement 2021-12-22 23:28:11 +07:00
Visman
24bbdfe271 Fix DB 2021-12-22 23:27:48 +07:00
Visman
af7f4845f9 Update DB
Remove extends PDO.
The class is now a wrapper for PDO.
https://github.com/php/php-src/issues/7803
2021-12-22 22:55:59 +07:00
Visman
cd975a3855 Fix DB\Mysql
Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
2021-12-20 20:08:55 +07:00
Visman
5b5fedde23 Update DB drivers
Remove the checks that are not needed after the previous commit.
2021-12-20 19:44:57 +07:00
Visman
1d28b4f8c8 Update DB drivers
Add a separate method for creating a query string for a column.
2021-12-20 19:34:02 +07:00
Visman
27f624ee9d Update DB\Pgsql #7
Fix addIndex() and dropIndex() for primary key.
2021-12-19 21:46:45 +07:00
Visman
e0d30948d0 Minor fixes 2021-12-19 17:19:49 +07:00
Visman
d9101e83bd Strict type checking 2021-12-19 15:31:27 +07:00
Visman
7fa59c4023 Strict type checking 2021-12-19 15:17:29 +07:00
Visman
73c1c4dcf1 Change p_sig_bbcode 2021-12-19 14:15:17 +07:00
Visman
37fd83fda1 Change p_message_bbcode 2021-12-19 13:55:25 +07:00
Visman
8b6acc5d7f Change o_smilies and o_make_links 2021-12-19 12:36:51 +07:00
Visman
d89ba87a2b Change o_smilies_sig 2021-12-19 12:28:54 +07:00
Visman
49c00d420b Update DB\Sqlite #10
A crutch in the dropField() method for SQLite prior to version 3.36.0.
2021-12-18 19:02:02 +07:00
Visman
56c0b67525 Update DB\Sqlite
#10
2021-12-18 01:04:01 +07:00
Visman
2b546af3b9 Fix DB 2021-12-18 00:26:37 +07:00
Visman
ef78e141ba Update Admin\Install page
Set journal_mode=WAL by default for SQLite.
2021-12-17 16:02:17 +07:00
Visman
c0be6d857d Fix Core\ErrorHandler
For errors in the engine config file.
2021-12-17 14:44:41 +07:00
Visman
f6dfd6fdcd Update DB\Sqlite
More data for server statistics.
2021-12-17 14:29:50 +07:00
Visman
274ea421de Update DB\SqliteStatement #9
Fix for PHP 8.0 - 8.0.6.
2021-12-16 23:13:24 +07:00
Visman
8c1f4a9503 Update DB\AbstractStatement #9
Add fetchAll() method.
2021-12-16 19:00:35 +07:00
Visman
9c813d46cb Update DB\AbstractStatement 2021-12-16 16:51:23 +07:00
Visman
0b5e9b77f0 Add setFetchMode() to DB\AbstractStatement #9 2021-12-16 15:43:31 +07:00
Visman
2073aceed7 Update DB\AbstractStatement #9
In the case of -> fetch (PDO :: FETCH_COLUMN), the method should return the value from the first column of the row, not an array with the data of all columns of the row.
2021-12-16 13:09:23 +07:00
Visman
0d443ff683 Update DBStatement for SQLite #9
I had to split DBStatement for SQLite into two branches: for PHP 7 and for PHP 8, otherwise it does not allow inheriting the PDOStatement class.
2021-12-16 11:03:43 +07:00
Visman
481489f505 Remove debug output 2021-12-15 23:22:07 +07:00
Visman
3bd0a4aa3b Fix DB\SqliteStatement for #9
For tables with no integer/boolean fields.
2021-12-15 19:31:11 +07:00
Visman
b12b96ccd5 Fix DB\AbstractStatement
#9
2021-12-15 18:05:53 +07:00
Visman
1077d2c6b6 Type conversion for #9
Added BOOLEAN to SQLite types.
Expanded DBStatement (started).
The fecth() method for INTEGER and BOOLEAN fields returns integer/float(?) and bool data.
2021-12-15 17:16:54 +07:00
Visman
59dfe8004c Add getType() method 2021-12-15 12:46:09 +07:00
Visman
295c426df0 Update DB
Add 'f' type for float fields.
2021-12-15 12:45:36 +07:00
Visman
1800381095 A little loop optimization 2021-12-15 09:48:01 +07:00
Visman
474dd4d439 Fix DB\Sqlite 2021-12-13 23:14:52 +07:00
Visman
04f5906281 Update DB\Mysql 2021-12-13 20:09:20 +07:00
Visman
2839c21416 Update DB\Pgsql 2021-12-13 20:09:02 +07:00
Visman
067d88751f Update Core\DB for SQLite 2021-12-13 20:08:04 +07:00
Visman
456751fa61 Add DB\Sqlite 2021-12-13 20:07:20 +07:00
Visman
696fb9643e Update DB\Pgsql 2021-12-12 21:40:07 +07:00
Visman
e45cc5ffc3 Fix DB\Pgsql for TRUNCATE TABLE
For https://github.com/forkbb/forkbb/pull/7
2021-12-12 12:50:57 +07:00
Visman
ef101cc85a Update DB\Pgsql 2021-12-11 17:55:50 +07:00
Visman
d2ec24e6b9 Update DB\Pgsql 2021-12-11 13:47:50 +07:00
Visman
fac9ef1c8d Update DB\Pgsql 2021-12-11 13:17:52 +07:00
Visman
4b469dbf05 Update Admin\Statistics page 2021-12-11 13:15:28 +07:00
Visman
47a6627593 Update DB\Mysql 2021-12-10 22:25:13 +07:00
Visman
38063fe1d3 Update DB\Pgsql 2021-12-10 22:18:37 +07:00
Visman
e435297865 Update Core\DB
Track time for PDO::__construct().
2021-12-10 20:49:01 +07:00
Visman
4eb2854293 Add DB\Pgsql 2021-12-10 20:33:41 +07:00
Visman
bb8ef348e7 Update DB\Mysql 2021-12-10 20:12:45 +07:00
Visman
04bdb5c23b Update DB\Mysql
Fix unset.
Remove exception catching.
2021-12-10 15:59:13 +07:00
Visman
abd41ee853 Fix Core\Test 2021-12-08 14:58:47 +07:00
Visman
82d07fcd73 Fix driver name 2 2021-12-08 14:44:24 +07:00
Visman
728c5c4015 Fix driver name 2021-12-08 14:44:06 +07:00
Visman
52ffd59d3e Delete Core\Cache
Unused class.
2021-12-03 16:32:35 +07:00
Visman
b1c2abcc42 Minor edit 2021-12-02 14:22:25 +07:00
Visman
eeee117a3e Update Core\Image\ImagickDriver
No test.
2021-11-27 21:22:51 +07:00
Visman
170f8cfbb2 Fix Core\Image\GDDriver 2021-11-27 21:22:16 +07:00
Visman
21b2b03ff1 Working with images moved from Core\Image to separate drivers 2021-11-27 20:21:44 +07:00
Visman
94002ba6cc Update Core\Files
Here is mimeType() function as a fool protection.
2021-11-27 15:18:39 +07:00
Visman
a91a383df0 Add support *.avif 2021-11-26 22:17:52 +07:00
Visman
96eb8a7cff Update paginate template 2021-11-21 12:25:54 +07:00
Visman
84a2bd98d1 Fix xss in __() function
String not found in translation files must be escaped.
2021-11-20 13:54:54 +07:00
Visman
ab2ad0cfbe Update ErrorHandler.php
Fix type of $line.
2021-11-16 12:36:15 +07:00
Visman
c9cff3bf8f Strict in_array() 2021-07-18 10:45:28 +07:00
Visman
1f910ad585 Fix for 8.1.0 Alpha 3 2021-07-17 19:50:19 +07:00
Visman
b61f382405 Update Core\Router
Add optional anchor.
2021-03-29 18:08:09 +07:00
Visman
e649468608 Update Core\Func\paginate()
For PM, a non-standard variable is needed to pass the page number.
2021-03-27 23:55:20 +07:00
Visman
f549d2dc7f Minor change for Core\Container 2021-03-20 22:18:19 +07:00
Visman
621c7f5e0d Small fix for Core\Config 2021-03-20 22:17:32 +07:00
Visman
9f72acea32 Update Core\Lang
Show more information in an exception.
2021-03-15 20:06:57 +07:00
Visman
897700a15e Minor changes 2021-03-12 15:08:39 +07:00
Visman
6577e5aa8f Update Core\Validator
Now addError() method can take an array with the template text and variables.
2021-03-12 15:02:38 +07:00
Visman
be429ea4c3 Update Core\Validator for new Fork\__() function
Now an error array contains untranslated strings or template arrays.
Translation must be made in the output template iswev.
2021-03-11 23:23:59 +07:00
Visman
ae507d5a6d Fix files for new Fork\__() function 2021-03-11 21:39:16 +07:00
Visman
918917917d Update Core\Lang
Translate Exceptions.
2021-03-09 21:37:18 +07:00
Visman
6dd7ae86ba Update Core\Lang
Add methods to evaluate the expression from the Plural-Forms field in language file.
2021-03-09 21:19:22 +07:00
Visman
84c010cf2c Fix Core\Csrf 2021-03-07 16:07:36 +07:00
Visman
6a9bcdddff Update Core\Router
Autocomplete {hash} in links.
2021-03-07 15:41:22 +07:00
Visman
ac32363f40 Update Core\Csrf
Now this class can form not only a token, but also a hash. Hash depends on the marker, arguments and lifetime.
2021-03-07 15:40:24 +07:00
Visman
0468a1713d Update Core\File 2021-03-07 00:28:01 +07:00
Visman
a8bf3afb9c Update Core\Image 2021-03-07 00:15:48 +07:00
Visman
4df4208aae Fix Core\Func
Now it also generates a link for the active page.
2021-03-05 21:33:31 +07:00
Visman
5a76f2674b Fix Core\HTMLCleaner 2021-03-04 12:55:29 +07:00
Visman
6062ef8a95 Add Core\HTMLCleaner and config for Jevix 2021-03-03 23:30:19 +07:00
Visman
e1ff718602 Update Core\Mail 2021-02-27 00:39:44 +07:00
Visman
fdc213aea4 Update Core\Mail
Fix hostname() method.
2021-02-26 23:24:19 +07:00
Visman
1a8ab3938f Update for logs
Viewing an individual log.
Memory eats like not into itself  :(
Log 7644 lines, 4.46 MB:
[ Generated in 0.366 seconds, 3 queries executed - Memory usage: 46.84 MiB (Peak: 66.83 MiB) ]
2021-02-23 17:06:21 +07:00
Visman
7196007c21 Update for logs 2021-02-22 21:32:38 +07:00
Visman
08550d809d Update Core\LogViewer 2021-02-21 23:33:23 +07:00
Visman
3886708e73 Update Core\Files
Either they changed something in PHP 8, or I'm wrong, but something is wrong with escaping :(
2021-02-21 23:01:15 +07:00
Visman
86ac224e14 Add Core\LogViewer 2021-02-21 21:05:49 +07:00
Visman
268eff0760 Update Cache\FileCache 2021-02-21 21:03:28 +07:00
Visman
9410dba830 Fix Core\Csrf for instant redirects 2021-02-20 16:36:28 +07:00
Visman
a472b859c6 Update Core\Mail
Update valid() method: now uses filter_var(..., FILTER_VALIDATE_EMAIL) and does not change the case of characters in the email.
2021-02-19 17:08:03 +07:00
Visman
d303f1a002 Update Core\Router
Now, to automatically calculate token, it does not need to be passed in arguments with a value equal to null.
2021-02-13 21:25:17 +07:00
Visman
7101264a3b Update Core\Router
Remove duplicate information needed to build links.
2021-02-13 20:55:41 +07:00
Visman
ab52e2b80e Fix create() method in Core\Csrf
Arguments equal to null are not involved in token creation.
2021-02-13 12:34:25 +07:00
Visman
7bdd3d6c09 Update Core\Router
You can set the types of arguments returned when processing uri.
Now Router can return integers in addition to strings.
2021-02-12 23:36:30 +07:00
Visman
39b1ba5998 Extract method getErrorsWithoutType() from getErrors() 2021-02-10 15:51:15 +07:00
Visman
796a2a4db1 Update Core\Validator
Change getErrors() method
2021-02-09 14:42:41 +07:00
Visman
1720a032c9 Fix Core\Mail
The additional headers cannot contain the "To" header in ...
2021-02-08 22:02:51 +07:00
Visman
f7f180c9d3 Update Core\Secury 2021-02-05 17:20:03 +07:00
Visman
39a73a0410 Add spaces to code O_o 2021-02-03 18:19:28 +07:00
Visman
130b10264e Add Cote\Log to Core\ErrorHandler 2021-01-28 19:01:09 +07:00
Visman
0c2095e369 Add spaces to code O_o 2021-01-27 19:19:32 +07:00
Visman
436e9b31ba Fix type for backtrace in Core\ErrorHandler 2021-01-26 22:44:16 +07:00
Visman
945da6d10e Update Core\ErrorHandler.php 2021-01-26 22:24:33 +07:00
Visman
2ac35214e5 Fix Core\Container
Array_replace_recursive() functions kept old arguments and added new ones because the keys were different.
2021-01-24 18:27:33 +07:00
Visman
979ed4a519 Update Core\Log 2021-01-23 19:35:30 +07:00
Visman
1040e9972d Update Core\Log 2021-01-19 21:30:21 +07:00
Visman
e0b08758f1 Update Core\Validator
Change the getData() method to be able to exclude the specified elements.
2021-01-19 00:48:41 +07:00
Visman
21e1e40e0e Update Core\Log
Do not log cookies.
2021-01-19 00:46:06 +07:00
Visman
4549617268 Update Core\Log 2021-01-18 23:19:41 +07:00
Visman
2891f8fc78 Add Core\Log
psr-3
2021-01-17 21:01:47 +07:00
Visman
56a872bbb1 Update Container.php
Escaping the percent character.
2021-01-17 20:38:29 +07:00
Visman
c110cd65ce Add Content-Type header for error page 2021-01-11 17:21:29 +07:00
Visman
cd8090310b Delete continue 2020-12-22 08:30:29 +07:00
Visman
e83ef43cb6 Copyright 2020-12-21 17:40:19 +07:00
Visman
7831282422 Update Core\File
You can set the maximum allowed file size for save. Use for avatars.
2020-12-20 14:43:25 +07:00
Visman
23ab6ff1b3 Update Core\Files
Get an extension through the regular.
The previous version allowed backslashes and forward slashes in the file extension.
2020-11-28 21:17:12 +07:00
Visman
d5836d258c Code style, remove unnecessary comments and remove unused code 2020-11-27 14:57:54 +07:00
Visman
bd67fc9796 Shorten the file name for the polls cache. 2020-11-26 15:44:39 +07:00
Visman
1056711792 Code style 2020-11-25 21:49:16 +07:00
Visman
433057e823 Update FileCache
Save the polls cache in the /polls/ subdirectory.
2020-11-25 19:14:20 +07:00
Visman
fdbaa05f51 Fix Core\Validator for array
Another 100500 fix O_o.
2020-11-20 23:54:25 +07:00
Visman
c2f9164cc1 Fix Core\Validator for array
Restore the structure of the array according to the form validation rules.
2020-11-19 16:05:30 +07:00
Visman
b6f208eb56 Fix Core\Validator for array 2020-11-17 13:33:07 +07:00
Visman
10d2eb7aa9 Use negative index to access a character 2020-11-06 17:58:46 +07:00
Visman
97de25a05f Fix for PHP 8 RC2 2020-10-29 14:32:54 +07:00
Visman
50562d6ae3 Update Core\Lang
Add caching for *.po files.
2020-10-27 23:18:47 +07:00
Visman
2a6e260d30 Update Secury.php
Add remove control characters \x7F and \xC2\x80- \xC2\x9F
2020-10-27 13:31:10 +07:00
Visman
9a064e3b89 Fix Core\Router\validate()
If there is no route for GET and the response is METHOD_NOT_ALLOWED, then check the route for POST
2020-10-20 20:24:52 +07:00
Visman
9bbc27b95f Remove checks for intl functionality 2020-10-17 20:38:46 +07:00
Visman
9575efce44 Add Unicode Normalization
Canonical Decomposition followed by Canonical Composition for all input data
2020-10-17 20:29:10 +07:00
Visman
1347c28ffc Update Core\View 2020-10-16 20:40:22 +07:00
Visman
1e2ed92e35 Fix Core\View 2020-10-16 13:14:10 +07:00
Visman
8bc21acc9c Add strict mode 4 2020-10-15 20:02:24 +07:00
Visman
26cbd4981c Add strict mode 2 2020-10-14 21:46:49 +07:00
Visman
bd0ca920fd Add strict mode 1 2020-10-14 20:01:43 +07:00
Visman
e5f677bf61 Fix Core\Test 2020-10-14 14:25:54 +07:00
Visman
328d65465d Fix namespace for constants 2020-10-14 14:06:59 +07:00
Visman
4cf5abdd77 rev.21 Add Core\Test 2020-10-14 14:06:06 +07:00
Visman
a6a6e6ec45 Limit the maximum file size to the constant \PHP_INT_MAX 2020-10-12 17:27:27 +07:00
Visman
b3df3fc916 Fix vulnerability of lack of token
Csrf\getError() returns null if there is no token field. As a result, the check is aborted without adding an error.
2020-10-12 17:13:02 +07:00
Visman
2df6800f6f Change Core\Csrf
Add getError() method.
Returns the error text for verify(): 'Expired token' or 'Bad token'.
2020-10-10 15:30:00 +07:00
Visman
74c5b7d7a5 Add strict mode for validation 2020-10-10 11:15:07 +07:00
Visman
aa7b179e38 Add field rule setting via array 2020-10-07 20:56:27 +07:00
Visman
e8157cc802 Rename Core\Validators 2020-10-07 17:56:12 +07:00
Visman
b162126a22 Update Core\Validator
Partially changed the logic of rules processing.
2020-10-07 17:41:23 +07:00
Visman
fd75a85b0f Delete ProviderCacheInterface.php 2020-10-05 19:54:10 +07:00
Visman
ed26a085b6 rev.20 Delete Core\Cache
FileCache used without a wrapper
2020-10-05 19:53:38 +07:00
Visman
e9381eaccf Fix Core\Config
Fix for adding a formatted array to an existing element
2020-10-05 19:51:18 +07:00
Visman
6ee99cdb89 Change Cache for PSR-16 2020-10-05 18:13:20 +07:00
Visman
469436ad1b Add support .webp for avatar 2020-10-04 13:46:14 +07:00
Visman
465f02b981 Add non-standard mime types 1
image/x-ms-bmp
2020-10-02 21:04:00 +07:00
Visman
3503041449 Change Core\Files
Change isImage() method (use mime_content_type()).
Add a check if the file extension matches its mime type.
2020-10-02 20:44:06 +07:00
Visman
586e7c8197 Update Validator.php
Add the ability to escape the delimiter in the rule
2020-09-29 18:08:52 +07:00
Visman
923618846c Update Mail.php
Add support AUTH CRAM-MD5 and AUTH PLAIN for smtp
2020-09-24 23:10:01 +07:00
Visman
6656c082e0 Add auto calc token for Router\link() 2020-09-23 21:04:21 +07:00
Visman
c7259750f3 Fix Container\config() 2020-09-23 20:44:31 +07:00
Visman
cbbe278413 Add BBCodeList model + generate() method 2020-09-21 21:59:14 +07:00
Visman
80224917ec Override bbcode settings 2020-09-21 11:31:55 +07:00
Visman
657e061c4f Delete o_quote_depth from config 2020-09-20 13:18:31 +07:00
Visman
8dc15138eb emove phpDocumentor syntax from comments 2020-09-12 23:22:32 +07:00
Visman
72c250be11 rev.15 Add smilies management 2020-09-12 14:26:42 +07:00
Visman
e3e41628d9 Add renameField() method to mysql driver 2020-09-12 14:24:25 +07:00
Visman
f045592a9b Change the structure of the smiley cache 2020-09-10 15:43:51 +07:00
Visman
64c4735f2e rev.13 Add subscriptions 4
Add sending emails
Change template format for emails
Change previousPost() method for Post
2020-09-04 23:41:51 +07:00
Visman
0fefe8a715 Update Core\Mail
To send email with multi recipients via Bcc headers.
Emails end up in spam :(
2020-08-30 18:04:02 +07:00
Visman
511c9e7e91 Change hrader() method in Page
You can remove the http header via $value = null
2020-08-25 20:29:48 +07:00
Visman
cfcb867afd Update View for feeds
Replace flags of \htmlspecialchars() function for xml files
2020-08-24 18:31:46 +07:00
Visman
97b544f851 Add delete() method for Core\Config 2020-08-09 17:42:03 +07:00
Visman
d8f94dc853 Fix Core\Config 2020-08-09 16:04:27 +07:00
Visman
2eca001f10 Update Core\Config 2020-08-09 15:53:49 +07:00
Visman
1a4844c508 Delete test exit in Core\Config 2020-08-07 00:50:46 +07:00
Visman
ce3dfbaf10 Refine the return type 2020-08-07 00:40:41 +07:00
Visman
864b338e30 Add Core\Config class
for test
2020-08-07 00:39:33 +07:00
Visman
5bfceba89e rev.2 for DB update
and fix mysql db driver
2020-08-04 19:49:03 +07:00
Visman
8bbfbbf550 Fix config() method in Container 2020-07-18 23:34:49 +07:00
Visman
cad582c85c Update Lang.php
The order of selection of translations can be changed by specifying the second parameter of the load() method
2020-07-16 16:22:43 +07:00
Visman
3d9d33c7c6 Update censorship usage 2 2020-07-05 20:16:58 +07:00
Visman
0799853a93 Coding style 2020-07-03 15:28:10 +07:00
Visman
700435010a Coding style 2020-07-02 21:07:17 +07:00
Visman
a228dc1792 Move constants from Routing to Router 2020-07-01 23:37:14 +07:00
Visman
8eb4b6ea9c Coding style 2020-07-01 21:40:10 +07:00
Visman
8131e14e56 Coding style 2020-06-28 12:10:59 +07:00
Visman
cc3f2aaeba Update Container.php 2020-06-27 14:14:02 +07:00
Visman
eb438fa40e Fix Cache (delete() method) 2020-06-05 21:33:43 +07:00
Visman
dffb30b0a6 \hash_algos to \hash_hmac_algos 2020-05-26 13:02:31 +07:00
Visman
07734b676e Group use declarations 2020-05-26 12:45:40 +07:00
Visman
b88bdd2b31 Null coalescing operator 2020-05-26 10:52:52 +07:00
Visman
9a8cc16b5c Change PHP min version 2020-05-24 20:31:05 +07:00
Visman
e87a75cd6d Add declaration of argument types and return values 2020-05-24 18:30:48 +07:00
Visman
871586be8a Add report page 2020-05-23 12:22:21 +07:00
Visman
c4fccb38eb Update ErrorHandler.php 2020-01-16 21:43:46 +07:00
Visman
54d1e7d537 Minor fix 2019-12-29 16:52:39 +07:00
Visman
a6180e05f9 Minor editing of validator messages 2019-12-28 15:19:27 +07:00