Changeset 7096 for modules/branches
- Timestamp:
- 10/22/08 08:08:48 (5 years ago)
- Files:
-
- modules/branches/2.6/core/functions.inc.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.6/core/functions.inc.php
r7095 r7096 4200 4200 $result = $db->getRow($sql,DB_FETCHMODE_ASSOC); 4201 4201 4202 $filename dir= isset($asterisk_conf["astetcdir"]) && $asterisk_conf["astetcdir"] != '' ? rtrim($asterisk_conf["astetcdir"],DIRECTORY_SEPARATOR) : "/etc/asterisk";4203 $filename = $filenamedir."/indications_general_additional.conf";4202 $filename = isset($asterisk_conf["astetcdir"]) && $asterisk_conf["astetcdir"] != '' ? rtrim($asterisk_conf["astetcdir"],DIRECTORY_SEPARATOR) : "/etc/asterisk"; 4203 $filename .= "/indications.conf"; 4204 4204 4205 4205 if (($fd = fopen($filename, "w")) === false) { 4206 4206 $desc = sprintf(_("Failed to open %s for writing, aborting attempt to write the country indications. The file may be readonly or the permissions may be incorrect."), $filename); 4207 $notify->add_error('core','INDICATIONS',_("Failed to write indications _general_additional.conf"), $desc);4207 $notify->add_error('core','INDICATIONS',_("Failed to write indications.conf"), $desc); 4208 4208 return; 4209 4209 } 4210 4210 $notify->delete('core', 'INDICATIONS'); 4211 4211 4212 fwrite($fd, "country=".$result['value']."\n\n"); 4213 fclose($fd); 4214 4215 $filename = $filenamedir."/indications_additional.conf"; 4216 4217 if (($fd = fopen($filename, "w")) === false) { 4218 $desc = sprintf(_("Failed to open %s for writing, aborting attempt to write the country indications. The file may be readonly or the permissions may be incorrect."), $filename); 4219 $notify->add_error('core','INDICATIONS',_("Failed to write indications_additional.conf"), $desc); 4220 return; 4221 } 4222 $notify->delete('core', 'INDICATIONS'); 4212 fwrite($fd, "[general]\ncountry=".$result['value']."\n\n"); 4223 4213 4224 4214 $zonelist = general_get_zonelist(); 4225 4215 foreach ($zonelist as $zone) { 4226 if ($zone['iso'] == $result['value']){4227 4216 fwrite($fd, "[{$zone['iso']}]\n{$zone['conf']}\n\n"); 4228 }4229 4217 } 4230 4218 fclose($fd);
