mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 23:35:12 +00:00
Merge branch 'dev' of codeberg.org:streams/streams into dev
This commit is contained in:
commit
4e3a68d457
10 changed files with 1080 additions and 1017 deletions
|
@ -19,6 +19,24 @@ class Xchan_photo implements DaemonInterface
|
|||
|
||||
// Some photo sources hang after connect and aren't caught by curl timeout
|
||||
|
||||
|
||||
$xchan = q("select * from xchan where xchan_hash = '%s'",
|
||||
dbesc($xchan)
|
||||
);
|
||||
|
||||
if ($xchan && (int)$xchan[0]['xchan_censored'] === 2) {
|
||||
$result = q("update xchan set xchan_photo_date = '%s', xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s', xchan_photo_mimetype = '%s' where xchan_hash = '%s'",
|
||||
dbescdate(datetime_convert()),
|
||||
dbesc(z_root() . '/' . Channel::get_default_profile_photo()),
|
||||
dbesc(z_root() . '/' . Channel::get_default_profile_photo(80)),
|
||||
dbesc(z_root() . '/' . Channel::get_default_profile_photo(48)),
|
||||
dbesc('image/png'),
|
||||
dbesc($xchan)
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
set_time_limit(90);
|
||||
|
||||
$photos = import_remote_xchan_photo($url, $xchan);
|
||||
|
|
|
@ -2457,6 +2457,7 @@ class Activity
|
|||
// pages of Mastodon and Pleroma instance actors in the directory.
|
||||
// @TODO - (2021-08-27) remove this if they provide a non-person xchan_type
|
||||
// once extended xchan_type directory filtering is implemented.
|
||||
|
||||
$censored = ((strpos($profile, 'instance_actor') || strpos($profile, '/internal/fetch')) ? 1 : 0);
|
||||
|
||||
$r = q(
|
||||
|
@ -2504,7 +2505,7 @@ class Activity
|
|||
dbesc(datetime_convert()),
|
||||
intval($hidden),
|
||||
intval($xchan_type),
|
||||
intval($censored),
|
||||
intval($r[0]['xchan_censored'] ?: $censored),
|
||||
dbesc($url)
|
||||
);
|
||||
|
||||
|
|
38
Code/Lib/Multibase.php
Normal file
38
Code/Lib/Multibase.php
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
namespace Code\Lib;
|
||||
|
||||
use StephenHill\Base58;
|
||||
|
||||
class Multibase
|
||||
{
|
||||
|
||||
protected $key = null;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function publicKey($key)
|
||||
{
|
||||
$base58 = new Base58();
|
||||
$raw = hex2bin('ed01') . sodium_base642bin($key, SODIUM_BASE64_VARIANT_ORIGINAL_NO_PADDING);
|
||||
return 'z' . $base58->encode($raw);
|
||||
}
|
||||
|
||||
public function secretKey($key)
|
||||
{
|
||||
$base58 = new Base58();
|
||||
$raw = hex2bin('8026') . sodium_base642bin($key, SODIUM_BASE64_VARIANT_ORIGINAL_NO_PADDING);
|
||||
return 'z' . $base58->encode($raw);
|
||||
}
|
||||
|
||||
public function decode($key)
|
||||
{
|
||||
$base58 = new Base58();
|
||||
$key = substr($key,1);
|
||||
$raw = $base58->decode($key);
|
||||
return sodium_bin2base64(substr($raw, 2), SODIUM_BASE64_VARIANT_ORIGINAL_NO_PADDING);
|
||||
}
|
||||
|
||||
}
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace Code\Module;
|
||||
|
||||
use Code\Daemon\Run;
|
||||
use Code\Web\Controller;
|
||||
|
||||
class Dircensor extends Controller
|
||||
|
@ -27,7 +28,7 @@ class Dircensor extends Controller
|
|||
return;
|
||||
}
|
||||
|
||||
$val = (($r[0]['xchan_censored']) ? 0 : 1);
|
||||
$val = ($r[0]['xchan_censored']) ? 0 : 2;
|
||||
|
||||
q(
|
||||
"update xchan set xchan_censored = $val where xchan_hash = '%s'",
|
||||
|
@ -35,6 +36,7 @@ class Dircensor extends Controller
|
|||
);
|
||||
|
||||
if ($val) {
|
||||
Run::Summon(['Xchan_photo', bin2hex($r[0]['xchan_photo_l']), bin2hex($xchan)]);
|
||||
info(t('Entry censored') . EOL);
|
||||
} else {
|
||||
info(t('Entry uncensored') . EOL);
|
||||
|
|
|
@ -197,7 +197,7 @@ class Dirsearch extends Controller
|
|||
|
||||
$safesql = (($safe > 0) ? " and xchan_censored = 0 and xchan_selfcensored = 0 " : '');
|
||||
if ($safe < 0) {
|
||||
$safesql = " and ( xchan_censored = 1 OR xchan_selfcensored = 1 ) ";
|
||||
$safesql = " and ( xchan_censored > 0 OR xchan_selfcensored = 1 ) ";
|
||||
}
|
||||
|
||||
if ($type) {
|
||||
|
|
2000
util/messages.po
2000
util/messages.po
File diff suppressed because it is too large
Load diff
|
@ -1,2 +1,2 @@
|
|||
<?php
|
||||
define ('STD_VERSION', '23.11.17');
|
||||
define ('STD_VERSION', '23.11.22');
|
||||
|
|
Binary file not shown.
|
@ -9,7 +9,7 @@ msgstr ""
|
|||
"Project-Id-Version: STD_VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-11-09 23:41-0800\n"
|
||||
"PO-Revision-Date: 2023-11-16 00:22+0100\n"
|
||||
"PO-Revision-Date: 2023-11-20 16:47+0100\n"
|
||||
"Last-Translator: Papa Dragon <superdragon@loxol.space>\n"
|
||||
"Language-Team: French <kde-i18n-doc@kde.org>\n"
|
||||
"Language: fr_FR\n"
|
||||
|
@ -306,12 +306,12 @@ msgstr "Épinglé"
|
|||
#: Code/Lib/Stringsjs.php:42 Code/Lib/ThreadItem.php:485
|
||||
#: include/conversation.php:611
|
||||
msgid "Pin this post"
|
||||
msgstr "Détacher cette publication"
|
||||
msgstr "Épingler cette publication"
|
||||
|
||||
#: Code/Lib/Stringsjs.php:43 Code/Lib/ThreadItem.php:485
|
||||
#: include/conversation.php:611
|
||||
msgid "Unpin this post"
|
||||
msgstr "Épingler cette publication"
|
||||
msgstr "Détacher cette publication"
|
||||
|
||||
#: Code/Lib/Stringsjs.php:44
|
||||
msgid "Please accept terms to continue"
|
||||
|
@ -814,7 +814,7 @@ msgstr "Mettre fin à la session"
|
|||
|
||||
#: Code/Lib/Navbar.php:122 Code/Lib/Apps.php:457 Code/Module/Connedit.php:565
|
||||
msgid "View Profile"
|
||||
msgstr "Voir mon profil"
|
||||
msgstr "Voir le profil"
|
||||
|
||||
#: Code/Lib/Navbar.php:122
|
||||
msgid "Your profile page"
|
||||
|
@ -1226,7 +1226,7 @@ msgstr "Merci de visiter %s pour voir et/ou répondre à vos messages privés."
|
|||
|
||||
#: Code/Lib/Enotify.php:169
|
||||
msgid "repeated"
|
||||
msgstr "relayé"
|
||||
msgstr "a relayé"
|
||||
|
||||
#: Code/Lib/Enotify.php:176
|
||||
msgid "commented on"
|
||||
|
@ -1248,7 +1248,7 @@ msgstr "%1$s %2$s [zrl=%3$s]un %4$s[/zrl]"
|
|||
#: Code/Lib/Enotify.php:250
|
||||
#, php-format
|
||||
msgid "%1$s %2$s [zrl=%3$s]%4$s's %5$s[/zrl]"
|
||||
msgstr "%1$s %2$s [zrl=%3$s]%4$s de %5$s[/zrl]"
|
||||
msgstr "%1$s %2$s [zrl=%3$s]%5$s de %4$s[/zrl]"
|
||||
|
||||
#: Code/Lib/Enotify.php:262
|
||||
#, php-format
|
||||
|
@ -5424,7 +5424,7 @@ msgstr "Depuis (date)"
|
|||
|
||||
#: Code/Module/Settings/Profile_edit.php:634
|
||||
msgid "Tell us about yourself"
|
||||
msgstr "Parlez nous de vous"
|
||||
msgstr "À propos de vous"
|
||||
|
||||
#: Code/Module/Settings/Profile_edit.php:635
|
||||
msgid "Homepage URL"
|
||||
|
@ -12110,7 +12110,7 @@ msgstr "n'aime pas %2$s de %1$s"
|
|||
#: include/conversation.php:121
|
||||
#, php-format
|
||||
msgid "repeated %1$s's %2$s"
|
||||
msgstr "a répété le %2$s de %1$s"
|
||||
msgstr "a relayé le %2$s de %1$s"
|
||||
|
||||
#: include/conversation.php:161
|
||||
#, php-format
|
||||
|
|
|
@ -60,8 +60,8 @@ App::$strings["A channel name is required."] = "Un nom de canal est nécessaire.
|
|||
App::$strings["This is a "] = "C'est un ";
|
||||
App::$strings[" channel name"] = " nom de canal";
|
||||
App::$strings["Pinned"] = "Épinglé";
|
||||
App::$strings["Pin this post"] = "Détacher cette publication";
|
||||
App::$strings["Unpin this post"] = "Épingler cette publication";
|
||||
App::$strings["Pin this post"] = "Épingler cette publication";
|
||||
App::$strings["Unpin this post"] = "Détacher cette publication";
|
||||
App::$strings["Please accept terms to continue"] = "Merci d'accepter les conditions pour continuer";
|
||||
App::$strings["timeago.prefixAgo"] = "il y a";
|
||||
App::$strings["timeago.prefixFromNow"] = "dans";
|
||||
|
@ -169,7 +169,7 @@ App::$strings["(is off)"] = "(est inactif)";
|
|||
App::$strings["Content filtering"] = "Filtrage de contenu";
|
||||
App::$strings["Logout"] = "Déconnexion";
|
||||
App::$strings["End this session"] = "Mettre fin à la session";
|
||||
App::$strings["View Profile"] = "Voir mon profil";
|
||||
App::$strings["View Profile"] = "Voir le profil";
|
||||
App::$strings["Your profile page"] = "Votre profil";
|
||||
App::$strings["Login"] = "Connexion";
|
||||
App::$strings["Sign in"] = "Connexion";
|
||||
|
@ -253,12 +253,12 @@ App::$strings["a private message"] = "un message privé";
|
|||
App::$strings["%1\$s replied to a private message at %2\$s."] = "%1\$s a répondu à un message privé à %2\$s.";
|
||||
App::$strings["%1\$s replied to %2\$s."] = "%1\$s a répondu à %2\$s.";
|
||||
App::$strings["Please visit %s to view and/or reply to your private messages."] = "Merci de visiter %s pour voir et/ou répondre à vos messages privés.";
|
||||
App::$strings["repeated"] = "relayé";
|
||||
App::$strings["repeated"] = "a relayé";
|
||||
App::$strings["commented on"] = "a commenté";
|
||||
App::$strings["liked"] = "a aimé";
|
||||
App::$strings["disliked"] = "n'a pas aimé";
|
||||
App::$strings["%1\$s %2\$s [zrl=%3\$s]a %4\$s[/zrl]"] = "%1\$s %2\$s [zrl=%3\$s]un %4\$s[/zrl]";
|
||||
App::$strings["%1\$s %2\$s [zrl=%3\$s]%4\$s's %5\$s[/zrl]"] = "%1\$s %2\$s [zrl=%3\$s]%4\$s de %5\$s[/zrl]";
|
||||
App::$strings["%1\$s %2\$s [zrl=%3\$s]%4\$s's %5\$s[/zrl]"] = "%1\$s %2\$s [zrl=%3\$s]%5\$s de %4\$s[/zrl]";
|
||||
App::$strings["%1\$s %2\$s [zrl=%3\$s]your %4\$s[/zrl]"] = "%1\$s %2\$s [zrl=%3\$s]votre %4\$s[/zrl]";
|
||||
App::$strings["[\$Projectname:Notify] Moderated Comment to conversation #%1\$d by %2\$s"] = "[\$Projectname:Notification] Commentaire modéré pour la conversation n°%1\$d par %2\$s";
|
||||
App::$strings["[\$Projectname:Notify] Comment to conversation #%1\$d by %2\$s"] = "[\$Projectname:Notification] Commentaire sur la conversation #%1\$d de %2\$s";
|
||||
|
@ -1160,7 +1160,7 @@ App::$strings["Country"] = "Pays";
|
|||
App::$strings["Who (if applicable)"] = "Qui (si applicable)";
|
||||
App::$strings["Examples: cathy123, Cathy Williams, cathy@example.com"] = "Exemples : marie123, Marie Deschamps, marie@exemple.com";
|
||||
App::$strings["Since (date)"] = "Depuis (date)";
|
||||
App::$strings["Tell us about yourself"] = "Parlez nous de vous";
|
||||
App::$strings["Tell us about yourself"] = "À propos de vous";
|
||||
App::$strings["Homepage URL"] = "URL de ma page personnelle";
|
||||
App::$strings["Hometown"] = "Lieu de naissance";
|
||||
App::$strings["Political views"] = "Opinions politiques";
|
||||
|
@ -2602,7 +2602,7 @@ App::$strings["dislikes"] = "n'aime pas";
|
|||
App::$strings["%1\$s repeated %2\$s's %3\$s"] = "%1\$s a répété %3\$s de %2\$s";
|
||||
App::$strings["likes %1\$s's %2\$s"] = "aime le %2\$s de %1\$s";
|
||||
App::$strings["doesn't like %1\$s's %2\$s"] = "n'aime pas %2\$s de %1\$s";
|
||||
App::$strings["repeated %1\$s's %2\$s"] = "a répété le %2\$s de %1\$s";
|
||||
App::$strings["repeated %1\$s's %2\$s"] = "a relayé le %2\$s de %1\$s";
|
||||
App::$strings["%1\$s is now connected with %2\$s"] = "%1\$s est maintenant en connexion avec %2\$s";
|
||||
App::$strings["%1\$s poked %2\$s"] = "%1\$s a poké %2\$s";
|
||||
App::$strings["poked"] = "a fait signe à";
|
||||
|
|
Loading…
Reference in a new issue