Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
2bca219911
9
boot.php
9
boot.php
@ -1574,8 +1574,13 @@ function proc_run($cmd){
|
||||
$args[$x] = escapeshellarg($args[$x]);
|
||||
|
||||
$cmdline = implode($args," ");
|
||||
if(is_windows())
|
||||
proc_close(proc_open('cmd /c start /b ' . $cmdline,array(),$foo));
|
||||
|
||||
|
||||
if(is_windows()) {
|
||||
$cwd = getcwd();
|
||||
$cmd = "cmd /c start \"title\" /D \"$cwd\" /b $cmdline";
|
||||
proc_close(proc_open($cmd, array(), $foo));
|
||||
}
|
||||
else
|
||||
proc_close(proc_open($cmdline." &",array(),$foo));
|
||||
}
|
||||
|
@ -22,8 +22,9 @@ require_once('include/crypto.php');
|
||||
function identity_check_service_class($account_id) {
|
||||
$ret = array('success' => false, $message => '');
|
||||
|
||||
$r = q("select count(channel_id) as total from channel where channel_account_id = %d ",
|
||||
intval($account_id)
|
||||
$r = q("select count(channel_id) as total from channel where channel_account_id = %d and not ( channel_pageflags & %d ) ",
|
||||
intval($account_id),
|
||||
intval(PAGE_REMOVED)
|
||||
);
|
||||
if(! ($r && count($r))) {
|
||||
$ret['message'] = t('Unable to obtain identity information from database');
|
||||
@ -101,7 +102,7 @@ function get_sys_channel() {
|
||||
|
||||
/**
|
||||
* @channel_total()
|
||||
* Return the total number of channels on this site. No filtering is performed.
|
||||
* Return the total number of channels on this site. No filtering is performed except to check PAGE_REMOVED
|
||||
*
|
||||
* @returns int
|
||||
* on error returns boolean false
|
||||
@ -109,7 +110,10 @@ function get_sys_channel() {
|
||||
*/
|
||||
|
||||
function channel_total() {
|
||||
$r = q("select channel_id from channel where true");
|
||||
$r = q("select channel_id from channel where not ( channel_pageflags & %d )",
|
||||
intval(PAGE_REMOVED)
|
||||
);
|
||||
|
||||
if(is_array($r))
|
||||
return count($r);
|
||||
return false;
|
||||
|
@ -145,7 +145,9 @@ function can_comment_on_post($observer_xchan,$item) {
|
||||
* @function red_zrl_callback
|
||||
* preg_match function when fixing 'naked' links in mod item.php
|
||||
* Check if we've got a hubloc for the site and use a zrl if we do, a url if we don't.
|
||||
*
|
||||
* Remove any existing zid= param which may have been pasted by mistake - and will have
|
||||
* the author's credentials. zid's are dynamic and can't really be passed around like
|
||||
* that.
|
||||
*/
|
||||
|
||||
|
||||
@ -159,6 +161,13 @@ function red_zrl_callback($matches) {
|
||||
if($r)
|
||||
$zrl = true;
|
||||
}
|
||||
|
||||
$t = strip_zids($matches[2]);
|
||||
if($t !== $matches[2]) {
|
||||
$zrl = true;
|
||||
$matches[2] = $t;
|
||||
}
|
||||
|
||||
if($matches[1] === '#^')
|
||||
$matches[1] = '';
|
||||
if($zrl)
|
||||
@ -2254,6 +2263,13 @@ function tag_deliver($uid,$item_id) {
|
||||
if(is_array($j_obj['link']))
|
||||
$taglink = get_rel_link($j_obj['link'],'alternate');
|
||||
store_item_tag($u[0]['channel_id'],$p[0]['id'],TERM_OBJ_POST,TERM_HASHTAG,$j_obj['title'],$j_obj['id']);
|
||||
$x = q("update item set edited = '%s', received = '%s', changed = '%s' where mid = '%s' and uid = %d limit 1",
|
||||
dbesc(datetime_convert()),
|
||||
dbesc(datetime_convert()),
|
||||
dbesc(datetime_convert()),
|
||||
dbesc($j_tgt['id']),
|
||||
intval($u[0]['channel_id'])
|
||||
);
|
||||
proc_run('php','include/notifier.php','edit_post',$p[0]['id']);
|
||||
}
|
||||
}
|
||||
@ -3622,26 +3638,6 @@ function posted_dates($uid,$wall) {
|
||||
}
|
||||
|
||||
|
||||
function posted_date_widget($url,$uid,$wall) {
|
||||
$o = '';
|
||||
|
||||
if(! feature_enabled($uid,'archives'))
|
||||
return $o;
|
||||
|
||||
$ret = posted_dates($uid,$wall);
|
||||
if(! count($ret))
|
||||
return $o;
|
||||
|
||||
$o = replace_macros(get_markup_template('posted_date_widget.tpl'),array(
|
||||
'$title' => t('Archives'),
|
||||
'$size' => ((count($ret) > 6) ? 6 : count($ret)),
|
||||
'$url' => $url,
|
||||
'$dates' => $ret
|
||||
));
|
||||
return $o;
|
||||
}
|
||||
|
||||
|
||||
function fetch_post_tags($items,$link = false) {
|
||||
|
||||
$tag_finder = array();
|
||||
|
@ -1064,5 +1064,15 @@ class RedBrowser extends DAV\Browser\Plugin {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* This method takes a path/name of an asset and turns it into url
|
||||
* suiteable for http access.
|
||||
*
|
||||
* @param string $assetName
|
||||
* @return string
|
||||
*/
|
||||
protected function getAssetUrl($assetName) {
|
||||
return z_root() .'/cloud/?sabreAction=asset&assetName=' . urlencode($assetName);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -621,6 +621,11 @@ function get_tags($s) {
|
||||
}
|
||||
|
||||
|
||||
function strip_zids($s) {
|
||||
return preg_replace('/[\?&]zid=(.*?)(&|$)/ism','$2',$s);
|
||||
}
|
||||
|
||||
|
||||
// quick and dirty quoted_printable encoding
|
||||
|
||||
|
||||
|
@ -1064,7 +1064,9 @@ function zot_import($arr, $sender_url) {
|
||||
}
|
||||
stringify_array_elms($recip_arr);
|
||||
$recips = implode(',',$recip_arr);
|
||||
$r = q("select channel_hash as hash from channel where channel_hash in ( " . $recips . " ) ");
|
||||
$r = q("select channel_hash as hash from channel where channel_hash in ( " . $recips . " ) and not ( channel_pageflags & %d ) ",
|
||||
intval(PAGE_REMOVED)
|
||||
);
|
||||
if(! $r) {
|
||||
logger('recips: no recipients on this site');
|
||||
continue;
|
||||
@ -1222,8 +1224,7 @@ function public_recips($msg) {
|
||||
if(! $r)
|
||||
$r = array();
|
||||
|
||||
$x = q("select channel_hash as hash from channel left join abook on abook_channel = channel_id where abook_xchan = '%s'
|
||||
and (( " . $col . " & " . PERMS_SPECIFIC . " ) and ( abook_my_perms & " . $field . " )) OR ( " . $col . " & " . PERMS_CONTACTS . " ) ",
|
||||
$x = q("select channel_hash as hash from channel left join abook on abook_channel = channel_id where abook_xchan = '%s' and not ( channel_pageflags & " . PAGE_REMOVED . " ) and (( " . $col . " & " . PERMS_SPECIFIC . " ) and ( abook_my_perms & " . $field . " )) OR ( " . $col . " & " . PERMS_CONTACTS . " ) ",
|
||||
dbesc($msg['notify']['sender']['hash'])
|
||||
);
|
||||
|
||||
@ -1304,8 +1305,9 @@ function allowed_public_recips($msg) {
|
||||
$condensed_recips[] = $rr['hash'];
|
||||
|
||||
$results = array();
|
||||
$r = q("select channel_hash as hash from channel left join abook on abook_channel = channel_id where abook_xchan = '%s' ",
|
||||
dbesc($hash)
|
||||
$r = q("select channel_hash as hash from channel left join abook on abook_channel = channel_id where abook_xchan = '%s' and not ( channel_pageflags & %d ) ",
|
||||
dbesc($hash),
|
||||
intval(PAGE_REMOVED)
|
||||
);
|
||||
if($r) {
|
||||
foreach($r as $rr)
|
||||
|
@ -92,7 +92,7 @@ if((x($_SESSION,'language')) && ($_SESSION['language'] !== $lang)) {
|
||||
}
|
||||
|
||||
if((x($_GET,'zid')) && (! $a->install)) {
|
||||
$a->query_string = preg_replace('/[\?&]zid=(.*?)([\?&]|$)/is','',$a->query_string);
|
||||
$a->query_string = strip_zids($a->query_string);
|
||||
if(! local_user()) {
|
||||
$_SESSION['my_address'] = $_GET['zid'];
|
||||
zid_init($a);
|
||||
|
@ -706,9 +706,10 @@ function admin_page_users(&$a){
|
||||
|
||||
$users =q("SELECT `account_id` , `account_email`, `account_lastlog`, `account_created`, `account_expires`, " . "`account_service_class`, ( account_flags & %d ) > 0 as `blocked`, " .
|
||||
"(SELECT GROUP_CONCAT( ch.channel_address SEPARATOR ' ') FROM channel as ch " .
|
||||
"WHERE ch.channel_account_id = ac.account_id) as `channels` " .
|
||||
"WHERE ch.channel_account_id = ac.account_id and not (ch.channel_pageflags & %d )) as `channels` " .
|
||||
"FROM account as ac where true $serviceclass $order limit %d , %d ",
|
||||
intval(ACCOUNT_BLOCKED),
|
||||
intval(ACCOUNT_BLOCKED),
|
||||
intval(PAGE_REMOVED),
|
||||
intval($a->pager['start']),
|
||||
intval($a->pager['itemspage'])
|
||||
);
|
||||
|
@ -73,11 +73,11 @@ function cloud_init(&$a) {
|
||||
|
||||
|
||||
$_SERVER['QUERY_STRING'] = str_replace(array('?f=','&f='),array('',''),$_SERVER['QUERY_STRING']);
|
||||
$_SERVER['QUERY_STRING'] = preg_replace('/[\?&]zid=(.*?)([\?&]|$)/ism','',$_SERVER['QUERY_STRING']);
|
||||
$_SERVER['QUERY_STRING'] = strip_zids($_SERVER['QUERY_STRING']);
|
||||
$_SERVER['QUERY_STRING'] = preg_replace('/[\?&]davguest=(.*?)([\?&]|$)/ism','',$_SERVER['QUERY_STRING']);
|
||||
|
||||
$_SERVER['REQUEST_URI'] = str_replace(array('?f=','&f='),array('',''),$_SERVER['REQUEST_URI']);
|
||||
$_SERVER['REQUEST_URI'] = preg_replace('/[\?&]zid=(.*?)([\?&]|$)/ism','',$_SERVER['REQUEST_URI']);
|
||||
$_SERVER['REQUEST_URI'] = strip_zids($_SERVER['REQUEST_URI']);
|
||||
$_SERVER['REQUEST_URI'] = preg_replace('/[\?&]davguest=(.*?)([\?&]|$)/ism','',$_SERVER['REQUEST_URI']);
|
||||
|
||||
$rootDirectory = new RedDirectory('/',$auth);
|
||||
|
@ -423,19 +423,13 @@ function item_post(&$a) {
|
||||
/**
|
||||
* fix naked links by passing through a callback to see if this is a red site
|
||||
* (already known to us) which will get a zrl, otherwise link with url, add bookmark tag to both.
|
||||
* First wrap any url which is part of link anchor text already in quotes so we don't double link it.
|
||||
* e.g. [url=http://foobar.com]something with http://elsewhere.com in it[/url]
|
||||
* becomes [url=http://foobar.com]something with "http://elsewhere.com" in it[/url]
|
||||
* otherwise http://elsewhere.com becomes #^[url=http://elsewhere.com]http://elsewhere.com[/url]
|
||||
* First protect any url inside certain bbcode tags so we don't double link it.
|
||||
*/
|
||||
|
||||
$body = preg_replace_callback('/\[code(.*?)\[\/(code)\]/ism','red_escape_codeblock',$body);
|
||||
$body = preg_replace_callback('/\[url(.*?)\[\/(url)\]/ism','red_escape_codeblock',$body);
|
||||
$body = preg_replace_callback('/\[zrl(.*?)\[\/(zrl)\]/ism','red_escape_codeblock',$body);
|
||||
|
||||
// no longer needed
|
||||
// $body = preg_replace_callback('/\[([uz])rl(.*?)\](.*?)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\+\,]+)(.*?)\[\/([uz])rl\]/ism','red_escape_zrl_callback',$body);
|
||||
|
||||
$body = preg_replace_callback("/([^\]\='".'"'."]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\+\,]+)/ism", 'red_zrl_callback', $body);
|
||||
|
||||
$body = preg_replace_callback('/\[\$b64zrl(.*?)\[\/(zrl)\]/ism','red_unescape_codeblock',$body);
|
||||
|
@ -55,8 +55,9 @@ function manage_content(&$a) {
|
||||
}
|
||||
}
|
||||
|
||||
$r = q("select count(channel_id) as total from channel where channel_account_id = %d ",
|
||||
intval(get_account_id())
|
||||
$r = q("select count(channel_id) as total from channel where channel_account_id = %d and not ( channel_pageflags & %d )",
|
||||
intval(get_account_id()),
|
||||
intval(PAGE_REMOVED)
|
||||
);
|
||||
$limit = service_class_fetch(local_user(),'total_identities');
|
||||
if($limit !== false) {
|
||||
|
@ -939,6 +939,7 @@ function settings_content(&$a) {
|
||||
'$pmacro1' => t('Private - <em>default private, never open or public</em>'),
|
||||
'$pmacro0' => t('Blocked - <em>default blocked to/from everybody</em>'),
|
||||
'$permiss_arr' => $permiss,
|
||||
'$blocktags' => array('blocktags',t('Allow others to tag your posts'), 1-$blocktags, t('Often used by the community to retro-actively flag inappropriate content'),array(t('No'),t('Yes'))),
|
||||
|
||||
'$lbl_p2macro' => t('Advanced Privacy Settings'),
|
||||
|
||||
|
@ -1 +1 @@
|
||||
2014-02-14.588
|
||||
2014-02-16.590
|
||||
|
2217
view/de/messages.po
2217
view/de/messages.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -59,10 +59,14 @@
|
||||
|
||||
</div>
|
||||
<div class="settings-common-perms">
|
||||
|
||||
|
||||
{{$profile_in_dir}}
|
||||
|
||||
{{$suggestme}}
|
||||
|
||||
{{include file="field_yesno.tpl" field=$blocktags}}
|
||||
|
||||
{{include file="field_input.tpl" field=$maxreq}}
|
||||
|
||||
{{include file="field_input.tpl" field=$cntunkmail}}
|
||||
|
Reference in New Issue
Block a user