diff --git a/classes/db/DB.class.php b/classes/db/DB.class.php index b28a38f3a..1172ad095 100644 --- a/classes/db/DB.class.php +++ b/classes/db/DB.class.php @@ -61,11 +61,31 @@ * @brief 지원 가능한 DB 목록을 return **/ function _getSupportedList() { + // ./classes/db 에서 DB.class.php를 제외한 목록을 구함 if(!count($this->supported_list)) { $db_classes_path = "./classes/db/"; $filter = "/^DB([^\.]+)\.class\.php/i"; - $this->supported_list = FileHandler::readDir($db_classes_path, $filter, true); + $supported_list = FileHandler::readDir($db_classes_path, $filter, true); } + + // 구해진 클래스의 객체 생성후 isSupported method를 통해 지원 여부를 판단 + for($i=0;$iisSupported()) continue; + + $this->supported_list[] = $db_type; + + } + return $this->supported_list; } diff --git a/classes/db/DBMysql.class.php b/classes/db/DBMysql.class.php index dee466362..bcc37615b 100644 --- a/classes/db/DBMysql.class.php +++ b/classes/db/DBMysql.class.php @@ -40,6 +40,14 @@ $this->_connect(); } + /** + * @brief 설치 가능 여부를 return + **/ + function isSupported() { + if(!function_exists('mysql_connect') || mysql_get_client_info() < "4.1.00") return false; + return true; + } + /** * @brief DB정보 설정 및 connect/ close **/ diff --git a/classes/db/DBMysqli.class.php b/classes/db/DBMysqli.class.php index 4b8ec08ef..79e9a38f0 100644 --- a/classes/db/DBMysqli.class.php +++ b/classes/db/DBMysqli.class.php @@ -44,6 +44,14 @@ $this->_connect(); } + /** + * @brief 설치 가능 여부를 return + **/ + function isSupported() { + if(!function_exists('mysqli_connect') || mysqli_get_client_info() < "4.1.00") return false; + return true; + } + /** * @brief DB정보 설정 및 connect/ close **/ diff --git a/classes/db/DBSqlite2.class.php b/classes/db/DBSqlite2.class.php index 833bc0ec2..b5e333f88 100644 --- a/classes/db/DBSqlite2.class.php +++ b/classes/db/DBSqlite2.class.php @@ -37,6 +37,14 @@ $this->_connect(); } + /** + * @brief 설치 가능 여부를 return + **/ + function isSupported() { + if(!function_exists('sqlite_open')) return false; + return true; + } + /** * @brief DB정보 설정 및 connect/ close **/ diff --git a/classes/file/FileHandler.class.php b/classes/file/FileHandler.class.php index 133251d59..02504104d 100644 --- a/classes/file/FileHandler.class.php +++ b/classes/file/FileHandler.class.php @@ -136,9 +136,10 @@ $new_height = $height; if($resize_height>0 && $new_height > $resize_height) $new_height = $resize_height; - // 업로드한 파일을 옮기지 않고 gd를 이용해서 gif 이미지를 만듬 (gif, jpg, png, bmp가 아니면 역시 무시) - $thumb = imagecreatetruecolor($new_width, $new_height); + if(function_exists('imagecreatetruecolor')) $thumb = imagecreatetruecolor($new_width, $new_height); + else $thumb = imagecreate($new_width, $new_height); + switch($type) { case 'gif' : $source = imagecreatefromgif($source_file); diff --git a/modules/install/install.controller.php b/modules/install/install.controller.php index 900b8bebd..58d2c3d08 100644 --- a/modules/install/install.controller.php +++ b/modules/install/install.controller.php @@ -72,11 +72,7 @@ if(function_exists('imagecreatefromgif')) $checklist['gd'] = true; else $checklist['gd'] = false; - // 6. mysql_get_client_info() 체크 - if(mysql_get_client_info() < "4.1.00") $checklist['mysql'] = false; - else $checklist['mysql'] = true; - - if(!$checklist['permission'] || !$checklist['xml'] || !$checklist['session']) $install_enable = false; + if(!$checklist['permission'] || !$checklist['xml'] || !$checklist['session'] || !$checklist['gd']) $install_enable = false; else $install_enable = true; // 체크 결과를 Context에 저장 diff --git a/modules/install/install.view.php b/modules/install/install.view.php index 7698f4cdc..854a96490 100644 --- a/modules/install/install.view.php +++ b/modules/install/install.view.php @@ -21,7 +21,7 @@ $oController = &getController('install'); // 설치 불가능하다면 introduce를 출력 - if(!$oController->checkInstallEnv()) $this->act = "dispIntroduce"; + if(!$oController->checkInstallEnv()) $this->act = "dispInstallIntroduce"; // 설치 가능한 환경이라면 installController::makeDefaultDirectory() 실행 else $oController->makeDefaultDirectory(); diff --git a/modules/install/lang/ko.lang.php b/modules/install/lang/ko.lang.php index 07f6e037b..6e4132df3 100644 --- a/modules/install/lang/ko.lang.php +++ b/modules/install/lang/ko.lang.php @@ -18,7 +18,6 @@ 'iconv' => 'ICONV 라이브러리', 'gd' => 'GD 라이브러리', 'session' => 'Session.auto_start 설정', - 'mysql' => 'MySQL 버전', ); $lang->install_checklist_desc = array( @@ -27,7 +26,6 @@ 'session' => '[필수] 제로보드에서 세션 사용을 위해 php.ini 설정의 session.auto_start=0 이어야 합니다', 'iconv' => 'UTF-8과 다른 언어셋의 변환을 위한 iconv설치가 필요합니다', 'gd' => '이미지변환 기능을 사용하기 위해 GD라이브러리가 설치되어 있어야 합니다', - 'mysql' => 'UTF-8 언어셋 사용을 위해 mysql버전이 4.1 이상이어야 합니다', ); $lang->install_checklist_xml = 'XML라이브러리 설치'; @@ -36,11 +34,10 @@ $lang->install_without_gd = '이미지 변환을 위한 gd 라이브러리가 설치되어 있지 않습니다'; $lang->install_checklist_gd = 'GD라이브러리 설치'; $lang->install_without_iconv = '문자열을 처리하기 위한 iconv 라이브러리가 설치되어 있지 않습니다'; - $lang->install_mysql_version = 'mysql client version이 4.1 이하라서 문제가 발생할 수 있습니다'; $lang->install_session_auto_start = 'php설정의 session.auto_start==1 이라 세션 처리에 문제가 발생할 수 있습니다'; $lang->install_permission_denied = '설치대상 디렉토리의 퍼미션이 707이 아닙니다'; - $lang->cmd_install_fix_checklist = '필수 조건을 만족시켰습니다.'; + $lang->cmd_install_fix_checklist = '필수 조건을 설정후 다음 버튼을 눌러 주세요.'; $lang->cmd_install_next = '설치를 진행합니다'; $lang->db_title = 'DB정보 입력'; diff --git a/modules/install/tpl/introduce.html b/modules/install/tpl/introduce.html index 3e0fdfbdd..1b8142b0c 100644 --- a/modules/install/tpl/introduce.html +++ b/modules/install/tpl/introduce.html @@ -17,7 +17,13 @@ {$lang->install_checklist_title[$key]} - {$lang->enable}{$lang->disable} + + + {$lang->enable} + + {$lang->disable} + + {$lang->install_checklist_desc[$key]} @@ -45,6 +51,7 @@ -{$lang->cmd_install_fix_checklist} +{$lang->cmd_install_fix_checklist} +[{$lang->cmd_next}]