Lines Matching refs:data

71         $data = array(
81 $data['task']['date'] = $grep[1];
82 $content = trim(str_replace($data['task']['date'], '', $content));
87 $data['task']['users'] = explode(',', $content);
88 $data['task']['users'] = array_map('trim', $data['task']['users']);
90 $data['task']['users'] = array_map(array($auth, 'cleanUser'), $data['task']['users']);
92 $data['task']['users'] = array_unique($data['task']['users']);
93 $data['task']['users'] = array_filter($data['task']['users']);
98 $handler->addPluginCall('do_do', $data, $state, $pos, $match);
107 $data['task']['text'] = $this->_textContent(
114 $data['task']['md5'] = md5(
115 PhpString::strtolower(preg_replace('/\s/', '', $data['task']['text'])) . $ID
118 // Add missing data from ENTER and EXIT to the other
119 $handler->getCallWriter()->calls[0][1][1]['task'] += $data['task'];
120 $data['task'] += $handler->getCallWriter()->calls[0][1][1]['task'];
122 $handler->addPluginCall('do_do', $data, $state, $pos, $match);
145 * @return array - the task data (empty for new tasks)
183 public function render($mode, Doku_Renderer $R, $data)
193 $oldtask = $this->_oldTask($ID, $data['task']['md5']);
195 $data['task']['creator'] = $oldtask['creator'];
196 $data['task']['msg'] = $oldtask['msg'];
197 $data['task']['status'] = $oldtask['status'];
200 // save data to sqlite during meta data run
202 $this->_save($data);
209 switch ($data['state']) {
216 if ($data['task']['msg']) {
217 $R->cdata(' (' . $data['task']['msg'] . ')');
224 switch ($data['state']) {
229 'do_md5' => $data['task']['md5']
232 if (!in_array($data['task']['md5'], $this->ids)) {
233 $id = 'id="plgdo__' . $data['task']['md5'] . '" ';
234 $this->ids[] = $data['task']['md5'];
237 $R->doc .= '<span ' . $id . 'class="plugin_do_item plugin_do_' . $data['task']['md5'] . '">'
248 . (empty($data['task']['msg']) ? '' : '(' . $this->getLang('js')['note_done'] . hsc($data['task']['msg']) . ')')
251 if (isset($data['task']['users']) || isset($data['task']['date'])) {
253 if (isset($data['task']['users'])) {
256 $users = $data['task']['users'];
264 if (isset($data['task']['date'])) {
268 if (isset($data['task']['date'])) {
269 $R->doc .= $this->getLang('date') . ' <span class="plugin_do_meta_date">' . hsc($data['task']['date']) . '</span>';
281 * Save data in the metadata renderer
283 * @param array $data
285 protected function _save($data)
297 if ($data['state'] !== DOKU_LEXER_EXIT) {
302 if (!$this->_needsSave($ID, $data['task']['md5'])) {
306 // make sure data is complete
307 if (!isset($data['task']['creator'])) {
308 $data['task']['creator'] = $_SERVER['REMOTE_USER'];
310 $data['task']['page'] = $ID;
311 $data['task']['pos'] = ++$this->position;
314 $this->hlp->saveTask($data['task']);
320 if (!isset($data['task']['users'])) {
328 $oldtask = $this->_oldTask($ID, $data['task']['md5']);
330 $data['task']['users'],
332 array($_SERVER['REMOTE_USER'], $data['task']['creator'])
336 if (!$data['task']['status']) {
337 $this->hlp->sendMail($receivers, 'open', $data['task'], $data['task']['creator']);