Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mahara
mahara
Commits
dc29067c
Commit
dc29067c
authored
Nov 29, 2017
by
Cecilia Vela Gurovic
Committed by
Gerrit Code Review
Nov 29, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Bug 1732810: Pass file's title to pdfjs download button"
parents
a323c8d8
dcc794ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
htdocs/artefact/file/blocktype/pdf/lib.php
htdocs/artefact/file/blocktype/pdf/lib.php
+3
-0
htdocs/artefact/file/blocktype/pdf/viewer.php
htdocs/artefact/file/blocktype/pdf/viewer.php
+1
-1
No files found.
htdocs/artefact/file/blocktype/pdf/lib.php
View file @
dc29067c
...
...
@@ -70,6 +70,9 @@ class PluginBlocktypePdf extends MaharaCoreBlocktype {
}
}
}
else
if
(
$language
==
'en'
)
{
$language
=
'en-GB'
;
}
$result
=
'<iframe src="'
.
$urlbase
.
'artefact/file/blocktype/pdf/viewer.php?editing='
.
$editing
.
'&ingroup='
.
!
empty
(
$group
)
.
'&file='
.
$artefactid
.
'&lang='
.
$language
.
'&view='
.
$instance
->
get
(
'view'
)
.
'" width="100%" height="500" frameborder="0"></iframe>'
;
...
...
htdocs/artefact/file/blocktype/pdf/viewer.php
View file @
dc29067c
...
...
@@ -48,6 +48,6 @@ if (get_config('cleanurls') && get_config('cleanurlusersubdomains') && !$editing
}
$smarty
=
smarty
();
$smarty
->
assign
(
'url'
,
$urlbase
.
'artefact/file/download.php?file='
.
$fileid
.
'&view='
.
$viewid
);
$smarty
->
assign
(
'url'
,
$urlbase
.
'artefact/file/download.php?file='
.
$fileid
.
'&view='
.
$viewid
.
'&title='
.
urlencode
(
$file
->
get
(
'title'
))
);
$smarty
->
assign
(
'title'
,
$file
->
get
(
'title'
));
$smarty
->
display
(
'blocktype:pdf:pdf.tpl'
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment