mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-13 12:35:06 +01:00
some tiny fixes here and there
git-svn-id: file:///svn/phpbb/trunk@6383 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
587ec3fa77
commit
1d7e3e0fd9
@ -77,12 +77,14 @@
|
||||
<td>{L_GZIP_COMPRESSION}: </td>
|
||||
<td><b>{GZIP_COMPRESSION}</b></td>
|
||||
</tr>
|
||||
<!-- IF S_TOTAL_ORPHAN -->
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>{L_NUMBER_ORPHAN}: </td>
|
||||
<td><b>{TOTAL_ORPHAN}</b></td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
@ -82,7 +82,7 @@
|
||||
<p>{L_ACP_SEARCH_INDEX_EXPLAIN}</p>
|
||||
|
||||
<!-- IF S_CONTINUE_INDEXING -->
|
||||
<a href="{U_CONTINUE_INDEXING}" onclick="popup_progress_bar('{S_CONTINUE_INDEXING}'); return false;">{L_CONTINUE}</a>
|
||||
<a href="{U_CONTINUE_INDEXING}" onclick="popup_progress_bar('{S_CONTINUE_INDEXING}');">{L_CONTINUE}</a>
|
||||
|
||||
<p>{L_CONTINUE_EXPLAIN}</p>
|
||||
<!-- ELSE -->
|
||||
@ -121,9 +121,9 @@
|
||||
|
||||
<fieldset class="quick">
|
||||
<!-- IF backend.S_INDEXED -->
|
||||
<input class="button2" type="submit" name="action[delete]" value="{L_DELETE_INDEX}" onclick="popup_progress_bar('delete'); return false;" />
|
||||
<input class="button2" type="submit" name="action[delete]" value="{L_DELETE_INDEX}" onclick="popup_progress_bar('delete');" />
|
||||
<!-- ELSE -->
|
||||
<input class="button2" type="submit" name="action[create]" value="{L_CREATE_INDEX}" onclick="popup_progress_bar('create'); return false;" />
|
||||
<input class="button2" type="submit" name="action[create]" value="{L_CREATE_INDEX}" onclick="popup_progress_bar('create');" />
|
||||
<!-- ENDIF -->
|
||||
</fieldset>
|
||||
|
||||
|
@ -986,7 +986,7 @@ function get_schema_struct()
|
||||
'forum_name' => array('STEXT_UNI', ''),
|
||||
'forum_desc' => array('TEXT_UNI', ''),
|
||||
'forum_desc_bitfield' => array('VCHAR:252', ''),
|
||||
'forum_desc_options' => array('UINT:11', 0),
|
||||
'forum_desc_options' => array('UINT:11', 7),
|
||||
'forum_desc_uid' => array('VCHAR:5', ''),
|
||||
'forum_link' => array('VCHAR_UNI', ''),
|
||||
'forum_password' => array('VCHAR_UNI:40', ''),
|
||||
@ -995,7 +995,7 @@ function get_schema_struct()
|
||||
'forum_rules' => array('TEXT_UNI', ''),
|
||||
'forum_rules_link' => array('VCHAR_UNI', ''),
|
||||
'forum_rules_bitfield' => array('VCHAR:252', ''),
|
||||
'forum_rules_options' => array('UINT:11', 0),
|
||||
'forum_rules_options' => array('UINT:11', 7),
|
||||
'forum_rules_uid' => array('VCHAR:5', ''),
|
||||
'forum_topics_per_page' => array('TINT:4', 0),
|
||||
'forum_type' => array('TINT:4', 0),
|
||||
@ -1064,7 +1064,7 @@ function get_schema_struct()
|
||||
'group_name' => array('VCHAR_CI', ''),
|
||||
'group_desc' => array('TEXT_UNI', ''),
|
||||
'group_desc_bitfield' => array('VCHAR:252', ''),
|
||||
'group_desc_options' => array('UINT:11', 0),
|
||||
'group_desc_options' => array('UINT:11', 7),
|
||||
'group_desc_uid' => array('VCHAR:5', ''),
|
||||
'group_display' => array('BOOL', 0),
|
||||
'group_avatar' => array('VCHAR', ''),
|
||||
|
@ -99,11 +99,11 @@ class acp_forums
|
||||
'forum_link_track' => request_var('forum_link_track', false),
|
||||
'forum_desc' => request_var('forum_desc', '', true),
|
||||
'forum_desc_uid' => '',
|
||||
'forum_desc_options' => 0,
|
||||
'forum_desc_options' => 7,
|
||||
'forum_desc_bitfield' => '',
|
||||
'forum_rules' => request_var('forum_rules', '', true),
|
||||
'forum_rules_uid' => '',
|
||||
'forum_rules_options' => 0,
|
||||
'forum_rules_options' => 7,
|
||||
'forum_rules_bitfield' => '',
|
||||
'forum_rules_link' => request_var('forum_rules_link', ''),
|
||||
'forum_image' => request_var('forum_image', ''),
|
||||
|
@ -85,7 +85,7 @@ class acp_groups
|
||||
break;
|
||||
}
|
||||
|
||||
group_update_listing($group_id);
|
||||
group_update_listings($group_id);
|
||||
|
||||
trigger_error($user->lang[$message] . adm_back_link($this->u_action . '&action=list&g=' . $group_id));
|
||||
break;
|
||||
@ -136,7 +136,7 @@ class acp_groups
|
||||
group_user_attributes('default', $group_id, $mark_ary, false, $group_row['group_name'], $group_row);
|
||||
}
|
||||
|
||||
group_update_listing($group_id);
|
||||
group_update_listings($group_id);
|
||||
|
||||
trigger_error($user->lang['GROUP_DEFS_UPDATED'] . adm_back_link($this->u_action . '&action=list&g=' . $group_id));
|
||||
}
|
||||
|
@ -406,12 +406,19 @@ class acp_main
|
||||
$files_per_day = $total_files;
|
||||
}
|
||||
|
||||
$sql = 'SELECT COUNT(attach_id) AS total_orphan
|
||||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
WHERE is_orphan = 1';
|
||||
$result = $db->sql_query($sql);
|
||||
$total_orphan = (int) $db->sql_fetchfield('total_orphan');
|
||||
$db->sql_freeresult($result);
|
||||
if ($config['allow_attachments'] || $config['allow_pm_attach'])
|
||||
{
|
||||
$sql = 'SELECT COUNT(attach_id) AS total_orphan
|
||||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
WHERE is_orphan = 1';
|
||||
$result = $db->sql_query($sql);
|
||||
$total_orphan = (int) $db->sql_fetchfield('total_orphan');
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
$total_orphan = false;
|
||||
}
|
||||
|
||||
$dbsize = get_database_size();
|
||||
$s_action_options = build_select(array('online' => 'RESET_ONLINE', 'date' => 'RESET_DATE', 'stats' => 'RESYNC_STATS', 'user' => 'RESYNC_POSTCOUNTS', 'db_track' => 'RESYNC_POST_MARKING'));
|
||||
@ -430,6 +437,7 @@ class acp_main
|
||||
'DBSIZE' => $dbsize,
|
||||
'UPLOAD_DIR_SIZE' => $upload_dir_size,
|
||||
'TOTAL_ORPHAN' => $total_orphan,
|
||||
'S_TOTAL_ORPHAN' => ($total_orphan === false) ? false : true,
|
||||
'GZIP_COMPRESSION' => ($config['gzip_compress']) ? $user->lang['ON'] : $user->lang['OFF'],
|
||||
'DATABASE_INFO' => $db->sql_server_info(),
|
||||
|
||||
|
@ -2236,8 +2236,7 @@ function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bb
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
$uid = '';
|
||||
$bitfield = '';
|
||||
$uid = $bitfield = '';
|
||||
|
||||
if (!$text)
|
||||
{
|
||||
|
@ -1018,24 +1018,11 @@ function display_user_activity(&$userdata)
|
||||
global $auth, $template, $db, $user;
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
// Init new auth class if user is different
|
||||
if ($user->data['user_id'] != $userdata['user_id'])
|
||||
{
|
||||
$auth2 = new auth();
|
||||
$auth2->acl($userdata);
|
||||
|
||||
$post_count_ary = $auth2->acl_getf('!f_postcount');
|
||||
}
|
||||
else
|
||||
{
|
||||
$post_count_ary = $auth->acl_getf('!f_postcount');
|
||||
}
|
||||
|
||||
$forum_read_ary = $auth->acl_getf('!f_read');
|
||||
|
||||
$forum_ary = array();
|
||||
|
||||
// Do not include those forums the user is not having read access to...
|
||||
$forum_read_ary = $auth->acl_getf('!f_read');
|
||||
|
||||
foreach ($forum_read_ary as $forum_id => $not_allowed)
|
||||
{
|
||||
if ($not_allowed['f_read'])
|
||||
@ -1044,40 +1031,27 @@ function display_user_activity(&$userdata)
|
||||
}
|
||||
}
|
||||
|
||||
// Now do not include those forums where the posts do not count...
|
||||
foreach ($post_count_ary as $forum_id => $not_counted)
|
||||
{
|
||||
if ($not_counted['f_postcount'])
|
||||
{
|
||||
$forum_ary[] = (int) $forum_id;
|
||||
}
|
||||
}
|
||||
|
||||
$forum_ary = array_unique($forum_ary);
|
||||
$post_count_sql = (sizeof($forum_ary)) ? 'AND ' . $db->sql_in_set('f.forum_id', $forum_ary, true) : '';
|
||||
$forum_sql = (sizeof($forum_ary)) ? 'AND ' . $db->sql_in_set('forum_id', $forum_ary, true) : '';
|
||||
|
||||
// Obtain active forum
|
||||
$sql = 'SELECT forum_id, COUNT(post_id) AS num_posts
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE poster_id = ' . $userdata['user_id'] . "
|
||||
AND post_postcount = 1
|
||||
$forum_sql
|
||||
GROUP BY forum_id";
|
||||
|
||||
// Firebird does not support ORDER BY on aliased columns
|
||||
// MySQL does not support ORDER BY on functions
|
||||
switch (SQL_LAYER)
|
||||
{
|
||||
case 'firebird':
|
||||
$sql = 'SELECT f.forum_id, COUNT(p.post_id) AS num_posts
|
||||
FROM ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . ' f
|
||||
WHERE p.poster_id = ' . $userdata['user_id'] . "
|
||||
AND f.forum_id = p.forum_id
|
||||
$post_count_sql
|
||||
GROUP BY f.forum_id
|
||||
ORDER BY COUNT(p.post_id) DESC";
|
||||
$sql .= ' ORDER BY COUNT(post_id) DESC';
|
||||
break;
|
||||
|
||||
default:
|
||||
$sql = 'SELECT f.forum_id, COUNT(p.post_id) AS num_posts
|
||||
FROM ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . ' f
|
||||
WHERE p.poster_id = ' . $userdata['user_id'] . "
|
||||
AND f.forum_id = p.forum_id
|
||||
$post_count_sql
|
||||
GROUP BY f.forum_id
|
||||
ORDER BY num_posts DESC";
|
||||
$sql .= ' ORDER BY num_posts DESC';
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1095,30 +1069,24 @@ function display_user_activity(&$userdata)
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
// Obtain active topic
|
||||
$sql = 'SELECT topic_id, COUNT(post_id) AS num_posts
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE poster_id = ' . $userdata['user_id'] . "
|
||||
AND post_postcount = 1
|
||||
$forum_sql
|
||||
GROUP BY topic_id";
|
||||
|
||||
// Firebird does not support ORDER BY on aliased columns
|
||||
// MySQL does not support ORDER BY on functions
|
||||
switch (SQL_LAYER)
|
||||
{
|
||||
case 'firebird':
|
||||
$sql = 'SELECT t.topic_id, COUNT(p.post_id) AS num_posts
|
||||
FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . ' f
|
||||
WHERE p.poster_id = ' . $userdata['user_id'] . "
|
||||
AND t.topic_id = p.topic_id
|
||||
AND f.forum_id = t.forum_id
|
||||
$post_count_sql
|
||||
GROUP BY t.topic_id
|
||||
ORDER BY COUNT(p.post_id) DESC";
|
||||
$sql .= ' ORDER BY COUNT(post_id) DESC';
|
||||
break;
|
||||
|
||||
default:
|
||||
$sql = 'SELECT t.topic_id, COUNT(p.post_id) AS num_posts
|
||||
FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . ' f
|
||||
WHERE p.poster_id = ' . $userdata['user_id'] . "
|
||||
AND t.topic_id = p.topic_id
|
||||
AND f.forum_id = t.forum_id
|
||||
$post_count_sql
|
||||
GROUP BY t.topic_id
|
||||
ORDER BY num_posts DESC";
|
||||
$sql .= ' ORDER BY num_posts DESC';
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -156,6 +156,7 @@ function user_add($user_row, $cp_data = false)
|
||||
'user_actkey' => '',
|
||||
'user_ip' => '',
|
||||
'user_regdate' => time(),
|
||||
'user_passchg' => time(),
|
||||
|
||||
'user_lastmark' => time(),
|
||||
'user_lastvisit' => 0,
|
||||
@ -255,6 +256,7 @@ function user_add($user_row, $cp_data = false)
|
||||
function user_delete($mode, $user_id, $post_username = false)
|
||||
{
|
||||
global $config, $db, $user, $auth;
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
$db->sql_transaction('begin');
|
||||
|
||||
@ -286,7 +288,6 @@ function user_delete($mode, $user_id, $post_username = false)
|
||||
|
||||
if (!function_exists('delete_posts'))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
}
|
||||
|
||||
|
@ -1202,7 +1202,7 @@ class user extends session
|
||||
|
||||
// Does the user need to change their password? If so, redirect to the
|
||||
// ucp profile reg_details page ... of course do not redirect if we're already in the ucp
|
||||
if (!defined('IN_ADMIN') && $config['chg_passforce'] && $this->data['is_registered'] && $this->data['user_passchg'] < time() - ($config['chg_passforce'] * 86400))
|
||||
if (!defined('IN_ADMIN') && !defined('ADMIN_START') && $config['chg_passforce'] && $this->data['is_registered'] && $this->data['user_passchg'] < time() - ($config['chg_passforce'] * 86400))
|
||||
{
|
||||
if (strpos($this->page['query_string'], 'mode=reg_details') === false && $this->page['page_name'] != "ucp.$phpEx")
|
||||
{
|
||||
|
@ -402,7 +402,7 @@ $lang = array_merge($lang, array(
|
||||
'REG_USER_ONLINE' => 'There is %d registered user and ',
|
||||
'REG_USER_TOTAL' => '%d registered, ',
|
||||
'REMOVE' => 'Remove',
|
||||
'REMOVE_INSTALL' => 'Please delete, move or rename the install directory.',
|
||||
'REMOVE_INSTALL' => 'Please delete, move or rename the install directory before you use your forum. If this directory is still present, only the Administration Control Panel (ACP) will be accessible.',
|
||||
'REPLIES' => 'Replies',
|
||||
'REPLY_WITH_QUOTE' => 'Reply with quote',
|
||||
'REPLYING_GLOBAL_ANNOUNCE' => 'Replying to Global Announcement',
|
||||
|
@ -136,7 +136,7 @@ $lang = array_merge($lang, array(
|
||||
'INITIAL_CONFIG' => 'Basic Configuration',
|
||||
'INITIAL_CONFIG_EXPLAIN' => 'Now that install has determined your server can run phpBB you need to supply some specific information. If you do not know how to connect to your database please contact your hosting provider (in the first instance) or use the phpBB support forums. When entering data please ensure you check it thoroughly before continuing.',
|
||||
'INSTALL_CONGRATS' => 'Congratulations',
|
||||
'INSTALL_CONGRATS_EXPLAIN' => 'You have now successfully installed phpBB 3.0. Clicking the button below will take you to your Administration Control Panel (ACP). Take some time to examine the options available to you. Remember that help is available online via the <a href="http://www.phpbb.com/support/documentation/3.0/">Userguide</a> and the <a href="http://www.phpbb.com/phpBB/viewforum.php?f=46">Beta support forum</a>, see the %sREADME%s for further information.<br /><br />Please now delete, move or rename the install directory before you use your forum. If this directory is still present, only the ACP will be accessible.',
|
||||
'INSTALL_CONGRATS_EXPLAIN' => 'You have now successfully installed phpBB 3.0. Clicking the button below will take you to your Administration Control Panel (ACP). Take some time to examine the options available to you. Remember that help is available online via the <a href="http://www.phpbb.com/support/documentation/3.0/">Userguide</a> and the <a href="http://www.phpbb.com/phpBB/viewforum.php?f=46">Beta support forum</a>, see the %sREADME%s for further information.<br /><br /><strong>Please now delete, move or rename the install directory before you use your forum. If this directory is still present, only the Administration Control Panel (ACP) will be accessible.</strong>',
|
||||
'INSTALL_INTRO' => 'Welcome to Installation',
|
||||
'INSTALL_INTRO_BODY' => 'With this option, it is possible to install phpBB onto your server.</p><p>In order to proceed, you will need the following information to hand:</p>
|
||||
<ul>
|
||||
|
Loading…
x
Reference in New Issue
Block a user