summaryrefslogtreecommitdiff
path: root/modules/gallery
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-06-15 15:50:10 -0700
committerBharat Mediratta <bharat@menalto.com>2010-06-15 15:50:10 -0700
commit4d40cf62e98e7e2f103740a401a08606c73fe72d (patch)
tree0d58be5e4b969fae07be16ca08bb996b436d5699 /modules/gallery
parentd96ce71f1a35b8659bec7226f3902a052485b0f9 (diff)
Sort files by path in _dump_var() for consistent output.
Skip . and .. (PHP 5.3 iterators seem to include those now).
Diffstat (limited to 'modules/gallery')
-rw-r--r--modules/gallery/controllers/packager.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/gallery/controllers/packager.php b/modules/gallery/controllers/packager.php
index 6eafd9df..0ccfe743 100644
--- a/modules/gallery/controllers/packager.php
+++ b/modules/gallery/controllers/packager.php
@@ -163,9 +163,11 @@ class Packager_Controller extends Controller {
$paths = array();
foreach($objects as $name => $file){
- if ($file->getBasename() == "database.php") {
+ $path = $file->getPath();
+ $basename = $file->getBasename();
+ if ($basename == "database.php" || $basename == "." || $basename == "..") {
continue;
- } else if (basename($file->getPath()) == "logs" && $file->getBasename() != ".htaccess") {
+ } else if (basename($path) == "logs" && $basename != ".htaccess") {
continue;
}
@@ -186,6 +188,7 @@ class Packager_Controller extends Controller {
foreach ($paths as $path) {
fwrite($fd, "!file_exists($path) && mkdir($path);\n");
}
+ ksort($files);
foreach ($files as $file => $contents) {
fwrite($fd, "file_put_contents($file, base64_decode(\"$contents\"));\n");
}