[dev] Fwd: [Tickets] New ticket (114): Horde relocatability
Jason M. Felice
jfelice at cronosys.com
Sun Apr 25 10:40:12 PDT 2004
Quoting Chuck Hagenbuch <chuck at horde.org>:
> What do folks think of this idea? Any objections, anyone see any
> problems with
> it?
I really like it. Since there have been a few ideas flying around about
(essentially) being able to maintain registry.php from within the application,
this is a nice step forward.
Here's an idea to maintain flexibility and not have the dirname() call in this
file: what if Registry assumed that any relatives paths where relative to the
dirname() less DOCUMENT_ROOT. Any paths starting with '/' are still full
paths. That way someone could still install an app in a god-awful place if
they want.
Maybe that's overkill.
>
> ----- Forwarded message from bugs at bugs.horde.org -----
> Date: Fri, 23 Apr 2004 11:46:34 -0700 (PDT)
> From: bugs at bugs.horde.org
> Reply-To: bugs at bugs.horde.org
> Subject: [Tickets] New ticket (114): Horde relocatability
> To: bugs at lists.horde.org
>
> DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
>
> -Ticket 114
> -Queue: Horde Base
> -Created By:
>
> -Summary:
> Horde relocatability
>
> Comment by mike at nerone.org on Fri Apr 23 11:46:34 2004 (today):
> Currently, users are forced to edit registry.php when putting Horde in any
> hierarchy other than "/horde". The code already uses the "__FILE__" constant
> in other areas, and this can easily be used to remove this burden on users.
>
> An easy example of how useful this is is that it would allow someone to
> create a Horde-only site simply by setting the DocumentRoot to the horde
> directory. It also has the benefit of being trivially easy. My example below
> is a replacement for the horde stanza in registry.php. It only adds two
> lines and modifies three others. It works as-is, though a proper
> implementation would have a bit more sanity-checking, I should think. It
> should also look less kludgy, of course. :D
>
> ==========
> $webrootkludge = str_replace('/config/registry.php', '',
> str_replace($_SERVER['DOCUMENT_ROOT'], '', __FILE__));
> $webrootkludgecookie = $webrootkludge or $webrootkludgecookie = '/';
>
> $this->applications['horde'] = array(
> 'fileroot' => dirname(__FILE__) . '/..',
> 'webroot' => $webrootkludge,
> 'initial_page' => 'login.php',
> 'icon' => "$webrootkludge/graphics/home.gif",
> 'name' => _("Horde"),
> 'allow_guests' => true,
> 'status' => 'active',
> 'templates' => dirname(__FILE__) . '/../templates',
> 'cookie_domain' => $_SERVER['SERVER_NAME'],
> 'cookie_path' => $webrootkludgecookie,
> 'server_name' => $_SERVER['SERVER_NAME'],
> 'server_port' => $_SERVER['SERVER_PORT']
> );
> ==========
>
> The above is my change against 2.2.5 Final and that's what I posted this bug
> for, but my opinion is that it should be used for all future versions,
> unless, of course, this presents a specific problem. If that's the case,
> please enlighten me. I've actually tried to figure out why something so easy
> wasn't done already.
>
> --
>
>
> http://bugs.horde.org/details.php?id=114
>
> --
> This mail was automatically generated by Tickets (http://bugs.horde.org/).
>
> --
> You are subscribed to this list as: chuck at horde.org
> To unsubscribe, mail: bugs-unsubscribe at lists.horde.org
>
> ----- End forwarded message -----
>
>
> -chuck
>
> --
> "Regard my poor demoralized mule!" - Juan Valdez
>
> --
> Horde developers mailing list - Join the hunt: http://horde.org/bounties/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: dev-unsubscribe at lists.horde.org
--
Jason M. Felice
Cronosys, LLC <http://www.cronosys.com>
216-221-4600 x302
More information about the dev
mailing list