public inbox for ipfire-scm@lists.ipfire.org
 help / color / mirror / Atom feed
From: git@ipfire.org
To: ipfire-scm@lists.ipfire.org
Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 10cd52ba8e0f1c44666cd4a2bf9845c4e783a238
Date: Sun, 27 Jul 2014 12:36:19 +0200	[thread overview]
Message-ID: <20140727103619.39AC0212C4@argus.ipfire.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 3813 bytes --]

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".

The branch, next has been updated
       via  10cd52ba8e0f1c44666cd4a2bf9845c4e783a238 (commit)
       via  dc07707153e7b6cc1af646c84d77ab5ddde02d70 (commit)
      from  39f5352fdb8b6cc088a447152f43ba5148ad4819 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 10cd52ba8e0f1c44666cd4a2bf9845c4e783a238
Merge: 39f5352 dc07707
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date:   Sun Jul 27 12:36:11 2014 +0200

    Merge remote-tracking branch 'stevee/next-ddns-opendns.com-fix' into next

commit dc07707153e7b6cc1af646c84d77ab5ddde02d70
Author: Stefan Schantl <stefan.schantl(a)ipfire.org>
Date:   Sat Jul 26 18:26:37 2014 +0200

    ddns.cgi: Support hostname details without seperating dots.
    
    To keep compatiblity with the settings file of the old DDNS update script
    (setddns.pl) we keept the storrage of the hostname information in
    two parts (hostname and domain) and connected both with a dot to get a valid
    FQDN again. OpenDNS and may some other providers do not use a dotted format
    for this information, so one of these two values were empty.
    
    We now can handle such cases in a right way.

-----------------------------------------------------------------------

Summary of changes:
 html/cgi-bin/ddns.cgi | 30 +++++++++++++++++++++++++++---
 1 file changed, 27 insertions(+), 3 deletions(-)

Difference in files:
diff --git a/html/cgi-bin/ddns.cgi b/html/cgi-bin/ddns.cgi
index 7be9a50..aeb0cd7 100644
--- a/html/cgi-bin/ddns.cgi
+++ b/html/cgi-bin/ddns.cgi
@@ -314,8 +314,17 @@ if ($settings{'ACTION'} eq $Lang::tr{'edit'}) {
 			# Splitt lines (splitting element is a single ",") and save values into temp array.
 			@temp = split(/\,/,$line);
 
+			# Handle hostname details. Only connect the values with a dott if both are available.
+			my $hostname;
+
+			if (($temp[1]) && ($temp[2])) {
+				$hostname = "$temp[1].$temp[2]";
+			} else {
+				$hostname = "$temp[1]";
+			}
+
 			$settings{'SERVICE'} = $temp[0];
-			$settings{'HOSTNAME'} = "$temp[1].$temp[2]";
+			$settings{'HOSTNAME'} = $hostname;
 			$settings{'PROXY'} = $temp[3];
 			$settings{'WILDCARDS'} = $temp[4];
 			$settings{'LOGIN'} = $temp[5];
@@ -536,11 +545,20 @@ END
 			$col="bgcolor='$color{'color22'}'";
 		}
 
+		# Handle hostname details. Only connect the values with a dott if both are available.
+		my $hostname="";
+
+		if (($temp[1]) && ($temp[2])) {
+			$hostname="$temp[1].$temp[2]";
+		} else {
+			$hostname="$temp[1]";
+		}
+
 		# The following HTML Code still is part of the loop.
 		print <<END;
 <tr>
 	<td align='center' $col><a href='http://$temp[0]'>$temp[0]</a></td>
-	<td align='center' $col>$sync$temp[1].$sync$temp[2]</td>
+	<td align='center' $col>$sync$hostname</td>
 
 	<td align='center' $col><form method='post' action='$ENV{'SCRIPT_NAME'}'>
 		<input type='hidden' name='ID' value='$id'>
@@ -641,7 +659,13 @@ sub GenerateDDNSConfigFile {
 		# Skip disabled entries.
 		next if ($enabled eq "off");
 
-		print FILE "[$hostname.$domain]\n";
+		# Handle hostname details. Only connect the values with a dott if both are available.
+		if (($hostname) && ($domain)) {
+			print FILE "[$hostname.$domain]\n";
+		} else {
+			print FILE "[$hostname]\n";
+		}
+
 		print FILE "provider = $provider\n";
 
 		my $use_token = 0;


hooks/post-receive
--
IPFire 2.x development tree

                 reply	other threads:[~2014-07-27 10:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140727103619.39AC0212C4@argus.ipfire.org \
    --to=git@ipfire.org \
    --cc=ipfire-scm@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox