Changeset 11722
- Timestamp:
- 08/25/07 21:00:55 (1 year ago)
- Files:
-
- trunk/midgard/data/midgard_setup_database.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midgard/data/midgard_setup_database.php
r11709 r11722 30 30 public function __construct(midgard_setup_config &$setup_config, $config_name = NULL) 31 31 { 32 midgard_setup_log::write(_("Initialize new ").__CLASS__); 33 32 34 $this->midgard_setup_config = &$setup_config; 33 35 $config = &$setup_config->midgard_config; 34 36 35 if($config->database == '') 36 throw new midgard_setup_database_exception( 37 _("Database name not defined in midgard_config"), 0); 37 if($config->database == '') 38 { 39 $msg = _("Database name not defined in midgard_config"); 40 midgard_setup_log::write_exception($msg); 41 throw new midgard_setup_database_exception($msg, 0); 42 } 38 43 39 44 if($config->host == '') 40 throw new midgard_setup_database_exception( 41 _("Database host not defined in midgard_config"), 0); 45 { 46 $msg = _("Database host not defined in midgard_config"); 47 midgard_setup_log::write_exception($msg); 48 throw new midgard_setup_database_exception($msg, 0); 49 } 42 50 43 51 if($config->dbuser == '') 44 throw new midgard_setup_database_exception( 45 _("Database username not defined in midgard_config"), 0); 52 { 53 $msg = _("Database username not defined in midgard_config"); 54 midgard_setup_log::write_exception($msg); 55 throw new midgard_setup_database_exception($msg, 0); 56 } 46 57 47 58 if($config->dbpass == '') 48 throw new midgard_setup_database_exception( 49 _("Database password not defined in midgard_config"), 0); 59 { 60 $msg = _("Database password not defined in midgard_config"); 61 midgard_setup_log::write_exception($msg); 62 throw new midgard_setup_database_exception($msg, 0); 63 } 50 64 51 65 $this->midgard_config = &$config; … … 55 69 private function connect() 56 70 { 57 71 /* TODO ? */ 58 72 } 59 73 … … 72 86 public function create_database_blobdir() 73 87 { 88 midgard_setup_log::write(_("Check database blobs' directories")); 89 74 90 $dirs = array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"); 75 91 $subdirs = $dirs; … … 236 252 final public function update_database() 237 253 { 254 midgard_setup_log::write(_("Updating database")); 238 255 239 256 if(!is_array($_MIDGARD['schema']['types']))
