summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2021-01-08 22:53:12 -0500
committerSolomon Peachy <pizza@shaftnet.org>2021-01-08 22:53:12 -0500
commit06c0408d6c4656f37608659ee5ccf8ece85a5c95 (patch)
tree95d24099d000129a303b8bbc3237d67fa211d549
parentf4d5f3ebf9148806fee1746667dbd6d12efd32f4 (diff)
downloadpo-06c0408d6c4656f37608659ee5ccf8ece85a5c95.tar.gz
po-06c0408d6c4656f37608659ee5ccf8ece85a5c95.tar.bz2
po-06c0408d6c4656f37608659ee5ccf8ece85a5c95.zip
[misc] In the repository volumes, use 'orig' and 'thumbs'
instea of 00000 and 00001, respectively.
-rw-r--r--src/include/import.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/include/import.php b/src/include/import.php
index 5d6a3c5..c6dd9cf 100644
--- a/src/include/import.php
+++ b/src/include/import.php
@@ -100,8 +100,8 @@ function get_current_volume($database, $image_file) {
continue;
} else {
/* if the next volume does not exist, try to create it */
- mkdir($image_repository_path."/".$new_volume."/00000", 0700, TRUE);
- mkdir($image_repository_path."/".$new_volume."/00001", 0700, TRUE);
+ mkdir($image_repository_path."/".$new_volume."/orig", 0700, TRUE);
+ mkdir($image_repository_path."/".$new_volume."/thumb", 0700, TRUE);
if (($directory_handle = @opendir($image_repository_path."/".$new_volume))) {
closedir($directory_handle);
break;
@@ -399,7 +399,7 @@ function photo_import_single($database, $index, &$image_data, &$output) {
$next_version = pg_fetch_row(pg_query($database, "select nextval('photo_version_id_sequence')"));
$version_id = $next_version[0];
- $hires_name = $current_volume . "/00000/" . $photo_id . "_" . $version_id ."_". "_0_orig." . $original_file_type;
+ $hires_name = $current_volume . "/orig/" . $photo_id . "_" . $version_id ."_". "_0_orig." . $original_file_type;
if (!$master_photo_id) {
$output .= "<p>".sprintf($strings['import_importing_into_folder'], $original_name, $mime_type[$original_file_type]['name'], emit_a(generate_link('folder', $image_data['folder']), "<strong>$target_folder[caption]</strong>"))."</p>";
@@ -606,7 +606,7 @@ function photo_import_single($database, $index, &$image_data, &$output) {
/* Now for the XMP sidecar, if present. Masters only. */
if ($result && !$master_photo_id && isset($image_data['sidecar'])) {
- $xmp_file = $current_volume . "/00001/".$photo_id."_".$version_id."_0_orig.xmp";
+ $xmp_file = $current_volume . "/thumb/".$photo_id."_".$version_id."_0_orig.xmp";
if (!copy($image_data['sidecar'], $xmp_file)) {
$result = FALSE;
echo "<li><b>can't copy $image_data[sidecar] to $xmp_file</b></li>\n";
@@ -1381,7 +1381,7 @@ function import_generate_all_scaled($input_file_name, $multi_page_parameter,
$raw = sha1(sprintf("%d %d %d %s %s", time(), $photo_id, $version_id, $po_options[$size_key."_sizecode"], ($watermark? "_wm$watermark" : '')));
- $output_file_name = "$current_volume/00001/$raw" . "." . $po_options[$size_key."_format"];
+ $output_file_name = "$current_volume/thumb/$raw" . "." . $po_options[$size_key."_format"];
$outfiles[] = $output_file_name;