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
a0243e03
Commit
a0243e03
authored
11 years ago
by
Robin Appelman
Browse files
Options
Downloads
Patches
Plain Diff
use ===
parent
1c1ede57
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/files/type/detection.php
+4
-4
4 additions, 4 deletions
lib/files/type/detection.php
with
4 additions
and
4 deletions
lib/files/type/detection.php
+
4
−
4
View file @
a0243e03
...
...
@@ -61,7 +61,7 @@ class Detection {
* @return string
*/
public
function
detect
(
$path
)
{
$isWrapped
=
(
strpos
(
$path
,
'://'
)
!==
false
)
and
(
substr
(
$path
,
0
,
7
)
==
'file://'
);
$isWrapped
=
(
strpos
(
$path
,
'://'
)
!==
false
)
and
(
substr
(
$path
,
0
,
7
)
==
=
'file://'
);
if
(
@
is_dir
(
$path
))
{
// directories are easy
...
...
@@ -70,7 +70,7 @@ class Detection {
$mimeType
=
$this
->
detectPath
(
$path
);
if
(
$mimeType
==
'application/octet-stream'
and
function_exists
(
'finfo_open'
)
if
(
$mimeType
==
=
'application/octet-stream'
and
function_exists
(
'finfo_open'
)
and
function_exists
(
'finfo_file'
)
and
$finfo
=
finfo_open
(
FILEINFO_MIME
)
)
{
$info
=
@
strtolower
(
finfo_file
(
$finfo
,
$path
));
...
...
@@ -79,11 +79,11 @@ class Detection {
}
finfo_close
(
$finfo
);
}
if
(
!
$isWrapped
and
$mimeType
==
'application/octet-stream'
&&
function_exists
(
"mime_content_type"
))
{
if
(
!
$isWrapped
and
$mimeType
==
=
'application/octet-stream'
&&
function_exists
(
"mime_content_type"
))
{
// use mime magic extension if available
$mimeType
=
mime_content_type
(
$path
);
}
if
(
!
$isWrapped
and
$mimeType
==
'application/octet-stream'
&&
\OC_Helper
::
canExecute
(
"file"
))
{
if
(
!
$isWrapped
and
$mimeType
==
=
'application/octet-stream'
&&
\OC_Helper
::
canExecute
(
"file"
))
{
// it looks like we have a 'file' command,
// lets see if it does have mime support
$path
=
escapeshellarg
(
$path
);
...
...
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