diff -r 44302dd20d62 -r 94c1ff984286 plugins/SpecialUserFuncs.php --- a/plugins/SpecialUserFuncs.php Mon Apr 13 17:28:24 2009 -0400 +++ b/plugins/SpecialUserFuncs.php Tue Apr 14 21:02:13 2009 -0400 @@ -1255,7 +1255,8 @@ $template->footer(); } -function page_Special_Contributions() { +function page_Special_Contributions() +{ global $db, $session, $paths, $template, $plugins; // Common objects global $lang; @@ -1274,158 +1275,8 @@ return; } - $user = $db->escape($user); - $q = 'SELECT log_type, time_id, action, date_string, page_id, namespace, author, edit_summary, minor_edit, page_id, namespace, ( action = \'edit\' ) AS is_edit FROM '.table_prefix.'logs WHERE author=\''.$user.'\' AND log_type=\'page\' AND is_draft != 1 ORDER BY is_edit DESC, time_id DESC;'; - $q = $db->sql_query($q); - if ( !$q ) - $db->_die('SpecialUserFuncs selecting contribution data'); - - echo '
' . $lang->get('userfuncs_contribs_msg_no_edits') . '
'; - } - else - { - echo ''; - echo '' . $lang->get('history_col_datetime') . ' | '; - echo '' . $lang->get('history_col_page') . ' | '; - if ( $current == 'cnt_edits' ) - { - echo '' . $lang->get('history_col_summary') . ' | '; - } - echo '' . $lang->get('history_col_minor') . ' | '; - if ( $current == 'cnt_other' ) - { - echo '' . $lang->get('history_col_action_taken') . ' | -' . $lang->get('history_col_extra') . ' | - '; - } - echo '' . $lang->get('history_col_actions') . ' | -||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
' . enano_date('d M Y h:i a', $row['time_id']) . ' | '; - - // page & link to said page - echo '' . get_page_title_ns($row['page_id'], $row['namespace']) . ' | '; - - switch ( $row['action'] ) - { - case 'edit': - if ( $row['edit_summary'] == 'Automatic backup created when logs were purged' ) - { - $row['edit_summary'] = $lang->get('history_summary_clearlogs'); - } - else if ( empty($row['edit_summary']) ) - { - $row['edit_summary'] = '' . $lang->get('history_summary_none_given') . ''; - } - echo '' . $row['edit_summary'] . ' | '; - if ( $row['minor_edit'] == 1 ) - { - echo 'M | '; - } - else - { - echo ''; - } - break; - case 'prot': - echo ' | '; - echo ' | ' . $lang->get('history_log_protect') . ' | '; - echo '' . $lang->get('history_extra_reason') . ' ' . $row['edit_summary'] . ' | '; - break; - case 'unprot': - echo ''; - echo ' | ' . $lang->get('history_log_unprotect') . ' | '; - echo '' . $lang->get('history_extra_reason') . ' ' . $row['edit_summary'] . ' | '; - break; - case 'semiprot': - echo ''; - echo ' | ' . $lang->get('history_log_semiprotect') . ' | '; - echo '' . $lang->get('history_extra_reason') . ' ' . $row['edit_summary'] . ' | '; - break; - case 'rename': - echo ''; - echo ' | ' . $lang->get('history_log_rename') . ' | '; - echo '' . $lang->get('history_extra_oldtitle') . ' ' . htmlspecialchars($row['edit_summary']) . ' | '; - break; - case 'create': - echo ''; - echo ' | ' . $lang->get('history_log_create') . ' | '; - echo ''; - break; - case 'delete': - echo ' | '; - echo ' | ' . $lang->get('history_log_delete') . ' | '; - echo '' . $lang->get('history_extra_reason') . ' ' . $row['edit_summary'] . ' | '; - break; - case 'reupload': - echo ''; - echo ' | ' . $lang->get('history_log_uploadnew') . ' | '; - echo '' . $lang->get('history_extra_reason') . ' ' . $row['edit_summary'] . ' | '; - break; - } - - // actions column - echo ''; - if ( $row['is_edit'] == 1 ) - { - echo ' ' . $lang->get('history_action_view') . ' | '; - echo ' ' . $lang->get('history_action_restore') . ''; - } - else - { - echo ' ' . $lang->get('history_action_revert') . ''; - } - echo ' | '; - - if ( $current == 'cnt_other' && $cnt_edits + $cnt_other >= $db->numrows($q) ) - { - echo '
' . $lang->get('userfuncs_contribs_msg_no_edits') . '
'; - echo '' . $lang->get('userfuncs_contribs_msg_no_other') . '
'; - } - - $db->free_result(); - $template->footer(); + $url = makeUrlNS("Special", "Log/user={$user}"); + redirect($url, '', '', 0); } function page_Special_ChangeStyle()