diff options
author | Marc Alexander <admin@m-a-styles.de> | 2013-03-26 13:18:54 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2013-03-26 13:18:54 +0100 |
commit | 34cdbd0360e756a5ef9646554905697f7ae1ba1f (patch) | |
tree | 58486124738299ef5e8fca3761d4d82189cf41a6 /tests/mock/notifications_auth.php | |
parent | f0b0978538a1b1e25b688cce1794c764f2d363f0 (diff) | |
parent | 8b464e87f0a41422dddaa647ac42ab9c7950bb4b (diff) | |
download | forums-34cdbd0360e756a5ef9646554905697f7ae1ba1f.tar forums-34cdbd0360e756a5ef9646554905697f7ae1ba1f.tar.gz forums-34cdbd0360e756a5ef9646554905697f7ae1ba1f.tar.bz2 forums-34cdbd0360e756a5ef9646554905697f7ae1ba1f.tar.xz forums-34cdbd0360e756a5ef9646554905697f7ae1ba1f.zip |
Merge branch 'develop' of https://github.com/phpbb/phpbb3 into ticket/11314
Conflicts:
phpBB/styles/prosilver/template/timezone.js
Diffstat (limited to 'tests/mock/notifications_auth.php')
-rw-r--r-- | tests/mock/notifications_auth.php | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/mock/notifications_auth.php b/tests/mock/notifications_auth.php new file mode 100644 index 0000000000..d960acb81a --- /dev/null +++ b/tests/mock/notifications_auth.php @@ -0,0 +1,40 @@ +<?php +/** +* +* @package testing +* @copyright (c) 2012 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +class phpbb_mock_notifications_auth extends phpbb_auth +{ + function acl_get_list($user_id = false, $opts = false, $forum_id = false) + { + $user_id = (!is_array($user_id)) ? array($user_id) : $user_id; + $opts = (!is_array($opts)) ? array($opts) : $opts; + $forum_id = (!is_array($forum_id)) ? array($forum_id) : $forum_id; + + $auth_list = array(); + + foreach ($forum_id as $fid) + { + foreach ($opts as $opt) + { + $auth_list[$fid][$opt] = array(); + + foreach ($user_id as $uid) + { + $auth_list[$fid][$opt][] = $uid; + } + } + } + + return $auth_list; + } + + function acl_get($opt, $f = 0) + { + return true; + } +} |