mirror of
https://github.com/friendica/friendica
synced 2024-11-10 05:42:54 +00:00
Merge develop into 1901_autocomplete
This commit is contained in:
commit
162f754e2d
60 changed files with 4311 additions and 4280 deletions
|
@ -4,42 +4,32 @@ Friendica translations
|
|||
Translation Process
|
||||
-------------------
|
||||
|
||||
The strings used in the UI of Friendica is translated at [Transifex] [1] and then
|
||||
included in the git repository at github. If you want to help with translation
|
||||
for any language, be it correcting terms or translating friendica to a
|
||||
currently not supported language, please register an account at transifex.com
|
||||
and contact the friendica translation team there.
|
||||
The strings used in the UI of Friendica is translated at [Transifex] [1] and then included in the git repository at github.
|
||||
If you want to help with translation for any language, be it correcting terms or translating friendica to a currently not supported language, please register an account at transifex.com and contact the friendica translation team there.
|
||||
|
||||
Translating friendica is simple. Just use the online tool at transifex. If you
|
||||
don't want to deal with git & co. that is fine, we check the status of the
|
||||
translations regularly and import them into the source tree at github so that
|
||||
others can use them.
|
||||
Translating friendica is simple.
|
||||
Just use the online tool at transifex.
|
||||
If you don't want to deal with git & co. that is fine, we check the status of the translations regularly and import them into the source tree at github so that others can use them.
|
||||
|
||||
We do not include every translation from transifex in the source tree to avoid
|
||||
a scattered and disturbed overall experience. As an uneducated guess we have a
|
||||
lower limit of 50% translated strings before we include the language (for the
|
||||
core message.po file, addon translation will be included once all strings of
|
||||
an addon are translated. This limit is judging only by the amount of translated
|
||||
strings under the assumption that the most prominent strings for the UI will be
|
||||
translated first by a translation team. If you feel your translation useable
|
||||
before this limit, please contact us and we will probably include your teams
|
||||
work in the source tree.
|
||||
We do not include every translation from transifex in the source tree to avoid a scattered and disturbed overall experience.
|
||||
As an uneducated guess we have a lower limit of 50% translated strings before we include the language (for the core messages.po file, addont translation will be included once all strings of an addon are translated.
|
||||
This limit is judging only by the amount of translated strings under the assumption that the most prominent strings for the UI will be translated first by a translation team.
|
||||
If you feel your translation useable before this limit, please contact us and we will probably include your teams work in the source tree.
|
||||
|
||||
If you want to get your work into the source tree yourself, feel free to do so
|
||||
and contact us with and question that arises. The process is simple and
|
||||
friendica ships with all the tools necessary.
|
||||
If you want to help translating, please concentrate on the core messages.po file first.
|
||||
We will only include translations with a sufficient translated messages.po file.
|
||||
Translations of addons will only be included, when the core file is included as well.
|
||||
|
||||
If you want to get your work into the source tree yourself, feel free to do so and contact us with and question that arises.
|
||||
The process is simple and friendica ships with all the tools necessary.
|
||||
|
||||
The location of the translated files in the source tree is
|
||||
/view/LNG-CODE/
|
||||
where LNG-CODE is the language code used, e.g. de for German or fr for French.
|
||||
For the email templates (the *.tpl files) just place them into the directory
|
||||
and you are done. The translated strings come as a "message.po" file from
|
||||
transifex which needs to be translated into the PHP file friendica uses. To do
|
||||
so, place the file in the directory mentioned above and use the "po2php"
|
||||
utility from the util directory of your friendica installation.
|
||||
The translated strings come as a "message.po" file from transifex which needs to be translated into the PHP file friendica uses.
|
||||
To do so, place the file in the directory mentioned above and use the "po2php" utility from the util directory of your friendica installation.
|
||||
|
||||
Assuming you want to convert the German localization which is placed in
|
||||
view/de/message.po you would do the following.
|
||||
Assuming you want to convert the German localization which is placed in view/de/message.po you would do the following.
|
||||
|
||||
1. Navigate at the command prompt to the base directory of your
|
||||
friendica installation
|
||||
|
@ -69,30 +59,10 @@ view/de/message.po you would do the following.
|
|||
Utilities
|
||||
---------
|
||||
|
||||
Additional to the po2php script there are some more utilities for translation
|
||||
in the "util" directory of the friendica source tree. If you only want to
|
||||
translate friendica into another language you won't need any of these tools most
|
||||
likely but it gives you an idea how the translation process of friendica
|
||||
works.
|
||||
Additional to the po2php script there are some more utilities for translation in the "util" directory of the friendica source tree.
|
||||
If you only want to translate friendica into another language you wont need any of these tools most likely but it gives you an idea how the translation process of friendica works.
|
||||
|
||||
For further information see the utils/README file.
|
||||
|
||||
Known Problems
|
||||
--------------
|
||||
|
||||
Friendica uses the language setting of the visitors browser to determain the
|
||||
language for the UI. Most of the time this works, but there are some known
|
||||
quirks.
|
||||
|
||||
One is that some browsers, like Safari, do the setting to "de-de" but friendica
|
||||
only has a "de" localisation. A workaround would be to add a symbolic link
|
||||
from
|
||||
$friendica/view/de-de
|
||||
pointing to
|
||||
$friendica/view/de
|
||||
|
||||
Links
|
||||
-----
|
||||
|
||||
[1]: https://www.transifex.com/projects/p/friendica/
|
||||
|
||||
|
|
10
boot.php
10
boot.php
|
@ -36,7 +36,7 @@ define ( 'FRIENDICA_PLATFORM', 'Friendica');
|
|||
define ( 'FRIENDICA_CODENAME', 'Asparagus');
|
||||
define ( 'FRIENDICA_VERSION', '3.5-dev' );
|
||||
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
|
||||
define ( 'DB_UPDATE_VERSION', 1193 );
|
||||
define ( 'DB_UPDATE_VERSION', 1194 );
|
||||
|
||||
/**
|
||||
* @brief Constant with a HTML line break.
|
||||
|
@ -530,6 +530,8 @@ class App {
|
|||
private $cached_profile_image;
|
||||
private $cached_profile_picdate;
|
||||
|
||||
private static $a;
|
||||
|
||||
/**
|
||||
* @brief App constructor.
|
||||
*/
|
||||
|
@ -710,6 +712,8 @@ class App {
|
|||
}
|
||||
}
|
||||
|
||||
self::$a = $this;
|
||||
|
||||
}
|
||||
|
||||
function get_basepath() {
|
||||
|
@ -734,6 +738,10 @@ class App {
|
|||
|
||||
function get_baseurl($ssl = false) {
|
||||
|
||||
// Is the function called statically?
|
||||
if (!is_object($this))
|
||||
return(self::$a->get_baseurl($ssl));
|
||||
|
||||
$scheme = $this->scheme;
|
||||
|
||||
if((x($this->config,'system')) && (x($this->config['system'],'ssl_policy'))) {
|
||||
|
|
|
@ -53,7 +53,10 @@ Posting to Community forums
|
|||
|
||||
If you are a member of a community forum, you may post to the forum by including an @-tag in the post mentioning the forum.
|
||||
For example @bicycle would send my post to all members of the group "bicycle" in addition to the normal recipients.
|
||||
If you mention a forum (you are a member of) in a new posting, the posting will be distributed to all members of the forum, regardless of your privacy settings for the posting.
|
||||
Also, if the forum is a public forum, your posting will be public for the all internet users.
|
||||
If your post is private you must also explicitly include the group in the post permissions (to allow the forum "contact" to see the post) **and** mention it in a tag (which redistributes the post to the forum members).
|
||||
Posting privately to a public forum, will result in your posting being displayed on the forum wall, but not on yours.
|
||||
|
||||
You may also post to a community forum by posting a "wall-to-wall" post using secure cross-site authentication.
|
||||
|
||||
|
|
|
@ -24,6 +24,9 @@ You are not required to provide the year.
|
|||
System settings
|
||||
---
|
||||
|
||||
**Settings should be done in the admin panel** (/admin).
|
||||
Those settings found in the database, will always override the settings added to the ``.htconfig.php`` file.
|
||||
|
||||
###Language
|
||||
|
||||
Please see util/README for information on creating language translations.
|
||||
|
@ -219,6 +222,8 @@ LOGGER_DEBUG will show a good deal of information about system activity but will
|
|||
You may also select LOGGER_ALL but due to the volume of information we recommend only enabling this when you are tracking down a specific problem.
|
||||
Other log levels are possible but are not being used at the present time.
|
||||
|
||||
Please be aware that turning on the logging can fill up the disk space on your server relatively quick.
|
||||
You should take preventions with e.g. [logrotate](https://en.wikipedia.org/wiki/Log_rotation) or similar tools.
|
||||
|
||||
###PHP error logging
|
||||
|
||||
|
@ -238,3 +243,5 @@ Please report to the developers any errors you encounter in the logs using the r
|
|||
They generally indicate issues which need to be resolved.
|
||||
|
||||
If you encounter a blank (white) page when using the application, view the PHP logs - as this almost always indicates an error has occurred.
|
||||
|
||||
*Note*: PHP logging cannot be activated from the admin panel but has to be configured from the ``.htconfig.php`` file.
|
||||
|
|
|
@ -21,11 +21,22 @@ You can tag a person on a different network or one that is **not in your social
|
|||
|
||||
* @mike@macgirvin.com - This is called a "remote mention" and can only be an email-style locator, not a web URL.
|
||||
|
||||
Unless their system blocks unsolicited "mentions", the person tagged will likely receive a "Mention" post/activity or become a direct participant in the conversation in the case of public posts. Please note that Friendica blocks incoming "mentions" from people with no relationship to you. This is a spam prevention measure.
|
||||
Unless their system blocks unsolicited "mentions", the person tagged will likely receive a "Mention" post/activity or become a direct participant in the conversation in the case of public posts.
|
||||
Friendica blocks incoming “mentions” from people with no relationship to you.
|
||||
The exception is an ongiong conversation started from a contact of both you and the 3rd person or a conversation in a forum where you are a member of.
|
||||
This is a spam prevention measure.
|
||||
|
||||
Remote mentions are delivered using the OStatus protocol. This protocol is used by Friendica and GNU Social and several other systems, but is not currently implemented in Diaspora.
|
||||
Remote mentions are delivered using the OStatus protocol.
|
||||
This protocol is used by Friendica and GNU Social and several other systems, but is not currently implemented in Diaspora.
|
||||
As the OStatus protocol allows this Friendica user can be @-mentioned by users from platforms using this protocol in conversations if the "Enable OStatus support" is activated on the Friendica node.
|
||||
These @-mentions wont be blocked, even if there is no relationship between the sender and the receiver of the message.
|
||||
|
||||
Friendica makes no distinction between people and groups for the purpose of tagging. (Some other networks use !group to indicate a group.)
|
||||
Friendica makes no distinction between people and forums for the purpose of tagging.
|
||||
(Some other networks use !forum to indicate a forum.)
|
||||
|
||||
If you sort your contacts into groups, you cannot @-mention these groups.
|
||||
But you can select the group in the access control when creating a new posting, to allow (or disallow) a certain group of people to see the posting.
|
||||
See [Groups and Privacy](help/Groups-and-Privacy) for more details about grouping your contacts.
|
||||
|
||||
**Topical Tags**
|
||||
|
||||
|
|
|
@ -4,42 +4,32 @@ Friendica translations
|
|||
Translation Process
|
||||
-------------------
|
||||
|
||||
The strings used in the UI of Friendica is translated at [Transifex] [1] and then
|
||||
included in the git repository at github. If you want to help with translation
|
||||
for any language, be it correcting terms or translating friendica to a
|
||||
currently not supported language, please register an account at transifex.com
|
||||
and contact the friendica translation team there.
|
||||
The strings used in the UI of Friendica is translated at [Transifex] [1] and then included in the git repository at github.
|
||||
If you want to help with translation for any language, be it correcting terms or translating friendica to a currently not supported language, please register an account at transifex.com and contact the friendica translation team there.
|
||||
|
||||
Translating friendica is simple. Just use the online tool at transifex. If you
|
||||
don't want to deal with git & co. that is fine, we check the status of the
|
||||
translations regularly and import them into the source tree at github so that
|
||||
others can use them.
|
||||
Translating friendica is simple.
|
||||
Just use the online tool at transifex.
|
||||
If you don't want to deal with git & co. that is fine, we check the status of the translations regularly and import them into the source tree at github so that others can use them.
|
||||
|
||||
We do not include every translation from transifex in the source tree to avoid
|
||||
a scattered and disturbed overall experience. As an uneducated guess we have a
|
||||
lower limit of 50% translated strings before we include the language (for the
|
||||
core message.po file, addont translation will be included once all strings of
|
||||
an addon are translated. This limit is judging only by the amount of translated
|
||||
strings under the assumption that the most prominent strings for the UI will be
|
||||
translated first by a translation team. If you feel your translation useable
|
||||
before this limit, please contact us and we will probably include your teams
|
||||
work in the source tree.
|
||||
We do not include every translation from transifex in the source tree to avoid a scattered and disturbed overall experience.
|
||||
As an uneducated guess we have a lower limit of 50% translated strings before we include the language (for the core messages.po file, addont translation will be included once all strings of an addon are translated.
|
||||
This limit is judging only by the amount of translated strings under the assumption that the most prominent strings for the UI will be translated first by a translation team.
|
||||
If you feel your translation useable before this limit, please contact us and we will probably include your teams work in the source tree.
|
||||
|
||||
If you want to get your work into the source tree yourself, feel free to do so
|
||||
and contact us with and question that arises. The process is simple and
|
||||
friendica ships with all the tools necessary.
|
||||
If you want to help translating, please concentrate on the core messages.po file first.
|
||||
We will only include translations with a sufficient translated messages.po file.
|
||||
Translations of addons will only be included, when the core file is included as well.
|
||||
|
||||
If you want to get your work into the source tree yourself, feel free to do so and contact us with and question that arises.
|
||||
The process is simple and friendica ships with all the tools necessary.
|
||||
|
||||
The location of the translated files in the source tree is
|
||||
/view/LNG-CODE/
|
||||
where LNG-CODE is the language code used, e.g. de for German or fr for French.
|
||||
For the email templates (the *.tpl files) just place them into the directory
|
||||
and you are done. The translated strings come as a "message.po" file from
|
||||
transifex which needs to be translated into the PHP file friendica uses. To do
|
||||
so, place the file in the directory mentioned above and use the "po2php"
|
||||
utility from the util directory of your friendica installation.
|
||||
The translated strings come as a "message.po" file from transifex which needs to be translated into the PHP file friendica uses.
|
||||
To do so, place the file in the directory mentioned above and use the "po2php" utility from the util directory of your friendica installation.
|
||||
|
||||
Assuming you want to convert the German localization which is placed in
|
||||
view/de/message.po you would do the following.
|
||||
Assuming you want to convert the German localization which is placed in view/de/message.po you would do the following.
|
||||
|
||||
1. Navigate at the command prompt to the base directory of your
|
||||
friendica installation
|
||||
|
@ -47,10 +37,10 @@ view/de/message.po you would do the following.
|
|||
2. Execute the po2php script, which will place the translation
|
||||
in the strings.php file that is used by friendica.
|
||||
|
||||
$> php util/po2php.php view/de/message.po
|
||||
$> php util/po2php.php view/de/messages.po
|
||||
|
||||
The output of the script will be placed at view/de/strings.php where
|
||||
froemdoca os expecting it, so you can test your translation mmediately.
|
||||
friendica is expecting it, so you can test your translation immediately.
|
||||
|
||||
3. Visit your friendica page to check if it still works in the language you
|
||||
just translated. If not try to find the error, most likely PHP will give
|
||||
|
@ -69,27 +59,10 @@ view/de/message.po you would do the following.
|
|||
Utilities
|
||||
---------
|
||||
|
||||
Additional to the po2php script there are some more utilities for translation
|
||||
in the "util" directory of the friendica source tree. If you only want to
|
||||
translate friendica into another language you wont need any of these tools most
|
||||
likely but it gives you an idea how the translation process of friendica
|
||||
works.
|
||||
Additional to the po2php script there are some more utilities for translation in the "util" directory of the friendica source tree.
|
||||
If you only want to translate friendica into another language you wont need any of these tools most likely but it gives you an idea how the translation process of friendica works.
|
||||
|
||||
For further information see the utils/README file.
|
||||
|
||||
Known Problems
|
||||
--------------
|
||||
|
||||
Friendica uses the language setting of the visitors browser to determain the
|
||||
language for the UI. Most of the time this works, but there are some known
|
||||
quirks.
|
||||
|
||||
One is that some browsers, like Safari, do the setting to "de-de" but friendica
|
||||
only has a "de" localisation. A workaround would be to add a symbolic link
|
||||
from
|
||||
$friendica/view/de-de
|
||||
pointing to
|
||||
$friendica/view/de
|
||||
|
||||
[1]: https://www.transifex.com/projects/p/friendica/
|
||||
|
||||
|
|
|
@ -132,8 +132,8 @@ function terminate_friendship($user,$self,$contact) {
|
|||
diaspora_unshare($user,$contact);
|
||||
}
|
||||
elseif($contact['network'] === NETWORK_DFRN) {
|
||||
require_once('include/items.php');
|
||||
dfrn_deliver($user,$contact,'placeholder', 1);
|
||||
require_once('include/dfrn.php');
|
||||
dfrn::deliver($user,$contact,'placeholder', 1);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -208,15 +208,15 @@ function get_contact_details_by_url($url, $uid = -1) {
|
|||
}
|
||||
|
||||
// Fetching further contact data from the contact table
|
||||
$r = q("SELECT `id`, `uid`, `url`, `network`, `name`, `nick`, `addr`, `location`, `about`, `keywords`, `gender`, `photo`, `addr`, `forum`, `prv`, `bd` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d AND `network` = '%s'",
|
||||
$r = q("SELECT `id`, `uid`, `url`, `network`, `name`, `nick`, `addr`, `location`, `about`, `keywords`, `gender`, `photo`, `thumb`, `addr`, `forum`, `prv`, `bd`, `self` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d AND `network` IN ('%s', '')",
|
||||
dbesc(normalise_link($url)), intval($uid), dbesc($profile["network"]));
|
||||
|
||||
if (!count($r) AND !isset($profile))
|
||||
$r = q("SELECT `id`, `uid`, `url`, `network`, `name`, `nick`, `addr`, `location`, `about`, `keywords`, `gender`, `photo`, `addr`, `forum`, `prv`, `bd` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d",
|
||||
$r = q("SELECT `id`, `uid`, `url`, `network`, `name`, `nick`, `addr`, `location`, `about`, `keywords`, `gender`, `photo`, `thumb`, `addr`, `forum`, `prv`, `bd`, `self` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d",
|
||||
dbesc(normalise_link($url)), intval($uid));
|
||||
|
||||
if (!count($r) AND !isset($profile))
|
||||
$r = q("SELECT `id`, `uid`, `url`, `network`, `name`, `nick`, `addr`, `location`, `about`, `keywords`, `gender`, `photo`, `addr`, `forum`, `prv`, `bd` FROM `contact` WHERE `nurl` = '%s' AND `uid` = 0",
|
||||
$r = q("SELECT `id`, `uid`, `url`, `network`, `name`, `nick`, `addr`, `location`, `about`, `keywords`, `gender`, `photo`, `thumb`, `addr`, `forum`, `prv`, `bd` FROM `contact` WHERE `nurl` = '%s' AND `uid` = 0",
|
||||
dbesc(normalise_link($url)));
|
||||
|
||||
if ($r) {
|
||||
|
@ -228,7 +228,7 @@ function get_contact_details_by_url($url, $uid = -1) {
|
|||
$profile["nick"] = $r[0]["nick"];
|
||||
if (!isset($profile["addr"]) AND $r[0]["addr"])
|
||||
$profile["addr"] = $r[0]["addr"];
|
||||
if (!isset($profile["photo"]) AND $r[0]["photo"])
|
||||
if ((!isset($profile["photo"]) OR $r[0]["self"]) AND $r[0]["photo"])
|
||||
$profile["photo"] = $r[0]["photo"];
|
||||
if (!isset($profile["location"]) AND $r[0]["location"])
|
||||
$profile["location"] = $r[0]["location"];
|
||||
|
@ -246,6 +246,8 @@ function get_contact_details_by_url($url, $uid = -1) {
|
|||
$profile["addr"] = $r[0]["addr"];
|
||||
if (!isset($profile["bd"]) AND $r[0]["bd"])
|
||||
$profile["bd"] = $r[0]["bd"];
|
||||
if (isset($r[0]["thumb"]))
|
||||
$profile["thumb"] = $r[0]["thumb"];
|
||||
if ($r[0]["uid"] == 0)
|
||||
$profile["cid"] = 0;
|
||||
else
|
||||
|
@ -410,12 +412,12 @@ function get_contact($url, $uid = 0) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
$contact = q("SELECT `id`, `avatar-date` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d",
|
||||
$contact = q("SELECT `id`, `avatar-date` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d ORDER BY `id` LIMIT 2",
|
||||
dbesc(normalise_link($url)),
|
||||
intval($uid));
|
||||
|
||||
if (!$contact)
|
||||
$contact = q("SELECT `id`, `avatar-date` FROM `contact` WHERE `alias` IN ('%s', '%s') AND `uid` = %d",
|
||||
$contact = q("SELECT `id`, `avatar-date` FROM `contact` WHERE `alias` IN ('%s', '%s') AND `uid` = %d ORDER BY `id` LIMIT 1",
|
||||
dbesc($url),
|
||||
dbesc(normalise_link($url)),
|
||||
intval($uid));
|
||||
|
@ -439,9 +441,7 @@ function get_contact($url, $uid = 0) {
|
|||
if (!in_array($data["network"], array(NETWORK_DFRN, NETWORK_OSTATUS, NETWORK_DIASPORA)))
|
||||
return 0;
|
||||
|
||||
// tempory programming. Can be deleted after 2015-02-07
|
||||
if (($data["alias"] == "") AND (normalise_link($data["url"]) != normalise_link($url)))
|
||||
$data["alias"] = normalise_link($url);
|
||||
$url = $data["url"];
|
||||
|
||||
if ($contactid == 0) {
|
||||
q("INSERT INTO `contact` (`uid`, `created`, `url`, `nurl`, `addr`, `alias`, `notify`, `poll`,
|
||||
|
@ -470,7 +470,7 @@ function get_contact($url, $uid = 0) {
|
|||
dbesc($data["poco"])
|
||||
);
|
||||
|
||||
$contact = q("SELECT `id` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d",
|
||||
$contact = q("SELECT `id` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d ORDER BY `id` LIMIT 2",
|
||||
dbesc(normalise_link($data["url"])),
|
||||
intval($uid));
|
||||
if (!$contact)
|
||||
|
@ -479,23 +479,23 @@ function get_contact($url, $uid = 0) {
|
|||
$contactid = $contact[0]["id"];
|
||||
}
|
||||
|
||||
if ((count($contact) > 1) AND ($uid == 0) AND ($contactid != 0) AND ($url != ""))
|
||||
q("DELETE FROM `contact` WHERE `nurl` = '%s' AND `id` != %d",
|
||||
dbesc(normalise_link($url)),
|
||||
intval($contactid));
|
||||
|
||||
require_once("Photo.php");
|
||||
|
||||
$photos = import_profile_photo($data["photo"],$uid,$contactid);
|
||||
update_contact_avatar($data["photo"],$uid,$contactid);
|
||||
|
||||
q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `micro` = '%s',
|
||||
`addr` = '%s', `alias` = '%s', `name` = '%s', `nick` = '%s',
|
||||
`name-date` = '%s', `uri-date` = '%s', `avatar-date` = '%s' WHERE `id` = %d",
|
||||
dbesc($photos[0]),
|
||||
dbesc($photos[1]),
|
||||
dbesc($photos[2]),
|
||||
q("UPDATE `contact` SET `addr` = '%s', `alias` = '%s', `name` = '%s', `nick` = '%s',
|
||||
`name-date` = '%s', `uri-date` = '%s' WHERE `id` = %d",
|
||||
dbesc($data["addr"]),
|
||||
dbesc($data["alias"]),
|
||||
dbesc($data["name"]),
|
||||
dbesc($data["nick"]),
|
||||
dbesc(datetime_convert()),
|
||||
dbesc(datetime_convert()),
|
||||
dbesc(datetime_convert()),
|
||||
intval($contactid)
|
||||
);
|
||||
|
||||
|
@ -662,4 +662,34 @@ function posts_from_contact($a, $contact_id) {
|
|||
|
||||
return $o;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns a formatted location string from the given profile array
|
||||
*
|
||||
* @param array $profile Profile array (Generated from the "profile" table)
|
||||
*
|
||||
* @return string Location string
|
||||
*/
|
||||
function formatted_location($profile) {
|
||||
$location = '';
|
||||
|
||||
if($profile['locality'])
|
||||
$location .= $profile['locality'];
|
||||
|
||||
if($profile['region'] AND ($profile['locality'] != $profile['region'])) {
|
||||
if($location)
|
||||
$location .= ', ';
|
||||
|
||||
$location .= $profile['region'];
|
||||
}
|
||||
|
||||
if($profile['country-name']) {
|
||||
if($location)
|
||||
$location .= ', ';
|
||||
|
||||
$location .= $profile['country-name'];
|
||||
}
|
||||
|
||||
return $location;
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -720,7 +720,38 @@ function guess_image_type($filename, $fromcurl=false) {
|
|||
|
||||
}
|
||||
|
||||
function import_profile_photo($photo,$uid,$cid) {
|
||||
/**
|
||||
* @brief Updates the avatar links in a contact only if needed
|
||||
*
|
||||
* @param string $avatar Link to avatar picture
|
||||
* @param int $uid User id of contact owner
|
||||
* @param int $cid Contact id
|
||||
*
|
||||
* @return array Returns array of the different avatar sizes
|
||||
*/
|
||||
function update_contact_avatar($avatar,$uid,$cid) {
|
||||
|
||||
$r = q("SELECT `avatar`, `photo`, `thumb`, `micro` FROM `contact` WHERE `id` = %d LIMIT 1", intval($cid));
|
||||
if (!$r)
|
||||
return false;
|
||||
else
|
||||
$data = array($r[0]["photo"], $r[0]["thumb"], $r[0]["micro"]);
|
||||
|
||||
if ($r[0]["avatar"] != $avatar) {
|
||||
$photos = import_profile_photo($avatar,$uid,$cid, true);
|
||||
|
||||
if ($photos) {
|
||||
q("UPDATE `contact` SET `avatar` = '%s', `photo` = '%s', `thumb` = '%s', `micro` = '%s', `avatar-date` = '%s' WHERE `id` = %d",
|
||||
dbesc($avatar), dbesc($photos[0]), dbesc($photos[1]), dbesc($photos[2]),
|
||||
dbesc(datetime_convert()), intval($cid));
|
||||
return $photos;
|
||||
}
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
function import_profile_photo($photo,$uid,$cid, $quit_on_error = false) {
|
||||
|
||||
$a = get_app();
|
||||
|
||||
|
@ -730,8 +761,7 @@ function import_profile_photo($photo,$uid,$cid) {
|
|||
);
|
||||
if(count($r) && strlen($r[0]['resource-id'])) {
|
||||
$hash = $r[0]['resource-id'];
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$hash = photo_new_resource();
|
||||
}
|
||||
|
||||
|
@ -740,6 +770,9 @@ function import_profile_photo($photo,$uid,$cid) {
|
|||
$filename = basename($photo);
|
||||
$img_str = fetch_url($photo,true);
|
||||
|
||||
if ($quit_on_error AND ($img_str == ""))
|
||||
return false;
|
||||
|
||||
$type = guess_image_type($photo,true);
|
||||
$img = new Photo($img_str, $type);
|
||||
if($img->is_valid()) {
|
||||
|
@ -768,10 +801,12 @@ function import_profile_photo($photo,$uid,$cid) {
|
|||
$photo = $a->get_baseurl() . '/photo/' . $hash . '-4.' . $img->getExt();
|
||||
$thumb = $a->get_baseurl() . '/photo/' . $hash . '-5.' . $img->getExt();
|
||||
$micro = $a->get_baseurl() . '/photo/' . $hash . '-6.' . $img->getExt();
|
||||
}
|
||||
else
|
||||
} else
|
||||
$photo_failure = true;
|
||||
|
||||
if($photo_failure AND $quit_on_error)
|
||||
return false;
|
||||
|
||||
if($photo_failure) {
|
||||
$photo = $a->get_baseurl() . '/images/person-175.jpg';
|
||||
$thumb = $a->get_baseurl() . '/images/person-80.jpg';
|
||||
|
|
|
@ -235,7 +235,9 @@ function scrape_feed($url) {
|
|||
$a = get_app();
|
||||
|
||||
$ret = array();
|
||||
$s = fetch_url($url);
|
||||
$cookiejar = tempnam(get_temppath(), 'cookiejar-scrape-feed-');
|
||||
$s = fetch_url($url, false, $redirects, 0, Null, $cookiejar);
|
||||
unlink($cookiejar);
|
||||
|
||||
$headers = $a->get_curl_headers();
|
||||
$code = $a->get_curl_code();
|
||||
|
@ -662,7 +664,9 @@ function probe_url($url, $mode = PROBE_NORMAL, $level = 1) {
|
|||
$vcard['photo'] = $feedret['photo'];
|
||||
require_once('library/simplepie/simplepie.inc');
|
||||
$feed = new SimplePie();
|
||||
$xml = fetch_url($poll);
|
||||
$cookiejar = tempnam(get_temppath(), 'cookiejar-scrape-feed-');
|
||||
$xml = fetch_url($poll, false, $redirects, 0, Null, $cookiejar);
|
||||
unlink($cookiejar);
|
||||
|
||||
logger('probe_url: fetch feed: ' . $poll . ' returns: ' . $xml, LOGGER_DATA);
|
||||
$a = get_app();
|
||||
|
|
|
@ -1551,6 +1551,8 @@
|
|||
WHERE `item`.`visible` = 1 and `item`.`moderated` = 0 AND `item`.`deleted` = 0
|
||||
AND `contact`.`id` = `item`.`contact-id`
|
||||
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
|
||||
AND NOT `item`.`private` AND `item`.`allow_cid` = '' AND `item`.`allow`.`gid` = ''
|
||||
AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = ''
|
||||
$sql_extra
|
||||
AND `item`.`id`=%d",
|
||||
intval($id)
|
||||
|
@ -1579,7 +1581,8 @@
|
|||
$_REQUEST["source"] = api_source();
|
||||
|
||||
item_post($a);
|
||||
}
|
||||
} else
|
||||
throw new ForbiddenException();
|
||||
|
||||
// this should output the last post (the one we just posted).
|
||||
$called_api = null;
|
||||
|
|
|
@ -30,7 +30,6 @@ function cron_run(&$argv, &$argc){
|
|||
|
||||
require_once('include/session.php');
|
||||
require_once('include/datetime.php');
|
||||
require_once('library/simplepie/simplepie.inc');
|
||||
require_once('include/items.php');
|
||||
require_once('include/Contact.php');
|
||||
require_once('include/email.php');
|
||||
|
@ -164,6 +163,9 @@ function cron_run(&$argv, &$argc){
|
|||
// Repair missing Diaspora values in contacts
|
||||
cron_repair_diaspora($a);
|
||||
|
||||
// Repair entries in the database
|
||||
cron_repair_database();
|
||||
|
||||
$manual_id = 0;
|
||||
$generation = 0;
|
||||
$force = false;
|
||||
|
@ -417,6 +419,23 @@ function cron_repair_diaspora(&$a) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Do some repairs in database entries
|
||||
*
|
||||
*/
|
||||
function cron_repair_database() {
|
||||
|
||||
// Set the parent if it wasn't set. (Shouldn't happen - but does sometimes)
|
||||
// This call is very "cheap" so we can do it at any time without a problem
|
||||
q("UPDATE `item` INNER JOIN `item` AS `parent` ON `parent`.`uri` = `item`.`parent-uri` AND `parent`.`uid` = `item`.`uid` SET `item`.`parent` = `parent`.`id` WHERE `item`.`parent` = 0");
|
||||
|
||||
/// @todo
|
||||
/// - remove thread entries without item
|
||||
/// - remove sign entries without item
|
||||
/// - remove children when parent got lost
|
||||
/// - set contact-id in item when not present
|
||||
}
|
||||
|
||||
if (array_search(__file__,get_included_files())===0){
|
||||
cron_run($_SERVER["argv"],$_SERVER["argc"]);
|
||||
killme();
|
||||
|
|
|
@ -453,6 +453,7 @@ function db_definition() {
|
|||
"keywords" => array("type" => "text", "not null" => "1"),
|
||||
"gender" => array("type" => "varchar(32)", "not null" => "1", "default" => ""),
|
||||
"attag" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
|
||||
"avatar" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
|
||||
"photo" => array("type" => "text", "not null" => "1"),
|
||||
"thumb" => array("type" => "text", "not null" => "1"),
|
||||
"micro" => array("type" => "text", "not null" => "1"),
|
||||
|
|
|
@ -5,6 +5,7 @@ require_once('include/html2plain.php');
|
|||
require_once("include/Scrape.php");
|
||||
require_once('include/diaspora.php');
|
||||
require_once("include/ostatus.php");
|
||||
require_once("include/dfrn.php");
|
||||
|
||||
function delivery_run(&$argv, &$argc){
|
||||
global $a, $db;
|
||||
|
@ -264,8 +265,6 @@ function delivery_run(&$argv, &$argc){
|
|||
if(count($r))
|
||||
$contact = $r[0];
|
||||
|
||||
$hubxml = feed_hublinks();
|
||||
|
||||
if($contact['self'])
|
||||
continue;
|
||||
|
||||
|
@ -278,138 +277,54 @@ function delivery_run(&$argv, &$argc){
|
|||
case NETWORK_DFRN:
|
||||
logger('notifier: '.$target_item["guid"].' dfrndelivery: ' . $contact['name']);
|
||||
|
||||
$feed_template = get_markup_template('atom_feed.tpl');
|
||||
$mail_template = get_markup_template('atom_mail.tpl');
|
||||
|
||||
$atom = '';
|
||||
|
||||
|
||||
$birthday = feed_birthday($owner['uid'],$owner['timezone']);
|
||||
|
||||
if(strlen($birthday))
|
||||
$birthday = '<dfrn:birthday>' . xmlify($birthday) . '</dfrn:birthday>';
|
||||
|
||||
$atom .= replace_macros($feed_template, array(
|
||||
'$version' => xmlify(FRIENDICA_VERSION),
|
||||
'$feed_id' => xmlify($a->get_baseurl() . '/profile/' . $owner['nickname'] ),
|
||||
'$feed_title' => xmlify($owner['name']),
|
||||
'$feed_updated' => xmlify(datetime_convert('UTC', 'UTC', $updated . '+00:00' , ATOM_TIME)) ,
|
||||
'$hub' => $hubxml,
|
||||
'$salmon' => '', // private feed, we don't use salmon here
|
||||
'$name' => xmlify($owner['name']),
|
||||
'$profile_page' => xmlify($owner['url']),
|
||||
'$photo' => xmlify($owner['photo']),
|
||||
'$thumb' => xmlify($owner['thumb']),
|
||||
'$picdate' => xmlify(datetime_convert('UTC','UTC',$owner['avatar-date'] . '+00:00' , ATOM_TIME)) ,
|
||||
'$uridate' => xmlify(datetime_convert('UTC','UTC',$owner['uri-date'] . '+00:00' , ATOM_TIME)) ,
|
||||
'$namdate' => xmlify(datetime_convert('UTC','UTC',$owner['name-date'] . '+00:00' , ATOM_TIME)) ,
|
||||
'$birthday' => $birthday,
|
||||
'$community' => (($owner['page-flags'] == PAGE_COMMUNITY) ? '<dfrn:community>1</dfrn:community>' : '')
|
||||
));
|
||||
|
||||
if($mail) {
|
||||
$public_message = false; // mail is not public
|
||||
|
||||
$body = fix_private_photos($item['body'],$owner['uid'],null,$message[0]['contact-id']);
|
||||
|
||||
$atom .= replace_macros($mail_template, array(
|
||||
'$name' => xmlify($owner['name']),
|
||||
'$profile_page' => xmlify($owner['url']),
|
||||
'$thumb' => xmlify($owner['thumb']),
|
||||
'$item_id' => xmlify($item['uri']),
|
||||
'$subject' => xmlify($item['title']),
|
||||
'$created' => xmlify(datetime_convert('UTC', 'UTC', $item['created'] . '+00:00' , ATOM_TIME)),
|
||||
'$content' => xmlify($body),
|
||||
'$parent_id' => xmlify($item['parent-uri'])
|
||||
));
|
||||
} elseif($fsuggest) {
|
||||
$public_message = false; // suggestions are not public
|
||||
|
||||
$sugg_template = get_markup_template('atom_suggest.tpl');
|
||||
|
||||
$atom .= replace_macros($sugg_template, array(
|
||||
'$name' => xmlify($item['name']),
|
||||
'$url' => xmlify($item['url']),
|
||||
'$photo' => xmlify($item['photo']),
|
||||
'$request' => xmlify($item['request']),
|
||||
'$note' => xmlify($item['note'])
|
||||
));
|
||||
|
||||
// We don't need this any more
|
||||
|
||||
q("DELETE FROM `fsuggest` WHERE `id` = %d LIMIT 1",
|
||||
intval($item['id'])
|
||||
);
|
||||
} elseif($relocate) {
|
||||
$public_message = false; // suggestions are not public
|
||||
|
||||
$sugg_template = get_markup_template('atom_relocate.tpl');
|
||||
|
||||
/* get site pubkey. this could be a new installation with no site keys*/
|
||||
$pubkey = get_config('system','site_pubkey');
|
||||
if(! $pubkey) {
|
||||
$res = new_keypair(1024);
|
||||
set_config('system','site_prvkey', $res['prvkey']);
|
||||
set_config('system','site_pubkey', $res['pubkey']);
|
||||
}
|
||||
|
||||
$rp = q("SELECT `resource-id` , `scale`, type FROM `photo`
|
||||
WHERE `profile` = 1 AND `uid` = %d ORDER BY scale;", $uid);
|
||||
$photos = array();
|
||||
$ext = Photo::supportedTypes();
|
||||
foreach($rp as $p){
|
||||
$photos[$p['scale']] = $a->get_baseurl().'/photo/'.$p['resource-id'].'-'.$p['scale'].'.'.$ext[$p['type']];
|
||||
}
|
||||
unset($rp, $ext);
|
||||
|
||||
$atom .= replace_macros($sugg_template, array(
|
||||
'$name' => xmlify($owner['name']),
|
||||
'$photo' => xmlify($photos[4]),
|
||||
'$thumb' => xmlify($photos[5]),
|
||||
'$micro' => xmlify($photos[6]),
|
||||
'$url' => xmlify($owner['url']),
|
||||
'$request' => xmlify($owner['request']),
|
||||
'$confirm' => xmlify($owner['confirm']),
|
||||
'$notify' => xmlify($owner['notify']),
|
||||
'$poll' => xmlify($owner['poll']),
|
||||
'$sitepubkey' => xmlify(get_config('system','site_pubkey')),
|
||||
//'$pubkey' => xmlify($owner['pubkey']),
|
||||
//'$prvkey' => xmlify($owner['prvkey']),
|
||||
));
|
||||
unset($photos);
|
||||
} elseif($followup) {
|
||||
if ($mail) {
|
||||
$item['body'] = fix_private_photos($item['body'],$owner['uid'],null,$message[0]['contact-id']);
|
||||
$atom = dfrn::mail($item, $owner);
|
||||
} elseif ($fsuggest) {
|
||||
$atom = dfrn::fsuggest($item, $owner);
|
||||
q("DELETE FROM `fsuggest` WHERE `id` = %d LIMIT 1", intval($item['id']));
|
||||
} elseif ($relocate)
|
||||
$atom = dfrn::relocate($owner, $uid);
|
||||
elseif($followup) {
|
||||
$msgitems = array();
|
||||
foreach($items as $item) { // there is only one item
|
||||
if(! $item['parent'])
|
||||
if(!$item['parent'])
|
||||
continue;
|
||||
if($item['id'] == $item_id) {
|
||||
logger('followup: item: ' . print_r($item,true), LOGGER_DATA);
|
||||
$atom .= atom_entry($item,'text',null,$owner,false);
|
||||
$msgitems[] = $item;
|
||||
}
|
||||
}
|
||||
$atom = dfrn::entries($msgitems,$owner);
|
||||
} else {
|
||||
$msgitems = array();
|
||||
foreach($items as $item) {
|
||||
if(! $item['parent'])
|
||||
if(!$item['parent'])
|
||||
continue;
|
||||
|
||||
// private emails may be in included in public conversations. Filter them.
|
||||
if(($public_message) && $item['private'] == 1)
|
||||
if(($public_message) && $item['private'])
|
||||
continue;
|
||||
|
||||
$item_contact = get_item_contact($item,$icontacts);
|
||||
if(! $item_contact)
|
||||
if(!$item_contact)
|
||||
continue;
|
||||
|
||||
if($normal_mode) {
|
||||
if($item_id == $item['id'] || $item['id'] == $item['parent'])
|
||||
$atom .= atom_entry($item,'text',null,$owner,true,(($top_level) ? $contact['id'] : 0));
|
||||
} else
|
||||
$atom .= atom_entry($item,'text',null,$owner,true);
|
||||
if($item_id == $item['id'] || $item['id'] == $item['parent']) {
|
||||
$item["entry:comment-allow"] = true;
|
||||
$item["entry:cid"] = (($top_level) ? $contact['id'] : 0);
|
||||
$msgitems[] = $item;
|
||||
}
|
||||
} else {
|
||||
$item["entry:comment-allow"] = true;
|
||||
$msgitems[] = $item;
|
||||
}
|
||||
}
|
||||
$atom = dfrn::entries($msgitems,$owner);
|
||||
}
|
||||
|
||||
$atom .= '</feed>' . "\r\n";
|
||||
|
||||
logger('notifier: '.$contact["url"].' '.$target_item["guid"].' entry: '.$atom, LOGGER_DEBUG);
|
||||
logger('notifier entry: '.$contact["url"].' '.$target_item["guid"].' entry: '.$atom, LOGGER_DEBUG);
|
||||
|
||||
logger('notifier: ' . $atom, LOGGER_DATA);
|
||||
$basepath = implode('/', array_slice(explode('/',$contact['url']),0,3));
|
||||
|
@ -458,7 +373,6 @@ function delivery_run(&$argv, &$argc){
|
|||
if (($x[0]['page-flags'] == PAGE_SOAPBOX) AND $top_level)
|
||||
break;
|
||||
|
||||
require_once('library/simplepie/simplepie.inc');
|
||||
logger('mod-delivery: local delivery');
|
||||
local_delivery($x[0],$atom);
|
||||
break;
|
||||
|
@ -466,7 +380,7 @@ function delivery_run(&$argv, &$argc){
|
|||
}
|
||||
|
||||
if(! was_recently_delayed($contact['id']))
|
||||
$deliver_status = dfrn_deliver($owner,$contact,$atom);
|
||||
$deliver_status = dfrn::deliver($owner,$contact,$atom);
|
||||
else
|
||||
$deliver_status = (-1);
|
||||
|
||||
|
|
1048
include/dfrn.php
Normal file
1048
include/dfrn.php
Normal file
File diff suppressed because it is too large
Load diff
|
@ -14,6 +14,7 @@ require_once('include/queue_fn.php');
|
|||
require_once('include/lock.php');
|
||||
require_once('include/threads.php');
|
||||
require_once('mod/share.php');
|
||||
require_once('include/enotify.php');
|
||||
|
||||
function diaspora_dispatch_public($msg) {
|
||||
|
||||
|
@ -728,7 +729,7 @@ function diaspora_request($importer,$xml) {
|
|||
|
||||
require_once('include/Photo.php');
|
||||
|
||||
$photos = import_profile_photo($contact_record['photo'],$importer['uid'],$contact_record['id']);
|
||||
update_contact_avatar($contact_record['photo'],$importer['uid'],$contact_record['id']);
|
||||
|
||||
// technically they are sharing with us (CONTACT_IS_SHARING),
|
||||
// but if our page-type is PAGE_COMMUNITY or PAGE_SOAPBOX
|
||||
|
@ -739,26 +740,17 @@ function diaspora_request($importer,$xml) {
|
|||
else
|
||||
$new_relation = CONTACT_IS_FOLLOWER;
|
||||
|
||||
$r = q("UPDATE `contact` SET
|
||||
`photo` = '%s',
|
||||
`thumb` = '%s',
|
||||
`micro` = '%s',
|
||||
`rel` = %d,
|
||||
$r = q("UPDATE `contact` SET `rel` = %d,
|
||||
`name-date` = '%s',
|
||||
`uri-date` = '%s',
|
||||
`avatar-date` = '%s',
|
||||
`blocked` = 0,
|
||||
`pending` = 0,
|
||||
`writable` = 1
|
||||
WHERE `id` = %d
|
||||
",
|
||||
dbesc($photos[0]),
|
||||
dbesc($photos[1]),
|
||||
dbesc($photos[2]),
|
||||
intval($new_relation),
|
||||
dbesc(datetime_convert()),
|
||||
dbesc(datetime_convert()),
|
||||
dbesc(datetime_convert()),
|
||||
intval($contact_record['id'])
|
||||
);
|
||||
|
||||
|
@ -826,6 +818,23 @@ function diaspora_plink($addr, $guid) {
|
|||
return 'https://'.substr($addr,strpos($addr,'@')+1).'/posts/'.$guid;
|
||||
}
|
||||
|
||||
function diaspora_repair_signature($signature, $handle = "", $level = 1) {
|
||||
|
||||
if ($signature == "")
|
||||
return($signature);
|
||||
|
||||
if (base64_encode(base64_decode(base64_decode($signature))) == base64_decode($signature)) {
|
||||
$signature = base64_decode($signature);
|
||||
logger("Repaired double encoded signature from Diaspora/Hubzilla handle ".$handle." - level ".$level, LOGGER_DEBUG);
|
||||
|
||||
// Do a recursive call to be able to fix even multiple levels
|
||||
if ($level < 10)
|
||||
$signature = diaspora_repair_signature($signature, $handle, ++$level);
|
||||
}
|
||||
|
||||
return($signature);
|
||||
}
|
||||
|
||||
function diaspora_post($importer,$xml,$msg) {
|
||||
|
||||
$a = get_app();
|
||||
|
@ -1565,62 +1574,22 @@ function diaspora_comment($importer,$xml,$msg) {
|
|||
//);
|
||||
//}
|
||||
|
||||
if(($parent_item['origin']) && (! $parent_author_signature)) {
|
||||
// If we are the origin of the parent we store the original signature and notify our followers
|
||||
if($parent_item['origin']) {
|
||||
$author_signature_base64 = base64_encode($author_signature);
|
||||
$author_signature_base64 = diaspora_repair_signature($author_signature_base64, $diaspora_handle);
|
||||
|
||||
q("insert into sign (`iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ",
|
||||
intval($message_id),
|
||||
dbesc($signed_data),
|
||||
dbesc(base64_encode($author_signature)),
|
||||
dbesc($author_signature_base64),
|
||||
dbesc($diaspora_handle)
|
||||
);
|
||||
|
||||
// if the message isn't already being relayed, notify others
|
||||
// the existence of parent_author_signature means the parent_author or owner
|
||||
// is already relaying.
|
||||
|
||||
// notify others
|
||||
proc_run('php','include/notifier.php','comment-import',$message_id);
|
||||
}
|
||||
|
||||
$myconv = q("SELECT `author-link`, `author-avatar`, `parent` FROM `item` WHERE `parent-uri` = '%s' AND `uid` = %d AND `parent` != 0 AND `deleted` = 0 ",
|
||||
dbesc($parent_item['uri']),
|
||||
intval($importer['uid'])
|
||||
);
|
||||
|
||||
if(count($myconv)) {
|
||||
$importer_url = $a->get_baseurl() . '/profile/' . $importer['nickname'];
|
||||
|
||||
foreach($myconv as $conv) {
|
||||
|
||||
// now if we find a match, it means we're in this conversation
|
||||
|
||||
if(! link_compare($conv['author-link'],$importer_url))
|
||||
continue;
|
||||
|
||||
require_once('include/enotify.php');
|
||||
|
||||
$conv_parent = $conv['parent'];
|
||||
|
||||
notification(array(
|
||||
'type' => NOTIFY_COMMENT,
|
||||
'notify_flags' => $importer['notify-flags'],
|
||||
'language' => $importer['language'],
|
||||
'to_name' => $importer['username'],
|
||||
'to_email' => $importer['email'],
|
||||
'uid' => $importer['uid'],
|
||||
'item' => $datarray,
|
||||
'link' => $a->get_baseurl().'/display/'.urlencode($datarray['guid']),
|
||||
'source_name' => $datarray['author-name'],
|
||||
'source_link' => $datarray['author-link'],
|
||||
'source_photo' => $datarray['author-avatar'],
|
||||
'verb' => ACTIVITY_POST,
|
||||
'otype' => 'item',
|
||||
'parent' => $conv_parent,
|
||||
'parent_uri' => $parent_uri
|
||||
));
|
||||
|
||||
// only send one notification
|
||||
break;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1775,7 +1744,6 @@ function diaspora_conversation($importer,$xml,$msg) {
|
|||
intval($conversation['id'])
|
||||
);
|
||||
|
||||
require_once('include/enotify.php');
|
||||
notification(array(
|
||||
'type' => NOTIFY_MAIL,
|
||||
'notify_flags' => $importer['notify-flags'],
|
||||
|
@ -2226,21 +2194,21 @@ EOT;
|
|||
// );
|
||||
//}
|
||||
|
||||
if(! $parent_author_signature) {
|
||||
// If we are the origin of the parent we store the original signature and notify our followers
|
||||
if($parent_item['origin']) {
|
||||
$author_signature_base64 = base64_encode($author_signature);
|
||||
$author_signature_base64 = diaspora_repair_signature($author_signature_base64, $diaspora_handle);
|
||||
|
||||
q("insert into sign (`iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ",
|
||||
intval($message_id),
|
||||
dbesc($signed_data),
|
||||
dbesc(base64_encode($author_signature)),
|
||||
dbesc($author_signature_base64),
|
||||
dbesc($diaspora_handle)
|
||||
);
|
||||
}
|
||||
|
||||
// if the message isn't already being relayed, notify others
|
||||
// the existence of parent_author_signature means the parent_author or owner
|
||||
// is already relaying. The parent_item['origin'] indicates the message was created on our system
|
||||
|
||||
if(($parent_item['origin']) && (! $parent_author_signature))
|
||||
// notify others
|
||||
proc_run('php','include/notifier.php','comment-import',$message_id);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -2336,8 +2304,7 @@ function diaspora_signed_retraction($importer,$xml,$msg) {
|
|||
return;
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
|
||||
$sig_decode = base64_decode($sig);
|
||||
|
||||
|
@ -2371,7 +2338,7 @@ function diaspora_signed_retraction($importer,$xml,$msg) {
|
|||
intval($r[0]['parent'])
|
||||
);
|
||||
if(count($p)) {
|
||||
if(($p[0]['origin']) && (! $parent_author_signature)) {
|
||||
if($p[0]['origin']) {
|
||||
q("insert into sign (`retract_iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ",
|
||||
$r[0]['id'],
|
||||
dbesc($signed_data),
|
||||
|
@ -2456,7 +2423,7 @@ function diaspora_profile($importer,$xml,$msg) {
|
|||
|
||||
require_once('include/Photo.php');
|
||||
|
||||
$images = import_profile_photo($image_url,$importer['uid'],$contact['id']);
|
||||
update_contact_avatar($image_url,$importer['uid'],$contact['id']);
|
||||
|
||||
// Generic birthday. We don't know the timezone. The year is irrelevant.
|
||||
|
||||
|
@ -2474,15 +2441,12 @@ function diaspora_profile($importer,$xml,$msg) {
|
|||
/// @TODO Update name on item['author-name'] if the name changed. See consume_feed()
|
||||
/// (Not doing this currently because D* protocol is scheduled for revision soon).
|
||||
|
||||
$r = q("UPDATE `contact` SET `name` = '%s', `nick` = '%s', `addr` = '%s', `name-date` = '%s', `photo` = '%s', `thumb` = '%s', `micro` = '%s', `avatar-date` = '%s' , `bd` = '%s', `location` = '%s', `about` = '%s', `keywords` = '%s', `gender` = '%s' WHERE `id` = %d AND `uid` = %d",
|
||||
$r = q("UPDATE `contact` SET `name` = '%s', `nick` = '%s', `addr` = '%s', `name-date` = '%s', `bd` = '%s',
|
||||
`location` = '%s', `about` = '%s', `keywords` = '%s', `gender` = '%s' WHERE `id` = %d AND `uid` = %d",
|
||||
dbesc($name),
|
||||
dbesc($nick),
|
||||
dbesc($diaspora_handle),
|
||||
dbesc(datetime_convert()),
|
||||
dbesc($image_url),
|
||||
dbesc($images[1]),
|
||||
dbesc($images[2]),
|
||||
dbesc(datetime_convert()),
|
||||
dbesc($birthday),
|
||||
dbesc($location),
|
||||
dbesc($about),
|
||||
|
@ -2819,7 +2783,7 @@ function diaspora_send_followup($item,$owner,$contact,$public_batch = false) {
|
|||
// sign it
|
||||
|
||||
if($like)
|
||||
$signed_text = $item['guid'] . ';' . $target_type . ';' . $parent['guid'] . ';' . $positive . ';' . $myaddr;
|
||||
$signed_text = $positive . ';' . $item['guid'] . ';' . $target_type . ';' . $parent['guid'] . ';' . $myaddr;
|
||||
else
|
||||
$signed_text = $item['guid'] . ';' . $parent['guid'] . ';' . $text . ';' . $myaddr;
|
||||
|
||||
|
@ -2852,9 +2816,6 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) {
|
|||
$myaddr = $owner['nickname'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3);
|
||||
// $theiraddr = $contact['addr'];
|
||||
|
||||
$body = $item['body'];
|
||||
$text = html_entity_decode(bb2diaspora($body));
|
||||
|
||||
// Diaspora doesn't support threaded comments, but some
|
||||
// versions of Diaspora (i.e. Diaspora-pistos) support
|
||||
// likes on comments
|
||||
|
@ -2905,7 +2866,7 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) {
|
|||
// fetch the original signature if the relayable was created by a Diaspora
|
||||
// or DFRN user. Relayables for other networks are not supported.
|
||||
|
||||
/* $r = q("select * from sign where " . $sql_sign_id . " = %d limit 1",
|
||||
$r = q("SELECT `signed_text`, `signature`, `signer` FROM `sign` WHERE " . $sql_sign_id . " = %d LIMIT 1",
|
||||
intval($item['id'])
|
||||
);
|
||||
if(count($r)) {
|
||||
|
@ -2913,53 +2874,45 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) {
|
|||
$signed_text = $orig_sign['signed_text'];
|
||||
$authorsig = $orig_sign['signature'];
|
||||
$handle = $orig_sign['signer'];
|
||||
|
||||
// Split the signed text
|
||||
$signed_parts = explode(";", $signed_text);
|
||||
|
||||
// Remove the parent guid
|
||||
array_shift($signed_parts);
|
||||
|
||||
// Remove the comment guid
|
||||
array_shift($signed_parts);
|
||||
|
||||
// Remove the handle
|
||||
array_pop($signed_parts);
|
||||
|
||||
// Glue the parts together
|
||||
$text = implode(";", $signed_parts);
|
||||
}
|
||||
else {
|
||||
// This part is meant for cases where we don't have the signatur. (Which shouldn't happen with posts from Diaspora and Friendica)
|
||||
// This means that the comment won't be accepted by newer Diaspora servers
|
||||
|
||||
// Author signature information (for likes, comments, and retractions of likes or comments,
|
||||
// whether from Diaspora or Friendica) must be placed in the `sign` table before this
|
||||
// function is called
|
||||
logger('diaspora_send_relay: original author signature not found, cannot send relayable');
|
||||
return;
|
||||
}*/
|
||||
|
||||
/* Since the author signature is only checked by the parent, not by the relay recipients,
|
||||
* I think it may not be necessary for us to do so much work to preserve all the original
|
||||
* signatures. The important thing that Diaspora DOES need is the original creator's handle.
|
||||
* Let's just generate that and forget about all the original author signature stuff.
|
||||
*
|
||||
* Note: this might be more of an problem if we want to support likes on comments for older
|
||||
* versions of Diaspora (diaspora-pistos), but since there are a number of problems with
|
||||
* doing that, let's ignore it for now.
|
||||
*
|
||||
* Currently, only DFRN contacts are supported. StatusNet shouldn't be hard, but it hasn't
|
||||
* been done yet
|
||||
*/
|
||||
$body = $item['body'];
|
||||
$text = html_entity_decode(bb2diaspora($body));
|
||||
|
||||
$handle = diaspora_handle_from_contact($item['contact-id']);
|
||||
if(! $handle)
|
||||
return;
|
||||
|
||||
|
||||
if($relay_retract)
|
||||
$sender_signed_text = $item['guid'] . ';' . $target_type;
|
||||
$signed_text = $item['guid'] . ';' . $target_type;
|
||||
elseif($like)
|
||||
$sender_signed_text = $item['guid'] . ';' . $target_type . ';' . $parent['guid'] . ';' . $positive . ';' . $handle;
|
||||
$signed_text = $item['guid'] . ';' . $target_type . ';' . $parent['guid'] . ';' . $positive . ';' . $handle;
|
||||
else
|
||||
$sender_signed_text = $item['guid'] . ';' . $parent['guid'] . ';' . $text . ';' . $handle;
|
||||
$signed_text = $item['guid'] . ';' . $parent['guid'] . ';' . $text . ';' . $handle;
|
||||
|
||||
$authorsig = base64_encode(rsa_sign($signed_text,$owner['uprvkey'],'sha256'));
|
||||
}
|
||||
|
||||
// Sign the relayable with the top-level owner's signature
|
||||
//
|
||||
// We'll use the $sender_signed_text that we just created, instead of the $signed_text
|
||||
// stored in the database, because that provides the best chance that Diaspora will
|
||||
// be able to reconstruct the signed text the same way we did. This is particularly a
|
||||
// concern for the comment, whose signed text includes the text of the comment. The
|
||||
// smallest change in the text of the comment, including removing whitespace, will
|
||||
// make the signature verification fail. Since we translate from BB code to Diaspora's
|
||||
// markup at the top of this function, which is AFTER we placed the original $signed_text
|
||||
// in the database, it's hazardous to trust the original $signed_text.
|
||||
|
||||
$parentauthorsig = base64_encode(rsa_sign($sender_signed_text,$owner['uprvkey'],'sha256'));
|
||||
$parentauthorsig = base64_encode(rsa_sign($signed_text,$owner['uprvkey'],'sha256'));
|
||||
|
||||
$msg = replace_macros($tpl,array(
|
||||
'$guid' => xmlify($item['guid']),
|
||||
|
|
|
@ -76,11 +76,18 @@ function discover_poco_run(&$argv, &$argc){
|
|||
update_suggestions();
|
||||
elseif (($mode == 2) AND get_config('system','poco_completion'))
|
||||
discover_users();
|
||||
elseif (($mode == 1) AND ($search != "") and get_config('system','poco_local_search'))
|
||||
elseif (($mode == 1) AND ($search != "") and get_config('system','poco_local_search')) {
|
||||
discover_directory($search);
|
||||
elseif (($mode == 0) AND ($search == "") and (get_config('system','poco_discovery') > 0))
|
||||
gs_search_user($search);
|
||||
} elseif (($mode == 0) AND ($search == "") and (get_config('system','poco_discovery') > 0)) {
|
||||
// Query Friendica and Hubzilla servers for their users
|
||||
poco_discover();
|
||||
|
||||
// Query GNU Social servers for their users ("statistics" addon has to be enabled on the GS server)
|
||||
if (!get_config('system','ostatus_disabled'))
|
||||
gs_discover();
|
||||
}
|
||||
|
||||
logger('end '.$search);
|
||||
|
||||
return;
|
||||
|
@ -128,7 +135,7 @@ function discover_users() {
|
|||
else
|
||||
$server_url = poco_detect_server($user["url"]);
|
||||
|
||||
if (poco_check_server($server_url, $gcontacts[0]["network"])) {
|
||||
if (($server_url == "") OR poco_check_server($server_url, $gcontacts[0]["network"])) {
|
||||
logger('Check user '.$user["url"]);
|
||||
poco_last_updated($user["url"], true);
|
||||
|
||||
|
@ -191,6 +198,36 @@ function discover_directory($search) {
|
|||
Cache::set("dirsearch:".$search, time(), CACHE_DAY);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Search for GNU Social user with gstools.org
|
||||
*
|
||||
* @param str $search User name
|
||||
*/
|
||||
function gs_search_user($search) {
|
||||
|
||||
$a = get_app();
|
||||
|
||||
$url = "http://gstools.org/api/users_search/".urlencode($search);
|
||||
|
||||
$result = z_fetch_url($url);
|
||||
if (!$result["success"])
|
||||
return false;
|
||||
|
||||
$contacts = json_decode($result["body"]);
|
||||
|
||||
if ($contacts->status == 'ERROR')
|
||||
return false;
|
||||
|
||||
foreach($contacts->data AS $user) {
|
||||
$contact = probe_url($user->site_address."/".$user->name);
|
||||
if ($contact["network"] != NETWORK_PHANTOM) {
|
||||
$contact["about"] = $user->description;
|
||||
update_gcontact($contact);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (array_search(__file__,get_included_files())===0){
|
||||
discover_poco_run($_SERVER["argv"],$_SERVER["argc"]);
|
||||
killme();
|
||||
|
|
|
@ -633,4 +633,129 @@ function notification($params) {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Checks for item related notifications and sends them
|
||||
*
|
||||
* @param int $itemid ID of the item for which the check should be done
|
||||
* @param int $uid User ID
|
||||
* @param str $defaulttype (Optional) Forces a notification with this type.
|
||||
*/
|
||||
function check_item_notification($itemid, $uid, $defaulttype = "") {
|
||||
|
||||
$notification_data = array("uid" => $uid, "profiles" => array());
|
||||
call_hooks('check_item_notification', $notification_data);
|
||||
|
||||
$profiles = $notification_data["profiles"];
|
||||
|
||||
$user = q("SELECT `notify-flags`, `language`, `username`, `email` FROM `user` WHERE `uid` = %d", intval($uid));
|
||||
if (!$user)
|
||||
return false;
|
||||
|
||||
$owner = q("SELECT `id`, `url` FROM `contact` WHERE `self` AND `uid` = %d LIMIT 1", intval($uid));
|
||||
if (!$owner)
|
||||
return false;
|
||||
|
||||
$profiles[] = $owner[0]["url"];
|
||||
|
||||
$profiles2 = array();
|
||||
|
||||
foreach ($profiles AS $profile) {
|
||||
$profiles2[] = normalise_link($profile);
|
||||
$profiles2[] = str_replace("http://", "https://", normalise_link($profile));
|
||||
}
|
||||
|
||||
$profiles = $profiles2;
|
||||
|
||||
$profile_list = "";
|
||||
|
||||
foreach ($profiles AS $profile) {
|
||||
if ($profile_list != "")
|
||||
$profile_list .= "', '";
|
||||
|
||||
$profile_list .= dbesc($profile);
|
||||
}
|
||||
|
||||
$profile_list = "'".$profile_list."'";
|
||||
|
||||
// Only act if it is a "real" post
|
||||
// We need the additional check for the "local_profile" because of mixed situations on connector networks
|
||||
$item = q("SELECT `id`, `mention`, `tag`,`parent`, `title`, `body`, `author-name`, `author-link`, `author-avatar`, `guid`,
|
||||
`parent-uri`, `uri`, `contact-id`
|
||||
FROM `item` WHERE `id` = %d AND `verb` IN ('%s', '') AND `type` != 'activity' AND
|
||||
NOT (`author-link` IN ($profile_list)) LIMIT 1",
|
||||
intval($itemid), dbesc(ACTIVITY_POST));
|
||||
if (!$item)
|
||||
return false;
|
||||
|
||||
// Generate the notification array
|
||||
$params = array();
|
||||
$params["uid"] = $uid;
|
||||
$params["notify_flags"] = $user[0]["notify-flags"];
|
||||
$params["language"] = $user[0]["language"];
|
||||
$params["to_name"] = $user[0]["username"];
|
||||
$params["to_email"] = $user[0]["email"];
|
||||
$params["item"] = $item[0];
|
||||
$params["parent"] = $item[0]["parent"];
|
||||
$params["link"] = App::get_baseurl().'/display/'.urlencode($item[0]["guid"]);
|
||||
$params["otype"] = 'item';
|
||||
$params["source_name"] = $item[0]["author-name"];
|
||||
$params["source_link"] = $item[0]["author-link"];
|
||||
$params["source_photo"] = $item[0]["author-avatar"];
|
||||
|
||||
if ($item[0]["parent-uri"] === $item[0]["uri"]) {
|
||||
// Send a notification for every new post?
|
||||
$r = q("SELECT `notify_new_posts` FROM `contact` WHERE `id` = %d AND `uid` = %d AND `notify_new_posts` LIMIT 1",
|
||||
intval($item[0]['contact-id']),
|
||||
intval($uid)
|
||||
);
|
||||
$send_notification = count($r);
|
||||
|
||||
if (!$send_notification) {
|
||||
$tags = q("SELECT `url` FROM `term` WHERE `otype` = %d AND `oid` = %d AND `type` = %d AND `uid` = %d",
|
||||
intval(TERM_OBJ_POST), intval($itemid), intval(TERM_MENTION), intval($uid));
|
||||
|
||||
if (count($tags)) {
|
||||
foreach ($tags AS $tag) {
|
||||
$r = q("SELECT `id` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d AND `notify_new_posts`",
|
||||
normalise_link($tag["url"]), intval($uid));
|
||||
if (count($r))
|
||||
$send_notification = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($send_notification) {
|
||||
$params["type"] = NOTIFY_SHARE;
|
||||
$params["verb"] = ACTIVITY_TAG;
|
||||
}
|
||||
}
|
||||
|
||||
// Is the user mentioned in this post?
|
||||
$tagged = false;
|
||||
|
||||
foreach ($profiles AS $profile) {
|
||||
if (strpos($item[0]["tag"], "=".$profile."]") OR strpos($item[0]["body"], "=".$profile."]"))
|
||||
$tagged = true;
|
||||
}
|
||||
|
||||
if ($item[0]["mention"] OR $tagged OR ($defaulttype == NOTIFY_TAGSELF)) {
|
||||
$params["type"] = NOTIFY_TAGSELF;
|
||||
$params["verb"] = ACTIVITY_TAG;
|
||||
}
|
||||
|
||||
// Is it a post that the user had started or where he interacted?
|
||||
$parent = q("SELECT `thread`.`iid` FROM `thread` INNER JOIN `item` ON `item`.`parent` = `thread`.`iid`
|
||||
WHERE `thread`.`iid` = %d AND `thread`.`uid` = %d AND NOT `thread`.`ignored` AND
|
||||
(`thread`.`mention` OR `item`.`author-link` IN ($profile_list))
|
||||
LIMIT 1",
|
||||
intval($item[0]["parent"]), intval($uid));
|
||||
|
||||
if ($parent AND !isset($params["type"])) {
|
||||
$params["type"] = NOTIFY_COMMENT;
|
||||
$params["verb"] = ACTIVITY_POST;
|
||||
}
|
||||
|
||||
if (isset($params["type"]))
|
||||
notification($params);
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -61,7 +61,7 @@ function format_event_html($ev, $simple = false) {
|
|||
. bbcode($ev['location'])
|
||||
. '</span></p>' . "\r\n";
|
||||
|
||||
if (strpos($ev['location'], "[map")===False) {
|
||||
if (strpos($ev['location'], "[map") !== False) {
|
||||
$map = generate_named_map($ev['location']);
|
||||
if ($map!==$ev['location']) $o.=$map;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,6 @@ function expire_run(&$argv, &$argc){
|
|||
|
||||
require_once('include/session.php');
|
||||
require_once('include/datetime.php');
|
||||
require_once('library/simplepie/simplepie.inc');
|
||||
require_once('include/items.php');
|
||||
require_once('include/Contact.php');
|
||||
|
||||
|
|
|
@ -264,24 +264,8 @@ function new_contact($uid,$url,$interactive = false) {
|
|||
|
||||
require_once("include/Photo.php");
|
||||
|
||||
$photos = import_profile_photo($ret['photo'],$uid,$contact_id);
|
||||
|
||||
$r = q("UPDATE `contact` SET `photo` = '%s',
|
||||
`thumb` = '%s',
|
||||
`micro` = '%s',
|
||||
`name-date` = '%s',
|
||||
`uri-date` = '%s',
|
||||
`avatar-date` = '%s'
|
||||
WHERE `id` = %d",
|
||||
dbesc($photos[0]),
|
||||
dbesc($photos[1]),
|
||||
dbesc($photos[2]),
|
||||
dbesc(datetime_convert()),
|
||||
dbesc(datetime_convert()),
|
||||
dbesc(datetime_convert()),
|
||||
intval($contact_id)
|
||||
);
|
||||
|
||||
// Update the avatar
|
||||
update_contact_avatar($ret['photo'],$uid,$contact_id);
|
||||
|
||||
// pull feed and consume it, which should subscribe to the hub.
|
||||
|
||||
|
|
|
@ -42,6 +42,9 @@ function get_forumlist($uid, $showhidden = true, $lastitem, $showprivate = false
|
|||
intval($uid)
|
||||
);
|
||||
|
||||
if (!$contacts)
|
||||
return($forumlist);
|
||||
|
||||
foreach($contacts as $contact) {
|
||||
$forumlist[] = array(
|
||||
'url' => $contact['url'],
|
||||
|
|
|
@ -33,7 +33,7 @@ function gprobe_run(&$argv, &$argc){
|
|||
|
||||
$url = hex2bin($argv[1]);
|
||||
|
||||
$r = q("select * from gcontact where nurl = '%s' limit 1",
|
||||
$r = q("SELECT `id`, `url`, `network` FROM `gcontact` WHERE `nurl` = '%s' ORDER BY `id` LIMIT 1",
|
||||
dbesc(normalise_link($url))
|
||||
);
|
||||
|
||||
|
@ -58,20 +58,15 @@ function gprobe_run(&$argv, &$argc){
|
|||
if (is_null($result))
|
||||
Cache::set("gprobe:".$urlparts["host"],serialize($arr));
|
||||
|
||||
if(count($arr) && x($arr,'network') && $arr['network'] === NETWORK_DFRN) {
|
||||
q("insert into `gcontact` (`name`,`url`,`nurl`,`photo`)
|
||||
values ( '%s', '%s', '%s', '%s') ",
|
||||
dbesc($arr['name']),
|
||||
dbesc($arr['url']),
|
||||
dbesc(normalise_link($arr['url'])),
|
||||
dbesc($arr['photo'])
|
||||
);
|
||||
}
|
||||
$r = q("select * from gcontact where nurl = '%s' limit 1",
|
||||
if (!in_array($result["network"], array(NETWORK_FEED, NETWORK_PHANTOM)))
|
||||
update_gcontact($arr);
|
||||
|
||||
$r = q("SELECT `id`, `url`, `network` FROM `gcontact` WHERE `nurl` = '%s' ORDER BY `id` LIMIT 1",
|
||||
dbesc(normalise_link($url))
|
||||
);
|
||||
}
|
||||
if(count($r))
|
||||
if ($r[0]["network"] == NETWORK_DFRN)
|
||||
poco_load(0,0,$r[0]['id'], str_replace('/profile/','/poco/',$r[0]['url']));
|
||||
|
||||
logger("gprobe end for ".normalise_link($url), LOGGER_DEBUG);
|
||||
|
|
1045
include/items.php
1045
include/items.php
File diff suppressed because it is too large
Load diff
|
@ -279,6 +279,9 @@ function store_diaspora_like_retract_sig($activity, $item, $like_item, $contact)
|
|||
$contact_baseurl = substr($contact['url'], $contact_baseurl_start, $contact_baseurl_length);
|
||||
$diaspora_handle = $contact['nick'] . '@' . $contact_baseurl;
|
||||
|
||||
// This code could never had worked (the return values form the queries were used in a wrong way.
|
||||
// Additionally it is needlessly complicated. Either the contact is owner or not. And we have this data already.
|
||||
/*
|
||||
// Get contact's private key if he's a user of the local Friendica server
|
||||
$r = q("SELECT `contact`.`uid` FROM `contact` WHERE `url` = '%s' AND `self` = 1 LIMIT 1",
|
||||
dbesc($contact['url'])
|
||||
|
@ -289,9 +292,15 @@ function store_diaspora_like_retract_sig($activity, $item, $like_item, $contact)
|
|||
$r = q("SELECT prvkey FROM user WHERE uid = %d LIMIT 1",
|
||||
intval($contact_uid)
|
||||
);
|
||||
*/
|
||||
// Is the contact the owner? Then fetch the private key
|
||||
if ($contact['self'] AND ($contact['uid'] > 0)) {
|
||||
$r = q("SELECT prvkey FROM user WHERE uid = %d LIMIT 1",
|
||||
intval($contact['uid'])
|
||||
);
|
||||
|
||||
if( $r)
|
||||
$authorsig = base64_encode(rsa_sign($signed_text,$r['prvkey'],'sha256'));
|
||||
if($r)
|
||||
$authorsig = base64_encode(rsa_sign($signed_text,$r[0]['prvkey'],'sha256'));
|
||||
}
|
||||
|
||||
if(! isset($authorsig))
|
||||
|
@ -329,6 +338,10 @@ function store_diaspora_like_sig($activity, $post_type, $contact, $post_id) {
|
|||
$contact_baseurl = substr($contact['url'], $contact_baseurl_start, $contact_baseurl_length);
|
||||
$diaspora_handle = $contact['nick'] . '@' . $contact_baseurl;
|
||||
|
||||
|
||||
// This code could never had worked (the return values form the queries were used in a wrong way.
|
||||
// Additionally it is needlessly complicated. Either the contact is owner or not. And we have this data already.
|
||||
/*
|
||||
// Get contact's private key if he's a user of the local Friendica server
|
||||
$r = q("SELECT `contact`.`uid` FROM `contact` WHERE `url` = '%s' AND `self` = 1 LIMIT 1",
|
||||
dbesc($contact['url'])
|
||||
|
@ -343,6 +356,17 @@ function store_diaspora_like_sig($activity, $post_type, $contact, $post_id) {
|
|||
if( $r)
|
||||
$contact_uprvkey = $r['prvkey'];
|
||||
}
|
||||
*/
|
||||
|
||||
// Is the contact the owner? Then fetch the private key
|
||||
if ($contact['self'] AND ($contact['uid'] > 0)) {
|
||||
$r = q("SELECT prvkey FROM user WHERE uid = %d LIMIT 1",
|
||||
intval($contact['uid'])
|
||||
);
|
||||
|
||||
if($r)
|
||||
$contact_uprvkey = $r[0]['prvkey'];
|
||||
}
|
||||
|
||||
$r = q("SELECT guid, parent FROM `item` WHERE id = %d LIMIT 1",
|
||||
intval($post_id)
|
||||
|
@ -353,7 +377,7 @@ function store_diaspora_like_sig($activity, $post_type, $contact, $post_id) {
|
|||
intval($r[0]['parent'])
|
||||
);
|
||||
if( $p) {
|
||||
$signed_text = $r[0]['guid'] . ';Post;' . $p[0]['guid'] . ';true;' . $diaspora_handle;
|
||||
$signed_text = 'true;'.$r[0]['guid'].';Post;'.$p[0]['guid'].';'.$diaspora_handle;
|
||||
|
||||
if(isset($contact_uprvkey))
|
||||
$authorsig = base64_encode(rsa_sign($signed_text,$contact_uprvkey,'sha256'));
|
||||
|
|
|
@ -42,6 +42,7 @@ if(!function_exists('z_fetch_url')){
|
|||
* @return array an assoziative array with:
|
||||
* * \e int \b return_code => HTTP return code or 0 if timeout or failure
|
||||
* * \e boolean \b success => boolean true (if HTTP 2xx result) or false
|
||||
* * \e string \b redirect_url => in case of redirect, content was finally retrieved from this URL
|
||||
* * \e string \b header => HTTP headers
|
||||
* * \e string \b body => fetched content
|
||||
*/
|
||||
|
@ -116,6 +117,9 @@ function z_fetch_url($url,$binary = false, &$redirects = 0, $opts=array()) {
|
|||
// if it throws any errors.
|
||||
|
||||
$s = @curl_exec($ch);
|
||||
if (curl_errno($ch) !== CURLE_OK) {
|
||||
logger('fetch_url error fetching '.$url.': '.curl_error($ch), LOGGER_NORMAL);
|
||||
}
|
||||
|
||||
$base = $s;
|
||||
$curl_info = @curl_getinfo($ch);
|
||||
|
@ -133,6 +137,10 @@ function z_fetch_url($url,$binary = false, &$redirects = 0, $opts=array()) {
|
|||
$base = substr($base,strlen($chunk));
|
||||
}
|
||||
|
||||
$a->set_curl_code($http_code);
|
||||
$a->set_curl_content_type($curl_info['content_type']);
|
||||
$a->set_curl_headers($header);
|
||||
|
||||
if($http_code == 301 || $http_code == 302 || $http_code == 303 || $http_code == 307) {
|
||||
$new_location_info = @parse_url($curl_info["redirect_url"]);
|
||||
$old_location_info = @parse_url($curl_info["url"]);
|
||||
|
@ -160,13 +168,13 @@ function z_fetch_url($url,$binary = false, &$redirects = 0, $opts=array()) {
|
|||
$a->set_curl_content_type($curl_info['content_type']);
|
||||
|
||||
$body = substr($s,strlen($header));
|
||||
$a->set_curl_headers($header);
|
||||
|
||||
|
||||
|
||||
$rc = intval($http_code);
|
||||
$ret['return_code'] = $rc;
|
||||
$ret['success'] = (($rc >= 200 && $rc <= 299) ? true : false);
|
||||
$ret['redirect_url'] = $url;
|
||||
if(! $ret['success']) {
|
||||
$ret['error'] = curl_error($ch);
|
||||
$ret['debug'] = $curl_info;
|
||||
|
|
|
@ -535,7 +535,7 @@ function notifier_run(&$argv, &$argc){
|
|||
|
||||
if($public_message) {
|
||||
|
||||
if (!$followup)
|
||||
if (!$followup AND $top_level)
|
||||
$r0 = diaspora_fetch_relay();
|
||||
else
|
||||
$r0 = array();
|
||||
|
|
|
@ -27,7 +27,6 @@ function onepoll_run(&$argv, &$argc){
|
|||
|
||||
require_once('include/session.php');
|
||||
require_once('include/datetime.php');
|
||||
require_once('library/simplepie/simplepie.inc');
|
||||
require_once('include/items.php');
|
||||
require_once('include/Contact.php');
|
||||
require_once('include/email.php');
|
||||
|
@ -335,7 +334,9 @@ function onepoll_run(&$argv, &$argc){
|
|||
if($contact['rel'] == CONTACT_IS_FOLLOWER || $contact['blocked'] || $contact['readonly'])
|
||||
return;
|
||||
|
||||
$xml = fetch_url($contact['poll']);
|
||||
$cookiejar = tempnam(get_temppath(), 'cookiejar-onepoll-');
|
||||
$xml = fetch_url($contact['poll'], false, $redirects, 0, Null, $cookiejar);
|
||||
unlink($cookiejar);
|
||||
}
|
||||
elseif($contact['network'] === NETWORK_MAIL || $contact['network'] === NETWORK_MAIL2) {
|
||||
|
||||
|
|
|
@ -127,7 +127,8 @@ function ostatus_fetchauthor($xpath, $context, $importer, &$contact, $onlyfetch)
|
|||
$author["owner-link"] = $author["author-link"];
|
||||
$author["owner-avatar"] = $author["author-avatar"];
|
||||
|
||||
if ($r AND !$onlyfetch) {
|
||||
// Only update the contacts if it is an OStatus contact
|
||||
if ($r AND !$onlyfetch AND ($contact["network"] == NETWORK_OSTATUS)) {
|
||||
// Update contact data
|
||||
|
||||
$value = $xpath->query("atom:link[@rel='salmon']", $context)->item(0)->nodeValue;
|
||||
|
@ -158,24 +159,21 @@ function ostatus_fetchauthor($xpath, $context, $importer, &$contact, $onlyfetch)
|
|||
|
||||
logger("Update contact data for contact ".$contact["id"], LOGGER_DEBUG);
|
||||
|
||||
q("UPDATE `contact` SET `name` = '%s', `nick` = '%s', `about` = '%s', `location` = '%s', `name-date` = '%s' WHERE `id` = %d AND `network` = '%s'",
|
||||
q("UPDATE `contact` SET `name` = '%s', `nick` = '%s', `about` = '%s', `location` = '%s', `name-date` = '%s' WHERE `id` = %d",
|
||||
dbesc($contact["name"]), dbesc($contact["nick"]), dbesc($contact["about"]), dbesc($contact["location"]),
|
||||
dbesc(datetime_convert()), intval($contact["id"]), dbesc(NETWORK_OSTATUS));
|
||||
dbesc(datetime_convert()), intval($contact["id"]));
|
||||
|
||||
poco_check($contact["url"], $contact["name"], $contact["network"], $author["author-avatar"], $contact["about"], $contact["location"],
|
||||
"", "", "", datetime_convert(), 2, $contact["id"], $contact["uid"]);
|
||||
}
|
||||
|
||||
if (isset($author["author-avatar"]) AND ($author["author-avatar"] != $r[0]['photo'])) {
|
||||
if (isset($author["author-avatar"]) AND ($author["author-avatar"] != $r[0]['avatar'])) {
|
||||
logger("Update profile picture for contact ".$contact["id"], LOGGER_DEBUG);
|
||||
|
||||
$photos = import_profile_photo($author["author-avatar"], $importer["uid"], $contact["id"]);
|
||||
|
||||
q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `micro` = '%s', `avatar-date` = '%s' WHERE `id` = %d AND `network` = '%s'",
|
||||
dbesc($author["author-avatar"]), dbesc($photos[1]), dbesc($photos[2]),
|
||||
dbesc(datetime_convert()), intval($contact["id"]), dbesc(NETWORK_OSTATUS));
|
||||
update_contact_avatar($author["author-avatar"], $importer["uid"], $contact["id"]);
|
||||
}
|
||||
|
||||
|
||||
/// @todo Add the "addr" field
|
||||
$contact["generation"] = 2;
|
||||
$contact["photo"] = $author["author-avatar"];
|
||||
|
@ -558,29 +556,6 @@ function ostatus_import($xml,$importer,&$contact, &$hub) {
|
|||
}
|
||||
|
||||
logger("Item was stored with id ".$item_id, LOGGER_DEBUG);
|
||||
$item["id"] = $item_id;
|
||||
|
||||
if ($mention) {
|
||||
$u = q("SELECT `notify-flags`, `language`, `username`, `email` FROM user WHERE uid = %d LIMIT 1", intval($item['uid']));
|
||||
$r = q("SELECT `parent` FROM `item` WHERE `id` = %d", intval($item_id));
|
||||
|
||||
notification(array(
|
||||
'type' => NOTIFY_TAGSELF,
|
||||
'notify_flags' => $u[0]["notify-flags"],
|
||||
'language' => $u[0]["language"],
|
||||
'to_name' => $u[0]["username"],
|
||||
'to_email' => $u[0]["email"],
|
||||
'uid' => $item["uid"],
|
||||
'item' => $item,
|
||||
'link' => $a->get_baseurl().'/display/'.urlencode(get_item_guid($item_id)),
|
||||
'source_name' => $item["author-name"],
|
||||
'source_link' => $item["author-link"],
|
||||
'source_photo' => $item["author-avatar"],
|
||||
'verb' => ACTIVITY_TAG,
|
||||
'otype' => 'item',
|
||||
'parent' => $r[0]["parent"]
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1025,28 +1000,6 @@ function ostatus_completion($conversation_url, $uid, $item = array()) {
|
|||
// Add the conversation entry (but don't fetch the whole conversation)
|
||||
ostatus_store_conversation($newitem, $conversation_url);
|
||||
|
||||
if ($mention) {
|
||||
$u = q("SELECT `notify-flags`, `language`, `username`, `email` FROM user WHERE uid = %d LIMIT 1", intval($uid));
|
||||
$r = q("SELECT `parent` FROM `item` WHERE `id` = %d", intval($newitem));
|
||||
|
||||
notification(array(
|
||||
'type' => NOTIFY_TAGSELF,
|
||||
'notify_flags' => $u[0]["notify-flags"],
|
||||
'language' => $u[0]["language"],
|
||||
'to_name' => $u[0]["username"],
|
||||
'to_email' => $u[0]["email"],
|
||||
'uid' => $uid,
|
||||
'item' => $arr,
|
||||
'link' => $a->get_baseurl().'/display/'.urlencode(get_item_guid($newitem)),
|
||||
'source_name' => $arr["author-name"],
|
||||
'source_link' => $arr["author-link"],
|
||||
'source_photo' => $arr["author-avatar"],
|
||||
'verb' => ACTIVITY_TAG,
|
||||
'otype' => 'item',
|
||||
'parent' => $r[0]["parent"]
|
||||
));
|
||||
}
|
||||
|
||||
// If the newly created item is the top item then change the parent settings of the thread
|
||||
// This shouldn't happen anymore. This is supposed to be absolote.
|
||||
if ($arr["uri"] == $first_id) {
|
||||
|
@ -1121,7 +1074,7 @@ function get_reshared_guid($item) {
|
|||
return $guid;
|
||||
}
|
||||
|
||||
function xml_add_element($doc, $parent, $element, $value = "", $attributes = array()) {
|
||||
function xml_create_element($doc, $element, $value = "", $attributes = array()) {
|
||||
$element = $doc->createElement($element, xmlify($value));
|
||||
|
||||
foreach ($attributes AS $key => $value) {
|
||||
|
@ -1129,7 +1082,11 @@ function xml_add_element($doc, $parent, $element, $value = "", $attributes = arr
|
|||
$attribute->value = xmlify($value);
|
||||
$element->appendChild($attribute);
|
||||
}
|
||||
return $element;
|
||||
}
|
||||
|
||||
function xml_add_element($doc, $parent, $element, $value = "", $attributes = array()) {
|
||||
$element = xml_create_element($doc, $element, $value, $attributes);
|
||||
$parent->appendChild($element);
|
||||
}
|
||||
|
||||
|
|
|
@ -39,8 +39,10 @@ function poller_run(&$argv, &$argc){
|
|||
}
|
||||
|
||||
// Checking the number of workers
|
||||
if (poller_too_much_workers(1))
|
||||
if (poller_too_much_workers(1)) {
|
||||
poller_kill_stale_workers();
|
||||
return;
|
||||
}
|
||||
|
||||
if(($argc <= 1) OR ($argv[1] != "no_cron")) {
|
||||
// Run the cron job that calls all other jobs
|
||||
|
@ -50,16 +52,7 @@ function poller_run(&$argv, &$argc){
|
|||
proc_run("php","include/cronhooks.php");
|
||||
|
||||
// Cleaning dead processes
|
||||
$r = q("SELECT DISTINCT(`pid`) FROM `workerqueue` WHERE `executed` != '0000-00-00 00:00:00'");
|
||||
foreach($r AS $pid)
|
||||
if (!posix_kill($pid["pid"], 0))
|
||||
q("UPDATE `workerqueue` SET `executed` = '0000-00-00 00:00:00', `pid` = 0 WHERE `pid` = %d",
|
||||
intval($pid["pid"]));
|
||||
else {
|
||||
/// @TODO Kill long running processes
|
||||
/// But: Update processes (like the database update) mustn't be killed
|
||||
}
|
||||
|
||||
poller_kill_stale_workers();
|
||||
} else
|
||||
// Sleep four seconds before checking for running processes again to avoid having too many workers
|
||||
sleep(4);
|
||||
|
@ -124,6 +117,32 @@ function poller_run(&$argv, &$argc){
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief fix the queue entry if the worker process died
|
||||
*
|
||||
*/
|
||||
function poller_kill_stale_workers() {
|
||||
$r = q("SELECT `pid`, `executed` FROM `workerqueue` WHERE `executed` != '0000-00-00 00:00:00'");
|
||||
foreach($r AS $pid)
|
||||
if (!posix_kill($pid["pid"], 0))
|
||||
q("UPDATE `workerqueue` SET `executed` = '0000-00-00 00:00:00', `pid` = 0 WHERE `pid` = %d",
|
||||
intval($pid["pid"]));
|
||||
else {
|
||||
// Kill long running processes
|
||||
$duration = (time() - strtotime($pid["executed"])) / 60;
|
||||
if ($duration > 180) {
|
||||
logger("Worker process ".$pid["pid"]." took more than 3 hours. It will be killed now.");
|
||||
posix_kill($pid["pid"], SIGTERM);
|
||||
|
||||
// Question: If a process is stale: Should we remove it or should we reschedule it?
|
||||
// By now we rescheduling it. It's maybe not the wisest decision?
|
||||
q("UPDATE `workerqueue` SET `executed` = '0000-00-00 00:00:00', `pid` = 0 WHERE `pid` = %d",
|
||||
intval($pid["pid"]));
|
||||
} else
|
||||
logger("Worker process ".$pid["pid"]." now runs for ".round($duration)." minutes. That's okay.", LOGGER_DEBUG);
|
||||
}
|
||||
}
|
||||
|
||||
function poller_too_much_workers($stage) {
|
||||
|
||||
$queues = get_config("system", "worker_queues");
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
require_once('include/datetime.php');
|
||||
require_once('include/diaspora.php');
|
||||
require_once('include/queue_fn.php');
|
||||
require_once('include/Contact.php');
|
||||
|
||||
function profile_change() {
|
||||
|
||||
|
@ -53,19 +54,7 @@ function profile_change() {
|
|||
$about = xmlify($profile['about']);
|
||||
require_once('include/bbcode.php');
|
||||
$about = xmlify(strip_tags(bbcode($about)));
|
||||
$location = '';
|
||||
if($profile['locality'])
|
||||
$location .= $profile['locality'];
|
||||
if($profile['region']) {
|
||||
if($location)
|
||||
$location .= ', ';
|
||||
$location .= $profile['region'];
|
||||
}
|
||||
if($profile['country-name']) {
|
||||
if($location)
|
||||
$location .= ', ';
|
||||
$location .= $profile['country-name'];
|
||||
}
|
||||
$location = formatted_location($profile);
|
||||
$location = xmlify($location);
|
||||
$tags = '';
|
||||
if($profile['pub_keywords']) {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
require_once("boot.php");
|
||||
require_once('include/queue_fn.php');
|
||||
require_once('include/dfrn.php');
|
||||
|
||||
function queue_run(&$argv, &$argc){
|
||||
global $a, $db;
|
||||
|
@ -52,6 +53,8 @@ function queue_run(&$argv, &$argc){
|
|||
$queue_id = 0;
|
||||
|
||||
$deadguys = array();
|
||||
$deadservers = array();
|
||||
$serverlist = array();
|
||||
|
||||
logger('queue: start');
|
||||
|
||||
|
@ -95,7 +98,7 @@ function queue_run(&$argv, &$argc){
|
|||
// For the first 12 hours we'll try to deliver every 15 minutes
|
||||
// After that, we'll only attempt delivery once per hour.
|
||||
|
||||
$r = q("SELECT `id` FROM `queue` WHERE (( `created` > UTC_TIMESTAMP() - INTERVAL 12 HOUR && `last` < UTC_TIMESTAMP() - INTERVAL 15 MINUTE ) OR ( `last` < UTC_TIMESTAMP() - INTERVAL 1 HOUR ))");
|
||||
$r = q("SELECT `id` FROM `queue` WHERE ((`created` > UTC_TIMESTAMP() - INTERVAL 12 HOUR && `last` < UTC_TIMESTAMP() - INTERVAL 15 MINUTE) OR (`last` < UTC_TIMESTAMP() - INTERVAL 1 HOUR)) ORDER BY `cid`, `created`");
|
||||
}
|
||||
if(! $r){
|
||||
return;
|
||||
|
@ -116,7 +119,7 @@ function queue_run(&$argv, &$argc){
|
|||
// so check again if this entry still needs processing
|
||||
|
||||
if($queue_id) {
|
||||
$qi = q("select * from queue where `id` = %d limit 1",
|
||||
$qi = q("SELECT * FROM `queue` WHERE `id` = %d LIMIT 1",
|
||||
intval($queue_id)
|
||||
);
|
||||
}
|
||||
|
@ -142,8 +145,18 @@ function queue_run(&$argv, &$argc){
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!poco_reachable($c[0]['url'])) {
|
||||
logger('queue: skipping probably dead url: ' . $c[0]['url']);
|
||||
$server = poco_detect_server($c[0]['url']);
|
||||
|
||||
if (($server != "") AND !in_array($server, $serverlist)) {
|
||||
logger("Check server ".$server." (".$c[0]["network"].")");
|
||||
if (!poco_check_server($server, $c[0]["network"], true))
|
||||
$deadservers[] = $server;
|
||||
|
||||
$serverlist[] = $server;
|
||||
}
|
||||
|
||||
if (($server != "") AND in_array($server, $deadservers)) {
|
||||
logger('queue: skipping known dead server: '.$server);
|
||||
update_queue_time($q_item['id']);
|
||||
continue;
|
||||
}
|
||||
|
@ -166,37 +179,39 @@ function queue_run(&$argv, &$argc){
|
|||
|
||||
switch($contact['network']) {
|
||||
case NETWORK_DFRN:
|
||||
logger('queue: dfrndelivery: item ' . $q_item['id'] . ' for ' . $contact['name']);
|
||||
$deliver_status = dfrn_deliver($owner,$contact,$data);
|
||||
logger('queue: dfrndelivery: item '.$q_item['id'].' for '.$contact['name'].' <'.$contact['url'].'>');
|
||||
$deliver_status = dfrn::deliver($owner,$contact,$data);
|
||||
|
||||
if($deliver_status == (-1)) {
|
||||
update_queue_time($q_item['id']);
|
||||
$deadguys[] = $contact['notify'];
|
||||
}
|
||||
else {
|
||||
} else
|
||||
remove_queue_item($q_item['id']);
|
||||
}
|
||||
|
||||
break;
|
||||
case NETWORK_OSTATUS:
|
||||
if($contact['notify']) {
|
||||
logger('queue: slapdelivery: item ' . $q_item['id'] . ' for ' . $contact['name']);
|
||||
logger('queue: slapdelivery: item '.$q_item['id'].' for '.$contact['name'].' <'.$contact['url'].'>');
|
||||
$deliver_status = slapper($owner,$contact['notify'],$data);
|
||||
|
||||
if($deliver_status == (-1))
|
||||
if($deliver_status == (-1)) {
|
||||
update_queue_time($q_item['id']);
|
||||
else
|
||||
$deadguys[] = $contact['notify'];
|
||||
} else
|
||||
remove_queue_item($q_item['id']);
|
||||
}
|
||||
break;
|
||||
case NETWORK_DIASPORA:
|
||||
if($contact['notify']) {
|
||||
logger('queue: diaspora_delivery: item ' . $q_item['id'] . ' for ' . $contact['name']);
|
||||
logger('queue: diaspora_delivery: item '.$q_item['id'].' for '.$contact['name'].' <'.$contact['url'].'>');
|
||||
$deliver_status = diaspora_transmit($owner,$contact,$data,$public,true);
|
||||
|
||||
if($deliver_status == (-1))
|
||||
if($deliver_status == (-1)) {
|
||||
update_queue_time($q_item['id']);
|
||||
else
|
||||
$deadguys[] = $contact['notify'];
|
||||
} else
|
||||
remove_queue_item($q_item['id']);
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -212,6 +227,7 @@ function queue_run(&$argv, &$argc){
|
|||
break;
|
||||
|
||||
}
|
||||
logger('Deliver status '.$deliver_status.' for item '.$q_item['id'].' to '.$contact['name'].' <'.$contact['url'].'>');
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
|
@ -289,93 +289,25 @@ function poco_check($profile_url, $name, $network, $profile_photo, $about, $loca
|
|||
|
||||
poco_check_server($server_url, $network);
|
||||
|
||||
if(count($x)) {
|
||||
$gcid = $x[0]['id'];
|
||||
$gcontact = array("url" => $profile_url,
|
||||
"addr" => $addr,
|
||||
"alias" => $alias,
|
||||
"name" => $name,
|
||||
"network" => $network,
|
||||
"photo" => $profile_photo,
|
||||
"about" => $about,
|
||||
"location" => $location,
|
||||
"gender" => $gender,
|
||||
"keywords" => $keywords,
|
||||
"server_url" => $server_url,
|
||||
"connect" => $connect_url,
|
||||
"notify" => $notify,
|
||||
"updated" => $updated,
|
||||
"generation" => $generation);
|
||||
|
||||
if (($location == "") AND ($x[0]['location'] != ""))
|
||||
$location = $x[0]['location'];
|
||||
$gcid = update_gcontact($gcontact);
|
||||
|
||||
if (($about == "") AND ($x[0]['about'] != ""))
|
||||
$about = $x[0]['about'];
|
||||
|
||||
if (($gender == "") AND ($x[0]['gender'] != ""))
|
||||
$gender = $x[0]['gender'];
|
||||
|
||||
if (($keywords == "") AND ($x[0]['keywords'] != ""))
|
||||
$keywords = $x[0]['keywords'];
|
||||
|
||||
if (($addr == "") AND ($x[0]['addr'] != ""))
|
||||
$addr = $x[0]['addr'];
|
||||
|
||||
if (($alias == "") AND ($x[0]['alias'] != ""))
|
||||
$alias = $x[0]['alias'];
|
||||
|
||||
if (($notify == "") AND ($x[0]['notify'] != ""))
|
||||
$notify = $x[0]['notify'];
|
||||
|
||||
if (($generation == 0) AND ($x[0]['generation'] > 0))
|
||||
$generation = $x[0]['generation'];
|
||||
|
||||
if($x[0]['name'] != $name || $x[0]['photo'] != $profile_photo || $x[0]['updated'] < $updated) {
|
||||
q("UPDATE `gcontact` SET `name` = '%s', `addr` = '%s', `network` = '%s', `photo` = '%s', `connect` = '%s', `url` = '%s', `server_url` = '%s',
|
||||
`updated` = '%s', `location` = '%s', `about` = '%s', `keywords` = '%s', `gender` = '%s', `generation` = %d,
|
||||
`alias` = '$s', `notify` = '%s'
|
||||
WHERE (`generation` >= %d OR `generation` = 0) AND `nurl` = '%s'",
|
||||
dbesc($name),
|
||||
dbesc($addr),
|
||||
dbesc($network),
|
||||
dbesc($profile_photo),
|
||||
dbesc($connect_url),
|
||||
dbesc($profile_url),
|
||||
dbesc($server_url),
|
||||
dbesc($updated),
|
||||
dbesc($location),
|
||||
dbesc($about),
|
||||
dbesc($keywords),
|
||||
dbesc($gender),
|
||||
dbesc($alias),
|
||||
dbesc($notify),
|
||||
intval($generation),
|
||||
intval($generation),
|
||||
dbesc(normalise_link($profile_url))
|
||||
);
|
||||
}
|
||||
} else {
|
||||
// Maybe another process had inserted the entry after the first check, so it again
|
||||
$x = q("SELECT `id` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1",
|
||||
dbesc(normalise_link($profile_url))
|
||||
);
|
||||
if(!$x) {
|
||||
q("INSERT INTO `gcontact` (`name`, `nick`, `addr`, `network`, `url`, `nurl`, `photo`, `connect`, `server_url`, `created`, `updated`, `location`, `about`, `keywords`, `gender`, `alias`, `notify`, `generation`)
|
||||
VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d)",
|
||||
dbesc($name),
|
||||
dbesc($nick),
|
||||
dbesc($addr),
|
||||
dbesc($network),
|
||||
dbesc($profile_url),
|
||||
dbesc(normalise_link($profile_url)),
|
||||
dbesc($profile_photo),
|
||||
dbesc($connect_url),
|
||||
dbesc($server_url),
|
||||
dbesc(datetime_convert()),
|
||||
dbesc($updated),
|
||||
dbesc($location),
|
||||
dbesc($about),
|
||||
dbesc($keywords),
|
||||
dbesc($gender),
|
||||
dbesc($alias),
|
||||
dbesc($notify),
|
||||
intval($generation)
|
||||
);
|
||||
$x = q("SELECT `id` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1",
|
||||
dbesc(normalise_link($profile_url))
|
||||
);
|
||||
}
|
||||
if(count($x))
|
||||
$gcid = $x[0]['id'];
|
||||
}
|
||||
|
||||
if(! $gcid)
|
||||
if(!$gcid)
|
||||
return $gcid;
|
||||
|
||||
$r = q("SELECT * FROM `glink` WHERE `cid` = %d AND `uid` = %d AND `gcid` = %d AND `zcid` = %d LIMIT 1",
|
||||
|
@ -402,13 +334,6 @@ function poco_check($profile_url, $name, $network, $profile_photo, $about, $loca
|
|||
);
|
||||
}
|
||||
|
||||
// For unknown reasons there are sometimes duplicates
|
||||
//q("DELETE FROM `gcontact` WHERE `nurl` = '%s' AND `id` != %d AND
|
||||
// NOT EXISTS (SELECT `gcid` FROM `glink` WHERE `gcid` = `gcontact`.`id`)",
|
||||
// dbesc(normalise_link($profile_url)),
|
||||
// intval($gcid)
|
||||
//);
|
||||
|
||||
return $gcid;
|
||||
}
|
||||
|
||||
|
@ -721,6 +646,10 @@ function poco_to_boolean($val) {
|
|||
|
||||
function poco_check_server($server_url, $network = "", $force = false) {
|
||||
|
||||
// Unify the server address
|
||||
$server_url = trim($server_url, "/");
|
||||
$server_url = str_replace("/index.php", "", $server_url);
|
||||
|
||||
if ($server_url == "")
|
||||
return false;
|
||||
|
||||
|
@ -792,6 +721,9 @@ function poco_check_server($server_url, $network = "", $force = false) {
|
|||
// Test for Diaspora
|
||||
$serverret = z_fetch_url($server_url);
|
||||
|
||||
if (!$serverret["success"] OR ($serverret["body"] == ""))
|
||||
$failure = true;
|
||||
else {
|
||||
$lines = explode("\n",$serverret["header"]);
|
||||
if(count($lines))
|
||||
foreach($lines as $line) {
|
||||
|
@ -806,6 +738,7 @@ function poco_check_server($server_url, $network = "", $force = false) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$failure) {
|
||||
// Test for Statusnet
|
||||
|
@ -1315,18 +1248,30 @@ function poco_discover_federation() {
|
|||
return;
|
||||
}
|
||||
|
||||
// Discover Friendica, Hubzilla and Diaspora servers
|
||||
$serverdata = fetch_url("http://the-federation.info/pods.json");
|
||||
|
||||
if (!$serverdata)
|
||||
return;
|
||||
|
||||
if ($serverdata) {
|
||||
$servers = json_decode($serverdata);
|
||||
|
||||
foreach($servers->pods AS $server)
|
||||
poco_check_server("https://".$server->host);
|
||||
}
|
||||
|
||||
// Discover GNU Social Servers
|
||||
if (!get_config('system','ostatus_disabled')) {
|
||||
$serverdata = "http://gstools.org/api/get_open_instances/";
|
||||
|
||||
$result = z_fetch_url($serverdata);
|
||||
if ($result["success"]) {
|
||||
$servers = json_decode($result["body"]);
|
||||
|
||||
foreach($servers->data AS $server)
|
||||
poco_check_server($server->instance_address);
|
||||
}
|
||||
}
|
||||
|
||||
set_config('poco','last_federation_discovery', time());
|
||||
|
||||
}
|
||||
|
||||
function poco_discover($complete = false) {
|
||||
|
@ -1520,7 +1465,7 @@ function get_gcontact_id($contact) {
|
|||
if ($contact["network"] == NETWORK_STATUSNET)
|
||||
$contact["network"] = NETWORK_OSTATUS;
|
||||
|
||||
$r = q("SELECT `id` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1",
|
||||
$r = q("SELECT `id` FROM `gcontact` WHERE `nurl` = '%s' ORDER BY `id` LIMIT 2",
|
||||
dbesc(normalise_link($contact["url"])));
|
||||
|
||||
if ($r)
|
||||
|
@ -1542,13 +1487,18 @@ function get_gcontact_id($contact) {
|
|||
intval($contact["generation"])
|
||||
);
|
||||
|
||||
$r = q("SELECT `id` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1",
|
||||
$r = q("SELECT `id` FROM `gcontact` WHERE `nurl` = '%s' ORDER BY `id` LIMIT 2",
|
||||
dbesc(normalise_link($contact["url"])));
|
||||
|
||||
if ($r)
|
||||
$gcontact_id = $r[0]["id"];
|
||||
}
|
||||
|
||||
if ((count($r) > 1) AND ($gcontact_id > 0) AND ($contact["url"] != ""))
|
||||
q("DELETE FROM `gcontact` WHERE `nurl` = '%s' AND `id` != %d",
|
||||
dbesc(normalise_link($contact["url"])),
|
||||
intval($gcontact_id));
|
||||
|
||||
return $gcontact_id;
|
||||
}
|
||||
|
||||
|
@ -1567,78 +1517,55 @@ function update_gcontact($contact) {
|
|||
if (!$gcontact_id)
|
||||
return false;
|
||||
|
||||
$r = q("SELECT `name`, `nick`, `photo`, `location`, `about`, `addr`, `generation`, `birthday`, `gender`, `keywords`, `hide`, `nsfw`, `network`, `alias`, `notify`, `url`
|
||||
$r = q("SELECT `name`, `nick`, `photo`, `location`, `about`, `addr`, `generation`, `birthday`, `gender`, `keywords`,
|
||||
`hide`, `nsfw`, `network`, `alias`, `notify`, `server_url`, `connect`, `updated`, `url`
|
||||
FROM `gcontact` WHERE `id` = %d LIMIT 1",
|
||||
intval($gcontact_id));
|
||||
|
||||
if ($contact["generation"] == 0)
|
||||
$contact["generation"] = $r[0]["generation"];
|
||||
// Get all field names
|
||||
$fields = array();
|
||||
foreach ($r[0] AS $field => $data)
|
||||
$fields[$field] = $data;
|
||||
|
||||
if ($contact["photo"] == "")
|
||||
$contact["photo"] = $r[0]["photo"];
|
||||
unset($fields["url"]);
|
||||
unset($fields["updated"]);
|
||||
|
||||
if ($contact["name"] == "")
|
||||
$contact["name"] = $r[0]["name"];
|
||||
|
||||
if ($contact["nick"] == "")
|
||||
$contact["nick"] = $r[0]["nick"];
|
||||
|
||||
if ($contact["addr"] == "")
|
||||
$contact["addr"] = $r[0]["addr"];
|
||||
|
||||
if ($contact["location"] =="")
|
||||
$contact["location"] = $r[0]["location"];
|
||||
|
||||
if ($contact["about"] =="")
|
||||
$contact["about"] = $r[0]["about"];
|
||||
|
||||
if ($contact["birthday"] =="")
|
||||
$contact["birthday"] = $r[0]["birthday"];
|
||||
|
||||
if ($contact["gender"] =="")
|
||||
$contact["gender"] = $r[0]["gender"];
|
||||
|
||||
if ($contact["keywords"] =="")
|
||||
$contact["keywords"] = $r[0]["keywords"];
|
||||
|
||||
if (!isset($contact["hide"]))
|
||||
$contact["hide"] = $r[0]["hide"];
|
||||
|
||||
if (!isset($contact["nsfw"]))
|
||||
$contact["nsfw"] = $r[0]["nsfw"];
|
||||
|
||||
if ($contact["network"] =="")
|
||||
$contact["network"] = $r[0]["network"];
|
||||
|
||||
if ($contact["alias"] =="")
|
||||
$contact["alias"] = $r[0]["alias"];
|
||||
|
||||
if ($contact["url"] =="")
|
||||
$contact["url"] = $r[0]["url"];
|
||||
|
||||
if ($contact["notify"] =="")
|
||||
$contact["notify"] = $r[0]["notify"];
|
||||
// assign all unassigned fields from the database entry
|
||||
foreach ($fields AS $field => $data)
|
||||
if (!isset($contact[$field]))
|
||||
$contact[$field] = $r[0][$field];
|
||||
|
||||
if ($contact["network"] == NETWORK_STATUSNET)
|
||||
$contact["network"] = NETWORK_OSTATUS;
|
||||
|
||||
if (($contact["photo"] != $r[0]["photo"]) OR ($contact["name"] != $r[0]["name"]) OR ($contact["nick"] != $r[0]["nick"]) OR ($contact["addr"] != $r[0]["addr"]) OR
|
||||
($contact["birthday"] != $r[0]["birthday"]) OR ($contact["gender"] != $r[0]["gender"]) OR ($contact["keywords"] != $r[0]["keywords"]) OR
|
||||
($contact["hide"] != $r[0]["hide"]) OR ($contact["nsfw"] != $r[0]["nsfw"]) OR ($contact["network"] != $r[0]["network"]) OR
|
||||
($contact["alias"] != $r[0]["alias"]) OR ($contact["notify"] != $r[0]["notify"]) OR ($contact["url"] != $r[0]["url"]) OR
|
||||
($contact["location"] != $r[0]["location"]) OR ($contact["about"] != $r[0]["about"]) OR ($contact["generation"] < $r[0]["generation"])) {
|
||||
if (!isset($contact["updated"]))
|
||||
$contact["updated"] = datetime_convert();
|
||||
|
||||
// Check if any field changed
|
||||
$update = false;
|
||||
unset($fields["generation"]);
|
||||
|
||||
foreach ($fields AS $field => $data)
|
||||
if ($contact[$field] != $r[0][$field])
|
||||
$update = true;
|
||||
|
||||
if ($contact["generation"] < $r[0]["generation"])
|
||||
$update = true;
|
||||
|
||||
if ($update) {
|
||||
q("UPDATE `gcontact` SET `photo` = '%s', `name` = '%s', `nick` = '%s', `addr` = '%s', `network` = '%s',
|
||||
`birthday` = '%s', `gender` = '%s', `keywords` = %d, `hide` = %d, `nsfw` = %d,
|
||||
`alias` = '%s', `notify` = '%s', `url` = '%s',
|
||||
`location` = '%s', `about` = '%s', `generation` = %d, `updated` = '%s'
|
||||
`location` = '%s', `about` = '%s', `generation` = %d, `updated` = '%s',
|
||||
`server_url` = '%s', `connect` = '%s'
|
||||
WHERE `nurl` = '%s' AND (`generation` = 0 OR `generation` >= %d)",
|
||||
dbesc($contact["photo"]), dbesc($contact["name"]), dbesc($contact["nick"]),
|
||||
dbesc($contact["addr"]), dbesc($contact["network"]), dbesc($contact["birthday"]),
|
||||
dbesc($contact["gender"]), dbesc($contact["keywords"]), intval($contact["hide"]),
|
||||
intval($contact["nsfw"]), dbesc($contact["alias"]), dbesc($contact["notify"]),
|
||||
dbesc($contact["url"]), dbesc($contact["location"]), dbesc($contact["about"]),
|
||||
intval($contact["generation"]), dbesc(datetime_convert()),
|
||||
intval($contact["generation"]), dbesc($contact["updated"]),
|
||||
dbesc($contact["server_url"]), dbesc($contact["connect"]),
|
||||
dbesc(normalise_link($contact["url"])), intval($contact["generation"]));
|
||||
}
|
||||
|
||||
|
@ -1656,4 +1583,82 @@ function update_gcontact_from_probe($url) {
|
|||
if ($data["network"] != NETWORK_PHANTOM)
|
||||
update_gcontact($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Fetches users of given GNU Social server
|
||||
*
|
||||
* If the "Statistics" plugin is enabled (See http://gstools.org/ for details) we query user data with this.
|
||||
*
|
||||
* @param str $server Server address
|
||||
*/
|
||||
function gs_fetch_users($server) {
|
||||
|
||||
logger("Fetching users from GNU Social server ".$server, LOGGER_DEBUG);
|
||||
|
||||
$a = get_app();
|
||||
|
||||
$url = $server."/main/statistics";
|
||||
|
||||
$result = z_fetch_url($url);
|
||||
if (!$result["success"])
|
||||
return false;
|
||||
|
||||
$statistics = json_decode($result["body"]);
|
||||
|
||||
if (is_object($statistics->config)) {
|
||||
if ($statistics->config->instance_with_ssl)
|
||||
$server = "https://";
|
||||
else
|
||||
$server = "http://";
|
||||
|
||||
$server .= $statistics->config->instance_address;
|
||||
|
||||
$hostname = $statistics->config->instance_address;
|
||||
} else {
|
||||
if ($statistics->instance_with_ssl)
|
||||
$server = "https://";
|
||||
else
|
||||
$server = "http://";
|
||||
|
||||
$server .= $statistics->instance_address;
|
||||
|
||||
$hostname = $statistics->instance_address;
|
||||
}
|
||||
|
||||
if (is_object($statistics->users))
|
||||
foreach ($statistics->users AS $nick => $user) {
|
||||
$profile_url = $server."/".$user->nickname;
|
||||
|
||||
$contact = array("url" => $profile_url,
|
||||
"name" => $user->fullname,
|
||||
"addr" => $user->nickname."@".$hostname,
|
||||
"nick" => $user->nickname,
|
||||
"about" => $user->bio,
|
||||
"network" => NETWORK_OSTATUS,
|
||||
"photo" => $a->get_baseurl()."/images/person-175.jpg");
|
||||
get_gcontact_id($contact);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Asking GNU Social server on a regular base for their user data
|
||||
*
|
||||
*/
|
||||
function gs_discover() {
|
||||
|
||||
$requery_days = intval(get_config("system", "poco_requery_days"));
|
||||
|
||||
$last_update = date("c", time() - (60 * 60 * 24 * $requery_days));
|
||||
|
||||
$r = q("SELECT `nurl`, `url` FROM `gserver` WHERE `last_contact` >= `last_failure` AND `network` = '%s' AND `last_poco_query` < '%s' ORDER BY RAND() LIMIT 5",
|
||||
dbesc(NETWORK_OSTATUS), dbesc($last_update));
|
||||
|
||||
if (!$r)
|
||||
return;
|
||||
|
||||
foreach ($r AS $server) {
|
||||
gs_fetch_users($server["url"]);
|
||||
q("UPDATE `gserver` SET `last_poco_query` = '%s' WHERE `nurl` = '%s'", dbesc(datetime_convert()), dbesc($server["nurl"]));
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -829,35 +829,6 @@ function qp($s) {
|
|||
return str_replace ("%","=",rawurlencode($s));
|
||||
}}
|
||||
|
||||
|
||||
|
||||
if(! function_exists('get_mentions')) {
|
||||
/**
|
||||
* @param array $item
|
||||
* @return string html for mentions #FIXME: remove html
|
||||
*/
|
||||
function get_mentions($item) {
|
||||
$o = '';
|
||||
if(! strlen($item['tag']))
|
||||
return $o;
|
||||
|
||||
$arr = explode(',',$item['tag']);
|
||||
foreach($arr as $x) {
|
||||
$matches = null;
|
||||
if(preg_match('/@\[url=([^\]]*)\]/',$x,$matches)) {
|
||||
$o .= "\t\t" . '<link rel="ostatus:attention" href="' . $matches[1] . '" />' . "\r\n";
|
||||
$o .= "\t\t" . '<link rel="mentioned" href="' . $matches[1] . '" />' . "\r\n";
|
||||
}
|
||||
}
|
||||
|
||||
if (!$item['private']) {
|
||||
$o .= "\t\t".'<link rel="ostatus:attention" href="http://activityschema.org/collection/public"/>'."\r\n";
|
||||
$o .= "\t\t".'<link rel="mentioned" href="http://activityschema.org/collection/public"/>'."\r\n";
|
||||
}
|
||||
|
||||
return $o;
|
||||
}}
|
||||
|
||||
if(! function_exists('contact_block')) {
|
||||
/**
|
||||
* Get html for contact block.
|
||||
|
@ -1533,7 +1504,7 @@ function prepare_body(&$item,$attach = false, $preview = false) {
|
|||
|
||||
$pos = strpos($s, $spoilersearch);
|
||||
$rnd = random_string(8);
|
||||
$spoilerreplace = '<br /> <span id="spoiler-wrap-'.$rnd.'" style="white-space:nowrap;" class="fakelink" onclick="openClose(\'spoiler-'.$rnd.'\');">'.sprintf(t('Click to open/close')).'</span>'.
|
||||
$spoilerreplace = '<br /> <span id="spoiler-wrap-'.$rnd.'" class="spoiler-wrap fakelink" onclick="openClose(\'spoiler-'.$rnd.'\');">'.sprintf(t('Click to open/close')).'</span>'.
|
||||
'<blockquote class="spoiler" id="spoiler-'.$rnd.'" style="display: none;">';
|
||||
$s = substr($s, 0, $pos).$spoilerreplace.substr($s, $pos+strlen($spoilersearch));
|
||||
}
|
||||
|
@ -1545,7 +1516,7 @@ function prepare_body(&$item,$attach = false, $preview = false) {
|
|||
|
||||
$pos = strpos($s, $authorsearch);
|
||||
$rnd = random_string(8);
|
||||
$authorreplace = '<br /> <span id="author-wrap-'.$rnd.'" style="white-space:nowrap;" class="fakelink" onclick="openClose(\'author-'.$rnd.'\');">'.sprintf(t('Click to open/close')).'</span>'.
|
||||
$authorreplace = '<br /> <span id="author-wrap-'.$rnd.'" class="author-wrap fakelink" onclick="openClose(\'author-'.$rnd.'\');">'.sprintf(t('Click to open/close')).'</span>'.
|
||||
'<blockquote class="author" id="author-'.$rnd.'" style="display: block;">';
|
||||
$s = substr($s, 0, $pos).$authorreplace.substr($s, $pos+strlen($authorsearch));
|
||||
}
|
||||
|
@ -1657,54 +1628,6 @@ function get_cats_and_terms($item) {
|
|||
return array($categories, $folders);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(! function_exists('feed_hublinks')) {
|
||||
/**
|
||||
* return atom link elements for all of our hubs
|
||||
* @return string hub link xml elements
|
||||
*/
|
||||
function feed_hublinks() {
|
||||
$a = get_app();
|
||||
$hub = get_config('system','huburl');
|
||||
|
||||
$hubxml = '';
|
||||
if(strlen($hub)) {
|
||||
$hubs = explode(',', $hub);
|
||||
if(count($hubs)) {
|
||||
foreach($hubs as $h) {
|
||||
$h = trim($h);
|
||||
if(! strlen($h))
|
||||
continue;
|
||||
if ($h === '[internal]')
|
||||
$h = z_root() . '/pubsubhubbub';
|
||||
$hubxml .= '<link rel="hub" href="' . xmlify($h) . '" />' . "\n" ;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $hubxml;
|
||||
}}
|
||||
|
||||
|
||||
if(! function_exists('feed_salmonlinks')) {
|
||||
/**
|
||||
* return atom link elements for salmon endpoints
|
||||
* @param string $nick user nickname
|
||||
* @return string salmon link xml elements
|
||||
*/
|
||||
function feed_salmonlinks($nick) {
|
||||
|
||||
$a = get_app();
|
||||
|
||||
$salmon = '<link rel="salmon" href="' . xmlify(z_root() . '/salmon/' . $nick) . '" />' . "\n" ;
|
||||
|
||||
// old style links that status.net still needed as of 12/2010
|
||||
|
||||
$salmon .= ' <link rel="http://salmon-protocol.org/ns/salmon-replies" href="' . xmlify(z_root() . '/salmon/' . $nick) . '" />' . "\n" ;
|
||||
$salmon .= ' <link rel="http://salmon-protocol.org/ns/salmon-mention" href="' . xmlify(z_root() . '/salmon/' . $nick) . '" />' . "\n" ;
|
||||
return $salmon;
|
||||
}}
|
||||
|
||||
if(! function_exists('get_plink')) {
|
||||
/**
|
||||
* get private link for item
|
||||
|
|
|
@ -66,6 +66,7 @@ function add_thread($itemid, $onlyshadow = false) {
|
|||
|
||||
unset($item[0]['id']);
|
||||
$item[0]['uid'] = 0;
|
||||
$item[0]['origin'] = 0;
|
||||
$item[0]['contact-id'] = get_contact($item[0]['author-link'], 0);
|
||||
$public_shadow = item_store($item[0], false, false, true);
|
||||
|
||||
|
|
|
@ -160,7 +160,9 @@
|
|||
'inline' : true,
|
||||
'transition' : 'elastic'
|
||||
});
|
||||
|
||||
$("a.ajax-popupbox").colorbox({
|
||||
'transition' : 'elastic'
|
||||
});
|
||||
|
||||
/* notifications template */
|
||||
var notifications_tpl= unescape($("#nav-notifications-template[rel=template]").html());
|
||||
|
|
|
@ -271,6 +271,7 @@ function admin_page_federation(&$a) {
|
|||
// displayed on the stats page.
|
||||
$platforms = array('Friendica', 'Diaspora', '%%red%%', 'Hubzilla', 'GNU Social', 'StatusNet');
|
||||
$counts = array();
|
||||
$total = 0;
|
||||
|
||||
foreach ($platforms as $p) {
|
||||
// get a total count for the platform, the name and version of the
|
||||
|
@ -278,6 +279,7 @@ function admin_page_federation(&$a) {
|
|||
$c = q('SELECT count(*) AS total, platform, network, version FROM gserver
|
||||
WHERE platform LIKE "%s" AND last_contact > last_failure
|
||||
ORDER BY version ASC;', $p);
|
||||
$total = $total + $c[0]['total'];
|
||||
|
||||
// what versions for that platform do we know at all?
|
||||
// again only the active nodes
|
||||
|
@ -355,7 +357,7 @@ function admin_page_federation(&$a) {
|
|||
'$autoactive' => get_config('system', 'poco_completion'),
|
||||
'$counts' => $counts,
|
||||
'$version' => FRIENDICA_VERSION,
|
||||
'$legendtext' => t('Currently this node is aware of nodes from the following platforms:'),
|
||||
'$legendtext' => sprintf(t('Currently this node is aware of %d nodes from the following platforms:'), $total),
|
||||
'$baseurl' => $a->get_baseurl(),
|
||||
));
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@ function contacts_batch_actions(&$a){
|
|||
}
|
||||
}
|
||||
if ($count_actions>0) {
|
||||
info ( sprintf( tt("%d contact edited.", "%d contacts edited", $count_actions), $count_actions) );
|
||||
info ( sprintf( tt("%d contact edited.", "%d contacts edited.", $count_actions), $count_actions) );
|
||||
}
|
||||
|
||||
if(x($_SESSION,'return_url'))
|
||||
|
@ -293,23 +293,8 @@ function _contact_update_profile($contact_id) {
|
|||
intval(local_user())
|
||||
);
|
||||
|
||||
$photos = import_profile_photo($data['photo'], local_user(), $contact_id);
|
||||
|
||||
$r = q("UPDATE `contact` SET `photo` = '%s',
|
||||
`thumb` = '%s',
|
||||
`micro` = '%s',
|
||||
`name-date` = '%s',
|
||||
`uri-date` = '%s',
|
||||
`avatar-date` = '%s'
|
||||
WHERE `id` = %d",
|
||||
dbesc($data["photo"]),
|
||||
dbesc($photos[1]),
|
||||
dbesc($photos[2]),
|
||||
dbesc(datetime_convert()),
|
||||
dbesc(datetime_convert()),
|
||||
dbesc(datetime_convert()),
|
||||
intval($contact_id)
|
||||
);
|
||||
// Update the entry in the contact table
|
||||
update_contact_avatar($data['photo'], local_user(), $contact_id);
|
||||
|
||||
// Update the entry in the gcontact table
|
||||
update_gcontact_from_probe($data["url"]);
|
||||
|
@ -903,7 +888,10 @@ function contact_posts($a, $contact_id) {
|
|||
|
||||
$o .= $tab_str;
|
||||
|
||||
if ($contact["url"]) {
|
||||
$r = q("SELECT `id` FROM `item` WHERE `contact-id` = %d LIMIT 1", intval($contact_id));
|
||||
if ($r)
|
||||
$o .= posts_from_contact($a, $contact_id);
|
||||
elseif ($contact["url"]) {
|
||||
$r = q("SELECT `id` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1",
|
||||
dbesc(normalise_link($contact["url"])));
|
||||
|
||||
|
|
|
@ -80,24 +80,7 @@ function crepair_post(&$a) {
|
|||
logger('mod-crepair: updating photo from ' . $photo);
|
||||
require_once("include/Photo.php");
|
||||
|
||||
$photos = import_profile_photo($photo,local_user(),$contact['id']);
|
||||
|
||||
$x = q("UPDATE `contact` SET `photo` = '%s',
|
||||
`thumb` = '%s',
|
||||
`micro` = '%s',
|
||||
`name-date` = '%s',
|
||||
`uri-date` = '%s',
|
||||
`avatar-date` = '%s'
|
||||
WHERE `id` = %d
|
||||
",
|
||||
dbesc($photos[0]),
|
||||
dbesc($photos[1]),
|
||||
dbesc($photos[2]),
|
||||
dbesc(datetime_convert()),
|
||||
dbesc(datetime_convert()),
|
||||
dbesc(datetime_convert()),
|
||||
intval($contact['id'])
|
||||
);
|
||||
update_contact_avatar($photo,local_user(),$contact['id']);
|
||||
}
|
||||
|
||||
if($r)
|
||||
|
|
|
@ -315,7 +315,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
|
|||
|
||||
require_once('include/Photo.php');
|
||||
|
||||
$photos = import_profile_photo($contact['photo'],$uid,$contact_id);
|
||||
update_contact_avatar($contact['photo'],$uid,$contact_id);
|
||||
|
||||
logger('dfrn_confirm: confirm - imported photos');
|
||||
|
||||
|
@ -328,27 +328,18 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
|
|||
if(($relation == CONTACT_IS_SHARING) && ($duplex))
|
||||
$duplex = 0;
|
||||
|
||||
$r = q("UPDATE `contact` SET
|
||||
`photo` = '%s',
|
||||
`thumb` = '%s',
|
||||
`micro` = '%s',
|
||||
`rel` = %d,
|
||||
$r = q("UPDATE `contact` SET `rel` = %d,
|
||||
`name-date` = '%s',
|
||||
`uri-date` = '%s',
|
||||
`avatar-date` = '%s',
|
||||
`blocked` = 0,
|
||||
`pending` = 0,
|
||||
`duplex` = %d,
|
||||
`hidden` = %d,
|
||||
`network` = '%s' WHERE `id` = %d
|
||||
",
|
||||
dbesc($photos[0]),
|
||||
dbesc($photos[1]),
|
||||
dbesc($photos[2]),
|
||||
intval($new_relation),
|
||||
dbesc(datetime_convert()),
|
||||
dbesc(datetime_convert()),
|
||||
dbesc(datetime_convert()),
|
||||
intval($duplex),
|
||||
intval($hidden),
|
||||
dbesc(NETWORK_DFRN),
|
||||
|
@ -394,12 +385,8 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
|
|||
);
|
||||
|
||||
|
||||
$r = q("UPDATE `contact` SET `photo` = '%s',
|
||||
`thumb` = '%s',
|
||||
`micro` = '%s',
|
||||
`name-date` = '%s',
|
||||
$r = q("UPDATE `contact` SET `name-date` = '%s',
|
||||
`uri-date` = '%s',
|
||||
`avatar-date` = '%s',
|
||||
`notify` = '%s',
|
||||
`poll` = '%s',
|
||||
`blocked` = 0,
|
||||
|
@ -410,10 +397,6 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
|
|||
`rel` = %d
|
||||
WHERE `id` = %d
|
||||
",
|
||||
dbesc($photos[0]),
|
||||
dbesc($photos[1]),
|
||||
dbesc($photos[2]),
|
||||
dbesc(datetime_convert()),
|
||||
dbesc(datetime_convert()),
|
||||
dbesc(datetime_convert()),
|
||||
dbesc($notify),
|
||||
|
@ -683,7 +666,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
|
|||
|
||||
require_once("include/Photo.php");
|
||||
|
||||
$photos = import_profile_photo($photo,$local_uid,$dfrn_record);
|
||||
update_contact_avatar($photo,$local_uid,$dfrn_record);
|
||||
|
||||
logger('dfrn_confirm: request - photos imported');
|
||||
|
||||
|
@ -695,13 +678,9 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
|
|||
$duplex = 0;
|
||||
|
||||
$r = q("UPDATE `contact` SET
|
||||
`photo` = '%s',
|
||||
`thumb` = '%s',
|
||||
`micro` = '%s',
|
||||
`rel` = %d,
|
||||
`name-date` = '%s',
|
||||
`uri-date` = '%s',
|
||||
`avatar-date` = '%s',
|
||||
`blocked` = 0,
|
||||
`pending` = 0,
|
||||
`duplex` = %d,
|
||||
|
@ -709,13 +688,9 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
|
|||
`prv` = %d,
|
||||
`network` = '%s' WHERE `id` = %d
|
||||
",
|
||||
dbesc($photos[0]),
|
||||
dbesc($photos[1]),
|
||||
dbesc($photos[2]),
|
||||
intval($new_relation),
|
||||
dbesc(datetime_convert()),
|
||||
dbesc(datetime_convert()),
|
||||
dbesc(datetime_convert()),
|
||||
intval($duplex),
|
||||
intval($forum),
|
||||
intval($prv),
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?php
|
||||
|
||||
require_once('library/simplepie/simplepie.inc');
|
||||
require_once('include/items.php');
|
||||
require_once('include/event.php');
|
||||
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
require_once('include/items.php');
|
||||
require_once('include/auth.php');
|
||||
require_once('include/dfrn.php');
|
||||
|
||||
|
||||
function dfrn_poll_init(&$a) {
|
||||
|
@ -46,7 +44,7 @@ function dfrn_poll_init(&$a) {
|
|||
|
||||
logger('dfrn_poll: public feed request from ' . $_SERVER['REMOTE_ADDR'] . ' for ' . $user);
|
||||
header("Content-type: application/atom+xml");
|
||||
echo get_feed_for($a, '', $user,$last_update);
|
||||
echo dfrn::feed('', $user,$last_update);
|
||||
killme();
|
||||
}
|
||||
|
||||
|
@ -373,7 +371,7 @@ function dfrn_poll_post(&$a) {
|
|||
}
|
||||
|
||||
header("Content-type: application/atom+xml");
|
||||
$o = get_feed_for($a,$dfrn_id, $a->argv[1], $last_update, $direction);
|
||||
$o = dfrn::feed($dfrn_id, $a->argv[1], $last_update, $direction);
|
||||
echo $o;
|
||||
killme();
|
||||
|
||||
|
|
|
@ -192,12 +192,19 @@ function display_fetchauthor($a, $item) {
|
|||
$profiledata["photo"] = $r[0]["photo"];
|
||||
$profiledata["nickname"] = $r[0]["nick"];
|
||||
$profiledata["addr"] = $r[0]["addr"];
|
||||
$profiledata["keywords"] = $r[0]["keywords"];
|
||||
$profiledata["network"] = $r[0]["network"];
|
||||
|
||||
if ($r[0]["keywords"])
|
||||
$profiledata["keywords"] = $r[0]["keywords"];
|
||||
|
||||
if ($showdetails) {
|
||||
if ($r[0]["location"])
|
||||
$profiledata["address"] = $r[0]["location"];
|
||||
|
||||
if ($r[0]["about"])
|
||||
$profiledata["about"] = $r[0]["about"];
|
||||
|
||||
if ($r[0]["gender"])
|
||||
$profiledata["gender"] = $r[0]["gender"];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -900,7 +900,7 @@ function item_post(&$a) {
|
|||
|
||||
|
||||
// Store the comment signature information in case we need to relay to Diaspora
|
||||
store_diaspora_comment_sig($datarray, $author, ($self ? $a->user['prvkey'] : false), $parent_item, $post_id);
|
||||
store_diaspora_comment_sig($datarray, $author, ($self ? $user['prvkey'] : false), $parent_item, $post_id);
|
||||
|
||||
} else {
|
||||
$parent = $post_id;
|
||||
|
@ -1271,7 +1271,7 @@ function store_diaspora_comment_sig($datarray, $author, $uprvkey, $parent_item,
|
|||
$signed_text = $datarray['guid'] . ';' . $parent_item['guid'] . ';' . $signed_body . ';' . $diaspora_handle;
|
||||
|
||||
if( $uprvkey !== false )
|
||||
$authorsig = base64_encode(rsa_sign($signed_text,$uprvkey,'sha256'));
|
||||
$authorsig = rsa_sign($signed_text,$uprvkey,'sha256');
|
||||
else
|
||||
$authorsig = '';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
|
||||
require_once("include/Contact.php");
|
||||
|
||||
function profiles_init(&$a) {
|
||||
|
||||
|
@ -482,21 +482,7 @@ function profiles_post(&$a) {
|
|||
}
|
||||
|
||||
if($is_default) {
|
||||
$location = $locality;
|
||||
|
||||
if ($region != "") {
|
||||
if ($location != "")
|
||||
$location .= ", ";
|
||||
|
||||
$location .= $region;
|
||||
}
|
||||
|
||||
if ($country_name != "") {
|
||||
if ($location != "")
|
||||
$location .= ", ";
|
||||
|
||||
$location .= $country_name;
|
||||
}
|
||||
$location = formatted_location(array("locality" => $locality, "region" => $region, "country-name" => $country_name));
|
||||
|
||||
$r = q("UPDATE `contact` SET `about` = '%s', `location` = '%s', `keywords` = '%s', `gender` = '%s' WHERE `self` = 1 AND `uid` = %d",
|
||||
dbesc($about),
|
||||
|
|
|
@ -238,6 +238,10 @@ function proxy_url($url, $writemode = false, $size = "") {
|
|||
|
||||
$a = get_app();
|
||||
|
||||
if (substr($url, 0, strlen('http')) !== 'http') {
|
||||
return($url);
|
||||
}
|
||||
|
||||
// Only continue if it isn't a local image and the isn't deactivated
|
||||
if (proxy_is_local_image($url)) {
|
||||
$url = str_replace(normalise_link($a->get_baseurl())."/", $a->get_baseurl()."/", $url);
|
||||
|
|
|
@ -158,13 +158,18 @@ function wall_upload_post(&$a, $desktopmode = true) {
|
|||
killme();
|
||||
}
|
||||
|
||||
$r = q("select sum(octet_length(data)) as total from photo where uid = %d and scale = 0 and album != 'Contact Photos' ",
|
||||
intval($page_owner_uid)
|
||||
);
|
||||
|
||||
$limit = service_class_fetch($page_owner_uid,'photo_upload_limit');
|
||||
|
||||
if(($limit !== false) && (($r[0]['total'] + strlen($imagedata)) > $limit)) {
|
||||
if ($limit) {
|
||||
$r = q("select sum(octet_length(data)) as total from photo where uid = %d and scale = 0 and album != 'Contact Photos' ",
|
||||
intval($page_owner_uid)
|
||||
);
|
||||
$size = $r[0]['total'];
|
||||
} else
|
||||
$size = 0;
|
||||
|
||||
if(($limit !== false) && (($size + strlen($imagedata)) > $limit)) {
|
||||
$msg = upgrade_message(true);
|
||||
if ($r_json) {
|
||||
echo json_encode(array('error'=>$msg));
|
||||
|
@ -266,6 +271,7 @@ function wall_upload_post(&$a, $desktopmode = true) {
|
|||
return $picture;
|
||||
}
|
||||
|
||||
|
||||
if ($r_json) {
|
||||
echo json_encode(array('ok'=>true));
|
||||
killme();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
define( 'UPDATE_VERSION' , 1193 );
|
||||
define( 'UPDATE_VERSION' , 1194 );
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
711
util/messages.po
711
util/messages.po
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -9,7 +9,7 @@ $a->strings["Network:"] = "Netzwerk";
|
|||
$a->strings["Forum"] = "Forum";
|
||||
$a->strings["%d contact edited."] = array(
|
||||
0 => "%d Kontakt bearbeitet.",
|
||||
1 => "%d Kontakte bearbeitet",
|
||||
1 => "%d Kontakte bearbeitet.",
|
||||
);
|
||||
$a->strings["Could not access contact record."] = "Konnte nicht auf die Kontaktdaten zugreifen.";
|
||||
$a->strings["Could not locate selected profile."] = "Konnte das ausgewählte Profil nicht finden.";
|
||||
|
@ -431,7 +431,7 @@ $a->strings["User registrations waiting for confirmation"] = "Nutzeranmeldungen
|
|||
$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."] = "Diese Seite präsentiert einige Zahlen zu dem bekannten Teil des föderalen sozialen Netzwerks, von dem deine Friendica Installation ein Teil ist. Diese Zahlen sind nicht absolut und reflektieren nur den Teil des Netzwerks, den dein Knoten kennt.";
|
||||
$a->strings["The <em>Auto Discovered Contact Directory</em> feature is not enabled, it will improve the data displayed here."] = "Die Funktion um <em>Automatisch ein Kontaktverzeichnis erstellen</em> ist nicht aktiv. Es wird die hier angezeigten Daten verbessern.";
|
||||
$a->strings["Administration"] = "Administration";
|
||||
$a->strings["Currently this node is aware of nodes from the following platforms:"] = "Momentan kennt dieser Knoten andere Knoten der folgenden Plattformen:";
|
||||
$a->strings["Currently this node is aware of %d nodes from the following platforms:"] = "Momentan kennt dieser Knoten %d andere Knoten der folgenden Plattformen:";
|
||||
$a->strings["ID"] = "ID";
|
||||
$a->strings["Recipient Name"] = "Empfänger Name";
|
||||
$a->strings["Recipient Profile"] = "Empfänger Profil";
|
||||
|
|
3032
view/nl/messages.po
3032
view/nl/messages.po
File diff suppressed because it is too large
Load diff
|
@ -5,9 +5,11 @@ function string_plural_select_nl($n){
|
|||
return ($n != 1);;
|
||||
}}
|
||||
;
|
||||
$a->strings["Network:"] = "Netwerk:";
|
||||
$a->strings["Forum"] = "Forum";
|
||||
$a->strings["%d contact edited."] = array(
|
||||
0 => "",
|
||||
1 => "",
|
||||
0 => "%d contact gewijzigd.",
|
||||
1 => "%d contacten gewijzigd.",
|
||||
);
|
||||
$a->strings["Could not access contact record."] = "Kon geen toegang krijgen tot de contactgegevens";
|
||||
$a->strings["Could not locate selected profile."] = "Kon het geselecteerde profiel niet vinden.";
|
||||
|
@ -33,28 +35,11 @@ $a->strings["(Update was successful)"] = "(Wijziging is geslaagd)";
|
|||
$a->strings["(Update was not successful)"] = "(Wijziging is niet geslaagd)";
|
||||
$a->strings["Suggest friends"] = "Stel vrienden voor";
|
||||
$a->strings["Network type: %s"] = "Netwerk type: %s";
|
||||
$a->strings["%d contact in common"] = array(
|
||||
0 => "%d gedeeld contact",
|
||||
1 => "%d gedeelde contacten",
|
||||
);
|
||||
$a->strings["View all contacts"] = "Alle contacten zien";
|
||||
$a->strings["Unblock"] = "Blokkering opheffen";
|
||||
$a->strings["Block"] = "Blokkeren";
|
||||
$a->strings["Toggle Blocked status"] = "Schakel geblokkeerde status";
|
||||
$a->strings["Unignore"] = "Negeer niet meer";
|
||||
$a->strings["Ignore"] = "Negeren";
|
||||
$a->strings["Toggle Ignored status"] = "Schakel negeerstatus";
|
||||
$a->strings["Unarchive"] = "Archiveer niet meer";
|
||||
$a->strings["Archive"] = "Archiveer";
|
||||
$a->strings["Toggle Archive status"] = "Schakel archiveringsstatus";
|
||||
$a->strings["Repair"] = "Herstellen";
|
||||
$a->strings["Advanced Contact Settings"] = "Geavanceerde instellingen voor contacten";
|
||||
$a->strings["Communications lost with this contact!"] = "Communicatie met dit contact is verbroken!";
|
||||
$a->strings["Fetch further information for feeds"] = "";
|
||||
$a->strings["Disabled"] = "Uitgeschakeld";
|
||||
$a->strings["Fetch information"] = "";
|
||||
$a->strings["Fetch information and keywords"] = "";
|
||||
$a->strings["Contact Editor"] = "Contactbewerker";
|
||||
$a->strings["Submit"] = "Opslaan";
|
||||
$a->strings["Profile Visibility"] = "Zichtbaarheid profiel";
|
||||
$a->strings["Please choose the profile you would like to display to %s when viewing your profile securely."] = "Kies het profiel dat getoond moet worden wanneer %s uw profiel bezoekt. ";
|
||||
|
@ -70,6 +55,10 @@ $a->strings["Last update:"] = "Laatste wijziging:";
|
|||
$a->strings["Update public posts"] = "Openbare posts aanpassen";
|
||||
$a->strings["Update now"] = "Wijzig nu";
|
||||
$a->strings["Connect/Follow"] = "Verbind/Volg";
|
||||
$a->strings["Unblock"] = "Blokkering opheffen";
|
||||
$a->strings["Block"] = "Blokkeren";
|
||||
$a->strings["Unignore"] = "Negeer niet meer";
|
||||
$a->strings["Ignore"] = "Negeren";
|
||||
$a->strings["Currently blocked"] = "Op dit moment geblokkeerd";
|
||||
$a->strings["Currently ignored"] = "Op dit moment genegeerd";
|
||||
$a->strings["Currently archived"] = "Op dit moment gearchiveerd";
|
||||
|
@ -80,6 +69,9 @@ $a->strings["Send a notification of every new post of this contact"] = "";
|
|||
$a->strings["Blacklisted keywords"] = "";
|
||||
$a->strings["Comma separated list of keywords that should not be converted to hashtags, when \"Fetch information and keywords\" is selected"] = "";
|
||||
$a->strings["Profile URL"] = "Profiel url";
|
||||
$a->strings["Location:"] = "Plaats:";
|
||||
$a->strings["About:"] = "Over:";
|
||||
$a->strings["Tags:"] = "Labels:";
|
||||
$a->strings["Suggestions"] = "Voorstellen";
|
||||
$a->strings["Suggest potential friends"] = "Stel vrienden voor";
|
||||
$a->strings["All Contacts"] = "Alle Contacten";
|
||||
|
@ -99,7 +91,21 @@ $a->strings["Search your contacts"] = "Doorzoek je contacten";
|
|||
$a->strings["Finding: "] = "Gevonden:";
|
||||
$a->strings["Find"] = "Zoek";
|
||||
$a->strings["Update"] = "Wijzigen";
|
||||
$a->strings["Archive"] = "Archiveer";
|
||||
$a->strings["Unarchive"] = "Archiveer niet meer";
|
||||
$a->strings["Delete"] = "Verwijder";
|
||||
$a->strings["Status"] = "Tijdlijn";
|
||||
$a->strings["Status Messages and Posts"] = "Berichten op jouw tijdlijn";
|
||||
$a->strings["Profile"] = "Profiel";
|
||||
$a->strings["Profile Details"] = "Profieldetails";
|
||||
$a->strings["View all contacts"] = "Alle contacten zien";
|
||||
$a->strings["Common Friends"] = "Gedeelde Vrienden";
|
||||
$a->strings["View all common friends"] = "";
|
||||
$a->strings["Repair"] = "Herstellen";
|
||||
$a->strings["Advanced Contact Settings"] = "Geavanceerde instellingen voor contacten";
|
||||
$a->strings["Toggle Blocked status"] = "Schakel geblokkeerde status";
|
||||
$a->strings["Toggle Ignored status"] = "Schakel negeerstatus";
|
||||
$a->strings["Toggle Archive status"] = "Schakel archiveringsstatus";
|
||||
$a->strings["Mutual Friendship"] = "Wederzijdse vriendschap";
|
||||
$a->strings["is a fan of yours"] = "Is een fan van jou";
|
||||
$a->strings["you are a fan of"] = "Jij bent een fan van";
|
||||
|
@ -112,7 +118,6 @@ $a->strings["Post successful."] = "Bericht succesvol geplaatst.";
|
|||
$a->strings["Permission denied"] = "Toegang geweigerd";
|
||||
$a->strings["Invalid profile identifier."] = "Ongeldige profiel-identificatie.";
|
||||
$a->strings["Profile Visibility Editor"] = "";
|
||||
$a->strings["Profile"] = "Profiel";
|
||||
$a->strings["Click on a contact to add or remove."] = "Klik op een contact om het toe te voegen of te verwijderen.";
|
||||
$a->strings["Visible To"] = "Zichtbaar voor";
|
||||
$a->strings["All Contacts (with secure profile access)"] = "Alle contacten (met veilige profieltoegang)";
|
||||
|
@ -137,9 +142,6 @@ $a->strings["Edit your <strong>default</strong> profile to your liking. Review t
|
|||
$a->strings["Profile Keywords"] = "Sleutelwoorden voor dit profiel";
|
||||
$a->strings["Set some public keywords for your default profile which describe your interests. We may be able to find other people with similar interests and suggest friendships."] = "Stel enkele openbare sleutelwoorden in voor je standaard profiel die je interesses beschrijven. We kunnen dan misschien mensen vinden met gelijkaardige interesses, en vrienden voorstellen.";
|
||||
$a->strings["Connecting"] = "Verbinding aan het maken";
|
||||
$a->strings["Facebook"] = "Facebook";
|
||||
$a->strings["Authorise the Facebook Connector if you currently have a Facebook account and we will (optionally) import all your Facebook friends and conversations."] = "Machtig de Facebook Connector als je een Facebook account hebt. We zullen (optioneel) al je Facebook vrienden en conversaties importeren.";
|
||||
$a->strings["<em>If</em> this is your own personal server, installing the Facebook addon may ease your transition to the free social web."] = "<em>Als</em> dit jouw eigen persoonlijke server is kan het installeren van de Facebook toevoeging je overgang naar het vrije sociale web vergemakkelijken.";
|
||||
$a->strings["Importing Emails"] = "E-mails importeren";
|
||||
$a->strings["Enter your email access information on your Connector Settings page if you wish to import and interact with friends or mailing lists from your email INBOX"] = "Vul je e-mailtoegangsinformatie in op je pagina met verbindingsinstellingen als je vrienden of mailinglijsten uit je e-mail-inbox wilt importeren, en met hen wilt communiceren";
|
||||
$a->strings["Go to Your Contacts Page"] = "Ga naar je contactenpagina";
|
||||
|
@ -184,7 +186,7 @@ $a->strings["Tag removed"] = "Label verwijderd";
|
|||
$a->strings["Remove Item Tag"] = "Verwijder label van item";
|
||||
$a->strings["Select a tag to remove: "] = "Selecteer een label om te verwijderen: ";
|
||||
$a->strings["Remove"] = "Verwijderen";
|
||||
$a->strings["Subsribing to OStatus contacts"] = "";
|
||||
$a->strings["Subscribing to OStatus contacts"] = "";
|
||||
$a->strings["No contact provided."] = "";
|
||||
$a->strings["Couldn't fetch information for contact."] = "";
|
||||
$a->strings["Couldn't fetch friends for contact."] = "";
|
||||
|
@ -206,9 +208,6 @@ $a->strings["Does %s know you?"] = "Kent %s jou?";
|
|||
$a->strings["No"] = "Nee";
|
||||
$a->strings["Add a personal note:"] = "Voeg een persoonlijke opmerking toe:";
|
||||
$a->strings["Your Identity Address:"] = "Adres van uw identiteit:";
|
||||
$a->strings["Location:"] = "Plaats:";
|
||||
$a->strings["About:"] = "Over:";
|
||||
$a->strings["Tags:"] = "Labels:";
|
||||
$a->strings["Contact added"] = "Contact toegevoegd";
|
||||
$a->strings["Unable to locate original post."] = "Ik kan de originele post niet meer vinden.";
|
||||
$a->strings["Empty post discarded."] = "Lege post weggegooid.";
|
||||
|
@ -229,6 +228,7 @@ $a->strings["Group removed."] = "Groep verwijderd.";
|
|||
$a->strings["Unable to remove group."] = "Niet in staat om groep te verwijderen.";
|
||||
$a->strings["Group Editor"] = "Groepsbewerker";
|
||||
$a->strings["Members"] = "Leden";
|
||||
$a->strings["Group is empty"] = "De groep is leeg";
|
||||
$a->strings["You must be logged in to use addons. "] = "Je moet ingelogd zijn om deze addons te kunnen gebruiken. ";
|
||||
$a->strings["Applications"] = "Toepassingen";
|
||||
$a->strings["No installed applications."] = "Geen toepassingen geïnstalleerd";
|
||||
|
@ -287,17 +287,10 @@ $a->strings["Forgot your Password?"] = "Wachtwoord vergeten?";
|
|||
$a->strings["Enter your email address and submit to have your password reset. Then check your email for further instructions."] = "Voer je e-mailadres in en verstuur het om je wachtwoord opnieuw in te stellen. Kijk dan je e-mail na voor verdere instructies.";
|
||||
$a->strings["Nickname or Email: "] = "Bijnaam of e-mail:";
|
||||
$a->strings["Reset"] = "Opnieuw";
|
||||
$a->strings["event"] = "gebeurtenis";
|
||||
$a->strings["%1\$s likes %2\$s's %3\$s"] = "%1\$s vindt het %3\$s van %2\$s leuk";
|
||||
$a->strings["%1\$s doesn't like %2\$s's %3\$s"] = "%1\$s vindt het %3\$s van %2\$s niet leuk";
|
||||
$a->strings["%1\$s is attending %2\$s's %3\$s"] = "";
|
||||
$a->strings["%1\$s is not attending %2\$s's %3\$s"] = "";
|
||||
$a->strings["%1\$s may attend %2\$s's %3\$s"] = "";
|
||||
$a->strings["{0} wants to be your friend"] = "{0} wilt je vriend worden";
|
||||
$a->strings["{0} sent you a message"] = "{0} stuurde jou een bericht";
|
||||
$a->strings["{0} requested registration"] = "{0} vroeg om zich te registreren";
|
||||
$a->strings["No contacts."] = "Geen contacten.";
|
||||
$a->strings["View Contacts"] = "Bekijk contacten";
|
||||
$a->strings["Invalid request identifier."] = "Ongeldige <em>request identifier</em>.";
|
||||
$a->strings["Discard"] = "Verwerpen";
|
||||
$a->strings["System"] = "Systeem";
|
||||
|
@ -393,7 +386,6 @@ $a->strings["Please use your browser 'Back' button <strong>now</strong> if you a
|
|||
$a->strings["No mirroring"] = "";
|
||||
$a->strings["Mirror as forwarded posting"] = "";
|
||||
$a->strings["Mirror as my own posting"] = "";
|
||||
$a->strings["Repair Contact Settings"] = "Contactinstellingen herstellen";
|
||||
$a->strings["Return to contact editor"] = "Ga terug naar contactbewerker";
|
||||
$a->strings["Refetch contact data"] = "";
|
||||
$a->strings["Name"] = "Naam";
|
||||
|
@ -424,16 +416,22 @@ $a->strings["Site"] = "Website";
|
|||
$a->strings["Users"] = "Gebruiker";
|
||||
$a->strings["Plugins"] = "Plugins";
|
||||
$a->strings["Themes"] = "Thema's";
|
||||
$a->strings["Additional features"] = "Extra functies";
|
||||
$a->strings["DB updates"] = "DB aanpassingen";
|
||||
$a->strings["Inspect Queue"] = "";
|
||||
$a->strings["Federation Statistics"] = "";
|
||||
$a->strings["Logs"] = "Logs";
|
||||
$a->strings["View Logs"] = "";
|
||||
$a->strings["probe address"] = "";
|
||||
$a->strings["check webfinger"] = "";
|
||||
$a->strings["Admin"] = "Beheer";
|
||||
$a->strings["Plugin Features"] = "Plugin Functies";
|
||||
$a->strings["diagnostics"] = "";
|
||||
$a->strings["User registrations waiting for confirmation"] = "Gebruikersregistraties wachten op bevestiging";
|
||||
$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["The <em>Auto Discovered Contact Directory</em> feature is not enabled, it will improve the data displayed here."] = "";
|
||||
$a->strings["Administration"] = "Beheer";
|
||||
$a->strings["Currently this node is aware of nodes from the following platforms:"] = "";
|
||||
$a->strings["ID"] = "ID";
|
||||
$a->strings["Recipient Name"] = "";
|
||||
$a->strings["Recipient Profile"] = "";
|
||||
|
@ -582,6 +580,10 @@ $a->strings["Maximum Load Average"] = "Maximum gemiddelde belasting";
|
|||
$a->strings["Maximum system load before delivery and poll processes are deferred - default 50."] = "Maximum systeembelasting voordat aflever- en poll-processen uitgesteld worden - standaard 50.";
|
||||
$a->strings["Maximum Load Average (Frontend)"] = "";
|
||||
$a->strings["Maximum system load before the frontend quits service - default 50."] = "";
|
||||
$a->strings["Maximum table size for optimization"] = "";
|
||||
$a->strings["Maximum table size (in MB) for the automatic optimization - default 100 MB. Enter -1 to disable it."] = "";
|
||||
$a->strings["Minimum level of fragmentation"] = "";
|
||||
$a->strings["Minimum fragmenation level to start the automatic optimization - default value is 30%."] = "";
|
||||
$a->strings["Periodical check of global contacts"] = "";
|
||||
$a->strings["If enabled, the global contacts are checked periodically for missing or outdated data and the vitality of the contacts and servers."] = "";
|
||||
$a->strings["Days between requery"] = "";
|
||||
|
@ -681,9 +683,11 @@ $a->strings["Toggle"] = "Schakelaar";
|
|||
$a->strings["Author: "] = "Auteur:";
|
||||
$a->strings["Maintainer: "] = "Onderhoud:";
|
||||
$a->strings["Reload active plugins"] = "";
|
||||
$a->strings["There are currently no plugins available on your node. You can find the official plugin repository at %1\$s and might find other interesting plugins in the open plugin registry at %2\$s"] = "";
|
||||
$a->strings["No themes found."] = "Geen thema's gevonden.";
|
||||
$a->strings["Screenshot"] = "Schermafdruk";
|
||||
$a->strings["Reload active themes"] = "";
|
||||
$a->strings["No themes found on the system. They should be paced in %1\$s"] = "";
|
||||
$a->strings["[Experimental]"] = "[Experimenteel]";
|
||||
$a->strings["[Unsupported]"] = "[Niet ondersteund]";
|
||||
$a->strings["Log settings updated."] = "Log instellingen gewijzigd";
|
||||
|
@ -692,11 +696,12 @@ $a->strings["Enable Debugging"] = "";
|
|||
$a->strings["Log file"] = "Logbestand";
|
||||
$a->strings["Must be writable by web server. Relative to your Friendica top-level directory."] = "De webserver moet hier kunnen schrijven. Relatief t.o.v. van de hoogste folder binnen uw Friendica-installatie.";
|
||||
$a->strings["Log level"] = "Log niveau";
|
||||
$a->strings["Close"] = "Afsluiten";
|
||||
$a->strings["FTP Host"] = "FTP Server";
|
||||
$a->strings["FTP Path"] = "FTP Pad";
|
||||
$a->strings["FTP User"] = "FTP Gebruiker";
|
||||
$a->strings["FTP Password"] = "FTP wachtwoord";
|
||||
$a->strings["PHP logging"] = "";
|
||||
$a->strings["To enable logging of PHP errors and warnings you can add the following to the .htconfig.php file of your installation. The filename set in the 'error_log' line is relative to the friendica top-level directory and must be writeable by the web server. The option '1' for 'log_errors' and 'display_errors' is to enable these options, set to '0' to disable them."] = "";
|
||||
$a->strings["Off"] = "Uit";
|
||||
$a->strings["On"] = "Aan";
|
||||
$a->strings["Lock feature %s"] = "";
|
||||
$a->strings["Manage Additional Features"] = "";
|
||||
$a->strings["Search Results For: %s"] = "";
|
||||
$a->strings["Remove term"] = "Verwijder zoekterm";
|
||||
$a->strings["Saved Searches"] = "Opgeslagen zoekopdrachten";
|
||||
|
@ -718,14 +723,10 @@ $a->strings["Warning: This group contains %s member from an insecure network."]
|
|||
);
|
||||
$a->strings["Private messages to this group are at risk of public disclosure."] = "Privéberichten naar deze groep kunnen openbaar gemaakt worden.";
|
||||
$a->strings["No such group"] = "Zo'n groep bestaat niet";
|
||||
$a->strings["Group is empty"] = "De groep is leeg";
|
||||
$a->strings["Group: %s"] = "";
|
||||
$a->strings["Contact: %s"] = "";
|
||||
$a->strings["Private messages to this person are at risk of public disclosure."] = "Privéberichten naar deze persoon kunnen openbaar gemaakt worden.";
|
||||
$a->strings["Invalid contact."] = "Ongeldig contact.";
|
||||
$a->strings["No friends to display."] = "Geen vrienden om te laten zien.";
|
||||
$a->strings["Forum"] = "";
|
||||
$a->strings["Friends of %s"] = "Vrienden van %s";
|
||||
$a->strings["Event can not end before it has started."] = "";
|
||||
$a->strings["Event title and start time are required."] = "Titel en begintijd van de gebeurtenis zijn vereist.";
|
||||
$a->strings["Sun"] = "";
|
||||
|
@ -922,7 +923,6 @@ $a->strings["Not available."] = "Niet beschikbaar";
|
|||
$a->strings["Community"] = "Website";
|
||||
$a->strings["No results."] = "Geen resultaten.";
|
||||
$a->strings["everybody"] = "iedereen";
|
||||
$a->strings["Additional features"] = "Extra functies";
|
||||
$a->strings["Display"] = "Weergave";
|
||||
$a->strings["Social Networks"] = "Sociale netwerken";
|
||||
$a->strings["Delegations"] = "";
|
||||
|
@ -959,8 +959,6 @@ $a->strings["No name"] = "Geen naam";
|
|||
$a->strings["Remove authorization"] = "Verwijder authorisatie";
|
||||
$a->strings["No Plugin settings configured"] = "";
|
||||
$a->strings["Plugin Settings"] = "Plugin Instellingen";
|
||||
$a->strings["Off"] = "Uit";
|
||||
$a->strings["On"] = "Aan";
|
||||
$a->strings["Additional Features"] = "Extra functies";
|
||||
$a->strings["General Social Media Settings"] = "";
|
||||
$a->strings["Disable intelligent shortening"] = "";
|
||||
|
@ -995,7 +993,7 @@ $a->strings["Display Settings"] = "Scherminstellingen";
|
|||
$a->strings["Display Theme:"] = "Schermthema:";
|
||||
$a->strings["Mobile Theme:"] = "Mobiel thema:";
|
||||
$a->strings["Update browser every xx seconds"] = "Browser elke xx seconden verversen";
|
||||
$a->strings["Minimum of 10 seconds, no maximum"] = "Minimum 10 seconden, geen maximum";
|
||||
$a->strings["Minimum of 10 seconds. Enter -1 to disable it."] = "";
|
||||
$a->strings["Number of items to display per page:"] = "Aantal items te tonen per pagina:";
|
||||
$a->strings["Maximum of 100 items"] = "Maximum 100 items";
|
||||
$a->strings["Number of items to display per page when viewed from mobile device:"] = "Aantal items per pagina als je een mobiel toestel gebruikt:";
|
||||
|
@ -1107,12 +1105,12 @@ $a->strings["Friends are advised to please try again in 24 hours."] = "Wij advis
|
|||
$a->strings["Invalid locator"] = "Ongeldige plaatsbepaler";
|
||||
$a->strings["Invalid email address."] = "Geen geldig e-mailadres";
|
||||
$a->strings["This account has not been configured for email. Request failed."] = "Aanvraag mislukt. Dit account is niet geconfigureerd voor e-mail.";
|
||||
$a->strings["Unable to resolve your name at the provided location."] = "Ik kan jouw naam op het opgegeven adres niet vinden.";
|
||||
$a->strings["You have already introduced yourself here."] = "Je hebt jezelf hier al voorgesteld.";
|
||||
$a->strings["Apparently you are already friends with %s."] = "Blijkbaar bent u al bevriend met %s.";
|
||||
$a->strings["Invalid profile URL."] = "Ongeldig profiel adres.";
|
||||
$a->strings["Disallowed profile URL."] = "Niet toegelaten profiel adres.";
|
||||
$a->strings["Your introduction has been sent."] = "Je verzoek is verzonden.";
|
||||
$a->strings["Remote subscription can't be done for your network. Please subscribe directly on your system."] = "";
|
||||
$a->strings["Please login to confirm introduction."] = "Log in om je verzoek te bevestigen.";
|
||||
$a->strings["Incorrect identity currently logged in. Please login to <strong>this</strong> profile."] = "Je huidige identiteit is niet de juiste. Log met <strong>dit</strong> profiel in.";
|
||||
$a->strings["Confirm"] = "Bevestig";
|
||||
|
@ -1128,6 +1126,7 @@ $a->strings["StatusNet/Federated Social Web"] = "StatusNet/Gefedereerde Sociale
|
|||
$a->strings[" - please do not use this form. Instead, enter %s into your Diaspora search bar."] = "- Gebruik niet dit formulier. Vul %s in in je Diaspora zoekbalk.";
|
||||
$a->strings["Registration successful. Please check your email for further instructions."] = "Registratie geslaagd. Kijk je e-mail na voor verdere instructies.";
|
||||
$a->strings["Failed to send email message. Here your accout details:<br> login: %s<br> password: %s<br><br>You can change your password after login."] = "";
|
||||
$a->strings["Registration successful."] = "";
|
||||
$a->strings["Your registration can not be processed."] = "Je registratie kan niet verwerkt worden.";
|
||||
$a->strings["Your registration is pending approval by the site owner."] = "Jouw registratie wacht op goedkeuring van de beheerder.";
|
||||
$a->strings["This site has exceeded the number of allowed daily account registrations. Please try again tomorrow."] = "Deze website heeft het toegelaten dagelijkse aantal registraties overschreden. Probeer morgen opnieuw.";
|
||||
|
@ -1152,8 +1151,6 @@ $a->strings["Only one search per minute is permitted for not logged in users."]
|
|||
$a->strings["Search"] = "Zoeken";
|
||||
$a->strings["Items tagged with: %s"] = "";
|
||||
$a->strings["Search results for: %s"] = "";
|
||||
$a->strings["Age: "] = "Leeftijd:";
|
||||
$a->strings["Gender: "] = "Geslacht:";
|
||||
$a->strings["Status:"] = "Tijdlijn:";
|
||||
$a->strings["Homepage:"] = "Website:";
|
||||
$a->strings["Global Directory"] = "Globale gids";
|
||||
|
@ -1170,7 +1167,6 @@ $a->strings["Potential Delegates"] = "Mogelijke personen waaraan het paginabehee
|
|||
$a->strings["Add"] = "Toevoegen";
|
||||
$a->strings["No entries."] = "Geen gegevens.";
|
||||
$a->strings["No contacts in common."] = "Geen gedeelde contacten.";
|
||||
$a->strings["Common Friends"] = "Gedeelde Vrienden";
|
||||
$a->strings["Export account"] = "Account exporteren";
|
||||
$a->strings["Export your account info and contacts. Use this to make a backup of your account and/or to move it to another server."] = "Je account informatie en contacten exporteren. Gebruik dit om een backup van je account te maken en/of om het te verhuizen naar een andere server.";
|
||||
$a->strings["Export all"] = "Alles exporteren";
|
||||
|
@ -1257,6 +1253,7 @@ $a->strings["Love/romance"] = "Liefde/romance";
|
|||
$a->strings["Work/employment"] = "Werk";
|
||||
$a->strings["School/education"] = "School/opleiding";
|
||||
$a->strings["This is your <strong>public</strong> profile.<br />It <strong>may</strong> be visible to anybody using the internet."] = "Dit is jouw <strong>publiek</strong> profiel.<br />Het <strong>kan</strong> zichtbaar zijn voor iedereen op het internet.";
|
||||
$a->strings["Age: "] = "Leeftijd:";
|
||||
$a->strings["Edit/Manage Profiles"] = "Wijzig/Beheer Profielen";
|
||||
$a->strings["Change profile photo"] = "Profiel foto wijzigen";
|
||||
$a->strings["Create New Profile"] = "Maak nieuw profiel";
|
||||
|
@ -1310,7 +1307,7 @@ $a->strings["poke, prod or do other things to somebody"] = "aanstoten, porren of
|
|||
$a->strings["Recipient"] = "Ontvanger";
|
||||
$a->strings["Choose what you wish to do to recipient"] = "Kies wat je met de ontvanger wil doen";
|
||||
$a->strings["Make this post private"] = "Dit bericht privé maken";
|
||||
$a->strings["Resubsribing to OStatus contacts"] = "";
|
||||
$a->strings["Resubscribing to OStatus contacts"] = "";
|
||||
$a->strings["Error"] = "";
|
||||
$a->strings["Total invitation limit exceeded."] = "Totale uitnodigingslimiet overschreden.";
|
||||
$a->strings["%s : Not a valid email address."] = "%s: Geen geldig e-mailadres.";
|
||||
|
@ -1443,6 +1440,10 @@ $a->strings["All Networks"] = "Alle netwerken";
|
|||
$a->strings["Saved Folders"] = "Bewaarde Mappen";
|
||||
$a->strings["Everything"] = "Alles";
|
||||
$a->strings["Categories"] = "Categorieën";
|
||||
$a->strings["%d contact in common"] = array(
|
||||
0 => "%d gedeeld contact",
|
||||
1 => "%d gedeelde contacten",
|
||||
);
|
||||
$a->strings["General Features"] = "Algemene functies";
|
||||
$a->strings["Multiple Profiles"] = "Meerdere profielen";
|
||||
$a->strings["Ability to create multiple profiles"] = "Mogelijkheid om meerdere profielen aan te maken";
|
||||
|
@ -1458,6 +1459,8 @@ $a->strings["Add/remove mention when a fourm page is selected/deselected in ACL
|
|||
$a->strings["Network Sidebar Widgets"] = "Zijbalkwidgets op netwerkpagina";
|
||||
$a->strings["Search by Date"] = "Zoeken op datum";
|
||||
$a->strings["Ability to select posts by date ranges"] = "Mogelijkheid om berichten te selecteren volgens datumbereik";
|
||||
$a->strings["List Forums"] = "";
|
||||
$a->strings["Enable widget to display the forums your are connected with"] = "";
|
||||
$a->strings["Group Filter"] = "Groepsfilter";
|
||||
$a->strings["Enable widget to display Network posts only from selected group"] = "Sta de widget toe om netwerkberichten te tonen van bepaalde groepen";
|
||||
$a->strings["Network Filter"] = "Netwerkfilter";
|
||||
|
@ -1486,6 +1489,8 @@ $a->strings["Star Posts"] = "Geef berichten een ster";
|
|||
$a->strings["Ability to mark special posts with a star indicator"] = "";
|
||||
$a->strings["Mute Post Notifications"] = "";
|
||||
$a->strings["Ability to mute notifications for a thread"] = "";
|
||||
$a->strings["Advanced Profile Settings"] = "";
|
||||
$a->strings["Show visitors public community forums at the Advanced Profile Page"] = "";
|
||||
$a->strings["Connect URL missing."] = "";
|
||||
$a->strings["This site is not configured to allow communications with other networks."] = "Deze website is niet geconfigureerd voor communicatie met andere netwerken.";
|
||||
$a->strings["No compatible communication protocols or feeds were discovered."] = "Er werden geen compatibele communicatieprotocols of feeds ontdekt.";
|
||||
|
@ -1502,6 +1507,7 @@ $a->strings["A deleted group with this name was revived. Existing item permissio
|
|||
$a->strings["Default privacy group for new contacts"] = "";
|
||||
$a->strings["Everybody"] = "Iedereen";
|
||||
$a->strings["edit"] = "verander";
|
||||
$a->strings["Edit groups"] = "";
|
||||
$a->strings["Edit group"] = "Verander groep";
|
||||
$a->strings["Create a new group"] = "Maak nieuwe groep";
|
||||
$a->strings["Contacts not in any group"] = "";
|
||||
|
@ -1525,10 +1531,10 @@ $a->strings["%s's birthday"] = "%s's verjaardag";
|
|||
$a->strings["Happy Birthday %s"] = "Gefeliciteerd %s";
|
||||
$a->strings["Requested account is not available."] = "Gevraagde account is niet beschikbaar.";
|
||||
$a->strings["Edit profile"] = "Bewerk profiel";
|
||||
$a->strings["Atom feed"] = "";
|
||||
$a->strings["Message"] = "Bericht";
|
||||
$a->strings["Profiles"] = "Profielen";
|
||||
$a->strings["Manage/edit profiles"] = "Beheer/wijzig profielen";
|
||||
$a->strings["Network:"] = "";
|
||||
$a->strings["g A l F d"] = "G l j F";
|
||||
$a->strings["F d"] = "d F";
|
||||
$a->strings["[today]"] = "[vandaag]";
|
||||
|
@ -1552,17 +1558,22 @@ $a->strings["Film/dance/culture/entertainment:"] = "Film/dans/cultuur/ontspannin
|
|||
$a->strings["Love/Romance:"] = "Liefde/romance:";
|
||||
$a->strings["Work/employment:"] = "Werk/beroep:";
|
||||
$a->strings["School/education:"] = "School/opleiding:";
|
||||
$a->strings["Status"] = "Tijdlijn";
|
||||
$a->strings["Status Messages and Posts"] = "Berichten op jouw tijdlijn";
|
||||
$a->strings["Profile Details"] = "Profieldetails";
|
||||
$a->strings["Forums:"] = "";
|
||||
$a->strings["Videos"] = "Video's";
|
||||
$a->strings["Events and Calendar"] = "Gebeurtenissen en kalender";
|
||||
$a->strings["Only You Can See This"] = "Alleen jij kunt dit zien";
|
||||
$a->strings["event"] = "gebeurtenis";
|
||||
$a->strings["%1\$s likes %2\$s's %3\$s"] = "%1\$s vindt het %3\$s van %2\$s leuk";
|
||||
$a->strings["%1\$s doesn't like %2\$s's %3\$s"] = "%1\$s vindt het %3\$s van %2\$s niet leuk";
|
||||
$a->strings["%1\$s is attending %2\$s's %3\$s"] = "";
|
||||
$a->strings["%1\$s is not attending %2\$s's %3\$s"] = "";
|
||||
$a->strings["%1\$s may attend %2\$s's %3\$s"] = "";
|
||||
$a->strings["Post to Email"] = "Verzenden per e-mail";
|
||||
$a->strings["Connectors disabled, since \"%s\" is enabled."] = "";
|
||||
$a->strings["Visible to everybody"] = "Zichtbaar voor iedereen";
|
||||
$a->strings["show"] = "tonen";
|
||||
$a->strings["don't show"] = "niet tonen";
|
||||
$a->strings["Close"] = "Afsluiten";
|
||||
$a->strings["[no subject]"] = "[geen onderwerp]";
|
||||
$a->strings["stopped following"] = "";
|
||||
$a->strings["View Status"] = "Bekijk status";
|
||||
|
@ -1629,6 +1640,8 @@ $a->strings["Undecided"] = array(
|
|||
0 => "",
|
||||
1 => "",
|
||||
);
|
||||
$a->strings["Forums"] = "";
|
||||
$a->strings["External link to forum"] = "";
|
||||
$a->strings["view full size"] = "Volledig formaat";
|
||||
$a->strings["newer"] = "nieuwere berichten";
|
||||
$a->strings["older"] = "oudere berichten";
|
||||
|
@ -1643,9 +1656,9 @@ $a->strings["%d Contact"] = array(
|
|||
0 => "%d contact",
|
||||
1 => "%d contacten",
|
||||
);
|
||||
$a->strings["View Contacts"] = "Bekijk contacten";
|
||||
$a->strings["Full Text"] = "";
|
||||
$a->strings["Tags"] = "";
|
||||
$a->strings["Forums"] = "";
|
||||
$a->strings["poke"] = "aanstoten";
|
||||
$a->strings["poked"] = "aangestoten";
|
||||
$a->strings["ping"] = "ping";
|
||||
|
@ -1690,8 +1703,6 @@ $a->strings["<a href=\"%1\$s\" target=\"_blank\">%2\$s</a> %3\$s"] = "";
|
|||
$a->strings["<span><a href=\"%s\" target=\"_blank\">%s</a> wrote the following <a href=\"%s\" target=\"_blank\">post</a>"] = "";
|
||||
$a->strings["$1 wrote:"] = "$1 schreef:";
|
||||
$a->strings["Encrypted content"] = "Versleutelde inhoud";
|
||||
$a->strings["(no subject)"] = "(geen onderwerp)";
|
||||
$a->strings["noreply"] = "geen reactie";
|
||||
$a->strings["Cannot locate DNS info for database server '%s'"] = "";
|
||||
$a->strings["Unknown | Not categorised"] = "Onbekend | Niet ";
|
||||
$a->strings["Block immediately"] = "Onmiddellijk blokkeren";
|
||||
|
@ -1703,6 +1714,7 @@ $a->strings["Weekly"] = "wekelijks";
|
|||
$a->strings["Monthly"] = "maandelijks";
|
||||
$a->strings["OStatus"] = "OStatus";
|
||||
$a->strings["RSS/Atom"] = "RSS/Atom";
|
||||
$a->strings["Facebook"] = "Facebook";
|
||||
$a->strings["Zot!"] = "Zot!";
|
||||
$a->strings["LinkedIn"] = "Linkedln";
|
||||
$a->strings["XMPP/IM"] = "XMPP/IM";
|
||||
|
@ -1758,15 +1770,9 @@ $a->strings["Manage/edit friends and contacts"] = "Beheer/Wijzig vrienden en con
|
|||
$a->strings["Site setup and configuration"] = "Website opzetten en configureren";
|
||||
$a->strings["Navigation"] = "Navigatie";
|
||||
$a->strings["Site map"] = "Sitemap";
|
||||
$a->strings["User not found."] = "Gebruiker niet gevonden";
|
||||
$a->strings["Daily posting limit of %d posts reached. The post was rejected."] = "";
|
||||
$a->strings["Weekly posting limit of %d posts reached. The post was rejected."] = "";
|
||||
$a->strings["Monthly posting limit of %d posts reached. The post was rejected."] = "";
|
||||
$a->strings["There is no status with this id."] = "Er is geen status met dit kenmerk";
|
||||
$a->strings["There is no conversation with this id."] = "";
|
||||
$a->strings["Invalid item."] = "";
|
||||
$a->strings["Invalid action. "] = "";
|
||||
$a->strings["DB error"] = "";
|
||||
$a->strings["An invitation is required."] = "Een uitnodiging is vereist.";
|
||||
$a->strings["Invitation could not be verified."] = "Uitnodiging kon niet geverifieerd worden.";
|
||||
$a->strings["Invalid OpenID url"] = "Ongeldige OpenID url";
|
||||
|
@ -1789,6 +1795,8 @@ $a->strings["\n\t\tDear %1\$s,\n\t\t\tThank you for registering at %2\$s. Your a
|
|||
$a->strings["\n\t\tThe login details are as follows:\n\t\t\tSite Location:\t%3\$s\n\t\t\tLogin Name:\t%1\$s\n\t\t\tPassword:\t%5\$s\n\n\t\tYou may change your password from your account \"Settings\" page after logging\n\t\tin.\n\n\t\tPlease take a few moments to review the other account settings on that page.\n\n\t\tYou may also wish to add some basic information to your default profile\n\t\t(on the \"Profiles\" page) so that other people can easily find you.\n\n\t\tWe recommend setting your full name, adding a profile photo,\n\t\tadding some profile \"keywords\" (very useful in making new friends) - and\n\t\tperhaps what country you live in; if you do not wish to be more specific\n\t\tthan that.\n\n\t\tWe fully respect your right to privacy, and none of these items are necessary.\n\t\tIf you are new and do not know anybody here, they may help\n\t\tyou to make some new and interesting friends.\n\n\n\t\tThank you and welcome to %2\$s."] = "";
|
||||
$a->strings["Sharing notification from Diaspora network"] = "";
|
||||
$a->strings["Attachments:"] = "Bijlagen:";
|
||||
$a->strings["(no subject)"] = "(geen onderwerp)";
|
||||
$a->strings["noreply"] = "geen reactie";
|
||||
$a->strings["Do you really want to delete this item?"] = "Wil je echt dit item verwijderen?";
|
||||
$a->strings["Archives"] = "Archieven";
|
||||
$a->strings["Male"] = "Man";
|
||||
|
@ -1951,7 +1959,6 @@ $a->strings["Set zoomfactor for Earth Layers"] = "";
|
|||
$a->strings["Show/hide boxes at right-hand column:"] = "";
|
||||
$a->strings["Comma separated list of helper forums"] = "";
|
||||
$a->strings["Set style"] = "";
|
||||
$a->strings["External link to forum"] = "";
|
||||
$a->strings["Quick Start"] = "";
|
||||
$a->strings["greenzero"] = "";
|
||||
$a->strings["purplezero"] = "";
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom"
|
||||
xmlns:thr="http://purl.org/syndication/thread/1.0"
|
||||
xmlns:at="http://purl.org/atompub/tombstones/1.0"
|
||||
xmlns:media="http://purl.org/syndication/atommedia"
|
||||
xmlns:dfrn="http://purl.org/macgirvin/dfrn/1.0"
|
||||
xmlns:as="http://activitystrea.ms/spec/1.0/"
|
||||
xmlns:georss="http://www.georss.org/georss"
|
||||
xmlns:poco="http://portablecontacts.net/spec/1.0"
|
||||
xmlns:ostatus="http://ostatus.org/schema/1.0"
|
||||
xmlns:statusnet="http://status.net/schema/api/1/" >
|
||||
|
||||
<id>{{$feed_id}}</id>
|
||||
<title>{{$feed_title}}</title>
|
||||
<generator uri="http://friendica.com" version="{{$version}}">Friendica</generator>
|
||||
<link rel="license" href="http://creativecommons.org/licenses/by/3.0/" />
|
||||
<link rel="alternate" type="text/html" href="{{$alternatelink}}" />
|
||||
{{$hub}}
|
||||
{{$salmon}}
|
||||
{{$community}}
|
||||
|
||||
<updated>{{$feed_updated}}</updated>
|
||||
|
||||
<dfrn:owner>
|
||||
<name dfrn:updated="{{$namdate}}" >{{$name}}</name>
|
||||
<uri dfrn:updated="{{$uridate}}" >{{$profile_page}}</uri>
|
||||
<link rel="photo" type="image/jpeg" dfrn:updated="{{$picdate}}" media:width="175" media:height="175" href="{{$photo}}" />
|
||||
<link rel="avatar" type="image/jpeg" dfrn:updated="{{$picdate}}" media:width="175" media:height="175" href="{{$photo}}" />
|
||||
{{$birthday}}
|
||||
</dfrn:owner>
|
|
@ -1,31 +0,0 @@
|
|||
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom"
|
||||
xmlns:thr="http://purl.org/syndication/thread/1.0"
|
||||
xmlns:at="http://purl.org/atompub/tombstones/1.0"
|
||||
xmlns:media="http://purl.org/syndication/atommedia"
|
||||
xmlns:dfrn="http://purl.org/macgirvin/dfrn/1.0"
|
||||
xmlns:as="http://activitystrea.ms/spec/1.0/"
|
||||
xmlns:georss="http://www.georss.org/georss"
|
||||
xmlns:poco="http://portablecontacts.net/spec/1.0"
|
||||
xmlns:ostatus="http://ostatus.org/schema/1.0"
|
||||
xmlns:statusnet="http://status.net/schema/api/1/" >
|
||||
|
||||
<id>{{$feed_id}}</id>
|
||||
<title>{{$feed_title}}</title>
|
||||
<generator uri="http://friendica.com" version="{{$version}}">Friendica</generator>
|
||||
<link rel="license" href="http://creativecommons.org/licenses/by/3.0/" />
|
||||
<link rel="alternate" type="text/html" href="{{$alternatelink}}" />
|
||||
{{$hub}}
|
||||
{{$salmon}}
|
||||
{{$community}}
|
||||
|
||||
<updated>{{$feed_updated}}</updated>
|
||||
|
||||
<author>
|
||||
<name dfrn:updated="{{$namdate}}" >{{$name}}</name>
|
||||
<uri dfrn:updated="{{$uridate}}" >{{$profile_page}}</uri>
|
||||
<link rel="photo" type="image/jpeg" dfrn:updated="{{$picdate}}" media:width="175" media:height="175" href="{{$photo}}" />
|
||||
<link rel="avatar" type="image/jpeg" dfrn:updated="{{$picdate}}" media:width="175" media:height="175" href="{{$photo}}" />
|
||||
{{$birthday}}
|
||||
</author>
|
|
@ -1,18 +0,0 @@
|
|||
|
||||
|
||||
<dfrn:mail>
|
||||
|
||||
<dfrn:sender>
|
||||
<dfrn:name>{{$name}}</dfrn:name>
|
||||
<dfrn:uri>{{$profile_page}}</dfrn:uri>
|
||||
<dfrn:avatar>{{$thumb}}</dfrn:avatar>
|
||||
</dfrn:sender>
|
||||
|
||||
<dfrn:id>{{$item_id}}</dfrn:id>
|
||||
<dfrn:in-reply-to>{{$parent_id}}</dfrn:in-reply-to>
|
||||
<dfrn:sentdate>{{$created}}</dfrn:sentdate>
|
||||
<dfrn:subject>{{$subject}}</dfrn:subject>
|
||||
<dfrn:content>{{$content}}</dfrn:content>
|
||||
|
||||
</dfrn:mail>
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
|
||||
|
||||
<dfrn:relocate>
|
||||
|
||||
<dfrn:url>{{$url}}</dfrn:url>
|
||||
<dfrn:name>{{$name}}</dfrn:name>
|
||||
<dfrn:photo>{{$photo}}</dfrn:photo>
|
||||
<dfrn:thumb>{{$thumb}}</dfrn:thumb>
|
||||
<dfrn:micro>{{$micro}}</dfrn:micro>
|
||||
<dfrn:request>{{$request}}</dfrn:request>
|
||||
<dfrn:confirm>{{$confirm}}</dfrn:confirm>
|
||||
<dfrn:notify>{{$notify}}</dfrn:notify>
|
||||
<dfrn:poll>{{$poll}}</dfrn:poll>
|
||||
<dfrn:sitepubkey>{{$sitepubkey}}</dfrn:sitepubkey>
|
||||
|
||||
|
||||
</dfrn:relocate>
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
|
||||
|
||||
<dfrn:suggest>
|
||||
|
||||
<dfrn:url>{{$url}}</dfrn:url>
|
||||
<dfrn:name>{{$name}}</dfrn:name>
|
||||
<dfrn:photo>{{$photo}}</dfrn:photo>
|
||||
<dfrn:request>{{$request}}</dfrn:request>
|
||||
<dfrn:note>{{$note}}</dfrn:note>
|
||||
|
||||
</dfrn:suggest>
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
<div id="event-wrapper" style="display: none;" ><div id="event-title">{{$event_title}}</div>
|
||||
<div id="event-title-end"></div>
|
||||
{{foreach $events as $event}}
|
||||
<div class="event-list" id="event-{{$event.id}}"> <a class="cboxElement" href="events/?id={{$event.id}}">{{$event.title}}</a> - {{$event.date}} </div>
|
||||
<div class="event-list" id="event-{{$event.id}}"> <a class="ajax-popupbox" href="events/?id={{$event.id}}">{{$event.title}}</a> - {{$event.date}} </div>
|
||||
{{/foreach}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
|
|
@ -67,10 +67,23 @@ nav ul {
|
|||
|
||||
@media screen and (max-width: 480px) {
|
||||
.wall-item-container .wall-item-content img,
|
||||
.children .wall-item-container .wall-item-item .wall-item-content img,
|
||||
.wall-item-container .wall-item-content .type-link img.attachment-image, .type-link img.attachment-image, .type-video img.attachment-image {
|
||||
max-width: 200px;
|
||||
}
|
||||
/* fix img width in threaded view - maybe there exists a better possibility to do this
|
||||
maybe this needs also to be done for tablet view*/
|
||||
.children .wall-item-container .wall-item-item .wall-item-content img {
|
||||
max-width: 100%;
|
||||
}
|
||||
iframe {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* the top-nav notfication menu
|
||||
Note: the device needs a min display width of 320px */
|
||||
#nav-notifications-menu {
|
||||
width: 270px;
|
||||
}
|
||||
}
|
||||
|
||||
.wall-item-container.thread_level_2,
|
||||
|
|
|
@ -1800,7 +1800,8 @@ section.minimal {
|
|||
}
|
||||
|
||||
#jot-preview-content {
|
||||
padding-top: 25px;
|
||||
padding-top: 4px;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#jot-preview-content .tread-wrapper {
|
||||
|
|
Loading…
Reference in a new issue