Commit Graph

6568 Commits

Author SHA1 Message Date
Hypolite Petovan daa1177e3a Update use statement lists with new Friendica\Database\dba class
- Remove unused use statement
- Remove superfluous use statements (classes in the same namespace)
- Add missing use statements
2018-07-19 22:15:21 -04:00
Michael Vogel ece4d3f4fb Issue 5407: Workers didn't start anymore (#5409) 2018-07-19 11:05:17 -04:00
Michael Vogel 5af9596dde New item field "Post-type" and new table "permissionset" (#5408)
* "post-type" replaces "bookmark" and "type"

* Removed some more type

* Added index to permission set

* The permission set is now stored

* The permission set is now removed upon expiry

* Post update now stores the permission set

* New file

* Permissions are now sorted

* Changed documentation
2018-07-19 09:52:05 -04:00
Roland Häder 0b38f1c58b Fixes applied: (#5399)
- $_SESSION['remember_user'] did only exist here and no where else
- it seems to be accient old-lost code, so I fixed it to $a->user['nickname']
  instead
- used multi-line comment for multiple lines of on-line comments

Signed-off-by: Roland Häder <roland@mxchange.org>
2018-07-19 07:11:03 -04:00
Hypolite Petovan 67dc08d120 Enforce systen.register_policy value type 2018-07-16 19:38:19 -04:00
Hypolite Petovan c207f6d597 Remove remaining references to Config::get in include/dba 2018-07-16 19:38:18 -04:00
Hypolite Petovan 820afa2284 Replace global $a with BaseObject::getApp() 2018-07-16 19:38:17 -04:00
Hypolite Petovan adacf421a6 Remove deprecated functions in include/text 2018-07-16 19:38:17 -04:00
Hypolite Petovan 5906c7e013 Remove api test pconfig debug 2018-07-16 19:38:17 -04:00
Hypolite Petovan 224765cdf5 Wrong table name 2018-07-16 19:38:16 -04:00
Hypolite Petovan f8a90f3425 Add more api test debug 2018-07-16 19:38:16 -04:00
Hypolite Petovan de0afd3b32 Add api test debug 2018-07-16 19:38:16 -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 cd9b864045 Rework App modes
- Replace App mode constants with capability-based flags
- Add App->isInstallMode()
- Add file config fallback in (P)Config abstraction
- Removed logger disabling code
2018-07-16 19:38:15 -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 0e8fa34156 Fix for displaying public items 2018-07-16 04:00:57 +00:00
Hypolite Petovan a6eae9adec Add new put_item_in_cache hook in include/text 2018-07-15 08:03:12 -04:00
Roland Häder 6b5d90333f Fixes for some E_NOTICE and type-hints added (#5358)
* Fixed http://github to https://github

Signed-off-by: Roland Häder <roland@mxchange.org>

* Fixes for #4965:
- updated messages.po file

Signed-off-by: Roland Häder <roland@mxchange.org>

* Fixed E_NOTICE where isset()/empty() was absent.

Signed-off-by: Roland Häder <roland@mxchange.org>

* Fixed missing variable $sql_order causing E_NOTICE.

Signed-off-by: Roland Häder <roland@mxchange.org>

* Continued:
- added array type-hint where known (some)

Signed-off-by: Roland Häder <roland@mxchange.org>

* Fixes:
- in Profile::load() $user is now only one-dimensional
- $a->get_hostname is no property, it is a method

Signed-off-by: Roland Häder <roland@mxchange.org>

* reverted changes that are unintended

Signed-off-by: Roland Häder <roland@mxchange.org>

* Continued:
- removed leading \ (uncommon, okay)
- removed entire if() block (CR by Hypolite)

Signed-off-by: Roland Häder <roland@mxchange.org>

* Removed if() block

Signed-off-by: Roland Häder <roland@mxchange.org>
2018-07-13 15:47:14 -04:00
Michael Vogel 0360f7197a Several more warnings ... (#5340)
* Some more warnings removed

* Even more warnings ...

* Will it ever end? ;-)

* Avoid warning in dbstructure

* Origin and OStatus ...

* There are more warnings solved ... yeah!

* And again ...

* We are not done yet

* And more ...

* And some new places ...

* And more in the feeds

* Avoid some more

* And some backend stuff

* Notifications cleared

* Some more stuff

* and again ...

* It's getting fewer ...

* Some warnings had been hidden in the notifications

* Fix the fix

* And another missing one ...

* We need the owner here, not the user

* Forgotten user

* And more ...

* And some more warnings disappeared ...

* Some more frontend warnings

* Some backend warnings removed

* Fixed sidebar for "vier"

* And more ...

* Some more ...

* And something for "remote self"

* Am I stuck in an endless loop?

* Fix: Clear tag and file field on update

* Preset page content
2018-07-10 08:27:56 -04:00
Philipp Holzer c829e43725
moved get_guid to System::createGUID 2018-07-09 21:38:16 +02:00
Michael 675a6adf35 Added comment 2018-07-08 13:52:11 +00:00
Michael 8a2230bc4c Avoid warnings in addons 2018-07-08 12:01:36 +00:00
Michael 3e797547a3 Warnings fixed 2018-07-08 09:37:05 +00:00
Michael 69db696ab1 Improve test behaviour 2018-07-08 05:29:06 +00:00
Michael Vogel ff5ee74ecf
Merge branch 'develop' into item-activities 2018-07-08 06:35:50 +02:00
Michael 4d35e228c4 More item abstraction / making remote deletion work again 2018-07-07 18:14:16 +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 e44111e935 Revert renaming lang to language in api
- Normalize some quotes
- Put "Empty user-agent" log message in a else statement
2018-07-04 17:33:09 -04:00
Hypolite Petovan 43688c04b1 Add NotFoundException for recipients in api_direct_messages_new() 2018-07-02 07:48:59 -04:00
Hypolite Petovan cb7176ee70 Fix Config use in api_statusnet_config() 2018-07-02 07:48:53 -04:00
Hypolite Petovan 757fd357f6 Fix yet more undefined variable/index notice in api 2018-07-02 07:48:48 -04:00
Hypolite Petovan dde61a77a4 Fix root element containing only text in api_create_xml() 2018-07-02 07:48:42 -04:00
Hypolite Petovan 62eba48679 Fix yet more undefined variable/index messages in api_statuses_show 2018-07-02 07:48:38 -04:00
Hypolite Petovan 0ee153e1bd Fix Array to String conversion message for IN conditions 2018-07-02 07:47:47 -04:00
Hypolite Petovan a380bcd1c1 Fix more undefined variable/index notice in tests 2018-07-02 07:45:25 -04:00
Hypolite Petovan a329ce5b50 Fix $called_api expecting at least 2 elements in tests 2018-07-02 07:45:11 -04:00
Hypolite Petovan 6776c4e3f9 Fix some undefined variable/index notices in tests 2018-07-02 07:44:55 -04:00
Michael 717ca0b7eb Use already fetched data for magiclink 2018-07-02 05:41:55 +00:00
Michael 0ab9f2e265 Preparations to not store the tags in the item table anymore 2018-06-30 13:54:01 +00:00
Michael 028c9f4da5 We now store the verb in the item-content as well 2018-06-27 19:37:13 +00:00
Michael 76dab3b2d7 Use gravity instead of verb 2018-06-27 18:09:33 +00:00
Michael b03db4643f The fetch function now centrally controls the content 2018-06-24 10:48:29 +00: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
Michael Vogel 4b0cf8d60f
Merge pull request #5267 from miqrogroove/patch-2
Allow for Integer Literals in PDO Database Driver
2018-06-21 18:51:01 +02: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 d643e00d33 Standards and a new function to fetch content 2018-06-21 15:14:01 +00:00
Michael 70af2cecf2 Some of the last direct SQL calls to the item table had been changed 2018-06-21 06:21:51 +00:00
Roland Häder 1567eb0791
fixed another left-over ...
Signed-off-by: Roland Häder <roland@mxchange.org>
2018-06-20 22:02:16 +02:00
Roland Häder 852ef4021b
more spaces + some curly spaces added
Signed-off-by: Roland Häder <roland@mxchange.org>
2018-06-20 22:02:16 +02:00
Roland Häder f2f12d6f50
Minor improvements:
- added spaces and curly braces
- added more TODOs as there really more to be done
- removed redundant braces from "return" keyword (no function)
- merged 2 nested if() into one single

Signed-off-by: Roland Häder <roland@mxchange.org>
2018-06-20 22:02:15 +02:00
Michael 962fbc9166 Many "fetch_first" had been replaced 2018-06-19 21:33:07 +00:00
Michael ab5669e091 Some more direct SQL calls had been replaced 2018-06-19 19:06:17 +00:00
Hypolite Petovan 82d55f120f
Merge pull request #5238 from annando/more-abstraction
Even more replaced item calls ...
2018-06-19 14:02:43 -04:00
Michael e4adaa9900 Standards and variable renaming 2018-06-19 17:11:59 +00:00
rabuzarus 0a97a3f822 Bugfix: hide savedsearch butten and subthread button for non local_users 2018-06-19 18:27:54 +02:00
Michael a5ca724fd3 Merge remote-tracking branch 'upstream/develop' into more-abstraction 2018-06-19 13:48:19 +00:00
Michael 4714cb746b Use the item functions at many more places 2018-06-18 20:36:34 +00:00
Michael Vogel f828350ba2
Merge pull request #5234 from fabrixxm/fix/api
API: fix sender/recipient of PMs
2018-06-18 12:03:53 +02:00
fabrixxm e3ee9ee501 API: fix sender/recipient of PMs: check api_user before get user info.
To throw ForbiddenException and pass tests
2018-06-18 11:55:02 +02:00
Michael 507956818d Use the item classes where possible 2018-06-18 05:19:28 +00:00
fabrixxm c015bb1b77 API: fix sender/recipient of PMs 2018-06-17 19:57:32 +02:00
Michael 6e10de9284 New function to fetch item data especially for users 2018-06-17 17:05:17 +00:00
Michael 0280a46ab4 Use predefined field lists 2018-06-17 06:27:52 +00:00
Michael abef0cd46c Don't use the author-link anymore - just author-id 2018-06-16 15:35:30 +00:00
Michael 14cb128264 New function for generating item URI 2018-06-16 06:44:19 +00:00
Michael bb79b8f4ac More item calls have been replaced with the new functions 2018-06-15 22:30:49 +00:00
Hypolite Petovan 7469de29f1 Fix corrupt registration emails
- Use double quotes for line break-containing translation string
- Simplify HTML/plaintext email body conversion
2018-06-14 23:42:08 -04:00
Hypolite Petovan d46cac7905 Wrap content filter around entire post including attachments 2018-06-12 21:54:36 -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 5d9083c369 Bugfix in notifications / network and display are using the new functions now 2018-06-10 07:26:37 +00:00
Michael defd3d15b6 Possibly fixed test 2018-06-09 20:39:40 +00:00
Michael b6c344a80a $r was still in use 2018-06-09 20:08:15 +00:00
Michael 50dfc7d36e Small query corrections 2018-06-09 19:27:44 +00:00
Michael 446a45003d Added documentation, some indention fixes 2018-06-09 19:12:13 +00:00
Michael baf316e898 The central item fetch does work now and the API now uses these functions 2018-06-09 16:56:37 +00:00
Michael 4874e589f1 New class function to fetch items 2018-06-07 06:03:12 +00:00
Michael e632be763c Corrected variable 2018-06-05 05:44:04 +00:00
Michael 18a77a1b45 Removed some quick and dirty hack to upload pictures 2018-06-05 05:42:26 +00:00
Hypolite Petovan 0a13ab6b9f
Merge pull request #5166 from annando/unsed-item-fields
Remove unused, unneeded or redundant item fields
2018-06-03 12:19:50 -04:00
Hypolite Petovan 973ece09c5
Merge pull request #5157 from annando/daemon
Workers can now be started exclusively from the daemon and other workers
2018-06-03 12:18:47 -04:00
Michael 443d828ba7 We don't need to look for the uid 2018-06-03 10:29:42 +00:00
Michael 6985ad4fb5 Improved error message 2018-06-03 09:55:41 +00:00
Michael b654af28fa We need "global" 2018-06-03 09:40:32 +00:00
Michael ea498ff283 And a second SQL error fixed 2018-06-03 09:21:48 +00:00
Michael d76fb6d0b9 Fixed SQL error 2018-06-03 09:19:27 +00:00