annotate root/install/install_MultiRaceRankThemesPermissions.php @ 20:51084c02e981

* Fix bad logic (<= instead of <) * Fix setup during install (don't define a path if you don't have a language file - it may not be documented, but the path loads a language file, which fails if it doesn't exist) * Update to latest version of XSL/XSD files no-open-ticket
author IBBoard <dev@ibboard.co.uk>
date Thu, 11 Feb 2010 20:44:18 +0000
parents a523f78c467a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 <?php
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
2
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
3 /**
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
4 *
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
5 * install script to set up permission options in the db for the Multi-Race Rank Themes mod
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
6 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
7 *
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
8 */
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
9
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
10 /**
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
11 * @ignore
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
12 */
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
13
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
14 // initialize the page
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
15 define('IN_PHPBB', true);
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
16 define('IN_INSTALL', true);
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
17 $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
18 $phpEx = substr(strrchr(__FILE__, '.'), 1);
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
19 include($phpbb_root_path . 'common.' . $phpEx);
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
20
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
21
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
22 // Start session management
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
23 $user->session_begin();
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
24 $auth->acl($user->data);
20
51084c02e981 * Fix bad logic (<= instead of <)
IBBoard <dev@ibboard.co.uk>
parents: 10
diff changeset
25 $user->setup();
10
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
26
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
27
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
28 // Setup $auth_admin class so we can add tabulated survey permission options
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
29 include($phpbb_root_path . 'includes/acp/auth.' . $phpEx);
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
30 $auth_admin = new auth_admin();
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
31
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
32 // Add foo permissions as local permissions
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
33 // (you could instead make them global permissions by making the obvious changes below)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
34 $auth_admin->acl_add_option(array(
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
35 'global' => array('u_change_rank_theme')
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
36 ));
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
37
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
38
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
39 $message = $user->lang['MULTI_RACE_ADDED_PERMISSIONS'] . '<br /><br />';
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
40 $message .= $user->lang['REMOVE_INSTALL'];
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
41 trigger_error($message);
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
42
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
43 ?>