User upload directory is not anymore spool/uploads/temp but spool/tmp.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 28 Mar 2008 09:42:16 +0000 (10:42 +0100)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 28 Mar 2008 09:42:16 +0000 (10:42 +0100)
spool/uploads was symlinked to htdocs/upload (wiki requirement).

Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
Makefile
classes/plupload.php

index bbc1afb..e53cc55 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -39,14 +39,10 @@ q:
 
 core: spool/templates_c spool/mails_c include/globals.inc.php configs/platal.cron htdocs/.htaccess spool/conf
 
-spool/templates_c spool/mails_c spool/uploads spool/conf spool/uploads/temp:
+spool/templates_c spool/mails_c spool/uploads spool/conf:
        mkdir -p $@
        chmod o+w $@
 
-spool/uploads/temp/.htaccess: spool/uploads/temp Makefile
-       echo "Order deny,allow" > $@
-       echo "Deny from all" >> $@
-
 htdocs/.htaccess: htdocs/.htaccess.in Makefile
        @REWRITE_BASE="/~$$(id -un)"; \
        test "$$REWRITE_BASE" = "/~web" && REWRITE_BASE="/"; \
@@ -68,7 +64,7 @@ wiki: get-wiki build-wiki
 
 build-wiki: $(WIKI_NEEDS) | get-wiki
 
-htdocs/uploads: spool/uploads/temp/.htaccess
+htdocs/uploads:
        cd htdocs && ln -sf ../spool/uploads
 
 htdocs/wiki:
index 7184bbd..ea192f0 100644 (file)
@@ -49,7 +49,7 @@ class PlUpload
     private function makeFilename($file_id)
     {
         global $globals;
-        $filename = $globals->spoolroot . '/spool/uploads/temp/';
+        $filename = $globals->spoolroot . '/spool/tmp/';
         if (!file_exists($filename)) {
             if (!mkdir($filename)) {
                 trigger_error('can\'t create upload directory: ' . $filename, E_USER_ERROR);
@@ -162,7 +162,7 @@ class PlUpload
     static public function listRawFiles($forlife = '*', $category = '*', $uniq = false, $basename = false)
     {
         global $globals;
-        $filename = $globals->spoolroot . '/spool/uploads/temp/';
+        $filename = $globals->spoolroot . '/spool/tmp/';
         $filename .= $forlife . '--' . $category;
         if (!$uniq) {
             $filename .= '--*';