[Gforge-devel] Hardcoded Paths in GForge

Robert Nelson robertn at the-nelsons.org
Fri Mar 9 22:19:32 EST 2007


Christian and I were discussing the hard-coded paths in GForge on the IRC.
As part of my changes I introduced a new configuration variable
sys_etc_path.  This is used instead of the previously hardcoded /etc/gforge
in a number of files.  Christian suggested, and I agreed, that we should
avoid manual configuration and make GForge self configuring using the
include path.

 

Currently the sys_etc_path variable is used to form directory paths which
are checked for existence or to form file paths which are passed to fopen.
Both of these scenarios are easily handled using a routine that searches the
include path and returns the matching path.

 

However the Plugin Manager is more problematic since it creates the symlink
so there isn't an existing file or path to search.  I could search for the
local.inc file and then use the directory as the equivalent of /etc/gforge.
This could be packaged as a function getConfigDirectory for example.  Then
the existing references to /etc/gforge or sys_etc_path could be replaced
with calls to this new function.

 

How does this sound?  Would it address your concerns Christian?  Anyone have
any better ideas?

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.gforge.org/pipermail/gforge-devel/attachments/20070309/2d7c4e36/attachment.html


More information about the Gforge-devel mailing list