Commit graph

858 commits

Author SHA1 Message Date
Jonny Tischbein d18421f760 Return to item if not owned by user or canceld 2018-10-09 20:40:25 +02:00
Jonny Tischbein d8780b1640 Replace goaway location SESSION var return_url with page as string value 2018-10-09 20:10:34 +02:00
Michael 38fd21019b Invalid pictures could lead to notices, this is removed now 2018-08-31 07:48:44 +00:00
Michael 82d097879b Oh no ... there are still some notices that want to be removed ... 2018-08-24 11:09:58 +00:00
Michael Vogel 54aee2aaa7 Removed notices that revealed themselfes over night ... (#5645)
* Removed notices that revealed themselfes over night ...

* And more notices removed that occured over night

* One more ..

* Some more notices of the day ...
2018-08-21 17:35:09 +02:00
Michael Vogel c1da44b7dc We now use a central function to fetch the importer (#5636) 2018-08-19 13:37:56 +00:00
Michael Vogel 7f3fb34c24 Some easy to replace "q" calls have been replaced by "DBA" calls (#5632)
* Some easy to replace "q" calls have been replaced by "DBA" calls

* Simplified the GUID creation

* And one in the API ...

* And OStatus has got some DBA calls more

* Just some more replaced database calls

* The event query is now simplified

* Events are now shown again

* subthread is now using the DBA calls as well

* Some more replaced database calls

* And some more replaced database calls and prevented notices

* Better use gravity

* Some more replaced database stuff

* Some more replaced database calls in DFRN.php

* The gcontact class now has got the new DBA functions as well

* The Contact class is now changed to new database functions as well

* Small correction

* We can now delete without cascade

* One more functionality is safe for future changes
2018-08-19 12:46:10 +00:00
Roland Häder e06fc2aa69 Stopped using deprecated constants NETWORK_* (#5537)
* Rewrite:
- stopped using deprecated NETWORK_* constants, now Protocol::* should be used
- still left them intact for slow/lazy developers ...

* Removed deprecated NETWORK_* constants as per code reviewer's request.
2018-08-11 22:40:44 +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
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
Hypolite Petovan a6fb3568f9 Rename dbesc to DBA::escape 2018-07-23 15:30:54 -04:00
Hypolite Petovan ecea7425f8 Rename DBA::is_result to DBA::isResult 2018-07-23 11:04:14 -04:00
Hypolite Petovan 0ec44f3e8a Rename DBM method calls to DBA method calls 2018-07-23 11:02:24 -04:00
Hypolite Petovan af6dbc654f Rename Friendica\Database\dba to Friendica\Database\DBA 2018-07-20 08:19:26 -04:00
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
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
Michael 4714cb746b Use the item functions at many more places 2018-06-18 20:36:34 +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 8329705eba New function to delete items for users 2018-05-29 05:22:57 +00:00
Michael 54136f3a74 Added the new parameter to the delete function. 2018-05-26 21:38:45 +00:00
Alexandre Alapetite e7d2d27938 sizeof bug
sizeof cannot be used to test existance.

Fixes: Got error 'PHP message: PHP Warning:  sizeof(): Parameter must be
an array or an object that implements Countable in
/.../include/items.php on line 66\n':  1 Time(s)

PHP 7.2.5 / Ubuntu 17.04 LTS
2018-05-17 07:37:50 +02:00
Roland Häder 337824f649
Continued:
- added curly braces/spaces
- added TODOs (type-hints, old-lost code)
- more usage of dbm::is_result()
- combined some if() return stuff into a simple return statement

Signed-off-by: Roland Haeder <roland@mxchange.org>
2018-05-14 22:49:58 +02:00
Hypolite Petovan 65b0159282
Merge pull request #4593 from annando/fix-ostatus
OStatus: Fixed communication issues with deleted contacts
2018-03-14 18:46:21 -04:00
Michael d98c6819e7 $contact isn't called by reference anymore 2018-03-14 20:53:03 +00:00
Michael 32ee4ca4b1 OStatus: Fixed communication issues with deleted contacts 2018-03-13 06:21:44 +00:00
Hypolite Petovan e2d8c80f33
Revert "Fix PHP Warning: preg_replace(): Compilation failed in include/items" 2018-02-16 11:12:41 -05:00
Hypolite Petovan 31831b9fdb Remove partial preg_quote in include/items 2018-02-16 00:31:32 -05:00
Hypolite Petovan f4d76d10b2 Fix PHP Warning: preg_replace(): Compilation failed in include/items 2018-02-15 22:13:45 -05:00
Hypolite Petovan 9e3bae5caa Remove references to include/bbcode.php 2018-02-14 22:01:14 -05:00
rabuzarus 5fe7a21482 add $no_photos parameter to add_page_info_data() 2018-02-12 03:56:20 +01:00
Michael e609de2957 Many item calls are now isolated in a single function 2018-02-06 12:40:22 +00:00
Adam Magness 4be49e706b Remove requires
remove require_once for old file
2018-02-05 12:47:37 -05:00
Michael Vogel fa95911fdb
Merge pull request #4393 from MrPetovan/task/3878-move-include-tags-to-src
Move include/tags to src/
2018-02-05 18:11:29 +01:00
Hypolite Petovan 2a486903d1 Remove references to include/tags.php 2018-02-03 23:59:31 -05:00
Hypolite Petovan cea80c78e4 Replace remaining functions in include/datetime by Temporal methods
- Fix uses statements
2018-02-03 20:47:37 -05:00
Hypolite Petovan 5e7285b9ba Move Temporal::convert() to DateTimeFormat::convert() 2018-02-03 08:56:55 -05:00
Hypolite Petovan a2ee2b56d2 Add Temporal::localNow() shorthand for Temporal::convert() 2018-02-03 08:56:53 -05:00
Hypolite Petovan 89602e44da Add Temporal::timezoneNow() shorthand for Temporal::convert() 2018-02-03 08:56:53 -05:00
Hypolite Petovan 35d06bd9eb Add Temporal::utc() shorthand to Temporal::convert() 2018-02-03 08:56:53 -05:00
Hypolite Petovan dc366bf1f7 Refactor datetime_convert into Temporal::convert
- Changed parameter order to save space
- Refactor select_timezone into Temporal::getTimezoneSelect
- Refactor field_timezone into Temporal::getTimezoneField
2018-02-03 08:56:51 -05:00
Michael 7b27dda784 Most functions now moved from include/items.php 2018-01-28 11:18:08 +00:00
Adam Magness f04d40a37e Review update
Rename function, move others
2018-01-27 11:13:41 -05:00
Adam Magness a32ba32ff4 Move post_url
move post_url function
2018-01-26 23:24:23 -05:00
Adam Magness 11c7441e94 Remove requires
remove require_once statements
2018-01-26 19:15:57 -05:00
Michael 3ace5d0d1d Some functions had been moved away from include/items.php 2018-01-24 20:27:32 +00:00
Adam Magness d49f986d1e Many t() calls
modify many t() calls.
2018-01-22 18:03:26 -05:00
Michael 004f46e600 Standards 2018-01-21 00:18:31 +00:00
Michael efa8dbcfb3 Relocate functions in items.php into several classes 2018-01-20 23:52:54 +00:00
Adam Magness b86b04a81a Change plugin to addon
change the use of plugin to addon where appropriate.
2018-01-20 07:48:22 -05:00