[wp-trac] Re: [WordPress Trac] #2682: Remove db store of absolute
path for uploads
WordPress Trac
wp-trac at lists.automattic.com
Thu Jun 8 12:33:00 GMT 2006
#2682: Remove db store of absolute path for uploads
-----------------------------+----------------------------------------------
Id: 2682 | Status: new
Component: Administration | Modified: Thu Jun 8 12:33:00 2006
Severity: normal | Milestone: 2.1
Priority: normal | Version: 2.1
Owner: ryanscheuermann | Reporter: ryanscheuermann
-----------------------------+----------------------------------------------
Comment (by Libertus):
Ryan,
{{{
+if ( @file_exists($thumb) ) {
+ $attachdata['thumb'] = basename($thumb);
+}
}}}
This has the unintended side-effect of forcing thumbnails to be in the
same directory as the image, even if a 'thumbnail_filename' filter says
otherwise.
To fix, I modified wp_create_thumbnail() to return $thumb; instead of
return $thumbpath; and your patch to read:
{{{
+if ( @file_exists(dirname($relfile).'/'.$thumb) ) {
+ $attachdata['thumb'] = $thumb;
+}
}}}
What do you think?
--
Ticket URL: <http://trac.wordpress.org/ticket/2682>
WordPress Trac <http://wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list