Skip to content

Commit

Permalink
Maybe resolve #4
Browse files Browse the repository at this point in the history
  • Loading branch information
k1sul1 authored Jan 12, 2018
1 parent 9ac69a7 commit 5e8f54d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wplf-export.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public function getCSV($filepath) {
}

public function handleDownload() {
if (parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH) === '/wplf-export') {
if (!empty($_GET["action"]) && $_GET["action"] === "wplf-export") {
$allowed = current_user_can(
apply_filters('wplf_export_capability', 'edit_others_posts')
);
Expand Down Expand Up @@ -196,7 +196,7 @@ public function noticeNag() {
<p>If the imported file seems to be broken, select only one type
of form and try exporting again.</p>";
$html .= "<p>The download should start automatically.
<a href='/wplf-export?wplf-export-download=$fpath' id='wplf_export_save' target='_blank'>
<a href='?action=wplf-export&wplf-export-download=$fpath' id='wplf_export_save' target='_blank'>
If it doesn't click here.
</a></p>";
$html .= "</div>";
Expand All @@ -206,7 +206,7 @@ public function noticeNag() {
$html .= "<div id='wplf_export_nag' class='notice notice-success is-dismissible'>";
$html .= "<p>Exported $count submissions.</p>";
$html .= "<p>The download should start automatically.
<a href='/wplf-export?wplf-export-download=$fpath' id='wplf_export_save' target='_blank'>
<a href='?action=wplf-export&wplf-export-download=$fpath' id='wplf_export_save' target='_blank'>
If it doesn't click here.
</a></p>";
$html .= "</div>";
Expand Down

0 comments on commit 5e8f54d

Please sign in to comment.