diff --git a/CHANGES b/CHANGES index a641c10..987b056 100644 --- a/CHANGES +++ b/CHANGES @@ -74,6 +74,7 @@ v2.37.1 (December 3, 2012) [fix] Abort import if a DB insert fails [#466] [misc] Replace '@' with '{at}' in copyright blurb to deter spammers. [fix] Fix a couple of undefined variables. + [add] Include folder name in the export xml data. 2.37 (September 27, 2010) diff --git a/src/export.php b/src/export.php index 7ec00d7..85acbb2 100644 --- a/src/export.php +++ b/src/export.php @@ -1,7 +1,7 @@ array(0 => array("name" => "", "remark" => "", "master" => "")), "folder" => $photo_data['folder'], + "folder_name" => $photo_data['folder_name'], "author" => $photo_data['author'], "title" => $photo_data['title'], "keywords" => $keywords, @@ -203,7 +205,7 @@ for ($photos = 0; $photos < $num_photos; $photos++) { $image_data['file'][$versions]['master'] = $photo_version_single['master']; } - fwrite($xml_file_desciptor, create_xml_folder_header($image_data['folder'])); + fwrite($xml_file_desciptor, create_xml_folder_header($image_data['folder'], $image_data['folder_name'])); fwrite($xml_file_desciptor, create_xml_photo($image_data)); fwrite($xml_file_desciptor, create_xml_folder_footer()); break; diff --git a/src/include/export.php b/src/include/export.php index 2773f5f..504b236 100644 --- a/src/include/export.php +++ b/src/include/export.php @@ -1,7 +1,7 @@ \n"; } -function create_xml_folder_header($folder_id) { - return "\n"; +function create_xml_folder_header($folder_id, $folder_name) { + $folder_name = htmlspecialchars($folder_name, ENT_XML1, 'UTF-8'); + return "\n"; } function create_xml_folder_footer() { @@ -141,19 +142,6 @@ function create_xml_photo($image_data) { $xml_string .= "/>\n"; } - if (($image_data['storage_location_type'] && $image_data['storage_location_type'] != "null") || - ($image_data['storage_location_id'] && $image_data['storage_location_id'] != "null") || - ($image_data['storage_index'] && $image_data['storage_index'] != "null")) { - $xml_string .= "\n"; } - + if ($parts[1] == PO_EQUIPMENT_LENS) { $xml_string .= " \ No newline at end of file +?> diff --git a/src/po.dtd b/src/po.dtd index f9477bb..cc50b3d 100644 --- a/src/po.dtd +++ b/src/po.dtd @@ -61,11 +61,6 @@ altitude CDATA #IMPLIED direction CDATA #IMPLIED > - - - @@ -106,11 +101,12 @@ - + diff --git a/tools/backup/002_generate-backup.pl b/tools/backup/002_generate-backup.pl index d655adb..3d5d697 100644 --- a/tools/backup/002_generate-backup.pl +++ b/tools/backup/002_generate-backup.pl @@ -16,8 +16,8 @@ my ($size, $max, $count, $block); # configuration -my $root = "/mnt/bulk2/peachyphotos_repo"; # points to PO repository -my $db_backup = "db.backup.bz2"; # Lives in PO repo +my $root = "/mnt/bulk/peachyphotos_repo"; # points to PO repository +my $db_backup = "db.backup.xz"; # Lives in PO repo my $db_dsn = "dbname=photo"; # db dsn my $db_pass = "apache"; # db pass my $db_user = "apache"; # db user