Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
provision
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
provision
Commits
cef531ed
Commit
cef531ed
authored
Sep 27, 2010
by
anarcat
Committed by
anarcat
Sep 27, 2010
Browse files
Options
Downloads
Patches
Plain Diff
remove more dead code
parent
4c2fed11
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
dns/dns.api.inc
+0
-25
0 additions, 25 deletions
dns/dns.api.inc
with
0 additions
and
25 deletions
dns/dns.api.inc
deleted
100644 → 0
+
0
−
25
View file @
4c2fed11
<?php
/**
* copy of frontend's hosting_dns_split_url
*/
function
_dns_split_url
(
$url
)
{
$tlds
=
split
(
"
\n
"
,
variable_get
(
'hosting_dns_tlds'
,
''
));
$first_dot
=
strpos
(
$url
,
'.'
);
# Strip off the first part
$host
=
substr
(
$url
,
0
,
$first_dot
);
$zone
=
substr
(
$url
,
$first_dot
);
# If the remaining hostname is a TLD
if
(
in_array
(
$zone
,
$tlds
))
{
# Add the first part back, and that's the zone (the host is @)
$zone
=
$host
.
$zone
;
$host
=
'@'
;
}
else
{
# that's the zone (and the host is the first part)
$zone
=
substr
(
$zone
,
1
);
# strip the leading .
}
return
array
(
'host'
=>
$host
,
'zone'
=>
$zone
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment