Lines Matching refs:data

35  * @param array $data
38 function media_filesinuse($data, $id)
45 foreach ($data as $row) {
58 * Handles the saving of image meta data
65 * @param array $data
68 function media_metasave($id, $auth, $data)
79 foreach ($data as $key => $val) {
143 * Display the form to edit image meta data
268 $data = [];
269 $data['id'] = $id;
270 $data['name'] = PhpString::basename($file);
271 $data['path'] = $file;
272 $data['size'] = (file_exists($file)) ? filesize($file) : 0;
274 $data['unl'] = false;
275 $data['del'] = false;
276 $evt = new Event('MEDIA_DELETE_FILE', $data);
284 $data['unl'] = @unlink($file);
285 if ($data['unl']) {
286 $sizechange = 0 - $data['size'];
289 $data['del'] = io_sweepNS($id, 'mediadir');
295 if ($data['unl'] && $data['del']) {
299 return $data['unl'] ? DOKU_MEDIA_DELETED : 0;
423 * Event data:
424 * $data[0] fn_tmp: the temporary file name (read from $_FILES)
425 * $data[1] fn: the file name of the uploaded file
426 * $data[2] id: the future directory id of the uploaded file
427 * $data[3] imime: the mimetype of the uploaded file
428 * $data[4] overwrite: if an existing file is going to be overwritten
429 * $data[5] move: name of function that performs move/copy/..
491 // prepare event data
492 $data = [];
493 $data[0] = $file['name'];
494 $data[1] = $fn;
495 $data[2] = $id;
496 $data[3] = $file['mime'];
497 $data[4] = $overwrite;
498 $data[5] = $move;
501 return Event::createAndTrigger('MEDIA_UPLOAD_FINISH', $data, '_media_upload_action', true);
509 * @param array $data event data
512 function _media_upload_action($data)
514 // fixme do further sanity tests of given data?
515 if (is_array($data) && count($data) === 6) {
516 return media_upload_finish($data[0], $data[1], $data[2], $data[3], $data[4], $data[5]);
730 $data = [];
732 $data,
741 if (!count($data)) {
747 foreach ($data as $item) {
1314 * @param array $data event data
1318 function _media_file_diff($data)
1415 'data' => [],
1431 $evdata['data'],
1449 if (!count($evdata['data'])) {
1455 foreach ($evdata['data'] as $item) {
1562 'enctype' => 'multipart/form-data',
1685 $data = [];
1686 search($data, $conf['mediadir'], 'search_index', ['ns' => $ns_dir, 'nofiles' => true]);
1689 array_unshift($data, ['level' => 0, 'id' => '', 'open' => 'true', 'label' => '[' . $lang['mediaroot'] . ']']);
1700 while ($data[$pos]['id'] != $tmp_ns) {
1702 $pos >= count($data) ||
1703 ($data[$pos]['level'] <= $level + 1 && Sort::strcmp($data[$pos]['id'], $tmp_ns) > 0)
1705 array_splice($data, $pos, 0, [['level' => $level + 1, 'id' => $tmp_ns, 'open' => 'true']]);
1712 echo html_buildlist($data, 'idx', 'media_nstree_item', 'media_nstree_li');
1933 $data = $http->get($url);
1934 if (!$data) return false;
1939 fwrite($fp, $data);