| 1 |
--- trunk.orig/modules/core/functions.inc.php |
|---|
| 2 |
+++ trunk/modules/core/functions.inc.php |
|---|
| 3 |
@@ -2690,6 +2690,13 @@ function general_generate_indications() |
|---|
| 4 |
$filename = isset($asterisk_conf["astetcdir"]) && $asterisk_conf["astetcdir"] != '' ? rtrim($asterisk_conf["astetcdir"],DIRECTORY_SEPARATOR) : "/etc/asterisk"; |
|---|
| 5 |
$filename .= "/indications.conf"; |
|---|
| 6 |
$fd = fopen($filename, "w"); |
|---|
| 7 |
+ |
|---|
| 8 |
+ if ( ($fd = fopen($filename, "w")) === FALSE) { |
|---|
| 9 |
+ // TODO: Also add errno information. |
|---|
| 10 |
+ echo "Failed to open indications file for writing: $filename.<br>\n"; |
|---|
| 11 |
+ return; |
|---|
| 12 |
+ } |
|---|
| 13 |
+ |
|---|
| 14 |
fwrite($fd, "[general]\ncountry=".$result['value']."\n\n"); |
|---|
| 15 |
|
|---|
| 16 |
$zonelist = general_get_zonelist(); |
|---|