]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix uploading to subfolders
authorRobin Appelman <icewind1991@gmail.com>
Tue, 10 Jan 2012 15:47:52 +0000 (16:47 +0100)
committerRobin Appelman <icewind1991@gmail.com>
Tue, 10 Jan 2012 15:48:29 +0000 (16:48 +0100)
files/templates/index.php

index fd1158a029777dd4adf48c1d8d286f67662d3836..9ebfa41cef22758bed696a1fee3948e51799a5cd 100644 (file)
@@ -1,4 +1,3 @@
-<input type="hidden" name="dir" value="<?php echo $_['dir'] ?>" id="dir">
 <div id="controls">
        <?php echo($_['breadcrumb']); ?>
        <?php if (!isset($_['readonly']) || !$_['readonly']):?>
@@ -17,6 +16,7 @@
                                <form data-upload-id='1' class="file_upload_form" action="ajax/upload.php" method="post" enctype="multipart/form-data" target="file_upload_target_1">
                                        <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $_['uploadMaxFilesize'] ?>" id="max_upload">
                                        <input type="hidden" class="max_human_file_size" value="(max <?php echo $_['uploadMaxHumanFilesize']; ?>)">
+                                       <input type="hidden" name="dir" value="<?php echo $_['dir'] ?>" id="dir">
                                        <button class="file_upload_filename"><img class='svg action' alt="Upload" src="<?php echo image_path("core", "actions/upload.svg"); ?>" /></button>
                                        <input class="file_upload_start" type="file" name='files[]'/>
                                                <a href="#" class="file_upload_button_wrapper" onclick="return false;" title="<?php echo $l->t('Upload'); echo  ' max. '.$_['uploadMaxHumanFilesize'] ?>"></a>
@@ -25,6 +25,8 @@
                        </div>
                </div>
                <div id="file_action_panel"></div>
+       <?php else:?>
+               <input type="hidden" name="dir" value="<?php echo $_['dir'] ?>" id="dir">
        <?php endif;?>
 </div>
 <div id='notification'></div>