aboutsummaryrefslogtreecommitdiffstats
path: root/include/photos.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-08-12 18:08:31 -0700
committerfriendica <info@friendica.com>2014-08-12 18:08:31 -0700
commit50da5bd3896f7dfceec6a60cb27976fbd6c2cea0 (patch)
treeb42f4930c6c8f2bbfbe04ec1d519c49f826d3b2e /include/photos.php
parent94ed44e76ebb6e1ed197411be16aa4d85f454b0a (diff)
downloadvolse-hubzilla-50da5bd3896f7dfceec6a60cb27976fbd6c2cea0.tar.gz
volse-hubzilla-50da5bd3896f7dfceec6a60cb27976fbd6c2cea0.tar.bz2
volse-hubzilla-50da5bd3896f7dfceec6a60cb27976fbd6c2cea0.zip
Friendica photo import tool. This will bring in all your photos from the chosen Friendica account and import them into Red. Note that profile photos will also be imported, but will not be scaled for profiles, nor will they be attached to any profiles. They will appear however in your Profile Photos album. Photos that had any access restrictions in Friendica will be made private to only you. Comments and likes, captions, and tags are not transferred, only the actual photos. You will only be able to do this once. If something goes wrong but any photos were imported, a pconfig called frphotos.complete will be set and you'll have to remove it to start over. If you should remove this to start over, we also check each photo and will not over-write a photo you already brought over.
Diffstat (limited to 'include/photos.php')
-rw-r--r--include/photos.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/photos.php b/include/photos.php
index 060a0671d..8bedfd15d 100644
--- a/include/photos.php
+++ b/include/photos.php
@@ -5,7 +5,7 @@ require_once('include/items.php');
require_once('include/photo/photo_driver.php');
-function photo_upload($channel, $observer, $args, $local = null) {
+function photo_upload($channel, $observer, $args) {
$ret = array('success' => false);
$channel_id = $channel['channel_id'];
@@ -62,17 +62,17 @@ function photo_upload($channel, $observer, $args, $local = null) {
$str_contact_deny = perms2str(((is_array($args['contact_deny'])) ? $args['contact_deny'] : explode(',',$args['contact_deny'])));
- if($local) {
+ if($args['data']) {
// allow an import from a binary string representing the image.
// This bypasses the upload step and max size limit checking
- $imagedata = $local;
+ $imagedata = $args['data'];
$filename = $args['filename'];
$filesize = strlen($imagedata);
// this is going to be deleted if it exists
$src = '/tmp/deletemenow';
- $filetype = $args['filetype'];
+ $type = $args['type'];
}
else {
$f = array('src' => '', 'filename' => '', 'filesize' => 0, 'type' => '');
@@ -158,7 +158,7 @@ function photo_upload($channel, $observer, $args, $local = null) {
$smallest = 0;
- $photo_hash = photo_new_resource();
+ $photo_hash = (($args['resource_id']) ? $args['resource_id'] : photo_new_resource());
$visitor = '';
if($channel['channel_hash'] !== $observer['xchan_hash'])