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
28cf63d3
Commit
28cf63d3
authored
12 years ago
by
Georg Ehrke
Browse files
Options
Downloads
Patches
Plain Diff
check if imagick is loaded in office.php, not in libreoffice-cl.php
parent
2ff97917
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/preview/libreoffice-cl.php
+41
-46
41 additions, 46 deletions
lib/preview/libreoffice-cl.php
lib/preview/office.php
+10
-7
10 additions, 7 deletions
lib/preview/office.php
with
51 additions
and
53 deletions
lib/preview/libreoffice-cl.php
+
41
−
46
View file @
28cf63d3
...
...
@@ -8,8 +8,6 @@
namespace
OC\Preview
;
//we need imagick to convert
if
(
extension_loaded
(
'imagick'
))
{
class
Office
extends
Provider
{
private
$cmd
;
...
...
@@ -47,9 +45,7 @@ if (extension_loaded('imagick')) {
unlink
(
$abspath
);
unlink
(
$abspath
.
'.pdf'
);
if
(
!
$image
->
valid
())
return
false
;
return
$image
;
return
$image
->
valid
()
?
$image
:
false
;
}
private
function
initCmd
()
{
...
...
@@ -74,7 +70,6 @@ if (extension_loaded('imagick')) {
$this
->
cmd
=
$cmd
;
}
}
}
//.doc, .dot
class
MSOfficeDoc
extends
Office
{
...
...
This diff is collapsed.
Click to expand it.
lib/preview/office.php
+
10
−
7
View file @
28cf63d3
...
...
@@ -5,6 +5,8 @@
* later.
* See the COPYING-README file.
*/
//both, libreoffice backend and php fallback, need imagick
if
(
extension_loaded
(
'imagick'
))
{
//let's see if there is libreoffice or openoffice on this machine
if
(
shell_exec
(
'libreoffice --headless --version'
)
||
shell_exec
(
'openoffice --headless --version'
)
||
is_string
(
\OC_Config
::
getValue
(
'preview_libreoffice_path'
,
null
)))
{
require_once
(
'libreoffice-cl.php'
);
...
...
@@ -13,3 +15,4 @@ if(shell_exec('libreoffice --headless --version') || shell_exec('openoffice --he
require_once
(
'msoffice.php'
);
require_once
(
'opendocument.php'
);
}
}
\ No newline at end of file
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