fixed write checks and error reporting

This commit is contained in:
real_nowhereman 2008-01-01 19:58:10 +00:00
parent 725a70f1d0
commit fbe0b42e25
2 changed files with 8 additions and 48 deletions

View File

@ -1,7 +1,9 @@
<?php
function check_step() {
global $err;
if(check_write(SETUPTEMP_FILE, 2)) {
$r = fs_mkdir(CACHE_DIR);
@ -19,8 +21,10 @@
return true;
}
$err[] = 'Write error';
return false;
}
?>
?>

View File

@ -13,58 +13,14 @@
<?php
echo wpautop(sprintf($l['descr'], FP_CONTENT));
/*
if ($languages){
echo '<p><label> ' . $l['descrl1'] .' <select name="language">';
foreach($languages as $lg) {
$match = array();
if (preg_match('|lang\.(.*)\.php|', $lg, $match)) {
$lid = $match[1];
$fc = io_load_file("./setup/lang/$lg");
$lv = $lid;
if (preg_match('|LangId:(.*)|i', $fc, $match))
$lv = $match[1];
echo "<option value=\"$lid\"" .
((isset($_POST['language']) && $_POST['language'] == $lg)?
' selected="selected"' : '')
. ">$lv</option>";
}
}
echo '</select> </label></p>';
echo '<p>' .$l['descrl2'] . '</p>';
}
echo '<div id="more-lang-info" class="info-notice">';
echo wpautop(sprintf($l['descrlang'], FP_CONTENT));
echo '</div>';
*/
if ($err)
echo wpautop(sprintf($l['descrw'], FP_CONTENT));
?>
<!-- script type="text/javascript">
function toggleinfo() {
var disp = document.getElementById('more-lang-info').style;
if (disp.display.indexOf('block') != -1)
disp.display = 'none';
else
disp.display = 'block';
}
document.getElementById('more-lang-info').style.display = 'none';
</script -->
<div id="buttonbar">
<input type="submit" name="start" id="start"
value="<?php echo $lang['buttonbar']['next']; ?>" />
</div>
</div>
</div>