Merge branch 'dev' of https://framagit.org/hubzilla/core into xdev_merge
This commit is contained in:
commit
cc91db55b7
@ -41,8 +41,6 @@ class Notifications extends \Zotlabs\Web\Controller {
|
|||||||
$notifications_available = 1;
|
$notifications_available = 1;
|
||||||
foreach ($r as $rr) {
|
foreach ($r as $rr) {
|
||||||
$x = strip_tags(bbcode($rr['msg']));
|
$x = strip_tags(bbcode($rr['msg']));
|
||||||
if(strpos($x,','))
|
|
||||||
$x = substr($x,strpos($x,',')+1);
|
|
||||||
$notif_content .= replace_macros(get_markup_template('notify.tpl'),array(
|
$notif_content .= replace_macros(get_markup_template('notify.tpl'),array(
|
||||||
'$item_link' => z_root().'/notify/view/'. $rr['id'],
|
'$item_link' => z_root().'/notify/view/'. $rr['id'],
|
||||||
'$item_image' => $rr['photo'],
|
'$item_image' => $rr['photo'],
|
||||||
|
31
boot.php
31
boot.php
@ -2234,8 +2234,35 @@ function construct_page() {
|
|||||||
if(App::get_scheme() === 'https' && App::$config['system']['transport_security_header'])
|
if(App::get_scheme() === 'https' && App::$config['system']['transport_security_header'])
|
||||||
header("Strict-Transport-Security: max-age=31536000");
|
header("Strict-Transport-Security: max-age=31536000");
|
||||||
|
|
||||||
if(App::$config['system']['content_security_policy'])
|
if(App::$config['system']['content_security_policy']) {
|
||||||
header("Content-Security-Policy: script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'");
|
$cspsettings = Array (
|
||||||
|
'script-src' => Array ("'self'","'unsafe-inline'","'unsafe-eval'"),
|
||||||
|
'style-src' => Array ("'self'","'unsafe-inline'")
|
||||||
|
);
|
||||||
|
call_hooks('content_security_policy',$cspsettings);
|
||||||
|
|
||||||
|
// Legitimate CSP directives (cxref: https://content-security-policy.com/)
|
||||||
|
$validcspdirectives=Array(
|
||||||
|
"default-src", "script-src", "style-src",
|
||||||
|
"img-src", "connect-src", "font-src",
|
||||||
|
"object-src", "media-src", 'frame-src',
|
||||||
|
'sandbox', 'report-uri', 'child-src',
|
||||||
|
'form-action', 'frame-ancestors', 'plugin-types'
|
||||||
|
);
|
||||||
|
$cspheader = "Content-Security-Policy:";
|
||||||
|
foreach ($cspsettings as $cspdirective => $csp) {
|
||||||
|
if (!in_array($cspdirective,$validcspdirectives)) {
|
||||||
|
logger("INVALID CSP DIRECTIVE: ".$cspdirective,LOGGER_DEBUG);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$cspsettingsarray=array_unique($cspsettings[$cspdirective]);
|
||||||
|
$cspsetpolicy = implode(' ',$cspsettingsarray);
|
||||||
|
if ($cspsetpolicy) {
|
||||||
|
$cspheader .= " ".$cspdirective." ".$cspsetpolicy.";";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
header($cspheader);
|
||||||
|
}
|
||||||
|
|
||||||
if(App::$config['system']['x_security_headers']) {
|
if(App::$config['system']['x_security_headers']) {
|
||||||
header("X-Frame-Options: SAMEORIGIN");
|
header("X-Frame-Options: SAMEORIGIN");
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago").
|
* updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago").
|
||||||
*
|
*
|
||||||
* @name timeago
|
* @name timeago
|
||||||
* @version 1.4.1
|
* @version 1.6.3
|
||||||
* @requires jQuery v1.2.3+
|
* @requires jQuery v1.2.3+
|
||||||
* @author Ryan McGeary
|
* @author Ryan McGeary
|
||||||
* @license MIT License - http://www.opensource.org/licenses/mit-license.php
|
* @license MIT License - http://www.opensource.org/licenses/mit-license.php
|
||||||
@ -11,13 +11,15 @@
|
|||||||
* For usage and examples, visit:
|
* For usage and examples, visit:
|
||||||
* http://timeago.yarp.com/
|
* http://timeago.yarp.com/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2008-2013, Ryan McGeary (ryan -[at]- mcgeary [*dot*] org)
|
* Copyright (c) 2008-2017, Ryan McGeary (ryan -[at]- mcgeary [*dot*] org)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function (factory) {
|
(function (factory) {
|
||||||
if (typeof define === 'function' && define.amd) {
|
if (typeof define === 'function' && define.amd) {
|
||||||
// AMD. Register as an anonymous module.
|
// AMD. Register as an anonymous module.
|
||||||
define(['jquery'], factory);
|
define(['jquery'], factory);
|
||||||
|
} else if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||||
|
factory(require('jquery'));
|
||||||
} else {
|
} else {
|
||||||
// Browser globals
|
// Browser globals
|
||||||
factory(jQuery);
|
factory(jQuery);
|
||||||
@ -43,6 +45,7 @@
|
|||||||
allowFuture: false,
|
allowFuture: false,
|
||||||
localeTitle: false,
|
localeTitle: false,
|
||||||
cutoff: 0,
|
cutoff: 0,
|
||||||
|
autoDispose: true,
|
||||||
strings: {
|
strings: {
|
||||||
prefixAgo: null,
|
prefixAgo: null,
|
||||||
prefixFromNow: null,
|
prefixFromNow: null,
|
||||||
@ -137,6 +140,7 @@
|
|||||||
// functions are called with context of a single element
|
// functions are called with context of a single element
|
||||||
var functions = {
|
var functions = {
|
||||||
init: function() {
|
init: function() {
|
||||||
|
functions.dispose.call(this);
|
||||||
var refresh_el = $.proxy(refresh, this);
|
var refresh_el = $.proxy(refresh, this);
|
||||||
refresh_el();
|
refresh_el();
|
||||||
var $s = $t.settings;
|
var $s = $t.settings;
|
||||||
@ -144,10 +148,12 @@
|
|||||||
this._timeagoInterval = setInterval(refresh_el, $s.refreshMillis);
|
this._timeagoInterval = setInterval(refresh_el, $s.refreshMillis);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
update: function(time){
|
update: function(timestamp) {
|
||||||
var parsedTime = $t.parse(time);
|
var date = (timestamp instanceof Date) ? timestamp : $t.parse(timestamp);
|
||||||
$(this).data('timeago', { datetime: parsedTime });
|
$(this).data('timeago', { datetime: date });
|
||||||
if($t.settings.localeTitle) $(this).attr("title", parsedTime.toLocaleString());
|
if ($t.settings.localeTitle) {
|
||||||
|
$(this).attr("title", date.toLocaleString());
|
||||||
|
}
|
||||||
refresh.apply(this);
|
refresh.apply(this);
|
||||||
},
|
},
|
||||||
updateFromDOM: function() {
|
updateFromDOM: function() {
|
||||||
@ -175,19 +181,24 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
function refresh() {
|
function refresh() {
|
||||||
|
var $s = $t.settings;
|
||||||
|
|
||||||
//check if it's still visible
|
//check if it's still visible
|
||||||
if(!$.contains(document.documentElement,this)){
|
if ($s.autoDispose && !$.contains(document.documentElement,this)) {
|
||||||
//stop if it has been removed
|
//stop if it has been removed
|
||||||
$(this).timeago("dispose");
|
$(this).timeago("dispose");
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
var data = prepareData(this);
|
var data = prepareData(this);
|
||||||
var $s = $t.settings;
|
|
||||||
|
|
||||||
if (!isNaN(data.datetime)) {
|
if (!isNaN(data.datetime)) {
|
||||||
if ( $s.cutoff == 0 || Math.abs(distance(data.datetime)) < $s.cutoff) {
|
if ( $s.cutoff === 0 || Math.abs(distance(data.datetime)) < $s.cutoff) {
|
||||||
$(this).text(inWords(data.datetime));
|
$(this).text(inWords(data.datetime));
|
||||||
|
} else {
|
||||||
|
if ($(this).attr('title').length > 0) {
|
||||||
|
$(this).text($(this).attr('title'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
|
@ -277,7 +277,7 @@ App::$strings["Name or caption"] = "Name oder Titel";
|
|||||||
App::$strings["Examples: \"Bob Jameson\", \"Lisa and her Horses\", \"Soccer\", \"Aviation Group\""] = "Beispiele: „Horst Weidinger“, „Lisa und ihr Meerschweinchen“, „Fußball“, „Segelflieger-Forum“ ";
|
App::$strings["Examples: \"Bob Jameson\", \"Lisa and her Horses\", \"Soccer\", \"Aviation Group\""] = "Beispiele: „Horst Weidinger“, „Lisa und ihr Meerschweinchen“, „Fußball“, „Segelflieger-Forum“ ";
|
||||||
App::$strings["Choose a short nickname"] = "Wähle einen kurzen Spitznamen";
|
App::$strings["Choose a short nickname"] = "Wähle einen kurzen Spitznamen";
|
||||||
App::$strings["Your nickname will be used to create an easy to remember channel address e.g. nickname%s"] = "Dein Spitzname wird verwendet, um eine leicht zu merkende Kanal-Adresse (ähnlich einer E-Mail-Adresse) zu erzeugen, die Du mit anderen austauschen kannst, z.B. nickname%s";
|
App::$strings["Your nickname will be used to create an easy to remember channel address e.g. nickname%s"] = "Dein Spitzname wird verwendet, um eine leicht zu merkende Kanal-Adresse (ähnlich einer E-Mail-Adresse) zu erzeugen, die Du mit anderen austauschen kannst, z.B. nickname%s";
|
||||||
App::$strings["Channel role and privacy"] = "Kanaltyp und Privatspäre-Einstellungen";
|
App::$strings["Channel role and privacy"] = "Kanaltyp und Privatsphäre-Einstellungen";
|
||||||
App::$strings["Select a channel role with your privacy requirements."] = "Wähle einen passenden Kanaltyp mit den zugehörigen Voreinstellungen zur Privatsphäre.";
|
App::$strings["Select a channel role with your privacy requirements."] = "Wähle einen passenden Kanaltyp mit den zugehörigen Voreinstellungen zur Privatsphäre.";
|
||||||
App::$strings["Read more about roles"] = "Mehr Informationen über Rollen";
|
App::$strings["Read more about roles"] = "Mehr Informationen über Rollen";
|
||||||
App::$strings["Create Channel"] = "Einen neuen Kanal anlegen";
|
App::$strings["Create Channel"] = "Einen neuen Kanal anlegen";
|
||||||
|
@ -62,6 +62,9 @@ $(document).ready(function() {
|
|||||||
numbers : aStr['t17'],
|
numbers : aStr['t17'],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//mod_mail only
|
||||||
|
$(".mail-conv-detail .autotime").timeago();
|
||||||
|
|
||||||
savedTitle = document.title;
|
savedTitle = document.title;
|
||||||
|
|
||||||
updateInit();
|
updateInit();
|
||||||
|
@ -2,7 +2,6 @@ $(document).ready(function() {
|
|||||||
$("#recip").name_autocomplete(baseurl + '/acl', 'm', false, function(data) {
|
$("#recip").name_autocomplete(baseurl + '/acl', 'm', false, function(data) {
|
||||||
$("#recip-complete").val(data.xid);
|
$("#recip-complete").val(data.xid);
|
||||||
});
|
});
|
||||||
$(".autotime").timeago()
|
|
||||||
$('#prvmail-text').bbco_autocomplete('bbcode');
|
$('#prvmail-text').bbco_autocomplete('bbcode');
|
||||||
$("#prvmail-text").editor_autocomplete(baseurl+"/acl");
|
$("#prvmail-text").editor_autocomplete(baseurl+"/acl");
|
||||||
});
|
});
|
||||||
|
@ -1152,7 +1152,6 @@ img.mail-conv-sender-photo {
|
|||||||
.wall-item-ago,
|
.wall-item-ago,
|
||||||
.dropdown-sub-text {
|
.dropdown-sub-text {
|
||||||
color: #777;
|
color: #777;
|
||||||
display: block;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.wall-item-content,
|
.wall-item-content,
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<div class="mail-conv-detail">
|
<div class="mail-conv-detail">
|
||||||
{{if $mail.is_recalled}}<strong>{{$mail.is_recalled}}</strong>{{/if}}
|
{{if $mail.is_recalled}}<strong>{{$mail.is_recalled}}</strong>{{/if}}
|
||||||
<div class="wall-item-name"><a class="wall-item-name-link" href="{{$mail.from_url}}">{{$mail.from_name}}</a></div>
|
<div class="wall-item-name"><a class="wall-item-name-link" href="{{$mail.from_url}}">{{$mail.from_name}}</a></div>
|
||||||
<div class="autotime wall-item-ago" title="{{$mail.date}}">{{$mail.date}}</div>
|
<div class="autotime wall-item-ago" title="{{$mail.date}}"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfix mail-conv-content">
|
<div class="clearfix mail-conv-content">
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
<a href="mail/{{$message.mailbox}}/{{$message.id}}" class="nav-link{{if $message.selected}} active{{/if}}">
|
<a href="mail/{{$message.mailbox}}/{{$message.id}}" class="nav-link{{if $message.selected}} active{{/if}}">
|
||||||
<span class="{{if ! $message.seen || $message.selected}}font-weight-bold{{/if}}">{{$message.subject}}</span><br>
|
<span class="{{if ! $message.seen || $message.selected}}font-weight-bold{{/if}}">{{$message.subject}}</span><br>
|
||||||
<span class="conv-participants">{{$message.from_name}} > {{$message.to_name}}</span><br>
|
<span class="conv-participants">{{$message.from_name}} > {{$message.to_name}}</span><br>
|
||||||
<span class="wall-item-ago autotime" title="{{$message.date}}">{{$message.date}}</span>
|
<span class="wall-item-ago autotime" title="{{$message.date}}"></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
<a class="list-group-item{{if $class}} {{$class}}{{/if}} fakelink" href="{{if $click}}#{{else}}{{$url}}{{/if}}" {{if $click}}onclick="{{$click}}"{{/if}}>
|
<a class="list-group-item{{if $class}} {{$class}}{{/if}} fakelink" href="{{if $click}}#{{else}}{{$url}}{{/if}}" {{if $click}}onclick="{{$click}}"{{/if}}>
|
||||||
<img class="menu-img-3" src="{{$photo}}" title="{{$title}}" alt="" />{{if $oneway}}<i class="fa fa-fw fa-minus-circle oneway-overlay text-danger"></i>{{/if}}
|
<img class="menu-img-3" src="{{$photo}}" title="{{$title}}" alt="" />{{if $oneway}}<i class="fa fa-fw fa-minus-circle oneway-overlay text-danger"></i>{{/if}}
|
||||||
<span class="contactname">{{$name}}</span>
|
<span class="contactname">{{$name}}</span>
|
||||||
<span class="dropdown-sub-text">{{$addr}}</span>
|
<span class="dropdown-sub-text">{{$addr}}<br>{{$network}}</span>
|
||||||
<span class="dropdown-sub-text">{{$network}}</span>
|
|
||||||
</a>
|
</a>
|
||||||
|
Reference in New Issue
Block a user