Commit graph

253 commits

Author SHA1 Message Date
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
Michael Vogel
65d752d03c Notices what else? (#5545)
* Poco isn't filled, so we cannot store it

* We should initialize our variables
2018-08-02 16:11:21 +02:00
Michael Vogel
c72c64a6d8 Notices again (#5543)
* And again notices

* Notices in the directory

* Much more places

* Fix some double $

* Notice in ping

* Missing field

* Fix: We now remove deleted users from the directory

* Some more stuff

* Notices when removing users

* Added logging

* More logging

* Two more
2018-08-02 07:21:01 +02:00
Roland Häder
4a22710b3b Moved global PAGE_* to Profile class (#5500)
* Rewrites:
- moved PAGE_* to Friendica\Model\Profile class

* Fixed more rewrites from plain (global namespace) PAGE_* to Friendica\Models\Profile class

* CR request:
- moved all PAGE_* constants to Friendica\Model\Contact class
- fixed all references of both classes

* CR request:
- moved ACCOUNT_TYPE_* constants from boot.php to Contact::ACCOUNT_TYPE_*

* Just copy-pasted this code from boot.php, needs to be changed to `const ACCOUNT_TYPE_FOO = x;`

* Ops, melting brain cells here ... :-/
2018-07-27 19:25:57 -04: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
aa26943f92 Rename DBA::esc_array to DBA::escapeArray
- Rename internal method DBA::esc_array_callback to
DBA::escapeArrayCallback
2018-07-23 11:04:15 -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
Hypolite Petovan
e952d6677b Rename App->path to App->urlpath 2018-07-16 19:38:13 -04:00
Michael
8a34895a23 Use magicLink whenever possible 2018-06-02 08:05:06 +00:00
Michael
c70ebadd7d Issue-3412 related: Don't send connection posts anymore 2018-05-19 19:34:51 +00:00
Michael
4ad655ab80 Replace old database queries with the new ones 2018-05-02 19:26:15 +00:00
rabuzarus
2e03a3a47f fix undeclared variables or wrong variable names (/mod) 2018-02-12 03:25:09 +01: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
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
Hypolite Petovan
9cd3b17743 Fix translation strings for use with util/extract.php
- Change parentheses to “\x28” and “\x29”
- Remove leading commas
- Remove quotes before commas
2018-01-24 16:51:32 -05:00
Adam Magness
df7bdbfc66 More missed calls
missed t() calls
2018-01-24 10:19:58 -05:00
Adam Magness
208a149a7b Review sprintf
remove more sprintf calls
2018-01-23 21:59:16 -05:00
Adam Magness
f0725ae384 Hopefully all t()
hopefully the last of the t()
2018-01-22 18:03:26 -05:00
Adam Magness
3b0f69599e Updat tt() calls
update function calls for tt()
2018-01-22 18:03:26 -05:00
Adam Magness
d49f986d1e Many t() calls
modify many t() calls.
2018-01-22 18:03:26 -05:00
Hypolite Petovan
fee80a57bc Change /siteinfo to /servers for directory URL on follow page 2018-01-19 21:51:42 -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
4fb2547df8 Update function calls
update function calls to use profile class
2018-01-14 21:22:39 -05:00
Hypolite Petovan
520a068500 Add back missing brace
- Revert unneeded change to SQL query formatting
2018-01-04 11:53:57 -05:00
Hypolite Petovan
2dc598ed5b Move login() to Login module
- Move nuke_session to include/security
- Remove mod/login
2017-12-29 21:55:13 -05:00
Hypolite Petovan
2cfcf433a3 Fix formatting in mod
- mod/api
- mod/bookmarklet
- mod/dfrn_request
2017-12-29 21:55:13 -05:00
Hypolite Petovan
1724dd3841 Make validate_url more intuitive
- Remove the parameter passed by reference
- Add modified url in return value
2017-12-29 21:55:13 -05:00
Hypolite Petovan
4fe8dab08d Remove include/group.php 2017-12-09 13:45:54 -05:00
Hypolite Petovan
abdecd2b2f Use new Model methods for groups 2017-12-09 13:45:17 -05:00
Hypolite Petovan
fe89e7760e Fix formatting all around 2017-12-09 13:42:02 -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
18d93cddf6 Move Object\Contact to Model\Contact 2017-12-07 09:04:24 -05:00
Michael
df89e0384d Added description to networks, renaming some network names 2017-12-03 13:26:52 +00:00
Michael
6f7510550d NETWORK_MAIL2 was never finished, so remove it as well 2017-12-03 09:19:58 +00:00
Adam Magness
0373056448 Review and Use statements
use statements and review changes.
2017-11-29 17:29:11 -05:00
Adam Magness
0091d318e5 Function names
Update function names and corresponding function calls
2017-11-29 12:17:12 -05:00
Adam Magness
4ca68c7af0 Class file relocations
Issue #3878
2017-11-08 08:37:03 -05:00
Adam Magness
8522c47353 Remove Includes
Removed references to include/config.php and include/probe.php and deleted the respective files.
2017-11-07 12:14:03 -05:00
Adam Magness
0dfa57948f Issue-#3873
Replace deprecated functions with new syntax.
2017-11-07 06:24:39 -05:00
Michael
5adfeb0bd5 App::get_baseurl is now replaced with System::baseUrl 2017-08-26 07:32:10 +00:00
Michael
3c24bed412 New class "System" 2017-08-26 06:04:21 +00:00
Hypolite Petovan
9c0d2c31e8 Replace AND and OR in PHP conditions by && and || 2017-06-07 22:00:59 -04:00
rabuzarus
cc8a3a4101 rename methods of the Probe class to camelCase 2017-05-08 16:19:10 +02:00
Hypolite Petovan
3a2988c3fd Rename include/Scrape to include/probe 2017-05-07 14:45:19 -04:00
Hypolite Petovan
36e515ee6d Move Probe to src 2017-05-07 14:44:30 -04:00
Hypolite Petovan
82b423c5ac Fix require_once format 2017-05-07 14:40:23 -04:00
Hypolite Petovan
20043914e6 Move App to src
- Add `use Friendica\App;` wherever needed
2017-05-02 22:59:36 -04:00
Hypolite Petovan
188d3a6f5e Renamed check_domain_blocklist to blocked_url
- Remove debug
2017-04-26 00:23:01 -04:00
Hypolite Petovan
c7e1a8e871 Added check_domain_blocklist 2017-04-25 22:45:56 -04:00
rebeka-catalina
554704e6b9 Added a whitespace between comma and t() 2017-04-08 16:57:24 +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
Michael
c1eea3771f Bugfix: Sometimes the self contact seems to destroy itself 2017-01-29 13:57:03 +00:00
Michael
ea22828d37 Alternate solution for pull request 3124 2017-01-28 12:19:04 +00:00
Hypolite Petovan
8a197055e3 Normalize App parameter declaration (mod folder, 1 out of 3) 2017-01-09 23:12:54 +11:00
Roland Häder
f8a213e23b
*much* more usage of App::get_baseurl() instead of $a->get_baseurl() (coding convention applied)
Signed-off-by: Roland Häder <roland@mxchange.org>
2016-12-23 19:49:36 +01:00
Roland Haeder
6e44acfed6
Continued with coding convention:
- added curly braces around conditional code blocks
- added space between if/foreach/... and brace
- rewrote a code block so if dbm::is_result() fails it will abort, else the id
  is fetched from INSERT statement
- made some SQL keywords upper-cased and added back-ticks to columns/table names

Signed-off-by: Roland Haeder <roland@mxchange.org>
2016-12-20 21:15:53 +01:00
Roland Häder
4b221d216e added more curly braces + space between "if" and brace
Signed-off-by: Roland Häder <roland@mxchange.org>
2016-12-20 17:57:40 +01: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
be35349495 added more curyl braces + spaces between "if" and brace
Signed-off-by: Roland Häder <roland@mxchange.org>
2016-12-20 10:44:27 +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
884f44ce94 *much* more usage of App::get_baseurl() instead of $a->get_baseurl() (coding convention applied)
Signed-off-by: Roland Häder <roland@mxchange.org>
2016-12-19 14:27:16 +01:00
Roland Häder
2c9d282136 Convention: SQL keywords all upper-case, columns and table names (better) lower-cased and always in back-ticks.
Signed-off-by: Roland Häder <roland@mxchange.org>
2016-12-15 10:11:25 +01:00
Roland Häder
a85470b172 Opps, this has vanished by accident, thanks to @annando
Signed-off-by: Roland Häder <roland@mxchange.org>
2016-12-14 16:36:32 +01:00
Roland Häder
042ed17826 removed own debug lines (no more needed).
Signed-off-by: Roland Häder <roland@mxchange.org>
2016-12-14 09:58:27 +01:00
Roland Häder
036edc2fd0 added extra spaces to make it look nice. #3010
Signed-off-by: Roland Häder <roland@mxchange.org>
2016-12-14 09:56:27 +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
6de232c60a Cleanup for #3010 - removed all redundant lines found by @rabuzarus
Signed-off-by: Roland Häder <roland@mxchange.org>
2016-12-14 09:31:27 +01:00
Roland Häder
63610c7b73 Merge branch 'rewrites/dbm_is_result' of github.com:Quix0r/friendica into rewrites/dbm_is_result
Signed-off-by: Roland Häder <roland@mxchange.org>

Conflicts:
	include/Photo.php
	include/api.php
	include/cache.php
	include/dbstructure.php
	include/enotify.php
	include/items.php
	include/onepoll.php
	include/queue_fn.php
	include/session.php
	include/text.php
	mod/contacts.php
	mod/dfrn_request.php
	mod/display.php
	mod/events.php
	mod/item.php
	mod/message.php
	mod/msearch.php
	mod/photos.php
	mod/poco.php
	mod/profile.php
	mod/proxy.php
	mod/videos.php
	update.php
	view/theme/diabook/theme.php
	view/theme/vier/theme.php
2016-12-13 11:00:44 +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
rabuzarus
a208d2e72b dfrn_request: include the graphic of the connection process into the doxygen header 2016-11-29 19:57:30 +01:00
rabuzarus
54f3867ebd dfrn_request: fix forgotten value variable + added $blocked and $pending also for other queries 2016-11-29 15:52:12 +01:00
rabuzarus
0d223aa6f1 dfrn_request: added $blocked and $pending as variable to make code more understandable 2016-11-29 03:08:46 +01:00
rabuzarus
d0cdf863a1 fix accidentally deleted line with local_user() 2016-11-28 15:30:36 +01:00
rabuzarus
5458f40f6a Bugfix: better detection dfrn_request of double connection requests 2016-11-28 01:13:47 +01:00
Roland Haeder
c1a15befc5
Some improvements/fix:
- fixed curly brace bug (introduced by myself)
- make all SQL keywords upper-case, column and table names lower-case
- used some more dbm::is_result

Signed-off-by: Roland Haeder <roland@mxchange.org>
2016-09-20 22:18:35 +02:00
Roland Haeder
e171a1cd22
Some fixes:
- avoids warning if no result is coming back
- brought back init variable before using it

Signed-off-by: Roland Haeder <roland@mxchange.org>
2016-09-18 23:39:07 +02:00
Roland Haeder
c825cc8d0d
This merge brings back dbm::is_result() where I could find it.
Merge branch 'develop' of github.com:friendica/friendica into rhaeder-develop

Signed-off-by: Roland Haeder <roland@mxchange.org>
2016-09-18 23:21:18 +02:00
Michael Vogel
f27bc00464 Remove obsolote functions 2016-07-09 20:09:09 +02:00
Michael Vogel
4e5d335492 Removed the legacy function calls, removed unused functions 2016-07-04 08:05:30 +02:00
Michael Vogel
0b1188b7fe Imrpoved avatar handling when storing them/partly use of "micro" 2016-06-25 13:56:55 +02:00
Roland Haeder
738e22d3eb
Some fixes:
- Letting $profile_link and $hcard always been overwritten with newly found
  entries has caused DFRN network detectio to fail and "connect" is no longer
  working. This fix makes sure that these both variables are only set if they
  are still empty.
- added more debug lines to see which URL was it before and after webfinger "detection"

Signed-off-by: Roland Haeder <roland@mxchange.org>
2016-05-01 14:52:48 +02:00
Roland Haeder
3e701b90ac
Continued rewriting:
- use dba::is_result() everywhere (where I found the old, bad way)
- converted some spaces -> tabs for code
- converted some CRLF -> LF as mixures of both is not good

Signed-off-by: Roland Haeder <roland@mxchange.org>
2016-05-01 14:24:44 +02:00
Roland Haeder
6177607bca More logging in case of errors + logged network type + added TODO (for ugly E_NOTICE).
Signed-off-by: Roland Haeder <roland@mxchange.org>
2016-05-01 13:51:48 +02:00
Roland Haeder
3448437156 More logging in case of errors + logged network type + added TODO (for ugly E_NOTICE).
Signed-off-by: Roland Haeder <roland@mxchange.org>
2016-05-01 13:51:10 +02:00
Michael Vogel
535f382c4e
Bugfix: "default_group" behaviour wasn't implemented correctly 2016-05-01 13:47:24 +02:00
Michael Vogel
d6a79abb68 Bugfix: "default_group" behaviour wasn't implemented correctly 2016-04-13 22:21:23 +02:00
Michael Vogel
8752ec11b2 Central function for default group, special setting for OStatus 2016-03-06 13:15:27 +01:00
Roland Haeder
7d5166c9fe
Closed TODO: no .= needed here. #2392
Signed-off-by: Roland Haeder <roland@mxchange.org>
2016-03-01 18:28:06 +01:00
Roland Haeder
76b042ddee
More logging in case of errors + logged network type + added TODO (for ugly E_NOTICE).
Signed-off-by: Roland Haeder <roland@mxchange.org>
2016-03-01 14:42:55 +01:00