aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-05-07 20:31:21 -0700
committerfriendica <info@friendica.com>2014-05-07 20:31:21 -0700
commite22e94cd9708406ef9a96c7ec4bb9216be630ec2 (patch)
treee6a03762e95e6ec492dffcd9c13cfa343a153ffe
parentb26edefe3e16ff7c7a315f08a241a9cd25fbb162 (diff)
downloadvolse-hubzilla-e22e94cd9708406ef9a96c7ec4bb9216be630ec2.tar.gz
volse-hubzilla-e22e94cd9708406ef9a96c7ec4bb9216be630ec2.tar.bz2
volse-hubzilla-e22e94cd9708406ef9a96c7ec4bb9216be630ec2.zip
ok *now* shred works with alternate config files
-rw-r--r--include/zot.php4
-rwxr-xr-xutil/shred/shred22
2 files changed, 16 insertions, 10 deletions
diff --git a/include/zot.php b/include/zot.php
index c919b0981..ea439a603 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -171,6 +171,10 @@ function zot_finger($webbie,$channel,$autofallback = true) {
return array('success' => false);
}
+ // potential issue here; the xchan_addr points to the primary hub.
+ // The webbie we were called with may not, so it might not be found
+ // unless we query for hubloc_addr instead of xchan_addr
+
$r = q("select xchan.*, hubloc.* from xchan
left join hubloc on xchan_hash = hubloc_hash
where xchan_addr = '%s' and (hubloc_flags & %d) limit 1",
diff --git a/util/shred/shred b/util/shred/shred
index 7a42a8d29..d6fa051c4 100755
--- a/util/shred/shred
+++ b/util/shred/shred
@@ -23,16 +23,6 @@
FCLI_RC="$HOME/.shred.rc"
-# Source FriendicaOAuth.sh
-OAuth_sh=$(which FriendicaOAuth.sh)
-(( $? != 0 )) && echo 'Unable to locate FriendicaOAuth.sh! Make sure it is in searching PATH.' && exit 1
-source "$OAuth_sh"
-
-# Source JSON.sh
-JSON_sh=$(which JSON.sh)
-(( $? != 0 )) && echo 'Unable to locate JSON.sh! Make sure it is in searching PATH.' && exit 1
-source "$JSON_sh"
-
usage () {
echo "usage: $0 options
@@ -122,6 +112,18 @@ load_config () {
# Source Config
[[ -f "$FCLI_RC" ]] && . "$FCLI_RC" || show_config_help 1
+
+ # Source FriendicaOAuth.sh
+ OAuth_sh=$(which FriendicaOAuth.sh)
+ (( $? != 0 )) && echo 'Unable to locate FriendicaOAuth.sh! Make sure it is in searching PATH.' && exit 1
+ source "$OAuth_sh"
+
+ # Source JSON.sh
+ JSON_sh=$(which JSON.sh)
+ (( $? != 0 )) && echo 'Unable to locate JSON.sh! Make sure it is in searching PATH.' && exit 1
+ source "$JSON_sh"
+
+
[[ "$oauth_consumer_key" == "" ]] && show_config_help 1
[[ "$oauth_consumer_secret" == "" ]] && show_config_help 1