Changeset 13170 for modules/branches
- Timestamp:
- 01/07/12 12:40:18 (1 year ago)
- Files:
-
- modules/branches/2.10/fw_fop/functions.inc.php (modified) (5 diffs)
- modules/branches/2.10/fw_fop/install.php (modified) (2 diffs)
- modules/branches/2.10/fw_fop/module.xml (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.10/fw_fop/functions.inc.php
r13091 r13170 18 18 switch($engine) { 19 19 case "asterisk": 20 fw_fop_retrieve_op_conf_from_mysql();20 $result = fw_fop_retrieve_op_conf_from_mysql(); 21 21 22 22 // TODO: This used to be done in the POST_RELOAD space after reload was successful and there was likely … … 27 27 unset($output); 28 28 exec('killall -HUP op_server.pl 2>&1', $output, $exit_val); 29 if ($exit_val != 0) { 30 $desc = _('Could not reload the FOP operator panel server using killall -HUP op_server.pl. Configuration changes may not be reflected in the panel display. If the FOP module was just installed you may have to retart Asterisk with the "amportal restart" command for the FOP server to run.'); 31 $nt->add_error('freepbx','reload_fop', _('Could not reload FOP server'), $desc); 32 // send the error output to dbug log if enabled. 29 if ($result) { 30 if ($exit_val != 0) { 31 $desc = _('Could not reload the FOP operator panel server using killall -HUP op_server.pl. Configuration changes may not be reflected in the panel display. If the FOP module was just installed you may have to retart Asterisk with the "amportal restart" command for the FOP server to run.'); 32 $nt->add_error('freepbx','reload_fop', _('Could not reload FOP server'), $desc); 33 // send the error output to dbug log if enabled. 34 } else { 35 $nt->delete('fw_fop','reload_fop'); 36 } 33 37 } else { 34 $nt->delete('freepbx','reload_fop'); 38 $nt->delete('fw_fop','reload_fop'); // clean this up either way 39 $desc = _('An error occured trying to configure FOP. There may be a conflict with another module or there may be permission problems. Check the FreePBX log for more details.'); 40 $nt->add_error('fw_fop','configuration', _('FOP Could Not Be Configured'), $desc, "", false, true); 35 41 } 36 42 break; … … 57 63 global $db; 58 64 global $chan_dahdi; 65 66 // If another module such as isymphony has been loaded and "taken control" then this will fail 67 // so detect here, log the error and don't bother! 68 // 69 $fopwebroot = $amp_conf['AMPWEBROOT'] . '/admin/modules/fw_fop'; 70 if ($amp_conf['FOPWEBROOT'] != $fopwebroot) { 71 freepbx_log(FPBX_LOG_CRITICAL, _("fw_fop is NOT confgured as your Operator Panel, attempting to disable, FOPWEBROOT: $fopwebroot.")); 72 out(_("fw_fop is NOT confgured as your Operator Panel, FOPWEBROOT: $fopwebroot.")); 73 outn(_("disabling fw_fop..")); 74 if (is_array($errors = module_disable('fw_fop'))) { 75 out(_("The following error(s) occured:")); 76 foreach ($errors as $error) { 77 out(" - $error"); 78 } 79 } else { 80 out(_("disabled")); 81 } 82 return false; 83 } 59 84 60 85 $zapataconfdir = $amp_conf['ASTETCDIR']."/"; … … 190 215 191 216 $fhandle = fopen($op_conf,"w" ); 192 if ($fhandle === false) {die("Cannot create/overwrite config file: $op_conf \n");} 217 if ($fhandle === false) { 218 out(sprintf(_("fw_fop cannot create/overwrite config file: %s"), $op_conf)); 219 freepbx_log(FPBX_LOG_CRITICAL, _("fw_fop failed to create/overwrite config file $op_conf.")); 220 return false; 221 } 193 222 fwrite($fhandle, $warning_banner); 194 223 … … 595 624 596 625 } 626 return true; 597 627 598 628 } // function fw_fop_retrieve_op_conf_from_mysql() modules/branches/2.10/fw_fop/install.php
r13091 r13170 21 21 global $amp_conf; 22 22 global $asterisk_conf; 23 global $db; 23 24 24 25 $freepbx_conf =& freepbx_conf::create(); … … 80 81 81 82 $freepbx_conf->set_conf_values(array('FOPWEBROOT' => $fopwebroot), true, true); 83 84 // Clean up old notification categorized under freepbx since it is now fw_fop 85 // 86 $nt = notifications::create($db); 87 $nt->delete('freepbx','reload_fop'); 82 88 ?> modules/branches/2.10/fw_fop/module.xml
r12878 r13170 3 3 <repo>unsupported</repo> 4 4 <name>FreePBX FOP Framework</name> 5 <version>2.10.0. 1</version>5 <version>2.10.0.2</version> 6 6 <publisher>FreePBX</publisher> 7 7 <license>GPLv2+</license> … … 10 10 </menuitems> 11 11 <changelog> 12 *2.10.0.2* #5496 12 13 *2.10.0.1* fix for fw_fop_parse_zapata 13 14 *2.10.0.0* upgrade xml info, category, support info
