Hi,
maybe that has been asked before but I didn't have any luck searching for "_" - way to many mathces...
I have directories under .\galleries that have "_" in their name, e.g. "Christmas_2019". For those the category name is then "Christmas 2019" with SPACE instead of "_". Any way to change that behavior?
Thanks!
Thomas
Piwigo 2.10.1 Check for upgrade
Operating system: Linux
PHP: 7.3.13 (Show info) [2020-01-10 22:27:09]
MySQL: 5.5.60-0+deb7u1-log [2020-01-10 22:27:09]
Graphics Library: External ImageMagick 6.8.9-9
Offline
There are 3 places (except one unrelated in ./themes/modus/admin/admin.inc.php) found for a
grep -r "str_replace( *'_' *, *' '" . ./admin/element_set_ranks.php: $thumbnail_name = str_replace('_', ' ', $file_wo_ext); ./admin/site_update.php: 'name' => str_replace('_', ' ', $dir), ./include/functions.inc.php: return str_replace('_',' ',get_filename_wo_extension($filename));
of which the one in ./admin/site_update.php where the directories are looped seems to be related. However, I don't know what exactly would happen if that was changed.. probably only new directories would be treated, worst case you might end up with duplicated category names with and without underscore (though it doesn't look like, but I didn't investigate deeper).
Btw, I think having spaces instead of underscores for display purposes is nice. Category URIs are generated with underscore again.
Offline
Thanks for the quick answer. Better not touch those places in the code :-)
I usually rename my categories after sync anyways to nicer names. So I can live with the replacement since its overwritten anyways. I only need to keep that in mind for the required SQL...
Offline