first commit
This commit is contained in:
17
class/smarty_plugins/modifier.selected.php
Normal file
17
class/smarty_plugins/modifier.selected.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Smarty plugin.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Smarty {translate} function plugin.
|
||||
*/
|
||||
function smarty_modifier_selected($string, $value = null)
|
||||
{
|
||||
if (is_array($value)) {
|
||||
return array_search($string, $value) !== false ? " selected='selected' " : '';
|
||||
}
|
||||
|
||||
return ($string == $value) ? " selected='selected' " : '';
|
||||
}
|
||||
Reference in New Issue
Block a user