From: <nk...@us...> - 2013-08-06 14:25:20
|
Revision: 46996 http://sourceforge.net/p/tikiwiki/code/46996 Author: nkoth Date: 2013-08-06 14:25:16 +0000 (Tue, 06 Aug 2013) Log Message: ----------- [FIX] In Tiki 12, it seems plugin vars come pre exploded, which cause problem if set to zero, because then it is not empty as it is an array with element value 0. Modified Paths: -------------- trunk/lib/smarty_tiki/function.user_selector.php Modified: trunk/lib/smarty_tiki/function.user_selector.php =================================================================== --- trunk/lib/smarty_tiki/function.user_selector.php 2013-08-06 12:58:35 UTC (rev 46995) +++ trunk/lib/smarty_tiki/function.user_selector.php 2013-08-06 14:25:16 UTC (rev 46996) @@ -59,8 +59,19 @@ } $groupNames = array(); - if (!empty($params['groupIds'])) { + if (is_array($params['groupIds'])) { + foreach ($params['groupIds'] as $k => $groupId) { + if ($groupId <= 0) { + unset($params['groupIds'][$k]); + } + } + if (!empty($params['groupIds'])) { + $groupIds = $params['groupIds']; + } + } elseif (!empty($params['groupIds'])) { $groupIds = explode('|', $params['groupIds']); + } + if (!empty($groupIds)) { foreach ($groupIds as $groupId) { $group_info = $userlib->get_groupId_info($groupId); $groupNames[] = $group_info['groupName']; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |