Commit Graph

20424 Commits

Author SHA1 Message Date
hoergen b7b6194297 removing vertical spaces under the notification button (#5555)
[frio] Removing vertical spaces under the notification button
2018-08-04 21:45:30 +02:00
Michael Vogel df0c3c0562
Merge pull request #5552 from MrPetovan/bug/5405-prevent-database-erasure-during-test
Skip DB tests if MYSQL_* environment variables are missing
2018-08-04 21:43:12 +02:00
Hypolite Petovan 5f48b98505 Skip DB tests if MYSQL_* environment variables are missing 2018-08-04 16:35:31 +02:00
Michael Vogel 810c108297 Fix: Notes can be posted again. Never use "defaults" with "false" (#5551) 2018-08-04 16:06:36 +02:00
Michael Vogel 00fbddcfb8
Merge pull request #5549 from MrPetovan/task/move-db-structure-to-config
Move DB structure to /config
2018-08-04 14:13:14 +02:00
Hypolite Petovan 6a6695b167 Change DBStructure::definition to use config/dbstructure.json 2018-08-04 13:24:04 +02:00
Hypolite Petovan eb33b721ad Created new config/dbstructure.json file 2018-08-04 13:23:39 +02:00
Michael Vogel 2c8c803d64 Avid notices and warnings (#5546) 2018-08-02 19:07:20 +02:00
Michael Vogel 65d752d03c Notices what else? (#5545)
* Poco isn't filled, so we cannot store it

* We should initialize our variables
2018-08-02 16:11:21 +02:00
Michael Vogel c72c64a6d8 Notices again (#5543)
* And again notices

* Notices in the directory

* Much more places

* Fix some double $

* Notice in ping

* Missing field

* Fix: We now remove deleted users from the directory

* Some more stuff

* Notices when removing users

* Added logging

* More logging

* Two more
2018-08-02 07:21:01 +02:00
Michael Vogel c960a97682
Merge pull request #5542 from tobiasd/20180801-lng
CS, PL translation updates
2018-08-01 18:17:30 +02:00
Tobias Diekershoff 227070dfa2 update PL translations THX waldis 2018-08-01 16:23:17 +02:00
Tobias Diekershoff ad8e7794d8 CS translation update THX Aditoo 2018-08-01 16:23:09 +02:00
Hypolite Petovan 4d17fb36d1 Fix missing fields in event reminder (#5540) 2018-08-01 09:27:13 +02:00
Michael Vogel 1afc0ab028 Added logging and one more reason for a notice found (#5538)
* Added logging and one more reason for a notice found

* And one more
2018-08-01 08:47:18 +02:00
Michael Vogel 9d0f18c0b3 Yeah, and again notices ... (#5536)
* Yeah, and again notices ...

* And some more

* Block access without given user name

* Reformatting
2018-08-01 07:29:58 +02:00
Michael Vogel 71b1638d9a Once again, notices ... (#5535) 2018-07-31 18:39:23 +02:00
Michael Vogel 4bd7daa205 Posting to Facebook profiles is deprecated, so we don't show this anymore (#5534) 2018-07-31 18:38:02 +02:00
Michael Vogel b552b711ee And some more notices removed ... (#5533)
* Fix for vanishing notes

* The field needs to be part of the selected fields ...

* And some more notes ...
2018-07-31 07:54:25 +02:00
Roland Häder 2c0ad47dfc Fixed fatal error: (#5532)
* Fixed fatal error:
````
PHP Fatal error:  Uncaught TypeError: Argument 1 passed to add_page_info_data()
must be of the type array, boolean given, called in
/var/www/../include/items.php on line 153 and defined in
/var/www/../include/items.php:27
````

Fix for type-hint array when query_page_info() returned a non-array, this may
happen when the instance/node/pod owner decided to shutdown server and replace
all URLs with a replacement message.

* Fixed parser error, ops.
2018-07-30 22:24:32 -04:00
Michael Vogel c39e0dcf2a Fix for vanishing notes (#5531)
* Fix for vanishing notes

* The field needs to be part of the selected fields ...
2018-07-30 22:23:48 -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
Roland Häder bf87ad4fcf Fixed E_NOTICE in listing worker queue and new utilities class added (#5521)
* Fixes for E_NOTICE in workqueue:
- introduced class `Friendica\Util\Arrays` which will hold static methods for
  handling arrays that cannot be done with PHP's functions, like implode() on
  multi-dimensional arrays
- rewrote old-school for() loop to foreach()

* Added intial unit test with some tests on empty delimiters and/or sinle and
multi-dim array.

* Added test for for 3-dimensional arrays, thanks to  nupplaphil's feedback.
2018-07-30 21:24:26 -04:00
Roland Häder 3da1b9f319 Cleaned up include/items.php (#5523)
* Cleaned up include/items.php
- added type-hint for array where suitable
- moved opening curly brace to new line after function
- used BaseObject::getApp() instead of get_app()
- used empty() instead of is_array(), maybe avoids E_NOTICE

* Changed 'AS' to 'as', keywords in PHP are all lower-case.
2018-07-30 21:02:34 -04:00
Michael Vogel 55c10a3fc9
Merge pull request #5530 from tobiasd/20180730-adminblocked
enhance block users in admin panel
2018-07-30 20:03:00 +02:00
Michael Vogel 2b729366f2
Merge pull request #5529 from tobiasd/20180730-missingbutton
Missing submit button in admin panel
2018-07-30 20:02:17 +02:00
Tobias Diekershoff c63ad5afee vier theme was missing an icon for the block button 2018-07-30 17:32:35 +02:00
Tobias Diekershoff 0257f410d5 mention if a user is blocked in the admin panel user overview 2018-07-30 17:19:22 +02:00
Tobias Diekershoff 543898f363 Missing submit button in admin panel 2018-07-30 16:27:52 +02:00
Michael Vogel be7a2beab0
Merge pull request #5528 from tobiasd/20180730-lng
CS and DE translation updates
2018-07-30 11:43:03 +02:00
Tobias Diekershoff 14e46a1d01 DE translation update THX copis 2018-07-30 10:42:16 +02:00
Tobias Diekershoff 19c7e67efa CS translation update THX Aditoo 2018-07-30 10:16:34 +02:00
Michael Vogel 1eb8f04274 Fixing SQL error when receiving DFRN posts (#5527)
* Some more notices

* Fixed nasty to find notice in DFRN and OStatus

* And more notices ...

* Yeah, some removed notices ... again ...

* Fixing bad SQL query
2018-07-30 07:06:32 +02:00
Michael Vogel a2cea16954 Some more notices (#5526)
* Some more notices

* Fixed nasty to find notice in DFRN and OStatus

* And more notices ...

* Yeah, some removed notices ... again ...
2018-07-30 06:41:20 +02:00
Tobias Diekershoff 6d39cecc5d
Merge pull request #5525 from annando/issue-5486
Issue 5486: Fix for non translated notifications
2018-07-30 06:33:23 +02:00
Michael Vogel a82cd6313d
Merge pull request #5522 from Quix0r/fixes/portable-contact-empty-body
Fixed fatal error about when returned 'body' field is empty
2018-07-30 04:40:25 +02:00
Michael d244290d1f Issue 5486: Fix for non translated notifications 2018-07-30 01:01:26 +00:00
Roland Häder 650c3c18e1
Fixed fatal error about when returned 'body' field is empty:
````
PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Friendica\Protocol\PortableContact::discoverServer() must be of the type array, null given, called in /var/www/../src/Protocol/PortableContact.php on line 1664 and defined in /var/www/../src/Protocol/PortableContact.php:1765
Stack trace:
````
2018-07-29 17:34:20 +02:00
Tobias Diekershoff 02d4b1098e
Merge pull request #5519 from annando/test-2
Moved expiring of item content
2018-07-29 11:45:50 +02:00
Tobias Diekershoff 63131189fc
Merge pull request #5520 from annando/notices
Some more notices removed
2018-07-29 08:20:11 +02:00
Michael dc30daf3a2 And another notice removed 2018-07-29 06:08:02 +00:00
Michael 6add589c3f Removed some test logging 2018-07-29 04:38:14 +00:00
Michael bc38420801 Some more notices removed 2018-07-29 04:04:23 +00:00
Michael dc9b10fb09 Moved expiring of item content 2018-07-29 03:54:34 +00:00
Michael Vogel 489d3daa94 Trying to clean up a little bit more (#5517)
* "post-type" replaces "bookmark" and "type"

* The permission set is now removed upon expiry

* Post update now stores the permission set

* We don't store the permissions in the item table anymore

* Postupdate now handles "postopts" as well

* "post-type" replaces "bookmark" and "type"

* "post-type" replaces "bookmark" and "type"

* "post-type" replaces "bookmark" and "type"

* The permission set is now removed upon expiry

* The permission set is now removed upon expiry

* We don't store the permissions in the item table anymore

* Postupdate now handles "postopts" as well

* Multiplicated update functions

* And some more duplicated functions ...

* Removed duplicate functions
2018-07-28 16:04:56 -04:00
Michael Vogel 91db91d315 Fix for post update (#5513)
* "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

* The permission set is now used for item permissions

* Check for allow_cid, ... is superfluous. Checking for "private" is enough

* We query the permissionset

* Permissions are displayed correctly

* Changed index

* We don't store the permissions in the item table anymore

* Permission fields are now deprecated

* Reversed ...

* Postupdate now handles "postopts" as well

* Set deprecated fields to "null" if empty

* Postupdates are enabled again

* Fix for post update
2018-07-28 13:12:35 -04:00
Michael Vogel 36d4516e7a Missing stuff in "develop"? (#5516)
* "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

* The permission set is now used for item permissions

* Check for allow_cid, ... is superfluous. Checking for "private" is enough

* We query the permissionset

* Permissions are displayed correctly

* Changed index

* We don't store the permissions in the item table anymore

* Permission fields are now deprecated

* Reversed ...

* Postupdate now handles "postopts" as well

* Set deprecated fields to "null" if empty

* Postupdates are enabled again

* "post-type" replaces "bookmark" and "type"

* The permission set is now stored

* The permission set is now removed upon expiry

* Postupdate now handles "postopts" as well
2018-07-28 13:11:46 -04:00
Hypolite Petovan 0902ea508d
Fix parse error in Protocol\PortableContact (#5515) 2018-07-28 08:52:57 -04:00
Roland Häder c30ac30f29 Possible fix for #5470 - json_decode() (#5511)
* Possible fix for #5470:
- $data is not an object like stdClass but an array
- newer PHP versions doesn't allow cross-access like following:

  $object['foo'] = 123;
  $array->foo = 123;

- added type-hints for private methods for above cases
- used `if (empty($foo)) instead of just `if ($foo)` preventing some nasty
  E_NOTICE
- added some empty lines for better readability

* Rewrite:
- mixture of object/array was here, causing under newer PHP versions some E_NOTICE
- this has been now finally fixed by converting any `object` type to an
  associative `array`
- also changed `is_object()` to `is_array()`
2018-07-28 01:35:27 -04:00
Roland Häder 4a22710b3b Moved global PAGE_* to Profile class (#5500)
* Rewrites:
- moved PAGE_* to Friendica\Model\Profile class

* Fixed more rewrites from plain (global namespace) PAGE_* to Friendica\Models\Profile class

* CR request:
- moved all PAGE_* constants to Friendica\Model\Contact class
- fixed all references of both classes

* CR request:
- moved ACCOUNT_TYPE_* constants from boot.php to Contact::ACCOUNT_TYPE_*

* Just copy-pasted this code from boot.php, needs to be changed to `const ACCOUNT_TYPE_FOO = x;`

* Ops, melting brain cells here ... :-/
2018-07-27 19:25:57 -04:00