Skip to content

Commit

Permalink
fix: smarty_modifier_link renamed to extlink because of php builtin f…
Browse files Browse the repository at this point in the history
…unction
  • Loading branch information
kumy committed May 27, 2024
1 parent 71a6087 commit e8664f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ public function getModifierCallback(string $modifierName) {
return [$this, 'smarty_modifier_gklink'];
case 'language':
return [$this, 'smarty_modifier_language'];
case 'link':
return [$this, 'smarty_modifier_link'];
case 'extlink':
return [$this, 'smarty_modifier_extlink'];
case 'logicon':
return [$this, 'smarty_modifier_logicon'];
case 'login_link':
Expand Down Expand Up @@ -411,7 +411,7 @@ public function smarty_modifier_language(?string $lang, bool $asLocale = false):
/**
* Purpose: outputs an html link.
*/
public function smarty_modifier_link(string $url, ?string $textString = null, ?string $target = null): string {
public function smarty_modifier_extlink(string $url, ?string $textString = null, ?string $target = null): string {
$text = is_null($textString) ? $url : self::smarty_modifier_escape($textString);
$target_html = is_null($target) ? '' : ' target="'.$target.'"';

Expand Down
4 changes: 2 additions & 2 deletions website/app-templates/smarty/pages/statistics_waypoints.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tbody>
<tr>
<td>GC</td>
<td>{{GK_WAYPOINT_SERVICE_URL_GC}|link:null:_blank nofilter}</td>
<td>{{GK_WAYPOINT_SERVICE_URL_GC}|extlink:null:"_blank" nofilter}</td>
<td class="text-right">{$wpt_gc_count}</td>
<td class="text-right"></td>
<td class="text-right"></td>
Expand All @@ -33,7 +33,7 @@
{foreach from=$wpt_oc item=item}
<tr class="{if !is_null($item->last_success_datetime) and $item->last_error_time_diff < constant('GK_WAYPOINT_SERVICE_REFRESH_INTERVAL_'|cat:$item->service_id)}success{else}danger{/if}">
<td>{$item->service_id}</td>
<td>{constant(sprintf('GK_WAYPOINT_SERVICE_URL_%s', $item->service_id))|link:null:_blank nofilter}</td>
<td>{constant(sprintf('GK_WAYPOINT_SERVICE_URL_%s', $item->service_id))|extlink:null:"_blank" nofilter}</td>
<td class="text-right">{$item->wpt_count}</td>
<td class="text-right">{if !is_null($item->last_success_datetime)}{$item->last_success_datetime|print_date_expiration:2}{/if}</td>
<td class="text-right">{if is_null($item->revision)}{t}N/A{/t}{else}{$item->revision}{/if}</td>
Expand Down

0 comments on commit e8664f4

Please sign in to comment.