Lines Matching +full:- +full:- +full:verbose
12 * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html
28 $options->setHelp('Send emails to users that have been assigned to tasks.');
29 $options->registerOption('verbose', 'Show progress information', 'v', false);
35 $this->notify($options->getOpt('verbose'));
41 public function notify($verbose = true) { argument
42 if (!$this->initialise($verbose)) {
43 exit(-1);
46 $notifiers = $this->createNotifiers(
47 array_map('intval', explode(',', $this->getConf('reminder'))),
48 (bool)$this->getConf('overdue_reminder'),
49 $verbose
52 $tasks = $this->struct->getPages($this->schema);
54 if ($verbose) $this->notice(sprintf($this->getLang('msg_processing'), $task));
55 $this->processTask($task, $notifiers);
64 public function initialise($verbose = false) : bool { argument
66 if ($verbose) $this->error($this->getLang('msg_no_auth'));
69 $this->schema = $this->getConf('schema');
70 if ($this->schema == '') return false;
71 $this->struct = $this->loadHelper('struct', true);
72 if (is_null($this->struct)) return false;
73 $this->util = new Utilities($this->struct);
74 if (!$this->util->isValidSchema($this->schema)) {
75 if ($verbose) $this->error(
76 sprintf($this->getLang('msg_invalid_schema'), $this->schema));
79 if ($verbose) $this->success(
80 sprintf($this->getLang('msg_handling_schema'), $this->schema));
81 $this->dateformat = $this->util->dateFormat($this->schema);
88 * @param array<int> $reminder_days On which days before the due-date
92 * @param bool $verbose Whether to print status messages
95 function createNotifiers($reminder_days, $overdue, $verbose = false) : array { argument
96 if ($this->testing) return $this->notifiers;
103 if ($verbose) $this->notice($this->getLang('msg_today_notifier'));
107 if ($verbose) {
111 ', ', array_slice($reminder_days, 0, -1)) . ' or ';
112 $days .= $reminder_days[$c - 1];
113 $this->notice(
114 sprintf($this->getLang('msg_reminder_notifier'), $days)
120 if ($verbose) $this->notice($this->getLang('msg_overdue_notifier'));
135 $structdata = $this->struct->getData($task, $this->schema)[$this->schema];
136 $data = $this->util->formatData($structdata, $this->dateformat);
146 $n->sendMessage($task, $title, $editor_name, $editor_email, $data, $data);