Merge branch 'master' into develop

This commit is contained in:
Tobias Diekershoff 2019-01-21 10:04:26 +01:00
commit 08206fdcc0
29 changed files with 135 additions and 133 deletions

View file

@ -52,10 +52,6 @@ use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\ServerRequestInterface;
use Symfony\Component\ExpressionLanguage; use Symfony\Component\ExpressionLanguage;
require_once 'boot.php';
require_once 'include/conversation.php';
require_once 'include/dba.php';
require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php'; require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
function advancedcontentfilter_install() function advancedcontentfilter_install()

View file

@ -5,6 +5,7 @@
# #
# Translators: # Translators:
# Marie Olive <lacellule101@gmail.com>, 2018 # Marie Olive <lacellule101@gmail.com>, 2018
# vladimir N <lapoubelle111@gmail.com>, 2018
# #
#, fuzzy #, fuzzy
msgid "" msgid ""
@ -13,7 +14,7 @@ msgstr ""
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-04-17 04:04+0200\n" "POT-Creation-Date: 2018-04-17 04:04+0200\n"
"PO-Revision-Date: 2018-05-24 06:41+0000\n" "PO-Revision-Date: 2018-05-24 06:41+0000\n"
"Last-Translator: Marie Olive <lacellule101@gmail.com>, 2018\n" "Last-Translator: vladimir N <lapoubelle111@gmail.com>, 2018\n"
"Language-Team: French (https://www.transifex.com/Friendica/teams/12172/fr/)\n" "Language-Team: French (https://www.transifex.com/Friendica/teams/12172/fr/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
@ -24,7 +25,7 @@ msgstr ""
#: advancedcontentfilter.php:134 #: advancedcontentfilter.php:134
#, php-format #, php-format
msgid "Filtered by rule: %s" msgid "Filtered by rule: %s"
msgstr "Filtrer par règle:%s" msgstr "Filtré par règle:%s"
#: advancedcontentfilter.php:147 advancedcontentfilter.php:204 #: advancedcontentfilter.php:147 advancedcontentfilter.php:204
msgid "Advanced Content Filter" msgid "Advanced Content Filter"
@ -49,6 +50,10 @@ msgid ""
"For a complete reference of the available operations and variables, check " "For a complete reference of the available operations and variables, check "
"the <a href=\"advancedcontentfilter/help\">help page</a>." "the <a href=\"advancedcontentfilter/help\">help page</a>."
msgstr "" msgstr ""
"Dans cet écran, ajoutez et gérez votre règle personnelle de filtre de "
"contenu. Les règles portent un nom et contiennent une expression arbitraire "
"qui sera appliquée aux données du post. Pour une liste complète des "
"opérations disponibles, voyez la page d'aide"
#: advancedcontentfilter.php:208 #: advancedcontentfilter.php:208
msgid "Your rules" msgid "Your rules"
@ -59,58 +64,60 @@ msgid ""
"You have no rules yet! Start adding one by clicking on the button above next" "You have no rules yet! Start adding one by clicking on the button above next"
" to the title." " to the title."
msgstr "" msgstr ""
"Vous n'avez encore aucune règle! Ajoutez-en une en cliquant le bouton au-"
"dessus près du titre"
#: advancedcontentfilter.php:210 #: advancedcontentfilter.php:210
msgid "Disabled" msgid "Disabled"
msgstr "" msgstr "Désactivé"
#: advancedcontentfilter.php:211 #: advancedcontentfilter.php:211
msgid "Enabled" msgid "Enabled"
msgstr "" msgstr "Activé"
#: advancedcontentfilter.php:212 #: advancedcontentfilter.php:212
msgid "Disable this rule" msgid "Disable this rule"
msgstr "" msgstr "Désactiver cette règle"
#: advancedcontentfilter.php:213 #: advancedcontentfilter.php:213
msgid "Enable this rule" msgid "Enable this rule"
msgstr "" msgstr "Activer cette règle"
#: advancedcontentfilter.php:214 #: advancedcontentfilter.php:214
msgid "Edit this rule" msgid "Edit this rule"
msgstr "" msgstr "Modifier cette règle"
#: advancedcontentfilter.php:215 #: advancedcontentfilter.php:215
msgid "Edit the rule" msgid "Edit the rule"
msgstr "" msgstr "Modifier la règle"
#: advancedcontentfilter.php:216 #: advancedcontentfilter.php:216
msgid "Save this rule" msgid "Save this rule"
msgstr "" msgstr "Enregistrer cette règle"
#: advancedcontentfilter.php:217 #: advancedcontentfilter.php:217
msgid "Delete this rule" msgid "Delete this rule"
msgstr "" msgstr "Supprimer cette règle"
#: advancedcontentfilter.php:218 #: advancedcontentfilter.php:218
msgid "Rule" msgid "Rule"
msgstr "" msgstr "Règle"
#: advancedcontentfilter.php:219 #: advancedcontentfilter.php:219
msgid "Close" msgid "Close"
msgstr "" msgstr "Fermer"
#: advancedcontentfilter.php:220 #: advancedcontentfilter.php:220
msgid "Add new rule" msgid "Add new rule"
msgstr "" msgstr "Ajouter nouvelle règle"
#: advancedcontentfilter.php:221 #: advancedcontentfilter.php:221
msgid "Rule Name" msgid "Rule Name"
msgstr "" msgstr "Nommer règle"
#: advancedcontentfilter.php:222 #: advancedcontentfilter.php:222
msgid "Rule Expression" msgid "Rule Expression"
msgstr "" msgstr "Expression de règle"
#: advancedcontentfilter.php:223 #: advancedcontentfilter.php:223
msgid "" msgid ""
@ -120,42 +127,42 @@ msgstr ""
#: advancedcontentfilter.php:224 #: advancedcontentfilter.php:224
msgid "Cancel" msgid "Cancel"
msgstr "" msgstr "Annuler"
#: advancedcontentfilter.php:290 advancedcontentfilter.php:301 #: advancedcontentfilter.php:290 advancedcontentfilter.php:301
#: advancedcontentfilter.php:312 advancedcontentfilter.php:346 #: advancedcontentfilter.php:312 advancedcontentfilter.php:346
#: advancedcontentfilter.php:375 advancedcontentfilter.php:396 #: advancedcontentfilter.php:375 advancedcontentfilter.php:396
msgid "You must be logged in to use this method" msgid "You must be logged in to use this method"
msgstr "" msgstr "Vous devez être connecté pour utiliser cette méthode"
#: advancedcontentfilter.php:316 advancedcontentfilter.php:350 #: advancedcontentfilter.php:316 advancedcontentfilter.php:350
#: advancedcontentfilter.php:379 #: advancedcontentfilter.php:379
msgid "Invalid form security token, please refresh the page." msgid "Invalid form security token, please refresh the page."
msgstr "" msgstr "Formulaire token de sécurité invalide, rafraîchissez la page"
#: advancedcontentfilter.php:328 #: advancedcontentfilter.php:328
msgid "The rule name and expression are required." msgid "The rule name and expression are required."
msgstr "" msgstr "Le nom et l'expression de cette règle sont requis"
#: advancedcontentfilter.php:340 #: advancedcontentfilter.php:340
msgid "Rule successfully added" msgid "Rule successfully added"
msgstr "" msgstr "Règle bien ajoutée"
#: advancedcontentfilter.php:354 advancedcontentfilter.php:383 #: advancedcontentfilter.php:354 advancedcontentfilter.php:383
msgid "Rule doesn't exist or doesn't belong to you." msgid "Rule doesn't exist or doesn't belong to you."
msgstr "" msgstr "Cette règle n'existe pas ou ne vous appartient pas"
#: advancedcontentfilter.php:369 #: advancedcontentfilter.php:369
msgid "Rule successfully updated" msgid "Rule successfully updated"
msgstr "" msgstr "Règle bien mise à jour"
#: advancedcontentfilter.php:390 #: advancedcontentfilter.php:390
msgid "Rule successfully deleted" msgid "Rule successfully deleted"
msgstr "" msgstr "Règle bien supprimée"
#: advancedcontentfilter.php:400 #: advancedcontentfilter.php:400
msgid "Missing argument: guid." msgid "Missing argument: guid."
msgstr "" msgstr "Argument manquant: "
#: advancedcontentfilter.php:406 #: advancedcontentfilter.php:406
#, php-format #, php-format
@ -164,4 +171,4 @@ msgstr ""
#: src/middlewares.php:28 #: src/middlewares.php:28
msgid "Method not found" msgid "Method not found"
msgstr "" msgstr "Méthode non trouvée"

View file

@ -6,36 +6,36 @@ function string_plural_select_fr($n){
return ($n > 1);; return ($n > 1);;
}} }}
; ;
$a->strings["Filtered by rule: %s"] = "Filtrer par règle:%s"; $a->strings["Filtered by rule: %s"] = "Filtré par règle:%s";
$a->strings["Advanced Content Filter"] = "Filtre avancé de contenu"; $a->strings["Advanced Content Filter"] = "Filtre avancé de contenu";
$a->strings["Back to Addon Settings"] = "Retour aux paramètres de l'extension"; $a->strings["Back to Addon Settings"] = "Retour aux paramètres de l'extension";
$a->strings["Add a Rule"] = "Ajouter une règle"; $a->strings["Add a Rule"] = "Ajouter une règle";
$a->strings["Help"] = "Aide"; $a->strings["Help"] = "Aide";
$a->strings["Add and manage your personal content filter rules in this screen. Rules have a name and an arbitrary expression that will be matched against post data. For a complete reference of the available operations and variables, check the <a href=\"advancedcontentfilter/help\">help page</a>."] = ""; $a->strings["Add and manage your personal content filter rules in this screen. Rules have a name and an arbitrary expression that will be matched against post data. For a complete reference of the available operations and variables, check the <a href=\"advancedcontentfilter/help\">help page</a>."] = "Dans cet écran, ajoutez et gérez votre règle personnelle de filtre de contenu. Les règles portent un nom et contiennent une expression arbitraire qui sera appliquée aux données du post. Pour une liste complète des opérations disponibles, voyez la page d'aide";
$a->strings["Your rules"] = "Vos règles"; $a->strings["Your rules"] = "Vos règles";
$a->strings["You have no rules yet! Start adding one by clicking on the button above next to the title."] = ""; $a->strings["You have no rules yet! Start adding one by clicking on the button above next to the title."] = "Vous n'avez encore aucune règle! Ajoutez-en une en cliquant le bouton au-dessus près du titre";
$a->strings["Disabled"] = ""; $a->strings["Disabled"] = "Désactivé";
$a->strings["Enabled"] = ""; $a->strings["Enabled"] = "Activé";
$a->strings["Disable this rule"] = ""; $a->strings["Disable this rule"] = "Désactiver cette règle";
$a->strings["Enable this rule"] = ""; $a->strings["Enable this rule"] = "Activer cette règle";
$a->strings["Edit this rule"] = ""; $a->strings["Edit this rule"] = "Modifier cette règle";
$a->strings["Edit the rule"] = ""; $a->strings["Edit the rule"] = "Modifier la règle";
$a->strings["Save this rule"] = ""; $a->strings["Save this rule"] = "Enregistrer cette règle";
$a->strings["Delete this rule"] = ""; $a->strings["Delete this rule"] = "Supprimer cette règle";
$a->strings["Rule"] = ""; $a->strings["Rule"] = "Règle";
$a->strings["Close"] = ""; $a->strings["Close"] = "Fermer";
$a->strings["Add new rule"] = ""; $a->strings["Add new rule"] = "Ajouter nouvelle règle";
$a->strings["Rule Name"] = ""; $a->strings["Rule Name"] = "Nommer règle";
$a->strings["Rule Expression"] = ""; $a->strings["Rule Expression"] = "Expression de règle";
$a->strings["<p>Examples:</p><ul><li><pre>author_link == 'https://friendica.mrpetovan.com/profile/hypolite'</pre></li><li>tags</li></ul>"] = ""; $a->strings["<p>Examples:</p><ul><li><pre>author_link == 'https://friendica.mrpetovan.com/profile/hypolite'</pre></li><li>tags</li></ul>"] = "";
$a->strings["Cancel"] = ""; $a->strings["Cancel"] = "Annuler";
$a->strings["You must be logged in to use this method"] = ""; $a->strings["You must be logged in to use this method"] = "Vous devez être connecté pour utiliser cette méthode";
$a->strings["Invalid form security token, please refresh the page."] = ""; $a->strings["Invalid form security token, please refresh the page."] = "Formulaire token de sécurité invalide, rafraîchissez la page";
$a->strings["The rule name and expression are required."] = ""; $a->strings["The rule name and expression are required."] = "Le nom et l'expression de cette règle sont requis";
$a->strings["Rule successfully added"] = ""; $a->strings["Rule successfully added"] = "Règle bien ajoutée";
$a->strings["Rule doesn't exist or doesn't belong to you."] = ""; $a->strings["Rule doesn't exist or doesn't belong to you."] = "Cette règle n'existe pas ou ne vous appartient pas";
$a->strings["Rule successfully updated"] = ""; $a->strings["Rule successfully updated"] = "Règle bien mise à jour";
$a->strings["Rule successfully deleted"] = ""; $a->strings["Rule successfully deleted"] = "Règle bien supprimée";
$a->strings["Missing argument: guid."] = ""; $a->strings["Missing argument: guid."] = "Argument manquant: ";
$a->strings["Unknown post with guid: %s"] = ""; $a->strings["Unknown post with guid: %s"] = "";
$a->strings["Method not found"] = ""; $a->strings["Method not found"] = "Méthode non trouvée";

View file

@ -3,7 +3,7 @@
<div id="rules"></div> <div id="rules"></div>
<script> <script>
var existingRules = {{$rules}}; var existingRules = {{$rules nofilter}};
var messages = { var messages = {
{{foreach $messages as $key => $value}} {{foreach $messages as $key => $value}}

View file

@ -6,13 +6,14 @@
# Translators: # Translators:
# Damien Goutte-Gattat <damien+transifex@incenp.org>, 2015 # Damien Goutte-Gattat <damien+transifex@incenp.org>, 2015
# Hypolite Petovan <hypolite@mrpetovan.com>, 2016 # Hypolite Petovan <hypolite@mrpetovan.com>, 2016
# vladimir N <lapoubelle111@gmail.com>, 2018
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: friendica\n" "Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-22 13:18+0200\n" "POT-Creation-Date: 2014-06-22 13:18+0200\n"
"PO-Revision-Date: 2016-09-24 02:13+0000\n" "PO-Revision-Date: 2018-12-30 12:31+0000\n"
"Last-Translator: Hypolite Petovan <hypolite@mrpetovan.com>\n" "Last-Translator: vladimir N <lapoubelle111@gmail.com>\n"
"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n" "Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
@ -26,7 +27,7 @@ msgstr "Sauvegarder les paramètres"
#: blackout.php:100 #: blackout.php:100
msgid "Redirect URL" msgid "Redirect URL"
msgstr "Adresse de redirection" msgstr "Adresse URL de redirection"
#: blackout.php:100 #: blackout.php:100
msgid "all your visitors from the web will be redirected to this URL" msgid "all your visitors from the web will be redirected to this URL"

View file

@ -2,11 +2,12 @@
if(! function_exists("string_plural_select_fr")) { if(! function_exists("string_plural_select_fr")) {
function string_plural_select_fr($n){ function string_plural_select_fr($n){
$n = intval($n);
return ($n > 1);; return ($n > 1);;
}} }}
; ;
$a->strings["Save Settings"] = "Sauvegarder les paramètres"; $a->strings["Save Settings"] = "Sauvegarder les paramètres";
$a->strings["Redirect URL"] = "Adresse de redirection"; $a->strings["Redirect URL"] = "Adresse URL de redirection";
$a->strings["all your visitors from the web will be redirected to this URL"] = "Tous vos visiteurs venant du web seront redirigés vers cette URL."; $a->strings["all your visitors from the web will be redirected to this URL"] = "Tous vos visiteurs venant du web seront redirigés vers cette URL.";
$a->strings["Begin of the Blackout"] = "Début du blackout"; $a->strings["Begin of the Blackout"] = "Début du blackout";
$a->strings["format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute"] = "Le format est <em>YYYY</em> année, <em>MM</em> mois, <em>DD</em> jour, <em>hh</em> heure and <em>mm</em> minute"; $a->strings["format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute"] = "Le format est <em>YYYY</em> année, <em>MM</em> mois, <em>DD</em> jour, <em>hh</em> heure and <em>mm</em> minute";

View file

@ -7,13 +7,14 @@
# Hypolite Petovan <hypolite@mrpetovan.com>, 2016 # Hypolite Petovan <hypolite@mrpetovan.com>, 2016
# Marie Olive <lacellule101@gmail.com>, 2018 # Marie Olive <lacellule101@gmail.com>, 2018
# StefOfficiel <pichard.stephane@free.fr>, 2015 # StefOfficiel <pichard.stephane@free.fr>, 2015
# vladimir N <lapoubelle111@gmail.com>, 2018
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: friendica\n" "Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-08-17 10:23+0200\n" "POT-Creation-Date: 2018-08-17 10:23+0200\n"
"PO-Revision-Date: 2018-11-13 12:55+0000\n" "PO-Revision-Date: 2018-12-30 12:33+0000\n"
"Last-Translator: Marie Olive <lacellule101@gmail.com>\n" "Last-Translator: vladimir N <lapoubelle111@gmail.com>\n"
"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n" "Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
@ -23,7 +24,7 @@ msgstr ""
#: blockem.php:54 blockem.php:58 #: blockem.php:54 blockem.php:58
msgid "Blockem" msgid "Blockem"
msgstr "Blockem" msgstr "Bloquez-les"
#: blockem.php:62 #: blockem.php:62
msgid "" msgid ""
@ -41,7 +42,7 @@ msgstr "Sauvegarder les paramètres"
#: blockem.php:81 #: blockem.php:81
msgid "BLOCKEM Settings saved." msgid "BLOCKEM Settings saved."
msgstr "Paramètres Blockem sauvegardés." msgstr "Paramètres Bloquez-les sauvegardés."
#: blockem.php:143 #: blockem.php:143
#, php-format #, php-format

View file

@ -1,2 +1,17 @@
<?php <?php
if(! function_exists("string_plural_select_fr")) {
function string_plural_select_fr($n){
$n = intval($n);
return ($n > 1);;
}}
;
$a->strings["Blockem"] = "Bloquez-les";
$a->strings["Hides user's content by collapsing posts. Also replaces their avatar with generic image."] = "Cache le contenu de l'utilisateur en contractant les publications. Remplace aussi leur avatar par une image générique.";
$a->strings["Comma separated profile URLS:"] = "URLs de profil séparées par des virgules:";
$a->strings["Save Settings"] = "Sauvegarder les paramètres";
$a->strings["BLOCKEM Settings saved."] = "Paramètres Bloquez-les sauvegardés.";
$a->strings["Filtered user: %s"] = "Utilisateur filtré:%s";
$a->strings["Unblock Author"] = "Débloquer l'Auteur";
$a->strings["Block Author"] = "Bloquer l'Auteur";
$a->strings["blockem settings updated"] = "Réglages Blockem mis à jour.";

View file

@ -1,7 +1,7 @@
<?php <?php
/** /**
* Name: Buffer Post Connector * Name: Buffer Post Connector
* Description: Post to Buffer (Facebook, Google+, LinkedIn, Twitter) * Description: Post to Buffer (Facebook Pages, LinkedIn, Twitter)
* Version: 0.2 * Version: 0.2
* Author: Michael Vogel <http://pirati.ca/profile/heluecht> * Author: Michael Vogel <http://pirati.ca/profile/heluecht>
*/ */

View file

@ -9,8 +9,6 @@
* *
*/ */
require_once 'include/text.php';
use Friendica\App; use Friendica\App;
use Friendica\Core\Cache; use Friendica\Core\Cache;
use Friendica\Core\Config; use Friendica\Core\Config;

View file

@ -20,10 +20,6 @@ use Friendica\Model\Profile;
use Friendica\Util\Strings; use Friendica\Util\Strings;
use Friendica\Util\Temporal; use Friendica\Util\Temporal;
require_once 'boot.php';
require_once 'include/dba.php';
require_once 'include/text.php';
function forumdirectory_install() function forumdirectory_install()
{ {
Hook::register('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu'); Hook::register('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu');

View file

@ -36,7 +36,7 @@
</div> </div>
</div> </div>
<div class="forumdirectory-copy-wrapper" id="forumdirectory-copy-wrapper-{{$id}}" > <div class="forumdirectory-copy-wrapper" id="forumdirectory-copy-wrapper-{{$id}}" >
{{if $about}}<dl class="forumdirectory-copy"><dt class="forumdirectory-copy-label">{{$about}}</dt><dd class="forumdirectory-copy-data">{{$profile.about}}</dd></dl>{{/if}} {{if $about}}<dl class="forumdirectory-copy"><dt class="forumdirectory-copy-label">{{$about}}</dt><dd class="forumdirectory-copy-data">{{$profile.about nofilter}}</dd></dl>{{/if}}
</div> </div>
</div> </div>
</div> </div>

View file

@ -4,7 +4,7 @@
* Description: Imports posts from a Google+ account and repeats them * Description: Imports posts from a Google+ account and repeats them
* Version: 0.1 * Version: 0.1
* Author: Michael Vogel <ike@piratenpartei.de> * Author: Michael Vogel <ike@piratenpartei.de>
* * Status: unsupported
*/ */
define('FROMGPLUS_DEFAULT_POLL_INTERVAL', 30); // given in minutes define('FROMGPLUS_DEFAULT_POLL_INTERVAL', 30); // given in minutes
@ -23,8 +23,6 @@ use Friendica\Model\Item;
require_once 'mod/share.php'; require_once 'mod/share.php';
require_once 'mod/parse_url.php'; require_once 'mod/parse_url.php';
require_once 'include/text.php';
function fromgplus_install() { function fromgplus_install() {
Hook::register('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings'); Hook::register('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
Hook::register('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post'); Hook::register('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
@ -320,8 +318,6 @@ function fromgplus_cleantext($text) {
} }
function fromgplus_handleattachments($a, $uid, $item, $displaytext, $shared) { function fromgplus_handleattachments($a, $uid, $item, $displaytext, $shared) {
require_once 'include/items.php';
$post = ""; $post = "";
$quote = ""; $quote = "";
$pagedata = []; $pagedata = [];

View file

@ -7,9 +7,6 @@
* Author: Michael Vogel <https://pirati.ca/profile/heluecht> * Author: Michael Vogel <https://pirati.ca/profile/heluecht>
*/ */
require_once 'mod/item.php'; require_once 'mod/item.php';
require_once 'include/items.php';
require_once 'include/text.php';
use Friendica\App; use Friendica\App;
use Friendica\Core\Hook; use Friendica\Core\Hook;
use Friendica\Core\L10n; use Friendica\Core\L10n;
@ -168,7 +165,7 @@ function ifttt_post(App $a)
function ifttt_message($uid, $item) function ifttt_message($uid, $item)
{ {
$a = get_app(); $a = \get_app();
$_SESSION['authenticated'] = true; $_SESSION['authenticated'] = true;
$_SESSION['uid'] = $uid; $_SESSION['uid'] = $uid;

View file

@ -33,7 +33,7 @@ function impressum_uninstall() {
function impressum_module() { function impressum_module() {
} }
function impressum_content() { function impressum_content() {
$a = get_app(); $a = \get_app();
$a->internalRedirect('friendica/'); $a->internalRedirect('friendica/');
} }

View file

@ -203,8 +203,8 @@ function jappixmini_init()
exit(); exit();
} }
$encrypt_func = openssl_public_encrypt; $encrypt_func = 'openssl_public_encrypt';
$decrypt_func = openssl_public_decrypt; $decrypt_func = 'openssl_public_decrypt';
$key = $r[0]["pubkey"]; $key = $r[0]["pubkey"];
} else if ($role == "prv") { } else if ($role == "prv") {
$r = q("SELECT * FROM `contact` WHERE LENGTH(`prvkey`) AND `issued-id`='%s' LIMIT 1", DBA::escape($dfrn_id)); $r = q("SELECT * FROM `contact` WHERE LENGTH(`prvkey`) AND `issued-id`='%s' LIMIT 1", DBA::escape($dfrn_id));
@ -212,8 +212,8 @@ function jappixmini_init()
exit(); exit();
} }
$encrypt_func = openssl_private_encrypt; $encrypt_func = 'openssl_private_encrypt';
$decrypt_func = openssl_private_decrypt; $decrypt_func = 'openssl_private_decrypt';
$key = $r[0]["prvkey"]; $key = $r[0]["prvkey"];
} else { } else {
exit(); exit();
@ -606,14 +606,14 @@ function jappixmini_cron(App $a, $d)
$dfrn_id = $contact_row["dfrn-id"]; $dfrn_id = $contact_row["dfrn-id"];
if ($dfrn_id) { if ($dfrn_id) {
$key = $contact_row["pubkey"]; $key = $contact_row["pubkey"];
$encrypt_func = openssl_public_encrypt; $encrypt_func = 'openssl_public_encrypt';
$decrypt_func = openssl_public_decrypt; $decrypt_func = 'openssl_public_decrypt';
$role = "prv"; $role = "prv";
} else { } else {
$dfrn_id = $contact_row["issued-id"]; $dfrn_id = $contact_row["issued-id"];
$key = $contact_row["prvkey"]; $key = $contact_row["prvkey"];
$encrypt_func = openssl_private_encrypt; $encrypt_func = 'openssl_private_encrypt';
$decrypt_func = openssl_private_decrypt; $decrypt_func = 'openssl_private_decrypt';
$role = "pub"; $role = "pub";
} }
@ -666,7 +666,7 @@ function jappixmini_cron(App $a, $d)
// parse answer // parse answer
$answer = json_decode($answer_json); $answer = json_decode($answer_json);
if ($answer->status != "ok") { if (empty($answer->status) || ($answer->status != "ok")) {
throw new Exception(); throw new Exception();
} }

View file

@ -0,0 +1,16 @@
Leistungsschutzrecht Addon
==========================
Main author Michael Vogel
This addon handles legal problems with the German link tax, named "Leistungsschutzrecht" by shortening preview texts.
Additionally it is possibly to suppress preview pictures completely to avoid any legal problems.
## configuration
If you want to suppress pictures in previews, add this to your global `config/addon.config.php`:
'leistungsschutzrecht' => [
'suppress_photos' => true,
],

View file

@ -24,22 +24,24 @@ function leistungsschutzrecht_uninstall() {
} }
function leistungsschutzrecht_getsiteinfo($a, &$siteinfo) { function leistungsschutzrecht_getsiteinfo($a, &$siteinfo) {
if (!isset($siteinfo["url"])) { if (!isset($siteinfo["url"]) || empty($siteinfo['type'])) {
return; return;
} }
// Avoid any third party pictures, to avoid copyright issues
if (!in_array($siteinfo['type'], ['photo', 'video']) && Config::get('leistungsschutzrecht', 'suppress_photos', false)) {
unset($siteinfo["image"]);
unset($siteinfo["images"]);
}
if (!leistungsschutzrecht_is_member_site($siteinfo["url"])) { if (!leistungsschutzrecht_is_member_site($siteinfo["url"])) {
return; return;
} }
//$siteinfo["title"] = $siteinfo["url"];
if (!empty($siteinfo["text"])) { if (!empty($siteinfo["text"])) {
$siteinfo["text"] = leistungsschutzrecht_cuttext($siteinfo["text"]); $siteinfo["text"] = leistungsschutzrecht_cuttext($siteinfo["text"]);
} }
unset($siteinfo["image"]);
unset($siteinfo["images"]);
unset($siteinfo["keywords"]); unset($siteinfo["keywords"]);
} }

View file

@ -3,7 +3,7 @@
* DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
* *
*}} *}}
<div class="mailstream-item-body">{{$item.body}}</div> <div class="mailstream-item-body">{{$item.body nofilter}}</div>
{{if $item.plink}} {{if $item.plink}}
<div>{{$upstream}}: <a class="mailstream-item-plink" href="{{$item.plink}}">{{$item.plink}}</a><div> <div>{{$upstream}}: <a class="mailstream-item-plink" href="{{$item.plink}}">{{$item.plink}}</a><div>
<div>{{$local}}: <a class="mailstream-item-url" href="{{$item.url}}">{{$item.url}}</a></div> <div>{{$local}}: <a class="mailstream-item-url" href="{{$item.url}}">{{$item.url}}</a></div>

View file

@ -6,7 +6,7 @@
<span class="fakelink" onclick="openClose('settings_mathjax_expanded'); openClose('settings_mathjax_inflated');"> <span class="fakelink" onclick="openClose('settings_mathjax_expanded'); openClose('settings_mathjax_inflated');">
<h3>{{$title}}</h3> <h3>{{$title}}</h3>
</span> </span>
<p>{{$description}}</p> <p>{{$description nofilter}}</p>
{{include file="field_checkbox.tpl" field=$mathjax_use}} {{include file="field_checkbox.tpl" field=$mathjax_use}}
<div class="clear"></div> <div class="clear"></div>

View file

@ -59,7 +59,6 @@ function public_server_cron($a, $b)
{ {
Logger::log("public_server: cron start"); Logger::log("public_server: cron start");
require_once('include/enotify.php');
$r = q("SELECT * FROM `user` WHERE `account_expires_on` < UTC_TIMESTAMP() + INTERVAL 5 DAY AND $r = q("SELECT * FROM `user` WHERE `account_expires_on` < UTC_TIMESTAMP() + INTERVAL 5 DAY AND
`account_expires_on` > '%s' AND `account_expires_on` > '%s' AND
`expire_notification_sent` <= '%s'", `expire_notification_sent` <= '%s'",

View file

@ -30,7 +30,6 @@ use Friendica\Util\XML;
require 'addon/pumpio/oauth/http.php'; require 'addon/pumpio/oauth/http.php';
require 'addon/pumpio/oauth/oauth_client.php'; require 'addon/pumpio/oauth/oauth_client.php';
require_once 'include/enotify.php';
require_once "mod/share.php"; require_once "mod/share.php";
define('PUMPIO_DEFAULT_POLL_INTERVAL', 5); // given in minutes define('PUMPIO_DEFAULT_POLL_INTERVAL', 5); // given in minutes

View file

@ -16,8 +16,8 @@
{{include file="field_textarea.tpl" field=$publickey}} {{include file="field_textarea.tpl" field=$publickey}}
<div class="form-group pull-right settings-submit-wrapper" > <div class="form-group pull-right settings-submit-wrapper" >
<button type="submit" name="securemail-submit" class="btn btn-primary" value="{{$submit|escape:'html'}}">{{$submit}}</button> <button type="submit" name="securemail-submit" class="btn btn-primary" value="{{$submit}}">{{$submit}}</button>
<button type="submit" name="securemail-submit" class="btn btn-default" value="{{$test|escape:'html'}}">{{$test}}</button> <button type="submit" name="securemail-submit" class="btn btn-default" value="{{$test}}">{{$test}}</button>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
</div> </div>

View file

@ -36,8 +36,6 @@
define('STATUSNET_DEFAULT_POLL_INTERVAL', 5); // given in minutes define('STATUSNET_DEFAULT_POLL_INTERVAL', 5); // given in minutes
require_once __DIR__ . DIRECTORY_SEPARATOR . 'library' . DIRECTORY_SEPARATOR . 'statusnetoauth.php'; require_once __DIR__ . DIRECTORY_SEPARATOR . 'library' . DIRECTORY_SEPARATOR . 'statusnetoauth.php';
require_once 'include/enotify.php';
use CodebirdSN\CodebirdSN; use CodebirdSN\CodebirdSN;
use Friendica\App; use Friendica\App;
use Friendica\Content\OEmbed; use Friendica\Content\OEmbed;
@ -827,8 +825,6 @@ function statusnet_fetchtimeline(App $a, $uid)
$lastid = PConfig::get($uid, 'statusnet', 'lastid'); $lastid = PConfig::get($uid, 'statusnet', 'lastid');
require_once 'mod/item.php'; require_once 'mod/item.php';
require_once 'include/items.php';
// get the application name for the SN app // get the application name for the SN app
// 1st try personal config, then system config and fallback to the // 1st try personal config, then system config and fallback to the
// hostname of the node if neither one is set. // hostname of the node if neither one is set.
@ -1254,8 +1250,6 @@ function statusnet_fetchhometimeline(App $a, $uid, $mode = 1)
Logger::log("statusnet_fetchhometimeline: Fetching for user " . $uid, Logger::DEBUG); Logger::log("statusnet_fetchhometimeline: Fetching for user " . $uid, Logger::DEBUG);
require_once 'include/items.php';
$connection = new StatusNetOAuth($api, $ckey, $csecret, $otoken, $osecret); $connection = new StatusNetOAuth($api, $ckey, $csecret, $otoken, $osecret);
$own_contact = statusnet_fetch_own_contact($a, $uid); $own_contact = statusnet_fetch_own_contact($a, $uid);
@ -1441,8 +1435,6 @@ function statusnet_complete_conversation(App $a, $uid, $self, $create_user, $nic
function statusnet_convertmsg(App $a, $body, $no_tags = false) function statusnet_convertmsg(App $a, $body, $no_tags = false)
{ {
require_once "include/items.php";
$body = preg_replace("=\[url\=https?://([0-9]*).([0-9]*).([0-9]*).([0-9]*)/([0-9]*)\](.*?)\[\/url\]=ism", "$1.$2.$3.$4/$5", $body); $body = preg_replace("=\[url\=https?://([0-9]*).([0-9]*).([0-9]*).([0-9]*)/([0-9]*)\](.*?)\[\/url\]=ism", "$1.$2.$3.$4/$5", $body);
$URLSearchString = "^\[\]"; $URLSearchString = "^\[\]";

View file

@ -61,8 +61,6 @@ function testdrive_register_account($a,$b) {
function testdrive_cron($a,$b) { function testdrive_cron($a,$b) {
require_once('include/enotify.php');
$r = q("select * from user where account_expires_on < UTC_TIMESTAMP() + INTERVAL 5 DAY and $r = q("select * from user where account_expires_on < UTC_TIMESTAMP() + INTERVAL 5 DAY and
expire_notification_sent = '0000-00-00 00:00:00' "); expire_notification_sent = '0000-00-00 00:00:00' ");

View file

@ -90,11 +90,6 @@ use Friendica\Util\DateTimeFormat;
use Friendica\Util\Network; use Friendica\Util\Network;
use Friendica\Util\Strings; use Friendica\Util\Strings;
require_once 'boot.php';
require_once 'include/dba.php';
require_once 'include/enotify.php';
require_once 'include/text.php';
require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php'; require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
define('TWITTER_DEFAULT_POLL_INTERVAL', 5); // given in minutes define('TWITTER_DEFAULT_POLL_INTERVAL', 5); // given in minutes
@ -804,8 +799,6 @@ function twitter_expire(App $a)
} }
DBA::close($r); DBA::close($r);
require_once "include/items.php";
Logger::log('twitter_expire: expire_start'); Logger::log('twitter_expire: expire_start');
$r = q("SELECT * FROM `pconfig` WHERE `cat` = 'twitter' AND `k` = 'import' AND `v` = '1' ORDER BY RAND()"); $r = q("SELECT * FROM `pconfig` WHERE `cat` = 'twitter' AND `k` = 'import' AND `v` = '1' ORDER BY RAND()");
@ -935,7 +928,6 @@ function twitter_fetchtimeline(App $a, $uid)
$has_picture = false; $has_picture = false;
require_once 'mod/item.php'; require_once 'mod/item.php';
require_once 'include/items.php';
require_once 'mod/share.php'; require_once 'mod/share.php';
$connection = new TwitterOAuth($ckey, $csecret, $otoken, $osecret); $connection = new TwitterOAuth($ckey, $csecret, $otoken, $osecret);
@ -1229,9 +1221,11 @@ function twitter_expand_entities(App $a, $body, $item, $picture)
continue; continue;
} }
$expanded_url = Network::finalUrl($url->expanded_url); $expanded_url = $url->expanded_url;
$oembed_data = OEmbed::fetchURL($expanded_url); $final_url = Network::finalUrl($url->expanded_url);
$oembed_data = OEmbed::fetchURL($final_url);
if (empty($oembed_data) || empty($oembed_data->type)) { if (empty($oembed_data) || empty($oembed_data->type)) {
continue; continue;
@ -1257,7 +1251,7 @@ function twitter_expand_entities(App $a, $body, $item, $picture)
} elseif ($oembed_data->type != 'link') { } elseif ($oembed_data->type != 'link') {
$body = str_replace($url->url, '[url=' . $expanded_url . ']' . $url->display_url . '[/url]', $body); $body = str_replace($url->url, '[url=' . $expanded_url . ']' . $url->display_url . '[/url]', $body);
} else { } else {
$img_str = Network::fetchUrl($expanded_url, true, $redirects, 4); $img_str = Network::fetchUrl($final_url, true, $redirects, 4);
$tempfile = tempnam(get_temppath(), 'cache'); $tempfile = tempnam(get_temppath(), 'cache');
file_put_contents($tempfile, $img_str); file_put_contents($tempfile, $img_str);
@ -1273,7 +1267,7 @@ function twitter_expand_entities(App $a, $body, $item, $picture)
if (substr($mime, 0, 6) == 'image/') { if (substr($mime, 0, 6) == 'image/') {
$type = 'photo'; $type = 'photo';
$body = str_replace($url->url, '[img]' . $expanded_url . '[/img]', $body); $body = str_replace($url->url, '[img]' . $final_url . '[/img]', $body);
} else { } else {
$type = $oembed_data->type; $type = $oembed_data->type;
$footerurl = $expanded_url; $footerurl = $expanded_url;
@ -1663,8 +1657,6 @@ function twitter_fetchhometimeline(App $a, $uid)
$application_name = $a->getHostName(); $application_name = $a->getHostName();
} }
require_once 'include/items.php';
$connection = new TwitterOAuth($ckey, $csecret, $otoken, $osecret); $connection = new TwitterOAuth($ckey, $csecret, $otoken, $osecret);
try { try {

View file

@ -52,8 +52,6 @@ function like_widget_content(&$a, $conf){
$dislikes = $r[0]['c']; $dislikes = $r[0]['c'];
require_once("include/conversation.php");
$o = ""; $o = "";
# $t = file_get_contents( dirname(__file__). "/widget_like.tpl" ); # $t = file_get_contents( dirname(__file__). "/widget_like.tpl" );

View file

@ -77,7 +77,7 @@ function widgets_module() {
} }
function _abs_url($s){ function _abs_url($s){
$a = get_app(); $a = \get_app();
return preg_replace("|href=(['\"])([^h][^t][^t][^p])|", "href=\$1".$a->getBaseURL()."/\$2", $s); return preg_replace("|href=(['\"])([^h][^t][^t][^p])|", "href=\$1".$a->getBaseURL()."/\$2", $s);
} }

View file

@ -147,19 +147,17 @@ function wppost_settings(&$a,&$s) {
function wppost_settings_post(&$a,&$b) { function wppost_settings_post(&$a,&$b) {
if(!empty($_POST['wppost-submit'])) { if(!empty($_POST['wppost-submit'])) {
PConfig::set(local_user(),'wppost','post',intval($_POST['wppost'])); PConfig::set(local_user(),'wppost','post',intval($_POST['wppost']));
PConfig::set(local_user(),'wppost','post_by_default',intval($_POST['wp_bydefault'])); PConfig::set(local_user(),'wppost','post_by_default',intval(defaults($_POST, 'wp_bydefault', false)));
PConfig::set(local_user(),'wppost','wp_username',trim($_POST['wp_username'])); PConfig::set(local_user(),'wppost','wp_username',trim($_POST['wp_username']));
PConfig::set(local_user(),'wppost','wp_password',trim($_POST['wp_password'])); PConfig::set(local_user(),'wppost','wp_password',trim($_POST['wp_password']));
PConfig::set(local_user(),'wppost','wp_blog',trim($_POST['wp_blog'])); PConfig::set(local_user(),'wppost','wp_blog',trim($_POST['wp_blog']));
PConfig::set(local_user(),'wppost','backlink',trim($_POST['wp_backlink'])); PConfig::set(local_user(),'wppost','backlink',trim(defaults($_POST, 'wp_backlink', '')));
PConfig::set(local_user(),'wppost','shortcheck',trim($_POST['wp_shortcheck'])); PConfig::set(local_user(),'wppost','shortcheck',trim($_POST['wp_shortcheck']));
$wp_backlink_text = Strings::escapeTags(trim($_POST['wp_backlink_text'])); $wp_backlink_text = Strings::escapeTags(trim($_POST['wp_backlink_text']));
$wp_backlink_text = BBCode::convert($wp_backlink_text, false, 8); $wp_backlink_text = BBCode::convert($wp_backlink_text, false, 8);
$wp_backlink_text = HTML::toPlaintext($wp_backlink_text, 0, true); $wp_backlink_text = HTML::toPlaintext($wp_backlink_text, 0, true);
PConfig::set(local_user(),'wppost','wp_backlink_text', $wp_backlink_text); PConfig::set(local_user(),'wppost','wp_backlink_text', $wp_backlink_text);
} }
} }