Merge remote-tracking branch 'upstream/develop' into issue-1218

This commit is contained in:
Michael Vogel 2015-01-04 20:21:49 +01:00
commit 003e87b112
9 changed files with 45 additions and 35 deletions

View file

@ -18,7 +18,7 @@ define ( 'FRIENDICA_PLATFORM', 'Friendica');
define ( 'FRIENDICA_CODENAME', 'Ginger');
define ( 'FRIENDICA_VERSION', '3.3.2' );
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
define ( 'DB_UPDATE_VERSION', 1175 );
define ( 'DB_UPDATE_VERSION', 1176 );
define ( 'EOL', "<br />\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );

View file

@ -41,7 +41,9 @@ function bb_attachment($Text, $plaintext = false, $tryoembed = true) {
if ($matches[1] != "")
$title = $matches[1];
$title = htmlentities($title, ENT_QUOTES, 'UTF-8', false);
//$title = htmlentities($title, ENT_QUOTES, 'UTF-8', false);
$title = bbcode(html_entity_decode($title), false, false, true);
$title = str_replace(array("[", "]"), array("&#91;", "&#93;"), $title);
$image = "";
if ($type != "video") {
@ -1171,6 +1173,6 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal
$a->save_timestamp($stamp1, "parser");
return $Text;
return trim($Text);
}
?>

View file

@ -823,6 +823,7 @@ function db_definition() {
"id" => array("type" => "int(11)", "not null" => "1", "extra" => "auto_increment", "primary" => "1"),
"name" => array("type" => "varchar(128)", "not null" => "1", "default" => ""),
"locked" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
"created" => array("type" => "datetime", "default" => "0000-00-00 00:00:00"),
),
"indexes" => array(
"PRIMARY" => array("id"),

View file

@ -2668,14 +2668,14 @@ function item_is_remote_self($contact, &$datarray) {
$datarray2 = $datarray;
logger('remote-self start - Contact '.$contact['url'].' - '.$contact['remote_self'].' Item '.print_r($datarray, true), LOGGER_DEBUG);
if ($contact['remote_self'] == 2) {
$r = q("SELECT `id`,`url`,`name`,`photo`,`network` FROM `contact` WHERE `uid` = %d AND `self`",
$r = q("SELECT `id`,`url`,`name`,`thumb` FROM `contact` WHERE `uid` = %d AND `self`",
intval($contact['uid']));
if (count($r)) {
$datarray['contact-id'] = $r[0]["id"];
$datarray['owner-name'] = $r[0]["name"];
$datarray['owner-link'] = $r[0]["url"];
$datarray['owner-avatar'] = $r[0]["avatar"];
$datarray['owner-avatar'] = $r[0]["thumb"];
$datarray['author-name'] = $datarray['owner-name'];
$datarray['author-link'] = $datarray['owner-link'];

View file

@ -11,20 +11,22 @@ function lock_function($fn_name, $block = true, $wait_sec = 2, $timeout = 30) {
$start = time();
do {
q("LOCK TABLE locks WRITE");
$r = q("SELECT locked FROM locks WHERE name = '%s' LIMIT 1",
q("LOCK TABLE `locks` WRITE");
$r = q("SELECT `locked`, `created` FROM `locks` WHERE `name` = '%s' LIMIT 1",
dbesc($fn_name)
);
if((count($r)) && (! $r[0]['locked'])) {
q("UPDATE locks SET locked = 1 WHERE name = '%s'",
if((count($r)) AND (!$r[0]['locked'] OR (strtotime($r[0]['created']) < time() - 3600))) {
q("UPDATE `locks` SET `locked` = 1, `created` = '%s' WHERE `name` = '%s'",
dbesc(datetime_convert()),
dbesc($fn_name)
);
$got_lock = true;
}
elseif(! $r) { // the Boolean value for count($r) should be equivalent to the Boolean value of $r
q("INSERT INTO locks ( name, locked ) VALUES ( '%s', 1 )",
dbesc($fn_name)
q("INSERT INTO `locks` (`name`, `created`, `locked`) VALUES ('%s', '%s', 1)",
dbesc($fn_name),
dbesc(datetime_convert())
);
$got_lock = true;
}
@ -37,7 +39,7 @@ function lock_function($fn_name, $block = true, $wait_sec = 2, $timeout = 30) {
} while(($block) && (! $got_lock) && ((time() - $start) < $timeout));
logger('lock_function: function ' . $fn_name . ' with blocking = ' . $block . ' got_lock = ' . $got_lock . ' time = ' . (time() - $start), LOGGER_DEBUG);
return $got_lock;
}}
@ -65,7 +67,7 @@ function block_on_function_lock($fn_name, $wait_sec = 2, $timeout = 30) {
if(! function_exists('unlock_function')) {
function unlock_function($fn_name) {
$r = q("UPDATE locks SET locked = 0 WHERE name = '%s'",
$r = q("UPDATE `locks` SET `locked` = 0, `created` = '0000-00-00 00:00:00' WHERE `name` = '%s'",
dbesc($fn_name)
);

View file

@ -20,7 +20,12 @@ class HTML5_Parser
// Cleanup invalid HTML
$doc = new DOMDocument();
@$doc->loadHTML($text);
if (mb_detect_encoding($text, "UTF-8", true) == "UTF-8")
@$doc->loadHTML('<?xml encoding="UTF-8" ?>'.$text);
else
@$doc->loadHTML($text);
$text = $doc->saveHTML();
$tokenizer = new HTML5_Tokenizer($text, $builder);

View file

@ -1,6 +1,6 @@
<?php
define( 'UPDATE_VERSION' , 1175 );
define( 'UPDATE_VERSION' , 1176 );
/**
*

View file

@ -9,7 +9,7 @@
# Lionel Triay <zapimax38@free.fr>, 2013
# Marquis_de_Carabas <olivier@free-beer.ch>, 2012
# Olivier <olivier+transifex@migeot.org>, 2011-2012
# Sylvain Lagacé, 2014
# Sylvain Lagacé, 2014-2015
# tomamplius <thomas@lgy.fr>, 2014
# Tubuntu <tubuntu@testimonium.be>, 2013-2014
msgid ""
@ -17,7 +17,7 @@ msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-10-22 10:05+0200\n"
"PO-Revision-Date: 2014-12-30 15:30+0000\n"
"PO-Revision-Date: 2015-01-02 00:18+0000\n"
"Last-Translator: Sylvain Lagacé\n"
"Language-Team: French (http://www.transifex.com/projects/p/friendica/language/fr/)\n"
"MIME-Version: 1.0\n"
@ -3194,7 +3194,7 @@ msgstr "Fichier du compte"
msgid ""
"To export your account, go to \"Settings->Export your personal data\" and "
"select \"Export account\""
msgstr ""
msgstr "Pour exporter votre compte, allez dans \"Paramètres> Exporter vos données personnelles\" et sélectionnez \"exportation de compte\""
#: ../../mod/subthread.php:103
#, php-format
@ -3829,11 +3829,11 @@ msgstr ""
#: ../../mod/settings.php:966
msgid "User Types"
msgstr ""
msgstr "Types d'utilisateurs"
#: ../../mod/settings.php:967
msgid "Community Types"
msgstr ""
msgstr "Genre de communautés"
#: ../../mod/settings.php:968
msgid "Normal Account Page"
@ -4247,7 +4247,7 @@ msgstr "%1$s a mis à jour son %2$s, en modifiant %3$s."
#: ../../mod/profiles.php:617
msgid "Hide contacts and friends:"
msgstr ""
msgstr "Cacher mes contacts et amis:"
#: ../../mod/profiles.php:622
msgid "Hide your contact/friend list from viewers of this profile?"
@ -4279,23 +4279,23 @@ msgstr "Supprimer ce profil"
#: ../../mod/profiles.php:651
msgid "Basic information"
msgstr ""
msgstr "Information de base"
#: ../../mod/profiles.php:652
msgid "Profile picture"
msgstr ""
msgstr "Image de profil"
#: ../../mod/profiles.php:654
msgid "Preferences"
msgstr ""
msgstr "Préférences"
#: ../../mod/profiles.php:655
msgid "Status information"
msgstr ""
msgstr "Information sur le statut"
#: ../../mod/profiles.php:656
msgid "Additional information"
msgstr ""
msgstr "Information additionnelle"
#: ../../mod/profiles.php:659
msgid "Profile Name:"

View file

@ -707,7 +707,7 @@ $a->strings["You can import an account from another Friendica server."] = "Vous
$a->strings["You need to export your account from the old server and upload it here. We will recreate your old account here with all your contacts. We will try also to inform your friends that you moved here."] = "Vous devez exporter votre compte à partir de l'ancien serveur et le téléverser ici. Nous recréerons votre ancien compte ici avec tous vos contacts. Nous tenterons également d'informer vos amis que vous avez déménagé ici.";
$a->strings["This feature is experimental. We can't import contacts from the OStatus network (statusnet/identi.ca) or from Diaspora"] = "Cette fonctionnalité est expérimentale. Nous ne pouvons importer les contacts des réseaux OStatus (statusnet/identi.ca) ou Diaspora";
$a->strings["Account file"] = "Fichier du compte";
$a->strings["To export your account, go to \"Settings->Export your personal data\" and select \"Export account\""] = "";
$a->strings["To export your account, go to \"Settings->Export your personal data\" and select \"Export account\""] = "Pour exporter votre compte, allez dans \"Paramètres> Exporter vos données personnelles\" et sélectionnez \"exportation de compte\"";
$a->strings["%1\$s is following %2\$s's %3\$s"] = "%1\$s suit les %3\$s de %2\$s";
$a->strings["Friends of %s"] = "Amis de %s";
$a->strings["No friends to display."] = "Pas d'amis à afficher.";
@ -847,8 +847,8 @@ $a->strings["Don't show emoticons"] = "Ne pas afficher les émoticônes (smileys
$a->strings["Don't show notices"] = "Ne plus afficher les avis";
$a->strings["Infinite scroll"] = "Défilement infini";
$a->strings["Automatic updates only at the top of the network page"] = "";
$a->strings["User Types"] = "";
$a->strings["Community Types"] = "";
$a->strings["User Types"] = "Types d'utilisateurs";
$a->strings["Community Types"] = "Genre de communautés";
$a->strings["Normal Account Page"] = "Compte normal";
$a->strings["This account is a normal personal profile"] = "Ce compte correspond à un profil normal, pour une seule personne (physique, généralement)";
$a->strings["Soapbox Page"] = "Compte \"boîte à savon\"";
@ -950,7 +950,7 @@ $a->strings["public profile"] = "profil public";
$a->strings["%1\$s changed %2\$s to &ldquo;%3\$s&rdquo;"] = "%1\$s a changé %2\$s en &ldquo;%3\$s&rdquo;";
$a->strings[" - Visit %1\$s's %2\$s"] = "Visiter le %2\$s de %1\$s";
$a->strings["%1\$s has an updated %2\$s, changing %3\$s."] = "%1\$s a mis à jour son %2\$s, en modifiant %3\$s.";
$a->strings["Hide contacts and friends:"] = "";
$a->strings["Hide contacts and friends:"] = "Cacher mes contacts et amis:";
$a->strings["Hide your contact/friend list from viewers of this profile?"] = "Cacher ma liste d'amis/contacts des visiteurs de ce profil?";
$a->strings["Edit Profile Details"] = "Éditer les détails du profil";
$a->strings["Change Profile Photo"] = "Changer la photo du profil";
@ -958,11 +958,11 @@ $a->strings["View this profile"] = "Voir ce profil";
$a->strings["Create a new profile using these settings"] = "Créer un nouveau profil en utilisant ces réglages";
$a->strings["Clone this profile"] = "Cloner ce profil";
$a->strings["Delete this profile"] = "Supprimer ce profil";
$a->strings["Basic information"] = "";
$a->strings["Profile picture"] = "";
$a->strings["Preferences"] = "";
$a->strings["Status information"] = "";
$a->strings["Additional information"] = "";
$a->strings["Basic information"] = "Information de base";
$a->strings["Profile picture"] = "Image de profil";
$a->strings["Preferences"] = "Préférences";
$a->strings["Status information"] = "Information sur le statut";
$a->strings["Additional information"] = "Information additionnelle";
$a->strings["Profile Name:"] = "Nom du profil:";
$a->strings["Your Full Name:"] = "Votre nom complet:";
$a->strings["Title/Description:"] = "Titre/Description:";