o: ActiveSupport::Cache::Entry :@compressedF: @value" p"p
listing.php
83 83
   return $url;
84 84
}
85 85

  
86
function fileLinkGetFile($path, $file)
87
{
88
   global $rep, $passrev, $showchanged, $config;
89

  
90
   if ($path == "" || $path{0} != "/")
91
      $ppath = "/".$path;
92
   else
93
      $ppath = $path;
94

  
95
   if ($ppath{strlen($ppath)-1} != "/")
96
      $ppath .= "/";
97

  
98
   if ($file{0} == "/")
99
      $pfile = substr($file, 1);
100
   else
101
      $pfile = $file;
102

  
103
   $isDir = $pfile{strlen($pfile) - 1} == "/";
104

  
105
   if (!$isDir)
106
   {
107
      $url = $config->getURL($rep, $ppath.$pfile, "file");
108
      $url = removeURLSeparator($url);
109
      $url = "<a href=\"${url}&getfile\">Get</a>";
110
   }
111

  
112
   return $url;
113
}
114

  
86 115
function showDirFiles($svnrep, $subs, $level, $limit, $rev, $listing, $index, $treeview = true)
87 116
{
88 117
   global $rep, $passrev, $showchanged, $config, $lang;
89 118

  
90 119
   $path = "";
91 120

  
121
// Explicitly requested file as attachment
122
if (isset($_REQUEST['getfile']))
123
{
124
   $base = basename($path);
125

  
126
   header("Content-Type: application/octet-stream");
127
   header("Content-Length: $size");
128
   header("Content-Disposition: inline; filename=".urlencode($base));
129

  
130
   $svnrep->getFileContents($path, "", $rev);
131

  
132
   exit;
133
}
134

  
92 135
   if (!$treeview)
93 136
      $level = $limit;
94 137

  
......
116 159
         {
117 160
            $access = true;
118 161
            $openDir = (!strcmp($subs[$level+1]."/", $file) || !strcmp($subs[$level+1], $file));
119
   
162

  
120 163
            if ($openDir)
121 164
               $listing[$index]["filetype"] = "diropen";
122 165
            else
......
146 189
            $listing[$index]["filetype"] = strrchr($file, ".");
147 190
         }   
148 191
      }
149
      
192

  
150 193
      if ($access)
151 194
      {
152
         $listing[$index]["rowparity"] = ($index % 2)?"1":"0";
195
         $listing[$index]["rowparity"] = ($index % 2)?"L1":"L0";
153 196
         
154 197
         if ($treeview)
155 198
            $listing[$index]["compare_box"] = "<input type=\"checkbox\" name=\"compare[]\" value=\"".fileLink($path, $file, true)."@$passrev\" onclick=\"checkCB(this)\" />";
156 199
         else
157 200
            $listing[$index]["compare_box"] = "";
158
         
201

  
159 202
         if ($openDir)
160 203
            $listing[$index]["filelink"] = "<b>".fileLink($path, $file)."</b>";
161 204
         else
162 205
            $listing[$index]["filelink"] = fileLink($path, $file);
163
   
206

  
207
         if ($isDir)
208
            $listing[$index]["filelinkgetfile"] = "";
209
        else
210
            $listing[$index]["filelinkgetfile"] = fileLinkGetFile($path, $file);
211

  
164 212
         // The history command doesn't return with a trailing slash.  We need to remember here if the
165 213
         // file is a directory or not! 
166
      
214

  
167 215
         $listing[$index]["isDir"] = $isDir;
168
      
216

  
169 217
         if ($treeview)
170 218
            $listing[$index]["level"] = $level;
171 219
         else
172 220
            $listing[$index]["level"] = 0;
173 221

  
174 222
         $listing[$index]["node"] = 0; // t-node
175
      
223

  
176 224
         $fileurl = $config->getURL($rep, $path.$file, "log");
177 225
         $listing[$index]["fileviewloglink"] = "<a href=\"${fileurl}rev=$passrev&amp;sc=$showchanged&amp;isdir=$isDir\">${lang["VIEWLOG"]}</a>";
178
      
226

  
179 227
         $rssurl = $config->getURL($rep, $path.$file, "rss");
180 228
         if ($rep->getHideRss())
181 229
         {
182 230
            $listing[$index]["rsslink"] = "<a href=\"${rssurl}rev=$passrev&amp;sc=$showchanged&amp;isdir=$isDir\">${lang["RSSFEED"]}</a>";
183 231
            $listing[$index]["rssanchor"] = "<a href=\"${rssurl}rev=$passrev&amp;sc=$showchanged&amp;isdir=$isDir\">";
184 232
         }
185
      
233

  
186 234
         $index++;
187 235
         $loop++;
188 236
         $last_index = $index;
189
   
237

  
190 238
         if (($level != $limit) && ($isDir))
191 239
         {
192 240
            if (!strcmp($subs[$level + 1]."/", $file))
......
194 242
               $listing = showDirFiles($svnrep, $subs, $level + 1, $limit, $rev, $listing, $index);
195 243
               $index = count($listing);
196 244
            }
197
         }      
245
         }
198 246

  
199 247
      }
200 248
   }
......
338 386
            $vars["newfilesbr"] .= fileLink("", $file->path);
339 387
            $vars["newfiles"] .= " ".fileLink("", $file->path);
340 388
            break;
341
                     
389

  
342 390
         case "M":
343 391
            if (!$firstModded) $vars["changedfilesbr"] .= "<br />";
344 392
            $firstModded = false;
......
354 402
            break;
355 403
      }
356 404
   }
357
      
405

  
358 406
   $vars["hidechangeslink"] = "<a href=\"${dirurl}rev=$passrev&amp;sc=0\">${lang["HIDECHANGED"]}</a>";
359
   
407

  
360 408
   $vars["hidechanges"] = false;
361 409
   $vars["showchanges"] = true;
362 410
}
......
371 419

  
372 420
if (isset($history->entries[1]->rev))
373 421
{
374
	$vars["curdircomplink"] = "<a href=\"${compurl}compare[]=".
375
	 						        urlencode($history->entries[1]->path)."@".$history->entries[1]->rev.
376
							        "&amp;compare[]=".urlencode($history->entries[0]->path)."@".$history->entries[0]->rev.
377
							        "\">${lang["DIFFPREV"]}</a>";
422
   $vars["curdircomplink"] = "<a href=\"${compurl}compare[]=".
423
   urlencode($history->entries[1]->path)."@".$history->entries[1]->rev.
424
   "&amp;compare[]=".urlencode($history->entries[0]->path)."@".$history->entries[0]->rev.
425
   "\">${lang["DIFFPREV"]}</a>";
378 426
}
379 427
else
380 428
{
381
	$vars["curdircomplink"] = "";
429
   $vars["curdircomplink"] = "";
382 430
} 
383 431

  
384 432
if ($rep->getHideRss())
:@created_atf1420544226.260803°ÿ:@expires_in0