Commit Graph

79 Commits

Author SHA1 Message Date
Adam Magness 063f0e9cb0 Rename escapeTags to escapeHtml
rename function and update calls.
2018-11-09 13:27:58 -05:00
Adam Magness 0e01568ccd escape_tags calls
implement escapeTags function
2018-11-08 10:20:03 -05:00
Adam Magness a0f65ca7a1 notags calls
implement removeTags function
2018-11-08 10:14:37 -05:00
Adam Magness 50da89d861 Logger Levels
update logger levels in calls
2018-10-30 09:58:45 -04:00
Adam Magness 14fde5dc9b Log function
implement log() function.
2018-10-30 09:57:14 -04:00
Hypolite Petovan e511790d62 Move NULL_DATE from boot.php to DBA::NULL_DATETIME
- Add DBA::NULL_DATE constant
2018-10-22 16:50:55 -04:00
Michael d307aa1484 For test purposes we can now deactivate polling 2018-10-18 02:46:02 +00:00
Michael 35a73b729f Onepoll hadn't polled anymore / small relocation in zrlinit for better logging 2018-10-16 13:17:01 +00:00
Michael efad4936b0 OStatus contacts are now automatically converted to AP 2018-10-13 18:13:01 +00:00
Philipp Holzer 7c73e8634c
Curl Response Refactoring
- refactored Network::post()
- replaced every Network::post() execution with the new Curl container
2018-10-10 21:15:26 +02:00
Philipp Holzer 2dec8895a9
Curl Response Refactoring
- extended Curl to parse Curl Response
- refactored Network::curl()
- replaced every Network::curl() execution with the new Curl container
2018-10-10 21:08:43 +02:00
Philipp Holzer 5a02e39a65
Rename App Methods
- renamed a lot of App methods to CamelCase
- replaced direct public variables with get-/set-Methods
2018-10-10 00:16:06 +02:00
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
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 37253656e3 Moved CONTACT_* constants to Friendica\Model\Contact class, lesser in global namespace (#5490)
* Rewrite:
- moved all CONTACT_* constants from boot.php to Contact class

* CR request:
- renamed Contact::CONTACT_IS_* -> Contact::* ;-)
2018-07-24 22:53:46 -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
Michael Vogel 7382be2766 Some more notices (#5424) 2018-07-20 14:07:54 -04:00
Hypolite Petovan af6dbc654f Rename Friendica\Database\dba to Friendica\Database\DBA 2018-07-20 08:19:26 -04:00
Michael 5c63de1692 Just some more fixed notice 2018-07-20 05:31:26 +00: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
Hypolite Petovan 820afa2284 Replace global $a with BaseObject::getApp() 2018-07-16 19:38:17 -04:00
Michael b3abe148a6 Remove comment 2018-06-27 20:11:09 +00:00
Michael 3918a31fc2 Remove unneeded logging 2018-06-27 20:08:02 +00:00
Michael 8c2f91573a Fix mail import 2018-06-27 18:09:13 +00:00
Michael 70af2cecf2 Some of the last direct SQL calls to the item table had been changed 2018-06-21 06:21:51 +00:00
Michael 321a36d4db Avoid SQL error with wrong formatted datetime value 2018-05-03 20:48:35 +00:00
Hypolite Petovan bd21fc3751 Import posts from ignored contacts 2018-04-27 21:08:19 -04:00
Michael d98c6819e7 $contact isn't called by reference anymore 2018-03-14 20:53:03 +00:00
Michael 7db0b850cb Avoid an error in OnePoll when the contact was "null". 2018-03-14 19:47:14 +00:00
Michael 82bd26edb9 The item class had been improved (e.g. database calls) 2018-02-21 21:08:37 +00:00
Hypolite Petovan d419d07f73 [Scrutinizer] Fix undeclared variables in src/ (except Protocol/)
- Use dba::selectFirst to remove intermediate variables `$r`
- Remove unused variable `$url_recipients` in Worker\Dellivery
2018-02-14 00:05:00 -05:00
Michael e609de2957 Many item calls are now isolated in a single function 2018-02-06 12:40:22 +00:00
Hypolite Petovan f020292408 Remove references to include/datetime 2018-02-03 20:47:37 -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 35d06bd9eb Add Temporal::utc() shorthand to Temporal::convert() 2018-02-03 08:56:53 -05:00
Hypolite Petovan 8aff8a76eb Add Temporal::utcNow() 2018-02-03 08:56:52 -05:00
Hypolite Petovan b854905150 Move ATOM_TIME to Temporal::ATOM 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
Michael 6871481a78 Moved "limitBodySize" 2018-01-28 17:36:37 +00: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 ca76e49c23 Move remaining functions
update remaining function calls
2018-01-27 08:25:54 -05:00
Adam Magness a32ba32ff4 Move post_url
move post_url function
2018-01-26 23:24:23 -05:00
Adam Magness 2f9642392d Move z_fetch_url
move z_fetch_url method
2018-01-26 23:18:38 -05:00
Michael 034d46196f "last-child" is not used anymore 2018-01-18 06:54:44 +00:00
Adam Magness 920a9b9b12 Remove requires
remove require_once statements
2018-01-15 20:16:14 -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
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