Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
005d8e98
Commit
005d8e98
authored
11 years ago
by
Georg Ehrke
Browse files
Options
Downloads
Patches
Plain Diff
update images.php
parent
62411965
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/preview/images.php
+12
-3
12 additions, 3 deletions
lib/preview/images.php
with
12 additions
and
3 deletions
lib/preview/images.php
+
12
−
3
View file @
005d8e98
...
...
@@ -13,11 +13,20 @@ class OC_Preview_Image extends OC_Preview_Provider{
}
public
function
getThumbnail
(
$path
,
$maxX
,
$maxY
,
$scalingup
,
$fileview
)
{
//new image object
$image
=
new
\OC_Image
(
$fileview
->
fopen
(
$path
,
'r'
));
//get fileinfo
$fileinfo
=
$fileview
->
getFileInfo
(
$path
);
//check if file is encrypted
if
(
$fileinfo
[
'encrypted'
]
===
true
){
$image
=
new
\OC_Image
(
$fileview
->
fopen
(
$path
,
'r'
));
}
else
{
$image
=
new
\OC_Image
();
$image
->
loadFromFile
(
$fileview
->
getLocalFile
(
$path
));
}
//check if image object is valid
if
(
!
$image
->
valid
())
return
false
;
return
$image
;
}
}
...
...
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