if (x($photo['resource-id'])) {
$hash = $photo['resource-id'];
} else {
- $hash = photo_new_resource();
+ $hash = self::newResource();
}
$photo_failure = false;
$key = "photo_albums:".$uid.":".local_user().":".remote_user();
Cache::set($key, null, CACHE_DAY);
}
+
+ /**
+ * Generate a unique photo ID.
+ *
+ * @return string
+ */
+ public static function newResource()
+ {
+ return get_guid(32, false);
+ }
}