Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

link to photo wrong when using usb_disk config option #8

Open
gordin123 opened this issue Apr 28, 2016 · 0 comments
Open

link to photo wrong when using usb_disk config option #8

gordin123 opened this issue Apr 28, 2016 · 0 comments

Comments

@gordin123
Copy link

gordin123 commented Apr 28, 2016

Due to a missing slash in carddav2fb.php:569 before "FRITZ" the URL to the contact image is wrong when using the usb_disk config option.

diff --git a/carddav2fb.php b/carddav2fb.php
index 86993f3..dc0b226 100644
--- a/carddav2fb.php
+++ b/carddav2fb.php
@@ -566,7 +566,7 @@ class CardDAV2FB
         unlink($photo_file . ".b64");

         // add contact photo to xml
-        $person->addChild("imageURL", $this->config['fritzbox_path'].$this->config['usb_disk']."FRITZ/fonpix/".basename($photo_file));
+        $person->addChild("imageURL", $this->config['fritzbox_path'].$this->config['usb_disk']."/FRITZ/fonpix/".basename($photo_file));

         print "  Added photo: " . basename($photo_file) . PHP_EOL;
       }

Side note: uploading the file works as in carddav2fb.php:634 the remote path is set correctly:
$remote_path = $this->config['usb_disk']."/FRITZ/fonpix";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant