1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-10 02:36:38 +02:00

- remove description from profile fields

- added disclaimer about DEBUG_EXTRA to the ACP (i think this is needed - some idiots might think it is wise to have this enabled on a production board. :) We *may* let it there for the Betas though, but it will be removed during the RC's)
- some bugfixes


git-svn-id: file:///svn/phpbb/trunk@5973 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2006-05-27 16:24:21 +00:00
parent b51b978854
commit ce4445f74a
22 changed files with 240 additions and 130 deletions

View File

@@ -485,13 +485,15 @@ class acp_icons
while ($row = $db->sql_fetchrow($result))
{
$pak .= "'" . addslashes($row[$fields . '_url']) . "', ";
$pak .= "'" . addslashes($row[$fields . '_height']) . "', ";
$pak .= "'" . addslashes($row[$fields . '_width']) . "', ";
$pak .= "'" . addslashes($row[$fields . '_height']) . "', ";
if ($mode == 'smilies')
{
$pak .= "'" . addslashes($row['emotion']) . "', ";
$pak .= "'" . addslashes($row['code']) . "', ";
}
$pak .= "\n";
}
$db->sql_freeresult($result);

View File

@@ -264,6 +264,85 @@ class acp_main
set_config('board_startdate', time() - 1);
add_log('admin', 'LOG_RESET_DATE');
break;
case 'db_track':
$db->sql_query(((SQL_LAYER != 'sqlite') ? 'TRUNCATE TABLE ' : 'DELETE FROM ') . TOPICS_POSTED_TABLE);
// This can get really nasty... therefore we only do the last six months
$get_from_time = time() - (6 * 4 * 7 * 24 * 60 * 60);
// Select forum ids, do not include categories
$sql = 'SELECT forum_id
FROM ' . FORUMS_TABLE . '
WHERE forum_type <> ' . FORUM_CAT;
$result = $db->sql_query($sql);
$forum_ids = array();
while ($row = $db->sql_fetchrow($result))
{
$forum_ids[] = $row['forum_id'];
}
$db->sql_freeresult($result);
// Any global announcements? ;)
$forum_ids[] = 0;
// Now go through the forums and get us some topics...
foreach ($forum_ids as $forum_id)
{
$sql = 'SELECT p.poster_id, p.topic_id
FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t
WHERE t.forum_id = ' . $forum_id . '
AND t.topic_moved_id = 0
AND t.topic_last_post_time > ' . $get_from_time . '
AND t.topic_id = p.topic_id
AND p.poster_id <> ' . ANONYMOUS . '
GROUP BY p.poster_id, p.topic_id';
$result = $db->sql_query($sql);
$posted = array();
while ($row = $db->sql_fetchrow($result))
{
$posted[$row['poster_id']][] = $row['topic_id'];
}
$db->sql_freeresult($result);
$sql_ary = array();
foreach ($posted as $user_id => $topic_row)
{
foreach ($topic_row as $topic_id)
{
$sql_ary[] = array(
'user_id' => $user_id,
'topic_id' => $topic_id,
'topic_posted' => 1,
);
}
}
unset($posted);
if (sizeof($sql_ary))
{
switch (SQL_LAYER)
{
case 'mysql':
case 'mysql4':
case 'mysqli':
$db->sql_query('INSERT INTO ' . TOPICS_POSTED_TABLE . ' ' . $db->sql_build_array('MULTI_INSERT', $sql_ary));
break;
default:
foreach ($sql_ary as $ary)
{
$db->sql_query('INSERT INTO ' . TOPICS_POSTED_TABLE . ' ' . $db->sql_build_array('INSERT', $ary));
}
break;
}
}
}
add_log('admin', 'LOG_RESYNC_POST_MARKING');
break;
}
// Get forum statistics
@@ -328,7 +407,7 @@ class acp_main
}
$dbsize = get_database_size();
$s_action_options = build_select(array('online' => 'RESET_ONLINE', 'date' => 'RESET_DATE', 'stats' => 'RESYNC_STATS', 'user' => 'RESYNC_POSTCOUNTS'));
$s_action_options = build_select(array('online' => 'RESET_ONLINE', 'date' => 'RESET_DATE', 'stats' => 'RESYNC_STATS', 'user' => 'RESYNC_POSTCOUNTS', 'db_track' => 'RESYNC_POST_MARKING'));
$template->assign_vars(array(
'TOTAL_POSTS' => $total_posts,
@@ -398,7 +477,13 @@ class acp_main
'S_INACTIVE_OPTIONS' => build_select($option_ary))
);
}
// Display debug_extra notice
if (defined('DEBUG_EXTRA'))
{
$template->assign_var('S_DEBUG_EXTRA', true);
}
$this->tpl_name = 'acp_main';
$this->page_title = 'ACP_MAIN';
}

View File

@@ -952,16 +952,16 @@ class acp_profile
// Save the field
$profile_fields = array(
'field_length' => $cp->vars['field_length'],
'field_minlen' => $cp->vars['field_minlen'],
'field_maxlen' => $cp->vars['field_maxlen'],
'field_novalue' => $cp->vars['field_novalue'],
'field_length' => $cp->vars['field_length'],
'field_minlen' => $cp->vars['field_minlen'],
'field_maxlen' => $cp->vars['field_maxlen'],
'field_novalue' => $cp->vars['field_novalue'],
'field_default_value' => $cp->vars['field_default_value'],
'field_validation' => $cp->vars['field_validation'],
'field_required' => $cp->vars['field_required'],
'field_show_on_reg' => $cp->vars['field_show_on_reg'],
'field_hide' => $cp->vars['field_hide'],
'field_no_view' => $cp->vars['field_no_view']
'field_validation' => $cp->vars['field_validation'],
'field_required' => $cp->vars['field_required'],
'field_show_on_reg' => $cp->vars['field_show_on_reg'],
'field_hide' => $cp->vars['field_hide'],
'field_no_view' => $cp->vars['field_no_view']
);
if ($action == 'create')
@@ -969,6 +969,7 @@ class acp_profile
$profile_fields += array(
'field_type' => $field_type,
'field_ident' => $field_ident,
'field_name' => $field_ident,
'field_order' => $new_field_order + 1,
'field_active' => 1
);