Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
What's new
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Menu
Open sidebar
apisnetworks
ApisCP
Commits
4a0202d4
Commit
4a0202d4
authored
Jun 12, 2022
by
Hephaestus Builder
⚒
Committed by
Matt Saladna
Jun 12, 2022
Browse files
CHG: Preserve "proxied" override (Cloudflare)
parent
e8db8e12
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/Opcenter/Dns/Providers/Cloudflare/Module.php
View file @
4a0202d4
...
...
@@ -419,7 +419,7 @@
'ttl'
=>
$record
->
ttl
,
'parameter'
=>
str_replace
(
"
\t
"
,
' '
,
$parameter
),
]
))
->
setMeta
(
'id'
,
$record
->
id
);
))
->
setMeta
(
'id'
,
$record
->
id
)
->
setMeta
(
'proxied'
,
$record
->
proxied
)
;
$this
->
addCache
(
$r
);
$preamble
[]
=
$record
->
name
.
".
\t
"
.
$record
->
ttl
.
"
\t
IN
\t
"
.
$record
->
type
.
"
\t
"
.
$parameter
;
...
...
@@ -524,13 +524,15 @@
$new
=
$merged
->
merge
(
$new
);
$cfu
=
clone
$new
;
$data
=
$cfu
->
spreadParameters
();
$wasProxied
=
$this
->
getRecordFromCache
(
$old
)
->
getMeta
(
'proxied'
);
$result
=
$api
->
updateRecordDetails
(
$this
->
getZoneId
(
$zone
),
$this
->
getRecordId
(
$old
),
$data
+
[
'type'
=>
$cfu
[
'rr'
],
'name'
=>
$cfu
[
'name'
],
'ttl'
=>
$cfu
[
'ttl'
]
??
null
,
'content'
=>
$cfu
[
'parameter'
],
'priority'
=>
$data
[
'data'
][
'priority'
]
??
null
,
'proxied'
=>
$this
->
isProxiable
(
$cfu
[
'rr'
],
(
string
)
$cfu
[
'parameter'
])
'proxied'
=>
$wasProxied
&&
$this
->
isProxiable
(
$cfu
[
'rr'
],
(
string
)
$cfu
[
'parameter'
])
]);
$new
->
setMeta
(
'id'
,
$result
->
result
->
id
??
null
);
}
catch
(
ClientException
$e
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment