aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authormarijus <mario@localhost.localdomain>2014-02-03 08:03:46 +0100
committermarijus <mario@localhost.localdomain>2014-02-03 08:03:46 +0100
commit5c885e91a36bdbdd0829c2950b54bb84288e05a9 (patch)
treec17bcc246b68dd4a53b7883f81f596f82cc1e3fc /mod
parent11efafb5d2b9a6b860772e4c4cec0cde5c1bf248 (diff)
parentee42079685dd4df721b1090bdaa0d86316e3358a (diff)
downloadvolse-hubzilla-5c885e91a36bdbdd0829c2950b54bb84288e05a9.tar.gz
volse-hubzilla-5c885e91a36bdbdd0829c2950b54bb84288e05a9.tar.bz2
volse-hubzilla-5c885e91a36bdbdd0829c2950b54bb84288e05a9.zip
Merge branch 'master' of https://github.com/friendica/red
Diffstat (limited to 'mod')
-rw-r--r--mod/chatsvc.php94
-rw-r--r--mod/connedit.php8
-rw-r--r--mod/menu.php4
-rw-r--r--mod/settings.php16
4 files changed, 66 insertions, 56 deletions
diff --git a/mod/chatsvc.php b/mod/chatsvc.php
index bbe616c48..e6590f57a 100644
--- a/mod/chatsvc.php
+++ b/mod/chatsvc.php
@@ -56,6 +56,7 @@ function chatsvc_content(&$a) {
$status = strip_tags($_REQUEST['status']);
$room_id = intval($a->data['chat']['room_id']);
+ $stopped = ((x($_REQUEST,'stopped') && intval($_REQUEST['stopped'])) ? true : false);
if($status && $room_id) {
@@ -74,58 +75,60 @@ function chatsvc_content(&$a) {
goaway(z_root() . '/chat/' . $x[0]['channel_address'] . '/' . $room_id);
}
+ if(! $stopped) {
- $lastseen = intval($_REQUEST['last']);
+ $lastseen = intval($_REQUEST['last']);
- $ret = array('success' => false);
+ $ret = array('success' => false);
- $sql_extra = permissions_sql($a->data['chat']['uid']);
+ $sql_extra = permissions_sql($a->data['chat']['uid']);
- $r = q("select * from chatroom where cr_uid = %d and cr_id = %d $sql_extra",
- intval($a->data['chat']['uid']),
- intval($a->data['chat']['room_id'])
- );
- if(! $r)
- json_return_and_die($ret);
+ $r = q("select * from chatroom where cr_uid = %d and cr_id = %d $sql_extra",
+ intval($a->data['chat']['uid']),
+ intval($a->data['chat']['room_id'])
+ );
+ if(! $r)
+ json_return_and_die($ret);
- $inroom = array();
+ $inroom = array();
- $r = q("select * from chatpresence left join xchan on xchan_hash = cp_xchan where cp_room = %d order by xchan_name",
- intval($a->data['chat']['room_id'])
- );
- if($r) {
- foreach($r as $rr) {
- switch($rr['cp_status']) {
- case 'away':
- $status = t('Away');
- break;
- case 'online':
- default:
- $status = t('Online');
- break;
+ $r = q("select * from chatpresence left join xchan on xchan_hash = cp_xchan where cp_room = %d order by xchan_name",
+ intval($a->data['chat']['room_id'])
+ );
+ if($r) {
+ foreach($r as $rr) {
+ switch($rr['cp_status']) {
+ case 'away':
+ $status = t('Away');
+ break;
+ case 'online':
+ default:
+ $status = t('Online');
+ break;
+ }
+
+ $inroom[] = array('img' => zid($rr['xchan_photo_m']), 'img_type' => $rr['xchan_photo_mimetype'],'name' => $rr['xchan_name'], status => $status);
}
-
- $inroom[] = array('img' => zid($rr['xchan_photo_m']), 'img_type' => $rr['xchan_photo_mimetype'],'name' => $rr['xchan_name'], status => $status);
}
- }
- $chats = array();
+ $chats = array();
- $r = q("select * from chat left join xchan on chat_xchan = xchan_hash where chat_room = %d and chat_id > %d",
- intval($a->data['chat']['room_id']),
- intval($lastseen)
- );
- if($r) {
- foreach($r as $rr) {
- $chats[] = array(
- 'id' => $rr['chat_id'],
- 'img' => zid($rr['xchan_photo_m']),
- 'img_type' => $rr['xchan_photo_mimetype'],
- 'name' => $rr['xchan_name'],
- 'isotime' => datetime_convert('UTC', date_default_timezone_get(), $rr['created'], 'c'),
- 'localtime' => datetime_convert('UTC', date_default_timezone_get(), $rr['created'], 'r'),
- 'text' => smilies(bbcode($rr['chat_text']))
- );
+ $r = q("select * from chat left join xchan on chat_xchan = xchan_hash where chat_room = %d and chat_id > %d",
+ intval($a->data['chat']['room_id']),
+ intval($lastseen)
+ );
+ if($r) {
+ foreach($r as $rr) {
+ $chats[] = array(
+ 'id' => $rr['chat_id'],
+ 'img' => zid($rr['xchan_photo_m']),
+ 'img_type' => $rr['xchan_photo_mimetype'],
+ 'name' => $rr['xchan_name'],
+ 'isotime' => datetime_convert('UTC', date_default_timezone_get(), $rr['created'], 'c'),
+ 'localtime' => datetime_convert('UTC', date_default_timezone_get(), $rr['created'], 'r'),
+ 'text' => smilies(bbcode($rr['chat_text']))
+ );
+ }
}
}
@@ -137,9 +140,10 @@ function chatsvc_content(&$a) {
);
$ret['success'] = true;
- $ret['inroom'] = $inroom;
- $ret['chats'] = $chats;
-
+ if(! $stopped) {
+ $ret['inroom'] = $inroom;
+ $ret['chats'] = $chats;
+ }
json_return_and_die($ret);
}
diff --git a/mod/connedit.php b/mod/connedit.php
index e2d4b861c..b7101fcab 100644
--- a/mod/connedit.php
+++ b/mod/connedit.php
@@ -442,13 +442,13 @@ function connedit_content(&$a) {
'$perms' => $perms,
'$forum' => t('Forum Members'),
'$soapbox' => t('Soapbox'),
- '$full' => t('Full Sharing'),
- '$cautious' => t('Cautious Sharing'),
+ '$full' => t('Full Sharing (typical social network permissions)'),
+ '$cautious' => t('Cautious Sharing '),
'$follow' => t('Follow Only'),
'$permlbl' => t('Individual Permissions'),
- '$permnote' => t('Some permissions may be inherited from your channel <a href="settings">privacy settings</a>, which have higher priority. Changing those inherited settings on this page will have no effect.'),
+ '$permnote' => t('Some permissions may be inherited from your channel <a href="settings">privacy settings</a>, which have higher priority than individual settings. Changing those inherited settings on this page will have no effect.'),
'$advanced' => t('Advanced Permissions'),
- '$quick' => t('Quick Links'),
+ '$quick' => t('Simple Permissions (select one and submit)'),
'$common_link' => $a->get_baseurl(true) . '/common/loc/' . local_user() . '/' . $contact['id'],
'$all_friends' => $all_friends,
'$relation_text' => $relation_text,
diff --git a/mod/menu.php b/mod/menu.php
index 47eed6484..dd8fe8300 100644
--- a/mod/menu.php
+++ b/mod/menu.php
@@ -8,6 +8,8 @@ function menu_post(&$a) {
return;
$_REQUEST['menu_channel_id'] = local_user();
+ if($_REQUEST['menu_bookmark'])
+ $_REQUEST['menu_flags'] = MENU_BOOKMARK;
$menu_id = ((argc() > 1) ? intval(argv(1)) : 0);
if($menu_id) {
@@ -76,6 +78,7 @@ function menu_content(&$a) {
'$header' => t('New Menu'),
'$menu_name' => array('menu_name', t('Menu name'), '', t('Must be unique, only seen by you'), '*'),
'$menu_desc' => array('menu_desc', t('Menu title'), '', t('Menu title as seen by others'), ''),
+ '$menu_bookmark' => array('menu_bookmark', t('Allow bookmarks'), 0 , t('Menu may be used to store saved bookmarks'), ''),
'$submit' => t('Create')
));
return $o;
@@ -104,6 +107,7 @@ function menu_content(&$a) {
'$editcontents' => t('Edit menu contents'),
'$menu_name' => array('menu_name', t('Menu name'), $m['menu_name'], t('Must be unique, only seen by you'), '*'),
'$menu_desc' => array('menu_desc', t('Menu title'), $m['menu_desc'], t('Menu title as seen by others'), ''),
+ '$menu_bookmark' => array('menu_bookmark', t('Allow bookmarks'), (($m['menu_flags'] & MENU_BOOKMARK) ? 1 : 0), t('Menu may be used to store saved bookmarks'), ''),
'$submit' => t('Modify')
));
return $o;
diff --git a/mod/settings.php b/mod/settings.php
index 7ff76cd3e..38b1d6fdf 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -919,19 +919,21 @@ function settings_content(&$a) {
'$defloc' => array('defloc', t('Default Post Location:'), $defloc, ''),
'$allowloc' => array('allow_location', t('Use Browser Location:'), ((get_pconfig(local_user(),'system','use_browser_location')) ? 1 : ''), ''),
- '$adult' => array('adult', t('Adult Content'), $adult_flag, t('This channel publishes adult content.')),
+ '$adult' => array('adult', t('Adult Content'), $adult_flag, t('This channel frequently or regularly publishes adult content. (Please tag any adult material and/or nudity with #NSFW)')),
'$h_prv' => t('Security and Privacy Settings'),
- '$hide_presence' => array('hide_presence', t('Hide my online presence'),$hide_presence, t('Prevents showing if you are available for chat')),
+ '$hide_presence' => array('hide_presence', t('Hide my online presence'),$hide_presence, t('Prevents displaying in your profile that you are online')),
- '$lbl_pmacro' => t('Quick Privacy Settings:'),
- '$pmacro3' => t('Very Public - extremely permissive'),
- '$pmacro2' => t('Typical - default public, privacy when desired'),
- '$pmacro1' => t('Private - default private, rarely open or public'),
- '$pmacro0' => t('Blocked - default blocked to/from everybody'),
+ '$lbl_pmacro' => t('Simple Privacy Settings:'),
+ '$pmacro3' => t('Very Public - <em>extremely permissive (should be used with caution)</em>'),
+ '$pmacro2' => t('Typical - <em>default public, privacy when desired (similar to social network permissions but with improved privacy)</em>'),
+ '$pmacro1' => t('Private - <em>default private, never open or public</em>'),
+ '$pmacro0' => t('Blocked - <em>default blocked to/from everybody</em>'),
'$permiss_arr' => $permiss,
+ '$lbl_p2macro' => t('Advanced Privacy Settings'),
+
'$maxreq' => array('maxreq', t('Maximum Friend Requests/Day:'), intval($channel['channel_max_friend_req']) , t('May reduce spam activity')),
'$permissions' => t('Default Post Permissions'),
'$permdesc' => t("\x28click to open/close\x29"),