fixing style, var name & PHPDoc

This commit is contained in:
Thomas Müller 2013-09-04 21:22:36 +02:00
parent fca5db748b
commit 68dce9dde5
2 changed files with 5 additions and 3 deletions

View File

@ -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")) ));
}
}

View File

@ -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);