diff --git a/mod/pubsites.php b/mod/pubsites.php
index c31bbcf97..ddd7baf92 100644
--- a/mod/pubsites.php
+++ b/mod/pubsites.php
@@ -22,10 +22,13 @@ function pubsites_content(&$a) {
if($ret['success']) {
$j = json_decode($ret['body'],true);
if($j) {
- $o .= '
| ' . t('Site URL') . ' | ' . t('Access Type') . ' | ' . t('Registration Policy') . ' | ' . t('Location') . ' |
';
+ $rate_meta = ((local_channel()) ? '' . t('Rate this hub') . ' | ' . t('View hub ratings') . ' | ' : '');
+ $o .= '| ' . t('Site URL') . ' | ' . t('Access Type') . ' | ' . t('Registration Policy') . ' | ' . t('Location') . ' | ' . $rate_meta . '
';
if($j['sites']) {
foreach($j['sites'] as $jj) {
- $o .= '| ' . '' . $jj['url'] . '' . ' | ' . $jj['access'] . ' | ' . $jj['register'] . ' | ' . $jj['location'] . ' |
';
+ $host = strtolower(substr($jj['url'],strpos($jj['url'],'://')+3));
+ $rate_links = ((local_channel()) ? ' ' . t('Rate') . ' | ' . t('View ratings') . ' | ' : '');
+ $o .= '| ' . '' . $jj['url'] . '' . ' | ' . $jj['access'] . ' | ' . $jj['register'] . ' | ' . $jj['location'] . ' | ' . $rate_links . '
';
}
}
diff --git a/mod/rate.php b/mod/rate.php
index 2555b36a2..a3a36b4a9 100644
--- a/mod/rate.php
+++ b/mod/rate.php
@@ -25,8 +25,10 @@ function rate_init(&$a) {
$r = q("select * from site where site_url like '%s' ",
dbesc('%' . $target)
);
- if($r)
- $a->data['site'] = strtolower($r[0]);
+ if($r) {
+ $a->data['site'] = $r[0];
+ $a->data['site']['site_url'] = strtolower($r[0]['site_url']);
+ }
}
}
diff --git a/version.inc b/version.inc
index cdb667e3f..99ae61ca4 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2015-02-15.945
+2015-02-16.946