';
@@ -132,7 +132,7 @@ function widget_suggestions($arr) {
'profile' => $rr['xchan_url'],
'name' => $rr['xchan_name'],
'photo' => $rr['xchan_photo_m'],
- 'ignlnk' => z_root() . '/suggest?ignore=' . $rr['xchan_hash'],
+ 'ignlnk' => z_root() . '/directory?ignore=' . $rr['xchan_hash'],
'conntxt' => t('Connect'),
'connlnk' => $connlnk,
'ignore' => t('Ignore/Hide')
@@ -380,6 +380,7 @@ function widget_categories($arr) {
$srchurl = str_replace(array('?f=','&f='),array('',''),$srchurl);
return categories_widget($srchurl, $cat);
+
}
function widget_tagcloud_wall($arr) {
@@ -392,7 +393,7 @@ function widget_tagcloud_wall($arr) {
$limit = ((array_key_exists('limit', $arr)) ? intval($arr['limit']) : 50);
if(feature_enabled($a->profile['profile_uid'], 'tagadelic'))
- return wtagblock($a->profile['profile_uid'], $limit, $a->profile['channel_hash'], 'wall');
+ return wtagblock($a->profile['profile_uid'], $limit, '', $a->profile['channel_hash'], 'wall');
return '';
}
@@ -407,7 +408,7 @@ function widget_catcloud_wall($arr) {
$limit = ((array_key_exists('limit',$arr)) ? intval($arr['limit']) : 50);
- return catblock($a->profile['profile_uid'], $limit, $a->profile['channel_hash'], 'wall');
+ return catblock($a->profile['profile_uid'], $limit, '', $a->profile['channel_hash'], 'wall');
}
@@ -604,7 +605,7 @@ function widget_photo_albums($arr) {
if(! $a->profile['profile_uid'])
return '';
$channelx = channelx_by_n($a->profile['profile_uid']);
- if((! $channelx) || (! perm_is_allowed($a->profile['profile_uid'], get_observer_hash(), 'view_photos')))
+ if((! $channelx) || (! perm_is_allowed($a->profile['profile_uid'], get_observer_hash(), 'view_storage')))
return '';
require_once('include/photos.php');
@@ -903,7 +904,7 @@ function widget_random_block($arr) {
item_type = %d $sql_options order by $randfunc limit 1",
intval($channel_id),
dbesc('%' . $contains . '%'),
- intval(ITEM_TYPE_BUILDBLOCK)
+ intval(ITEM_TYPE_BLOCK)
);
if($r) {
diff --git a/include/zot.php b/include/zot.php
index 4ac346002..0cb3ab9ed 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -566,7 +566,7 @@ function zot_gethub($arr) {
}
/**
- * @brief Registers an unknown hup.
+ * @brief Registers an unknown hub.
*
* A communication has been received which has an unknown (to us) sender.
* Perform discovery based on our calculated hash of the sender at the
@@ -1088,11 +1088,19 @@ function zot_import($arr, $sender_url) {
logger('specific recipients');
$recip_arr = array();
foreach($i['notify']['recipients'] as $recip) {
- $recip_arr[] = make_xchan_hash($recip['guid'],$recip['guid_sig']);
+ if(is_array($recip)) {
+ $recip_arr[] = make_xchan_hash($recip['guid'],$recip['guid_sig']);
+ }
}
- stringify_array_elms($recip_arr);
- $recips = implode(',',$recip_arr);
- $r = q("select channel_hash as hash from channel where channel_hash in ( " . $recips . " ) and channel_removed = 0 ");
+
+ $r = false;
+ if($recip_arr) {
+ stringify_array_elms($recip_arr);
+ $recips = implode(',',$recip_arr);
+ $r = q("select channel_hash as hash from channel where channel_hash in ( " . $recips . " )
+ and channel_removed = 0 ");
+ }
+
if(! $r) {
logger('recips: no recipients on this site');
continue;
@@ -1248,7 +1256,8 @@ function public_recips($msg) {
$include_sys = false;
if($msg['message']['type'] === 'activity') {
- $include_sys = true;
+ if(! get_config('system','disable_discover_tab'))
+ $include_sys = true;
$col = 'channel_w_stream';
$field = PERMS_W_STREAM;
if(array_key_exists('flags',$msg['message']) && in_array('thread_parent', $msg['message']['flags'])) {
@@ -2852,6 +2861,11 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) {
}
if(array_key_exists('channel',$arr) && is_array($arr['channel']) && count($arr['channel'])) {
+ if(array_key_exists('channel_page_flags',$arr['channel']) && intval($arr['channel']['channel_pageflags'])) {
+ $arr['channel']['channel_removed'] = (($arr['channel']['channel_pageflags'] & 0x8000) ? 1 : 0);
+ $arr['channel']['channel_system'] = (($arr['channel']['channel_pageflags'] & 0x1000) ? 1 : 0);
+ }
+
$disallowed = array('channel_id','channel_account_id','channel_primary','channel_prvkey', 'channel_address', 'channel_notifyflags');
$clean = array();
@@ -2883,28 +2897,20 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) {
$total_feeds ++;
}
- $disallowed = array('abook_id','abook_account','abook_channel');
+ $disallowed = array('abook_id','abook_account','abook_channel','abook_rating','abook_rating_text');
foreach($arr['abook'] as $abook) {
if(! array_key_exists('abook_blocked',$abook)) {
// convert from redmatrix
- if($abook['abook_flags'] & 0x0001)
- $abook['abook_blocked'] = 1;
- if($abook['abook_flags'] & 0x0002)
- $abook['abook_ignored'] = 1;
- if($abook['abook_flags'] & 0x0004)
- $abook['abook_hidden'] = 1;
- if($abook['abook_flags'] & 0x0008)
- $abook['abook_archived'] = 1;
- if($abook['abook_flags'] & 0x0010)
- $abook['abook_pending'] = 1;
- if($abook['abook_flags'] & 0x0020)
- $abook['abook_unconnected'] = 1;
- if($abook['abook_flags'] & 0x0080)
- $abook['abook_self'] = 1;
- if($abook['abook_flags'] & 0x0100)
- $abook['abook_feed'] = 1;
+ $abook['abook_blocked'] = (($abook['abook_flags'] & 0x0001) ? 1 : 0);
+ $abook['abook_ignored'] = (($abook['abook_flags'] & 0x0002) ? 1 : 0);
+ $abook['abook_hidden'] = (($abook['abook_flags'] & 0x0004) ? 1 : 0);
+ $abook['abook_archived'] = (($abook['abook_flags'] & 0x0008) ? 1 : 0);
+ $abook['abook_pending'] = (($abook['abook_flags'] & 0x0010) ? 1 : 0);
+ $abook['abook_unconnected'] = (($abook['abook_flags'] & 0x0020) ? 1 : 0);
+ $abook['abook_self'] = (($abook['abook_flags'] & 0x0080) ? 1 : 0);
+ $abook['abook_feed'] = (($abook['abook_flags'] & 0x0100) ? 1 : 0);
}
$clean = array();
@@ -3165,7 +3171,7 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) {
}
if(count($clean)) {
foreach($clean as $k => $v) {
- $r = dbq("UPDATE profile set " . dbesc($k) . " = '" . dbesc($v)
+ $r = dbq("UPDATE profile set `" . dbesc($k) . "` = '" . dbesc($v)
. "' where profile_guid = '" . dbesc($profile['profile_guid']) . "' and uid = " . intval($channel['channel_id']));
}
}
diff --git a/index.php b/index.php
index 66ea844d0..3758b38b0 100755
--- a/index.php
+++ b/index.php
@@ -195,6 +195,17 @@ if(strlen($a->module)) {
}
}
+ /**
+ * This provides a place for plugins to register module handlers which don't otherwise exist on the system.
+ * If the plugin sets 'installed' to true we won't throw a 404 error for the specified module even if
+ * there is no specific module file or matching plugin name.
+ * The plugin should catch at least one of the module hooks for this URL.
+ */
+
+ $x = array('module' => $a->module, 'installed' => false);
+ call_hooks('module_loaded', $x);
+ if($x['installed'])
+ $a->module_loaded = true;
/**
* The URL provided does not resolve to a valid module.
diff --git a/mod/block.php b/mod/block.php
index fb5645d8a..df3909629 100644
--- a/mod/block.php
+++ b/mod/block.php
@@ -53,7 +53,7 @@ function block_content(&$a) {
item_type = %d $sql_options $revision limit 1",
intval($u[0]['channel_id']),
dbesc($page_id),
- intval(ITEM_TYPE_BUILDBLOCK)
+ intval(ITEM_TYPE_BLOCK)
);
if(! $r) {
@@ -65,7 +65,7 @@ function block_content(&$a) {
item_type = %d $revision limit 1",
intval($u[0]['channel_id']),
dbesc($page_id),
- intval(ITEM_TYPE_BUILDBLOCK)
+ intval(ITEM_TYPE_BLOCK)
);
if($x) {
// Yes, it's there. You just aren't allowed to see it.
diff --git a/mod/blocks.php b/mod/blocks.php
index 95979a304..97cc5cd53 100644
--- a/mod/blocks.php
+++ b/mod/blocks.php
@@ -84,7 +84,7 @@ function blocks_content(&$a) {
}
$x = array(
- 'webpage' => ITEM_TYPE_BUILDBLOCK,
+ 'webpage' => ITEM_TYPE_BLOCK,
'is_owner' => true,
'nickname' => $a->profile['channel_address'],
'lockstate' => (($channel['channel_allow_cid'] || $channel['channel_allow_gid'] || $channel['channel_deny_cid'] || $channel['channel_deny_gid']) ? 'lock' : 'unlock'),
@@ -110,7 +110,7 @@ function blocks_content(&$a) {
$r = q("select iid, sid, mid, title, body, mimetype, created, edited from item_id left join item on item_id.iid = item.id
where item_id.uid = %d and service = 'BUILDBLOCK' and item_type = %d order by item.created desc",
intval($owner),
- intval(ITEM_TYPE_BUILDBLOCK)
+ intval(ITEM_TYPE_BLOCK)
);
$pages = null;
diff --git a/mod/channel.php b/mod/channel.php
index 9a98ade60..d1064e939 100644
--- a/mod/channel.php
+++ b/mod/channel.php
@@ -175,7 +175,7 @@ function channel_content(&$a, $update = 0, $load = false) {
left join abook on ( item.owner_xchan = abook.abook_xchan $abook_uids )
WHERE uid = %d $item_normal
AND item_wall = 1 AND item_unseen = 1
- AND (abook.blocked = 0 or abook.abook_flags is null)
+ AND (abook.abook_blocked = 0 or abook.abook_flags is null)
$sql_extra
ORDER BY created DESC",
intval($a->profile['profile_uid'])
diff --git a/mod/connedit.php b/mod/connedit.php
index 46546caa1..866f83615 100644
--- a/mod/connedit.php
+++ b/mod/connedit.php
@@ -130,7 +130,6 @@ function connedit_post(&$a) {
}
}
- $abook_flags = $orig_record[0]['abook_flags'];
$new_friend = false;
if(! $is_self) {
@@ -144,7 +143,6 @@ function connedit_post(&$a) {
dbesc($orig_record[0]['abook_xchan'])
);
-
if($z) {
$record = $z[0]['xlink_id'];
$w = q("update xlink set xlink_rating = '%d', xlink_rating_text = '%s', xlink_sig = '%s', xlink_updated = '%s'
@@ -192,6 +190,7 @@ function connedit_post(&$a) {
}
}
+ $abook_pending = $new_friend ? 0 : $orig_record[0]['abook_pending'];
$r = q("UPDATE abook SET abook_profile = '%s', abook_my_perms = %d , abook_closeness = %d, abook_pending = %d,
abook_incl = '%s', abook_excl = '%s'
@@ -199,7 +198,7 @@ function connedit_post(&$a) {
dbesc($profile_id),
intval($abook_my_perms),
intval($closeness),
- intval(1 - intval($new_friend)),
+ intval($abook_pending),
dbesc($abook_incl),
dbesc($abook_excl),
intval($contact_id),
@@ -398,9 +397,6 @@ function connedit_content(&$a) {
if($cmd === 'block') {
if(abook_toggle_flag($orig_record[0],ABOOK_FLAG_BLOCKED)) {
- info((intval($orig_record[0]['abook_blocked'])
- ? t('Channel has been unblocked')
- : t('Channel has been blocked')) . EOL );
connedit_clone($a);
}
else
@@ -410,9 +406,6 @@ function connedit_content(&$a) {
if($cmd === 'ignore') {
if(abook_toggle_flag($orig_record[0],ABOOK_FLAG_IGNORED)) {
- info((intval($orig_record[0]['abook_ignored'])
- ? t('Channel has been unignored')
- : t('Channel has been ignored')) . EOL );
connedit_clone($a);
}
else
@@ -422,9 +415,6 @@ function connedit_content(&$a) {
if($cmd === 'archive') {
if(abook_toggle_flag($orig_record[0],ABOOK_FLAG_ARCHIVED)) {
- info((intval($orig_record[0]['abook_archived'])
- ? t('Channel has been unarchived')
- : t('Channel has been archived')) . EOL );
connedit_clone($a);
}
else
@@ -434,9 +424,6 @@ function connedit_content(&$a) {
if($cmd === 'hide') {
if(abook_toggle_flag($orig_record[0],ABOOK_FLAG_HIDDEN)) {
- info((intval($orig_record[0]['abook_hidden'])
- ? t('Channel has been unhidden')
- : t('Channel has been hidden')) . EOL );
connedit_clone($a);
}
else
@@ -450,9 +437,6 @@ function connedit_content(&$a) {
if($cmd === 'approve') {
if(intval($orig_record[0]['abook_pending'])) {
if(abook_toggle_flag($orig_record[0],ABOOK_FLAG_PENDING)) {
- info((intval($orig_record[0]['abook_pending'])
- ? t('Channel has been approved')
- : t('Channel has been unapproved')) . EOL );
connedit_clone($a);
}
else
@@ -493,59 +477,62 @@ function connedit_content(&$a) {
$contact_id = $a->poi['abook_id'];
$contact = $a->poi;
+ $buttons = array(
- $tabs = array(
-
- array(
+ 'view' => array(
'label' => t('View Profile'),
'url' => chanlink_cid($contact['abook_id']),
'sel' => '',
'title' => sprintf( t('View %s\'s profile'), $contact['xchan_name']),
),
- array(
+ 'refresh' => array(
'label' => t('Refresh Permissions'),
'url' => $a->get_baseurl(true) . '/connedit/' . $contact['abook_id'] . '/refresh',
'sel' => '',
'title' => t('Fetch updated permissions'),
),
- array(
+ 'recent' => array(
'label' => t('Recent Activity'),
'url' => $a->get_baseurl(true) . '/network/?f=&cid=' . $contact['abook_id'],
'sel' => '',
'title' => t('View recent posts and comments'),
- )
- );
+ ),
- $buttons = array(
- array(
+ 'block' => array(
'label' => (intval($contact['abook_blocked']) ? t('Unblock') : t('Block')),
'url' => $a->get_baseurl(true) . '/connedit/' . $contact['abook_id'] . '/block',
'sel' => (intval($contact['abook_blocked']) ? 'active' : ''),
'title' => t('Block (or Unblock) all communications with this connection'),
+ 'info' => (intval($contact['abook_blocked']) ? t('This connection is blocked!') : ''),
),
- array(
+ 'ignore' => array(
'label' => (intval($contact['abook_ignored']) ? t('Unignore') : t('Ignore')),
'url' => $a->get_baseurl(true) . '/connedit/' . $contact['abook_id'] . '/ignore',
'sel' => (intval($contact['abook_ignored']) ? 'active' : ''),
'title' => t('Ignore (or Unignore) all inbound communications from this connection'),
+ 'info' => (intval($contact['abook_ignored']) ? t('This connection is ignored!') : ''),
),
- array(
+
+ 'archive' => array(
'label' => (intval($contact['abook_archived']) ? t('Unarchive') : t('Archive')),
'url' => $a->get_baseurl(true) . '/connedit/' . $contact['abook_id'] . '/archive',
'sel' => (intval($contact['abook_archived']) ? 'active' : ''),
'title' => t('Archive (or Unarchive) this connection - mark channel dead but keep content'),
+ 'info' => (intval($contact['abook_archived']) ? t('This connection is archived!') : ''),
),
- array(
+
+ 'hide' => array(
'label' => (intval($contact['abook_hidden']) ? t('Unhide') : t('Hide')),
'url' => $a->get_baseurl(true) . '/connedit/' . $contact['abook_id'] . '/hide',
'sel' => (intval($contact['abook_hidden']) ? 'active' : ''),
'title' => t('Hide or Unhide this connection from your other connections'),
+ 'info' => (intval($contact['abook_hidden']) ? t('This connection is hidden!') : ''),
),
- array(
+ 'delete' => array(
'label' => t('Delete'),
'url' => $a->get_baseurl(true) . '/connedit/' . $contact['abook_id'] . '/drop',
'sel' => '',
@@ -556,18 +543,9 @@ function connedit_content(&$a) {
$self = false;
- if(! intval($contact['abook_self'])) {
- $tab_tpl = get_markup_template('common_tabs.tpl');
- $t = replace_macros($tab_tpl, array('$tabs'=>$tabs));
- }
- else
+ if(intval($contact['abook_self']))
$self = true;
- $a->page['htmlhead'] .= replace_macros(get_markup_template('contact_head.tpl'), array(
- '$baseurl' => $a->get_baseurl(true),
- '$editselect' => $editselect
- ));
-
require_once('include/contact_selectors.php');
$tpl = get_markup_template("abook_edit.tpl");
@@ -616,7 +594,6 @@ function connedit_content(&$a) {
$rating_text = $xl[0]['xlink_rating_text'];
}
-
$poco_rating = get_config('system','poco_rating_enable');
// if unset default to enabled
@@ -640,101 +617,78 @@ function connedit_content(&$a) {
$global_perms = get_perms();
$existing = get_all_perms(local_channel(),$contact['abook_xchan']);
- $unapproved = array('pending', t('Approve this connection'), '', t('Accept connection to allow communication'));
-
+ $unapproved = array('pending', t('Approve this connection'), '', t('Accept connection to allow communication'), array(t('No'),('Yes')));
+
+ $multiprofs = ((feature_enabled(local_channel(),'multi_profiles')) ? true : false);
+
+ if($slide && !$multiprofs)
+ $affinity = t('Set Affinity');
+
+ if(!$slide && $multiprofs)
+ $affinity = t('Set Profile');
+
+ if($slide && $multiprofs)
+ $affinity = t('Set Affinity & Profile');
+
foreach($global_perms as $k => $v) {
$thisperm = (($contact['abook_my_perms'] & $v[1]) ? "1" : '');
+ $checkinherited = ((($channel[$v[0]]) && ($channel[$v[0]] != PERMS_SPECIFIC)) ? "1" : '');
// For auto permissions (when $self is true) we don't want to look at existing
// permissions because they are enabled for the channel owner
-
if((! $self) && ($existing[$k]))
$thisperm = "1";
- $perms[] = array('perms_' . $k, $v[3], (($contact['abook_their_perms'] & $v[1]) ? "1" : ""),$thisperm, $v[1], (($channel[$v[0]] == PERMS_SPECIFIC || $self) ? '' : '1'), $v[4]);
+ $perms[] = array('perms_' . $k, $v[3], (($contact['abook_their_perms'] & $v[1]) ? "1" : ""),$thisperm, $v[1], (($channel[$v[0]] == PERMS_SPECIFIC) ? '' : '1'), $v[4], $checkinherited);
}
$o .= replace_macros($tpl,array(
- '$header' => (($self) ? t('Connection Default Permissions') : sprintf( t('Connections: settings for %s'),$contact['xchan_name'])),
- '$autoperms' => array('autoperms',t('Apply these permissions automatically'), ((get_pconfig(local_channel(),'system','autoperms')) ? 1 : 0), ''),
+ '$header' => (($self) ? t('Connection Default Permissions') : sprintf( t('Connection: %s'),$contact['xchan_name'])),
+ '$autoperms' => array('autoperms',t('Apply these permissions automatically'), ((get_pconfig(local_channel(),'system','autoperms')) ? 1 : 0), 'Connection requests will be approved without your interaction', array(t('No'),('Yes'))),
'$addr' => $contact['xchan_addr'],
+ '$addr_text' => t('This connection\'s address is'),
'$notself' => (($self) ? '' : '1'),
'$self' => (($self) ? '1' : ''),
- '$autolbl' => t('Apply the permissions indicated on this page to all new connections.'),
+ '$autolbl' => t('The permissions indicated on this page will be applied to all new connections.'),
'$buttons' => (($self) ? '' : $buttons),
- '$viewprof' => t('View Profile'),
- '$clickme' => t('Click to open/close'),
'$lbl_slider' => t('Slide to adjust your degree of friendship'),
- '$lbl_rating' => t('Rating (this information is public)'),
- '$lbl_rating_txt' => t('Optionally explain your rating (this information is public)'),
+ '$lbl_rating' => t('Rating'),
+ '$lbl_rating_label' => t('Slide to adjust your rating'),
+ '$lbl_rating_txt' => t('Optionally explain your rating'),
'$connfilter' => feature_enabled(local_channel(),'connfilter'),
+ '$connfilter_label' => t('Custom Filter'),
'$incl' => array('abook_incl',t('Only import posts with this text'), $contact['abook_incl'],t('words one per line or #tags or /patterns/, leave blank to import all posts')),
'$excl' => array('abook_excl',t('Do not import posts with this text'), $contact['abook_excl'],t('words one per line or #tags or /patterns/, leave blank to import all posts')),
- '$rating_text' => array('rating_text', t('Optionally explain your rating (this information is public)'),$rating_text,''),
+ '$rating_text' => array('rating_text', t('Optionally explain your rating'),$rating_text,''),
+ '$rating_info' => t('This information is public!'),
'$rating' => $rating,
'$rating_val' => $rating_val,
'$slide' => $slide,
- '$tabs' => $t,
- '$tab_str' => $tab_str,
- '$perms_step1' => t('Default permissions for your channel type have (just) been applied. They have not yet been submitted. Please review the permissions on this page and make any desired changes at this time. This new connection may
not be able to communicate with you until you submit this page, which will install and apply the selected permissions.'),
+ '$affinity' => $affinity,
+ '$pending_label' => t('Connection Pending Approval'),
+ '$pending_modal_title' => t('Connection Request'),
+ '$pending_modal_body' => sprintf(t('(%s) would like to connect with you. Please approve this connection to allow communication.'), $contact['xchan_addr']),
+ '$pending_modal_approve' => t('Approve'),
+ '$pending_modal_dismiss' => t('Approve Later'),
'$is_pending' => (intval($contact['abook_pending']) ? 1 : ''),
'$unapproved' => $unapproved,
'$inherited' => t('inherited'),
- '$approve' => t('Approve this connection'),
- '$noperms' => (($contact['abook_my_perms']) ? false : true),
- '$no_perms' => (((! $self) && (! $contact['abook_my_perms'])) ? t('Connection has no individual permissions!') : ''),
- '$noperm_desc' => (((! $self) && (! $contact['abook_my_perms'])) ? t('This may be appropriate based on your
privacy settings , though you may wish to review the "Advanced Permissions".') : ''),
'$submit' => t('Submit'),
- '$lbl_vis1' => t('Profile Visibility'),
'$lbl_vis2' => sprintf( t('Please choose the profile you would like to display to %s when viewing your profile securely.'), $contact['xchan_name']),
- '$lbl_info1' => t('Contact Information / Notes'),
- '$infedit' => t('Edit contact notes'),
'$close' => $contact['abook_closeness'],
'$them' => t('Their Settings'),
'$me' => t('My Settings'),
'$perms' => $perms,
- '$perms_new' => t('Default permissions for this channel type have (just) been applied. They have
not been saved and there are currently no stored default permissions. Please review/edit the applied settings and click [Submit] to finalize.'),
- '$clear' => t('Clear/Disable Automatic Permissions'),
- '$forum' => t('Forum Members'),
- '$soapbox' => t('Soapbox'),
- '$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
privacy settings , which have higher priority than individual settings. Changing those inherited settings on this page will have no effect.'),
- '$advanced' => t('Advanced Permissions'),
- '$quick' => t('Simple Permissions (select one and submit)'),
- '$common_link' => $a->get_baseurl(true) . '/common/loc/' . local_channel() . '/' . $contact['id'],
- '$all_friends' => $all_friends,
- '$relation_text' => $relation_text,
- '$visit' => sprintf( t('Visit %s\'s profile - %s'),$contact['xchan_name'],$contact['xchan_url']),
- '$blockunblock' => t('Block/Unblock contact'),
- '$ignorecont' => t('Ignore contact'),
- '$lblcrepair' => t("Repair URL settings"),
- '$lblrecent' => t('View conversations'),
- '$lblsuggest' => $lblsuggest,
- '$delete' => t('Delete contact'),
-
- '$poll_interval' => contact_poll_interval($contact['priority'],(! $poll_enabled)),
- '$poll_enabled' => $poll_enabled,
+ '$permnote' => t('Some permissions may be inherited from your channel\'s
privacy settings , which have higher priority than individual settings. You can
not change those settings here.'),
+ '$permnote_self' => t('Some permissions may be inherited from your channel\'s
privacy settings , which have higher priority than individual settings. You can change those settings here but they wont have any impact unless the inherited setting changes.'),
'$lastupdtext' => t('Last update:'),
- '$lost_contact' => $lost_contact,
- '$updpub' => t('Update public posts'),
'$last_update' => relative_date($contact['abook_connected']),
- '$udnow' => t('Update now'),
'$profile_select' => contact_profile_assign($contact['abook_profile']),
- '$multiprofs' => feature_enabled(local_channel(),'multi_profiles'),
+ '$multiprofs' => $multiprofs,
'$contact_id' => $contact['abook_id'],
- '$block_text' => (($contact['blocked']) ? t('Unblock') : t('Block') ),
- '$ignore_text' => (($contact['readonly']) ? t('Unignore') : t('Ignore') ),
- '$blocked' => (($contact['blocked']) ? t('Currently blocked') : ''),
- '$ignored' => (($contact['readonly']) ? t('Currently ignored') : ''),
- '$archived' => (($contact['archive']) ? t('Currently archived') : ''),
- '$pending' => (($contact['archive']) ? t('Currently pending') : ''),
- '$name' => $contact['name'],
- '$alt_text' => $alt_text,
- '$url' => $url
+ '$name' => $contact['xchan_name'],
));
diff --git a/mod/directory.php b/mod/directory.php
index f01efc053..3c230e173 100644
--- a/mod/directory.php
+++ b/mod/directory.php
@@ -19,6 +19,7 @@ function directory_init(&$a) {
$observer = get_observer_hash();
$global_changed = false;
$safe_changed = false;
+ $pubforums_changed = false;
if(array_key_exists('global',$_REQUEST)) {
$globaldir = intval($_REQUEST['global']);
@@ -28,7 +29,7 @@ function directory_init(&$a) {
$_SESSION['globaldir'] = $globaldir;
if($observer)
set_xconfig($observer,'directory','globaldir',$globaldir);
- }
+ }
if(array_key_exists('safe',$_REQUEST)) {
$safemode = intval($_REQUEST['safe']);
@@ -37,9 +38,19 @@ function directory_init(&$a) {
if($safe_changed) {
$_SESSION['safemode'] = $safemode;
if($observer)
- set_xconfig($observer,'directory','safe_mode',$safemode);
- }
+ set_xconfig($observer,'directory','safemode',$safemode);
+ }
+
+ if(array_key_exists('pubforums',$_REQUEST)) {
+ $pubforums = intval($_REQUEST['pubforums']);
+ $pubforums_changed = true;
+ }
+ if($pubforums_changed) {
+ $_SESSION['pubforums'] = $pubforums;
+ if($observer)
+ set_xconfig($observer,'directory','pubforums',$pubforums);
+ }
}
function directory_content(&$a) {
@@ -51,18 +62,14 @@ function directory_content(&$a) {
$observer = get_observer_hash();
- $globaldir = get_globaldir_setting($observer);
+ $globaldir = get_directory_setting($observer, 'globaldir');
// override your personal global search pref if we're doing a navbar search of the directory
if(intval($_REQUEST['navsearch']))
$globaldir = 1;
- $safe_mode = get_safemode_setting($observer);
+ $safe_mode = get_directory_setting($observer, 'safemode');
- $pubforums = null;
- if(array_key_exists('pubforums',$_REQUEST))
- $pubforums = intval($_REQUEST['pubforums']);
- if(! $pubforums)
- $pubforums = null;
+ $pubforums = get_directory_setting($observer, 'pubforums');
$o = '';
nav_set_selected('directory');
@@ -375,7 +382,13 @@ function directory_content(&$a) {
'$entries' => $entries,
'$dirlbl' => $suggest ? t('Channel Suggestions') : $dirtitle,
'$submit' => t('Find'),
- '$next' => alt_pager($a,$j['records'], t('next page'), t('previous page'))
+ '$next' => alt_pager($a,$j['records'], t('next page'), t('previous page')),
+ '$sort' => t('Sort options'),
+ '$normal' => t('Alphabetic'),
+ '$reverse' => t('Reverse Alphabetic'),
+ '$date' => t('Newest to Oldest'),
+ '$reversedate' => t('Oldest to Newest'),
+ '$suggest' => $suggest ? '&suggest=1' : ''
));
diff --git a/mod/display.php b/mod/display.php
index 2f61e688a..b2d9ba34b 100644
--- a/mod/display.php
+++ b/mod/display.php
@@ -52,6 +52,7 @@ function display_content(&$a, $update = 0, $load = false) {
'deny_gid' => $channel['channel_deny_gid']
);
+
$x = array(
'is_owner' => true,
'allow_location' => ((intval(get_pconfig($channel['channel_id'],'system','use_browser_location'))) ? '1' : ''),
@@ -63,10 +64,13 @@ function display_content(&$a, $update = 0, $load = false) {
'bang' => '',
'visitor' => true,
'profile_uid' => local_channel(),
- 'return_path' => 'channel/' . $channel['channel_address']
+ 'return_path' => 'channel/' . $channel['channel_address'],
+ 'expanded' => true
);
+ $o = '';
}
diff --git a/mod/editblock.php b/mod/editblock.php
index 9f9770e77..b4d954ef5 100644
--- a/mod/editblock.php
+++ b/mod/editblock.php
@@ -108,12 +108,6 @@ function editblock_content(&$a) {
else
$mimeselect = mimetype_select($itm[0]['uid'],$mimetype);
- $o .= replace_macros(get_markup_template('edpost_head.tpl'), array(
- '$title' => t('Edit Block'),
- '$delete' => ((($itm[0]['author_xchan'] === $ob_hash) || ($itm[0]['owner_xchan'] === $ob_hash)) ? t('Delete') : false),
- '$id' => $itm[0]['id']
- ));
-
$a->page['htmlhead'] .= replace_macros(get_markup_template('jot-header.tpl'), array(
'$baseurl' => $a->get_baseurl(),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
@@ -133,17 +127,17 @@ function editblock_content(&$a) {
$rp = 'blocks/' . $channel['channel_address'];
- $o .= replace_macros($tpl,array(
+ $editor = replace_macros($tpl,array(
'$return_path' => $rp,
'$action' => 'item',
- '$webpage' => ITEM_TYPE_BUILDBLOCK,
+ '$webpage' => ITEM_TYPE_BLOCK,
'$share' => t('Edit'),
'$bold' => t('Bold'),
'$italic' => t('Italic'),
'$underline' => t('Underline'),
'$quote' => t('Quote'),
'$code' => t('Code'),
- '$writefiles' => (perm_is_allowed($owner, get_observer_hash(), 'post_photos') || perm_is_allowed($owner, get_observer_hash(), 'write_storage')),
+ '$writefiles' => perm_is_allowed($owner, get_observer_hash(), 'write_storage'),
'$upload' => t('Upload photo'),
'$attach' => t('Attach file'),
'$weblink' => t('Insert web link'),
@@ -181,6 +175,13 @@ function editblock_content(&$a) {
'$expires' => t('Set expiration date'),
));
+ $o .= replace_macros(get_markup_template('edpost_head.tpl'), array(
+ '$title' => t('Edit Block'),
+ '$delete' => ((($itm[0]['author_xchan'] === $ob_hash) || ($itm[0]['owner_xchan'] === $ob_hash)) ? t('Delete') : false),
+ '$id' => $itm[0]['id'],
+ '$editor' => $editor
+ ));
+
return $o;
}
diff --git a/mod/editlayout.php b/mod/editlayout.php
index d61a14a48..6ea7f4100 100644
--- a/mod/editlayout.php
+++ b/mod/editlayout.php
@@ -101,12 +101,6 @@ function editlayout_content(&$a) {
$layout_title = $item_id[0]['sid'];
$plaintext = true;
-
- $o .= replace_macros(get_markup_template('edpost_head.tpl'), array(
- '$title' => t('Edit Layout'),
- '$delete' => ((($itm[0]['author_xchan'] === $ob_hash) || ($itm[0]['owner_xchan'] === $ob_hash)) ? t('Delete') : false),
- '$id' => $itm[0]['id']
- ));
$a->page['htmlhead'] .= replace_macros(get_markup_template('jot-header.tpl'), array(
'$baseurl' => $a->get_baseurl(),
@@ -132,7 +126,7 @@ function editlayout_content(&$a) {
$rp = 'layouts/' . $which;
- $o .= replace_macros($tpl,array(
+ $editor = replace_macros($tpl,array(
'$return_path' => $rp,
'$action' => 'item',
'$webpage' => ITEM_TYPE_PDL,
@@ -178,6 +172,14 @@ function editlayout_content(&$a) {
'$expires' => t('Set expiration date'),
));
+
+ $o .= replace_macros(get_markup_template('edpost_head.tpl'), array(
+ '$title' => t('Edit Layout'),
+ '$delete' => ((($itm[0]['author_xchan'] === $ob_hash) || ($itm[0]['owner_xchan'] === $ob_hash)) ? t('Delete') : false),
+ '$id' => $itm[0]['id'],
+ '$editor' => $editor
+ ));
+
return $o;
}
diff --git a/mod/editpost.php b/mod/editpost.php
index 8e4b37103..235ae9def 100644
--- a/mod/editpost.php
+++ b/mod/editpost.php
@@ -38,11 +38,6 @@ function editpost_content(&$a) {
$channel = $a->get_channel();
- $o .= replace_macros(get_markup_template('edpost_head.tpl'), array(
- '$title' => t('Edit post')
- ));
-
-
$a->page['htmlhead'] .= replace_macros(get_markup_template('jot-header.tpl'), array(
'$baseurl' => $a->get_baseurl(),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
@@ -53,8 +48,6 @@ function editpost_content(&$a) {
'$confirmdelete' => t('Delete item?'),
));
-
-
if(intval($itm[0]['item_obscured'])) {
$key = get_config('system','prvkey');
if($itm[0]['title'])
@@ -107,7 +100,7 @@ function editpost_content(&$a) {
$cipher = 'aes256';
- $o .= replace_macros($tpl,array(
+ $editor = replace_macros($tpl,array(
'$return_path' => $_SESSION['return_url'],
'$action' => 'item',
'$share' => t('Edit'),
@@ -161,6 +154,11 @@ function editpost_content(&$a) {
'$expiryModalCANCEL' => t('Cancel'),
));
+ $o .= replace_macros(get_markup_template('edpost_head.tpl'), array(
+ '$title' => t('Edit post'),
+ '$editor' => $editor
+ ));
+
return $o;
}
diff --git a/mod/editwebpage.php b/mod/editwebpage.php
index 3b0b543a6..974e8cc38 100644
--- a/mod/editwebpage.php
+++ b/mod/editwebpage.php
@@ -165,15 +165,12 @@ function editwebpage_content(&$a) {
$rp = 'webpages/' . $which;
- logger('canwrite: ' . (perm_is_allowed($owner, get_observer_hash(), 'post_photos') || perm_is_allowed($owner, get_observer_hash(), 'write_storage')));
-
$editor = replace_macros($tpl,array(
'$return_path' => $rp,
'$webpage' => ITEM_TYPE_WEBPAGE,
'$placeholdpagetitle' => t('Page link title'),
'$pagetitle' => $page_title,
- '$writefiles' => (perm_is_allowed($owner, get_observer_hash(), 'post_photos') || perm_is_allowed($owner, get_observer_hash(), 'write_storage')),
-
+ '$writefiles' => perm_is_allowed($owner, get_observer_hash(), 'write_storage'),
'$action' => 'item',
'$share' => t('Edit'),
'$bold' => t('Bold'),
diff --git a/mod/events.php b/mod/events.php
index a89bbb760..0af81278f 100755
--- a/mod/events.php
+++ b/mod/events.php
@@ -13,6 +13,20 @@ function events_post(&$a) {
if(! local_channel())
return;
+ if(($_FILES) && array_key_exists('userfile',$_FILES) && intval($_FILES['userfile']['size'])) {
+ $src = $_FILES['userfile']['tmp_name'];
+ if($src) {
+ $result = parse_ical_file($src,local_channel());
+ if($result)
+ info( t('Calendar entries imported.') . EOL);
+ else
+ notice( t('No calendar entries found.') . EOL);
+ @unlink($src);
+ }
+ goaway(z_root() . '/events');
+ }
+
+
$event_id = ((x($_POST,'event_id')) ? intval($_POST['event_id']) : 0);
$event_hash = ((x($_POST,'event_hash')) ? $_POST['event_hash'] : '');
@@ -148,10 +162,9 @@ function events_post(&$a) {
}
}
else {
- // Note: do not set `private` field for self-only events. It will
- // keep even you from seeing them!
$str_contact_allow = '<' . $channel['channel_hash'] . '>';
$str_group_allow = $str_contact_deny = $str_group_deny = '';
+ $private_event = true;
}
}
@@ -451,6 +464,7 @@ function events_content(&$a) {
if($export) {
header('Content-type: text/calendar');
+ header('content-disposition: attachment; filename="' . t('calendar') . '-' . $channel['channel_address'] . '.ics"' );
echo ical_wrapper($r);
killme();
}
@@ -477,8 +491,8 @@ function events_content(&$a) {
'$export' => array($a->get_baseurl()."/events/$y/$m/export",t('Export'),'',''),
'$calendar' => cal($y,$m,$links, ' eventcal'),
'$events' => $events,
-
-
+ '$upload' => t('Upload'),
+ '$submit' => t('Submit')
));
if (x($_GET,'id')){ echo $o; killme(); }
diff --git a/mod/import.php b/mod/import.php
index f8ab8a0a2..92de33059 100644
--- a/mod/import.php
+++ b/mod/import.php
@@ -36,6 +36,9 @@ function import_post(&$a) {
$filesize = intval($_FILES['filename']['size']);
$filetype = $_FILES['filename']['type'];
+ $completed = ((array_key_exists('import_step',$_SESSION)) ? intval($_SESSION['import_step']) : 0);
+ if($completed)
+ logger('saved import step: ' . $_SESSION['import_step']);
if($src) {
@@ -114,360 +117,430 @@ function import_post(&$a) {
// import channel
- $channel = $data['channel'];
+ if(array_key_exists('channel',$data)) {
+ $channel = $data['channel'];
- if(! array_key_exists('channel_system',$channel)) {
- $channel['channel_system'] = (($channel['channel_pageflags'] & 0x1000) ? 1 : 0);
- $channel['channel_removed'] = (($channel['channel_pageflags'] & 0x8000) ? 1 : 0);
- }
+ if($completed < 1) {
- $r = q("select * from channel where (channel_guid = '%s' or channel_hash = '%s' or channel_address = '%s' ) limit 1",
- dbesc($channel['channel_guid']),
- dbesc($channel['channel_hash']),
- dbesc($channel['channel_address'])
- );
+ if(! array_key_exists('channel_system',$channel)) {
+ $channel['channel_system'] = (($channel['channel_pageflags'] & 0x1000) ? 1 : 0);
+ $channel['channel_removed'] = (($channel['channel_pageflags'] & 0x8000) ? 1 : 0);
+ }
- // We should probably also verify the hash
+ $r = q("select * from channel where (channel_guid = '%s' or channel_hash = '%s' or channel_address = '%s' ) limit 1",
+ dbesc($channel['channel_guid']),
+ dbesc($channel['channel_hash']),
+ dbesc($channel['channel_address'])
+ );
- if($r) {
- if($r[0]['channel_guid'] === $channel['channel_guid'] || $r[0]['channel_hash'] === $channel['channel_hash']) {
- logger('mod_import: duplicate channel. ', print_r($channel,true));
- notice( t('Cannot create a duplicate channel identifier on this system. Import failed.') . EOL);
- return;
- }
- else {
- // try at most ten times to generate a unique address.
- $x = 0;
- $found_unique = false;
- do {
- $tmp = $channel['channel_address'] . mt_rand(1000,9999);
- $r = q("select * from channel where channel_address = '%s' limit 1",
- dbesc($tmp)
- );
- if(! $r) {
- $channel['channel_address'] = $tmp;
- $found_unique = true;
- break;
+ // We should probably also verify the hash
+
+ if($r) {
+ if($r[0]['channel_guid'] === $channel['channel_guid'] || $r[0]['channel_hash'] === $channel['channel_hash']) {
+ logger('mod_import: duplicate channel. ', print_r($channel,true));
+ notice( t('Cannot create a duplicate channel identifier on this system. Import failed.') . EOL);
+ return;
}
- $x ++;
- } while ($x < 10);
- if(! $found_unique) {
- logger('mod_import: duplicate channel. randomisation failed.', print_r($channel,true));
- notice( t('Unable to create a unique channel address. Import failed.') . EOL);
+ else {
+ // try at most ten times to generate a unique address.
+ $x = 0;
+ $found_unique = false;
+ do {
+ $tmp = $channel['channel_address'] . mt_rand(1000,9999);
+ $r = q("select * from channel where channel_address = '%s' limit 1",
+ dbesc($tmp)
+ );
+ if(! $r) {
+ $channel['channel_address'] = $tmp;
+ $found_unique = true;
+ break;
+ }
+ $x ++;
+ } while ($x < 10);
+ if(! $found_unique) {
+ logger('mod_import: duplicate channel. randomisation failed.', print_r($channel,true));
+ notice( t('Unable to create a unique channel address. Import failed.') . EOL);
+ return;
+ }
+ }
+ }
+
+ unset($channel['channel_id']);
+ $channel['channel_account_id'] = get_account_id();
+ $channel['channel_primary'] = (($seize) ? 1 : 0);
+
+ dbesc_array($channel);
+
+ $r = dbq("INSERT INTO channel (`"
+ . implode("`, `", array_keys($channel))
+ . "`) VALUES ('"
+ . implode("', '", array_values($channel))
+ . "')" );
+
+ if(! $r) {
+ logger('mod_import: channel clone failed. ', print_r($channel,true));
+ notice( t('Channel clone failed. Import failed.') . EOL);
return;
}
- }
- }
- unset($channel['channel_id']);
- $channel['channel_account_id'] = get_account_id();
- $channel['channel_primary'] = (($seize) ? 1 : 0);
-
- dbesc_array($channel);
-
- $r = dbq("INSERT INTO channel (`"
- . implode("`, `", array_keys($channel))
- . "`) VALUES ('"
- . implode("', '", array_values($channel))
- . "')" );
-
- if(! $r) {
- logger('mod_import: channel clone failed. ', print_r($channel,true));
- notice( t('Channel clone failed. Import failed.') . EOL);
- return;
- }
-
- $r = q("select * from channel where channel_account_id = %d and channel_guid = '%s' limit 1",
- intval(get_account_id()),
- $channel['channel_guid'] // Already dbesc'd
- );
- if(! $r) {
- logger('mod_import: channel not found. ', print_r($channel,true));
- notice( t('Cloned channel not found. Import failed.') . EOL);
- return;
- }
- // reset
- $channel = $r[0];
-
- set_default_login_identity(get_account_id(),$channel['channel_id'],false);
-
-
- $configs = $data['config'];
- if($configs) {
- foreach($configs as $config) {
- unset($config['id']);
- $config['uid'] = $channel['channel_id'];
- dbesc_array($config);
- $r = dbq("INSERT INTO pconfig (`"
- . implode("`, `", array_keys($config))
- . "`) VALUES ('"
- . implode("', '", array_values($config))
- . "')" );
- }
- }
-
-
- if($data['photo']) {
- require_once('include/photo/photo_driver.php');
- import_channel_photo(base64url_decode($data['photo']['data']),$data['photo']['type'],get_account_id(),$channel['channel_id']);
- }
-
- $profiles = $data['profile'];
- if($profiles) {
- foreach($profiles as $profile) {
- unset($profile['id']);
- $profile['aid'] = get_account_id();
- $profile['uid'] = $channel['channel_id'];
-
- // we are going to reset all profile photos to the original
- // somebody will have to fix this later and put all the applicable photos into the export
-
- $profile['photo'] = z_root() . '/photo/profile/l/' . $channel['channel_id'];
- $profile['thumb'] = z_root() . '/photo/profile/m/' . $channel['channel_id'];
-
-
- dbesc_array($profile);
- $r = dbq("INSERT INTO profile (`"
- . implode("`, `", array_keys($profile))
- . "`) VALUES ('"
- . implode("', '", array_values($profile))
- . "')" );
- }
- }
-
-
- $hublocs = $data['hubloc'];
- if($hublocs) {
- foreach($hublocs as $hubloc) {
-
- if(! array_key_exists('hubloc_primary',$hublocs)) {
- $hubloc['hubloc_primary'] = (($hubloc['hubloc_flags'] & 0x0001) ? 1 : 0);
- $hubloc['hubloc_orphancheck'] = (($hubloc['hubloc_flags'] & 0x0004) ? 1 : 0);
- $hubloc['hubloc_error'] = (($hubloc['hubloc_status'] & 0x0003) ? 1 : 0);
- $hubloc['hubloc_deleted'] = (($hubloc['hubloc_flags'] & 0x1000) ? 1 : 0);
- }
-
- $arr = array(
- 'guid' => $hubloc['hubloc_guid'],
- 'guid_sig' => $hubloc['guid_sig'],
- 'url' => $hubloc['hubloc_url'],
- 'url_sig' => $hubloc['hubloc_url_sig']
+ $r = q("select * from channel where channel_account_id = %d and channel_guid = '%s' limit 1",
+ intval(get_account_id()),
+ $channel['channel_guid'] // Already dbesc'd
);
- if(($hubloc['hubloc_hash'] === $channel['channel_hash']) && intval($hubloc['hubloc_primary']) && ($seize))
- $hubloc['hubloc_primary'] = 0;
-
- if(! zot_gethub($arr)) {
- unset($hubloc['hubloc_id']);
- dbesc_array($hubloc);
-
- $r = dbq("INSERT INTO hubloc (`"
- . implode("`, `", array_keys($hubloc))
- . "`) VALUES ('"
- . implode("', '", array_values($hubloc))
- . "')" );
-
+ if(! $r) {
+ logger('mod_import: channel not found. ', print_r($channel,true));
+ notice( t('Cloned channel not found. Import failed.') . EOL);
+ return;
}
+ // reset
+ $channel = $r[0];
+ set_default_login_identity(get_account_id(),$channel['channel_id'],false);
+ logger('import step 1');
+ $_SESSION['import_step'] = 1;
+ ref_session_write(session_id(), serialize($_SESSION));
+ }
+ }
+ else {
+ $r = q("select * from channel where channel_account_id = %d and channel_guid = '%s' limit 1",
+ intval(get_account_id()),
+ dbesc($channel['channel_guid'])
+ );
+ if($r)
+ $channel = $r[0];
+ else {
+ logger('mod_import: channel not found. ', print_r($channel,true));
+ notice( t('Cloned channel not found. Import failed.') . EOL);
+ return;
}
}
- // create new hubloc for the new channel at this site
+ if($completed < 2) {
- $r = q("insert into hubloc ( hubloc_guid, hubloc_guid_sig, hubloc_hash, hubloc_addr, hubloc_network, hubloc_primary,
- hubloc_url, hubloc_url_sig, hubloc_host, hubloc_callback, hubloc_sitekey )
- values ( '%s', '%s', '%s', '%s', '%s', %d, '%s', '%s', '%s', '%s', '%s' )",
- dbesc($channel['channel_guid']),
- dbesc($channel['channel_guid_sig']),
- dbesc($channel['channel_hash']),
- dbesc($channel['channel_address'] . '@' . get_app()->get_hostname()),
- dbesc('zot'),
- intval(($seize) ? 1 : 0),
- dbesc(z_root()),
- dbesc(base64url_encode(rsa_sign(z_root(),$channel['channel_prvkey']))),
- dbesc(get_app()->get_hostname()),
- dbesc(z_root() . '/post'),
- dbesc(get_config('system','pubkey'))
- );
+ $configs = $data['config'];
+ if($configs) {
+ foreach($configs as $config) {
+ unset($config['id']);
+ $config['uid'] = $channel['channel_id'];
+ dbesc_array($config);
+ $r = dbq("INSERT INTO pconfig (`"
+ . implode("`, `", array_keys($config))
+ . "`) VALUES ('"
+ . implode("', '", array_values($config))
+ . "')" );
+ }
+ }
+ logger('import step 2');
+ $_SESSION['import_step'] = 2;
+ ref_session_write(session_id(), serialize($_SESSION));
+ }
- // reset the original primary hubloc if it is being seized
- if($seize)
- $r = q("update hubloc set hubloc_primary = 0 where hubloc_primary = 1 and hubloc_hash = '%s' and hubloc_url != '%s' ",
- dbesc($channel['channel_hash']),
- dbesc(z_root())
- );
-
- // import xchans and contact photos
- if($seize) {
+ if($completed < 3) {
- // replace any existing xchan we may have on this site if we're seizing control
+ if($data['photo']) {
+ require_once('include/photo/photo_driver.php');
+ import_channel_photo(base64url_decode($data['photo']['data']),$data['photo']['type'],get_account_id(),$channel['channel_id']);
+ }
- $r = q("delete from xchan where xchan_hash = '%s'",
- dbesc($channel['channel_hash'])
- );
+ $profiles = $data['profile'];
+ if($profiles) {
+ foreach($profiles as $profile) {
+ unset($profile['id']);
+ $profile['aid'] = get_account_id();
+ $profile['uid'] = $channel['channel_id'];
- $r = q("insert into xchan ( xchan_hash, xchan_guid, xchan_guid_sig, xchan_pubkey, xchan_photo_l, xchan_photo_m, xchan_photo_s, xchan_addr, xchan_url, xchan_follow, xchan_connurl, xchan_name, xchan_network, xchan_photo_date, xchan_name_date, xchan_hidden, xchan_orphan, xchan_censored, xchan_selfcensored, xchan_system, xchan_pubforum, xchan_deleted ) values ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, %d, %d, %d, %d, %d )",
- dbesc($channel['channel_hash']),
+ // we are going to reset all profile photos to the original
+ // somebody will have to fix this later and put all the applicable photos into the export
+
+ $profile['photo'] = z_root() . '/photo/profile/l/' . $channel['channel_id'];
+ $profile['thumb'] = z_root() . '/photo/profile/m/' . $channel['channel_id'];
+
+
+ dbesc_array($profile);
+ $r = dbq("INSERT INTO profile (`"
+ . implode("`, `", array_keys($profile))
+ . "`) VALUES ('"
+ . implode("', '", array_values($profile))
+ . "')" );
+ }
+ }
+ logger('import step 3');
+ $_SESSION['import_step'] = 3;
+ ref_session_write(session_id(), serialize($_SESSION));
+ }
+
+
+ if($completed < 4) {
+ $hublocs = $data['hubloc'];
+ if($hublocs) {
+ foreach($hublocs as $hubloc) {
+
+ if(! array_key_exists('hubloc_primary',$hublocs)) {
+ $hubloc['hubloc_primary'] = (($hubloc['hubloc_flags'] & 0x0001) ? 1 : 0);
+ $hubloc['hubloc_orphancheck'] = (($hubloc['hubloc_flags'] & 0x0004) ? 1 : 0);
+ $hubloc['hubloc_error'] = (($hubloc['hubloc_status'] & 0x0003) ? 1 : 0);
+ $hubloc['hubloc_deleted'] = (($hubloc['hubloc_flags'] & 0x1000) ? 1 : 0);
+ }
+
+ $arr = array(
+ 'guid' => $hubloc['hubloc_guid'],
+ 'guid_sig' => $hubloc['guid_sig'],
+ 'url' => $hubloc['hubloc_url'],
+ 'url_sig' => $hubloc['hubloc_url_sig']
+ );
+ if(($hubloc['hubloc_hash'] === $channel['channel_hash']) && intval($hubloc['hubloc_primary']) && ($seize))
+ $hubloc['hubloc_primary'] = 0;
+
+ if(! zot_gethub($arr)) {
+ unset($hubloc['hubloc_id']);
+ dbesc_array($hubloc);
+
+ $r = dbq("INSERT INTO hubloc (`"
+ . implode("`, `", array_keys($hubloc))
+ . "`) VALUES ('"
+ . implode("', '", array_values($hubloc))
+ . "')" );
+ }
+ }
+ }
+ logger('import step 4');
+ $_SESSION['import_step'] = 4;
+ ref_session_write(session_id(), serialize($_SESSION));
+ }
+
+ if($completed < 5) {
+ // create new hubloc for the new channel at this site
+
+ $r = q("insert into hubloc ( hubloc_guid, hubloc_guid_sig, hubloc_hash, hubloc_addr, hubloc_network, hubloc_primary,
+ hubloc_url, hubloc_url_sig, hubloc_host, hubloc_callback, hubloc_sitekey )
+ values ( '%s', '%s', '%s', '%s', '%s', %d, '%s', '%s', '%s', '%s', '%s' )",
dbesc($channel['channel_guid']),
dbesc($channel['channel_guid_sig']),
- dbesc($channel['channel_pubkey']),
- dbesc($a->get_baseurl() . "/photo/profile/l/" . $channel['channel_id']),
- dbesc($a->get_baseurl() . "/photo/profile/m/" . $channel['channel_id']),
- dbesc($a->get_baseurl() . "/photo/profile/s/" . $channel['channel_id']),
+ dbesc($channel['channel_hash']),
dbesc($channel['channel_address'] . '@' . get_app()->get_hostname()),
- dbesc(z_root() . '/channel/' . $channel['channel_address']),
- dbesc(z_root() . '/follow?f=&url=%s'),
- dbesc(z_root() . '/poco/' . $channel['channel_address']),
- dbesc($channel['channel_name']),
dbesc('zot'),
- dbesc(datetime_convert()),
- dbesc(datetime_convert()),
- 0,0,0,0,0,0,0
+ intval(($seize) ? 1 : 0),
+ dbesc(z_root()),
+ dbesc(base64url_encode(rsa_sign(z_root(),$channel['channel_prvkey']))),
+ dbesc(get_app()->get_hostname()),
+ dbesc(z_root() . '/post'),
+ dbesc(get_config('system','pubkey'))
);
+
+ // reset the original primary hubloc if it is being seized
+
+ if($seize) {
+ $r = q("update hubloc set hubloc_primary = 0 where hubloc_primary = 1 and hubloc_hash = '%s' and hubloc_url != '%s' ",
+ dbesc($channel['channel_hash']),
+ dbesc(z_root())
+ );
+ }
+ logger('import step 5');
+ $_SESSION['import_step'] = 5;
+ ref_session_write(session_id(), serialize($_SESSION));
+ }
+
+
+ if($completed < 6) {
+
+ // import xchans and contact photos
+
+ if($seize) {
+
+ // replace any existing xchan we may have on this site if we're seizing control
+
+ $r = q("delete from xchan where xchan_hash = '%s'",
+ dbesc($channel['channel_hash'])
+ );
+
+ $r = q("insert into xchan ( xchan_hash, xchan_guid, xchan_guid_sig, xchan_pubkey, xchan_photo_l, xchan_photo_m, xchan_photo_s, xchan_addr, xchan_url, xchan_follow, xchan_connurl, xchan_name, xchan_network, xchan_photo_date, xchan_name_date, xchan_hidden, xchan_orphan, xchan_censored, xchan_selfcensored, xchan_system, xchan_pubforum, xchan_deleted ) values ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, %d, %d, %d, %d, %d )",
+ dbesc($channel['channel_hash']),
+ dbesc($channel['channel_guid']),
+ dbesc($channel['channel_guid_sig']),
+ dbesc($channel['channel_pubkey']),
+ dbesc($a->get_baseurl() . "/photo/profile/l/" . $channel['channel_id']),
+ dbesc($a->get_baseurl() . "/photo/profile/m/" . $channel['channel_id']),
+ dbesc($a->get_baseurl() . "/photo/profile/s/" . $channel['channel_id']),
+ dbesc($channel['channel_address'] . '@' . get_app()->get_hostname()),
+ dbesc(z_root() . '/channel/' . $channel['channel_address']),
+ dbesc(z_root() . '/follow?f=&url=%s'),
+ dbesc(z_root() . '/poco/' . $channel['channel_address']),
+ dbesc($channel['channel_name']),
+ dbesc('zot'),
+ dbesc(datetime_convert()),
+ dbesc(datetime_convert()),
+ 0,0,0,0,0,0,0
+ );
+ }
+ logger('import step 6');
+ $_SESSION['import_step'] = 6;
+ ref_session_write(session_id(), serialize($_SESSION));
}
- $xchans = $data['xchan'];
- if($xchans) {
- foreach($xchans as $xchan) {
- if(! array_key_exists('xchan_hidden',$xchan)) {
- $xchan['xchan_hidden'] = (($xchan['xchan_flags'] & 0x0001) ? 1 : 0);
- $xchan['xchan_orphan'] = (($xchan['xchan_flags'] & 0x0002) ? 1 : 0);
- $xchan['xchan_censored'] = (($xchan['xchan_flags'] & 0x0004) ? 1 : 0);
- $xchan['xchan_selfcensored'] = (($xchan['xchan_flags'] & 0x0008) ? 1 : 0);
- $xchan['xchan_system'] = (($xchan['xchan_flags'] & 0x0010) ? 1 : 0);
- $xchan['xchan_pubforum'] = (($xchan['xchan_flags'] & 0x0020) ? 1 : 0);
- $xchan['xchan_deleted'] = (($xchan['xchan_flags'] & 0x1000) ? 1 : 0);
- }
+ if($completed < 7) {
- $r = q("select xchan_hash from xchan where xchan_hash = '%s' limit 1",
- dbesc($xchan['xchan_hash'])
- );
- if($r)
- continue;
+ $xchans = $data['xchan'];
+ if($xchans) {
+ foreach($xchans as $xchan) {
+ if(! array_key_exists('xchan_hidden',$xchan)) {
+ $xchan['xchan_hidden'] = (($xchan['xchan_flags'] & 0x0001) ? 1 : 0);
+ $xchan['xchan_orphan'] = (($xchan['xchan_flags'] & 0x0002) ? 1 : 0);
+ $xchan['xchan_censored'] = (($xchan['xchan_flags'] & 0x0004) ? 1 : 0);
+ $xchan['xchan_selfcensored'] = (($xchan['xchan_flags'] & 0x0008) ? 1 : 0);
+ $xchan['xchan_system'] = (($xchan['xchan_flags'] & 0x0010) ? 1 : 0);
+ $xchan['xchan_pubforum'] = (($xchan['xchan_flags'] & 0x0020) ? 1 : 0);
+ $xchan['xchan_deleted'] = (($xchan['xchan_flags'] & 0x1000) ? 1 : 0);
+ }
- dbesc_array($xchan);
+ $r = q("select xchan_hash from xchan where xchan_hash = '%s' limit 1",
+ dbesc($xchan['xchan_hash'])
+ );
+ if($r)
+ continue;
+
+ dbesc_array($xchan);
- $r = dbq("INSERT INTO xchan (`"
- . implode("`, `", array_keys($xchan))
- . "`) VALUES ('"
- . implode("', '", array_values($xchan))
- . "')" );
+ $r = dbq("INSERT INTO xchan (`"
+ . implode("`, `", array_keys($xchan))
+ . "`) VALUES ('"
+ . implode("', '", array_values($xchan))
+ . "')" );
- require_once('include/photo/photo_driver.php');
- $photos = import_profile_photo($xchan['xchan_photo_l'],$xchan['xchan_hash']);
- if($photos[4])
- $photodate = NULL_DATE;
- else
- $photodate = $xchan['xchan_photo_date'];
+ require_once('include/photo/photo_driver.php');
+ $photos = import_profile_photo($xchan['xchan_photo_l'],$xchan['xchan_hash']);
+ if($photos[4])
+ $photodate = NULL_DATE;
+ else
+ $photodate = $xchan['xchan_photo_date'];
- $r = q("update xchan set xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s', xchan_photo_mimetype = '%s', xchan_photo_date = '%s'
- where xchan_hash = '%s'",
- dbesc($photos[0]),
- dbesc($photos[1]),
- dbesc($photos[2]),
- dbesc($photos[3]),
- dbesc($photodate),
- dbesc($xchan['xchan_hash'])
- );
+ $r = q("update xchan set xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s', xchan_photo_mimetype = '%s', xchan_photo_date = '%s'
+ where xchan_hash = '%s'",
+ dbesc($photos[0]),
+ dbesc($photos[1]),
+ dbesc($photos[2]),
+ dbesc($photos[3]),
+ dbesc($photodate),
+ dbesc($xchan['xchan_hash'])
+ );
+ }
}
+ logger('import step 7');
+ $_SESSION['import_step'] = 7;
+ ref_session_write(session_id(), serialize($_SESSION));
}
+
+
// FIXME - ensure we have an xchan if somebody is trying to pull a fast one
-
- $friends = 0;
- $feeds = 0;
- // import contacts
- $abooks = $data['abook'];
- if($abooks) {
- foreach($abooks as $abook) {
- if($max_friends !== false && $friends > $max_friends)
- continue;
- if($max_feeds !== false && intval($abook['abook_feed']) && ($feeds > $max_feeds))
- continue;
+ if($completed < 8) {
+ $friends = 0;
+ $feeds = 0;
- unset($abook['abook_id']);
- $abook['abook_account'] = get_account_id();
- $abook['abook_channel'] = $channel['channel_id'];
- if(! array_key_exists('abook_blocked',$abook)) {
- $abook['abook_blocked'] = (($abook['abook_flags'] & 0x0001 ) ? 1 : 0);
- $abook['abook_ignored'] = (($abook['abook_flags'] & 0x0002 ) ? 1 : 0);
- $abook['abook_hidden'] = (($abook['abook_flags'] & 0x0004 ) ? 1 : 0);
- $abook['abook_archived'] = (($abook['abook_flags'] & 0x0008 ) ? 1 : 0);
- $abook['abook_pending'] = (($abook['abook_flags'] & 0x0010 ) ? 1 : 0);
- $abook['abook_unconnected'] = (($abook['abook_flags'] & 0x0020 ) ? 1 : 0);
- $abook['abook_self'] = (($abook['abook_flags'] & 0x0080 ) ? 1 : 0);
- $abook['abook_feed'] = (($abook['abook_flags'] & 0x0100 ) ? 1 : 0);
+ // import contacts
+ $abooks = $data['abook'];
+ if($abooks) {
+ foreach($abooks as $abook) {
+ if($max_friends !== false && $friends > $max_friends)
+ continue;
+ if($max_feeds !== false && intval($abook['abook_feed']) && ($feeds > $max_feeds))
+ continue;
+
+ unset($abook['abook_id']);
+ unset($abook['abook_rating']);
+ unset($abook['abook_rating_text']);
+ $abook['abook_account'] = get_account_id();
+ $abook['abook_channel'] = $channel['channel_id'];
+ if(! array_key_exists('abook_blocked',$abook)) {
+ $abook['abook_blocked'] = (($abook['abook_flags'] & 0x0001 ) ? 1 : 0);
+ $abook['abook_ignored'] = (($abook['abook_flags'] & 0x0002 ) ? 1 : 0);
+ $abook['abook_hidden'] = (($abook['abook_flags'] & 0x0004 ) ? 1 : 0);
+ $abook['abook_archived'] = (($abook['abook_flags'] & 0x0008 ) ? 1 : 0);
+ $abook['abook_pending'] = (($abook['abook_flags'] & 0x0010 ) ? 1 : 0);
+ $abook['abook_unconnected'] = (($abook['abook_flags'] & 0x0020 ) ? 1 : 0);
+ $abook['abook_self'] = (($abook['abook_flags'] & 0x0080 ) ? 1 : 0);
+ $abook['abook_feed'] = (($abook['abook_flags'] & 0x0100 ) ? 1 : 0);
+ }
+
+ if($abook['abook_self']) {
+ $role = get_pconfig($channel['channel_id'],'system','permissions_role');
+ if(($role === 'forum') || ($abook['abook_my_perms'] & PERMS_W_TAGWALL)) {
+ q("update xchan set xchan_pubforum = 1 where xchan_hash = '%s' ",
+ dbesc($abook['abook_xchan'])
+ );
+ }
+ }
+
+ dbesc_array($abook);
+ $r = dbq("INSERT INTO abook (`"
+ . implode("`, `", array_keys($abook))
+ . "`) VALUES ('"
+ . implode("', '", array_values($abook))
+ . "')" );
+
+ $friends ++;
+ if(intval($abook['abook_feed']))
+ $feeds ++;
}
+ }
+ logger('import step 8');
+ $_SESSION['import_step'] = 8;
+ ref_session_write(session_id(), serialize($_SESSION));
+ }
- if($abook['abook_self']) {
- $role = get_pconfig($channel['channel_id'],'system','permissions_role');
- if(($role === 'forum') || ($abook['abook_my_perms'] & PERMS_W_TAGWALL)) {
- q("update xchan set xchan_pubforum = 1 where xchan_hash = '%s' ",
- dbesc($abook['abook_xchan'])
- );
+
+
+ if($completed < 9) {
+ $groups = $data['group'];
+ if($groups) {
+ $saved = array();
+ foreach($groups as $group) {
+ $saved[$group['hash']] = array('old' => $group['id']);
+ unset($group['id']);
+ $group['uid'] = $channel['channel_id'];
+ dbesc_array($group);
+ $r = dbq("INSERT INTO groups (`"
+ . implode("`, `", array_keys($group))
+ . "`) VALUES ('"
+ . implode("', '", array_values($group))
+ . "')" );
+ }
+ $r = q("select * from `groups` where uid = %d",
+ intval($channel['channel_id'])
+ );
+ if($r) {
+ foreach($r as $rr) {
+ $saved[$rr['hash']]['new'] = $rr['id'];
}
}
-
- dbesc_array($abook);
- $r = dbq("INSERT INTO abook (`"
- . implode("`, `", array_keys($abook))
- . "`) VALUES ('"
- . implode("', '", array_values($abook))
- . "')" );
-
- $friends ++;
- if(intval($abook['abook_feed']))
- $feeds ++;
}
- }
-
- $groups = $data['group'];
- if($groups) {
- $saved = array();
- foreach($groups as $group) {
- $saved[$group['hash']] = array('old' => $group['id']);
- unset($group['id']);
- $group['uid'] = $channel['channel_id'];
- dbesc_array($group);
- $r = dbq("INSERT INTO groups (`"
- . implode("`, `", array_keys($group))
- . "`) VALUES ('"
- . implode("', '", array_values($group))
- . "')" );
- }
- $r = q("select * from `groups` where uid = %d",
- intval($channel['channel_id'])
- );
- if($r) {
- foreach($r as $rr) {
- $saved[$rr['hash']]['new'] = $rr['id'];
+ $group_members = $data['group_member'];
+ if($group_members) {
+ foreach($group_members as $group_member) {
+ unset($group_member['id']);
+ $group_member['uid'] = $channel['channel_id'];
+ foreach($saved as $x) {
+ if($x['old'] == $group_member['gid'])
+ $group_member['gid'] = $x['new'];
+ }
+ dbesc_array($group_member);
+ $r = dbq("INSERT INTO group_member (`"
+ . implode("`, `", array_keys($group_member))
+ . "`) VALUES ('"
+ . implode("', '", array_values($group_member))
+ . "')" );
}
- }
- }
-
- $group_members = $data['group_member'];
- if($groups_members) {
- foreach($group_members as $group_member) {
- unset($group_member['id']);
- $group_member['uid'] = $channel['channel_id'];
- foreach($saved as $x) {
- if($x['old'] == $group_member['gid'])
- $group_member['gid'] = $x['new'];
- }
- dbesc_array($group_member);
- $r = dbq("INSERT INTO group_member (`"
- . implode("`, `", array_keys($group_member))
- . "`) VALUES ('"
- . implode("', '", array_values($group_member))
- . "')" );
}
+ logger('import step 9');
+ $_SESSION['import_step'] = 9;
+ ref_session_write(session_id(), serialize($_SESSION));
}
$saved_notification_flags = notifications_off($channel['channel_id']);
@@ -544,6 +617,7 @@ function import_post(&$a) {
change_channel($channel['channel_id']);
+ unset($_SESSION['import_step']);
goaway(z_root() . '/network' );
}
diff --git a/mod/like.php b/mod/like.php
index ffd302efa..9077adbda 100755
--- a/mod/like.php
+++ b/mod/like.php
@@ -242,8 +242,8 @@ function like_content(&$a) {
// get the item. Allow linked photos (which are normally hidden) to be liked
$r = q("SELECT * FROM item WHERE id = %d
- and item_blocked = 0 and item_moderated = 0 and item_spam = 0
- and item_deleted = 0 and item_unpublished = 0 and item_delayed_publish = 0 LIMIT 1",
+ and item_type = 0 and item_deleted = 0 and item_unpublished = 0
+ and item_delayed = 0 and item_pending_remove = 0 and item_blocked = 0 LIMIT 1",
intval($item_id)
);
diff --git a/mod/menu.php b/mod/menu.php
index f46dc9471..7763c4ed1 100644
--- a/mod/menu.php
+++ b/mod/menu.php
@@ -137,7 +137,9 @@ function menu_content(&$a) {
$o = replace_macros(get_markup_template('menuedit.tpl'), array(
'$header' => t('Edit Menu'),
+ '$sys' => $a->is_sys,
'$menu_id' => intval(argv(1)),
+ '$menu_edit_link' => 'mitem/' . intval(argv(1)) . (($a->is_sys) ? '?f=&sys=1' : ''),
'$hintedit' => t('Add or remove entries to this menu'),
'$editcontents' => t('Edit menu contents'),
'$menu_name' => array('menu_name', t('Menu name'), $m['menu_name'], t('Must be unique, only seen by you'), '*'),
diff --git a/mod/mitem.php b/mod/mitem.php
index c4c293d1e..bc93165ac 100644
--- a/mod/mitem.php
+++ b/mod/mitem.php
@@ -44,9 +44,6 @@ function mitem_post(&$a) {
if(! $a->data['menu'])
return;
-
- $channel = $a->get_channel();
-
if(!$_REQUEST['mitem_desc'] || !$_REQUEST['mitem_link']) {
notice( t('Unable to create element.') . EOL);
return;
@@ -90,9 +87,6 @@ function mitem_post(&$a) {
}
-
-
-
}
@@ -167,7 +161,8 @@ function mitem_content(&$a) {
'$submit_more' => t('Submit and continue'),
'$display' => $display,
'$lockstate' => $lockstate,
- '$menu_names' => $menu_names
+ '$menu_names' => $menu_names,
+ '$sys' => $a->is_sys
));
$o .= replace_macros(get_markup_template('mitemlist.tpl'),array(
diff --git a/mod/photo.php b/mod/photo.php
index 2e16fc1d9..e8cd95f1c 100644
--- a/mod/photo.php
+++ b/mod/photo.php
@@ -123,7 +123,7 @@ function photo_init(&$a) {
);
if($r) {
- $allowed = (($r[0]['uid']) ? perm_is_allowed($r[0]['uid'],$observer_xchan,'view_photos') : true);
+ $allowed = (($r[0]['uid']) ? perm_is_allowed($r[0]['uid'],$observer_xchan,'view_storage') : true);
$sql_extra = permissions_sql($r[0]['uid']);
diff --git a/mod/photos.php b/mod/photos.php
index c65c87c27..b65218e94 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -63,7 +63,7 @@ function photos_post(&$a) {
$page_owner_uid = $a->data['channel']['channel_id'];
- if(perm_is_allowed($page_owner_uid,get_observer_hash(),'post_photos'))
+ if(perm_is_allowed($page_owner_uid,get_observer_hash(),'write_storage'))
$can_post = true;
if(! $can_post) {
@@ -495,8 +495,8 @@ function photos_content(&$a) {
$observer = $a->get_observer();
- $can_post = perm_is_allowed($owner_uid,$observer['xchan_hash'],'post_photos');
- $can_view = perm_is_allowed($owner_uid,$observer['xchan_hash'],'view_photos');
+ $can_post = perm_is_allowed($owner_uid,$observer['xchan_hash'],'write_storage');
+ $can_view = perm_is_allowed($owner_uid,$observer['xchan_hash'],'view_storage');
if(! $can_view) {
notice( t('Access to this item is restricted.') . EOL);
diff --git a/mod/profile_photo.php b/mod/profile_photo.php
index de2a538f1..13923a655 100644
--- a/mod/profile_photo.php
+++ b/mod/profile_photo.php
@@ -135,7 +135,7 @@ function profile_photo_post(&$a) {
$im = photo_factory($base_image['data'], $base_image['type']);
if($im->is_valid()) {
- $im->cropImage(175,$srcX,$srcY,$srcW,$srcH);
+ $im->cropImage(300,$srcX,$srcY,$srcW,$srcH);
$aid = get_account_id();
@@ -412,7 +412,7 @@ function profile_photo_crop_ui_head(&$a, $ph, $hash, $smallest){
$width = $ph->getWidth();
$height = $ph->getHeight();
- if($width < 175 || $height < 175) {
+ if($width < 300 || $height < 300) {
$ph->scaleImageUp(200);
$width = $ph->getWidth();
$height = $ph->getHeight();
diff --git a/mod/setup.php b/mod/setup.php
index d88cf73f1..bba29921e 100755
--- a/mod/setup.php
+++ b/mod/setup.php
@@ -729,6 +729,6 @@ function what_next() {
."
".t('IMPORTANT: You will need to [manually] setup a scheduled task for the poller.')
.t('Please see the file "install/INSTALL.txt".')
."
"
- .t("Go to your new Red node registration page and register as new user. Remember to use the same email you have entered as administrator email. This will allow you to enter the site admin panel.")
+ .t("Go to your new hub registration page and register as new member. Remember to use the same email you have entered as administrator email. This will allow you to enter the site admin panel.")
."
";
}
diff --git a/mod/uexport.php b/mod/uexport.php
index edcb2fa84..8217a17c4 100644
--- a/mod/uexport.php
+++ b/mod/uexport.php
@@ -9,9 +9,17 @@ function uexport_init(&$a) {
require_once('include/identity.php');
- header('content-type: application/octet_stream');
- header('content-disposition: attachment; filename="' . $channel['channel_address'] . '.json"' );
+ if(argc() > 1 && intval(argv(1)) > 1900) {
+ $year = intval(argv(1));
+ }
+ header('content-type: application/octet_stream');
+ header('content-disposition: attachment; filename="' . $channel['channel_address'] . (($year) ? '-' . $year : '') . '.json"' );
+
+ if($year) {
+ echo json_encode(identity_export_year(local_channel(),$year));
+ killme();
+ }
if(argc() > 1 && argv(1) === 'basic') {
echo json_encode(identity_basic_export(local_channel()));
@@ -34,7 +42,9 @@ function uexport_content(&$a) {
'$basictitle' => t('Export Channel'),
'$basic' => t('Export your basic channel information to a small file. This acts as a backup of your connections, permissions, profile and basic data, which can be used to import your data to a new hub, but does not contain your content.'),
'$fulltitle' => t('Export Content'),
- '$full' => t('Export your channel information and all the content to a JSON backup. This backs up all of your connections, permissions, profile data and all of your content, but is generally not suitable for importing a channel to a new hub as this file may be VERY large. Please be patient - it may take several minutes for this download to begin.')
+ '$full' => t('Export your channel information and all the content to a JSON backup. This backs up all of your connections, permissions, profile data and the last year of posts. This file may be VERY large. Please be patient - it may take several minutes for this download to begin.'),
+ '$by_year' => t('Export your posts from a given year.'),
+
));
return $o;
}
diff --git a/util/add_addon_repo b/util/add_addon_repo
index 4979c06bc..decd9e091 100755
--- a/util/add_addon_repo
+++ b/util/add_addon_repo
@@ -1,4 +1,4 @@
-#!/bin/sh -f
+#!/bin/bash -f
if [ $# -ne 2 ]; then
echo usage: $0 repo_url nickname
diff --git a/util/add_theme_repo b/util/add_theme_repo
index 70a8c6432..d41eba6d9 100755
--- a/util/add_theme_repo
+++ b/util/add_theme_repo
@@ -1,4 +1,4 @@
-#!/bin/sh -f
+#!/bin/bash -f
if [ $# -ne 2 ]; then
diff --git a/util/add_widget_repo b/util/add_widget_repo
index 449afe5db..347e8e4e1 100755
--- a/util/add_widget_repo
+++ b/util/add_widget_repo
@@ -1,4 +1,4 @@
-#!/bin/sh -f
+#!/bin/bash -f
if [ $# -ne 2 ]; then
echo usage: $0 repo_url nickname
diff --git a/util/update_addon_repo b/util/update_addon_repo
index 42bd3a71f..5b531e6a5 100755
--- a/util/update_addon_repo
+++ b/util/update_addon_repo
@@ -1,4 +1,4 @@
-#!/bin/sh -f
+#!/bin/bash -f
if [ $# -ne 1 ]; then
echo usage: $0 repository
diff --git a/util/update_theme_repo b/util/update_theme_repo
index 443b26591..cd71531d0 100755
--- a/util/update_theme_repo
+++ b/util/update_theme_repo
@@ -1,4 +1,4 @@
-#!/bin/sh -f
+#!/bin/bash -f
if [ $# -ne 1 ]; then
diff --git a/util/update_widget_repo b/util/update_widget_repo
index c00c85708..045122619 100755
--- a/util/update_widget_repo
+++ b/util/update_widget_repo
@@ -1,4 +1,4 @@
-#!/bin/sh -f
+#!/bin/bash -f
if [ $# -ne 1 ]; then
echo usage: $0 repository
diff --git a/version.inc b/version.inc
index fe5a631ad..928fb3ee9 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2015-07-06.1085
+2015-07-27.1106
diff --git a/view/css/conversation.css b/view/css/conversation.css
index bb6887d59..7d4930aac 100644
--- a/view/css/conversation.css
+++ b/view/css/conversation.css
@@ -196,10 +196,6 @@ a.wall-item-name-link {
filter:alpha(opacity=100);
}
-.wall-item-wrapper-end {
- clear: both;
-}
-
.shared_header {
margin-bottom: 20px;
}
diff --git a/view/css/default.css b/view/css/default.css
index fb6705894..f0c89a087 100644
--- a/view/css/default.css
+++ b/view/css/default.css
@@ -17,12 +17,25 @@ main {
aside {
display: table-cell;
vertical-align: top;
- padding: 65px 7px 0px 7px;
+ padding: 80px 7px 0px 7px;
+
}
section {
width: 100%;
display: table-cell;
vertical-align: top;
- padding: 65px 7px 200px 7px;
+ padding: 80px 7px 200px 7px;
+}
+
+@media screen and (max-width: 767px) {
+
+ section {
+ padding: 65px 7px 200px 7px;
+ }
+
+ aside#region_1 {
+ padding: 65px 7px 0px 7px;
+ }
+
}
diff --git a/view/css/mod_connedit.css b/view/css/mod_connedit.css
index 44a0a1abf..87eff66d4 100644
--- a/view/css/mod_connedit.css
+++ b/view/css/mod_connedit.css
@@ -1,188 +1,18 @@
-
-.field_abook_help {
- color: #000;
-}
-.abook-them {
- padding: 5px;
- text-align: center;
-}
+.abook-them,
.abook-me {
- padding: 5px 5px 5px 15px;
- text-align: center;
-}
-.acheckbox {
- margin-bottom: 5px !important;
-}
-
-.abook-pending-contact, .abook-autotext {
- background: orange;
font-weight: bold;
- margin: 10px;
- padding: 20px 5px 10px;
}
-.abook-perms-msg {
- background: orange;
- font-weight: bold;
- margin: 10px;
- padding: 20px 5px 10px;
+.slider {
+ position: relative;
+ left: 1%;
+ padding-bottom: 15px;
}
-.abook-permschange {
+#perms-tool-table {
width: 100%;
}
-.abook-perms-steps {
- float: left;
- width: 200px;
- height: 210px;
- background: orange;
- font-weight: bold;
- margin: 10px;
- padding: 20px 5px 10px;
-
-}
-
-.abook-permssave {
- margin-left: 10px;
- clear: both;
-}
-
-#contact-slider {
- width: 600px !important;
-}
-
-#rating-slider {
- width: 600px !important;
-}
-
-#rating-text {
- width: 400px;
- height: 60px;
-}
-
-.abook-edit-them, .abook-edit-me {
- float: left;
- margin-left: 10px;
- margin-right: 10px;
-}
-.field_abook_help {
- float: left;
-}
-
-#contacts-main {
- margin-top: 20px;
- margin-bottom: 20px;
-}
-
-
-
-#contact-edit-wrapper {
- margin-top: 10px;
-}
-
-#contact-edit-banner-name {
- font-size: 1.4em;
- font-weight: bold;
-}
-
-#contact-edit-poll-wrapper {
- margin-top: 15px;
-}
-
-#contact-edit-poll-text {
- margin-top: 15px;
- margin-bottom: 5px;
-}
-
-#contact-edit-update-now {
- margin-top: 15px;
-}
-
-#contact-edit-links{
- clear: both;
-}
-
-#contact-edit-links ul {
- list-style: none;
- list-style-type: none;
- margin-left: 0px;
- padding-left: 0px;
-}
-
-#contact-edit-links li {
- margin-top: 5px;
-}
-
-#contact-edit-drop-link {
- float: right;
- margin-right: 20px;
-}
-
-#contact-edit-nav-end {
- clear: both;
-}
-
-#contact-edit-wrapper {
- width: 100%;
-}
-
-#contact-edit-end {
- clear: both;
- margin-top: 15px;
-}
-
-#contact-profile-selector {
- width: 175px;
- margin-left: 175px;
-}
-
-.contact-edit-submit {
- margin-top: 20px;
-}
-
-.contact-entry-wrapper {
- float: left;
- width: 120px;
- height: 120px;
- padding: 10px;
-}
-
-#contacts-search {
- font-size: 1em;
- width: 300px;
-}
-
-#contacts-search-end {
- margin-bottom: 10px;
-}
-
-.contact-entry-photo-end {
- clear: both;
-}
-
-.contact-entry-name {
- float: left;
- margin-left: 0px;
- margin-right: 10px;
- width: 120px;
- overflow: hidden;
-}
-
-.contact-entry-end {
- clear: both;
-}
-
-#abook-advanced-panel, #abook-advanced {
- opacity: 0.3;
- filter:alpha(opacity=30);
-}
-
-#abook-advanced-panel:hover, #abook-advanced:hover {
- opacity: 1.0;
- filter:alpha(opacity=100);
-}
-
-#abook-advanced {
- margin-top: 15px;
+#perms-tool-table td {
+ vertical-align: top;
}
diff --git a/view/css/mod_display.css b/view/css/mod_display.css
new file mode 100644
index 000000000..dde242d4e
--- /dev/null
+++ b/view/css/mod_display.css
@@ -0,0 +1,3 @@
+#jot-popup {
+ display: none;
+}
diff --git a/view/css/widgets.css b/view/css/widgets.css
index 63c380c75..5b6e8aeb9 100644
--- a/view/css/widgets.css
+++ b/view/css/widgets.css
@@ -39,7 +39,7 @@
padding: 5px;
width: 100%;
resize: vertical;
- height: 150px;
+ height: 250px;
}
/* saved searches */
diff --git a/view/js/mod_connedit.js b/view/js/mod_connedit.js
index ee34f0508..84fff5ed1 100644
--- a/view/js/mod_connedit.js
+++ b/view/js/mod_connedit.js
@@ -1,23 +1,12 @@
-
-function abook_perms_msg() {
-// $('.abook-permsmsg').show();
-// $('.abook-permschange').html(aStr['permschange']);
-// $('.abook-permssave').show();
-}
-
-function abook_perms_new() {
-// $('.abook-permsnew').show();
-// $('.abook-permssave').show();
-}
-
-
$(document).ready(function() {
+
+ $('form').areYouSure({'addRemoveFieldsMarksDirty':true, 'message': aStr['leavethispage'] }); // Warn user about unsaved settings
+
if(typeof(after_following) !== 'undefined' && after_following) {
if(typeof(connectDefaultShare) !== 'undefined')
connectDefaultShare();
else
connectFullShare();
- abook_perms_new();
}
$('#id_pending').click(function() {
@@ -25,16 +14,10 @@ $(document).ready(function() {
connectDefaultShare();
else
connectFullShare();
- abook_perms_new();
});
-// $('.abook-edit-me').click(function() {
-// abook_perms_msg();
-// });
-
});
-
function connectFullShare() {
$('.abook-edit-me').each(function() {
if(! $(this).is(':disabled'))
@@ -42,7 +25,6 @@ function connectFullShare() {
});
$('#me_id_perms_view_stream').attr('checked','checked');
$('#me_id_perms_view_profile').attr('checked','checked');
- $('#me_id_perms_view_photos').attr('checked','checked');
$('#me_id_perms_view_contacts').attr('checked','checked');
$('#me_id_perms_view_storage').attr('checked','checked');
$('#me_id_perms_view_pages').attr('checked','checked');
@@ -54,85 +36,4 @@ function connectFullShare() {
$('#me_id_perms_view_storage').attr('checked','checked');
$('#me_id_perms_republish').attr('checked','checked');
$('#me_id_perms_post_like').attr('checked','checked');
-// abook_perms_msg();
}
-
-function connectCautiousShare() {
- $('.abook-edit-me').each(function() {
- if(! $(this).is(':disabled'))
- $(this).removeAttr('checked');
- });
-
- $('#me_id_perms_view_stream').attr('checked','checked');
- $('#me_id_perms_view_profile').attr('checked','checked');
- $('#me_id_perms_view_photos').attr('checked','checked');
- $('#me_id_perms_view_storage').attr('checked','checked');
- $('#me_id_perms_view_pages').attr('checked','checked');
- $('#me_id_perms_send_stream').attr('checked','checked');
- $('#me_id_perms_post_comments').attr('checked','checked');
- $('#me_id_perms_post_mail').attr('checked','checked');
- $('#me_id_perms_post_like').attr('checked','checked');
-// abook_perms_msg();
-
-}
-
-function connectForum() {
- $('.abook-edit-me').each(function() {
- if(! $(this).is(':disabled'))
- $(this).removeAttr('checked');
- });
-
- $('#me_id_perms_view_stream').attr('checked','checked');
- $('#me_id_perms_view_profile').attr('checked','checked');
- $('#me_id_perms_view_photos').attr('checked','checked');
- $('#me_id_perms_view_contacts').attr('checked','checked');
- $('#me_id_perms_view_storage').attr('checked','checked');
- $('#me_id_perms_view_pages').attr('checked','checked');
- $('#me_id_perms_send_stream').attr('checked','checked');
- $('#me_id_perms_post_wall').attr('checked','checked');
- $('#me_id_perms_post_comments').attr('checked','checked');
- $('#me_id_perms_post_mail').attr('checked','checked');
- $('#me_id_perms_tag_deliver').attr('checked','checked');
- $('#me_id_perms_republish').attr('checked','checked');
- $('#me_id_perms_post_like').attr('checked','checked');
-// abook_perms_msg();
-
-}
-
-function connectClear() {
- $('.abook-edit-me').each(function() {
- if(! $(this).is(':disabled'))
- $(this).removeAttr('checked');
- });
-// abook_perms_msg();
-
-}
-
-function connectSoapBox() {
- $('.abook-edit-me').each(function() {
- if(! $(this).is(':disabled'))
- $(this).removeAttr('checked');
- });
-
- $('#me_id_perms_view_stream').attr('checked','checked');
- $('#me_id_perms_view_profile').attr('checked','checked');
- $('#me_id_perms_view_photos').attr('checked','checked');
- $('#me_id_perms_view_contacts').attr('checked','checked');
- $('#me_id_perms_view_storage').attr('checked','checked');
- $('#me_id_perms_view_pages').attr('checked','checked');
-// abook_perms_msg();
-
-}
-
-
-function connectFollowOnly() {
- $('.abook-edit-me').each(function() {
- if(! $(this).is(':disabled'))
- $(this).removeAttr('checked');
- });
-
- $('#me_id_perms_send_stream').attr('checked','checked');
-// abook_perms_msg();
-
-}
-
diff --git a/view/js/mod_settings.js b/view/js/mod_settings.js
index 5dac96940..e28a18b9f 100644
--- a/view/js/mod_settings.js
+++ b/view/js/mod_settings.js
@@ -46,7 +46,6 @@ function channel_privacy_macro(n) {
if(n == 0) {
$('#id_view_stream option').eq(0).attr('selected','selected');
$('#id_view_profile option').eq(0).attr('selected','selected');
- $('#id_view_photos option').eq(0).attr('selected','selected');
$('#id_view_contacts option').eq(0).attr('selected','selected');
$('#id_view_storage option').eq(0).attr('selected','selected');
$('#id_view_pages option').eq(0).attr('selected','selected');
@@ -54,7 +53,6 @@ function channel_privacy_macro(n) {
$('#id_post_wall option').eq(0).attr('selected','selected');
$('#id_post_comments option').eq(0).attr('selected','selected');
$('#id_post_mail option').eq(0).attr('selected','selected');
- $('#id_post_photos option').eq(0).attr('selected','selected');
$('#id_tag_deliver option').eq(0).attr('selected','selected');
$('#id_chat option').eq(0).attr('selected','selected');
$('#id_write_storage option').eq(0).attr('selected','selected');
@@ -69,7 +67,6 @@ function channel_privacy_macro(n) {
if(n == 1) {
$('#id_view_stream option').eq(1).attr('selected','selected');
$('#id_view_profile option').eq(1).attr('selected','selected');
- $('#id_view_photos option').eq(1).attr('selected','selected');
$('#id_view_contacts option').eq(1).attr('selected','selected');
$('#id_view_storage option').eq(1).attr('selected','selected');
$('#id_view_pages option').eq(1).attr('selected','selected');
@@ -77,7 +74,6 @@ function channel_privacy_macro(n) {
$('#id_post_wall option').eq(1).attr('selected','selected');
$('#id_post_comments option').eq(1).attr('selected','selected');
$('#id_post_mail option').eq(1).attr('selected','selected');
- $('#id_post_photos option').eq(1).attr('selected','selected');
$('#id_tag_deliver option').eq(1).attr('selected','selected');
$('#id_chat option').eq(1).attr('selected','selected');
$('#id_write_storage option').eq(1).attr('selected','selected');
@@ -92,7 +88,6 @@ function channel_privacy_macro(n) {
if(n == 2) {
$('#id_view_stream option').eq(7).attr('selected','selected');
$('#id_view_profile option').eq(7).attr('selected','selected');
- $('#id_view_photos option').eq(7).attr('selected','selected');
$('#id_view_contacts option').eq(7).attr('selected','selected');
$('#id_view_storage option').eq(7).attr('selected','selected');
$('#id_view_pages option').eq(7).attr('selected','selected');
@@ -100,7 +95,6 @@ function channel_privacy_macro(n) {
$('#id_post_wall option').eq(1).attr('selected','selected');
$('#id_post_comments option').eq(2).attr('selected','selected');
$('#id_post_mail option').eq(1).attr('selected','selected');
- $('#id_post_photos option').eq(0).attr('selected','selected');
$('#id_tag_deliver option').eq(1).attr('selected','selected');
$('#id_chat option').eq(1).attr('selected','selected');
$('#id_write_storage option').eq(0).attr('selected','selected');
@@ -115,7 +109,6 @@ function channel_privacy_macro(n) {
if(n == 3) {
$('#id_view_stream option').eq(7).attr('selected','selected');
$('#id_view_profile option').eq(7).attr('selected','selected');
- $('#id_view_photos option').eq(7).attr('selected','selected');
$('#id_view_contacts option').eq(7).attr('selected','selected');
$('#id_view_storage option').eq(7).attr('selected','selected');
$('#id_view_pages option').eq(7).attr('selected','selected');
@@ -123,7 +116,6 @@ function channel_privacy_macro(n) {
$('#id_post_wall option').eq(5).attr('selected','selected');
$('#id_post_comments option').eq(5).attr('selected','selected');
$('#id_post_mail option').eq(5).attr('selected','selected');
- $('#id_post_photos option').eq(2).attr('selected','selected');
$('#id_tag_deliver option').eq(1).attr('selected','selected');
$('#id_chat option').eq(5).attr('selected','selected');
$('#id_write_storage option').eq(2).attr('selected','selected');
diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css
index fcc089cf0..046d8471b 100644
--- a/view/theme/redbasic/css/style.css
+++ b/view/theme/redbasic/css/style.css
@@ -264,12 +264,20 @@ footer {
}
/*TODO: we should use one class for all this. */
-/*
-.group-selected, .fileas-selected, .categories-selected, .search-selected, .active {
- color: #444 !important;
- text-decoration: none !important;
+
+.group-selected,
+.fileas-selected,
+.categories-selected,
+.search-selected,
+.active,
+.group-selected:hover,
+.fileas-selected:hover,
+.categories-selected:hover,
+.search-selected:hover,
+.active:hover {
+ color: $font_colour;
}
-*/
+
.fileas-all {
text-decoration: none !important;
@@ -347,7 +355,8 @@ footer {
word-wrap: break-word;
}
-.vcard dl {
+.vcard dl,
+.vcard .title {
margin-top: 10px;
margin-bottom: 0px;
}
@@ -406,13 +415,19 @@ footer {
#profile-photo-wrapper img {
- padding: 10px;
- width: 197px;
- height: 197px;
+ width: 100%;
+ height: 100%;
+ max-width: 300px;
+ max-height: 300px;
}
#profile-photo-wrapper {
- margin-top: 10px;
+ width: 251px;
+ height: 251px;
+ margin-top: -10px;
+ margin-bottom: 10px;
+ border: 1px solid #ccc;
+ border-radius: $radiuspx;
}
@@ -504,7 +519,6 @@ footer {
display: block;
}
-
.pager {
padding: 10px;
text-align: center;
@@ -570,10 +584,6 @@ footer {
margin-left: 5px;
}
-.photo {
- border: 1px solid #AAAAAA;
-}
-
.photo-top-photo, .photo-album-photo {
/* padding: 10px;
max-width: 300px;
@@ -704,8 +714,8 @@ a.rateme, div.rateme {
.contact-block-div {
float: left;
- width: 49px;
- height: 49px;
+ width: 50px;
+ height: 50px;
}
.contact-block-textdiv {
float: left;
@@ -720,8 +730,8 @@ a.rateme, div.rateme {
float: left;
}
.contact-block-img {
- width:47px;
- height:47px;
+ width:48px;
+ height:48px;
}
#tag-remove {
@@ -741,8 +751,8 @@ a.rateme, div.rateme {
}
.wall-item-conv {
- margin-top: 5px;
- margin-bottom: 25px;
+ padding-top: 5px;
+ padding-bottom: 10px;
}
@@ -1274,12 +1284,6 @@ div.jGrowl div.jGrowl-notification {
text-align: center;
}
-#contact-slider {
- position: relative;
- left: 5%;
- width: 90%;
-}
-
a.rconnect, a.rateme, div.rateme {
color: $nav_active_icon_colour;
text-decoration: none;
@@ -1587,8 +1591,8 @@ img.mail-list-sender-photo {
}
.jothidden > input {
- border: 1px solid $bgcolour;
- background-color: $bgcolour;
+ border: 1px solid transparent;
+ background-color: transparent;
}
.jothidden > input:hover,
.jothidden > input:focus {
@@ -1922,7 +1926,7 @@ nav .dropdown-menu {
.section-content-wrapper .section-content-warning-wrapper,
.section-content-tools-wrapper .section-content-danger-wrapper,
.section-content-wrapper .section-content-danger-wrapper {
- margin-bottom: 0px;
+ margin-bottom: 10px;
border-radius: $radiuspx;
}
@@ -1932,12 +1936,14 @@ nav .dropdown-menu {
background-color: $comment_item_colour;
border-bottom-left-radius: $radiuspx;
border-bottom-right-radius: $radiuspx;
+ word-wrap: break-word;
}
.section-content-wrapper-np {
background-color: $comment_item_colour;
border-bottom-left-radius: $radiuspx;
border-bottom-right-radius: $radiuspx;
+ word-wrap: break-word;
}
[id^="cloud-index-"]:hover td,
@@ -1953,6 +1959,10 @@ nav .dropdown-menu {
background-color: $item_colour;
}
+#perms-tool-table .highlight:hover {
+ background-color: $item_colour;
+}
+
nav ul li .undefined,
nav ul li .notify-seen,
nav ul li .notify-unseen
@@ -2107,6 +2117,7 @@ nav .badge.mail-update:hover {
}
@media screen and (max-width: 767px) {
+
aside#region_1 {
background: rgba(0, 0, 0, .1);
border-right: 1px solid $nav_bd;
@@ -2285,4 +2296,3 @@ nav .badge.mail-update:hover {
.channels_ckbx, .pending_ckbx, .users_ckbx {
margin-top: -5px !important;
}
-
diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js
index 68190778c..302efc365 100644
--- a/view/theme/redbasic/js/redbasic.js
+++ b/view/theme/redbasic/js/redbasic.js
@@ -7,7 +7,7 @@ $(document).ready(function() {
if( $('#css3-calc').width() == 10) {
$(window).resize(function() {
if($(window).width() < 767) {
- $('main').css('width', $(window).width() + 231 );
+ $('main').css('width', $(window).width() + 285 );
} else {
$('main').css('width', '100%' );
}
diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php
index 6e68d38d5..96dba59e5 100644
--- a/view/theme/redbasic/php/style.php
+++ b/view/theme/redbasic/php/style.php
@@ -154,7 +154,7 @@ if(file_exists('view/theme/redbasic/css/style.css')) {
$x = file_get_contents('view/theme/redbasic/css/style.css');
- $aside_width = 231;
+ $aside_width = 285;
// left aside and right aside are is 231px + converse width
if($converse_center) {
diff --git a/view/theme/redbasic/schema/focus.css b/view/theme/redbasic/schema/focus.css
index 8d945a83e..ea983ffc8 100644
--- a/view/theme/redbasic/schema/focus.css
+++ b/view/theme/redbasic/schema/focus.css
@@ -16,12 +16,7 @@
background-color: #fff;
}
-#redbasic_converse_center_container {
- display: none;
-}
-
.wall-item-conv {
- margin-bottom: 10px;
- margin-top: 10px;
- margin-left: 10px;
+ padding-top: 10px;
+ padding-left: 10px;
}
diff --git a/view/theme/redbasic/schema/focus.php b/view/theme/redbasic/schema/focus.php
index d93ee003e..1f1963764 100644
--- a/view/theme/redbasic/schema/focus.php
+++ b/view/theme/redbasic/schema/focus.php
@@ -46,7 +46,7 @@ if (! $radius)
if (! $shadow)
$shadow = "0";
if (! $converse_width)
- $converse_width = "676";
+ $converse_width = "790";
if(! $top_photo)
$top_photo = '48px';
if(! $comment_indent)
@@ -61,5 +61,3 @@ else {
$nav_float_min_opacity = (float) $nav_min_opacity;
$nav_percent_min_opacity = (int) 100 * $nav_min_opacity;
}
-
-$converse_center = "1";
diff --git a/view/tpl/abook_edit.tpl b/view/tpl/abook_edit.tpl
index d118cbb9c..0a7cf2d4d 100755
--- a/view/tpl/abook_edit.tpl
+++ b/view/tpl/abook_edit.tpl
@@ -1,140 +1,223 @@
-
-
{{$header}}
+
+
+ {{if $notself}}
+
+
+
+
+
+
+ {{/if}}
+
{{$header}}
+
+
+ {{if $notself}}
+ {{foreach $buttons as $b}}
+ {{if $b.info}}
+
+ {{/if}}
+ {{/foreach}}
+
+
+ {{$addr_text}} '{{$addr}}'
+
+ {{if $last_update}}
+
+ {{$lastupdtext}} {{$last_update}}
+
+ {{/if}}
+
+ {{/if}}
-
{{$addr}}
+
+
diff --git a/view/tpl/contact_slider.tpl b/view/tpl/contact_slider.tpl
index 5c15e1c2c..550abc147 100755
--- a/view/tpl/contact_slider.tpl
+++ b/view/tpl/contact_slider.tpl
@@ -1,4 +1,20 @@
-
+
diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl
index 27632d770..30a007bd6 100755
--- a/view/tpl/conv_item.tpl
+++ b/view/tpl/conv_item.tpl
@@ -165,8 +165,7 @@