[dev] RE: [chora] Specifying Horde File Root

Flanakin Michael C SSgt HQ SSG/ENED Michael.Flanakin at Gunter.AF.mil
Thu Dec 9 11:28:23 PST 2004


Ok, here's what I did:

1. Added the generatePHPHordeBase() function to the Horde_Config class

2. Added a "Generate Horde Base Configuration" button to the setup page
to create a config/hordebase.php file

3. Modified the lib/base.php file of the component (i.e. Chora) to
include the new config/hordebase.php file - w/o the file, the HORDE_BASE
will have a default of the current value

Overall, it was pretty simple. I don't know if you guys agree with this
implementation or not. It doesn't solve my problem 100%, but at least it
gets me closer w/o editing a non-config file. I didn't store a backup of
the hordebase.php file because I didn't think it was really necessary -
that, and I didn't want to have too many buttons.

Let me know if you would like the code for inclusion in Horde. There was
a grand total of 38 lines across 3 files added.

-----Original Message-----
From: dev-bounces at lists.horde.org [mailto:dev-bounces at lists.horde.org]
On Behalf Of Flanakin Michael C SSgt HQ SSG/ENED
Sent: Thursday, December 09, 2004 11:09 AM
To: dev at lists.horde.org
Subject: RE: [dev] RE: [chora] Specifying Horde File Root

Ok, Chuck, I re-read your post for the fourth time, and I see what
you're saying. Sorry. Guess I'm running a little slower than I thought
this morning :P

I guess the only real option to doing this is to either override a
component's lib/base.php file that specifies the HORDE_BASE or change
that to make a reference to a new config file. I know and understand
your position on the new config file problem. The only real solution I
have for that is to automatically generate a */config/hordebase.php file
when generating a component's config. Then, each component would include
this file instead of defining HORDE_BASE within their lib/base.php file.

Does this seem feasible?
 

-----Original Message-----
From: dev-bounces at lists.horde.org [mailto:dev-bounces at lists.horde.org]
On Behalf Of Flanakin Michael C SSgt HQ SSG/ENED
Sent: Thursday, December 09, 2004 10:46 AM
To: dev at lists.horde.org
Subject: RE: [dev] RE: [chora] Specifying Horde File Root

No, I don't think you understand what I'm talking about. What if, when
you click the "Generate x Configuration" button from Horde's
admin/setup/config.php file, the Horde_Config class
(lib/Horde/config.php) would add a definition for the Horde base. I'm
working on implementing it to see how well it should work. It seems to
be very simple, but I haven't finished playing with it - I just got back
in the office. I'll post a detailed description along with code and
leave it up to you guys for inclusion. I'd honestly like a better way of
doing it than I'm looking at because I'd like to be able to override
some of the settings on my dev environment. I'll touch on that more
later, tho.

If anyone has any ideas about how this could work, I'd appreciate it. To
sum up what I'm trying to do, let me just say that I want all of the
components to know where Horde is w/o telling them explicitly, if
possible. This means that they'd need data from Horde's
config/registry.php file, which obviously it can't access w/o knowing
where Horde is, first. What I'm working on should implicitly set
HORDE_BASE w/o overriding any existing value (for backwards
compatibility).

-----Original Message-----
From: dev-bounces at lists.horde.org [mailto:dev-bounces at lists.horde.org]
On Behalf Of Chuck Hagenbuch
Sent: Thursday, December 09, 2004 8:36 AM
To: dev at lists.horde.org
Subject: Re: [dev] RE: [chora] Specifying Horde File Root

Quoting Flanakin Michael C SSgt HQ SSG/ENED
<Michael.Flanakin at Gunter.AF.mil>:

> This is all in theory. I'd need you guys to verify that it at least
> seems like a sound idea.

No. Re-read my initial explanation again to see why this won't work.

-chuck

-- 
"But she goes not abroad in search of monsters to destroy." - John 
Quincy Adams

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



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



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




More information about the dev mailing list