mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2026-04-27 00:25:50 +03:00
[GH-ISSUE #142] Error in processing template records if name is '' #88
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
pull-request
question
question
upstream
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nsedit#88
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bajizs on GitHub (Mar 29, 2017).
Original GitHub issue: https://github.com/tuxis-ie/nsedit/issues/142
If you have empty name for some template records (for example MX record), get an API error of not canonical name.
can be solved withthis lines in zones .php (replace lines 296-298 with next lines):
foreach ($template['records'] as $record) {
$name = $record['name'];
if ('' == $name) {
$name = $zone->name;
} elseif (string_ends_with($name, '.')) {
$name = substr($name, 0, -1);
if (!string_ends_with($name, $zone->name)) {
jtable_respond(null, 'error', "Name $name not in zone ".$zone->name);
}
} else if (!string_ends_with($name, $zone->name)) {
$name = $name . '.' . $zone->name;
}
$zone->addRecord($name, $record['type'], $record['content']);
}
@tuxis-ie commented on GitHub (Mar 29, 2017):
This works for me?
@bajizs commented on GitHub (Mar 29, 2017):
On relase v1.1?
@tuxis-ie commented on GitHub (Apr 28, 2017):
Yes, always worked.