Commit graph

84 commits

Author SHA1 Message Date
Michael
346714eb88 Unneded class removed 2021-04-16 14:30:08 +00:00
Michael
676f62c012 Returning the correct data in oembed with photos 2021-04-16 05:33:52 +00:00
Michael
5a00902e11 Avoid HTML parsing of an empty body 2021-04-10 05:46:19 +00:00
Balázs Úr
054c301ef0 Update copyright 2021-03-29 08:40:20 +02:00
Michael
08771d96c2 Remove unused parameter 2021-03-16 07:15:20 +00:00
Michael
d498d15200 Avoid double fetches 2021-03-16 07:04:16 +00:00
Michael
0a3d50a270 Adjusted field names 2021-03-16 06:37:43 +00:00
Michael
70bf75c342 Support for page JSON-LD based page information 2021-03-15 22:02:21 +00:00
Michael
1792046a4f post/thread views are renamed, search bugs fixed 2021-02-22 19:47:08 +00:00
Hypolite Petovan
4a57ed1a31 Move HTTPS exception for YouTube and Vimeo to OEmbed::fetchUrl
- Both Youtube and Vimeo output OEmbed endpoint URL with HTTP but their OEmbed endpoint is only accessible by HTTPS ¯\_(ツ)_/¯
2021-02-09 23:25:18 -05:00
Hypolite Petovan
0927bb5f2c Harden OEmbed link discovery
- Check OEmbed call return code before storing response
- Stop at first successful OEmbed response
2021-02-09 23:25:18 -05:00
Michael
303aaa00ca Mode switch for insert 2020-11-19 19:34:48 +00:00
Philipp
a6fc9cd32e
Remove $binary flag for HTTPRequest::get(), HTTPRequest::fetch(), HTTPRequest::fetchAll() (deprecated since PHP 5.1.3) 2020-10-18 20:56:31 +02:00
nupplaPhil
657d08f09f Rename "fetchUrl" and "fetchUrlFull" to "fetch" and "fetchFull" 2020-07-21 03:15:53 -04:00
nupplaPhil
1aa07f87a4 Make "HTTPRequest::fetchUrl" dynamic 2020-07-21 03:04:58 -04:00
nupplaPhil
5344efef71 Move post/curl/fetchUrl/fetchUrlFull to own class "Network\HTTPRequest" 2020-07-21 02:56:10 -04:00
nupplaPhil
23c64b9a11
Add license info at Friendica classes 2020-02-09 15:45:36 +01:00
nupplaPhil
ed9392469e
Remove unneeded Config namespace usages 2020-01-19 22:50:44 +01:00
nupplaPhil
6c36fd9e01
Move Config::get() to DI::config()->get() 2020-01-19 21:21:13 +01:00
nupplaPhil
d6efc90194
cleanup namespace usages for L10n 2020-01-19 16:31:33 +01:00
nupplaPhil
5dfee31108
Move L10n::t() calls to DI::l10n()->t() calls 2020-01-19 16:31:16 +01:00
Michael
0a4119adaf @brief is removed completely 2020-01-19 06:05:23 +00:00
nupplaPhil
424c87195b
CleanUp Cache namespace
- Introduce enum "Duration"
- Introduce enum "Type"
- Move "Cache\Cache" to "BaseCache"
2020-01-18 15:41:19 +01:00
nupplaPhil
a38b0f7eaf
Move remaining namespaces and delete Core\Cache.php 2020-01-07 00:51:02 +01:00
nupplaPhil
fe078410a1
Move Cache::get() to DI::cache()->get() 2020-01-07 00:45:49 +01:00
nupplaPhil
f68929633b
Move Cache::set() to DI::cache()->set() 2020-01-07 00:41:20 +01:00
nupplaPhil
f0eea6f875
Remove get_app() in favor of DI::app() 2020-01-04 23:42:01 +01:00
nupplaPhil
3f34229752
Move redundant System::baseUrl() to DI::baseUrl() calls 2019-12-30 23:00:08 +01:00
Philipp Holzer
cc7444d84d
Move internal recursion-counter to the end of all cur/fetchUrl parameters 2019-06-10 14:34:54 +02:00
Hypolite Petovan
9774c95b80 Remove duplicate $baseurl template variable
- Remove unused $overwriteURL parameter in Renderer::replaceMacros
2019-05-02 09:55:48 -04:00
Michael
0fdab4ed10 Fix for several fatal errors 2019-01-23 21:54:20 +00:00
Hypolite Petovan
df706484cd User DOMDocument object call instead of static in Content\OEmbed 2019-01-23 09:07:00 -05:00
Hypolite Petovan
4a95ca280d Remove unused code
- Remove commented code
- Remove unused/immediately overwritten variables
- Remove extraneous parameters
- Remove unreachable code
- Remove duplicate array keys
2019-01-21 10:48:40 -05:00
Hypolite Petovan
3282ce5389 Fix PHPDoc comments project-wide 2019-01-21 10:35:51 -05:00
Hypolite Petovan
55e54bb950 Replace deprecated Addon::callHooks with Hook::callAll
- Update documentation
2019-01-21 09:50:56 -05:00
Hypolite Petovan
5e1ceb57de Escape global namespaced get_app() calls
- Add deprecated status
2019-01-03 21:27:36 -05:00
Hypolite Petovan
acaee626f5 Remove include/ requires that are now done directly from Composer 2018-12-24 09:56:25 -05:00
Hypolite Petovan
458981f75c Replace x() by isset(), !empty() or defaults()
- Remove extraneous parentheses around empty() calls
- Remove duplicate calls to intval(), count() or strlen() after empty()
- Replace ternary operators outputting binary value with empty() return value
- Rewrite defaults() without x()
2018-11-30 09:06:22 -05:00
Michael
aa1882fd99 Sanitize the OEmbed data before processing it 2018-11-21 07:07:24 +00:00
Adam Magness
ffc406d819 normalise_link calls
implement normaliseLink function
2018-11-08 11:28:29 -05:00
Adam Magness
6fc9c6de3b base64url calls
implement base64UrlEncode and base64UrlDecode functions
2018-11-08 10:37:08 -05:00
Adam Magness
35abc4bb64 get markup template
implement getMarkupTemplate function
2018-10-31 10:44:06 -04:00
Adam Magness
91facd2d0a replace macros
implement new replaceMacros function
2018-10-31 10:35:50 -04:00
Philipp Holzer
4392858662
Move Global Functions - Part 3
- Replaced every CACHE definition
- Moved check_url to App->checkURL()
- Removed unused definition "ZCURL_TIMEOUT"
2018-10-20 18:19:55 +02:00
Hypolite Petovan
9d0a6f90b6 Update "mrpetovan" email address
- Fix Tobias' email address
- Fix copypasted doc block in Console/PostUpdate
2018-09-15 19:28:38 -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
Michael
bc38420801 Some more notices removed 2018-07-29 04:04:23 +00:00
Hypolite Petovan
6771522167 Reduce cache time for OEmbed error 2018-07-24 11:05:09 -04:00
Hypolite Petovan
df917251ff Fix undefined oembed properties
- Add Object\OEmbed class
2018-07-24 07:56:27 -04:00
Hypolite Petovan
ecea7425f8 Rename DBA::is_result to DBA::isResult 2018-07-23 11:04:14 -04:00