From: Julian F. <ju...@be...> - 2002-09-19 08:54:09
|
I have no problems with this patch... in fact it might even help solve our problems about being able to relocate all the core, config, lang, etc files... the user could specify a location of a config file that could overide the location variables for the other files and directories... I nearly just applied this but figure I might as well see if anyone can come up with any problems I'm not thinking of... what do other developers think? Ken?, Jeroen?, Victor? Julian bre...@ka... wrote: >>Patch submission is pretty slow (I had the same problem when I started >>sending patches). I would say post them here. I promise I'll look at >>them if they aren't too huge :) > > > Six lines short enough? :) > > >>If you could include appropriate log messages with them detailing what >>changes you made that makes it a lot easier to review and a lot quicker >>to commit. > > > To sum it up (there's a summary inside the patch file as well): > This patch checks the environment variable 'MANTISBT_CONFIG' for a path > to a mantis configuration file. If MANTISBT_CONFIG isn't set, it grabs > the config from "config_inc.php" as normal. This is handy in that you > can install 1 copy of mantis code on a machine and use it to serve up > several different instances of mantis by creating seperate databases and > configurations for each virtualhost and adding a line such as: > 'SetEnv MANTISBT_CONFIG /foo/bar/mantis.php' in each virtualhost section. > > -Brett > > > ------------------------------------------------------------------------ > > # cd to your mantis directory and run 'patch -p0 < mantis_vhost_0.17.5.patch' > # This patch enables the config location to be set from an environment > # variable; making it possible for multiple vhosts to use the same mantis > # codebase. --Brett Carter (br...@ka...) > > diff -rc /tmp/mantis-0.17.5/core_API.php ./core_API.php > *** /tmp/mantis-0.17.5/core_API.php Sun Aug 18 12:53:27 2002 > --- ./core_API.php Wed Sep 18 11:12:26 2002 > *************** > *** 62,67 **** > --- 62,74 ---- > if ( file_exists( "config_inc.php" ) ) { > include( "config_inc.php" ); > } > + > + # Get config from apache vhost > + $t_local_config=getenv("MANTISBT_CONFIG"); > + if( $t_local_config && file_exists($t_local_config) ){ > + include($t_local_config); > + } > + > # Load file globals # @@@ ugly hack for ugly problem. Find better solution soon > require( "./default/config_inc2.php" ); > -- ju...@be... Beta4 Productions (http://www.beta4.com) |