Fixing bug with installer. (thanks RainbowDash)
This commit is contained in:
		
							parent
							
								
									01306712b7
								
							
						
					
					
						commit
						983c0d96b8
					
				
							
								
								
									
										32
									
								
								install.php
									
									
									
									
									
								
							
							
						
						
									
										32
									
								
								install.php
									
									
									
									
									
								
							@ -44,6 +44,22 @@
 | 
				
			|||||||
assert_options(ASSERT_ACTIVE, 1);
 | 
					assert_options(ASSERT_ACTIVE, 1);
 | 
				
			||||||
assert_options(ASSERT_BAIL, 1);
 | 
					assert_options(ASSERT_BAIL, 1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * Compute the path to the folder containing "install.php" and 
 | 
				
			||||||
 | 
					 * store it as the 'Shimmie Root' folder for later on.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Example:
 | 
				
			||||||
 | 
					 *	__SHIMMIE_ROOT__ = '/var/www/shimmie2/'
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					define('__SHIMMIE_ROOT__', trim( remove_trailing_slash( dirname(__FILE__) ) ) . '/' ); 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Pull in necessary files
 | 
				
			||||||
 | 
					require_once __SHIMMIE_ROOT__."config.php";			// Load user/site specifics First
 | 
				
			||||||
 | 
					require_once __SHIMMIE_ROOT__."core/default_config.inc.php";	// Defaults for the rest.
 | 
				
			||||||
 | 
					require_once __SHIMMIE_ROOT__."core/util.inc.php";
 | 
				
			||||||
 | 
					require_once __SHIMMIE_ROOT__."core/database.class.php";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * This file lets anyone destroy the database -- disable it
 | 
					 * This file lets anyone destroy the database -- disable it
 | 
				
			||||||
 * as soon as the admin is done installing for the first time
 | 
					 * as soon as the admin is done installing for the first time
 | 
				
			||||||
@ -55,22 +71,6 @@ if(is_readable("config.php")) {
 | 
				
			|||||||
			<h1>Shimmie Repair Console</h1>
 | 
								<h1>Shimmie Repair Console</h1>
 | 
				
			||||||
<?php
 | 
					<?php
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	/*
 | 
					 | 
				
			||||||
	 * Compute the path to the folder containing "install.php" and 
 | 
					 | 
				
			||||||
	 * store it as the 'Shimmie Root' folder for later on.
 | 
					 | 
				
			||||||
	 *
 | 
					 | 
				
			||||||
	 * Example:
 | 
					 | 
				
			||||||
	 *	__SHIMMIE_ROOT__ = '/var/www/shimmie2/'
 | 
					 | 
				
			||||||
	 *
 | 
					 | 
				
			||||||
	 */
 | 
					 | 
				
			||||||
	define('__SHIMMIE_ROOT__', trim( remove_trailing_slash( dirname(__FILE__) ) ) . '/' ); 
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Pull in necessary files
 | 
					 | 
				
			||||||
	require_once __SHIMMIE_ROOT__."config.php";			// Load user/site specifics First
 | 
					 | 
				
			||||||
	require_once __SHIMMIE_ROOT__."core/default_config.inc.php";	// Defaults for the rest.
 | 
					 | 
				
			||||||
	require_once __SHIMMIE_ROOT__."core/util.inc.php";
 | 
					 | 
				
			||||||
	require_once __SHIMMIE_ROOT__."core/database.class.php";
 | 
					 | 
				
			||||||
	
 | 
					 | 
				
			||||||
	if (
 | 
						if (
 | 
				
			||||||
	      ( array_key_exists('dsn', $_SESSION) && $_SESSION['dsn'] === DATABASE_DSN ) ||
 | 
						      ( array_key_exists('dsn', $_SESSION) && $_SESSION['dsn'] === DATABASE_DSN ) ||
 | 
				
			||||||
	      ( array_key_exists('dsn', $_POST)    && $_POST['dsn']    === DATABASE_DSN )
 | 
						      ( array_key_exists('dsn', $_POST)    && $_POST['dsn']    === DATABASE_DSN )
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user