$conf->UseImageResize = $conf->HaveGD || $conf->ImageMagick;
# $conf->IP = "/Users/brion/Sites/inplace";
-chdir( ".." );
-$conf->IP = getcwd();
-chdir( "config" );
+$conf->IP = dirname( dirname( __FILE__ ) );
print "<li>Installation directory: <tt>" . htmlspecialchars( $conf->IP ) . "</tt></li>\n";
# $conf->ScriptPath = "/~brion/inplace";
#$pdExec = '/usr/bin/phpdoc';
$pdExec = 'phpdoc';
-/** Figure out the base directory. This is harder than it should be. */
-/** Since we're on the command line, don't trust the PWD! */
-$here = null;
-$self = $_SERVER['SCRIPT_FILENAME'];
+/** Figure out the base directory. */
$sep = DIRECTORY_SEPARATOR;
-foreach( get_included_files() as $f ) {
- if( preg_match( "!^(.*)maintenance$sep$self\$!", $f, $matches ) ) {
- $here = $matches[1];
- }
-}
-if( is_null( $here ) ) {
- die( "Couldn't determine current directory.\n" );
-}
+$here = dirname( dirname( __FILE__ ) ) . $sep;
/** where Phpdoc should output documentation */
#$pdOutput = '/var/www/mwdoc/';