diff -r 9bcc185dc151 -r 85f91037cd4f plugins/PrivateMessages.php --- a/plugins/PrivateMessages.php Tue Jan 29 17:29:08 2008 -0500 +++ b/plugins/PrivateMessages.php Tue Jan 29 23:15:44 2008 -0500 @@ -719,14 +719,14 @@ $r = $db->fetchrow(); $db->free_result(); $q = $db->sql_query('INSERT INTO '.table_prefix.'buddies(user_id,buddy_user_id,is_friend) VALUES('.$session->user_id.', '.$r['user_id'].', 1);'); - if(!$q) echo '
Buddy could not be added: '.mysql_error().'
'; + if(!$q) echo 'Buddy could not be added: '.$db->get_error().'
'; $db->free_result(); } } elseif($argv[1] == 'Remove' && preg_match('#^([0-9]+)$#', $argv[2])) { // Using WHERE user_id prevents users from deleting others' buddies $q = $db->sql_query('DELETE FROM '.table_prefix.'buddies WHERE user_id='.$session->user_id.' AND buddy_id='.$argv[2].';'); $db->free_result(); - if(!$q) echo 'Buddy could not be deleted: '.mysql_error().'
'; + if(!$q) echo 'Buddy could not be deleted: '.$db->get_error().'
'; if(mysql_affected_rows() < 1) echo 'No rows were affected. Either the selected buddy ID does not exist or you tried to delete someone else\'s buddy.
'; } $template->header(); @@ -736,15 +736,15 @@Private messages |
---|
Inbox |
Outbox |
Sent Items |
Drafts |
Archive |
Buddies |
Friend list |
Foe list |
get('privmsgs_sidebar_th_privmsgs'); ?> |
get('privmsgs_folder_inbox'); ?> |
get('privmsgs_folder_outbox'); ?> |
get('privmsgs_folder_sent'); ?> |
get('privmsgs_folder_drafts'); ?> |
get('privmsgs_folder_archive'); ?> |
get('privmsgs_sidebar_th_buddies'); ?> |
get('privmsgs_sidebar_friend_list'); ?> |
get('privmsgs_sidebar_foe_list'); ?> |
Buddy list for '.$session->username.' | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
No buddies in your list. |
' . $lang->get('privmsgs_th_buddy_list', array('username' => htmlspecialchars($session->username))) . ' | ||
---|---|---|
' . $lang->get('privmsgs_msg_no_buddies') . ' | ||
nslist['User'].str_replace(' ', '_', $row['username'])) ? '' : 'class="wikilink-nonexistent" ' ) .'>'.$row['username'].' | Send private message | Remove |
nslist['User'].str_replace(' ', '_', $row['username'])) ? '' : 'class="wikilink-nonexistent" ' ) .'>'.$row['username'].' | ' . $lang->get('privmsgs_btn_buddy_send_pm') . ' | ' . $lang->get('privmsgs_btn_buddy_remove') . ' |
Send a PM to all buddies | ||
' . $lang->get('privmsgs_btn_pm_all_buddies') . ' |
Buddy could not be added: '.mysql_error().'
'; + if(!$q) echo 'Buddy could not be added: '.$db->get_error().'
'; } $db->free_result(); } elseif($argv[1] == 'Remove' && preg_match('#^([0-9]+)$#', $argv[2])) { // Using WHERE user_id prevents users from deleting others' buddies $q = $db->sql_query('DELETE FROM '.table_prefix.'buddies WHERE user_id='.$session->user_id.' AND buddy_id='.$argv[2].';'); $db->free_result(); - if(!$q) echo 'Buddy could not be deleted: '.mysql_error().'
'; + if(!$q) echo 'Buddy could not be deleted: '.$db->get_error().'
'; if(mysql_affected_rows() < 1) echo 'No rows were affected. Either the selected buddy ID does not exist or you tried to delete someone else\'s buddy.
'; } $template->header(); userprefs_show_menu(); ?> -
-
|
-
+
|