actually no, but it does return with the old  /home/funk/wp-content/uploads/

{ ["error"]=> string(142) "Unable to create directory /home1/tkdanimc/public_html/nikkisprite/wp-content/uploads/2012/06

string(71) "/home/tdoherty/public_html/nikkisprite.com/wp-content/themes/comicpress"

tkdanimc = old site
tdoherty = new site

the /home1/tkdanimc/public_html/nikkisprite/wp-content/uploads is what was found in the upload_path


so somewhere I cannot read where it doesn't strip out the old ABSPATH portion properly


-----Original Message----- From: Philip M. Hofer (Frumph)
Sent: Thursday, June 21, 2012 11:32 AM
To: wp-testers@lists.automattic.com
Subject: Re: [wp-testers] sorta an off the wall bug

upload_path = "/home/funk/wp-content/uploads
SAVED ABSPATH IN upload_path = "/home/funk"
NEW CURRENT ABSPATH  = "/home/foo"

echo substr( WP_CONTENT_DIR, strlen( ABSPATH ) ).'uploads';

will produce "/home/funk/wp-content/uploads".





-----Original Message----- From: Otto
Sent: Thursday, June 21, 2012 11:28 AM
To: wp-testers@lists.automattic.com
Subject: Re: [wp-testers] sorta an off the wall bug

On Thu, Jun 21, 2012 at 10:31 AM, Andrew Nacin <w...@andrewnacin.com> wrote:
But is that what is occurring here? Doesn't seem like it, based on my read.
Frumph?


Re-reading it, I'm not sure what he's saying, actually.

if ( !$upload_path = get_option( 'upload_path' ) ) {
 $upload_path = substr( WP_CONTENT_DIR, strlen( ABSPATH ) ) . '/uploads';
 update_option( 'upload_path', $upload_path );
}
update_option( 'fileupload_url', get_option( 'siteurl' ) . '/' .
$upload_path );

What this is doing, is hardcoding the current abspath and the
WP_CONTENT_DIR
with /uploads resulting in the absolute hardcoding of that location


See, that's not what that code does.

Lets say:

ABSPATH = "/home/foo/"
WP_CONTENT_DIR = "/home/foo/wp-content/"

In which case this code:
echo substr( WP_CONTENT_DIR, strlen( ABSPATH ) ).'uploads';

will produce "wp-content/uploads".

In other words, it's not producing an absolute path for the
upload_path at all, nor should it.

But this is just the default. Notice that only gets run when
upload_path has not been set.


But yes, if an absolute path has been set in the upload_path field
manually, by whatever means, then that's going to be used in an
absolute manner. It doesn't set the absolute path there by default.
The default for a new installation is the relative
"wp-content/uploads" as per the above code.

-Otto
_______________________________________________
wp-testers mailing list
wp-testers@lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-testers

_______________________________________________
wp-testers mailing list
wp-testers@lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-testers
_______________________________________________
wp-testers mailing list
wp-testers@lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-testers

Reply via email to