]> git.mxchange.org Git - friendica.git/blobdiff - mod/dfrn_confirm.php
abstractify items, check photos for birthday paradox
[friendica.git] / mod / dfrn_confirm.php
index 44a6ad1473260e46af10ea170fa9e39c75379aab..1f0ebee1409a3b72bfa415db9c804bd91f8f5f65 100644 (file)
@@ -100,7 +100,7 @@ function dfrn_confirm_post(&$a) {
 
                                        $img->scaleImageSquare(175);
                                        
-                                       $hash = hash('md5',uniqid(mt_rand(),true));
+                                       $hash = photo_new_resource();
 
                                        $r = $img->store($local_uid, $dfrn_record, $hash, $filename, t('Contact Photos') , 4);
 
@@ -332,12 +332,13 @@ function dfrn_confirm_post(&$a) {
 
                                $img->scaleImageSquare(175);
                                        
-                               $hash = hash('md5',uniqid(mt_rand(),true));
+                               $hash = photo_new_resource();
 
                                $r = $img->store($uid, $contact_id, $hash, $filename, t('Contact Photos'), 4 );
 
                                if($r === false)
                                        $photo_failure = true;
+
                                $img->scaleImage(80);
 
                                $r = $img->store($uid, $contact_id, $hash, $filename, t('Contact Photos'), 5 );