don't translate mimetypes in m_bro::mime(). revert hooking tarball extraction from the last commit

This commit is contained in:
Antoine Beaupré 2008-01-22 03:39:01 +00:00
parent 6b07f7f68b
commit d63da16fcc
2 changed files with 5 additions and 10 deletions

View File

@ -103,13 +103,8 @@ if ($formu) {
}
break;
case 3: // Upload de fichier...
$target = $bro->UploadFile($R);
if (!$target) {
if (!$bro->UploadFile($R)) {
print $err->errstr();
} elseif ($_POST['extract']) {
if (!$bro->ExtractFile($target)) {
print $err->errstr();
}
}
break;
}
@ -220,7 +215,7 @@ echo "\">".htmlentities($c[$i]["name"])."</a></td>\n";
echo " <td>".format_size($c[$i]["size"])."</td>";
echo "<td>".format_date('%3$d-%2$d-%1$d %4$d:%5$d',date("Y-m-d H:i:s",$c[$i]["date"]))."<br /></td>";
if ($p["showtype"]) {
echo "<td>".$bro->mime($c[$i]["name"])."</td>";
echo "<td>"._($bro->mime($c[$i]["name"]))."</td>";
}
$vu=$bro->viewurl($R,$c[$i]["name"]);
if ($vu) {

View File

@ -227,7 +227,7 @@ class m_bro {
function mime($file) {
global $bro_type;
if (!strpos($file,".") && substr($file,0,1)!=".") {
return _("File");
return "File";
}
$t=explode(".",$file);
if (!is_array($t))
@ -236,9 +236,9 @@ class m_bro {
$ext=$t[count($t)-1];
// Now seek the extension
if (!$bro_type[$ext]) {
return _("File");
return "File";
} else {
return _($bro_type[$ext]);
return $bro_type[$ext];
}
}