[geeklog-devel] Web Installer and integrated online config testing
Dirk Haun
dirk at haun-online.de
Sat Sep 1 15:48:49 EDT 2007
Blaine Lang wrote:
>Maybe even have public/index.php redirect to the admin/install/index.php
>if the site has not been installed yet.
Heh, I had the same idea earlier today. There's a bit of a chicken-and-
egg problem here, since you don't have $_CONF['site_url'] yet and
therefore can't safely do the redirect.
I tried this (in lib-common.php):
require_once 'siteconfig.php' ;
if ($_CONF['path'] == '/path/to/geeklog/') {
echo COM_refresh("admin/install/");
exit;
}
require_once $_CONF['path_system'] . 'classes/config.class.php';
That works for the index.php but not if you come in through, say, the
staticpages directory. We can't use "/admin/install" since the site may
be in a subdirectory. And figuring out the correct current URL and go
from there is a bit nasty (see COM_getCurrentURL).
bye, Dirk
--
http://www.haun-online.de/
http://spam.tinyweb.net/
More information about the geeklog-devel
mailing list