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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
e3489b36
Commit
e3489b36
authored
11 years ago
by
Thomas Müller
Browse files
Options
Downloads
Patches
Plain Diff
any preview requiring the which command will not be used on Windows
parent
86f6f0ca
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/private/preview/movies.php
+28
-24
28 additions, 24 deletions
lib/private/preview/movies.php
lib/private/preview/office-cl.php
+82
-78
82 additions, 78 deletions
lib/private/preview/office-cl.php
lib/private/preview/office.php
+16
-9
16 additions, 9 deletions
lib/private/preview/office.php
with
126 additions
and
111 deletions
lib/private/preview/movies.php
+
28
−
24
View file @
e3489b36
...
@@ -8,6 +8,8 @@
...
@@ -8,6 +8,8 @@
*/
*/
namespace
OC\Preview
;
namespace
OC\Preview
;
// movie preview is currently not supported on Windows
if
(
!
\OC_Util
::
runningOnWindows
())
{
$isShellExecEnabled
=
!
in_array
(
'shell_exec'
,
explode
(
', '
,
ini_get
(
'disable_functions'
)));
$isShellExecEnabled
=
!
in_array
(
'shell_exec'
,
explode
(
', '
,
ini_get
(
'disable_functions'
)));
$whichAVCONV
=
shell_exec
(
'which avconv'
);
$whichAVCONV
=
shell_exec
(
'which avconv'
);
$isAVCONVAvailable
=
!
empty
(
$whichAVCONV
);
$isAVCONVAvailable
=
!
empty
(
$whichAVCONV
);
...
@@ -45,3 +47,5 @@ if($isShellExecEnabled && $isAVCONVAvailable) {
...
@@ -45,3 +47,5 @@ if($isShellExecEnabled && $isAVCONVAvailable) {
\OC\Preview
::
registerProvider
(
'OC\Preview\Movie'
);
\OC\Preview
::
registerProvider
(
'OC\Preview\Movie'
);
}
}
}
This diff is collapsed.
Click to expand it.
lib/private/preview/office-cl.php
+
82
−
78
View file @
e3489b36
...
@@ -7,6 +7,9 @@
...
@@ -7,6 +7,9 @@
*/
*/
namespace
OC\Preview
;
namespace
OC\Preview
;
// office preview is currently not supported on Windows
if
(
!
\OC_Util
::
runningOnWindows
())
{
//we need imagick to convert
//we need imagick to convert
class
Office
extends
Provider
{
class
Office
extends
Provider
{
...
@@ -132,3 +135,4 @@ class StarOffice extends Office {
...
@@ -132,3 +135,4 @@ class StarOffice extends Office {
}
}
\OC\Preview
::
registerProvider
(
'OC\Preview\StarOffice'
);
\OC\Preview
::
registerProvider
(
'OC\Preview\StarOffice'
);
}
This diff is collapsed.
Click to expand it.
lib/private/preview/office.php
+
16
−
9
View file @
e3489b36
...
@@ -8,6 +8,9 @@
...
@@ -8,6 +8,9 @@
//both, libreoffice backend and php fallback, need imagick
//both, libreoffice backend and php fallback, need imagick
if
(
extension_loaded
(
'imagick'
))
{
if
(
extension_loaded
(
'imagick'
))
{
$isShellExecEnabled
=
!
in_array
(
'shell_exec'
,
explode
(
', '
,
ini_get
(
'disable_functions'
)));
$isShellExecEnabled
=
!
in_array
(
'shell_exec'
,
explode
(
', '
,
ini_get
(
'disable_functions'
)));
// movie preview is currently not supported on Windows
if
(
!
\OC_Util
::
runningOnWindows
())
{
$whichLibreOffice
=
shell_exec
(
'which libreoffice'
);
$whichLibreOffice
=
shell_exec
(
'which libreoffice'
);
$isLibreOfficeAvailable
=
!
empty
(
$whichLibreOffice
);
$isLibreOfficeAvailable
=
!
empty
(
$whichLibreOffice
);
$whichOpenOffice
=
shell_exec
(
'which libreoffice'
);
$whichOpenOffice
=
shell_exec
(
'which libreoffice'
);
...
@@ -19,4 +22,8 @@ if (extension_loaded('imagick')) {
...
@@ -19,4 +22,8 @@ if (extension_loaded('imagick')) {
//in case there isn't, use our fallback
//in case there isn't, use our fallback
require_once
(
'office-fallback.php'
);
require_once
(
'office-fallback.php'
);
}
}
}
else
{
//in case there isn't, use our fallback
require_once
(
'office-fallback.php'
);
}
}
}
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