Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
68dce9dd
Commit
68dce9dd
authored
11 years ago
by
Thomas Müller
Browse files
Options
Downloads
Patches
Plain Diff
fixing style, var name & PHPDoc
parent
fca5db74
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/avatar/controller.php
+4
-2
4 additions, 2 deletions
core/avatar/controller.php
lib/avatar.php
+1
-1
1 addition, 1 deletion
lib/avatar.php
with
5 additions
and
3 deletions
core/avatar/controller.php
+
4
−
2
View file @
68dce9dd
...
@@ -72,12 +72,14 @@ class OC_Core_Avatar_Controller {
...
@@ -72,12 +72,14 @@ class OC_Core_Avatar_Controller {
}
else
{
}
else
{
$l
=
new
\OC_L10n
(
'core'
);
$l
=
new
\OC_L10n
(
'core'
);
$type
=
substr
(
$image
->
mimeType
(),
-
3
);
$type
=
substr
(
$image
->
mimeType
(),
-
3
);
if
(
$type
===
'peg'
)
{
$type
=
'jpg'
;
}
if
(
$type
===
'peg'
)
{
$type
=
'jpg'
;
}
if
(
$type
!==
'jpg'
&&
$type
!==
'png'
)
{
if
(
$type
!==
'jpg'
&&
$type
!==
'png'
)
{
\OC_JSON
::
error
(
array
(
"data"
=>
array
(
"message"
=>
$l
->
t
(
"Unknown filetype"
))
));
\OC_JSON
::
error
(
array
(
"data"
=>
array
(
"message"
=>
$l
->
t
(
"Unknown filetype"
))
));
}
}
if
(
!
$im
g
->
valid
())
{
if
(
!
$im
age
->
valid
())
{
\OC_JSON
::
error
(
array
(
"data"
=>
array
(
"message"
=>
$l
->
t
(
"Invalid image"
))
));
\OC_JSON
::
error
(
array
(
"data"
=>
array
(
"message"
=>
$l
->
t
(
"Invalid image"
))
));
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
lib/avatar.php
+
1
−
1
View file @
68dce9dd
...
@@ -15,7 +15,7 @@ class OC_Avatar {
...
@@ -15,7 +15,7 @@ class OC_Avatar {
* @brief get the users avatar
* @brief get the users avatar
* @param $user string which user to get the avatar for
* @param $user string which user to get the avatar for
* @param $size integer size in px of the avatar, defaults to 64
* @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
)
{
public
function
get
(
$user
,
$size
=
64
)
{
$view
=
new
\OC\Files\View
(
'/'
.
$user
);
$view
=
new
\OC\Files\View
(
'/'
.
$user
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment