•  » Engine
  •  » $conf['data_location']

#1 2012-12-14 14:50:05

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

$conf['data_location']

Hello

on config_default.inc.php we have :

Code:

$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 :

Code:

$conf['data_location'] = PHPWG_ROOT_PATH.'_data/';

(and same thing for $conf['upload_dir'])

can this induce other bugs ?

Offline

 

#2 2012-12-14 17:45:06

rvelices
Former Piwigo Team
2005-12-29
1960

Re: $conf['data_location']

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

 

#3 2012-12-14 17:47:10

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: $conf['data_location']

I don't see any occurrence of $conf['data_location'] in url functions ... (and it sounds very strange for me)

Offline

 

#4 2012-12-14 18:28:54

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: $conf['data_location']

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

 

#5 2012-12-14 19:18:49

rvelices
Former Piwigo Team
2005-12-29
1960

Re: $conf['data_location']

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

 

#6 2012-12-14 19:30:04

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: $conf['data_location']

ah ok, it would be a side-side-side-effect :-)

Offline

 
  •  » Engine
  •  » $conf['data_location']

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2025 · Contact