Lines Matching refs:xssnipper

73           $xssnipper                = array();
74 $xssnipper['filepath'] = '';
75 $xssnipper['from'] = $params[1];
77 $xssnipper['type'] = $alpha[0];
78 $xssnipper['file'] = $alpha[1];
79 $xssnipper['block'] = $alpha[2];
80 $xssnipper['code'] = $params[3];
84 $xssnipper = array();
85 $xssnipper['filepath'] = $params[0];
86 $xssnipper['from'] = $params[1];
87 $xssnipper['until'] = $params[2];
89 $xssnipper['type'] = $alpha[0];
90 $xssnipper['file'] = $alpha[1];
91 $xssnipper['block'] = $alpha[2];
93 return $xssnipper;
99 function render($mode, Doku_Renderer &$renderer, $xssnipper) { argument
101 if(!$xssnipper['type']) $xssnipper['type']='txt';
104 if($xssnipper['filepath']=='') {
105 $code_lines = $xssnipper['code'];
108 if(!$xssnipper['file']) $xssnipper['file']= basename($xssnipper['filepath']);
109 if(!$xssnipper['file']) $xssnipper['file']='snippet.'.$xssnipper['type'];
112 if(!file_exists($xssnipper['filepath'])) {
113 msg('file '.$xssnipper['filepath'].' not found',-1);
118 $records = file($xssnipper['filepath']);
121 if(!$xssnipper['until']) $xssnipper['until']=count($records);
123 if(($line_num>=$xssnipper['from']-1) && ($line_num<=$xssnipper['until']-2))
125 if ($line_num>$xssnipper['until']) break;
128 $geshi = new GeSHi($code_lines, $xssnipper['type']);
133 $geshi->start_line_numbers_at($xssnipper['from']);
141 …odeblock.'" title="Download Snippet" class="mediafile mf_'.$xssnipper['type'].'">'.$xssnipper['fil…
146 if($xssnipper['block']) {
170 header("Content-Disposition: attachment; filename=".trim($xssnipper['file']));