]> git.mxchange.org Git - friendica-addons.git/commitdiff
Issue 4814: Unify the temp path location
authorMichael <heluecht@pirati.ca>
Fri, 10 Aug 2018 19:52:09 +0000 (19:52 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 10 Aug 2018 19:52:09 +0000 (19:52 +0000)
diaspora/Diaspora_Connection.php
diaspora/diasphp.php
mailstream/phpmailer/class.phpmailer.php

index 675f15003a1eadbe53ec7a1cf09961b348b4cdd5..8b8811ece5352c0f661aae6d0dc24b5ccaaeb618 100644 (file)
@@ -29,7 +29,7 @@ class Diaspora_Connection {
                        $this->setPassword($password);
                }
 
-               $this->cookiejar = tempnam(sys_get_temp_dir(), 'cookies');
+               $this->cookiejar = tempnam(get_temppath(), 'cookies');
                return $this;
        }
 
index 6ed0c8ce5319f87af36427ecff953f3cd64011b0..f48933a62115e32b85b636732bcdba06a2279c36 100644 (file)
@@ -11,7 +11,7 @@ class Diasphp {
                $this->token_regex = '/content="(.*?)" name="csrf-token/';
 
                $this->pod = $pod;
-               $this->cookiejar = tempnam(sys_get_temp_dir(), 'cookies');
+               $this->cookiejar = tempnam(get_temppath(), 'cookies');
        }
 
        function __destruct() {
index c2611e8603eaab67c155c05355325292b1289cc3..46ff4360c259b75e2935b37ef9866c6ddd78e639 100644 (file)
@@ -2350,11 +2350,11 @@ class PHPMailer
                     throw new phpmailerException($this->lang('extension_missing') . 'openssl');
                 }
                 // @TODO would be nice to use php://temp streams here, but need to wrap for PHP < 5.1
-                $file = tempnam(sys_get_temp_dir(), 'mail');
+                $file = tempnam(get_temppath(), 'mail');
                 if (false === file_put_contents($file, $body)) {
                     throw new phpmailerException($this->lang('signing') . ' Could not write temp file');
                 }
-                $signed = tempnam(sys_get_temp_dir(), 'signed');
+                $signed = tempnam(get_temppath(), 'signed');
                 //Workaround for PHP bug https://bugs.php.net/bug.php?id=69197
                 if (empty($this->sign_extracerts_file)) {
                     $sign = @openssl_pkcs7_sign(