Hello
on config_default.inc.php we have :
$conf['data_location'] = '_data/';
this cause some (minor) bugs with AJAX files, for example
plugins\SmartAlbums\include\count_images.php
plugins\CryptograPHP\securimage\securimage_show.php
these files define a proper PHPWG_ROOT_PATH and include common.inc.php
as a result, sometimes, a folder "_data" is created inside the script folder where it should not be
the solution :
$conf['data_location'] = PHPWG_ROOT_PATH.'_data/';
(and same thing for $conf['upload_dir'])
can this induce other bugs ?
Offline
mistic100 wrote:
...can this induce other bugs ?
Yes because data_location is also used to generate urls. The bug would appear if absolute urls are needed (emails, web service, rss ...) or if question_mark_in_urls = false
Offline
I don't see any occurrence of $conf['data_location'] in url functions ... (and it sounds very strange for me)
Offline
I see that in the core and many plugins
PHPWG_ROOT_PATH.$conf['data_location']
is used and not simply $conf['data_location'], same thing for PWG_LOCAL_DIR
I would prefer to include PHPWG_ROOT_PATH directly in these variables, but... too late right ?
Offline
mistic100 wrote:
I don't see any occurrence of $conf['data_location'] in url functions ... (and it sounds very strange for me)
PWG_DERIVATIVE_DIR and PWG_COMBINED_DIR -> are used as relative to the root piwigo
when opening a file, it is ROOT_PATH . PWG_COMBINED_DIR ...
when an url, it is get_root_url() . PWG_COMBINED_DIR ...
Offline
ah ok, it would be a side-side-side-effect :-)
Offline