Update of /cvsroot/openfirst/downloads/admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2790/admin
Modified Files:
upload.php
Log Message:
Bug #18. Added checks to make sure the file is writable. Not thoroughly tested (meaning an error has not been induced to try it).
Index: upload.php
===================================================================
RCS file: /cvsroot/openfirst/downloads/admin/upload.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** upload.php 23 Dec 2003 23:30:25 -0000 1.3
--- upload.php 22 Mar 2005 20:37:18 -0000 1.4
***************
*** 30,34 ****
// Directory to upload to
! $uploaddir=$fbasepath."/downloads/files/";
$serverdir="files/";
--- 30,34 ----
// Directory to upload to
! $uploaddir="$fbasepath/downloads/files/";
$serverdir="files/";
***************
*** 40,43 ****
--- 40,48 ----
echo("<h1>File Upload</h1>");
+ if (!is_writable($uploaddir)) {
+ echo '<div class="error">The save directory "'.htmlencode($uploaddir).'" is not writable!<br />
+ This must be fixed before any files can be uploaded!</div>';
+ die(include_once($footer));
+ }
// Check if user initiates upload process and run upload process
if(isset($_POST['Title'])){
***************
*** 66,70 ****
}
! echo('<br><br><div><a href="../index.php">[Return to File Manager]</a></div>');
! include_once($footer); ?>
\ No newline at end of file
--- 71,75 ----
}
! echo('<br /><br /><div><a href="../index.php">[Return to File Manager]</a></div>');
! include_once($footer); ?>
|