[fix] Printing to remote hosts was broken with newer CUPS

This commit is contained in:
Solomon Peachy 2021-01-28 20:30:10 -05:00
parent 06c0408d6c
commit 1aed81debf
2 changed files with 3 additions and 1 deletions

View File

@ -46,6 +46,7 @@ v2.38 (Unreleased)
[fix] PHP7-related error when importing images with an XMP/RDF 'Subject' tag
[fix] Use hash of various parameters for scaled image filenames
[fix] Get rid of support for magic_quotes_gpc; This means we now require PHP 5.4 or newer!
[fix] Fix printing on remote hosts with newer CUPS
v2.37.1 (December 3, 2012)

View File

@ -171,10 +171,11 @@ function photo_print_single($database, $single) {
}
# Set up printing.
$cmdline = "$sys_lp -d '$printer[queue_name]' ";
$cmdline = "$sys_lp";
if ($printer['hostname']) {
$cmdline .= " -h $printer[hostname] ";
}
$cmdline .= " -d '$printer[queue_name]' ";
$cmdline .= " -t '$single[photo]:$single[version]:$original_name' ";
$cmdline .= " -o PageSize=$printer[pagesize] -o PageRegion=$printer[pagesize] -o ImageableArea=$printer[pagesize] -o PaperDimension=$printer[pagesize] ";
foreach ($printer['options'] as $opt) {