Compare commits
114 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
622b978a84 |
|||
|
5a553df7d8 |
|||
|
ed3c53a5f8 |
|||
|
bff57bb030 |
|||
|
777872e6fa |
|||
|
c0d7f8944d |
|||
|
60f8c2d795 |
|||
|
5f6943b008 |
|||
|
5792a01a01 |
|||
|
f3599fa3e9 |
|||
|
065dad79ca |
|||
|
a063a89c57 |
|||
|
b6bfe72083 |
|||
|
7bb0cb5323 |
|||
|
2c5685c89c |
|||
|
d7d2ad77ff |
|||
|
39f2d197ea |
|||
|
6f1d52cf71 |
|||
|
2f961b11bf |
|||
|
fa14a02a19 |
|||
|
f3b57008b5 |
|||
|
41f34c4261 |
|||
|
9691bb06fb |
|||
|
94eb426151 |
|||
|
c29c49797a |
|||
|
4e437190c5 |
|||
|
a1a81cdc6b |
|||
|
8fc710f82a |
|||
|
8ba3f13fae |
|||
|
7ec07178c8 |
|||
|
e90ad0c1cd |
|||
|
b2e5993314 |
|||
|
92a1d14e5e |
|||
|
8756d92316 |
|||
|
8aaf99c61d |
|||
|
bd3a7b9877 |
|||
|
69cda4f760 |
|||
|
7cbb818c93 |
|||
|
89302d0843 |
|||
|
aaf5c323b6 |
|||
|
adb4aea6ad |
|||
|
51f43278d6 |
|||
| 88c40f3336 | |||
| a770634b95 | |||
| 36d56a4041 | |||
| c467bff79f | |||
| 4f3321cc9f | |||
| 10bb7d5625 | |||
| fdd237a090 | |||
| 605e7d55b3 | |||
| 0c9aff8a09 | |||
| af8cd5ca86 | |||
| 227bab43a8 | |||
| f7c1eaa858 | |||
| e484b6d6dc | |||
| 45b5f67bca | |||
| 5c9ce790bf | |||
| 33768ea1c6 | |||
| 4e53666c70 | |||
| 7560dccc08 | |||
| 2766c7d9cf | |||
| a587217f47 | |||
| dd54e52575 | |||
| c351099c5a | |||
| 2c5595c358 | |||
| 40d7f29a11 | |||
| 1edc6b3c3b | |||
| 42b04f397b | |||
| aa5f0d5ec1 | |||
| 97e27cb523 | |||
| c2e889cfae | |||
|
a8a21c7fb6 |
|||
|
5106bb2881 |
|||
|
a903dbd77e |
|||
|
51b31a846f |
|||
|
6035de6883 |
|||
|
341d8860d1 |
|||
|
51a7b5c584 |
|||
|
0e1f734b03 |
|||
|
e8fee5644b |
|||
|
624e4c192c |
|||
|
962b06bf41 |
|||
|
f2b7326650 |
|||
|
7814ba4fc4 |
|||
|
b200874f17 |
|||
|
b1e4c0931a |
|||
|
bb57d45237 |
|||
|
e9af4b5bb9 |
|||
|
65da5246ca |
|||
|
13ef86d4a3 |
|||
|
58c48977ec |
|||
|
fd0d4aedee |
|||
|
207bf58801 |
|||
|
5fa954208a |
|||
|
a3fa95e8e4 |
|||
|
34aee64349 |
|||
|
143e4c4a18 |
|||
|
98954dd14e |
|||
| 726c4dff7d | |||
|
f839cd3826 |
|||
| b816ae4db5 | |||
|
|
1eadcb4855 |
||
|
6d6f356446 |
|||
|
7614ace843 |
|||
|
cc77052817 |
|||
|
663296b107 |
|||
| 70b9a8114d | |||
| d9fb081db9 | |||
| a47f1efec3 | |||
| c1a64b77c0 | |||
| a5b5f9316d | |||
| e0a0c57c44 | |||
|
05a76a3dc2 |
|||
|
13d7242463 |
|
|
@ -1,3 +1,11 @@
|
||||||
|
Version 2022.09 (unreleased)
|
||||||
|
Friendica Core
|
||||||
|
|
||||||
|
Friendica Addons
|
||||||
|
|
||||||
|
Closed Issues
|
||||||
|
|
||||||
|
|
||||||
Version 2022.06 (2022-06-11)
|
Version 2022.06 (2022-06-11)
|
||||||
Friendica Core
|
Friendica Core
|
||||||
Added DA DK translation, updates to the translations DE, FR, HU, PL, RU, ZH CN [translation teams]
|
Added DA DK translation, updates to the translations DE, FR, HU, PL, RU, ZH CN [translation teams]
|
||||||
|
|
|
||||||
2
VERSION
|
|
@ -1 +1 @@
|
||||||
2022.06
|
2022.09-dev
|
||||||
|
|
|
||||||
2
boot.php
|
|
@ -31,7 +31,7 @@ use Friendica\Model\Contact;
|
||||||
|
|
||||||
define('FRIENDICA_PLATFORM', 'Friendica');
|
define('FRIENDICA_PLATFORM', 'Friendica');
|
||||||
define('FRIENDICA_CODENAME', 'Giant Rhubarb');
|
define('FRIENDICA_CODENAME', 'Giant Rhubarb');
|
||||||
define('FRIENDICA_VERSION', '2022.06');
|
define('FRIENDICA_VERSION', '2022.09-dev');
|
||||||
define('DFRN_PROTOCOL_VERSION', '2.23');
|
define('DFRN_PROTOCOL_VERSION', '2.23');
|
||||||
define('NEW_TABLE_STRUCTURE_VERSION', 1288);
|
define('NEW_TABLE_STRUCTURE_VERSION', 1288);
|
||||||
|
|
||||||
|
|
|
||||||
10
database.sql
|
|
@ -1,6 +1,6 @@
|
||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
-- Friendica 2022.06 (Giant Rhubarb)
|
-- Friendica 2022.09-dev (Giant Rhubarb)
|
||||||
-- DB_UPDATE_VERSION 1469
|
-- DB_UPDATE_VERSION 1470
|
||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1216,12 +1216,12 @@ CREATE TABLE IF NOT EXISTS `post-link` (
|
||||||
CREATE TABLE IF NOT EXISTS `post-media` (
|
CREATE TABLE IF NOT EXISTS `post-media` (
|
||||||
`id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID',
|
`id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID',
|
||||||
`uri-id` int unsigned NOT NULL COMMENT 'Id of the item-uri table entry that contains the item uri',
|
`uri-id` int unsigned NOT NULL COMMENT 'Id of the item-uri table entry that contains the item uri',
|
||||||
`url` varbinary(511) NOT NULL COMMENT 'Media URL',
|
`url` text NOT NULL COMMENT 'Media URL',
|
||||||
`type` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Media type',
|
`type` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Media type',
|
||||||
`mimetype` varchar(60) COMMENT '',
|
`mimetype` varchar(60) COMMENT '',
|
||||||
`height` smallint unsigned COMMENT 'Height of the media',
|
`height` smallint unsigned COMMENT 'Height of the media',
|
||||||
`width` smallint unsigned COMMENT 'Width of the media',
|
`width` smallint unsigned COMMENT 'Width of the media',
|
||||||
`size` int unsigned COMMENT 'Media size',
|
`size` mediumint unsigned COMMENT 'Media size',
|
||||||
`preview` varbinary(255) COMMENT 'Preview URL',
|
`preview` varbinary(255) COMMENT 'Preview URL',
|
||||||
`preview-height` smallint unsigned COMMENT 'Height of the preview picture',
|
`preview-height` smallint unsigned COMMENT 'Height of the preview picture',
|
||||||
`preview-width` smallint unsigned COMMENT 'Width of the preview picture',
|
`preview-width` smallint unsigned COMMENT 'Width of the preview picture',
|
||||||
|
|
@ -1234,7 +1234,7 @@ CREATE TABLE IF NOT EXISTS `post-media` (
|
||||||
`publisher-name` varchar(255) COMMENT 'Name of the publisher of the media',
|
`publisher-name` varchar(255) COMMENT 'Name of the publisher of the media',
|
||||||
`publisher-image` varbinary(255) COMMENT 'Image of the publisher of the media',
|
`publisher-image` varbinary(255) COMMENT 'Image of the publisher of the media',
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
UNIQUE INDEX `uri-id-url` (`uri-id`,`url`),
|
UNIQUE INDEX `uri-id-url` (`uri-id`,`url`(512)),
|
||||||
INDEX `uri-id-id` (`uri-id`,`id`),
|
INDEX `uri-id-id` (`uri-id`,`id`),
|
||||||
FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE
|
FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE
|
||||||
) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Attached media';
|
) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Attached media';
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,7 @@ General
|
||||||
../settings
|
../settings
|
||||||
---------
|
---------
|
||||||
* o - Account
|
* o - Account
|
||||||
|
* 2 - Two-factor authentication
|
||||||
* p - Profiles
|
* p - Profiles
|
||||||
* t - Additional features
|
* t - Additional features
|
||||||
* w - Social Networks
|
* w - Social Networks
|
||||||
|
|
|
||||||
|
|
@ -7,15 +7,15 @@ Fields
|
||||||
------
|
------
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
| --------------- | --------------------------------------------------------- | ----------------- | ---- | --- | ------- | -------------- |
|
| --------------- | --------------------------------------------------------- | ------------------ | ---- | --- | ------- | -------------- |
|
||||||
| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment |
|
| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment |
|
||||||
| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | | NULL | |
|
| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | | NULL | |
|
||||||
| url | Media URL | varbinary(511) | NO | | NULL | |
|
| url | Media URL | text | NO | | NULL | |
|
||||||
| type | Media type | tinyint unsigned | NO | | 0 | |
|
| type | Media type | tinyint unsigned | NO | | 0 | |
|
||||||
| mimetype | | varchar(60) | YES | | NULL | |
|
| mimetype | | varchar(60) | YES | | NULL | |
|
||||||
| height | Height of the media | smallint unsigned | YES | | NULL | |
|
| height | Height of the media | smallint unsigned | YES | | NULL | |
|
||||||
| width | Width of the media | smallint unsigned | YES | | NULL | |
|
| width | Width of the media | smallint unsigned | YES | | NULL | |
|
||||||
| size | Media size | int unsigned | YES | | NULL | |
|
| size | Media size | mediumint unsigned | YES | | NULL | |
|
||||||
| preview | Preview URL | varbinary(255) | YES | | NULL | |
|
| preview | Preview URL | varbinary(255) | YES | | NULL | |
|
||||||
| preview-height | Height of the preview picture | smallint unsigned | YES | | NULL | |
|
| preview-height | Height of the preview picture | smallint unsigned | YES | | NULL | |
|
||||||
| preview-width | Width of the preview picture | smallint unsigned | YES | | NULL | |
|
| preview-width | Width of the preview picture | smallint unsigned | YES | | NULL | |
|
||||||
|
|
@ -32,9 +32,9 @@ Indexes
|
||||||
------------
|
------------
|
||||||
|
|
||||||
| Name | Fields |
|
| Name | Fields |
|
||||||
| ---------- | ------------------- |
|
| ---------- | ------------------------ |
|
||||||
| PRIMARY | id |
|
| PRIMARY | id |
|
||||||
| uri-id-url | UNIQUE, uri-id, url |
|
| uri-id-url | UNIQUE, uri-id, url(512) |
|
||||||
| uri-id-id | uri-id, id |
|
| uri-id-id | uri-id, id |
|
||||||
|
|
||||||
Foreign Keys
|
Foreign Keys
|
||||||
|
|
|
||||||
BIN
images/default/corgidon.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
images/default/diaspora.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
160
images/default/gotosocial.svg
Normal file
|
|
@ -0,0 +1,160 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="1000px"
|
||||||
|
height="1000px"
|
||||||
|
viewBox="0 0 1000 1000"
|
||||||
|
version="1.1"
|
||||||
|
id="SVGRoot"
|
||||||
|
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||||
|
sodipodi:docname="GoToSocial_icon1.svg"
|
||||||
|
inkscape:export-xdpi="95.999992"
|
||||||
|
inkscape:export-ydpi="95.999992">
|
||||||
|
<defs
|
||||||
|
id="defs5117">
|
||||||
|
<inkscape:path-effect
|
||||||
|
effect="spiro"
|
||||||
|
id="path-effect5760"
|
||||||
|
is_visible="true" />
|
||||||
|
<inkscape:path-effect
|
||||||
|
effect="spiro"
|
||||||
|
id="path-effect5756"
|
||||||
|
is_visible="true" />
|
||||||
|
<inkscape:path-effect
|
||||||
|
effect="spiro"
|
||||||
|
id="path-effect5752"
|
||||||
|
is_visible="true" />
|
||||||
|
<inkscape:path-effect
|
||||||
|
effect="spiro"
|
||||||
|
id="path-effect5748"
|
||||||
|
is_visible="true" />
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="0.70710678"
|
||||||
|
inkscape:cx="460.72691"
|
||||||
|
inkscape:cy="522.20279"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="layer3"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1057"
|
||||||
|
inkscape:window-x="-8"
|
||||||
|
inkscape:window-y="-8"
|
||||||
|
inkscape:window-maximized="1" />
|
||||||
|
<metadata
|
||||||
|
id="metadata5120">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="background"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
style="display:inline">
|
||||||
|
<rect
|
||||||
|
style="fill:#d0d0d0;fill-opacity:1;stroke:none;stroke-width:1.51092136;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
||||||
|
id="rect5876"
|
||||||
|
width="1000.0042"
|
||||||
|
height="1000"
|
||||||
|
x="0"
|
||||||
|
y="0" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer3"
|
||||||
|
inkscape:label="sloth"
|
||||||
|
style="display:inline">
|
||||||
|
<g
|
||||||
|
id="g5890"
|
||||||
|
transform="translate(-10)">
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="ssscccs"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path5762"
|
||||||
|
d="M 861.29285,497.07031 C 861.65556,665.3247 774.21642,807.40548 511.60027,807.86794 270.63622,808.29226 154.54309,691.2756 155.19024,504.19228 155.7289,348.47535 251.17288,227.4551 422.3176,205.3802 c -35.32036,-75.85452 52.24232,-96.94648 73.77615,-32.00508 13.73451,-37.63439 108.24345,-49.1716 62.21106,24.77055 147.95052,3.75658 302.58353,111.28061 302.98804,298.92464 z"
|
||||||
|
style="display:inline;fill:#767676;fill-opacity:1;stroke:none;stroke-width:2.57058167;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="sssssss"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path5780"
|
||||||
|
d="m 809.15213,517.31679 c -4.83374,150.52526 -109.85544,235.22815 -297.81171,235.31839 -179.6675,0.0863 -290.56109,-70.98245 -298.50223,-235.31839 -4.6366,-95.95095 54.62861,-181.84442 144.83016,-194.18834 80.92123,-11.07393 99.7402,21.01802 153.67207,21.01802 59.21658,0 83.64871,-35.09608 162.84221,-21.85479 87.78391,14.67763 137.90533,103.6017 134.9695,195.02511 z"
|
||||||
|
style="display:inline;fill:#e8e8e8;fill-opacity:1;stroke:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="scssscs"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path5780-9"
|
||||||
|
d="m 809.15213,517.31679 c -1.32872,41.37724 -10.22787,77.78081 -26.33906,108.8204 -46.60931,-39.48031 -99.53509,-10.7281 -171.50115,-39.43334 -44.77145,-17.85808 -51.41659,-56.56453 -51.21999,-81.3542 0.54836,-69.14384 48.17003,-93.45758 95.53601,-97.60875 55.74677,-4.88566 124.5246,36.1482 151.01547,66.79433 2.11531,14.01083 2.97167,28.36512 2.50872,42.78156 z"
|
||||||
|
style="display:inline;fill:#a1a1a1;fill-opacity:1;stroke:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal" />
|
||||||
|
<ellipse
|
||||||
|
ry="50.575684"
|
||||||
|
rx="37.800804"
|
||||||
|
cy="502.64291"
|
||||||
|
cx="646.85773"
|
||||||
|
id="path5816"
|
||||||
|
style="fill:#767676;fill-opacity:1;stroke:none;stroke-width:1.51185882;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="scssscs"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path5780-9-1"
|
||||||
|
d="m 212.51463,517.3246 c 1.32872,41.37724 10.22787,77.78081 26.33906,108.8204 46.60931,-39.48031 99.57415,-10.73591 171.54021,-39.44115 44.77145,-17.85808 51.41659,-56.56453 51.21999,-81.3542 -0.54836,-69.14384 -48.20909,-93.44977 -95.57507,-97.60094 -55.74677,-4.88566 -124.5246,36.1482 -151.01547,66.79433 -2.11531,14.01083 -2.97167,28.36512 -2.50872,42.78156 z"
|
||||||
|
style="display:inline;fill:#a1a1a1;fill-opacity:1;stroke:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal" />
|
||||||
|
<ellipse
|
||||||
|
transform="scale(-1,1)"
|
||||||
|
ry="50.575684"
|
||||||
|
rx="37.800804"
|
||||||
|
cy="502.64294"
|
||||||
|
cx="-374.84808"
|
||||||
|
id="path5816-0"
|
||||||
|
style="display:inline;fill:#767676;fill-opacity:1;stroke:none;stroke-width:1.51185882;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="sssss"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path5862"
|
||||||
|
d="m 543.96613,556.96185 c 0,11.0622 -14.51648,20.02988 -32.42347,20.02988 -17.90698,0 -32.42347,-8.96769 -32.42347,-20.02988 0,-11.0622 14.14619,-15.58638 32.05318,-15.58638 17.90698,0 32.79376,4.52417 32.79376,15.58638 z"
|
||||||
|
style="display:inline;fill:#767676;fill-opacity:1;stroke:none;stroke-width:1.60515046;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="sssss"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path5865"
|
||||||
|
d="m 552.00195,620.36132 c 7.06643,13.89391 -19.38375,21.24024 -40.2832,21.24024 -20.89945,0 -47.71708,-7.02219 -41.50391,-21.24024 5.71775,-13.08435 20.11619,0.73243 41.01563,0.73243 20.89944,0 34.43888,-13.1835 40.77148,-0.73243 z"
|
||||||
|
style="display:inline;fill:#767676;fill-opacity:1;stroke:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal" />
|
||||||
|
<ellipse
|
||||||
|
transform="rotate(-6.669407)"
|
||||||
|
ry="24.882849"
|
||||||
|
rx="19.511755"
|
||||||
|
cy="560.95673"
|
||||||
|
cx="600.24731"
|
||||||
|
id="path5818"
|
||||||
|
style="display:inline;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.53898752;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal" />
|
||||||
|
<ellipse
|
||||||
|
transform="rotate(-6.6694071)"
|
||||||
|
ry="24.882849"
|
||||||
|
rx="19.511755"
|
||||||
|
cy="529.32086"
|
||||||
|
cx="329.69714"
|
||||||
|
id="path5818-8"
|
||||||
|
style="display:inline;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.53898752;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 7.9 KiB |
BIN
images/default/hometown.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
images/default/koyuspace.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/default/mastodon.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
images/default/peertube-account.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
images/default/peertube-channel.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
images/default/pleroma.png
Normal file
|
After Width: | Height: | Size: 1 KiB |
BIN
images/default/plume.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
|
|
@ -157,9 +157,9 @@ function wall_upload_post(App $a, $desktopmode = true)
|
||||||
" - size: " . $filesize . " - type: " . $filetype);
|
" - size: " . $filesize . " - type: " . $filetype);
|
||||||
|
|
||||||
$imagedata = @file_get_contents($src);
|
$imagedata = @file_get_contents($src);
|
||||||
$Image = new Image($imagedata, $filetype);
|
$image = new Image($imagedata, $filetype);
|
||||||
|
|
||||||
if (!$Image->isValid()) {
|
if (!$image->isValid()) {
|
||||||
$msg = DI::l10n()->t('Unable to process image.');
|
$msg = DI::l10n()->t('Unable to process image.');
|
||||||
@unlink($src);
|
@unlink($src);
|
||||||
if ($r_json) {
|
if ($r_json) {
|
||||||
|
|
@ -170,18 +170,18 @@ function wall_upload_post(App $a, $desktopmode = true)
|
||||||
System::exit();
|
System::exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
$Image->orient($src);
|
$image->orient($src);
|
||||||
@unlink($src);
|
@unlink($src);
|
||||||
|
|
||||||
$max_length = DI::config()->get('system', 'max_image_length');
|
$max_length = DI::config()->get('system', 'max_image_length');
|
||||||
if ($max_length > 0) {
|
if ($max_length > 0) {
|
||||||
$Image->scaleDown($max_length);
|
$image->scaleDown($max_length);
|
||||||
$filesize = strlen($Image->asString());
|
$filesize = strlen($image->asString());
|
||||||
Logger::info("File upload: Scaling picture to new size " . $max_length);
|
Logger::info("File upload: Scaling picture to new size " . $max_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
$width = $Image->getWidth();
|
$width = $image->getWidth();
|
||||||
$height = $Image->getHeight();
|
$height = $image->getHeight();
|
||||||
|
|
||||||
$maximagesize = DI::config()->get('system', 'maximagesize');
|
$maximagesize = DI::config()->get('system', 'maximagesize');
|
||||||
|
|
||||||
|
|
@ -190,10 +190,10 @@ function wall_upload_post(App $a, $desktopmode = true)
|
||||||
foreach ([5120, 2560, 1280, 640] as $pixels) {
|
foreach ([5120, 2560, 1280, 640] as $pixels) {
|
||||||
if (($filesize > $maximagesize) && (max($width, $height) > $pixels)) {
|
if (($filesize > $maximagesize) && (max($width, $height) > $pixels)) {
|
||||||
Logger::info('Resize', ['size' => $filesize, 'width' => $width, 'height' => $height, 'max' => $maximagesize, 'pixels' => $pixels]);
|
Logger::info('Resize', ['size' => $filesize, 'width' => $width, 'height' => $height, 'max' => $maximagesize, 'pixels' => $pixels]);
|
||||||
$Image->scaleDown($pixels);
|
$image->scaleDown($pixels);
|
||||||
$filesize = strlen($Image->asString());
|
$filesize = strlen($image->asString());
|
||||||
$width = $Image->getWidth();
|
$width = $image->getWidth();
|
||||||
$height = $Image->getHeight();
|
$height = $image->getHeight();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($filesize > $maximagesize) {
|
if ($filesize > $maximagesize) {
|
||||||
|
|
@ -220,7 +220,7 @@ function wall_upload_post(App $a, $desktopmode = true)
|
||||||
|
|
||||||
$defperm = '<' . $default_cid . '>';
|
$defperm = '<' . $default_cid . '>';
|
||||||
|
|
||||||
$r = Photo::store($Image, $page_owner_uid, $visitor, $resource_id, $filename, $album, 0, Photo::DEFAULT, $defperm);
|
$r = Photo::store($image, $page_owner_uid, $visitor, $resource_id, $filename, $album, 0, Photo::DEFAULT, $defperm);
|
||||||
|
|
||||||
if (!$r) {
|
if (!$r) {
|
||||||
$msg = DI::l10n()->t('Image upload failed.');
|
$msg = DI::l10n()->t('Image upload failed.');
|
||||||
|
|
@ -233,16 +233,16 @@ function wall_upload_post(App $a, $desktopmode = true)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($width > 640 || $height > 640) {
|
if ($width > 640 || $height > 640) {
|
||||||
$Image->scaleDown(640);
|
$image->scaleDown(640);
|
||||||
$r = Photo::store($Image, $page_owner_uid, $visitor, $resource_id, $filename, $album, 1, Photo::DEFAULT, $defperm);
|
$r = Photo::store($image, $page_owner_uid, $visitor, $resource_id, $filename, $album, 1, Photo::DEFAULT, $defperm);
|
||||||
if ($r) {
|
if ($r) {
|
||||||
$smallest = 1;
|
$smallest = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($width > 320 || $height > 320) {
|
if ($width > 320 || $height > 320) {
|
||||||
$Image->scaleDown(320);
|
$image->scaleDown(320);
|
||||||
$r = Photo::store($Image, $page_owner_uid, $visitor, $resource_id, $filename, $album, 2, Photo::DEFAULT, $defperm);
|
$r = Photo::store($image, $page_owner_uid, $visitor, $resource_id, $filename, $album, 2, Photo::DEFAULT, $defperm);
|
||||||
if ($r && ($smallest == 0)) {
|
if ($r && ($smallest == 0)) {
|
||||||
$smallest = 2;
|
$smallest = 2;
|
||||||
}
|
}
|
||||||
|
|
@ -264,8 +264,8 @@ function wall_upload_post(App $a, $desktopmode = true)
|
||||||
$picture["height"] = $photo["height"];
|
$picture["height"] = $photo["height"];
|
||||||
$picture["type"] = $photo["type"];
|
$picture["type"] = $photo["type"];
|
||||||
$picture["albumpage"] = DI::baseUrl() . '/photos/' . $page_owner_nick . '/image/' . $resource_id;
|
$picture["albumpage"] = DI::baseUrl() . '/photos/' . $page_owner_nick . '/image/' . $resource_id;
|
||||||
$picture["picture"] = DI::baseUrl() . "/photo/{$resource_id}-0." . $Image->getExt();
|
$picture["picture"] = DI::baseUrl() . "/photo/{$resource_id}-0." . $image->getExt();
|
||||||
$picture["preview"] = DI::baseUrl() . "/photo/{$resource_id}-{$smallest}." . $Image->getExt();
|
$picture["preview"] = DI::baseUrl() . "/photo/{$resource_id}-{$smallest}." . $image->getExt();
|
||||||
|
|
||||||
if ($r_json) {
|
if ($r_json) {
|
||||||
System::jsonExit(['picture' => $picture]);
|
System::jsonExit(['picture' => $picture]);
|
||||||
|
|
@ -280,7 +280,7 @@ function wall_upload_post(App $a, $desktopmode = true)
|
||||||
System::jsonExit(['ok' => true]);
|
System::jsonExit(['ok' => true]);
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "\n\n" . '[url=' . DI::baseUrl() . '/photos/' . $page_owner_nick . '/image/' . $resource_id . '][img]' . DI::baseUrl() . "/photo/{$resource_id}-{$smallest}.".$Image->getExt()."[/img][/url]\n\n";
|
echo "\n\n" . '[url=' . DI::baseUrl() . '/photos/' . $page_owner_nick . '/image/' . $resource_id . '][img]' . DI::baseUrl() . "/photo/{$resource_id}-{$smallest}." . $image->getExt() . "[/img][/url]\n\n";
|
||||||
System::exit();
|
System::exit();
|
||||||
// NOTREACHED
|
// NOTREACHED
|
||||||
}
|
}
|
||||||
|
|
|
||||||
58
src/App.php
|
|
@ -145,7 +145,7 @@ class App
|
||||||
$this->nickname = $nickname;
|
$this->nickname = $nickname;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isLoggedIn()
|
public function isLoggedIn(): bool
|
||||||
{
|
{
|
||||||
return local_user() && $this->user_id && ($this->user_id == local_user());
|
return local_user() && $this->user_id && ($this->user_id == local_user());
|
||||||
}
|
}
|
||||||
|
|
@ -155,7 +155,7 @@ class App
|
||||||
*
|
*
|
||||||
* @return bool true if user is an admin
|
* @return bool true if user is an admin
|
||||||
*/
|
*/
|
||||||
public function isSiteAdmin()
|
public function isSiteAdmin(): bool
|
||||||
{
|
{
|
||||||
$admin_email = $this->config->get('config', 'admin_email');
|
$admin_email = $this->config->get('config', 'admin_email');
|
||||||
|
|
||||||
|
|
@ -166,18 +166,18 @@ class App
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch the user id
|
* Fetch the user id
|
||||||
* @return int
|
* @return int User id
|
||||||
*/
|
*/
|
||||||
public function getLoggedInUserId()
|
public function getLoggedInUserId(): int
|
||||||
{
|
{
|
||||||
return $this->user_id;
|
return $this->user_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch the user nick name
|
* Fetch the user nick name
|
||||||
* @return string
|
* @return string User's nickname
|
||||||
*/
|
*/
|
||||||
public function getLoggedInUserNickname()
|
public function getLoggedInUserNickname(): string
|
||||||
{
|
{
|
||||||
return $this->nickname;
|
return $this->nickname;
|
||||||
}
|
}
|
||||||
|
|
@ -198,7 +198,7 @@ class App
|
||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getProfileOwner():int
|
public function getProfileOwner(): int
|
||||||
{
|
{
|
||||||
return $this->profile_owner;
|
return $this->profile_owner;
|
||||||
}
|
}
|
||||||
|
|
@ -219,7 +219,7 @@ class App
|
||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getContactId():int
|
public function getContactId(): int
|
||||||
{
|
{
|
||||||
return $this->contact_id;
|
return $this->contact_id;
|
||||||
}
|
}
|
||||||
|
|
@ -241,7 +241,7 @@ class App
|
||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getTimeZone():string
|
public function getTimeZone(): string
|
||||||
{
|
{
|
||||||
return $this->timezone;
|
return $this->timezone;
|
||||||
}
|
}
|
||||||
|
|
@ -260,9 +260,9 @@ class App
|
||||||
/**
|
/**
|
||||||
* Fetch workerqueue information
|
* Fetch workerqueue information
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array Worker queue
|
||||||
*/
|
*/
|
||||||
public function getQueue()
|
public function getQueue(): array
|
||||||
{
|
{
|
||||||
return $this->queue ?? [];
|
return $this->queue ?? [];
|
||||||
}
|
}
|
||||||
|
|
@ -270,8 +270,8 @@ class App
|
||||||
/**
|
/**
|
||||||
* Fetch a specific workerqueue field
|
* Fetch a specific workerqueue field
|
||||||
*
|
*
|
||||||
* @param string $index
|
* @param string $index Work queue record to fetch
|
||||||
* @return mixed
|
* @return mixed Work queue item or NULL if not found
|
||||||
*/
|
*/
|
||||||
public function getQueueValue(string $index)
|
public function getQueueValue(string $index)
|
||||||
{
|
{
|
||||||
|
|
@ -306,9 +306,9 @@ class App
|
||||||
/**
|
/**
|
||||||
* The basepath of this app
|
* The basepath of this app
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string Base path from configuration
|
||||||
*/
|
*/
|
||||||
public function getBasePath()
|
public function getBasePath(): string
|
||||||
{
|
{
|
||||||
// Don't use the basepath of the config table for basepath (it should always be the config-file one)
|
// Don't use the basepath of the config table for basepath (it should always be the config-file one)
|
||||||
return $this->config->getCache()->get('system', 'basepath');
|
return $this->config->getCache()->get('system', 'basepath');
|
||||||
|
|
@ -396,10 +396,10 @@ class App
|
||||||
/**
|
/**
|
||||||
* Returns the current theme name. May be overriden by the mobile theme name.
|
* Returns the current theme name. May be overriden by the mobile theme name.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string Current theme name or empty string in installation phase
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getCurrentTheme()
|
public function getCurrentTheme(): string
|
||||||
{
|
{
|
||||||
if ($this->mode->isInstall()) {
|
if ($this->mode->isInstall()) {
|
||||||
return '';
|
return '';
|
||||||
|
|
@ -425,10 +425,10 @@ class App
|
||||||
/**
|
/**
|
||||||
* Returns the current mobile theme name.
|
* Returns the current mobile theme name.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string Mobile theme name or empty string if installer
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getCurrentMobileTheme()
|
public function getCurrentMobileTheme(): string
|
||||||
{
|
{
|
||||||
if ($this->mode->isInstall()) {
|
if ($this->mode->isInstall()) {
|
||||||
return '';
|
return '';
|
||||||
|
|
@ -441,12 +441,22 @@ class App
|
||||||
return $this->currentMobileTheme;
|
return $this->currentMobileTheme;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setCurrentTheme($theme)
|
/**
|
||||||
|
* Setter for current theme name
|
||||||
|
*
|
||||||
|
* @param string $theme Name of current theme
|
||||||
|
*/
|
||||||
|
public function setCurrentTheme(string $theme)
|
||||||
{
|
{
|
||||||
$this->currentTheme = $theme;
|
$this->currentTheme = $theme;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setCurrentMobileTheme($theme)
|
/**
|
||||||
|
* Setter for current mobile theme name
|
||||||
|
*
|
||||||
|
* @param string $theme Name of current mobile theme
|
||||||
|
*/
|
||||||
|
public function setCurrentMobileTheme(string $theme)
|
||||||
{
|
{
|
||||||
$this->currentMobileTheme = $theme;
|
$this->currentMobileTheme = $theme;
|
||||||
}
|
}
|
||||||
|
|
@ -525,10 +535,10 @@ class App
|
||||||
/**
|
/**
|
||||||
* Provide a sane default if nothing is chosen or the specified theme does not exist.
|
* Provide a sane default if nothing is chosen or the specified theme does not exist.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string Current theme's stylsheet path
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getCurrentThemeStylesheetPath()
|
public function getCurrentThemeStylesheetPath(): string
|
||||||
{
|
{
|
||||||
return Core\Theme::getStylesheetPath($this->getCurrentTheme());
|
return Core\Theme::getStylesheetPath($this->getCurrentTheme());
|
||||||
}
|
}
|
||||||
|
|
@ -730,7 +740,7 @@ class App
|
||||||
*
|
*
|
||||||
* @throws HTTPException\InternalServerErrorException
|
* @throws HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public function redirect($toUrl)
|
public function redirect(string $toUrl)
|
||||||
{
|
{
|
||||||
if (!empty(parse_url($toUrl, PHP_URL_SCHEME))) {
|
if (!empty(parse_url($toUrl, PHP_URL_SCHEME))) {
|
||||||
Core\System::externalRedirect($toUrl);
|
Core\System::externalRedirect($toUrl);
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ class Arguments
|
||||||
/**
|
/**
|
||||||
* @return string The whole command of this call
|
* @return string The whole command of this call
|
||||||
*/
|
*/
|
||||||
public function getCommand()
|
public function getCommand(): string
|
||||||
{
|
{
|
||||||
return $this->command;
|
return $this->command;
|
||||||
}
|
}
|
||||||
|
|
@ -94,7 +94,7 @@ class Arguments
|
||||||
/**
|
/**
|
||||||
* @return array All arguments of this call
|
* @return array All arguments of this call
|
||||||
*/
|
*/
|
||||||
public function getArgv()
|
public function getArgv(): array
|
||||||
{
|
{
|
||||||
return $this->argv;
|
return $this->argv;
|
||||||
}
|
}
|
||||||
|
|
@ -102,7 +102,7 @@ class Arguments
|
||||||
/**
|
/**
|
||||||
* @return string The used HTTP method
|
* @return string The used HTTP method
|
||||||
*/
|
*/
|
||||||
public function getMethod()
|
public function getMethod(): string
|
||||||
{
|
{
|
||||||
return $this->method;
|
return $this->method;
|
||||||
}
|
}
|
||||||
|
|
@ -110,7 +110,7 @@ class Arguments
|
||||||
/**
|
/**
|
||||||
* @return int The count of arguments of this call
|
* @return int The count of arguments of this call
|
||||||
*/
|
*/
|
||||||
public function getArgc()
|
public function getArgc(): int
|
||||||
{
|
{
|
||||||
return $this->argc;
|
return $this->argc;
|
||||||
}
|
}
|
||||||
|
|
@ -145,7 +145,7 @@ class Arguments
|
||||||
*
|
*
|
||||||
* @return bool if the argument position exists
|
* @return bool if the argument position exists
|
||||||
*/
|
*/
|
||||||
public function has(int $position)
|
public function has(int $position): bool
|
||||||
{
|
{
|
||||||
return array_key_exists($position, $this->argv);
|
return array_key_exists($position, $this->argv);
|
||||||
}
|
}
|
||||||
|
|
@ -158,7 +158,7 @@ class Arguments
|
||||||
*
|
*
|
||||||
* @return Arguments The determined arguments
|
* @return Arguments The determined arguments
|
||||||
*/
|
*/
|
||||||
public function determine(array $server, array $get)
|
public function determine(array $server, array $get): Arguments
|
||||||
{
|
{
|
||||||
// removing leading / - maybe a nginx problem
|
// removing leading / - maybe a nginx problem
|
||||||
$server['QUERY_STRING'] = ltrim($server['QUERY_STRING'] ?? '', '/');
|
$server['QUERY_STRING'] = ltrim($server['QUERY_STRING'] ?? '', '/');
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,7 @@ class BaseURL
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getHostname()
|
public function getHostname(): string
|
||||||
{
|
{
|
||||||
return $this->hostname;
|
return $this->hostname;
|
||||||
}
|
}
|
||||||
|
|
@ -117,7 +117,7 @@ class BaseURL
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getScheme()
|
public function getScheme(): string
|
||||||
{
|
{
|
||||||
return $this->scheme;
|
return $this->scheme;
|
||||||
}
|
}
|
||||||
|
|
@ -127,7 +127,7 @@ class BaseURL
|
||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getSSLPolicy()
|
public function getSSLPolicy(): int
|
||||||
{
|
{
|
||||||
return $this->sslPolicy;
|
return $this->sslPolicy;
|
||||||
}
|
}
|
||||||
|
|
@ -137,7 +137,7 @@ class BaseURL
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getUrlPath()
|
public function getUrlPath(): string
|
||||||
{
|
{
|
||||||
return $this->urlPath;
|
return $this->urlPath;
|
||||||
}
|
}
|
||||||
|
|
@ -151,7 +151,7 @@ class BaseURL
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function get($ssl = false)
|
public function get(bool $ssl = false): string
|
||||||
{
|
{
|
||||||
if ($this->sslPolicy === self::SSL_POLICY_SELFSIGN && $ssl) {
|
if ($this->sslPolicy === self::SSL_POLICY_SELFSIGN && $ssl) {
|
||||||
return Network::switchScheme($this->url);
|
return Network::switchScheme($this->url);
|
||||||
|
|
@ -168,8 +168,9 @@ class BaseURL
|
||||||
* @param string? $urlPath
|
* @param string? $urlPath
|
||||||
*
|
*
|
||||||
* @return bool true, if successful
|
* @return bool true, if successful
|
||||||
|
* @TODO Find proper types
|
||||||
*/
|
*/
|
||||||
public function save($hostname = null, $sslPolicy = null, $urlPath = null)
|
public function save($hostname = null, $sslPolicy = null, $urlPath = null): bool
|
||||||
{
|
{
|
||||||
$currHostname = $this->hostname;
|
$currHostname = $this->hostname;
|
||||||
$currSSLPolicy = $this->sslPolicy;
|
$currSSLPolicy = $this->sslPolicy;
|
||||||
|
|
@ -224,11 +225,11 @@ class BaseURL
|
||||||
/**
|
/**
|
||||||
* Save the current url as base URL
|
* Save the current url as base URL
|
||||||
*
|
*
|
||||||
* @param $url
|
* @param string $url
|
||||||
*
|
*
|
||||||
* @return bool true, if the save was successful
|
* @return bool true, if the save was successful
|
||||||
*/
|
*/
|
||||||
public function saveByURL($url)
|
public function saveByURL(string $url): bool
|
||||||
{
|
{
|
||||||
$parsed = @parse_url($url);
|
$parsed = @parse_url($url);
|
||||||
|
|
||||||
|
|
@ -421,7 +422,7 @@ class BaseURL
|
||||||
*
|
*
|
||||||
* @return string The cleaned url
|
* @return string The cleaned url
|
||||||
*/
|
*/
|
||||||
public function remove(string $origURL)
|
public function remove(string $origURL): string
|
||||||
{
|
{
|
||||||
// Remove the hostname from the url if it is an internal link
|
// Remove the hostname from the url if it is an internal link
|
||||||
$nurl = Strings::normaliseLink($origURL);
|
$nurl = Strings::normaliseLink($origURL);
|
||||||
|
|
@ -445,7 +446,7 @@ class BaseURL
|
||||||
*
|
*
|
||||||
* @throws HTTPException\InternalServerErrorException In Case the given URL is not relative to the Friendica node
|
* @throws HTTPException\InternalServerErrorException In Case the given URL is not relative to the Friendica node
|
||||||
*/
|
*/
|
||||||
public function redirect($toUrl = '', $ssl = false)
|
public function redirect(string $toUrl = '', bool $ssl = false)
|
||||||
{
|
{
|
||||||
if (!empty(parse_url($toUrl, PHP_URL_SCHEME))) {
|
if (!empty(parse_url($toUrl, PHP_URL_SCHEME))) {
|
||||||
throw new HTTPException\InternalServerErrorException("'$toUrl is not a relative path, please use System::externalRedirectTo");
|
throw new HTTPException\InternalServerErrorException("'$toUrl is not a relative path, please use System::externalRedirectTo");
|
||||||
|
|
@ -458,8 +459,8 @@ class BaseURL
|
||||||
/**
|
/**
|
||||||
* Returns the base url as string
|
* Returns the base url as string
|
||||||
*/
|
*/
|
||||||
public function __toString()
|
public function __toString(): string
|
||||||
{
|
{
|
||||||
return $this->get();
|
return (string) $this->get();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ class Mode
|
||||||
*
|
*
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function determine(BasePath $basepath, Database $database, Cache $configCache)
|
public function determine(BasePath $basepath, Database $database, Cache $configCache): Mode
|
||||||
{
|
{
|
||||||
$mode = 0;
|
$mode = 0;
|
||||||
|
|
||||||
|
|
@ -178,7 +178,7 @@ class Mode
|
||||||
*
|
*
|
||||||
* @return Mode returns the determined mode
|
* @return Mode returns the determined mode
|
||||||
*/
|
*/
|
||||||
public function determineRunMode(bool $isBackend, array $server, Arguments $args, MobileDetect $mobileDetect)
|
public function determineRunMode(bool $isBackend, array $server, Arguments $args, MobileDetect $mobileDetect): Mode
|
||||||
{
|
{
|
||||||
foreach (self::BACKEND_CONTENT_TYPES as $type) {
|
foreach (self::BACKEND_CONTENT_TYPES as $type) {
|
||||||
if (strpos(strtolower($server['HTTP_ACCEPT'] ?? ''), $type) !== false) {
|
if (strpos(strtolower($server['HTTP_ACCEPT'] ?? ''), $type) !== false) {
|
||||||
|
|
@ -201,7 +201,7 @@ class Mode
|
||||||
*
|
*
|
||||||
* @return bool returns true, if the mode is set
|
* @return bool returns true, if the mode is set
|
||||||
*/
|
*/
|
||||||
public function has($mode)
|
public function has(int $mode): bool
|
||||||
{
|
{
|
||||||
return ($this->mode & $mode) > 0;
|
return ($this->mode & $mode) > 0;
|
||||||
}
|
}
|
||||||
|
|
@ -227,7 +227,7 @@ class Mode
|
||||||
*
|
*
|
||||||
* @return int Execution Mode
|
* @return int Execution Mode
|
||||||
*/
|
*/
|
||||||
public function getExecutor()
|
public function getExecutor(): int
|
||||||
{
|
{
|
||||||
return $this->executor;
|
return $this->executor;
|
||||||
}
|
}
|
||||||
|
|
@ -235,9 +235,9 @@ class Mode
|
||||||
/**
|
/**
|
||||||
* Install mode is when the local config file is missing or the DB schema hasn't been installed yet.
|
* Install mode is when the local config file is missing or the DB schema hasn't been installed yet.
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool Whether installation mode is active (local/database configuration files present or not)
|
||||||
*/
|
*/
|
||||||
public function isInstall()
|
public function isInstall(): bool
|
||||||
{
|
{
|
||||||
return !$this->has(Mode::LOCALCONFIGPRESENT) ||
|
return !$this->has(Mode::LOCALCONFIGPRESENT) ||
|
||||||
!$this->has(MODE::DBCONFIGAVAILABLE);
|
!$this->has(MODE::DBCONFIGAVAILABLE);
|
||||||
|
|
@ -248,7 +248,7 @@ class Mode
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function isNormal()
|
public function isNormal(): bool
|
||||||
{
|
{
|
||||||
return $this->has(Mode::LOCALCONFIGPRESENT) &&
|
return $this->has(Mode::LOCALCONFIGPRESENT) &&
|
||||||
$this->has(Mode::DBAVAILABLE) &&
|
$this->has(Mode::DBAVAILABLE) &&
|
||||||
|
|
@ -261,7 +261,7 @@ class Mode
|
||||||
*
|
*
|
||||||
* @return bool Is it a backend call
|
* @return bool Is it a backend call
|
||||||
*/
|
*/
|
||||||
public function isBackend()
|
public function isBackend(): bool
|
||||||
{
|
{
|
||||||
return $this->isBackend;
|
return $this->isBackend;
|
||||||
}
|
}
|
||||||
|
|
@ -271,7 +271,7 @@ class Mode
|
||||||
*
|
*
|
||||||
* @return bool true if it was an AJAX request
|
* @return bool true if it was an AJAX request
|
||||||
*/
|
*/
|
||||||
public function isAjax()
|
public function isAjax(): bool
|
||||||
{
|
{
|
||||||
return $this->isAjax;
|
return $this->isAjax;
|
||||||
}
|
}
|
||||||
|
|
@ -281,7 +281,7 @@ class Mode
|
||||||
*
|
*
|
||||||
* @return bool true if it was an mobile request
|
* @return bool true if it was an mobile request
|
||||||
*/
|
*/
|
||||||
public function isMobile()
|
public function isMobile(): bool
|
||||||
{
|
{
|
||||||
return $this->isMobile;
|
return $this->isMobile;
|
||||||
}
|
}
|
||||||
|
|
@ -291,7 +291,7 @@ class Mode
|
||||||
*
|
*
|
||||||
* @return bool true if it was an tablet request
|
* @return bool true if it was an tablet request
|
||||||
*/
|
*/
|
||||||
public function isTablet()
|
public function isTablet(): bool
|
||||||
{
|
{
|
||||||
return $this->isTablet;
|
return $this->isTablet;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -195,7 +195,7 @@ class Page implements ArrayAccess
|
||||||
* @param string $media
|
* @param string $media
|
||||||
* @see Page::initHead()
|
* @see Page::initHead()
|
||||||
*/
|
*/
|
||||||
public function registerStylesheet($path, string $media = 'screen')
|
public function registerStylesheet(string $path, string $media = 'screen')
|
||||||
{
|
{
|
||||||
$path = Network::appendQueryParam($path, ['v' => FRIENDICA_VERSION]);
|
$path = Network::appendQueryParam($path, ['v' => FRIENDICA_VERSION]);
|
||||||
|
|
||||||
|
|
@ -288,7 +288,7 @@ class Page implements ArrayAccess
|
||||||
*
|
*
|
||||||
* Taken from http://webcheatsheet.com/php/get_current_page_url.php
|
* Taken from http://webcheatsheet.com/php/get_current_page_url.php
|
||||||
*/
|
*/
|
||||||
private function curPageURL()
|
private function curPageURL(): string
|
||||||
{
|
{
|
||||||
$pageURL = 'http';
|
$pageURL = 'http';
|
||||||
if (!empty($_SERVER["HTTPS"]) && ($_SERVER["HTTPS"] == "on")) {
|
if (!empty($_SERVER["HTTPS"]) && ($_SERVER["HTTPS"] == "on")) {
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,7 @@ class Router
|
||||||
*
|
*
|
||||||
* @throws HTTPException\InternalServerErrorException In case of invalid configs
|
* @throws HTTPException\InternalServerErrorException In case of invalid configs
|
||||||
*/
|
*/
|
||||||
public function loadRoutes(array $routes)
|
public function loadRoutes(array $routes): Router
|
||||||
{
|
{
|
||||||
$routeCollector = ($this->routeCollector ?? new RouteCollector(new Std(), new GroupCountBased()));
|
$routeCollector = ($this->routeCollector ?? new RouteCollector(new Std(), new GroupCountBased()));
|
||||||
|
|
||||||
|
|
@ -166,6 +166,13 @@ class Router
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds multiple routes to a route collector
|
||||||
|
*
|
||||||
|
* @param RouteCollector $routeCollector Route collector instance
|
||||||
|
* @param array $routes Multiple routes to be added
|
||||||
|
* @throws HTTPException\InternalServerErrorException If route was wrong (somehow)
|
||||||
|
*/
|
||||||
private function addRoutes(RouteCollector $routeCollector, array $routes)
|
private function addRoutes(RouteCollector $routeCollector, array $routes)
|
||||||
{
|
{
|
||||||
foreach ($routes as $route => $config) {
|
foreach ($routes as $route => $config) {
|
||||||
|
|
@ -221,7 +228,7 @@ class Router
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
private function isRoute(array $config)
|
private function isRoute(array $config): bool
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
// The config array should at least have one entry
|
// The config array should at least have one entry
|
||||||
|
|
@ -253,7 +260,7 @@ class Router
|
||||||
* @throws HTTPException\MethodNotAllowedException If a rule matched but the method didn't
|
* @throws HTTPException\MethodNotAllowedException If a rule matched but the method didn't
|
||||||
* @throws HTTPException\NotFoundException If no rule matched
|
* @throws HTTPException\NotFoundException If no rule matched
|
||||||
*/
|
*/
|
||||||
private function getModuleClass()
|
private function getModuleClass(): string
|
||||||
{
|
{
|
||||||
$cmd = $this->args->getCommand();
|
$cmd = $this->args->getCommand();
|
||||||
$cmd = '/' . ltrim($cmd, '/');
|
$cmd = '/' . ltrim($cmd, '/');
|
||||||
|
|
|
||||||
|
|
@ -70,9 +70,11 @@ class BaseCollection extends \ArrayIterator
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int
|
* Getter for total count
|
||||||
|
*
|
||||||
|
* @return int Total count
|
||||||
*/
|
*/
|
||||||
public function getTotalCount()
|
public function getTotalCount(): int
|
||||||
{
|
{
|
||||||
return $this->totalCount;
|
return $this->totalCount;
|
||||||
}
|
}
|
||||||
|
|
@ -85,7 +87,7 @@ class BaseCollection extends \ArrayIterator
|
||||||
* @return array
|
* @return array
|
||||||
* @see array_column()
|
* @see array_column()
|
||||||
*/
|
*/
|
||||||
public function column($column, $index_key = null)
|
public function column(string $column, $index_key = null): array
|
||||||
{
|
{
|
||||||
return array_column($this->getArrayCopy(true), $column, $index_key);
|
return array_column($this->getArrayCopy(true), $column, $index_key);
|
||||||
}
|
}
|
||||||
|
|
@ -97,7 +99,7 @@ class BaseCollection extends \ArrayIterator
|
||||||
* @return BaseCollection
|
* @return BaseCollection
|
||||||
* @see array_map()
|
* @see array_map()
|
||||||
*/
|
*/
|
||||||
public function map(callable $callback)
|
public function map(callable $callback): BaseCollection
|
||||||
{
|
{
|
||||||
return new static(array_map($callback, $this->getArrayCopy()), $this->getTotalCount());
|
return new static(array_map($callback, $this->getArrayCopy()), $this->getTotalCount());
|
||||||
}
|
}
|
||||||
|
|
@ -110,7 +112,7 @@ class BaseCollection extends \ArrayIterator
|
||||||
* @return BaseCollection
|
* @return BaseCollection
|
||||||
* @see array_filter()
|
* @see array_filter()
|
||||||
*/
|
*/
|
||||||
public function filter(callable $callback = null, int $flag = 0)
|
public function filter(callable $callback = null, int $flag = 0): BaseCollection
|
||||||
{
|
{
|
||||||
return new static(array_filter($this->getArrayCopy(), $callback, $flag));
|
return new static(array_filter($this->getArrayCopy(), $callback, $flag));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,14 +55,14 @@ abstract class BaseEntity extends BaseDataTransferObject
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $name
|
* @param mixed $name
|
||||||
* @return bool
|
* @return bool
|
||||||
* @throws HTTPException\InternalServerErrorException
|
* @throws HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public function __isset($name)
|
public function __isset($name): bool
|
||||||
{
|
{
|
||||||
if (!property_exists($this, $name)) {
|
if (!property_exists($this, $name)) {
|
||||||
throw new HTTPException\InternalServerErrorException('Unknown property ' . $name . ' in Entity ' . static::class);
|
throw new HTTPException\InternalServerErrorException('Unknown property ' . $name . ' of type ' . gettype($name) . ' in Entity ' . static::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
return !empty($this->$name);
|
return !empty($this->$name);
|
||||||
|
|
|
||||||
|
|
@ -110,11 +110,11 @@ abstract class BaseModel extends BaseDataTransferObject
|
||||||
* - $model->field (outside of class)
|
* - $model->field (outside of class)
|
||||||
* - $this->field (inside of class)
|
* - $this->field (inside of class)
|
||||||
*
|
*
|
||||||
* @param $name
|
* @param string $name Name of data to fetch
|
||||||
* @return mixed
|
* @return mixed
|
||||||
* @throws HTTPException\InternalServerErrorException
|
* @throws HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public function __get($name)
|
public function __get(string $name)
|
||||||
{
|
{
|
||||||
$this->checkValid();
|
$this->checkValid();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -331,7 +331,7 @@ abstract class BaseModule implements ICanHandleRequests
|
||||||
* Actually, important actions should not be triggered by Links / GET-Requests at all, but sometimes they still are,
|
* Actually, important actions should not be triggered by Links / GET-Requests at all, but sometimes they still are,
|
||||||
* so this mechanism brings in some damage control (the attacker would be able to forge a request to a form of this type, but not to forms of other types).
|
* so this mechanism brings in some damage control (the attacker would be able to forge a request to a form of this type, but not to forms of other types).
|
||||||
*/
|
*/
|
||||||
public static function getFormSecurityToken($typename = '')
|
public static function getFormSecurityToken(string $typename = '')
|
||||||
{
|
{
|
||||||
$user = User::getById(DI::app()->getLoggedInUserId(), ['guid', 'prvkey']);
|
$user = User::getById(DI::app()->getLoggedInUserId(), ['guid', 'prvkey']);
|
||||||
$timestamp = time();
|
$timestamp = time();
|
||||||
|
|
@ -340,7 +340,14 @@ abstract class BaseModule implements ICanHandleRequests
|
||||||
return $timestamp . '.' . $sec_hash;
|
return $timestamp . '.' . $sec_hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function checkFormSecurityToken($typename = '', $formname = 'form_security_token')
|
/**
|
||||||
|
* Checks if form's security (CSRF) token is valid.
|
||||||
|
*
|
||||||
|
* @param string $typename ???
|
||||||
|
* @param string $formname Name of form/field (???)
|
||||||
|
* @return bool Whether it is valid
|
||||||
|
*/
|
||||||
|
public static function checkFormSecurityToken(string $typename = '', string $formname = 'form_security_token'): bool
|
||||||
{
|
{
|
||||||
$hash = null;
|
$hash = null;
|
||||||
|
|
||||||
|
|
@ -372,12 +379,12 @@ abstract class BaseModule implements ICanHandleRequests
|
||||||
return ($sec_hash == $x[1]);
|
return ($sec_hash == $x[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getFormSecurityStandardErrorMessage()
|
public static function getFormSecurityStandardErrorMessage(): string
|
||||||
{
|
{
|
||||||
return DI::l10n()->t("The form security token was not correct. This probably happened because the form has been opened for too long \x28>3 hours\x29 before submitting it.") . EOL;
|
return DI::l10n()->t("The form security token was not correct. This probably happened because the form has been opened for too long \x28>3 hours\x29 before submitting it.") . EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function checkFormSecurityTokenRedirectOnError($err_redirect, $typename = '', $formname = 'form_security_token')
|
public static function checkFormSecurityTokenRedirectOnError(string $err_redirect, string $typename = '', string $formname = 'form_security_token')
|
||||||
{
|
{
|
||||||
if (!self::checkFormSecurityToken($typename, $formname)) {
|
if (!self::checkFormSecurityToken($typename, $formname)) {
|
||||||
Logger::notice('checkFormSecurityToken failed: user ' . DI::app()->getLoggedInUserNickname() . ' - form element ' . $typename);
|
Logger::notice('checkFormSecurityToken failed: user ' . DI::app()->getLoggedInUserNickname() . ' - form element ' . $typename);
|
||||||
|
|
@ -387,7 +394,7 @@ abstract class BaseModule implements ICanHandleRequests
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function checkFormSecurityTokenForbiddenOnError($typename = '', $formname = 'form_security_token')
|
public static function checkFormSecurityTokenForbiddenOnError(string $typename = '', string $formname = 'form_security_token')
|
||||||
{
|
{
|
||||||
if (!self::checkFormSecurityToken($typename, $formname)) {
|
if (!self::checkFormSecurityToken($typename, $formname)) {
|
||||||
Logger::notice('checkFormSecurityToken failed: user ' . DI::app()->getLoggedInUserNickname() . ' - form element ' . $typename);
|
Logger::notice('checkFormSecurityToken failed: user ' . DI::app()->getLoggedInUserNickname() . ' - form element ' . $typename);
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,6 @@ use Friendica\Util\HTTPSignature;
|
||||||
use Friendica\Util\Images;
|
use Friendica\Util\Images;
|
||||||
use Friendica\Util\Network;
|
use Friendica\Util\Network;
|
||||||
use Friendica\Util\Proxy;
|
use Friendica\Util\Proxy;
|
||||||
use Friendica\Util\Strings;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* functions for handling contact avatar caching
|
* functions for handling contact avatar caching
|
||||||
|
|
@ -124,7 +123,7 @@ class Avatar
|
||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function getFilename(string $url)
|
private static function getFilename(string $url): string
|
||||||
{
|
{
|
||||||
$guid = Item::guidFromUri($url, parse_url($url, PHP_URL_HOST));
|
$guid = Item::guidFromUri($url, parse_url($url, PHP_URL_HOST));
|
||||||
|
|
||||||
|
|
@ -139,20 +138,18 @@ class Avatar
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$path = self::BASE_PATH . $filename . $size . '.' . $image->getExt();
|
$path = $filename . $size . '.' . $image->getExt();
|
||||||
|
|
||||||
$filepath = DI::basePath() . $path;
|
$basepath = self::basePath();
|
||||||
|
if (empty($basepath)) {
|
||||||
$dirpath = DI::basePath() . self::BASE_PATH;
|
|
||||||
|
|
||||||
DI::profiler()->startRecording('file');
|
|
||||||
|
|
||||||
if (!file_exists($dirpath)) {
|
|
||||||
if (!mkdir($dirpath, 0775)) {
|
|
||||||
Logger::warning('Base directory could not be created', ['directory' => $dirpath]);
|
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
$filepath = $basepath . $path;
|
||||||
|
|
||||||
|
$dirpath = $basepath;
|
||||||
|
|
||||||
|
DI::profiler()->startRecording('file');
|
||||||
|
|
||||||
// Fetch the permission and group ownership of the "avatar" path and apply to all files
|
// Fetch the permission and group ownership of the "avatar" path and apply to all files
|
||||||
$dir_perm = fileperms($dirpath) & 0777;
|
$dir_perm = fileperms($dirpath) & 0777;
|
||||||
|
|
@ -198,7 +195,7 @@ class Avatar
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
return DI::baseUrl() . $path . '?ts=' . $timestamp;
|
return self::baseUrl() . $path . '?ts=' . $timestamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -221,16 +218,17 @@ class Avatar
|
||||||
private static function getCacheFile(string $avatar): string
|
private static function getCacheFile(string $avatar): string
|
||||||
{
|
{
|
||||||
$parts = parse_url($avatar);
|
$parts = parse_url($avatar);
|
||||||
if (empty($parts['host']) || ($parts['host'] != DI::baseUrl()->getHostname())) {
|
if (empty($parts['host']) || ($parts['host'] != parse_url(self::baseUrl(), PHP_URL_HOST))) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$pos = strpos($parts['path'], DI::baseUrl()->getUrlPath() . self::BASE_PATH);
|
$avatarpath = parse_url(self::baseUrl(), PHP_URL_PATH);
|
||||||
|
$pos = strpos($parts['path'], $avatarpath);
|
||||||
if ($pos !== 0) {
|
if ($pos !== 0) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$filename = DI::basePath() . $parts['path'];
|
$filename = self::basePath() . substr($parts['path'], strlen($avatarpath));
|
||||||
|
|
||||||
DI::profiler()->startRecording('file');
|
DI::profiler()->startRecording('file');
|
||||||
$exists = file_exists($filename);
|
$exists = file_exists($filename);
|
||||||
|
|
@ -269,4 +267,47 @@ class Avatar
|
||||||
Logger::debug('Unlink avatar', ['avatar' => $avatar]);
|
Logger::debug('Unlink avatar', ['avatar' => $avatar]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fetch the avatar base path
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
private static function basePath(): string
|
||||||
|
{
|
||||||
|
$basepath = DI::config()->get('system', 'avatar_cache_path');
|
||||||
|
if (empty($basepath)) {
|
||||||
|
$basepath = DI::basePath() . self::BASE_PATH;
|
||||||
|
}
|
||||||
|
$basepath = rtrim($basepath, '/') . '/';
|
||||||
|
|
||||||
|
if (!file_exists($basepath)) {
|
||||||
|
// We only automatically create the folder when it is in the web root
|
||||||
|
if (strpos($basepath, DI::basePath()) !== 0) {
|
||||||
|
Logger::warning('Base directory does not exist', ['directory' => $basepath]);
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
if (!mkdir($basepath, 0775)) {
|
||||||
|
Logger::warning('Base directory could not be created', ['directory' => $basepath]);
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $basepath;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fetch the avatar base url
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
private static function baseUrl(): string
|
||||||
|
{
|
||||||
|
$baseurl = DI::config()->get('system', 'avatar_cache_url');
|
||||||
|
if (!empty($baseurl)) {
|
||||||
|
return rtrim($baseurl, '/') . '/';
|
||||||
|
}
|
||||||
|
|
||||||
|
return DI::baseUrl() . self::BASE_PATH;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ class BoundariesPager extends Pager
|
||||||
* @param string $last_item_id The id† of the last item in the displayed item list
|
* @param string $last_item_id The id† of the last item in the displayed item list
|
||||||
* @param integer $itemsPerPage An optional number of items per page to override the default value
|
* @param integer $itemsPerPage An optional number of items per page to override the default value
|
||||||
*/
|
*/
|
||||||
public function __construct(L10n $l10n, $queryString, $first_item_id = null, $last_item_id = null, $itemsPerPage = 50)
|
public function __construct(L10n $l10n, string $queryString, string $first_item_id = null, string $last_item_id = null, int $itemsPerPage = 50)
|
||||||
{
|
{
|
||||||
parent::__construct($l10n, $queryString, $itemsPerPage);
|
parent::__construct($l10n, $queryString, $itemsPerPage);
|
||||||
|
|
||||||
|
|
@ -102,7 +102,7 @@ class BoundariesPager extends Pager
|
||||||
* @return string HTML string of the pager
|
* @return string HTML string of the pager
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function renderMinimal(int $itemCount)
|
public function renderMinimal(int $itemCount): string
|
||||||
{
|
{
|
||||||
$displayedItemCount = max(0, intval($itemCount));
|
$displayedItemCount = max(0, intval($itemCount));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ class ContactSelector
|
||||||
* @param boolean $disabled optional, default false
|
* @param boolean $disabled optional, default false
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function pollInterval($current, $disabled = false)
|
public static function pollInterval(string $current, bool $disabled = false): string
|
||||||
{
|
{
|
||||||
$dis = (($disabled) ? ' disabled="disabled" ' : '');
|
$dis = (($disabled) ? ' disabled="disabled" ' : '');
|
||||||
$o = '';
|
$o = '';
|
||||||
|
|
@ -84,7 +84,7 @@ class ContactSelector
|
||||||
* @return string Server URL
|
* @return string Server URL
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function getServerURLForProfile($profile)
|
private static function getServerURLForProfile(string $profile): string
|
||||||
{
|
{
|
||||||
if (!empty(self::$server_url[$profile])) {
|
if (!empty(self::$server_url[$profile])) {
|
||||||
return self::$server_url[$profile];
|
return self::$server_url[$profile];
|
||||||
|
|
@ -111,13 +111,16 @@ class ContactSelector
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Determines network name
|
||||||
|
*
|
||||||
* @param string $network network of the contact
|
* @param string $network network of the contact
|
||||||
* @param string $profile optional, default empty
|
* @param string $profile optional, default empty
|
||||||
* @param string $protocol (Optional) Protocol that is used for the transmission
|
* @param string $protocol (Optional) Protocol that is used for the transmission
|
||||||
|
* @param int $gsid Server id
|
||||||
* @return string
|
* @return string
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function networkToName($network, $profile = '', $protocol = '', $gsid = 0)
|
public static function networkToName(string $network, string $profile = '', string $protocol = '', int $gsid = null): string
|
||||||
{
|
{
|
||||||
$nets = [
|
$nets = [
|
||||||
Protocol::DFRN => DI::l10n()->t('DFRN'),
|
Protocol::DFRN => DI::l10n()->t('DFRN'),
|
||||||
|
|
@ -179,12 +182,15 @@ class ContactSelector
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Determines network's icon name
|
||||||
|
*
|
||||||
* @param string $network network
|
* @param string $network network
|
||||||
* @param string $profile optional, default empty
|
* @param string $profile optional, default empty
|
||||||
* @return string
|
* @param int $gsid Server id
|
||||||
|
* @return string Name for network icon
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function networkToIcon($network, $profile = "", $gsid = 0)
|
public static function networkToIcon(string $network, string $profile = "", int $gsid = null): string
|
||||||
{
|
{
|
||||||
$nets = [
|
$nets = [
|
||||||
Protocol::DFRN => 'friendica',
|
Protocol::DFRN => 'friendica',
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,7 @@ class Conversation
|
||||||
}
|
}
|
||||||
|
|
||||||
// Skip when the causer of the parent is the same as the author of the announce
|
// Skip when the causer of the parent is the same as the author of the announce
|
||||||
if (($verb == Activity::ANNOUNCE) && !empty($thread_parent['causer-id'] && ($thread_parent['causer-id'] == $activity['author-id']))) {
|
if (($verb == Activity::ANNOUNCE) && !empty($thread_parent['causer-id']) && ($thread_parent['causer-id'] == $activity['author-id'])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -189,7 +189,7 @@ class Conversation
|
||||||
* @return string formatted text
|
* @return string formatted text
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public function formatActivity(array $links, $verb, $id)
|
public function formatActivity(array $links, string $verb, int $id): string
|
||||||
{
|
{
|
||||||
$this->profiler->startRecording('rendering');
|
$this->profiler->startRecording('rendering');
|
||||||
$o = '';
|
$o = '';
|
||||||
|
|
@ -275,7 +275,7 @@ class Conversation
|
||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function statusEditor(array $x = [], $notes_cid = 0, $popup = false)
|
public function statusEditor(array $x = [], int $notes_cid = 0, bool $popup = false): string
|
||||||
{
|
{
|
||||||
$user = User::getById($this->app->getLoggedInUserId(), ['uid', 'nickname', 'allow_location', 'default-location']);
|
$user = User::getById($this->app->getLoggedInUserId(), ['uid', 'nickname', 'allow_location', 'default-location']);
|
||||||
if (empty($user['uid'])) {
|
if (empty($user['uid'])) {
|
||||||
|
|
@ -414,8 +414,8 @@ class Conversation
|
||||||
* figures out how to determine page owner and other contextual items
|
* figures out how to determine page owner and other contextual items
|
||||||
* that are based on unique features of the calling module.
|
* that are based on unique features of the calling module.
|
||||||
* @param array $items
|
* @param array $items
|
||||||
* @param $mode
|
* @param string $mode
|
||||||
* @param $update
|
* @param $update @TODO Which type?
|
||||||
* @param bool $preview
|
* @param bool $preview
|
||||||
* @param string $order
|
* @param string $order
|
||||||
* @param int $uid
|
* @param int $uid
|
||||||
|
|
@ -423,7 +423,7 @@ class Conversation
|
||||||
* @throws ImagickException
|
* @throws ImagickException
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public function create(array $items, $mode, $update, $preview = false, $order = 'commented', $uid = 0)
|
public function create(array $items, string $mode, $update, bool $preview = false, string $order = 'commented', int $uid = 0): string
|
||||||
{
|
{
|
||||||
$this->profiler->startRecording('rendering');
|
$this->profiler->startRecording('rendering');
|
||||||
|
|
||||||
|
|
@ -784,7 +784,7 @@ class Conversation
|
||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getBlocklist()
|
private function getBlocklist(): array
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!local_user()) {
|
||||||
return [];
|
return [];
|
||||||
|
|
@ -816,7 +816,7 @@ class Conversation
|
||||||
*
|
*
|
||||||
* @return array items with parents and comments
|
* @return array items with parents and comments
|
||||||
*/
|
*/
|
||||||
private function addRowInformation(array $row, array $activity, array $thr_parent)
|
private function addRowInformation(array $row, array $activity, array $thr_parent): array
|
||||||
{
|
{
|
||||||
$this->profiler->startRecording('rendering');
|
$this->profiler->startRecording('rendering');
|
||||||
|
|
||||||
|
|
@ -911,7 +911,7 @@ class Conversation
|
||||||
* @return array items with parents and comments
|
* @return array items with parents and comments
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
private function addChildren(array $parents, bool $block_authors, string $order, int $uid, string $mode)
|
private function addChildren(array $parents, bool $block_authors, string $order, int $uid, string $mode): array
|
||||||
{
|
{
|
||||||
$this->profiler->startRecording('rendering');
|
$this->profiler->startRecording('rendering');
|
||||||
if (count($parents) > 1) {
|
if (count($parents) > 1) {
|
||||||
|
|
@ -1005,7 +1005,7 @@ class Conversation
|
||||||
* @param bool $recursive
|
* @param bool $recursive
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
private function getItemChildren(array &$item_list, array $parent, $recursive = true)
|
private function getItemChildren(array &$item_list, array $parent, bool $recursive = true): array
|
||||||
{
|
{
|
||||||
$this->profiler->startRecording('rendering');
|
$this->profiler->startRecording('rendering');
|
||||||
$children = [];
|
$children = [];
|
||||||
|
|
@ -1040,7 +1040,7 @@ class Conversation
|
||||||
* @param array $items
|
* @param array $items
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
private function sortItemChildren(array $items)
|
private function sortItemChildren(array $items): array
|
||||||
{
|
{
|
||||||
$this->profiler->startRecording('rendering');
|
$this->profiler->startRecording('rendering');
|
||||||
$result = $items;
|
$result = $items;
|
||||||
|
|
@ -1086,7 +1086,7 @@ class Conversation
|
||||||
* @param array $parent A tree-like array of items
|
* @param array $parent A tree-like array of items
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
private function smartFlattenConversation(array $parent)
|
private function smartFlattenConversation(array $parent): array
|
||||||
{
|
{
|
||||||
$this->profiler->startRecording('rendering');
|
$this->profiler->startRecording('rendering');
|
||||||
if (!isset($parent['children']) || count($parent['children']) == 0) {
|
if (!isset($parent['children']) || count($parent['children']) == 0) {
|
||||||
|
|
@ -1142,7 +1142,7 @@ class Conversation
|
||||||
* @return array
|
* @return array
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
private function convSort(array $item_list, $order)
|
private function convSort(array $item_list, string $order): array
|
||||||
{
|
{
|
||||||
$this->profiler->startRecording('rendering');
|
$this->profiler->startRecording('rendering');
|
||||||
$parents = [];
|
$parents = [];
|
||||||
|
|
@ -1222,7 +1222,7 @@ class Conversation
|
||||||
* @param array $b
|
* @param array $b
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
private function sortThrFeaturedReceived(array $a, array $b)
|
private function sortThrFeaturedReceived(array $a, array $b): int
|
||||||
{
|
{
|
||||||
if ($b['featured'] && !$a['featured']) {
|
if ($b['featured'] && !$a['featured']) {
|
||||||
return 1;
|
return 1;
|
||||||
|
|
@ -1240,7 +1240,7 @@ class Conversation
|
||||||
* @param array $b
|
* @param array $b
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
private function sortThrFeaturedCommented(array $a, array $b)
|
private function sortThrFeaturedCommented(array $a, array $b): int
|
||||||
{
|
{
|
||||||
if ($b['featured'] && !$a['featured']) {
|
if ($b['featured'] && !$a['featured']) {
|
||||||
return 1;
|
return 1;
|
||||||
|
|
@ -1258,7 +1258,7 @@ class Conversation
|
||||||
* @param array $b
|
* @param array $b
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
private function sortThrReceived(array $a, array $b)
|
private function sortThrReceived(array $a, array $b): int
|
||||||
{
|
{
|
||||||
return strcmp($b['received'], $a['received']);
|
return strcmp($b['received'], $a['received']);
|
||||||
}
|
}
|
||||||
|
|
@ -1270,7 +1270,7 @@ class Conversation
|
||||||
* @param array $b
|
* @param array $b
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
private function sortThrReceivedRev(array $a, array $b)
|
private function sortThrReceivedRev(array $a, array $b): int
|
||||||
{
|
{
|
||||||
return strcmp($a['received'], $b['received']);
|
return strcmp($a['received'], $b['received']);
|
||||||
}
|
}
|
||||||
|
|
@ -1282,7 +1282,7 @@ class Conversation
|
||||||
* @param array $b
|
* @param array $b
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
private function sortThrCommented(array $a, array $b)
|
private function sortThrCommented(array $a, array $b): int
|
||||||
{
|
{
|
||||||
return strcmp($b['commented'], $a['commented']);
|
return strcmp($b['commented'], $a['commented']);
|
||||||
}
|
}
|
||||||
|
|
@ -1294,7 +1294,7 @@ class Conversation
|
||||||
* @param array $b
|
* @param array $b
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
private function sortThrCreated(array $a, array $b)
|
private function sortThrCreated(array $a, array $b): int
|
||||||
{
|
{
|
||||||
return strcmp($b['created'], $a['created']);
|
return strcmp($b['created'], $a['created']);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ class HTML
|
||||||
* inner value from an attribute value and disregard the tag children.
|
* inner value from an attribute value and disregard the tag children.
|
||||||
* @return bool Whether a replacement was done
|
* @return bool Whether a replacement was done
|
||||||
*/
|
*/
|
||||||
private static function tagToBBCodeSub(DOMDocument $doc, string $tag, array $attributes, string $startbb, string $endbb, bool $ignoreChildren = false)
|
private static function tagToBBCodeSub(DOMDocument $doc, string $tag, array $attributes, string $startbb, string $endbb, bool $ignoreChildren = false): bool
|
||||||
{
|
{
|
||||||
$savestart = str_replace('$', '\x01', $startbb);
|
$savestart = str_replace('$', '\x01', $startbb);
|
||||||
$replace = false;
|
$replace = false;
|
||||||
|
|
@ -141,8 +141,16 @@ class HTML
|
||||||
* @return string
|
* @return string
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function toBBCode($message, $basepath = '')
|
public static function toBBCode(string $message, string $basepath = ''): string
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* Check if message is empty to prevent a lot code below being executed
|
||||||
|
* for just an empty message.
|
||||||
|
*/
|
||||||
|
if (empty($message)) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
DI::profiler()->startRecording('rendering');
|
DI::profiler()->startRecording('rendering');
|
||||||
$message = str_replace("\r", "", $message);
|
$message = str_replace("\r", "", $message);
|
||||||
|
|
||||||
|
|
@ -409,7 +417,7 @@ class HTML
|
||||||
*
|
*
|
||||||
* @return string The expanded URL
|
* @return string The expanded URL
|
||||||
*/
|
*/
|
||||||
private static function qualifyURLsSub($matches, $basepath)
|
private static function qualifyURLsSub(array $matches, string $basepath): string
|
||||||
{
|
{
|
||||||
$base = parse_url($basepath);
|
$base = parse_url($basepath);
|
||||||
unset($base['query']);
|
unset($base['query']);
|
||||||
|
|
@ -436,7 +444,7 @@ class HTML
|
||||||
*
|
*
|
||||||
* @return string Body with expanded URLs
|
* @return string Body with expanded URLs
|
||||||
*/
|
*/
|
||||||
private static function qualifyURLs($body, $basepath)
|
private static function qualifyURLs(string $body, string $basepath): string
|
||||||
{
|
{
|
||||||
$URLSearchString = "^\[\]";
|
$URLSearchString = "^\[\]";
|
||||||
|
|
||||||
|
|
@ -462,7 +470,7 @@ class HTML
|
||||||
return $body;
|
return $body;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function breakLines($line, $level, $wraplength = 75)
|
private static function breakLines(string $line, int $level, int $wraplength = 75): string
|
||||||
{
|
{
|
||||||
if ($wraplength == 0) {
|
if ($wraplength == 0) {
|
||||||
$wraplength = 2000000;
|
$wraplength = 2000000;
|
||||||
|
|
@ -503,7 +511,7 @@ class HTML
|
||||||
return implode("\n", $newlines);
|
return implode("\n", $newlines);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function quoteLevel($message, $wraplength = 75)
|
private static function quoteLevel(string $message, int $wraplength = 75): string
|
||||||
{
|
{
|
||||||
$lines = explode("\n", $message);
|
$lines = explode("\n", $message);
|
||||||
|
|
||||||
|
|
@ -539,7 +547,7 @@ class HTML
|
||||||
return implode("\n", $newlines);
|
return implode("\n", $newlines);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function collectURLs($message)
|
private static function collectURLs(string $message): array
|
||||||
{
|
{
|
||||||
$pattern = '/<a.*?href="(.*?)".*?>(.*?)<\/a>/is';
|
$pattern = '/<a.*?href="(.*?)".*?>(.*?)<\/a>/is';
|
||||||
preg_match_all($pattern, $message, $result, PREG_SET_ORDER);
|
preg_match_all($pattern, $message, $result, PREG_SET_ORDER);
|
||||||
|
|
@ -585,7 +593,7 @@ class HTML
|
||||||
* @param bool $compact True: Completely strips image tags; False: Keeps image URLs
|
* @param bool $compact True: Completely strips image tags; False: Keeps image URLs
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function toPlaintext(string $html, $wraplength = 75, $compact = false)
|
public static function toPlaintext(string $html, int $wraplength = 75, bool $compact = false): string
|
||||||
{
|
{
|
||||||
DI::profiler()->startRecording('rendering');
|
DI::profiler()->startRecording('rendering');
|
||||||
$message = str_replace("\r", "", $html);
|
$message = str_replace("\r", "", $html);
|
||||||
|
|
@ -705,7 +713,7 @@ class HTML
|
||||||
* @param string $html
|
* @param string $html
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function toMarkdown($html)
|
public static function toMarkdown(string $html): string
|
||||||
{
|
{
|
||||||
DI::profiler()->startRecording('rendering');
|
DI::profiler()->startRecording('rendering');
|
||||||
$converter = new HtmlConverter(['hard_break' => true]);
|
$converter = new HtmlConverter(['hard_break' => true]);
|
||||||
|
|
@ -721,7 +729,7 @@ class HTML
|
||||||
* @param string $s
|
* @param string $s
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function toBBCodeVideo($s)
|
public static function toBBCodeVideo(string $s): string
|
||||||
{
|
{
|
||||||
$s = preg_replace(
|
$s = preg_replace(
|
||||||
'#<object[^>]+>(.*?)https?://www.youtube.com/((?:v|cp)/[A-Za-z0-9\-_=]+)(.*?)</object>#ism',
|
'#<object[^>]+>(.*?)https?://www.youtube.com/((?:v|cp)/[A-Za-z0-9\-_=]+)(.*?)</object>#ism',
|
||||||
|
|
@ -751,7 +759,7 @@ class HTML
|
||||||
* @param string $base base url
|
* @param string $base base url
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function relToAbs($text, $base)
|
public static function relToAbs(string $text, string $base): string
|
||||||
{
|
{
|
||||||
if (empty($base)) {
|
if (empty($base)) {
|
||||||
return $text;
|
return $text;
|
||||||
|
|
@ -790,7 +798,7 @@ class HTML
|
||||||
* @return string html for loader
|
* @return string html for loader
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function scrollLoader()
|
public static function scrollLoader(): string
|
||||||
{
|
{
|
||||||
$tpl = Renderer::getMarkupTemplate("scroll_loader.tpl");
|
$tpl = Renderer::getMarkupTemplate("scroll_loader.tpl");
|
||||||
return Renderer::replaceMacros($tpl, [
|
return Renderer::replaceMacros($tpl, [
|
||||||
|
|
@ -819,7 +827,7 @@ class HTML
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function micropro($contact, $redirect = false, $class = '', $textmode = false)
|
public static function micropro(array $contact, bool $redirect = false, string $class = '', bool $textmode = false): string
|
||||||
{
|
{
|
||||||
// Use the contact URL if no address is available
|
// Use the contact URL if no address is available
|
||||||
if (empty($contact['addr'])) {
|
if (empty($contact['addr'])) {
|
||||||
|
|
@ -859,13 +867,12 @@ class HTML
|
||||||
*
|
*
|
||||||
* @param string $s Search query.
|
* @param string $s Search query.
|
||||||
* @param string $id HTML id
|
* @param string $id HTML id
|
||||||
* @param string $url Search url.
|
|
||||||
* @param bool $aside Display the search widgit aside.
|
* @param bool $aside Display the search widgit aside.
|
||||||
*
|
*
|
||||||
* @return string Formatted HTML.
|
* @return string Formatted HTML.
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function search($s, $id = 'search-box', $aside = true)
|
public static function search(string $s, string $id = 'search-box', bool $aside = true): string
|
||||||
{
|
{
|
||||||
$mode = 'text';
|
$mode = 'text';
|
||||||
|
|
||||||
|
|
@ -906,7 +913,7 @@ class HTML
|
||||||
* @param string $s
|
* @param string $s
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function toLink($s)
|
public static function toLink(string $s): string
|
||||||
{
|
{
|
||||||
$s = preg_replace("/(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\'\%\$\!\+]*)/", ' <a href="$1" target="_blank" rel="noopener noreferrer">$1</a>', $s);
|
$s = preg_replace("/(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\'\%\$\!\+]*)/", ' <a href="$1" target="_blank" rel="noopener noreferrer">$1</a>', $s);
|
||||||
$s = preg_replace("/\<(.*?)(src|href)=(.*?)\&\;(.*?)\>/ism", '<$1$2=$3&$4>', $s);
|
$s = preg_replace("/\<(.*?)(src|href)=(.*?)\&\;(.*?)\>/ism", '<$1$2=$3&$4>', $s);
|
||||||
|
|
@ -923,7 +930,7 @@ class HTML
|
||||||
* @return string
|
* @return string
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function applyContentFilter($html, array $reasons)
|
public static function applyContentFilter(string $html, array $reasons): string
|
||||||
{
|
{
|
||||||
if (count($reasons)) {
|
if (count($reasons)) {
|
||||||
$tpl = Renderer::getMarkupTemplate('wall/content_filter.tpl');
|
$tpl = Renderer::getMarkupTemplate('wall/content_filter.tpl');
|
||||||
|
|
@ -943,7 +950,7 @@ class HTML
|
||||||
* @param string $s
|
* @param string $s
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function unamp($s)
|
public static function unamp(string $s): string
|
||||||
{
|
{
|
||||||
return str_replace('&', '&', $s);
|
return str_replace('&', '&', $s);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ class Widget
|
||||||
* @return string
|
* @return string
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function follow($value = "")
|
public static function follow(string $value = ''): string
|
||||||
{
|
{
|
||||||
return Renderer::replaceMacros(Renderer::getMarkupTemplate('widget/follow.tpl'), array(
|
return Renderer::replaceMacros(Renderer::getMarkupTemplate('widget/follow.tpl'), array(
|
||||||
'$connect' => DI::l10n()->t('Add New Contact'),
|
'$connect' => DI::l10n()->t('Add New Contact'),
|
||||||
|
|
@ -58,8 +58,10 @@ class Widget
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return Find People widget
|
* Return Find People widget
|
||||||
|
*
|
||||||
|
* @return string HTML code respresenting "People Widget"
|
||||||
*/
|
*/
|
||||||
public static function findPeople()
|
public static function findPeople(): string
|
||||||
{
|
{
|
||||||
$global_dir = Search::getGlobalDirectory();
|
$global_dir = Search::getGlobalDirectory();
|
||||||
|
|
||||||
|
|
@ -97,7 +99,7 @@ class Widget
|
||||||
*
|
*
|
||||||
* @return array Unsupported networks
|
* @return array Unsupported networks
|
||||||
*/
|
*/
|
||||||
public static function unavailableNetworks()
|
public static function unavailableNetworks(): array
|
||||||
{
|
{
|
||||||
// Always hide content from these networks
|
// Always hide content from these networks
|
||||||
$networks = [Protocol::PHANTOM, Protocol::FACEBOOK, Protocol::APPNET, Protocol::ZOT];
|
$networks = [Protocol::PHANTOM, Protocol::FACEBOOK, Protocol::APPNET, Protocol::ZOT];
|
||||||
|
|
@ -154,7 +156,7 @@ class Widget
|
||||||
* @return string
|
* @return string
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function filter($type, $title, $desc, $all, $baseUrl, array $options, $selected = null)
|
private static function filter(string $type, string $title, string $desc, string $all, string $baseUrl, array $options, string $selected = null): string
|
||||||
{
|
{
|
||||||
$queryString = parse_url($baseUrl, PHP_URL_QUERY);
|
$queryString = parse_url($baseUrl, PHP_URL_QUERY);
|
||||||
$queryArray = [];
|
$queryArray = [];
|
||||||
|
|
@ -191,7 +193,7 @@ class Widget
|
||||||
* @return string
|
* @return string
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function groups($baseurl, $selected = '')
|
public static function groups(string $baseurl, string $selected = ''): string
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!local_user()) {
|
||||||
return '';
|
return '';
|
||||||
|
|
|
||||||
|
|
@ -656,7 +656,7 @@ class Installer
|
||||||
* @return bool true if the check was successful, otherwise false
|
* @return bool true if the check was successful, otherwise false
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function checkDB(Database $dba)
|
public function checkDB(Database $dba): bool
|
||||||
{
|
{
|
||||||
$dba->reconnect();
|
$dba->reconnect();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ class Worker
|
||||||
* @return void
|
* @return void
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function processQueue($run_cron, Process $process)
|
public static function processQueue(bool $run_cron, Process $process)
|
||||||
{
|
{
|
||||||
self::$up_start = microtime(true);
|
self::$up_start = microtime(true);
|
||||||
|
|
||||||
|
|
@ -169,7 +169,7 @@ class Worker
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public static function isReady()
|
public static function isReady(): bool
|
||||||
{
|
{
|
||||||
// Count active workers and compare them with a maximum value that depends on the load
|
// Count active workers and compare them with a maximum value that depends on the load
|
||||||
if (self::tooMuchWorkers()) {
|
if (self::tooMuchWorkers()) {
|
||||||
|
|
@ -204,7 +204,7 @@ class Worker
|
||||||
* @return boolean Returns "true" if tasks are existing
|
* @return boolean Returns "true" if tasks are existing
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function entriesExists()
|
public static function entriesExists(): bool
|
||||||
{
|
{
|
||||||
$stamp = (float)microtime(true);
|
$stamp = (float)microtime(true);
|
||||||
$exists = DBA::exists('workerqueue', ["NOT `done` AND `pid` = 0 AND `next_try` < ?", DateTimeFormat::utcNow()]);
|
$exists = DBA::exists('workerqueue', ["NOT `done` AND `pid` = 0 AND `next_try` < ?", DateTimeFormat::utcNow()]);
|
||||||
|
|
@ -218,7 +218,7 @@ class Worker
|
||||||
* @return integer Number of deferred entries in the worker queue
|
* @return integer Number of deferred entries in the worker queue
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function deferredEntries()
|
private static function deferredEntries(): int
|
||||||
{
|
{
|
||||||
$stamp = (float)microtime(true);
|
$stamp = (float)microtime(true);
|
||||||
$count = DBA::count('workerqueue', ["NOT `done` AND `pid` = 0 AND `retrial` > ?", 0]);
|
$count = DBA::count('workerqueue', ["NOT `done` AND `pid` = 0 AND `retrial` > ?", 0]);
|
||||||
|
|
@ -233,7 +233,7 @@ class Worker
|
||||||
* @return integer Number of non executed entries in the worker queue
|
* @return integer Number of non executed entries in the worker queue
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function totalEntries()
|
private static function totalEntries(): int
|
||||||
{
|
{
|
||||||
$stamp = (float)microtime(true);
|
$stamp = (float)microtime(true);
|
||||||
$count = DBA::count('workerqueue', ['done' => false, 'pid' => 0]);
|
$count = DBA::count('workerqueue', ['done' => false, 'pid' => 0]);
|
||||||
|
|
@ -248,7 +248,7 @@ class Worker
|
||||||
* @return integer Number of active worker processes
|
* @return integer Number of active worker processes
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function highestPriority()
|
private static function highestPriority(): int
|
||||||
{
|
{
|
||||||
$stamp = (float)microtime(true);
|
$stamp = (float)microtime(true);
|
||||||
$condition = ["`pid` = 0 AND NOT `done` AND `next_try` < ?", DateTimeFormat::utcNow()];
|
$condition = ["`pid` = 0 AND NOT `done` AND `next_try` < ?", DateTimeFormat::utcNow()];
|
||||||
|
|
@ -269,7 +269,7 @@ class Worker
|
||||||
* @return integer Is there a process running with that priority?
|
* @return integer Is there a process running with that priority?
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function processWithPriorityActive($priority)
|
private static function processWithPriorityActive(int $priority): int
|
||||||
{
|
{
|
||||||
$condition = ["`priority` <= ? AND `pid` != 0 AND NOT `done`", $priority];
|
$condition = ["`priority` <= ? AND `pid` != 0 AND NOT `done`", $priority];
|
||||||
return DBA::exists('workerqueue', $condition);
|
return DBA::exists('workerqueue', $condition);
|
||||||
|
|
@ -281,7 +281,7 @@ class Worker
|
||||||
* @param mixed $file
|
* @param mixed $file
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
private static function validateInclude(&$file)
|
private static function validateInclude(&$file): bool
|
||||||
{
|
{
|
||||||
$orig_file = $file;
|
$orig_file = $file;
|
||||||
|
|
||||||
|
|
@ -321,7 +321,7 @@ class Worker
|
||||||
* @return boolean "true" if further processing should be stopped
|
* @return boolean "true" if further processing should be stopped
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function execute($queue)
|
public static function execute(array $queue): bool
|
||||||
{
|
{
|
||||||
$mypid = getmypid();
|
$mypid = getmypid();
|
||||||
|
|
||||||
|
|
@ -454,7 +454,7 @@ class Worker
|
||||||
* @return void
|
* @return void
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
private static function execFunction($queue, $funcname, $argv, $method_call)
|
private static function execFunction(array $queue, string $funcname, array $argv, bool $method_call)
|
||||||
{
|
{
|
||||||
$a = DI::app();
|
$a = DI::app();
|
||||||
|
|
||||||
|
|
@ -543,7 +543,7 @@ class Worker
|
||||||
* @return bool Are more than 3/4 of the maximum connections used?
|
* @return bool Are more than 3/4 of the maximum connections used?
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
private static function maxConnectionsReached()
|
private static function maxConnectionsReached(): bool
|
||||||
{
|
{
|
||||||
// Fetch the max value from the config. This is needed when the system cannot detect the correct value by itself.
|
// Fetch the max value from the config. This is needed when the system cannot detect the correct value by itself.
|
||||||
$max = DI::config()->get("system", "max_connections");
|
$max = DI::config()->get("system", "max_connections");
|
||||||
|
|
@ -627,7 +627,7 @@ class Worker
|
||||||
* @return bool Are there too much workers running?
|
* @return bool Are there too much workers running?
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
private static function tooMuchWorkers()
|
private static function tooMuchWorkers(): bool
|
||||||
{
|
{
|
||||||
$queues = DI::config()->get("system", "worker_queues", 10);
|
$queues = DI::config()->get("system", "worker_queues", 10);
|
||||||
|
|
||||||
|
|
@ -751,7 +751,7 @@ class Worker
|
||||||
* @return integer Number of active worker processes
|
* @return integer Number of active worker processes
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function activeWorkers()
|
private static function activeWorkers(): int
|
||||||
{
|
{
|
||||||
$stamp = (float)microtime(true);
|
$stamp = (float)microtime(true);
|
||||||
$count = DI::process()->countCommand('Worker.php');
|
$count = DI::process()->countCommand('Worker.php');
|
||||||
|
|
@ -766,7 +766,7 @@ class Worker
|
||||||
* @return array List of worker process ids
|
* @return array List of worker process ids
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function getWorkerPIDList()
|
private static function getWorkerPIDList(): array
|
||||||
{
|
{
|
||||||
$ids = [];
|
$ids = [];
|
||||||
$stamp = (float)microtime(true);
|
$stamp = (float)microtime(true);
|
||||||
|
|
@ -787,7 +787,7 @@ class Worker
|
||||||
/**
|
/**
|
||||||
* Returns waiting jobs for the current process id
|
* Returns waiting jobs for the current process id
|
||||||
*
|
*
|
||||||
* @return array waiting workerqueue jobs
|
* @return array|bool waiting workerqueue jobs or FALSE on failture
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function getWaitingJobForPID()
|
private static function getWaitingJobForPID()
|
||||||
|
|
@ -809,7 +809,7 @@ class Worker
|
||||||
* @return array array with next jobs
|
* @return array array with next jobs
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function nextProcess(int $limit)
|
private static function nextProcess(int $limit): array
|
||||||
{
|
{
|
||||||
$priority = self::nextPriority();
|
$priority = self::nextPriority();
|
||||||
if (empty($priority)) {
|
if (empty($priority)) {
|
||||||
|
|
@ -844,7 +844,7 @@ class Worker
|
||||||
/**
|
/**
|
||||||
* Returns the priority of the next workerqueue job
|
* Returns the priority of the next workerqueue job
|
||||||
*
|
*
|
||||||
* @return string priority
|
* @return string|bool priority or FALSE on failure
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function nextPriority()
|
private static function nextPriority()
|
||||||
|
|
@ -915,7 +915,7 @@ class Worker
|
||||||
/**
|
/**
|
||||||
* Find and claim the next worker process for us
|
* Find and claim the next worker process for us
|
||||||
*
|
*
|
||||||
* @return boolean Have we found something?
|
* @return void
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
private static function findWorkerProcesses()
|
private static function findWorkerProcesses()
|
||||||
|
|
@ -993,7 +993,7 @@ class Worker
|
||||||
* @return array worker processes
|
* @return array worker processes
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function workerProcess()
|
public static function workerProcess(): array
|
||||||
{
|
{
|
||||||
// There can already be jobs for us in the queue.
|
// There can already be jobs for us in the queue.
|
||||||
$waiting = self::getWaitingJobForPID();
|
$waiting = self::getWaitingJobForPID();
|
||||||
|
|
@ -1003,7 +1003,7 @@ class Worker
|
||||||
|
|
||||||
$stamp = (float)microtime(true);
|
$stamp = (float)microtime(true);
|
||||||
if (!DI::lock()->acquire(self::LOCK_PROCESS)) {
|
if (!DI::lock()->acquire(self::LOCK_PROCESS)) {
|
||||||
return false;
|
return [];
|
||||||
}
|
}
|
||||||
self::$lock_duration += (microtime(true) - $stamp);
|
self::$lock_duration += (microtime(true) - $stamp);
|
||||||
|
|
||||||
|
|
@ -1011,7 +1011,9 @@ class Worker
|
||||||
|
|
||||||
DI::lock()->release(self::LOCK_PROCESS);
|
DI::lock()->release(self::LOCK_PROCESS);
|
||||||
|
|
||||||
return self::getWaitingJobForPID();
|
// Prevents "Return value of Friendica\Core\Worker::workerProcess() must be of the type array, bool returned"
|
||||||
|
$process = self::getWaitingJobForPID();
|
||||||
|
return (is_array($process) ? $process : []);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1097,7 +1099,7 @@ class Worker
|
||||||
* @return void
|
* @return void
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function spawnWorker($do_cron = false)
|
public static function spawnWorker(bool $do_cron = false)
|
||||||
{
|
{
|
||||||
if (Worker\Daemon::isMode() && DI::config()->get('system', 'worker_fork')) {
|
if (Worker\Daemon::isMode() && DI::config()->get('system', 'worker_fork')) {
|
||||||
self::forkProcess($do_cron);
|
self::forkProcess($do_cron);
|
||||||
|
|
@ -1231,7 +1233,7 @@ class Worker
|
||||||
return $added;
|
return $added;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function countWorkersByCommand(string $command)
|
public static function countWorkersByCommand(string $command): int
|
||||||
{
|
{
|
||||||
return DBA::count('workerqueue', ['done' => false, 'pid' => 0, 'command' => $command]);
|
return DBA::count('workerqueue', ['done' => false, 'pid' => 0, 'command' => $command]);
|
||||||
}
|
}
|
||||||
|
|
@ -1244,7 +1246,7 @@ class Worker
|
||||||
* @param integer $max_level maximum retrial level
|
* @param integer $max_level maximum retrial level
|
||||||
* @return integer the next retrial level value
|
* @return integer the next retrial level value
|
||||||
*/
|
*/
|
||||||
private static function getNextRetrial($queue, $max_level)
|
private static function getNextRetrial(array $queue, int $max_level): int
|
||||||
{
|
{
|
||||||
$created = strtotime($queue['created']);
|
$created = strtotime($queue['created']);
|
||||||
$retrial_time = time() - $created;
|
$retrial_time = time() - $created;
|
||||||
|
|
@ -1314,9 +1316,10 @@ class Worker
|
||||||
/**
|
/**
|
||||||
* Check if the system is inside the defined maintenance window
|
* Check if the system is inside the defined maintenance window
|
||||||
*
|
*
|
||||||
|
* @param bool $check_last_execution Whether check last execution
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public static function isInMaintenanceWindow(bool $check_last_execution = false)
|
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 end end of the maintenance window
|
||||||
$start = strtotime(DI::config()->get('system', 'maintenance_start')) % 86400;
|
$start = strtotime(DI::config()->get('system', 'maintenance_start')) % 86400;
|
||||||
|
|
|
||||||
|
|
@ -427,7 +427,7 @@ class DBA
|
||||||
* @return boolean was the update successfull?
|
* @return boolean was the update successfull?
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function update($table, $fields, $condition, $old_fields = [], $params = [])
|
public static function update($table, array $fields, array $condition, $old_fields = [], array $params = [])
|
||||||
{
|
{
|
||||||
return DI::dba()->update($table, $fields, $condition, $old_fields, $params);
|
return DI::dba()->update($table, $fields, $condition, $old_fields, $params);
|
||||||
}
|
}
|
||||||
|
|
@ -443,7 +443,7 @@ class DBA
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
* @see self::select
|
* @see self::select
|
||||||
*/
|
*/
|
||||||
public static function selectFirst($table, array $fields = [], array $condition = [], $params = [])
|
public static function selectFirst($table, array $fields = [], array $condition = [], array $params = [])
|
||||||
{
|
{
|
||||||
return DI::dba()->selectFirst($table, $fields, $condition, $params);
|
return DI::dba()->selectFirst($table, $fields, $condition, $params);
|
||||||
}
|
}
|
||||||
|
|
@ -512,7 +512,7 @@ class DBA
|
||||||
* $count = DBA::count($table, $condition);
|
* $count = DBA::count($table, $condition);
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function count($table, array $condition = [], array $params = [])
|
public static function count($table, array $condition = [], array $params = []): int
|
||||||
{
|
{
|
||||||
return DI::dba()->count($table, $condition, $params);
|
return DI::dba()->count($table, $condition, $params);
|
||||||
}
|
}
|
||||||
|
|
@ -771,7 +771,7 @@ class DBA
|
||||||
*
|
*
|
||||||
* @return array Data array
|
* @return array Data array
|
||||||
*/
|
*/
|
||||||
public static function toArray($stmt, $do_close = true, int $count = 0)
|
public static function toArray($stmt, $do_close = true, int $count = 0): array
|
||||||
{
|
{
|
||||||
return DI::dba()->toArray($stmt, $do_close, $count);
|
return DI::dba()->toArray($stmt, $do_close, $count);
|
||||||
}
|
}
|
||||||
|
|
@ -783,7 +783,7 @@ class DBA
|
||||||
* @param array $fields
|
* @param array $fields
|
||||||
* @return array casted fields
|
* @return array casted fields
|
||||||
*/
|
*/
|
||||||
public static function castFields(string $table, array $fields)
|
public static function castFields(string $table, array $fields): array
|
||||||
{
|
{
|
||||||
return DI::dba()->castFields($table, $fields);
|
return DI::dba()->castFields($table, $fields);
|
||||||
}
|
}
|
||||||
|
|
@ -793,7 +793,7 @@ class DBA
|
||||||
*
|
*
|
||||||
* @return string Error number (0 if no error)
|
* @return string Error number (0 if no error)
|
||||||
*/
|
*/
|
||||||
public static function errorNo()
|
public static function errorNo(): int
|
||||||
{
|
{
|
||||||
return DI::dba()->errorNo();
|
return DI::dba()->errorNo();
|
||||||
}
|
}
|
||||||
|
|
@ -803,7 +803,7 @@ class DBA
|
||||||
*
|
*
|
||||||
* @return string Error message ('' if no error)
|
* @return string Error message ('' if no error)
|
||||||
*/
|
*/
|
||||||
public static function errorMessage()
|
public static function errorMessage(): string
|
||||||
{
|
{
|
||||||
return DI::dba()->errorMessage();
|
return DI::dba()->errorMessage();
|
||||||
}
|
}
|
||||||
|
|
@ -814,7 +814,7 @@ class DBA
|
||||||
* @param object $stmt statement object
|
* @param object $stmt statement object
|
||||||
* @return boolean was the close successful?
|
* @return boolean was the close successful?
|
||||||
*/
|
*/
|
||||||
public static function close($stmt)
|
public static function close($stmt): bool
|
||||||
{
|
{
|
||||||
return DI::dba()->close($stmt);
|
return DI::dba()->close($stmt);
|
||||||
}
|
}
|
||||||
|
|
@ -827,7 +827,7 @@ class DBA
|
||||||
* 'amount' => Number of concurrent database processes
|
* 'amount' => Number of concurrent database processes
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function processlist()
|
public static function processlist(): array
|
||||||
{
|
{
|
||||||
return DI::dba()->processlist();
|
return DI::dba()->processlist();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -150,10 +150,9 @@ class DBStructure
|
||||||
* Print out database error messages
|
* Print out database error messages
|
||||||
*
|
*
|
||||||
* @param string $message Message to be added to the error message
|
* @param string $message Message to be added to the error message
|
||||||
*
|
|
||||||
* @return string Error message
|
* @return string Error message
|
||||||
*/
|
*/
|
||||||
private static function printUpdateError($message)
|
private static function printUpdateError(string $message): string
|
||||||
{
|
{
|
||||||
echo DI::l10n()->t("\nError %d occurred during database update:\n%s\n",
|
echo DI::l10n()->t("\nError %d occurred during database update:\n%s\n",
|
||||||
DBA::errorNo(), DBA::errorMessage());
|
DBA::errorNo(), DBA::errorMessage());
|
||||||
|
|
@ -164,7 +163,7 @@ class DBStructure
|
||||||
public static function writeStructure()
|
public static function writeStructure()
|
||||||
{
|
{
|
||||||
$tables = [];
|
$tables = [];
|
||||||
foreach (self::definition(null) as $name => $definition) {
|
foreach (self::definition('') as $name => $definition) {
|
||||||
$indexes = [[
|
$indexes = [[
|
||||||
'name' => 'Name',
|
'name' => 'Name',
|
||||||
'fields' => 'Fields',
|
'fields' => 'Fields',
|
||||||
|
|
@ -225,8 +224,8 @@ class DBStructure
|
||||||
$field['default'] = $value['default'] ?? 'NULL';
|
$field['default'] = $value['default'] ?? 'NULL';
|
||||||
$field['extra'] = $value['extra'] ?? '';
|
$field['extra'] = $value['extra'] ?? '';
|
||||||
|
|
||||||
foreach ($field as $fieldname => $fieldvalue) {
|
foreach ($field as $fieldName => $fieldvalue) {
|
||||||
$lengths[$fieldname] = max($lengths[$fieldname] ?? 0, strlen($fieldvalue));
|
$lengths[$fieldName] = max($lengths[$fieldName] ?? 0, strlen($fieldvalue));
|
||||||
}
|
}
|
||||||
$fields[] = $field;
|
$fields[] = $field;
|
||||||
|
|
||||||
|
|
@ -263,7 +262,7 @@ class DBStructure
|
||||||
file_put_contents($filename, $content);
|
file_put_contents($filename, $content);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function printStructure($basePath)
|
public static function printStructure(string $basePath)
|
||||||
{
|
{
|
||||||
$database = self::definition($basePath, false);
|
$database = self::definition($basePath, false);
|
||||||
|
|
||||||
|
|
@ -288,12 +287,12 @@ class DBStructure
|
||||||
* On first pass, defines DB_UPDATE_VERSION constant.
|
* On first pass, defines DB_UPDATE_VERSION constant.
|
||||||
*
|
*
|
||||||
* @see static/dbstructure.config.php
|
* @see static/dbstructure.config.php
|
||||||
* @param boolean $with_addons_structure Whether to tack on addons additional tables
|
|
||||||
* @param string $basePath The base path of this application
|
* @param string $basePath The base path of this application
|
||||||
|
* @param boolean $with_addons_structure Whether to tack on addons additional tables
|
||||||
* @return array
|
* @return array
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function definition($basePath, $with_addons_structure = true)
|
public static function definition(string $basePath, bool $with_addons_structure = true): array
|
||||||
{
|
{
|
||||||
if (!self::$definition) {
|
if (!self::$definition) {
|
||||||
if (empty($basePath)) {
|
if (empty($basePath)) {
|
||||||
|
|
@ -303,7 +302,7 @@ class DBStructure
|
||||||
$filename = $basePath . '/static/dbstructure.config.php';
|
$filename = $basePath . '/static/dbstructure.config.php';
|
||||||
|
|
||||||
if (!is_readable($filename)) {
|
if (!is_readable($filename)) {
|
||||||
throw new Exception('Missing database structure config file static/dbstructure.config.php');
|
throw new Exception('Missing database structure config file static/dbstructure.config.php at basePath=' . $basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
$definition = require $filename;
|
$definition = require $filename;
|
||||||
|
|
@ -327,23 +326,23 @@ class DBStructure
|
||||||
/**
|
/**
|
||||||
* Get field data for the given table
|
* Get field data for the given table
|
||||||
*
|
*
|
||||||
* @param string $table
|
* @param string $table Tavle to load field definitions for
|
||||||
* @param array $data data fields
|
* @param array $data data fields
|
||||||
* @return array fields for the given
|
* @return array fields for the given
|
||||||
*/
|
*/
|
||||||
public static function getFieldsForTable(string $table, array $data = [])
|
public static function getFieldsForTable(string $table, array $data = []): array
|
||||||
{
|
{
|
||||||
$definition = DBStructure::definition('', false);
|
$definition = DBStructure::definition('', false);
|
||||||
if (empty($definition[$table])) {
|
if (empty($definition[$table])) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$fieldnames = array_keys($definition[$table]['fields']);
|
$fieldNames = array_keys($definition[$table]['fields']);
|
||||||
|
|
||||||
$fields = [];
|
$fields = [];
|
||||||
|
|
||||||
// Assign all field that are present in the table
|
// Assign all field that are present in the table
|
||||||
foreach ($fieldnames as $field) {
|
foreach ($fieldNames as $field) {
|
||||||
if (isset($data[$field])) {
|
if (isset($data[$field])) {
|
||||||
// Limit the length of varchar, varbinary, char and binrary fields
|
// Limit the length of varchar, varbinary, char and binrary fields
|
||||||
if (is_string($data[$field]) && preg_match("/char\((\d*)\)/", $definition[$table]['fields'][$field]['type'], $result)) {
|
if (is_string($data[$field]) && preg_match("/char\((\d*)\)/", $definition[$table]['fields'][$field]['type'], $result)) {
|
||||||
|
|
@ -358,45 +357,54 @@ class DBStructure
|
||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function createTable($name, $structure, $verbose, $action)
|
/**
|
||||||
|
* Creates given table with structure
|
||||||
|
*
|
||||||
|
* @param string $name Name of table
|
||||||
|
* @param array $structure Structure of table
|
||||||
|
* @param boolean $verbose Output SQL statements
|
||||||
|
* @param boolean $action Whether to run the SQL commands
|
||||||
|
* @return Whether the SQL command ran successful
|
||||||
|
*/
|
||||||
|
private static function createTable(string $name, array $structure, bool $verbose, bool $action): bool
|
||||||
{
|
{
|
||||||
$r = true;
|
$r = true;
|
||||||
|
|
||||||
$engine = "";
|
$engine = '';
|
||||||
$comment = "";
|
$comment = '';
|
||||||
$sql_rows = [];
|
$sql_rows = [];
|
||||||
$primary_keys = [];
|
$primary_keys = [];
|
||||||
$foreign_keys = [];
|
$foreign_keys = [];
|
||||||
|
|
||||||
foreach ($structure["fields"] as $fieldname => $field) {
|
foreach ($structure['fields'] as $fieldName => $field) {
|
||||||
$sql_rows[] = "`" . DBA::escape($fieldname) . "` " . self::FieldCommand($field);
|
$sql_rows[] = '`' . DBA::escape($fieldName) . '` ' . self::FieldCommand($field);
|
||||||
if (!empty($field['primary'])) {
|
if (!empty($field['primary'])) {
|
||||||
$primary_keys[] = $fieldname;
|
$primary_keys[] = $fieldName;
|
||||||
}
|
}
|
||||||
if (!empty($field['foreign'])) {
|
if (!empty($field['foreign'])) {
|
||||||
$foreign_keys[$fieldname] = $field;
|
$foreign_keys[$fieldName] = $field;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($structure["indexes"])) {
|
if (!empty($structure['indexes'])) {
|
||||||
foreach ($structure["indexes"] as $indexname => $fieldnames) {
|
foreach ($structure['indexes'] as $indexName => $fieldNames) {
|
||||||
$sql_index = self::createIndex($indexname, $fieldnames, "");
|
$sql_index = self::createIndex($indexName, $fieldNames, '');
|
||||||
if (!is_null($sql_index)) {
|
if (!is_null($sql_index)) {
|
||||||
$sql_rows[] = $sql_index;
|
$sql_rows[] = $sql_index;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($foreign_keys as $fieldname => $parameters) {
|
foreach ($foreign_keys as $fieldName => $parameters) {
|
||||||
$sql_rows[] = self::foreignCommand($name, $fieldname, $parameters);
|
$sql_rows[] = self::foreignCommand($name, $fieldName, $parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($structure["engine"])) {
|
if (isset($structure['engine'])) {
|
||||||
$engine = " ENGINE=" . $structure["engine"];
|
$engine = ' ENGINE=' . $structure['engine'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($structure["comment"])) {
|
if (isset($structure['comment'])) {
|
||||||
$comment = " COMMENT='" . DBA::escape($structure["comment"]) . "'";
|
$comment = " COMMENT='" . DBA::escape($structure['comment']) . "'";
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = implode(",\n\t", $sql_rows);
|
$sql = implode(",\n\t", $sql_rows);
|
||||||
|
|
@ -414,71 +422,77 @@ class DBStructure
|
||||||
return $r;
|
return $r;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function FieldCommand($parameters, $create = true)
|
/**
|
||||||
|
* Returns SQL statement for field
|
||||||
|
*
|
||||||
|
* @param array $parameters Parameters for SQL statement
|
||||||
|
* @param boolean $create Whether to include PRIMARY KEY statement (unused)
|
||||||
|
* @return string SQL statement part
|
||||||
|
*/
|
||||||
|
private static function FieldCommand(array $parameters, bool $create = true): string
|
||||||
{
|
{
|
||||||
$fieldstruct = $parameters["type"];
|
$fieldstruct = $parameters['type'];
|
||||||
|
|
||||||
if (isset($parameters["Collation"])) {
|
if (isset($parameters['Collation'])) {
|
||||||
$fieldstruct .= " COLLATE " . $parameters["Collation"];
|
$fieldstruct .= ' COLLATE ' . $parameters['Collation'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($parameters["not null"])) {
|
if (isset($parameters['not null'])) {
|
||||||
$fieldstruct .= " NOT NULL";
|
$fieldstruct .= ' NOT NULL';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($parameters["default"])) {
|
if (isset($parameters['default'])) {
|
||||||
if (strpos(strtolower($parameters["type"]), "int") !== false) {
|
if (strpos(strtolower($parameters['type']), 'int') !== false) {
|
||||||
$fieldstruct .= " DEFAULT " . $parameters["default"];
|
$fieldstruct .= ' DEFAULT ' . $parameters['default'];
|
||||||
} else {
|
} else {
|
||||||
$fieldstruct .= " DEFAULT '" . $parameters["default"] . "'";
|
$fieldstruct .= " DEFAULT '" . $parameters['default'] . "'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isset($parameters["extra"])) {
|
if (isset($parameters['extra'])) {
|
||||||
$fieldstruct .= " " . $parameters["extra"];
|
$fieldstruct .= ' ' . $parameters['extra'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($parameters["comment"])) {
|
if (isset($parameters['comment'])) {
|
||||||
$fieldstruct .= " COMMENT '" . DBA::escape($parameters["comment"]) . "'";
|
$fieldstruct .= " COMMENT '" . DBA::escape($parameters['comment']) . "'";
|
||||||
}
|
}
|
||||||
|
|
||||||
/*if (($parameters["primary"] != "") && $create)
|
/*if (($parameters['primary'] != '') && $create)
|
||||||
$fieldstruct .= " PRIMARY KEY";*/
|
$fieldstruct .= ' PRIMARY KEY';*/
|
||||||
|
|
||||||
return ($fieldstruct);
|
return $fieldstruct;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function createIndex($indexname, $fieldnames, $method = "ADD")
|
private static function createIndex(string $indexName, array $fieldNames, string $method = 'ADD')
|
||||||
{
|
{
|
||||||
$method = strtoupper(trim($method));
|
$method = strtoupper(trim($method));
|
||||||
if ($method != "" && $method != "ADD") {
|
if ($method != "" && $method != "ADD") {
|
||||||
throw new Exception("Invalid parameter 'method' in self::createIndex(): '$method'");
|
throw new Exception("Invalid parameter 'method' in self::createIndex(): '$method'");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in_array($fieldnames[0], ["UNIQUE", "FULLTEXT"])) {
|
if (in_array($fieldNames[0], ["UNIQUE", "FULLTEXT"])) {
|
||||||
$index_type = array_shift($fieldnames);
|
$index_type = array_shift($fieldNames);
|
||||||
$method .= " " . $index_type;
|
$method .= " " . $index_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
$names = "";
|
$names = "";
|
||||||
foreach ($fieldnames as $fieldname) {
|
foreach ($fieldNames as $fieldName) {
|
||||||
if ($names != "") {
|
if ($names != "") {
|
||||||
$names .= ",";
|
$names .= ",";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (preg_match('|(.+)\((\d+)\)|', $fieldname, $matches)) {
|
if (preg_match('|(.+)\((\d+)\)|', $fieldName, $matches)) {
|
||||||
$names .= "`" . DBA::escape($matches[1]) . "`(" . intval($matches[2]) . ")";
|
$names .= "`" . DBA::escape($matches[1]) . "`(" . intval($matches[2]) . ")";
|
||||||
} else {
|
} else {
|
||||||
$names .= "`" . DBA::escape($fieldname) . "`";
|
$names .= "`" . DBA::escape($fieldName) . "`";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($indexname == "PRIMARY") {
|
if ($indexName == "PRIMARY") {
|
||||||
return sprintf("%s PRIMARY KEY(%s)", $method, $names);
|
return sprintf("%s PRIMARY KEY(%s)", $method, $names);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$sql = sprintf("%s INDEX `%s` (%s)", $method, DBA::escape($indexname), $names);
|
return sprintf("%s INDEX `%s` (%s)", $method, DBA::escape($indexName), $names);
|
||||||
return ($sql);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -500,7 +514,7 @@ class DBStructure
|
||||||
* @return string Empty string if the update is successful, error messages otherwise
|
* @return string Empty string if the update is successful, error messages otherwise
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function performUpdate(bool $enable_maintenance_mode = true, bool $verbose = false)
|
public static function performUpdate(bool $enable_maintenance_mode = true, bool $verbose = false): string
|
||||||
{
|
{
|
||||||
if ($enable_maintenance_mode) {
|
if ($enable_maintenance_mode) {
|
||||||
DI::config()->set('system', 'maintenance', 1);
|
DI::config()->set('system', 'maintenance', 1);
|
||||||
|
|
@ -524,7 +538,7 @@ class DBStructure
|
||||||
* @return string Empty string if the update is successful, error messages otherwise
|
* @return string Empty string if the update is successful, error messages otherwise
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function install(string $basePath)
|
public static function install(string $basePath): string
|
||||||
{
|
{
|
||||||
return self::update($basePath, false, true, true);
|
return self::update($basePath, false, true, true);
|
||||||
}
|
}
|
||||||
|
|
@ -541,7 +555,7 @@ class DBStructure
|
||||||
* @return string Empty string if the update is successful, error messages otherwise
|
* @return string Empty string if the update is successful, error messages otherwise
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
private static function update($basePath, $verbose, $action, $install = false, array $tables = null, array $definition = null)
|
private static function update(string $basePath, bool $verbose, bool $action, bool $install = false, array $tables = null, array $definition = null): string
|
||||||
{
|
{
|
||||||
$in_maintenance_mode = DI::config()->get('system', 'maintenance');
|
$in_maintenance_mode = DI::config()->get('system', 'maintenance');
|
||||||
|
|
||||||
|
|
@ -606,15 +620,15 @@ class DBStructure
|
||||||
* or the definition differ from current status
|
* or the definition differ from current status
|
||||||
* and index name doesn't start with "local_"
|
* and index name doesn't start with "local_"
|
||||||
*/
|
*/
|
||||||
foreach ($database[$name]["indexes"] as $indexname => $fieldnames) {
|
foreach ($database[$name]["indexes"] as $indexName => $fieldNames) {
|
||||||
$current_index_definition = implode(",", $fieldnames);
|
$current_index_definition = implode(",", $fieldNames);
|
||||||
if (isset($structure["indexes"][$indexname])) {
|
if (isset($structure["indexes"][$indexName])) {
|
||||||
$new_index_definition = implode(",", $structure["indexes"][$indexname]);
|
$new_index_definition = implode(",", $structure["indexes"][$indexName]);
|
||||||
} else {
|
} else {
|
||||||
$new_index_definition = "__NOT_SET__";
|
$new_index_definition = "__NOT_SET__";
|
||||||
}
|
}
|
||||||
if ($current_index_definition != $new_index_definition && substr($indexname, 0, 6) != 'local_') {
|
if ($current_index_definition != $new_index_definition && substr($indexName, 0, 6) != 'local_') {
|
||||||
$sql2 = self::dropIndex($indexname);
|
$sql2 = self::dropIndex($indexName);
|
||||||
if ($sql3 == "") {
|
if ($sql3 == "") {
|
||||||
$sql3 = "ALTER" . $ignore . " TABLE `" . $name . "` " . $sql2;
|
$sql3 = "ALTER" . $ignore . " TABLE `" . $name . "` " . $sql2;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -623,9 +637,9 @@ class DBStructure
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Compare the field structure field by field
|
// Compare the field structure field by field
|
||||||
foreach ($structure["fields"] as $fieldname => $parameters) {
|
foreach ($structure["fields"] as $fieldName => $parameters) {
|
||||||
if (!isset($database[$name]["fields"][$fieldname])) {
|
if (!isset($database[$name]["fields"][$fieldName])) {
|
||||||
$sql2 = self::addTableField($fieldname, $parameters);
|
$sql2 = self::addTableField($fieldName, $parameters);
|
||||||
if ($sql3 == "") {
|
if ($sql3 == "") {
|
||||||
$sql3 = "ALTER" . $ignore . " TABLE `" . $name . "` " . $sql2;
|
$sql3 = "ALTER" . $ignore . " TABLE `" . $name . "` " . $sql2;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -633,7 +647,7 @@ class DBStructure
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Compare the field definition
|
// Compare the field definition
|
||||||
$field_definition = $database[$name]["fields"][$fieldname];
|
$field_definition = $database[$name]["fields"][$fieldName];
|
||||||
|
|
||||||
// Remove the relation data that is used for the referential integrity
|
// Remove the relation data that is used for the referential integrity
|
||||||
unset($parameters['relation']);
|
unset($parameters['relation']);
|
||||||
|
|
@ -653,7 +667,7 @@ class DBStructure
|
||||||
$current_field_definition = DBA::cleanQuery(implode(",", $field_definition));
|
$current_field_definition = DBA::cleanQuery(implode(",", $field_definition));
|
||||||
$new_field_definition = DBA::cleanQuery(implode(",", $parameters));
|
$new_field_definition = DBA::cleanQuery(implode(",", $parameters));
|
||||||
if ($current_field_definition != $new_field_definition) {
|
if ($current_field_definition != $new_field_definition) {
|
||||||
$sql2 = self::modifyTableField($fieldname, $parameters);
|
$sql2 = self::modifyTableField($fieldName, $parameters);
|
||||||
if ($sql3 == "") {
|
if ($sql3 == "") {
|
||||||
$sql3 = "ALTER" . $ignore . " TABLE `" . $name . "` " . $sql2;
|
$sql3 = "ALTER" . $ignore . " TABLE `" . $name . "` " . $sql2;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -670,15 +684,15 @@ class DBStructure
|
||||||
* Don't create keys if table is new
|
* Don't create keys if table is new
|
||||||
*/
|
*/
|
||||||
if (!$is_new_table) {
|
if (!$is_new_table) {
|
||||||
foreach ($structure["indexes"] as $indexname => $fieldnames) {
|
foreach ($structure["indexes"] as $indexName => $fieldNames) {
|
||||||
if (isset($database[$name]["indexes"][$indexname])) {
|
if (isset($database[$name]["indexes"][$indexName])) {
|
||||||
$current_index_definition = implode(",", $database[$name]["indexes"][$indexname]);
|
$current_index_definition = implode(",", $database[$name]["indexes"][$indexName]);
|
||||||
} else {
|
} else {
|
||||||
$current_index_definition = "__NOT_SET__";
|
$current_index_definition = "__NOT_SET__";
|
||||||
}
|
}
|
||||||
$new_index_definition = implode(",", $fieldnames);
|
$new_index_definition = implode(",", $fieldNames);
|
||||||
if ($current_index_definition != $new_index_definition) {
|
if ($current_index_definition != $new_index_definition) {
|
||||||
$sql2 = self::createIndex($indexname, $fieldnames);
|
$sql2 = self::createIndex($indexName, $fieldNames);
|
||||||
|
|
||||||
if ($sql2 != "") {
|
if ($sql2 != "") {
|
||||||
if ($sql3 == "") {
|
if ($sql3 == "") {
|
||||||
|
|
@ -694,17 +708,17 @@ class DBStructure
|
||||||
|
|
||||||
// Foreign keys
|
// Foreign keys
|
||||||
// Compare the field structure field by field
|
// Compare the field structure field by field
|
||||||
foreach ($structure["fields"] as $fieldname => $parameters) {
|
foreach ($structure["fields"] as $fieldName => $parameters) {
|
||||||
if (empty($parameters['foreign'])) {
|
if (empty($parameters['foreign'])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$constraint = self::getConstraintName($name, $fieldname, $parameters);
|
$constraint = self::getConstraintName($name, $fieldName, $parameters);
|
||||||
|
|
||||||
unset($existing_foreign_keys[$constraint]);
|
unset($existing_foreign_keys[$constraint]);
|
||||||
|
|
||||||
if (empty($database[$name]['foreign_keys'][$constraint])) {
|
if (empty($database[$name]['foreign_keys'][$constraint])) {
|
||||||
$sql2 = self::addForeignKey($name, $fieldname, $parameters);
|
$sql2 = self::addForeignKey($name, $fieldName, $parameters);
|
||||||
|
|
||||||
if ($sql3 == "") {
|
if ($sql3 == "") {
|
||||||
$sql3 = "ALTER" . $ignore . " TABLE `" . $name . "` " . $sql2;
|
$sql3 = "ALTER" . $ignore . " TABLE `" . $name . "` " . $sql2;
|
||||||
|
|
@ -767,9 +781,9 @@ class DBStructure
|
||||||
|
|
||||||
// Now have a look at the field collations
|
// Now have a look at the field collations
|
||||||
// Compare the field structure field by field
|
// Compare the field structure field by field
|
||||||
foreach ($structure["fields"] as $fieldname => $parameters) {
|
foreach ($structure["fields"] as $fieldName => $parameters) {
|
||||||
// Compare the field definition
|
// Compare the field definition
|
||||||
$field_definition = ($database[$name]["fields"][$fieldname] ?? '') ?: ['Collation' => ''];
|
$field_definition = ($database[$name]["fields"][$fieldName] ?? '') ?: ['Collation' => ''];
|
||||||
|
|
||||||
// Define the default collation if not given
|
// Define the default collation if not given
|
||||||
if (!isset($parameters['Collation']) && !empty($field_definition['Collation'])) {
|
if (!isset($parameters['Collation']) && !empty($field_definition['Collation'])) {
|
||||||
|
|
@ -779,7 +793,7 @@ class DBStructure
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($field_definition['Collation'] != $parameters['Collation']) {
|
if ($field_definition['Collation'] != $parameters['Collation']) {
|
||||||
$sql2 = self::modifyTableField($fieldname, $parameters);
|
$sql2 = self::modifyTableField($fieldName, $parameters);
|
||||||
if (($sql3 == "") || (substr($sql3, -2, 2) == "; ")) {
|
if (($sql3 == "") || (substr($sql3, -2, 2) == "; ")) {
|
||||||
$sql3 .= "ALTER" . $ignore . " TABLE `" . $name . "` " . $sql2;
|
$sql3 .= "ALTER" . $ignore . " TABLE `" . $name . "` " . $sql2;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -826,7 +840,13 @@ class DBStructure
|
||||||
return $errors;
|
return $errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function tableStructure($table)
|
/**
|
||||||
|
* Returns an array with table structure information
|
||||||
|
*
|
||||||
|
* @param string $table Name of table
|
||||||
|
* @return array Table structure information
|
||||||
|
*/
|
||||||
|
private static function tableStructure(string $table): array
|
||||||
{
|
{
|
||||||
// This query doesn't seem to be executable as a prepared statement
|
// This query doesn't seem to be executable as a prepared statement
|
||||||
$indexes = DBA::toArray(DBA::p("SHOW INDEX FROM " . DBA::quoteIdentifier($table)));
|
$indexes = DBA::toArray(DBA::p("SHOW INDEX FROM " . DBA::quoteIdentifier($table)));
|
||||||
|
|
@ -909,41 +929,42 @@ class DBStructure
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ["fields" => $fielddata, "indexes" => $indexdata,
|
return [
|
||||||
"foreign_keys" => $foreigndata, "table_status" => $table_status];
|
'fields' => $fielddata,
|
||||||
|
'indexes' => $indexdata,
|
||||||
|
'foreign_keys' => $foreigndata,
|
||||||
|
'table_status' => $table_status
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function dropIndex($indexname)
|
private static function dropIndex(string $indexName): string
|
||||||
{
|
{
|
||||||
$sql = sprintf("DROP INDEX `%s`", DBA::escape($indexname));
|
return sprintf("DROP INDEX `%s`", DBA::escape($indexName));
|
||||||
return ($sql);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function addTableField($fieldname, $parameters)
|
private static function addTableField(string $fieldName, array $parameters): string
|
||||||
{
|
{
|
||||||
$sql = sprintf("ADD `%s` %s", DBA::escape($fieldname), self::FieldCommand($parameters));
|
return sprintf("ADD `%s` %s", DBA::escape($fieldName), self::FieldCommand($parameters));
|
||||||
return ($sql);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function modifyTableField($fieldname, $parameters)
|
private static function modifyTableField(string $fieldName, array $parameters): string
|
||||||
{
|
{
|
||||||
$sql = sprintf("MODIFY `%s` %s", DBA::escape($fieldname), self::FieldCommand($parameters, false));
|
return sprintf("MODIFY `%s` %s", DBA::escape($fieldName), self::FieldCommand($parameters, false));
|
||||||
return ($sql);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function getConstraintName(string $tablename, string $fieldname, array $parameters)
|
private static function getConstraintName(string $tableName, string $fieldName, array $parameters): string
|
||||||
{
|
{
|
||||||
$foreign_table = array_keys($parameters['foreign'])[0];
|
$foreign_table = array_keys($parameters['foreign'])[0];
|
||||||
$foreign_field = array_values($parameters['foreign'])[0];
|
$foreign_field = array_values($parameters['foreign'])[0];
|
||||||
|
|
||||||
return $tablename . "-" . $fieldname. "-" . $foreign_table. "-" . $foreign_field;
|
return $tableName . '-' . $fieldName. '-' . $foreign_table. '-' . $foreign_field;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function foreignCommand(string $tablename, string $fieldname, array $parameters) {
|
private static function foreignCommand(string $tableName, string $fieldName, array $parameters) {
|
||||||
$foreign_table = array_keys($parameters['foreign'])[0];
|
$foreign_table = array_keys($parameters['foreign'])[0];
|
||||||
$foreign_field = array_values($parameters['foreign'])[0];
|
$foreign_field = array_values($parameters['foreign'])[0];
|
||||||
|
|
||||||
$sql = "FOREIGN KEY (`" . $fieldname . "`) REFERENCES `" . $foreign_table . "` (`" . $foreign_field . "`)";
|
$sql = "FOREIGN KEY (`" . $fieldName . "`) REFERENCES `" . $foreign_table . "` (`" . $foreign_field . "`)";
|
||||||
|
|
||||||
if (!empty($parameters['foreign']['on update'])) {
|
if (!empty($parameters['foreign']['on update'])) {
|
||||||
$sql .= " ON UPDATE " . strtoupper($parameters['foreign']['on update']);
|
$sql .= " ON UPDATE " . strtoupper($parameters['foreign']['on update']);
|
||||||
|
|
@ -960,12 +981,12 @@ class DBStructure
|
||||||
return $sql;
|
return $sql;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function addForeignKey(string $tablename, string $fieldname, array $parameters)
|
private static function addForeignKey(string $tableName, string $fieldName, array $parameters): string
|
||||||
{
|
{
|
||||||
return sprintf("ADD %s", self::foreignCommand($tablename, $fieldname, $parameters));
|
return sprintf("ADD %s", self::foreignCommand($tableName, $fieldName, $parameters));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function dropForeignKey(string $constraint)
|
private static function dropForeignKey(string $constraint): string
|
||||||
{
|
{
|
||||||
return sprintf("DROP FOREIGN KEY `%s`", $constraint);
|
return sprintf("DROP FOREIGN KEY `%s`", $constraint);
|
||||||
}
|
}
|
||||||
|
|
@ -983,7 +1004,7 @@ class DBStructure
|
||||||
* @return boolean Was the renaming successful?
|
* @return boolean Was the renaming successful?
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function rename($table, $columns, $type = self::RENAME_COLUMN)
|
public static function rename(string $table, array $columns, int $type = self::RENAME_COLUMN): bool
|
||||||
{
|
{
|
||||||
if (empty($table) || empty($columns)) {
|
if (empty($table) || empty($columns)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -1019,7 +1040,7 @@ class DBStructure
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql .= ";";
|
$sql .= ';';
|
||||||
|
|
||||||
$stmt = DBA::p($sql);
|
$stmt = DBA::p($sql);
|
||||||
|
|
||||||
|
|
@ -1079,39 +1100,33 @@ class DBStructure
|
||||||
/**
|
/**
|
||||||
* Check if a foreign key exists for the given table field
|
* Check if a foreign key exists for the given table field
|
||||||
*
|
*
|
||||||
* @param string $table
|
* @param string $table Table name
|
||||||
* @param string $field
|
* @param string $field Field name
|
||||||
* @return boolean
|
* @return boolean Wether a foreign key exists
|
||||||
*/
|
*/
|
||||||
public static function existsForeignKeyForField(string $table, string $field)
|
public static function existsForeignKeyForField(string $table, string $field): bool
|
||||||
{
|
{
|
||||||
return DBA::exists(['INFORMATION_SCHEMA' => 'KEY_COLUMN_USAGE'],
|
return DBA::exists(['INFORMATION_SCHEMA' => 'KEY_COLUMN_USAGE'],
|
||||||
["`TABLE_SCHEMA` = ? AND `TABLE_NAME` = ? AND `COLUMN_NAME` = ? AND `REFERENCED_TABLE_SCHEMA` IS NOT NULL",
|
["`TABLE_SCHEMA` = ? AND `TABLE_NAME` = ? AND `COLUMN_NAME` = ? AND `REFERENCED_TABLE_SCHEMA` IS NOT NULL",
|
||||||
DBA::databaseName(), $table, $field]);
|
DBA::databaseName(), $table, $field]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if a table exists
|
* Check if a table exists
|
||||||
*
|
*
|
||||||
* @param string|array $table Table name
|
* @param string $table Single table name (please loop yourself)
|
||||||
*
|
|
||||||
* @return boolean Does the table exist?
|
* @return boolean Does the table exist?
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function existsTable($table)
|
public static function existsTable(string $table): bool
|
||||||
{
|
{
|
||||||
if (empty($table)) {
|
if (empty($table)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_array($table)) {
|
|
||||||
$condition = ['table_schema' => key($table), 'table_name' => current($table)];
|
|
||||||
} else {
|
|
||||||
$condition = ['table_schema' => DBA::databaseName(), 'table_name' => $table];
|
$condition = ['table_schema' => DBA::databaseName(), 'table_name' => $table];
|
||||||
}
|
|
||||||
|
|
||||||
$result = DBA::exists(['information_schema' => 'tables'], $condition);
|
return DBA::exists(['information_schema' => 'tables'], $condition);
|
||||||
|
|
||||||
return $result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1122,7 +1137,7 @@ class DBStructure
|
||||||
* @return array An array of the table columns
|
* @return array An array of the table columns
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function getColumns($table)
|
public static function getColumns(string $table): array
|
||||||
{
|
{
|
||||||
$stmtColumns = DBA::p("SHOW COLUMNS FROM `" . $table . "`");
|
$stmtColumns = DBA::p("SHOW COLUMNS FROM `" . $table . "`");
|
||||||
return DBA::toArray($stmtColumns);
|
return DBA::toArray($stmtColumns);
|
||||||
|
|
@ -1130,6 +1145,9 @@ class DBStructure
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if initial database values do exist - or create them
|
* Check if initial database values do exist - or create them
|
||||||
|
*
|
||||||
|
* @param bool $verbose Whether to output messages
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function checkInitialValues(bool $verbose = false)
|
public static function checkInitialValues(bool $verbose = false)
|
||||||
{
|
{
|
||||||
|
|
@ -1265,7 +1283,7 @@ class DBStructure
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
private static function isUpdating()
|
private static function isUpdating(): bool
|
||||||
{
|
{
|
||||||
$isUpdate = false;
|
$isUpdate = false;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -541,7 +541,7 @@ class Database
|
||||||
if (!$retval = $this->connection->query($this->replaceParameters($sql, $args))) {
|
if (!$retval = $this->connection->query($this->replaceParameters($sql, $args))) {
|
||||||
$errorInfo = $this->connection->errorInfo();
|
$errorInfo = $this->connection->errorInfo();
|
||||||
$this->error = $errorInfo[2];
|
$this->error = $errorInfo[2];
|
||||||
$this->errorno = $errorInfo[1];
|
$this->errorno = (int) $errorInfo[1];
|
||||||
$retval = false;
|
$retval = false;
|
||||||
$is_error = true;
|
$is_error = true;
|
||||||
break;
|
break;
|
||||||
|
|
@ -554,7 +554,7 @@ class Database
|
||||||
if (!$stmt = $this->connection->prepare($sql)) {
|
if (!$stmt = $this->connection->prepare($sql)) {
|
||||||
$errorInfo = $this->connection->errorInfo();
|
$errorInfo = $this->connection->errorInfo();
|
||||||
$this->error = $errorInfo[2];
|
$this->error = $errorInfo[2];
|
||||||
$this->errorno = $errorInfo[1];
|
$this->errorno = (int) $errorInfo[1];
|
||||||
$retval = false;
|
$retval = false;
|
||||||
$is_error = true;
|
$is_error = true;
|
||||||
break;
|
break;
|
||||||
|
|
@ -574,7 +574,7 @@ class Database
|
||||||
if (!$stmt->execute()) {
|
if (!$stmt->execute()) {
|
||||||
$errorInfo = $stmt->errorInfo();
|
$errorInfo = $stmt->errorInfo();
|
||||||
$this->error = $errorInfo[2];
|
$this->error = $errorInfo[2];
|
||||||
$this->errorno = $errorInfo[1];
|
$this->errorno = (int) $errorInfo[1];
|
||||||
$retval = false;
|
$retval = false;
|
||||||
$is_error = true;
|
$is_error = true;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -709,7 +709,7 @@ class Database
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->error = $error;
|
$this->error = $error;
|
||||||
$this->errorno = $errorno;
|
$this->errorno = (int) $errorno;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->profiler->stopRecording();
|
$this->profiler->stopRecording();
|
||||||
|
|
@ -1541,7 +1541,7 @@ class Database
|
||||||
*
|
*
|
||||||
* @return array Data array
|
* @return array Data array
|
||||||
*/
|
*/
|
||||||
public function toArray($stmt, $do_close = true, int $count = 0)
|
public function toArray($stmt, bool $do_close = true, int $count = 0): array
|
||||||
{
|
{
|
||||||
if (is_bool($stmt)) {
|
if (is_bool($stmt)) {
|
||||||
return [];
|
return [];
|
||||||
|
|
@ -1632,7 +1632,7 @@ class Database
|
||||||
*
|
*
|
||||||
* @return string Error number (0 if no error)
|
* @return string Error number (0 if no error)
|
||||||
*/
|
*/
|
||||||
public function errorNo()
|
public function errorNo(): int
|
||||||
{
|
{
|
||||||
return $this->errorno;
|
return $this->errorno;
|
||||||
}
|
}
|
||||||
|
|
@ -1654,7 +1654,7 @@ class Database
|
||||||
*
|
*
|
||||||
* @return boolean was the close successful?
|
* @return boolean was the close successful?
|
||||||
*/
|
*/
|
||||||
public function close($stmt)
|
public function close($stmt): bool
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->profiler->startRecording('database');
|
$this->profiler->startRecording('database');
|
||||||
|
|
@ -1696,7 +1696,7 @@ class Database
|
||||||
* 'amount' => Number of concurrent database processes
|
* 'amount' => Number of concurrent database processes
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function processlist()
|
public function processlist(): array
|
||||||
{
|
{
|
||||||
$ret = $this->p("SHOW PROCESSLIST");
|
$ret = $this->p("SHOW PROCESSLIST");
|
||||||
$data = $this->toArray($ret);
|
$data = $this->toArray($ret);
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,7 @@ class PostUpdate
|
||||||
}
|
}
|
||||||
|
|
||||||
$max_item_delivery_data = DBA::selectFirst('item-delivery-data', ['iid'], ['queue_count > 0 OR queue_done > 0'], ['order' => ['iid']]);
|
$max_item_delivery_data = DBA::selectFirst('item-delivery-data', ['iid'], ['queue_count > 0 OR queue_done > 0'], ['order' => ['iid']]);
|
||||||
$max_iid = $max_item_delivery_data['iid'];
|
$max_iid = $max_item_delivery_data['iid'] ?? 0;
|
||||||
|
|
||||||
Logger::info('Start update1297 with max iid: ' . $max_iid);
|
Logger::info('Start update1297 with max iid: ' . $max_iid);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ class Account extends BaseFactory
|
||||||
* @throws HTTPException\InternalServerErrorException
|
* @throws HTTPException\InternalServerErrorException
|
||||||
* @throws ImagickException|HTTPException\NotFoundException
|
* @throws ImagickException|HTTPException\NotFoundException
|
||||||
*/
|
*/
|
||||||
public function createFromContactId(int $contactId, $uid = 0): \Friendica\Object\Api\Mastodon\Account
|
public function createFromContactId(int $contactId, int $uid = 0): \Friendica\Object\Api\Mastodon\Account
|
||||||
{
|
{
|
||||||
$contact = Contact::getById($contactId, ['uri-id']);
|
$contact = Contact::getById($contactId, ['uri-id']);
|
||||||
if (empty($contact)) {
|
if (empty($contact)) {
|
||||||
|
|
@ -74,7 +74,7 @@ class Account extends BaseFactory
|
||||||
* @throws HTTPException\InternalServerErrorException
|
* @throws HTTPException\InternalServerErrorException
|
||||||
* @throws ImagickException|HTTPException\NotFoundException
|
* @throws ImagickException|HTTPException\NotFoundException
|
||||||
*/
|
*/
|
||||||
public function createFromUriId(int $contactUriId, $uid = 0): \Friendica\Object\Api\Mastodon\Account
|
public function createFromUriId(int $contactUriId, int $uid = 0): \Friendica\Object\Api\Mastodon\Account
|
||||||
{
|
{
|
||||||
$account = DBA::selectFirst('account-user-view', [], ['uri-id' => $contactUriId, 'uid' => [0, $uid]], ['order' => ['id' => true]]);
|
$account = DBA::selectFirst('account-user-view', [], ['uri-id' => $contactUriId, 'uid' => [0, $uid]], ['order' => ['id' => true]]);
|
||||||
if (empty($account)) {
|
if (empty($account)) {
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,7 @@ class Status extends BaseFactory
|
||||||
/**
|
/**
|
||||||
* @param int $uriId Uri-ID of the item
|
* @param int $uriId Uri-ID of the item
|
||||||
* @param int $uid Item user
|
* @param int $uid Item user
|
||||||
|
* @param bool $include_entities Whether to include entities
|
||||||
*
|
*
|
||||||
* @return \Friendica\Object\Api\Twitter\Status
|
* @return \Friendica\Object\Api\Twitter\Status
|
||||||
* @throws HTTPException\InternalServerErrorException
|
* @throws HTTPException\InternalServerErrorException
|
||||||
|
|
@ -90,12 +91,13 @@ class Status extends BaseFactory
|
||||||
/**
|
/**
|
||||||
* @param int $uriId Uri-ID of the item
|
* @param int $uriId Uri-ID of the item
|
||||||
* @param int $uid Item user
|
* @param int $uid Item user
|
||||||
|
* @param bool $include_entities Whether to include entities
|
||||||
*
|
*
|
||||||
* @return \Friendica\Object\Api\Twitter\Status
|
* @return \Friendica\Object\Api\Twitter\Status
|
||||||
* @throws HTTPException\InternalServerErrorException
|
* @throws HTTPException\InternalServerErrorException
|
||||||
* @throws ImagickException|HTTPException\NotFoundException
|
* @throws ImagickException|HTTPException\NotFoundException
|
||||||
*/
|
*/
|
||||||
public function createFromUriId(int $uriId, $uid = 0, $include_entities = false): \Friendica\Object\Api\Twitter\Status
|
public function createFromUriId(int $uriId, int $uid = 0, bool $include_entities = false): \Friendica\Object\Api\Twitter\Status
|
||||||
{
|
{
|
||||||
$fields = ['parent-uri-id', 'uri-id', 'uid', 'author-id', 'author-link', 'author-network', 'owner-id', 'causer-id',
|
$fields = ['parent-uri-id', 'uri-id', 'uid', 'author-id', 'author-link', 'author-network', 'owner-id', 'causer-id',
|
||||||
'starred', 'app', 'title', 'body', 'raw-body', 'created', 'network','post-reason', 'language', 'gravity',
|
'starred', 'app', 'title', 'body', 'raw-body', 'created', 'network','post-reason', 'language', 'gravity',
|
||||||
|
|
@ -110,6 +112,7 @@ class Status extends BaseFactory
|
||||||
/**
|
/**
|
||||||
* @param array $item item array
|
* @param array $item item array
|
||||||
* @param int $uid Item user
|
* @param int $uid Item user
|
||||||
|
* @param bool $include_entities Whether to include entities
|
||||||
*
|
*
|
||||||
* @return \Friendica\Object\Api\Twitter\Status
|
* @return \Friendica\Object\Api\Twitter\Status
|
||||||
* @throws HTTPException\InternalServerErrorException
|
* @throws HTTPException\InternalServerErrorException
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ class User extends BaseFactory
|
||||||
* @throws HTTPException\InternalServerErrorException
|
* @throws HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public function createFromContactId(int $contactId, $uid = 0, $skip_status = true, $include_user_entities = true)
|
public function createFromContactId(int $contactId, int $uid = 0, bool $skip_status = true, bool $include_user_entities = true)
|
||||||
{
|
{
|
||||||
$cdata = Contact::getPublicAndUserContactID($contactId, $uid);
|
$cdata = Contact::getPublicAndUserContactID($contactId, $uid);
|
||||||
if (!empty($cdata)) {
|
if (!empty($cdata)) {
|
||||||
|
|
@ -78,7 +78,7 @@ class User extends BaseFactory
|
||||||
return new \Friendica\Object\Api\Twitter\User($publicContact, $apcontact, $userContact, $status, $include_user_entities);
|
return new \Friendica\Object\Api\Twitter\User($publicContact, $apcontact, $userContact, $status, $include_user_entities);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createFromUserId(int $uid, $skip_status = true, $include_user_entities = true)
|
public function createFromUserId(int $uid, bool $skip_status = true, bool $include_user_entities = true)
|
||||||
{
|
{
|
||||||
return $this->createFromContactId(Contact::getPublicIdByUserId($uid), $uid, $skip_status, $include_user_entities);
|
return $this->createFromContactId(Contact::getPublicIdByUserId($uid), $uid, $skip_status, $include_user_entities);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ class LegacyModule extends BaseModule
|
||||||
* @param string $file_path
|
* @param string $file_path
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private function setModuleFile($file_path)
|
private function setModuleFile(string $file_path)
|
||||||
{
|
{
|
||||||
if (!is_readable($file_path)) {
|
if (!is_readable($file_path)) {
|
||||||
throw new \Exception(DI::l10n()->t('Legacy module file not found: %s', $file_path));
|
throw new \Exception(DI::l10n()->t('Legacy module file not found: %s', $file_path));
|
||||||
|
|
@ -87,7 +87,7 @@ class LegacyModule extends BaseModule
|
||||||
* @return string
|
* @return string
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private function runModuleFunction(string $function_suffix)
|
private function runModuleFunction(string $function_suffix): string
|
||||||
{
|
{
|
||||||
$function_name = $this->moduleName . '_' . $function_suffix;
|
$function_name = $this->moduleName . '_' . $function_suffix;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ class APContact
|
||||||
* @param string $addr Address
|
* @param string $addr Address
|
||||||
* @return array webfinger data
|
* @return array webfinger data
|
||||||
*/
|
*/
|
||||||
private static function fetchWebfingerData(string $addr)
|
private static function fetchWebfingerData(string $addr): array
|
||||||
{
|
{
|
||||||
$addr_parts = explode('@', $addr);
|
$addr_parts = explode('@', $addr);
|
||||||
if (count($addr_parts) != 2) {
|
if (count($addr_parts) != 2) {
|
||||||
|
|
@ -117,14 +117,14 @@ class APContact
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function getByURL($url, $update = null)
|
public static function getByURL(string $url, $update = null): array
|
||||||
{
|
{
|
||||||
if (empty($url) || Network::isUrlBlocked($url)) {
|
if (empty($url) || Network::isUrlBlocked($url)) {
|
||||||
Logger::info('Domain is blocked', ['url' => $url]);
|
Logger::info('Domain is blocked', ['url' => $url]);
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$fetched_contact = false;
|
$fetched_contact = [];
|
||||||
|
|
||||||
if (empty($update)) {
|
if (empty($update)) {
|
||||||
if (is_null($update)) {
|
if (is_null($update)) {
|
||||||
|
|
@ -220,14 +220,14 @@ class APContact
|
||||||
$apcontact['type'] = str_replace('as:', '', JsonLD::fetchElement($compacted, '@type'));
|
$apcontact['type'] = str_replace('as:', '', JsonLD::fetchElement($compacted, '@type'));
|
||||||
$apcontact['following'] = JsonLD::fetchElement($compacted, 'as:following', '@id');
|
$apcontact['following'] = JsonLD::fetchElement($compacted, 'as:following', '@id');
|
||||||
$apcontact['followers'] = JsonLD::fetchElement($compacted, 'as:followers', '@id');
|
$apcontact['followers'] = JsonLD::fetchElement($compacted, 'as:followers', '@id');
|
||||||
$apcontact['inbox'] = JsonLD::fetchElement($compacted, 'ldp:inbox', '@id');
|
$apcontact['inbox'] = (JsonLD::fetchElement($compacted, 'ldp:inbox', '@id') ?? '');
|
||||||
self::unarchiveInbox($apcontact['inbox'], false);
|
self::unarchiveInbox($apcontact['inbox'], false);
|
||||||
|
|
||||||
$apcontact['outbox'] = JsonLD::fetchElement($compacted, 'as:outbox', '@id');
|
$apcontact['outbox'] = JsonLD::fetchElement($compacted, 'as:outbox', '@id');
|
||||||
|
|
||||||
$apcontact['sharedinbox'] = '';
|
$apcontact['sharedinbox'] = '';
|
||||||
if (!empty($compacted['as:endpoints'])) {
|
if (!empty($compacted['as:endpoints'])) {
|
||||||
$apcontact['sharedinbox'] = JsonLD::fetchElement($compacted['as:endpoints'], 'as:sharedInbox', '@id');
|
$apcontact['sharedinbox'] = (JsonLD::fetchElement($compacted['as:endpoints'], 'as:sharedInbox', '@id') ?? '');
|
||||||
self::unarchiveInbox($apcontact['sharedinbox'], true);
|
self::unarchiveInbox($apcontact['sharedinbox'], true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -241,9 +241,10 @@ class APContact
|
||||||
$apcontact['name'] = $apcontact['nick'];
|
$apcontact['name'] = $apcontact['nick'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$apcontact['about'] = HTML::toBBCode(JsonLD::fetchElement($compacted, 'as:summary', '@value'));
|
$apcontact['about'] = HTML::toBBCode(JsonLD::fetchElement($compacted, 'as:summary', '@value') ?? '');
|
||||||
|
|
||||||
$ims = JsonLD::fetchElementArray($compacted, 'vcard:hasInstantMessage');
|
$ims = JsonLD::fetchElementArray($compacted, 'vcard:hasInstantMessage');
|
||||||
|
|
||||||
if (!empty($ims)) {
|
if (!empty($ims)) {
|
||||||
foreach ($ims as $link) {
|
foreach ($ims as $link) {
|
||||||
if (substr($link, 0, 5) == 'xmpp:') {
|
if (substr($link, 0, 5) == 'xmpp:') {
|
||||||
|
|
@ -525,8 +526,9 @@ class APContact
|
||||||
*
|
*
|
||||||
* @param string $url inbox url
|
* @param string $url inbox url
|
||||||
* @param boolean $shared Shared Inbox
|
* @param boolean $shared Shared Inbox
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
private static function unarchiveInbox($url, $shared)
|
private static function unarchiveInbox(string $url, bool $shared)
|
||||||
{
|
{
|
||||||
if (empty($url)) {
|
if (empty($url)) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ class Attach
|
||||||
* @return array field list
|
* @return array field list
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function getFields()
|
private static function getFields(): array
|
||||||
{
|
{
|
||||||
$allfields = DBStructure::definition(DI::app()->getBasePath(), false);
|
$allfields = DBStructure::definition(DI::app()->getBasePath(), false);
|
||||||
$fields = array_keys($allfields['attach']['fields']);
|
$fields = array_keys($allfields['attach']['fields']);
|
||||||
|
|
@ -59,7 +59,7 @@ class Attach
|
||||||
* @param array $conditions Array of fields for conditions
|
* @param array $conditions Array of fields for conditions
|
||||||
* @param array $params Array of several parameters
|
* @param array $params Array of several parameters
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array|bool
|
||||||
*
|
*
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
* @see \Friendica\Database\DBA::selectToArray
|
* @see \Friendica\Database\DBA::selectToArray
|
||||||
|
|
@ -102,7 +102,7 @@ class Attach
|
||||||
* @return boolean
|
* @return boolean
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function exists(array $conditions)
|
public static function exists(array $conditions): bool
|
||||||
{
|
{
|
||||||
return DBA::exists('attach', $conditions);
|
return DBA::exists('attach', $conditions);
|
||||||
}
|
}
|
||||||
|
|
@ -117,7 +117,7 @@ class Attach
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
* @see \Friendica\Database\DBA::select
|
* @see \Friendica\Database\DBA::select
|
||||||
*/
|
*/
|
||||||
public static function getById($id)
|
public static function getById(int $id)
|
||||||
{
|
{
|
||||||
return self::selectFirst([], ['id' => $id]);
|
return self::selectFirst([], ['id' => $id]);
|
||||||
}
|
}
|
||||||
|
|
@ -132,7 +132,7 @@ class Attach
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
* @see \Friendica\Database\DBA::select
|
* @see \Friendica\Database\DBA::select
|
||||||
*/
|
*/
|
||||||
public static function getByIdWithPermission($id)
|
public static function getByIdWithPermission(int $id)
|
||||||
{
|
{
|
||||||
$r = self::selectFirst(['uid'], ['id' => $id]);
|
$r = self::selectFirst(['uid'], ['id' => $id]);
|
||||||
if ($r === false) {
|
if ($r === false) {
|
||||||
|
|
@ -156,10 +156,10 @@ class Attach
|
||||||
*
|
*
|
||||||
* @param array $item Attachment data. Needs at least 'id', 'backend-class', 'backend-ref'
|
* @param array $item Attachment data. Needs at least 'id', 'backend-class', 'backend-ref'
|
||||||
*
|
*
|
||||||
* @return string file data
|
* @return string|null file data or null on failure
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function getData($item)
|
public static function getData(array $item)
|
||||||
{
|
{
|
||||||
if (!empty($item['data'])) {
|
if (!empty($item['data'])) {
|
||||||
return $item['data'];
|
return $item['data'];
|
||||||
|
|
@ -195,10 +195,10 @@ class Attach
|
||||||
* @param string $deny_cid Permissions, denied contacts.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 greoup.optional, default = ''
|
||||||
*
|
*
|
||||||
* @return boolean/integer Row id on success, False on errors
|
* @return boolean|integer Row id on success, False on errors
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function store($data, $uid, $filename, $filetype = '' , $filesize = null, $allow_cid = '', $allow_gid = '', $deny_cid = '', $deny_gid = '')
|
public static function store(string $data, int $uid, string $filename, string $filetype = '' , int $filesize = null, string $allow_cid = '', string $allow_gid = '', string $deny_cid = '', string $deny_gid = '')
|
||||||
{
|
{
|
||||||
if ($filetype === '') {
|
if ($filetype === '') {
|
||||||
$filetype = Mimetype::getContentType($filename);
|
$filetype = Mimetype::getContentType($filename);
|
||||||
|
|
@ -241,17 +241,17 @@ class Attach
|
||||||
/**
|
/**
|
||||||
* Store new file metadata in db and binary in default backend from existing file
|
* Store new file metadata in db and binary in default backend from existing file
|
||||||
*
|
*
|
||||||
* @param $src
|
* @param string $src Source file name
|
||||||
* @param $uid
|
* @param int $uid User id
|
||||||
* @param string $filename
|
* @param string $filename Optional file name
|
||||||
* @param string $allow_cid
|
* @param string $allow_cid
|
||||||
* @param string $allow_gid
|
* @param string $allow_gid
|
||||||
* @param string $deny_cid
|
* @param string $deny_cid
|
||||||
* @param string $deny_gid
|
* @param string $deny_gid
|
||||||
* @return boolean True on success
|
* @return boolean|int Insert id or false on failure
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function storeFile($src, $uid, $filename = '', $allow_cid = '', $allow_gid = '', $deny_cid = '', $deny_gid = '')
|
public static function storeFile(string $src, int $uid, string $filename = '', string $allow_cid = '', string $allow_gid = '', string $deny_cid = '', string $deny_gid = '')
|
||||||
{
|
{
|
||||||
if ($filename === '') {
|
if ($filename === '') {
|
||||||
$filename = basename($src);
|
$filename = basename($src);
|
||||||
|
|
@ -276,7 +276,7 @@ class Attach
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @see \Friendica\Database\DBA::update
|
* @see \Friendica\Database\DBA::update
|
||||||
*/
|
*/
|
||||||
public static function update($fields, $conditions, Image $img = null, array $old_fields = [])
|
public static function update(array $fields, array $conditions, Image $img = null, array $old_fields = []): bool
|
||||||
{
|
{
|
||||||
if (!is_null($img)) {
|
if (!is_null($img)) {
|
||||||
// get items to update
|
// get items to update
|
||||||
|
|
@ -311,7 +311,7 @@ class Attach
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
* @see \Friendica\Database\DBA::delete
|
* @see \Friendica\Database\DBA::delete
|
||||||
*/
|
*/
|
||||||
public static function delete(array $conditions, array $options = [])
|
public static function delete(array $conditions, array $options = []): bool
|
||||||
{
|
{
|
||||||
// get items to delete data info
|
// get items to delete data info
|
||||||
$items = self::selectToArray(['backend-class','backend-ref'], $conditions);
|
$items = self::selectToArray(['backend-class','backend-ref'], $conditions);
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@ class Contact
|
||||||
* @return array
|
* @return array
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function selectToArray(array $fields = [], array $condition = [], array $params = [])
|
public static function selectToArray(array $fields = [], array $condition = [], array $params = []): array
|
||||||
{
|
{
|
||||||
return DBA::selectToArray('contact', $fields, $condition, $params);
|
return DBA::selectToArray('contact', $fields, $condition, $params);
|
||||||
}
|
}
|
||||||
|
|
@ -128,7 +128,7 @@ class Contact
|
||||||
* @param array $fields Array of selected fields, empty for all
|
* @param array $fields Array of selected fields, empty for all
|
||||||
* @param array $condition Array of fields for condition
|
* @param array $condition Array of fields for condition
|
||||||
* @param array $params Array of several parameters
|
* @param array $params Array of several parameters
|
||||||
* @return array
|
* @return array|bool
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function selectFirst(array $fields = [], array $condition = [], array $params = [])
|
public static function selectFirst(array $fields = [], array $condition = [], array $params = [])
|
||||||
|
|
@ -148,7 +148,7 @@ class Contact
|
||||||
* @return int id of the created contact
|
* @return int id of the created contact
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function insert(array $fields, int $duplicate_mode = Database::INSERT_DEFAULT)
|
public static function insert(array $fields, int $duplicate_mode = Database::INSERT_DEFAULT): int
|
||||||
{
|
{
|
||||||
if (!empty($fields['baseurl']) && empty($fields['gsid'])) {
|
if (!empty($fields['baseurl']) && empty($fields['gsid'])) {
|
||||||
$fields['gsid'] = GServer::getID($fields['baseurl'], true);
|
$fields['gsid'] = GServer::getID($fields['baseurl'], true);
|
||||||
|
|
@ -187,6 +187,7 @@ class Contact
|
||||||
*
|
*
|
||||||
* @return boolean was the update successfull?
|
* @return boolean was the update successfull?
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
|
* @todo Let's get rid of boolean type of $old_fields
|
||||||
*/
|
*/
|
||||||
public static function update(array $fields, array $condition, $old_fields = [])
|
public static function update(array $fields, array $condition, $old_fields = [])
|
||||||
{
|
{
|
||||||
|
|
@ -204,7 +205,7 @@ class Contact
|
||||||
* @return array|boolean Contact record if it exists, false otherwise
|
* @return array|boolean Contact record if it exists, false otherwise
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function getById($id, $fields = [])
|
public static function getById(int $id, array $fields = [])
|
||||||
{
|
{
|
||||||
return DBA::selectFirst('contact', $fields, ['id' => $id]);
|
return DBA::selectFirst('contact', $fields, ['id' => $id]);
|
||||||
}
|
}
|
||||||
|
|
@ -217,7 +218,7 @@ class Contact
|
||||||
* @return array|boolean Contact record if it exists, false otherwise
|
* @return array|boolean Contact record if it exists, false otherwise
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function getByUriId($uri_id, $fields = [])
|
public static function getByUriId(int $uri_id, array $fields = [])
|
||||||
{
|
{
|
||||||
return DBA::selectFirst('contact', $fields, ['uri-id' => $uri_id], ['order' => ['uid']]);
|
return DBA::selectFirst('contact', $fields, ['uri-id' => $uri_id], ['order' => ['uid']]);
|
||||||
}
|
}
|
||||||
|
|
@ -231,7 +232,7 @@ class Contact
|
||||||
* @param integer $uid User ID of the contact
|
* @param integer $uid User ID of the contact
|
||||||
* @return array contact array
|
* @return array contact array
|
||||||
*/
|
*/
|
||||||
public static function getByURL(string $url, $update = null, array $fields = [], int $uid = 0)
|
public static function getByURL(string $url, $update = null, array $fields = [], int $uid = 0): array
|
||||||
{
|
{
|
||||||
if ($update || is_null($update)) {
|
if ($update || is_null($update)) {
|
||||||
$cid = self::getIdForURL($url, $uid, $update);
|
$cid = self::getIdForURL($url, $uid, $update);
|
||||||
|
|
@ -302,7 +303,7 @@ class Contact
|
||||||
* @param array $fields Field list
|
* @param array $fields Field list
|
||||||
* @return array contact array
|
* @return array contact array
|
||||||
*/
|
*/
|
||||||
public static function getByURLForUser(string $url, int $uid = 0, $update = false, array $fields = [])
|
public static function getByURLForUser(string $url, int $uid = 0, $update = false, array $fields = []): array
|
||||||
{
|
{
|
||||||
if ($uid != 0) {
|
if ($uid != 0) {
|
||||||
$contact = self::getByURL($url, $update, $fields, $uid);
|
$contact = self::getByURL($url, $update, $fields, $uid);
|
||||||
|
|
@ -333,7 +334,7 @@ class Contact
|
||||||
* @throws HTTPException\InternalServerErrorException
|
* @throws HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function isFollower($cid, $uid)
|
public static function isFollower(int $cid, int $uid): bool
|
||||||
{
|
{
|
||||||
if (Contact\User::isBlocked($cid, $uid)) {
|
if (Contact\User::isBlocked($cid, $uid)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -358,7 +359,7 @@ class Contact
|
||||||
* @throws HTTPException\InternalServerErrorException
|
* @throws HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function isFollowerByURL($url, $uid)
|
public static function isFollowerByURL(string $url, uid $uid): bool
|
||||||
{
|
{
|
||||||
$cid = self::getIdForURL($url, $uid);
|
$cid = self::getIdForURL($url, $uid);
|
||||||
|
|
||||||
|
|
@ -370,16 +371,16 @@ class Contact
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests if the given user follow the given contact
|
* Tests if the given user shares with the given contact
|
||||||
*
|
*
|
||||||
* @param int $cid Either public contact id or user's contact id
|
* @param int $cid Either public contact id or user's contact id
|
||||||
* @param int $uid User ID
|
* @param int $uid User ID
|
||||||
*
|
*
|
||||||
* @return boolean is the contact url being followed?
|
* @return boolean is the contact sharing with given user?
|
||||||
* @throws HTTPException\InternalServerErrorException
|
* @throws HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function isSharing($cid, $uid)
|
public static function isSharing(int $cid, int $uid): bool
|
||||||
{
|
{
|
||||||
if (Contact\User::isBlocked($cid, $uid)) {
|
if (Contact\User::isBlocked($cid, $uid)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -404,7 +405,7 @@ class Contact
|
||||||
* @throws HTTPException\InternalServerErrorException
|
* @throws HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function isSharingByURL($url, $uid)
|
public static function isSharingByURL(string $url, int $uid): bool
|
||||||
{
|
{
|
||||||
$cid = self::getIdForURL($url, $uid);
|
$cid = self::getIdForURL($url, $uid);
|
||||||
|
|
||||||
|
|
@ -425,7 +426,7 @@ class Contact
|
||||||
* @throws HTTPException\InternalServerErrorException
|
* @throws HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function getBasepath($url, $dont_update = false)
|
public static function getBasepath(string $url, bool $dont_update = false): string
|
||||||
{
|
{
|
||||||
$contact = DBA::selectFirst('contact', ['id', 'baseurl'], ['uid' => 0, 'nurl' => Strings::normaliseLink($url)]);
|
$contact = DBA::selectFirst('contact', ['id', 'baseurl'], ['uid' => 0, 'nurl' => Strings::normaliseLink($url)]);
|
||||||
if (!DBA::isResult($contact)) {
|
if (!DBA::isResult($contact)) {
|
||||||
|
|
@ -459,7 +460,7 @@ class Contact
|
||||||
*
|
*
|
||||||
* @return boolean Is it the same server?
|
* @return boolean Is it the same server?
|
||||||
*/
|
*/
|
||||||
public static function isLocal($url)
|
public static function isLocal(string $url): bool
|
||||||
{
|
{
|
||||||
if (!parse_url($url, PHP_URL_SCHEME)) {
|
if (!parse_url($url, PHP_URL_SCHEME)) {
|
||||||
$addr_parts = explode('@', $url);
|
$addr_parts = explode('@', $url);
|
||||||
|
|
@ -476,7 +477,7 @@ class Contact
|
||||||
*
|
*
|
||||||
* @return boolean Is it the same server?
|
* @return boolean Is it the same server?
|
||||||
*/
|
*/
|
||||||
public static function isLocalById(int $cid)
|
public static function isLocalById(int $cid): bool
|
||||||
{
|
{
|
||||||
$contact = DBA::selectFirst('contact', ['url', 'baseurl'], ['id' => $cid]);
|
$contact = DBA::selectFirst('contact', ['url', 'baseurl'], ['id' => $cid]);
|
||||||
if (!DBA::isResult($contact)) {
|
if (!DBA::isResult($contact)) {
|
||||||
|
|
@ -500,7 +501,7 @@ class Contact
|
||||||
* @return integer|boolean Public contact id for given user id
|
* @return integer|boolean Public contact id for given user id
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function getPublicIdByUserId($uid)
|
public static function getPublicIdByUserId(int $uid)
|
||||||
{
|
{
|
||||||
$self = DBA::selectFirst('contact', ['url'], ['self' => true, 'uid' => $uid]);
|
$self = DBA::selectFirst('contact', ['url'], ['self' => true, 'uid' => $uid]);
|
||||||
if (!DBA::isResult($self)) {
|
if (!DBA::isResult($self)) {
|
||||||
|
|
@ -519,7 +520,7 @@ class Contact
|
||||||
* @throws HTTPException\InternalServerErrorException
|
* @throws HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function getPublicAndUserContactID($cid, $uid)
|
public static function getPublicAndUserContactID(int $cid, int $uid): array
|
||||||
{
|
{
|
||||||
// We have to use the legacy function as long as the post update hasn't finished
|
// We have to use the legacy function as long as the post update hasn't finished
|
||||||
if (DI::config()->get('system', 'post_update_version') < 1427) {
|
if (DI::config()->get('system', 'post_update_version') < 1427) {
|
||||||
|
|
@ -560,7 +561,7 @@ class Contact
|
||||||
* @throws HTTPException\InternalServerErrorException
|
* @throws HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
private static function legacyGetPublicAndUserContactID($cid, $uid)
|
private static function legacyGetPublicAndUserContactID(int $cid, int $uid): array
|
||||||
{
|
{
|
||||||
if (empty($uid) || empty($cid)) {
|
if (empty($uid) || empty($cid)) {
|
||||||
return [];
|
return [];
|
||||||
|
|
@ -1526,7 +1527,7 @@ class Contact
|
||||||
* @param int $type type of contact or account
|
* @param int $type type of contact or account
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getAccountType(int $type)
|
public static function getAccountType(int $type): string
|
||||||
{
|
{
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case self::TYPE_ORGANISATION:
|
case self::TYPE_ORGANISATION:
|
||||||
|
|
@ -1552,11 +1553,11 @@ class Contact
|
||||||
/**
|
/**
|
||||||
* Blocks a contact
|
* Blocks a contact
|
||||||
*
|
*
|
||||||
* @param int $cid
|
* @param int $cid Contact id to block
|
||||||
* @return bool
|
* @param string $reason Block reason
|
||||||
* @throws \Exception
|
* @return bool Whether it was successful
|
||||||
*/
|
*/
|
||||||
public static function block($cid, $reason = null)
|
public static function block(int $cid, string $reason = null): bool
|
||||||
{
|
{
|
||||||
$return = self::update(['blocked' => true, 'block_reason' => $reason], ['id' => $cid]);
|
$return = self::update(['blocked' => true, 'block_reason' => $reason], ['id' => $cid]);
|
||||||
|
|
||||||
|
|
@ -1566,11 +1567,10 @@ class Contact
|
||||||
/**
|
/**
|
||||||
* Unblocks a contact
|
* Unblocks a contact
|
||||||
*
|
*
|
||||||
* @param int $cid
|
* @param int $cid Contact id to unblock
|
||||||
* @return bool
|
* @return bool Whether it was successfull
|
||||||
* @throws \Exception
|
|
||||||
*/
|
*/
|
||||||
public static function unblock($cid)
|
public static function unblock(int $cid): bool
|
||||||
{
|
{
|
||||||
$return = self::update(['blocked' => false, 'block_reason' => null], ['id' => $cid]);
|
$return = self::update(['blocked' => false, 'block_reason' => null], ['id' => $cid]);
|
||||||
|
|
||||||
|
|
@ -1580,7 +1580,7 @@ class Contact
|
||||||
/**
|
/**
|
||||||
* Ensure that cached avatar exist
|
* Ensure that cached avatar exist
|
||||||
*
|
*
|
||||||
* @param integer $cid
|
* @param integer $cid Contact id
|
||||||
*/
|
*/
|
||||||
public static function checkAvatarCache(int $cid)
|
public static function checkAvatarCache(int $cid)
|
||||||
{
|
{
|
||||||
|
|
@ -1620,7 +1620,7 @@ class Contact
|
||||||
* @param bool $no_update Don't perfom an update if no cached avatar was found
|
* @param bool $no_update Don't perfom an update if no cached avatar was found
|
||||||
* @return string photo path
|
* @return string photo path
|
||||||
*/
|
*/
|
||||||
private static function getAvatarPath(array $contact, string $size, $no_update = false)
|
private static function getAvatarPath(array $contact, string $size, bool $no_update = false): string
|
||||||
{
|
{
|
||||||
$contact = self::checkAvatarCacheByArray($contact, $no_update);
|
$contact = self::checkAvatarCacheByArray($contact, $no_update);
|
||||||
|
|
||||||
|
|
@ -1654,7 +1654,7 @@ class Contact
|
||||||
* @param bool $no_update Don't perfom an update if no cached avatar was found
|
* @param bool $no_update Don't perfom an update if no cached avatar was found
|
||||||
* @return string photo path
|
* @return string photo path
|
||||||
*/
|
*/
|
||||||
public static function getPhoto(array $contact, bool $no_update = false)
|
public static function getPhoto(array $contact, bool $no_update = false): string
|
||||||
{
|
{
|
||||||
return self::getAvatarPath($contact, Proxy::SIZE_SMALL, $no_update);
|
return self::getAvatarPath($contact, Proxy::SIZE_SMALL, $no_update);
|
||||||
}
|
}
|
||||||
|
|
@ -1666,7 +1666,7 @@ class Contact
|
||||||
* @param bool $no_update Don't perfom an update if no cached avatar was found
|
* @param bool $no_update Don't perfom an update if no cached avatar was found
|
||||||
* @return string photo path
|
* @return string photo path
|
||||||
*/
|
*/
|
||||||
public static function getThumb(array $contact, bool $no_update = false)
|
public static function getThumb(array $contact, bool $no_update = false): string
|
||||||
{
|
{
|
||||||
return self::getAvatarPath($contact, Proxy::SIZE_THUMB, $no_update);
|
return self::getAvatarPath($contact, Proxy::SIZE_THUMB, $no_update);
|
||||||
}
|
}
|
||||||
|
|
@ -1678,7 +1678,7 @@ class Contact
|
||||||
* @param bool $no_update Don't perfom an update if no cached avatar was found
|
* @param bool $no_update Don't perfom an update if no cached avatar was found
|
||||||
* @return string photo path
|
* @return string photo path
|
||||||
*/
|
*/
|
||||||
public static function getMicro(array $contact, bool $no_update = false)
|
public static function getMicro(array $contact, bool $no_update = false): string
|
||||||
{
|
{
|
||||||
return self::getAvatarPath($contact, Proxy::SIZE_MICRO, $no_update);
|
return self::getAvatarPath($contact, Proxy::SIZE_MICRO, $no_update);
|
||||||
}
|
}
|
||||||
|
|
@ -1690,7 +1690,7 @@ class Contact
|
||||||
* @param bool $no_update Don't perfom an update if no cached avatar was found
|
* @param bool $no_update Don't perfom an update if no cached avatar was found
|
||||||
* @return array contact array with avatar cache fields
|
* @return array contact array with avatar cache fields
|
||||||
*/
|
*/
|
||||||
private static function checkAvatarCacheByArray(array $contact, bool $no_update = false)
|
private static function checkAvatarCacheByArray(array $contact, bool $no_update = false): array
|
||||||
{
|
{
|
||||||
$update = false;
|
$update = false;
|
||||||
$contact_fields = [];
|
$contact_fields = [];
|
||||||
|
|
@ -1796,7 +1796,7 @@ class Contact
|
||||||
* @param string $size Size of the avatar picture
|
* @param string $size Size of the avatar picture
|
||||||
* @return string avatar URL
|
* @return string avatar URL
|
||||||
*/
|
*/
|
||||||
public static function getDefaultAvatar(array $contact, string $size)
|
public static function getDefaultAvatar(array $contact, string $size): string
|
||||||
{
|
{
|
||||||
switch ($size) {
|
switch ($size) {
|
||||||
case Proxy::SIZE_MICRO:
|
case Proxy::SIZE_MICRO:
|
||||||
|
|
@ -1817,6 +1817,114 @@ class Contact
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!DI::config()->get('system', 'remote_avatar_lookup')) {
|
if (!DI::config()->get('system', 'remote_avatar_lookup')) {
|
||||||
|
$platform = '';
|
||||||
|
$type = Contact::TYPE_PERSON;
|
||||||
|
|
||||||
|
if (!empty($contact['id'])) {
|
||||||
|
$account = DBA::selectFirst('account-user-view', ['platform', 'contact-type'], ['id' => $contact['id']]);
|
||||||
|
$platform = $account['platform'] ?? '';
|
||||||
|
$type = $account['contact-type'] ?? Contact::TYPE_PERSON;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($platform) && !empty($contact['uri-id'])) {
|
||||||
|
$account = DBA::selectFirst('account-user-view', ['platform', 'contact-type'], ['uri-id' => $contact['uri-id']]);
|
||||||
|
$platform = $account['platform'] ?? '';
|
||||||
|
$type = $account['contact-type'] ?? Contact::TYPE_PERSON;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch ($platform) {
|
||||||
|
case 'corgidon':
|
||||||
|
/**
|
||||||
|
* Picture credits
|
||||||
|
* @license GNU Affero General Public License v3.0
|
||||||
|
* @link https://github.com/msdos621/corgidon/blob/main/public/avatars/original/missing.png
|
||||||
|
*/
|
||||||
|
$default = '/images/default/corgidon.png';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'diaspora':
|
||||||
|
/**
|
||||||
|
* Picture credits
|
||||||
|
* @license GNU Affero General Public License v3.0
|
||||||
|
* @link https://github.com/diaspora/diaspora/
|
||||||
|
*/
|
||||||
|
$default = '/images/default/diaspora.png';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'gotosocial':
|
||||||
|
/**
|
||||||
|
* Picture credits
|
||||||
|
* @license GNU Affero General Public License v3.0
|
||||||
|
* @link https://github.com/superseriousbusiness/gotosocial/blob/main/web/assets/default_avatars/GoToSocial_icon1.svg
|
||||||
|
*/
|
||||||
|
$default = '/images/default/gotosocial.svg';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'hometown':
|
||||||
|
/**
|
||||||
|
* Picture credits
|
||||||
|
* @license GNU Affero General Public License v3.0
|
||||||
|
* @link https://github.com/hometown-fork/hometown/blob/hometown-dev/public/avatars/original/missing.png
|
||||||
|
*/
|
||||||
|
$default = '/images/default/hometown.png';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'koyuspace':
|
||||||
|
/**
|
||||||
|
* Picture credits
|
||||||
|
* @license GNU Affero General Public License v3.0
|
||||||
|
* @link https://github.com/koyuspace/mastodon/blob/main/public/avatars/original/missing.png
|
||||||
|
*/
|
||||||
|
$default = '/images/default/koyuspace.png';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'ecko':
|
||||||
|
case 'qoto':
|
||||||
|
case 'mastodon':
|
||||||
|
/**
|
||||||
|
* Picture credits
|
||||||
|
* @license GNU Affero General Public License v3.0
|
||||||
|
* @link https://github.com/mastodon/mastodon/tree/main/public/avatars/original/missing.png
|
||||||
|
*/
|
||||||
|
$default = '/images/default/mastodon.png';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'peertube':
|
||||||
|
if ($type == Contact::TYPE_COMMUNITY) {
|
||||||
|
/**
|
||||||
|
* Picture credits
|
||||||
|
* @license GNU Affero General Public License v3.0
|
||||||
|
* @link https://github.com/Chocobozzz/PeerTube/blob/develop/client/src/assets/images/default-avatar-video-channel.png
|
||||||
|
*/
|
||||||
|
$default = '/images/default/peertube-channel.png';
|
||||||
|
} else {
|
||||||
|
/**
|
||||||
|
* Picture credits
|
||||||
|
* @license GNU Affero General Public License v3.0
|
||||||
|
* @link https://github.com/Chocobozzz/PeerTube/blob/develop/client/src/assets/images/default-avatar-account.png
|
||||||
|
*/
|
||||||
|
$default = '/images/default/peertube-account.png';
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'pleroma':
|
||||||
|
/**
|
||||||
|
* Picture credits
|
||||||
|
* @license GNU Affero General Public License v3.0
|
||||||
|
* @link https://git.pleroma.social/pleroma/pleroma/-/blob/develop/priv/static/images/avi.png
|
||||||
|
*/
|
||||||
|
$default = '/images/default/pleroma.png';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'plume':
|
||||||
|
/**
|
||||||
|
* Picture credits
|
||||||
|
* @license GNU Affero General Public License v3.0
|
||||||
|
* @link https://github.com/Plume-org/Plume/blob/main/assets/images/default-avatar.png
|
||||||
|
*/
|
||||||
|
$default = '/images/default/plume.png';
|
||||||
|
break;
|
||||||
|
}
|
||||||
return DI::baseUrl() . $default;
|
return DI::baseUrl() . $default;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2506,7 +2614,7 @@ class Contact
|
||||||
* @throws HTTPException\NotFoundException
|
* @throws HTTPException\NotFoundException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function createFromProbeForUser(int $uid, $url, $network = '')
|
public static function createFromProbeForUser(int $uid, string $url, string $network = ''): array
|
||||||
{
|
{
|
||||||
$result = ['cid' => -1, 'success' => false, 'message' => ''];
|
$result = ['cid' => -1, 'success' => false, 'message' => ''];
|
||||||
|
|
||||||
|
|
@ -2695,7 +2803,7 @@ class Contact
|
||||||
* @throws HTTPException\InternalServerErrorException
|
* @throws HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function addRelationship(array $importer, array $contact, array $datarray, $sharing = false, $note = '')
|
public static function addRelationship(array $importer, array $contact, array $datarray, bool $sharing = false, string $note = '')
|
||||||
{
|
{
|
||||||
// Should always be set
|
// Should always be set
|
||||||
if (empty($datarray['author-id'])) {
|
if (empty($datarray['author-id'])) {
|
||||||
|
|
@ -2922,7 +3030,7 @@ class Contact
|
||||||
* @return array
|
* @return array
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function pruneUnavailable(array $contact_ids)
|
public static function pruneUnavailable(array $contact_ids): array
|
||||||
{
|
{
|
||||||
if (empty($contact_ids)) {
|
if (empty($contact_ids)) {
|
||||||
return [];
|
return [];
|
||||||
|
|
@ -2950,7 +3058,7 @@ class Contact
|
||||||
* @throws HTTPException\InternalServerErrorException
|
* @throws HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function magicLink($contact_url, $url = '')
|
public static function magicLink(string $contact_url, string $url = ''): string
|
||||||
{
|
{
|
||||||
if (!Session::isAuthenticated()) {
|
if (!Session::isAuthenticated()) {
|
||||||
return $url ?: $contact_url; // Equivalent to: ($url != '') ? $url : $contact_url;
|
return $url ?: $contact_url; // Equivalent to: ($url != '') ? $url : $contact_url;
|
||||||
|
|
@ -2977,7 +3085,7 @@ class Contact
|
||||||
* @throws HTTPException\InternalServerErrorException
|
* @throws HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function magicLinkById($cid, $url = '')
|
public static function magicLinkById(int $cid, string $url = ''): string
|
||||||
{
|
{
|
||||||
$contact = DBA::selectFirst('contact', ['id', 'network', 'url', 'uid'], ['id' => $cid]);
|
$contact = DBA::selectFirst('contact', ['id', 'network', 'url', 'uid'], ['id' => $cid]);
|
||||||
|
|
||||||
|
|
@ -2994,7 +3102,7 @@ class Contact
|
||||||
* @throws HTTPException\InternalServerErrorException
|
* @throws HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function magicLinkByContact($contact, $url = '')
|
public static function magicLinkByContact(array $contact, string $url = ''): string
|
||||||
{
|
{
|
||||||
$destination = $url ?: $contact['url']; // Equivalent to ($url != '') ? $url : $contact['url'];
|
$destination = $url ?: $contact['url']; // Equivalent to ($url != '') ? $url : $contact['url'];
|
||||||
|
|
||||||
|
|
@ -3035,7 +3143,7 @@ class Contact
|
||||||
*
|
*
|
||||||
* @return boolean "true" if it is a forum
|
* @return boolean "true" if it is a forum
|
||||||
*/
|
*/
|
||||||
public static function isForum($contactid)
|
public static function isForum(int $contactid): bool
|
||||||
{
|
{
|
||||||
$fields = ['contact-type'];
|
$fields = ['contact-type'];
|
||||||
$condition = ['id' => $contactid];
|
$condition = ['id' => $contactid];
|
||||||
|
|
@ -3054,7 +3162,7 @@ class Contact
|
||||||
* @param array $contact
|
* @param array $contact
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public static function canReceivePrivateMessages(array $contact)
|
public static function canReceivePrivateMessages(array $contact): bool
|
||||||
{
|
{
|
||||||
$protocol = $contact['network'] ?? $contact['protocol'] ?? Protocol::PHANTOM;
|
$protocol = $contact['network'] ?? $contact['protocol'] ?? Protocol::PHANTOM;
|
||||||
$self = $contact['self'] ?? false;
|
$self = $contact['self'] ?? false;
|
||||||
|
|
@ -3072,7 +3180,7 @@ class Contact
|
||||||
* @return array with search results
|
* @return array with search results
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function searchByName(string $search, string $mode = '', int $uid = 0)
|
public static function searchByName(string $search, string $mode = '', int $uid = 0): array
|
||||||
{
|
{
|
||||||
if (empty($search)) {
|
if (empty($search)) {
|
||||||
return [];
|
return [];
|
||||||
|
|
@ -3115,7 +3223,7 @@ class Contact
|
||||||
* @param array $urls
|
* @param array $urls
|
||||||
* @return array result "count", "added" and "updated"
|
* @return array result "count", "added" and "updated"
|
||||||
*/
|
*/
|
||||||
public static function addByUrls(array $urls)
|
public static function addByUrls(array $urls): array
|
||||||
{
|
{
|
||||||
$added = 0;
|
$added = 0;
|
||||||
$updated = 0;
|
$updated = 0;
|
||||||
|
|
@ -3148,7 +3256,7 @@ class Contact
|
||||||
* @return array The profile array
|
* @return array The profile array
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function getRandomContact()
|
public static function getRandomContact(): array
|
||||||
{
|
{
|
||||||
$contact = DBA::selectFirst('contact', ['id', 'network', 'url', 'uid'], [
|
$contact = DBA::selectFirst('contact', ['id', 'network', 'url', 'uid'], [
|
||||||
"`uid` = ? AND `network` = ? AND NOT `failed` AND `last-item` > ?",
|
"`uid` = ? AND `network` = ? AND NOT `failed` AND `last-item` > ?",
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ class Conversation
|
||||||
*/
|
*/
|
||||||
const RELAY = 3;
|
const RELAY = 3;
|
||||||
|
|
||||||
public static function getByItemUri($item_uri)
|
public static function getByItemUri(string $item_uri)
|
||||||
{
|
{
|
||||||
return DBA::selectFirst('conversation', [], ['item-uri' => $item_uri]);
|
return DBA::selectFirst('conversation', [], ['item-uri' => $item_uri]);
|
||||||
}
|
}
|
||||||
|
|
@ -74,7 +74,7 @@ class Conversation
|
||||||
* @return array Item array with removed conversation data
|
* @return array Item array with removed conversation data
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function insert(array $arr)
|
public static function insert(array $arr): array
|
||||||
{
|
{
|
||||||
if (in_array(($arr['network'] ?? '') ?: Protocol::PHANTOM,
|
if (in_array(($arr['network'] ?? '') ?: Protocol::PHANTOM,
|
||||||
[Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA, Protocol::OSTATUS, Protocol::TWITTER]) && !empty($arr['uri'])) {
|
[Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA, Protocol::OSTATUS, Protocol::TWITTER]) && !empty($arr['uri'])) {
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ use Friendica\Util\XML;
|
||||||
class Event
|
class Event
|
||||||
{
|
{
|
||||||
|
|
||||||
public static function getHTML(array $event, $simple = false, $uriid = 0)
|
public static function getHTML(array $event, bool $simple = false, int $uriid = 0): string
|
||||||
{
|
{
|
||||||
if (empty($event)) {
|
if (empty($event)) {
|
||||||
return '';
|
return '';
|
||||||
|
|
@ -127,7 +127,7 @@ class Event
|
||||||
* @param array $event Array which contains the event data.
|
* @param array $event Array which contains the event data.
|
||||||
* @return string The event as a bbcode formatted string.
|
* @return string The event as a bbcode formatted string.
|
||||||
*/
|
*/
|
||||||
private static function getBBCode(array $event)
|
private static function getBBCode(array $event): string
|
||||||
{
|
{
|
||||||
$o = '';
|
$o = '';
|
||||||
|
|
||||||
|
|
@ -157,11 +157,10 @@ class Event
|
||||||
/**
|
/**
|
||||||
* Extract bbcode formatted event data from a string.
|
* Extract bbcode formatted event data from a string.
|
||||||
*
|
*
|
||||||
* @params: string $s The string which should be parsed for event data.
|
* @param string $text The string which should be parsed for event data.
|
||||||
* @param $text
|
|
||||||
* @return array The array with the event information.
|
* @return array The array with the event information.
|
||||||
*/
|
*/
|
||||||
public static function fromBBCode($text)
|
public static function fromBBCode(string $text): array
|
||||||
{
|
{
|
||||||
$ev = [];
|
$ev = [];
|
||||||
|
|
||||||
|
|
@ -195,13 +194,13 @@ class Event
|
||||||
return $ev;
|
return $ev;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function sortByDate($event_list)
|
public static function sortByDate(array $event_list): array
|
||||||
{
|
{
|
||||||
usort($event_list, ['self', 'compareDatesCallback']);
|
usort($event_list, ['self', 'compareDatesCallback']);
|
||||||
return $event_list;
|
return $event_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function compareDatesCallback($event_a, $event_b)
|
private static function compareDatesCallback(array $event_a, array $event_b)
|
||||||
{
|
{
|
||||||
$date_a = DateTimeFormat::local($event_a['start']);
|
$date_a = DateTimeFormat::local($event_a['start']);
|
||||||
$date_b = DateTimeFormat::local($event_b['start']);
|
$date_b = DateTimeFormat::local($event_b['start']);
|
||||||
|
|
@ -223,7 +222,7 @@ class Event
|
||||||
* @return void
|
* @return void
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function delete($event_id)
|
public static function delete(int $event_id)
|
||||||
{
|
{
|
||||||
if ($event_id == 0) {
|
if ($event_id == 0) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -242,7 +241,7 @@ class Event
|
||||||
* @return int The new event id.
|
* @return int The new event id.
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function store($arr)
|
public static function store(array $arr): int
|
||||||
{
|
{
|
||||||
$event = [];
|
$event = [];
|
||||||
$event['id'] = intval($arr['id'] ?? 0);
|
$event['id'] = intval($arr['id'] ?? 0);
|
||||||
|
|
@ -317,7 +316,7 @@ class Event
|
||||||
return $event['id'];
|
return $event['id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getItemArrayForId(int $event_id, array $item = []):array
|
public static function getItemArrayForId(int $event_id, array $item = []): array
|
||||||
{
|
{
|
||||||
if (empty($event_id)) {
|
if (empty($event_id)) {
|
||||||
return $item;
|
return $item;
|
||||||
|
|
@ -374,7 +373,7 @@ class Event
|
||||||
return $item;
|
return $item;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getItemArrayForImportedId(int $event_id, array $item = []):array
|
public static function getItemArrayForImportedId(int $event_id, array $item = []): array
|
||||||
{
|
{
|
||||||
if (empty($event_id)) {
|
if (empty($event_id)) {
|
||||||
return $item;
|
return $item;
|
||||||
|
|
@ -404,7 +403,7 @@ class Event
|
||||||
* @return array Array with translations strings.
|
* @return array Array with translations strings.
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function getStrings()
|
public static function getStrings(): array
|
||||||
{
|
{
|
||||||
// First day of the week (0 = Sunday).
|
// First day of the week (0 = Sunday).
|
||||||
$firstDay = DI::pConfig()->get(local_user(), 'system', 'first_day_of_week', 0);
|
$firstDay = DI::pConfig()->get(local_user(), 'system', 'first_day_of_week', 0);
|
||||||
|
|
@ -477,7 +476,7 @@ class Event
|
||||||
*
|
*
|
||||||
* @todo We should replace this with a separate update function if there is some time left.
|
* @todo We should replace this with a separate update function if there is some time left.
|
||||||
*/
|
*/
|
||||||
private static function removeDuplicates(array $dates)
|
private static function removeDuplicates(array $dates): array
|
||||||
{
|
{
|
||||||
$dates2 = [];
|
$dates2 = [];
|
||||||
|
|
||||||
|
|
@ -500,7 +499,7 @@ class Event
|
||||||
* @return array Query result
|
* @return array Query result
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function getListById($owner_uid, $event_id, $sql_extra = '')
|
public static function getListById(int $owner_uid, int $event_id, string $sql_extra = ''): array
|
||||||
{
|
{
|
||||||
$return = [];
|
$return = [];
|
||||||
|
|
||||||
|
|
@ -536,7 +535,7 @@ class Event
|
||||||
* @return array Query results.
|
* @return array Query results.
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function getListByDate($owner_uid, $event_params, $sql_extra = '')
|
public static function getListByDate(int $owner_uid, array $event_params, string $sql_extra = ''): array
|
||||||
{
|
{
|
||||||
$return = [];
|
$return = [];
|
||||||
|
|
||||||
|
|
@ -570,7 +569,7 @@ class Event
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function prepareListForTemplate(array $event_result)
|
public static function prepareListForTemplate(array $event_result): array
|
||||||
{
|
{
|
||||||
$event_list = [];
|
$event_list = [];
|
||||||
|
|
||||||
|
|
@ -651,12 +650,12 @@ class Event
|
||||||
* @param array $events Query result for events.
|
* @param array $events Query result for events.
|
||||||
* @param string $format The output format (ical/csv).
|
* @param string $format The output format (ical/csv).
|
||||||
*
|
*
|
||||||
* @param $timezone
|
* @param string $timezone Timezone (missing parameter!)
|
||||||
* @return string Content according to selected export format.
|
* @return string Content according to selected export format.
|
||||||
*
|
*
|
||||||
* @todo Implement timezone support
|
* @todo Implement timezone support
|
||||||
*/
|
*/
|
||||||
private static function formatListForExport(array $events, $format)
|
private static function formatListForExport(array $events, string $format): string
|
||||||
{
|
{
|
||||||
$o = '';
|
$o = '';
|
||||||
|
|
||||||
|
|
@ -757,7 +756,7 @@ class Event
|
||||||
* @return array Query results.
|
* @return array Query results.
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function getListByUserId($uid = 0)
|
private static function getListByUserId(int $uid = 0): array
|
||||||
{
|
{
|
||||||
$return = [];
|
$return = [];
|
||||||
|
|
||||||
|
|
@ -797,7 +796,7 @@ class Event
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
* @todo Respect authenticated users with events_by_uid().
|
* @todo Respect authenticated users with events_by_uid().
|
||||||
*/
|
*/
|
||||||
public static function exportListByUserId($uid, $format = 'ical')
|
public static function exportListByUserId(int $uid, string $format = 'ical'): array
|
||||||
{
|
{
|
||||||
$process = false;
|
$process = false;
|
||||||
|
|
||||||
|
|
@ -845,7 +844,8 @@ class Event
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function getItemHTML(array $item) {
|
public static function getItemHTML(array $item): string
|
||||||
|
{
|
||||||
$same_date = false;
|
$same_date = false;
|
||||||
$finish = false;
|
$finish = false;
|
||||||
|
|
||||||
|
|
@ -933,10 +933,11 @@ class Event
|
||||||
* @return array The array with the location data.
|
* @return array The array with the location data.
|
||||||
* 'name' => The name of the location,<br>
|
* 'name' => The name of the location,<br>
|
||||||
* 'address' => The address of the location,<br>
|
* 'address' => The address of the location,<br>
|
||||||
* 'coordinates' => Latitude and longitude (e.g. '48.864716,2.349014').<br>
|
* 'coordinates' => Latitude and longitude (e.g. '48.864716,2.349014').<br>
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
private static function locationToArray($s = '') {
|
private static function locationToArray(string $s = ''): array
|
||||||
|
{
|
||||||
if ($s == '') {
|
if ($s == '') {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
@ -981,7 +982,7 @@ class Event
|
||||||
* @return bool
|
* @return bool
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function createBirthday($contact, $birthday)
|
public static function createBirthday(array $contact, string $birthday): bool
|
||||||
{
|
{
|
||||||
// Check for duplicates
|
// Check for duplicates
|
||||||
$condition = [
|
$condition = [
|
||||||
|
|
@ -1011,8 +1012,7 @@ class Event
|
||||||
'type' => 'birthday',
|
'type' => 'birthday',
|
||||||
];
|
];
|
||||||
|
|
||||||
self::store($values);
|
// Check if self::store() was success
|
||||||
|
return (self::store($values) > 0);
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ class FContact
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function getByURL($handle, $update = null)
|
public static function getByURL(string $handle, $update = null): array
|
||||||
{
|
{
|
||||||
$person = DBA::selectFirst('fcontact', [], ['network' => Protocol::DIASPORA, 'addr' => $handle]);
|
$person = DBA::selectFirst('fcontact', [], ['network' => Protocol::DIASPORA, 'addr' => $handle]);
|
||||||
if (!DBA::isResult($person)) {
|
if (!DBA::isResult($person)) {
|
||||||
|
|
@ -90,7 +90,7 @@ class FContact
|
||||||
* @param array $arr The fcontact data
|
* @param array $arr The fcontact data
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function updateFromProbeArray($arr)
|
public static function updateFromProbeArray(array $arr)
|
||||||
{
|
{
|
||||||
$uriid = ItemURI::insert(['uri' => $arr['url'], 'guid' => $arr['guid']]);
|
$uriid = ItemURI::insert(['uri' => $arr['url'], 'guid' => $arr['guid']]);
|
||||||
|
|
||||||
|
|
@ -122,12 +122,12 @@ class FContact
|
||||||
* get a url (scheme://domain.tld/u/user) from a given Diaspora*
|
* get a url (scheme://domain.tld/u/user) from a given Diaspora*
|
||||||
* fcontact guid
|
* fcontact guid
|
||||||
*
|
*
|
||||||
* @param mixed $fcontact_guid Hexadecimal string guid
|
* @param string $fcontact_guid Hexadecimal string guid
|
||||||
*
|
*
|
||||||
* @return string the contact url or null
|
* @return string|null the contact url or null
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function getUrlByGuid($fcontact_guid)
|
public static function getUrlByGuid(string $fcontact_guid)
|
||||||
{
|
{
|
||||||
Logger::info('fcontact', ['guid' => $fcontact_guid]);
|
Logger::info('fcontact', ['guid' => $fcontact_guid]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,10 +35,9 @@ class FileTag
|
||||||
* URL encode <, >, left and right brackets
|
* URL encode <, >, left and right brackets
|
||||||
*
|
*
|
||||||
* @param string $s String to be URL encoded.
|
* @param string $s String to be URL encoded.
|
||||||
*
|
|
||||||
* @return string The URL encoded string.
|
* @return string The URL encoded string.
|
||||||
*/
|
*/
|
||||||
private static function encode($s)
|
private static function encode(string $s): string
|
||||||
{
|
{
|
||||||
return str_replace(['<', '>', '[', ']'], ['%3c', '%3e', '%5b', '%5d'], $s);
|
return str_replace(['<', '>', '[', ']'], ['%3c', '%3e', '%5b', '%5d'], $s);
|
||||||
}
|
}
|
||||||
|
|
@ -47,10 +46,9 @@ class FileTag
|
||||||
* URL decode <, >, left and right brackets
|
* URL decode <, >, left and right brackets
|
||||||
*
|
*
|
||||||
* @param string $s The URL encoded string to be decoded
|
* @param string $s The URL encoded string to be decoded
|
||||||
*
|
|
||||||
* @return string The decoded string.
|
* @return string The decoded string.
|
||||||
*/
|
*/
|
||||||
private static function decode($s)
|
private static function decode(string $s): string
|
||||||
{
|
{
|
||||||
return str_replace(['%3c', '%3e', '%5b', '%5d'], ['<', '>', '[', ']'], $s);
|
return str_replace(['%3c', '%3e', '%5b', '%5d'], ['<', '>', '[', ']'], $s);
|
||||||
}
|
}
|
||||||
|
|
@ -62,10 +60,9 @@ class FileTag
|
||||||
*
|
*
|
||||||
* @param array $array A list of tags.
|
* @param array $array A list of tags.
|
||||||
* @param string $type Optional file type.
|
* @param string $type Optional file type.
|
||||||
*
|
|
||||||
* @return string A list of file tags.
|
* @return string A list of file tags.
|
||||||
*/
|
*/
|
||||||
public static function arrayToFile(array $array, string $type = 'file')
|
public static function arrayToFile(array $array, string $type = 'file'): string
|
||||||
{
|
{
|
||||||
$tag_list = '';
|
$tag_list = '';
|
||||||
if ($type == 'file') {
|
if ($type == 'file') {
|
||||||
|
|
@ -92,10 +89,9 @@ class FileTag
|
||||||
*
|
*
|
||||||
* @param string $file File tags
|
* @param string $file File tags
|
||||||
* @param string $type Optional file type.
|
* @param string $type Optional file type.
|
||||||
*
|
|
||||||
* @return array List of tag names.
|
* @return array List of tag names.
|
||||||
*/
|
*/
|
||||||
public static function fileToArray(string $file, string $type = 'file')
|
public static function fileToArray(string $file, string $type = 'file'): array
|
||||||
{
|
{
|
||||||
$matches = [];
|
$matches = [];
|
||||||
$return = [];
|
$return = [];
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ class GServer
|
||||||
*
|
*
|
||||||
* @param string $url
|
* @param string $url
|
||||||
* @param boolean $no_check Don't check if the server hadn't been found
|
* @param boolean $no_check Don't check if the server hadn't been found
|
||||||
* @return int gserver id
|
* @return int|null gserver id or NULL on empty URL or failed check
|
||||||
*/
|
*/
|
||||||
public static function getID(string $url, bool $no_check = false)
|
public static function getID(string $url, bool $no_check = false)
|
||||||
{
|
{
|
||||||
|
|
@ -156,7 +156,7 @@ class GServer
|
||||||
*
|
*
|
||||||
* @return boolean 'true' if server seems vital
|
* @return boolean 'true' if server seems vital
|
||||||
*/
|
*/
|
||||||
public static function reachable(string $profile, string $server = '', string $network = '', bool $force = false)
|
public static function reachable(string $profile, string $server = '', string $network = '', bool $force = false): bool
|
||||||
{
|
{
|
||||||
if ($server == '') {
|
if ($server == '') {
|
||||||
$contact = Contact::getByURL($profile, null, ['baseurl']);
|
$contact = Contact::getByURL($profile, null, ['baseurl']);
|
||||||
|
|
@ -172,7 +172,7 @@ class GServer
|
||||||
return self::check($server, $network, $force);
|
return self::check($server, $network, $force);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getNextUpdateDate(bool $success, string $created = '', string $last_contact = '')
|
public static function getNextUpdateDate(bool $success, string $created = '', string $last_contact = ''): string
|
||||||
{
|
{
|
||||||
// On successful contact process check again next week
|
// On successful contact process check again next week
|
||||||
if ($success) {
|
if ($success) {
|
||||||
|
|
@ -231,7 +231,7 @@ class GServer
|
||||||
*
|
*
|
||||||
* @return boolean 'true' if server seems vital
|
* @return boolean 'true' if server seems vital
|
||||||
*/
|
*/
|
||||||
public static function check(string $server_url, string $network = '', bool $force = false, bool $only_nodeinfo = false)
|
public static function check(string $server_url, string $network = '', bool $force = false, bool $only_nodeinfo = false): bool
|
||||||
{
|
{
|
||||||
$server_url = self::cleanURL($server_url);
|
$server_url = self::cleanURL($server_url);
|
||||||
if ($server_url == '') {
|
if ($server_url == '') {
|
||||||
|
|
@ -286,7 +286,7 @@ class GServer
|
||||||
* @param string $url
|
* @param string $url
|
||||||
* @return string cleaned URL
|
* @return string cleaned URL
|
||||||
*/
|
*/
|
||||||
public static function cleanURL(string $url)
|
public static function cleanURL(string $url): string
|
||||||
{
|
{
|
||||||
$url = trim($url, '/');
|
$url = trim($url, '/');
|
||||||
$url = str_replace('/index.php', '', $url);
|
$url = str_replace('/index.php', '', $url);
|
||||||
|
|
@ -305,7 +305,7 @@ class GServer
|
||||||
* @param string $url
|
* @param string $url
|
||||||
* @return string base URL
|
* @return string base URL
|
||||||
*/
|
*/
|
||||||
private static function getBaseURL(string $url)
|
private static function getBaseURL(string $url): string
|
||||||
{
|
{
|
||||||
$urlparts = parse_url(self::cleanURL($url));
|
$urlparts = parse_url(self::cleanURL($url));
|
||||||
unset($urlparts['path']);
|
unset($urlparts['path']);
|
||||||
|
|
@ -322,7 +322,7 @@ class GServer
|
||||||
*
|
*
|
||||||
* @return boolean 'true' if server could be detected
|
* @return boolean 'true' if server could be detected
|
||||||
*/
|
*/
|
||||||
public static function detect(string $url, string $network = '', bool $only_nodeinfo = false)
|
public static function detect(string $url, string $network = '', bool $only_nodeinfo = false): bool
|
||||||
{
|
{
|
||||||
Logger::info('Detect server type', ['server' => $url]);
|
Logger::info('Detect server type', ['server' => $url]);
|
||||||
$serverdata = ['detection-method' => self::DETECT_MANUAL];
|
$serverdata = ['detection-method' => self::DETECT_MANUAL];
|
||||||
|
|
@ -535,7 +535,7 @@ class GServer
|
||||||
$serverdata['last_contact'] = DateTimeFormat::utcNow();
|
$serverdata['last_contact'] = DateTimeFormat::utcNow();
|
||||||
$serverdata['failed'] = false;
|
$serverdata['failed'] = false;
|
||||||
|
|
||||||
$gserver = DBA::selectFirst('gserver', ['network'], ['nurl' => Strings::normaliseLink($url)]);
|
$gserver = DBA::selectFirst('gserver', ['network'], ['nurl' => $serverdata['nurl']]);
|
||||||
if (!DBA::isResult($gserver)) {
|
if (!DBA::isResult($gserver)) {
|
||||||
$serverdata['created'] = DateTimeFormat::utcNow();
|
$serverdata['created'] = DateTimeFormat::utcNow();
|
||||||
$ret = DBA::insert('gserver', $serverdata);
|
$ret = DBA::insert('gserver', $serverdata);
|
||||||
|
|
@ -586,6 +586,7 @@ class GServer
|
||||||
* Fetch relay data from a given server url
|
* Fetch relay data from a given server url
|
||||||
*
|
*
|
||||||
* @param string $server_url address of the server
|
* @param string $server_url address of the server
|
||||||
|
* @return void
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
private static function discoverRelay(string $server_url)
|
private static function discoverRelay(string $server_url)
|
||||||
|
|
@ -685,7 +686,7 @@ class GServer
|
||||||
*
|
*
|
||||||
* @return array server data
|
* @return array server data
|
||||||
*/
|
*/
|
||||||
private static function fetchStatistics(string $url)
|
private static function fetchStatistics(string $url): array
|
||||||
{
|
{
|
||||||
$curlResult = DI::httpClient()->get($url . '/statistics.json', HttpClientAccept::JSON);
|
$curlResult = DI::httpClient()->get($url . '/statistics.json', HttpClientAccept::JSON);
|
||||||
if (!$curlResult->isSuccess()) {
|
if (!$curlResult->isSuccess()) {
|
||||||
|
|
@ -758,7 +759,7 @@ class GServer
|
||||||
* @return array Server data
|
* @return array Server data
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
private static function fetchNodeinfo(string $url, ICanHandleHttpResponses $httpResult)
|
private static function fetchNodeinfo(string $url, ICanHandleHttpResponses $httpResult): array
|
||||||
{
|
{
|
||||||
if (!$httpResult->isSuccess()) {
|
if (!$httpResult->isSuccess()) {
|
||||||
return [];
|
return [];
|
||||||
|
|
@ -811,7 +812,7 @@ class GServer
|
||||||
* @return array Server data
|
* @return array Server data
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
private static function parseNodeinfo1(string $nodeinfo_url)
|
private static function parseNodeinfo1(string $nodeinfo_url): array
|
||||||
{
|
{
|
||||||
$curlResult = DI::httpClient()->get($nodeinfo_url, HttpClientAccept::JSON);
|
$curlResult = DI::httpClient()->get($nodeinfo_url, HttpClientAccept::JSON);
|
||||||
if (!$curlResult->isSuccess()) {
|
if (!$curlResult->isSuccess()) {
|
||||||
|
|
@ -904,7 +905,7 @@ class GServer
|
||||||
* @return array Server data
|
* @return array Server data
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
private static function parseNodeinfo2(string $nodeinfo_url)
|
private static function parseNodeinfo2(string $nodeinfo_url): array
|
||||||
{
|
{
|
||||||
$curlResult = DI::httpClient()->get($nodeinfo_url, HttpClientAccept::JSON);
|
$curlResult = DI::httpClient()->get($nodeinfo_url, HttpClientAccept::JSON);
|
||||||
if (!$curlResult->isSuccess()) {
|
if (!$curlResult->isSuccess()) {
|
||||||
|
|
@ -1001,10 +1002,9 @@ class GServer
|
||||||
*
|
*
|
||||||
* @param string $url URL of the given server
|
* @param string $url URL of the given server
|
||||||
* @param array $serverdata array with server data
|
* @param array $serverdata array with server data
|
||||||
*
|
|
||||||
* @return array server data
|
* @return array server data
|
||||||
*/
|
*/
|
||||||
private static function fetchSiteinfo(string $url, array $serverdata)
|
private static function fetchSiteinfo(string $url, array $serverdata): array
|
||||||
{
|
{
|
||||||
$curlResult = DI::httpClient()->get($url . '/siteinfo.json', HttpClientAccept::JSON);
|
$curlResult = DI::httpClient()->get($url . '/siteinfo.json', HttpClientAccept::JSON);
|
||||||
if (!$curlResult->isSuccess()) {
|
if (!$curlResult->isSuccess()) {
|
||||||
|
|
@ -1085,10 +1085,9 @@ class GServer
|
||||||
* Checks if the server contains a valid host meta file
|
* Checks if the server contains a valid host meta file
|
||||||
*
|
*
|
||||||
* @param string $url URL of the given server
|
* @param string $url URL of the given server
|
||||||
*
|
|
||||||
* @return boolean 'true' if the server seems to be vital
|
* @return boolean 'true' if the server seems to be vital
|
||||||
*/
|
*/
|
||||||
private static function validHostMeta(string $url)
|
private static function validHostMeta(string $url): bool
|
||||||
{
|
{
|
||||||
$xrd_timeout = DI::config()->get('system', 'xrd_timeout');
|
$xrd_timeout = DI::config()->get('system', 'xrd_timeout');
|
||||||
$curlResult = DI::httpClient()->get($url . '/.well-known/host-meta', HttpClientAccept::XRD_XML, [HttpClientOptions::TIMEOUT => $xrd_timeout]);
|
$curlResult = DI::httpClient()->get($url . '/.well-known/host-meta', HttpClientAccept::XRD_XML, [HttpClientOptions::TIMEOUT => $xrd_timeout]);
|
||||||
|
|
@ -1131,10 +1130,9 @@ class GServer
|
||||||
*
|
*
|
||||||
* @param string $url URL of the given server
|
* @param string $url URL of the given server
|
||||||
* @param array $serverdata array with server data
|
* @param array $serverdata array with server data
|
||||||
*
|
|
||||||
* @return array server data
|
* @return array server data
|
||||||
*/
|
*/
|
||||||
private static function detectNetworkViaContacts(string $url, array $serverdata)
|
private static function detectNetworkViaContacts(string $url, array $serverdata): array
|
||||||
{
|
{
|
||||||
$contacts = [];
|
$contacts = [];
|
||||||
|
|
||||||
|
|
@ -1176,10 +1174,9 @@ class GServer
|
||||||
*
|
*
|
||||||
* @param string $url URL of the given server
|
* @param string $url URL of the given server
|
||||||
* @param array $serverdata array with server data
|
* @param array $serverdata array with server data
|
||||||
*
|
|
||||||
* @return array server data
|
* @return array server data
|
||||||
*/
|
*/
|
||||||
private static function checkPoCo(string $url, array $serverdata)
|
private static function checkPoCo(string $url, array $serverdata): array
|
||||||
{
|
{
|
||||||
$serverdata['poco'] = '';
|
$serverdata['poco'] = '';
|
||||||
|
|
||||||
|
|
@ -1208,10 +1205,9 @@ class GServer
|
||||||
*
|
*
|
||||||
* @param string $url URL of the given server
|
* @param string $url URL of the given server
|
||||||
* @param array $serverdata array with server data
|
* @param array $serverdata array with server data
|
||||||
*
|
|
||||||
* @return array server data
|
* @return array server data
|
||||||
*/
|
*/
|
||||||
public static function checkMastodonDirectory(string $url, array $serverdata)
|
public static function checkMastodonDirectory(string $url, array $serverdata): array
|
||||||
{
|
{
|
||||||
$curlResult = DI::httpClient()->get($url . '/api/v1/directory?limit=1', HttpClientAccept::JSON);
|
$curlResult = DI::httpClient()->get($url . '/api/v1/directory?limit=1', HttpClientAccept::JSON);
|
||||||
if (!$curlResult->isSuccess()) {
|
if (!$curlResult->isSuccess()) {
|
||||||
|
|
@ -1238,7 +1234,7 @@ class GServer
|
||||||
*
|
*
|
||||||
* @return array server data
|
* @return array server data
|
||||||
*/
|
*/
|
||||||
private static function detectPeertube(string $url, array $serverdata)
|
private static function detectPeertube(string $url, array $serverdata): array
|
||||||
{
|
{
|
||||||
$curlResult = DI::httpClient()->get($url . '/api/v1/config', HttpClientAccept::JSON);
|
$curlResult = DI::httpClient()->get($url . '/api/v1/config', HttpClientAccept::JSON);
|
||||||
if (!$curlResult->isSuccess() || ($curlResult->getBody() == '')) {
|
if (!$curlResult->isSuccess() || ($curlResult->getBody() == '')) {
|
||||||
|
|
@ -1282,10 +1278,9 @@ class GServer
|
||||||
*
|
*
|
||||||
* @param string $url URL of the given server
|
* @param string $url URL of the given server
|
||||||
* @param array $serverdata array with server data
|
* @param array $serverdata array with server data
|
||||||
*
|
|
||||||
* @return array server data
|
* @return array server data
|
||||||
*/
|
*/
|
||||||
private static function detectNextcloud(string $url, array $serverdata)
|
private static function detectNextcloud(string $url, array $serverdata): array
|
||||||
{
|
{
|
||||||
$curlResult = DI::httpClient()->get($url . '/status.php', HttpClientAccept::JSON);
|
$curlResult = DI::httpClient()->get($url . '/status.php', HttpClientAccept::JSON);
|
||||||
if (!$curlResult->isSuccess() || ($curlResult->getBody() == '')) {
|
if (!$curlResult->isSuccess() || ($curlResult->getBody() == '')) {
|
||||||
|
|
@ -1310,7 +1305,15 @@ class GServer
|
||||||
return $serverdata;
|
return $serverdata;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function fetchWeeklyUsage(string $url, array $serverdata) {
|
/**
|
||||||
|
* Fetches weekly usage data
|
||||||
|
*
|
||||||
|
* @param string $url URL of the given server
|
||||||
|
* @param array $serverdata array with server data
|
||||||
|
* @return array server data
|
||||||
|
*/
|
||||||
|
private static function fetchWeeklyUsage(string $url, array $serverdata): array
|
||||||
|
{
|
||||||
$curlResult = DI::httpClient()->get($url . '/api/v1/instance/activity', HttpClientAccept::JSON);
|
$curlResult = DI::httpClient()->get($url . '/api/v1/instance/activity', HttpClientAccept::JSON);
|
||||||
if (!$curlResult->isSuccess() || ($curlResult->getBody() == '')) {
|
if (!$curlResult->isSuccess() || ($curlResult->getBody() == '')) {
|
||||||
return $serverdata;
|
return $serverdata;
|
||||||
|
|
@ -1346,10 +1349,9 @@ class GServer
|
||||||
*
|
*
|
||||||
* @param string $url URL of the given server
|
* @param string $url URL of the given server
|
||||||
* @param array $serverdata array with server data
|
* @param array $serverdata array with server data
|
||||||
*
|
|
||||||
* @return array server data
|
* @return array server data
|
||||||
*/
|
*/
|
||||||
private static function detectFromContacts(string $url, array $serverdata)
|
private static function detectFromContacts(string $url, array $serverdata): array
|
||||||
{
|
{
|
||||||
$gserver = DBA::selectFirst('gserver', ['id'], ['nurl' => Strings::normaliseLink($url)]);
|
$gserver = DBA::selectFirst('gserver', ['id'], ['nurl' => Strings::normaliseLink($url)]);
|
||||||
if (empty($gserver)) {
|
if (empty($gserver)) {
|
||||||
|
|
@ -1374,10 +1376,9 @@ class GServer
|
||||||
*
|
*
|
||||||
* @param string $url URL of the given server
|
* @param string $url URL of the given server
|
||||||
* @param array $serverdata array with server data
|
* @param array $serverdata array with server data
|
||||||
*
|
|
||||||
* @return array server data
|
* @return array server data
|
||||||
*/
|
*/
|
||||||
private static function detectMastodonAlikes(string $url, array $serverdata)
|
private static function detectMastodonAlikes(string $url, array $serverdata): array
|
||||||
{
|
{
|
||||||
$curlResult = DI::httpClient()->get($url . '/api/v1/instance', HttpClientAccept::JSON);
|
$curlResult = DI::httpClient()->get($url . '/api/v1/instance', HttpClientAccept::JSON);
|
||||||
if (!$curlResult->isSuccess() || ($curlResult->getBody() == '')) {
|
if (!$curlResult->isSuccess() || ($curlResult->getBody() == '')) {
|
||||||
|
|
@ -1439,10 +1440,9 @@ class GServer
|
||||||
*
|
*
|
||||||
* @param string $url URL of the given server
|
* @param string $url URL of the given server
|
||||||
* @param array $serverdata array with server data
|
* @param array $serverdata array with server data
|
||||||
*
|
|
||||||
* @return array server data
|
* @return array server data
|
||||||
*/
|
*/
|
||||||
private static function detectHubzilla(string $url, array $serverdata)
|
private static function detectHubzilla(string $url, array $serverdata): array
|
||||||
{
|
{
|
||||||
$curlResult = DI::httpClient()->get($url . '/api/statusnet/config.json', HttpClientAccept::JSON);
|
$curlResult = DI::httpClient()->get($url . '/api/statusnet/config.json', HttpClientAccept::JSON);
|
||||||
if (!$curlResult->isSuccess() || ($curlResult->getBody() == '')) {
|
if (!$curlResult->isSuccess() || ($curlResult->getBody() == '')) {
|
||||||
|
|
@ -1517,10 +1517,9 @@ class GServer
|
||||||
* Converts input value to a boolean value
|
* Converts input value to a boolean value
|
||||||
*
|
*
|
||||||
* @param string|integer $val
|
* @param string|integer $val
|
||||||
*
|
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
private static function toBoolean($val)
|
private static function toBoolean($val): bool
|
||||||
{
|
{
|
||||||
if (($val == 'true') || ($val == 1)) {
|
if (($val == 'true') || ($val == 1)) {
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -1536,10 +1535,9 @@ class GServer
|
||||||
*
|
*
|
||||||
* @param string $url URL of the given server
|
* @param string $url URL of the given server
|
||||||
* @param array $serverdata array with server data
|
* @param array $serverdata array with server data
|
||||||
*
|
|
||||||
* @return array server data
|
* @return array server data
|
||||||
*/
|
*/
|
||||||
private static function detectPumpIO(string $url, array $serverdata)
|
private static function detectPumpIO(string $url, array $serverdata): array
|
||||||
{
|
{
|
||||||
$curlResult = DI::httpClient()->get($url . '/.well-known/host-meta.json', HttpClientAccept::JSON);
|
$curlResult = DI::httpClient()->get($url . '/.well-known/host-meta.json', HttpClientAccept::JSON);
|
||||||
if (!$curlResult->isSuccess()) {
|
if (!$curlResult->isSuccess()) {
|
||||||
|
|
@ -1549,7 +1547,6 @@ class GServer
|
||||||
$data = json_decode($curlResult->getBody(), true);
|
$data = json_decode($curlResult->getBody(), true);
|
||||||
if (empty($data['links'])) {
|
if (empty($data['links'])) {
|
||||||
return $serverdata;
|
return $serverdata;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// We are looking for some endpoints that are typical for pump.io
|
// We are looking for some endpoints that are typical for pump.io
|
||||||
|
|
@ -1586,10 +1583,9 @@ class GServer
|
||||||
*
|
*
|
||||||
* @param string $url URL of the given server
|
* @param string $url URL of the given server
|
||||||
* @param array $serverdata array with server data
|
* @param array $serverdata array with server data
|
||||||
*
|
|
||||||
* @return array server data
|
* @return array server data
|
||||||
*/
|
*/
|
||||||
private static function detectGNUSocial(string $url, array $serverdata)
|
private static function detectGNUSocial(string $url, array $serverdata): array
|
||||||
{
|
{
|
||||||
// Test for GNU Social
|
// Test for GNU Social
|
||||||
$curlResult = DI::httpClient()->get($url . '/api/gnusocial/version.json', HttpClientAccept::JSON);
|
$curlResult = DI::httpClient()->get($url . '/api/gnusocial/version.json', HttpClientAccept::JSON);
|
||||||
|
|
@ -1641,10 +1637,9 @@ class GServer
|
||||||
*
|
*
|
||||||
* @param string $url URL of the given server
|
* @param string $url URL of the given server
|
||||||
* @param array $serverdata array with server data
|
* @param array $serverdata array with server data
|
||||||
*
|
|
||||||
* @return array server data
|
* @return array server data
|
||||||
*/
|
*/
|
||||||
private static function detectFriendica(string $url, array $serverdata)
|
private static function detectFriendica(string $url, array $serverdata): array
|
||||||
{
|
{
|
||||||
// There is a bug in some versions of Friendica that will return an ActivityStream actor when the content type "application/json" is requested.
|
// There is a bug in some versions of Friendica that will return an ActivityStream actor when the content type "application/json" is requested.
|
||||||
// Because of this me must not use ACCEPT_JSON here.
|
// Because of this me must not use ACCEPT_JSON here.
|
||||||
|
|
@ -1717,10 +1712,9 @@ class GServer
|
||||||
* @param object $curlResult result of curl execution
|
* @param object $curlResult result of curl execution
|
||||||
* @param array $serverdata array with server data
|
* @param array $serverdata array with server data
|
||||||
* @param string $url Server URL
|
* @param string $url Server URL
|
||||||
*
|
|
||||||
* @return array server data
|
* @return array server data
|
||||||
*/
|
*/
|
||||||
private static function analyseRootBody($curlResult, array $serverdata, string $url)
|
private static function analyseRootBody($curlResult, array $serverdata, string $url): array
|
||||||
{
|
{
|
||||||
if (empty($curlResult->getBody())) {
|
if (empty($curlResult->getBody())) {
|
||||||
return $serverdata;
|
return $serverdata;
|
||||||
|
|
@ -1859,7 +1853,7 @@ class GServer
|
||||||
*
|
*
|
||||||
* @return array server data
|
* @return array server data
|
||||||
*/
|
*/
|
||||||
private static function analyseRootHeader($curlResult, array $serverdata)
|
private static function analyseRootHeader($curlResult, array $serverdata): array
|
||||||
{
|
{
|
||||||
if ($curlResult->getHeader('server') == 'Mastodon') {
|
if ($curlResult->getHeader('server') == 'Mastodon') {
|
||||||
$serverdata['platform'] = 'mastodon';
|
$serverdata['platform'] = 'mastodon';
|
||||||
|
|
@ -2054,7 +2048,7 @@ class GServer
|
||||||
* @return int
|
* @return int
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function getProtocol(int $gsid)
|
public static function getProtocol(int $gsid): int
|
||||||
{
|
{
|
||||||
if (empty($gsid)) {
|
if (empty($gsid)) {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,14 @@ class Group
|
||||||
const FOLLOWERS = '~';
|
const FOLLOWERS = '~';
|
||||||
const MUTUALS = '&';
|
const MUTUALS = '&';
|
||||||
|
|
||||||
public static function getByUserId($uid, $includesDeleted = false)
|
/**
|
||||||
|
* Fetches group record by user id and maybe includes deleted groups as well
|
||||||
|
*
|
||||||
|
* @param int $uid User id to fetch group(s) for
|
||||||
|
* @param bool $includesDeleted Whether deleted groups should be included
|
||||||
|
* @return array|bool Array on success, bool on error
|
||||||
|
*/
|
||||||
|
public static function getByUserId(int $uid, bool $includesDeleted = false)
|
||||||
{
|
{
|
||||||
$conditions = ['uid' => $uid, 'cid' => null];
|
$conditions = ['uid' => $uid, 'cid' => null];
|
||||||
|
|
||||||
|
|
@ -51,15 +58,18 @@ class Group
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $group_id
|
* Checks whether given group id is found in database
|
||||||
|
*
|
||||||
|
* @param int $group_id Groupd it
|
||||||
|
* @param int $uid Optional user id
|
||||||
* @return bool
|
* @return bool
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function exists($group_id, $uid = null)
|
public static function exists(int $group_id, int $uid = null): bool
|
||||||
{
|
{
|
||||||
$condition = ['id' => $group_id, 'deleted' => false];
|
$condition = ['id' => $group_id, 'deleted' => false];
|
||||||
|
|
||||||
if (isset($uid)) {
|
if (!is_null($uid)) {
|
||||||
$condition = [
|
$condition = [
|
||||||
'uid' => $uid
|
'uid' => $uid
|
||||||
];
|
];
|
||||||
|
|
@ -73,12 +83,12 @@ class Group
|
||||||
*
|
*
|
||||||
* Note: If we found a deleted group with the same name, we restore it
|
* Note: If we found a deleted group with the same name, we restore it
|
||||||
*
|
*
|
||||||
* @param int $uid
|
* @param int $uid User id to create group for
|
||||||
* @param string $name
|
* @param string $name Name of group
|
||||||
* @return boolean
|
* @return int|boolean Id of newly created group or false on error
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function create($uid, $name)
|
public static function create(int $uid, string $name)
|
||||||
{
|
{
|
||||||
$return = false;
|
$return = false;
|
||||||
if (!empty($uid) && !empty($name)) {
|
if (!empty($uid) && !empty($name)) {
|
||||||
|
|
@ -114,7 +124,7 @@ class Group
|
||||||
* @return bool Was the update successful?
|
* @return bool Was the update successful?
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function update($id, $name)
|
public static function update(int $id, string $name): bool
|
||||||
{
|
{
|
||||||
return DBA::update('group', ['name' => $name], ['id' => $id]);
|
return DBA::update('group', ['name' => $name], ['id' => $id]);
|
||||||
}
|
}
|
||||||
|
|
@ -122,11 +132,11 @@ class Group
|
||||||
/**
|
/**
|
||||||
* Get a list of group ids a contact belongs to
|
* Get a list of group ids a contact belongs to
|
||||||
*
|
*
|
||||||
* @param int $cid
|
* @param int $cid Contact id
|
||||||
* @return array
|
* @return array Group ids
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function getIdsByContactId($cid)
|
public static function getIdsByContactId(int $cid): array
|
||||||
{
|
{
|
||||||
$return = [];
|
$return = [];
|
||||||
|
|
||||||
|
|
@ -185,12 +195,12 @@ class Group
|
||||||
*
|
*
|
||||||
* Returns false if no group has been found.
|
* Returns false if no group has been found.
|
||||||
*
|
*
|
||||||
* @param int $uid
|
* @param int $uid User id
|
||||||
* @param string $name
|
* @param string $name Group name
|
||||||
* @return int|boolean
|
* @return int|boolean Groups' id number or false on error
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function getIdByName($uid, $name)
|
public static function getIdByName(int $uid, string $name)
|
||||||
{
|
{
|
||||||
if (!$uid || !strlen($name)) {
|
if (!$uid || !strlen($name)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -211,7 +221,7 @@ class Group
|
||||||
* @return boolean
|
* @return boolean
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function remove($gid)
|
public static function remove(int $gid): bool
|
||||||
{
|
{
|
||||||
if (!$gid) {
|
if (!$gid) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -314,13 +324,14 @@ class Group
|
||||||
* Adds contacts to a group
|
* Adds contacts to a group
|
||||||
*
|
*
|
||||||
* @param int $gid
|
* @param int $gid
|
||||||
* @param array $contacts
|
* @param array $contacts Array with contact ids
|
||||||
|
* @return void
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function addMembers(int $gid, array $contacts)
|
public static function addMembers(int $gid, array $contacts)
|
||||||
{
|
{
|
||||||
if (!$gid || !$contacts) {
|
if (!$gid || !$contacts) {
|
||||||
return false;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @TODO Backward compatibility with user contacts, remove by version 2022.03
|
// @TODO Backward compatibility with user contacts, remove by version 2022.03
|
||||||
|
|
@ -342,8 +353,9 @@ class Group
|
||||||
/**
|
/**
|
||||||
* Removes contacts from a group
|
* Removes contacts from a group
|
||||||
*
|
*
|
||||||
* @param int $gid
|
* @param int $gid Group id
|
||||||
* @param array $contacts
|
* @param array $contacts Contact ids
|
||||||
|
* @return bool
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function removeMembers(int $gid, array $contacts)
|
public static function removeMembers(int $gid, array $contacts)
|
||||||
|
|
@ -369,19 +381,20 @@ class Group
|
||||||
$contactIds[] = $cdata['user'];
|
$contactIds[] = $cdata['user'];
|
||||||
}
|
}
|
||||||
|
|
||||||
DBA::delete('group_member', ['gid' => $gid, 'contact-id' => $contactIds]);
|
// Return status of deletion
|
||||||
|
return DBA::delete('group_member', ['gid' => $gid, 'contact-id' => $contactIds]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the combined list of contact ids from a group id list
|
* Returns the combined list of contact ids from a group id list
|
||||||
*
|
*
|
||||||
* @param int $uid
|
* @param int $uid User id
|
||||||
* @param array $group_ids
|
* @param array $group_ids Groups ids
|
||||||
* @param boolean $check_dead
|
* @param boolean $check_dead Whether check "dead" records (?)
|
||||||
* @return array
|
* @return array
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function expand($uid, array $group_ids, $check_dead = false)
|
public static function expand(int $uid, array $group_ids, bool $check_dead = false): array
|
||||||
{
|
{
|
||||||
if (!is_array($group_ids) || !count($group_ids)) {
|
if (!is_array($group_ids) || !count($group_ids)) {
|
||||||
return [];
|
return [];
|
||||||
|
|
@ -454,13 +467,13 @@ class Group
|
||||||
/**
|
/**
|
||||||
* Returns a templated group selection list
|
* Returns a templated group selection list
|
||||||
*
|
*
|
||||||
* @param int $uid
|
* @param int $uid User id
|
||||||
* @param int $gid An optional pre-selected group
|
* @param int $gid An optional pre-selected group
|
||||||
* @param string $label An optional label of the list
|
* @param string $label An optional label of the list
|
||||||
* @return string
|
* @return string
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function displayGroupSelection($uid, $gid = 0, $label = '')
|
public static function displayGroupSelection(int $uid, int $gid = 0, string $label = ''): string
|
||||||
{
|
{
|
||||||
$display_groups = [
|
$display_groups = [
|
||||||
[
|
[
|
||||||
|
|
@ -502,12 +515,12 @@ class Group
|
||||||
* 'standard' => include link 'Edit groups'
|
* 'standard' => include link 'Edit groups'
|
||||||
* 'extended' => include link 'Create new group'
|
* 'extended' => include link 'Create new group'
|
||||||
* 'full' => include link 'Create new group' and provide for each group a link to edit this group
|
* 'full' => include link 'Create new group' and provide for each group a link to edit this group
|
||||||
* @param string $group_id
|
* @param string|int $group_id Distinct group id or 'everyone'
|
||||||
* @param int $cid
|
* @param int $cid Contact id
|
||||||
* @return string
|
* @return string Sidebar widget HTML code
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function sidebarWidget($every = 'contact', $each = 'group', $editmode = 'standard', $group_id = '', $cid = 0)
|
public static function sidebarWidget(string $every = 'contact', string $each = 'group', string $editmode = 'standard', $group_id = '', int $cid = 0)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!local_user()) {
|
||||||
return '';
|
return '';
|
||||||
|
|
@ -589,7 +602,7 @@ class Group
|
||||||
* @param integer $id Contact ID
|
* @param integer $id Contact ID
|
||||||
* @return integer Group IO
|
* @return integer Group IO
|
||||||
*/
|
*/
|
||||||
public static function getIdForForum(int $id)
|
public static function getIdForForum(int $id): int
|
||||||
{
|
{
|
||||||
Logger::info('Get id for forum id', ['id' => $id]);
|
Logger::info('Get id for forum id', ['id' => $id]);
|
||||||
$contact = Contact::getById($id, ['uid', 'name', 'contact-type', 'manually-approve']);
|
$contact = Contact::getById($id, ['uid', 'name', 'contact-type', 'manually-approve']);
|
||||||
|
|
@ -617,6 +630,7 @@ class Group
|
||||||
* Fetch the followers of a given contact id and store them as group members
|
* Fetch the followers of a given contact id and store them as group members
|
||||||
*
|
*
|
||||||
* @param integer $id Contact ID
|
* @param integer $id Contact ID
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function updateMembersForForum(int $id)
|
public static function updateMembersForForum(int $id)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -96,8 +96,8 @@ class Item
|
||||||
'event-created', 'event-edited', 'event-start', 'event-finish',
|
'event-created', 'event-edited', 'event-start', 'event-finish',
|
||||||
'event-summary', 'event-desc', 'event-location', 'event-type',
|
'event-summary', 'event-desc', 'event-location', 'event-type',
|
||||||
'event-nofinish', 'event-ignore', 'event-id',
|
'event-nofinish', 'event-ignore', 'event-id',
|
||||||
"question-id", "question-multiple", "question-voters", "question-end-time",
|
'question-id', 'question-multiple', 'question-voters', 'question-end-time',
|
||||||
"has-categories", "has-media",
|
'has-categories', 'has-media',
|
||||||
'delivery_queue_count', 'delivery_queue_done', 'delivery_queue_failed'
|
'delivery_queue_count', 'delivery_queue_done', 'delivery_queue_failed'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -226,7 +226,7 @@ class Item
|
||||||
|
|
||||||
foreach ($notify_items as $notify_item) {
|
foreach ($notify_items as $notify_item) {
|
||||||
$post = Post::selectFirst(['uri-id', 'uid'], ['id' => $notify_item]);
|
$post = Post::selectFirst(['uri-id', 'uid'], ['id' => $notify_item]);
|
||||||
Worker::add(PRIORITY_HIGH, "Notifier", Delivery::POST, (int)$post['uri-id'], (int)$post['uid']);
|
Worker::add(PRIORITY_HIGH, 'Notifier', Delivery::POST, (int)$post['uri-id'], (int)$post['uid']);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $rows;
|
return $rows;
|
||||||
|
|
@ -237,9 +237,10 @@ class Item
|
||||||
*
|
*
|
||||||
* @param array $condition The condition for finding the item entries
|
* @param array $condition The condition for finding the item entries
|
||||||
* @param integer $priority Priority for the notification
|
* @param integer $priority Priority for the notification
|
||||||
|
* @return void
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function markForDeletion($condition, $priority = PRIORITY_HIGH)
|
public static function markForDeletion(array $condition, int $priority = PRIORITY_HIGH)
|
||||||
{
|
{
|
||||||
$items = Post::select(['id'], $condition);
|
$items = Post::select(['id'], $condition);
|
||||||
while ($item = Post::fetch($items)) {
|
while ($item = Post::fetch($items)) {
|
||||||
|
|
@ -253,9 +254,10 @@ class Item
|
||||||
*
|
*
|
||||||
* @param array $condition The condition for finding the item entries
|
* @param array $condition The condition for finding the item entries
|
||||||
* @param integer $uid User who wants to delete this item
|
* @param integer $uid User who wants to delete this item
|
||||||
|
* @return void
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function deleteForUser($condition, $uid)
|
public static function deleteForUser(array $condition, int $uid)
|
||||||
{
|
{
|
||||||
if ($uid == 0) {
|
if ($uid == 0) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -282,11 +284,10 @@ class Item
|
||||||
*
|
*
|
||||||
* @param integer $item_id
|
* @param integer $item_id
|
||||||
* @param integer $priority Priority for the notification
|
* @param integer $priority Priority for the notification
|
||||||
*
|
|
||||||
* @return boolean success
|
* @return boolean success
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function markForDeletionById($item_id, $priority = PRIORITY_HIGH)
|
public static function markForDeletionById(int $item_id, int $priority = PRIORITY_HIGH): bool
|
||||||
{
|
{
|
||||||
Logger::info('Mark item for deletion by id', ['id' => $item_id, 'callstack' => System::callstack()]);
|
Logger::info('Mark item for deletion by id', ['id' => $item_id, 'callstack' => System::callstack()]);
|
||||||
// locate item to be deleted
|
// locate item to be deleted
|
||||||
|
|
@ -331,7 +332,7 @@ class Item
|
||||||
// If item has attachments, drop them
|
// If item has attachments, drop them
|
||||||
$attachments = Post\Media::getByURIId($item['uri-id'], [Post\Media::DOCUMENT]);
|
$attachments = Post\Media::getByURIId($item['uri-id'], [Post\Media::DOCUMENT]);
|
||||||
foreach($attachments as $attachment) {
|
foreach($attachments as $attachment) {
|
||||||
if (preg_match("|attach/(\d+)|", $attachment['url'], $matches)) {
|
if (preg_match('|attach/(\d+)|', $attachment['url'], $matches)) {
|
||||||
Attach::delete(['id' => $matches[1], 'uid' => $item['uid']]);
|
Attach::delete(['id' => $matches[1], 'uid' => $item['uid']]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -360,7 +361,7 @@ class Item
|
||||||
|
|
||||||
// send the notification upstream/downstream
|
// send the notification upstream/downstream
|
||||||
if ($priority) {
|
if ($priority) {
|
||||||
Worker::add(['priority' => $priority, 'dont_fork' => true], "Notifier", Delivery::DELETION, (int)$item['uri-id'], (int)$item['uid']);
|
Worker::add(['priority' => $priority, 'dont_fork' => true], 'Notifier', Delivery::DELETION, (int)$item['uri-id'], (int)$item['uid']);
|
||||||
}
|
}
|
||||||
} elseif ($item['uid'] != 0) {
|
} elseif ($item['uid'] != 0) {
|
||||||
Post\User::update($item['uri-id'], $item['uid'], ['hidden' => true]);
|
Post\User::update($item['uri-id'], $item['uid'], ['hidden' => true]);
|
||||||
|
|
@ -372,7 +373,14 @@ class Item
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function guid($item, $notify)
|
/**
|
||||||
|
* Get guid from given item record
|
||||||
|
*
|
||||||
|
* @param array $item Item record
|
||||||
|
* @param bool Whether to notify (?)
|
||||||
|
* @return string Guid
|
||||||
|
*/
|
||||||
|
public static function guid(array $item, bool $notify): string
|
||||||
{
|
{
|
||||||
if (!empty($item['guid'])) {
|
if (!empty($item['guid'])) {
|
||||||
return trim($item['guid']);
|
return trim($item['guid']);
|
||||||
|
|
@ -425,7 +433,13 @@ class Item
|
||||||
return $guid;
|
return $guid;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function contactId($item)
|
/**
|
||||||
|
* Returns contact id from given item record
|
||||||
|
*
|
||||||
|
* @param array $item Item record
|
||||||
|
* @return int Contact id
|
||||||
|
*/
|
||||||
|
private static function contactId(array $item): int
|
||||||
{
|
{
|
||||||
if (!empty($item['contact-id']) && DBA::exists('contact', ['self' => true, 'id' => $item['contact-id']])) {
|
if (!empty($item['contact-id']) && DBA::exists('contact', ['self' => true, 'id' => $item['contact-id']])) {
|
||||||
return $item['contact-id'];
|
return $item['contact-id'];
|
||||||
|
|
@ -451,17 +465,17 @@ class Item
|
||||||
* @param array $item The item fields that are to be inserted
|
* @param array $item The item fields that are to be inserted
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function spool($orig_item)
|
private static function spool(array $item)
|
||||||
{
|
{
|
||||||
// Now we store the data in the spool directory
|
// Now we store the data in the spool directory
|
||||||
// We use "microtime" to keep the arrival order and "mt_rand" to avoid duplicates
|
// We use "microtime" to keep the arrival order and "mt_rand" to avoid duplicates
|
||||||
$file = 'item-' . round(microtime(true) * 10000) . '-' . mt_rand() . '.msg';
|
$file = 'item-' . round(microtime(true) * 10000) . '-' . mt_rand() . '.msg';
|
||||||
|
|
||||||
$spoolpath = System::getSpoolPath();
|
$spoolpath = System::getSpoolPath();
|
||||||
if ($spoolpath != "") {
|
if ($spoolpath != '') {
|
||||||
$spool = $spoolpath . '/' . $file;
|
$spool = $spoolpath . '/' . $file;
|
||||||
|
|
||||||
file_put_contents($spool, json_encode($orig_item));
|
file_put_contents($spool, json_encode($item));
|
||||||
Logger::warning("Item wasn't stored - Item was spooled into file", ['file' => $file]);
|
Logger::warning("Item wasn't stored - Item was spooled into file", ['file' => $file]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -469,10 +483,10 @@ class Item
|
||||||
/**
|
/**
|
||||||
* Check if the item array is a duplicate
|
* Check if the item array is a duplicate
|
||||||
*
|
*
|
||||||
* @param array $item
|
* @param array $item Item record
|
||||||
* @return boolean is it a duplicate?
|
* @return boolean is it a duplicate?
|
||||||
*/
|
*/
|
||||||
private static function isDuplicate(array $item)
|
private static function isDuplicate(array $item): bool
|
||||||
{
|
{
|
||||||
// Checking if there is already an item with the same guid
|
// Checking if there is already an item with the same guid
|
||||||
$condition = ['guid' => $item['guid'], 'network' => $item['network'], 'uid' => $item['uid']];
|
$condition = ['guid' => $item['guid'], 'network' => $item['network'], 'uid' => $item['uid']];
|
||||||
|
|
@ -521,10 +535,10 @@ class Item
|
||||||
/**
|
/**
|
||||||
* Check if the item array is valid
|
* Check if the item array is valid
|
||||||
*
|
*
|
||||||
* @param array $item
|
* @param array $item Item record
|
||||||
* @return boolean item is valid
|
* @return boolean item is valid
|
||||||
*/
|
*/
|
||||||
public static function isValid(array $item)
|
public static function isValid(array $item): bool
|
||||||
{
|
{
|
||||||
// When there is no content then we don't post it
|
// When there is no content then we don't post it
|
||||||
if (($item['body'] . $item['title'] == '') && (empty($item['uri-id']) || !Post\Media::existsByURIId($item['uri-id']))) {
|
if (($item['body'] . $item['title'] == '') && (empty($item['uri-id']) || !Post\Media::existsByURIId($item['uri-id']))) {
|
||||||
|
|
@ -591,10 +605,10 @@ class Item
|
||||||
/**
|
/**
|
||||||
* Check if the item array is too old
|
* Check if the item array is too old
|
||||||
*
|
*
|
||||||
* @param array $item
|
* @param array $item Item record
|
||||||
* @return boolean item is too old
|
* @return boolean item is too old
|
||||||
*/
|
*/
|
||||||
public static function isTooOld(array $item)
|
public static function isTooOld(array $item): bool
|
||||||
{
|
{
|
||||||
// check for create date and expire time
|
// check for create date and expire time
|
||||||
$expire_interval = DI::config()->get('system', 'dbclean-expire-days', 0);
|
$expire_interval = DI::config()->get('system', 'dbclean-expire-days', 0);
|
||||||
|
|
@ -623,15 +637,20 @@ class Item
|
||||||
/**
|
/**
|
||||||
* Return the id of the given item array if it has been stored before
|
* Return the id of the given item array if it has been stored before
|
||||||
*
|
*
|
||||||
* @param array $item
|
* @param array $item Item record
|
||||||
* @return integer item id
|
* @return integer Item id or zero on error
|
||||||
*/
|
*/
|
||||||
private static function getDuplicateID(array $item)
|
private static function getDuplicateID(array $item): int
|
||||||
{
|
{
|
||||||
if (empty($item['network']) || in_array($item['network'], Protocol::FEDERATED)) {
|
if (empty($item['network']) || in_array($item['network'], Protocol::FEDERATED)) {
|
||||||
$condition = ["`uri-id` = ? AND `uid` = ? AND `network` IN (?, ?, ?, ?)",
|
$condition = ['`uri-id` = ? AND `uid` = ? AND `network` IN (?, ?, ?, ?)',
|
||||||
$item['uri-id'], $item['uid'],
|
$item['uri-id'],
|
||||||
Protocol::ACTIVITYPUB, Protocol::DIASPORA, Protocol::DFRN, Protocol::OSTATUS];
|
$item['uid'],
|
||||||
|
Protocol::ACTIVITYPUB,
|
||||||
|
Protocol::DIASPORA,
|
||||||
|
Protocol::DFRN,
|
||||||
|
Protocol::OSTATUS
|
||||||
|
];
|
||||||
$existing = Post::selectFirst(['id', 'network'], $condition);
|
$existing = Post::selectFirst(['id', 'network'], $condition);
|
||||||
if (DBA::isResult($existing)) {
|
if (DBA::isResult($existing)) {
|
||||||
// We only log the entries with a different user id than 0. Otherwise we would have too many false positives
|
// We only log the entries with a different user id than 0. Otherwise we would have too many false positives
|
||||||
|
|
@ -640,12 +659,12 @@ class Item
|
||||||
'uri-id' => $item['uri-id'],
|
'uri-id' => $item['uri-id'],
|
||||||
'uid' => $item['uid'],
|
'uid' => $item['uid'],
|
||||||
'network' => $item['network'],
|
'network' => $item['network'],
|
||||||
'existing_id' => $existing["id"],
|
'existing_id' => $existing['id'],
|
||||||
'existing_network' => $existing["network"]
|
'existing_network' => $existing['network']
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $existing["id"];
|
return $existing['id'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -658,7 +677,7 @@ class Item
|
||||||
* @return array item array with parent data
|
* @return array item array with parent data
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function getTopLevelParent(array $item)
|
private static function getTopLevelParent(array $item): array
|
||||||
{
|
{
|
||||||
$fields = ['uid', 'uri', 'parent-uri', 'id', 'deleted',
|
$fields = ['uid', 'uri', 'parent-uri', 'id', 'deleted',
|
||||||
'uri-id', 'parent-uri-id',
|
'uri-id', 'parent-uri-id',
|
||||||
|
|
@ -709,7 +728,7 @@ class Item
|
||||||
* @param array $item
|
* @param array $item
|
||||||
* @return integer gravity
|
* @return integer gravity
|
||||||
*/
|
*/
|
||||||
private static function getGravity(array $item)
|
private static function getGravity(array $item): int
|
||||||
{
|
{
|
||||||
$activity = DI::activity();
|
$activity = DI::activity();
|
||||||
|
|
||||||
|
|
@ -724,11 +743,20 @@ class Item
|
||||||
} elseif ($activity->match($item['verb'], Activity::ANNOUNCE)) {
|
} elseif ($activity->match($item['verb'], Activity::ANNOUNCE)) {
|
||||||
return GRAVITY_ACTIVITY;
|
return GRAVITY_ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger::info('Unknown gravity for verb', ['verb' => $item['verb']]);
|
Logger::info('Unknown gravity for verb', ['verb' => $item['verb']]);
|
||||||
return GRAVITY_UNKNOWN; // Should not happen
|
return GRAVITY_UNKNOWN; // Should not happen
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function insert(array $item, int $notify = 0, bool $post_local = true)
|
/**
|
||||||
|
* Inserts item record
|
||||||
|
*
|
||||||
|
* @param array $item Item array to be inserted
|
||||||
|
* @param int $notify Notification (type?)
|
||||||
|
* @param bool $post_local (???)
|
||||||
|
* @return int Zero means error, otherwise primary key (id) is being returned
|
||||||
|
*/
|
||||||
|
public static function insert(array $item, int $notify = 0, bool $post_local = true): int
|
||||||
{
|
{
|
||||||
$orig_item = $item;
|
$orig_item = $item;
|
||||||
|
|
||||||
|
|
@ -869,7 +897,7 @@ class Item
|
||||||
Contact::checkAvatarCache($item['owner-id']);
|
Contact::checkAvatarCache($item['owner-id']);
|
||||||
|
|
||||||
// The contact-id should be set before "self::insert" was called - but there seems to be issues sometimes
|
// The contact-id should be set before "self::insert" was called - but there seems to be issues sometimes
|
||||||
$item["contact-id"] = self::contactId($item);
|
$item['contact-id'] = self::contactId($item);
|
||||||
|
|
||||||
if (!empty($item['direction']) && in_array($item['direction'], [Conversation::PUSH, Conversation::RELAY]) &&
|
if (!empty($item['direction']) && in_array($item['direction'], [Conversation::PUSH, Conversation::RELAY]) &&
|
||||||
empty($item['origin']) &&self::isTooOld($item)) {
|
empty($item['origin']) &&self::isTooOld($item)) {
|
||||||
|
|
@ -944,8 +972,8 @@ class Item
|
||||||
$item['thr-parent-id'] = ItemURI::getIdByURI($item['thr-parent']);
|
$item['thr-parent-id'] = ItemURI::getIdByURI($item['thr-parent']);
|
||||||
|
|
||||||
// Is this item available in the global items (with uid=0)?
|
// Is this item available in the global items (with uid=0)?
|
||||||
if ($item["uid"] == 0) {
|
if ($item['uid'] == 0) {
|
||||||
$item["global"] = true;
|
$item['global'] = true;
|
||||||
|
|
||||||
// Set the global flag on all items if this was a global item entry
|
// Set the global flag on all items if this was a global item entry
|
||||||
Post::update(['global' => true], ['uri-id' => $item['uri-id']]);
|
Post::update(['global' => true], ['uri-id' => $item['uri-id']]);
|
||||||
|
|
@ -954,8 +982,8 @@ class Item
|
||||||
}
|
}
|
||||||
|
|
||||||
// ACL settings
|
// ACL settings
|
||||||
if (!empty($item["allow_cid"] . $item["allow_gid"] . $item["deny_cid"] . $item["deny_gid"])) {
|
if (!empty($item['allow_cid'] . $item['allow_gid'] . $item['deny_cid'] . $item['deny_gid'])) {
|
||||||
$item["private"] = self::PRIVATE;
|
$item['private'] = self::PRIVATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($notify && $post_local) {
|
if ($notify && $post_local) {
|
||||||
|
|
@ -1323,7 +1351,7 @@ class Item
|
||||||
* @param string $signed_text Original text (for Diaspora signatures), JSON encoded.
|
* @param string $signed_text Original text (for Diaspora signatures), JSON encoded.
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function distribute($itemid, $signed_text = '')
|
public static function distribute(int $itemid, string $signed_text = '')
|
||||||
{
|
{
|
||||||
$condition = ["`id` IN (SELECT `parent` FROM `post-user-view` WHERE `id` = ?)", $itemid];
|
$condition = ["`id` IN (SELECT `parent` FROM `post-user-view` WHERE `id` = ?)", $itemid];
|
||||||
$parent = Post::selectFirst(['owner-id'], $condition);
|
$parent = Post::selectFirst(['owner-id'], $condition);
|
||||||
|
|
@ -1417,7 +1445,7 @@ class Item
|
||||||
* @param integer $source_uid User id of the source post
|
* @param integer $source_uid User id of the source post
|
||||||
* @return integer stored item id
|
* @return integer stored item id
|
||||||
*/
|
*/
|
||||||
public static function storeForUserByUriId(int $uri_id, int $uid, array $fields = [], int $source_uid = 0)
|
public static function storeForUserByUriId(int $uri_id, int $uid, array $fields = [], int $source_uid = 0): int
|
||||||
{
|
{
|
||||||
if ($uid == $source_uid) {
|
if ($uid == $source_uid) {
|
||||||
Logger::warning('target UID must not be be equal to the source UID', ['uri-id' => $uri_id, 'uid' => $uid]);
|
Logger::warning('target UID must not be be equal to the source UID', ['uri-id' => $uri_id, 'uid' => $uid]);
|
||||||
|
|
@ -1525,7 +1553,7 @@ class Item
|
||||||
* @return integer stored item id
|
* @return integer stored item id
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function storeForUser(array $item, int $uid)
|
private static function storeForUser(array $item, int $uid): int
|
||||||
{
|
{
|
||||||
if (Post::exists(['uri-id' => $item['uri-id'], 'uid' => $uid])) {
|
if (Post::exists(['uri-id' => $item['uri-id'], 'uid' => $uid])) {
|
||||||
if (!empty($item['event-id'])) {
|
if (!empty($item['event-id'])) {
|
||||||
|
|
@ -1613,7 +1641,7 @@ class Item
|
||||||
* @param integer $itemid Item ID that should be added
|
* @param integer $itemid Item ID that should be added
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function addShadow($itemid)
|
private static function addShadow(int $itemid)
|
||||||
{
|
{
|
||||||
$fields = ['uid', 'private', 'visible', 'deleted', 'network', 'uri-id'];
|
$fields = ['uid', 'private', 'visible', 'deleted', 'network', 'uri-id'];
|
||||||
$condition = ['id' => $itemid, 'gravity' => GRAVITY_PARENT];
|
$condition = ['id' => $itemid, 'gravity' => GRAVITY_PARENT];
|
||||||
|
|
@ -1676,7 +1704,7 @@ class Item
|
||||||
* @param integer $itemid Item ID that should be added
|
* @param integer $itemid Item ID that should be added
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function addShadowPost($itemid)
|
private static function addShadowPost(int $itemid)
|
||||||
{
|
{
|
||||||
$item = Post::selectFirst(self::ITEM_FIELDLIST, ['id' => $itemid]);
|
$item = Post::selectFirst(self::ITEM_FIELDLIST, ['id' => $itemid]);
|
||||||
if (!DBA::isResult($item)) {
|
if (!DBA::isResult($item)) {
|
||||||
|
|
@ -1740,7 +1768,7 @@ class Item
|
||||||
* @return string detected language
|
* @return string detected language
|
||||||
* @throws \Text_LanguageDetect_Exception
|
* @throws \Text_LanguageDetect_Exception
|
||||||
*/
|
*/
|
||||||
private static function getLanguage(array $item)
|
private static function getLanguage(array $item): string
|
||||||
{
|
{
|
||||||
if (!empty($item['language'])) {
|
if (!empty($item['language'])) {
|
||||||
return $item['language'];
|
return $item['language'];
|
||||||
|
|
@ -1784,7 +1812,7 @@ class Item
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getLanguageMessage(array $item)
|
public static function getLanguageMessage(array $item): string
|
||||||
{
|
{
|
||||||
$iso639 = new \Matriphe\ISO639\ISO639;
|
$iso639 = new \Matriphe\ISO639\ISO639;
|
||||||
|
|
||||||
|
|
@ -1806,7 +1834,7 @@ class Item
|
||||||
* @param string $host hostname for the GUID prefix
|
* @param string $host hostname for the GUID prefix
|
||||||
* @return string unique guid
|
* @return string unique guid
|
||||||
*/
|
*/
|
||||||
public static function guidFromUri($uri, $host)
|
public static function guidFromUri(string $uri, string $host): string
|
||||||
{
|
{
|
||||||
// Our regular guid routine is using this kind of prefix as well
|
// Our regular guid routine is using this kind of prefix as well
|
||||||
// We have to avoid that different routines could accidentally create the same value
|
// We have to avoid that different routines could accidentally create the same value
|
||||||
|
|
@ -1850,7 +1878,7 @@ class Item
|
||||||
* @param array $arr Contains the just posted item record
|
* @param array $arr Contains the just posted item record
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function updateContact($arr)
|
private static function updateContact(array $arr)
|
||||||
{
|
{
|
||||||
// Unarchive the author
|
// Unarchive the author
|
||||||
$contact = DBA::selectFirst('contact', [], ['id' => $arr["author-id"]]);
|
$contact = DBA::selectFirst('contact', [], ['id' => $arr["author-id"]]);
|
||||||
|
|
@ -1897,7 +1925,7 @@ class Item
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function setHashtags($body)
|
public static function setHashtags(string $body): string
|
||||||
{
|
{
|
||||||
$body = BBCode::performWithEscapedTags($body, ['noparse', 'pre', 'code', 'img'], function ($body) {
|
$body = BBCode::performWithEscapedTags($body, ['noparse', 'pre', 'code', 'img'], function ($body) {
|
||||||
$tags = BBCode::getTags($body);
|
$tags = BBCode::getTags($body);
|
||||||
|
|
@ -1971,7 +1999,7 @@ class Item
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
private static function tagDeliver($uid, $item_id)
|
private static function tagDeliver(int $uid, int $item_id): bool
|
||||||
{
|
{
|
||||||
$mention = false;
|
$mention = false;
|
||||||
|
|
||||||
|
|
@ -2066,7 +2094,7 @@ class Item
|
||||||
self::performActivity($item['id'], 'announce', $item['uid']);
|
self::performActivity($item['id'], 'announce', $item['uid']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function isRemoteSelf($contact, &$datarray)
|
public static function isRemoteSelf(array $contact, array &$datarray): bool
|
||||||
{
|
{
|
||||||
if (!$contact['remote_self']) {
|
if (!$contact['remote_self']) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -2160,7 +2188,7 @@ class Item
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function fixPrivatePhotos($s, $uid, $item = null, $cid = 0)
|
public static function fixPrivatePhotos(string $s, int $uid, array $item = null, int $cid = 0): string
|
||||||
{
|
{
|
||||||
if (DI::config()->get('system', 'disable_embedded')) {
|
if (DI::config()->get('system', 'disable_embedded')) {
|
||||||
return $s;
|
return $s;
|
||||||
|
|
@ -2254,13 +2282,14 @@ class Item
|
||||||
return $new_body;
|
return $new_body;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function hasPermissions($obj)
|
private static function hasPermissions(array $obj)
|
||||||
{
|
{
|
||||||
return !empty($obj['allow_cid']) || !empty($obj['allow_gid']) ||
|
return !empty($obj['allow_cid']) || !empty($obj['allow_gid']) ||
|
||||||
!empty($obj['deny_cid']) || !empty($obj['deny_gid']);
|
!empty($obj['deny_cid']) || !empty($obj['deny_gid']);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function samePermissions($uid, $obj1, $obj2)
|
// @TODO $uid is unused parameter
|
||||||
|
private static function samePermissions($uid, array $obj1, array $obj2): bool
|
||||||
{
|
{
|
||||||
// first part is easy. Check that these are exactly the same.
|
// first part is easy. Check that these are exactly the same.
|
||||||
if (($obj1['allow_cid'] == $obj2['allow_cid'])
|
if (($obj1['allow_cid'] == $obj2['allow_cid'])
|
||||||
|
|
@ -2288,7 +2317,7 @@ class Item
|
||||||
* @return array
|
* @return array
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function enumeratePermissions(array $obj, bool $check_dead = false)
|
public static function enumeratePermissions(array $obj, bool $check_dead = false): array
|
||||||
{
|
{
|
||||||
$aclFormater = DI::aclFormatter();
|
$aclFormater = DI::aclFormatter();
|
||||||
|
|
||||||
|
|
@ -2376,7 +2405,7 @@ class Item
|
||||||
Logger::notice('User ' . $uid . ": expired $expired items; expire items: $expire_items, expire notes: $expire_notes, expire starred: $expire_starred, expire photos: $expire_photos");
|
Logger::notice('User ' . $uid . ": expired $expired items; expire items: $expire_items, expire notes: $expire_notes, expire starred: $expire_starred, expire photos: $expire_photos");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function firstPostDate($uid, $wall = false)
|
public static function firstPostDate(int $uid, bool $wall = false)
|
||||||
{
|
{
|
||||||
$user = User::getById($uid, ['register_date']);
|
$user = User::getById($uid, ['register_date']);
|
||||||
if (empty($user)) {
|
if (empty($user)) {
|
||||||
|
|
@ -2417,7 +2446,7 @@ class Item
|
||||||
* array $arr
|
* array $arr
|
||||||
* 'post_id' => ID of posted item
|
* 'post_id' => ID of posted item
|
||||||
*/
|
*/
|
||||||
public static function performActivity(int $item_id, string $verb, int $uid, string $allow_cid = null, string $allow_gid = null, string $deny_cid = null, string $deny_gid = null)
|
public static function performActivity(int $item_id, string $verb, int $uid, string $allow_cid = null, string $allow_gid = null, string $deny_cid = null, string $deny_gid = null): bool
|
||||||
{
|
{
|
||||||
if (empty($uid)) {
|
if (empty($uid)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -2611,7 +2640,7 @@ class Item
|
||||||
* @param integer $owner_id User ID for which the permissions should be fetched
|
* @param integer $owner_id User ID for which the permissions should be fetched
|
||||||
* @return array condition
|
* @return array condition
|
||||||
*/
|
*/
|
||||||
public static function getPermissionsConditionArrayByUserId(int $owner_id)
|
public static function getPermissionsConditionArrayByUserId(int $owner_id): array
|
||||||
{
|
{
|
||||||
$local_user = local_user();
|
$local_user = local_user();
|
||||||
$remote_user = Session::getRemoteContactID($owner_id);
|
$remote_user = Session::getRemoteContactID($owner_id);
|
||||||
|
|
@ -2643,7 +2672,7 @@ class Item
|
||||||
* @param string $table
|
* @param string $table
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getPermissionsSQLByUserId(int $owner_id, string $table = '')
|
public static function getPermissionsSQLByUserId(int $owner_id, string $table = ''): string
|
||||||
{
|
{
|
||||||
$local_user = local_user();
|
$local_user = local_user();
|
||||||
$remote_user = Session::getRemoteContactID($owner_id);
|
$remote_user = Session::getRemoteContactID($owner_id);
|
||||||
|
|
@ -2691,7 +2720,7 @@ class Item
|
||||||
* @param \Friendica\Core\L10n $l10n
|
* @param \Friendica\Core\L10n $l10n
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function postType(array $item, \Friendica\Core\L10n $l10n)
|
public static function postType(array $item, \Friendica\Core\L10n $l10n): string
|
||||||
{
|
{
|
||||||
if (!empty($item['event-id'])) {
|
if (!empty($item['event-id'])) {
|
||||||
return $l10n->t('event');
|
return $l10n->t('event');
|
||||||
|
|
@ -2757,10 +2786,10 @@ class Item
|
||||||
* Given an item array, convert the body element from bbcode to html and add smilie icons.
|
* Given an item array, convert the body element from bbcode to html and add smilie icons.
|
||||||
* If attach is true, also add icons for item attachments.
|
* If attach is true, also add icons for item attachments.
|
||||||
*
|
*
|
||||||
* @param array $item
|
* @param array $item Record from item table
|
||||||
* @param boolean $attach
|
* @param boolean $attach If true, add icons for item attachments as well
|
||||||
* @param boolean $is_preview
|
* @param boolean $is_preview Whether this is a preview
|
||||||
* @param boolean $only_cache
|
* @param boolean $only_cache Whether only cached HTML should be updated
|
||||||
* @return string item body html
|
* @return string item body html
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
|
|
@ -2769,7 +2798,7 @@ class Item
|
||||||
* @hook prepare_body ('item'=>item array, 'html'=>body string, 'is_preview'=>boolean, 'filter_reasons'=>string array) after first bbcode to html
|
* @hook prepare_body ('item'=>item array, 'html'=>body string, 'is_preview'=>boolean, 'filter_reasons'=>string array) after first bbcode to html
|
||||||
* @hook prepare_body_final ('item'=>item array, 'html'=>body string) after attach icons and blockquote special case handling (spoiler, author)
|
* @hook prepare_body_final ('item'=>item array, 'html'=>body string) after attach icons and blockquote special case handling (spoiler, author)
|
||||||
*/
|
*/
|
||||||
public static function prepareBody(array &$item, $attach = false, $is_preview = false, $only_cache = false)
|
public static function prepareBody(array &$item, bool $attach = false, bool $is_preview = false, bool $only_cache = false): string
|
||||||
{
|
{
|
||||||
$a = DI::app();
|
$a = DI::app();
|
||||||
Hook::callAll('prepare_body_init', $item);
|
Hook::callAll('prepare_body_init', $item);
|
||||||
|
|
@ -2811,7 +2840,7 @@ class Item
|
||||||
$s = $item["rendered-html"];
|
$s = $item["rendered-html"];
|
||||||
|
|
||||||
if ($only_cache) {
|
if ($only_cache) {
|
||||||
return;
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compile eventual content filter reasons
|
// Compile eventual content filter reasons
|
||||||
|
|
@ -2891,7 +2920,7 @@ class Item
|
||||||
* @param int $type
|
* @param int $type
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public static function containsLink(string $body, string $url, int $type = 0)
|
public static function containsLink(string $body, string $url, int $type = 0): bool
|
||||||
{
|
{
|
||||||
// Make sure that for example site parameters aren't used when testing if the link is contained in the body
|
// Make sure that for example site parameters aren't used when testing if the link is contained in the body
|
||||||
$urlparts = parse_url($url);
|
$urlparts = parse_url($url);
|
||||||
|
|
@ -2924,7 +2953,7 @@ class Item
|
||||||
* @param string $body
|
* @param string $body
|
||||||
* @return string modified body
|
* @return string modified body
|
||||||
*/
|
*/
|
||||||
private static function replaceVisualAttachments(array $attachments, string $body)
|
private static function replaceVisualAttachments(array $attachments, string $body): string
|
||||||
{
|
{
|
||||||
DI::profiler()->startRecording('rendering');
|
DI::profiler()->startRecording('rendering');
|
||||||
|
|
||||||
|
|
@ -2955,7 +2984,7 @@ class Item
|
||||||
* @param string $content
|
* @param string $content
|
||||||
* @return string modified content
|
* @return string modified content
|
||||||
*/
|
*/
|
||||||
private static function addVisualAttachments(array $attachments, array $item, string $content, bool $shared)
|
private static function addVisualAttachments(array $attachments, array $item, string $content, bool $shared): string
|
||||||
{
|
{
|
||||||
DI::profiler()->startRecording('rendering');
|
DI::profiler()->startRecording('rendering');
|
||||||
$leading = '';
|
$leading = '';
|
||||||
|
|
@ -3047,7 +3076,7 @@ class Item
|
||||||
* @param array $ignore_links A list of URLs to ignore
|
* @param array $ignore_links A list of URLs to ignore
|
||||||
* @return string modified content
|
* @return string modified content
|
||||||
*/
|
*/
|
||||||
private static function addLinkAttachment(int $uriid, array $attachments, string $body, string $content, bool $shared, array $ignore_links)
|
private static function addLinkAttachment(int $uriid, array $attachments, string $body, string $content, bool $shared, array $ignore_links): string
|
||||||
{
|
{
|
||||||
DI::profiler()->startRecording('rendering');
|
DI::profiler()->startRecording('rendering');
|
||||||
// Don't show a preview when there is a visual attachment (audio or video)
|
// Don't show a preview when there is a visual attachment (audio or video)
|
||||||
|
|
@ -3161,7 +3190,7 @@ class Item
|
||||||
* @param string $content
|
* @param string $content
|
||||||
* @return string modified content
|
* @return string modified content
|
||||||
*/
|
*/
|
||||||
private static function addNonVisualAttachments(array $attachments, array $item, string $content)
|
private static function addNonVisualAttachments(array $attachments, array $item, string $content): string
|
||||||
{
|
{
|
||||||
DI::profiler()->startRecording('rendering');
|
DI::profiler()->startRecording('rendering');
|
||||||
$trailing = '';
|
$trailing = '';
|
||||||
|
|
@ -3193,7 +3222,7 @@ class Item
|
||||||
return $content;
|
return $content;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function addQuestions(array $item, string $content)
|
private static function addQuestions(array $item, string $content): string
|
||||||
{
|
{
|
||||||
DI::profiler()->startRecording('rendering');
|
DI::profiler()->startRecording('rendering');
|
||||||
if (!empty($item['question-id'])) {
|
if (!empty($item['question-id'])) {
|
||||||
|
|
@ -3244,7 +3273,7 @@ class Item
|
||||||
* @return boolean|array False if item has not plink, otherwise array('href'=>plink url, 'title'=>translated title)
|
* @return boolean|array False if item has not plink, otherwise array('href'=>plink url, 'title'=>translated title)
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function getPlink($item)
|
public static function getPlink(array $item)
|
||||||
{
|
{
|
||||||
if (!empty($item['plink']) && Network::isValidHttpUrl($item['plink'])) {
|
if (!empty($item['plink']) && Network::isValidHttpUrl($item['plink'])) {
|
||||||
$plink = $item['plink'];
|
$plink = $item['plink'];
|
||||||
|
|
@ -3291,7 +3320,7 @@ class Item
|
||||||
*
|
*
|
||||||
* @return boolean "true" when it is a forum post
|
* @return boolean "true" when it is a forum post
|
||||||
*/
|
*/
|
||||||
public static function isForumPost(int $uri_id)
|
public static function isForumPost(int $uri_id): bool
|
||||||
{
|
{
|
||||||
foreach (Tag::getByURIId($uri_id, [Tag::EXCLUSIVE_MENTION]) as $tag) {
|
foreach (Tag::getByURIId($uri_id, [Tag::EXCLUSIVE_MENTION]) as $tag) {
|
||||||
if (DBA::exists('contact', ['uid' => 0, 'nurl' => Strings::normaliseLink($tag['url']), 'contact-type' => Contact::TYPE_COMMUNITY])) {
|
if (DBA::exists('contact', ['uid' => 0, 'nurl' => Strings::normaliseLink($tag['url']), 'contact-type' => Contact::TYPE_COMMUNITY])) {
|
||||||
|
|
@ -3309,7 +3338,7 @@ class Item
|
||||||
*
|
*
|
||||||
* @return integer item id
|
* @return integer item id
|
||||||
*/
|
*/
|
||||||
public static function searchByLink($uri, $uid = 0)
|
public static function searchByLink(string $uri, int $uid = 0): int
|
||||||
{
|
{
|
||||||
$ssl_uri = str_replace('http://', 'https://', $uri);
|
$ssl_uri = str_replace('http://', 'https://', $uri);
|
||||||
$uris = [$uri, $ssl_uri, Strings::normaliseLink($uri)];
|
$uris = [$uri, $ssl_uri, Strings::normaliseLink($uri)];
|
||||||
|
|
@ -3334,7 +3363,7 @@ class Item
|
||||||
*
|
*
|
||||||
* @return string URI
|
* @return string URI
|
||||||
*/
|
*/
|
||||||
public static function getURIByLink(string $uri)
|
public static function getURIByLink(string $uri): string
|
||||||
{
|
{
|
||||||
$ssl_uri = str_replace('http://', 'https://', $uri);
|
$ssl_uri = str_replace('http://', 'https://', $uri);
|
||||||
$uris = [$uri, $ssl_uri, Strings::normaliseLink($uri)];
|
$uris = [$uri, $ssl_uri, Strings::normaliseLink($uri)];
|
||||||
|
|
@ -3360,7 +3389,7 @@ class Item
|
||||||
*
|
*
|
||||||
* @return integer item id
|
* @return integer item id
|
||||||
*/
|
*/
|
||||||
public static function fetchByLink(string $uri, int $uid = 0)
|
public static function fetchByLink(string $uri, int $uid = 0): int
|
||||||
{
|
{
|
||||||
Logger::info('Trying to fetch link', ['uid' => $uid, 'uri' => $uri]);
|
Logger::info('Trying to fetch link', ['uid' => $uid, 'uri' => $uri]);
|
||||||
$item_id = self::searchByLink($uri, $uid);
|
$item_id = self::searchByLink($uri, $uid);
|
||||||
|
|
@ -3406,7 +3435,7 @@ class Item
|
||||||
*
|
*
|
||||||
* @return array with share information
|
* @return array with share information
|
||||||
*/
|
*/
|
||||||
public static function getShareArray($item)
|
public static function getShareArray(array $item): array
|
||||||
{
|
{
|
||||||
if (!preg_match("/(.*?)\[share(.*?)\]\s?(.*?)\s?\[\/share\]\s?/ism", $item['body'], $matches)) {
|
if (!preg_match("/(.*?)\[share(.*?)\]\s?(.*?)\s?\[\/share\]\s?/ism", $item['body'], $matches)) {
|
||||||
return [];
|
return [];
|
||||||
|
|
@ -3429,7 +3458,7 @@ class Item
|
||||||
*
|
*
|
||||||
* @return array item array with data from the original item
|
* @return array item array with data from the original item
|
||||||
*/
|
*/
|
||||||
public static function addShareDataFromOriginal(array $item)
|
public static function addShareDataFromOriginal(array $item): array
|
||||||
{
|
{
|
||||||
$shared = self::getShareArray($item);
|
$shared = self::getShareArray($item);
|
||||||
if (empty($shared)) {
|
if (empty($shared)) {
|
||||||
|
|
@ -3490,7 +3519,7 @@ class Item
|
||||||
* @return bool
|
* @return bool
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
protected static function isAllowedByUser(array $item, int $user_id)
|
protected static function isAllowedByUser(array $item, int $user_id): bool
|
||||||
{
|
{
|
||||||
if (!empty($item['author-id']) && Contact\User::isBlocked($item['author-id'], $user_id)) {
|
if (!empty($item['author-id']) && Contact\User::isBlocked($item['author-id'], $user_id)) {
|
||||||
Logger::notice('Author is blocked by user', ['author-link' => $item['author-link'], 'uid' => $user_id, 'item-uri' => $item['uri']]);
|
Logger::notice('Author is blocked by user', ['author-link' => $item['author-link'], 'uid' => $user_id, 'item-uri' => $item['uri']]);
|
||||||
|
|
@ -3522,7 +3551,7 @@ class Item
|
||||||
* @param array $item
|
* @param array $item
|
||||||
* @return string body
|
* @return string body
|
||||||
*/
|
*/
|
||||||
public static function improveSharedDataInBody(array $item)
|
public static function improveSharedDataInBody(array $item): string
|
||||||
{
|
{
|
||||||
$shared = BBCode::fetchShareAttributes($item['body']);
|
$shared = BBCode::fetchShareAttributes($item['body']);
|
||||||
if (empty($shared['link'])) {
|
if (empty($shared['link'])) {
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@ class ItemURI
|
||||||
* Insert an item-uri record and return its id
|
* Insert an item-uri record and return its id
|
||||||
*
|
*
|
||||||
* @param array $fields Item-uri fields
|
* @param array $fields Item-uri fields
|
||||||
*
|
|
||||||
* @return int|null item-uri id
|
* @return int|null item-uri id
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
|
|
@ -61,12 +60,15 @@ class ItemURI
|
||||||
* Searched for an id of a given uri. Adds it, if not existing yet.
|
* Searched for an id of a given uri. Adds it, if not existing yet.
|
||||||
*
|
*
|
||||||
* @param string $uri
|
* @param string $uri
|
||||||
*
|
|
||||||
* @return integer item-uri id
|
* @return integer item-uri id
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function getIdByURI($uri)
|
public static function getIdByURI(string $uri): int
|
||||||
{
|
{
|
||||||
|
if (empty($uri)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// If the URI gets too long we only take the first parts and hope for best
|
// If the URI gets too long we only take the first parts and hope for best
|
||||||
$uri = substr($uri, 0, 255);
|
$uri = substr($uri, 0, 255);
|
||||||
|
|
||||||
|
|
@ -82,11 +84,10 @@ class ItemURI
|
||||||
* Searched for an id of a given guid.
|
* Searched for an id of a given guid.
|
||||||
*
|
*
|
||||||
* @param string $guid
|
* @param string $guid
|
||||||
*
|
|
||||||
* @return integer item-uri id
|
* @return integer item-uri id
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function getIdByGUID($guid)
|
public static function getIdByGUID(string $guid): int
|
||||||
{
|
{
|
||||||
// If the GUID gets too long we only take the first parts and hope for best
|
// If the GUID gets too long we only take the first parts and hope for best
|
||||||
$guid = substr($guid, 0, 255);
|
$guid = substr($guid, 0, 255);
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ class ParsedLogIterator implements \Iterator
|
||||||
* @param string $filename File to open
|
* @param string $filename File to open
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function open(string $filename)
|
public function open(string $filename): ParsedLogIterator
|
||||||
{
|
{
|
||||||
$this->reader->open($filename);
|
$this->reader->open($filename);
|
||||||
return $this;
|
return $this;
|
||||||
|
|
@ -70,7 +70,7 @@ class ParsedLogIterator implements \Iterator
|
||||||
* @param int $limit Max num of lines to read
|
* @param int $limit Max num of lines to read
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function withLimit(int $limit)
|
public function withLimit(int $limit): ParsedLogIterator
|
||||||
{
|
{
|
||||||
$this->limit = $limit;
|
$this->limit = $limit;
|
||||||
return $this;
|
return $this;
|
||||||
|
|
@ -80,7 +80,7 @@ class ParsedLogIterator implements \Iterator
|
||||||
* @param array $filters filters per column
|
* @param array $filters filters per column
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function withFilters(array $filters)
|
public function withFilters(array $filters): ParsedLogIterator
|
||||||
{
|
{
|
||||||
$this->filters = $filters;
|
$this->filters = $filters;
|
||||||
return $this;
|
return $this;
|
||||||
|
|
@ -90,7 +90,7 @@ class ParsedLogIterator implements \Iterator
|
||||||
* @param string $search string to search to filter lines
|
* @param string $search string to search to filter lines
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function withSearch(string $search)
|
public function withSearch(string $search): ParsedLogIterator
|
||||||
{
|
{
|
||||||
$this->search = $search;
|
$this->search = $search;
|
||||||
return $this;
|
return $this;
|
||||||
|
|
@ -100,10 +100,10 @@ class ParsedLogIterator implements \Iterator
|
||||||
* Check if parsed log line match filters.
|
* Check if parsed log line match filters.
|
||||||
* Always match if no filters are set.
|
* Always match if no filters are set.
|
||||||
*
|
*
|
||||||
* @param ParsedLogLine $parsedlogline
|
* @param ParsedLogLine $parsedlogline ParsedLogLine instance
|
||||||
* @return bool
|
* @return bool Wether the parse log line matches
|
||||||
*/
|
*/
|
||||||
private function filter($parsedlogline)
|
private function filter(ParsedLogLine $parsedlogline): bool
|
||||||
{
|
{
|
||||||
$match = true;
|
$match = true;
|
||||||
foreach ($this->filters as $filter => $filtervalue) {
|
foreach ($this->filters as $filter => $filtervalue) {
|
||||||
|
|
@ -126,7 +126,7 @@ class ParsedLogIterator implements \Iterator
|
||||||
* @param ParsedLogLine $parsedlogline
|
* @param ParsedLogLine $parsedlogline
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
private function search($parsedlogline)
|
private function search(ParsedLogLine $parsedlogline): bool
|
||||||
{
|
{
|
||||||
if ($this->search != "") {
|
if ($this->search != "") {
|
||||||
return strstr($parsedlogline->logline, $this->search) !== false;
|
return strstr($parsedlogline->logline, $this->search) !== false;
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ class Mail
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function insert($msg, $notification = true)
|
public static function insert(array $msg, bool $notification = true)
|
||||||
{
|
{
|
||||||
if (!isset($msg['reply'])) {
|
if (!isset($msg['reply'])) {
|
||||||
$msg['reply'] = DBA::exists('mail', ['parent-uri' => $msg['parent-uri']]);
|
$msg['reply'] = DBA::exists('mail', ['parent-uri' => $msg['parent-uri']]);
|
||||||
|
|
@ -125,7 +125,7 @@ class Mail
|
||||||
* @return int
|
* @return int
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function send($recipient = 0, $body = '', $subject = '', $replyto = '')
|
public static function send(int $recipient = 0, string $body = '', string $subject = '', string $replyto = ''): int
|
||||||
{
|
{
|
||||||
$a = DI::app();
|
$a = DI::app();
|
||||||
|
|
||||||
|
|
@ -255,7 +255,7 @@ class Mail
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function sendWall(array $recipient = [], $body = '', $subject = '', $replyto = '')
|
public static function sendWall(array $recipient = [], string $body = '', string $subject = '', string $replyto = ''): int
|
||||||
{
|
{
|
||||||
if (!$recipient) {
|
if (!$recipient) {
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
namespace Friendica\Model;
|
namespace Friendica\Model;
|
||||||
|
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Addon;
|
||||||
|
use Friendica\Core\Config\Capability\IManageConfigValues;
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
use Friendica\DI;
|
use Friendica\DI;
|
||||||
use stdClass;
|
use stdClass;
|
||||||
|
|
@ -101,7 +102,7 @@ class Nodeinfo
|
||||||
*
|
*
|
||||||
* @return array with supported services
|
* @return array with supported services
|
||||||
*/
|
*/
|
||||||
public static function getServices()
|
public static function getServices(): array
|
||||||
{
|
{
|
||||||
$services = [
|
$services = [
|
||||||
'inbound' => [],
|
'inbound' => [],
|
||||||
|
|
@ -156,9 +157,19 @@ class Nodeinfo
|
||||||
return $services;
|
return $services;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getOrganization($config)
|
/**
|
||||||
|
* Gathers organization information and returns it as an array
|
||||||
|
*
|
||||||
|
* @param IManageConfigValues $config Configuration instance
|
||||||
|
* @return array Organization information
|
||||||
|
*/
|
||||||
|
public static function getOrganization(IManageConfigValues $config): array
|
||||||
{
|
{
|
||||||
$organization = ['name' => null, 'contact' => null, 'account' => null];
|
$organization = [
|
||||||
|
'name' => null,
|
||||||
|
'contact' => null,
|
||||||
|
'account' => null
|
||||||
|
];
|
||||||
|
|
||||||
if (!empty($config->get('config', 'admin_email'))) {
|
if (!empty($config->get('config', 'admin_email'))) {
|
||||||
$adminList = explode(',', str_replace(' ', '', $config->get('config', 'admin_email')));
|
$adminList = explode(',', str_replace(' ', '', $config->get('config', 'admin_email')));
|
||||||
|
|
|
||||||
|
|
@ -40,16 +40,16 @@ class OpenWebAuthToken
|
||||||
* @return boolean
|
* @return boolean
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function create($type, $uid, $token, $meta)
|
public static function create(string $type, uid $uid, string $token, string $meta)
|
||||||
{
|
{
|
||||||
$fields = [
|
$fields = [
|
||||||
"type" => $type,
|
'type' => $type,
|
||||||
"uid" => $uid,
|
'uid' => $uid,
|
||||||
"token" => $token,
|
'token' => $token,
|
||||||
"meta" => $meta,
|
'meta' => $meta,
|
||||||
"created" => DateTimeFormat::utcNow()
|
'created' => DateTimeFormat::utcNow()
|
||||||
];
|
];
|
||||||
return DBA::insert("openwebauth-token", $fields);
|
return DBA::insert('openwebauth-token', $fields);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -62,15 +62,15 @@ class OpenWebAuthToken
|
||||||
* @return string|boolean The meta enry or false if not found.
|
* @return string|boolean The meta enry or false if not found.
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function getMeta($type, $uid, $token)
|
public static function getMeta(string $type, int $uid, string $token)
|
||||||
{
|
{
|
||||||
$condition = ["type" => $type, "uid" => $uid, "token" => $token];
|
$condition = ['type' => $type, 'uid' => $uid, 'token' => $token];
|
||||||
|
|
||||||
$entry = DBA::selectFirst("openwebauth-token", ["id", "meta"], $condition);
|
$entry = DBA::selectFirst('openwebauth-token', ['id', 'meta'], $condition);
|
||||||
if (DBA::isResult($entry)) {
|
if (DBA::isResult($entry)) {
|
||||||
DBA::delete("openwebauth-token", ["id" => $entry["id"]]);
|
DBA::delete('openwebauth-token', ['id' => $entry['id']]);
|
||||||
|
|
||||||
return $entry["meta"];
|
return $entry['meta'];
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -82,10 +82,10 @@ class OpenWebAuthToken
|
||||||
* @param string $interval SQL compatible time interval
|
* @param string $interval SQL compatible time interval
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function purge($type, $interval)
|
public static function purge(string $type, string $interval)
|
||||||
{
|
{
|
||||||
$condition = ["`type` = ? AND `created` < ?", $type, DateTimeFormat::utcNow() . " - INTERVAL " . $interval];
|
$condition = ["`type` = ? AND `created` < ?", $type, DateTimeFormat::utcNow() . ' - INTERVAL ' . $interval];
|
||||||
DBA::delete("openwebauth-token", $condition);
|
DBA::delete('openwebauth-token', $condition);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ class Photo
|
||||||
$fields = self::getFields();
|
$fields = self::getFields();
|
||||||
}
|
}
|
||||||
|
|
||||||
return DBA::selectFirst("photo", $fields, $conditions, $params);
|
return DBA::selectFirst('photo', $fields, $conditions, $params);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -110,10 +110,10 @@ class Photo
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
* @see \Friendica\Database\DBA::select
|
* @see \Friendica\Database\DBA::select
|
||||||
*/
|
*/
|
||||||
public static function getPhotosForUser($uid, $resourceid, array $conditions = [], array $params = [])
|
public static function getPhotosForUser(int $uid, string $resourceid, array $conditions = [], array $params = [])
|
||||||
{
|
{
|
||||||
$conditions["resource-id"] = $resourceid;
|
$conditions['resource-id'] = $resourceid;
|
||||||
$conditions["uid"] = $uid;
|
$conditions['uid'] = $uid;
|
||||||
|
|
||||||
return self::selectToArray([], $conditions, $params);
|
return self::selectToArray([], $conditions, $params);
|
||||||
}
|
}
|
||||||
|
|
@ -132,11 +132,11 @@ class Photo
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
* @see \Friendica\Database\DBA::select
|
* @see \Friendica\Database\DBA::select
|
||||||
*/
|
*/
|
||||||
public static function getPhotoForUser($uid, $resourceid, $scale = 0, array $conditions = [], array $params = [])
|
public static function getPhotoForUser(int $uid, $resourceid, $scale = 0, array $conditions = [], array $params = [])
|
||||||
{
|
{
|
||||||
$conditions["resource-id"] = $resourceid;
|
$conditions['resource-id'] = $resourceid;
|
||||||
$conditions["uid"] = $uid;
|
$conditions['uid'] = $uid;
|
||||||
$conditions["scale"] = $scale;
|
$conditions['scale'] = $scale;
|
||||||
|
|
||||||
return self::selectFirst([], $conditions, $params);
|
return self::selectFirst([], $conditions, $params);
|
||||||
}
|
}
|
||||||
|
|
@ -156,19 +156,19 @@ class Photo
|
||||||
*/
|
*/
|
||||||
public static function getPhoto(string $resourceid, int $scale = 0)
|
public static function getPhoto(string $resourceid, int $scale = 0)
|
||||||
{
|
{
|
||||||
$r = self::selectFirst(["uid"], ["resource-id" => $resourceid]);
|
$r = self::selectFirst(['uid'], ['resource-id' => $resourceid]);
|
||||||
if (!DBA::isResult($r)) {
|
if (!DBA::isResult($r)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$uid = $r["uid"];
|
$uid = $r['uid'];
|
||||||
|
|
||||||
$accessible = $uid ? (bool)DI::pConfig()->get($uid, 'system', 'accessible-photos', false) : false;
|
$accessible = $uid ? (bool)DI::pConfig()->get($uid, 'system', 'accessible-photos', false) : false;
|
||||||
|
|
||||||
$sql_acl = Security::getPermissionsSQLByUserId($uid, $accessible);
|
$sql_acl = Security::getPermissionsSQLByUserId($uid, $accessible);
|
||||||
|
|
||||||
$conditions = ["`resource-id` = ? AND `scale` <= ? " . $sql_acl, $resourceid, $scale];
|
$conditions = ["`resource-id` = ? AND `scale` <= ? " . $sql_acl, $resourceid, $scale];
|
||||||
$params = ["order" => ["scale" => true]];
|
$params = ['order' => ['scale' => true]];
|
||||||
$photo = self::selectFirst([], $conditions, $params);
|
$photo = self::selectFirst([], $conditions, $params);
|
||||||
|
|
||||||
return $photo;
|
return $photo;
|
||||||
|
|
@ -182,9 +182,9 @@ class Photo
|
||||||
* @return boolean
|
* @return boolean
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function exists(array $conditions)
|
public static function exists(array $conditions): bool
|
||||||
{
|
{
|
||||||
return DBA::exists("photo", $conditions);
|
return DBA::exists('photo', $conditions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -193,7 +193,7 @@ class Photo
|
||||||
*
|
*
|
||||||
* @param array $photo Photo data. Needs at least 'id', 'type', 'backend-class', 'backend-ref'
|
* @param array $photo Photo data. Needs at least 'id', 'type', 'backend-class', 'backend-ref'
|
||||||
*
|
*
|
||||||
* @return \Friendica\Object\Image
|
* @return \Friendica\Object\Image|null Image object or null on error
|
||||||
*/
|
*/
|
||||||
public static function getImageDataForPhoto(array $photo)
|
public static function getImageDataForPhoto(array $photo)
|
||||||
{
|
{
|
||||||
|
|
@ -248,11 +248,11 @@ class Photo
|
||||||
* @return array field list
|
* @return array field list
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function getFields()
|
private static function getFields(): array
|
||||||
{
|
{
|
||||||
$allfields = DBStructure::definition(DI::app()->getBasePath(), false);
|
$allfields = DBStructure::definition(DI::app()->getBasePath(), false);
|
||||||
$fields = array_keys($allfields["photo"]["fields"]);
|
$fields = array_keys($allfields['photo']['fields']);
|
||||||
array_splice($fields, array_search("data", $fields), 1);
|
array_splice($fields, array_search('data', $fields), 1);
|
||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -265,14 +265,14 @@ class Photo
|
||||||
* @return array
|
* @return array
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function createPhotoForSystemResource($filename, $mimetype = '')
|
public static function createPhotoForSystemResource(string $filename, string $mimetype = ''): array
|
||||||
{
|
{
|
||||||
if (empty($mimetype)) {
|
if (empty($mimetype)) {
|
||||||
$mimetype = Images::guessTypeByExtension($filename);
|
$mimetype = Images::guessTypeByExtension($filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
$fields = self::getFields();
|
$fields = self::getFields();
|
||||||
$values = array_fill(0, count($fields), "");
|
$values = array_fill(0, count($fields), '');
|
||||||
|
|
||||||
$photo = array_combine($fields, $values);
|
$photo = array_combine($fields, $values);
|
||||||
$photo['backend-class'] = SystemResource::NAME;
|
$photo['backend-class'] = SystemResource::NAME;
|
||||||
|
|
@ -293,14 +293,14 @@ class Photo
|
||||||
* @return array
|
* @return array
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function createPhotoForExternalResource($url, $uid = 0, $mimetype = '')
|
public static function createPhotoForExternalResource(string $url, int $uid = 0, string $mimetype = ''): array
|
||||||
{
|
{
|
||||||
if (empty($mimetype)) {
|
if (empty($mimetype)) {
|
||||||
$mimetype = Images::guessTypeByExtension($url);
|
$mimetype = Images::guessTypeByExtension($url);
|
||||||
}
|
}
|
||||||
|
|
||||||
$fields = self::getFields();
|
$fields = self::getFields();
|
||||||
$values = array_fill(0, count($fields), "");
|
$values = array_fill(0, count($fields), '');
|
||||||
|
|
||||||
$photo = array_combine($fields, $values);
|
$photo = array_combine($fields, $values);
|
||||||
$photo['backend-class'] = ExternalResource::NAME;
|
$photo['backend-class'] = ExternalResource::NAME;
|
||||||
|
|
@ -314,14 +314,14 @@ class Photo
|
||||||
/**
|
/**
|
||||||
* store photo metadata in db and binary in default backend
|
* store photo metadata in db and binary in default backend
|
||||||
*
|
*
|
||||||
* @param Image $Image Image object with data
|
* @param Image $image Image object with data
|
||||||
* @param integer $uid User ID
|
* @param integer $uid User ID
|
||||||
* @param integer $cid Contact ID
|
* @param integer $cid Contact ID
|
||||||
* @param integer $rid Resource ID
|
* @param string $rid Resource ID
|
||||||
* @param string $filename Filename
|
* @param string $filename Filename
|
||||||
* @param string $album Album name
|
* @param string $album Album name
|
||||||
* @param integer $scale Scale
|
* @param integer $scale Scale
|
||||||
* @param integer $profile Is a profile image? optional, default = 0
|
* @param integer $type Photo type, optional, default: Photo::DEFAULT
|
||||||
* @param string $allow_cid Permissions, allowed contacts. optional, default = ""
|
* @param string $allow_cid Permissions, allowed contacts. optional, default = ""
|
||||||
* @param string $allow_gid Permissions, allowed groups. optional, default = ""
|
* @param string $allow_gid Permissions, allowed groups. optional, default = ""
|
||||||
* @param string $deny_cid Permissions, denied contacts.optional, default = ""
|
* @param string $deny_cid Permissions, denied contacts.optional, default = ""
|
||||||
|
|
@ -331,71 +331,71 @@ class Photo
|
||||||
* @return boolean True on success
|
* @return boolean True on success
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function store(Image $Image, $uid, $cid, $rid, $filename, $album, $scale, $type = self::DEFAULT, $allow_cid = "", $allow_gid = "", $deny_cid = "", $deny_gid = "", $desc = "")
|
public static function store(Image $image, int $uid, int $cid, string $rid, string $filename, string $album, int $scale, int $type = self::DEFAULT, string $allow_cid = '', string $allow_gid = '', string $deny_cid = '', string $deny_gid = '', string $desc = ''): bool
|
||||||
{
|
{
|
||||||
$photo = self::selectFirst(["guid"], ["`resource-id` = ? AND `guid` != ?", $rid, ""]);
|
$photo = self::selectFirst(['guid'], ["`resource-id` = ? AND `guid` != ?", $rid, '']);
|
||||||
if (DBA::isResult($photo)) {
|
if (DBA::isResult($photo)) {
|
||||||
$guid = $photo["guid"];
|
$guid = $photo['guid'];
|
||||||
} else {
|
} else {
|
||||||
$guid = System::createGUID();
|
$guid = System::createGUID();
|
||||||
}
|
}
|
||||||
|
|
||||||
$existing_photo = self::selectFirst(["id", "created", "backend-class", "backend-ref"], ["resource-id" => $rid, "uid" => $uid, "contact-id" => $cid, "scale" => $scale]);
|
$existing_photo = self::selectFirst(['id', 'created', 'backend-class', 'backend-ref'], ['resource-id' => $rid, 'uid' => $uid, 'contact-id' => $cid, 'scale' => $scale]);
|
||||||
$created = DateTimeFormat::utcNow();
|
$created = DateTimeFormat::utcNow();
|
||||||
if (DBA::isResult($existing_photo)) {
|
if (DBA::isResult($existing_photo)) {
|
||||||
$created = $existing_photo["created"];
|
$created = $existing_photo['created'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get defined storage backend.
|
// Get defined storage backend.
|
||||||
// if no storage backend, we use old "data" column in photo table.
|
// if no storage backend, we use old "data" column in photo table.
|
||||||
// if is an existing photo, reuse same backend
|
// if is an existing photo, reuse same backend
|
||||||
$data = "";
|
$data = '';
|
||||||
$backend_ref = "";
|
$backend_ref = '';
|
||||||
$storage = "";
|
$storage = '';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (DBA::isResult($existing_photo)) {
|
if (DBA::isResult($existing_photo)) {
|
||||||
$backend_ref = (string)$existing_photo["backend-ref"];
|
$backend_ref = (string)$existing_photo['backend-ref'];
|
||||||
$storage = DI::storageManager()->getWritableStorageByName($existing_photo["backend-class"] ?? '');
|
$storage = DI::storageManager()->getWritableStorageByName($existing_photo['backend-class'] ?? '');
|
||||||
} else {
|
} else {
|
||||||
$storage = DI::storage();
|
$storage = DI::storage();
|
||||||
}
|
}
|
||||||
$backend_ref = $storage->put($Image->asString(), $backend_ref);
|
$backend_ref = $storage->put($image->asString(), $backend_ref);
|
||||||
} catch (InvalidClassStorageException $storageException) {
|
} catch (InvalidClassStorageException $storageException) {
|
||||||
$data = $Image->asString();
|
$data = $image->asString();
|
||||||
}
|
}
|
||||||
|
|
||||||
$fields = [
|
$fields = [
|
||||||
"uid" => $uid,
|
'uid' => $uid,
|
||||||
"contact-id" => $cid,
|
'contact-id' => $cid,
|
||||||
"guid" => $guid,
|
'guid' => $guid,
|
||||||
"resource-id" => $rid,
|
'resource-id' => $rid,
|
||||||
"hash" => md5($Image->asString()),
|
'hash' => md5($image->asString()),
|
||||||
"created" => $created,
|
'created' => $created,
|
||||||
"edited" => DateTimeFormat::utcNow(),
|
'edited' => DateTimeFormat::utcNow(),
|
||||||
"filename" => basename($filename),
|
'filename' => basename($filename),
|
||||||
"type" => $Image->getType(),
|
'type' => $image->getType(),
|
||||||
"album" => $album,
|
'album' => $album,
|
||||||
"height" => $Image->getHeight(),
|
'height' => $image->getHeight(),
|
||||||
"width" => $Image->getWidth(),
|
'width' => $image->getWidth(),
|
||||||
"datasize" => strlen($Image->asString()),
|
'datasize' => strlen($image->asString()),
|
||||||
"data" => $data,
|
'data' => $data,
|
||||||
"scale" => $scale,
|
'scale' => $scale,
|
||||||
"photo-type" => $type,
|
'photo-type' => $type,
|
||||||
"profile" => false,
|
'profile' => false,
|
||||||
"allow_cid" => $allow_cid,
|
'allow_cid' => $allow_cid,
|
||||||
"allow_gid" => $allow_gid,
|
'allow_gid' => $allow_gid,
|
||||||
"deny_cid" => $deny_cid,
|
'deny_cid' => $deny_cid,
|
||||||
"deny_gid" => $deny_gid,
|
'deny_gid' => $deny_gid,
|
||||||
"desc" => $desc,
|
'desc' => $desc,
|
||||||
"backend-class" => (string)$storage,
|
'backend-class' => (string)$storage,
|
||||||
"backend-ref" => $backend_ref
|
'backend-ref' => $backend_ref
|
||||||
];
|
];
|
||||||
|
|
||||||
if (DBA::isResult($existing_photo)) {
|
if (DBA::isResult($existing_photo)) {
|
||||||
$r = DBA::update("photo", $fields, ["id" => $existing_photo["id"]]);
|
$r = DBA::update('photo', $fields, ['id' => $existing_photo['id']]);
|
||||||
} else {
|
} else {
|
||||||
$r = DBA::insert("photo", $fields);
|
$r = DBA::insert('photo', $fields);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $r;
|
return $r;
|
||||||
|
|
@ -413,7 +413,7 @@ class Photo
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
* @see \Friendica\Database\DBA::delete
|
* @see \Friendica\Database\DBA::delete
|
||||||
*/
|
*/
|
||||||
public static function delete(array $conditions, array $options = [])
|
public static function delete(array $conditions, array $options = []): bool
|
||||||
{
|
{
|
||||||
// get photo to delete data info
|
// get photo to delete data info
|
||||||
$photos = DBA::select('photo', ['id', 'backend-class', 'backend-ref'], $conditions);
|
$photos = DBA::select('photo', ['id', 'backend-class', 'backend-ref'], $conditions);
|
||||||
|
|
@ -423,7 +423,7 @@ class Photo
|
||||||
$backend_class = DI::storageManager()->getWritableStorageByName($photo['backend-class'] ?? '');
|
$backend_class = DI::storageManager()->getWritableStorageByName($photo['backend-class'] ?? '');
|
||||||
$backend_class->delete($photo['backend-ref'] ?? '');
|
$backend_class->delete($photo['backend-ref'] ?? '');
|
||||||
// Delete the photos after they had been deleted successfully
|
// Delete the photos after they had been deleted successfully
|
||||||
DBA::delete("photo", ['id' => $photo['id']]);
|
DBA::delete('photo', ['id' => $photo['id']]);
|
||||||
} catch (InvalidClassStorageException $storageException) {
|
} catch (InvalidClassStorageException $storageException) {
|
||||||
DI::logger()->debug('Storage class not found.', ['conditions' => $conditions, 'exception' => $storageException]);
|
DI::logger()->debug('Storage class not found.', ['conditions' => $conditions, 'exception' => $storageException]);
|
||||||
} catch (ReferenceStorageException $referenceStorageException) {
|
} catch (ReferenceStorageException $referenceStorageException) {
|
||||||
|
|
@ -433,7 +433,7 @@ class Photo
|
||||||
|
|
||||||
DBA::close($photos);
|
DBA::close($photos);
|
||||||
|
|
||||||
return DBA::delete("photo", $conditions, $options);
|
return DBA::delete('photo', $conditions, $options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -441,26 +441,26 @@ class Photo
|
||||||
*
|
*
|
||||||
* @param array $fields Contains the fields that are updated
|
* @param array $fields Contains the fields that are updated
|
||||||
* @param array $conditions Condition array with the key values
|
* @param array $conditions Condition array with the key values
|
||||||
* @param Image $img Image to update. Optional, default null.
|
* @param Image $image Image to update. Optional, default null.
|
||||||
* @param array|boolean $old_fields Array with the old field values that are about to be replaced (true = update on duplicate)
|
* @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 successfull?
|
||||||
*
|
*
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @see \Friendica\Database\DBA::update
|
* @see \Friendica\Database\DBA::update
|
||||||
*/
|
*/
|
||||||
public static function update($fields, $conditions, Image $img = null, array $old_fields = [])
|
public static function update(array $fields, array $conditions, Image $image = null, array $old_fields = []): bool
|
||||||
{
|
{
|
||||||
if (!is_null($img)) {
|
if (!is_null($image)) {
|
||||||
// get photo to update
|
// get photo to update
|
||||||
$photos = self::selectToArray(['backend-class', 'backend-ref'], $conditions);
|
$photos = self::selectToArray(['backend-class', 'backend-ref'], $conditions);
|
||||||
|
|
||||||
foreach($photos as $photo) {
|
foreach($photos as $photo) {
|
||||||
try {
|
try {
|
||||||
$backend_class = DI::storageManager()->getWritableStorageByName($photo['backend-class'] ?? '');
|
$backend_class = DI::storageManager()->getWritableStorageByName($photo['backend-class'] ?? '');
|
||||||
$fields["backend-ref"] = $backend_class->put($img->asString(), $photo['backend-ref']);
|
$fields['backend-ref'] = $backend_class->put($image->asString(), $photo['backend-ref']);
|
||||||
} catch (InvalidClassStorageException $storageException) {
|
} catch (InvalidClassStorageException $storageException) {
|
||||||
$fields["data"] = $img->asString();
|
$fields['data'] = $image->asString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$fields['updated'] = DateTimeFormat::utcNow();
|
$fields['updated'] = DateTimeFormat::utcNow();
|
||||||
|
|
@ -468,7 +468,7 @@ class Photo
|
||||||
|
|
||||||
$fields['edited'] = DateTimeFormat::utcNow();
|
$fields['edited'] = DateTimeFormat::utcNow();
|
||||||
|
|
||||||
return DBA::update("photo", $fields, $conditions, $old_fields);
|
return DBA::update('photo', $fields, $conditions, $old_fields);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -476,20 +476,20 @@ class Photo
|
||||||
* @param integer $uid user id
|
* @param integer $uid user id
|
||||||
* @param integer $cid contact id
|
* @param integer $cid contact id
|
||||||
* @param boolean $quit_on_error optional, default false
|
* @param boolean $quit_on_error optional, default false
|
||||||
* @return array
|
* @return array|bool Array on success, false on error
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function importProfilePhoto($image_url, $uid, $cid, $quit_on_error = false)
|
public static function importProfilePhoto(string $image_url, int $uid, int $cid, bool $quit_on_error = false)
|
||||||
{
|
{
|
||||||
$thumb = "";
|
$thumb = '';
|
||||||
$micro = "";
|
$micro = '';
|
||||||
|
|
||||||
$photo = DBA::selectFirst(
|
$photo = DBA::selectFirst(
|
||||||
"photo", ["resource-id"], ["uid" => $uid, "contact-id" => $cid, "scale" => 4, "photo-type" => self::CONTACT_AVATAR]
|
'photo', ['resource-id'], ['uid' => $uid, 'contact-id' => $cid, 'scale' => 4, 'photo-type' => self::CONTACT_AVATAR]
|
||||||
);
|
);
|
||||||
if (!empty($photo['resource-id'])) {
|
if (!empty($photo['resource-id'])) {
|
||||||
$resource_id = $photo["resource-id"];
|
$resource_id = $photo['resource-id'];
|
||||||
} else {
|
} else {
|
||||||
$resource_id = self::newResource();
|
$resource_id = self::newResource();
|
||||||
}
|
}
|
||||||
|
|
@ -507,66 +507,66 @@ class Photo
|
||||||
$type = '';
|
$type = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($quit_on_error && ($img_str == "")) {
|
if ($quit_on_error && ($img_str == '')) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$type = Images::getMimeTypeByData($img_str, $image_url, $type);
|
$type = Images::getMimeTypeByData($img_str, $image_url, $type);
|
||||||
|
|
||||||
$Image = new Image($img_str, $type);
|
$image = new Image($img_str, $type);
|
||||||
if ($Image->isValid()) {
|
if ($image->isValid()) {
|
||||||
$Image->scaleToSquare(300);
|
$image->scaleToSquare(300);
|
||||||
|
|
||||||
$filesize = strlen($Image->asString());
|
$filesize = strlen($image->asString());
|
||||||
$maximagesize = DI::config()->get('system', 'maximagesize');
|
$maximagesize = DI::config()->get('system', 'maximagesize');
|
||||||
if (!empty($maximagesize) && ($filesize > $maximagesize)) {
|
if (!empty($maximagesize) && ($filesize > $maximagesize)) {
|
||||||
Logger::info('Avatar exceeds image limit', ['uid' => $uid, 'cid' => $cid, 'maximagesize' => $maximagesize, 'size' => $filesize, 'type' => $Image->getType()]);
|
Logger::info('Avatar exceeds image limit', ['uid' => $uid, 'cid' => $cid, 'maximagesize' => $maximagesize, 'size' => $filesize, 'type' => $image->getType()]);
|
||||||
if ($Image->getType() == 'image/gif') {
|
if ($image->getType() == 'image/gif') {
|
||||||
$Image->toStatic();
|
$image->toStatic();
|
||||||
$Image = new Image($Image->asString(), 'image/png');
|
$image = new Image($image->asString(), 'image/png');
|
||||||
|
|
||||||
$filesize = strlen($Image->asString());
|
$filesize = strlen($image->asString());
|
||||||
Logger::info('Converted gif to a static png', ['uid' => $uid, 'cid' => $cid, 'size' => $filesize, 'type' => $Image->getType()]);
|
Logger::info('Converted gif to a static png', ['uid' => $uid, 'cid' => $cid, 'size' => $filesize, 'type' => $image->getType()]);
|
||||||
}
|
}
|
||||||
if ($filesize > $maximagesize) {
|
if ($filesize > $maximagesize) {
|
||||||
foreach ([160, 80] as $pixels) {
|
foreach ([160, 80] as $pixels) {
|
||||||
if ($filesize > $maximagesize) {
|
if ($filesize > $maximagesize) {
|
||||||
Logger::info('Resize', ['uid' => $uid, 'cid' => $cid, 'size' => $filesize, 'max' => $maximagesize, 'pixels' => $pixels, 'type' => $Image->getType()]);
|
Logger::info('Resize', ['uid' => $uid, 'cid' => $cid, 'size' => $filesize, 'max' => $maximagesize, 'pixels' => $pixels, 'type' => $image->getType()]);
|
||||||
$Image->scaleDown($pixels);
|
$image->scaleDown($pixels);
|
||||||
$filesize = strlen($Image->asString());
|
$filesize = strlen($image->asString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Logger::info('Avatar is resized', ['uid' => $uid, 'cid' => $cid, 'size' => $filesize, 'type' => $Image->getType()]);
|
Logger::info('Avatar is resized', ['uid' => $uid, 'cid' => $cid, 'size' => $filesize, 'type' => $image->getType()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$r = self::store($Image, $uid, $cid, $resource_id, $filename, self::CONTACT_PHOTOS, 4, self::CONTACT_AVATAR);
|
$r = self::store($image, $uid, $cid, $resource_id, $filename, self::CONTACT_PHOTOS, 4, self::CONTACT_AVATAR);
|
||||||
|
|
||||||
if ($r === false) {
|
if ($r === false) {
|
||||||
$photo_failure = true;
|
$photo_failure = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$Image->scaleDown(80);
|
$image->scaleDown(80);
|
||||||
|
|
||||||
$r = self::store($Image, $uid, $cid, $resource_id, $filename, self::CONTACT_PHOTOS, 5, self::CONTACT_AVATAR);
|
$r = self::store($image, $uid, $cid, $resource_id, $filename, self::CONTACT_PHOTOS, 5, self::CONTACT_AVATAR);
|
||||||
|
|
||||||
if ($r === false) {
|
if ($r === false) {
|
||||||
$photo_failure = true;
|
$photo_failure = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$Image->scaleDown(48);
|
$image->scaleDown(48);
|
||||||
|
|
||||||
$r = self::store($Image, $uid, $cid, $resource_id, $filename, self::CONTACT_PHOTOS, 6, self::CONTACT_AVATAR);
|
$r = self::store($image, $uid, $cid, $resource_id, $filename, self::CONTACT_PHOTOS, 6, self::CONTACT_AVATAR);
|
||||||
|
|
||||||
if ($r === false) {
|
if ($r === false) {
|
||||||
$photo_failure = true;
|
$photo_failure = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$suffix = "?ts=" . time();
|
$suffix = '?ts=' . time();
|
||||||
|
|
||||||
$image_url = DI::baseUrl() . "/photo/" . $resource_id . "-4." . $Image->getExt() . $suffix;
|
$image_url = DI::baseUrl() . '/photo/' . $resource_id . '-4.' . $image->getExt() . $suffix;
|
||||||
$thumb = DI::baseUrl() . "/photo/" . $resource_id . "-5." . $Image->getExt() . $suffix;
|
$thumb = DI::baseUrl() . '/photo/' . $resource_id . '-5.' . $image->getExt() . $suffix;
|
||||||
$micro = DI::baseUrl() . "/photo/" . $resource_id . "-6." . $Image->getExt() . $suffix;
|
$micro = DI::baseUrl() . '/photo/' . $resource_id . '-6.' . $image->getExt() . $suffix;
|
||||||
} else {
|
} else {
|
||||||
$photo_failure = true;
|
$photo_failure = true;
|
||||||
}
|
}
|
||||||
|
|
@ -590,31 +590,33 @@ class Photo
|
||||||
* @param string $hemi hemi
|
* @param string $hemi hemi
|
||||||
* @return float
|
* @return float
|
||||||
*/
|
*/
|
||||||
public static function getGps($exifCoord, $hemi)
|
public static function getGps(array $exifCoord, string $hemi): float
|
||||||
{
|
{
|
||||||
$degrees = count($exifCoord) > 0 ? self::gps2Num($exifCoord[0]) : 0;
|
$degrees = count($exifCoord) > 0 ? self::gps2Num($exifCoord[0]) : 0;
|
||||||
$minutes = count($exifCoord) > 1 ? self::gps2Num($exifCoord[1]) : 0;
|
$minutes = count($exifCoord) > 1 ? self::gps2Num($exifCoord[1]) : 0;
|
||||||
$seconds = count($exifCoord) > 2 ? self::gps2Num($exifCoord[2]) : 0;
|
$seconds = count($exifCoord) > 2 ? self::gps2Num($exifCoord[2]) : 0;
|
||||||
|
|
||||||
$flip = ($hemi == "W" || $hemi == "S") ? -1 : 1;
|
$flip = ($hemi == 'W' || $hemi == 'S') ? -1 : 1;
|
||||||
|
|
||||||
return floatval($flip * ($degrees + ($minutes / 60) + ($seconds / 3600)));
|
return floatval($flip * ($degrees + ($minutes / 60) + ($seconds / 3600)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Change GPS to float number
|
||||||
|
*
|
||||||
* @param string $coordPart coordPart
|
* @param string $coordPart coordPart
|
||||||
* @return float
|
* @return float
|
||||||
*/
|
*/
|
||||||
private static function gps2Num($coordPart)
|
private static function gps2Num(string $coordPart): float
|
||||||
{
|
{
|
||||||
$parts = explode("/", $coordPart);
|
$parts = explode('/', $coordPart);
|
||||||
|
|
||||||
if (count($parts) <= 0) {
|
if (count($parts) <= 0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($parts) == 1) {
|
if (count($parts) == 1) {
|
||||||
return $parts[0];
|
return (float)$parts[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
return floatval($parts[0]) / floatval($parts[1]);
|
return floatval($parts[0]) / floatval($parts[1]);
|
||||||
|
|
@ -631,17 +633,18 @@ class Photo
|
||||||
* @return array Returns array of the photo albums
|
* @return array Returns array of the photo albums
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function getAlbums($uid, $update = false)
|
public static function getAlbums(int $uid, bool $update = false): array
|
||||||
{
|
{
|
||||||
$sql_extra = Security::getPermissionsSQLByUserId($uid);
|
$sql_extra = Security::getPermissionsSQLByUserId($uid);
|
||||||
|
|
||||||
$avatar_type = (local_user() && (local_user() == $uid)) ? self::USER_AVATAR : self::DEFAULT;
|
$avatar_type = (local_user() && (local_user() == $uid)) ? self::USER_AVATAR : self::DEFAULT;
|
||||||
$banner_type = (local_user() && (local_user() == $uid)) ? self::USER_BANNER : self::DEFAULT;
|
$banner_type = (local_user() && (local_user() == $uid)) ? self::USER_BANNER : self::DEFAULT;
|
||||||
|
|
||||||
$key = "photo_albums:".$uid.":".local_user().":".remote_user();
|
$key = 'photo_albums:' . $uid . ':' . local_user() . ':' . remote_user();
|
||||||
$albums = DI::cache()->get($key);
|
$albums = DI::cache()->get($key);
|
||||||
|
|
||||||
if (is_null($albums) || $update) {
|
if (is_null($albums) || $update) {
|
||||||
if (!DI::config()->get("system", "no_count", false)) {
|
if (!DI::config()->get('system', 'no_count', false)) {
|
||||||
/// @todo This query needs to be renewed. It is really slow
|
/// @todo This query needs to be renewed. It is really slow
|
||||||
// At this time we just store the data in the cache
|
// At this time we just store the data in the cache
|
||||||
$albums = DBA::toArray(DBA::p("SELECT COUNT(DISTINCT `resource-id`) AS `total`, `album`, ANY_VALUE(`created`) AS `created`
|
$albums = DBA::toArray(DBA::p("SELECT COUNT(DISTINCT `resource-id`) AS `total`, `album`, ANY_VALUE(`created`) AS `created`
|
||||||
|
|
@ -674,19 +677,19 @@ class Photo
|
||||||
* @return void
|
* @return void
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function clearAlbumCache($uid)
|
public static function clearAlbumCache(int $uid)
|
||||||
{
|
{
|
||||||
$key = "photo_albums:".$uid.":".local_user().":".remote_user();
|
$key = 'photo_albums:' . $uid . ':' . local_user() . ':' . remote_user();
|
||||||
DI::cache()->set($key, null, Duration::DAY);
|
DI::cache()->set($key, null, Duration::DAY);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a unique photo ID.
|
* Generate a unique photo ID.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string Resource GUID
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function newResource()
|
public static function newResource(): string
|
||||||
{
|
{
|
||||||
return System::createGUID(32, false);
|
return System::createGUID(32, false);
|
||||||
}
|
}
|
||||||
|
|
@ -697,7 +700,7 @@ class Photo
|
||||||
* @param string $image_uri The URI of the photo
|
* @param string $image_uri The URI of the photo
|
||||||
* @return string The rid of the photo, or an empty string if the URI is not local
|
* @return string The rid of the photo, or an empty string if the URI is not local
|
||||||
*/
|
*/
|
||||||
public static function ridFromURI(string $image_uri)
|
public static function ridFromURI(string $image_uri): string
|
||||||
{
|
{
|
||||||
if (!stristr($image_uri, DI::baseUrl() . '/photo/')) {
|
if (!stristr($image_uri, DI::baseUrl() . '/photo/')) {
|
||||||
return '';
|
return '';
|
||||||
|
|
@ -809,7 +812,7 @@ class Photo
|
||||||
* @param string $name Picture link
|
* @param string $name Picture link
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public static function getResourceData(string $name):array
|
public static function getResourceData(string $name): array
|
||||||
{
|
{
|
||||||
$base = DI::baseUrl()->get();
|
$base = DI::baseUrl()->get();
|
||||||
|
|
||||||
|
|
@ -840,8 +843,9 @@ class Photo
|
||||||
* @return boolean
|
* @return boolean
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function isLocal($name)
|
public static function isLocal(string $name): bool
|
||||||
{
|
{
|
||||||
|
// @TODO Maybe a proper check here on true condition?
|
||||||
return (bool)self::getIdForName($name);
|
return (bool)self::getIdForName($name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -851,7 +855,7 @@ class Photo
|
||||||
* @param string $name Picture link
|
* @param string $name Picture link
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public static function getIdForName($name)
|
public static function getIdForName(string $name): int
|
||||||
{
|
{
|
||||||
$data = self::getResourceData($name);
|
$data = self::getResourceData($name);
|
||||||
if (empty($data)) {
|
if (empty($data)) {
|
||||||
|
|
@ -872,7 +876,7 @@ class Photo
|
||||||
* @return boolean
|
* @return boolean
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function isLocalPage($name)
|
public static function isLocalPage(string $name): bool
|
||||||
{
|
{
|
||||||
$base = DI::baseUrl()->get();
|
$base = DI::baseUrl()->get();
|
||||||
|
|
||||||
|
|
@ -885,17 +889,23 @@ class Photo
|
||||||
return DBA::exists('photo', ['resource-id' => $guid]);
|
return DBA::exists('photo', ['resource-id' => $guid]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function fitImageSize($Image)
|
/**
|
||||||
|
* Tries to resize image to wanted maximum size
|
||||||
|
*
|
||||||
|
* @param Image $image Image instance
|
||||||
|
* @return Image|null Image instance on success, null on error
|
||||||
|
*/
|
||||||
|
private static function fitImageSize(Image $image)
|
||||||
{
|
{
|
||||||
$max_length = DI::config()->get('system', 'max_image_length');
|
$max_length = DI::config()->get('system', 'max_image_length');
|
||||||
if ($max_length > 0) {
|
if ($max_length > 0) {
|
||||||
$Image->scaleDown($max_length);
|
$image->scaleDown($max_length);
|
||||||
Logger::info('File upload: Scaling picture to new size', ['max-length' => $max_length]);
|
Logger::info('File upload: Scaling picture to new size', ['max-length' => $max_length]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$filesize = strlen($Image->asString());
|
$filesize = strlen($image->asString());
|
||||||
$width = $Image->getWidth();
|
$width = $image->getWidth();
|
||||||
$height = $Image->getHeight();
|
$height = $image->getHeight();
|
||||||
|
|
||||||
$maximagesize = DI::config()->get('system', 'maximagesize');
|
$maximagesize = DI::config()->get('system', 'maximagesize');
|
||||||
|
|
||||||
|
|
@ -904,10 +914,10 @@ class Photo
|
||||||
foreach ([5120, 2560, 1280, 640] as $pixels) {
|
foreach ([5120, 2560, 1280, 640] as $pixels) {
|
||||||
if (($filesize > $maximagesize) && (max($width, $height) > $pixels)) {
|
if (($filesize > $maximagesize) && (max($width, $height) > $pixels)) {
|
||||||
Logger::info('Resize', ['size' => $filesize, 'width' => $width, 'height' => $height, 'max' => $maximagesize, 'pixels' => $pixels]);
|
Logger::info('Resize', ['size' => $filesize, 'width' => $width, 'height' => $height, 'max' => $maximagesize, 'pixels' => $pixels]);
|
||||||
$Image->scaleDown($pixels);
|
$image->scaleDown($pixels);
|
||||||
$filesize = strlen($Image->asString());
|
$filesize = strlen($image->asString());
|
||||||
$width = $Image->getWidth();
|
$width = $image->getWidth();
|
||||||
$height = $Image->getHeight();
|
$height = $image->getHeight();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($filesize > $maximagesize) {
|
if ($filesize > $maximagesize) {
|
||||||
|
|
@ -916,10 +926,16 @@ class Photo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $Image;
|
return $image;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function loadImageFromURL(string $image_url)
|
/**
|
||||||
|
* Fetches image from URL and returns an array with instance and local file name
|
||||||
|
*
|
||||||
|
* @param string $image_url URL to image
|
||||||
|
* @return array With: 'image' and 'filename' fields or empty array on error
|
||||||
|
*/
|
||||||
|
private static function loadImageFromURL(string $image_url): array
|
||||||
{
|
{
|
||||||
$filename = basename($image_url);
|
$filename = basename($image_url);
|
||||||
if (!empty($image_url)) {
|
if (!empty($image_url)) {
|
||||||
|
|
@ -939,17 +955,23 @@ class Photo
|
||||||
|
|
||||||
$type = Images::getMimeTypeByData($img_str, $image_url, $type);
|
$type = Images::getMimeTypeByData($img_str, $image_url, $type);
|
||||||
|
|
||||||
$Image = new Image($img_str, $type);
|
$image = new Image($img_str, $type);
|
||||||
|
|
||||||
$Image = self::fitImageSize($Image);
|
$image = self::fitImageSize($image);
|
||||||
if (empty($Image)) {
|
if (empty($image)) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
return ['image' => $Image, 'filename' => $filename];
|
return ['image' => $image, 'filename' => $filename];
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function uploadImage(array $files)
|
/**
|
||||||
|
* Inserts uploaded image into database and removes local temporary file
|
||||||
|
*
|
||||||
|
* @param array $files File array
|
||||||
|
* @return array With 'image' for Image instance and 'filename' for local file name or empty array on error
|
||||||
|
*/
|
||||||
|
private static function uploadImage(array $files): array
|
||||||
{
|
{
|
||||||
Logger::info('starting new upload');
|
Logger::info('starting new upload');
|
||||||
|
|
||||||
|
|
@ -1008,34 +1030,36 @@ class Photo
|
||||||
Logger::info('File upload', ['src' => $src, 'filename' => $filename, 'size' => $filesize, 'type' => $filetype]);
|
Logger::info('File upload', ['src' => $src, 'filename' => $filename, 'size' => $filesize, 'type' => $filetype]);
|
||||||
|
|
||||||
$imagedata = @file_get_contents($src);
|
$imagedata = @file_get_contents($src);
|
||||||
$Image = new Image($imagedata, $filetype);
|
$image = new Image($imagedata, $filetype);
|
||||||
if (!$Image->isValid()) {
|
if (!$image->isValid()) {
|
||||||
Logger::notice('Image is unvalid', ['files' => $files]);
|
Logger::notice('Image is unvalid', ['files' => $files]);
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$Image->orient($src);
|
$image->orient($src);
|
||||||
@unlink($src);
|
@unlink($src);
|
||||||
|
|
||||||
$Image = self::fitImageSize($Image);
|
$image = self::fitImageSize($image);
|
||||||
if (empty($Image)) {
|
if (empty($image)) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
return ['image' => $Image, 'filename' => $filename];
|
return ['image' => $image, 'filename' => $filename];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Handles uploaded image and assigns it to given user id
|
||||||
|
*
|
||||||
* @param int $uid User ID
|
* @param int $uid User ID
|
||||||
* @param array $files uploaded file array
|
* @param array $files uploaded file array
|
||||||
* @param string $album
|
* @param string $album Album name (optional)
|
||||||
* @param string|null $allow_cid
|
* @param string|null $allow_cid
|
||||||
* @param string|null $allow_gid
|
* @param string|null $allow_gid
|
||||||
* @param string $deny_cid
|
* @param string $deny_cid
|
||||||
* @param string $deny_gid
|
* @param string $deny_gid
|
||||||
* @param string $desc
|
* @param string $desc Description (optional)
|
||||||
* @param string $resource_id
|
* @param string $resource_id GUID (optional)
|
||||||
* @return array photo record
|
* @return array photo record or empty array on error
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function upload(int $uid, array $files, string $album = '', string $allow_cid = null, string $allow_gid = null, string $deny_cid = '', string $deny_gid = '', string $desc = '', string $resource_id = ''): array
|
public static function upload(int $uid, array $files, string $album = '', string $allow_cid = null, string $allow_gid = null, string $deny_cid = '', string $deny_gid = '', string $desc = '', string $resource_id = ''): array
|
||||||
|
|
@ -1052,10 +1076,10 @@ class Photo
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$Image = $data['image'];
|
$image = $data['image'];
|
||||||
$filename = $data['filename'];
|
$filename = $data['filename'];
|
||||||
$width = $Image->getWidth();
|
$width = $image->getWidth();
|
||||||
$height = $Image->getHeight();
|
$height = $image->getHeight();
|
||||||
|
|
||||||
$resource_id = $resource_id ?: self::newResource();
|
$resource_id = $resource_id ?: self::newResource();
|
||||||
$album = $album ?: DI::l10n()->t('Wall Photos');
|
$album = $album ?: DI::l10n()->t('Wall Photos');
|
||||||
|
|
@ -1067,23 +1091,23 @@ class Photo
|
||||||
|
|
||||||
$smallest = 0;
|
$smallest = 0;
|
||||||
|
|
||||||
$r = self::store($Image, $user['uid'], 0, $resource_id, $filename, $album, 0, self::DEFAULT, $allow_cid, $allow_gid, $deny_cid, $deny_gid, $desc);
|
$r = self::store($image, $user['uid'], 0, $resource_id, $filename, $album, 0, self::DEFAULT, $allow_cid, $allow_gid, $deny_cid, $deny_gid, $desc);
|
||||||
if (!$r) {
|
if (!$r) {
|
||||||
Logger::notice('Photo could not be stored');
|
Logger::notice('Photo could not be stored');
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($width > 640 || $height > 640) {
|
if ($width > 640 || $height > 640) {
|
||||||
$Image->scaleDown(640);
|
$image->scaleDown(640);
|
||||||
$r = self::store($Image, $user['uid'], 0, $resource_id, $filename, $album, 1, self::DEFAULT, $allow_cid, $allow_gid, $deny_cid, $deny_gid, $desc);
|
$r = self::store($image, $user['uid'], 0, $resource_id, $filename, $album, 1, self::DEFAULT, $allow_cid, $allow_gid, $deny_cid, $deny_gid, $desc);
|
||||||
if ($r) {
|
if ($r) {
|
||||||
$smallest = 1;
|
$smallest = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($width > 320 || $height > 320) {
|
if ($width > 320 || $height > 320) {
|
||||||
$Image->scaleDown(320);
|
$image->scaleDown(320);
|
||||||
$r = self::store($Image, $user['uid'], 0, $resource_id, $filename, $album, 2, self::DEFAULT, $allow_cid, $allow_gid, $deny_cid, $deny_gid, $desc);
|
$r = self::store($image, $user['uid'], 0, $resource_id, $filename, $album, 2, self::DEFAULT, $allow_cid, $allow_gid, $deny_cid, $deny_gid, $desc);
|
||||||
if ($r && ($smallest == 0)) {
|
if ($r && ($smallest == 0)) {
|
||||||
$smallest = 2;
|
$smallest = 2;
|
||||||
}
|
}
|
||||||
|
|
@ -1105,8 +1129,8 @@ class Photo
|
||||||
$picture['height'] = $photo['height'];
|
$picture['height'] = $photo['height'];
|
||||||
$picture['type'] = $photo['type'];
|
$picture['type'] = $photo['type'];
|
||||||
$picture['albumpage'] = DI::baseUrl() . '/photos/' . $user['nickname'] . '/image/' . $resource_id;
|
$picture['albumpage'] = DI::baseUrl() . '/photos/' . $user['nickname'] . '/image/' . $resource_id;
|
||||||
$picture['picture'] = DI::baseUrl() . '/photo/{$resource_id}-0.' . $Image->getExt();
|
$picture['picture'] = DI::baseUrl() . '/photo/{$resource_id}-0.' . $image->getExt();
|
||||||
$picture['preview'] = DI::baseUrl() . '/photo/{$resource_id}-{$smallest}.' . $Image->getExt();
|
$picture['preview'] = DI::baseUrl() . '/photo/{$resource_id}-{$smallest}.' . $image->getExt();
|
||||||
|
|
||||||
Logger::info('upload done', ['picture' => $picture]);
|
Logger::info('upload done', ['picture' => $picture]);
|
||||||
return $picture;
|
return $picture;
|
||||||
|
|
@ -1139,10 +1163,10 @@ class Photo
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$Image = $data['image'];
|
$image = $data['image'];
|
||||||
$filename = $data['filename'];
|
$filename = $data['filename'];
|
||||||
$width = $Image->getWidth();
|
$width = $image->getWidth();
|
||||||
$height = $Image->getHeight();
|
$height = $image->getHeight();
|
||||||
|
|
||||||
$resource_id = self::newResource();
|
$resource_id = self::newResource();
|
||||||
$album = DI::l10n()->t(self::PROFILE_PHOTOS);
|
$album = DI::l10n()->t(self::PROFILE_PHOTOS);
|
||||||
|
|
@ -1151,28 +1175,28 @@ class Photo
|
||||||
logger::info('starting new profile image upload');
|
logger::info('starting new profile image upload');
|
||||||
|
|
||||||
if ($width > 300 || $height > 300) {
|
if ($width > 300 || $height > 300) {
|
||||||
$Image->scaleDown(300);
|
$image->scaleDown(300);
|
||||||
}
|
}
|
||||||
|
|
||||||
$r = self::store($Image, $uid, 0, $resource_id, $filename, $album, 4, self::USER_AVATAR);
|
$r = self::store($image, $uid, 0, $resource_id, $filename, $album, 4, self::USER_AVATAR);
|
||||||
if (!$r) {
|
if (!$r) {
|
||||||
logger::notice('profile image upload with scale 4 (300) failed');
|
logger::notice('profile image upload with scale 4 (300) failed');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($width > 80 || $height > 80) {
|
if ($width > 80 || $height > 80) {
|
||||||
$Image->scaleDown(80);
|
$image->scaleDown(80);
|
||||||
}
|
}
|
||||||
|
|
||||||
$r = self::store($Image, $uid, 0, $resource_id, $filename, $album, 5, self::USER_AVATAR);
|
$r = self::store($image, $uid, 0, $resource_id, $filename, $album, 5, self::USER_AVATAR);
|
||||||
if (!$r) {
|
if (!$r) {
|
||||||
logger::notice('profile image upload with scale 5 (80) failed');
|
logger::notice('profile image upload with scale 5 (80) failed');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($width > 48 || $height > 48) {
|
if ($width > 48 || $height > 48) {
|
||||||
$Image->scaleDown(48);
|
$image->scaleDown(48);
|
||||||
}
|
}
|
||||||
|
|
||||||
$r = self::store($Image, $uid, 0, $resource_id, $filename, $album, 6, self::USER_AVATAR);
|
$r = self::store($image, $uid, 0, $resource_id, $filename, $album, 6, self::USER_AVATAR);
|
||||||
if (!$r) {
|
if (!$r) {
|
||||||
logger::notice('profile image upload with scale 6 (48) failed');
|
logger::notice('profile image upload with scale 6 (48) failed');
|
||||||
}
|
}
|
||||||
|
|
@ -1217,19 +1241,19 @@ class Photo
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$Image = $data['image'];
|
$image = $data['image'];
|
||||||
$filename = $data['filename'];
|
$filename = $data['filename'];
|
||||||
$width = $Image->getWidth();
|
$width = $image->getWidth();
|
||||||
$height = $Image->getHeight();
|
$height = $image->getHeight();
|
||||||
|
|
||||||
$resource_id = self::newResource();
|
$resource_id = self::newResource();
|
||||||
$album = DI::l10n()->t(self::BANNER_PHOTOS);
|
$album = DI::l10n()->t(self::BANNER_PHOTOS);
|
||||||
|
|
||||||
if ($width > 960) {
|
if ($width > 960) {
|
||||||
$Image->scaleDown(960);
|
$image->scaleDown(960);
|
||||||
}
|
}
|
||||||
|
|
||||||
$r = self::store($Image, $uid, 0, $resource_id, $filename, $album, 3, self::USER_BANNER);
|
$r = self::store($image, $uid, 0, $resource_id, $filename, $album, 3, self::USER_BANNER);
|
||||||
if (!$r) {
|
if (!$r) {
|
||||||
logger::notice('profile banner upload with scale 3 (960) failed');
|
logger::notice('profile banner upload with scale 3 (960) failed');
|
||||||
}
|
}
|
||||||
|
|
@ -1247,3 +1271,4 @@ class Photo
|
||||||
return $resource_id;
|
return $resource_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ class Post
|
||||||
* @return int ID of inserted post
|
* @return int ID of inserted post
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function insert(int $uri_id, array $data = [])
|
public static function insert(int $uri_id, array $data = []): int
|
||||||
{
|
{
|
||||||
if (empty($uri_id)) {
|
if (empty($uri_id)) {
|
||||||
throw new BadMethodCallException('Empty URI_id');
|
throw new BadMethodCallException('Empty URI_id');
|
||||||
|
|
@ -107,8 +107,10 @@ class Post
|
||||||
* @param object $stmt statement object
|
* @param object $stmt statement object
|
||||||
* @param bool $do_close
|
* @param bool $do_close
|
||||||
* @return array Data array
|
* @return array Data array
|
||||||
|
* @todo Find proper type-hint for $stmt and maybe avoid boolean
|
||||||
*/
|
*/
|
||||||
public static function toArray($stmt, $do_close = true) {
|
public static function toArray($stmt, bool $do_close = true)
|
||||||
|
{
|
||||||
if (is_bool($stmt)) {
|
if (is_bool($stmt)) {
|
||||||
return $stmt;
|
return $stmt;
|
||||||
}
|
}
|
||||||
|
|
@ -131,7 +133,8 @@ class Post
|
||||||
* @return boolean Are there rows for that condition?
|
* @return boolean Are there rows for that condition?
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function exists($condition) {
|
public static function exists(array $condition): bool
|
||||||
|
{
|
||||||
return DBA::exists('post-user-view', $condition);
|
return DBA::exists('post-user-view', $condition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -151,7 +154,7 @@ class Post
|
||||||
* $count = Post::count($condition);
|
* $count = Post::count($condition);
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function count(array $condition = [], array $params = [])
|
public static function count(array $condition = [], array $params = []): int
|
||||||
{
|
{
|
||||||
return DBA::count('post-user-view', $condition, $params);
|
return DBA::count('post-user-view', $condition, $params);
|
||||||
}
|
}
|
||||||
|
|
@ -172,7 +175,7 @@ class Post
|
||||||
* $count = Post::count($condition);
|
* $count = Post::count($condition);
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function countThread(array $condition = [], array $params = [])
|
public static function countThread(array $condition = [], array $params = []): int
|
||||||
{
|
{
|
||||||
return DBA::count('post-thread-user-view', $condition, $params);
|
return DBA::count('post-thread-user-view', $condition, $params);
|
||||||
}
|
}
|
||||||
|
|
@ -193,7 +196,7 @@ class Post
|
||||||
* $count = Post::count($condition);
|
* $count = Post::count($condition);
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function countPosts(array $condition = [], array $params = [])
|
public static function countPosts(array $condition = [], array $params = []): int
|
||||||
{
|
{
|
||||||
return DBA::count('post-view', $condition, $params);
|
return DBA::count('post-view', $condition, $params);
|
||||||
}
|
}
|
||||||
|
|
@ -209,7 +212,7 @@ class Post
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
* @see DBA::select
|
* @see DBA::select
|
||||||
*/
|
*/
|
||||||
public static function selectFirst(array $fields = [], array $condition = [], $params = [])
|
public static function selectFirst(array $fields = [], array $condition = [], array $params = [])
|
||||||
{
|
{
|
||||||
$params['limit'] = 1;
|
$params['limit'] = 1;
|
||||||
|
|
||||||
|
|
@ -234,7 +237,7 @@ class Post
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
* @see DBA::select
|
* @see DBA::select
|
||||||
*/
|
*/
|
||||||
public static function selectFirstPost(array $fields = [], array $condition = [], $params = [])
|
public static function selectFirstPost(array $fields = [], array $condition = [], array $params = [])
|
||||||
{
|
{
|
||||||
$params['limit'] = 1;
|
$params['limit'] = 1;
|
||||||
|
|
||||||
|
|
@ -259,7 +262,7 @@ class Post
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
* @see DBA::select
|
* @see DBA::select
|
||||||
*/
|
*/
|
||||||
public static function selectFirstThread(array $fields = [], array $condition = [], $params = [])
|
public static function selectFirstThread(array $fields = [], array $condition = [], array $params = [])
|
||||||
{
|
{
|
||||||
$params['limit'] = 1;
|
$params['limit'] = 1;
|
||||||
|
|
||||||
|
|
@ -284,7 +287,7 @@ class Post
|
||||||
* @return array
|
* @return array
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function selectToArray(array $fields = [], array $condition = [], $params = [])
|
public static function selectToArray(array $fields = [], array $condition = [], array $params = [])
|
||||||
{
|
{
|
||||||
$result = self::select($fields, $condition, $params);
|
$result = self::select($fields, $condition, $params);
|
||||||
|
|
||||||
|
|
@ -312,7 +315,7 @@ class Post
|
||||||
* @return boolean|object
|
* @return boolean|object
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function selectView(string $view, array $selected = [], array $condition = [], $params = [])
|
private static function selectView(string $view, array $selected = [], array $condition = [], array $params = [])
|
||||||
{
|
{
|
||||||
if (empty($selected)) {
|
if (empty($selected)) {
|
||||||
$selected = array_merge(Item::DISPLAY_FIELDLIST, Item::ITEM_FIELDLIST);
|
$selected = array_merge(Item::DISPLAY_FIELDLIST, Item::ITEM_FIELDLIST);
|
||||||
|
|
@ -337,7 +340,7 @@ class Post
|
||||||
* @return boolean|object
|
* @return boolean|object
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function select(array $selected = [], array $condition = [], $params = [])
|
public static function select(array $selected = [], array $condition = [], array $params = [])
|
||||||
{
|
{
|
||||||
return self::selectView('post-user-view', $selected, $condition, $params);
|
return self::selectView('post-user-view', $selected, $condition, $params);
|
||||||
}
|
}
|
||||||
|
|
@ -352,7 +355,7 @@ class Post
|
||||||
* @return boolean|object
|
* @return boolean|object
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function selectPosts(array $selected = [], array $condition = [], $params = [])
|
public static function selectPosts(array $selected = [], array $condition = [], array $params = [])
|
||||||
{
|
{
|
||||||
return self::selectView('post-view', $selected, $condition, $params);
|
return self::selectView('post-view', $selected, $condition, $params);
|
||||||
}
|
}
|
||||||
|
|
@ -367,7 +370,7 @@ class Post
|
||||||
* @return boolean|object
|
* @return boolean|object
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function selectThread(array $selected = [], array $condition = [], $params = [])
|
public static function selectThread(array $selected = [], array $condition = [], array $params = [])
|
||||||
{
|
{
|
||||||
return self::selectView('post-thread-user-view', $selected, $condition, $params);
|
return self::selectView('post-thread-user-view', $selected, $condition, $params);
|
||||||
}
|
}
|
||||||
|
|
@ -384,7 +387,7 @@ class Post
|
||||||
* @return boolean|object
|
* @return boolean|object
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function selectViewForUser(string $view, $uid, array $selected = [], array $condition = [], $params = [])
|
private static function selectViewForUser(string $view, int $uid, array $selected = [], array $condition = [], array $params = [])
|
||||||
{
|
{
|
||||||
if (empty($selected)) {
|
if (empty($selected)) {
|
||||||
$selected = Item::DISPLAY_FIELDLIST;
|
$selected = Item::DISPLAY_FIELDLIST;
|
||||||
|
|
@ -425,7 +428,7 @@ class Post
|
||||||
* @return boolean|object
|
* @return boolean|object
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function selectForUser($uid, array $selected = [], array $condition = [], $params = [])
|
public static function selectForUser(int $uid, array $selected = [], array $condition = [], array $params = [])
|
||||||
{
|
{
|
||||||
return self::selectViewForUser('post-user-view', $uid, $selected, $condition, $params);
|
return self::selectViewForUser('post-user-view', $uid, $selected, $condition, $params);
|
||||||
}
|
}
|
||||||
|
|
@ -441,7 +444,7 @@ class Post
|
||||||
* @return boolean|object
|
* @return boolean|object
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function selectPostsForUser($uid, array $selected = [], array $condition = [], $params = [])
|
public static function selectPostsForUser(int $uid, array $selected = [], array $condition = [], array $params = [])
|
||||||
{
|
{
|
||||||
return self::selectViewForUser('post-view', $uid, $selected, $condition, $params);
|
return self::selectViewForUser('post-view', $uid, $selected, $condition, $params);
|
||||||
}
|
}
|
||||||
|
|
@ -457,7 +460,7 @@ class Post
|
||||||
* @return boolean|object
|
* @return boolean|object
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function selectThreadForUser($uid, array $selected = [], array $condition = [], $params = [])
|
public static function selectThreadForUser(int $uid, array $selected = [], array $condition = [], array $params = [])
|
||||||
{
|
{
|
||||||
return self::selectViewForUser('post-thread-user-view', $uid, $selected, $condition, $params);
|
return self::selectViewForUser('post-thread-user-view', $uid, $selected, $condition, $params);
|
||||||
}
|
}
|
||||||
|
|
@ -473,7 +476,7 @@ class Post
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
* @see DBA::select
|
* @see DBA::select
|
||||||
*/
|
*/
|
||||||
public static function selectFirstForUser($uid, array $selected = [], array $condition = [], $params = [])
|
public static function selectFirstForUser(int $uid, array $selected = [], array $condition = [], array $params = [])
|
||||||
{
|
{
|
||||||
$params['limit'] = 1;
|
$params['limit'] = 1;
|
||||||
|
|
||||||
|
|
@ -640,7 +643,7 @@ class Post
|
||||||
* @return boolean was the delete successful?
|
* @return boolean was the delete successful?
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function delete(array $conditions, array $options = [])
|
public static function delete(array $conditions, array $options = []): bool
|
||||||
{
|
{
|
||||||
return DBA::delete('post', $conditions, $options);
|
return DBA::delete('post', $conditions, $options);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ class Media
|
||||||
* @param array $media
|
* @param array $media
|
||||||
* @return array cleaned media array
|
* @return array cleaned media array
|
||||||
*/
|
*/
|
||||||
private static function unsetEmptyFields(array $media)
|
private static function unsetEmptyFields(array $media): array
|
||||||
{
|
{
|
||||||
$fields = ['mimetype', 'height', 'width', 'size', 'preview', 'preview-height', 'preview-width', 'description'];
|
$fields = ['mimetype', 'height', 'width', 'size', 'preview', 'preview-height', 'preview-width', 'description'];
|
||||||
foreach ($fields as $field) {
|
foreach ($fields as $field) {
|
||||||
|
|
@ -145,7 +145,7 @@ class Media
|
||||||
* @param string $title
|
* @param string $title
|
||||||
* @return string "[attach]" element
|
* @return string "[attach]" element
|
||||||
*/
|
*/
|
||||||
public static function getAttachElement(string $href, int $length, string $type, string $title = '')
|
public static function getAttachElement(string $href, int $length, string $type, string $title = ''): string
|
||||||
{
|
{
|
||||||
$media = self::fetchAdditionalData(['type' => self::DOCUMENT, 'url' => $href,
|
$media = self::fetchAdditionalData(['type' => self::DOCUMENT, 'url' => $href,
|
||||||
'size' => $length, 'mimetype' => $type, 'description' => $title]);
|
'size' => $length, 'mimetype' => $type, 'description' => $title]);
|
||||||
|
|
@ -160,7 +160,7 @@ class Media
|
||||||
* @param array $media
|
* @param array $media
|
||||||
* @return array media array with additional data
|
* @return array media array with additional data
|
||||||
*/
|
*/
|
||||||
public static function fetchAdditionalData(array $media)
|
public static function fetchAdditionalData(array $media): array
|
||||||
{
|
{
|
||||||
if (Network::isLocalLink($media['url'])) {
|
if (Network::isLocalLink($media['url'])) {
|
||||||
$media = self::fetchLocalData($media);
|
$media = self::fetchLocalData($media);
|
||||||
|
|
@ -235,7 +235,7 @@ class Media
|
||||||
* @param array $media
|
* @param array $media
|
||||||
* @return array media with added data
|
* @return array media with added data
|
||||||
*/
|
*/
|
||||||
private static function fetchLocalData(array $media)
|
private static function fetchLocalData(array $media): array
|
||||||
{
|
{
|
||||||
if (!preg_match('|.*?/photo/(.*[a-fA-F0-9])\-(.*[0-9])\..*[\w]|', $media['url'] ?? '', $matches)) {
|
if (!preg_match('|.*?/photo/(.*[a-fA-F0-9])\-(.*[0-9])\..*[\w]|', $media['url'] ?? '', $matches)) {
|
||||||
return $media;
|
return $media;
|
||||||
|
|
@ -266,7 +266,7 @@ class Media
|
||||||
* @param array $data
|
* @param array $data
|
||||||
* @return array data array with the detected type
|
* @return array data array with the detected type
|
||||||
*/
|
*/
|
||||||
public static function addType(array $data)
|
public static function addType(array $data): array
|
||||||
{
|
{
|
||||||
if (empty($data['mimetype'])) {
|
if (empty($data['mimetype'])) {
|
||||||
Logger::info('No MimeType provided', ['media' => $data]);
|
Logger::info('No MimeType provided', ['media' => $data]);
|
||||||
|
|
@ -318,7 +318,7 @@ class Media
|
||||||
* @param string $preview Preview picture
|
* @param string $preview Preview picture
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
private static function isPictureLink(string $page, string $preview)
|
private static function isPictureLink(string $page, string $preview): bool
|
||||||
{
|
{
|
||||||
return preg_match('#/photos/.*/image/#ism', $page) && preg_match('#/photo/.*-1\.#ism', $preview);
|
return preg_match('#/photos/.*/image/#ism', $page) && preg_match('#/photo/.*-1\.#ism', $preview);
|
||||||
}
|
}
|
||||||
|
|
@ -330,7 +330,7 @@ class Media
|
||||||
* @param string $body
|
* @param string $body
|
||||||
* @return string Body without media links
|
* @return string Body without media links
|
||||||
*/
|
*/
|
||||||
public static function insertFromBody(int $uriid, string $body)
|
public static function insertFromBody(int $uriid, string $body): string
|
||||||
{
|
{
|
||||||
// Simplify image codes
|
// Simplify image codes
|
||||||
$unshared_body = $body = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '[img]$3[/img]', $body);
|
$unshared_body = $body = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '[img]$3[/img]', $body);
|
||||||
|
|
@ -413,6 +413,7 @@ class Media
|
||||||
*
|
*
|
||||||
* @param integer $uriid
|
* @param integer $uriid
|
||||||
* @param string $body
|
* @param string $body
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function insertFromRelevantUrl(int $uriid, string $body)
|
public static function insertFromRelevantUrl(int $uriid, string $body)
|
||||||
{
|
{
|
||||||
|
|
@ -448,6 +449,7 @@ class Media
|
||||||
*
|
*
|
||||||
* @param integer $uriid
|
* @param integer $uriid
|
||||||
* @param string $body
|
* @param string $body
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function insertFromAttachmentData(int $uriid, string $body)
|
public static function insertFromAttachmentData(int $uriid, string $body)
|
||||||
{
|
{
|
||||||
|
|
@ -506,9 +508,9 @@ class Media
|
||||||
/**
|
/**
|
||||||
* Retrieves the media attachments associated with the provided item ID.
|
* Retrieves the media attachments associated with the provided item ID.
|
||||||
*
|
*
|
||||||
* @param int $uri_id
|
* @param int $uri_id URI id
|
||||||
* @param array $types
|
* @param array $types Media types
|
||||||
* @return array
|
* @return array|bool Array on success, false on error
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function getByURIId(int $uri_id, array $types = [])
|
public static function getByURIId(int $uri_id, array $types = [])
|
||||||
|
|
@ -525,12 +527,12 @@ class Media
|
||||||
/**
|
/**
|
||||||
* Checks if media attachments are associated with the provided item ID.
|
* Checks if media attachments are associated with the provided item ID.
|
||||||
*
|
*
|
||||||
* @param int $uri_id
|
* @param int $uri_id URI id
|
||||||
* @param array $types
|
* @param array $types Media types
|
||||||
* @return array
|
* @return bool Whether media attachment exists
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function existsByURIId(int $uri_id, array $types = [])
|
public static function existsByURIId(int $uri_id, array $types = []): bool
|
||||||
{
|
{
|
||||||
$condition = ['uri-id' => $uri_id];
|
$condition = ['uri-id' => $uri_id];
|
||||||
|
|
||||||
|
|
@ -544,13 +546,13 @@ class Media
|
||||||
/**
|
/**
|
||||||
* Split the attachment media in the three segments "visual", "link" and "additional"
|
* Split the attachment media in the three segments "visual", "link" and "additional"
|
||||||
*
|
*
|
||||||
* @param int $uri_id
|
* @param int $uri_id URI id
|
||||||
* @param string $guid
|
* @param string $guid GUID
|
||||||
* @param array $links list of links that shouldn't be added
|
* @param array $links list of links that shouldn't be added
|
||||||
* @param bool $has_media
|
* @param bool $has_media
|
||||||
* @return array attachments
|
* @return array attachments
|
||||||
*/
|
*/
|
||||||
public static function splitAttachments(int $uri_id, string $guid = '', array $links = [], bool $has_media = true)
|
public static function splitAttachments(int $uri_id, string $guid = '', array $links = [], bool $has_media = true): array
|
||||||
{
|
{
|
||||||
$attachments = ['visual' => [], 'link' => [], 'additional' => []];
|
$attachments = ['visual' => [], 'link' => [], 'additional' => []];
|
||||||
|
|
||||||
|
|
@ -648,7 +650,7 @@ class Media
|
||||||
* @param string $body
|
* @param string $body
|
||||||
* @return string body
|
* @return string body
|
||||||
*/
|
*/
|
||||||
public static function addAttachmentsToBody(int $uriid, string $body = '')
|
public static function addAttachmentsToBody(int $uriid, string $body = ''): string
|
||||||
{
|
{
|
||||||
if (empty($body)) {
|
if (empty($body)) {
|
||||||
$item = Post::selectFirst(['body'], ['uri-id' => $uriid]);
|
$item = Post::selectFirst(['body'], ['uri-id' => $uriid]);
|
||||||
|
|
@ -701,7 +703,7 @@ class Media
|
||||||
* @param string $size One of the Proxy::SIZE_* constants
|
* @param string $size One of the Proxy::SIZE_* constants
|
||||||
* @return string preview link
|
* @return string preview link
|
||||||
*/
|
*/
|
||||||
public static function getPreviewUrlForId(int $id, string $size = ''):string
|
public static function getPreviewUrlForId(int $id, string $size = ''): string
|
||||||
{
|
{
|
||||||
$url = DI::baseUrl() . '/photo/preview/';
|
$url = DI::baseUrl() . '/photo/preview/';
|
||||||
switch ($size) {
|
switch ($size) {
|
||||||
|
|
@ -731,7 +733,7 @@ class Media
|
||||||
* @param string $size One of the Proxy::SIZE_* constants
|
* @param string $size One of the Proxy::SIZE_* constants
|
||||||
* @return string media link
|
* @return string media link
|
||||||
*/
|
*/
|
||||||
public static function getUrlForId(int $id, string $size = ''):string
|
public static function getUrlForId(int $id, string $size = ''): string
|
||||||
{
|
{
|
||||||
$url = DI::baseUrl() . '/photo/media/';
|
$url = DI::baseUrl() . '/photo/media/';
|
||||||
switch ($size) {
|
switch ($size) {
|
||||||
|
|
|
||||||
|
|
@ -54,10 +54,10 @@ class Profile
|
||||||
*
|
*
|
||||||
* @param integer User ID
|
* @param integer User ID
|
||||||
*
|
*
|
||||||
* @return array Profile data
|
* @return array|bool Profile data or false on error
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function getByUID($uid)
|
public static function getByUID(int $uid)
|
||||||
{
|
{
|
||||||
return DBA::selectFirst('profile', [], ['uid' => $uid]);
|
return DBA::selectFirst('profile', [], ['uid' => $uid]);
|
||||||
}
|
}
|
||||||
|
|
@ -69,7 +69,7 @@ class Profile
|
||||||
* @param int $id The contact owner ID
|
* @param int $id The contact owner ID
|
||||||
* @param array $fields The selected fields
|
* @param array $fields The selected fields
|
||||||
*
|
*
|
||||||
* @return array Profile data for the ID
|
* @return array|bool Profile data for the ID or false on error
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function getById(int $uid, int $id, array $fields = [])
|
public static function getById(int $uid, int $id, array $fields = [])
|
||||||
|
|
@ -81,7 +81,7 @@ class Profile
|
||||||
* Returns profile data for the contact owner
|
* Returns profile data for the contact owner
|
||||||
*
|
*
|
||||||
* @param int $uid The User ID
|
* @param int $uid The User ID
|
||||||
* @param array $fields The fields to retrieve
|
* @param array|bool $fields The fields to retrieve or false on error
|
||||||
*
|
*
|
||||||
* @return array Array of profile data
|
* @return array Array of profile data
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
|
|
@ -94,9 +94,9 @@ class Profile
|
||||||
/**
|
/**
|
||||||
* Update a profile entry and distribute the changes if needed
|
* Update a profile entry and distribute the changes if needed
|
||||||
*
|
*
|
||||||
* @param array $fields
|
* @param array $fields Profile fields to update
|
||||||
* @param integer $uid
|
* @param integer $uid User id
|
||||||
* @return boolean
|
* @return boolean Whether update was successful
|
||||||
*/
|
*/
|
||||||
public static function update(array $fields, int $uid): bool
|
public static function update(array $fields, int $uid): bool
|
||||||
{
|
{
|
||||||
|
|
@ -136,8 +136,10 @@ class Profile
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Publish a changed profile
|
* Publish a changed profile
|
||||||
* @param int $uid
|
*
|
||||||
|
* @param int $uid User id
|
||||||
* @param bool $force Force publishing to the directory
|
* @param bool $force Force publishing to the directory
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function publishUpdate(int $uid, bool $force = false)
|
public static function publishUpdate(int $uid, bool $force = false)
|
||||||
{
|
{
|
||||||
|
|
@ -163,7 +165,7 @@ class Profile
|
||||||
*
|
*
|
||||||
* @return string Location string
|
* @return string Location string
|
||||||
*/
|
*/
|
||||||
public static function formatLocation(array $profile)
|
public static function formatLocation(array $profile): string
|
||||||
{
|
{
|
||||||
$location = '';
|
$location = '';
|
||||||
|
|
||||||
|
|
@ -237,7 +239,7 @@ class Profile
|
||||||
|
|
||||||
if (!local_user()) {
|
if (!local_user()) {
|
||||||
$a->setCurrentTheme($profile['theme']);
|
$a->setCurrentTheme($profile['theme']);
|
||||||
$a->setCurrentMobileTheme(DI::pConfig()->get($a->getProfileOwner(), 'system', 'mobile_theme'));
|
$a->setCurrentMobileTheme(DI::pConfig()->get($a->getProfileOwner(), 'system', 'mobile_theme') ?? '');
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -34,9 +34,10 @@ class PushSubscriber
|
||||||
*
|
*
|
||||||
* @param integer $uid User ID
|
* @param integer $uid User ID
|
||||||
* @param int $default_priority
|
* @param int $default_priority
|
||||||
|
* @return void
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function publishFeed($uid, $default_priority = PRIORITY_HIGH)
|
public static function publishFeed(int $uid, int $default_priority = PRIORITY_HIGH)
|
||||||
{
|
{
|
||||||
$condition = ['push' => 0, 'uid' => $uid];
|
$condition = ['push' => 0, 'uid' => $uid];
|
||||||
DBA::update('push_subscriber', ['push' => 1, 'next_try' => DBA::NULL_DATETIME], $condition);
|
DBA::update('push_subscriber', ['push' => 1, 'next_try' => DBA::NULL_DATETIME], $condition);
|
||||||
|
|
@ -48,9 +49,10 @@ class PushSubscriber
|
||||||
* start workers to transmit the feed data
|
* start workers to transmit the feed data
|
||||||
*
|
*
|
||||||
* @param int $default_priority
|
* @param int $default_priority
|
||||||
|
* @return void
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function requeue($default_priority = PRIORITY_HIGH)
|
public static function requeue(int $default_priority = PRIORITY_HIGH)
|
||||||
{
|
{
|
||||||
// We'll push to each subscriber that has push > 0,
|
// We'll push to each subscriber that has push > 0,
|
||||||
// i.e. there has been an update (set in notifier.php).
|
// i.e. there has been an update (set in notifier.php).
|
||||||
|
|
@ -80,9 +82,10 @@ class PushSubscriber
|
||||||
* @param string $hub_callback Callback address
|
* @param string $hub_callback Callback address
|
||||||
* @param string $hub_topic Feed topic
|
* @param string $hub_topic Feed topic
|
||||||
* @param string $hub_secret Subscription secret
|
* @param string $hub_secret Subscription secret
|
||||||
|
* @return void
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function renew($uid, $nick, $subscribe, $hub_callback, $hub_topic, $hub_secret)
|
public static function renew(int $uid, string $nick, int $subscribe, string $hub_callback, string $hub_topic, string $hub_secret)
|
||||||
{
|
{
|
||||||
// fetch the old subscription if it exists
|
// fetch the old subscription if it exists
|
||||||
$subscriber = DBA::selectFirst('push_subscriber', ['last_update', 'push'], ['callback_url' => $hub_callback]);
|
$subscriber = DBA::selectFirst('push_subscriber', ['last_update', 'push'], ['callback_url' => $hub_callback]);
|
||||||
|
|
@ -119,9 +122,10 @@ class PushSubscriber
|
||||||
* Delay the push subscriber
|
* Delay the push subscriber
|
||||||
*
|
*
|
||||||
* @param integer $id Subscriber ID
|
* @param integer $id Subscriber ID
|
||||||
|
* @return void
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function delay($id)
|
public static function delay(int $id)
|
||||||
{
|
{
|
||||||
$subscriber = DBA::selectFirst('push_subscriber', ['push', 'callback_url', 'renewed', 'nickname'], ['id' => $id]);
|
$subscriber = DBA::selectFirst('push_subscriber', ['push', 'callback_url', 'renewed', 'nickname'], ['id' => $id]);
|
||||||
if (!DBA::isResult($subscriber)) {
|
if (!DBA::isResult($subscriber)) {
|
||||||
|
|
@ -158,9 +162,10 @@ class PushSubscriber
|
||||||
*
|
*
|
||||||
* @param integer $id Subscriber ID
|
* @param integer $id Subscriber ID
|
||||||
* @param string $last_update Date of last transmitted item
|
* @param string $last_update Date of last transmitted item
|
||||||
|
* @return void
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function reset($id, $last_update)
|
public static function reset(int $id, string $last_update)
|
||||||
{
|
{
|
||||||
$subscriber = DBA::selectFirst('push_subscriber', ['callback_url', 'nickname'], ['id' => $id]);
|
$subscriber = DBA::selectFirst('push_subscriber', ['callback_url', 'nickname'], ['id' => $id]);
|
||||||
if (!DBA::isResult($subscriber)) {
|
if (!DBA::isResult($subscriber)) {
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,7 @@ class User
|
||||||
*
|
*
|
||||||
* @return array system account
|
* @return array system account
|
||||||
*/
|
*/
|
||||||
public static function getSystemAccount()
|
public static function getSystemAccount(): array
|
||||||
{
|
{
|
||||||
$system = Contact::selectFirst([], ['self' => true, 'uid' => 0]);
|
$system = Contact::selectFirst([], ['self' => true, 'uid' => 0]);
|
||||||
if (!DBA::isResult($system)) {
|
if (!DBA::isResult($system)) {
|
||||||
|
|
@ -244,7 +244,7 @@ class User
|
||||||
*
|
*
|
||||||
* @return string actor account name
|
* @return string actor account name
|
||||||
*/
|
*/
|
||||||
public static function getActorName()
|
public static function getActorName(): string
|
||||||
{
|
{
|
||||||
$system_actor_name = DI::config()->get('system', 'actor_name');
|
$system_actor_name = DI::config()->get('system', 'actor_name');
|
||||||
if (!empty($system_actor_name)) {
|
if (!empty($system_actor_name)) {
|
||||||
|
|
@ -278,7 +278,7 @@ class User
|
||||||
* @return boolean
|
* @return boolean
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function exists($uid)
|
public static function exists(int $uid): bool
|
||||||
{
|
{
|
||||||
return DBA::exists('user', ['uid' => $uid]);
|
return DBA::exists('user', ['uid' => $uid]);
|
||||||
}
|
}
|
||||||
|
|
@ -289,7 +289,7 @@ class User
|
||||||
* @return array|boolean User record if it exists, false otherwise
|
* @return array|boolean User record if it exists, false otherwise
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function getById($uid, array $fields = [])
|
public static function getById(int $uid, array $fields = [])
|
||||||
{
|
{
|
||||||
return !empty($uid) ? DBA::selectFirst('user', $fields, ['uid' => $uid]) : [];
|
return !empty($uid) ? DBA::selectFirst('user', $fields, ['uid' => $uid]) : [];
|
||||||
}
|
}
|
||||||
|
|
@ -321,7 +321,7 @@ class User
|
||||||
* @return array|boolean User record if it exists, false otherwise
|
* @return array|boolean User record if it exists, false otherwise
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function getByNickname($nickname, array $fields = [])
|
public static function getByNickname(string $nickname, array $fields = [])
|
||||||
{
|
{
|
||||||
return DBA::selectFirst('user', $fields, ['nickname' => $nickname]);
|
return DBA::selectFirst('user', $fields, ['nickname' => $nickname]);
|
||||||
}
|
}
|
||||||
|
|
@ -334,7 +334,7 @@ class User
|
||||||
* @return integer user id
|
* @return integer user id
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function getIdForURL(string $url)
|
public static function getIdForURL(string $url): int
|
||||||
{
|
{
|
||||||
// Avoid database queries when the local node hostname isn't even part of the url.
|
// Avoid database queries when the local node hostname isn't even part of the url.
|
||||||
if (!Contact::isLocal($url)) {
|
if (!Contact::isLocal($url)) {
|
||||||
|
|
@ -380,7 +380,7 @@ class User
|
||||||
* @param array $fields
|
* @param array $fields
|
||||||
* @return array user
|
* @return array user
|
||||||
*/
|
*/
|
||||||
public static function getFirstAdmin(array $fields = [])
|
public static function getFirstAdmin(array $fields = []) : array
|
||||||
{
|
{
|
||||||
if (!empty(DI::config()->get('config', 'admin_nickname'))) {
|
if (!empty(DI::config()->get('config', 'admin_nickname'))) {
|
||||||
return self::getByNickname(DI::config()->get('config', 'admin_nickname'), $fields);
|
return self::getByNickname(DI::config()->get('config', 'admin_nickname'), $fields);
|
||||||
|
|
@ -469,7 +469,7 @@ class User
|
||||||
* @return boolean|array
|
* @return boolean|array
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function getOwnerDataByNick($nick)
|
public static function getOwnerDataByNick(string $nick)
|
||||||
{
|
{
|
||||||
$user = DBA::selectFirst('user', ['uid'], ['nickname' => $nick]);
|
$user = DBA::selectFirst('user', ['uid'], ['nickname' => $nick]);
|
||||||
|
|
||||||
|
|
@ -488,7 +488,7 @@ class User
|
||||||
* @return int group id
|
* @return int group id
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function getDefaultGroup($uid)
|
public static function getDefaultGroup(int $uid): int
|
||||||
{
|
{
|
||||||
$user = DBA::selectFirst('user', ['def_gid'], ['uid' => $uid]);
|
$user = DBA::selectFirst('user', ['def_gid'], ['uid' => $uid]);
|
||||||
if (DBA::isResult($user)) {
|
if (DBA::isResult($user)) {
|
||||||
|
|
@ -512,7 +512,7 @@ class User
|
||||||
* @throws HTTPException\ForbiddenException
|
* @throws HTTPException\ForbiddenException
|
||||||
* @throws HTTPException\NotFoundException
|
* @throws HTTPException\NotFoundException
|
||||||
*/
|
*/
|
||||||
public static function getIdFromPasswordAuthentication($user_info, $password, $third_party = false)
|
public static function getIdFromPasswordAuthentication($user_info, string $password, bool $third_party = false)
|
||||||
{
|
{
|
||||||
// Addons registered with the "authenticate" hook may create the user on the
|
// Addons registered with the "authenticate" hook may create the user on the
|
||||||
// fly. `getAuthenticationInfo` will fail if the user doesn't exist yet. If
|
// fly. `getAuthenticationInfo` will fail if the user doesn't exist yet. If
|
||||||
|
|
@ -580,7 +580,7 @@ class User
|
||||||
* @return int User Id if authentication is successful
|
* @return int User Id if authentication is successful
|
||||||
* @throws HTTPException\ForbiddenException
|
* @throws HTTPException\ForbiddenException
|
||||||
*/
|
*/
|
||||||
public static function getIdFromAuthenticateHooks($username, $password)
|
public static function getIdFromAuthenticateHooks(string $username, string $password): int
|
||||||
{
|
{
|
||||||
$addon_auth = [
|
$addon_auth = [
|
||||||
'username' => $username,
|
'username' => $username,
|
||||||
|
|
@ -613,7 +613,7 @@ class User
|
||||||
* - User array with at least the uid and the hashed password
|
* - User array with at least the uid and the hashed password
|
||||||
*
|
*
|
||||||
* @param mixed $user_info
|
* @param mixed $user_info
|
||||||
* @return array
|
* @return array|null Null if not found/determined
|
||||||
* @throws HTTPException\NotFoundException
|
* @throws HTTPException\NotFoundException
|
||||||
*/
|
*/
|
||||||
public static function getAuthenticationInfo($user_info)
|
public static function getAuthenticationInfo($user_info)
|
||||||
|
|
@ -671,7 +671,7 @@ class User
|
||||||
* @return string
|
* @return string
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function generateNewPassword()
|
public static function generateNewPassword(): string
|
||||||
{
|
{
|
||||||
return ucfirst(Strings::getRandomName(8)) . random_int(1000, 9999);
|
return ucfirst(Strings::getRandomName(8)) . random_int(1000, 9999);
|
||||||
}
|
}
|
||||||
|
|
@ -683,7 +683,7 @@ class User
|
||||||
* @return bool
|
* @return bool
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function isPasswordExposed($password)
|
public static function isPasswordExposed(string $password): bool
|
||||||
{
|
{
|
||||||
$cache = new CacheItemPool();
|
$cache = new CacheItemPool();
|
||||||
$cache->changeConfig([
|
$cache->changeConfig([
|
||||||
|
|
@ -712,7 +712,7 @@ class User
|
||||||
* @param string $password
|
* @param string $password
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
private static function hashPasswordLegacy($password)
|
private static function hashPasswordLegacy(string $password): string
|
||||||
{
|
{
|
||||||
return hash('whirlpool', $password);
|
return hash('whirlpool', $password);
|
||||||
}
|
}
|
||||||
|
|
@ -724,7 +724,7 @@ class User
|
||||||
* @return string
|
* @return string
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function hashPassword($password)
|
public static function hashPassword(string $password): string
|
||||||
{
|
{
|
||||||
if (!trim($password)) {
|
if (!trim($password)) {
|
||||||
throw new Exception(DI::l10n()->t('Password can\'t be empty'));
|
throw new Exception(DI::l10n()->t('Password can\'t be empty'));
|
||||||
|
|
@ -741,7 +741,7 @@ class User
|
||||||
* @return bool
|
* @return bool
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function updatePassword($uid, $password)
|
public static function updatePassword(int $uid, string $password): bool
|
||||||
{
|
{
|
||||||
$password = trim($password);
|
$password = trim($password);
|
||||||
|
|
||||||
|
|
@ -771,7 +771,7 @@ class User
|
||||||
* @return bool
|
* @return bool
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
private static function updatePasswordHashed($uid, $pasword_hashed)
|
private static function updatePasswordHashed(int $uid, string $pasword_hashed): bool
|
||||||
{
|
{
|
||||||
$fields = [
|
$fields = [
|
||||||
'password' => $pasword_hashed,
|
'password' => $pasword_hashed,
|
||||||
|
|
@ -792,7 +792,7 @@ class User
|
||||||
* @param string $nickname The nickname that should be checked
|
* @param string $nickname The nickname that should be checked
|
||||||
* @return boolean True is the nickname is blocked on the node
|
* @return boolean True is the nickname is blocked on the node
|
||||||
*/
|
*/
|
||||||
public static function isNicknameBlocked($nickname)
|
public static function isNicknameBlocked(string $nickname): bool
|
||||||
{
|
{
|
||||||
$forbidden_nicknames = DI::config()->get('system', 'forbidden_nicknames', '');
|
$forbidden_nicknames = DI::config()->get('system', 'forbidden_nicknames', '');
|
||||||
if (!empty($forbidden_nicknames)) {
|
if (!empty($forbidden_nicknames)) {
|
||||||
|
|
@ -829,7 +829,7 @@ class User
|
||||||
* @return string avatar link
|
* @return string avatar link
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function getAvatarUrl(array $user, string $size = ''):string
|
public static function getAvatarUrl(array $user, string $size = ''): string
|
||||||
{
|
{
|
||||||
if (empty($user['nickname'])) {
|
if (empty($user['nickname'])) {
|
||||||
DI::logger()->warning('Missing user nickname key', ['trace' => System::callstack(20)]);
|
DI::logger()->warning('Missing user nickname key', ['trace' => System::callstack(20)]);
|
||||||
|
|
@ -871,7 +871,7 @@ class User
|
||||||
* @return string banner link
|
* @return string banner link
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function getBannerUrl(array $user):string
|
public static function getBannerUrl(array $user): string
|
||||||
{
|
{
|
||||||
if (empty($user['nickname'])) {
|
if (empty($user['nickname'])) {
|
||||||
DI::logger()->warning('Missing user nickname key', ['trace' => System::callstack(20)]);
|
DI::logger()->warning('Missing user nickname key', ['trace' => System::callstack(20)]);
|
||||||
|
|
@ -913,7 +913,7 @@ class User
|
||||||
* @throws ImagickException
|
* @throws ImagickException
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function create(array $data)
|
public static function create(array $data): array
|
||||||
{
|
{
|
||||||
$return = ['user' => null, 'password' => ''];
|
$return = ['user' => null, 'password' => ''];
|
||||||
|
|
||||||
|
|
@ -1255,7 +1255,7 @@ class User
|
||||||
|
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function block(int $uid, bool $block = true)
|
public static function block(int $uid, bool $block = true): bool
|
||||||
{
|
{
|
||||||
return DBA::update('user', ['blocked' => $block], ['uid' => $uid]);
|
return DBA::update('user', ['blocked' => $block], ['uid' => $uid]);
|
||||||
}
|
}
|
||||||
|
|
@ -1270,7 +1270,7 @@ class User
|
||||||
* @throws HTTPException\InternalServerErrorException
|
* @throws HTTPException\InternalServerErrorException
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function allow(string $hash)
|
public static function allow(string $hash): bool
|
||||||
{
|
{
|
||||||
$register = Register::getByHash($hash);
|
$register = Register::getByHash($hash);
|
||||||
if (!DBA::isResult($register)) {
|
if (!DBA::isResult($register)) {
|
||||||
|
|
@ -1316,7 +1316,7 @@ class User
|
||||||
* @return bool True, if the deny was successfull
|
* @return bool True, if the deny was successfull
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function deny(string $hash)
|
public static function deny(string $hash): bool
|
||||||
{
|
{
|
||||||
$register = Register::getByHash($hash);
|
$register = Register::getByHash($hash);
|
||||||
if (!DBA::isResult($register)) {
|
if (!DBA::isResult($register)) {
|
||||||
|
|
@ -1348,7 +1348,7 @@ class User
|
||||||
* @throws ErrorException
|
* @throws ErrorException
|
||||||
* @throws ImagickException
|
* @throws ImagickException
|
||||||
*/
|
*/
|
||||||
public static function createMinimal(string $name, string $email, string $nick, string $lang = L10n::DEFAULT)
|
public static function createMinimal(string $name, string $email, string $nick, string $lang = L10n::DEFAULT): bool
|
||||||
{
|
{
|
||||||
if (empty($name) ||
|
if (empty($name) ||
|
||||||
empty($email) ||
|
empty($email) ||
|
||||||
|
|
@ -1418,7 +1418,7 @@ class User
|
||||||
* @return NULL|boolean from notification() and email() inherited
|
* @return NULL|boolean from notification() and email() inherited
|
||||||
* @throws HTTPException\InternalServerErrorException
|
* @throws HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function sendRegisterPendingEmail($user, $sitename, $siteurl, $password)
|
public static function sendRegisterPendingEmail(array $user, string $sitename, string $siteurl, string $password)
|
||||||
{
|
{
|
||||||
$body = Strings::deindent(DI::l10n()->t(
|
$body = Strings::deindent(DI::l10n()->t(
|
||||||
'
|
'
|
||||||
|
|
@ -1461,7 +1461,7 @@ class User
|
||||||
* @return NULL|boolean from notification() and email() inherited
|
* @return NULL|boolean from notification() and email() inherited
|
||||||
* @throws HTTPException\InternalServerErrorException
|
* @throws HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function sendRegisterOpenEmail(L10n $l10n, $user, $sitename, $siteurl, $password)
|
public static function sendRegisterOpenEmail(L10n $l10n, array $user, string $sitename, string $siteurl, string $password)
|
||||||
{
|
{
|
||||||
$preamble = Strings::deindent($l10n->t(
|
$preamble = Strings::deindent($l10n->t(
|
||||||
'
|
'
|
||||||
|
|
@ -1520,7 +1520,7 @@ class User
|
||||||
* @return bool
|
* @return bool
|
||||||
* @throws HTTPException\InternalServerErrorException
|
* @throws HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function remove(int $uid)
|
public static function remove(int $uid): bool
|
||||||
{
|
{
|
||||||
if (empty($uid)) {
|
if (empty($uid)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -1574,7 +1574,7 @@ class User
|
||||||
* ]
|
* ]
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function identities($uid)
|
public static function identities(int $uid): array
|
||||||
{
|
{
|
||||||
if (empty($uid)) {
|
if (empty($uid)) {
|
||||||
return [];
|
return [];
|
||||||
|
|
@ -1646,7 +1646,7 @@ class User
|
||||||
* @param int $uid
|
* @param int $uid
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public static function hasIdentities(int $uid):bool
|
public static function hasIdentities(int $uid): bool
|
||||||
{
|
{
|
||||||
if (empty($uid)) {
|
if (empty($uid)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -1679,7 +1679,7 @@ class User
|
||||||
*
|
*
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function getStatistics()
|
public static function getStatistics(): array
|
||||||
{
|
{
|
||||||
$statistics = [
|
$statistics = [
|
||||||
'total_users' => 0,
|
'total_users' => 0,
|
||||||
|
|
@ -1732,10 +1732,10 @@ class User
|
||||||
* @param string $order Order of the user list (Default is 'contact.name')
|
* @param string $order Order of the user list (Default is 'contact.name')
|
||||||
* @param bool $descending Order direction (Default is ascending)
|
* @param bool $descending Order direction (Default is ascending)
|
||||||
*
|
*
|
||||||
* @return array The list of the users
|
* @return array|bool The list of the users
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function getList($start = 0, $count = Pager::ITEMS_PER_PAGE, $type = 'all', $order = 'name', bool $descending = false)
|
public static function getList(int $start = 0, int $count = Pager::ITEMS_PER_PAGE, string $type = 'all', string $order = 'name', bool $descending = false)
|
||||||
{
|
{
|
||||||
$param = ['limit' => [$start, $count], 'order' => [$order => $descending]];
|
$param = ['limit' => [$start, $count], 'order' => [$order => $descending]];
|
||||||
$condition = [];
|
$condition = [];
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ class BaseSettings extends BaseModule
|
||||||
'label' => DI::l10n()->t('Two-factor authentication'),
|
'label' => DI::l10n()->t('Two-factor authentication'),
|
||||||
'url' => 'settings/2fa',
|
'url' => 'settings/2fa',
|
||||||
'selected' => ((DI::args()->getArgc() > 1) && (DI::args()->getArgv()[1] === '2fa') ? 'active' : ''),
|
'selected' => ((DI::args()->getArgc() > 1) && (DI::args()->getArgv()[1] === '2fa') ? 'active' : ''),
|
||||||
'accesskey' => 'o',
|
'accesskey' => '2',
|
||||||
];
|
];
|
||||||
|
|
||||||
$tabs[] = [
|
$tabs[] = [
|
||||||
|
|
|
||||||
|
|
@ -59,12 +59,13 @@ class Notify extends BaseModule
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function dispatchPublic($postdata)
|
private static function dispatchPublic(array $postdata)
|
||||||
{
|
{
|
||||||
$msg = Diaspora::decodeRaw($postdata, '', true);
|
$msg = Diaspora::decodeRaw($postdata, '', true);
|
||||||
if (!$msg) {
|
if (!is_array($msg)) {
|
||||||
// We have to fail silently to be able to hand it over to the salmon parser
|
// We have to fail silently to be able to hand it over to the salmon parser
|
||||||
return false;
|
Logger::warning('Diaspora::decodeRaw() has failed for some reason.');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fetch the corresponding public contact
|
// Fetch the corresponding public contact
|
||||||
|
|
@ -88,10 +89,10 @@ class Notify extends BaseModule
|
||||||
System::xmlExit($ret, 'Done');
|
System::xmlExit($ret, 'Done');
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function dispatchPrivate($user, $postdata)
|
private static function dispatchPrivate(array $user, string $postdata)
|
||||||
{
|
{
|
||||||
$msg = Diaspora::decodeRaw($postdata, $user['prvkey'] ?? '');
|
$msg = Diaspora::decodeRaw($postdata, $user['prvkey'] ?? '');
|
||||||
if (!$msg) {
|
if (!is_array($msg)) {
|
||||||
System::xmlExit(4, 'Unable to parse message');
|
System::xmlExit(4, 'Unable to parse message');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,6 @@ class Poll extends BaseModule
|
||||||
protected function rawContent(array $request = [])
|
protected function rawContent(array $request = [])
|
||||||
{
|
{
|
||||||
$last_update = $request['last_update'] ?? '';
|
$last_update = $request['last_update'] ?? '';
|
||||||
System::httpExit(OStatus::feed($this->parameters['nickname'], $last_update, 10), Response::TYPE_ATOM);
|
System::httpExit(OStatus::feed($this->parameters['nickname'], $last_update, 10) ?? '', Response::TYPE_ATOM);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ class Directory extends BaseModule
|
||||||
*
|
*
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function formatEntry(array $contact, $photo_size = 'photo')
|
public static function formatEntry(array $contact, string $photo_size = 'photo'): array
|
||||||
{
|
{
|
||||||
$itemurl = (($contact['addr'] != "") ? $contact['addr'] : $contact['url']);
|
$itemurl = (($contact['addr'] != "") ? $contact['addr'] : $contact['url']);
|
||||||
|
|
||||||
|
|
@ -166,7 +166,7 @@ class Directory extends BaseModule
|
||||||
'img_hover' => $contact['name'],
|
'img_hover' => $contact['name'],
|
||||||
'name' => $contact['name'],
|
'name' => $contact['name'],
|
||||||
'details' => $details,
|
'details' => $details,
|
||||||
'account_type' => Model\Contact::getAccountType($contact['contact-type']),
|
'account_type' => Model\Contact::getAccountType($contact['contact-type'] ?? 0),
|
||||||
'profile' => $profile,
|
'profile' => $profile,
|
||||||
'location' => $location_e,
|
'location' => $location_e,
|
||||||
'tags' => $contact['pub_keywords'],
|
'tags' => $contact['pub_keywords'],
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ class Photo extends BaseModule
|
||||||
throw new HTTPException\NotFoundException(DI::l10n()->t('The Photo is not available.'));
|
throw new HTTPException\NotFoundException(DI::l10n()->t('The Photo is not available.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$photo = self::getPhotoByid($id, $this->parameters['type'], $customsize ?: Proxy::PIXEL_SMALL);
|
$photo = self::getPhotoById($id, $this->parameters['type'], $customsize ?: Proxy::PIXEL_SMALL);
|
||||||
} else {
|
} else {
|
||||||
$photoid = pathinfo($this->parameters['name'], PATHINFO_FILENAME);
|
$photoid = pathinfo($this->parameters['name'], PATHINFO_FILENAME);
|
||||||
$scale = 0;
|
$scale = 0;
|
||||||
|
|
@ -228,10 +228,18 @@ class Photo extends BaseModule
|
||||||
System::exit();
|
System::exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function getPhotoByid(int $id, $type, $customsize)
|
/**
|
||||||
|
* Fetches photo record by given id number, type and custom size
|
||||||
|
*
|
||||||
|
* @param int $id Photo id
|
||||||
|
* @param string $type Photo type
|
||||||
|
* @param int $customsize Custom size (?)
|
||||||
|
* @return array|bool Array on success, false on error
|
||||||
|
*/
|
||||||
|
private static function getPhotoById(int $id, string $type, int $customsize)
|
||||||
{
|
{
|
||||||
switch($type) {
|
switch($type) {
|
||||||
case "preview":
|
case 'preview':
|
||||||
$media = DBA::selectFirst('post-media', ['preview', 'url', 'mimetype', 'type', 'uri-id'], ['id' => $id]);
|
$media = DBA::selectFirst('post-media', ['preview', 'url', 'mimetype', 'type', 'uri-id'], ['id' => $id]);
|
||||||
if (empty($media)) {
|
if (empty($media)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -251,7 +259,7 @@ class Photo extends BaseModule
|
||||||
}
|
}
|
||||||
|
|
||||||
return MPhoto::createPhotoForExternalResource($url, (int)local_user(), $media['mimetype']);
|
return MPhoto::createPhotoForExternalResource($url, (int)local_user(), $media['mimetype']);
|
||||||
case "media":
|
case 'media':
|
||||||
$media = DBA::selectFirst('post-media', ['url', 'mimetype', 'uri-id'], ['id' => $id, 'type' => Post\Media::IMAGE]);
|
$media = DBA::selectFirst('post-media', ['url', 'mimetype', 'uri-id'], ['id' => $id, 'type' => Post\Media::IMAGE]);
|
||||||
if (empty($media)) {
|
if (empty($media)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -262,15 +270,15 @@ class Photo extends BaseModule
|
||||||
}
|
}
|
||||||
|
|
||||||
return MPhoto::createPhotoForExternalResource($media['url'], (int)local_user(), $media['mimetype']);
|
return MPhoto::createPhotoForExternalResource($media['url'], (int)local_user(), $media['mimetype']);
|
||||||
case "link":
|
case 'link':
|
||||||
$link = DBA::selectFirst('post-link', ['url', 'mimetype'], ['id' => $id]);
|
$link = DBA::selectFirst('post-link', ['url', 'mimetype'], ['id' => $id]);
|
||||||
if (empty($link)) {
|
if (empty($link)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return MPhoto::createPhotoForExternalResource($link['url'], (int)local_user(), $link['mimetype']);
|
return MPhoto::createPhotoForExternalResource($link['url'], (int)local_user(), $link['mimetype']);
|
||||||
case "contact":
|
case 'contact':
|
||||||
$fields = ['uid', 'url', 'nurl', 'avatar', 'photo', 'xmpp', 'addr', 'network', 'failed', 'updated'];
|
$fields = ['uid', 'uri-id', 'url', 'nurl', 'avatar', 'photo', 'xmpp', 'addr', 'network', 'failed', 'updated'];
|
||||||
$contact = Contact::getById($id, $fields);
|
$contact = Contact::getById($id, $fields);
|
||||||
if (empty($contact)) {
|
if (empty($contact)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -287,7 +295,7 @@ class Photo extends BaseModule
|
||||||
} else {
|
} else {
|
||||||
$scale = 4;
|
$scale = 4;
|
||||||
}
|
}
|
||||||
$photo = MPhoto::selectFirst([], ["scale" => $scale, "uid" => $contact['uid'], "profile" => 1]);
|
$photo = MPhoto::selectFirst([], ['scale' => $scale, 'uid' => $contact['uid'], 'profile' => 1]);
|
||||||
if (!empty($photo)) {
|
if (!empty($photo)) {
|
||||||
return $photo;
|
return $photo;
|
||||||
}
|
}
|
||||||
|
|
@ -330,7 +338,7 @@ class Photo extends BaseModule
|
||||||
}
|
}
|
||||||
if ($update) {
|
if ($update) {
|
||||||
Logger::info('Invalid file, contact update initiated', ['cid' => $id, 'url' => $contact['url'], 'avatar' => $url]);
|
Logger::info('Invalid file, contact update initiated', ['cid' => $id, 'url' => $contact['url'], 'avatar' => $url]);
|
||||||
Worker::add(PRIORITY_LOW, "UpdateContact", $id);
|
Worker::add(PRIORITY_LOW, 'UpdateContact', $id);
|
||||||
} else {
|
} else {
|
||||||
Logger::info('Invalid file', ['cid' => $id, 'url' => $contact['url'], 'avatar' => $url]);
|
Logger::info('Invalid file', ['cid' => $id, 'url' => $contact['url'], 'avatar' => $url]);
|
||||||
}
|
}
|
||||||
|
|
@ -352,7 +360,7 @@ class Photo extends BaseModule
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return MPhoto::createPhotoForExternalResource($url, 0, $mimetext);
|
return MPhoto::createPhotoForExternalResource($url, 0, $mimetext);
|
||||||
case "header":
|
case 'header':
|
||||||
$fields = ['uid', 'url', 'header', 'network', 'gsid'];
|
$fields = ['uid', 'url', 'header', 'network', 'gsid'];
|
||||||
$contact = Contact::getById($id, $fields);
|
$contact = Contact::getById($id, $fields);
|
||||||
if (empty($contact)) {
|
if (empty($contact)) {
|
||||||
|
|
@ -367,37 +375,37 @@ class Photo extends BaseModule
|
||||||
$url = Contact::getDefaultHeader($contact);
|
$url = Contact::getDefaultHeader($contact);
|
||||||
}
|
}
|
||||||
return MPhoto::createPhotoForExternalResource($url);
|
return MPhoto::createPhotoForExternalResource($url);
|
||||||
case "banner":
|
case 'banner':
|
||||||
$photo = MPhoto::selectFirst([], ["scale" => 3, 'uid' => $id, 'photo-type' => MPhoto::USER_BANNER]);
|
$photo = MPhoto::selectFirst([], ['scale' => 3, 'uid' => $id, 'photo-type' => MPhoto::USER_BANNER]);
|
||||||
if (!empty($photo)) {
|
if (!empty($photo)) {
|
||||||
return $photo;
|
return $photo;
|
||||||
}
|
}
|
||||||
return MPhoto::createPhotoForExternalResource(DI::baseUrl() . '/images/friendica-banner.jpg');
|
return MPhoto::createPhotoForExternalResource(DI::baseUrl() . '/images/friendica-banner.jpg');
|
||||||
case "profile":
|
case 'profile':
|
||||||
case "custom":
|
case 'custom':
|
||||||
$scale = 4;
|
$scale = 4;
|
||||||
break;
|
break;
|
||||||
case "micro":
|
case 'micro':
|
||||||
$scale = 6;
|
$scale = 6;
|
||||||
break;
|
break;
|
||||||
case "avatar":
|
case 'avatar':
|
||||||
default:
|
default:
|
||||||
$scale = 5;
|
$scale = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
$photo = MPhoto::selectFirst([], ["scale" => $scale, "uid" => $id, "profile" => 1]);
|
$photo = MPhoto::selectFirst([], ['scale' => $scale, 'uid' => $id, 'profile' => 1]);
|
||||||
if (empty($photo)) {
|
if (empty($photo)) {
|
||||||
$contact = DBA::selectFirst('contact', [], ['uid' => $id, 'self' => true]) ?: [];
|
$contact = DBA::selectFirst('contact', [], ['uid' => $id, 'self' => true]) ?: [];
|
||||||
|
|
||||||
switch($type) {
|
switch($type) {
|
||||||
case "profile":
|
case 'profile':
|
||||||
case "custom":
|
case 'custom':
|
||||||
$default = Contact::getDefaultAvatar($contact, Proxy::SIZE_SMALL);
|
$default = Contact::getDefaultAvatar($contact, Proxy::SIZE_SMALL);
|
||||||
break;
|
break;
|
||||||
case "micro":
|
case 'micro':
|
||||||
$default = Contact::getDefaultAvatar($contact, Proxy::SIZE_MICRO);
|
$default = Contact::getDefaultAvatar($contact, Proxy::SIZE_MICRO);
|
||||||
break;
|
break;
|
||||||
case "avatar":
|
case 'avatar':
|
||||||
default:
|
default:
|
||||||
$default = Contact::getDefaultAvatar($contact, Proxy::SIZE_THUMB);
|
$default = Contact::getDefaultAvatar($contact, Proxy::SIZE_THUMB);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,14 +33,14 @@ interface ICanHandleHttpResponses
|
||||||
*
|
*
|
||||||
* @return string The Return Code
|
* @return string The Return Code
|
||||||
*/
|
*/
|
||||||
public function getReturnCode();
|
public function getReturnCode(): string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the Content Type
|
* Returns the Content Type
|
||||||
*
|
*
|
||||||
* @return string the Content Type
|
* @return string the Content Type
|
||||||
*/
|
*/
|
||||||
public function getContentType();
|
public function getContentType(): string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the headers
|
* Returns the headers
|
||||||
|
|
@ -55,21 +55,20 @@ interface ICanHandleHttpResponses
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns all headers
|
* Returns all headers
|
||||||
* @see MessageInterface::getHeaders()
|
|
||||||
*
|
*
|
||||||
|
* @see MessageInterface::getHeaders()
|
||||||
* @return string[][]
|
* @return string[][]
|
||||||
*/
|
*/
|
||||||
public function getHeaders();
|
public function getHeaders();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if a specified header exists
|
* Check if a specified header exists
|
||||||
|
*
|
||||||
* @see MessageInterface::hasHeader()
|
* @see MessageInterface::hasHeader()
|
||||||
*
|
|
||||||
* @param string $field header field
|
* @param string $field header field
|
||||||
*
|
|
||||||
* @return boolean "true" if header exists
|
* @return boolean "true" if header exists
|
||||||
*/
|
*/
|
||||||
public function inHeader(string $field);
|
public function inHeader(string $field): bool;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the headers as an associated array
|
* Returns the headers as an associated array
|
||||||
|
|
@ -83,21 +82,22 @@ interface ICanHandleHttpResponses
|
||||||
/**
|
/**
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function isSuccess();
|
public function isSuccess(): bool;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getUrl();
|
public function getUrl(): string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getRedirectUrl();
|
public function getRedirectUrl(): string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see MessageInterface::getBody()
|
* Getter for body
|
||||||
*
|
*
|
||||||
|
* @see MessageInterface::getBody()
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getBody();
|
public function getBody();
|
||||||
|
|
@ -105,20 +105,20 @@ interface ICanHandleHttpResponses
|
||||||
/**
|
/**
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function isRedirectUrl();
|
public function isRedirectUrl(): bool;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return integer
|
* @return integer
|
||||||
*/
|
*/
|
||||||
public function getErrorNumber();
|
public function getErrorNumber(): int;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getError();
|
public function getError(): string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function isTimeout();
|
public function isTimeout(): bool;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1445,7 +1445,7 @@ class Probe
|
||||||
* @return array|bool OStatus data or "false" on error or "true" on short mode
|
* @return array|bool OStatus data or "false" on error or "true" on short mode
|
||||||
* @throws HTTPException\InternalServerErrorException
|
* @throws HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
private static function ostatus($webfinger, $short = false)
|
private static function ostatus(array $webfinger, bool $short = false)
|
||||||
{
|
{
|
||||||
$data = [];
|
$data = [];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1008,7 +1008,7 @@ class Post
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
private function getRedirectUrl()
|
private function getRedirectUrl(): string
|
||||||
{
|
{
|
||||||
return $this->redirect_url;
|
return $this->redirect_url;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,7 @@ class ContactResult implements IResult
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getUrl()
|
public function getUrl(): string
|
||||||
{
|
{
|
||||||
return $this->url;
|
return $this->url;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,9 +33,9 @@ class ProfileFields extends BaseCollection
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param callable $callback
|
* @param callable $callback
|
||||||
* @return ProfileFields
|
* @return ProfileFields (as an extended form of BaseCollection)
|
||||||
*/
|
*/
|
||||||
public function map(callable $callback): ProfileFields
|
public function map(callable $callback): BaseCollection
|
||||||
{
|
{
|
||||||
return parent::map($callback);
|
return parent::map($callback);
|
||||||
}
|
}
|
||||||
|
|
@ -43,9 +43,9 @@ class ProfileFields extends BaseCollection
|
||||||
/**
|
/**
|
||||||
* @param callable|null $callback
|
* @param callable|null $callback
|
||||||
* @param int $flag
|
* @param int $flag
|
||||||
* @return ProfileFields
|
* @return ProfileFields as an extended version of BaseCollection
|
||||||
*/
|
*/
|
||||||
public function filter(callable $callback = null, int $flag = 0): ProfileFields
|
public function filter(callable $callback = null, int $flag = 0): BaseCollection
|
||||||
{
|
{
|
||||||
return parent::filter($callback, $flag);
|
return parent::filter($callback, $flag);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -212,7 +212,7 @@ final class Activity
|
||||||
*
|
*
|
||||||
* @return bool True, if the activity is hidden
|
* @return bool True, if the activity is hidden
|
||||||
*/
|
*/
|
||||||
public function isHidden(string $activity)
|
public function isHidden(string $activity): bool
|
||||||
{
|
{
|
||||||
foreach (self::HIDDEN_ACTIVITIES as $hiddenActivity) {
|
foreach (self::HIDDEN_ACTIVITIES as $hiddenActivity) {
|
||||||
if ($this->match($activity, $hiddenActivity)) {
|
if ($this->match($activity, $hiddenActivity)) {
|
||||||
|
|
@ -231,7 +231,7 @@ final class Activity
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function match(string $haystack, string $needle)
|
public function match(string $haystack, string $needle): bool
|
||||||
{
|
{
|
||||||
return (($haystack === $needle) ||
|
return (($haystack === $needle) ||
|
||||||
((basename($needle) === $haystack) &&
|
((basename($needle) === $haystack) &&
|
||||||
|
|
|
||||||
|
|
@ -104,12 +104,12 @@ class ActivityPub
|
||||||
* @return array
|
* @return array
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function fetchContent(string $url, int $uid = 0)
|
public static function fetchContent(string $url, int $uid = 0): array
|
||||||
{
|
{
|
||||||
return HTTPSignature::fetch($url, $uid);
|
return HTTPSignature::fetch($url, $uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function getAccountType($apcontact)
|
private static function getAccountType(array $apcontact): int
|
||||||
{
|
{
|
||||||
$accounttype = -1;
|
$accounttype = -1;
|
||||||
|
|
||||||
|
|
@ -146,7 +146,7 @@ class ActivityPub
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function probeProfile($url, $update = true)
|
public static function probeProfile(string $url, bool $update = true): array
|
||||||
{
|
{
|
||||||
$apcontact = APContact::getByURL($url, $update);
|
$apcontact = APContact::getByURL($url, $update);
|
||||||
if (empty($apcontact)) {
|
if (empty($apcontact)) {
|
||||||
|
|
@ -204,7 +204,7 @@ class ActivityPub
|
||||||
* @param integer $uid User ID
|
* @param integer $uid User ID
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function fetchOutbox($url, $uid)
|
public static function fetchOutbox(string $url, int $uid)
|
||||||
{
|
{
|
||||||
$data = self::fetchContent($url, $uid);
|
$data = self::fetchContent($url, $uid);
|
||||||
if (empty($data)) {
|
if (empty($data)) {
|
||||||
|
|
@ -235,7 +235,7 @@ class ActivityPub
|
||||||
* @param integer $uid Optional user id
|
* @param integer $uid Optional user id
|
||||||
* @return array Endpoint items
|
* @return array Endpoint items
|
||||||
*/
|
*/
|
||||||
public static function fetchItems(string $url, int $uid = 0)
|
public static function fetchItems(string $url, int $uid = 0): array
|
||||||
{
|
{
|
||||||
$data = self::fetchContent($url, $uid);
|
$data = self::fetchContent($url, $uid);
|
||||||
if (empty($data)) {
|
if (empty($data)) {
|
||||||
|
|
@ -268,7 +268,7 @@ class ActivityPub
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function isSupportedByContactUrl($url, $update = null)
|
public static function isSupportedByContactUrl(string $url, $update = null)
|
||||||
{
|
{
|
||||||
return !empty(APContact::getByURL($url, $update));
|
return !empty(APContact::getByURL($url, $update));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ class Processor
|
||||||
* @param array $languages
|
* @param array $languages
|
||||||
* @return string language JSON
|
* @return string language JSON
|
||||||
*/
|
*/
|
||||||
private static function processLanguages(array $languages)
|
private static function processLanguages(array $languages): string
|
||||||
{
|
{
|
||||||
$codes = array_keys($languages);
|
$codes = array_keys($languages);
|
||||||
$lang = [];
|
$lang = [];
|
||||||
|
|
@ -88,12 +88,13 @@ class Processor
|
||||||
/**
|
/**
|
||||||
* Replaces emojis in the body
|
* Replaces emojis in the body
|
||||||
*
|
*
|
||||||
* @param array $emojis
|
* @param int $uri_id
|
||||||
* @param string $body
|
* @param string $body
|
||||||
|
* @param array $emojis
|
||||||
*
|
*
|
||||||
* @return string with replaced emojis
|
* @return string with replaced emojis
|
||||||
*/
|
*/
|
||||||
private static function replaceEmojis(int $uri_id, $body, array $emojis)
|
private static function replaceEmojis(int $uri_id, string $body, array $emojis): string
|
||||||
{
|
{
|
||||||
$body = strtr($body,
|
$body = strtr($body,
|
||||||
array_combine(
|
array_combine(
|
||||||
|
|
@ -143,7 +144,7 @@ class Processor
|
||||||
* @param array $activity
|
* @param array $activity
|
||||||
* @param array $item
|
* @param array $item
|
||||||
*/
|
*/
|
||||||
private static function storeAttachments($activity, $item)
|
private static function storeAttachments(array $activity, array $item)
|
||||||
{
|
{
|
||||||
if (empty($activity['attachments'])) {
|
if (empty($activity['attachments'])) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -160,7 +161,7 @@ class Processor
|
||||||
* @param array $activity
|
* @param array $activity
|
||||||
* @param array $item
|
* @param array $item
|
||||||
*/
|
*/
|
||||||
private static function storeQuestion($activity, $item)
|
private static function storeQuestion(array $activity, array $item)
|
||||||
{
|
{
|
||||||
if (empty($activity['question'])) {
|
if (empty($activity['question'])) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -191,7 +192,7 @@ class Processor
|
||||||
* @param array $activity Activity array
|
* @param array $activity Activity array
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function updateItem($activity)
|
public static function updateItem(array $activity)
|
||||||
{
|
{
|
||||||
$item = Post::selectFirst(['uri', 'uri-id', 'thr-parent', 'gravity', 'post-type'], ['uri' => $activity['id']]);
|
$item = Post::selectFirst(['uri', 'uri-id', 'thr-parent', 'gravity', 'post-type'], ['uri' => $activity['id']]);
|
||||||
if (!DBA::isResult($item)) {
|
if (!DBA::isResult($item)) {
|
||||||
|
|
@ -262,7 +263,7 @@ class Processor
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function createItem($activity)
|
public static function createItem(array $activity): array
|
||||||
{
|
{
|
||||||
$item = [];
|
$item = [];
|
||||||
$item['verb'] = Activity::POST;
|
$item['verb'] = Activity::POST;
|
||||||
|
|
@ -411,7 +412,7 @@ class Processor
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function deleteItem($activity)
|
public static function deleteItem(array $activity)
|
||||||
{
|
{
|
||||||
$owner = Contact::getIdForURL($activity['actor']);
|
$owner = Contact::getIdForURL($activity['actor']);
|
||||||
|
|
||||||
|
|
@ -426,7 +427,7 @@ class Processor
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function addTag($activity)
|
public static function addTag(array $activity)
|
||||||
{
|
{
|
||||||
if (empty($activity['object_content']) || empty($activity['object_id'])) {
|
if (empty($activity['object_content']) || empty($activity['object_id'])) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -457,7 +458,7 @@ class Processor
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function createActivity($activity, $verb)
|
public static function createActivity(array $activity, string $verb)
|
||||||
{
|
{
|
||||||
$item = self::createItem($activity);
|
$item = self::createItem($activity);
|
||||||
if (empty($item)) {
|
if (empty($item)) {
|
||||||
|
|
@ -561,7 +562,7 @@ class Processor
|
||||||
* @return int event id
|
* @return int event id
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function createEvent($activity, $item)
|
public static function createEvent(array $activity, array $item): int
|
||||||
{
|
{
|
||||||
$event['summary'] = HTML::toBBCode($activity['name'] ?: $activity['summary']);
|
$event['summary'] = HTML::toBBCode($activity['name'] ?: $activity['summary']);
|
||||||
$event['desc'] = HTML::toBBCode($activity['content']);
|
$event['desc'] = HTML::toBBCode($activity['content']);
|
||||||
|
|
@ -605,7 +606,7 @@ class Processor
|
||||||
* @return array|bool Returns the item array or false if there was an unexpected occurrence
|
* @return array|bool Returns the item array or false if there was an unexpected occurrence
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function processContent($activity, $item)
|
private static function processContent(array $activity, array $item)
|
||||||
{
|
{
|
||||||
if (!empty($activity['mediatype']) && ($activity['mediatype'] == 'text/markdown')) {
|
if (!empty($activity['mediatype']) && ($activity['mediatype'] == 'text/markdown')) {
|
||||||
$item['title'] = strip_tags($activity['name']);
|
$item['title'] = strip_tags($activity['name']);
|
||||||
|
|
@ -615,8 +616,8 @@ class Processor
|
||||||
$content = $activity['content'];
|
$content = $activity['content'];
|
||||||
} else {
|
} else {
|
||||||
// By default assume "text/html"
|
// By default assume "text/html"
|
||||||
$item['title'] = HTML::toBBCode($activity['name']);
|
$item['title'] = HTML::toBBCode($activity['name'] ?? '');
|
||||||
$content = HTML::toBBCode($activity['content']);
|
$content = HTML::toBBCode($activity['content'] ?? '');
|
||||||
}
|
}
|
||||||
|
|
||||||
$item['title'] = trim(BBCode::toPlaintext($item['title']));
|
$item['title'] = trim(BBCode::toPlaintext($item['title']));
|
||||||
|
|
@ -650,7 +651,7 @@ class Processor
|
||||||
|
|
||||||
$content = self::removeImplicitMentionsFromBody($content, $parent);
|
$content = self::removeImplicitMentionsFromBody($content, $parent);
|
||||||
}
|
}
|
||||||
$item['content-warning'] = HTML::toBBCode($activity['summary']);
|
$item['content-warning'] = HTML::toBBCode($activity['summary'] ?? '');
|
||||||
$item['raw-body'] = $item['body'] = $content;
|
$item['raw-body'] = $item['body'] = $content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -689,7 +690,7 @@ class Processor
|
||||||
* @param string $url message URL
|
* @param string $url message URL
|
||||||
* @return string with GUID
|
* @return string with GUID
|
||||||
*/
|
*/
|
||||||
private static function getGUIDByURL(string $url)
|
private static function getGUIDByURL(string $url): string
|
||||||
{
|
{
|
||||||
$parsed = parse_url($url);
|
$parsed = parse_url($url);
|
||||||
|
|
||||||
|
|
@ -710,7 +711,7 @@ class Processor
|
||||||
* @param array $item
|
* @param array $item
|
||||||
* @return boolean Is the message wanted?
|
* @return boolean Is the message wanted?
|
||||||
*/
|
*/
|
||||||
private static function isSolicitedMessage(array $activity, array $item)
|
private static function isSolicitedMessage(array $activity, array $item): bool
|
||||||
{
|
{
|
||||||
// The checks are split to improve the support when searching why a message was accepted.
|
// The checks are split to improve the support when searching why a message was accepted.
|
||||||
if (count($activity['receiver']) != 1) {
|
if (count($activity['receiver']) != 1) {
|
||||||
|
|
@ -971,7 +972,7 @@ class Processor
|
||||||
* @return int|bool New mail table row id or false on error
|
* @return int|bool New mail table row id or false on error
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
private static function postMail($activity, $item)
|
private static function postMail(array $activity, array $item)
|
||||||
{
|
{
|
||||||
if (($item['gravity'] != GRAVITY_PARENT) && !DBA::exists('mail', ['uri' => $item['thr-parent'], 'uid' => $item['uid']])) {
|
if (($item['gravity'] != GRAVITY_PARENT) && !DBA::exists('mail', ['uri' => $item['thr-parent'], 'uid' => $item['uid']])) {
|
||||||
Logger::info('Parent not found, mail will be discarded.', ['uid' => $item['uid'], 'uri' => $item['thr-parent']]);
|
Logger::info('Parent not found, mail will be discarded.', ['uid' => $item['uid'], 'uri' => $item['thr-parent']]);
|
||||||
|
|
@ -1112,7 +1113,7 @@ class Processor
|
||||||
* @return string fetched message URL
|
* @return string fetched message URL
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function fetchMissingActivity(string $url, array $child = [], string $relay_actor = '', int $completion = Receiver::COMPLETION_MANUAL)
|
public static function fetchMissingActivity(string $url, array $child = [], string $relay_actor = '', int $completion = Receiver::COMPLETION_MANUAL): string
|
||||||
{
|
{
|
||||||
if (!empty($child['receiver'])) {
|
if (!empty($child['receiver'])) {
|
||||||
$uid = ActivityPub\Receiver::getFirstUserFromReceivers($child['receiver']);
|
$uid = ActivityPub\Receiver::getFirstUserFromReceivers($child['receiver']);
|
||||||
|
|
@ -1207,7 +1208,7 @@ class Processor
|
||||||
* @param string $id object ID
|
* @param string $id object ID
|
||||||
* @return boolean true if message is accepted
|
* @return boolean true if message is accepted
|
||||||
*/
|
*/
|
||||||
private static function acceptIncomingMessage(array $activity, string $id)
|
private static function acceptIncomingMessage(array $activity, string $id): bool
|
||||||
{
|
{
|
||||||
if (empty($activity['as:object'])) {
|
if (empty($activity['as:object'])) {
|
||||||
Logger::info('No object field in activity - accepted', ['id' => $id]);
|
Logger::info('No object field in activity - accepted', ['id' => $id]);
|
||||||
|
|
@ -1215,7 +1216,7 @@ class Processor
|
||||||
}
|
}
|
||||||
|
|
||||||
$replyto = JsonLD::fetchElement($activity['as:object'], 'as:inReplyTo', '@id');
|
$replyto = JsonLD::fetchElement($activity['as:object'], 'as:inReplyTo', '@id');
|
||||||
$uriid = ItemURI::getIdByURI($replyto);
|
$uriid = ItemURI::getIdByURI($replyto ?? '');
|
||||||
if (Post::exists(['uri-id' => $uriid])) {
|
if (Post::exists(['uri-id' => $uriid])) {
|
||||||
Logger::info('Post is a reply to an existing post - accepted', ['id' => $id, 'uri-id' => $uriid, 'replyto' => $replyto]);
|
Logger::info('Post is a reply to an existing post - accepted', ['id' => $id, 'uri-id' => $uriid, 'replyto' => $replyto]);
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -1224,7 +1225,7 @@ class Processor
|
||||||
$attributed_to = JsonLD::fetchElement($activity['as:object'], 'as:attributedTo', '@id');
|
$attributed_to = JsonLD::fetchElement($activity['as:object'], 'as:attributedTo', '@id');
|
||||||
$authorid = Contact::getIdForURL($attributed_to);
|
$authorid = Contact::getIdForURL($attributed_to);
|
||||||
|
|
||||||
$body = HTML::toBBCode(JsonLD::fetchElement($activity['as:object'], 'as:content', '@value'));
|
$body = HTML::toBBCode(JsonLD::fetchElement($activity['as:object'], 'as:content', '@value') ?? '');
|
||||||
|
|
||||||
$messageTags = [];
|
$messageTags = [];
|
||||||
$tags = Receiver::processTags(JsonLD::fetchElementArray($activity['as:object'], 'as:tag') ?? []);
|
$tags = Receiver::processTags(JsonLD::fetchElementArray($activity['as:object'], 'as:tag') ?? []);
|
||||||
|
|
@ -1247,7 +1248,7 @@ class Processor
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function followUser($activity)
|
public static function followUser(array $activity)
|
||||||
{
|
{
|
||||||
$uid = User::getIdForURL($activity['object_id']);
|
$uid = User::getIdForURL($activity['object_id']);
|
||||||
if (empty($uid)) {
|
if (empty($uid)) {
|
||||||
|
|
@ -1325,7 +1326,7 @@ class Processor
|
||||||
* @param array $activity
|
* @param array $activity
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function updatePerson($activity)
|
public static function updatePerson(array $activity)
|
||||||
{
|
{
|
||||||
if (empty($activity['object_id'])) {
|
if (empty($activity['object_id'])) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -1341,7 +1342,7 @@ class Processor
|
||||||
* @param array $activity
|
* @param array $activity
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function deletePerson($activity)
|
public static function deletePerson(array $activity)
|
||||||
{
|
{
|
||||||
if (empty($activity['object_id']) || empty($activity['actor'])) {
|
if (empty($activity['object_id']) || empty($activity['actor'])) {
|
||||||
Logger::info('Empty object id or actor.');
|
Logger::info('Empty object id or actor.');
|
||||||
|
|
@ -1368,7 +1369,7 @@ class Processor
|
||||||
* @param array $activity
|
* @param array $activity
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function blockAccount($activity)
|
public static function blockAccount(array $activity)
|
||||||
{
|
{
|
||||||
$cid = Contact::getIdForURL($activity['actor']);
|
$cid = Contact::getIdForURL($activity['actor']);
|
||||||
if (empty($cid)) {
|
if (empty($cid)) {
|
||||||
|
|
@ -1391,7 +1392,7 @@ class Processor
|
||||||
* @param array $activity
|
* @param array $activity
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function unblockAccount($activity)
|
public static function unblockAccount(array $activity)
|
||||||
{
|
{
|
||||||
$cid = Contact::getIdForURL($activity['actor']);
|
$cid = Contact::getIdForURL($activity['actor']);
|
||||||
if (empty($cid)) {
|
if (empty($cid)) {
|
||||||
|
|
@ -1415,7 +1416,7 @@ class Processor
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function acceptFollowUser($activity)
|
public static function acceptFollowUser(array $activity)
|
||||||
{
|
{
|
||||||
$uid = User::getIdForURL($activity['object_actor']);
|
$uid = User::getIdForURL($activity['object_actor']);
|
||||||
if (empty($uid)) {
|
if (empty($uid)) {
|
||||||
|
|
@ -1449,7 +1450,7 @@ class Processor
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function rejectFollowUser($activity)
|
public static function rejectFollowUser(array $activity)
|
||||||
{
|
{
|
||||||
$uid = User::getIdForURL($activity['object_actor']);
|
$uid = User::getIdForURL($activity['object_actor']);
|
||||||
if (empty($uid)) {
|
if (empty($uid)) {
|
||||||
|
|
@ -1482,7 +1483,7 @@ class Processor
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function undoActivity($activity)
|
public static function undoActivity(array $activity)
|
||||||
{
|
{
|
||||||
if (empty($activity['object_id'])) {
|
if (empty($activity['object_id'])) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -1507,7 +1508,7 @@ class Processor
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function undoFollowUser($activity)
|
public static function undoFollowUser(array $activity)
|
||||||
{
|
{
|
||||||
$uid = User::getIdForURL($activity['object_object']);
|
$uid = User::getIdForURL($activity['object_object']);
|
||||||
if (empty($uid)) {
|
if (empty($uid)) {
|
||||||
|
|
@ -1542,7 +1543,7 @@ class Processor
|
||||||
* @param integer $cid Contact ID
|
* @param integer $cid Contact ID
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function switchContact($cid)
|
private static function switchContact(int $cid)
|
||||||
{
|
{
|
||||||
$contact = DBA::selectFirst('contact', ['network', 'url'], ['id' => $cid]);
|
$contact = DBA::selectFirst('contact', ['network', 'url'], ['id' => $cid]);
|
||||||
if (!DBA::isResult($contact) || in_array($contact['network'], [Protocol::ACTIVITYPUB, Protocol::DFRN]) || Contact::isLocal($contact['url'])) {
|
if (!DBA::isResult($contact) || in_array($contact['network'], [Protocol::ACTIVITYPUB, Protocol::DFRN]) || Contact::isLocal($contact['url'])) {
|
||||||
|
|
@ -1562,7 +1563,7 @@ class Processor
|
||||||
* @return array
|
* @return array
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
private static function getImplicitMentionList(array $parent)
|
private static function getImplicitMentionList(array $parent): array
|
||||||
{
|
{
|
||||||
$parent_terms = Tag::getByURIId($parent['uri-id'], [Tag::MENTION, Tag::IMPLICIT_MENTION, Tag::EXCLUSIVE_MENTION]);
|
$parent_terms = Tag::getByURIId($parent['uri-id'], [Tag::MENTION, Tag::IMPLICIT_MENTION, Tag::EXCLUSIVE_MENTION]);
|
||||||
|
|
||||||
|
|
@ -1600,7 +1601,7 @@ class Processor
|
||||||
* @param array $parent
|
* @param array $parent
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
private static function removeImplicitMentionsFromBody(string $body, array $parent)
|
private static function removeImplicitMentionsFromBody(string $body, array $parent): string
|
||||||
{
|
{
|
||||||
if (DI::config()->get('system', 'disable_implicit_mentions')) {
|
if (DI::config()->get('system', 'disable_implicit_mentions')) {
|
||||||
return $body;
|
return $body;
|
||||||
|
|
|
||||||
|
|
@ -84,8 +84,9 @@ class Receiver
|
||||||
* @param $header
|
* @param $header
|
||||||
* @param integer $uid User ID
|
* @param integer $uid User ID
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
|
* @todo Find type for $body/$header
|
||||||
*/
|
*/
|
||||||
public static function processInbox($body, $header, $uid)
|
public static function processInbox($body, $header, int $uid)
|
||||||
{
|
{
|
||||||
$activity = json_decode($body, true);
|
$activity = json_decode($body, true);
|
||||||
if (empty($activity)) {
|
if (empty($activity)) {
|
||||||
|
|
@ -220,11 +221,11 @@ class Receiver
|
||||||
* @param string $object_id Object ID of the the provided object
|
* @param string $object_id Object ID of the the provided object
|
||||||
* @param integer $uid User ID
|
* @param integer $uid User ID
|
||||||
*
|
*
|
||||||
* @return string with object type
|
* @return string with object type or NULL
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
private static function fetchObjectType($activity, $object_id, $uid = 0)
|
private static function fetchObjectType(array $activity, string $object_id, int $uid = 0)
|
||||||
{
|
{
|
||||||
if (!empty($activity['as:object'])) {
|
if (!empty($activity['as:object'])) {
|
||||||
$object_type = JsonLD::fetchElement($activity['as:object'], '@type');
|
$object_type = JsonLD::fetchElement($activity['as:object'], '@type');
|
||||||
|
|
@ -268,7 +269,7 @@ class Receiver
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function prepareObjectData($activity, $uid, $push, &$trust_source)
|
public static function prepareObjectData(array $activity, int $uid, bool $push, bool &$trust_source): array
|
||||||
{
|
{
|
||||||
$id = JsonLD::fetchElement($activity, '@id');
|
$id = JsonLD::fetchElement($activity, '@id');
|
||||||
if (!empty($id) && !$trust_source) {
|
if (!empty($id) && !$trust_source) {
|
||||||
|
|
@ -458,7 +459,7 @@ class Receiver
|
||||||
* @param array $receivers Array with receivers
|
* @param array $receivers Array with receivers
|
||||||
* @return integer user id;
|
* @return integer user id;
|
||||||
*/
|
*/
|
||||||
public static function getFirstUserFromReceivers($receivers)
|
public static function getFirstUserFromReceivers(array $receivers): int
|
||||||
{
|
{
|
||||||
foreach ($receivers as $receiver) {
|
foreach ($receivers as $receiver) {
|
||||||
if (!empty($receiver)) {
|
if (!empty($receiver)) {
|
||||||
|
|
@ -479,7 +480,7 @@ class Receiver
|
||||||
* @param array $signer The signer of the post
|
* @param array $signer The signer of the post
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function processActivity($activity, string $body = '', int $uid = null, bool $trust_source = false, bool $push = false, array $signer = [])
|
public static function processActivity(array $activity, string $body = '', int $uid = null, bool $trust_source = false, bool $push = false, array $signer = [])
|
||||||
{
|
{
|
||||||
$type = JsonLD::fetchElement($activity, '@type');
|
$type = JsonLD::fetchElement($activity, '@type');
|
||||||
if (!$type) {
|
if (!$type) {
|
||||||
|
|
@ -818,7 +819,7 @@ class Receiver
|
||||||
*
|
*
|
||||||
* @return int user id
|
* @return int user id
|
||||||
*/
|
*/
|
||||||
public static function getBestUserForActivity(array $activity)
|
public static function getBestUserForActivity(array $activity): int
|
||||||
{
|
{
|
||||||
$uid = 0;
|
$uid = 0;
|
||||||
$actor = JsonLD::fetchElement($activity, 'as:actor', '@id') ?? '';
|
$actor = JsonLD::fetchElement($activity, 'as:actor', '@id') ?? '';
|
||||||
|
|
@ -844,7 +845,8 @@ class Receiver
|
||||||
return $uid;
|
return $uid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getReceiverURL($activity)
|
// @TODO Missing documentation
|
||||||
|
public static function getReceiverURL(array $activity): array
|
||||||
{
|
{
|
||||||
$urls = [];
|
$urls = [];
|
||||||
|
|
||||||
|
|
@ -876,9 +878,9 @@ class Receiver
|
||||||
* @return array with receivers (user id)
|
* @return array with receivers (user id)
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function getReceivers($activity, $actor, $tags = [], $fetch_unlisted = false)
|
private static function getReceivers(array $activity, string $actor, array $tags = [], bool $fetch_unlisted = false): array
|
||||||
{
|
{
|
||||||
$reply = $receivers = [];
|
$reply = $receivers = $profile = [];
|
||||||
|
|
||||||
// When it is an answer, we inherite the receivers from the parent
|
// When it is an answer, we inherite the receivers from the parent
|
||||||
$replyto = JsonLD::fetchElement($activity, 'as:inReplyTo', '@id');
|
$replyto = JsonLD::fetchElement($activity, 'as:inReplyTo', '@id');
|
||||||
|
|
@ -1005,7 +1007,7 @@ class Receiver
|
||||||
* @return array with receivers (user id)
|
* @return array with receivers (user id)
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function getReceiverForActor($actor, $tags, $receivers, $target_type, $profile)
|
private static function getReceiverForActor(string $actor, array $tags, array $receivers, int $target_type, array $profile): array
|
||||||
{
|
{
|
||||||
$basecondition = ['rel' => [Contact::SHARING, Contact::FRIEND, Contact::FOLLOWER],
|
$basecondition = ['rel' => [Contact::SHARING, Contact::FRIEND, Contact::FOLLOWER],
|
||||||
'network' => Protocol::FEDERATED, 'archive' => false, 'pending' => false];
|
'network' => Protocol::FEDERATED, 'archive' => false, 'pending' => false];
|
||||||
|
|
@ -1047,13 +1049,12 @@ class Receiver
|
||||||
* Tests if the contact is a valid receiver for this actor
|
* Tests if the contact is a valid receiver for this actor
|
||||||
*
|
*
|
||||||
* @param array $contact
|
* @param array $contact
|
||||||
* @param string $actor
|
|
||||||
* @param array $tags
|
* @param array $tags
|
||||||
*
|
*
|
||||||
* @return bool with receivers (user id)
|
* @return bool with receivers (user id)
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function isValidReceiverForActor($contact, $tags)
|
private static function isValidReceiverForActor(array $contact, array $tags): bool
|
||||||
{
|
{
|
||||||
// Are we following the contact? Then this is a valid receiver
|
// Are we following the contact? Then this is a valid receiver
|
||||||
if (in_array($contact['rel'], [Contact::SHARING, Contact::FRIEND])) {
|
if (in_array($contact['rel'], [Contact::SHARING, Contact::FRIEND])) {
|
||||||
|
|
@ -1089,7 +1090,7 @@ class Receiver
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function switchContact($cid, $uid, $url)
|
public static function switchContact(int $cid, int $uid, string $url)
|
||||||
{
|
{
|
||||||
if (DBA::exists('contact', ['id' => $cid, 'network' => Protocol::ACTIVITYPUB])) {
|
if (DBA::exists('contact', ['id' => $cid, 'network' => Protocol::ACTIVITYPUB])) {
|
||||||
Logger::info('Contact is already ActivityPub', ['id' => $cid, 'uid' => $uid, 'url' => $url]);
|
Logger::info('Contact is already ActivityPub', ['id' => $cid, 'uid' => $uid, 'url' => $url]);
|
||||||
|
|
@ -1108,7 +1109,7 @@ class Receiver
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @TODO Fix documentation and type-hints
|
||||||
*
|
*
|
||||||
* @param $receivers
|
* @param $receivers
|
||||||
* @param $actor
|
* @param $actor
|
||||||
|
|
@ -1135,14 +1136,14 @@ class Receiver
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @TODO Fix documentation and type-hints
|
||||||
*
|
*
|
||||||
* @param $object_data
|
* @param $object_data
|
||||||
* @param array $activity
|
* @param array $activity
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
private static function addActivityFields($object_data, $activity)
|
private static function addActivityFields($object_data, array $activity)
|
||||||
{
|
{
|
||||||
if (!empty($activity['published']) && empty($object_data['published'])) {
|
if (!empty($activity['published']) && empty($object_data['published'])) {
|
||||||
$object_data['published'] = JsonLD::fetchElement($activity, 'as:published', '@value');
|
$object_data['published'] = JsonLD::fetchElement($activity, 'as:published', '@value');
|
||||||
|
|
@ -1262,7 +1263,7 @@ class Receiver
|
||||||
* @param array $languages
|
* @param array $languages
|
||||||
* @return array Languages
|
* @return array Languages
|
||||||
*/
|
*/
|
||||||
public static function processLanguages(array $languages)
|
public static function processLanguages(array $languages): array
|
||||||
{
|
{
|
||||||
if (empty($languages)) {
|
if (empty($languages)) {
|
||||||
return [];
|
return [];
|
||||||
|
|
@ -1285,7 +1286,7 @@ class Receiver
|
||||||
*
|
*
|
||||||
* @return array with tags in a simplified format
|
* @return array with tags in a simplified format
|
||||||
*/
|
*/
|
||||||
public static function processTags(array $tags)
|
public static function processTags(array $tags): array
|
||||||
{
|
{
|
||||||
$taglist = [];
|
$taglist = [];
|
||||||
|
|
||||||
|
|
@ -1317,7 +1318,7 @@ class Receiver
|
||||||
* @param array $emojis
|
* @param array $emojis
|
||||||
* @return array with emojis in a simplified format
|
* @return array with emojis in a simplified format
|
||||||
*/
|
*/
|
||||||
private static function processEmojis(array $emojis)
|
private static function processEmojis(array $emojis): array
|
||||||
{
|
{
|
||||||
$emojilist = [];
|
$emojilist = [];
|
||||||
|
|
||||||
|
|
@ -1343,7 +1344,7 @@ class Receiver
|
||||||
*
|
*
|
||||||
* @return array Attachments in a simplified format
|
* @return array Attachments in a simplified format
|
||||||
*/
|
*/
|
||||||
private static function processAttachments(array $attachments)
|
private static function processAttachments(array $attachments): array
|
||||||
{
|
{
|
||||||
$attachlist = [];
|
$attachlist = [];
|
||||||
|
|
||||||
|
|
@ -1460,7 +1461,7 @@ class Receiver
|
||||||
*
|
*
|
||||||
* @return array Questions in a simplified format
|
* @return array Questions in a simplified format
|
||||||
*/
|
*/
|
||||||
private static function processQuestion(array $object)
|
private static function processQuestion(array $object): array
|
||||||
{
|
{
|
||||||
$question = [];
|
$question = [];
|
||||||
|
|
||||||
|
|
@ -1518,10 +1519,10 @@ class Receiver
|
||||||
* @param array $object
|
* @param array $object
|
||||||
* @param array $object_data
|
* @param array $object_data
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array Object data (?)
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function getSource($object, $object_data)
|
private static function getSource(array $object, array $object_data): array
|
||||||
{
|
{
|
||||||
$object_data['source'] = JsonLD::fetchElement($object, 'as:source', 'as:content', 'as:mediaType', 'text/bbcode');
|
$object_data['source'] = JsonLD::fetchElement($object, 'as:source', 'as:content', 'as:mediaType', 'text/bbcode');
|
||||||
$object_data['source'] = JsonLD::fetchElement($object_data, 'source', '@value');
|
$object_data['source'] = JsonLD::fetchElement($object_data, 'source', '@value');
|
||||||
|
|
@ -1650,10 +1651,10 @@ class Receiver
|
||||||
*
|
*
|
||||||
* @param array $object
|
* @param array $object
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array|bool Object data or FALSE if $object does not contain @id element
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function processObject($object)
|
private static function processObject(array $object)
|
||||||
{
|
{
|
||||||
if (!JsonLD::fetchElement($object, '@id')) {
|
if (!JsonLD::fetchElement($object, '@id')) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -1767,7 +1768,7 @@ class Receiver
|
||||||
$object_data['question'] = self::processQuestion($object);
|
$object_data['question'] = self::processQuestion($object);
|
||||||
}
|
}
|
||||||
|
|
||||||
$receiverdata = self::getReceivers($object, $object_data['actor'], $object_data['tags'], true);
|
$receiverdata = self::getReceivers($object, $object_data['actor'] ?? '', $object_data['tags'], true);
|
||||||
$receivers = $reception_types = [];
|
$receivers = $reception_types = [];
|
||||||
foreach ($receiverdata as $key => $data) {
|
foreach ($receiverdata as $key => $data) {
|
||||||
$receivers[$key] = $data['uid'];
|
$receivers[$key] = $data['uid'];
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ class Transmitter
|
||||||
* @param array $inboxes
|
* @param array $inboxes
|
||||||
* @return array inboxes with added relay servers
|
* @return array inboxes with added relay servers
|
||||||
*/
|
*/
|
||||||
public static function addRelayServerInboxes(array $inboxes = [])
|
public static function addRelayServerInboxes(array $inboxes = []): array
|
||||||
{
|
{
|
||||||
foreach (Relay::getList(['inbox']) as $contact) {
|
foreach (Relay::getList(['inbox']) as $contact) {
|
||||||
$inboxes[$contact['inbox']] = $contact['inbox'];
|
$inboxes[$contact['inbox']] = $contact['inbox'];
|
||||||
|
|
@ -83,7 +83,7 @@ class Transmitter
|
||||||
* @param array $inboxes
|
* @param array $inboxes
|
||||||
* @return array inboxes with added relay servers
|
* @return array inboxes with added relay servers
|
||||||
*/
|
*/
|
||||||
public static function addRelayServerInboxesForItem(int $item_id, array $inboxes = [])
|
public static function addRelayServerInboxesForItem(int $item_id, array $inboxes = []): array
|
||||||
{
|
{
|
||||||
$item = Post::selectFirst(['uid'], ['id' => $item_id]);
|
$item = Post::selectFirst(['uid'], ['id' => $item_id]);
|
||||||
if (empty($item)) {
|
if (empty($item)) {
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ class DFRN
|
||||||
* @return array importer
|
* @return array importer
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function getImporter($cid, $uid = 0)
|
public static function getImporter(int $cid, int $uid = 0): array
|
||||||
{
|
{
|
||||||
$condition = ['id' => $cid, 'blocked' => false, 'pending' => false];
|
$condition = ['id' => $cid, 'blocked' => false, 'pending' => false];
|
||||||
$contact = DBA::selectFirst('contact', [], $condition);
|
$contact = DBA::selectFirst('contact', [], $condition);
|
||||||
|
|
@ -115,7 +115,7 @@ class DFRN
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
* @todo Find proper type-hints
|
* @todo Find proper type-hints
|
||||||
*/
|
*/
|
||||||
public static function entries($items, $owner)
|
public static function entries(array $items, array $owner): string
|
||||||
{
|
{
|
||||||
$doc = new DOMDocument('1.0', 'utf-8');
|
$doc = new DOMDocument('1.0', 'utf-8');
|
||||||
$doc->formatOutput = true;
|
$doc->formatOutput = true;
|
||||||
|
|
@ -152,7 +152,7 @@ class DFRN
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function itemFeed(int $uri_id, int $uid, bool $conversation = false)
|
public static function itemFeed(int $uri_id, int $uid, bool $conversation = false): string
|
||||||
{
|
{
|
||||||
if ($conversation) {
|
if ($conversation) {
|
||||||
$condition = ['parent-uri-id' => $uri_id];
|
$condition = ['parent-uri-id' => $uri_id];
|
||||||
|
|
@ -222,7 +222,7 @@ class DFRN
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @todo Find proper type-hints
|
* @todo Find proper type-hints
|
||||||
*/
|
*/
|
||||||
public static function mail(array $mail, array $owner)
|
public static function mail(array $mail, array $owner): string
|
||||||
{
|
{
|
||||||
$doc = new DOMDocument('1.0', 'utf-8');
|
$doc = new DOMDocument('1.0', 'utf-8');
|
||||||
$doc->formatOutput = true;
|
$doc->formatOutput = true;
|
||||||
|
|
@ -259,7 +259,7 @@ class DFRN
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @todo Find proper type-hints
|
* @todo Find proper type-hints
|
||||||
*/
|
*/
|
||||||
public static function fsuggest($item, $owner)
|
public static function fsuggest(array $item, array $owner): string
|
||||||
{
|
{
|
||||||
$doc = new DOMDocument('1.0', 'utf-8');
|
$doc = new DOMDocument('1.0', 'utf-8');
|
||||||
$doc->formatOutput = true;
|
$doc->formatOutput = true;
|
||||||
|
|
@ -289,7 +289,7 @@ class DFRN
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @todo Find proper type-hints
|
* @todo Find proper type-hints
|
||||||
*/
|
*/
|
||||||
public static function relocate($owner, $uid)
|
public static function relocate(array $owner, int $uid): string
|
||||||
{
|
{
|
||||||
|
|
||||||
/* get site pubkey. this could be a new installation with no site keys*/
|
/* get site pubkey. this could be a new installation with no site keys*/
|
||||||
|
|
@ -346,9 +346,9 @@ class DFRN
|
||||||
*
|
*
|
||||||
* @return object XML root object
|
* @return object XML root object
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @todo Find proper type-hints
|
* @todo Find proper type-hint for returned type
|
||||||
*/
|
*/
|
||||||
private static function addHeader(DOMDocument $doc, $owner, $authorelement, $alternatelink = "", $public = false)
|
private static function addHeader(DOMDocument $doc, array $owner, string $authorelement, string $alternatelink = '', bool $public = false)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($alternatelink == "") {
|
if ($alternatelink == "") {
|
||||||
|
|
@ -428,8 +428,12 @@ class DFRN
|
||||||
* viewer's timezone also, but first we are going to convert it from the birthday
|
* viewer's timezone also, but first we are going to convert it from the birthday
|
||||||
* person's timezone to GMT - so the viewer may find the birthday starting at
|
* person's timezone to GMT - so the viewer may find the birthday starting at
|
||||||
* 6:00PM the day before, but that will correspond to midnight to the birthday person.
|
* 6:00PM the day before, but that will correspond to midnight to the birthday person.
|
||||||
|
*
|
||||||
|
* @param int $uid User id
|
||||||
|
* @param string $tz Time zone string, like UTC
|
||||||
|
* @return string Formatted birthday string
|
||||||
*/
|
*/
|
||||||
private static function determineNextBirthday($uid, $tz)
|
private static function determineNextBirthday(int $uid, string $tz): string
|
||||||
{
|
{
|
||||||
$birthday = '';
|
$birthday = '';
|
||||||
|
|
||||||
|
|
@ -467,7 +471,7 @@ class DFRN
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @todo Find proper type-hints
|
* @todo Find proper type-hints
|
||||||
*/
|
*/
|
||||||
private static function addAuthor(DOMDocument $doc, array $owner, $authorelement, $public)
|
private static function addAuthor(DOMDocument $doc, array $owner, string $authorelement, bool $public)
|
||||||
{
|
{
|
||||||
// Should the profile be "unsearchable" in the net? Then add the "hide" element
|
// Should the profile be "unsearchable" in the net? Then add the "hide" element
|
||||||
$hide = DBA::exists('profile', ['uid' => $owner['uid'], 'net-publish' => false]);
|
$hide = DBA::exists('profile', ['uid' => $owner['uid'], 'net-publish' => false]);
|
||||||
|
|
@ -592,7 +596,7 @@ class DFRN
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @todo Find proper type-hints
|
* @todo Find proper type-hints
|
||||||
*/
|
*/
|
||||||
private static function addEntryAuthor(DOMDocument $doc, $element, $contact_url, $item)
|
private static function addEntryAuthor(DOMDocument $doc, string $element, string $contact_url, array $item)
|
||||||
{
|
{
|
||||||
$author = $doc->createElement($element);
|
$author = $doc->createElement($element);
|
||||||
|
|
||||||
|
|
@ -637,7 +641,7 @@ class DFRN
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @todo Find proper type-hints
|
* @todo Find proper type-hints
|
||||||
*/
|
*/
|
||||||
private static function createActivity(DOMDocument $doc, $element, $activity, $uriid)
|
private static function createActivity(DOMDocument $doc, string $element, string $activity, int $uriid)
|
||||||
{
|
{
|
||||||
if ($activity) {
|
if ($activity) {
|
||||||
$entry = $doc->createElement($element);
|
$entry = $doc->createElement($element);
|
||||||
|
|
@ -703,7 +707,7 @@ class DFRN
|
||||||
* @return void XML attachment object
|
* @return void XML attachment object
|
||||||
* @todo Find proper type-hints
|
* @todo Find proper type-hints
|
||||||
*/
|
*/
|
||||||
private static function getAttachment($doc, $root, $item)
|
private static function getAttachment($doc, $root, array $item)
|
||||||
{
|
{
|
||||||
foreach (Post\Media::getByURIId($item['uri-id'], [Post\Media::DOCUMENT, Post\Media::TORRENT, Post\Media::UNKNOWN]) as $attachment) {
|
foreach (Post\Media::getByURIId($item['uri-id'], [Post\Media::DOCUMENT, Post\Media::TORRENT, Post\Media::UNKNOWN]) as $attachment) {
|
||||||
$attributes = ['rel' => 'enclosure',
|
$attributes = ['rel' => 'enclosure',
|
||||||
|
|
@ -737,7 +741,7 @@ class DFRN
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
* @todo Find proper type-hints
|
* @todo Find proper type-hints
|
||||||
*/
|
*/
|
||||||
private static function entry(DOMDocument $doc, $type, array $item, array $owner, $comment = false, $cid = 0, $single = false)
|
private static function entry(DOMDocument $doc, string $type, array $item, array $owner, bool $comment = false, int $cid = 0, bool $single = false)
|
||||||
{
|
{
|
||||||
$mentioned = [];
|
$mentioned = [];
|
||||||
|
|
||||||
|
|
@ -961,13 +965,12 @@ class DFRN
|
||||||
* @param array $owner Owner record
|
* @param array $owner Owner record
|
||||||
* @param array $contact Contact record of the receiver
|
* @param array $contact Contact record of the receiver
|
||||||
* @param string $atom Content that will be transmitted
|
* @param string $atom Content that will be transmitted
|
||||||
*
|
|
||||||
* @param bool $public_batch
|
* @param bool $public_batch
|
||||||
* @return int Deliver status. Negative values mean an error.
|
* @return int Deliver status. Negative values mean an error.
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function transmit($owner, $contact, $atom, $public_batch = false)
|
public static function transmit(array $owner, array $contact, string $atom, bool $public_batch = false)
|
||||||
{
|
{
|
||||||
if (!$public_batch) {
|
if (!$public_batch) {
|
||||||
if (empty($contact['addr'])) {
|
if (empty($contact['addr'])) {
|
||||||
|
|
@ -1060,7 +1063,7 @@ class DFRN
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
* @todo Find good type-hints for all parameter
|
* @todo Find good type-hints for all parameter
|
||||||
*/
|
*/
|
||||||
private static function fetchauthor(\DOMXPath $xpath, \DOMNode $context, $importer, $element, $onlyfetch, $xml = "")
|
private static function fetchauthor(\DOMXPath $xpath, \DOMNode $context, array $importer, string $element, bool $onlyfetch, string $xml = ''): array
|
||||||
{
|
{
|
||||||
$author = [];
|
$author = [];
|
||||||
$author["name"] = XML::getFirstNodeValue($xpath, $element."/atom:name/text()", $context);
|
$author["name"] = XML::getFirstNodeValue($xpath, $element."/atom:name/text()", $context);
|
||||||
|
|
@ -1280,7 +1283,7 @@ class DFRN
|
||||||
* @return string XML string
|
* @return string XML string
|
||||||
* @todo Find good type-hints for all parameter
|
* @todo Find good type-hints for all parameter
|
||||||
*/
|
*/
|
||||||
private static function transformActivity($xpath, $activity, $element)
|
private static function transformActivity($xpath, $activity, string $element): string
|
||||||
{
|
{
|
||||||
if (!is_object($activity)) {
|
if (!is_object($activity)) {
|
||||||
return "";
|
return "";
|
||||||
|
|
@ -1335,7 +1338,7 @@ class DFRN
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
* @todo Find good type-hints for all parameter
|
* @todo Find good type-hints for all parameter
|
||||||
*/
|
*/
|
||||||
private static function processMail($xpath, $mail, $importer)
|
private static function processMail($xpath, $mail, array $importer)
|
||||||
{
|
{
|
||||||
Logger::notice("Processing mails");
|
Logger::notice("Processing mails");
|
||||||
|
|
||||||
|
|
@ -1364,7 +1367,7 @@ class DFRN
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @todo Find good type-hints for all parameter
|
* @todo Find good type-hints for all parameter
|
||||||
*/
|
*/
|
||||||
private static function processSuggestion($xpath, $suggestion, $importer)
|
private static function processSuggestion($xpath, $suggestion, array $importer)
|
||||||
{
|
{
|
||||||
Logger::notice('Processing suggestions');
|
Logger::notice('Processing suggestions');
|
||||||
|
|
||||||
|
|
@ -1383,7 +1386,7 @@ class DFRN
|
||||||
* @param integer $from_cid
|
* @param integer $from_cid
|
||||||
* @return bool Was the adding successful?
|
* @return bool Was the adding successful?
|
||||||
*/
|
*/
|
||||||
private static function addSuggestion(int $uid, int $cid, int $from_cid, string $note = '')
|
private static function addSuggestion(int $uid, int $cid, int $from_cid, string $note = ''): bool
|
||||||
{
|
{
|
||||||
$owner = User::getOwnerDataById($uid);
|
$owner = User::getOwnerDataById($uid);
|
||||||
$contact = Contact::getById($cid);
|
$contact = Contact::getById($cid);
|
||||||
|
|
@ -1440,7 +1443,7 @@ class DFRN
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
* @todo Find good type-hints for all parameter
|
* @todo Find good type-hints for all parameter
|
||||||
*/
|
*/
|
||||||
private static function processRelocation($xpath, $relocation, $importer)
|
private static function processRelocation($xpath, $relocation, array $importer): bool
|
||||||
{
|
{
|
||||||
Logger::notice("Processing relocations");
|
Logger::notice("Processing relocations");
|
||||||
|
|
||||||
|
|
@ -1510,7 +1513,7 @@ class DFRN
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @todo set proper type-hints (array?)
|
* @todo set proper type-hints (array?)
|
||||||
*/
|
*/
|
||||||
private static function updateContent($current, $item, $importer, $entrytype)
|
private static function updateContent(array $current, array $item, array $importer, int $entrytype)
|
||||||
{
|
{
|
||||||
$changed = false;
|
$changed = false;
|
||||||
|
|
||||||
|
|
@ -1542,7 +1545,7 @@ class DFRN
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
* @todo set proper type-hints (array?)
|
* @todo set proper type-hints (array?)
|
||||||
*/
|
*/
|
||||||
private static function getEntryType($importer, $item)
|
private static function getEntryType(array $importer, array $item): int
|
||||||
{
|
{
|
||||||
if ($item["thr-parent"] != $item["uri"]) {
|
if ($item["thr-parent"] != $item["uri"]) {
|
||||||
$community = false;
|
$community = false;
|
||||||
|
|
@ -1638,7 +1641,7 @@ class DFRN
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @todo set proper type-hints (array?)
|
* @todo set proper type-hints (array?)
|
||||||
*/
|
*/
|
||||||
private static function processVerbs($entrytype, $importer, &$item, &$is_like)
|
private static function processVerbs(int $entrytype, array $importer, array &$item, bool &$is_like)
|
||||||
{
|
{
|
||||||
Logger::info("Process verb ".$item["verb"]." and object-type ".$item["object-type"]." for entrytype ".$entrytype);
|
Logger::info("Process verb ".$item["verb"]." and object-type ".$item["object-type"]." for entrytype ".$entrytype);
|
||||||
|
|
||||||
|
|
@ -1734,7 +1737,7 @@ class DFRN
|
||||||
* @return void
|
* @return void
|
||||||
* @todo set proper type-hints
|
* @todo set proper type-hints
|
||||||
*/
|
*/
|
||||||
private static function parseLinks($links, &$item)
|
private static function parseLinks($links, array &$item)
|
||||||
{
|
{
|
||||||
$rel = "";
|
$rel = "";
|
||||||
$href = "";
|
$href = "";
|
||||||
|
|
@ -1772,7 +1775,7 @@ class DFRN
|
||||||
* @param array $imporer
|
* @param array $imporer
|
||||||
* @return boolean Is the message wanted?
|
* @return boolean Is the message wanted?
|
||||||
*/
|
*/
|
||||||
private static function isSolicitedMessage(array $item, array $importer)
|
private static function isSolicitedMessage(array $item, array $importer): bool
|
||||||
{
|
{
|
||||||
if (DBA::exists('contact', ["`nurl` = ? AND `uid` != ? AND `rel` IN (?, ?)",
|
if (DBA::exists('contact', ["`nurl` = ? AND `uid` != ? AND `rel` IN (?, ?)",
|
||||||
Strings::normaliseLink($item["author-link"]), 0, Contact::FRIEND, Contact::SHARING])) {
|
Strings::normaliseLink($item["author-link"]), 0, Contact::FRIEND, Contact::SHARING])) {
|
||||||
|
|
@ -1807,12 +1810,13 @@ class DFRN
|
||||||
* @param object $entry entry elements
|
* @param object $entry entry elements
|
||||||
* @param array $importer Record of the importer user mixed with contact of the content
|
* @param array $importer Record of the importer user mixed with contact of the content
|
||||||
* @param string $xml xml
|
* @param string $xml xml
|
||||||
|
* @param int $protocol Protocol
|
||||||
* @return void
|
* @return void
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
* @todo Add type-hints
|
* @todo Add type-hints
|
||||||
*/
|
*/
|
||||||
private static function processEntry($header, $xpath, $entry, $importer, $xml, $protocol)
|
private static function processEntry(array $header, $xpath, $entry, array $importer, string $xml, int $protocol)
|
||||||
{
|
{
|
||||||
Logger::notice("Processing entries");
|
Logger::notice("Processing entries");
|
||||||
|
|
||||||
|
|
@ -2070,6 +2074,9 @@ class DFRN
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Need to initialize variable, otherwise E_NOTICE will happen
|
||||||
|
$is_like = false;
|
||||||
|
|
||||||
if (!self::processVerbs($entrytype, $importer, $item, $is_like)) {
|
if (!self::processVerbs($entrytype, $importer, $item, $is_like)) {
|
||||||
Logger::info("Exiting because 'processVerbs' told us so");
|
Logger::info("Exiting because 'processVerbs' told us so");
|
||||||
return;
|
return;
|
||||||
|
|
@ -2163,7 +2170,7 @@ class DFRN
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
* @todo set proper type-hints
|
* @todo set proper type-hints
|
||||||
*/
|
*/
|
||||||
private static function processDeletion($xpath, $deletion, $importer)
|
private static function processDeletion($xpath, $deletion, array $importer)
|
||||||
{
|
{
|
||||||
Logger::notice("Processing deletions");
|
Logger::notice("Processing deletions");
|
||||||
$uri = null;
|
$uri = null;
|
||||||
|
|
@ -2224,9 +2231,8 @@ class DFRN
|
||||||
* @return integer Import status
|
* @return integer Import status
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
* @todo set proper type-hints
|
|
||||||
*/
|
*/
|
||||||
public static function import($xml, $importer, $protocol, $direction)
|
public static function import(string $xml, array $importer, int $protocol, int $direction): int
|
||||||
{
|
{
|
||||||
if ($xml == "") {
|
if ($xml == "") {
|
||||||
return 400;
|
return 400;
|
||||||
|
|
@ -2365,7 +2371,7 @@ class DFRN
|
||||||
*
|
*
|
||||||
* @return string activity verb
|
* @return string activity verb
|
||||||
*/
|
*/
|
||||||
private static function constructVerb(array $item)
|
private static function constructVerb(array $item): string
|
||||||
{
|
{
|
||||||
if ($item['verb']) {
|
if ($item['verb']) {
|
||||||
return $item['verb'];
|
return $item['verb'];
|
||||||
|
|
@ -2373,7 +2379,8 @@ class DFRN
|
||||||
return Activity::POST;
|
return Activity::POST;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function tgroupCheck($uid, $item)
|
// @TODO Documentation missing
|
||||||
|
private static function tgroupCheck(int $uid, array $item): bool
|
||||||
{
|
{
|
||||||
$mention = false;
|
$mention = false;
|
||||||
|
|
||||||
|
|
@ -2421,12 +2428,12 @@ class DFRN
|
||||||
* item is assumed to be up-to-date. If the timestamps are equal it
|
* item is assumed to be up-to-date. If the timestamps are equal it
|
||||||
* assumes the update has been seen before and should be ignored.
|
* assumes the update has been seen before and should be ignored.
|
||||||
*
|
*
|
||||||
* @param $existing
|
* @param array $existing
|
||||||
* @param $update
|
* @param array $update
|
||||||
* @return bool
|
* @return bool
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function isEditedTimestampNewer($existing, $update)
|
private static function isEditedTimestampNewer(array $existing, array $update): bool
|
||||||
{
|
{
|
||||||
if (empty($existing['edited'])) {
|
if (empty($existing['edited'])) {
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -2449,7 +2456,7 @@ class DFRN
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function isSupportedByContactUrl($url)
|
public static function isSupportedByContactUrl(string $url): bool
|
||||||
{
|
{
|
||||||
$probe = Probe::uri($url, Protocol::DFRN);
|
$probe = Probe::uri($url, Protocol::DFRN);
|
||||||
return $probe['network'] == Protocol::DFRN;
|
return $probe['network'] == Protocol::DFRN;
|
||||||
|
|
|
||||||
|
|
@ -74,9 +74,9 @@ class Diaspora
|
||||||
* @return array of relay servers
|
* @return array of relay servers
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function participantsForThread(array $item, array $contacts)
|
public static function participantsForThread(array $item, array $contacts): array
|
||||||
{
|
{
|
||||||
if (!in_array($item['private'], [Item::PUBLIC, Item::UNLISTED]) || in_array($item["verb"], [Activity::FOLLOW, Activity::TAG])) {
|
if (!in_array($item['private'], [Item::PUBLIC, Item::UNLISTED]) || in_array($item['verb'], [Activity::FOLLOW, Activity::TAG])) {
|
||||||
Logger::info('Item is private or a participation request. It will not be relayed', ['guid' => $item['guid'], 'private' => $item['private'], 'verb' => $item['verb']]);
|
Logger::info('Item is private or a participation request. It will not be relayed', ['guid' => $item['guid'], 'private' => $item['private'], 'verb' => $item['verb']]);
|
||||||
return $contacts;
|
return $contacts;
|
||||||
}
|
}
|
||||||
|
|
@ -114,11 +114,11 @@ class Diaspora
|
||||||
*
|
*
|
||||||
* @param string $envelope The magic envelope
|
* @param string $envelope The magic envelope
|
||||||
*
|
*
|
||||||
* @return string verified data
|
* @return string|bool verified data or false on error
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
private static function verifyMagicEnvelope($envelope)
|
private static function verifyMagicEnvelope(string $envelope)
|
||||||
{
|
{
|
||||||
$basedom = XML::parseString($envelope, true);
|
$basedom = XML::parseString($envelope, true);
|
||||||
|
|
||||||
|
|
@ -145,14 +145,14 @@ class Diaspora
|
||||||
|
|
||||||
$sig = Strings::base64UrlDecode($children->sig);
|
$sig = Strings::base64UrlDecode($children->sig);
|
||||||
$key_id = $children->sig->attributes()->key_id[0];
|
$key_id = $children->sig->attributes()->key_id[0];
|
||||||
if ($key_id != "") {
|
if ($key_id != '') {
|
||||||
$handle = Strings::base64UrlDecode($key_id);
|
$handle = Strings::base64UrlDecode($key_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
$b64url_data = Strings::base64UrlEncode($data);
|
$b64url_data = Strings::base64UrlEncode($data);
|
||||||
$msg = str_replace(["\n", "\r", " ", "\t"], ["", "", "", ""], $b64url_data);
|
$msg = str_replace(["\n", "\r", " ", "\t"], ['', '', '', ''], $b64url_data);
|
||||||
|
|
||||||
$signable_data = $msg.".".Strings::base64UrlEncode($type).".".Strings::base64UrlEncode($encoding).".".Strings::base64UrlEncode($alg);
|
$signable_data = $msg . '.' . Strings::base64UrlEncode($type) . '.' . Strings::base64UrlEncode($encoding) . '.' . Strings::base64UrlEncode($alg);
|
||||||
|
|
||||||
if ($handle == '') {
|
if ($handle == '') {
|
||||||
Logger::notice('No author could be decoded. Discarding. Message: ' . $envelope);
|
Logger::notice('No author could be decoded. Discarding. Message: ' . $envelope);
|
||||||
|
|
@ -183,7 +183,7 @@ class Diaspora
|
||||||
*
|
*
|
||||||
* @return string encrypted data
|
* @return string encrypted data
|
||||||
*/
|
*/
|
||||||
private static function aesEncrypt($key, $iv, $data)
|
private static function aesEncrypt(string $key, string $iv, string $data): string
|
||||||
{
|
{
|
||||||
return openssl_encrypt($data, 'aes-256-cbc', str_pad($key, 32, "\0"), OPENSSL_RAW_DATA, str_pad($iv, 16, "\0"));
|
return openssl_encrypt($data, 'aes-256-cbc', str_pad($key, 32, "\0"), OPENSSL_RAW_DATA, str_pad($iv, 16, "\0"));
|
||||||
}
|
}
|
||||||
|
|
@ -197,19 +197,19 @@ class Diaspora
|
||||||
*
|
*
|
||||||
* @return string decrypted data
|
* @return string decrypted data
|
||||||
*/
|
*/
|
||||||
private static function aesDecrypt($key, $iv, $encrypted)
|
private static function aesDecrypt(string $key, string $iv, string $encrypted): string
|
||||||
{
|
{
|
||||||
return openssl_decrypt($encrypted, 'aes-256-cbc', str_pad($key, 32, "\0"), OPENSSL_RAW_DATA, str_pad($iv, 16, "\0"));
|
return openssl_decrypt($encrypted, 'aes-256-cbc', str_pad($key, 32, "\0"), OPENSSL_RAW_DATA, str_pad($iv, 16, "\0"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decodes incoming Diaspora message in the new format
|
* Decodes incoming Diaspora message in the new format. This method returns false on an error.
|
||||||
*
|
*
|
||||||
* @param string $raw raw post message
|
* @param string $raw raw post message
|
||||||
* @param string $privKey The private key of the importer
|
* @param string $privKey The private key of the importer
|
||||||
* @param boolean $no_exit Don't do an http exit on error
|
* @param boolean $no_exit Don't do an http exit on error
|
||||||
*
|
*
|
||||||
* @return array
|
* @return bool|array
|
||||||
* 'message' -> decoded Diaspora XML message
|
* 'message' -> decoded Diaspora XML message
|
||||||
* 'author' -> author diaspora handle
|
* 'author' -> author diaspora handle
|
||||||
* 'key' -> author public key (converted to pkcs#8)
|
* 'key' -> author public key (converted to pkcs#8)
|
||||||
|
|
@ -260,13 +260,13 @@ class Diaspora
|
||||||
$base = $basedom->children(ActivityNamespace::SALMON_ME);
|
$base = $basedom->children(ActivityNamespace::SALMON_ME);
|
||||||
|
|
||||||
// Not sure if this cleaning is needed
|
// Not sure if this cleaning is needed
|
||||||
$data = str_replace([" ", "\t", "\r", "\n"], ["", "", "", ""], $base->data);
|
$data = str_replace([" ", "\t", "\r", "\n"], ['', '', '', ''], $base->data);
|
||||||
|
|
||||||
// Build the signed data
|
// Build the signed data
|
||||||
$type = $base->data[0]->attributes()->type[0];
|
$type = $base->data[0]->attributes()->type[0];
|
||||||
$encoding = $base->encoding;
|
$encoding = $base->encoding;
|
||||||
$alg = $base->alg;
|
$alg = $base->alg;
|
||||||
$signed_data = $data.'.'.Strings::base64UrlEncode($type).'.'.Strings::base64UrlEncode($encoding).'.'.Strings::base64UrlEncode($alg);
|
$signed_data = $data . '.' . Strings::base64UrlEncode($type) . '.' . Strings::base64UrlEncode($encoding) . '.' . Strings::base64UrlEncode($alg);
|
||||||
|
|
||||||
// This is the signature
|
// This is the signature
|
||||||
$signature = Strings::base64UrlDecode($base->sig);
|
$signature = Strings::base64UrlDecode($base->sig);
|
||||||
|
|
@ -303,9 +303,11 @@ class Diaspora
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ['message' => (string)Strings::base64UrlDecode($base->data),
|
return [
|
||||||
|
'message' => (string)Strings::base64UrlDecode($base->data),
|
||||||
'author' => XML::unescape($author_addr),
|
'author' => XML::unescape($author_addr),
|
||||||
'key' => (string)$key];
|
'key' => (string)$key
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -394,7 +396,7 @@ class Diaspora
|
||||||
// unpack the data
|
// unpack the data
|
||||||
|
|
||||||
// strip whitespace so our data element will return to one big base64 blob
|
// strip whitespace so our data element will return to one big base64 blob
|
||||||
$data = str_replace([" ", "\t", "\r", "\n"], ["", "", "", ""], $base->data);
|
$data = str_replace([" ", "\t", "\r", "\n"], ['', '', '', ''], $base->data);
|
||||||
|
|
||||||
|
|
||||||
// stash away some other stuff for later
|
// stash away some other stuff for later
|
||||||
|
|
@ -445,9 +447,11 @@ class Diaspora
|
||||||
|
|
||||||
Logger::notice('Message verified.');
|
Logger::notice('Message verified.');
|
||||||
|
|
||||||
return ['message' => (string)$inner_decrypted,
|
return [
|
||||||
|
'message' => (string)$inner_decrypted,
|
||||||
'author' => XML::unescape($author_link),
|
'author' => XML::unescape($author_link),
|
||||||
'key' => (string)$key];
|
'key' => (string)$key
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -457,11 +461,11 @@ class Diaspora
|
||||||
* @param array $msg The post that will be dispatched
|
* @param array $msg The post that will be dispatched
|
||||||
* @param int $direction Indicates if the message had been fetched or pushed (self::PUSHED, self::FETCHED, self::FORCED_FETCH)
|
* @param int $direction Indicates if the message had been fetched or pushed (self::PUSHED, self::FETCHED, self::FORCED_FETCH)
|
||||||
*
|
*
|
||||||
* @return int The message id of the generated message, "true" or "false" if there was an error
|
* @return int|bool The message id of the generated message, "true" or "false" if there was an error
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function dispatchPublic($msg, int $direction)
|
public static function dispatchPublic(array $msg, int $direction)
|
||||||
{
|
{
|
||||||
$enabled = intval(DI::config()->get("system", "diaspora_enabled"));
|
$enabled = intval(DI::config()->get("system", "diaspora_enabled"));
|
||||||
if (!$enabled) {
|
if (!$enabled) {
|
||||||
|
|
@ -474,7 +478,10 @@ class Diaspora
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$importer = ["uid" => 0, "page-flags" => User::PAGE_FLAGS_FREELOVE];
|
$importer = [
|
||||||
|
'uid' => 0,
|
||||||
|
'page-flags' => User::PAGE_FLAGS_FREELOVE
|
||||||
|
];
|
||||||
$success = self::dispatch($importer, $msg, $fields, $direction);
|
$success = self::dispatch($importer, $msg, $fields, $direction);
|
||||||
|
|
||||||
return $success;
|
return $success;
|
||||||
|
|
@ -488,15 +495,15 @@ class Diaspora
|
||||||
* @param SimpleXMLElement $fields SimpleXML object that contains the message
|
* @param SimpleXMLElement $fields SimpleXML object that contains the message
|
||||||
* @param int $direction Indicates if the message had been fetched or pushed (self::PUSHED, self::FETCHED, self::FORCED_FETCH)
|
* @param int $direction Indicates if the message had been fetched or pushed (self::PUSHED, self::FETCHED, self::FORCED_FETCH)
|
||||||
*
|
*
|
||||||
* @return int The message id of the generated message, "true" or "false" if there was an error
|
* @return int|bool The message id of the generated message, "true" or "false" if there was an error
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function dispatch(array $importer, $msg, SimpleXMLElement $fields = null, int $direction = self::PUSHED)
|
public static function dispatch(array $importer, array $msg, SimpleXMLElement $fields = null, int $direction = self::PUSHED)
|
||||||
{
|
{
|
||||||
// The sender is the handle of the contact that sent the message.
|
// The sender is the handle of the contact that sent the message.
|
||||||
// This will often be different with relayed messages (for example "like" and "comment")
|
// This will often be different with relayed messages (for example "like" and "comment")
|
||||||
$sender = $msg["author"];
|
$sender = $msg['author'];
|
||||||
|
|
||||||
// This is only needed for private postings since this is already done for public ones before
|
// This is only needed for private postings since this is already done for public ones before
|
||||||
if (is_null($fields)) {
|
if (is_null($fields)) {
|
||||||
|
|
@ -511,77 +518,77 @@ class Diaspora
|
||||||
|
|
||||||
$type = $fields->getName();
|
$type = $fields->getName();
|
||||||
|
|
||||||
Logger::info('Received message', ['type' => $type, 'sender' => $sender, 'user' => $importer["uid"]]);
|
Logger::info('Received message', ['type' => $type, 'sender' => $sender, 'user' => $importer['uid']]);
|
||||||
|
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case "account_migration":
|
case 'account_migration':
|
||||||
if (!$private) {
|
if (!$private) {
|
||||||
Logger::notice('Message with type ' . $type . ' is not private, quitting.');
|
Logger::notice('Message with type ' . $type . ' is not private, quitting.');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return self::receiveAccountMigration($importer, $fields);
|
return self::receiveAccountMigration($importer, $fields);
|
||||||
|
|
||||||
case "account_deletion":
|
case 'account_deletion':
|
||||||
return self::receiveAccountDeletion($fields);
|
return self::receiveAccountDeletion($fields);
|
||||||
|
|
||||||
case "comment":
|
case 'comment':
|
||||||
return self::receiveComment($importer, $sender, $fields, $msg["message"], $direction);
|
return self::receiveComment($importer, $sender, $fields, $msg['message'], $direction);
|
||||||
|
|
||||||
case "contact":
|
case 'contact':
|
||||||
if (!$private) {
|
if (!$private) {
|
||||||
Logger::notice('Message with type ' . $type . ' is not private, quitting.');
|
Logger::notice('Message with type ' . $type . ' is not private, quitting.');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return self::receiveContactRequest($importer, $fields);
|
return self::receiveContactRequest($importer, $fields);
|
||||||
|
|
||||||
case "conversation":
|
case 'conversation':
|
||||||
if (!$private) {
|
if (!$private) {
|
||||||
Logger::notice('Message with type ' . $type . ' is not private, quitting.');
|
Logger::notice('Message with type ' . $type . ' is not private, quitting.');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return self::receiveConversation($importer, $msg, $fields);
|
return self::receiveConversation($importer, $msg, $fields);
|
||||||
|
|
||||||
case "like":
|
case 'like':
|
||||||
return self::receiveLike($importer, $sender, $fields, $direction);
|
return self::receiveLike($importer, $sender, $fields, $direction);
|
||||||
|
|
||||||
case "message":
|
case 'message':
|
||||||
if (!$private) {
|
if (!$private) {
|
||||||
Logger::notice('Message with type ' . $type . ' is not private, quitting.');
|
Logger::notice('Message with type ' . $type . ' is not private, quitting.');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return self::receiveMessage($importer, $fields);
|
return self::receiveMessage($importer, $fields);
|
||||||
|
|
||||||
case "participation":
|
case 'participation':
|
||||||
if (!$private) {
|
if (!$private) {
|
||||||
Logger::notice('Message with type ' . $type . ' is not private, quitting.');
|
Logger::notice('Message with type ' . $type . ' is not private, quitting.');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return self::receiveParticipation($importer, $fields, $direction);
|
return self::receiveParticipation($importer, $fields, $direction);
|
||||||
|
|
||||||
case "photo": // Not implemented
|
case 'photo': // Not implemented
|
||||||
return self::receivePhoto($importer, $fields);
|
return self::receivePhoto($importer, $fields);
|
||||||
|
|
||||||
case "poll_participation": // Not implemented
|
case 'poll_participation': // Not implemented
|
||||||
return self::receivePollParticipation($importer, $fields);
|
return self::receivePollParticipation($importer, $fields);
|
||||||
|
|
||||||
case "profile":
|
case 'profile':
|
||||||
if (!$private) {
|
if (!$private) {
|
||||||
Logger::notice('Message with type ' . $type . ' is not private, quitting.');
|
Logger::notice('Message with type ' . $type . ' is not private, quitting.');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return self::receiveProfile($importer, $fields);
|
return self::receiveProfile($importer, $fields);
|
||||||
|
|
||||||
case "reshare":
|
case 'reshare':
|
||||||
return self::receiveReshare($importer, $fields, $msg["message"], $direction);
|
return self::receiveReshare($importer, $fields, $msg['message'], $direction);
|
||||||
|
|
||||||
case "retraction":
|
case 'retraction':
|
||||||
return self::receiveRetraction($importer, $sender, $fields);
|
return self::receiveRetraction($importer, $sender, $fields);
|
||||||
|
|
||||||
case "status_message":
|
case 'status_message':
|
||||||
return self::receiveStatusMessage($importer, $fields, $msg["message"], $direction);
|
return self::receiveStatusMessage($importer, $fields, $msg['message'], $direction);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Logger::notice("Unknown message type ".$type);
|
Logger::notice("Unknown message type " . $type);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -598,9 +605,9 @@ class Diaspora
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
private static function validPosting($msg)
|
private static function validPosting(array $msg)
|
||||||
{
|
{
|
||||||
$data = XML::parseString($msg["message"]);
|
$data = XML::parseString($msg['message']);
|
||||||
|
|
||||||
if (!is_object($data)) {
|
if (!is_object($data)) {
|
||||||
Logger::info('No valid XML', ['message' => $msg['message']]);
|
Logger::info('No valid XML', ['message' => $msg['message']]);
|
||||||
|
|
@ -608,7 +615,7 @@ class Diaspora
|
||||||
}
|
}
|
||||||
|
|
||||||
// Is this the new or the old version?
|
// Is this the new or the old version?
|
||||||
if ($data->getName() == "XML") {
|
if ($data->getName() == 'XML') {
|
||||||
$oldXML = true;
|
$oldXML = true;
|
||||||
foreach ($data->post->children() as $child) {
|
foreach ($data->post->children() as $child) {
|
||||||
$element = $child;
|
$element = $child;
|
||||||
|
|
@ -621,106 +628,106 @@ class Diaspora
|
||||||
$type = $element->getName();
|
$type = $element->getName();
|
||||||
$orig_type = $type;
|
$orig_type = $type;
|
||||||
|
|
||||||
Logger::debug("Got message type ".$type.": ".$msg["message"]);
|
Logger::debug("Got message type " . $type . ": " . $msg['message']);
|
||||||
|
|
||||||
// All retractions are handled identically from now on.
|
// All retractions are handled identically from now on.
|
||||||
// In the new version there will only be "retraction".
|
// In the new version there will only be "retraction".
|
||||||
if (in_array($type, ["signed_retraction", "relayable_retraction"]))
|
if (in_array($type, ['signed_retraction', 'relayable_retraction']))
|
||||||
$type = "retraction";
|
$type = 'retraction';
|
||||||
|
|
||||||
if ($type == "request") {
|
if ($type == 'request') {
|
||||||
$type = "contact";
|
$type = 'contact';
|
||||||
}
|
}
|
||||||
|
|
||||||
$fields = new SimpleXMLElement("<".$type."/>");
|
$fields = new SimpleXMLElement('<' . $type . '/>');
|
||||||
|
|
||||||
$signed_data = "";
|
$signed_data = '';
|
||||||
$author_signature = null;
|
$author_signature = null;
|
||||||
$parent_author_signature = null;
|
$parent_author_signature = null;
|
||||||
|
|
||||||
foreach ($element->children() as $fieldname => $entry) {
|
foreach ($element->children() as $fieldname => $entry) {
|
||||||
if ($oldXML) {
|
if ($oldXML) {
|
||||||
// Translation for the old XML structure
|
// Translation for the old XML structure
|
||||||
if ($fieldname == "diaspora_handle") {
|
if ($fieldname == 'diaspora_handle') {
|
||||||
$fieldname = "author";
|
$fieldname = 'author';
|
||||||
}
|
}
|
||||||
if ($fieldname == "participant_handles") {
|
if ($fieldname == 'participant_handles') {
|
||||||
$fieldname = "participants";
|
$fieldname = 'participants';
|
||||||
}
|
}
|
||||||
if (in_array($type, ["like", "participation"])) {
|
if (in_array($type, ['like', 'participation'])) {
|
||||||
if ($fieldname == "target_type") {
|
if ($fieldname == 'target_type') {
|
||||||
$fieldname = "parent_type";
|
$fieldname = 'parent_type';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($fieldname == "sender_handle") {
|
if ($fieldname == 'sender_handle') {
|
||||||
$fieldname = "author";
|
$fieldname = 'author';
|
||||||
}
|
}
|
||||||
if ($fieldname == "recipient_handle") {
|
if ($fieldname == 'recipient_handle') {
|
||||||
$fieldname = "recipient";
|
$fieldname = 'recipient';
|
||||||
}
|
}
|
||||||
if ($fieldname == "root_diaspora_id") {
|
if ($fieldname == 'root_diaspora_id') {
|
||||||
$fieldname = "root_author";
|
$fieldname = 'root_author';
|
||||||
}
|
}
|
||||||
if ($type == "status_message") {
|
if ($type == 'status_message') {
|
||||||
if ($fieldname == "raw_message") {
|
if ($fieldname == 'raw_message') {
|
||||||
$fieldname = "text";
|
$fieldname = 'text';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($type == "retraction") {
|
if ($type == 'retraction') {
|
||||||
if ($fieldname == "post_guid") {
|
if ($fieldname == 'post_guid') {
|
||||||
$fieldname = "target_guid";
|
$fieldname = 'target_guid';
|
||||||
}
|
}
|
||||||
if ($fieldname == "type") {
|
if ($fieldname == 'type') {
|
||||||
$fieldname = "target_type";
|
$fieldname = 'target_type';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($fieldname == "author_signature") && ($entry != "")) {
|
if (($fieldname == 'author_signature') && ($entry != '')) {
|
||||||
$author_signature = base64_decode($entry);
|
$author_signature = base64_decode($entry);
|
||||||
} elseif (($fieldname == "parent_author_signature") && ($entry != "")) {
|
} elseif (($fieldname == 'parent_author_signature') && ($entry != '')) {
|
||||||
$parent_author_signature = base64_decode($entry);
|
$parent_author_signature = base64_decode($entry);
|
||||||
} elseif (!in_array($fieldname, ["author_signature", "parent_author_signature", "target_author_signature"])) {
|
} elseif (!in_array($fieldname, ['author_signature', 'parent_author_signature', 'target_author_signature'])) {
|
||||||
if ($signed_data != "") {
|
if ($signed_data != '') {
|
||||||
$signed_data .= ";";
|
$signed_data .= ';';
|
||||||
}
|
}
|
||||||
|
|
||||||
$signed_data .= $entry;
|
$signed_data .= $entry;
|
||||||
}
|
}
|
||||||
if (!in_array($fieldname, ["parent_author_signature", "target_author_signature"])
|
if (!in_array($fieldname, ['parent_author_signature', 'target_author_signature'])
|
||||||
|| ($orig_type == "relayable_retraction")
|
|| ($orig_type == 'relayable_retraction')
|
||||||
) {
|
) {
|
||||||
XML::copy($entry, $fields, $fieldname);
|
XML::copy($entry, $fields, $fieldname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is something that shouldn't happen at all.
|
// This is something that shouldn't happen at all.
|
||||||
if (in_array($type, ["status_message", "reshare", "profile"])) {
|
if (in_array($type, ['status_message', 'reshare', 'profile'])) {
|
||||||
if ($msg["author"] != $fields->author) {
|
if ($msg['author'] != $fields->author) {
|
||||||
Logger::notice("Message handle is not the same as envelope sender. Quitting this message.");
|
Logger::notice("Message handle is not the same as envelope sender. Quitting this message.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only some message types have signatures. So we quit here for the other types.
|
// Only some message types have signatures. So we quit here for the other types.
|
||||||
if (!in_array($type, ["comment", "like"])) {
|
if (!in_array($type, ['comment', 'like'])) {
|
||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
// No author_signature? This is a must, so we quit.
|
// No author_signature? This is a must, so we quit.
|
||||||
if (!isset($author_signature)) {
|
if (!isset($author_signature)) {
|
||||||
Logger::info("No author signature for type ".$type." - Message: ".$msg["message"]);
|
Logger::info("No author signature for type " . $type . " - Message: " . $msg['message']);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($parent_author_signature)) {
|
if (isset($parent_author_signature)) {
|
||||||
$key = self::key($msg["author"]);
|
$key = self::key($msg['author']);
|
||||||
if (empty($key)) {
|
if (empty($key)) {
|
||||||
Logger::info('No key found for parent', ['author' => $msg["author"]]);
|
Logger::info('No key found for parent', ['author' => $msg['author']]);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Crypto::rsaVerify($signed_data, $parent_author_signature, $key, "sha256")) {
|
if (!Crypto::rsaVerify($signed_data, $parent_author_signature, $key, 'sha256')) {
|
||||||
Logger::info("No valid parent author signature for parent author ".$msg["author"]. " in type ".$type." - signed data: ".$signed_data." - Message: ".$msg["message"]." - Signature ".$parent_author_signature);
|
Logger::info("No valid parent author signature for parent author " . $msg['author'] . " in type " . $type . " - signed data: " . $signed_data . " - Message: " . $msg['message'] . " - Signature " . $parent_author_signature);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -731,8 +738,8 @@ class Diaspora
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Crypto::rsaVerify($signed_data, $author_signature, $key, "sha256")) {
|
if (!Crypto::rsaVerify($signed_data, $author_signature, $key, 'sha256')) {
|
||||||
Logger::info("No valid author signature for author ".$fields->author. " in type ".$type." - signed data: ".$signed_data." - Message: ".$msg["message"]." - Signature ".$author_signature);
|
Logger::info("No valid author signature for author " . $fields->author . " in type " . $type . " - signed data: " . $signed_data . " - Message: " . $msg['message'] . " - Signature " . $author_signature);
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
return $fields;
|
return $fields;
|
||||||
|
|
@ -748,18 +755,18 @@ class Diaspora
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
private static function key($handle)
|
private static function key(string $handle): string
|
||||||
{
|
{
|
||||||
$handle = strval($handle);
|
$handle = strval($handle);
|
||||||
|
|
||||||
Logger::notice("Fetching diaspora key for: ".$handle);
|
Logger::notice("Fetching diaspora key for: " . $handle);
|
||||||
|
|
||||||
$r = FContact::getByURL($handle);
|
$fcontact = FContact::getByURL($handle);
|
||||||
if ($r) {
|
if ($fcontact) {
|
||||||
return $r["pubkey"];
|
return $fcontact['pubkey'];
|
||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -771,7 +778,7 @@ class Diaspora
|
||||||
* @return string the handle
|
* @return string the handle
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function handleFromContact($contact_id, $pcontact_id = 0)
|
private static function handleFromContact(int $contact_id, int $pcontact_id = 0): string
|
||||||
{
|
{
|
||||||
$handle = '';
|
$handle = '';
|
||||||
|
|
||||||
|
|
@ -804,7 +811,7 @@ class Diaspora
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
private static function contactByHandle($uid, $handle)
|
private static function contactByHandle(int $uid, string $handle): array
|
||||||
{
|
{
|
||||||
return Contact::getByURL($handle, null, [], $uid);
|
return Contact::getByURL($handle, null, [], $uid);
|
||||||
}
|
}
|
||||||
|
|
@ -818,7 +825,7 @@ class Diaspora
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function isSupportedByContactUrl($url, $update = null)
|
public static function isSupportedByContactUrl(string $url, $update = null)
|
||||||
{
|
{
|
||||||
return !empty(FContact::getByURL($url, $update));
|
return !empty(FContact::getByURL($url, $update));
|
||||||
}
|
}
|
||||||
|
|
@ -832,7 +839,7 @@ class Diaspora
|
||||||
*
|
*
|
||||||
* @return bool is the contact allowed to post?
|
* @return bool is the contact allowed to post?
|
||||||
*/
|
*/
|
||||||
private static function postAllow(array $importer, array $contact, $is_comment = false)
|
private static function postAllow(array $importer, array $contact, bool $is_comment = false): bool
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Perhaps we were already sharing with this person. Now they're sharing with us.
|
* Perhaps we were already sharing with this person. Now they're sharing with us.
|
||||||
|
|
@ -855,15 +862,15 @@ class Diaspora
|
||||||
if (Network::isUrlBlocked($contact['url'])) {
|
if (Network::isUrlBlocked($contact['url'])) {
|
||||||
return false;
|
return false;
|
||||||
// We don't seem to like that person
|
// We don't seem to like that person
|
||||||
} elseif ($contact["blocked"]) {
|
} elseif ($contact['blocked']) {
|
||||||
// Maybe blocked, don't accept.
|
// Maybe blocked, don't accept.
|
||||||
return false;
|
return false;
|
||||||
// We are following this person?
|
// We are following this person?
|
||||||
} elseif (($contact["rel"] == Contact::SHARING) || ($contact["rel"] == Contact::FRIEND)) {
|
} elseif (($contact['rel'] == Contact::SHARING) || ($contact['rel'] == Contact::FRIEND)) {
|
||||||
// Yes, then it is fine.
|
// Yes, then it is fine.
|
||||||
return true;
|
return true;
|
||||||
// Is the message a global user or a comment?
|
// Is the message a global user or a comment?
|
||||||
} elseif (($importer["uid"] == 0) || $is_comment) {
|
} elseif (($importer['uid'] == 0) || $is_comment) {
|
||||||
// Messages for the global users and comments are always accepted
|
// Messages for the global users and comments are always accepted
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -878,16 +885,16 @@ class Diaspora
|
||||||
* @param string $handle The checked handle in the format user@domain.tld
|
* @param string $handle The checked handle in the format user@domain.tld
|
||||||
* @param bool $is_comment Is the check for a comment?
|
* @param bool $is_comment Is the check for a comment?
|
||||||
*
|
*
|
||||||
* @return array The contact data
|
* @return array|bool The contact data or false on error
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function allowedContactByHandle(array $importer, $handle, $is_comment = false)
|
private static function allowedContactByHandle(array $importer, string $handle, bool $is_comment = false)
|
||||||
{
|
{
|
||||||
$contact = self::contactByHandle($importer["uid"], $handle);
|
$contact = self::contactByHandle($importer['uid'], $handle);
|
||||||
if (!$contact) {
|
if (!$contact) {
|
||||||
Logger::notice("A Contact for handle ".$handle." and user ".$importer["uid"]." was not found");
|
Logger::notice("A Contact for handle " . $handle . " and user " . $importer['uid'] . " was not found");
|
||||||
// If a contact isn't found, we accept it anyway if it is a comment
|
// If a contact isn't found, we accept it anyway if it is a comment
|
||||||
if ($is_comment && ($importer["uid"] != 0)) {
|
if ($is_comment && ($importer['uid'] != 0)) {
|
||||||
return self::contactByHandle(0, $handle);
|
return self::contactByHandle(0, $handle);
|
||||||
} elseif ($is_comment) {
|
} elseif ($is_comment) {
|
||||||
return $importer;
|
return $importer;
|
||||||
|
|
@ -897,7 +904,7 @@ class Diaspora
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!self::postAllow($importer, $contact, $is_comment)) {
|
if (!self::postAllow($importer, $contact, $is_comment)) {
|
||||||
Logger::notice("The handle: ".$handle." is not allowed to post to user ".$importer["uid"]);
|
Logger::notice("The handle: " . $handle . " is not allowed to post to user " . $importer['uid']);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return $contact;
|
return $contact;
|
||||||
|
|
@ -912,12 +919,12 @@ class Diaspora
|
||||||
* @return int|bool message id if the message already was stored into the system - or false.
|
* @return int|bool message id if the message already was stored into the system - or false.
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function messageExists($uid, $guid)
|
private static function messageExists(int $uid, string $guid)
|
||||||
{
|
{
|
||||||
$item = Post::selectFirst(['id'], ['uid' => $uid, 'guid' => $guid]);
|
$item = Post::selectFirst(['id'], ['uid' => $uid, 'guid' => $guid]);
|
||||||
if (DBA::isResult($item)) {
|
if (DBA::isResult($item)) {
|
||||||
Logger::notice("message ".$guid." already exists for user ".$uid);
|
Logger::notice("message " . $guid . " already exists for user " . $uid);
|
||||||
return $item["id"];
|
return $item['id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -931,13 +938,12 @@ class Diaspora
|
||||||
*/
|
*/
|
||||||
private static function fetchGuid(array $item)
|
private static function fetchGuid(array $item)
|
||||||
{
|
{
|
||||||
$expression = "=diaspora://.*?/post/([0-9A-Za-z\-_@.:]{15,254}[0-9A-Za-z])=ism";
|
|
||||||
preg_replace_callback(
|
preg_replace_callback(
|
||||||
$expression,
|
"=diaspora://.*?/post/([0-9A-Za-z\-_@.:]{15,254}[0-9A-Za-z])=ism",
|
||||||
function ($match) use ($item) {
|
function ($match) use ($item) {
|
||||||
self::fetchGuidSub($match, $item);
|
self::fetchGuidSub($match, $item);
|
||||||
},
|
},
|
||||||
$item["body"]
|
$item['body']
|
||||||
);
|
);
|
||||||
|
|
||||||
preg_replace_callback(
|
preg_replace_callback(
|
||||||
|
|
@ -945,7 +951,7 @@ class Diaspora
|
||||||
function ($match) use ($item) {
|
function ($match) use ($item) {
|
||||||
self::fetchGuidSub($match, $item);
|
self::fetchGuidSub($match, $item);
|
||||||
},
|
},
|
||||||
$item["body"]
|
$item['body']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -958,7 +964,7 @@ class Diaspora
|
||||||
*
|
*
|
||||||
* @return string the replaced string
|
* @return string the replaced string
|
||||||
*/
|
*/
|
||||||
public static function replacePeopleGuid($body, $author_link)
|
public static function replacePeopleGuid(string $body, string $author_link): string
|
||||||
{
|
{
|
||||||
$return = preg_replace_callback(
|
$return = preg_replace_callback(
|
||||||
"&\[url=/people/([^\[\]]*)\](.*)\[\/url\]&Usi",
|
"&\[url=/people/([^\[\]]*)\](.*)\[\/url\]&Usi",
|
||||||
|
|
@ -970,11 +976,11 @@ class Diaspora
|
||||||
$handle = FContact::getUrlByGuid($match[1]);
|
$handle = FContact::getUrlByGuid($match[1]);
|
||||||
|
|
||||||
if ($handle) {
|
if ($handle) {
|
||||||
$return = '@[url='.$handle.']'.$match[2].'[/url]';
|
$return = '@[url=' . $handle . ']' . $match[2] . '[/url]';
|
||||||
} else {
|
} else {
|
||||||
// No local match, restoring absolute remote URL from author scheme and host
|
// No local match, restoring absolute remote URL from author scheme and host
|
||||||
$author_url = parse_url($author_link);
|
$author_url = parse_url($author_link);
|
||||||
$return = '[url='.$author_url['scheme'].'://'.$author_url['host'].'/people/'.$match[1].']'.$match[2].'[/url]';
|
$return = '[url=' . $author_url['scheme'] . '://' . $author_url['host'] . '/people/' . $match[1] . ']' . $match[2] . '[/url]';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $return;
|
return $return;
|
||||||
|
|
@ -994,10 +1000,10 @@ class Diaspora
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
private static function fetchGuidSub($match, $item)
|
private static function fetchGuidSub(array $match, array $item)
|
||||||
{
|
{
|
||||||
if (!self::storeByGuid($match[1], $item["author-link"], true)) {
|
if (!self::storeByGuid($match[1], $item['author-link'], true)) {
|
||||||
self::storeByGuid($match[1], $item["owner-link"], true);
|
self::storeByGuid($match[1], $item['owner-link'], true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1008,21 +1014,21 @@ class Diaspora
|
||||||
* @param string $server The server address
|
* @param string $server The server address
|
||||||
* @param bool $force Forced fetch
|
* @param bool $force Forced fetch
|
||||||
*
|
*
|
||||||
* @return int the message id of the stored message or false
|
* @return int|bool the message id of the stored message or false
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
private static function storeByGuid($guid, $server, $force)
|
private static function storeByGuid(string $guid, string $server, bool $force)
|
||||||
{
|
{
|
||||||
$serverparts = parse_url($server);
|
$serverparts = parse_url($server);
|
||||||
|
|
||||||
if (empty($serverparts["host"]) || empty($serverparts["scheme"])) {
|
if (empty($serverparts['host']) || empty($serverparts['scheme'])) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$server = $serverparts["scheme"]."://".$serverparts["host"];
|
$server = $serverparts['scheme'] . '://' . $serverparts['host'];
|
||||||
|
|
||||||
Logger::info("Trying to fetch item ".$guid." from ".$server);
|
Logger::info("Trying to fetch item " . $guid . " from " . $server);
|
||||||
|
|
||||||
$msg = self::message($guid, $server);
|
$msg = self::message($guid, $server);
|
||||||
|
|
||||||
|
|
@ -1030,7 +1036,7 @@ class Diaspora
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger::info("Successfully fetched item ".$guid." from ".$server);
|
Logger::info("Successfully fetched item " . $guid . " from " . $server);
|
||||||
|
|
||||||
// Now call the dispatcher
|
// Now call the dispatcher
|
||||||
return self::dispatchPublic($msg, $force ? self::FORCED_FETCH : self::FETCHED);
|
return self::dispatchPublic($msg, $force ? self::FORCED_FETCH : self::FETCHED);
|
||||||
|
|
@ -1049,16 +1055,16 @@ class Diaspora
|
||||||
* 'key' => The public key of the author
|
* 'key' => The public key of the author
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function message($guid, $server, $level = 0)
|
public static function message(string $guid, string $server, int $level = 0)
|
||||||
{
|
{
|
||||||
if ($level > 5) {
|
if ($level > 5) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This will work for new Diaspora servers and Friendica servers from 3.5
|
// This will work for new Diaspora servers and Friendica servers from 3.5
|
||||||
$source_url = $server."/fetch/post/".urlencode($guid);
|
$source_url = $server . '/fetch/post/' . urlencode($guid);
|
||||||
|
|
||||||
Logger::info("Fetch post from ".$source_url);
|
Logger::info("Fetch post from " . $source_url);
|
||||||
|
|
||||||
$envelope = DI::httpClient()->fetch($source_url, HttpClientAccept::MAGIC);
|
$envelope = DI::httpClient()->fetch($source_url, HttpClientAccept::MAGIC);
|
||||||
if ($envelope) {
|
if ($envelope) {
|
||||||
|
|
@ -1098,7 +1104,7 @@ class Diaspora
|
||||||
// Fetch the author - for the old and the new Diaspora version
|
// Fetch the author - for the old and the new Diaspora version
|
||||||
if ($source_xml->post->status_message && $source_xml->post->status_message->diaspora_handle) {
|
if ($source_xml->post->status_message && $source_xml->post->status_message->diaspora_handle) {
|
||||||
$author = (string)$source_xml->post->status_message->diaspora_handle;
|
$author = (string)$source_xml->post->status_message->diaspora_handle;
|
||||||
} elseif ($source_xml->author && ($source_xml->getName() == "status_message")) {
|
} elseif ($source_xml->author && ($source_xml->getName() == 'status_message')) {
|
||||||
$author = (string)$source_xml->author;
|
$author = (string)$source_xml->author;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1108,26 +1114,27 @@ class Diaspora
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$msg = ["message" => $x, "author" => $author];
|
return [
|
||||||
|
'message' => $x,
|
||||||
$msg["key"] = self::key($msg["author"]);
|
'author' => $author,
|
||||||
|
'key' => self::key($author)
|
||||||
return $msg;
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetches an item with a given URL
|
* Fetches an item with a given URL
|
||||||
*
|
*
|
||||||
* @param string $url the message url
|
* @param string $url the message url
|
||||||
|
* @param int $uid User id
|
||||||
*
|
*
|
||||||
* @return int the message id of the stored message or false
|
* @return int|bool the message id of the stored message or false
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function fetchByURL($url, $uid = 0)
|
public static function fetchByURL(string $url, int $uid = 0)
|
||||||
{
|
{
|
||||||
// Check for Diaspora (and Friendica) typical paths
|
// Check for Diaspora (and Friendica) typical paths
|
||||||
if (!preg_match("=(https?://.+)/(?:posts|display|objects)/([a-zA-Z0-9-_@.:%]+[a-zA-Z0-9])=i", $url, $matches)) {
|
if (!preg_match('=(https?://.+)/(?:posts|display|objects)/([a-zA-Z0-9-_@.:%]+[a-zA-Z0-9])=i', $url, $matches)) {
|
||||||
Logger::info('Invalid url', ['url' => $url]);
|
Logger::info('Invalid url', ['url' => $url]);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -1162,10 +1169,10 @@ class Diaspora
|
||||||
* @param string $author The handle of the item
|
* @param string $author The handle of the item
|
||||||
* @param array $contact The contact of the item owner
|
* @param array $contact The contact of the item owner
|
||||||
*
|
*
|
||||||
* @return array the item record
|
* @return array|bool the item record or false on failure
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function parentItem($uid, $guid, $author, array $contact)
|
private static function parentItem(int $uid, string $guid, string $author, array $contact)
|
||||||
{
|
{
|
||||||
$fields = ['id', 'parent', 'body', 'wall', 'uri', 'guid', 'private', 'origin',
|
$fields = ['id', 'parent', 'body', 'wall', 'uri', 'guid', 'private', 'origin',
|
||||||
'author-name', 'author-link', 'author-avatar', 'gravity',
|
'author-name', 'author-link', 'author-avatar', 'gravity',
|
||||||
|
|
@ -1175,25 +1182,25 @@ class Diaspora
|
||||||
|
|
||||||
if (!DBA::isResult($item)) {
|
if (!DBA::isResult($item)) {
|
||||||
$person = FContact::getByURL($author);
|
$person = FContact::getByURL($author);
|
||||||
$result = self::storeByGuid($guid, $person["url"], false);
|
$result = self::storeByGuid($guid, $person['url'], false);
|
||||||
|
|
||||||
// We don't have an url for items that arrived at the public dispatcher
|
// We don't have an url for items that arrived at the public dispatcher
|
||||||
if (!$result && !empty($contact["url"])) {
|
if (!$result && !empty($contact['url'])) {
|
||||||
$result = self::storeByGuid($guid, $contact["url"], false);
|
$result = self::storeByGuid($guid, $contact['url'], false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
Logger::info("Fetched missing item ".$guid." - result: ".$result);
|
Logger::info("Fetched missing item " . $guid . " - result: " . $result);
|
||||||
|
|
||||||
$item = Post::selectFirst($fields, $condition);
|
$item = Post::selectFirst($fields, $condition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!DBA::isResult($item)) {
|
if (!DBA::isResult($item)) {
|
||||||
Logger::notice("parent item not found: parent: ".$guid." - user: ".$uid);
|
Logger::notice("parent item not found: parent: " . $guid . " - user: " . $uid);
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
Logger::notice("parent item found: parent: ".$guid." - user: ".$uid);
|
Logger::notice("parent item found: parent: " . $guid . " - user: " . $uid);
|
||||||
return $item;
|
return $item;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1210,19 +1217,22 @@ class Diaspora
|
||||||
* 'network' => network type
|
* 'network' => network type
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function authorContactByUrl($def_contact, $person, $uid)
|
private static function authorContactByUrl(array $def_contact, array $person, int $uid): array
|
||||||
{
|
{
|
||||||
$condition = ['nurl' => Strings::normaliseLink($person["url"]), 'uid' => $uid];
|
$condition = ['nurl' => Strings::normaliseLink($person['url']), 'uid' => $uid];
|
||||||
$contact = DBA::selectFirst('contact', ['id', 'network'], $condition);
|
$contact = DBA::selectFirst('contact', ['id', 'network'], $condition);
|
||||||
if (DBA::isResult($contact)) {
|
if (DBA::isResult($contact)) {
|
||||||
$cid = $contact["id"];
|
$cid = $contact['id'];
|
||||||
$network = $contact["network"];
|
$network = $contact['network'];
|
||||||
} else {
|
} else {
|
||||||
$cid = $def_contact["id"];
|
$cid = $def_contact['id'];
|
||||||
$network = Protocol::DIASPORA;
|
$network = Protocol::DIASPORA;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ["cid" => $cid, "network" => $network];
|
return [
|
||||||
|
'cid' => $cid,
|
||||||
|
'network' => $network
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1232,9 +1242,9 @@ class Diaspora
|
||||||
*
|
*
|
||||||
* @return bool is it a hubzilla server?
|
* @return bool is it a hubzilla server?
|
||||||
*/
|
*/
|
||||||
private static function isHubzilla($url)
|
private static function isHubzilla(string $url): bool
|
||||||
{
|
{
|
||||||
return(strstr($url, '/channel/'));
|
return strstr($url, '/channel/');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1248,7 +1258,7 @@ class Diaspora
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
private static function plink(string $addr, string $guid, string $parent_guid = '')
|
private static function plink(string $addr, string $guid, string $parent_guid = ''): string
|
||||||
{
|
{
|
||||||
$contact = Contact::getByURL($addr);
|
$contact = Contact::getByURL($addr);
|
||||||
if (empty($contact)) {
|
if (empty($contact)) {
|
||||||
|
|
@ -1306,30 +1316,30 @@ class Diaspora
|
||||||
* Receives account migration
|
* Receives account migration
|
||||||
*
|
*
|
||||||
* @param array $importer Array of the importer user
|
* @param array $importer Array of the importer user
|
||||||
* @param object $data The message object
|
* @param SimpleXMLElement $data The message object
|
||||||
*
|
*
|
||||||
* @return bool Success
|
* @return bool Success
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
private static function receiveAccountMigration(array $importer, $data)
|
private static function receiveAccountMigration(array $importer, SimpleXMLElement $data): bool
|
||||||
{
|
{
|
||||||
$old_handle = XML::unescape($data->author);
|
$old_handle = XML::unescape($data->author);
|
||||||
$new_handle = XML::unescape($data->profile->author);
|
$new_handle = XML::unescape($data->profile->author);
|
||||||
$signature = XML::unescape($data->signature);
|
$signature = XML::unescape($data->signature);
|
||||||
|
|
||||||
$contact = self::contactByHandle($importer["uid"], $old_handle);
|
$contact = self::contactByHandle($importer['uid'], $old_handle);
|
||||||
if (!$contact) {
|
if (!$contact) {
|
||||||
Logger::notice("cannot find contact for sender: ".$old_handle." and user ".$importer["uid"]);
|
Logger::notice("cannot find contact for sender: " . $old_handle . " and user " . $importer['uid']);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger::notice("Got migration for ".$old_handle.", to ".$new_handle." with user ".$importer["uid"]);
|
Logger::notice("Got migration for " . $old_handle . ", to " . $new_handle . " with user " . $importer['uid']);
|
||||||
|
|
||||||
// Check signature
|
// Check signature
|
||||||
$signed_text = 'AccountMigration:'.$old_handle.':'.$new_handle;
|
$signed_text = 'AccountMigration:' . $old_handle . ':' . $new_handle;
|
||||||
$key = self::key($old_handle);
|
$key = self::key($old_handle);
|
||||||
if (!Crypto::rsaVerify($signed_text, $signature, $key, "sha256")) {
|
if (!Crypto::rsaVerify($signed_text, $signature, $key, 'sha256')) {
|
||||||
Logger::notice('No valid signature for migration.');
|
Logger::notice('No valid signature for migration.');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -1340,15 +1350,21 @@ class Diaspora
|
||||||
// change the technical stuff in contact
|
// change the technical stuff in contact
|
||||||
$data = Probe::uri($new_handle);
|
$data = Probe::uri($new_handle);
|
||||||
if ($data['network'] == Protocol::PHANTOM) {
|
if ($data['network'] == Protocol::PHANTOM) {
|
||||||
Logger::notice('Account for '.$new_handle." couldn't be probed.");
|
Logger::notice("Account for " . $new_handle . " couldn't be probed.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$fields = ['url' => $data['url'], 'nurl' => Strings::normaliseLink($data['url']),
|
$fields = [
|
||||||
'name' => $data['name'], 'nick' => $data['nick'],
|
'url' => $data['url'],
|
||||||
'addr' => $data['addr'], 'batch' => $data['batch'],
|
'nurl' => Strings::normaliseLink($data['url']),
|
||||||
'notify' => $data['notify'], 'poll' => $data['poll'],
|
'name' => $data['name'],
|
||||||
'network' => $data['network']];
|
'nick' => $data['nick'],
|
||||||
|
'addr' => $data['addr'],
|
||||||
|
'batch' => $data['batch'],
|
||||||
|
'notify' => $data['notify'],
|
||||||
|
'poll' => $data['poll'],
|
||||||
|
'network' => $data['network']
|
||||||
|
];
|
||||||
|
|
||||||
Contact::update($fields, ['addr' => $old_handle]);
|
Contact::update($fields, ['addr' => $old_handle]);
|
||||||
|
|
||||||
|
|
@ -1360,18 +1376,18 @@ class Diaspora
|
||||||
/**
|
/**
|
||||||
* Processes an account deletion
|
* Processes an account deletion
|
||||||
*
|
*
|
||||||
* @param object $data The message object
|
* @param SimpleXMLElement $data The message object
|
||||||
*
|
*
|
||||||
* @return bool Success
|
* @return bool Success
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
private static function receiveAccountDeletion($data)
|
private static function receiveAccountDeletion(SimpleXMLElement $data): bool
|
||||||
{
|
{
|
||||||
$author = XML::unescape($data->author);
|
$author = XML::unescape($data->author);
|
||||||
|
|
||||||
$contacts = DBA::select('contact', ['id'], ['addr' => $author]);
|
$contacts = DBA::select('contact', ['id'], ['addr' => $author]);
|
||||||
while ($contact = DBA::fetch($contacts)) {
|
while ($contact = DBA::fetch($contacts)) {
|
||||||
Contact::remove($contact["id"]);
|
Contact::remove($contact['id']);
|
||||||
}
|
}
|
||||||
DBA::close($contacts);
|
DBA::close($contacts);
|
||||||
|
|
||||||
|
|
@ -1387,15 +1403,15 @@ class Diaspora
|
||||||
* @param string $guid Message guid
|
* @param string $guid Message guid
|
||||||
* @param boolean $onlyfound Only return uri when found in the database
|
* @param boolean $onlyfound Only return uri when found in the database
|
||||||
*
|
*
|
||||||
* @return string The constructed uri or the one from our database
|
* @return string The constructed uri or the one from our database or empty string on if $onlyfound is true
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
private static function getUriFromGuid($author, $guid, $onlyfound = false)
|
private static function getUriFromGuid(string $author, string $guid, bool $onlyfound = false): string
|
||||||
{
|
{
|
||||||
$item = Post::selectFirst(['uri'], ['guid' => $guid]);
|
$item = Post::selectFirst(['uri'], ['guid' => $guid]);
|
||||||
if (DBA::isResult($item)) {
|
if (DBA::isResult($item)) {
|
||||||
return $item["uri"];
|
return $item['uri'];
|
||||||
} elseif (!$onlyfound) {
|
} elseif (!$onlyfound) {
|
||||||
$person = FContact::getByURL($author);
|
$person = FContact::getByURL($author);
|
||||||
|
|
||||||
|
|
@ -1406,7 +1422,7 @@ class Diaspora
|
||||||
return $host_url . '/objects/' . $guid;
|
return $host_url . '/objects/' . $guid;
|
||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1448,7 +1464,7 @@ class Diaspora
|
||||||
*
|
*
|
||||||
* @param array $importer Array of the importer user
|
* @param array $importer Array of the importer user
|
||||||
* @param string $sender The sender of the message
|
* @param string $sender The sender of the message
|
||||||
* @param object $data The message object
|
* @param SimpleXMLElement $data The message object
|
||||||
* @param string $xml The original XML of the message
|
* @param string $xml The original XML of the message
|
||||||
* @param int $direction Indicates if the message had been fetched or pushed (self::PUSHED, self::FETCHED, self::FORCED_FETCH)
|
* @param int $direction Indicates if the message had been fetched or pushed (self::PUSHED, self::FETCHED, self::FORCED_FETCH)
|
||||||
*
|
*
|
||||||
|
|
@ -1456,7 +1472,7 @@ class Diaspora
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
private static function receiveComment(array $importer, $sender, $data, $xml, int $direction)
|
private static function receiveComment(array $importer, string $sender, SimpleXMLElement $data, string $xml, int $direction): bool
|
||||||
{
|
{
|
||||||
$author = XML::unescape($data->author);
|
$author = XML::unescape($data->author);
|
||||||
$guid = XML::unescape($data->guid);
|
$guid = XML::unescape($data->guid);
|
||||||
|
|
@ -1471,9 +1487,9 @@ class Diaspora
|
||||||
|
|
||||||
if (isset($data->thread_parent_guid)) {
|
if (isset($data->thread_parent_guid)) {
|
||||||
$thread_parent_guid = XML::unescape($data->thread_parent_guid);
|
$thread_parent_guid = XML::unescape($data->thread_parent_guid);
|
||||||
$thr_parent = self::getUriFromGuid("", $thread_parent_guid, true);
|
$thr_parent = self::getUriFromGuid('', $thread_parent_guid, true);
|
||||||
} else {
|
} else {
|
||||||
$thr_parent = "";
|
$thr_parent = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$contact = self::allowedContactByHandle($importer, $sender, true);
|
$contact = self::allowedContactByHandle($importer, $sender, true);
|
||||||
|
|
@ -1485,12 +1501,12 @@ class Diaspora
|
||||||
GServer::setProtocol($contact['gsid'], Post\DeliveryData::DIASPORA);
|
GServer::setProtocol($contact['gsid'], Post\DeliveryData::DIASPORA);
|
||||||
}
|
}
|
||||||
|
|
||||||
$message_id = self::messageExists($importer["uid"], $guid);
|
$message_id = self::messageExists($importer['uid'], $guid);
|
||||||
if ($message_id) {
|
if ($message_id) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$toplevel_parent_item = self::parentItem($importer["uid"], $parent_guid, $author, $contact);
|
$toplevel_parent_item = self::parentItem($importer['uid'], $parent_guid, $author, $contact);
|
||||||
if (!$toplevel_parent_item) {
|
if (!$toplevel_parent_item) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -1502,60 +1518,60 @@ class Diaspora
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fetch the contact id - if we know this contact
|
// Fetch the contact id - if we know this contact
|
||||||
$author_contact = self::authorContactByUrl($contact, $person, $importer["uid"]);
|
$author_contact = self::authorContactByUrl($contact, $person, $importer['uid']);
|
||||||
|
|
||||||
$datarray = [];
|
$datarray = [];
|
||||||
|
|
||||||
$datarray["uid"] = $importer["uid"];
|
$datarray['uid'] = $importer['uid'];
|
||||||
$datarray["contact-id"] = $author_contact["cid"];
|
$datarray['contact-id'] = $author_contact['cid'];
|
||||||
$datarray["network"] = $author_contact["network"];
|
$datarray['network'] = $author_contact['network'];
|
||||||
|
|
||||||
$datarray["author-link"] = $person["url"];
|
$datarray['author-link'] = $person['url'];
|
||||||
$datarray["author-id"] = Contact::getIdForURL($person["url"], 0);
|
$datarray['author-id'] = Contact::getIdForURL($person['url'], 0);
|
||||||
|
|
||||||
$datarray["owner-link"] = $contact["url"];
|
$datarray['owner-link'] = $contact['url'];
|
||||||
$datarray["owner-id"] = Contact::getIdForURL($contact["url"], 0);
|
$datarray['owner-id'] = Contact::getIdForURL($contact['url'], 0);
|
||||||
|
|
||||||
// Will be overwritten for sharing accounts in Item::insert
|
// Will be overwritten for sharing accounts in Item::insert
|
||||||
if (in_array($direction, [self::FETCHED, self::FORCED_FETCH])) {
|
if (in_array($direction, [self::FETCHED, self::FORCED_FETCH])) {
|
||||||
$datarray["post-reason"] = Item::PR_FETCHED;
|
$datarray['post-reason'] = Item::PR_FETCHED;
|
||||||
} elseif ($datarray["uid"] == 0) {
|
} elseif ($datarray['uid'] == 0) {
|
||||||
$datarray["post-reason"] = Item::PR_GLOBAL;
|
$datarray['post-reason'] = Item::PR_GLOBAL;
|
||||||
} else {
|
} else {
|
||||||
$datarray["post-reason"] = Item::PR_COMMENT;
|
$datarray['post-reason'] = Item::PR_COMMENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
$datarray["guid"] = $guid;
|
$datarray['guid'] = $guid;
|
||||||
$datarray["uri"] = self::getUriFromGuid($author, $guid);
|
$datarray['uri'] = self::getUriFromGuid($author, $guid);
|
||||||
$datarray['uri-id'] = ItemURI::insert(['uri' => $datarray['uri'], 'guid' => $datarray['guid']]);
|
$datarray['uri-id'] = ItemURI::insert(['uri' => $datarray['uri'], 'guid' => $datarray['guid']]);
|
||||||
|
|
||||||
$datarray["verb"] = Activity::POST;
|
$datarray['verb'] = Activity::POST;
|
||||||
$datarray["gravity"] = GRAVITY_COMMENT;
|
$datarray['gravity'] = GRAVITY_COMMENT;
|
||||||
|
|
||||||
$datarray['thr-parent'] = $thr_parent ?: $toplevel_parent_item['uri'];
|
$datarray['thr-parent'] = $thr_parent ?: $toplevel_parent_item['uri'];
|
||||||
|
|
||||||
$datarray["object-type"] = Activity\ObjectType::COMMENT;
|
$datarray['object-type'] = Activity\ObjectType::COMMENT;
|
||||||
$datarray["post-type"] = Item::PT_NOTE;
|
$datarray['post-type'] = Item::PT_NOTE;
|
||||||
|
|
||||||
$datarray["protocol"] = Conversation::PARCEL_DIASPORA;
|
$datarray['protocol'] = Conversation::PARCEL_DIASPORA;
|
||||||
$datarray["source"] = $xml;
|
$datarray['source'] = $xml;
|
||||||
$datarray["direction"] = in_array($direction, [self::FETCHED, self::FORCED_FETCH]) ? Conversation::PULL : Conversation::PUSH;
|
$datarray['direction'] = in_array($direction, [self::FETCHED, self::FORCED_FETCH]) ? Conversation::PULL : Conversation::PUSH;
|
||||||
|
|
||||||
$datarray["changed"] = $datarray["created"] = $datarray["edited"] = $created_at;
|
$datarray['changed'] = $datarray['created'] = $datarray['edited'] = $created_at;
|
||||||
|
|
||||||
$datarray["plink"] = self::plink($author, $guid, $toplevel_parent_item['guid']);
|
$datarray['plink'] = self::plink($author, $guid, $toplevel_parent_item['guid']);
|
||||||
$body = Markdown::toBBCode($text);
|
$body = Markdown::toBBCode($text);
|
||||||
|
|
||||||
$datarray["body"] = self::replacePeopleGuid($body, $person["url"]);
|
$datarray['body'] = self::replacePeopleGuid($body, $person['url']);
|
||||||
|
|
||||||
self::storeMentions($datarray['uri-id'], $text);
|
self::storeMentions($datarray['uri-id'], $text);
|
||||||
Tag::storeRawTagsFromBody($datarray['uri-id'], $datarray["body"]);
|
Tag::storeRawTagsFromBody($datarray['uri-id'], $datarray['body']);
|
||||||
|
|
||||||
self::fetchGuid($datarray);
|
self::fetchGuid($datarray);
|
||||||
|
|
||||||
// If we are the origin of the parent we store the original data.
|
// If we are the origin of the parent we store the original data.
|
||||||
// We notify our followers during the item storage.
|
// We notify our followers during the item storage.
|
||||||
if ($toplevel_parent_item["origin"]) {
|
if ($toplevel_parent_item['origin']) {
|
||||||
$datarray['diaspora_signed_text'] = json_encode($data);
|
$datarray['diaspora_signed_text'] = json_encode($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1571,7 +1587,7 @@ class Diaspora
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($message_id) {
|
if ($message_id) {
|
||||||
Logger::info("Stored comment ".$datarray["guid"]." with message id ".$message_id);
|
Logger::info("Stored comment " . $datarray['guid'] . " with message id " . $message_id);
|
||||||
if ($datarray['uid'] == 0) {
|
if ($datarray['uid'] == 0) {
|
||||||
Item::distribute($message_id, json_encode($data));
|
Item::distribute($message_id, json_encode($data));
|
||||||
}
|
}
|
||||||
|
|
@ -1585,15 +1601,16 @@ class Diaspora
|
||||||
*
|
*
|
||||||
* @param array $importer Array of the importer user
|
* @param array $importer Array of the importer user
|
||||||
* @param array $contact The contact of the message
|
* @param array $contact The contact of the message
|
||||||
* @param object $data The message object
|
* @param SimpleXMLElement $data The message object
|
||||||
* @param array $msg Array of the processed message, author handle and key
|
* @param array $msg Array of the processed message, author handle and key
|
||||||
* @param object $mesg The private message
|
* @param object $mesg The private message
|
||||||
* @param array $conversation The conversation record to which this message belongs
|
* @param array $conversation The conversation record to which this message belongs
|
||||||
*
|
*
|
||||||
* @return bool "true" if it was successful
|
* @return bool "true" if it was successful
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
|
* @todo Find type-hint for $mesg and update documentation
|
||||||
*/
|
*/
|
||||||
private static function receiveConversationMessage(array $importer, array $contact, $data, $msg, $mesg, $conversation)
|
private static function receiveConversationMessage(array $importer, array $contact, SimpleXMLElement $data, array $msg, $mesg, array $conversation): bool
|
||||||
{
|
{
|
||||||
$author = XML::unescape($data->author);
|
$author = XML::unescape($data->author);
|
||||||
$guid = XML::unescape($data->guid);
|
$guid = XML::unescape($data->guid);
|
||||||
|
|
@ -1645,12 +1662,12 @@ class Diaspora
|
||||||
*
|
*
|
||||||
* @param array $importer Array of the importer user
|
* @param array $importer Array of the importer user
|
||||||
* @param array $msg Array of the processed message, author handle and key
|
* @param array $msg Array of the processed message, author handle and key
|
||||||
* @param object $data The message object
|
* @param SimpleXMLElement $data The message object
|
||||||
*
|
*
|
||||||
* @return bool Success
|
* @return bool Success
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function receiveConversation(array $importer, $msg, $data)
|
private static function receiveConversation(array $importer, array $msg, SimpleXMLElement $data)
|
||||||
{
|
{
|
||||||
$author = XML::unescape($data->author);
|
$author = XML::unescape($data->author);
|
||||||
$guid = XML::unescape($data->guid);
|
$guid = XML::unescape($data->guid);
|
||||||
|
|
@ -1665,7 +1682,7 @@ class Diaspora
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$contact = self::allowedContactByHandle($importer, $msg["author"], true);
|
$contact = self::allowedContactByHandle($importer, $msg['author'], true);
|
||||||
if (!$contact) {
|
if (!$contact) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -1674,7 +1691,7 @@ class Diaspora
|
||||||
GServer::setProtocol($contact['gsid'], Post\DeliveryData::DIASPORA);
|
GServer::setProtocol($contact['gsid'], Post\DeliveryData::DIASPORA);
|
||||||
}
|
}
|
||||||
|
|
||||||
$conversation = DBA::selectFirst('conv', [], ['uid' => $importer["uid"], 'guid' => $guid]);
|
$conversation = DBA::selectFirst('conv', [], ['uid' => $importer['uid'], 'guid' => $guid]);
|
||||||
if (!DBA::isResult($conversation)) {
|
if (!DBA::isResult($conversation)) {
|
||||||
$r = DBA::insert('conv', [
|
$r = DBA::insert('conv', [
|
||||||
'uid' => $importer['uid'],
|
'uid' => $importer['uid'],
|
||||||
|
|
@ -1685,7 +1702,7 @@ class Diaspora
|
||||||
'subject' => $subject,
|
'subject' => $subject,
|
||||||
'recips' => $participants]);
|
'recips' => $participants]);
|
||||||
if ($r) {
|
if ($r) {
|
||||||
$conversation = DBA::selectFirst('conv', [], ['uid' => $importer["uid"], 'guid' => $guid]);
|
$conversation = DBA::selectFirst('conv', [], ['uid' => $importer['uid'], 'guid' => $guid]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!$conversation) {
|
if (!$conversation) {
|
||||||
|
|
@ -1705,14 +1722,14 @@ class Diaspora
|
||||||
*
|
*
|
||||||
* @param array $importer Array of the importer user
|
* @param array $importer Array of the importer user
|
||||||
* @param string $sender The sender of the message
|
* @param string $sender The sender of the message
|
||||||
* @param object $data The message object
|
* @param SimpleXMLElement $data The message object
|
||||||
* @param int $direction Indicates if the message had been fetched or pushed (self::PUSHED, self::FETCHED, self::FORCED_FETCH)
|
* @param int $direction Indicates if the message had been fetched or pushed (self::PUSHED, self::FETCHED, self::FORCED_FETCH)
|
||||||
*
|
*
|
||||||
* @return int The message id of the generated like or "false" if there was an error
|
* @return bool Success or failure
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
private static function receiveLike(array $importer, $sender, $data, int $direction)
|
private static function receiveLike(array $importer, string $sender, SimpleXMLElement $data, int $direction): bool
|
||||||
{
|
{
|
||||||
$author = XML::unescape($data->author);
|
$author = XML::unescape($data->author);
|
||||||
$guid = XML::unescape($data->guid);
|
$guid = XML::unescape($data->guid);
|
||||||
|
|
@ -1722,7 +1739,7 @@ class Diaspora
|
||||||
|
|
||||||
// likes on comments aren't supported by Diaspora - only on posts
|
// likes on comments aren't supported by Diaspora - only on posts
|
||||||
// But maybe this will be supported in the future, so we will accept it.
|
// But maybe this will be supported in the future, so we will accept it.
|
||||||
if (!in_array($parent_type, ["Post", "Comment"])) {
|
if (!in_array($parent_type, ['Post', 'Comment'])) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1735,12 +1752,12 @@ class Diaspora
|
||||||
GServer::setProtocol($contact['gsid'], Post\DeliveryData::DIASPORA);
|
GServer::setProtocol($contact['gsid'], Post\DeliveryData::DIASPORA);
|
||||||
}
|
}
|
||||||
|
|
||||||
$message_id = self::messageExists($importer["uid"], $guid);
|
$message_id = self::messageExists($importer['uid'], $guid);
|
||||||
if ($message_id) {
|
if ($message_id) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$toplevel_parent_item = self::parentItem($importer["uid"], $parent_guid, $author, $contact);
|
$toplevel_parent_item = self::parentItem($importer['uid'], $parent_guid, $author, $contact);
|
||||||
if (!$toplevel_parent_item) {
|
if (!$toplevel_parent_item) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -1752,11 +1769,11 @@ class Diaspora
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fetch the contact id - if we know this contact
|
// Fetch the contact id - if we know this contact
|
||||||
$author_contact = self::authorContactByUrl($contact, $person, $importer["uid"]);
|
$author_contact = self::authorContactByUrl($contact, $person, $importer['uid']);
|
||||||
|
|
||||||
// "positive" = "false" would be a Dislike - wich isn't currently supported by Diaspora
|
// "positive" = "false" would be a Dislike - wich isn't currently supported by Diaspora
|
||||||
// We would accept this anyhow.
|
// We would accept this anyhow.
|
||||||
if ($positive == "true") {
|
if ($positive == 'true') {
|
||||||
$verb = Activity::LIKE;
|
$verb = Activity::LIKE;
|
||||||
} else {
|
} else {
|
||||||
$verb = Activity::DISLIKE;
|
$verb = Activity::DISLIKE;
|
||||||
|
|
@ -1764,36 +1781,36 @@ class Diaspora
|
||||||
|
|
||||||
$datarray = [];
|
$datarray = [];
|
||||||
|
|
||||||
$datarray["protocol"] = Conversation::PARCEL_DIASPORA;
|
$datarray['protocol'] = Conversation::PARCEL_DIASPORA;
|
||||||
$datarray["direction"] = in_array($direction, [self::FETCHED, self::FORCED_FETCH]) ? Conversation::PULL : Conversation::PUSH;
|
$datarray['direction'] = in_array($direction, [self::FETCHED, self::FORCED_FETCH]) ? Conversation::PULL : Conversation::PUSH;
|
||||||
|
|
||||||
$datarray["uid"] = $importer["uid"];
|
$datarray['uid'] = $importer['uid'];
|
||||||
$datarray["contact-id"] = $author_contact["cid"];
|
$datarray['contact-id'] = $author_contact['cid'];
|
||||||
$datarray["network"] = $author_contact["network"];
|
$datarray['network'] = $author_contact['network'];
|
||||||
|
|
||||||
$datarray["owner-link"] = $datarray["author-link"] = $person["url"];
|
$datarray['owner-link'] = $datarray['author-link'] = $person['url'];
|
||||||
$datarray["owner-id"] = $datarray["author-id"] = Contact::getIdForURL($person["url"], 0);
|
$datarray['owner-id'] = $datarray['author-id'] = Contact::getIdForURL($person['url'], 0);
|
||||||
|
|
||||||
$datarray["guid"] = $guid;
|
$datarray['guid'] = $guid;
|
||||||
$datarray["uri"] = self::getUriFromGuid($author, $guid);
|
$datarray['uri'] = self::getUriFromGuid($author, $guid);
|
||||||
|
|
||||||
$datarray["verb"] = $verb;
|
$datarray['verb'] = $verb;
|
||||||
$datarray["gravity"] = GRAVITY_ACTIVITY;
|
$datarray['gravity'] = GRAVITY_ACTIVITY;
|
||||||
$datarray['thr-parent'] = $toplevel_parent_item['uri'];
|
$datarray['thr-parent'] = $toplevel_parent_item['uri'];
|
||||||
|
|
||||||
$datarray["object-type"] = Activity\ObjectType::NOTE;
|
$datarray['object-type'] = Activity\ObjectType::NOTE;
|
||||||
|
|
||||||
$datarray["body"] = $verb;
|
$datarray['body'] = $verb;
|
||||||
|
|
||||||
// Diaspora doesn't provide a date for likes
|
// Diaspora doesn't provide a date for likes
|
||||||
$datarray["changed"] = $datarray["created"] = $datarray["edited"] = DateTimeFormat::utcNow();
|
$datarray['changed'] = $datarray['created'] = $datarray['edited'] = DateTimeFormat::utcNow();
|
||||||
|
|
||||||
// like on comments have the comment as parent. So we need to fetch the toplevel parent
|
// like on comments have the comment as parent. So we need to fetch the toplevel parent
|
||||||
if ($toplevel_parent_item['gravity'] != GRAVITY_PARENT) {
|
if ($toplevel_parent_item['gravity'] != GRAVITY_PARENT) {
|
||||||
$toplevel = Post::selectFirst(['origin'], ['id' => $toplevel_parent_item['parent']]);
|
$toplevel = Post::selectFirst(['origin'], ['id' => $toplevel_parent_item['parent']]);
|
||||||
$origin = $toplevel["origin"];
|
$origin = $toplevel['origin'];
|
||||||
} else {
|
} else {
|
||||||
$origin = $toplevel_parent_item["origin"];
|
$origin = $toplevel_parent_item['origin'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we are the origin of the parent we store the original data.
|
// If we are the origin of the parent we store the original data.
|
||||||
|
|
@ -1814,7 +1831,7 @@ class Diaspora
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($message_id) {
|
if ($message_id) {
|
||||||
Logger::info("Stored like ".$datarray["guid"]." with message id ".$message_id);
|
Logger::info("Stored like " . $datarray['guid'] . " with message id " . $message_id);
|
||||||
if ($datarray['uid'] == 0) {
|
if ($datarray['uid'] == 0) {
|
||||||
Item::distribute($message_id, json_encode($data));
|
Item::distribute($message_id, json_encode($data));
|
||||||
}
|
}
|
||||||
|
|
@ -1827,12 +1844,12 @@ class Diaspora
|
||||||
* Processes private messages
|
* Processes private messages
|
||||||
*
|
*
|
||||||
* @param array $importer Array of the importer user
|
* @param array $importer Array of the importer user
|
||||||
* @param object $data The message object
|
* @param SimpleXMLElement $data The message object
|
||||||
*
|
*
|
||||||
* @return bool Success?
|
* @return bool Success?
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function receiveMessage(array $importer, $data)
|
private static function receiveMessage(array $importer, SimpleXMLElement $data): bool
|
||||||
{
|
{
|
||||||
$author = XML::unescape($data->author);
|
$author = XML::unescape($data->author);
|
||||||
$guid = XML::unescape($data->guid);
|
$guid = XML::unescape($data->guid);
|
||||||
|
|
@ -1851,7 +1868,7 @@ class Diaspora
|
||||||
|
|
||||||
$conversation = null;
|
$conversation = null;
|
||||||
|
|
||||||
$condition = ['uid' => $importer["uid"], 'guid' => $conversation_guid];
|
$condition = ['uid' => $importer['uid'], 'guid' => $conversation_guid];
|
||||||
$conversation = DBA::selectFirst('conv', [], $condition);
|
$conversation = DBA::selectFirst('conv', [], $condition);
|
||||||
|
|
||||||
if (!DBA::isResult($conversation)) {
|
if (!DBA::isResult($conversation)) {
|
||||||
|
|
@ -1859,7 +1876,7 @@ class Diaspora
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$message_uri = $author.":".$guid;
|
$message_uri = $author . ':' . $guid;
|
||||||
|
|
||||||
$person = FContact::getByURL($author);
|
$person = FContact::getByURL($author);
|
||||||
if (!$person) {
|
if (!$person) {
|
||||||
|
|
@ -1892,14 +1909,14 @@ class Diaspora
|
||||||
* Processes participations - unsupported by now
|
* Processes participations - unsupported by now
|
||||||
*
|
*
|
||||||
* @param array $importer Array of the importer user
|
* @param array $importer Array of the importer user
|
||||||
* @param object $data The message object
|
* @param SimpleXMLElement $data The message object
|
||||||
* @param int $direction Indicates if the message had been fetched or pushed (self::PUSHED, self::FETCHED, self::FORCED_FETCH)
|
* @param int $direction Indicates if the message had been fetched or pushed (self::PUSHED, self::FETCHED, self::FORCED_FETCH)
|
||||||
*
|
*
|
||||||
* @return bool success
|
* @return bool success
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
private static function receiveParticipation(array $importer, $data, int $direction)
|
private static function receiveParticipation(array $importer, SimpleXMLElement $data, int $direction): bool
|
||||||
{
|
{
|
||||||
$author = strtolower(XML::unescape($data->author));
|
$author = strtolower(XML::unescape($data->author));
|
||||||
$guid = XML::unescape($data->guid);
|
$guid = XML::unescape($data->guid);
|
||||||
|
|
@ -1914,11 +1931,11 @@ class Diaspora
|
||||||
GServer::setProtocol($contact['gsid'], Post\DeliveryData::DIASPORA);
|
GServer::setProtocol($contact['gsid'], Post\DeliveryData::DIASPORA);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self::messageExists($importer["uid"], $guid)) {
|
if (self::messageExists($importer['uid'], $guid)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$toplevel_parent_item = self::parentItem($importer["uid"], $parent_guid, $author, $contact);
|
$toplevel_parent_item = self::parentItem($importer['uid'], $parent_guid, $author, $contact);
|
||||||
if (!$toplevel_parent_item) {
|
if (!$toplevel_parent_item) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -1934,38 +1951,38 @@ class Diaspora
|
||||||
|
|
||||||
$person = FContact::getByURL($author);
|
$person = FContact::getByURL($author);
|
||||||
if (!is_array($person)) {
|
if (!is_array($person)) {
|
||||||
Logger::notice("Person not found: ".$author);
|
Logger::notice("Person not found: " . $author);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$author_contact = self::authorContactByUrl($contact, $person, $importer["uid"]);
|
$author_contact = self::authorContactByUrl($contact, $person, $importer['uid']);
|
||||||
|
|
||||||
// Store participation
|
// Store participation
|
||||||
$datarray = [];
|
$datarray = [];
|
||||||
|
|
||||||
$datarray["protocol"] = Conversation::PARCEL_DIASPORA;
|
$datarray['protocol'] = Conversation::PARCEL_DIASPORA;
|
||||||
$datarray["direction"] = in_array($direction, [self::FETCHED, self::FORCED_FETCH]) ? Conversation::PULL : Conversation::PUSH;
|
$datarray['direction'] = in_array($direction, [self::FETCHED, self::FORCED_FETCH]) ? Conversation::PULL : Conversation::PUSH;
|
||||||
|
|
||||||
$datarray["uid"] = $importer["uid"];
|
$datarray['uid'] = $importer['uid'];
|
||||||
$datarray["contact-id"] = $author_contact["cid"];
|
$datarray['contact-id'] = $author_contact['cid'];
|
||||||
$datarray["network"] = $author_contact["network"];
|
$datarray['network'] = $author_contact['network'];
|
||||||
|
|
||||||
$datarray["owner-link"] = $datarray["author-link"] = $person["url"];
|
$datarray['owner-link'] = $datarray['author-link'] = $person['url'];
|
||||||
$datarray["owner-id"] = $datarray["author-id"] = Contact::getIdForURL($person["url"], 0);
|
$datarray['owner-id'] = $datarray['author-id'] = Contact::getIdForURL($person['url'], 0);
|
||||||
|
|
||||||
$datarray["guid"] = $guid;
|
$datarray['guid'] = $guid;
|
||||||
$datarray["uri"] = self::getUriFromGuid($author, $guid);
|
$datarray['uri'] = self::getUriFromGuid($author, $guid);
|
||||||
|
|
||||||
$datarray["verb"] = Activity::FOLLOW;
|
$datarray['verb'] = Activity::FOLLOW;
|
||||||
$datarray["gravity"] = GRAVITY_ACTIVITY;
|
$datarray['gravity'] = GRAVITY_ACTIVITY;
|
||||||
$datarray['thr-parent'] = $toplevel_parent_item['uri'];
|
$datarray['thr-parent'] = $toplevel_parent_item['uri'];
|
||||||
|
|
||||||
$datarray["object-type"] = Activity\ObjectType::NOTE;
|
$datarray['object-type'] = Activity\ObjectType::NOTE;
|
||||||
|
|
||||||
$datarray["body"] = Activity::FOLLOW;
|
$datarray['body'] = Activity::FOLLOW;
|
||||||
|
|
||||||
// Diaspora doesn't provide a date for a participation
|
// Diaspora doesn't provide a date for a participation
|
||||||
$datarray["changed"] = $datarray["created"] = $datarray["edited"] = DateTimeFormat::utcNow();
|
$datarray['changed'] = $datarray['created'] = $datarray['edited'] = DateTimeFormat::utcNow();
|
||||||
|
|
||||||
if (Item::isTooOld($datarray)) {
|
if (Item::isTooOld($datarray)) {
|
||||||
Logger::info('Participation is too old', ['created' => $datarray['created'], 'uid' => $datarray['uid'], 'guid' => $datarray['guid']]);
|
Logger::info('Participation is too old', ['created' => $datarray['created'], 'uid' => $datarray['uid'], 'guid' => $datarray['guid']]);
|
||||||
|
|
@ -1995,8 +2012,8 @@ class Diaspora
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger::info('Deliver participation', ['item' => $comment['id'], 'contact' => $author_contact["cid"]]);
|
Logger::info('Deliver participation', ['item' => $comment['id'], 'contact' => $author_contact['cid']]);
|
||||||
if (Worker::add(PRIORITY_HIGH, 'Delivery', Delivery::POST, $comment['id'], $author_contact["cid"])) {
|
if (Worker::add(PRIORITY_HIGH, 'Delivery', Delivery::POST, $comment['id'], $author_contact['cid'])) {
|
||||||
Post\DeliveryData::incrementQueueCount($comment['uri-id'], 1);
|
Post\DeliveryData::incrementQueueCount($comment['uri-id'], 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2009,7 +2026,7 @@ class Diaspora
|
||||||
* Processes photos - unneeded
|
* Processes photos - unneeded
|
||||||
*
|
*
|
||||||
* @param array $importer Array of the importer user
|
* @param array $importer Array of the importer user
|
||||||
* @param object $data The message object
|
* @param SimpleXMLElement $data The message object
|
||||||
*
|
*
|
||||||
* @return bool always true
|
* @return bool always true
|
||||||
*/
|
*/
|
||||||
|
|
@ -2038,68 +2055,69 @@ class Diaspora
|
||||||
* Processes incoming profile updates
|
* Processes incoming profile updates
|
||||||
*
|
*
|
||||||
* @param array $importer Array of the importer user
|
* @param array $importer Array of the importer user
|
||||||
* @param object $data The message object
|
* @param SimpleXMLElement $data The message object
|
||||||
*
|
*
|
||||||
* @return bool Success
|
* @return bool Success
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
private static function receiveProfile(array $importer, $data)
|
private static function receiveProfile(array $importer, SimpleXMLElement $data): bool
|
||||||
{
|
{
|
||||||
$author = strtolower(XML::unescape($data->author));
|
$author = strtolower(XML::unescape($data->author));
|
||||||
|
|
||||||
$contact = self::contactByHandle($importer["uid"], $author);
|
$contact = self::contactByHandle($importer['uid'], $author);
|
||||||
if (!$contact) {
|
if (!$contact) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$name = XML::unescape($data->first_name).((strlen($data->last_name)) ? " ".XML::unescape($data->last_name) : "");
|
$name = XML::unescape($data->first_name).((strlen($data->last_name)) ? ' ' . XML::unescape($data->last_name) : '');
|
||||||
$image_url = XML::unescape($data->image_url);
|
$image_url = XML::unescape($data->image_url);
|
||||||
$birthday = XML::unescape($data->birthday);
|
$birthday = XML::unescape($data->birthday);
|
||||||
$about = Markdown::toBBCode(XML::unescape($data->bio));
|
$about = Markdown::toBBCode(XML::unescape($data->bio));
|
||||||
$location = Markdown::toBBCode(XML::unescape($data->location));
|
$location = Markdown::toBBCode(XML::unescape($data->location));
|
||||||
$searchable = (XML::unescape($data->searchable) == "true");
|
$searchable = (XML::unescape($data->searchable) == 'true');
|
||||||
$nsfw = (XML::unescape($data->nsfw) == "true");
|
$nsfw = (XML::unescape($data->nsfw) == 'true');
|
||||||
$tags = XML::unescape($data->tag_string);
|
$tags = XML::unescape($data->tag_string);
|
||||||
|
|
||||||
$tags = explode("#", $tags);
|
$tags = explode('#', $tags);
|
||||||
|
|
||||||
$keywords = [];
|
$keywords = [];
|
||||||
foreach ($tags as $tag) {
|
foreach ($tags as $tag) {
|
||||||
$tag = trim(strtolower($tag));
|
$tag = trim(strtolower($tag));
|
||||||
if ($tag != "") {
|
if ($tag != '') {
|
||||||
$keywords[] = $tag;
|
$keywords[] = $tag;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$keywords = implode(", ", $keywords);
|
$keywords = implode(', ', $keywords);
|
||||||
|
|
||||||
$handle_parts = explode("@", $author);
|
$handle_parts = explode('@', $author);
|
||||||
$nick = $handle_parts[0];
|
$nick = $handle_parts[0];
|
||||||
|
|
||||||
if ($name === "") {
|
if ($name === '') {
|
||||||
$name = $handle_parts[0];
|
$name = $handle_parts[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (preg_match("|^https?://|", $image_url) === 0) {
|
if (preg_match('|^https?://|', $image_url) === 0) {
|
||||||
$image_url = "http://".$handle_parts[1].$image_url;
|
// @TODO No HTTPS here?
|
||||||
|
$image_url = 'http://' . $handle_parts[1] . $image_url;
|
||||||
}
|
}
|
||||||
|
|
||||||
Contact::updateAvatar($contact["id"], $image_url);
|
Contact::updateAvatar($contact['id'], $image_url);
|
||||||
|
|
||||||
// Generic birthday. We don't know the timezone. The year is irrelevant.
|
// Generic birthday. We don't know the timezone. The year is irrelevant.
|
||||||
|
|
||||||
$birthday = str_replace("1000", "1901", $birthday);
|
$birthday = str_replace('1000', '1901', $birthday);
|
||||||
|
|
||||||
if ($birthday != "") {
|
if ($birthday != '') {
|
||||||
$birthday = DateTimeFormat::utc($birthday, "Y-m-d");
|
$birthday = DateTimeFormat::utc($birthday, 'Y-m-d');
|
||||||
}
|
}
|
||||||
|
|
||||||
// this is to prevent multiple birthday notifications in a single year
|
// this is to prevent multiple birthday notifications in a single year
|
||||||
// if we already have a stored birthday and the 'm-d' part hasn't changed, preserve the entry, which will preserve the notify year
|
// if we already have a stored birthday and the 'm-d' part hasn't changed, preserve the entry, which will preserve the notify year
|
||||||
|
|
||||||
if (substr($birthday, 5) === substr($contact["bd"], 5)) {
|
if (substr($birthday, 5) === substr($contact['bd'], 5)) {
|
||||||
$birthday = $contact["bd"];
|
$birthday = $contact['bd'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$fields = ['name' => $name, 'location' => $location,
|
$fields = ['name' => $name, 'location' => $location,
|
||||||
|
|
@ -2113,7 +2131,7 @@ class Diaspora
|
||||||
|
|
||||||
Contact::update($fields, ['id' => $contact['id']]);
|
Contact::update($fields, ['id' => $contact['id']]);
|
||||||
|
|
||||||
Logger::info("Profile of contact ".$contact["id"]." stored for user ".$importer["uid"]);
|
Logger::info("Profile of contact " . $contact['id'] . " stored for user " . $importer['uid']);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -2128,10 +2146,10 @@ class Diaspora
|
||||||
*/
|
*/
|
||||||
private static function receiveRequestMakeFriend(array $importer, array $contact)
|
private static function receiveRequestMakeFriend(array $importer, array $contact)
|
||||||
{
|
{
|
||||||
if ($contact["rel"] == Contact::SHARING) {
|
if ($contact['rel'] == Contact::SHARING) {
|
||||||
Contact::update(
|
Contact::update(
|
||||||
['rel' => Contact::FRIEND, 'writable' => true],
|
['rel' => Contact::FRIEND, 'writable' => true],
|
||||||
['id' => $contact["id"], 'uid' => $importer["uid"]]
|
['id' => $contact['id'], 'uid' => $importer['uid']]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2140,12 +2158,12 @@ class Diaspora
|
||||||
* Processes incoming sharing notification
|
* Processes incoming sharing notification
|
||||||
*
|
*
|
||||||
* @param array $importer Array of the importer user
|
* @param array $importer Array of the importer user
|
||||||
* @param object $data The message object
|
* @param SimpleXMLElement $data The message object
|
||||||
*
|
*
|
||||||
* @return bool Success
|
* @return bool Success
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function receiveContactRequest(array $importer, $data)
|
private static function receiveContactRequest(array $importer, SimpleXMLElement $data): bool
|
||||||
{
|
{
|
||||||
$author = XML::unescape($data->author);
|
$author = XML::unescape($data->author);
|
||||||
$recipient = XML::unescape($data->recipient);
|
$recipient = XML::unescape($data->recipient);
|
||||||
|
|
@ -2157,64 +2175,64 @@ class Diaspora
|
||||||
// the current protocol version doesn't know these fields
|
// the current protocol version doesn't know these fields
|
||||||
// That means that we will assume their existance
|
// That means that we will assume their existance
|
||||||
if (isset($data->following)) {
|
if (isset($data->following)) {
|
||||||
$following = (XML::unescape($data->following) == "true");
|
$following = (XML::unescape($data->following) == 'true');
|
||||||
} else {
|
} else {
|
||||||
$following = true;
|
$following = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($data->sharing)) {
|
if (isset($data->sharing)) {
|
||||||
$sharing = (XML::unescape($data->sharing) == "true");
|
$sharing = (XML::unescape($data->sharing) == 'true');
|
||||||
} else {
|
} else {
|
||||||
$sharing = true;
|
$sharing = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$contact = self::contactByHandle($importer["uid"], $author);
|
$contact = self::contactByHandle($importer['uid'], $author);
|
||||||
|
|
||||||
// perhaps we were already sharing with this person. Now they're sharing with us.
|
// perhaps we were already sharing with this person. Now they're sharing with us.
|
||||||
// That makes us friends.
|
// That makes us friends.
|
||||||
if ($contact) {
|
if ($contact) {
|
||||||
if ($following) {
|
if ($following) {
|
||||||
Logger::info("Author ".$author." (Contact ".$contact["id"].") wants to follow us.");
|
Logger::info("Author " . $author . " (Contact " . $contact['id'] . ") wants to follow us.");
|
||||||
self::receiveRequestMakeFriend($importer, $contact);
|
self::receiveRequestMakeFriend($importer, $contact);
|
||||||
|
|
||||||
// refetch the contact array
|
// refetch the contact array
|
||||||
$contact = self::contactByHandle($importer["uid"], $author);
|
$contact = self::contactByHandle($importer['uid'], $author);
|
||||||
|
|
||||||
// If we are now friends, we are sending a share message.
|
// If we are now friends, we are sending a share message.
|
||||||
// Normally we needn't to do so, but the first message could have been vanished.
|
// Normally we needn't to do so, but the first message could have been vanished.
|
||||||
if (in_array($contact["rel"], [Contact::FRIEND])) {
|
if (in_array($contact['rel'], [Contact::FRIEND])) {
|
||||||
$user = DBA::selectFirst('user', [], ['uid' => $importer["uid"]]);
|
$user = DBA::selectFirst('user', [], ['uid' => $importer['uid']]);
|
||||||
if (DBA::isResult($user)) {
|
if (DBA::isResult($user)) {
|
||||||
Logger::info("Sending share message to author ".$author." - Contact: ".$contact["id"]." - User: ".$importer["uid"]);
|
Logger::info("Sending share message to author " . $author . " - Contact: " . $contact['id'] . " - User: " . $importer['uid']);
|
||||||
self::sendShare($user, $contact);
|
self::sendShare($user, $contact);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
Logger::info("Author ".$author." doesn't want to follow us anymore.");
|
Logger::info("Author " . $author . " doesn't want to follow us anymore.");
|
||||||
Contact::removeFollower($contact);
|
Contact::removeFollower($contact);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$following && $sharing && in_array($importer["page-flags"], [User::PAGE_FLAGS_SOAPBOX, User::PAGE_FLAGS_NORMAL])) {
|
if (!$following && $sharing && in_array($importer['page-flags'], [User::PAGE_FLAGS_SOAPBOX, User::PAGE_FLAGS_NORMAL])) {
|
||||||
Logger::info("Author ".$author." wants to share with us - but doesn't want to listen. Request is ignored.");
|
Logger::info("Author " . $author . " wants to share with us - but doesn't want to listen. Request is ignored.");
|
||||||
return false;
|
return false;
|
||||||
} elseif (!$following && !$sharing) {
|
} elseif (!$following && !$sharing) {
|
||||||
Logger::info("Author ".$author." doesn't want anything - and we don't know the author. Request is ignored.");
|
Logger::info("Author " . $author . " doesn't want anything - and we don't know the author. Request is ignored.");
|
||||||
return false;
|
return false;
|
||||||
} elseif (!$following && $sharing) {
|
} elseif (!$following && $sharing) {
|
||||||
Logger::info("Author ".$author." wants to share with us.");
|
Logger::info("Author " . $author . " wants to share with us.");
|
||||||
} elseif ($following && $sharing) {
|
} elseif ($following && $sharing) {
|
||||||
Logger::info("Author ".$author." wants to have a bidirectional conection.");
|
Logger::info("Author " . $author . " wants to have a bidirectional conection.");
|
||||||
} elseif ($following && !$sharing) {
|
} elseif ($following && !$sharing) {
|
||||||
Logger::info("Author ".$author." wants to listen to us.");
|
Logger::info("Author " . $author . " wants to listen to us.");
|
||||||
}
|
}
|
||||||
|
|
||||||
$ret = FContact::getByURL($author);
|
$ret = FContact::getByURL($author);
|
||||||
|
|
||||||
if (!$ret || ($ret["network"] != Protocol::DIASPORA)) {
|
if (!$ret || ($ret['network'] != Protocol::DIASPORA)) {
|
||||||
Logger::notice("Cannot resolve diaspora handle ".$author." for ".$recipient);
|
Logger::notice("Cannot resolve diaspora handle " . $author . " for ".$recipient);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2233,7 +2251,7 @@ class Diaspora
|
||||||
$contact_record = self::contactByHandle($importer['uid'], $author);
|
$contact_record = self::contactByHandle($importer['uid'], $author);
|
||||||
if (!$contact_record) {
|
if (!$contact_record) {
|
||||||
Logger::info('unable to locate newly created contact record.');
|
Logger::info('unable to locate newly created contact record.');
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$user = DBA::selectFirst('user', [], ['uid' => $importer['uid']]);
|
$user = DBA::selectFirst('user', [], ['uid' => $importer['uid']]);
|
||||||
|
|
@ -2253,11 +2271,11 @@ class Diaspora
|
||||||
*
|
*
|
||||||
* @param string $guid message guid
|
* @param string $guid message guid
|
||||||
* @param string $orig_author handle of the original post
|
* @param string $orig_author handle of the original post
|
||||||
* @return array The fetched item
|
* @return array|bool The fetched item or false on failure
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function originalItem($guid, $orig_author)
|
public static function originalItem(string $guid, string $orig_author)
|
||||||
{
|
{
|
||||||
if (empty($guid)) {
|
if (empty($guid)) {
|
||||||
Logger::notice('Empty guid. Quitting.');
|
Logger::notice('Empty guid. Quitting.');
|
||||||
|
|
@ -2271,17 +2289,17 @@ class Diaspora
|
||||||
$item = Post::selectFirst($fields, $condition);
|
$item = Post::selectFirst($fields, $condition);
|
||||||
|
|
||||||
if (DBA::isResult($item)) {
|
if (DBA::isResult($item)) {
|
||||||
Logger::notice("reshared message ".$guid." already exists on system.");
|
Logger::notice("reshared message " . $guid . " already exists on system.");
|
||||||
|
|
||||||
// Maybe it is already a reshared item?
|
// Maybe it is already a reshared item?
|
||||||
// Then refetch the content, if it is a reshare from a reshare.
|
// Then refetch the content, if it is a reshare from a reshare.
|
||||||
// If it is a reshared post from another network then reformat to avoid display problems with two share elements
|
// If it is a reshared post from another network then reformat to avoid display problems with two share elements
|
||||||
if (self::isReshare($item["body"], true)) {
|
if (self::isReshare($item['body'], true)) {
|
||||||
$item = [];
|
$item = [];
|
||||||
} elseif (self::isReshare($item["body"], false) || strstr($item["body"], "[share")) {
|
} elseif (self::isReshare($item['body'], false) || strstr($item['body'], '[share')) {
|
||||||
$item["body"] = Markdown::toBBCode(BBCode::toMarkdown($item["body"]));
|
$item['body'] = Markdown::toBBCode(BBCode::toMarkdown($item['body']));
|
||||||
|
|
||||||
$item["body"] = self::replacePeopleGuid($item["body"], $item["author-link"]);
|
$item['body'] = self::replacePeopleGuid($item['body'], $item['author-link']);
|
||||||
|
|
||||||
return $item;
|
return $item;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -2295,13 +2313,13 @@ class Diaspora
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$server = "https://".substr($orig_author, strpos($orig_author, "@") + 1);
|
$server = 'https://' . substr($orig_author, strpos($orig_author, '@') + 1);
|
||||||
Logger::notice("1st try: reshared message ".$guid." will be fetched via SSL from the server ".$server);
|
Logger::notice("1st try: reshared message " . $guid . " will be fetched via SSL from the server " . $server);
|
||||||
$stored = self::storeByGuid($guid, $server, true);
|
$stored = self::storeByGuid($guid, $server, true);
|
||||||
|
|
||||||
if (!$stored) {
|
if (!$stored) {
|
||||||
$server = "http://".substr($orig_author, strpos($orig_author, "@") + 1);
|
$server = 'http://' . substr($orig_author, strpos($orig_author, '@') + 1);
|
||||||
Logger::notice("2nd try: reshared message ".$guid." will be fetched without SSL from the server ".$server);
|
Logger::notice("2nd try: reshared message " . $guid . " will be fetched without SSL from the server " . $server);
|
||||||
$stored = self::storeByGuid($guid, $server, true);
|
$stored = self::storeByGuid($guid, $server, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2313,9 +2331,9 @@ class Diaspora
|
||||||
|
|
||||||
if (DBA::isResult($item)) {
|
if (DBA::isResult($item)) {
|
||||||
// If it is a reshared post from another network then reformat to avoid display problems with two share elements
|
// If it is a reshared post from another network then reformat to avoid display problems with two share elements
|
||||||
if (self::isReshare($item["body"], false)) {
|
if (self::isReshare($item['body'], false)) {
|
||||||
$item["body"] = Markdown::toBBCode(BBCode::toMarkdown($item["body"]));
|
$item['body'] = Markdown::toBBCode(BBCode::toMarkdown($item['body']));
|
||||||
$item["body"] = self::replacePeopleGuid($item["body"], $item["author-link"]);
|
$item['body'] = self::replacePeopleGuid($item['body'], $item['author-link']);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $item;
|
return $item;
|
||||||
|
|
@ -2333,7 +2351,7 @@ class Diaspora
|
||||||
* @param string $guid GUID string of reshare action
|
* @param string $guid GUID string of reshare action
|
||||||
* @param string $author Author handle
|
* @param string $author Author handle
|
||||||
*/
|
*/
|
||||||
private static function addReshareActivity($item, $parent_message_id, $guid, $author)
|
private static function addReshareActivity(array $item, int $parent_message_id, string $guid, string $author)
|
||||||
{
|
{
|
||||||
$parent = Post::selectFirst(['uri', 'guid'], ['id' => $parent_message_id]);
|
$parent = Post::selectFirst(['uri', 'guid'], ['id' => $parent_message_id]);
|
||||||
|
|
||||||
|
|
@ -2384,15 +2402,15 @@ class Diaspora
|
||||||
* Processes a reshare message
|
* Processes a reshare message
|
||||||
*
|
*
|
||||||
* @param array $importer Array of the importer user
|
* @param array $importer Array of the importer user
|
||||||
* @param object $data The message object
|
* @param SimpleXMLElement $data The message object
|
||||||
* @param string $xml The original XML of the message
|
* @param string $xml The original XML of the message
|
||||||
* @param int $direction Indicates if the message had been fetched or pushed (self::PUSHED, self::FETCHED, self::FORCED_FETCH)
|
* @param int $direction Indicates if the message had been fetched or pushed (self::PUSHED, self::FETCHED, self::FORCED_FETCH)
|
||||||
*
|
*
|
||||||
* @return int the message id
|
* @return bool Success or failure
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
private static function receiveReshare(array $importer, $data, $xml, int $direction)
|
private static function receiveReshare(array $importer, SimpleXMLElement $data, string $xml, int $direction): bool
|
||||||
{
|
{
|
||||||
$author = XML::unescape($data->author);
|
$author = XML::unescape($data->author);
|
||||||
$guid = XML::unescape($data->guid);
|
$guid = XML::unescape($data->guid);
|
||||||
|
|
@ -2411,7 +2429,7 @@ class Diaspora
|
||||||
GServer::setProtocol($contact['gsid'], Post\DeliveryData::DIASPORA);
|
GServer::setProtocol($contact['gsid'], Post\DeliveryData::DIASPORA);
|
||||||
}
|
}
|
||||||
|
|
||||||
$message_id = self::messageExists($importer["uid"], $guid);
|
$message_id = self::messageExists($importer['uid'], $guid);
|
||||||
if ($message_id) {
|
if ($message_id) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -2427,53 +2445,53 @@ class Diaspora
|
||||||
|
|
||||||
$datarray = [];
|
$datarray = [];
|
||||||
|
|
||||||
$datarray["uid"] = $importer["uid"];
|
$datarray['uid'] = $importer['uid'];
|
||||||
$datarray["contact-id"] = $contact["id"];
|
$datarray['contact-id'] = $contact['id'];
|
||||||
$datarray["network"] = Protocol::DIASPORA;
|
$datarray['network'] = Protocol::DIASPORA;
|
||||||
|
|
||||||
$datarray["author-link"] = $contact["url"];
|
$datarray['author-link'] = $contact['url'];
|
||||||
$datarray["author-id"] = Contact::getIdForURL($contact["url"], 0);
|
$datarray['author-id'] = Contact::getIdForURL($contact['url'], 0);
|
||||||
|
|
||||||
$datarray["owner-link"] = $datarray["author-link"];
|
$datarray['owner-link'] = $datarray['author-link'];
|
||||||
$datarray["owner-id"] = $datarray["author-id"];
|
$datarray['owner-id'] = $datarray['author-id'];
|
||||||
|
|
||||||
$datarray["guid"] = $guid;
|
$datarray['guid'] = $guid;
|
||||||
$datarray["uri"] = $datarray["thr-parent"] = self::getUriFromGuid($author, $guid);
|
$datarray['uri'] = $datarray['thr-parent'] = self::getUriFromGuid($author, $guid);
|
||||||
$datarray['uri-id'] = ItemURI::insert(['uri' => $datarray['uri'], 'guid' => $datarray['guid']]);
|
$datarray['uri-id'] = ItemURI::insert(['uri' => $datarray['uri'], 'guid' => $datarray['guid']]);
|
||||||
|
|
||||||
$datarray["verb"] = Activity::POST;
|
$datarray['verb'] = Activity::POST;
|
||||||
$datarray["gravity"] = GRAVITY_PARENT;
|
$datarray['gravity'] = GRAVITY_PARENT;
|
||||||
|
|
||||||
$datarray["protocol"] = Conversation::PARCEL_DIASPORA;
|
$datarray['protocol'] = Conversation::PARCEL_DIASPORA;
|
||||||
$datarray["source"] = $xml;
|
$datarray['source'] = $xml;
|
||||||
$datarray["direction"] = in_array($direction, [self::FETCHED, self::FORCED_FETCH]) ? Conversation::PULL : Conversation::PUSH;
|
$datarray['direction'] = in_array($direction, [self::FETCHED, self::FORCED_FETCH]) ? Conversation::PULL : Conversation::PUSH;
|
||||||
|
|
||||||
/// @todo Copy tag data from original post
|
/// @todo Copy tag data from original post
|
||||||
|
|
||||||
$prefix = BBCode::getShareOpeningTag(
|
$prefix = BBCode::getShareOpeningTag(
|
||||||
$original_item["author-name"],
|
$original_item['author-name'],
|
||||||
$original_item["author-link"],
|
$original_item['author-link'],
|
||||||
$original_item["author-avatar"],
|
$original_item['author-avatar'],
|
||||||
$original_item["plink"],
|
$original_item['plink'],
|
||||||
$original_item["created"],
|
$original_item['created'],
|
||||||
$original_item["guid"]
|
$original_item['guid']
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!empty($original_item['title'])) {
|
if (!empty($original_item['title'])) {
|
||||||
$prefix .= '[h3]' . $original_item['title'] . "[/h3]\n";
|
$prefix .= '[h3]' . $original_item['title'] . "[/h3]\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$datarray["body"] = $prefix.$original_item["body"]."[/share]";
|
$datarray['body'] = $prefix.$original_item['body'] . '[/share]';
|
||||||
|
|
||||||
Tag::storeFromBody($datarray['uri-id'], $datarray["body"]);
|
Tag::storeFromBody($datarray['uri-id'], $datarray['body']);
|
||||||
|
|
||||||
$datarray["app"] = $original_item["app"];
|
$datarray['app'] = $original_item['app'];
|
||||||
|
|
||||||
$datarray["plink"] = self::plink($author, $guid);
|
$datarray['plink'] = self::plink($author, $guid);
|
||||||
$datarray["private"] = (($public == "false") ? Item::PRIVATE : Item::PUBLIC);
|
$datarray['private'] = (($public == 'false') ? Item::PRIVATE : Item::PUBLIC);
|
||||||
$datarray["changed"] = $datarray["created"] = $datarray["edited"] = $created_at;
|
$datarray['changed'] = $datarray['created'] = $datarray['edited'] = $created_at;
|
||||||
|
|
||||||
$datarray["object-type"] = $original_item["object-type"];
|
$datarray['object-type'] = $original_item['object-type'];
|
||||||
|
|
||||||
self::fetchGuid($datarray);
|
self::fetchGuid($datarray);
|
||||||
|
|
||||||
|
|
@ -2486,13 +2504,13 @@ class Diaspora
|
||||||
|
|
||||||
self::sendParticipation($contact, $datarray);
|
self::sendParticipation($contact, $datarray);
|
||||||
|
|
||||||
$root_message_id = self::messageExists($importer["uid"], $root_guid);
|
$root_message_id = self::messageExists($importer['uid'], $root_guid);
|
||||||
if ($root_message_id) {
|
if ($root_message_id) {
|
||||||
self::addReshareActivity($datarray, $root_message_id, $guid, $author);
|
self::addReshareActivity($datarray, $root_message_id, $guid, $author);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($message_id) {
|
if ($message_id) {
|
||||||
Logger::info("Stored reshare ".$datarray["guid"]." with message id ".$message_id);
|
Logger::info("Stored reshare " . $datarray['guid'] . " with message id " . $message_id);
|
||||||
if ($datarray['uid'] == 0) {
|
if ($datarray['uid'] == 0) {
|
||||||
Item::distribute($message_id);
|
Item::distribute($message_id);
|
||||||
}
|
}
|
||||||
|
|
@ -2507,12 +2525,12 @@ class Diaspora
|
||||||
*
|
*
|
||||||
* @param array $importer Array of the importer user
|
* @param array $importer Array of the importer user
|
||||||
* @param array $contact The contact of the item owner
|
* @param array $contact The contact of the item owner
|
||||||
* @param object $data The message object
|
* @param SimpleXMLElement $data The message object
|
||||||
*
|
*
|
||||||
* @return bool success
|
* @return bool success
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function itemRetraction(array $importer, array $contact, $data)
|
private static function itemRetraction(array $importer, array $contact, SimpleXMLElement $data): bool
|
||||||
{
|
{
|
||||||
$author = XML::unescape($data->author);
|
$author = XML::unescape($data->author);
|
||||||
$target_guid = XML::unescape($data->target_guid);
|
$target_guid = XML::unescape($data->target_guid);
|
||||||
|
|
@ -2520,12 +2538,12 @@ class Diaspora
|
||||||
|
|
||||||
$person = FContact::getByURL($author);
|
$person = FContact::getByURL($author);
|
||||||
if (!is_array($person)) {
|
if (!is_array($person)) {
|
||||||
Logger::notice("unable to find author detail for ".$author);
|
Logger::notice("unable to find author detail for " . $author);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($contact["url"])) {
|
if (empty($contact['url'])) {
|
||||||
$contact["url"] = $person["url"];
|
$contact['url'] = $person['url'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fetch items that are about to be deleted
|
// Fetch items that are about to be deleted
|
||||||
|
|
@ -2540,7 +2558,7 @@ class Diaspora
|
||||||
|
|
||||||
$r = Post::select($fields, $condition);
|
$r = Post::select($fields, $condition);
|
||||||
if (!DBA::isResult($r)) {
|
if (!DBA::isResult($r)) {
|
||||||
Logger::notice("Target guid ".$target_guid." was not found on this system for user ".$importer['uid'].".");
|
Logger::notice("Target guid " . $target_guid . " was not found on this system for user " . $importer['uid'] . ".");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2554,14 +2572,14 @@ class Diaspora
|
||||||
$parent = Post::selectFirst(['author-link'], ['id' => $item['parent']]);
|
$parent = Post::selectFirst(['author-link'], ['id' => $item['parent']]);
|
||||||
|
|
||||||
// Only delete it if the parent author really fits
|
// Only delete it if the parent author really fits
|
||||||
if (!Strings::compareLink($parent["author-link"], $contact["url"]) && !Strings::compareLink($item["author-link"], $contact["url"])) {
|
if (!Strings::compareLink($parent['author-link'], $contact['url']) && !Strings::compareLink($item['author-link'], $contact['url'])) {
|
||||||
Logger::info("Thread author ".$parent["author-link"]." and item author ".$item["author-link"]." don't fit to expected contact ".$contact["url"]);
|
Logger::info("Thread author " . $parent['author-link'] . " and item author " . $item['author-link'] . " don't fit to expected contact " . $contact['url']);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
Item::markForDeletion(['id' => $item['id']]);
|
Item::markForDeletion(['id' => $item['id']]);
|
||||||
|
|
||||||
Logger::info("Deleted target ".$target_guid." (".$item["id"].") from user ".$item["uid"]." parent: ".$item['parent']);
|
Logger::info("Deleted target " . $target_guid . " (" . $item['id'] . ") from user " . $item['uid'] . " parent: " . $item['parent']);
|
||||||
}
|
}
|
||||||
DBA::close($r);
|
DBA::close($r);
|
||||||
|
|
||||||
|
|
@ -2573,18 +2591,18 @@ class Diaspora
|
||||||
*
|
*
|
||||||
* @param array $importer Array of the importer user
|
* @param array $importer Array of the importer user
|
||||||
* @param string $sender The sender of the message
|
* @param string $sender The sender of the message
|
||||||
* @param object $data The message object
|
* @param SimpleXMLElement $data The message object
|
||||||
*
|
*
|
||||||
* @return bool Success
|
* @return bool Success
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function receiveRetraction(array $importer, $sender, $data)
|
private static function receiveRetraction(array $importer, string $sender, SimpleXMLElement $data)
|
||||||
{
|
{
|
||||||
$target_type = XML::unescape($data->target_type);
|
$target_type = XML::unescape($data->target_type);
|
||||||
|
|
||||||
$contact = self::contactByHandle($importer["uid"], $sender);
|
$contact = self::contactByHandle($importer['uid'], $sender);
|
||||||
if (!$contact && (in_array($target_type, ["Contact", "Person"]))) {
|
if (!$contact && (in_array($target_type, ['Contact', 'Person']))) {
|
||||||
Logger::notice("cannot find contact for sender: ".$sender." and user ".$importer["uid"]);
|
Logger::notice("cannot find contact for sender: " . $sender . " and user " . $importer['uid']);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2592,23 +2610,23 @@ class Diaspora
|
||||||
$contact = [];
|
$contact = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger::info("Got retraction for ".$target_type.", sender ".$sender." and user ".$importer["uid"]);
|
Logger::info("Got retraction for " . $target_type . ", sender " . $sender . " and user " . $importer['uid']);
|
||||||
|
|
||||||
switch ($target_type) {
|
switch ($target_type) {
|
||||||
case "Comment":
|
case 'Comment':
|
||||||
case "Like":
|
case 'Like':
|
||||||
case "Post":
|
case 'Post':
|
||||||
case "Reshare":
|
case 'Reshare':
|
||||||
case "StatusMessage":
|
case 'StatusMessage':
|
||||||
return self::itemRetraction($importer, $contact, $data);
|
return self::itemRetraction($importer, $contact, $data);
|
||||||
|
|
||||||
case "PollParticipation":
|
case 'PollParticipation':
|
||||||
case "Photo":
|
case 'Photo':
|
||||||
// Currently unsupported
|
// Currently unsupported
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Logger::notice("Unknown target type ".$target_type);
|
Logger::notice("Unknown target type " . $target_type);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -2624,11 +2642,10 @@ class Diaspora
|
||||||
*
|
*
|
||||||
* @return boolean Is the message wanted?
|
* @return boolean Is the message wanted?
|
||||||
*/
|
*/
|
||||||
private static function isSolicitedMessage(array $item, string $author, string $body, int $direction)
|
private static function isSolicitedMessage(array $item, string $author, string $body, int $direction): bool
|
||||||
{
|
{
|
||||||
$contact = Contact::getByURL($author);
|
$contact = Contact::getByURL($author);
|
||||||
if (DBA::exists('contact', ["`nurl` = ? AND `uid` != ? AND `rel` IN (?, ?)",
|
if (DBA::exists('contact', ['`nurl` = ? AND `uid` != ? AND `rel` IN (?, ?)', $contact['nurl'], 0, Contact::FRIEND, Contact::SHARING])) {
|
||||||
$contact['nurl'], 0, Contact::FRIEND, Contact::SHARING])) {
|
|
||||||
Logger::debug('Author has got followers - accepted', ['uri-id' => $item['uri-id'], 'guid' => $item['guid'], 'url' => $item['uri'], 'author' => $author]);
|
Logger::debug('Author has got followers - accepted', ['uri-id' => $item['uri-id'], 'guid' => $item['guid'], 'url' => $item['uri'], 'author' => $author]);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -2656,6 +2673,8 @@ class Diaspora
|
||||||
*/
|
*/
|
||||||
private static function storePhotoAsMedia(int $uriid, $photo)
|
private static function storePhotoAsMedia(int $uriid, $photo)
|
||||||
{
|
{
|
||||||
|
// @TODO Need to find object type, roland@f.haeder.net
|
||||||
|
Logger::debug('photo='.get_class($photo));
|
||||||
$data = [];
|
$data = [];
|
||||||
$data['uri-id'] = $uriid;
|
$data['uri-id'] = $uriid;
|
||||||
$data['type'] = Post\Media::IMAGE;
|
$data['type'] = Post\Media::IMAGE;
|
||||||
|
|
@ -2675,11 +2694,11 @@ class Diaspora
|
||||||
* @param string $xml The original XML of the message
|
* @param string $xml The original XML of the message
|
||||||
* @param int $direction Indicates if the message had been fetched or pushed (self::PUSHED, self::FETCHED, self::FORCED_FETCH)
|
* @param int $direction Indicates if the message had been fetched or pushed (self::PUSHED, self::FETCHED, self::FORCED_FETCH)
|
||||||
*
|
*
|
||||||
* @return int The message id of the newly created item
|
* @return int|bool The message id of the newly created item or false on error
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
private static function receiveStatusMessage(array $importer, SimpleXMLElement $data, $xml, int $direction)
|
private static function receiveStatusMessage(array $importer, SimpleXMLElement $data, string $xml, int $direction)
|
||||||
{
|
{
|
||||||
$author = XML::unescape($data->author);
|
$author = XML::unescape($data->author);
|
||||||
$guid = XML::unescape($data->guid);
|
$guid = XML::unescape($data->guid);
|
||||||
|
|
@ -2697,7 +2716,7 @@ class Diaspora
|
||||||
GServer::setProtocol($contact['gsid'], Post\DeliveryData::DIASPORA);
|
GServer::setProtocol($contact['gsid'], Post\DeliveryData::DIASPORA);
|
||||||
}
|
}
|
||||||
|
|
||||||
$message_id = self::messageExists($importer["uid"], $guid);
|
$message_id = self::messageExists($importer['uid'], $guid);
|
||||||
if ($message_id) {
|
if ($message_id) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -2713,8 +2732,8 @@ class Diaspora
|
||||||
|
|
||||||
$datarray = [];
|
$datarray = [];
|
||||||
|
|
||||||
$datarray["guid"] = $guid;
|
$datarray['guid'] = $guid;
|
||||||
$datarray["uri"] = $datarray["thr-parent"] = self::getUriFromGuid($author, $guid);
|
$datarray['uri'] = $datarray['thr-parent'] = self::getUriFromGuid($author, $guid);
|
||||||
$datarray['uri-id'] = ItemURI::insert(['uri' => $datarray['uri'], 'guid' => $datarray['guid']]);
|
$datarray['uri-id'] = ItemURI::insert(['uri' => $datarray['uri'], 'guid' => $datarray['guid']]);
|
||||||
|
|
||||||
// Attach embedded pictures to the body
|
// Attach embedded pictures to the body
|
||||||
|
|
@ -2723,14 +2742,14 @@ class Diaspora
|
||||||
self::storePhotoAsMedia($datarray['uri-id'], $photo);
|
self::storePhotoAsMedia($datarray['uri-id'], $photo);
|
||||||
}
|
}
|
||||||
|
|
||||||
$datarray["object-type"] = Activity\ObjectType::IMAGE;
|
$datarray['object-type'] = Activity\ObjectType::IMAGE;
|
||||||
$datarray["post-type"] = Item::PT_IMAGE;
|
$datarray['post-type'] = Item::PT_IMAGE;
|
||||||
} elseif ($data->poll) {
|
} elseif ($data->poll) {
|
||||||
$datarray["object-type"] = Activity\ObjectType::NOTE;
|
$datarray['object-type'] = Activity\ObjectType::NOTE;
|
||||||
$datarray["post-type"] = Item::PT_POLL;
|
$datarray['post-type'] = Item::PT_POLL;
|
||||||
} else {
|
} else {
|
||||||
$datarray["object-type"] = Activity\ObjectType::NOTE;
|
$datarray['object-type'] = Activity\ObjectType::NOTE;
|
||||||
$datarray["post-type"] = Item::PT_NOTE;
|
$datarray['post-type'] = Item::PT_NOTE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @todo enable support for polls
|
/// @todo enable support for polls
|
||||||
|
|
@ -2742,54 +2761,54 @@ class Diaspora
|
||||||
|
|
||||||
/// @todo enable support for events
|
/// @todo enable support for events
|
||||||
|
|
||||||
$datarray["uid"] = $importer["uid"];
|
$datarray['uid'] = $importer['uid'];
|
||||||
$datarray["contact-id"] = $contact["id"];
|
$datarray['contact-id'] = $contact['id'];
|
||||||
$datarray["network"] = Protocol::DIASPORA;
|
$datarray['network'] = Protocol::DIASPORA;
|
||||||
|
|
||||||
$datarray["author-link"] = $contact["url"];
|
$datarray['author-link'] = $contact['url'];
|
||||||
$datarray["author-id"] = Contact::getIdForURL($contact["url"], 0);
|
$datarray['author-id'] = Contact::getIdForURL($contact['url'], 0);
|
||||||
|
|
||||||
$datarray["owner-link"] = $datarray["author-link"];
|
$datarray['owner-link'] = $datarray['author-link'];
|
||||||
$datarray["owner-id"] = $datarray["author-id"];
|
$datarray['owner-id'] = $datarray['author-id'];
|
||||||
|
|
||||||
$datarray["verb"] = Activity::POST;
|
$datarray['verb'] = Activity::POST;
|
||||||
$datarray["gravity"] = GRAVITY_PARENT;
|
$datarray['gravity'] = GRAVITY_PARENT;
|
||||||
|
|
||||||
$datarray["protocol"] = Conversation::PARCEL_DIASPORA;
|
$datarray['protocol'] = Conversation::PARCEL_DIASPORA;
|
||||||
$datarray["source"] = $xml;
|
$datarray['source'] = $xml;
|
||||||
$datarray["direction"] = in_array($direction, [self::FETCHED, self::FORCED_FETCH]) ? Conversation::PULL : Conversation::PUSH;
|
$datarray['direction'] = in_array($direction, [self::FETCHED, self::FORCED_FETCH]) ? Conversation::PULL : Conversation::PUSH;
|
||||||
|
|
||||||
if (in_array($direction, [self::FETCHED, self::FORCED_FETCH])) {
|
if (in_array($direction, [self::FETCHED, self::FORCED_FETCH])) {
|
||||||
$datarray["post-reason"] = Item::PR_FETCHED;
|
$datarray['post-reason'] = Item::PR_FETCHED;
|
||||||
} elseif ($datarray["uid"] == 0) {
|
} elseif ($datarray['uid'] == 0) {
|
||||||
$datarray["post-reason"] = Item::PR_GLOBAL;
|
$datarray['post-reason'] = Item::PR_GLOBAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
$datarray["body"] = self::replacePeopleGuid($body, $contact["url"]);
|
$datarray['body'] = self::replacePeopleGuid($body, $contact['url']);
|
||||||
$datarray["raw-body"] = self::replacePeopleGuid($raw_body, $contact["url"]);
|
$datarray['raw-body'] = self::replacePeopleGuid($raw_body, $contact['url']);
|
||||||
|
|
||||||
self::storeMentions($datarray['uri-id'], $text);
|
self::storeMentions($datarray['uri-id'], $text);
|
||||||
Tag::storeRawTagsFromBody($datarray['uri-id'], $datarray["body"]);
|
Tag::storeRawTagsFromBody($datarray['uri-id'], $datarray['body']);
|
||||||
|
|
||||||
if (!self::isSolicitedMessage($datarray, $author, $body, $direction)) {
|
if (!self::isSolicitedMessage($datarray, $author, $body, $direction)) {
|
||||||
DBA::delete('item-uri', ['uri' => $datarray['uri']]);
|
DBA::delete('item-uri', ['uri' => $datarray['uri']]);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($provider_display_name != "") {
|
if ($provider_display_name != '') {
|
||||||
$datarray["app"] = $provider_display_name;
|
$datarray['app'] = $provider_display_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
$datarray["plink"] = self::plink($author, $guid);
|
$datarray['plink'] = self::plink($author, $guid);
|
||||||
$datarray["private"] = (($public == "false") ? Item::PRIVATE : Item::PUBLIC);
|
$datarray['private'] = (($public == 'false') ? Item::PRIVATE : Item::PUBLIC);
|
||||||
$datarray["changed"] = $datarray["created"] = $datarray["edited"] = $created_at;
|
$datarray['changed'] = $datarray['created'] = $datarray['edited'] = $created_at;
|
||||||
|
|
||||||
if (isset($address["address"])) {
|
if (isset($address['address'])) {
|
||||||
$datarray["location"] = $address["address"];
|
$datarray['location'] = $address['address'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($address["lat"]) && isset($address["lng"])) {
|
if (isset($address['lat']) && isset($address['lng'])) {
|
||||||
$datarray["coord"] = $address["lat"]." ".$address["lng"];
|
$datarray['coord'] = $address['lat'] . " " . $address['lng'];
|
||||||
}
|
}
|
||||||
|
|
||||||
self::fetchGuid($datarray);
|
self::fetchGuid($datarray);
|
||||||
|
|
@ -2804,7 +2823,7 @@ class Diaspora
|
||||||
self::sendParticipation($contact, $datarray);
|
self::sendParticipation($contact, $datarray);
|
||||||
|
|
||||||
if ($message_id) {
|
if ($message_id) {
|
||||||
Logger::info("Stored item ".$datarray["guid"]." with message id ".$message_id);
|
Logger::info("Stored item " . $datarray['guid'] . " with message id " . $message_id);
|
||||||
if ($datarray['uid'] == 0) {
|
if ($datarray['uid'] == 0) {
|
||||||
Item::distribute($message_id);
|
Item::distribute($message_id);
|
||||||
}
|
}
|
||||||
|
|
@ -2826,21 +2845,21 @@ class Diaspora
|
||||||
* @return string the handle in the format user@domain.tld
|
* @return string the handle in the format user@domain.tld
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
private static function myHandle(array $contact)
|
private static function myHandle(array $contact): string
|
||||||
{
|
{
|
||||||
if (!empty($contact["addr"])) {
|
if (!empty($contact['addr'])) {
|
||||||
return $contact["addr"];
|
return $contact['addr'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Normally we should have a filled "addr" field - but in the past this wasn't the case
|
// 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 the address here.
|
||||||
if ($contact["nickname"] != "") {
|
if ($contact['nickname'] != '') {
|
||||||
$nick = $contact["nickname"];
|
$nick = $contact['nickname'];
|
||||||
} else {
|
} else {
|
||||||
$nick = $contact["nick"];
|
$nick = $contact['nick'];
|
||||||
}
|
}
|
||||||
|
|
||||||
return $nick . "@" . substr(DI::baseUrl(), strpos(DI::baseUrl(), "://") + 3);
|
return $nick . '@' . substr(DI::baseUrl(), strpos(DI::baseUrl(), '://') + 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -2856,7 +2875,7 @@ class Diaspora
|
||||||
* @return string The encrypted data
|
* @return string The encrypted data
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function encodePrivateData($msg, array $user, array $contact, $prvkey, $pubkey)
|
public static function encodePrivateData(string $msg, array $user, array $contact, string $prvkey, string $pubkey): string
|
||||||
{
|
{
|
||||||
Logger::debug("Message: ".$msg);
|
Logger::debug("Message: ".$msg);
|
||||||
|
|
||||||
|
|
@ -2873,16 +2892,18 @@ class Diaspora
|
||||||
|
|
||||||
$ciphertext = self::aesEncrypt($aes_key, $iv, $msg);
|
$ciphertext = self::aesEncrypt($aes_key, $iv, $msg);
|
||||||
|
|
||||||
$json = json_encode(["iv" => $b_iv, "key" => $b_aes_key]);
|
$json = json_encode(['iv' => $b_iv, 'key' => $b_aes_key]);
|
||||||
|
|
||||||
$encrypted_key_bundle = "";
|
$encrypted_key_bundle = '';
|
||||||
if (!@openssl_public_encrypt($json, $encrypted_key_bundle, $pubkey)) {
|
if (!@openssl_public_encrypt($json, $encrypted_key_bundle, $pubkey)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$json_object = json_encode(
|
$json_object = json_encode(
|
||||||
["aes_key" => base64_encode($encrypted_key_bundle),
|
[
|
||||||
"encrypted_magic_envelope" => base64_encode($ciphertext)]
|
'aes_key' => base64_encode($encrypted_key_bundle),
|
||||||
|
'encrypted_magic_envelope' => base64_encode($ciphertext)
|
||||||
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
return $json_object;
|
return $json_object;
|
||||||
|
|
@ -2897,33 +2918,37 @@ class Diaspora
|
||||||
* @return string The envelope
|
* @return string The envelope
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function buildMagicEnvelope($msg, array $user)
|
public static function buildMagicEnvelope(string $msg, array $user): string
|
||||||
{
|
{
|
||||||
$b64url_data = Strings::base64UrlEncode($msg);
|
$b64url_data = Strings::base64UrlEncode($msg);
|
||||||
$data = str_replace(["\n", "\r", " ", "\t"], ["", "", "", ""], $b64url_data);
|
$data = str_replace(["\n", "\r", " ", "\t"], ['', '', '', ''], $b64url_data);
|
||||||
|
|
||||||
$key_id = Strings::base64UrlEncode(self::myHandle($user));
|
$key_id = Strings::base64UrlEncode(self::myHandle($user));
|
||||||
$type = "application/xml";
|
$type = 'application/xml';
|
||||||
$encoding = "base64url";
|
$encoding = 'base64url';
|
||||||
$alg = "RSA-SHA256";
|
$alg = 'RSA-SHA256';
|
||||||
$signable_data = $data.".".Strings::base64UrlEncode($type).".".Strings::base64UrlEncode($encoding).".".Strings::base64UrlEncode($alg);
|
$signable_data = $data . '.' . Strings::base64UrlEncode($type) . '.' . Strings::base64UrlEncode($encoding) . '.' . Strings::base64UrlEncode($alg);
|
||||||
|
|
||||||
// Fallback if the private key wasn't transmitted in the expected field
|
// Fallback if the private key wasn't transmitted in the expected field
|
||||||
if ($user['uprvkey'] == "") {
|
if ($user['uprvkey'] == '') {
|
||||||
$user['uprvkey'] = $user['prvkey'];
|
$user['uprvkey'] = $user['prvkey'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$signature = Crypto::rsaSign($signable_data, $user["uprvkey"]);
|
$signature = Crypto::rsaSign($signable_data, $user['uprvkey']);
|
||||||
$sig = Strings::base64UrlEncode($signature);
|
$sig = Strings::base64UrlEncode($signature);
|
||||||
|
|
||||||
$xmldata = ["me:env" => ["me:data" => $data,
|
$xmldata = [
|
||||||
"@attributes" => ["type" => $type],
|
'me:env' => [
|
||||||
"me:encoding" => $encoding,
|
'me:data' => $data,
|
||||||
"me:alg" => $alg,
|
'@attributes' => ['type' => $type],
|
||||||
"me:sig" => $sig,
|
'me:encoding' => $encoding,
|
||||||
"@attributes2" => ["key_id" => $key_id]]];
|
'me:alg' => $alg,
|
||||||
|
'me:sig' => $sig,
|
||||||
|
'@attributes2' => ['key_id' => $key_id]
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
$namespaces = ["me" => "http://salmon-protocol.org/ns/magic-env"];
|
$namespaces = ['me' => 'http://salmon-protocol.org/ns/magic-env'];
|
||||||
|
|
||||||
return XML::fromArray($xmldata, $xml, false, $namespaces);
|
return XML::fromArray($xmldata, $xml, false, $namespaces);
|
||||||
}
|
}
|
||||||
|
|
@ -2941,7 +2966,7 @@ class Diaspora
|
||||||
* @return string The message that will be transmitted to other servers
|
* @return string The message that will be transmitted to other servers
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function buildMessage($msg, array $user, array $contact, $prvkey, $pubkey, $public = false)
|
public static function buildMessage(string $msg, array $user, array $contact, string $prvkey, string $pubkey, bool $public = false): string
|
||||||
{
|
{
|
||||||
// The message is put into an envelope with the sender's signature
|
// The message is put into an envelope with the sender's signature
|
||||||
$envelope = self::buildMagicEnvelope($msg, $user);
|
$envelope = self::buildMagicEnvelope($msg, $user);
|
||||||
|
|
@ -2962,15 +2987,15 @@ class Diaspora
|
||||||
*
|
*
|
||||||
* @return string The signature
|
* @return string The signature
|
||||||
*/
|
*/
|
||||||
private static function signature($owner, $message)
|
private static function signature(array $owner, array $message): string
|
||||||
{
|
{
|
||||||
$sigmsg = $message;
|
$sigmsg = $message;
|
||||||
unset($sigmsg["author_signature"]);
|
unset($sigmsg['author_signature']);
|
||||||
unset($sigmsg["parent_author_signature"]);
|
unset($sigmsg['parent_author_signature']);
|
||||||
|
|
||||||
$signed_text = implode(";", $sigmsg);
|
$signed_text = implode(';', $sigmsg);
|
||||||
|
|
||||||
return base64_encode(Crypto::rsaSign($signed_text, $owner["uprvkey"], "sha256"));
|
return base64_encode(Crypto::rsaSign($signed_text, $owner['uprvkey'], 'sha256'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -2986,9 +3011,9 @@ class Diaspora
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
private static function transmit(array $owner, array $contact, $envelope, $public_batch, $guid = "")
|
private static function transmit(array $owner, array $contact, string $envelope, bool $public_batch, string $guid = ''): int
|
||||||
{
|
{
|
||||||
$enabled = intval(DI::config()->get("system", "diaspora_enabled"));
|
$enabled = intval(DI::config()->get('system', 'diaspora_enabled'));
|
||||||
if (!$enabled) {
|
if (!$enabled) {
|
||||||
return 200;
|
return 200;
|
||||||
}
|
}
|
||||||
|
|
@ -3000,32 +3025,32 @@ class Diaspora
|
||||||
if (!empty($contact['addr'])) {
|
if (!empty($contact['addr'])) {
|
||||||
$fcontact = FContact::getByURL($contact['addr']);
|
$fcontact = FContact::getByURL($contact['addr']);
|
||||||
if (!empty($fcontact)) {
|
if (!empty($fcontact)) {
|
||||||
$dest_url = ($public_batch ? $fcontact["batch"] : $fcontact["notify"]);
|
$dest_url = ($public_batch ? $fcontact['batch'] : $fcontact['notify']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($dest_url)) {
|
if (empty($dest_url)) {
|
||||||
$dest_url = ($public_batch ? $contact["batch"] : $contact["notify"]);
|
$dest_url = ($public_batch ? $contact['batch'] : $contact['notify']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$dest_url) {
|
if (!$dest_url) {
|
||||||
Logger::notice("no url for contact: ".$contact["id"]." batch mode =".$public_batch);
|
Logger::notice("no url for contact: " . $contact['id'] . " batch mode =" . $public_batch);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger::notice("transmit: ".$logid."-".$guid." ".$dest_url);
|
Logger::notice("transmit: " . $logid . "-" . $guid . " " . $dest_url);
|
||||||
|
|
||||||
if (!intval(DI::config()->get("system", "diaspora_test"))) {
|
if (!intval(DI::config()->get('system', 'diaspora_test'))) {
|
||||||
$content_type = (($public_batch) ? "application/magic-envelope+xml" : "application/json");
|
$content_type = (($public_batch) ? 'application/magic-envelope+xml' : 'application/json');
|
||||||
|
|
||||||
$postResult = DI::httpClient()->post($dest_url . "/", $envelope, ['Content-Type' => $content_type]);
|
$postResult = DI::httpClient()->post($dest_url . '/', $envelope, ['Content-Type' => $content_type]);
|
||||||
$return_code = $postResult->getReturnCode();
|
$return_code = $postResult->getReturnCode();
|
||||||
} else {
|
} else {
|
||||||
Logger::notice("test_mode");
|
Logger::notice('test_mode');
|
||||||
return 200;
|
return 200;
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger::notice("transmit: ".$logid."-".$guid." to ".$dest_url." returns: ".$return_code);
|
Logger::notice("transmit: " . $logid . "-" . $guid . " to " . $dest_url . " returns: " . $return_code);
|
||||||
|
|
||||||
return $return_code ? $return_code : -1;
|
return $return_code ? $return_code : -1;
|
||||||
}
|
}
|
||||||
|
|
@ -3039,7 +3064,7 @@ class Diaspora
|
||||||
*
|
*
|
||||||
* @return string The post XML
|
* @return string The post XML
|
||||||
*/
|
*/
|
||||||
public static function buildPostXml($type, $message)
|
public static function buildPostXml(string $type, array $message): string
|
||||||
{
|
{
|
||||||
$data = [$type => $message];
|
$data = [$type => $message];
|
||||||
|
|
||||||
|
|
@ -3060,7 +3085,7 @@ class Diaspora
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
private static function buildAndTransmit(array $owner, array $contact, $type, $message, $public_batch = false, $guid = "")
|
private static function buildAndTransmit(array $owner, array $contact, string $type, array $message, bool $public_batch = false, string $guid = '')
|
||||||
{
|
{
|
||||||
$msg = self::buildPostXml($type, $message);
|
$msg = self::buildPostXml($type, $message);
|
||||||
|
|
||||||
|
|
@ -3103,18 +3128,18 @@ class Diaspora
|
||||||
* @return int The result of the transmission
|
* @return int The result of the transmission
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function sendParticipation(array $contact, array $item)
|
private static function sendParticipation(array $contact, array $item): int
|
||||||
{
|
{
|
||||||
// Don't send notifications for private postings
|
// Don't send notifications for private postings
|
||||||
if ($item['private'] == Item::PRIVATE) {
|
if ($item['private'] == Item::PRIVATE) {
|
||||||
return;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$cachekey = "diaspora:sendParticipation:".$item['guid'];
|
$cachekey = 'diaspora:sendParticipation:' . $item['guid'];
|
||||||
|
|
||||||
$result = DI::cache()->get($cachekey);
|
$result = DI::cache()->get($cachekey);
|
||||||
if (!is_null($result)) {
|
if (!is_null($result)) {
|
||||||
return;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fetch some user id to have a valid handle to transmit the participation.
|
// Fetch some user id to have a valid handle to transmit the participation.
|
||||||
|
|
@ -3132,17 +3157,19 @@ class Diaspora
|
||||||
|
|
||||||
$author = self::myHandle($owner);
|
$author = self::myHandle($owner);
|
||||||
|
|
||||||
$message = ["author" => $author,
|
$message = [
|
||||||
"guid" => System::createUUID(),
|
'author' => $author,
|
||||||
"parent_type" => "Post",
|
'guid' => System::createUUID(),
|
||||||
"parent_guid" => $item["guid"]];
|
'parent_type' => 'Post',
|
||||||
|
'parent_guid' => $item['guid']
|
||||||
|
];
|
||||||
|
|
||||||
Logger::info("Send participation for ".$item["guid"]." by ".$author);
|
Logger::info("Send participation for " . $item['guid'] . " by " . $author);
|
||||||
|
|
||||||
// It doesn't matter what we store, we only want to avoid sending repeated notifications for the same item
|
// It doesn't matter what we store, we only want to avoid sending repeated notifications for the same item
|
||||||
DI::cache()->set($cachekey, $item["guid"], Duration::QUARTER_HOUR);
|
DI::cache()->set($cachekey, $item['guid'], Duration::QUARTER_HOUR);
|
||||||
|
|
||||||
return self::buildAndTransmit($owner, $contact, "participation", $message);
|
return self::buildAndTransmit($owner, $contact, 'participation', $message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -3156,21 +3183,23 @@ class Diaspora
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function sendAccountMigration(array $owner, array $contact, $uid)
|
public static function sendAccountMigration(array $owner, array $contact, int $uid): int
|
||||||
{
|
{
|
||||||
$old_handle = DI::pConfig()->get($uid, 'system', 'previous_addr');
|
$old_handle = DI::pConfig()->get($uid, 'system', 'previous_addr');
|
||||||
$profile = self::createProfileData($uid);
|
$profile = self::createProfileData($uid);
|
||||||
|
|
||||||
$signed_text = 'AccountMigration:'.$old_handle.':'.$profile['author'];
|
$signed_text = 'AccountMigration:'.$old_handle.':'.$profile['author'];
|
||||||
$signature = base64_encode(Crypto::rsaSign($signed_text, $owner["uprvkey"], "sha256"));
|
$signature = base64_encode(Crypto::rsaSign($signed_text, $owner['uprvkey'], 'sha256'));
|
||||||
|
|
||||||
$message = ["author" => $old_handle,
|
$message = [
|
||||||
"profile" => $profile,
|
'author' => $old_handle,
|
||||||
"signature" => $signature];
|
'profile' => $profile,
|
||||||
|
'signature' => $signature
|
||||||
|
];
|
||||||
|
|
||||||
Logger::info('Send account migration', ['msg' => $message]);
|
Logger::info('Send account migration', ['msg' => $message]);
|
||||||
|
|
||||||
return self::buildAndTransmit($owner, $contact, "account_migration", $message);
|
return self::buildAndTransmit($owner, $contact, 'account_migration', $message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -3182,7 +3211,7 @@ class Diaspora
|
||||||
* @return int The result of the transmission
|
* @return int The result of the transmission
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function sendShare(array $owner, array $contact)
|
public static function sendShare(array $owner, array $contact): int
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @todo support the different possible combinations of "following" and "sharing"
|
* @todo support the different possible combinations of "following" and "sharing"
|
||||||
|
|
@ -3207,14 +3236,16 @@ class Diaspora
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$message = ["author" => self::myHandle($owner),
|
$message = [
|
||||||
"recipient" => $contact["addr"],
|
'author' => self::myHandle($owner),
|
||||||
"following" => "true",
|
'recipient' => $contact['addr'],
|
||||||
"sharing" => "true"];
|
'following' => 'true',
|
||||||
|
'sharing' => 'true'
|
||||||
|
];
|
||||||
|
|
||||||
Logger::info('Send share', ['msg' => $message]);
|
Logger::info('Send share', ['msg' => $message]);
|
||||||
|
|
||||||
return self::buildAndTransmit($owner, $contact, "contact", $message);
|
return self::buildAndTransmit($owner, $contact, 'contact', $message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -3226,16 +3257,18 @@ class Diaspora
|
||||||
* @return int The result of the transmission
|
* @return int The result of the transmission
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function sendUnshare(array $owner, array $contact)
|
public static function sendUnshare(array $owner, array $contact): int
|
||||||
{
|
{
|
||||||
$message = ["author" => self::myHandle($owner),
|
$message = [
|
||||||
"recipient" => $contact["addr"],
|
'author' => self::myHandle($owner),
|
||||||
"following" => "false",
|
'recipient' => $contact['addr'],
|
||||||
"sharing" => "false"];
|
'following' => 'false',
|
||||||
|
'sharing' => 'false'
|
||||||
|
];
|
||||||
|
|
||||||
Logger::info('Send unshare', ['msg' => $message]);
|
Logger::info('Send unshare', ['msg' => $message]);
|
||||||
|
|
||||||
return self::buildAndTransmit($owner, $contact, "contact", $message);
|
return self::buildAndTransmit($owner, $contact, 'contact', $message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -3248,7 +3281,7 @@ class Diaspora
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function isReshare($body, $complete = true)
|
public static function isReshare(string $body, bool $complete = true)
|
||||||
{
|
{
|
||||||
$body = trim($body);
|
$body = trim($body);
|
||||||
|
|
||||||
|
|
@ -3268,8 +3301,8 @@ class Diaspora
|
||||||
$item = Post::selectFirst(['contact-id'], $condition);
|
$item = Post::selectFirst(['contact-id'], $condition);
|
||||||
if (DBA::isResult($item)) {
|
if (DBA::isResult($item)) {
|
||||||
$ret = [];
|
$ret = [];
|
||||||
$ret["root_handle"] = self::handleFromContact($item["contact-id"]);
|
$ret['root_handle'] = self::handleFromContact($item['contact-id']);
|
||||||
$ret["root_guid"] = $reshared['guid'];
|
$ret['root_guid'] = $reshared['guid'];
|
||||||
return $ret;
|
return $ret;
|
||||||
} elseif ($complete) {
|
} elseif ($complete) {
|
||||||
// We are resharing something that isn't a DFRN or Diaspora post.
|
// We are resharing something that isn't a DFRN or Diaspora post.
|
||||||
|
|
@ -3304,7 +3337,7 @@ class Diaspora
|
||||||
* @return array with event data
|
* @return array with event data
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
private static function buildEvent($event_id)
|
private static function buildEvent(string $event_id): array
|
||||||
{
|
{
|
||||||
$event = DBA::selectFirst('event', [], ['id' => $event_id]);
|
$event = DBA::selectFirst('event', [], ['id' => $event_id]);
|
||||||
if (!DBA::isResult($event)) {
|
if (!DBA::isResult($event)) {
|
||||||
|
|
@ -3327,7 +3360,7 @@ class Diaspora
|
||||||
$mask = DateTimeFormat::ATOM;
|
$mask = DateTimeFormat::ATOM;
|
||||||
|
|
||||||
/// @todo - establish "all day" events in Friendica
|
/// @todo - establish "all day" events in Friendica
|
||||||
$eventdata["all_day"] = "false";
|
$eventdata['all_day'] = 'false';
|
||||||
|
|
||||||
$eventdata['timezone'] = 'UTC';
|
$eventdata['timezone'] = 'UTC';
|
||||||
|
|
||||||
|
|
@ -3348,13 +3381,13 @@ class Diaspora
|
||||||
$coord = Map::getCoordinates($event['location']);
|
$coord = Map::getCoordinates($event['location']);
|
||||||
|
|
||||||
$location = [];
|
$location = [];
|
||||||
$location["address"] = html_entity_decode(BBCode::toMarkdown($event['location']));
|
$location['address'] = html_entity_decode(BBCode::toMarkdown($event['location']));
|
||||||
if (!empty($coord['lat']) && !empty($coord['lon'])) {
|
if (!empty($coord['lat']) && !empty($coord['lon'])) {
|
||||||
$location["lat"] = $coord['lat'];
|
$location['lat'] = $coord['lat'];
|
||||||
$location["lng"] = $coord['lon'];
|
$location['lng'] = $coord['lon'];
|
||||||
} else {
|
} else {
|
||||||
$location["lat"] = 0;
|
$location['lat'] = 0;
|
||||||
$location["lng"] = 0;
|
$location['lng'] = 0;
|
||||||
}
|
}
|
||||||
$eventdata['location'] = $location;
|
$eventdata['location'] = $location;
|
||||||
}
|
}
|
||||||
|
|
@ -3376,7 +3409,7 @@ class Diaspora
|
||||||
*/
|
*/
|
||||||
public static function buildStatus(array $item, array $owner)
|
public static function buildStatus(array $item, array $owner)
|
||||||
{
|
{
|
||||||
$cachekey = "diaspora:buildStatus:".$item['guid'];
|
$cachekey = 'diaspora:buildStatus:' . $item['guid'];
|
||||||
|
|
||||||
$result = DI::cache()->get($cachekey);
|
$result = DI::cache()->get($cachekey);
|
||||||
if (!is_null($result)) {
|
if (!is_null($result)) {
|
||||||
|
|
@ -3385,27 +3418,29 @@ class Diaspora
|
||||||
|
|
||||||
$myaddr = self::myHandle($owner);
|
$myaddr = self::myHandle($owner);
|
||||||
|
|
||||||
$public = ($item["private"] == Item::PRIVATE ? "false" : "true");
|
$public = ($item['private'] == Item::PRIVATE ? 'false' : 'true');
|
||||||
$created = DateTimeFormat::utc($item['received'], DateTimeFormat::ATOM);
|
$created = DateTimeFormat::utc($item['received'], DateTimeFormat::ATOM);
|
||||||
$edited = DateTimeFormat::utc($item["edited"] ?? $item["created"], DateTimeFormat::ATOM);
|
$edited = DateTimeFormat::utc($item['edited'] ?? $item['created'], DateTimeFormat::ATOM);
|
||||||
|
|
||||||
// Detect a share element and do a reshare
|
// Detect a share element and do a reshare
|
||||||
if (($item['private'] != Item::PRIVATE) && ($ret = self::isReshare($item["body"]))) {
|
if (($item['private'] != Item::PRIVATE) && ($ret = self::isReshare($item['body']))) {
|
||||||
$message = ["author" => $myaddr,
|
$message = [
|
||||||
"guid" => $item["guid"],
|
'author' => $myaddr,
|
||||||
"created_at" => $created,
|
'guid' => $item['guid'],
|
||||||
"root_author" => $ret["root_handle"],
|
'created_at' => $created,
|
||||||
"root_guid" => $ret["root_guid"],
|
'root_author' => $ret['root_handle'],
|
||||||
"provider_display_name" => $item["app"],
|
'root_guid' => $ret['root_guid'],
|
||||||
"public" => $public];
|
'provider_display_name' => $item['app'],
|
||||||
|
'public' => $public
|
||||||
|
];
|
||||||
|
|
||||||
$type = "reshare";
|
$type = 'reshare';
|
||||||
} else {
|
} else {
|
||||||
$title = $item["title"];
|
$title = $item['title'];
|
||||||
$body = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body']);
|
$body = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body']);
|
||||||
|
|
||||||
// Fetch the title from an attached link - if there is one
|
// Fetch the title from an attached link - if there is one
|
||||||
if (empty($item["title"]) && DI::pConfig()->get($owner['uid'], 'system', 'attach_link_title')) {
|
if (empty($item['title']) && DI::pConfig()->get($owner['uid'], 'system', 'attach_link_title')) {
|
||||||
$page_data = BBCode::getAttachmentData($item['body']);
|
$page_data = BBCode::getAttachmentData($item['body']);
|
||||||
if (!empty($page_data['type']) && !empty($page_data['title']) && ($page_data['type'] == 'link')) {
|
if (!empty($page_data['type']) && !empty($page_data['title']) && ($page_data['type'] == 'link')) {
|
||||||
$title = $page_data['title'];
|
$title = $page_data['title'];
|
||||||
|
|
@ -3422,7 +3457,7 @@ class Diaspora
|
||||||
|
|
||||||
// Adding the title
|
// Adding the title
|
||||||
if (strlen($title)) {
|
if (strlen($title)) {
|
||||||
$body = "### ".html_entity_decode($title)."\n\n".$body;
|
$body = '### ' . html_entity_decode($title) . "\n\n" . $body;
|
||||||
}
|
}
|
||||||
|
|
||||||
$attachments = Post\Media::getByURIId($item['uri-id'], [Post\Media::DOCUMENT, Post\Media::TORRENT, Post\Media::UNKNOWN]);
|
$attachments = Post\Media::getByURIId($item['uri-id'], [Post\Media::DOCUMENT, Post\Media::TORRENT, Post\Media::UNKNOWN]);
|
||||||
|
|
@ -3435,27 +3470,29 @@ class Diaspora
|
||||||
|
|
||||||
$location = [];
|
$location = [];
|
||||||
|
|
||||||
if ($item["location"] != "")
|
if ($item['location'] != '')
|
||||||
$location["address"] = $item["location"];
|
$location['address'] = $item['location'];
|
||||||
|
|
||||||
if ($item["coord"] != "") {
|
if ($item['coord'] != '') {
|
||||||
$coord = explode(" ", $item["coord"]);
|
$coord = explode(' ', $item['coord']);
|
||||||
$location["lat"] = $coord[0];
|
$location['lat'] = $coord[0];
|
||||||
$location["lng"] = $coord[1];
|
$location['lng'] = $coord[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
$message = ["author" => $myaddr,
|
$message = [
|
||||||
"guid" => $item["guid"],
|
'author' => $myaddr,
|
||||||
"created_at" => $created,
|
'guid' => $item['guid'],
|
||||||
"edited_at" => $edited,
|
'created_at' => $created,
|
||||||
"public" => $public,
|
'edited_at' => $edited,
|
||||||
"text" => $body,
|
'public' => $public,
|
||||||
"provider_display_name" => $item["app"],
|
'text' => $body,
|
||||||
"location" => $location];
|
'provider_display_name' => $item['app'],
|
||||||
|
'location' => $location
|
||||||
|
];
|
||||||
|
|
||||||
// Diaspora rejects messages when they contain a location without "lat" or "lng"
|
// Diaspora rejects messages when they contain a location without "lat" or "lng"
|
||||||
if (!isset($location["lat"]) || !isset($location["lng"])) {
|
if (!isset($location['lat']) || !isset($location['lng'])) {
|
||||||
unset($message["location"]);
|
unset($message['location']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($item['event-id'] > 0) {
|
if ($item['event-id'] > 0) {
|
||||||
|
|
@ -3474,17 +3511,20 @@ class Diaspora
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$type = "status_message";
|
$type = 'status_message';
|
||||||
}
|
}
|
||||||
|
|
||||||
$msg = ["type" => $type, "message" => $message];
|
$msg = [
|
||||||
|
'type' => $type,
|
||||||
|
'message' => $message
|
||||||
|
];
|
||||||
|
|
||||||
DI::cache()->set($cachekey, $msg, Duration::QUARTER_HOUR);
|
DI::cache()->set($cachekey, $msg, Duration::QUARTER_HOUR);
|
||||||
|
|
||||||
return $msg;
|
return $msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function prependParentAuthorMention($body, $profile_url)
|
private static function prependParentAuthorMention(string $body, string $profile_url): string
|
||||||
{
|
{
|
||||||
$profile = Contact::getByURL($profile_url, false, ['addr', 'name']);
|
$profile = Contact::getByURL($profile_url, false, ['addr', 'name']);
|
||||||
if (!empty($profile['addr'])
|
if (!empty($profile['addr'])
|
||||||
|
|
@ -3509,11 +3549,11 @@ class Diaspora
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function sendStatus(array $item, array $owner, array $contact, $public_batch = false)
|
public static function sendStatus(array $item, array $owner, array $contact, bool $public_batch = false): int
|
||||||
{
|
{
|
||||||
$status = self::buildStatus($item, $owner);
|
$status = self::buildStatus($item, $owner);
|
||||||
|
|
||||||
return self::buildAndTransmit($owner, $contact, $status["type"], $status["message"], $public_batch, $item["guid"]);
|
return self::buildAndTransmit($owner, $contact, $status['type'], $status['message'], $public_batch, $item['guid']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -3522,30 +3562,32 @@ class Diaspora
|
||||||
* @param array $item The item that will be exported
|
* @param array $item The item that will be exported
|
||||||
* @param array $owner the array of the item owner
|
* @param array $owner the array of the item owner
|
||||||
*
|
*
|
||||||
* @return array The data for a "like"
|
* @return array|bool The data for a "like" or false on error
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
private static function constructLike(array $item, array $owner)
|
private static function constructLike(array $item, array $owner)
|
||||||
{
|
{
|
||||||
$parent = Post::selectFirst(['guid', 'uri', 'thr-parent'], ['uri' => $item["thr-parent"]]);
|
$parent = Post::selectFirst(['guid', 'uri', 'thr-parent'], ['uri' => $item['thr-parent']]);
|
||||||
if (!DBA::isResult($parent)) {
|
if (!DBA::isResult($parent)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$target_type = ($parent["uri"] === $parent["thr-parent"] ? "Post" : "Comment");
|
$target_type = ($parent['uri'] === $parent['thr-parent'] ? 'Post' : 'Comment');
|
||||||
$positive = null;
|
$positive = null;
|
||||||
if ($item['verb'] === Activity::LIKE) {
|
if ($item['verb'] === Activity::LIKE) {
|
||||||
$positive = "true";
|
$positive = 'true';
|
||||||
} elseif ($item['verb'] === Activity::DISLIKE) {
|
} elseif ($item['verb'] === Activity::DISLIKE) {
|
||||||
$positive = "false";
|
$positive = 'false';
|
||||||
}
|
}
|
||||||
|
|
||||||
return(["author" => self::myHandle($owner),
|
return [
|
||||||
"guid" => $item["guid"],
|
'author' => self::myHandle($owner),
|
||||||
"parent_guid" => $parent["guid"],
|
'guid' => $item['guid'],
|
||||||
"parent_type" => $target_type,
|
'parent_guid' => $parent['guid'],
|
||||||
"positive" => $positive,
|
'parent_type' => $target_type,
|
||||||
"author_signature" => ""]);
|
'positive' => $positive,
|
||||||
|
'author_signature' => ''
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -3554,7 +3596,7 @@ class Diaspora
|
||||||
* @param array $item The item that will be exported
|
* @param array $item The item that will be exported
|
||||||
* @param array $owner the array of the item owner
|
* @param array $owner the array of the item owner
|
||||||
*
|
*
|
||||||
* @return array The data for an "EventParticipation"
|
* @return array|bool The data for an "EventParticipation" or false on error
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function constructAttend(array $item, array $owner)
|
private static function constructAttend(array $item, array $owner)
|
||||||
|
|
@ -3579,11 +3621,13 @@ class Diaspora
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return(["author" => self::myHandle($owner),
|
return [
|
||||||
"guid" => $item["guid"],
|
'author' => self::myHandle($owner),
|
||||||
"parent_guid" => $parent["guid"],
|
'guid' => $item['guid'],
|
||||||
"status" => $attend_answer,
|
'parent_guid' => $parent['guid'],
|
||||||
"author_signature" => ""]);
|
'status' => $attend_answer,
|
||||||
|
'author_signature' => ''
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -3597,7 +3641,7 @@ class Diaspora
|
||||||
*/
|
*/
|
||||||
private static function constructComment(array $item, array $owner)
|
private static function constructComment(array $item, array $owner)
|
||||||
{
|
{
|
||||||
$cachekey = "diaspora:constructComment:".$item['guid'];
|
$cachekey = 'diaspora:constructComment:' . $item['guid'];
|
||||||
|
|
||||||
$result = DI::cache()->get($cachekey);
|
$result = DI::cache()->get($cachekey);
|
||||||
if (!is_null($result)) {
|
if (!is_null($result)) {
|
||||||
|
|
@ -3631,17 +3675,17 @@ class Diaspora
|
||||||
}
|
}
|
||||||
|
|
||||||
$text = html_entity_decode(BBCode::toMarkdown($body));
|
$text = html_entity_decode(BBCode::toMarkdown($body));
|
||||||
$created = DateTimeFormat::utc($item["created"], DateTimeFormat::ATOM);
|
$created = DateTimeFormat::utc($item['created'], DateTimeFormat::ATOM);
|
||||||
$edited = DateTimeFormat::utc($item["edited"], DateTimeFormat::ATOM);
|
$edited = DateTimeFormat::utc($item['edited'], DateTimeFormat::ATOM);
|
||||||
|
|
||||||
$comment = [
|
$comment = [
|
||||||
"author" => self::myHandle($owner),
|
'author' => self::myHandle($owner),
|
||||||
"guid" => $item["guid"],
|
'guid' => $item['guid'],
|
||||||
"created_at" => $created,
|
'created_at' => $created,
|
||||||
"edited_at" => $edited,
|
'edited_at' => $edited,
|
||||||
"parent_guid" => $toplevel_item["guid"],
|
'parent_guid' => $toplevel_item['guid'],
|
||||||
"text" => $text,
|
'text' => $text,
|
||||||
"author_signature" => ""
|
'author_signature' => ''
|
||||||
];
|
];
|
||||||
|
|
||||||
// Send the thread parent guid only if it is a threaded comment
|
// Send the thread parent guid only if it is a threaded comment
|
||||||
|
|
@ -3651,7 +3695,7 @@ class Diaspora
|
||||||
|
|
||||||
DI::cache()->set($cachekey, $comment, Duration::QUARTER_HOUR);
|
DI::cache()->set($cachekey, $comment, Duration::QUARTER_HOUR);
|
||||||
|
|
||||||
return($comment);
|
return $comment;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -3666,26 +3710,26 @@ class Diaspora
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function sendFollowup(array $item, array $owner, array $contact, $public_batch = false)
|
public static function sendFollowup(array $item, array $owner, array $contact, bool $public_batch = false): int
|
||||||
{
|
{
|
||||||
if (in_array($item['verb'], [Activity::ATTEND, Activity::ATTENDNO, Activity::ATTENDMAYBE])) {
|
if (in_array($item['verb'], [Activity::ATTEND, Activity::ATTENDNO, Activity::ATTENDMAYBE])) {
|
||||||
$message = self::constructAttend($item, $owner);
|
$message = self::constructAttend($item, $owner);
|
||||||
$type = "event_participation";
|
$type = 'event_participation';
|
||||||
} elseif (in_array($item["verb"], [Activity::LIKE, Activity::DISLIKE])) {
|
} elseif (in_array($item['verb'], [Activity::LIKE, Activity::DISLIKE])) {
|
||||||
$message = self::constructLike($item, $owner);
|
$message = self::constructLike($item, $owner);
|
||||||
$type = "like";
|
$type = 'like';
|
||||||
} elseif (!in_array($item["verb"], [Activity::FOLLOW, Activity::TAG])) {
|
} elseif (!in_array($item['verb'], [Activity::FOLLOW, Activity::TAG])) {
|
||||||
$message = self::constructComment($item, $owner);
|
$message = self::constructComment($item, $owner);
|
||||||
$type = "comment";
|
$type = 'comment';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($message)) {
|
if (empty($message)) {
|
||||||
return false;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$message["author_signature"] = self::signature($owner, $message);
|
$message['author_signature'] = self::signature($owner, $message);
|
||||||
|
|
||||||
return self::buildAndTransmit($owner, $contact, $type, $message, $public_batch, $item["guid"]);
|
return self::buildAndTransmit($owner, $contact, $type, $message, $public_batch, $item['guid']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -3699,43 +3743,43 @@ class Diaspora
|
||||||
* @return int The result of the transmission
|
* @return int The result of the transmission
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function sendRelay(array $item, array $owner, array $contact, $public_batch = false)
|
public static function sendRelay(array $item, array $owner, array $contact, bool $public_batch = false): int
|
||||||
{
|
{
|
||||||
if ($item["deleted"]) {
|
if ($item['deleted']) {
|
||||||
return self::sendRetraction($item, $owner, $contact, $public_batch, true);
|
return self::sendRetraction($item, $owner, $contact, $public_batch, true);
|
||||||
} elseif (in_array($item["verb"], [Activity::LIKE, Activity::DISLIKE])) {
|
} elseif (in_array($item['verb'], [Activity::LIKE, Activity::DISLIKE])) {
|
||||||
$type = "like";
|
$type = 'like';
|
||||||
} else {
|
} else {
|
||||||
$type = "comment";
|
$type = 'comment';
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger::info("Got relayable data ".$type." for item ".$item["guid"]." (".$item["id"].")");
|
Logger::info("Got relayable data " . $type . " for item " . $item['guid'] . " (" . $item['id'] . ")");
|
||||||
|
|
||||||
$msg = json_decode($item['signed_text'], true);
|
$msg = json_decode($item['signed_text'], true);
|
||||||
|
|
||||||
$message = [];
|
$message = [];
|
||||||
if (is_array($msg)) {
|
if (is_array($msg)) {
|
||||||
foreach ($msg as $field => $data) {
|
foreach ($msg as $field => $data) {
|
||||||
if (!$item["deleted"]) {
|
if (!$item['deleted']) {
|
||||||
if ($field == "diaspora_handle") {
|
if ($field == 'diaspora_handle') {
|
||||||
$field = "author";
|
$field = 'author';
|
||||||
}
|
}
|
||||||
if ($field == "target_type") {
|
if ($field == 'target_type') {
|
||||||
$field = "parent_type";
|
$field = 'parent_type';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$message[$field] = $data;
|
$message[$field] = $data;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Logger::info("Signature text for item ".$item["guid"]." (".$item["id"].") couldn't be extracted: ".$item['signed_text']);
|
Logger::info("Signature text for item " . $item["guid"] . " (" . $item["id"] . ") couldn't be extracted: " . $item['signed_text']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$message["parent_author_signature"] = self::signature($owner, $message);
|
$message['parent_author_signature'] = self::signature($owner, $message);
|
||||||
|
|
||||||
Logger::info('Relayed data', ['msg' => $message]);
|
Logger::info('Relayed data', ['msg' => $message]);
|
||||||
|
|
||||||
return self::buildAndTransmit($owner, $contact, $type, $message, $public_batch, $item["guid"]);
|
return self::buildAndTransmit($owner, $contact, $type, $message, $public_batch, $item['guid']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -3750,27 +3794,29 @@ class Diaspora
|
||||||
* @return int The result of the transmission
|
* @return int The result of the transmission
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function sendRetraction(array $item, array $owner, array $contact, $public_batch = false, $relay = false)
|
public static function sendRetraction(array $item, array $owner, array $contact, bool $public_batch = false, bool $relay = false): int
|
||||||
{
|
{
|
||||||
$itemaddr = self::handleFromContact($item["contact-id"], $item["author-id"]);
|
$itemaddr = self::handleFromContact($item['contact-id'], $item['author-id']);
|
||||||
|
|
||||||
$msg_type = "retraction";
|
$msg_type = 'retraction';
|
||||||
|
|
||||||
if ($item['gravity'] == GRAVITY_PARENT) {
|
if ($item['gravity'] == GRAVITY_PARENT) {
|
||||||
$target_type = "Post";
|
$target_type = 'Post';
|
||||||
} elseif (in_array($item["verb"], [Activity::LIKE, Activity::DISLIKE])) {
|
} elseif (in_array($item['verb'], [Activity::LIKE, Activity::DISLIKE])) {
|
||||||
$target_type = "Like";
|
$target_type = 'Like';
|
||||||
} else {
|
} else {
|
||||||
$target_type = "Comment";
|
$target_type = 'Comment';
|
||||||
}
|
}
|
||||||
|
|
||||||
$message = ["author" => $itemaddr,
|
$message = [
|
||||||
"target_guid" => $item['guid'],
|
'author' => $itemaddr,
|
||||||
"target_type" => $target_type];
|
'target_guid' => $item['guid'],
|
||||||
|
'target_type' => $target_type
|
||||||
|
];
|
||||||
|
|
||||||
Logger::info('Got message', ['msg' => $message]);
|
Logger::info('Got message', ['msg' => $message]);
|
||||||
|
|
||||||
return self::buildAndTransmit($owner, $contact, $msg_type, $message, $public_batch, $item["guid"]);
|
return self::buildAndTransmit($owner, $contact, $msg_type, $message, $public_batch, $item['guid']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -3784,44 +3830,44 @@ class Diaspora
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function sendMail(array $item, array $owner, array $contact)
|
public static function sendMail(array $item, array $owner, array $contact): int
|
||||||
{
|
{
|
||||||
$myaddr = self::myHandle($owner);
|
$myaddr = self::myHandle($owner);
|
||||||
|
|
||||||
$cnv = DBA::selectFirst('conv', [], ['id' => $item["convid"], 'uid' => $item["uid"]]);
|
$cnv = DBA::selectFirst('conv', [], ['id' => $item['convid'], 'uid' => $item['uid']]);
|
||||||
if (!DBA::isResult($cnv)) {
|
if (!DBA::isResult($cnv)) {
|
||||||
Logger::notice("conversation not found.");
|
Logger::notice("conversation not found.");
|
||||||
return;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$body = BBCode::toMarkdown($item["body"]);
|
$body = BBCode::toMarkdown($item['body']);
|
||||||
$created = DateTimeFormat::utc($item["created"], DateTimeFormat::ATOM);
|
$created = DateTimeFormat::utc($item['created'], DateTimeFormat::ATOM);
|
||||||
|
|
||||||
$msg = [
|
$msg = [
|
||||||
"author" => $myaddr,
|
'author' => $myaddr,
|
||||||
"guid" => $item["guid"],
|
'guid' => $item['guid'],
|
||||||
"conversation_guid" => $cnv["guid"],
|
'conversation_guid' => $cnv['guid'],
|
||||||
"text" => $body,
|
'text' => $body,
|
||||||
"created_at" => $created,
|
'created_at' => $created,
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($item["reply"]) {
|
if ($item['reply']) {
|
||||||
$message = $msg;
|
$message = $msg;
|
||||||
$type = "message";
|
$type = 'message';
|
||||||
} else {
|
} else {
|
||||||
$message = [
|
$message = [
|
||||||
"author" => $cnv["creator"],
|
'author' => $cnv['creator'],
|
||||||
"guid" => $cnv["guid"],
|
'guid' => $cnv['guid'],
|
||||||
"subject" => $cnv["subject"],
|
'subject' => $cnv['subject'],
|
||||||
"created_at" => DateTimeFormat::utc($cnv['created'], DateTimeFormat::ATOM),
|
'created_at' => DateTimeFormat::utc($cnv['created'], DateTimeFormat::ATOM),
|
||||||
"participants" => $cnv["recips"],
|
'participants' => $cnv['recips'],
|
||||||
"message" => $msg
|
'message' => $msg
|
||||||
];
|
];
|
||||||
|
|
||||||
$type = "conversation";
|
$type = 'conversation';
|
||||||
}
|
}
|
||||||
|
|
||||||
return self::buildAndTransmit($owner, $contact, $type, $message, false, $item["guid"]);
|
return self::buildAndTransmit($owner, $contact, $type, $message, false, $item['guid']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -3831,7 +3877,8 @@ class Diaspora
|
||||||
*
|
*
|
||||||
* @return array The array with "first" and "last"
|
* @return array The array with "first" and "last"
|
||||||
*/
|
*/
|
||||||
public static function splitName($name) {
|
public static function splitName(string $name): array
|
||||||
|
{
|
||||||
$name = trim($name);
|
$name = trim($name);
|
||||||
|
|
||||||
// Is the name longer than 64 characters? Then cut the rest of it.
|
// Is the name longer than 64 characters? Then cut the rest of it.
|
||||||
|
|
@ -3888,14 +3935,14 @@ class Diaspora
|
||||||
* @return array The profile data
|
* @return array The profile data
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
private static function createProfileData($uid)
|
private static function createProfileData(int $uid): array
|
||||||
{
|
{
|
||||||
$profile = DBA::selectFirst('owner-view', ['uid', 'addr', 'name', 'location', 'net-publish', 'dob', 'about', 'pub_keywords'], ['uid' => $uid]);
|
$profile = DBA::selectFirst('owner-view', ['uid', 'addr', 'name', 'location', 'net-publish', 'dob', 'about', 'pub_keywords'], ['uid' => $uid]);
|
||||||
if (!DBA::isResult($profile)) {
|
if (!DBA::isResult($profile)) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$handle = $profile["addr"];
|
$handle = $profile['addr'];
|
||||||
|
|
||||||
$split_name = self::splitName($profile['name']);
|
$split_name = self::splitName($profile['name']);
|
||||||
$first = $split_name['first'];
|
$first = $split_name['first'];
|
||||||
|
|
@ -3940,18 +3987,20 @@ class Diaspora
|
||||||
$tags = trim($tags);
|
$tags = trim($tags);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ["author" => $handle,
|
return [
|
||||||
"first_name" => $first,
|
'author' => $handle,
|
||||||
"last_name" => $last,
|
'first_name' => $first,
|
||||||
"image_url" => $large,
|
'last_name' => $last,
|
||||||
"image_url_medium" => $medium,
|
'image_url' => $large,
|
||||||
"image_url_small" => $small,
|
'image_url_medium' => $medium,
|
||||||
"birthday" => $dob,
|
'image_url_small' => $small,
|
||||||
"bio" => $about,
|
'birthday' => $dob,
|
||||||
"location" => $location,
|
'bio' => $about,
|
||||||
"searchable" => $searchable,
|
'location' => $location,
|
||||||
"nsfw" => "false",
|
'searchable' => $searchable,
|
||||||
"tag_string" => $tags];
|
'nsfw' => 'false',
|
||||||
|
'tag_string' => $tags
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -3962,7 +4011,7 @@ class Diaspora
|
||||||
* @return void
|
* @return void
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function sendProfile($uid, $recips = false)
|
public static function sendProfile(int $uid, bool $recips = false)
|
||||||
{
|
{
|
||||||
if (!$uid) {
|
if (!$uid) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -3985,8 +4034,8 @@ class Diaspora
|
||||||
|
|
||||||
// @ToDo Split this into single worker jobs
|
// @ToDo Split this into single worker jobs
|
||||||
foreach ($recips as $recip) {
|
foreach ($recips as $recip) {
|
||||||
Logger::info("Send updated profile data for user ".$uid." to contact ".$recip["id"]);
|
Logger::info("Send updated profile data for user " . $uid . " to contact " . $recip['id']);
|
||||||
self::buildAndTransmit($owner, $recip, "profile", $message);
|
self::buildAndTransmit($owner, $recip, 'profile', $message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3996,10 +4045,10 @@ class Diaspora
|
||||||
* @param integer $uid The user of that comment
|
* @param integer $uid The user of that comment
|
||||||
* @param array $item Item array
|
* @param array $item Item array
|
||||||
*
|
*
|
||||||
* @return array Signed content
|
* @return array|bool Signed content or false on error
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function createLikeSignature($uid, array $item)
|
public static function createLikeSignature(int $uid, array $item)
|
||||||
{
|
{
|
||||||
$owner = User::getOwnerDataById($uid);
|
$owner = User::getOwnerDataById($uid);
|
||||||
if (empty($owner)) {
|
if (empty($owner)) {
|
||||||
|
|
@ -4007,7 +4056,7 @@ class Diaspora
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!in_array($item["verb"], [Activity::LIKE, Activity::DISLIKE])) {
|
if (!in_array($item['verb'], [Activity::LIKE, Activity::DISLIKE])) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4016,7 +4065,7 @@ class Diaspora
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$message["author_signature"] = self::signature($owner, $message);
|
$message['author_signature'] = self::signature($owner, $message);
|
||||||
|
|
||||||
return $message;
|
return $message;
|
||||||
}
|
}
|
||||||
|
|
@ -4026,7 +4075,7 @@ class Diaspora
|
||||||
*
|
*
|
||||||
* @param array $item Item array
|
* @param array $item Item array
|
||||||
*
|
*
|
||||||
* @return array Signed content
|
* @return array|bool Signed content or false on error
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function createCommentSignature(array $item)
|
public static function createCommentSignature(array $item)
|
||||||
|
|
@ -4064,12 +4113,12 @@ class Diaspora
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$message["author_signature"] = self::signature($owner, $message);
|
$message['author_signature'] = self::signature($owner, $message);
|
||||||
|
|
||||||
return $message;
|
return $message;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function performReshare(int $UriId, int $uid)
|
public static function performReshare(int $UriId, int $uid): int
|
||||||
{
|
{
|
||||||
$fields = ['uri-id', 'body', 'title', 'author-name', 'author-link', 'author-avatar', 'guid', 'created', 'plink'];
|
$fields = ['uri-id', 'body', 'title', 'author-name', 'author-link', 'author-avatar', 'guid', 'created', 'plink'];
|
||||||
$item = Post::selectFirst($fields, ['uri-id' => $UriId, 'uid' => [$uid, 0], 'private' => [Item::PUBLIC, Item::UNLISTED]]);
|
$item = Post::selectFirst($fields, ['uri-id' => $UriId, 'uid' => [$uid, 0], 'private' => [Item::PUBLIC, Item::UNLISTED]]);
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,7 @@ abstract class MailBuilder
|
||||||
*
|
*
|
||||||
* @return string[][]
|
* @return string[][]
|
||||||
*/
|
*/
|
||||||
public function getHeaders()
|
public function getHeaders(): array
|
||||||
{
|
{
|
||||||
return $this->headers;
|
return $this->headers;
|
||||||
}
|
}
|
||||||
|
|
@ -182,7 +182,7 @@ abstract class MailBuilder
|
||||||
* @param string[][] $headers
|
* @param string[][] $headers
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function withHeaders(array $headers)
|
public function withHeaders(array $headers): MailBuilder
|
||||||
{
|
{
|
||||||
$this->headers = $headers;
|
$this->headers = $headers;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ class HTTPSignature
|
||||||
* @return array with verification data
|
* @return array with verification data
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function verifyMagic($key)
|
public static function verifyMagic(string $key): array
|
||||||
{
|
{
|
||||||
$headers = null;
|
$headers = null;
|
||||||
$spoofable = false;
|
$spoofable = false;
|
||||||
|
|
@ -139,7 +139,7 @@ class HTTPSignature
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public static function createSig($head, $prvkey, $keyid = 'Key')
|
public static function createSig(array $head, string $prvkey, string $keyid = 'Key'): array
|
||||||
{
|
{
|
||||||
$return_headers = [];
|
$return_headers = [];
|
||||||
if (!empty($head)) {
|
if (!empty($head)) {
|
||||||
|
|
@ -166,7 +166,7 @@ class HTTPSignature
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
private static function sign($head, $prvkey, $alg = 'sha256')
|
private static function sign(array $head, string $prvkey, string $alg = 'sha256'): array
|
||||||
{
|
{
|
||||||
$ret = [];
|
$ret = [];
|
||||||
$headers = '';
|
$headers = '';
|
||||||
|
|
@ -204,7 +204,7 @@ class HTTPSignature
|
||||||
* - \e string \b signature
|
* - \e string \b signature
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function parseSigheader($header)
|
public static function parseSigheader(string $header): array
|
||||||
{
|
{
|
||||||
// Remove obsolete folds
|
// Remove obsolete folds
|
||||||
$header = preg_replace('/\n\s+/', ' ', $header);
|
$header = preg_replace('/\n\s+/', ' ', $header);
|
||||||
|
|
@ -251,7 +251,7 @@ class HTTPSignature
|
||||||
* @return string Decrypted signature string
|
* @return string Decrypted signature string
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
private static function decryptSigheader(array $headers, string $prvkey)
|
private static function decryptSigheader(array $headers, string $prvkey): string
|
||||||
{
|
{
|
||||||
if (!empty($headers['iv']) && !empty($headers['key']) && !empty($headers['data'])) {
|
if (!empty($headers['iv']) && !empty($headers['key']) && !empty($headers['data'])) {
|
||||||
return Crypto::unencapsulate($headers, $prvkey);
|
return Crypto::unencapsulate($headers, $prvkey);
|
||||||
|
|
@ -341,7 +341,7 @@ class HTTPSignature
|
||||||
* @param boolean $success Transmission status
|
* @param boolean $success Transmission status
|
||||||
* @param boolean $shared The inbox is a shared inbox
|
* @param boolean $shared The inbox is a shared inbox
|
||||||
*/
|
*/
|
||||||
static public function setInboxStatus($url, $success, $shared = false)
|
static public function setInboxStatus(string $url, bool $success, bool $shared = false)
|
||||||
{
|
{
|
||||||
$now = DateTimeFormat::utcNow();
|
$now = DateTimeFormat::utcNow();
|
||||||
|
|
||||||
|
|
@ -403,21 +403,21 @@ class HTTPSignature
|
||||||
* @return array JSON array
|
* @return array JSON array
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function fetch($request, $uid)
|
public static function fetch(string $request, int $uid): array
|
||||||
{
|
{
|
||||||
$curlResult = self::fetchRaw($request, $uid);
|
$curlResult = self::fetchRaw($request, $uid);
|
||||||
|
|
||||||
if (empty($curlResult)) {
|
if (empty($curlResult)) {
|
||||||
return false;
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$curlResult->isSuccess() || empty($curlResult->getBody())) {
|
if (!$curlResult->isSuccess() || empty($curlResult->getBody())) {
|
||||||
return false;
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$content = json_decode($curlResult->getBody(), true);
|
$content = json_decode($curlResult->getBody(), true);
|
||||||
if (empty($content) || !is_array($content)) {
|
if (empty($content) || !is_array($content)) {
|
||||||
return false;
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
return $content;
|
return $content;
|
||||||
|
|
@ -438,7 +438,7 @@ class HTTPSignature
|
||||||
* @return \Friendica\Network\HTTPClient\Capability\ICanHandleHttpResponses CurlResult
|
* @return \Friendica\Network\HTTPClient\Capability\ICanHandleHttpResponses CurlResult
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function fetchRaw($request, $uid = 0, $opts = [HttpClientOptions::ACCEPT_CONTENT => [HttpClientAccept::JSON_AS]])
|
public static function fetchRaw(string $request, int $uid = 0, array $opts = [HttpClientOptions::ACCEPT_CONTENT => [HttpClientAccept::JSON_AS]])
|
||||||
{
|
{
|
||||||
$header = [];
|
$header = [];
|
||||||
|
|
||||||
|
|
@ -488,13 +488,13 @@ class HTTPSignature
|
||||||
/**
|
/**
|
||||||
* Gets a signer from a given HTTP request
|
* Gets a signer from a given HTTP request
|
||||||
*
|
*
|
||||||
* @param $content
|
* @param string $content
|
||||||
* @param $http_headers
|
* @param array $http_headers
|
||||||
*
|
*
|
||||||
* @return string Signer
|
* @return string|null|false Signer
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function getSigner($content, $http_headers)
|
public static function getSigner(string $content, array $http_headers)
|
||||||
{
|
{
|
||||||
if (empty($http_headers['HTTP_SIGNATURE'])) {
|
if (empty($http_headers['HTTP_SIGNATURE'])) {
|
||||||
Logger::debug('No HTTP_SIGNATURE header');
|
Logger::debug('No HTTP_SIGNATURE header');
|
||||||
|
|
@ -686,13 +686,13 @@ class HTTPSignature
|
||||||
/**
|
/**
|
||||||
* fetches a key for a given id and actor
|
* fetches a key for a given id and actor
|
||||||
*
|
*
|
||||||
* @param $id
|
* @param string $id
|
||||||
* @param $actor
|
* @param string $actor
|
||||||
*
|
*
|
||||||
* @return array with actor url and public key
|
* @return array with actor url and public key
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private static function fetchKey($id, $actor)
|
private static function fetchKey(string $id, string $actor): array
|
||||||
{
|
{
|
||||||
$url = (strpos($id, '#') ? substr($id, 0, strpos($id, '#')) : $id);
|
$url = (strpos($id, '#') ? substr($id, 0, strpos($id, '#')) : $id);
|
||||||
|
|
||||||
|
|
@ -709,6 +709,6 @@ class HTTPSignature
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger::notice('Key could not be fetched', ['url' => $url, 'actor' => $actor]);
|
Logger::notice('Key could not be fetched', ['url' => $url, 'actor' => $actor]);
|
||||||
return false;
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ class Mimetype
|
||||||
* @param string $filename filename
|
* @param string $filename filename
|
||||||
* @return mixed array or string
|
* @return mixed array or string
|
||||||
*/
|
*/
|
||||||
public static function getContentType($filename)
|
public static function getContentType(string $filename)
|
||||||
{
|
{
|
||||||
$mime_types = [
|
$mime_types = [
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ class ParseUrl
|
||||||
* @param string $accept content-type to accept
|
* @param string $accept content-type to accept
|
||||||
* @return array content type
|
* @return array content type
|
||||||
*/
|
*/
|
||||||
public static function getContentType(string $url, string $accept = HttpClientAccept::DEFAULT)
|
public static function getContentType(string $url, string $accept = HttpClientAccept::DEFAULT): array
|
||||||
{
|
{
|
||||||
$curlResult = DI::httpClient()->head($url, [HttpClientOptions::ACCEPT_CONTENT => $accept]);
|
$curlResult = DI::httpClient()->head($url, [HttpClientOptions::ACCEPT_CONTENT => $accept]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,7 @@ class Strings
|
||||||
* @return string Formatted network name
|
* @return string Formatted network name
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function formatNetworkName($network, $url = '')
|
public static function formatNetworkName(string $network, string $url = ''): string
|
||||||
{
|
{
|
||||||
if ($network != '') {
|
if ($network != '') {
|
||||||
if ($url != '') {
|
if ($url != '') {
|
||||||
|
|
@ -176,6 +176,8 @@ class Strings
|
||||||
|
|
||||||
return $network_name;
|
return $network_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -187,7 +189,7 @@ class Strings
|
||||||
*
|
*
|
||||||
* @return string Transformed string.
|
* @return string Transformed string.
|
||||||
*/
|
*/
|
||||||
public static function deindent($text, $chr = "[\t ]", $count = NULL)
|
public static function deindent(string $text, string $chr = "[\t ]", int $count = null)
|
||||||
{
|
{
|
||||||
$lines = explode("\n", $text);
|
$lines = explode("\n", $text);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -269,7 +269,7 @@ class Delivery
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
private static function deliverDFRN($cmd, $contact, $owner, $items, $target_item, $public_message, $top_level, $followup, $server_protocol)
|
private static function deliverDFRN(string $cmd, array $contact, array $owner, array $items, array $target_item, bool $public_message, bool $top_level, bool $followup, int $server_protocol)
|
||||||
{
|
{
|
||||||
// Transmit Diaspora reshares via Diaspora if the Friendica contact support Diaspora
|
// Transmit Diaspora reshares via Diaspora if the Friendica contact support Diaspora
|
||||||
if (Diaspora::isReshare($target_item['body'] ?? '') && !empty(FContact::getByURL($contact['addr'], false))) {
|
if (Diaspora::isReshare($target_item['body'] ?? '') && !empty(FContact::getByURL($contact['addr'], false))) {
|
||||||
|
|
@ -384,7 +384,7 @@ class Delivery
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
private static function deliverDiaspora($cmd, $contact, $owner, $items, $target_item, $public_message, $top_level, $followup)
|
private static function deliverDiaspora(string $cmd, array $contact, array $owner, array $items, array $target_item, bool $public_message, bool $top_level, bool $followup)
|
||||||
{
|
{
|
||||||
// We don't treat Forum posts as "wall-to-wall" to be able to post them via Diaspora
|
// We don't treat Forum posts as "wall-to-wall" to be able to post them via Diaspora
|
||||||
$walltowall = $top_level && ($owner['id'] != $items[0]['contact-id']) & ($owner['account-type'] != Model\User::ACCOUNT_TYPE_COMMUNITY);
|
$walltowall = $top_level && ($owner['id'] != $items[0]['contact-id']) & ($owner['account-type'] != Model\User::ACCOUNT_TYPE_COMMUNITY);
|
||||||
|
|
@ -478,7 +478,7 @@ class Delivery
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
private static function deliverMail($cmd, $contact, $owner, $target_item, $thr_parent)
|
private static function deliverMail(string $cmd, array $contact, array $owner, array $target_item, array $thr_parent)
|
||||||
{
|
{
|
||||||
if (DI::config()->get('system','imap_disabled')) {
|
if (DI::config()->get('system','imap_disabled')) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ use Friendica\Network\HTTPClient\Client\HttpClientAccept;
|
||||||
*/
|
*/
|
||||||
class Directory
|
class Directory
|
||||||
{
|
{
|
||||||
public static function execute($url = '')
|
public static function execute(string $url = '')
|
||||||
{
|
{
|
||||||
$dir = Search::getGlobalDirectory();
|
$dir = Search::getGlobalDirectory();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,9 +30,9 @@ class MergeContact
|
||||||
/**
|
/**
|
||||||
* Replace all occurences of the given contact id and replace it
|
* Replace all occurences of the given contact id and replace it
|
||||||
*
|
*
|
||||||
* @param integer $new_cid
|
* @param integer $new_cid New contact id
|
||||||
* @param integer $old_cid
|
* @param integer $old_cid Old contact id
|
||||||
* @param integer $uid
|
* @param integer $uid User id
|
||||||
*/
|
*/
|
||||||
public static function execute(int $new_cid, int $old_cid, int $uid)
|
public static function execute(int $new_cid, int $old_cid, int $uid)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
|
|
||||||
if (!defined('DB_UPDATE_VERSION')) {
|
if (!defined('DB_UPDATE_VERSION')) {
|
||||||
define('DB_UPDATE_VERSION', 1469);
|
define('DB_UPDATE_VERSION', 1470);
|
||||||
}
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
@ -1252,12 +1252,12 @@ return [
|
||||||
"fields" => [
|
"fields" => [
|
||||||
"id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
|
"id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
|
||||||
"uri-id" => ["type" => "int unsigned", "not null" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
|
"uri-id" => ["type" => "int unsigned", "not null" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
|
||||||
"url" => ["type" => "varbinary(511)", "not null" => "1", "comment" => "Media URL"],
|
"url" => ["type" => "text", "not null" => "1", "comment" => "Media URL"],
|
||||||
"type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Media type"],
|
"type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Media type"],
|
||||||
"mimetype" => ["type" => "varchar(60)", "comment" => ""],
|
"mimetype" => ["type" => "varchar(60)", "comment" => ""],
|
||||||
"height" => ["type" => "smallint unsigned", "comment" => "Height of the media"],
|
"height" => ["type" => "smallint unsigned", "comment" => "Height of the media"],
|
||||||
"width" => ["type" => "smallint unsigned", "comment" => "Width of the media"],
|
"width" => ["type" => "smallint unsigned", "comment" => "Width of the media"],
|
||||||
"size" => ["type" => "int unsigned", "comment" => "Media size"],
|
"size" => ["type" => "mediumint unsigned", "comment" => "Media size"],
|
||||||
"preview" => ["type" => "varbinary(255)", "comment" => "Preview URL"],
|
"preview" => ["type" => "varbinary(255)", "comment" => "Preview URL"],
|
||||||
"preview-height" => ["type" => "smallint unsigned", "comment" => "Height of the preview picture"],
|
"preview-height" => ["type" => "smallint unsigned", "comment" => "Height of the preview picture"],
|
||||||
"preview-width" => ["type" => "smallint unsigned", "comment" => "Width of the preview picture"],
|
"preview-width" => ["type" => "smallint unsigned", "comment" => "Width of the preview picture"],
|
||||||
|
|
@ -1272,7 +1272,7 @@ return [
|
||||||
],
|
],
|
||||||
"indexes" => [
|
"indexes" => [
|
||||||
"PRIMARY" => ["id"],
|
"PRIMARY" => ["id"],
|
||||||
"uri-id-url" => ["UNIQUE", "uri-id", "url"],
|
"uri-id-url" => ["UNIQUE", "uri-id", "url(512)"],
|
||||||
"uri-id-id" => ["uri-id", "id"],
|
"uri-id-id" => ["uri-id", "id"],
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,16 @@ return [
|
||||||
// Cache avatar pictures as files (experimental)
|
// Cache avatar pictures as files (experimental)
|
||||||
'avatar_cache' => false,
|
'avatar_cache' => false,
|
||||||
|
|
||||||
|
// avatar_cache_path (String)
|
||||||
|
// File path to the avatar cache. Default is /(your basepath)/avatar/
|
||||||
|
// The value has to be an absolute path and has to end with a "/"
|
||||||
|
'avatar_cache_path' => '',
|
||||||
|
|
||||||
|
// avatar_cache_url (String)
|
||||||
|
// Base URL of the avatar cache. Default is http(s)://(your hostname)/avatar/
|
||||||
|
// The value has to start with the scheme and end with a "/"
|
||||||
|
'avatar_cache_url' => '',
|
||||||
|
|
||||||
// big_emojis (Boolean)
|
// big_emojis (Boolean)
|
||||||
// Display "Emoji Only" posts in big.
|
// Display "Emoji Only" posts in big.
|
||||||
'big_emojis' => false,
|
'big_emojis' => false,
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ class AppDouble extends App
|
||||||
$this->isLoggedIn = $isLoggedIn;
|
$this->isLoggedIn = $isLoggedIn;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isLoggedIn()
|
public function isLoggedIn(): bool
|
||||||
{
|
{
|
||||||
return $this->isLoggedIn;
|
return $this->isLoggedIn;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,9 @@
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: 2022.06\n"
|
"Project-Id-Version: 2022.09-dev\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2022-06-06 07:33+0000\n"
|
"POT-Creation-Date: 2022-06-13 05:45+0000\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
|
@ -37,7 +37,7 @@ msgstr ""
|
||||||
msgid "User not found."
|
msgid "User not found."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: mod/cal.php:122 mod/display.php:247 src/Module/Profile/Profile.php:94
|
#: mod/cal.php:122 mod/display.php:262 src/Module/Profile/Profile.php:94
|
||||||
#: src/Module/Profile/Profile.php:109 src/Module/Profile/Status.php:110
|
#: src/Module/Profile/Profile.php:109 src/Module/Profile/Status.php:110
|
||||||
#: src/Module/Update/Profile.php:56
|
#: src/Module/Update/Profile.php:56
|
||||||
msgid "Access to this profile has been restricted."
|
msgid "Access to this profile has been restricted."
|
||||||
|
|
@ -104,17 +104,17 @@ msgstr ""
|
||||||
msgid "calendar"
|
msgid "calendar"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: mod/display.php:142 mod/photos.php:802
|
#: mod/display.php:143 mod/photos.php:802
|
||||||
#: src/Module/Conversation/Community.php:175 src/Module/Directory.php:49
|
#: src/Module/Conversation/Community.php:175 src/Module/Directory.php:49
|
||||||
#: src/Module/Search/Index.php:50
|
#: src/Module/Search/Index.php:50
|
||||||
msgid "Public access denied."
|
msgid "Public access denied."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: mod/display.php:198 mod/display.php:272
|
#: mod/display.php:213 mod/display.php:287
|
||||||
msgid "The requested item doesn't exist or has been deleted."
|
msgid "The requested item doesn't exist or has been deleted."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: mod/display.php:352
|
#: mod/display.php:367
|
||||||
msgid "The feed for this item is unavailable."
|
msgid "The feed for this item is unavailable."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
@ -230,7 +230,7 @@ msgstr ""
|
||||||
|
|
||||||
#: mod/editpost.php:107 mod/message.php:200 mod/message.php:358
|
#: mod/editpost.php:107 mod/message.php:200 mod/message.php:358
|
||||||
#: mod/photos.php:1489 mod/wallmessage.php:142 src/Content/Conversation.php:368
|
#: mod/photos.php:1489 mod/wallmessage.php:142 src/Content/Conversation.php:368
|
||||||
#: src/Content/Conversation.php:712 src/Module/Item/Compose.php:177
|
#: src/Content/Conversation.php:713 src/Module/Item/Compose.php:177
|
||||||
#: src/Object/Post.php:528
|
#: src/Object/Post.php:528
|
||||||
msgid "Please wait"
|
msgid "Please wait"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
@ -1077,11 +1077,11 @@ msgstr ""
|
||||||
msgid "Comment"
|
msgid "Comment"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: mod/photos.php:1424 src/Content/Conversation.php:628 src/Object/Post.php:247
|
#: mod/photos.php:1424 src/Content/Conversation.php:629 src/Object/Post.php:247
|
||||||
msgid "Select"
|
msgid "Select"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: mod/photos.php:1425 mod/settings.php:350 src/Content/Conversation.php:629
|
#: mod/photos.php:1425 mod/settings.php:350 src/Content/Conversation.php:630
|
||||||
#: src/Module/Admin/Users/Active.php:139 src/Module/Admin/Users/Blocked.php:140
|
#: src/Module/Admin/Users/Active.php:139 src/Module/Admin/Users/Blocked.php:140
|
||||||
#: src/Module/Admin/Users/Index.php:153
|
#: src/Module/Admin/Users/Index.php:153
|
||||||
msgid "Delete"
|
msgid "Delete"
|
||||||
|
|
@ -1942,7 +1942,7 @@ msgid "%s attends maybe."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Conversation.php:222 src/Content/Conversation.php:260
|
#: src/Content/Conversation.php:222 src/Content/Conversation.php:260
|
||||||
#: src/Content/Conversation.php:872
|
#: src/Content/Conversation.php:873
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s reshared this."
|
msgid "%s reshared this."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
@ -2061,92 +2061,92 @@ msgstr ""
|
||||||
msgid "Scheduled at"
|
msgid "Scheduled at"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Conversation.php:656 src/Object/Post.php:235
|
#: src/Content/Conversation.php:657 src/Object/Post.php:235
|
||||||
msgid "Pinned item"
|
msgid "Pinned item"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Conversation.php:672 src/Object/Post.php:476
|
#: src/Content/Conversation.php:673 src/Object/Post.php:476
|
||||||
#: src/Object/Post.php:477
|
#: src/Object/Post.php:477
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "View %s's profile @ %s"
|
msgid "View %s's profile @ %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Conversation.php:685 src/Object/Post.php:464
|
#: src/Content/Conversation.php:686 src/Object/Post.php:464
|
||||||
msgid "Categories:"
|
msgid "Categories:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Conversation.php:686 src/Object/Post.php:465
|
#: src/Content/Conversation.php:687 src/Object/Post.php:465
|
||||||
msgid "Filed under:"
|
msgid "Filed under:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Conversation.php:694 src/Object/Post.php:490
|
#: src/Content/Conversation.php:695 src/Object/Post.php:490
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s from %s"
|
msgid "%s from %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Conversation.php:710
|
#: src/Content/Conversation.php:711
|
||||||
msgid "View in context"
|
msgid "View in context"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Conversation.php:775
|
#: src/Content/Conversation.php:776
|
||||||
msgid "remove"
|
msgid "remove"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Conversation.php:779
|
#: src/Content/Conversation.php:780
|
||||||
msgid "Delete Selected Items"
|
msgid "Delete Selected Items"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Conversation.php:844 src/Content/Conversation.php:847
|
#: src/Content/Conversation.php:845 src/Content/Conversation.php:848
|
||||||
#: src/Content/Conversation.php:850 src/Content/Conversation.php:853
|
#: src/Content/Conversation.php:851 src/Content/Conversation.php:854
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "You had been addressed (%s)."
|
msgid "You had been addressed (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Conversation.php:856
|
#: src/Content/Conversation.php:857
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "You are following %s."
|
msgid "You are following %s."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Conversation.php:859
|
#: src/Content/Conversation.php:860
|
||||||
msgid "Tagged"
|
msgid "Tagged"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Conversation.php:874
|
#: src/Content/Conversation.php:875
|
||||||
msgid "Reshared"
|
msgid "Reshared"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Conversation.php:874
|
#: src/Content/Conversation.php:875
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Reshared by %s <%s>"
|
msgid "Reshared by %s <%s>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Conversation.php:877
|
#: src/Content/Conversation.php:878
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s is participating in this thread."
|
msgid "%s is participating in this thread."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Conversation.php:880
|
#: src/Content/Conversation.php:881
|
||||||
msgid "Stored"
|
msgid "Stored"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Conversation.php:883
|
#: src/Content/Conversation.php:884
|
||||||
msgid "Global"
|
msgid "Global"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Conversation.php:886
|
#: src/Content/Conversation.php:887
|
||||||
msgid "Relayed"
|
msgid "Relayed"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Conversation.php:886
|
#: src/Content/Conversation.php:887
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Relayed by %s <%s>"
|
msgid "Relayed by %s <%s>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Conversation.php:889
|
#: src/Content/Conversation.php:890
|
||||||
msgid "Fetched"
|
msgid "Fetched"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Conversation.php:889
|
#: src/Content/Conversation.php:890
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fetched because of %s <%s>"
|
msgid "Fetched because of %s <%s>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
@ -3625,63 +3625,63 @@ msgstr ""
|
||||||
msgid "Forum"
|
msgid "Forum"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Contact.php:2517
|
#: src/Model/Contact.php:2550
|
||||||
msgid "Disallowed profile URL."
|
msgid "Disallowed profile URL."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Contact.php:2522 src/Module/Friendica.php:81
|
#: src/Model/Contact.php:2555 src/Module/Friendica.php:81
|
||||||
msgid "Blocked domain"
|
msgid "Blocked domain"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Contact.php:2527
|
#: src/Model/Contact.php:2560
|
||||||
msgid "Connect URL missing."
|
msgid "Connect URL missing."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Contact.php:2536
|
#: src/Model/Contact.php:2569
|
||||||
msgid ""
|
msgid ""
|
||||||
"The contact could not be added. Please check the relevant network "
|
"The contact could not be added. Please check the relevant network "
|
||||||
"credentials in your Settings -> Social Networks page."
|
"credentials in your Settings -> Social Networks page."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Contact.php:2578
|
#: src/Model/Contact.php:2611
|
||||||
msgid "The profile address specified does not provide adequate information."
|
msgid "The profile address specified does not provide adequate information."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Contact.php:2580
|
#: src/Model/Contact.php:2613
|
||||||
msgid "No compatible communication protocols or feeds were discovered."
|
msgid "No compatible communication protocols or feeds were discovered."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Contact.php:2583
|
#: src/Model/Contact.php:2616
|
||||||
msgid "An author or name was not found."
|
msgid "An author or name was not found."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Contact.php:2586
|
#: src/Model/Contact.php:2619
|
||||||
msgid "No browser URL could be matched to this address."
|
msgid "No browser URL could be matched to this address."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Contact.php:2589
|
#: src/Model/Contact.php:2622
|
||||||
msgid ""
|
msgid ""
|
||||||
"Unable to match @-style Identity Address with a known protocol or email "
|
"Unable to match @-style Identity Address with a known protocol or email "
|
||||||
"contact."
|
"contact."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Contact.php:2590
|
#: src/Model/Contact.php:2623
|
||||||
msgid "Use mailto: in front of address to force email check."
|
msgid "Use mailto: in front of address to force email check."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Contact.php:2596
|
#: src/Model/Contact.php:2629
|
||||||
msgid ""
|
msgid ""
|
||||||
"The profile address specified belongs to a network which has been disabled "
|
"The profile address specified belongs to a network which has been disabled "
|
||||||
"on this site."
|
"on this site."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Contact.php:2601
|
#: src/Model/Contact.php:2634
|
||||||
msgid ""
|
msgid ""
|
||||||
"Limited profile. This person will be unable to receive direct/personal "
|
"Limited profile. This person will be unable to receive direct/personal "
|
||||||
"notifications from you."
|
"notifications from you."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Contact.php:2660
|
#: src/Model/Contact.php:2693
|
||||||
msgid "Unable to retrieve contact information."
|
msgid "Unable to retrieve contact information."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
# abidin toumi <abidin24@tutanota.com>, 2020-2021
|
# abidin toumi <abidin24@tutanota.com>, 2020-2021
|
||||||
# ominds <ashraf@o-minds.com>, 2014
|
# ominds <ashraf@o-minds.com>, 2014
|
||||||
# ButterflyOfFire, 2018-2019
|
# ButterflyOfFire, 2018-2019
|
||||||
|
# ButterflyOfFire, 2022
|
||||||
# Farida Khalaf <faridakhalaf@hotmail.com>, 2021
|
# Farida Khalaf <faridakhalaf@hotmail.com>, 2021
|
||||||
# ominds <ashraf@o-minds.com>, 2014
|
# ominds <ashraf@o-minds.com>, 2014
|
||||||
# abidin toumi <abidin24@tutanota.com>, 2020
|
# abidin toumi <abidin24@tutanota.com>, 2020
|
||||||
|
|
@ -15,9 +16,9 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2022-02-24 09:39-0500\n"
|
"POT-Creation-Date: 2022-06-06 07:33+0000\n"
|
||||||
"PO-Revision-Date: 2022-03-05 16:40+0000\n"
|
"PO-Revision-Date: 2011-05-05 10:19+0000\n"
|
||||||
"Last-Translator: abidin toumi <abidin24@tutanota.com>\n"
|
"Last-Translator: ButterflyOfFire, 2022\n"
|
||||||
"Language-Team: Arabic (http://www.transifex.com/Friendica/friendica/language/ar/)\n"
|
"Language-Team: Arabic (http://www.transifex.com/Friendica/friendica/language/ar/)\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
|
@ -25,73 +26,74 @@ msgstr ""
|
||||||
"Language: ar\n"
|
"Language: ar\n"
|
||||||
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
|
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
|
||||||
|
|
||||||
#: mod/cal.php:44 mod/cal.php:48 mod/follow.php:39 mod/redir.php:34
|
#: mod/cal.php:46 mod/cal.php:50 mod/follow.php:39 mod/redir.php:36
|
||||||
#: mod/redir.php:175 src/Module/Conversation/Community.php:181
|
#: mod/redir.php:177 src/Module/Conversation/Community.php:181
|
||||||
#: src/Module/Debug/ItemBody.php:37 src/Module/Diaspora/Receive.php:57
|
#: src/Module/Debug/ItemBody.php:38 src/Module/Diaspora/Receive.php:57
|
||||||
#: src/Module/Item/Follow.php:42 src/Module/Item/Ignore.php:41
|
#: src/Module/Item/Follow.php:42 src/Module/Item/Ignore.php:41
|
||||||
#: src/Module/Item/Pin.php:42 src/Module/Item/Pin.php:57
|
#: src/Module/Item/Pin.php:42 src/Module/Item/Pin.php:57
|
||||||
#: src/Module/Item/Star.php:43
|
#: src/Module/Item/Star.php:43
|
||||||
msgid "Access denied."
|
msgid "Access denied."
|
||||||
msgstr "رُفض الوصول."
|
msgstr "رُفض الوصول."
|
||||||
|
|
||||||
#: mod/cal.php:61 mod/cal.php:78 mod/photos.php:69 mod/photos.php:140
|
#: mod/cal.php:63 mod/cal.php:80 mod/photos.php:69 mod/photos.php:140
|
||||||
#: mod/photos.php:804 src/Model/Profile.php:229 src/Module/HCard.php:52
|
#: mod/photos.php:798 src/Model/Profile.php:231 src/Module/Feed.php:72
|
||||||
#: src/Module/Profile/Common.php:41 src/Module/Profile/Common.php:52
|
#: src/Module/HCard.php:52 src/Module/Profile/Common.php:41
|
||||||
#: src/Module/Profile/Contacts.php:40 src/Module/Profile/Contacts.php:50
|
#: src/Module/Profile/Common.php:52 src/Module/Profile/Contacts.php:40
|
||||||
#: src/Module/Profile/Media.php:38 src/Module/Profile/Status.php:58
|
#: src/Module/Profile/Contacts.php:50 src/Module/Profile/Media.php:38
|
||||||
#: src/Module/Register.php:267 src/Module/RemoteFollow.php:58
|
#: src/Module/Profile/Status.php:59 src/Module/Register.php:267
|
||||||
|
#: src/Module/RemoteFollow.php:58
|
||||||
msgid "User not found."
|
msgid "User not found."
|
||||||
msgstr "لم يُعثر على المستخدم."
|
msgstr "لم يُعثر على المستخدم."
|
||||||
|
|
||||||
#: mod/cal.php:120 mod/display.php:238 src/Module/Profile/Profile.php:94
|
#: mod/cal.php:122 mod/display.php:247 src/Module/Profile/Profile.php:94
|
||||||
#: src/Module/Profile/Profile.php:109 src/Module/Profile/Status.php:109
|
#: src/Module/Profile/Profile.php:109 src/Module/Profile/Status.php:110
|
||||||
#: src/Module/Update/Profile.php:56
|
#: src/Module/Update/Profile.php:56
|
||||||
msgid "Access to this profile has been restricted."
|
msgid "Access to this profile has been restricted."
|
||||||
msgstr "قُيِّد الوصول لهذا الملف الشخصي."
|
msgstr "قُيِّد الوصول لهذا الملف الشخصي."
|
||||||
|
|
||||||
#: mod/cal.php:242 mod/events.php:377 src/Content/Nav.php:194
|
#: mod/cal.php:243 mod/events.php:374 src/Content/Nav.php:194
|
||||||
#: src/Content/Nav.php:258 src/Module/BaseProfile.php:84
|
#: src/Content/Nav.php:258 src/Module/BaseProfile.php:84
|
||||||
#: src/Module/BaseProfile.php:95 view/theme/frio/theme.php:229
|
#: src/Module/BaseProfile.php:95 view/theme/frio/theme.php:229
|
||||||
#: view/theme/frio/theme.php:233
|
#: view/theme/frio/theme.php:233
|
||||||
msgid "Events"
|
msgid "Events"
|
||||||
msgstr "الأحداث"
|
msgstr "الأحداث"
|
||||||
|
|
||||||
#: mod/cal.php:243 mod/events.php:378
|
#: mod/cal.php:244 mod/events.php:375
|
||||||
msgid "View"
|
msgid "View"
|
||||||
msgstr "اعرض"
|
msgstr "اعرض"
|
||||||
|
|
||||||
#: mod/cal.php:244 mod/events.php:380
|
#: mod/cal.php:245 mod/events.php:377
|
||||||
msgid "Previous"
|
msgid "Previous"
|
||||||
msgstr "السابق"
|
msgstr "السابق"
|
||||||
|
|
||||||
#: mod/cal.php:245 mod/events.php:381 src/Module/Install.php:214
|
#: mod/cal.php:246 mod/events.php:378 src/Module/Install.php:214
|
||||||
msgid "Next"
|
msgid "Next"
|
||||||
msgstr "التالي"
|
msgstr "التالي"
|
||||||
|
|
||||||
#: mod/cal.php:248 mod/events.php:386 src/Model/Event.php:457
|
#: mod/cal.php:249 mod/events.php:383 src/Model/Event.php:457
|
||||||
msgid "today"
|
msgid "today"
|
||||||
msgstr "اليوم"
|
msgstr "اليوم"
|
||||||
|
|
||||||
#: mod/cal.php:249 mod/events.php:387 src/Model/Event.php:458
|
#: mod/cal.php:250 mod/events.php:384 src/Model/Event.php:458
|
||||||
#: src/Util/Temporal.php:334
|
#: src/Util/Temporal.php:334
|
||||||
msgid "month"
|
msgid "month"
|
||||||
msgstr "شهر"
|
msgstr "شهر"
|
||||||
|
|
||||||
#: mod/cal.php:250 mod/events.php:388 src/Model/Event.php:459
|
#: mod/cal.php:251 mod/events.php:385 src/Model/Event.php:459
|
||||||
#: src/Util/Temporal.php:335
|
#: src/Util/Temporal.php:335
|
||||||
msgid "week"
|
msgid "week"
|
||||||
msgstr "أسبوع"
|
msgstr "أسبوع"
|
||||||
|
|
||||||
#: mod/cal.php:251 mod/events.php:389 src/Model/Event.php:460
|
#: mod/cal.php:252 mod/events.php:386 src/Model/Event.php:460
|
||||||
#: src/Util/Temporal.php:336
|
#: src/Util/Temporal.php:336
|
||||||
msgid "day"
|
msgid "day"
|
||||||
msgstr "يوم"
|
msgstr "يوم"
|
||||||
|
|
||||||
#: mod/cal.php:252 mod/events.php:390
|
#: mod/cal.php:253 mod/events.php:387
|
||||||
msgid "list"
|
msgid "list"
|
||||||
msgstr "قائمة"
|
msgstr "قائمة"
|
||||||
|
|
||||||
#: mod/cal.php:265 src/Console/User.php:182 src/Model/User.php:659
|
#: mod/cal.php:265 src/Console/User.php:182 src/Model/User.php:661
|
||||||
#: src/Module/Admin/Users/Active.php:73 src/Module/Admin/Users/Blocked.php:74
|
#: src/Module/Admin/Users/Active.php:73 src/Module/Admin/Users/Blocked.php:74
|
||||||
#: src/Module/Admin/Users/Index.php:80 src/Module/Admin/Users/Pending.php:71
|
#: src/Module/Admin/Users/Index.php:80 src/Module/Admin/Users/Pending.php:71
|
||||||
#: src/Module/Api/Twitter/ContactEndpoint.php:74
|
#: src/Module/Api/Twitter/ContactEndpoint.php:74
|
||||||
|
|
@ -106,50 +108,51 @@ msgstr "تنسيق هذا التقويم غير مدعوم"
|
||||||
msgid "No exportable data found"
|
msgid "No exportable data found"
|
||||||
msgstr "لم يُعثر على بيانات قابلة للتصدير"
|
msgstr "لم يُعثر على بيانات قابلة للتصدير"
|
||||||
|
|
||||||
#: mod/cal.php:293
|
#: mod/cal.php:292
|
||||||
msgid "calendar"
|
msgid "calendar"
|
||||||
msgstr "تقويم"
|
msgstr "تقويم"
|
||||||
|
|
||||||
#: mod/display.php:133 mod/photos.php:808
|
#: mod/display.php:142 mod/photos.php:802
|
||||||
#: src/Module/Conversation/Community.php:175 src/Module/Directory.php:48
|
#: src/Module/Conversation/Community.php:175 src/Module/Directory.php:49
|
||||||
#: src/Module/Search/Index.php:49
|
#: src/Module/Search/Index.php:50
|
||||||
msgid "Public access denied."
|
msgid "Public access denied."
|
||||||
msgstr "رُفض الوصول العلني."
|
msgstr "رُفض الوصول العلني."
|
||||||
|
|
||||||
#: mod/display.php:189 mod/display.php:263
|
#: mod/display.php:198 mod/display.php:272
|
||||||
msgid "The requested item doesn't exist or has been deleted."
|
msgid "The requested item doesn't exist or has been deleted."
|
||||||
msgstr "العنصر غير موجود أو حُذف."
|
msgstr "العنصر غير موجود أو حُذف."
|
||||||
|
|
||||||
#: mod/display.php:343
|
#: mod/display.php:352
|
||||||
msgid "The feed for this item is unavailable."
|
msgid "The feed for this item is unavailable."
|
||||||
msgstr "تغذية هذا العنصر غير متوفرة."
|
msgstr "تغذية هذا العنصر غير متوفرة."
|
||||||
|
|
||||||
#: mod/editpost.php:38 mod/events.php:220 mod/follow.php:56 mod/follow.php:130
|
#: mod/editpost.php:38 mod/events.php:217 mod/follow.php:56 mod/follow.php:130
|
||||||
#: mod/item.php:184 mod/item.php:189 mod/item.php:918 mod/message.php:69
|
#: mod/item.php:181 mod/item.php:186 mod/item.php:875 mod/message.php:69
|
||||||
#: mod/message.php:111 mod/notes.php:44 mod/ostatus_subscribe.php:32
|
#: mod/message.php:111 mod/notes.php:44 mod/ostatus_subscribe.php:33
|
||||||
#: mod/photos.php:160 mod/photos.php:897 mod/repair_ostatus.php:31
|
#: mod/photos.php:160 mod/photos.php:891 mod/repair_ostatus.php:31
|
||||||
#: mod/settings.php:47 mod/settings.php:57 mod/settings.php:417
|
#: mod/settings.php:40 mod/settings.php:50 mod/settings.php:156
|
||||||
#: mod/suggest.php:34 mod/uimport.php:33 mod/unfollow.php:35
|
#: mod/suggest.php:34 mod/uimport.php:33 mod/unfollow.php:35
|
||||||
#: mod/unfollow.php:50 mod/unfollow.php:82 mod/wall_attach.php:68
|
#: mod/unfollow.php:50 mod/unfollow.php:82 mod/wall_attach.php:67
|
||||||
#: mod/wall_attach.php:71 mod/wall_upload.php:90 mod/wall_upload.php:93
|
#: mod/wall_attach.php:69 mod/wall_upload.php:89 mod/wall_upload.php:91
|
||||||
#: mod/wallmessage.php:37 mod/wallmessage.php:56 mod/wallmessage.php:90
|
#: mod/wallmessage.php:37 mod/wallmessage.php:56 mod/wallmessage.php:90
|
||||||
#: mod/wallmessage.php:110 src/Module/Attach.php:55 src/Module/BaseApi.php:93
|
#: mod/wallmessage.php:110 src/Module/Attach.php:56 src/Module/BaseApi.php:93
|
||||||
#: src/Module/BaseNotifications.php:97 src/Module/Contact/Advanced.php:60
|
#: src/Module/BaseNotifications.php:97 src/Module/Contact/Advanced.php:60
|
||||||
#: src/Module/Delegation.php:119 src/Module/FollowConfirm.php:38
|
#: src/Module/Delegation.php:119 src/Module/FollowConfirm.php:38
|
||||||
#: src/Module/FriendSuggest.php:56 src/Module/Group.php:42
|
#: src/Module/FriendSuggest.php:56 src/Module/Group.php:42
|
||||||
#: src/Module/Group.php:85 src/Module/Invite.php:41 src/Module/Invite.php:130
|
#: src/Module/Group.php:85 src/Module/Invite.php:42 src/Module/Invite.php:131
|
||||||
#: src/Module/Notifications/Notification.php:48
|
#: src/Module/Notifications/Notification.php:75
|
||||||
#: src/Module/Notifications/Notification.php:79
|
#: src/Module/Notifications/Notification.php:106
|
||||||
#: src/Module/Profile/Common.php:56 src/Module/Profile/Contacts.php:56
|
#: src/Module/Profile/Common.php:56 src/Module/Profile/Contacts.php:56
|
||||||
#: src/Module/Profile/Schedule.php:39 src/Module/Profile/Schedule.php:56
|
#: src/Module/Profile/Schedule.php:39 src/Module/Profile/Schedule.php:56
|
||||||
#: src/Module/Register.php:77 src/Module/Register.php:90
|
#: src/Module/Register.php:77 src/Module/Register.php:90
|
||||||
#: src/Module/Register.php:206 src/Module/Register.php:245
|
#: src/Module/Register.php:206 src/Module/Register.php:245
|
||||||
#: src/Module/Search/Directory.php:37 src/Module/Settings/Delegation.php:42
|
#: src/Module/Search/Directory.php:37 src/Module/Settings/Account.php:49
|
||||||
|
#: src/Module/Settings/Account.php:409 src/Module/Settings/Delegation.php:42
|
||||||
#: src/Module/Settings/Delegation.php:70 src/Module/Settings/Display.php:42
|
#: src/Module/Settings/Delegation.php:70 src/Module/Settings/Display.php:42
|
||||||
#: src/Module/Settings/Display.php:120
|
#: src/Module/Settings/Display.php:120
|
||||||
#: src/Module/Settings/Profile/Photo/Crop.php:166
|
#: src/Module/Settings/Profile/Photo/Crop.php:166
|
||||||
#: src/Module/Settings/Profile/Photo/Index.php:112
|
#: src/Module/Settings/Profile/Photo/Index.php:112
|
||||||
#: src/Module/Settings/UserExport.php:57 src/Module/Settings/UserExport.php:91
|
#: src/Module/Settings/UserExport.php:58 src/Module/Settings/UserExport.php:92
|
||||||
#: src/Module/Settings/UserExport.php:196
|
#: src/Module/Settings/UserExport.php:196
|
||||||
#: src/Module/Settings/UserExport.php:216
|
#: src/Module/Settings/UserExport.php:216
|
||||||
#: src/Module/Settings/UserExport.php:281
|
#: src/Module/Settings/UserExport.php:281
|
||||||
|
|
@ -169,25 +172,25 @@ msgstr "عدّل المشاركة"
|
||||||
msgid "Save"
|
msgid "Save"
|
||||||
msgstr "احفظ"
|
msgstr "احفظ"
|
||||||
|
|
||||||
#: mod/editpost.php:92 mod/photos.php:1344 src/Content/Conversation.php:326
|
#: mod/editpost.php:92 mod/photos.php:1338 src/Content/Conversation.php:338
|
||||||
#: src/Module/Contact/Poke.php:176 src/Object/Post.php:982
|
#: src/Module/Contact/Poke.php:176 src/Object/Post.php:989
|
||||||
msgid "Loading..."
|
msgid "Loading..."
|
||||||
msgstr "يحمل..."
|
msgstr "يحمل..."
|
||||||
|
|
||||||
#: mod/editpost.php:93 mod/message.php:198 mod/message.php:355
|
#: mod/editpost.php:93 mod/message.php:198 mod/message.php:355
|
||||||
#: mod/wallmessage.php:140 src/Content/Conversation.php:327
|
#: mod/wallmessage.php:140 src/Content/Conversation.php:339
|
||||||
msgid "Upload photo"
|
msgid "Upload photo"
|
||||||
msgstr "ارفع صورة"
|
msgstr "ارفع صورة"
|
||||||
|
|
||||||
#: mod/editpost.php:94 src/Content/Conversation.php:328
|
#: mod/editpost.php:94 src/Content/Conversation.php:340
|
||||||
msgid "upload photo"
|
msgid "upload photo"
|
||||||
msgstr "ارفع صورة"
|
msgstr "ارفع صورة"
|
||||||
|
|
||||||
#: mod/editpost.php:95 src/Content/Conversation.php:329
|
#: mod/editpost.php:95 src/Content/Conversation.php:341
|
||||||
msgid "Attach file"
|
msgid "Attach file"
|
||||||
msgstr "أرفق ملفًا"
|
msgstr "أرفق ملفًا"
|
||||||
|
|
||||||
#: mod/editpost.php:96 src/Content/Conversation.php:330
|
#: mod/editpost.php:96 src/Content/Conversation.php:342
|
||||||
msgid "attach file"
|
msgid "attach file"
|
||||||
msgstr "أرفق ملفًا"
|
msgstr "أرفق ملفًا"
|
||||||
|
|
||||||
|
|
@ -216,31 +219,31 @@ msgstr "إدراج رابط ملف صوتي"
|
||||||
msgid "audio link"
|
msgid "audio link"
|
||||||
msgstr "رابط ملف صوتي"
|
msgstr "رابط ملف صوتي"
|
||||||
|
|
||||||
#: mod/editpost.php:103 src/Content/Conversation.php:340
|
#: mod/editpost.php:103 src/Content/Conversation.php:352
|
||||||
#: src/Module/Item/Compose.php:161
|
#: src/Module/Item/Compose.php:173
|
||||||
msgid "Set your location"
|
msgid "Set your location"
|
||||||
msgstr "عيّن موقعك"
|
msgstr "عيّن موقعك"
|
||||||
|
|
||||||
#: mod/editpost.php:104 src/Content/Conversation.php:341
|
#: mod/editpost.php:104 src/Content/Conversation.php:353
|
||||||
msgid "set location"
|
msgid "set location"
|
||||||
msgstr "عين الموقع"
|
msgstr "عين الموقع"
|
||||||
|
|
||||||
#: mod/editpost.php:105 src/Content/Conversation.php:342
|
#: mod/editpost.php:105 src/Content/Conversation.php:354
|
||||||
msgid "Clear browser location"
|
msgid "Clear browser location"
|
||||||
msgstr "امسح موقع المتصفح"
|
msgstr "امسح موقع المتصفح"
|
||||||
|
|
||||||
#: mod/editpost.php:106 src/Content/Conversation.php:343
|
#: mod/editpost.php:106 src/Content/Conversation.php:355
|
||||||
msgid "clear location"
|
msgid "clear location"
|
||||||
msgstr "امسح الموقع"
|
msgstr "امسح الموقع"
|
||||||
|
|
||||||
#: mod/editpost.php:107 mod/message.php:200 mod/message.php:358
|
#: mod/editpost.php:107 mod/message.php:200 mod/message.php:358
|
||||||
#: mod/photos.php:1495 mod/wallmessage.php:142
|
#: mod/photos.php:1489 mod/wallmessage.php:142
|
||||||
#: src/Content/Conversation.php:355 src/Content/Conversation.php:690
|
#: src/Content/Conversation.php:368 src/Content/Conversation.php:712
|
||||||
#: src/Module/Item/Compose.php:165 src/Object/Post.php:520
|
#: src/Module/Item/Compose.php:177 src/Object/Post.php:528
|
||||||
msgid "Please wait"
|
msgid "Please wait"
|
||||||
msgstr "يرجى الانتظار"
|
msgstr "يرجى الانتظار"
|
||||||
|
|
||||||
#: mod/editpost.php:108 src/Content/Conversation.php:356
|
#: mod/editpost.php:108 src/Content/Conversation.php:369
|
||||||
msgid "Permission settings"
|
msgid "Permission settings"
|
||||||
msgstr "إعدادات الأذونات"
|
msgstr "إعدادات الأذونات"
|
||||||
|
|
||||||
|
|
@ -248,17 +251,17 @@ msgstr "إعدادات الأذونات"
|
||||||
msgid "CC: email addresses"
|
msgid "CC: email addresses"
|
||||||
msgstr "أرسله إلى عناوين البريد الإلكتروني"
|
msgstr "أرسله إلى عناوين البريد الإلكتروني"
|
||||||
|
|
||||||
#: mod/editpost.php:117 src/Content/Conversation.php:366
|
#: mod/editpost.php:117 src/Content/Conversation.php:379
|
||||||
msgid "Public post"
|
msgid "Public post"
|
||||||
msgstr "مشاركة علنية"
|
msgstr "مشاركة علنية"
|
||||||
|
|
||||||
#: mod/editpost.php:120 src/Content/Conversation.php:345
|
#: mod/editpost.php:120 src/Content/Conversation.php:357
|
||||||
#: src/Module/Item/Compose.php:166
|
#: src/Module/Item/Compose.php:178
|
||||||
msgid "Set title"
|
msgid "Set title"
|
||||||
msgstr "عين العنوان"
|
msgstr "عين العنوان"
|
||||||
|
|
||||||
#: mod/editpost.php:122 src/Content/Conversation.php:347
|
#: mod/editpost.php:122 src/Content/Conversation.php:359
|
||||||
#: src/Module/Item/Compose.php:167
|
#: src/Module/Item/Compose.php:179
|
||||||
msgid "Categories (comma-separated list)"
|
msgid "Categories (comma-separated list)"
|
||||||
msgstr "الفئات (قائمة مفصولة بفاصلة)"
|
msgstr "الفئات (قائمة مفصولة بفاصلة)"
|
||||||
|
|
||||||
|
|
@ -266,75 +269,75 @@ msgstr "الفئات (قائمة مفصولة بفاصلة)"
|
||||||
msgid "Example: bob@example.com, mary@example.com"
|
msgid "Example: bob@example.com, mary@example.com"
|
||||||
msgstr "مثل: bob@example.com, mary@example.com"
|
msgstr "مثل: bob@example.com, mary@example.com"
|
||||||
|
|
||||||
#: mod/editpost.php:128 mod/events.php:517 mod/photos.php:1343
|
#: mod/editpost.php:128 mod/events.php:513 mod/photos.php:1337
|
||||||
#: mod/photos.php:1399 mod/photos.php:1473 src/Content/Conversation.php:370
|
#: mod/photos.php:1393 mod/photos.php:1467 src/Content/Conversation.php:383
|
||||||
#: src/Module/Item/Compose.php:160 src/Object/Post.php:992
|
#: src/Module/Item/Compose.php:172 src/Object/Post.php:999
|
||||||
msgid "Preview"
|
msgid "Preview"
|
||||||
msgstr "معاينة"
|
msgstr "معاينة"
|
||||||
|
|
||||||
#: mod/editpost.php:130 mod/fbrowser.php:117 mod/fbrowser.php:144
|
#: mod/editpost.php:130 mod/fbrowser.php:118 mod/fbrowser.php:145
|
||||||
#: mod/follow.php:144 mod/photos.php:1010 mod/photos.php:1111 mod/tagrm.php:35
|
#: mod/follow.php:144 mod/photos.php:1004 mod/photos.php:1105 mod/tagrm.php:35
|
||||||
#: mod/tagrm.php:127 mod/unfollow.php:97 src/Content/Conversation.php:373
|
#: mod/tagrm.php:127 mod/unfollow.php:97 src/Content/Conversation.php:386
|
||||||
#: src/Module/Contact/Revoke.php:108 src/Module/RemoteFollow.php:127
|
#: src/Module/Contact/Revoke.php:108 src/Module/RemoteFollow.php:127
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
msgstr "ألغ"
|
msgstr "ألغ"
|
||||||
|
|
||||||
#: mod/editpost.php:134 src/Content/Conversation.php:331
|
#: mod/editpost.php:134 src/Content/Conversation.php:343
|
||||||
#: src/Module/Item/Compose.php:151 src/Object/Post.php:983
|
#: src/Module/Item/Compose.php:163 src/Object/Post.php:990
|
||||||
msgid "Bold"
|
msgid "Bold"
|
||||||
msgstr "عريض"
|
msgstr "عريض"
|
||||||
|
|
||||||
#: mod/editpost.php:135 src/Content/Conversation.php:332
|
#: mod/editpost.php:135 src/Content/Conversation.php:344
|
||||||
#: src/Module/Item/Compose.php:152 src/Object/Post.php:984
|
#: src/Module/Item/Compose.php:164 src/Object/Post.php:991
|
||||||
msgid "Italic"
|
msgid "Italic"
|
||||||
msgstr "مائل"
|
msgstr "مائل"
|
||||||
|
|
||||||
#: mod/editpost.php:136 src/Content/Conversation.php:333
|
#: mod/editpost.php:136 src/Content/Conversation.php:345
|
||||||
#: src/Module/Item/Compose.php:153 src/Object/Post.php:985
|
#: src/Module/Item/Compose.php:165 src/Object/Post.php:992
|
||||||
msgid "Underline"
|
msgid "Underline"
|
||||||
msgstr "تحته خط"
|
msgstr "تحته خط"
|
||||||
|
|
||||||
#: mod/editpost.php:137 src/Content/Conversation.php:334
|
#: mod/editpost.php:137 src/Content/Conversation.php:346
|
||||||
#: src/Module/Item/Compose.php:154 src/Object/Post.php:986
|
#: src/Module/Item/Compose.php:166 src/Object/Post.php:993
|
||||||
msgid "Quote"
|
msgid "Quote"
|
||||||
msgstr "اقتبس"
|
msgstr "اقتبس"
|
||||||
|
|
||||||
#: mod/editpost.php:138 src/Content/Conversation.php:335
|
#: mod/editpost.php:138 src/Content/Conversation.php:347
|
||||||
#: src/Module/Item/Compose.php:155 src/Object/Post.php:987
|
#: src/Module/Item/Compose.php:167 src/Object/Post.php:994
|
||||||
msgid "Code"
|
msgid "Code"
|
||||||
msgstr "شفرة"
|
msgstr "شفرة"
|
||||||
|
|
||||||
#: mod/editpost.php:139 src/Content/Conversation.php:337
|
#: mod/editpost.php:139 src/Content/Conversation.php:349
|
||||||
#: src/Module/Item/Compose.php:157 src/Object/Post.php:989
|
#: src/Module/Item/Compose.php:169 src/Object/Post.php:996
|
||||||
msgid "Link"
|
msgid "Link"
|
||||||
msgstr "رابط"
|
msgstr "رابط"
|
||||||
|
|
||||||
#: mod/editpost.php:140 src/Content/Conversation.php:338
|
#: mod/editpost.php:140 src/Content/Conversation.php:350
|
||||||
#: src/Module/Item/Compose.php:158 src/Object/Post.php:990
|
#: src/Module/Item/Compose.php:170 src/Object/Post.php:997
|
||||||
msgid "Link or Media"
|
msgid "Link or Media"
|
||||||
msgstr "رابط أو وسائط"
|
msgstr "رابط أو وسائط"
|
||||||
|
|
||||||
#: mod/editpost.php:143 src/Content/Conversation.php:380
|
#: mod/editpost.php:143 src/Content/Conversation.php:393
|
||||||
#: src/Content/Widget/VCard.php:107 src/Model/Profile.php:460
|
#: src/Content/Widget/VCard.php:113 src/Model/Profile.php:462
|
||||||
#: src/Module/Admin/Logs/View.php:92
|
#: src/Module/Admin/Logs/View.php:93
|
||||||
msgid "Message"
|
msgid "Message"
|
||||||
msgstr "الرسالة"
|
msgstr "الرسالة"
|
||||||
|
|
||||||
#: mod/editpost.php:144 src/Content/Conversation.php:381
|
#: mod/editpost.php:144 src/Content/Conversation.php:394
|
||||||
#: src/Module/Settings/TwoFactor/Trusted.php:137
|
#: src/Module/Settings/TwoFactor/Trusted.php:137
|
||||||
msgid "Browser"
|
msgid "Browser"
|
||||||
msgstr "المتصفح"
|
msgstr "المتصفح"
|
||||||
|
|
||||||
#: mod/editpost.php:145 mod/events.php:522 mod/photos.php:945
|
#: mod/editpost.php:145 mod/events.php:518 mod/photos.php:939
|
||||||
#: mod/photos.php:1297 src/Content/Conversation.php:357
|
#: mod/photos.php:1291 src/Content/Conversation.php:370
|
||||||
msgid "Permissions"
|
msgid "Permissions"
|
||||||
msgstr "الأُذونات"
|
msgstr "الأُذونات"
|
||||||
|
|
||||||
#: mod/editpost.php:147 src/Content/Conversation.php:383
|
#: mod/editpost.php:147 src/Content/Conversation.php:396
|
||||||
msgid "Open Compose page"
|
msgid "Open Compose page"
|
||||||
msgstr "افتح صفحة الإنشاء"
|
msgstr "افتح صفحة الإنشاء"
|
||||||
|
|
||||||
#: mod/events.php:123 mod/events.php:125
|
#: mod/events.php:124 mod/events.php:126
|
||||||
msgid "Event can not end before it has started."
|
msgid "Event can not end before it has started."
|
||||||
msgstr "لا يمكن أن ينتهي الحدث قبل أن يبدأ."
|
msgstr "لا يمكن أن ينتهي الحدث قبل أن يبدأ."
|
||||||
|
|
||||||
|
|
@ -342,23 +345,23 @@ msgstr "لا يمكن أن ينتهي الحدث قبل أن يبدأ."
|
||||||
msgid "Event title and start time are required."
|
msgid "Event title and start time are required."
|
||||||
msgstr "عنوان الحدث و وقت بدئه إلزاميان."
|
msgstr "عنوان الحدث و وقت بدئه إلزاميان."
|
||||||
|
|
||||||
#: mod/events.php:379
|
#: mod/events.php:376
|
||||||
msgid "Create New Event"
|
msgid "Create New Event"
|
||||||
msgstr "أنشئ حدثاً جديدًا"
|
msgstr "أنشئ حدثاً جديدًا"
|
||||||
|
|
||||||
#: mod/events.php:478 src/Module/Admin/Logs/View.php:96
|
#: mod/events.php:474 src/Module/Admin/Logs/View.php:97
|
||||||
msgid "Event details"
|
msgid "Event details"
|
||||||
msgstr "تفاصيل الحدث"
|
msgstr "تفاصيل الحدث"
|
||||||
|
|
||||||
#: mod/events.php:479
|
#: mod/events.php:475
|
||||||
msgid "Starting date and Title are required."
|
msgid "Starting date and Title are required."
|
||||||
msgstr "تاريخ البدء والعنوان إلزاميان."
|
msgstr "تاريخ البدء والعنوان إلزاميان."
|
||||||
|
|
||||||
#: mod/events.php:480 mod/events.php:485
|
#: mod/events.php:476 mod/events.php:481
|
||||||
msgid "Event Starts:"
|
msgid "Event Starts:"
|
||||||
msgstr "يبدأ الحدث في:"
|
msgstr "يبدأ الحدث في:"
|
||||||
|
|
||||||
#: mod/events.php:480 mod/events.php:510
|
#: mod/events.php:476 mod/events.php:506
|
||||||
#: src/Module/Admin/Blocklist/Server/Add.php:104
|
#: src/Module/Admin/Blocklist/Server/Add.php:104
|
||||||
#: src/Module/Admin/Blocklist/Server/Add.php:106
|
#: src/Module/Admin/Blocklist/Server/Add.php:106
|
||||||
#: src/Module/Admin/Blocklist/Server/Index.php:68
|
#: src/Module/Admin/Blocklist/Server/Index.php:68
|
||||||
|
|
@ -377,77 +380,77 @@ msgstr "يبدأ الحدث في:"
|
||||||
msgid "Required"
|
msgid "Required"
|
||||||
msgstr "إلزامي"
|
msgstr "إلزامي"
|
||||||
|
|
||||||
#: mod/events.php:493 mod/events.php:516
|
#: mod/events.php:489 mod/events.php:512
|
||||||
msgid "Finish date/time is not known or not relevant"
|
msgid "Finish date/time is not known or not relevant"
|
||||||
msgstr "وقت\\تاريخ الانتهاء مجهول أو ليس له صلة"
|
msgstr "وقت\\تاريخ الانتهاء مجهول أو ليس له صلة"
|
||||||
|
|
||||||
#: mod/events.php:495 mod/events.php:500
|
#: mod/events.php:491 mod/events.php:496
|
||||||
msgid "Event Finishes:"
|
msgid "Event Finishes:"
|
||||||
msgstr "ينتهي الحدث في:"
|
msgstr "ينتهي الحدث في:"
|
||||||
|
|
||||||
#: mod/events.php:506 src/Module/Profile/Profile.php:172
|
#: mod/events.php:502 src/Module/Profile/Profile.php:172
|
||||||
#: src/Module/Settings/Profile/Index.php:238
|
#: src/Module/Settings/Profile/Index.php:238
|
||||||
msgid "Description:"
|
msgid "Description:"
|
||||||
msgstr "الوصف:"
|
msgstr "الوصف:"
|
||||||
|
|
||||||
#: mod/events.php:508 src/Content/Widget/VCard.php:98 src/Model/Event.php:80
|
#: mod/events.php:504 src/Content/Widget/VCard.php:104 src/Model/Event.php:80
|
||||||
#: src/Model/Event.php:107 src/Model/Event.php:466 src/Model/Event.php:915
|
#: src/Model/Event.php:107 src/Model/Event.php:466 src/Model/Event.php:915
|
||||||
#: src/Model/Profile.php:368 src/Module/Contact/Profile.php:369
|
#: src/Model/Profile.php:370 src/Module/Contact/Profile.php:369
|
||||||
#: src/Module/Directory.php:147 src/Module/Notifications/Introductions.php:185
|
#: src/Module/Directory.php:148 src/Module/Notifications/Introductions.php:185
|
||||||
#: src/Module/Profile/Profile.php:194
|
#: src/Module/Profile/Profile.php:194
|
||||||
msgid "Location:"
|
msgid "Location:"
|
||||||
msgstr "الموقع:"
|
msgstr "الموقع:"
|
||||||
|
|
||||||
#: mod/events.php:510 mod/events.php:512
|
#: mod/events.php:506 mod/events.php:508
|
||||||
msgid "Title:"
|
msgid "Title:"
|
||||||
msgstr "العنوان:"
|
msgstr "العنوان:"
|
||||||
|
|
||||||
#: mod/events.php:513 mod/events.php:514
|
#: mod/events.php:509 mod/events.php:510
|
||||||
msgid "Share this event"
|
msgid "Share this event"
|
||||||
msgstr "شارك هذا الحدث"
|
msgstr "شارك هذا الحدث"
|
||||||
|
|
||||||
#: mod/events.php:519 mod/message.php:201 mod/message.php:357
|
#: mod/events.php:515 mod/message.php:201 mod/message.php:357
|
||||||
#: mod/photos.php:927 mod/photos.php:1031 mod/photos.php:1301
|
#: mod/photos.php:921 mod/photos.php:1025 mod/photos.php:1295
|
||||||
#: mod/photos.php:1342 mod/photos.php:1398 mod/photos.php:1472
|
#: mod/photos.php:1336 mod/photos.php:1392 mod/photos.php:1466
|
||||||
#: src/Module/Admin/Item/Source.php:65 src/Module/Contact/Advanced.php:132
|
#: src/Module/Admin/Item/Source.php:65 src/Module/Contact/Advanced.php:132
|
||||||
#: src/Module/Contact/Poke.php:177 src/Module/Contact/Profile.php:327
|
#: src/Module/Contact/Poke.php:177 src/Module/Contact/Profile.php:327
|
||||||
#: src/Module/Debug/ActivityPubConversion.php:141
|
#: src/Module/Debug/ActivityPubConversion.php:145
|
||||||
#: src/Module/Debug/Babel.php:313 src/Module/Debug/Localtime.php:64
|
#: src/Module/Debug/Babel.php:313 src/Module/Debug/Localtime.php:64
|
||||||
#: src/Module/Debug/Probe.php:54 src/Module/Debug/WebFinger.php:51
|
#: src/Module/Debug/Probe.php:54 src/Module/Debug/WebFinger.php:51
|
||||||
#: src/Module/Delegation.php:148 src/Module/FriendSuggest.php:144
|
#: src/Module/Delegation.php:148 src/Module/FriendSuggest.php:144
|
||||||
#: src/Module/Install.php:252 src/Module/Install.php:294
|
#: src/Module/Install.php:252 src/Module/Install.php:294
|
||||||
#: src/Module/Install.php:331 src/Module/Invite.php:177
|
#: src/Module/Install.php:331 src/Module/Invite.php:178
|
||||||
#: src/Module/Item/Compose.php:150 src/Module/Profile/Profile.php:247
|
#: src/Module/Item/Compose.php:162 src/Module/Profile/Profile.php:247
|
||||||
#: src/Module/Settings/Profile/Index.php:222 src/Object/Post.php:981
|
#: src/Module/Settings/Profile/Index.php:222 src/Object/Post.php:988
|
||||||
#: view/theme/duepuntozero/config.php:69 view/theme/frio/config.php:160
|
#: view/theme/duepuntozero/config.php:69 view/theme/frio/config.php:160
|
||||||
#: view/theme/quattro/config.php:71 view/theme/vier/config.php:119
|
#: view/theme/quattro/config.php:71 view/theme/vier/config.php:119
|
||||||
msgid "Submit"
|
msgid "Submit"
|
||||||
msgstr "أرسل"
|
msgstr "أرسل"
|
||||||
|
|
||||||
#: mod/events.php:520 src/Module/Profile/Profile.php:248
|
#: mod/events.php:516 src/Module/Profile/Profile.php:248
|
||||||
msgid "Basic"
|
msgid "Basic"
|
||||||
msgstr "أساسي"
|
msgstr "أساسي"
|
||||||
|
|
||||||
#: mod/events.php:521 src/Module/Admin/Site.php:506 src/Module/Contact.php:474
|
#: mod/events.php:517 src/Module/Admin/Site.php:439 src/Module/Contact.php:474
|
||||||
#: src/Module/Profile/Profile.php:249
|
#: src/Module/Profile/Profile.php:249
|
||||||
msgid "Advanced"
|
msgid "Advanced"
|
||||||
msgstr "متقدم"
|
msgstr "متقدم"
|
||||||
|
|
||||||
#: mod/events.php:538
|
#: mod/events.php:534
|
||||||
msgid "Failed to remove event"
|
msgid "Failed to remove event"
|
||||||
msgstr "فشلت إزالة الحدث"
|
msgstr "فشلت إزالة الحدث"
|
||||||
|
|
||||||
#: mod/fbrowser.php:60 src/Content/Nav.php:192 src/Module/BaseProfile.php:64
|
#: mod/fbrowser.php:61 src/Content/Nav.php:192 src/Module/BaseProfile.php:64
|
||||||
#: view/theme/frio/theme.php:227
|
#: view/theme/frio/theme.php:227
|
||||||
msgid "Photos"
|
msgid "Photos"
|
||||||
msgstr "الصور"
|
msgstr "الصور"
|
||||||
|
|
||||||
#: mod/fbrowser.php:119 mod/fbrowser.php:146
|
#: mod/fbrowser.php:120 mod/fbrowser.php:147
|
||||||
#: src/Module/Settings/Profile/Photo/Index.php:129
|
#: src/Module/Settings/Profile/Photo/Index.php:129
|
||||||
msgid "Upload"
|
msgid "Upload"
|
||||||
msgstr "ارفع"
|
msgstr "ارفع"
|
||||||
|
|
||||||
#: mod/fbrowser.php:141
|
#: mod/fbrowser.php:142
|
||||||
msgid "Files"
|
msgid "Files"
|
||||||
msgstr "الملفات"
|
msgstr "الملفات"
|
||||||
|
|
||||||
|
|
@ -471,8 +474,8 @@ msgstr "دعم دياسبورا غير مفعل. لا يمكن إضافة الم
|
||||||
msgid "OStatus support is disabled. Contact can't be added."
|
msgid "OStatus support is disabled. Contact can't be added."
|
||||||
msgstr "دعم OStatus غير مفعل. لا يمكن إضافة المتراسل."
|
msgstr "دعم OStatus غير مفعل. لا يمكن إضافة المتراسل."
|
||||||
|
|
||||||
#: mod/follow.php:138 src/Content/Item.php:452 src/Content/Widget.php:76
|
#: mod/follow.php:138 src/Content/Item.php:443 src/Content/Widget.php:78
|
||||||
#: src/Model/Contact.php:1083 src/Model/Contact.php:1095
|
#: src/Model/Contact.php:1102 src/Model/Contact.php:1114
|
||||||
#: view/theme/vier/theme.php:172
|
#: view/theme/vier/theme.php:172
|
||||||
msgid "Connect/Follow"
|
msgid "Connect/Follow"
|
||||||
msgstr "اقترن\\تابع"
|
msgstr "اقترن\\تابع"
|
||||||
|
|
@ -517,29 +520,29 @@ msgstr "مشاركات ورسائل الحالة"
|
||||||
msgid "The contact could not be added."
|
msgid "The contact could not be added."
|
||||||
msgstr "تعذر إضافة المتراسل."
|
msgstr "تعذر إضافة المتراسل."
|
||||||
|
|
||||||
#: mod/item.php:134 mod/item.php:138
|
#: mod/item.php:131 mod/item.php:135
|
||||||
msgid "Unable to locate original post."
|
msgid "Unable to locate original post."
|
||||||
msgstr "تعذر إيجاد المشاركة الأصلية."
|
msgstr "تعذر إيجاد المشاركة الأصلية."
|
||||||
|
|
||||||
#: mod/item.php:340 mod/item.php:345
|
#: mod/item.php:337 mod/item.php:342
|
||||||
msgid "Empty post discarded."
|
msgid "Empty post discarded."
|
||||||
msgstr "رُفضت المشاركة الفارغة."
|
msgstr "رُفضت المشاركة الفارغة."
|
||||||
|
|
||||||
#: mod/item.php:724
|
#: mod/item.php:687
|
||||||
msgid "Post updated."
|
msgid "Post updated."
|
||||||
msgstr "حُدثت المشاركة."
|
msgstr "حُدثت المشاركة."
|
||||||
|
|
||||||
#: mod/item.php:734 mod/item.php:739
|
#: mod/item.php:697 mod/item.php:702
|
||||||
msgid "Item wasn't stored."
|
msgid "Item wasn't stored."
|
||||||
msgstr "لم يخزن العنصر."
|
msgstr "لم يخزن العنصر."
|
||||||
|
|
||||||
#: mod/item.php:750
|
#: mod/item.php:713
|
||||||
msgid "Item couldn't be fetched."
|
msgid "Item couldn't be fetched."
|
||||||
msgstr "تعذر جلب العنصر."
|
msgstr "تعذر جلب العنصر."
|
||||||
|
|
||||||
#: mod/item.php:896 src/Module/Admin/Themes/Details.php:39
|
#: mod/item.php:853 src/Module/Admin/Themes/Details.php:39
|
||||||
#: src/Module/Admin/Themes/Index.php:59 src/Module/Debug/ItemBody.php:41
|
#: src/Module/Admin/Themes/Index.php:59 src/Module/Debug/ItemBody.php:42
|
||||||
#: src/Module/Debug/ItemBody.php:56
|
#: src/Module/Debug/ItemBody.php:57
|
||||||
msgid "Item not found."
|
msgid "Item not found."
|
||||||
msgstr "لم يُعثر على العنصر."
|
msgstr "لم يُعثر على العنصر."
|
||||||
|
|
||||||
|
|
@ -681,7 +684,7 @@ msgstr "غُيرت كلمة المرور على %s"
|
||||||
msgid "No keywords to match. Please add keywords to your profile."
|
msgid "No keywords to match. Please add keywords to your profile."
|
||||||
msgstr "لا توجد كلمات مفتاحية لمطابقتها. من فضلك أضف كلمات مفتاحية إلى ملفك الشخصي."
|
msgstr "لا توجد كلمات مفتاحية لمطابقتها. من فضلك أضف كلمات مفتاحية إلى ملفك الشخصي."
|
||||||
|
|
||||||
#: mod/match.php:93 src/Module/BaseSearch.php:116
|
#: mod/match.php:93 src/Module/BaseSearch.php:119
|
||||||
msgid "No matches"
|
msgid "No matches"
|
||||||
msgstr "لا تطابق"
|
msgstr "لا تطابق"
|
||||||
|
|
||||||
|
|
@ -711,7 +714,7 @@ msgstr "فشل استرجاع الرسائل."
|
||||||
|
|
||||||
#: mod/message.php:120 src/Module/Notifications/Introductions.php:133
|
#: mod/message.php:120 src/Module/Notifications/Introductions.php:133
|
||||||
#: src/Module/Notifications/Introductions.php:168
|
#: src/Module/Notifications/Introductions.php:168
|
||||||
#: src/Module/Notifications/Notification.php:57
|
#: src/Module/Notifications/Notification.php:84
|
||||||
msgid "Discard"
|
msgid "Discard"
|
||||||
msgstr "ارفض"
|
msgstr "ارفض"
|
||||||
|
|
||||||
|
|
@ -748,7 +751,7 @@ msgid "Subject:"
|
||||||
msgstr "الموضوع:"
|
msgstr "الموضوع:"
|
||||||
|
|
||||||
#: mod/message.php:195 mod/message.php:351 mod/wallmessage.php:138
|
#: mod/message.php:195 mod/message.php:351 mod/wallmessage.php:138
|
||||||
#: src/Module/Invite.php:170
|
#: src/Module/Invite.php:171
|
||||||
msgid "Your message:"
|
msgid "Your message:"
|
||||||
msgstr "رسالتك:"
|
msgstr "رسالتك:"
|
||||||
|
|
||||||
|
|
@ -816,51 +819,51 @@ msgstr "ملاحظات شخصية"
|
||||||
msgid "Personal notes are visible only by yourself."
|
msgid "Personal notes are visible only by yourself."
|
||||||
msgstr "الملاحظات الشخصية مرئية لك فقط."
|
msgstr "الملاحظات الشخصية مرئية لك فقط."
|
||||||
|
|
||||||
#: mod/ostatus_subscribe.php:37
|
#: mod/ostatus_subscribe.php:38
|
||||||
msgid "Subscribing to contacts"
|
msgid "Subscribing to contacts"
|
||||||
msgstr "يشترك في متراسلين"
|
msgstr "يشترك في متراسلين"
|
||||||
|
|
||||||
#: mod/ostatus_subscribe.php:47
|
#: mod/ostatus_subscribe.php:48
|
||||||
msgid "No contact provided."
|
msgid "No contact provided."
|
||||||
msgstr "لم يُقدم متراسلين."
|
msgstr "لم يُقدم متراسلين."
|
||||||
|
|
||||||
#: mod/ostatus_subscribe.php:53
|
#: mod/ostatus_subscribe.php:54
|
||||||
msgid "Couldn't fetch information for contact."
|
msgid "Couldn't fetch information for contact."
|
||||||
msgstr "تعذر جلب معلومات المتراسل."
|
msgstr "تعذر جلب معلومات المتراسل."
|
||||||
|
|
||||||
#: mod/ostatus_subscribe.php:64
|
#: mod/ostatus_subscribe.php:65
|
||||||
msgid "Couldn't fetch friends for contact."
|
msgid "Couldn't fetch friends for contact."
|
||||||
msgstr "تعذر جلب أصدقاء المتراسل."
|
msgstr "تعذر جلب أصدقاء المتراسل."
|
||||||
|
|
||||||
#: mod/ostatus_subscribe.php:70 mod/ostatus_subscribe.php:81
|
#: mod/ostatus_subscribe.php:71 mod/ostatus_subscribe.php:82
|
||||||
msgid "Couldn't fetch following contacts."
|
msgid "Couldn't fetch following contacts."
|
||||||
msgstr "تعذر جلب متابِعي المتراسل."
|
msgstr "تعذر جلب متابِعي المتراسل."
|
||||||
|
|
||||||
#: mod/ostatus_subscribe.php:76
|
#: mod/ostatus_subscribe.php:77
|
||||||
msgid "Couldn't fetch remote profile."
|
msgid "Couldn't fetch remote profile."
|
||||||
msgstr "تعذر جلب الملف الشخصي البعيد."
|
msgstr "تعذر جلب الملف الشخصي البعيد."
|
||||||
|
|
||||||
#: mod/ostatus_subscribe.php:86
|
#: mod/ostatus_subscribe.php:87
|
||||||
msgid "Unsupported network"
|
msgid "Unsupported network"
|
||||||
msgstr "شبكة غير مدعومة"
|
msgstr "شبكة غير مدعومة"
|
||||||
|
|
||||||
#: mod/ostatus_subscribe.php:102 mod/repair_ostatus.php:51
|
#: mod/ostatus_subscribe.php:103 mod/repair_ostatus.php:51
|
||||||
msgid "Done"
|
msgid "Done"
|
||||||
msgstr "تم"
|
msgstr "تم"
|
||||||
|
|
||||||
#: mod/ostatus_subscribe.php:116
|
#: mod/ostatus_subscribe.php:117
|
||||||
msgid "success"
|
msgid "success"
|
||||||
msgstr "نجح"
|
msgstr "نجح"
|
||||||
|
|
||||||
#: mod/ostatus_subscribe.php:118
|
#: mod/ostatus_subscribe.php:119
|
||||||
msgid "failed"
|
msgid "failed"
|
||||||
msgstr "فشل"
|
msgstr "فشل"
|
||||||
|
|
||||||
#: mod/ostatus_subscribe.php:121
|
#: mod/ostatus_subscribe.php:122
|
||||||
msgid "ignored"
|
msgid "ignored"
|
||||||
msgstr "متجاهل"
|
msgstr "متجاهل"
|
||||||
|
|
||||||
#: mod/ostatus_subscribe.php:126 mod/repair_ostatus.php:57
|
#: mod/ostatus_subscribe.php:127 mod/repair_ostatus.php:57
|
||||||
msgid "Keep this window open until done."
|
msgid "Keep this window open until done."
|
||||||
msgstr "أبق هذه النافذة مفتوحة حتى ينتهي."
|
msgstr "أبق هذه النافذة مفتوحة حتى ينتهي."
|
||||||
|
|
||||||
|
|
@ -868,11 +871,11 @@ msgstr "أبق هذه النافذة مفتوحة حتى ينتهي."
|
||||||
msgid "Photo Albums"
|
msgid "Photo Albums"
|
||||||
msgstr "ألبومات الصور"
|
msgstr "ألبومات الصور"
|
||||||
|
|
||||||
#: mod/photos.php:109 mod/photos.php:1590
|
#: mod/photos.php:109 mod/photos.php:1584
|
||||||
msgid "Recent Photos"
|
msgid "Recent Photos"
|
||||||
msgstr "الصور الأخيرة"
|
msgstr "الصور الأخيرة"
|
||||||
|
|
||||||
#: mod/photos.php:111 mod/photos.php:1079 mod/photos.php:1592
|
#: mod/photos.php:111 mod/photos.php:1073 mod/photos.php:1586
|
||||||
msgid "Upload New Photos"
|
msgid "Upload New Photos"
|
||||||
msgstr "ارفع صور جديدة"
|
msgstr "ارفع صور جديدة"
|
||||||
|
|
||||||
|
|
@ -900,242 +903,229 @@ msgstr "ألبوم فارغ."
|
||||||
msgid "Failed to delete the photo."
|
msgid "Failed to delete the photo."
|
||||||
msgstr "فشل حذف الصفحة."
|
msgstr "فشل حذف الصفحة."
|
||||||
|
|
||||||
#: mod/photos.php:559
|
#: mod/photos.php:553
|
||||||
msgid "a photo"
|
msgid "a photo"
|
||||||
msgstr "صورة"
|
msgstr "صورة"
|
||||||
|
|
||||||
#: mod/photos.php:559
|
#: mod/photos.php:553
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s was tagged in %2$s by %3$s"
|
msgid "%1$s was tagged in %2$s by %3$s"
|
||||||
msgstr "ذكر %3$s %1$s في %2$s"
|
msgstr "ذكر %3$s %1$s في %2$s"
|
||||||
|
|
||||||
#: mod/photos.php:642 mod/photos.php:645 mod/photos.php:672
|
#: mod/photos.php:636 mod/photos.php:639 mod/photos.php:666
|
||||||
#: mod/wall_upload.php:204 src/Module/Settings/Profile/Photo/Index.php:60
|
#: mod/wall_upload.php:201 src/Module/Settings/Profile/Photo/Index.php:60
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Image exceeds size limit of %s"
|
msgid "Image exceeds size limit of %s"
|
||||||
msgstr "تجاوزت الصورة الحد الأقصى للحجم وهو %s"
|
msgstr "تجاوزت الصورة الحد الأقصى للحجم وهو %s"
|
||||||
|
|
||||||
#: mod/photos.php:648
|
#: mod/photos.php:642
|
||||||
msgid "Image upload didn't complete, please try again"
|
msgid "Image upload didn't complete, please try again"
|
||||||
msgstr "لم يكتمل رفع الصورة، من فضلك أعد المحاولة"
|
msgstr "لم يكتمل رفع الصورة، من فضلك أعد المحاولة"
|
||||||
|
|
||||||
#: mod/photos.php:651
|
#: mod/photos.php:645
|
||||||
msgid "Image file is missing"
|
msgid "Image file is missing"
|
||||||
msgstr "ملف الصورة مفقود"
|
msgstr "ملف الصورة مفقود"
|
||||||
|
|
||||||
#: mod/photos.php:656
|
#: mod/photos.php:650
|
||||||
msgid ""
|
msgid ""
|
||||||
"Server can't accept new file upload at this time, please contact your "
|
"Server can't accept new file upload at this time, please contact your "
|
||||||
"administrator"
|
"administrator"
|
||||||
msgstr "الخادم لا يقبل رفع ملفات جديدة، يرجى التواصل مع مدير الموقع"
|
msgstr "الخادم لا يقبل رفع ملفات جديدة، يرجى التواصل مع مدير الموقع"
|
||||||
|
|
||||||
#: mod/photos.php:680
|
#: mod/photos.php:674
|
||||||
msgid "Image file is empty."
|
msgid "Image file is empty."
|
||||||
msgstr "ملف الصورة فارغ."
|
msgstr "ملف الصورة فارغ."
|
||||||
|
|
||||||
#: mod/photos.php:695 mod/wall_upload.php:166
|
#: mod/photos.php:689 mod/wall_upload.php:163
|
||||||
#: src/Module/Settings/Profile/Photo/Index.php:69
|
#: src/Module/Settings/Profile/Photo/Index.php:69
|
||||||
msgid "Unable to process image."
|
msgid "Unable to process image."
|
||||||
msgstr "تعذرت معالجة الصورة."
|
msgstr "تعذرت معالجة الصورة."
|
||||||
|
|
||||||
#: mod/photos.php:721 mod/wall_upload.php:229
|
#: mod/photos.php:715 mod/wall_upload.php:226
|
||||||
#: src/Module/Settings/Profile/Photo/Index.php:96
|
#: src/Module/Settings/Profile/Photo/Index.php:96
|
||||||
msgid "Image upload failed."
|
msgid "Image upload failed."
|
||||||
msgstr "فشل رفع الصورة."
|
msgstr "فشل رفع الصورة."
|
||||||
|
|
||||||
#: mod/photos.php:813
|
#: mod/photos.php:807
|
||||||
msgid "No photos selected"
|
msgid "No photos selected"
|
||||||
msgstr "لم تختر صورًا"
|
msgstr "لم تختر صورًا"
|
||||||
|
|
||||||
#: mod/photos.php:882
|
#: mod/photos.php:876
|
||||||
msgid "Access to this item is restricted."
|
msgid "Access to this item is restricted."
|
||||||
msgstr "الوصول إلى هذا العنصر مقيد."
|
msgstr "الوصول إلى هذا العنصر مقيد."
|
||||||
|
|
||||||
#: mod/photos.php:937
|
#: mod/photos.php:931
|
||||||
msgid "Upload Photos"
|
msgid "Upload Photos"
|
||||||
msgstr "ارفع صورًا"
|
msgstr "ارفع صورًا"
|
||||||
|
|
||||||
#: mod/photos.php:941 mod/photos.php:1027
|
#: mod/photos.php:935 mod/photos.php:1021
|
||||||
msgid "New album name: "
|
msgid "New album name: "
|
||||||
msgstr "اسم الألبوم الجديد: "
|
msgstr "اسم الألبوم الجديد: "
|
||||||
|
|
||||||
#: mod/photos.php:942
|
#: mod/photos.php:936
|
||||||
msgid "or select existing album:"
|
msgid "or select existing album:"
|
||||||
msgstr "أو اختر ألبومًا موجودًا:"
|
msgstr "أو اختر ألبومًا موجودًا:"
|
||||||
|
|
||||||
#: mod/photos.php:943
|
#: mod/photos.php:937
|
||||||
msgid "Do not show a status post for this upload"
|
msgid "Do not show a status post for this upload"
|
||||||
msgstr "لا تظهر مشاركة حالة لهذا الملف المرفوع"
|
msgstr "لا تظهر مشاركة حالة لهذا الملف المرفوع"
|
||||||
|
|
||||||
#: mod/photos.php:1008
|
#: mod/photos.php:1002
|
||||||
msgid "Do you really want to delete this photo album and all its photos?"
|
msgid "Do you really want to delete this photo album and all its photos?"
|
||||||
msgstr "أتريد حذف هذا الألبوم وكافة محتوياته؟"
|
msgstr "أتريد حذف هذا الألبوم وكافة محتوياته؟"
|
||||||
|
|
||||||
#: mod/photos.php:1009 mod/photos.php:1032
|
#: mod/photos.php:1003 mod/photos.php:1026
|
||||||
msgid "Delete Album"
|
msgid "Delete Album"
|
||||||
msgstr "احذف الألبوم"
|
msgstr "احذف الألبوم"
|
||||||
|
|
||||||
#: mod/photos.php:1036
|
#: mod/photos.php:1030
|
||||||
msgid "Edit Album"
|
msgid "Edit Album"
|
||||||
msgstr "عدّل الألبوم"
|
msgstr "عدّل الألبوم"
|
||||||
|
|
||||||
#: mod/photos.php:1037
|
#: mod/photos.php:1031
|
||||||
msgid "Drop Album"
|
msgid "Drop Album"
|
||||||
msgstr "احذف الألبوم"
|
msgstr "احذف الألبوم"
|
||||||
|
|
||||||
#: mod/photos.php:1041
|
#: mod/photos.php:1035
|
||||||
msgid "Show Newest First"
|
msgid "Show Newest First"
|
||||||
msgstr "اعرض الأحدث أولًا"
|
msgstr "اعرض الأحدث أولًا"
|
||||||
|
|
||||||
#: mod/photos.php:1043
|
#: mod/photos.php:1037
|
||||||
msgid "Show Oldest First"
|
msgid "Show Oldest First"
|
||||||
msgstr "اعرض الأقدم أولًا"
|
msgstr "اعرض الأقدم أولًا"
|
||||||
|
|
||||||
#: mod/photos.php:1064 mod/photos.php:1575
|
#: mod/photos.php:1058 mod/photos.php:1569
|
||||||
msgid "View Photo"
|
msgid "View Photo"
|
||||||
msgstr "اعرض الصور"
|
msgstr "اعرض الصور"
|
||||||
|
|
||||||
#: mod/photos.php:1097
|
#: mod/photos.php:1091
|
||||||
msgid "Permission denied. Access to this item may be restricted."
|
msgid "Permission denied. Access to this item may be restricted."
|
||||||
msgstr "رُفض الإذن. قد يكون الوصول إلى هذا العنصر مقيدا."
|
msgstr "رُفض الإذن. قد يكون الوصول إلى هذا العنصر مقيدا."
|
||||||
|
|
||||||
#: mod/photos.php:1099
|
#: mod/photos.php:1093
|
||||||
msgid "Photo not available"
|
msgid "Photo not available"
|
||||||
msgstr "الصورة غير متوفرة"
|
msgstr "الصورة غير متوفرة"
|
||||||
|
|
||||||
#: mod/photos.php:1109
|
#: mod/photos.php:1103
|
||||||
msgid "Do you really want to delete this photo?"
|
msgid "Do you really want to delete this photo?"
|
||||||
msgstr "أتريد حذف هذه الصورة؟"
|
msgstr "أتريد حذف هذه الصورة؟"
|
||||||
|
|
||||||
#: mod/photos.php:1110 mod/photos.php:1302
|
#: mod/photos.php:1104 mod/photos.php:1296
|
||||||
msgid "Delete Photo"
|
msgid "Delete Photo"
|
||||||
msgstr "احذف الصورة"
|
msgstr "احذف الصورة"
|
||||||
|
|
||||||
#: mod/photos.php:1200
|
#: mod/photos.php:1196
|
||||||
msgid "View photo"
|
msgid "View photo"
|
||||||
msgstr "اعرض الصورة"
|
msgstr "اعرض الصورة"
|
||||||
|
|
||||||
#: mod/photos.php:1202
|
#: mod/photos.php:1198
|
||||||
msgid "Edit photo"
|
msgid "Edit photo"
|
||||||
msgstr "عدّل الصورة"
|
msgstr "عدّل الصورة"
|
||||||
|
|
||||||
#: mod/photos.php:1203
|
#: mod/photos.php:1199
|
||||||
msgid "Delete photo"
|
msgid "Delete photo"
|
||||||
msgstr "احذف الصورة"
|
msgstr "احذف الصورة"
|
||||||
|
|
||||||
#: mod/photos.php:1204
|
#: mod/photos.php:1200
|
||||||
msgid "Use as profile photo"
|
msgid "Use as profile photo"
|
||||||
msgstr "استخدامها كصورة الملف الشخصي"
|
msgstr "استخدامها كصورة الملف الشخصي"
|
||||||
|
|
||||||
#: mod/photos.php:1211
|
#: mod/photos.php:1207
|
||||||
msgid "Private Photo"
|
msgid "Private Photo"
|
||||||
msgstr "صور خاصة"
|
msgstr "صور خاصة"
|
||||||
|
|
||||||
#: mod/photos.php:1217
|
#: mod/photos.php:1213
|
||||||
msgid "View Full Size"
|
msgid "View Full Size"
|
||||||
msgstr "اعرض بالحجم الكامل"
|
msgstr "اعرض بالحجم الكامل"
|
||||||
|
|
||||||
#: mod/photos.php:1270
|
#: mod/photos.php:1264
|
||||||
msgid "Tags: "
|
msgid "Tags: "
|
||||||
msgstr "الوسوم: "
|
msgstr "الوسوم: "
|
||||||
|
|
||||||
#: mod/photos.php:1273
|
#: mod/photos.php:1267
|
||||||
msgid "[Select tags to remove]"
|
msgid "[Select tags to remove]"
|
||||||
msgstr "[اختر وسومًا لإزالتها]"
|
msgstr "[اختر وسومًا لإزالتها]"
|
||||||
|
|
||||||
#: mod/photos.php:1288
|
#: mod/photos.php:1282
|
||||||
msgid "New album name"
|
msgid "New album name"
|
||||||
msgstr "اسم الألبوم الجديد"
|
msgstr "اسم الألبوم الجديد"
|
||||||
|
|
||||||
#: mod/photos.php:1289
|
#: mod/photos.php:1283
|
||||||
msgid "Caption"
|
msgid "Caption"
|
||||||
msgstr "وصف الصورة"
|
msgstr "وصف الصورة"
|
||||||
|
|
||||||
#: mod/photos.php:1290
|
#: mod/photos.php:1284
|
||||||
msgid "Add a Tag"
|
msgid "Add a Tag"
|
||||||
msgstr "أضف وسمًا"
|
msgstr "أضف وسمًا"
|
||||||
|
|
||||||
#: mod/photos.php:1290
|
#: mod/photos.php:1284
|
||||||
msgid ""
|
msgid ""
|
||||||
"Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping"
|
"Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping"
|
||||||
msgstr "مثال: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping"
|
msgstr "مثال: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping"
|
||||||
|
|
||||||
#: mod/photos.php:1291
|
#: mod/photos.php:1285
|
||||||
msgid "Do not rotate"
|
msgid "Do not rotate"
|
||||||
msgstr "لا تُدر"
|
msgstr "لا تُدر"
|
||||||
|
|
||||||
#: mod/photos.php:1292
|
#: mod/photos.php:1286
|
||||||
msgid "Rotate CW (right)"
|
msgid "Rotate CW (right)"
|
||||||
msgstr "أدر باتجاه عقارب الساعة"
|
msgstr "أدر باتجاه عقارب الساعة"
|
||||||
|
|
||||||
#: mod/photos.php:1293
|
#: mod/photos.php:1287
|
||||||
msgid "Rotate CCW (left)"
|
msgid "Rotate CCW (left)"
|
||||||
msgstr "أدر عكس اتجاه عقارب الساعة"
|
msgstr "أدر عكس اتجاه عقارب الساعة"
|
||||||
|
|
||||||
#: mod/photos.php:1339 mod/photos.php:1395 mod/photos.php:1469
|
#: mod/photos.php:1333 mod/photos.php:1389 mod/photos.php:1463
|
||||||
#: src/Module/Contact.php:544 src/Module/Item/Compose.php:148
|
#: src/Module/Contact.php:544 src/Module/Item/Compose.php:160
|
||||||
#: src/Object/Post.php:978
|
#: src/Object/Post.php:985
|
||||||
msgid "This is you"
|
msgid "This is you"
|
||||||
msgstr "هذا أنت"
|
msgstr "هذا أنت"
|
||||||
|
|
||||||
#: mod/photos.php:1341 mod/photos.php:1397 mod/photos.php:1471
|
#: mod/photos.php:1335 mod/photos.php:1391 mod/photos.php:1465
|
||||||
#: src/Object/Post.php:514 src/Object/Post.php:980
|
#: src/Object/Post.php:522 src/Object/Post.php:987
|
||||||
msgid "Comment"
|
msgid "Comment"
|
||||||
msgstr "علِّق"
|
msgstr "علِّق"
|
||||||
|
|
||||||
#: mod/photos.php:1430 src/Content/Conversation.php:615
|
#: mod/photos.php:1424 src/Content/Conversation.php:628
|
||||||
#: src/Object/Post.php:247
|
#: src/Object/Post.php:247
|
||||||
msgid "Select"
|
msgid "Select"
|
||||||
msgstr "اختر"
|
msgstr "اختر"
|
||||||
|
|
||||||
#: mod/photos.php:1431 mod/settings.php:611 src/Content/Conversation.php:616
|
#: mod/photos.php:1425 mod/settings.php:350 src/Content/Conversation.php:629
|
||||||
#: src/Module/Admin/Users/Active.php:139
|
#: src/Module/Admin/Users/Active.php:139
|
||||||
#: src/Module/Admin/Users/Blocked.php:140 src/Module/Admin/Users/Index.php:153
|
#: src/Module/Admin/Users/Blocked.php:140 src/Module/Admin/Users/Index.php:153
|
||||||
msgid "Delete"
|
msgid "Delete"
|
||||||
msgstr "احذف"
|
msgstr "احذف"
|
||||||
|
|
||||||
#: mod/photos.php:1492 src/Object/Post.php:369
|
#: mod/photos.php:1486 src/Object/Post.php:369
|
||||||
msgid "Like"
|
msgid "Like"
|
||||||
msgstr "أعجبني"
|
msgstr "أعجبني"
|
||||||
|
|
||||||
#: mod/photos.php:1493 src/Object/Post.php:369
|
#: mod/photos.php:1487 src/Object/Post.php:369
|
||||||
msgid "I like this (toggle)"
|
msgid "I like this (toggle)"
|
||||||
msgstr "أعجبني (بدِّل)"
|
msgstr "أعجبني (بدِّل)"
|
||||||
|
|
||||||
#: mod/photos.php:1494 src/Object/Post.php:370
|
#: mod/photos.php:1488 src/Object/Post.php:370
|
||||||
msgid "Dislike"
|
msgid "Dislike"
|
||||||
msgstr "لم يعجبني"
|
msgstr "لم يعجبني"
|
||||||
|
|
||||||
#: mod/photos.php:1496 src/Object/Post.php:370
|
#: mod/photos.php:1490 src/Object/Post.php:370
|
||||||
msgid "I don't like this (toggle)"
|
msgid "I don't like this (toggle)"
|
||||||
msgstr "لم يعجبني (بدِّل)"
|
msgstr "لم يعجبني (بدِّل)"
|
||||||
|
|
||||||
#: mod/photos.php:1518
|
#: mod/photos.php:1512
|
||||||
msgid "Map"
|
msgid "Map"
|
||||||
msgstr "خريطة"
|
msgstr "خريطة"
|
||||||
|
|
||||||
#: mod/photos.php:1581
|
#: mod/photos.php:1575
|
||||||
msgid "View Album"
|
msgid "View Album"
|
||||||
msgstr "اعرض الألبوم"
|
msgstr "اعرض الألبوم"
|
||||||
|
|
||||||
#: mod/ping.php:275
|
#: mod/redir.php:51 mod/redir.php:104
|
||||||
msgid "{0} wants to be your friend"
|
|
||||||
msgstr "{0} يريد أن يكون صديقك"
|
|
||||||
|
|
||||||
#: mod/ping.php:292
|
|
||||||
msgid "{0} requested registration"
|
|
||||||
msgstr "{0} طلبَ التسجيل"
|
|
||||||
|
|
||||||
#: mod/ping.php:305
|
|
||||||
#, php-format
|
|
||||||
msgid "{0} and %d others requested registration"
|
|
||||||
msgstr "{0} و %d أخرون يطلبون التسجيل"
|
|
||||||
|
|
||||||
#: mod/redir.php:49 mod/redir.php:102
|
|
||||||
msgid "Bad Request."
|
msgid "Bad Request."
|
||||||
msgstr "طلب خاطئ."
|
msgstr "طلب خاطئ."
|
||||||
|
|
||||||
#: mod/redir.php:55 mod/redir.php:129 src/Module/Contact/Advanced.php:70
|
#: mod/redir.php:57 mod/redir.php:131 src/Module/Contact/Advanced.php:70
|
||||||
#: src/Module/Contact/Advanced.php:109 src/Module/Contact/Contacts.php:55
|
#: src/Module/Contact/Advanced.php:109 src/Module/Contact/Contacts.php:55
|
||||||
#: src/Module/Contact/Conversations.php:78
|
#: src/Module/Contact/Conversations.php:78
|
||||||
#: src/Module/Contact/Conversations.php:83
|
#: src/Module/Contact/Conversations.php:83
|
||||||
|
|
@ -1148,36 +1138,36 @@ msgstr "طلب خاطئ."
|
||||||
msgid "Contact not found."
|
msgid "Contact not found."
|
||||||
msgstr "لم يُعثر على المتراسل."
|
msgstr "لم يُعثر على المتراسل."
|
||||||
|
|
||||||
#: mod/removeme.php:63 src/Navigation/Notifications/Repository/Notify.php:473
|
#: mod/removeme.php:65 src/Navigation/Notifications/Repository/Notify.php:482
|
||||||
msgid "[Friendica System Notify]"
|
msgid "[Friendica System Notify]"
|
||||||
msgstr "[تنبيه نظام فرنديكا]"
|
msgstr "[تنبيه نظام فرنديكا]"
|
||||||
|
|
||||||
#: mod/removeme.php:63
|
#: mod/removeme.php:65
|
||||||
msgid "User deleted their account"
|
msgid "User deleted their account"
|
||||||
msgstr "حذف المستخدم حسابه"
|
msgstr "حذف المستخدم حسابه"
|
||||||
|
|
||||||
#: mod/removeme.php:64
|
#: mod/removeme.php:66
|
||||||
msgid ""
|
msgid ""
|
||||||
"On your Friendica node an user deleted their account. Please ensure that "
|
"On your Friendica node an user deleted their account. Please ensure that "
|
||||||
"their data is removed from the backups."
|
"their data is removed from the backups."
|
||||||
msgstr "حذف مستخدم حسابه على عقدة فرَندِكا خاصتك. من فضلك تأكد أن بياناتهم أُزيلت من النسخ الاحتياطية."
|
msgstr "حذف مستخدم حسابه على عقدة فرَندِكا خاصتك. من فضلك تأكد أن بياناتهم أُزيلت من النسخ الاحتياطية."
|
||||||
|
|
||||||
#: mod/removeme.php:65
|
#: mod/removeme.php:67
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "The user id is %d"
|
msgid "The user id is %d"
|
||||||
msgstr "معرف المستخدم هو %d"
|
msgstr "معرف المستخدم هو %d"
|
||||||
|
|
||||||
#: mod/removeme.php:99 mod/removeme.php:102
|
#: mod/removeme.php:101 mod/removeme.php:104
|
||||||
msgid "Remove My Account"
|
msgid "Remove My Account"
|
||||||
msgstr "أزل حسابي"
|
msgstr "أزل حسابي"
|
||||||
|
|
||||||
#: mod/removeme.php:100
|
#: mod/removeme.php:102
|
||||||
msgid ""
|
msgid ""
|
||||||
"This will completely remove your account. Once this has been done it is not "
|
"This will completely remove your account. Once this has been done it is not "
|
||||||
"recoverable."
|
"recoverable."
|
||||||
msgstr "سيزال حسابك نهائيًا. لا مجال لتراجع عند انتهائه."
|
msgstr "سيزال حسابك نهائيًا. لا مجال لتراجع عند انتهائه."
|
||||||
|
|
||||||
#: mod/removeme.php:101
|
#: mod/removeme.php:103
|
||||||
msgid "Please enter your password for verification:"
|
msgid "Please enter your password for verification:"
|
||||||
msgstr "يرجى إدخال كلمة المرور للتأكيد:"
|
msgstr "يرجى إدخال كلمة المرور للتأكيد:"
|
||||||
|
|
||||||
|
|
@ -1185,7 +1175,7 @@ msgstr "يرجى إدخال كلمة المرور للتأكيد:"
|
||||||
msgid "Resubscribing to OStatus contacts"
|
msgid "Resubscribing to OStatus contacts"
|
||||||
msgstr "يعيد الاشتراك في متراسلي OStatus"
|
msgstr "يعيد الاشتراك في متراسلي OStatus"
|
||||||
|
|
||||||
#: mod/repair_ostatus.php:46 src/Module/Debug/ActivityPubConversion.php:130
|
#: mod/repair_ostatus.php:46 src/Module/Debug/ActivityPubConversion.php:134
|
||||||
#: src/Module/Debug/Babel.php:293 src/Module/Security/TwoFactor/Verify.php:97
|
#: src/Module/Debug/Babel.php:293 src/Module/Security/TwoFactor/Verify.php:97
|
||||||
msgid "Error"
|
msgid "Error"
|
||||||
msgid_plural "Errors"
|
msgid_plural "Errors"
|
||||||
|
|
@ -1196,67 +1186,15 @@ msgstr[3] "أخطاء"
|
||||||
msgstr[4] "خطأً"
|
msgstr[4] "خطأً"
|
||||||
msgstr[5] "خطأٍ"
|
msgstr[5] "خطأٍ"
|
||||||
|
|
||||||
#: mod/settings.php:129
|
#: mod/settings.php:122
|
||||||
msgid "Failed to connect with email account using the settings provided."
|
msgid "Failed to connect with email account using the settings provided."
|
||||||
msgstr "فشل الاتصال بحساب البريد الإلكتروني باستخدام الإعدادات المقدمة."
|
msgstr "فشل الاتصال بحساب البريد الإلكتروني باستخدام الإعدادات المقدمة."
|
||||||
|
|
||||||
#: mod/settings.php:159
|
#: mod/settings.php:175
|
||||||
msgid "Contact CSV file upload error"
|
|
||||||
msgstr "خطأ أثناء رفع ملف CSV"
|
|
||||||
|
|
||||||
#: mod/settings.php:178
|
|
||||||
msgid "Importing Contacts done"
|
|
||||||
msgstr "أُستورد المتراسلون"
|
|
||||||
|
|
||||||
#: mod/settings.php:191
|
|
||||||
msgid "Relocate message has been send to your contacts"
|
|
||||||
msgstr "أُرسلت رسالة تنبيه بانتقالك إلى متراسليك"
|
|
||||||
|
|
||||||
#: mod/settings.php:203
|
|
||||||
msgid "Passwords do not match."
|
|
||||||
msgstr "كلمتا المرور غير متطابقتين."
|
|
||||||
|
|
||||||
#: mod/settings.php:211 src/Console/User.php:210
|
|
||||||
msgid "Password update failed. Please try again."
|
|
||||||
msgstr "فشل تحديث كلمة المرور. من فضلك أعد المحاولة."
|
|
||||||
|
|
||||||
#: mod/settings.php:214 src/Console/User.php:213
|
|
||||||
msgid "Password changed."
|
|
||||||
msgstr "غُيّرت كلمة المرور."
|
|
||||||
|
|
||||||
#: mod/settings.php:217
|
|
||||||
msgid "Password unchanged."
|
|
||||||
msgstr "لم تُغير كلمة المرور."
|
|
||||||
|
|
||||||
#: mod/settings.php:304
|
|
||||||
msgid "Please use a shorter name."
|
|
||||||
msgstr "يرجى استخدام اسم أقصر."
|
|
||||||
|
|
||||||
#: mod/settings.php:307
|
|
||||||
msgid "Name too short."
|
|
||||||
msgstr "الاسم قصير جداً."
|
|
||||||
|
|
||||||
#: mod/settings.php:316
|
|
||||||
msgid "Wrong Password."
|
|
||||||
msgstr "كلمة المرور خاطئة."
|
|
||||||
|
|
||||||
#: mod/settings.php:321
|
|
||||||
msgid "Invalid email."
|
|
||||||
msgstr "البريد الإلكتروني غير صالح."
|
|
||||||
|
|
||||||
#: mod/settings.php:327
|
|
||||||
msgid "Cannot change to that email."
|
|
||||||
msgstr "لا يمكن التغيير إلى هذا البريد الإلكتروني."
|
|
||||||
|
|
||||||
#: mod/settings.php:395
|
|
||||||
msgid "Settings were not updated."
|
|
||||||
msgstr "لم تُحدث الإعدادات."
|
|
||||||
|
|
||||||
#: mod/settings.php:436
|
|
||||||
msgid "Connected Apps"
|
msgid "Connected Apps"
|
||||||
msgstr "التطبيقات المتصلة"
|
msgstr "التطبيقات المتصلة"
|
||||||
|
|
||||||
#: mod/settings.php:437 src/Module/Admin/Blocklist/Contact.php:106
|
#: mod/settings.php:176 src/Module/Admin/Blocklist/Contact.php:106
|
||||||
#: src/Module/Admin/Users/Active.php:129
|
#: src/Module/Admin/Users/Active.php:129
|
||||||
#: src/Module/Admin/Users/Blocked.php:130 src/Module/Admin/Users/Create.php:71
|
#: src/Module/Admin/Users/Blocked.php:130 src/Module/Admin/Users/Create.php:71
|
||||||
#: src/Module/Admin/Users/Deleted.php:88 src/Module/Admin/Users/Index.php:142
|
#: src/Module/Admin/Users/Deleted.php:88 src/Module/Admin/Users/Index.php:142
|
||||||
|
|
@ -1265,104 +1203,104 @@ msgstr "التطبيقات المتصلة"
|
||||||
msgid "Name"
|
msgid "Name"
|
||||||
msgstr "الاسم"
|
msgstr "الاسم"
|
||||||
|
|
||||||
#: mod/settings.php:438 src/Content/Nav.php:212
|
#: mod/settings.php:177 src/Content/Nav.php:212
|
||||||
msgid "Home Page"
|
msgid "Home Page"
|
||||||
msgstr "الصفحة الرئيسية"
|
msgstr "الصفحة الرئيسية"
|
||||||
|
|
||||||
#: mod/settings.php:439 src/Module/Admin/Queue.php:78
|
#: mod/settings.php:178 src/Module/Admin/Queue.php:78
|
||||||
msgid "Created"
|
msgid "Created"
|
||||||
msgstr "أُنشئ"
|
msgstr "أُنشئ"
|
||||||
|
|
||||||
#: mod/settings.php:440
|
#: mod/settings.php:179
|
||||||
msgid "Remove authorization"
|
msgid "Remove authorization"
|
||||||
msgstr "أزل التخويل"
|
msgstr "أزل التخويل"
|
||||||
|
|
||||||
#: mod/settings.php:466 mod/settings.php:498 mod/settings.php:529
|
#: mod/settings.php:205 mod/settings.php:237 mod/settings.php:268
|
||||||
#: mod/settings.php:613 mod/settings.php:750
|
#: mod/settings.php:352 src/Module/Admin/Addons/Index.php:69
|
||||||
#: src/Module/Admin/Addons/Index.php:69 src/Module/Admin/Features.php:87
|
#: src/Module/Admin/Features.php:87 src/Module/Admin/Logs/Settings.php:81
|
||||||
#: src/Module/Admin/Logs/Settings.php:81 src/Module/Admin/Site.php:501
|
#: src/Module/Admin/Site.php:434 src/Module/Admin/Themes/Index.php:113
|
||||||
#: src/Module/Admin/Themes/Index.php:113 src/Module/Admin/Tos.php:83
|
#: src/Module/Admin/Tos.php:83 src/Module/Settings/Account.php:559
|
||||||
#: src/Module/Settings/Delegation.php:170 src/Module/Settings/Display.php:193
|
#: src/Module/Settings/Delegation.php:170 src/Module/Settings/Display.php:193
|
||||||
msgid "Save Settings"
|
msgid "Save Settings"
|
||||||
msgstr "احفظ الإعدادات"
|
msgstr "احفظ الإعدادات"
|
||||||
|
|
||||||
#: mod/settings.php:474
|
#: mod/settings.php:213
|
||||||
msgid "Addon Settings"
|
msgid "Addon Settings"
|
||||||
msgstr "إعدادات الإضافة"
|
msgstr "إعدادات الإضافة"
|
||||||
|
|
||||||
#: mod/settings.php:475
|
#: mod/settings.php:214
|
||||||
msgid "No Addon settings configured"
|
msgid "No Addon settings configured"
|
||||||
msgstr "لم تضبط إعدادات الإضافة"
|
msgstr "لم تضبط إعدادات الإضافة"
|
||||||
|
|
||||||
#: mod/settings.php:496
|
#: mod/settings.php:235
|
||||||
msgid "Additional Features"
|
msgid "Additional Features"
|
||||||
msgstr "ميزات إضافية"
|
msgstr "ميزات إضافية"
|
||||||
|
|
||||||
#: mod/settings.php:534
|
#: mod/settings.php:273
|
||||||
msgid "Diaspora (Socialhome, Hubzilla)"
|
msgid "Diaspora (Socialhome, Hubzilla)"
|
||||||
msgstr "دياسبورا (سوشل-هوم، هوب-زيلا)"
|
msgstr "دياسبورا (سوشل-هوم، هوب-زيلا)"
|
||||||
|
|
||||||
#: mod/settings.php:534 mod/settings.php:535
|
#: mod/settings.php:273 mod/settings.php:274
|
||||||
msgid "enabled"
|
msgid "enabled"
|
||||||
msgstr "مفعل"
|
msgstr "مفعل"
|
||||||
|
|
||||||
#: mod/settings.php:534 mod/settings.php:535
|
#: mod/settings.php:273 mod/settings.php:274
|
||||||
msgid "disabled"
|
msgid "disabled"
|
||||||
msgstr "معطل"
|
msgstr "معطل"
|
||||||
|
|
||||||
#: mod/settings.php:534 mod/settings.php:535
|
#: mod/settings.php:273 mod/settings.php:274
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Built-in support for %s connectivity is %s"
|
msgid "Built-in support for %s connectivity is %s"
|
||||||
msgstr "دعم مدمج لـ %s باتصال %s"
|
msgstr "دعم مدمج لـ %s باتصال %s"
|
||||||
|
|
||||||
#: mod/settings.php:535
|
#: mod/settings.php:274
|
||||||
msgid "OStatus (GNU Social)"
|
msgid "OStatus (GNU Social)"
|
||||||
msgstr "OStatus (غنو سوشل)"
|
msgstr "OStatus (غنو سوشل)"
|
||||||
|
|
||||||
#: mod/settings.php:561
|
#: mod/settings.php:300
|
||||||
msgid "Email access is disabled on this site."
|
msgid "Email access is disabled on this site."
|
||||||
msgstr "الوصول إلى البريد الإلكتروني معطل في هذا الموقع."
|
msgstr "الوصول إلى البريد الإلكتروني معطل في هذا الموقع."
|
||||||
|
|
||||||
#: mod/settings.php:566 mod/settings.php:611
|
#: mod/settings.php:305 mod/settings.php:350
|
||||||
msgid "None"
|
msgid "None"
|
||||||
msgstr "لا شيء"
|
msgstr "لا شيء"
|
||||||
|
|
||||||
#: mod/settings.php:572 src/Module/BaseSettings.php:78
|
#: mod/settings.php:311 src/Module/BaseSettings.php:78
|
||||||
msgid "Social Networks"
|
msgid "Social Networks"
|
||||||
msgstr "الشبكات الاجتماعية"
|
msgstr "الشبكات الاجتماعية"
|
||||||
|
|
||||||
#: mod/settings.php:577
|
#: mod/settings.php:316
|
||||||
msgid "General Social Media Settings"
|
msgid "General Social Media Settings"
|
||||||
msgstr "الإعدادات العامة لشبكات التواصل الاجتماعي"
|
msgstr "الإعدادات العامة لشبكات التواصل الاجتماعي"
|
||||||
|
|
||||||
#: mod/settings.php:580
|
#: mod/settings.php:319
|
||||||
msgid "Followed content scope"
|
msgid "Followed content scope"
|
||||||
msgstr "حيز المحتوى المتابَع"
|
msgstr "حيز المحتوى المتابَع"
|
||||||
|
|
||||||
#: mod/settings.php:582
|
#: mod/settings.php:321
|
||||||
msgid ""
|
msgid ""
|
||||||
"By default, conversations in which your follows participated but didn't "
|
"By default, conversations in which your follows participated but didn't "
|
||||||
"start will be shown in your timeline. You can turn this behavior off, or "
|
"start will be shown in your timeline. You can turn this behavior off, or "
|
||||||
"expand it to the conversations in which your follows liked a post."
|
"expand it to the conversations in which your follows liked a post."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: mod/settings.php:584
|
#: mod/settings.php:323
|
||||||
msgid "Only conversations my follows started"
|
msgid "Only conversations my follows started"
|
||||||
msgstr "المحادثات التي بدأها متابَعي فقط"
|
msgstr "المحادثات التي بدأها متابَعي فقط"
|
||||||
|
|
||||||
#: mod/settings.php:585
|
#: mod/settings.php:324
|
||||||
msgid "Conversations my follows started or commented on (default)"
|
msgid "Conversations my follows started or commented on (default)"
|
||||||
msgstr "المحادثات التي بدأها متابَعي أو علقوا عليها (الافتراضي)"
|
msgstr "المحادثات التي بدأها متابَعي أو علقوا عليها (الافتراضي)"
|
||||||
|
|
||||||
#: mod/settings.php:586
|
#: mod/settings.php:325
|
||||||
msgid "Any conversation my follows interacted with, including likes"
|
msgid "Any conversation my follows interacted with, including likes"
|
||||||
msgstr "أي محادثة تفاعل معها متابَعي"
|
msgstr "أي محادثة تفاعل معها متابَعي"
|
||||||
|
|
||||||
#: mod/settings.php:589
|
#: mod/settings.php:328
|
||||||
msgid "Enable Content Warning"
|
msgid "Enable Content Warning"
|
||||||
msgstr "فعّل التحذير من المحتوى"
|
msgstr "فعّل التحذير من المحتوى"
|
||||||
|
|
||||||
#: mod/settings.php:589
|
#: mod/settings.php:328
|
||||||
msgid ""
|
msgid ""
|
||||||
"Users on networks like Mastodon or Pleroma are able to set a content warning"
|
"Users on networks like Mastodon or Pleroma are able to set a content warning"
|
||||||
" field which collapse their post by default. This enables the automatic "
|
" field which collapse their post by default. This enables the automatic "
|
||||||
|
|
@ -1370,627 +1308,131 @@ msgid ""
|
||||||
" affect any other content filtering you eventually set up."
|
" affect any other content filtering you eventually set up."
|
||||||
msgstr "يمكن لمستخدمي شبكات مثل ماستدون أو بليروما تعيين حقل التحذير من المحتوى الذي يطوي مشاركتهم افتراضيا. هذا يفعل الطي التلقائي بدلًا من تعيين التحذير من المحتوى كعنوان للمشاركة. هذا لا يؤثر على أي ترشيح محتوى قمت بإعداده."
|
msgstr "يمكن لمستخدمي شبكات مثل ماستدون أو بليروما تعيين حقل التحذير من المحتوى الذي يطوي مشاركتهم افتراضيا. هذا يفعل الطي التلقائي بدلًا من تعيين التحذير من المحتوى كعنوان للمشاركة. هذا لا يؤثر على أي ترشيح محتوى قمت بإعداده."
|
||||||
|
|
||||||
#: mod/settings.php:590
|
#: mod/settings.php:329
|
||||||
msgid "Enable intelligent shortening"
|
msgid "Enable intelligent shortening"
|
||||||
msgstr "فعّل الاختصار الذكي"
|
msgstr "فعّل الاختصار الذكي"
|
||||||
|
|
||||||
#: mod/settings.php:590
|
#: mod/settings.php:329
|
||||||
msgid ""
|
msgid ""
|
||||||
"Normally the system tries to find the best link to add to shortened posts. "
|
"Normally the system tries to find the best link to add to shortened posts. "
|
||||||
"If disabled, every shortened post will always point to the original "
|
"If disabled, every shortened post will always point to the original "
|
||||||
"friendica post."
|
"friendica post."
|
||||||
msgstr "يعثر الاختصار الذكي على الرابط الأنسب في المشاركات المختصرة. عند تعطيله سيشير الرابط إلى منشور فرنديكا الأصلي."
|
msgstr "يعثر الاختصار الذكي على الرابط الأنسب في المشاركات المختصرة. عند تعطيله سيشير الرابط إلى منشور فرنديكا الأصلي."
|
||||||
|
|
||||||
#: mod/settings.php:591
|
#: mod/settings.php:330
|
||||||
msgid "Enable simple text shortening"
|
msgid "Enable simple text shortening"
|
||||||
msgstr "فعّل اختصار النصوص"
|
msgstr "فعّل اختصار النصوص"
|
||||||
|
|
||||||
#: mod/settings.php:591
|
#: mod/settings.php:330
|
||||||
msgid ""
|
msgid ""
|
||||||
"Normally the system shortens posts at the next line feed. If this option is "
|
"Normally the system shortens posts at the next line feed. If this option is "
|
||||||
"enabled then the system will shorten the text at the maximum character "
|
"enabled then the system will shorten the text at the maximum character "
|
||||||
"limit."
|
"limit."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: mod/settings.php:592
|
#: mod/settings.php:331
|
||||||
msgid "Attach the link title"
|
msgid "Attach the link title"
|
||||||
msgstr "أرفق عنوان الرابط"
|
msgstr "أرفق عنوان الرابط"
|
||||||
|
|
||||||
#: mod/settings.php:592
|
#: mod/settings.php:331
|
||||||
msgid ""
|
msgid ""
|
||||||
"When activated, the title of the attached link will be added as a title on "
|
"When activated, the title of the attached link will be added as a title on "
|
||||||
"posts to Diaspora. This is mostly helpful with \"remote-self\" contacts that"
|
"posts to Diaspora. This is mostly helpful with \"remote-self\" contacts that"
|
||||||
" share feed content."
|
" share feed content."
|
||||||
msgstr "عند تفعيله سيتم إرفاق عنوان الصفحة بمنشور دياسبورا. هذا مفيد بشكل أساسي مع المتراسلين \"الذاتيين\" الذين يشاركون تغذيات Rss / Atom."
|
msgstr "عند تفعيله سيتم إرفاق عنوان الصفحة بمنشور دياسبورا. هذا مفيد بشكل أساسي مع المتراسلين \"الذاتيين\" الذين يشاركون تغذيات Rss / Atom."
|
||||||
|
|
||||||
#: mod/settings.php:593
|
#: mod/settings.php:332
|
||||||
msgid "Your legacy ActivityPub/GNU Social account"
|
msgid "Your legacy ActivityPub/GNU Social account"
|
||||||
msgstr "حساب GNU Social\\ActivityPub القديم"
|
msgstr "حساب GNU Social\\ActivityPub القديم"
|
||||||
|
|
||||||
#: mod/settings.php:593
|
#: mod/settings.php:332
|
||||||
msgid ""
|
msgid ""
|
||||||
"If you enter your old account name from an ActivityPub based system or your "
|
"If you enter your old account name from an ActivityPub based system or your "
|
||||||
"GNU Social/Statusnet account name here (in the format user@domain.tld), your"
|
"GNU Social/Statusnet account name here (in the format user@domain.tld), your"
|
||||||
" contacts will be added automatically. The field will be emptied when done."
|
" contacts will be added automatically. The field will be emptied when done."
|
||||||
msgstr "إذا قمت بإدخال اسم حساب ActivityPub/GNU Social/Statusnet القديم هنا (بنسق user@domain.tld)، سيضاف المتراسلون في هذا الحساب تلقائيا. سيصفر الحقل عند الانتهاء."
|
msgstr "إذا قمت بإدخال اسم حساب ActivityPub/GNU Social/Statusnet القديم هنا (بنسق user@domain.tld)، سيضاف المتراسلون في هذا الحساب تلقائيا. سيصفر الحقل عند الانتهاء."
|
||||||
|
|
||||||
#: mod/settings.php:596
|
#: mod/settings.php:335
|
||||||
msgid "Repair OStatus subscriptions"
|
msgid "Repair OStatus subscriptions"
|
||||||
msgstr "أصلح اشتراكات OStatus"
|
msgstr "أصلح اشتراكات OStatus"
|
||||||
|
|
||||||
#: mod/settings.php:600
|
#: mod/settings.php:339
|
||||||
msgid "Email/Mailbox Setup"
|
msgid "Email/Mailbox Setup"
|
||||||
msgstr "إعداد بريد الكتروني/صندوق بريد"
|
msgstr "إعداد بريد الكتروني/صندوق بريد"
|
||||||
|
|
||||||
#: mod/settings.php:601
|
#: mod/settings.php:340
|
||||||
msgid ""
|
msgid ""
|
||||||
"If you wish to communicate with email contacts using this service "
|
"If you wish to communicate with email contacts using this service "
|
||||||
"(optional), please specify how to connect to your mailbox."
|
"(optional), please specify how to connect to your mailbox."
|
||||||
msgstr "إذا كنت ترغب في التواصل مع متراسلي البريد الإلكتروني باستخدام هذه الخدمة (اختيارية)، من فضلك حدد كيفية الاتصال بصندوق بريدك."
|
msgstr "إذا كنت ترغب في التواصل مع متراسلي البريد الإلكتروني باستخدام هذه الخدمة (اختيارية)، من فضلك حدد كيفية الاتصال بصندوق بريدك."
|
||||||
|
|
||||||
#: mod/settings.php:602
|
#: mod/settings.php:341
|
||||||
msgid "Last successful email check:"
|
msgid "Last successful email check:"
|
||||||
msgstr "آخر تحقق ناجح للبريد الإلكتروني:"
|
msgstr "آخر تحقق ناجح للبريد الإلكتروني:"
|
||||||
|
|
||||||
#: mod/settings.php:604
|
#: mod/settings.php:343
|
||||||
msgid "IMAP server name:"
|
msgid "IMAP server name:"
|
||||||
msgstr "اسم خادم IMAP:"
|
msgstr "اسم خادم IMAP:"
|
||||||
|
|
||||||
#: mod/settings.php:605
|
#: mod/settings.php:344
|
||||||
msgid "IMAP port:"
|
msgid "IMAP port:"
|
||||||
msgstr "منفذ IMAP:"
|
msgstr "منفذ IMAP:"
|
||||||
|
|
||||||
#: mod/settings.php:606
|
#: mod/settings.php:345
|
||||||
msgid "Security:"
|
msgid "Security:"
|
||||||
msgstr "الحماية:"
|
msgstr "الحماية:"
|
||||||
|
|
||||||
#: mod/settings.php:607
|
#: mod/settings.php:346
|
||||||
msgid "Email login name:"
|
msgid "Email login name:"
|
||||||
msgstr "اسم الولوج للبريد الإلكتروني:"
|
msgstr "اسم الولوج للبريد الإلكتروني:"
|
||||||
|
|
||||||
#: mod/settings.php:608
|
#: mod/settings.php:347
|
||||||
msgid "Email password:"
|
msgid "Email password:"
|
||||||
msgstr "كلمة مرور البريد الإلكتروني:"
|
msgstr "كلمة مرور البريد الإلكتروني:"
|
||||||
|
|
||||||
#: mod/settings.php:609
|
#: mod/settings.php:348
|
||||||
msgid "Reply-to address:"
|
msgid "Reply-to address:"
|
||||||
msgstr "الرد على عنوان:"
|
msgstr "الرد على عنوان:"
|
||||||
|
|
||||||
#: mod/settings.php:610
|
#: mod/settings.php:349
|
||||||
msgid "Send public posts to all email contacts:"
|
msgid "Send public posts to all email contacts:"
|
||||||
msgstr "أرسل المشاركات العلنية لجميع متراسلي البريد الإلكتروني:"
|
msgstr "أرسل المشاركات العلنية لجميع متراسلي البريد الإلكتروني:"
|
||||||
|
|
||||||
#: mod/settings.php:611
|
#: mod/settings.php:350
|
||||||
msgid "Action after import:"
|
msgid "Action after import:"
|
||||||
msgstr "الإجراء بعد الاستيراد:"
|
msgstr "الإجراء بعد الاستيراد:"
|
||||||
|
|
||||||
#: mod/settings.php:611 src/Content/Nav.php:280
|
#: mod/settings.php:350 src/Content/Nav.php:280
|
||||||
msgid "Mark as seen"
|
msgid "Mark as seen"
|
||||||
msgstr "علّمه كمُشاهَد"
|
msgstr "علّمه كمُشاهَد"
|
||||||
|
|
||||||
#: mod/settings.php:611
|
#: mod/settings.php:350
|
||||||
msgid "Move to folder"
|
msgid "Move to folder"
|
||||||
msgstr "انقل إلى مجلد"
|
msgstr "انقل إلى مجلد"
|
||||||
|
|
||||||
#: mod/settings.php:612
|
#: mod/settings.php:351
|
||||||
msgid "Move to folder:"
|
msgid "Move to folder:"
|
||||||
msgstr "انقل إلى المجلد:"
|
msgstr "انقل إلى المجلد:"
|
||||||
|
|
||||||
#: mod/settings.php:626
|
|
||||||
msgid "Unable to find your profile. Please contact your admin."
|
|
||||||
msgstr "تعذر العثور على ملفك الشخصي. من فضلك اتصال بالمدير."
|
|
||||||
|
|
||||||
#: mod/settings.php:664 src/Content/Widget.php:523
|
|
||||||
msgid "Account Types"
|
|
||||||
msgstr "أنواع الحسابات"
|
|
||||||
|
|
||||||
#: mod/settings.php:665
|
|
||||||
msgid "Personal Page Subtypes"
|
|
||||||
msgstr "الأنواع الفرعية للصفحة الشخصية"
|
|
||||||
|
|
||||||
#: mod/settings.php:666
|
|
||||||
msgid "Community Forum Subtypes"
|
|
||||||
msgstr "الأنواع الفرعية للمنتدى المجتمعي"
|
|
||||||
|
|
||||||
#: mod/settings.php:673 src/Module/Admin/BaseUsers.php:107
|
|
||||||
msgid "Personal Page"
|
|
||||||
msgstr "صفحة شخصية"
|
|
||||||
|
|
||||||
#: mod/settings.php:674
|
|
||||||
msgid "Account for a personal profile."
|
|
||||||
msgstr "حساب ملف شخصي خاص."
|
|
||||||
|
|
||||||
#: mod/settings.php:677 src/Module/Admin/BaseUsers.php:108
|
|
||||||
msgid "Organisation Page"
|
|
||||||
msgstr "صفحة منظمة"
|
|
||||||
|
|
||||||
#: mod/settings.php:678
|
|
||||||
msgid ""
|
|
||||||
"Account for an organisation that automatically approves contact requests as "
|
|
||||||
"\"Followers\"."
|
|
||||||
msgstr "حساب المنظمة يوافق تلقائياً على طلبات المراسلة \"كمتابعين\"."
|
|
||||||
|
|
||||||
#: mod/settings.php:681 src/Module/Admin/BaseUsers.php:109
|
|
||||||
msgid "News Page"
|
|
||||||
msgstr "صفحة إخبارية"
|
|
||||||
|
|
||||||
#: mod/settings.php:682
|
|
||||||
msgid ""
|
|
||||||
"Account for a news reflector that automatically approves contact requests as"
|
|
||||||
" \"Followers\"."
|
|
||||||
msgstr "حساب إخباري يوافق تلقائياً على طلبات المراسلة \"كمتابعين\"."
|
|
||||||
|
|
||||||
#: mod/settings.php:685 src/Module/Admin/BaseUsers.php:110
|
|
||||||
msgid "Community Forum"
|
|
||||||
msgstr "منتدى مجتمعي"
|
|
||||||
|
|
||||||
#: mod/settings.php:686
|
|
||||||
msgid "Account for community discussions."
|
|
||||||
msgstr "حساب مناقشات مجتمعية."
|
|
||||||
|
|
||||||
#: mod/settings.php:689 src/Module/Admin/BaseUsers.php:100
|
|
||||||
msgid "Normal Account Page"
|
|
||||||
msgstr "صفحة حساب عادي"
|
|
||||||
|
|
||||||
#: mod/settings.php:690
|
|
||||||
msgid ""
|
|
||||||
"Account for a regular personal profile that requires manual approval of "
|
|
||||||
"\"Friends\" and \"Followers\"."
|
|
||||||
msgstr "حساب ملف شخصي عادي يتطلب الموافقة اليدوية على \"الأصدقاء\" و \"المتابعين\"."
|
|
||||||
|
|
||||||
#: mod/settings.php:693 src/Module/Admin/BaseUsers.php:101
|
|
||||||
msgid "Soapbox Page"
|
|
||||||
msgstr "صفحة سياسي"
|
|
||||||
|
|
||||||
#: mod/settings.php:694
|
|
||||||
msgid ""
|
|
||||||
"Account for a public profile that automatically approves contact requests as"
|
|
||||||
" \"Followers\"."
|
|
||||||
msgstr "حساب شخصي علني يوافق تلقائياً على طلبات المراسلة \"كمتابعين\"."
|
|
||||||
|
|
||||||
#: mod/settings.php:697 src/Module/Admin/BaseUsers.php:102
|
|
||||||
msgid "Public Forum"
|
|
||||||
msgstr "منتدى عمومي"
|
|
||||||
|
|
||||||
#: mod/settings.php:698
|
|
||||||
msgid "Automatically approves all contact requests."
|
|
||||||
msgstr "يوافق تلقائياً على جميع طلبات المراسلة."
|
|
||||||
|
|
||||||
#: mod/settings.php:701 src/Module/Admin/BaseUsers.php:103
|
|
||||||
msgid "Automatic Friend Page"
|
|
||||||
msgstr "صفحة اشترك تلقائي"
|
|
||||||
|
|
||||||
#: mod/settings.php:702
|
|
||||||
msgid ""
|
|
||||||
"Account for a popular profile that automatically approves contact requests "
|
|
||||||
"as \"Friends\"."
|
|
||||||
msgstr "حساب ملف شخصي لمشهور يوافق تلقائياً على طلبات المراسلة كـ\"أصدقاء\"."
|
|
||||||
|
|
||||||
#: mod/settings.php:705
|
|
||||||
msgid "Private Forum [Experimental]"
|
|
||||||
msgstr "منتدى خاص [تجريبي]"
|
|
||||||
|
|
||||||
#: mod/settings.php:706
|
|
||||||
msgid "Requires manual approval of contact requests."
|
|
||||||
msgstr "يتطلب الموافقة اليدوية على طلبات المراسلة."
|
|
||||||
|
|
||||||
#: mod/settings.php:717
|
|
||||||
msgid "OpenID:"
|
|
||||||
msgstr "OpenID:"
|
|
||||||
|
|
||||||
#: mod/settings.php:717
|
|
||||||
msgid "(Optional) Allow this OpenID to login to this account."
|
|
||||||
msgstr "(اختياري) اسمح لمعرف OpenID بالولوج إلى هذا الحساب."
|
|
||||||
|
|
||||||
#: mod/settings.php:725
|
|
||||||
msgid "Publish your profile in your local site directory?"
|
|
||||||
msgstr "أتريد نشر ملفك الشخصي في الدليل المحلي للموقع؟"
|
|
||||||
|
|
||||||
#: mod/settings.php:725
|
|
||||||
#, php-format
|
|
||||||
msgid ""
|
|
||||||
"Your profile will be published in this node's <a href=\"%s\">local "
|
|
||||||
"directory</a>. Your profile details may be publicly visible depending on the"
|
|
||||||
" system settings."
|
|
||||||
msgstr "سينشر ملفك الشخصي في <a href=\"%s\"> الدليل المحلي</a> لهذه العقدة. تعتمد خصوصية معلوماتك على إعدادات النظام."
|
|
||||||
|
|
||||||
#: mod/settings.php:731
|
|
||||||
#, php-format
|
|
||||||
msgid ""
|
|
||||||
"Your profile will also be published in the global friendica directories "
|
|
||||||
"(e.g. <a href=\"%s\">%s</a>)."
|
|
||||||
msgstr "سينشر ملفك الشخصي كذلك في الأدلة العالمية لفرَندِيكا (مثال <a href=\"%s\">%s</a>)."
|
|
||||||
|
|
||||||
#: mod/settings.php:737
|
|
||||||
#, php-format
|
|
||||||
msgid "Your Identity Address is <strong>'%s'</strong> or '%s'."
|
|
||||||
msgstr "عنوان معرفك هو <strong>'%s'</strong> أو '%s'."
|
|
||||||
|
|
||||||
#: mod/settings.php:748
|
|
||||||
msgid "Account Settings"
|
|
||||||
msgstr "إعدادات الحساب"
|
|
||||||
|
|
||||||
#: mod/settings.php:756
|
|
||||||
msgid "Password Settings"
|
|
||||||
msgstr "إعدادات كلمة المرور"
|
|
||||||
|
|
||||||
#: mod/settings.php:757 src/Module/Register.php:162
|
|
||||||
msgid "New Password:"
|
|
||||||
msgstr "كلمة المرور الجديدة:"
|
|
||||||
|
|
||||||
#: mod/settings.php:757
|
|
||||||
msgid ""
|
|
||||||
"Allowed characters are a-z, A-Z, 0-9 and special characters except white "
|
|
||||||
"spaces, accentuated letters and colon (:)."
|
|
||||||
msgstr "المحارف المسموح بها هي a-z، A-Z، 0-9 والأحرف الخاصة باستثناء المساحات، الأحرف المنبورة ونقطتي التفسير (:)."
|
|
||||||
|
|
||||||
#: mod/settings.php:758 src/Module/Register.php:163
|
|
||||||
msgid "Confirm:"
|
|
||||||
msgstr "التأكيد:"
|
|
||||||
|
|
||||||
#: mod/settings.php:758
|
|
||||||
msgid "Leave password fields blank unless changing"
|
|
||||||
msgstr "اترك حقول كلمة المرور فارغة ما لم ترد تغييرها"
|
|
||||||
|
|
||||||
#: mod/settings.php:759
|
|
||||||
msgid "Current Password:"
|
|
||||||
msgstr "كلمة المرور الحالية:"
|
|
||||||
|
|
||||||
#: mod/settings.php:759
|
|
||||||
msgid "Your current password to confirm the changes"
|
|
||||||
msgstr "اكتب كلمة المرور الحالية لتأكيد التغييرات"
|
|
||||||
|
|
||||||
#: mod/settings.php:760
|
|
||||||
msgid "Password:"
|
|
||||||
msgstr "كلمة المرور:"
|
|
||||||
|
|
||||||
#: mod/settings.php:760
|
|
||||||
msgid "Your current password to confirm the changes of the email address"
|
|
||||||
msgstr "اكتب كلمة المرور الحالية لتأكيد تغيير بريدك الإلكتروني"
|
|
||||||
|
|
||||||
#: mod/settings.php:763
|
|
||||||
msgid "Delete OpenID URL"
|
|
||||||
msgstr "احذف معرف OpenID"
|
|
||||||
|
|
||||||
#: mod/settings.php:765
|
|
||||||
msgid "Basic Settings"
|
|
||||||
msgstr "الإعدادات الأساسيّة"
|
|
||||||
|
|
||||||
#: mod/settings.php:766 src/Module/Profile/Profile.php:144
|
|
||||||
msgid "Full Name:"
|
|
||||||
msgstr "الاسم الكامل:"
|
|
||||||
|
|
||||||
#: mod/settings.php:767
|
|
||||||
msgid "Email Address:"
|
|
||||||
msgstr "البريد الإلكتروني:"
|
|
||||||
|
|
||||||
#: mod/settings.php:768
|
|
||||||
msgid "Your Timezone:"
|
|
||||||
msgstr "المنطقة الزمنية:"
|
|
||||||
|
|
||||||
#: mod/settings.php:769
|
|
||||||
msgid "Your Language:"
|
|
||||||
msgstr "لغتك:"
|
|
||||||
|
|
||||||
#: mod/settings.php:769
|
|
||||||
msgid ""
|
|
||||||
"Set the language we use to show you friendica interface and to send you "
|
|
||||||
"emails"
|
|
||||||
msgstr "عيّن لغة واجهة فرَندِيكا ورسائل البريد الإلكتروني"
|
|
||||||
|
|
||||||
#: mod/settings.php:770
|
|
||||||
msgid "Default Post Location:"
|
|
||||||
msgstr "موقع النشر الافتراضي:"
|
|
||||||
|
|
||||||
#: mod/settings.php:771
|
|
||||||
msgid "Use Browser Location:"
|
|
||||||
msgstr "استخدم موقع المتصفح:"
|
|
||||||
|
|
||||||
#: mod/settings.php:773
|
|
||||||
msgid "Security and Privacy Settings"
|
|
||||||
msgstr "إعدادات الأمان والخصوصية"
|
|
||||||
|
|
||||||
#: mod/settings.php:775
|
|
||||||
msgid "Maximum Friend Requests/Day:"
|
|
||||||
msgstr "حدُ طلبات الصداقة لليوم الواحد:"
|
|
||||||
|
|
||||||
#: mod/settings.php:775 mod/settings.php:785
|
|
||||||
msgid "(to prevent spam abuse)"
|
|
||||||
msgstr "(لمنع الرسائل المزعجة)"
|
|
||||||
|
|
||||||
#: mod/settings.php:777
|
|
||||||
msgid "Allow your profile to be searchable globally?"
|
|
||||||
msgstr "أتريد السماح لملفك الشخصي بالظهور في نتائج البحث العالمي؟"
|
|
||||||
|
|
||||||
#: mod/settings.php:777
|
|
||||||
msgid ""
|
|
||||||
"Activate this setting if you want others to easily find and follow you. Your"
|
|
||||||
" profile will be searchable on remote systems. This setting also determines "
|
|
||||||
"whether Friendica will inform search engines that your profile should be "
|
|
||||||
"indexed or not."
|
|
||||||
msgstr "فعّل هذا الإعداد إن أردت أن يُعثر عليك بسهولة. سيتمكن المستخدمون في المواقع البعيد من العثور عليك، وأيضا سيسمح بظهور ملفك الشخصي في محركات البحث."
|
|
||||||
|
|
||||||
#: mod/settings.php:778
|
|
||||||
msgid "Hide your contact/friend list from viewers of your profile?"
|
|
||||||
msgstr "أتريد إخفاء قائمة المتراسلين/الأصدقاء عن متصفحي ملفك الشخصي؟"
|
|
||||||
|
|
||||||
#: mod/settings.php:778
|
|
||||||
msgid ""
|
|
||||||
"A list of your contacts is displayed on your profile page. Activate this "
|
|
||||||
"option to disable the display of your contact list."
|
|
||||||
msgstr "عادة تُعرض قائمة المتراسلين على صفحة ملفك الشخصي. إن قمت بتفعيل هذا الخيار ستخفى القائمة."
|
|
||||||
|
|
||||||
#: mod/settings.php:779
|
|
||||||
msgid "Hide your profile details from anonymous viewers?"
|
|
||||||
msgstr "اخف معلومات ملفك الشخص عن المتصفحين المجهولين؟"
|
|
||||||
|
|
||||||
#: mod/settings.php:779
|
|
||||||
msgid ""
|
|
||||||
"Anonymous visitors will only see your profile picture, your display name and"
|
|
||||||
" the nickname you are using on your profile page. Your public posts and "
|
|
||||||
"replies will still be accessible by other means."
|
|
||||||
msgstr "سيرى الزوار المجهولون صورة ملفك الشخصي واسمك العلني ولقبك فقط. لكن ستبقى مشاركتك العامة وردودك متاحة عبر وسائل أخرى."
|
|
||||||
|
|
||||||
#: mod/settings.php:780
|
|
||||||
msgid "Make public posts unlisted"
|
|
||||||
msgstr "لا تدرج المشاركات العلنية"
|
|
||||||
|
|
||||||
#: mod/settings.php:780
|
|
||||||
msgid ""
|
|
||||||
"Your public posts will not appear on the community pages or in search "
|
|
||||||
"results, nor be sent to relay servers. However they can still appear on "
|
|
||||||
"public feeds on remote servers."
|
|
||||||
msgstr "لن تظهر مشاركتك العلنية على صفحات المجتمع أو في نتائج البحث لهذا الموقع، ولن يتم إرسالها إلى خوادم الترحيل. غير أنها ستبقى تظهر في التغذيات العمومية للخوادم البعيدة."
|
|
||||||
|
|
||||||
#: mod/settings.php:781
|
|
||||||
msgid "Make all posted pictures accessible"
|
|
||||||
msgstr "أتح كل الصور المنشورة"
|
|
||||||
|
|
||||||
#: mod/settings.php:781
|
|
||||||
msgid ""
|
|
||||||
"This option makes every posted picture accessible via the direct link. This "
|
|
||||||
"is a workaround for the problem that most other networks can't handle "
|
|
||||||
"permissions on pictures. Non public pictures still won't be visible for the "
|
|
||||||
"public on your photo albums though."
|
|
||||||
msgstr "يسمح هذا الخيار بالوصول للصورة المنشورة عبر رابط مباشر. هذا حل لمعظم الشبكات التي لا يمكنها التعامل مع الأذونات. صورك غير العلنية ستبقى مخفية."
|
|
||||||
|
|
||||||
#: mod/settings.php:782
|
|
||||||
msgid "Allow friends to post to your profile page?"
|
|
||||||
msgstr "أتسمح لأصدقائك بالنشر في صفحة ملفك الشخصي؟"
|
|
||||||
|
|
||||||
#: mod/settings.php:782
|
|
||||||
msgid ""
|
|
||||||
"Your contacts may write posts on your profile wall. These posts will be "
|
|
||||||
"distributed to your contacts"
|
|
||||||
msgstr "يمكن للمتراسلين كتابة مشاركات على حائط ملفك الشخصي. ستكون هذه المشركات مرئية لكل المتراسلين"
|
|
||||||
|
|
||||||
#: mod/settings.php:783
|
|
||||||
msgid "Allow friends to tag your posts?"
|
|
||||||
msgstr "أتسمح لأصدقائك بوسم مشاركاتك؟"
|
|
||||||
|
|
||||||
#: mod/settings.php:783
|
|
||||||
msgid "Your contacts can add additional tags to your posts."
|
|
||||||
msgstr "يمكن لأصدقائك إضافة وسوم لمشاركاتك."
|
|
||||||
|
|
||||||
#: mod/settings.php:784
|
|
||||||
msgid "Permit unknown people to send you private mail?"
|
|
||||||
msgstr "أتسمح لأشخاص مجهولين بإرسال بريد خاص لك؟"
|
|
||||||
|
|
||||||
#: mod/settings.php:784
|
|
||||||
msgid ""
|
|
||||||
"Friendica network users may send you private messages even if they are not "
|
|
||||||
"in your contact list."
|
|
||||||
msgstr "يمكن لمستخدمي شبكة فرَندِكا إرسال رسائل خاصة لك حتى إن لم يكونوا في قائمة المتراسلين."
|
|
||||||
|
|
||||||
#: mod/settings.php:785
|
|
||||||
msgid "Maximum private messages per day from unknown people:"
|
|
||||||
msgstr "حد الرسائل اليومي المستلمة من مجهولين:"
|
|
||||||
|
|
||||||
#: mod/settings.php:787
|
|
||||||
msgid "Default Post Permissions"
|
|
||||||
msgstr "أذونات النشر الافتراضية"
|
|
||||||
|
|
||||||
#: mod/settings.php:791
|
|
||||||
msgid "Expiration settings"
|
|
||||||
msgstr "إعدادات انتهاء الصلاحية"
|
|
||||||
|
|
||||||
#: mod/settings.php:792
|
|
||||||
msgid "Automatically expire posts after this many days:"
|
|
||||||
msgstr "أنه صَلاحِيَة المشاركات تلقائياً بعد هذا العدد من الأيام:"
|
|
||||||
|
|
||||||
#: mod/settings.php:792
|
|
||||||
msgid "If empty, posts will not expire. Expired posts will be deleted"
|
|
||||||
msgstr "إذا كان فارغاً، لن تنتهي صلاحية المشاركات. وإلا بعد المهلة ستحذف المشاركات المنتهية صلاحيتها"
|
|
||||||
|
|
||||||
#: mod/settings.php:793
|
|
||||||
msgid "Expire posts"
|
|
||||||
msgstr "أنه صَلاحِيَة المشاركات"
|
|
||||||
|
|
||||||
#: mod/settings.php:793
|
|
||||||
msgid "When activated, posts and comments will be expired."
|
|
||||||
msgstr "عند تفعيله، ستنهى صلاحية المشاركات والتعليقات."
|
|
||||||
|
|
||||||
#: mod/settings.php:794
|
|
||||||
msgid "Expire personal notes"
|
|
||||||
msgstr "أنه صَلاحِيَة الملاحظات الشخصية"
|
|
||||||
|
|
||||||
#: mod/settings.php:794
|
|
||||||
msgid ""
|
|
||||||
"When activated, the personal notes on your profile page will be expired."
|
|
||||||
msgstr "عند تفعيله، ستنهى صلاحية الملاحظات الشخصية على صفحة ملفك الشخصي."
|
|
||||||
|
|
||||||
#: mod/settings.php:795
|
|
||||||
msgid "Expire starred posts"
|
|
||||||
msgstr "أنتهي صلاحية المشاركات المفضلة"
|
|
||||||
|
|
||||||
#: mod/settings.php:795
|
|
||||||
msgid ""
|
|
||||||
"Starring posts keeps them from being expired. That behaviour is overwritten "
|
|
||||||
"by this setting."
|
|
||||||
msgstr "تفضيل مشاركة تقيها من انتهاء الصلاحية. هذا السلوك يُتجاوز من خلال هذا الإعداد."
|
|
||||||
|
|
||||||
#: mod/settings.php:796
|
|
||||||
msgid "Expire photos"
|
|
||||||
msgstr "أنه صَلاحِيَة الصور"
|
|
||||||
|
|
||||||
#: mod/settings.php:796
|
|
||||||
msgid "When activated, photos will be expired."
|
|
||||||
msgstr "عند تفعيله، ستنهى صلاحية الصور."
|
|
||||||
|
|
||||||
#: mod/settings.php:797
|
|
||||||
msgid "Only expire posts by others"
|
|
||||||
msgstr "أنه صَلاحِيَة مشاركات الآخرين فقط"
|
|
||||||
|
|
||||||
#: mod/settings.php:797
|
|
||||||
msgid ""
|
|
||||||
"When activated, your own posts never expire. Then the settings above are "
|
|
||||||
"only valid for posts you received."
|
|
||||||
msgstr "عند تفعيله، لا نهاية لصلاحية مشاركاتك. ثم تكون الإعدادات أعلاه صالحة فقط للمشاركات التي استلمتها."
|
|
||||||
|
|
||||||
#: mod/settings.php:800
|
|
||||||
msgid "Notification Settings"
|
|
||||||
msgstr "إعدادات التنبيهات"
|
|
||||||
|
|
||||||
#: mod/settings.php:801
|
|
||||||
msgid "Send a notification email when:"
|
|
||||||
msgstr "أرسل تنبيها للبريدي الإلكتروني عند:"
|
|
||||||
|
|
||||||
#: mod/settings.php:802
|
|
||||||
msgid "You receive an introduction"
|
|
||||||
msgstr "تلقي تقديم"
|
|
||||||
|
|
||||||
#: mod/settings.php:803
|
|
||||||
msgid "Your introductions are confirmed"
|
|
||||||
msgstr "أُكدت تقديماتك"
|
|
||||||
|
|
||||||
#: mod/settings.php:804
|
|
||||||
msgid "Someone writes on your profile wall"
|
|
||||||
msgstr "يكتب شخص ما على جدار ملفك الشخصي"
|
|
||||||
|
|
||||||
#: mod/settings.php:805
|
|
||||||
msgid "Someone writes a followup comment"
|
|
||||||
msgstr "شخص ما يعلق على ما نشرت"
|
|
||||||
|
|
||||||
#: mod/settings.php:806
|
|
||||||
msgid "You receive a private message"
|
|
||||||
msgstr "تلقي رسالة خاصة"
|
|
||||||
|
|
||||||
#: mod/settings.php:807
|
|
||||||
msgid "You receive a friend suggestion"
|
|
||||||
msgstr "تلقي اقتراح صداقة"
|
|
||||||
|
|
||||||
#: mod/settings.php:808
|
|
||||||
msgid "You are tagged in a post"
|
|
||||||
msgstr "ذُكرتَ في مشاركة"
|
|
||||||
|
|
||||||
#: mod/settings.php:809
|
|
||||||
msgid "You are poked/prodded/etc. in a post"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: mod/settings.php:811
|
|
||||||
msgid "Create a desktop notification when:"
|
|
||||||
msgstr "أنشئ تنبيه سطح المكتب عند:"
|
|
||||||
|
|
||||||
#: mod/settings.php:812
|
|
||||||
msgid "Someone liked your content"
|
|
||||||
msgstr "أُعجب شخص بمحتواك"
|
|
||||||
|
|
||||||
#: mod/settings.php:813
|
|
||||||
msgid "Someone shared your content"
|
|
||||||
msgstr "شارك شخص محتواك"
|
|
||||||
|
|
||||||
#: mod/settings.php:815
|
|
||||||
msgid "Activate desktop notifications"
|
|
||||||
msgstr "نشّط تنبيهات سطح المكتب"
|
|
||||||
|
|
||||||
#: mod/settings.php:815
|
|
||||||
msgid "Show desktop popup on new notifications"
|
|
||||||
msgstr "أظهر منبثقات للتنبيهات الجديدة"
|
|
||||||
|
|
||||||
#: mod/settings.php:817
|
|
||||||
msgid "Text-only notification emails"
|
|
||||||
msgstr "رسائل تنبيه نصية فقط"
|
|
||||||
|
|
||||||
#: mod/settings.php:819
|
|
||||||
msgid "Send text only notification emails, without the html part"
|
|
||||||
msgstr "أرسل بريد التنبيه كنص فقط، دون وسوم html"
|
|
||||||
|
|
||||||
#: mod/settings.php:821
|
|
||||||
msgid "Show detailled notifications"
|
|
||||||
msgstr "اعرض تنبيهات مفصلة"
|
|
||||||
|
|
||||||
#: mod/settings.php:823
|
|
||||||
msgid ""
|
|
||||||
"Per default, notifications are condensed to a single notification per item. "
|
|
||||||
"When enabled every notification is displayed."
|
|
||||||
msgstr "افتراضيًا ، يعرض أحدث تنبيه فقط لكل محادثة. عند تفعيله ستعرض جميع التنبيهات."
|
|
||||||
|
|
||||||
#: mod/settings.php:825
|
|
||||||
msgid "Show notifications of ignored contacts"
|
|
||||||
msgstr "أظهر تنبيهات للمتراسلين المتجاهلين"
|
|
||||||
|
|
||||||
#: mod/settings.php:827
|
|
||||||
msgid ""
|
|
||||||
"You don't see posts from ignored contacts. But you still see their comments."
|
|
||||||
" This setting controls if you want to still receive regular notifications "
|
|
||||||
"that are caused by ignored contacts or not."
|
|
||||||
msgstr "أنت لا ترى مشاركات المتراسلين المتجاهلين. لكن لا يزال بإمكانك رؤية تعليقاتهم. هذا الإعداد يتحكم إذا كنت ترغب في الاستمرار في تلقي تنبيهات سببها المتراسلون المتجاهلون."
|
|
||||||
|
|
||||||
#: mod/settings.php:829
|
|
||||||
msgid "Advanced Account/Page Type Settings"
|
|
||||||
msgstr "الإعدادات المتقدمة للحساب/للصفحة"
|
|
||||||
|
|
||||||
#: mod/settings.php:830
|
|
||||||
msgid "Change the behaviour of this account for special situations"
|
|
||||||
msgstr "غيّر سلوك هذا الحساب للحالات الخاصة"
|
|
||||||
|
|
||||||
#: mod/settings.php:833
|
|
||||||
msgid "Import Contacts"
|
|
||||||
msgstr "استيراد متراسلين"
|
|
||||||
|
|
||||||
#: mod/settings.php:834
|
|
||||||
msgid ""
|
|
||||||
"Upload a CSV file that contains the handle of your followed accounts in the "
|
|
||||||
"first column you exported from the old account."
|
|
||||||
msgstr "ارفع ملف CSV معرفات المتراسلين لحسابك القديم، معرفات المتابَعين تكون في العمود الأول."
|
|
||||||
|
|
||||||
#: mod/settings.php:835
|
|
||||||
msgid "Upload File"
|
|
||||||
msgstr "ارفع ملفًا"
|
|
||||||
|
|
||||||
#: mod/settings.php:837
|
|
||||||
msgid "Relocate"
|
|
||||||
msgstr "الانتقال"
|
|
||||||
|
|
||||||
#: mod/settings.php:838
|
|
||||||
msgid ""
|
|
||||||
"If you have moved this profile from another server, and some of your "
|
|
||||||
"contacts don't receive your updates, try pushing this button."
|
|
||||||
msgstr "إذا كنت قد نقلت هذا الملف الشخصي من خادم آخر، وبعض المتراسلين لا يتلقون تحديثاتك، أنقر هذا الزر."
|
|
||||||
|
|
||||||
#: mod/settings.php:839
|
|
||||||
msgid "Resend relocate message to contacts"
|
|
||||||
msgstr "أعد إرسال رسالة الانتقال للمتراسلين"
|
|
||||||
|
|
||||||
#: mod/suggest.php:44
|
#: mod/suggest.php:44
|
||||||
msgid ""
|
msgid ""
|
||||||
"No suggestions available. If this is a new site, please try again in 24 "
|
"No suggestions available. If this is a new site, please try again in 24 "
|
||||||
"hours."
|
"hours."
|
||||||
msgstr "لا توجد اقتراحات متاحة. إذا كان هذا الموقع جديد، من فضلك أعد المحاولة في غضون 24 ساعة."
|
msgstr "لا توجد اقتراحات متاحة. إذا كان هذا الموقع جديد، من فضلك أعد المحاولة في غضون 24 ساعة."
|
||||||
|
|
||||||
#: mod/suggest.php:55 src/Content/Widget.php:79 view/theme/vier/theme.php:175
|
#: mod/suggest.php:55 src/Content/Widget.php:81 view/theme/vier/theme.php:175
|
||||||
msgid "Friend Suggestions"
|
msgid "Friend Suggestions"
|
||||||
msgstr "اقتراحات الأصدقاء"
|
msgstr "اقتراحات الأصدقاء"
|
||||||
|
|
||||||
#: mod/tagger.php:78 src/Content/Item.php:335 src/Model/Item.php:2670
|
#: mod/tagger.php:78 src/Content/Item.php:342 src/Model/Item.php:2699
|
||||||
msgid "photo"
|
msgid "photo"
|
||||||
msgstr "صورة"
|
msgstr "صورة"
|
||||||
|
|
||||||
#: mod/tagger.php:78 src/Content/Item.php:330 src/Content/Item.php:339
|
#: mod/tagger.php:78 src/Content/Item.php:337 src/Content/Item.php:346
|
||||||
msgid "status"
|
msgid "status"
|
||||||
msgstr "حالة"
|
msgstr "حالة"
|
||||||
|
|
||||||
#: mod/tagger.php:111 src/Content/Item.php:349
|
#: mod/tagger.php:111 src/Content/Item.php:356
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s tagged %2$s's %3$s with %4$s"
|
msgid "%1$s tagged %2$s's %3$s with %4$s"
|
||||||
msgstr "%1$s وسم %3$s %2$s بـ %4$s"
|
msgstr "%1$s وسم %3$s %2$s بـ %4$s"
|
||||||
|
|
@ -2073,30 +1515,30 @@ msgstr "نجح إلغاء متابعة المتراسل"
|
||||||
msgid "Unable to unfollow this contact, please contact your administrator"
|
msgid "Unable to unfollow this contact, please contact your administrator"
|
||||||
msgstr "يتعذر إلغاء متابعة هذا المتراسل، يرجى الاتصال بمدير الموقع"
|
msgstr "يتعذر إلغاء متابعة هذا المتراسل، يرجى الاتصال بمدير الموقع"
|
||||||
|
|
||||||
#: mod/wall_attach.php:39 mod/wall_attach.php:46 mod/wall_attach.php:77
|
#: mod/wall_attach.php:40 mod/wall_attach.php:46 mod/wall_attach.php:75
|
||||||
#: mod/wall_upload.php:53 mod/wall_upload.php:63 mod/wall_upload.php:99
|
#: mod/wall_upload.php:54 mod/wall_upload.php:63 mod/wall_upload.php:97
|
||||||
#: mod/wall_upload.php:150 mod/wall_upload.php:153
|
#: mod/wall_upload.php:148 mod/wall_upload.php:150
|
||||||
msgid "Invalid request."
|
msgid "Invalid request."
|
||||||
msgstr "طلب غير صالح."
|
msgstr "طلب غير صالح."
|
||||||
|
|
||||||
#: mod/wall_attach.php:95
|
#: mod/wall_attach.php:93
|
||||||
msgid "Sorry, maybe your upload is bigger than the PHP configuration allows"
|
msgid "Sorry, maybe your upload is bigger than the PHP configuration allows"
|
||||||
msgstr "عذراً، ربّما يكون الرفع أكبر من ما يسمح به ضبط PHP"
|
msgstr "عذراً، ربّما يكون الرفع أكبر من ما يسمح به ضبط PHP"
|
||||||
|
|
||||||
#: mod/wall_attach.php:95
|
#: mod/wall_attach.php:93
|
||||||
msgid "Or - did you try to upload an empty file?"
|
msgid "Or - did you try to upload an empty file?"
|
||||||
msgstr "أو - هل حاولت تحميل ملف فارغ؟"
|
msgstr "أو - هل حاولت تحميل ملف فارغ؟"
|
||||||
|
|
||||||
#: mod/wall_attach.php:106
|
#: mod/wall_attach.php:104
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "File exceeds size limit of %s"
|
msgid "File exceeds size limit of %s"
|
||||||
msgstr "تجاوز الملف الحد الأقصى للحجم وهو %s"
|
msgstr "تجاوز الملف الحد الأقصى للحجم وهو %s"
|
||||||
|
|
||||||
#: mod/wall_attach.php:121
|
#: mod/wall_attach.php:119
|
||||||
msgid "File upload failed."
|
msgid "File upload failed."
|
||||||
msgstr "فشل رفع الملف."
|
msgstr "فشل رفع الملف."
|
||||||
|
|
||||||
#: mod/wall_upload.php:221 src/Model/Photo.php:1049
|
#: mod/wall_upload.php:218 src/Model/Photo.php:1061
|
||||||
msgid "Wall Photos"
|
msgid "Wall Photos"
|
||||||
msgstr "صور الحائط"
|
msgstr "صور الحائط"
|
||||||
|
|
||||||
|
|
@ -2124,21 +1566,21 @@ msgstr "إذا أردت تلقي رد من %s. تحقق أن إعدادات ال
|
||||||
msgid "No system theme config value set."
|
msgid "No system theme config value set."
|
||||||
msgstr "لم تُضبط سمة النظام."
|
msgstr "لم تُضبط سمة النظام."
|
||||||
|
|
||||||
#: src/App.php:583
|
#: src/App.php:584
|
||||||
msgid "Apologies but the website is unavailable at the moment."
|
msgid "Apologies but the website is unavailable at the moment."
|
||||||
msgstr "نعتذر هذا الموقع غير متاح حاليا."
|
msgstr "نعتذر هذا الموقع غير متاح حاليا."
|
||||||
|
|
||||||
#: src/App/Page.php:250
|
#: src/App/Page.php:276
|
||||||
msgid "Delete this item?"
|
msgid "Delete this item?"
|
||||||
msgstr "أتريد حذف العنصر؟"
|
msgstr "أتريد حذف العنصر؟"
|
||||||
|
|
||||||
#: src/App/Page.php:251
|
#: src/App/Page.php:277
|
||||||
msgid ""
|
msgid ""
|
||||||
"Block this author? They won't be able to follow you nor see your public "
|
"Block this author? They won't be able to follow you nor see your public "
|
||||||
"posts, and you won't be able to see their posts and their notifications."
|
"posts, and you won't be able to see their posts and their notifications."
|
||||||
msgstr "أتريد حظر هذا المتراسل؟ لن يتمكن من متابعتك أو رؤية مشاركاتك العلنية، ولن تكون قادراً على رؤية مشاركاتهم واستلام تنبيهات منهم."
|
msgstr "أتريد حظر هذا المتراسل؟ لن يتمكن من متابعتك أو رؤية مشاركاتك العلنية، ولن تكون قادراً على رؤية مشاركاتهم واستلام تنبيهات منهم."
|
||||||
|
|
||||||
#: src/App/Page.php:321
|
#: src/App/Page.php:347
|
||||||
msgid "toggle mobile"
|
msgid "toggle mobile"
|
||||||
msgstr "بدّل واجهة الهاتف"
|
msgstr "بدّل واجهة الهاتف"
|
||||||
|
|
||||||
|
|
@ -2147,7 +1589,7 @@ msgstr "بدّل واجهة الهاتف"
|
||||||
msgid "Method not allowed for this module. Allowed method(s): %s"
|
msgid "Method not allowed for this module. Allowed method(s): %s"
|
||||||
msgstr "هذه الطريقة غير مسموح بها لهذه الوحدة. الطرق المسموح بها: %s"
|
msgstr "هذه الطريقة غير مسموح بها لهذه الوحدة. الطرق المسموح بها: %s"
|
||||||
|
|
||||||
#: src/App/Router.php:277 src/Module/HTTPException/PageNotFound.php:33
|
#: src/App/Router.php:277 src/Module/HTTPException/PageNotFound.php:34
|
||||||
msgid "Page not found."
|
msgid "Page not found."
|
||||||
msgstr "لم يُعثر على الصفحة."
|
msgstr "لم يُعثر على الصفحة."
|
||||||
|
|
||||||
|
|
@ -2165,18 +1607,18 @@ msgstr "رمز الأمان للنموذج غير صحيح. ربما لأن ال
|
||||||
msgid "All contacts"
|
msgid "All contacts"
|
||||||
msgstr "كل المتراسلين"
|
msgstr "كل المتراسلين"
|
||||||
|
|
||||||
#: src/BaseModule.php:409 src/Content/Widget.php:231 src/Core/ACL.php:194
|
#: src/BaseModule.php:409 src/Content/Widget.php:233 src/Core/ACL.php:194
|
||||||
#: src/Module/Contact.php:367 src/Module/PermissionTooltip.php:106
|
#: src/Module/Contact.php:367 src/Module/PermissionTooltip.php:122
|
||||||
#: src/Module/PermissionTooltip.php:128
|
#: src/Module/PermissionTooltip.php:144
|
||||||
msgid "Followers"
|
msgid "Followers"
|
||||||
msgstr "متابِعون"
|
msgstr "متابِعون"
|
||||||
|
|
||||||
#: src/BaseModule.php:414 src/Content/Widget.php:232
|
#: src/BaseModule.php:414 src/Content/Widget.php:234
|
||||||
#: src/Module/Contact.php:368
|
#: src/Module/Contact.php:368
|
||||||
msgid "Following"
|
msgid "Following"
|
||||||
msgstr "متابَعون"
|
msgstr "متابَعون"
|
||||||
|
|
||||||
#: src/BaseModule.php:419 src/Content/Widget.php:233
|
#: src/BaseModule.php:419 src/Content/Widget.php:235
|
||||||
#: src/Module/Contact.php:369
|
#: src/Module/Contact.php:369
|
||||||
msgid "Mutual friends"
|
msgid "Mutual friends"
|
||||||
msgstr "أصدقاء مشتركون"
|
msgstr "أصدقاء مشتركون"
|
||||||
|
|
@ -2217,6 +1659,95 @@ msgstr "تعذر العثور على متراسل يقود اليه هذا ال
|
||||||
msgid "The contact has been blocked from the node"
|
msgid "The contact has been blocked from the node"
|
||||||
msgstr "حُجب المتراسل من هذه العقدة"
|
msgstr "حُجب المتراسل من هذه العقدة"
|
||||||
|
|
||||||
|
#: src/Console/MergeContacts.php:74
|
||||||
|
#, php-format
|
||||||
|
msgid "%d %s, %d duplicates."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Console/MergeContacts.php:77
|
||||||
|
#, php-format
|
||||||
|
msgid "uri-id is empty for contact %s."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Console/MergeContacts.php:90
|
||||||
|
#, php-format
|
||||||
|
msgid "No valid first countact found for uri-id %d."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Console/MergeContacts.php:101
|
||||||
|
#, php-format
|
||||||
|
msgid "Wrong duplicate found for uri-id %d in %d (url: %s != %s)."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Console/MergeContacts.php:105
|
||||||
|
#, php-format
|
||||||
|
msgid "Wrong duplicate found for uri-id %d in %d (nurl: %s != %s)."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Console/MergeContacts.php:141
|
||||||
|
#, php-format
|
||||||
|
msgid "Deletion of id %d failed"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Console/MergeContacts.php:143
|
||||||
|
#, php-format
|
||||||
|
msgid "Deletion of id %d was successful"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Console/MergeContacts.php:149
|
||||||
|
#, php-format
|
||||||
|
msgid "Updating \"%s\" in \"%s\" from %d to %d"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Console/MergeContacts.php:151
|
||||||
|
msgid " - found"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Console/MergeContacts.php:158
|
||||||
|
msgid " - failed"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Console/MergeContacts.php:160
|
||||||
|
msgid " - success"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Console/MergeContacts.php:164
|
||||||
|
msgid " - deleted"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Console/MergeContacts.php:167
|
||||||
|
msgid " - done"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Console/MoveToAvatarCache.php:91
|
||||||
|
msgid "The avatar cache needs to be enabled to use this command."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Console/MoveToAvatarCache.php:109
|
||||||
|
#, php-format
|
||||||
|
msgid "no resource in photo %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Console/MoveToAvatarCache.php:137
|
||||||
|
#, php-format
|
||||||
|
msgid "no photo with id %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Console/MoveToAvatarCache.php:146
|
||||||
|
#, php-format
|
||||||
|
msgid "no image data for photo with id %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Console/MoveToAvatarCache.php:155
|
||||||
|
#, php-format
|
||||||
|
msgid "invalid image for id %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Console/MoveToAvatarCache.php:168
|
||||||
|
#, php-format
|
||||||
|
msgid "Quit on invalid photo %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/Console/PostUpdate.php:87
|
#: src/Console/PostUpdate.php:87
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Post update version number has been set to %s."
|
msgid "Post update version number has been set to %s."
|
||||||
|
|
@ -2246,6 +1777,14 @@ msgstr "أدخل لقب المستخدم: "
|
||||||
msgid "Enter new password: "
|
msgid "Enter new password: "
|
||||||
msgstr "أدخل كلمة مرور جديدة: "
|
msgstr "أدخل كلمة مرور جديدة: "
|
||||||
|
|
||||||
|
#: src/Console/User.php:210 src/Module/Settings/Account.php:74
|
||||||
|
msgid "Password update failed. Please try again."
|
||||||
|
msgstr "فشل تحديث كلمة المرور. من فضلك أعد المحاولة."
|
||||||
|
|
||||||
|
#: src/Console/User.php:213 src/Module/Settings/Account.php:77
|
||||||
|
msgid "Password changed."
|
||||||
|
msgstr "غُيّرت كلمة المرور."
|
||||||
|
|
||||||
#: src/Console/User.php:237
|
#: src/Console/User.php:237
|
||||||
msgid "Enter user name: "
|
msgid "Enter user name: "
|
||||||
msgstr "أدخل اسم المستخدم: "
|
msgstr "أدخل اسم المستخدم: "
|
||||||
|
|
@ -2421,7 +1960,7 @@ msgid "%s attends maybe."
|
||||||
msgstr "قد يحضره %s."
|
msgstr "قد يحضره %s."
|
||||||
|
|
||||||
#: src/Content/Conversation.php:222 src/Content/Conversation.php:260
|
#: src/Content/Conversation.php:222 src/Content/Conversation.php:260
|
||||||
#: src/Content/Conversation.php:849
|
#: src/Content/Conversation.php:872
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s reshared this."
|
msgid "%s reshared this."
|
||||||
msgstr "أعاد %s نشره."
|
msgstr "أعاد %s نشره."
|
||||||
|
|
@ -2494,8 +2033,8 @@ msgstr "أعاد نشره <span %1$s>%2$d شخص</span>"
|
||||||
msgid "Visible to <strong>everybody</strong>"
|
msgid "Visible to <strong>everybody</strong>"
|
||||||
msgstr "مرئي <strong>للجميع</strong>"
|
msgstr "مرئي <strong>للجميع</strong>"
|
||||||
|
|
||||||
#: src/Content/Conversation.php:308 src/Module/Item/Compose.php:159
|
#: src/Content/Conversation.php:308 src/Module/Item/Compose.php:171
|
||||||
#: src/Object/Post.php:991
|
#: src/Object/Post.php:998
|
||||||
msgid "Please enter a image/video/audio/webpage URL:"
|
msgid "Please enter a image/video/audio/webpage URL:"
|
||||||
msgstr "رجاء أدخل رابط صورة/فيديو/صوت/صفحة ويب:"
|
msgstr "رجاء أدخل رابط صورة/فيديو/صوت/صفحة ويب:"
|
||||||
|
|
||||||
|
|
@ -2515,109 +2054,117 @@ msgstr "أين أنت حاليا؟"
|
||||||
msgid "Delete item(s)?"
|
msgid "Delete item(s)?"
|
||||||
msgstr "أتريد حذف العناصر؟"
|
msgstr "أتريد حذف العناصر؟"
|
||||||
|
|
||||||
#: src/Content/Conversation.php:322
|
#: src/Content/Conversation.php:324 src/Module/Item/Compose.php:143
|
||||||
|
msgid "Created at"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Content/Conversation.php:334
|
||||||
msgid "New Post"
|
msgid "New Post"
|
||||||
msgstr "مشاركة جديدة"
|
msgstr "مشاركة جديدة"
|
||||||
|
|
||||||
#: src/Content/Conversation.php:325 src/Object/Post.php:497
|
#: src/Content/Conversation.php:337
|
||||||
msgid "Share"
|
msgid "Share"
|
||||||
msgstr "شارك"
|
msgstr "شارك"
|
||||||
|
|
||||||
#: src/Content/Conversation.php:336 src/Module/Item/Compose.php:156
|
#: src/Content/Conversation.php:348 src/Module/Item/Compose.php:168
|
||||||
#: src/Object/Post.php:988
|
#: src/Object/Post.php:995
|
||||||
msgid "Image"
|
msgid "Image"
|
||||||
msgstr "صورة"
|
msgstr "صورة"
|
||||||
|
|
||||||
#: src/Content/Conversation.php:339
|
#: src/Content/Conversation.php:351
|
||||||
msgid "Video"
|
msgid "Video"
|
||||||
msgstr "فيديو"
|
msgstr "فيديو"
|
||||||
|
|
||||||
#: src/Content/Conversation.php:352 src/Module/Item/Compose.php:172
|
#: src/Content/Conversation.php:364 src/Module/Item/Compose.php:184
|
||||||
msgid "Scheduled at"
|
msgid "Scheduled at"
|
||||||
msgstr "بُرمِج في"
|
msgstr "بُرمِج في"
|
||||||
|
|
||||||
#: src/Content/Conversation.php:651 src/Object/Post.php:468
|
#: src/Content/Conversation.php:656 src/Object/Post.php:235
|
||||||
#: src/Object/Post.php:469
|
msgid "Pinned item"
|
||||||
|
msgstr "عنصر مثبت"
|
||||||
|
|
||||||
|
#: src/Content/Conversation.php:672 src/Object/Post.php:476
|
||||||
|
#: src/Object/Post.php:477
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "View %s's profile @ %s"
|
msgid "View %s's profile @ %s"
|
||||||
msgstr "اعرض ملف %s الشخصي @ %s"
|
msgstr "اعرض ملف %s الشخصي @ %s"
|
||||||
|
|
||||||
#: src/Content/Conversation.php:664 src/Object/Post.php:456
|
#: src/Content/Conversation.php:685 src/Object/Post.php:464
|
||||||
msgid "Categories:"
|
msgid "Categories:"
|
||||||
msgstr "الفئات:"
|
msgstr "الفئات:"
|
||||||
|
|
||||||
#: src/Content/Conversation.php:665 src/Object/Post.php:457
|
#: src/Content/Conversation.php:686 src/Object/Post.php:465
|
||||||
msgid "Filed under:"
|
msgid "Filed under:"
|
||||||
msgstr "مصنف كـ:"
|
msgstr "مصنف كـ:"
|
||||||
|
|
||||||
#: src/Content/Conversation.php:673 src/Object/Post.php:482
|
#: src/Content/Conversation.php:694 src/Object/Post.php:490
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s from %s"
|
msgid "%s from %s"
|
||||||
msgstr "%s من %s"
|
msgstr "%s من %s"
|
||||||
|
|
||||||
#: src/Content/Conversation.php:688
|
#: src/Content/Conversation.php:710
|
||||||
msgid "View in context"
|
msgid "View in context"
|
||||||
msgstr "اعرضه في السياق"
|
msgstr "اعرضه في السياق"
|
||||||
|
|
||||||
#: src/Content/Conversation.php:753
|
#: src/Content/Conversation.php:775
|
||||||
msgid "remove"
|
msgid "remove"
|
||||||
msgstr "أزل"
|
msgstr "أزل"
|
||||||
|
|
||||||
#: src/Content/Conversation.php:757
|
#: src/Content/Conversation.php:779
|
||||||
msgid "Delete Selected Items"
|
msgid "Delete Selected Items"
|
||||||
msgstr "أزل العناصر المختارة"
|
msgstr "أزل العناصر المختارة"
|
||||||
|
|
||||||
#: src/Content/Conversation.php:821 src/Content/Conversation.php:824
|
#: src/Content/Conversation.php:844 src/Content/Conversation.php:847
|
||||||
#: src/Content/Conversation.php:827 src/Content/Conversation.php:830
|
#: src/Content/Conversation.php:850 src/Content/Conversation.php:853
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "You had been addressed (%s)."
|
msgid "You had been addressed (%s)."
|
||||||
msgstr "ذُكرت (%s)."
|
msgstr "ذُكرت (%s)."
|
||||||
|
|
||||||
#: src/Content/Conversation.php:833
|
#: src/Content/Conversation.php:856
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "You are following %s."
|
msgid "You are following %s."
|
||||||
msgstr "تتابع %s."
|
msgstr "تتابع %s."
|
||||||
|
|
||||||
#: src/Content/Conversation.php:836
|
#: src/Content/Conversation.php:859
|
||||||
msgid "Tagged"
|
msgid "Tagged"
|
||||||
msgstr "موسوم"
|
msgstr "موسوم"
|
||||||
|
|
||||||
#: src/Content/Conversation.php:851
|
#: src/Content/Conversation.php:874
|
||||||
msgid "Reshared"
|
msgid "Reshared"
|
||||||
msgstr "أُعيد نشره"
|
msgstr "أُعيد نشره"
|
||||||
|
|
||||||
#: src/Content/Conversation.php:851
|
#: src/Content/Conversation.php:874
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Reshared by %s <%s>"
|
msgid "Reshared by %s <%s>"
|
||||||
msgstr "أعاد نشره %s <%s>"
|
msgstr "أعاد نشره %s <%s>"
|
||||||
|
|
||||||
#: src/Content/Conversation.php:854
|
#: src/Content/Conversation.php:877
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s is participating in this thread."
|
msgid "%s is participating in this thread."
|
||||||
msgstr "%s مشترك في هذا النقاش."
|
msgstr "%s مشترك في هذا النقاش."
|
||||||
|
|
||||||
#: src/Content/Conversation.php:857
|
#: src/Content/Conversation.php:880
|
||||||
msgid "Stored"
|
msgid "Stored"
|
||||||
msgstr "مُخزن"
|
msgstr "مُخزن"
|
||||||
|
|
||||||
#: src/Content/Conversation.php:860
|
#: src/Content/Conversation.php:883
|
||||||
msgid "Global"
|
msgid "Global"
|
||||||
msgstr "عالمي"
|
msgstr "عالمي"
|
||||||
|
|
||||||
#: src/Content/Conversation.php:863
|
#: src/Content/Conversation.php:886
|
||||||
msgid "Relayed"
|
msgid "Relayed"
|
||||||
msgstr "منقول"
|
msgstr "منقول"
|
||||||
|
|
||||||
#: src/Content/Conversation.php:863
|
#: src/Content/Conversation.php:886
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Relayed by %s <%s>"
|
msgid "Relayed by %s <%s>"
|
||||||
msgstr "نقله %s <%s>"
|
msgstr "نقله %s <%s>"
|
||||||
|
|
||||||
#: src/Content/Conversation.php:866
|
#: src/Content/Conversation.php:889
|
||||||
msgid "Fetched"
|
msgid "Fetched"
|
||||||
msgstr "جُلب"
|
msgstr "جُلب"
|
||||||
|
|
||||||
#: src/Content/Conversation.php:866
|
#: src/Content/Conversation.php:889
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fetched because of %s <%s>"
|
msgid "Fetched because of %s <%s>"
|
||||||
msgstr "جُلب بسبب %s <%s>"
|
msgstr "جُلب بسبب %s <%s>"
|
||||||
|
|
@ -2669,126 +2216,137 @@ msgid ""
|
||||||
"mentioned in replies."
|
"mentioned in replies."
|
||||||
msgstr "يضيف الذِكر الصريح في صندوق التعليق مما يسمح بالتحكم اليدوي بالذِكر في التعليقات."
|
msgstr "يضيف الذِكر الصريح في صندوق التعليق مما يسمح بالتحكم اليدوي بالذِكر في التعليقات."
|
||||||
|
|
||||||
#: src/Content/Feature.php:111
|
#: src/Content/Feature.php:107
|
||||||
|
msgid "Add an abstract from ActivityPub content warnings"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Content/Feature.php:107
|
||||||
|
msgid ""
|
||||||
|
"Add an abstract when commenting on ActivityPub posts with a content warning."
|
||||||
|
" Abstracts are displayed as content warning on systems like Mastodon or "
|
||||||
|
"Pleroma."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Content/Feature.php:112
|
||||||
msgid "Post/Comment Tools"
|
msgid "Post/Comment Tools"
|
||||||
msgstr "أدوات النشر\\التعليق"
|
msgstr "أدوات النشر\\التعليق"
|
||||||
|
|
||||||
#: src/Content/Feature.php:112
|
#: src/Content/Feature.php:113
|
||||||
msgid "Post Categories"
|
msgid "Post Categories"
|
||||||
msgstr "فئات المشاركة"
|
msgstr "فئات المشاركة"
|
||||||
|
|
||||||
#: src/Content/Feature.php:112
|
#: src/Content/Feature.php:113
|
||||||
msgid "Add categories to your posts"
|
msgid "Add categories to your posts"
|
||||||
msgstr "أضف فئات لمشاركاتك"
|
msgstr "أضف فئات لمشاركاتك"
|
||||||
|
|
||||||
#: src/Content/Feature.php:117
|
#: src/Content/Feature.php:118
|
||||||
msgid "Advanced Profile Settings"
|
msgid "Advanced Profile Settings"
|
||||||
msgstr "إعدادات الحساب الشخصي المُتقدّمة"
|
msgstr "إعدادات الحساب الشخصي المُتقدّمة"
|
||||||
|
|
||||||
#: src/Content/Feature.php:118
|
#: src/Content/Feature.php:119
|
||||||
msgid "List Forums"
|
msgid "List Forums"
|
||||||
msgstr "اسرد المنتديات"
|
msgstr "اسرد المنتديات"
|
||||||
|
|
||||||
#: src/Content/Feature.php:118
|
#: src/Content/Feature.php:119
|
||||||
msgid "Show visitors public community forums at the Advanced Profile Page"
|
msgid "Show visitors public community forums at the Advanced Profile Page"
|
||||||
msgstr "إظهار منتديات المجتمعية للزوار على صفحة الملف الشخصي المتقدمة"
|
msgstr "إظهار منتديات المجتمعية للزوار على صفحة الملف الشخصي المتقدمة"
|
||||||
|
|
||||||
#: src/Content/Feature.php:119
|
#: src/Content/Feature.php:120
|
||||||
msgid "Tag Cloud"
|
msgid "Tag Cloud"
|
||||||
msgstr "سحابة الوسوم"
|
msgstr "سحابة الوسوم"
|
||||||
|
|
||||||
#: src/Content/Feature.php:119
|
#: src/Content/Feature.php:120
|
||||||
msgid "Provide a personal tag cloud on your profile page"
|
msgid "Provide a personal tag cloud on your profile page"
|
||||||
msgstr "إظهار سحابة وسوم في صفحة ملفك الشخصي"
|
msgstr "إظهار سحابة وسوم في صفحة ملفك الشخصي"
|
||||||
|
|
||||||
#: src/Content/Feature.php:120
|
#: src/Content/Feature.php:121
|
||||||
msgid "Display Membership Date"
|
msgid "Display Membership Date"
|
||||||
msgstr "اعرض عُمر العضوية"
|
msgstr "اعرض عُمر العضوية"
|
||||||
|
|
||||||
#: src/Content/Feature.php:120
|
#: src/Content/Feature.php:121
|
||||||
msgid "Display membership date in profile"
|
msgid "Display membership date in profile"
|
||||||
msgstr "اعرض عُمر العضوية في الملف الشخصي"
|
msgstr "اعرض عُمر العضوية في الملف الشخصي"
|
||||||
|
|
||||||
#: src/Content/ForumManager.php:145 src/Content/Nav.php:239
|
#: src/Content/ForumManager.php:151 src/Content/Nav.php:239
|
||||||
#: src/Content/Text/HTML.php:896 src/Content/Widget.php:520
|
#: src/Content/Text/HTML.php:896 src/Content/Widget.php:522
|
||||||
msgid "Forums"
|
msgid "Forums"
|
||||||
msgstr "المنتديات"
|
msgstr "المنتديات"
|
||||||
|
|
||||||
#: src/Content/ForumManager.php:147
|
#: src/Content/ForumManager.php:153
|
||||||
msgid "External link to forum"
|
msgid "External link to forum"
|
||||||
msgstr "رابط خارجي للمنتدى"
|
msgstr "رابط خارجي للمنتدى"
|
||||||
|
|
||||||
#: src/Content/ForumManager.php:150 src/Content/Widget.php:499
|
#: src/Content/ForumManager.php:156 src/Content/Widget.php:501
|
||||||
msgid "show less"
|
msgid "show less"
|
||||||
msgstr "اعرض أقلّ"
|
msgstr "اعرض أقلّ"
|
||||||
|
|
||||||
#: src/Content/ForumManager.php:151 src/Content/Widget.php:401
|
#: src/Content/ForumManager.php:157 src/Content/Widget.php:403
|
||||||
#: src/Content/Widget.php:500
|
#: src/Content/Widget.php:502
|
||||||
msgid "show more"
|
msgid "show more"
|
||||||
msgstr "اعرض المزيد"
|
msgstr "اعرض المزيد"
|
||||||
|
|
||||||
#: src/Content/Item.php:294
|
#: src/Content/Item.php:301
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s poked %2$s"
|
msgid "%1$s poked %2$s"
|
||||||
msgstr "%1$s لكز%2$s"
|
msgstr "%1$s لكز%2$s"
|
||||||
|
|
||||||
#: src/Content/Item.php:327 src/Model/Item.php:2668
|
#: src/Content/Item.php:334 src/Model/Item.php:2697
|
||||||
msgid "event"
|
msgid "event"
|
||||||
msgstr "حدث"
|
msgstr "حدث"
|
||||||
|
|
||||||
#: src/Content/Item.php:431 view/theme/frio/theme.php:254
|
#: src/Content/Item.php:422 view/theme/frio/theme.php:254
|
||||||
msgid "Follow Thread"
|
msgid "Follow Thread"
|
||||||
msgstr "تابع المناقشة"
|
msgstr "تابع المناقشة"
|
||||||
|
|
||||||
#: src/Content/Item.php:432 src/Model/Contact.php:1088
|
#: src/Content/Item.php:423 src/Model/Contact.php:1107
|
||||||
msgid "View Status"
|
msgid "View Status"
|
||||||
msgstr "اعرض الحالة"
|
msgstr "اعرض الحالة"
|
||||||
|
|
||||||
#: src/Content/Item.php:433 src/Content/Item.php:455
|
#: src/Content/Item.php:424 src/Content/Item.php:446
|
||||||
#: src/Model/Contact.php:1022 src/Model/Contact.php:1080
|
#: src/Model/Contact.php:1041 src/Model/Contact.php:1099
|
||||||
#: src/Model/Contact.php:1089 src/Module/Directory.php:157
|
#: src/Model/Contact.php:1108 src/Module/Directory.php:158
|
||||||
#: src/Module/Settings/Profile/Index.php:225
|
#: src/Module/Settings/Profile/Index.php:225
|
||||||
msgid "View Profile"
|
msgid "View Profile"
|
||||||
msgstr "اعرض الملف الشخصي"
|
msgstr "اعرض الملف الشخصي"
|
||||||
|
|
||||||
#: src/Content/Item.php:434 src/Model/Contact.php:1090
|
#: src/Content/Item.php:425 src/Model/Contact.php:1109
|
||||||
msgid "View Photos"
|
msgid "View Photos"
|
||||||
msgstr "اعرض الصور"
|
msgstr "اعرض الصور"
|
||||||
|
|
||||||
#: src/Content/Item.php:435 src/Model/Contact.php:1081
|
#: src/Content/Item.php:426 src/Model/Contact.php:1100
|
||||||
#: src/Model/Contact.php:1091
|
#: src/Model/Contact.php:1110
|
||||||
msgid "Network Posts"
|
msgid "Network Posts"
|
||||||
msgstr "مشاركات الشبكة"
|
msgstr "مشاركات الشبكة"
|
||||||
|
|
||||||
#: src/Content/Item.php:436 src/Model/Contact.php:1082
|
#: src/Content/Item.php:427 src/Model/Contact.php:1101
|
||||||
#: src/Model/Contact.php:1092
|
#: src/Model/Contact.php:1111
|
||||||
msgid "View Contact"
|
msgid "View Contact"
|
||||||
msgstr "اعرض المتراسل"
|
msgstr "اعرض المتراسل"
|
||||||
|
|
||||||
#: src/Content/Item.php:437 src/Model/Contact.php:1093
|
#: src/Content/Item.php:428 src/Model/Contact.php:1112
|
||||||
msgid "Send PM"
|
msgid "Send PM"
|
||||||
msgstr "أرسل رسالة خاصة"
|
msgstr "أرسل رسالة خاصة"
|
||||||
|
|
||||||
#: src/Content/Item.php:438 src/Module/Admin/Blocklist/Contact.php:100
|
#: src/Content/Item.php:429 src/Module/Admin/Blocklist/Contact.php:100
|
||||||
#: src/Module/Admin/Users/Active.php:140 src/Module/Admin/Users/Index.php:154
|
#: src/Module/Admin/Users/Active.php:140 src/Module/Admin/Users/Index.php:154
|
||||||
#: src/Module/Contact.php:398 src/Module/Contact/Profile.php:348
|
#: src/Module/Contact.php:398 src/Module/Contact/Profile.php:348
|
||||||
#: src/Module/Contact/Profile.php:449
|
#: src/Module/Contact/Profile.php:449
|
||||||
msgid "Block"
|
msgid "Block"
|
||||||
msgstr "احجب"
|
msgstr "احجب"
|
||||||
|
|
||||||
#: src/Content/Item.php:439 src/Module/Contact.php:399
|
#: src/Content/Item.php:430 src/Module/Contact.php:399
|
||||||
#: src/Module/Contact/Profile.php:349 src/Module/Contact/Profile.php:457
|
#: src/Module/Contact/Profile.php:349 src/Module/Contact/Profile.php:457
|
||||||
#: src/Module/Notifications/Introductions.php:132
|
#: src/Module/Notifications/Introductions.php:132
|
||||||
#: src/Module/Notifications/Introductions.php:204
|
#: src/Module/Notifications/Introductions.php:204
|
||||||
#: src/Module/Notifications/Notification.php:61
|
#: src/Module/Notifications/Notification.php:88
|
||||||
msgid "Ignore"
|
msgid "Ignore"
|
||||||
msgstr "تجاهل"
|
msgstr "تجاهل"
|
||||||
|
|
||||||
#: src/Content/Item.php:443 src/Object/Post.php:443
|
#: src/Content/Item.php:434 src/Object/Post.php:445
|
||||||
msgid "Languages"
|
msgid "Languages"
|
||||||
msgstr "اللغات"
|
msgstr "اللغات"
|
||||||
|
|
||||||
#: src/Content/Item.php:447 src/Model/Contact.php:1094
|
#: src/Content/Item.php:438 src/Model/Contact.php:1113
|
||||||
msgid "Poke"
|
msgid "Poke"
|
||||||
msgstr "ألكز"
|
msgstr "ألكز"
|
||||||
|
|
||||||
|
|
@ -2907,7 +2465,7 @@ msgid "Addon applications, utilities, games"
|
||||||
msgstr "إضافات، أدوات، ألعاب"
|
msgstr "إضافات، أدوات، ألعاب"
|
||||||
|
|
||||||
#: src/Content/Nav.php:230 src/Content/Text/HTML.php:881
|
#: src/Content/Nav.php:230 src/Content/Text/HTML.php:881
|
||||||
#: src/Module/Admin/Logs/View.php:86 src/Module/Search/Index.php:96
|
#: src/Module/Admin/Logs/View.php:87 src/Module/Search/Index.php:97
|
||||||
msgid "Search"
|
msgid "Search"
|
||||||
msgstr "ابحث"
|
msgstr "ابحث"
|
||||||
|
|
||||||
|
|
@ -3049,11 +2607,11 @@ msgstr "تصفح"
|
||||||
msgid "Site map"
|
msgid "Site map"
|
||||||
msgstr "خريطة الموقع"
|
msgstr "خريطة الموقع"
|
||||||
|
|
||||||
#: src/Content/OEmbed.php:298
|
#: src/Content/OEmbed.php:299
|
||||||
msgid "Embedding disabled"
|
msgid "Embedding disabled"
|
||||||
msgstr "التضمين معطل"
|
msgstr "التضمين معطل"
|
||||||
|
|
||||||
#: src/Content/OEmbed.php:416
|
#: src/Content/OEmbed.php:417
|
||||||
msgid "Embedded content"
|
msgid "Embedded content"
|
||||||
msgstr "محتوى مضمن"
|
msgstr "محتوى مضمن"
|
||||||
|
|
||||||
|
|
@ -3073,38 +2631,38 @@ msgstr "التالي"
|
||||||
msgid "last"
|
msgid "last"
|
||||||
msgstr "الأخير"
|
msgstr "الأخير"
|
||||||
|
|
||||||
#: src/Content/Text/BBCode.php:987 src/Content/Text/BBCode.php:1781
|
#: src/Content/Text/BBCode.php:990 src/Content/Text/BBCode.php:1784
|
||||||
#: src/Content/Text/BBCode.php:1782
|
#: src/Content/Text/BBCode.php:1785
|
||||||
msgid "Image/photo"
|
msgid "Image/photo"
|
||||||
msgstr "صورة"
|
msgstr "صورة"
|
||||||
|
|
||||||
#: src/Content/Text/BBCode.php:1160
|
#: src/Content/Text/BBCode.php:1163
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "<a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">%2$s</a> %3$s"
|
msgid "<a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">%2$s</a> %3$s"
|
||||||
msgstr "<a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">%2$s</a> %3$s"
|
msgstr "<a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">%2$s</a> %3$s"
|
||||||
|
|
||||||
#: src/Content/Text/BBCode.php:1185 src/Model/Item.php:3199
|
#: src/Content/Text/BBCode.php:1188 src/Model/Item.php:3271
|
||||||
#: src/Model/Item.php:3205 src/Model/Item.php:3206
|
#: src/Model/Item.php:3277 src/Model/Item.php:3278
|
||||||
msgid "Link to source"
|
msgid "Link to source"
|
||||||
msgstr "رابط المصدر"
|
msgstr "رابط المصدر"
|
||||||
|
|
||||||
#: src/Content/Text/BBCode.php:1699 src/Content/Text/HTML.php:933
|
#: src/Content/Text/BBCode.php:1702 src/Content/Text/HTML.php:933
|
||||||
msgid "Click to open/close"
|
msgid "Click to open/close"
|
||||||
msgstr "أنقر للفتح/للإغلاق"
|
msgstr "أنقر للفتح/للإغلاق"
|
||||||
|
|
||||||
#: src/Content/Text/BBCode.php:1730
|
#: src/Content/Text/BBCode.php:1733
|
||||||
msgid "$1 wrote:"
|
msgid "$1 wrote:"
|
||||||
msgstr "كتب $1:"
|
msgstr "كتب $1:"
|
||||||
|
|
||||||
#: src/Content/Text/BBCode.php:1786 src/Content/Text/BBCode.php:1787
|
#: src/Content/Text/BBCode.php:1789 src/Content/Text/BBCode.php:1790
|
||||||
msgid "Encrypted content"
|
msgid "Encrypted content"
|
||||||
msgstr "محتوى مشفر"
|
msgstr "محتوى مشفر"
|
||||||
|
|
||||||
#: src/Content/Text/BBCode.php:2002
|
#: src/Content/Text/BBCode.php:2008
|
||||||
msgid "Invalid source protocol"
|
msgid "Invalid source protocol"
|
||||||
msgstr "ميفاق المصدر غير صالح"
|
msgstr "ميفاق المصدر غير صالح"
|
||||||
|
|
||||||
#: src/Content/Text/BBCode.php:2017
|
#: src/Content/Text/BBCode.php:2023
|
||||||
msgid "Invalid link protocol"
|
msgid "Invalid link protocol"
|
||||||
msgstr "ميفاق الرابط غير صالح"
|
msgstr "ميفاق الرابط غير صالح"
|
||||||
|
|
||||||
|
|
@ -3116,28 +2674,28 @@ msgstr "يحمل مزيدًا من المدخلات..."
|
||||||
msgid "The end"
|
msgid "The end"
|
||||||
msgstr "النهاية"
|
msgstr "النهاية"
|
||||||
|
|
||||||
#: src/Content/Text/HTML.php:875 src/Content/Widget/VCard.php:103
|
#: src/Content/Text/HTML.php:875 src/Content/Widget/VCard.php:109
|
||||||
#: src/Model/Profile.php:454
|
#: src/Model/Profile.php:456
|
||||||
msgid "Follow"
|
msgid "Follow"
|
||||||
msgstr "تابع"
|
msgstr "تابع"
|
||||||
|
|
||||||
#: src/Content/Widget.php:49
|
#: src/Content/Widget.php:51
|
||||||
msgid "Add New Contact"
|
msgid "Add New Contact"
|
||||||
msgstr "أضف متراسلًا جديدًا"
|
msgstr "أضف متراسلًا جديدًا"
|
||||||
|
|
||||||
#: src/Content/Widget.php:50
|
#: src/Content/Widget.php:52
|
||||||
msgid "Enter address or web location"
|
msgid "Enter address or web location"
|
||||||
msgstr "أدخل العنوان أو الرابط"
|
msgstr "أدخل العنوان أو الرابط"
|
||||||
|
|
||||||
#: src/Content/Widget.php:51
|
#: src/Content/Widget.php:53
|
||||||
msgid "Example: bob@example.com, http://example.com/barbara"
|
msgid "Example: bob@example.com, http://example.com/barbara"
|
||||||
msgstr "مثل: bob@example.com, http://example.com/barbara"
|
msgstr "مثل: bob@example.com, http://example.com/barbara"
|
||||||
|
|
||||||
#: src/Content/Widget.php:53
|
#: src/Content/Widget.php:55
|
||||||
msgid "Connect"
|
msgid "Connect"
|
||||||
msgstr "اتصل"
|
msgstr "اتصل"
|
||||||
|
|
||||||
#: src/Content/Widget.php:68
|
#: src/Content/Widget.php:70
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%d invitation available"
|
msgid "%d invitation available"
|
||||||
msgid_plural "%d invitations available"
|
msgid_plural "%d invitations available"
|
||||||
|
|
@ -3148,83 +2706,83 @@ msgstr[3] "%d دعوات متاحة"
|
||||||
msgstr[4] "%d دعوة متاحة"
|
msgstr[4] "%d دعوة متاحة"
|
||||||
msgstr[5] "%d دعوة متاحة"
|
msgstr[5] "%d دعوة متاحة"
|
||||||
|
|
||||||
#: src/Content/Widget.php:74 view/theme/vier/theme.php:170
|
#: src/Content/Widget.php:76 view/theme/vier/theme.php:170
|
||||||
msgid "Find People"
|
msgid "Find People"
|
||||||
msgstr "ابحث عن أشخاص"
|
msgstr "ابحث عن أشخاص"
|
||||||
|
|
||||||
#: src/Content/Widget.php:75 view/theme/vier/theme.php:171
|
#: src/Content/Widget.php:77 view/theme/vier/theme.php:171
|
||||||
msgid "Enter name or interest"
|
msgid "Enter name or interest"
|
||||||
msgstr "أدخل اسما أو اهتماما"
|
msgstr "أدخل اسما أو اهتماما"
|
||||||
|
|
||||||
#: src/Content/Widget.php:77 view/theme/vier/theme.php:173
|
#: src/Content/Widget.php:79 view/theme/vier/theme.php:173
|
||||||
msgid "Examples: Robert Morgenstein, Fishing"
|
msgid "Examples: Robert Morgenstein, Fishing"
|
||||||
msgstr "مثال: أحمد علي، الصيد"
|
msgstr "مثال: أحمد علي، الصيد"
|
||||||
|
|
||||||
#: src/Content/Widget.php:78 src/Module/Contact.php:391
|
#: src/Content/Widget.php:80 src/Module/Contact.php:391
|
||||||
#: src/Module/Directory.php:96 view/theme/vier/theme.php:174
|
#: src/Module/Directory.php:97 view/theme/vier/theme.php:174
|
||||||
msgid "Find"
|
msgid "Find"
|
||||||
msgstr "ابحث"
|
msgstr "ابحث"
|
||||||
|
|
||||||
#: src/Content/Widget.php:80 view/theme/vier/theme.php:176
|
#: src/Content/Widget.php:82 view/theme/vier/theme.php:176
|
||||||
msgid "Similar Interests"
|
msgid "Similar Interests"
|
||||||
msgstr "اهتمامات مشتركة"
|
msgstr "اهتمامات مشتركة"
|
||||||
|
|
||||||
#: src/Content/Widget.php:81 view/theme/vier/theme.php:177
|
#: src/Content/Widget.php:83 view/theme/vier/theme.php:177
|
||||||
msgid "Random Profile"
|
msgid "Random Profile"
|
||||||
msgstr "ملف شخصي عشوائي"
|
msgstr "ملف شخصي عشوائي"
|
||||||
|
|
||||||
#: src/Content/Widget.php:82 view/theme/vier/theme.php:178
|
#: src/Content/Widget.php:84 view/theme/vier/theme.php:178
|
||||||
msgid "Invite Friends"
|
msgid "Invite Friends"
|
||||||
msgstr "دعوة أصدقاء"
|
msgstr "دعوة أصدقاء"
|
||||||
|
|
||||||
#: src/Content/Widget.php:83 src/Module/Directory.php:88
|
#: src/Content/Widget.php:85 src/Module/Directory.php:89
|
||||||
#: view/theme/vier/theme.php:179
|
#: view/theme/vier/theme.php:179
|
||||||
msgid "Global Directory"
|
msgid "Global Directory"
|
||||||
msgstr "الدليل العالمي"
|
msgstr "الدليل العالمي"
|
||||||
|
|
||||||
#: src/Content/Widget.php:85 view/theme/vier/theme.php:181
|
#: src/Content/Widget.php:87 view/theme/vier/theme.php:181
|
||||||
msgid "Local Directory"
|
msgid "Local Directory"
|
||||||
msgstr "الدليل المحلي"
|
msgstr "الدليل المحلي"
|
||||||
|
|
||||||
#: src/Content/Widget.php:207 src/Model/Group.php:570
|
#: src/Content/Widget.php:209 src/Model/Group.php:570
|
||||||
#: src/Module/Contact.php:354 src/Module/Welcome.php:76
|
#: src/Module/Contact.php:354 src/Module/Welcome.php:76
|
||||||
msgid "Groups"
|
msgid "Groups"
|
||||||
msgstr "المجموعات"
|
msgstr "المجموعات"
|
||||||
|
|
||||||
#: src/Content/Widget.php:209
|
#: src/Content/Widget.php:211
|
||||||
msgid "Everyone"
|
msgid "Everyone"
|
||||||
msgstr "الجميع"
|
msgstr "الجميع"
|
||||||
|
|
||||||
#: src/Content/Widget.php:238
|
#: src/Content/Widget.php:240
|
||||||
msgid "Relationships"
|
msgid "Relationships"
|
||||||
msgstr "العلاقات"
|
msgstr "العلاقات"
|
||||||
|
|
||||||
#: src/Content/Widget.php:240 src/Module/Contact.php:306
|
#: src/Content/Widget.php:242 src/Module/Contact.php:306
|
||||||
#: src/Module/Group.php:293
|
#: src/Module/Group.php:293
|
||||||
msgid "All Contacts"
|
msgid "All Contacts"
|
||||||
msgstr "كل المتراسلين"
|
msgstr "كل المتراسلين"
|
||||||
|
|
||||||
#: src/Content/Widget.php:279
|
#: src/Content/Widget.php:281
|
||||||
msgid "Protocols"
|
msgid "Protocols"
|
||||||
msgstr "الموافيق"
|
msgstr "الموافيق"
|
||||||
|
|
||||||
#: src/Content/Widget.php:281
|
#: src/Content/Widget.php:283
|
||||||
msgid "All Protocols"
|
msgid "All Protocols"
|
||||||
msgstr "كل الموافيق"
|
msgstr "كل الموافيق"
|
||||||
|
|
||||||
#: src/Content/Widget.php:309
|
#: src/Content/Widget.php:311
|
||||||
msgid "Saved Folders"
|
msgid "Saved Folders"
|
||||||
msgstr "المجلدات المحفوظة"
|
msgstr "المجلدات المحفوظة"
|
||||||
|
|
||||||
#: src/Content/Widget.php:311 src/Content/Widget.php:342
|
#: src/Content/Widget.php:313 src/Content/Widget.php:344
|
||||||
msgid "Everything"
|
msgid "Everything"
|
||||||
msgstr "كلّ شيء"
|
msgstr "كلّ شيء"
|
||||||
|
|
||||||
#: src/Content/Widget.php:340
|
#: src/Content/Widget.php:342
|
||||||
msgid "Categories"
|
msgid "Categories"
|
||||||
msgstr "الفئات"
|
msgstr "الفئات"
|
||||||
|
|
||||||
#: src/Content/Widget.php:397
|
#: src/Content/Widget.php:399
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%d contact in common"
|
msgid "%d contact in common"
|
||||||
msgid_plural "%d contacts in common"
|
msgid_plural "%d contacts in common"
|
||||||
|
|
@ -3235,23 +2793,27 @@ msgstr[3] "%d متراسلين مشتركين"
|
||||||
msgstr[4] "%d متراسلًا مشتركًا"
|
msgstr[4] "%d متراسلًا مشتركًا"
|
||||||
msgstr[5] "%d متراسل مشترك"
|
msgstr[5] "%d متراسل مشترك"
|
||||||
|
|
||||||
#: src/Content/Widget.php:493
|
#: src/Content/Widget.php:495
|
||||||
msgid "Archives"
|
msgid "Archives"
|
||||||
msgstr "الأرشيفات"
|
msgstr "الأرشيفات"
|
||||||
|
|
||||||
#: src/Content/Widget.php:517
|
#: src/Content/Widget.php:519
|
||||||
msgid "Persons"
|
msgid "Persons"
|
||||||
msgstr "الأشخاص"
|
msgstr "الأشخاص"
|
||||||
|
|
||||||
#: src/Content/Widget.php:518
|
#: src/Content/Widget.php:520
|
||||||
msgid "Organisations"
|
msgid "Organisations"
|
||||||
msgstr "المنظّمات"
|
msgstr "المنظّمات"
|
||||||
|
|
||||||
#: src/Content/Widget.php:519 src/Model/Contact.php:1498
|
#: src/Content/Widget.php:521 src/Model/Contact.php:1537
|
||||||
msgid "News"
|
msgid "News"
|
||||||
msgstr "الأخبار"
|
msgstr "الأخبار"
|
||||||
|
|
||||||
#: src/Content/Widget.php:524 src/Module/Admin/BaseUsers.php:51
|
#: src/Content/Widget.php:525 src/Module/Settings/Account.php:455
|
||||||
|
msgid "Account Types"
|
||||||
|
msgstr "أنواع الحسابات"
|
||||||
|
|
||||||
|
#: src/Content/Widget.php:526 src/Module/Admin/BaseUsers.php:51
|
||||||
msgid "All"
|
msgid "All"
|
||||||
msgstr "الكل"
|
msgstr "الكل"
|
||||||
|
|
||||||
|
|
@ -3309,22 +2871,22 @@ msgstr[5] "الوسوم الشائعة (آخر %d ساعة)"
|
||||||
msgid "More Trending Tags"
|
msgid "More Trending Tags"
|
||||||
msgstr "المزيد من الوسوم الشائعة"
|
msgstr "المزيد من الوسوم الشائعة"
|
||||||
|
|
||||||
#: src/Content/Widget/VCard.php:96 src/Model/Profile.php:373
|
#: src/Content/Widget/VCard.php:102 src/Model/Profile.php:375
|
||||||
#: src/Module/Contact/Profile.php:371 src/Module/Profile/Profile.php:176
|
#: src/Module/Contact/Profile.php:371 src/Module/Profile/Profile.php:176
|
||||||
msgid "XMPP:"
|
msgid "XMPP:"
|
||||||
msgstr "XMPP:"
|
msgstr "XMPP:"
|
||||||
|
|
||||||
#: src/Content/Widget/VCard.php:97 src/Model/Profile.php:374
|
#: src/Content/Widget/VCard.php:103 src/Model/Profile.php:376
|
||||||
#: src/Module/Contact/Profile.php:373 src/Module/Profile/Profile.php:180
|
#: src/Module/Contact/Profile.php:373 src/Module/Profile/Profile.php:180
|
||||||
msgid "Matrix:"
|
msgid "Matrix:"
|
||||||
msgstr "مايتركس:"
|
msgstr "مايتركس:"
|
||||||
|
|
||||||
#: src/Content/Widget/VCard.php:101 src/Model/Profile.php:466
|
#: src/Content/Widget/VCard.php:107 src/Model/Profile.php:468
|
||||||
#: src/Module/Notifications/Introductions.php:199
|
#: src/Module/Notifications/Introductions.php:199
|
||||||
msgid "Network:"
|
msgid "Network:"
|
||||||
msgstr "الشبكة:"
|
msgstr "الشبكة:"
|
||||||
|
|
||||||
#: src/Content/Widget/VCard.php:105 src/Model/Profile.php:456
|
#: src/Content/Widget/VCard.php:111 src/Model/Profile.php:458
|
||||||
msgid "Unfollow"
|
msgid "Unfollow"
|
||||||
msgstr "ألغِ المتابعة"
|
msgstr "ألغِ المتابعة"
|
||||||
|
|
||||||
|
|
@ -3332,8 +2894,8 @@ msgstr "ألغِ المتابعة"
|
||||||
msgid "Yourself"
|
msgid "Yourself"
|
||||||
msgstr "أنت"
|
msgstr "أنت"
|
||||||
|
|
||||||
#: src/Core/ACL.php:201 src/Module/PermissionTooltip.php:112
|
#: src/Core/ACL.php:201 src/Module/PermissionTooltip.php:128
|
||||||
#: src/Module/PermissionTooltip.php:134
|
#: src/Module/PermissionTooltip.php:150
|
||||||
msgid "Mutuals"
|
msgid "Mutuals"
|
||||||
msgstr "المشتركة"
|
msgstr "المشتركة"
|
||||||
|
|
||||||
|
|
@ -3341,7 +2903,8 @@ msgstr "المشتركة"
|
||||||
msgid "Post to Email"
|
msgid "Post to Email"
|
||||||
msgstr "أنشر عبر البريد الإلكتروني"
|
msgstr "أنشر عبر البريد الإلكتروني"
|
||||||
|
|
||||||
#: src/Core/ACL.php:320 src/Module/PermissionTooltip.php:181
|
#: src/Core/ACL.php:320 src/Module/PermissionTooltip.php:85
|
||||||
|
#: src/Module/PermissionTooltip.php:197
|
||||||
msgid "Public"
|
msgid "Public"
|
||||||
msgstr "علني"
|
msgstr "علني"
|
||||||
|
|
||||||
|
|
@ -3351,7 +2914,7 @@ msgid ""
|
||||||
"community pages and by anyone with its link."
|
"community pages and by anyone with its link."
|
||||||
msgstr "سيتم عرض هذا المحتوى لكل متابِعيك ويمكن مشاهدته في صفحات المجتمع ومن قبل أي شخص عبر رابطه."
|
msgstr "سيتم عرض هذا المحتوى لكل متابِعيك ويمكن مشاهدته في صفحات المجتمع ومن قبل أي شخص عبر رابطه."
|
||||||
|
|
||||||
#: src/Core/ACL.php:322
|
#: src/Core/ACL.php:322 src/Module/PermissionTooltip.php:93
|
||||||
msgid "Limited/Private"
|
msgid "Limited/Private"
|
||||||
msgstr "محدود/خاص"
|
msgstr "محدود/خاص"
|
||||||
|
|
||||||
|
|
@ -3685,201 +3248,201 @@ msgstr "قاعدة البيانات قيد الاستخدام."
|
||||||
msgid "Could not connect to database."
|
msgid "Could not connect to database."
|
||||||
msgstr "يتعذر الاتصال بقاعدة البيانات."
|
msgstr "يتعذر الاتصال بقاعدة البيانات."
|
||||||
|
|
||||||
#: src/Core/L10n.php:399 src/Model/Event.php:425
|
#: src/Core/L10n.php:400 src/Model/Event.php:425
|
||||||
#: src/Module/Settings/Display.php:182
|
#: src/Module/Settings/Display.php:182
|
||||||
msgid "Monday"
|
msgid "Monday"
|
||||||
msgstr "الإثنين"
|
msgstr "الإثنين"
|
||||||
|
|
||||||
#: src/Core/L10n.php:399 src/Model/Event.php:426
|
#: src/Core/L10n.php:400 src/Model/Event.php:426
|
||||||
msgid "Tuesday"
|
msgid "Tuesday"
|
||||||
msgstr "الثلاثاء"
|
msgstr "الثلاثاء"
|
||||||
|
|
||||||
#: src/Core/L10n.php:399 src/Model/Event.php:427
|
#: src/Core/L10n.php:400 src/Model/Event.php:427
|
||||||
msgid "Wednesday"
|
msgid "Wednesday"
|
||||||
msgstr "الأربعاء"
|
msgstr "الأربعاء"
|
||||||
|
|
||||||
#: src/Core/L10n.php:399 src/Model/Event.php:428
|
#: src/Core/L10n.php:400 src/Model/Event.php:428
|
||||||
msgid "Thursday"
|
msgid "Thursday"
|
||||||
msgstr "الخميس"
|
msgstr "الخميس"
|
||||||
|
|
||||||
#: src/Core/L10n.php:399 src/Model/Event.php:429
|
#: src/Core/L10n.php:400 src/Model/Event.php:429
|
||||||
msgid "Friday"
|
msgid "Friday"
|
||||||
msgstr "الجمعة"
|
msgstr "الجمعة"
|
||||||
|
|
||||||
#: src/Core/L10n.php:399 src/Model/Event.php:430
|
#: src/Core/L10n.php:400 src/Model/Event.php:430
|
||||||
msgid "Saturday"
|
msgid "Saturday"
|
||||||
msgstr "السبت"
|
msgstr "السبت"
|
||||||
|
|
||||||
#: src/Core/L10n.php:399 src/Model/Event.php:424
|
#: src/Core/L10n.php:400 src/Model/Event.php:424
|
||||||
#: src/Module/Settings/Display.php:182
|
#: src/Module/Settings/Display.php:182
|
||||||
msgid "Sunday"
|
msgid "Sunday"
|
||||||
msgstr "الأحد"
|
msgstr "الأحد"
|
||||||
|
|
||||||
#: src/Core/L10n.php:403 src/Model/Event.php:445
|
#: src/Core/L10n.php:404 src/Model/Event.php:445
|
||||||
msgid "January"
|
msgid "January"
|
||||||
msgstr "جانفي"
|
msgstr "جانفي"
|
||||||
|
|
||||||
#: src/Core/L10n.php:403 src/Model/Event.php:446
|
#: src/Core/L10n.php:404 src/Model/Event.php:446
|
||||||
msgid "February"
|
msgid "February"
|
||||||
msgstr "فيفري"
|
msgstr "فيفري"
|
||||||
|
|
||||||
#: src/Core/L10n.php:403 src/Model/Event.php:447
|
#: src/Core/L10n.php:404 src/Model/Event.php:447
|
||||||
msgid "March"
|
msgid "March"
|
||||||
msgstr "مارس"
|
msgstr "مارس"
|
||||||
|
|
||||||
#: src/Core/L10n.php:403 src/Model/Event.php:448
|
#: src/Core/L10n.php:404 src/Model/Event.php:448
|
||||||
msgid "April"
|
msgid "April"
|
||||||
msgstr "أفريل"
|
msgstr "أفريل"
|
||||||
|
|
||||||
#: src/Core/L10n.php:403 src/Core/L10n.php:423 src/Model/Event.php:436
|
#: src/Core/L10n.php:404 src/Core/L10n.php:424 src/Model/Event.php:436
|
||||||
msgid "May"
|
msgid "May"
|
||||||
msgstr "ماي"
|
msgstr "ماي"
|
||||||
|
|
||||||
#: src/Core/L10n.php:403 src/Model/Event.php:449
|
#: src/Core/L10n.php:404 src/Model/Event.php:449
|
||||||
msgid "June"
|
msgid "June"
|
||||||
msgstr "جوان"
|
msgstr "جوان"
|
||||||
|
|
||||||
#: src/Core/L10n.php:403 src/Model/Event.php:450
|
#: src/Core/L10n.php:404 src/Model/Event.php:450
|
||||||
msgid "July"
|
msgid "July"
|
||||||
msgstr "جويلية"
|
msgstr "جويلية"
|
||||||
|
|
||||||
#: src/Core/L10n.php:403 src/Model/Event.php:451
|
#: src/Core/L10n.php:404 src/Model/Event.php:451
|
||||||
msgid "August"
|
msgid "August"
|
||||||
msgstr "أوت"
|
msgstr "أوت"
|
||||||
|
|
||||||
#: src/Core/L10n.php:403 src/Model/Event.php:452
|
#: src/Core/L10n.php:404 src/Model/Event.php:452
|
||||||
msgid "September"
|
msgid "September"
|
||||||
msgstr "سبتمبر"
|
msgstr "سبتمبر"
|
||||||
|
|
||||||
#: src/Core/L10n.php:403 src/Model/Event.php:453
|
#: src/Core/L10n.php:404 src/Model/Event.php:453
|
||||||
msgid "October"
|
msgid "October"
|
||||||
msgstr "أكتوبر"
|
msgstr "أكتوبر"
|
||||||
|
|
||||||
#: src/Core/L10n.php:403 src/Model/Event.php:454
|
#: src/Core/L10n.php:404 src/Model/Event.php:454
|
||||||
msgid "November"
|
msgid "November"
|
||||||
msgstr "نوفمبر"
|
msgstr "نوفمبر"
|
||||||
|
|
||||||
#: src/Core/L10n.php:403 src/Model/Event.php:455
|
#: src/Core/L10n.php:404 src/Model/Event.php:455
|
||||||
msgid "December"
|
msgid "December"
|
||||||
msgstr "ديسمبر"
|
msgstr "ديسمبر"
|
||||||
|
|
||||||
#: src/Core/L10n.php:419 src/Model/Event.php:417
|
#: src/Core/L10n.php:420 src/Model/Event.php:417
|
||||||
msgid "Mon"
|
msgid "Mon"
|
||||||
msgstr "إث"
|
msgstr "إث"
|
||||||
|
|
||||||
#: src/Core/L10n.php:419 src/Model/Event.php:418
|
#: src/Core/L10n.php:420 src/Model/Event.php:418
|
||||||
msgid "Tue"
|
msgid "Tue"
|
||||||
msgstr "ثلا"
|
msgstr "ثلا"
|
||||||
|
|
||||||
#: src/Core/L10n.php:419 src/Model/Event.php:419
|
#: src/Core/L10n.php:420 src/Model/Event.php:419
|
||||||
msgid "Wed"
|
msgid "Wed"
|
||||||
msgstr "أر"
|
msgstr "أر"
|
||||||
|
|
||||||
#: src/Core/L10n.php:419 src/Model/Event.php:420
|
#: src/Core/L10n.php:420 src/Model/Event.php:420
|
||||||
msgid "Thu"
|
msgid "Thu"
|
||||||
msgstr "خم"
|
msgstr "خم"
|
||||||
|
|
||||||
#: src/Core/L10n.php:419 src/Model/Event.php:421
|
#: src/Core/L10n.php:420 src/Model/Event.php:421
|
||||||
msgid "Fri"
|
msgid "Fri"
|
||||||
msgstr "جم"
|
msgstr "جم"
|
||||||
|
|
||||||
#: src/Core/L10n.php:419 src/Model/Event.php:422
|
#: src/Core/L10n.php:420 src/Model/Event.php:422
|
||||||
msgid "Sat"
|
msgid "Sat"
|
||||||
msgstr "سب"
|
msgstr "سب"
|
||||||
|
|
||||||
#: src/Core/L10n.php:419 src/Model/Event.php:416
|
#: src/Core/L10n.php:420 src/Model/Event.php:416
|
||||||
msgid "Sun"
|
msgid "Sun"
|
||||||
msgstr "أح"
|
msgstr "أح"
|
||||||
|
|
||||||
#: src/Core/L10n.php:423 src/Model/Event.php:432
|
#: src/Core/L10n.php:424 src/Model/Event.php:432
|
||||||
msgid "Jan"
|
msgid "Jan"
|
||||||
msgstr "جا"
|
msgstr "جا"
|
||||||
|
|
||||||
#: src/Core/L10n.php:423 src/Model/Event.php:433
|
#: src/Core/L10n.php:424 src/Model/Event.php:433
|
||||||
msgid "Feb"
|
msgid "Feb"
|
||||||
msgstr "في"
|
msgstr "في"
|
||||||
|
|
||||||
#: src/Core/L10n.php:423 src/Model/Event.php:434
|
#: src/Core/L10n.php:424 src/Model/Event.php:434
|
||||||
msgid "Mar"
|
msgid "Mar"
|
||||||
msgstr "مارس"
|
msgstr "مارس"
|
||||||
|
|
||||||
#: src/Core/L10n.php:423 src/Model/Event.php:435
|
#: src/Core/L10n.php:424 src/Model/Event.php:435
|
||||||
msgid "Apr"
|
msgid "Apr"
|
||||||
msgstr "أف"
|
msgstr "أف"
|
||||||
|
|
||||||
#: src/Core/L10n.php:423 src/Model/Event.php:437
|
#: src/Core/L10n.php:424 src/Model/Event.php:437
|
||||||
msgid "Jun"
|
msgid "Jun"
|
||||||
msgstr "جو"
|
msgstr "جو"
|
||||||
|
|
||||||
#: src/Core/L10n.php:423 src/Model/Event.php:438
|
#: src/Core/L10n.php:424 src/Model/Event.php:438
|
||||||
msgid "Jul"
|
msgid "Jul"
|
||||||
msgstr "جوي"
|
msgstr "جوي"
|
||||||
|
|
||||||
#: src/Core/L10n.php:423 src/Model/Event.php:439
|
#: src/Core/L10n.php:424 src/Model/Event.php:439
|
||||||
msgid "Aug"
|
msgid "Aug"
|
||||||
msgstr "أو"
|
msgstr "أو"
|
||||||
|
|
||||||
#: src/Core/L10n.php:423
|
#: src/Core/L10n.php:424
|
||||||
msgid "Sep"
|
msgid "Sep"
|
||||||
msgstr "سب"
|
msgstr "سب"
|
||||||
|
|
||||||
#: src/Core/L10n.php:423 src/Model/Event.php:441
|
#: src/Core/L10n.php:424 src/Model/Event.php:441
|
||||||
msgid "Oct"
|
msgid "Oct"
|
||||||
msgstr "أك"
|
msgstr "أك"
|
||||||
|
|
||||||
#: src/Core/L10n.php:423 src/Model/Event.php:442
|
#: src/Core/L10n.php:424 src/Model/Event.php:442
|
||||||
msgid "Nov"
|
msgid "Nov"
|
||||||
msgstr "نو"
|
msgstr "نو"
|
||||||
|
|
||||||
#: src/Core/L10n.php:423 src/Model/Event.php:443
|
#: src/Core/L10n.php:424 src/Model/Event.php:443
|
||||||
msgid "Dec"
|
msgid "Dec"
|
||||||
msgstr "دي"
|
msgstr "دي"
|
||||||
|
|
||||||
#: src/Core/L10n.php:442
|
#: src/Core/L10n.php:443
|
||||||
msgid "poke"
|
msgid "poke"
|
||||||
msgstr "ألكز"
|
msgstr "ألكز"
|
||||||
|
|
||||||
#: src/Core/L10n.php:442
|
#: src/Core/L10n.php:443
|
||||||
msgid "poked"
|
msgid "poked"
|
||||||
msgstr "لُكز"
|
msgstr "لُكز"
|
||||||
|
|
||||||
#: src/Core/L10n.php:443
|
#: src/Core/L10n.php:444
|
||||||
msgid "ping"
|
msgid "ping"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Core/L10n.php:443
|
#: src/Core/L10n.php:444
|
||||||
msgid "pinged"
|
msgid "pinged"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Core/L10n.php:444
|
#: src/Core/L10n.php:445
|
||||||
msgid "prod"
|
msgid "prod"
|
||||||
msgstr "انخس"
|
msgstr "انخس"
|
||||||
|
|
||||||
#: src/Core/L10n.php:444
|
#: src/Core/L10n.php:445
|
||||||
msgid "prodded"
|
msgid "prodded"
|
||||||
msgstr "نُخِس"
|
msgstr "نُخِس"
|
||||||
|
|
||||||
#: src/Core/L10n.php:445
|
#: src/Core/L10n.php:446
|
||||||
msgid "slap"
|
msgid "slap"
|
||||||
msgstr "اصفع"
|
msgstr "اصفع"
|
||||||
|
|
||||||
#: src/Core/L10n.php:445
|
#: src/Core/L10n.php:446
|
||||||
msgid "slapped"
|
msgid "slapped"
|
||||||
msgstr "صُفع"
|
msgstr "صُفع"
|
||||||
|
|
||||||
#: src/Core/L10n.php:446
|
#: src/Core/L10n.php:447
|
||||||
msgid "finger"
|
msgid "finger"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Core/L10n.php:446
|
#: src/Core/L10n.php:447
|
||||||
msgid "fingered"
|
msgid "fingered"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Core/L10n.php:447
|
#: src/Core/L10n.php:448
|
||||||
msgid "rebuff"
|
msgid "rebuff"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Core/L10n.php:447
|
#: src/Core/L10n.php:448
|
||||||
msgid "rebuffed"
|
msgid "rebuffed"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
@ -4082,81 +3645,81 @@ msgstr "خطأ داخلي في الخادم"
|
||||||
msgid "Legacy module file not found: %s"
|
msgid "Legacy module file not found: %s"
|
||||||
msgstr "لم يُعثر على ملف الوحدة القديم: %s"
|
msgstr "لم يُعثر على ملف الوحدة القديم: %s"
|
||||||
|
|
||||||
#: src/Model/Contact.php:1084 src/Model/Contact.php:1096
|
#: src/Model/Contact.php:1103 src/Model/Contact.php:1115
|
||||||
msgid "UnFollow"
|
msgid "UnFollow"
|
||||||
msgstr "ألغِ المتابعة"
|
msgstr "ألغِ المتابعة"
|
||||||
|
|
||||||
#: src/Model/Contact.php:1102 src/Module/Admin/Users/Pending.php:107
|
#: src/Model/Contact.php:1121 src/Module/Admin/Users/Pending.php:107
|
||||||
#: src/Module/Notifications/Introductions.php:130
|
#: src/Module/Notifications/Introductions.php:130
|
||||||
#: src/Module/Notifications/Introductions.php:202
|
#: src/Module/Notifications/Introductions.php:202
|
||||||
msgid "Approve"
|
msgid "Approve"
|
||||||
msgstr "موافق"
|
msgstr "موافق"
|
||||||
|
|
||||||
#: src/Model/Contact.php:1494
|
#: src/Model/Contact.php:1533
|
||||||
msgid "Organisation"
|
msgid "Organisation"
|
||||||
msgstr "منظّمة"
|
msgstr "منظّمة"
|
||||||
|
|
||||||
#: src/Model/Contact.php:1502
|
#: src/Model/Contact.php:1541
|
||||||
msgid "Forum"
|
msgid "Forum"
|
||||||
msgstr "منتدى"
|
msgstr "منتدى"
|
||||||
|
|
||||||
#: src/Model/Contact.php:2437
|
#: src/Model/Contact.php:2517
|
||||||
msgid "Disallowed profile URL."
|
msgid "Disallowed profile URL."
|
||||||
msgstr "رابط الملف الشخصي غير المسموح."
|
msgstr "رابط الملف الشخصي غير المسموح."
|
||||||
|
|
||||||
#: src/Model/Contact.php:2442 src/Module/Friendica.php:81
|
#: src/Model/Contact.php:2522 src/Module/Friendica.php:81
|
||||||
msgid "Blocked domain"
|
msgid "Blocked domain"
|
||||||
msgstr "نطاق محجوب"
|
msgstr "نطاق محجوب"
|
||||||
|
|
||||||
#: src/Model/Contact.php:2447
|
#: src/Model/Contact.php:2527
|
||||||
msgid "Connect URL missing."
|
msgid "Connect URL missing."
|
||||||
msgstr "رابط الاتصال مفقود."
|
msgstr "رابط الاتصال مفقود."
|
||||||
|
|
||||||
#: src/Model/Contact.php:2456
|
#: src/Model/Contact.php:2536
|
||||||
msgid ""
|
msgid ""
|
||||||
"The contact could not be added. Please check the relevant network "
|
"The contact could not be added. Please check the relevant network "
|
||||||
"credentials in your Settings -> Social Networks page."
|
"credentials in your Settings -> Social Networks page."
|
||||||
msgstr "تعذر إضافة المتراسل. تحقق من بيانات اعتماد الشبكة المستهدفة في الإعدادات -> صفحة الشبكات الاجتماعية."
|
msgstr "تعذر إضافة المتراسل. تحقق من بيانات اعتماد الشبكة المستهدفة في الإعدادات -> صفحة الشبكات الاجتماعية."
|
||||||
|
|
||||||
#: src/Model/Contact.php:2493
|
#: src/Model/Contact.php:2578
|
||||||
msgid "The profile address specified does not provide adequate information."
|
msgid "The profile address specified does not provide adequate information."
|
||||||
msgstr "عنوان الملف الشخصي لا يوفر معلومات كافية."
|
msgstr "عنوان الملف الشخصي لا يوفر معلومات كافية."
|
||||||
|
|
||||||
#: src/Model/Contact.php:2495
|
#: src/Model/Contact.php:2580
|
||||||
msgid "No compatible communication protocols or feeds were discovered."
|
msgid "No compatible communication protocols or feeds were discovered."
|
||||||
msgstr "لم تكتشف أي موافيق اتصال أو تغذيات متوافقة."
|
msgstr "لم تكتشف أي موافيق اتصال أو تغذيات متوافقة."
|
||||||
|
|
||||||
#: src/Model/Contact.php:2498
|
#: src/Model/Contact.php:2583
|
||||||
msgid "An author or name was not found."
|
msgid "An author or name was not found."
|
||||||
msgstr "لم يُعثر على الكاتب أو اسمه."
|
msgstr "لم يُعثر على الكاتب أو اسمه."
|
||||||
|
|
||||||
#: src/Model/Contact.php:2501
|
#: src/Model/Contact.php:2586
|
||||||
msgid "No browser URL could be matched to this address."
|
msgid "No browser URL could be matched to this address."
|
||||||
msgstr "لا يوجد رابط يطابق هذا العنوان."
|
msgstr "لا يوجد رابط يطابق هذا العنوان."
|
||||||
|
|
||||||
#: src/Model/Contact.php:2504
|
#: src/Model/Contact.php:2589
|
||||||
msgid ""
|
msgid ""
|
||||||
"Unable to match @-style Identity Address with a known protocol or email "
|
"Unable to match @-style Identity Address with a known protocol or email "
|
||||||
"contact."
|
"contact."
|
||||||
msgstr "غير قادر على مطابقة عنوان المعرف \"@\" بميفاق معروف أو متراسل بريد إلكتروني."
|
msgstr "غير قادر على مطابقة عنوان المعرف \"@\" بميفاق معروف أو متراسل بريد إلكتروني."
|
||||||
|
|
||||||
#: src/Model/Contact.php:2505
|
#: src/Model/Contact.php:2590
|
||||||
msgid "Use mailto: in front of address to force email check."
|
msgid "Use mailto: in front of address to force email check."
|
||||||
msgstr "استخدم mailto: أمام العنوان للتعرّف عليه كبريد إلكتروني."
|
msgstr "استخدم mailto: أمام العنوان للتعرّف عليه كبريد إلكتروني."
|
||||||
|
|
||||||
#: src/Model/Contact.php:2511
|
#: src/Model/Contact.php:2596
|
||||||
msgid ""
|
msgid ""
|
||||||
"The profile address specified belongs to a network which has been disabled "
|
"The profile address specified belongs to a network which has been disabled "
|
||||||
"on this site."
|
"on this site."
|
||||||
msgstr "عنوان الملف الشخصي تابع لشبكة محجوبة في هذا الموقع."
|
msgstr "عنوان الملف الشخصي تابع لشبكة محجوبة في هذا الموقع."
|
||||||
|
|
||||||
#: src/Model/Contact.php:2516
|
#: src/Model/Contact.php:2601
|
||||||
msgid ""
|
msgid ""
|
||||||
"Limited profile. This person will be unable to receive direct/personal "
|
"Limited profile. This person will be unable to receive direct/personal "
|
||||||
"notifications from you."
|
"notifications from you."
|
||||||
msgstr "ملف شخصي محدود. لن يتمكن هذا الشخص من تلقي تنبيهات مباشرة/شخصية."
|
msgstr "ملف شخصي محدود. لن يتمكن هذا الشخص من تلقي تنبيهات مباشرة/شخصية."
|
||||||
|
|
||||||
#: src/Model/Contact.php:2575
|
#: src/Model/Contact.php:2660
|
||||||
msgid "Unable to retrieve contact information."
|
msgid "Unable to retrieve contact information."
|
||||||
msgstr "تعذر جلب معلومات المتراسل."
|
msgstr "تعذر جلب معلومات المتراسل."
|
||||||
|
|
||||||
|
|
@ -4276,33 +3839,58 @@ msgstr "اسم المجموعة: "
|
||||||
msgid "Edit groups"
|
msgid "Edit groups"
|
||||||
msgstr "عدّل المجموعات"
|
msgstr "عدّل المجموعات"
|
||||||
|
|
||||||
#: src/Model/Item.php:1764
|
#: src/Model/Item.php:1795
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Detected languages in this post:\\n%s"
|
msgid "Detected languages in this post:\\n%s"
|
||||||
msgstr "اللغات المكتشفة في هذه المشاركة:\\n%s"
|
msgstr "اللغات المكتشفة في هذه المشاركة:\\n%s"
|
||||||
|
|
||||||
#: src/Model/Item.php:2672
|
#: src/Model/Item.php:2701
|
||||||
msgid "activity"
|
msgid "activity"
|
||||||
msgstr "النشاط"
|
msgstr "النشاط"
|
||||||
|
|
||||||
#: src/Model/Item.php:2674
|
#: src/Model/Item.php:2703
|
||||||
msgid "comment"
|
msgid "comment"
|
||||||
msgstr "تعليق"
|
msgstr "تعليق"
|
||||||
|
|
||||||
#: src/Model/Item.php:2677
|
#: src/Model/Item.php:2706
|
||||||
msgid "post"
|
msgid "post"
|
||||||
msgstr "مشاركة"
|
msgstr "مشاركة"
|
||||||
|
|
||||||
#: src/Model/Item.php:2814
|
#: src/Model/Item.php:2821
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Content warning: %s"
|
msgid "Content warning: %s"
|
||||||
msgstr "تحذير من المحتوى: %s"
|
msgstr "تحذير من المحتوى: %s"
|
||||||
|
|
||||||
#: src/Model/Item.php:3164
|
#: src/Model/Item.php:3180
|
||||||
msgid "bytes"
|
msgid "bytes"
|
||||||
msgstr "بايت"
|
msgstr "بايت"
|
||||||
|
|
||||||
#: src/Model/Item.php:3193 src/Model/Item.php:3194
|
#: src/Model/Item.php:3214
|
||||||
|
#, php-format
|
||||||
|
msgid "%s (%d%s, %d votes)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Model/Item.php:3216
|
||||||
|
#, php-format
|
||||||
|
msgid "%s (%d votes)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Model/Item.php:3221
|
||||||
|
#, php-format
|
||||||
|
msgid "%d voters. Poll end: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Model/Item.php:3223
|
||||||
|
#, php-format
|
||||||
|
msgid "%d voters."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Model/Item.php:3225
|
||||||
|
#, php-format
|
||||||
|
msgid "Poll end: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Model/Item.php:3259 src/Model/Item.php:3260
|
||||||
msgid "View on separate page"
|
msgid "View on separate page"
|
||||||
msgstr "اعرضه في صفحة منفصلة"
|
msgstr "اعرضه في صفحة منفصلة"
|
||||||
|
|
||||||
|
|
@ -4310,215 +3898,215 @@ msgstr "اعرضه في صفحة منفصلة"
|
||||||
msgid "[no subject]"
|
msgid "[no subject]"
|
||||||
msgstr "[بدون موضوع]"
|
msgstr "[بدون موضوع]"
|
||||||
|
|
||||||
#: src/Model/Profile.php:356 src/Module/Profile/Profile.php:256
|
#: src/Model/Profile.php:358 src/Module/Profile/Profile.php:256
|
||||||
#: src/Module/Profile/Profile.php:258
|
#: src/Module/Profile/Profile.php:258
|
||||||
msgid "Edit profile"
|
msgid "Edit profile"
|
||||||
msgstr "عدّل الملف الشخصي"
|
msgstr "عدّل الملف الشخصي"
|
||||||
|
|
||||||
#: src/Model/Profile.php:358
|
#: src/Model/Profile.php:360
|
||||||
msgid "Change profile photo"
|
msgid "Change profile photo"
|
||||||
msgstr "غير صورة الملف الشخصي"
|
msgstr "غير صورة الملف الشخصي"
|
||||||
|
|
||||||
#: src/Model/Profile.php:371 src/Module/Directory.php:152
|
#: src/Model/Profile.php:373 src/Module/Directory.php:153
|
||||||
#: src/Module/Profile/Profile.php:184
|
#: src/Module/Profile/Profile.php:184
|
||||||
msgid "Homepage:"
|
msgid "Homepage:"
|
||||||
msgstr "الصفحة رئيسية:"
|
msgstr "الصفحة رئيسية:"
|
||||||
|
|
||||||
#: src/Model/Profile.php:372 src/Module/Contact/Profile.php:375
|
#: src/Model/Profile.php:374 src/Module/Contact/Profile.php:375
|
||||||
#: src/Module/Notifications/Introductions.php:187
|
#: src/Module/Notifications/Introductions.php:187
|
||||||
msgid "About:"
|
msgid "About:"
|
||||||
msgstr "حول:"
|
msgstr "حول:"
|
||||||
|
|
||||||
#: src/Model/Profile.php:458
|
#: src/Model/Profile.php:460
|
||||||
msgid "Atom feed"
|
msgid "Atom feed"
|
||||||
msgstr "تغذية Atom"
|
msgstr "تغذية Atom"
|
||||||
|
|
||||||
#: src/Model/Profile.php:502
|
#: src/Model/Profile.php:504
|
||||||
msgid "F d"
|
msgid "F d"
|
||||||
msgstr "F d"
|
msgstr "F d"
|
||||||
|
|
||||||
#: src/Model/Profile.php:566 src/Model/Profile.php:650
|
#: src/Model/Profile.php:568 src/Model/Profile.php:652
|
||||||
msgid "[today]"
|
msgid "[today]"
|
||||||
msgstr "[اليوم]"
|
msgstr "[اليوم]"
|
||||||
|
|
||||||
#: src/Model/Profile.php:575
|
#: src/Model/Profile.php:577
|
||||||
msgid "Birthday Reminders"
|
msgid "Birthday Reminders"
|
||||||
msgstr "التذكير أبعياد الميلاد"
|
msgstr "التذكير أبعياد الميلاد"
|
||||||
|
|
||||||
#: src/Model/Profile.php:576
|
#: src/Model/Profile.php:578
|
||||||
msgid "Birthdays this week:"
|
msgid "Birthdays this week:"
|
||||||
msgstr "أعياد ميلاد لهذا الأسبوع:"
|
msgstr "أعياد ميلاد لهذا الأسبوع:"
|
||||||
|
|
||||||
#: src/Model/Profile.php:599
|
#: src/Model/Profile.php:601
|
||||||
msgid "g A l F d"
|
msgid "g A l F d"
|
||||||
msgstr "g A l F d"
|
msgstr "g A l F d"
|
||||||
|
|
||||||
#: src/Model/Profile.php:637
|
#: src/Model/Profile.php:639
|
||||||
msgid "[No description]"
|
msgid "[No description]"
|
||||||
msgstr "[بدون وصف]"
|
msgstr "[بدون وصف]"
|
||||||
|
|
||||||
#: src/Model/Profile.php:663
|
#: src/Model/Profile.php:665
|
||||||
msgid "Event Reminders"
|
msgid "Event Reminders"
|
||||||
msgstr "التذكير بالأحداث"
|
msgstr "التذكير بالأحداث"
|
||||||
|
|
||||||
#: src/Model/Profile.php:664
|
#: src/Model/Profile.php:666
|
||||||
msgid "Upcoming events the next 7 days:"
|
msgid "Upcoming events the next 7 days:"
|
||||||
msgstr "أحداث لهذا الأسبوع:"
|
msgstr "أحداث لهذا الأسبوع:"
|
||||||
|
|
||||||
#: src/Model/Profile.php:852
|
#: src/Model/Profile.php:854
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "OpenWebAuth: %1$s welcomes %2$s"
|
msgid "OpenWebAuth: %1$s welcomes %2$s"
|
||||||
msgstr "OpenWebAuth: %1$s يرحب بـ %2$s"
|
msgstr "OpenWebAuth: %1$s يرحب بـ %2$s"
|
||||||
|
|
||||||
#: src/Model/Profile.php:984
|
#: src/Model/Profile.php:980
|
||||||
msgid "Hometown:"
|
msgid "Hometown:"
|
||||||
msgstr "المدينة:"
|
msgstr "المدينة:"
|
||||||
|
|
||||||
#: src/Model/Profile.php:985
|
#: src/Model/Profile.php:981
|
||||||
msgid "Marital Status:"
|
msgid "Marital Status:"
|
||||||
msgstr "الحالة الاجتماعية:"
|
msgstr "الحالة الاجتماعية:"
|
||||||
|
|
||||||
#: src/Model/Profile.php:986
|
#: src/Model/Profile.php:982
|
||||||
msgid "With:"
|
msgid "With:"
|
||||||
msgstr "مع:"
|
msgstr "مع:"
|
||||||
|
|
||||||
#: src/Model/Profile.php:987
|
#: src/Model/Profile.php:983
|
||||||
msgid "Since:"
|
msgid "Since:"
|
||||||
msgstr "منذ:"
|
msgstr "منذ:"
|
||||||
|
|
||||||
#: src/Model/Profile.php:988
|
#: src/Model/Profile.php:984
|
||||||
msgid "Sexual Preference:"
|
msgid "Sexual Preference:"
|
||||||
msgstr "التفضيل الجنسي:"
|
msgstr "التفضيل الجنسي:"
|
||||||
|
|
||||||
#: src/Model/Profile.php:989
|
#: src/Model/Profile.php:985
|
||||||
msgid "Political Views:"
|
msgid "Political Views:"
|
||||||
msgstr "الآراء السياسية:"
|
msgstr "الآراء السياسية:"
|
||||||
|
|
||||||
#: src/Model/Profile.php:990
|
#: src/Model/Profile.php:986
|
||||||
msgid "Religious Views:"
|
msgid "Religious Views:"
|
||||||
msgstr "الآراء الدينية:"
|
msgstr "الآراء الدينية:"
|
||||||
|
|
||||||
#: src/Model/Profile.php:991
|
#: src/Model/Profile.php:987
|
||||||
msgid "Likes:"
|
msgid "Likes:"
|
||||||
msgstr "أعجبني:"
|
msgstr "أعجبني:"
|
||||||
|
|
||||||
#: src/Model/Profile.php:992
|
#: src/Model/Profile.php:988
|
||||||
msgid "Dislikes:"
|
msgid "Dislikes:"
|
||||||
msgstr "لم يعجبني:"
|
msgstr "لم يعجبني:"
|
||||||
|
|
||||||
#: src/Model/Profile.php:993
|
#: src/Model/Profile.php:989
|
||||||
msgid "Title/Description:"
|
msgid "Title/Description:"
|
||||||
msgstr "العنوان/الوصف:"
|
msgstr "العنوان/الوصف:"
|
||||||
|
|
||||||
#: src/Model/Profile.php:994 src/Module/Admin/Summary.php:233
|
#: src/Model/Profile.php:990 src/Module/Admin/Summary.php:234
|
||||||
msgid "Summary"
|
msgid "Summary"
|
||||||
msgstr "موجز"
|
msgstr "موجز"
|
||||||
|
|
||||||
#: src/Model/Profile.php:995
|
#: src/Model/Profile.php:991
|
||||||
msgid "Musical interests"
|
msgid "Musical interests"
|
||||||
msgstr "الموسيقى المفضلة"
|
msgstr "الموسيقى المفضلة"
|
||||||
|
|
||||||
#: src/Model/Profile.php:996
|
#: src/Model/Profile.php:992
|
||||||
msgid "Books, literature"
|
msgid "Books, literature"
|
||||||
msgstr "الكتب والأدب"
|
msgstr "الكتب والأدب"
|
||||||
|
|
||||||
#: src/Model/Profile.php:997
|
#: src/Model/Profile.php:993
|
||||||
msgid "Television"
|
msgid "Television"
|
||||||
msgstr "العروض التلفزيونة"
|
msgstr "العروض التلفزيونة"
|
||||||
|
|
||||||
#: src/Model/Profile.php:998
|
#: src/Model/Profile.php:994
|
||||||
msgid "Film/dance/culture/entertainment"
|
msgid "Film/dance/culture/entertainment"
|
||||||
msgstr "أفلام/رقص/ثقافة/ترفيه"
|
msgstr "أفلام/رقص/ثقافة/ترفيه"
|
||||||
|
|
||||||
#: src/Model/Profile.php:999
|
#: src/Model/Profile.php:995
|
||||||
msgid "Hobbies/Interests"
|
msgid "Hobbies/Interests"
|
||||||
msgstr "الهوايات/الاهتمامات"
|
msgstr "الهوايات/الاهتمامات"
|
||||||
|
|
||||||
#: src/Model/Profile.php:1000
|
#: src/Model/Profile.php:996
|
||||||
msgid "Love/romance"
|
msgid "Love/romance"
|
||||||
msgstr "الحب/الرومانسية"
|
msgstr "الحب/الرومانسية"
|
||||||
|
|
||||||
#: src/Model/Profile.php:1001
|
#: src/Model/Profile.php:997
|
||||||
msgid "Work/employment"
|
msgid "Work/employment"
|
||||||
msgstr "العمل/التوظيف"
|
msgstr "العمل/التوظيف"
|
||||||
|
|
||||||
#: src/Model/Profile.php:1002
|
#: src/Model/Profile.php:998
|
||||||
msgid "School/education"
|
msgid "School/education"
|
||||||
msgstr "المدرسة/التعليم"
|
msgstr "المدرسة/التعليم"
|
||||||
|
|
||||||
#: src/Model/Profile.php:1003
|
#: src/Model/Profile.php:999
|
||||||
msgid "Contact information and Social Networks"
|
msgid "Contact information and Social Networks"
|
||||||
msgstr "معلومات الاتصال وحسابات الشبكات الاجتماعية"
|
msgstr "معلومات الاتصال وحسابات الشبكات الاجتماعية"
|
||||||
|
|
||||||
#: src/Model/User.php:208 src/Model/User.php:1056
|
#: src/Model/User.php:210 src/Model/User.php:1058
|
||||||
msgid "SERIOUS ERROR: Generation of security keys failed."
|
msgid "SERIOUS ERROR: Generation of security keys failed."
|
||||||
msgstr "خطأ قاتل: فشل توليد مفاتيح الأمان."
|
msgstr "خطأ قاتل: فشل توليد مفاتيح الأمان."
|
||||||
|
|
||||||
#: src/Model/User.php:568 src/Model/User.php:601
|
#: src/Model/User.php:570 src/Model/User.php:603
|
||||||
msgid "Login failed"
|
msgid "Login failed"
|
||||||
msgstr "فشل الولوج"
|
msgstr "فشل الولوج"
|
||||||
|
|
||||||
#: src/Model/User.php:633
|
#: src/Model/User.php:635
|
||||||
msgid "Not enough information to authenticate"
|
msgid "Not enough information to authenticate"
|
||||||
msgstr "لا توجد معلومات كافية للاستيثاق"
|
msgstr "لا توجد معلومات كافية للاستيثاق"
|
||||||
|
|
||||||
#: src/Model/User.php:728
|
#: src/Model/User.php:730
|
||||||
msgid "Password can't be empty"
|
msgid "Password can't be empty"
|
||||||
msgstr "لا يمكن أن تكون كلمة المرور فارغة"
|
msgstr "لا يمكن أن تكون كلمة المرور فارغة"
|
||||||
|
|
||||||
#: src/Model/User.php:747
|
#: src/Model/User.php:749
|
||||||
msgid "Empty passwords are not allowed."
|
msgid "Empty passwords are not allowed."
|
||||||
msgstr "لا يسمح بكلمات مرور فارغة."
|
msgstr "لا يسمح بكلمات مرور فارغة."
|
||||||
|
|
||||||
#: src/Model/User.php:751
|
#: src/Model/User.php:753
|
||||||
msgid ""
|
msgid ""
|
||||||
"The new password has been exposed in a public data dump, please choose "
|
"The new password has been exposed in a public data dump, please choose "
|
||||||
"another."
|
"another."
|
||||||
msgstr "كلمة المرور الجديدة جزء من تسريب بيانات علني ، يرجى اختيار كلمة مرور مختلفة."
|
msgstr "كلمة المرور الجديدة جزء من تسريب بيانات علني ، يرجى اختيار كلمة مرور مختلفة."
|
||||||
|
|
||||||
#: src/Model/User.php:757
|
#: src/Model/User.php:759
|
||||||
msgid ""
|
msgid ""
|
||||||
"The password can't contain accentuated letters, white spaces or colons (:)"
|
"The password can't contain accentuated letters, white spaces or colons (:)"
|
||||||
msgstr "لا يمكن أن تحتوي كلمة المرور على أحرف منبورة أو مسافات أو نقطتي تفسير (:)"
|
msgstr "لا يمكن أن تحتوي كلمة المرور على أحرف منبورة أو مسافات أو نقطتي تفسير (:)"
|
||||||
|
|
||||||
#: src/Model/User.php:936
|
#: src/Model/User.php:938
|
||||||
msgid "Passwords do not match. Password unchanged."
|
msgid "Passwords do not match. Password unchanged."
|
||||||
msgstr "كلمتا المرور غير متطابقتين. لم تغيَّر كلمة المرور."
|
msgstr "كلمتا المرور غير متطابقتين. لم تغيَّر كلمة المرور."
|
||||||
|
|
||||||
#: src/Model/User.php:943
|
#: src/Model/User.php:945
|
||||||
msgid "An invitation is required."
|
msgid "An invitation is required."
|
||||||
msgstr "الدعوة إلزامية."
|
msgstr "الدعوة إلزامية."
|
||||||
|
|
||||||
#: src/Model/User.php:947
|
#: src/Model/User.php:949
|
||||||
msgid "Invitation could not be verified."
|
msgid "Invitation could not be verified."
|
||||||
msgstr "تعذر التحقق من الدعوة."
|
msgstr "تعذر التحقق من الدعوة."
|
||||||
|
|
||||||
#: src/Model/User.php:955
|
#: src/Model/User.php:957
|
||||||
msgid "Invalid OpenID url"
|
msgid "Invalid OpenID url"
|
||||||
msgstr "رابط OpenID عير صالح"
|
msgstr "رابط OpenID عير صالح"
|
||||||
|
|
||||||
#: src/Model/User.php:968 src/Security/Authentication.php:235
|
#: src/Model/User.php:970 src/Security/Authentication.php:235
|
||||||
msgid ""
|
msgid ""
|
||||||
"We encountered a problem while logging in with the OpenID you provided. "
|
"We encountered a problem while logging in with the OpenID you provided. "
|
||||||
"Please check the correct spelling of the ID."
|
"Please check the correct spelling of the ID."
|
||||||
msgstr "واجهنا مشكلة أثناء الولوج باستخدام OpenID. يرجى التحقق من صحة المعرف."
|
msgstr "واجهنا مشكلة أثناء الولوج باستخدام OpenID. يرجى التحقق من صحة المعرف."
|
||||||
|
|
||||||
#: src/Model/User.php:968 src/Security/Authentication.php:235
|
#: src/Model/User.php:970 src/Security/Authentication.php:235
|
||||||
msgid "The error message was:"
|
msgid "The error message was:"
|
||||||
msgstr "رسالة الخطأ:"
|
msgstr "رسالة الخطأ:"
|
||||||
|
|
||||||
#: src/Model/User.php:974
|
#: src/Model/User.php:976
|
||||||
msgid "Please enter the required information."
|
msgid "Please enter the required information."
|
||||||
msgstr "رجاءً أدخل المعلومات المطلوبة."
|
msgstr "رجاءً أدخل المعلومات المطلوبة."
|
||||||
|
|
||||||
#: src/Model/User.php:988
|
#: src/Model/User.php:990
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"system.username_min_length (%s) and system.username_max_length (%s) are "
|
"system.username_min_length (%s) and system.username_max_length (%s) are "
|
||||||
"excluding each other, swapping values."
|
"excluding each other, swapping values."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/User.php:995
|
#: src/Model/User.php:997
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Username should be at least %s character."
|
msgid "Username should be at least %s character."
|
||||||
msgid_plural "Username should be at least %s characters."
|
msgid_plural "Username should be at least %s characters."
|
||||||
|
|
@ -4529,7 +4117,7 @@ msgstr[3] "يجب أن لا يقل اسم المستخدم عن %s محارف."
|
||||||
msgstr[4] "يجب أن لا يقل اسم المستخدم عن %s محرف."
|
msgstr[4] "يجب أن لا يقل اسم المستخدم عن %s محرف."
|
||||||
msgstr[5] "يجب أن لا يقل اسم المستخدم عن %s محرف."
|
msgstr[5] "يجب أن لا يقل اسم المستخدم عن %s محرف."
|
||||||
|
|
||||||
#: src/Model/User.php:999
|
#: src/Model/User.php:1001
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Username should be at most %s character."
|
msgid "Username should be at most %s character."
|
||||||
msgid_plural "Username should be at most %s characters."
|
msgid_plural "Username should be at most %s characters."
|
||||||
|
|
@ -4540,60 +4128,60 @@ msgstr[3] "يجب أن لا يزيد اسم المستخدم عن %s محارف.
|
||||||
msgstr[4] "يجب أن لا يزيد اسم المستخدم عن %s محرف."
|
msgstr[4] "يجب أن لا يزيد اسم المستخدم عن %s محرف."
|
||||||
msgstr[5] "يجب أن لا يزيد اسم المستخدم عن %s محرف."
|
msgstr[5] "يجب أن لا يزيد اسم المستخدم عن %s محرف."
|
||||||
|
|
||||||
#: src/Model/User.php:1007
|
#: src/Model/User.php:1009
|
||||||
msgid "That doesn't appear to be your full (First Last) name."
|
msgid "That doesn't appear to be your full (First Last) name."
|
||||||
msgstr "لا يبدو أن هذا اسمك الكامل."
|
msgstr "لا يبدو أن هذا اسمك الكامل."
|
||||||
|
|
||||||
#: src/Model/User.php:1012
|
#: src/Model/User.php:1014
|
||||||
msgid "Your email domain is not among those allowed on this site."
|
msgid "Your email domain is not among those allowed on this site."
|
||||||
msgstr "نطاق بريدك الإلكتروني غير مسموح به على هذا الموقع."
|
msgstr "نطاق بريدك الإلكتروني غير مسموح به على هذا الموقع."
|
||||||
|
|
||||||
#: src/Model/User.php:1016
|
#: src/Model/User.php:1018
|
||||||
msgid "Not a valid email address."
|
msgid "Not a valid email address."
|
||||||
msgstr "عنوان البريد الإلكتروني غير صالح."
|
msgstr "عنوان البريد الإلكتروني غير صالح."
|
||||||
|
|
||||||
#: src/Model/User.php:1019
|
#: src/Model/User.php:1021
|
||||||
msgid "The nickname was blocked from registration by the nodes admin."
|
msgid "The nickname was blocked from registration by the nodes admin."
|
||||||
msgstr "هذا اللقب محظور من قبل مدير العقدة."
|
msgstr "هذا اللقب محظور من قبل مدير العقدة."
|
||||||
|
|
||||||
#: src/Model/User.php:1023 src/Model/User.php:1031
|
#: src/Model/User.php:1025 src/Model/User.php:1033
|
||||||
msgid "Cannot use that email."
|
msgid "Cannot use that email."
|
||||||
msgstr "لا يمكن استخدام هذا البريد الإلكتروني."
|
msgstr "لا يمكن استخدام هذا البريد الإلكتروني."
|
||||||
|
|
||||||
#: src/Model/User.php:1038
|
#: src/Model/User.php:1040
|
||||||
msgid "Your nickname can only contain a-z, 0-9 and _."
|
msgid "Your nickname can only contain a-z, 0-9 and _."
|
||||||
msgstr "يجب أن يتكون اللقب من المحارف a-z، 0-9، _."
|
msgstr "يجب أن يتكون اللقب من المحارف a-z، 0-9، _."
|
||||||
|
|
||||||
#: src/Model/User.php:1046 src/Model/User.php:1103
|
#: src/Model/User.php:1048 src/Model/User.php:1105
|
||||||
msgid "Nickname is already registered. Please choose another."
|
msgid "Nickname is already registered. Please choose another."
|
||||||
msgstr "هذا اللقب محجوز. اختر لقبًا آخر."
|
msgstr "هذا اللقب محجوز. اختر لقبًا آخر."
|
||||||
|
|
||||||
#: src/Model/User.php:1090 src/Model/User.php:1094
|
#: src/Model/User.php:1092 src/Model/User.php:1096
|
||||||
msgid "An error occurred during registration. Please try again."
|
msgid "An error occurred during registration. Please try again."
|
||||||
msgstr "حدث خطأ أثناء التسجيل، رجاء حاول مرة أخرى."
|
msgstr "حدث خطأ أثناء التسجيل، رجاء حاول مرة أخرى."
|
||||||
|
|
||||||
#: src/Model/User.php:1117
|
#: src/Model/User.php:1119
|
||||||
msgid "An error occurred creating your default profile. Please try again."
|
msgid "An error occurred creating your default profile. Please try again."
|
||||||
msgstr "حدث خطأ أثناء إنشاء الملف الشخصي الافتراضي، رجاء حاول مرة أخرى."
|
msgstr "حدث خطأ أثناء إنشاء الملف الشخصي الافتراضي، رجاء حاول مرة أخرى."
|
||||||
|
|
||||||
#: src/Model/User.php:1124
|
#: src/Model/User.php:1126
|
||||||
msgid "An error occurred creating your self contact. Please try again."
|
msgid "An error occurred creating your self contact. Please try again."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/User.php:1129
|
#: src/Model/User.php:1131
|
||||||
msgid "Friends"
|
msgid "Friends"
|
||||||
msgstr "الأصدقاء"
|
msgstr "الأصدقاء"
|
||||||
|
|
||||||
#: src/Model/User.php:1133
|
#: src/Model/User.php:1135
|
||||||
msgid ""
|
msgid ""
|
||||||
"An error occurred creating your default contact group. Please try again."
|
"An error occurred creating your default contact group. Please try again."
|
||||||
msgstr "حدث خطأ أثناء إنشاء مجموعة المتراسلين الافتراضية، رجاء حاول مرة أخرى."
|
msgstr "حدث خطأ أثناء إنشاء مجموعة المتراسلين الافتراضية، رجاء حاول مرة أخرى."
|
||||||
|
|
||||||
#: src/Model/User.php:1171
|
#: src/Model/User.php:1174
|
||||||
msgid "Profile Photos"
|
msgid "Profile Photos"
|
||||||
msgstr "صور الملف الشخصي"
|
msgstr "صور الملف الشخصي"
|
||||||
|
|
||||||
#: src/Model/User.php:1365
|
#: src/Model/User.php:1368
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
|
|
@ -4601,7 +4189,7 @@ msgid ""
|
||||||
"\t\t\tthe administrator of %2$s has set up an account for you."
|
"\t\t\tthe administrator of %2$s has set up an account for you."
|
||||||
msgstr "\n\t\tعزيزي %1$s،\n\t\t\tأنشأ مدير %2$s حساب لك."
|
msgstr "\n\t\tعزيزي %1$s،\n\t\t\tأنشأ مدير %2$s حساب لك."
|
||||||
|
|
||||||
#: src/Model/User.php:1368
|
#: src/Model/User.php:1371
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
|
|
@ -4633,12 +4221,12 @@ msgid ""
|
||||||
"\t\tThank you and welcome to %4$s."
|
"\t\tThank you and welcome to %4$s."
|
||||||
msgstr "\n\t\tتفاصيل تسجيل الولوج هي كالتالي:\n\n\t\tالموقع:\t%1$s\n\t\tاسم المستخدم:\t\t%2$s\n\t\tكلمة المرور:\t%3$s\n\n\t\tيمكنك تغيير كلمة المرور من صفحة إعدادات الحساب.\n\n\t\tيرجى أخذ بضع لحظات لمراجعة الإعدادات الأخرى في تلك الصفحة.\n\n\t\tقد ترغب أيضًا في إضافة بعض المعلومات الأساسية إلى صفحة ملفك الشخصية الافتراضي\n\t\t(من صفحة \"الملفات الشخصية\") حتى يتمكن الآخرون من العثور عليك بسهولة.\n\n\t\tنحن نوصي بوضع اسمك الكامل، إضافة لصورة،\n\t\tوإضافة بعض الكلمات المفتاحية (مفيدة جدا في تكوين صداقات) - و\n\t\tربما البلد الذي تعيش فيه.\n\n\t\tنحن نحترم حقك في الخصوصية احتراما كاملا، ولا ضرورة لأي مما سبق.\n\t\tإذا كنت جديداً ولا تعرف أي شخص هنا، فقد تساعدك هذه المعلومات على تكوين صداقات مثيرة للاهتمام.\n\n\t\tإذا كنت ترغب في حذف حسابك، يمكنك فعل ذلك في %1$s/removeme\n\n\t\tشكرا لك ومرحبًا بك في %4$s."
|
msgstr "\n\t\tتفاصيل تسجيل الولوج هي كالتالي:\n\n\t\tالموقع:\t%1$s\n\t\tاسم المستخدم:\t\t%2$s\n\t\tكلمة المرور:\t%3$s\n\n\t\tيمكنك تغيير كلمة المرور من صفحة إعدادات الحساب.\n\n\t\tيرجى أخذ بضع لحظات لمراجعة الإعدادات الأخرى في تلك الصفحة.\n\n\t\tقد ترغب أيضًا في إضافة بعض المعلومات الأساسية إلى صفحة ملفك الشخصية الافتراضي\n\t\t(من صفحة \"الملفات الشخصية\") حتى يتمكن الآخرون من العثور عليك بسهولة.\n\n\t\tنحن نوصي بوضع اسمك الكامل، إضافة لصورة،\n\t\tوإضافة بعض الكلمات المفتاحية (مفيدة جدا في تكوين صداقات) - و\n\t\tربما البلد الذي تعيش فيه.\n\n\t\tنحن نحترم حقك في الخصوصية احتراما كاملا، ولا ضرورة لأي مما سبق.\n\t\tإذا كنت جديداً ولا تعرف أي شخص هنا، فقد تساعدك هذه المعلومات على تكوين صداقات مثيرة للاهتمام.\n\n\t\tإذا كنت ترغب في حذف حسابك، يمكنك فعل ذلك في %1$s/removeme\n\n\t\tشكرا لك ومرحبًا بك في %4$s."
|
||||||
|
|
||||||
#: src/Model/User.php:1401 src/Model/User.php:1508
|
#: src/Model/User.php:1404 src/Model/User.php:1511
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Registration details for %s"
|
msgid "Registration details for %s"
|
||||||
msgstr "تفاصيل التسجيل لـ %s"
|
msgstr "تفاصيل التسجيل لـ %s"
|
||||||
|
|
||||||
#: src/Model/User.php:1421
|
#: src/Model/User.php:1424
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
|
|
@ -4653,12 +4241,12 @@ msgid ""
|
||||||
"\t\t"
|
"\t\t"
|
||||||
msgstr "\n\t\t\tعزيزي %1$s،\n\t\t\t\tشكرا لك على التسجيل في %2$s. حسابك معلق حتى يوافق عليه المدير.\n\n\t\t\tتفاصيل الولوج هي كالتالي:\n\n\t\t\tالموقع:\t%3$s\n\t\t\tاسم المستخدم:\t\t%4$s\n\t\t\tكلمة المرور:\t\t%5$s\n\t\t\t\t"
|
msgstr "\n\t\t\tعزيزي %1$s،\n\t\t\t\tشكرا لك على التسجيل في %2$s. حسابك معلق حتى يوافق عليه المدير.\n\n\t\t\tتفاصيل الولوج هي كالتالي:\n\n\t\t\tالموقع:\t%3$s\n\t\t\tاسم المستخدم:\t\t%4$s\n\t\t\tكلمة المرور:\t\t%5$s\n\t\t\t\t"
|
||||||
|
|
||||||
#: src/Model/User.php:1440
|
#: src/Model/User.php:1443
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Registration at %s"
|
msgid "Registration at %s"
|
||||||
msgstr "التسجيل في %s"
|
msgstr "التسجيل في %s"
|
||||||
|
|
||||||
#: src/Model/User.php:1464
|
#: src/Model/User.php:1467
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
|
|
@ -4667,7 +4255,7 @@ msgid ""
|
||||||
"\t\t\t"
|
"\t\t\t"
|
||||||
msgstr "\n\t\t\t\t عزيزي %1$s،\n\t\t\t\tشكرا لك على التسجيل في %2$s. نجح إنشاء حسابك.\n\t\t\t\t"
|
msgstr "\n\t\t\t\t عزيزي %1$s،\n\t\t\t\tشكرا لك على التسجيل في %2$s. نجح إنشاء حسابك.\n\t\t\t\t"
|
||||||
|
|
||||||
#: src/Model/User.php:1472
|
#: src/Model/User.php:1475
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
|
|
@ -4728,10 +4316,10 @@ msgstr "فعّل"
|
||||||
#: src/Module/Admin/Blocklist/Contact.php:94
|
#: src/Module/Admin/Blocklist/Contact.php:94
|
||||||
#: src/Module/Admin/Blocklist/Server/Add.php:89
|
#: src/Module/Admin/Blocklist/Server/Add.php:89
|
||||||
#: src/Module/Admin/Blocklist/Server/Index.php:78
|
#: src/Module/Admin/Blocklist/Server/Index.php:78
|
||||||
#: src/Module/Admin/Federation.php:194 src/Module/Admin/Item/Delete.php:64
|
#: src/Module/Admin/Federation.php:196 src/Module/Admin/Item/Delete.php:64
|
||||||
#: src/Module/Admin/Logs/Settings.php:79 src/Module/Admin/Logs/View.php:83
|
#: src/Module/Admin/Logs/Settings.php:79 src/Module/Admin/Logs/View.php:84
|
||||||
#: src/Module/Admin/Queue.php:72 src/Module/Admin/Site.php:498
|
#: src/Module/Admin/Queue.php:72 src/Module/Admin/Site.php:431
|
||||||
#: src/Module/Admin/Storage.php:138 src/Module/Admin/Summary.php:232
|
#: src/Module/Admin/Storage.php:138 src/Module/Admin/Summary.php:233
|
||||||
#: src/Module/Admin/Themes/Details.php:90
|
#: src/Module/Admin/Themes/Details.php:90
|
||||||
#: src/Module/Admin/Themes/Index.php:111 src/Module/Admin/Tos.php:75
|
#: src/Module/Admin/Themes/Index.php:111 src/Module/Admin/Tos.php:75
|
||||||
#: src/Module/Admin/Users/Active.php:136
|
#: src/Module/Admin/Users/Active.php:136
|
||||||
|
|
@ -4821,10 +4409,42 @@ msgstr "حُذف"
|
||||||
msgid "List of pending user deletions"
|
msgid "List of pending user deletions"
|
||||||
msgstr "قائمة الحذف المعلق للمستخدمين"
|
msgstr "قائمة الحذف المعلق للمستخدمين"
|
||||||
|
|
||||||
|
#: src/Module/Admin/BaseUsers.php:100 src/Module/Settings/Account.php:493
|
||||||
|
msgid "Normal Account Page"
|
||||||
|
msgstr "صفحة حساب عادي"
|
||||||
|
|
||||||
|
#: src/Module/Admin/BaseUsers.php:101 src/Module/Settings/Account.php:500
|
||||||
|
msgid "Soapbox Page"
|
||||||
|
msgstr "صفحة سياسي"
|
||||||
|
|
||||||
|
#: src/Module/Admin/BaseUsers.php:102 src/Module/Settings/Account.php:507
|
||||||
|
msgid "Public Forum"
|
||||||
|
msgstr "منتدى عمومي"
|
||||||
|
|
||||||
|
#: src/Module/Admin/BaseUsers.php:103 src/Module/Settings/Account.php:514
|
||||||
|
msgid "Automatic Friend Page"
|
||||||
|
msgstr "صفحة اشترك تلقائي"
|
||||||
|
|
||||||
#: src/Module/Admin/BaseUsers.php:104
|
#: src/Module/Admin/BaseUsers.php:104
|
||||||
msgid "Private Forum"
|
msgid "Private Forum"
|
||||||
msgstr "منتدى خاص"
|
msgstr "منتدى خاص"
|
||||||
|
|
||||||
|
#: src/Module/Admin/BaseUsers.php:107 src/Module/Settings/Account.php:465
|
||||||
|
msgid "Personal Page"
|
||||||
|
msgstr "صفحة شخصية"
|
||||||
|
|
||||||
|
#: src/Module/Admin/BaseUsers.php:108 src/Module/Settings/Account.php:472
|
||||||
|
msgid "Organisation Page"
|
||||||
|
msgstr "صفحة منظمة"
|
||||||
|
|
||||||
|
#: src/Module/Admin/BaseUsers.php:109 src/Module/Settings/Account.php:479
|
||||||
|
msgid "News Page"
|
||||||
|
msgstr "صفحة إخبارية"
|
||||||
|
|
||||||
|
#: src/Module/Admin/BaseUsers.php:110 src/Module/Settings/Account.php:486
|
||||||
|
msgid "Community Forum"
|
||||||
|
msgstr "منتدى مجتمعي"
|
||||||
|
|
||||||
#: src/Module/Admin/BaseUsers.php:111
|
#: src/Module/Admin/BaseUsers.php:111
|
||||||
msgid "Relay"
|
msgid "Relay"
|
||||||
msgstr "مُرحِل"
|
msgstr "مُرحِل"
|
||||||
|
|
@ -5160,65 +4780,65 @@ msgstr "أقفل ميزة %s"
|
||||||
msgid "Manage Additional Features"
|
msgid "Manage Additional Features"
|
||||||
msgstr "إدارة الميّزات الإضافية"
|
msgstr "إدارة الميّزات الإضافية"
|
||||||
|
|
||||||
#: src/Module/Admin/Federation.php:63
|
#: src/Module/Admin/Federation.php:65
|
||||||
msgid "Other"
|
msgid "Other"
|
||||||
msgstr "أخرى"
|
msgstr "أخرى"
|
||||||
|
|
||||||
#: src/Module/Admin/Federation.php:134 src/Module/Admin/Federation.php:383
|
#: src/Module/Admin/Federation.php:136 src/Module/Admin/Federation.php:385
|
||||||
msgid "unknown"
|
msgid "unknown"
|
||||||
msgstr "مجهول"
|
msgstr "مجهول"
|
||||||
|
|
||||||
#: src/Module/Admin/Federation.php:167
|
#: src/Module/Admin/Federation.php:169
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s total systems"
|
msgid "%s total systems"
|
||||||
msgstr "%s نظام"
|
msgstr "%s نظام"
|
||||||
|
|
||||||
#: src/Module/Admin/Federation.php:168
|
#: src/Module/Admin/Federation.php:170
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s active users last month"
|
msgid "%s active users last month"
|
||||||
msgstr "%s مستخدم نشط في آخر شهر"
|
msgstr "%s مستخدم نشط في آخر شهر"
|
||||||
|
|
||||||
#: src/Module/Admin/Federation.php:169
|
#: src/Module/Admin/Federation.php:171
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s active users last six month"
|
msgid "%s active users last six months"
|
||||||
msgstr "%s مستخدم نشط في آخر ستة أشهر"
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Federation.php:170
|
#: src/Module/Admin/Federation.php:172
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s registered users"
|
msgid "%s registered users"
|
||||||
msgstr "%s مستخدم مسجل"
|
msgstr "%s مستخدم مسجل"
|
||||||
|
|
||||||
#: src/Module/Admin/Federation.php:171
|
#: src/Module/Admin/Federation.php:173
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s local posts"
|
msgid "%s locally created posts and comments"
|
||||||
msgstr "%s مشاركة محلية"
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Federation.php:174
|
#: src/Module/Admin/Federation.php:176
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s posts per user"
|
msgid "%s posts per user"
|
||||||
msgstr "%s مشاركة لكل مستخدم"
|
msgstr "%s مشاركة لكل مستخدم"
|
||||||
|
|
||||||
#: src/Module/Admin/Federation.php:179
|
#: src/Module/Admin/Federation.php:181
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s users per system"
|
msgid "%s users per system"
|
||||||
msgstr "%s مستخدم لكل نظام"
|
msgstr "%s مستخدم لكل نظام"
|
||||||
|
|
||||||
#: src/Module/Admin/Federation.php:189
|
#: src/Module/Admin/Federation.php:191
|
||||||
msgid ""
|
msgid ""
|
||||||
"This page offers you some numbers to the known part of the federated social "
|
"This page offers you some numbers to the known part of the federated social "
|
||||||
"network your Friendica node is part of. These numbers are not complete but "
|
"network your Friendica node is part of. These numbers are not complete but "
|
||||||
"only reflect the part of the network your node is aware of."
|
"only reflect the part of the network your node is aware of."
|
||||||
msgstr "تقدم لك هذه الصفحة بعض الإحصائيات للجزء المعروف من الشبكة الاجتماعية الموحدة المتصلة بعقدتك. هذه الإحصائيات ليست كاملة ولكنها تتضمن المواقع المعروفة لعقدتك من الشبكة."
|
msgstr "تقدم لك هذه الصفحة بعض الإحصائيات للجزء المعروف من الشبكة الاجتماعية الموحدة المتصلة بعقدتك. هذه الإحصائيات ليست كاملة ولكنها تتضمن المواقع المعروفة لعقدتك من الشبكة."
|
||||||
|
|
||||||
#: src/Module/Admin/Federation.php:195 src/Module/BaseAdmin.php:87
|
#: src/Module/Admin/Federation.php:197 src/Module/BaseAdmin.php:87
|
||||||
msgid "Federation Statistics"
|
msgid "Federation Statistics"
|
||||||
msgstr "إحصائيات الشبكة الموحدة"
|
msgstr "إحصائيات الشبكة الموحدة"
|
||||||
|
|
||||||
#: src/Module/Admin/Federation.php:199
|
#: src/Module/Admin/Federation.php:201
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Currently this node is aware of %s nodes (%s active users last month, %s "
|
"Currently this node is aware of %s nodes (%s active users last month, %s "
|
||||||
"active users last six month, %s registered users in total) from the "
|
"active users last six months, %s registered users in total) from the "
|
||||||
"following platforms:"
|
"following platforms:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
@ -5300,7 +4920,7 @@ msgstr "ذكر"
|
||||||
msgid "Implicit Mention"
|
msgid "Implicit Mention"
|
||||||
msgstr "ذِكر صريح"
|
msgstr "ذِكر صريح"
|
||||||
|
|
||||||
#: src/Module/Admin/Item/Source.php:73 src/Module/Admin/Logs/View.php:98
|
#: src/Module/Admin/Item/Source.php:73 src/Module/Admin/Logs/View.php:99
|
||||||
#: src/Module/Debug/ActivityPubConversion.php:62
|
#: src/Module/Debug/ActivityPubConversion.php:62
|
||||||
msgid "Source"
|
msgid "Source"
|
||||||
msgstr "المصدر"
|
msgstr "المصدر"
|
||||||
|
|
@ -5372,68 +4992,68 @@ msgid ""
|
||||||
"is readable."
|
"is readable."
|
||||||
msgstr "يتعذر فتح ملف السجل <strong>%1$s</strong>.<br/> تحقق مما إذا كان الملف %1$s مُنح أذونات القراءة."
|
msgstr "يتعذر فتح ملف السجل <strong>%1$s</strong>.<br/> تحقق مما إذا كان الملف %1$s مُنح أذونات القراءة."
|
||||||
|
|
||||||
#: src/Module/Admin/Logs/View.php:84 src/Module/BaseAdmin.php:110
|
#: src/Module/Admin/Logs/View.php:85 src/Module/BaseAdmin.php:110
|
||||||
msgid "View Logs"
|
msgid "View Logs"
|
||||||
msgstr "اعرض السجلات"
|
msgstr "اعرض السجلات"
|
||||||
|
|
||||||
#: src/Module/Admin/Logs/View.php:87
|
#: src/Module/Admin/Logs/View.php:88
|
||||||
msgid "Search in logs"
|
msgid "Search in logs"
|
||||||
msgstr "ابحث في السجل"
|
msgstr "ابحث في السجل"
|
||||||
|
|
||||||
#: src/Module/Admin/Logs/View.php:88
|
#: src/Module/Admin/Logs/View.php:89
|
||||||
#: src/Module/Notifications/Notifications.php:139
|
#: src/Module/Notifications/Notifications.php:139
|
||||||
msgid "Show all"
|
msgid "Show all"
|
||||||
msgstr "اعرض الكل"
|
msgstr "اعرض الكل"
|
||||||
|
|
||||||
#: src/Module/Admin/Logs/View.php:89
|
#: src/Module/Admin/Logs/View.php:90
|
||||||
msgid "Date"
|
msgid "Date"
|
||||||
msgstr "التّاريخ"
|
msgstr "التّاريخ"
|
||||||
|
|
||||||
#: src/Module/Admin/Logs/View.php:90
|
#: src/Module/Admin/Logs/View.php:91
|
||||||
msgid "Level"
|
msgid "Level"
|
||||||
msgstr "المستوى"
|
msgstr "المستوى"
|
||||||
|
|
||||||
#: src/Module/Admin/Logs/View.php:91
|
#: src/Module/Admin/Logs/View.php:92
|
||||||
msgid "Context"
|
msgid "Context"
|
||||||
msgstr "السياق"
|
msgstr "السياق"
|
||||||
|
|
||||||
#: src/Module/Admin/Logs/View.php:93
|
#: src/Module/Admin/Logs/View.php:94
|
||||||
msgid "ALL"
|
msgid "ALL"
|
||||||
msgstr "الكل"
|
msgstr "الكل"
|
||||||
|
|
||||||
#: src/Module/Admin/Logs/View.php:94
|
#: src/Module/Admin/Logs/View.php:95
|
||||||
msgid "View details"
|
msgid "View details"
|
||||||
msgstr "اعرض التفاصيل"
|
msgstr "اعرض التفاصيل"
|
||||||
|
|
||||||
#: src/Module/Admin/Logs/View.php:95
|
#: src/Module/Admin/Logs/View.php:96
|
||||||
msgid "Click to view details"
|
msgid "Click to view details"
|
||||||
msgstr "انقر لعرض التفاصيل"
|
msgstr "انقر لعرض التفاصيل"
|
||||||
|
|
||||||
#: src/Module/Admin/Logs/View.php:97
|
#: src/Module/Admin/Logs/View.php:98
|
||||||
msgid "Data"
|
msgid "Data"
|
||||||
msgstr "البيانات"
|
msgstr "البيانات"
|
||||||
|
|
||||||
#: src/Module/Admin/Logs/View.php:99
|
#: src/Module/Admin/Logs/View.php:100
|
||||||
msgid "File"
|
msgid "File"
|
||||||
msgstr "الملف"
|
msgstr "الملف"
|
||||||
|
|
||||||
#: src/Module/Admin/Logs/View.php:100
|
#: src/Module/Admin/Logs/View.php:101
|
||||||
msgid "Line"
|
msgid "Line"
|
||||||
msgstr "السطر"
|
msgstr "السطر"
|
||||||
|
|
||||||
#: src/Module/Admin/Logs/View.php:101
|
#: src/Module/Admin/Logs/View.php:102
|
||||||
msgid "Function"
|
msgid "Function"
|
||||||
msgstr "الدالة"
|
msgstr "الدالة"
|
||||||
|
|
||||||
#: src/Module/Admin/Logs/View.php:102
|
#: src/Module/Admin/Logs/View.php:103
|
||||||
msgid "UID"
|
msgid "UID"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Logs/View.php:103
|
#: src/Module/Admin/Logs/View.php:104
|
||||||
msgid "Process ID"
|
msgid "Process ID"
|
||||||
msgstr "مُعرّف العملية"
|
msgstr "مُعرّف العملية"
|
||||||
|
|
||||||
#: src/Module/Admin/Logs/View.php:104
|
#: src/Module/Admin/Logs/View.php:105
|
||||||
msgid "Close"
|
msgid "Close"
|
||||||
msgstr "أغلق"
|
msgstr "أغلق"
|
||||||
|
|
||||||
|
|
@ -5473,461 +5093,459 @@ msgstr "معطيات العملية"
|
||||||
msgid "Priority"
|
msgid "Priority"
|
||||||
msgstr "الأولوية"
|
msgstr "الأولوية"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:71
|
#: src/Module/Admin/Site.php:336 src/Module/Settings/Display.php:138
|
||||||
msgid "Can not parse base url. Must have at least <scheme>://<domain>"
|
|
||||||
msgstr "يتعذر تحليل الرابط الأساسي. يجب أن يكون <scheme>://<domain>"
|
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:125
|
|
||||||
msgid "Relocation started. Could take a while to complete."
|
|
||||||
msgstr "بدأ النقل. قد يستغرق بعض الوقت."
|
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:403 src/Module/Settings/Display.php:138
|
|
||||||
msgid "No special theme for mobile devices"
|
msgid "No special theme for mobile devices"
|
||||||
msgstr "لا توجد سمة مخصصة للهاتف"
|
msgstr "لا توجد سمة مخصصة للهاتف"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:420 src/Module/Settings/Display.php:148
|
#: src/Module/Admin/Site.php:353 src/Module/Settings/Display.php:148
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s - (Experimental)"
|
msgid "%s - (Experimental)"
|
||||||
msgstr "%s - (اختباري)"
|
msgstr "%s - (اختباري)"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:432
|
#: src/Module/Admin/Site.php:365
|
||||||
msgid "No community page for local users"
|
msgid "No community page for local users"
|
||||||
msgstr "لا توجد صفحة مجتمع للمستخدمين المحليين"
|
msgstr "لا توجد صفحة مجتمع للمستخدمين المحليين"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:433
|
#: src/Module/Admin/Site.php:366
|
||||||
msgid "No community page"
|
msgid "No community page"
|
||||||
msgstr "لا توجد صفحة مجتمع"
|
msgstr "لا توجد صفحة مجتمع"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:434
|
#: src/Module/Admin/Site.php:367
|
||||||
msgid "Public postings from users of this site"
|
msgid "Public postings from users of this site"
|
||||||
msgstr "المشاركات العلنية لمستخدمي هذا الموقع"
|
msgstr "المشاركات العلنية لمستخدمي هذا الموقع"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:435
|
#: src/Module/Admin/Site.php:368
|
||||||
msgid "Public postings from the federated network"
|
msgid "Public postings from the federated network"
|
||||||
msgstr "المشاركات العلنية من الشبكة الموحدة"
|
msgstr "المشاركات العلنية من الشبكة الموحدة"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:436
|
#: src/Module/Admin/Site.php:369
|
||||||
msgid "Public postings from local users and the federated network"
|
msgid "Public postings from local users and the federated network"
|
||||||
msgstr "المشركات العلنية من الشبكة الموحدة والشبكة المحلية"
|
msgstr "المشركات العلنية من الشبكة الموحدة والشبكة المحلية"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:442
|
#: src/Module/Admin/Site.php:375
|
||||||
msgid "Multi user instance"
|
msgid "Multi user instance"
|
||||||
msgstr "مثيل متعدد المستخدمين"
|
msgstr "مثيل متعدد المستخدمين"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:469
|
#: src/Module/Admin/Site.php:402
|
||||||
msgid "Closed"
|
msgid "Closed"
|
||||||
msgstr "مغلق"
|
msgstr "مغلق"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:470
|
#: src/Module/Admin/Site.php:403
|
||||||
msgid "Requires approval"
|
msgid "Requires approval"
|
||||||
msgstr "تتطلب الحصول على موافقة"
|
msgstr "تتطلب الحصول على موافقة"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:471
|
#: src/Module/Admin/Site.php:404
|
||||||
msgid "Open"
|
msgid "Open"
|
||||||
msgstr "افتح"
|
msgstr "افتح"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:475 src/Module/Install.php:222
|
#: src/Module/Admin/Site.php:408 src/Module/Install.php:222
|
||||||
msgid "No SSL policy, links will track page SSL state"
|
msgid "No SSL policy, links will track page SSL state"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:476 src/Module/Install.php:223
|
#: src/Module/Admin/Site.php:409 src/Module/Install.php:223
|
||||||
msgid "Force all links to use SSL"
|
msgid "Force all links to use SSL"
|
||||||
msgstr "فرض استخدام الروابط ل SSL"
|
msgstr "فرض استخدام الروابط ل SSL"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:477 src/Module/Install.php:224
|
#: src/Module/Admin/Site.php:410 src/Module/Install.php:224
|
||||||
msgid "Self-signed certificate, use SSL for local links only (discouraged)"
|
msgid "Self-signed certificate, use SSL for local links only (discouraged)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:481
|
#: src/Module/Admin/Site.php:414
|
||||||
msgid "Don't check"
|
msgid "Don't check"
|
||||||
msgstr "لا تتحقق"
|
msgstr "لا تتحقق"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:482
|
#: src/Module/Admin/Site.php:415
|
||||||
msgid "check the stable version"
|
msgid "check the stable version"
|
||||||
msgstr "تحقق من الإصدار المستقر"
|
msgstr "تحقق من الإصدار المستقر"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:483
|
#: src/Module/Admin/Site.php:416
|
||||||
msgid "check the development version"
|
msgid "check the development version"
|
||||||
msgstr "تحقق من الإصدار التطويري"
|
msgstr "تحقق من الإصدار التطويري"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:487
|
#: src/Module/Admin/Site.php:420
|
||||||
msgid "none"
|
msgid "none"
|
||||||
msgstr "لا شيﺀ"
|
msgstr "لا شيﺀ"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:488
|
#: src/Module/Admin/Site.php:421
|
||||||
msgid "Local contacts"
|
msgid "Local contacts"
|
||||||
msgstr "المُتراسِلون المحليون"
|
msgstr "المُتراسِلون المحليون"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:489
|
#: src/Module/Admin/Site.php:422
|
||||||
msgid "Interactors"
|
msgid "Interactors"
|
||||||
msgstr "المتفاعلون"
|
msgstr "المتفاعلون"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:499 src/Module/BaseAdmin.php:90
|
#: src/Module/Admin/Site.php:432 src/Module/BaseAdmin.php:90
|
||||||
msgid "Site"
|
msgid "Site"
|
||||||
msgstr "موقع"
|
msgstr "موقع"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:500
|
#: src/Module/Admin/Site.php:433
|
||||||
msgid "General Information"
|
msgid "General Information"
|
||||||
msgstr "معلومات عامة"
|
msgstr "معلومات عامة"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:502
|
#: src/Module/Admin/Site.php:435
|
||||||
msgid "Republish users to directory"
|
msgid "Republish users to directory"
|
||||||
msgstr "أعد نشر المستخدمين في الدليل"
|
msgstr "أعد نشر المستخدمين في الدليل"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:503 src/Module/Register.php:152
|
#: src/Module/Admin/Site.php:436 src/Module/Register.php:152
|
||||||
msgid "Registration"
|
msgid "Registration"
|
||||||
msgstr "التسجيل"
|
msgstr "التسجيل"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:504
|
#: src/Module/Admin/Site.php:437
|
||||||
msgid "File upload"
|
msgid "File upload"
|
||||||
msgstr "رفع الملف"
|
msgstr "رفع الملف"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:505
|
#: src/Module/Admin/Site.php:438
|
||||||
msgid "Policies"
|
msgid "Policies"
|
||||||
msgstr "السياسات"
|
msgstr "السياسات"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:507
|
#: src/Module/Admin/Site.php:440
|
||||||
msgid "Auto Discovered Contact Directory"
|
msgid "Auto Discovered Contact Directory"
|
||||||
msgstr "دليل المتراسلين المكتشفين تلقائيًا"
|
msgstr "دليل المتراسلين المكتشفين تلقائيًا"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:508
|
#: src/Module/Admin/Site.php:441
|
||||||
msgid "Performance"
|
msgid "Performance"
|
||||||
msgstr "الأداء"
|
msgstr "الأداء"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:509
|
#: src/Module/Admin/Site.php:442
|
||||||
msgid "Worker"
|
msgid "Worker"
|
||||||
msgstr "مهمة"
|
msgstr "مهمة"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:510
|
#: src/Module/Admin/Site.php:443
|
||||||
msgid "Message Relay"
|
msgid "Message Relay"
|
||||||
msgstr "ترحيل الرسالة"
|
msgstr "ترحيل الرسالة"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:511
|
#: src/Module/Admin/Site.php:444
|
||||||
msgid ""
|
msgid ""
|
||||||
"Use the command \"console relay\" in the command line to add or remove "
|
"Use the command \"console relay\" in the command line to add or remove "
|
||||||
"relays."
|
"relays."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:512
|
#: src/Module/Admin/Site.php:445
|
||||||
msgid "The system is not subscribed to any relays at the moment."
|
msgid "The system is not subscribed to any relays at the moment."
|
||||||
msgstr "هذا الخادم ليس مشترك في أي مرحلات حاليًا."
|
msgstr "هذا الخادم ليس مشترك في أي مرحلات حاليًا."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:513
|
#: src/Module/Admin/Site.php:446
|
||||||
msgid "The system is currently subscribed to the following relays:"
|
msgid "The system is currently subscribed to the following relays:"
|
||||||
msgstr "هذا الخادم مشترك حاليًا في المرحلات التالية:"
|
msgstr "هذا الخادم مشترك حاليًا في المرحلات التالية:"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:515
|
#: src/Module/Admin/Site.php:448
|
||||||
msgid "Relocate Instance"
|
msgid "Relocate Node"
|
||||||
msgstr "انقل المثيل"
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:516
|
#: src/Module/Admin/Site.php:449
|
||||||
msgid ""
|
msgid ""
|
||||||
"<strong>Warning!</strong> Advanced function. Could make this server "
|
"Relocating your node enables you to change the DNS domain of this node and "
|
||||||
"unreachable."
|
"keep all the existing users and posts. This process takes a while and can "
|
||||||
msgstr "<strong>تحذير!</strong> وظيفة متقدمة. يمكن أن تجعل هذا الخادم غير قابل للوصول."
|
"only be started from the relocate console command like this:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:520
|
#: src/Module/Admin/Site.php:450
|
||||||
|
msgid "(Friendica directory)# bin/console relocate https://newdomain.com"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Module/Admin/Site.php:454
|
||||||
msgid "Site name"
|
msgid "Site name"
|
||||||
msgstr "اسم الموقع"
|
msgstr "اسم الموقع"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:521
|
#: src/Module/Admin/Site.php:455
|
||||||
msgid "Sender Email"
|
msgid "Sender Email"
|
||||||
msgstr "بريد المرسل"
|
msgstr "بريد المرسل"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:521
|
#: src/Module/Admin/Site.php:455
|
||||||
msgid ""
|
msgid ""
|
||||||
"The email address your server shall use to send notification emails from."
|
"The email address your server shall use to send notification emails from."
|
||||||
msgstr "عنوان البريد الإلكتروني الذي سيستخدمه الخادم لإرسال رسائل التنبيه."
|
msgstr "عنوان البريد الإلكتروني الذي سيستخدمه الخادم لإرسال رسائل التنبيه."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:522
|
#: src/Module/Admin/Site.php:456
|
||||||
msgid "Name of the system actor"
|
msgid "Name of the system actor"
|
||||||
msgstr "اسم حساب النظام"
|
msgstr "اسم حساب النظام"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:522
|
#: src/Module/Admin/Site.php:456
|
||||||
msgid ""
|
msgid ""
|
||||||
"Name of the internal system account that is used to perform ActivityPub "
|
"Name of the internal system account that is used to perform ActivityPub "
|
||||||
"requests. This must be an unused username. If set, this can't be changed "
|
"requests. This must be an unused username. If set, this can't be changed "
|
||||||
"again."
|
"again."
|
||||||
msgstr "اسم حساب النظام الداخلي المستخدم لتنفيذ طلبات ActivityPub. يجب أن لا يكون هذا الاسم محجوز. إذا عُين لا يمكن تغييره."
|
msgstr "اسم حساب النظام الداخلي المستخدم لتنفيذ طلبات ActivityPub. يجب أن لا يكون هذا الاسم محجوز. إذا عُين لا يمكن تغييره."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:523
|
#: src/Module/Admin/Site.php:457
|
||||||
msgid "Banner/Logo"
|
msgid "Banner/Logo"
|
||||||
msgstr "اللافتة/الشعار"
|
msgstr "اللافتة/الشعار"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:524
|
#: src/Module/Admin/Site.php:458
|
||||||
msgid "Email Banner/Logo"
|
msgid "Email Banner/Logo"
|
||||||
msgstr "شعار\\لافتة البريد الإلكتروني"
|
msgstr "شعار\\لافتة البريد الإلكتروني"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:525
|
#: src/Module/Admin/Site.php:459
|
||||||
msgid "Shortcut icon"
|
msgid "Shortcut icon"
|
||||||
msgstr "أيقونة الاختصار"
|
msgstr "أيقونة الاختصار"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:525
|
#: src/Module/Admin/Site.php:459
|
||||||
msgid "Link to an icon that will be used for browsers."
|
msgid "Link to an icon that will be used for browsers."
|
||||||
msgstr "رابط إلى أيقونة سيتم استخدامها للمتصفحات."
|
msgstr "رابط إلى أيقونة سيتم استخدامها للمتصفحات."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:526
|
#: src/Module/Admin/Site.php:460
|
||||||
msgid "Touch icon"
|
msgid "Touch icon"
|
||||||
msgstr "أيقونة الأجهزة اللمسية"
|
msgstr "أيقونة الأجهزة اللمسية"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:526
|
#: src/Module/Admin/Site.php:460
|
||||||
msgid "Link to an icon that will be used for tablets and mobiles."
|
msgid "Link to an icon that will be used for tablets and mobiles."
|
||||||
msgstr "رابط إلى أيقونة سيتم استخدامها للأجهزة اللوحية والهواتف."
|
msgstr "رابط إلى أيقونة سيتم استخدامها للأجهزة اللوحية والهواتف."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:527
|
#: src/Module/Admin/Site.php:461
|
||||||
msgid "Additional Info"
|
msgid "Additional Info"
|
||||||
msgstr "معلومات إضافية"
|
msgstr "معلومات إضافية"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:527
|
#: src/Module/Admin/Site.php:461
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"For public servers: you can add additional information here that will be "
|
"For public servers: you can add additional information here that will be "
|
||||||
"listed at %s/servers."
|
"listed at %s/servers."
|
||||||
msgstr "للخوادم العامة: يمكنك إضافة معلومات إضافية لتدرج في %s/servers."
|
msgstr "للخوادم العامة: يمكنك إضافة معلومات إضافية لتدرج في %s/servers."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:528
|
#: src/Module/Admin/Site.php:462
|
||||||
msgid "System language"
|
msgid "System language"
|
||||||
msgstr "لغة النظام"
|
msgstr "لغة النظام"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:529
|
#: src/Module/Admin/Site.php:463
|
||||||
msgid "System theme"
|
msgid "System theme"
|
||||||
msgstr "سمة النظام"
|
msgstr "سمة النظام"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:529
|
#: src/Module/Admin/Site.php:463
|
||||||
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Default system theme - may be over-ridden by user profiles - <a "
|
"Default system theme - may be over-ridden by user profiles - <a href=\"%s\" "
|
||||||
"href=\"/admin/themes\" id=\"cnftheme\">Change default theme settings</a>"
|
"id=\"cnftheme\">Change default theme settings</a>"
|
||||||
msgstr "مظهر الموقع الافتراضي يختلف بناءً على الملف الشخصي الذي تمت زيارته - <a href=\"/admin/themes\" id=\"cnftheme\"> غيّر إعدادات السمة الافتراضية</a>"
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:530
|
#: src/Module/Admin/Site.php:464
|
||||||
msgid "Mobile system theme"
|
msgid "Mobile system theme"
|
||||||
msgstr "سمة الهاتف"
|
msgstr "سمة الهاتف"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:530
|
#: src/Module/Admin/Site.php:464
|
||||||
msgid "Theme for mobile devices"
|
msgid "Theme for mobile devices"
|
||||||
msgstr "سمة للأجهزة المحمولة"
|
msgstr "سمة للأجهزة المحمولة"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:531 src/Module/Install.php:232
|
#: src/Module/Admin/Site.php:465 src/Module/Install.php:232
|
||||||
msgid "SSL link policy"
|
msgid "SSL link policy"
|
||||||
msgstr "سياسة روابط SSL"
|
msgstr "سياسة روابط SSL"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:531 src/Module/Install.php:234
|
#: src/Module/Admin/Site.php:465 src/Module/Install.php:234
|
||||||
msgid "Determines whether generated links should be forced to use SSL"
|
msgid "Determines whether generated links should be forced to use SSL"
|
||||||
msgstr "يحدد ما إذا كان ينبغي إجبار الروابط المولدة على استخدام SSL"
|
msgstr "يحدد ما إذا كان ينبغي إجبار الروابط المولدة على استخدام SSL"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:532
|
#: src/Module/Admin/Site.php:466
|
||||||
msgid "Force SSL"
|
msgid "Force SSL"
|
||||||
msgstr "فرض SSL"
|
msgstr "فرض SSL"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:532
|
#: src/Module/Admin/Site.php:466
|
||||||
msgid ""
|
msgid ""
|
||||||
"Force all Non-SSL requests to SSL - Attention: on some systems it could lead"
|
"Force all Non-SSL requests to SSL - Attention: on some systems it could lead"
|
||||||
" to endless loops."
|
" to endless loops."
|
||||||
msgstr "أعد توجيه جميع الطلبات غير المشفرة إلى طلبات SSL. تحذير: في بعض الأنظمة يمكن أن يؤدي هذا إلى حلقات إعادة توجيه لا نهائية."
|
msgstr "أعد توجيه جميع الطلبات غير المشفرة إلى طلبات SSL. تحذير: في بعض الأنظمة يمكن أن يؤدي هذا إلى حلقات إعادة توجيه لا نهائية."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:533
|
#: src/Module/Admin/Site.php:467
|
||||||
msgid "Show help entry from navigation menu"
|
msgid "Show help entry from navigation menu"
|
||||||
msgstr "أظهر المساعدة في قائمة التصفح"
|
msgstr "أظهر المساعدة في قائمة التصفح"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:533
|
#: src/Module/Admin/Site.php:467
|
||||||
msgid ""
|
msgid ""
|
||||||
"Displays the menu entry for the Help pages from the navigation menu. It is "
|
"Displays the menu entry for the Help pages from the navigation menu. It is "
|
||||||
"always accessible by calling /help directly."
|
"always accessible by calling /help directly."
|
||||||
msgstr "إظهار المساعدة في قائمة التصفح. تظل المساعدة قابلة للوصول من خلال الانتقال إلى /help مباشرة."
|
msgstr "إظهار المساعدة في قائمة التصفح. تظل المساعدة قابلة للوصول من خلال الانتقال إلى /help مباشرة."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:534
|
#: src/Module/Admin/Site.php:468
|
||||||
msgid "Single user instance"
|
msgid "Single user instance"
|
||||||
msgstr "مثيل لمستخدم وحيد"
|
msgstr "مثيل لمستخدم وحيد"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:534
|
#: src/Module/Admin/Site.php:468
|
||||||
msgid "Make this instance multi-user or single-user for the named user"
|
msgid "Make this instance multi-user or single-user for the named user"
|
||||||
msgstr "اجعل هذا المثيل إما لمستخدم واحد أولعدّة مستخدمين"
|
msgstr "اجعل هذا المثيل إما لمستخدم واحد أولعدّة مستخدمين"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:536
|
#: src/Module/Admin/Site.php:470
|
||||||
msgid "Maximum image size"
|
msgid "Maximum image size"
|
||||||
msgstr "الحجم الأقصى للصورة"
|
msgstr "الحجم الأقصى للصورة"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:536
|
#: src/Module/Admin/Site.php:470
|
||||||
msgid ""
|
msgid ""
|
||||||
"Maximum size in bytes of uploaded images. Default is 0, which means no "
|
"Maximum size in bytes of uploaded images. Default is 0, which means no "
|
||||||
"limits."
|
"limits."
|
||||||
msgstr "حد حجم الصورة المرفوعة بالبايت. الافتراضي هو 0 والذي يعني حجمًا غير محدود."
|
msgstr "حد حجم الصورة المرفوعة بالبايت. الافتراضي هو 0 والذي يعني حجمًا غير محدود."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:537
|
#: src/Module/Admin/Site.php:471
|
||||||
msgid "Maximum image length"
|
msgid "Maximum image length"
|
||||||
msgstr "الطول الأقصى للصورة"
|
msgstr "الطول الأقصى للصورة"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:537
|
#: src/Module/Admin/Site.php:471
|
||||||
msgid ""
|
msgid ""
|
||||||
"Maximum length in pixels of the longest side of uploaded images. Default is "
|
"Maximum length in pixels of the longest side of uploaded images. Default is "
|
||||||
"-1, which means no limits."
|
"-1, which means no limits."
|
||||||
msgstr "حد حجم الصورة المرفوعة بالبيكسل. الافتراضي هو 1- والذي يعني حجمًا غير محدود."
|
msgstr "حد حجم الصورة المرفوعة بالبيكسل. الافتراضي هو 1- والذي يعني حجمًا غير محدود."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:538
|
#: src/Module/Admin/Site.php:472
|
||||||
msgid "JPEG image quality"
|
msgid "JPEG image quality"
|
||||||
msgstr "جودة صور JPEG"
|
msgstr "جودة صور JPEG"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:538
|
#: src/Module/Admin/Site.php:472
|
||||||
msgid ""
|
msgid ""
|
||||||
"Uploaded JPEGS will be saved at this quality setting [0-100]. Default is "
|
"Uploaded JPEGS will be saved at this quality setting [0-100]. Default is "
|
||||||
"100, which is full quality."
|
"100, which is full quality."
|
||||||
msgstr "سيتم حفظ ملفات JPEG المرفوعة بنسبة جودة [0-100]. القيمة الافتراضية هي 100 وهي جودة الأصلية للملف."
|
msgstr "سيتم حفظ ملفات JPEG المرفوعة بنسبة جودة [0-100]. القيمة الافتراضية هي 100 وهي جودة الأصلية للملف."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:540
|
#: src/Module/Admin/Site.php:474
|
||||||
msgid "Register policy"
|
msgid "Register policy"
|
||||||
msgstr "سياسات التسجيل"
|
msgstr "سياسات التسجيل"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:541
|
#: src/Module/Admin/Site.php:475
|
||||||
msgid "Maximum Daily Registrations"
|
msgid "Maximum Daily Registrations"
|
||||||
msgstr "الحد اليومي للتسجيل"
|
msgstr "الحد اليومي للتسجيل"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:541
|
#: src/Module/Admin/Site.php:475
|
||||||
msgid ""
|
msgid ""
|
||||||
"If registration is permitted above, this sets the maximum number of new user"
|
"If registration is permitted above, this sets the maximum number of new user"
|
||||||
" registrations to accept per day. If register is set to closed, this "
|
" registrations to accept per day. If register is set to closed, this "
|
||||||
"setting has no effect."
|
"setting has no effect."
|
||||||
msgstr "إذا كان التسجيل مسموحا، فإن هذا يحدُّ عدد التسجيلات الجديدة لليوم الواحد. إذا أُغلق التسجيل هذا الإعداد ليس له أي تأثير."
|
msgstr "إذا كان التسجيل مسموحا، فإن هذا يحدُّ عدد التسجيلات الجديدة لليوم الواحد. إذا أُغلق التسجيل هذا الإعداد ليس له أي تأثير."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:542
|
#: src/Module/Admin/Site.php:476
|
||||||
msgid "Register text"
|
msgid "Register text"
|
||||||
msgstr "نص صفحة التسجيل"
|
msgstr "نص صفحة التسجيل"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:542
|
#: src/Module/Admin/Site.php:476
|
||||||
msgid ""
|
msgid ""
|
||||||
"Will be displayed prominently on the registration page. You can use BBCode "
|
"Will be displayed prominently on the registration page. You can use BBCode "
|
||||||
"here."
|
"here."
|
||||||
msgstr "ستعرض في صفحة التسجيل. يمكنك استخدام BBCode."
|
msgstr "ستعرض في صفحة التسجيل. يمكنك استخدام BBCode."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:543
|
#: src/Module/Admin/Site.php:477
|
||||||
msgid "Forbidden Nicknames"
|
msgid "Forbidden Nicknames"
|
||||||
msgstr "الألقاب المحظورة"
|
msgstr "الألقاب المحظورة"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:543
|
#: src/Module/Admin/Site.php:477
|
||||||
msgid ""
|
msgid ""
|
||||||
"Comma separated list of nicknames that are forbidden from registration. "
|
"Comma separated list of nicknames that are forbidden from registration. "
|
||||||
"Preset is a list of role names according RFC 2142."
|
"Preset is a list of role names according RFC 2142."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:544
|
#: src/Module/Admin/Site.php:478
|
||||||
msgid "Accounts abandoned after x days"
|
msgid "Accounts abandoned after x days"
|
||||||
msgstr "الحسابات المهجورة بعد x يوم"
|
msgstr "الحسابات المهجورة بعد x يوم"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:544
|
#: src/Module/Admin/Site.php:478
|
||||||
msgid ""
|
msgid ""
|
||||||
"Will not waste system resources polling external sites for abandonded "
|
"Will not waste system resources polling external sites for abandonded "
|
||||||
"accounts. Enter 0 for no time limit."
|
"accounts. Enter 0 for no time limit."
|
||||||
msgstr "من أجل صونِ موارد النظام سنوقف الاستطلاع عن الحسابات المهجورة من المواقع البعيدة. ضع 0 لإيقاف هذه الوظيفة."
|
msgstr "من أجل صونِ موارد النظام سنوقف الاستطلاع عن الحسابات المهجورة من المواقع البعيدة. ضع 0 لإيقاف هذه الوظيفة."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:545
|
#: src/Module/Admin/Site.php:479
|
||||||
msgid "Allowed friend domains"
|
msgid "Allowed friend domains"
|
||||||
msgstr "النطاقات المسموحة"
|
msgstr "النطاقات المسموحة"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:545
|
#: src/Module/Admin/Site.php:479
|
||||||
msgid ""
|
msgid ""
|
||||||
"Comma separated list of domains which are allowed to establish friendships "
|
"Comma separated list of domains which are allowed to establish friendships "
|
||||||
"with this site. Wildcards are accepted. Empty to allow any domains"
|
"with this site. Wildcards are accepted. Empty to allow any domains"
|
||||||
msgstr "قائمة مفصولة بفواصل للنطاقات المصرح لها بالتفاعل مع مستخدمي هذا الموقع. علامة \"*\" مقبولة. اتركه فارغا للسماح لجميع النطاقات"
|
msgstr "قائمة مفصولة بفواصل للنطاقات المصرح لها بالتفاعل مع مستخدمي هذا الموقع. علامة \"*\" مقبولة. اتركه فارغا للسماح لجميع النطاقات"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:546
|
#: src/Module/Admin/Site.php:480
|
||||||
msgid "Allowed email domains"
|
msgid "Allowed email domains"
|
||||||
msgstr "نطاقات البريد الإلكتروني المسموحة"
|
msgstr "نطاقات البريد الإلكتروني المسموحة"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:546
|
#: src/Module/Admin/Site.php:480
|
||||||
msgid ""
|
msgid ""
|
||||||
"Comma separated list of domains which are allowed in email addresses for "
|
"Comma separated list of domains which are allowed in email addresses for "
|
||||||
"registrations to this site. Wildcards are accepted. Empty to allow any "
|
"registrations to this site. Wildcards are accepted. Empty to allow any "
|
||||||
"domains"
|
"domains"
|
||||||
msgstr "قائمة مفصولة بفواصل للنطاقات البريد الإلكتروني المسموح بالتسجيل بها في هذا الموقع. علامة \"*\" مقبولة. اتركه فارغا للسماح لجميع النطاقات"
|
msgstr "قائمة مفصولة بفواصل للنطاقات البريد الإلكتروني المسموح بالتسجيل بها في هذا الموقع. علامة \"*\" مقبولة. اتركه فارغا للسماح لجميع النطاقات"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:547
|
#: src/Module/Admin/Site.php:481
|
||||||
msgid "No OEmbed rich content"
|
msgid "No OEmbed rich content"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:547
|
#: src/Module/Admin/Site.php:481
|
||||||
msgid ""
|
msgid ""
|
||||||
"Don't show the rich content (e.g. embedded PDF), except from the domains "
|
"Don't show the rich content (e.g. embedded PDF), except from the domains "
|
||||||
"listed below."
|
"listed below."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:548
|
#: src/Module/Admin/Site.php:482
|
||||||
msgid "Trusted third-party domains"
|
msgid "Trusted third-party domains"
|
||||||
msgstr "نطاقات الخارجية الموثوق بها"
|
msgstr "نطاقات الخارجية الموثوق بها"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:548
|
#: src/Module/Admin/Site.php:482
|
||||||
msgid ""
|
msgid ""
|
||||||
"Comma separated list of domains from which content is allowed to be embedded"
|
"Comma separated list of domains from which content is allowed to be embedded"
|
||||||
" in posts like with OEmbed. All sub-domains of the listed domains are "
|
" in posts like with OEmbed. All sub-domains of the listed domains are "
|
||||||
"allowed as well."
|
"allowed as well."
|
||||||
msgstr "قائمة مفصولة بفواصل من النطاقات التي يُسمح بتضمين محتواها في المشاركات مثل OEmbed. يُسمح أيضًا بجميع النطاقات الفرعية التابعة لها."
|
msgstr "قائمة مفصولة بفواصل من النطاقات التي يُسمح بتضمين محتواها في المشاركات مثل OEmbed. يُسمح أيضًا بجميع النطاقات الفرعية التابعة لها."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:549
|
#: src/Module/Admin/Site.php:483
|
||||||
msgid "Block public"
|
msgid "Block public"
|
||||||
msgstr "احجب المشاركات العلنية"
|
msgstr "احجب المشاركات العلنية"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:549
|
#: src/Module/Admin/Site.php:483
|
||||||
msgid ""
|
msgid ""
|
||||||
"Check to block public access to all otherwise public personal pages on this "
|
"Check to block public access to all otherwise public personal pages on this "
|
||||||
"site unless you are currently logged in."
|
"site unless you are currently logged in."
|
||||||
msgstr "أشر لمنع الزوار من الوصول إلى كل الصفحات باستثناء الصفحات الشخصية العلنية."
|
msgstr "أشر لمنع الزوار من الوصول إلى كل الصفحات باستثناء الصفحات الشخصية العلنية."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:550
|
#: src/Module/Admin/Site.php:484
|
||||||
msgid "Force publish"
|
msgid "Force publish"
|
||||||
msgstr "افرض النشر"
|
msgstr "افرض النشر"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:550
|
#: src/Module/Admin/Site.php:484
|
||||||
msgid ""
|
msgid ""
|
||||||
"Check to force all profiles on this site to be listed in the site directory."
|
"Check to force all profiles on this site to be listed in the site directory."
|
||||||
msgstr "أشر لفرض إدراج جميع الملفات الشخصية في دليل الموقع."
|
msgstr "أشر لفرض إدراج جميع الملفات الشخصية في دليل الموقع."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:550
|
#: src/Module/Admin/Site.php:484
|
||||||
msgid "Enabling this may violate privacy laws like the GDPR"
|
msgid "Enabling this may violate privacy laws like the GDPR"
|
||||||
msgstr "تفعيله قد ينتهك قوانين حماية الخصوصية مثل GDPR"
|
msgstr "تفعيله قد ينتهك قوانين حماية الخصوصية مثل GDPR"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:551
|
#: src/Module/Admin/Site.php:485
|
||||||
msgid "Global directory URL"
|
msgid "Global directory URL"
|
||||||
msgstr "رابط الدليل العالمي"
|
msgstr "رابط الدليل العالمي"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:551
|
#: src/Module/Admin/Site.php:485
|
||||||
msgid ""
|
msgid ""
|
||||||
"URL to the global directory. If this is not set, the global directory is "
|
"URL to the global directory. If this is not set, the global directory is "
|
||||||
"completely unavailable to the application."
|
"completely unavailable to the application."
|
||||||
msgstr "رابط الدليل العالمي. إذا لم يتم تعريف هذا الحقل ، فلن يكون الدليل العام متاحًا."
|
msgstr "رابط الدليل العالمي. إذا لم يتم تعريف هذا الحقل ، فلن يكون الدليل العام متاحًا."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:552
|
#: src/Module/Admin/Site.php:486
|
||||||
msgid "Private posts by default for new users"
|
msgid "Private posts by default for new users"
|
||||||
msgstr "جعل المشاركات خاصة للمستخدمين الجدد افتراضيًا"
|
msgstr "جعل المشاركات خاصة للمستخدمين الجدد افتراضيًا"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:552
|
#: src/Module/Admin/Site.php:486
|
||||||
msgid ""
|
msgid ""
|
||||||
"Set default post permissions for all new members to the default privacy "
|
"Set default post permissions for all new members to the default privacy "
|
||||||
"group rather than public."
|
"group rather than public."
|
||||||
msgstr "تعيين أذونات النشر الافتراضية لجميع الأعضاء الجدد إلى خاصة بدل العلنية."
|
msgstr "تعيين أذونات النشر الافتراضية لجميع الأعضاء الجدد إلى خاصة بدل العلنية."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:553
|
#: src/Module/Admin/Site.php:487
|
||||||
msgid "Don't include post content in email notifications"
|
msgid "Don't include post content in email notifications"
|
||||||
msgstr "لا تضمن محتويات المشاركات في تنبيهات البريد الإلكتروني"
|
msgstr "لا تضمن محتويات المشاركات في تنبيهات البريد الإلكتروني"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:553
|
#: src/Module/Admin/Site.php:487
|
||||||
msgid ""
|
msgid ""
|
||||||
"Don't include the content of a post/comment/private message/etc. in the "
|
"Don't include the content of a post/comment/private message/etc. in the "
|
||||||
"email notifications that are sent out from this site, as a privacy measure."
|
"email notifications that are sent out from this site, as a privacy measure."
|
||||||
msgstr "لا تضمن محتوى المشركات/التعليقات/الرسائل الخاصة/إلخ في تنبيهات البريد الإلكتروني المرسلة من هذا الموقع، كتدبير لحماية الخصوصية."
|
msgstr "لا تضمن محتوى المشركات/التعليقات/الرسائل الخاصة/إلخ في تنبيهات البريد الإلكتروني المرسلة من هذا الموقع، كتدبير لحماية الخصوصية."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:554
|
#: src/Module/Admin/Site.php:488
|
||||||
msgid "Disallow public access to addons listed in the apps menu."
|
msgid "Disallow public access to addons listed in the apps menu."
|
||||||
msgstr "لا تسمح بالوصول العلني للإضافات المدرجة في قائمة التطبيقات."
|
msgstr "لا تسمح بالوصول العلني للإضافات المدرجة في قائمة التطبيقات."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:554
|
#: src/Module/Admin/Site.php:488
|
||||||
msgid ""
|
msgid ""
|
||||||
"Checking this box will restrict addons listed in the apps menu to members "
|
"Checking this box will restrict addons listed in the apps menu to members "
|
||||||
"only."
|
"only."
|
||||||
msgstr "تأشير هذا الخِيار سيجعل الوصول إلى الإضافات في قائمة التطبيقات للأعضاء فقط."
|
msgstr "تأشير هذا الخِيار سيجعل الوصول إلى الإضافات في قائمة التطبيقات للأعضاء فقط."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:555
|
#: src/Module/Admin/Site.php:489
|
||||||
msgid "Don't embed private images in posts"
|
msgid "Don't embed private images in posts"
|
||||||
msgstr "لا تضمن الصور الخاصة في المشاركات"
|
msgstr "لا تضمن الصور الخاصة في المشاركات"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:555
|
#: src/Module/Admin/Site.php:489
|
||||||
msgid ""
|
msgid ""
|
||||||
"Don't replace locally-hosted private photos in posts with an embedded copy "
|
"Don't replace locally-hosted private photos in posts with an embedded copy "
|
||||||
"of the image. This means that contacts who receive posts containing private "
|
"of the image. This means that contacts who receive posts containing private "
|
||||||
|
|
@ -5935,11 +5553,11 @@ msgid ""
|
||||||
"while."
|
"while."
|
||||||
msgstr "لا تستبدل الصور الخاصة المستضافة محليًا في المشاركات بنسخة مضمنة ، لأن هذا يعني أن المتراسلين الذين يتلقون المشاركات التي تحوي تلك الصور ستحتاج إلى مصادقة لرؤية كل صورة ، ما قد يستغرق بعض الوقت."
|
msgstr "لا تستبدل الصور الخاصة المستضافة محليًا في المشاركات بنسخة مضمنة ، لأن هذا يعني أن المتراسلين الذين يتلقون المشاركات التي تحوي تلك الصور ستحتاج إلى مصادقة لرؤية كل صورة ، ما قد يستغرق بعض الوقت."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:556
|
#: src/Module/Admin/Site.php:490
|
||||||
msgid "Explicit Content"
|
msgid "Explicit Content"
|
||||||
msgstr "محتوى حساس"
|
msgstr "محتوى حساس"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:556
|
#: src/Module/Admin/Site.php:490
|
||||||
msgid ""
|
msgid ""
|
||||||
"Set this to announce that your node is used mostly for explicit content that"
|
"Set this to announce that your node is used mostly for explicit content that"
|
||||||
" might not be suited for minors. This information will be published in the "
|
" might not be suited for minors. This information will be published in the "
|
||||||
|
|
@ -5948,257 +5566,257 @@ msgid ""
|
||||||
"will be shown at the user registration page."
|
"will be shown at the user registration page."
|
||||||
msgstr "عيّن هذا الخيار للإعلان عن أن عقدتك تحتوي محتوى حساس قد لا يكون مناسباً للقصر. وسوف تنشر هذه المعلومات في معلومات العقدة وصفحة التسجيل، ويستخدم هذا الخيار في الدليل العالمي، فأثناء استعراض هذه العقدة في الدليل ستظهر لهم هذه المعلومة."
|
msgstr "عيّن هذا الخيار للإعلان عن أن عقدتك تحتوي محتوى حساس قد لا يكون مناسباً للقصر. وسوف تنشر هذه المعلومات في معلومات العقدة وصفحة التسجيل، ويستخدم هذا الخيار في الدليل العالمي، فأثناء استعراض هذه العقدة في الدليل ستظهر لهم هذه المعلومة."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:557
|
#: src/Module/Admin/Site.php:491
|
||||||
msgid "Proxify external content"
|
msgid "Proxify external content"
|
||||||
msgstr "توجيه المحتوى الخارجي عبر الوكيل"
|
msgstr "توجيه المحتوى الخارجي عبر الوكيل"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:557
|
#: src/Module/Admin/Site.php:491
|
||||||
msgid ""
|
msgid ""
|
||||||
"Route external content via the proxy functionality. This is used for example"
|
"Route external content via the proxy functionality. This is used for example"
|
||||||
" for some OEmbed accesses and in some other rare cases."
|
" for some OEmbed accesses and in some other rare cases."
|
||||||
msgstr "توجيه المحتوى الخارجي عن طريق وميل. يستخدم هذا على سبيل المثال وصول OEmbed وفي بعض الحالات النادرة الأخرى."
|
msgstr "توجيه المحتوى الخارجي عن طريق وميل. يستخدم هذا على سبيل المثال وصول OEmbed وفي بعض الحالات النادرة الأخرى."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:558
|
#: src/Module/Admin/Site.php:492
|
||||||
msgid "Cache contact avatars"
|
msgid "Cache contact avatars"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:558
|
#: src/Module/Admin/Site.php:492
|
||||||
msgid ""
|
msgid ""
|
||||||
"Locally store the avatar pictures of the contacts. This uses a lot of "
|
"Locally store the avatar pictures of the contacts. This uses a lot of "
|
||||||
"storage space but it increases the performance."
|
"storage space but it increases the performance."
|
||||||
msgstr "خزن الصور الرمزية محليًا. يحجز مساحة كبير ولكنه يزيد الأداء."
|
msgstr "خزن الصور الرمزية محليًا. يحجز مساحة كبير ولكنه يزيد الأداء."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:559
|
#: src/Module/Admin/Site.php:493
|
||||||
msgid "Allow Users to set remote_self"
|
msgid "Allow Users to set remote_self"
|
||||||
msgstr "اسمح للمستخدمين بتعيين remote_self"
|
msgstr "اسمح للمستخدمين بتعيين remote_self"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:559
|
#: src/Module/Admin/Site.php:493
|
||||||
msgid ""
|
msgid ""
|
||||||
"With checking this, every user is allowed to mark every contact as a "
|
"With checking this, every user is allowed to mark every contact as a "
|
||||||
"remote_self in the repair contact dialog. Setting this flag on a contact "
|
"remote_self in the repair contact dialog. Setting this flag on a contact "
|
||||||
"causes mirroring every posting of that contact in the users stream."
|
"causes mirroring every posting of that contact in the users stream."
|
||||||
msgstr "يتيح تأشير هذا المربع للميتخدمين تعريف مل المتراسلين علئ أنهم remote_self في مربع حوار اصلاح المتراسلين. سيؤدي تنشيط هذه الميزة على متراسل إلى نسخ جميع منشوراته في دفق المستخدم."
|
msgstr "يتيح تأشير هذا المربع للميتخدمين تعريف مل المتراسلين علئ أنهم remote_self في مربع حوار اصلاح المتراسلين. سيؤدي تنشيط هذه الميزة على متراسل إلى نسخ جميع منشوراته في دفق المستخدم."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:560
|
#: src/Module/Admin/Site.php:494
|
||||||
msgid "Enable multiple registrations"
|
msgid "Enable multiple registrations"
|
||||||
msgstr "فعّل تعدد التسجيل"
|
msgstr "فعّل تعدد التسجيل"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:560
|
#: src/Module/Admin/Site.php:494
|
||||||
msgid "Enable users to register additional accounts for use as pages."
|
msgid "Enable users to register additional accounts for use as pages."
|
||||||
msgstr "يمكن المستخدمين من تسجيل حسابات إضافية لتستخدم كصفحات."
|
msgstr "يمكن المستخدمين من تسجيل حسابات إضافية لتستخدم كصفحات."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:561
|
#: src/Module/Admin/Site.php:495
|
||||||
msgid "Enable OpenID"
|
msgid "Enable OpenID"
|
||||||
msgstr "فعّل OpenID"
|
msgstr "فعّل OpenID"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:561
|
#: src/Module/Admin/Site.php:495
|
||||||
msgid "Enable OpenID support for registration and logins."
|
msgid "Enable OpenID support for registration and logins."
|
||||||
msgstr "فعّل دعم OpenID للتسجيل والولوج."
|
msgstr "فعّل دعم OpenID للتسجيل والولوج."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:562
|
#: src/Module/Admin/Site.php:496
|
||||||
msgid "Enable Fullname check"
|
msgid "Enable Fullname check"
|
||||||
msgstr "افرض استخدام الأسماء الكاملة"
|
msgstr "افرض استخدام الأسماء الكاملة"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:562
|
#: src/Module/Admin/Site.php:496
|
||||||
msgid ""
|
msgid ""
|
||||||
"Enable check to only allow users to register with a space between the first "
|
"Enable check to only allow users to register with a space between the first "
|
||||||
"name and the last name in their full name."
|
"name and the last name in their full name."
|
||||||
msgstr "يفرض على المستخدمين تضمين مسافة واحدة في اسم المستخدم الخاص بهم بين الاسم الأول والاسم الأخير."
|
msgstr "يفرض على المستخدمين تضمين مسافة واحدة في اسم المستخدم الخاص بهم بين الاسم الأول والاسم الأخير."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:563
|
#: src/Module/Admin/Site.php:497
|
||||||
msgid "Community pages for visitors"
|
msgid "Community pages for visitors"
|
||||||
msgstr "عرض صفحة المجتمع للزوار"
|
msgstr "عرض صفحة المجتمع للزوار"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:563
|
#: src/Module/Admin/Site.php:497
|
||||||
msgid ""
|
msgid ""
|
||||||
"Which community pages should be available for visitors. Local users always "
|
"Which community pages should be available for visitors. Local users always "
|
||||||
"see both pages."
|
"see both pages."
|
||||||
msgstr "صفحات المجتمع المتاحة للزوار. المستخدمون المحليون يمكنهم مشاهدة كلا النوعين."
|
msgstr "صفحات المجتمع المتاحة للزوار. المستخدمون المحليون يمكنهم مشاهدة كلا النوعين."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:564
|
#: src/Module/Admin/Site.php:498
|
||||||
msgid "Posts per user on community page"
|
msgid "Posts per user on community page"
|
||||||
msgstr "حد المشاركات لكل مستخدم في صفحة المجتمع"
|
msgstr "حد المشاركات لكل مستخدم في صفحة المجتمع"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:564
|
#: src/Module/Admin/Site.php:498
|
||||||
msgid ""
|
msgid ""
|
||||||
"The maximum number of posts per user on the community page. (Not valid for "
|
"The maximum number of posts per user on the community page. (Not valid for "
|
||||||
"\"Global Community\")"
|
"\"Global Community\")"
|
||||||
msgstr "الحد الأقصى لعدد المشاركات لكل مستخدم في صفحة المجتمع المحلي"
|
msgstr "الحد الأقصى لعدد المشاركات لكل مستخدم في صفحة المجتمع المحلي"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:566
|
#: src/Module/Admin/Site.php:500
|
||||||
msgid "Enable Mail support"
|
msgid "Enable Mail support"
|
||||||
msgstr "فعّل دعم البريد الإلكتروني"
|
msgstr "فعّل دعم البريد الإلكتروني"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:566
|
#: src/Module/Admin/Site.php:500
|
||||||
msgid ""
|
msgid ""
|
||||||
"Enable built-in mail support to poll IMAP folders and to reply via mail."
|
"Enable built-in mail support to poll IMAP folders and to reply via mail."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:567
|
#: src/Module/Admin/Site.php:501
|
||||||
msgid ""
|
msgid ""
|
||||||
"Mail support can't be enabled because the PHP IMAP module is not installed."
|
"Mail support can't be enabled because the PHP IMAP module is not installed."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:568
|
#: src/Module/Admin/Site.php:502
|
||||||
msgid "Enable OStatus support"
|
msgid "Enable OStatus support"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:568
|
#: src/Module/Admin/Site.php:502
|
||||||
msgid ""
|
msgid ""
|
||||||
"Enable built-in OStatus (StatusNet, GNU Social etc.) compatibility. All "
|
"Enable built-in OStatus (StatusNet, GNU Social etc.) compatibility. All "
|
||||||
"communications in OStatus are public."
|
"communications in OStatus are public."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:570
|
#: src/Module/Admin/Site.php:504
|
||||||
msgid ""
|
msgid ""
|
||||||
"Diaspora support can't be enabled because Friendica was installed into a sub"
|
"Diaspora support can't be enabled because Friendica was installed into a sub"
|
||||||
" directory."
|
" directory."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:571
|
#: src/Module/Admin/Site.php:505
|
||||||
msgid "Enable Diaspora support"
|
msgid "Enable Diaspora support"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:571
|
#: src/Module/Admin/Site.php:505
|
||||||
msgid ""
|
msgid ""
|
||||||
"Enable built-in Diaspora network compatibility for communicating with "
|
"Enable built-in Diaspora network compatibility for communicating with "
|
||||||
"diaspora servers."
|
"diaspora servers."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:572
|
#: src/Module/Admin/Site.php:506
|
||||||
msgid "Verify SSL"
|
msgid "Verify SSL"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:572
|
#: src/Module/Admin/Site.php:506
|
||||||
msgid ""
|
msgid ""
|
||||||
"If you wish, you can turn on strict certificate checking. This will mean you"
|
"If you wish, you can turn on strict certificate checking. This will mean you"
|
||||||
" cannot connect (at all) to self-signed SSL sites."
|
" cannot connect (at all) to self-signed SSL sites."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:573
|
#: src/Module/Admin/Site.php:507
|
||||||
msgid "Proxy user"
|
msgid "Proxy user"
|
||||||
msgstr "مستخدم الوكيل"
|
msgstr "مستخدم الوكيل"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:573
|
#: src/Module/Admin/Site.php:507
|
||||||
msgid "User name for the proxy server."
|
msgid "User name for the proxy server."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:574
|
#: src/Module/Admin/Site.php:508
|
||||||
msgid "Proxy URL"
|
msgid "Proxy URL"
|
||||||
msgstr "رابط الوكيل"
|
msgstr "رابط الوكيل"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:574
|
#: src/Module/Admin/Site.php:508
|
||||||
msgid ""
|
msgid ""
|
||||||
"If you want to use a proxy server that Friendica should use to connect to "
|
"If you want to use a proxy server that Friendica should use to connect to "
|
||||||
"the network, put the URL of the proxy here."
|
"the network, put the URL of the proxy here."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:575
|
#: src/Module/Admin/Site.php:509
|
||||||
msgid "Network timeout"
|
msgid "Network timeout"
|
||||||
msgstr "انتهت مهلة الاتصال بالشبكة"
|
msgstr "انتهت مهلة الاتصال بالشبكة"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:575
|
#: src/Module/Admin/Site.php:509
|
||||||
msgid "Value is in seconds. Set to 0 for unlimited (not recommended)."
|
msgid "Value is in seconds. Set to 0 for unlimited (not recommended)."
|
||||||
msgstr "القيمة بالثواني. تعيينها لـ 0 يعني مهلة غير محدودة (غير مستحسن)."
|
msgstr "القيمة بالثواني. تعيينها لـ 0 يعني مهلة غير محدودة (غير مستحسن)."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:576
|
#: src/Module/Admin/Site.php:510
|
||||||
msgid "Maximum Load Average"
|
msgid "Maximum Load Average"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:576
|
#: src/Module/Admin/Site.php:510
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Maximum system load before delivery and poll processes are deferred - "
|
"Maximum system load before delivery and poll processes are deferred - "
|
||||||
"default %d."
|
"default %d."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:577
|
#: src/Module/Admin/Site.php:511
|
||||||
msgid "Minimal Memory"
|
msgid "Minimal Memory"
|
||||||
msgstr "الحد الأدنى للذاكرة"
|
msgstr "الحد الأدنى للذاكرة"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:577
|
#: src/Module/Admin/Site.php:511
|
||||||
msgid ""
|
msgid ""
|
||||||
"Minimal free memory in MB for the worker. Needs access to /proc/meminfo - "
|
"Minimal free memory in MB for the worker. Needs access to /proc/meminfo - "
|
||||||
"default 0 (deactivated)."
|
"default 0 (deactivated)."
|
||||||
msgstr "الحد الأدنى لذاكرة الحرة للمهمة بالميغابايت. تحتاج إذن الوصول إلى /proc/meminfo - الافتراضي 0 (معطل)."
|
msgstr "الحد الأدنى لذاكرة الحرة للمهمة بالميغابايت. تحتاج إذن الوصول إلى /proc/meminfo - الافتراضي 0 (معطل)."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:578
|
#: src/Module/Admin/Site.php:512
|
||||||
msgid "Periodically optimize tables"
|
msgid "Periodically optimize tables"
|
||||||
msgstr "تحسين الجداول بصفة دورية"
|
msgstr "تحسين الجداول بصفة دورية"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:578
|
#: src/Module/Admin/Site.php:512
|
||||||
msgid "Periodically optimize tables like the cache and the workerqueue"
|
msgid "Periodically optimize tables like the cache and the workerqueue"
|
||||||
msgstr "حسن بانتظام بعض جداول قاعدة البيانات المستخدمة على نطاق واسع مثل ذاكرة التخزين المؤقت أو الأقفال أو الجلسة أو طابور المهام"
|
msgstr "حسن بانتظام بعض جداول قاعدة البيانات المستخدمة على نطاق واسع مثل ذاكرة التخزين المؤقت أو الأقفال أو الجلسة أو طابور المهام"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:580
|
#: src/Module/Admin/Site.php:514
|
||||||
msgid "Discover followers/followings from contacts"
|
msgid "Discover followers/followings from contacts"
|
||||||
msgstr "اكتشف قائمة متابِعي/متابَعي متراسليك"
|
msgstr "اكتشف قائمة متابِعي/متابَعي متراسليك"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:580
|
#: src/Module/Admin/Site.php:514
|
||||||
msgid ""
|
msgid ""
|
||||||
"If enabled, contacts are checked for their followers and following contacts."
|
"If enabled, contacts are checked for their followers and following contacts."
|
||||||
msgstr "اذا فُعل سيقوم هذا الخادم بتجميع قائمة متابِعي ومتابَعي متراسليك."
|
msgstr "اذا فُعل سيقوم هذا الخادم بتجميع قائمة متابِعي ومتابَعي متراسليك."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:581
|
#: src/Module/Admin/Site.php:515
|
||||||
msgid "None - deactivated"
|
msgid "None - deactivated"
|
||||||
msgstr "لا شيء - معطل"
|
msgstr "لا شيء - معطل"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:582
|
#: src/Module/Admin/Site.php:516
|
||||||
msgid ""
|
msgid ""
|
||||||
"Local contacts - contacts of our local contacts are discovered for their "
|
"Local contacts - contacts of our local contacts are discovered for their "
|
||||||
"followers/followings."
|
"followers/followings."
|
||||||
msgstr "المتراسلون المحليون - متراسلوا مستخدمي هذا الخادم."
|
msgstr "المتراسلون المحليون - متراسلوا مستخدمي هذا الخادم."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:583
|
#: src/Module/Admin/Site.php:517
|
||||||
msgid ""
|
msgid ""
|
||||||
"Interactors - contacts of our local contacts and contacts who interacted on "
|
"Interactors - contacts of our local contacts and contacts who interacted on "
|
||||||
"locally visible postings are discovered for their followers/followings."
|
"locally visible postings are discovered for their followers/followings."
|
||||||
msgstr "المتفاعلون: متراسلو مستخدمي هذا الخادم والمتراسلون الذين تفاعلوا مع المشاركات المحلية لهذا الخادم."
|
msgstr "المتفاعلون: متراسلو مستخدمي هذا الخادم والمتراسلون الذين تفاعلوا مع المشاركات المحلية لهذا الخادم."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:585
|
#: src/Module/Admin/Site.php:519
|
||||||
msgid "Synchronize the contacts with the directory server"
|
msgid "Synchronize the contacts with the directory server"
|
||||||
msgstr "زامن المتراسلين مع خادم الدليل"
|
msgstr "زامن المتراسلين مع خادم الدليل"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:585
|
#: src/Module/Admin/Site.php:519
|
||||||
msgid ""
|
msgid ""
|
||||||
"if enabled, the system will check periodically for new contacts on the "
|
"if enabled, the system will check periodically for new contacts on the "
|
||||||
"defined directory server."
|
"defined directory server."
|
||||||
msgstr "إذا فُعل سيقوم النظام بالتحقق دوريا للبحث عن متراسلين جدد على خادم الدليل المحدد."
|
msgstr "إذا فُعل سيقوم النظام بالتحقق دوريا للبحث عن متراسلين جدد على خادم الدليل المحدد."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:587
|
#: src/Module/Admin/Site.php:521
|
||||||
msgid "Days between requery"
|
msgid "Days between requery"
|
||||||
msgstr "المهلة بالأيام بين الطلبات"
|
msgstr "المهلة بالأيام بين الطلبات"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:587
|
#: src/Module/Admin/Site.php:521
|
||||||
msgid "Number of days after which a server is requeried for his contacts."
|
msgid "Number of days after which a server is requeried for his contacts."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:588
|
#: src/Module/Admin/Site.php:522
|
||||||
msgid "Discover contacts from other servers"
|
msgid "Discover contacts from other servers"
|
||||||
msgstr "اكتشف متراسلين من خوادم أخرى"
|
msgstr "اكتشف متراسلين من خوادم أخرى"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:588
|
#: src/Module/Admin/Site.php:522
|
||||||
msgid ""
|
msgid ""
|
||||||
"Periodically query other servers for contacts. The system queries Friendica,"
|
"Periodically query other servers for contacts. The system queries Friendica,"
|
||||||
" Mastodon and Hubzilla servers."
|
" Mastodon and Hubzilla servers."
|
||||||
msgstr "يجلب دوريا متراسلين من خوادم أخرى. يُطبّق على خوادم فرنديكا وماستدون وهوبزيلا."
|
msgstr "يجلب دوريا متراسلين من خوادم أخرى. يُطبّق على خوادم فرنديكا وماستدون وهوبزيلا."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:589
|
#: src/Module/Admin/Site.php:523
|
||||||
msgid "Search the local directory"
|
msgid "Search the local directory"
|
||||||
msgstr "ابحث في الدليل المحلي"
|
msgstr "ابحث في الدليل المحلي"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:589
|
#: src/Module/Admin/Site.php:523
|
||||||
msgid ""
|
msgid ""
|
||||||
"Search the local directory instead of the global directory. When searching "
|
"Search the local directory instead of the global directory. When searching "
|
||||||
"locally, every search will be executed on the global directory in the "
|
"locally, every search will be executed on the global directory in the "
|
||||||
"background. This improves the search results when the search is repeated."
|
"background. This improves the search results when the search is repeated."
|
||||||
msgstr "يبحث في الدليل المحلي بدلاً من الدليل العالمي. عند إجراء بحث محلي ، يجرى نفس البحث في الدليل العالمي في الخلفية. هذا يحسن نتائج البحث إذا تكررت."
|
msgstr "يبحث في الدليل المحلي بدلاً من الدليل العالمي. عند إجراء بحث محلي ، يجرى نفس البحث في الدليل العالمي في الخلفية. هذا يحسن نتائج البحث إذا تكررت."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:591
|
#: src/Module/Admin/Site.php:525
|
||||||
msgid "Publish server information"
|
msgid "Publish server information"
|
||||||
msgstr "انشر معلومات الخادم"
|
msgstr "انشر معلومات الخادم"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:591
|
#: src/Module/Admin/Site.php:525
|
||||||
msgid ""
|
msgid ""
|
||||||
"If enabled, general server and usage data will be published. The data "
|
"If enabled, general server and usage data will be published. The data "
|
||||||
"contains the name and version of the server, number of users with public "
|
"contains the name and version of the server, number of users with public "
|
||||||
|
|
@ -6206,50 +5824,50 @@ msgid ""
|
||||||
" href=\"http://the-federation.info/\">the-federation.info</a> for details."
|
" href=\"http://the-federation.info/\">the-federation.info</a> for details."
|
||||||
msgstr "إذا فعل ستنشر البيانات العامة للخادم وبيانات استخدامه. تحتوي هذه البيانات على اسم وإصدار الخادم ، وعدد المستخدمين الذين لهم ملف شخصي علني، وعدد المنشورات وقائمة الموصّلات والموافيق النشطة. راجع <a href=\"http://the-federation.info/\">federation.info</a> للحصول على التفاصيل."
|
msgstr "إذا فعل ستنشر البيانات العامة للخادم وبيانات استخدامه. تحتوي هذه البيانات على اسم وإصدار الخادم ، وعدد المستخدمين الذين لهم ملف شخصي علني، وعدد المنشورات وقائمة الموصّلات والموافيق النشطة. راجع <a href=\"http://the-federation.info/\">federation.info</a> للحصول على التفاصيل."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:593
|
#: src/Module/Admin/Site.php:527
|
||||||
msgid "Check upstream version"
|
msgid "Check upstream version"
|
||||||
msgstr "تحقق من الاصدار المنبعي"
|
msgstr "تحقق من الاصدار المنبعي"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:593
|
#: src/Module/Admin/Site.php:527
|
||||||
msgid ""
|
msgid ""
|
||||||
"Enables checking for new Friendica versions at github. If there is a new "
|
"Enables checking for new Friendica versions at github. If there is a new "
|
||||||
"version, you will be informed in the admin panel overview."
|
"version, you will be informed in the admin panel overview."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:594
|
#: src/Module/Admin/Site.php:528
|
||||||
msgid "Suppress Tags"
|
msgid "Suppress Tags"
|
||||||
msgstr "اخف الوسوم"
|
msgstr "اخف الوسوم"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:594
|
#: src/Module/Admin/Site.php:528
|
||||||
msgid "Suppress showing a list of hashtags at the end of the posting."
|
msgid "Suppress showing a list of hashtags at the end of the posting."
|
||||||
msgstr "اخف قائمة الوسوم من أسفل المشاركة."
|
msgstr "اخف قائمة الوسوم من أسفل المشاركة."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:595
|
#: src/Module/Admin/Site.php:529
|
||||||
msgid "Clean database"
|
msgid "Clean database"
|
||||||
msgstr "امسح قاعدة البيانات"
|
msgstr "امسح قاعدة البيانات"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:595
|
#: src/Module/Admin/Site.php:529
|
||||||
msgid ""
|
msgid ""
|
||||||
"Remove old remote items, orphaned database records and old content from some"
|
"Remove old remote items, orphaned database records and old content from some"
|
||||||
" other helper tables."
|
" other helper tables."
|
||||||
msgstr "يزيل العناصر البعيدة القديمة والسجلات اليتيمة والمحتوى القديم من بعض الجداول المساعدة."
|
msgstr "يزيل العناصر البعيدة القديمة والسجلات اليتيمة والمحتوى القديم من بعض الجداول المساعدة."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:596
|
#: src/Module/Admin/Site.php:530
|
||||||
msgid "Lifespan of remote items"
|
msgid "Lifespan of remote items"
|
||||||
msgstr "عمر العناصر البعيدة"
|
msgstr "عمر العناصر البعيدة"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:596
|
#: src/Module/Admin/Site.php:530
|
||||||
msgid ""
|
msgid ""
|
||||||
"When the database cleanup is enabled, this defines the days after which "
|
"When the database cleanup is enabled, this defines the days after which "
|
||||||
"remote items will be deleted. Own items, and marked or filed items are "
|
"remote items will be deleted. Own items, and marked or filed items are "
|
||||||
"always kept. 0 disables this behaviour."
|
"always kept. 0 disables this behaviour."
|
||||||
msgstr "إذا كان تنظيف قاعدة البيانات مفعلًا ، فإن هذه القيمة تمثل المهلة بالأيام لحذف العناصر البعيدة. يتم دائمًا الاحتفاظ بالعناصر المحلية والمفضلة والمؤرشفة. أدخل 0 لتعطيله."
|
msgstr "إذا كان تنظيف قاعدة البيانات مفعلًا ، فإن هذه القيمة تمثل المهلة بالأيام لحذف العناصر البعيدة. يتم دائمًا الاحتفاظ بالعناصر المحلية والمفضلة والمؤرشفة. أدخل 0 لتعطيله."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:597
|
#: src/Module/Admin/Site.php:531
|
||||||
msgid "Lifespan of unclaimed items"
|
msgid "Lifespan of unclaimed items"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:597
|
#: src/Module/Admin/Site.php:531
|
||||||
msgid ""
|
msgid ""
|
||||||
"When the database cleanup is enabled, this defines the days after which "
|
"When the database cleanup is enabled, this defines the days after which "
|
||||||
"unclaimed remote items (mostly content from the relay) will be deleted. "
|
"unclaimed remote items (mostly content from the relay) will be deleted. "
|
||||||
|
|
@ -6257,144 +5875,134 @@ msgid ""
|
||||||
"items if set to 0."
|
"items if set to 0."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:598
|
#: src/Module/Admin/Site.php:532
|
||||||
msgid "Lifespan of raw conversation data"
|
msgid "Lifespan of raw conversation data"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:598
|
#: src/Module/Admin/Site.php:532
|
||||||
msgid ""
|
msgid ""
|
||||||
"The conversation data is used for ActivityPub and OStatus, as well as for "
|
"The conversation data is used for ActivityPub and OStatus, as well as for "
|
||||||
"debug purposes. It should be safe to remove it after 14 days, default is 90 "
|
"debug purposes. It should be safe to remove it after 14 days, default is 90 "
|
||||||
"days."
|
"days."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:599
|
#: src/Module/Admin/Site.php:533
|
||||||
msgid "Maximum numbers of comments per post"
|
msgid "Maximum numbers of comments per post"
|
||||||
msgstr "حد عدد التعليقات لكل مشاركة"
|
msgstr "حد عدد التعليقات لكل مشاركة"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:599
|
#: src/Module/Admin/Site.php:533
|
||||||
msgid "How much comments should be shown for each post? Default value is 100."
|
msgid "How much comments should be shown for each post? Default value is 100."
|
||||||
msgstr "عدد التعليقات التي تعرض لكل مشاركة؟ القيمة الافتراضية هي 100."
|
msgstr "عدد التعليقات التي تعرض لكل مشاركة؟ القيمة الافتراضية هي 100."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:600
|
#: src/Module/Admin/Site.php:534
|
||||||
msgid "Maximum numbers of comments per post on the display page"
|
msgid "Maximum numbers of comments per post on the display page"
|
||||||
msgstr "الحد الأقصى لعدد التعليقات لكل محادثة في صفحة العرض (/display)"
|
msgstr "الحد الأقصى لعدد التعليقات لكل محادثة في صفحة العرض (/display)"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:600
|
#: src/Module/Admin/Site.php:534
|
||||||
msgid ""
|
msgid ""
|
||||||
"How many comments should be shown on the single view for each post? Default "
|
"How many comments should be shown on the single view for each post? Default "
|
||||||
"value is 1000."
|
"value is 1000."
|
||||||
msgstr "عدد التعليقات المعروضة في سياق المشاركة، القيمة الافتراضية هي 1000."
|
msgstr "عدد التعليقات المعروضة في سياق المشاركة، القيمة الافتراضية هي 1000."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:601
|
#: src/Module/Admin/Site.php:535
|
||||||
msgid "Temp path"
|
msgid "Temp path"
|
||||||
msgstr "مسار التخزين المؤقت"
|
msgstr "مسار التخزين المؤقت"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:601
|
#: src/Module/Admin/Site.php:535
|
||||||
msgid ""
|
msgid ""
|
||||||
"If you have a restricted system where the webserver can't access the system "
|
"If you have a restricted system where the webserver can't access the system "
|
||||||
"temp path, enter another path here."
|
"temp path, enter another path here."
|
||||||
msgstr "إذا كان نظامك مقيد حيث لا يستطيع خادم الويب الوصول إلى مسار مجلد التخزين المؤقت (temp)، أدخل مسار آخر هنا."
|
msgstr "إذا كان نظامك مقيد حيث لا يستطيع خادم الويب الوصول إلى مسار مجلد التخزين المؤقت (temp)، أدخل مسار آخر هنا."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:602
|
#: src/Module/Admin/Site.php:536
|
||||||
msgid "Only search in tags"
|
msgid "Only search in tags"
|
||||||
msgstr "ابحث في الوسوم فقط"
|
msgstr "ابحث في الوسوم فقط"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:602
|
#: src/Module/Admin/Site.php:536
|
||||||
msgid "On large systems the text search can slow down the system extremely."
|
msgid "On large systems the text search can slow down the system extremely."
|
||||||
msgstr "في النّظم الكبيرة، يمكن أن يؤدي البحث عن النصوص إلى إبطاء النظام."
|
msgstr "في النّظم الكبيرة، يمكن أن يؤدي البحث عن النصوص إلى إبطاء النظام."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:604
|
#: src/Module/Admin/Site.php:538
|
||||||
msgid "New base url"
|
|
||||||
msgstr "رابط أساسي جديد"
|
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:604
|
|
||||||
msgid ""
|
|
||||||
"Change base url for this server. Sends relocate message to all Friendica and"
|
|
||||||
" Diaspora* contacts of all users."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:606
|
|
||||||
msgid "Maximum number of parallel workers"
|
msgid "Maximum number of parallel workers"
|
||||||
msgstr "الحد الأقصى لعدد المهام"
|
msgstr "الحد الأقصى لعدد المهام"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:606
|
#: src/Module/Admin/Site.php:538
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"On shared hosters set this to %d. On larger systems, values of %d are great."
|
"On shared hosters set this to %d. On larger systems, values of %d are great."
|
||||||
" Default value is %d."
|
" Default value is %d."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:607
|
#: src/Module/Admin/Site.php:539
|
||||||
msgid "Enable fastlane"
|
msgid "Enable fastlane"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:607
|
#: src/Module/Admin/Site.php:539
|
||||||
msgid ""
|
msgid ""
|
||||||
"When enabed, the fastlane mechanism starts an additional worker if processes"
|
"When enabed, the fastlane mechanism starts an additional worker if processes"
|
||||||
" with higher priority are blocked by processes of lower priority."
|
" with higher priority are blocked by processes of lower priority."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:609
|
#: src/Module/Admin/Site.php:541
|
||||||
msgid "Direct relay transfer"
|
msgid "Direct relay transfer"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:609
|
#: src/Module/Admin/Site.php:541
|
||||||
msgid ""
|
msgid ""
|
||||||
"Enables the direct transfer to other servers without using the relay servers"
|
"Enables the direct transfer to other servers without using the relay servers"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:610
|
#: src/Module/Admin/Site.php:542
|
||||||
msgid "Relay scope"
|
msgid "Relay scope"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:610
|
#: src/Module/Admin/Site.php:542
|
||||||
msgid ""
|
msgid ""
|
||||||
"Can be \"all\" or \"tags\". \"all\" means that every public post should be "
|
"Can be \"all\" or \"tags\". \"all\" means that every public post should be "
|
||||||
"received. \"tags\" means that only posts with selected tags should be "
|
"received. \"tags\" means that only posts with selected tags should be "
|
||||||
"received."
|
"received."
|
||||||
msgstr "إما أن يكون \"الكل\" أو \"الوسوم\". يعني \"الكل\" وُجوب تلقي كل المشاركات العلنية. تعني \"الوسوم\" وجوب تلقي المشاركات ذات الوسوم المحددة فقط."
|
msgstr "إما أن يكون \"الكل\" أو \"الوسوم\". يعني \"الكل\" وُجوب تلقي كل المشاركات العلنية. تعني \"الوسوم\" وجوب تلقي المشاركات ذات الوسوم المحددة فقط."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:610 src/Module/Contact/Profile.php:273
|
#: src/Module/Admin/Site.php:542 src/Module/Contact/Profile.php:273
|
||||||
#: src/Module/Settings/TwoFactor/Index.php:118
|
#: src/Module/Settings/TwoFactor/Index.php:118
|
||||||
msgid "Disabled"
|
msgid "Disabled"
|
||||||
msgstr "معطّل"
|
msgstr "معطّل"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:610
|
#: src/Module/Admin/Site.php:542
|
||||||
msgid "all"
|
msgid "all"
|
||||||
msgstr "الكل"
|
msgstr "الكل"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:610
|
#: src/Module/Admin/Site.php:542
|
||||||
msgid "tags"
|
msgid "tags"
|
||||||
msgstr "الوسوم"
|
msgstr "الوسوم"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:611
|
#: src/Module/Admin/Site.php:543
|
||||||
msgid "Server tags"
|
msgid "Server tags"
|
||||||
msgstr "وسوم الخادم"
|
msgstr "وسوم الخادم"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:611
|
#: src/Module/Admin/Site.php:543
|
||||||
msgid "Comma separated list of tags for the \"tags\" subscription."
|
msgid "Comma separated list of tags for the \"tags\" subscription."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:612
|
#: src/Module/Admin/Site.php:544
|
||||||
msgid "Deny Server tags"
|
msgid "Deny Server tags"
|
||||||
msgstr "الوسوم المرفوضة"
|
msgstr "الوسوم المرفوضة"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:612
|
#: src/Module/Admin/Site.php:544
|
||||||
msgid "Comma separated list of tags that are rejected."
|
msgid "Comma separated list of tags that are rejected."
|
||||||
msgstr "قائمة بالوسوم المرفوضة مفصول بفاصلة."
|
msgstr "قائمة بالوسوم المرفوضة مفصول بفاصلة."
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:613
|
#: src/Module/Admin/Site.php:545
|
||||||
msgid "Allow user tags"
|
msgid "Allow user tags"
|
||||||
msgstr "اسمح بوسوم المستخدمين"
|
msgstr "اسمح بوسوم المستخدمين"
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:613
|
#: src/Module/Admin/Site.php:545
|
||||||
msgid ""
|
msgid ""
|
||||||
"If enabled, the tags from the saved searches will used for the \"tags\" "
|
"If enabled, the tags from the saved searches will used for the \"tags\" "
|
||||||
"subscription in addition to the \"relay_server_tags\"."
|
"subscription in addition to the \"relay_server_tags\"."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Site.php:616
|
#: src/Module/Admin/Site.php:548
|
||||||
msgid "Start Relocation"
|
msgid "Start Relocation"
|
||||||
msgstr "ابدأ النقل"
|
msgstr "ابدأ النقل"
|
||||||
|
|
||||||
|
|
@ -6444,12 +6052,12 @@ msgstr ""
|
||||||
msgid "Database (legacy)"
|
msgid "Database (legacy)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Summary.php:53
|
#: src/Module/Admin/Summary.php:54
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Template engine (%s) error: %s"
|
msgid "Template engine (%s) error: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Summary.php:57
|
#: src/Module/Admin/Summary.php:58
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Your DB still runs with MyISAM tables. You should change the engine type to "
|
"Your DB still runs with MyISAM tables. You should change the engine type to "
|
||||||
|
|
@ -6460,7 +6068,7 @@ msgid ""
|
||||||
" an automatic conversion.<br />"
|
" an automatic conversion.<br />"
|
||||||
msgstr "تستخدم قاعدة البيانات جداول MYISAM. يجب عليك تغيير المحرك إلى InnoDB حيث أنه من المخطط أن يستخدم فرنديكا ميزات منوطة بـ InnoDB في المستقبل.راجع <a href=\"%s\"> هذا الدليل </a> لتحديث قاعدة البيانات الخاصة بك. يمكنك أيضًا تشغيل الأمر <tt>php bin/console.php dbstructure toinnodb</tt> في دليل الجذر لفرنديكا للتحويل التلقائي.<br />"
|
msgstr "تستخدم قاعدة البيانات جداول MYISAM. يجب عليك تغيير المحرك إلى InnoDB حيث أنه من المخطط أن يستخدم فرنديكا ميزات منوطة بـ InnoDB في المستقبل.راجع <a href=\"%s\"> هذا الدليل </a> لتحديث قاعدة البيانات الخاصة بك. يمكنك أيضًا تشغيل الأمر <tt>php bin/console.php dbstructure toinnodb</tt> في دليل الجذر لفرنديكا للتحويل التلقائي.<br />"
|
||||||
|
|
||||||
#: src/Module/Admin/Summary.php:62
|
#: src/Module/Admin/Summary.php:63
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Your DB still runs with InnoDB tables in the Antelope file format. You "
|
"Your DB still runs with InnoDB tables in the Antelope file format. You "
|
||||||
|
|
@ -6471,7 +6079,7 @@ msgid ""
|
||||||
" installation for an automatic conversion.<br />"
|
" installation for an automatic conversion.<br />"
|
||||||
msgstr "تستخدم قاعدة البيانات جداول InnoDB بتنسيق Antelope. يجب عليك تغيير التنسيق إلى Barracuda حيث أن فرنديكا يستخدم ميزات منوطة بتنسيق Barracuda راجع <a href=\"%s\">هذا الدليل</a> لتحديث قاعدة البيانات. يمكنك أيضًا تشغيل الأمر <tt>php bin/console.php dbstructure toinnodb</tt> في دليل الجذر لفرنديكا للتحويل التلقائي.<br />"
|
msgstr "تستخدم قاعدة البيانات جداول InnoDB بتنسيق Antelope. يجب عليك تغيير التنسيق إلى Barracuda حيث أن فرنديكا يستخدم ميزات منوطة بتنسيق Barracuda راجع <a href=\"%s\">هذا الدليل</a> لتحديث قاعدة البيانات. يمكنك أيضًا تشغيل الأمر <tt>php bin/console.php dbstructure toinnodb</tt> في دليل الجذر لفرنديكا للتحويل التلقائي.<br />"
|
||||||
|
|
||||||
#: src/Module/Admin/Summary.php:72
|
#: src/Module/Admin/Summary.php:73
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Your table_definition_cache is too low (%d). This can lead to the database "
|
"Your table_definition_cache is too low (%d). This can lead to the database "
|
||||||
|
|
@ -6479,39 +6087,39 @@ msgid ""
|
||||||
" to %d. See <a href=\"%s\">here</a> for more information.<br />"
|
" to %d. See <a href=\"%s\">here</a> for more information.<br />"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Summary.php:82
|
#: src/Module/Admin/Summary.php:83
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"There is a new version of Friendica available for download. Your current "
|
"There is a new version of Friendica available for download. Your current "
|
||||||
"version is %1$s, upstream version is %2$s"
|
"version is %1$s, upstream version is %2$s"
|
||||||
msgstr "يتوفر إصدار جديد لفرنديكا. الإصدار الحالي هو %1$s والإصدار الجديد هو %2$s"
|
msgstr "يتوفر إصدار جديد لفرنديكا. الإصدار الحالي هو %1$s والإصدار الجديد هو %2$s"
|
||||||
|
|
||||||
#: src/Module/Admin/Summary.php:91
|
#: src/Module/Admin/Summary.php:92
|
||||||
msgid ""
|
msgid ""
|
||||||
"The database update failed. Please run \"php bin/console.php dbstructure "
|
"The database update failed. Please run \"php bin/console.php dbstructure "
|
||||||
"update\" from the command line and have a look at the errors that might "
|
"update\" from the command line and have a look at the errors that might "
|
||||||
"appear."
|
"appear."
|
||||||
msgstr "فشل تحديث قاعدة البيانات. رجاءً شغّل أمر \"php bin/console.php dbstructure update\" من سطر الأوامر وألق نظرة على الأخطاء التي قد تظهر."
|
msgstr "فشل تحديث قاعدة البيانات. رجاءً شغّل أمر \"php bin/console.php dbstructure update\" من سطر الأوامر وألق نظرة على الأخطاء التي قد تظهر."
|
||||||
|
|
||||||
#: src/Module/Admin/Summary.php:95
|
#: src/Module/Admin/Summary.php:96
|
||||||
msgid ""
|
msgid ""
|
||||||
"The last update failed. Please run \"php bin/console.php dbstructure "
|
"The last update failed. Please run \"php bin/console.php dbstructure "
|
||||||
"update\" from the command line and have a look at the errors that might "
|
"update\" from the command line and have a look at the errors that might "
|
||||||
"appear. (Some of the errors are possibly inside the logfile.)"
|
"appear. (Some of the errors are possibly inside the logfile.)"
|
||||||
msgstr "فشل آخر تحديث لقاعدة البيانات. رجاءً شغّل أمر \"php bin/console.php dbstructure update\" من سطر الأوامر وألق نظرة على الأخطاء التي قد تظهر. (قد تجد بعض الأخطاء في ملف السجل)"
|
msgstr "فشل آخر تحديث لقاعدة البيانات. رجاءً شغّل أمر \"php bin/console.php dbstructure update\" من سطر الأوامر وألق نظرة على الأخطاء التي قد تظهر. (قد تجد بعض الأخطاء في ملف السجل)"
|
||||||
|
|
||||||
#: src/Module/Admin/Summary.php:100
|
#: src/Module/Admin/Summary.php:101
|
||||||
msgid "The worker was never executed. Please check your database structure!"
|
msgid "The worker was never executed. Please check your database structure!"
|
||||||
msgstr "لم يتم تنفيذ المهمة أبداً. يرجى التحقق من بنية قاعدة البيانات!"
|
msgstr "لم يتم تنفيذ المهمة أبداً. يرجى التحقق من بنية قاعدة البيانات!"
|
||||||
|
|
||||||
#: src/Module/Admin/Summary.php:102
|
#: src/Module/Admin/Summary.php:103
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"The last worker execution was on %s UTC. This is older than one hour. Please"
|
"The last worker execution was on %s UTC. This is older than one hour. Please"
|
||||||
" check your crontab settings."
|
" check your crontab settings."
|
||||||
msgstr "تنفيذ آخر مهمة كان على %s UTC. هذا أقدم من ساعة. يرجى التحقق من إعدادات crontab."
|
msgstr "تنفيذ آخر مهمة كان على %s UTC. هذا أقدم من ساعة. يرجى التحقق من إعدادات crontab."
|
||||||
|
|
||||||
#: src/Module/Admin/Summary.php:107
|
#: src/Module/Admin/Summary.php:108
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Friendica's configuration now is stored in config/local.config.php, please "
|
"Friendica's configuration now is stored in config/local.config.php, please "
|
||||||
|
|
@ -6520,7 +6128,7 @@ msgid ""
|
||||||
"help with the transition."
|
"help with the transition."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Summary.php:111
|
#: src/Module/Admin/Summary.php:112
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Friendica's configuration now is stored in config/local.config.php, please "
|
"Friendica's configuration now is stored in config/local.config.php, please "
|
||||||
|
|
@ -6529,7 +6137,7 @@ msgid ""
|
||||||
"page</a> for help with the transition."
|
"page</a> for help with the transition."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Summary.php:117
|
#: src/Module/Admin/Summary.php:118
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"<a href=\"%s\">%s</a> is not reachable on your system. This is a severe "
|
"<a href=\"%s\">%s</a> is not reachable on your system. This is a severe "
|
||||||
|
|
@ -6537,83 +6145,83 @@ msgid ""
|
||||||
"href=\"%s\">the installation page</a> for help."
|
"href=\"%s\">the installation page</a> for help."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Summary.php:135
|
#: src/Module/Admin/Summary.php:136
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "The logfile '%s' is not usable. No logging possible (error: '%s')"
|
msgid "The logfile '%s' is not usable. No logging possible (error: '%s')"
|
||||||
msgstr "لا يمكن استخدام ملف السجل ''%s'. لا يمكن كتابة السجلات (خطأ: '%s')"
|
msgstr "لا يمكن استخدام ملف السجل ''%s'. لا يمكن كتابة السجلات (خطأ: '%s')"
|
||||||
|
|
||||||
#: src/Module/Admin/Summary.php:149
|
#: src/Module/Admin/Summary.php:150
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"The debug logfile '%s' is not usable. No logging possible (error: '%s')"
|
"The debug logfile '%s' is not usable. No logging possible (error: '%s')"
|
||||||
msgstr "لا يمكن استخدام ملف السجل الخاص بالتنقيح '%s'. لا يمكن كتابة السجلات (خطأ: '%s')"
|
msgstr "لا يمكن استخدام ملف السجل الخاص بالتنقيح '%s'. لا يمكن كتابة السجلات (خطأ: '%s')"
|
||||||
|
|
||||||
#: src/Module/Admin/Summary.php:165
|
#: src/Module/Admin/Summary.php:166
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Friendica's system.basepath was updated from '%s' to '%s'. Please remove the"
|
"Friendica's system.basepath was updated from '%s' to '%s'. Please remove the"
|
||||||
" system.basepath from your db to avoid differences."
|
" system.basepath from your db to avoid differences."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Summary.php:173
|
#: src/Module/Admin/Summary.php:174
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Friendica's current system.basepath '%s' is wrong and the config file '%s' "
|
"Friendica's current system.basepath '%s' is wrong and the config file '%s' "
|
||||||
"isn't used."
|
"isn't used."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Summary.php:181
|
#: src/Module/Admin/Summary.php:182
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Friendica's current system.basepath '%s' is not equal to the config file "
|
"Friendica's current system.basepath '%s' is not equal to the config file "
|
||||||
"'%s'. Please fix your configuration."
|
"'%s'. Please fix your configuration."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Summary.php:188
|
#: src/Module/Admin/Summary.php:189
|
||||||
msgid "Normal Account"
|
msgid "Normal Account"
|
||||||
msgstr "حساب عادي"
|
msgstr "حساب عادي"
|
||||||
|
|
||||||
#: src/Module/Admin/Summary.php:189
|
#: src/Module/Admin/Summary.php:190
|
||||||
msgid "Automatic Follower Account"
|
msgid "Automatic Follower Account"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Summary.php:190
|
#: src/Module/Admin/Summary.php:191
|
||||||
msgid "Public Forum Account"
|
msgid "Public Forum Account"
|
||||||
msgstr "حساب منتدى عمومي"
|
msgstr "حساب منتدى عمومي"
|
||||||
|
|
||||||
#: src/Module/Admin/Summary.php:191
|
#: src/Module/Admin/Summary.php:192
|
||||||
msgid "Automatic Friend Account"
|
msgid "Automatic Friend Account"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Admin/Summary.php:192
|
#: src/Module/Admin/Summary.php:193
|
||||||
msgid "Blog Account"
|
msgid "Blog Account"
|
||||||
msgstr "حساب مدونة"
|
msgstr "حساب مدونة"
|
||||||
|
|
||||||
#: src/Module/Admin/Summary.php:193
|
#: src/Module/Admin/Summary.php:194
|
||||||
msgid "Private Forum Account"
|
msgid "Private Forum Account"
|
||||||
msgstr "حساب منتدى خاص"
|
msgstr "حساب منتدى خاص"
|
||||||
|
|
||||||
#: src/Module/Admin/Summary.php:213
|
#: src/Module/Admin/Summary.php:214
|
||||||
msgid "Message queues"
|
msgid "Message queues"
|
||||||
msgstr "طوابير الرسائل"
|
msgstr "طوابير الرسائل"
|
||||||
|
|
||||||
#: src/Module/Admin/Summary.php:219
|
#: src/Module/Admin/Summary.php:220
|
||||||
msgid "Server Settings"
|
msgid "Server Settings"
|
||||||
msgstr "إعدادات الخادم"
|
msgstr "إعدادات الخادم"
|
||||||
|
|
||||||
#: src/Module/Admin/Summary.php:235
|
#: src/Module/Admin/Summary.php:236
|
||||||
msgid "Registered users"
|
msgid "Registered users"
|
||||||
msgstr "الأعضاء المسجلون"
|
msgstr "الأعضاء المسجلون"
|
||||||
|
|
||||||
#: src/Module/Admin/Summary.php:237
|
#: src/Module/Admin/Summary.php:238
|
||||||
msgid "Pending registrations"
|
msgid "Pending registrations"
|
||||||
msgstr "التسجيلات المعلقة"
|
msgstr "التسجيلات المعلقة"
|
||||||
|
|
||||||
#: src/Module/Admin/Summary.php:238
|
#: src/Module/Admin/Summary.php:239
|
||||||
msgid "Version"
|
msgid "Version"
|
||||||
msgstr "الإصدار"
|
msgstr "الإصدار"
|
||||||
|
|
||||||
#: src/Module/Admin/Summary.php:242
|
#: src/Module/Admin/Summary.php:243
|
||||||
msgid "Active addons"
|
msgid "Active addons"
|
||||||
msgstr "الإضافات النشطة"
|
msgstr "الإضافات النشطة"
|
||||||
|
|
||||||
|
|
@ -6641,7 +6249,7 @@ msgstr "لقطة شاشة"
|
||||||
msgid "Themes"
|
msgid "Themes"
|
||||||
msgstr "السمات"
|
msgstr "السمات"
|
||||||
|
|
||||||
#: src/Module/Admin/Themes/Embed.php:79
|
#: src/Module/Admin/Themes/Embed.php:80
|
||||||
msgid "Unknown theme."
|
msgid "Unknown theme."
|
||||||
msgstr "سمة مجهولة."
|
msgstr "سمة مجهولة."
|
||||||
|
|
||||||
|
|
@ -6933,11 +6541,6 @@ msgstr ""
|
||||||
msgid "Only starting posts can be muted"
|
msgid "Only starting posts can be muted"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Api/Mastodon/Statuses/Pin.php:50
|
|
||||||
#: src/Module/Api/Mastodon/Statuses/Unpin.php:50
|
|
||||||
msgid "Only starting posts can be pinned"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/Module/Api/Mastodon/Statuses/Reblog.php:53
|
#: src/Module/Api/Mastodon/Statuses/Reblog.php:53
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Posts from %s can't be shared"
|
msgid "Posts from %s can't be shared"
|
||||||
|
|
@ -6968,7 +6571,7 @@ msgstr "تطبيقات غير مثبتة."
|
||||||
msgid "Applications"
|
msgid "Applications"
|
||||||
msgstr "التطبيقات"
|
msgstr "التطبيقات"
|
||||||
|
|
||||||
#: src/Module/Attach.php:49 src/Module/Attach.php:61
|
#: src/Module/Attach.php:50 src/Module/Attach.php:62
|
||||||
msgid "Item was not found."
|
msgid "Item was not found."
|
||||||
msgstr "لم يُعثر على العنصر."
|
msgstr "لم يُعثر على العنصر."
|
||||||
|
|
||||||
|
|
@ -7046,7 +6649,7 @@ msgstr "تحقق من بصمة الويب"
|
||||||
msgid "Babel"
|
msgid "Babel"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/BaseAdmin.php:118 src/Module/Debug/ActivityPubConversion.php:138
|
#: src/Module/BaseAdmin.php:118 src/Module/Debug/ActivityPubConversion.php:142
|
||||||
msgid "ActivityPub Conversion"
|
msgid "ActivityPub Conversion"
|
||||||
msgstr "محادثة عبر ActivityPub"
|
msgstr "محادثة عبر ActivityPub"
|
||||||
|
|
||||||
|
|
@ -7111,12 +6714,12 @@ msgstr "المشاركات المقرر نشرها"
|
||||||
msgid "Tips for New Members"
|
msgid "Tips for New Members"
|
||||||
msgstr "تلميحات للأعضاء الجدد"
|
msgstr "تلميحات للأعضاء الجدد"
|
||||||
|
|
||||||
#: src/Module/BaseSearch.php:68
|
#: src/Module/BaseSearch.php:69
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "People Search - %s"
|
msgid "People Search - %s"
|
||||||
msgstr "البحث عن أشخاص - %s"
|
msgstr "البحث عن أشخاص - %s"
|
||||||
|
|
||||||
#: src/Module/BaseSearch.php:78
|
#: src/Module/BaseSearch.php:79
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Forum Search - %s"
|
msgid "Forum Search - %s"
|
||||||
msgstr "البحث عن منتديات - %s"
|
msgstr "البحث عن منتديات - %s"
|
||||||
|
|
@ -7142,7 +6745,7 @@ msgstr "إدارة الحسابات"
|
||||||
msgid "Connected apps"
|
msgid "Connected apps"
|
||||||
msgstr "التطبيقات المتصلة"
|
msgstr "التطبيقات المتصلة"
|
||||||
|
|
||||||
#: src/Module/BaseSettings.php:106 src/Module/Settings/UserExport.php:75
|
#: src/Module/BaseSettings.php:106 src/Module/Settings/UserExport.php:76
|
||||||
msgid "Export personal data"
|
msgid "Export personal data"
|
||||||
msgstr "تصدير البيانات الشخصية"
|
msgstr "تصدير البيانات الشخصية"
|
||||||
|
|
||||||
|
|
@ -7214,7 +6817,7 @@ msgstr "نظّم مجموعات متراسليك"
|
||||||
msgid "Search your contacts"
|
msgid "Search your contacts"
|
||||||
msgstr "ابحث في متراسليك"
|
msgstr "ابحث في متراسليك"
|
||||||
|
|
||||||
#: src/Module/Contact.php:390 src/Module/Search/Index.php:191
|
#: src/Module/Contact.php:390 src/Module/Search/Index.php:192
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Results for: %s"
|
msgid "Results for: %s"
|
||||||
msgstr "نتائج: %s"
|
msgstr "نتائج: %s"
|
||||||
|
|
@ -7385,7 +6988,7 @@ msgstr[5] "%s متراسل"
|
||||||
msgid "Error while sending poke, please retry."
|
msgid "Error while sending poke, please retry."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Contact/Poke.php:148 src/Module/Search/Acl.php:54
|
#: src/Module/Contact/Poke.php:148 src/Module/Search/Acl.php:55
|
||||||
msgid "You must be logged in to use this module."
|
msgid "You must be logged in to use this module."
|
||||||
msgstr "يجب عليك الولوج لاستخدام هذه الوحدة."
|
msgstr "يجب عليك الولوج لاستخدام هذه الوحدة."
|
||||||
|
|
||||||
|
|
@ -7689,8 +7292,8 @@ msgstr "تضمين"
|
||||||
msgid "Hide"
|
msgid "Hide"
|
||||||
msgstr "اخف"
|
msgstr "اخف"
|
||||||
|
|
||||||
#: src/Module/Conversation/Community.php:137 src/Module/Search/Index.php:136
|
#: src/Module/Conversation/Community.php:137 src/Module/Search/Index.php:137
|
||||||
#: src/Module/Search/Index.php:178
|
#: src/Module/Search/Index.php:179
|
||||||
msgid "No results."
|
msgid "No results."
|
||||||
msgstr "لا نتائج."
|
msgstr "لا نتائج."
|
||||||
|
|
||||||
|
|
@ -7717,36 +7320,44 @@ msgstr "لا توجد مثل هذه المجموعة"
|
||||||
msgid "Group: %s"
|
msgid "Group: %s"
|
||||||
msgstr "المجموعة: %s"
|
msgstr "المجموعة: %s"
|
||||||
|
|
||||||
#: src/Module/Conversation/Network.php:253
|
#: src/Module/Conversation/Network.php:255
|
||||||
msgid "Latest Activity"
|
msgid "Latest Activity"
|
||||||
msgstr "آخر نشاط"
|
msgstr "آخر نشاط"
|
||||||
|
|
||||||
#: src/Module/Conversation/Network.php:256
|
#: src/Module/Conversation/Network.php:258
|
||||||
msgid "Sort by latest activity"
|
msgid "Sort by latest activity"
|
||||||
msgstr "رتب حسب آخر نشاط"
|
msgstr "رتب حسب آخر نشاط"
|
||||||
|
|
||||||
#: src/Module/Conversation/Network.php:261
|
#: src/Module/Conversation/Network.php:263
|
||||||
msgid "Latest Posts"
|
msgid "Latest Posts"
|
||||||
msgstr "آخر المشاركات"
|
msgstr "آخر المشاركات"
|
||||||
|
|
||||||
#: src/Module/Conversation/Network.php:264
|
#: src/Module/Conversation/Network.php:266
|
||||||
msgid "Sort by post received date"
|
msgid "Sort by post received date"
|
||||||
msgstr "رتب حسب تاريخ استلام المشاركة"
|
msgstr "رتب حسب تاريخ استلام المشاركة"
|
||||||
|
|
||||||
#: src/Module/Conversation/Network.php:269
|
#: src/Module/Conversation/Network.php:271
|
||||||
|
msgid "Latest Creation"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Module/Conversation/Network.php:274
|
||||||
|
msgid "Sort by post creation date"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Module/Conversation/Network.php:279
|
||||||
#: src/Module/Settings/Profile/Index.php:227
|
#: src/Module/Settings/Profile/Index.php:227
|
||||||
msgid "Personal"
|
msgid "Personal"
|
||||||
msgstr "نشاطي"
|
msgstr "نشاطي"
|
||||||
|
|
||||||
#: src/Module/Conversation/Network.php:272
|
#: src/Module/Conversation/Network.php:282
|
||||||
msgid "Posts that mention or involve you"
|
msgid "Posts that mention or involve you"
|
||||||
msgstr "المشاركات التي تذكرك أو تتعلق بك"
|
msgstr "المشاركات التي تذكرك أو تتعلق بك"
|
||||||
|
|
||||||
#: src/Module/Conversation/Network.php:277 src/Object/Post.php:341
|
#: src/Module/Conversation/Network.php:287 src/Object/Post.php:341
|
||||||
msgid "Starred"
|
msgid "Starred"
|
||||||
msgstr "المفضلة"
|
msgstr "المفضلة"
|
||||||
|
|
||||||
#: src/Module/Conversation/Network.php:280
|
#: src/Module/Conversation/Network.php:290
|
||||||
msgid "Favourite Posts"
|
msgid "Favourite Posts"
|
||||||
msgstr "المشاركات المفضلة"
|
msgstr "المشاركات المفضلة"
|
||||||
|
|
||||||
|
|
@ -7769,15 +7380,15 @@ msgstr "مهيأ"
|
||||||
msgid "Activity"
|
msgid "Activity"
|
||||||
msgstr "النشاط"
|
msgstr "النشاط"
|
||||||
|
|
||||||
#: src/Module/Debug/ActivityPubConversion.php:118
|
#: src/Module/Debug/ActivityPubConversion.php:122
|
||||||
msgid "Object data"
|
msgid "Object data"
|
||||||
msgstr "بيانات الكائن"
|
msgstr "بيانات الكائن"
|
||||||
|
|
||||||
#: src/Module/Debug/ActivityPubConversion.php:125
|
#: src/Module/Debug/ActivityPubConversion.php:129
|
||||||
msgid "Result Item"
|
msgid "Result Item"
|
||||||
msgstr "النتيجة"
|
msgstr "النتيجة"
|
||||||
|
|
||||||
#: src/Module/Debug/ActivityPubConversion.php:139
|
#: src/Module/Debug/ActivityPubConversion.php:143
|
||||||
msgid "Source activity"
|
msgid "Source activity"
|
||||||
msgstr "نشاط المصدر"
|
msgstr "نشاط المصدر"
|
||||||
|
|
||||||
|
|
@ -7957,12 +7568,12 @@ msgstr "HTML"
|
||||||
msgid "Twitter Source / Tweet URL (requires API key)"
|
msgid "Twitter Source / Tweet URL (requires API key)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Debug/Feed.php:50 src/Module/Filer/SaveTag.php:46
|
#: src/Module/Debug/Feed.php:51 src/Module/Filer/SaveTag.php:46
|
||||||
#: src/Module/Settings/Profile/Index.php:141
|
#: src/Module/Settings/Profile/Index.php:141
|
||||||
msgid "You must be logged in to use this module"
|
msgid "You must be logged in to use this module"
|
||||||
msgstr "يجب عليك الولوج لاستخدام هذه الوحدة"
|
msgstr "يجب عليك الولوج لاستخدام هذه الوحدة"
|
||||||
|
|
||||||
#: src/Module/Debug/Feed.php:75
|
#: src/Module/Debug/Feed.php:76
|
||||||
msgid "Source URL"
|
msgid "Source URL"
|
||||||
msgstr "الرابط المصدري"
|
msgstr "الرابط المصدري"
|
||||||
|
|
||||||
|
|
@ -8042,19 +7653,19 @@ msgstr "تنقل بين مختلف الهويات أو الصفحات (المج
|
||||||
msgid "Select an identity to manage: "
|
msgid "Select an identity to manage: "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Directory.php:74
|
#: src/Module/Directory.php:75
|
||||||
msgid "No entries (some entries may be hidden)."
|
msgid "No entries (some entries may be hidden)."
|
||||||
msgstr "لا توجد مدخلات (قد تكون بعض المدخلات مخفية)."
|
msgstr "لا توجد مدخلات (قد تكون بعض المدخلات مخفية)."
|
||||||
|
|
||||||
#: src/Module/Directory.php:90
|
#: src/Module/Directory.php:91
|
||||||
msgid "Find on this site"
|
msgid "Find on this site"
|
||||||
msgstr "ابحث في هذا الموقع"
|
msgstr "ابحث في هذا الموقع"
|
||||||
|
|
||||||
#: src/Module/Directory.php:92
|
#: src/Module/Directory.php:93
|
||||||
msgid "Results for:"
|
msgid "Results for:"
|
||||||
msgstr "نتائج:"
|
msgstr "نتائج:"
|
||||||
|
|
||||||
#: src/Module/Directory.php:94
|
#: src/Module/Directory.php:95
|
||||||
msgid "Site Directory"
|
msgid "Site Directory"
|
||||||
msgstr "دليل الموقع"
|
msgstr "دليل الموقع"
|
||||||
|
|
||||||
|
|
@ -8383,29 +7994,29 @@ msgid ""
|
||||||
" administrator email. This will allow you to enter the site admin panel."
|
" administrator email. This will allow you to enter the site admin panel."
|
||||||
msgstr "انتقل إلى <a href=\"%s/register\">صفحة التسجيل</a> وسجل كمستخدم جديد. تذكر أن تستخدم نفس البريد الإلكتروني الذي أدخلته للمدير. هذا سيسمح لك بالدخول إلى لوحة الإدارة."
|
msgstr "انتقل إلى <a href=\"%s/register\">صفحة التسجيل</a> وسجل كمستخدم جديد. تذكر أن تستخدم نفس البريد الإلكتروني الذي أدخلته للمدير. هذا سيسمح لك بالدخول إلى لوحة الإدارة."
|
||||||
|
|
||||||
#: src/Module/Invite.php:56
|
#: src/Module/Invite.php:57
|
||||||
msgid "Total invitation limit exceeded."
|
msgid "Total invitation limit exceeded."
|
||||||
msgstr "تجاوزت حد عدد الدعوات."
|
msgstr "تجاوزت حد عدد الدعوات."
|
||||||
|
|
||||||
#: src/Module/Invite.php:81
|
#: src/Module/Invite.php:82
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s : Not a valid email address."
|
msgid "%s : Not a valid email address."
|
||||||
msgstr "%s : عناوين بريد الكتروني غير صالحة."
|
msgstr "%s : عناوين بريد الكتروني غير صالحة."
|
||||||
|
|
||||||
#: src/Module/Invite.php:107
|
#: src/Module/Invite.php:108
|
||||||
msgid "Please join us on Friendica"
|
msgid "Please join us on Friendica"
|
||||||
msgstr "انضم إلينا في فرَندِكا"
|
msgstr "انضم إلينا في فرَندِكا"
|
||||||
|
|
||||||
#: src/Module/Invite.php:116
|
#: src/Module/Invite.php:117
|
||||||
msgid "Invitation limit exceeded. Please contact your site administrator."
|
msgid "Invitation limit exceeded. Please contact your site administrator."
|
||||||
msgstr "تجاوزت عدد الدعوات. رجاء اتصال بمدير الموقع."
|
msgstr "تجاوزت عدد الدعوات. رجاء اتصال بمدير الموقع."
|
||||||
|
|
||||||
#: src/Module/Invite.php:120
|
#: src/Module/Invite.php:121
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s : Message delivery failed."
|
msgid "%s : Message delivery failed."
|
||||||
msgstr "%s : فشل توصيل الرسالة."
|
msgstr "%s : فشل توصيل الرسالة."
|
||||||
|
|
||||||
#: src/Module/Invite.php:124
|
#: src/Module/Invite.php:125
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%d message sent."
|
msgid "%d message sent."
|
||||||
msgid_plural "%d messages sent."
|
msgid_plural "%d messages sent."
|
||||||
|
|
@ -8416,11 +8027,11 @@ msgstr[3] "أُرسلت %d رسائل."
|
||||||
msgstr[4] "أُرسلت %d رسالة."
|
msgstr[4] "أُرسلت %d رسالة."
|
||||||
msgstr[5] "أُرسلت %d رسالة."
|
msgstr[5] "أُرسلت %d رسالة."
|
||||||
|
|
||||||
#: src/Module/Invite.php:142
|
#: src/Module/Invite.php:143
|
||||||
msgid "You have no more invitations available"
|
msgid "You have no more invitations available"
|
||||||
msgstr "لم تتبقى لديك أي دعوة"
|
msgstr "لم تتبقى لديك أي دعوة"
|
||||||
|
|
||||||
#: src/Module/Invite.php:149
|
#: src/Module/Invite.php:150
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Visit %s for a list of public sites that you can join. Friendica members on "
|
"Visit %s for a list of public sites that you can join. Friendica members on "
|
||||||
|
|
@ -8428,14 +8039,14 @@ msgid ""
|
||||||
" other social networks."
|
" other social networks."
|
||||||
msgstr "زر %s للحصول على قائمة المواقع العمومية التي يمكنك الانضمام إليها. يمكن لجميع أعضاء مواقع شبكة فرَندِكا الوصول لبعضهم البعض، وكذلك مع عديد من الشبكات الاجتماعية الأخرى."
|
msgstr "زر %s للحصول على قائمة المواقع العمومية التي يمكنك الانضمام إليها. يمكن لجميع أعضاء مواقع شبكة فرَندِكا الوصول لبعضهم البعض، وكذلك مع عديد من الشبكات الاجتماعية الأخرى."
|
||||||
|
|
||||||
#: src/Module/Invite.php:151
|
#: src/Module/Invite.php:152
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"To accept this invitation, please visit and register at %s or any other "
|
"To accept this invitation, please visit and register at %s or any other "
|
||||||
"public Friendica website."
|
"public Friendica website."
|
||||||
msgstr "لقبول هذه الدعوة، من فضلك زر وسجل في %s أو في أي موقع فرَندِكا آخر."
|
msgstr "لقبول هذه الدعوة، من فضلك زر وسجل في %s أو في أي موقع فرَندِكا آخر."
|
||||||
|
|
||||||
#: src/Module/Invite.php:152
|
#: src/Module/Invite.php:153
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Friendica sites all inter-connect to create a huge privacy-enhanced social "
|
"Friendica sites all inter-connect to create a huge privacy-enhanced social "
|
||||||
|
|
@ -8444,48 +8055,48 @@ msgid ""
|
||||||
"sites you can join."
|
"sites you can join."
|
||||||
msgstr "مواقع فرَندِكا كلها متصلة لإنشاء شبكة اجتماعية ضخمة تدعم الخصوصية يملكها ويسيطر عليها أعضاؤها. يمكنهم أيضا التواصل مع العديد من الشبكات الاجتماعية الأخرى. راجع %s للحصول على قائمة مواقع فرَندِكا بديلة."
|
msgstr "مواقع فرَندِكا كلها متصلة لإنشاء شبكة اجتماعية ضخمة تدعم الخصوصية يملكها ويسيطر عليها أعضاؤها. يمكنهم أيضا التواصل مع العديد من الشبكات الاجتماعية الأخرى. راجع %s للحصول على قائمة مواقع فرَندِكا بديلة."
|
||||||
|
|
||||||
#: src/Module/Invite.php:156
|
#: src/Module/Invite.php:157
|
||||||
msgid ""
|
msgid ""
|
||||||
"Our apologies. This system is not currently configured to connect with other"
|
"Our apologies. This system is not currently configured to connect with other"
|
||||||
" public sites or invite members."
|
" public sites or invite members."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Invite.php:159
|
#: src/Module/Invite.php:160
|
||||||
msgid ""
|
msgid ""
|
||||||
"Friendica sites all inter-connect to create a huge privacy-enhanced social "
|
"Friendica sites all inter-connect to create a huge privacy-enhanced social "
|
||||||
"web that is owned and controlled by its members. They can also connect with "
|
"web that is owned and controlled by its members. They can also connect with "
|
||||||
"many traditional social networks."
|
"many traditional social networks."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Invite.php:158
|
#: src/Module/Invite.php:159
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "To accept this invitation, please visit and register at %s."
|
msgid "To accept this invitation, please visit and register at %s."
|
||||||
msgstr "لقبول هذه الدعوة، من فضلك زر وسجل في %s."
|
msgstr "لقبول هذه الدعوة، من فضلك زر وسجل في %s."
|
||||||
|
|
||||||
#: src/Module/Invite.php:166
|
#: src/Module/Invite.php:167
|
||||||
msgid "Send invitations"
|
msgid "Send invitations"
|
||||||
msgstr "أرسل دعوات"
|
msgstr "أرسل دعوات"
|
||||||
|
|
||||||
#: src/Module/Invite.php:167
|
#: src/Module/Invite.php:168
|
||||||
msgid "Enter email addresses, one per line:"
|
msgid "Enter email addresses, one per line:"
|
||||||
msgstr "أدخل عناوين البريد الإلكتروني ،واحد في كل سطر:"
|
msgstr "أدخل عناوين البريد الإلكتروني ،واحد في كل سطر:"
|
||||||
|
|
||||||
#: src/Module/Invite.php:171
|
#: src/Module/Invite.php:172
|
||||||
msgid ""
|
msgid ""
|
||||||
"You are cordially invited to join me and other close friends on Friendica - "
|
"You are cordially invited to join me and other close friends on Friendica - "
|
||||||
"and help us to create a better social web."
|
"and help us to create a better social web."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Invite.php:173
|
#: src/Module/Invite.php:174
|
||||||
msgid "You will need to supply this invitation code: $invite_code"
|
msgid "You will need to supply this invitation code: $invite_code"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Invite.php:173
|
#: src/Module/Invite.php:174
|
||||||
msgid ""
|
msgid ""
|
||||||
"Once you have registered, please connect with me via my profile page at:"
|
"Once you have registered, please connect with me via my profile page at:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Invite.php:175
|
#: src/Module/Invite.php:176
|
||||||
msgid ""
|
msgid ""
|
||||||
"For more information about the Friendica project and why we feel it is "
|
"For more information about the Friendica project and why we feel it is "
|
||||||
"important, please visit http://friendi.ca"
|
"important, please visit http://friendi.ca"
|
||||||
|
|
@ -8507,19 +8118,19 @@ msgstr "أنشئ ملاحظة شخصية جديدة"
|
||||||
msgid "Compose new post"
|
msgid "Compose new post"
|
||||||
msgstr "أنشئ مشاركة جديدة"
|
msgstr "أنشئ مشاركة جديدة"
|
||||||
|
|
||||||
#: src/Module/Item/Compose.php:141
|
#: src/Module/Item/Compose.php:153
|
||||||
msgid "Visibility"
|
msgid "Visibility"
|
||||||
msgstr "الظّهور"
|
msgstr "الظّهور"
|
||||||
|
|
||||||
#: src/Module/Item/Compose.php:162
|
#: src/Module/Item/Compose.php:174
|
||||||
msgid "Clear the location"
|
msgid "Clear the location"
|
||||||
msgstr "امسح الموقع الجغرافي"
|
msgstr "امسح الموقع الجغرافي"
|
||||||
|
|
||||||
#: src/Module/Item/Compose.php:163
|
#: src/Module/Item/Compose.php:175
|
||||||
msgid "Location services are unavailable on your device"
|
msgid "Location services are unavailable on your device"
|
||||||
msgstr "خدمات الموقع الجغرافي غير متاحة على جهازك"
|
msgstr "خدمات الموقع الجغرافي غير متاحة على جهازك"
|
||||||
|
|
||||||
#: src/Module/Item/Compose.php:164
|
#: src/Module/Item/Compose.php:176
|
||||||
msgid ""
|
msgid ""
|
||||||
"Location services are disabled. Please check the website's permissions on "
|
"Location services are disabled. Please check the website's permissions on "
|
||||||
"your device"
|
"your device"
|
||||||
|
|
@ -8540,7 +8151,7 @@ msgid ""
|
||||||
"condition should be temporary, please come back in a few minutes."
|
"condition should be temporary, please come back in a few minutes."
|
||||||
msgstr "هذه العقدة في وضع الصيانة حاليًا، وهذا إما تلقائيا بسبب التحديث أو يدويا من قبل مدير العقدة. يرجى العودة في غضون بضع دقائق."
|
msgstr "هذه العقدة في وضع الصيانة حاليًا، وهذا إما تلقائيا بسبب التحديث أو يدويا من قبل مدير العقدة. يرجى العودة في غضون بضع دقائق."
|
||||||
|
|
||||||
#: src/Module/Manifest.php:42
|
#: src/Module/Manifest.php:40
|
||||||
msgid "A Decentralized Social Network"
|
msgid "A Decentralized Social Network"
|
||||||
msgstr "شبكة اجتماعية لامركزية"
|
msgstr "شبكة اجتماعية لامركزية"
|
||||||
|
|
||||||
|
|
@ -8606,7 +8217,7 @@ msgstr "لا توجد تقديمات."
|
||||||
msgid "No more %s notifications."
|
msgid "No more %s notifications."
|
||||||
msgstr "لا مزيد من تنبيهات %s."
|
msgstr "لا مزيد من تنبيهات %s."
|
||||||
|
|
||||||
#: src/Module/Notifications/Notification.php:107
|
#: src/Module/Notifications/Notification.php:134
|
||||||
msgid "You must be logged in to show this page."
|
msgid "You must be logged in to show this page."
|
||||||
msgstr "يجب أن تلج لتصل لهذه الصفحة."
|
msgstr "يجب أن تلج لتصل لهذه الصفحة."
|
||||||
|
|
||||||
|
|
@ -8630,6 +8241,15 @@ msgstr "تنبيهات الصفحة الرئيسية"
|
||||||
msgid "Show unread"
|
msgid "Show unread"
|
||||||
msgstr "اعرض غير المقروءة"
|
msgstr "اعرض غير المقروءة"
|
||||||
|
|
||||||
|
#: src/Module/Notifications/Ping.php:221
|
||||||
|
msgid "{0} requested registration"
|
||||||
|
msgstr "{0} طلبَ التسجيل"
|
||||||
|
|
||||||
|
#: src/Module/Notifications/Ping.php:232
|
||||||
|
#, php-format
|
||||||
|
msgid "{0} and %d others requested registration"
|
||||||
|
msgstr "{0} و %d أخرون يطلبون التسجيل"
|
||||||
|
|
||||||
#: src/Module/OAuth/Acknowledge.php:50
|
#: src/Module/OAuth/Acknowledge.php:50
|
||||||
msgid "Authorize application connection"
|
msgid "Authorize application connection"
|
||||||
msgstr "خول لهذا التطبيق الاتصال"
|
msgstr "خول لهذا التطبيق الاتصال"
|
||||||
|
|
@ -8659,63 +8279,72 @@ msgstr "الرجاء نسخ رمز الاستيثاق إلى التطبيق وإ
|
||||||
msgid "Unsupported or missing grant type"
|
msgid "Unsupported or missing grant type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/PermissionTooltip.php:47
|
#: src/Module/PermissionTooltip.php:49
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Wrong type \"%s\", expected one of: %s"
|
msgid "Wrong type \"%s\", expected one of: %s"
|
||||||
msgstr "نوع خاطئ \"%s\" ، يُتوقع أن يكون: %s"
|
msgstr "نوع خاطئ \"%s\" ، يُتوقع أن يكون: %s"
|
||||||
|
|
||||||
#: src/Module/PermissionTooltip.php:64
|
#: src/Module/PermissionTooltip.php:66
|
||||||
msgid "Model not found"
|
msgid "Model not found"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/PermissionTooltip.php:91
|
#: src/Module/PermissionTooltip.php:89
|
||||||
|
msgid "Unlisted"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Module/PermissionTooltip.php:107
|
||||||
msgid "Remote privacy information not available."
|
msgid "Remote privacy information not available."
|
||||||
msgstr "معلومات الخصوصية غير متوفرة."
|
msgstr "معلومات الخصوصية غير متوفرة."
|
||||||
|
|
||||||
#: src/Module/PermissionTooltip.php:100
|
#: src/Module/PermissionTooltip.php:116
|
||||||
msgid "Visible to:"
|
msgid "Visible to:"
|
||||||
msgstr "مرئي لـ:"
|
msgstr "مرئي لـ:"
|
||||||
|
|
||||||
#: src/Module/PermissionTooltip.php:185
|
#: src/Module/PermissionTooltip.php:200
|
||||||
|
#, php-format
|
||||||
|
msgid "Collection (%s)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Module/PermissionTooltip.php:204
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Followers (%s)"
|
msgid "Followers (%s)"
|
||||||
msgstr "متابِعون (%s)"
|
msgstr "متابِعون (%s)"
|
||||||
|
|
||||||
#: src/Module/PermissionTooltip.php:201
|
#: src/Module/PermissionTooltip.php:223
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%d more"
|
msgid "%d more"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/PermissionTooltip.php:205
|
#: src/Module/PermissionTooltip.php:227
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "<b>To:</b> %s<br>"
|
msgid "<b>To:</b> %s<br>"
|
||||||
msgstr "<b>إلى:</b> %s<br>"
|
msgstr "<b>إلى:</b> %s<br>"
|
||||||
|
|
||||||
#: src/Module/PermissionTooltip.php:208
|
#: src/Module/PermissionTooltip.php:230
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "<b>CC:</b> %s<br>"
|
msgid "<b>CC:</b> %s<br>"
|
||||||
msgstr "<b>ووجه إلى:</b>%s<br>"
|
msgstr "<b>ووجه إلى:</b>%s<br>"
|
||||||
|
|
||||||
#: src/Module/PermissionTooltip.php:211
|
#: src/Module/PermissionTooltip.php:233
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "<b>BCC:</b> %s<br>"
|
msgid "<b>BCC:</b> %s<br>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Photo.php:123
|
#: src/Module/Photo.php:128
|
||||||
msgid "The Photo is not available."
|
msgid "The Photo is not available."
|
||||||
msgstr "الصورة غير متوفرة."
|
msgstr "الصورة غير متوفرة."
|
||||||
|
|
||||||
#: src/Module/Photo.php:136
|
#: src/Module/Photo.php:141
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "The Photo with id %s is not available."
|
msgid "The Photo with id %s is not available."
|
||||||
msgstr "الصورة ذات المعرف %s غير متوفّرة."
|
msgstr "الصورة ذات المعرف %s غير متوفّرة."
|
||||||
|
|
||||||
#: src/Module/Photo.php:169
|
#: src/Module/Photo.php:174
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Invalid external resource with url %s."
|
msgid "Invalid external resource with url %s."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Photo.php:171
|
#: src/Module/Photo.php:176
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Invalid photo with id %s."
|
msgid "Invalid photo with id %s."
|
||||||
msgstr "الصورة ذات المعرف %s غير صالحة."
|
msgstr "الصورة ذات المعرف %s غير صالحة."
|
||||||
|
|
@ -8735,6 +8364,10 @@ msgid ""
|
||||||
"class=\"btn btn-sm pull-right\">Cancel</a>"
|
"class=\"btn btn-sm pull-right\">Cancel</a>"
|
||||||
msgstr "أنت حاليا تستعرض ملفك الشخصي كـ <b>%s</b><a href=\"%s\" class=\"btn btn-sm pull-right\"> ألغ</a>"
|
msgstr "أنت حاليا تستعرض ملفك الشخصي كـ <b>%s</b><a href=\"%s\" class=\"btn btn-sm pull-right\"> ألغ</a>"
|
||||||
|
|
||||||
|
#: src/Module/Profile/Profile.php:144 src/Module/Settings/Account.php:575
|
||||||
|
msgid "Full Name:"
|
||||||
|
msgstr "الاسم الكامل:"
|
||||||
|
|
||||||
#: src/Module/Profile/Profile.php:149
|
#: src/Module/Profile/Profile.php:149
|
||||||
msgid "Member since:"
|
msgid "Member since:"
|
||||||
msgstr "عضو منذ:"
|
msgstr "عضو منذ:"
|
||||||
|
|
@ -8781,20 +8414,20 @@ msgid "View as"
|
||||||
msgstr "اعرض ك"
|
msgstr "اعرض ك"
|
||||||
|
|
||||||
#: src/Module/Profile/Profile.php:326 src/Module/Profile/Profile.php:329
|
#: src/Module/Profile/Profile.php:326 src/Module/Profile/Profile.php:329
|
||||||
#: src/Module/Profile/Status.php:65 src/Module/Profile/Status.php:68
|
#: src/Module/Profile/Status.php:66 src/Module/Profile/Status.php:69
|
||||||
#: src/Protocol/Feed.php:990 src/Protocol/OStatus.php:1245
|
#: src/Protocol/Feed.php:1017 src/Protocol/OStatus.php:1245
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s's timeline"
|
msgid "%s's timeline"
|
||||||
msgstr "الخط الزمني لـ %s"
|
msgstr "الخط الزمني لـ %s"
|
||||||
|
|
||||||
#: src/Module/Profile/Profile.php:327 src/Module/Profile/Status.php:66
|
#: src/Module/Profile/Profile.php:327 src/Module/Profile/Status.php:67
|
||||||
#: src/Protocol/Feed.php:994 src/Protocol/OStatus.php:1249
|
#: src/Protocol/Feed.php:1021 src/Protocol/OStatus.php:1249
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s's posts"
|
msgid "%s's posts"
|
||||||
msgstr "مشاركات %s"
|
msgstr "مشاركات %s"
|
||||||
|
|
||||||
#: src/Module/Profile/Profile.php:328 src/Module/Profile/Status.php:67
|
#: src/Module/Profile/Profile.php:328 src/Module/Profile/Status.php:68
|
||||||
#: src/Protocol/Feed.php:997 src/Protocol/OStatus.php:1252
|
#: src/Protocol/Feed.php:1024 src/Protocol/OStatus.php:1252
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s's comments"
|
msgid "%s's comments"
|
||||||
msgstr "تعليقات %s"
|
msgstr "تعليقات %s"
|
||||||
|
|
@ -8865,10 +8498,18 @@ msgstr ""
|
||||||
msgid "Please repeat your e-mail address:"
|
msgid "Please repeat your e-mail address:"
|
||||||
msgstr "رجاء أعد إدخال عنوان بريدك الإلكتروني:"
|
msgstr "رجاء أعد إدخال عنوان بريدك الإلكتروني:"
|
||||||
|
|
||||||
|
#: src/Module/Register.php:162 src/Module/Settings/Account.php:566
|
||||||
|
msgid "New Password:"
|
||||||
|
msgstr "كلمة المرور الجديدة:"
|
||||||
|
|
||||||
#: src/Module/Register.php:162
|
#: src/Module/Register.php:162
|
||||||
msgid "Leave empty for an auto generated password."
|
msgid "Leave empty for an auto generated password."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Module/Register.php:163 src/Module/Settings/Account.php:567
|
||||||
|
msgid "Confirm:"
|
||||||
|
msgstr "التأكيد:"
|
||||||
|
|
||||||
#: src/Module/Register.php:164
|
#: src/Module/Register.php:164
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
|
|
@ -8986,15 +8627,15 @@ msgstr "إن لم تكن عضواً في شبكة اجتماعية حرة، <a h
|
||||||
msgid "Your Webfinger address or profile URL:"
|
msgid "Your Webfinger address or profile URL:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Search/Index.php:53
|
#: src/Module/Search/Index.php:54
|
||||||
msgid "Only logged in users are permitted to perform a search."
|
msgid "Only logged in users are permitted to perform a search."
|
||||||
msgstr "يمكن فقط للمستخدمين المسجلين البحث في الموقع."
|
msgstr "يمكن فقط للمستخدمين المسجلين البحث في الموقع."
|
||||||
|
|
||||||
#: src/Module/Search/Index.php:73
|
#: src/Module/Search/Index.php:74
|
||||||
msgid "Only one search per minute is permitted for not logged in users."
|
msgid "Only one search per minute is permitted for not logged in users."
|
||||||
msgstr "يسمح ببحث واحد فقط في كل دقيقة للزوار."
|
msgstr "يسمح ببحث واحد فقط في كل دقيقة للزوار."
|
||||||
|
|
||||||
#: src/Module/Search/Index.php:189
|
#: src/Module/Search/Index.php:190
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Items tagged with: %s"
|
msgid "Items tagged with: %s"
|
||||||
msgstr "عناصر موسمة بـ: %s"
|
msgstr "عناصر موسمة بـ: %s"
|
||||||
|
|
@ -9131,6 +8772,516 @@ msgstr "هذا هو جهاز الذي استخدمه للاستيثاق بعام
|
||||||
msgid "Verify code and complete login"
|
msgid "Verify code and complete login"
|
||||||
msgstr "تحقق من الرمز وأكمل الولوج"
|
msgstr "تحقق من الرمز وأكمل الولوج"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:66
|
||||||
|
msgid "Passwords do not match."
|
||||||
|
msgstr "كلمتا المرور غير متطابقتين."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:80
|
||||||
|
msgid "Password unchanged."
|
||||||
|
msgstr "لم تُغير كلمة المرور."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:95
|
||||||
|
msgid "Please use a shorter name."
|
||||||
|
msgstr "يرجى استخدام اسم أقصر."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:98
|
||||||
|
msgid "Name too short."
|
||||||
|
msgstr "الاسم قصير جداً."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:107
|
||||||
|
msgid "Wrong Password."
|
||||||
|
msgstr "كلمة المرور خاطئة."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:112
|
||||||
|
msgid "Invalid email."
|
||||||
|
msgstr "البريد الإلكتروني غير صالح."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:118
|
||||||
|
msgid "Cannot change to that email."
|
||||||
|
msgstr "لا يمكن التغيير إلى هذا البريد الإلكتروني."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:148 src/Module/Settings/Account.php:200
|
||||||
|
#: src/Module/Settings/Account.php:220 src/Module/Settings/Account.php:304
|
||||||
|
#: src/Module/Settings/Account.php:353
|
||||||
|
msgid "Settings were not updated."
|
||||||
|
msgstr "لم تُحدث الإعدادات."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:365
|
||||||
|
msgid "Contact CSV file upload error"
|
||||||
|
msgstr "خطأ أثناء رفع ملف CSV"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:384
|
||||||
|
msgid "Importing Contacts done"
|
||||||
|
msgstr "أُستورد المتراسلون"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:397
|
||||||
|
msgid "Relocate message has been send to your contacts"
|
||||||
|
msgstr "أُرسلت رسالة تنبيه بانتقالك إلى متراسليك"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:414
|
||||||
|
msgid "Unable to find your profile. Please contact your admin."
|
||||||
|
msgstr "تعذر العثور على ملفك الشخصي. من فضلك اتصال بالمدير."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:456
|
||||||
|
msgid "Personal Page Subtypes"
|
||||||
|
msgstr "الأنواع الفرعية للصفحة الشخصية"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:457
|
||||||
|
msgid "Community Forum Subtypes"
|
||||||
|
msgstr "الأنواع الفرعية للمنتدى المجتمعي"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:467
|
||||||
|
msgid "Account for a personal profile."
|
||||||
|
msgstr "حساب ملف شخصي خاص."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:474
|
||||||
|
msgid ""
|
||||||
|
"Account for an organisation that automatically approves contact requests as "
|
||||||
|
"\"Followers\"."
|
||||||
|
msgstr "حساب المنظمة يوافق تلقائياً على طلبات المراسلة \"كمتابعين\"."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:481
|
||||||
|
msgid ""
|
||||||
|
"Account for a news reflector that automatically approves contact requests as"
|
||||||
|
" \"Followers\"."
|
||||||
|
msgstr "حساب إخباري يوافق تلقائياً على طلبات المراسلة \"كمتابعين\"."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:488
|
||||||
|
msgid "Account for community discussions."
|
||||||
|
msgstr "حساب مناقشات مجتمعية."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:495
|
||||||
|
msgid ""
|
||||||
|
"Account for a regular personal profile that requires manual approval of "
|
||||||
|
"\"Friends\" and \"Followers\"."
|
||||||
|
msgstr "حساب ملف شخصي عادي يتطلب الموافقة اليدوية على \"الأصدقاء\" و \"المتابعين\"."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:502
|
||||||
|
msgid ""
|
||||||
|
"Account for a public profile that automatically approves contact requests as"
|
||||||
|
" \"Followers\"."
|
||||||
|
msgstr "حساب شخصي علني يوافق تلقائياً على طلبات المراسلة \"كمتابعين\"."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:509
|
||||||
|
msgid "Automatically approves all contact requests."
|
||||||
|
msgstr "يوافق تلقائياً على جميع طلبات المراسلة."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:516
|
||||||
|
msgid ""
|
||||||
|
"Account for a popular profile that automatically approves contact requests "
|
||||||
|
"as \"Friends\"."
|
||||||
|
msgstr "حساب ملف شخصي لمشهور يوافق تلقائياً على طلبات المراسلة كـ\"أصدقاء\"."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:521
|
||||||
|
msgid "Private Forum [Experimental]"
|
||||||
|
msgstr "منتدى خاص [تجريبي]"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:523
|
||||||
|
msgid "Requires manual approval of contact requests."
|
||||||
|
msgstr "يتطلب الموافقة اليدوية على طلبات المراسلة."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:532
|
||||||
|
msgid "OpenID:"
|
||||||
|
msgstr "OpenID:"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:532
|
||||||
|
msgid "(Optional) Allow this OpenID to login to this account."
|
||||||
|
msgstr "(اختياري) اسمح لمعرف OpenID بالولوج إلى هذا الحساب."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:540
|
||||||
|
msgid "Publish your profile in your local site directory?"
|
||||||
|
msgstr "أتريد نشر ملفك الشخصي في الدليل المحلي للموقع؟"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:540
|
||||||
|
#, php-format
|
||||||
|
msgid ""
|
||||||
|
"Your profile will be published in this node's <a href=\"%s\">local "
|
||||||
|
"directory</a>. Your profile details may be publicly visible depending on the"
|
||||||
|
" system settings."
|
||||||
|
msgstr "سينشر ملفك الشخصي في <a href=\"%s\"> الدليل المحلي</a> لهذه العقدة. تعتمد خصوصية معلوماتك على إعدادات النظام."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:546
|
||||||
|
#, php-format
|
||||||
|
msgid ""
|
||||||
|
"Your profile will also be published in the global friendica directories "
|
||||||
|
"(e.g. <a href=\"%s\">%s</a>)."
|
||||||
|
msgstr "سينشر ملفك الشخصي كذلك في الأدلة العالمية لفرَندِيكا (مثال <a href=\"%s\">%s</a>)."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:556
|
||||||
|
msgid "Account Settings"
|
||||||
|
msgstr "إعدادات الحساب"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:557
|
||||||
|
#, php-format
|
||||||
|
msgid "Your Identity Address is <strong>'%s'</strong> or '%s'."
|
||||||
|
msgstr "عنوان معرفك هو <strong>'%s'</strong> أو '%s'."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:565
|
||||||
|
msgid "Password Settings"
|
||||||
|
msgstr "إعدادات كلمة المرور"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:566
|
||||||
|
msgid ""
|
||||||
|
"Allowed characters are a-z, A-Z, 0-9 and special characters except white "
|
||||||
|
"spaces, accentuated letters and colon (:)."
|
||||||
|
msgstr "المحارف المسموح بها هي a-z، A-Z، 0-9 والأحرف الخاصة باستثناء المساحات، الأحرف المنبورة ونقطتي التفسير (:)."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:567
|
||||||
|
msgid "Leave password fields blank unless changing"
|
||||||
|
msgstr "اترك حقول كلمة المرور فارغة ما لم ترد تغييرها"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:568
|
||||||
|
msgid "Current Password:"
|
||||||
|
msgstr "كلمة المرور الحالية:"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:568
|
||||||
|
msgid "Your current password to confirm the changes"
|
||||||
|
msgstr "اكتب كلمة المرور الحالية لتأكيد التغييرات"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:569
|
||||||
|
msgid "Password:"
|
||||||
|
msgstr "كلمة المرور:"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:569
|
||||||
|
msgid "Your current password to confirm the changes of the email address"
|
||||||
|
msgstr "اكتب كلمة المرور الحالية لتأكيد تغيير بريدك الإلكتروني"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:572
|
||||||
|
msgid "Delete OpenID URL"
|
||||||
|
msgstr "احذف معرف OpenID"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:574
|
||||||
|
msgid "Basic Settings"
|
||||||
|
msgstr "الإعدادات الأساسيّة"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:576
|
||||||
|
msgid "Email Address:"
|
||||||
|
msgstr "البريد الإلكتروني:"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:577
|
||||||
|
msgid "Your Timezone:"
|
||||||
|
msgstr "المنطقة الزمنية:"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:578
|
||||||
|
msgid "Your Language:"
|
||||||
|
msgstr "لغتك:"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:578
|
||||||
|
msgid ""
|
||||||
|
"Set the language we use to show you friendica interface and to send you "
|
||||||
|
"emails"
|
||||||
|
msgstr "عيّن لغة واجهة فرَندِيكا ورسائل البريد الإلكتروني"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:579
|
||||||
|
msgid "Default Post Location:"
|
||||||
|
msgstr "موقع النشر الافتراضي:"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:580
|
||||||
|
msgid "Use Browser Location:"
|
||||||
|
msgstr "استخدم موقع المتصفح:"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:582
|
||||||
|
msgid "Security and Privacy Settings"
|
||||||
|
msgstr "إعدادات الأمان والخصوصية"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:584
|
||||||
|
msgid "Maximum Friend Requests/Day:"
|
||||||
|
msgstr "حدُ طلبات الصداقة لليوم الواحد:"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:584 src/Module/Settings/Account.php:594
|
||||||
|
msgid "(to prevent spam abuse)"
|
||||||
|
msgstr "(لمنع الرسائل المزعجة)"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:586
|
||||||
|
msgid "Allow your profile to be searchable globally?"
|
||||||
|
msgstr "أتريد السماح لملفك الشخصي بالظهور في نتائج البحث العالمي؟"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:586
|
||||||
|
msgid ""
|
||||||
|
"Activate this setting if you want others to easily find and follow you. Your"
|
||||||
|
" profile will be searchable on remote systems. This setting also determines "
|
||||||
|
"whether Friendica will inform search engines that your profile should be "
|
||||||
|
"indexed or not."
|
||||||
|
msgstr "فعّل هذا الإعداد إن أردت أن يُعثر عليك بسهولة. سيتمكن المستخدمون في المواقع البعيد من العثور عليك، وأيضا سيسمح بظهور ملفك الشخصي في محركات البحث."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:587
|
||||||
|
msgid "Hide your contact/friend list from viewers of your profile?"
|
||||||
|
msgstr "أتريد إخفاء قائمة المتراسلين/الأصدقاء عن متصفحي ملفك الشخصي؟"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:587
|
||||||
|
msgid ""
|
||||||
|
"A list of your contacts is displayed on your profile page. Activate this "
|
||||||
|
"option to disable the display of your contact list."
|
||||||
|
msgstr "عادة تُعرض قائمة المتراسلين على صفحة ملفك الشخصي. إن قمت بتفعيل هذا الخيار ستخفى القائمة."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:588
|
||||||
|
msgid "Hide your profile details from anonymous viewers?"
|
||||||
|
msgstr "اخف معلومات ملفك الشخص عن المتصفحين المجهولين؟"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:588
|
||||||
|
msgid ""
|
||||||
|
"Anonymous visitors will only see your profile picture, your display name and"
|
||||||
|
" the nickname you are using on your profile page. Your public posts and "
|
||||||
|
"replies will still be accessible by other means."
|
||||||
|
msgstr "سيرى الزوار المجهولون صورة ملفك الشخصي واسمك العلني ولقبك فقط. لكن ستبقى مشاركتك العامة وردودك متاحة عبر وسائل أخرى."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:589
|
||||||
|
msgid "Make public posts unlisted"
|
||||||
|
msgstr "لا تدرج المشاركات العلنية"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:589
|
||||||
|
msgid ""
|
||||||
|
"Your public posts will not appear on the community pages or in search "
|
||||||
|
"results, nor be sent to relay servers. However they can still appear on "
|
||||||
|
"public feeds on remote servers."
|
||||||
|
msgstr "لن تظهر مشاركتك العلنية على صفحات المجتمع أو في نتائج البحث لهذا الموقع، ولن يتم إرسالها إلى خوادم الترحيل. غير أنها ستبقى تظهر في التغذيات العمومية للخوادم البعيدة."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:590
|
||||||
|
msgid "Make all posted pictures accessible"
|
||||||
|
msgstr "أتح كل الصور المنشورة"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:590
|
||||||
|
msgid ""
|
||||||
|
"This option makes every posted picture accessible via the direct link. This "
|
||||||
|
"is a workaround for the problem that most other networks can't handle "
|
||||||
|
"permissions on pictures. Non public pictures still won't be visible for the "
|
||||||
|
"public on your photo albums though."
|
||||||
|
msgstr "يسمح هذا الخيار بالوصول للصورة المنشورة عبر رابط مباشر. هذا حل لمعظم الشبكات التي لا يمكنها التعامل مع الأذونات. صورك غير العلنية ستبقى مخفية."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:591
|
||||||
|
msgid "Allow friends to post to your profile page?"
|
||||||
|
msgstr "أتسمح لأصدقائك بالنشر في صفحة ملفك الشخصي؟"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:591
|
||||||
|
msgid ""
|
||||||
|
"Your contacts may write posts on your profile wall. These posts will be "
|
||||||
|
"distributed to your contacts"
|
||||||
|
msgstr "يمكن للمتراسلين كتابة مشاركات على حائط ملفك الشخصي. ستكون هذه المشركات مرئية لكل المتراسلين"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:592
|
||||||
|
msgid "Allow friends to tag your posts?"
|
||||||
|
msgstr "أتسمح لأصدقائك بوسم مشاركاتك؟"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:592
|
||||||
|
msgid "Your contacts can add additional tags to your posts."
|
||||||
|
msgstr "يمكن لأصدقائك إضافة وسوم لمشاركاتك."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:593
|
||||||
|
msgid "Permit unknown people to send you private mail?"
|
||||||
|
msgstr "أتسمح لأشخاص مجهولين بإرسال بريد خاص لك؟"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:593
|
||||||
|
msgid ""
|
||||||
|
"Friendica network users may send you private messages even if they are not "
|
||||||
|
"in your contact list."
|
||||||
|
msgstr "يمكن لمستخدمي شبكة فرَندِكا إرسال رسائل خاصة لك حتى إن لم يكونوا في قائمة المتراسلين."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:594
|
||||||
|
msgid "Maximum private messages per day from unknown people:"
|
||||||
|
msgstr "حد الرسائل اليومي المستلمة من مجهولين:"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:596
|
||||||
|
msgid "Default Post Permissions"
|
||||||
|
msgstr "أذونات النشر الافتراضية"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:600
|
||||||
|
msgid "Expiration settings"
|
||||||
|
msgstr "إعدادات انتهاء الصلاحية"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:601
|
||||||
|
msgid "Automatically expire posts after this many days:"
|
||||||
|
msgstr "أنه صَلاحِيَة المشاركات تلقائياً بعد هذا العدد من الأيام:"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:601
|
||||||
|
msgid "If empty, posts will not expire. Expired posts will be deleted"
|
||||||
|
msgstr "إذا كان فارغاً، لن تنتهي صلاحية المشاركات. وإلا بعد المهلة ستحذف المشاركات المنتهية صلاحيتها"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:602
|
||||||
|
msgid "Expire posts"
|
||||||
|
msgstr "أنه صَلاحِيَة المشاركات"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:602
|
||||||
|
msgid "When activated, posts and comments will be expired."
|
||||||
|
msgstr "عند تفعيله، ستنهى صلاحية المشاركات والتعليقات."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:603
|
||||||
|
msgid "Expire personal notes"
|
||||||
|
msgstr "أنه صَلاحِيَة الملاحظات الشخصية"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:603
|
||||||
|
msgid ""
|
||||||
|
"When activated, the personal notes on your profile page will be expired."
|
||||||
|
msgstr "عند تفعيله، ستنهى صلاحية الملاحظات الشخصية على صفحة ملفك الشخصي."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:604
|
||||||
|
msgid "Expire starred posts"
|
||||||
|
msgstr "أنتهي صلاحية المشاركات المفضلة"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:604
|
||||||
|
msgid ""
|
||||||
|
"Starring posts keeps them from being expired. That behaviour is overwritten "
|
||||||
|
"by this setting."
|
||||||
|
msgstr "تفضيل مشاركة تقيها من انتهاء الصلاحية. هذا السلوك يُتجاوز من خلال هذا الإعداد."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:605
|
||||||
|
msgid "Only expire posts by others"
|
||||||
|
msgstr "أنه صَلاحِيَة مشاركات الآخرين فقط"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:605
|
||||||
|
msgid ""
|
||||||
|
"When activated, your own posts never expire. Then the settings above are "
|
||||||
|
"only valid for posts you received."
|
||||||
|
msgstr "عند تفعيله، لا نهاية لصلاحية مشاركاتك. ثم تكون الإعدادات أعلاه صالحة فقط للمشاركات التي استلمتها."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:608
|
||||||
|
msgid "Notification Settings"
|
||||||
|
msgstr "إعدادات التنبيهات"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:609
|
||||||
|
msgid "Send a notification email when:"
|
||||||
|
msgstr "أرسل تنبيها للبريدي الإلكتروني عند:"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:610
|
||||||
|
msgid "You receive an introduction"
|
||||||
|
msgstr "تلقي تقديم"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:611
|
||||||
|
msgid "Your introductions are confirmed"
|
||||||
|
msgstr "أُكدت تقديماتك"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:612
|
||||||
|
msgid "Someone writes on your profile wall"
|
||||||
|
msgstr "يكتب شخص ما على جدار ملفك الشخصي"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:613
|
||||||
|
msgid "Someone writes a followup comment"
|
||||||
|
msgstr "شخص ما يعلق على ما نشرت"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:614
|
||||||
|
msgid "You receive a private message"
|
||||||
|
msgstr "تلقي رسالة خاصة"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:615
|
||||||
|
msgid "You receive a friend suggestion"
|
||||||
|
msgstr "تلقي اقتراح صداقة"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:616
|
||||||
|
msgid "You are tagged in a post"
|
||||||
|
msgstr "ذُكرتَ في مشاركة"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:617
|
||||||
|
msgid "You are poked/prodded/etc. in a post"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:619
|
||||||
|
msgid "Create a desktop notification when:"
|
||||||
|
msgstr "أنشئ تنبيه سطح المكتب عند:"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:620
|
||||||
|
msgid "Someone tagged you"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:621
|
||||||
|
msgid "Someone directly commented on your post"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:622
|
||||||
|
msgid "Someone liked your content"
|
||||||
|
msgstr "أُعجب شخص بمحتواك"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:622 src/Module/Settings/Account.php:623
|
||||||
|
msgid "Can only be enabled, when the direct comment notification is enabled."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:623
|
||||||
|
msgid "Someone shared your content"
|
||||||
|
msgstr "شارك شخص محتواك"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:624
|
||||||
|
msgid "Someone commented in your thread"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:625
|
||||||
|
msgid "Someone commented in a thread where you commented"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:626
|
||||||
|
msgid "Someone commented in a thread where you interacted"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:628
|
||||||
|
msgid "Activate desktop notifications"
|
||||||
|
msgstr "نشّط تنبيهات سطح المكتب"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:628
|
||||||
|
msgid "Show desktop popup on new notifications"
|
||||||
|
msgstr "أظهر منبثقات للتنبيهات الجديدة"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:632
|
||||||
|
msgid "Text-only notification emails"
|
||||||
|
msgstr "رسائل تنبيه نصية فقط"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:634
|
||||||
|
msgid "Send text only notification emails, without the html part"
|
||||||
|
msgstr "أرسل بريد التنبيه كنص فقط، دون وسوم html"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:638
|
||||||
|
msgid "Show detailled notifications"
|
||||||
|
msgstr "اعرض تنبيهات مفصلة"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:640
|
||||||
|
msgid ""
|
||||||
|
"Per default, notifications are condensed to a single notification per item. "
|
||||||
|
"When enabled every notification is displayed."
|
||||||
|
msgstr "افتراضيًا ، يعرض أحدث تنبيه فقط لكل محادثة. عند تفعيله ستعرض جميع التنبيهات."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:644
|
||||||
|
msgid "Show notifications of ignored contacts"
|
||||||
|
msgstr "أظهر تنبيهات للمتراسلين المتجاهلين"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:646
|
||||||
|
msgid ""
|
||||||
|
"You don't see posts from ignored contacts. But you still see their comments."
|
||||||
|
" This setting controls if you want to still receive regular notifications "
|
||||||
|
"that are caused by ignored contacts or not."
|
||||||
|
msgstr "أنت لا ترى مشاركات المتراسلين المتجاهلين. لكن لا يزال بإمكانك رؤية تعليقاتهم. هذا الإعداد يتحكم إذا كنت ترغب في الاستمرار في تلقي تنبيهات سببها المتراسلون المتجاهلون."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:649
|
||||||
|
msgid "Advanced Account/Page Type Settings"
|
||||||
|
msgstr "الإعدادات المتقدمة للحساب/للصفحة"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:650
|
||||||
|
msgid "Change the behaviour of this account for special situations"
|
||||||
|
msgstr "غيّر سلوك هذا الحساب للحالات الخاصة"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:653
|
||||||
|
msgid "Import Contacts"
|
||||||
|
msgstr "استيراد متراسلين"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:654
|
||||||
|
msgid ""
|
||||||
|
"Upload a CSV file that contains the handle of your followed accounts in the "
|
||||||
|
"first column you exported from the old account."
|
||||||
|
msgstr "ارفع ملف CSV معرفات المتراسلين لحسابك القديم، معرفات المتابَعين تكون في العمود الأول."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:655
|
||||||
|
msgid "Upload File"
|
||||||
|
msgstr "ارفع ملفًا"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:658
|
||||||
|
msgid "Relocate"
|
||||||
|
msgstr "الانتقال"
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:659
|
||||||
|
msgid ""
|
||||||
|
"If you have moved this profile from another server, and some of your "
|
||||||
|
"contacts don't receive your updates, try pushing this button."
|
||||||
|
msgstr "إذا كنت قد نقلت هذا الملف الشخصي من خادم آخر، وبعض المتراسلين لا يتلقون تحديثاتك، أنقر هذا الزر."
|
||||||
|
|
||||||
|
#: src/Module/Settings/Account.php:660
|
||||||
|
msgid "Resend relocate message to contacts"
|
||||||
|
msgstr "أعد إرسال رسالة الانتقال للمتراسلين"
|
||||||
|
|
||||||
#: src/Module/Settings/Delegation.php:53
|
#: src/Module/Settings/Delegation.php:53
|
||||||
msgid "Delegation successfully granted."
|
msgid "Delegation successfully granted."
|
||||||
msgstr "منح التفويض بنجاح."
|
msgstr "منح التفويض بنجاح."
|
||||||
|
|
@ -9834,32 +9985,32 @@ msgstr ""
|
||||||
msgid "Verify code and enable two-factor authentication"
|
msgid "Verify code and enable two-factor authentication"
|
||||||
msgstr "تحقق من الرمز و فعّل الاستيثاق بعاملين"
|
msgstr "تحقق من الرمز و فعّل الاستيثاق بعاملين"
|
||||||
|
|
||||||
#: src/Module/Settings/UserExport.php:67
|
#: src/Module/Settings/UserExport.php:68
|
||||||
msgid "Export account"
|
msgid "Export account"
|
||||||
msgstr "صدّر الحساب"
|
msgstr "صدّر الحساب"
|
||||||
|
|
||||||
#: src/Module/Settings/UserExport.php:67
|
#: src/Module/Settings/UserExport.php:68
|
||||||
msgid ""
|
msgid ""
|
||||||
"Export your account info and contacts. Use this to make a backup of your "
|
"Export your account info and contacts. Use this to make a backup of your "
|
||||||
"account and/or to move it to another server."
|
"account and/or to move it to another server."
|
||||||
msgstr "صدّر معلومات حسابك ومتراسليك. استخدمه لإنشاء نسخة احتياطية من حسابك أو لنقله إلى خادم آخر."
|
msgstr "صدّر معلومات حسابك ومتراسليك. استخدمه لإنشاء نسخة احتياطية من حسابك أو لنقله إلى خادم آخر."
|
||||||
|
|
||||||
#: src/Module/Settings/UserExport.php:68
|
#: src/Module/Settings/UserExport.php:69
|
||||||
msgid "Export all"
|
msgid "Export all"
|
||||||
msgstr "صدّر الكل"
|
msgstr "صدّر الكل"
|
||||||
|
|
||||||
#: src/Module/Settings/UserExport.php:68
|
#: src/Module/Settings/UserExport.php:69
|
||||||
msgid ""
|
msgid ""
|
||||||
"Export your account info, contacts and all your items as json. Could be a "
|
"Export your account info, contacts and all your items as json. Could be a "
|
||||||
"very big file, and could take a lot of time. Use this to make a full backup "
|
"very big file, and could take a lot of time. Use this to make a full backup "
|
||||||
"of your account (photos are not exported)"
|
"of your account (photos are not exported)"
|
||||||
msgstr "صدّر معلومات حسابك ومتراسليك وجميع العناصر الخاصة بك كملف json. قد يستغرق وقتًا طويلًا وينتج عنه ملف كبير. استخدمه لإنشاء نسخة احتياطية كاملة من حسابك (الصور غير مضمنة)"
|
msgstr "صدّر معلومات حسابك ومتراسليك وجميع العناصر الخاصة بك كملف json. قد يستغرق وقتًا طويلًا وينتج عنه ملف كبير. استخدمه لإنشاء نسخة احتياطية كاملة من حسابك (الصور غير مضمنة)"
|
||||||
|
|
||||||
#: src/Module/Settings/UserExport.php:69
|
#: src/Module/Settings/UserExport.php:70
|
||||||
msgid "Export Contacts to CSV"
|
msgid "Export Contacts to CSV"
|
||||||
msgstr "صدّر المتراسلين الى ملف CSV"
|
msgstr "صدّر المتراسلين الى ملف CSV"
|
||||||
|
|
||||||
#: src/Module/Settings/UserExport.php:69
|
#: src/Module/Settings/UserExport.php:70
|
||||||
msgid ""
|
msgid ""
|
||||||
"Export the list of the accounts you are following as CSV file. Compatible to"
|
"Export the list of the accounts you are following as CSV file. Compatible to"
|
||||||
" e.g. Mastodon."
|
" e.g. Mastodon."
|
||||||
|
|
@ -10074,43 +10225,51 @@ msgid ""
|
||||||
" features and resources."
|
" features and resources."
|
||||||
msgstr "يمكنك الاطلاع على صفحات <strong>المساعدة</strong> للحصول على تفاصيل حول ميزات البرامج الأخرى ومصادرها."
|
msgstr "يمكنك الاطلاع على صفحات <strong>المساعدة</strong> للحصول على تفاصيل حول ميزات البرامج الأخرى ومصادرها."
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/FormattedNotification.php:89
|
#: src/Navigation/Notifications/Factory/FormattedNavNotification.php:134
|
||||||
|
msgid "{0} wants to follow you"
|
||||||
|
msgstr "{0} يريد متابعتك"
|
||||||
|
|
||||||
|
#: src/Navigation/Notifications/Factory/FormattedNavNotification.php:136
|
||||||
|
msgid "{0} has started following you"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Navigation/Notifications/Factory/FormattedNotify.php:91
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s liked %s's post"
|
msgid "%s liked %s's post"
|
||||||
msgstr "أُعجب %s بمشاركة %s"
|
msgstr "أُعجب %s بمشاركة %s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/FormattedNotification.php:101
|
#: src/Navigation/Notifications/Factory/FormattedNotify.php:103
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s disliked %s's post"
|
msgid "%s disliked %s's post"
|
||||||
msgstr "لم يُعجب %s بمشاركة %s"
|
msgstr "لم يُعجب %s بمشاركة %s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/FormattedNotification.php:113
|
#: src/Navigation/Notifications/Factory/FormattedNotify.php:115
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s is attending %s's event"
|
msgid "%s is attending %s's event"
|
||||||
msgstr "يحضر %s حدث %s"
|
msgstr "يحضر %s حدث %s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/FormattedNotification.php:125
|
#: src/Navigation/Notifications/Factory/FormattedNotify.php:127
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s is not attending %s's event"
|
msgid "%s is not attending %s's event"
|
||||||
msgstr "لن يحضر %s حدث %s"
|
msgstr "لن يحضر %s حدث %s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/FormattedNotification.php:137
|
#: src/Navigation/Notifications/Factory/FormattedNotify.php:139
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s may attending %s's event"
|
msgid "%s may attending %s's event"
|
||||||
msgstr "قد يحضر %s حدث %s"
|
msgstr "قد يحضر %s حدث %s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/FormattedNotification.php:167
|
#: src/Navigation/Notifications/Factory/FormattedNotify.php:169
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s is now friends with %s"
|
msgid "%s is now friends with %s"
|
||||||
msgstr "أصبح %s صديقا ل %s"
|
msgstr "أصبح %s صديقا ل %s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/FormattedNotification.php:334
|
#: src/Navigation/Notifications/Factory/FormattedNotify.php:336
|
||||||
#: src/Navigation/Notifications/Factory/FormattedNotification.php:372
|
#: src/Navigation/Notifications/Factory/FormattedNotify.php:374
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s commented on %s's post"
|
msgid "%s commented on %s's post"
|
||||||
msgstr "علق %s على مشاركة %s"
|
msgstr "علق %s على مشاركة %s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/FormattedNotification.php:371
|
#: src/Navigation/Notifications/Factory/FormattedNotify.php:373
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s created a new post"
|
msgid "%s created a new post"
|
||||||
msgstr "أنشأ %s مشاركة جديدة"
|
msgstr "أنشأ %s مشاركة جديدة"
|
||||||
|
|
@ -10127,330 +10286,330 @@ msgstr "طلب صداقة/اقتران"
|
||||||
msgid "New Follower"
|
msgid "New Follower"
|
||||||
msgstr "متابِع جديد"
|
msgstr "متابِع جديد"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/Notification.php:93
|
#: src/Navigation/Notifications/Factory/Notification.php:134
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s wants to follow you"
|
msgid "%1$s wants to follow you"
|
||||||
msgstr "%1$s يريد متابعتك"
|
msgstr "%1$s يريد متابعتك"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/Notification.php:95
|
#: src/Navigation/Notifications/Factory/Notification.php:136
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s had started following you"
|
msgid "%1$s has started following you"
|
||||||
msgstr "%1$s يتابعك"
|
msgstr ""
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/Notification.php:149
|
#: src/Navigation/Notifications/Factory/Notification.php:200
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s liked your comment %2$s"
|
msgid "%1$s liked your comment on %2$s"
|
||||||
msgstr "أعجب %1$s بتعليقك %2$s"
|
msgstr ""
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/Notification.php:152
|
#: src/Navigation/Notifications/Factory/Notification.php:203
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s liked your post %2$s"
|
msgid "%1$s liked your post %2$s"
|
||||||
msgstr "أعجب %1$s بمشاركتك %2$s"
|
msgstr "أعجب %1$s بمشاركتك %2$s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/Notification.php:159
|
#: src/Navigation/Notifications/Factory/Notification.php:210
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s disliked your comment %2$s"
|
msgid "%1$s disliked your comment on %2$s"
|
||||||
msgstr "لم يعجب %1$s تعليقك %2$s"
|
msgstr ""
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/Notification.php:162
|
#: src/Navigation/Notifications/Factory/Notification.php:213
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s disliked your post %2$s"
|
msgid "%1$s disliked your post %2$s"
|
||||||
msgstr "لم يعجب %1$s مشاركتك %2$s"
|
msgstr "لم يعجب %1$s مشاركتك %2$s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/Notification.php:169
|
#: src/Navigation/Notifications/Factory/Notification.php:220
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s shared your comment %2$s"
|
msgid "%1$s shared your comment %2$s"
|
||||||
msgstr "شارك %1$s تعليقك %2$s"
|
msgstr "شارك %1$s تعليقك %2$s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/Notification.php:172
|
#: src/Navigation/Notifications/Factory/Notification.php:223
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s shared your post %2$s"
|
msgid "%1$s shared your post %2$s"
|
||||||
msgstr "شارك %1$s مشاركتك %2$s"
|
msgstr "شارك %1$s مشاركتك %2$s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/Notification.php:176
|
#: src/Navigation/Notifications/Factory/Notification.php:227
|
||||||
#: src/Navigation/Notifications/Factory/Notification.php:245
|
#: src/Navigation/Notifications/Factory/Notification.php:297
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s shared the post %2$s from %3$s"
|
msgid "%1$s shared the post %2$s from %3$s"
|
||||||
msgstr "شارك %1$s المشاركة %2$s من %3$s"
|
msgstr "شارك %1$s المشاركة %2$s من %3$s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/Notification.php:178
|
#: src/Navigation/Notifications/Factory/Notification.php:229
|
||||||
#: src/Navigation/Notifications/Factory/Notification.php:247
|
#: src/Navigation/Notifications/Factory/Notification.php:299
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s shared a post from %3$s"
|
msgid "%1$s shared a post from %3$s"
|
||||||
msgstr "شارك %1$s مشاركة %3$s"
|
msgstr "شارك %1$s مشاركة %3$s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/Notification.php:180
|
#: src/Navigation/Notifications/Factory/Notification.php:231
|
||||||
#: src/Navigation/Notifications/Factory/Notification.php:249
|
#: src/Navigation/Notifications/Factory/Notification.php:301
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s shared the post %2$s"
|
msgid "%1$s shared the post %2$s"
|
||||||
msgstr "شارك %1$s المشاركة %2$s"
|
msgstr "شارك %1$s المشاركة %2$s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/Notification.php:182
|
#: src/Navigation/Notifications/Factory/Notification.php:233
|
||||||
#: src/Navigation/Notifications/Factory/Notification.php:251
|
#: src/Navigation/Notifications/Factory/Notification.php:303
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s shared a post"
|
msgid "%1$s shared a post"
|
||||||
msgstr "شارك %1$s مشاركة"
|
msgstr "شارك %1$s مشاركة"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/Notification.php:190
|
#: src/Navigation/Notifications/Factory/Notification.php:241
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s wants to attend your event %2$s"
|
msgid "%1$s wants to attend your event %2$s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/Notification.php:197
|
#: src/Navigation/Notifications/Factory/Notification.php:248
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s does not want to attend your event %2$s"
|
msgid "%1$s does not want to attend your event %2$s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/Notification.php:204
|
#: src/Navigation/Notifications/Factory/Notification.php:255
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s maybe wants to attend your event %2$s"
|
msgid "%1$s maybe wants to attend your event %2$s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/Notification.php:211
|
#: src/Navigation/Notifications/Factory/Notification.php:262
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s tagged you on %2$s"
|
msgid "%1$s tagged you on %2$s"
|
||||||
msgstr "ذكرك %1$s في %2$s"
|
msgstr "ذكرك %1$s في %2$s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/Notification.php:215
|
#: src/Navigation/Notifications/Factory/Notification.php:266
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s replied to you on %2$s"
|
msgid "%1$s replied to you on %2$s"
|
||||||
msgstr "رد %1$s عليك في %2$s"
|
msgstr "رد %1$s عليك في %2$s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/Notification.php:219
|
#: src/Navigation/Notifications/Factory/Notification.php:270
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s commented in your thread %2$s"
|
msgid "%1$s commented in your thread %2$s"
|
||||||
msgstr "علق %1$s على نقاشك %2$s"
|
msgstr "علق %1$s على نقاشك %2$s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/Notification.php:223
|
#: src/Navigation/Notifications/Factory/Notification.php:274
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s commented on your comment %2$s"
|
msgid "%1$s commented on your comment %2$s"
|
||||||
msgstr "علق %1$s على تعليقك %2$s"
|
msgstr "علق %1$s على تعليقك %2$s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/Notification.php:229
|
#: src/Navigation/Notifications/Factory/Notification.php:281
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s commented in their thread %2$s"
|
msgid "%1$s commented in their thread %2$s"
|
||||||
msgstr "علق %1$s على نقاشه %2$s"
|
msgstr "علق %1$s على نقاشه %2$s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/Notification.php:231
|
#: src/Navigation/Notifications/Factory/Notification.php:283
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s commented in their thread"
|
msgid "%1$s commented in their thread"
|
||||||
msgstr "علق %1$s على نقاشه"
|
msgstr "علق %1$s على نقاشه"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/Notification.php:233
|
#: src/Navigation/Notifications/Factory/Notification.php:285
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s commented in the thread %2$s from %3$s"
|
msgid "%1$s commented in the thread %2$s from %3$s"
|
||||||
msgstr "علق %1$s على المحدثة %2$s من %3$s"
|
msgstr "علق %1$s على المحدثة %2$s من %3$s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/Notification.php:235
|
#: src/Navigation/Notifications/Factory/Notification.php:287
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s commented in the thread from %3$s"
|
msgid "%1$s commented in the thread from %3$s"
|
||||||
msgstr "علق %1$s على نقاش %3$s"
|
msgstr "علق %1$s على نقاش %3$s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Factory/Notification.php:240
|
#: src/Navigation/Notifications/Factory/Notification.php:292
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s commented on your thread %2$s"
|
msgid "%1$s commented on your thread %2$s"
|
||||||
msgstr "علق %1$s على نقاشك %2$s"
|
msgstr "علق %1$s على نقاشك %2$s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:211
|
#: src/Navigation/Notifications/Repository/Notify.php:221
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:694
|
#: src/Navigation/Notifications/Repository/Notify.php:735
|
||||||
msgid "[Friendica:Notify]"
|
msgid "[Friendica:Notify]"
|
||||||
msgstr "[فرنديكا: تنبيه]"
|
msgstr "[فرنديكا: تنبيه]"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:275
|
#: src/Navigation/Notifications/Repository/Notify.php:285
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s New mail received at %s"
|
msgid "%s New mail received at %s"
|
||||||
msgstr "أُستلم %s بريد جديد على %s"
|
msgstr "أُستلم %s بريد جديد على %s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:277
|
#: src/Navigation/Notifications/Repository/Notify.php:287
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s sent you a new private message at %2$s."
|
msgid "%1$s sent you a new private message at %2$s."
|
||||||
msgstr "أرسل %1$s لك رسالة خاصة على %2$s."
|
msgstr "أرسل %1$s لك رسالة خاصة على %2$s."
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:278
|
#: src/Navigation/Notifications/Repository/Notify.php:288
|
||||||
msgid "a private message"
|
msgid "a private message"
|
||||||
msgstr "رسالة خاصة"
|
msgstr "رسالة خاصة"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:278
|
#: src/Navigation/Notifications/Repository/Notify.php:288
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s sent you %2$s."
|
msgid "%1$s sent you %2$s."
|
||||||
msgstr "أرسل %1$s لك %2$s."
|
msgstr "أرسل %1$s لك %2$s."
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:280
|
#: src/Navigation/Notifications/Repository/Notify.php:290
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Please visit %s to view and/or reply to your private messages."
|
msgid "Please visit %s to view and/or reply to your private messages."
|
||||||
msgstr "من فضلك زر %s لعرض و/أو الرد على الرسائل الخاصة."
|
msgstr "من فضلك زر %s لعرض و/أو الرد على الرسائل الخاصة."
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:311
|
#: src/Navigation/Notifications/Repository/Notify.php:320
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s commented on %2$s's %3$s %4$s"
|
msgid "%1$s commented on %2$s's %3$s %4$s"
|
||||||
msgstr "علق %1$s على %3$s %2$s %4$s"
|
msgstr "علق %1$s على %3$s %2$s %4$s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:316
|
#: src/Navigation/Notifications/Repository/Notify.php:325
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s commented on your %2$s %3$s"
|
msgid "%1$s commented on your %2$s %3$s"
|
||||||
msgstr "علق %1$s على %2$s تخصك %3$s"
|
msgstr "علق %1$s على %2$s تخصك %3$s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:320
|
#: src/Navigation/Notifications/Repository/Notify.php:329
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s commented on their %2$s %3$s"
|
msgid "%1$s commented on their %2$s %3$s"
|
||||||
msgstr "علق %1$s على %2$s له %3$s"
|
msgstr "علق %1$s على %2$s له %3$s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:324
|
#: src/Navigation/Notifications/Repository/Notify.php:333
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:729
|
#: src/Navigation/Notifications/Repository/Notify.php:769
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s Comment to conversation #%2$d by %3$s"
|
msgid "%1$s Comment to conversation #%2$d by %3$s"
|
||||||
msgstr "علق %1$s على محادثة %3$s #%2$d"
|
msgstr "علق %1$s على محادثة %3$s #%2$d"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:326
|
#: src/Navigation/Notifications/Repository/Notify.php:335
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s commented on an item/conversation you have been following."
|
msgid "%s commented on an item/conversation you have been following."
|
||||||
msgstr "علق %s على محادثة/عنصر تتابعه."
|
msgstr "علق %s على محادثة/عنصر تتابعه."
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:330
|
#: src/Navigation/Notifications/Repository/Notify.php:339
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:345
|
#: src/Navigation/Notifications/Repository/Notify.php:354
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:364
|
#: src/Navigation/Notifications/Repository/Notify.php:373
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:744
|
#: src/Navigation/Notifications/Repository/Notify.php:784
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Please visit %s to view and/or reply to the conversation."
|
msgid "Please visit %s to view and/or reply to the conversation."
|
||||||
msgstr "من فضلك زر %s لعرض و/أو الرد على المحادثة."
|
msgstr "من فضلك زر %s لعرض و/أو الرد على المحادثة."
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:337
|
#: src/Navigation/Notifications/Repository/Notify.php:346
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s %s posted to your profile wall"
|
msgid "%s %s posted to your profile wall"
|
||||||
msgstr "نشر %s%s على حائط ملفك الشخصي"
|
msgstr "نشر %s%s على حائط ملفك الشخصي"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:339
|
#: src/Navigation/Notifications/Repository/Notify.php:348
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s posted to your profile wall at %2$s"
|
msgid "%1$s posted to your profile wall at %2$s"
|
||||||
msgstr "نشر %1$s على حائط ملفك الشخصي على %2$s"
|
msgstr "نشر %1$s على حائط ملفك الشخصي على %2$s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:340
|
#: src/Navigation/Notifications/Repository/Notify.php:349
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s posted to [url=%2$s]your wall[/url]"
|
msgid "%1$s posted to [url=%2$s]your wall[/url]"
|
||||||
msgstr "نشر %1$s على [url=%2$s]حائطك[/url]"
|
msgstr "نشر %1$s على [url=%2$s]حائطك[/url]"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:352
|
#: src/Navigation/Notifications/Repository/Notify.php:361
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s %2$s poked you"
|
msgid "%1$s %2$s poked you"
|
||||||
msgstr "لكزك %1$s %2$s"
|
msgstr "لكزك %1$s %2$s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:354
|
#: src/Navigation/Notifications/Repository/Notify.php:363
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s poked you at %2$s"
|
msgid "%1$s poked you at %2$s"
|
||||||
msgstr "لكزك %1$s على %2$s"
|
msgstr "لكزك %1$s على %2$s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:355
|
#: src/Navigation/Notifications/Repository/Notify.php:364
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s [url=%2$s]poked you[/url]."
|
msgid "%1$s [url=%2$s]poked you[/url]."
|
||||||
msgstr "[url=%2$s]لكزك[/url] %1$s."
|
msgstr "[url=%2$s]لكزك[/url] %1$s."
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:372
|
#: src/Navigation/Notifications/Repository/Notify.php:381
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s Introduction received"
|
msgid "%s Introduction received"
|
||||||
msgstr "تلقيت تقديما من %s"
|
msgstr "تلقيت تقديما من %s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:374
|
#: src/Navigation/Notifications/Repository/Notify.php:383
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "You've received an introduction from '%1$s' at %2$s"
|
msgid "You've received an introduction from '%1$s' at %2$s"
|
||||||
msgstr "تلقيت تقديما من '%1$s' على %2$s"
|
msgstr "تلقيت تقديما من '%1$s' على %2$s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:375
|
#: src/Navigation/Notifications/Repository/Notify.php:384
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "You've received [url=%1$s]an introduction[/url] from %2$s."
|
msgid "You've received [url=%1$s]an introduction[/url] from %2$s."
|
||||||
msgstr "تلقيت [url=%1$s]تقديما[/url] من %2$s."
|
msgstr "تلقيت [url=%1$s]تقديما[/url] من %2$s."
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:380
|
#: src/Navigation/Notifications/Repository/Notify.php:389
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:426
|
#: src/Navigation/Notifications/Repository/Notify.php:435
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "You may visit their profile at %s"
|
msgid "You may visit their profile at %s"
|
||||||
msgstr "يمكنك زيارة ملفهم الشخصي على %s"
|
msgstr "يمكنك زيارة ملفهم الشخصي على %s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:382
|
#: src/Navigation/Notifications/Repository/Notify.php:391
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Please visit %s to approve or reject the introduction."
|
msgid "Please visit %s to approve or reject the introduction."
|
||||||
msgstr "من فضلك زر %s لقبول أو رفض التقديم."
|
msgstr "من فضلك زر %s لقبول أو رفض التقديم."
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:389
|
#: src/Navigation/Notifications/Repository/Notify.php:398
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s A new person is sharing with you"
|
msgid "%s A new person is sharing with you"
|
||||||
msgstr "%s شخص جديد يشارك معك"
|
msgstr "%s شخص جديد يشارك معك"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:391
|
#: src/Navigation/Notifications/Repository/Notify.php:400
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:392
|
#: src/Navigation/Notifications/Repository/Notify.php:401
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%1$s is sharing with you at %2$s"
|
msgid "%1$s is sharing with you at %2$s"
|
||||||
msgstr "يشارك %1$s معك على %2$s"
|
msgstr "يشارك %1$s معك على %2$s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:399
|
#: src/Navigation/Notifications/Repository/Notify.php:408
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s You have a new follower"
|
msgid "%s You have a new follower"
|
||||||
msgstr "لديك متابِع جديد %s"
|
msgstr "لديك متابِع جديد %s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:401
|
#: src/Navigation/Notifications/Repository/Notify.php:410
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:402
|
#: src/Navigation/Notifications/Repository/Notify.php:411
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "You have a new follower at %2$s : %1$s"
|
msgid "You have a new follower at %2$s : %1$s"
|
||||||
msgstr "لديك متابِع جديد على %2$s : %1$s"
|
msgstr "لديك متابِع جديد على %2$s : %1$s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:415
|
#: src/Navigation/Notifications/Repository/Notify.php:424
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s Friend suggestion received"
|
msgid "%s Friend suggestion received"
|
||||||
msgstr "تلقيت إقتراح صديق %s"
|
msgstr "تلقيت إقتراح صديق %s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:417
|
#: src/Navigation/Notifications/Repository/Notify.php:426
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "You've received a friend suggestion from '%1$s' at %2$s"
|
msgid "You've received a friend suggestion from '%1$s' at %2$s"
|
||||||
msgstr "تلقيت اقتراح صديق من '%1$s' على %2$s"
|
msgstr "تلقيت اقتراح صديق من '%1$s' على %2$s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:418
|
#: src/Navigation/Notifications/Repository/Notify.php:427
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"You've received [url=%1$s]a friend suggestion[/url] for %2$s from %3$s."
|
"You've received [url=%1$s]a friend suggestion[/url] for %2$s from %3$s."
|
||||||
msgstr "اقترح عليك %3$s [url=%1$s] مصادقة %2$s[/url]."
|
msgstr "اقترح عليك %3$s [url=%1$s] مصادقة %2$s[/url]."
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:424
|
#: src/Navigation/Notifications/Repository/Notify.php:433
|
||||||
msgid "Name:"
|
msgid "Name:"
|
||||||
msgstr "الاسم:"
|
msgstr "الاسم:"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:425
|
#: src/Navigation/Notifications/Repository/Notify.php:434
|
||||||
msgid "Photo:"
|
msgid "Photo:"
|
||||||
msgstr "الصورة:"
|
msgstr "الصورة:"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:428
|
#: src/Navigation/Notifications/Repository/Notify.php:437
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Please visit %s to approve or reject the suggestion."
|
msgid "Please visit %s to approve or reject the suggestion."
|
||||||
msgstr "من فضلك زر %s لقبول أو رفض الاقتراح."
|
msgstr "من فضلك زر %s لقبول أو رفض الاقتراح."
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:436
|
#: src/Navigation/Notifications/Repository/Notify.php:445
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:451
|
#: src/Navigation/Notifications/Repository/Notify.php:460
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s Connection accepted"
|
msgid "%s Connection accepted"
|
||||||
msgstr "قُبِل الاقتران %s"
|
msgstr "قُبِل الاقتران %s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:438
|
#: src/Navigation/Notifications/Repository/Notify.php:447
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:453
|
#: src/Navigation/Notifications/Repository/Notify.php:462
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "'%1$s' has accepted your connection request at %2$s"
|
msgid "'%1$s' has accepted your connection request at %2$s"
|
||||||
msgstr "قبِل '%1$s' طلب الاقتران على %2$s"
|
msgstr "قبِل '%1$s' طلب الاقتران على %2$s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:439
|
#: src/Navigation/Notifications/Repository/Notify.php:448
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:454
|
#: src/Navigation/Notifications/Repository/Notify.php:463
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%2$s has accepted your [url=%1$s]connection request[/url]."
|
msgid "%2$s has accepted your [url=%1$s]connection request[/url]."
|
||||||
msgstr "قبِل %2$s [url=%1$s]طلب الاقتران[/url]."
|
msgstr "قبِل %2$s [url=%1$s]طلب الاقتران[/url]."
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:444
|
#: src/Navigation/Notifications/Repository/Notify.php:453
|
||||||
msgid ""
|
msgid ""
|
||||||
"You are now mutual friends and may exchange status updates, photos, and "
|
"You are now mutual friends and may exchange status updates, photos, and "
|
||||||
"email without restriction."
|
"email without restriction."
|
||||||
msgstr "أصبحتما صديقين من كلا الطرفين ويمكنكما تبادل تحديثات الحالة، والصور، والبريد دون قيود."
|
msgstr "أصبحتما صديقين من كلا الطرفين ويمكنكما تبادل تحديثات الحالة، والصور، والبريد دون قيود."
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:446
|
#: src/Navigation/Notifications/Repository/Notify.php:455
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Please visit %s if you wish to make any changes to this relationship."
|
msgid "Please visit %s if you wish to make any changes to this relationship."
|
||||||
msgstr "من فضلك زر %s إن أردت تغيير هذه العلاقة."
|
msgstr "من فضلك زر %s إن أردت تغيير هذه العلاقة."
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:459
|
#: src/Navigation/Notifications/Repository/Notify.php:468
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"'%1$s' has chosen to accept you a fan, which restricts some forms of "
|
"'%1$s' has chosen to accept you a fan, which restricts some forms of "
|
||||||
|
|
@ -10459,33 +10618,33 @@ msgid ""
|
||||||
"automatically."
|
"automatically."
|
||||||
msgstr "قبِلك '%1$s' كمعجب، هذا يحدُّ من أشكال التواصل بينكما مثل الرسائل الخاصة وبعض التفاعلات. يتم هذا تلقائيا اذا كانت صفحة مشهور أو مجتمع."
|
msgstr "قبِلك '%1$s' كمعجب، هذا يحدُّ من أشكال التواصل بينكما مثل الرسائل الخاصة وبعض التفاعلات. يتم هذا تلقائيا اذا كانت صفحة مشهور أو مجتمع."
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:461
|
#: src/Navigation/Notifications/Repository/Notify.php:470
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"'%1$s' may choose to extend this into a two-way or more permissive "
|
"'%1$s' may choose to extend this into a two-way or more permissive "
|
||||||
"relationship in the future."
|
"relationship in the future."
|
||||||
msgstr "قد يختار '%1$s' توسيعها إلى علاقة ذات اتجاهين أو أكثر في المستقبل."
|
msgstr "قد يختار '%1$s' توسيعها إلى علاقة ذات اتجاهين أو أكثر في المستقبل."
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:463
|
#: src/Navigation/Notifications/Repository/Notify.php:472
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Please visit %s if you wish to make any changes to this relationship."
|
msgid "Please visit %s if you wish to make any changes to this relationship."
|
||||||
msgstr "من فضلك زر %s إن أردت تغيير هذه العلاقة."
|
msgstr "من فضلك زر %s إن أردت تغيير هذه العلاقة."
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:473
|
#: src/Navigation/Notifications/Repository/Notify.php:482
|
||||||
msgid "registration request"
|
msgid "registration request"
|
||||||
msgstr "طلب تسجيل"
|
msgstr "طلب تسجيل"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:475
|
#: src/Navigation/Notifications/Repository/Notify.php:484
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "You've received a registration request from '%1$s' at %2$s"
|
msgid "You've received a registration request from '%1$s' at %2$s"
|
||||||
msgstr "تلقيت طلب تسجيل من '%1$s' على %2$s"
|
msgstr "تلقيت طلب تسجيل من '%1$s' على %2$s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:476
|
#: src/Navigation/Notifications/Repository/Notify.php:485
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "You've received a [url=%1$s]registration request[/url] from %2$s."
|
msgid "You've received a [url=%1$s]registration request[/url] from %2$s."
|
||||||
msgstr "تلقيت [url=%1$s]طلب تسجيل[/url] من %2$s."
|
msgstr "تلقيت [url=%1$s]طلب تسجيل[/url] من %2$s."
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:481
|
#: src/Navigation/Notifications/Repository/Notify.php:490
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Full Name:\t%s\n"
|
"Full Name:\t%s\n"
|
||||||
|
|
@ -10493,17 +10652,17 @@ msgid ""
|
||||||
"Login Name:\t%s (%s)"
|
"Login Name:\t%s (%s)"
|
||||||
msgstr "الاسم الكامل:\t%s\nالموقع:\t%s\nاسم الولوج:\t%s (%s)"
|
msgstr "الاسم الكامل:\t%s\nالموقع:\t%s\nاسم الولوج:\t%s (%s)"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:487
|
#: src/Navigation/Notifications/Repository/Notify.php:496
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Please visit %s to approve or reject the request."
|
msgid "Please visit %s to approve or reject the request."
|
||||||
msgstr "من فضلك زر %s لقبول أو رفض الطلب."
|
msgstr "من فضلك زر %s لقبول أو رفض الطلب."
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:723
|
#: src/Navigation/Notifications/Repository/Notify.php:763
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s %s tagged you"
|
msgid "%s %s tagged you"
|
||||||
msgstr "ذكرك %s%s"
|
msgstr "ذكرك %s%s"
|
||||||
|
|
||||||
#: src/Navigation/Notifications/Repository/Notify.php:726
|
#: src/Navigation/Notifications/Repository/Notify.php:766
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s %s shared a new post"
|
msgid "%s %s shared a new post"
|
||||||
msgstr "شارك %s%s مشاركة جديدة"
|
msgstr "شارك %s%s مشاركة جديدة"
|
||||||
|
|
@ -10555,10 +10714,6 @@ msgstr ""
|
||||||
msgid "Edit"
|
msgid "Edit"
|
||||||
msgstr "تعديل"
|
msgstr "تعديل"
|
||||||
|
|
||||||
#: src/Object/Post.php:235
|
|
||||||
msgid "Pinned item"
|
|
||||||
msgstr "عنصر مثبت"
|
|
||||||
|
|
||||||
#: src/Object/Post.php:239
|
#: src/Object/Post.php:239
|
||||||
msgid "Delete globally"
|
msgid "Delete globally"
|
||||||
msgstr "احذفه عالميًا"
|
msgstr "احذفه عالميًا"
|
||||||
|
|
@ -10656,65 +10811,73 @@ msgstr "ألغ إعادة النشر"
|
||||||
msgid "Unshare"
|
msgid "Unshare"
|
||||||
msgstr "ألغ المشاركة"
|
msgstr "ألغ المشاركة"
|
||||||
|
|
||||||
#: src/Object/Post.php:421
|
#: src/Object/Post.php:423
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s (Received %s)"
|
msgid "%s (Received %s)"
|
||||||
msgstr "%s (استلم %s)"
|
msgstr "%s (استلم %s)"
|
||||||
|
|
||||||
#: src/Object/Post.php:426
|
#: src/Object/Post.php:428
|
||||||
msgid "Comment this item on your system"
|
msgid "Comment this item on your system"
|
||||||
msgstr "علّق على هذا العنصر على خادمك"
|
msgstr "علّق على هذا العنصر على خادمك"
|
||||||
|
|
||||||
#: src/Object/Post.php:426
|
#: src/Object/Post.php:428
|
||||||
msgid "Remote comment"
|
msgid "Remote comment"
|
||||||
msgstr "تعليق بعيد"
|
msgstr "تعليق بعيد"
|
||||||
|
|
||||||
#: src/Object/Post.php:470
|
#: src/Object/Post.php:449
|
||||||
|
msgid "Share via ..."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Object/Post.php:449
|
||||||
|
msgid "Share via external services"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Object/Post.php:478
|
||||||
msgid "to"
|
msgid "to"
|
||||||
msgstr "إلى"
|
msgstr "إلى"
|
||||||
|
|
||||||
#: src/Object/Post.php:471
|
#: src/Object/Post.php:479
|
||||||
msgid "via"
|
msgid "via"
|
||||||
msgstr "عبر"
|
msgstr "عبر"
|
||||||
|
|
||||||
#: src/Object/Post.php:472
|
#: src/Object/Post.php:480
|
||||||
msgid "Wall-to-Wall"
|
msgid "Wall-to-Wall"
|
||||||
msgstr "حائط لحائط"
|
msgstr "حائط لحائط"
|
||||||
|
|
||||||
#: src/Object/Post.php:473
|
#: src/Object/Post.php:481
|
||||||
msgid "via Wall-To-Wall:"
|
msgid "via Wall-To-Wall:"
|
||||||
msgstr "عير حائط لحائط"
|
msgstr "عير حائط لحائط"
|
||||||
|
|
||||||
#: src/Object/Post.php:515
|
#: src/Object/Post.php:523
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Reply to %s"
|
msgid "Reply to %s"
|
||||||
msgstr "رد على %s"
|
msgstr "رد على %s"
|
||||||
|
|
||||||
#: src/Object/Post.php:518
|
#: src/Object/Post.php:526
|
||||||
msgid "More"
|
msgid "More"
|
||||||
msgstr "المزيد"
|
msgstr "المزيد"
|
||||||
|
|
||||||
#: src/Object/Post.php:536
|
#: src/Object/Post.php:544
|
||||||
msgid "Notifier task is pending"
|
msgid "Notifier task is pending"
|
||||||
msgstr "مهمة التنبيه معلقة"
|
msgstr "مهمة التنبيه معلقة"
|
||||||
|
|
||||||
#: src/Object/Post.php:537
|
#: src/Object/Post.php:545
|
||||||
msgid "Delivery to remote servers is pending"
|
msgid "Delivery to remote servers is pending"
|
||||||
msgstr "التسليم للخوادم البعيدة معلق"
|
msgstr "التسليم للخوادم البعيدة معلق"
|
||||||
|
|
||||||
#: src/Object/Post.php:538
|
#: src/Object/Post.php:546
|
||||||
msgid "Delivery to remote servers is underway"
|
msgid "Delivery to remote servers is underway"
|
||||||
msgstr "التسليم إلى الخوادم البعيدة جار"
|
msgstr "التسليم إلى الخوادم البعيدة جار"
|
||||||
|
|
||||||
#: src/Object/Post.php:539
|
#: src/Object/Post.php:547
|
||||||
msgid "Delivery to remote servers is mostly done"
|
msgid "Delivery to remote servers is mostly done"
|
||||||
msgstr "التسليم إلى الخوادم البعيدة يكاد يكتمل"
|
msgstr "التسليم إلى الخوادم البعيدة يكاد يكتمل"
|
||||||
|
|
||||||
#: src/Object/Post.php:540
|
#: src/Object/Post.php:548
|
||||||
msgid "Delivery to remote servers is done"
|
msgid "Delivery to remote servers is done"
|
||||||
msgstr "التسليم للخوادم البعيدة اكتمل"
|
msgstr "التسليم للخوادم البعيدة اكتمل"
|
||||||
|
|
||||||
#: src/Object/Post.php:560
|
#: src/Object/Post.php:568
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%d comment"
|
msgid "%d comment"
|
||||||
msgid_plural "%d comments"
|
msgid_plural "%d comments"
|
||||||
|
|
@ -10725,11 +10888,11 @@ msgstr[3] "%d تعليقات"
|
||||||
msgstr[4] "%d تعليقا"
|
msgstr[4] "%d تعليقا"
|
||||||
msgstr[5] "%d تعليق"
|
msgstr[5] "%d تعليق"
|
||||||
|
|
||||||
#: src/Object/Post.php:561
|
#: src/Object/Post.php:569
|
||||||
msgid "Show more"
|
msgid "Show more"
|
||||||
msgstr "اعرض المزيد"
|
msgstr "اعرض المزيد"
|
||||||
|
|
||||||
#: src/Object/Post.php:562
|
#: src/Object/Post.php:570
|
||||||
msgid "Show fewer"
|
msgid "Show fewer"
|
||||||
msgstr "اعرض أقل"
|
msgstr "اعرض أقل"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -301,9 +301,6 @@ $a->strings['Dislike'] = 'لم يعجبني';
|
||||||
$a->strings['I don\'t like this (toggle)'] = 'لم يعجبني (بدِّل)';
|
$a->strings['I don\'t like this (toggle)'] = 'لم يعجبني (بدِّل)';
|
||||||
$a->strings['Map'] = 'خريطة';
|
$a->strings['Map'] = 'خريطة';
|
||||||
$a->strings['View Album'] = 'اعرض الألبوم';
|
$a->strings['View Album'] = 'اعرض الألبوم';
|
||||||
$a->strings['{0} wants to be your friend'] = '{0} يريد أن يكون صديقك';
|
|
||||||
$a->strings['{0} requested registration'] = '{0} طلبَ التسجيل';
|
|
||||||
$a->strings['{0} and %d others requested registration'] = '{0} و %d أخرون يطلبون التسجيل';
|
|
||||||
$a->strings['Bad Request.'] = 'طلب خاطئ.';
|
$a->strings['Bad Request.'] = 'طلب خاطئ.';
|
||||||
$a->strings['Contact not found.'] = 'لم يُعثر على المتراسل.';
|
$a->strings['Contact not found.'] = 'لم يُعثر على المتراسل.';
|
||||||
$a->strings['[Friendica System Notify]'] = '[تنبيه نظام فرنديكا]';
|
$a->strings['[Friendica System Notify]'] = '[تنبيه نظام فرنديكا]';
|
||||||
|
|
@ -323,19 +320,6 @@ $a->strings['Error'] = [
|
||||||
5 => 'خطأٍ',
|
5 => 'خطأٍ',
|
||||||
];
|
];
|
||||||
$a->strings['Failed to connect with email account using the settings provided.'] = 'فشل الاتصال بحساب البريد الإلكتروني باستخدام الإعدادات المقدمة.';
|
$a->strings['Failed to connect with email account using the settings provided.'] = 'فشل الاتصال بحساب البريد الإلكتروني باستخدام الإعدادات المقدمة.';
|
||||||
$a->strings['Contact CSV file upload error'] = 'خطأ أثناء رفع ملف CSV';
|
|
||||||
$a->strings['Importing Contacts done'] = 'أُستورد المتراسلون';
|
|
||||||
$a->strings['Relocate message has been send to your contacts'] = 'أُرسلت رسالة تنبيه بانتقالك إلى متراسليك';
|
|
||||||
$a->strings['Passwords do not match.'] = 'كلمتا المرور غير متطابقتين.';
|
|
||||||
$a->strings['Password update failed. Please try again.'] = 'فشل تحديث كلمة المرور. من فضلك أعد المحاولة.';
|
|
||||||
$a->strings['Password changed.'] = 'غُيّرت كلمة المرور.';
|
|
||||||
$a->strings['Password unchanged.'] = 'لم تُغير كلمة المرور.';
|
|
||||||
$a->strings['Please use a shorter name.'] = 'يرجى استخدام اسم أقصر.';
|
|
||||||
$a->strings['Name too short.'] = 'الاسم قصير جداً.';
|
|
||||||
$a->strings['Wrong Password.'] = 'كلمة المرور خاطئة.';
|
|
||||||
$a->strings['Invalid email.'] = 'البريد الإلكتروني غير صالح.';
|
|
||||||
$a->strings['Cannot change to that email.'] = 'لا يمكن التغيير إلى هذا البريد الإلكتروني.';
|
|
||||||
$a->strings['Settings were not updated.'] = 'لم تُحدث الإعدادات.';
|
|
||||||
$a->strings['Connected Apps'] = 'التطبيقات المتصلة';
|
$a->strings['Connected Apps'] = 'التطبيقات المتصلة';
|
||||||
$a->strings['Name'] = 'الاسم';
|
$a->strings['Name'] = 'الاسم';
|
||||||
$a->strings['Home Page'] = 'الصفحة الرئيسية';
|
$a->strings['Home Page'] = 'الصفحة الرئيسية';
|
||||||
|
|
@ -382,115 +366,6 @@ $a->strings['Action after import:'] = 'الإجراء بعد الاستيراد:
|
||||||
$a->strings['Mark as seen'] = 'علّمه كمُشاهَد';
|
$a->strings['Mark as seen'] = 'علّمه كمُشاهَد';
|
||||||
$a->strings['Move to folder'] = 'انقل إلى مجلد';
|
$a->strings['Move to folder'] = 'انقل إلى مجلد';
|
||||||
$a->strings['Move to folder:'] = 'انقل إلى المجلد:';
|
$a->strings['Move to folder:'] = 'انقل إلى المجلد:';
|
||||||
$a->strings['Unable to find your profile. Please contact your admin.'] = 'تعذر العثور على ملفك الشخصي. من فضلك اتصال بالمدير.';
|
|
||||||
$a->strings['Account Types'] = 'أنواع الحسابات';
|
|
||||||
$a->strings['Personal Page Subtypes'] = 'الأنواع الفرعية للصفحة الشخصية';
|
|
||||||
$a->strings['Community Forum Subtypes'] = 'الأنواع الفرعية للمنتدى المجتمعي';
|
|
||||||
$a->strings['Personal Page'] = 'صفحة شخصية';
|
|
||||||
$a->strings['Account for a personal profile.'] = 'حساب ملف شخصي خاص.';
|
|
||||||
$a->strings['Organisation Page'] = 'صفحة منظمة';
|
|
||||||
$a->strings['Account for an organisation that automatically approves contact requests as "Followers".'] = 'حساب المنظمة يوافق تلقائياً على طلبات المراسلة "كمتابعين".';
|
|
||||||
$a->strings['News Page'] = 'صفحة إخبارية';
|
|
||||||
$a->strings['Account for a news reflector that automatically approves contact requests as "Followers".'] = 'حساب إخباري يوافق تلقائياً على طلبات المراسلة "كمتابعين".';
|
|
||||||
$a->strings['Community Forum'] = 'منتدى مجتمعي';
|
|
||||||
$a->strings['Account for community discussions.'] = 'حساب مناقشات مجتمعية.';
|
|
||||||
$a->strings['Normal Account Page'] = 'صفحة حساب عادي';
|
|
||||||
$a->strings['Account for a regular personal profile that requires manual approval of "Friends" and "Followers".'] = 'حساب ملف شخصي عادي يتطلب الموافقة اليدوية على "الأصدقاء" و "المتابعين".';
|
|
||||||
$a->strings['Soapbox Page'] = 'صفحة سياسي';
|
|
||||||
$a->strings['Account for a public profile that automatically approves contact requests as "Followers".'] = 'حساب شخصي علني يوافق تلقائياً على طلبات المراسلة "كمتابعين".';
|
|
||||||
$a->strings['Public Forum'] = 'منتدى عمومي';
|
|
||||||
$a->strings['Automatically approves all contact requests.'] = 'يوافق تلقائياً على جميع طلبات المراسلة.';
|
|
||||||
$a->strings['Automatic Friend Page'] = 'صفحة اشترك تلقائي';
|
|
||||||
$a->strings['Account for a popular profile that automatically approves contact requests as "Friends".'] = 'حساب ملف شخصي لمشهور يوافق تلقائياً على طلبات المراسلة كـ"أصدقاء".';
|
|
||||||
$a->strings['Private Forum [Experimental]'] = 'منتدى خاص [تجريبي]';
|
|
||||||
$a->strings['Requires manual approval of contact requests.'] = 'يتطلب الموافقة اليدوية على طلبات المراسلة.';
|
|
||||||
$a->strings['OpenID:'] = 'OpenID:';
|
|
||||||
$a->strings['(Optional) Allow this OpenID to login to this account.'] = '(اختياري) اسمح لمعرف OpenID بالولوج إلى هذا الحساب.';
|
|
||||||
$a->strings['Publish your profile in your local site directory?'] = 'أتريد نشر ملفك الشخصي في الدليل المحلي للموقع؟';
|
|
||||||
$a->strings['Your profile will be published in this node\'s <a href="%s">local directory</a>. Your profile details may be publicly visible depending on the system settings.'] = 'سينشر ملفك الشخصي في <a href="%s"> الدليل المحلي</a> لهذه العقدة. تعتمد خصوصية معلوماتك على إعدادات النظام.';
|
|
||||||
$a->strings['Your profile will also be published in the global friendica directories (e.g. <a href="%s">%s</a>).'] = 'سينشر ملفك الشخصي كذلك في الأدلة العالمية لفرَندِيكا (مثال <a href="%s">%s</a>).';
|
|
||||||
$a->strings['Your Identity Address is <strong>\'%s\'</strong> or \'%s\'.'] = 'عنوان معرفك هو <strong>\'%s\'</strong> أو \'%s\'.';
|
|
||||||
$a->strings['Account Settings'] = 'إعدادات الحساب';
|
|
||||||
$a->strings['Password Settings'] = 'إعدادات كلمة المرور';
|
|
||||||
$a->strings['New Password:'] = 'كلمة المرور الجديدة:';
|
|
||||||
$a->strings['Allowed characters are a-z, A-Z, 0-9 and special characters except white spaces, accentuated letters and colon (:).'] = 'المحارف المسموح بها هي a-z، A-Z، 0-9 والأحرف الخاصة باستثناء المساحات، الأحرف المنبورة ونقطتي التفسير (:).';
|
|
||||||
$a->strings['Confirm:'] = 'التأكيد:';
|
|
||||||
$a->strings['Leave password fields blank unless changing'] = 'اترك حقول كلمة المرور فارغة ما لم ترد تغييرها';
|
|
||||||
$a->strings['Current Password:'] = 'كلمة المرور الحالية:';
|
|
||||||
$a->strings['Your current password to confirm the changes'] = 'اكتب كلمة المرور الحالية لتأكيد التغييرات';
|
|
||||||
$a->strings['Password:'] = 'كلمة المرور:';
|
|
||||||
$a->strings['Your current password to confirm the changes of the email address'] = 'اكتب كلمة المرور الحالية لتأكيد تغيير بريدك الإلكتروني';
|
|
||||||
$a->strings['Delete OpenID URL'] = 'احذف معرف OpenID';
|
|
||||||
$a->strings['Basic Settings'] = 'الإعدادات الأساسيّة';
|
|
||||||
$a->strings['Full Name:'] = 'الاسم الكامل:';
|
|
||||||
$a->strings['Email Address:'] = 'البريد الإلكتروني:';
|
|
||||||
$a->strings['Your Timezone:'] = 'المنطقة الزمنية:';
|
|
||||||
$a->strings['Your Language:'] = 'لغتك:';
|
|
||||||
$a->strings['Set the language we use to show you friendica interface and to send you emails'] = 'عيّن لغة واجهة فرَندِيكا ورسائل البريد الإلكتروني';
|
|
||||||
$a->strings['Default Post Location:'] = 'موقع النشر الافتراضي:';
|
|
||||||
$a->strings['Use Browser Location:'] = 'استخدم موقع المتصفح:';
|
|
||||||
$a->strings['Security and Privacy Settings'] = 'إعدادات الأمان والخصوصية';
|
|
||||||
$a->strings['Maximum Friend Requests/Day:'] = 'حدُ طلبات الصداقة لليوم الواحد:';
|
|
||||||
$a->strings['(to prevent spam abuse)'] = '(لمنع الرسائل المزعجة)';
|
|
||||||
$a->strings['Allow your profile to be searchable globally?'] = 'أتريد السماح لملفك الشخصي بالظهور في نتائج البحث العالمي؟';
|
|
||||||
$a->strings['Activate this setting if you want others to easily find and follow you. Your profile will be searchable on remote systems. This setting also determines whether Friendica will inform search engines that your profile should be indexed or not.'] = 'فعّل هذا الإعداد إن أردت أن يُعثر عليك بسهولة. سيتمكن المستخدمون في المواقع البعيد من العثور عليك، وأيضا سيسمح بظهور ملفك الشخصي في محركات البحث.';
|
|
||||||
$a->strings['Hide your contact/friend list from viewers of your profile?'] = 'أتريد إخفاء قائمة المتراسلين/الأصدقاء عن متصفحي ملفك الشخصي؟';
|
|
||||||
$a->strings['A list of your contacts is displayed on your profile page. Activate this option to disable the display of your contact list.'] = 'عادة تُعرض قائمة المتراسلين على صفحة ملفك الشخصي. إن قمت بتفعيل هذا الخيار ستخفى القائمة.';
|
|
||||||
$a->strings['Hide your profile details from anonymous viewers?'] = 'اخف معلومات ملفك الشخص عن المتصفحين المجهولين؟';
|
|
||||||
$a->strings['Anonymous visitors will only see your profile picture, your display name and the nickname you are using on your profile page. Your public posts and replies will still be accessible by other means.'] = 'سيرى الزوار المجهولون صورة ملفك الشخصي واسمك العلني ولقبك فقط. لكن ستبقى مشاركتك العامة وردودك متاحة عبر وسائل أخرى.';
|
|
||||||
$a->strings['Make public posts unlisted'] = 'لا تدرج المشاركات العلنية';
|
|
||||||
$a->strings['Your public posts will not appear on the community pages or in search results, nor be sent to relay servers. However they can still appear on public feeds on remote servers.'] = 'لن تظهر مشاركتك العلنية على صفحات المجتمع أو في نتائج البحث لهذا الموقع، ولن يتم إرسالها إلى خوادم الترحيل. غير أنها ستبقى تظهر في التغذيات العمومية للخوادم البعيدة.';
|
|
||||||
$a->strings['Make all posted pictures accessible'] = 'أتح كل الصور المنشورة';
|
|
||||||
$a->strings['This option makes every posted picture accessible via the direct link. This is a workaround for the problem that most other networks can\'t handle permissions on pictures. Non public pictures still won\'t be visible for the public on your photo albums though.'] = 'يسمح هذا الخيار بالوصول للصورة المنشورة عبر رابط مباشر. هذا حل لمعظم الشبكات التي لا يمكنها التعامل مع الأذونات. صورك غير العلنية ستبقى مخفية.';
|
|
||||||
$a->strings['Allow friends to post to your profile page?'] = 'أتسمح لأصدقائك بالنشر في صفحة ملفك الشخصي؟';
|
|
||||||
$a->strings['Your contacts may write posts on your profile wall. These posts will be distributed to your contacts'] = 'يمكن للمتراسلين كتابة مشاركات على حائط ملفك الشخصي. ستكون هذه المشركات مرئية لكل المتراسلين';
|
|
||||||
$a->strings['Allow friends to tag your posts?'] = 'أتسمح لأصدقائك بوسم مشاركاتك؟';
|
|
||||||
$a->strings['Your contacts can add additional tags to your posts.'] = 'يمكن لأصدقائك إضافة وسوم لمشاركاتك.';
|
|
||||||
$a->strings['Permit unknown people to send you private mail?'] = 'أتسمح لأشخاص مجهولين بإرسال بريد خاص لك؟';
|
|
||||||
$a->strings['Friendica network users may send you private messages even if they are not in your contact list.'] = 'يمكن لمستخدمي شبكة فرَندِكا إرسال رسائل خاصة لك حتى إن لم يكونوا في قائمة المتراسلين.';
|
|
||||||
$a->strings['Maximum private messages per day from unknown people:'] = 'حد الرسائل اليومي المستلمة من مجهولين:';
|
|
||||||
$a->strings['Default Post Permissions'] = 'أذونات النشر الافتراضية';
|
|
||||||
$a->strings['Expiration settings'] = 'إعدادات انتهاء الصلاحية';
|
|
||||||
$a->strings['Automatically expire posts after this many days:'] = 'أنه صَلاحِيَة المشاركات تلقائياً بعد هذا العدد من الأيام:';
|
|
||||||
$a->strings['If empty, posts will not expire. Expired posts will be deleted'] = 'إذا كان فارغاً، لن تنتهي صلاحية المشاركات. وإلا بعد المهلة ستحذف المشاركات المنتهية صلاحيتها';
|
|
||||||
$a->strings['Expire posts'] = 'أنه صَلاحِيَة المشاركات';
|
|
||||||
$a->strings['When activated, posts and comments will be expired.'] = 'عند تفعيله، ستنهى صلاحية المشاركات والتعليقات.';
|
|
||||||
$a->strings['Expire personal notes'] = 'أنه صَلاحِيَة الملاحظات الشخصية';
|
|
||||||
$a->strings['When activated, the personal notes on your profile page will be expired.'] = 'عند تفعيله، ستنهى صلاحية الملاحظات الشخصية على صفحة ملفك الشخصي.';
|
|
||||||
$a->strings['Expire starred posts'] = 'أنتهي صلاحية المشاركات المفضلة';
|
|
||||||
$a->strings['Starring posts keeps them from being expired. That behaviour is overwritten by this setting.'] = 'تفضيل مشاركة تقيها من انتهاء الصلاحية. هذا السلوك يُتجاوز من خلال هذا الإعداد.';
|
|
||||||
$a->strings['Expire photos'] = 'أنه صَلاحِيَة الصور';
|
|
||||||
$a->strings['When activated, photos will be expired.'] = 'عند تفعيله، ستنهى صلاحية الصور.';
|
|
||||||
$a->strings['Only expire posts by others'] = 'أنه صَلاحِيَة مشاركات الآخرين فقط';
|
|
||||||
$a->strings['When activated, your own posts never expire. Then the settings above are only valid for posts you received.'] = 'عند تفعيله، لا نهاية لصلاحية مشاركاتك. ثم تكون الإعدادات أعلاه صالحة فقط للمشاركات التي استلمتها.';
|
|
||||||
$a->strings['Notification Settings'] = 'إعدادات التنبيهات';
|
|
||||||
$a->strings['Send a notification email when:'] = 'أرسل تنبيها للبريدي الإلكتروني عند:';
|
|
||||||
$a->strings['You receive an introduction'] = 'تلقي تقديم';
|
|
||||||
$a->strings['Your introductions are confirmed'] = 'أُكدت تقديماتك';
|
|
||||||
$a->strings['Someone writes on your profile wall'] = 'يكتب شخص ما على جدار ملفك الشخصي';
|
|
||||||
$a->strings['Someone writes a followup comment'] = 'شخص ما يعلق على ما نشرت';
|
|
||||||
$a->strings['You receive a private message'] = 'تلقي رسالة خاصة';
|
|
||||||
$a->strings['You receive a friend suggestion'] = 'تلقي اقتراح صداقة';
|
|
||||||
$a->strings['You are tagged in a post'] = 'ذُكرتَ في مشاركة';
|
|
||||||
$a->strings['Create a desktop notification when:'] = 'أنشئ تنبيه سطح المكتب عند:';
|
|
||||||
$a->strings['Someone liked your content'] = 'أُعجب شخص بمحتواك';
|
|
||||||
$a->strings['Someone shared your content'] = 'شارك شخص محتواك';
|
|
||||||
$a->strings['Activate desktop notifications'] = 'نشّط تنبيهات سطح المكتب';
|
|
||||||
$a->strings['Show desktop popup on new notifications'] = 'أظهر منبثقات للتنبيهات الجديدة';
|
|
||||||
$a->strings['Text-only notification emails'] = 'رسائل تنبيه نصية فقط';
|
|
||||||
$a->strings['Send text only notification emails, without the html part'] = 'أرسل بريد التنبيه كنص فقط، دون وسوم html';
|
|
||||||
$a->strings['Show detailled notifications'] = 'اعرض تنبيهات مفصلة';
|
|
||||||
$a->strings['Per default, notifications are condensed to a single notification per item. When enabled every notification is displayed.'] = 'افتراضيًا ، يعرض أحدث تنبيه فقط لكل محادثة. عند تفعيله ستعرض جميع التنبيهات.';
|
|
||||||
$a->strings['Show notifications of ignored contacts'] = 'أظهر تنبيهات للمتراسلين المتجاهلين';
|
|
||||||
$a->strings['You don\'t see posts from ignored contacts. But you still see their comments. This setting controls if you want to still receive regular notifications that are caused by ignored contacts or not.'] = 'أنت لا ترى مشاركات المتراسلين المتجاهلين. لكن لا يزال بإمكانك رؤية تعليقاتهم. هذا الإعداد يتحكم إذا كنت ترغب في الاستمرار في تلقي تنبيهات سببها المتراسلون المتجاهلون.';
|
|
||||||
$a->strings['Advanced Account/Page Type Settings'] = 'الإعدادات المتقدمة للحساب/للصفحة';
|
|
||||||
$a->strings['Change the behaviour of this account for special situations'] = 'غيّر سلوك هذا الحساب للحالات الخاصة';
|
|
||||||
$a->strings['Import Contacts'] = 'استيراد متراسلين';
|
|
||||||
$a->strings['Upload a CSV file that contains the handle of your followed accounts in the first column you exported from the old account.'] = 'ارفع ملف CSV معرفات المتراسلين لحسابك القديم، معرفات المتابَعين تكون في العمود الأول.';
|
|
||||||
$a->strings['Upload File'] = 'ارفع ملفًا';
|
|
||||||
$a->strings['Relocate'] = 'الانتقال';
|
|
||||||
$a->strings['If you have moved this profile from another server, and some of your contacts don\'t receive your updates, try pushing this button.'] = 'إذا كنت قد نقلت هذا الملف الشخصي من خادم آخر، وبعض المتراسلين لا يتلقون تحديثاتك، أنقر هذا الزر.';
|
|
||||||
$a->strings['Resend relocate message to contacts'] = 'أعد إرسال رسالة الانتقال للمتراسلين';
|
|
||||||
$a->strings['No suggestions available. If this is a new site, please try again in 24 hours.'] = 'لا توجد اقتراحات متاحة. إذا كان هذا الموقع جديد، من فضلك أعد المحاولة في غضون 24 ساعة.';
|
$a->strings['No suggestions available. If this is a new site, please try again in 24 hours.'] = 'لا توجد اقتراحات متاحة. إذا كان هذا الموقع جديد، من فضلك أعد المحاولة في غضون 24 ساعة.';
|
||||||
$a->strings['Friend Suggestions'] = 'اقتراحات الأصدقاء';
|
$a->strings['Friend Suggestions'] = 'اقتراحات الأصدقاء';
|
||||||
$a->strings['photo'] = 'صورة';
|
$a->strings['photo'] = 'صورة';
|
||||||
|
|
@ -551,6 +426,8 @@ $a->strings['Execute pending post updates.'] = 'نفذ التحديثات الم
|
||||||
$a->strings['All pending post updates are done.'] = 'تمت كل تحديثات المعلقة للمشاركة.';
|
$a->strings['All pending post updates are done.'] = 'تمت كل تحديثات المعلقة للمشاركة.';
|
||||||
$a->strings['Enter user nickname: '] = 'أدخل لقب المستخدم: ';
|
$a->strings['Enter user nickname: '] = 'أدخل لقب المستخدم: ';
|
||||||
$a->strings['Enter new password: '] = 'أدخل كلمة مرور جديدة: ';
|
$a->strings['Enter new password: '] = 'أدخل كلمة مرور جديدة: ';
|
||||||
|
$a->strings['Password update failed. Please try again.'] = 'فشل تحديث كلمة المرور. من فضلك أعد المحاولة.';
|
||||||
|
$a->strings['Password changed.'] = 'غُيّرت كلمة المرور.';
|
||||||
$a->strings['Enter user name: '] = 'أدخل اسم المستخدم: ';
|
$a->strings['Enter user name: '] = 'أدخل اسم المستخدم: ';
|
||||||
$a->strings['Enter user email address: '] = 'أدخل عنوان البريد الإلكتروني: ';
|
$a->strings['Enter user email address: '] = 'أدخل عنوان البريد الإلكتروني: ';
|
||||||
$a->strings['Enter a language (optional): '] = 'أدخل اللغة (اختياري): ';
|
$a->strings['Enter a language (optional): '] = 'أدخل اللغة (اختياري): ';
|
||||||
|
|
@ -616,6 +493,7 @@ $a->strings['Share'] = 'شارك';
|
||||||
$a->strings['Image'] = 'صورة';
|
$a->strings['Image'] = 'صورة';
|
||||||
$a->strings['Video'] = 'فيديو';
|
$a->strings['Video'] = 'فيديو';
|
||||||
$a->strings['Scheduled at'] = 'بُرمِج في';
|
$a->strings['Scheduled at'] = 'بُرمِج في';
|
||||||
|
$a->strings['Pinned item'] = 'عنصر مثبت';
|
||||||
$a->strings['View %s\'s profile @ %s'] = 'اعرض ملف %s الشخصي @ %s';
|
$a->strings['View %s\'s profile @ %s'] = 'اعرض ملف %s الشخصي @ %s';
|
||||||
$a->strings['Categories:'] = 'الفئات:';
|
$a->strings['Categories:'] = 'الفئات:';
|
||||||
$a->strings['Filed under:'] = 'مصنف كـ:';
|
$a->strings['Filed under:'] = 'مصنف كـ:';
|
||||||
|
|
@ -788,6 +666,7 @@ $a->strings['Archives'] = 'الأرشيفات';
|
||||||
$a->strings['Persons'] = 'الأشخاص';
|
$a->strings['Persons'] = 'الأشخاص';
|
||||||
$a->strings['Organisations'] = 'المنظّمات';
|
$a->strings['Organisations'] = 'المنظّمات';
|
||||||
$a->strings['News'] = 'الأخبار';
|
$a->strings['News'] = 'الأخبار';
|
||||||
|
$a->strings['Account Types'] = 'أنواع الحسابات';
|
||||||
$a->strings['All'] = 'الكل';
|
$a->strings['All'] = 'الكل';
|
||||||
$a->strings['Export'] = 'صدّر';
|
$a->strings['Export'] = 'صدّر';
|
||||||
$a->strings['Export calendar as ical'] = 'صدّر الرزنامة كملف ical';
|
$a->strings['Export calendar as ical'] = 'صدّر الرزنامة كملف ical';
|
||||||
|
|
@ -1251,7 +1130,15 @@ $a->strings['Blocked'] = 'محجوب';
|
||||||
$a->strings['List of blocked users'] = 'قائمة المستخدمين المحجوبين';
|
$a->strings['List of blocked users'] = 'قائمة المستخدمين المحجوبين';
|
||||||
$a->strings['Deleted'] = 'حُذف';
|
$a->strings['Deleted'] = 'حُذف';
|
||||||
$a->strings['List of pending user deletions'] = 'قائمة الحذف المعلق للمستخدمين';
|
$a->strings['List of pending user deletions'] = 'قائمة الحذف المعلق للمستخدمين';
|
||||||
|
$a->strings['Normal Account Page'] = 'صفحة حساب عادي';
|
||||||
|
$a->strings['Soapbox Page'] = 'صفحة سياسي';
|
||||||
|
$a->strings['Public Forum'] = 'منتدى عمومي';
|
||||||
|
$a->strings['Automatic Friend Page'] = 'صفحة اشترك تلقائي';
|
||||||
$a->strings['Private Forum'] = 'منتدى خاص';
|
$a->strings['Private Forum'] = 'منتدى خاص';
|
||||||
|
$a->strings['Personal Page'] = 'صفحة شخصية';
|
||||||
|
$a->strings['Organisation Page'] = 'صفحة منظمة';
|
||||||
|
$a->strings['News Page'] = 'صفحة إخبارية';
|
||||||
|
$a->strings['Community Forum'] = 'منتدى مجتمعي';
|
||||||
$a->strings['Relay'] = 'مُرحِل';
|
$a->strings['Relay'] = 'مُرحِل';
|
||||||
$a->strings['%s contact unblocked'] = [
|
$a->strings['%s contact unblocked'] = [
|
||||||
0 => 'لم يُرفع الحجب عن مستخدم %s',
|
0 => 'لم يُرفع الحجب عن مستخدم %s',
|
||||||
|
|
@ -1346,9 +1233,7 @@ $a->strings['Other'] = 'أخرى';
|
||||||
$a->strings['unknown'] = 'مجهول';
|
$a->strings['unknown'] = 'مجهول';
|
||||||
$a->strings['%s total systems'] = '%s نظام';
|
$a->strings['%s total systems'] = '%s نظام';
|
||||||
$a->strings['%s active users last month'] = '%s مستخدم نشط في آخر شهر';
|
$a->strings['%s active users last month'] = '%s مستخدم نشط في آخر شهر';
|
||||||
$a->strings['%s active users last six month'] = '%s مستخدم نشط في آخر ستة أشهر';
|
|
||||||
$a->strings['%s registered users'] = '%s مستخدم مسجل';
|
$a->strings['%s registered users'] = '%s مستخدم مسجل';
|
||||||
$a->strings['%s local posts'] = '%s مشاركة محلية';
|
|
||||||
$a->strings['%s posts per user'] = '%s مشاركة لكل مستخدم';
|
$a->strings['%s posts per user'] = '%s مشاركة لكل مستخدم';
|
||||||
$a->strings['%s users per system'] = '%s مستخدم لكل نظام';
|
$a->strings['%s users per system'] = '%s مستخدم لكل نظام';
|
||||||
$a->strings['This page offers you some numbers to the known part of the federated social network your Friendica node is part of. These numbers are not complete but only reflect the part of the network your node is aware of.'] = 'تقدم لك هذه الصفحة بعض الإحصائيات للجزء المعروف من الشبكة الاجتماعية الموحدة المتصلة بعقدتك. هذه الإحصائيات ليست كاملة ولكنها تتضمن المواقع المعروفة لعقدتك من الشبكة.';
|
$a->strings['This page offers you some numbers to the known part of the federated social network your Friendica node is part of. These numbers are not complete but only reflect the part of the network your node is aware of.'] = 'تقدم لك هذه الصفحة بعض الإحصائيات للجزء المعروف من الشبكة الاجتماعية الموحدة المتصلة بعقدتك. هذه الإحصائيات ليست كاملة ولكنها تتضمن المواقع المعروفة لعقدتك من الشبكة.';
|
||||||
|
|
@ -1405,8 +1290,6 @@ $a->strings['ID'] = 'المعرف';
|
||||||
$a->strings['Command'] = 'أمر';
|
$a->strings['Command'] = 'أمر';
|
||||||
$a->strings['Job Parameters'] = 'معطيات العملية';
|
$a->strings['Job Parameters'] = 'معطيات العملية';
|
||||||
$a->strings['Priority'] = 'الأولوية';
|
$a->strings['Priority'] = 'الأولوية';
|
||||||
$a->strings['Can not parse base url. Must have at least <scheme>://<domain>'] = 'يتعذر تحليل الرابط الأساسي. يجب أن يكون <scheme>://<domain>';
|
|
||||||
$a->strings['Relocation started. Could take a while to complete.'] = 'بدأ النقل. قد يستغرق بعض الوقت.';
|
|
||||||
$a->strings['No special theme for mobile devices'] = 'لا توجد سمة مخصصة للهاتف';
|
$a->strings['No special theme for mobile devices'] = 'لا توجد سمة مخصصة للهاتف';
|
||||||
$a->strings['%s - (Experimental)'] = '%s - (اختباري)';
|
$a->strings['%s - (Experimental)'] = '%s - (اختباري)';
|
||||||
$a->strings['No community page for local users'] = 'لا توجد صفحة مجتمع للمستخدمين المحليين';
|
$a->strings['No community page for local users'] = 'لا توجد صفحة مجتمع للمستخدمين المحليين';
|
||||||
|
|
@ -1437,8 +1320,6 @@ $a->strings['Worker'] = 'مهمة';
|
||||||
$a->strings['Message Relay'] = 'ترحيل الرسالة';
|
$a->strings['Message Relay'] = 'ترحيل الرسالة';
|
||||||
$a->strings['The system is not subscribed to any relays at the moment.'] = 'هذا الخادم ليس مشترك في أي مرحلات حاليًا.';
|
$a->strings['The system is not subscribed to any relays at the moment.'] = 'هذا الخادم ليس مشترك في أي مرحلات حاليًا.';
|
||||||
$a->strings['The system is currently subscribed to the following relays:'] = 'هذا الخادم مشترك حاليًا في المرحلات التالية:';
|
$a->strings['The system is currently subscribed to the following relays:'] = 'هذا الخادم مشترك حاليًا في المرحلات التالية:';
|
||||||
$a->strings['Relocate Instance'] = 'انقل المثيل';
|
|
||||||
$a->strings['<strong>Warning!</strong> Advanced function. Could make this server unreachable.'] = '<strong>تحذير!</strong> وظيفة متقدمة. يمكن أن تجعل هذا الخادم غير قابل للوصول.';
|
|
||||||
$a->strings['Site name'] = 'اسم الموقع';
|
$a->strings['Site name'] = 'اسم الموقع';
|
||||||
$a->strings['Sender Email'] = 'بريد المرسل';
|
$a->strings['Sender Email'] = 'بريد المرسل';
|
||||||
$a->strings['The email address your server shall use to send notification emails from.'] = 'عنوان البريد الإلكتروني الذي سيستخدمه الخادم لإرسال رسائل التنبيه.';
|
$a->strings['The email address your server shall use to send notification emails from.'] = 'عنوان البريد الإلكتروني الذي سيستخدمه الخادم لإرسال رسائل التنبيه.';
|
||||||
|
|
@ -1454,7 +1335,6 @@ $a->strings['Additional Info'] = 'معلومات إضافية';
|
||||||
$a->strings['For public servers: you can add additional information here that will be listed at %s/servers.'] = 'للخوادم العامة: يمكنك إضافة معلومات إضافية لتدرج في %s/servers.';
|
$a->strings['For public servers: you can add additional information here that will be listed at %s/servers.'] = 'للخوادم العامة: يمكنك إضافة معلومات إضافية لتدرج في %s/servers.';
|
||||||
$a->strings['System language'] = 'لغة النظام';
|
$a->strings['System language'] = 'لغة النظام';
|
||||||
$a->strings['System theme'] = 'سمة النظام';
|
$a->strings['System theme'] = 'سمة النظام';
|
||||||
$a->strings['Default system theme - may be over-ridden by user profiles - <a href="/admin/themes" id="cnftheme">Change default theme settings</a>'] = 'مظهر الموقع الافتراضي يختلف بناءً على الملف الشخصي الذي تمت زيارته - <a href="/admin/themes" id="cnftheme"> غيّر إعدادات السمة الافتراضية</a>';
|
|
||||||
$a->strings['Mobile system theme'] = 'سمة الهاتف';
|
$a->strings['Mobile system theme'] = 'سمة الهاتف';
|
||||||
$a->strings['Theme for mobile devices'] = 'سمة للأجهزة المحمولة';
|
$a->strings['Theme for mobile devices'] = 'سمة للأجهزة المحمولة';
|
||||||
$a->strings['SSL link policy'] = 'سياسة روابط SSL';
|
$a->strings['SSL link policy'] = 'سياسة روابط SSL';
|
||||||
|
|
@ -1555,7 +1435,6 @@ $a->strings['Temp path'] = 'مسار التخزين المؤقت';
|
||||||
$a->strings['If you have a restricted system where the webserver can\'t access the system temp path, enter another path here.'] = 'إذا كان نظامك مقيد حيث لا يستطيع خادم الويب الوصول إلى مسار مجلد التخزين المؤقت (temp)، أدخل مسار آخر هنا.';
|
$a->strings['If you have a restricted system where the webserver can\'t access the system temp path, enter another path here.'] = 'إذا كان نظامك مقيد حيث لا يستطيع خادم الويب الوصول إلى مسار مجلد التخزين المؤقت (temp)، أدخل مسار آخر هنا.';
|
||||||
$a->strings['Only search in tags'] = 'ابحث في الوسوم فقط';
|
$a->strings['Only search in tags'] = 'ابحث في الوسوم فقط';
|
||||||
$a->strings['On large systems the text search can slow down the system extremely.'] = 'في النّظم الكبيرة، يمكن أن يؤدي البحث عن النصوص إلى إبطاء النظام.';
|
$a->strings['On large systems the text search can slow down the system extremely.'] = 'في النّظم الكبيرة، يمكن أن يؤدي البحث عن النصوص إلى إبطاء النظام.';
|
||||||
$a->strings['New base url'] = 'رابط أساسي جديد';
|
|
||||||
$a->strings['Maximum number of parallel workers'] = 'الحد الأقصى لعدد المهام';
|
$a->strings['Maximum number of parallel workers'] = 'الحد الأقصى لعدد المهام';
|
||||||
$a->strings['Can be "all" or "tags". "all" means that every public post should be received. "tags" means that only posts with selected tags should be received.'] = 'إما أن يكون "الكل" أو "الوسوم". يعني "الكل" وُجوب تلقي كل المشاركات العلنية. تعني "الوسوم" وجوب تلقي المشاركات ذات الوسوم المحددة فقط.';
|
$a->strings['Can be "all" or "tags". "all" means that every public post should be received. "tags" means that only posts with selected tags should be received.'] = 'إما أن يكون "الكل" أو "الوسوم". يعني "الكل" وُجوب تلقي كل المشاركات العلنية. تعني "الوسوم" وجوب تلقي المشاركات ذات الوسوم المحددة فقط.';
|
||||||
$a->strings['Disabled'] = 'معطّل';
|
$a->strings['Disabled'] = 'معطّل';
|
||||||
|
|
@ -2072,6 +1951,8 @@ $a->strings['System Notifications'] = 'تنبيهات النظام';
|
||||||
$a->strings['Personal Notifications'] = 'تنبيهات شخصية';
|
$a->strings['Personal Notifications'] = 'تنبيهات شخصية';
|
||||||
$a->strings['Home Notifications'] = 'تنبيهات الصفحة الرئيسية';
|
$a->strings['Home Notifications'] = 'تنبيهات الصفحة الرئيسية';
|
||||||
$a->strings['Show unread'] = 'اعرض غير المقروءة';
|
$a->strings['Show unread'] = 'اعرض غير المقروءة';
|
||||||
|
$a->strings['{0} requested registration'] = '{0} طلبَ التسجيل';
|
||||||
|
$a->strings['{0} and %d others requested registration'] = '{0} و %d أخرون يطلبون التسجيل';
|
||||||
$a->strings['Authorize application connection'] = 'خول لهذا التطبيق الاتصال';
|
$a->strings['Authorize application connection'] = 'خول لهذا التطبيق الاتصال';
|
||||||
$a->strings['Do you want to authorize this application to access your posts and contacts, and/or create new posts for you?'] = 'هل تخول لهذا التطبيق الوصول إلى مشاركاتك ومتراسليك، و/أو إنشاء مشاركات جديدة باسمك؟';
|
$a->strings['Do you want to authorize this application to access your posts and contacts, and/or create new posts for you?'] = 'هل تخول لهذا التطبيق الوصول إلى مشاركاتك ومتراسليك، و/أو إنشاء مشاركات جديدة باسمك؟';
|
||||||
$a->strings['Unsupported or missing response type'] = 'نوع الاستجابة غير مدعومة أو مفقودة';
|
$a->strings['Unsupported or missing response type'] = 'نوع الاستجابة غير مدعومة أو مفقودة';
|
||||||
|
|
@ -2089,6 +1970,7 @@ $a->strings['Invalid photo with id %s.'] = 'الصورة ذات المعرف %s
|
||||||
$a->strings['No contacts.'] = 'لا متراسلين.';
|
$a->strings['No contacts.'] = 'لا متراسلين.';
|
||||||
$a->strings['Profile not found.'] = 'لم يُعثر على الملف الشخصي.';
|
$a->strings['Profile not found.'] = 'لم يُعثر على الملف الشخصي.';
|
||||||
$a->strings['You\'re currently viewing your profile as <b>%s</b> <a href="%s" class="btn btn-sm pull-right">Cancel</a>'] = 'أنت حاليا تستعرض ملفك الشخصي كـ <b>%s</b><a href="%s" class="btn btn-sm pull-right"> ألغ</a>';
|
$a->strings['You\'re currently viewing your profile as <b>%s</b> <a href="%s" class="btn btn-sm pull-right">Cancel</a>'] = 'أنت حاليا تستعرض ملفك الشخصي كـ <b>%s</b><a href="%s" class="btn btn-sm pull-right"> ألغ</a>';
|
||||||
|
$a->strings['Full Name:'] = 'الاسم الكامل:';
|
||||||
$a->strings['Member since:'] = 'عضو منذ:';
|
$a->strings['Member since:'] = 'عضو منذ:';
|
||||||
$a->strings['j F, Y'] = 'j F, Y';
|
$a->strings['j F, Y'] = 'j F, Y';
|
||||||
$a->strings['j F'] = 'j F';
|
$a->strings['j F'] = 'j F';
|
||||||
|
|
@ -2121,6 +2003,8 @@ $a->strings['Membership on this site is by invitation only.'] = 'العضوية
|
||||||
$a->strings['Your invitation code: '] = 'رمز الدعوة: ';
|
$a->strings['Your invitation code: '] = 'رمز الدعوة: ';
|
||||||
$a->strings['Your Full Name (e.g. Joe Smith, real or real-looking): '] = 'اسمك الكامل (على سبيل المثال جو سميث): ';
|
$a->strings['Your Full Name (e.g. Joe Smith, real or real-looking): '] = 'اسمك الكامل (على سبيل المثال جو سميث): ';
|
||||||
$a->strings['Please repeat your e-mail address:'] = 'رجاء أعد إدخال عنوان بريدك الإلكتروني:';
|
$a->strings['Please repeat your e-mail address:'] = 'رجاء أعد إدخال عنوان بريدك الإلكتروني:';
|
||||||
|
$a->strings['New Password:'] = 'كلمة المرور الجديدة:';
|
||||||
|
$a->strings['Confirm:'] = 'التأكيد:';
|
||||||
$a->strings['Choose a nickname: '] = 'اختر لقبًا: ';
|
$a->strings['Choose a nickname: '] = 'اختر لقبًا: ';
|
||||||
$a->strings['Import your profile to this friendica instance'] = 'استورد ملفك الشخصي لهذا المثيل';
|
$a->strings['Import your profile to this friendica instance'] = 'استورد ملفك الشخصي لهذا المثيل';
|
||||||
$a->strings['Parent Password:'] = 'كلمة المرور الولي:';
|
$a->strings['Parent Password:'] = 'كلمة المرور الولي:';
|
||||||
|
|
@ -2168,6 +2052,112 @@ $a->strings['<p>Open the two-factor authentication app on your device to get an
|
||||||
$a->strings['Please enter a code from your authentication app'] = 'يرجى إدخال رمز من تطبيق الاستيثاق';
|
$a->strings['Please enter a code from your authentication app'] = 'يرجى إدخال رمز من تطبيق الاستيثاق';
|
||||||
$a->strings['This is my two-factor authenticator app device'] = 'هذا هو جهاز الذي استخدمه للاستيثاق بعاملين';
|
$a->strings['This is my two-factor authenticator app device'] = 'هذا هو جهاز الذي استخدمه للاستيثاق بعاملين';
|
||||||
$a->strings['Verify code and complete login'] = 'تحقق من الرمز وأكمل الولوج';
|
$a->strings['Verify code and complete login'] = 'تحقق من الرمز وأكمل الولوج';
|
||||||
|
$a->strings['Passwords do not match.'] = 'كلمتا المرور غير متطابقتين.';
|
||||||
|
$a->strings['Password unchanged.'] = 'لم تُغير كلمة المرور.';
|
||||||
|
$a->strings['Please use a shorter name.'] = 'يرجى استخدام اسم أقصر.';
|
||||||
|
$a->strings['Name too short.'] = 'الاسم قصير جداً.';
|
||||||
|
$a->strings['Wrong Password.'] = 'كلمة المرور خاطئة.';
|
||||||
|
$a->strings['Invalid email.'] = 'البريد الإلكتروني غير صالح.';
|
||||||
|
$a->strings['Cannot change to that email.'] = 'لا يمكن التغيير إلى هذا البريد الإلكتروني.';
|
||||||
|
$a->strings['Settings were not updated.'] = 'لم تُحدث الإعدادات.';
|
||||||
|
$a->strings['Contact CSV file upload error'] = 'خطأ أثناء رفع ملف CSV';
|
||||||
|
$a->strings['Importing Contacts done'] = 'أُستورد المتراسلون';
|
||||||
|
$a->strings['Relocate message has been send to your contacts'] = 'أُرسلت رسالة تنبيه بانتقالك إلى متراسليك';
|
||||||
|
$a->strings['Unable to find your profile. Please contact your admin.'] = 'تعذر العثور على ملفك الشخصي. من فضلك اتصال بالمدير.';
|
||||||
|
$a->strings['Personal Page Subtypes'] = 'الأنواع الفرعية للصفحة الشخصية';
|
||||||
|
$a->strings['Community Forum Subtypes'] = 'الأنواع الفرعية للمنتدى المجتمعي';
|
||||||
|
$a->strings['Account for a personal profile.'] = 'حساب ملف شخصي خاص.';
|
||||||
|
$a->strings['Account for an organisation that automatically approves contact requests as "Followers".'] = 'حساب المنظمة يوافق تلقائياً على طلبات المراسلة "كمتابعين".';
|
||||||
|
$a->strings['Account for a news reflector that automatically approves contact requests as "Followers".'] = 'حساب إخباري يوافق تلقائياً على طلبات المراسلة "كمتابعين".';
|
||||||
|
$a->strings['Account for community discussions.'] = 'حساب مناقشات مجتمعية.';
|
||||||
|
$a->strings['Account for a regular personal profile that requires manual approval of "Friends" and "Followers".'] = 'حساب ملف شخصي عادي يتطلب الموافقة اليدوية على "الأصدقاء" و "المتابعين".';
|
||||||
|
$a->strings['Account for a public profile that automatically approves contact requests as "Followers".'] = 'حساب شخصي علني يوافق تلقائياً على طلبات المراسلة "كمتابعين".';
|
||||||
|
$a->strings['Automatically approves all contact requests.'] = 'يوافق تلقائياً على جميع طلبات المراسلة.';
|
||||||
|
$a->strings['Account for a popular profile that automatically approves contact requests as "Friends".'] = 'حساب ملف شخصي لمشهور يوافق تلقائياً على طلبات المراسلة كـ"أصدقاء".';
|
||||||
|
$a->strings['Private Forum [Experimental]'] = 'منتدى خاص [تجريبي]';
|
||||||
|
$a->strings['Requires manual approval of contact requests.'] = 'يتطلب الموافقة اليدوية على طلبات المراسلة.';
|
||||||
|
$a->strings['OpenID:'] = 'OpenID:';
|
||||||
|
$a->strings['(Optional) Allow this OpenID to login to this account.'] = '(اختياري) اسمح لمعرف OpenID بالولوج إلى هذا الحساب.';
|
||||||
|
$a->strings['Publish your profile in your local site directory?'] = 'أتريد نشر ملفك الشخصي في الدليل المحلي للموقع؟';
|
||||||
|
$a->strings['Your profile will be published in this node\'s <a href="%s">local directory</a>. Your profile details may be publicly visible depending on the system settings.'] = 'سينشر ملفك الشخصي في <a href="%s"> الدليل المحلي</a> لهذه العقدة. تعتمد خصوصية معلوماتك على إعدادات النظام.';
|
||||||
|
$a->strings['Your profile will also be published in the global friendica directories (e.g. <a href="%s">%s</a>).'] = 'سينشر ملفك الشخصي كذلك في الأدلة العالمية لفرَندِيكا (مثال <a href="%s">%s</a>).';
|
||||||
|
$a->strings['Account Settings'] = 'إعدادات الحساب';
|
||||||
|
$a->strings['Your Identity Address is <strong>\'%s\'</strong> or \'%s\'.'] = 'عنوان معرفك هو <strong>\'%s\'</strong> أو \'%s\'.';
|
||||||
|
$a->strings['Password Settings'] = 'إعدادات كلمة المرور';
|
||||||
|
$a->strings['Allowed characters are a-z, A-Z, 0-9 and special characters except white spaces, accentuated letters and colon (:).'] = 'المحارف المسموح بها هي a-z، A-Z، 0-9 والأحرف الخاصة باستثناء المساحات، الأحرف المنبورة ونقطتي التفسير (:).';
|
||||||
|
$a->strings['Leave password fields blank unless changing'] = 'اترك حقول كلمة المرور فارغة ما لم ترد تغييرها';
|
||||||
|
$a->strings['Current Password:'] = 'كلمة المرور الحالية:';
|
||||||
|
$a->strings['Your current password to confirm the changes'] = 'اكتب كلمة المرور الحالية لتأكيد التغييرات';
|
||||||
|
$a->strings['Password:'] = 'كلمة المرور:';
|
||||||
|
$a->strings['Your current password to confirm the changes of the email address'] = 'اكتب كلمة المرور الحالية لتأكيد تغيير بريدك الإلكتروني';
|
||||||
|
$a->strings['Delete OpenID URL'] = 'احذف معرف OpenID';
|
||||||
|
$a->strings['Basic Settings'] = 'الإعدادات الأساسيّة';
|
||||||
|
$a->strings['Email Address:'] = 'البريد الإلكتروني:';
|
||||||
|
$a->strings['Your Timezone:'] = 'المنطقة الزمنية:';
|
||||||
|
$a->strings['Your Language:'] = 'لغتك:';
|
||||||
|
$a->strings['Set the language we use to show you friendica interface and to send you emails'] = 'عيّن لغة واجهة فرَندِيكا ورسائل البريد الإلكتروني';
|
||||||
|
$a->strings['Default Post Location:'] = 'موقع النشر الافتراضي:';
|
||||||
|
$a->strings['Use Browser Location:'] = 'استخدم موقع المتصفح:';
|
||||||
|
$a->strings['Security and Privacy Settings'] = 'إعدادات الأمان والخصوصية';
|
||||||
|
$a->strings['Maximum Friend Requests/Day:'] = 'حدُ طلبات الصداقة لليوم الواحد:';
|
||||||
|
$a->strings['(to prevent spam abuse)'] = '(لمنع الرسائل المزعجة)';
|
||||||
|
$a->strings['Allow your profile to be searchable globally?'] = 'أتريد السماح لملفك الشخصي بالظهور في نتائج البحث العالمي؟';
|
||||||
|
$a->strings['Activate this setting if you want others to easily find and follow you. Your profile will be searchable on remote systems. This setting also determines whether Friendica will inform search engines that your profile should be indexed or not.'] = 'فعّل هذا الإعداد إن أردت أن يُعثر عليك بسهولة. سيتمكن المستخدمون في المواقع البعيد من العثور عليك، وأيضا سيسمح بظهور ملفك الشخصي في محركات البحث.';
|
||||||
|
$a->strings['Hide your contact/friend list from viewers of your profile?'] = 'أتريد إخفاء قائمة المتراسلين/الأصدقاء عن متصفحي ملفك الشخصي؟';
|
||||||
|
$a->strings['A list of your contacts is displayed on your profile page. Activate this option to disable the display of your contact list.'] = 'عادة تُعرض قائمة المتراسلين على صفحة ملفك الشخصي. إن قمت بتفعيل هذا الخيار ستخفى القائمة.';
|
||||||
|
$a->strings['Hide your profile details from anonymous viewers?'] = 'اخف معلومات ملفك الشخص عن المتصفحين المجهولين؟';
|
||||||
|
$a->strings['Anonymous visitors will only see your profile picture, your display name and the nickname you are using on your profile page. Your public posts and replies will still be accessible by other means.'] = 'سيرى الزوار المجهولون صورة ملفك الشخصي واسمك العلني ولقبك فقط. لكن ستبقى مشاركتك العامة وردودك متاحة عبر وسائل أخرى.';
|
||||||
|
$a->strings['Make public posts unlisted'] = 'لا تدرج المشاركات العلنية';
|
||||||
|
$a->strings['Your public posts will not appear on the community pages or in search results, nor be sent to relay servers. However they can still appear on public feeds on remote servers.'] = 'لن تظهر مشاركتك العلنية على صفحات المجتمع أو في نتائج البحث لهذا الموقع، ولن يتم إرسالها إلى خوادم الترحيل. غير أنها ستبقى تظهر في التغذيات العمومية للخوادم البعيدة.';
|
||||||
|
$a->strings['Make all posted pictures accessible'] = 'أتح كل الصور المنشورة';
|
||||||
|
$a->strings['This option makes every posted picture accessible via the direct link. This is a workaround for the problem that most other networks can\'t handle permissions on pictures. Non public pictures still won\'t be visible for the public on your photo albums though.'] = 'يسمح هذا الخيار بالوصول للصورة المنشورة عبر رابط مباشر. هذا حل لمعظم الشبكات التي لا يمكنها التعامل مع الأذونات. صورك غير العلنية ستبقى مخفية.';
|
||||||
|
$a->strings['Allow friends to post to your profile page?'] = 'أتسمح لأصدقائك بالنشر في صفحة ملفك الشخصي؟';
|
||||||
|
$a->strings['Your contacts may write posts on your profile wall. These posts will be distributed to your contacts'] = 'يمكن للمتراسلين كتابة مشاركات على حائط ملفك الشخصي. ستكون هذه المشركات مرئية لكل المتراسلين';
|
||||||
|
$a->strings['Allow friends to tag your posts?'] = 'أتسمح لأصدقائك بوسم مشاركاتك؟';
|
||||||
|
$a->strings['Your contacts can add additional tags to your posts.'] = 'يمكن لأصدقائك إضافة وسوم لمشاركاتك.';
|
||||||
|
$a->strings['Permit unknown people to send you private mail?'] = 'أتسمح لأشخاص مجهولين بإرسال بريد خاص لك؟';
|
||||||
|
$a->strings['Friendica network users may send you private messages even if they are not in your contact list.'] = 'يمكن لمستخدمي شبكة فرَندِكا إرسال رسائل خاصة لك حتى إن لم يكونوا في قائمة المتراسلين.';
|
||||||
|
$a->strings['Maximum private messages per day from unknown people:'] = 'حد الرسائل اليومي المستلمة من مجهولين:';
|
||||||
|
$a->strings['Default Post Permissions'] = 'أذونات النشر الافتراضية';
|
||||||
|
$a->strings['Expiration settings'] = 'إعدادات انتهاء الصلاحية';
|
||||||
|
$a->strings['Automatically expire posts after this many days:'] = 'أنه صَلاحِيَة المشاركات تلقائياً بعد هذا العدد من الأيام:';
|
||||||
|
$a->strings['If empty, posts will not expire. Expired posts will be deleted'] = 'إذا كان فارغاً، لن تنتهي صلاحية المشاركات. وإلا بعد المهلة ستحذف المشاركات المنتهية صلاحيتها';
|
||||||
|
$a->strings['Expire posts'] = 'أنه صَلاحِيَة المشاركات';
|
||||||
|
$a->strings['When activated, posts and comments will be expired.'] = 'عند تفعيله، ستنهى صلاحية المشاركات والتعليقات.';
|
||||||
|
$a->strings['Expire personal notes'] = 'أنه صَلاحِيَة الملاحظات الشخصية';
|
||||||
|
$a->strings['When activated, the personal notes on your profile page will be expired.'] = 'عند تفعيله، ستنهى صلاحية الملاحظات الشخصية على صفحة ملفك الشخصي.';
|
||||||
|
$a->strings['Expire starred posts'] = 'أنتهي صلاحية المشاركات المفضلة';
|
||||||
|
$a->strings['Starring posts keeps them from being expired. That behaviour is overwritten by this setting.'] = 'تفضيل مشاركة تقيها من انتهاء الصلاحية. هذا السلوك يُتجاوز من خلال هذا الإعداد.';
|
||||||
|
$a->strings['Only expire posts by others'] = 'أنه صَلاحِيَة مشاركات الآخرين فقط';
|
||||||
|
$a->strings['When activated, your own posts never expire. Then the settings above are only valid for posts you received.'] = 'عند تفعيله، لا نهاية لصلاحية مشاركاتك. ثم تكون الإعدادات أعلاه صالحة فقط للمشاركات التي استلمتها.';
|
||||||
|
$a->strings['Notification Settings'] = 'إعدادات التنبيهات';
|
||||||
|
$a->strings['Send a notification email when:'] = 'أرسل تنبيها للبريدي الإلكتروني عند:';
|
||||||
|
$a->strings['You receive an introduction'] = 'تلقي تقديم';
|
||||||
|
$a->strings['Your introductions are confirmed'] = 'أُكدت تقديماتك';
|
||||||
|
$a->strings['Someone writes on your profile wall'] = 'يكتب شخص ما على جدار ملفك الشخصي';
|
||||||
|
$a->strings['Someone writes a followup comment'] = 'شخص ما يعلق على ما نشرت';
|
||||||
|
$a->strings['You receive a private message'] = 'تلقي رسالة خاصة';
|
||||||
|
$a->strings['You receive a friend suggestion'] = 'تلقي اقتراح صداقة';
|
||||||
|
$a->strings['You are tagged in a post'] = 'ذُكرتَ في مشاركة';
|
||||||
|
$a->strings['Create a desktop notification when:'] = 'أنشئ تنبيه سطح المكتب عند:';
|
||||||
|
$a->strings['Someone liked your content'] = 'أُعجب شخص بمحتواك';
|
||||||
|
$a->strings['Someone shared your content'] = 'شارك شخص محتواك';
|
||||||
|
$a->strings['Activate desktop notifications'] = 'نشّط تنبيهات سطح المكتب';
|
||||||
|
$a->strings['Show desktop popup on new notifications'] = 'أظهر منبثقات للتنبيهات الجديدة';
|
||||||
|
$a->strings['Text-only notification emails'] = 'رسائل تنبيه نصية فقط';
|
||||||
|
$a->strings['Send text only notification emails, without the html part'] = 'أرسل بريد التنبيه كنص فقط، دون وسوم html';
|
||||||
|
$a->strings['Show detailled notifications'] = 'اعرض تنبيهات مفصلة';
|
||||||
|
$a->strings['Per default, notifications are condensed to a single notification per item. When enabled every notification is displayed.'] = 'افتراضيًا ، يعرض أحدث تنبيه فقط لكل محادثة. عند تفعيله ستعرض جميع التنبيهات.';
|
||||||
|
$a->strings['Show notifications of ignored contacts'] = 'أظهر تنبيهات للمتراسلين المتجاهلين';
|
||||||
|
$a->strings['You don\'t see posts from ignored contacts. But you still see their comments. This setting controls if you want to still receive regular notifications that are caused by ignored contacts or not.'] = 'أنت لا ترى مشاركات المتراسلين المتجاهلين. لكن لا يزال بإمكانك رؤية تعليقاتهم. هذا الإعداد يتحكم إذا كنت ترغب في الاستمرار في تلقي تنبيهات سببها المتراسلون المتجاهلون.';
|
||||||
|
$a->strings['Advanced Account/Page Type Settings'] = 'الإعدادات المتقدمة للحساب/للصفحة';
|
||||||
|
$a->strings['Change the behaviour of this account for special situations'] = 'غيّر سلوك هذا الحساب للحالات الخاصة';
|
||||||
|
$a->strings['Import Contacts'] = 'استيراد متراسلين';
|
||||||
|
$a->strings['Upload a CSV file that contains the handle of your followed accounts in the first column you exported from the old account.'] = 'ارفع ملف CSV معرفات المتراسلين لحسابك القديم، معرفات المتابَعين تكون في العمود الأول.';
|
||||||
|
$a->strings['Upload File'] = 'ارفع ملفًا';
|
||||||
|
$a->strings['Relocate'] = 'الانتقال';
|
||||||
|
$a->strings['If you have moved this profile from another server, and some of your contacts don\'t receive your updates, try pushing this button.'] = 'إذا كنت قد نقلت هذا الملف الشخصي من خادم آخر، وبعض المتراسلين لا يتلقون تحديثاتك، أنقر هذا الزر.';
|
||||||
|
$a->strings['Resend relocate message to contacts'] = 'أعد إرسال رسالة الانتقال للمتراسلين';
|
||||||
$a->strings['Delegation successfully granted.'] = 'منح التفويض بنجاح.';
|
$a->strings['Delegation successfully granted.'] = 'منح التفويض بنجاح.';
|
||||||
$a->strings['Parent user not found, unavailable or password doesn\'t match.'] = 'لم يُعثر على الولي أو هو غير متوفر أو كلمة مرور غير صحيحة.';
|
$a->strings['Parent user not found, unavailable or password doesn\'t match.'] = 'لم يُعثر على الولي أو هو غير متوفر أو كلمة مرور غير صحيحة.';
|
||||||
$a->strings['Delegation successfully revoked.'] = 'نجح إبطال التفويض.';
|
$a->strings['Delegation successfully revoked.'] = 'نجح إبطال التفويض.';
|
||||||
|
|
@ -2361,6 +2351,7 @@ $a->strings['Friendica respects your privacy. By default, your posts will only s
|
||||||
$a->strings['Getting Help'] = 'الحصول على مساعدة';
|
$a->strings['Getting Help'] = 'الحصول على مساعدة';
|
||||||
$a->strings['Go to the Help Section'] = 'انتقل إلى القسم المساعدة';
|
$a->strings['Go to the Help Section'] = 'انتقل إلى القسم المساعدة';
|
||||||
$a->strings['Our <strong>help</strong> pages may be consulted for detail on other program features and resources.'] = 'يمكنك الاطلاع على صفحات <strong>المساعدة</strong> للحصول على تفاصيل حول ميزات البرامج الأخرى ومصادرها.';
|
$a->strings['Our <strong>help</strong> pages may be consulted for detail on other program features and resources.'] = 'يمكنك الاطلاع على صفحات <strong>المساعدة</strong> للحصول على تفاصيل حول ميزات البرامج الأخرى ومصادرها.';
|
||||||
|
$a->strings['{0} wants to follow you'] = '{0} يريد متابعتك';
|
||||||
$a->strings['%s liked %s\'s post'] = 'أُعجب %s بمشاركة %s';
|
$a->strings['%s liked %s\'s post'] = 'أُعجب %s بمشاركة %s';
|
||||||
$a->strings['%s disliked %s\'s post'] = 'لم يُعجب %s بمشاركة %s';
|
$a->strings['%s disliked %s\'s post'] = 'لم يُعجب %s بمشاركة %s';
|
||||||
$a->strings['%s is attending %s\'s event'] = 'يحضر %s حدث %s';
|
$a->strings['%s is attending %s\'s event'] = 'يحضر %s حدث %s';
|
||||||
|
|
@ -2373,10 +2364,7 @@ $a->strings['Friend Suggestion'] = 'اقتراح صديق';
|
||||||
$a->strings['Friend/Connect Request'] = 'طلب صداقة/اقتران';
|
$a->strings['Friend/Connect Request'] = 'طلب صداقة/اقتران';
|
||||||
$a->strings['New Follower'] = 'متابِع جديد';
|
$a->strings['New Follower'] = 'متابِع جديد';
|
||||||
$a->strings['%1$s wants to follow you'] = '%1$s يريد متابعتك';
|
$a->strings['%1$s wants to follow you'] = '%1$s يريد متابعتك';
|
||||||
$a->strings['%1$s had started following you'] = '%1$s يتابعك';
|
|
||||||
$a->strings['%1$s liked your comment %2$s'] = 'أعجب %1$s بتعليقك %2$s';
|
|
||||||
$a->strings['%1$s liked your post %2$s'] = 'أعجب %1$s بمشاركتك %2$s';
|
$a->strings['%1$s liked your post %2$s'] = 'أعجب %1$s بمشاركتك %2$s';
|
||||||
$a->strings['%1$s disliked your comment %2$s'] = 'لم يعجب %1$s تعليقك %2$s';
|
|
||||||
$a->strings['%1$s disliked your post %2$s'] = 'لم يعجب %1$s مشاركتك %2$s';
|
$a->strings['%1$s disliked your post %2$s'] = 'لم يعجب %1$s مشاركتك %2$s';
|
||||||
$a->strings['%1$s shared your comment %2$s'] = 'شارك %1$s تعليقك %2$s';
|
$a->strings['%1$s shared your comment %2$s'] = 'شارك %1$s تعليقك %2$s';
|
||||||
$a->strings['%1$s shared your post %2$s'] = 'شارك %1$s مشاركتك %2$s';
|
$a->strings['%1$s shared your post %2$s'] = 'شارك %1$s مشاركتك %2$s';
|
||||||
|
|
@ -2452,7 +2440,6 @@ $a->strings['%s posted an update.'] = 'نشر %s تحديثاً.';
|
||||||
$a->strings['Private Message'] = 'رسالة خاصة';
|
$a->strings['Private Message'] = 'رسالة خاصة';
|
||||||
$a->strings['This entry was edited'] = 'عدّل المدخل';
|
$a->strings['This entry was edited'] = 'عدّل المدخل';
|
||||||
$a->strings['Edit'] = 'تعديل';
|
$a->strings['Edit'] = 'تعديل';
|
||||||
$a->strings['Pinned item'] = 'عنصر مثبت';
|
|
||||||
$a->strings['Delete globally'] = 'احذفه عالميًا';
|
$a->strings['Delete globally'] = 'احذفه عالميًا';
|
||||||
$a->strings['Remove locally'] = 'أزله محليًا';
|
$a->strings['Remove locally'] = 'أزله محليًا';
|
||||||
$a->strings['Block %s'] = 'احجب %s';
|
$a->strings['Block %s'] = 'احجب %s';
|
||||||
|
|
|
||||||
|
|
@ -6604,7 +6604,7 @@ msgstr "Tester une adresse"
|
||||||
|
|
||||||
#: src/Module/BaseAdmin.php:115
|
#: src/Module/BaseAdmin.php:115
|
||||||
msgid "check webfinger"
|
msgid "check webfinger"
|
||||||
msgstr "vérification de webfinger"
|
msgstr "Vérifier le webfinger"
|
||||||
|
|
||||||
#: src/Module/BaseAdmin.php:117
|
#: src/Module/BaseAdmin.php:117
|
||||||
msgid "Babel"
|
msgid "Babel"
|
||||||
|
|
|
||||||
|
|
@ -1679,7 +1679,7 @@ $a->strings['Server Blocklist'] = 'Serveurs bloqués';
|
||||||
$a->strings['Diagnostics'] = 'Diagnostics';
|
$a->strings['Diagnostics'] = 'Diagnostics';
|
||||||
$a->strings['PHP Info'] = 'PHP Info';
|
$a->strings['PHP Info'] = 'PHP Info';
|
||||||
$a->strings['probe address'] = 'Tester une adresse';
|
$a->strings['probe address'] = 'Tester une adresse';
|
||||||
$a->strings['check webfinger'] = 'vérification de webfinger';
|
$a->strings['check webfinger'] = 'Vérifier le webfinger';
|
||||||
$a->strings['Babel'] = 'Babel';
|
$a->strings['Babel'] = 'Babel';
|
||||||
$a->strings['ActivityPub Conversion'] = 'Conversion ActivityPub';
|
$a->strings['ActivityPub Conversion'] = 'Conversion ActivityPub';
|
||||||
$a->strings['Addon Features'] = 'Fonctionnalités des addons';
|
$a->strings['Addon Features'] = 'Fonctionnalités des addons';
|
||||||
|
|
|
||||||
|
|
@ -9071,7 +9071,7 @@ msgstr "Valaki kedvelte az Ön tartalmát"
|
||||||
|
|
||||||
#: src/Module/Settings/Account.php:622 src/Module/Settings/Account.php:623
|
#: src/Module/Settings/Account.php:622 src/Module/Settings/Account.php:623
|
||||||
msgid "Can only be enabled, when the direct comment notification is enabled."
|
msgid "Can only be enabled, when the direct comment notification is enabled."
|
||||||
msgstr ""
|
msgstr "Csak akkor engedélyezhető, ha a közvetlen hozzászólási értesítés engedélyezve van."
|
||||||
|
|
||||||
#: src/Module/Settings/Account.php:623
|
#: src/Module/Settings/Account.php:623
|
||||||
msgid "Someone shared your content"
|
msgid "Someone shared your content"
|
||||||
|
|
@ -9079,7 +9079,7 @@ msgstr "Valaki megosztotta az Ön tartalmát"
|
||||||
|
|
||||||
#: src/Module/Settings/Account.php:624
|
#: src/Module/Settings/Account.php:624
|
||||||
msgid "Someone commented in your thread"
|
msgid "Someone commented in your thread"
|
||||||
msgstr ""
|
msgstr "Valaki hozzászólt az Ön szálában"
|
||||||
|
|
||||||
#: src/Module/Settings/Account.php:625
|
#: src/Module/Settings/Account.php:625
|
||||||
msgid "Someone commented in a thread where you commented"
|
msgid "Someone commented in a thread where you commented"
|
||||||
|
|
@ -9087,7 +9087,7 @@ msgstr "Valaki hozzászólt egy olyan szálban, ahol Ön hozzászólt"
|
||||||
|
|
||||||
#: src/Module/Settings/Account.php:626
|
#: src/Module/Settings/Account.php:626
|
||||||
msgid "Someone commented in a thread where you interacted"
|
msgid "Someone commented in a thread where you interacted"
|
||||||
msgstr ""
|
msgstr "Valaki hozzászólt egy olyan szálban, ahol Ön interakcióba került"
|
||||||
|
|
||||||
#: src/Module/Settings/Account.php:628
|
#: src/Module/Settings/Account.php:628
|
||||||
msgid "Activate desktop notifications"
|
msgid "Activate desktop notifications"
|
||||||
|
|
|
||||||
|
|
@ -2263,8 +2263,11 @@ $a->strings['Create a desktop notification when:'] = 'Asztali értesítés létr
|
||||||
$a->strings['Someone tagged you'] = 'Valaki megjelölte Önt';
|
$a->strings['Someone tagged you'] = 'Valaki megjelölte Önt';
|
||||||
$a->strings['Someone directly commented on your post'] = 'Valaki közvetlenül hozzászólt a bejegyzéséhez';
|
$a->strings['Someone directly commented on your post'] = 'Valaki közvetlenül hozzászólt a bejegyzéséhez';
|
||||||
$a->strings['Someone liked your content'] = 'Valaki kedvelte az Ön tartalmát';
|
$a->strings['Someone liked your content'] = 'Valaki kedvelte az Ön tartalmát';
|
||||||
|
$a->strings['Can only be enabled, when the direct comment notification is enabled.'] = 'Csak akkor engedélyezhető, ha a közvetlen hozzászólási értesítés engedélyezve van.';
|
||||||
$a->strings['Someone shared your content'] = 'Valaki megosztotta az Ön tartalmát';
|
$a->strings['Someone shared your content'] = 'Valaki megosztotta az Ön tartalmát';
|
||||||
|
$a->strings['Someone commented in your thread'] = 'Valaki hozzászólt az Ön szálában';
|
||||||
$a->strings['Someone commented in a thread where you commented'] = 'Valaki hozzászólt egy olyan szálban, ahol Ön hozzászólt';
|
$a->strings['Someone commented in a thread where you commented'] = 'Valaki hozzászólt egy olyan szálban, ahol Ön hozzászólt';
|
||||||
|
$a->strings['Someone commented in a thread where you interacted'] = 'Valaki hozzászólt egy olyan szálban, ahol Ön interakcióba került';
|
||||||
$a->strings['Activate desktop notifications'] = 'Asztali értesítések bekapcsolása';
|
$a->strings['Activate desktop notifications'] = 'Asztali értesítések bekapcsolása';
|
||||||
$a->strings['Show desktop popup on new notifications'] = 'Felugró üzenet megjelenítése az asztalon új értesítések esetén.';
|
$a->strings['Show desktop popup on new notifications'] = 'Felugró üzenet megjelenítése az asztalon új értesítések esetén.';
|
||||||
$a->strings['Text-only notification emails'] = 'Csak szöveges értesítési e-mailek';
|
$a->strings['Text-only notification emails'] = 'Csak szöveges értesítési e-mailek';
|
||||||
|
|
|
||||||
0
view/theme/frio/font/open_sans/fonts/Bold/OpenSans-Bold.eot
Executable file → Normal file
0
view/theme/frio/font/open_sans/fonts/Bold/OpenSans-Bold.svg
Executable file → Normal file
|
Before Width: | Height: | Size: 258 KiB After Width: | Height: | Size: 258 KiB |
0
view/theme/frio/font/open_sans/fonts/Bold/OpenSans-Bold.ttf
Executable file → Normal file
0
view/theme/frio/font/open_sans/fonts/Bold/OpenSans-Bold.woff
Executable file → Normal file
0
view/theme/frio/font/open_sans/fonts/BoldItalic/OpenSans-BoldItalic.eot
Executable file → Normal file
0
view/theme/frio/font/open_sans/fonts/BoldItalic/OpenSans-BoldItalic.svg
Executable file → Normal file
|
Before Width: | Height: | Size: 278 KiB After Width: | Height: | Size: 278 KiB |
0
view/theme/frio/font/open_sans/fonts/BoldItalic/OpenSans-BoldItalic.ttf
Executable file → Normal file
0
view/theme/frio/font/open_sans/fonts/BoldItalic/OpenSans-BoldItalic.woff
Executable file → Normal file
0
view/theme/frio/font/open_sans/fonts/ExtraBold/OpenSans-ExtraBold.eot
Executable file → Normal file
0
view/theme/frio/font/open_sans/fonts/ExtraBold/OpenSans-ExtraBold.svg
Executable file → Normal file
|
Before Width: | Height: | Size: 259 KiB After Width: | Height: | Size: 259 KiB |
0
view/theme/frio/font/open_sans/fonts/ExtraBold/OpenSans-ExtraBold.ttf
Executable file → Normal file
0
view/theme/frio/font/open_sans/fonts/ExtraBold/OpenSans-ExtraBold.woff
Executable file → Normal file
0
view/theme/frio/font/open_sans/fonts/ExtraBoldItalic/OpenSans-ExtraBoldItalic.eot
Executable file → Normal file
0
view/theme/frio/font/open_sans/fonts/ExtraBoldItalic/OpenSans-ExtraBoldItalic.svg
Executable file → Normal file
|
Before Width: | Height: | Size: 277 KiB After Width: | Height: | Size: 277 KiB |
0
view/theme/frio/font/open_sans/fonts/ExtraBoldItalic/OpenSans-ExtraBoldItalic.ttf
Executable file → Normal file
0
view/theme/frio/font/open_sans/fonts/ExtraBoldItalic/OpenSans-ExtraBoldItalic.woff
Executable file → Normal file
0
view/theme/frio/font/open_sans/fonts/Italic/OpenSans-Italic.eot
Executable file → Normal file
0
view/theme/frio/font/open_sans/fonts/Italic/OpenSans-Italic.svg
Executable file → Normal file
|
Before Width: | Height: | Size: 285 KiB After Width: | Height: | Size: 285 KiB |
0
view/theme/frio/font/open_sans/fonts/Italic/OpenSans-Italic.ttf
Executable file → Normal file
0
view/theme/frio/font/open_sans/fonts/Italic/OpenSans-Italic.woff
Executable file → Normal file
0
view/theme/frio/font/open_sans/fonts/Light/OpenSans-Light.eot
Executable file → Normal file
0
view/theme/frio/font/open_sans/fonts/Light/OpenSans-Light.svg
Executable file → Normal file
|
Before Width: | Height: | Size: 252 KiB After Width: | Height: | Size: 252 KiB |
0
view/theme/frio/font/open_sans/fonts/Light/OpenSans-Light.ttf
Executable file → Normal file
0
view/theme/frio/font/open_sans/fonts/Light/OpenSans-Light.woff
Executable file → Normal file
0
view/theme/frio/font/open_sans/fonts/LightItalic/OpenSans-LightItalic.eot
Executable file → Normal file
0
view/theme/frio/font/open_sans/fonts/LightItalic/OpenSans-LightItalic.svg
Executable file → Normal file
|
Before Width: | Height: | Size: 285 KiB After Width: | Height: | Size: 285 KiB |
0
view/theme/frio/font/open_sans/fonts/LightItalic/OpenSans-LightItalic.ttf
Executable file → Normal file
0
view/theme/frio/font/open_sans/fonts/LightItalic/OpenSans-LightItalic.woff
Executable file → Normal file
0
view/theme/frio/font/open_sans/fonts/Regular/OpenSans-Regular.eot
Executable file → Normal file
0
view/theme/frio/font/open_sans/fonts/Regular/OpenSans-Regular.svg
Executable file → Normal file
|
Before Width: | Height: | Size: 260 KiB After Width: | Height: | Size: 260 KiB |
0
view/theme/frio/font/open_sans/fonts/Regular/OpenSans-Regular.ttf
Executable file → Normal file
0
view/theme/frio/font/open_sans/fonts/Regular/OpenSans-Regular.woff
Executable file → Normal file
0
view/theme/frio/font/open_sans/fonts/Semibold/OpenSans-Semibold.eot
Executable file → Normal file
0
view/theme/frio/font/open_sans/fonts/Semibold/OpenSans-Semibold.svg
Executable file → Normal file
|
Before Width: | Height: | Size: 258 KiB After Width: | Height: | Size: 258 KiB |
0
view/theme/frio/font/open_sans/fonts/Semibold/OpenSans-Semibold.ttf
Executable file → Normal file
0
view/theme/frio/font/open_sans/fonts/Semibold/OpenSans-Semibold.woff
Executable file → Normal file
0
view/theme/frio/font/open_sans/fonts/SemiboldItalic/OpenSans-SemiboldItalic.eot
Executable file → Normal file
0
view/theme/frio/font/open_sans/fonts/SemiboldItalic/OpenSans-SemiboldItalic.svg
Executable file → Normal file
|
Before Width: | Height: | Size: 283 KiB After Width: | Height: | Size: 283 KiB |