Commit Graph

264 Commits

Author SHA1 Message Date
Michael Vogel dc3d2d5988 "dba" is now "DBA". This hadn't been respected at some places (#5655)
* "dba" is now "DBA". This hadn't been respected at some places

* Cleaning up unneeded stuff
2018-08-23 09:51:58 -04:00
Roland Häder 4d39164c1e [WIP] Rewrite to Proxy class: (#5507)
* Rewrite to Proxy class:
- introduced new Friendica\Network\Proxy class for in exchange of proxy_*()
  functions
- moved also all PROXY_* constants there as Proxy::*
- removed now no longer needed mod/proxy.php loading as composer's auto-load
  will do this for us
- renamed those proxy_*() functions to better names:
  + proxy_init()           -> Proxy::init()         (public)
  + proxy_url()            -> Proxy::proxifyUrl()   (public)
  + proxy_parse_html()     -> Proxy::proxifyHtml()  (public)
  + proxy_is_local_image() -> Proxy::isLocalImage() (private)
  + proxy_parse_query()    -> Proxy::parseQuery()   (private)
  + proxy_img_cb()         -> Proxy::replaceUrl()   (private)

* Ops, need to set $a here ...

* CR request:
- moved Proxy class to Friendica\Module
- extended BaseModule

* Ops, no need for own instance of $a when self::getApp() is around.

* Proxy-rewrite:
- proxy_url() and proxy_parse_html() are both non-module functions (now
  methods)
- so they must be splitted into a seperate class
- also the SIZE_* and DEFAULT_TIME constants are both not relevant to module

* No instances from utility classes

* Fixed error:
- proxify*() is now located in `Friendica\Util\ProxyUtils`

* Moved back to original place, ops? How did they move here? Well, it was not
intended by me.

* Removed duplicate (left-over from split) constants and static array. Thank to
MrPetovan finding it.

* Renamed ProxyUtils -> Proxy and aliased it back to ProxyUtils.
2018-07-30 22:06:22 -04:00
Hypolite Petovan 6141023640 Remove dbesc() and dba_timer() function declarations 2018-07-23 15:30:54 -04:00
Hypolite Petovan 4db98eb43d Rename DBA::inArray to DBA::toArray 2018-07-22 19:27:35 -04:00
Hypolite Petovan abbaaf5aa5 Rename DBA::clean_query to DBA::cleanQuery 2018-07-22 19:27:34 -04:00
Hypolite Petovan 910e832dc2 Rename DBA::any_value_fallback to DBA::anyValueFallback 2018-07-22 19:27:34 -04:00
Hypolite Petovan af6dbc654f Rename Friendica\Database\dba to Friendica\Database\DBA 2018-07-20 08:19:26 -04:00
Hypolite Petovan 72f32f90d1 Remove class \dba from include/dba 2018-07-19 22:15:57 -04:00
Michael Vogel ece4d3f4fb Issue 5407: Workers didn't start anymore (#5409) 2018-07-19 11:05:17 -04:00
Hypolite Petovan c207f6d597 Remove remaining references to Config::get in include/dba 2018-07-16 19:38:18 -04:00
Hypolite Petovan 9396b05659 Revert using Config class in dba 2018-07-16 19:38:16 -04:00
Hypolite Petovan 9be9741562 Fix uses in include/dba 2018-07-16 19:38:16 -04:00
Hypolite Petovan 762a786611 Replace direct accesses to App->config by Config::get/set calls 2018-07-16 19:38:16 -04:00
Hypolite Petovan 7d8c45dde8 Remove dependency to App in dba::connect
- Remove timing (can be done centrally)
- Add charset parameter to dba::connect and dba::reconnect
2018-07-16 19:38:13 -04:00
Michael 69db696ab1 Improve test behaviour 2018-07-08 05:29:06 +00:00
Philipp Holzer 1ffe0cfd81
Added Lock Unittests & Bugfixings
Added Redis Lock Unittests
Added Memcached Lock Unittests

Fixed a bug in dba
Fixed a bug in RedisLock
2018-07-07 16:15:03 +02:00
Hypolite Petovan 0ee153e1bd Fix Array to String conversion message for IN conditions 2018-07-02 07:47:47 -04:00
Hypolite Petovan 98a5749b45
Merge pull request #5277 from annando/native-pdo
We now are using the native pdo mode
2018-06-22 16:04:50 -04:00
Michael 6e64091fc7 We now are using the native pdo mode 2018-06-22 19:35:42 +00:00
miqrogroove c37a8cc661
Update dba.php 2018-06-22 07:34:27 -04:00
miqrogroove 150989ba99
Ensure IN() Conditions Never Mix Data Types 2018-06-21 23:56:19 -04:00
Hypolite Petovan 47ab72352e
Merge pull request #5269 from annando/non-unique-values
This fixes the problem with mixed variables in queries
2018-06-21 22:12:07 -04:00
Michael e1e28ba7c3 Better float detection 2018-06-21 21:55:43 +00:00
miqrogroove c600ccad5c
Correct dba::close() To Match dba::p() 2018-06-21 17:27:12 -04:00
Michael 1b85b75563 Currently removed, needs more testing 2018-06-21 20:42:58 +00:00
Michael 261d7435c0 Check for floats and enable native prepares 2018-06-21 20:33:27 +00:00
Michael 5656c0564a We don't need to look $is_int there 2018-06-21 19:52:28 +00:00
Michael c1059875bc This fixes the problem with mixed variables in queries 2018-06-21 19:48:25 +00:00
miqrogroove 759dfe6bb1
Allow for Integer Literals in PDO Database Driver
This should fix things like "LIMIT ?"
2018-06-21 11:42:43 -04:00
Michael 738644a006 Quit if database connection was lost during "e" 2018-06-11 03:56:19 +00:00
Michael 8584e09e12 Store the database credentials for reconnect 2018-06-11 03:45:45 +00:00
Michael b02cdc8a7f Merge remote-tracking branch 'upstream/develop' into quit-on-error 2018-06-11 03:15:59 +00:00
Michael aa3f8ec09d Force a database reconnection in the daemon to prevent lost connections 2018-06-10 22:04:09 +00:00
Michael 4874e589f1 New class function to fetch items 2018-06-07 06:03:12 +00:00
Michael 28f8beebfc Workers can now be started exclusively from the daemon and other workers 2018-06-01 22:09:27 +00:00
Hypolite Petovan 93daf7883e Merge branch 'master' into develop
- Updated new develop version label
- Incremented database build number
2018-06-01 07:30:04 -04:00
Michael de609e49f0 Improved logging 2018-05-24 22:00:54 +00:00
Michael f8230badba Avoid problems with better variable naming 2018-05-24 21:46:57 +00:00
Michael 1bce39120d Reconnect after the connection had been lost. 2018-05-24 21:19:59 +00:00
Hypolite Petovan b0155fe37b Remove obsolete DNS test from include/dba 2018-05-24 01:31:03 -04:00
Michael 87b5e26063 Do a hard exit when the SQL connection went down 2018-05-24 04:07:39 +00:00
Pierre Rudloff 3195d6e125 Add API tests 2018-05-10 19:12:00 +02:00
Philipp Holzer 1ab965c944 Add Install Mode
- merged `friendica/develop` to `nupplaPhil/install_mode`
- content merged `mod/install.php` to `src/Class/`
2018-04-28 15:11:01 +02:00
Philipp Holzer a97ad9dc42 Add Install Mode (Part 2)
- Added constants to class `App`
- Added global App-Mode to `dba:connect()` instead parameter `$install`
2018-04-28 12:36:40 +02:00
Philipp Holzer d5b68cd146 Add a App-Mode with defined constants
- Normal Mode = 0
- Install Mode = 1
- Maintenance Mode = 2

Moved Install-Mode check to class `App`

Replaced all maintenance and install checks with $a->mode checks
2018-04-27 21:07:04 +02:00
Hypolite Petovan a84477ed2d Fix count() warning in include/dba.php 2018-04-23 00:00:06 -04:00
Hypolite Petovan 273dde508b Add default value doc for options.cascade in dba::delete 2018-04-22 11:34:41 -04:00
Hypolite Petovan 0a026515bd Add documentation for $options parameter in dba::delete 2018-04-22 11:33:20 -04:00
Hypolite Petovan ba3f721524 Prevent side effect with cascade => false in dba::delete 2018-04-22 04:46:46 -04:00
Hypolite Petovan 18078ce7a4 Prevent infinite loop when a dbstructure_definition hook is orphan
- Add cascade option to dba::delete
- use cascade = false for orphan hook deletion
2018-04-21 20:34:07 -04:00