Thanks for a very useful plugin.
I have unfortunately discovered an annoying bug.
When using multisite (possibly also on single blog) the link to csv files on public lists has the wrong url.
Where it should be:
http://www.website.com/wp-content/uploads/users_csv/user_list_4.csv it outputs
I did som debugging and localized the bug to
amr-users-csv.php:172). Line 175 reads:
$csvurl = str_replace($upload_dir,$upload_url, $csvfile); // get the part after theupload dir
this is clearly wrong, since
$upload_dir = wp_upload_dir() is an array and
$upload_url = $upload_dir['baseurl'] is a string.
I suppose it should read:
$csvurl = str_replace($upload_dir['basedir'],$upload_dir['baseurl'], $csvfile); // get the part after theupload dir
basedir (local filesystem path) part of
baseurl (url to uploads directory).
However, also this would fail on multisite, since it appears that csv-files are placed under
/wp-content/uploads/users_csv/ and not in the blog-specific upload directories
/wp-content/blogs.dir/X/files (actual directory, X is blog id) accessible at
SUBBLOGURL/files (public url) which are what
wp_upload_dir() will return for a specific blog in a multisite install (as
Maybe there is a good reason for using this special directory though since four lines in
amr-users-csv.php:152-155) specifically rewrites the upload path from blog-specific values to "/wp-content/uploads/users_csv/". In that case, I guess the fix that is needed only concerns
amr_users_get_csv_url where this special directory should be used instead of the blog specific ones.