mirror of
https://github.com/friendica/friendica
synced 2024-11-12 22:22:54 +00:00
Restore is_string() as a Smarty modifier
- Address https://github.com/friendica/friendica/issues/13157#issuecomment-1567336694
This commit is contained in:
parent
70674f2ecc
commit
33da0c196a
3 changed files with 6 additions and 2 deletions
|
@ -53,6 +53,10 @@ class FriendicaSmarty extends Smarty
|
||||||
$this->setConfigDir($work_dir . '/');
|
$this->setConfigDir($work_dir . '/');
|
||||||
$this->setCacheDir($work_dir . '/');
|
$this->setCacheDir($work_dir . '/');
|
||||||
|
|
||||||
|
$this->registerPlugin('modifier', 'is_string', function ($value) {
|
||||||
|
return is_string($value);
|
||||||
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Enable sub-directory splitting for reducing directory descriptor
|
* Enable sub-directory splitting for reducing directory descriptor
|
||||||
* size. The default behavior is to put all compiled/cached files into
|
* size. The default behavior is to put all compiled/cached files into
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
{{$html nofilter}}
|
{{$html nofilter}}
|
||||||
{{if $submit}}
|
{{if $submit}}
|
||||||
<div class="settings-submit-wrapper panel-footer">
|
<div class="settings-submit-wrapper panel-footer">
|
||||||
{{if $submit}}
|
{{if $submit|is_string}}
|
||||||
<button type="submit" name="{{$addon}}-submit" class="btn btn-primary settings-submit" value="{{$submit}}">{{$submit}}</button>
|
<button type="submit" name="{{$addon}}-submit" class="btn btn-primary settings-submit" value="{{$submit}}">{{$submit}}</button>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{$count = 1}}
|
{{$count = 1}}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-footer">
|
<div class="panel-footer">
|
||||||
{{if $submit}}
|
{{if $submit}}
|
||||||
{{if $submit}}
|
{{if $submit|is_string}}
|
||||||
<button type="submit" name="{{$addon}}-submit" class="btn btn-primary settings-submit" value="{{$submit}}">{{$submit}}</button>
|
<button type="submit" name="{{$addon}}-submit" class="btn btn-primary settings-submit" value="{{$submit}}">{{$submit}}</button>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{$count = 1}}
|
{{$count = 1}}
|
||||||
|
|
Loading…
Reference in a new issue