@@ 45-71 (lines=27) @@ | ||
42 | $this->reorderRecords(); |
|
43 | } |
|
44 | ||
45 | public function prep() |
|
46 | { |
|
47 | $this->system->db()->query(" |
|
48 | DELETE FROM dw_dns_records |
|
49 | WHERE type = ':RAW' |
|
50 | AND raw = ''"); |
|
51 | ||
52 | $this->system->db()->query(" |
|
53 | UPDATE dw_dns_records |
|
54 | SET type = 'COMMENT' |
|
55 | WHERE type = ':RAW'"); |
|
56 | ||
57 | $this->system->db()->query(" |
|
58 | UPDATE dw_dns_records |
|
59 | SET type = 'ZONE TTL' |
|
60 | WHERE type = '\$TTL'"); |
|
61 | ||
62 | $this->system->db()->query(" |
|
63 | UPDATE dw_dns_records |
|
64 | SET nlines = '1' |
|
65 | WHERE nlines = '0'"); |
|
66 | ||
67 | $this->system->db()->query(" |
|
68 | UPDATE dw_dns_records AS r, dw_dns_zones AS z |
|
69 | SET r.zonefile = z.zonefile |
|
70 | WHERE r.dns_zone_id = z.id"); |
|
71 | } |
|
72 | ||
73 | public function wrapLine($field, $wrap_at) |
|
74 | { |
@@ 86-109 (lines=24) @@ | ||
83 | return preg_replace("/^((.*?)\.)(.*)$/", "\\3", $domain); |
|
84 | } |
|
85 | ||
86 | public function updateSegments() |
|
87 | { |
|
88 | $this->system->db()->query(" |
|
89 | UPDATE segment_data |
|
90 | SET active = '0', |
|
91 | inactive = '0', |
|
92 | missing = '0', |
|
93 | filtered = '0'"); |
|
94 | ||
95 | $this->system->db()->query(" |
|
96 | UPDATE segment_data |
|
97 | SET active = '1' |
|
98 | WHERE domain IN (SELECT domain FROM domains WHERE active NOT IN ('0', '10'))"); |
|
99 | ||
100 | $this->system->db()->query(" |
|
101 | UPDATE segment_data |
|
102 | SET inactive = '1' |
|
103 | WHERE domain IN (SELECT domain FROM domains WHERE active IN ('0', '10'))"); |
|
104 | ||
105 | $this->system->db()->query(" |
|
106 | UPDATE segment_data |
|
107 | SET missing = '1' |
|
108 | WHERE domain NOT IN (SELECT domain FROM domains)"); |
|
109 | } |
|
110 | ||
111 | public function updateAllFees() |
|
112 | { |