Revision 670
Added by thorn almost 17 years ago
search_modext.php | ||
---|---|---|
84 | 84 |
return $any_matched; |
85 | 85 |
} |
86 | 86 |
|
87 |
// work-out if user is in $viewing_groups or $viewing_users |
|
88 |
function is_access_denied($visibility, $viewing_groups_str, $viewing_users_str) { |
|
89 |
global $wb; |
|
90 |
$access_denied = false; |
|
91 |
if($visibility == 'private' || $visibility == 'registered') { |
|
92 |
$access_denied = true; |
|
93 |
if($wb->is_authenticated() == true) { |
|
94 |
$viewing_groups = explode(',', $viewing_groups_str); |
|
95 |
$viewing_users = explode(',', $viewing_users_str); |
|
96 |
if(in_array($wb->get_group_id(), $viewing_groups) || (in_array($wb->get_user_id(), $viewing_users))) { |
|
97 |
$access_denied = false; |
|
98 |
} |
|
99 |
} |
|
100 |
} |
|
101 |
return $access_denied; |
|
102 |
} |
|
103 |
|
|
104 | 87 |
// collects the matches from text in excerpt_array |
105 | 88 |
function get_excerpts($text, $search_words, $max_excerpt_num) { |
106 | 89 |
$match_array = array(); |
Also available in: Unified diff
Removed unused function is_access_denied() from search