1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-29 18:47:54 +01:00

226 Commits

Author SHA1 Message Date
Nick Liu
8c528de191
e_db_mysql: Replaced mysql with mysqli
Finally no longer using the mysql_* functions removed in PHP 7.0
2020-01-19 13:33:52 +01:00
Nick Liu
4a26ac5fd7
Removed unused USE_PERSISTANT_DB constant 2020-01-19 12:57:39 +01:00
Nick Liu
c78976750c
Removed PDO from e_db_mysql
e_db_mysql has divorced e_db_pdo. They are now independently functioning implementations of e_db.
2020-01-19 12:52:22 +01:00
Nick Liu
72d3f07410
PHP 5.6 fixes for e_db_mysql
- FIX: Don't redefine MYSQL_* constants in e_db_pdo_class.php
- FIX: e_db_mysql::rowCount() could try to use mysql_num_rows() to count rows of a non-resource
- FIX: e_db_mysql::delete() stores the number of deleted rows in e_db_mysql::$mySQLrows
- FIX: e_db_abstractTest::testDb_Query() was fetching in PDO mode but shouldn't have been
- FIX: Typos in e_db_abstractTest::testDelete()
- MOD: Moved PDO-exclusive testBackup() from e_db_abstractTest to e_db_pdoTest
- FIX: e_db_mysqlTest now works in PHP 5.6 if the main e_db instance was in PDO mode but the test
       class initializes in legacy mode
- MOD: e_db_mysqlTest now asserts that PDO mode is not in use
- FIX: e_db_mysqlTest::testGetServerInfo() should now actually get a version number
- FIX: e_db_mysqlTest::testGetLastErrorNumber() has a different error code compared to PDO
- FIX: e_db_mysqlTest::testEscape() should actually get something from mysql_real_escape_string()
2020-01-19 12:30:23 +01:00
Nick Liu
be8f2bbeb6
Fixed PHP 7.3 warnings
- FIX: Silenced compact() in e107Test::testInitCore()
- FIX: Null check in e_db_pdo::makeTableDef()
- FIX: Null check in e_db_mysql::makeTableDef()
- FIX: userlogin::login() had this warning on line 148:
       "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
2020-01-18 18:52:20 +01:00
Nick Liu
98911f0b8e
Guard type errors in e_db::insert() implementations 2020-01-18 11:05:08 +01:00
Nick Liu
ef34ef7ec8
Removed obsolete ALLOW_AUTO_FIELD_DEFS constant 2020-01-17 15:54:56 +01:00
Nick Liu
a93165efa5
Implemented missing e_db_mysql::resetTableList() method
e_db::resetTableList() is now an interface method (undocumented)
2019-12-23 17:12:47 +01:00
Nick Liu
a4ad81dd4c
Resolved e_db_mysql::db_Query() logging inconsistency
Logging change made in f34eeaf369678ddafe2842b391e3b1ec534aa324 for e_db_pdo was not applied to e_db_mysql

This commit makes the behaviors consistent between the two implementations of e_db.
2019-12-23 17:08:01 +01:00
Nick Liu
71e7f8778c
Merged e_db_mysql and e_db_pdo tests into e_db_abstractTest
- FIX: e_db::copyTable() is now an interface
- FIX: e_db_mysql now implements e_db
- FIX: Implemented missing e_db_mysql::copyTable() public method
- FIX: Implemented missing e_db_mysql::setLanguage() method
- FIX: Implemented missing e_db_mysql::getLanguage() method
- FIX: Implemented missing e_db_mysql::dropTable() method
- MOD: Merged e_db_mysqlTest and e_db_pdoTest into e_db_abstractTest
2019-12-23 16:37:48 +01:00
Cameron
7e90cfb4b5 Fix for mysql tests. 2019-06-06 07:07:59 -07:00
Cameron
60b7f3ae6d Minor tweaks. 2019-06-05 21:59:03 -07:00
Cameron
ce7f3feb38 PDO class now used by default. mysql_class.php currently deprecated until it is modified to use mysqli. Install routine upgraded. Install logging vastly improved. 2019-06-03 15:27:36 -07:00
Cameron
be8d2fca28 Fixes #3800 Issue with DB structure update and database name containing hyphens. 2019-05-28 10:49:32 -07:00
Cameron
614711ff21 Database: Prevent gaps in PRIMARY index when using DUPLICATE_KEY_UPDATE with insert() method. 2019-02-25 18:51:49 -08:00
Cameron
25c9a44a87 Fix for db_FieldList(); 2019-02-13 15:54:04 -08:00
Cameron
c45ed85c5c db_Fetch() e_LEGACY_MODE permanently removed. Old plugins should use $sql->fetch('both'); if this is still required. 2019-02-13 10:31:28 -08:00
Cameron
c34f8b41f3 Mysql class optimization and minor fixes. 2019-02-11 15:40:10 -08:00
Cameron
4e9f47c8b4 PDO class optimization 2019-02-10 16:19:25 -08:00
Cameron
f735292e3f More db class tweaks 2019-02-09 13:07:34 -08:00
Cameron
b471292a36 Removed globals from db_Write_log() method. 2019-02-09 12:47:54 -08:00
Achim Ennenbach
96a84a1e93 fixes an issue with pdoBind not being initialized properly
fixes an issue with update(), returning sometimes an object instead of
the number of updated records.
fixes an issue with delete(), returning sometimes an object instead of
the number of deleted records
2019-02-03 19:35:45 +01:00
Cameron
35ff23b55f MySQL backup - disable 'databases' flag for a more flexible import. 2019-01-28 18:38:01 -08:00
Cameron
7e5fe2eaad MySQL backup - automatically add '.gz' to the filename when gZip is enabled. 2019-01-28 18:24:11 -08:00
Cameron
6d75ea2145 Fixed mysql class backup method errors. Third-party Mysqldump class added and integrated. 2019-01-28 17:53:45 -08:00
Cameron
b19463b259 PHPDoc updates 2019-01-26 10:28:08 -08:00
Tijn Kuyper
1a40b80915 Make sure mysql_* functions are available, otherwise use PDO 2019-01-10 17:22:49 +01:00
Cameron
e44fc0c13a Fixes issues with secondary database connections. 2019-01-05 14:37:12 -08:00
Cameron
519001a690 PHP 7.2 null fix courtesy of Miro. 2018-12-18 12:12:46 -08:00
Cameron
b5157e70cb Fixes #3422 Installation issue with database names containing a hyphen. 2018-09-06 11:20:43 -07:00
Cameron
2bd651c630 Fixes #2593, Fixes #1586 User-extended 'database' field options were not being saved. 2018-08-26 10:23:55 -07:00
Nick Liu
3407b717c6
Reduce reliance on global var $db_ConnectionID
When one of the 11 methods in e_db_mysql look for a PDO object in
e_db_mysql::$mySQLaccess, global $db_ConnectionID can be NULL in some
cases, so it's more reliable to get the singleton e_db_mysql and use the
e_db_mysql::$mySQLaccess from that singleton.

This change still allows global $db_ConnectionID to be used, but if
$db_ConnectionID is NULL, the singleton fallback is used.

Fixes: e107inc/e107-test#6
2018-07-20 05:24:55 -05:00
Achim Ennenbach
eeaa9b22a8 New method to check table indexes 2018-06-08 22:59:24 +02:00
Cameron
c7c3c49daf Support for 'IGNORE' duplicate key on INSERT. 2018-05-09 11:13:05 -07:00
Achim Ennenbach
d01a97816f refactoring toNumber() into e_parse class 2018-05-04 19:27:00 +02:00
Achim Ennenbach
2a1a6d4118 closes e107inc/e107#3113 parses a string into a db ready number format
value returned works also with floatval()
2018-05-01 23:29:50 +02:00
Lóna Lore
154087b367 Fix for PHP Catchable fatal error: Object of class PDO could not be converted to string 2017-12-16 11:59:35 +01:00
Cameron
a7b7801766 Fixes #2890 - sql insert() debug info using PDO. 2017-11-30 12:40:06 -08:00
Cameron
bed4336571 Issue #2078 2017-09-18 12:20:39 -07:00
Cameron
4a06e277b0 Issue #2643 MySQL Backup 2017-05-24 12:58:30 -07:00
Cameron
61e4582b85 MySQL server compatibility fix. 2017-04-28 11:07:37 -07:00
Cameron
6f348e1940 Downloads: Fix for drop-down category ordering. 2017-04-19 17:15:32 -07:00
Cameron
90673d2ae0 MySQL Class: New method selectTree();
Support for custom navigation depth.
Download-categories sitelink/nav function added.
2017-04-19 16:35:10 -07:00
Cameron
2dfd20c54b MySQL Class: Corrects PHP Notice during install of RSS plugin and similar database schemes. 2017-04-19 09:49:15 -07:00
Cameron
d110d8d4e9 Support multiple database connections for the same mysql-user. 2017-03-31 10:51:21 -07:00
Cameron
361740f83c Merge pull request #2420 from dimante/master
Database backup fix for PHP 7+
2017-02-12 09:28:10 -08:00
John Gates
5e91e5a909 Fix Database Backup php >=7.0
This will allow mysql backup to complete.
2017-02-12 11:24:24 -06:00
Cameron
37c18e822e Admin-ui quick page navigation added. Plugin class fixes. (admin navigation of plugins) 2017-02-06 11:18:36 -08:00
Cameron
5fb4a09b1f Plugin Manager fix. 2017-02-05 19:53:45 -08:00
Cameron
479cdd7d8f e_plugin class optimized. 2017-02-04 12:49:44 -08:00