includes/common.php
changeset 354 979d99a0b00e
parent 353 2398420f48e7
child 371 dc6026376919
equal deleted inserted replaced
353:2398420f48e7 354:979d99a0b00e
   203 $db->free_result();
   203 $db->free_result();
   204 
   204 
   205 // Now that we have the config, check the Enano version.
   205 // Now that we have the config, check the Enano version.
   206 if ( enano_version(false, true) != $version && !defined('IN_ENANO_UPGRADE') )
   206 if ( enano_version(false, true) != $version && !defined('IN_ENANO_UPGRADE') )
   207 {
   207 {
   208   grinding_halt('Version mismatch', '<p>It seems that the Enano release we\'re trying to run ('.$version.') is different from the version specified in your database ('.enano_version().'). Perhaps you need to <a href="'.scriptPath.'/upgrade.php">upgrade</a>?</p>');
   208   grinding_halt('Version mismatch', '<p>It seems that the Enano release we\'re trying to run ('.$version.') is different from the version specified in your database ('.enano_version().'). Perhaps you need to <a href="'.scriptPath.'/install/upgrade.php">upgrade</a>?</p>');
   209 }
   209 }
   210 
   210 
   211 //
   211 //
   212 // Low level maintenance
   212 // Low level maintenance
   213 //
   213 //
   237     grinding_halt('AES block size changed', '<p>Enano has detected that the AES block size in constants.php has been changed. This change cannot be performed after installation, otherwise all passwords would have to be re-encrypted.</p><p>Please change the block size back to ' . $ks . ' bits and reload this page.</p>');
   237     grinding_halt('AES block size changed', '<p>Enano has detected that the AES block size in constants.php has been changed. This change cannot be performed after installation, otherwise all passwords would have to be re-encrypted.</p><p>Please change the block size back to ' . $ks . ' bits and reload this page.</p>');
   238   }
   238   }
   239 }
   239 }
   240 
   240 
   241 // Is there no default language?
   241 // Is there no default language?
   242 if ( getConfig('lang_default') === false )
   242 if ( getConfig('lang_default') === false && !defined('IN_ENANO_MIGRATION') )
   243 {
   243 {
   244   $q = $db->sql_query('SELECT lang_id FROM '.table_prefix.'language LIMIT 1;');
   244   $q = $db->sql_query('SELECT lang_id FROM '.table_prefix.'language LIMIT 1;');
   245   if ( !$q )
   245   if ( !$q )
   246     $db->_die('common.php - setting default language');
   246     $db->_die('common.php - setting default language');
   247   if ( $db->numrows() < 1 && !defined('ENANO_ALLOW_LOAD_NOLANG') )
   247   if ( $db->numrows() < 1 && !defined('ENANO_ALLOW_LOAD_NOLANG') )