aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/admin.php5
-rw-r--r--mod/cloud.php4
-rw-r--r--mod/editpost.php9
-rw-r--r--mod/item.php10
-rw-r--r--mod/manage.php5
-rw-r--r--mod/post.php2
-rw-r--r--mod/settings.php1
7 files changed, 21 insertions, 15 deletions
diff --git a/mod/admin.php b/mod/admin.php
index 01296bd29..c4a284941 100644
--- a/mod/admin.php
+++ b/mod/admin.php
@@ -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'])
);
diff --git a/mod/cloud.php b/mod/cloud.php
index 18b61f941..3606325bd 100644
--- a/mod/cloud.php
+++ b/mod/cloud.php
@@ -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);
diff --git a/mod/editpost.php b/mod/editpost.php
index 918a70d36..8c4117e7a 100644
--- a/mod/editpost.php
+++ b/mod/editpost.php
@@ -92,6 +92,15 @@ function editpost_content(&$a) {
}
+ if($itm[0]['attach']) {
+ $j = json_decode($itm[0]['attach'],true);
+ if($j) {
+ foreach($j as $jj) {
+ $itm[0]['body'] .= "\n" . '[attachment]' . basename($jj['href']) . ',' . $jj['revision'] . '[/attachment]' . "\n";
+ }
+ }
+ }
+
$cipher = get_pconfig(get_app()->profile['profile_uid'],'system','default_cipher');
if(! $cipher)
$cipher = 'aes256';
diff --git a/mod/item.php b/mod/item.php
index 54c9f128a..fa7720791 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -44,7 +44,7 @@ function item_post(&$a) {
call_hooks('post_local_start', $_REQUEST);
- // logger('postvars ' . print_r($_REQUEST,true), LOGGER_DATA);
+// logger('postvars ' . print_r($_REQUEST,true), LOGGER_DATA);
$api_source = ((x($_REQUEST,'api_source') && $_REQUEST['api_source']) ? true : false);
@@ -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);
diff --git a/mod/manage.php b/mod/manage.php
index a2f65b271..0772e2d61 100644
--- a/mod/manage.php
+++ b/mod/manage.php
@@ -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) {
diff --git a/mod/post.php b/mod/post.php
index 919f09a35..6c57bfa0d 100644
--- a/mod/post.php
+++ b/mod/post.php
@@ -828,7 +828,7 @@ function post_post(&$a) {
'xchan_guid' => $sender['guid'],
'xchan_guid_sig' => $sender['guid_sig'],
'hubloc_url' => $sender['url']
- ),null);
+ ),null,(($msgtype === 'force_refresh') ? true : false));
}
$ret['success'] = true;
json_return_and_die($ret);
diff --git a/mod/settings.php b/mod/settings.php
index ec758bc90..97965d0fd 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -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'),