mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-21 02:55:17 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
22f6687f44
13 changed files with 65 additions and 13 deletions
1
boot.php
1
boot.php
|
@ -83,6 +83,7 @@ $DIRECTORY_FALLBACK_SERVERS = array(
|
||||||
'https://hubzilla.site',
|
'https://hubzilla.site',
|
||||||
'https://red.zottel.red',
|
'https://red.zottel.red',
|
||||||
'https://gravizot.de',
|
'https://gravizot.de',
|
||||||
|
'https://blablanet.com',
|
||||||
'https://my.federated.social'
|
'https://my.federated.social'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
5
doc/nl/TermsOfService.md
Normal file
5
doc/nl/TermsOfService.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
Gebruikersvoorwaarden
|
||||||
|
================
|
||||||
|
|
||||||
|
#include doc/SiteTOS.md;
|
||||||
|
|
|
@ -944,7 +944,7 @@ function item_photo_menu($item){
|
||||||
$menu = Array(
|
$menu = Array(
|
||||||
t("View Source") => $vsrc_link,
|
t("View Source") => $vsrc_link,
|
||||||
t("Follow Thread") => $sub_link,
|
t("Follow Thread") => $sub_link,
|
||||||
t("Stop Following") => $unsub_link,
|
t("Unfollow Thread") => $unsub_link,
|
||||||
t("View Status") => $status_link,
|
t("View Status") => $status_link,
|
||||||
t("View Profile") => $profile_link,
|
t("View Profile") => $profile_link,
|
||||||
t("View Photos") => $photos_link,
|
t("View Photos") => $photos_link,
|
||||||
|
|
|
@ -60,6 +60,7 @@ function get_features() {
|
||||||
array('content_encrypt', t('Even More Encryption'), t('Allow optional encryption of content end-to-end with a shared secret key'),false),
|
array('content_encrypt', t('Even More Encryption'), t('Allow optional encryption of content end-to-end with a shared secret key'),false),
|
||||||
array('consensus_tools', t('Enable Voting Tools'), t('Provide a class of post which others can vote on'),false),
|
array('consensus_tools', t('Enable Voting Tools'), t('Provide a class of post which others can vote on'),false),
|
||||||
array('delayed_posting', t('Delayed Posting'), t('Allow posts to be published at a later date'),false),
|
array('delayed_posting', t('Delayed Posting'), t('Allow posts to be published at a later date'),false),
|
||||||
|
array('suppress_duplicates', t('Suppress Duplicate Posts/Comments'), t('Prevent posts with identical content to be published with less than two minutes in between submissions.'),true),
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,12 @@ require_once('include/dba/dba_driver.php');
|
||||||
|
|
||||||
if(! $a->install) {
|
if(! $a->install) {
|
||||||
$db = dba_factory($db_host, $db_port, $db_user, $db_pass, $db_data, $db_type, $a->install);
|
$db = dba_factory($db_host, $db_port, $db_user, $db_pass, $db_data, $db_type, $a->install);
|
||||||
|
if(! $db->connected){
|
||||||
|
header('HTTP/1.0 520 Unknown Error');
|
||||||
|
// TODO: much friendlier error message
|
||||||
|
die("Database error, contact admin.");
|
||||||
|
}
|
||||||
|
|
||||||
unset($db_host, $db_port, $db_user, $db_pass, $db_data, $db_type);
|
unset($db_host, $db_port, $db_user, $db_pass, $db_data, $db_type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -395,9 +395,10 @@ function admin_page_site(&$a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Banner */
|
/* Banner */
|
||||||
|
|
||||||
$banner = get_config('system', 'banner');
|
$banner = get_config('system', 'banner');
|
||||||
if($banner == false)
|
if($banner === false)
|
||||||
$banner = 'red';
|
$banner = get_config('system','sitename');
|
||||||
|
|
||||||
$banner = htmlspecialchars($banner);
|
$banner = htmlspecialchars($banner);
|
||||||
|
|
||||||
|
|
|
@ -124,8 +124,6 @@ function dirsearch_content(&$a) {
|
||||||
if($keywords)
|
if($keywords)
|
||||||
$sql_extra .= dir_query_build($joiner,'xprof_keywords',$keywords);
|
$sql_extra .= dir_query_build($joiner,'xprof_keywords',$keywords);
|
||||||
|
|
||||||
if($forums)
|
|
||||||
$safesql .= dir_flag_build(' AND ','xchan_flags',XCHAN_FLAGS_PUBFORUM, $forums);
|
|
||||||
|
|
||||||
// we only support an age range currently. You must set both agege
|
// we only support an age range currently. You must set both agege
|
||||||
// (greater than or equal) and agele (less than or equal)
|
// (greater than or equal) and agele (less than or equal)
|
||||||
|
@ -173,6 +171,9 @@ function dirsearch_content(&$a) {
|
||||||
if($safe < 0)
|
if($safe < 0)
|
||||||
$safesql = " and ( xchan_censored = 1 OR xchan_selfcensored = 1 ) ";
|
$safesql = " and ( xchan_censored = 1 OR xchan_selfcensored = 1 ) ";
|
||||||
|
|
||||||
|
if($forums)
|
||||||
|
$safesql .= " and xchan_pubforum = " . ((intval($forums)) ? '1 ' : '0 ');
|
||||||
|
|
||||||
if($limit)
|
if($limit)
|
||||||
$qlimit = " LIMIT $limit ";
|
$qlimit = " LIMIT $limit ";
|
||||||
else {
|
else {
|
||||||
|
@ -185,7 +186,6 @@ function dirsearch_content(&$a) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if($sort_order == 'normal') {
|
if($sort_order == 'normal') {
|
||||||
$order = " order by xchan_name asc ";
|
$order = " order by xchan_name asc ";
|
||||||
|
|
||||||
|
@ -202,6 +202,7 @@ function dirsearch_content(&$a) {
|
||||||
else
|
else
|
||||||
$order = " order by xchan_name_date desc ";
|
$order = " order by xchan_name_date desc ";
|
||||||
|
|
||||||
|
|
||||||
if($sync) {
|
if($sync) {
|
||||||
$spkt = array('transactions' => array());
|
$spkt = array('transactions' => array());
|
||||||
$r = q("select * from updates where ud_date >= '%s' and ud_guid != '' order by ud_date desc",
|
$r = q("select * from updates where ud_date >= '%s' and ud_guid != '' order by ud_date desc",
|
||||||
|
@ -245,15 +246,20 @@ function dirsearch_content(&$a) {
|
||||||
json_return_and_die($spkt);
|
json_return_and_die($spkt);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
$r = q("SELECT xchan.*, xprof.* from xchan left join xprof on xchan_hash = xprof_hash
|
$r = q("SELECT xchan.*, xprof.* from xchan left join xprof on xchan_hash = xprof_hash
|
||||||
where ( $logic $sql_extra ) $hub_query and xchan_network = 'zot' and xchan_hidden = 0 and xchan_orphan = 0 and xchan_deleted = 0
|
where ( $logic $sql_extra ) $hub_query and xchan_network = 'zot' and xchan_hidden = 0 and xchan_orphan = 0 and xchan_deleted = 0
|
||||||
$safesql $order $qlimit "
|
$safesql $order $qlimit "
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$ret['page'] = $page + 1;
|
$ret['page'] = $page + 1;
|
||||||
$ret['records'] = count($r);
|
$ret['records'] = count($r);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if($r) {
|
if($r) {
|
||||||
|
|
||||||
$entries = array();
|
$entries = array();
|
||||||
|
|
20
mod/item.php
20
mod/item.php
|
@ -703,6 +703,10 @@ function item_post(&$a) {
|
||||||
$plink = z_root() . '/channel/' . $channel['channel_address'] . '/?f=&mid=' . $mid;
|
$plink = z_root() . '/channel/' . $channel['channel_address'] . '/?f=&mid=' . $mid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$datarray['aid'] = $channel['channel_account_id'];
|
$datarray['aid'] = $channel['channel_account_id'];
|
||||||
$datarray['uid'] = $profile_uid;
|
$datarray['uid'] = $profile_uid;
|
||||||
|
|
||||||
|
@ -781,6 +785,22 @@ function item_post(&$a) {
|
||||||
if($orig_post)
|
if($orig_post)
|
||||||
$datarray['edit'] = true;
|
$datarray['edit'] = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(feature_enabled($profile_uid,'suppress_duplicates')) {
|
||||||
|
|
||||||
|
$z = q("select created from item where uid = %d and body = '%s'",
|
||||||
|
intval($profile_uid),
|
||||||
|
dbesc($body)
|
||||||
|
);
|
||||||
|
|
||||||
|
if($z && $z[0]['created'] > datetime_convert('UTC','UTC', 'now - 2 minutes')) {
|
||||||
|
$datarray['cancel'] = 1;
|
||||||
|
notice( t('Duplicate post suppressed.') . EOL);
|
||||||
|
logger('Duplicate post. Faking plugin cancel.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
call_hooks('post_local',$datarray);
|
call_hooks('post_local',$datarray);
|
||||||
|
|
||||||
if(x($datarray,'cancel')) {
|
if(x($datarray,'cancel')) {
|
||||||
|
|
|
@ -11,18 +11,24 @@ function subthread_content(&$a) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$item_id = ((argc() > 2) ? notags(trim(argv(2))) : 0);
|
||||||
|
|
||||||
if(argv(1) === 'sub')
|
if(argv(1) === 'sub')
|
||||||
$activity = ACTIVITY_FOLLOW;
|
$activity = ACTIVITY_FOLLOW;
|
||||||
elseif(argv(1) === 'unsub')
|
elseif(argv(1) === 'unsub')
|
||||||
$activity = ACTIVITY_UNFOLLOW;
|
$activity = ACTIVITY_UNFOLLOW;
|
||||||
|
|
||||||
$item_id = ((argc() > 2) ? notags(trim(argv(2))) : 0);
|
|
||||||
|
|
||||||
$r = q("SELECT * FROM `item` WHERE `parent` = '%s' OR `parent_mid` = '%s' and parent = id LIMIT 1",
|
$r = q("SELECT parent FROM item WHERE id = '%s'",
|
||||||
dbesc($item_id),
|
|
||||||
dbesc($item_id)
|
dbesc($item_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if($r) {
|
||||||
|
$r = q("select * from item where id = parent and id = %d limit 1",
|
||||||
|
dbesc($r[0]['parent'])
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if((! $item_id) || (! $r)) {
|
if((! $item_id) || (! $r)) {
|
||||||
logger('subthread: no item ' . $item_id);
|
logger('subthread: no item ' . $item_id);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
2015-11-18.1221
|
2015-11-19.1221
|
||||||
|
|
|
@ -188,6 +188,10 @@ nav .badge:hover, nav .badge:focus {
|
||||||
box-shadow: 0px 6px 12px rgba(45,48,92,.176);
|
box-shadow: 0px 6px 12px rgba(45,48,92,.176);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tags a {
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
#profile-photo-wrapper {
|
#profile-photo-wrapper {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
@ -337,7 +341,7 @@ input {
|
||||||
background-color: #FFF;
|
background-color: #FFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-primary, input#event-submit, input#rmagic-submit-button, input#lostpass-submit-button, input#side-follow-submit, .profile-edit-submit-wrapper > input.profile-edit-submit-button, input#profile-photo-submit, form#chat-form > input, div#adminpage > form > div.submit > input, input.sources-submit, input.contact-edit-submit, input#dbtn-submit, input#newchannel-submit-button {
|
.btn-primary, input#event-submit, input#rmagic-submit-button, input#lostpass-submit-button, input#side-follow-submit, .profile-edit-submit-wrapper > input.profile-edit-submit-button, input#profile-photo-submit, form#chat-form > input, div#adminpage > form > div.submit > input, input.sources-submit, input.contact-edit-submit, input#dbtn-submit, input#newchannel-submit-button, input#contacts-search-submit {
|
||||||
background-color: #FFF;
|
background-color: #FFF;
|
||||||
color: #43488A;
|
color: #43488A;
|
||||||
border-radius: 0px;
|
border-radius: 0px;
|
||||||
|
@ -346,7 +350,7 @@ input {
|
||||||
transition: all .3s ease-in-out;
|
transition: all .3s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-primary:hover, .btn-primary:focus, input#event-submit:hover, input#event-submit:focus, input#rmagic-submit-button:hover, input#rmagic-submit-button:focus, input#lostpass-submit-button:hover, input#lostpass-submit-button:focus, input#side-follow-submit:hover, input#side-follow-submit:focus, .profile-edit-submit-wrapper > input.profile-edit-submit-button:hover, .profile-edit-submit-wrapper > input.profile-edit-submit-button:focus, input#profile-photo-submit:hover, input#profile-photo-submit:focus, form#chat-form > input:hover, form#chat-form > input:focus, div#adminpage > form > div.submit > input:hover, div#adminpage > form > div.submit > input:focus, input.sources-submit:hover, input.sources-submit:focus, input.contact-edit-submit:focus, input.contact-edit-submit:hover, input#dbtn-submit:hover, input#dbtn-submit:focus, input#newchannel-submit-button:hover, input#newchannel-submit-button:focus {
|
.btn-primary:hover, .btn-primary:focus, input#event-submit:hover, input#event-submit:focus, input#rmagic-submit-button:hover, input#rmagic-submit-button:focus, input#lostpass-submit-button:hover, input#lostpass-submit-button:focus, input#side-follow-submit:hover, input#side-follow-submit:focus, .profile-edit-submit-wrapper > input.profile-edit-submit-button:hover, .profile-edit-submit-wrapper > input.profile-edit-submit-button:focus, input#profile-photo-submit:hover, input#profile-photo-submit:focus, form#chat-form > input:hover, form#chat-form > input:focus, div#adminpage > form > div.submit > input:hover, div#adminpage > form > div.submit > input:focus, input.sources-submit:hover, input.sources-submit:focus, input.contact-edit-submit:focus, input.contact-edit-submit:hover, input#dbtn-submit:hover, input#dbtn-submit:focus, input#newchannel-submit-button:hover, input#newchannel-submit-button:focus, input#contacts-search-submit:hover, input#contacts-search-submit:focus {
|
||||||
border-color: #FFF;
|
border-color: #FFF;
|
||||||
background-color: #43488A;
|
background-color: #43488A;
|
||||||
color: #FFF;
|
color: #FFF;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<div class="generic-content-wrapper-styled">
|
||||||
<form action="invite" method="post" id="invite-form" >
|
<form action="invite" method="post" id="invite-form" >
|
||||||
|
|
||||||
<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
|
<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
|
||||||
|
@ -28,3 +29,4 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue