Changeset 6262 for temp/trunk
- Timestamp:
- 2006/10/13 13:14:41 (20 years ago)
- Location:
- temp/trunk
- Files:
-
- 3 edited
-
data/class/SC_DbConn.php (modified) (1 diff)
-
data/lib/slib.php (modified) (1 diff)
-
html/install/index.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
temp/trunk/data/class/SC_DbConn.php
r6260 r6262 20 20 var $dsn; 21 21 var $err_disp = true; 22 23 22 24 23 // ¥³¥ó¥¹¥È¥é¥¯¥¿ -
temp/trunk/data/lib/slib.php
r6252 r6262 20 20 // ¥¢¥Ã¥×¥Ç¡¼¥È¤ÇÀ¸À®¤µ¤ì¤¿PHP¤òÆÉ¤ß½Ð¤¹ 21 21 sfLoadUpdateModule(); 22 23 /* ¥Ç¡¼¥¿¥Ù¡¼¥¹¤Î¥Ð¡¼¥¸¥ç¥ó½êÆÀ */ 24 function sfGetDBVersion($dsn = DEFAULT_DSN) { 25 $objQuery = new SC_Query($dsn); 26 list($db_type) = split(":", $dsn); 27 if($db_type == 'mysql') { 28 $arrRet = $objQuery->getAll("SHOW VARIABLES"); 29 foreach($arrRet as $array) { 30 if($array[0] == 'version') { 31 $version = "MySQL " . $array[1]; 32 break; 33 } 34 } 35 } 36 if($arrRet['db_type'] == 'pgsql') { 37 $arrRet = $objQuery->getAll("select version()"); 38 $arrLine = split(" " , $arrRet[0][0]); 39 $version = $arrLine[0] . " " . $arrLine[1]; 40 } 41 return $version; 42 } 22 43 23 44 /* ¥Æ¡¼¥Ö¥ë¤Î¸ºß¥Á¥§¥Ã¥¯ */ -
temp/trunk/html/install/index.php
r6261 r6262 533 533 $options['debug'] = PEAR_DB_DEBUG; 534 534 $objDB = DB::connect($dsn, $options); 535 // Àܳ¥¨¥é¡¼ 536 if(PEAR::isError($objDB)) { 535 // ÀܳÀ®¸ù 536 if(!PEAR::isError($objDB)) { 537 // ¥Ç¡¼¥¿¥Ù¡¼¥¹¥Ð¡¼¥¸¥ç¥ó¾ðÊó¤Î¼èÆÀ 538 $objPage->tpl_db_version = sfGetDBVersion($dsn); 539 } else { 537 540 $objErr->arrErr['all'] = ">> " . $objDB->message . "<br>"; 538 541 // ¥¨¥é¡¼Ê¸¤ò¼èÆÀ¤¹¤ë … … 540 543 $objErr->arrErr['all'].= $arrKey[0] . "<br>"; 541 544 gfPrintLog($objDB->userinfo, "./temp/install.log"); 542 } else {543 if($arrRet['db_type'] == 'mysql') {544 $arrRet = $objDB->getAll("SHOW VARIABLES");545 foreach($arrRet as $array) {546 if($array[0] == 'version') {547 $objPage->tpl_db_version = "MySQL " . $array[1];548 }549 }550 }551 if($arrRet['db_type'] == 'pgsql') {552 $arrRet = $objDB->getAll("select version()");553 $arrLine = split(" " , $arrRet[0][0]);554 $objPage->tpl_db_version = $arrLine[0] . " " . $arrLine[1];555 }556 545 } 557 546 }
Note: See TracChangeset
for help on using the changeset viewer.
