Changeset 3307
- Timestamp:
- 04/21/06 18:23:05 (2 years ago)
- Files:
-
- trunk/support/Role_Midgardelement/Midgardelement.xml (modified) (1 diff)
- trunk/support/Role_Midgardelement/package.xml (modified) (3 diffs)
- trunk/support/Role_Midgardelement/setup.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/support/Role_Midgardelement/Midgardelement.xml
r3268 r3307 10 10 <config_vars> 11 11 <midgard_config_file> 12 <type> directory</type>13 <default> /etc/midgard/conf.d/midgard</default>12 <type>string</type> 13 <default>midgard</default> 14 14 <doc>Midgard conf.d file to use</doc> 15 15 <prompt>Midgard conf.d file</prompt> trunk/support/Role_Midgardelement/package.xml
r3306 r3307 16 16 <time>20:55:14</time> 17 17 <version> 18 <release>1.0. 1</release>18 <release>1.0.2</release> 19 19 <api>1.0.0</api> 20 20 </version> … … 24 24 </stability> 25 25 <license uri="http://www.php.net/license/3_01.txt">PHP License</license> 26 <notes>Fi rst release of the Midgard Element file role.</notes>26 <notes>Fixed loading of template file contents into a style element and made the package more resilient on different Midgard conf.d locations.</notes> 27 27 <contents> 28 28 <dir name="/"> … … 38 38 <name>midgard_config_file</name> 39 39 <prompt>Which Midgard conf.d file to use?</prompt> 40 <default> /etc/midgard/conf.d/midgard</default>40 <default>midgard</default> 41 41 <type>string</type> 42 42 </param> trunk/support/Role_Midgardelement/setup.php
r3268 r3307 52 52 case 'dbSetup': 53 53 if ($answers['midgard_config_file'] != '') { 54 if (is_dir($answers['midgard_config_file'])) { 55 $doingit = "setting midgard_config_file to {$answers['midgard_config_file']} ..."; 56 $this->_ui->outputData($outputPrefix.$doingit); 57 $this->_config->set('midgard_config_file', $answers['midgard_config_file']); 58 $e = $this->_config->store(); 59 if (PEAR::isError($e)) { 60 $this->_ui->outputData($outputPrefix.$e->getMessage()); 61 return false; 62 } 63 return true; 64 } else { 65 $this->_ui->outputData($outputPrefix.'Please choose a path that exists! Setup failed.'); 54 $doingit = "setting midgard_config_file to {$answers['midgard_config_file']} ..."; 55 $this->_ui->outputData($outputPrefix.$doingit); 56 $this->_config->set('midgard_config_file', $answers['midgard_config_file']); 57 $e = $this->_config->store(); 58 if (PEAR::isError($e)) { 59 $this->_ui->outputData($outputPrefix.$e->getMessage()); 66 60 return false; 67 61 } 62 return true; 68 63 } 69 64 return false;
