Commit grafiek

80 Commits

Auteur SHA1 Bericht Datum
Philipp Holzer 800694e9b3
Remove unused `use` statements & remove PConfig class 2020-01-18 17:02:59 +01:00
Philipp Holzer 9e9429b56d
Move PConfig::get() to DI::pConfig()->get() 2020-01-18 16:50:57 +01:00
Philipp Holzer 7343ee5108
Move Namespace of ActivityNamespace 2019-10-25 00:41:48 +02:00
Philipp Holzer dc2858938d
Renamed to ActivityNamespace 2019-10-25 00:32:35 +02:00
Philipp Holzer 2fba7ed477
Rename namespace 2019-10-24 21:40:13 +02:00
Philipp Holzer 07cea24430
Move Activity/Namespaces defines to constants 2019-10-24 21:40:12 +02:00
Michael b4c673a620 We now use a central function for fetching the postdata 2019-07-30 22:26:01 +00:00
Hypolite Petovan 41f781c52a Replace System::httpExit() by HTTPException throwing 2019-05-02 11:37:09 -04:00
Hypolite Petovan 0cc1a07cfa Fix default value of contact parameter of OStatus::import in mod/salmon 2019-01-22 08:53:53 -05:00
Hypolite Petovan dbc6eb5422 Remove unused code in mod/
- Remove commented code
- Remove unused/immediately overwritten variables
- Remove extraneous parameters
- Remove unreachable code
2019-01-21 10:53:32 -05:00
Hypolite Petovan acaee626f5 Remove include/ requires that are now done directly from Composer 2018-12-24 09:56:25 -05:00
Adam Magness 218f0734be Rename removeTags to escapeTags
rename function and update calls.
2018-11-09 13:29:42 -05: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 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
Michael 8b96a53fba Burn notices, burn 2018-09-11 04:10:11 +00: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 a6fb3568f9 Rename dbesc to DBA::escape 2018-07-23 15:30:54 -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 9d83369d88 DFRN payload is receivable via the Diaspora transport layer 2018-03-23 05:08:47 +00:00
Michael 24a20fc294 Improved logging for salmon posts to check for missing contacts in item post 2018-02-22 09:57:06 +00:00
Hypolite Petovan 7a38fbf84b [Scrutinizer] Fix undeclared variables part 7: mod/ and view/
- Remove unused function `salmon_return()`
2018-02-14 00:07:26 -05:00
Adam Magness 9b8599b619 Move functions to system
move some functions to system
2018-01-27 11:59:10 -05:00
Adam Magness cd3643d174 Move xml_status and http_status_exit
move functions
2018-01-26 23:37:55 -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
Adam Magness 5358f5742e Rename create
rename create function to createFromProbe and update calls.
2018-01-09 11:40:25 -05:00
Adam Magness c81e83c500 Review changes
Update update and new functions to updateFromProbe and create. Update calls to renamed functions.
2018-01-09 11:23:26 -05:00
Adam Magness a59ab5552e Includes and calls
Remove includes and update function calls
2018-01-09 09:59:52 -05:00
Adam Magness 9e6bf79380 Crypto to src
move Crypto to src and Friendica\Util namespace
2017-12-30 11:51:49 -05:00
Adam Magness 2b121779a6 Salmon move to src
Salmon class, update function name and function calls. Some standards as well.
2017-12-02 09:32:45 -05:00
Adam Magness cd12de46f8 OStatus moved to src
OStatus moved to Friendica\Protocol namespace. References and function calls updated.
Related to #3878
2017-11-15 23:09:11 -05:00
Adam Magness 4ca68c7af0 Class file relocations
Issue #3878
2017-11-08 08:37:03 -05:00
Adam Magness 0dfa57948f Issue-#3873
Replace deprecated functions with new syntax.
2017-11-07 06:24:39 -05:00
Hypolite Petovan 20043914e6 Move App to src
- Add `use Friendica\App;` wherever needed
2017-05-02 22:59:36 -04:00
Michael e16fb74b0c Reworked OStatus communication part to better support Mastodon. 2017-04-19 21:37:00 +00:00
Hypolite Petovan 7b352f3f74 Revert "Coding convention applied - part 1" 2017-03-21 12:02:59 -04:00
Roland Häder 0cd241bcbe
added spaces + some curly braces + some usage of dbm::is_result()
Signed-off-by: Roland Häder <roland@mxchange.org>
2017-03-19 00:44:40 +01:00
Hypolite Petovan a7ce601580 Normalize App parameter declaration (mod folder, 3 out of 3) 2017-01-09 23:14:55 +11:00
Roland Häder 4dce3d8224 changed to this:
---------------------
function bla (App &$a) {
	$a->bla = 'stuff';
}
---------------------

Signed-off-by: Roland Häder <roland@mxchange.org>
2016-12-20 10:58:55 +01:00
Roland Häder fb676335db Coding convention applied:
- space between "if" and brace
- curly braces on conditional blocks

Signed-off-by: Roland Häder <roland@mxchange.org>
2016-12-20 10:10:33 +01:00
Roland Häder 46d383369c Cleanup for #3010 - added spaces, thanks to @annando .
Signed-off-by: Roland Häder <roland@mxchange.org>
2016-12-14 09:41:33 +01:00
Roland Häder 6a8a36f12d More usage of dbm::is_result($r) instead of count($r):
- count() returns very different results and never a boolean (not even false on
  error condition).
- therefore you should NOT use it in boolean expressions. This still *can* be
  done in PHP because of its lazyness. But it is discouraged if it comes to
  more clean code.

Signed-off-by: Roland Häder <roland@mxchange.org>
2016-12-13 10:44:13 +01:00
Michael Vogel b93e1d73a1 New OStatus implementation 2016-03-30 12:43:15 +02:00
fabrixxm b202e02fbf Revert "Updated modules to allow for partial overrides without errors"
This reverts commit db949bb802.
2016-02-07 15:11:34 +01:00
Andrej Stieben db949bb802 Updated modules to allow for partial overrides without errors
Only define functions if they have not been defined before, e.g. in themes. This makes it possible to override parts of a module and still use the other functions.
2016-02-05 21:52:39 +01:00