change icon positions and add possibility to disable dnssec globally
authorStricted <info@stricted.de>
Fri, 20 Feb 2015 06:57:34 +0000 (07:57 +0100)
committerStricted <info@stricted.de>
Fri, 20 Feb 2015 06:58:26 +0000 (07:58 +0100)
database.sql
lib/page/SecListPage.class.php
lib/system/cache/builder/DNSApiCacheBuilder.class.php
templates/default/index.tpl
templates/default/recordList.tpl

index 422514ac73470559640a66e9aeae91f5611342fa..fb0119522ec1c08cc620b9e0a0c0093e1f75687a 100644 (file)
@@ -90,7 +90,7 @@ INSERT INTO dns_options VALUES (8, 'dns_soa_refresh', '28800');
 INSERT INTO dns_options VALUES (9, 'dns_soa_retry', '7200');
 INSERT INTO dns_options VALUES (10, 'dns_soa_expire', '604800');
 INSERT INTO dns_options VALUES (11, 'dns_soa_minimum_ttl', '60');
-
+INSERT INTO dns_options VALUES (12, 'enable_dnssec', '1');
 
 
 INSERT INTO `dns_user` VALUES (1, 'admin', 'example@example.net', '$2a$08$XfcfTGc1LlmOHWUt/2sfNeFLEwqESy6wmrIIJMyQS1j5pwembqiae', '0', '2');
index 4363eab976e2f2daeb50fafa2cd7fd4705de449f..62b7189e48d9a377056e3620cb3d54826e62b7f8 100644 (file)
@@ -12,7 +12,7 @@ class SecListPage extends AbstractPage {
        public $activeMenuItem = 'index';
        
        public function prepare() {
-               if (!isset($_GET['id']) || empty($_GET['id'])) {
+               if (!isset($_GET['id']) || empty($_GET['id']) || !ENABLE_DNSSEC) {
                        throw new \Exception('The link you are trying to reach is no longer available or invalid.', 404);
                }
                
index c4cdfff52a1e9f574b24031e35aee61abea30584..97d734678eb720af704f91c7b5c44f0a63dde020 100644 (file)
@@ -34,11 +34,13 @@ class DNSApiCacheBuilder extends AbstractCacheBuilder {
                                $data[$zone['origin']]['rr'][] = $rr;
                        }
                        
-                       /* dnssec keys */
-                       $sql3 = "SELECT * FROM dns_sec where zone = ? and active = ?";
-                       $statement3 = DNS::getDB()->query($sql3, array($zone['id'], 1));
-                       while ($sec = DNS::getDB()->fetch_array($statement3)) {
-                               $data[$zone['origin']]['sec'][] = $sec;
+                       if (ENABLE_DNSSEC) {
+                               /* dnssec keys */
+                               $sql3 = "SELECT * FROM dns_sec where zone = ? and active = ?";
+                               $statement3 = DNS::getDB()->query($sql3, array($zone['id'], 1));
+                               while ($sec = DNS::getDB()->fetch_array($statement3)) {
+                                       $data[$zone['origin']]['sec'][] = $sec;
+                               }
                        }
                }
                
index 3426b6ea598117891b74766ae79cf722ed1a84de..77f407da0a8e34a135486e700fdcf4ec8c442d41 100644 (file)
@@ -30,7 +30,7 @@
                                                                        <th><a class="sorting{if $sortField == 'origin'}_{$sortOrder|strtolower}{/if}" href="index.php?page=DomainList&pageNo={$pageNo}&sortField=origin&sortOrder={if $sortField == 'origin' && $sortOrder == 'ASC'}DESC{else}ASC{/if}">Name</a></th>
                                                                        <th><a class="sorting{if $sortField == 'serial'}_{$sortOrder|strtolower}{/if}" href="index.php?page=DomainList&pageNo={$pageNo}&sortField=serial&sortOrder={if $sortField == 'serial' && $sortOrder == 'ASC'}DESC{else}ASC{/if}">Serial</a></th>
                                                                        <th>Records</th>
-                                                                       <th>Manage</th>
+                                                                       {if $isReseller === true || $smarty.const.ENABLE_DNSSEC}<th>Manage</th>{/if}
                                                                </tr>
                                                        </thead>
                                                        
                                                                        <td>{$domain['serial']}</td>
                                                                        <td>{$domain['rrc']}</td>
                                                                        <td>
-                                                                               {if $isReseller === true}
-                                                                                       <span class="fa fa-remove ttips pointer deleteDomain" delete-id="{$domain['id']}" delete-confirm="{lang}domain.delete.message{/lang}" title="{lang}button.delete{/lang}"></span>
-                                                                                       <span class="fa fa{if $domain['active']}-check{/if}-square-o ttips pointer toggleDomain" toggle-id="{$domain['id']}" title="{if $domain['active']}{lang}button.disable{/lang}{else}{lang}button.enable{/lang}{/if}" data-disable-message="{lang}button.disable{/lang}" data-enable-message="{lang}button.enable{/lang}"></span>
-                                                                               {/if}
-                                                                               <a href="index.php?page=SecList&id={$domain['id']}" class="ttips" title="Edit DNSSEC"><span class="fa fa-key"></span></a>
+                                                                               {if $isReseller === true}<span class="fa fa{if $domain['active']}-check{/if}-square-o ttips pointer toggleDomain" toggle-id="{$domain['id']}" title="{if $domain['active']}{lang}button.disable{/lang}{else}{lang}button.enable{/lang}{/if}" data-disable-message="{lang}button.disable{/lang}" data-enable-message="{lang}button.enable{/lang}"></span>&nbsp;{/if}
+                                                                               {if $smarty.const.ENABLE_DNSSEC}<a href="index.php?page=SecList&id={$domain['id']}" class="ttips" title="Edit DNSSEC"><span class="fa fa-key"></span></a>&nbsp;{/if}
+                                                                               {if $isReseller === true}<span class="fa fa-remove ttips pointer deleteDomain" delete-id="{$domain['id']}" delete-confirm="{lang}domain.delete.message{/lang}" title="{lang}button.delete{/lang}"></span>{/if}
                                                                        </td>
                                                                </tr>
                                                                {/foreach}
index 9b7b157e1b300b86ce8e63f8f1808eeaa36bd248..c5c0e8e2741dafbdab87db0e5aee2c764bbbdd08 100644 (file)
@@ -47,9 +47,9 @@
                                                                <td>{$record['aux']}</td>
                                                                <td>{if $record['data']|strlen > 40}{$record['data']|substr:0:40}&hellip;{else}{$record['data']}{/if}</td>
                                                                <td>
-                                                                       <span class="fa fa-remove ttips pointer deleteRecord" delete-id="{$record['id']}" delete-confirm="{lang}record.delete.message{/lang}" title="{lang}button.delete{/lang}"></span>
-                                                                       <span class="fa fa{if $record['active']}-check{/if}-square-o ttips pointer toggleRecord" toggle-id="{$record['id']}" title="{if $record['active']}{lang}button.disable{/lang}{else}{lang}button.enable{/lang}{/if}" data-disable-message="{lang}button.disable{/lang}" data-enable-message="{lang}button.enable{/lang}"></span>
                                                                        <a href="index.php?page=RecordEdit&id={$record['id']}"><span class="fa fa-pencil ttips pointer" title="Edit"></span></a>
+                                                                       <span class="fa fa{if $record['active']}-check{/if}-square-o ttips pointer toggleRecord" toggle-id="{$record['id']}" title="{if $record['active']}{lang}button.disable{/lang}{else}{lang}button.enable{/lang}{/if}" data-disable-message="{lang}button.disable{/lang}" data-enable-message="{lang}button.enable{/lang}"></span>
+                                                                       <span class="fa fa-remove ttips pointer deleteRecord" delete-id="{$record['id']}" delete-confirm="{lang}record.delete.message{/lang}" title="{lang}button.delete{/lang}"></span>
                                                                </td>
                                                        </tr>
                                                        {/foreach}