[misc] Have next/prev links remember display size
This commit is contained in:
parent
fc6d01a54f
commit
49f9640450
1
CHANGES
1
CHANGES
|
@ -48,6 +48,7 @@ v2.38 (Unreleased)
|
|||
[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
|
||||
[fix] Respect embedded (and non-sRGB) ICC profiles when printing
|
||||
[misc] Have next/prev photo links remember display size
|
||||
|
||||
v2.37.1 (December 3, 2012)
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ if ($photo_id || $version) {
|
|||
select photo.identifier, users, folder, location, caption, date_of_exposure, get_image_path(photo_version.identifier, 0) as original_path,
|
||||
photo.access_rights, copyright_statement, views,
|
||||
(select avg(rating.value) from rating where rating.photo=photo.identifier) as rating,
|
||||
hide_original, author, title,
|
||||
hide_original, author, title,
|
||||
caption_writer, category, credit, source,
|
||||
headline, instructions, transmission_reference,
|
||||
supplemental_category, web_statement, colorspace, orientation, date_added,
|
||||
|
@ -141,21 +141,21 @@ if ($album_id) {
|
|||
$next_idx = FALSE;
|
||||
$prev_idx = FALSE;
|
||||
|
||||
for ($i=0; $i < pg_num_rows($photos_in_container); $i++) {
|
||||
for ($i=0; $i < pg_num_rows($photos_in_container); $i++) {
|
||||
$tmp = pg_fetch_row($photos_in_container, $i);
|
||||
if (($album_id === FALSE && $tmp[0] == $photo_id) ||
|
||||
if (($album_id === FALSE && $tmp[0] == $photo_id) ||
|
||||
($album_id && $tmp[1] == $version)) {
|
||||
if ($i+1 < pg_num_rows($photos_in_container)) {
|
||||
$next_idx = $i+1;
|
||||
$tmp = pg_fetch_row($photos_in_container, $next_idx);
|
||||
$next = $tmp[0];
|
||||
$next_ver = $tmp[1];
|
||||
$next_ver = $tmp[1];
|
||||
}
|
||||
if ($i-1 >= 0) {
|
||||
$prev_idx = $i-1;
|
||||
$tmp = pg_fetch_row($photos_in_container, $prev_idx);
|
||||
$prev = $tmp[0];
|
||||
$prev_ver = $tmp[1];
|
||||
$prev_ver = $tmp[1];
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -186,9 +186,9 @@ if ($photo_data['title'] != "")
|
|||
$hdr_txt = "$photo_data[title] (# $photo_id:$version)";
|
||||
elseif ($photo_data['caption'] != "")
|
||||
$hdr_txt = "$photo_data[caption] (# $photo_id:$version)";
|
||||
else
|
||||
else
|
||||
$hdr_txt = "$photo_data[original_image_name] (# $photo_id:$version) (".$strings['photo_no_title'].")";
|
||||
|
||||
|
||||
site_header($hdr_txt);
|
||||
|
||||
$user_display_string = disp_user_string($database, $owner_id);
|
||||
|
@ -219,7 +219,7 @@ if ($album_id) {
|
|||
$sql_album_access_rights"));
|
||||
if ($album_data['identifier']) {
|
||||
$path_to_album = get_path_to_album($database, $album_id);
|
||||
$path_info = $path_to_album . " : ". $zanza;
|
||||
$path_info = $path_to_album . " : ". $zanza;
|
||||
} else {
|
||||
$path_info = " : ".$strings['photo_hidden_path'] ." : " . $zanza;
|
||||
}
|
||||
|
@ -246,7 +246,7 @@ if ($prev_idx !== FALSE) {
|
|||
print "<img src=\"".generate_link('image', $prev, array('ver'=>$prev_ver, 'size'=>1))."\" alt=\"$prev:$prev_ver\" />";
|
||||
print "</div>\n";
|
||||
$on_mouse_over ="TagToTip('prev_tip', OFFSETX, 12, ABOVE, true);";
|
||||
print sprintf($thm_elem['button.previous'],
|
||||
print sprintf($thm_elem['button.previous'],
|
||||
generate_link('photo', $prev, array('ver'=>$prev_ver, 'detail_info'=>$detail_info,'album'=>$album_id)),
|
||||
$strings['generic_photo'],
|
||||
"onmouseover=\"$on_mouse_over\" onmouseout=\"UnTip();\" ");
|
||||
|
@ -264,8 +264,8 @@ if ($next_idx !== FALSE) {
|
|||
print "</div>\n";
|
||||
$on_mouse_over ="TagToTip('next_tip', OFFSETX, 12, ABOVE, true, LEFT, true);";
|
||||
|
||||
print sprintf($thm_elem['button.next'],
|
||||
generate_link('photo', $next, array('ver'=>$next_ver, 'detail_info'=>$detail_info,'album'=>$album_id)),
|
||||
print sprintf($thm_elem['button.next'],
|
||||
generate_link('photo', $next, array('ver'=>$next_ver, 'detail_info'=>$detail_info,'album'=>$album_id, 'size'=>$size)),
|
||||
$strings['generic_photo'],
|
||||
"onmouseover=\"$on_mouse_over\" onmouseout=\"UnTip();\" ");
|
||||
}
|
||||
|
@ -281,7 +281,7 @@ if (($po_user['id'] == $owner_id) || ($po_user['type'] == PO_USER_TYPE_ADMIN))
|
|||
print "<div class=\"navigatorf\">";
|
||||
print "<ul>";
|
||||
|
||||
$photo_args = array('ver' => $version,
|
||||
$photo_args = array('ver' => $version,
|
||||
'detail_info' => 1);
|
||||
if ($album_id)
|
||||
$photo_args['album'] = $album_id;
|
||||
|
@ -374,7 +374,7 @@ switch ($detail_info) {
|
|||
if ($album_id && ($album_data['description'] != "")) {
|
||||
print "<tr>".emit_td($strings['photo_album_descr']);
|
||||
print "<td>$album_data[description]</td></tr>\n";
|
||||
}
|
||||
}
|
||||
if ($folder_data['description'] != "") {
|
||||
print "<tr>".emit_td($strings['photo_folder_descr']);
|
||||
print "<td>$folder_data[description]</td></tr>\n";
|
||||
|
@ -458,7 +458,7 @@ switch ($detail_info) {
|
|||
}
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
if (($photo_data['date_changed'] != "") &&
|
||||
if (($photo_data['date_changed'] != "") &&
|
||||
($photo_data['date_changed'] != $photo_data['date_of_exposure']) &&
|
||||
($photo_data['date_changed'] != $photo_data['date_added'])) {
|
||||
print "<tr>".emit_td($strings['generic_changed']);
|
||||
|
@ -512,7 +512,7 @@ switch ($detail_info) {
|
|||
if ($photo_data['web_statement']) {
|
||||
if (strncmp($photo_data['web_statement'], "http", 4) == 0) {
|
||||
$photo_data['web_statement'] = emit_a($photo_data['web_statement'], $photo_data['web_statement']);
|
||||
}
|
||||
}
|
||||
print "<tr>".emit_td($strings['generic_web_statement']);
|
||||
print emit_td($photo_data['web_statement']);
|
||||
print "</tr>\n";
|
||||
|
@ -526,7 +526,7 @@ switch ($detail_info) {
|
|||
select camera, film, scan_resolution,
|
||||
aperture, focal_length, shutter, camera_metering, camera_program,
|
||||
flash_mode, exposure_comp, flash_comp, ev_difference, iso_override,
|
||||
scan_bitdepth, scan_multiscan,
|
||||
scan_bitdepth, scan_multiscan,
|
||||
latitude, longitude, altitude, img_direction
|
||||
from photo_tech
|
||||
where photo=$photo_id", "photo_tech_$photo_id");
|
||||
|
@ -655,7 +655,7 @@ switch ($detail_info) {
|
|||
print emit_td(emit_a("http://maps.google.com/maps?q=$photo_tech[latitude]+$photo_tech[longitude]&t=h" ,$foo, "target=\"_new\""));
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
|
||||
|
||||
if (($po_user['id'] == $owner_id) || ($po_user['type'] == PO_USER_TYPE_ADMIN)) {
|
||||
if ($photo_tech) {
|
||||
print "<tr>".emit_td(emit_a(generate_link('photo', $photo_id, array('ver'=>$version, 'detail_info'=>98,'album'=>$album_id)), $strings['photo_full_exif']));
|
||||
|
@ -727,7 +727,7 @@ switch ($detail_info) {
|
|||
}
|
||||
} else {
|
||||
include('include/exif.php');
|
||||
|
||||
|
||||
$exif2 = read_exif_data_raw($image_path, 0);
|
||||
|
||||
foreach ($exif2 as $key => $section) {
|
||||
|
@ -768,11 +768,11 @@ switch ($detail_info) {
|
|||
break;
|
||||
case 5:
|
||||
$photo_versions = get_generic_query_all($database, "
|
||||
select photo_version.identifier, key, date_of_creation, comment,
|
||||
original_image_name,
|
||||
select photo_version.identifier, key, date_of_creation, comment,
|
||||
original_image_name,
|
||||
date_changed, master, path, x_res, y_res, filesize
|
||||
from photo_version, files
|
||||
where photo=$photo_id
|
||||
where photo=$photo_id
|
||||
and files.version = photo_version.identifier
|
||||
and files.size = 0
|
||||
order by master desc, key asc", "versions.$photo_id");
|
||||
|
@ -882,7 +882,7 @@ switch ($detail_info) {
|
|||
"$rating[first_name] $rating[last_name]"));
|
||||
}
|
||||
print emit_td(emit_date_html($rating['date_of_creation'], 'date'));
|
||||
if (($po_user['id'] == $rating['users']) ||
|
||||
if (($po_user['id'] == $rating['users']) ||
|
||||
($po_user['type'] == PO_USER_TYPE_ADMIN)) {
|
||||
print emit_td("<a href=\"photo.rating.php?action=edit&rating=$rating[identifier]&album=$album_id\">".$strings['generic_edit']."</a>");
|
||||
print emit_td("<a href=\"photo.rating.php?action=delete&rating=$rating[identifier]&album=$album_id\">".$strings['generic_delete']."</a>");
|
||||
|
@ -933,7 +933,7 @@ if ($po_user['id'] == $owner_id || $po_user['type'] == PO_USER_TYPE_ADMIN) {
|
|||
|
||||
if ($po_user['type'] > PO_USER_TYPE_CLIENT) {
|
||||
print $thm_elem['button.set.as.watermark'];
|
||||
}
|
||||
}
|
||||
|
||||
if ($po_user['type'] >= PO_USER_TYPE_CLIENT) {
|
||||
print $thm_elem['button.add.to.spool'];
|
||||
|
@ -959,7 +959,7 @@ if ($po_user['type'] >= PO_USER_TYPE_CLIENT) {
|
|||
|
||||
// print emit_spool_actions($database, $po_user['id']);
|
||||
// print emit_import_actions($database, $po_user['id']);
|
||||
// print emit_print_actions($database, $po_user['id']);
|
||||
// print emit_print_actions($database, $po_user['id']);
|
||||
}
|
||||
|
||||
print "</div>";
|
||||
|
|
Loading…
Reference in New Issue