From 0e9f0ac4ecc636336603cc6932ce21a550c7087e Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Sun, 20 Oct 2002 19:19:07 +0000 Subject: Mostly changes to turn userdata into user->data, lang into user->lang + bitstring 2nd format + inheritance for permission admin and various other updates/fixes/changes ... note that user->lang & user->theme isn't final git-svn-id: file:///svn/phpbb/trunk@2958 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/admin/admin_ban.php | 21 +++- phpBB/admin/admin_board.php | 188 +++++++++++++++--------------- phpBB/admin/admin_database.php | 62 +++++----- phpBB/admin/admin_disallow.php | 26 ++--- phpBB/admin/admin_email.php | 20 ++-- phpBB/admin/admin_forums.php | 128 ++++++++++---------- phpBB/admin/admin_groups.php | 72 ++++++------ phpBB/admin/admin_permissions.php | 238 +++++++++++++++++++++++++------------- phpBB/admin/admin_prune.php | 40 +++---- phpBB/admin/admin_prune_users.php | 42 +++---- phpBB/admin/admin_ranks.php | 58 +++++----- phpBB/admin/admin_search.php | 22 ++-- phpBB/admin/admin_smilies.php | 108 ++++++++--------- phpBB/admin/admin_styles.php | 119 ++++++++++--------- phpBB/admin/admin_users.php | 198 +++++++++++++++---------------- phpBB/admin/admin_viewlogs.php | 34 +++--- phpBB/admin/admin_words.php | 42 +++---- phpBB/admin/index.php | 102 ++++++++-------- phpBB/admin/pagestart.php | 34 +++--- 19 files changed, 825 insertions(+), 729 deletions(-) (limited to 'phpBB/admin') diff --git a/phpBB/admin/admin_ban.php b/phpBB/admin/admin_ban.php index b03880c1ce..40232d7098 100644 --- a/phpBB/admin/admin_ban.php +++ b/phpBB/admin/admin_ban.php @@ -528,8 +528,27 @@ switch ( $mode ) + :
- + + + + diff --git a/phpBB/admin/admin_board.php b/phpBB/admin/admin_board.php index c326b41323..6f26eb934b 100644 --- a/phpBB/admin/admin_board.php +++ b/phpBB/admin/admin_board.php @@ -46,7 +46,7 @@ require('pagestart.' . $phpEx); // Are we authed? if ( !$auth->acl_get('a_general') ) { - message_die(MESSAGE, $lang['No_admin']); + message_die(MESSAGE, $user->lang['No_admin']); } // Get mod @@ -84,7 +84,7 @@ while ( $row = $db->sql_fetchrow($result) ) if ( isset($_POST['submit']) ) { add_admin_log('log_' . $mode . '_config'); - message_die(MESSAGE, $lang['Config_updated']); + message_die(MESSAGE, $user->lang['Config_updated']); } // @@ -120,17 +120,17 @@ switch ( $mode ) return; } -page_header($lang[$l_title]); +page_header($user->lang[$l_title]); ?> -

+

lang[$l_title]; ?>

-

+

lang[$l_title . '_explain']; ?>

" method="post"> - + - + - + - + - - + + - - + + - - + + - - + + - + - + - + - + - + - - + + - + - + - + - - - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - + - + - - + + - - + + - - + + - - + + - + - + - - + + - + - + - + - + - - - + - + - + - + - - + + - - + + - + - + - - + + - + - + - + - + - + - + - - + + - + - + - + - - + + - + - + - + - +
lang[$l_title]; ?>
: lang['Cookie_domain']; ?>:
: lang['Cookie_name']; ?>:
: lang['Cookie_path']; ?>:
:
/>    />lang['Cookie_secure']; ?>:
lang['Cookie_secure_explain']; ?>
/>lang['Disabled']; ?>    />lang['Enabled']; ?>
: />    /> lang['Allow_local']; ?>: /> lang['Yes']; ?>   /> lang['No']; ?>
:
/>    /> lang['Allow_remote']; ?>:
lang['Allow_remote_explain']; ?>
/> lang['Yes']; ?>   /> lang['No']; ?>
: />    /> lang['Allow_upload']; ?>: /> lang['Yes']; ?>   /> lang['No']; ?>
:
lang['Max_filesize']; ?>:
lang['Max_filesize_explain']; ?>
Bytes
:
lang['Max_avatar_size']; ?>:
lang['Max_avatar_size_explain']; ?>
x
:
lang['Avatar_storage_path']; ?>:
lang['Avatar_storage_path_explain']; ?>
:
lang['Avatar_gallery_path']; ?>:
lang['Avatar_gallery_path_explain']; ?>
lang['Default_style']; ?>
:
/>    /> lang['Override_style']; ?>:
lang['Override_style_explain']; ?>
/> lang['Yes']; ?>   /> lang['No']; ?>
: lang['Default_language']; ?>:
:
lang['Date_format']; ?>:
lang['Date_format_explain']; ?>
: lang['System_timezone']; ?>:

: +
lang['Char_limit']; ?>:
lang['Char_limit_explain']; ?>
:
+
lang['Smilies_limit']; ?>:
lang['Smilies_limit_explain']; ?>
: />    /> lang['Allow_topic_notify']; ?>: /> lang['Yes']; ?>   /> lang['No']; ?>
: />    /> lang['Allow_forum_notify']; ?>: /> lang['Yes']; ?>   /> lang['No']; ?>
: />    /> lang['Allow_name_change']; ?>: /> lang['Yes']; ?>   /> lang['No']; ?>
: />    /> lang['Allow_HTML']; ?>: /> lang['Yes']; ?>   /> lang['No']; ?>
:
lang['Allowed_tags']; ?>:
lang['Allowed_tags_explain']; ?>
: />    /> lang['Allow_BBCode']; ?>: /> lang['Yes']; ?>   /> lang['No']; ?>
: />    /> lang['Allow_smilies']; ?>: /> lang['Yes']; ?>   /> lang['No']; ?>
: />    /> lang['Allow_sig']; ?>: /> lang['Yes']; ?>   /> lang['No']; ?>
:
lang['Max_sig_length']; ?>:
lang['Max_sig_length_explain']; ?>
: lang['Site_name']; ?>:
: lang['Site_desc']; ?>:
:
/>    />
lang['Board_disable']; ?>:
lang['Board_disable_explain']; ?>
/> lang['Yes']; ?>   /> lang['No']; ?>
: />    /> lang['Enable_prune']; ?>: /> lang['Yes']; ?>   /> lang['No']; ?>
:
/>    />    />    />lang['Acct_activation']; ?>:
lang['Acct_activation_explain']; ?>
/>lang['Acc_None']; ?>    />lang['Acc_User']; ?>    />lang['Acc_Admin']; ?>    />lang['Acc_Disable']; ?>
:
/>    /> lang['Enable_COPPA']; ?>:
lang['Enable_COPPA_explain']; ?>
/> lang['Yes']; ?>   /> lang['No']; ?>
: lang['COPPA_fax']; ?>:
:
lang['COPPA_mail']; ?>:
lang['COPPA_mail_explain']; ?>
: />    />lang['Private_Messaging']; ?>: />lang['Enabled']; ?>    />lang['Disabled']; ?>
:
lang['Boxes_max']; ?>:
lang['Boxes_max_explain']; ?>
:
lang['Boxes_limit']; ?>:
lang['Boxes_limit_explain']; ?>
:
lang['Flood_Interval']; ?>:
lang['Flood_Interval_explain']; ?>
:
lang['Search_Interval']; ?>:
lang['Search_Interval_explain']; ?>
:
+
lang['Min_search_chars']; ?>:
lang['Min_search_chars_explain']; ?>
:
+
lang['Max_search_chars']; ?>:
lang['Max_search_chars_explain']; ?>
: lang['Topics_per_page']; ?>:
: lang['Posts_per_page']; ?>:
: lang['Hot_threshold']; ?>:
: lang['Max_poll_options']; ?>:
:
/>    /> lang['Enable_email']; ?>:
lang['Enable_email_explain']; ?>
/> lang['Enabled']; ?>   /> lang['Disabled']; ?>
:
/>    /> lang['Board_email_form']; ?>:
lang['Board_email_form_explain']; ?>
/> lang['Enabled']; ?>   /> lang['Disabled']; ?>
: lang['Admin_email']; ?>:
:
lang['Email_sig']; ?>:
lang['Email_sig_explain']; ?>
:
/>    /> lang['Use_SMTP']; ?>:
lang['Use_SMTP_explain']; ?>
/> lang['Yes']; ?>   /> lang['No']; ?>
: lang['SMTP_server']; ?>:
:
lang['SMTP_username']; ?>:
lang['SMTP_username_explain']; ?>
:
lang['SMTP_password']; ?>:
lang['SMTP_password_explain']; ?>
:
lang['Server_name']; ?>:
lang['Server_name_explain']; ?>
:
lang['Server_port']; ?>:
lang['Server_port_explain']; ?>
:
lang['Script_path']; ?>:
lang['Script_path_explain']; ?>
:
/>    />    />    />   lang['IP_valid']; ?>:
lang['IP_valid_explain']; ?>
/> lang['All']; ?>   /> lang['Class_C']; ?>   /> lang['Class_B']; ?>   /> lang['None']; ?>  
:
lang['Limit_load']; ?>:
lang['Limit_load_explain']; ?>
: lang['Session_length']; ?>:
:
lang['Limit_sessions']; ?>:
lang['Limit_sessions_explain']; ?>
: />    /> lang['Enable_gzip']; ?>: /> lang['Yes']; ?>   /> lang['No']; ?>
:
lang['Smilies_path']; ?>:
lang['Smilies_path_explain']; ?>
:
lang['Icons_path']; ?>:
lang['Icons_path_explain']; ?>
:lang['Auth_method']; ?>:
    
diff --git a/phpBB/admin/admin_database.php b/phpBB/admin/admin_database.php index 41c7962062..162a7ae653 100644 --- a/phpBB/admin/admin_database.php +++ b/phpBB/admin/admin_database.php @@ -52,7 +52,7 @@ include($phpbb_root_path . 'includes/functions_admin.'.$phpEx); // if ( !$auth->acl_get('a_general') ) { - message_die(MESSAGE, $lang['No_admin']); + message_die(MESSAGE, $user->lang['No_admin']); } // @@ -85,7 +85,7 @@ switch( $mode ) break; } - message_die(MESSAGE, $lang['Backups_not_supported']); + message_die(MESSAGE, $user->lang['Backups_not_supported']); break; } @@ -97,32 +97,32 @@ switch( $mode ) if ( !isset($_POST['backupstart']) && !isset($_GET['backupstart']) ) { - page_header($lang['DB_Backup']); + page_header($user->lang['DB_Backup']); ?> -

+

lang['DB_Backup']; ?>

-

+

lang['Backup_explain']; ?>

"> - + - - + + - - + + - + - + - - + - +
lang['Backup_options']; ?>
:       lang['Backup_type']; ?>: lang['Full_backup']; ?>   lang['Structure_only']; ?>   lang['Data_only']; ?>
:
   lang['Include_search_index']; ?>:
lang['Include_search_index_explain']; ?>
lang['No']; ?>   lang['Yes']; ?>
:
lang['Additional_tables']; ?>:
lang['Additional_tables_explain']; ?>
:
lang['Store_local']; ?>:
lang['Store_local_explain']; ?>
: lang['Compress_file']; ?>: lang['None']; ?>
@@ -170,10 +170,10 @@ switch( $mode ) { $meta = ""; - $message = ( empty($store_path) ) ? $lang['Backup_download'] : $lang['Backup_writing']; + $message = ( empty($store_path) ) ? $user->lang['Backup_download'] : $user->lang['Backup_writing']; - page_header($lang['DB_Backup'], $meta); - page_message($lang['DB_Backup'], $message); + page_header($user->lang['DB_Backup'], $meta); + page_message($user->lang['DB_Backup'], $message); page_footer(); } @@ -301,7 +301,7 @@ switch( $mode ) fclose($fp); unset($contents); - message_die(MESSAGE, $lang['Backup_success']); + message_die(MESSAGE, $user->lang['Backup_success']); } exit; @@ -328,19 +328,19 @@ switch( $mode ) if ( $file_tmpname == '' || $filename == '' || !file_exists($file_tmpname) ) { - message_die(MESSAGE, $lang['Restore_Error_no_file']); + message_die(MESSAGE, $user->lang['Restore_Error_no_file']); } $ext = substr($filename, strrpos($filename, '.') + 1); if ( !preg_match('/^(sql|gz|bz2)$/', $ext) ) { - message_die(MESSAGE, $lang['Restore_Error_filename']); + message_die(MESSAGE, $user->lang['Restore_Error_filename']); } if ( ( !extension_loaded('zlib') && $ext == 'gz' ) || ( !extension_loaded('zip') && $ext == 'zip' ) || ( $ext == 'bz2' && !extension_loaded('bz2') ) ) { - message_die(MESSAGE, $lang['Compress_unsupported']); + message_die(MESSAGE, $user->lang['Compress_unsupported']); } $sql_query = ''; @@ -383,27 +383,27 @@ switch( $mode ) add_admin_log('log_db_restore'); - message_die(MESSAGE, $lang['Restore_success']); + message_die(MESSAGE, $user->lang['Restore_success']); } // // Restore page // - page_header($lang['DB_Restore']); + page_header($user->lang['DB_Restore']); ?> -

+

lang['DB_Restore']; ?>

-

+

lang['Restore_explain']; ?>

"> - + - - + - +
lang['Select_file']; ?>
:
lang['Upload_file']; ?>:
lang['Supported_extensions']; $types = ': sql'; if ( extension_loaded('zlib') ) @@ -421,11 +421,11 @@ switch( $mode )
:
lang['Local_backup_file']; ?>:
lang['Local_backup_file_explain']; ?>
diff --git a/phpBB/admin/admin_disallow.php b/phpBB/admin/admin_disallow.php index dba6f28455..4bd6a88170 100644 --- a/phpBB/admin/admin_disallow.php +++ b/phpBB/admin/admin_disallow.php @@ -59,7 +59,7 @@ if( isset($_POST['add_name']) ) if ( !validate_username($disallowed_user) ) { - $message = $lang['Disallowed_already']; + $message = $user->lang['Disallowed_already']; } else { @@ -67,10 +67,10 @@ if( isset($_POST['add_name']) ) VALUES('" . str_replace("\'", "''", $disallowed_user) . "')"; $result = $db->sql_query( $sql ); - $message = $lang['Disallow_successful']; + $message = $user->lang['Disallow_successful']; } - $message .= '

' . sprintf($lang['Click_return_disallowadmin'], '', '') . '

' . sprintf($lang['Click_return_admin_index'], '', ''); + $message .= '

' . sprintf($user->lang['Click_return_disallowadmin'], '', '') . '

' . sprintf($user->lang['Click_return_admin_index'], '', ''); add_admin_log('log_disallow_add', str_replace('%', '*', $disallowed_user)); @@ -84,7 +84,7 @@ else if( isset($_POST['delete_name']) ) WHERE disallow_id = $disallowed_id"; $db->sql_query($sql); - $message .= $lang['Disallowed_deleted'] . '

' . sprintf($lang['Click_return_disallowadmin'], '', '') . '

' . sprintf($lang['Click_return_admin_index'], '', ''); + $message .= $user->lang['Disallowed_deleted'] . '

' . sprintf($user->lang['Click_return_disallowadmin'], '', '') . '

' . sprintf($user->lang['Click_return_admin_index'], '', ''); add_admin_log('log_disallow_delete'); @@ -112,28 +112,28 @@ if ( $row = $db->sql_fetchrow($result) ) // // Output page // -page_header($lang['Users']); +page_header($user->lang['Users']); ?> -

+

lang['Disallow_control']; ?>

-

+

lang['Disallow_explain']; ?>

"> - + - - + + - + - - + +
lang['Add_disallow_title']; ?>

 lang['Username']; ?>
lang['Add_disallow_explain']; ?>
 
lang['Delete_disallow_title']; ?>

 lang['Username']; ?>
lang['Delete_disallow_explain']; ?>
 lang['No_disallowed']; } ?>
diff --git a/phpBB/admin/admin_email.php b/phpBB/admin/admin_email.php index 775e013ae0..e8790017c5 100644 --- a/phpBB/admin/admin_email.php +++ b/phpBB/admin/admin_email.php @@ -132,7 +132,7 @@ if ( isset($_POST['submit']) ) $emailer->send(); $emailer->reset(); - message_die(MESSAGE, $lang['Email_sent']); + message_die(MESSAGE, $user->lang['Email_sent']); } } @@ -144,7 +144,7 @@ $sql = "SELECT group_id, group_name FROM ".GROUPS_TABLE; $result = $db->sql_query($sql); -$select_list = ''; if ( $row = $db->sql_fetchrow($result) ) { do @@ -155,32 +155,32 @@ if ( $row = $db->sql_fetchrow($result) ) } $select_list .= ''; -page_header($lang['Mass_Email']); +page_header($user->lang['Mass_Email']); ?> -

+

lang['Mass_Email']; ?>

-

+

lang['Mass_email_explain']; ?>

"> - + - + - + - - +
lang['Compose']; ?>
lang['Recipients']; ?>
lang['Subject']; ?>
+ lang['Message']; ?>
diff --git a/phpBB/admin/admin_forums.php b/phpBB/admin/admin_forums.php index 956bc010b6..915a63a56f 100644 --- a/phpBB/admin/admin_forums.php +++ b/phpBB/admin/admin_forums.php @@ -45,7 +45,7 @@ include($phpbb_root_path . 'includes/functions_admin.'.$phpEx); // if (!$auth->acl_get('a_forum')) { - message_die(MESSAGE, $lang['No_admin']); + message_die(MESSAGE, $user->lang['No_admin']); } // @@ -202,7 +202,7 @@ switch ($mode) VALUES ($forum_id, '$forum_name', '$forum_desc', $parent_id, $left_id, $right_id, $forum_status, $forum_style, $post_count_inc, $prune_enable, $prune_days, $prune_freq)"; $db->sql_query($sql); - $message = $lang['Forums_updated'] . "

" . sprintf($lang['Click_return_forumadmin'], '', '') . '

' . sprintf($lang['Click_return_admin_index'], '', ''); + $message = $user->lang['Forums_updated'] . "

" . sprintf($user->lang['Click_return_forumadmin'], '', '') . '

' . sprintf($user->lang['Click_return_admin_index'], '', ''); message_die(MESSAGE, $message); break; @@ -252,7 +252,7 @@ switch ($mode) $db->sql_query_array('UPDATE ' . FORUMS_TABLE . " SET WHERE forum_id = $forum_id", $sql); - $message = $lang['Forums_updated'] . "

" . sprintf($lang['Click_return_forumadmin'], '', '') . '

' . sprintf($lang['Click_return_admin_index'], '', ''); + $message = $user->lang['Forums_updated'] . "

" . sprintf($user->lang['Click_return_forumadmin'], '', '') . '

' . sprintf($user->lang['Click_return_admin_index'], '', ''); message_die(MESSAGE, $message); break; @@ -280,7 +280,7 @@ switch ($mode) { if (empty($_POST['posts_to_id'])) { - $message = $lang['No_destination_forum'] . '

' . sprintf($lang['Click_return_forumadmin'], '', ''); + $message = $user->lang['No_destination_forum'] . '

' . sprintf($user->lang['Click_return_forumadmin'], '', ''); message_die(ERROR, $message); } @@ -305,7 +305,7 @@ switch ($mode) { if (empty($_POST['subforums_to_id'])) { - $message = $lang['No_destination_forum'] . '

' . sprintf($lang['Click_return_forumadmin'], '', ''); + $message = $user->lang['No_destination_forum'] . '

' . sprintf($user->lang['Click_return_forumadmin'], '', ''); message_die(ERROR, $message); } @@ -340,7 +340,7 @@ switch ($mode) $db->sql_query($sql); $return_id = (!empty($_POST['subforums_to_id'])) ? $_POST['subforums_to_id'] : $parent_id; - $message = $lang['Forum_deleted'] . '

' . sprintf($lang['Click_return_forumadmin'], '', ''); + $message = $user->lang['Forum_deleted'] . '

' . sprintf($user->lang['Click_return_forumadmin'], '', ''); message_die(MESSAGE, $message); break; @@ -371,9 +371,9 @@ switch ($mode) $parents_list = make_forums_list('all', $parent_id, $subforums_id); - $l_title = ($forum_status != ITEM_CATEGORY) ? $lang['Edit_forum'] : $lang['Edit_category']; + $l_title = ($forum_status != ITEM_CATEGORY) ? $user->lang['Edit_forum'] : $user->lang['Edit_category']; $newmode = 'modify'; - $buttonvalue = $lang['Update']; + $buttonvalue = $user->lang['Update']; $prune_enabled = ($prune_enable) ? 'checked="checked" ' : ''; if ($forum_status != ITEM_CATEGORY) @@ -390,9 +390,9 @@ switch ($mode) } $parents_list = make_forums_list('all', $parent_id); - $l_title = $lang['Create_forum']; + $l_title = $user->lang['Create_forum']; $newmode = 'create'; - $buttonvalue = $lang['Create_forum']; + $buttonvalue = $user->lang['Create_forum']; $forum_desc = ''; $forum_style = ''; @@ -414,27 +414,27 @@ switch ($mode) $forum_checked = ($forum_status != ITEM_CATEGORY) ? 'checked="checked" ' : ''; $category_checked = ($forum_status == ITEM_CATEGORY) ? 'checked="checked" ' : ''; - $statuslist = '\n"; - $statuslist .= '\n"; + $statuslist = '\n"; + $statuslist .= '\n"; page_header($l_title); ?>

-

+

lang['Forum_edit_delete_explain'] ?>

" method="post"> - + - + - + - - + + - + - - + + - + - + - + - - + - + @@ -542,7 +542,7 @@ switch ($mode) break; case 'delete': - page_header($lang['Forum_delete']); + page_header($user->lang['Forum_delete']); extract(get_forum_info($_GET['f'])); $subforums_id = array(); @@ -556,17 +556,17 @@ switch ($mode) $move_posts_list = make_forums_list('forums', $parent_id, $subforums_id); ?> -

+

lang['Forum_delete'] ?>

-

+

lang['Forum_delete_explain'] ?>

lang['General_settings'] ?>
lang['Forum_name'] : $user->lang['Category_name'] ?>
lang['Forum_desc'] ?>
/>   />lang['Forum_type'] ?>/>lang['Forum'] ?>   />lang['Category'] ?>
lang['Parent'] ?>
lang['Style'] ?>
lang['Forum_settings'] ?>
lang['Forum_status'] ?>
lang['Options'] ?> - /> + />lang['Disable_post_count'] ?> 0) { @@ -488,7 +488,7 @@ switch ($mode) { ?>
- /> + />lang['Display_on_index'] ?>

-      
-       +
lang['Forum_type'] ?>lang['Set_as_category'] ?>
+      lang['Delete_all_posts'] ?>
+      lang['Move_posts_to'] ?>
lang['Forum_pruning'] ?> - + - - + + - - + +
lang['Enabled'] ?> />
  lang['prune_days'] ?>  lang['Days'] ?>
  lang['prune_freq'] ?>  lang['Days'] ?>
- + - + - - + + - + - - + + - + - +
lang['Forum_delete'] ?>
lang['Category_name'] : $user->lang['Forum_name'] ?>
lang['Action'] ?> lang['Delete_all_posts'] ?>
lang['Move_posts_to'] ?>
lang['Action'] ?> lang['Delete_subforums'] ?>
lang['Move_subforums_to'] ?>
@@ -615,7 +615,7 @@ if (empty($show_index)) page_footer(); } -page_header($lang['Manage']); +page_header($user->lang['Manage']); $parent_id = (!empty($_GET['parent_id'])) ? $_GET['parent_id'] : 0; @@ -648,7 +648,7 @@ else
"> - + sql_fetchrow($result)) ?> - - - + + + @@ -732,17 +732,17 @@ while ($row = $db->sql_fetchrow($result)) - - - - + + + + - + sql_fetchrow($result)) - - - - + + + + sql_fetchrow($result)) ?> - +
lang['Forum_admin'] ?>
lang['Edit'] ?>lang['Delete'] ?>lang['Move_up'] ?> lang['Move_down'] ?>  
>

lang['Edit'] ?>lang['Delete'] ?>lang['Move_up'] ?>
lang['Move_down'] ?>
lang['Resync'] : ' ' ?>
>

lang['Edit'] ?>lang['Delete'] ?>lang['Move_up'] ?>
lang['Move_down'] ?>
lang['Resync'] ?>
diff --git a/phpBB/admin/admin_groups.php b/phpBB/admin/admin_groups.php index 048673d344..893672498b 100644 --- a/phpBB/admin/admin_groups.php +++ b/phpBB/admin/admin_groups.php @@ -47,7 +47,7 @@ require('pagestart.' . $phpEx); // if ( !$auth->acl_get('a_group') ) { - message_die(MESSAGE, $lang['No_admin']); + message_die(MESSAGE, $user->lang['No_admin']); } if( isset($_POST[POST_GROUPS_URL]) || isset($_GET[POST_GROUPS_URL]) ) @@ -96,7 +96,7 @@ if( isset($_POST['edit']) || isset($_POST['new']) ) if( !$db->sql_numrows($result) ) { - message_die(GENERAL_MESSAGE, $lang['Group_not_exist']); + message_die(GENERAL_MESSAGE, $user->lang['Group_not_exist']); } $group_info = $db->sql_fetchrow($result); @@ -151,23 +151,23 @@ if( isset($_POST['edit']) || isset($_POST['new']) ) "GROUP_DESCRIPTION" => $group_info['group_description'], "GROUP_MODERATOR" => $group_moderator, - "L_GROUP_TITLE" => $lang['Group_administration'], - "L_GROUP_EDIT_DELETE" => ( isset($_POST['new']) ) ? $lang['New_group'] : $lang['Edit_group'], - "L_GROUP_NAME" => $lang['group_name'], - "L_GROUP_DESCRIPTION" => $lang['group_description'], - "L_GROUP_MODERATOR" => $lang['group_moderator'], - "L_FIND_USERNAME" => $lang['Find_username'], - "L_GROUP_STATUS" => $lang['group_status'], - "L_GROUP_OPEN" => $lang['group_open'], - "L_GROUP_CLOSED" => $lang['group_closed'], - "L_GROUP_HIDDEN" => $lang['group_hidden'], - "L_GROUP_DELETE" => $lang['group_delete'], - "L_GROUP_DELETE_CHECK" => $lang['group_delete_check'], - "L_SUBMIT" => $lang['Submit'], - "L_RESET" => $lang['Reset'], - "L_DELETE_MODERATOR" => $lang['delete_group_moderator'], - "L_DELETE_MODERATOR_EXPLAIN" => $lang['delete_moderator_explain'], - "L_YES" => $lang['Yes'], + "L_GROUP_TITLE" => $user->lang['Group_administration'], + "L_GROUP_EDIT_DELETE" => ( isset($_POST['new']) ) ? $user->lang['New_group'] : $user->lang['Edit_group'], + "L_GROUP_NAME" => $user->lang['group_name'], + "L_GROUP_DESCRIPTION" => $user->lang['group_description'], + "L_GROUP_MODERATOR" => $user->lang['group_moderator'], + "L_FIND_USERNAME" => $user->lang['Find_username'], + "L_GROUP_STATUS" => $user->lang['group_status'], + "L_GROUP_OPEN" => $user->lang['group_open'], + "L_GROUP_CLOSED" => $user->lang['group_closed'], + "L_GROUP_HIDDEN" => $user->lang['group_hidden'], + "L_GROUP_DELETE" => $user->lang['group_delete'], + "L_GROUP_DELETE_CHECK" => $user->lang['group_delete_check'], + "L_SUBMIT" => $user->lang['Submit'], + "L_RESET" => $user->lang['Reset'], + "L_DELETE_MODERATOR" => $user->lang['delete_group_moderator'], + "L_DELETE_MODERATOR_EXPLAIN" => $user->lang['delete_moderator_explain'], + "L_YES" => $user->lang['Yes'], "U_SEARCH_USER" => append_sid("../search.$phpEx?mode=searchuser"), @@ -212,7 +212,7 @@ else if( isset($_POST['group_update']) ) message_die(GENERAL_ERROR, "Couldn't update auth_access", "", __LINE__, __FILE__, $sql); } - $message = $lang['Deleted_group'] . "

" . sprintf($lang['Click_return_groupsadmin'], "", "") . "

" . sprintf($lang['Click_return_admin_index'], "", "");; + $message = $user->lang['Deleted_group'] . "

" . sprintf($user->lang['Click_return_groupsadmin'], "", "") . "

" . sprintf($user->lang['Click_return_admin_index'], "", "");; message_die(GENERAL_MESSAGE, $message); } @@ -226,11 +226,11 @@ else if( isset($_POST['group_update']) ) if( $group_name == "" ) { - message_die(GENERAL_MESSAGE, $lang['No_group_name']); + message_die(GENERAL_MESSAGE, $user->lang['No_group_name']); } else if( $group_moderator == "" ) { - message_die(GENERAL_MESSAGE, $lang['No_group_moderator']); + message_die(GENERAL_MESSAGE, $user->lang['No_group_moderator']); } $this_userdata = get_userdata($group_moderator); @@ -238,7 +238,7 @@ else if( isset($_POST['group_update']) ) if( !$group_moderator ) { - message_die(GENERAL_MESSAGE, $lang['No_group_moderator']); + message_die(GENERAL_MESSAGE, $user->lang['No_group_moderator']); } if( $mode == "editgroup" ) @@ -253,7 +253,7 @@ else if( isset($_POST['group_update']) ) } if( !$db->sql_numrows($result) ) { - message_die(GENERAL_MESSAGE, $lang['Group_not_exist']); + message_die(GENERAL_MESSAGE, $user->lang['Group_not_exist']); } $group_info = $db->sql_fetchrow($result); @@ -284,7 +284,7 @@ else if( isset($_POST['group_update']) ) message_die(GENERAL_ERROR, "Couldn't update group", "", __LINE__, __FILE__, $sql); } - $message = $lang['Updated_group'] . "

" . sprintf($lang['Click_return_groupsadmin'], "", "") . "

" . sprintf($lang['Click_return_admin_index'], "", "");; + $message = $user->lang['Updated_group'] . "

" . sprintf($user->lang['Click_return_groupsadmin'], "", "") . "

" . sprintf($user->lang['Click_return_admin_index'], "", "");; message_die(GENERAL_MESSAGE, $message); } @@ -314,29 +314,29 @@ else if( isset($_POST['group_update']) ) message_die(GENERAL_ERROR, "Couldn't insert new user-group info", "", __LINE__, __FILE__, $sql); } - $message = $lang['Added_new_group'] . "

" . sprintf($lang['Click_return_groupsadmin'], "", "") . "

" . sprintf($lang['Click_return_admin_index'], "", "");; + $message = $user->lang['Added_new_group'] . "

" . sprintf($user->lang['Click_return_groupsadmin'], "", "") . "

" . sprintf($user->lang['Click_return_admin_index'], "", "");; message_die(GENERAL_MESSAGE, $message); } else { - message_die(GENERAL_MESSAGE, $lang['Group_mode_not_selected']); + message_die(GENERAL_MESSAGE, $user->lang['Group_mode_not_selected']); } } } -page_header($lang['Manage']); +page_header($user->lang['Manage']); ?> -

+

lang['Manage']; ?>

-

+

lang['Group_manage_explain']; ?>

"> - + lang[$group_ary['group_name']]) ) ? $user->lang[$group_ary['group_name']] : $group_ary['group_name']; ?> - - + + - - + + acl_get('a_auth') ) { - message_die(MESSAGE, $lang['No_admin']); + message_die(MESSAGE, $user->lang['No_admin']); } // Define some vars @@ -71,77 +70,55 @@ else $mode = ''; } -// // Start program proper -// switch ( $mode ) { case 'forums': - $l_title = $lang['Permissions']; - $l_title_explain = $lang['Permissions_explain']; + $l_title = $user->lang['Permissions']; + $l_title_explain = $user->lang['Permissions_explain']; $l_can = '_can'; break; case 'moderators': - $l_title = $lang['Moderators']; - $l_title_explain = $lang['Moderators_explain']; + $l_title = $user->lang['Moderators']; + $l_title_explain = $user->lang['Moderators_explain']; $l_can = '_can'; break; case 'supermoderators': - $l_title = $lang['Super_Moderators']; - $l_title_explain = $lang['Super_Moderators_explain']; + $l_title = $user->lang['Super_Moderators']; + $l_title_explain = $user->lang['Super_Moderators_explain']; $l_can = '_can'; break; case 'administrators': - $l_title = $lang['Administrators']; - $l_title_explain = $lang['Administrators_explain']; + $l_title = $user->lang['Administrators']; + $l_title_explain = $user->lang['Administrators_explain']; $l_can = '_can_admin'; break; } -// -// Brief explanation of how things work when updating ... -// -// Granting someone any admin permissions grants them permissions -// to all other options, e.g. Moderator and Forums across the board. -// This is done via the acl class -// +// Call update or delete, both can take multiple user/group +// ids. Additionally inheritance is handled (by the auth API) if ( isset($_POST['update']) ) { $auth_admin = new auth_admin(); - switch ( $_POST['type'] ) + // Admin wants subforums to inherit permissions ... so handle this + if ( !empty($_POST['inherit']) ) { - case 'user': - $set = 'acl_set_user'; - break; - - case 'group': - $set = 'acl_set_group'; - break; + array_push($_POST['inherit'], $forum_id); + $forum_id = $_POST['inherit']; } foreach ( $_POST['entries'] as $id ) { - $auth_admin->$set($forum_id, $id, $_POST['option']); + $auth_admin->acl_set($_POST['type'], $forum_id, $id, $_POST['option']); } - message_die(MESSAGE, 'Permissions updated successfully'); + trigger_error('Permissions updated successfully'); } else if ( isset($_POST['delete']) ) { $auth_admin = new auth_admin(); - switch ( $_POST['type'] ) - { - case 'user': - $set = 'acl_delete_user'; - break; - - case 'group': - $set = 'acl_delete_group'; - break; - } - $option_ids = false; if ( !empty($_POST['option']) ) { @@ -164,23 +141,21 @@ else if ( isset($_POST['delete']) ) foreach ( $_POST['entries'] as $id ) { - $auth_admin->$set($forum_id, $id, $option_ids); + $auth_admin->acl_delete($_POST['type'], $forum_id, $id, $option_ids); } - message_die(MESSAGE, 'Permissions updated successfully'); + trigger_error('Permissions updated successfully'); } -// // Get required information, either all forums if // no id was specified or just the requsted if it // was -// if ( !empty($forum_id) || $mode == 'administrators' || $mode == 'supermoderators' ) { - // +// // Clear some vars, grab some info if relevant ... - // $s_hidden_fields = ''; + if ( !empty($forum_id) ) { $sql = "SELECT forum_name @@ -194,17 +169,13 @@ if ( !empty($forum_id) || $mode == 'administrators' || $mode == 'supermoderators $l_title .= ' : ' . $forum_info['forum_name'] . ''; } - // // Generate header - // page_header($l_title); ?>

-

- sql_fetchrow($result) ) { - $group_list .= ''; + $group_list .= ''; } $db->sql_freeresult($result); @@ -247,10 +218,12 @@ if ( !empty($forum_id) || $mode == 'administrators' || $mode == 'supermoderators ?> +

+
lang['Manage']; ?>
        
- - + + @@ -275,13 +248,13 @@ if ( !empty($forum_id) || $mode == 'administrators' || $mode == 'supermoderators ?> - + - +

lang['Users']; ?>

lang['Groups']; ?>

lang['Manage_users']; ?>
   
@@ -300,19 +273,19 @@ if ( !empty($forum_id) || $mode == 'administrators' || $mode == 'supermoderators $groups = ''; while ( $row = $db->sql_fetchrow($result) ) { - $groups .= ''; + $groups .= ''; } $db->sql_freeresult($result); ?> - + lang['Manage_groups']; ?> -   +   @@ -321,25 +294,25 @@ if ( !empty($forum_id) || $mode == 'administrators' || $mode == 'supermoderators
"> - + - +
lang['Add_users']; ?>
    &mode=searchuser&form=2&field=entries', '_phpbbsearch', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=650');return false;" />     &mode=searchuser&form=2&field=entries', '_phpbbsearch', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=650');return false;" />
"> - + - +
lang['Add_groups']; ?>
   
@@ -403,7 +376,7 @@ if ( !empty($forum_id) || $mode == 'administrators' || $mode == 'supermoderators $auth = array(); while ( $row = $db->sql_fetchrow($result) ) { - $ug_test = ( !empty($lang[$row['name']]) ) ? $lang[$row['name']] : $row['name']; + $ug_test = ( !empty($user->lang[$row['name']]) ) ? $user->lang[$row['name']] : $row['name']; $ug .= ( !strstr($ug, $ug_test) ) ? $ug_test . "\n" : ''; $ug_test = ''; @@ -415,17 +388,80 @@ if ( !empty($forum_id) || $mode == 'administrators' || $mode == 'supermoderators ?> -

+ + +

lang['ACL_explain']; ?>

+ +
"> - - - - - + + + +
          Quick settings:
+ + + + + lang['acl_' . $auth_options[$i]['auth_value']]) ) ? $user->lang['acl_' . $auth_options[$i]['auth_value']] : ucfirst(preg_replace('#.*?_#', '', $auth_options[$i]['auth_value'])); - $permit_type = ( $auth[$auth_options[$i]['auth_value']] == ACL_PERMIT ) ? ' checked="checked"' : ''; $allow_type = ( $auth[$auth_options[$i]['auth_value']] == ACL_ALLOW ) ? ' checked="checked"' : ''; $deny_type = ( $auth[$auth_options[$i]['auth_value']] == ACL_DENY ) ? ' checked="checked"' : ''; - $prevent_type = ( $auth[$auth_options[$i]['auth_value']] == ACL_PREVENT ) ? ' checked="checked"' : ''; + $inherit_type = ( $auth[$auth_options[$i]['auth_value']] == ACL_INHERIT ) ? ' checked="checked"' : ''; ?> - - + - + - + + + + + + + +
 lang['Option']; ?>  lang['Allow']; ?>  lang['Deny']; ?>  lang['Inherit']; ?> 
/> /> /> /> />
lang['Inheritance']; ?>
+ + + + + + + + + + + +
lang['Inheritance_explain']; ?>
lang['Mark_all']; ?> :: lang['Unmark_all']; ?>
  
@@ -484,10 +558,10 @@ else
"> - + - +
lang['Select_a_Forum']; ?>
        
diff --git a/phpBB/admin/admin_prune.php b/phpBB/admin/admin_prune.php index 0281f1a398..fadcf1e0a5 100644 --- a/phpBB/admin/admin_prune.php +++ b/phpBB/admin/admin_prune.php @@ -44,7 +44,7 @@ require($phpbb_root_path . 'includes/functions_admin.'.$phpEx); // Do we have forum admin permissions? if ( !$auth->acl_get('a_forum') ) { - message_die(MESSAGE, $lang['No_admin']); + message_die(MESSAGE, $user->lang['No_admin']); } // @@ -107,11 +107,11 @@ if ( isset($_POST['doprune']) ) } $template->assign_vars(array( - 'L_FORUM_PRUNE' => $lang['Forum_Prune'], - 'L_FORUM' => $lang['Forum'], - 'L_TOPICS_PRUNED' => $lang['Topics_pruned'], - 'L_POSTS_PRUNED' => $lang['Posts_pruned'], - 'L_PRUNE_RESULT' => $lang['Prune_success']) + 'L_FORUM_PRUNE' => $user->lang['Forum_Prune'], + 'L_FORUM' => $user->lang['Forum'], + 'L_TOPICS_PRUNED' => $user->lang['Topics_pruned'], + 'L_POSTS_PRUNED' => $user->lang['Posts_pruned'], + 'L_PRUNE_RESULT' => $user->lang['Prune_success']) ); add_admin_log('log_prune', $log_data); @@ -119,7 +119,7 @@ if ( isset($_POST['doprune']) ) } else { - page_header($lang['Prune']); + page_header($user->lang['Prune']); // // If they haven't selected a forum for pruning yet then @@ -130,7 +130,7 @@ else // // Output a selection table if no forum id has been specified. // - $select_list = ''; + $select_list = ''; $right = 0; $subforum = ''; @@ -153,16 +153,16 @@ else ?> -

+

lang['Prune']; ?>

-

+

lang['Forum_Prune_explain']; ?>

"> - + - +
lang['Select_a_Forum']; ?>
        
@@ -171,30 +171,30 @@ else } else { - $forum_name = ( $forum_id == -1 ) ? $lang['All_Forums'] : $forum_rows[0]['forum_name']; + $forum_name = ( $forum_id == -1 ) ? $user->lang['All_Forums'] : $forum_rows[0]['forum_name']; - $prune_data = $lang['Prune_topics_not_posted'] . " "; - $prune_data .= ' ' . $lang['Days']; + $prune_data = $user->lang['Prune_topics_not_posted'] . " "; + $prune_data .= ' ' . $user->lang['Days']; $s_hidden_fields = ''; ?> -

+

lang['Prune']; ?>

-

+

lang['Forum_Prune_explain']; ?>

-

+

lang['Forum'] . ': ' . $forum_name; ?>

"> - + - +
lang['Forum_Prune']; ?>
diff --git a/phpBB/admin/admin_prune_users.php b/phpBB/admin/admin_prune_users.php index 2dfdedfdfe..7bd0e59160 100644 --- a/phpBB/admin/admin_prune_users.php +++ b/phpBB/admin/admin_prune_users.php @@ -69,7 +69,7 @@ if ( isset($_POST['prune']) ) { $values = array('prune', 'deactivate', 'delete', 'users', 'username', 'email', 'joined_select', 'active_select', 'count_select', 'joined', 'active', 'count', 'deleteposts'); - $l_message = '
' . $lang['Confirm_prune_users'] . '

  '; + $l_message = '' . $user->lang['Confirm_prune_users'] . '

  '; foreach ( $values as $field ) { @@ -78,17 +78,17 @@ if ( isset($_POST['prune']) ) $l_message .= '
'; - page_header($lang['Prune_users']); + page_header($user->lang['Prune_users']); ?> -

+

lang['Prune_users']; ?>

-

+

lang['Prune_users_explain']; ?>

lang['Confirm'], $l_message, false); page_footer(); } @@ -194,14 +194,14 @@ if ( isset($_POST['prune']) ) unset($usernames); } - message_die(MESSAGE, $lang['Success_user_prune']); + message_die(MESSAGE, $user->lang['Success_user_prune']); } } // // // -$find_count = array('lt' => $lang['Less_than'], 'eq' => $lang['Equal_to'], 'gt' => $lang['More_than']); +$find_count = array('lt' => $user->lang['Less_than'], 'eq' => $user->lang['Equal_to'], 'gt' => $user->lang['More_than']); $s_find_count = ''; foreach ( $find_count as $key => $value ) { @@ -209,7 +209,7 @@ foreach ( $find_count as $key => $value ) $s_find_count .= ''; } -$find_time = array('lt' => $lang['Before'], 'gt' => $lang['After']); +$find_time = array('lt' => $user->lang['Before'], 'gt' => $user->lang['After']); $s_find_join_time = ''; foreach ( $find_time as $key => $value ) { @@ -224,48 +224,48 @@ foreach ( $find_time as $key => $value ) // // // -page_header($lang['Prune_users']); +page_header($user->lang['Prune_users']); ?> -

+

lang['Prune_users']; ?>

-

+

lang['Prune_users_explain']; ?>

"> - + - + - + - + - + - + - + - - + + - +
lang['Prune_users']; ?>
: lang['Username']; ?>:
: lang['Email']; ?>:
:
lang['Joined']; ?>:
lang['Joined_explain']; ?>
:
lang['Last_active']; ?>:
lang['Last_active_explain']; ?>
: lang['Posts']; ?>:
:
lang['Prune_users']; ?>:
lang['Select_users_explain']; ?>
:
   lang['Delete_user_posts']; ?>:
lang['Delete_user_posts_explain']; ?>
lang['Yes']; ?>    lang['No']; ?>
    ', '_phpbbsearch', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=650');return false;" />    ', '_phpbbsearch', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=650');return false;" />
diff --git a/phpBB/admin/admin_ranks.php b/phpBB/admin/admin_ranks.php index eadce13d11..ff3424f9f2 100644 --- a/phpBB/admin/admin_ranks.php +++ b/phpBB/admin/admin_ranks.php @@ -92,7 +92,7 @@ if ( $mode != '' ) { if ( empty($rank_id) ) { - message_die(MESSAGE, $lang['Must_select_rank']); + message_die(MESSAGE, $user->lang['Must_select_rank']); } $sql = "SELECT * FROM " . RANKS_TABLE . " @@ -108,36 +108,36 @@ if ( $mode != '' ) $rank_info['rank_special'] = 0; } - page_header($lang['Ranks']); + page_header($user->lang['Ranks']); ?> -

+

lang['Ranks']; ?>

-

+

lang['Ranks_explain']; ?>

"> - + - + - - + + - + - + - +
lang['Ranks']; ?>
: lang['Rank_title']; ?>:
: />    /> lang['Rank_special']; ?>: />lang['Yes']; ?>    /> lang['No']; ?>
: lang['Rank_minimum']; ?>:
:
lang['Rank_image']; ?>:
lang['Rank_image_explain']; ?>

' : ''; ?>
    
@@ -160,7 +160,7 @@ if ( $mode != '' ) if ( $rank_title == '' ) { - message_die(MESSAGE, $lang['Must_select_rank']); + message_die(MESSAGE, $user->lang['Must_select_rank']); } if ( $special_rank == 1 ) @@ -185,19 +185,19 @@ if ( $mode != '' ) SET rank_title = '" . str_replace("\'", "''", $rank_title) . "', rank_special = $special_rank, rank_min = $min_posts, rank_image = '" . str_replace("\'", "''", $rank_image) . "' WHERE rank_id = $rank_id"; - $message = $lang['Rank_updated']; + $message = $user->lang['Rank_updated']; } else { $sql = "INSERT INTO " . RANKS_TABLE . " (rank_title, rank_special, rank_min, rank_image) VALUES ('" . str_replace("\'", "''", $rank_title) . "', $special_rank, $min_posts, '" . str_replace("\'", "''", $rank_image) . "')"; - $message = $lang['Rank_added']; + $message = $user->lang['Rank_added']; } $db->sql_query($sql); - $message .= '

' . sprintf($lang['Click_return_rankadmin'], '', '') . '

' . sprintf($lang['Click_return_admin_index'], '', ''); + $message .= '

' . sprintf($user->lang['Click_return_rankadmin'], '', '') . '

' . sprintf($user->lang['Click_return_admin_index'], '', ''); message_die(MESSAGE, $message); @@ -228,33 +228,33 @@ if ( $mode != '' ) WHERE user_rank = $rank_id"; $db->sql_query($sql); - $message = $lang['Rank_removed'] . '

' . sprintf($lang['Click_return_rankadmin'], '', '') . '

' . sprintf($lang['Click_return_admin_index'], '', ''); + $message = $user->lang['Rank_removed'] . '

' . sprintf($user->lang['Click_return_rankadmin'], '', '') . '

' . sprintf($user->lang['Click_return_admin_index'], '', ''); message_die(MESSAGE, $message); } else { - message_die(MESSAGE, $lang['Must_select_rank']); + message_die(MESSAGE, $user->lang['Must_select_rank']); } } } -page_header($lang['Ranks']); +page_header($user->lang['Ranks']); ?> -

+

lang['Ranks']; ?>

-

+

lang['Ranks_explain']; ?>

"> - - - - - + + + + + sql_fetchrow($result) ) - - - + + + sql_fetchrow($result) ) ?> - +
lang['Rank_title']; ?>lang['Rank_minimum']; ?>lang['Rank_special']; ?>lang['Edit']; ?>lang['Delete']; ?>
">">lang['Yes'] : $user->lang['No']; ?>">lang['Edit']; ?>">lang['Delete']; ?>
diff --git a/phpBB/admin/admin_search.php b/phpBB/admin/admin_search.php index 452f36a053..5fdc2b8a5e 100644 --- a/phpBB/admin/admin_search.php +++ b/phpBB/admin/admin_search.php @@ -46,7 +46,7 @@ include($phpbb_root_path . 'includes/functions_posting.'.$phpEx); // if ( !$auth->acl_get('a_general') ) { - message_die(MESSAGE, $lang['No_admin']); + message_die(MESSAGE, $user->lang['No_admin']); } // @@ -295,13 +295,13 @@ if ( isset($_POST['start']) || isset($_GET['batchstart']) ) WHERE config_name = 'board_disable'"; $db->sql_query($sql); - page_header($lang['Search_indexing']); + page_header($user->lang['Search_indexing']); ?> -

+

lang['Search_indexing']; ?>

-

+

lang['Search_indexing_complete']; ?>

sql_query($sql); - page_header($lang['Search_indexing']); + page_header($user->lang['Search_indexing']); ?> -

+

lang['Search_indexing']; ?>

-

+

lang['Search_indexing_cancel']; ?>

lang['Search_indexing']); ?> -

+

lang['Search_indexing']; ?>

-

+

lang['Search_indexing_explain']; ?>

"> - +
          
diff --git a/phpBB/admin/admin_smilies.php b/phpBB/admin/admin_smilies.php index aacbb5dbcc..09f0f3fdde 100644 --- a/phpBB/admin/admin_smilies.php +++ b/phpBB/admin/admin_smilies.php @@ -45,7 +45,7 @@ require('pagestart.' . $phpEx); // if (!$auth->acl_get('a_general')) { - message_die(MESSAGE, $lang['No_admin']); + message_die(MESSAGE, $user->lang['No_admin']); } // @@ -173,13 +173,13 @@ if (isset($_POST['import_pak'])) } } - message_die(MESSAGE, $lang['Smilies_import_success']); + message_die(MESSAGE, $user->lang['Smilies_import_success']); } else { if (!count($smilies_paks)) { - $smilies_paks_select = $lang['No_smilies_pak']; + $smilies_paks_select = $user->lang['No_smilies_pak']; } else { @@ -192,33 +192,33 @@ if (isset($_POST['import_pak'])) $smilies_paks_select .= ''; } - page_header($lang['Import_smilies']); + page_header($user->lang['Import_smilies']); ?> -

+

lang['Import_smilies'] ?>

-

+

lang['Import_smilies_explain'] ?>

- + - + - + -
lang['Smilies_import'] ?>
lang['Select_package'] ?>
lang['Delete_existing_smilies'] ?>

+
lang['Smilies_conflicts'] ?>
-    
-    
+   lang['Replace_existing_smilies'] ?> 
+   lang['Keep_existing_smilies'] ?> 
- +
', '')); + page_header($user->lang['Export_smilies']); + message_die(MESSAGE, sprintf($user->lang['Export_smilies_explain'], '', '')); } elseif (isset($_POST['add'])) { @@ -265,9 +265,9 @@ elseif (isset($_POST['add'])) $filename_list .= ''; } - page_header($lang['Add_smile']); + page_header($user->lang['Add_smile']); ?> -

+

lang['Add_smile'] ?>

-

+

lang['Welcome_phpBB']; ?>

-

+

lang['Admin_intro']; ?>

-

+

lang['Forum_stats']; ?>

- - - - + + + + - + - + - + - + - + - + - + - + - + - - + +
lang['Statistic']; ?>lang['Value']; ?>lang['Statistic']; ?>lang['Value']; ?>
:lang['Number_posts']; ?>: :lang['Posts_per_day']; ?>:
:lang['Number_topics']; ?>: :lang['Topics_per_day']; ?>:
:lang['Number_users']; ?>: :lang['Users_per_day']; ?>:
:lang['Board_started']; ?>: :lang['Avatar_dir_size']; ?>:
:lang['Database_size']; ?>: :lang['Gzip_compression']; ?>:lang['ON'] : $user->lang['OFF']; ?>
-

+

lang['Admin_log']; ?>

-

+

lang['Admin_log_index_explain']; ?>

- - - - + + + +
lang['Username']; ?>lang['IP']; ?>lang['Time']; ?>lang['Action']; ?>
-

+

lang['Inactive_users']; ?>

-

+

lang['Inactive_users_explain']; ?>

"> - - - + + + - + - +
lang['Username']; ?>lang['Joined']; ?>lang['Mark']; ?>
lang['No_inactive_users']; ?>
:: lang['Mark_all']; ?> :: lang['Unmark_all']; ?>
@@ -481,12 +475,12 @@ else // header("Expires: " . gmdate("D, d M Y H:i:s", time()) . " GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); - header("Content-type: text/html; charset=" . $lang['ENCODING']); + header("Content-type: text/html; charset=" . $user->lang['ENCODING']); ?> -<?php echo $lang['Admin_title']; ?> +<?php echo $user->lang['Admin_title']; ?> @@ -499,7 +493,7 @@ else <body bgcolor="white" text="#000000"> - <p><?php echo $lang['No_frames']; ?></p> + <p><?php echo $user->lang['No_frames']; ?></p> </body> diff --git a/phpBB/admin/pagestart.php b/phpBB/admin/pagestart.php index b640029279..f08aaff80a 100644 --- a/phpBB/admin/pagestart.php +++ b/phpBB/admin/pagestart.php @@ -27,24 +27,20 @@ if ( !defined('IN_PHPBB') ) define('IN_ADMIN', true); include($phpbb_root_path . 'common.'.$phpEx); -// // Start session management -// -$userdata = $session->start($update); -$auth->acl($userdata, false, 'a_'); -$user = new user($userdata); -// +$user->start($update); +$user->setup(); +$auth->acl($user->data); // End session management -// // // If session_ids do not match, rewrite the URL correctly then redirect the user // -if ($_REQUEST['sid'] != $userdata['session_id']) +if ($_REQUEST['sid'] != $user->data['session_id']) { $url = preg_replace('/sid=([^&]*)(&?)/i', '', $_SERVER['REQUEST_URI']); $url = preg_replace('/\?$/', '', $url); - $url .= ((strpos($url, '?')) ? '&' : '?') . 'sid=' . $userdata['session_id']; + $url .= ((strpos($url, '?')) ? '&' : '?') . 'sid=' . $user->data['session_id']; redirect($url); } @@ -52,7 +48,7 @@ if ($_REQUEST['sid'] != $userdata['session_id']) // Functions function page_header($sub_title, $meta = '', $table_html = true) { - global $board_config, $db, $lang, $phpEx; + global $board_config, $db, $user, $phpEx; define('HEADER_INC', true); @@ -65,13 +61,13 @@ function page_header($sub_title, $meta = '', $table_html = true) } } - header("Content-type: text/html; charset=" . $lang['ENCODING']); + header("Content-type: text/html; charset=" . $user->lang['ENCODING']); ?> - + sql_close(); @@ -146,7 +142,7 @@ function page_footer($copyright_html = true) function page_message($title, $message, $show_header = false) { - global $phpEx, $SID, $lang; + global $phpEx, $SID, $user; if ( $show_header ) { @@ -156,7 +152,7 @@ function page_message($title, $message, $show_header = false) - +
phpBB Logo      lang['Admin_title']; ?>      
@@ -185,7 +181,7 @@ function page_message($title, $message, $show_header = false) function add_admin_log() { - global $db, $userdata, $user_ip; + global $db, $user; $arguments = func_get_args(); @@ -193,7 +189,7 @@ function add_admin_log() $data = ( !sizeof($arguments) ) ? '' : addslashes(serialize($arguments)); $sql = "INSERT INTO " . LOG_ADMIN_TABLE . " (user_id, log_ip, log_time, log_operation, log_data) - VALUES (" . $userdata['user_id'] . ", '$user_ip', " . time() . ", '$action', '$data')"; + VALUES (" . $user->data['user_id'] . ", '$user->ip', " . time() . ", '$action', '$data')"; $db->sql_query($sql); return; @@ -201,7 +197,7 @@ function add_admin_log() function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id = 0, $limit_days = 0, $sort_by = 'l.log_time DESC') { - global $db, $lang, $phpEx, $SID; + global $db, $user, $phpEx, $SID; $table_sql = ( $mode == 'admin' ) ? LOG_ADMIN_TABLE : LOG_MOD_TABLE; $forum_sql = ( $mode == 'mod' && $forum_id ) ? "AND l.forum_id = $forum_id" : ''; @@ -227,7 +223,7 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id $log[$i]['ip'] = $row['log_ip']; $log[$i]['time'] = $row['log_time']; - $log[$i]['action'] = ( !empty($lang[$row['log_operation']]) ) ? $lang[$row['log_operation']] : ucfirst(str_replace('_', ' ', $row['log_operation'])); + $log[$i]['action'] = ( !empty($user->lang[$row['log_operation']]) ) ? $user->lang[$row['log_operation']] : ucfirst(str_replace('_', ' ', $row['log_operation'])); if ( !empty($row['log_data']) ) { -- cgit v1.2.1