Beispiel #1
0
 //we no longer use the force_sql_mode parameter, though if the app is fixed to handle strict mode then we
 //may wish to change the default again, in which case we should honor the force_sql_mode option.
 //added the force parameter
 //The same logic is in includes/init.php and should stay in sync.
 //if (!empty($vbulletin->config['Database']['force_sql_mode']))
 if (empty($vbulletin->config['Database']['no_force_sql_mode'])) {
     $db->force_sql_mode('');
 }
 // #############################################################################
 // fetch options and other data from the datastore
 // grab the MySQL Version once and let every script use it.
 $mysqlversion = $db->query_first("SELECT version() AS version");
 define('MYSQL_VERSION', $mysqlversion['version']);
 if (VB_AREA == 'Upgrade') {
     $optionstemp = false;
     $db->hide_errors();
     $optionstemp = $db->query_first("SELECT template FROM template WHERE title = 'options' AND templatesetid = -1");
     $db->show_errors();
     // ## Found vB2 Options so use them...
     if ($optionstemp) {
         eval($optionstemp['template']);
         $vbulletin->options =& $vboptions;
         $vbulletin->versionnumber = $templateversion;
     } else {
         // we need our datastore table to be updated properly to function
         $db->hide_errors();
         $db->query_write("ALTER TABLE " . TABLE_PREFIX . "datastore ADD unserialize SMALLINT NOT NULL DEFAULT '2'");
         $db->show_errors();
         $datastore_class = (!empty($vbulletin->config['Datastore']['class']) and !defined('STDIN')) ? $vbulletin->config['Datastore']['class'] : 'vB_Datastore';
         if ($datastore_class != 'vB_Datastore') {
             require_once DIR . '/includes/class_datastore.php';