aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-10-26 19:01:16 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-10-26 19:01:16 -0700
commiteb5e6aae7273fef06a06f983fe78aaad737aa729 (patch)
tree355b1518f1553c970d3cbad7b8e923a66b64dc9c /mod
parentd453560be9142067391fc0213d5fd5066667e54f (diff)
downloadvolse-hubzilla-eb5e6aae7273fef06a06f983fe78aaad737aa729.tar.gz
volse-hubzilla-eb5e6aae7273fef06a06f983fe78aaad737aa729.tar.bz2
volse-hubzilla-eb5e6aae7273fef06a06f983fe78aaad737aa729.zip
a few more fsw tweaks
Diffstat (limited to 'mod')
-rw-r--r--mod/contacts.php3
-rw-r--r--mod/salmon.php11
2 files changed, 11 insertions, 3 deletions
diff --git a/mod/contacts.php b/mod/contacts.php
index 936063715..beb1f1ecb 100644
--- a/mod/contacts.php
+++ b/mod/contacts.php
@@ -196,10 +196,11 @@ function contacts_content(&$a) {
'$last_update' => (($r[0]['last-update'] == '0000-00-00 00:00:00')
? t('Never')
: datetime_convert('UTC',date_default_timezone_get(),$r[0]['last-update'],'D, j M Y, g:i A')),
- '$profile_select' => contact_profile_assign($r[0]['profile-id']),
+ '$profile_select' => contact_profile_assign($r[0]['profile-id'],(($r[0]['network'] !== 'dfrn') ? true : false)),
'$contact_id' => $r[0]['id'],
'$block_text' => (($r[0]['blocked']) ? t('Unblock this contact') : t('Block this contact') ),
'$ignore_text' => (($r[0]['readonly']) ? t('Unignore this contact') : t('Ignore this contact') ),
+ '$insecure' => (($r[0]['network'] === 'dfrn') ? '' : load_view_file('view/insecure_net.tpl')),
'$blocked' => (($r[0]['blocked']) ? '<div id="block-message">' . t('Currently blocked') . '</div>' : ''),
'$ignored' => (($r[0]['readonly']) ? '<div id="ignore-message">' . t('Currently ignored') . '</div>' : ''),
'$rating' => contact_reputation($r[0]['rating']),
diff --git a/mod/salmon.php b/mod/salmon.php
index 74377f9e9..54353132a 100644
--- a/mod/salmon.php
+++ b/mod/salmon.php
@@ -195,8 +195,8 @@ function salmon_post(&$a) {
*
*/
- $r = q("SELECT * FROM `contact` WHERE `network` = 'stat' AND ( `url` = '%s' OR `lrdd` = '%s') AND `uid` = %d
- AND `readonly` = 0 LIMIT 1",
+ $r = q("SELECT * FROM `contact` WHERE `network` = 'stat' AND ( `url` = '%s' OR `lrdd` = '%s')
+ AND `uid` = %d LIMIT 1",
dbesc($author_link),
dbesc($author_link),
intval($importer['uid'])
@@ -206,6 +206,13 @@ function salmon_post(&$a) {
file_put_contents('salmon.out',"\n" . 'Author unknown to us.' . "\n", FILE_APPEND);
}
+ if((count($r)) && ($r[0]['readonly'])) {
+ if($debugging)
+ file_put_contents('salmon.out',"\n" . 'Ignoring this author.' . "\n", FILE_APPEND);
+ salmon_return(200);
+ // NOTREACHED
+ }
+
require_once('include/items.php');