diff --git a/setup/createheader.php b/setup/createheader.php index 1f4dad9eb2..94cebc8757 100644 --- a/setup/createheader.php +++ b/setup/createheader.php @@ -20,18 +20,18 @@ echo ""; break; case "write config": - if(!is_writeable ("../header.inc.php")){ - show_header("Error generating header.inc.php"); - echo "Could not open header.inc.php for writing!
\n"; - echo "Please check read/write permissions on directories or back up and use another option.
"; - echo ""; - }else{ + if(is_writeable ("../header.inc.php")|| (!file_exists ("../header.inc.php") && is_writeable ("../"))){ show_header("Saved header.inc.php"); $newheader = generate_header(); $fsetup = fopen("../header.inc.php","w"); fwrite($fsetup,$newheader); fclose($fsetup); echo "Created header.inc.php!
"; + }else{ + show_header("Error generating header.inc.php"); + echo "Could not open header.inc.php for writing!
\n"; + echo "Please check read/write permissions on directories or back up and use another option.
"; + echo ""; } break; default: @@ -189,15 +189,16 @@ echo "
"; echo "
"; - if(is_writeable ("../header.inc.php")){ + if(is_writeable ("../header.inc.php")|| (!file_exists ("../header.inc.php") && is_writeable ("../"))){ echo ''; + echo' or or the file.
'; }else{ echo 'Cannot create the header.inc.php due to file permission restrictions.
Instead you can '; echo'or the file.'; - echo '
'; - echo'
After retrieving the file put it into place as the header.inc.php, then click continue.
'; - echo''; } + echo ''; + echo'
After retrieving the file put it into place as the header.inc.php, then click continue.
'; + echo''; echo "
"; echo ""; echo "";