Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
a7d04cc4
Commit
a7d04cc4
authored
Aug 25, 2011
by
Francois Marier
Committed by
Gerrit Code Review
Aug 25, 2011
Browse files
Merge "Don't hardcode new location in print_export_footer()"
parents
85986e6c
e666019a
Changes
3
Hide whitespace changes
Inline
Side-by-side
htdocs/admin/users/bulkdownload.php
View file @
a7d04cc4
...
...
@@ -227,4 +227,4 @@ $SESSION->set('exportfile', $zipfile);
$wwwroot
=
get_config
(
'wwwroot'
);
$strexportgeneratedsuccessfullyjs
=
get_string
(
'exportgeneratedsuccessfullyjs'
,
'export'
,
'<a href="'
.
$wwwroot
.
'" target="_top">'
,
'</a>'
);
$strexportgeneratedsuccessfully
=
get_string
(
'exportgeneratedsuccessfully'
,
'export'
,
'<a href="bulkdownload.php" target="_top">'
,
'</a>'
);
print_export_footer
(
$strexportgeneratedsuccessfully
,
$strexportgeneratedsuccessfullyjs
);
print_export_footer
(
$strexportgeneratedsuccessfully
,
$strexportgeneratedsuccessfullyjs
,
'bulkdownload.php'
);
htdocs/export/download.php
View file @
a7d04cc4
...
...
@@ -114,4 +114,4 @@ $SESSION->set('exportfile', $exporter->get('exportdir') . $zipfile);
$wwwroot
=
get_config
(
'wwwroot'
);
$strexportgeneratedsuccessfullyjs
=
get_string
(
'exportgeneratedsuccessfullyjs'
,
'export'
,
'<a href="'
.
$wwwroot
.
'export/" target="_top">'
,
'</a>'
);
$strexportgeneratedsuccessfully
=
get_string
(
'exportgeneratedsuccessfully'
,
'export'
,
'<a href="download.php" target="_top">'
,
'</a>'
);
print_export_footer
(
$strexportgeneratedsuccessfully
,
$strexportgeneratedsuccessfullyjs
,
$exporter
->
get
(
'messages'
));
print_export_footer
(
$strexportgeneratedsuccessfully
,
$strexportgeneratedsuccessfullyjs
,
$exporter
->
get
(
'messages'
)
,
'download.php'
);
htdocs/lib/htmloutput.php
View file @
a7d04cc4
...
...
@@ -63,14 +63,14 @@ function print_iframe_progress_handler($percent, $status) {
echo
'<p class="progress-text">'
.
hsc
(
$status
)
.
"</p>
\n
"
;
}
function
print_export_footer
(
$strexportgeneratedsuccessfully
,
$strexportgeneratedsuccessfullyjs
,
$jsmessages
=
array
())
{
function
print_export_footer
(
$strexportgeneratedsuccessfully
,
$strexportgeneratedsuccessfullyjs
,
$jsmessages
=
array
()
,
$newlocation
)
{
?>
<script
type=
"text/javascript"
>
document
.
write
(
'
<div class="progress-bar" style="width: 100%;"><p>
<?php
echo
$strexportgeneratedsuccessfullyjs
;
?>
</p></div>
'
);
if
(
!
window
.
opera
)
{
// Opera can't handle this for some reason - it vomits out the
// download inline in the iframe
document
.
location
=
'
download.php
'
;
document
.
location
=
'
<?php
echo
$newlocation
;
?>
'
;
}
var
messages
=
<?php
echo
json_encode
(
join
(
'; '
,
$jsmessages
));
?>
;
if
(
messages
)
{
...
...
Write
Preview
Supports
Markdown
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