From 08435e5b1a4970d703d0096bf6b97839abf452d0 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 13 Apr 2014 16:07:47 -0700 Subject: [PATCH 01/11] minor alignment issues --- version.inc | 2 +- view/theme/redbasic/css/style.css | 15 ++++++++++----- view/tpl/login.tpl | 4 +++- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/version.inc b/version.inc index 792dc3eb5..67dbb871d 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2014-04-11.644 +2014-04-13.645 diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index edee90fe6..996118ad1 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -285,13 +285,16 @@ footer { #login-extra-links { clear: both; + width: 300px; } -#register-link, -#lost-password-link { +#register-link { float: left; margin-left: 100px; } +#lost-password-link { + float: right; +} #login-standard-end { clear: both; @@ -828,15 +831,17 @@ footer { .location-label, .gender-label, .marital-label, .homepage-label { float: left; - text-align: right; display: block; - width: 65px; + width: 70px; + } .adr, .x-gender, .marital-text, .homepage-url { float: left; display: block; - margin-left: 8px; + width: 130px; + height: 18px; + overflow: hidden; } .profile-clear { diff --git a/view/tpl/login.tpl b/view/tpl/login.tpl index 3ca118590..a1952d408 100755 --- a/view/tpl/login.tpl +++ b/view/tpl/login.tpl @@ -11,12 +11,14 @@ {{$lostlink}} +
+ {{include file="field_checkbox.tpl" field=$remember}}
- +
{{foreach $hiddens as $k=>$v}} From e3aa7d2aaf223d0edfe9665adad59bcb0affade9 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 13 Apr 2014 18:07:19 -0700 Subject: [PATCH 02/11] only show forum tags on contact autocomplete, not in the ACL selector --- mod/acl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/acl.php b/mod/acl.php index 3b737d36e..0f997c8b8 100644 --- a/mod/acl.php +++ b/mod/acl.php @@ -206,7 +206,7 @@ function acl_init(&$a){ if(count($r)) { foreach($r as $g){ - if($g['abook_their_perms'] & PERMS_W_TAGWALL) { + if(($g['abook_their_perms'] & PERMS_W_TAGWALL) && $type == 'c') { $contacts[] = array( "type" => "c", "photo" => "images/twopeople.png", From 769b0f6bc9ca66a0996c2d402359e5f463e25333 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 13 Apr 2014 18:30:06 -0700 Subject: [PATCH 03/11] Often somebody will join the matrix with a dodgy cert and we'll sort that out but their profile photo will remain rainbow man (or the site default). However the photo_date has been updated so we won't try again. This checkin looks for such a failure and leaves the photo_date alone if the photo import failed. --- include/photo/photo_driver.php | 2 +- include/zot.php | 36 +++++++++++++++++++++++----------- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php index 484550cb7..f5e915402 100644 --- a/include/photo/photo_driver.php +++ b/include/photo/photo_driver.php @@ -616,7 +616,7 @@ function import_profile_photo($photo,$xchan,$thing = false) { $type = 'image/jpeg'; } - return(array($photo,$thumb,$micro,$type)); + return(array($photo,$thumb,$micro,$type,$photo_failure)); } diff --git a/include/zot.php b/include/zot.php index c0916755f..c919b0981 100644 --- a/include/zot.php +++ b/include/zot.php @@ -728,7 +728,8 @@ function import_xchan($arr,$ud_flags = UPDATE_FLAGS_UPDATED) { z_root() . '/photo/profile/l/' . $local[0]['channel_id'], z_root() . '/photo/profile/m/' . $local[0]['channel_id'], z_root() . '/photo/profile/s/' . $local[0]['channel_id'], - $arr['photo_mimetype'] + $arr['photo_mimetype'], + false ); } } @@ -736,16 +737,29 @@ function import_xchan($arr,$ud_flags = UPDATE_FLAGS_UPDATED) { $photos = import_profile_photo($arr['photo'],$xchan_hash); } if($photos) { - $r = q("update xchan set xchan_photo_date = '%s', xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s', xchan_photo_mimetype = '%s' - where xchan_hash = '%s' limit 1", - dbesc(datetime_convert('UTC','UTC',$arr['photo_updated'])), - dbesc($photos[0]), - dbesc($photos[1]), - dbesc($photos[2]), - dbesc($photos[3]), - dbesc($xchan_hash) - ); - + if($photos[4]) { + // importing the photo failed somehow. Leave the photo_date alone so we can try again at a later date. + // This often happens when somebody joins the matrix with a bad cert. + $r = q("update xchan set xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s', xchan_photo_mimetype = '%s' + where xchan_hash = '%s' limit 1", + dbesc($photos[0]), + dbesc($photos[1]), + dbesc($photos[2]), + dbesc($photos[3]), + dbesc($xchan_hash) + ); + } + else { + $r = q("update xchan set xchan_photo_date = '%s', xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s', xchan_photo_mimetype = '%s' + where xchan_hash = '%s' limit 1", + dbesc(datetime_convert('UTC','UTC',$arr['photo_updated'])), + dbesc($photos[0]), + dbesc($photos[1]), + dbesc($photos[2]), + dbesc($photos[3]), + dbesc($xchan_hash) + ); + } $what .= 'photo '; $changed = true; } From bc041bdb77036eba31468278d0a0796c1e354379 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 13 Apr 2014 19:57:47 -0700 Subject: [PATCH 04/11] profperm: abook_profile was being handled by profile id rather than profile_guid, causing private profiles to not be activated in many cases. --- mod/profperm.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mod/profperm.php b/mod/profperm.php index 08838831b..915f2a994 100644 --- a/mod/profperm.php +++ b/mod/profperm.php @@ -61,9 +61,9 @@ function profperm_content(&$a) { $profile = $r[0]; - $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash WHERE abook_channel = %d AND abook_profile = %d", + $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash WHERE abook_channel = %d AND abook_profile = '%s'", intval(local_user()), - intval(argv(1)) + dbesc($profile['profile_guid']) ); $ingroup = array(); @@ -75,23 +75,23 @@ function profperm_content(&$a) { if($change) { if(in_array($change,$ingroup)) { - q("UPDATE abook SET abook_profile = 0 WHERE abook_id = %d AND abook_channel = %d LIMIT 1", + q("UPDATE abook SET abook_profile = '' WHERE abook_id = %d AND abook_channel = %d LIMIT 1", intval($change), intval(local_user()) ); } else { - q("UPDATE abook SET abook_profile = %d WHERE abook_id = %d AND abook_channel = %d LIMIT 1", - intval(argv(1)), + q("UPDATE abook SET abook_profile = '%s' WHERE abook_id = %d AND abook_channel = %d LIMIT 1", + dbesc($profile['profile_guid']), intval($change), intval(local_user()) ); } - $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash WHERE abook_channel = %d AND abook_profile = %d", + $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash WHERE abook_channel = %d AND abook_profile = '%s'", intval(local_user()), - intval(argv(1)) + dbesc($profile['profile_guid']) ); $members = $r; From 4feeacb51be1c2fab52a11ce204c5b56935046b9 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 13 Apr 2014 20:26:20 -0700 Subject: [PATCH 05/11] until we can figure out how to allow commenting on the discover page without killing the matrix, just turn it off. --- include/ConversationObject.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/ConversationObject.php b/include/ConversationObject.php index d97438a5d..9bf410358 100644 --- a/include/ConversationObject.php +++ b/include/ConversationObject.php @@ -181,6 +181,13 @@ class Conversation extends BaseObject { $item->set_commentable(can_comment_on_post($this->observer['xchan_hash'],$item->data)); } + require_once('include/identity.php'); + $sys = get_sys_channel(); + + if($sys && $item->get_data_value('uid') == $sys['channel_id']) { + $item->set_commentable(false); + } + $item->set_conversation($this); $this->threads[] = $item; return end($this->threads); From bf8f5d5b2b1753333d2ea9a14f728183c40c2dcb Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 14 Apr 2014 02:37:04 -0700 Subject: [PATCH 06/11] directory: make "connect" more prominent, but this ultimately needs more theme work. --- version.inc | 2 +- view/tpl/direntry.tpl | 2 +- view/tpl/direntry_large.tpl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/version.inc b/version.inc index 67dbb871d..f409b226a 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2014-04-13.645 +2014-04-14.646 diff --git a/view/tpl/direntry.tpl b/view/tpl/direntry.tpl index e40504c8f..7a3d42e01 100755 --- a/view/tpl/direntry.tpl +++ b/view/tpl/direntry.tpl @@ -9,7 +9,7 @@
{{$entry.name}}
{{if $entry.connect}} - + {{/if}}
{{$entry.details}}
diff --git a/view/tpl/direntry_large.tpl b/view/tpl/direntry_large.tpl index f00448175..487839f7a 100755 --- a/view/tpl/direntry_large.tpl +++ b/view/tpl/direntry_large.tpl @@ -15,7 +15,7 @@
{{$name}}{{if $online}} {{/if}}
{{if $connect}} - + {{/if}}
{{$address}}
From d371ad3da71ac98a5ee8d4eb7118f1cef8afdaef Mon Sep 17 00:00:00 2001 From: marijus Date: Mon, 14 Apr 2014 21:10:48 +0200 Subject: [PATCH 07/11] a small fix for bs-default scheme --- view/theme/redbasic/schema/BS-Default.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/view/theme/redbasic/schema/BS-Default.php b/view/theme/redbasic/schema/BS-Default.php index f93e879e3..ce464fe2c 100644 --- a/view/theme/redbasic/schema/BS-Default.php +++ b/view/theme/redbasic/schema/BS-Default.php @@ -18,3 +18,5 @@ $nav_active_icon_colour = "#555"; if (! $radius) $radius = "4"; + if (! $banner_colour) + $banner_colour = "#777"; From 02c08d0cdab6adee9e0514f8b5806abfba096bad Mon Sep 17 00:00:00 2001 From: marijus Date: Mon, 14 Apr 2014 21:47:00 +0200 Subject: [PATCH 08/11] fixes rconnect button for bs-default scheme --- view/theme/redbasic/css/style.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 996118ad1..321baecf0 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -697,18 +697,18 @@ footer { .rconnect { display: block; - color: #FFFFFF; + color: $nav_active_icon_colour; margin-top: 15px; background-color: $nav_bg; -webkit-border-radius: $radiuspx ; -moz-border-radius: $radiuspx; border-radius: $radiuspx; + border: 1px solid $nav_bd; padding: 5px; font-weight: bold; clear: both; } - #pause { position: fixed; bottom: 5px; @@ -1501,7 +1501,7 @@ div.jGrowl div.jGrowl-notification { } a.rconnect { - color: #ffffff; + color: $nav_active_icon_colour; text-decoration: none; outline: none; } From 506ae56385f5f731b7f3a8f5ee7feda2a66ae985 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 14 Apr 2014 16:45:16 -0700 Subject: [PATCH 09/11] Better handling of restricted /channel and /profile permissions. We will show the name, profile photo and a 'connect' button if appropriate on these pages regardless of permissions. A blank page makes it difficult for folks to figure out how to connect and if it is their real life friend 'x' or not. It also matches our overall policy (adopted from Facebook's lessons learned) that the channel name and default profile photo are always visible and can't really be blocked without messing up the usability of the entire network. This also makes sure that a connect button can be found somewhere besides the directory - where the entry could be blocked; and avoid somebody having to figure out the webbie and find the link to "follow" (another related issue). --- include/identity.php | 30 +++++++++++++----------------- include/widgets.php | 12 ++++++++++++ mod/profile.php | 5 ++--- 3 files changed, 27 insertions(+), 20 deletions(-) diff --git a/include/identity.php b/include/identity.php index 66e572866..b66eaad51 100644 --- a/include/identity.php +++ b/include/identity.php @@ -583,14 +583,16 @@ function profile_load(&$a, $nickname, $profile = '') { } + $a->profile = $p[0]; + $a->profile_uid = $p[0]['profile_uid']; + $a->page['title'] = $a->profile['channel_name'] . " - " . $a->profile['channel_address'] . "@" . $a->get_hostname(); + + $a->profile['permission_to_view'] = $can_view_profile; + if($can_view_profile) { - $a->profile = $p[0]; $online = get_online_status($nickname); $a->profile['online_status'] = $online['result']; - $a->profile_uid = $p[0]['profile_uid']; - - $a->page['title'] = $a->profile['channel_name'] . " - " . $a->profile['channel_address'] . "@" . $a->get_hostname(); } if(local_user()) { @@ -604,18 +606,12 @@ function profile_load(&$a, $nickname, $profile = '') { $_SESSION['theme'] = $p[0]['channel_theme']; - $a->set_template_engine(); // reset the template engine to the default in case the user's theme doesn't specify one +// $a->set_template_engine(); // reset the template engine to the default in case the user's theme doesn't specify one - $theme_info_file = "view/theme/".current_theme()."/php/theme.php"; - if (file_exists($theme_info_file)){ - require_once($theme_info_file); - } - - if(! $can_view_profile) { - // permission denied - notice( t(' Sorry, you don\'t have the permission to view this profile. ') . EOL); - return; - } +// $theme_info_file = "view/theme/".current_theme()."/php/theme.php"; +// if (file_exists($theme_info_file)){ +// require_once($theme_info_file); +// } return; } @@ -739,7 +735,7 @@ logger('online: ' . $profile['online']); $block = true; } - if(($profile['hidewall'] || $block) && (! local_user()) && (! remote_user())) { + if(($profile['hidewall'] && (! local_user()) && (! remote_user())) || $block ) { $location = $pdesc = $gender = $marital = $homepage = $online = False; } @@ -751,7 +747,7 @@ logger('online: ' . $profile['online']); $channel_menu = false; $menu = get_pconfig($profile['uid'],'system','channel_menu'); - if($menu) { + if($menu && ! $block) { require_once('include/menu.php'); $m = menu_fetch($menu,$profile['uid'],$observer['xchan_hash']); if($m) diff --git a/include/widgets.php b/include/widgets.php index 82769d925..678fed833 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -304,6 +304,9 @@ function widget_archive($arr) { if(! feature_enabled($uid,'archives')) return ''; + if(! perm_is_allowed($uid,get_observer_hash(),'view_stream')) + return ''; + $wall = ((array_key_exists('wall', $arr)) ? intval($arr['wall']) : 0); $style = ((array_key_exists('style', $arr)) ? $arr['style'] : 'select'); @@ -338,6 +341,12 @@ function widget_fullprofile($arr) { function widget_categories($arr) { $a = get_app(); + + + if($a->profile['profile_uid'] && (! perm_is_allowed($a->profile['profile_uid'],get_observer_hash(),'view_stream'))) + return ''; + + $cat = ((x($_REQUEST,'cat')) ? htmlspecialchars($_REQUEST['cat'],ENT_COMPAT,'UTF-8') : ''); $srchurl = $a->query_string; $srchurl = rtrim(preg_replace('/cat\=[^\&].*?(\&|$)/is','',$srchurl),'&'); @@ -350,6 +359,9 @@ function widget_tagcloud_wall($arr) { $a = get_app(); if((! $a->profile['profile_uid']) || (! $a->profile['channel_hash'])) return ''; + if(! perm_is_allowed($a->profile['profile_uid'],get_observer_hash(),'view_stream')) + return ''; + $limit = ((array_key_exists('limit',$arr)) ? intval($arr['limit']) : 50); if(feature_enabled($a->profile['profile_uid'],'tagadelic')) return tagblock('search',$a->profile['profile_uid'],$limit,$a->profile['channel_hash'],ITEM_WALL); diff --git a/mod/profile.php b/mod/profile.php index fca7c8f9f..792bf34c5 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -61,7 +61,7 @@ function profile_content(&$a, $update = 0) { $o = ''; if(! (perm_is_allowed($a->profile['profile_uid'],get_observer_hash(), 'view_profile'))) { - notice( t('Access to this profile has been restricted.') . EOL); + notice( t('Permission denied.') . EOL); return; } @@ -69,11 +69,10 @@ function profile_content(&$a, $update = 0) { $is_owner = ((local_user()) && (local_user() == $a->profile['profile_uid']) ? true : false); if($a->profile['hidewall'] && (! $is_owner) && (! remote_user())) { - notice( t('Access to this profile has been restricted.') . EOL); + notice( t('Permission denied.') . EOL); return; } - $o .= profile_tabs($a, $is_owner, $a->profile['channel_address']); From 9026ea649a92b8f3e48a4940dd02c316c0a87c02 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 14 Apr 2014 17:29:19 -0700 Subject: [PATCH 10/11] better mapping of visible connections --- include/text.php | 14 ++++++-------- mod/connections.php | 12 +++++------- mod/viewconnections.php | 14 ++++++-------- 3 files changed, 17 insertions(+), 23 deletions(-) diff --git a/include/text.php b/include/text.php index 63fb76422..68542005b 100755 --- a/include/text.php +++ b/include/text.php @@ -707,11 +707,10 @@ function contact_block() { if((! is_array($a->profile)) || ($a->profile['hide_friends'])) return $o; - $r = q("SELECT COUNT(abook_id) AS total FROM abook left join xchan on abook_xchan = xchan_hash WHERE abook_channel = %d and abook_flags = 0 and not (xchan_flags & %d) and not (xchan_flags & %d) and not (xchan_flags & %d)", + $r = q("SELECT COUNT(abook_id) AS total FROM abook left join xchan on abook_xchan = xchan_hash WHERE abook_channel = %d and not ( abook_flags & %d ) and not (xchan_flags & %d)", intval($a->profile['uid']), - intval(XCHAN_FLAGS_HIDDEN), - intval(XCHAN_FLAGS_ORPHAN), - intval(XCHAN_FLAGS_DELETED) + intval(ABOOK_FLAG_HIDDEN|ABOOK_FLAG_PENDING|ABOOK_FLAG_SELF), + intval(XCHAN_FLAGS_HIDDEN|XCHAN_FLAGS_ORPHAN|XCHAN_FLAGS_DELETED) ); if(count($r)) { $total = intval($r[0]['total']); @@ -722,11 +721,10 @@ function contact_block() { } else { - $r = q("SELECT abook.*, xchan.* FROM abook left join xchan on abook.abook_xchan = xchan.xchan_hash WHERE abook_channel = %d AND abook_flags = 0 and not (xchan_flags & %d ) and not (xchan_flags & %d ) and not (xchan_flags & %d ) ORDER BY RAND() LIMIT %d", + $r = q("SELECT abook.*, xchan.* FROM abook left join xchan on abook.abook_xchan = xchan.xchan_hash WHERE abook_channel = %d AND not ( abook_flags & %d) and not (xchan_flags & %d ) ORDER BY RAND() LIMIT %d", intval($a->profile['uid']), - intval(XCHAN_FLAGS_HIDDEN), - intval(XCHAN_FLAGS_ORPHAN), - intval(XCHAN_FLAGS_DELETED), + intval(ABOOK_FLAG_HIDDEN|ABOOK_FLAG_PENDING|ABOOK_FLAG_SELF), + intval(XCHAN_FLAGS_HIDDEN|XCHAN_FLAGS_ORPHAN|XCHAN_FLAGS_DELETED), intval($shown) ); diff --git a/mod/connections.php b/mod/connections.php index a453203ab..e95f72b49 100644 --- a/mod/connections.php +++ b/mod/connections.php @@ -213,12 +213,10 @@ function connections_content(&$a) { nav_set_selected('intros'); break; case 'ifpending': - $r = q("SELECT COUNT(abook.abook_id) AS total FROM abook left join xchan on abook.abook_xchan = xchan.xchan_hash where abook_channel = %d and not (abook_flags & %d) and not (xchan_flags & %d ) and (abook_flags & %d) and not (abook_flags & %d)", + $r = q("SELECT COUNT(abook.abook_id) AS total FROM abook left join xchan on abook.abook_xchan = xchan.xchan_hash where abook_channel = %d and not (abook_flags & %d) and not (xchan_flags & %d )", intval(local_user()), - intval(ABOOK_FLAG_SELF), - intval(XCHAN_FLAGS_DELETED), - intval(ABOOK_FLAG_PENDING), - intval(ABOOK_FLAG_IGNORED) + intval(ABOOK_FLAG_SELF|ABOOK_FLAG_PENDING|ABOOK_FLAG_IGNORED), + intval(XCHAN_FLAGS_DELETED|XCHAN_FLAGS_ORPHAN) ); if($r && $r[0]['total']) { $search_flags = ABOOK_FLAG_PENDING; @@ -342,7 +340,7 @@ function connections_content(&$a) { where abook_channel = %d and not (abook_flags & %d) and not (xchan_flags & %d ) $sql_extra $sql_extra2 ", intval(local_user()), intval(ABOOK_FLAG_SELF), - intval(XCHAN_FLAGS_DELETED) + intval(XCHAN_FLAGS_DELETED|XCHAN_FLAGS_ORPHAN) ); if($r) { $a->set_pager_total($r[0]['total']); @@ -353,7 +351,7 @@ function connections_content(&$a) { WHERE abook_channel = %d and not (abook_flags & %d) and not ( xchan_flags & %d) $sql_extra $sql_extra2 ORDER BY xchan_name LIMIT %d , %d ", intval(local_user()), intval(ABOOK_FLAG_SELF), - intval(XCHAN_FLAGS_DELETED), + intval(XCHAN_FLAGS_DELETED|XCHAN_FLAGS_ORPHAN), intval($a->pager['start']), intval($a->pager['itemspage']) ); diff --git a/mod/viewconnections.php b/mod/viewconnections.php index a9fb967f7..f5e7ab213 100644 --- a/mod/viewconnections.php +++ b/mod/viewconnections.php @@ -29,21 +29,19 @@ function viewconnections_content(&$a) { } - $r = q("SELECT count(*) as total FROM abook left join xchan on abook_xchan = xchan_hash where abook_channel = %d and abook_flags = 0 and not ( xchan_flags & %d ) and not ( xchan_flags & %d ) and not ( xchan_flags & %d ) ", + $r = q("SELECT count(*) as total FROM abook left join xchan on abook_xchan = xchan_hash where abook_channel = %d and not (abook_flags & %d ) and not ( xchan_flags & %d ) ", intval($a->profile['uid']), - intval(XCHAN_FLAGS_HIDDEN), - intval(XCHAN_FLAGS_ORPHAN), - intval(XCHAN_FLAGS_DELETED) + intval(ABOOK_FLAG_HIDDEN|ABOOK_FLAG_PENDING|ABOOK_FLAG_SELF), + intval(XCHAN_FLAGS_HIDDEN|XCHAN_FLAGS_ORPHAN|XCHAN_FLAGS_DELETED) ); if($r) { $a->set_pager_total($r[0]['total']); } - $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash where abook_channel = %d and abook_flags = 0 and not ( xchan_flags & %d ) and not ( xchan_flags & %d ) and not ( xchan_flags & %d ) order by xchan_name LIMIT %d , %d ", + $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash where abook_channel = %d and not ( abook_flags & %d ) and not ( xchan_flags & %d ) order by xchan_name LIMIT %d , %d ", intval($a->profile['uid']), - intval(XCHAN_FLAGS_HIDDEN), - intval(XCHAN_FLAGS_ORPHAN), - intval(XCHAN_FLAGS_DELETED), + intval(ABOOK_FLAG_HIDDEN|ABOOK_FLAG_PENDING|ABOOK_FLAG_SELF), + intval(XCHAN_FLAGS_HIDDEN|XCHAN_FLAGS_ORPHAN|XCHAN_FLAGS_DELETED), intval($a->pager['start']), intval($a->pager['itemspage']) ); From efe80bb8e98b32b95d1380633e9ffd834fa82511 Mon Sep 17 00:00:00 2001 From: marijus Date: Tue, 15 Apr 2014 20:48:15 +0200 Subject: [PATCH 11/11] minor css fix --- view/css/conversation.css | 4 ++-- view/theme/redbasic/css/style.css | 8 -------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/view/css/conversation.css b/view/css/conversation.css index 6fbc86df6..ae4e48315 100644 --- a/view/css/conversation.css +++ b/view/css/conversation.css @@ -82,7 +82,7 @@ .wall-item-info { display: block; float: left; - margin-right: 20px; + margin-right: 10px; } .wallwall .wwto { @@ -272,7 +272,7 @@ } .comment-edit-photo { - margin: 10px 20px 10px 10px; + margin: 10px; float: left; } diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 321baecf0..f1bfbd711 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -2239,18 +2239,10 @@ blockquote { margin-left: 24px; } - .wall-item-info { - margin-right: 10px; - } - .hide-comments-outer { margin-left: 24px; } - .comment-edit-photo { - margin: 10px; - } - .wall-item-photo { width: 48px !important; height: 48px !important;