Commit bdfc1ed6 authored by floh1111's avatar floh1111

Changed location of $tikiUrl and outcommented last incommented code

parent d3c4a14e
......@@ -3,7 +3,7 @@
class reportsLib extends TikiLib{
//Sends the Email
public function sendEmail($user_data, $report_preferences, $report_cache) {
public function sendEmail($user_data, $report_preferences, $report_cache, $tikiUrl) {
global $prefs, $smarty, $tikilib;
include_once('lib/webmail/tikimaillib.php');
......@@ -21,7 +21,7 @@ class reportsLib extends TikiLib{
$smarty->assign('mail_contributions', $contributionlib->print_contributions($contributions));
}
$smarty->assign('report_body', $this->makeHtmlEmailBody($report_cache, $report_preferences));
$smarty->assign('report_body', $this->makeHtmlEmailBody($report_cache, $report_preferences, $tikiUrl));
$mail->setUser($user_data['login']);
if(is_array($report_cache)) {
......@@ -72,10 +72,7 @@ class reportsLib extends TikiLib{
return $change_array;
}
public function makeHtmlEmailBody($report_cache, $report_preferences) {
//Complete URL to your Tikiwiki installation without ending slash!
$tikiUrl = "http://localhost/trunktest";
public function makeHtmlEmailBody($report_cache, $report_preferences, $tikiUrl) {
global $tikilib;
$change_array = $this->makeChangeArray($report_cache);
$somethingHasHappened = false;
......
......@@ -10,6 +10,10 @@ if ($prefs['feature_daily_report_watches'] != 'y') {
die("This feature is disabled");
}
include_once ('lib/reportslib.php');
//Complete URL to your Tikiwiki installation without ending slash!
$tikiUrl = "http://localhost/trunktest";
foreach($reportslib->getUsersForSendingReport() as $key => $user) {
$report_preferences = $reportslib->get_report_preferences_by_user($user);
$user_data = $userlib->get_user_info($user);
......@@ -19,11 +23,11 @@ foreach($reportslib->getUsersForSendingReport() as $key => $user) {
//Fetch cache
$report_cache = $reportslib->get_report_cache_entries_by_user($user, "time ASC");
//Send email if there is a cache or if always_email = true
if ($report_cache OR (!$report_cache && $report_preferences['always_email'])) $reportslib->sendEmail($user_data, $report_preferences, $report_cache);
if ($report_cache OR (!$report_cache && $report_preferences['always_email']))
$reportslib->sendEmail($user_data, $report_preferences, $report_cache, $tikiUrl);
}
//Update Database
//$reportslib->updateLastSent($user_data['login']);
$reportslib->updateLastSent($user_data['login']);
//Empty cache
//$reportslib->deleteUsersReportCache($user_data['login']);
$reportslib->deleteUsersReportCache($user_data['login']);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment