summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@red.(none)>2009-08-10 17:09:56 -0400
committerroot <root@red.(none)>2009-08-10 17:09:56 -0400
commitb60c7c57c227d326bb23c6c96e61cf6702a09ce5 (patch)
treec02c4fb04afb80ecbb041cc6d9c393c7f6658fa4 /frontend
parentHave upload respond in plaintext, not HTML (so long as authentication succeeds) (diff)
downloadingenue-b60c7c57c227d326bb23c6c96e61cf6702a09ce5.tar.gz
ingenue-b60c7c57c227d326bb23c6c96e61cf6702a09ce5.tar.bz2
ingenue-b60c7c57c227d326bb23c6c96e61cf6702a09ce5.zip
Remove build- prefix from completed builds; todo
Diffstat (limited to 'frontend')
-rw-r--r--frontend/pages/builds/download.php2
-rw-r--r--frontend/pages/upload.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/frontend/pages/builds/download.php b/frontend/pages/builds/download.php
index 759b5c4..f472046 100644
--- a/frontend/pages/builds/download.php
+++ b/frontend/pages/builds/download.php
@@ -17,7 +17,7 @@ function init_builds_download(&$S) {
debug('builds_download', 'Permission denied');
return '404';
}
- $files=glob(COMPLETED.'/build-'.$build->id.'.*');
+ $files=glob(COMPLETED.'/'.$build->id.'.*');
if (count($files)) {
if (count($files) > 1) {
debug('builds_download', 'extraneous file(s) found - don\'t know which to give them');
diff --git a/frontend/pages/upload.php b/frontend/pages/upload.php
index d8dd4ec..a854199 100644
--- a/frontend/pages/upload.php
+++ b/frontend/pages/upload.php
@@ -24,10 +24,10 @@ function body_upload(&$S) {
debug('upload', 'Got uploaded file '.$_FILES['file']['name'].' at '.$_FILES['file']['tmp_name']);
$name=basename($_FILES['file']['name']);
$ext=substr($name, strpos($name, '.'));
- debug('upload', $_FILES['file']['tmp_name'].' -> '.COMPLETED."/build-$build->id$ext");
+ debug('upload', $_FILES['file']['tmp_name'].' -> '.COMPLETED."/$build->id$ext");
if (!is_writable(COMPLETED))
die('No write permissions');
- if (!move_uploaded_file($_FILES['file']['tmp_name'], COMPLETED."/build-$build->id$ext"))
+ if (!move_uploaded_file($_FILES['file']['tmp_name'], COMPLETED."/$build->id$ext"))
die('Move file failed');
echo 'Upload successful';
}