Lines Matching +full:media +full:- +full:result +(+path:plugin +path:multiorphan) -(+path:plugin +path:multiorphan +path:lang)

5  * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html
6 * @author i-net software <tools@inetsoftware.de>
32 … $controller->register_hook('AJAX_CALL_UNKNOWN', 'BEFORE', $this, 'handle_ajax_call_unknown');
33 …$controller->register_hook('MULTIORPHAN_INSTRUCTION_LINKED', 'BEFORE', $this, 'handle_unknown_inst…
34 $controller->register_hook('DOKUWIKI_STARTED', 'AFTER', $this, 'extend_JSINFO');
50 if ( $event->data != 'multiorphan' ) {
53 if ((!$helper = $this->loadHelper('multiorphan'))) {
59 $event->preventDefault();
61 $namespace = $INPUT->str('ns');
63 $this->checkExternal = $INPUT->bool('checkExternal');
64 $this->includeWindowsShares = $INPUT->bool('includeWindowsShares');
65 $result = array();
67 switch( $INPUT->str('do') ) {
71 $type = 'both'; //$INPUT->str('type');
72 $includeHidden = $INPUT->bool('includeHidden', false);
81 'idmatch' => trim($INPUT->str('filter'))
86 if ( $type == 'both' || $type == 'media') {
87 $media = array();
88 search($media,$conf['mediadir'],'search_media',array(
91 'pattern' => '/' . str_replace('/', '\/', trim($INPUT->str('filter'))) . '/'
93 array_walk($media, array($this, '__map_ids'));
96 $result = array(
98 'media' => $media
106 $id = $INPUT->str('id');
107 $result = $this->__check_pages($id);
113 $link = urldecode($INPUT->str('link'));
120 $link = $INPUT->str('link');
123 $result = array( 'dialogContent' => ob_get_contents());
127 if ( !empty( $result['dialogContent'] ) ) {
134 $link = urldecode($INPUT->str('link'));
140 $result = array(
147 print json_encode($result);
159 * Checks a page for the contained links and media.
160 * Returns an array: page|media => array of ids with count
168 $links = array('pages' => array(), 'media' => array(), 'href' => wl($id) );
170 $this->walk_instructions( $links, $id, $instructions );
189 $this->walk_instructions( $links, $id, $ins[1][0] );
193 $data = $this->_getDataContainer( $id, $ins);
197 …if (!is_null($data['type']) || (in_array($ins[0], $this->checkInstructions) && $evt->advise_before…
198 $this->_addEntryToLinkList( $links, $data);
214 'type' => $this->getInternalMediaType($instructions[0]),
223 // still not media type so ignore the entry.
240 if (( !is_bool($data['exists']) || !$data['exists']) && $data['type'] == 'media') {
252 $this->_check_locallink( $linkData );
260 'href' => $this->hrefForType( $data['type'], $itemIndex),
272 …$this->_addEntryToLinkList( $links, array_merge( $this->_getDataContainer( $data['id'], $data['ins…
289 $plugin->render($this->renderer->getFormat(), $this->renderer, $input[1][1]);
292 $instructions = $this->renderer->instructions;
293 $this->renderer->nest_close();
294 $this->_check_locallink( $data, $instructions);
300 $this->_init_renderer();
301 $renderer = &$this->renderer;
304 $result = array();
311 $result = array_filter($instructions, function( $input ) use ( $data, $renderer ) {
315 $this->_plugin_input_to_header( $input, $data );
322 $hid = $renderer->_headerToLink( $input[1][0] );
323 $check = $renderer->_headerToLink( $data['entryID'] );
329 $data['exists'] = $data['exists'] || count($result) > 0;
338 //print_r($event->data);
339 $instructions = $event->data['instructions'];
340 switch( $event->data['syntax'] ) {
343 $this->_check_locallink( $event->data );
347 if ( ! $this->checkExternal ) { return false; }
348 $this->_init_renderer();
350 …$event->data['entryID'] = $this->renderer->_resolveInterWiki($instructions[2], $instructions[3], $…
354 if ( ! $this->checkExternal ) { return false; }
357 $httpClient->keep_alive = false; // just close it already.
358 $httpClient->max_bodysize = 0;
359 $data = $httpClient->sendRequest( $event->data['entryID'], null, 'GET' );
360 …$event->data['exists'] = ( $httpClient->status >= 200 && $httpClient->status <= 200 ) || $httpClie…
361 $event->data['status'] = $httpClient->status;
362 $event->data['type'] = 'urls';
363 if ( !empty( $httpClient->error ) ) {
364 $event->data['error'] = $httpClient->error;
370 if ( ! $this->includeWindowsShares ) { return false; }
375 $event->data['exists'] = file_exists($event->data['entryID']);
376 $event->data['type'] = 'media';
382 $event->data['entryID'] = $instructions[1][1];
383 $event->data['type'] = 'pages';
387 $event->data['type'] = $this->getInternalMediaType($instructions[1][4]);
388 $event->data['entryID'] = $instructions[1][6];
391 $event->data['type'] = $this->getInternalMediaType($instructions[1][1]);
392 $event->data['entryID'] = $instructions[1][2];
396 $event->data['entryID'] = $instructions[1]['mp3'];
397 $event->data['type'] = 'media';
401 $event->data['entryID'] = $instructions[1][1]['src'];
402 $event->data['exists'] = $instructions[1][1]['exist'];
403 $event->data['type'] = 'media';
421 if ( $this->renderer != null ) {
426 $this->renderer = new MultiOrphanDummyRenderer();
427 $this->renderer->interwiki = getInterwiki();
431 …return in_array($ins, $this->mediaInstructions) ? 'media' : (in_array($ins, $this->pagesInstructio…
439 $this->_init_renderer();
440 $hash = '#' . $this->renderer->_headerToLink( $hash );
446 case 'media':