Commit 7e6430b2 authored by xavidp's avatar xavidp

[bp/r51497][FIX] Daily Reports was not Multitiki ready. Add a new command to...

[bp/r51497][FIX] Daily Reports was not Multitiki ready. Add a new command to console.php (daily-report:send). This command should be run from cron instead of tiki-user_reports_send.php. Thanks lrrcenter
[bp/r51507][ENH] Daily Reports. Output progress messages during daily-report:send script execution. Add a deprecation notice to tiki-user_reports_send.php. Thanks lrrcenter
parent 05c35f5d
......@@ -82,6 +82,7 @@ if ($isInstalled) {
}
if ($isInstalled && ! $installer->requiresUpdate()) {
$console->add(new Tiki\Command\DailyReportSendCommand);
$console->add(new Tiki\Command\GoalCheckCommand);
$console->add(new Tiki\Command\IndexRebuildCommand);
$console->add(new Tiki\Command\IndexOptimizeCommand);
......@@ -94,6 +95,7 @@ if ($isInstalled && ! $installer->requiresUpdate()) {
$console->add(new Tiki\Command\ProfileExport\Init);
$console->add(new Tiki\Command\RefreshRssCommand);
} else {
$console->add(new Tiki\Command\UnavailableCommand('daily-report:send'));
$console->add(new Tiki\Command\UnavailableCommand('goal:check'));
$console->add(new Tiki\Command\UnavailableCommand('index:rebuild'));
$console->add(new Tiki\Command\UnavailableCommand('index:optimize'));
......
......@@ -26,7 +26,11 @@ class Reports_Send_EmailBuilder
public function emailBody($user_data, $report_preferences, $report_cache)
{
$base_url = $report_cache[0]['data']['base_url'];
if (isset($report_cache[0])) {
$base_url = $report_cache[0]['data']['base_url'];
} else {
$base_url = "";
}
$smarty = TikiLib::lib('smarty');
......
......@@ -14,6 +14,8 @@ if (php_sapi_name() != 'cli') {
$access->check_permission('tiki_p_admin');
}
echo("This script is deprecated and does not work in Multitiki installations.\nPlease use 'console.php daily-report:send' instead.");
$access->check_feature('feature_daily_report_watches');
$reportsManager = Reports_Factory::build('Reports_Manager');
......
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