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

Dirk Haun dhaun at qs1489.pair.com
Mon Aug 11 16:23:16 EDT 2008


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

Modified Files:
	index.php 
Log Message:
Fixes for MS SQL install, on behalf of Michael Jervis


Index: index.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/admin/install/index.php,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** index.php	13 Jul 2008 12:03:59 -0000	1.49
--- index.php	11 Aug 2008 20:23:11 -0000	1.50
***************
*** 409,413 ****
                      break;
                  case 'mssql':
!                     if (!$db_handle = @mssql_connect($db_host, $db_user, $db_pass)) {
                          $invalid_db_auth = true;
                      }
--- 409,413 ----
                      break;
                  case 'mssql':
!                     if (!$db_handle = mssql_connect($db_host, $db_user, $db_pass)) {
                          $invalid_db_auth = true;
                      }
***************
*** 913,917 ****
              // nobody uses such an old version any more ...
              );
! 
          break;
  
--- 913,923 ----
              // nobody uses such an old version any more ...
              );
!         $firstCheck = "DESCRIBE {$_TABLES['access']} acc_ft_id";
!         $result = DB_query($firstCheck, 1);
!         if ($result === false) {
!             // A check for the first field in the first table failed?
!             // Sounds suspiciously like an empty table ...
!             return 'empty';
!         }
          break;
  
***************
*** 919,927 ****
  	    $test = array(
              '1.5.1'  => array("SELECT name FROM {$_TABLES['vars']} WHERE name = 'database_version'", 'database_version'),
!             '1.5.0'  => array("DESCRIBE {$_TABLES['storysubmission']} bodytext",''),
              '1.4.1'  => array("SELECT ft_name FROM {$_TABLES['features']} WHERE ft_name = 'syndication.edit'", 'syndication.edit')
              // 1.4.1 was the first version with MS SQL support
              );
! 
          break;
  
--- 925,939 ----
  	    $test = array(
              '1.5.1'  => array("SELECT name FROM {$_TABLES['vars']} WHERE name = 'database_version'", 'database_version'),
!             '1.5.0'  => array("SELECT c.name FROM syscolumns c JOIN sysobjects o ON o.id = c.id WHERE c.name='bodytext' AND o.name='{$_TABLES['storysubmission']}'",'bodytext'),
              '1.4.1'  => array("SELECT ft_name FROM {$_TABLES['features']} WHERE ft_name = 'syndication.edit'", 'syndication.edit')
              // 1.4.1 was the first version with MS SQL support
              );
!         $firstCheck = "SELECT 1 FROM sysobjects WHERE name='{$_TABLES['access']}'";
!         $result = DB_query($firstCheck, 1);
!         if (($result === false) || (DB_numRows($result) < 1)) {
!             // a check for the first table returned nothing.
!             // empty database?
!             return 'empty';
!         }
          break;
  
***************
*** 930,945 ****
      $version = '';
  
-     $result = DB_query("DESCRIBE {$_TABLES['access']} acc_ft_id", 1);
-     if ($result === false) {
-         // A check for the first field in the first table failed?
-         // Sounds suspiciously like an empty table ...
- 
-         return 'empty';
-     }
- 
      foreach ($test as $v => $qarray) {
          $result = DB_query($qarray[0], 1);
          if ($result === false) {
- 
              // error - continue with next test
  
--- 942,948 ----
***************
*** 2168,2171 ****
  
  echo $display;
! 
  ?>
--- 2171,2177 ----
  
  echo $display;
! function d($in)
! {
!     echo('<pre>');var_dump($in);echo('</pre>');
! }
  ?>




More information about the geeklog-cvs mailing list