session_start();
require_once __DIR__ . '/../includes/dependencies.php';
+if (isset($needs_update) && $needs_update === true) {
+ echo _T("Your Galette database is not present, or not up to date.");
+ die(1);
+}
+
+/** TODO: login is now handled in dependencies.php; the cron case should be aswell */
+if ($cron) {
+ $container->get('login')->logCron(basename($argv[0], '.php'));
+}
+
if (!$container->get('login')->isCron()) {
- die();
+ die(1);
}
$texts = new Texts(
if (count($list_reminders) > 0) {
foreach ($list_reminders as $reminder) {
//send reminders by mail
- $sent = $reminder->send($texts, $container->get('hist'), $container->get('zdb'));
+ $sent = $reminder->send($texts, $container->get('history'), $container->get('zdb'));
if ($sent === true) {
$success_detected[] = $reminder->getMessage();
echo 'Galette is NOT compliant with your current PHP version. ' .
'Galette requires PHP ' . GALETTE_PHP_MIN .
' minimum and current version is ' . phpversion();
- die();
+ die(1);
}
$time_start = microtime(true);
'themes/' . $preferences->pref_theme . '/'
);
}
-
- /** TODO: login is now handled in dependencies.php; the cron case should be aswell */
- if ($cron) {
- $container->get('login')->logCron(basename($argv[0], '.php'));
- }
} else {
$needs_update = true;
}
*
* @param array $selected Selected types for sending
*/
- public function __construct($selected)
+ public function __construct($selected = null)
{
if (isset($selected) && is_array($selected)) {
$this->selected = array_map('intval', $selected);