1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

fix some issues with oop, fixing small bugs and prepare the next steps...

NOTE TO DEVS: have a look at adm/admin_board.php (new config layout)


git-svn-id: file:///svn/phpbb/trunk@4883 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2004-05-02 13:06:57 +00:00
parent 67d2ac3667
commit 729c3abd02
58 changed files with 1693 additions and 3073 deletions

View File

@@ -107,7 +107,7 @@ class ucp_attachments extends module
$view_topic = "{$phpbb_root_path}viewtopic.$phpEx$SID&t=" . $row['topic_id'] . '&p=' . $row['post_id'] . '#' . $row['post_id'];
$template->assign_block_vars('attachrow', array(
'ROW_NUMBER' => $i + ($start + 1),
'ROW_NUMBER' => $row_count + ($start + 1),
'FILENAME' => $row['real_filename'],
'COMMENT' => str_replace("\n", '<br />', $row['comment']),
'EXTENSION' => $row['extension'],

View File

@@ -502,6 +502,11 @@ class ucp_main extends module
break;
case 'drafts':
global $ucp;
$pm_drafts = ($ucp->name == 'pm') ? true : false;
$user->add_lang('posting');
$edit = (isset($_REQUEST['edit'])) ? true : false;
$submit = (isset($_POST['submit'])) ? true : false;
@@ -558,12 +563,24 @@ class ucp_main extends module
}
}
$sql = 'SELECT d.*, f.forum_name
FROM ' . DRAFTS_TABLE . ' d, ' . FORUMS_TABLE . ' f
WHERE d.user_id = ' . $user->data['user_id'] . ' ' .
(($edit) ? "AND d.draft_id = $draft_id" : '') . '
AND f.forum_id = d.forum_id
ORDER BY save_time DESC';
if (!$pm_drafts)
{
$sql = 'SELECT d.*, f.forum_name
FROM ' . DRAFTS_TABLE . ' d, ' . FORUMS_TABLE . ' f
WHERE d.user_id = ' . $user->data['user_id'] . ' ' .
(($edit) ? "AND d.draft_id = $draft_id" : '') . '
AND f.forum_id = d.forum_id
ORDER BY d.save_time DESC';
}
else
{
$sql = 'SELECT * FROM ' . DRAFTS_TABLE . '
WHERE user_id = ' . $user->data['user_id'] . ' ' .
(($edit) ? "AND draft_id = $draft_id" : '') . '
AND forum_id = 0
AND topic_id = 0
ORDER BY save_time DESC';
}
$result = $db->sql_query($sql);
$draftrows = $topic_ids = array();
@@ -598,7 +615,7 @@ class ucp_main extends module
$row_count = 0;
foreach ($draftrows as $draft)
{
$link_topic = $link_forum = 0;
$link_topic = $link_forum = $link_pm = false;
$insert_url = $view_url = $title = '';
if (isset($topic_rows[$draft['topic_id']]) && $auth->acl_get('f_read', $topic_rows[$draft['topic_id']]['forum_id']))
@@ -617,6 +634,11 @@ class ucp_main extends module
$insert_url = "posting.$phpEx$SID&amp;f=" . $draft['forum_id'] . '&amp;mode=post&amp;d=' . $draft['draft_id'];
}
else if ($pm_drafts)
{
$link_pm = true;
$insert_url = "ucp.$phpEx$SID&amp;i=$id&amp;mode=compose&amp;d=" . $draft['draft_id'];
}
$template_row = array(
'DATE' => $user->format_date($draft['save_time']),
@@ -635,6 +657,7 @@ class ucp_main extends module
'S_ROW_COUNT' => $row_count++,
'S_LINK_TOPIC' => $link_topic,
'S_LINK_FORUM' => $link_forum,
'S_LINK_PM' => $link_pm,
'S_HIDDEN_FIELDS' => $s_hidden_fields
);
@@ -643,7 +666,7 @@ class ucp_main extends module
if (!$edit)
{
$template->assign_vars('S_DRAFT_ROWS', $row_count);
$template->assign_var('S_DRAFT_ROWS', $row_count);
}
break;

File diff suppressed because it is too large Load Diff

View File

@@ -125,7 +125,7 @@ class ucp_profile extends module
if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
{
// Grab an array of user_id's with a_user permissions
$admin_ary = auth::acl_get_list(false, 'a_user', false);
$admin_ary = $auth->acl_get_list(false, 'a_user', false);
$sql = 'SELECT user_id, username, user_email, user_jabber, user_notify_type
FROM ' . USERS_TABLE . '

View File

@@ -200,7 +200,7 @@ class ucp_register extends module
if (sizeof($cp_data))
{
$cp_data['user_id'] = (int) $user_id;
$sql = 'INSERT INTO ' CUSTOM_PROFILE_DATA . ' ' . $db->sql_build_array('INSERT', $cp->build_insert_sql_array($cp_data));
$sql = 'INSERT INTO ' . CUSTOM_PROFILE_DATA . ' ' . $db->sql_build_array('INSERT', $cp->build_insert_sql_array($cp_data));
$db->sql_query($sql);
}
@@ -281,7 +281,7 @@ class ucp_register extends module
{
// Grab an array of user_id's with a_user permissions ... these users
// can activate a user
$admin_ary = auth::acl_get_list(false, 'a_user', false);
$admin_ary = $auth->acl_get_list(false, 'a_user', false);
$sql = 'SELECT user_id, username, user_email, user_jabber, user_notify_type
FROM ' . USERS_TABLE . '

View File

@@ -93,7 +93,7 @@ class ucp_zebra extends module
if ($mode == 'foes')
{
$perms = array();
foreach (auth::acl_get_list($user_id_ary, array('a_', 'm_')) as $forum_id => $forum_ary)
foreach ($auth->acl_get_list($user_id_ary, array('a_', 'm_')) as $forum_id => $forum_ary)
{
foreach ($forum_ary as $auth_option => $user_ary)
{