]> git.mxchange.org Git - friendica.git/commit
[WIP] Rewrite to Proxy class: (#5507)
authorRoland Häder <Quix0r@users.noreply.github.com>
Tue, 31 Jul 2018 02:06:22 +0000 (04:06 +0200)
committerHypolite Petovan <mrpetovan@eml.cc>
Tue, 31 Jul 2018 02:06:22 +0000 (22:06 -0400)
commit4d39164c1ee6de2b1a09c2a1a8a4c89531d47ee5
treeaea1d69bbeb3d51f82a8ed08a12dfec4372dc2b2
parentbf87ad4fcfcb6fd653441ed0fe6a8e99c27a9a3e
[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.
30 files changed:
include/api.php
include/conversation.php
include/dba.php
include/text.php
mod/acl.php
mod/allfriends.php
mod/common.php
mod/contacts.php
mod/directory.php
mod/dirfind.php
mod/follow.php
mod/hovercard.php
mod/match.php
mod/message.php
mod/network.php
mod/ping.php
mod/proxy.php [deleted file]
mod/suggest.php
mod/viewcontacts.php
src/Content/ForumManager.php
src/Content/OEmbed.php
src/Content/Text/BBCode.php
src/Core/NotificationsManager.php
src/Model/Profile.php
src/Module/Proxy.php [new file with mode: 0644]
src/Object/Post.php
src/Protocol/OStatus.php
src/Util/Proxy.php [new file with mode: 0644]
src/Worker/CronJobs.php
view/theme/vier/theme.php