]> git.mxchange.org Git - friendica-addons.git/blobdiff - diaspora/Diaspora_Connection.php
invidious/invidious.php aktualisiert
[friendica-addons.git] / diaspora / Diaspora_Connection.php
index 67bc63df0bff8c7786d34133f2a2a3df95ceb489..d8390d707b965a8bb29c59179e6229a4ad0ec97f 100644 (file)
@@ -1,4 +1,7 @@
 <?php
+
+use Friendica\Core\System;
+
 /**
  * Super-skeletal class to interact with Diaspora.
  *
@@ -29,7 +32,7 @@ class Diaspora_Connection {
                        $this->setPassword($password);
                }
 
-               $this->cookiejar = tempnam(get_temppath(), 'cookies');
+               $this->cookiejar = tempnam(System::getTempPath(), 'cookies');
                return $this;
        }
 
@@ -46,7 +49,11 @@ class Diaspora_Connection {
        public function setDiasporaID($id) {
                $parts = explode('@', $id);
                $this->user = $parts[0];
-               $this->host = $parts[1];
+               if (count($parts) > 1) {
+                       $this->host = $parts[1];
+               } else {
+                       $this->host = '';
+               }
        }
 
        public function getDiasporaID() {