summaryrefslogtreecommitdiffstatshomepage
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Support reentrant calls to ‘sql_db->sql_transaction’ ↵HEADoniGravatar Tom Willemse2024-06-111-11/+27
| | | | | | | | | | | | | | | | | | for SQLite SQLite transactions don't appear to be reentrant. So calling ‘BEGIN’ and then again ‘BEGIN’ is an error if there is no ‘COMMIT’ or ‘ROLLBACK’ in between. In order to pretend like this works (it doesn't) I keep track of the level of the number of transactions that have been created and only call the actual ‘BEGIN’ on the first call and ‘COMMIT’ and ‘ROLLBACK’ on the final one. This does mean that if any part of the code forgets to do a commit or rollback for any reason it'll maintain the transaction indefinitely. I want to change it to explicitly fail if this is attempted, but MySQL/MariaDB doesn't seem to have any problem with calling ‘BEGIN’ and ‘COMMIT’/‘ROLLBACK’ as many times as one wants.
* Throw an error when changes can't be committed to the ↵sqlite-fixesGravatar Tom Willemse2024-06-116-11/+86
| | | | | | | | database I was testing and another process had the database open, so it couldn't commit changes. This wasn't apparent from the UI because it would just silently assume a commit went fine.
* Use ‘exec’ instead of ‘query’ for transaction ↵Gravatar Tom Willemse2024-06-111-3/+3
| | | | | | | | commands in sqlite The ‘query’ method will try and return a ‘SQLite3Result’ object, which will be meaningless because it won't contain any fetched data. The ‘exec’ method instead returns a boolean indicating the success or failure of the query.
* Throw an error if a bookmark can't be committed to the ↵Gravatar Tom Willemse2024-06-111-1/+9
| | | | database
* Fix using SQLite as a database engineGravatar Tom Willemse2024-06-1017-61/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The ‘sqlite_*’ functions don't exist anymore in PHP 8. They have been replaced with several ‘SQLite3*’ classes. - There are some differences between MySQL and SQLite queries that showed up while doing this work. These differences have been pushed into a QueryBuilder class so that the other database engines don't have to be modified. This is done in an ad-hoc basis for now, just to get things working. - SQLite doesn't support the ‘!’ negation operator used as ‘!ISNULL(...)’, instead I use ‘IIF(...)’. - SQLite doesn't support a ‘LEFT(...)’ function, instead I use ‘SUBSTRING(..., 0, ...)’. - The SQLite3 module doesn't provide a connection identifier, instead you use an object that represents the connection. - SQLite doesn't support the ‘ALL’ keyword (or at least doesn't support it in the same way MySQL does). Instead of ‘<> ALL <subquery>’ I use ‘NOT IN <subquery>’. - The ‘SQLite3*’ classes don't provide any way to determine how many rows have been returned without iterating through all of them, so any place that tries to figure out the rows beforehand just doesn't anymore. - All the database engine classes require a ‘QueryBuilder’ instance. The sqlite one uses a specialized one. I can't test most of these database engines, so I'm focusing on SQLite and MySQL/MariaDB for now.
* Make sure to check users for being falseGravatar Tom Willemse2024-06-103-12/+34
|
* Revert "Fix issue accessing an array index on a boolean"Gravatar Tom Willemse2024-06-101-18/+2
| | | | This reverts commit e1bfad3df7b41cbc8537222f211edaf9b3444edf.
* Clean up configuration file findingGravatar Tom Willemse2024-06-051-17/+14
| | | | Don't make finding the default files dependent on finding regular files.
* Gracefully handle being unable to find any config filesGravatar Tom Willemse2024-06-051-8/+12
|
* Merge branch 'debug-fixes' into oniGravatar Tom Willemse2024-04-211-9/+1
|\
| * fix(debug): Don't serve application/xhtml+xml in debug modedebug-fixesGravatar Tom Willemse2024-04-191-9/+1
| | | | | | | | | | | | | | There are quite a few big differences between running HTML and XHTML that are more than just validation errors. Running a different parser in debug mode seems unhelpful, and the goal probably won't be to generate XHTML always anyway anymore.
* | Fix issue with urls ending in ‘/’ getting normalized ↵Gravatar Tom Willemse2024-02-291-1/+1
| | | | | | | | | | | | | | wrong Normalizing them this way ruins the url by cutting off a character too many and making the url invalid.
* | Fix issue about ‘bVotes’ and ‘bVoting’ not ↵fix-for-php-8Gravatar Tom Willemse2024-02-291-1/+3
| | | | | | | | having default values
* | Fix issue where constructors aren't calledGravatar Tom Willemse2024-02-292-4/+4
| | | | | | | | | | | | | | The documentation says that defining a constructor as a function with the same name as the class is deprecated as of PHP 8, but should still work. However it seems that this isn't true. Running on my machine these constructors didn't get called. Renaming them to ‘__construct’ fixed that.
* | Fix issue accessing an array index on a booleanGravatar Tom Willemse2024-02-291-2/+18
| |
* | Fix error: Using ${var} in strings is deprecatedGravatar Tom Willemse2024-02-291-6/+6
|/
* Update User.php for PHP 8Gravatar buckaroo-labs2023-12-201-0/+3
|
* Update User.php for PHP 8Gravatar buckaroo-labs2023-12-201-0/+2
|
* Update functions.phpGravatar buckaroo-labs2023-12-201-1/+1
|
* Update functions.phpGravatar buckaroo-labs2023-12-201-1/+1
|
* Update functions.php for PHP 8Gravatar buckaroo-labs2023-12-201-1/+2
|
* PHP 8 updatesGravatar buckaroo-labs2023-12-201-1/+2
| | | add IF condition to avoid 'Deprecated' warning
* Update mysqli.php commentsGravatar buckaroo-labs2023-12-201-1/+1
|
* PHP 8 modificationsGravatar buckaroo-labs2023-12-201-4/+16
| | | changes to $cur_index variable
* PHP 8 modificationsGravatar buckaroo-labs2023-12-201-1/+7
| | | modifications to avoid "Deprecated" warnings in sql_connect function
* PHP 8 modificationsGravatar buckaroo-labs2023-12-201-1/+7
| | | modifications to avoid "Deprecated" warnings in sql_connect function
* PHP 8 modificationsGravatar buckaroo-labs2023-12-201-1/+7
| | | modifications to avoid "Deprecated" warnings in sql_connect function
* PHP 8 modificationsGravatar buckaroo-labs2023-12-201-1/+7
| | | modifications to avoid "Deprecated" warnings in sql_connect function
* PHP 8 modificationsGravatar buckaroo-labs2023-12-201-1/+7
| | | modifications to avoid "Deprecated" warnings in sql_connect function
* PHP 8 modificationsGravatar buckaroo-labs2023-12-201-1/+7
| | | modifications to avoid "Deprecated" warnings in sql_connect function
* PHP 8 modificationsGravatar buckaroo-labs2023-12-201-2/+7
| | | modifications to avoid "Deprecated" warnings in sql_connect function
* PHP 8 modificationsGravatar buckaroo-labs2023-12-201-1/+8
| | | modifications to avoid "Deprecated" warnings in sql_connect function
* PHP 8 modificationsGravatar buckaroo-labs2023-12-201-2/+7
| | | modifications to avoid "Deprecated" warnings in sql_connect function
* PHP 8 modificationsGravatar buckaroo-labs2023-12-201-1/+7
| | | Modifications to avoid "Deprecated" warnings in sql_connect function
* bug fixGravatar buckaroo-labs2023-12-201-1/+1
| | | Fatal error: Uncaught Error: [] operator not supported for strings in src/SemanticScuttle/Service/Bookmark2Tag.php:117
* bug fixGravatar buckaroo-labs2023-12-201-31/+31
| | | Fatal error: Array and string offset access syntax with curly braces is no longer supported in src/SemanticScuttle/utf8.php on line 51
* PHP 7.3 compat, bug fixesGravatar querwurzelt2019-01-212-6/+10
|
* script to use with errbot's exec pluginGravatar Christian Weiske2016-05-091-0/+1
|
* Move URL title method to dedicated classGravatar Christian Weiske2016-05-091-0/+65
|
* Add support for phancap website thumbnailer.Gravatar Christian Weiske2014-04-234-1/+204
| | | | Drop support for artviper, since their service is gone.
* add option to get last modified date instead of creation ↵Gravatar David Glenck2014-03-261-0/+7
| | | | date
* Fix bug #161: URLs broken on 1&1 serverGravatar Christian Weiske2013-08-202-17/+13
|
* Fix two broken testsGravatar Christian Weiske2013-03-211-1/+1
|
* CSGravatar Christian Weiske2013-03-211-7/+15
|
* The hasTag was always returning false, which probably is ↵Gravatar Christian Weiske2013-03-211-1/+2
| | | | a bug. Fixed it and added a test to catch it. Thanks for Ricardo Soares de Lima for the first patch version
* fix some CS, remove unneeded include - file is included ↵Gravatar Christian Weiske2013-03-211-5/+3
| | | | in header.php
* The method attachTags was raising a Notice error, fix it ↵Gravatar Ricardo Soares de Lima2013-03-211-6/+7
| | | | and adds a test for this situation.
* Using a foreach loop avoids Notice warnings when the ↵Gravatar Ricardo Soares de Lima2013-03-212-2/+2
| | | | array doesn't have sequential indexes, ex: 0, 1, 3...
* remove php4-style object reference passingGravatar Christian Weiske2013-03-1710-63/+76
|
* set proper exit status when config file does not existGravatar Christian Weiske2012-01-251-9/+7
|