Skip to content

Instantly share code, notes, and snippets.

@brendo
Created January 18, 2012 06:23
Show Gist options
  • Save brendo/1631424 to your computer and use it in GitHub Desktop.
Save brendo/1631424 to your computer and use it in GitHub Desktop.
diff --git a/fields/field.advancedupload.php b/fields/field.advancedupload.php
index b13f6e3..6cc206c 100755
--- a/fields/field.advancedupload.php
+++ b/fields/field.advancedupload.php
@@ -143,8 +143,7 @@
'pages',
'utilities'
);
- $directories = General::listDirStructure(WORKSPACE, true, 'asc', DOCROOT, $ignore);
-
+ $directories = General::listDirStructure(WORKSPACE, null, true, DOCROOT, $ignore);
$label = Widget::Label('Destination Directory');
$options = array(
@@ -462,7 +461,7 @@
)
);
- if ($simulate) return;
+ if($simulate && is_null($entry_id)) return $data;
// No file sent, cleanup existing:
if (is_null($data) or $data == '' or (isset($data['error']) and $data['error'] != UPLOAD_ERR_OK)) {
@@ -632,4 +631,4 @@
}
}
-?>
\ No newline at end of file
+?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment