diff options
author | amdmi3 <amdmi3@FreeBSD.org> | 2013-02-04 09:22:56 +0800 |
---|---|---|
committer | amdmi3 <amdmi3@FreeBSD.org> | 2013-02-04 09:22:56 +0800 |
commit | 2ea41f5ee10856288adff5000994880651424326 (patch) | |
tree | 91fa602c71792cd76b72b65615cd28ff23f0a001 /dns/poweradmin | |
parent | 6fab9c686f8074166bdd78a58167a66f6df0c180 (diff) | |
download | freebsd-ports-gnome-2ea41f5ee10856288adff5000994880651424326.tar.gz freebsd-ports-gnome-2ea41f5ee10856288adff5000994880651424326.tar.zst freebsd-ports-gnome-2ea41f5ee10856288adff5000994880651424326.zip |
- Update to 2.1.6
PR: 175699
Submitted by: Edmondas Girkantas <eg@fbsd.lt> (maintainer)
Diffstat (limited to 'dns/poweradmin')
-rw-r--r-- | dns/poweradmin/Makefile | 2 | ||||
-rw-r--r-- | dns/poweradmin/distinfo | 4 | ||||
-rw-r--r-- | dns/poweradmin/files/patch-add_zone_master.php | 39 | ||||
-rw-r--r-- | dns/poweradmin/files/patch-edit.php | 20 | ||||
-rw-r--r-- | dns/poweradmin/files/patch-helper.js | 55 | ||||
-rw-r--r-- | dns/poweradmin/files/patch-record.inc.php | 29 | ||||
-rw-r--r-- | dns/poweradmin/files/patch-templates.inc.php | 25 |
7 files changed, 3 insertions, 171 deletions
diff --git a/dns/poweradmin/Makefile b/dns/poweradmin/Makefile index 06645bedf7d4..7f50c2ab3410 100644 --- a/dns/poweradmin/Makefile +++ b/dns/poweradmin/Makefile @@ -6,7 +6,7 @@ # PORTNAME= poweradmin -PORTVERSION= 2.1.5 +PORTVERSION= 2.1.6 CATEGORIES= dns www MASTER_SITES= SF/${PORTNAME} \ https://www.poweradmin.org/download/ diff --git a/dns/poweradmin/distinfo b/dns/poweradmin/distinfo index 8ef990fc9113..1dfed9b20563 100644 --- a/dns/poweradmin/distinfo +++ b/dns/poweradmin/distinfo @@ -1,2 +1,2 @@ -SHA256 (poweradmin-2.1.5.tgz) = fe296a512dc1fe24483ebb4fc63d469e555ac64ae83f6a9ae2e6947cb94aef52 -SIZE (poweradmin-2.1.5.tgz) = 179862 +SHA256 (poweradmin-2.1.6.tgz) = ea728a522641bce59dfbe67b080c168b5484aa67b1af90a61c52f36ee573097d +SIZE (poweradmin-2.1.6.tgz) = 254258 diff --git a/dns/poweradmin/files/patch-add_zone_master.php b/dns/poweradmin/files/patch-add_zone_master.php deleted file mode 100644 index b723586ee3af..000000000000 --- a/dns/poweradmin/files/patch-add_zone_master.php +++ /dev/null @@ -1,39 +0,0 @@ ---- add_zone_master.php.orig 2011-05-30 12:33:42.399768001 +0300 -+++ add_zone_master.php 2011-05-30 12:34:41.423768002 +0300 -@@ -36,7 +36,10 @@ - if (isset($_POST['domain'])) { - $temp = array(); - foreach ($_POST['domain'] as $domain) { -- $temp[] = trim($domain); -+ if($domain != "") -+ { -+ $temp[] = trim($domain); -+ } - } - $domains = $temp; - } else { -@@ -56,6 +59,7 @@ - (verify_permission('user_view_others')) ? $perm_view_others = "1" : $perm_view_others = "0" ; - - if (isset($_POST['submit']) && $zone_master_add == "1" ) { -+ $error = false; - foreach ($domains as $domain) { - if (domain_exists($domain)) { - error($domain . " failed - " . ERR_DOMAIN_EXISTS); -@@ -63,7 +67,6 @@ - $error = true; - } elseif (add_domain($domain, $owner, $dom_type, '', $zone_template)) { - success("<a href=\"edit.php?id=" . get_zone_id_from_name($domain) . "\">".$domain . " - " . SUC_ZONE_ADD.'</a>'); -- $error = false; - } - } - -@@ -139,7 +142,7 @@ - echo " <tr>\n"; - echo " <td class=\"n\"> </td>\n"; - echo " <td class=\"n\">\n"; -- echo " <input type=\"submit\" class=\"button\" name=\"submit\" value=\"" . _('Add zone') . "\">\n"; -+ echo " <input type=\"submit\" class=\"button\" name=\"submit\" value=\"" . _('Add zone') . "\" onclick=\"checkDomainFilled();return false;\">\n"; - echo " </td>\n"; - echo " <td class=\"n\"> </td>\n"; - echo " </tr>\n"; diff --git a/dns/poweradmin/files/patch-edit.php b/dns/poweradmin/files/patch-edit.php deleted file mode 100644 index 6261ee517d14..000000000000 --- a/dns/poweradmin/files/patch-edit.php +++ /dev/null @@ -1,20 +0,0 @@ ---- edit.php.orig 2011-05-30 13:41:59.411768002 +0300 -+++ edit.php 2011-05-30 12:59:05.851768002 +0300 -@@ -51,9 +51,15 @@ - } - - if (isset($_POST['save_as'])) { -+ if (zone_templ_name_exists($_POST['templ_name'])) { -+ error(ERR_ZONE_TEMPL_EXIST); -+ } elseif ($_POST['templ_name'] == '') { -+ error(ERR_ZONE_TEMPL_IS_EMPTY); -+ } else { -+ success(SUC_ZONE_TEMPL_ADD); - $records = get_records_from_domain_id($zone_id); -- add_zone_templ_save_as($_POST['templ_name'], $_POST['templ_descr'], $_SESSION['userid'], $records); -- -+ add_zone_templ_save_as($_POST['templ_name'], $_POST['templ_descr'], $_SESSION['userid'], $records, get_zone_name_from_id($zone_id)); -+ } - } - - /* diff --git a/dns/poweradmin/files/patch-helper.js b/dns/poweradmin/files/patch-helper.js deleted file mode 100644 index 67cb1895510f..000000000000 --- a/dns/poweradmin/files/patch-helper.js +++ /dev/null @@ -1,55 +0,0 @@ ---- inc/helper.js.orig 2011-05-30 12:32:41.799768002 +0300 -+++ inc/helper.js 2011-05-30 12:35:03.911768000 +0300 -@@ -47,3 +47,52 @@ - field_area.innerHTML += "<li><input name='domain[]' id='"+(field+count)+"' type='text' class='input' /> <a onclick=\"this.parentNode.parentNode.removeChild(this.parentNode);\">Remove Field</a></li>"; - } - } -+ -+function getDomainsElements(){ -+ var -+ coll=document.getElementsByTagName('input'), -+ re=/^domain\[\]$/, -+ t, -+ elm, -+ i=0, -+ key=0, -+ records=new Array(); -+ -+ while(elm=coll.item(i++)) -+ { -+ t=re.exec(elm.name); -+ if(t!=null) -+ { -+ records[key]=elm; -+ key++; -+ } -+ } -+ return records; -+} -+ -+function checkDomainFilled(){ -+ var -+ domains= new Array(), -+ allEmpty=true, -+ domains=getDomainsElements(); -+ -+ if (domains.length == 1) { -+ if ((domains[0].value.length == 0 || domains[0].value == null || domains[0].value == "")) { -+ alert('Zone name cannot be empty'); -+ return false; -+ } -+ } else { -+ for (key in domains) { -+ if((domains[key].value.length != 0)) { -+ allEmpty = false; -+ } -+ } -+ -+ if (true === allEmpty) { -+ alert('Please fill in at least one Zone name'); -+ return false; -+ } -+ } -+ -+ add_zone_master.submit(); -+} diff --git a/dns/poweradmin/files/patch-record.inc.php b/dns/poweradmin/files/patch-record.inc.php deleted file mode 100644 index 1e79c4639f9d..000000000000 --- a/dns/poweradmin/files/patch-record.inc.php +++ /dev/null @@ -1,29 +0,0 @@ ---- inc/record.inc.php.orig 2010-11-30 10:46:51.416703000 +0200 -+++ inc/record.inc.php 2011-05-30 12:38:50.523768002 +0300 -@@ -1276,14 +1276,15 @@ - } - - if($zone_master_add == "1" || $zone_slave_add == "1") { -+ $domain = get_zone_name_from_id($zone_id); - $now = time(); - $templ_records = get_zone_templ_records($zone_template); - foreach ($templ_records as $r) { - if ((preg_match('/in-addr.arpa/i', $zone_id) && ($r["type"] == "NS" || $r["type"] == "SOA")) || (!preg_match('/in-addr.arpa/i', $zone_id))) - { -- $name = parse_template_value($r["name"], $zone_id); -+ $name = parse_template_value($r["name"], $domain); - $type = $r["type"]; -- $content = parse_template_value($r["content"], $zone_id); -+ $content = parse_template_value($r["content"], $domain); - $ttl = $r["ttl"]; - $prio = intval($r["prio"]); - -@@ -1307,7 +1308,7 @@ - - $query = "UPDATE zones - SET zone_templ_id = " . $db->quote($zone_template, 'integer') . " -- WHERE id = " . $db->quote($zone_id, 'integer') ; -+ WHERE domain_id = " . $db->quote($zone_id, 'integer') ; - $response = $db->exec($query); - - if (PEAR::isError($response)) { diff --git a/dns/poweradmin/files/patch-templates.inc.php b/dns/poweradmin/files/patch-templates.inc.php deleted file mode 100644 index 6f2b0cffb2e6..000000000000 --- a/dns/poweradmin/files/patch-templates.inc.php +++ /dev/null @@ -1,25 +0,0 @@ ---- inc/templates.inc.php.orig 2010-12-10 23:26:28.839400000 +0200 -+++ inc/templates.inc.php 2011-05-30 12:39:13.319768001 +0300 -@@ -312,7 +312,7 @@ - - // Add a zone template from zone / another template. - --function add_zone_templ_save_as($template_name, $description, $userid, $records) { -+function add_zone_templ_save_as($template_name, $description, $userid, $records, $domain = null) { - global $db; - - if (!(verify_permission('zone_master_add'))) { -@@ -339,9 +339,12 @@ - $content = $db->quote($record['content'], 'text'); - } - -+ $name = $domain ? preg_replace('/'.$domain.'/', '[ZONE]',$record['name']) : $record['name']; -+ $content = $domain ? preg_replace('/'.$domain.'/', '[ZONE]',$content) : $content; -+ - $query2 = "INSERT INTO zone_templ_records (zone_templ_id, name, type, content, ttl, prio) VALUES (" - . $db->quote($zone_templ_id, 'integer') . "," -- . $db->quote($record['name'], 'text') . "," -+ . $db->quote($name, 'text') . "," - . $db->quote($record['type'], 'text') . "," - . $content . "," - . $db->quote($record['ttl'], 'integer') . "," |