]> git.mxchange.org Git - friendica.git/blobdiff - include/items.php
Merge pull request #7078 from nupplaphil/task/mod_fetch
[friendica.git] / include / items.php
index 52d37d621c37835afcb3d6381aff91102aadabfc..a28e19a05a2cb11b9f3c8eeae17101dbb3f51c3c 100644 (file)
@@ -24,7 +24,8 @@ use Friendica\Util\ParseUrl;
 use Friendica\Util\Strings;
 use Friendica\Util\Temporal;
 
-require_once 'mod/share.php';
+require_once __DIR__ . '/../mod/share.php';
+
 function add_page_info_data(array $data, $no_photos = false)
 {
        Hook::callAll('page_info_data', $data);
@@ -247,30 +248,21 @@ function add_page_info_to_body($body, $texturl = false, $no_photos = false)
  * @param array $importer
  * @param array $contact
  * @param       $hub
- * @param int   $datedir
- * @param int   $pass
  * @throws ImagickException
  * @throws \Friendica\Network\HTTPException\InternalServerErrorException
  */
-function consume_feed($xml, array $importer, array $contact, &$hub, $datedir = 0, $pass = 0)
+function consume_feed($xml, array $importer, array $contact, &$hub)
 {
        if ($contact['network'] === Protocol::OSTATUS) {
-               if ($pass < 2) {
-                       // Test - remove before flight
-                       //$tempfile = tempnam(get_temppath(), "ostatus2");
-                       //file_put_contents($tempfile, $xml);
-                       Logger::log("Consume OStatus messages ", Logger::DEBUG);
-                       OStatus::import($xml, $importer, $contact, $hub);
-               }
+               Logger::log("Consume OStatus messages ", Logger::DEBUG);
+               OStatus::import($xml, $importer, $contact, $hub);
 
                return;
        }
 
        if ($contact['network'] === Protocol::FEED) {
-               if ($pass < 2) {
-                       Logger::log("Consume feeds", Logger::DEBUG);
-                       Feed::import($xml, $importer, $contact, $hub);
-               }
+               Logger::log("Consume feeds", Logger::DEBUG);
+               Feed::import($xml, $importer, $contact, $hub);
 
                return;
        }