aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-02-10 20:09:32 -0800
committerfriendica <info@friendica.com>2013-02-10 20:09:32 -0800
commit127f5a447def2abc26c3beb62446fcabd5c11d0f (patch)
treebc9cdcae0c499c09bf5df6f6a3afff65b5723b23
parent32d07c3df72ad12dae62f9d5f5d2a3f3c8f4ed7d (diff)
downloadvolse-hubzilla-127f5a447def2abc26c3beb62446fcabd5c11d0f.tar.gz
volse-hubzilla-127f5a447def2abc26c3beb62446fcabd5c11d0f.tar.bz2
volse-hubzilla-127f5a447def2abc26c3beb62446fcabd5c11d0f.zip
debug import_profile_photo
-rw-r--r--include/Photo.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/Photo.php b/include/Photo.php
index 3eccbb5fb..3ce531c44 100644
--- a/include/Photo.php
+++ b/include/Photo.php
@@ -656,7 +656,9 @@ function import_profile_photo($photo,$xchan) {
$a = get_app();
- $r = q("select `resource_id` from photo where xchan = '%s' and `scale` = 4 limit 1",
+ logger('import_profile_photo: updating channel photo from ' . $photo . ' for ' . $xchan, LOGGER_DEBUG);
+
+ $r = q("select resource_id from photo where xchan = '%s' and scale = 4 limit 1",
dbesc($xchan)
);
if($r) {
@@ -668,6 +670,7 @@ function import_profile_photo($photo,$xchan) {
$photo_failure = false;
+
$filename = basename($photo);
$img_str = fetch_url($photo,true);
@@ -700,9 +703,10 @@ function import_profile_photo($photo,$xchan) {
$thumb = $a->get_baseurl() . '/photo/' . $hash . '-5';
$micro = $a->get_baseurl() . '/photo/' . $hash . '-6';
}
- else
+ else {
+ logger('import_profile_photo: invalid image from ' . $photo);
$photo_failure = true;
-
+ }
if($photo_failure) {
$photo = $a->get_baseurl() . '/images/person-175.jpg';
$thumb = $a->get_baseurl() . '/images/person-80.jpg';