aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-08-13 02:29:10 -0700
committerfriendica <info@friendica.com>2013-08-13 02:29:10 -0700
commitd6c6a2b144ad1c619cef70310bad7e0cdc920e77 (patch)
tree0936cc0ffdb9c2c73de52bd9aa30c1fcabe73390
parentb9a8b73392afc6e460073ac6305da24623de5b49 (diff)
downloadvolse-hubzilla-d6c6a2b144ad1c619cef70310bad7e0cdc920e77.tar.gz
volse-hubzilla-d6c6a2b144ad1c619cef70310bad7e0cdc920e77.tar.bz2
volse-hubzilla-d6c6a2b144ad1c619cef70310bad7e0cdc920e77.zip
debugging issue #58 - seems to work but needs (more) theming
-rwxr-xr-xboot.php2
-rw-r--r--include/Contact.php13
-rw-r--r--view/theme/redbasic/css/style.css12
-rwxr-xr-xview/tpl/profile_vcard.tpl2
4 files changed, 24 insertions, 5 deletions
diff --git a/boot.php b/boot.php
index b59b7024c..d7f2b437a 100755
--- a/boot.php
+++ b/boot.php
@@ -1625,7 +1625,7 @@ function profile_sidebar($profile, $block = 0) {
require_once('include/Contact.php');
- $connect_url = rconnect_url($profile['uid'],get_observer_xchan());
+ $connect_url = rconnect_url($profile['uid'],get_observer_hash());
$connect = (($connect_url) ? t('Connect') : '');
if($connect_url)
diff --git a/include/Contact.php b/include/Contact.php
index 6b0ffe4f7..992ed27e2 100644
--- a/include/Contact.php
+++ b/include/Contact.php
@@ -3,20 +3,27 @@
function rconnect_url($channel_id,$xchan) {
+
if(! $xchan)
return '';
- $r = q("select abook_id from abook where abook_channel_id = %d and abook_xchan = '%s' limit 1",
+
+ $r = q("select abook_id from abook where abook_channel = %d and abook_xchan = '%s' limit 1",
intval($channel_id),
dbesc($xchan)
);
+
if($r)
return '';
- $r = q("select hubloc_url from hubloc where hubloc_hash = '%s' and (hubloc_flags & HUBLOC_FLAGS_PRIMARY) limit 1",
- dbesc($xchan)
+
+ $r = q("select hubloc_url from hubloc where hubloc_hash = '%s' and ( hubloc_flags & %d ) limit 1",
+ dbesc($xchan),
+ intval(HUBLOC_FLAGS_PRIMARY)
);
+
if($r)
return $r[0]['hubloc_url'];
return '';
+
}
function abook_connections($channel_id, $sql_conditions = '') {
diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css
index 9687443df..abfeb44bc 100644
--- a/view/theme/redbasic/css/style.css
+++ b/view/theme/redbasic/css/style.css
@@ -2091,6 +2091,18 @@ aside input[type='text'] {
margin-right: 50px;
}
+.rconnect {
+ display: block;
+ color: #FFFFFF;
+ margin-top: 15px;
+ background-color: #FF6666;
+ -webkit-border-radius: $radiuspx ;
+ -moz-border-radius: $radiuspx;
+ border-radius: $radiuspx;
+ padding: 5px;
+ font-weight: bold;
+}
+
#dfrn-request-networks {
margin-bottom: 30px;
diff --git a/view/tpl/profile_vcard.tpl b/view/tpl/profile_vcard.tpl
index 634c48e03..5262adf61 100755
--- a/view/tpl/profile_vcard.tpl
+++ b/view/tpl/profile_vcard.tpl
@@ -46,7 +46,7 @@
{{if $connect}}
-<a href="{{$connect_url}}" class="rconnect">$connect</a>
+<a href="{{$connect_url}}" class="rconnect">{{$connect}}</a>
{{/if}}
</div>