diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-09-01 22:03:10 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-09-01 22:03:10 -0700 |
commit | 6cc60ba477c1634b2ba6d78495d35cbf306988e1 (patch) | |
tree | 5ffbc602bc3d6c3fe412f8b80aa69636e42cc1e3 /include | |
parent | c5578d79643bbdde8f49baae2fa6890fc9bf9a53 (diff) | |
download | volse-hubzilla-6cc60ba477c1634b2ba6d78495d35cbf306988e1.tar.gz volse-hubzilla-6cc60ba477c1634b2ba6d78495d35cbf306988e1.tar.bz2 volse-hubzilla-6cc60ba477c1634b2ba6d78495d35cbf306988e1.zip |
initial work on obj import, rename import_profile_photo to import_xchan_photo to more accurately state its purpose.
Diffstat (limited to 'include')
-rw-r--r-- | include/apps.php | 4 | ||||
-rw-r--r-- | include/hubloc.php | 2 | ||||
-rwxr-xr-x | include/items.php | 4 | ||||
-rw-r--r-- | include/network.php | 4 | ||||
-rw-r--r-- | include/photo/photo_driver.php | 6 | ||||
-rw-r--r-- | include/poller.php | 2 | ||||
-rw-r--r-- | include/zot.php | 2 |
7 files changed, 12 insertions, 12 deletions
diff --git a/include/apps.php b/include/apps.php index 504641102..7943bc927 100644 --- a/include/apps.php +++ b/include/apps.php @@ -325,7 +325,7 @@ function app_store($arr) { return $ret; if($arr['photo'] && ! strstr($arr['photo'],z_root())) { - $x = import_profile_photo($arr['photo'],get_observer_hash(),true); + $x = import_xchan_photo($arr['photo'],get_observer_hash(),true); $arr['photo'] = $x[1]; } @@ -378,7 +378,7 @@ function app_update($arr) { return $ret; if($arr['photo'] && ! strstr($arr['photo'],z_root())) { - $x = import_profile_photo($arr['photo'],get_observer_hash(),true); + $x = import_xchan_photo($arr['photo'],get_observer_hash(),true); $arr['photo'] = $x[1]; } diff --git a/include/hubloc.php b/include/hubloc.php index 515223f53..396f4ddfa 100644 --- a/include/hubloc.php +++ b/include/hubloc.php @@ -230,7 +230,7 @@ function xchan_store($arr) { if(! $r) return $r; - $photos = import_profile_photo($arr['photo'],$arr['hash']); + $photos = import_xchan_photo($arr['photo'],$arr['hash']); $r = q("update xchan set xchan_photo_date = '%s', xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s', xchan_photo_mimetype = '%s' where xchan_hash = '%s'", dbesc(datetime_convert()), dbesc($photos[0]), diff --git a/include/items.php b/include/items.php index 2701c3fa2..9807831e3 100755 --- a/include/items.php +++ b/include/items.php @@ -1127,7 +1127,7 @@ function import_author_rss($x) { if($r && $x['photo']) { - $photos = import_profile_photo($x['photo']['src'],$x['url']); + $photos = import_xchan_photo($x['photo']['src'],$x['url']); if($photos) { /** @bug $arr is undefined in this SQL query */ @@ -1172,7 +1172,7 @@ function import_author_unknown($x) { ); if($r && $x['photo']) { - $photos = import_profile_photo($x['photo']['src'],$x['url']); + $photos = import_xchan_photo($x['photo']['src'],$x['url']); if($photos) { /** @bug $arr is undefined in this SQL query */ diff --git a/include/network.php b/include/network.php index ef92e0132..75729d6e4 100644 --- a/include/network.php +++ b/include/network.php @@ -1035,7 +1035,7 @@ function discover_by_url($url,$arr = null) { dbesc(datetime_convert()) ); - $photos = import_profile_photo($photo,$guid); + $photos = import_xchan_photo($photo,$guid); $r = q("update xchan set xchan_photo_date = '%s', xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s', xchan_photo_mimetype = '%s' where xchan_hash = '%s'", dbesc(datetime_convert()), dbesc($photos[0]), @@ -1192,7 +1192,7 @@ function discover_by_webbie($webbie) { dbescdate(datetime_convert()) ); } - $photos = import_profile_photo($vcard['photo'],$addr); + $photos = import_xchan_photo($vcard['photo'],$addr); $r = q("update xchan set xchan_photo_date = '%s', xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s', xchan_photo_mimetype = '%s' where xchan_hash = '%s'", dbescdate(datetime_convert('UTC','UTC',$arr['photo_updated'])), dbesc($photos[0]), diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php index 553e77ed1..2a7d1ae01 100644 --- a/include/photo/photo_driver.php +++ b/include/photo/photo_driver.php @@ -557,14 +557,14 @@ function guess_image_type($filename, $headers = '') { } -function import_profile_photo($photo,$xchan,$thing = false) { +function import_xchan_photo($photo,$xchan,$thing = false) { $a = get_app(); $flags = (($thing) ? PHOTO_THING : PHOTO_XCHAN); $album = (($thing) ? 'Things' : 'Contact Photos'); - logger('import_profile_photo: updating channel photo from ' . $photo . ' for ' . $xchan, LOGGER_DEBUG); + logger('import_xchan_photo: updating channel photo from ' . $photo . ' for ' . $xchan, LOGGER_DEBUG); if($thing) $hash = photo_new_resource(); @@ -650,7 +650,7 @@ function import_profile_photo($photo,$xchan,$thing = false) { $micro = $a->get_baseurl() . '/photo/' . $hash . '-6'; } else { - logger('import_profile_photo: invalid image from ' . $photo); + logger('import_xchan_photo: invalid image from ' . $photo); $photo_failure = true; } if($photo_failure) { diff --git a/include/poller.php b/include/poller.php index 030394486..a1b25bf41 100644 --- a/include/poller.php +++ b/include/poller.php @@ -235,7 +235,7 @@ function poller_run($argv, $argc){ if($r) { require_once('include/photo/photo_driver.php'); foreach($r as $rr) { - $photos = import_profile_photo($rr['xchan_photo_l'],$rr['xchan_hash']); + $photos = import_xchan_photo($rr['xchan_photo_l'],$rr['xchan_hash']); $x = q("update xchan set xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s', xchan_photo_mimetype = '%s' where xchan_hash = '%s'", dbesc($photos[0]), diff --git a/include/zot.php b/include/zot.php index 4cc22ac12..16336ad54 100644 --- a/include/zot.php +++ b/include/zot.php @@ -801,7 +801,7 @@ function import_xchan($arr,$ud_flags = UPDATE_FLAGS_UPDATED, $ud_arr = null) { ); } } else { - $photos = import_profile_photo($arr['photo'], $xchan_hash); + $photos = import_xchan_photo($arr['photo'], $xchan_hash); } if ($photos) { if ($photos[4]) { |