diff options
| author | Nathan Kinkade <nkinkade@nkinka.de> | 2010-02-02 02:59:20 +0000 |
|---|---|---|
| committer | Nathan Kinkade <nkinkade@nkinka.de> | 2010-02-02 02:59:20 +0000 |
| commit | 9d0927dda936756f1f5003813f437d714fe481f8 (patch) | |
| tree | fe1b887345b37387ab0ddcfd78bf344f6150b6cc /modules/gallery/controllers/packager.php | |
| parent | a6f794c20dc3592bcaef17c622413c1b670a20d8 (diff) | |
| parent | 43985ea2fb137aa7d532617271e37d7c20def3c5 (diff) | |
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/gallery/controllers/packager.php')
| -rw-r--r-- | modules/gallery/controllers/packager.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/gallery/controllers/packager.php b/modules/gallery/controllers/packager.php index cb64f1bf..66626483 100644 --- a/modules/gallery/controllers/packager.php +++ b/modules/gallery/controllers/packager.php @@ -164,7 +164,7 @@ class Packager_Controller extends Controller { foreach($objects as $name => $file){ if ($file->getBasename() == "database.php") { continue; - } else if (basename($file->getPath()) == "logs") { + } else if (basename($file->getPath()) == "logs" && $file->getBasename() != ".htaccess") { continue; } @@ -172,8 +172,8 @@ class Packager_Controller extends Controller { $paths[] = "VARPATH . \"" . substr($name, strlen(VARPATH)) . "\""; } else { // @todo: serialize non-directories - print "IGNORING FILE: $name\n"; - return; + $files["VARPATH . \"" . substr($name, strlen(VARPATH)) . "\""] = + base64_encode(file_get_contents($name)); } } // Sort the paths so that the var file is stable @@ -185,6 +185,9 @@ class Packager_Controller extends Controller { foreach ($paths as $path) { fwrite($fd, "!file_exists($path) && mkdir($path);\n"); } + foreach ($files as $file => $contents) { + fwrite($fd, "file_put_contents($file, base64_decode(\"$contents\"));\n"); + } fclose($fd); } }
\ No newline at end of file |
