better use site_url() instead base_url() to include index page (if set)

This commit is contained in:
HB9HIL
2025-07-22 15:27:44 +02:00
parent ce585d2aa4
commit f1fd60ccef
3 changed files with 3 additions and 3 deletions

View File

@@ -16,7 +16,7 @@
<li><a href="https://github.com/wavelog/Wavelog/wiki/Third-Party-Tools" target="_thirdparty"><?=__("More Tools")?></a></li>
</ul>
</p>
<p class="card-text"><span class="badge text-bg-warning"><?= __("API URL"); ?></span> <?= __("The API URL for this Wavelog instance is"); ?>: <span class="api-url" id="apiUrl"><code class="ms-3 me-3"><?php echo base_url(); ?></code></span><span data-bs-toggle="tooltip" title="<?= __("Copy to clipboard"); ?>" onClick='copyApiUrl()'><i class="copy-icon fas fa-copy"></i></span></p>
<p class="card-text"><span class="badge text-bg-warning"><?= __("API URL"); ?></span> <?= __("The API URL for this Wavelog instance is"); ?>: <span class="api-url" id="apiUrl"><code class="ms-3 me-3"><?php echo site_url(); ?></code></span><span data-bs-toggle="tooltip" title="<?= __("Copy to clipboard"); ?>" onClick='copyApiUrl()'><i class="copy-icon fas fa-copy"></i></span></p>
<p class="card-text"><span class="badge text-bg-info"><?= __("Info"); ?></span> <?= __("It's good practice to delete a key if you are no longer using the associated application."); ?></p>
<?php if ($clubmode) { ?>
<p class="card-text"><span class="badge text-bg-danger"><?= __("Important"); ?></span> <?= __("On Clubstations the API Keys are personal and not shared. Clubstation users can only see their own keys."); ?></p>

View File

@@ -43,7 +43,7 @@
</tr>
<tr>
<td><?= __("Base URL"); ?></td>
<td><span id="baseUrl"><a href="<?php echo $this->config->item('base_url') ?>" target="_blank"><?php echo $this->config->item('base_url'); ?></a></span> <span data-bs-toggle="tooltip" title="<?= __("Copy to clipboard"); ?>" onclick='copyURL("<?php echo $this->config->item('base_url'); ?>")'><i class="copy-icon fas fa-copy"></span></td>
<td><span id="baseUrl"><a href="<?php echo site_url(); ?>" target="_blank"><?php echo site_url(); ?></a></span> <span data-bs-toggle="tooltip" title="<?= __("Copy to clipboard"); ?>" onclick='copyURL("<?php echo site_url(); ?>")'><i class="copy-icon fas fa-copy"></span></td>
</tr>
<tr>
<td><?= __("Migration"); ?></td>

View File

@@ -352,7 +352,7 @@ function copyApiKey(apiKey) {
function copyApiUrl() {
var apiUrlField = $('#apiUrl');
navigator.clipboard.writeText("<?php echo base_url(); ?>").then(function() {
navigator.clipboard.writeText("<?php echo site_url(); ?>").then(function() {
});
apiUrlField.addClass('flash-copy')
.delay('1000').queue(function() {