[geeklog-cvs] Geeklog-1.x/public_html/admin/install index.php, 1.10, 1.11

Dirk Haun dhaun at qs1489.pair.com
Sun Sep 2 04:39:22 EDT 2007


Update of /cvsroot/geeklog/Geeklog-1.x/public_html/admin/install
In directory qs1489.pair.com:/tmp/cvs-serv3269

Modified Files:
	index.php 
Log Message:
Moved more texts to the language file; made the submit button read "Install" or "Upgrade" depending on the mode; hide InnoDB text on upgrade; cosmetics


Index: index.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/admin/install/index.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** index.php	1 Sep 2007 19:41:49 -0000	1.10
--- index.php	2 Sep 2007 08:39:20 -0000	1.11
***************
*** 121,125 ****
           */
          case 1:
!             require_once($dbconfig_path); // Get the current DB info
  
              // Set all the form values either with their defaults or with received POST data.
--- 121,125 ----
           */
          case 1:
!             require_once $dbconfig_path; // Get the current DB info
  
              // Set all the form values either with their defaults or with received POST data.
***************
*** 164,167 ****
--- 164,175 ----
              $noreply_mail = isset($_POST['noreply_mail']) ? $_POST['noreply_mail'] : ($_CONF['noreply_mail'] == 'noreply at example.com' ? $_CONF['noreply_mail'] : 'noreply@' . $_SERVER['HTTP_HOST']);
  
+             if ($install_type == 'install') {
+                 $buttontext = $LANG_INSTALL[50];
+                 $innodbnote = '<small>' . $LANG_INSTALL[38] . '</small>';
+             } else {
+                 $buttontext = $LANG_INSTALL[25];
+                 $innodbnote = '';
+             }
+ 
              $display .= '
                  <h2>' . $LANG_INSTALL[31] . '</h2>
***************
*** 177,181 ****
                      <option value="mysql"' . $mysql_selected . '>' . $LANG_INSTALL[35] . '</option>
                      ' . ($install_type == 'install' ? '<option value="mysql-innodb"' . $msyql_innodb_selected . '>' . $LANG_INSTALL[36] . '</option>' : '') . '
!                     <option value="mssql"' . $mssql_selected . '>' . $LANG_INSTALL[37] . '</option></select> <small>' . $LANG_INSTALL[38] . '</small></p>
                  <p><label>' . $LANG_INSTALL[39] . '</label> <input type="text" name="db_host" value="'. $db_host .'" size="10" /></p>
                  <p><label>' . $LANG_INSTALL[40] . '</label> <input type="text" name="db_name" value="'. $db_name . '" size="10" /></p>
--- 185,189 ----
                      <option value="mysql"' . $mysql_selected . '>' . $LANG_INSTALL[35] . '</option>
                      ' . ($install_type == 'install' ? '<option value="mysql-innodb"' . $msyql_innodb_selected . '>' . $LANG_INSTALL[36] . '</option>' : '') . '
!                     <option value="mssql"' . $mssql_selected . '>' . $LANG_INSTALL[37] . '</option></select> ' . $innodbnote . '</p>
                  <p><label>' . $LANG_INSTALL[39] . '</label> <input type="text" name="db_host" value="'. $db_host .'" size="10" /></p>
                  <p><label>' . $LANG_INSTALL[40] . '</label> <input type="text" name="db_name" value="'. $db_name . '" size="10" /></p>
***************
*** 192,196 ****
  
                  <br />
!                 <input type="submit" name="submit" class="submit" value="' . $LANG_INSTALL[50] . ' >>" />
                  </form>' . LB;
              break;
--- 200,204 ----
  
                  <br />
!                 <input type="submit" name="submit" class="submit" value="' . $buttontext . ' >>" />
                  </form>' . LB;
              break;
***************
*** 271,275 ****
                  } else { // If database does exist
  
!                     require_once($dbconfig_path); // Grab the current DB values
  
                      // Read in db-config.php so we can insert the DB information
--- 279,283 ----
                  } else { // If database does exist
  
!                     require_once $dbconfig_path; // Grab the current DB values
  
                      // Read in db-config.php so we can insert the DB information
***************
*** 293,299 ****
                      fclose($dbconfig_file);
  
!                     require($dbconfig_path);
!                     require_once($siteconfig_path);
!                     require_once($_CONF['path_system'] . 'lib-database.php');
                      $req_string = 'index.php?mode=' . $install_type . '&step=3&dbconfig_path=' . $dbconfig_path
                                      . '&language=' . $language
--- 301,307 ----
                      fclose($dbconfig_file);
  
!                     require $dbconfig_path;
!                     require_once $siteconfig_path;
!                     require_once $_CONF['path_system'] . 'lib-database.php';
                      $req_string = 'index.php?mode=' . $install_type . '&step=3&dbconfig_path=' . $dbconfig_path
                                      . '&language=' . $language
***************
*** 418,424 ****
  
                      // We need all this just to do one DB query
!                     require_once($dbconfig_path);
!                     require_once($siteconfig_path);
!                     require_once($_CONF['path_system'] . 'lib-database.php');
  
                      // Check if GL is already installed
--- 426,432 ----
  
                      // We need all this just to do one DB query
!                     require_once $dbconfig_path;
!                     require_once $siteconfig_path;
!                     require_once $_CONF['path_system'] . 'lib-database.php';
  
                      // Check if GL is already installed
***************
*** 465,469 ****
                              // Insert the form data into the conf_values table
  
!                             require_once($_CONF['path_system'] . 'classes/config.class.php');
                              $config = config::create();
                              $config->set('site_name', urldecode($site_name));
--- 473,477 ----
                              // Insert the form data into the conf_values table
  
!                             require_once $_CONF['path_system'] . 'classes/config.class.php';
                              $config = config::create();
                              $config->set('site_name', urldecode($site_name));
***************
*** 506,512 ****
  
                      // Let's do this
!                     require_once($dbconfig_path);
!                     require_once($siteconfig_path);
!                     require_once($_CONF['path_system'] . 'lib-database.php');
  
                      // If this is a MySQL database check to see if it was
--- 514,520 ----
  
                      // Let's do this
!                     require_once $dbconfig_path;
!                     require_once $siteconfig_path;
!                     require_once $_CONF['path_system'] . 'lib-database.php';
  
                      // If this is a MySQL database check to see if it was
***************
*** 531,535 ****
                          $site_mail      = isset($_POST['site_mail']) ? $_POST['site_mail'] : (isset($_GET['site_mail']) ? $_GET['site_mail'] : '') ;
                          $noreply_mail   = isset($_POST['noreply_mail']) ? $_POST['noreply_mail'] : (isset($_GET['noreply_mail']) ? $_GET['noreply_mail'] : '') ;
!                         require_once($_CONF['path_system'] . 'classes/config.class.php');
                          $config = config::create();
                          $config->set('site_name', urldecode($site_name));
--- 539,544 ----
                          $site_mail      = isset($_POST['site_mail']) ? $_POST['site_mail'] : (isset($_GET['site_mail']) ? $_GET['site_mail'] : '') ;
                          $noreply_mail   = isset($_POST['noreply_mail']) ? $_POST['noreply_mail'] : (isset($_GET['noreply_mail']) ? $_GET['noreply_mail'] : '') ;
! 
!                         require_once $_CONF['path_system'] . 'classes/config.class.php';
                          $config = config::create();
                          $config->set('site_name', urldecode($site_name));
***************
*** 759,763 ****
  
      // Get DBMS-specific create table array and data array
!     require_once ($_CONF['path'] . 'sql/' . $_DB_dbms . '_tableanddata.php');
  
      $progress = '';
--- 768,772 ----
  
      // Get DBMS-specific create table array and data array
!     require_once $_CONF['path'] . 'sql/' . $_DB_dbms . '_tableanddata.php';
  
      $progress = '';
***************
*** 1197,1205 ****
  
          case '1.4.1':
!             require_once ($_CONF['path'] . 'sql/updates/' . $_DB_dbms . '_1.4.1_to_1.4.2.php');
              INST_updateDB($_SQL);
  
              create_ConfValues();
!             require_once( $_CONF['path_system'] . 'classes/config.class.php');
              $config = config::create();
  
--- 1206,1214 ----
  
          case '1.4.1':
!             require_once $_CONF['path'] . 'sql/updates/' . $_DB_dbms . '_1.4.1_to_1.4.2.php';
              INST_updateDB($_SQL);
  
              create_ConfValues();
!             require_once $_CONF['path_system'] . 'classes/config.class.php';
              $config = config::create();
  
***************
*** 1315,1319 ****
  $step               = isset($_GET['step']) ? $_GET['step'] : (isset($_POST['step']) ? $_POST['step'] : 1);
  $mode               = isset($_GET['mode']) ? $_GET['mode'] : (isset($_POST['mode']) ? $_POST['mode'] : '');
! require_once('language/' . $language . '.php');
  
  // $display holds all the outputted HTML and content
--- 1324,1328 ----
  $step               = isset($_GET['step']) ? $_GET['step'] : (isset($_POST['step']) ? $_POST['step'] : 1);
  $mode               = isset($_GET['mode']) ? $_GET['mode'] : (isset($_POST['mode']) ? $_POST['mode'] : '');
! require_once 'language/' . $language . '.php';
  
  // $display holds all the outputted HTML and content
***************
*** 1323,1326 ****
--- 1332,1336 ----
  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
  <link rel="stylesheet" type="text/css" href="layout/style.css" />
+ <meta name="robots" content="noindex,nofollow" />
  <title>' . $LANG_INSTALL[0] . '</title>
  </head>
***************
*** 1329,1333 ****
      <div class="header-navigation-container">
          <div class="header-navigation-line">
!             <a href="http://www.geeklog.net/forum/index.php?forum=1" class="header-navigation">' . $LANG_INSTALL[1] . '</a>   
          </div>
      </div>
--- 1339,1343 ----
      <div class="header-navigation-container">
          <div class="header-navigation-line">
!             <a href="' . $LANG_INSTALL[107] . '" class="header-navigation">' . $LANG_INSTALL[1] . '</a>   
          </div>
      </div>
***************
*** 1357,1361 ****
      }
  
!     $display .= 'Language:  <select name="language">' . LB;
  
      foreach (glob('language/*.php') as $filename) {
--- 1367,1371 ----
      }
  
!     $display .= $LANG_INSTALL[106] . ':  <select name="language">' . LB;
  
      foreach (glob('language/*.php') as $filename) {
***************
*** 1467,1472 ****
          } else {
  
!             require_once($_PATH['db-config.php']);  // We need db-config.php the current DB information
!             require_once($siteconfig_path);         // We need siteconfig.php for core $_CONF values.
  
              $gl_path                = str_replace('db-config.php', '', $_PATH['db-config.php']);
--- 1477,1482 ----
          } else {
  
!             require_once $_PATH['db-config.php'];  // We need db-config.php the current DB information
!             require_once $siteconfig_path;         // We need siteconfig.php for core $_CONF values.
  
              $gl_path                = str_replace('db-config.php', '', $_PATH['db-config.php']);
***************
*** 1662,1666 ****
  
              // $_CONF['path']
!             require_once($siteconfig_path);
              $siteconfig_data = str_replace("\$_CONF['path'] = '{$_CONF['path']}';",
                                  "\$_CONF['path'] = '" . str_replace('db-config.php', '', $_PATH['db-config.php']) . "';",
--- 1672,1676 ----
  
              // $_CONF['path']
!             require_once $siteconfig_path;
              $siteconfig_data = str_replace("\$_CONF['path'] = '{$_CONF['path']}';",
                                  "\$_CONF['path'] = '" . str_replace('db-config.php', '', $_PATH['db-config.php']) . "';",




More information about the geeklog-cvs mailing list