[geeklog-cvs] geeklog-1.3/public_html/admin/install install.php,1.70,1.71

dhaun at iowaoutdoors.org dhaun at iowaoutdoors.org
Wed Oct 13 09:26:56 EDT 2004


Update of /var/cvs/geeklog-1.3/public_html/admin/install
In directory www:/tmp/cvs-serv23072/public_html/admin/install

Modified Files:
	install.php 
Log Message:
Using InnoDB tables is now an option.


Index: install.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/admin/install/install.php,v
retrieving revision 1.70
retrieving revision 1.71
diff -C2 -d -r1.70 -r1.71
*** install.php	28 Sep 2004 17:47:12 -0000	1.70
--- install.php	13 Oct 2004 13:26:54 -0000	1.71
***************
*** 52,59 ****
  }
  
- // Turn this on to have the install process print debug messages.  NOTE: these
- // message will get written to installerrors.log as this file may not know
- // anything about error.log (the Geeklog error log file)
- $_INST_DEBUG = false;
  
  /**
--- 52,55 ----
***************
*** 176,182 ****
          $db_templates->set_var('DB_TABLE_OPTIONS', '');
      } else {
!         // This is a fresh installation, let them change their table settings
!         $db_templates->set_var('upgrade',0);
!         $db_templates->set_var('UPGRADE_OPTIONS','<tr><td> </td></tr>');
      }
  
--- 172,188 ----
          $db_templates->set_var('DB_TABLE_OPTIONS', '');
      } else {
!         // This is a fresh installation
!         $db_templates->set_var ('upgrade', 0);
! 
!         if (innodb_supported ()) {
!             $innodb_option = '<tr><td align="left">';
!             $innodb_option .= '<p>Using InnoDB tables may improve performance on (very) large sites, but makes database backups more complicated. Leave the option unchecked unless you know what you\'re doing.</p>';
!             $innodb_option .= '<input type="checkbox" name="innodb"> Use InnoDB tables';
!             $innodb_option .= '</td></tr>';
!             $db_templates->set_var ('UPGRADE_OPTIONS', $innodb_option);
!         } else {
!             $db_templates->set_var ('UPGRADE_OPTIONS',
!                                     '<tr><td> </td></tr>');
!         }
      }
  
***************
*** 184,188 ****
  }
  
! function INST_createDatabaseStructures()
  {
      global $_CONF, $_DB, $_DB_dbms, $_DB_host, $_DB_user, $_DB_pass, $_TABLES;
--- 190,194 ----
  }
  
! function INST_createDatabaseStructures ($use_innodb = false)
  {
      global $_CONF, $_DB, $_DB_dbms, $_DB_host, $_DB_user, $_DB_pass, $_TABLES;
***************
*** 201,210 ****
      if ($_DB_dbms == 'mysql') {
  
-         $has_innodb = innodb_supported ();
- 
          for ($i = 1; $i <= count ($_SQL); $i++) {
              $sql = current ($_SQL);
  
!             if ($has_innodb) {
                  $sql = str_replace ('MyISAM', 'InnoDB', $sql);
              }
--- 207,214 ----
      if ($_DB_dbms == 'mysql') {
  
          for ($i = 1; $i <= count ($_SQL); $i++) {
              $sql = current ($_SQL);
  
!             if ($use_innodb) {
                  $sql = str_replace ('MyISAM', 'InnoDB', $sql);
              }
***************
*** 760,764 ****
          }
      } else {
!         if (INST_createDatabaseStructures()) {
              // Done with installation...redirect to success page
              echo '<html><head><meta http-equiv="refresh" content="0; URL=' . $_CONF['site_admin_url'] . '/install/success.php"></head></html>';
--- 764,773 ----
          }
      } else {
!         $use_innodb = false;
!         if (isset ($HTTP_POST_VARS['innodb']) &&
!                 ($HTTP_POST_VARS['innodb'] == 'on')) {
!             $use_innodb = true;
!         }
!         if (INST_createDatabaseStructures ($use_innodb)) {
              // Done with installation...redirect to success page
              echo '<html><head><meta http-equiv="refresh" content="0; URL=' . $_CONF['site_admin_url'] . '/install/success.php"></head></html>';




More information about the geeklog-cvs mailing list