Changeset 15930
- Timestamp:
- 04/02/08 13:32:52 (6 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/support/Role_Midgardelement/Midgardelement.php
r13106 r15930 56 56 if (!$stat) 57 57 { 58 PEAR::raiseError("Failed to create Midgard style \"{$new_style->name}\", check config directives in the Midgard conf.d file . Error was " . mgd_errstr(), mgd_errno(), PEAR_ERROR_ DIE);58 PEAR::raiseError("Failed to create Midgard style \"{$new_style->name}\", check config directives in the Midgard conf.d file . Error was " . mgd_errstr(), mgd_errno(), PEAR_ERROR_RETURN); 59 59 return null; 60 60 } … … 95 95 } 96 96 97 PEAR::raiseError("Failed to load Midgard sitegroup \"{$sitegroup_config}\". Error: " . mgd_errstr(), mgd_errno(), PEAR_ERROR_ DIE);97 PEAR::raiseError("Failed to load Midgard sitegroup \"{$sitegroup_config}\". Error: " . mgd_errstr(), mgd_errno(), PEAR_ERROR_RETURN); 98 98 return false; 99 99 } … … 101 101 function initializeMidgard($init_file) 102 102 { 103 if(isset($_MIDGARD_CONNECTION)) 104 return true; 105 103 106 mgd_config_init($init_file); 104 107 if (!isset($_MIDGARD)) 105 108 { 106 PEAR::raiseError("Failed to initialize Midgard using configuration file \"{$init_file}\".", mgd_errno(), PEAR_ERROR_ DIE);109 PEAR::raiseError("Failed to initialize Midgard using configuration file \"{$init_file}\".", mgd_errno(), PEAR_ERROR_RETURN); 107 110 return false; 108 111 } … … 124 127 if (!file_exists($init_file_path)) 125 128 { 126 PEAR::raiseError("Midgard configuration file \"{$init_file_path}\" not found.", mgd_errno(), PEAR_ERROR_ DIE);129 PEAR::raiseError("Midgard configuration file \"{$init_file_path}\" not found.", mgd_errno(), PEAR_ERROR_RETURN); 127 130 return false; 128 131 } … … 161 164 || is_null($midgard_password)) 162 165 { 163 PEAR::raiseError("Midgard configuration file \"{$init_file}\" did not contain MidgardUsername and MidgardPassword directives.", mgd_errno(), PEAR_ERROR_ DIE);166 PEAR::raiseError("Midgard configuration file \"{$init_file}\" did not contain MidgardUsername and MidgardPassword directives.", mgd_errno(), PEAR_ERROR_RETURN); 164 167 return false; 165 168 } … … 167 170 if (!mgd_auth_midgard($midgard_username, $midgard_password)) 168 171 { 169 PEAR::raiseError("Failed to authenticate as Midgard user \"{$midgard_username}\" using credentials from configuration file \"{$init_file}\".", mgd_errno(), PEAR_ERROR_ DIE);172 PEAR::raiseError("Failed to authenticate as Midgard user \"{$midgard_username}\" using credentials from configuration file \"{$init_file}\".", mgd_errno(), PEAR_ERROR_RETURN); 170 173 return false; 171 174 }
