friendica_2021.01_tupambae_.../mod
Roland Häder 61693419e8 Cleanups: isResult() more used, readability improved (#5608)
* [diaspora]: Maybe SimpleXMLElement is the right type-hint?

* Changes proposed + pre-renaming:
- pre-renamed $db -> $connection
- added TODOs for not allowing bad method invocations (there is a
  BadMethodCallException in SPL)

* If no record is found, below $r[0] will fail with a E_NOTICE and the code
doesn't behave as expected.

* Ops, one more left ...

* Continued:
- added documentation for Contact::updateSslPolicy() method
- added type-hint for $contact of same method
- empty lines added + TODO where the bug origins that $item has no element 'body'

* Added empty lines for better readability

* Cleaned up:
- no more x() (deprecated) usage but empty() instead
- fixed mixing of space/tab indending
- merged else/if block goether in elseif() (lesser nested code blocks)

* Re-fixed DBM -> DBA switch

* Fixes/rewrites:
- use empty()/isset() instead of deprecated x()
- merged 2 nested if() blocks into one
- avoided nested if() block inside else block by rewriting it to elseif()
- $contact_id is an integer, let's test on > 0 here
- added a lot spaces and some empty lines for better readability

* Rewrite:
- moved all CONTACT_* constants from boot.php to Contact class

* CR request:
- renamed Contact::CONTACT_IS_* -> Contact::* ;-)

* Rewrites:
- moved PAGE_* to Friendica\Model\Profile class
- fixed mixure with "Contact::* rewrite"

* Ops, one still there (return is no function)

* 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)

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

* 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.

* Rewrite:
- stopped using deprecated NETWORK_* constants, now Protocol::* should be used
- still left them intact for slow/lazy developers ...

* Ops, was added accidentally ...

* Ops, why these wrong moves?

* Ops, one to much (thanks to MrPetovan)

* Ops, wrong moving ...

* moved back to original place ...

* spaces added

* empty lines add for better readability.

* convertered spaces -> tab for code indenting.

* CR request: Add space between if and brace.

* CR requests fixed + move reverted
- ops, src/Module/*.php has been moved to src/Network/ accidentally
- reverted some parts in src/Database/DBA.php as pointed out by Annando
- removed internal TODO items
- added some spaces for better readability
2018-08-24 01:05:49 -04:00
..
_well_known.php Continued: 2018-05-14 22:50:03 +02:00
acctlink.php Fix Scrutinizer issues in mod [_well_know -> contactgroup] 2018-01-04 19:42:48 -05:00
acl.php Stopped using deprecated constants NETWORK_* (#5537) 2018-08-11 22:40:44 +02:00
admin.php And still there are notices that have to be removed ... (#5629) 2018-08-18 08:20:50 +02:00
allfriends.php [WIP] Rewrite to Proxy class: (#5507) 2018-07-30 22:06:22 -04:00
amcd.php Fix Scrutinizer issues in mod [_well_know -> contactgroup] 2018-01-04 19:42:48 -05:00
api.php Rename dbesc to DBA::escape 2018-07-23 15:30:54 -04:00
apps.php Many t() calls 2018-01-22 18:03:26 -05:00
attach.php Rename dbesc to DBA::escape 2018-07-23 15:30:54 -04:00
babel.php Add Text\BBCode::toPlaintext to mod/babel 2018-04-21 18:48:10 -04:00
bookmarklet.php And again, and again, and again, ... some more notices removed (#5601) 2018-08-11 23:05:42 +02:00
cal.php Fix: Wrong array element / added logging for DFRN connects (#5609) 2018-08-14 03:15:39 +02:00
common.php [WIP] Rewrite to Proxy class: (#5507) 2018-07-30 22:06:22 -04:00
community.php You can now filter the community page by account types (#5649) 2018-08-21 17:39:49 +02:00
contactgroup.php Rename DBA::is_result to DBA::isResult 2018-07-23 11:04:14 -04:00
contacts.php Stopped using deprecated constants NETWORK_* (#5537) 2018-08-11 22:40:44 +02:00
credits.php Many t() calls 2018-01-22 18:03:26 -05:00
crepair.php Stopped using deprecated constants NETWORK_* (#5537) 2018-08-11 22:40:44 +02:00
delegate.php Stopped using deprecated constants NETWORK_* (#5537) 2018-08-11 22:40:44 +02:00
dfrn_confirm.php Cleanups: isResult() more used, readability improved (#5608) 2018-08-24 01:05:49 -04:00
dfrn_notify.php Fix for double $$ (#5641) 2018-08-20 07:54:26 +02:00
dfrn_poll.php Removed notices that revealed themselfes over night ... (#5645) 2018-08-21 17:35:09 +02:00
dfrn_request.php Stopped using deprecated constants NETWORK_* (#5537) 2018-08-11 22:40:44 +02:00
directory.php Notices again (#5543) 2018-08-02 07:21:01 +02:00
dirfind.php Stopped using deprecated constants NETWORK_* (#5537) 2018-08-11 22:40:44 +02:00
display.php The content generation for the display page is now using a centralized function (#5642) 2018-08-20 16:32:55 -04:00
editpost.php Fixes for E_NOTICE in editpost.php (#5480) 2018-07-24 07:47:25 -04:00
events.php Fix bug with ACL and contact network page 2018-08-15 00:43:27 +02:00
fbrowser.php Ad missing use statements after dbesc conversion 2018-07-23 18:44:05 -04:00
feedtest.php Rename Friendica\Database\dba to Friendica\Database\DBA 2018-07-20 08:19:26 -04:00
fetch.php Stopped using deprecated constants NETWORK_* (#5537) 2018-08-11 22:40:44 +02:00
filer.php Fixed E_NOTICE when no 'term' was provided (#5391) 2018-07-18 15:41:24 -04:00
filerm.php App::get_baseurl is now replaced with System::baseUrl 2017-08-26 07:32:10 +00:00
follow.php Removed notices that revealed themselfes over night ... (#5645) 2018-08-21 17:35:09 +02:00
friendica.php Post update script for setting the uri-id (#5573) 2018-08-06 18:40:41 +02:00
fsuggest.php Rename dbesc to DBA::escape 2018-07-23 15:30:54 -04:00
group.php Notices again (#5543) 2018-08-02 07:21:01 +02:00
hcard.php Moved global PAGE_* to Profile class (#5500) 2018-07-27 19:25:57 -04:00
help.php Replace global $lang with system.language 2018-07-16 19:38:17 -04:00
home.php Enforce systen.register_policy value type 2018-07-16 19:38:19 -04:00
hostxrd.php Use short form array syntax everywhere 2018-01-15 14:07:17 -05:00
hovercard.php [WIP] Rewrite to Proxy class: (#5507) 2018-07-30 22:06:22 -04:00
ignored.php Fixes the missing refresh after ignoring or unignoring a thread (#5614) 2018-08-15 09:27:11 +00:00
install.php Automatic Installation fix (#5565) 2018-08-20 16:15:39 -04:00
invite.php Ad missing use statements after dbesc conversion 2018-07-23 18:44:05 -04:00
item.php Use the Item class instead of DBA calls when possible 2018-08-15 04:41:49 +00:00
like.php Remove references to include/bbcode.php 2018-02-14 22:01:14 -05:00
localtime.php fix undeclared variables or wrong variable names (/mod) 2018-02-12 03:25:09 +01:00
lockview.php Item storage: Permissions aren't stored in the items anymore (#5495) 2018-07-25 19:14:55 -04:00
lostpass.php And still there are notices that have to be removed ... (#5629) 2018-08-18 08:20:50 +02:00
maintenance.php More t() 2018-01-22 18:03:26 -05:00
manage.php Yeah, and again notices ... (#5536) 2018-08-01 07:29:58 +02:00
manifest.php Use short form array syntax everywhere 2018-01-15 14:07:17 -05:00
match.php placeholder for a funny commit description for removing some more notices (#5631) 2018-08-19 01:52:21 +00:00
message.php [WIP] Rewrite to Proxy class: (#5507) 2018-07-30 22:06:22 -04:00
modexp.php Rename dbesc to DBA::escape 2018-07-23 15:30:54 -04:00
msearch.php Rename dbesc to DBA::escape 2018-07-23 15:30:54 -04:00
network.php Some easy to replace "q" calls have been replaced by "DBA" calls (#5632) 2018-08-19 12:46:10 +00:00
newmember.php Finish t() for mod 2018-01-22 18:03:26 -05:00
nodeinfo.php Posting to Facebook profiles is deprecated, so we don't show this anymore (#5534) 2018-07-31 18:38:02 +02:00
nogroup.php Rename DBM method calls to DBA method calls 2018-07-23 11:02:24 -04:00
noscrape.php Stopped using deprecated constants NETWORK_* (#5537) 2018-08-11 22:40:44 +02:00
notes.php The notes are now fetching their content from a central function 2018-08-21 07:35:22 +00:00
notice.php Rename DBA::is_result to DBA::isResult 2018-07-23 11:04:14 -04:00
notifications.php And still there are notices that have to be removed ... (#5629) 2018-08-18 08:20:50 +02:00
notify.php Rename DBA::is_result to DBA::isResult 2018-07-23 11:04:14 -04:00
oexchange.php New item field "Post-type" and new table "permissionset" (#5408) 2018-07-19 09:52:05 -04:00
openid.php Rename dbesc to DBA::escape 2018-07-23 15:30:54 -04:00
opensearch.php Use short form array syntax everywhere 2018-01-15 14:07:17 -05:00
ostatus_subscribe.php Stopped using deprecated constants NETWORK_* (#5537) 2018-08-11 22:40:44 +02:00
parse_url.php And some more notices removed ... (#5533) 2018-07-31 07:54:25 +02:00
photo.php Rename dbesc to DBA::escape 2018-07-23 15:30:54 -04:00
photos.php Cleanups: isResult() more used, readability improved (#5608) 2018-08-24 01:05:49 -04:00
phpinfo.php Add phpinfo page only accessible to admins 2018-02-03 01:26:28 -05:00
ping.php Notices again (#5543) 2018-08-02 07:21:01 +02:00
poco.php Stopped using deprecated constants NETWORK_* (#5537) 2018-08-11 22:40:44 +02:00
poke.php Rename DBA::is_result to DBA::isResult 2018-07-23 11:04:14 -04:00
pretheme.php Update Theme functions and calls 2018-01-20 07:48:22 -05:00
probe.php Some more removed notices 2018-08-10 19:39:43 +00:00
profile.php Improved profile page, improved "limit" handling (#5639) 2018-08-20 06:26:05 +02:00
profile_photo.php Rename dbesc to DBA::escape 2018-07-23 15:30:54 -04:00
profiles.php Moved global PAGE_* to Profile class (#5500) 2018-07-27 19:25:57 -04:00
profperm.php placeholder for a funny commit description for removing some more notices (#5631) 2018-08-19 01:52:21 +00:00
pubsub.php Stopped using deprecated constants NETWORK_* (#5537) 2018-08-11 22:40:44 +02:00
pubsubhubbub.php Rename DBA::is_result to DBA::isResult 2018-07-23 11:04:14 -04:00
randprof.php Use magicLink whenever possible 2018-06-02 08:05:06 +00:00
receive.php Rename DBA::is_result to DBA::isResult 2018-07-23 11:04:14 -04:00
redir.php fix redirection - don't dfrn auth when contact is still pending (#5648) 2018-08-21 23:58:09 -04:00
register.php Some more removed notices 2018-08-10 19:39:43 +00:00
regmod.php Some more removed notices 2018-08-10 19:39:43 +00:00
removeme.php And still there are notices that have to be removed ... (#5629) 2018-08-18 08:20:50 +02:00
repair_ostatus.php Cleanups: isResult() more used, readability improved (#5608) 2018-08-24 01:05:49 -04:00
robots_txt.php Use short form array syntax everywhere 2018-01-15 14:07:17 -05:00
rsd_xml.php App::get_baseurl is now replaced with System::baseUrl 2017-08-26 07:32:10 +00:00
salmon.php Cleanups: isResult() more used, readability improved (#5608) 2018-08-24 01:05:49 -04:00
search.php Rename dbesc to DBA::escape 2018-07-23 15:30:54 -04:00
settings.php Moved global PAGE_* to Profile class (#5500) 2018-07-27 19:25:57 -04:00
share.php Rename DBA::is_result to DBA::isResult 2018-07-23 11:04:14 -04:00
smilies.php Removed notices, will it ever end? 2018-08-17 03:19:42 +00:00
starred.php Rename DBA::is_result to DBA::isResult 2018-07-23 11:04:14 -04:00
statistics_json.php Facebook and App.net is removed from nearly all places (#5581) 2018-08-07 17:06:51 +02:00
subthread.php Some easy to replace "q" calls have been replaced by "DBA" calls (#5632) 2018-08-19 12:46:10 +00:00
suggest.php Cleanups: isResult() more used, readability improved (#5608) 2018-08-24 01:05:49 -04:00
tagger.php Rename dbesc to DBA::escape 2018-07-23 15:30:54 -04:00
tagrm.php Rename DBA::is_result to DBA::isResult 2018-07-23 11:04:14 -04:00
toggle_mobile.php App::get_baseurl is now replaced with System::baseUrl 2017-08-26 07:32:10 +00:00
uexport.php Rename DBA::is_result to DBA::isResult 2018-07-23 11:04:14 -04:00
uimport.php Enforce systen.register_policy value type 2018-07-16 19:38:19 -04:00
unfollow.php Stopped using deprecated constants NETWORK_* (#5537) 2018-08-11 22:40:44 +02:00
update_community.php fix scroll position in stream while ajax update 2018-06-16 13:05:33 +02:00
update_display.php fix scroll position in stream while ajax update 2018-06-16 13:05:33 +02:00
update_network.php Fix: Prevent threads from being collapsed in network view 2018-08-09 05:40:35 +00:00
update_notes.php fix scroll position in stream while ajax update 2018-06-16 13:05:33 +02:00
update_profile.php fix scroll position in stream while ajax update 2018-06-16 13:05:33 +02:00
videos.php Cleanups: isResult() more used, readability improved (#5608) 2018-08-24 01:05:49 -04:00
view.php Revert "Coding convention applied - part 1" 2017-03-21 12:02:59 -04:00
viewcontacts.php And still there are notices that have to be removed ... (#5629) 2018-08-18 08:20:50 +02:00
viewsrc.php Rename DBA::is_result to DBA::isResult 2018-07-23 11:04:14 -04:00
wall_attach.php Cleanups: isResult() more used, readability improved (#5608) 2018-08-24 01:05:49 -04:00
wall_upload.php Moved global PAGE_* to Profile class (#5500) 2018-07-27 19:25:57 -04:00
wallmessage.php Rename dbesc to DBA::escape 2018-07-23 15:30:54 -04:00
webfinger.php fix undeclared variables or wrong variable names (/mod) 2018-02-12 03:25:09 +01:00
worker.php Rename Friendica\Database\dba to Friendica\Database\DBA 2018-07-20 08:19:26 -04:00
xrd.php And still there are notices that have to be removed ... (#5629) 2018-08-18 08:20:50 +02:00