OpenNetAdmin

Track. Automate. Configure.

Home About Features Community Develop
Download this project as a tar.gz file

dns_record_add error msg fix

yshollander

15-07-2009 15:16:33

Fix the incorrect literal backslash and add a \n at the end for cleanliness.

--- dns_record.inc.php.orig 2009-07-15 17:15:14.000000000 -0400
+++ dns_record.inc.php 2009-07-15 17:15:17.000000000 -0400
@@ -182,7 +182,7 @@
list($status, $rows, $interface) = ona_find_interface($options['ip']);
if (!$rows) {
printmsg("ERROR => dns_record_add() Unable to find existing IP interface: {$options['ip']}",3);
- $self['error'] = "ERROR => dns_record_add() Unable to find IP interface: {$options['ip']}\\nA records must point to existing IP addresses.\\nPlease add an interface with this IP address first.";
+ $self['error'] = "ERROR => dns_record_add() Unable to find IP interface: {$options['ip']}\nA records must point to existing IP addresses.\\nPlease add an interface with this IP address first.\n";
return(array(4, $self['error']));
}

yshollander

15-07-2009 15:32:06

Corrected patch. Missed one more literal backslash.

--- dns_record.inc.php.orig 2009-07-15 17:15:14.000000000 -0400
+++ dns_record.inc.php 2009-07-15 17:30:48.000000000 -0400
@@ -182,7 +182,7 @@
list($status, $rows, $interface) = ona_find_interface($options['ip']);
if (!$rows) {
printmsg("ERROR => dns_record_add() Unable to find existing IP interface: {$options['ip']}",3);
- $self['error'] = "ERROR => dns_record_add() Unable to find IP interface: {$options['ip']}\\nA records must point to existing IP addresses.\\nPlease add an interface with this IP address first.";
+ $self['error'] = "ERROR => dns_record_add() Unable to find IP interface: {$options['ip']}\nA records must point to existing IP addresses.\nPlease add an interface with this IP address first.\n";
return(array(4, $self['error']));
}

Matt

15-07-2009 15:35:15

I found a few as well.. these should now be addressed.