Commit 439d9400 authored by Alan Garcia's avatar Alan Garcia
Browse files

Probleme d'affichage de la taille de fenetre d'edition de fichiers

parent f346c484
......@@ -71,14 +71,14 @@ include_once("head.php");
?>
<p>
<?php if (isset($error) && $error) echo "<p class=\"error\">$error</p>"; ?>
<?php echo _("File editing")." <code>$R/<b>$editfile</b></code><br />"; ?>
<h3><?php echo _("File editing")." <code>$R/<b>$editfile</b></code><br />"; ?></h3>
</p>
<form action="bro_editor.php" method="post"><br />
<div id="resizer" style="left: 0px; top: 0px; z-index: 54; width: <?php echo $p["editsizex"]*8; ?>px; height: <?php echo $p["editsizey"]*8; ?>px; cursor: auto;"><textarea class="int" style="font-family: <?php echo $p["editor_font"]; ?>; font-size: <?php echo $p["editor_size"]; ?>; width: 90%; height: 90%;" name="texte"><?php
<textarea class="int" style="font-family: <?php echo $p["editor_font"]; ?>; font-size: <?php echo $p["editor_size"]; ?>; width: 90%; height: 400px;" name="texte"><?php
$failed=false;
if (!$bro->content($R,$editfile)) {
$failed=true;
}
$content=$bro->content($R,$editfile);
if (empty($content)) $failed=true;
?></textarea>
<?php if ($failed) echo "<p class=\"error\">".$err->errstr()."</p>"; ?>
<input type="hidden" name="editfile" value="<?php echo str_replace("\"","&quot;",$editfile); ?>" />
......
......@@ -671,19 +671,11 @@ class m_bro {
function content($R,$file) {
global $err;
$absolute=$this->convertabsolute($R,0);
$std="";
if (!strpos($file,"/")) {
$absolute.="/".$file;
if (file_exists($absolute)) {
$f=fopen($absolute,"rb");
if ($f) {
while ($s=fgets($f,1024)) {
echo str_replace("<","&lt;",str_replace("&","&amp;",$s));
}
fclose($f);
} else {
$err->raise("bro",6);
return false;
}
$std=str_replace("<","&lt;",str_replace("&","&amp;",file_get_contents($absolute)));
} else {
$err->raise("bro",6);
return false;
......@@ -692,6 +684,7 @@ class m_bro {
$err->raise("bro",1);
return false;
}
return $std;
}
/** Cache des urls pour VIEW
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment