Commit Graph

52 Commits

Author SHA1 Message Date
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 af9067a381 Update PHPDoc in mod/ 2019-01-21 10:39:27 -05:00
Hypolite Petovan 895b3abf32 Remove/replace killme() with *exit() 2019-01-21 09:49:17 -05:00
Hypolite Petovan 620395378e Normalize uses of Strings::formatNetworkName to $network_link
- Unescape HTML template variable $network_link
2018-12-26 11:11:38 -05:00
Hypolite Petovan d71e856535 Replace remaining occurrences of "0001-01-01" with DBA::NULL_DATE 2018-11-21 23:53:45 -05:00
Adam Magness ffc406d819 normalise_link calls
implement normaliseLink function
2018-11-08 11:28:29 -05:00
Adam Magness 916b3e551e format_network_name calls
implement formatNetworkName function
2018-11-08 10:24:47 -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
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 Vogel 1eb8f04274 Fixing SQL error when receiving DFRN posts (#5527)
* Some more notices

* Fixed nasty to find notice in DFRN and OStatus

* And more notices ...

* Yeah, some removed notices ... again ...

* Fixing bad SQL query
2018-07-30 07:06:32 +02:00
Michael Vogel 53876abfda And some more removed notices in the core (#5465) 2018-07-23 07:43:18 -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
rabuzarus 92a84275d4 fix hovercard for not logged in users 2018-06-21 22:46:10 +02:00
Michael 8a34895a23 Use magicLink whenever possible 2018-06-02 08:05:06 +00:00
Adam Magness 9b8599b619 Move functions to system
move some functions to system
2018-01-27 11:59:10 -05: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 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 0c5cc291af More use
more missing use statements
2018-01-14 21:38:26 -05:00
Adam Magness 4fb2547df8 Update function calls
update function calls to use profile class
2018-01-14 21:22:39 -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
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 f7165156f1 Fix formatting and PHP notices in contacts
- Use x() and defaults() to fix undefined indexes
- Fix variable and constant name typos
- Remove unused variables and commented out code
- Add back undefined variables
2018-01-02 08:11:14 -05:00
Hypolite Petovan bc58e8d3be Rename Model\GlobalContact to Model\GContact 2017-12-07 23:57:56 -05:00
Hypolite Petovan a42595a30c Move Object\Contact to Model\Contact 2017-12-07 23:56:12 -05:00
Michael Vogel 5747cfc79c
Revert "Move Objects to Model" 2017-12-08 05:21:51 +01:00
Hypolite Petovan cd84bf8963 Rename Model\GlobalContact to Model\GContact 2017-12-07 09:09:28 -05:00
Hypolite Petovan 18d93cddf6 Move Object\Contact to Model\Contact 2017-12-07 09:04:24 -05:00
Hypolite Petovan 5ee728972e Remove include/Contact.php
- Remove all mentions to include/Contact.php
2017-11-19 17:05:21 -05:00
Hypolite Petovan ec02af593d Change called method names
- Add GlobalContact::getRandomUrl
- Rename Contact::getIdForURL
- Rename Diaspora::sendUnshare
- Remove unused parameter $self in Contact::terminateFriendship
2017-11-19 17:03:39 -05:00
Hypolite Petovan b92fc24ff0 Add Contact Object
- Add Profile Object
- Add User Model
- Add use statements
2017-11-19 16:55:28 -05:00
Adam Magness 259f91caa9 PortableContact created
Create PortableContact and remove socgraph, update references, and calls
2017-11-15 10:53:16 -05:00
Adam Magness 47db624105 GlobalContact created
Moved DirSearch and GlobalContact related functions to Friendica\Model namespace
2017-11-15 09:47:49 -05:00
Adam Magness 0dfa57948f Issue-#3873
Replace deprecated functions with new syntax.
2017-11-07 06:24:39 -05:00
Michael 4f6f47f714 Now the bugfix really should work 2017-08-14 20:58:02 +00:00
Michael 2d99e86b12 Bugfix for PR 3630: "get_contact_details_by_url" not always returned a value 2017-08-14 20:17:17 +00:00
Michael 2c11e91e65 The first queries are replaced with the new functions. More to come ... 2017-05-07 20:52:00 +00:00
Hypolite Petovan 20043914e6 Move App to src
- Add `use Friendica\App;` wherever needed
2017-05-02 22:59:36 -04:00
Hypolite Petovan 56ee734b00 Cleanup /format pre-move 2017-05-02 22:59:24 -04:00
Alexandre Alapetite d2901dcb00 Fix for MySQL 5.7+
https://github.com/friendica/friendica/issues/2786

Only tested on Ubuntu 16.10 with MySQL 5.7.17.

https://dev.mysql.com/doc/refman/8.0/en/timestamp-initialization.html

https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html#sqlmode_no_zero_date
As of MySQL 5.7.4, NO_ZERO_DATE is deprecated.

Patch based on the following search & replace (and then reverting some
changes in libraries):

```sh
grep -l '= "0000-00-00"' -r . | xargs sed -i -e "s/= \"0000-00-00\"/=
'0000-00-00'/g"

grep -l "0000-00-00" -r . | xargs sed -i -e "s/0000-00-00/0001-01-01/g"

grep -l "!= '0001-01-01'" -r . | xargs sed -i -e "s/!= '0001-01-01'/>
'0001-01-01'/g"

grep -l " === '0001-01-01'" -r . | xargs sed -i -e "s/ === '0001-01-01'/
<= '0001-01-01'/g"

grep -l " == '0001-01-01'" -r . | xargs sed -i -e "s/ == '0001-01-01'/
<= '0001-01-01'/g"

grep -l "strpos(\$dob, '0000-') === 0" -r . | xargs sed -i -e
"s/strpos(\$dob, '0000-') === 0/strpos(\$dob, '0000-') === 0 ||
strpos(\$dob, '0001-') === 0/g"

grep -l 'array("", "0001-01-01")' -r . | xargs sed -i -e 's/array("",
"0001-01-01")/array("", "0000-00-00", "0001-01-01")/g'

grep -l "\$dob = '0000-'" -r . | xargs sed -i -e "s/\$dob =
'0000-'/\$dob = '0001-'/g"
```
2017-04-11 23:00:45 +02: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 f92918f471 Normalize App parameter declaration (mod folder, 2 out of 3) 2017-01-09 23:14:25 +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
Michael Vogel 60a0235af0 The account type is now read and displayed 2016-10-01 20:03:27 +00:00
rabuzarus 60b767168a hovercard.php - fix tags for hovercard 2016-06-27 11:57:47 +02:00