Blame view

plugins/modifier.brends.php 260 Bytes
8d65d0ce   andryeyev   init
1
2
3
4
5
6
7
8
9
10
11
12
  <?php
  function smarty_modifier_brends($brend,$str){
  	$r = (strlen($str)>0) ? explode(',',$str) : array();
  	$arr = array();$f=0;
  	foreach($r as $key=>$s){
  		if($s==$brend){$f++;unset($r[$key]);}
  	}
  	if($f==0)$r[] = $brend;
  	
          return implode(',',$r);
  }
  ?>