Commit graph

56 commits

Author SHA1 Message Date
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
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
fd8897851f Fixes for OEmbed class (#5392)
* Fixes:
- stdClass is clearly an object of `\stdClass`, so let's import it and set it
  as type-hint here
- if $o->type is not found, don't continue

Signed-off-by: Roland Häder <roland@mxchange.org>

* Fix for a fix due to 02:51 a.m. (!) edits ...

Signed-off-by: Roland Häder <roland@mxchange.org>
2018-07-17 16:28:20 -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
Hypolite Petovan
5e7285b9ba Move Temporal::convert() to DateTimeFormat::convert() 2018-02-03 08:56:55 -05:00
Hypolite Petovan
8aff8a76eb Add Temporal::utcNow() 2018-02-03 08:56:52 -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
Adam Magness
f04d40a37e Review update
Rename function, move others
2018-01-27 11:13:41 -05:00
Adam Magness
1eb7c19c1e Move multiple functions
move multiple smaller functions
2018-01-26 23:51:41 -05:00
Adam Magness
c67452f72e Move fetch_url
move fetch_url function
2018-01-26 23:09:48 -05:00
Adam Magness
07d306aa37 Finish t() for src
Update t() calls in src folder
2018-01-22 18:03:26 -05:00
Adam Magness
11cf36105c Update Addon functions and calls
Update function names and calls for Addon class.
2018-01-20 07:48:22 -05:00
Hypolite Petovan
e36f2bb1fb Use short form array syntax everywhere
- Add short form array syntax to po2php.php generation
2018-01-15 14:07:17 -05:00
Michael Vogel
70942202c0
Merge pull request #4216 from MrPetovan/bug/4173-fix-oembed-iframe-url
Fix link attachment display
2018-01-13 00:45:32 +01:00
Michael
2c90c5be94 Better treatment of Oembed detection with no OEmbed data and not title 2018-01-12 23:32:58 +00:00
Hypolite Petovan
77c1251d03 Fallback to regular attachment display on oembed error 2018-01-11 22:34:02 -05:00
Michael
c0eecfc55f Unbalanced html fixed 2018-01-11 22:34:56 +00:00
Michael
e18e081b47 bookmark elements weren't always parsed correctly 2018-01-11 22:28:46 +00:00
Michael
a7b2db5db9 When no OEmbedding is wanted, the links are now created fine again 2018-01-11 21:31:44 +00:00
Hypolite Petovan
5fc4927764 Improve dba::selectFirst calls
- Fix remaining $r[0] references
- Rename $r to meaningful names
2018-01-11 03:43:57 -05:00
Hypolite Petovan
da9523ed23 Add maxwidth column to oembed table
- Match Caching key for OEmbed queries
2018-01-10 19:25:08 -05:00
Hypolite Petovan
ae66bcaff3 Rename selectOne to selectFirst 2018-01-10 12:57:21 -05:00
Hypolite Petovan
da60893590 Replace dba::select(limit => 1) by dba::selectOne
- Convert array declarations to new style
2018-01-10 12:57:21 -05:00
Hypolite Petovan
4a20bcd6f0 Fix allowed_email()
- Reworked allowed_domain
- Added more variable checks to allowed_email() and
OEmbed::isAllowedURL()
2018-01-07 19:10:09 -05:00
Hypolite Petovan
d8a312d286 Move tryoembed to Content\OEmbed
- Add bbcode functions documentation
- Add Exception handling to OEmbed::getHTML
- Fix formatting
2018-01-07 00:44:23 -05:00
Hypolite Petovan
1cd8001833 Fall back to normal twitter share if rich OEmbed is disabled
- Fix typo
2018-01-06 21:57:58 -05:00
Hypolite Petovan
9593cac2d1 Replace hacky oembed local iframe with remote iframe html
- Remove call to OEmbed::iframe
- Replace oembed span by div
- Replace double quotes with single
2018-01-06 00:35:43 -05:00