Compare commits

..

28 Commits
2.8 ... 2.8.1

Author SHA1 Message Date
Mario Vavti
9bf366b7d4 more changelog 2017-11-11 21:52:11 +01:00
zotlabs
a68308b164 set os_syspath in DAV file put operation so that photos will scale correctly. 2017-11-11 21:43:52 +01:00
zotlabs
f7e3d0dbf6 hubzilla issue #901 - unicode characters in urls tripping up url regexes - these regexes have been modified to accept unicode "letters" which may preclude emojis and control sequences and symbols in url links; but should suffice for most legal URLs containing language context "text" glyphs. 2017-11-11 21:42:49 +01:00
Mario
e2eb36ded6 bump version 2017-11-11 21:34:22 +01:00
Mario Vavti
4ac3cec66e changelog 2017-11-11 21:33:52 +01:00
Mario Vavti
0fef599341 fix wiki pages not updating after creating new page 2017-11-11 20:28:46 +01:00
Mario Vavti
124e08efde animate fast 2017-11-11 20:28:35 +01:00
Mario Vavti
66338a5757 dedicate the first click to slideup the cover again but make sure the nav buttons remain functional 2017-11-11 20:28:22 +01:00
Mario Vavti
ebee3e208c revert back to get the mid from enotify - otherwise we can not distinct between posts and likes 2017-11-11 20:28:00 +01:00
Mario Vavti
f8cf68ab53 get the path infos from pathname instead of seperate data attribute 2017-11-11 20:27:48 +01:00
Mario Vavti
28c85cf3ae load notifications links to /display via ajax if we are already in /display 2017-11-11 20:27:31 +01:00
zotlabs
cf4e2b2953 unable to change permissions on wiki with space in name 2017-11-11 20:27:17 +01:00
Mario Vavti
f3d3ec5744 css fixes 2017-11-11 20:26:14 +01:00
Mario Vavti
29829eb011 only show nav app link if we have a selected app 2017-11-11 20:26:03 +01:00
Mario
129e6bddde truncate nav-app-link if appropriate 2017-11-11 20:25:52 +01:00
Mario Vavti
8260817cf7 rename channel app events to calendar and add nav_set_selected() to /cal 2017-11-11 20:25:32 +01:00
Mario Vavti
47d15f3bf4 move style out of template 2017-11-11 20:25:21 +01:00
Mario Vavti
96d439bcee add location info to the navbar 2017-11-11 20:25:04 +01:00
zotlabs
47fab97210 bring back tabindex to submit comments 2017-11-11 20:24:26 +01:00
Mario Vavti
5dec3ff18e update es-es help.html 2017-11-11 20:24:06 +01:00
Andrew Manning
bd3e5156c4 Update help.html 2017-11-11 20:23:49 +01:00
Andrew Manning
fccc1da666 Add Manuel's Spanish translations for context help 2017-11-11 20:23:32 +01:00
Mario Vavti
4be48b8d8b fix unable to mark all messages read 2017-11-06 09:35:25 +01:00
zotlabs
6e48c36519 imagedata not set correctly if large photo AND imagick is not installed 2017-11-03 23:09:31 +01:00
Mario Vavti
cf5beafcfd fix issues with diaspora xchans 2017-11-02 08:50:16 +01:00
zotlabs
12f33d2cd4 Maria's profile photo issue, please push to master. 2017-11-01 12:13:21 +01:00
Haakon Meland Eriksen
8467ecb1d7 Added mode to Portfolio widget 2017-10-30 10:39:39 +01:00
Manuel Jiménez Friaza
9a8071e014 Spanish translation revised again. 2017-10-29 11:52:12 +01:00
34 changed files with 222 additions and 73 deletions

View File

@@ -1,3 +1,37 @@
Hubzilla 2.8.1 (2017-11-11)
- Rename channel app events to calendar and add nav_set_selected() to /cal
- Load notifications links to /display via ajax if we are already in /display
- Add location info to the navbar for remote visitors
- Bring back tabindex to submit comments
- Add spanish translations for context help
- Added mode to portfolio widget
Bugfixes
- Fix os_syspath in DAV file put operation so that photos will scale correctly
- Fix unicode characters in urls tripping up url regexes - github issue #901
- Fix wiki pages not updating after creating new page
- Fix notifications covered by cover photo on medium size screens - github issue #906
- Fix unable to change permissions on wiki with space in name
- Fix only show nav app link if we have a selected app
- Fix unable to mark all messages read
- Fix imagedata not set correctly if large photo and imagick is not installed
- Fix issues with diaspora xchans
- Fix profile photo issue triggered by a previous bug
Plugins/Addon
N-S-F-W: improve the undocumented n-s-f-w author::word feature
Diaspora: update the import_diaspora tool for the version 2.0 account export files
Diaspora: fix comments are partly containing "diaspora_handle" instead of "author" - github issue #69
Pubcrawl: provide feature setting for downgrade_media option
Pubcrawl: fix issue where replies to replies did not find its parent
Diaspora: fix friendica likes on comments
Diaspora: fix private mail
Diaspora: fix third party deletes/retractions not propagating
Diaspora: likes not working - github issue #895 in core
Diaspora: fix comments from unknown persons not accepted if allow public comments is enabled - github issue #68
XMPP: fix php warning
Hubzilla 2.8 (2017-10-25)
- Redirect to be moderated items to /moderate
- Update notifications if notifications area remains open

View File

@@ -798,7 +798,8 @@ class Enotify {
'url' => $item['author']['xchan_url'],
'photo' => $item['author']['xchan_photo_s'],
'when' => relative_date($item['created']),
'class' => (intval($item['item_unseen']) ? 'notify-unseen' : 'notify-seen'),
'class' => (intval($item['item_unseen']) ? 'notify-unseen' : 'notify-seen'),
'b64mid' => ((in_array($item['verb'], [ACTIVITY_LIKE, ACTIVITY_DISLIKE])) ? 'b64.' . base64url_encode($item['thr_parent']) : 'b64.' . base64url_encode($item['mid'])),
'message' => strip_tags(bbcode($itemem_text))
);

View File

@@ -69,6 +69,8 @@ class Cal extends \Zotlabs\Web\Controller {
notice( t('Permissions denied.') . EOL);
return;
}
nav_set_selected('Calendar');
$sql_extra = permissions_sql($channel['channel_id'],get_observer_hash(),'event');

View File

@@ -19,7 +19,7 @@ class Mail extends \Zotlabs\Web\Controller {
$replyto = ((x($_REQUEST,'replyto')) ? notags(trim($_REQUEST['replyto'])) : '');
$subject = ((x($_REQUEST,'subject')) ? notags(trim($_REQUEST['subject'])) : '');
$body = ((x($_REQUEST,'body')) ? escape_tags(trim($_REQUEST['body'])) : '');
$recipient = ((x($_REQUEST,'messageto')) ? notags(trim($_REQUEST['messageto'])) : '');
$recipient = ((x($_REQUEST,'messageto')) ? notags(trim(urldecode($_REQUEST['messageto']))) : '');
$rstr = ((x($_REQUEST,'messagerecip')) ? notags(trim($_REQUEST['messagerecip'])) : '');
$preview = ((x($_REQUEST,'preview')) ? intval($_REQUEST['preview']) : 0);
$expires = ((x($_REQUEST,'expires')) ? datetime_convert(date_default_timezone_get(),'UTC', $_REQUEST['expires']) : NULL_DATE);
@@ -124,7 +124,7 @@ class Mail extends \Zotlabs\Web\Controller {
// We have a local_channel, let send_message use the session channel and save a lookup
$ret = send_message(0, $recipient, $body, $subject, $replyto, $expires, $mimetype, $raw);
if($ret['success']) {
xchan_mail_query($ret['mail']);
build_sync_packet(0,array('conv' => array($ret['conv']),'mail' => array(encode_mail($ret['mail'],true))));

View File

@@ -221,7 +221,7 @@ class Ping extends \Zotlabs\Web\Controller {
intval(local_channel())
);
break;
case 'messages':
case 'mail':
$r = q("update mail set mail_seen = 1 where mail_seen = 0 and channel_id = %d ",
intval(local_channel())
);

View File

@@ -150,6 +150,14 @@ class Profile_photo extends \Zotlabs\Web\Controller {
// If setting for the default profile, unset the profile photo flag from any other photos I own
if($is_default_profile) {
$r = q("update profile set photo = '%s', thumb = '%s' where is_default = 1 and uid = %d",
dbesc(z_root() . '/photo/profile/l/' . local_channel()),
dbesc(z_root() . '/photo/profile/m/' . local_channel()),
intval(local_channel())
);
$r = q("UPDATE photo SET photo_usage = %d WHERE photo_usage = %d
AND resource_id != '%s' AND uid = %d",
intval(PHOTO_NORMAL),
@@ -159,8 +167,6 @@ class Profile_photo extends \Zotlabs\Web\Controller {
);
send_profile_photo_activity($channel,$base_image,$profile);
}

View File

@@ -494,7 +494,7 @@ class Wiki extends \Zotlabs\Web\Controller {
return; //not reached
}
$wiki = Zlib\NativeWiki::exists_by_name($owner['channel_id'], $arr['urlName']);
$wiki = Zlib\NativeWiki::exists_by_name($owner['channel_id'], urldecode($arr['urlName']));
if($wiki['resource_id']) {

View File

@@ -127,12 +127,15 @@ class File extends DAV\Node implements DAV\IFile {
$is_photo = false;
$album = '';
$os_path = '';
$r = q("SELECT flags, folder, os_storage, filename, is_photo FROM attach WHERE hash = '%s' AND uid = %d LIMIT 1",
$r = q("SELECT flags, folder, os_storage, os_path, filename, is_photo FROM attach WHERE hash = '%s' AND uid = %d LIMIT 1",
dbesc($this->data['hash']),
intval($c[0]['channel_id'])
);
if ($r) {
$os_path = $r[0]['os_path'];
if (intval($r[0]['os_storage'])) {
$d = q("select folder, content from attach where hash = '%s' and uid = %d limit 1",
dbesc($this->data['hash']),
@@ -150,7 +153,7 @@ class File extends DAV\Node implements DAV\IFile {
}
}
$fname = dbunescbin($d[0]['content']);
if(strpos($fname,'store') === false)
if(strpos($fname,'store/') === false)
$f = 'store/' . $this->auth->owner_nick . '/' . $fname ;
else
$f = $fname;
@@ -196,7 +199,7 @@ class File extends DAV\Node implements DAV\IFile {
if($is_photo) {
require_once('include/photos.php');
$args = array( 'resource_id' => $this->data['hash'], 'album' => $album, 'os_path' => $f, 'filename' => $r[0]['filename'], 'getimagesize' => $gis, 'directory' => $direct );
$args = array( 'resource_id' => $this->data['hash'], 'album' => $album, 'os_syspath' => $f, 'os_path' => $os_path, 'filename' => $r[0]['filename'], 'getimagesize' => $gis, 'directory' => $direct );
$p = photo_upload($c[0],\App::get_observer(),$args);
}

View File

@@ -139,6 +139,7 @@ class Notifications {
}
$o = replace_macros(get_markup_template('notifications_widget.tpl'), array(
'$module' => \App::$module,
'$notifications' => $notifications,
'$loading' => t('Loading...')
));

View File

@@ -20,6 +20,15 @@ class Portfolio {
$album = $args['album'];
if($args['title'])
$title = $args['title'];
if(array_key_exists('mode', $args) && isset($args['mode']))
$mode = $args['mode'];
else
$mode = '';
if(array_key_exists('count', $args) && isset($args['count']))
$count = $args['count'];
else
$count = '';
/**
* This may return incorrect permissions if you have multiple directories of the same name.
@@ -92,6 +101,8 @@ class Portfolio {
$tpl = get_markup_template('photo_album_portfolio.tpl');
$o .= replace_macros($tpl, array(
'$photos' => $photos,
'$mode' => $mode,
'$count' => $count,
'$album' => (($title) ? $title : $album),
'$album_id' => rand(),
'$album_edit' => array(t('Edit Album'), $album_edit),
@@ -106,3 +117,4 @@ class Portfolio {
}
}

View File

@@ -12,7 +12,7 @@ class Wiki_pages {
if(! $arr['resource_id']) {
$c = channelx_by_nick(argv(1));
$w = \Zotlabs\Lib\NativeWiki::exists_by_name($c['channel_id'],argv(2));
$w = \Zotlabs\Lib\NativeWiki::exists_by_name($c['channel_id'],urldecode(argv(2)));
$arr = array(
'resource_id' => $w['resource_id'],
'channel_id' => $c['channel_id'],

View File

@@ -49,7 +49,7 @@ require_once('include/hubloc.php');
require_once('include/attach.php');
define ( 'PLATFORM_NAME', 'hubzilla' );
define ( 'STD_VERSION', '2.8' );
define ( 'STD_VERSION', '2.8.1' );
define ( 'ZOT_REVISION', '1.3' );
define ( 'DB_UPDATE_VERSION', 1196 );

View File

@@ -0,0 +1,4 @@
<dl class="dl-horizontal">
<dt>General</dt>
<dd>Editar las propiedades individuales de la aplicación seleccionada. Las categorías le permiten ordenar sus aplicaciones para ayudarle a encontrarlas más fácilmente en la lista. El soporte para aplicaciones personalizadas que usted o su administrador puedan elegir para crear incluye campos como "Precio de la aplicación" y "Ubicación para la compra" que no son aplicables a las aplicaciones principales de Hubzilla.</dd>
</dl>

View File

@@ -0,0 +1,4 @@
<dl class="dl-horizontal">
<dt>General</dt>
<dd>Modificar o eliminar sus "apps" usando el botón de control que está junto al icono de cada aplicación de la lista.</dd>
</dl>

View File

@@ -0,0 +1,6 @@
<dl class="dl-horizontal">
<dt>General</dt>
<dd>Esta página le muestra qué aplicaciones están disponibles para su canal, incluyendo tanto las aplicaciones principales como las proporcionadas por addons. Para añadir una aplicación al <a href=' #' onclick=' contextualHelpFocus ("#app-menu", 1); devuelve false;' title="Pulsar para abrir...">menú de aplicaciones</a> "estrelle" la aplicación de la siguiente lista.</dd>
<dt>Gestionar las aplicaciones (apps)</dt>
<dd>Pulse el botón "Gestionar aplicaciones" para abrir una página en la podrá editar el nombre, las categorías y otras propiedades de sus aplicaciones.</dd>
</dl>

View File

@@ -0,0 +1,19 @@
<dl class="dl-horizontal">
<dt>General</dt>
<dd>Las fichas representan un área persistente para la colaboración que está separada del stream social. Son algo más ligeras que las páginas web y los wikis para una rápida organización de la información y tienen la ventaja de permitir la colaboración y los comentarios. Son muy adecuados para ayudar a organizar tareas complejas en las que hay actualizaciones y retroalimentación frecuentes.</dd>
<dt>Añadir una ficha</dt>
<dd>
Crear una ficha nueva es muy parecido a componer un nuevo post.<br><br>
<ul>
<li>
<b>Nombre del enlace de la página</b>: Este nombre es el de la ficha para una URL estática
</li>
<li>
<b>Título</b>: El título se muestra en la parte de arriba de la ficha
</li>
<li>
<b>Categorías</b>: Si tiene activada la opción <a href="/settings/features">Temas de las entradas</a> en su canal, entonces puede añadirlas a la ficha. Estas categorías o temas se despliegan en la lista <b>Temas</b> en el panel de la izquierda y permiten filtrar su colección de fichas.
</li>
</ul>
</dd>
</dl>

View File

@@ -1,7 +1,6 @@
<dl class="dl-horizontal">
<dt>General</dt>
<dd>Esta página muestra los ficheros en la "nube" de un canal. Los archivos visibles para el observador dependen de los permisos de archivo individuales establecidas por
el propietario del canal. Si tiene permiso para crear o cargar ficheros, verá botones de control por encima de la lista de ficheros.</dd>
<dt><a href="#" onclick='contextualHelpFocus("#tabs-collapse-1", 0); return false;' title="Pulsar en el elemento resaltado...">Pestañas de los contenidos del canal</a></dt>
<dd>Las pestañas de los contenidos del canal son enlaces a otros contenidos publicados por el canal. La pestaña "<b>Mi perfil</b>" enlaza con el perfil del canal. La pestaña "<b>Fotos</b>" enlaza con las galerías de fotos. La pestaña "<b>Ficheros</b>" enlaza con los ficheros de cualquier tipo compartidos por el canal.</dd>
</dl>
<dl class="dl-horizontal">
<dt>General</dt>
<dd>Esta página muestra los archivos "cloud" de un canal. Los archivos visibles para el observador dependen de los permisos de fichero individuales establecidos por el propietario del canal. Si tiene permiso para crear o cargar archivos verá botones de control encima de la lista de ficheros. </dd>
<dt><a href='#' onclick='contextualHelpFocus("#tabs-collapse-1", 0); return false;' title="Pulsar en el elemento resaltado...">Pestañas de contenidos del canal</a></dt>
<dd>Las pestañas de contenidos del canal son enlaces a otros contenidos publicados por el canal. La pestaña <b>Mi canal</b> enlaza con el perfil del canal. La pestaña <b>Fotos</b> enlaza con las galerías de fotos del canal. La pestaña <b>Ficheros</b> enlaza con los ficheros compartidos publicados por el canal.</dd>
</dl>

View File

@@ -50,7 +50,7 @@ function profile_activity($changed, $value) {
if($t == 1 && strlen($value)) {
// if it's a url, the HTML quotes will mess it up, so link it and don't try and zidify it because we don't know what it points to.
$value = preg_replace_callback("/([^\]\='".'"'."]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\+\,]+)/ism", 'red_zrl_callback', $value);
$value = preg_replace_callback("/([^\]\='".'"'."]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\+\,]+)/ismu", 'red_zrl_callback', $value);
// take out the bookmark indicator
if(substr($value,0,2) === '#^')
$value = str_replace('#^','',$value);

View File

@@ -838,13 +838,13 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false)
// Perform URL Search
$urlchars = '[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,\@\(\)]';
$urlchars = '[a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,\@\(\)]';
if (strpos($Text,'http') !== false) {
if($tryoembed) {
$Text = preg_replace_callback("/([^\]\='".'"'."\/]|^|\#\^)(https?\:\/\/$urlchars+)/ism", 'tryoembed', $Text);
$Text = preg_replace_callback("/([^\]\='".'"'."\/]|^|\#\^)(https?\:\/\/$urlchars+)/ismu", 'tryoembed', $Text);
}
$Text = preg_replace("/([^\]\='".'"'."\/]|^|\#\^)(https?\:\/\/$urlchars+)/ism", '$1<a href="$2" target="_blank" rel="nofollow noopener">$2</a>', $Text);
$Text = preg_replace("/([^\]\='".'"'."\/]|^|\#\^)(https?\:\/\/$urlchars+)/ismu", '$1<a href="$2" target="_blank" rel="nofollow noopener">$2</a>', $Text);
}
if (strpos($Text,'[/share]') !== false) {

View File

@@ -64,11 +64,11 @@ function markdown_to_bb($s, $use_zrl = false, $options = []) {
// Convert everything that looks like a link to a link
if($use_zrl) {
$s = str_replace(array('[img','/img]'),array('[zmg','/zmg]'),$s);
$s = preg_replace("/([^\]\=]|^)(https?\:\/\/)([a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,\@\(\)]+)/ism", '$1[zrl=$2$3]$2$3[/zrl]',$s);
$s = str_replace(['[img', '/img]'], ['[zmg', '/zmg]'], $s);
$s = preg_replace("/([^\]\=]|^)(https?\:\/\/)([a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,\@\(\)]+)/ismu", '$1[zrl=$2$3]$2$3[/zrl]',$s);
}
else {
$s = preg_replace("/([^\]\=]|^)(https?\:\/\/)([a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,\@\(\)]+)/ism", '$1[url=$2$3]$2$3[/url]',$s);
$s = preg_replace("/([^\]\=]|^)(https?\:\/\/)([a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,\@\(\)]+)/ismu", '$1[url=$2$3]$2$3[/url]',$s);
}
// remove duplicate adjacent code tags

View File

@@ -381,7 +381,7 @@ function private_messages_list($uid, $mailbox = '', $start = 0, $numitems = 0) {
$chans[] = $s;
}
$c = q("select * from xchan where xchan_hash in (" . implode(',',$chans) . ")");
$c = q("select * from xchan where xchan_hash in (" . protect_sprintf(implode(',',$chans)) . ")");
foreach($r as $k => $rr) {
$r[$k]['from'] = find_xchan_in_array($rr['from_xchan'],$c);
@@ -420,7 +420,7 @@ function private_messages_fetch_message($channel_id, $messageitem_id, $updatesee
$chans[] = $s;
}
$c = q("select * from xchan where xchan_hash in (" . implode(',',$chans) . ")");
$c = q("select * from xchan where xchan_hash in (" . protect_sprintf(implode(',',$chans)) . ")");
foreach($messages as $k => $message) {
$messages[$k]['from'] = find_xchan_in_array($message['from_xchan'],$c);
@@ -545,7 +545,7 @@ function private_messages_fetch_conversation($channel_id, $messageitem_id, $upda
}
$c = q("select * from xchan where xchan_hash in (" . implode(',',$chans) . ")");
$c = q("select * from xchan where xchan_hash in (" . protect_sprintf(implode(',',$chans)) . ")");
foreach($messages as $k => $message) {
$messages[$k]['from'] = find_xchan_in_array($message['from_xchan'],$c);

View File

@@ -27,6 +27,8 @@ function nav($template = 'default') {
</script>
EOT;
$is_owner = (((local_channel()) && ((App::$profile_uid == local_channel()) || (App::$profile_uid == 0))) ? true : false);
if(local_channel()) {
$channel = App::get_channel();
$observer = App::get_observer();
@@ -39,17 +41,17 @@ EOT;
intval(get_account_id())
);
}
$sitelocation = (($is_owner) ? '' : App::$profile['reddress']);
}
elseif(remote_channel())
elseif(remote_channel()) {
$observer = App::get_observer();
$sitelocation = ((App::$profile['reddress']) ? App::$profile['reddress'] : '@' . App::get_hostname());
}
require_once('include/conversation.php');
$is_owner = (((local_channel()) && ((App::$profile_uid == local_channel()) || (App::$profile_uid == 0))) ? true : false);
$channel_apps[] = channel_apps($is_owner, App::$profile['channel_address']);
$myident = (($channel) ? $channel['xchan_addr'] : '');
$sitelocation = (($myident) ? $myident : App::get_hostname());
/**
*
@@ -438,10 +440,10 @@ function channel_apps($is_owner = false, $nickname = null) {
if($p['view_stream'] && $cal_link) {
$tabs[] = [
'label' => t('Events'),
'label' => t('Calendar'),
'url' => z_root() . $cal_link,
'sel' => ((argv(0) == 'cal' || argv(0) == 'events') ? 'active' : ''),
'title' => t('Events'),
'sel' => ((argv(0) == 'cal') ? 'active' : ''),
'title' => t('Calendar'),
'id' => 'event-tab',
'icon' => 'calendar'
];

View File

@@ -75,6 +75,9 @@ function photo_upload($channel, $observer, $args) {
$imagedata = @file_get_contents($tmp_name);
@unlink($tmp_name);
}
else {
$imagedata = @file_get_contents($args['os_syspath']);
}
}
else {
$imagedata = @file_get_contents($args['os_syspath']);

View File

@@ -819,7 +819,7 @@ function get_tags($s) {
// 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 &amp; by the time we see it.)
if(preg_match_all('/(?<![a-zA-Z0-9=\/\?])(@[^ \x0D\x0A,:?\[]+ [^ \x0D\x0A@,:?\[]+)/',$s,$match)) {
if(preg_match_all('/(?<![a-zA-Z0-9=\pL\/\?])(@[^ \x0D\x0A,:?\[]+ [^ \x0D\x0A@,:?\[]+)/u',$s,$match)) {
foreach($match[1] as $mtch) {
if(substr($mtch,-1,1) === '.')
$ret[] = substr($mtch,0,-1);
@@ -831,7 +831,7 @@ function get_tags($s) {
// Otherwise pull out single word tags. These can be @nickname, @first_last
// and #hash tags.
if(preg_match_all('/(?<![a-zA-Z0-9=\/\?\;])([@#\!][^ \x0D\x0A,;:?\[]+)/',$s,$match)) {
if(preg_match_all('/(?<![a-zA-Z0-9=\pL\/\?\;])([@#\!][^ \x0D\x0A,;:?\[]+)/u',$s,$match)) {
foreach($match[1] as $mtch) {
if(substr($mtch,-1,1) === '.')
$mtch = substr($mtch,0,-1);
@@ -1052,7 +1052,7 @@ function searchbox($s,$id='search-box',$url='/search',$save = false) {
* @return string
*/
function linkify($s, $me = false) {
$s = preg_replace("/(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\@\~\#\'\%\$\!\+\,\@]*)/", (($me) ? ' <a href="$1" rel="me" >$1</a>' : ' <a href="$1" >$1</a>'), $s);
$s = preg_replace("/(https?\:\/\/[a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\_\@\~\#\'\%\$\!\+\,\@]*)/u", (($me) ? ' <a href="$1" rel="me" >$1</a>' : ' <a href="$1" >$1</a>'), $s);
$s = preg_replace("/\<(.*?)(src|href)=(.*?)\&amp\;(.*?)\>/ism",'<$1$2=$3&$4>',$s);
return($s);
@@ -2160,7 +2160,7 @@ function xchan_mail_query(&$item) {
if(count($arr)) {
$chans = q("select xchan.*,hubloc.* from xchan left join hubloc on hubloc_hash = xchan_hash
where xchan_hash in (" . implode(',', $arr) . ") and hubloc_primary = 1");
where xchan_hash in (" . protect_sprintf(implode(',', $arr)) . ") and hubloc_primary = 1");
}
if($chans) {
$item['from'] = find_xchan_in_array($item['from_xchan'],$chans);
@@ -3099,10 +3099,10 @@ function cleanup_bbcode($body) {
$body = preg_replace_callback('/\[zrl(.*?)\[\/(zrl)\]/ism','\red_escape_codeblock',$body);
$body = preg_replace_callback("/([^\]\='".'"'."\/]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\\
+\,\(\)]+)/ism", '\nakedoembed', $body);
$body = preg_replace_callback("/([^\]\='".'"'."\/]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\\
+\,\(\)]+)/ism", '\red_zrl_callback', $body);
$body = preg_replace_callback("/([^\]\='".'"'."\/]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\\
+\,\(\)]+)/ismu", '\nakedoembed', $body);
$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);
$body = preg_replace_callback('/\[\$b64url(.*?)\[\/(url)\]/ism','\red_unescape_codeblock',$body);

View File

@@ -3649,6 +3649,7 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) {
$disallowed = array('id','aid','uid','guid');
foreach($arr['profile'] as $profile) {
$x = q("select * from profile where profile_guid = '%s' and uid = %d limit 1",
dbesc($profile['profile_guid']),
intval($channel['channel_id'])
@@ -3671,6 +3672,9 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) {
if(in_array($k,$disallowed))
continue;
if($profile['is_default'] && in_array($k,['photo','thumb']))
continue;
if($k === 'name')
$clean['fullname'] = $v;
elseif($k === 'with')

View File

@@ -19,7 +19,6 @@ nav .dropdown-menu {
}
}
@media screen and (max-width: 767px) {
.navbar {
padding: .5rem 7px;
@@ -41,6 +40,7 @@ nav .dropdown-menu {
.navbar-toggler-right {
padding: 0.2rem 0;
white-space: nowrap;
}
#navbar-collapse-1 i {

View File

@@ -14,7 +14,7 @@ msgstr ""
"Project-Id-Version: Redmatrix\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-10-19 12:01+0200\n"
"PO-Revision-Date: 2017-10-20 10:42+0000\n"
"PO-Revision-Date: 2017-10-28 10:20+0000\n"
"Last-Translator: Manuel Jiménez Friaza <mjfriaza@openmailbox.org>\n"
"Language-Team: Spanish (Spain) (http://www.transifex.com/Friendica/red-matrix/language/es_ES/)\n"
"MIME-Version: 1.0\n"
@@ -3490,7 +3490,7 @@ msgstr "Podría reducir la actividad de spam"
#: ../../Zotlabs/Module/Settings/Channel.php:512
msgid "Default Privacy Group"
msgstr "Grupo de canales por defecto"
msgstr "Grupo de canales predeterminado"
#: ../../Zotlabs/Module/Settings/Channel.php:514
msgid "Use my default audience setting for the type of object published"
@@ -4817,7 +4817,7 @@ msgstr "Tipo"
#: ../../Zotlabs/Module/Wiki.php:211
msgid "Any&nbsp;type"
msgstr "Cualquier tipo"
msgstr "Cualquier&nbsp;tipo"
#: ../../Zotlabs/Module/Wiki.php:218
msgid "Lock content type"
@@ -7328,7 +7328,7 @@ msgstr "0. Principiante/Básico"
#: ../../Zotlabs/Lib/Techlevels.php:11
msgid "1. Novice - not skilled but willing to learn"
msgstr "1. Novicio - no está preparado pero está dispuestos a aprender"
msgstr "1. Novato: no cualificado, pero dispuesto a aprender"
#: ../../Zotlabs/Lib/Techlevels.php:12
msgid "2. Intermediate - somewhat comfortable"
@@ -7344,7 +7344,7 @@ msgstr "4. Experto - Puedo escribir código informático"
#: ../../Zotlabs/Lib/Techlevels.php:15
msgid "5. Wizard - I probably know more than you do"
msgstr "5. Asistente - probablemente sé más que tú"
msgstr "5. Colaborador - probablemente sé más que tú"
#: ../../Zotlabs/Lib/Apps.php:225
msgid "Site Admin"

View File

@@ -703,7 +703,7 @@ App::$strings["This website does not expire imported content."] = "Este sitio we
App::$strings["The website limit takes precedence if lower than your limit."] = "El límite del sitio web tiene prioridad si es inferior a su propio límite.";
App::$strings["Maximum Friend Requests/Day:"] = "Máximo de solicitudes de amistad por día:";
App::$strings["May reduce spam activity"] = "Podría reducir la actividad de spam";
App::$strings["Default Privacy Group"] = "Grupo de canales por defecto";
App::$strings["Default Privacy Group"] = "Grupo de canales predeterminado";
App::$strings["Use my default audience setting for the type of object published"] = "Usar los ajustes de mi audiencia predeterminada para el tipo de publicación";
App::$strings["Channel permissions category:"] = "Categoría de los permisos del canal:";
App::$strings["Default Permissions Group"] = "Grupo de permisos predeterminados";
@@ -1010,7 +1010,7 @@ App::$strings["Markdown"] = "Markdown";
App::$strings["BBcode"] = "BBcode";
App::$strings["Text"] = "Texto";
App::$strings["Type"] = "Tipo";
App::$strings["Any&nbsp;type"] = "Cualquier tipo";
App::$strings["Any&nbsp;type"] = "Cualquier&nbsp;tipo";
App::$strings["Lock content type"] = "Tipo de contenido bloqueado";
App::$strings["Create a status post for this wiki"] = "Crear un mensaje de estado para este wiki";
App::$strings["Edit Wiki Name"] = "Editar el nombre del wiki";
@@ -1598,11 +1598,11 @@ App::$strings["Enter your email address and submit to have your password reset.
App::$strings["Email Address"] = "Dirección de correo electrónico";
App::$strings["Mark all seen"] = "Marcar todo como visto";
App::$strings["0. Beginner/Basic"] = "0. Principiante/Básico";
App::$strings["1. Novice - not skilled but willing to learn"] = "1. Novicio - no está preparado pero está dispuestos a aprender";
App::$strings["1. Novice - not skilled but willing to learn"] = "1. Novato: no cualificado, pero dispuesto a aprender";
App::$strings["2. Intermediate - somewhat comfortable"] = "2. Intermedio - algo cómodo";
App::$strings["3. Advanced - very comfortable"] = "3. Avanzado - muy cómodo";
App::$strings["4. Expert - I can write computer code"] = "4. Experto - Puedo escribir código informático";
App::$strings["5. Wizard - I probably know more than you do"] = "5. Asistente - probablemente sé más que tú";
App::$strings["5. Wizard - I probably know more than you do"] = "5. Colaborador - probablemente sé más que tú";
App::$strings["Site Admin"] = "Administrador del sitio";
App::$strings["Report Bug"] = "Informe de errores";
App::$strings["Firefox Share"] = "Servicio de compartición de Firefox";

View File

@@ -32,7 +32,12 @@ function handle_comment_form(e) {
var fields_empty = true;
if(form.find('.comment-edit-text').length) {
form.find('.comment-edit-text').addClass('expanded').removeAttr('placeholder');
var commentElm = form.find('.comment-edit-text').attr('id');
var submitElm = commentElm.replace(/text/,'submit');
$('#' + commentElm).addClass('expanded').removeAttr('placeholder');
$('#' + commentElm).attr('tabindex','9');
$('#' + submitElm).attr('tabindex','10');
form.find(':not(:visible)').show();
}
@@ -43,7 +48,12 @@ function handle_comment_form(e) {
fields_empty = false;
});
if(fields_empty) {
form.find('.comment-edit-text').removeClass('expanded').attr('placeholder', aStr.comment);
var emptyCommentElm = form.find('.comment-edit-text').attr('id');
var emptySubmitElm = commentElm.replace(/text/,'submit');
$('#' + emptyCommentElm).removeClass('expanded').attr('placeholder', aStr.comment);
$('#' + emptyCommentElm).removeAttr('tabindex');
$('#' + emptySubmitElm).removeAttr('tabindex');
form.find(':not(.comment-edit-text)').hide();
}
});
@@ -740,6 +750,7 @@ function collapseHeight() {
}
function liveUpdate() {
if(typeof profile_uid === 'undefined') profile_uid = false; /* Should probably be unified with channelId defined in head.tpl */
if((src === null) || (stopped) || (! profile_uid)) { $('.like-rotator').hide(); return; }
if(($('.comment-edit-text.expanded').length) || (in_progress)) {
@@ -781,7 +792,6 @@ function liveUpdate() {
var orgHeight = $("#region_2").height();
}
var dstart = new Date();
console.log('LOADING data...');
$.get(update_url, function(data) {
@@ -949,9 +959,9 @@ function notify_popup_loader(notifyType) {
$("." + notifyType + "-update").html(data.notify.length);
$(data.notify).each(function() {
html = navbar_notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.hclass);
html = navbar_notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.hclass,this.b64mid);
$("#navbar-" + notifyType + "-menu").append(html);
html = notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.hclass);
html = notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.hclass,this.b64mid);
$("#nav-" + notifyType + "-menu").append(html);
});

View File

@@ -161,10 +161,6 @@ nav {
filter:alpha(opacity=$nav_percent_min_opacity);
}
#nav-app-link {
white-space: nowrap;
}
#powered-by {
font-size: 0.5rem;
position: absolute;
@@ -1255,6 +1251,12 @@ img.mail-conv-sender-photo {
border-radius: $radius;
}
#nav-app-link {
padding: 0 !important;
line-height: 1.175;
white-space: nowrap;
}
.page-title {
margin: 7px 0px;
}
@@ -1492,6 +1494,11 @@ blockquote {
left: 0px;
}
#nav-app-link-wrapper {
min-width: 0;
flex-basis: 25%;
}
}
.shareable_element_text {

View File

@@ -1,6 +1,8 @@
/**
* redbasic theme specific JavaScript
*/
var notifications_parent;
$(document).ready(function() {
// CSS3 calc() fallback (for unsupported browsers)
@@ -82,7 +84,7 @@ $(document).ready(function() {
}
});
var notifications_parent = $('#notifications_wrapper')[0].parentElement.id;
notifications_parent = $('#notifications_wrapper')[0].parentElement.id;
$('#notifications-btn').click(function() {
if($('#notifications_wrapper').hasClass('fs'))
$('#notifications_wrapper').prependTo('#' + notifications_parent);

View File

@@ -8,8 +8,7 @@
aside_padding_top = parseInt($('aside').css('padding-top'));
section_padding_top = parseInt($('section').css('padding-top'));
$('#cover-photo').on('click', slideUpCover);
$('#cover-photo').on('keyup', slideUpCover);
$(document).on('click mouseup keyup', slideUpCover);
if($('#cover-photo').length && $(window).width() > 755) {
if($(window).scrollTop() < $('#cover-photo').height()) {
@@ -63,7 +62,7 @@
if(coverSlid) {
return;
}
$('html, body').animate({scrollTop: Math.ceil($('#cover-photo').height()) + 'px' });
$('html, body').animate({scrollTop: Math.ceil($('#cover-photo').height()) + 'px' }, 'fast');
return;
}
</script>

View File

@@ -17,8 +17,8 @@
</div>
{{/if}}
{{if $userinfo}}
<div class="dropdown usermenu">
<div class="fakelink" data-toggle="dropdown">
<div class="dropdown">
<div class="fakelink usermenu" data-toggle="dropdown">
<img id="avatar" src="{{$userinfo.icon}}" alt="{{$userinfo.name}}">
<i class="fa fa-caret-down"></i>
</div>
@@ -59,10 +59,17 @@
</div>
{{/if}}
</div>
<div class="navbar-nav mr-auto">
<div><a id="nav-app-link" href="{{$url}}" class="nav-link">{{$sel.name}}</a></div>
{{if $sel.name}}
<div id="nav-app-link-wrapper" class="navbar-nav mr-auto">
<a id="nav-app-link" href="{{$url}}" class="nav-link text-truncate">
{{$sel.name}}
{{if $sitelocation}}
<br><small>{{$sitelocation}}</small>
{{/if}}
</a>
</div>
{{/if}}
{{/if}}
<div class="navbar-toggler-right">
{{if $nav.help.6}}
<button id="context-help-btn" class="navbar-toggler border-0" type="button" onclick="contextualHelp(); return false;">

View File

@@ -26,11 +26,35 @@
}
</style>
{{if $module == 'display'}}
<script>
$(document).on('click', '.notification', function(e) {
var b64mid = $(this).data('b64mid');
var path = $(this)[0].pathname.substr(1,7);
if(path === 'display' && b64mid) {
e.preventDefault();
e.stopPropagation();
$('.thread-wrapper').remove();
$(this).fadeOut();
bParam_mid = b64mid;
mode = 'replace';
page_load = true;
liveUpdate();
if($('#notifications_wrapper').hasClass('fs'))
$('#notifications_wrapper').prependTo('#' + notifications_parent).removeClass('fs'); //var notifications_parent is defined in redbasic.js
}
});
</script>
{{/if}}
{{if $notifications}}
<div id="notifications_wrapper">
<div id="notifications" class="navbar-nav" data-children=".nav-item">
<div id="nav-notifications-template" rel="template">
<a class="list-group-item clearfix notification {5}" href="{0}" title="{2} {3}">
<a class="list-group-item clearfix notification {5}" href="{0}" title="{2} {3}" data-b64mid="{6}">
<img class="menu-img-3" data-src="{1}">
<span class="contactname">{2}</span>
<span class="dropdown-sub-text">{3}<br>{4}</span>