This commit is contained in:
2024-04-27 09:23:34 +02:00
commit 11e713ca6f
11884 changed files with 3263371 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<?php
/**
* Smarty plugin
* @package Smarty
* @subpackage plugins
*/
/**
* Smarty in_array modifier plugin
*
* Type: modifier<br>
* Name: in_array<br>
* Purpose: check if value is in array
* @author Collin Lee <clee at sugarcrm com>
* @param mixed
* @param mixed
* @return boolean
*/
function smarty_modifier_in_array($needle = null, $haystack = null)
{
//Smarty barfs if Array is empty
if($haystack == null || empty($haystack)) {
return false;
}
return in_array($needle, $haystack);
}
?>