aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-12-02 23:55:57 -0800
committerfriendica <info@friendica.com>2013-12-02 23:55:57 -0800
commit9f2efb0291e18ed9c042e8c018b8481c69179f26 (patch)
tree0d6ace92ffa0105dae31fbe0de3797a1d1148cdd
parent061725b97a1086a89a5542005b6b6e58d38437ff (diff)
downloadvolse-hubzilla-9f2efb0291e18ed9c042e8c018b8481c69179f26.tar.gz
volse-hubzilla-9f2efb0291e18ed9c042e8c018b8481c69179f26.tar.bz2
volse-hubzilla-9f2efb0291e18ed9c042e8c018b8481c69179f26.zip
ensure that every imported channel has a primary hubloc
-rw-r--r--include/zot.php16
-rw-r--r--util/wp/post_to_red/post_to_red.php2
-rw-r--r--view/css/mod_connections.css2
3 files changed, 18 insertions, 2 deletions
diff --git a/include/zot.php b/include/zot.php
index 9777f7ae4..124fe7fd6 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -691,6 +691,16 @@ function import_xchan($arr,$ud_flags = 1) {
dbesc($xchan_hash)
);
+ // See if a primary is specified
+
+ $has_primary = false;
+ foreach($arr['locations'] as $location) {
+ if($location['primary']) {
+ $has_primary = true;
+ break;
+ }
+ }
+
foreach($arr['locations'] as $location) {
if(! rsa_verify($location['url'],base64url_decode($location['url_sig']),$arr['key'])) {
logger('import_xchan: Unable to verify site signature for ' . $location['url']);
@@ -698,6 +708,12 @@ function import_xchan($arr,$ud_flags = 1) {
continue;
}
+ // Ensure that they have one primary hub
+
+ if(! $has_primary)
+ $location['primary'] = true;
+
+
for($x = 0; $x < count($xisting); $x ++) {
if(($xisting[$x]['hubloc_url'] === $location['url']) && ($xisting[$x]['hubloc_sitekey'] === $location['sitekey'])) {
$xisting[$x]['updated'] = true;
diff --git a/util/wp/post_to_red/post_to_red.php b/util/wp/post_to_red/post_to_red.php
index 11b1b48f7..43e24283c 100644
--- a/util/wp/post_to_red/post_to_red.php
+++ b/util/wp/post_to_red/post_to_red.php
@@ -356,7 +356,7 @@ function red_comment($args) {
$comment['comment_author_email'] = '';
if ( isset($content_struct['author_email']) )
- $comment['comment_author_email'] = $content_struct['author_email'];
+ $comment['comment_author_email'] = 'zot:' . $content_struct['author_email'];
$comment['comment_author_url'] = '';
if ( isset($content_struct['author_url']) )
diff --git a/view/css/mod_connections.css b/view/css/mod_connections.css
index c2f6eeff0..978d81bc1 100644
--- a/view/css/mod_connections.css
+++ b/view/css/mod_connections.css
@@ -3,7 +3,7 @@
color: #000;
}
.abook-them {
- margin-left: 225px;
+ margin-left: 375px;
margin-bottom: 15px;
}
.abook-me {