[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Smarty function: replace str_contains with strstr smarty function.
"ushindi bienvenu \(@usbbush\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <68b8273b95e27_2cdcfb4521b1@gitlab-sidekiq-low-urgency-cpu-bound-v2-799dc879cb-brv2b.mail> |
ushindi bienvenu pushed to branch master at Tiki Wiki CMS Groupware / Tiki
Commits:
5f81190d by Boss Ibrahim Mussa Gregoire at 2025-09-03T11:24:24+00:00
[FIX] Smarty function: replace str_contains with strstr smarty function.
---
* [FIX] Smarty function: replace str_contains with strstr smarty function.
See merge request tikiwiki/tiki!8473
- - - - -
6 changed files:
- templates/freetag.tpl
- templates/freetag_list.tpl
- templates/modules/mod-freetags_current.tpl
- templates/modules/mod-freetags_most_popular.tpl
- templates/modules/mod-freetags_prefered.tpl
- templates/tiki-browse_freetags.tpl
Changes:
=====================================
templates/freetag.tpl
=====================================
@@ -10,7 +10,7 @@
<div id="freetager">
<input type="text" id="tagBox" class="form-control" name="freetag_string" value="{$taglist|escape}">
{foreach from=$tag_suggestion item=t}
- {capture name=tagurl}{if (str_contains($t, ' '))}"{$t}"{else}{$t}{/if}{/capture}
+ {capture name=tagurl}{if (strstr($t, ' '))}"{$t}"{else}{$t}{/if}{/capture}
<a href="javascript:addTag('{$smarty.capture.tagurl|escape:'javascript'|escape}');" onclick="javascript:needToConfirm=false">{$t|escape}</a>
{/foreach}
{if $prefs.feature_help eq 'y'}
=====================================
templates/freetag_list.tpl
=====================================
@@ -1,7 +1,7 @@
{if $prefs.feature_freetags eq 'y' and $tiki_p_view_freetags eq 'y' and isset($tags[0])}
<div class="freetaglist">{icon name="tags" class="tips btn btn-link btn-sm" title=":{tr}Browse Tags{/tr}" href="tiki-browse_freetags.php"}
{foreach from=$tags item=taginfo}
- {capture name=tagurl}{if (str_contains($taginfo.tag, ' '))}"{$taginfo.tag}"{else}{$taginfo.tag}{/if}{/capture}
+ {capture name=tagurl}{if (strstr($taginfo.tag, ' '))}"{$taginfo.tag}"{else}{$taginfo.tag}{/if}{/capture}
{if isset($links_inactive) and $links_inactive eq 'y'}
<a class="btn-primary btn-sm" href="#" role="button">{$taginfo.tag|escape}</a>
{else}
=====================================
templates/modules/mod-freetags_current.tpl
=====================================
@@ -3,7 +3,7 @@
{if $modFreetagsCurrent.count gt 0}
{section name=ix loop=$modFreetagsCurrent.data}
<div class="module">
- {capture name=tagurl}{if (str_contains($modFreetagsCurrent.data[ix].tag, ' '))}"{$modFreetagsCurrent.data[ix].tag}"{else}{$modFreetagsCurrent.data[ix].tag}{/if}{/capture}
+ {capture name=tagurl}{if (strstr($modFreetagsCurrent.data[ix].tag, ' '))}"{$modFreetagsCurrent.data[ix].tag}"{else}{$modFreetagsCurrent.data[ix].tag}{/if}{/capture}
<a class="linkmodule" href="tiki-browse_freetags.php?tag={$smarty.capture.tagurl|escape:'url'}">{$modFreetagsCurrent.data[ix].tag|escape}</a>
</div>
{/section}
=====================================
templates/modules/mod-freetags_most_popular.tpl
=====================================
@@ -5,7 +5,7 @@
{if ($type ne 'cloud')}<ul class="freetag">{/if}
{foreach from=$most_popular_tags item=tag}
{if ($type ne 'cloud')}<li class="freetag">{/if}
- {capture name=tagurl}{if (str_contains($tag.tag, ' '))}"{$tag.tag}"{else}{$tag.tag}{/if}{/capture}
+ {capture name=tagurl}{if (strstr($tag.tag, ' '))}"{$tag.tag}"{else}{$tag.tag}{/if}{/capture}
<a class="freetag_{$tag.size}" title="{tr}List everything tagged{/tr} {$tag.tag|escape}" href="tiki-browse_freetags.php?tag={$smarty.capture.tagurl|escape:'url'}{if !empty($module_params.where)}&type={$module_params.where|escape:'url'}{/if}{if !empty($module_params.objectId)}&objectId={$module_params.objectId|escape:'url'}{/if}">{$tag.tag|escape}</a>
{if ($type ne 'cloud')}</li>{/if}
=====================================
templates/modules/mod-freetags_prefered.tpl
=====================================
@@ -1,7 +1,7 @@
{if isset($preferred_tags)}
{tikimodule error=$module_params.error title=$tpl_module_title name="freetags_prefered" flip=$module_params.flip decorations=$module_params.decorations nobox=$module_params.nobox notitle=$module_params.notitle}
{foreach from=$most_popular_tags item=tag}
- {capture name=tagurl}{if (str_contains($tag.tag, ' '))}"{$tag.tag}"{else}{$tag.tag}{/if}{/capture}
+ {capture name=tagurl}{if (strstr($tag.tag, ' '))}"{$tag.tag}"{else}{$tag.tag}{/if}{/capture}
<a class="freetag_{$tag.size}" href="tiki-browse_freetags.php?tag={$smarty.capture.tagurl|escape:'url'}">{$tag.tag|escape}</a>
{/foreach}
{/tikimodule}
=====================================
templates/tiki-browse_freetags.tpl
=====================================
@@ -94,7 +94,7 @@
<div class="card mb-4">
<div class="card-body freetaglist mb-4">
{foreach from=$most_popular_tags item=popular_tag}
- {capture name=tagurl}{if (str_contains($popular_tag.tag, ' '))}"{$popular_tag.tag}"{else}{$popular_tag.tag}{/if}{/capture}
+ {capture name=tagurl}{if (strstr($popular_tag.tag, ' '))}"{$popular_tag.tag}"{else}{$popular_tag.tag}{/if}{/capture}
<a class="freetag_{$popular_tag.size}{if $tag eq $popular_tag.tag|escape} selectedtag{/if}"
href="tiki-browse_freetags.php?tag={$smarty.capture.tagurl|escape:'url'}{if $broaden eq 'y'}&broaden=y{/if}"
onclick="javascript:addTag('{$popular_tag.tag|escape:'javascript'|escape:'htmlall'}');return false;"
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/5f81190d2fe3e540498d043bff5bb106acc125f9
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/5f81190d2fe3e540498d043bff5bb106acc125f9
You're receiving this email because of your account on gitlab.com.
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs