diff options
author | Christian Schneider | 2023-12-13 15:13:54 +0100 |
---|---|---|
committer | Christian Schneider | 2023-12-13 15:16:05 +0100 |
commit | 72ea001942c5811d80a8102e3249049086eb7da9 (patch) | |
tree | d798a2df37d8f3d790f5c0413841b71367f438e1 | |
parent | 9068da3a13a95748f2c79e9f78d05ede25aca28a (diff) | |
download | itools-72ea001942c5811d80a8102e3249049086eb7da9.tar.gz itools-72ea001942c5811d80a8102e3249049086eb7da9.tar.bz2 itools-72ea001942c5811d80a8102e3249049086eb7da9.zip |
Fix and simplify text admin links for OneDomain
-rw-r--r-- | it_text.class | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/it_text.class b/it_text.class index 2f11277..bf52e14 100644 --- a/it_text.class +++ b/it_text.class @@ -149,11 +149,7 @@ function text($label, $language = null) if ($GLOBALS['debug_texts'] && !preg_match('/submit|button|servicedomain/i', $label) && (!$_GET['it_texts_mark'] || $label == $_GET['it_texts_mark'])) { - $host = 'http' . (isset($_SERVER['HTTPS']) ? 's' : '') . '://' . preg_replace('/\.texts/', '', $_SERVER['HTTP_HOST']); - if ($service = $this->label_to_service[$label]) - $host = preg_replace('#//(admin\.)?[^.]*\.#', "//$service.", $host); - - $text = "<span style='background:#8F8' title='$label (" . it_debug::backtrace(array('levels'=>1, 'skipfiles'=>"text|auto_prepend")) . ")'>" . ($text ? $text : $label) . "</span><a href='$host/admin/texts.html?edit=$label'>.</a>"; + $text = "<span style='background:#8F8' title='$label (" . it_debug::backtrace(array('levels'=>1, 'skipfiles'=>"text|auto_prepend")) . ")'>" . ($text ? $text : $label) . "</span><a href='" . it::replace(['\.texts\.' => '.'], U(it::replace(['^///' => '/'], '//' . $this->label_to_service[$label] . '/admin/texts'), ['edit' => $label])) . "'>.</a>"; } if (isset($GLOBALS['it_text_sampling'])) |