Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

random numbers & mail notify on project description change #70

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions language/de/lng.conf
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ projectwasclosed = Projekt wurde abgeschlossen
projectwasdeleted = Projekt wurde gelöscht
projectwasedited = Projekt wurde bearbeitet
projectwasopened = Projekt wurde reaktiviert
projectdeschanged = Geänderte Projektbeschreibung
report = Bericht
start = Start

Expand Down
1 change: 1 addition & 0 deletions language/en/lng.conf
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ projectwasclosed = Project was closed
projectwasdeleted = Project was deleted
projectwasedited = Project was edited
projectwasopened = Project was opened
projectdeschanged = Changed project description
report = Report
start = Start

Expand Down
1 change: 1 addition & 0 deletions language/pl/lng.conf
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ projectwasclosed = Projekt został zamknięty
projectwasdeleted = Projekt został usunięty
projectwasedited = Projekt został zmieniony
projectwasopened = Rozpocząłeś projekt
projectdeschanged = Zmieniony opis projektu
report = Raport
start = Start

Expand Down
15 changes: 15 additions & 0 deletions manageproject.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,21 @@

if ($project->edit($id, $name, $desc, $end, $budget)) {
header("Location: manageproject.php?action=showproject&id=$id&mode=edited");
$users = $project->getProjectMembers($id, 10000);
foreach($users as $user) {
if (!empty($user["email"])) {
$userlang=readLangfile($user['locale']);

$mailcontent = $userlang["hello"] . ",<br /><br/>" . $userlang["projectwasedited"] . ": " .
" <a href = \"" . $url . "manageproject.php?action=showproject&id=$id\">" . $url . "manageproject.php?action=showproject&id=$id</a>";

$subject = $userlang["projecdeschanged"] . " (". $userlang['by'] . ' '. $username . ")";

// send email
$themail = new emailer($settings);
$themail->send_mail($user["email"], $subject, $mailcontent);
}
}
} else {
$template->assign("editproject", 0);
}
Expand Down