Implement import profile picture from Gravatar

Summary: Add a field where you can put the gravatar email address to pull an image for the profile picture from

Test Plan: Tried uploading a file, replacing with default, and various combinations and they all still work.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2105

Differential Revision: https://secure.phabricator.com/D4809
This commit is contained in:
Brennan Taylor
2013-02-04 15:28:09 -08:00
committed by epriestley
parent 22d5eee82a
commit 1322e9eda2
3 changed files with 52 additions and 47 deletions

View File

@@ -19,21 +19,6 @@ final class PhabricatorFileImageMacro extends PhabricatorFileDAO
PhabricatorPHIDConstants::PHID_TYPE_MCRO);
}
static public function newFromImageURI($uri, $file_name, $image_macro_name) {
$file = PhabricatorFile::newFromFileDownload($uri, $file_name);
if (!$file) {
return null;
}
$image_macro = new PhabricatorFileImageMacro();
$image_macro->setName($image_macro_name);
$image_macro->setFilePHID($file->getPHID());
$image_macro->save();
return $image_macro;
}
public function isAutomaticallySubscribed($phid) {
return false;
}