You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(193) |
Nov
(393) |
Dec
(347) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(401) |
Feb
(232) |
Mar
(343) |
Apr
(129) |
May
(129) |
Jun
(116) |
Jul
(189) |
Aug
(129) |
Sep
(68) |
Oct
(172) |
Nov
(298) |
Dec
(148) |
| 2003 |
Jan
(264) |
Feb
(210) |
Mar
(322) |
Apr
(309) |
May
(234) |
Jun
(188) |
Jul
(215) |
Aug
(161) |
Sep
(234) |
Oct
(163) |
Nov
(110) |
Dec
(7) |
| 2004 |
Jan
(95) |
Feb
(107) |
Mar
(55) |
Apr
(3) |
May
(49) |
Jun
(35) |
Jul
(57) |
Aug
(43) |
Sep
(56) |
Oct
(40) |
Nov
(25) |
Dec
(21) |
| 2005 |
Jan
(93) |
Feb
(25) |
Mar
(22) |
Apr
(72) |
May
(45) |
Jun
(24) |
Jul
(29) |
Aug
(20) |
Sep
(50) |
Oct
(93) |
Nov
(69) |
Dec
(183) |
| 2006 |
Jan
(185) |
Feb
(143) |
Mar
(402) |
Apr
(260) |
May
(322) |
Jun
(367) |
Jul
(234) |
Aug
(299) |
Sep
(206) |
Oct
(288) |
Nov
(338) |
Dec
(307) |
| 2007 |
Jan
(296) |
Feb
(250) |
Mar
(261) |
Apr
(434) |
May
(539) |
Jun
(274) |
Jul
(440) |
Aug
(190) |
Sep
(128) |
Oct
(249) |
Nov
(86) |
Dec
(51) |
| 2008 |
Jan
(177) |
Feb
(67) |
Mar
(61) |
Apr
(48) |
May
(56) |
Jun
(97) |
Jul
(60) |
Aug
(64) |
Sep
(151) |
Oct
(79) |
Nov
(109) |
Dec
(123) |
| 2009 |
Jan
(70) |
Feb
(70) |
Mar
(73) |
Apr
(80) |
May
(22) |
Jun
(193) |
Jul
(191) |
Aug
(181) |
Sep
(120) |
Oct
(48) |
Nov
(24) |
Dec
|
|
From: Paul S. O. <ps...@us...> - 2002-02-23 17:54:35
|
Update of /cvsroot/phpbb/phpBB2 In directory usw-pr-cvs1:/tmp/cvs-serv23951 Modified Files: posting.php Log Message: Fixed updating of user post count on deletion Index: posting.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/posting.php,v retrieving revision 1.147 retrieving revision 1.148 diff -C2 -r1.147 -r1.148 *** posting.php 20 Feb 2002 17:39:03 -0000 1.147 --- posting.php 23 Feb 2002 17:54:32 -0000 1.148 *************** *** 235,238 **** --- 235,239 ---- $post_data['has_poll'] = ( $post_info['topic_vote'] ) ? true : false; $post_data['topic_type'] = $post_info['topic_type']; + $post_data['poster_id'] = $post_info['poster_id']; if ( $post_data['first_post'] && $post_data['has_poll'] ) |
|
From: Paul S. O. <ps...@us...> - 2002-02-23 17:54:35
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv23951/includes
Modified Files:
post.php
Log Message:
Fixed updating of user post count on deletion
Index: post.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/post.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** post.php 18 Feb 2002 13:44:07 -0000 1.19
--- post.php 23 Feb 2002 17:54:32 -0000 1.20
***************
*** 485,488 ****
--- 485,496 ----
message_die(GENERAL_ERROR, "Error in deleting post", "", __LINE__, __FILE__, $sql);
}
+
+ $sql = "UPDATE " . USERS_TABLE . "
+ SET user_posts = user_posts - 1
+ WHERE user_id = " . $post_data['poster_id'];
+ if ( !($db->sql_query($sql)) )
+ {
+ message_die(GENERAL_ERROR, "Error in deleting post", "", __LINE__, __FILE__, $sql);
+ }
}
|
|
From: Paul S. O. <ps...@us...> - 2002-02-23 17:49:19
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv22517
Modified Files:
privmsg.php
Log Message:
Fix SQL problem bug #520293
Index: privmsg.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/privmsg.php,v
retrieving revision 1.84
retrieving revision 1.85
diff -C2 -r1.84 -r1.85
*** privmsg.php 19 Feb 2002 22:04:29 -0000 1.84
--- privmsg.php 23 Feb 2002 17:49:13 -0000 1.85
***************
*** 699,708 ****
}
! $sql = "UPDATE " . USERS_TABLE . "
! SET user_new_privmsg = user_new_privmsg - 1
! WHERE user_id IN ($update_pm_sql)";
! if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, "Couldn't update users new msg counters", "", __LINE__, __FILE__, $sql);
}
--- 699,711 ----
}
! if ( $update_pm_sql != "" )
{
! $sql = "UPDATE " . USERS_TABLE . "
! SET user_new_privmsg = user_new_privmsg - 1
! WHERE user_id IN ($update_pm_sql)";
! if ( !($result = $db->sql_query($sql)) )
! {
! message_die(GENERAL_ERROR, "Couldn't update users new msg counters", "", __LINE__, __FILE__, $sql);
! }
}
***************
*** 723,732 ****
}
! $sql = "UPDATE " . USERS_TABLE . "
! SET user_unread_privmsg = user_unread_privmsg - 1
! WHERE user_id IN ($update_pm_sql)";
! if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, "Couldn't update users new msg counters", "", __LINE__, __FILE__, $sql);
}
}
--- 726,738 ----
}
! if ( $update_pm_sql != "" )
{
! $sql = "UPDATE " . USERS_TABLE . "
! SET user_unread_privmsg = user_unread_privmsg - 1
! WHERE user_id IN ($update_pm_sql)";
! if ( !($result = $db->sql_query($sql)) )
! {
! message_die(GENERAL_ERROR, "Couldn't update users new msg counters", "", __LINE__, __FILE__, $sql);
! }
}
}
|
|
From: Paul S. O. <ps...@us...> - 2002-02-21 00:03:33
|
Update of /cvsroot/phpbb/phpBB2/language/lang_turkish In directory usw-pr-cvs1:/tmp/cvs-serv26239/language/lang_turkish Modified Files: lang_admin.php lang_main.php Log Message: Should bring Turkish up to RC-3 standard Index: lang_admin.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/language/lang_turkish/lang_admin.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** lang_admin.php 31 Jan 2002 13:42:23 -0000 1.1 --- lang_admin.php 21 Feb 2002 00:03:30 -0000 1.2 *************** *** 4,8 **** * lang_admin.php [Turkish] * ------------------- ! * begin : Sat Dec 16 2000 * copyright : (C) 2001 The phpBB Group * email : su...@ph... --- 4,8 ---- * lang_admin.php [Turkish] * ------------------- ! * begin : Wed Jan 9 2002 * copyright : (C) 2001 The phpBB Group * email : su...@ph... *************** *** 162,166 **** $lang['Forum_ADMIN'] = "Admin"; - $lang['View'] = "Görüntüleme"; $lang['Read'] = "Okuma"; --- 162,165 ---- *************** *** 240,243 **** --- 239,248 ---- $lang['General_settings'] = "Genel Site Ayarlarý"; + $lang['Server_name'] = "Domain"; + $lang['Server_name_explain'] = "Bu forumun olduðu sitenin domain adresi"; + $lang['Script_path'] = "Script pathi"; + $lang['Script_path_explain'] = "Domain adresine göre PhpBB2 scriptlerinin bulundugu path"; + $lang['Server_port'] = "Server Port"; + $lang['Server_port_explain'] = "Serverýnýzýn çalýþýtýgý port, genelde 80'dir, sadece farklýysa deðiþtirin"; $lang['Site_name'] = "Site ismi"; $lang['Site_desc'] = "Site açýklamasý"; *************** *** 304,307 **** --- 309,316 ---- $lang['Use_SMTP_explain'] = "Lokal sendmail fonksiyonu yerine SMTP serverý kullanmak için Evet'i seçin"; $lang['SMTP_server'] = "SMTP Server Adresi"; + $lang['SMTP_username'] = "SMTP Kullanýcý Adý"; + $lang['SMTP_username_explain'] = "Sadece smtp serverýnýz kullanýcý ismi istiyorsa giriniz"; + $lang['SMTP_password'] = "SMTP Þifresi"; + $lang['SMTP_password_explain'] = "Sadece smtp serverýnýz þifre istiyorsa giriniz"; $lang['Disable_privmsg'] = "Özel Mesajlaþma"; *************** *** 312,320 **** $lang['Cookie_settings'] = "Cookie Ayarlarý"; $lang['Cookie_settings_explain'] = "Bu cookie'lerin browerserlara nasýl gönderildiðini ayarlamak içindir. Bir çok durumda bu ilk halinde býrakýlmalýdýr. Bunlarý deðiþtirmeniz gerekiyorsa dikkatli olun, yanlýþ ayarlar kullanýcýlarýn login olmasýný engeller."; - $lang['Cookie_name'] = "Cookie adý"; $lang['Cookie_domain'] = "Cookie domain'i"; $lang['Cookie_path'] = "Cookie path'i"; - $lang['Session_length'] = "Oturum uzunluðu [ saniye ]"; $lang['Cookie_secure'] = "Cookie güvenliði [ https ]"; --- 321,330 ---- $lang['Cookie_settings'] = "Cookie Ayarlarý"; $lang['Cookie_settings_explain'] = "Bu cookie'lerin browerserlara nasýl gönderildiðini ayarlamak içindir. Bir çok durumda bu ilk halinde býrakýlmalýdýr. Bunlarý deðiþtirmeniz gerekiyorsa dikkatli olun, yanlýþ ayarlar kullanýcýlarýn login olmasýný engeller."; $lang['Cookie_domain'] = "Cookie domain'i"; + $lang['Cookie_name'] = "Cookie adý"; $lang['Cookie_path'] = "Cookie path'i"; $lang['Cookie_secure'] = "Cookie güvenliði [ https ]"; + $lang['Cookie_secure_explain'] = "Serverýnýz SSL modunda çalýþýyorsa açýn, aksi halde açmayýn"; + $lang['Session_length'] = "Oturum uzunluðu [ saniye ]"; *************** *** 338,342 **** $lang['No_mode'] = "Hiç mode seçilmedi"; $lang['Forum_edit_delete_explain'] = "Aþaðýdaki form sitenizdeki genel ayarlarý yapmak için kullanýlacaktýr. Kullanýcý ve forum bazlý ayarlar için sol taraftaki ilgili linklere týklayýnýz."; - $lang['Move_contents'] = "Tüm içeriði taþý"; --- 348,351 ---- Index: lang_main.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/language/lang_turkish/lang_main.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** lang_main.php 31 Jan 2002 13:42:23 -0000 1.1 --- lang_main.php 21 Feb 2002 00:03:30 -0000 1.2 *************** *** 123,128 **** $lang['Online_users_total'] = "Toplam <b>%d</b> kullanýcý online :: "; $lang['Online_user_total'] = $lang['Online_users_total']; - $lang['Admin_online_color'] = "%sAdmin%s"; - $lang['Mod_online_color'] = "%sModerator%s"; $lang['Reg_users_zero_total'] = "0 Kayýtlý, "; $lang['Reg_users_total'] = "%d Kayýtlý, "; --- 123,126 ---- *************** *** 136,139 **** --- 134,140 ---- $lang['Record_online_users'] = "Sitede bugüne kadar en çok <b>%s</b> kiþi %s tarihinde online oldu."; // first %s = number of users, second %s is the date. + $lang['Admin_online_color'] = "%sAdmin%s"; + $lang['Mod_online_color'] = "%sModerator%s"; + $lang['You_last_visit'] = "Son ziyaretiniz: %s"; // %s replaced by date/time $lang['Current_time'] = "Forum Saati: %s"; // %s replaced by time *************** *** 291,294 **** --- 292,296 ---- $lang['You_are_watching'] = "Þu anda bu baþlýðý cevaplar için takip ediyorsunuz"; + $lang['Total_votes'] = "Toplam Oylar"; // *************** *** 304,308 **** $lang['Post_topic_as'] = "Mesaj Türü"; $lang['Edit_Post'] = "Mesajý editle"; - $lang['Attach_File'] = "Dosya Ekle"; $lang['Options'] = "Seçenekler"; --- 306,309 ---- *************** *** 331,339 **** $lang['To_many_poll_options'] = "Anket için çok fazla þýk girdiniz"; $lang['Post_has_no_poll'] = "Bu mesajda anket yoktur"; - $lang['Disallowed_extension'] = "%s uzantýlý dosyalar gönderilemez"; // replace %s with extension (e.g. .php) - $lang['Disallowed_Mime_Type'] = "Ýzin verilmeyen dosya türü: %s<p>Ýzin verilen türler:<br>%s"; // mime type, allowed types - $lang['Attachement_too_big'] = "Eklenen dosya çok büyük.<br>Max büyüklük: %d Byte"; // replace %d with maximum file size - $lang['General_Upload_Error'] = "Upload Hatasý: %s : buraya upload yapýlamadý"; // replace %s with local path - $lang['Add_poll'] = "Anket Ekle"; --- 332,335 ---- *************** *** 528,532 **** $lang['No_user_id_specified'] = "Üzgünüz, böyle bir kullanýcý yok"; $lang['Wrong_Profile'] = "Kendinizin olmayan bir profili deðiþtiremezsiniz"; ! $lang['Sorry_banned_or_taken_email'] = "Üzgünüz, verdiðiniz e-mail adresi ya baþka bir kullanýcý tarafýndan verilmiþ, ya yasaklanmýþ ya da yanlýþ. Baþka bir adres deneyiniz, o da yasaklanmýþsa site admini ile görüþünüz"; $lang['Only_one_avatar'] = "Sadece bir tip avatar seçilebilir"; $lang['File_no_data'] = "Verdiðiniz URL'deki dosya bilgi içermiyor"; --- 524,528 ---- $lang['No_user_id_specified'] = "Üzgünüz, böyle bir kullanýcý yok"; $lang['Wrong_Profile'] = "Kendinizin olmayan bir profili deðiþtiremezsiniz"; ! $lang['Only_one_avatar'] = "Sadece bir tip avatar seçilebilir"; $lang['File_no_data'] = "Verdiðiniz URL'deki dosya bilgi içermiyor"; *************** *** 562,566 **** $lang['Avatar'] = "Avatar"; $lang['Avatar_explain'] = "Mesajlarýnýzýn yanýndaki küçük resim. Bir seferde sadece bir resim gösterilebilir, geniþliði %d pixelden, yüksekliði %d pixelden ve boyutu %dkB'tan büyük olamaz."; - $lang['Upload_Avatar_file'] = "Kendi bilgisayarýnýzdan Avatar gönderin"; $lang['Upload_Avatar_URL'] = "Bir URL'den Avatar gönderin"; $lang['Upload_Avatar_URL_explain'] = "Avatar'ýn olduðu sitenin URL'sini girin, buraya kopyalanacaktýr"; --- 558,561 ---- *************** *** 589,594 **** $lang['Password_mismatch'] = "Girdiðiniz þifreler birbirini tutmuyor"; $lang['Current_password_mismatch'] = "Girdiðiniz þifre þu andaki þifrenizi tutmuyor"; - $lang['Invalid_username'] = "Girdiðiniz kullanýcý adý yasaklanmýþ ya da daha önceden alýnmýþ, veya \" gibi geçersiz karakterler içeriyor"; - $lang['Password_long'] = "Þifreniz 32 karakterden uzun olamaz"; $lang['Username_taken'] = "Üzgünüz bu kullanýcý ismi daha önce alýnmýþ"; --- 584,587 ---- *************** *** 735,740 **** $lang['Search_options'] = "Arama Seçenekleri"; - $lang['Search_title_msg'] = "Baþlýk ve mesaj metninde ara"; - $lang['Search_msg_only'] = "Sadece mesaj metninde ara"; $lang['Search_keywords'] = "Anahtar Kelimeleri Ara"; $lang['Search_keywords_explain'] = "<u>AND</u> ile sonuçlarda bulunmasý zorunlu kelimeleri, <u>OR</u> ile sonuçlarda olabilecek kelimeleri ve <u>NOT</u> ile sonuçta olmamasý gereken kelimeleri tanýmlayabilirsiniz. * iþareti ile kelimenin bir bölümünü girip gerisinin bulunmasýný saðlayabilirsiniz"; --- 728,731 ---- *************** *** 744,747 **** --- 735,740 ---- $lang['Search_for_any'] = "Herhangi bir terim için ara ya da girilen önermeyi kullan"; $lang['Search_for_all'] = "Bütün terimler için ara"; + $lang['Search_title_msg'] = "Baþlýk ve mesaj metninde ara"; + $lang['Search_msg_only'] = "Sadece mesaj metninde ara"; $lang['Return_first'] = "Mesajýn ilk"; // followed by xxx characters in a select box *************** *** 996,1007 **** // That's all Folks! // ------------------------------------------------- - - - $lang['Who_Is_Chatting_Heading'] = "Kimler Chatte"; - $lang['How_Many_Chatters'] = "Þu anda chatte <B>%d</B> kiþi var"; - $lang['Who_Are_Chatting' ] = "Chatteki kullanýcýlar: <B>%s</B>"; - $lang['Misc_Info'] = "Misc. Info"; - $lang['Chat_Title'] = "Chat"; - $lang['Stats'] = "Ýstatistikler"; ?> --- 989,992 ---- |
|
From: Paul S. O. <ps...@us...> - 2002-02-20 17:39:06
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv16676
Modified Files:
posting.php
Log Message:
Fix my hilariously dumb mistake in posting allowing unauthed users to post ...
Index: posting.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/posting.php,v
retrieving revision 1.146
retrieving revision 1.147
diff -C2 -r1.146 -r1.147
*** posting.php 18 Feb 2002 12:41:06 -0000 1.146
--- posting.php 20 Feb 2002 17:39:03 -0000 1.147
***************
*** 335,338 ****
--- 335,339 ----
header("Location: " . append_sid("login.$phpEx?redirect=posting.$phpEx&" . $redirect, true));
+ exit;
}
***************
*** 766,769 ****
--- 767,774 ----
$mode = 'reply';
+ }
+ else
+ {
+ $username = ( $post_info['user_id'] == ANONYMOUS && !empty($post_info['post_username']) ) ? $post_info['post_username'] : "";
}
}
|
|
From: Paul S. O. <ps...@us...> - 2002-02-20 02:48:52
|
Update of /cvsroot/phpbb/phpBB2/templates/subSilver
In directory usw-pr-cvs1:/tmp/cvs-serv28842/templates/subSilver
Modified Files:
search_username.tpl
Log Message:
focus on select
Index: search_username.tpl
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/templates/subSilver/search_username.tpl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** search_username.tpl 21 Oct 2001 01:53:48 -0000 1.2
--- search_username.tpl 20 Feb 2002 02:48:49 -0000 1.3
***************
*** 5,8 ****
--- 5,9 ----
{
opener.document.forms['post'].username.value = selected_username;
+ opener.focus();
}
//-->
|
|
From: Paul S. O. <ps...@us...> - 2002-02-19 22:09:11
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv22539
Modified Files:
viewforum.php
Log Message:
Fix bug #520039, moved topics with wrong goto page links
Index: viewforum.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/viewforum.php,v
retrieving revision 1.130
retrieving revision 1.131
diff -C2 -r1.130 -r1.131
*** viewforum.php 15 Feb 2002 19:58:15 -0000 1.130
--- viewforum.php 19 Feb 2002 22:09:08 -0000 1.131
***************
*** 444,449 ****
--- 444,453 ----
for($i = 0; $i < $total_topics; $i++)
{
+ $topic_id = $topic_rowset[$i]['topic_id'];
+
$topic_title = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $topic_rowset[$i]['topic_title']) : $topic_rowset[$i]['topic_title'];
+ $replies = $topic_rowset[$i]['topic_replies'];
+
$topic_type = $topic_rowset[$i]['topic_type'];
***************
*** 466,501 ****
}
- $topic_id = $topic_rowset[$i]['topic_id'];
-
- $replies = $topic_rowset[$i]['topic_replies'];
-
- if( ( $replies + 1 ) > $board_config['posts_per_page'] )
- {
- $total_pages = ceil(($replies+1)/$board_config['posts_per_page']);
- $goto_page = ' [ <img src="' . $images['icon_gotopost'] . '" alt="' . $lang['Goto_page'] . '" title="' . $lang['Goto_page'] . '" />' . $lang['Goto_page'] . ': ';
-
- $times = 1;
- for($j = 0; $j < $replies + 1; $j += $board_config['posts_per_page'])
- {
- $goto_page .= '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=" . $topic_id . "&start=$j") . '">' . $times . '</a>';
- if( $times == 1 && $total_pages > 4 )
- {
- $goto_page .= ' ... ';
- $times = $total_pages - 3;
- $j += ( $total_pages - 4 ) * $board_config['posts_per_page'];
- }
- else if ( $times < $total_pages )
- {
- $goto_page .= ', ';
- }
- $times++;
- }
- $goto_page .= ' ] ';
- }
- else
- {
- $goto_page = '';
- }
-
if( $topic_rowset[$i]['topic_status'] == TOPIC_MOVED )
{
--- 470,473 ----
***************
*** 604,607 ****
--- 576,607 ----
$newest_post_img = '';
}
+ }
+
+ if( ( $replies + 1 ) > $board_config['posts_per_page'] )
+ {
+ $total_pages = ceil(($replies+1)/$board_config['posts_per_page']);
+ $goto_page = ' [ <img src="' . $images['icon_gotopost'] . '" alt="' . $lang['Goto_page'] . '" title="' . $lang['Goto_page'] . '" />' . $lang['Goto_page'] . ': ';
+
+ $times = 1;
+ for($j = 0; $j < $replies + 1; $j += $board_config['posts_per_page'])
+ {
+ $goto_page .= '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=" . $topic_id . "&start=$j") . '">' . $times . '</a>';
+ if( $times == 1 && $total_pages > 4 )
+ {
+ $goto_page .= ' ... ';
+ $times = $total_pages - 3;
+ $j += ( $total_pages - 4 ) * $board_config['posts_per_page'];
+ }
+ else if ( $times < $total_pages )
+ {
+ $goto_page .= ', ';
+ }
+ $times++;
+ }
+ $goto_page .= ' ] ';
+ }
+ else
+ {
+ $goto_page = '';
}
|
|
From: Paul S. O. <ps...@us...> - 2002-02-19 22:04:32
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv21137
Modified Files:
privmsg.php
Log Message:
Fix bug #520171, ICQ image missing
Index: privmsg.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/privmsg.php,v
retrieving revision 1.83
retrieving revision 1.84
diff -C2 -r1.83 -r1.84
*** privmsg.php 19 Feb 2002 13:07:55 -0000 1.83
--- privmsg.php 19 Feb 2002 22:04:29 -0000 1.84
***************
*** 468,475 ****
$www_img = ( $privmsg['user_website']) ? '<a href="' .$privmsg['user_website'] . '" target="_userwww"><img src="' .$images['icon_www'] . '" alt="' .$lang['Visit_website'] . '" border="0" /></a>' : '';
! if( $privmsg['user_icq'] )
{
! $icq_status_img = '<a href="http://wwp.icq.com/"' . $privmsg['user_icq'] . '"#pager"><img src="http://web.icq.com/whitepages/online?icq="' . $privmsg['user_icq'] . '"&img=5" width="18" height="18" border="0" /></a>';
! $icq_add_img = '<a href="http://wwp.icq.com/scripts/search.dll?to="' . $privmsg['user_icq'] . '"><img src="' .$images['icon_icq'] . '" alt="' .$lang['ICQ'] . '" border="0" /></a>';
}
else
--- 468,475 ----
$www_img = ( $privmsg['user_website']) ? '<a href="' .$privmsg['user_website'] . '" target="_userwww"><img src="' .$images['icon_www'] . '" alt="' .$lang['Visit_website'] . '" border="0" /></a>' : '';
! if( !empty($privmsg['user_icq']) )
{
! $icq_status_img = '<a href="http://wwp.icq.com/' . $privmsg['user_icq'] . '#pager"><img src="http://web.icq.com/whitepages/online?icq=' . $privmsg['user_icq'] . '&img=5" width="18" height="18" border="0" /></a>';
! $icq_add_img = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $privmsg['user_icq'] . '"><img src="' . $images['icon_icq'] . '" alt="' . $lang['ICQ'] . '" title="' . $lang['ICQ'] . '" border="0" /></a>';
}
else
***************
*** 479,487 ****
}
! $aim_img = ($privmsg['user_aim']) ? "<a href=\"aim:goim?screenname=" . $privmsg['user_aim'] . "&message=Hello+Are+you+there?\"><img src=\"" . $images['icon_aim'] . "\" border=\"0\" alt=\"" . $lang['AIM'] . "\" /></a>" : "";
! $msn_img = ($privmsg['user_msnm']) ? "<a href=\"profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id_from\"><img src=\"" . $images['icon_msnm'] . "\" border=\"0\" alt=\"" . $lang['MSNM'] . "\" /></a>" : "";
! $yim_img = ($privmsg['user_yim']) ? "<a href=\"http://edit.yahoo.com/config/send_webmesg?.target=" . $privmsg['user_yim'] . "&.src=pg\"><img src=\"" . $images['icon_yim'] . "\" border=\"0\" alt=\"" . $lang['YIM'] . "\" /></a>" : "";
$search_img = "<a href=\"" . append_sid("search.$phpEx?search_author=" . urlencode($username_from) . "&showresults=topics") . "\"><img src=\"" . $images['icon_search'] . "\" border=\"0\" /></a>";
--- 479,487 ----
}
! $aim_img = ( $privmsg['user_aim'] ) ? "<a href=\"aim:goim?screenname=" . $privmsg['user_aim'] . "&message=Hello+Are+you+there?\"><img src=\"" . $images['icon_aim'] . "\" border=\"0\" alt=\"" . $lang['AIM'] . "\" /></a>" : "";
! $msn_img = ( $privmsg['user_msnm'] ) ? "<a href=\"profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id_from\"><img src=\"" . $images['icon_msnm'] . "\" border=\"0\" alt=\"" . $lang['MSNM'] . "\" /></a>" : "";
! $yim_img = ( $privmsg['user_yim'] ) ? "<a href=\"http://edit.yahoo.com/config/send_webmesg?.target=" . $privmsg['user_yim'] . "&.src=pg\"><img src=\"" . $images['icon_yim'] . "\" border=\"0\" alt=\"" . $lang['YIM'] . "\" /></a>" : "";
$search_img = "<a href=\"" . append_sid("search.$phpEx?search_author=" . urlencode($username_from) . "&showresults=topics") . "\"><img src=\"" . $images['icon_search'] . "\" border=\"0\" /></a>";
|
|
From: Jonathan H. <the...@us...> - 2002-02-19 16:30:06
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv32009
Modified Files:
profile.php
Log Message:
Fix for bug #518972 Remote Avatar URI's with Port numbers
Index: profile.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/profile.php,v
retrieving revision 1.181
retrieving revision 1.182
diff -C2 -r1.181 -r1.182
*** profile.php 18 Feb 2002 21:29:55 -0000 1.181
--- profile.php 19 Feb 2002 16:30:03 -0000 1.182
***************
*** 1005,1009 ****
}
! if( preg_match("#^(http:\/\/[a-z0-9\-]+?\.([a-z0-9\-]+\.)*[a-z]+\/.*?\.(gif|jpg|jpeg|png)$)#is", $user_avatar_remoteurl) )
{
$avatar_sql = ", user_avatar = '" . str_replace("\'", "''", $user_avatar_remoteurl) . "', user_avatar_type = " . USER_AVATAR_REMOTE;
--- 1005,1009 ----
}
! if( preg_match("#^(http:\/\/[a-z0-9\-]+?\.([a-z0-9\-]+\.)*[a-z]+(:[0-9]+)*\/.*?\.(gif|jpg|jpeg|png)$)#is", $user_avatar_remoteurl) )
{
$avatar_sql = ", user_avatar = '" . str_replace("\'", "''", $user_avatar_remoteurl) . "', user_avatar_type = " . USER_AVATAR_REMOTE;
***************
*** 2037,2039 ****
}
! ?>
\ No newline at end of file
--- 2037,2039 ----
}
! ?>
|
|
From: Jonathan H. <the...@us...> - 2002-02-19 16:06:28
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv19100
Modified Files:
groupcp.php
Log Message:
Fix for minor cosmetic bug # 519992
Index: groupcp.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/groupcp.php,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -r1.47 -r1.48
*** groupcp.php 18 Feb 2002 21:29:55 -0000 1.47
--- groupcp.php 19 Feb 2002 16:06:25 -0000 1.48
***************
*** 921,928 ****
);
}
!
$template->assign_vars(array(
"PAGINATION" => generate_pagination("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id", $members_count, $board_config['topics_per_page'], $start),
! "PAGE_NUMBER" => sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), ceil( $members_count / $board_config['topics_per_page'] )),
"L_GOTO_PAGE" => $lang['Goto_page'])
--- 921,928 ----
);
}
! $current_page = ( !$members_count ) ? '1' : ceil( $members_count / $board_config['topics_per_page'] );
$template->assign_vars(array(
"PAGINATION" => generate_pagination("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id", $members_count, $board_config['topics_per_page'], $start),
! "PAGE_NUMBER" => sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), $current_page ),
"L_GOTO_PAGE" => $lang['Goto_page'])
|
|
From: Paul S. O. <ps...@us...> - 2002-02-19 13:27:29
|
Update of /cvsroot/phpbb/phpBB2/admin
In directory usw-pr-cvs1:/tmp/cvs-serv32582/admin
Modified Files:
index.php
Log Message:
Fix bug #519756 as suggested by tamc
Index: index.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/admin/index.php,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -r1.36 -r1.37
*** index.php 13 Feb 2002 00:03:18 -0000 1.36
--- index.php 19 Feb 2002 13:27:25 -0000 1.37
***************
*** 272,276 ****
else if( preg_match("/^mssql/", SQL_LAYER) )
{
! $sql = "SELECT ((SUM(size) * 8) * 1024) as dbsize
FROM sysfiles";
if( $result = $db->sql_query($sql) )
--- 272,276 ----
else if( preg_match("/^mssql/", SQL_LAYER) )
{
! $sql = "SELECT ((SUM(size) * 8.0) * 1024.0) as dbsize
FROM sysfiles";
if( $result = $db->sql_query($sql) )
|
|
From: Paul S. O. <ps...@us...> - 2002-02-19 13:07:59
|
Update of /cvsroot/phpbb/phpBB2 In directory usw-pr-cvs1:/tmp/cvs-serv28055 Modified Files: privmsg.php Log Message: Fix SQL bug #519941 Index: privmsg.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/privmsg.php,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -r1.82 -r1.83 *** privmsg.php 18 Feb 2002 12:34:15 -0000 1.82 --- privmsg.php 19 Feb 2002 13:07:55 -0000 1.83 *************** *** 1761,1765 **** $sql .= "WHERE pm.privmsgs_from_userid = " . $userdata['user_id'] . " AND u.user_id = pm.privmsgs_to_userid ! AND pm.privmsgs_type = " . PRIVMSGS_NEW_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )"; break; --- 1761,1765 ---- $sql .= "WHERE pm.privmsgs_from_userid = " . $userdata['user_id'] . " AND u.user_id = pm.privmsgs_to_userid ! AND ( pm.privmsgs_type = " . PRIVMSGS_NEW_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )"; break; |
|
From: Bart v. B. <ba...@us...> - 2002-02-19 09:21:45
|
Update of /cvsroot/phpbb/phpBB2/templates/subSilver/admin
In directory usw-pr-cvs1:/tmp/cvs-serv5032
Modified Files:
board_config_body.tpl
Log Message:
Removed datefield length restriction (#519590)
Index: board_config_body.tpl
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/templates/subSilver/admin/board_config_body.tpl,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** board_config_body.tpl 15 Feb 2002 15:45:07 -0000 1.16
--- board_config_body.tpl 19 Feb 2002 09:21:40 -0000 1.17
***************
*** 70,74 ****
<tr>
<td class="row1">{L_DATE_FORMAT}<br /><span class="gensmall">{L_DATE_FORMAT_EXPLAIN}</span></td>
! <td class="row2"><input type="text" maxlength="16" name="default_dateformat" value="{DEFAULT_DATEFORMAT}" /></td>
</tr>
<tr>
--- 70,74 ----
<tr>
<td class="row1">{L_DATE_FORMAT}<br /><span class="gensmall">{L_DATE_FORMAT_EXPLAIN}</span></td>
! <td class="row2"><input type="text" name="default_dateformat" value="{DEFAULT_DATEFORMAT}" /></td>
</tr>
<tr>
|
|
From: Paul S. O. <ps...@us...> - 2002-02-18 21:29:59
|
Update of /cvsroot/phpbb/phpBB2 In directory usw-pr-cvs1:/tmp/cvs-serv24995 Modified Files: groupcp.php profile.php Log Message: Couple of var names switched around in email URI Index: groupcp.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/groupcp.php,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -r1.46 -r1.47 *** groupcp.php 18 Feb 2002 12:34:38 -0000 1.46 --- groupcp.php 18 Feb 2002 21:29:55 -0000 1.47 *************** *** 40,44 **** $server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/'; ! $server_url = $server_protocol . $script_name . $server_name . $server_port; if( isset($HTTP_GET_VARS[POST_GROUPS_URL]) || isset($HTTP_POST_VARS[POST_GROUPS_URL]) ) --- 40,44 ---- $server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/'; ! $server_url = $server_protocol . $server_name . $server_port . $script_name; if( isset($HTTP_GET_VARS[POST_GROUPS_URL]) || isset($HTTP_POST_VARS[POST_GROUPS_URL]) ) Index: profile.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/profile.php,v retrieving revision 1.180 retrieving revision 1.181 diff -C2 -r1.180 -r1.181 *** profile.php 18 Feb 2002 12:34:15 -0000 1.180 --- profile.php 18 Feb 2002 21:29:55 -0000 1.181 *************** *** 45,49 **** $server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/'; ! $server_url = $server_protocol . $script_name . $server_name . $server_port; // ----------------------- --- 45,49 ---- $server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/'; ! $server_url = $server_protocol . $server_name . $server_port . $script_name; // ----------------------- |
|
From: Paul S. O. <ps...@us...> - 2002-02-18 15:06:20
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv6290/includes
Modified Files:
search.php
Log Message:
Wasn't updating search match table ... fudged solution
Index: search.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/search.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** search.php 15 Feb 2002 21:59:01 -0000 1.10
--- search.php 18 Feb 2002 15:06:15 -0000 1.11
***************
*** 116,121 ****
--- 116,123 ----
$word = array();
+ $word_insert_sql = array();
while( list($word_in, $search_matches) = @each($search_raw_words) )
{
+ $word_insert_sql[$word_in] = "";
if( !empty($search_matches) )
{
***************
*** 126,130 ****
if( $search_matches[$i] != "" )
{
! $word[] = $search_matches[$i];
}
}
--- 128,136 ----
if( $search_matches[$i] != "" )
{
! $word[] = $search_matches[$i];
! if ( !strstr($word_insert_sql[$word_in], "'" . $search_matches[$i] . "'") )
! {
! $word_insert_sql[$word_in] .= ( $word_insert_sql[$word_in] != "" ) ? ", '" . $search_matches[$i] . "'" : "'" . $search_matches[$i] . "'";
! }
}
}
***************
*** 157,161 ****
case 'oracle':
case 'db2':
! $sql = "SELECT word_id, word_text, word_common
FROM " . SEARCH_WORD_TABLE . "
WHERE word_text IN ($word_text_sql)";
--- 163,167 ----
case 'oracle':
case 'db2':
! $sql = "SELECT word_id, word_text
FROM " . SEARCH_WORD_TABLE . "
WHERE word_text IN ($word_text_sql)";
***************
*** 167,171 ****
while( $row = $db->sql_fetchrow($result) )
{
! $check_words[$row['word_text']] = $row['word_common'];
}
break;
--- 173,177 ----
while( $row = $db->sql_fetchrow($result) )
{
! $check_words[$row['word_text']] = $row['word_id'];
}
break;
***************
*** 229,243 ****
}
! while( list($word_in, $match_sql) = @each($word_text_sql) )
{
$title_match = ( $word_in == 'title' ) ? 1 : 0;
! $sql = "INSERT INTO " . SEARCH_MATCH_TABLE . " (post_id, word_id, title_match)
! SELECT $post_id, word_id, $title_match
! FROM " . SEARCH_WORD_TABLE . "
! WHERE word_text IN ($match_sql)";
! if( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, "Couldn't insert new word matches", "", __LINE__, __FILE__, $sql);
}
}
--- 235,252 ----
}
! while( list($word_in, $match_sql) = @each($word_insert_sql) )
{
$title_match = ( $word_in == 'title' ) ? 1 : 0;
! if ( $match_sql != "" )
{
! $sql = "INSERT INTO " . SEARCH_MATCH_TABLE . " (post_id, word_id, title_match)
! SELECT $post_id, word_id, $title_match
! FROM " . SEARCH_WORD_TABLE . "
! WHERE word_text IN ($match_sql)";
! if( !($result = $db->sql_query($sql)) )
! {
! message_die(GENERAL_ERROR, "Couldn't insert new word matches", "", __LINE__, __FILE__, $sql);
! }
}
}
|
|
From: Paul S. O. <ps...@us...> - 2002-02-18 13:44:12
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv28632/includes
Modified Files:
post.php
Log Message:
test after test after test after test and yet these things still appear ...
Index: post.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/post.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** post.php 18 Feb 2002 13:13:12 -0000 1.18
--- post.php 18 Feb 2002 13:44:07 -0000 1.19
***************
*** 556,563 ****
$current_time = time();
! if ( ( $mode == "newtopic" && !$notify_user ) || $mode == "delete" )
{
$delete_sql = ( !$post_data['first_post'] && !$post_data['last_post'] ) ? " AND user_id = " . $userdata['user_id'] : "";
! $sql = ( $mode == "newtopic" ) ? "INSERT INTO " . TOPICS_WATCH_TABLE . " (user_id, topic_id, notify_status) VALUES (" . $userdata['user_id'] . ", $topic_id, 0)" : "DELETE FROM " . TOPICS_WATCH_TABLE . " WHERE topic_id = $topic_id" . $delete_sql;
if ( !($result = $db->sql_query($sql)) )
{
--- 556,563 ----
$current_time = time();
! if ( $mode == "delete" )
{
$delete_sql = ( !$post_data['first_post'] && !$post_data['last_post'] ) ? " AND user_id = " . $userdata['user_id'] : "";
! $sql = "DELETE FROM " . TOPICS_WATCH_TABLE . " WHERE topic_id = $topic_id" . $delete_sql;
if ( !($result = $db->sql_query($sql)) )
{
|
|
From: Paul S. O. <ps...@us...> - 2002-02-18 13:13:15
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv20463/includes
Modified Files:
post.php
Log Message:
this is getting very very very very boring ...
Index: post.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/post.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** post.php 18 Feb 2002 13:10:49 -0000 1.17
--- post.php 18 Feb 2002 13:13:12 -0000 1.18
***************
*** 570,574 ****
{
$sql = "SELECT ban_userid
! FROM " . BANLIST_TABLE . ";
if ( !($result = $db->sql_query($sql)) )
{
--- 570,574 ----
{
$sql = "SELECT ban_userid
! FROM " . BANLIST_TABLE;
if ( !($result = $db->sql_query($sql)) )
{
***************
*** 579,583 ****
while ( $row = $db->sql_fetchrow($result) )
{
! if ( isset($row['ban_user_id']) )
{
$user_id_sql = ", " . $row['ban_userid'];
--- 579,583 ----
while ( $row = $db->sql_fetchrow($result) )
{
! if ( isset($row['ban_userid']) )
{
$user_id_sql = ", " . $row['ban_userid'];
|
|
From: Paul S. O. <ps...@us...> - 2002-02-18 13:10:52
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv19785/includes
Modified Files:
post.php
Log Message:
sigh ....
Index: post.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/post.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** post.php 18 Feb 2002 12:34:16 -0000 1.16
--- post.php 18 Feb 2002 13:10:49 -0000 1.17
***************
*** 570,574 ****
{
$sql = "SELECT ban_userid
! FROM " . BANLIST_TABLE;
if ( !($result = $db->sql_query($sql)) )
{
--- 570,574 ----
{
$sql = "SELECT ban_userid
! FROM " . BANLIST_TABLE . ";
if ( !($result = $db->sql_query($sql)) )
{
***************
*** 579,583 ****
while ( $row = $db->sql_fetchrow($result) )
{
! $user_id_sql = ", " . $row['ban_userid'];
}
--- 579,586 ----
while ( $row = $db->sql_fetchrow($result) )
{
! if ( isset($row['ban_user_id']) )
! {
! $user_id_sql = ", " . $row['ban_userid'];
! }
}
|
|
From: Paul S. O. <ps...@us...> - 2002-02-18 12:49:11
|
Update of /cvsroot/phpbb/phpBB2/templates/subSilver
In directory usw-pr-cvs1:/tmp/cvs-serv11777/templates/subSilver
Modified Files:
posting_body.tpl posting_poll_body.tpl
Log Message:
Changes to submit button name + other fixes
Index: posting_body.tpl
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/templates/subSilver/posting_body.tpl,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** posting_body.tpl 12 Feb 2002 16:06:45 -0000 1.24
--- posting_body.tpl 18 Feb 2002 12:49:08 -0000 1.25
***************
*** 434,438 ****
{POLLBOX}
<tr>
! <td class="catBottom" colspan="2" align="center" height="28"> {S_HIDDEN_FORM_FIELDS}<input type="submit" tabindex="5" name="preview" class="mainoption" value="{L_PREVIEW}" /> <input type="submit" accesskey="s" tabindex="6" name="submit" class="mainoption" value="{L_SUBMIT}" /></td>
</tr>
</table>
--- 434,438 ----
{POLLBOX}
<tr>
! <td class="catBottom" colspan="2" align="center" height="28"> {S_HIDDEN_FORM_FIELDS}<input type="submit" tabindex="5" name="preview" class="mainoption" value="{L_PREVIEW}" /> <input type="submit" accesskey="s" tabindex="6" name="post" class="mainoption" value="{L_SUBMIT}" /></td>
</tr>
</table>
Index: posting_poll_body.tpl
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/templates/subSilver/posting_poll_body.tpl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** posting_poll_body.tpl 9 Oct 2001 13:37:21 -0000 1.2
--- posting_poll_body.tpl 18 Feb 2002 12:49:08 -0000 1.3
***************
*** 13,26 ****
<tr>
<td class="row1"><span class="gen"><b>{L_POLL_OPTION}</b></span></td>
! <td class="row2"><span class="genmed"><input type="text" name="poll_option_text[{poll_option_rows.S_POLL_OPTION_NUM}]" size="50" class="post" maxlength="255" value="{poll_option_rows.POLL_OPTION}" /></span> <input type="submit" name="edit_poll_option[{poll_option_rows.S_POLL_OPTION_NUM}]" value="{L_UPDATE_OPTION}" class="liteoption" />
! <input type="submit" name="del_poll_option[{poll_option_rows.S_POLL_OPTION_NUM}]" value="{L_DELETE_OPTION}" class="liteoption" />
! </td>
</tr>
<!-- END poll_option_rows -->
<tr>
<td class="row1"><span class="gen"><b>{L_POLL_OPTION}</b></span></td>
! <td class="row2"><span class="genmed"><input type="text" name="add_poll_option_text" size="50" maxlength="255" class="post" value="{ADD_POLL_OPTION}" /></span>
! <input type="submit" name="add_poll_option" value="{L_ADD_OPTION}" class="liteoption" />
! </td>
</tr>
<tr>
--- 13,22 ----
<tr>
<td class="row1"><span class="gen"><b>{L_POLL_OPTION}</b></span></td>
! <td class="row2"><span class="genmed"><input type="text" name="poll_option_text[{poll_option_rows.S_POLL_OPTION_NUM}]" size="50" class="post" maxlength="255" value="{poll_option_rows.POLL_OPTION}" /></span> <input type="submit" name="edit_poll_option" value="{L_UPDATE_OPTION}" class="liteoption" /> <input type="submit" name="del_poll_option[{poll_option_rows.S_POLL_OPTION_NUM}]" value="{L_DELETE_OPTION}" class="liteoption" /></td>
</tr>
<!-- END poll_option_rows -->
<tr>
<td class="row1"><span class="gen"><b>{L_POLL_OPTION}</b></span></td>
! <td class="row2"><span class="genmed"><input type="text" name="add_poll_option_text" size="50" maxlength="255" class="post" value="{ADD_POLL_OPTION}" /></span> <input type="submit" name="add_poll_option" value="{L_ADD_OPTION}" class="liteoption" /></td>
</tr>
<tr>
|
|
From: Paul S. O. <ps...@us...> - 2002-02-18 12:46:50
|
Update of /cvsroot/phpbb/phpBB2/develop
In directory usw-pr-cvs1:/tmp/cvs-serv10644/develop
Added Files:
insert_server_info.php
Log Message:
You MUST run this if you haven't run update_to_RC3 in recent days ... it adds ESSENTIAL variables which, if missing, will prevent emails from containing correct URLs
--- NEW FILE ---
<?php
//
// Security message:
//
// This script is potentially dangerous.
// Remove or comment the next line (die(".... ) to enable this script.
// Do NOT FORGET to either remove this script or disable it after you have used it.
//
die("Please read the first lines of this script for instructions on how to enable it");
//
// Do not change anything below this line.
//
$phpbb_root_path = "../";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
echo "Inserting new config vars<br /><br />\n";
echo "server_name :: ";
flush();
$sql = "INSERT INTO " . CONFIG_TABLE . "
(config_name, config_value) VALUES ('server_name', 'www.myserver.tld')";
if( !$db->sql_query($sql) )
{
print "Failed inserting server_name config ... probably exists already<br />\n";
}
else
{
echo "DONE<br />\n";
}
echo "script_path :: ";
flush();
$sql = "INSERT INTO " . CONFIG_TABLE . "
(config_name, config_value) VALUES ('script_path', '/phpBB2/')";
if( !$db->sql_query($sql) )
{
print "Failed inserting script_path config ... probably exists already<br />\n";
}
else
{
echo "DONE<br />\n";
}
echo "server_port :: ";
flush();
$sql = "INSERT INTO " . CONFIG_TABLE . "
(config_name, config_value) VALUES ('server_port', '80')";
if( !$db->sql_query($sql) )
{
print "Failed inserting server_port config ... probably exists already<br />\n";
}
else
{
echo "DONE<br />\n";
}
$db->sql_close();
echo "<br />COMPLETE<br />\n";
?>
|
|
From: Paul S. O. <ps...@us...> - 2002-02-18 12:41:09
|
Update of /cvsroot/phpbb/phpBB2 In directory usw-pr-cvs1:/tmp/cvs-serv7839 Modified Files: posting.php Log Message: There always has to be at least one bug doesn't there ... why is that? Index: posting.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/posting.php,v retrieving revision 1.145 retrieving revision 1.146 diff -C2 -r1.145 -r1.146 *** posting.php 18 Feb 2002 12:34:15 -0000 1.145 --- posting.php 18 Feb 2002 12:41:06 -0000 1.146 *************** *** 50,54 **** // Set topic type // ! $topic_type = ( !empty($HTTP_POST_VARS['topictype']) ) ? $HTTP_POST_VARS['topictype'] : POST_ANNOUNCE; // --- 50,54 ---- // Set topic type // ! $topic_type = ( !empty($HTTP_POST_VARS['topictype']) ) ? $HTTP_POST_VARS['topictype'] : POST_NORMAL; // |
|
From: Paul S. O. <ps...@us...> - 2002-02-18 12:34:41
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv5406
Modified Files:
groupcp.php
Log Message:
Somewhat overhauled posting, fixed various bugs, completed new way of handling URIs in emails, blah blah
Index: groupcp.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/groupcp.php,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -r1.45 -r1.46
*** groupcp.php 17 Feb 2002 17:02:03 -0000 1.45
--- groupcp.php 18 Feb 2002 12:34:38 -0000 1.46
***************
*** 34,37 ****
--- 34,45 ----
//
+ $script_name = preg_replace("/^\/?(.*?)\/?$/", "\\1", trim($board_config['script_path']));
+ $script_name = ( $script_name != '' ) ? $script_name . '/groupcp.'.$phpEx : 'groupcp.'.$phpEx;
+ $server_name = trim($board_config['server_name']);
+ $server_protocol = ( $board_config['cookie_secure'] ) ? "https://" : "http://";
+ $server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/';
+
+ $server_url = $server_protocol . $script_name . $server_name . $server_port;
+
if( isset($HTTP_GET_VARS[POST_GROUPS_URL]) || isset($HTTP_POST_VARS[POST_GROUPS_URL]) )
{
***************
*** 198,202 ****
"EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']),
! "U_GROUPCP" => $script_url . "?" . POST_GROUPS_URL . "=$group_id&validate=true")
);
$emailer->send();
--- 206,210 ----
"EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']),
! "U_GROUPCP" => $server_url . "?" . POST_GROUPS_URL . "=$group_id&validate=true")
);
$emailer->send();
***************
*** 404,408 ****
"EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']),
! "U_GROUPCP" => $script_url . "?" . POST_GROUPS_URL . "=$group_id")
);
$emailer->send();
--- 412,416 ----
"EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']),
! "U_GROUPCP" => $server_url . "?" . POST_GROUPS_URL . "=$group_id")
);
$emailer->send();
***************
*** 510,514 ****
"EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']),
! "U_GROUPCP" => $script_url . "?" . POST_GROUPS_URL . "=$group_id")
);
$emailer->send();
--- 518,522 ----
"EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']),
! "U_GROUPCP" => $server_url . "?" . POST_GROUPS_URL . "=$group_id")
);
$emailer->send();
|
|
From: Paul S. O. <ps...@us...> - 2002-02-18 12:34:19
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv5245
Modified Files:
common.php posting.php privmsg.php profile.php
Log Message:
Somewhat overhauled posting, fixed various bugs, completed new way of handling URIs in emails, blah blah
Index: common.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/common.php,v
retrieving revision 1.71
retrieving revision 1.72
diff -C2 -r1.71 -r1.72
*** common.php 18 Feb 2002 08:57:28 -0000 1.71
--- common.php 18 Feb 2002 12:34:13 -0000 1.72
***************
*** 173,230 ****
//
- // Set some server variables related to the current URL, mostly used for Email
- //
- if ( !empty($HTTP_SERVER_VARS['HTTPS']) )
- {
- $server_protocol = ( !empty($HTTP_SERVER_VARS['HTTPS']) ) ? ( ( $HTTP_SERVER_VARS['HTTPS'] == "on" ) ? "https://" : "http://" ) : "http://";
- }
- else if ( !empty($HTTP_ENV_VARS['HTTPS']) )
- {
- $server_protocol = ( !empty($HTTP_ENV_VARS['HTTPS']) ) ? ( ( $HTTP_ENV_VARS['HTTPS'] == "on" ) ? "https://" : "http://" ) : "http://";
- }
- else
- {
- $server_protocol = "http://";
- }
-
- if ( !empty($board_config['server_name']) )
- {
- $server_name = $board_config['server_name'];
- }
- else if ( !empty($board_config['cookie_domain']) )
- {
- $server_name = $board_config['cookie_domain'];
- }
- else if( !empty($HTTP_SERVER_VARS['SERVER_NAME']) || !empty($HTTP_ENV_VARS['SERVER_NAME']) )
- {
- $server_name = ( !empty($HTTP_SERVER_VARS['SERVER_NAME']) ) ? $HTTP_SERVER_VARS['SERVER_NAME'] : $HTTP_ENV_VARS['SERVER_NAME'];
- }
- else if( !empty($HTTP_SERVER_VARS['HTTP_HOST']) || !empty($HTTP_ENV_VARS['HTTP_HOST']) )
- {
- $server_name = ( !empty($HTTP_SERVER_VARS['HTTP_HOST']) ) ? $HTTP_SERVER_VARS['HTTP_HOST'] : $HTTP_ENV_VARS['HTTP_HOST'];
- }
- else
- {
- $server_name = "";
- }
-
- $server_port = ( !empty($board_config['server_port']) && $board_config['server_port'] <> 80 ) ? ':' . $board_config['server_port'] : '';
-
- if ( !empty($HTTP_SERVER_VARS['PHP_SELF']) || !empty($HTTP_ENV_VARS['PHP_SELF']) )
- {
- $script_name = ( !empty($HTTP_SERVER_VARS['PHP_SELF']) ) ? $HTTP_SERVER_VARS['PHP_SELF'] : $HTTP_ENV_VARS['PHP_SELF'];
- }
- else if ( !empty($HTTP_SERVER_VARS['SCRIPT_NAME']) || !empty($HTTP_ENV_VARS['SCRIPT_NAME']) )
- {
- $script_name = ( !empty($HTTP_SERVER_VARS['SCRIPT_NAME']) ) ? $HTTP_SERVER_VARS['SCRIPT_NAME'] : $HTTP_ENV_VARS['SCRIPT_NAME'];
- }
- else if ( !empty($HTTP_SERVER_VARS['PATH_INFO']) || !empty($HTTP_ENV_VARS['PATH_INFO']) )
- {
- $script_name = ( !empty($HTTP_SERVER_VARS['PATH_INFO']) ) ? $HTTP_SERVER_VARS['PATH_INFO'] : $HTTP_ENV_VARS['PATH_INFO'];
- }
-
- $script_url = $server_protocol . $server_name . $server_port . $script_name;
-
- //
// Show 'Board is disabled' message if needed.
//
--- 173,176 ----
***************
*** 234,236 ****
}
! ?>
--- 180,182 ----
}
! ?>
\ No newline at end of file
Index: posting.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/posting.php,v
retrieving revision 1.144
retrieving revision 1.145
diff -C2 -r1.144 -r1.145
*** posting.php 17 Feb 2002 17:02:03 -0000 1.144
--- posting.php 18 Feb 2002 12:34:15 -0000 1.145
***************
*** 28,309 ****
include($phpbb_root_path . 'includes/search.'.$phpEx);
- // -----------------------
- // Page specific functions
//
! function topic_review($topic_id, $is_inline_review)
{
! global $db, $board_config, $template, $lang, $images, $theme, $phpEx;
! global $userdata, $user_ip;
[...3343 lines suppressed...]
--- 1061,1069 ----
// Topic review
//
! if( $mode == 'reply' )
{
+ require($phpbb_root_path . 'includes/topic_review.'.$phpEx);
topic_review($topic_id, true);
$template->assign_block_vars("switch_inline_mode", array());
$template->assign_var_from_handle("TOPIC_REVIEW_BOX", "reviewbody");
***************
*** 2552,2554 ****
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
! ?>
--- 1077,1079 ----
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
! ?>
\ No newline at end of file
Index: privmsg.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/privmsg.php,v
retrieving revision 1.81
retrieving revision 1.82
diff -C2 -r1.81 -r1.82
*** privmsg.php 17 Feb 2002 17:02:03 -0000 1.81
--- privmsg.php 18 Feb 2002 12:34:15 -0000 1.82
***************
*** 44,48 ****
// Parameters
//
! $submit = ( isset($HTTP_POST_VARS['submit']) ) ? TRUE : 0;
$submit_search = ( isset($HTTP_POST_VARS['usersubmit']) ) ? TRUE : 0;
$submit_msgdays = ( isset($HTTP_POST_VARS['submit_msgdays']) ) ? TRUE : 0;
--- 44,48 ----
// Parameters
//
! $submit = ( isset($HTTP_POST_VARS['post']) ) ? TRUE : 0;
$submit_search = ( isset($HTTP_POST_VARS['usersubmit']) ) ? TRUE : 0;
$submit_msgdays = ( isset($HTTP_POST_VARS['submit_msgdays']) ) ? TRUE : 0;
***************
*** 198,202 ****
$pm_sql_user = "AND pm.privmsgs_to_userid = " . $userdata['user_id'] . "
AND ( pm.privmsgs_type = " . PRIVMSGS_READ_MAIL . "
! OR pm.privmsgs_type = " . PRIVMSGS_NEW_MAIL . " )";
}
else if($folder == "outbox")
--- 198,203 ----
$pm_sql_user = "AND pm.privmsgs_to_userid = " . $userdata['user_id'] . "
AND ( pm.privmsgs_type = " . PRIVMSGS_READ_MAIL . "
! OR pm.privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
! OR pm.privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
}
else if($folder == "outbox")
***************
*** 205,209 ****
$pm_sql_user = "AND pm.privmsgs_from_userid = " . $userdata['user_id'] . "
! AND pm.privmsgs_type = " . PRIVMSGS_NEW_MAIL;
}
else if($folder == "sentbox")
--- 206,211 ----
$pm_sql_user = "AND pm.privmsgs_from_userid = " . $userdata['user_id'] . "
! AND ( pm.privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
! OR pm.privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " ) ";
}
else if($folder == "sentbox")
***************
*** 263,267 ****
// a copy in the posters sent box
//
! if( $privmsg['privmsgs_type'] == PRIVMSGS_NEW_MAIL && $folder == "inbox" )
{
$sql = "UPDATE " . PRIVMSGS_TABLE . "
--- 265,269 ----
// a copy in the posters sent box
//
! if( ( $privmsg['privmsgs_type'] == PRIVMSGS_NEW_MAIL || $privmsg['privmsgs_type'] == PRIVMSGS_UNREAD_MAIL ) && $folder == "inbox" )
{
$sql = "UPDATE " . PRIVMSGS_TABLE . "
***************
*** 453,478 ****
$profile_img = "<a href=\"" . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id_from") . "\"><img src=\"" . $images['icon_profile'] . "\" alt=\"" . $lang['Read_profile'] . "\" border=\"0\" /></a>";
! if( !empty($privmsg['user_viewemail']) )
{
! $email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&" . POST_USERS_URL ."=" . $user_id_from) : "mailto:" . $privmsg['user_email'];
! $email_img = "<a href=\"$email_uri\"><img src=\"" . $images['icon_email'] . "\" alt=\"" . $lang['Send_email'] . "\" border=\"0\" /></a>";
}
else
{
! $email_img = "";
}
! $www_img = ( $privmsg['user_website']) ? "<a href=\"" . $privmsg['user_website'] . "\" target=\"_userwww\"><img src=\"" . $images['icon_www'] . "\" alt=\"" . $lang['Visit_website'] . "\" border=\"0\" /></a>" : "";
if( $privmsg['user_icq'] )
{
! $icq_status_img = "<a href=\"http://wwp.icq.com/" . $privmsg['user_icq'] . "#pager\"><img src=\"http://web.icq.com/whitepages/online?icq=" . $privmsg['user_icq'] . "&img=5\" width=\"18\" height=\"18\" border=\"0\" /></a>";
! $icq_add_img = "<a href=\"http://wwp.icq.com/scripts/search.dll?to=" . $privmsg['user_icq'] . "\"><img src=\"" . $images['icon_icq'] . "\" alt=\"" . $lang['ICQ'] . "\" border=\"0\" /></a>";
}
else
{
! $icq_status_img = "";
! $icq_add_img = "";
}
--- 455,480 ----
$profile_img = "<a href=\"" . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id_from") . "\"><img src=\"" . $images['icon_profile'] . "\" alt=\"" . $lang['Read_profile'] . "\" border=\"0\" /></a>";
! if ( !empty($privmsg['user_viewemail']) )
{
! $email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&" . POST_USERS_URL ."=" . $user_id_from) : 'mailto:' . $privmsg['user_email'];
! $email_img = '<a href="' . $email_uri . '"><img src="' . $images['icon_email'] . '" alt="' . $lang['Send_email'] . '" border="0" /></a>';
}
else
{
! $email_img = '';
}
! $www_img = ( $privmsg['user_website']) ? '<a href="' .$privmsg['user_website'] . '" target="_userwww"><img src="' .$images['icon_www'] . '" alt="' .$lang['Visit_website'] . '" border="0" /></a>' : '';
if( $privmsg['user_icq'] )
{
! $icq_status_img = '<a href="http://wwp.icq.com/"' . $privmsg['user_icq'] . '"#pager"><img src="http://web.icq.com/whitepages/online?icq="' . $privmsg['user_icq'] . '"&img=5" width="18" height="18" border="0" /></a>';
! $icq_add_img = '<a href="http://wwp.icq.com/scripts/search.dll?to="' . $privmsg['user_icq'] . '"><img src="' .$images['icon_icq'] . '" alt="' .$lang['ICQ'] . '" border="0" /></a>';
}
else
{
! $icq_status_img = '';
! $icq_add_img = '';
}
***************
*** 635,643 ****
case 'inbox':
$delete_type = "privmsgs_to_userid = " . $userdata['user_id'] . " AND (
! privmsgs_type = " . PRIVMSGS_READ_MAIL . " OR privmsgs_type = " . PRIVMSGS_NEW_MAIL . " )";
break;
case 'outbox':
! $delete_type = "privmsgs_from_userid = " . $userdata['user_id'] . " AND privmsgs_type = " . PRIVMSGS_NEW_MAIL;
break;
--- 637,645 ----
case 'inbox':
$delete_type = "privmsgs_to_userid = " . $userdata['user_id'] . " AND (
! privmsgs_type = " . PRIVMSGS_READ_MAIL . " OR privmsgs_type = " . PRIVMSGS_NEW_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
break;
case 'outbox':
! $delete_type = "privmsgs_from_userid = " . $userdata['user_id'] . " AND ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
break;
***************
*** 704,707 ****
--- 706,733 ----
message_die(GENERAL_ERROR, "Couldn't update users new msg counters", "", __LINE__, __FILE__, $sql);
}
+
+ $sql = "SELECT privmsgs_to_userid
+ FROM " . PRIVMSGS_TABLE . "
+ WHERE privmsgs_id IN ($delete_sql_id)
+ AND privmsgs_from_userid = " . $userdata['user_id'] . "
+ AND privmsgs_type = " . PRIVMSGS_UNREAD_MAIL;
+ if ( !($result = $db->sql_query($sql)) )
+ {
+ message_die(GENERAL_ERROR, "Couldn't obtain user id list for outbox messages", "", __LINE__, __FILE__, $sql);
+ }
+
+ $update_pm_sql = "";
+ while( $row = $db->sql_fetchrow($result) )
+ {
+ $update_pm_sql .= ( ( $update_pm_sql != "" ) ? ", " : "" ) . $row['privmsgs_to_userid'];
+ }
+
+ $sql = "UPDATE " . USERS_TABLE . "
+ SET user_unread_privmsg = user_unread_privmsg - 1
+ WHERE user_id IN ($update_pm_sql)";
+ if ( !($result = $db->sql_query($sql)) )
+ {
+ message_die(GENERAL_ERROR, "Couldn't update users new msg counters", "", __LINE__, __FILE__, $sql);
+ }
}
***************
*** 716,720 ****
case 'inbox':
$delete_sql .= "privmsgs_to_userid = " . $userdata['user_id'] . " AND (
! privmsgs_type = " . PRIVMSGS_READ_MAIL . " OR privmsgs_type = " . PRIVMSGS_NEW_MAIL . " )";
break;
--- 742,746 ----
case 'inbox':
$delete_sql .= "privmsgs_to_userid = " . $userdata['user_id'] . " AND (
! privmsgs_type = " . PRIVMSGS_READ_MAIL . " OR privmsgs_type = " . PRIVMSGS_NEW_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
break;
***************
*** 798,802 ****
WHERE privmsgs_to_userid = " . $userdata['user_id'] . "
AND ( privmsgs_type = " . PRIVMSGS_READ_MAIL . "
! OR privmsgs_type = " . PRIVMSGS_NEW_MAIL . " )";
break;
--- 824,829 ----
WHERE privmsgs_to_userid = " . $userdata['user_id'] . "
AND ( privmsgs_type = " . PRIVMSGS_READ_MAIL . "
! OR privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
! OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . ")";
break;
***************
*** 804,808 ****
$saved_sql .= " SET privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . "
WHERE privmsgs_from_userid = " . $userdata['user_id'] . "
! AND privmsgs_type = " . PRIVMSGS_NEW_MAIL;
break;
--- 831,836 ----
$saved_sql .= " SET privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . "
WHERE privmsgs_from_userid = " . $userdata['user_id'] . "
! AND ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
! OR privmsgs_type = " . PRIVMSGS_UNERAD_MAIL . " ) ";
break;
***************
*** 840,855 ****
if(!$userdata['session_logged_in'])
{
! header("Location: " . append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=$folder&mode=$mode", true));
! }
!
! if( $mode == "searchuser" )
! {
! //
! // This 'will' handle a simple user search
! // performed from within the private message post
! // form ... for 2.2 now, too late for 2.0 ... if we
! // decide to do it all, I'm sooo lazy!
! //
!
}
--- 868,873 ----
if(!$userdata['session_logged_in'])
{
! $user_id = ( isset($HTTP_GET_VARS[POST_USERS_URL]) ) ? "&" . POST_USERS_URL . "=" . $HTTP_GET_VARS[POST_USERS_URL] : "";
! header("Location: " . append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=$folder&mode=$mode" . $user_id, true));
}
***************
*** 998,1002 ****
FROM " . PRIVMSGS_TABLE . "
WHERE ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
! OR privmsgs_type = " . PRIVMSGS_READ_MAIL . " )
AND privmsgs_to_userid = " . $to_userdata['user_id'];
if( !$result = $db->sql_query($sql) )
--- 1016,1021 ----
FROM " . PRIVMSGS_TABLE . "
WHERE ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
! OR privmsgs_type = " . PRIVMSGS_READ_MAIL . "
! OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )
AND privmsgs_to_userid = " . $to_userdata['user_id'];
if( !$result = $db->sql_query($sql) )
***************
*** 1015,1019 ****
$sql = "DELETE $sql_priority FROM " . PRIVMSGS_TABLE . "
WHERE ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
! OR privmsgs_type = " . PRIVMSGS_READ_MAIL . " )
AND privmsgs_date = " . $inbox_info['oldest_post_time'] . "
AND privmsgs_to_userid = " . $to_userdata['user_id'];
--- 1034,1039 ----
$sql = "DELETE $sql_priority FROM " . PRIVMSGS_TABLE . "
WHERE ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
! OR privmsgs_type = " . PRIVMSGS_READ_MAIL . "
! OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )
AND privmsgs_date = " . $inbox_info['oldest_post_time'] . "
AND privmsgs_to_userid = " . $to_userdata['user_id'];
***************
*** 1085,1088 ****
--- 1105,1114 ----
$email_headers = "From: " . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\r\n";
+ $script_name = preg_replace("/^\/?(.*?)\/?$/", "\\1", trim($board_config['script_path']));
+ $script_name = ( $script_name != '' ) ? $script_name . '/privmsg.'.$phpEx : 'privmsg.'.$phpEx;
+ $server_name = trim($board_config['server_name']);
+ $server_protocol = ( $board_config['cookie_secure'] ) ? "https://" : "http://";
+ $server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/';
+
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']);
***************
*** 1101,1105 ****
"EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']),
! "U_INBOX" => $script_url . "?folder=inbox")
);
--- 1127,1131 ----
"EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']),
! "U_INBOX" => $server_protocol . $server_name . $server_port . $script_name . "?folder=inbox")
);
***************
*** 1243,1247 ****
AND pmt.privmsgs_text_id = pm.privmsgs_id
AND pm.privmsgs_from_userid = " . $userdata['user_id'] . "
! AND pm.privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
AND u.user_id = pm.privmsgs_to_userid";
if( !$pm_edit_status = $db->sql_query($sql) )
--- 1269,1274 ----
AND pmt.privmsgs_text_id = pm.privmsgs_id
AND pm.privmsgs_from_userid = " . $userdata['user_id'] . "
! AND ( pm.privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
! OR pm.privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )
AND u.user_id = pm.privmsgs_to_userid";
if( !$pm_edit_status = $db->sql_query($sql) )
***************
*** 1464,1487 ****
//
- // Generate username search output
- //
- $result = $db->sql_query($sql_namesearch);
- $name_set = $db->sql_fetchrowset($result);
-
- $user_names_select = "";
- if($db->sql_numrows($result))
- {
- for($i = 0; $i < count($name_set); $i++)
- {
- $name_selected = ($to_username == $name_set[$i]['username']) ? " selected=\"selected\"" : "";
- $user_names_select .= "<option value=\"" . $name_set[$i]['username'] . "\"$name_selected>" . $name_set[$i]['username'] . "</option>\n";
- }
- }
- else
- {
- $user_names_select .= "<option value=\"" . ANONYMOUS . "\"$name_selected>" . $lang['No_match'] . "</option>\n";
- }
-
- //
// Enable extensions in posting_body
//
--- 1491,1494 ----
***************
*** 1672,1676 ****
//
$sql = "UPDATE " . USERS_TABLE . "
! SET user_unread_privmsg = " . ( $userdata['user_new_privmsg'] + $userdata['user_unread_privmsg'] ) . ", user_new_privmsg = 0, user_last_privmsg = " . $userdata['session_start'] . "
WHERE user_id = " . $userdata['user_id'];
if( !$status = $db->sql_query($sql) )
--- 1679,1683 ----
//
$sql = "UPDATE " . USERS_TABLE . "
! SET user_unread_privmsg = user_unread_privmsg + user_new_privmsg, user_new_privmsg = 0, user_last_privmsg = " . $userdata['session_start'] . "
WHERE user_id = " . $userdata['user_id'];
if( !$status = $db->sql_query($sql) )
***************
*** 1679,1682 ****
--- 1686,1698 ----
}
+ $sql = "UPDATE " . PRIVMSGS_TABLE . "
+ SET privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . "
+ WHERE privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
+ AND privmsgs_to_userid = " . $userdata['user_id'];
+ if( !$status = $db->sql_query($sql) )
+ {
+ message_die(GENERAL_ERROR, "Could not update private message new/read status (2) for user.", "", __LINE__, __FILE__, $sql);
+ }
+
//
// Reset PM counters
***************
*** 1728,1746 ****
$sql_tot .= "WHERE privmsgs_to_userid = " . $userdata['user_id'] . "
AND ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
! OR privmsgs_type = " . PRIVMSGS_READ_MAIL . " )";
$sql .= "WHERE pm.privmsgs_to_userid = " . $userdata['user_id'] . "
AND u.user_id = pm.privmsgs_from_userid
AND ( pm.privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
! OR pm.privmsgs_type = " . PRIVMSGS_READ_MAIL . " )";
break;
case 'outbox':
$sql_tot .= "WHERE privmsgs_from_userid = " . $userdata['user_id'] . "
! AND privmsgs_type = " . PRIVMSGS_NEW_MAIL;
$sql .= "WHERE pm.privmsgs_from_userid = " . $userdata['user_id'] . "
AND u.user_id = pm.privmsgs_to_userid
! AND pm.privmsgs_type = " . PRIVMSGS_NEW_MAIL;
break;
--- 1744,1766 ----
$sql_tot .= "WHERE privmsgs_to_userid = " . $userdata['user_id'] . "
AND ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
! OR privmsgs_type = " . PRIVMSGS_READ_MAIL . "
! OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
$sql .= "WHERE pm.privmsgs_to_userid = " . $userdata['user_id'] . "
AND u.user_id = pm.privmsgs_from_userid
AND ( pm.privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
! OR pm.privmsgs_type = " . PRIVMSGS_READ_MAIL . "
! OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
break;
case 'outbox':
$sql_tot .= "WHERE privmsgs_from_userid = " . $userdata['user_id'] . "
! AND ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
! OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
$sql .= "WHERE pm.privmsgs_from_userid = " . $userdata['user_id'] . "
AND u.user_id = pm.privmsgs_to_userid
! AND pm.privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
! OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
break;
***************
*** 1767,1770 ****
--- 1787,1791 ----
AND u.user_id = pm.privmsgs_from_userid ) )";
break;
+
default:
message_die(GENERAL_ERROR, "Could not query private message information. No folder specified.", "", __LINE__, __FILE__, $sql);
***************
*** 1972,1976 ****
$flag = $pm_list[$i]['privmsgs_type'];
! $icon_flag = ($flag == PRIVMSGS_NEW_MAIL ) ? "<img src=\"" . $images['pm_unreadmsg'] . "\" alt=\"" . $lang['Unread_message'] . "\" border=\"0\">" : "<img src=\"" . $images['pm_readmsg'] . "\" alt=\"" . $lang['Read_message'] . "\" border=\"0\">";
$msg_userid = $pm_list[$i]['user_id'];
--- 1993,1997 ----
$flag = $pm_list[$i]['privmsgs_type'];
! $icon_flag = ($flag == PRIVMSGS_NEW_MAIL || $flag == PRIVMSGS_UNREAD_MAIL ) ? "<img src=\"" . $images['pm_unreadmsg'] . "\" alt=\"" . $lang['Unread_message'] . "\" border=\"0\">" : "<img src=\"" . $images['pm_readmsg'] . "\" alt=\"" . $lang['Read_message'] . "\" border=\"0\">";
$msg_userid = $pm_list[$i]['user_id'];
***************
*** 2036,2038 ****
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
! ?>
--- 2057,2059 ----
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
! ?>
\ No newline at end of file
Index: profile.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/profile.php,v
retrieving revision 1.179
retrieving revision 1.180
diff -C2 -r1.179 -r1.180
*** profile.php 17 Feb 2002 17:02:03 -0000 1.179
--- profile.php 18 Feb 2002 12:34:15 -0000 1.180
***************
*** 30,34 ****
// Start session management
//
! $userdata = session_pagestart($user_ip, PAGE_PROFILE, $session_length);
init_userprefs($userdata);
//
--- 30,34 ----
// Start session management
//
! $userdata = session_pagestart($user_ip, PAGE_PROFILE);
init_userprefs($userdata);
//
***************
*** 36,39 ****
--- 36,50 ----
//
+ //
+ // Set default email variables
+ //
+ $script_name = preg_replace("/^\/?(.*?)\/?$/", "\\1", trim($board_config['script_path']));
+ $script_name = ( $script_name != '' ) ? $script_name . '/profile.'.$phpEx : 'profile.'.$phpEx;
+ $server_name = trim($board_config['server_name']);
+ $server_protocol = ( $board_config['cookie_secure'] ) ? "https://" : "http://";
+ $server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/';
+
+ $server_url = $server_protocol . $script_name . $server_name . $server_port;
+
// -----------------------
// Page specific functions
***************
*** 1066,1070 ****
"EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']),
! "U_ACTIVATE" => $script_url . "?mode=activate&act_key=$user_actkey")
);
$emailer->send();
--- 1077,1081 ----
"EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']),
! "U_ACTIVATE" => $server_url . "?mode=activate&act_key=$user_actkey")
);
$emailer->send();
***************
*** 1164,1168 ****
"EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']),
! "U_ACTIVATE" => $script_url . "?mode=activate&act_key=$user_actkey",
"FAX_INFO" => $board_config['coppa_fax'],
"MAIL_INFO" => $board_config['coppa_mail'],
--- 1175,1180 ----
"EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']),
! "U_ACTIVATE" => $server_url . "?mode=activate&act_key=$user_actkey",
!
"FAX_INFO" => $board_config['coppa_fax'],
"MAIL_INFO" => $board_config['coppa_mail'],
***************
*** 1186,1190 ****
"EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']),
! "U_ACTIVATE" => $script_url . "?mode=activate&act_key=$user_actkey")
);
}
--- 1198,1202 ----
"EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']),
! "U_ACTIVATE" => $server_url . "?mode=activate&act_key=$user_actkey")
);
}
***************
*** 1205,1209 ****
"EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']),
! "U_ACTIVATE" => $script_url . "?mode=activate&act_key=$user_actkey")
);
$emailer->send();
--- 1217,1221 ----
"EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']),
! "U_ACTIVATE" => $server_url . "?mode=activate&act_key=$user_actkey")
);
$emailer->send();
***************
*** 1718,1723 ****
"PASSWORD" => $user_password,
"EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']),
!
! "U_ACTIVATE" => $script_url . "?mode=activate&act_key=$user_actkey")
);
$emailer->send();
--- 1730,1735 ----
"PASSWORD" => $user_password,
"EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']),
!
! "U_ACTIVATE" => $server_url . "?mode=activate&act_key=$user_actkey")
);
$emailer->send();
***************
*** 1925,1929 ****
$email_headers .= "X-AntiAbuse: User_id - " . $userdata['user_id'] . "\n";
$email_headers .= "X-AntiAbuse: Username - " . $userdata['username'] . "\n";
! $email_headers .= "X-AntiAbuse: User IP - " . decode_ip($user_ip) . "\n";
$emailer->use_template("profile_send_email", $user_lang);
--- 1937,1941 ----
$email_headers .= "X-AntiAbuse: User_id - " . $userdata['user_id'] . "\n";
$email_headers .= "X-AntiAbuse: Username - " . $userdata['username'] . "\n";
! $email_headers .= "X-AntiAbuse: User IP - " . decode_ip($user_ip) . "\r\n";
$emailer->use_template("profile_send_email", $user_lang);
***************
*** 1946,1950 ****
);
! $message = $lang['Email_sent'] . "<br /><br />" . sprintf($lang['Click_return_index'], "<a href=\"" . append_sid("index.$phpEx") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
--- 1958,1962 ----
);
! $message = $lang['Email_sent'] . "<br /><br />" . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
message_die(GENERAL_MESSAGE, $message);
***************
*** 1994,1998 ****
"USERNAME" => $username,
! "S_SIGNATURE_CHECKED" => ( $attach_sig ) ? "checked=\"checked\"" : "",
"S_POST_ACTION" => append_sid("profile.$phpEx?&mode=email&" . POST_USERS_URL . "=$user_id"),
--- 2006,2010 ----
"USERNAME" => $username,
! "S_SIGNATURE_CHECKED" => ( $attach_sig ) ? 'checked="checked"' : '',
"S_POST_ACTION" => append_sid("profile.$phpEx?&mode=email&" . POST_USERS_URL . "=$user_id"),
***************
*** 2025,2027 ****
}
! ?>
--- 2037,2039 ----
}
! ?>
\ No newline at end of file
|
|
From: Paul S. O. <ps...@us...> - 2002-02-18 12:34:19
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv5288/includes
Modified Files:
post.php
Log Message:
Somewhat overhauled posting, fixed various bugs, completed new way of handling URIs in emails, blah blah
Index: post.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/post.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** post.php 17 Feb 2002 17:25:31 -0000 1.15
--- post.php 18 Feb 2002 12:34:16 -0000 1.16
***************
*** 1,5 ****
<?php
/***************************************************************************
! *
* -------------------
* begin : Saturday, Feb 13, 2001
--- 1,5 ----
<?php
/***************************************************************************
! * post.php
* -------------------
* begin : Saturday, Feb 13, 2001
***************
*** 21,24 ****
--- 21,29 ----
***************************************************************************/
+ $html_entities_match = array("#&#", "#<#", "#>#");
+ $html_entities_replace = array("&", "<", ">");
+ $unhtml_specialchars_match = array("#>#", "#<#", "#"#", "#&#");
+ $unhtml_specialchars_replace = array(">", "<", "\"", "&");
+
//
// This function will prepare a posted message for
***************
*** 28,31 ****
--- 33,37 ----
{
global $board_config;
+ global $html_entities_match, $html_entities_replace;
$allowed_html_tags = split(",", $board_config['allow_html_tags']);
***************
*** 36,73 ****
$message = trim($message);
! if( $html_on )
{
! $html_entities_match = array("#&#", "#<#", "#>#");
! $html_entities_replace = array("&", "<", ">");
!
! $message = preg_replace("#&([a-z0-9]+?);#i", "&\\1;", $message);
$start_html = 1;
!
! $message = " " . $message;
! while( $start_html = strpos($message, "<", $start_html) )
{
! if( $end_html = strpos($message, ">", $start_html) )
{
$length = $end_html - $start_html + 1;
! $tagallowed = 0;
for($i = 0; $i < sizeof($allowed_html_tags); $i++)
{
$match_tag = trim($allowed_html_tags[$i]);
! if( preg_match("/^[\/]?" . $match_tag . "( .*?)*$/i", trim(substr($message, $start_html + 1, $length - 2))) )
{
! if( !preg_match("/(^\?)|(\?$)/", trim(substr($message, $start_html + 1, $length - 2))) )
! {
! $tagallowed = 1;
! }
}
}
! if( $length && !$tagallowed )
! {
! $message = str_replace(substr($message, $start_html, $length), preg_replace($html_entities_match, $html_entities_replace, substr($message, $start_html, $length)), $message);
! }
$start_html += $length;
--- 42,79 ----
$message = trim($message);
! if ( $html_on )
{
! $message = " " . preg_replace("#&#i", "&", $message);
+ $end_html = 0;
$start_html = 1;
! $temp_message = "";
! while ( $start_html = strpos($message, "<", $start_html) )
{
! $temp_message .= substr($message, $end_html + 1, ( $start_html - $end_html - 1 ));
!
! if ( $end_html = strpos($message, ">", $start_html) )
{
$length = $end_html - $start_html + 1;
+ $hold_string = substr($message, $start_html, $length);
! if ( ( $unclosed_open = strrpos(" " . $hold_string, "<") ) != 1 )
! {
! $temp_message .= preg_replace($html_entities_match, $html_entities_replace, substr($hold_string, 0, $unclosed_open - 2));
! $hold_string = substr($hold_string, $unclosed_open - 1);
! }
!
! $tagallowed = false;
for($i = 0; $i < sizeof($allowed_html_tags); $i++)
{
$match_tag = trim($allowed_html_tags[$i]);
! if ( preg_match("/^<\/?" . $match_tag . "\b/i", $hold_string) )
{
! $tagallowed = true;
}
}
! $temp_message .= ( $length && !$tagallowed ) ? preg_replace($html_entities_match, $html_entities_replace, $hold_string) : $hold_string;
$start_html += $length;
***************
*** 75,89 ****
else
{
! $message = str_replace(substr($message, $start_html, 1), preg_replace($html_entities_match, $html_entities_replace, substr($message, $start_html, 1)), $message);
$start_html = strlen($message);
}
}
! $message = trim($message);
}
else
{
- $html_entities_match = array("#&#", "#<#", "#>#");
- $html_entities_replace = array("&", "<", ">");
$message = preg_replace($html_entities_match, $html_entities_replace, $message);
}
--- 81,94 ----
else
{
! $temp_message .= preg_replace($html_entities_match, $html_entities_replace, substr($message, $start_html, strlen($message)));
$start_html = strlen($message);
}
}
!
! $message = ( $temp_message != "" ) ? trim($temp_message) : trim($message);
}
else
{
$message = preg_replace($html_entities_match, $html_entities_replace, $message);
}
***************
*** 94,100 ****
}
! return($message);
}
//
--- 99,687 ----
}
! return $message;
! }
!
! function unprepare_message($message)
! {
! global $unhtml_specialchars_match, $unhtml_specialchars_replace;
!
! return preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, $message);
! }
!
! //
! // Prepare a message for posting
! //
! function prepare_post(&$mode, &$post_data, &$bbcode_on, &$html_on, &$smilies_on, &$error_msg, &$username, &$bbcode_uid, &$subject, &$message, &$poll_title, &$poll_options, &$poll_length)
! {
! global $board_config, $lang, $phpEx;
!
! // Check username
! if ( !empty($username) )
! {
! $username = htmlspecialchars(trim(strip_tags(str_replace(" ", " ", $username))));
!
! $result = validate_username($username);
! if ( $result['error'] )
! {
! $error_msg .= ( !empty($error_msg) ) ? "<br />" . $result['error_msg'] : $result['error_msg'];
! }
! }
!
! // Check subject
! if ( !empty($subject) )
! {
! $subject = htmlspecialchars(trim($subject));
! }
! else if ( $mode == "newtopic" || ( $mode == "editpost" && $post_data['first_post'] ) )
! {
! $error_msg .= ( !empty($error_msg) ) ? "<br />" . $lang['Empty_subject'] : $lang['Empty_subject'];
! }
!
! // Check message
! if ( !empty($message) )
! {
! $bbcode_uid = ( $bbcode_on ) ? make_bbcode_uid() : "";
! $message = prepare_message(trim($message), $html_on, $bbcode_on, $smilies_on, $bbcode_uid);
! }
! else if ( $mode != "delete" && $mode != "polldelete" )
! {
! $error_msg .= ( !empty($error_msg) ) ? "<br />" . $lang['Empty_message'] : $lang['Empty_message'];
! }
!
! //
! // Handle poll stuff
! //
! if ( $mode == "newtopic" || ( $mode == "editpost" && $post_data['first_post'] ) )
! {
! $poll_length = ( isset($poll_length) ) ? max(0, intval($poll_length)) : 0;
!
! if ( !empty($poll_title) )
! {
! $poll_title = htmlspecialchars(trim($poll_title));
! }
!
! if( !empty($poll_options) )
! {
! $temp_option_text = array();
! while( list($option_id, $option_text) = @each($poll_options) )
! {
! $option_text = trim($option_text);
! if ( !empty($option_text) )
! {
! $temp_option_text[$option_id] = htmlspecialchars($option_text);
! }
! }
! $option_text = $temp_option_text;
!
! if ( count($poll_options) < 2 )
! {
! $error_msg .= ( !empty($error_msg) ) ? "<br />" . $lang['To_few_poll_options'] : $lang['To_few_poll_options'];
! }
! else if ( count($poll_options) > $board_config['max_poll_options'] )
! {
! $error_msg .= ( !empty($error_msg) ) ? "<br />" . $lang['To_many_poll_options'] : $lang['To_many_poll_options'];
! }
! else if ( $poll_title == "" )
! {
! $error_msg .= ( !empty($error_msg) ) ? "<br />" . $lang['Empty_poll_title'] : $lang['Empty_poll_title'];
! }
! }
! }
!
! return;
! }
!
! //
! // Post a new topic/reply/poll or edit existing post/poll
! //
! function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, &$bbcode_on, &$html_on, &$smilies_on, &$attach_sig, &$bbcode_uid, &$post_username, &$post_subject, &$post_message, &$poll_title, &$poll_options, &$poll_length)
! {
! global $board_config, $lang, $db, $phpEx;
! global $userdata, $user_ip;
!
! $current_time = time();
!
! if ( $mode == "newtopic" || $mode == "reply" )
! {
! //
! // Flood control
! //
! $where_sql = ( $userdata['user_id'] == ANONYMOUS ) ? "poster_ip = '$user_ip'" : "poster_id = " . $userdata['user_id'];
! $sql = "SELECT MAX(post_time) AS last_post_time
! FROM " . POSTS_TABLE . "
! WHERE $where_sql";
! if ( $result = $db->sql_query($sql) )
! {
! if( $row = $db->sql_fetchrow($result) )
! {
! if ( $row['last_post_time'] > 0 && ( $current_time - $row['last_post_time'] ) < $board_config['flood_interval'] )
! {
! message_die(GENERAL_MESSAGE, $lang['Flood_Error']);
! }
! }
! }
! }
!
! if ( $mode == "newtopic" || ( $mode == "editpost" && $post_data['first_post'] ) )
! {
! $topic_vote = ( !empty($poll_title) && count($poll_options) >= 2 ) ? 1 : 0;
! $sql = ( $mode != "editpost" ) ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type, topic_vote = $topic_vote WHERE topic_id = $topic_id";
! if ( !($result = $db->sql_query($sql)) )
! {
! message_die(GENERAL_ERROR, "Error in posting", "", __LINE__, __FILE__, $sql);
! }
!
! if( $mode == "newtopic" )
! {
! $topic_id = $db->sql_nextid();
! }
! }
!
! $edited_sql = ( $mode == "editpost" && !$post_data['last_post'] && $post_data['poster_post'] ) ? ", post_edit_time = $current_time, post_edit_count = post_edit_count + 1 " : "";
! $sql = ( $mode != "editpost" ) ? "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig) VALUES ($topic_id, $forum_id, " . $userdata['user_id'] . ", '$post_username', $current_time, '$user_ip', $bbcode_on, $html_on, $smilies_on, $attach_sig)" : "UPDATE " . POSTS_TABLE . " SET enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $attach_sig" . $edited_sql . " WHERE post_id = $post_id";
! if ( !($result = $db->sql_query($sql, BEGIN_TRANSACTION)) )
! {
! message_die(GENERAL_ERROR, "Error in posting", "", __LINE__, __FILE__, $sql);
! }
!
! if( $mode != "editpost" )
! {
! $post_id = $db->sql_nextid();
! }
!
! $sql = ( $mode != "editpost" ) ? "INSERT INTO " . POSTS_TEXT_TABLE . " (post_id, post_subject, bbcode_uid, post_text) VALUES ($post_id, '$post_subject', '$bbcode_uid', '$post_message')" : "UPDATE " . POSTS_TEXT_TABLE . " SET post_text = '$post_message', bbcode_uid = '$bbcode_uid', post_subject = '$post_subject' WHERE post_id = $post_id";
! if ( !($result = $db->sql_query($sql)) )
! {
! message_die(GENERAL_ERROR, "Error in posting", "", __LINE__, __FILE__, $sql);
! }
!
! if ( $mode == "editpost" )
! {
! $sql = "DELETE FROM " . SEARCH_MATCH_TABLE . "
! WHERE post_id = $post_id";
! if ( !($db->sql_query($sql)) )
! {
! message_die(GENERAL_ERROR, "Error in deleting post", "", __LINE__, __FILE__, $sql);
! }
! }
!
! add_search_words($post_id, stripslashes($post_message), stripslashes($post_subject));
!
! //
! // Add poll
! //
! if ( ( $mode == "newtopic" || $mode == "editpost" ) && !empty($poll_title) && count($poll_options) >= 2 )
! {
! $sql = ( !$post_data['has_poll'] ) ? "INSERT INTO " . VOTE_DESC_TABLE . " (topic_id, vote_text, vote_start, vote_length) VALUES ($topic_id, '$poll_title', $current_time, " . ( $poll_length * 86400 ) . ")" : "UPDATE " . VOTE_DESC_TABLE . " SET vote_text = '$poll_title', vote_length = " . ( $poll_length * 86400 ) . " WHERE topic_id = $topic_id";
! if ( !($result = $db->sql_query($sql)) )
! {
! message_die(GENERAL_ERROR, "Error in posting", "", __LINE__, __FILE__, $sql);
! }
!
! $delete_option_sql = "";
! $old_poll_result = array();
! if ( $mode == "editpost" && $post_data['has_poll'] )
! {
! $sql = "SELECT vote_option_id, vote_result
! FROM " . VOTE_RESULTS_TABLE . "
! WHERE vote_id = $poll_id
! ORDER BY vote_option_id ASC";
! if ( !($result = $db->sql_query($sql)) )
! {
! message_die(GENERAL_ERROR, "Couldn't obtain vote data results for this topic", "", __LINE__, __FILE__, $sql);
! }
!
! while ( $row = $db->sql_fetchrow($result) )
! {
! $old_poll_result[$row['vote_option_id']] = $row['vote_result'];
!
! if( !isset($poll_options[$row['vote_option_id']]) )
! {
! $delete_option_sql .= ( $delete_option_sql != "" ) ? ", " . $row['vote_option_id'] : $row['vote_option_id'];
! }
! }
! }
! else
! {
! $poll_id = $db->sql_nextid();
! }
!
! @reset($poll_options);
!
! $poll_option_id = 1;
! while ( list($option_id, $option_text) = each($poll_options) )
! {
! if( !empty($option_text) )
! {
! $option_text = str_replace("\'", "''", $option_text);
! $poll_result = ( $mode == "editpost" && isset($old_poll_result[$option_id]) ) ? $old_poll_result[$option_id] : 0;
!
! $sql = ( $mode != "editpost" || !isset($old_poll_result[$option_id]) ) ? "INSERT INTO " . VOTE_RESULTS_TABLE . " (vote_id, vote_option_id, vote_option_text, vote_result) VALUES ($poll_id, $poll_option_id, '$option_text', $poll_result)" : "UPDATE " . VOTE_RESULTS_TABLE . " SET vote_option_text = '$option_text', vote_result = $poll_result WHERE vote_option_id = $option_id AND vote_id = $poll_id";
! if ( !($result = $db->sql_query($sql)) )
! {
! message_die(GENERAL_ERROR, "Error in posting", "", __LINE__, __FILE__, $sql);
! }
! $poll_option_id++;
! }
! }
!
! if( $delete_option_sql != "" )
! {
! $sql = "DELETE FROM " . VOTE_RESULTS_TABLE . "
! WHERE vote_option_id IN ($delete_option_sql)";
! if ( !($result = $db->sql_query($sql)) )
! {
! message_die(GENERAL_ERROR, "Error deleting pruned poll options", "", __LINE__, __FILE__, $sql);
! }
! }
! }
!
! if ( $mode != "editpost" )
! {
! //
! // Update statistics
! //
! $sql = "UPDATE " . TOPICS_TABLE . " SET
! topic_last_post_id = $post_id";
! $sql .= ( ( $mode == "reply" ) ? ", topic_replies = topic_replies + 1 " : ", topic_first_post_id = $post_id " ) . "WHERE topic_id = $topic_id";
! if ( !($result = $db->sql_query($sql)) )
! {
! message_die(GENERAL_ERROR, "Error in posting", "", __LINE__, __FILE__, $sql);
! }
!
! $sql = "UPDATE " . FORUMS_TABLE . "
! SET forum_last_post_id = $post_id, forum_posts = forum_posts + 1";
! $sql .= ( ( $mode == "newtopic" ) ? ", forum_topics = forum_topics + 1 " : " " ) . "WHERE forum_id = $forum_id";
! if ( !($result = $db->sql_query($sql)) )
! {
! message_die(GENERAL_ERROR, "Error in posting", "", __LINE__, __FILE__, $sql);
! }
!
! $sql = "UPDATE " . USERS_TABLE . "
! SET user_posts = user_posts + 1
! WHERE user_id = " . $userdata['user_id'];
! if ( !($result = $db->sql_query($sql, END_TRANSACTION)) )
! {
! message_die(GENERAL_ERROR, "Error in posting", "", __LINE__, __FILE__, $sql);
! }
! }
! else
! {
! remove_unmatched_words();
! }
!
! $meta = '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">';
! $message = $lang['Stored'] . '<br /><br />' . sprintf($lang['Click_view_message'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>');
!
! return false;
! }
!
! //
! // Delete a post/poll
! //
! function delete_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id)
! {
! global $board_config, $lang, $db, $phpEx;
! global $userdata, $user_ip;
!
! $topic_update_sql = "";
! if ( $mode != "poll_delete" )
! {
! $sql = "DELETE FROM " . POSTS_TABLE . "
! WHERE post_id = $post_id";
! if ( !($db->sql_query($sql)) )
! {
! message_die(GENERAL_ERROR, "Error in deleting post", "", __LINE__, __FILE__, $sql);
! }
!
! $sql = "DELETE FROM " . POSTS_TEXT_TABLE . "
! WHERE post_id = $post_id";
! if ( !($db->sql_query($sql)) )
! {
! message_die(GENERAL_ERROR, "Error in deleting post", "", __LINE__, __FILE__, $sql);
! }
!
! $sql = "DELETE FROM " . SEARCH_MATCH_TABLE . "
! WHERE post_id = $post_id";
! if ( !($db->sql_query($sql)) )
! {
! message_die(GENERAL_ERROR, "Error in deleting post", "", __LINE__, __FILE__, $sql);
! }
!
! $forum_update_sql = "forum_posts = forum_posts - 1";
! $topic_update_sql .= "topic_replies = topic_replies - 1";
! if ( $post_data['last_post'] )
! {
! if ( $post_data['first_post'] )
! {
! $sql = "DELETE FROM " . TOPICS_TABLE . "
! WHERE topic_id = $topic_id";
! if ( !($db->sql_query($sql)) )
! {
! message_die(GENERAL_ERROR, "Error in deleting post", "", __LINE__, __FILE__, $sql);
! }
!
! $sql = "DELETE FROM " . TOPICS_WATCH_TABLE . "
! WHERE topic_id = $topic_id";
! if ( !($db->sql_query($sql)) )
! {
! message_die(GENERAL_ERROR, "Error in deleting post", "", __LINE__, __FILE__, $sql);
! }
!
! $forum_update_sql .= ", forum_topics = forum_topics - 1";
! }
! else
! {
! $sql = "SELECT MAX(post_id) AS post_id
! FROM " . POSTS_TABLE . "
! WHERE topic_id = $topic_id";
! if ( !($db->sql_query($sql)) )
! {
! message_die(GENERAL_ERROR, "Error in deleting post", "", __LINE__, __FILE__, $sql);
! }
!
! if ( $row = $db->sql_fetchrow($result) )
! {
! $topic_update_sql .= ", topic_last_post_id = " . $row['post_id'];
! }
! }
!
! if ( $post_data['last_topic'] )
! {
! $sql = "SELECT MAX(post_id) AS post_id
! FROM " . POSTS_TABLE . "
! WHERE forum_id = $forum_id";
! if ( !($db->sql_query($sql)) )
! {
! message_die(GENERAL_ERROR, "Error in deleting post", "", __LINE__, __FILE__, $sql);
! }
!
! $row = $db->sql_fetchrow($result);
!
! $forum_update_sql .= ( $row['post_id'] ) ? ", forum_last_post_id = " . $row['post_id'] : ", forum_last_post_id = 0";
! }
! }
! else if ( $post_data['first_post'] )
! {
! $sql = "SELECT MIN(post_id) AS post_id
! FROM " . POSTS_TABLE . "
! WHERE topic_id = $topic_id";
! if ( !($db->sql_query($sql)) )
! {
! message_die(GENERAL_ERROR, "Error in deleting post", "", __LINE__, __FILE__, $sql);
! }
!
! if ( $row = $db->sql_fetchrow($result) )
! {
! $topic_update_sql .= ", topic_first_post_id = " . $row['post_id'];
! }
! }
!
! $sql = "UPDATE " . FORUMS_TABLE . "
! SET $forum_update_sql
! WHERE forum_id = $forum_id";
! if ( !($db->sql_query($sql)) )
! {
! message_die(GENERAL_ERROR, "Error in deleting post", "", __LINE__, __FILE__, $sql);
! }
! }
!
! if( $mode == "poll_delete" || ( $mode == "delete" && $post_data['first_post'] && $post_data['last_post'] ) && $post_data['has_poll'] && $post_data['edit_poll'] )
! {
! if ( $mode == "poll_delete" )
! {
! $topic_update_sql .= "topic_vote = 0";
! }
!
! $sql = "DELETE FROM " . VOTE_DESC_TABLE . "
! WHERE vote_id = $poll_id";
! if ( !($db->sql_query($sql)) )
! {
! message_die(GENERAL_ERROR, "Error in deleting poll", "", __LINE__, __FILE__, $sql);
! }
!
! $sql = "DELETE FROM " . VOTE_RESULTS_TABLE . "
! WHERE vote_id = $poll_id";
! if ( !($db->sql_query($sql)) )
! {
! message_die(GENERAL_ERROR, "Error in deleting poll", "", __LINE__, __FILE__, $sql);
! }
!
! $sql = "DELETE FROM " . VOTE_USERS_TABLE . "
! WHERE vote_id = $poll_id";
! if ( !($db->sql_query($sql)) )
! {
! message_die(GENERAL_ERROR, "Error in deleting poll", "", __LINE__, __FILE__, $sql);
! }
! }
!
! if ( ( $mode == "delete" && empty($post_data['first_post']) || empty($post_data['last_post']) ) || $mode == "poll_delete" )
! {
! $sql = "UPDATE " . TOPICS_TABLE . "
! SET $topic_update_sql
! WHERE topic_id = $topic_id";
! if ( !($db->sql_query($sql)) )
! {
! message_die(GENERAL_ERROR, "Error in updating topic info", "", __LINE__, __FILE__, $sql);
! }
! }
!
! remove_unmatched_words();
!
! if ( $mode == "delete" && $post_data['first_post'] && $post_data['last_post'] )
! {
! $meta = '<meta http-equiv="refresh" content="3;url=' . append_sid("viewforum.$phpEx?" . POST_TOPIC_URL . "=" . $forum_id) . '">';
! $message = $lang['Deleted'];
! }
! else
! {
! $meta = '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=" . $topic_id) . '">';
! $message = ( ( $mode == "poll_delete" ) ? $lang['Poll_delete'] : $lang['Deleted'] ) . '<br /><br />' . sprintf($lang['Click_return_topic'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . '">', '</a>');
! }
!
! $message .= '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>');
!
! return;
}
+ //
+ // Handle user notification on new post
+ //
+ function user_notification($mode, &$post_data, &$forum_id, &$topic_id, &$post_id, &$notify_user)
+ {
+ global $HTTP_SERVER_VARS, $HTTP_ENV_VARS;
+ global $board_config, $lang, $db, $phpbb_root_path, $phpEx;
+ global $userdata, $user_ip;
+
+ $current_time = time();
+
+ if ( ( $mode == "newtopic" && !$notify_user ) || $mode == "delete" )
+ {
+ $delete_sql = ( !$post_data['first_post'] && !$post_data['last_post'] ) ? " AND user_id = " . $userdata['user_id'] : "";
+ $sql = ( $mode == "newtopic" ) ? "INSERT INTO " . TOPICS_WATCH_TABLE . " (user_id, topic_id, notify_status) VALUES (" . $userdata['user_id'] . ", $topic_id, 0)" : "DELETE FROM " . TOPICS_WATCH_TABLE . " WHERE topic_id = $topic_id" . $delete_sql;
+ if ( !($result = $db->sql_query($sql)) )
+ {
+ message_die(GENERAL_ERROR, "Couldn't change topic notify data", "", __LINE__, __FILE__, $sql);
+ }
+ }
+ else
+ {
+ if ( $mode == "reply" )
+ {
+ $sql = "SELECT ban_userid
+ FROM " . BANLIST_TABLE;
+ if ( !($result = $db->sql_query($sql)) )
+ {
+ message_die(GENERAL_ERROR, "", "", __LINE__, __FILE__, $sql);
+ }
+
+ $user_id_sql = "";
+ while ( $row = $db->sql_fetchrow($result) )
+ {
+ $user_id_sql = ", " . $row['ban_userid'];
+ }
+
+ $sql = "SELECT u.user_id, u.username, u.user_email, u.user_lang, t.topic_title
+ FROM " . TOPICS_WATCH_TABLE . " tw, " . TOPICS_TABLE . " t, " . USERS_TABLE . " u
+ WHERE tw.topic_id = $topic_id
+ AND tw.user_id NOT IN (" . $userdata['user_id'] . ", " . ANONYMOUS . $user_id_sql . " )
+ AND tw.notify_status = " . TOPIC_WATCH_UN_NOTIFIED . "
+ AND t.topic_id = tw.topic_id
+ AND u.user_id = tw.user_id";
+ if ( !($result = $db->sql_query($sql)) )
+ {
+ message_die(GENERAL_ERROR, "", "", __LINE__, __FILE__, $sql);
+ }
+
+ $orig_word = array();
+ $replacement_word = array();
+ obtain_word_list($orig_word, $replacement_word);
+
+ include($phpbb_root_path . 'includes/emailer.'.$phpEx);
+ $emailer = new emailer($board_config['smtp_delivery']);
+
+ $script_name = preg_replace("/^\/?(.*?)\/?$/", "\\1", trim($board_config['script_path']));
+ $script_name = ( $script_name != '' ) ? $script_name . '/viewtopic.'.$phpEx : 'viewtopic.'.$phpEx;
+ $server_name = trim($board_config['server_name']);
+ $server_protocol = ( $board_config['cookie_secure'] ) ? "https://" : "http://";
+ $server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/';
+
+ $email_headers = "From: " . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\r\n";
+
+ $update_watched_sql = "";
+ if ( $row = $db->sql_fetchrow($result) )
+ {
+ $topic_title = preg_replace($orig_word, $replacement_word, unprepare_message($row['topic_title']));
+
+ do
+ {
+ if ( $row['user_email'] != "" )
+ {
+ $emailer->use_template("topic_notify", $row['user_lang']);
+ $emailer->email_address($row['user_email']);
+ $emailer->set_subject($lang['Topic_reply_notification']);
+ $emailer->extra_headers($email_headers);
+
+ $emailer->assign_vars(array(
+ "EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']),
+ "USERNAME" => $row['username'],
+ "SITENAME" => $board_config['sitename'],
+ "TOPIC_TITLE" => $topic_title,
+
+ "U_TOPIC" => $server_protocol . $server_name . $server_port . $script_name . "?" . POST_POST_URL . "=$post_id#$post_id",
+ "U_STOP_WATCHING_TOPIC" => $server_protocol . $server_name . $server_port . $script_name . "?" . POST_TOPIC_URL . "=$topic_id&unwatch=topic")
+ );
+
+ $emailer->send();
+ $emailer->reset();
+
+ $update_watched_sql .= ( $update_watched_sql != "" ) ? ", " . $row['user_id'] : $row['user_id'];
+ }
+ }
+ while ( $row = $db->sql_fetchrow($result) );
+ }
+
+ if ( $update_watched_sql != "" )
+ {
+ $sql = "UPDATE " . TOPICS_WATCH_TABLE . "
+ SET notify_status = " . TOPIC_WATCH_NOTIFIED . "
+ WHERE topic_id = $topic_id
+ AND user_id IN ($update_watched_sql)";
+ $db->sql_query($sql);
+ }
+ }
+
+ $sql = "SELECT topic_id
+ FROM " . TOPICS_WATCH_TABLE . "
+ WHERE topic_id = $topic_id
+ AND user_id = " . $userdata['user_id'];
+ if ( !($result = $db->sql_query($sql)) )
+ {
+ message_die(GENERAL_ERROR, "Couldn't obtain topic watch information", "", __LINE__, __FILE__, $sql);
+ }
+
+ $row = $db->sql_fetchrow($result);
+
+ if ( !$notify_user && !empty($row['topic_id']) )
+ {
+ $sql = "DELETE FROM " . TOPICS_WATCH_TABLE . "
+ WHERE topic_id = $topic_id
+ AND user_id = " . $userdata['user_id'];
+ if ( !$result = $db->sql_query($sql) )
+ {
+ message_die(GENERAL_ERROR, "Couldn't delete topic watch information", "", __LINE__, __FILE__, $sql);
+ }
+ }
+ else if ( $notify_user && empty($row['topic_id']) )
+ {
+ $sql = "INSERT INTO " . TOPICS_WATCH_TABLE . " (user_id, topic_id, notify_status)
+ VALUES (" . $userdata['user_id'] . ", $topic_id, 0)";
+ if ( !($result = $db->sql_query($sql)) )
+ {
+ message_die(GENERAL_ERROR, "Couldn't insert topic watch information", "", __LINE__, __FILE__, $sql);
+ }
+ }
+ }
+ }
//
***************
*** 109,119 ****
$inline_columns = 4;
! $inline_rows = 6;
!
$window_columns = 8;
! if( $mode == "window" )
{
! $userdata = session_pagestart($user_ip, $page_id, $session_length);
init_userprefs($userdata);
--- 696,705 ----
$inline_columns = 4;
! $inline_rows = 5;
$window_columns = 8;
! if ( $mode == "window" )
{
! $userdata = session_pagestart($user_ip, $page_id);
init_userprefs($userdata);
***************
*** 131,151 ****
FROM " . SMILIES_TABLE . "
ORDER BY smilies_id";
! if( $result = $db->sql_query($sql) )
{
! if( $db->sql_numrows($result) )
{
! $num_smilies = 0;
! $rowset = array();
! while( $row = $db->sql_fetchrow($result) )
{
! // If this is the first time that we encounter this smiley:
! if( empty($rowset[$row['smile_url']]) )
! {
! $rowset[$row['smile_url']]['code'] = str_replace("\\", "\\\\", str_replace("'", "\\'", $row['code']));
! $rowset[$row['smile_url']]['emoticon'] = $row['emoticon'];
! $num_smilies++;
! }
}
$smilies_count = ( $mode == "inline" ) ? min(19, $num_smilies) : $num_smilies;
$smilies_split_row = ( $mode == "inline" ) ? $inline_columns - 1 : $window_columns - 1;
--- 717,736 ----
FROM " . SMILIES_TABLE . "
ORDER BY smilies_id";
! if ( $result = $db->sql_query($sql) )
{
! $num_smilies = 0;
! $rowset = array();
! while ( $row = $db->sql_fetchrow($result) )
{
! if ( empty($rowset[$row['smile_url']]) )
{
! $rowset[$row['smile_url']]['code'] = str_replace("\\", "\\\\", str_replace("'", "\\'", $row['code']));
! $rowset[$row['smile_url']]['emoticon'] = $row['emoticon'];
! $num_smilies++;
}
+ }
+ if ( $num_smilies )
+ {
$smilies_count = ( $mode == "inline" ) ? min(19, $num_smilies) : $num_smilies;
$smilies_split_row = ( $mode == "inline" ) ? $inline_columns - 1 : $window_columns - 1;
***************
*** 155,161 ****
$col = 0;
! while( list($smile_url, $data) = @each($rowset) )
{
! if( !$col )
{
$template->assign_block_vars("smilies_row", array());
--- 740,746 ----
$col = 0;
! while ( list($smile_url, $data) = @each($rowset) )
{
! if ( !$col )
{
$template->assign_block_vars("smilies_row", array());
***************
*** 170,176 ****
$s_colspan = max($s_colspan, $col + 1);
! if( $col == $smilies_split_row )
{
! if( $mode == "inline" && $row == $inline_rows - 1 )
{
break;
--- 755,761 ----
$s_colspan = max($s_colspan, $col + 1);
! if ( $col == $smilies_split_row )
{
! if ( $mode == "inline" && $row == $inline_rows - 1 )
{
break;
***************
*** 185,189 ****
}
! if( $mode == "inline" && $num_smilies > $inline_columns * $inline_rows)
{
$template->assign_block_vars("switch_smilies_extra", array());
--- 770,774 ----
}
! if ( $mode == "inline" && $num_smilies > $inline_rows * $inline_columns )
{
$template->assign_block_vars("switch_smilies_extra", array());
***************
*** 203,207 ****
}
! if( $mode == "window" )
{
$template->pparse("smiliesbody");
--- 788,792 ----
}
! if ( $mode == "window" )
{
$template->pparse("smiliesbody");
***************
*** 211,213 ****
}
! ?>
--- 796,798 ----
}
! ?>
\ No newline at end of file
|
|
From: Bart v. B. <ba...@us...> - 2002-02-18 08:57:32
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv11291
Modified Files:
common.php
Log Message:
Now the code is fixed for real :D Not smart to use config info before it's read
Index: common.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/common.php,v
retrieving revision 1.70
retrieving revision 1.71
diff -C2 -r1.70 -r1.71
*** common.php 18 Feb 2002 07:35:18 -0000 1.70
--- common.php 18 Feb 2002 08:57:28 -0000 1.71
***************
*** 154,157 ****
--- 154,176 ----
//
+ // Setup forum wide options, if this fails
+ // then we output a CRITICAL_ERROR since
+ // basic forum information is not available
+ //
+ $sql = "SELECT *
+ FROM " . CONFIG_TABLE;
+ if(!$result = $db->sql_query($sql))
+ {
+ message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql);
+ }
+ else
+ {
+ while($row = $db->sql_fetchrow($result))
+ {
+ $board_config[$row['config_name']] = $row['config_value'];
+ }
+ }
+
+ //
// Set some server variables related to the current URL, mostly used for Email
//
***************
*** 190,194 ****
}
! $server_port = ( $board_config['server_port'] <> 80 ) ? ':' . $board_config['server_port'] . '/' : '/';
if ( !empty($HTTP_SERVER_VARS['PHP_SELF']) || !empty($HTTP_ENV_VARS['PHP_SELF']) )
--- 209,213 ----
}
! $server_port = ( !empty($board_config['server_port']) && $board_config['server_port'] <> 80 ) ? ':' . $board_config['server_port'] : '';
if ( !empty($HTTP_SERVER_VARS['PHP_SELF']) || !empty($HTTP_ENV_VARS['PHP_SELF']) )
***************
*** 207,230 ****
$script_url = $server_protocol . $server_name . $server_port . $script_name;
-
//
! // Setup forum wide options, if this fails
! // then we output a CRITICAL_ERROR since
! // basic forum information is not available
//
- $sql = "SELECT *
- FROM " . CONFIG_TABLE;
- if(!$result = $db->sql_query($sql))
- {
- message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql);
- }
- else
- {
- while($row = $db->sql_fetchrow($result))
- {
- $board_config[$row['config_name']] = $row['config_value'];
- }
- }
-
if( $board_config['board_disable'] && !defined("IN_ADMIN") && !defined("IN_LOGIN") )
{
--- 226,232 ----
$script_url = $server_protocol . $server_name . $server_port . $script_name;
//
! // Show 'Board is disabled' message if needed.
//
if( $board_config['board_disable'] && !defined("IN_ADMIN") && !defined("IN_LOGIN") )
{
|