Changeset 1121 for trunk/smf/Sources/ManageAttachments.php
- Timestamp:
- 03/29/10 15:37:29 (2 years ago)
- File:
-
- 1 edited
-
trunk/smf/Sources/ManageAttachments.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/smf/Sources/ManageAttachments.php
r1048 r1121 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1.1 0*8 * Software Version: SMF 1.1.11 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 10 * Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) * … … 339 339 'downloads' => $row['downloads'], 340 340 'href' => $row['attachmentType'] == 1 ? $modSettings['custom_avatar_url'] . '/' . $row['filename'] : ($scripturl . '?action=dlattach;' . ($context['browse_type'] == 'avatars' ? 'type=avatar;' : 'topic=' . $row['ID_TOPIC'] . '.0;') . 'id=' . $row['ID_ATTACH']), 341 'link' => '<a href="' . ($row['attachmentType'] == 1 ? $modSettings['custom_avatar_url'] . '/' . $row['filename'] : ($scripturl . '?action=dlattach;' . ($context['browse_type'] == 'avatars' ? 'type=avatar;' : 'topic=' . $row['ID_TOPIC'] . '.0;') . 'id=' . $row['ID_ATTACH'])) . '"' . (empty($row['width']) || empty($row['height']) ? '' : ' onclick="return reqWin(this.href + \'' . ($ modSettings['custom_avatar_url']? '' : ';image') . '\', ' . ($row['width'] + 20) . ', ' . ($row['height'] + 20) . ', true);"') . '>' . htmlspecialchars($row['filename']) . '</a>'341 'link' => '<a href="' . ($row['attachmentType'] == 1 ? $modSettings['custom_avatar_url'] . '/' . $row['filename'] : ($scripturl . '?action=dlattach;' . ($context['browse_type'] == 'avatars' ? 'type=avatar;' : 'topic=' . $row['ID_TOPIC'] . '.0;') . 'id=' . $row['ID_ATTACH'])) . '"' . (empty($row['width']) || empty($row['height']) ? '' : ' onclick="return reqWin(this.href + \'' . ($row['attachmentType'] == 1 ? '' : ';image') . '\', ' . ($row['width'] + 20) . ', ' . ($row['height'] + 20) . ', true);"') . '>' . htmlspecialchars($row['filename']) . '</a>' 342 342 ), 343 343 'topic' => $row['ID_TOPIC'], … … 562 562 SELECT 563 563 a.filename, a.file_hash, a.attachmentType, a.ID_ATTACH, a.ID_MEMBER" . ($query_type == 'messages' ? ', m.ID_MSG' : ', a.ID_MSG') . ", 564 IFNULL(thumb.ID_ATTACH, 0) AS ID_THUMB, thumb.filename AS thumb_filename, thumb_parent.ID_ATTACH AS ID_PARENT 564 IFNULL(thumb.ID_ATTACH, 0) AS ID_THUMB, thumb.filename AS thumb_filename, thumb_parent.ID_ATTACH AS ID_PARENT, 565 thumb.file_hash as thumb_file_hash 565 566 FROM ({$db_prefix}attachments AS a" .($query_type == 'members' ? ", {$db_prefix}members AS mem" : ($query_type == 'messages' ? ", {$db_prefix}messages AS m" : '')) . ") 566 567 LEFT JOIN {$db_prefix}attachments AS thumb ON (thumb.ID_ATTACH = a.ID_THUMB) … … 586 587 if (!empty($row['ID_THUMB']) && $autoThumbRemoval) 587 588 { 588 $thumb_filename = getAttachmentFilename($row['thumb_filename'], $row['ID_THUMB'], false, $row[' file_hash']);589 $thumb_filename = getAttachmentFilename($row['thumb_filename'], $row['ID_THUMB'], false, $row['thumb_file_hash']); 589 590 @unlink($thumb_filename); 590 591 $attach[] = $row['ID_THUMB'];
Note: See TracChangeset
for help on using the changeset viewer.
![[infoarena] development](/chrome/site/logo.png)