debug_log[] = 'MySQL version: ' . yourls_get_database_version(); } if ( !yourls_check_php_version() ) { $error[] = yourls_s( '%s version is too old. Ask your server admin for an upgrade.', 'PHP' ); $ydb->debug_log[] = 'PHP version: ' . phpversion(); } // Is YOURLS already installed ? if ( yourls_is_installed() ) { $error[] = yourls__( 'YOURLS already installed.' ); // check if .htaccess exists, recreate otherwise. No error checking. if( !file_exists( YOURLS_ABSPATH.'/.htaccess' ) ) { yourls_create_htaccess(); } } // Start install if possible and needed if ( isset($_REQUEST['install']) && count( $error ) == 0 ) { // Create/update .htaccess file if ( yourls_create_htaccess() ) { $success[] = yourls__( 'File .htaccess successfully created/updated.' ); } else { $warning[] = yourls__( 'Could not write file .htaccess in YOURLS root directory. You will have to do it manually. See how.' ); } // Create SQL tables $install = yourls_create_sql_tables(); if ( isset( $install['error'] ) ) $error = array_merge( $error, $install['error'] ); if ( isset( $install['success'] ) ) $success = array_merge( $success, $install['success'] ); } // Start output yourls_html_head( 'install', yourls__( 'Install YOURLS' ) ); ?>

YOURLS

0 ) { echo "'; } } // Display install button or link to admin area if applicable if( !yourls_is_installed() && !isset($_REQUEST['install']) ) { echo '

'; } else { if( count($error) == 0 ) echo '

» ' . yourls__( 'YOURLS Administration Page') . '

'; } ?>