fixing style, var name & PHPDoc
This commit is contained in:
parent
fca5db748b
commit
68dce9dde5
|
@ -72,12 +72,14 @@ class OC_Core_Avatar_Controller {
|
|||
} else {
|
||||
$l = new \OC_L10n('core');
|
||||
$type = substr($image->mimeType(), -3);
|
||||
if ($type === 'peg') { $type = 'jpg'; }
|
||||
if ($type === 'peg') {
|
||||
$type = 'jpg';
|
||||
}
|
||||
if ($type !== 'jpg' && $type !== 'png') {
|
||||
\OC_JSON::error(array("data" => array("message" => $l->t("Unknown filetype")) ));
|
||||
}
|
||||
|
||||
if (!$img->valid()) {
|
||||
if (!$image->valid()) {
|
||||
\OC_JSON::error(array("data" => array("message" => $l->t("Invalid image")) ));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ class OC_Avatar {
|
|||
* @brief get the users avatar
|
||||
* @param $user string which user to get the avatar for
|
||||
* @param $size integer size in px of the avatar, defaults to 64
|
||||
* @return mixed \OC_Image containing the avatar or false if there's no image
|
||||
* @return boolean|\OC_Image containing the avatar or false if there's no image
|
||||
*/
|
||||
public function get ($user, $size = 64) {
|
||||
$view = new \OC\Files\View('/'.$user);
|
||||
|
|
Loading…
Reference in New Issue