From 2dff10564c66ceb9f199d4edc936a542c28f5104 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 23 Apr 2018 21:12:31 +0200 Subject: possible fix for issue #1101 --- Zotlabs/Module/Ping.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zotlabs/Module/Ping.php b/Zotlabs/Module/Ping.php index 87f9ee78a..206b8c3d1 100644 --- a/Zotlabs/Module/Ping.php +++ b/Zotlabs/Module/Ping.php @@ -143,7 +143,7 @@ class Ping extends \Zotlabs\Web\Controller { $sql_extra = ''; if(! ($vnotify & VNOTIFY_LIKE)) - $sql_extra = ' AND verb NOT IN ("' . dbesc(ACTIVITY_LIKE) . '", "' . dbesc(ACTIVITY_DISLIKE) . '") '; + $sql_extra = " AND verb NOT IN ('" . dbesc(ACTIVITY_LIKE) . "', '" . dbesc(ACTIVITY_DISLIKE) . "') "; $discover_tab_on = can_view_public_stream(); -- cgit v1.2.3 From 97308ad2fbb31ec90644e6145ec6e17bc9663c22 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 23 Apr 2018 16:05:55 -0700 Subject: provide a short term compatibility mapping between social_party and social_federation --- Zotlabs/Module/Settings/Channel.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Zotlabs/Module/Settings/Channel.php b/Zotlabs/Module/Settings/Channel.php index 3e928ec58..65b9b197e 100644 --- a/Zotlabs/Module/Settings/Channel.php +++ b/Zotlabs/Module/Settings/Channel.php @@ -21,6 +21,10 @@ class Channel { $role = ((x($_POST,'permissions_role')) ? notags(trim($_POST['permissions_role'])) : ''); $oldrole = get_pconfig(local_channel(),'system','permissions_role'); + // This mapping can be removed after 3.4 release + if($oldrole === 'social_party') { + $oldrole = 'social_federation'; + } if(($role != $oldrole) || ($role === 'custom')) { @@ -471,6 +475,10 @@ class Channel { $permissions_role = get_pconfig(local_channel(),'system','permissions_role'); if(! $permissions_role) $permissions_role = 'custom'; + // compatibility mapping - can be removed after 3.4 release + if($permissions_role === 'social_party') + $permissions_role = 'social_federation'; + $permissions_set = (($permissions_role != 'custom') ? true : false); -- cgit v1.2.3 From b688dc3995a679fe58cfcc636806248026910d9d Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 23 Apr 2018 19:10:35 -0700 Subject: minor tweak to utf8 usernames after some testing of the underlying encode/decode funations. This probably isn't critical and I do not have a failure case but just trying to cover all bases. --- include/channel.php | 5 +++++ include/text.php | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/include/channel.php b/include/channel.php index 4bf490bf0..42a392e8e 100644 --- a/include/channel.php +++ b/include/channel.php @@ -2240,6 +2240,11 @@ function get_zcard_embed($channel, $observer_hash = '', $args = array()) { * - false if no channel with $nick was found */ function channelx_by_nick($nick) { + + // If we are provided a Unicode nickname convert to IDN + + $nick = punify($nick); + $r = q("SELECT * FROM channel left join xchan on channel_hash = xchan_hash WHERE channel_address = '%s' and channel_removed = 0 LIMIT 1", dbesc($nick) ); diff --git a/include/text.php b/include/text.php index 55fc49560..411576fa6 100644 --- a/include/text.php +++ b/include/text.php @@ -3344,6 +3344,9 @@ function featured_sort($a,$b) { } +// Be aware that punify will convert domain names and pathnames + + function punify($s) { require_once('vendor/simplepie/simplepie/idn/idna_convert.class.php'); $x = new idna_convert(['encoding' => 'utf8']); @@ -3351,6 +3354,8 @@ function punify($s) { } +// Be aware that unpunify will only convert domain names and not pathnames + function unpunify($s) { require_once('vendor/simplepie/simplepie/idn/idna_convert.class.php'); $x = new idna_convert(['encoding' => 'utf8']); -- cgit v1.2.3 From a6c42e875633e8e67bbf93425182cce4de3eb653 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 23 Apr 2018 21:55:16 -0700 Subject: added variable to store the raw json string as received, since this is signed and we may need to forward the signed data. --- Zotlabs/Lib/ActivityStreams.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Zotlabs/Lib/ActivityStreams.php b/Zotlabs/Lib/ActivityStreams.php index 2e9bb0703..3a99e7b49 100644 --- a/Zotlabs/Lib/ActivityStreams.php +++ b/Zotlabs/Lib/ActivityStreams.php @@ -9,6 +9,7 @@ namespace Zotlabs\Lib; */ class ActivityStreams { + public $raw = null; public $data; public $valid = false; public $id = ''; @@ -33,6 +34,7 @@ class ActivityStreams { */ function __construct($string) { + $this->raw = $string; $this->data = json_decode($string, true); if($this->data) { $this->valid = true; -- cgit v1.2.3 From 2ea87b65ca4aeab08e68a4e5cd1fd940ae470146 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 24 Apr 2018 15:41:35 +0200 Subject: fix php warnings --- Zotlabs/Module/Photos.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Zotlabs/Module/Photos.php b/Zotlabs/Module/Photos.php index fa22c3f26..a143c4d4c 100644 --- a/Zotlabs/Module/Photos.php +++ b/Zotlabs/Module/Photos.php @@ -1148,10 +1148,10 @@ class Photos extends \Zotlabs\Web\Controller { builtin_activity_puller($item, $conv_responses); } - $like_count = ((x($alike,$link_item['mid'])) ? $alike[$link_item['mid']] : ''); $like_list = ((x($alike,$link_item['mid'])) ? $alike[$link_item['mid'] . '-l'] : ''); - if (count($like_list) > MAX_LIKERS) { + + if(is_array($like_list) && (count($like_list) > MAX_LIKERS)) { $like_list_part = array_slice($like_list, 0, MAX_LIKERS); array_push($like_list_part, '' . t('View all') . ''); } else { @@ -1163,7 +1163,7 @@ class Photos extends \Zotlabs\Web\Controller { $dislike_count = ((x($dlike,$link_item['mid'])) ? $dlike[$link_item['mid']] : ''); $dislike_list = ((x($dlike,$link_item['mid'])) ? $dlike[$link_item['mid'] . '-l'] : ''); $dislike_button_label = tt('Dislike','Dislikes',$dislike_count,'noun'); - if (count($dislike_list) > MAX_LIKERS) { + if (is_array($dislike_list) && (count($dislike_list) > MAX_LIKERS)) { $dislike_list_part = array_slice($dislike_list, 0, MAX_LIKERS); array_push($dislike_list_part, '' . t('View all') . ''); } else { -- cgit v1.2.3 From e11e99b2d1e2d94417e9f9934b759c88a70177ac Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 24 Apr 2018 17:09:51 +0200 Subject: fix regression with forum widget unseen count --- Zotlabs/Widget/Forums.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Zotlabs/Widget/Forums.php b/Zotlabs/Widget/Forums.php index f65a639ff..7415c0f0a 100644 --- a/Zotlabs/Widget/Forums.php +++ b/Zotlabs/Widget/Forums.php @@ -66,8 +66,8 @@ class Forums { for($x = 0; $x < count($r1); $x ++) { $r = q("select sum(item_unseen) as unseen from item where uid = %d and owner_xchan = '%s' and item_unseen = 1 $perms_sql ", - dbesc($r1[$x]['xchan_hash']), - intval(local_channel()) + intval(local_channel()), + dbesc($r1[$x]['xchan_hash']) ); if($r) $r1[$x]['unseen'] = $r[0]['unseen']; -- cgit v1.2.3 From c5b32032a74dfc4165b41be11b3d75ae75a45d93 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 24 Apr 2018 22:30:17 +0200 Subject: changelog --- CHANGELOG | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index ad5e004c8..fa28aefc6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,73 @@ +Hubzilla 3.4 (????-??-??) + + - Implement trending tags for mod pubstream + - Relax restrictions to the design tools menu to allow those with write_pages permission + - Add alt pager to mod moderate + - Show existing cover photo when changing it + - Update to bootstrap lib to version 4.1 + - Provide a higher accuracy method for active channels information + - Provide visible star status for starred posts + - Move the thread author menu to the wall item photo + - Accept system_language through either get or post + - Remove recipient name from stored notifications but keep them in emails + - Fix issue of being forced to log back in after leaving a delegated channel + - Implement last commented expiration setting in mod admin + - Create catcloud widget and provide a type option which can include 'cards' or 'articles' + - Modified notifications widget to add the public stream when the current user is allowed to see it only + - Don't provide a connect button for transient identities + - Merge techlevels and features + - Implement auto-save posts and comments in browser using localStorage + - Display directory server in siteinfo.json + - Bring back the dnt policy document + - Implement OAuth2 + - Add basic structure for additional features documentation + - Community tag refactor + - Obscurify chats + - Provide a way to share wiki pages + - Update folder timestamp on uploaded files + - Code optimisations and de-duplication on updating parent commented timestamp + - Turn newmember widget into a feature + - Make list mode work in cards and articles + - Make alt pager work for articles and cards + - Initial support for alternative sort orders on the cloud pages + - Add Ochannel module for testing OStatus bad behaviour + - Add the social - federation permission role + - Update justified gallery lib from 3.6.3 to 3.6.5 + + Bugfixes + - Fix regression with forum widget unseen count + - Fix issue with imagemagick exif info + - Aonymous comments in StdLimits shouldn't be allowed + - Fix wiki pages not syncing + - Show "Unseen public activity" channel setting when site only public streams are activated + - Fix channel import failing to provide channel_password value + - Fix permalinks to children of articles and cards + - Fix missing year on profile birthday input + - Fix missing login/out buttons for medium screensize + - Preserve existing categories when updating an app from an embed source + - Fix app sellpage not being stored + - Fix tagadelic being overly protective of permissions + - Fix comments not displayed in single card/article view + - Fix anonymous comments bump thread + - Fix pending registrations visible in admin accounts + + Addons + Pubcrawl: fix issues with postgresql + Fuzzloc: new addon to blur your browser location + Pubcrawl: implement follow by webfinger + Cart: new addon which provides online shop functionalities (experimental) + Pubcrawl: implement two-way summary functionality + Wordpress: upgrade incutio xmlrpc library to use hubzilla curl wrapper + Hzfiles: various fixes + Diaspora: support full_name attribute in profile messages + Frphotos: deprecate plugin (keep it for reference) + Webmention: require html5 parser + GNU-Social: provide alternative xchan_url + Diaspora: fix wrong callback function + Diaspora: fix conversion of forum mentions to markdown by providing a !{forum@host} link syntax + Diaspora: fix item title not transferred + + Hubzilla 3.2 (2018-03-09) - Improve rendering of Readme files in plugin settings - Add pdl file for mod moderate -- cgit v1.2.3 From 8face5a66c82e7086c379ca4b07f178a85a781b3 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 24 Apr 2018 15:32:24 -0700 Subject: make tag autocomplete less scary looking in the editor. If this works out we can simplify and get rid of a huge amount of spaghetti tag logic. --- Zotlabs/Module/Acl.php | 4 +- include/text.php | 112 ++++++++++++++++++++++++++++++++---------------- view/js/autocomplete.js | 7 +-- 3 files changed, 77 insertions(+), 46 deletions(-) diff --git a/Zotlabs/Module/Acl.php b/Zotlabs/Module/Acl.php index 4c5883e88..35594ae9f 100644 --- a/Zotlabs/Module/Acl.php +++ b/Zotlabs/Module/Acl.php @@ -354,7 +354,7 @@ class Acl extends \Zotlabs\Web\Controller { "name" => $g['name'] . (($type === 'f') ? '' : '+'), "id" => urlencode($g['id']) . (($type === 'f') ? '' : '+'), "xid" => $g['hash'], - "link" => $g['nick'], + "link" => (($g['nick']) ? $g['nick'] : $g['url']), "nick" => substr($g['nick'],0,strpos($g['nick'],'@')), "self" => (intval($g['abook_self']) ? 'abook-self' : ''), "taggable" => 'taggable', @@ -368,7 +368,7 @@ class Acl extends \Zotlabs\Web\Controller { "name" => $g['name'], "id" => urlencode($g['id']), "xid" => $g['hash'], - "link" => $g['nick'], + "link" => (($g['nick']) ? $g['nick'] : $g['url']), "nick" => (($g['nick']) ? substr($g['nick'],0,strpos($g['nick'],'@')) : $g['nick']), "self" => (intval($g['abook_self']) ? 'abook-self' : ''), "taggable" => '', diff --git a/include/text.php b/include/text.php index 411576fa6..4d6d0ffb5 100644 --- a/include/text.php +++ b/include/text.php @@ -822,6 +822,14 @@ function get_tags($s) { } } + // match bracket mentions + + if(preg_match_all('/([@!]\{.*?\})/',$s,$match)) { + foreach($match[1] as $mtch) { + $ret[] = $mtch; + } + } + // Match full names against @tags including the space between first and last // We will look these up afterward to see if they are full names or not recognisable. @@ -2029,18 +2037,33 @@ function undo_post_tagging($s) { $cnt = preg_match_all('/([@#])(\!*)\[zrl=(.*?)\](.*?)\[\/zrl\]/ism',$s,$matches,PREG_SET_ORDER); if($cnt) { foreach($matches as $mtch) { - $s = str_replace($mtch[0], $mtch[1] . $mtch[2] . quote_tag($mtch[4]),$s); + $x = q("select xchan_addr, xchan_url from xchan where xchan_url = '%s' limit 1", + dbesc($mtch[3]) + ); + if($x) { + $s = str_replace($mtch[0], $mtch[1] . $mtch[2] . '{' . (($x[0]['xchan_addr']) ? $x[0]['xchan_addr'] : $x[0]['xchan_url']) . '}', $s); + } + else { + $s = str_replace($mtch[0], $mtch[1] . $mtch[2] . quote_tag($mtch[4]),$s); + } } } // undo forum tags $cnt = preg_match_all('/\!\[zrl=(.*?)\](.*?)\[\/zrl\]/ism',$s,$matches,PREG_SET_ORDER); if($cnt) { foreach($matches as $mtch) { - $s = str_replace($mtch[0], '!' . quote_tag($mtch[2]),$s); + $x = q("select xchan_addr, xchan_url from xchan where xchan_url = '%s' limit 1", + dbesc($mtch[1]) + ); + if($x) { + $s = str_replace($mtch[0], '!' . '{' . (($x[0]['xchan_addr']) ? $x[0]['xchan_addr'] : $x[0]['xchan_url']) . '}', $s); + } + else { + $s = str_replace($mtch[0], '!' . quote_tag($mtch[2]),$s); + } } } - return $s; } @@ -2615,53 +2638,66 @@ function handle_tag($a, &$body, &$access_tag, &$str_tags, $profile_uid, $tag, $d $forum = false; $trailing_plus_name = false; - // @channel+ is a forum or network delivery tag - - if(substr($newname,-1,1) === '+') { - $forum = true; + if(substr($name,0,1) === '{' && substr($name,-1,1) === '}') { + $newname = substr($name,1); $newname = substr($newname,0,-1); + + $r = q("select * from xchan where xchan_addr = '%s' or xchan_url = '%s' limit 1", + dbesc($newname), + dbesc($newname) + ); } - // Here we're looking for an address book entry as provided by the auto-completer - // of the form something+nnn where nnn is an abook_id or the first chars of xchan_hash + if(! $r) { + // @channel+ is a forum or network delivery tag - // If there's a +nnn in the string make sure there isn't a space preceding it + if(substr($newname,-1,1) === '+') { + $forum = true; + $newname = substr($newname,0,-1); + } - $t1 = strpos($newname,' '); - $t2 = strrpos($newname,'+'); + // Here we're looking for an address book entry as provided by the auto-completer + // of the form something+nnn where nnn is an abook_id or the first chars of xchan_hash - if($t1 && $t2 && $t1 < $t2) - $t2 = 0; - if(($t2) && (! $diaspora)) { - //get the id + // If there's a +nnn in the string make sure there isn't a space preceding it - $tagcid = urldecode(substr($newname,$t2 + 1)); + $t1 = strpos($newname,' '); + $t2 = strrpos($newname,'+'); + + if($t1 && $t2 && $t1 < $t2) + $t2 = 0; - if(strrpos($tagcid,' ')) - $tagcid = substr($tagcid,0,strrpos($tagcid,' ')); + if(($t2) && (! $diaspora)) { + //get the id - if(strlen($tagcid) < 16) - $abook_id = intval($tagcid); - //remove the next word from tag's name - if(strpos($name,' ')) { - $name = substr($name,0,strpos($name,' ')); - } + $tagcid = urldecode(substr($newname,$t2 + 1)); - if($abook_id) { // if there was an id - // select channel with that id from the logged in user's address book - $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash - WHERE abook_id = %d AND abook_channel = %d LIMIT 1", - intval($abook_id), - intval($profile_uid) - ); - } - else { - $r = q("SELECT * FROM xchan - WHERE xchan_hash like '%s%%' LIMIT 1", - dbesc($tagcid) - ); + if(strrpos($tagcid,' ')) + $tagcid = substr($tagcid,0,strrpos($tagcid,' ')); + + if(strlen($tagcid) < 16) + $abook_id = intval($tagcid); + //remove the next word from tag's name + if(strpos($name,' ')) { + $name = substr($name,0,strpos($name,' ')); + } + + if($abook_id) { // if there was an id + // select channel with that id from the logged in user's address book + $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash + WHERE abook_id = %d AND abook_channel = %d LIMIT 1", + intval($abook_id), + intval($profile_uid) + ); + } + else { + $r = q("SELECT * FROM xchan + WHERE xchan_hash like '%s%%' LIMIT 1", + dbesc($tagcid) + ); + } } } diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js index be632a07e..76c3fb69e 100644 --- a/view/js/autocomplete.js +++ b/view/js/autocomplete.js @@ -84,13 +84,8 @@ function editor_replace(item) { } // $2 ensures that prefix (@,@!) is preserved - var id = item.id; - // 16 chars of hash should be enough. Full hash could be used if it can be done in a visually appealing way. - // 16 chars is also the minimum length in the backend (otherwise it's interpreted as a local id). - if(id.length > 16) - id = item.id.substring(0,16); - return '$1$2' + item.nick.replace(' ', '') + '+' + id + ' '; + return '$1$2{' + item.link + '} '; } function basic_replace(item) { -- cgit v1.2.3 From 9ffad65b6591d22800664d87cc6f75f2932f8a49 Mon Sep 17 00:00:00 2001 From: Galette Saucisse Date: Wed, 25 Apr 2018 09:40:40 +0200 Subject: Create /doc/fr/project.bb --- doc/fr/project.bb | 179 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 179 insertions(+) create mode 100644 doc/fr/project.bb diff --git a/doc/fr/project.bb b/doc/fr/project.bb new file mode 100644 index 000000000..b62c3bd25 --- /dev/null +++ b/doc/fr/project.bb @@ -0,0 +1,179 @@ +[h3]La gouvernance de $Projectname [/h3] +La gouvernance est liée à la gestion d'un projet et plus particulièrement à la résolution des conflits. + +[h4]Gouvernance communautaire[/h4] +Le projet est maintenu et les décisions sont prises par la " communauté ". La structure de gouvernance continue d'évoluer. Jusqu'à ce que la structure soit finalisée, les décisions sont prises dans l'ordre suivant : + +[ol] +[*] Consensus paresseux + +Si une proposition de projet est soumise à l'un des forums de gouvernance communautaire et qu'il n'y a pas d'objections sérieuses dans un délai "raisonnable" à partir de la date de la proposition (nous accordons généralement 2 à 3 jours pour que toutes les parties intéressées puissent intervenir), aucun vote n'est nécessaire et la proposition sera considérée comme approuvée. Certaines préoccupations peuvent être soulevées à ce moment-là, mais si elles sont abordées au cours de la discussion et des solutions de rechange fournies, elles seront quand même considérées comme approuvées. + +[*] Veto + +Les promoteurs principaux ayant un historique important d'engagements de projet peuvent opposer leur veto à toute décision. La décision ne peut être prise tant que le veto n'a pas été levé ou qu'une autre proposition n'a pas été présentée. + +[*] Vote de la communauté + +Une décision qui n'a pas de mandat clair ou de consensus clair, mais qui ne fait pas l'objet d'un veto, peut être soumise au vote de la communauté. Actuellement, il s'agit d'un simple vote populaire dans l'un des forums communautaires applicables. À ce moment-là, c'est le vote populaire qui décide du résultat. Cela pourrait changer à l'avenir si la communauté adopte un modèle de gouvernance de " conseil ". Ce document sera mis à jour à ce moment-là avec les règles de gouvernance mises à jour. +[/ol] + +Le vote communautaire n'offre pas toujours un résultat agréable et peut générer des factions polarisées au sein de la communauté (d'où la raison pour laquelle d'autres modèles sont à l'étude). Si la proposition est rejetée, il y a encore plusieurs choses qui peuvent être faites et la proposition peut être soumise à nouveau avec des paramètres légèrement différents (conversion vers un module complémentaire, conversion vers un module optionnel qui est désactivé par défaut, etc. Si l'intérêt pour le dispositif est élevé et que le vote est " serré ", cela peut générer beaucoup de mauvais sentiments parmi les électeurs perdants. Lors de ces votes serrés, il est [b]fortement recommandé[/b] que l'auteur de la proposition prenne des mesures pour répondre à toute préoccupation soulevée et la soumettre de nouveau. + +[h4]Politique de confidentialité[/h4] + +Q: Qui peut voir mon contenu ? + +R : Par défaut, N'IMPORTE QUELLE personne sur Internet, à MOINS que vous le restreigniez. Nom du projet vous permet de choisir le niveau de confidentialité que vous désirez. Le contenu restreint ne sera PAS visible pour les "réseaux d'espionnage" et les annonceurs. Il sera protégé contre les écoutes de l'extérieur - au mieux de nos capacités. Les administrateurs de Hub ayant suffisamment de compétences et de patience PEUVENT être en mesure d'écouter certaines communications privées, mais ils doivent déployer des trésors d'efforts pour le faire. Des modes de confidentialité existent au sein de $Projectname qui résistent même à l'écoute par des administrateurs de hub qualifiés et déterminés. + +Q : Mon contenu peut-il être censuré ? + +R : $Nom du projet (le réseau) NE PEUT PAS censurer votre contenu. Les administrateurs de serveur et de hub sont soumis aux lois locales et PEUVENT supprimer le contenu répréhensible de leur site/hub. N'importe qui PEUT devenir un administrateur de hub, y compris vous ; et donc publier du contenu qui pourrait autrement être censuré. Vous POUVEZ toujours être soumis aux lois locales. + + +[h5]Définitions[/h5]. + +**$Nom du projet**** + +Autrement appelé "le réseau", $Projectname est une collection d'ordinateurs/serveurs individuels (aka **hubs**) qui se connectent ensemble pour former un plus grand réseau coopératif. + +**hub** + +Un ordinateur individuel ou un serveur connecté à $Projectname. Ces services sont fournis par un **administrateur de hub** et peuvent être publics ou privés, payants ou gratuits. + +**administrateur de hub**** + +Gérant du système d'un hub individuel. + +[h5]Politiques[/h5] + +**Information publique** + +Toute information ou tout ce que vous affichez dans $Projectname PEUT être public ou visible par quiconque sur Internet. Dans la mesure du possible, $Projectname vous permet de protéger le contenu et de restreindre qui peut le consulter. + +La photo de votre profil, le nom de votre canal et l'emplacement (URL ou adresse réseau) de votre canal sont visibles par tous sur Internet et les contrôles de confidentialité n'affecteront pas l'affichage de ces éléments. + +Vous POUVEZ fournir en plus d'autres informations de profil. Toute information que vous fournissez dans votre profil "par défaut" ou **profil public** PEUT être transmise à d'autres hubs dans $Projectname et peut également être affichée dans le répertoire des canaux. Vous pouvez limiter l'affichage de ces informations de profil. Il peut être limité aux seuls membres de votre hub, ou seulement aux connexions (amis), ou à d'autres groupes limités de visionneurs comme vous le souhaitez. Si vous souhaitez que votre profil soit restreint, vous devez définir le paramètre de confidentialité approprié ou simplement NE PAS fournir d'informations supplémentaires. + +**Contenu** + +Le contenu que vous fournissez (messages de statut, photos, fichiers, etc.) vous appartient. Par défaut, $Projectname publie le contenu ouvertement et visible par tout le monde sur Internet (PUBLIC). Vous POUVEZ contrôler cela dans les paramètres de votre canal et restreindre les permissions par défaut ou vous POUVEZ restreindre la visibilité de n'importe quel élément publié séparément (PRIVÉ). Les développeurs de noms de projet s'assureront que le contenu restreint est visible SEULEMENT pour ceux qui figurent dans la liste des restrictions - au mieux de leurs capacités. + +Les contenus (en particulier les messages de statut) que vous partagez avec d'autres réseaux ou que vous avez rendus visibles à quiconque sur Internet (PUBLIC) ne peuvent pas être facilement repris une fois qu'ils ont été publiés. Il PEUT être partagé avec d'autres réseaux et rendu disponible par le biais de flux RSS/Atom. Il peut aussi être syndiqué sur d'autres sites $Projectname. Il PEUT apparaître sur d'autres réseaux et sites Web et être visible dans les recherches sur Internet. Si vous ne souhaitez pas ce comportement par défaut, veuillez ajuster les paramètres de votre canal et restreindre le nombre de personnes qui peuvent voir votre contenu. + +**Commentaires et posts du Forum** + +Les commentaires sur les posts qui ont été créés par d'autres et les posts qui sont désignés comme posts du forum vous appartiennent en tant que créateur/auteur, mais la distribution de ces posts n'est pas sous votre contrôle direct, et vous renoncez à certains droits sur ces items. Ces messages/commentaires PEUVENT être redistribués à d'autres, et PEUVENT être visibles pour n'importe qui sur Internet. Dans le cas de commentaires, le créateur du "premier message" dans le fil de discussion (conversation) auquel vous répondez contrôle la distribution de tous les commentaires et réponses à ce message. Ils "possèdent" et ont donc certains droits sur l'ensemble de la conversation (y compris tous les commentaires qu'elle contient). Vous pouvez toujours modifier ou supprimer le commentaire, mais le propriétaire de la conversation a également le droit de modifier, supprimer, redistribuer et sauvegarder/restaurer tout ou partie du contenu de la conversation. + +**Les informations privées** + +Les développeurs de $Projectname s'assureront que tout contenu que vous fournissez et qui est désigné comme PRIVÉ seront protégés contre les écoutes - au mieux de leurs capacités. Le contenu des canaux privés PEUT être vu dans la base de données de chaque administrateur de hub impliqué, mais les messages privés sont masqués dans la base de données. Cette dernière signifie qu'il est très difficile, mais PAS impossible que ce contenu soit vu par un administrateur de hub. Le contenu du canal privé et les messages privés sont également éliminés des notifications par courriel. Le cryptage de bout en bout est fourni en option et ceci NE PEUT PAS être vu, même par un administrateur déterminé. + +[h5]Confidentialité de l'identité[/h5]. + +La confidentialité de votre identité est un autre aspect. Parce que vous avez une identité décentralisée dans $Projectname, votre vie privée s'étend au-delà de votre hub d'origine. Si vous voulez avoir le contrôle total de votre vie privée et de la sécurité, vous devriez faire fonctionner votre propre concentrateur sur un serveur dédié. Pour beaucoup de gens, c'est compliqué et cela peut mettre à l'épreuve leurs capacités techniques. Énumérons donc quelques précautions que vous pouvez prendre pour assurer votre vie privée autant que possible. + +Une identité décentralisée a beaucoup d'avantages et vous donne beaucoup de fonctionnalités intéressantes, mais vous devez être conscient du fait que votre identité est connue par d'autres hubs dans le réseau $Projectname. L'un de ces avantages est que d'autres canaux peuvent vous servir du contenu personnalisé et vous permettre de voir des choses privées (comme des photos privées que d'autres souhaitent partager avec vous). Pour cette raison, ces canaux ont besoin de savoir qui vous êtes. Mais nous comprenons que parfois, ces autres canaux en savent plus de vous que vous ne le souhaiteriez. Par exemple, le plug-in Visage qui peut indiquer au propriétaire d'un canal la dernière fois que vous avez visité son profil. Vous pouvez facilement OPT-OUT de ce bas niveau et nous pensons, le suivi inoffensif. + +Vous pouvez activer [Ne pas suivre (DNT)](http://donottrack.us/) dans votre navigateur Web. Nous respectons cette nouvelle proposition de politique de confidentialité. Tous les navigateurs modernes supportent le DNT. Vous le trouverez dans les paramètres de confidentialité de vos navigateurs ou bien vous pouvez consulter le manuel du navigateur Web. Cela n'affectera pas la fonctionnalité de $Projectname. Ce réglage est probablement suffisant pour la plupart des gens. + +*Vous pouvez [désactiver la publication](settings) de votre chaîne dans notre répertoire de chaînes. Si vous voulez que les gens trouvent votre canal, vous devriez leur donner l'adresse de votre canal directement. Nous pensons que c'est une bonne indication que vous préférez une vie privée supplémentaire et que vous activez automatiquement l'option "Ne pas suivre" si c'est le cas. + +*Vous pouvez avoir un hub bloqué. Cela signifie que tous les canaux et le contenu de cette hub ne sont pas publics et ne sont pas visibles pour le monde extérieur. C'est quelque chose que seul votre administrateur de hub peut faire. Nous respectons également ce principe et activons automatiquement l'option "Ne pas suivre" si elle est définie. + +[h5]La Censure[/h5] + +$Projectname est un réseau mondial qui inclut toutes les religions et toutes les cultures. Cela n'implique pas que tous les membres du réseau ressentent la même chose que vous sur les questions litigieuses, et certaines personnes peuvent être FORTEMENT opposées au contenu que vous publiez. En général, si vous souhaitez publier quelque chose que vous savez ne pas être universellement acceptable, la meilleure approche est de limiter l'audience en utilisant les contrôles de confidentialité à un petit cercle d'amis. + +$Projectname en tant que fournisseur de réseau n'est pas en mesure de censurer le contenu. Cependant, les administrateurs du hub PEUVENT censurer tout contenu qui apparaît sur leur hub pour se conformer aux lois locales ou même au jugement personnel. Leur décision est finale. Si vous avez des problèmes avec un administrateur de hub, vous pouvez déplacer votre compte et vos messages sur un autre site qui correspond mieux à vos attentes. Veuillez vérifier (périodiquement) les[Conditions d'utilisation](help/TermsOfService) de votre hub pour connaître les règles ou directives. Si votre contenu se compose de matériel qui est illégal ou qui peut causer des problèmes, vous êtes FORTEMENT encouragé à héberger le vôtre (devenez un administrateur de hub). Vous pouvez toujours trouver que votre contenu est bloqué sur certains hubs, mais $Projectname en tant que réseau ne peut pas l'empêcher d'être posté. + +$Projectname RECOMMANDE que les administrateurs du concentrateur accordent un délai de grâce de 1 à 2 jours entre l'avertissement au titulaire du compte du contenu qui doit être supprimé et la suppression ou la désactivation physique du compte. Cela donnera au propriétaire du contenu la possibilité d'exporter les métadonnées de son canal et de les importer sur un autre site. Dans de rares cas, le contenu peut être de nature à justifier la résiliation immédiate du compte. Il s'agit d'une décision de hub, pas d'une décision de $Projectname. + +Si vous publiez régulièrement des contenus à caractère adulte ou offensant, nous vous encourageons fortement à marquer votre compte "NSFW" (Not Safe For Work). Ceci empêchera l'affichage de votre photo de profil dans le répertoire, sauf pour les visiteurs qui ont choisi de désactiver le "safe mode". Si votre photo de profil est trouvée par les administrateurs d'annuaire comme étant adulte ou offensante, l'administrateur d'annuaire PEUT marquer votre photo de profil comme NSFW. Il n'existe actuellement aucun mécanisme officiel pour contester ou renverser cette décision, c'est pourquoi vous DEVEZ marquer votre propre compte NSFW s'il est susceptible d'être inapproprié pour le grand public. + +[h3]Remerciements[/h3] + +Merci à tous ceux qui ont aidé et contribué au projet et à ses prédécesseurs au fil des ans. +Il est possible que votre nom nous ait échappé, mais ce n'est pas intentionnel. Nous remercions également la collectivité et ses membres pour leur précieuse contribution et sans qui tout cet effort n'aurait pas de sens. + +Il convient également de reconnaître les contributions et les solutions aux problèmes qui sont apparus à la suite de des discussions entre les membres et les développeurs d'autres projets quelque peu liés et concurrents ; même si nous avons eu nos désaccords occasionnels. + +[list] +[li]Mike Macgirvin[/li] +[li]Fabio Comuni[/li] +[li]Simon L'nu[/li] +[li]marijus[/li] +[li]Tobias Diekershoff[/li] +[li]fabrixxm[/li] +[li]tommy tomson[/li] +[li]Simon[/li] +[li]zottel[/li] +[li]Christian Vogeley[/li] +[li]jeroenpraat[/li] +[li]Michael Vogel[/li] +[li]erik[/li] +[li]Zach Prezkuta[/li] +[li]Paolo T[/li] +[li]Michael Meer[/li] +[li]Michael[/li] +[li]Abinoam P. Marques Jr[/li] +[li]Tobias Hößl[/li] +[li]Alexander Kampmann[/li] +[li]Olaf Conradi[/li] +[li]Paolo Tacconi[/li] +[li]tobiasd[/li] +[li]Devlon Duthie[/li] +[li]Zvi ben Yaakov (a.k.a rdc)[/li] +[li]Alexandre Hannud Abdo[/li] +[li]Olivier Migeot[/li] +[li]Chris Case[/li] +[li]Klaus Weidenbach[/li] +[li]Michael Johnston[/li] +[li]olivierm[/li] +[li]Vasudev Kamath[/li] +[li]pixelroot[/li] +[li]Max Weller[/li] +[li]duthied[/li] +[li]Martin Schmitt[/li] +[li]Sebastian Egbers[/li] +[li]Erkan Yilmaz[/li] +[li]sasiflo[/li] +[li]Stefan Parviainen[/li] +[li]Haakon Meland Eriksen[/li] +[li]Oliver Hartmann (23n)[/li] +[li]Erik Lundin[/li] +[li]habeascodice[/li] +[li]sirius[/li] +[li]Charles[/li] +[li]Tony Baldwin[/li] +[li]Hauke Zuehl[/li] +[li]Keith Fernie[/li] +[li]Anne Walk[/li] +[li]toclimb[/li] +[li]Daniel Frank[/li] +[li]Matthew Exon[/li] +[li]Michal Supler[/li] +[li]Tobias Luther[/li] +[li]U-SOUND\mike[/li] +[li]mrjive[/li] +[li]nostupidzone[/li] +[li]tonnerkiller[/li] +[li]Antoine G[/li] +[li]Christian Drechsler[/li] +[li]Ludovic Grossard[/li] +[li]RedmatrixCanada[/li] +[li]Stanislav Lechev [0xAF][/li] +[li]aweiher[/li] +[li]bufalo1973[/li] +[li]dsp1986[/li] +[li]felixgilles[/li] +[li]ike[/li] +[li]maase2[/li] +[li]mycocham[/li] +[li]ndurchx[/li] +[li]pafcu[/li] +[li]Simó Albert i Beltran[/li] +[li]Manuel Reva[/li] +[li]Manuel Jiménez Friaza[/li] +[li]Gustav Wall aka "neue medienordnung plus"[/li] +[/list] -- cgit v1.2.3 From 0a51ea1bfa85d770f5dd2c7fd1428b785c17e125 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 25 Apr 2018 09:56:21 +0200 Subject: show caret-down on item-photo hover to indicate a dropdown menu --- view/css/conversation.css | 17 +++++++++++++++++ view/tpl/conv_item.tpl | 1 + view/tpl/conv_list.tpl | 1 + 3 files changed, 19 insertions(+) diff --git a/view/css/conversation.css b/view/css/conversation.css index c239a665b..c0d6712a9 100644 --- a/view/css/conversation.css +++ b/view/css/conversation.css @@ -87,6 +87,23 @@ margin-left:10px; } +.wall-item-photo-wrapper { + position: relative; +} + +.wall-item-photo-caret { + position: absolute; + left: 3px; + bottom: 0px; + color: #fff; + text-shadow: 1px 1px 3px rgba(0,0,0,0.5);; + display: none; +} + +.wall-item-photo-wrapper:hover .wall-item-photo-caret { + display: block; +} + .wall-item-divider { margin: 5px; } diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl index a1d287f26..a408a83d2 100755 --- a/view/tpl/conv_item.tpl +++ b/view/tpl/conv_item.tpl @@ -31,6 +31,7 @@
{{$item.name}} {{if $item.thread_author_menu}} + '; return $o; -- cgit v1.2.3 From 98cfad5f2d285b39aea5f9c3c5233a335812694f Mon Sep 17 00:00:00 2001 From: Galette Saucisse Date: Mon, 30 Apr 2018 09:19:30 +0200 Subject: Create /doc/context/fr/events/help.html --- doc/context/fr/events/help.html | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 doc/context/fr/events/help.html diff --git a/doc/context/fr/events/help.html b/doc/context/fr/events/help.html new file mode 100644 index 000000000..aafd49703 --- /dev/null +++ b/doc/context/fr/events/help.html @@ -0,0 +1,8 @@ +
+
Informations de base
+
Cette page affiche un calendrier des événements qui vous appartiennent et que vous partagez avec d'autres canaux.
+
Vue du calendrier
+
Le calendrier peut être affiché en mode mois, semaine ou jour en utilisant les options du panneau latéral.
+
Exportation/Importation
+
Exporter ou importer des événements de calendrier en utilisant des fichiers au format standard iCalendar (.ics).
+
-- cgit v1.2.3 From b223e364c6221aa3c680505fda4acfd6a1790272 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 30 Apr 2018 10:28:32 +0200 Subject: Revert "hubzilla issue #1119 - xml2array has issues with some unicode sequences/conversions. Working around it using the older simplexml parser until it can be debugged, as Diaspora does not use complex XML with namespaces; which is where we need the more advaced capabilities of xml2array." This reverts commit f620274c6a68ae9a2a6a5142947aa199862087fc. --- include/network.php | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/include/network.php b/include/network.php index 8b7490a8a..72f1dacaf 100644 --- a/include/network.php +++ b/include/network.php @@ -648,7 +648,6 @@ function parse_xml_string($s, $strict = true) { libxml_use_internal_errors(true); - $x = @simplexml_load_string($s2); if($x === false) { logger('libxml: parse: error: ' . $s2, LOGGER_DATA); @@ -662,16 +661,6 @@ function parse_xml_string($s, $strict = true) { return $x; } - -function sxml2array ( $xmlObject, $out = array () ) -{ - foreach ( (array) $xmlObject as $index => $node ) - $out[$index] = ( is_object ( $node ) ) ? sxml2array ( $node ) : $node; - - return $out; -} - - /** * @brief Scales an external image. * -- cgit v1.2.3 From feb5d3af89cc8709f2774e0dc867f7c849cc80f7 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 30 Apr 2018 11:51:14 +0200 Subject: fix another pgsql update error --- Zotlabs/Update/_1211.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zotlabs/Update/_1211.php b/Zotlabs/Update/_1211.php index 7068ecbd3..26e25536d 100644 --- a/Zotlabs/Update/_1211.php +++ b/Zotlabs/Update/_1211.php @@ -8,7 +8,7 @@ class _1211 { if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) { $r1 = q("ALTER TABLE channel ADD channel_active timestamp NOT NULL DEFAULT '0001-01-01 00:00:00' "); - $r2 = q("create index \"channel_active\" on channel_active (\"channel_active\")"); + $r2 = q("create index \"channel_active_idx\" on channel (\"channel_active\")"); $r = ($r1 && $r2); } -- cgit v1.2.3 From 95f1366f0cb37664ab50dd83ebeb08e831319213 Mon Sep 17 00:00:00 2001 From: Galette Saucisse Date: Mon, 30 Apr 2018 12:22:42 +0200 Subject: Create /doc/context/fr/mail/help.html --- doc/context/fr/mail/help.html | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 doc/context/fr/mail/help.html diff --git a/doc/context/fr/mail/help.html b/doc/context/fr/mail/help.html new file mode 100644 index 000000000..fcf4eff21 --- /dev/null +++ b/doc/context/fr/mail/help.html @@ -0,0 +1,10 @@ +
+
Informations de base
+
Les messages affichés dans courrier privé ne sont visibles que pour vous et le destinataire unique.
+
Vue combinée
+
Les conversations complètes peuvent être visualisées dans un fil continu en sélectionnant Vue combinée . Les conversations disponibles sont affichées sous le menu dans le panneau latéral.
+
Boîte de réception/Boîte d'envoi
+
Les messages individuels envoyés sont visualisés en sélectionnant Boîte d'envoi, et les messages entrants sont visualisés en utilisant le filtre Boîte de réception.
+
Nouveau message.
+
Les messages individuels ont des rapports de livraison qui peuvent être visualisés à l'aide du menu déroulant. Les messages peuvent également être rappelés à partir du même menu, ce qui peut empêcher le destinataire de voir le message s'il ne l'a pas déjà lu.
+
-- cgit v1.2.3 From 897dd7f380ce2b06e34e3dc2da25f93dff57a44c Mon Sep 17 00:00:00 2001 From: Galette Saucisse Date: Mon, 30 Apr 2018 12:30:55 +0200 Subject: Create /doc/context/photos/help.html --- doc/context/fr/photos/help.html | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 doc/context/fr/photos/help.html diff --git a/doc/context/fr/photos/help.html b/doc/context/fr/photos/help.html new file mode 100644 index 000000000..8609e9849 --- /dev/null +++ b/doc/context/fr/photos/help.html @@ -0,0 +1,6 @@ +
+
Informations de base
+
Cette page affiche les albums photos du canal. Les images visibles pour l'observateur dépendent des permissions d'images individuelles.
+
Onglets de contenu du canal
+
Les onglets de contenu du canal sont des liens vers d'autres contenus publiés par le canal. L'onglet A propos permet d'accéder au profil de canal. L'onglet Photos permet d'accéder aux galeries de photos des chaînes. L'onglet Fichiers permet d'accéder aux fichiers généraux partagés publiés par le canal.
+
-- cgit v1.2.3 From 75f73fffe121a2f1b028f421ad0c7f4f71a4d7dc Mon Sep 17 00:00:00 2001 From: Galette Saucisse Date: Mon, 30 Apr 2018 12:35:46 +0200 Subject: Create /doc/context/fr/profile/help.html --- doc/context/fr/profile/help.html | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 doc/context/fr/profile/help.html diff --git a/doc/context/fr/profile/help.html b/doc/context/fr/profile/help.html new file mode 100644 index 000000000..26559db6f --- /dev/null +++ b/doc/context/fr/profile/help.html @@ -0,0 +1,6 @@ +
+
Informations de base
+
Ceci est la page de profil d'un canal. Il affiche typiquement des informations décrivant le canal. Si le canal représente une personne dans un réseau social, par exemple, le profil peut fournir des informations de contact et d'autres détails personnels sur la personne. Les canaux peuvent avoir plusieurs profils, où le profil affiché dépend de l'observateur.
+
Onglets de contenu du canal
+
Les onglets de contenu du canal sont des liens vers d'autres contenus publiés par le canal. L'onglet A propos permet d'accéder au profil de canal. L'onglet Photos permet d'accéder aux galeries de photos des chaînes. L'onglet Fichiers permet d'accéder aux fichiers généraux partagés publiés par le canal.
+
-- cgit v1.2.3 From 14953fa5c97dd24f026004a44a7d4ff240861ae7 Mon Sep 17 00:00:00 2001 From: Galette Saucisse Date: Mon, 30 Apr 2018 14:02:26 +0200 Subject: Create /doc/context/fr/settings/account/help.html --- doc/context/fr/settings/account/help.html | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 doc/context/fr/settings/account/help.html diff --git a/doc/context/fr/settings/account/help.html b/doc/context/fr/settings/account/help.html new file mode 100644 index 000000000..ed8e7f374 --- /dev/null +++ b/doc/context/fr/settings/account/help.html @@ -0,0 +1,18 @@ +
+
Informations de base
+
+ Une fois que vous avez enregistré un compte dans la matrice, vous avez également créé un profil et un canal. +
+
Compte
+
+ Vous avez un compte. Il contient votre compte de courriel et votre mot de passe. Avec votre compte, vous accédez à votre profil et votre canal. Pensez à votre compte comme la façon dont vous vous authentifiez sur un site Hubzilla. Il vous permet de faire des choses, comme créer des profils et des canaux avec lesquels vous pouvez vous connecter à d'autres personnes. +
+
Profile
+
+ Vous vous êtes sûrement inscrit à d'autres services Internet, comme les forums ou les communautés en ligne. Pour chacun d'entre eux, vous avez fourni des informations sur vous-même, telles que la date de naissance, le pays, l'âge et autres. Contrairement à d'autres services, Hubzilla vous offre l'avantage de créer plus de profils. Vous pouvez ainsi faire la distinction entre les profils qui s'adressent à tous (votre profil public) et vos collègues de travail, votre famille et votre partenaire. Pensez à votre profil comme étant l'information de base sur vous-même que vous donnez aux autres. +
+
Channel
+
+ Lors de l'enregistrement, vous avez créé votre premier canal. Oui, en plus de plusieurs profils, vous pouvez avoir plusieurs canaux. Cela pourrait être un peu confus au début, mais mettons les choses au clair. Vous avez déjà créé un canal. Vous pouvez utiliser celui-ci pour le public, pour communiquer avec les gens sur la vie de tous les jours. Mais vous êtes peut-être un lecteur de livres passionné et beaucoup de gens s'ennuient. Ainsi, vous ouvrez un second canal juste pour les amateurs de livres, où vous pouvez tous parler de livres autant que vous le souhaitez. Il s'agit évidemment d'un nouveau flux de messages, avec un nouveau profil (ou nouveaux profils) et des contacts complètement différents. Certaines connexions peuvent exister dans les deux canaux, mais il y en aura qui sont exclusives à l'un d'entre eux. Vous-même vous changez entre les deux comme vous le feriez dans la vie réelle lorsque vous parlez à des gens que vous rencontrez dans la rue ou à des gens que vous rencontrez pour parler de livres spécifiquement. Vous pouvez même vous connecter à vous-même, ou mieux : à votre autre canal .
Penser un canal comme différents espaces dédiés à différents sujets où vous rencontrez différentes personnes.
. +
+
-- cgit v1.2.3 From 7f244a8039b9dc2c342fa18f758a56e6027afade Mon Sep 17 00:00:00 2001 From: Galette Saucisse Date: Mon, 30 Apr 2018 14:04:38 +0200 Subject: Create /doc/context/fr/settings/channel/help.html --- doc/context/fr/settings/channel/help.html | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 doc/context/fr/settings/channel/help.html diff --git a/doc/context/fr/settings/channel/help.html b/doc/context/fr/settings/channel/help.html new file mode 100644 index 000000000..ed8e7f374 --- /dev/null +++ b/doc/context/fr/settings/channel/help.html @@ -0,0 +1,18 @@ +
+
Informations de base
+
+ Une fois que vous avez enregistré un compte dans la matrice, vous avez également créé un profil et un canal. +
+
Compte
+
+ Vous avez un compte. Il contient votre compte de courriel et votre mot de passe. Avec votre compte, vous accédez à votre profil et votre canal. Pensez à votre compte comme la façon dont vous vous authentifiez sur un site Hubzilla. Il vous permet de faire des choses, comme créer des profils et des canaux avec lesquels vous pouvez vous connecter à d'autres personnes. +
+
Profile
+
+ Vous vous êtes sûrement inscrit à d'autres services Internet, comme les forums ou les communautés en ligne. Pour chacun d'entre eux, vous avez fourni des informations sur vous-même, telles que la date de naissance, le pays, l'âge et autres. Contrairement à d'autres services, Hubzilla vous offre l'avantage de créer plus de profils. Vous pouvez ainsi faire la distinction entre les profils qui s'adressent à tous (votre profil public) et vos collègues de travail, votre famille et votre partenaire. Pensez à votre profil comme étant l'information de base sur vous-même que vous donnez aux autres. +
+
Channel
+
+ Lors de l'enregistrement, vous avez créé votre premier canal. Oui, en plus de plusieurs profils, vous pouvez avoir plusieurs canaux. Cela pourrait être un peu confus au début, mais mettons les choses au clair. Vous avez déjà créé un canal. Vous pouvez utiliser celui-ci pour le public, pour communiquer avec les gens sur la vie de tous les jours. Mais vous êtes peut-être un lecteur de livres passionné et beaucoup de gens s'ennuient. Ainsi, vous ouvrez un second canal juste pour les amateurs de livres, où vous pouvez tous parler de livres autant que vous le souhaitez. Il s'agit évidemment d'un nouveau flux de messages, avec un nouveau profil (ou nouveaux profils) et des contacts complètement différents. Certaines connexions peuvent exister dans les deux canaux, mais il y en aura qui sont exclusives à l'un d'entre eux. Vous-même vous changez entre les deux comme vous le feriez dans la vie réelle lorsque vous parlez à des gens que vous rencontrez dans la rue ou à des gens que vous rencontrez pour parler de livres spécifiquement. Vous pouvez même vous connecter à vous-même, ou mieux : à votre autre canal .
Penser un canal comme différents espaces dédiés à différents sujets où vous rencontrez différentes personnes.
. +
+
-- cgit v1.2.3 From f094ac19d117253c201b6c5113d06241d95bd71b Mon Sep 17 00:00:00 2001 From: Galette Saucisse Date: Mon, 30 Apr 2018 14:16:02 +0200 Subject: Create /doc/context/fr/settings/tokens --- doc/context/fr/settings/tokens | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 doc/context/fr/settings/tokens diff --git a/doc/context/fr/settings/tokens b/doc/context/fr/settings/tokens new file mode 100644 index 000000000..6be17a615 --- /dev/null +++ b/doc/context/fr/settings/tokens @@ -0,0 +1,20 @@ +
+
Jetons d'accès invités
+
+ Afin de faciliter le partage de ressources privées avec des non-membres ou des membres de nœuds de fédération à découverte d'identification limitée, Hubzilla devrait fournir aux membres un mécanisme pour créer et gérer des logins temporaires («jetables»), alias «Zot Access Tokens». Ces jetons/accréditations peuvent être utilisés pour s'authentifier sur un site hubzilla dans le seul but d'accéder à des ressources privilégiées ou contrôlées (fichiers, photos, posts, pages web, salons de discussion, etc. +
+
Créer un jeton
+
+ Le formulaire à créer/éditer accepte trois paramètres, un nom lisible par l'homme, un mot de passe ou un jeton d'accès, et une expiration facultative. Une fois expiré, le jeton d'accès n'est plus valide, ne peut plus être utilisé et sera automatiquement supprimé de la liste des comptes temporaires. Le champ mot de passe dans les formulaires de création/édition affiche le texte du jeton d'accès et non un mot de passe masqué. +
+
Partager un jeton
+
+ Nous ne spécifions pas de mécanismes pour partager ces jetons avec d'autres. Toute méthode de communication peut être utilisée. Tous les jetons que vous avez créés sont ajoutés au sélecteur de liste de contrôle d'accès et peuvent être utilisés partout où des listes de contrôle d'accès sont fournies. + + Exemple : Un visiteur arrive sur votre site. Elle a un jeton d'accès que vous lui avez fourni et tente de visiter l'un de vos albums photos (qui ne peut être visionné que par vous-même et une identité temporaire). La permission est refusée. + + Le visiteur sélectionne maintenant «Login» dans la barre de navigation du menu. Ceci présente une page de connexion. Elle entre le nom et le mot de passe que vous lui avez fournis, et elle peut maintenant voir l'album photo restreint. + + Alternativement, vous pouvez partager un lien vers un fichier protégé en ajoutant un paramètre «&zat=abc123» à l'URL, où la chaîne «abc123» est la clé d'accès ou le mot de passe pour la connexion temporaire. Aucune autre négociation n'est nécessaire et le dossier est présenté. +
+
-- cgit v1.2.3 From 9c5ddf079a7fcee3eba5f84fe39c66f636701cad Mon Sep 17 00:00:00 2001 From: Galette Saucisse Date: Mon, 30 Apr 2018 14:27:05 +0200 Subject: Create /doc/context/fr/webpages/help.html --- doc/context/fr/webpages/help.html | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 doc/context/fr/webpages/help.html diff --git a/doc/context/fr/webpages/help.html b/doc/context/fr/webpages/help.html new file mode 100644 index 000000000..c9d34c08f --- /dev/null +++ b/doc/context/fr/webpages/help.html @@ -0,0 +1,8 @@ +
+
Informations de base
+
Vous pouvez créer des sites Web modulaires, conscients de l'identité, composés d'éléments partageables.
+
Pages
+
Cette page énumère vos "pages", qui sont assignées des URLs où les gens peuvent visiter votre site. La structure des pages est généralement décrite par une mise en page associée , et leur contenu est construit à partir d'une collection de blocs.
+
Outils de portage de site Web
+
Les outils de portation de site Web vous permettent d'importer/exporter plusieurs éléments de pages Web (pages, mises en page, mises en page, blocs). Vous pouvez importer soit à partir d'un fichier zip téléchargé, soit à partir d'un dossier de fichiers cloud existant. Vous pouvez exporter vers un fichier zip contenant un groupe choisi d'éléments de page Web sous une forme compatible avec l'outil d'importation, ou vous pouvez exporter directement vers un dossier de fichiers dans le cloud. en savoir plus...
+
-- cgit v1.2.3 From d872a0ca86c2ec50f5be75cf6ee53dd7101fc12c Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 30 Apr 2018 14:33:35 +0200 Subject: activitypub xchans do not have an xchan_addr. use xchan_url for the follow button if we do not find an xchan_addr --- include/connections.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/connections.php b/include/connections.php index e5bf07d96..32baa94bd 100644 --- a/include/connections.php +++ b/include/connections.php @@ -127,7 +127,7 @@ function vcard_from_xchan($xchan, $observer = null, $mode = '') { return replace_macros(get_markup_template('xchan_vcard.tpl'),array( '$name' => $xchan['xchan_name'], '$photo' => ((is_array(App::$profile) && array_key_exists('photo',App::$profile)) ? App::$profile['photo'] : $xchan['xchan_photo_l']), - '$follow' => $xchan['xchan_addr'], + '$follow' => (($xchan['xchan_addr']) ? $xchan['xchan_addr'] : $xchan['xchan_url']), '$link' => zid($xchan['xchan_url']), '$connect' => $connect, '$newwin' => (($mode === 'chanview') ? t('New window') : ''), -- cgit v1.2.3 From 57cb4ccb7439940dac06ee4393e2a067f1a7c673 Mon Sep 17 00:00:00 2001 From: Galette Saucisse Date: Mon, 30 Apr 2018 14:36:19 +0200 Subject: Create /doc/context/fr/wiki/help.html --- doc/context/fr/wiki/help.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 doc/context/fr/wiki/help.html diff --git a/doc/context/fr/wiki/help.html b/doc/context/fr/wiki/help.html new file mode 100644 index 000000000..af46899e4 --- /dev/null +++ b/doc/context/fr/wiki/help.html @@ -0,0 +1,13 @@ +
+
Informations de base
+
Chaque wiki est une collection de pages, composée sous forme de fichiers texte au format Markdown.
+
Liste des wikis
+
Les wikis appartenant au canal que vous avez la permission de voir sont listés dans le panneau latéral.
+
Historique de la page
+
Chaque révision d'une page est sauvegardée pour permettre un retour rapide. Cliquez sur l'onglet History pour afficher l'historique des révisions de page, y compris la date et l'auteur de chacune d'entre elles. Le bouton Revenir chargera la révision sélectionnée mais n'enregistrera pas automatiquement la page.
+
Pages
+
La liste des pages du wiki est listée dans le panneau Pages Wiki. Avant d'enregistrer les modifications de page à l'aide du menu déroulant Page, vous pouvez entrer un message personnalisé à afficher dans le visualiseur d'historique de page avec la révision.
+
+ + + -- cgit v1.2.3 From 32423a7706c45d0d7187444f50eac33ca4fdfaa0 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 30 Apr 2018 22:30:59 -0700 Subject: parent folder permissions weren't being checked back to the cloud root directory in all cases --- Zotlabs/Module/Photo.php | 70 +++++++++++++++--------------------------------- include/attach.php | 39 ++++++++++++++++++--------- 2 files changed, 47 insertions(+), 62 deletions(-) diff --git a/Zotlabs/Module/Photo.php b/Zotlabs/Module/Photo.php index 8a110f925..b3171fe75 100644 --- a/Zotlabs/Module/Photo.php +++ b/Zotlabs/Module/Photo.php @@ -127,69 +127,45 @@ class Photo extends \Zotlabs\Web\Controller { } } - $r = q("SELECT uid FROM photo WHERE resource_id = '%s' AND imgscale = %d LIMIT 1", + $r = q("SELECT uid, photo_usage FROM photo WHERE resource_id = '%s' AND imgscale = %d LIMIT 1", dbesc($photo), intval($resolution) ); if($r) { - - $allowed = (($r[0]['uid']) ? perm_is_allowed($r[0]['uid'],$observer_xchan,'view_storage') : true); - - $sql_extra = permissions_sql($r[0]['uid']); - if(! $sql_extra) - $sql_extra = ' and true '; - - // Only check permissions on normal photos. Those photos we don't check includes - // profile photos, xchan photos (which are also profile photos), 'thing' photos, - // and cover photos - - $sql_extra = " and (( photo_usage = 0 $sql_extra ) or photo_usage != 0 )"; + $allowed = (-1); + if(intval($r[0]['photo_usage'])) { + $allowed = 1; + if(intval($r[0]['photo_usage']) === PHOTO_COVER) + if($resolution < PHOTO_RES_COVER_1200) + $allowed = (-1); + if(intval($r[0]['photo_usage']) === PHOTO_PROFILE) + if(! in_array($resolution,[4,5,6])) + $allowed = (-1); + } + if($allowed === (-1)) + $allowed = attach_can_view($r[0]['uid'],$observer_xchan,$photo); + $channel = channelx_by_n($r[0]['uid']); // Now we'll see if we can access the photo - $r = q("SELECT * FROM photo WHERE resource_id = '%s' AND imgscale = %d $sql_extra LIMIT 1", + $e = q("SELECT * FROM photo WHERE resource_id = '%s' AND imgscale = %d $sql_extra LIMIT 1", dbesc($photo), intval($resolution) ); - // viewing cover photos is allowed unless a plugin chooses to block it. - - if($r && intval($r[0]['photo_usage']) === PHOTO_COVER && $resolution >= PHOTO_RES_COVER_1200) - $allowed = 1; - - $d = [ 'imgscale' => $resolution, 'resource_id' => $photo, 'photo' => $r, 'allowed' => $allowed ]; - call_hooks('get_photo',$d); + $exists = (($e) ? true : false); - $resolution = $d['imgscale']; - $photo = $d['resource_id']; - $r = $d['photo']; - $allowed = $d['allowed']; - - if($r && $allowed) { - $data = dbunescbin($r[0]['content']); - $mimetype = $r[0]['mimetype']; - if(intval($r[0]['os_storage'])) { + if($exists && $allowed) { + $data = dbunescbin($e[0]['content']); + $mimetype = $e[0]['mimetype']; + if(intval($e[0]['os_storage'])) { $streaming = $data; } } else { - - // Does the picture exist? It may be a remote person with no credentials, - // but who should otherwise be able to view it. Show a default image to let - // them know permissions was denied. It may be possible to view the image - // through an authenticated profile visit. - // There won't be many completely unauthorised people seeing this because - // they won't have the photo link, so there's a reasonable chance that the person - // might be able to obtain permission to view it. - - $r = q("SELECT * FROM photo WHERE resource_id = '%s' AND imgscale = %d LIMIT 1", - dbesc($photo), - intval($resolution) - ); - - if($r) { + if(! $allowed) { logger('mod_photo: forbidden. ' . \App::$query_string); $observer = \App::get_observer(); logger('mod_photo: observer = ' . (($observer) ? $observer['xchan_addr'] : '(not authenticated)')); @@ -201,9 +177,6 @@ class Photo extends \Zotlabs\Web\Controller { } } - - - if(! isset($data)) { if(isset($resolution)) { switch($resolution) { @@ -295,7 +268,6 @@ class Photo extends \Zotlabs\Web\Controller { } killme(); - // NOTREACHED } } diff --git a/include/attach.php b/include/attach.php index 27bf0218a..0d2b43b58 100644 --- a/include/attach.php +++ b/include/attach.php @@ -266,14 +266,12 @@ function attach_by_hash($hash, $observer_hash, $rev = 0) { return $ret; } - if(! perm_is_allowed($r[0]['uid'], $observer_hash, 'view_storage')) { + if(! attach_can_view($r[0]['uid'], $observer_hash, $hash)) { $ret['message'] = t('Permission denied.'); return $ret; } - $sql_extra = permissions_sql($r[0]['uid'],$observer_hash); - - // Now we'll see if we can access the attachment + // We've already checked for existence and permissions $r = q("SELECT * FROM attach WHERE hash = '%s' and uid = %d $sql_extra LIMIT 1", dbesc($hash), @@ -281,20 +279,12 @@ function attach_by_hash($hash, $observer_hash, $rev = 0) { ); if(! $r) { - $ret['message'] = t('Permission denied.'); + $ret['message'] = t('Unknown error.'); return $ret; } $r[0]['content'] = dbunescbin($r[0]['content']); - if($r[0]['folder']) { - $x = attach_can_view_folder($r[0]['uid'],$observer_hash,$r[0]['folder']); - if(! $x) { - $ret['message'] = t('Permission denied.'); - return $ret; - } - } - $ret['success'] = true; $ret['data'] = $r[0]; @@ -302,6 +292,29 @@ function attach_by_hash($hash, $observer_hash, $rev = 0) { } +function attach_can_view($uid,$ob_hash,$resource) { + + $sql_extra = permissions_sql($uid,$ob_hash); + $hash = $resource; + + if(! perm_is_allowed($uid,$ob_hash,'view_storage')) { + return false; + } + + $r = q("select folder from attach where hash = '%s' and uid = %d $sql_extra", + dbesc($hash), + intval($uid) + ); + if(! $r) { + return false; + } + + return attach_can_view_folder($uid,$ob_hash,$r[0]['folder']); + +} + + + function attach_can_view_folder($uid,$ob_hash,$folder_hash) { $sql_extra = permissions_sql($uid,$ob_hash); -- cgit v1.2.3 From 3f75dd108374d24674436c58deb9d2a795fbf604 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 1 May 2018 10:34:23 +0200 Subject: Revert "Revert "hubzilla issue #1119 - xml2array has issues with some unicode sequences/conversions. Working around it using the older simplexml parser until it can be debugged, as Diaspora does not use complex XML with namespaces; which is where we need the more advaced capabilities of xml2array."" This reverts commit b223e364c6221aa3c680505fda4acfd6a1790272. --- include/network.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/network.php b/include/network.php index 72f1dacaf..8b7490a8a 100644 --- a/include/network.php +++ b/include/network.php @@ -648,6 +648,7 @@ function parse_xml_string($s, $strict = true) { libxml_use_internal_errors(true); + $x = @simplexml_load_string($s2); if($x === false) { logger('libxml: parse: error: ' . $s2, LOGGER_DATA); @@ -661,6 +662,16 @@ function parse_xml_string($s, $strict = true) { return $x; } + +function sxml2array ( $xmlObject, $out = array () ) +{ + foreach ( (array) $xmlObject as $index => $node ) + $out[$index] = ( is_object ( $node ) ) ? sxml2array ( $node ) : $node; + + return $out; +} + + /** * @brief Scales an external image. * -- cgit v1.2.3 From 08bcd29eeee1166d62791b04c7de4a6c1a4e7456 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 1 May 2018 16:15:59 -0700 Subject: hubzilla issue #1149, don't duplicate addressbook entries on repeated channel imports --- Zotlabs/Module/Import.php | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/Zotlabs/Module/Import.php b/Zotlabs/Module/Import.php index 81c405f00..58f0c60d5 100644 --- a/Zotlabs/Module/Import.php +++ b/Zotlabs/Module/Import.php @@ -363,11 +363,27 @@ class Import extends \Zotlabs\Web\Controller { continue; } - abook_store_lowlevel($abook); + $r = q("select abook_id from abook where abook_xchan = '%s' and abook_channel = %d limit 1", + dbesc($abook['abook_xchan']), + intval($channel['channel_id']) + ); + if($r) { + foreach($abook as $k => $v) { + $r = q("UPDATE abook SET " . TQUOT . "%s" . TQUOT . " = '%s' WHERE abook_xchan = '%s' AND abook_channel = %d", + dbesc($k), + dbesc($v), + dbesc($abook['abook_xchan']), + intval($channel['channel_id']) + ); + } + } + else { + abook_store_lowlevel($abook); - $friends ++; - if(intval($abook['abook_feed'])) - $feeds ++; + $friends ++; + if(intval($abook['abook_feed'])) + $feeds ++; + } translate_abook_perms_inbound($channel,$abook_copy); -- cgit v1.2.3 From db930b794dc228f24549d7ef8052be8110990e1f Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 1 May 2018 16:54:54 -0700 Subject: provide warnings about profile photo and cover photo permissions --- Zotlabs/Module/Cover_photo.php | 1 + Zotlabs/Module/Profile_photo.php | 1 + view/tpl/cover_photo.tpl | 3 +++ view/tpl/profile_photo.tpl | 4 +++- 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Zotlabs/Module/Cover_photo.php b/Zotlabs/Module/Cover_photo.php index d76c1b408..76e80156c 100644 --- a/Zotlabs/Module/Cover_photo.php +++ b/Zotlabs/Module/Cover_photo.php @@ -355,6 +355,7 @@ class Cover_photo extends \Zotlabs\Web\Controller { $o .= replace_macros($tpl,array( '$user' => \App::$channel['channel_address'], + '$info' => t('Your cover photo may be visible to anybody on the internet'), '$existing' => get_cover_photo(local_channel(),'array',PHOTO_RES_COVER_850), '$lbl_upfile' => t('Upload File:'), '$lbl_profiles' => t('Select a profile:'), diff --git a/Zotlabs/Module/Profile_photo.php b/Zotlabs/Module/Profile_photo.php index 2ce8686b9..751c4338f 100644 --- a/Zotlabs/Module/Profile_photo.php +++ b/Zotlabs/Module/Profile_photo.php @@ -451,6 +451,7 @@ class Profile_photo extends \Zotlabs\Web\Controller { $o .= replace_macros($tpl,array( '$user' => \App::$channel['channel_address'], + '$info' => ((count($profiles) > 1) ? t('Your default profile photo is visible to anybody on the internet. Profile photos for alternate profiles will inherit the permissions of the profile') : t('Your profile photo is visible to anybody on the internet and may be distributed to other websites.')), '$importfile' => (($importing) ? \App::$data['importfile'] : ''), '$lbl_upfile' => t('Upload File:'), '$lbl_profiles' => t('Select a profile:'), diff --git a/view/tpl/cover_photo.tpl b/view/tpl/cover_photo.tpl index 92efcdf02..5a5bf2286 100755 --- a/view/tpl/cover_photo.tpl +++ b/view/tpl/cover_photo.tpl @@ -86,6 +86,9 @@

{{$title}}

+ {{if $info}} +
{{$info}}
+ {{/if}} {{if $existing}} {{t('Cover Photo')}} {{/if}} diff --git a/view/tpl/profile_photo.tpl b/view/tpl/profile_photo.tpl index e48d05330..819502df5 100755 --- a/view/tpl/profile_photo.tpl +++ b/view/tpl/profile_photo.tpl @@ -94,7 +94,9 @@
- + {{if $info}} +
{{$info}}
+ {{/if}} {{if $importfile}} {{else}} -- cgit v1.2.3 From cd200ee7064159e4bc253fefe04ddf6ba25d4dde Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 1 May 2018 19:38:32 -0700 Subject: The channel import page seems to have missed the big theme cleanup of the last couple of years. --- Zotlabs/Module/Import.php | 19 ++++++++------ include/dba/dba_driver.php | 25 +++++++++++++++++++ view/css/mod_import.css | 37 ---------------------------- view/tpl/channel_import.tpl | 60 ++++++++++++++++++++------------------------- 4 files changed, 62 insertions(+), 79 deletions(-) delete mode 100644 view/css/mod_import.css diff --git a/Zotlabs/Module/Import.php b/Zotlabs/Module/Import.php index 58f0c60d5..c36e4723a 100644 --- a/Zotlabs/Module/Import.php +++ b/Zotlabs/Module/Import.php @@ -532,16 +532,19 @@ class Import extends \Zotlabs\Web\Controller { '$desc' => t('Use this form to import an existing channel from a different server/hub. You may retrieve the channel identity from the old server/hub via the network or provide an export file.'), '$label_filename' => t('File to Upload'), '$choice' => t('Or provide the old server/hub details'), - '$label_old_address' => t('Your old identity address (xyz@example.com)'), - '$label_old_email' => t('Your old login email address'), - '$label_old_pass' => t('Your old login password'), + + '$old_address' => [ 'old_address', t('Your old identity address (xyz@example.com)'), '', ''], + '$email' => [ 'email', t('Your old login email address'), '', '' ], + '$password' => [ 'password', t('Your old login password'), '', '' ], + '$import_posts' => [ 'import_posts', t('Import a few months of posts if possible (limited by available memory'), false, '', [ t('No'), t('Yes') ]], + '$common' => t('For either option, please choose whether to make this hub your new primary address, or whether your old location should continue this role. You will be able to post from either location, but only one can be marked as the primary location for files, photos, and media.'), - '$label_import_primary' => t('Make this hub my primary location'), - '$label_import_moving' => t('Move this channel (disable all previous locations)'), - '$label_import_posts' => t('Import a few months of posts if possible (limited by available memory'), + + '$make_primary' => [ 'make_primary', t('Make this hub my primary location'), false, '', [ t('No'), t('Yes') ] ], + '$moving' => [ 'moving', t('Move this channel (disable all previous locations)'), false, '', [ t('No'), t('Yes') ] ], + '$pleasewait' => t('This process may take several minutes to complete. Please submit the form only once and leave this page open until finished.'), - '$email' => '', - '$pass' => '', + '$form_security_token' => get_form_security_token('channel_import'), '$submit' => t('Submit') )); diff --git a/include/dba/dba_driver.php b/include/dba/dba_driver.php index b3298b673..9e9f24bb3 100755 --- a/include/dba/dba_driver.php +++ b/include/dba/dba_driver.php @@ -460,3 +460,28 @@ function db_logger($s,$level = LOGGER_NORMAL,$syslog = LOG_INFO) { \DBA::$logging = false; \DBA::$dba->debug = $saved; } + + +function db_columns($table) { + + if($table) { + if(ACTIVE_DBTYPE === DBTYPE_POSTGRES) { + $r = q("SELECT column_name as field FROM information_schema.columns WHERE table_schema = 'public' AND table_name = '%s'", + dbesc($table) + ); + if($r) { + return ids_to_array($r,'field'); + } + } + else { + $r = q("show columns in %s", + dbesc($table) + ); + if($r) { + return ids_to_array($r,'Field'); + } + } + } + + return []; +} \ No newline at end of file diff --git a/view/css/mod_import.css b/view/css/mod_import.css deleted file mode 100644 index 8b988b324..000000000 --- a/view/css/mod_import.css +++ /dev/null @@ -1,37 +0,0 @@ -h2 { - margin-left: 15%; - margin-top: 8%; -} - -#import-channel-form { - font-size: 1.4em; - margin-left: 15%; - margin-top: 5%; - width: 50%; -} - - - -#import-channel-form .descriptive-paragraph { - color: #888; - margin-left: 20px; - margin-bottom: 25px; -} - -.import-label { - float: left; - width: 275px; -} - -.import-input { - float: left; - width: 275px; - padding: 5px; -} - - -.import-field-end { - clear: both; - margin-bottom: 20px; -} - diff --git a/view/tpl/channel_import.tpl b/view/tpl/channel_import.tpl index baffe9b06..d702a2437 100755 --- a/view/tpl/channel_import.tpl +++ b/view/tpl/channel_import.tpl @@ -1,43 +1,35 @@ -

{{$title}}

+
+
+

{{$title}}

+
+
+
-
- -
{{$desc}}
+ + + - - -
+ + +
-
{{$choice}}
+ - - -
+ {{include file="field_input.tpl" field=$old_address}} + {{include file="field_input.tpl" field=$email}} + {{include file="field_password.tpl" field=$password}} + {{include file="field_checkbox.tpl" field=$import_posts}} - - -
+ - - -
+ {{include file="field_checkbox.tpl" field=$make_primary}} + {{include file="field_checkbox.tpl" field=$moving}} - - -
+ -
{{$common}}
+ +
- - -
- - - -
- - -
- -
{{$pleasewait}}
-
+ +
+
-- cgit v1.2.3 From 7a55ead97db94284146612364b8ce1c59de8771f Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 1 May 2018 20:29:07 -0700 Subject: new feature (post 3.4): allow a different username to be used when importing. --- Zotlabs/Module/Import.php | 18 +++++++++++++++++- include/import.php | 7 ++++++- view/tpl/channel_import.tpl | 1 + 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/Zotlabs/Module/Import.php b/Zotlabs/Module/Import.php index c36e4723a..d031bf16b 100644 --- a/Zotlabs/Module/Import.php +++ b/Zotlabs/Module/Import.php @@ -6,6 +6,7 @@ require_once('include/zot.php'); require_once('include/channel.php'); require_once('include/import.php'); require_once('include/perm_upgrade.php'); +require_once('library/urlify/URLify.php'); /** @@ -38,6 +39,7 @@ class Import extends \Zotlabs\Web\Controller { $filename = basename($_FILES['filename']['name']); $filesize = intval($_FILES['filename']['size']); $filetype = $_FILES['filename']['type']; + $newname = trim(strtolower($_REQUEST['newname'])); // import channel from file if($src) { @@ -146,7 +148,20 @@ class Import extends \Zotlabs\Web\Controller { } } - $channel = import_channel($data['channel'], $account_id, $seize); + if($newname) { + $x = false; + + if(get_config('system','unicode_usernames')) { + $x = punify(mb_strtolower($newname)); + } + + if((! $x) || strlen($x) > 64) { + $x = strtolower(\URLify::transliterate($newname)); + } + $newname = $x; + } + + $channel = import_channel($data['channel'], $account_id, $seize, $newname); } else { $moving = false; @@ -542,6 +557,7 @@ class Import extends \Zotlabs\Web\Controller { '$make_primary' => [ 'make_primary', t('Make this hub my primary location'), false, '', [ t('No'), t('Yes') ] ], '$moving' => [ 'moving', t('Move this channel (disable all previous locations)'), false, '', [ t('No'), t('Yes') ] ], + '$newname' => [ 'newname', t('Use this channel nickname instead of the one provided'), '', t('Leave blank to keep your existing channel nickname. You will be randomly assigned a similar nickname if either name is already allocated on this site.')], '$pleasewait' => t('This process may take several minutes to complete. Please submit the form only once and leave this page open until finished.'), diff --git a/include/import.php b/include/import.php index 0d3fb8c32..ae6a0ab6a 100644 --- a/include/import.php +++ b/include/import.php @@ -14,7 +14,7 @@ require_once('include/perm_upgrade.php'); * @param int $seize * @return boolean|array */ -function import_channel($channel, $account_id, $seize) { +function import_channel($channel, $account_id, $seize, $newname = '') { if(! array_key_exists('channel_system',$channel)) { $channel['channel_system'] = (($channel['channel_pageflags'] & 0x1000) ? 1 : 0); @@ -30,6 +30,11 @@ function import_channel($channel, $account_id, $seize) { $channel['channel_hash'] = make_xchan_hash($channel['channel_guid'],$channel['channel_guid_sig']); + if($newname) { + $channel['channel_address'] = $newname; + } + + // Check for duplicate channels $r = q("select * from channel where (channel_guid = '%s' or channel_hash = '%s' or channel_address = '%s' ) limit 1", diff --git a/view/tpl/channel_import.tpl b/view/tpl/channel_import.tpl index d702a2437..c7cbb1742 100755 --- a/view/tpl/channel_import.tpl +++ b/view/tpl/channel_import.tpl @@ -24,6 +24,7 @@ {{include file="field_checkbox.tpl" field=$make_primary}} {{include file="field_checkbox.tpl" field=$moving}} + {{include file="field_input.tpl" field=$newname}} -- cgit v1.2.3 From 285781b8870d1c36cf90a3b38a448719b8bf9d21 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 2 May 2018 13:49:22 -0700 Subject: hubzilla issue #1151 - activitypub mention gets bookmarked --- include/network.php | 4 ++-- include/text.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/network.php b/include/network.php index 8b7490a8a..a00ede6bf 100644 --- a/include/network.php +++ b/include/network.php @@ -797,7 +797,7 @@ function xml2array($contents, $namespaces = true, $get_attributes=1, $priority = if($namespaces) $parser = @xml_parser_create_ns("UTF-8",':'); else - $parser = @xml_parser_create(); + $parser = @xml_parser_create('UTF-8'); if(! $parser) { logger('xml2array: xml_parser_create: no resource'); @@ -807,7 +807,7 @@ function xml2array($contents, $namespaces = true, $get_attributes=1, $priority = xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, "UTF-8"); // http://minutillo.com/steve/weblog/2004/6/17/php-xml-and-character-encodings-a-tale-of-sadness-rage-and-data-loss xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); - xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); + xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 0); @xml_parse_into_struct($parser, trim($contents), $xml_values); @xml_parser_free($parser); diff --git a/include/text.php b/include/text.php index 24f8e1623..dc3a155de 100644 --- a/include/text.php +++ b/include/text.php @@ -3313,9 +3313,9 @@ function cleanup_bbcode($body) { $body = preg_replace_callback('/\[zrl(.*?)\[\/(zrl)\]/ism','\red_escape_codeblock',$body); - $body = preg_replace_callback("/([^\]\='".'"'."\/]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\\ + $body = preg_replace_callback("/([^\]\='".'"'."\/\{]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\\ +\,\(\)]+)/ismu", '\nakedoembed', $body); - $body = preg_replace_callback("/([^\]\='".'"'."\/]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\\ + $body = preg_replace_callback("/([^\]\='".'"'."\/\{]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\\ +\,\(\)]+)/ismu", '\red_zrl_callback', $body); $body = preg_replace_callback('/\[\$b64zrl(.*?)\[\/(zrl)\]/ism','\red_unescape_codeblock',$body); -- cgit v1.2.3 From a24d254404b3e26b105e621b37bbd0652539b91e Mon Sep 17 00:00:00 2001 From: Klaus Weidenbach Date: Wed, 2 May 2018 23:15:04 +0200 Subject: Update composer autoload cache. Should add to Prepare RC Release documentation: composer dump-autoload --no-dev --- vendor/composer/autoload_classmap.php | 9 +++++++++ vendor/composer/autoload_static.php | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 26a230615..e7e1de1d0 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -925,6 +925,8 @@ return array( 'Zotlabs\\Module\\Notes' => $baseDir . '/Zotlabs/Module/Notes.php', 'Zotlabs\\Module\\Notifications' => $baseDir . '/Zotlabs/Module/Notifications.php', 'Zotlabs\\Module\\Notify' => $baseDir . '/Zotlabs/Module/Notify.php', + 'Zotlabs\\Module\\OAuth2TestVehicle' => $baseDir . '/Zotlabs/Module/Oauth2testvehicle.php', + 'Zotlabs\\Module\\Ochannel' => $baseDir . '/Zotlabs/Module/Ochannel.php', 'Zotlabs\\Module\\Oembed' => $baseDir . '/Zotlabs/Module/Oembed.php', 'Zotlabs\\Module\\Oep' => $baseDir . '/Zotlabs/Module/Oep.php', 'Zotlabs\\Module\\Oexchange' => $baseDir . '/Zotlabs/Module/Oexchange.php', @@ -974,6 +976,7 @@ return array( 'Zotlabs\\Module\\Settings\\Featured' => $baseDir . '/Zotlabs/Module/Settings/Featured.php', 'Zotlabs\\Module\\Settings\\Features' => $baseDir . '/Zotlabs/Module/Settings/Features.php', 'Zotlabs\\Module\\Settings\\Oauth' => $baseDir . '/Zotlabs/Module/Settings/Oauth.php', + 'Zotlabs\\Module\\Settings\\Oauth2' => $baseDir . '/Zotlabs/Module/Settings/Oauth2.php', 'Zotlabs\\Module\\Settings\\Permcats' => $baseDir . '/Zotlabs/Module/Settings/Permcats.php', 'Zotlabs\\Module\\Settings\\Tokens' => $baseDir . '/Zotlabs/Module/Settings/Tokens.php', 'Zotlabs\\Module\\Setup' => $baseDir . '/Zotlabs/Module/Setup.php', @@ -1027,6 +1030,7 @@ return array( 'Zotlabs\\Storage\\Directory' => $baseDir . '/Zotlabs/Storage/Directory.php', 'Zotlabs\\Storage\\File' => $baseDir . '/Zotlabs/Storage/File.php', 'Zotlabs\\Storage\\GitRepo' => $baseDir . '/Zotlabs/Storage/GitRepo.php', + 'Zotlabs\\Storage\\ZotOauth2Pdo' => $baseDir . '/Zotlabs/Storage/ZotOauth2Pdo.php', 'Zotlabs\\Text\\Tagadelic' => $baseDir . '/Zotlabs/Text/Tagadelic.php', 'Zotlabs\\Thumbs\\Epubthumb' => $baseDir . '/Zotlabs/Thumbs/Epubthumb.php', 'Zotlabs\\Thumbs\\Mp3audio' => $baseDir . '/Zotlabs/Thumbs/Mp3audio.php', @@ -1243,6 +1247,9 @@ return array( 'Zotlabs\\Update\\_1207' => $baseDir . '/Zotlabs/Update/_1207.php', 'Zotlabs\\Update\\_1208' => $baseDir . '/Zotlabs/Update/_1208.php', 'Zotlabs\\Update\\_1209' => $baseDir . '/Zotlabs/Update/_1209.php', + 'Zotlabs\\Update\\_1210' => $baseDir . '/Zotlabs/Update/_1210.php', + 'Zotlabs\\Update\\_1211' => $baseDir . '/Zotlabs/Update/_1211.php', + 'Zotlabs\\Update\\_1212' => $baseDir . '/Zotlabs/Update/_1212.php', 'Zotlabs\\Web\\CheckJS' => $baseDir . '/Zotlabs/Web/CheckJS.php', 'Zotlabs\\Web\\Controller' => $baseDir . '/Zotlabs/Web/Controller.php', 'Zotlabs\\Web\\HTTPHeaders' => $baseDir . '/Zotlabs/Web/HTTPHeaders.php', @@ -1261,6 +1268,7 @@ return array( 'Zotlabs\\Widget\\Appcloud' => $baseDir . '/Zotlabs/Widget/Appcloud.php', 'Zotlabs\\Widget\\Archive' => $baseDir . '/Zotlabs/Widget/Archive.php', 'Zotlabs\\Widget\\Bookmarkedchats' => $baseDir . '/Zotlabs/Widget/Bookmarkedchats.php', + 'Zotlabs\\Widget\\Catcloud' => $baseDir . '/Zotlabs/Widget/Catcloud.php', 'Zotlabs\\Widget\\Catcloud_wall' => $baseDir . '/Zotlabs/Widget/Catcloud_wall.php', 'Zotlabs\\Widget\\Categories' => $baseDir . '/Zotlabs/Widget/Categories.php', 'Zotlabs\\Widget\\Cdav' => $baseDir . '/Zotlabs/Widget/Cdav.php', @@ -1294,6 +1302,7 @@ return array( 'Zotlabs\\Widget\\Portfolio' => $baseDir . '/Zotlabs/Widget/Portfolio.php', 'Zotlabs\\Widget\\Profile' => $baseDir . '/Zotlabs/Widget/Profile.php', 'Zotlabs\\Widget\\Pubsites' => $baseDir . '/Zotlabs/Widget/Pubsites.php', + 'Zotlabs\\Widget\\Pubtagcloud' => $baseDir . '/Zotlabs/Widget/Pubtagcloud.php', 'Zotlabs\\Widget\\Random_block' => $baseDir . '/Zotlabs/Widget/Random_block.php', 'Zotlabs\\Widget\\Rating' => $baseDir . '/Zotlabs/Widget/Rating.php', 'Zotlabs\\Widget\\Savedsearch' => $baseDir . '/Zotlabs/Widget/Savedsearch.php', diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index d9b5ba2a6..11f2c01d6 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -1079,6 +1079,8 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d 'Zotlabs\\Module\\Notes' => __DIR__ . '/../..' . '/Zotlabs/Module/Notes.php', 'Zotlabs\\Module\\Notifications' => __DIR__ . '/../..' . '/Zotlabs/Module/Notifications.php', 'Zotlabs\\Module\\Notify' => __DIR__ . '/../..' . '/Zotlabs/Module/Notify.php', + 'Zotlabs\\Module\\OAuth2TestVehicle' => __DIR__ . '/../..' . '/Zotlabs/Module/Oauth2testvehicle.php', + 'Zotlabs\\Module\\Ochannel' => __DIR__ . '/../..' . '/Zotlabs/Module/Ochannel.php', 'Zotlabs\\Module\\Oembed' => __DIR__ . '/../..' . '/Zotlabs/Module/Oembed.php', 'Zotlabs\\Module\\Oep' => __DIR__ . '/../..' . '/Zotlabs/Module/Oep.php', 'Zotlabs\\Module\\Oexchange' => __DIR__ . '/../..' . '/Zotlabs/Module/Oexchange.php', @@ -1128,6 +1130,7 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d 'Zotlabs\\Module\\Settings\\Featured' => __DIR__ . '/../..' . '/Zotlabs/Module/Settings/Featured.php', 'Zotlabs\\Module\\Settings\\Features' => __DIR__ . '/../..' . '/Zotlabs/Module/Settings/Features.php', 'Zotlabs\\Module\\Settings\\Oauth' => __DIR__ . '/../..' . '/Zotlabs/Module/Settings/Oauth.php', + 'Zotlabs\\Module\\Settings\\Oauth2' => __DIR__ . '/../..' . '/Zotlabs/Module/Settings/Oauth2.php', 'Zotlabs\\Module\\Settings\\Permcats' => __DIR__ . '/../..' . '/Zotlabs/Module/Settings/Permcats.php', 'Zotlabs\\Module\\Settings\\Tokens' => __DIR__ . '/../..' . '/Zotlabs/Module/Settings/Tokens.php', 'Zotlabs\\Module\\Setup' => __DIR__ . '/../..' . '/Zotlabs/Module/Setup.php', @@ -1181,6 +1184,7 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d 'Zotlabs\\Storage\\Directory' => __DIR__ . '/../..' . '/Zotlabs/Storage/Directory.php', 'Zotlabs\\Storage\\File' => __DIR__ . '/../..' . '/Zotlabs/Storage/File.php', 'Zotlabs\\Storage\\GitRepo' => __DIR__ . '/../..' . '/Zotlabs/Storage/GitRepo.php', + 'Zotlabs\\Storage\\ZotOauth2Pdo' => __DIR__ . '/../..' . '/Zotlabs/Storage/ZotOauth2Pdo.php', 'Zotlabs\\Text\\Tagadelic' => __DIR__ . '/../..' . '/Zotlabs/Text/Tagadelic.php', 'Zotlabs\\Thumbs\\Epubthumb' => __DIR__ . '/../..' . '/Zotlabs/Thumbs/Epubthumb.php', 'Zotlabs\\Thumbs\\Mp3audio' => __DIR__ . '/../..' . '/Zotlabs/Thumbs/Mp3audio.php', @@ -1397,6 +1401,9 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d 'Zotlabs\\Update\\_1207' => __DIR__ . '/../..' . '/Zotlabs/Update/_1207.php', 'Zotlabs\\Update\\_1208' => __DIR__ . '/../..' . '/Zotlabs/Update/_1208.php', 'Zotlabs\\Update\\_1209' => __DIR__ . '/../..' . '/Zotlabs/Update/_1209.php', + 'Zotlabs\\Update\\_1210' => __DIR__ . '/../..' . '/Zotlabs/Update/_1210.php', + 'Zotlabs\\Update\\_1211' => __DIR__ . '/../..' . '/Zotlabs/Update/_1211.php', + 'Zotlabs\\Update\\_1212' => __DIR__ . '/../..' . '/Zotlabs/Update/_1212.php', 'Zotlabs\\Web\\CheckJS' => __DIR__ . '/../..' . '/Zotlabs/Web/CheckJS.php', 'Zotlabs\\Web\\Controller' => __DIR__ . '/../..' . '/Zotlabs/Web/Controller.php', 'Zotlabs\\Web\\HTTPHeaders' => __DIR__ . '/../..' . '/Zotlabs/Web/HTTPHeaders.php', @@ -1415,6 +1422,7 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d 'Zotlabs\\Widget\\Appcloud' => __DIR__ . '/../..' . '/Zotlabs/Widget/Appcloud.php', 'Zotlabs\\Widget\\Archive' => __DIR__ . '/../..' . '/Zotlabs/Widget/Archive.php', 'Zotlabs\\Widget\\Bookmarkedchats' => __DIR__ . '/../..' . '/Zotlabs/Widget/Bookmarkedchats.php', + 'Zotlabs\\Widget\\Catcloud' => __DIR__ . '/../..' . '/Zotlabs/Widget/Catcloud.php', 'Zotlabs\\Widget\\Catcloud_wall' => __DIR__ . '/../..' . '/Zotlabs/Widget/Catcloud_wall.php', 'Zotlabs\\Widget\\Categories' => __DIR__ . '/../..' . '/Zotlabs/Widget/Categories.php', 'Zotlabs\\Widget\\Cdav' => __DIR__ . '/../..' . '/Zotlabs/Widget/Cdav.php', @@ -1448,6 +1456,7 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d 'Zotlabs\\Widget\\Portfolio' => __DIR__ . '/../..' . '/Zotlabs/Widget/Portfolio.php', 'Zotlabs\\Widget\\Profile' => __DIR__ . '/../..' . '/Zotlabs/Widget/Profile.php', 'Zotlabs\\Widget\\Pubsites' => __DIR__ . '/../..' . '/Zotlabs/Widget/Pubsites.php', + 'Zotlabs\\Widget\\Pubtagcloud' => __DIR__ . '/../..' . '/Zotlabs/Widget/Pubtagcloud.php', 'Zotlabs\\Widget\\Random_block' => __DIR__ . '/../..' . '/Zotlabs/Widget/Random_block.php', 'Zotlabs\\Widget\\Rating' => __DIR__ . '/../..' . '/Zotlabs/Widget/Rating.php', 'Zotlabs\\Widget\\Savedsearch' => __DIR__ . '/../..' . '/Zotlabs/Widget/Savedsearch.php', -- cgit v1.2.3 From 406ea67bbc9b67ca4bd80d80eb012bc68afc5262 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 2 May 2018 17:39:12 -0700 Subject: Provide admin delete ability if the viewer is admin but has no existing delete authority. For 3.5+ as a new string is involved. --- Zotlabs/Lib/ThreadItem.php | 4 ++++ Zotlabs/Module/Item.php | 21 ++++++++++++++------- include/items.php | 1 - 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php index 61a012f9d..b7fc8e65d 100644 --- a/Zotlabs/Lib/ThreadItem.php +++ b/Zotlabs/Lib/ThreadItem.php @@ -141,6 +141,10 @@ class ThreadItem { 'delete' => t('Delete'), ); } + elseif(is_site_admin()) { + $drop = [ 'dropping' => true, 'delete' => t('Admin Delete') ]; + } + // FIXME if($observer_is_pageowner) { $multidrop = array( diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index bba1dc02d..87f83e877 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -1084,7 +1084,7 @@ class Item extends \Zotlabs\Web\Controller { if((argc() == 3) && (argv(1) === 'drop') && intval(argv(2))) { require_once('include/items.php'); - $i = q("select id, uid, author_xchan, owner_xchan, source_xchan, item_type from item where id = %d limit 1", + $i = q("select id, uid, item_origin, author_xchan, owner_xchan, source_xchan, item_type from item where id = %d limit 1", intval(argv(2)) ); @@ -1094,14 +1094,21 @@ class Item extends \Zotlabs\Web\Controller { if(local_channel() && local_channel() == $i[0]['uid']) $local_delete = true; - $sys = get_sys_channel(); - if(is_site_admin() && $sys['channel_id'] == $i[0]['uid']) - $can_delete = true; - + // The site admin can delete any post/item on the site. + // If the item originated on this site+channel the deletion will propagate downstream. + // Otherwise just the local copy is removed. + + if(is_site_admin()) { + $local_delete = true; + if(intval($i[0]['item_origin'])) + $can_delete = true; + } + $ob_hash = get_observer_hash(); - if($ob_hash && ($ob_hash === $i[0]['author_xchan'] || $ob_hash === $i[0]['owner_xchan'] || $ob_hash === $i[0]['source_xchan'])) + if($ob_hash && ($ob_hash === $i[0]['author_xchan'] || $ob_hash === $i[0]['owner_xchan'] || $ob_hash === $i[0]['source_xchan'])) { $can_delete = true; - + } + if(! ($can_delete || $local_delete)) { notice( t('Permission denied.') . EOL); return; diff --git a/include/items.php b/include/items.php index 8bc4595b6..2c9d84ef3 100755 --- a/include/items.php +++ b/include/items.php @@ -3561,7 +3561,6 @@ function item_expire($uid,$days,$comment_days = 7) { drop_item($item['id'],false); } -// Zotlabs\Daemon\Master::Summon(array('Notifier','expire',$uid)); } function retain_item($id) { -- cgit v1.2.3 From 9713436f497a031e4369130dda40b415ff285fd8 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 2 May 2018 18:23:42 -0700 Subject: backend work to allow admin to delete photos. Still requires frontend work to give admin access to either the photos and/or the delete link. --- Zotlabs/Module/Item.php | 15 ++++++++++----- Zotlabs/Module/Photos.php | 41 +++++++++++++++++++++++------------------ include/photos.php | 26 ++++++++++++++++++++------ 3 files changed, 53 insertions(+), 29 deletions(-) diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index 87f83e877..fd99c4a64 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -1084,6 +1084,8 @@ class Item extends \Zotlabs\Web\Controller { if((argc() == 3) && (argv(1) === 'drop') && intval(argv(2))) { require_once('include/items.php'); + + $i = q("select id, uid, item_origin, author_xchan, owner_xchan, source_xchan, item_type from item where id = %d limit 1", intval(argv(2)) ); @@ -1091,9 +1093,16 @@ class Item extends \Zotlabs\Web\Controller { if($i) { $can_delete = false; $local_delete = false; - if(local_channel() && local_channel() == $i[0]['uid']) + + if(local_channel() && local_channel() == $i[0]['uid']) { $local_delete = true; + } + $ob_hash = get_observer_hash(); + if($ob_hash && ($ob_hash === $i[0]['author_xchan'] || $ob_hash === $i[0]['owner_xchan'] || $ob_hash === $i[0]['source_xchan'])) { + $can_delete = true; + } + // The site admin can delete any post/item on the site. // If the item originated on this site+channel the deletion will propagate downstream. // Otherwise just the local copy is removed. @@ -1104,10 +1113,6 @@ class Item extends \Zotlabs\Web\Controller { $can_delete = true; } - $ob_hash = get_observer_hash(); - if($ob_hash && ($ob_hash === $i[0]['author_xchan'] || $ob_hash === $i[0]['owner_xchan'] || $ob_hash === $i[0]['source_xchan'])) { - $can_delete = true; - } if(! ($can_delete || $local_delete)) { notice( t('Permission denied.') . EOL); diff --git a/Zotlabs/Module/Photos.php b/Zotlabs/Module/Photos.php index a143c4d4c..e21f3025c 100644 --- a/Zotlabs/Module/Photos.php +++ b/Zotlabs/Module/Photos.php @@ -102,14 +102,7 @@ class Photos extends \Zotlabs\Web\Controller { if($_REQUEST['dropalbum'] == t('Delete Album')) { - - // This is dangerous because we combined file storage and photos into one interface - // This function will remove all photos from any directory with the same name since - // we have not passed the path value. - - // The correct solution would be to use a full pathname from your storage root for 'album' - // We also need to prevent/block removing the storage root folder. - + $folder_hash = ''; $r = q("select * from attach where is_dir = 1 and uid = %d and hash = '%s'", @@ -124,7 +117,8 @@ class Photos extends \Zotlabs\Web\Controller { $res = array(); - + $admin_delete = false; + // get the list of photos we are about to delete if(remote_channel() && (! local_channel())) { @@ -133,6 +127,10 @@ class Photos extends \Zotlabs\Web\Controller { elseif(local_channel()) { $str = photos_album_get_db_idstr(local_channel(),$album); } + elseif(is_site_admin()) { + $str = photos_album_get_db_idstr_admin($page_owner_uid,$album); + $admin_delete = true; + } else { $str = null; } @@ -145,7 +143,7 @@ class Photos extends \Zotlabs\Web\Controller { ); if($r) { foreach($r as $i) { - attach_delete($page_owner_uid, $i['resource_id'], 1 ); + attach_delete($page_owner_uid, $i['resource_id'], true ); } } @@ -158,12 +156,14 @@ class Photos extends \Zotlabs\Web\Controller { // @FIXME do the same for the linked attach if($folder_hash) { - attach_delete($page_owner_uid,$folder_hash, 1); - - $sync = attach_export_data(\App::$data['channel'],$folder_hash, true); + attach_delete($page_owner_uid, $folder_hash, true ); + + if(! $admin_delete) { + $sync = attach_export_data(\App::$data['channel'],$folder_hash, true); - if($sync) - build_sync_packet($page_owner_uid,array('file' => array($sync))); + if($sync) + build_sync_packet($page_owner_uid,array('file' => array($sync))); + } } } @@ -181,17 +181,22 @@ class Photos extends \Zotlabs\Web\Controller { $r = q("SELECT id, resource_id FROM photo WHERE ( xchan = '%s' or uid = %d ) AND resource_id = '%s' LIMIT 1", dbesc($ob_hash), intval(local_channel()), - dbesc(\App::$argv[2]) + dbesc(argv(2)) ); if($r) { - attach_delete($page_owner_uid, $r[0]['resource_id'], 1 ); + attach_delete($page_owner_uid, $r[0]['resource_id'], true ); $sync = attach_export_data(\App::$data['channel'],$r[0]['resource_id'], true); if($sync) build_sync_packet($page_owner_uid,array('file' => array($sync))); } - + elseif(is_site_admin()) { + // If the admin deletes a photo, don't sync + attach_delete($page_owner_uid, argv(2), true); + } + + goaway(z_root() . '/photos/' . \App::$data['channel']['channel_address'] . '/album/' . $_SESSION['album_return']); } diff --git a/include/photos.php b/include/photos.php index 9ae0e6874..495043bbf 100644 --- a/include/photos.php +++ b/include/photos.php @@ -786,17 +786,31 @@ function photos_album_get_db_idstr($channel_id, $album, $remote_xchan = '') { ); } if ($r) { - $arr = array(); - foreach ($r as $rr) { - $arr[] = "'" . dbesc($rr['hash']) . "'" ; - } - $str = implode(',',$arr); - return $str; + return ids_to_querystr($r,'hash',true); } return false; } +function photos_album_get_db_idstr_admin($channel_id, $album) { + + if(! is_site_admin()) + return false; + + $r = q("SELECT hash from attach where uid = %d and folder = '%s' ", + intval($channel_id), + dbesc($album) + ); + + if ($r) { + return ids_to_querystr($r,'hash',true); + } + + return false; +} + + + /** * @brief Creates a new photo item. * -- cgit v1.2.3 From e9f49d9d9c02ef6b2f5259f9a323a8a2a2d75af5 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 2 May 2018 20:08:59 -0700 Subject: admin delete of files --- Zotlabs/Module/Filestorage.php | 39 +++++++++++++++++++++++++++++++-------- Zotlabs/Storage/Browser.php | 4 +++- include/attach.php | 2 +- view/js/main.js | 2 ++ view/tpl/cloud_directory.tpl | 4 ++-- 5 files changed, 39 insertions(+), 12 deletions(-) diff --git a/Zotlabs/Module/Filestorage.php b/Zotlabs/Module/Filestorage.php index 5c8557e5a..cd9ab601d 100644 --- a/Zotlabs/Module/Filestorage.php +++ b/Zotlabs/Module/Filestorage.php @@ -66,7 +66,7 @@ class Filestorage extends \Zotlabs\Web\Controller { $perms = get_all_perms($owner, $ob_hash); - if(! $perms['view_storage']) { + if(! ($perms['view_storage'] || is_site_admin())){ notice( t('Permission denied.') . EOL); return; } @@ -75,15 +75,29 @@ class Filestorage extends \Zotlabs\Web\Controller { // need to return for anyone other than the owner, despite the perms check for now. $is_owner = (((local_channel()) && ($owner == local_channel())) ? true : false); - if(! $is_owner) { + if(! ($is_owner || is_site_admin())){ info( t('Permission Denied.') . EOL ); return; } if(argc() > 3 && argv(3) === 'delete') { + + if(argc() > 4 && argv(4) === 'json') + $json_return = true; + + + $admin_delete = false; + if(! $perms['write_storage']) { - notice( t('Permission denied.') . EOL); - return; + if(is_site_admin()) { + $admin_delete = true; + } + else { + notice( t('Permission denied.') . EOL); + if($json_return) + json_return_and_die([ 'success' => false ]); + return; + } } $file = intval(argv(2)); @@ -92,22 +106,31 @@ class Filestorage extends \Zotlabs\Web\Controller { intval($owner) ); if(! $r) { + if($json_return) + json_return_and_die([ 'success' => false ]); + notice( t('File not found.') . EOL); goaway(z_root() . '/cloud/' . $which); } $f = $r[0]; - $channel = \App::get_channel(); + + $channel = channelx_by_n($owner); $url = get_cloud_url($channel['channel_id'], $channel['channel_address'], $f['hash']); attach_delete($owner, $f['hash']); - $sync = attach_export_data($channel, $f['hash'], true); - if($sync) { - build_sync_packet($channel['channel_id'], array('file' => array($sync))); + if(! $admin_delete) { + $sync = attach_export_data($channel, $f['hash'], true); + if($sync) { + build_sync_packet($channel['channel_id'], array('file' => array($sync))); + } } + if(json_return) + json_return_and_die([ 'success' => true ]); + goaway(dirname($url)); } diff --git a/Zotlabs/Storage/Browser.php b/Zotlabs/Storage/Browser.php index 508c39d22..f4f906ad1 100644 --- a/Zotlabs/Storage/Browser.php +++ b/Zotlabs/Storage/Browser.php @@ -241,7 +241,7 @@ class Browser extends DAV\Browser\Plugin { // put the array for this file together $ft['attachId'] = $this->findAttachIdByHash($attachHash); - $ft['fileStorageUrl'] = substr($fullPath, 0, strpos($fullPath, "cloud/")) . "filestorage/" . $this->auth->getCurrentUser(); + $ft['fileStorageUrl'] = substr($fullPath, 0, strpos($fullPath, "cloud/")) . "filestorage/" . $this->auth->owner_nick; $ft['icon'] = $icon; $ft['photo_icon'] = $photo_icon; $ft['attachIcon'] = (($size) ? $attachIcon : ''); @@ -276,6 +276,8 @@ class Browser extends DAV\Browser\Plugin { '$create' => t('Create'), '$upload' => t('Add Files'), '$is_owner' => $is_owner, + '$is_admin' => is_site_admin(), + '$admin_delete' => t('Admin Delete'), '$parentpath' => $parentpath, '$cpath' => bin2hex(\App::$query_string), '$tiles' => intval($_SESSION['cloud_tiles']), diff --git a/include/attach.php b/include/attach.php index 0d2b43b58..2a9badaac 100644 --- a/include/attach.php +++ b/include/attach.php @@ -1585,8 +1585,8 @@ function get_cloud_url($channel_id, $channel_name, $attachHash) { } } while ($parentHash); - $url = z_root() . '/cloud/' . $channel_name . '/' . $parentFullPath . find_filename_by_hash($channel_id, $attachHash); + $url = z_root() . '/cloud/' . $channel_name . '/' . $parentFullPath . find_filename_by_hash($channel_id, $attachHash); return $url; } diff --git a/view/js/main.js b/view/js/main.js index acb9b462f..3e24e8177 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -1057,7 +1057,9 @@ function doprofilelike(ident, verb) { $.get('like/' + ident + '?verb=' + verb, function() { window.location.href=window.location.href; }); } + function dropItem(url, object) { + var confirm = confirmDelete(); if(confirm) { $('body').css('cursor', 'wait'); diff --git a/view/tpl/cloud_directory.tpl b/view/tpl/cloud_directory.tpl index 1f0addc95..51178a9ba 100644 --- a/view/tpl/cloud_directory.tpl +++ b/view/tpl/cloud_directory.tpl @@ -65,10 +65,10 @@ {{$item.attachIcon}}
- + {{else}} - + {{if $is_admin}}{{else}}{{/if}} {{/if}} {{*{{$item.type}}*}} {{$item.sizeFormatted}} -- cgit v1.2.3 From 6bf5eea64670996fafb80f92a4b8ec6a44f22bb0 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 2 May 2018 22:05:55 -0700 Subject: make the cloud logging a bit less verbose until we actually need it. --- Zotlabs/Module/Oep.php | 2 +- Zotlabs/Storage/File.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Zotlabs/Module/Oep.php b/Zotlabs/Module/Oep.php index ec40bf9db..0f20a5f9a 100644 --- a/Zotlabs/Module/Oep.php +++ b/Zotlabs/Module/Oep.php @@ -72,7 +72,7 @@ class Oep extends \Zotlabs\Web\Controller { $url = $args['url']; $maxwidth = intval($args['maxwidth']); $maxheight = intval($args['maxheight']); - logger('processing display'); + if(preg_match('#//(.*?)/display/(.*?)(&|\?|$)#',$url,$matches)) { $res = $matches[2]; } diff --git a/Zotlabs/Storage/File.php b/Zotlabs/Storage/File.php index 53d5d3476..4610aceb7 100644 --- a/Zotlabs/Storage/File.php +++ b/Zotlabs/Storage/File.php @@ -49,7 +49,7 @@ class File extends DAV\Node implements DAV\IFile { $this->data = $data; $this->auth = $auth; - logger(print_r($this->data, true), LOGGER_DATA); + // logger(print_r($this->data, true), LOGGER_DATA); } /** -- cgit v1.2.3 From 459ec78a5e3cb09ee908fd7810bbb0b80b2e4713 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 2 May 2018 22:59:21 -0700 Subject: provide easy access to the autoperms setting for forum and repository channels. This may be needed in the future to protect an existing forum from assault by spammers with changing identities. The forum can quickly be turned into membership by approval and either left that way permanently or hopefully reversed at a later date. Previously this would require switching to expert mode or setting a pconfig manually. --- Zotlabs/Module/Settings/Channel.php | 15 +++++++++++++-- view/tpl/settings.tpl | 1 + 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Zotlabs/Module/Settings/Channel.php b/Zotlabs/Module/Settings/Channel.php index 65b9b197e..beb62a3a3 100644 --- a/Zotlabs/Module/Settings/Channel.php +++ b/Zotlabs/Module/Settings/Channel.php @@ -146,6 +146,7 @@ class Channel { $unkmail = (((x($_POST,'unkmail')) && (intval($_POST['unkmail']) == 1)) ? 1: 0); $cntunkmail = ((x($_POST,'cntunkmail')) ? intval($_POST['cntunkmail']) : 0); $suggestme = ((x($_POST,'suggestme')) ? intval($_POST['suggestme']) : 0); + $autoperms = ((x($_POST,'autoperms')) ? intval($_POST['autoperms']) : 0); $post_newfriend = (($_POST['post_newfriend'] == 1) ? 1: 0); $post_joingroup = (($_POST['post_joingroup'] == 1) ? 1: 0); @@ -252,6 +253,7 @@ class Channel { set_pconfig(local_channel(),'system','default_permcat',$defpermcat); set_pconfig(local_channel(),'system','email_notify_host',$mailhost); set_pconfig(local_channel(),'system','profile_assign',$profile_assign); + set_pconfig(local_channel(),'system','autoperms',$autoperms); $r = q("update channel set channel_name = '%s', channel_pageflags = %d, channel_timezone = '%s', channel_location = '%s', channel_notifyflags = %d, channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d $set_perms where channel_id = %d", dbesc($username), @@ -479,13 +481,21 @@ class Channel { if($permissions_role === 'social_party') $permissions_role = 'social_federation'; - + if(in_array($permissions_role,['forum','repository'])) + $autoperms = replace_macros(get_markup_template('field_checkbox.tpl'), [ + '$field' => [ 'autoperms',t('Automatic membership approval'), ((get_pconfig(local_channel(),'system','autoperms')) ? 1 : 0), t('If enabled, connection requests will be approved without your interaction'), $yes_no ]]); + else + $autoperms = ''; + $permissions_set = (($permissions_role != 'custom') ? true : false); $perm_roles = \Zotlabs\Access\PermissionRoles::roles(); if((get_account_techlevel() < 4) && $permissions_role !== 'custom') unset($perm_roles[t('Other')]); + + + $vnotify = get_pconfig(local_channel(),'system','vnotify'); $always_show_in_notices = get_pconfig(local_channel(),'system','always_show_in_notices'); if($vnotify === false) @@ -497,6 +507,7 @@ class Channel { $disable_discover_tab = intval(get_config('system','disable_discover_tab',1)) == 1; $site_firehose = intval(get_config('system','site_firehose',0)) == 1; + $o .= replace_macros($stpl,array( '$ptitle' => t('Channel Settings'), @@ -553,7 +564,7 @@ class Channel { '$unkmail' => $unkmail, '$cntunkmail' => array('cntunkmail', t('Maximum private messages per day from unknown people:'), intval($channel['channel_max_anon_mail']) ,t("Useful to reduce spamming")), - + '$autoperms' => $autoperms, '$h_not' => t('Notification Settings'), '$activity_options' => t('By default post a status message when:'), '$post_newfriend' => array('post_newfriend', t('accepting a friend request'), $post_newfriend, '', $yes_no), diff --git a/view/tpl/settings.tpl b/view/tpl/settings.tpl index d258f1992..b5e871c36 100755 --- a/view/tpl/settings.tpl +++ b/view/tpl/settings.tpl @@ -45,6 +45,7 @@
{{include file="field_select_grouped.tpl" field=$role}} + {{$autoperms}}
-- cgit v1.2.3 From ae35ac0cec3f6bf3373ff901dabe20f35ec1933a Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 3 May 2018 13:14:12 +0200 Subject: quick fix for issue #1150 - needs improvement and review of other textcomplete implementations. --- view/js/autocomplete.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js index 60552588e..b7ebe3293 100644 --- a/view/js/autocomplete.js +++ b/view/js/autocomplete.js @@ -353,19 +353,22 @@ function string2bb(element) { this.attr('autocomplete','off'); + var aItem; var Textarea = Textcomplete.editors.Textarea; $(this).each(function() { var editor = new Textarea(this); var textcomplete = new Textcomplete(editor); textcomplete.register([names], {className:'acpopup', zIndex:1020}); + textcomplete.on('select', function() { aItem = textcomplete.dropdown.getActiveItem(); }); }); if(autosubmit) - this.on('select', function(e,value,strategy) { submit_form(this); }); + this.on('select', function() { submit_form(this); }); if(typeof onselect !== 'undefined') - this.on('select', function(e, value, strategy) { onselect(value); }); + this.on('select', function() { onselect(aItem.searchResult.data); }); + }; })( jQuery ); -- cgit v1.2.3 From 61a8a161397ef6af6e1e9f2b4efa62a925e87879 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 3 May 2018 17:37:16 -0700 Subject: add changes from ae35ac0cec3f6bf337 to contact_autocomplete so channel source completion will work correctly --- view/js/autocomplete.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js index b7ebe3293..97bb62fef 100644 --- a/view/js/autocomplete.js +++ b/view/js/autocomplete.js @@ -321,13 +321,14 @@ function string2bb(element) { var editor = new Textarea(this); var textcomplete = new Textcomplete(editor); textcomplete.register([contacts], {className:'acpopup', zIndex:1020}); + textcomplete.on('select', function() { aItem = textcomplete.dropdown.getActiveItem(); }); }); if(autosubmit) - this.on('select', function(e,value,strategy) { submit_form(this); }); + this.on('select', function() { submit_form(this); }); if(typeof onselect !== 'undefined') - this.on('select', function(e, value, strategy) { onselect(value); }); + this.on('select', function() { onselect(aItem.searchResult.data); }); }; })( jQuery ); -- cgit v1.2.3 From b52e9731e39125f5911fe6795ef34eb1f183d4b3 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 3 May 2018 20:14:58 -0700 Subject: tagging changes: + (old style forum mentions), and underscore space replacement are no longer supported. --- Zotlabs/Module/Item.php | 10 ---- doc/member/member_guide.bb | 12 ++--- include/text.php | 127 ++++++++------------------------------------- 3 files changed, 28 insertions(+), 121 deletions(-) diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index fd99c4a64..640b4fa5c 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -528,16 +528,6 @@ class Item extends \Zotlabs\Web\Controller { // and will require alternatives for alternative content-types (text/html, text/markdown, text/plain, etc.) // we may need virtual or template classes to implement the possible alternatives - // If we're sending a private top-level message with a single @-taggable channel as a recipient, @-tag it, if our pconfig is set. - - if((! $parent) && (get_pconfig($profile_uid,'system','tagifonlyrecip')) && (substr_count($str_contact_allow,'<') == 1) && ($str_group_allow == '') && ($str_contact_deny == '') && ($str_group_deny == '')) { - $x = q("select abook_id, abconfig.v from abook left join abconfig on abook_xchan = abconfig.xchan and abook_channel = abconfig.chan and cat= 'their_perms' and abconfig.k = 'tag_deliver' and abconfig.v = 1 and abook_xchan = '%s' and abook_channel = %d limit 1", - dbesc(str_replace(array('<','>'),array('',''),$str_contact_allow)), - intval($profile_uid) - ); - if($x) - $body .= "\n\n@group+" . $x[0]['abook_id'] . "\n"; - } $body = cleanup_bbcode($body); diff --git a/doc/member/member_guide.bb b/doc/member/member_guide.bb index e36e1c497..7cd403d75 100644 --- a/doc/member/member_guide.bb +++ b/doc/member/member_guide.bb @@ -359,7 +359,7 @@ The [b]![/b] character designates a deliverable mention to a forum or special ch !Gardening - mention the Gardening Forum and also post to the Gardening "network" (e.g. send to all the forum members; if you have permission to do so) [/code] -Note: In previous releases, forums were delivered by using @forum+ with a plus sign at the end. This mechanism is still used occasionally but is deprecated and !forum is now preferred. +Note: In previous releases, forums were delivered by using @forum+ with a plus sign at the end. This mechanism is no longer supported. [h4]Private Mentions[/h4] If you wish to restrict a post to a single person or a number of people, you can do this by selecting channels or privacy groups from the privacy tool. You can also just tag them with a privacy tag. A privacy tag is a name preceded by the two characters @! - and in addition to tagging these channels, will also change the privacy permissions of the post to only include them. You can have more than one privacy tag, for instance @!bob and @!linda will send the post only to Bob and Linda. This mechanism over-rides the privacy selector. @@ -383,17 +383,17 @@ Bookmarks indicate a link which can be saved to your bookmark folder. They use t Where possible please use the auto-complete window to select tag and mention recipients, because it will generate a coded tag which uniquely identifies one channel. Names are sometimes ambiguous. However, you can "manually" tag a channel by matching the channel name or address. [code] -@Robert Johnson +@billy [/code] -will tag Robert Johnson, but we can only match one space. If the name was "Blind Lemon Jefferson" it won't be found unless you enclose the entire name in double quotes or change the spaces to underscores. +will tag a connection whose name or network address is 'billy' (exact match). If you have two connections with a name or network address of billy, for instance billy@server1.hubzilla.org and billy@server2.hubzilla2.org, you will need to supply the complete address or the results will be ambiguous and the wrong person may be tagged. [code] -@"Blind Lemon Jefferson" -@Blind_Lemon_Jefferson +@"Robert Johnson" [/code] -are both equivalent. +will tag Robert Johnson. The double quotes are required if the tagged name contains space characters. + [h3]Web Pages[/h3] diff --git a/include/text.php b/include/text.php index dc3a155de..c7417a19b 100644 --- a/include/text.php +++ b/include/text.php @@ -830,27 +830,7 @@ function get_tags($s) { } } - // Match full names against @tags including the space between first and last - // We will look these up afterward to see if they are full names or not recognisable. - - // The lookbehind is used to prevent a match in the middle of a word - // '=' needs to be avoided because when the replacement is made (in handle_tag()) it has to be ignored there - // Feel free to allow '=' if the issue with '=' is solved in handle_tag() - // added / ? and [ to avoid issues with hashchars in url paths - - // added ; to single word tags to allow emojis and other unicode character constructs in bbcode - // (this would actually be &#xnnnnn; but the ampersand will have been escaped to & by the time we see it.) - - if(preg_match_all('/(? $success, 'access_tag' => $access_tag); if($success['replaced']) $tagged[] = $tag; -- cgit v1.2.3 From 56113b0bde6ea78f1ac0c61eb6ca9324900035c2 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 3 May 2018 23:20:09 -0700 Subject: check for directories --- util/update_widget_repo | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/util/update_widget_repo b/util/update_widget_repo index 045122619..8ef5eba27 100755 --- a/util/update_widget_repo +++ b/util/update_widget_repo @@ -25,6 +25,10 @@ for a in "${filelist[@]}" ; do # echo 'ignoring git' continue; fi + if [ ! -d ../extend/widget/$1/$base ]; then +# echo $a 'not a directory' + continue; + fi if [ -x $base ]; then # echo $base 'file exists' continue; -- cgit v1.2.3 From ace8252569289b42361404a33e7e650a7c6aa716 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 4 May 2018 09:34:44 +0200 Subject: update changelog --- CHANGELOG | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 472dad3e6..62645b2b1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,7 @@ -Hubzilla 3.4 (????-??-??) +Hubzilla 3.4 (2018-05-04) + - Provide warnings about profile photo and cover photo permissions + - Don't duplicate addressbook entries on repeated channel imports + - Where possible strip zid parameter from links that get pasted into posts so that they will get a correct zid when rendered - Rename boxy schema to Focus-Boxy - Rename BS-Default schema to Focus-Light - Mark simple_* schemas unmaintained and deprecated - they will be removed in next release if nobody steps up to maintain them. @@ -54,6 +57,7 @@ Hubzilla 3.4 (????-??-??) - Fix pending registrations visible in admin accounts Addons + Pubcrawl: fix issues with "private" messages Pubcrawl: fix issues with postgresql Fuzzloc: new addon to blur your browser location Pubcrawl: implement follow by webfinger -- cgit v1.2.3 From 998dd582068a2ffd31f3388aaefe4d639d7eb9c0 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 4 May 2018 09:37:22 +0200 Subject: switch DIRECTORY_FALLBACK_MASTER to https://zotadel.net --- boot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot.php b/boot.php index 5cf6cedeb..981ca8837 100755 --- a/boot.php +++ b/boot.php @@ -81,7 +81,7 @@ define ( 'DIRECTORY_MODE_STANDALONE', 0x0100); // A detached (off the grid) hub // point to go out and find the rest of the world. define ( 'DIRECTORY_REALM', 'RED_GLOBAL'); -define ( 'DIRECTORY_FALLBACK_MASTER', 'https://gravizot.de'); +define ( 'DIRECTORY_FALLBACK_MASTER', 'https://zotadel.net'); $DIRECTORY_FALLBACK_SERVERS = array( 'https://hubzilla.zottel.net', -- cgit v1.2.3 From 76e644e18af572e5ea96223a2ad3c48f5e34be37 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 4 May 2018 12:00:59 +0200 Subject: bump version --- boot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot.php b/boot.php index 981ca8837..f7c7e645a 100755 --- a/boot.php +++ b/boot.php @@ -50,7 +50,7 @@ require_once('include/attach.php'); require_once('include/bbcode.php'); define ( 'PLATFORM_NAME', 'hubzilla' ); -define ( 'STD_VERSION', '3.5.2' ); +define ( 'STD_VERSION', '3.5.3' ); define ( 'ZOT_REVISION', '6.0a' ); -- cgit v1.2.3 From 34f6d9f7142833ef74355b49fb9cf47f93dcea20 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 4 May 2018 13:54:12 +0200 Subject: missing basetag --- include/text.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/text.php b/include/text.php index c7417a19b..5be44c3cb 100644 --- a/include/text.php +++ b/include/text.php @@ -2559,6 +2559,8 @@ function handle_tag($a, &$body, &$access_tag, &$str_tags, $profile_uid, $tag, $i $basetag = substr($tag,7); $basetag = substr($basetag,0,-6); } + else + $basetag = substr($tag,1); //create text for link @@ -2587,6 +2589,7 @@ function handle_tag($a, &$body, &$access_tag, &$str_tags, $profile_uid, $tag, $i 'url' => $url, 'contact' => $r[0] ]; + } //is it a person tag? @@ -3334,4 +3337,4 @@ function unique_multidim_array($array, $key) { $i++; } return $temp_array; -} \ No newline at end of file +} -- cgit v1.2.3 From 97cb1089377681aa0f7b1c14aa86e00be4ce6ca6 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 4 May 2018 22:03:51 +0200 Subject: missing permission description --- Zotlabs/Module/Wiki.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zotlabs/Module/Wiki.php b/Zotlabs/Module/Wiki.php index 7dc8eb1bc..322a3933c 100644 --- a/Zotlabs/Module/Wiki.php +++ b/Zotlabs/Module/Wiki.php @@ -95,7 +95,7 @@ class Wiki extends \Zotlabs\Web\Controller { $owner['channel_deny_gid']) ? 'lock' : 'unlock' ), - 'acl' => populate_acl($owner_acl), + 'acl' => populate_acl($owner_acl, false, \Zotlabs\Lib\PermissionDescription::fromGlobalPermission('view_wiki')), 'allow_cid' => acl2json($owner_acl['allow_cid']), 'allow_gid' => acl2json($owner_acl['allow_gid']), 'deny_cid' => acl2json($owner_acl['deny_cid']), -- cgit v1.2.3 From 90cf238019a06e4f76a4523e9f78243edd3c14f6 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 4 May 2018 22:13:45 +0200 Subject: fix too big buttons in wiki list --- view/css/mod_wiki.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/view/css/mod_wiki.css b/view/css/mod_wiki.css index e0b02b414..998b932db 100644 --- a/view/css/mod_wiki.css +++ b/view/css/mod_wiki.css @@ -33,7 +33,7 @@ width: 100%; } -td i { +td > i { padding: 7px 5px; cursor: pointer; } @@ -68,4 +68,4 @@ code { #wiki-content-container code { background: #F5F5F5; -} \ No newline at end of file +} -- cgit v1.2.3 From 4a26f0d2d42825646d574531bbb89c7b17df9d69 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Fri, 4 May 2018 13:44:34 -0700 Subject: turn skip white back on - (xml actually doesn't parse if you disable this) --- include/network.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/network.php b/include/network.php index a00ede6bf..8b7490a8a 100644 --- a/include/network.php +++ b/include/network.php @@ -797,7 +797,7 @@ function xml2array($contents, $namespaces = true, $get_attributes=1, $priority = if($namespaces) $parser = @xml_parser_create_ns("UTF-8",':'); else - $parser = @xml_parser_create('UTF-8'); + $parser = @xml_parser_create(); if(! $parser) { logger('xml2array: xml_parser_create: no resource'); @@ -807,7 +807,7 @@ function xml2array($contents, $namespaces = true, $get_attributes=1, $priority = xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, "UTF-8"); // http://minutillo.com/steve/weblog/2004/6/17/php-xml-and-character-encodings-a-tale-of-sadness-rage-and-data-loss xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); - xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 0); + xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); @xml_parse_into_struct($parser, trim($contents), $xml_values); @xml_parser_free($parser); -- cgit v1.2.3 From f995ef012444617ead1760d16f712ca0051dc68b Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 4 May 2018 22:46:43 +0200 Subject: set XML_OPTION_SKIP_WHITE to 1 again --- include/network.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/network.php b/include/network.php index a00ede6bf..c55660da8 100644 --- a/include/network.php +++ b/include/network.php @@ -807,7 +807,7 @@ function xml2array($contents, $namespaces = true, $get_attributes=1, $priority = xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, "UTF-8"); // http://minutillo.com/steve/weblog/2004/6/17/php-xml-and-character-encodings-a-tale-of-sadness-rage-and-data-loss xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); - xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 0); + xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); @xml_parse_into_struct($parser, trim($contents), $xml_values); @xml_parser_free($parser); @@ -2052,4 +2052,4 @@ function jsonld_document_loader($url) { } return []; -} \ No newline at end of file +} -- cgit v1.2.3 From 6e91d85bcb3e98874f4c5d06ccaf1bca26577872 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Fri, 4 May 2018 15:17:15 -0700 Subject: If somebody precisely clicks the down-arrow on the author photo it should probably also trigger the dropdown --- view/tpl/conv_item.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl index a408a83d2..dd83bd9e9 100755 --- a/view/tpl/conv_item.tpl +++ b/view/tpl/conv_item.tpl @@ -31,7 +31,7 @@
{{$item.name}} {{if $item.thread_author_menu}} - +