2
									
								
								.github/ISSUE_TEMPLATE/feature_request.md
									
										
									
									
										vendored
									
									
								
							
							
						
						| 
						 | 
				
			
			@ -13,7 +13,7 @@ assignees: ''
 | 
			
		|||
 | 
			
		||||
### Describe the feature you'd like
 | 
			
		||||
 | 
			
		||||
<!-- A clear and concise description of waht you want to happen. -->
 | 
			
		||||
<!-- A clear and concise description of what you want to happen. -->
 | 
			
		||||
 | 
			
		||||
### Describe alternatives you've considered
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										60
									
								
								CHANGELOG
									
										
									
									
									
								
							
							
						
						| 
						 | 
				
			
			@ -714,13 +714,13 @@ Version 2020.07 (2020-07-12)
 | 
			
		|||
    blockbot:
 | 
			
		||||
      The list of accepted user agents was enhanced [annando]
 | 
			
		||||
    Diaspora*:
 | 
			
		||||
      Enhanced conntector settings [MrPetovan]
 | 
			
		||||
      Enhanced connector settings [MrPetovan]
 | 
			
		||||
    PHP Mailer SMTP:
 | 
			
		||||
      Updated phpmailer version [dependabot]
 | 
			
		||||
    showmore_dyn:
 | 
			
		||||
      New addon to collapse long post depending on their actual height [wiwie]
 | 
			
		||||
    twitter:
 | 
			
		||||
      Enhaceed the handling of mobile twitter URLs [annando]
 | 
			
		||||
      Enhanced the handling of mobile twitter URLs [annando]
 | 
			
		||||
      Enhanced the handling of quoted tweets [MrPetovan]
 | 
			
		||||
      added HTML error code handling [MrPetovan]
 | 
			
		||||
    various:
 | 
			
		||||
| 
						 | 
				
			
			@ -958,7 +958,7 @@ Version 2019.09 (2019-09-29)
 | 
			
		|||
 | 
			
		||||
Version 2019.06 (2019-06-23)
 | 
			
		||||
  Friendica Core:
 | 
			
		||||
    Update to the tranlation (CS, DE, EN-GB, EN-US, ET, FR, IT, PL, PT-BR, SV) [translation teams]
 | 
			
		||||
    Update to the translation (CS, DE, EN-GB, EN-US, ET, FR, IT, PL, PT-BR, SV) [translation teams]
 | 
			
		||||
    Update to the documentation [nupplaphil, realkinetix, MrPetovan]
 | 
			
		||||
    Update to the themes (frio, vier) [BinkaDroid, MrPetovan, tobiasd]
 | 
			
		||||
    Enhancements to the API [annando, MrPetovan]
 | 
			
		||||
| 
						 | 
				
			
			@ -978,7 +978,7 @@ Version 2019.06 (2019-06-23)
 | 
			
		|||
    Fixed an issue with the File to Folder feature [MrPetovan]
 | 
			
		||||
    Fixed an issue with the legacy storage engine [fabrixxm]
 | 
			
		||||
    Fixed an issue with the theme and addon path items [MrPetovan]
 | 
			
		||||
    Fixed an issue occuring when the BasePath was not set [tobiasd]
 | 
			
		||||
    Fixed an issue occurring when the BasePath was not set [tobiasd]
 | 
			
		||||
    Fixed an issue with additionally opened Sessions [MrPetovan]
 | 
			
		||||
    Fixed an issue with legacy loglevel mapping [nupplaphil]
 | 
			
		||||
    Fixed contact suggestions [annando]
 | 
			
		||||
| 
						 | 
				
			
			@ -1004,7 +1004,7 @@ Version 2019.06 (2019-06-23)
 | 
			
		|||
    Remove support for defunct F-Droid Friendica app [MrPetovan]
 | 
			
		||||
 | 
			
		||||
  Friendica Addons:
 | 
			
		||||
    Update to the tranlation (ET, SV, ZH_CN) [translation teams]
 | 
			
		||||
    Update to the translation (ET, SV, ZH_CN) [translation teams]
 | 
			
		||||
    botdetection:
 | 
			
		||||
      Added a new addon for preventing access by bots [nupplaphil, annando]
 | 
			
		||||
    buffer:
 | 
			
		||||
| 
						 | 
				
			
			@ -1042,7 +1042,7 @@ Version 2019.03 (2019-03-22)
 | 
			
		|||
    Update to the themes (duepuntozero, frio, smoothy, quattro, vier) [lxiter, MrPetovan, nupplaphil, rabuzarus,  tobiasd]
 | 
			
		||||
    Enhancements to the API [jasonscheng]
 | 
			
		||||
    Enhancements to the Vagrant development VM [JeroenED]
 | 
			
		||||
    Enhancements to the storage of gender, sexual preferences and maritial status [JeroenED]
 | 
			
		||||
    Enhancements to the storage of gender, sexual preferences and marital status [JeroenED]
 | 
			
		||||
    Enhancements to the wording of notifications [MrPetovan]
 | 
			
		||||
    Enhancements to the display of contacts in the profile [MrPetovan]
 | 
			
		||||
    Enhancements to the handling of local links [lxiter]
 | 
			
		||||
| 
						 | 
				
			
			@ -1071,7 +1071,7 @@ Version 2019.03 (2019-03-22)
 | 
			
		|||
    Fixed an issue with sending out notification mails to the admin [nupplaphil]
 | 
			
		||||
    Fixed an the issue, that the API was ignoring the globalsilence setting  [nupplaphil]
 | 
			
		||||
    Fixed issues with the autolinker of URLs in postings [MrPetovan]
 | 
			
		||||
    Fixed an issue resulting in multible emails after successful updates of the database [nupplaphil]
 | 
			
		||||
    Fixed an issue resulting in multiple emails after successful updates of the database [nupplaphil]
 | 
			
		||||
    Fixed a timeout issue during detection process of the remote profile [annando]
 | 
			
		||||
    Fixed an issue with postings from blocked servers [annando, MrPetovan]
 | 
			
		||||
    Fixed an issue with the paging of stored folders [MrPetovan]
 | 
			
		||||
| 
						 | 
				
			
			@ -1103,7 +1103,7 @@ Version 2019.03 (2019-03-22)
 | 
			
		|||
    forumdirectory:
 | 
			
		||||
      Fixed a theming issue with frio [rabuzarus]
 | 
			
		||||
    js_upload:
 | 
			
		||||
      Fixed a missing extionsion index [nupplaphil]
 | 
			
		||||
      Fixed a missing extension index [nupplaphil]
 | 
			
		||||
    mailstream:
 | 
			
		||||
      Fixed a curl issue [MrPetovan]
 | 
			
		||||
    piwik:
 | 
			
		||||
| 
						 | 
				
			
			@ -1323,7 +1323,7 @@ Version 2018.09 (2018-09-23)
 | 
			
		|||
    added addons:
 | 
			
		||||
      mastodoncustomemojis [MrPetovan]
 | 
			
		||||
    deprecated addons:
 | 
			
		||||
      notimeline, retriver, remote_permissions, widgets
 | 
			
		||||
      notimeline, retriever, remote_permissions, widgets
 | 
			
		||||
 | 
			
		||||
  Directory:
 | 
			
		||||
    Enhancements of the health summary [andyhee]
 | 
			
		||||
| 
						 | 
				
			
			@ -1349,7 +1349,7 @@ Version 2018.05 (2018-06-01)
 | 
			
		|||
    Enhancements to the relay system [annando]
 | 
			
		||||
    Enhancements to the handling of URL that contain unicode characters [annando]
 | 
			
		||||
    Enhancements to the Vagrant VM configuration [fabrixxm, tobiasd]
 | 
			
		||||
    Enhancementa to the Babel module [MrPetovan]
 | 
			
		||||
    Enhancements to the Babel module [MrPetovan]
 | 
			
		||||
    Enhancements to the display of the [code] elements [MrPetovan]
 | 
			
		||||
    Enhancements to the federation (OStatus, diaspora) [annando]
 | 
			
		||||
    Enhancements to the PHP7.2 compatibility [Alkarex, MrPetovan, Quix0r]
 | 
			
		||||
| 
						 | 
				
			
			@ -1477,7 +1477,7 @@ Version 3.6 (2018-03-23)
 | 
			
		|||
    Enhancements to the probing of pump.io profiles [annando]
 | 
			
		||||
    Enhancements to the handling of BBCode tags [MrPetovan]
 | 
			
		||||
    Enhancements to the OEmbed handling [MrPetovan]
 | 
			
		||||
    Fixed a bug that triggered the display of activities on the cummunity page [annando]
 | 
			
		||||
    Fixed a bug that triggered the display of activities on the community page [annando]
 | 
			
		||||
    Fixed a bug with personal notes [annando]
 | 
			
		||||
    Fixed a display issue of long postings when using the showmore option [annando]
 | 
			
		||||
    Fixed a bug that caused Twidere to crash on reload [annando]
 | 
			
		||||
| 
						 | 
				
			
			@ -1539,7 +1539,7 @@ Version 3.6 (2018-03-23)
 | 
			
		|||
    all bridges don't relay postings anymore that are posted to a public forum [annando]
 | 
			
		||||
    DAV addon marked unsupported [tobiasd]
 | 
			
		||||
    communityhome addon marked unsupported [MrPetovan]
 | 
			
		||||
    yourls addon makrked unsupported [MrPetovan]
 | 
			
		||||
    yourls addon marked unsupported [MrPetovan]
 | 
			
		||||
    Current Weather: fixing a problem with the weathermap link [zeroadam]
 | 
			
		||||
    NSFW added config examples, reworked the description, now ignores the CW from Mastodon [andyhee, annando, rebeka-catalina]
 | 
			
		||||
    Twitter support 280 chars limit [annando]
 | 
			
		||||
| 
						 | 
				
			
			@ -1796,7 +1796,7 @@ Version 3.5 (2016-09-13)
 | 
			
		|||
    Improvements on the themes (quattro, vier, frost) [rabuzarus, fabrixxm, stieben, annando, Quix0r, tobiasd]
 | 
			
		||||
    Improvements to the ACL dialog [fabrixxm, rabuzarus]
 | 
			
		||||
    Improvements to the database structure and optimization of queries [annando]
 | 
			
		||||
    Improvements to the UI (contacts, hotkeys, remember me, ARIA, code hightlighting) [rabuzarus, annando, tobiasd]
 | 
			
		||||
    Improvements to the UI (contacts, hotkeys, remember me, ARIA, code highlighting) [rabuzarus, annando, tobiasd]
 | 
			
		||||
    Improvements to the background process (poller, worker) [annando]
 | 
			
		||||
    Improvements to the admin panel [tobiasd, annando, fabrixxm]
 | 
			
		||||
    Improvements to the performance [annando]
 | 
			
		||||
| 
						 | 
				
			
			@ -1825,7 +1825,7 @@ Version 3.5 (2016-09-13)
 | 
			
		|||
    GNU Social Connector [annando]
 | 
			
		||||
    LDAP [Olivier Mehani]
 | 
			
		||||
    smileybutton [rabuzarus]
 | 
			
		||||
    retriver [mexon]
 | 
			
		||||
    retriever [mexon]
 | 
			
		||||
    mailstream [mexon]
 | 
			
		||||
    forumdirectory [tobiasd]
 | 
			
		||||
    NEW notifyall (port from Hubzilla) [rabuzarus, tobiasd]
 | 
			
		||||
| 
						 | 
				
			
			@ -1880,7 +1880,7 @@ Version 3.4.3 (2015-12-22)
 | 
			
		|||
	'Reload active themes' in theme admin page (fabrixxm)
 | 
			
		||||
	Install routine checks for ImageMagick and GIF support (fabrixxm)
 | 
			
		||||
	Install routine checks for availability of "mcrypt_create_iv()" function, needed for RINO2 (fabrixxm)
 | 
			
		||||
	Only suported themes are shown in admin page (annando)
 | 
			
		||||
	Only supported themes are shown in admin page (annando)
 | 
			
		||||
	Optimized SQL queries (annando)
 | 
			
		||||
	System perform an optimize pass on tables in cron, with maximum table size and minimum fragmentation level settings (annando)
 | 
			
		||||
	New access keys in profile and contact pages (rabuzarus, annando)
 | 
			
		||||
| 
						 | 
				
			
			@ -1895,9 +1895,9 @@ Version 3.4.3 (2015-12-22)
 | 
			
		|||
	New hook 'template_vars' (fabrixxm)
 | 
			
		||||
	$baseurl variable is passed to all templates by default (fabrixxm)
 | 
			
		||||
	OStatus delivery code is moved in new function (annando)
 | 
			
		||||
	Doxygen config file and initial documetation of code (rabuzarus)
 | 
			
		||||
	Doxygen config file and initial documentation of code (rabuzarus)
 | 
			
		||||
	Full rewrite of util/php2po.php (fabrixxm)
 | 
			
		||||
  Bugfixs:
 | 
			
		||||
  Bugfixes:
 | 
			
		||||
	Remote self works again (annando)
 | 
			
		||||
	Fix feeds mistakenly recognized as OStatus (issue #1914) (annando)
 | 
			
		||||
	Report invalid feeds to user (issue #1913) (annando)
 | 
			
		||||
| 
						 | 
				
			
			@ -1912,8 +1912,8 @@ Version 3.4.3 (2015-12-22)
 | 
			
		|||
	Fix rapid repeated requests to GNUSocial instance (issue #2038) (annando)
 | 
			
		||||
	Fix install routine css when mod_rewrite doesn't works (issue #2071) (fabrixxm)
 | 
			
		||||
	Fix code to be compliant with minimum required PHP version (issue #2066) (fabrixxm, rabuzarus)
 | 
			
		||||
	Fix feedback after succesfull registration (issue #2060) (annando)
 | 
			
		||||
	Fix mention completition popup with TinyMCE (issue #1920) (fabrixxm)
 | 
			
		||||
	Fix feedback after successful registration (issue #2060) (annando)
 | 
			
		||||
	Fix mention completion popup with TinyMCE (issue #1920) (fabrixxm)
 | 
			
		||||
	Fix photo cache and proxy when installed in subfolder (ddorian1)
 | 
			
		||||
	Fix bbcode conversion of the about text for the profile (issue #1607) (annando)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1923,7 +1923,7 @@ Version 3.4.2 (2015-09-29)
 | 
			
		|||
	Updates to the documentation (tobiasd, silke, annando)
 | 
			
		||||
	Updates to the translations (tobiasd & translation teams)
 | 
			
		||||
	Updates to themes frost-mobile, vier, duepuntozero, quattro (annando, tobiasd)
 | 
			
		||||
	Enancements of the communications via OStatus and Diaspora protocols (annando)
 | 
			
		||||
	Enhancements of the communications via OStatus and Diaspora protocols (annando)
 | 
			
		||||
	Option to automatically follow OStatus contacts was moved from addon to the core (annando)
 | 
			
		||||
	Add tool to import OStatus contacts from an old account (annando)
 | 
			
		||||
	SALMON slaps with OStatus were reworked (annando)
 | 
			
		||||
| 
						 | 
				
			
			@ -1940,7 +1940,7 @@ Version 3.4.2 (2015-09-29)
 | 
			
		|||
	The global directory is queried in the background to update local DB and improve similar searches in the future. (annando)
 | 
			
		||||
	By communication over the Diaspora protocol, red#matrix sources are now correctly identified, hubzilla is detected (annando)
 | 
			
		||||
	Adopt limitation of usage of "-" in username to avoid conflicts with GNU Social and Diaspora (annando)
 | 
			
		||||
	The [url] tag now also suppots ftp, mailto, gopher links (annando)
 | 
			
		||||
	The [url] tag now also supports ftp, mailto, gopher links (annando)
 | 
			
		||||
	An "inspect queue" module was added to the admin panel (tobiasd)
 | 
			
		||||
	Fix some missing SQL data escapes (fabrixxm)
 | 
			
		||||
	Improved the accessibility of the web UI for better screen reader compatibility (annando)
 | 
			
		||||
| 
						 | 
				
			
			@ -1968,7 +1968,7 @@ Version 3.4.1 (2015-07-06)
 | 
			
		|||
	Implement server-to-server encryption (RINO) using php-encryption library as "RINO 2", deprecate "RINO 1" (issue #1655) (fabrixxm)
 | 
			
		||||
	Fix connection with Diaspora "freelove" account (issue #1572) (annando)
 | 
			
		||||
	Various SQL speedups (annando)
 | 
			
		||||
	Port of Javascript DatePicker input from RedMatrix (rabuzarus)
 | 
			
		||||
	Port of JavaScript DatePicker input from RedMatrix (rabuzarus)
 | 
			
		||||
	Port of RedMatrix archive widget (rabuzarus)
 | 
			
		||||
	Load profile owner settings for theme on profile page (rabuzarus)
 | 
			
		||||
	Move HTML code from php into templates (rabuzarus)
 | 
			
		||||
| 
						 | 
				
			
			@ -1981,7 +1981,7 @@ Version 3.4.1 (2015-07-06)
 | 
			
		|||
		use correct contact when automatically add @-replies
 | 
			
		||||
		add attachment links as enclosures
 | 
			
		||||
		send salmon notifications to every mentioned person
 | 
			
		||||
		better thread completition
 | 
			
		||||
		better thread completion
 | 
			
		||||
		support for bookmarks
 | 
			
		||||
		support for events and questions
 | 
			
		||||
		link to items using GUID
 | 
			
		||||
| 
						 | 
				
			
			@ -1992,7 +1992,7 @@ Version 3.4.1 (2015-07-06)
 | 
			
		|||
	Add fake fields to API response for better Twitter API compatibility (annando)
 | 
			
		||||
	Fix search in local directory (issue #1657) (annando)
 | 
			
		||||
	Improve OEmbed (issue #1640) (annando)
 | 
			
		||||
	Fix double html encodig in site administration page for sitename and register text (issue #1628) (annando)
 | 
			
		||||
	Fix double html encoding in site administration page for sitename and register text (issue #1628) (annando)
 | 
			
		||||
	Fix remote subscription from GNU Social (annando)
 | 
			
		||||
	Fix "{0}" in notifications (issue #1642) (annando)
 | 
			
		||||
	Fix desktop notification (fabrixxm)
 | 
			
		||||
| 
						 | 
				
			
			@ -2001,7 +2001,7 @@ Version 3.4.1 (2015-07-06)
 | 
			
		|||
	Fix emoticons alt text (tobias)
 | 
			
		||||
	Improve threaded display in Vier theme (annando)
 | 
			
		||||
	Use field templates in photo edit form (fabrixxm)
 | 
			
		||||
	Alllow deletion of any user but yourself (issue #1625) (fabrixxm)
 | 
			
		||||
	Allow deletion of any user but yourself (issue #1625) (fabrixxm)
 | 
			
		||||
	Install wizard load htconfig template from template/ folder, remove localized htconfig templates (fabrixxm)
 | 
			
		||||
	Add contact detail to non-js contact drop confirm dialog (issue #1629) (fabrixxm)
 | 
			
		||||
	Return geo coord in API (annando)
 | 
			
		||||
| 
						 | 
				
			
			@ -2079,7 +2079,7 @@ Version 3.3.3 (2015-02-24)
 | 
			
		|||
 | 
			
		||||
Version 3.3.2 (2014-12-26)
 | 
			
		||||
 | 
			
		||||
	Set default value for all not-null fields (fixes SQL warinigs) (annando)
 | 
			
		||||
	Set default value for all not-null fields (fixes SQL warnings) (annando)
 | 
			
		||||
	Fix item filters in network page (issue #1222) (fabrixxm)
 | 
			
		||||
	Remove reference to an ex Friendica hub from documentation (beardyunixer, tobiasd)
 | 
			
		||||
	API throttling (annando)
 | 
			
		||||
| 
						 | 
				
			
			@ -2125,7 +2125,7 @@ Version 3.3 (2014-10-06)
 | 
			
		|||
 | 
			
		||||
	Interaction
 | 
			
		||||
	ignoring of threads
 | 
			
		||||
	for selected contects one can now get notifications when they post something, useful e.g. for forums
 | 
			
		||||
	for selected contacts one can now get notifications when they post something, useful e.g. for forums
 | 
			
		||||
	After a new friendica contact is added, the user is directed to the contact page of the new contact. (Instead of the remote profile)
 | 
			
		||||
	many improvement on all connectors, new app.net connector
 | 
			
		||||
	the algorithm for shortening postings when posting to limited platforms was improved
 | 
			
		||||
| 
						 | 
				
			
			@ -2137,7 +2137,7 @@ Version 3.3 (2014-10-06)
 | 
			
		|||
	updated the following libraries: smarty 3.1.19, fullcalendar 1.6.4, jquery 1.11, jgrowl 1.3.0
 | 
			
		||||
	added modernizer 2.8.3, better browser support
 | 
			
		||||
	updates to the DB structure for better performance
 | 
			
		||||
	preperations to use PDO in a later release
 | 
			
		||||
	preparations to use PDO in a later release
 | 
			
		||||
	new notification system
 | 
			
		||||
	web interface translations updated, addon translations now also possible separately from the main UI and done for CS, IT, RO, DE
 | 
			
		||||
	vagrant support added for developers
 | 
			
		||||
| 
						 | 
				
			
			@ -2175,7 +2175,7 @@ Version 3.2
 | 
			
		|||
	small fixed
 | 
			
		||||
		edit profile photo link
 | 
			
		||||
		better caching of pictures
 | 
			
		||||
		threadening for outgoing emails
 | 
			
		||||
		threading for outgoing emails
 | 
			
		||||
		mail import
 | 
			
		||||
		oembed thumbnails
 | 
			
		||||
		SN subscriptions & more SN like behaviour if snautofollow addon is used
 | 
			
		||||
| 
						 | 
				
			
			@ -2195,7 +2195,7 @@ Version 3.2
 | 
			
		|||
	improving the install.php script
 | 
			
		||||
	addons now can be members only
 | 
			
		||||
	item object now contains the "edited" information left for the theme designers to show this info in a pretty way
 | 
			
		||||
	improvments to the user-import from exported account files
 | 
			
		||||
	improvements to the user-import from exported account files
 | 
			
		||||
	It's now possible to authenticate an ejabberd server against friendica.
 | 
			
		||||
	bugtracker moved to github
 | 
			
		||||
	improvements to MySQL queries
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										12
									
								
								README.md
									
										
									
									
									
								
							
							
						
						| 
						 | 
				
			
			@ -17,18 +17,18 @@ Have a look at the [installation documentation](doc/Install.md) for further info
 | 
			
		|||
 | 
			
		||||
### Friendica Screenshots
 | 
			
		||||
 | 
			
		||||
|  
 | 
			
		||||
|  
 | 
			
		||||
|:--:|
 | 
			
		||||
|*Frio theme, mobile browser. Timeline and composer view.*|
 | 
			
		||||
|
 | 
			
		||||
|
 | 
			
		||||
|*Frio theme, desktop browser. Timeline view, contact info popped up, control menu open.*|
 | 
			
		||||
|
 | 
			
		||||
|
 | 
			
		||||
|*Frio theme, desktop browser. Menu open for controlling individual posts.*|
 | 
			
		||||
|
 | 
			
		||||
|
 | 
			
		||||
|*Frio theme, desktop browser. Profile view, notification menu open.*|
 | 
			
		||||
|
 | 
			
		||||
|
 | 
			
		||||
|*Number of new posts, in total and by group.*|
 | 
			
		||||
|
 | 
			
		||||
|
 | 
			
		||||
|*Calender with popup of event.*|
 | 
			
		||||
|
 | 
			
		||||
|*Notifications menu and private messages counter, standard browser on tablet.*|
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,7 +3,7 @@
 | 
			
		|||
dir=$(cd "${0%[/\\]*}" > /dev/null; pwd)
 | 
			
		||||
 | 
			
		||||
if [[ -d /proc/cygdrive && $(which php) == $(readlink -n /proc/cygdrive)/* ]]; then
 | 
			
		||||
   # We are in Cgywin using Windows php, so the path must be translated
 | 
			
		||||
   # We are in Cygwin using Windows php, so the path must be translated
 | 
			
		||||
   dir=$(cygpath -m "$dir");
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -46,7 +46,7 @@ function show_syntax() {
 | 
			
		|||
  echo -e "\t\"testfile\" is the name of a test file, for example lib/template.php" >&2
 | 
			
		||||
  echo -e "\nDatabase environment variables:\n" >&2
 | 
			
		||||
  echo -e "\t\"MYSQL_HOST\" Mysql Hostname (Default: localhost)" >&2
 | 
			
		||||
  echo -e "\t\"MYSQL_USDRNAME\" Mysql Username (Default: friendica)" >&2
 | 
			
		||||
  echo -e "\t\"MYSQL_USERNAME\" Mysql Username (Default: friendica)" >&2
 | 
			
		||||
  echo -e "\t\"MYSQL_DATABASE\" Mysql Database (Default: test)" >&2
 | 
			
		||||
  echo -e "\nOther environment variables:\n" >&2
 | 
			
		||||
  echo -e "\t\"TEST_SELECTION\" test a specific group of tests, can be one of: $TESTS" >&2
 | 
			
		||||
| 
						 | 
				
			
			@ -65,7 +65,7 @@ else
 | 
			
		|||
  exit 3
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
echo "Installing depdendencies"
 | 
			
		||||
echo "Installing dependencies"
 | 
			
		||||
${PHP} "$COMPOSER" install
 | 
			
		||||
 | 
			
		||||
PHPUNIT="${BASEDIR}/vendor/bin/phpunit"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -71,7 +71,7 @@ CREATE TABLE IF NOT EXISTS `user` (
 | 
			
		|||
	`verified` boolean NOT NULL DEFAULT '0' COMMENT 'user is verified through email',
 | 
			
		||||
	`blocked` boolean NOT NULL DEFAULT '0' COMMENT '1 for user is blocked',
 | 
			
		||||
	`blockwall` boolean NOT NULL DEFAULT '0' COMMENT 'Prohibit contacts to post to the profile page of the user',
 | 
			
		||||
	`hidewall` boolean NOT NULL DEFAULT '0' COMMENT 'Hide profile details from unkown viewers',
 | 
			
		||||
	`hidewall` boolean NOT NULL DEFAULT '0' COMMENT 'Hide profile details from unknown viewers',
 | 
			
		||||
	`blocktags` boolean NOT NULL DEFAULT '0' COMMENT 'Prohibit contacts to tag the post of this user',
 | 
			
		||||
	`unkmail` boolean NOT NULL DEFAULT '0' COMMENT 'Permit unknown people to send private mails to this user',
 | 
			
		||||
	`cntunkmail` int unsigned NOT NULL DEFAULT 10 COMMENT '',
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -305,7 +305,7 @@ Returns [Private Messages](help/API-Entities#Private+message) matching the provi
 | 
			
		|||
#### Parameters
 | 
			
		||||
 | 
			
		||||
* `searchstring`: string for which the API call should search as '%searchstring%' in field 'body' of all messages of the authenticated user (caption ignored)
 | 
			
		||||
* `getText` (optional): `plain`|`html` If ommited, the title is prepended to the plaintext body in the `text` attribute of the private message objects.
 | 
			
		||||
* `getText` (optional): `plain`|`html` If omitted, the title is prepended to the plaintext body in the `text` attribute of the private message objects.
 | 
			
		||||
* `getUserObjects` (optional): `true`|`false` If `false`, the `sender` and `recipient` attributes of the private message object are absent.
 | 
			
		||||
 | 
			
		||||
#### Return values
 | 
			
		||||
| 
						 | 
				
			
			@ -646,7 +646,7 @@ On error:
 | 
			
		|||
 | 
			
		||||
* 403 FORBIDDEN: if not authenticated
 | 
			
		||||
* 400 BADREQUEST: "no albumname specified", "album not available"
 | 
			
		||||
* 500 INTERNALSERVERERROR: "problem with deleting item occured", "unknown error - deleting from database failed"
 | 
			
		||||
* 500 INTERNALSERVERERROR: "problem with deleting item occurred", "unknown error - deleting from database failed"
 | 
			
		||||
 | 
			
		||||
### POST api/friendica/photoalbum/update
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -265,7 +265,7 @@ Example:
 | 
			
		|||
 | 
			
		||||
## Currently unimplemented endpoints
 | 
			
		||||
 | 
			
		||||
These emdpoints are planned to be implemented somewhere in the future.
 | 
			
		||||
These endpoints are planned to be implemented somewhere in the future.
 | 
			
		||||
 | 
			
		||||
- [`POST /api/v1/accounts/:id/remove_from_followers`](https://github.com/mastodon/mastodon/pull/16864)
 | 
			
		||||
- [`GET /api/v1/accounts/familiar_followers`](https://github.com/mastodon/mastodon/pull/17700)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,7 +10,7 @@ Not all Friendica sites allow open registration.
 | 
			
		|||
If registration is allowed, you will see a "Register" link immediately below the login prompt on the site's home page.
 | 
			
		||||
Following this link will take you to the site registration page.
 | 
			
		||||
The strength of our network is that lots of different sites are all completely compatible with each other.
 | 
			
		||||
If the site you're visting doesn't allow registration, or you think you might prefer another one, there is a [list of public servers here](https://dir.friendica.social/servers) and hopefully you will find one that meets your needs.
 | 
			
		||||
If the site you're visiting doesn't allow registration, or you think you might prefer another one, there is a [list of public servers here](https://dir.friendica.social/servers) and hopefully you will find one that meets your needs.
 | 
			
		||||
 | 
			
		||||
If you'd like to have your own server, you can do that too.
 | 
			
		||||
Visit [the Friendica website](http://friendi.ca/) to download the code with setup instructions.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -100,7 +100,7 @@ See doxygen documentation of `IWritableStorage` interface for details about each
 | 
			
		|||
 | 
			
		||||
## Register a storage backend class
 | 
			
		||||
 | 
			
		||||
Each backend must be registered in the system when the plugin is installed, to be aviable.
 | 
			
		||||
Each backend must be registered in the system when the plugin is installed, to be available.
 | 
			
		||||
 | 
			
		||||
`DI::facStorage()->register(string $class)` is used to register the backend class.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -140,18 +140,18 @@ abstract class StorageTest
 | 
			
		|||
 | 
			
		||||
There are two intended types of exceptions for storages
 | 
			
		||||
 | 
			
		||||
### `ReferenceStorageExecption`
 | 
			
		||||
### `ReferenceStorageException`
 | 
			
		||||
 | 
			
		||||
This storage exception should be used in case the caller tries to use an invalid references.
 | 
			
		||||
This could happen in case the caller tries to delete or update an unknown reference.
 | 
			
		||||
The implementation of the storage backend must not ignore invalid references.
 | 
			
		||||
 | 
			
		||||
Avoid throwing the common `StorageExecption` instead of the `ReferenceStorageException` at this particular situation!
 | 
			
		||||
Avoid throwing the common `StorageException` instead of the `ReferenceStorageException` at this particular situation!
 | 
			
		||||
 | 
			
		||||
### `StorageException`
 | 
			
		||||
 | 
			
		||||
This is the common exception in case unexpected errors happen using the storage backend.
 | 
			
		||||
If there's a predecessor to this exception (e.g. you caught an exception and are throwing this execption), you should add the predecessor for transparency reasons.
 | 
			
		||||
If there's a predecessor to this exception (e.g. you caught an exception and are throwing this exception), you should add the predecessor for transparency reasons.
 | 
			
		||||
 | 
			
		||||
Example:
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -320,7 +320,7 @@ The file is `addon/samplestorage/samplestorage.php`
 | 
			
		|||
<?php
 | 
			
		||||
/**
 | 
			
		||||
 * Name: Sample Storage Addon
 | 
			
		||||
 * Description: A sample addon which implements an unusefull storage backend
 | 
			
		||||
 * Description: A sample addon which implements a very limited storage backend
 | 
			
		||||
 * Version: 1.0.0
 | 
			
		||||
 * Author: Alice <https://alice.social/~alice>
 | 
			
		||||
 */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -124,7 +124,7 @@ function <addon>_footer()
 | 
			
		|||
### JavaScript hooks
 | 
			
		||||
 | 
			
		||||
The main Friendica script provides hooks via events dispatched on the `document` property.
 | 
			
		||||
In your Javascript file included as described above, add your event listener like this:
 | 
			
		||||
In your JavaScript file included as described above, add your event listener like this:
 | 
			
		||||
 | 
			
		||||
```js
 | 
			
		||||
document.addEventListener(name, callback);
 | 
			
		||||
| 
						 | 
				
			
			@ -133,7 +133,7 @@ document.addEventListener(name, callback);
 | 
			
		|||
- *name* is the name of the hook and corresponds to a known Friendica JavaScript hook.
 | 
			
		||||
- *callback* is a JavaScript anonymous function to execute.
 | 
			
		||||
 | 
			
		||||
More info about Javascript event listeners: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
 | 
			
		||||
More info about JavaScript event listeners: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
 | 
			
		||||
 | 
			
		||||
#### Current JavaScript hooks
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -425,7 +425,7 @@ Called after HTML content functions have completed.
 | 
			
		|||
 | 
			
		||||
### footer
 | 
			
		||||
Called after HTML content functions have completed.
 | 
			
		||||
Deferred Javascript files should be registered using this hook.
 | 
			
		||||
Deferred JavaScript files should be registered using this hook.
 | 
			
		||||
`$b` is (string) HTML of footer div/element.
 | 
			
		||||
 | 
			
		||||
### avatar_lookup
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -39,7 +39,7 @@ You can use several servers to create an account:
 | 
			
		|||
 | 
			
		||||
### 1. Basics
 | 
			
		||||
 | 
			
		||||
At first you have to get the current version. You can either pull it from [Github](https://github.com) like so:
 | 
			
		||||
At first you have to get the current version. You can either pull it from [GitHub](https://github.com) like so:
 | 
			
		||||
 | 
			
		||||
    $> cd /var/www/virtual/YOURSPACE/html/addon; git pull
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -20,7 +20,7 @@ Composer requires PHP CLI and the following examples assume it's available syste
 | 
			
		|||
 | 
			
		||||
#### From Archive
 | 
			
		||||
 | 
			
		||||
If you just unpacked a Friendica release archive, you don't have to use Commposer at all, all the required libraries are already bundled in the archive.
 | 
			
		||||
If you just unpacked a Friendica release archive, you don't have to use Composer at all, all the required libraries are already bundled in the archive.
 | 
			
		||||
 | 
			
		||||
#### Installing with Git
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -250,7 +250,7 @@ key = value
 | 
			
		|||
		<tr>
 | 
			
		||||
            <td><pre>
 | 
			
		||||
[config]
 | 
			
		||||
register_policty = REGISTER_CLOSED
 | 
			
		||||
register_policy = REGISTER_CLOSED
 | 
			
		||||
</pre></td>
 | 
			
		||||
        			<td><pre>
 | 
			
		||||
'config' => [
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -95,7 +95,7 @@ Please remove all the `require_once` mentions of the former file, as they will p
 | 
			
		|||
## Miscellaneous tips
 | 
			
		||||
 | 
			
		||||
When you are done with moving the class, please run `php bin/console.php typo` from the Friendica base directory to check for obvious mistakes.
 | 
			
		||||
Howevever, this tool isn't bullet-proof, and a staging install of Friendica is recommended to test your class move without impairing your production server if you host one.
 | 
			
		||||
However, this tool isn't bullet-proof, and a staging install of Friendica is recommended to test your class move without impairing your production server if you host one.
 | 
			
		||||
 | 
			
		||||
Most of Friendica processes are run in the background, so make sure to turn on your debug log to check for errors that wouldn't show up while simply browsing Friendica.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -92,7 +92,7 @@ For documentation we use the standard of *one sentence per line* for the `md` fi
 | 
			
		|||
 | 
			
		||||
#### Check with [PHP Code Sniffer](https://github.com/squizlabs/PHP_CodeSniffer)
 | 
			
		||||
 | 
			
		||||
This tool checks your files against a variety of coding standards, including PSR-2, and ouputs a report of all the standard violations.
 | 
			
		||||
This tool checks your files against a variety of coding standards, including PSR-2, and outputs a report of all the standard violations.
 | 
			
		||||
You can simply install it through PEAR: `pear install PHP_CodeSniffer`
 | 
			
		||||
Once it is installed and available in your PATH, here's the command to run before committing your work:
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -109,7 +109,7 @@ Here's the command to automatically fix the files you created/modified:
 | 
			
		|||
 | 
			
		||||
	$> phpcbf --standard=ruleset.xml <file or directory>
 | 
			
		||||
 | 
			
		||||
If the command-line tools `diff` and `patch` are unavailabe for you, `phpcbf` can use slightly slower PHP equivalents by using the `--no-patch` argument.
 | 
			
		||||
If the command-line tools `diff` and `patch` are unavailable for you, `phpcbf` can use slightly slower PHP equivalents by using the `--no-patch` argument.
 | 
			
		||||
 | 
			
		||||
### Code documentation
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -42,7 +42,7 @@ Friendica Documentation and Resources
 | 
			
		|||
 | 
			
		||||
* [Get started](help/Developers-Intro)
 | 
			
		||||
* Set up development environment
 | 
			
		||||
	* [Help on Github](help/Github)
 | 
			
		||||
	* [Help on GitHub](help/GitHub)
 | 
			
		||||
	* [Help on Vagrant](help/Vagrant)
 | 
			
		||||
	* [Bugs and Issues](help/Bugs-and-Issues)
 | 
			
		||||
* Code structure
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -231,7 +231,7 @@ Copy `.htaccess-dist` to `.htaccess` (be careful under Windows) to have working
 | 
			
		|||
 | 
			
		||||
Example:
 | 
			
		||||
 | 
			
		||||
    cp .htacces-dist .htaccess
 | 
			
		||||
    cp .htaccess-dist .htaccess
 | 
			
		||||
 | 
			
		||||
*Note*: Do **not** rename the `.htaccess-dist` file as it is tracked by GIT and renaming will cause a dirty working directory.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -353,7 +353,7 @@ Often this will need to be resolved with your hosting provider or (if self-hoste
 | 
			
		|||
First check your file permissions.
 | 
			
		||||
Your website and all contents must generally be world-readable.
 | 
			
		||||
 | 
			
		||||
Ensure that mod-rewite is installed and working, and that your `.htaccess` file
 | 
			
		||||
Ensure that mod-rewrite is installed and working, and that your `.htaccess` file
 | 
			
		||||
is being used. To verify the latter, create a file `test.out` containing the
 | 
			
		||||
word "test" in the top directory of Friendica, make it world readable and point
 | 
			
		||||
your web browser to
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -55,7 +55,7 @@ You can also use your Identity Address or other people's Identity Addresses to b
 | 
			
		|||
Currently, Friendica supports connections with people on diaspora*, Red, Hubzilla, GNU Social, StatusNet, Mastodon, Pleroma, socialhome, and ganggo platforms.
 | 
			
		||||
 | 
			
		||||
If you know (for instance) "alice" on gnusocial.net (a GNU Social site) you could put alice@gnusocial.net into your Contact page and become friends across networks.
 | 
			
		||||
Likwise you can put in the URL to Alice's gnusocial.net page, if you wish.
 | 
			
		||||
Likewise you can put in the URL to Alice's gnusocial.net page, if you wish.
 | 
			
		||||
Note: Some versions of GNU Social software may require the full URL to your profile and may not work with the identity address.
 | 
			
		||||
 | 
			
		||||
People on these networks can also initiate contact with you, if they know your contact details.
 | 
			
		||||
| 
						 | 
				
			
			@ -74,7 +74,7 @@ Create an email contact with for example Alice on Gmail, enter her email in foll
 | 
			
		|||
In order to avoid abuse or spam, you must have an email from Alice with the correct email address in your email inbox.
 | 
			
		||||
 | 
			
		||||
Subscribing to mailing lists is done in the same way, but without the use of the "mailto:" prefix.
 | 
			
		||||
To subscribe to a mailing list, enter the email in following example format "mailling-list@list-server.net".
 | 
			
		||||
To subscribe to a mailing list, enter the email in following example format "mailing-list@list-server.net".
 | 
			
		||||
 | 
			
		||||
### Syndication feeds
 | 
			
		||||
You can "follow" almost anybody or any website that produces a syndication feed (RSS/Atom,etc.).
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -19,7 +19,7 @@ Friendica contacts
 | 
			
		|||
---
 | 
			
		||||
Friendica will recreate your account on the new server, with your contacts and groups.
 | 
			
		||||
A message is sent to Friendica contacts, to inform them about your move:
 | 
			
		||||
If your contacts are runnning on an updated server, your details on their side will be automatically updated.
 | 
			
		||||
If your contacts are running on an updated server, your details on their side will be automatically updated.
 | 
			
		||||
 | 
			
		||||
GNU Social contacts
 | 
			
		||||
---
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,7 +4,7 @@ If you're not already logged in, do so in the frame below.
 | 
			
		|||
Once you've logged in (or if you are already logged in), you'll now be looking at your profile page.
 | 
			
		||||
 | 
			
		||||
This is a bit like a Facebook wall.
 | 
			
		||||
It's where all your status messgages are kept, and where your friends come to post on your wall.
 | 
			
		||||
It's where all your status messages are kept, and where your friends come to post on your wall.
 | 
			
		||||
 | 
			
		||||
To write your status, simply click on the Pencil & Paper icon in the top right (in the Frio theme), or click in the box that says "share" (other themes).
 | 
			
		||||
When you do this, the posting dialog box will appear or the share box will expand.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -104,12 +104,12 @@ Default is false.
 | 
			
		|||
#### File storage backend
 | 
			
		||||
 | 
			
		||||
Set the backend used by Friendica to store uploaded file data.
 | 
			
		||||
Two storage backends are avaiable with Friendica:
 | 
			
		||||
Two storage backends are available with Friendica:
 | 
			
		||||
 | 
			
		||||
- **Database** : Data is stored in a dedicated table in database (`storage`)
 | 
			
		||||
- **Filesystem** : Data is stored as file on the filesystem.
 | 
			
		||||
 | 
			
		||||
More storage backends can be avaiable from third-party addons.
 | 
			
		||||
More storage backends can be available from third-party addons.
 | 
			
		||||
If you use those, please refer to the documentation of those addons for further information.
 | 
			
		||||
 | 
			
		||||
Default value is 'Database (legacy)': it's the legacy way used to store data directly in database.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,7 +13,7 @@ If 2FA is already enabled and you want to add another device, you must re-config
 | 
			
		|||
### 1. Download an authenticator app
 | 
			
		||||
 | 
			
		||||
Any authenticator app should work with Friendica.
 | 
			
		||||
Notheless, we recommend:
 | 
			
		||||
Nonetheless, we recommend:
 | 
			
		||||
 | 
			
		||||
 - For iOS, [Matt Rubin's MIT-licensed Authenticator app](https://mattrubin.me/authenticator).
 | 
			
		||||
 - For Android, [andOTP](https://github.com/andOTP/andOTP).
 | 
			
		||||
| 
						 | 
				
			
			@ -68,7 +68,7 @@ Instead, if you enabled two-factor authentication, you have to generate app-spec
 | 
			
		|||
 | 
			
		||||
You can generate as many app-specific passwords as you want, they will be shown once to you just after you generated it.
 | 
			
		||||
Just copy and paste it in your third-party app in the Friendica account password input field at this point.
 | 
			
		||||
We recommend generating a single app-specific password for each separate third-party app you are using, using a meaningul description of the target app (like "Frienqa on my Fairphone 2").
 | 
			
		||||
We recommend generating a single app-specific password for each separate third-party app you are using, using a meaningful description of the target app (like "Frienqa on my Fairphone 2").
 | 
			
		||||
 | 
			
		||||
You can also revoke any and all app-specific password you generated this way.
 | 
			
		||||
This may log you out of the third-party application(s) you used the revoked app-specific password to log in with.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -31,7 +31,7 @@ The mysql database is called "friendica", the mysql user and password both are "
 | 
			
		|||
Your local working directory is set up as a shared directory with the VM (/vagrant).
 | 
			
		||||
7. Check the changes in your browser in the VM.
 | 
			
		||||
Find the Friendica log file `/vagrant/logfile.out` on the VM or in the `logfile.out` in you local Friendica directory.
 | 
			
		||||
8. Commit and push your changes directly back to Github.
 | 
			
		||||
8. Commit and push your changes directly back to GitHub.
 | 
			
		||||
 | 
			
		||||
If you want to stop vagrant after finishing your work, run the following command
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -32,7 +32,7 @@ Fields
 | 
			
		|||
| verified                 | user is verified through email                                                    | boolean            | NO   |     | 0                   |                |
 | 
			
		||||
| blocked                  | 1 for user is blocked                                                             | boolean            | NO   |     | 0                   |                |
 | 
			
		||||
| blockwall                | Prohibit contacts to post to the profile page of the user                         | boolean            | NO   |     | 0                   |                |
 | 
			
		||||
| hidewall                 | Hide profile details from unkown viewers                                          | boolean            | NO   |     | 0                   |                |
 | 
			
		||||
| hidewall                 | Hide profile details from unknown viewers                                         | boolean            | NO   |     | 0                   |                |
 | 
			
		||||
| blocktags                | Prohibit contacts to tag the post of this user                                    | boolean            | NO   |     | 0                   |                |
 | 
			
		||||
| unkmail                  | Permit unknown people to send private mails to this user                          | boolean            | NO   |     | 0                   |                |
 | 
			
		||||
| cntunkmail               |                                                                                   | int unsigned       | NO   |     | 10                  |                |
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,7 +9,7 @@ Depending on the theme you are using, there might be an additional link from the
 | 
			
		|||
 | 
			
		||||
## Event Overview
 | 
			
		||||
 | 
			
		||||
The overview page shows the calendar of the current month, plus a few days days at the beginning and the end.
 | 
			
		||||
The overview page shows the calendar of the current month, plus a few days at the beginning and the end.
 | 
			
		||||
Listed are all events for this month, created by you, or shared with you by your contacts,
 | 
			
		||||
This includes birthday reminders for contacts who share their birthday with you.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -37,7 +37,7 @@ Form Templates
 | 
			
		|||
To guarantee a consistent look and feel for input forms, i.e. in the settings sections, there are templates for the basic form fields.
 | 
			
		||||
They are initialized with an array of data, depending on the tyle of the field.
 | 
			
		||||
 | 
			
		||||
All of these take an array holding the values, e.g. for a one line text input field, which is required and should be used to type email addesses use something along the lines of:
 | 
			
		||||
All of these take an array holding the values, e.g. for a one line text input field, which is required and should be used to type email addresses use something along the lines of:
 | 
			
		||||
 | 
			
		||||
		'$adminmail' => array('adminmail', DI::l10n()->t('Site administrator email address'), $adminmail, DI::l10n()->t('Your account email address must match this in order to use the web admin panel.'), 'required', '', 'email'),
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -70,7 +70,7 @@ Field parameter:
 | 
			
		|||
 | 
			
		||||
### field_custom.tpl
 | 
			
		||||
 | 
			
		||||
A customizeable template to include a custom element in the form with the usual surroundings,
 | 
			
		||||
A customizable template to include a custom element in the form with the usual surroundings,
 | 
			
		||||
Field parameter:
 | 
			
		||||
 | 
			
		||||
0. Name of the field,
 | 
			
		||||
| 
						 | 
				
			
			@ -88,7 +88,7 @@ Field parameter:
 | 
			
		|||
2. Current value of the variable,
 | 
			
		||||
3. Help text for the input box,
 | 
			
		||||
4. Should be set to the translation of "Required" to mark this field as required,
 | 
			
		||||
5. if set to "autofocus" modern browser will put the cursur into this box once the page is loaded,
 | 
			
		||||
5. if set to "autofocus" modern browser will put the cursor into this box once the page is loaded,
 | 
			
		||||
6. if set, it will be used for the input type, default is `text` (possible types: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#%3Cinput%3E_types).
 | 
			
		||||
 | 
			
		||||
### field_intcheckbox.tpl
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -12,7 +12,7 @@ So, how to work on the UI of friendica.
 | 
			
		|||
You can either directly edit an existing theme.
 | 
			
		||||
But you might loose your changes when the theme is updated by the friendica team.
 | 
			
		||||
 | 
			
		||||
If you are almost happy with an existing theme, the easiest way to cover your needs is to create a new theme, inheritating most of the properties of the parent theme and change just minor stuff.
 | 
			
		||||
If you are almost happy with an existing theme, the easiest way to cover your needs is to create a new theme, inheriting most of the properties of the parent theme and change just minor stuff.
 | 
			
		||||
The below for a more detailed description of theme heritage.
 | 
			
		||||
 | 
			
		||||
Some themes also allow users to select *variants* of the theme.
 | 
			
		||||
| 
						 | 
				
			
			@ -33,7 +33,7 @@ In most cases, you can found these in
 | 
			
		|||
    /view/theme/**your-theme-name**/style.css
 | 
			
		||||
 | 
			
		||||
sometimes, there is also a file called style.php in the theme directory.
 | 
			
		||||
This is only needed if the theme allowes the user to change certain things of the theme dynamically.
 | 
			
		||||
This is only needed if the theme allows the user to change certain things of the theme dynamically.
 | 
			
		||||
Say the font size or set a background image.
 | 
			
		||||
 | 
			
		||||
### Templates
 | 
			
		||||
| 
						 | 
				
			
			@ -50,7 +50,7 @@ if you want to override any template within your theme create your version of th
 | 
			
		|||
 | 
			
		||||
any template that exists there will be used instead of the default one.
 | 
			
		||||
 | 
			
		||||
### Javascript
 | 
			
		||||
### JavaScript
 | 
			
		||||
 | 
			
		||||
The same rule applies to the JavaScript files found in
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,7 +7,7 @@ Friendica translations
 | 
			
		|||
 | 
			
		||||
The Friendica translation process is based on `gettext` PO files.
 | 
			
		||||
 | 
			
		||||
Basic worflow:
 | 
			
		||||
Basic workflow:
 | 
			
		||||
1. `xgettext` is used to collect translation strings across the project in the authoritative PO file located in `view/lang/C/messages.po`.
 | 
			
		||||
2. This file makes translations strings available at [the Transifex Friendica page](https://www.transifex.com/Friendica/friendica/dashboard/).
 | 
			
		||||
3. The translation itself is done at Transifex by volunteers.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
		 Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 137 KiB  | 
| 
		 Before Width: | Height: | Size: 408 KiB After Width: | Height: | Size: 408 KiB  | 
| 
		 Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB  | 
| 
		 Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB  | 
| 
		 Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB  | 
| 
		 Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 128 KiB  | 
| 
		 Before Width: | Height: | Size: 498 KiB After Width: | Height: | Size: 498 KiB  | 
| 
		 Before Width: | Height: | Size: 300 B After Width: | Height: | Size: 300 B  | 
| 
						 | 
				
			
			@ -19,7 +19,7 @@
 | 
			
		|||
 *
 | 
			
		||||
 * This is the POST destination for most all locally posted
 | 
			
		||||
 * text stuff. This function handles status, wall-to-wall status,
 | 
			
		||||
 * local comments, and remote coments that are posted on this site
 | 
			
		||||
 * local comments, and remote comments that are posted on this site
 | 
			
		||||
 * (as opposed to being delivered in a feed).
 | 
			
		||||
 * Also processed here are posts and comments coming through the
 | 
			
		||||
 * statusnet/twitter API.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -436,7 +436,7 @@ function render_messages(array $msg, string $t): string
 | 
			
		|||
		$to_name_e = $rr['name'];
 | 
			
		||||
 | 
			
		||||
		if (is_null($rr['url'])) {
 | 
			
		||||
			// contact-id is pointing to a non existing contact
 | 
			
		||||
			// contact-id is pointing to a nonexistent contact
 | 
			
		||||
			continue;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -714,7 +714,7 @@ function photos_content(App $a)
 | 
			
		|||
		// When PHP is configured with upload_max_filesize less than maximagesize provide this lower limit.
 | 
			
		||||
		$maximagesize_bytes = (is_numeric($mis_bytes) && ($mis_bytes < $umf_bytes) ? $mis_bytes : $umf_bytes);
 | 
			
		||||
 | 
			
		||||
		// @todo We may be want to use appropriate binary prefixed dynamicly
 | 
			
		||||
		// @todo We may be want to use appropriate binary prefixed dynamically
 | 
			
		||||
		$usage_message = DI::l10n()->t('The maximum accepted image size is %s', Strings::formatBytes($maximagesize_bytes));
 | 
			
		||||
 | 
			
		||||
		$tpl = Renderer::getMarkupTemplate('photos_upload.tpl');
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -32,7 +32,7 @@ Please check software documentation to know how modify these examples to make th
 | 
			
		|||
Sample systemd unit files to start worker.php periodically.
 | 
			
		||||
 | 
			
		||||
Please place them in the correct location for your system, typically this is `/etc/systemd/system/friendicaworker.timer` and `/etc/systemd/system/friendicaworker.service`.
 | 
			
		||||
Please report problems and improvements to `!helpers@forum.friendi.ca` and `@utzer@social.yl.ms` or open an issue in [the Github Friendica page](https://github.com/friendica/friendica/issues).
 | 
			
		||||
Please report problems and improvements to `!helpers@forum.friendi.ca` and `@utzer@social.yl.ms` or open an issue in [the GitHub Friendica page](https://github.com/friendica/friendica/issues).
 | 
			
		||||
This is for usage of systemd instead of cron to start the worker periodically, the solution is a work-in-progress and can surely be improved.
 | 
			
		||||
 | 
			
		||||
## `phpstorm-code-style.xml`
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,12 +1,12 @@
 | 
			
		|||
# Bookmarklet-share2friendica
 | 
			
		||||
 | 
			
		||||
Javascript bookmarklet to share websites with your friendica account
 | 
			
		||||
JavaScript bookmarklet to share websites with your friendica account
 | 
			
		||||
 | 
			
		||||
## Getting Started
 | 
			
		||||
 | 
			
		||||
### Installing
 | 
			
		||||
 | 
			
		||||
Open the file bookmarklet-share2friendica.js and change 'YourFriendicaDoomain.tld" with your friendica domain
 | 
			
		||||
Open the file bookmarklet-share2friendica.js and change 'YourFriendicaDomain.tld" with your friendica domain
 | 
			
		||||
 | 
			
		||||
If you friendica is at https://myfriend.myfami.ly/ , the original ...
 | 
			
		||||
```javascript
 | 
			
		||||
| 
						 | 
				
			
			@ -20,7 +20,7 @@ javascript:(function(){f='https://myfriend.myfami.ly/bookmarklet/?url='+encodeUR
 | 
			
		|||
 | 
			
		||||
*Please copy the whole script, not only the part mentioned here!*
 | 
			
		||||
 | 
			
		||||
Then create a new bookmark, give it a name like "share2Friendica" and paste the script in the address field. Save it. Now you can click on that bookmarklet every time you want to share a website, you are currently reading. A new small window will open where title is prefilled and the website you want to share is put as attachement in the body of the new post.
 | 
			
		||||
Then create a new bookmark, give it a name like "share2Friendica" and paste the script in the address field. Save it. Now you can click on that bookmarklet every time you want to share a website, you are currently reading. A new small window will open where title is prefilled and the website you want to share is put as attachment in the body of the new post.
 | 
			
		||||
 | 
			
		||||
## Additional notes if it doesn't work
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
<!-- styling for this page is done in the home.css file //-->
 | 
			
		||||
 | 
			
		||||
<!-- Some node specifiv welcome message //-->
 | 
			
		||||
<!-- Some node specific welcome message //-->
 | 
			
		||||
<p>Welcome to this <a href="https://friendi.ca">Friendica</a> node!</p>
 | 
			
		||||
 | 
			
		||||
<!-- Some general notes about Friendica, the other networks and difficulty to run //-->
 | 
			
		||||
| 
						 | 
				
			
			@ -17,7 +17,7 @@
 | 
			
		|||
	</div>
 | 
			
		||||
	<div id="c3" class="homeinfobox">
 | 
			
		||||
		<h4>Is it hard to run Friendica?</h4>
 | 
			
		||||
		<p>No, not at all! You need a LAMP server, most shared hosting services that offer MySQL, PHP and the ability to run cron jobs will do just fine. If you have your own (virtual) server, for a small Friendica server something like a Raspberry2B is sufficenent from the specs.</p>
 | 
			
		||||
		<p>No, not at all! You need a LAMP server, most shared hosting services that offer MySQL, PHP and the ability to run cron jobs will do just fine. If you have your own (virtual) server, for a small Friendica server something like a Raspberry2B is sufficient from the specs.</p>
 | 
			
		||||
		<p><a href="https://github.com/friendica/friendica">Get the source</a></p>
 | 
			
		||||
	</div>
 | 
			
		||||
</div>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -22,7 +22,7 @@ the requested URL.
 | 
			
		|||
Enjoy!
 | 
			
		||||
 | 
			
		||||
On Debian Jessie with lighttpd 1.4.35-4 there was a problem encountered
 | 
			
		||||
between curl (which is used by Friendica in the background) and lighttp.
 | 
			
		||||
between curl (which is used by Friendica in the background) and lighttpd.
 | 
			
		||||
This problem caused requests being served with an error code of 417 in
 | 
			
		||||
the logs and no delivery of postings from the contacts.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -30,7 +30,7 @@ One can solve the issue by adding
 | 
			
		|||
 | 
			
		||||
    server.reject-expect-100-with-417 = "disable"
 | 
			
		||||
 | 
			
		||||
to the lighttpd configuratiion file (e.g. in the beginning with the
 | 
			
		||||
to the lighttpd configuration file (e.g. in the beginning with the
 | 
			
		||||
other 'server.xxx' settings.
 | 
			
		||||
 | 
			
		||||
---------------( config starts )-----------------
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -30,7 +30,7 @@
 | 
			
		|||
##
 | 
			
		||||
# This configuration assumes your domain is example.net
 | 
			
		||||
# You have a separate subdomain friendica.example.net
 | 
			
		||||
# You want all Friendica traffic to be https using letsencrypt with cerbot
 | 
			
		||||
# You want all Friendica traffic to be https using letsencrypt with certbot
 | 
			
		||||
# You have an SSL certificate and key for your subdomain
 | 
			
		||||
# You have PHP FastCGI Process Manager (php7.4-fpm) running on localhost
 | 
			
		||||
# You have Friendica installed in /var/www/friendica
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										14
									
								
								spec/zot.txt
									
										
									
									
									
								
							
							
						
						| 
						 | 
				
			
			@ -45,7 +45,7 @@ is a superset of salmon).
 | 
			
		|||
zot:key
 | 
			
		||||
*******
 | 
			
		||||
 | 
			
		||||
A suitable randomly generated encyption key of length 32 octets for encrypting 
 | 
			
		||||
A suitable randomly generated encryption key of length 32 octets for encrypting 
 | 
			
		||||
the salmon packet. This is then encrypted with the sender's private key and 
 | 
			
		||||
base64url encoded.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -59,7 +59,7 @@ key and base64url encoded.
 | 
			
		|||
zot:env_key
 | 
			
		||||
***********
 | 
			
		||||
 | 
			
		||||
A suitable randomly generated encyption key of length 32 octets for encrypting 
 | 
			
		||||
A suitable randomly generated encryption key of length 32 octets for encrypting 
 | 
			
		||||
the envelope. This is then encrypted with the recipient's public key and 
 | 
			
		||||
base64url encoded. For bulk deliveries, it is encrypted with the site bulk 
 | 
			
		||||
delivery public key.
 | 
			
		||||
| 
						 | 
				
			
			@ -127,7 +127,7 @@ MUST be present.
 | 
			
		|||
Z-To: zot:bob@example.com, zot:alice@example.com, mailto:dave@example.com 
 | 
			
		||||
Z-Bcc: zot:https://example.com/profile/richard
 | 
			
		||||
 | 
			
		||||
are valid entries. Adresses are comma separated and individual entries MUST NOT
 | 
			
		||||
are valid entries. Addresses are comma separated and individual entries MUST NOT
 | 
			
		||||
contain commas. There MAY be any number of ASCII space characters between
 | 
			
		||||
entries for legibility. Header lines are terminated with a linefeed character
 | 
			
		||||
(ASCII 0x0A). 
 | 
			
		||||
| 
						 | 
				
			
			@ -136,8 +136,8 @@ This specification provides the following protocol address prefixes
 | 
			
		|||
for use in Z-To: or Z-Bcc: elements:
 | 
			
		||||
 | 
			
		||||
zot: - normal zot delivery using webfinger or LRDD resolvable address
 | 
			
		||||
dfrn: - legacy DFRN mode delivery using webfinger or LRDD resovable address
 | 
			
		||||
ostatus: - normal OStatus delivery using webfinger or LRDD resovable address
 | 
			
		||||
dfrn: - legacy DFRN mode delivery using webfinger or LRDD resolvable address
 | 
			
		||||
ostatus: - normal OStatus delivery using webfinger or LRDD resolvable address
 | 
			
		||||
diaspora: - Diaspora network delivery using webfinger address
 | 
			
		||||
facebook: - Facebook profile page URL
 | 
			
		||||
twitter: - Twitter personal page URL without AJAX '#!' fragment
 | 
			
		||||
| 
						 | 
				
			
			@ -289,7 +289,7 @@ systems MAY reject foreign messages.
 | 
			
		|||
*******************************
 | 
			
		||||
 | 
			
		||||
This section of the document is considered separate from the delivery 
 | 
			
		||||
specification precding it and represents a different protocol, which is
 | 
			
		||||
specification preceding it and represents a different protocol, which is
 | 
			
		||||
currently incomplete. This will be split off into another document in the
 | 
			
		||||
future, but is presented here as a synergistic component of the Zot network
 | 
			
		||||
model. 
 | 
			
		||||
| 
						 | 
				
			
			@ -353,7 +353,7 @@ Salmon Magic Envelope
 | 
			
		|||
Atom Activity Stream Draft
 | 
			
		||||
	http://activitystrea.ms/specs/atom/1.0/
 | 
			
		||||
 | 
			
		||||
Activty Stream Base Schema
 | 
			
		||||
Activity Stream Base Schema
 | 
			
		||||
	http://activitystrea.ms/head/activity-schema.html
 | 
			
		||||
 | 
			
		||||
WebFinger Protocol
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -391,7 +391,7 @@ class App
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Returns the current theme name. May be overriden by the mobile theme name.
 | 
			
		||||
	 * Returns the current theme name. May be overridden by the mobile theme name.
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return string Current theme name or empty string in installation phase
 | 
			
		||||
	 * @throws Exception
 | 
			
		||||
| 
						 | 
				
			
			@ -532,7 +532,7 @@ class App
 | 
			
		|||
	/**
 | 
			
		||||
	 * Provide a sane default if nothing is chosen or the specified theme does not exist.
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return string Current theme's stylsheet path
 | 
			
		||||
	 * @return string Current theme's stylesheet path
 | 
			
		||||
	 * @throws Exception
 | 
			
		||||
	 */
 | 
			
		||||
	public function getCurrentThemeStylesheetPath(): string
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -291,7 +291,7 @@ class Page implements ArrayAccess
 | 
			
		|||
	 * Initializes Page->page['footer'].
 | 
			
		||||
	 *
 | 
			
		||||
	 * Includes:
 | 
			
		||||
	 * - Javascript homebase
 | 
			
		||||
	 * - JavaScript homebase
 | 
			
		||||
	 * - Mobile toggle link
 | 
			
		||||
	 * - Registered footer scripts (through App->registerFooterScript())
 | 
			
		||||
	 * - footer.tpl template
 | 
			
		||||
| 
						 | 
				
			
			@ -503,7 +503,7 @@ class Page implements ArrayAccess
 | 
			
		|||
 | 
			
		||||
			$content = mb_convert_encoding($this->page["content"], 'HTML-ENTITIES', "UTF-8");
 | 
			
		||||
 | 
			
		||||
			/// @TODO one day, kill those error-surpressing @ stuff, or PHP should ban it
 | 
			
		||||
			/// @TODO one day, kill those error-suppressing @ stuff, or PHP should ban it
 | 
			
		||||
			@$doc->loadHTML($content);
 | 
			
		||||
 | 
			
		||||
			$xpath = new DOMXPath($doc);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -412,7 +412,7 @@ class Router
 | 
			
		|||
		}
 | 
			
		||||
 | 
			
		||||
		if (!$this->lock->acquire('getCachedDispatchData', 0)) {
 | 
			
		||||
			// Immediately return uncached data when we can't aquire a lock
 | 
			
		||||
			// Immediately return uncached data when we can't acquire a lock
 | 
			
		||||
			return $this->getDispatchData();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -24,7 +24,7 @@ namespace Friendica;
 | 
			
		|||
use Psr\Log\LoggerInterface;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Factories act as an intermediary to avoid direct Entitiy instanciation.
 | 
			
		||||
 * Factories act as an intermediary to avoid direct Entity instantiation.
 | 
			
		||||
 *
 | 
			
		||||
 * @see BaseModel
 | 
			
		||||
 * @see BaseCollection
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -94,7 +94,7 @@ abstract class BaseModel extends BaseDataTransferObject
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Magic isset method. Returns true if the field exists, either in the data prperty array or in any of the local properties.
 | 
			
		||||
	 * Magic isset method. Returns true if the field exists, either in the data property array or in any of the local properties.
 | 
			
		||||
	 * Used by array_column() on an array of objects.
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param $name
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -90,9 +90,9 @@ abstract class BaseModule implements ICanHandleRequests
 | 
			
		|||
	 *
 | 
			
		||||
	 * @see L10n::tt()
 | 
			
		||||
	 */
 | 
			
		||||
	protected function tt(string $singular, string $plurarl, int $count): string
 | 
			
		||||
	protected function tt(string $singular, string $plural, int $count): string
 | 
			
		||||
	{
 | 
			
		||||
		return $this->l10n->tt($singular, $plurarl, $count);
 | 
			
		||||
		return $this->l10n->tt($singular, $plural, $count);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -30,7 +30,7 @@ use Friendica\App;
 | 
			
		|||
 *
 | 
			
		||||
 * Basically, docblox takes a list of files to build documentation from. This script assumes there is a file or set of files
 | 
			
		||||
 * breaking the build when it is included in that list. It tries to calculate the smallest list containing these files.
 | 
			
		||||
 * Unfortunatly, the original problem is NP-complete, so what the script does is a best guess only.
 | 
			
		||||
 * Unfortunately, the original problem is NP-complete, so what the script does is a best guess only.
 | 
			
		||||
 *
 | 
			
		||||
 * So it starts with a list of all files in the project.
 | 
			
		||||
 * If that list can't be build, it cuts it in two parts and tries both parts independently. If only one of them breaks,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -129,7 +129,7 @@ HELP;
 | 
			
		|||
		if (!$parameters) {
 | 
			
		||||
			$this->errored++;
 | 
			
		||||
			if ($this->getOption('v')) {
 | 
			
		||||
				$this->out('Unabled to parse parameter JSON of the row with id ' . $workerqueueItem['id']);
 | 
			
		||||
				$this->out('Unable to parse parameter JSON of the row with id ' . $workerqueueItem['id']);
 | 
			
		||||
				$this->out('JSON: ' . var_export($workerqueueItem['parameter'], true));
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			@ -155,7 +155,7 @@ HELP;
 | 
			
		|||
		} else {
 | 
			
		||||
			$this->errored++;
 | 
			
		||||
			if ($this->getOption('v')) {
 | 
			
		||||
				$this->out('Unabled to update the row with id ' . $workerqueueItem['id']);
 | 
			
		||||
				$this->out('Unable to update the row with id ' . $workerqueueItem['id']);
 | 
			
		||||
				$this->out('Fields: ' . var_export($fields, true));
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -231,7 +231,7 @@ HELP;
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Get a string and retun a message.po ready text
 | 
			
		||||
	 * Get a string and return a message.po ready text
 | 
			
		||||
	 * - replace " with \"
 | 
			
		||||
	 * - replace tab char with \t
 | 
			
		||||
	 * - manage multiline strings
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -94,7 +94,7 @@ class BoundariesPager extends Pager
 | 
			
		|||
	 * $params = ['order' => ['sort_field' => true], 'limit' => $itemsPerPage];
 | 
			
		||||
	 * $items = DBA::toArray(DBA::select($table, $fields, $condition, $params));
 | 
			
		||||
	 *
 | 
			
		||||
	 * $pager = new BoundariesPager($a->query_string, $items[0]['sort_field'], $items[coutn($items) - 1]['sort_field'], $itemsPerPage);
 | 
			
		||||
	 * $pager = new BoundariesPager($a->query_string, $items[0]['sort_field'], $items[count($items) - 1]['sort_field'], $itemsPerPage);
 | 
			
		||||
	 *
 | 
			
		||||
	 * $html = $pager->renderMinimal(count($items));
 | 
			
		||||
	 *
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1362,7 +1362,7 @@ class Conversation
 | 
			
		|||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		/// @TODO: Stop recusrsively adding all children back to the top level (!!!)
 | 
			
		||||
		/// @TODO: Stop recursively adding all children back to the top level (!!!)
 | 
			
		||||
		/// However, this apparently ensures responses (likes, attendance) display (?!)
 | 
			
		||||
		foreach ($parents as $parent) {
 | 
			
		||||
			if (count($parent['children'])) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -79,7 +79,7 @@ class Feature
 | 
			
		|||
	 * Get a list of all available features
 | 
			
		||||
	 *
 | 
			
		||||
	 * The array includes the setting group, the setting name,
 | 
			
		||||
	 * explainations for the setting and if it's enabled or disabled
 | 
			
		||||
	 * explanations for the setting and if it's enabled or disabled
 | 
			
		||||
	 * by default
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param bool $filtered True removes any locked features
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -38,7 +38,7 @@ class ForumManager
 | 
			
		|||
	 *
 | 
			
		||||
	 * @param int     $uid         of the profile owner
 | 
			
		||||
	 * @param boolean $lastitem    Sort by lastitem
 | 
			
		||||
	 * @param boolean $showhidden  Show frorums which are not hidden
 | 
			
		||||
	 * @param boolean $showhidden  Show forums which are not hidden
 | 
			
		||||
	 * @param boolean $showprivate Show private groups
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return array
 | 
			
		||||
| 
						 | 
				
			
			@ -102,7 +102,7 @@ class ForumManager
 | 
			
		|||
	/**
 | 
			
		||||
	 * Forumlist widget
 | 
			
		||||
	 *
 | 
			
		||||
	 * Sidebar widget to show subcribed friendica forums. If activated
 | 
			
		||||
	 * Sidebar widget to show subscribed friendica forums. If activated
 | 
			
		||||
	 * in the settings, it appears at the notwork page sidebar
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string $baseurl Base module path
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -338,7 +338,7 @@ class Item
 | 
			
		|||
						} else {
 | 
			
		||||
							$post_type = $this->l10n->t('status');
 | 
			
		||||
						}
 | 
			
		||||
						// Let's break everthing ... ;-)
 | 
			
		||||
						// Let's break everything ... ;-)
 | 
			
		||||
						break;
 | 
			
		||||
				}
 | 
			
		||||
				$plink = '[url=' . $obj['plink'] . ']' . $post_type . '[/url]';
 | 
			
		||||
| 
						 | 
				
			
			@ -685,11 +685,11 @@ class Item
 | 
			
		|||
 | 
			
		||||
		// If it is a reshared post then reformat it to avoid display problems with two share elements
 | 
			
		||||
		if (!empty($shared)) {
 | 
			
		||||
			if (!empty($shared['guid']) && ($encaspulated_share = $this->createSharedPostByGuid($shared['guid'], true))) {
 | 
			
		||||
			if (!empty($shared['guid']) && ($encapsulated_share = $this->createSharedPostByGuid($shared['guid'], true))) {
 | 
			
		||||
				if (!empty(BBCode::fetchShareAttributes($item['body']))) {
 | 
			
		||||
					$item['body'] = preg_replace("/\[share.*?\](.*)\[\/share\]/ism", $encaspulated_share, $item['body']);
 | 
			
		||||
					$item['body'] = preg_replace("/\[share.*?\](.*)\[\/share\]/ism", $encapsulated_share, $item['body']);
 | 
			
		||||
				} else {
 | 
			
		||||
					$item['body'] .= $encaspulated_share;
 | 
			
		||||
					$item['body'] .= $encapsulated_share;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			$item['body'] = HTML::toBBCode(BBCode::convertForUriId($item['uri-id'], $item['body'], BBCode::ACTIVITYPUB));
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -385,7 +385,7 @@ class OEmbed
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Returns a formmated HTML code from given URL and sets optional title
 | 
			
		||||
	 * Returns a formatted HTML code from given URL and sets optional title
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string $url URL to fetch
 | 
			
		||||
	 * @param string $title Optional title (default: what comes from OEmbed object)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -141,7 +141,7 @@ class PageInfo
 | 
			
		|||
			$data['text'] = '';
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// Only embedd a picture link when it seems to be a valid picture ("width" is set)
 | 
			
		||||
		// Only embed a picture link when it seems to be a valid picture ("width" is set)
 | 
			
		||||
		if (!empty($data['images']) && !empty($data['images'][0]['width'])) {
 | 
			
		||||
			$preview = str_replace(['[', ']'], ['[', ']'], htmlentities($data['images'][0]['src'], ENT_QUOTES, 'UTF-8', false));
 | 
			
		||||
			// if the preview picture is larger than 500 pixels then show it in a larger mode
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -133,7 +133,7 @@ class Smilies
 | 
			
		|||
		'<img class="smiley" src="' . $baseUrl . '/images/smiley-cry.gif" alt=":\'(" title=":\'("/>',
 | 
			
		||||
		'<img class="smiley" src="' . $baseUrl . '/images/smiley-foot-in-mouth.gif" alt=":-!" title=":-!" />',
 | 
			
		||||
		'<img class="smiley" src="' . $baseUrl . '/images/smiley-undecided.gif" alt=":-/" title=":-/" />',
 | 
			
		||||
		'<img class="smiley" src="' . $baseUrl . '/images/smiley-embarassed.gif" alt=":-[" title=":-[" />',
 | 
			
		||||
		'<img class="smiley" src="' . $baseUrl . '/images/smiley-embarrassed.gif" alt=":-[" title=":-[" />',
 | 
			
		||||
		'<img class="smiley" src="' . $baseUrl . '/images/smiley-cool.gif" alt="8-)" title="8-)" />',
 | 
			
		||||
		'<img class="smiley" src="' . $baseUrl . '/images/beer_mug.gif" alt=":beer" title=":beer" />',
 | 
			
		||||
		'<img class="smiley" src="' . $baseUrl . '/images/beer_mug.gif" alt=":homebrew" title=":homebrew" />',
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1373,7 +1373,7 @@ class BBCode
 | 
			
		|||
					});
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				// leave open the posibility of [map=something]
 | 
			
		||||
				// leave open the possibility of [map=something]
 | 
			
		||||
				// this is replaced in Item::prepareBody() which has knowledge of the item location
 | 
			
		||||
				if (strpos($text, '[/map]') !== false) {
 | 
			
		||||
					$text = preg_replace_callback(
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -180,7 +180,7 @@ class Plaintext
 | 
			
		|||
				$msg = trim($post['description']);
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			// If the link is already contained in the post, then it neeedn't to be added again
 | 
			
		||||
			// If the link is already contained in the post, then it needn't to be added again
 | 
			
		||||
			// But: if the link is beyond the limit, then it has to be added.
 | 
			
		||||
			if (($link != '') && strstr($msg, $link)) {
 | 
			
		||||
				$pos = strpos($msg, $link);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -59,7 +59,7 @@ class Widget
 | 
			
		|||
	/**
 | 
			
		||||
	 * Return Find People widget
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return string HTML code respresenting "People Widget"
 | 
			
		||||
	 * @return string HTML code representing "People Widget"
 | 
			
		||||
	 */
 | 
			
		||||
	public static function findPeople(): string
 | 
			
		||||
	{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -47,7 +47,7 @@ class ACL
 | 
			
		|||
	/**
 | 
			
		||||
	 * Returns a select input tag for private message recipient
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param int  $selected Existing recipien contact ID
 | 
			
		||||
	 * @param int  $selected Existing recipient contact ID
 | 
			
		||||
	 * @return string
 | 
			
		||||
	 * @throws \Exception
 | 
			
		||||
	 */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -590,8 +590,8 @@ class Installer
 | 
			
		|||
	 * TLS Check
 | 
			
		||||
	 *
 | 
			
		||||
	 * Tries to determine whether the connection to the server is secured
 | 
			
		||||
	 * by TLS or not. If not the user will be warned that it is higly
 | 
			
		||||
	 * encuraged to use TLS.
 | 
			
		||||
	 * by TLS or not. If not the user will be warned that it is highly
 | 
			
		||||
	 * encouraged to use TLS.
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return bool (true) as TLS is not mandatory
 | 
			
		||||
	 */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -334,7 +334,7 @@ class L10n
 | 
			
		|||
					// for some languages there is only a single array item
 | 
			
		||||
					$s = $t[0];
 | 
			
		||||
				}
 | 
			
		||||
				// if $t is empty, skip it, because empty strings array are indended
 | 
			
		||||
				// if $t is empty, skip it, because empty strings array are intended
 | 
			
		||||
				// to make string file smaller when there's no translation
 | 
			
		||||
			} else {
 | 
			
		||||
				$s = $t;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -206,7 +206,7 @@ class Logger
 | 
			
		|||
	 * An alternative logger for development.
 | 
			
		||||
	 *
 | 
			
		||||
	 * Works largely as log() but allows developers
 | 
			
		||||
	 * to isolate particular elements they are targetting
 | 
			
		||||
	 * to isolate particular elements they are targeting
 | 
			
		||||
	 * personally without background noise
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string $message Message to log
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -27,7 +27,7 @@ use Friendica\Core\Storage\Exception\StorageException;
 | 
			
		|||
/**
 | 
			
		||||
 * Interface for writable storage backends
 | 
			
		||||
 *
 | 
			
		||||
 * Used for storages with CRUD functionality, mainly used for user data (e.g. photos, attachements).
 | 
			
		||||
 * Used for storages with CRUD functionality, mainly used for user data (e.g. photos, attachments).
 | 
			
		||||
 * There's only one active writable storage possible. This type of storage is selectable by the current administrator.
 | 
			
		||||
 */
 | 
			
		||||
interface ICanWriteToStorage extends ICanReadFromStorage
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -35,7 +35,7 @@ use Friendica\Util\Strings;
 | 
			
		|||
 * Best would be for storage folder to be outside webserver folder, we are using a
 | 
			
		||||
 * folder relative to code tree root as default to ease things for users in shared hostings.
 | 
			
		||||
 * Each new resource gets a value as reference and is saved in a
 | 
			
		||||
 * folder tree stucture created from that value.
 | 
			
		||||
 * folder tree structure created from that value.
 | 
			
		||||
 */
 | 
			
		||||
class Filesystem implements ICanWriteToStorage
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -321,7 +321,7 @@ class System
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * This function adds the content and a content-teype HTTP header to the output.
 | 
			
		||||
	 * This function adds the content and a content-type HTTP header to the output.
 | 
			
		||||
	 * After finishing the process is getting killed.
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string $content
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -362,7 +362,7 @@ class Worker
 | 
			
		|||
			return false;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// Check for existance and validity of the include file
 | 
			
		||||
		// Check for existence and validity of the include file
 | 
			
		||||
		$include = $argv[0];
 | 
			
		||||
 | 
			
		||||
		if (method_exists(sprintf('Friendica\Worker\%s', $include), 'execute')) {
 | 
			
		||||
| 
						 | 
				
			
			@ -590,7 +590,7 @@ class Worker
 | 
			
		|||
		/* With these values we can analyze how effective the worker is.
 | 
			
		||||
		 * The database and rest time should be low since this is the unproductive time.
 | 
			
		||||
		 * The execution time is the productive time.
 | 
			
		||||
		 * By changing parameters like the maximum number of workers we can check the effectivness.
 | 
			
		||||
		 * By changing parameters like the maximum number of workers we can check the effectiveness.
 | 
			
		||||
		*/
 | 
			
		||||
		$dbtotal = round(self::$db_duration, 2);
 | 
			
		||||
		$dbread  = round(self::$db_duration - (self::$db_duration_count + self::$db_duration_write + self::$db_duration_stat), 2);
 | 
			
		||||
| 
						 | 
				
			
			@ -885,7 +885,7 @@ class Worker
 | 
			
		|||
	/**
 | 
			
		||||
	 * Returns waiting jobs for the current process id
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return array|bool waiting workerqueue jobs or FALSE on failture
 | 
			
		||||
	 * @return array|bool waiting workerqueue jobs or FALSE on failure
 | 
			
		||||
	 * @throws \Exception
 | 
			
		||||
	 */
 | 
			
		||||
	private static function getWaitingJobForPID()
 | 
			
		||||
| 
						 | 
				
			
			@ -1422,7 +1422,7 @@ class Worker
 | 
			
		|||
	 */
 | 
			
		||||
	public static function isInMaintenanceWindow(bool $check_last_execution = false): bool
 | 
			
		||||
	{
 | 
			
		||||
		// Calculate the seconds of the start end end of the maintenance window
 | 
			
		||||
		// Calculate the seconds of the start and end of the maintenance window
 | 
			
		||||
		$start = strtotime(DI::config()->get('system', 'maintenance_start')) % 86400;
 | 
			
		||||
		$end = strtotime(DI::config()->get('system', 'maintenance_end')) % 86400;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -69,7 +69,7 @@ abstract class DI
 | 
			
		|||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Returns a clone of the current dice instance
 | 
			
		||||
	 * This usefull for overloading the current instance with mocked methods during tests
 | 
			
		||||
	 * This useful for overloading the current instance with mocked methods during tests
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return Dice
 | 
			
		||||
	 */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -205,7 +205,7 @@ class DBA
 | 
			
		|||
	 * Please use DBA::delete, DBA::insert, DBA::update, ... instead
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string $sql SQL statement
 | 
			
		||||
	 * @return boolean Was the query successfull? False is returned only if an error occurred
 | 
			
		||||
	 * @return boolean Was the query successful? False is returned only if an error occurred
 | 
			
		||||
	 * @throws \Exception
 | 
			
		||||
	 */
 | 
			
		||||
	public static function e(string $sql): bool
 | 
			
		||||
| 
						 | 
				
			
			@ -420,7 +420,7 @@ class DBA
 | 
			
		|||
	 * @param array|boolean $old_fields array with the old field values that are about to be replaced (true = update on duplicate, false = don't update identical fields)
 | 
			
		||||
	 * @param array         $params     Parameters: "ignore" If set to "true" then the update is done with the ignore parameter
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return boolean was the update successfull?
 | 
			
		||||
	 * @return boolean was the update successful?
 | 
			
		||||
	 * @throws \Exception
 | 
			
		||||
	 */
 | 
			
		||||
	public static function update(string $table, array $fields, array $condition, $old_fields = [], array $params = []): bool
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -767,7 +767,7 @@ class Database
 | 
			
		|||
	 *
 | 
			
		||||
	 * @param string $sql SQL statement
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return boolean Was the query successfull? False is returned only if an error occurred
 | 
			
		||||
	 * @return boolean Was the query successful? False is returned only if an error occurred
 | 
			
		||||
	 * @throws \Exception
 | 
			
		||||
	 */
 | 
			
		||||
	public function e(string $sql): bool
 | 
			
		||||
| 
						 | 
				
			
			@ -1321,7 +1321,7 @@ class Database
 | 
			
		|||
	 * @param array|boolean $old_fields array with the old field values that are about to be replaced (true = update on duplicate, false = don't update identical fields)
 | 
			
		||||
	 * @param array         $params     Parameters: "ignore" If set to "true" then the update is done with the ignore parameter
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return boolean was the update successfull?
 | 
			
		||||
	 * @return boolean was the update successful?
 | 
			
		||||
	 * @throws \Exception
 | 
			
		||||
	 * @todo Implement "bool $update_on_duplicate" to avoid mixed type for $old_fields
 | 
			
		||||
	 */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -82,7 +82,7 @@ class DbaDefinition
 | 
			
		|||
		// Assign all field that are present in the table
 | 
			
		||||
		foreach ($fieldNames as $field) {
 | 
			
		||||
			if (isset($data[$field])) {
 | 
			
		||||
				// Limit the length of varchar, varbinary, char and binrary fields
 | 
			
		||||
				// Limit the length of varchar, varbinary, char and binary fields
 | 
			
		||||
				if (is_string($data[$field]) && preg_match("/char\((\d*)\)/", $definition[$table]['fields'][$field]['type'], $result)) {
 | 
			
		||||
					$data[$field] = mb_substr($data[$field], 0, $result[1]);
 | 
			
		||||
				} elseif (is_string($data[$field]) && preg_match("/binary\((\d*)\)/", $definition[$table]['fields'][$field]['type'], $result)) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -55,7 +55,7 @@ class Status extends BaseFactory
 | 
			
		|||
	/** @var Card */
 | 
			
		||||
	private $mstdnCardFactory;
 | 
			
		||||
	/** @var Attachment */
 | 
			
		||||
	private $mstdnAttachementFactory;
 | 
			
		||||
	private $mstdnAttachmentFactory;
 | 
			
		||||
	/** @var Error */
 | 
			
		||||
	private $mstdnErrorFactory;
 | 
			
		||||
	/** @var Poll */
 | 
			
		||||
| 
						 | 
				
			
			@ -70,21 +70,21 @@ class Status extends BaseFactory
 | 
			
		|||
		Mention $mstdnMentionFactory,
 | 
			
		||||
		Tag $mstdnTagFactory,
 | 
			
		||||
		Card $mstdnCardFactory,
 | 
			
		||||
		Attachment $mstdnAttachementFactory,
 | 
			
		||||
		Attachment $mstdnAttachmentFactory,
 | 
			
		||||
		Error $mstdnErrorFactory,
 | 
			
		||||
		Poll $mstdnPollFactory,
 | 
			
		||||
		ContentItem $contentItem
 | 
			
		||||
	) {
 | 
			
		||||
		parent::__construct($logger);
 | 
			
		||||
		$this->dba                     = $dba;
 | 
			
		||||
		$this->mstdnAccountFactory     = $mstdnAccountFactory;
 | 
			
		||||
		$this->mstdnMentionFactory     = $mstdnMentionFactory;
 | 
			
		||||
		$this->mstdnTagFactory         = $mstdnTagFactory;
 | 
			
		||||
		$this->mstdnCardFactory        = $mstdnCardFactory;
 | 
			
		||||
		$this->mstdnAttachementFactory = $mstdnAttachementFactory;
 | 
			
		||||
		$this->mstdnErrorFactory       = $mstdnErrorFactory;
 | 
			
		||||
		$this->mstdnPollFactory        = $mstdnPollFactory;
 | 
			
		||||
		$this->contentItem             = $contentItem;
 | 
			
		||||
		$this->dba                    = $dba;
 | 
			
		||||
		$this->mstdnAccountFactory    = $mstdnAccountFactory;
 | 
			
		||||
		$this->mstdnMentionFactory    = $mstdnMentionFactory;
 | 
			
		||||
		$this->mstdnTagFactory        = $mstdnTagFactory;
 | 
			
		||||
		$this->mstdnCardFactory       = $mstdnCardFactory;
 | 
			
		||||
		$this->mstdnAttachmentFactory = $mstdnAttachmentFactory;
 | 
			
		||||
		$this->mstdnErrorFactory      = $mstdnErrorFactory;
 | 
			
		||||
		$this->mstdnPollFactory       = $mstdnPollFactory;
 | 
			
		||||
		$this->contentItem            = $contentItem;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
| 
						 | 
				
			
			@ -214,7 +214,7 @@ class Status extends BaseFactory
 | 
			
		|||
		$tags        = $this->mstdnTagFactory->createFromUriId($uriId);
 | 
			
		||||
		if ($item['has-media']) {
 | 
			
		||||
			$card        = $this->mstdnCardFactory->createFromUriId($uriId);
 | 
			
		||||
			$attachments = $this->mstdnAttachementFactory->createFromUriId($uriId);
 | 
			
		||||
			$attachments = $this->mstdnAttachmentFactory->createFromUriId($uriId);
 | 
			
		||||
		} else {
 | 
			
		||||
			$card        = new \Friendica\Object\Api\Mastodon\Card([]);
 | 
			
		||||
			$attachments = [];
 | 
			
		||||
| 
						 | 
				
			
			@ -258,7 +258,7 @@ class Status extends BaseFactory
 | 
			
		|||
					}
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				foreach ($this->mstdnAttachementFactory->createFromUriId($shared_uri_id) as $attachment) {
 | 
			
		||||
				foreach ($this->mstdnAttachmentFactory->createFromUriId($shared_uri_id) as $attachment) {
 | 
			
		||||
					if (!in_array($attachment, $attachments)) {
 | 
			
		||||
						$attachments[] = $attachment;
 | 
			
		||||
					}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -32,7 +32,7 @@ use Friendica\Util\Mimetype;
 | 
			
		|||
use Friendica\Security\Security;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class to handle attach dabatase table
 | 
			
		||||
 * Class to handle attach database table
 | 
			
		||||
 */
 | 
			
		||||
class Attach
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			@ -107,7 +107,7 @@ class Attach
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Retrive a single record given the ID
 | 
			
		||||
	 * Retrieve a single record given the ID
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param int $id Row id of the record
 | 
			
		||||
	 *
 | 
			
		||||
| 
						 | 
				
			
			@ -122,7 +122,7 @@ class Attach
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Retrive a single record given the ID
 | 
			
		||||
	 * Retrieve a single record given the ID
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param int $id Row id of the record
 | 
			
		||||
	 *
 | 
			
		||||
| 
						 | 
				
			
			@ -192,7 +192,7 @@ class Attach
 | 
			
		|||
	 * @param string  $allow_cid Permissions, allowed contacts. optional, default = ''
 | 
			
		||||
	 * @param string  $allow_gid Permissions, allowed groups. optional, default = ''
 | 
			
		||||
	 * @param string  $deny_cid  Permissions, denied contacts.optional, default = ''
 | 
			
		||||
	 * @param string  $deny_gid  Permissions, denied greoup.optional, default = ''
 | 
			
		||||
	 * @param string  $deny_gid  Permissions, denied group.optional, default = ''
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return boolean|integer Row id on success, False on errors
 | 
			
		||||
	 * @throws \Friendica\Network\HTTPException\InternalServerErrorException
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -239,7 +239,7 @@ class Contact
 | 
			
		|||
	 * @param array         $condition  condition array with the key values
 | 
			
		||||
	 * @param array|boolean $old_fields array with the old field values that are about to be replaced (true = update on duplicate, false = don't update identical fields)
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return boolean was the update successfull?
 | 
			
		||||
	 * @return boolean was the update successful?
 | 
			
		||||
	 * @throws \Exception
 | 
			
		||||
	 * @todo Let's get rid of boolean type of $old_fields
 | 
			
		||||
	 */
 | 
			
		||||
| 
						 | 
				
			
			@ -1686,7 +1686,7 @@ class Contact
 | 
			
		|||
	 * Unblocks a contact
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param int $cid Contact id to unblock
 | 
			
		||||
	 * @return bool Whether it was successfull
 | 
			
		||||
	 * @return bool Whether it was successful
 | 
			
		||||
	 */
 | 
			
		||||
	public static function unblock(int $cid): bool
 | 
			
		||||
	{
 | 
			
		||||
| 
						 | 
				
			
			@ -1733,7 +1733,7 @@ class Contact
 | 
			
		|||
	 *
 | 
			
		||||
	 * @param array  $contact   contact array
 | 
			
		||||
	 * @param string $size      Size of the avatar picture
 | 
			
		||||
	 * @param bool   $no_update Don't perfom an update if no cached avatar was found
 | 
			
		||||
	 * @param bool   $no_update Don't perform an update if no cached avatar was found
 | 
			
		||||
	 * @return string photo path
 | 
			
		||||
	 */
 | 
			
		||||
	private static function getAvatarPath(array $contact, string $size, bool $no_update = false): string
 | 
			
		||||
| 
						 | 
				
			
			@ -1767,7 +1767,7 @@ class Contact
 | 
			
		|||
	 * Return the photo path for a given contact array
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param array  $contact   Contact array
 | 
			
		||||
	 * @param bool   $no_update Don't perfom an update if no cached avatar was found
 | 
			
		||||
	 * @param bool   $no_update Don't perform an update if no cached avatar was found
 | 
			
		||||
	 * @return string photo path
 | 
			
		||||
	 */
 | 
			
		||||
	public static function getPhoto(array $contact, bool $no_update = false): string
 | 
			
		||||
| 
						 | 
				
			
			@ -1779,7 +1779,7 @@ class Contact
 | 
			
		|||
	 * Return the photo path (thumb size) for a given contact array
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param array  $contact   Contact array
 | 
			
		||||
	 * @param bool   $no_update Don't perfom an update if no cached avatar was found
 | 
			
		||||
	 * @param bool   $no_update Don't perform an update if no cached avatar was found
 | 
			
		||||
	 * @return string photo path
 | 
			
		||||
	 */
 | 
			
		||||
	public static function getThumb(array $contact, bool $no_update = false): string
 | 
			
		||||
| 
						 | 
				
			
			@ -1791,7 +1791,7 @@ class Contact
 | 
			
		|||
	 * Return the photo path (micro size) for a given contact array
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param array  $contact   Contact array
 | 
			
		||||
	 * @param bool   $no_update Don't perfom an update if no cached avatar was found
 | 
			
		||||
	 * @param bool   $no_update Don't perform an update if no cached avatar was found
 | 
			
		||||
	 * @return string photo path
 | 
			
		||||
	 */
 | 
			
		||||
	public static function getMicro(array $contact, bool $no_update = false): string
 | 
			
		||||
| 
						 | 
				
			
			@ -1803,7 +1803,7 @@ class Contact
 | 
			
		|||
	 * Check the given contact array for avatar cache fields
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param array $contact
 | 
			
		||||
	 * @param bool  $no_update Don't perfom an update if no cached avatar was found
 | 
			
		||||
	 * @param bool  $no_update Don't perform an update if no cached avatar was found
 | 
			
		||||
	 * @return array contact array with avatar cache fields
 | 
			
		||||
	 */
 | 
			
		||||
	private static function checkAvatarCacheByArray(array $contact, bool $no_update = false): array
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -49,7 +49,7 @@ class Conversation
 | 
			
		|||
	 */
 | 
			
		||||
	const UNKNOWN = 0;
 | 
			
		||||
	/**
 | 
			
		||||
	 * The message had been pushed to this sytem
 | 
			
		||||
	 * The message had been pushed to this system
 | 
			
		||||
	 */
 | 
			
		||||
	const PUSH    = 1;
 | 
			
		||||
	/**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -656,7 +656,7 @@ class Event
 | 
			
		|||
		}
 | 
			
		||||
 | 
			
		||||
		// Show edit and drop actions only if the user is the owner of the event and the event
 | 
			
		||||
		// is a real event (no bithdays).
 | 
			
		||||
		// is a real event (no birthdays).
 | 
			
		||||
		$edit = null;
 | 
			
		||||
		$copy = null;
 | 
			
		||||
		$drop = null;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -92,7 +92,7 @@ class GServer
 | 
			
		|||
	const DETECT_NODEINFO_210 = 103;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Check for the existance of a server and adds it in the background if not existant
 | 
			
		||||
	 * Check for the existence of a server and adds it in the background if not existant
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string $url
 | 
			
		||||
	 * @param boolean $only_nodeinfo
 | 
			
		||||
| 
						 | 
				
			
			@ -327,7 +327,7 @@ class GServer
 | 
			
		|||
			return DateTimeFormat::utc('now +1 month');
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// The system hadn't been successul contacted for more than a month, so try again in three months
 | 
			
		||||
		// The system hadn't been successful contacted for more than a month, so try again in three months
 | 
			
		||||
		return DateTimeFormat::utc('now +3 month');
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -557,7 +557,7 @@ class GServer
 | 
			
		|||
			return false;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// If the URL missmatches, then we mark the old entry as failure
 | 
			
		||||
		// If the URL mismatches, then we mark the old entry as failure
 | 
			
		||||
		if (!Strings::compareLink($url, $original_url)) {
 | 
			
		||||
			self::setFailureByUrl($original_url);
 | 
			
		||||
			if (!self::getID($url, true) && !Network::isUrlBlocked($url)) {
 | 
			
		||||
| 
						 | 
				
			
			@ -2437,7 +2437,7 @@ class GServer
 | 
			
		|||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// Disvover Mastodon servers
 | 
			
		||||
		// Discover Mastodon servers
 | 
			
		||||
		$accesstoken = DI::config()->get('system', 'instances_social_key');
 | 
			
		||||
 | 
			
		||||
		if (!empty($accesstoken)) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -60,7 +60,7 @@ class Group
 | 
			
		|||
	/**
 | 
			
		||||
	 * Checks whether given group id is found in database
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param int $group_id Groupd it
 | 
			
		||||
	 * @param int $group_id Group id
 | 
			
		||||
	 * @param int $uid Optional user id
 | 
			
		||||
	 * @return bool
 | 
			
		||||
	 * @throws \Exception
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -233,7 +233,7 @@ class Item
 | 
			
		|||
				Post\Media::insertFromAttachment($item['uri-id'], $fields['attach']);
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			// We only need to notfiy others when it is an original entry from us.
 | 
			
		||||
			// We only need to notify others when it is an original entry from us.
 | 
			
		||||
			// Only call the notifier when the item had been edited and records had been changed.
 | 
			
		||||
			if ($item['origin'] && !empty($fields['edited']) && ($previous['edited'] != $fields['edited'])) {
 | 
			
		||||
				$notify_items[] = $item['id'];
 | 
			
		||||
| 
						 | 
				
			
			@ -875,7 +875,7 @@ class Item
 | 
			
		|||
		/*
 | 
			
		||||
		 * Do we already have this item?
 | 
			
		||||
		 * We have to check several networks since Friendica posts could be repeated
 | 
			
		||||
		 * via OStatus (maybe Diasporsa as well)
 | 
			
		||||
		 * via OStatus (maybe Diaspora as well)
 | 
			
		||||
		 */
 | 
			
		||||
		$duplicate = self::getDuplicateID($item);
 | 
			
		||||
		if ($duplicate) {
 | 
			
		||||
| 
						 | 
				
			
			@ -933,7 +933,7 @@ class Item
 | 
			
		|||
		$item['inform']        = trim($item['inform'] ?? '');
 | 
			
		||||
		$item['file']          = trim($item['file'] ?? '');
 | 
			
		||||
 | 
			
		||||
		// Communities aren't working with the Diaspora protoccol
 | 
			
		||||
		// Communities aren't working with the Diaspora protocol
 | 
			
		||||
		if (($uid != 0) && ($item['network'] == Protocol::DIASPORA)) {
 | 
			
		||||
			$user = User::getById($uid, ['account-type']);
 | 
			
		||||
		 	if ($user['account-type'] == Contact::TYPE_COMMUNITY) {
 | 
			
		||||
| 
						 | 
				
			
			@ -1499,7 +1499,7 @@ class Item
 | 
			
		|||
 | 
			
		||||
		$users = [];
 | 
			
		||||
 | 
			
		||||
		/// @todo add a field "pcid" in the contact table that referrs to the public contact id.
 | 
			
		||||
		/// @todo add a field "pcid" in the contact table that refers to the public contact id.
 | 
			
		||||
		$owner = DBA::selectFirst('contact', ['url', 'nurl', 'alias'], ['id' => $parent['owner-id']]);
 | 
			
		||||
		if (!DBA::isResult($owner)) {
 | 
			
		||||
			return;
 | 
			
		||||
| 
						 | 
				
			
			@ -2501,12 +2501,12 @@ class Item
 | 
			
		|||
	 */
 | 
			
		||||
	public static function enumeratePermissions(array $obj, bool $check_dead = false): array
 | 
			
		||||
	{
 | 
			
		||||
		$aclFormater = DI::aclFormatter();
 | 
			
		||||
		$aclFormatter = DI::aclFormatter();
 | 
			
		||||
 | 
			
		||||
		$allow_people = $aclFormater->expand($obj['allow_cid']);
 | 
			
		||||
		$allow_groups = Group::expand($obj['uid'], $aclFormater->expand($obj['allow_gid']), $check_dead);
 | 
			
		||||
		$deny_people  = $aclFormater->expand($obj['deny_cid']);
 | 
			
		||||
		$deny_groups  = Group::expand($obj['uid'], $aclFormater->expand($obj['deny_gid']), $check_dead);
 | 
			
		||||
		$allow_people = $aclFormatter->expand($obj['allow_cid']);
 | 
			
		||||
		$allow_groups = Group::expand($obj['uid'], $aclFormatter->expand($obj['allow_gid']), $check_dead);
 | 
			
		||||
		$deny_people  = $aclFormatter->expand($obj['deny_cid']);
 | 
			
		||||
		$deny_groups  = Group::expand($obj['uid'], $aclFormatter->expand($obj['deny_gid']), $check_dead);
 | 
			
		||||
		$recipients   = array_unique(array_merge($allow_people, $allow_groups));
 | 
			
		||||
		$deny         = array_unique(array_merge($deny_people, $deny_groups));
 | 
			
		||||
		$recipients   = array_diff($recipients, $deny);
 | 
			
		||||
| 
						 | 
				
			
			@ -2615,7 +2615,7 @@ class Item
 | 
			
		|||
	 *            Activity verb. One of
 | 
			
		||||
	 *            like, unlike, dislike, undislike, attendyes, unattendyes,
 | 
			
		||||
	 *            attendno, unattendno, attendmaybe, unattendmaybe,
 | 
			
		||||
	 *            announce, unannouce
 | 
			
		||||
	 *            announce, unannounce
 | 
			
		||||
	 * @param int    $uid
 | 
			
		||||
	 * @param string $allow_cid
 | 
			
		||||
	 * @param string $allow_gid
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -67,7 +67,7 @@ class Nodeinfo
 | 
			
		|||
		DI::keyValue()->set('nodeinfo_local_posts', $posts);
 | 
			
		||||
		DI::keyValue()->set('nodeinfo_local_comments', $comments);
 | 
			
		||||
 | 
			
		||||
		$logger->info('User actitivy', ['posts' => $posts, 'comments' => $comments]);
 | 
			
		||||
		$logger->info('User activity', ['posts' => $posts, 'comments' => $comments]);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -41,7 +41,7 @@ use Friendica\Util\Proxy;
 | 
			
		|||
use Friendica\Util\Strings;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class to handle photo dabatase table
 | 
			
		||||
 * Class to handle photo database table
 | 
			
		||||
 */
 | 
			
		||||
class Photo
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			@ -101,7 +101,7 @@ class Photo
 | 
			
		|||
	 * Get photos for user id
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param integer $uid        User id
 | 
			
		||||
	 * @param string  $resourceid Rescource ID of the photo
 | 
			
		||||
	 * @param string  $resourceid Resource ID of the photo
 | 
			
		||||
	 * @param array   $conditions Array of fields for conditions
 | 
			
		||||
	 * @param array   $params     Array of several parameters
 | 
			
		||||
	 *
 | 
			
		||||
| 
						 | 
				
			
			@ -122,7 +122,7 @@ class Photo
 | 
			
		|||
	 * Get a photo for user id
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param integer $uid        User id
 | 
			
		||||
	 * @param string  $resourceid Rescource ID of the photo
 | 
			
		||||
	 * @param string  $resourceid Resource ID of the photo
 | 
			
		||||
	 * @param integer $scale      Scale of the photo. Defaults to 0
 | 
			
		||||
	 * @param array   $conditions Array of fields for conditions
 | 
			
		||||
	 * @param array   $params     Array of several parameters
 | 
			
		||||
| 
						 | 
				
			
			@ -148,7 +148,7 @@ class Photo
 | 
			
		|||
	 * on success, "no sign" image info, if user has no permission,
 | 
			
		||||
	 * false if photo does not exists
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string  $resourceid  Rescource ID of the photo
 | 
			
		||||
	 * @param string  $resourceid  Resource ID of the photo
 | 
			
		||||
	 * @param integer $scale       Scale of the photo. Defaults to 0
 | 
			
		||||
	 * @param integer $visitor_uid UID of the visitor
 | 
			
		||||
	 *
 | 
			
		||||
| 
						 | 
				
			
			@ -416,7 +416,7 @@ class Photo
 | 
			
		|||
	 * @param string  $allow_cid Permissions, allowed contacts. optional, default = ""
 | 
			
		||||
	 * @param string  $allow_gid Permissions, allowed groups. optional, default = ""
 | 
			
		||||
	 * @param string  $deny_cid  Permissions, denied contacts.optional, default = ""
 | 
			
		||||
	 * @param string  $deny_gid  Permissions, denied greoup.optional, default = ""
 | 
			
		||||
	 * @param string  $deny_gid  Permissions, denied group.optional, default = ""
 | 
			
		||||
	 * @param string  $desc      Photo caption. optional, default = ""
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return boolean True on success
 | 
			
		||||
| 
						 | 
				
			
			@ -536,7 +536,7 @@ class Photo
 | 
			
		|||
	 * @param Image $image      Image to update. Optional, default null.
 | 
			
		||||
	 * @param array $old_fields Array with the old field values that are about to be replaced (true = update on duplicate)
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return boolean  Was the update successfull?
 | 
			
		||||
	 * @return boolean  Was the update successful?
 | 
			
		||||
	 *
 | 
			
		||||
	 * @throws \Friendica\Network\HTTPException\InternalServerErrorException
 | 
			
		||||
	 * @see   \Friendica\Database\DBA::update
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -58,7 +58,7 @@ class Link
 | 
			
		|||
	 * @param int $uriId
 | 
			
		||||
	 * @param string $url
 | 
			
		||||
	 * @param string $size
 | 
			
		||||
	 * @return string Found link URL + id on success, $url on failture
 | 
			
		||||
	 * @return string Found link URL + id on success, $url on failure
 | 
			
		||||
	 */
 | 
			
		||||
	public static function getByLink(int $uriId, string $url, string $size = ''): string
 | 
			
		||||
	{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -529,7 +529,7 @@ class User
 | 
			
		|||
			// Addons can create users, and since this 'catch' branch should only
 | 
			
		||||
			// execute if getAuthenticationInfo can't find an existing user, that's
 | 
			
		||||
			// exactly what will happen here. Creating a numeric username would create
 | 
			
		||||
			// abiguity with user IDs, possibly opening up an attack vector.
 | 
			
		||||
			// ambiguity with user IDs, possibly opening up an attack vector.
 | 
			
		||||
			// So let's be very careful about that.
 | 
			
		||||
			if (empty($username) || is_numeric($username)) {
 | 
			
		||||
				throw $e;
 | 
			
		||||
| 
						 | 
				
			
			@ -684,7 +684,7 @@ class User
 | 
			
		|||
 | 
			
		||||
		if ($user['last-activity'] != $current_day) {
 | 
			
		||||
			User::update(['last-activity' => $current_day], $uid);
 | 
			
		||||
			// Set the last actitivy for all identities of the user
 | 
			
		||||
			// Set the last activity for all identities of the user
 | 
			
		||||
			DBA::update('user', ['last-activity' => $current_day], ['parent-uid' => $uid, 'account_removed' => false]);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			@ -851,7 +851,7 @@ class User
 | 
			
		|||
	 * Checks if a nickname is in the list of the forbidden nicknames
 | 
			
		||||
	 *
 | 
			
		||||
	 * Check if a nickname is forbidden from registration on the node by the
 | 
			
		||||
	 * admin. Forbidden nicknames (e.g. role namess) can be configured in the
 | 
			
		||||
	 * admin. Forbidden nicknames (e.g. role names) can be configured in the
 | 
			
		||||
	 * admin panel.
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string $nickname The nickname that should be checked
 | 
			
		||||
| 
						 | 
				
			
			@ -1232,7 +1232,7 @@ class User
 | 
			
		|||
 | 
			
		||||
				$resource_id = Photo::newResource();
 | 
			
		||||
 | 
			
		||||
				// Not using Photo::PROFILE_PHOTOS here, so that it is discovered as translateble string
 | 
			
		||||
				// Not using Photo::PROFILE_PHOTOS here, so that it is discovered as translatable string
 | 
			
		||||
				$profile_album = DI::l10n()->t('Profile Photos');
 | 
			
		||||
 | 
			
		||||
				$r = Photo::store($image, $uid, 0, $resource_id, $filename, $profile_album, 4);
 | 
			
		||||
| 
						 | 
				
			
			@ -1377,7 +1377,7 @@ class User
 | 
			
		|||
	 * permanently against re-registration, as the person was not yet
 | 
			
		||||
	 * allowed to have friends on this system
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return bool True, if the deny was successfull
 | 
			
		||||
	 * @return bool True, if the deny was successful
 | 
			
		||||
	 * @throws Exception
 | 
			
		||||
	 */
 | 
			
		||||
	public static function deny(string $hash): bool
 | 
			
		||||
| 
						 | 
				
			
			@ -1792,7 +1792,7 @@ class User
 | 
			
		|||
	 *
 | 
			
		||||
	 * @param int    $start Start count (Default is 0)
 | 
			
		||||
	 * @param int    $count Count of the items per page (Default is @see Pager::ITEMS_PER_PAGE)
 | 
			
		||||
	 * @param string $type  The type of users, which should get (all, bocked, removed)
 | 
			
		||||
	 * @param string $type  The type of users, which should get (all, blocked, removed)
 | 
			
		||||
	 * @param string $order Order of the user list (Default is 'contact.name')
 | 
			
		||||
	 * @param bool   $descending Order direction (Default is ascending)
 | 
			
		||||
	 * @return array|bool The list of the users
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -391,7 +391,7 @@ class Federation extends BaseAdmin
 | 
			
		|||
		//
 | 
			
		||||
		// clean up version numbers
 | 
			
		||||
		//
 | 
			
		||||
		// some platforms do not provide version information, add a unkown there
 | 
			
		||||
		// some platforms do not provide version information, add a unknown there
 | 
			
		||||
		// to the version string for the displayed list.
 | 
			
		||||
		foreach ($versionCounts as $key => $value) {
 | 
			
		||||
			if ($versionCounts[$key]['version'] == '') {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -110,7 +110,7 @@ class Storage extends BaseAdmin
 | 
			
		|||
				foreach ($storageConfig->getOptions() as $option => $info) {
 | 
			
		||||
 | 
			
		||||
					$type = $info[0];
 | 
			
		||||
					// Backward compatibilty with yesno field description
 | 
			
		||||
					// Backward compatibility with yesno field description
 | 
			
		||||
					if ($type == 'yesno') {
 | 
			
		||||
						$type = 'checkbox';
 | 
			
		||||
						// Remove translated labels Yes No from field info
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -51,12 +51,12 @@ class Relationships extends BaseApi
 | 
			
		|||
			$request['id'] = [$request['id']];
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		$relationsships = [];
 | 
			
		||||
		$relationships = [];
 | 
			
		||||
 | 
			
		||||
		foreach ($request['id'] as $id) {
 | 
			
		||||
			$relationsships[] = DI::mstdnRelationship()->createFromContactId($id, $uid);
 | 
			
		||||
			$relationships[] = DI::mstdnRelationship()->createFromContactId($id, $uid);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		System::jsonExit($relationsships);
 | 
			
		||||
		System::jsonExit($relationships);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -181,7 +181,7 @@ class Statuses extends BaseApi
 | 
			
		|||
			'sensitive'      => false, // Mark status and attached media as sensitive?
 | 
			
		||||
			'spoiler_text'   => '',    // Text to be shown as a warning or subject before the actual content. Statuses are generally collapsed behind this field.
 | 
			
		||||
			'visibility'     => '',    // Visibility of the posted status. One of: "public", "unlisted", "private" or "direct".
 | 
			
		||||
			'scheduled_at'   => '',    // ISO 8601 Datetime at which to schedule a status. Providing this paramter will cause ScheduledStatus to be returned instead of Status. Must be at least 5 minutes in the future.
 | 
			
		||||
			'scheduled_at'   => '',    // ISO 8601 Datetime at which to schedule a status. Providing this parameter will cause ScheduledStatus to be returned instead of Status. Must be at least 5 minutes in the future.
 | 
			
		||||
			'language'       => '',    // ISO 639 language code for this status.
 | 
			
		||||
			'friendica'      => [],	   // Friendica extensions to the standard Mastodon API spec
 | 
			
		||||
		], $request);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -49,7 +49,7 @@ class Attach extends BaseModule
 | 
			
		|||
			throw new \Friendica\Network\HTTPException\NotFoundException(DI::l10n()->t('Item was not found.'));
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// Now we'll fetch the item, if we have enough permisson
 | 
			
		||||
		// Now we'll fetch the item, if we have enough permission
 | 
			
		||||
		$item = MAttach::getByIdWithPermission($item_id);
 | 
			
		||||
		if ($item === false) {
 | 
			
		||||
			throw new \Friendica\Network\HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -158,7 +158,7 @@ abstract class BaseNotifications extends BaseModule
 | 
			
		|||
	/**
 | 
			
		||||
	 * List of pages for the Notifications TabBar
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return array with with notifications TabBar data
 | 
			
		||||
	 * @return array with notifications TabBar data
 | 
			
		||||
	 * @throws Exception
 | 
			
		||||
	 */
 | 
			
		||||
	private function getTabs()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -302,7 +302,7 @@ class Community extends BaseModule
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Database query for the comunity page
 | 
			
		||||
	 * Database query for the community page
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param $min_id
 | 
			
		||||
	 * @param $max_id
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -120,7 +120,7 @@ class Network extends BaseModule
 | 
			
		|||
			$content = '';
 | 
			
		||||
 | 
			
		||||
			if (self::$forumContactId) {
 | 
			
		||||
				// If self::$forumContactId belongs to a communitity forum or a privat goup,.add a mention to the status editor
 | 
			
		||||
				// If self::$forumContactId belongs to a community forum or a privat goup,.add a mention to the status editor
 | 
			
		||||
				$condition = ["`id` = ? AND `contact-type` = ?", self::$forumContactId, Contact::TYPE_COMMUNITY];
 | 
			
		||||
				$contact = DBA::selectFirst('contact', ['addr'], $condition);
 | 
			
		||||
				if (!empty($contact['addr'])) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -120,7 +120,7 @@ class Delegation extends BaseModule
 | 
			
		|||
 | 
			
		||||
		$identities = User::identities(DI::userSession()->getSubManagedUserId() ?: DI::userSession()->getLocalUserId());
 | 
			
		||||
 | 
			
		||||
		//getting additinal information for each identity
 | 
			
		||||
		//getting additional information for each identity
 | 
			
		||||
		foreach ($identities as $key => $identity) {
 | 
			
		||||
			$identities[$key]['thumb'] = User::getAvatarUrl($identity, Proxy::SIZE_THUMB);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -101,7 +101,7 @@ class Receive extends BaseModule
 | 
			
		|||
		}
 | 
			
		||||
 | 
			
		||||
		if ($importer['account-type'] == User::ACCOUNT_TYPE_COMMUNITY) {
 | 
			
		||||
			// Communities aren't working with the Diaspora protoccol
 | 
			
		||||
			// Communities aren't working with the Diaspora protocol
 | 
			
		||||
			// We throw an "accepted" here, so that the sender doesn't repeat the delivery
 | 
			
		||||
			throw new HTTPException\AcceptedException();
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -61,7 +61,7 @@ class PageNotFound extends BaseModule
 | 
			
		|||
		 * Otherwise we are going to emit a 404 not found.
 | 
			
		||||
		 */
 | 
			
		||||
		$queryString = $this->server['QUERY_STRING'];
 | 
			
		||||
		// Stupid browser tried to pre-fetch our Javascript img template. Don't log the event or return anything - just quietly exit.
 | 
			
		||||
		// Stupid browser tried to pre-fetch our JavaScript img template. Don't log the event or return anything - just quietly exit.
 | 
			
		||||
		if (!empty($queryString) && preg_match('/{[0-9]}/', $queryString) !== 0) {
 | 
			
		||||
			System::exit();
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -38,7 +38,7 @@ use Psr\Log\LoggerInterface;
 | 
			
		|||
/**
 | 
			
		||||
 * Asynchronous attachment upload module
 | 
			
		||||
 *
 | 
			
		||||
 * Only used as the target action of the AjaxUpload Javascript library
 | 
			
		||||
 * Only used as the target action of the AjaxUpload JavaScript library
 | 
			
		||||
 */
 | 
			
		||||
class Upload extends \Friendica\BaseModule
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -40,7 +40,7 @@ use Psr\Log\LoggerInterface;
 | 
			
		|||
/**
 | 
			
		||||
 * Asynchronous photo upload module
 | 
			
		||||
 *
 | 
			
		||||
 * Only used as the target action of the AjaxUpload Javascript library
 | 
			
		||||
 * Only used as the target action of the AjaxUpload JavaScript library
 | 
			
		||||
 */
 | 
			
		||||
class Upload extends \Friendica\BaseModule
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -79,7 +79,7 @@ class PermissionTooltip extends \Friendica\BaseModule
 | 
			
		|||
			throw new HttpException\NotFoundException(DI::l10n()->t('Model not found'));
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// Kept for backwards compatiblity
 | 
			
		||||
		// Kept for backwards compatibility
 | 
			
		||||
		Hook::callAll('lockview_content', $model);
 | 
			
		||||
 | 
			
		||||
		if ($type == 'item') {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -118,10 +118,10 @@ EOT;
 | 
			
		|||
	</object>
 | 
			
		||||
EOT;
 | 
			
		||||
 | 
			
		||||
		$tagger_link  = '[url=' . $contact['url'] . ']' . $contact['name'] . '[/url]';
 | 
			
		||||
		$aauthor_link = '[url=' . $item['author-link'] . ']' . $item['author-name'] . '[/url]';
 | 
			
		||||
		$post_link    = '[url=' . $item['plink'] . ']' . ($item['resource-id'] ? $this->t('photo') : $this->t('post')) . '[/url]';
 | 
			
		||||
		$term_link    = '#[url=' . $tagid . ']' . $term . '[/url]';
 | 
			
		||||
		$tagger_link = '[url=' . $contact['url'] . ']' . $contact['name'] . '[/url]';
 | 
			
		||||
		$author_link = '[url=' . $item['author-link'] . ']' . $item['author-name'] . '[/url]';
 | 
			
		||||
		$post_link   = '[url=' . $item['plink'] . ']' . ($item['resource-id'] ? $this->t('photo') : $this->t('post')) . '[/url]';
 | 
			
		||||
		$term_link   = '#[url=' . $tagid . ']' . $term . '[/url]';
 | 
			
		||||
 | 
			
		||||
		$post = [
 | 
			
		||||
			'guid'          => System::createUUID(),
 | 
			
		||||
| 
						 | 
				
			
			@ -138,7 +138,7 @@ EOT;
 | 
			
		|||
			'author-name'   => $contact['name'],
 | 
			
		||||
			'author-link'   => $contact['url'],
 | 
			
		||||
			'author-avatar' => $contact['thumb'],
 | 
			
		||||
			'body'          => $this->t('%1$s tagged %2$s\'s %3$s with %4$s', $tagger_link, $aauthor_link, $post_link, $term_link),
 | 
			
		||||
			'body'          => $this->t('%1$s tagged %2$s\'s %3$s with %4$s', $tagger_link, $author_link, $post_link, $term_link),
 | 
			
		||||
			'verb'          => Activity::TAG,
 | 
			
		||||
			'target-type'   => $targettype,
 | 
			
		||||
			'target'        => $target,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -254,7 +254,7 @@ class Profile extends BaseProfile
 | 
			
		|||
			);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		//show subcribed forum if it is enabled in the usersettings
 | 
			
		||||
		//show subscribed forum if it is enabled in the usersettings
 | 
			
		||||
		if (Feature::isEnabled($profile['uid'], 'forumlist_profile')) {
 | 
			
		||||
			$custom_fields += self::buildField(
 | 
			
		||||
				'forumlist',
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -106,7 +106,7 @@ class Index extends BaseSearch
 | 
			
		|||
			$search = '#' . trim(rawurldecode($_GET['tag']));
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// contruct a wrapper for the search header
 | 
			
		||||
		// construct a wrapper for the search header
 | 
			
		||||
		$o = Renderer::replaceMacros(Renderer::getMarkupTemplate('content_wrapper.tpl'), [
 | 
			
		||||
			'name' => 'search-header',
 | 
			
		||||
			'$title' => DI::l10n()->t('Search'),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -60,7 +60,7 @@ class Trust extends BaseModule
 | 
			
		|||
	/** @var TwoFactor\Repository\TrustedBrowser  */
 | 
			
		||||
	protected $trustedBrowserRepository;
 | 
			
		||||
 | 
			
		||||
	public function __construct(App $app, Authentication $auth, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, IHandleUserSessions $session, Cookie $cookie, TwoFactor\Factory\TrustedBrowser $trustedBrowserFactory, TwoFactor\Repository\TrustedBrowser $trustedBrowserRepositoy, Response $response, array $server, array $parameters = [])
 | 
			
		||||
	public function __construct(App $app, Authentication $auth, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, IHandleUserSessions $session, Cookie $cookie, TwoFactor\Factory\TrustedBrowser $trustedBrowserFactory, TwoFactor\Repository\TrustedBrowser $trustedBrowserRepository, Response $response, array $server, array $parameters = [])
 | 
			
		||||
	{
 | 
			
		||||
		parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -69,7 +69,7 @@ class Trust extends BaseModule
 | 
			
		|||
		$this->session                  = $session;
 | 
			
		||||
		$this->cookie                   = $cookie;
 | 
			
		||||
		$this->trustedBrowserFactory    = $trustedBrowserFactory;
 | 
			
		||||
		$this->trustedBrowserRepository = $trustedBrowserRepositoy;
 | 
			
		||||
		$this->trustedBrowserRepository = $trustedBrowserRepository;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	protected function post(array $request = [])
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -181,7 +181,7 @@ class Crop extends BaseSettings
 | 
			
		|||
			$havescale = $havescale || $photo['scale'] == 5;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// set an already uloaded photo as profile photo
 | 
			
		||||
		// set an already uploaded photo as profile photo
 | 
			
		||||
		// if photo is in 'Profile Photos', change it in db
 | 
			
		||||
		if ($photos[0]['photo-type'] == Photo::USER_AVATAR && $havescale) {
 | 
			
		||||
			Photo::update(['profile' => false], ['uid' => DI::userSession()->getLocalUserId()]);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -363,7 +363,7 @@ class FormattedNotify extends BaseFactory
 | 
			
		|||
	{
 | 
			
		||||
		$item['seen'] = !($item['unseen'] > 0);
 | 
			
		||||
 | 
			
		||||
		// For feed items we use the user's contact, since the avatar is mostly self choosen.
 | 
			
		||||
		// For feed items we use the user's contact, since the avatar is mostly self chosen.
 | 
			
		||||
		if (!empty($item['network']) && $item['network'] == Protocol::FEED) {
 | 
			
		||||
			$item['author-avatar'] = $item['contact-avatar'];
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -100,11 +100,11 @@ class Introduction extends BaseFactory
 | 
			
		|||
		try {
 | 
			
		||||
			$stmtNotifications = $this->dba->p(
 | 
			
		||||
				"SELECT `intro`.`id` AS `intro_id`, `intro`.*, `contact`.*,
 | 
			
		||||
				`sugggest-contact`.`name` AS `fname`, `sugggest-contact`.`url` AS `furl`, `sugggest-contact`.`addr` AS `faddr`,
 | 
			
		||||
				`sugggest-contact`.`photo` AS `fphoto`, `sugggest-contact`.`request` AS `frequest`
 | 
			
		||||
				`suggest-contact`.`name` AS `fname`, `suggest-contact`.`url` AS `furl`, `suggest-contact`.`addr` AS `faddr`,
 | 
			
		||||
				`suggest-contact`.`photo` AS `fphoto`, `suggest-contact`.`request` AS `frequest`
 | 
			
		||||
			FROM `intro`
 | 
			
		||||
				LEFT JOIN `contact` ON `contact`.`id` = `intro`.`contact-id`
 | 
			
		||||
				LEFT JOIN `contact` AS `sugggest-contact` ON `intro`.`suggest-cid` = `sugggest-contact`.`id`
 | 
			
		||||
				LEFT JOIN `contact` AS `suggest-contact` ON `intro`.`suggest-cid` = `suggest-contact`.`id`
 | 
			
		||||
			WHERE `intro`.`uid` = ? $sql_extra
 | 
			
		||||
			LIMIT ?, ?",
 | 
			
		||||
				$this->session->getLocalUserId(),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -53,7 +53,7 @@ class FormattedNavNotification extends BaseEntity
 | 
			
		|||
	 */
 | 
			
		||||
	public function __construct(string $contact_name, string $contact_url, string $contact_photo, string $timestamp, string $plaintext, string $html, string $href, bool $seen)
 | 
			
		||||
	{
 | 
			
		||||
		// Properties differ from constructor because this structure is used in the "nav-update" Javascript event listener
 | 
			
		||||
		// Properties differ from constructor because this structure is used in the "nav-update" JavaScript event listener
 | 
			
		||||
		$this->contact = [
 | 
			
		||||
			'name'  => $contact_name,
 | 
			
		||||
			'url'   => $contact_url,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -60,7 +60,7 @@ class HttpClient extends BaseFactory
 | 
			
		|||
	/**
 | 
			
		||||
	 * Creates a IHTTPClient for communications with HTTP endpoints
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param HandlerStack|null $handlerStack (optional) A handler replacement (just usefull at test environments)
 | 
			
		||||
	 * @param HandlerStack|null $handlerStack (optional) A handler replacement (just useful at test environments)
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return ICanSendHttpRequests
 | 
			
		||||
	 */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -216,7 +216,7 @@ class CurlResult implements ICanHandleHttpResponses
 | 
			
		|||
				$parts = [];
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			/// @todo Checking the corresponding RFC which parts of a redirect can be ommitted.
 | 
			
		||||
			/// @todo Checking the corresponding RFC which parts of a redirect can be omitted.
 | 
			
		||||
			$components = ['scheme', 'host', 'path', 'query', 'fragment'];
 | 
			
		||||
			foreach ($components as $component) {
 | 
			
		||||
				if (empty($redirect_parts[$component]) && !empty($parts[$component])) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,7 +23,7 @@ namespace Friendica\Network\HTTPException;
 | 
			
		|||
 | 
			
		||||
use Friendica\Network\HTTPException;
 | 
			
		||||
 | 
			
		||||
class LenghtRequiredException extends HTTPException
 | 
			
		||||
class LengthRequiredException extends HTTPException
 | 
			
		||||
{
 | 
			
		||||
	protected $code        = 411;
 | 
			
		||||
	protected $httpdesc    = 'Length Required';
 | 
			
		||||
| 
						 | 
				
			
			@ -63,7 +63,7 @@ class Probe
 | 
			
		|||
	private static $baseurl;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * @var boolean Whether a timeout has occured
 | 
			
		||||
	 * @var boolean Whether a timeout has occurred
 | 
			
		||||
	 */
 | 
			
		||||
	private static $isTimeout;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -769,7 +769,7 @@ class Probe
 | 
			
		|||
		if (empty($result['network']) && empty($ap_profile['network']) || ($network == Protocol::FEED)) {
 | 
			
		||||
			$result = self::feed($uri);
 | 
			
		||||
		} else {
 | 
			
		||||
			// We overwrite the detected nick with our try if the previois routines hadn't detected it.
 | 
			
		||||
			// We overwrite the detected nick with our try if the previous routines hadn't detected it.
 | 
			
		||||
			// Additionally, it is overwritten when the nickname doesn't make sense (contains spaces).
 | 
			
		||||
			if ((empty($result['nick']) || (strstr($result['nick'], ' '))) && ($nick != '')) {
 | 
			
		||||
				$result['nick'] = $nick;
 | 
			
		||||
| 
						 | 
				
			
			@ -1623,7 +1623,7 @@ class Probe
 | 
			
		|||
		if (!empty($feed_data['header']['author-about'])) {
 | 
			
		||||
			$data['about'] = $feed_data['header']['author-about'];
 | 
			
		||||
		}
 | 
			
		||||
		// OStatus has serious issues when the the url doesn't fit (ssl vs. non ssl)
 | 
			
		||||
		// OStatus has serious issues when the url doesn't fit (ssl vs. non ssl)
 | 
			
		||||
		// So we take the value that we just fetched, although the other one worked as well
 | 
			
		||||
		if (!empty($feed_data['header']['author-link'])) {
 | 
			
		||||
			$data['url'] = $feed_data['header']['author-link'];
 | 
			
		||||
| 
						 | 
				
			
			@ -2280,7 +2280,7 @@ class Probe
 | 
			
		|||
				]
 | 
			
		||||
			];
 | 
			
		||||
		} catch (Exception $e) {
 | 
			
		||||
			// Default values for non existing targets
 | 
			
		||||
			// Default values for nonexistent targets
 | 
			
		||||
			$data = [
 | 
			
		||||
				'name' => $url, 'nick' => $url, 'url' => $url, 'network' => Protocol::PHANTOM,
 | 
			
		||||
				'photo' => DI::baseUrl() . Contact::DEFAULT_AVATAR_PHOTO
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -208,7 +208,7 @@ class Delivery
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * mark or unmark the given receivers for archival upon succoess
 | 
			
		||||
	 * mark or unmark the given receivers for archival upon success
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param array $receivers
 | 
			
		||||
	 * @param boolean $success
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -946,7 +946,7 @@ class Processor
 | 
			
		|||
			return true;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if (in_array($activity['completion-mode'] ?? Receiver::COMPLETION_NONE, [Receiver::COMPLETION_MANUAL, Receiver::COMPLETION_ANNOUCE])) {
 | 
			
		||||
		if (in_array($activity['completion-mode'] ?? Receiver::COMPLETION_NONE, [Receiver::COMPLETION_MANUAL, Receiver::COMPLETION_ANNOUNCE])) {
 | 
			
		||||
			// Manual completions and completions caused by reshares are allowed without any further checks.
 | 
			
		||||
			Logger::debug('Message is in completion mode - accepted', ['mode' => $activity['completion-mode'], 'uri-id' => $item['uri-id'], 'guid' => $item['guid'], 'url' => $item['uri']]);
 | 
			
		||||
			return true;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -252,7 +252,7 @@ class Queue
 | 
			
		|||
	{
 | 
			
		||||
		$entries = DBA::select('inbox-entry', ['id', 'type', 'object-type', 'object-id', 'in-reply-to-id'], ["`trust` AND `wid` IS NULL"], ['order' => ['id' => true]]);
 | 
			
		||||
		while ($entry = DBA::fetch($entries)) {
 | 
			
		||||
			// Don't process entries of items that are answer to non existing posts
 | 
			
		||||
			// Don't process entries of items that are answer to nonexistent posts
 | 
			
		||||
			if (!empty($entry['in-reply-to-id']) && !Post::exists(['uri' => $entry['in-reply-to-id']])) {
 | 
			
		||||
				continue;
 | 
			
		||||
			}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -74,11 +74,11 @@ class Receiver
 | 
			
		|||
	const TARGET_ANSWER = 6;
 | 
			
		||||
	const TARGET_GLOBAL = 7;
 | 
			
		||||
 | 
			
		||||
	const COMPLETION_NONE    = 0;
 | 
			
		||||
	const COMPLETION_ANNOUCE = 1;
 | 
			
		||||
	const COMPLETION_RELAY   = 2;
 | 
			
		||||
	const COMPLETION_MANUAL  = 3;
 | 
			
		||||
	const COMPLETION_AUTO    = 4;
 | 
			
		||||
	const COMPLETION_NONE     = 0;
 | 
			
		||||
	const COMPLETION_ANNOUNCE = 1;
 | 
			
		||||
	const COMPLETION_RELAY    = 2;
 | 
			
		||||
	const COMPLETION_MANUAL   = 3;
 | 
			
		||||
	const COMPLETION_AUTO     = 4;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Checks incoming message from the inbox
 | 
			
		||||
| 
						 | 
				
			
			@ -248,7 +248,7 @@ class Receiver
 | 
			
		|||
	 * Fetches the object type for a given object id
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param array   $activity
 | 
			
		||||
	 * @param string  $object_id Object ID of the the provided object
 | 
			
		||||
	 * @param string  $object_id Object ID of the provided object
 | 
			
		||||
	 * @param integer $uid       User ID
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return string with object type or NULL
 | 
			
		||||
| 
						 | 
				
			
			@ -643,7 +643,7 @@ class Receiver
 | 
			
		|||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		$decouple = DI::config()->get('system', 'decoupled_receiver') && !in_array($completion, [self::COMPLETION_MANUAL, self::COMPLETION_ANNOUCE]);
 | 
			
		||||
		$decouple = DI::config()->get('system', 'decoupled_receiver') && !in_array($completion, [self::COMPLETION_MANUAL, self::COMPLETION_ANNOUNCE]);
 | 
			
		||||
 | 
			
		||||
		if ($decouple && ($trust_source || DI::config()->get('debug', 'ap_inbox_store_untrusted'))) {
 | 
			
		||||
			$object_data = Queue::add($object_data, $type, $uid, $http_signer, $push, $trust_source);
 | 
			
		||||
| 
						 | 
				
			
			@ -731,7 +731,7 @@ class Receiver
 | 
			
		|||
			case 'as:Announce':
 | 
			
		||||
				if (in_array($object_data['object_type'], self::CONTENT_TYPES)) {
 | 
			
		||||
					if (!Item::searchByLink($object_data['object_id'], $uid)) {
 | 
			
		||||
						if (ActivityPub\Processor::fetchMissingActivity($object_data['object_id'], [], $object_data['actor'], self::COMPLETION_ANNOUCE, $uid)) {
 | 
			
		||||
						if (ActivityPub\Processor::fetchMissingActivity($object_data['object_id'], [], $object_data['actor'], self::COMPLETION_ANNOUNCE, $uid)) {
 | 
			
		||||
							Logger::debug('Created announced id', ['uid' => $uid, 'id' => $object_data['object_id']]);
 | 
			
		||||
							Queue::remove($object_data);
 | 
			
		||||
						} else {
 | 
			
		||||
| 
						 | 
				
			
			@ -1067,7 +1067,7 @@ class Receiver
 | 
			
		|||
	{
 | 
			
		||||
		$reply = $receivers = $profile = [];
 | 
			
		||||
 | 
			
		||||
		// When it is an answer, we inherite the receivers from the parent
 | 
			
		||||
		// When it is an answer, we inherit the receivers from the parent
 | 
			
		||||
		$replyto = JsonLD::fetchElement($activity, 'as:inReplyTo', '@id');
 | 
			
		||||
		if (!empty($replyto)) {
 | 
			
		||||
			$reply = [$replyto];
 | 
			
		||||
| 
						 | 
				
			
			@ -1372,7 +1372,7 @@ class Receiver
 | 
			
		|||
	/**
 | 
			
		||||
	 * Fetches the object data from external ressources if needed
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string  $object_id    Object ID of the the provided object
 | 
			
		||||
	 * @param string  $object_id    Object ID of the provided object
 | 
			
		||||
	 * @param array   $object       The provided object array
 | 
			
		||||
	 * @param boolean $trust_source Do we trust the provided object?
 | 
			
		||||
	 * @param integer $uid          User ID for the signature that we use to fetch data
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -444,7 +444,7 @@ class Transmitter
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Get a minimal actror array for the C2S API
 | 
			
		||||
	 * Get a minimal actor array for the C2S API
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param integer $cid
 | 
			
		||||
	 * @return array
 | 
			
		||||
| 
						 | 
				
			
			@ -1830,7 +1830,7 @@ class Transmitter
 | 
			
		|||
		$item['body'] = $announce['comment'] . "\n" . $announce['object']['plink'];
 | 
			
		||||
		$activity['object'] = self::createNote($item, $api_mode);
 | 
			
		||||
 | 
			
		||||
		/// @todo Finally descide how to implement this in AP. This is a possible way:
 | 
			
		||||
		/// @todo Finally decide how to implement this in AP. This is a possible way:
 | 
			
		||||
		$activity['object']['attachment'][] = self::createNote($announce['object']);
 | 
			
		||||
 | 
			
		||||
		$activity['object']['source']['content'] = $orig_body;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1585,7 +1585,7 @@ class DFRN
 | 
			
		|||
		Logger::info('Process verb ' . $item['verb'] . ' and object-type ' . $item['object-type'] . ' for entrytype ' . $entrytype);
 | 
			
		||||
 | 
			
		||||
		if (($entrytype == self::TOP_LEVEL) && !empty($importer['id'])) {
 | 
			
		||||
			// The filling of the the "contact" variable is done for legcy reasons
 | 
			
		||||
			// The filling of the "contact" variable is done for legacy reasons
 | 
			
		||||
			// The functions below are partly used by ostatus.php as well - where we have this variable
 | 
			
		||||
			$contact = Contact::selectFirst([], ['id' => $importer['id']]);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1713,7 +1713,7 @@ class DFRN
 | 
			
		|||
	 * Checks if an incoming message is wanted
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param array $item
 | 
			
		||||
	 * @param array $imporer
 | 
			
		||||
	 * @param array $importer
 | 
			
		||||
	 * @return boolean Is the message wanted?
 | 
			
		||||
	 */
 | 
			
		||||
	private static function isSolicitedMessage(array $item, array $importer): bool
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2068,7 +2068,7 @@ class Diaspora
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Processes poll participations - unssupported
 | 
			
		||||
	 * Processes poll participations - unsupported
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param array  $importer Array of the importer user
 | 
			
		||||
	 * @param object $data     The message object
 | 
			
		||||
| 
						 | 
				
			
			@ -2204,7 +2204,7 @@ class Diaspora
 | 
			
		|||
		$author = WebFingerUri::fromString($author_handle);
 | 
			
		||||
 | 
			
		||||
		// the current protocol version doesn't know these fields
 | 
			
		||||
		// That means that we will assume their existance
 | 
			
		||||
		// That means that we will assume their existence
 | 
			
		||||
		if (isset($data->following)) {
 | 
			
		||||
			$following = (XML::unescape($data->following) == 'true');
 | 
			
		||||
		} else {
 | 
			
		||||
| 
						 | 
				
			
			@ -2255,7 +2255,7 @@ class Diaspora
 | 
			
		|||
		} elseif (!$following && $sharing) {
 | 
			
		||||
			Logger::info("Author " . $author . " wants to share with us.");
 | 
			
		||||
		} elseif ($following && $sharing) {
 | 
			
		||||
			Logger::info("Author " . $author . " wants to have a bidirectional conection.");
 | 
			
		||||
			Logger::info("Author " . $author . " wants to have a bidirectional connection.");
 | 
			
		||||
		} elseif ($following && !$sharing) {
 | 
			
		||||
			Logger::info("Author " . $author . " wants to listen to us.");
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			@ -2756,7 +2756,7 @@ class Diaspora
 | 
			
		|||
	 * ************************************************************************************** */
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * returnes the handle of a contact
 | 
			
		||||
	 * returns the handle of a contact
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param array $contact contact array
 | 
			
		||||
	 *
 | 
			
		||||
| 
						 | 
				
			
			@ -2770,7 +2770,7 @@ class Diaspora
 | 
			
		|||
		}
 | 
			
		||||
 | 
			
		||||
		// Normally we should have a filled "addr" field - but in the past this wasn't the case
 | 
			
		||||
		// So - just in case - we build the the address here.
 | 
			
		||||
		// So - just in case - we build the address here.
 | 
			
		||||
		if ($contact['nickname'] != '') {
 | 
			
		||||
			$nick = $contact['nickname'];
 | 
			
		||||
		} else {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -322,7 +322,7 @@ class Email
 | 
			
		|||
		}
 | 
			
		||||
 | 
			
		||||
		if ($out_str && $charset) {
 | 
			
		||||
			// define start delimimter, end delimiter and spacer
 | 
			
		||||
			// define start delimiter, end delimiter and spacer
 | 
			
		||||
			$end = "?=";
 | 
			
		||||
			$start = "=?" . $charset . "?B?";
 | 
			
		||||
			$spacer = $end . "\r\n " . $start;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -945,7 +945,7 @@ class Feed
 | 
			
		|||
 | 
			
		||||
		$previous_created = $last_update;
 | 
			
		||||
 | 
			
		||||
		// Don't cache when the last item was posted less then 15 minutes ago (Cache duration)
 | 
			
		||||
		// Don't cache when the last item was posted less than 15 minutes ago (Cache duration)
 | 
			
		||||
		if ((time() - strtotime($owner['last-item'])) < 15 * 60) {
 | 
			
		||||
			$result = DI::cache()->get($cachekey);
 | 
			
		||||
			if (!$nocache && !is_null($result)) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1709,7 +1709,7 @@ class OStatus
 | 
			
		|||
 | 
			
		||||
		$previous_created = $last_update;
 | 
			
		||||
 | 
			
		||||
		// Don't cache when the last item was posted less then 15 minutes ago (Cache duration)
 | 
			
		||||
		// Don't cache when the last item was posted less than 15 minutes ago (Cache duration)
 | 
			
		||||
		if ((time() - strtotime($owner['last-item'])) < 15*60) {
 | 
			
		||||
			$result = DI::cache()->get($cachekey);
 | 
			
		||||
			if (!$nocache && !is_null($result)) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -176,7 +176,7 @@ class Relay
 | 
			
		|||
		if (in_array($gserver['network'], [Protocol::ACTIVITYPUB, Protocol::DFRN])) {
 | 
			
		||||
			$system = APContact::getByURL($gserver['url'] . '/friendica');
 | 
			
		||||
			if (!empty($system['sharedinbox'])) {
 | 
			
		||||
				Logger::info('Sucessfully probed for relay contact', ['server' => $gserver['url']]);
 | 
			
		||||
				Logger::info('Successfully probed for relay contact', ['server' => $gserver['url']]);
 | 
			
		||||
				$id = Contact::updateFromProbeByURL($system['url']);
 | 
			
		||||
				Logger::info('Updated relay contact', ['server' => $gserver['url'], 'id' => $id]);
 | 
			
		||||
				return;
 | 
			
		||||
| 
						 | 
				
			
			@ -302,7 +302,7 @@ class Relay
 | 
			
		|||
			DBA::close($tagserver);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// All adresses with the given id
 | 
			
		||||
		// All addresses with the given id
 | 
			
		||||
		if (!empty($tagserverlist)) {
 | 
			
		||||
			$servers = DBA::select('gserver', ['id', 'url', 'network'], ['relay-subscribe' => true, 'relay-scope' => 'tags', 'id' => $tagserverlist]);
 | 
			
		||||
			while ($server = DBA::fetch($servers)) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -85,7 +85,7 @@ class Salmon
 | 
			
		|||
		Logger::notice('Key located', ['ret' => $ret]);
 | 
			
		||||
 | 
			
		||||
		if (count($ret) == 1) {
 | 
			
		||||
			/* We only found one one key so we don't care if the hash matches.
 | 
			
		||||
			/* We only found one key so we don't care if the hash matches.
 | 
			
		||||
			 * If it's the wrong key we'll find out soon enough because
 | 
			
		||||
			 * message verification will fail. This also covers some older
 | 
			
		||||
			 * software which don't supply a keyhash. As long as they only
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -153,11 +153,11 @@ class ExAuth
 | 
			
		|||
			if (is_array($aCommand)) {
 | 
			
		||||
				switch ($aCommand[0]) {
 | 
			
		||||
					case 'isuser':
 | 
			
		||||
						// Check the existance of a given username
 | 
			
		||||
						// Check the existence of a given username
 | 
			
		||||
						$this->isUser($aCommand);
 | 
			
		||||
						break;
 | 
			
		||||
					case 'auth':
 | 
			
		||||
						// Check if the givven password is correct
 | 
			
		||||
						// Check if the given password is correct
 | 
			
		||||
						$this->auth($aCommand);
 | 
			
		||||
						break;
 | 
			
		||||
					case 'setpass':
 | 
			
		||||
| 
						 | 
				
			
			@ -225,7 +225,7 @@ class ExAuth
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Check remote user existance via HTTP(S)
 | 
			
		||||
	 * Check remote user existence via HTTP(S)
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string  $host The hostname
 | 
			
		||||
	 * @param string  $user Username
 | 
			
		||||
| 
						 | 
				
			
			@ -306,7 +306,7 @@ class ExAuth
 | 
			
		|||
			$this->writeLog(LOG_WARNING, 'authentification failed for user ' . $sUser . '@' . $aCommand[2]);
 | 
			
		||||
			fwrite(STDOUT, pack('nn', 2, 0));
 | 
			
		||||
		} else {
 | 
			
		||||
			$this->writeLog(LOG_NOTICE, 'authentificated user ' . $sUser . '@' . $aCommand[2]);
 | 
			
		||||
			$this->writeLog(LOG_NOTICE, 'authenticated user ' . $sUser . '@' . $aCommand[2]);
 | 
			
		||||
			fwrite(STDOUT, pack('nn', 2, 1));
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -190,7 +190,7 @@ class OAuthRequest
 | 
			
		|||
	 *
 | 
			
		||||
	 * The base string defined as the method, the url
 | 
			
		||||
	 * and the parameters (normalized), each urlencoded
 | 
			
		||||
	 * and the concated with &.
 | 
			
		||||
	 * and concatenated with &.
 | 
			
		||||
	 */
 | 
			
		||||
	public function get_signature_base_string()
 | 
			
		||||
	{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -135,7 +135,7 @@ class OAuthUtil
 | 
			
		|||
			$value     = isset($split[1]) ? OAuthUtil::urldecode_rfc3986($split[1]) : '';
 | 
			
		||||
 | 
			
		||||
			if (isset($parsed_parameters[$parameter])) {
 | 
			
		||||
				// We have already recieved parameter(s) with this name, so add to the list
 | 
			
		||||
				// We have already received parameter(s) with this name, so add to the list
 | 
			
		||||
				// of parameters with this name
 | 
			
		||||
 | 
			
		||||
				if (is_scalar($parsed_parameters[$parameter])) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -46,7 +46,7 @@ class TrustedBrowser extends BaseEntity
 | 
			
		|||
	protected $last_used;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Please do not use this constructor directly, instead use one of the method of the TrustedBroser factory.
 | 
			
		||||
	 * Please do not use this constructor directly, instead use one of the method of the TrustedBrowser factory.
 | 
			
		||||
	 *
 | 
			
		||||
	 * @see \Friendica\Security\TwoFactor\Factory\TrustedBrowser
 | 
			
		||||
	 *
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -30,7 +30,7 @@ class Arrays
 | 
			
		|||
	 * Private constructor
 | 
			
		||||
	 */
 | 
			
		||||
	private function __construct() {
 | 
			
		||||
		// Utitlities don't have instances
 | 
			
		||||
		// Utilities don't have instances
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -627,7 +627,7 @@ class HTTPSignature
 | 
			
		|||
		}
 | 
			
		||||
 | 
			
		||||
		if (empty($algorithm)) {
 | 
			
		||||
			Logger::info('No alagorithm');
 | 
			
		||||
			Logger::info('No algorithm');
 | 
			
		||||
			return false;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -349,7 +349,7 @@ class Network
 | 
			
		|||
						$pair = $param . '=' . str_replace(' ', '+', $value);
 | 
			
		||||
						$url = str_replace($pair, '', $url);
 | 
			
		||||
 | 
			
		||||
						// Third try: Maybey the url isn't encoded at all
 | 
			
		||||
						// Third try: Maybe the url isn't encoded at all
 | 
			
		||||
						$pair = $param . '=' . $value;
 | 
			
		||||
						$url = str_replace($pair, '', $url);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -91,7 +91,7 @@ class ParseUrl
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Search for chached embeddable data of an url otherwise fetch it
 | 
			
		||||
	 * Search for cached embeddable data of an url otherwise fetch it
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string $url         The url of the page which should be scraped
 | 
			
		||||
	 * @param bool   $do_oembed   The false option is used by the function fetch_oembed()
 | 
			
		||||
| 
						 | 
				
			
			@ -686,7 +686,7 @@ class ParseUrl
 | 
			
		|||
	{
 | 
			
		||||
		$urlarr = parse_url($url);
 | 
			
		||||
 | 
			
		||||
		// If the url does allready have an scheme
 | 
			
		||||
		// If the url does already have an scheme
 | 
			
		||||
		// we can stop the process here
 | 
			
		||||
		if (isset($urlarr['scheme'])) {
 | 
			
		||||
			return $url;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -31,7 +31,7 @@ class PidFile
 | 
			
		|||
	 *
 | 
			
		||||
	 * @param string $file Filename of pid file
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return boolean|string PID or "false" if not existent
 | 
			
		||||
	 * @return boolean|string PID or "false" if nonexistent
 | 
			
		||||
	 */
 | 
			
		||||
	private static function pidFromFile(string $file)
 | 
			
		||||
	{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -75,7 +75,7 @@ class Proxy
 | 
			
		|||
	 * This function only performs the URL replacement on http URL and if the
 | 
			
		||||
	 * provided URL isn't local
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string $url       The URL to proxyfy
 | 
			
		||||
	 * @param string $url       The URL to proxify
 | 
			
		||||
	 * @param string $size      One of the Proxy::SIZE_* constants
 | 
			
		||||
	 * @return string The proxyfied URL or relative path
 | 
			
		||||
	 * @throws \Friendica\Network\HTTPException\InternalServerErrorException
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -532,7 +532,7 @@ class Strings
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * This function converts a PHP's shorhand notation string for file sizes in to an integer number of total bytes.
 | 
			
		||||
	 * This function converts a file size string written in PHP's shorthand notation to an integer number of total bytes.
 | 
			
		||||
	 * For example: The string for shorthand notation of '2M' (which is 2,097,152 Bytes) is converted to 2097152
 | 
			
		||||
	 * @see https://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes
 | 
			
		||||
	 * @param string $shorthand
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -178,7 +178,7 @@ class DbaDefinitionSqlWriter
 | 
			
		|||
	 * Creates the SQL definition to modify a table field
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string $fieldName  The table field name
 | 
			
		||||
	 * @param array  $parameters The paramters to modify
 | 
			
		||||
	 * @param array  $parameters The parameters to modify
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return string The SQL definition
 | 
			
		||||
	 */
 | 
			
		||||
| 
						 | 
				
			
			@ -235,7 +235,7 @@ class DbaDefinitionSqlWriter
 | 
			
		|||
	 * @param string $method     The method to create the index (default is ADD)
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return string The SQL definition
 | 
			
		||||
	 * @throws Exception in cases the paramter contains invalid content
 | 
			
		||||
	 * @throws Exception in cases the parameter contains invalid content
 | 
			
		||||
	 */
 | 
			
		||||
	public static function createIndex(string $indexName, array $fieldNames, string $method = 'ADD'): string
 | 
			
		||||
	{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -259,7 +259,7 @@ class XML
 | 
			
		|||
	 * @param integer $get_attributes   1 or 0. If this is 1 the function will get the attributes as well as the tag values -
 | 
			
		||||
	 *                                  this results in a different array structure in the return value.
 | 
			
		||||
	 * @param string  $priority         Can be 'tag' or 'attribute'. This will change the way the resulting
 | 
			
		||||
	 *                                  array sturcture. For 'tag', the tags are given more importance.
 | 
			
		||||
	 *                                  array structure. For 'tag', the tags are given more importance.
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return array The parsed XML in an array form. Use print_r() to see the resulting array structure.
 | 
			
		||||
	 * @throws \Exception
 | 
			
		||||
| 
						 | 
				
			
			@ -397,7 +397,7 @@ class XML
 | 
			
		|||
						}
 | 
			
		||||
						$repeated_tag_index[$tag . '_' . $level]++;
 | 
			
		||||
					} else { // If it is not an array...
 | 
			
		||||
						$current[$tag] = [$current[$tag], $result]; //...Make it an array using using the existing value and the new value
 | 
			
		||||
						$current[$tag] = [$current[$tag], $result]; //...Make it an array using the existing value and the new value
 | 
			
		||||
						$repeated_tag_index[$tag . '_' . $level] = 1;
 | 
			
		||||
						if ($priority == 'tag' and $get_attributes) {
 | 
			
		||||
							if (isset($current[$tag.'_attr'])) { // The attribute of the last(0th) tag must be moved as well
 | 
			
		||||
| 
						 | 
				
			
			@ -441,7 +441,7 @@ class XML
 | 
			
		|||
	 * Parse XML string
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string  $s XML string to parse into object
 | 
			
		||||
	 * @param boolean $suppress_log Whether to supressing logging
 | 
			
		||||
	 * @param boolean $suppress_log Whether to suppressing logging
 | 
			
		||||
	 * @return SimpleXMLElement|bool SimpleXMLElement or false on failure
 | 
			
		||||
	 */
 | 
			
		||||
	public static function parseString(string $s, bool $suppress_log = false)
 | 
			
		||||
| 
						 | 
				
			
			@ -536,7 +536,7 @@ class XML
 | 
			
		|||
	 *
 | 
			
		||||
	 * @param string $str
 | 
			
		||||
	 * @return string Escaped text.
 | 
			
		||||
	 * @todo Move this generic method to Util\Strings and also rewrite all other findingd
 | 
			
		||||
	 * @todo Move this generic method to Util\Strings and also rewrite all other occurrences
 | 
			
		||||
	 */
 | 
			
		||||
	public static function escape(string $str): string
 | 
			
		||||
	{
 | 
			
		||||
| 
						 | 
				
			
			@ -548,7 +548,7 @@ class XML
 | 
			
		|||
	 *
 | 
			
		||||
	 * @param string $s xml escaped text
 | 
			
		||||
	 * @return string unescaped text
 | 
			
		||||
	 * @todo Move this generic method to Util\Strings and also rewrite all other findingd
 | 
			
		||||
	 * @todo Move this generic method to Util\Strings and also rewrite all other occurrences
 | 
			
		||||
	 */
 | 
			
		||||
	public static function unescape(string $s): string
 | 
			
		||||
	{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -48,7 +48,7 @@ use GuzzleHttp\Psr7\Uri;
 | 
			
		|||
 */
 | 
			
		||||
class CheckRelMeProfileLink
 | 
			
		||||
{
 | 
			
		||||
	/* Cheks the homepage of a profile for a rel-me link back to the user profile
 | 
			
		||||
	/* Checks the homepage of a profile for a rel-me link back to the user profile
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param $uid (int) the UID of the user
 | 
			
		||||
	 */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -30,7 +30,7 @@ use Friendica\Network\HTTPException;
 | 
			
		|||
class RevokeFollow
 | 
			
		||||
{
 | 
			
		||||
	/**
 | 
			
		||||
	 * Issue asynchronous follow revokation message to remote servers.
 | 
			
		||||
	 * Issue asynchronous follow revocation message to remote servers.
 | 
			
		||||
	 * The local relationship has already been updated, so we can't use the user-specific contact
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param int $cid Target public contact id
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -890,7 +890,7 @@ class Notifier
 | 
			
		|||
			Worker::coolDown();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// We deliver posts to relay servers slightly delayed to priorize the direct delivery
 | 
			
		||||
		// We deliver posts to relay servers slightly delayed to prioritize the direct delivery
 | 
			
		||||
		foreach ($relay_inboxes as $inbox) {
 | 
			
		||||
			Logger::info('Delivery to relay servers via ActivityPub', ['cmd' => $cmd, 'id' => $target_item['id'], 'inbox' => $inbox]);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -38,7 +38,7 @@ class SpoolPost {
 | 
			
		|||
 | 
			
		||||
					// It is not named like a spool file, so we don't care.
 | 
			
		||||
					if (substr($file, 0, 5) != "item-") {
 | 
			
		||||
						Logger::info('Spool file does does not start with "item-"', ['file' => $file]);
 | 
			
		||||
						Logger::info('Spool file does not start with "item-"', ['file' => $file]);
 | 
			
		||||
						continue;
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -127,7 +127,7 @@ return [
 | 
			
		|||
			"verified" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "user is verified through email"],
 | 
			
		||||
			"blocked" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 for user is blocked"],
 | 
			
		||||
			"blockwall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Prohibit contacts to post to the profile page of the user"],
 | 
			
		||||
			"hidewall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Hide profile details from unkown viewers"],
 | 
			
		||||
			"hidewall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Hide profile details from unknown viewers"],
 | 
			
		||||
			"blocktags" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Prohibit contacts to tag the post of this user"],
 | 
			
		||||
			"unkmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Permit unknown people to send private mails to this user"],
 | 
			
		||||
			"cntunkmail" => ["type" => "int unsigned", "not null" => "1", "default" => "10", "comment" => ""],
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -106,7 +106,7 @@ return [
 | 
			
		|||
		'always_show_preview' => false,
 | 
			
		||||
 | 
			
		||||
		// ap_always_bcc (Boolean)
 | 
			
		||||
		// Adresses non-mentioned ActivityPub receivers by BCC instead of CC. Increases privacy, decreases performance.
 | 
			
		||||
		// Addresses non-mentioned ActivityPub receivers by BCC instead of CC. Increases privacy, decreases performance.
 | 
			
		||||
		'ap_always_bcc' => false,
 | 
			
		||||
 | 
			
		||||
		// archival_days (Integer)
 | 
			
		||||
| 
						 | 
				
			
			@ -291,7 +291,7 @@ return [
 | 
			
		|||
		'emoji_activities' => false,
 | 
			
		||||
 | 
			
		||||
		// expire-notify-priority (integer)
 | 
			
		||||
		// Priority for the expirary notification
 | 
			
		||||
		// Priority for the expiry notification
 | 
			
		||||
		'expire-notify-priority' => Friendica\Core\Worker::PRIORITY_LOW,
 | 
			
		||||
 | 
			
		||||
		// fetch_by_worker (Boolean)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -48,7 +48,7 @@ return [
 | 
			
		|||
	],
 | 
			
		||||
	'system' => [
 | 
			
		||||
		// account_abandon_days (Integer)
 | 
			
		||||
		// Will not waste system resources polling external sites for abandonded accounts.
 | 
			
		||||
		// Will not waste system resources polling external sites for abandoned accounts.
 | 
			
		||||
		// Enter 0 for no time limit.
 | 
			
		||||
		'account_abandon_days' => 0,
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -123,7 +123,7 @@ return [
 | 
			
		|||
		'jpeg_quality' => 100,
 | 
			
		||||
 | 
			
		||||
		// language (String)
 | 
			
		||||
		// System default languague, inluding admin-created user default language.
 | 
			
		||||
		// System default language, including admin-created user default language.
 | 
			
		||||
		// Two-letters ISO 639-1 code.
 | 
			
		||||
		'language' => 'en',
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -66,7 +66,7 @@ class StaticDatabase extends Database
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Override the transaction since there are now hierachical transactions possible
 | 
			
		||||
	 * Override the transaction since there are now hierarchical transactions possible
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return bool
 | 
			
		||||
	 */
 | 
			
		||||
| 
						 | 
				
			
			@ -183,7 +183,7 @@ class StaticDatabase extends Database
 | 
			
		|||
			self::$staticConnection->setAttribute(PDO::ATTR_AUTOCOMMIT,0);
 | 
			
		||||
		} catch (PDOException $e) {
 | 
			
		||||
			/*
 | 
			
		||||
			 * @TODO Try to find a way to log this exception as it contains valueable information
 | 
			
		||||
			 * @TODO Try to find a way to log this exception as it contains valuable information
 | 
			
		||||
			 * @nupplaphil@github.com comment:
 | 
			
		||||
			 *
 | 
			
		||||
			 * There is no easy possibility to add a logger here, that's why
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -24,7 +24,7 @@ namespace Friendica\Test\Util;
 | 
			
		|||
use php_user_filter;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Output Interceptor for STDOUT to prevent outputing to the console
 | 
			
		||||
 * Output Interceptor for STDOUT to prevent outputting to the console
 | 
			
		||||
 * Instead the $cache variable will get filled with the output
 | 
			
		||||
 *
 | 
			
		||||
 * @package Friendica\Test\Util
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,3 +1,3 @@
 | 
			
		|||
2021-05-24T15:23:58Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":476,"function":"getSigner","uid":"0a3934","process_id":14826}
 | 
			
		||||
2021-05-24T15:30:01Z worker [NOTICE]: Load: 0.01/20 - processes: 0/1/6 (0:0, 30:1) - maximum: 10/10 {"worker_id":"ece8fc8","worker_cmd":"Cron"} - {"file":"Worker.php","line":786,"function":"tooMuchWorkers","uid":"364d3c","process_id":20754}
 | 
			
		||||
2021-05-24T15:40:01Z worker [WARNING]: Spool file does does not start with "item-" {"file":".","worker_id":"560c8b6","worker_cmd":"SpoolPost"} - {"file":"SpoolPost.php","line":40,"function":"execute","uid":"fd8c37","process_id":20846}
 | 
			
		||||
2021-05-24T15:40:01Z worker [WARNING]: Spool file does not start with "item-" {"file":".","worker_id":"560c8b6","worker_cmd":"SpoolPost"} - {"file":"SpoolPost.php","line":40,"function":"execute","uid":"fd8c37","process_id":20846}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -588,7 +588,7 @@ class CacheTest extends MockedTest
 | 
			
		|||
		$cache->load($data, Cache::SOURCE_FILE);
 | 
			
		||||
 | 
			
		||||
		$cache2 = new Cache();
 | 
			
		||||
		$cache2->set('system', 'test', 'overrride');
 | 
			
		||||
		$cache2->set('system', 'test', 'override');
 | 
			
		||||
		$cache2->delete('system', 'test');
 | 
			
		||||
 | 
			
		||||
		self::assertEquals('it', $cache->get('system', 'test'));
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -346,7 +346,7 @@ class ConfigTest extends DatabaseTest
 | 
			
		|||
		// without refresh
 | 
			
		||||
		self::assertNull($this->testedConfig->get('test', 'it'));
 | 
			
		||||
 | 
			
		||||
		/// beware that the cache returns '!<unset>!' and not null for a non existing value
 | 
			
		||||
		/// beware that the cache returns '!<unset>!' and not null for a nonexistent value
 | 
			
		||||
		self::assertNull($this->testedConfig->getCache()->get('test', 'it'));
 | 
			
		||||
 | 
			
		||||
		// with default value
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -324,7 +324,7 @@ abstract class PConfigTest extends MockedTest
 | 
			
		|||
		// without refresh
 | 
			
		||||
		self::assertNull($this->testedConfig->get(0, 'test', 'it'));
 | 
			
		||||
 | 
			
		||||
		/// beware that the cache returns '!<unset>!' and not null for a non existing value
 | 
			
		||||
		/// beware that the cache returns '!<unset>!' and not null for a nonexistent value
 | 
			
		||||
		self::assertNull($this->testedConfig->getCache()->get(0, 'test', 'it'));
 | 
			
		||||
 | 
			
		||||
		// with default value
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -45,7 +45,7 @@ class DBStructureTest extends DatabaseTest
 | 
			
		|||
	 */
 | 
			
		||||
	public function testExists() {
 | 
			
		||||
		self::assertTrue(DBStructure::existsTable('user'));
 | 
			
		||||
		self::assertFalse(DBStructure::existsTable('notatable'));
 | 
			
		||||
		self::assertFalse(DBStructure::existsTable('nonexistent'));
 | 
			
		||||
 | 
			
		||||
		self::assertTrue(DBStructure::existsColumn('user', ['uid']));
 | 
			
		||||
		self::assertFalse(DBStructure::existsColumn('user', ['nonsense']));
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -114,11 +114,11 @@ class StatusTest extends FixtureTest
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Test the api_get_entitities() function.
 | 
			
		||||
	 * Test the api_get_entities() function.
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return void
 | 
			
		||||
	 */
 | 
			
		||||
	public function testApiGetEntititiesWithIncludeEntities()
 | 
			
		||||
	public function testApiGetEntitiesWithIncludeEntities()
 | 
			
		||||
	{
 | 
			
		||||
		$status = $this->statusFactory
 | 
			
		||||
			->createFromItemId(13, ApiTest::SELF_USER['id'], true)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -94,7 +94,7 @@ class ParsedLogIteratorTest extends TestCase
 | 
			
		|||
				'date'    => '2021-05-24T15:40:01Z',
 | 
			
		||||
				'context' => 'worker',
 | 
			
		||||
				'level'   => 'WARNING',
 | 
			
		||||
				'message' => 'Spool file does does not start with "item-"',
 | 
			
		||||
				'message' => 'Spool file does not start with "item-"',
 | 
			
		||||
				'data'    => '{"file":".","worker_id":"560c8b6","worker_cmd":"SpoolPost"}',
 | 
			
		||||
				'source'  => '{"file":"SpoolPost.php","line":40,"function":"execute","uid":"fd8c37","process_id":20846}',
 | 
			
		||||
			]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -32,7 +32,7 @@ class PushSubscriptionTest extends ApiTest
 | 
			
		|||
	 */
 | 
			
		||||
	public function testApiAccountVerifyCredentials(): void
 | 
			
		||||
	{
 | 
			
		||||
		$this->markTestIncomplete('Needs mocking of whole applictaions/Apps first');
 | 
			
		||||
		$this->markTestIncomplete('Needs mocking of whole applications/Apps first');
 | 
			
		||||
 | 
			
		||||
		// $this->useHttpMethod(Router::POST);
 | 
			
		||||
		//
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -49,12 +49,12 @@ class LookupTest extends ApiTest
 | 
			
		|||
	 */
 | 
			
		||||
	public function testApiUsersLookupWithUserId()
 | 
			
		||||
	{
 | 
			
		||||
		$respone = (new Lookup(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
 | 
			
		||||
		$response = (new Lookup(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
 | 
			
		||||
			->run($this->httpExceptionMock, [
 | 
			
		||||
				'user_id' => static::OTHER_USER['id']
 | 
			
		||||
			]);
 | 
			
		||||
 | 
			
		||||
		$json = $this->toJson($respone);
 | 
			
		||||
		$json = $this->toJson($response);
 | 
			
		||||
 | 
			
		||||
		self::assertOtherUser($json[0]);
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -37,12 +37,12 @@ class SearchTest extends ApiTest
 | 
			
		|||
	 */
 | 
			
		||||
	public function testApiUsersSearch()
 | 
			
		||||
	{
 | 
			
		||||
		$respone = (new Search(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
 | 
			
		||||
		$response = (new Search(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
 | 
			
		||||
			->run($this->httpExceptionMock, [
 | 
			
		||||
				'q' => static::OTHER_USER['name']
 | 
			
		||||
			]);
 | 
			
		||||
 | 
			
		||||
		$json = $this->toJson($respone);
 | 
			
		||||
		$json = $this->toJson($response);
 | 
			
		||||
 | 
			
		||||
		self::assertOtherUser($json[0]);
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			@ -54,13 +54,13 @@ class SearchTest extends ApiTest
 | 
			
		|||
	 */
 | 
			
		||||
	public function testApiUsersSearchWithXml()
 | 
			
		||||
	{
 | 
			
		||||
		$respone = (new Search(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], [
 | 
			
		||||
		$response = (new Search(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], [
 | 
			
		||||
			'extension' => ICanCreateResponses::TYPE_XML
 | 
			
		||||
		]))->run($this->httpExceptionMock, [
 | 
			
		||||
			'q' => static::OTHER_USER['name']
 | 
			
		||||
		]);
 | 
			
		||||
 | 
			
		||||
		self::assertXml((string)$respone->getBody(), 'users');
 | 
			
		||||
		self::assertXml((string)$response->getBody(), 'users');
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -43,12 +43,12 @@ class ParsedLogLineTest extends TestCase
 | 
			
		|||
	public function testGenericLogLine()
 | 
			
		||||
	{
 | 
			
		||||
		self::do_log_line(
 | 
			
		||||
			'2021-05-24T15:40:01Z worker [WARNING]: Spool file does does not start with "item-" {"file":".","worker_id":"560c8b6","worker_cmd":"SpoolPost"} - {"file":"SpoolPost.php","line":40,"function":"execute","uid":"fd8c37","process_id":20846}',
 | 
			
		||||
			'2021-05-24T15:40:01Z worker [WARNING]: Spool file does not start with "item-" {"file":".","worker_id":"560c8b6","worker_cmd":"SpoolPost"} - {"file":"SpoolPost.php","line":40,"function":"execute","uid":"fd8c37","process_id":20846}',
 | 
			
		||||
			[
 | 
			
		||||
				'date'    => '2021-05-24T15:40:01Z',
 | 
			
		||||
				'context' => 'worker',
 | 
			
		||||
				'level'   => 'WARNING',
 | 
			
		||||
				'message' => 'Spool file does does not start with "item-"',
 | 
			
		||||
				'message' => 'Spool file does not start with "item-"',
 | 
			
		||||
				'data'    => '{"file":".","worker_id":"560c8b6","worker_cmd":"SpoolPost"}',
 | 
			
		||||
				'source'  => '{"file":"SpoolPost.php","line":40,"function":"execute","uid":"fd8c37","process_id":20846}',
 | 
			
		||||
			]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -26,9 +26,9 @@ use Friendica\Util\ACLFormatter;
 | 
			
		|||
use PHPUnit\Framework\TestCase;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * ACLFormater utility testing class
 | 
			
		||||
 * ACLFormatter utility testing class
 | 
			
		||||
 */
 | 
			
		||||
class ACLFormaterTest extends TestCase
 | 
			
		||||
class ACLFormatterTest extends TestCase
 | 
			
		||||
{
 | 
			
		||||
	public function assertAcl($text, array $assert = [])
 | 
			
		||||
	{
 | 
			
		||||
| 
						 | 
				
			
			@ -38,10 +38,10 @@ class ACLFormaterTest extends TestCase
 | 
			
		|||
 | 
			
		||||
		self::assertEquals($assert, $acl);
 | 
			
		||||
 | 
			
		||||
		self::assertMergable($acl);
 | 
			
		||||
		self::assertMergeable($acl);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	public function assertMergable(array $aclOne, array $aclTwo = [])
 | 
			
		||||
	public function assertMergeable(array $aclOne, array $aclTwo = [])
 | 
			
		||||
	{
 | 
			
		||||
		self::assertTrue(is_array($aclOne));
 | 
			
		||||
		self::assertTrue(is_array($aclTwo));
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -63,7 +63,7 @@ class StringsTest extends TestCase
 | 
			
		|||
	/**
 | 
			
		||||
	 * try to fail it with invalid input
 | 
			
		||||
	 *
 | 
			
		||||
	 * @todo What's corect behaviour here? An exception?
 | 
			
		||||
	 * @todo What's correct behaviour here? An exception?
 | 
			
		||||
	 */
 | 
			
		||||
	public function testRandomNameNegativeLength()
 | 
			
		||||
	{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -79,7 +79,7 @@ function update_1298()
 | 
			
		|||
					$a = new \stdClass();
 | 
			
		||||
					$a->strings = [];
 | 
			
		||||
 | 
			
		||||
					// First we get the the localizations
 | 
			
		||||
					// First we get the localizations
 | 
			
		||||
					if (file_exists('view/lang/$lang/strings.php')) {
 | 
			
		||||
						include 'view/lang/$lang/strings.php';
 | 
			
		||||
					}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -374,7 +374,7 @@ a {
 | 
			
		|||
  border: 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.itentity-match-wrapper {
 | 
			
		||||
.identity-match-wrapper {
 | 
			
		||||
  float: left;
 | 
			
		||||
  padding: 10px;
 | 
			
		||||
  width: 120px;
 | 
			
		||||
| 
						 | 
				
			
			@ -609,7 +609,7 @@ img.invalid-src:after { vertical-align: top;}
 | 
			
		|||
  word-wrap: break-word;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#register-explicid-content {
 | 
			
		||||
#register-explicit-content {
 | 
			
		||||
  font-weight: bold;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
/***
 | 
			
		||||
 * Friendica Communcation Server
 | 
			
		||||
 * Friendica Communication Server
 | 
			
		||||
 *
 | 
			
		||||
 * This is the static css for the install procedure
 | 
			
		||||
 */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -40,7 +40,7 @@
 | 
			
		|||
    
 | 
			
		||||
    /**
 | 
			
		||||
     * Attaches resize event to a window, limiting
 | 
			
		||||
     * number of event fired. Fires only when encounteres
 | 
			
		||||
     * number of event fired. Fires only when encounters
 | 
			
		||||
     * delay of 100 after series of events.
 | 
			
		||||
     * 
 | 
			
		||||
     * Some browsers fire event multiple times when resizing
 | 
			
		||||
| 
						 | 
				
			
			@ -75,7 +75,7 @@
 | 
			
		|||
    };
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    // Needs more testing, will be rewriten for next version        
 | 
			
		||||
    // Needs more testing, will be rewritten for next version        
 | 
			
		||||
    // getOffset function copied from jQuery lib (http://jquery.com/)
 | 
			
		||||
    if (document.documentElement.getBoundingClientRect){
 | 
			
		||||
        // Get Offset using getBoundingClientRect
 | 
			
		||||
| 
						 | 
				
			
			@ -157,7 +157,7 @@
 | 
			
		|||
    /**
 | 
			
		||||
     * Function places an absolutely positioned
 | 
			
		||||
     * element on top of the specified element
 | 
			
		||||
     * copying position and dimentions.
 | 
			
		||||
     * copying position and dimensions.
 | 
			
		||||
     * @param {Element} from
 | 
			
		||||
     * @param {Element} to
 | 
			
		||||
     */    
 | 
			
		||||
| 
						 | 
				
			
			@ -211,7 +211,7 @@
 | 
			
		|||
    /**
 | 
			
		||||
     * Get file extension lowercase
 | 
			
		||||
     * @param {String} file name
 | 
			
		||||
     * @return file extenstion
 | 
			
		||||
     * @return file extension
 | 
			
		||||
     */    
 | 
			
		||||
    function getExt(file){
 | 
			
		||||
        return (-1 !== file.indexOf('.')) ? file.replace(/.*[.]/, '') : '';
 | 
			
		||||
| 
						 | 
				
			
			@ -239,7 +239,7 @@
 | 
			
		|||
     * Easy styling and uploading
 | 
			
		||||
     * @constructor
 | 
			
		||||
     * @param button An element you want convert to 
 | 
			
		||||
     * upload button. Tested dimentions up to 500x500px
 | 
			
		||||
     * upload button. Tested dimensions up to 500x500px
 | 
			
		||||
     * @param {Object} options See defaults below.
 | 
			
		||||
     */
 | 
			
		||||
    window.AjaxUpload = function(button, options){
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,7 +13,7 @@
 | 
			
		|||
 | 
			
		||||
function contact_search(term, callback, backend_url, type, mode) {
 | 
			
		||||
 | 
			
		||||
	// Check if there is a conversation id to include the unkonwn contacts of the conversation
 | 
			
		||||
	// Check if there is a conversation id to include the unknown contacts of the conversation
 | 
			
		||||
	var conv_id = document.activeElement.id.match(/\d+$/);
 | 
			
		||||
 | 
			
		||||
	// Check if there is a cached result that contains the same information we would get with a full server-side search
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -96,7 +96,7 @@
 | 
			
		|||
      if (typeof item === "object" && !self.objectItems)
 | 
			
		||||
        throw("Can't add objects when itemValue option is not set");
 | 
			
		||||
 | 
			
		||||
      // Ignore strings only containg whitespace
 | 
			
		||||
      // Ignore strings only containing whitespace
 | 
			
		||||
      if (item.toString().match(/^\s*$/))
 | 
			
		||||
        return;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -124,7 +124,7 @@
 | 
			
		|||
          itemTitle = self.options.itemTitle(item),
 | 
			
		||||
          itemThumb = self.options.itemThumb(item);
 | 
			
		||||
 | 
			
		||||
      // Ignore items allready added
 | 
			
		||||
      // Ignore items already added
 | 
			
		||||
      var existing = $.grep(self.itemsArray, function(item) { return self.options.itemValue(item) === itemValue; } )[0];
 | 
			
		||||
      if (existing && !self.options.allowDuplicates) {
 | 
			
		||||
        // Invoke onTagExists
 | 
			
		||||
| 
						 | 
				
			
			@ -522,7 +522,7 @@
 | 
			
		|||
    },
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Removes all tagsinput behaviour and unregsiter all event handlers
 | 
			
		||||
     * Removes all tagsinput behaviour and unregister all event handlers
 | 
			
		||||
     */
 | 
			
		||||
    destroy: function() {
 | 
			
		||||
      var self = this;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -125,7 +125,7 @@
 | 
			
		|||
				isExtern = true;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			// Don't procces the textarea input if we have already
 | 
			
		||||
			// Don't process the textarea input if we have already
 | 
			
		||||
			// an attachment preview.
 | 
			
		||||
			if (!isExtern && isActive) {
 | 
			
		||||
				return;
 | 
			
		||||
| 
						 | 
				
			
			@ -233,7 +233,7 @@
 | 
			
		|||
		};
 | 
			
		||||
 | 
			
		||||
		/**
 | 
			
		||||
		 * Proccess all attachment data and show up a html
 | 
			
		||||
		 * Process all attachment data and show up a html
 | 
			
		||||
		 * attachment preview.
 | 
			
		||||
		 * 
 | 
			
		||||
		 * @param {obj} data Attachment data.
 | 
			
		||||
| 
						 | 
				
			
			@ -242,7 +242,7 @@
 | 
			
		|||
		var insertAttachment = function(data) {
 | 
			
		||||
			// If we have already a preview, leaver here.
 | 
			
		||||
			// Note: if we finish the Preview of other media content type,
 | 
			
		||||
			// we can move this condition to the beggining of crawlText();
 | 
			
		||||
			// we can move this condition to the beginning of crawlText();
 | 
			
		||||
			if (isActive) {
 | 
			
		||||
				$('#profile-rotator').hide();
 | 
			
		||||
				return;
 | 
			
		||||
| 
						 | 
				
			
			@ -273,7 +273,7 @@
 | 
			
		|||
		 * @returns {void}
 | 
			
		||||
		 */
 | 
			
		||||
		var processAttachmentTpl = function(data) {
 | 
			
		||||
			// Load and add the template if it isn't allready loaded.
 | 
			
		||||
			// Load and add the template if it isn't already loaded.
 | 
			
		||||
			if ($('#preview_' + id).length === 0) {
 | 
			
		||||
				var tpl = previewTpl.format(
 | 
			
		||||
					'type-' + data.type,
 | 
			
		||||
| 
						 | 
				
			
			@ -368,7 +368,7 @@
 | 
			
		|||
 | 
			
		||||
			// More than just one image.
 | 
			
		||||
			if (images.length > 1) {
 | 
			
		||||
				// Enable the the button to change the preview pictures.
 | 
			
		||||
				// Enable the button to change the preview pictures.
 | 
			
		||||
				$('#previewChangeImg_' + id).show();
 | 
			
		||||
 | 
			
		||||
				if (firstPosted === false) {
 | 
			
		||||
| 
						 | 
				
			
			@ -500,7 +500,7 @@
 | 
			
		|||
		};
 | 
			
		||||
 | 
			
		||||
		/**
 | 
			
		||||
		 * Convert attachmant bbcode into an array.
 | 
			
		||||
		 * Convert attachment bbcode into an array.
 | 
			
		||||
		 * 
 | 
			
		||||
		 * @param {string} content Text content with the attachment bbcode.
 | 
			
		||||
		 * @returns {object || null}
 | 
			
		||||
| 
						 | 
				
			
			@ -679,7 +679,7 @@
 | 
			
		|||
				$('#previewImage_' + id).html(appendImage);
 | 
			
		||||
				$('#attachmentImageSrc_' + id).val(bin2hex(image));
 | 
			
		||||
 | 
			
		||||
				// We need to add the image widht and height when it is 
 | 
			
		||||
				// We need to add the image width and height when it is 
 | 
			
		||||
				// loaded.
 | 
			
		||||
				$('<img/>' ,{
 | 
			
		||||
					load : function(){
 | 
			
		||||
| 
						 | 
				
			
			@ -805,7 +805,7 @@
 | 
			
		|||
	/**
 | 
			
		||||
	* Get in a textarea the previous word before the cursor.
 | 
			
		||||
	* 
 | 
			
		||||
	* @param {object} text Textarea elemet.
 | 
			
		||||
	* @param {object} text Textarea element.
 | 
			
		||||
	* @param {integer} caretPos Cursor position.
 | 
			
		||||
	* 
 | 
			
		||||
	* @returns {string} Previous word.
 | 
			
		||||
| 
						 | 
				
			
			@ -813,7 +813,7 @@
 | 
			
		|||
	function returnWord(text, caretPos) {
 | 
			
		||||
		var index = text.indexOf(caretPos);
 | 
			
		||||
		var preText = text.substring(0, caretPos);
 | 
			
		||||
		// If the last charachter is a space or enter remove it
 | 
			
		||||
		// If the last character is a space or enter remove it
 | 
			
		||||
		// We need this in friendica for the url  preview.
 | 
			
		||||
		var lastChar = preText.slice(-1)
 | 
			
		||||
		if ( lastChar === " "
 | 
			
		||||
| 
						 | 
				
			
			@ -853,9 +853,9 @@
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Get the cursor posiotion in an text element.
 | 
			
		||||
	 * Get the cursor position in an text element.
 | 
			
		||||
	 * 
 | 
			
		||||
	 * @param {object} ctrl Textarea elemet.
 | 
			
		||||
	 * @param {object} ctrl Textarea element.
 | 
			
		||||
	 * @returns {integer} Position of the cursor.
 | 
			
		||||
	 */
 | 
			
		||||
	function getCaretPosition(ctrl) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,7 +6,7 @@
 | 
			
		|||
	<form action="delegation" method="post">
 | 
			
		||||
 | 
			
		||||
	{{foreach $identities as $identity}}
 | 
			
		||||
		<div class="itentity-match-wrapper {{if $identity.selected}}selected-identity{{/if}}" id="identity-match-{{$identity.uid}}">
 | 
			
		||||
		<div class="identity-match-wrapper {{if $identity.selected}}selected-identity{{/if}}" id="identity-match-{{$identity.uid}}">
 | 
			
		||||
			<div class="identity-match-photo" id="identity-match-photo-{{$identity.uid}}">
 | 
			
		||||
				<button type="submit" name="identity" value="{{$identity.uid}}" title="{{$identity.username}}">
 | 
			
		||||
					<img src="{{$identity.thumb}}" alt="{{$identity.username}}" />
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -70,7 +70,7 @@
 | 
			
		|||
					<img role="presentation" id="profile-rotator" src="images/rotator.gif" alt="{{$l10n.wait}}" title="{{$l10n.wait}}" style="display: none;" />
 | 
			
		||||
				</span>
 | 
			
		||||
				<span role="presentation" id="character-counter" class="grey text-info"></span>
 | 
			
		||||
				<button type="button" class="btn btn-defaul" onclick="preview_comment({{$id}});" id="comment-edit-preview-link-{{$id}}" tabindex="5"><i class="fa fa-eye"></i> {{$l10n.preview}}</button>
 | 
			
		||||
				<button type="button" class="btn btn-default" onclick="preview_comment({{$id}});" id="comment-edit-preview-link-{{$id}}" tabindex="5"><i class="fa fa-eye"></i> {{$l10n.preview}}</button>
 | 
			
		||||
				<button type="submit" class="btn btn-primary" id="comment-edit-submit-{{$id}}" name="submit" tabindex="4"><i class="fa fa-envelope"></i> {{$l10n.submit}}</button>
 | 
			
		||||
			</p>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,7 @@
 | 
			
		|||
 | 
			
		||||
<div class="mail-conv-outside-wrapper">
 | 
			
		||||
	<div class="mail-conv-sender">
 | 
			
		||||
		<a href="{{$mail.from_url}}" title="{{$mail.from_addr}}" class="mail-conv-sender-url"><img class="mframe mail-conv-sender-photo{{$mail.sparkle}}" src="{{$mail.from_photo}}" heigth="80" width="80" alt="{{$mail.from_name}}" /></a>
 | 
			
		||||
		<a href="{{$mail.from_url}}" title="{{$mail.from_addr}}" class="mail-conv-sender-url"><img class="mframe mail-conv-sender-photo{{$mail.sparkle}}" src="{{$mail.from_photo}}" height="80" width="80" alt="{{$mail.from_name}}" /></a>
 | 
			
		||||
	</div>
 | 
			
		||||
	<div class="mail-conv-detail">
 | 
			
		||||
		<div class="mail-conv-sender-name">{{$mail.from_name}}</div>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,7 +7,7 @@
 | 
			
		|||
 | 
			
		||||
	{{if $registertext != ""}}<div class="error-message">{{$registertext nofilter}} </div>{{/if}}
 | 
			
		||||
 | 
			
		||||
	{{if $explicit_content}} <p id="register-explicid-content">{{$explicit_content_note}}</p> {{/if}}
 | 
			
		||||
	{{if $explicit_content}} <p id="register-explicit-content">{{$explicit_content_note}}</p> {{/if}}
 | 
			
		||||
 | 
			
		||||
	<p id="register-fill-desc">{{$fillwith}}</p>
 | 
			
		||||
	<p id="register-fill-ext">{{$fillext}}</p>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
{{*
 | 
			
		||||
	Please don't use this template as is, this is a placeholder that needs to be
 | 
			
		||||
	overriden with specific icons to avoid taking too much visual space
 | 
			
		||||
	overridden with specific icons to avoid taking too much visual space
 | 
			
		||||
*}}
 | 
			
		||||
{{if $delivery.queue_count >= -1 && $delivery.queue_count !== '' && $delivery.queue_count !== null}}
 | 
			
		||||
<span class="delivery">
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -19,7 +19,7 @@ function showHideForumlist() {
 | 
			
		|||
	<span class="fakelink" onclick="openCloseWidget('forumlist-sidebar', 'forumlist-sidebar-inflated');">
 | 
			
		||||
		<h3 id="forumlist">{{$title}}</h3>
 | 
			
		||||
	</span>
 | 
			
		||||
	<ul id="forumlist-sidbar-ul" role="menu">
 | 
			
		||||
	<ul id="forumlist-sidebar-ul" role="menu">
 | 
			
		||||
		{{foreach $forums as $forum}}
 | 
			
		||||
		{{if $forum.id <= $visible_forums}}
 | 
			
		||||
		<li class="forum-widget-entry forum-{{$forum.cid}}" id="forum-widget-entry-{{$forum.id}}" role="menuitem">
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,7 +6,7 @@ I concentrated on 3 topics:
 | 
			
		|||
 | 
			
		||||
1. A Modern, mobile friendly UI with bootstrap and awesome font
 | 
			
		||||
2. Try to get a new UX for friendica (e.g. use modals where it seems to be useful)
 | 
			
		||||
3. Give the user a powerfull (but easy) possebillities for custimation to personalize the theme and give it a own note.
 | 
			
		||||
3. Give the user a powerfull (but easy) possibilities for customization to personalize the theme and give it a own note.
 | 
			
		||||
 | 
			
		||||
**Installation Requirements:**
 | 
			
		||||
* modern Browser with JS enabled (Chrome/Chromium is recommended)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1133,7 +1133,7 @@ aside > #datebrowse-sidebar .posted-date-selector-months > ul > li:hover {
 | 
			
		|||
	-ms-transition: all 0.2s ease-in-out;
 | 
			
		||||
	transition: all 0.2s ease-in-out;
 | 
			
		||||
}
 | 
			
		||||
#forumlist-sidbar-ul li:hover a > .forumlist-img {
 | 
			
		||||
#forumlist-sidebar-ul li:hover a > .forumlist-img {
 | 
			
		||||
	-webkit-filter: unset;
 | 
			
		||||
	filter: unset;
 | 
			
		||||
	opacity: unset;
 | 
			
		||||
| 
						 | 
				
			
			@ -1225,7 +1225,7 @@ aside .vcard .icon {
 | 
			
		|||
}
 | 
			
		||||
aside .vcard #subscribe-feed-link-button,
 | 
			
		||||
aside .vcard #dfrn-request-link-button,
 | 
			
		||||
aside .vcard #wallmessage-link-botton {
 | 
			
		||||
aside .vcard #wallmessage-link-button {
 | 
			
		||||
	width: 50%;
 | 
			
		||||
	margin: 0 0 0 -5px;
 | 
			
		||||
	float: left;
 | 
			
		||||
| 
						 | 
				
			
			@ -1790,9 +1790,6 @@ blockquote.shared_content {
 | 
			
		|||
	font-weight: 500;
 | 
			
		||||
	color: $font_color_darker;
 | 
			
		||||
}
 | 
			
		||||
.media .media-body .addional-info a {
 | 
			
		||||
	display: block;
 | 
			
		||||
}
 | 
			
		||||
.media .contact-info-comment {
 | 
			
		||||
	display: table-cell;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -2183,7 +2180,7 @@ wall-item-comment-wrapper.well hr {
 | 
			
		|||
nav .acpopup {
 | 
			
		||||
	margin-left: -23px;
 | 
			
		||||
}
 | 
			
		||||
/** @todo: we schould consider the possebility to overwrite bootstrap dropdowns
 | 
			
		||||
/** @todo: we schould consider the possibility to overwrite bootstrap dropdowns
 | 
			
		||||
 at the beginning of this file to get rid of the !important */
 | 
			
		||||
.textcomplete-item > a {
 | 
			
		||||
	color: $font_color_darker !important;
 | 
			
		||||
| 
						 | 
				
			
			@ -2226,7 +2223,7 @@ img.acpopup-img {
 | 
			
		|||
 | 
			
		||||
/* Menubar Tabs */
 | 
			
		||||
section > .tabbar-wrapper {
 | 
			
		||||
	/* The tabbar shouldn't' be visibile inside
 | 
			
		||||
	/* The tabbar shouldn't' be visible inside
 | 
			
		||||
the section element. Only after we have
 | 
			
		||||
moved it to the nav through js */
 | 
			
		||||
	display: none !important;
 | 
			
		||||
| 
						 | 
				
			
			@ -2317,7 +2314,7 @@ ul.dropdown-menu li:hover {
 | 
			
		|||
	margin-top: 3px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Notificaiotn badges */
 | 
			
		||||
/* Notification badges */
 | 
			
		||||
#mail-update-li.show {
 | 
			
		||||
	display: inline-block !important;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -3169,7 +3166,7 @@ ul.notif-network-list li.unseen {
 | 
			
		|||
 | 
			
		||||
/* Search Page */
 | 
			
		||||
 | 
			
		||||
/* This is a little bit hacky. Since the search page is used for diferent
 | 
			
		||||
/* This is a little bit hacky. Since the search page is used for different
 | 
			
		||||
content types we can't apply the generic-page-wrapper class.
 | 
			
		||||
So we apply the css of the generic-page-wrapper class to the ul element with some
 | 
			
		||||
little modifications to emulate a standard page template */
 | 
			
		||||
| 
						 | 
				
			
			@ -3666,7 +3663,7 @@ section .profile-match-wrapper {
 | 
			
		|||
	background: transparent;
 | 
			
		||||
	cursor: pointer;
 | 
			
		||||
}
 | 
			
		||||
.fc .fc-listMonth-view .seperator {
 | 
			
		||||
.fc .fc-listMonth-view .separator {
 | 
			
		||||
	margin-left: 30px;
 | 
			
		||||
	width: 60px;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -42,7 +42,7 @@ $(document).ready(function () {
 | 
			
		|||
 | 
			
		||||
	// hover cards should be removed very easily, e.g. when any of these events happens
 | 
			
		||||
	$body.on("mouseleave touchstart scroll mousedown submit keydown", function (e) {
 | 
			
		||||
		// remove hover card only for desktiop user, since on mobile we open the hovercards
 | 
			
		||||
		// remove hover card only for desktop user, since on mobile we open the hovercards
 | 
			
		||||
		// by click event insteadof hover
 | 
			
		||||
		removeAllHovercards(e, new Date().getTime());
 | 
			
		||||
	});
 | 
			
		||||
| 
						 | 
				
			
			@ -130,7 +130,7 @@ function openHovercard(targetElement, contactUrl, timeNow) {
 | 
			
		|||
	let title = targetElement.attr("title");
 | 
			
		||||
	targetElement.attr({ "data-orig-title": title, title: "" });
 | 
			
		||||
 | 
			
		||||
	// get an additional data atribute if the card is active
 | 
			
		||||
	// get an additional data attribute if the card is active
 | 
			
		||||
	targetElement.attr("data-hover-card-active", timeNow);
 | 
			
		||||
	// get the whole html content of the hover card and
 | 
			
		||||
	// push it to the bootstrap popover
 | 
			
		||||
| 
						 | 
				
			
			@ -140,7 +140,7 @@ function openHovercard(targetElement, contactUrl, timeNow) {
 | 
			
		|||
				.popover({
 | 
			
		||||
					html: true,
 | 
			
		||||
					placement: function () {
 | 
			
		||||
						// Calculate the placement of the the hovercard (if top or bottom)
 | 
			
		||||
						// Calculate the placement of the hovercard (if top or bottom)
 | 
			
		||||
						// The placement depence on the distance between window top and the element
 | 
			
		||||
						// which triggers the hover-card
 | 
			
		||||
						let get_position = $(targetElement).offset().top - $(window).scrollTop();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPLv3-or-later
 | 
			
		||||
/**
 | 
			
		||||
 * Javascript for the admin module
 | 
			
		||||
 * JavaScript for the admin module
 | 
			
		||||
 */
 | 
			
		||||
$(function () {
 | 
			
		||||
	let $body = $("body");
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPLv3-or-later
 | 
			
		||||
/**
 | 
			
		||||
 * Javascript for the display module
 | 
			
		||||
 * JavaScript for the display module
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
// Catch the GUID from the URL
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -266,9 +266,9 @@ function eventHoverHtmlContent(event) {
 | 
			
		|||
	// Get only template data if there exists location data
 | 
			
		||||
	if (event.location) {
 | 
			
		||||
		var eventLocationText = htmlToText(event.location);
 | 
			
		||||
		// Get the the html template for formatting the location
 | 
			
		||||
		// Get the html template for formatting the location
 | 
			
		||||
		var eventLocationTemplate = eventHoverLocationTemplate();
 | 
			
		||||
		// Format the event location data according to the the event location
 | 
			
		||||
		// Format the event location data according to the event location
 | 
			
		||||
		// template
 | 
			
		||||
		eventLocation = eventLocationTemplate.format(eventLocationText);
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			@ -295,12 +295,12 @@ function eventHoverHtmlContent(event) {
 | 
			
		|||
	return formatted;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// transform the the list view event element into formatted html
 | 
			
		||||
// transform the list view event element into formatted html
 | 
			
		||||
function formatListViewEvent(event) {
 | 
			
		||||
	// The basic template for list view
 | 
			
		||||
	var template =
 | 
			
		||||
		'<td class="fc-list-item-title fc-widget-content">\
 | 
			
		||||
				<hr class="seperator"></hr>\
 | 
			
		||||
				<hr class="separator"></hr>\
 | 
			
		||||
				<div class="event-card">\
 | 
			
		||||
					<div class="popover-content hovercard-content">{0}</div>\
 | 
			
		||||
				</div>\
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -31,7 +31,7 @@ function groupChangeMember(gid, cid, sec_token) {
 | 
			
		|||
		// Insert the new group member list
 | 
			
		||||
		$("#group-update-wrapper").html(data);
 | 
			
		||||
 | 
			
		||||
		// Apply the actual gropu list view mode to the new
 | 
			
		||||
		// Apply the actual group list view mode to the new
 | 
			
		||||
		// group list html
 | 
			
		||||
		var activeMode = $(".group-list-switcher.active");
 | 
			
		||||
		switchGroupViewMode(activeMode[0]);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,7 @@
 | 
			
		|||
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPLv3-or-later
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Javascript for the notifications module
 | 
			
		||||
 * JavaScript for the notifications module
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
// Catch the intro ID from the URL
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -42,7 +42,7 @@ $(window).load(function () {
 | 
			
		|||
	var pheight = $("#photo-photo img").height();
 | 
			
		||||
	var pwidth = $("#photo-photo img").width();
 | 
			
		||||
 | 
			
		||||
	// Append the diminsons of the picture to the css of the photo-photo div
 | 
			
		||||
	// Append the dimensions of the picture to the css of the photo-photo div
 | 
			
		||||
	// we do this to make it possible to have overlay navigation buttons for the photo
 | 
			
		||||
	$("#photo-photo").css({
 | 
			
		||||
		width: pwidth,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,7 +23,7 @@ $(document).ready(function () {
 | 
			
		|||
		$("#jot-content").append(jotcache);
 | 
			
		||||
		// Clear the jotcache.
 | 
			
		||||
		jotcache = "";
 | 
			
		||||
		// Destroy the attachment linkPreviw for Jot.
 | 
			
		||||
		// Destroy the attachment linkPreview for Jot.
 | 
			
		||||
		if (typeof linkPreview === "object") {
 | 
			
		||||
			linkPreview.destroy();
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			@ -38,7 +38,7 @@ $(document).ready(function () {
 | 
			
		|||
		// We need to make sure we only put a Colorbox on links to Friendica images.
 | 
			
		||||
		// We'll try to do this by looking for links of the form
 | 
			
		||||
		// .../photo/ab803d8eg08daf85023adfec08 (with nothing more following), in hopes
 | 
			
		||||
		// that that will be unique enough.
 | 
			
		||||
		// that will be unique enough.
 | 
			
		||||
		if (imgHref.match(/\/photo\/[a-fA-F0-9]+(-[0-9]\.[\w]+?)?$/)) {
 | 
			
		||||
			// Add a unique class to all the images of a certain post, to allow scrolling through
 | 
			
		||||
			var cBoxClass = $(this).closest(".wall-item-body").attr("id") + "-lightbox";
 | 
			
		||||
| 
						 | 
				
			
			@ -190,7 +190,7 @@ function loadModalTitle() {
 | 
			
		|||
	// Get the text of the first element with "heading" class.
 | 
			
		||||
	title = $("#modal-body .heading").first().html();
 | 
			
		||||
 | 
			
		||||
	// for event modals we need some speacial handling
 | 
			
		||||
	// for event modals we need some special handling
 | 
			
		||||
	if ($("#modal-body .event-wrapper .event-summary").length) {
 | 
			
		||||
		title = '<i class="fa fa-calendar" aria-hidden="true"></i> ';
 | 
			
		||||
		var eventsum = $("#modal-body .event-wrapper .event-summary").html();
 | 
			
		||||
| 
						 | 
				
			
			@ -230,7 +230,7 @@ function addToModal(url, id) {
 | 
			
		|||
			loadModalTitle();
 | 
			
		||||
 | 
			
		||||
			// We need to initialize autosize again for new
 | 
			
		||||
			// modal conent.
 | 
			
		||||
			// modal content.
 | 
			
		||||
			autosize($(".modal .text-autosize"));
 | 
			
		||||
		}
 | 
			
		||||
	});
 | 
			
		||||
| 
						 | 
				
			
			@ -269,7 +269,7 @@ function editpost(url) {
 | 
			
		|||
 | 
			
		||||
	// For editpost we load the modal html of "jot-sections" of the edit page. So we would have two jot forms in
 | 
			
		||||
	// the page html. To avoid js conflicts we store the original jot in the variable jotcache.
 | 
			
		||||
	// After closing the modal original jot should be restored at its orginal position in the html structure.
 | 
			
		||||
	// After closing the modal original jot should be restored at its original position in the html structure.
 | 
			
		||||
	jotcache = $("#jot-content > #jot-sections");
 | 
			
		||||
 | 
			
		||||
	// Remove the original Jot as long as the edit Jot is open.
 | 
			
		||||
| 
						 | 
				
			
			@ -293,7 +293,7 @@ function editpost(url) {
 | 
			
		|||
 | 
			
		||||
			// To make dropzone fileupload work on editing a comment, we need to
 | 
			
		||||
			// attach a new dropzone to modal
 | 
			
		||||
			dzFactory.setupDropzone('#jot-text-wrap', 'profile-jot-text'); 
 | 
			
		||||
			dzFactory.setupDropzone('#jot-text-wrap', 'profile-jot-text');
 | 
			
		||||
 | 
			
		||||
			modal.show();
 | 
			
		||||
			$("#jot-popup").show();
 | 
			
		||||
| 
						 | 
				
			
			@ -340,10 +340,10 @@ function toggleJotNav(elm) {
 | 
			
		|||
	$("#jot-modal .modal-header .nav-tabs .jot-nav-lnk").attr("aria-selected", "false");
 | 
			
		||||
	elm.setAttribute("aria-selected", "true");
 | 
			
		||||
 | 
			
		||||
	// For some some tab panels we need to execute other js functions.
 | 
			
		||||
	// For some tab panels we need to execute other js functions.
 | 
			
		||||
	if (tabpanel === "jot-preview-content") {
 | 
			
		||||
		preview_post();
 | 
			
		||||
		// Make Share button visivle in preview
 | 
			
		||||
		// Make Share button visible in preview
 | 
			
		||||
		$("#jot-preview-share").removeClass("minimize").attr("aria-hidden", "false");
 | 
			
		||||
	} else if (tabpanel === "jot-fbrowser-wrapper") {
 | 
			
		||||
		$(function () {
 | 
			
		||||
| 
						 | 
				
			
			@ -351,7 +351,7 @@ function toggleJotNav(elm) {
 | 
			
		|||
		});
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// If element is a mobile dropdown nav menu we need to change the botton text.
 | 
			
		||||
	// If element is a mobile dropdown nav menu we need to change the button text.
 | 
			
		||||
	if (cls) {
 | 
			
		||||
		toggleDropdownText(elm);
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			@ -361,7 +361,7 @@ function toggleJotNav(elm) {
 | 
			
		|||
// it redirects you to your own server. In such cases we can't
 | 
			
		||||
// load it into a modal.
 | 
			
		||||
function openWallMessage(url) {
 | 
			
		||||
	// Split the the url in its parts.
 | 
			
		||||
	// Split the url in its parts.
 | 
			
		||||
	var parts = parseUrl(url);
 | 
			
		||||
 | 
			
		||||
	// If the host isn't the same we can't load it in a modal.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -36,14 +36,14 @@ $(document).ready(function () {
 | 
			
		|||
		return false;
 | 
			
		||||
	});
 | 
			
		||||
 | 
			
		||||
	// add the class "selected" to group widges li if li > a does have the class group-selected
 | 
			
		||||
	// add the class "selected" to group widgets li if li > a does have the class group-selected
 | 
			
		||||
	if ($("#sidebar-group-ul li a").hasClass("group-selected")) {
 | 
			
		||||
		$("#sidebar-group-ul li a.group-selected").parent("li").addClass("selected");
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// add the class "selected" to forums widges li if li > a does have the class forum-selected
 | 
			
		||||
	if ($("#forumlist-sidbar-ul li a").hasClass("forum-selected")) {
 | 
			
		||||
		$("#forumlist-sidbar-ul li a.forum-selected").parent("li").addClass("selected");
 | 
			
		||||
	// add the class "selected" to forums widgets li if li > a does have the class forum-selected
 | 
			
		||||
	if ($("#forumlist-sidebar-ul li a").hasClass("forum-selected")) {
 | 
			
		||||
		$("#forumlist-sidebar-ul li a.forum-selected").parent("li").addClass("selected");
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// add the class "active" to tabmenuli if li > a does have the class active
 | 
			
		||||
| 
						 | 
				
			
			@ -51,7 +51,7 @@ $(document).ready(function () {
 | 
			
		|||
		$("#tabmenu ul li a.active").parent("li").addClass("active");
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// give select fields an boostrap classes
 | 
			
		||||
	// give select fields Bootstrap classes
 | 
			
		||||
	// @todo: this needs to be changed in friendica core
 | 
			
		||||
	$(".field.select, .field.custom").addClass("form-group");
 | 
			
		||||
	$(".field.select > select, .field.custom > select").addClass("form-control");
 | 
			
		||||
| 
						 | 
				
			
			@ -61,8 +61,8 @@ $(document).ready(function () {
 | 
			
		|||
 | 
			
		||||
	// add mask css url to the logo-img container
 | 
			
		||||
	//
 | 
			
		||||
	// This is for firefox - we use a mask which looks like the friendica logo to apply user collers
 | 
			
		||||
	// to the friendica logo (the mask is in nav.tpl at the botom). To make it work we need to apply the
 | 
			
		||||
	// This is for firefox - we use a mask which looks like the friendica logo to apply user colors
 | 
			
		||||
	// to the friendica logo (the mask is in nav.tpl at the bottom). To make it work we need to apply the
 | 
			
		||||
	// correct url. The only way which comes to my mind was to do this with js
 | 
			
		||||
	// So we apply the correct url (with the link to the id of the mask) after the page is loaded.
 | 
			
		||||
	if ($("#logo-img").length) {
 | 
			
		||||
| 
						 | 
				
			
			@ -121,7 +121,7 @@ $(document).ready(function () {
 | 
			
		|||
		}
 | 
			
		||||
	});
 | 
			
		||||
 | 
			
		||||
	// initialize the bootstrap tooltips
 | 
			
		||||
	// initialize the Bootstrap tooltips
 | 
			
		||||
	$body.tooltip({
 | 
			
		||||
		selector: '[data-toggle="tooltip"]',
 | 
			
		||||
		container: "body",
 | 
			
		||||
| 
						 | 
				
			
			@ -279,7 +279,7 @@ $(document).ready(function () {
 | 
			
		|||
	// Set the padding for input elements with inline buttons
 | 
			
		||||
	//
 | 
			
		||||
	// In Frio we use some input elements where the submit button is visually
 | 
			
		||||
	// inside the the input field (through css). We need to set a padding-right
 | 
			
		||||
	// inside the input field (through css). We need to set a padding-right
 | 
			
		||||
	// to the input element where the padding value would be at least the width
 | 
			
		||||
	// of the button. Otherwise long user input would be invisible because it is
 | 
			
		||||
	// behind the button.
 | 
			
		||||
| 
						 | 
				
			
			@ -478,7 +478,7 @@ function showHide(theID) {
 | 
			
		|||
// Show & hide event map in the network stream by button click.
 | 
			
		||||
function showHideEventMap(elm) {
 | 
			
		||||
	// Get the id of the map element - it should be provided through
 | 
			
		||||
	// the atribute "data-map-id".
 | 
			
		||||
	// the attribute "data-map-id".
 | 
			
		||||
	var mapID = elm.getAttribute("data-map-id");
 | 
			
		||||
 | 
			
		||||
	// Get translation labels.
 | 
			
		||||
| 
						 | 
				
			
			@ -698,7 +698,7 @@ function parseUrl(str, component) {
 | 
			
		|||
	return uri;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// trim function to replace whithespace after the string
 | 
			
		||||
// trim function to replace whitespace after the string
 | 
			
		||||
String.prototype.rtrim = function () {
 | 
			
		||||
	var trimmed = this.replace(/\s+$/g, "");
 | 
			
		||||
	return trimmed;
 | 
			
		||||
| 
						 | 
				
			
			@ -740,7 +740,7 @@ function scrollToItem(elementId) {
 | 
			
		|||
		)
 | 
			
		||||
		.promise()
 | 
			
		||||
		.done(function () {
 | 
			
		||||
			// Highlight post/commenent with ID  (GUID)
 | 
			
		||||
			// Highlight post/comment with ID  (GUID)
 | 
			
		||||
			$el.animate(colWhite, 1000).animate(colShiny).animate({ backgroundColor: "transparent" }, 600);
 | 
			
		||||
		});
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -31,7 +31,7 @@ class Image
 | 
			
		|||
	 * Give all available options for the background image
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param array $arr Array with the present user settings
 | 
			
		||||
	 * @return array Array with the immage options
 | 
			
		||||
	 * @return array Array with the image options
 | 
			
		||||
	 */
 | 
			
		||||
	public static function get_options(array $arr): array
 | 
			
		||||
	{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -15,8 +15,8 @@ Instantiate an object of the color class with a hex color string `$foo = new Col
 | 
			
		|||
- <strong>darken( [$amount] )</strong> : Allows you to obtain a darker shade of your color. Optionally you can decide to darken using a desired percentage.
 | 
			
		||||
- <strong>lighten( [$amount] )</strong> : Allows you to obtain a lighter shade of your color. Optionally you can decide to lighten using a desired percentage.
 | 
			
		||||
- <strong>mix($hex, [$amount] )</strong> : Allows you to mix another color to your color. Optionally you can decide to set the percent of second color or original color amount is ranged -100..0.100.
 | 
			
		||||
- <strong>isLight( [$hex] )</strong> : Determins whether your color (or the provide param) is considered a "light" color. Returns `TRUE` if color is light.
 | 
			
		||||
- <strong>isDark( [$hex] )</strong> : Determins whether your color (or the provide param) is considered a "dark" color. Returns `TRUE` if color is dark.
 | 
			
		||||
- <strong>isLight( [$hex] )</strong> : Determines whether your color (or the provide param) is considered a "light" color. Returns `TRUE` if color is light.
 | 
			
		||||
- <strong>isDark( [$hex] )</strong> : Determines whether your color (or the provide param) is considered a "dark" color. Returns `TRUE` if color is dark.
 | 
			
		||||
- <strong>makeGradient( [$amount] )</strong> : Returns an array with 2 indices `light` and `dark`, the initial color will either be selected for `light` or `dark` depending on its brightness, then the other color will be generated.  The optional param allows for a static lighten or darkened amount.
 | 
			
		||||
- <strong>complementary()</strong> : Returns the color "opposite" or complementary to your color.
 | 
			
		||||
- <strong>getHex()</strong> : Returns the original hex color.
 | 
			
		||||
| 
						 | 
				
			
			@ -145,7 +145,7 @@ echo $myBlue->getCssGradient(10, TRUE);
 | 
			
		|||
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Github Contributors
 | 
			
		||||
## GitHub Contributors
 | 
			
		||||
- mexitek
 | 
			
		||||
- danielpataki
 | 
			
		||||
- alexmglover
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -19,7 +19,7 @@
 | 
			
		|||
		<div class="modal-dialog modal-full-screen">
 | 
			
		||||
			<div class="modal-content">
 | 
			
		||||
				<div id="modal-header" class="modal-header">
 | 
			
		||||
					<button id="modal-cloase" type="button" class="close" data-dismiss="modal">
 | 
			
		||||
					<button id="modal-close" type="button" class="close" data-dismiss="modal">
 | 
			
		||||
						×
 | 
			
		||||
					</button>
 | 
			
		||||
					<h4 id="modal-title" class="modal-title"></h4>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -126,7 +126,7 @@ $('nav').bind('nav-update', function(e,data)
 | 
			
		|||
	<div class="modal-dialog modal-full-screen">
 | 
			
		||||
		<div class="modal-content">
 | 
			
		||||
			<div id="modal-header" class="modal-header">
 | 
			
		||||
				<button id="modal-cloase" type="button" class="close" data-dismiss="modal">
 | 
			
		||||
				<button id="modal-close" type="button" class="close" data-dismiss="modal">
 | 
			
		||||
					×
 | 
			
		||||
				</button>
 | 
			
		||||
				<h4 id="modal-title" class="modal-title"></h4>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -67,7 +67,7 @@
 | 
			
		|||
					<td class="
 | 
			
		||||
						{{if $row->level == "CRITICAL"}}bg-danger
 | 
			
		||||
						{{elseif $row->level == "ERROR"}}bg-danger
 | 
			
		||||
						{{elseif $row->level == "WARNING"}}bg-warinig
 | 
			
		||||
						{{elseif $row->level == "WARNING"}}bg-warning
 | 
			
		||||
						{{elseif $row->level == "NOTICE"}}bg-info
 | 
			
		||||
						{{elseif $row->level == "DEBUG"}}text-muted
 | 
			
		||||
						{{/if}}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -177,7 +177,7 @@
 | 
			
		|||
			 *    Corporate
 | 
			
		||||
			 */ -->
 | 
			
		||||
			<div class="panel">
 | 
			
		||||
				<div class="section-subtitle-wrapper panel-heading" role="tab" id="admin-settings-$dvanced">
 | 
			
		||||
				<div class="section-subtitle-wrapper panel-heading" role="tab" id="admin-settings-advanced">
 | 
			
		||||
					<h2>
 | 
			
		||||
						<button class="btn-link accordion-toggle collapsed" data-toggle="collapse" data-parent="#admin-settings" href="#admin-settings-advanced-collapse" aria-expanded="false" aria-controls="admin-settings-advanced-collapse">
 | 
			
		||||
							{{$advanced}}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,10 +11,10 @@
 | 
			
		|||
	</div>
 | 
			
		||||
	{{/if}}
 | 
			
		||||
 | 
			
		||||
	{{* We create our own fullcallendar header (with title & calendar view *}}
 | 
			
		||||
	{{* We create our own fullcalendar header (with title & calendar view *}}
 | 
			
		||||
	<div id="fc-header" class="clear">
 | 
			
		||||
		<div id="fc-header-right" class="pull-right">
 | 
			
		||||
			{{* The dropdown to change the callendar view *}}
 | 
			
		||||
			{{* The dropdown to change the calendar view *}}
 | 
			
		||||
			<ul class="nav nav-pills">
 | 
			
		||||
				<li class="dropdown pull-right">
 | 
			
		||||
					<button class="btn btn-link dropdown-toggle" type="button" id="event-calendar-views" data-toggle="dropdown" aria-expanded="false">
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -34,7 +34,7 @@
 | 
			
		|||
		<input type="hidden" name="uri" value="{{$uri}}" />
 | 
			
		||||
		<input type="hidden" name="preview" id="event-edit-preview" value="0" />
 | 
			
		||||
 | 
			
		||||
		{{* The tab conten with the necessary basic settings *}}
 | 
			
		||||
		{{* The tab content with the necessary basic settings *}}
 | 
			
		||||
		<div id="event-edit-wrapper">
 | 
			
		||||
 | 
			
		||||
			{{* The event title *}}
 | 
			
		||||
| 
						 | 
				
			
			@ -47,7 +47,7 @@
 | 
			
		|||
				{{* The field for event finish time *}}
 | 
			
		||||
				{{$f_dsel nofilter}}
 | 
			
		||||
 | 
			
		||||
				{{* checkbox if the the event doesn't have a finish time *}}
 | 
			
		||||
				{{* checkbox if the event doesn't have a finish time *}}
 | 
			
		||||
				{{include file="field_checkbox.tpl" field=$nofinish}}
 | 
			
		||||
			</div>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -92,7 +92,7 @@
 | 
			
		|||
					<h4 class="media-heading"><a href="{{if !empty($contact.photo_menu.edit)}}{{$contact.photo_menu.edit.1}}{{else}}{{$contact.url}}{{/if}}">{{$contact.name}}</a>
 | 
			
		||||
					{{if $contact.account_type}} <small class="contact-entry-details" id="contact-entry-accounttype-{{$contact.id}}">({{$contact.account_type}})</small>{{/if}}
 | 
			
		||||
					{{if $contact.account_type == 'Forum'}}<i class="fa fa-comments-o" aria-hidden="true"></i>{{/if}}
 | 
			
		||||
					{{* @todo this needs some changing in core because $contact.account_type contains a translated string which may notbe the same in every language *}}
 | 
			
		||||
					{{* @todo this needs some changing in core because $contact.account_type contains a translated string which may not be the same in every language *}}
 | 
			
		||||
					</h4>
 | 
			
		||||
				</div>
 | 
			
		||||
				{{if $contact.alt_text}}<div class="contact-entry-details contact-entry-rel" id="contact-entry-rel-{{$contact.id}}">{{$contact.alt_text}}</div>{{/if}}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,7 +3,7 @@
 | 
			
		|||
				<div class="modal-dialog modal-full-screen">
 | 
			
		||||
					<div class="modal-content">
 | 
			
		||||
						<div id="modal-header" class="modal-header">
 | 
			
		||||
							<button id="modal-cloase" type="button" class="close" data-dismiss="modal">
 | 
			
		||||
							<button id="modal-close" type="button" class="close" data-dismiss="modal">
 | 
			
		||||
								×
 | 
			
		||||
							</button>
 | 
			
		||||
							<h4 id="modal-title" class="modal-title"></h4>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -58,9 +58,9 @@
 | 
			
		|||
	{{if $groupeditor}}
 | 
			
		||||
	{{* The buttons to switch between the different view modes *}}
 | 
			
		||||
	<div id="group-list-view-switcher" class="btn-group btn-group-sm pull-right">
 | 
			
		||||
		<botton type="button" id="group-list-big" class="active group-list-switcher btn btn-default">
 | 
			
		||||
		<button type="button" id="group-list-big" class="active group-list-switcher btn btn-default">
 | 
			
		||||
			<i class="fa fa-align-justify" aria-hidden="true"></i>
 | 
			
		||||
		</botton>
 | 
			
		||||
		</button>
 | 
			
		||||
		<button type="button" id="group-list-small" class="btn btn-default group-list-switcher">
 | 
			
		||||
			<i class="fa fa-th-large" aria-hidden="true"></i>
 | 
			
		||||
		</button>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -170,7 +170,7 @@
 | 
			
		|||
				}
 | 
			
		||||
			});
 | 
			
		||||
 | 
			
		||||
			// Fade the the the container from the items we want to delete
 | 
			
		||||
			// Fade the container from the items we want to delete
 | 
			
		||||
			for(var key in  ItemsToDelete) {
 | 
			
		||||
				$(ItemsToDelete[key]).fadeTo('fast', 0.33);
 | 
			
		||||
			};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||