aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-05-02 20:17:47 -0700
committerzotlabs <mike@macgirvin.com>2017-05-02 20:17:47 -0700
commitb2d2dcc7fe7af1b61e2636ed7e12c805fe67f49b (patch)
treeb289ace6e133a1fe3925e169380a291c8b97bf1f /include/items.php
parent7acb0685904bd66cd89ef15e181148d31c6813dc (diff)
downloadvolse-hubzilla-b2d2dcc7fe7af1b61e2636ed7e12c805fe67f49b.tar.gz
volse-hubzilla-b2d2dcc7fe7af1b61e2636ed7e12c805fe67f49b.tar.bz2
volse-hubzilla-b2d2dcc7fe7af1b61e2636ed7e12c805fe67f49b.zip
more code refactoring to put external protocol dependencies in plugins.
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php36
1 files changed, 5 insertions, 31 deletions
diff --git a/include/items.php b/include/items.php
index 30aa30048..a3f423836 100755
--- a/include/items.php
+++ b/include/items.php
@@ -802,37 +802,6 @@ function import_author_xchan($x) {
}
/**
- * @brief Imports an author from Diaspora.
- *
- * @param array $x an associative array with
- * * \e string \b address
- * @return boolean|string false on error, otherwise xchan_hash of the new entry
- */
-function import_author_diaspora($x) {
- if(! $x['address'])
- return false;
-
- $r = q("select * from xchan where xchan_addr = '%s' limit 1",
- dbesc($x['address'])
- );
- if($r) {
- logger('in_cache: ' . $x['address'], LOGGER_DATA);
- return $r[0]['xchan_hash'];
- }
-
- if(discover_by_webbie($x['address'])) {
- $r = q("select xchan_hash from xchan where xchan_addr = '%s' limit 1",
- dbesc($x['address'])
- );
- if($r)
- return $r[0]['xchan_hash'];
- }
-
- return false;
-
-}
-
-/**
* @brief Imports an author from a RSS feed.
*
* @param array $x an associative array with
@@ -889,6 +858,11 @@ function import_author_rss($x) {
function import_author_unknown($x) {
+ $arr = [ 'author' => $x, 'result' => false ];
+ call_hooks('import_author', $arr);
+ if($arr['result'])
+ return $arr['result'];
+
if(! $x['url'])
return false;