Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2014-05-13 09:43:47 +0400
committermattab <matthieu.aubry@gmail.com>2014-05-13 09:43:47 +0400
commit56aedb8f50898a772b0b8d08be91aa69bbc011e5 (patch)
tree069cfa3591367940aefd66f3d3819402ae103fbc /plugins/Feedback/API.php
parent338d3ad1cec58ddd8aebd7aedaf882eef3bcfa86 (diff)
Refs #4877 Tweak the feedback@piwik email subject ftw
Diffstat (limited to 'plugins/Feedback/API.php')
-rw-r--r--plugins/Feedback/API.php17
1 files changed, 12 insertions, 5 deletions
diff --git a/plugins/Feedback/API.php b/plugins/Feedback/API.php
index 73b3dbaf02..b5d601cb66 100644
--- a/plugins/Feedback/API.php
+++ b/plugins/Feedback/API.php
@@ -44,13 +44,20 @@ class API extends \Piwik\Plugin\API
}
$body = sprintf("Feature: %s\nLike: %s\n", $featureName, $likeText, $message);
- if (!empty($message)) {
- $body .= sprintf("Feedback:\n%s\n", $message);
- } else {
- $body .= "No feedback\n";
+
+ $feedbackMessage = '';
+ if (!empty($message) && $message != 'undefined') {
+ $feedbackMessage = sprintf("Feedback:\n%s\n", trim($message));
}
+ $body .= $feedbackMessage;
+
+ $subject = sprintf("%s for %s %s",
+ empty($like) ? "-1" : "+1",
+ $featureName,
+ empty($feedbackMessage) ? "" : "(w/ feedback)"
+ );
- $this->sendMail($featureName, $body);
+ $this->sendMail($subject, $body);
}
private function sendMail($subject, $body)