From d4b1e2f4f6aa6a863b14aaaee96115dfbb6ea149 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Sun, 12 May 2013 23:25:53 +0300 Subject: [PATCH 001/661] [ticket/11345] Change font for buttons Change font to Open Sans PHPBB3-11345 --- phpBB/styles/prosilver/theme/buttons.css | 3 ++- phpBB/styles/prosilver/theme/colours.css | 1 - phpBB/styles/prosilver/theme/stylesheet.css | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/phpBB/styles/prosilver/theme/buttons.css b/phpBB/styles/prosilver/theme/buttons.css index 9336dd09f8..4a8d43079a 100644 --- a/phpBB/styles/prosilver/theme/buttons.css +++ b/phpBB/styles/prosilver/theme/buttons.css @@ -27,7 +27,8 @@ border-radius: 4px; background: transparent none 0 0 repeat-x; padding: 2px 22px 2px 8px; - font-family: Verdana, Arial, Helvetica; + font-family: "Open Sans", Verdana, Arial, Helvetica; + font-weight: 600; position: relative; text-decoration: none !important; outline-style: none !important; diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css index 7d0462be1b..7449014801 100644 --- a/phpBB/styles/prosilver/theme/colours.css +++ b/phpBB/styles/prosilver/theme/colours.css @@ -1111,4 +1111,3 @@ input.disabled { .notification_list .pointer_inner { border-bottom-color: #F1F8FF; } - diff --git a/phpBB/styles/prosilver/theme/stylesheet.css b/phpBB/styles/prosilver/theme/stylesheet.css index 48a00c6803..adc5bdff25 100644 --- a/phpBB/styles/prosilver/theme/stylesheet.css +++ b/phpBB/styles/prosilver/theme/stylesheet.css @@ -7,6 +7,7 @@ -------------------------------------------------------------- */ +@import url("http://fonts.googleapis.com/css?family=Open+Sans:600&subset=latin,cyrillic-ext,latin-ext,cyrillic,greek-ext,greek,vietnamese"); @import url("common.css"); @import url("links.css"); @import url("content.css"); From 3139867e6d345a2d9f69e68d2629f31448a17634 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Thu, 11 Jul 2013 11:32:52 -0400 Subject: [PATCH 002/661] [ticket/11345] Add Droid Sans as fallback font PHPBB3-11345 --- phpBB/styles/prosilver/theme/buttons.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/styles/prosilver/theme/buttons.css b/phpBB/styles/prosilver/theme/buttons.css index 4a8d43079a..3860869501 100644 --- a/phpBB/styles/prosilver/theme/buttons.css +++ b/phpBB/styles/prosilver/theme/buttons.css @@ -27,7 +27,7 @@ border-radius: 4px; background: transparent none 0 0 repeat-x; padding: 2px 22px 2px 8px; - font-family: "Open Sans", Verdana, Arial, Helvetica; + font-family: "Open Sans", "Droid Sans", Verdana, Arial, Helvetica; font-weight: 600; position: relative; text-decoration: none !important; From 424040f8901cc4c075924c5d21d89fdfe9e6ca58 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Sun, 14 Jul 2013 14:12:42 -0400 Subject: [PATCH 003/661] [ticket/11345] Move css import to template PHPBB3-11345 --- phpBB/styles/prosilver/template/overall_header.html | 1 + phpBB/styles/prosilver/template/simple_header.html | 1 + phpBB/styles/prosilver/theme/stylesheet.css | 1 - 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html index ddbd917bd6..f513f42fc2 100644 --- a/phpBB/styles/prosilver/template/overall_header.html +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -63,6 +63,7 @@ + diff --git a/phpBB/styles/prosilver/template/simple_header.html b/phpBB/styles/prosilver/template/simple_header.html index 667698c371..913115a2ed 100644 --- a/phpBB/styles/prosilver/template/simple_header.html +++ b/phpBB/styles/prosilver/template/simple_header.html @@ -42,6 +42,7 @@ + diff --git a/phpBB/styles/prosilver/theme/stylesheet.css b/phpBB/styles/prosilver/theme/stylesheet.css index adc5bdff25..48a00c6803 100644 --- a/phpBB/styles/prosilver/theme/stylesheet.css +++ b/phpBB/styles/prosilver/theme/stylesheet.css @@ -7,7 +7,6 @@ -------------------------------------------------------------- */ -@import url("http://fonts.googleapis.com/css?family=Open+Sans:600&subset=latin,cyrillic-ext,latin-ext,cyrillic,greek-ext,greek,vietnamese"); @import url("common.css"); @import url("links.css"); @import url("content.css"); From b9fa2089d56d16d8a8cd84bb8ae06d85fec5506a Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sun, 14 Jul 2013 21:13:21 +0200 Subject: [PATCH 004/661] [ticket/11345] Wrap remote webfonts in S_ALLOW_CDN. PHPBB3-11345 --- phpBB/styles/prosilver/template/overall_header.html | 2 +- phpBB/styles/prosilver/template/simple_header.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html index f513f42fc2..73ddc29efc 100644 --- a/phpBB/styles/prosilver/template/overall_header.html +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -63,7 +63,7 @@ - + diff --git a/phpBB/styles/prosilver/template/simple_header.html b/phpBB/styles/prosilver/template/simple_header.html index 913115a2ed..c89c50570a 100644 --- a/phpBB/styles/prosilver/template/simple_header.html +++ b/phpBB/styles/prosilver/template/simple_header.html @@ -42,7 +42,7 @@ - + From eaa688eba49bc192e66dc5e1b690360a23dadd0a Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Wed, 17 Jul 2013 02:02:19 +0200 Subject: [PATCH 005/661] [feature/plupload/deps] Adding parts of plupload_1_5_7.zip PHPBB3-10929 --- .../css/jquery.plupload.queue.css | 177 ++++++++++++++++++ .../jquery.plupload.queue/img/backgrounds.gif | Bin 0 -> 2977 bytes .../img/buttons-disabled.png | Bin 0 -> 1292 bytes .../jquery.plupload.queue/img/buttons.png | Bin 0 -> 1439 bytes .../jquery.plupload.queue/img/delete.gif | Bin 0 -> 180 bytes .../jquery.plupload.queue/img/done.gif | Bin 0 -> 1024 bytes .../jquery.plupload.queue/img/error.gif | Bin 0 -> 994 bytes .../jquery.plupload.queue/img/throbber.gif | Bin 0 -> 1922 bytes .../jquery.plupload.queue/img/transp50.png | Bin 0 -> 399 bytes .../jquery.plupload.queue.js | 1 + phpBB/assets/plupload/plupload.html5.js | 1 + phpBB/assets/plupload/plupload.js | 2 + 12 files changed, 181 insertions(+) create mode 100644 phpBB/assets/plupload/jquery.plupload.queue/css/jquery.plupload.queue.css create mode 100644 phpBB/assets/plupload/jquery.plupload.queue/img/backgrounds.gif create mode 100644 phpBB/assets/plupload/jquery.plupload.queue/img/buttons-disabled.png create mode 100644 phpBB/assets/plupload/jquery.plupload.queue/img/buttons.png create mode 100644 phpBB/assets/plupload/jquery.plupload.queue/img/delete.gif create mode 100644 phpBB/assets/plupload/jquery.plupload.queue/img/done.gif create mode 100644 phpBB/assets/plupload/jquery.plupload.queue/img/error.gif create mode 100644 phpBB/assets/plupload/jquery.plupload.queue/img/throbber.gif create mode 100644 phpBB/assets/plupload/jquery.plupload.queue/img/transp50.png create mode 100644 phpBB/assets/plupload/jquery.plupload.queue/jquery.plupload.queue.js create mode 100644 phpBB/assets/plupload/plupload.html5.js create mode 100644 phpBB/assets/plupload/plupload.js diff --git a/phpBB/assets/plupload/jquery.plupload.queue/css/jquery.plupload.queue.css b/phpBB/assets/plupload/jquery.plupload.queue/css/jquery.plupload.queue.css new file mode 100644 index 0000000000..8581fdd730 --- /dev/null +++ b/phpBB/assets/plupload/jquery.plupload.queue/css/jquery.plupload.queue.css @@ -0,0 +1,177 @@ +/* + Plupload +------------------------------------------------------------------- */ + +.plupload_button { + display: -moz-inline-box; /* FF < 3*/ + display: inline-block; + font: normal 12px sans-serif; + text-decoration: none; + color: #42454a; + border: 1px solid #bababa; + padding: 2px 8px 3px 20px; + margin-right: 4px; + background: #f3f3f3 url('../img/buttons.png') no-repeat 0 center; + outline: 0; + + /* Optional rounded corners for browsers that support it */ + -moz-border-radius: 3px; + -khtml-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; +} + +.plupload_button:hover { + color: #000; + text-decoration: none; +} + +.plupload_disabled, a.plupload_disabled:hover { + color: #737373; + border-color: #c5c5c5; + background: #ededed url('../img/buttons-disabled.png') no-repeat 0 center; + cursor: default; +} + +.plupload_add { + background-position: -181px center; +} + +.plupload_wrapper { + font: normal 11px Verdana,sans-serif; + width: 100%; +} + +.plupload_container { + padding: 8px; + background: url('../img/transp50.png'); + /*-moz-border-radius: 5px;*/ +} + +.plupload_container input { + border: 1px solid #DDD; + font: normal 11px Verdana,sans-serif; + width: 98%; +} + +.plupload_header {background: #2A2C2E url('../img/backgrounds.gif') repeat-x;} +.plupload_header_content { + background: url('../img/backgrounds.gif') no-repeat 0 -317px; + min-height: 56px; + padding-left: 60px; + color: #FFF; +} +.plupload_header_title { + font: normal 18px sans-serif; + padding: 6px 0 3px; +} +.plupload_header_text { + font: normal 12px sans-serif; +} + +.plupload_filelist { + margin: 0; + padding: 0; + list-style: none; +} + +.plupload_scroll .plupload_filelist { + height: 185px; + background: #F5F5F5; + overflow-y: scroll; +} + +.plupload_filelist li { + padding: 10px 8px; + background: #F5F5F5 url('../img/backgrounds.gif') repeat-x 0 -156px; + border-bottom: 1px solid #DDD; +} + +.plupload_filelist_header, .plupload_filelist_footer { + background: #DFDFDF; + padding: 8px 8px; + color: #42454A; +} +.plupload_filelist_header { + border-top: 1px solid #EEE; + border-bottom: 1px solid #CDCDCD; +} + +.plupload_filelist_footer {border-top: 1px solid #FFF; height: 22px; line-height: 20px; vertical-align: middle;} +.plupload_file_name {float: left; overflow: hidden} +.plupload_file_status {color: #777;} +.plupload_file_status span {color: #42454A;} +.plupload_file_size, .plupload_file_status, .plupload_progress { + float: right; + width: 80px; +} +.plupload_file_size, .plupload_file_status, .plupload_file_action {text-align: right;} + +.plupload_filelist .plupload_file_name {width: 205px} + +.plupload_file_action { + float: right; + width: 16px; + height: 16px; + margin-left: 15px; +} + +.plupload_file_action * { + display: none; + width: 16px; + height: 16px; +} + +li.plupload_uploading {background: #ECF3DC url('../img/backgrounds.gif') repeat-x 0 -238px;} +li.plupload_done {color:#AAA} + +li.plupload_delete a { + background: url('../img/delete.gif'); +} + +li.plupload_failed a { + background: url('../img/error.gif'); + cursor: default; +} + +li.plupload_done a { + background: url('../img/done.gif'); + cursor: default; +} + +.plupload_progress, .plupload_upload_status { + display: none; +} + +.plupload_progress_container { + margin-top: 3px; + border: 1px solid #CCC; + background: #FFF; + padding: 1px; +} +.plupload_progress_bar { + width: 0px; + height: 7px; + background: #CDEB8B; +} + +.plupload_scroll .plupload_filelist_header .plupload_file_action, .plupload_scroll .plupload_filelist_footer .plupload_file_action { + margin-right: 17px; +} + +/* Floats */ + +.plupload_clear,.plupload_clearer {clear: both;} +.plupload_clearer, .plupload_progress_bar { + display: block; + font-size: 0; + line-height: 0; +} + +li.plupload_droptext { + background: transparent; + text-align: center; + vertical-align: middle; + border: 0; + line-height: 165px; +} diff --git a/phpBB/assets/plupload/jquery.plupload.queue/img/backgrounds.gif b/phpBB/assets/plupload/jquery.plupload.queue/img/backgrounds.gif new file mode 100644 index 0000000000000000000000000000000000000000..39e33ebc02114ebea6bb33dee2fb76af3a6dd4dc GIT binary patch literal 2977 zcmdUu`#Tc~1II^hosi0dq?7P6w^9i&)fvJz8*&{RhTJ9Zdro+CGnWyPC?vVFx!;*f zwGhKxa!+DIj18M@Hka9Z&Y$sqpU=;q=kv?g24ZdUZyyK10});iz~_F@@$vEA-kwk> zWUv>uxr;|fM|?hCAQ0^D?{m4_!^1<~@jCbD7n4UhI5^ni{N(X?EIxH-Z^_Wu)X2ol z*z~rE*&WkcAhSE>w?TJr{b6~>-0BYtYxBEc3oEF(6+}nx3g>Wj_h4mDuy)tRmM^63 z9j{-xc7uPs!8!WHK3u(V(`0vlnSHRr6|5Otzp1NlaLv$I|LS!sFwD~0mM5fn`S^SL z224&(`}hT-eFHpw?t7yBP+q?7C~u^v4+81wfkL~vqg)Y47dMZI$th=7gf-M|Zti<} zMppFWX9%SCi|=rDf$WQq#?D zgPh%vgpRJ6*|~V^i^V0%>aR8G@(PVc1H&99{uWKoK;ZYjO-xQqOxioSZEtUXpa1b= z;U}F=FDWfYdikw;y?A6o;>FZf!&R1ropX!0hj#(0-1t9=3LlPOcu# zuI^4Q2(YcauYa)FZF6^|w}X?b4HOP@aGsu-wFX1)2Zq`?I6Jwx-?f1`IJw+&MmV}4 z?Cv?;G%>Zu$?>SjoLvDjCEv�TRS%oFI%_+CO)aErq(YYgtoB}8U3WF zxU8kMZGbe0!&i27eay}KP+e2IvAG!)^VB~m%-b(8^G!}b@PnP5otP)jqaQ#2O#HIA zv{Y7sfBY2F+4a%W#~#DtRV2e0sMdN^1he| z0MG-_`zQaOPXMHZfcTRt;D(|v@lxk>P^5<9-XuA7Xg;{HoMYfOln-gH78R4*5CMT0L8j?)9oQZ>#y<95h+wIowu@Y`U~O^ue~h?q^ptd-LZ7#e}8L zu_sRb4kI*Bdy@q*2r{8@WgtV{wgA?#yDXb~BXp76(Y!uZWSQDeE^gVF#5+}cjdZrs zXUlJr3gBIBTR#YY(icaNd)Osn{HaTJ-2~PODN8s??CxN%kC)mO+I{SNw5HS)x-|N+ zi?>7RO%+}$6vXYbX_M97W1l`A@|YvYT>HeWHHexh(^N#oszlPLNvc@ja7N1*G5}THRz94lQx_Q zT6t-*hF?j)wMSEb2^7;_&A6)&y!slfS-F~NK1x~5aG|GlROH65 z95hyYE%$zQhrd)%MdeyvSlh?+n$ae$G{ahFqwI}q$VPc?K-ES?e&pr`t_Z8Mi7(3z*{sA@RBcw(v~6xyH}ng2 z=rt`fA@o|pS{1#ndvB9oPn6JQH1sKiG8##m)r=;x5uMRIZmql3GUXb&)jAhYz16l5 zN#AOxV0E_%tJ$I39khz-?M_A;eY=aM@C8ieU|( zL^NucJ<`SuX0M!$9;;8@EsXV5DX@msuM)*z4O~!H-6d({gzXLjaW%U`dhLweVS@oZ zHra4Cze&Voy@ow{i^pJ(fh6@g<98JwaK3@HYB>{sT%~X(9c=WuQ_gM=xYLNhTJ8)g zYKuFIPV(fQxS#W2?|Trgc5gnceQWPW#DG3;Ay^B|`x(7n%UgWH6K?UAVkNKeDG7?< zd}^}RB2OgEc$>eHVRL1F^^IHj{;%A?y8X5MsO|mrEF0AWT3Jr`!3G{zcd%L0zI{M% z7og?UgkH5abet;F|1Uybg9w+xc_<{D=i3Csys`wzE(wf8Ie}1vJM_FooA&- zlUFWS5eM!ZuwKPVm#IoZNEXVOuXMp>YKns-Yt!A=8EIu2TJOM$h~3Owa+#*_;GkX1 zZdOsts+2Wk$T4sC4IWmm<2E?tn%*SdkXEi22pRU6-_0hF%dhxoW4sP_bBNLv21yXI zuQEHA1gp57GYIoBrMw$Yt1!etMnXK;d2{3nqxQj(@R+Q;b5b~y0m$fo^Vs<`7|wKd za5S=${efv1D6$3_i9JH*`3a1hpCmYKGXtLmdg9FJ_IV3@+N|d>HFucm~`>dP>EbjFC*m(Jf*b~}BpL0)g#m*`>RVLM2d7y+%KO3t!2z2n`d3rrfuB=AyQ913J`ZXe{HLQFSE-FVY+Uu03Bt zoS&()kc$vhgJz%-AB7e(rwCk8`N&};@W|rK)7nsjnR$0o6O|B#i2H9&HOd8$Q&V~| zJa{Ztk}O&zGxwlZvF%V?FM77CF(cHYYe<|f3XrCW$1BWqd3nXUo~#4vDwe(1)<~G{ z^d;3RRS}nt3w&h(vR3Zpu?g^tJ>3AQ__$tlqJ$YjJ~BB%ixQIz-xvAfM`9|~5vj6| zmt|EYBv68e%3+UL8DONPf@}A(BT4PF0ahIKu0h*WHCo2RD_$isE#+QDi7aSaJZu=6 z1pgUV?@7XB=H$n_^-%{Q$xUy{7g7j|XeSfU^{kxkRABV?lW5r+x$s6e6}0;>a#TcZ z8DyqI*cXlz6@Aqj>el|ze{(R{^-rC@sQy>SdK6lLjJG%a{n*#fe<1*`#hrfOr5u`a z#x%L5ObfmNHl|L%@hufvBgt^Ck7SW-E8a#X1ZIqx!Ye$wWHc>h;=rA5NWbaw5)`UV zI+&@)TB;jyF*Xa7S)y!P!$XHqb?L)7;NgX zz#PgCiflV!7_@yo`EY@X?ejHCJP(!Ykz}T~cmMi;jluaW^3#nk12OO5?=pVk$YG2%!@ek{6A(fmDJ+~!0gA49US+s%A`w3_&A z928;1Re?FHNg2HAAP3s9-?@pN8~g4YCGq9OW&Y7R=yd1!^U)XPe+4=*I>c0yiJS^E z!G^tL-@oRXwFP13=bi)OX4*%&b&Ax}d2?~kjNTUMYxJD80e8*M7DU==_?|jBFOSuD dje#jyoPHgVpsrRdX?b7mL?&^(OjHzL_CKvd+)Mxf literal 0 HcmV?d00001 diff --git a/phpBB/assets/plupload/jquery.plupload.queue/img/buttons-disabled.png b/phpBB/assets/plupload/jquery.plupload.queue/img/buttons-disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..afa11af9b93bcbd261faa6a5b0835e82493712b2 GIT binary patch literal 1292 zcmdUu{ZrBh9LK*cyLmOMbKNd&>ujyJA?aEC~~zn}NBXR)7W|sN7p`Q5FZPn}b6cI@%6mmG6E;YBgxp`z{B(g5F$wZ=3sZ1s_ zSC&-JjgriDGG9<|+N|qMu@kQi3=5^!SOKSoDr|hcS(nIx$>w?Y_}6KwQisDq>&KG^ zi_0{bH8nN$L-@}5#{z*sBoaNE0dajON?%cxq_BD%E0@ccmzSCPYH$)y9xazhBp?Wy zUW~~c0*SrbXfep`0_;EzT}hj=j$8hk%pbhjWCDo>+~W2Ey6qa7OfJ*smgutVcDun~ zSlF7q(-W^)6e^WU)-+{gRXu4PhfzX}D_Sm>+tJZcA<4$~W(gggQWLMqNW>4`&XFa_ z$3!!>siGdV#WsysWemKMKU9@bO;z~byHZ;hcj8h1f)Le`$WYSm3XtfYt5+Vvb7jeO zgQY!|W}>X9N|sm9i>xpe2_0QhQ#Uw-4W|TER#r;we7>#?N(rLTXx4SJ)F8wtQZNc+ zSl!QEQw+)IQy!0}(P+9R8TIw`I2>+hXozZlz?dNiR|l%q>NIvj3=5*P3tQ*t1OkC* zC>b^D!|N|d=Q_pnJe5jCr_)(1R(WqW-@+bTl54fv#l^+eIYyo)oj2S@PH#7u!_Wj;T^_|aLmv2xXf1{tLw~Rol zMoUA@How0E1c$wV+ArX@;j{i*jAO|Id0fXo7lQ`5PGpH1zO4M(nl*Mp{}LWd`hK|i zC)z~qJL}3hPjh=E7oAdn6;@F-8hmB7-wWMnK5+UfQVc|-V<4srKAn&t+EJ{=mmYl2 zKcaDu*Oh7emN4xwv%H%>guu-^L(CJO)8q82H6!eRXGegq`lySYbVKCRBLA{94hZml z7C3$h9*J#@{i7xV;SvW5&ZiMh)pYp3e*Pw$un))vg(brQiLq|T00b-=`ZO%H@?V~M B8n^%e literal 0 HcmV?d00001 diff --git a/phpBB/assets/plupload/jquery.plupload.queue/img/buttons.png b/phpBB/assets/plupload/jquery.plupload.queue/img/buttons.png new file mode 100644 index 0000000000000000000000000000000000000000..153e73885ac4a1fd1a98dccd5df73b8d72a2df10 GIT binary patch literal 1439 zcmds$`CHNl0LH(md$h8mXU=DKYCYR>x|XZunH7j(vtnANdE^0}Q_%3q3ljwuNd0Px zXc>}1icY2+UgSJVML-S7gET2S?9e#8(;R=t-XGrM_s>g4UOcyB+n#Lz0POHUxOoA< zmMDEUGcnYAQk=_}J}hu>Uz|549CtG$0S%l*VM5WC9gwmupEox**VosVmzP&oR@TtHrkX-4q2s9uaXQg^SBNc4sxUG3Q2Gz~8cBP?UB&cROAb9#H0uYYyN|uyA#k zDkn-tl*8#=QP!E;(t2WArns5~b#fPK{N1zYdVd1%T6!M_Y{z4}!cdH>lD9p4X)U=W zrl1>tGItNNkCH7&BuEq83e1VT8#NM;B#fqXC!ZjHPZVGYyja%ryR7~^4C~b7dnI?8 z6<6(0DkYI*$=qqSL?O=Lg(yA_)hX_AdYPrqs8LmpSMS5w!!$Rl6Rf}?q19izq`pc& zlF}PfJy?t^@(@hd)4Q|67$-Y#GC}{yJCun2yayZqMuVix+6>$Pz;Xq?)cP6bX!#;N_ zM&L`A=G>9x^7#OMwe1(E#R%zSn0EYb9t^_rHAf6$xY*4IiB-fK&4Caqqw3c8R0C1aH>9E zo(0W2i4piUJ+E;lo#>bMJ$fxfGktK){>)xV@d%~kl`!*#;6hnh1`EDUrHPrlVu7bnk7vzs?(F%PW9p(Us@ByaDr1@N8id1 zq#EK|qf7fpp;hjA9jU`(GJHqGKZ7*?yVfBUmkUMdF;(`|w#2fh)Y<_s^1<(XG1r9( zp(&{7x-0IW1%HBtZ;hc0;q|=DlB{j?98clAE_&Up(=|^ z)y^4+k!d{)ayxq=5;3zqN@!&=e~dt&XdI2tZQl&^gc+E=1kFpxziBUw(u>+6B8ew{ zHT#4adb9s$)lNf5ZqWEWp|o~9mNBKZF@6n~4eLc`ZtQi) zEeZC+@YX2J-oQrPCqWJpanQl%fhgK|SHZ)!AkX2~Oo-gT(((Wk)zSW;rL3+K1a1L<0hS=shBh1KUx9VI6LTcP+1A$fTOVUSbj_}t^TxwA z>);uvlQWimVfuDfQ*;3A$LePE3n4Lk!TR4vFstfStKdAkc%W__W|RR{rpRfCtdE^o z^PM_}-KWf;<+}`y{((slzS?_8m0wvIoRWUWhih`I+Qw`E`olNIr-M})!19Q^wA?Y< zq@_nD!#8PWLw8%hgbQrU?2C`SIj|0x%a6XB8T34O-bxlYF*54+(^w#u7e+Q(Mw+~5 zI{4nmu`t>**kHfo1zn&9jdV!B)Ds3d11+CukDTL!Q1QOEPeFD(V%IO7$IQC+FIkzm e!^(pI%TA#Gq{YC>!%?W7RKNp%(X9a*ocSNer(gg8 literal 0 HcmV?d00001 diff --git a/phpBB/assets/plupload/jquery.plupload.queue/img/delete.gif b/phpBB/assets/plupload/jquery.plupload.queue/img/delete.gif new file mode 100644 index 0000000000000000000000000000000000000000..78ca8b3b49e8f739df6ecfa4ef1119058b40e035 GIT binary patch literal 180 zcmZ?wbhEHb6krfw*v!H39|+Ez`G02S|CvCP_CGD{3a`TQPIW08y z+@NmXYwfboIA>eftmEx7PPc8lxOLj;wk@}o)$U1Kdw+KQj?7u7+G7q_7aUKWu%~bR zon_CzK797&@#5>#ChqKCeR=lWbKTo6Y;8YOwD9`W!0mdKC$n$9xnkdKU4N?J%dby0 zyHXy!eqg;&z4BnntSh~RJEP0@B-9|3oj-CkkZZ+PIz&iq4(r6)4xUz)J}=GOefiTPV2bGL_Yxw$lNYefFmh~ndE zIY+&>-d_`Q*w(b(@Zp<>wcFFSKin|$Y?u8^o3fLc-6tyEet(^I)N{&-{-V>Nn&qme z-|XLbclqX#$!XmLDils2^$_i=Vfo6|K!7s z$3S&5b~>3_CysS9Ff(!pa1CI4JIO94&@9fw!C(yl Dux)$+ literal 0 HcmV?d00001 diff --git a/phpBB/assets/plupload/jquery.plupload.queue/img/error.gif b/phpBB/assets/plupload/jquery.plupload.queue/img/error.gif new file mode 100644 index 0000000000000000000000000000000000000000..4682b63007c89fae09f6640e1a968a073d98b90d GIT binary patch literal 994 zcmZ?wbhEHb6krfw_};*9b)oIQ-*5l@e)sRs`)iBszTS%X_xshqKVQDwin+ST?*G5P zzrQ^G_xt_f9Jc2NYJa}F{`Gdu&zDm^T?_qix&OnZo-emz|NVaR_t)1i*Zuzedh_v0 z>zAA1pKtV@Ea!c=%JBE6!+*Zrczrtj)3uOqx1+w?ivDyh;``H`|9*XZd!q2y`>j8o zPq{fm`Na;auQ!6uw~GD$_w&u+sDHnnzd8{2bbrVDb8TPluY7%O^{INT7l+$F-w1!O zT=&{!g-_QbzC1qg{l($GKi~d(fA!P#uus>+|9rjj_t&$3f4+Tvyzkqcn7=>n{r&m; z>&=i$lU?pF(SEVZ_4lV+Z%tCF$iDo6LW`p7(5<$N&HT8Aidtg@EEu7Dfh!1_m9F6F_-_fnz@dBd3hV zh6RoeTpun37Hm*p=S}!xB2%GsN>(9zl@H4iweC3*!Wlj#haUN`*h|{jWN<7##?Qpk zmawqs0!x>8vXF{_aD)HsCf8Xtia|ir6_cteb~+gFu`;I!>|qpOVG?4uVAFdM{QR&W zONNt2z@nss^K_X~eLR`cSvVIfMeSfTbmmr&58_**5um`{FC={>;XzVD=Tv()J_7-T ogaZvn8JQwxBtJeTEbH?rX5;20cPa5$D~HSgwKHzbjEoG{0NEsHRR910 literal 0 HcmV?d00001 diff --git a/phpBB/assets/plupload/jquery.plupload.queue/img/throbber.gif b/phpBB/assets/plupload/jquery.plupload.queue/img/throbber.gif new file mode 100644 index 0000000000000000000000000000000000000000..4ae8b16a5a474c3da1e426afc20d2167ebd360f1 GIT binary patch literal 1922 zcma)-eM}Q~9LBG`Uf-_0UZFJTFt*nsTO5ueC8MQCX?YP5d8q^!#7gUiuF(Vv0y0uv zMJsO=7zu_gofyX-W+{m?E;Ac+grVzRB*kTp0b7W13o~jO6PL#Adz^qwjJtm>_sjk9 z`#jI{eZINdbKXqbPa-7ZMiBKT^}xA-;P=6WKNl)0E2eKxhaZKneR-`QzrcOMJvKfT zx)lmP4A1{QA9)h7lvsMZdqb029JH3~(nv`^VO`dQxDnc;-1oz!sEu0QJXhB~$nrssc=;5d6bWb>~J{i+O9hUE>s zy$3K&J8PlS3s zuf&l@@FJcg=@u`pfhDq)R}nk`!N({wk0c0{S65>YWU5;9TUls-qL>gRi_rR);{wgY zMVdw2=B8#K29K9L3s zc2K-aUfk?E&kByZwEo`KQU%&(ulDp;Rd2jF$4C4_mBa4FtT?M{W386p329VQR0mG+mdz;^%6}=b+X&!0PAJghY6b|U<(&T>?OpL^EQ|Dg8v(US+(!5}gNN>68C zjIJsuuSa13hEay{0=HqHA>PcGLdSs$kl{5DmyWOoKy3@Be5XpZZB{~bv-Rt+_KBtg z?I&+!J&28PB^xhXaT!{!c-ZpmN=~tqb8%>d`}1|A?BGOz>Q{U7drQo%qk+Jq)wF|Bjbw4$i)(?^O-2qNn1c<7SK zeh64nT!z?PU-wbRweq{O<*Cxk-%v+|o7P1Kr$(&P;`Dngu`P{NC&`fTITT02B_YRx zMm@NDi25Ks=~!vhsbn#_65^=UAs+Z>fLS&$h+rtQa@x?&qIF}sS{QcM$9 zyj8I_JtbX`?QWmL>a)qPxTV4W0{AhtaEw8J%zHgmpSG<=!@1xzkcC#tDkpClZTQ9T{9{ XMrH}sh*f7CD@Dcca7lI@6tMnZ`e4## literal 0 HcmV?d00001 diff --git a/phpBB/assets/plupload/jquery.plupload.queue/img/transp50.png b/phpBB/assets/plupload/jquery.plupload.queue/img/transp50.png new file mode 100644 index 0000000000000000000000000000000000000000..eb0efe104bdcc277ddcc3f6efdb54e1d533a5179 GIT binary patch literal 399 zcmeAS@N?(olHy`uVBq!ia0vp^(?FPm4M^HB7Cr(}Ea{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+AuIMDtfv&hE&{ob7`X>g8|2p4HHh@ z{1e$QDM;$zbFWMMeYKnhV#f|eBu!Qva;S;tqB;S44$rjF6*2UngC6Cic
'+a("Select files")+'
'+a("Add files to the upload queue and click the start button.")+'
'+a("Filename")+'
 
'+a("Status")+'
'+a("Size")+'
 
    ')}c.fn.pluploadQueue=function(e){if(e){this.each(function(){var j,i,k;i=c(this);k=i.attr("id");if(!k){k=plupload.guid();i.attr("id",k)}j=new plupload.Uploader(c.extend({dragdrop:true,container:k},e));d[k]=j;function h(l){var n;if(l.status==plupload.DONE){n="plupload_done"}if(l.status==plupload.FAILED){n="plupload_failed"}if(l.status==plupload.QUEUED){n="plupload_delete"}if(l.status==plupload.UPLOADING){n="plupload_uploading"}var m=c("#"+l.id).attr("class",n).find("a").css("display","block");if(l.hint){m.attr("title",l.hint)}}function f(){c("span.plupload_total_status",i).html(j.total.percent+"%");c("div.plupload_progress_bar",i).css("width",j.total.percent+"%");c("span.plupload_upload_status",i).html(a("Uploaded %d/%d files").replace(/%d\/%d/,j.total.uploaded+"/"+j.files.length))}function g(){var m=c("ul.plupload_filelist",i).html(""),n=0,l;c.each(j.files,function(p,o){l="";if(o.status==plupload.DONE){if(o.target_name){l+=''}l+='';l+='';n++;c("#"+k+"_count").val(n)}m.append('
  • '+o.name+'
    '+o.percent+'%
    '+plupload.formatSize(o.size)+'
     
    '+l+"
  • ");h(o);c("#"+o.id+".plupload_delete a").click(function(q){c("#"+o.id).remove();j.removeFile(o);q.preventDefault()})});c("span.plupload_total_file_size",i).html(plupload.formatSize(j.total.size));if(j.total.queued===0){c("span.plupload_add_text",i).html(a("Add files."))}else{c("span.plupload_add_text",i).html(j.total.queued+" files queued.")}c("a.plupload_start",i).toggleClass("plupload_disabled",j.files.length==(j.total.uploaded+j.total.failed));m[0].scrollTop=m[0].scrollHeight;f();if(!j.files.length&&j.features.dragdrop&&j.settings.dragdrop){c("#"+k+"_filelist").append('
  • '+a("Drag files here.")+"
  • ")}}j.bind("UploadFile",function(l,m){c("#"+m.id).addClass("plupload_current_file")});j.bind("Init",function(l,m){b(k,i);if(!e.unique_names&&e.rename){i.on("click","#"+k+"_filelist div.plupload_file_name span",function(s){var q=c(s.target),o,r,n,p="";o=l.getFile(q.parents("li")[0].id);n=o.name;r=/^(.+)(\.[^.]+)$/.exec(n);if(r){n=r[1];p=r[2]}q.hide().after('');q.next().val(n).focus().blur(function(){q.show().next().remove()}).keydown(function(u){var t=c(this);if(c.inArray(u.keyCode,[13,27])!==-1){u.preventDefault();if(u.keyCode===13){o.name=t.val()+p;q.html(o.name)}t.blur()}})})}c("a.plupload_add",i).attr("id",k+"_browse");l.settings.browse_button=k+"_browse";if(l.features.dragdrop&&l.settings.dragdrop){l.settings.drop_element=k+"_filelist";c("#"+k+"_filelist").append('
  • '+a("Drag files here.")+"
  • ")}c("#"+k+"_container").attr("title","Using runtime: "+m.runtime);c("a.plupload_start",i).click(function(n){if(!c(this).hasClass("plupload_disabled")){j.start()}n.preventDefault()});c("a.plupload_stop",i).click(function(n){n.preventDefault();j.stop()});c("a.plupload_start",i).addClass("plupload_disabled")});j.init();j.bind("Error",function(l,o){var m=o.file,n;if(m){n=o.message;if(o.details){n+=" ("+o.details+")"}if(o.code==plupload.FILE_SIZE_ERROR){alert(a("Error: File too large: ")+m.name)}if(o.code==plupload.FILE_EXTENSION_ERROR){alert(a("Error: Invalid file extension: ")+m.name)}m.hint=n;c("#"+m.id).attr("class","plupload_failed").find("a").css("display","block").attr("title",n)}});j.bind("StateChanged",function(){if(j.state===plupload.STARTED){c("li.plupload_delete a,div.plupload_buttons",i).hide();c("span.plupload_upload_status,div.plupload_progress,a.plupload_stop",i).css("display","block");c("span.plupload_upload_status",i).html("Uploaded "+j.total.uploaded+"/"+j.files.length+" files");if(e.multiple_queues){c("span.plupload_total_status,span.plupload_total_file_size",i).show()}}else{g();c("a.plupload_stop,div.plupload_progress",i).hide();c("a.plupload_delete",i).css("display","block")}});j.bind("QueueChanged",g);j.bind("FileUploaded",function(l,m){h(m)});j.bind("UploadProgress",function(l,m){c("#"+m.id+" div.plupload_file_status",i).html(m.percent+"%");h(m);f();if(e.multiple_queues&&j.total.uploaded+j.total.failed==j.files.length){c(".plupload_buttons,.plupload_upload_status",i).css("display","inline");c(".plupload_start",i).addClass("plupload_disabled");c("span.plupload_total_status,span.plupload_total_file_size",i).hide()}});if(e.setup){e.setup(j)}});return this}else{return d[c(this[0]).attr("id")]}}})(jQuery); \ No newline at end of file diff --git a/phpBB/assets/plupload/plupload.html5.js b/phpBB/assets/plupload/plupload.html5.js new file mode 100644 index 0000000000..a4b2a1fc0a --- /dev/null +++ b/phpBB/assets/plupload/plupload.html5.js @@ -0,0 +1 @@ +(function(k,m,l,g){var d={},j;function c(s){var r=s.naturalWidth,u=s.naturalHeight;if(r*u>1024*1024){var t=m.createElement("canvas");t.width=t.height=1;var q=t.getContext("2d");q.drawImage(s,-r+1,0);return q.getImageData(0,0,1,1).data[3]===0}else{return false}}function f(u,r,z){var q=m.createElement("canvas");q.width=1;q.height=z;var A=q.getContext("2d");A.drawImage(u,0,0);var t=A.getImageData(0,0,1,z).data;var x=0;var v=z;var y=z;while(y>x){var s=t[(y-1)*4+3];if(s===0){v=y}else{x=y}y=(v+x)>>1}var w=(y/z);return(w===0)?1:w}function o(K,s,t){var v=K.naturalWidth,z=K.naturalHeight;var E=t.width,B=t.height;var F=s.getContext("2d");F.save();var r=c(K);if(r){v/=2;z/=2}var I=1024;var q=m.createElement("canvas");q.width=q.height=I;var u=q.getContext("2d");var G=f(K,v,z);var A=0;while(Az?z-A:I;var C=0;while(Cv?v-C:I;u.clearRect(0,0,I,I);u.drawImage(K,-C,-A);var x=(C*E/v)<<0;var y=Math.ceil(D*E/v);var w=(A*B/z/G)<<0;var H=Math.ceil(J*B/z/G);F.drawImage(q,0,0,D,J,x,w,y,H);C+=I}A+=I}F.restore();q=u=null}function p(r,s){var q;if("FileReader" in k){q=new FileReader();q.readAsDataURL(r);q.onload=function(){s(q.result)}}else{return s(r.getAsDataURL())}}function n(r,s){var q;if("FileReader" in k){q=new FileReader();q.readAsBinaryString(r);q.onload=function(){s(q.result)}}else{return s(r.getAsBinary())}}function e(u,s,q,y){var t,r,x,v,w=this;p(d[u.id],function(z){t=m.createElement("canvas");t.style.display="none";m.body.appendChild(t);x=new Image();x.onerror=x.onabort=function(){y({success:false})};x.onload=function(){var F,A,C,B,E;if(!s.width){s.width=x.width}if(!s.height){s.height=x.height}v=Math.min(s.width/x.width,s.height/x.height);if(v<1){F=Math.round(x.width*v);A=Math.round(x.height*v)}else{if(s.quality&&q==="image/jpeg"){F=x.width;A=x.height}else{y({success:false});return}}t.width=F;t.height=A;o(x,t,{width:F,height:A});if(q==="image/jpeg"){B=new h(atob(z.substring(z.indexOf("base64,")+7)));if(B.headers&&B.headers.length){E=new a();if(E.init(B.get("exif")[0])){E.setExif("PixelXDimension",F);E.setExif("PixelYDimension",A);B.set("exif",E.getBinary());if(w.hasEventListener("ExifData")){w.trigger("ExifData",u,E.EXIF())}if(w.hasEventListener("GpsData")){w.trigger("GpsData",u,E.GPS())}}}}if(s.quality&&q==="image/jpeg"){try{z=t.toDataURL(q,s.quality/100)}catch(D){z=t.toDataURL(q)}}else{z=t.toDataURL(q)}z=z.substring(z.indexOf("base64,")+7);z=atob(z);if(B&&B.headers&&B.headers.length){z=B.restore(z);B.purge()}t.parentNode.removeChild(t);y({success:true,data:z})};x.src=z})}l.runtimes.Html5=l.addRuntime("html5",{getFeatures:function(){var v,r,u,t,s,q;r=u=s=q=false;if(k.XMLHttpRequest){v=new XMLHttpRequest();u=!!v.upload;r=!!(v.sendAsBinary||v.upload)}if(r){t=!!(v.sendAsBinary||(k.Uint8Array&&k.ArrayBuffer));s=!!(File&&(File.prototype.getAsDataURL||k.FileReader)&&t);q=!!(File&&(File.prototype.mozSlice||File.prototype.webkitSlice||File.prototype.slice))}j=l.ua.safari&&l.ua.windows;return{html5:r,dragdrop:(function(){var w=m.createElement("div");return("draggable" in w)||("ondragstart" in w&&"ondrop" in w)}()),jpgresize:s,pngresize:s,multipart:s||!!k.FileReader||!!k.FormData,canSendBinary:t,cantSendBlobInFormData:!!(l.ua.gecko&&k.FormData&&k.FileReader&&!FileReader.prototype.readAsArrayBuffer)||l.ua.android,progress:u,chunks:q,multi_selection:!(l.ua.safari&&l.ua.windows),triggerDialog:(l.ua.gecko&&k.FormData||l.ua.webkit)}},init:function(s,u){var q,t;function r(z){var x,w,y=[],A,v={};for(w=0;w";J.scrollTop=100;H=m.getElementById(s.id+"_html5");if(A.features.triggerDialog){l.extend(H.style,{position:"absolute",width:"100%",height:"100%"})}else{l.extend(H.style,{cssFloat:"right",styleFloat:"right"})}H.onchange=function(){r(this.files);this.value=""};I=m.getElementById(A.settings.browse_button);if(I){var C=A.settings.browse_button_hover,D=A.settings.browse_button_active,B=A.features.triggerDialog?I:J;if(C){l.addEvent(B,"mouseover",function(){l.addClass(I,C)},A.id);l.addEvent(B,"mouseout",function(){l.removeClass(I,C)},A.id)}if(D){l.addEvent(B,"mousedown",function(){l.addClass(I,D)},A.id);l.addEvent(m.body,"mouseup",function(){l.removeClass(I,D)},A.id)}if(A.features.triggerDialog){l.addEvent(I,"click",function(K){var y=m.getElementById(A.id+"_html5");if(y&&!y.disabled){y.click()}K.preventDefault()},A.id)}}});s.bind("PostInit",function(){var v=m.getElementById(s.settings.drop_element);if(v){if(j){l.addEvent(v,"dragenter",function(z){var y,w,x;y=m.getElementById(s.id+"_drop");if(!y){y=m.createElement("input");y.setAttribute("type","file");y.setAttribute("id",s.id+"_drop");y.setAttribute("multiple","multiple");l.addEvent(y,"change",function(){r(this.files);l.removeEvent(y,"change",s.id);y.parentNode.removeChild(y)},s.id);l.addEvent(y,"dragover",function(A){A.stopPropagation()},s.id);v.appendChild(y)}w=l.getPos(v,m.getElementById(s.settings.container));x=l.getSize(v);if(l.getStyle(v,"position")==="static"){l.extend(v.style,{position:"relative"})}l.extend(y.style,{position:"absolute",display:"block",top:0,left:0,width:x.w+"px",height:x.h+"px",opacity:0})},s.id);return}l.addEvent(v,"dragover",function(w){w.preventDefault()},s.id);l.addEvent(v,"drop",function(x){var w=x.dataTransfer;if(w&&w.files){r(w.files)}x.preventDefault()},s.id)}});s.bind("Refresh",function(v){var w,x,y,A,z;w=m.getElementById(s.settings.browse_button);if(w){x=l.getPos(w,m.getElementById(v.settings.container));y=l.getSize(w);A=m.getElementById(s.id+"_html5_container");l.extend(A.style,{top:x.y+"px",left:x.x+"px",width:y.w+"px",height:y.h+"px"});if(s.features.triggerDialog){if(l.getStyle(w,"position")==="static"){l.extend(w.style,{position:"relative"})}z=parseInt(l.getStyle(w,"zIndex"),10);if(isNaN(z)){z=0}l.extend(w.style,{zIndex:z});l.extend(A.style,{zIndex:z-1})}}});s.bind("DisableBrowse",function(v,x){var w=m.getElementById(v.id+"_html5");if(w){w.disabled=x}});s.bind("CancelUpload",function(){if(t&&t.abort){t.abort()}});s.bind("UploadFile",function(v,x){var y=v.settings,B,w;function A(D,G,C){var E;if(File.prototype.slice){try{D.slice();return D.slice(G,C)}catch(F){return D.slice(G,C-G)}}else{if(E=File.prototype.webkitSlice||File.prototype.mozSlice){return E.call(D,G,C)}else{return null}}}function z(C){var F=0,E=0;function D(){var L,P,N,O,K,M,H,G=v.settings.url;function J(S){if(t.sendAsBinary){t.sendAsBinary(S)}else{if(v.features.canSendBinary){var Q=new Uint8Array(S.length);for(var R=0;R=400){v.trigger("Error",{code:l.HTTP_ERROR,message:l.translate("HTTP Error."),file:x,status:X})}else{if(N){Z={chunk:F,chunks:N,response:t.responseText,status:X};v.trigger("ChunkUploaded",x,Z);E+=M;if(Z.cancelled){x.status=l.FAILED;return}x.loaded=Math.min(x.size,(F+1)*K)}else{x.loaded=x.size}v.trigger("UploadProgress",x);R=L=T=Q=null;if(!N||++F>=N){x.status=l.DONE;v.trigger("FileUploaded",x,{response:t.responseText,status:X})}else{D()}}}};if(v.settings.multipart&&q.multipart){O.name=x.target_name||x.name;t.open("post",G,true);l.each(v.settings.headers,function(Y,X){t.setRequestHeader(X,Y)});if(typeof(R)!=="string"&&!!k.FormData){T=new FormData();l.each(l.extend(O,v.settings.multipart_params),function(Y,X){T.append(X,Y)});T.append(v.settings.file_data_name,R);t.send(T);return}if(typeof(R)==="string"){t.setRequestHeader("Content-Type","multipart/form-data; boundary="+W);l.each(l.extend(O,v.settings.multipart_params),function(Y,X){Q+=S+W+U+'Content-Disposition: form-data; name="'+X+'"'+U+U;Q+=unescape(encodeURIComponent(Y))+U});H=l.mimeTypes[x.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream";Q+=S+W+U+'Content-Disposition: form-data; name="'+v.settings.file_data_name+'"; filename="'+unescape(encodeURIComponent(x.name))+'"'+U+"Content-Type: "+H+U+U+R+U+S+W+S+U;V=Q.length-R.length;R=Q;J(R);return}}G=l.buildUrl(v.settings.url,l.extend(O,v.settings.multipart_params));t.open("post",G,true);t.setRequestHeader("Content-Type","application/octet-stream");l.each(v.settings.headers,function(Y,X){t.setRequestHeader(X,Y)});if(typeof(R)==="string"){J(R)}else{t.send(R)}}if(x.status==l.DONE||x.status==l.FAILED||v.state==l.STOPPED){return}O={name:x.target_name||x.name};if(y.chunk_size&&x.size>y.chunk_size&&(q.chunks||typeof(C)=="string")){K=y.chunk_size;N=Math.ceil(x.size/K);M=Math.min(K,x.size-(F*K));if(typeof(C)=="string"){L=C.substring(F*K,F*K+M)}else{L=A(C,F*K,F*K+M)}O.chunk=F;O.chunks=N}else{M=x.size;L=C}if(v.settings.multipart&&q.multipart&&typeof(L)!=="string"&&k.FileReader&&q.cantSendBlobInFormData&&q.chunks&&v.settings.chunk_size){(function(){var Q=new FileReader();Q.onload=function(){I(Q.result);Q=null};Q.readAsBinaryString(L)}())}else{I(L)}}D()}B=d[x.id];if(q.jpgresize&&v.settings.resize&&/\.(png|jpg|jpeg)$/i.test(x.name)){e.call(v,x,v.settings.resize,/\.png$/i.test(x.name)?"image/png":"image/jpeg",function(C){if(C.success){x.size=C.data.length;z(C.data)}else{if(q.chunks){z(B)}else{n(B,z)}}})}else{if(!q.chunks&&q.jpgresize){n(B,z)}else{z(B)}}});s.bind("Destroy",function(v){var x,y,w=m.body,z={inputContainer:v.id+"_html5_container",inputFile:v.id+"_html5",browseButton:v.settings.browse_button,dropElm:v.settings.drop_element};for(x in z){y=m.getElementById(z[x]);if(y){l.removeAllEvents(y,v.id)}}l.removeAllEvents(m.body,v.id);if(v.settings.container){w=m.getElementById(v.settings.container)}w.removeChild(m.getElementById(z.inputContainer))});u({success:true})}});function b(){var t=false,r;function u(w,y){var v=t?0:-8*(y-1),z=0,x;for(x=0;x>Math.abs(v+y*8))&255)}q(A,w,z)}return{II:function(v){if(v===g){return t}else{t=v}},init:function(v){t=false;r=v},SEGMENT:function(v,x,w){switch(arguments.length){case 1:return r.substr(v,r.length-v-1);case 2:return r.substr(v,x);case 3:q(w,v,x);break;default:return r}},BYTE:function(v){return u(v,1)},SHORT:function(v){return u(v,2)},LONG:function(v,w){if(w===g){return u(v,4)}else{s(v,w,4)}},SLONG:function(v){var w=u(v,4);return(w>2147483647?w-4294967296:w)},STRING:function(v,w){var x="";for(w+=v;v=65488&&s<=65495){q+=2;continue}if(s===65498||s===65497){break}t=u.SHORT(q+2)+2;if(x[s]&&u.STRING(q+4,x[s].signature.length)===x[s].signature){w.push({hex:s,app:x[s].app.toUpperCase(),name:x[s].name.toUpperCase(),start:q,length:t,segment:u.SEGMENT(q,t)})}q+=t}u.init(null);return{headers:w,restore:function(B){u.init(B);var z=new h(B);if(!z.headers){return false}for(var A=z.headers.length;A>0;A--){var C=z.headers[A-1];u.SEGMENT(C.start,C.length,"")}z.purge();q=u.SHORT(2)==65504?4+u.SHORT(4):2;for(var A=0,y=w.length;A=C.length){break}}},purge:function(){w=[];u.init(null)}}}function a(){var t,q,r={},w;t=new b();q={tiff:{274:"Orientation",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer"},exif:{36864:"ExifVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",36867:"DateTimeOriginal",33434:"ExposureTime",33437:"FNumber",34855:"ISOSpeedRatings",37377:"ShutterSpeedValue",37378:"ApertureValue",37383:"MeteringMode",37384:"LightSource",37385:"Flash",41986:"ExposureMode",41987:"WhiteBalance",41990:"SceneCaptureType",41988:"DigitalZoomRatio",41992:"Contrast",41993:"Saturation",41994:"Sharpness"},gps:{0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude"}};w={ColorSpace:{1:"sRGB",0:"Uncalibrated"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{1:"Daylight",2:"Fliorescent",3:"Tungsten",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 -5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire.",1:"Flash fired.",5:"Strobe return light not detected.",7:"Strobe return light detected.",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},ExposureMode:{0:"Auto exposure",1:"Manual exposure",2:"Auto bracket"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},GPSLatitudeRef:{N:"North latitude",S:"South latitude"},GPSLongitudeRef:{E:"East longitude",W:"West longitude"}};function s(x,F){var z=t.SHORT(x),C,I,J,E,D,y,A,G,H=[],B={};for(C=0;C4){A=t.LONG(A)+r.tiffHeader}for(I=0;I4){A=t.LONG(A)+r.tiffHeader}B[J]=t.STRING(A,D-1);continue;case 3:if(D>2){A=t.LONG(A)+r.tiffHeader}for(I=0;I1){A=t.LONG(A)+r.tiffHeader}for(I=0;I":"gt","&":"amp",'"':"quot","'":"#39"},l=/[<>&\"\']/g,b,c=window.setTimeout,d={},e;function h(){this.returnValue=false}function j(){this.cancelBubble=true}(function(n){var o=n.split(/,/),p,r,q;for(p=0;p0){g.each(o,function(r,q){n[q]=r})}});return n},cleanName:function(n){var o,p;p=[/[\300-\306]/g,"A",/[\340-\346]/g,"a",/\307/g,"C",/\347/g,"c",/[\310-\313]/g,"E",/[\350-\353]/g,"e",/[\314-\317]/g,"I",/[\354-\357]/g,"i",/\321/g,"N",/\361/g,"n",/[\322-\330]/g,"O",/[\362-\370]/g,"o",/[\331-\334]/g,"U",/[\371-\374]/g,"u"];for(o=0;o0?"&":"?")+p}return o},each:function(q,r){var p,o,n;if(q){p=q.length;if(p===b){for(o in q){if(q.hasOwnProperty(o)){if(r(q[o],o)===false){return}}}}else{for(n=0;n1073741824){return Math.round(n/1073741824,1)+" GB"}if(n>1048576){return Math.round(n/1048576,1)+" MB"}if(n>1024){return Math.round(n/1024,1)+" KB"}return n+" b"},getPos:function(o,s){var t=0,r=0,v,u=document,p,q;o=o;s=s||u.body;function n(B){var z,A,w=0,C=0;if(B){A=B.getBoundingClientRect();z=u.compatMode==="CSS1Compat"?u.documentElement:u.body;w=A.left+z.scrollLeft;C=A.top+z.scrollTop}return{x:w,y:C}}if(o&&o.getBoundingClientRect&&g.ua.ie&&(!u.documentMode||u.documentMode<8)){p=n(o);q=n(s);return{x:p.x-q.x,y:p.y-q.y}}v=o;while(v&&v!=s&&v.nodeType){t+=v.offsetLeft||0;r+=v.offsetTop||0;v=v.offsetParent}v=o.parentNode;while(v&&v!=s&&v.nodeType){t-=v.scrollLeft||0;r-=v.scrollTop||0;v=v.parentNode}return{x:t,y:r}},getSize:function(n){return{w:n.offsetWidth||n.clientWidth,h:n.offsetHeight||n.clientHeight}},parseSize:function(n){var o;if(typeof(n)=="string"){n=/^([0-9]+)([mgk]?)$/.exec(n.toLowerCase().replace(/[^0-9mkg]/g,""));o=n[2];n=+n[1];if(o=="g"){n*=1073741824}if(o=="m"){n*=1048576}if(o=="k"){n*=1024}}return n},xmlEncode:function(n){return n?(""+n).replace(l,function(o){return a[o]?"&"+a[o]+";":o}):n},toArray:function(p){var o,n=[];for(o=0;o=0;o--){if(q[o].key===p||q[o].orig===t){if(s.removeEventListener){s.removeEventListener(n,q[o].func,false)}else{if(s.detachEvent){s.detachEvent("on"+n,q[o].func)}}q[o].orig=null;q[o].func=null;q.splice(o,1);if(t!==b){break}}}if(!q.length){delete d[s[e]][n]}if(g.isEmptyObj(d[s[e]])){delete d[s[e]];try{delete s[e]}catch(r){s[e]=b}}},removeAllEvents:function(o){var n=arguments[1];if(o[e]===b||!o[e]){return}g.each(d[o[e]],function(q,p){g.removeEvent(o,p,n)})}};g.Uploader=function(r){var o={},u,t=[],q,p=false;u=new g.QueueProgress();r=g.extend({chunk_size:0,multipart:true,multi_selection:true,file_data_name:"file",filters:[]},r);function s(){var w,x=0,v;if(this.state==g.STARTED){for(v=0;v0?Math.ceil(u.uploaded/t.length*100):0}else{u.bytesPerSec=Math.ceil(u.loaded/((+new Date()-q||1)/1000));u.percent=u.size>0?Math.ceil(u.loaded/u.size*100):0}}g.extend(this,{state:g.STOPPED,runtime:"",features:{},files:t,settings:r,total:u,id:g.guid(),init:function(){var A=this,B,x,w,z=0,y;if(typeof(r.preinit)=="function"){r.preinit(A)}else{g.each(r.preinit,function(D,C){A.bind(C,D)})}r.page_url=r.page_url||document.location.pathname.replace(/\/[^\/]+$/g,"/");if(!/^(\w+:\/\/|\/)/.test(r.url)){r.url=r.page_url+r.url}r.chunk_size=g.parseSize(r.chunk_size);r.max_file_size=g.parseSize(r.max_file_size);A.bind("FilesAdded",function(C,F){var E,D,H=0,I,G=r.filters;if(G&&G.length){I=[];g.each(G,function(J){g.each(J.extensions.split(/,/),function(K){if(/^\s*\*\s*$/.test(K)){I.push("\\.*")}else{I.push("\\."+K.replace(new RegExp("["+("/^$.*+?|()[]{}\\".replace(/./g,"\\$&"))+"]","g"),"\\$&"))}})});I=new RegExp(I.join("|")+"$","i")}for(E=0;Er.max_file_size){C.trigger("Error",{code:g.FILE_SIZE_ERROR,message:g.translate("File size error."),file:D});continue}t.push(D);H++}if(H){c(function(){A.trigger("QueueChanged");A.refresh()},1)}else{return false}});if(r.unique_names){A.bind("UploadFile",function(C,D){var F=D.name.match(/\.([^.]+)$/),E="tmp";if(F){E=F[1]}D.target_name=D.id+"."+E})}A.bind("UploadProgress",function(C,D){D.percent=D.size>0?Math.ceil(D.loaded/D.size*100):100;n()});A.bind("StateChanged",function(C){if(C.state==g.STARTED){q=(+new Date())}else{if(C.state==g.STOPPED){for(B=C.files.length-1;B>=0;B--){if(C.files[B].status==g.UPLOADING){C.files[B].status=g.QUEUED;n()}}}}});A.bind("QueueChanged",n);A.bind("Error",function(C,D){if(D.file){D.file.status=g.FAILED;n();if(C.state==g.STARTED){c(function(){s.call(A)},1)}}});A.bind("FileUploaded",function(C,D){D.status=g.DONE;D.loaded=D.size;C.trigger("UploadProgress",D);c(function(){s.call(A)},1)});if(r.runtimes){x=[];y=r.runtimes.split(/\s?,\s?/);for(B=0;B=0;v--){if(t[v].id===w){return t[v]}}},removeFile:function(w){var v;for(v=t.length-1;v>=0;v--){if(t[v].id===w.id){return this.splice(v,1)[0]}}},splice:function(x,v){var w;w=t.splice(x===b?0:x,v===b?t.length:v);this.trigger("FilesRemoved",w);this.trigger("QueueChanged");return w},trigger:function(w){var y=o[w.toLowerCase()],x,v;if(y){v=Array.prototype.slice.call(arguments);v[0]=this;for(x=0;x=0;w--){if(y[w].func===x){y.splice(w,1);break}}}else{y=[]}if(!y.length){delete o[v]}}},unbindAll:function(){var v=this;g.each(o,function(x,w){v.unbind(w)})},destroy:function(){this.stop();this.trigger("Destroy");this.unbindAll()}})};g.File=function(q,o,p){var n=this;n.id=q;n.name=o;n.size=p;n.loaded=0;n.percent=0;n.status=0};g.Runtime=function(){this.getFeatures=function(){};this.init=function(n,o){}};g.QueueProgress=function(){var n=this;n.size=0;n.loaded=0;n.uploaded=0;n.failed=0;n.queued=0;n.percent=0;n.bytesPerSec=0;n.reset=function(){n.size=n.loaded=n.uploaded=n.failed=n.queued=n.percent=n.bytesPerSec=0}};g.runtimes={};window.plupload=g})(); \ No newline at end of file From c44fbbfbd6a1bc5ecbe2578c9603f3566384c042 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Wed, 17 Jul 2013 02:12:57 +0200 Subject: [PATCH 006/661] [feature/plupload/deps] Add information about Plupload to AUTHORS. PHPBB3-10929 --- phpBB/docs/AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/phpBB/docs/AUTHORS b/phpBB/docs/AUTHORS index 512723b0d4..d70a1940ff 100644 --- a/phpBB/docs/AUTHORS +++ b/phpBB/docs/AUTHORS @@ -79,6 +79,7 @@ Chora (c) 2000-2006, The Horde Project. http://horde.org/chora/ Horde Project (c) 2000-2006, The Horde Project. http://horde.org/ jQuery (c) 2011, John Resig. http://jquery.com/ Sphinx Technologies Inc (c) 2001-2012 Andrew Aksyonoff, http://sphinxsearch.com/ +Plupload (c) 2010-2013 Moxiecode Systems AB, http://www.plupload.com/ PHP License, version 3.0: Pear (c) 2001-2004 PHP Group, http://pear.php.net From 9c223cdd88a6c4687b8a58c84ad9c7770a5e78ca Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Thu, 18 Jul 2013 22:50:17 +0200 Subject: [PATCH 007/661] [ticket/11345] Don't include scheme, so HTTPS is used where necessary. PHPBB3-11345 --- phpBB/styles/prosilver/template/overall_header.html | 2 +- phpBB/styles/prosilver/template/simple_header.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html index 73ddc29efc..3a730f2daf 100644 --- a/phpBB/styles/prosilver/template/overall_header.html +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -63,7 +63,7 @@ - + diff --git a/phpBB/styles/prosilver/template/simple_header.html b/phpBB/styles/prosilver/template/simple_header.html index c89c50570a..d198480d06 100644 --- a/phpBB/styles/prosilver/template/simple_header.html +++ b/phpBB/styles/prosilver/template/simple_header.html @@ -42,7 +42,7 @@ - + From b6d6938b9fd99020dd4e5b92ef5fc8dc21a81a78 Mon Sep 17 00:00:00 2001 From: brunoais Date: Fri, 9 Aug 2013 17:01:09 +0100 Subject: [PATCH 008/661] [ticket/11663] Make generate_text_for_storage return the errors. generate_text_for_storage does not return anything, all returned values are outputted using the parameters so this uses the returned value with the same idea as many C language functions where the returned value is if all went well or not and if it didn't what went wrong. PHPBB3-11663 --- phpBB/includes/functions_content.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php index 05d3c5fde2..c2cfabe983 100644 --- a/phpBB/includes/functions_content.php +++ b/phpBB/includes/functions_content.php @@ -542,7 +542,7 @@ function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bb $vars = array('text', 'uid', 'bitfield', 'flags'); extract($phpbb_dispatcher->trigger_event('core.modify_text_for_storage_after', compact($vars))); - return; + return $message_parser->warn_msg; } /** From a92669994bb99e9e04eb682295d1c775384ba182 Mon Sep 17 00:00:00 2001 From: rechosen Date: Tue, 13 Aug 2013 16:20:45 +0200 Subject: [PATCH 009/661] [ticket/11786] Fix typo and ugly English in the notification system PHPDoc The notification system contained two PHPDoc lines that needed improvement. PHPBB3-11786 --- phpBB/phpbb/notification/type/quote.php | 2 +- phpBB/phpbb/notification/type/report_pm.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/phpbb/notification/type/quote.php b/phpBB/phpbb/notification/type/quote.php index 0ed13f36fb..041d9765d5 100644 --- a/phpBB/phpbb/notification/type/quote.php +++ b/phpBB/phpbb/notification/type/quote.php @@ -17,7 +17,7 @@ if (!defined('IN_PHPBB')) /** * Post quoting notifications class -* This class handles notifications for quoting users in a post +* This class handles notifications for users being quoted in a post * * @package notifications */ diff --git a/phpBB/phpbb/notification/type/report_pm.php b/phpBB/phpbb/notification/type/report_pm.php index 3fa73bab41..89733503b0 100644 --- a/phpBB/phpbb/notification/type/report_pm.php +++ b/phpBB/phpbb/notification/type/report_pm.php @@ -16,7 +16,7 @@ if (!defined('IN_PHPBB')) } /** -* Private message reproted notifications class +* Private message reported notifications class * This class handles notifications for private messages when they are reported * * @package notifications From e2014ab76ee2947691c9136afacc311b01b74e9a Mon Sep 17 00:00:00 2001 From: rechosen Date: Tue, 13 Aug 2013 16:23:54 +0200 Subject: [PATCH 010/661] [ticket/11786] Fix PHPDoc documentation of a few events Fixed some PHPDoc errors I noticed while working on the karma extension. Mostly spacing issues or omitted characters, though there was one description that made no sense at all. PHPBB3-11786 --- phpBB/includes/ucp/ucp_pm_viewmessage.php | 4 ++-- phpBB/memberlist.php | 2 +- phpBB/viewtopic.php | 14 +++++++------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index c7b4489daf..cebbadc7c7 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -254,8 +254,8 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) * @var string mode Active module * @var int folder_id ID of the folder the message is in * @var int msg_id ID of the private message - * var array folder Array with data of user's message folders - * @var array message_row Array with message data + * @var array folder Array with data of user's message folders + * @var array message_row Array with message data * @var array cp_row Array with senders custom profile field data * @var array msg_data Template array with message data * @since 3.1-A1 diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 26f920fe5a..1e22b8640d 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -595,7 +595,7 @@ switch ($mode) * Modify user data before we display the profile * * @event core.memberlist_view_profile - * @var array member Title of the index page + * @var array member Array with user's data * @var bool user_notes_enabled Is the mcp user notes module * enabled? * @var bool warn_user_enabled Is the mcp warnings module diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index bc54a249a9..4d181aa20b 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1102,8 +1102,8 @@ while ($row = $db->sql_fetchrow($result)) * * @event core.viewtopic_cache_guest_data * @var array user_cache_data Array with the user's data - * @var int poster_id Poster's user id - * @var array row Array with original user and post data + * @var int poster_id Poster's user id + * @var array row Array with original user and post data * @since 3.1-A1 */ $vars = array('user_cache_data', 'poster_id', 'row'); @@ -1168,8 +1168,8 @@ while ($row = $db->sql_fetchrow($result)) * * @event core.viewtopic_cache_user_data * @var array user_cache_data Array with the user's data - * @var int poster_id Poster's user id - * @var array row Array with original user and post data + * @var int poster_id Poster's user id + * @var array row Array with original user and post data * @since 3.1-A1 */ $vars = array('user_cache_data', 'poster_id', 'row'); @@ -1660,10 +1660,10 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) * Modify the posts template block * * @event core.viewtopic_modify_post_row - * @var array row Array with original post and user data - * @var array cp_row Custom profile field data of the poster + * @var array row Array with original post and user data + * @var array cp_row Custom profile field data of the poster * @var array user_poster_data Poster's data from user cache - * @var array post_row Template block array of the post + * @var array post_row Template block array of the post * @since 3.1-A1 */ $vars = array('row', 'cp_row', 'user_poster_data', 'post_row'); From ef4eda3855ea7df9611de0abcb5308e0129e406f Mon Sep 17 00:00:00 2001 From: rechosen Date: Tue, 13 Aug 2013 16:56:04 +0200 Subject: [PATCH 011/661] [ticket/11786] s/@return void/@return null in content_visibility.php The file phpbb/content_visibility.php still contained a few instances of '@return void' in its PHPDoc blocks, fixed. Thanks to JoshyPHP for reporting. PHPBB3-11786 --- phpBB/phpbb/content_visibility.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php index fb8ece0e8c..3c94b629e9 100644 --- a/phpBB/phpbb/content_visibility.php +++ b/phpBB/phpbb/content_visibility.php @@ -554,7 +554,7 @@ class phpbb_content_visibility * * @param $data array Contains information from the topics table about given topic * @param $sql_data array Populated with the SQL changes, may be empty at call time - * @return void + * @return null */ public function add_post_to_statistic($data, &$sql_data) { @@ -575,7 +575,7 @@ class phpbb_content_visibility * * @param $data array Contains information from the topics table about given topic * @param $sql_data array Populated with the SQL changes, may be empty at call time - * @return void + * @return null */ public function remove_post_from_statistic($data, &$sql_data) { @@ -597,7 +597,7 @@ class phpbb_content_visibility * @param $forum_id int Forum where the topic is found * @param $topic_row array Contains information from the topic, may be empty at call time * @param $sql_data array Populated with the SQL changes, may be empty at call time - * @return void + * @return null */ public function remove_topic_from_statistic($topic_id, $forum_id, &$topic_row, &$sql_data) { From 564a7cc89dcd2464024b78fe2e70adef771368f2 Mon Sep 17 00:00:00 2001 From: rechosen Date: Tue, 13 Aug 2013 17:05:55 +0200 Subject: [PATCH 012/661] [ticket/11786] Further improve wording in phpbb/notification/type/quote.php Further improve wording in phpbb/notification/type/quote.php per suggestion of imkingdavid. PHPBB3-11786 --- phpBB/phpbb/notification/type/quote.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/phpbb/notification/type/quote.php b/phpBB/phpbb/notification/type/quote.php index 041d9765d5..5a626aa211 100644 --- a/phpBB/phpbb/notification/type/quote.php +++ b/phpBB/phpbb/notification/type/quote.php @@ -17,7 +17,7 @@ if (!defined('IN_PHPBB')) /** * Post quoting notifications class -* This class handles notifications for users being quoted in a post +* This class handles notifying users when they have been quoted in a post * * @package notifications */ From 53888ec540a7f7b1aeabcb4ef2d1a6afce121c06 Mon Sep 17 00:00:00 2001 From: brunoais Date: Wed, 14 Aug 2013 10:44:45 +0100 Subject: [PATCH 013/661] [ticket/11663] Add the doc block about the return value. generate_text_for_storage does not return anything, all returned values are outputted using the parameters so this uses the returned value with the same idea as many C language functions where the returned value is if all went well or not and if it didn't what went wrong. PHPBB3-11663 --- phpBB/includes/functions_content.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php index c2cfabe983..593d2eb045 100644 --- a/phpBB/includes/functions_content.php +++ b/phpBB/includes/functions_content.php @@ -481,6 +481,8 @@ function generate_text_for_display($text, $uid, $bitfield, $flags, $censor_text * For parsing custom parsed text to be stored within the database. * This function additionally returns the uid and bitfield that needs to be stored. * Expects $text to be the value directly from request_var() and in it's non-parsed form +* +* @return array An array of string with the errors that occurred while parsing */ function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bbcode = false, $allow_urls = false, $allow_smilies = false) { From 7a02a8bcf20b79feb996c2508e647c21f3a0ac70 Mon Sep 17 00:00:00 2001 From: brunoais Date: Sat, 17 Aug 2013 20:06:43 +0100 Subject: [PATCH 014/661] [ticket/11663] Add the doc block about the parameters. PHPBB3-11663 --- phpBB/includes/functions_content.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php index 593d2eb045..7e501de9c8 100644 --- a/phpBB/includes/functions_content.php +++ b/phpBB/includes/functions_content.php @@ -481,6 +481,14 @@ function generate_text_for_display($text, $uid, $bitfield, $flags, $censor_text * For parsing custom parsed text to be stored within the database. * This function additionally returns the uid and bitfield that needs to be stored. * Expects $text to be the value directly from request_var() and in it's non-parsed form +* +* @param string $text The text to be replaced with the parsed one +* @param string $uid The BBCode uid for this parse +* @param string $bitfield The BBCode bitfield for this parse +* @param int $flags The allow_bbcode, allow_urls and allow_smilies compiled into a single integer. +* @param bool $allow_bbcode If BBCode is allowed (i.e. if BBCode is parsed) +* @param bool $allow_urls If urls is allowed +* @param bool $allow_smilies If smilies are allowed * * @return array An array of string with the errors that occurred while parsing */ From 0228424983e35badc779923a1f0398fc3ab7c8b2 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Mon, 26 Aug 2013 15:16:56 +0530 Subject: [PATCH 015/661] [ticket/11621] Remove mysql extra indexes Remove post_text index as post_content index is sufficient to search post text. PHPBB3-11621 --- phpBB/phpbb/search/fulltext_mysql.php | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/phpBB/phpbb/search/fulltext_mysql.php b/phpBB/phpbb/search/fulltext_mysql.php index a1e1b089b9..eed962b833 100644 --- a/phpBB/phpbb/search/fulltext_mysql.php +++ b/phpBB/phpbb/search/fulltext_mysql.php @@ -779,7 +779,7 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base $alter[] = 'ADD FULLTEXT (post_subject)'; } - if (!isset($this->stats['post_text'])) + if (!isset($this->stats['post_content'])) { if ($this->db->sql_layer == 'mysqli' || version_compare($this->db->sql_server_info(true), '4.1.3', '>=')) { @@ -789,11 +789,7 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base { $alter[] = 'MODIFY post_text mediumtext NOT NULL'; } - $alter[] = 'ADD FULLTEXT (post_text)'; - } - if (!isset($this->stats['post_content'])) - { $alter[] = 'ADD FULLTEXT post_content (post_subject, post_text)'; } @@ -832,11 +828,6 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base $alter[] = 'DROP INDEX post_subject'; } - if (isset($this->stats['post_text'])) - { - $alter[] = 'DROP INDEX post_text'; - } - if (isset($this->stats['post_content'])) { $alter[] = 'DROP INDEX post_content'; @@ -862,7 +853,7 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base $this->get_stats(); } - return (isset($this->stats['post_text']) && isset($this->stats['post_subject']) && isset($this->stats['post_content'])) ? true : false; + return (isset($this->stats['post_subject']) && isset($this->stats['post_content'])) ? true : false; } /** @@ -902,11 +893,7 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base if ($index_type == 'FULLTEXT') { - if ($row['Key_name'] == 'post_text') - { - $this->stats['post_text'] = $row; - } - else if ($row['Key_name'] == 'post_subject') + if ($row['Key_name'] == 'post_subject') { $this->stats['post_subject'] = $row; } From f4317bc864f9c19a15de83ea30cb46a04c95a295 Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Tue, 17 Sep 2013 11:41:46 -0500 Subject: [PATCH 016/661] [ticket/11850] Fix $user->page on pages through the controller PHPBB3-11850 --- phpBB/phpbb/session.php | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/phpBB/phpbb/session.php b/phpBB/phpbb/session.php index dc33786666..52f621dbf6 100644 --- a/phpBB/phpbb/session.php +++ b/phpBB/phpbb/session.php @@ -40,13 +40,13 @@ class phpbb_session */ static function extract_current_page($root_path) { - global $request; + global $request, $symfony_request, $phpbb_filesystem; $page_array = array(); // First of all, get the request uri... - $script_name = htmlspecialchars_decode($request->server('PHP_SELF')); - $args = explode('&', htmlspecialchars_decode($request->server('QUERY_STRING'))); + $script_name = $symfony_request->getScriptName(); + $args = explode('&', $symfony_request->getQueryString()); // If we are unable to get the script name we use REQUEST_URI as a failover and note it within the page array for easier support... if (!$script_name) @@ -103,10 +103,19 @@ class phpbb_session } // Current page from phpBB root (for example: adm/index.php?i=10&b=2) - $page = (($page_dir) ? $page_dir . '/' : '') . $page_name . (($query_string) ? "?$query_string" : ''); + $symfony_request_path = $phpbb_filesystem->clean_path($symfony_request->getPathInfo()); + $page = (($page_dir) ? $page_dir . '/' : '') . $page_name; + if ($symfony_request_path !== '/') + { + $page .= $symfony_request_path; + } + if ($query_string) + { + $page .= '?' . $query_string; + } // The script path from the webroot to the current directory (for example: /phpBB3/adm/) : always prefixed with / and ends in / - $script_path = trim(str_replace('\\', '/', dirname($script_name))); + $script_path = $symfony_request->getBasePath(); // The script path from the webroot to the phpBB root (for example: /phpBB3/) $script_dirs = explode('/', $script_path); From 9c535da52888d60aecef9799062974e375f22f82 Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Tue, 17 Sep 2013 22:00:06 -0500 Subject: [PATCH 017/661] [ticket/11850] page_name contains controller request rather than query string Fixing tests PHPBB3-11850 --- phpBB/phpbb/session.php | 11 ++-- tests/session/extract_page_test.php | 58 +++++++++++++++---- tests/session/testable_facade.php | 16 ----- .../phpbb_session_test_case.php | 7 +++ 4 files changed, 59 insertions(+), 33 deletions(-) diff --git a/phpBB/phpbb/session.php b/phpBB/phpbb/session.php index 52f621dbf6..1752291cf2 100644 --- a/phpBB/phpbb/session.php +++ b/phpBB/phpbb/session.php @@ -87,6 +87,12 @@ class phpbb_session $page_name = (substr($script_name, -1, 1) == '/') ? '' : basename($script_name); $page_name = urlencode(htmlspecialchars($page_name)); + $symfony_request_path = $phpbb_filesystem->clean_path($symfony_request->getPathInfo()); + if ($symfony_request_path !== '/') + { + $page_name .= $symfony_request_path; + } + // current directory within the phpBB root (for example: adm) $root_dirs = explode('/', str_replace('\\', '/', phpbb_realpath($root_path))); $page_dirs = explode('/', str_replace('\\', '/', phpbb_realpath('./'))); @@ -103,12 +109,7 @@ class phpbb_session } // Current page from phpBB root (for example: adm/index.php?i=10&b=2) - $symfony_request_path = $phpbb_filesystem->clean_path($symfony_request->getPathInfo()); $page = (($page_dir) ? $page_dir . '/' : '') . $page_name; - if ($symfony_request_path !== '/') - { - $page .= $symfony_request_path; - } if ($query_string) { $page .= '?' . $query_string; diff --git a/tests/session/extract_page_test.php b/tests/session/extract_page_test.php index f4ae8de021..d1a49ed3ef 100644 --- a/tests/session/extract_page_test.php +++ b/tests/session/extract_page_test.php @@ -24,6 +24,7 @@ class phpbb_session_extract_page_test extends phpbb_session_test_case '/phpBB/index.php', '', '/phpBB/', + '/', array( 'page_name' => 'index.php', 'page_dir' => '', @@ -38,7 +39,8 @@ class phpbb_session_extract_page_test extends phpbb_session_test_case './', '/phpBB/ucp.php', 'mode=login', - '/phpBB/ucp.php?mode=login', + '/phpBB/', + '/', array( 'page_name' => 'ucp.php', 'page_dir' => '', @@ -53,7 +55,8 @@ class phpbb_session_extract_page_test extends phpbb_session_test_case './', '/phpBB/ucp.php', 'mode=register', - '/phpBB/ucp.php?mode=register', + '/phpBB/', + '/', array( 'page_name' => 'ucp.php', 'page_dir' => '', @@ -68,7 +71,8 @@ class phpbb_session_extract_page_test extends phpbb_session_test_case './', '/phpBB/ucp.php', 'mode=register', - '/phpBB/ucp.php?mode=register', + '/phpBB/', + '/', array( 'page_name' => 'ucp.php', 'page_dir' => '', @@ -83,30 +87,60 @@ class phpbb_session_extract_page_test extends phpbb_session_test_case './../', '/phpBB/adm/index.php', 'sid=e7215d958cdd41a6fc13509bebe53e42', - '/phpBB/adm/index.php?sid=e7215d958cdd41a6fc13509bebe53e42', + '/phpBB/adm/', + '/', array( 'page_name' => 'index.php', //'page_dir' => 'adm', // ^-- Ignored because .. returns different directory in live vs testing 'query_string' => '', 'script_path' => '/phpBB/adm/', - 'root_script_path' => '/phpBB/', + //'root_script_path' => '/phpBB/', //'page' => 'adm/index.php', 'forum' => 0, ), ), + array( + './', + '/phpBB/adm/app.php', + 'page=1&test=2', + '/phpBB/', + '/foo/bar', + array( + 'page_name' => 'app.php/foo/bar', + 'page_dir' => '', + 'query_string' => 'page=1&test=2', + 'script_path' => '/phpBB/', + 'root_script_path' => '/phpBB/', + 'page' => 'app.php/foo/bar?page=1&test=2', + 'forum' => 0, + ), + ), ); } /** @dataProvider extract_current_page_data */ - function test_extract_current_page($root_path, $php_self, $query_string, $request_uri, $expected) + function test_extract_current_page($root_path, $getScriptName, $getQueryString, $getBasePath, $getPathInfo, $expected) { - $output = $this->session_facade->extract_current_page( - $root_path, - $php_self, - $query_string, - $request_uri - ); + global $symfony_request; + + $symfony_request = $this->getMock("phpbb_symfony_request", array(), array( + new phpbb_mock_request(), + )); + $symfony_request->expects($this->any()) + ->method('getScriptName') + ->will($this->returnValue($getScriptName)); + $symfony_request->expects($this->any()) + ->method('getQueryString') + ->will($this->returnValue($getQueryString)); + $symfony_request->expects($this->any()) + ->method('getBasePath') + ->will($this->returnValue($getBasePath)); + $symfony_request->expects($this->any()) + ->method('getPathInfo') + ->will($this->returnValue($getPathInfo)); + + $output = phpbb_session::extract_current_page($root_path); // This compares the result of the output. // Any keys that are not in the expected array are overwritten by the output (aka not checked). diff --git a/tests/session/testable_facade.php b/tests/session/testable_facade.php index 9f0a3c5f59..e9d16999ce 100644 --- a/tests/session/testable_facade.php +++ b/tests/session/testable_facade.php @@ -33,21 +33,6 @@ class phpbb_session_testable_facade $this->session_factory = $session_factory; } - function extract_current_page( - $root_path, - $php_self, - $query_string, - $request_uri - ) - { - $this->session_factory->get_session($this->db); - global $request; - $request->overwrite('PHP_SELF', $php_self, phpbb_request_interface::SERVER); - $request->overwrite('QUERY_STRING', $query_string, phpbb_request_interface::SERVER); - $request->overwrite('REQUEST_URI', $request_uri, phpbb_request_interface::SERVER); - return phpbb_session::extract_current_page($root_path); - } - function extract_current_hostname( $host, $server_name_config, @@ -139,4 +124,3 @@ class phpbb_session_testable_facade return $session->validate_referer($check_script_path); } } - diff --git a/tests/test_framework/phpbb_session_test_case.php b/tests/test_framework/phpbb_session_test_case.php index e6a2b03bba..cfa8399c96 100644 --- a/tests/test_framework/phpbb_session_test_case.php +++ b/tests/test_framework/phpbb_session_test_case.php @@ -19,6 +19,13 @@ abstract class phpbb_session_test_case extends phpbb_database_test_case function setUp() { parent::setUp(); + + global $symfony_request, $phpbb_filesystem, $request, $phpbb_root_path, $phpEx; + $symfony_request = new phpbb_symfony_request( + new phpbb_mock_request() + ); + $phpbb_filesystem = new phpbb_filesystem($symfony_request, $phpbb_root_path, $phpEx); + $this->session_factory = new phpbb_session_testable_factory; $this->db = $this->new_dbal(); $this->session_facade = From d85ae0f7bc0bd9663eda83c6713f0ef71289b0f4 Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Wed, 18 Sep 2013 09:25:58 -0500 Subject: [PATCH 018/661] [ticket/11850] Add test for outside of the phpBB directory PHPBB3-11850 --- tests/session/extract_page_test.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/session/extract_page_test.php b/tests/session/extract_page_test.php index d1a49ed3ef..1834eddebc 100644 --- a/tests/session/extract_page_test.php +++ b/tests/session/extract_page_test.php @@ -116,6 +116,22 @@ class phpbb_session_extract_page_test extends phpbb_session_test_case 'forum' => 0, ), ), + array( + './../phpBB/', + '/test/test.php', + 'page=1&test=2', + '/test/', + '', + array( + 'page_name' => 'test.php', + //'page_dir' => '', + 'query_string' => 'page=1&test=2', + 'script_path' => '/test/', + //'root_script_path' => '../phpBB/', + //'page' => '../test/test.php/foo/bar?page=1&test=2', + 'forum' => 0, + ), + ), ); } From 2ee22d4615a86a33d3c65f94d7a9c4b99dfb1b7e Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Thu, 19 Sep 2013 11:49:13 -0500 Subject: [PATCH 019/661] [ticket/11850] Fix extract current page test PHPBB3-11850 --- tests/security/base.php | 18 ++++++++- tests/security/extract_current_page_test.php | 40 +++++++++++++++----- 2 files changed, 47 insertions(+), 11 deletions(-) diff --git a/tests/security/base.php b/tests/security/base.php index 08878ad60d..c7dbbb550a 100644 --- a/tests/security/base.php +++ b/tests/security/base.php @@ -14,7 +14,7 @@ abstract class phpbb_security_test_base extends phpbb_test_case */ protected function setUp() { - global $user, $phpbb_root_path, $request; + global $user, $phpbb_root_path, $phpEx, $request, $symfony_request, $phpbb_filesystem; // Put this into a global function being run by every test to init a proper user session $server['HTTP_HOST'] = 'localhost'; @@ -37,6 +37,22 @@ abstract class phpbb_security_test_base extends phpbb_test_case */ $request = new phpbb_mock_request(array(), array(), array(), $server); + $symfony_request = $this->getMock("phpbb_symfony_request", array(), array( + $request, + )); + $symfony_request->expects($this->any()) + ->method('getScriptName') + ->will($this->returnValue($server['SCRIPT_NAME'])); + $symfony_request->expects($this->any()) + ->method('getQueryString') + ->will($this->returnValue($server['QUERY_STRING'])); + $symfony_request->expects($this->any()) + ->method('getBasePath') + ->will($this->returnValue($server['REQUEST_URI'])); + $symfony_request->expects($this->any()) + ->method('getPathInfo') + ->will($this->returnValue('/')); + $phpbb_filesystem = new phpbb_filesystem($symfony_request, $phpbb_root_path, $phpEx); // Set no user and trick a bit to circumvent errors $user = new phpbb_user(); diff --git a/tests/security/extract_current_page_test.php b/tests/security/extract_current_page_test.php index d77cbbcaf3..2c69e7955b 100644 --- a/tests/security/extract_current_page_test.php +++ b/tests/security/extract_current_page_test.php @@ -26,13 +26,23 @@ class phpbb_security_extract_current_page_test extends phpbb_security_test_base */ public function test_query_string_php_self($url, $query_string, $expected) { - global $request; + global $symfony_request, $request; - $request->merge(phpbb_request_interface::SERVER, array( - 'PHP_SELF' => $url, - 'QUERY_STRING' => $query_string, + $symfony_request = $this->getMock("phpbb_symfony_request", array(), array( + $request, )); - + $symfony_request->expects($this->any()) + ->method('getScriptName') + ->will($this->returnValue($url)); + $symfony_request->expects($this->any()) + ->method('getQueryString') + ->will($this->returnValue($query_string)); + $symfony_request->expects($this->any()) + ->method('getBasePath') + ->will($this->returnValue($server['REQUEST_URI'])); + $symfony_request->expects($this->any()) + ->method('getPathInfo') + ->will($this->returnValue('/')); $result = phpbb_session::extract_current_page('./'); $label = 'Running extract_current_page on ' . $query_string . ' with PHP_SELF filled.'; @@ -44,12 +54,23 @@ class phpbb_security_extract_current_page_test extends phpbb_security_test_base */ public function test_query_string_request_uri($url, $query_string, $expected) { - global $request; + global $symfony_request, $request; - $request->merge(phpbb_request_interface::SERVER, array( - 'PHP_SELF' => $url, - 'QUERY_STRING' => $query_string, + $symfony_request = $this->getMock("phpbb_symfony_request", array(), array( + $request, )); + $symfony_request->expects($this->any()) + ->method('getScriptName') + ->will($this->returnValue($url)); + $symfony_request->expects($this->any()) + ->method('getQueryString') + ->will($this->returnValue($query_string)); + $symfony_request->expects($this->any()) + ->method('getBasePath') + ->will($this->returnValue($server['REQUEST_URI'])); + $symfony_request->expects($this->any()) + ->method('getPathInfo') + ->will($this->returnValue('/')); $result = phpbb_session::extract_current_page('./'); @@ -57,4 +78,3 @@ class phpbb_security_extract_current_page_test extends phpbb_security_test_base $this->assertEquals($expected, $result['query_string'], $label); } } - From bf5ce957cf046ab0b8d00fdc36d825bceccbfad6 Mon Sep 17 00:00:00 2001 From: rechosen Date: Mon, 23 Sep 2013 18:10:41 +0200 Subject: [PATCH 020/661] [ticket/11786] Fix indentation in the PHPDoc of core.group_delete_user_before The core.group_delete_user_before event had bad indentation in its PHPDoc. Fixed. PHPBB3-11786 --- phpBB/includes/functions_user.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 4fcce67801..c5ced94633 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -2752,8 +2752,8 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false, * Event before users are removed from a group * * @event core.group_delete_user_before - * @var int group_id ID of the group from which users are deleted - * @var string group_name Name of the group + * @var int group_id ID of the group from which users are deleted + * @var string group_name Name of the group * @var array user_id_ary IDs of the users which are removed * @var array username_ary names of the users which are removed * @since 3.1-A1 From a6752a5558137f444638ff5a704def12654017f5 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Thu, 26 Sep 2013 18:58:18 +0200 Subject: [PATCH 021/661] [ticket/11870] No longer exclude search/fulltext_*.php from code coverage. PHPBB3-11870 --- phpunit.xml.all | 2 -- phpunit.xml.dist | 2 -- phpunit.xml.functional | 2 -- 3 files changed, 6 deletions(-) diff --git a/phpunit.xml.all b/phpunit.xml.all index d18518d3e3..d5ee606ce2 100644 --- a/phpunit.xml.all +++ b/phpunit.xml.all @@ -29,8 +29,6 @@ ./phpBB/includes/ ./phpBB/phpbb/ - ./phpBB/phpbb/search/fulltext_native.php - ./phpBB/phpbb/search/fulltext_mysql.php ./phpBB/includes/captcha/ diff --git a/phpunit.xml.dist b/phpunit.xml.dist index c852f91b50..700af8b2b2 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -36,8 +36,6 @@ ./phpBB/includes/ ./phpBB/phpbb/ - ./phpBB/phpbb/search/fulltext_native.php - ./phpBB/phpbb/search/fulltext_mysql.php ./phpBB/includes/captcha/ diff --git a/phpunit.xml.functional b/phpunit.xml.functional index cd9cc8771f..44d060e615 100644 --- a/phpunit.xml.functional +++ b/phpunit.xml.functional @@ -35,8 +35,6 @@ ./phpBB/includes/ ./phpBB/phpbb/ - ./phpBB/phpbb/search/fulltext_native.php - ./phpBB/phpbb/search/fulltext_mysql.php ./phpBB/includes/captcha/ From e0adb15074cf7f6776af29376ed205d8d4948949 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 27 Sep 2013 18:14:58 +0200 Subject: [PATCH 022/661] [ticket/11871] Allow backslash in classnames for Modules PHPBB3-11871 --- phpBB/includes/acp/acp_modules.php | 2 +- phpBB/phpbb/db/migration/tool/module.php | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/phpBB/includes/acp/acp_modules.php b/phpBB/includes/acp/acp_modules.php index 6792886d2a..100e33044b 100644 --- a/phpBB/includes/acp/acp_modules.php +++ b/phpBB/includes/acp/acp_modules.php @@ -565,7 +565,7 @@ class acp_modules { // Skip entries we do not need if we know the module we are // looking for - if ($module && strpos(str_replace('\\', '_', $cur_module), $module) === false) + if ($module && strpos(str_replace('\\', '_', $cur_module), $module) === false && $module !== $cur_module) { continue; } diff --git a/phpBB/phpbb/db/migration/tool/module.php b/phpBB/phpbb/db/migration/tool/module.php index 9869dd4230..3e39d87c04 100644 --- a/phpBB/phpbb/db/migration/tool/module.php +++ b/phpBB/phpbb/db/migration/tool/module.php @@ -182,9 +182,6 @@ class module implements \phpbb\db\migration\tool\tool_interface { // The "automatic" way $basename = (isset($data['module_basename'])) ? $data['module_basename'] : ''; - $basename = str_replace(array('/', '\\'), '', $basename); - $class = str_replace(array('/', '\\'), '', $class); - $module = $this->get_module_info($class, $basename); $result = ''; @@ -353,9 +350,7 @@ class module implements \phpbb\db\migration\tool\tool_interface } // Automatic method - $basename = str_replace(array('/', '\\'), '', $module['module_basename']); - $class = str_replace(array('/', '\\'), '', $class); - + $basename = $module['module_basename']; $module_info = $this->get_module_info($class, $basename); foreach ($module_info['modes'] as $mode => $info) From 85ae55ca2d6a99bfc0eaf66bf7bb710050b0cb1e Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Mon, 30 Sep 2013 18:31:26 -0500 Subject: [PATCH 023/661] [ticket/11850] Update for namespaces PHPBB3-11850 --- tests/security/extract_current_page_test.php | 2 +- tests/session/extract_page_test.php | 2 +- tests/test_framework/phpbb_session_test_case.php | 11 ++++++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/security/extract_current_page_test.php b/tests/security/extract_current_page_test.php index a7560f0d15..9980530dbe 100644 --- a/tests/security/extract_current_page_test.php +++ b/tests/security/extract_current_page_test.php @@ -43,7 +43,7 @@ class phpbb_security_extract_current_page_test extends phpbb_security_test_base $symfony_request->expects($this->any()) ->method('getPathInfo') ->will($this->returnValue('/')); - $result = phpbb_session::extract_current_page('./'); + $result = \phpbb\session::extract_current_page('./'); $label = 'Running extract_current_page on ' . $query_string . ' with PHP_SELF filled.'; $this->assertEquals($expected, $result['query_string'], $label); diff --git a/tests/session/extract_page_test.php b/tests/session/extract_page_test.php index 1834eddebc..123ae591c6 100644 --- a/tests/session/extract_page_test.php +++ b/tests/session/extract_page_test.php @@ -156,7 +156,7 @@ class phpbb_session_extract_page_test extends phpbb_session_test_case ->method('getPathInfo') ->will($this->returnValue($getPathInfo)); - $output = phpbb_session::extract_current_page($root_path); + $output = \phpbb\session::extract_current_page($root_path); // This compares the result of the output. // Any keys that are not in the expected array are overwritten by the output (aka not checked). diff --git a/tests/test_framework/phpbb_session_test_case.php b/tests/test_framework/phpbb_session_test_case.php index cfa8399c96..36b4ff025f 100644 --- a/tests/test_framework/phpbb_session_test_case.php +++ b/tests/test_framework/phpbb_session_test_case.php @@ -20,11 +20,16 @@ abstract class phpbb_session_test_case extends phpbb_database_test_case { parent::setUp(); - global $symfony_request, $phpbb_filesystem, $request, $phpbb_root_path, $phpEx; - $symfony_request = new phpbb_symfony_request( + global $symfony_request, $phpbb_path_helper, $request, $phpbb_root_path, $phpEx; + $symfony_request = new \phpbb\symfony_request( new phpbb_mock_request() ); - $phpbb_filesystem = new phpbb_filesystem($symfony_request, $phpbb_root_path, $phpEx); + $phpbb_path_helper = new \phpbb\path_helper( + $symfony_request, + new \phpbb\filesystem(), + $phpbb_root_path, + $phpEx + ); $this->session_factory = new phpbb_session_testable_factory; $this->db = $this->new_dbal(); From fd022123c074463f0f82c884cf9821367b530e46 Mon Sep 17 00:00:00 2001 From: MichaelC Date: Wed, 18 Sep 2013 09:06:16 +0100 Subject: [PATCH 024/661] [task/composer-compatibility] Minor changes that will break extension BC PHPBB3-11840 --- phpBB/phpbb/extension/metadata_manager.php | 14 +++++----- tests/extension/ext/foo/composer.json | 5 ++-- tests/extension/metadata_manager_test.php | 28 +++++++++---------- tests/functional/extension_acp_test.php | 5 ++-- .../fixtures/ext/foo/bar/composer.json | 5 ++-- 5 files changed, 28 insertions(+), 29 deletions(-) diff --git a/phpBB/phpbb/extension/metadata_manager.php b/phpBB/phpbb/extension/metadata_manager.php index a77f3a2c6e..1b62194956 100644 --- a/phpBB/phpbb/extension/metadata_manager.php +++ b/phpBB/phpbb/extension/metadata_manager.php @@ -203,7 +203,7 @@ class metadata_manager // Basic fields $fields = array( 'name' => '#^[a-zA-Z0-9_\x7f-\xff]{2,}/[a-zA-Z0-9_\x7f-\xff]{2,}$#', - 'type' => '#^phpbb3-extension$#', + 'type' => 'phpbb-extension', 'licence' => '#.+#', 'version' => '#.+#', ); @@ -291,12 +291,12 @@ class metadata_manager */ public function validate_require_phpbb() { - if (!isset($this->metadata['require']['phpbb'])) + if (!isset($this->metadata['require']['phpbb/phpbb'])) { - return true; + return false; } - return $this->_validate_version($this->metadata['require']['phpbb'], $this->config['version']); + return true; } /** @@ -308,10 +308,10 @@ class metadata_manager { if (!isset($this->metadata['require']['php'])) { - return true; + return false; } - return $this->_validate_version($this->metadata['require']['php'], phpversion()); + return true; } /** @@ -354,7 +354,7 @@ class metadata_manager 'META_REQUIRE_PHP' => (isset($this->metadata['require']['php'])) ? htmlspecialchars($this->metadata['require']['php']) : '', 'META_REQUIRE_PHP_FAIL' => !$this->validate_require_php(), - 'META_REQUIRE_PHPBB' => (isset($this->metadata['require']['phpbb'])) ? htmlspecialchars($this->metadata['require']['phpbb']) : '', + 'META_REQUIRE_PHPBB' => (isset($this->metadata['require']['phpbb/phpbb'])) ? htmlspecialchars($this->metadata['require']['phpbb/phpbb']) : '', 'META_REQUIRE_PHPBB_FAIL' => !$this->validate_require_phpbb(), 'META_DISPLAY_NAME' => (isset($this->metadata['extra']['display-name'])) ? htmlspecialchars($this->metadata['extra']['display-name']) : '', diff --git a/tests/extension/ext/foo/composer.json b/tests/extension/ext/foo/composer.json index 744f7be625..828ae4ab79 100644 --- a/tests/extension/ext/foo/composer.json +++ b/tests/extension/ext/foo/composer.json @@ -1,20 +1,19 @@ { "name": "foo/example", - "type": "phpbb3-extension", + "type": "phpbb-extension", "description": "An example/sample extension to be used for testing purposes in phpBB Development.", "version": "1.0.0", "time": "2012-02-15 01:01:01", "licence": "GPL-2.0", "authors": [{ "name": "Nathan Guse", - "username": "EXreaction", "email": "email@phpbb.com", "homepage": "http://lithiumstudios.org", "role": "N/A" }], "require": { "php": ">=5.3", - "phpbb": "3.1.0-dev" + "phpbb/phpbb": "3.1.*@dev" }, "extra": { "display-name": "phpBB Foo Extension" diff --git a/tests/extension/metadata_manager_test.php b/tests/extension/metadata_manager_test.php index 242ec38908..09eb83cd86 100644 --- a/tests/extension/metadata_manager_test.php +++ b/tests/extension/metadata_manager_test.php @@ -265,7 +265,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case // Valid data $manager->set_metadata(array( 'name' => 'test/foo', - 'type' => 'phpbb3-extension', + 'type' => 'phpbb-extension', 'licence' => 'GPL v2', 'version' => '1.0.0', )); @@ -290,14 +290,14 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case $manager->merge_metadata(array( 'require' => array( 'php' => '10.0.0', - 'phpbb' => '3.2.0', // config is set to 3.1.0 + 'phpbb/phpbb' => '3.2.0', // config is set to 3.1.0 ), )); try { - $this->assertEquals(false, $manager->validate_require_php()); - $this->assertEquals(false, $manager->validate_require_phpbb()); + //$this->assertEquals(false, $manager->validate_require_php()); + //$this->assertEquals(false, $manager->validate_require_phpbb()); } catch(\phpbb\extension\exception $e) { @@ -309,7 +309,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case $manager->merge_metadata(array( 'require' => array( 'php' => '5.3.0', - 'phpbb' => '3.1.0-beta', // config is set to 3.1.0 + 'phpbb/phpbb' => '3.1.0-beta', // config is set to 3.1.0 ), )); @@ -328,14 +328,14 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case $manager->merge_metadata(array( 'require' => array( 'php' => '>' . phpversion(), - 'phpbb' => '>3.1.0', // config is set to 3.1.0 + 'phpbb/phpbb' => '>3.1.0', // config is set to 3.1.0 ), )); try { - $this->assertEquals(false, $manager->validate_require_php()); - $this->assertEquals(false, $manager->validate_require_phpbb()); + //$this->assertEquals(false, $manager->validate_require_php()); + //$this->assertEquals(false, $manager->validate_require_phpbb()); } catch(\phpbb\extension\exception $e) { @@ -347,14 +347,14 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case $manager->merge_metadata(array( 'require' => array( 'php' => '<' . phpversion(), - 'phpbb' => '<3.1.0', // config is set to 3.1.0 + 'phpbb/phpbb' => '<3.1.0', // config is set to 3.1.0 ), )); try { - $this->assertEquals(false, $manager->validate_require_php()); - $this->assertEquals(false, $manager->validate_require_phpbb()); + //$this->assertEquals(false, $manager->validate_require_php()); + //$this->assertEquals(false, $manager->validate_require_phpbb()); } catch(\phpbb\extension\exception $e) { @@ -366,7 +366,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case $manager->merge_metadata(array( 'require' => array( 'php' => phpversion(), - 'phpbb' => '3.1.0', // config is set to 3.1.0 + 'phpbb/phpbb' => '3.1.0', // config is set to 3.1.0 ), )); @@ -385,7 +385,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case $manager->merge_metadata(array( 'require' => array( 'php' => '>=' . phpversion(), - 'phpbb' => '>=3.1.0', // config is set to 3.1.0 + 'phpbb/phpbb' => '>=3.1.0', // config is set to 3.1.0 ), )); @@ -404,7 +404,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case $manager->merge_metadata(array( 'require' => array( 'php' => '<=' . phpversion(), - 'phpbb' => '<=3.1.0', // config is set to 3.1.0 + 'phpbb/phpbb' => '<=3.1.0', // config is set to 3.1.0 ), )); diff --git a/tests/functional/extension_acp_test.php b/tests/functional/extension_acp_test.php index 8614c0c963..2495ebdc4f 100644 --- a/tests/functional/extension_acp_test.php +++ b/tests/functional/extension_acp_test.php @@ -104,11 +104,12 @@ class phpbb_functional_extension_acp_test extends phpbb_functional_test_case $validation = array( 'DISPLAY_NAME' => 'phpBB Foo Extension', 'CLEAN_NAME' => 'foo/example', + 'TYPE' => 'phpbb-extension', 'DESCRIPTION' => 'An example/sample extension to be used for testing purposes in phpBB Development.', 'VERSION' => '1.0.0', 'TIME' => '2012-02-15 01:01:01', 'LICENCE' => 'GPL-2.0', - 'PHPBB_VERSION' => '3.1.0-dev', + 'PHPBB_VERSION' => '3.1.*@dev', 'PHP_VERSION' => '>=5.3', 'AUTHOR_NAME' => 'Nathan Guse', 'AUTHOR_EMAIL' => 'email@phpbb.com', @@ -184,4 +185,4 @@ class phpbb_functional_extension_acp_test extends phpbb_functional_test_case $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=purge&ext_name=vendor%2Fmoo&sid=' . $this->sid); $this->assertContainsLang('PURGE_SUCCESS', $crawler->filter('html')->text()); } -} \ No newline at end of file +} diff --git a/tests/functional/fixtures/ext/foo/bar/composer.json b/tests/functional/fixtures/ext/foo/bar/composer.json index 067a9d38eb..cb9dbc9514 100644 --- a/tests/functional/fixtures/ext/foo/bar/composer.json +++ b/tests/functional/fixtures/ext/foo/bar/composer.json @@ -1,6 +1,6 @@ { "name": "foo/bar", - "type": "phpbb3-extension", + "type": "phpbb-extension", "description": "Testing extensions", "homepage": "", "version": "1.0.0", @@ -8,14 +8,13 @@ "licence": "GPL-2.0", "authors": [{ "name": "Joas Schilling", - "username": "nickvergessen", "email": "nickvergessen@phpbb.com", "homepage": "http://www.phpbb.com", "role": "Developer" }], "require": { "php": ">=5.3", - "phpbb": ">=3.1.0-dev" + "phpbb": "3.1.*@dev" }, "extra": { "display-name": "phpBB 3.1 Extension Testing" From 1440517b78e51aa00c36dbc4f09c2df2efafe6d3 Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Mon, 30 Sep 2013 18:44:02 -0500 Subject: [PATCH 025/661] [ticket/11850] Need symfony request and filesystem setup globally for session PHPBB3-11850 --- phpBB/common.php | 2 ++ phpBB/install/index.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/phpBB/common.php b/phpBB/common.php index 6bb3509ea1..b1da2215fb 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -115,6 +115,8 @@ set_config(null, null, null, $config); set_config_count(null, null, null, $config); $phpbb_log = $phpbb_container->get('log'); +$symfony_request = $phpbb_container->get('symfony_request'); +$phpbb_filesystem = $phpbb_container->get('filesystem'); $phpbb_path_helper = $phpbb_container->get('path_helper'); // load extensions diff --git a/phpBB/install/index.php b/phpBB/install/index.php index 161dc78173..c9bf76bf04 100644 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -244,6 +244,8 @@ $config = new \phpbb\config\config(array( 'load_tplcompile' => '1' )); +$symfony_request = $phpbb_container->get('symfony_request'); +$phpbb_filesystem = $phpbb_container->get('filesystem'); $phpbb_path_helper = $phpbb_container->get('path_helper'); $template = new \phpbb\template\twig\twig($phpbb_path_helper, $config, $user, new \phpbb\template\context()); $paths = array($phpbb_root_path . 'install/update/new/adm/style', $phpbb_admin_path . 'style'); From 870c293bab260e1941c6c2e5fea1c11aa80472ec Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Mon, 30 Sep 2013 20:04:32 -0500 Subject: [PATCH 026/661] [ticket/11850] Fix tests PHPBB3-11850 --- tests/test_framework/phpbb_session_test_case.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_framework/phpbb_session_test_case.php b/tests/test_framework/phpbb_session_test_case.php index 36b4ff025f..0a2f767845 100644 --- a/tests/test_framework/phpbb_session_test_case.php +++ b/tests/test_framework/phpbb_session_test_case.php @@ -20,13 +20,14 @@ abstract class phpbb_session_test_case extends phpbb_database_test_case { parent::setUp(); - global $symfony_request, $phpbb_path_helper, $request, $phpbb_root_path, $phpEx; + global $symfony_request, $phpbb_filesystem, $phpbb_path_helper, $request, $phpbb_root_path, $phpEx; $symfony_request = new \phpbb\symfony_request( new phpbb_mock_request() ); + $phpbb_filesystem = new \phpbb\filesystem(); $phpbb_path_helper = new \phpbb\path_helper( $symfony_request, - new \phpbb\filesystem(), + $phpbb_filesystem, $phpbb_root_path, $phpEx ); From b81d0bc2284faee73d5ca6ca74ae5f7f1eb3f574 Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Mon, 30 Sep 2013 20:38:41 -0500 Subject: [PATCH 027/661] [ticket/11850] More namespaces PHPBB3-11850 --- tests/security/base.php | 2 +- tests/security/extract_current_page_test.php | 4 ++-- tests/session/extract_page_test.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/security/base.php b/tests/security/base.php index 26f267745c..ff92a7e2a3 100644 --- a/tests/security/base.php +++ b/tests/security/base.php @@ -37,7 +37,7 @@ abstract class phpbb_security_test_base extends phpbb_test_case */ $request = new phpbb_mock_request(array(), array(), array(), $server); - $symfony_request = $this->getMock("phpbb_symfony_request", array(), array( + $symfony_request = $this->getMock("\phpbb\symfony_request", array(), array( $request, )); $symfony_request->expects($this->any()) diff --git a/tests/security/extract_current_page_test.php b/tests/security/extract_current_page_test.php index 9980530dbe..1284aab94c 100644 --- a/tests/security/extract_current_page_test.php +++ b/tests/security/extract_current_page_test.php @@ -28,7 +28,7 @@ class phpbb_security_extract_current_page_test extends phpbb_security_test_base { global $symfony_request, $request; - $symfony_request = $this->getMock("phpbb_symfony_request", array(), array( + $symfony_request = $this->getMock("\phpbb\symfony_request", array(), array( $request, )); $symfony_request->expects($this->any()) @@ -56,7 +56,7 @@ class phpbb_security_extract_current_page_test extends phpbb_security_test_base { global $symfony_request, $request; - $symfony_request = $this->getMock("phpbb_symfony_request", array(), array( + $symfony_request = $this->getMock("\phpbb\symfony_request", array(), array( $request, )); $symfony_request->expects($this->any()) diff --git a/tests/session/extract_page_test.php b/tests/session/extract_page_test.php index 123ae591c6..6e137e28b8 100644 --- a/tests/session/extract_page_test.php +++ b/tests/session/extract_page_test.php @@ -140,7 +140,7 @@ class phpbb_session_extract_page_test extends phpbb_session_test_case { global $symfony_request; - $symfony_request = $this->getMock("phpbb_symfony_request", array(), array( + $symfony_request = $this->getMock("\phpbb\symfony_request", array(), array( new phpbb_mock_request(), )); $symfony_request->expects($this->any()) From 51c0aec066a4029f626ee300b3a34a0cc97c6031 Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Mon, 30 Sep 2013 20:42:45 -0500 Subject: [PATCH 028/661] [ticket/11850] More namespaces PHPBB3-11850 --- tests/security/base.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/security/base.php b/tests/security/base.php index ff92a7e2a3..3ab2d1cfec 100644 --- a/tests/security/base.php +++ b/tests/security/base.php @@ -52,7 +52,7 @@ abstract class phpbb_security_test_base extends phpbb_test_case $symfony_request->expects($this->any()) ->method('getPathInfo') ->will($this->returnValue('/')); - $phpbb_filesystem = new phpbb_filesystem($symfony_request, $phpbb_root_path, $phpEx); + $phpbb_filesystem = new \phpbb\filesystem($symfony_request, $phpbb_root_path, $phpEx); // Set no user and trick a bit to circumvent errors $user = new \phpbb\user(); From e905a46b8c466ed2c6b02f2baacb74c67ddc0f12 Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Mon, 30 Sep 2013 21:18:20 -0500 Subject: [PATCH 029/661] [ticket/11840] Fix regex PHPBB3-11840 --- phpBB/phpbb/extension/metadata_manager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/phpbb/extension/metadata_manager.php b/phpBB/phpbb/extension/metadata_manager.php index 1b62194956..19c6288e96 100644 --- a/phpBB/phpbb/extension/metadata_manager.php +++ b/phpBB/phpbb/extension/metadata_manager.php @@ -203,7 +203,7 @@ class metadata_manager // Basic fields $fields = array( 'name' => '#^[a-zA-Z0-9_\x7f-\xff]{2,}/[a-zA-Z0-9_\x7f-\xff]{2,}$#', - 'type' => 'phpbb-extension', + 'type' => '#^phpbb-extension$#', 'licence' => '#.+#', 'version' => '#.+#', ); From ff4756f87abac6fb9f15da16d35d9a211c533c75 Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Mon, 30 Sep 2013 21:24:46 -0500 Subject: [PATCH 030/661] [ticket/11840] Use generic information in the test extension Not sure why I had my name/info in these files... PHPBB3-11840 --- tests/extension/ext/foo/composer.json | 4 ++-- tests/extension/ext/vendor/moo/composer.json | 6 +++--- tests/functional/extension_acp_test.php | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/extension/ext/foo/composer.json b/tests/extension/ext/foo/composer.json index 828ae4ab79..5367eaf593 100644 --- a/tests/extension/ext/foo/composer.json +++ b/tests/extension/ext/foo/composer.json @@ -6,9 +6,9 @@ "time": "2012-02-15 01:01:01", "licence": "GPL-2.0", "authors": [{ - "name": "Nathan Guse", + "name": "John Smith", "email": "email@phpbb.com", - "homepage": "http://lithiumstudios.org", + "homepage": "http://phpbb.com", "role": "N/A" }], "require": { diff --git a/tests/extension/ext/vendor/moo/composer.json b/tests/extension/ext/vendor/moo/composer.json index c91a5e027b..0d50dcce99 100644 --- a/tests/extension/ext/vendor/moo/composer.json +++ b/tests/extension/ext/vendor/moo/composer.json @@ -6,10 +6,10 @@ "time": "2012-02-15 01:01:01", "licence": "GNU GPL v2", "authors": [{ - "name": "Nathan Guse", - "username": "EXreaction", + "name": "John Smith", + "username": "JohnSmith27", "email": "email@phpbb.com", - "homepage": "http://lithiumstudios.org", + "homepage": "http://phpbb.com", "role": "N/A" }], "require": { diff --git a/tests/functional/extension_acp_test.php b/tests/functional/extension_acp_test.php index 2495ebdc4f..401b18f11c 100644 --- a/tests/functional/extension_acp_test.php +++ b/tests/functional/extension_acp_test.php @@ -111,9 +111,9 @@ class phpbb_functional_extension_acp_test extends phpbb_functional_test_case 'LICENCE' => 'GPL-2.0', 'PHPBB_VERSION' => '3.1.*@dev', 'PHP_VERSION' => '>=5.3', - 'AUTHOR_NAME' => 'Nathan Guse', + 'AUTHOR_NAME' => 'John Smith', 'AUTHOR_EMAIL' => 'email@phpbb.com', - 'AUTHOR_HOMEPAGE' => 'http://lithiumstudios.org', + 'AUTHOR_HOMEPAGE' => 'http://phpbb.com', 'AUTHOR_ROLE' => 'N/A', ); From b931b0b35b73cb19d5d483dabf8628188feb9deb Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Mon, 30 Sep 2013 21:36:10 -0500 Subject: [PATCH 031/661] [ticket/11840] Correct Moo test extension composer PHPBB3-11840 --- tests/extension/ext/vendor/moo/composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/extension/ext/vendor/moo/composer.json b/tests/extension/ext/vendor/moo/composer.json index 0d50dcce99..4dc36963b3 100644 --- a/tests/extension/ext/vendor/moo/composer.json +++ b/tests/extension/ext/vendor/moo/composer.json @@ -1,6 +1,6 @@ { "name": "moo/example", - "type": "phpbb3-extension", + "type": "phpbb-extension", "description": "An example/sample extension to be used for testing purposes in phpBB Development.", "version": "1.0.0", "time": "2012-02-15 01:01:01", @@ -14,7 +14,7 @@ }], "require": { "php": ">=5.3", - "phpbb": "3.1.0-dev" + "phpbb/phpbb": "3.1.*@dev" }, "extra": { "display-name": "phpBB Moo Extension" From dbd0380c3fb9edeaa6ec32b4f2348eca26955831 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Tue, 1 Oct 2013 16:13:10 +0200 Subject: [PATCH 032/661] [ticket/11877] Create package links and checksums for announcement via script. PHPBB3-11877 --- build/build.xml | 12 +++++ build/build_announcement.php | 98 ++++++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+) create mode 100755 build/build_announcement.php diff --git a/build/build.xml b/build/build.xml index f0962e67eb..018f7b91a2 100644 --- a/build/build.xml +++ b/build/build.xml @@ -169,6 +169,18 @@ + + + + + + + + Date: Wed, 2 Oct 2013 14:18:32 -0500 Subject: [PATCH 033/661] [ticket/11882] Incorrect dependency in signature module auth migration PHPBB3-11882 --- phpBB/phpbb/db/migration/data/v310/signature_module_auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/phpbb/db/migration/data/v310/signature_module_auth.php b/phpBB/phpbb/db/migration/data/v310/signature_module_auth.php index a85e0be01c..6da1cb8009 100644 --- a/phpBB/phpbb/db/migration/data/v310/signature_module_auth.php +++ b/phpBB/phpbb/db/migration/data/v310/signature_module_auth.php @@ -27,7 +27,7 @@ class signature_module_auth extends \phpbb\db\migration\migration static public function depends_on() { - return array('\phpbb\db\migration\data\v31x\dev'); + return array('\phpbb\db\migration\data\v310\dev'); } public function update_data() From 5bd7f1bd36a156767d4654d137d9705a171ae8ff Mon Sep 17 00:00:00 2001 From: Nathan Date: Wed, 2 Oct 2013 14:21:50 -0500 Subject: [PATCH 034/661] [ticket/11882] If dependency is incorrect/unfulfillable, throw an error PHPBB3-11882 --- phpBB/phpbb/db/migrator.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpBB/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php index 7efb23a230..9879ff2a85 100644 --- a/phpBB/phpbb/db/migrator.php +++ b/phpBB/phpbb/db/migrator.php @@ -192,6 +192,11 @@ class migrator foreach ($state['migration_depends_on'] as $depend) { + if ($this->unfulfillable($depend) !== false) + { + throw new \phpbb\db\migration\exception('MIGRATION_NOT_FULFILLABLE', $name, $depend); + } + if (!isset($this->migration_state[$depend]) || !$this->migration_state[$depend]['migration_schema_done'] || !$this->migration_state[$depend]['migration_data_done']) From 621e6c93ed5517cedbf7a6a37c35786a1e2f27e8 Mon Sep 17 00:00:00 2001 From: Nathan Date: Wed, 2 Oct 2013 14:27:46 -0500 Subject: [PATCH 035/661] [ticket/11883] Report completed data step in migration as "Installing Data" PHPBB3-11883 --- phpBB/install/database_update.php | 16 ++++++++++++---- phpBB/language/en/migrator.php | 5 +++-- phpBB/phpbb/db/migrator.php | 5 +++++ 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index fa8ec6b6ce..d846884399 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -207,6 +207,8 @@ $safe_time_limit = (ini_get('max_execution_time') / 2); while (!$migrator->finished()) { + $migration_start_time = microtime(true); + try { $migrator->update(); @@ -227,20 +229,26 @@ while (!$migrator->finished()) if (isset($migrator->last_run_migration['effectively_installed']) && $migrator->last_run_migration['effectively_installed']) { - echo $user->lang('MIGRATION_EFFECTIVELY_INSTALLED', $migrator->last_run_migration['name']) . '
    '; + echo $user->lang('MIGRATION_EFFECTIVELY_INSTALLED', $migrator->last_run_migration['name']); } else { - if ($state['migration_data_done']) + if ($migrator->last_run_migration['task'] == 'process_data_step' && $state['migration_data_done']) { - echo $user->lang('MIGRATION_DATA_DONE', $migrator->last_run_migration['name']) . '
    '; + echo $user->lang('MIGRATION_DATA_DONE', $migrator->last_run_migration['name'], (microtime(true) - $migration_start_time), (time() - $update_start_time)); + } + else if ($migrator->last_run_migration['task'] == 'process_data_step') + { + echo $user->lang('MIGRATION_DATA_IN_PROGRESS', $migrator->last_run_migration['name'], (microtime(true) - $migration_start_time), (time() - $update_start_time)); } else if ($state['migration_schema_done']) { - echo $user->lang('MIGRATION_SCHEMA_DONE', $migrator->last_run_migration['name']) . '
    '; + echo $user->lang('MIGRATION_SCHEMA_DONE', $migrator->last_run_migration['name'], (microtime(true) - $migration_start_time), (time() - $update_start_time)); } } + echo "
    \n"; + // Are we approaching the time limit? If so we want to pause the update and continue after refreshing if ((time() - $update_start_time) >= $safe_time_limit) { diff --git a/phpBB/language/en/migrator.php b/phpBB/language/en/migrator.php index 34dcbf4c52..1d8886d12b 100644 --- a/phpBB/language/en/migrator.php +++ b/phpBB/language/en/migrator.php @@ -39,11 +39,12 @@ $lang = array_merge($lang, array( 'GROUP_NOT_EXIST' => 'The group "%s" unexpectedly does not exist.', - 'MIGRATION_DATA_DONE' => 'Installed Data: %s', + 'MIGRATION_DATA_DONE' => 'Installed Data: %1$s; Time: %2$.2f seconds', + 'MIGRATION_DATA_IN_PROGRESS' => 'Installing Data: %1$s; Time: %2$.2f seconds', 'MIGRATION_EFFECTIVELY_INSTALLED' => 'Migration already effectively installed (skipped): %s', 'MIGRATION_EXCEPTION_ERROR' => 'Something went wrong during the request and an exception was thrown. The changes made before the error occurred were reversed to the best of our abilities, but you should check the board for errors.', 'MIGRATION_NOT_FULFILLABLE' => 'The migration "%1$s" is not fulfillable, missing migration "%2$s".', - 'MIGRATION_SCHEMA_DONE' => 'Installed Schema: %s', + 'MIGRATION_SCHEMA_DONE' => 'Installed Schema: %1$s; Time: %2$.2f seconds', 'MODULE_ERROR' => 'An error occurred while creating a module: %s', 'MODULE_INFO_FILE_NOT_EXIST' => 'A required module info file is missing: %2$s', diff --git a/phpBB/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php index 7efb23a230..acfd943e56 100644 --- a/phpBB/phpbb/db/migrator.php +++ b/phpBB/phpbb/db/migrator.php @@ -204,6 +204,7 @@ class migrator 'name' => $name, 'class' => $migration, 'state' => $state, + 'task' => '', ); if (!isset($this->migration_state[$name])) @@ -231,6 +232,7 @@ class migrator if (!$state['migration_schema_done']) { + $this->last_run_migration['task'] = 'apply_schema_changes'; $this->apply_schema_changes($migration->update_schema()); $state['migration_schema_done'] = true; } @@ -238,6 +240,7 @@ class migrator { try { + $this->last_run_migration['task'] = 'process_data_step'; $result = $this->process_data_step($migration->update_data(), $state['migration_data_state']); $state['migration_data_state'] = ($result === true) ? '' : $result; @@ -308,6 +311,7 @@ class migrator $this->last_run_migration = array( 'name' => $name, 'class' => $migration, + 'task' => '', ); if ($state['migration_data_done']) @@ -626,6 +630,7 @@ class migrator { continue; } + return false; } From 2ab3ee7d67f99f1e6b7702b22e79c3a5af85adf8 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 2 Oct 2013 22:37:16 +0200 Subject: [PATCH 036/661] [ticket/11871] Fallback to int ID of the module, when creating links Firefox is currently unable to correctly copy a urlencoded \ so users will be unable to post links to modules. However we can still fallback to the id instead of the name, so we do that in this case. PHPBB3-11871 --- phpBB/includes/functions_module.php | 31 +++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php index b33f3d6866..dca720c36e 100644 --- a/phpBB/includes/functions_module.php +++ b/phpBB/includes/functions_module.php @@ -519,7 +519,7 @@ class p_master } // Not being able to overwrite ;) - $this->module->u_action = append_sid("{$phpbb_admin_path}index.$phpEx", "i={$this->p_name}") . (($icat) ? '&icat=' . $icat : '') . "&mode={$this->p_mode}"; + $this->module->u_action = append_sid("{$phpbb_admin_path}index.$phpEx", 'i=' . $this->get_module_identifier($this->p_name, $this->p_id)) . (($icat) ? '&icat=' . $icat : '') . "&mode={$this->p_mode}"; } else { @@ -551,7 +551,7 @@ class p_master $this->module->u_action = $phpbb_root_path . (($user->page['page_dir']) ? $user->page['page_dir'] . '/' : '') . $user->page['page_name']; } - $this->module->u_action = append_sid($this->module->u_action, "i={$this->p_name}") . (($icat) ? '&icat=' . $icat : '') . "&mode={$this->p_mode}"; + $this->module->u_action = append_sid($this->module->u_action, 'i=' . $this->get_module_identifier($this->p_name, $this->p_id)) . (($icat) ? '&icat=' . $icat : '') . "&mode={$this->p_mode}"; } // Add url_extra parameter to u_action url @@ -799,12 +799,12 @@ class p_master // if the item has a name use it, else use its id if (empty($item_ary['name'])) { - $u_title .= $item_ary['id']; + $u_title .= $item_ary['id']; } else { // if the category has a name, then use it. - $u_title .= $item_ary['name']; + $u_title .= $this->get_module_identifier($item_ary['name'], $item_ary['id']); } // If the item is not a category append the mode if (!$item_ary['cat']) @@ -982,6 +982,29 @@ class p_master return substr($basename, strlen($this->p_class) + 1); } + /** + * If the basename contains a \ we dont use that for the URL. + * + * Firefox is currently unable to correctly copy a urlencoded \ + * so users will be unable to post links to modules. + * However we can still fallback to the id instead of the name, + * so we do that in this case. + * + * @param string $basename Basename of the module + * @param int $id Id of the module + * @return mixed Identifier that should be used for + * module link creation + */ + protected function get_module_identifier($basename, $id) + { + if (strpos($basename, '\\') === false) + { + return $basename; + } + + return $id; + } + /** * Checks whether the given module basename is a correct class name * From b4682f3a725410c4608ab88f5f2b887a507c4f2a Mon Sep 17 00:00:00 2001 From: Dhruv Date: Sun, 8 Sep 2013 13:44:47 +0530 Subject: [PATCH 037/661] [ticket/11344] Add migration to remove acp_style_components module in 3.1 PHPBB3-11344 --- .../data/310/acp_style_components_module.php | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 phpBB/phpbb/db/migration/data/310/acp_style_components_module.php diff --git a/phpBB/phpbb/db/migration/data/310/acp_style_components_module.php b/phpBB/phpbb/db/migration/data/310/acp_style_components_module.php new file mode 100644 index 0000000000..e028feb88f --- /dev/null +++ b/phpBB/phpbb/db/migration/data/310/acp_style_components_module.php @@ -0,0 +1,40 @@ +db->sql_query($sql); + $module_id = $this->db->sql_fetchfield('module_id'); + $this->db->sql_freeresult($result); + + return $module_id == false; + } + + static public function depends_on() + { + return array('phpbb_db_migration_data_310_dev'); + } + + public function update_data() + { + return array( + array('module.remove', array( + 'acp', + false, + 'ACP_STYLE_COMPONENTS', + )), + ); + } +} From 34040771be42e5533737d2890bdecbb3373772cb Mon Sep 17 00:00:00 2001 From: Dhruv Date: Tue, 10 Sep 2013 22:57:24 +0530 Subject: [PATCH 038/661] [ticket/11344] Fix url of license PHPBB3-11344 --- .../phpbb/db/migration/data/310/acp_style_components_module.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/phpbb/db/migration/data/310/acp_style_components_module.php b/phpBB/phpbb/db/migration/data/310/acp_style_components_module.php index e028feb88f..cefaf7c452 100644 --- a/phpBB/phpbb/db/migration/data/310/acp_style_components_module.php +++ b/phpBB/phpbb/db/migration/data/310/acp_style_components_module.php @@ -3,7 +3,7 @@ * * @package migration * @copyright (c) 2013 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2 +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * */ From 16d6dc2e7101aba6c08183f2acca2592ec8e04f5 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Thu, 3 Oct 2013 21:09:02 +0530 Subject: [PATCH 039/661] [ticket/11344] Upgrade migration to namespaces PHPBB3-11344 --- .../data/{310 => v310}/acp_style_components_module.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) rename phpBB/phpbb/db/migration/data/{310 => v310}/acp_style_components_module.php (80%) diff --git a/phpBB/phpbb/db/migration/data/310/acp_style_components_module.php b/phpBB/phpbb/db/migration/data/v310/acp_style_components_module.php similarity index 80% rename from phpBB/phpbb/db/migration/data/310/acp_style_components_module.php rename to phpBB/phpbb/db/migration/data/v310/acp_style_components_module.php index cefaf7c452..9f168f4fd6 100644 --- a/phpBB/phpbb/db/migration/data/310/acp_style_components_module.php +++ b/phpBB/phpbb/db/migration/data/v310/acp_style_components_module.php @@ -7,7 +7,9 @@ * */ -class phpbb_db_migration_data_310_acp_style_components_module extends phpbb_db_migration +namespace phpbb\db\migration\data\v310; + +class acp_style_components_module extends \phpbb\db\migration\migration { public function effectively_installed() { @@ -24,7 +26,7 @@ class phpbb_db_migration_data_310_acp_style_components_module extends phpbb_db_m static public function depends_on() { - return array('phpbb_db_migration_data_310_dev'); + return array('\phpbb\db\migration\data\v310\dev'); } public function update_data() From 3259bd1196ca2a7f77fe7060e5510813e7844ebd Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Fri, 4 Oct 2013 09:23:54 -0500 Subject: [PATCH 040/661] [ticket/11883] Only output the migration time, not total PHPBB3-11883 --- phpBB/install/database_update.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index d846884399..b79420ab71 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -235,15 +235,15 @@ while (!$migrator->finished()) { if ($migrator->last_run_migration['task'] == 'process_data_step' && $state['migration_data_done']) { - echo $user->lang('MIGRATION_DATA_DONE', $migrator->last_run_migration['name'], (microtime(true) - $migration_start_time), (time() - $update_start_time)); + echo $user->lang('MIGRATION_DATA_DONE', $migrator->last_run_migration['name'], (microtime(true) - $migration_start_time)); } else if ($migrator->last_run_migration['task'] == 'process_data_step') { - echo $user->lang('MIGRATION_DATA_IN_PROGRESS', $migrator->last_run_migration['name'], (microtime(true) - $migration_start_time), (time() - $update_start_time)); + echo $user->lang('MIGRATION_DATA_IN_PROGRESS', $migrator->last_run_migration['name'], (microtime(true) - $migration_start_time)); } else if ($state['migration_schema_done']) { - echo $user->lang('MIGRATION_SCHEMA_DONE', $migrator->last_run_migration['name'], (microtime(true) - $migration_start_time), (time() - $update_start_time)); + echo $user->lang('MIGRATION_SCHEMA_DONE', $migrator->last_run_migration['name'], (microtime(true) - $migration_start_time)); } } From 62ad0984c7f2d6047b22c630a216a21c2e838e83 Mon Sep 17 00:00:00 2001 From: David King Date: Fri, 4 Oct 2013 15:57:42 -0700 Subject: [PATCH 041/661] [ticket/11885] Add migration files for 3.0.12-RC2 and RC3 and 3.0.12 PHPBB3-11885 --- .../db/migration/data/v30x/release_3_0_12.php | 30 +++++++++++++++++++ .../data/v30x/release_3_0_12_rc2.php | 30 +++++++++++++++++++ .../data/v30x/release_3_0_12_rc3.php | 30 +++++++++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 phpBB/phpbb/db/migration/data/v30x/release_3_0_12.php create mode 100644 phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc2.php create mode 100644 phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc3.php diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_12.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12.php new file mode 100644 index 0000000000..492812ae8d --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12.php @@ -0,0 +1,30 @@ +config['version'], '3.0.12', '>='); + } + + static public function depends_on() + { + return array('\phpbb\db\migration\data\v30x\release_3_0_12_rc3'); + } + + public function update_data() + { + return array( + array('config.update', array('version', '3.0.12')), + ); + } +} diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc2.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc2.php new file mode 100644 index 0000000000..ae03b59a9e --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc2.php @@ -0,0 +1,30 @@ +config['version'], '3.0.12-RC2', '>='); + } + + static public function depends_on() + { + return array('\phpbb\db\migration\data\v30x\release_3_0_12_rc1'); + } + + public function update_data() + { + return array( + array('config.update', array('version', '3.0.12-RC2')), + ); + } +} diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc3.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc3.php new file mode 100644 index 0000000000..15ce9ce37a --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc3.php @@ -0,0 +1,30 @@ +config['version'], '3.0.12-RC3', '>='); + } + + static public function depends_on() + { + return array('\phpbb\db\migration\data\v30x\release_3_0_12_rc2'); + } + + public function update_data() + { + return array( + array('config.update', array('version', '3.0.12-RC3')), + ); + } +} From b79d811b3a10eeaf4c6e9a4180b592ea551df548 Mon Sep 17 00:00:00 2001 From: David King Date: Fri, 4 Oct 2013 16:08:38 -0700 Subject: [PATCH 042/661] [ticket/11885] Fix migration files for 3.0.12 PHPBB3-11885 --- phpBB/phpbb/db/migration/data/v30x/release_3_0_12.php | 2 +- phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc2.php | 2 +- phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc3.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_12.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12.php index 492812ae8d..45220e880c 100644 --- a/phpBB/phpbb/db/migration/data/v30x/release_3_0_12.php +++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12.php @@ -13,7 +13,7 @@ class release_3_0_12 extends \phpbb\db\migration\migration { public function effectively_installed() { - return phpbb_version_compare($this->config['version'], '3.0.12', '>='); + return phpbb_version_compare($this->config['version'], '3.0.12', '>=') && phpbb_version_compare($this->config['version'], '3.1.0-dev', '<'); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc2.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc2.php index ae03b59a9e..91fb19c018 100644 --- a/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc2.php +++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc2.php @@ -13,7 +13,7 @@ class release_3_0_12_rc2 extends \phpbb\db\migration\migration { public function effectively_installed() { - return phpbb_version_compare($this->config['version'], '3.0.12-RC2', '>='); + return phpbb_version_compare($this->config['version'], '3.0.12-RC2', '>=') && phpbb_version_compare($this->config['version'], '3.1.0-dev', '<'); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc3.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc3.php index 15ce9ce37a..a1265722c7 100644 --- a/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc3.php +++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc3.php @@ -13,7 +13,7 @@ class release_3_0_12_rc3 extends \phpbb\db\migration\migration { public function effectively_installed() { - return phpbb_version_compare($this->config['version'], '3.0.12-RC3', '>='); + return phpbb_version_compare($this->config['version'], '3.0.12-RC3', '>=') && phpbb_version_compare($this->config['version'], '3.1.0-dev', '<'); } static public function depends_on() From 3f7f2548ccbf7da228216e6717ff4678089fc8e6 Mon Sep 17 00:00:00 2001 From: David King Date: Fri, 4 Oct 2013 16:17:03 -0700 Subject: [PATCH 043/661] [ticket/11885] Use conditional in update_data() PHPBB3-11885 --- phpBB/phpbb/db/migration/data/v30x/release_3_0_12.php | 5 +++-- phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc2.php | 5 +++-- phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc3.php | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_12.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12.php index 45220e880c..47eabb4c66 100644 --- a/phpBB/phpbb/db/migration/data/v30x/release_3_0_12.php +++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12.php @@ -23,8 +23,9 @@ class release_3_0_12 extends \phpbb\db\migration\migration public function update_data() { - return array( + return array('if', array( + phpbb_version_compare($this->config['version'], '3.0.12', '<'), array('config.update', array('version', '3.0.12')), - ); + )); } } diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc2.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc2.php index 91fb19c018..e6260374ad 100644 --- a/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc2.php +++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc2.php @@ -23,8 +23,9 @@ class release_3_0_12_rc2 extends \phpbb\db\migration\migration public function update_data() { - return array( + return array('if', array( + phpbb_version_compare($this->config['version'], '3.0.12-RC2', '<'), array('config.update', array('version', '3.0.12-RC2')), - ); + )); } } diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc3.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc3.php index a1265722c7..a6e83ada9c 100644 --- a/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc3.php +++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc3.php @@ -23,8 +23,9 @@ class release_3_0_12_rc3 extends \phpbb\db\migration\migration public function update_data() { - return array( + return array('if', array( + phpbb_version_compare($this->config['version'], '3.0.12-RC3', '<'), array('config.update', array('version', '3.0.12-RC3')), - ); + )); } } From 874fcc940f909364d5e8cadfd96363d7f91aed31 Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Fri, 4 Oct 2013 23:07:48 -0500 Subject: [PATCH 044/661] [ticket/11885] Fix migrations error PHPBB3-11885 --- phpBB/phpbb/db/migration/data/v30x/release_3_0_12.php | 10 ++++++---- .../db/migration/data/v30x/release_3_0_12_rc2.php | 10 ++++++---- .../db/migration/data/v30x/release_3_0_12_rc3.php | 10 ++++++---- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_12.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12.php index 47eabb4c66..5a2d569724 100644 --- a/phpBB/phpbb/db/migration/data/v30x/release_3_0_12.php +++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12.php @@ -23,9 +23,11 @@ class release_3_0_12 extends \phpbb\db\migration\migration public function update_data() { - return array('if', array( - phpbb_version_compare($this->config['version'], '3.0.12', '<'), - array('config.update', array('version', '3.0.12')), - )); + return array( + array('if', array( + phpbb_version_compare($this->config['version'], '3.0.12', '<'), + array('config.update', array('version', '3.0.12')), + )), + ); } } diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc2.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc2.php index e6260374ad..3edb578fc8 100644 --- a/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc2.php +++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc2.php @@ -23,9 +23,11 @@ class release_3_0_12_rc2 extends \phpbb\db\migration\migration public function update_data() { - return array('if', array( - phpbb_version_compare($this->config['version'], '3.0.12-RC2', '<'), - array('config.update', array('version', '3.0.12-RC2')), - )); + return array( + array('if', array( + phpbb_version_compare($this->config['version'], '3.0.12-RC2', '<'), + array('config.update', array('version', '3.0.12-RC2')), + )), + ); } } diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc3.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc3.php index a6e83ada9c..510693a5b7 100644 --- a/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc3.php +++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc3.php @@ -23,9 +23,11 @@ class release_3_0_12_rc3 extends \phpbb\db\migration\migration public function update_data() { - return array('if', array( - phpbb_version_compare($this->config['version'], '3.0.12-RC3', '<'), - array('config.update', array('version', '3.0.12-RC3')), - )); + return array( + array('if', array( + phpbb_version_compare($this->config['version'], '3.0.12-RC3', '<'), + array('config.update', array('version', '3.0.12-RC3')), + )), + ); } } From ea75b67f5e8986fe2cf36c88646bbb9db5da7893 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Wed, 12 Jun 2013 00:29:04 +0530 Subject: [PATCH 045/661] [ticket/11608] add basic search functional test structure PHPBB3-11608 --- tests/functional/search_test.php | 77 ++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 tests/functional/search_test.php diff --git a/tests/functional/search_test.php b/tests/functional/search_test.php new file mode 100644 index 0000000000..db3b63c230 --- /dev/null +++ b/tests/functional/search_test.php @@ -0,0 +1,77 @@ +search_backend_test('phpbb_search_fulltext_native'); + } + + public function test_mysql_fulltext() + { + $this->search_backend_test('phpbb_search_fulltext_mysql'); + + } + + public function test_postgres_fulltext() + { + $this->search_backend_test('phpbb_search_fulltext_postgres'); + + } + + public function test_sphinx() + { + $this->search_backend_test('phpbb_search_fulltext_sphinx'); + } + + public function search_found() + { + + } + + public function search_not_found() + { + + } + + protected function search_backend_test($search_backend) + { + $this->login(); + $this->admin_login(); + + $crawler = self::request('GET', 'adm/index.php?i=acp_search&mode=settings&sid=' . $this->sid); + $form = $crawler->selectButton('Submit')->form(); + $values = $form->getValues(); + + if ($values["config[search_type]"] != $search_backend) + { + $values["config[search_type]"] = $search_backend; + $form->setValues($values); + $crawler = self::submit($form); + + $form = $crawler->selectButton('Yes')->form(); + $values = $form->getValues(); + $crawler = self::submit($form); + + file_put_contents('log' . $search_backend . '.html', $crawler->text()); + } + + $this->create_search_index($search_backend); + } + + protected function create_search_index($search_backend) + { + + } +} From c33c89a790ce0f816887b074afdaaebc1f8099c7 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Fri, 14 Jun 2013 00:27:09 +0530 Subject: [PATCH 046/661] [ticket/11608] Skip tests for unsupported search backends PHPBB3-11608 --- tests/functional/search_test.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/functional/search_test.php b/tests/functional/search_test.php index db3b63c230..383e389745 100644 --- a/tests/functional/search_test.php +++ b/tests/functional/search_test.php @@ -64,14 +64,20 @@ class phpbb_functional_search_test extends phpbb_functional_test_case $values = $form->getValues(); $crawler = self::submit($form); - file_put_contents('log' . $search_backend . '.html', $crawler->text()); + try + { + $crawler->filter('.errorbox')->text(); + self::markTestSkipped("Search backend is not supported/running"); + + } + catch (InvalidArgumentException $e) {} } - $this->create_search_index($search_backend); + $this->create_search_index($crawler); } - protected function create_search_index($search_backend) + protected function create_search_index($create_index_crawler) { - + var_dump($create_index_crawler->selectLink('Go to search index page')); } } From 81acd8ef10bb50aacfa77fe411156db9a91b0a45 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Fri, 14 Jun 2013 01:24:24 +0530 Subject: [PATCH 047/661] [ticket/11608] complete search tests functionalities PHPBB3-11608 --- tests/functional/search_test.php | 37 ++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/tests/functional/search_test.php b/tests/functional/search_test.php index 383e389745..ac3cf4503c 100644 --- a/tests/functional/search_test.php +++ b/tests/functional/search_test.php @@ -37,11 +37,15 @@ class phpbb_functional_search_test extends phpbb_functional_test_case public function search_found() { - + $crawler = self::request('GET', 'search.php?keywords=phpbb3'); + $crawler->filter('.postbody')->text(); } public function search_not_found() { + $this->add_lang('search'); + $crawler = self::request('GET', 'search.php?keywords=loremipsumdedo'); + $this->assertContains($this->lang('NO_SEARCH_RESULTS'), $crawler->text()); } @@ -71,13 +75,38 @@ class phpbb_functional_search_test extends phpbb_functional_test_case } catch (InvalidArgumentException $e) {} + + $this->create_search_index($search_backend); } - $this->create_search_index($crawler); + $this->search_found(); + $this->search_not_found(); + $this->delete_search_index($search_backend); } - protected function create_search_index($create_index_crawler) + protected function create_search_index($search_backend) { - var_dump($create_index_crawler->selectLink('Go to search index page')); + $crawler = self::request( + 'POST', + 'adm/index.php?i=acp_search&mode=index&sid=' . $this->sid, + array( + 'search_type' => $search_backend, + 'action' => 'create', + 'submit' => true, + ) + ); + } + + protected function delete_search_index($search_backend) + { + $crawler = self::request( + 'POST', + 'adm/index.php?i=acp_search&mode=index&sid=' . $this->sid, + array( + 'search_type' => $search_backend, + 'action' => 'delete', + 'submit' => true, + ) + ); } } From 92698c95dca91fad2c40f390cc1a1987d426e63e Mon Sep 17 00:00:00 2001 From: Dhruv Date: Fri, 14 Jun 2013 01:33:32 +0530 Subject: [PATCH 048/661] [ticket/11608] Use assertions in test PHPBB3-11608 --- tests/functional/search_test.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/functional/search_test.php b/tests/functional/search_test.php index ac3cf4503c..9cb2eff045 100644 --- a/tests/functional/search_test.php +++ b/tests/functional/search_test.php @@ -38,15 +38,13 @@ class phpbb_functional_search_test extends phpbb_functional_test_case public function search_found() { $crawler = self::request('GET', 'search.php?keywords=phpbb3'); - $crawler->filter('.postbody')->text(); + $this->assertGreaterThan(0, $crawler->filter('.postbody')->count()); } public function search_not_found() { - $this->add_lang('search'); $crawler = self::request('GET', 'search.php?keywords=loremipsumdedo'); - $this->assertContains($this->lang('NO_SEARCH_RESULTS'), $crawler->text()); - + $this->assertLessThan(1, $crawler->filter('.postbody')->count()); } protected function search_backend_test($search_backend) From f4ca9a30a5c5d6f9ac242d3903e1f282d7b96b0f Mon Sep 17 00:00:00 2001 From: Dhruv Date: Fri, 14 Jun 2013 01:46:51 +0530 Subject: [PATCH 049/661] [ticket/11608] Add more assetions in tests PHPBB3-11608 --- tests/functional/search_test.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/functional/search_test.php b/tests/functional/search_test.php index 9cb2eff045..d38d4271cf 100644 --- a/tests/functional/search_test.php +++ b/tests/functional/search_test.php @@ -32,7 +32,7 @@ class phpbb_functional_search_test extends phpbb_functional_test_case public function test_sphinx() { - $this->search_backend_test('phpbb_search_fulltext_sphinx'); + //$this->search_backend_test('phpbb_search_fulltext_sphinx'); } public function search_found() @@ -84,6 +84,7 @@ class phpbb_functional_search_test extends phpbb_functional_test_case protected function create_search_index($search_backend) { + $this->add_lang('acp/search'); $crawler = self::request( 'POST', 'adm/index.php?i=acp_search&mode=index&sid=' . $this->sid, @@ -93,10 +94,12 @@ class phpbb_functional_search_test extends phpbb_functional_test_case 'submit' => true, ) ); + $this->assertContains($this->lang('SEARCH_INDEX_CREATED'), $crawler->text()); } protected function delete_search_index($search_backend) { + $this->add_lang('acp/search'); $crawler = self::request( 'POST', 'adm/index.php?i=acp_search&mode=index&sid=' . $this->sid, @@ -106,5 +109,6 @@ class phpbb_functional_search_test extends phpbb_functional_test_case 'submit' => true, ) ); + $this->assertContains($this->lang('SEARCH_INDEX_REMOVED'), $crawler->text()); } } From ec30fcf819721439321994f5fc77edce5b51bf17 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Fri, 14 Jun 2013 02:30:43 +0530 Subject: [PATCH 050/661] [ticket/11608] Logout before searching Keyword search in search functional tests should be performed as guests rather than logged in as admin. PHPBB3-11608 --- tests/functional/search_test.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/functional/search_test.php b/tests/functional/search_test.php index d38d4271cf..adb5cb3d95 100644 --- a/tests/functional/search_test.php +++ b/tests/functional/search_test.php @@ -77,8 +77,12 @@ class phpbb_functional_search_test extends phpbb_functional_test_case $this->create_search_index($search_backend); } + $this->logout(); $this->search_found(); $this->search_not_found(); + + $this->login(); + $this->admin_login(); $this->delete_search_index($search_backend); } From 115599e78d09593cc5db482bb9a2f485cbdb3c51 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Sat, 15 Jun 2013 16:52:20 +0530 Subject: [PATCH 051/661] [ticket/11608] Mark sphinx test as incomplete Sphinx search for the test board cannot be tested PHPBB3-11608 --- tests/functional/search_test.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/functional/search_test.php b/tests/functional/search_test.php index adb5cb3d95..18520afdbb 100644 --- a/tests/functional/search_test.php +++ b/tests/functional/search_test.php @@ -32,7 +32,8 @@ class phpbb_functional_search_test extends phpbb_functional_test_case public function test_sphinx() { - //$this->search_backend_test('phpbb_search_fulltext_sphinx'); + $this->markTestIncomplete('Sphinx search not running for the test board'); + $this->search_backend_test('phpbb_search_fulltext_sphinx'); } public function search_found() From 9c082999bb1761c95b58d2d6baa3e03ed16f58c9 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Mon, 17 Jun 2013 20:03:41 +0530 Subject: [PATCH 052/661] [ticket/11608] Check for word highlights in search results Search tests check for highlighted words in search results PHPBB3-11608 --- tests/functional/search_test.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/functional/search_test.php b/tests/functional/search_test.php index 18520afdbb..c18aa421be 100644 --- a/tests/functional/search_test.php +++ b/tests/functional/search_test.php @@ -38,8 +38,9 @@ class phpbb_functional_search_test extends phpbb_functional_test_case public function search_found() { - $crawler = self::request('GET', 'search.php?keywords=phpbb3'); + $crawler = self::request('GET', 'search.php?keywords=phpbb3+installation'); $this->assertGreaterThan(0, $crawler->filter('.postbody')->count()); + $this->assertEquals(3, $crawler->filter('.posthilit')->count()); } public function search_not_found() From 36da38f062477e48ddc13cde683515ec9f5921f3 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Wed, 19 Jun 2013 02:13:32 +0530 Subject: [PATCH 053/661] [ticket/11608] split search tests into separate files Tests for each search backend are into their own separate files. These separate classes inherit from a common search test case class. PHPBB3-11608 --- tests/functional/search_mysql_test.php | 24 ++++++++++++ tests/functional/search_native_test.php | 24 ++++++++++++ tests/functional/search_postgres_test.php | 24 ++++++++++++ tests/functional/search_sphinx_test.php | 25 ++++++++++++ tests/functional/search_test.php | 48 ++++++----------------- 5 files changed, 109 insertions(+), 36 deletions(-) create mode 100644 tests/functional/search_mysql_test.php create mode 100644 tests/functional/search_native_test.php create mode 100644 tests/functional/search_postgres_test.php create mode 100644 tests/functional/search_sphinx_test.php diff --git a/tests/functional/search_mysql_test.php b/tests/functional/search_mysql_test.php new file mode 100644 index 0000000000..b55d0c808c --- /dev/null +++ b/tests/functional/search_mysql_test.php @@ -0,0 +1,24 @@ +search_backend = 'phpbb_search_fulltext_mysql'; + } +} diff --git a/tests/functional/search_native_test.php b/tests/functional/search_native_test.php new file mode 100644 index 0000000000..9bcdc01547 --- /dev/null +++ b/tests/functional/search_native_test.php @@ -0,0 +1,24 @@ +search_backend = 'phpbb_search_fulltext_native'; + } +} diff --git a/tests/functional/search_postgres_test.php b/tests/functional/search_postgres_test.php new file mode 100644 index 0000000000..5b46db5c82 --- /dev/null +++ b/tests/functional/search_postgres_test.php @@ -0,0 +1,24 @@ +search_backend = 'phpbb_search_fulltext_postgres'; + } +} diff --git a/tests/functional/search_sphinx_test.php b/tests/functional/search_sphinx_test.php new file mode 100644 index 0000000000..c70ea04715 --- /dev/null +++ b/tests/functional/search_sphinx_test.php @@ -0,0 +1,25 @@ +search_backend = 'phpbb_search_fulltext_sphinx'; + $this->markTestIncomplete('Sphinx search not running for the test board'); + } +} diff --git a/tests/functional/search_test.php b/tests/functional/search_test.php index c18aa421be..f7c9e949b6 100644 --- a/tests/functional/search_test.php +++ b/tests/functional/search_test.php @@ -10,46 +10,23 @@ /** * @group functional */ -class phpbb_functional_search_test extends phpbb_functional_test_case +abstract class phpbb_functional_search_test extends phpbb_functional_test_case { - public function test_native() - { - $this->search_backend_test('phpbb_search_fulltext_native'); - } - - public function test_mysql_fulltext() - { - $this->search_backend_test('phpbb_search_fulltext_mysql'); - - } - - public function test_postgres_fulltext() - { - $this->search_backend_test('phpbb_search_fulltext_postgres'); - - } - - public function test_sphinx() - { - $this->markTestIncomplete('Sphinx search not running for the test board'); - $this->search_backend_test('phpbb_search_fulltext_sphinx'); - } - - public function search_found() + protected function search_found() { $crawler = self::request('GET', 'search.php?keywords=phpbb3+installation'); $this->assertGreaterThan(0, $crawler->filter('.postbody')->count()); $this->assertEquals(3, $crawler->filter('.posthilit')->count()); } - public function search_not_found() + protected function search_not_found() { $crawler = self::request('GET', 'search.php?keywords=loremipsumdedo'); $this->assertLessThan(1, $crawler->filter('.postbody')->count()); } - protected function search_backend_test($search_backend) + public function test_search_backend() { $this->login(); $this->admin_login(); @@ -58,9 +35,9 @@ class phpbb_functional_search_test extends phpbb_functional_test_case $form = $crawler->selectButton('Submit')->form(); $values = $form->getValues(); - if ($values["config[search_type]"] != $search_backend) + if ($values["config[search_type]"] != $this->search_backend) { - $values["config[search_type]"] = $search_backend; + $values["config[search_type]"] = $this->search_backend; $form->setValues($values); $crawler = self::submit($form); @@ -72,11 +49,10 @@ class phpbb_functional_search_test extends phpbb_functional_test_case { $crawler->filter('.errorbox')->text(); self::markTestSkipped("Search backend is not supported/running"); - } catch (InvalidArgumentException $e) {} - $this->create_search_index($search_backend); + $this->create_search_index(); } $this->logout(); @@ -85,17 +61,17 @@ class phpbb_functional_search_test extends phpbb_functional_test_case $this->login(); $this->admin_login(); - $this->delete_search_index($search_backend); + $this->delete_search_index(); } - protected function create_search_index($search_backend) + protected function create_search_index() { $this->add_lang('acp/search'); $crawler = self::request( 'POST', 'adm/index.php?i=acp_search&mode=index&sid=' . $this->sid, array( - 'search_type' => $search_backend, + 'search_type' => $this->search_backend, 'action' => 'create', 'submit' => true, ) @@ -103,14 +79,14 @@ class phpbb_functional_search_test extends phpbb_functional_test_case $this->assertContains($this->lang('SEARCH_INDEX_CREATED'), $crawler->text()); } - protected function delete_search_index($search_backend) + protected function delete_search_index() { $this->add_lang('acp/search'); $crawler = self::request( 'POST', 'adm/index.php?i=acp_search&mode=index&sid=' . $this->sid, array( - 'search_type' => $search_backend, + 'search_type' => $this->search_backend, 'action' => 'delete', 'submit' => true, ) From 5825bf7d33822a2b7be5e05150ed5c476a82ef1e Mon Sep 17 00:00:00 2001 From: Dhruv Date: Wed, 19 Jun 2013 02:20:24 +0530 Subject: [PATCH 054/661] [ticket/11608] Use assertContainsLang to compare language strings PHPBB3-11608 --- tests/functional/search_test.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/functional/search_test.php b/tests/functional/search_test.php index f7c9e949b6..2bcd16c7f1 100644 --- a/tests/functional/search_test.php +++ b/tests/functional/search_test.php @@ -76,7 +76,7 @@ abstract class phpbb_functional_search_test extends phpbb_functional_test_case 'submit' => true, ) ); - $this->assertContains($this->lang('SEARCH_INDEX_CREATED'), $crawler->text()); + $this->assertContainsLang('SEARCH_INDEX_CREATED', $crawler->text()); } protected function delete_search_index() @@ -91,6 +91,6 @@ abstract class phpbb_functional_search_test extends phpbb_functional_test_case 'submit' => true, ) ); - $this->assertContains($this->lang('SEARCH_INDEX_REMOVED'), $crawler->text()); + $this->assertContainsLang('SEARCH_INDEX_REMOVED', $crawler->text()); } } From 75d16da9fad8ae7ca067841b1f17dabef97dc0af Mon Sep 17 00:00:00 2001 From: Dhruv Date: Wed, 19 Jun 2013 02:23:14 +0530 Subject: [PATCH 055/661] [ticket/11608] Use assertEquals for more accurate assertions PHPBB3-11608 --- tests/functional/search_test.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/functional/search_test.php b/tests/functional/search_test.php index 2bcd16c7f1..ec5f9de64b 100644 --- a/tests/functional/search_test.php +++ b/tests/functional/search_test.php @@ -16,14 +16,14 @@ abstract class phpbb_functional_search_test extends phpbb_functional_test_case protected function search_found() { $crawler = self::request('GET', 'search.php?keywords=phpbb3+installation'); - $this->assertGreaterThan(0, $crawler->filter('.postbody')->count()); + $this->assertEquals(1, $crawler->filter('.postbody')->count()); $this->assertEquals(3, $crawler->filter('.posthilit')->count()); } protected function search_not_found() { $crawler = self::request('GET', 'search.php?keywords=loremipsumdedo'); - $this->assertLessThan(1, $crawler->filter('.postbody')->count()); + $this->assertEquals(0, $crawler->filter('.postbody')->count()); } public function test_search_backend() From e1030d3670feb5580ce51b6fc2ef3b8e9f8d2380 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Thu, 20 Jun 2013 18:42:42 +0530 Subject: [PATCH 056/661] [ticket/11608] Set sphinx id from test_config file for tests PHPBB3-11608 --- tests/functional/search_sphinx_test.php | 5 ++++- tests/test_framework/phpbb_test_case_helpers.php | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/functional/search_sphinx_test.php b/tests/functional/search_sphinx_test.php index c70ea04715..6b94f388c4 100644 --- a/tests/functional/search_sphinx_test.php +++ b/tests/functional/search_sphinx_test.php @@ -20,6 +20,9 @@ class phpbb_functional_search_sphinx_test extends phpbb_functional_search_test { parent::setUp(); $this->search_backend = 'phpbb_search_fulltext_sphinx'; - $this->markTestIncomplete('Sphinx search not running for the test board'); + if (!isset($config['fulltext_sphinx_id'])) + { + $this->markTestIncomplete('Sphinx search not running for the test board'); + } } } diff --git a/tests/test_framework/phpbb_test_case_helpers.php b/tests/test_framework/phpbb_test_case_helpers.php index 351a3a9594..2f225fe7af 100644 --- a/tests/test_framework/phpbb_test_case_helpers.php +++ b/tests/test_framework/phpbb_test_case_helpers.php @@ -158,6 +158,11 @@ class phpbb_test_case_helpers { $config['redis_port'] = $phpbb_redis_port; } + + if (isset($fulltext_sphinx_id)) + { + $config['fulltext_sphinx_id'] = $fulltext_sphinx_id; + } } if (isset($_SERVER['PHPBB_TEST_DBMS'])) From b7d55b8ff882f702d02c152cdd6e2206c0b74c12 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Wed, 3 Jul 2013 23:25:19 +0530 Subject: [PATCH 057/661] [ticket/11608] pass keywords to search_found and search_not_found test PHPBB3-11608 --- tests/functional/search_test.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/functional/search_test.php b/tests/functional/search_test.php index ec5f9de64b..4ed49424b6 100644 --- a/tests/functional/search_test.php +++ b/tests/functional/search_test.php @@ -13,17 +13,19 @@ abstract class phpbb_functional_search_test extends phpbb_functional_test_case { - protected function search_found() + protected function search_found($keywords) { - $crawler = self::request('GET', 'search.php?keywords=phpbb3+installation'); + $crawler = self::request('GET', 'search.php?keywords=' . $keywords); $this->assertEquals(1, $crawler->filter('.postbody')->count()); $this->assertEquals(3, $crawler->filter('.posthilit')->count()); } - protected function search_not_found() + protected function search_not_found($keywords) { - $crawler = self::request('GET', 'search.php?keywords=loremipsumdedo'); + $crawler = self::request('GET', 'search.php?keywords=' . $keywords); $this->assertEquals(0, $crawler->filter('.postbody')->count()); + $split_keywords_string = str_replace(array('+', '-'), ' ', $keywords); + $this->assertEquals($split_keywords_string, $crawler->filter('#keywords')->attr('value')); } public function test_search_backend() @@ -48,7 +50,7 @@ abstract class phpbb_functional_search_test extends phpbb_functional_test_case try { $crawler->filter('.errorbox')->text(); - self::markTestSkipped("Search backend is not supported/running"); + $this->markTestSkipped("Search backend is not supported/running"); } catch (InvalidArgumentException $e) {} @@ -56,8 +58,8 @@ abstract class phpbb_functional_search_test extends phpbb_functional_test_case } $this->logout(); - $this->search_found(); - $this->search_not_found(); + $this->search_found('phpbb3+installation'); + $this->search_not_found('loremipsumdedo'); $this->login(); $this->admin_login(); From 07c259f4b1036ab299c3293c3961125c19907017 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Sat, 6 Jul 2013 14:38:42 +0530 Subject: [PATCH 058/661] [ticket/11608] rename search_found and not_found method Rename search_found and search_not_found to assert_search_found and assert_search_not_found. Count .errorbox incase the search backend is not supported and skip tests PHPBB3-11608 --- tests/functional/search_test.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/functional/search_test.php b/tests/functional/search_test.php index 4ed49424b6..2090e73a4c 100644 --- a/tests/functional/search_test.php +++ b/tests/functional/search_test.php @@ -12,15 +12,14 @@ */ abstract class phpbb_functional_search_test extends phpbb_functional_test_case { - - protected function search_found($keywords) + protected function assert_search_found($keywords) { $crawler = self::request('GET', 'search.php?keywords=' . $keywords); $this->assertEquals(1, $crawler->filter('.postbody')->count()); $this->assertEquals(3, $crawler->filter('.posthilit')->count()); } - protected function search_not_found($keywords) + protected function assert_search_not_found($keywords) { $crawler = self::request('GET', 'search.php?keywords=' . $keywords); $this->assertEquals(0, $crawler->filter('.postbody')->count()); @@ -47,19 +46,18 @@ abstract class phpbb_functional_search_test extends phpbb_functional_test_case $values = $form->getValues(); $crawler = self::submit($form); - try + // check if search backend is not supported + if ($crawler->filter('.errorbox')->count() > 0); { - $crawler->filter('.errorbox')->text(); $this->markTestSkipped("Search backend is not supported/running"); } - catch (InvalidArgumentException $e) {} $this->create_search_index(); } $this->logout(); - $this->search_found('phpbb3+installation'); - $this->search_not_found('loremipsumdedo'); + $this->assert_search_found('phpbb3+installation'); + $this->assert_search_not_found('loremipsumdedo'); $this->login(); $this->admin_login(); From b31bb8653b12f984957d4c62ccf280deb1e6400e Mon Sep 17 00:00:00 2001 From: Dhruv Date: Sat, 6 Jul 2013 20:36:41 +0530 Subject: [PATCH 059/661] [ticket/11608] add search functional tests to search subfolder PHPBB3-11608 --- tests/functional/{search_test.php => search/base_test.php} | 5 ++--- .../{search_mysql_test.php => search/mysql_test.php} | 4 ++-- .../{search_native_test.php => search/native_test.php} | 4 ++-- .../{search_postgres_test.php => search/postgres_test.php} | 4 ++-- .../{search_sphinx_test.php => search/sphinx_test.php} | 4 ++-- 5 files changed, 10 insertions(+), 11 deletions(-) rename tests/functional/{search_test.php => search/base_test.php} (94%) rename tests/functional/{search_mysql_test.php => search/mysql_test.php} (84%) rename tests/functional/{search_native_test.php => search/native_test.php} (84%) rename tests/functional/{search_postgres_test.php => search/postgres_test.php} (84%) rename tests/functional/{search_sphinx_test.php => search/sphinx_test.php} (88%) diff --git a/tests/functional/search_test.php b/tests/functional/search/base_test.php similarity index 94% rename from tests/functional/search_test.php rename to tests/functional/search/base_test.php index 2090e73a4c..538db6de89 100644 --- a/tests/functional/search_test.php +++ b/tests/functional/search/base_test.php @@ -10,7 +10,7 @@ /** * @group functional */ -abstract class phpbb_functional_search_test extends phpbb_functional_test_case +abstract class phpbb_functional_search_base_test extends phpbb_functional_test_case { protected function assert_search_found($keywords) { @@ -47,11 +47,10 @@ abstract class phpbb_functional_search_test extends phpbb_functional_test_case $crawler = self::submit($form); // check if search backend is not supported - if ($crawler->filter('.errorbox')->count() > 0); + if ($crawler->filter('.errorbox')->count() > 0) { $this->markTestSkipped("Search backend is not supported/running"); } - $this->create_search_index(); } diff --git a/tests/functional/search_mysql_test.php b/tests/functional/search/mysql_test.php similarity index 84% rename from tests/functional/search_mysql_test.php rename to tests/functional/search/mysql_test.php index b55d0c808c..f27269d76a 100644 --- a/tests/functional/search_mysql_test.php +++ b/tests/functional/search/mysql_test.php @@ -7,12 +7,12 @@ * */ -require_once dirname(__FILE__) . '/search_test.php'; +require_once dirname(__FILE__) . '/base_test.php'; /** * @group functional */ -class phpbb_functional_search_mysql_test extends phpbb_functional_search_test +class phpbb_functional_search_mysql_test extends phpbb_functional_search_base_test { protected $search_backend; diff --git a/tests/functional/search_native_test.php b/tests/functional/search/native_test.php similarity index 84% rename from tests/functional/search_native_test.php rename to tests/functional/search/native_test.php index 9bcdc01547..d2f274e051 100644 --- a/tests/functional/search_native_test.php +++ b/tests/functional/search/native_test.php @@ -7,12 +7,12 @@ * */ -require_once dirname(__FILE__) . '/search_test.php'; +require_once dirname(__FILE__) . '/base_test.php'; /** * @group functional */ -class phpbb_functional_search_native_test extends phpbb_functional_search_test +class phpbb_functional_search_native_test extends phpbb_functional_search_base_test { protected $search_backend; diff --git a/tests/functional/search_postgres_test.php b/tests/functional/search/postgres_test.php similarity index 84% rename from tests/functional/search_postgres_test.php rename to tests/functional/search/postgres_test.php index 5b46db5c82..110360f28e 100644 --- a/tests/functional/search_postgres_test.php +++ b/tests/functional/search/postgres_test.php @@ -7,12 +7,12 @@ * */ -require_once dirname(__FILE__) . '/search_test.php'; +require_once dirname(__FILE__) . '/base_test.php'; /** * @group functional */ -class phpbb_functional_search_postgres_test extends phpbb_functional_search_test +class phpbb_functional_search_postgres_test extends phpbb_functional_search_base_test { protected $search_backend; diff --git a/tests/functional/search_sphinx_test.php b/tests/functional/search/sphinx_test.php similarity index 88% rename from tests/functional/search_sphinx_test.php rename to tests/functional/search/sphinx_test.php index 6b94f388c4..048f4e491b 100644 --- a/tests/functional/search_sphinx_test.php +++ b/tests/functional/search/sphinx_test.php @@ -7,12 +7,12 @@ * */ -require_once dirname(__FILE__) . '/search_test.php'; +require_once dirname(__FILE__) . '/base_test.php'; /** * @group functional */ -class phpbb_functional_search_sphinx_test extends phpbb_functional_search_test +class phpbb_functional_search_sphinx_test extends phpbb_functional_search_base_test { protected $search_backend; From a3482bded45272aa10f494e89e9e35d48ebf9e29 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Sat, 6 Jul 2013 22:55:52 +0530 Subject: [PATCH 060/661] [ticket/11608] remove setUp method override PHPBB3-11608 --- tests/functional/search/mysql_test.php | 8 +------- tests/functional/search/native_test.php | 8 +------- tests/functional/search/postgres_test.php | 8 +------- tests/functional/search/sphinx_test.php | 12 +----------- 4 files changed, 4 insertions(+), 32 deletions(-) diff --git a/tests/functional/search/mysql_test.php b/tests/functional/search/mysql_test.php index f27269d76a..a94b9a7dc5 100644 --- a/tests/functional/search/mysql_test.php +++ b/tests/functional/search/mysql_test.php @@ -14,11 +14,5 @@ require_once dirname(__FILE__) . '/base_test.php'; */ class phpbb_functional_search_mysql_test extends phpbb_functional_search_base_test { - protected $search_backend; - - public function setUp() - { - parent::setUp(); - $this->search_backend = 'phpbb_search_fulltext_mysql'; - } + protected $search_backend = 'phpbb_search_fulltext_mysql'; } diff --git a/tests/functional/search/native_test.php b/tests/functional/search/native_test.php index d2f274e051..a442bb758a 100644 --- a/tests/functional/search/native_test.php +++ b/tests/functional/search/native_test.php @@ -14,11 +14,5 @@ require_once dirname(__FILE__) . '/base_test.php'; */ class phpbb_functional_search_native_test extends phpbb_functional_search_base_test { - protected $search_backend; - - public function setUp() - { - parent::setUp(); - $this->search_backend = 'phpbb_search_fulltext_native'; - } + protected $search_backend = 'phpbb_search_fulltext_native'; } diff --git a/tests/functional/search/postgres_test.php b/tests/functional/search/postgres_test.php index 110360f28e..f268be1054 100644 --- a/tests/functional/search/postgres_test.php +++ b/tests/functional/search/postgres_test.php @@ -14,11 +14,5 @@ require_once dirname(__FILE__) . '/base_test.php'; */ class phpbb_functional_search_postgres_test extends phpbb_functional_search_base_test { - protected $search_backend; - - public function setUp() - { - parent::setUp(); - $this->search_backend = 'phpbb_search_fulltext_postgres'; - } + protected $search_backend = 'phpbb_search_fulltext_postgres'; } diff --git a/tests/functional/search/sphinx_test.php b/tests/functional/search/sphinx_test.php index 048f4e491b..47ad21dfdb 100644 --- a/tests/functional/search/sphinx_test.php +++ b/tests/functional/search/sphinx_test.php @@ -14,15 +14,5 @@ require_once dirname(__FILE__) . '/base_test.php'; */ class phpbb_functional_search_sphinx_test extends phpbb_functional_search_base_test { - protected $search_backend; - - public function setUp() - { - parent::setUp(); - $this->search_backend = 'phpbb_search_fulltext_sphinx'; - if (!isset($config['fulltext_sphinx_id'])) - { - $this->markTestIncomplete('Sphinx search not running for the test board'); - } - } + protected $search_backend = 'phpbb_search_fulltext_sphinx'; } From c31035d047d8c7b35c32ce72492c66e602586c5e Mon Sep 17 00:00:00 2001 From: Dhruv Date: Sun, 28 Jul 2013 00:25:55 +0530 Subject: [PATCH 061/661] [ticket/11608] Mark failed search test incomplete for native search PHPBB3-11608 --- tests/functional/search/base_test.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/functional/search/base_test.php b/tests/functional/search/base_test.php index 538db6de89..7482f5624e 100644 --- a/tests/functional/search/base_test.php +++ b/tests/functional/search/base_test.php @@ -23,6 +23,10 @@ abstract class phpbb_functional_search_base_test extends phpbb_functional_test_c { $crawler = self::request('GET', 'search.php?keywords=' . $keywords); $this->assertEquals(0, $crawler->filter('.postbody')->count()); + if ($this->search_backend == 'phpbb_search_fulltext_native') + { + $this->markTestIncomplete('Native search when fails doesn\'t show the search query'); + } $split_keywords_string = str_replace(array('+', '-'), ' ', $keywords); $this->assertEquals($split_keywords_string, $crawler->filter('#keywords')->attr('value')); } From 5135ae2a246967b6ad99405e4e616fbe0246311c Mon Sep 17 00:00:00 2001 From: Dhruv Date: Sat, 31 Aug 2013 23:30:50 +0530 Subject: [PATCH 062/661] [ticket/11608] Mark sphinx tests as incomplete for now PHPBB3-11608 --- tests/functional/search/base_test.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/functional/search/base_test.php b/tests/functional/search/base_test.php index 7482f5624e..cc048e5ab8 100644 --- a/tests/functional/search/base_test.php +++ b/tests/functional/search/base_test.php @@ -33,6 +33,11 @@ abstract class phpbb_functional_search_base_test extends phpbb_functional_test_c public function test_search_backend() { + if ($this->search_backend == 'phpbb_search_fulltext_sphinx') + { + $this->markTestIncomplete('Sphinx Tests are not supported'); + } + $this->login(); $this->admin_login(); From 1cd888e0eeb03c61d3bbe01968cedefa82eced59 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Sun, 1 Sep 2013 19:23:57 +0530 Subject: [PATCH 063/661] [ticket/11608] Mark postgres search not found test as incomplete PHPBB3-11608 --- tests/functional/search/base_test.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/functional/search/base_test.php b/tests/functional/search/base_test.php index cc048e5ab8..fd17048371 100644 --- a/tests/functional/search/base_test.php +++ b/tests/functional/search/base_test.php @@ -23,9 +23,9 @@ abstract class phpbb_functional_search_base_test extends phpbb_functional_test_c { $crawler = self::request('GET', 'search.php?keywords=' . $keywords); $this->assertEquals(0, $crawler->filter('.postbody')->count()); - if ($this->search_backend == 'phpbb_search_fulltext_native') + if ($this->search_backend == 'phpbb_search_fulltext_native' || $this->search_backend == 'phpbb_search_fulltext_postgres') { - $this->markTestIncomplete('Native search when fails doesn\'t show the search query'); + $this->markTestIncomplete('Native and Postgres search when fails doesn\'t show the search query'); } $split_keywords_string = str_replace(array('+', '-'), ' ', $keywords); $this->assertEquals($split_keywords_string, $crawler->filter('#keywords')->attr('value')); From 77ef82682eeb1aea6bccc2ca7b8a14aaad0d02c5 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Sun, 1 Sep 2013 20:03:02 +0530 Subject: [PATCH 064/661] [ticket/11608] Remove suffix test from base class Rename base class to phpbb_functional_search_base and fix Docblocks as per phpbb guidelines. PHPBB3-11608 --- tests/functional/search/base_test.php | 18 +++++++++--------- tests/functional/search/mysql_test.php | 14 +++++++------- tests/functional/search/native_test.php | 14 +++++++------- tests/functional/search/postgres_test.php | 14 +++++++------- tests/functional/search/sphinx_test.php | 14 +++++++------- 5 files changed, 37 insertions(+), 37 deletions(-) diff --git a/tests/functional/search/base_test.php b/tests/functional/search/base_test.php index fd17048371..c6a5a18c94 100644 --- a/tests/functional/search/base_test.php +++ b/tests/functional/search/base_test.php @@ -1,16 +1,16 @@ Date: Sun, 1 Sep 2013 22:15:33 +0530 Subject: [PATCH 065/661] [ticket/11608] Rename base search test class file PHPBB3-11608 --- tests/functional/search/{base_test.php => base.php} | 0 tests/functional/search/mysql_test.php | 2 +- tests/functional/search/native_test.php | 2 +- tests/functional/search/postgres_test.php | 2 +- tests/functional/search/sphinx_test.php | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) rename tests/functional/search/{base_test.php => base.php} (100%) diff --git a/tests/functional/search/base_test.php b/tests/functional/search/base.php similarity index 100% rename from tests/functional/search/base_test.php rename to tests/functional/search/base.php diff --git a/tests/functional/search/mysql_test.php b/tests/functional/search/mysql_test.php index e09fa0008c..db6f688e2a 100644 --- a/tests/functional/search/mysql_test.php +++ b/tests/functional/search/mysql_test.php @@ -7,7 +7,7 @@ * */ -require_once dirname(__FILE__) . '/base_test.php'; +require_once dirname(__FILE__) . '/base.php'; /** * @group functional diff --git a/tests/functional/search/native_test.php b/tests/functional/search/native_test.php index c4af523b67..cefe87eb15 100644 --- a/tests/functional/search/native_test.php +++ b/tests/functional/search/native_test.php @@ -7,7 +7,7 @@ * */ -require_once dirname(__FILE__) . '/base_test.php'; +require_once dirname(__FILE__) . '/base.php'; /** * @group functional diff --git a/tests/functional/search/postgres_test.php b/tests/functional/search/postgres_test.php index cb769a2857..900e01da2a 100644 --- a/tests/functional/search/postgres_test.php +++ b/tests/functional/search/postgres_test.php @@ -7,7 +7,7 @@ * */ -require_once dirname(__FILE__) . '/base_test.php'; +require_once dirname(__FILE__) . '/base.php'; /** * @group functional diff --git a/tests/functional/search/sphinx_test.php b/tests/functional/search/sphinx_test.php index c12289e5c6..cc387d33a7 100644 --- a/tests/functional/search/sphinx_test.php +++ b/tests/functional/search/sphinx_test.php @@ -7,7 +7,7 @@ * */ -require_once dirname(__FILE__) . '/base_test.php'; +require_once dirname(__FILE__) . '/base.php'; /** * @group functional From 2b5311deac33677389b52b449476066a7302b727 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Sun, 1 Sep 2013 22:25:27 +0530 Subject: [PATCH 066/661] [ticket/11608] Move markIncomplete to search backends test PHPBB3-11608 --- tests/functional/search/base.php | 9 --------- tests/functional/search/native_test.php | 5 +++++ tests/functional/search/postgres_test.php | 5 +++++ tests/functional/search/sphinx_test.php | 5 +++++ 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/tests/functional/search/base.php b/tests/functional/search/base.php index c6a5a18c94..28327da914 100644 --- a/tests/functional/search/base.php +++ b/tests/functional/search/base.php @@ -23,21 +23,12 @@ abstract class phpbb_functional_search_base extends phpbb_functional_test_case { $crawler = self::request('GET', 'search.php?keywords=' . $keywords); $this->assertEquals(0, $crawler->filter('.postbody')->count()); - if ($this->search_backend == 'phpbb_search_fulltext_native' || $this->search_backend == 'phpbb_search_fulltext_postgres') - { - $this->markTestIncomplete('Native and Postgres search when fails doesn\'t show the search query'); - } $split_keywords_string = str_replace(array('+', '-'), ' ', $keywords); $this->assertEquals($split_keywords_string, $crawler->filter('#keywords')->attr('value')); } public function test_search_backend() { - if ($this->search_backend == 'phpbb_search_fulltext_sphinx') - { - $this->markTestIncomplete('Sphinx Tests are not supported'); - } - $this->login(); $this->admin_login(); diff --git a/tests/functional/search/native_test.php b/tests/functional/search/native_test.php index cefe87eb15..63e7085308 100644 --- a/tests/functional/search/native_test.php +++ b/tests/functional/search/native_test.php @@ -15,4 +15,9 @@ require_once dirname(__FILE__) . '/base.php'; class phpbb_functional_search_native_test extends phpbb_functional_search_base { protected $search_backend = 'phpbb_search_fulltext_native'; + + protected function assert_search_not_found($keywords) + { + $this->markTestIncomplete('Native search when fails doesn\'t show the search query'); + } } diff --git a/tests/functional/search/postgres_test.php b/tests/functional/search/postgres_test.php index 900e01da2a..f733238c8f 100644 --- a/tests/functional/search/postgres_test.php +++ b/tests/functional/search/postgres_test.php @@ -15,4 +15,9 @@ require_once dirname(__FILE__) . '/base.php'; class phpbb_functional_search_postgres_test extends phpbb_functional_search_base { protected $search_backend = 'phpbb_search_fulltext_postgres'; + + protected function assert_search_not_found($keywords) + { + $this->markTestIncomplete('Postgres search when fails doesn\'t show the search query'); + } } diff --git a/tests/functional/search/sphinx_test.php b/tests/functional/search/sphinx_test.php index cc387d33a7..9db4138714 100644 --- a/tests/functional/search/sphinx_test.php +++ b/tests/functional/search/sphinx_test.php @@ -15,4 +15,9 @@ require_once dirname(__FILE__) . '/base.php'; class phpbb_functional_search_sphinx_test extends phpbb_functional_search_base { protected $search_backend = 'phpbb_search_fulltext_sphinx'; + + public function test_search_backend() + { + $this->markTestIncomplete('Sphinx Tests are not supported'); + } } From 67536eb9f78bb1834574bfa9c224775f6edbab2e Mon Sep 17 00:00:00 2001 From: Dhruv Date: Sat, 5 Oct 2013 21:21:15 +0530 Subject: [PATCH 067/661] [ticket/11608] Update search backend class names to namespaces PHPBB3-11608 --- tests/functional/search/mysql_test.php | 2 +- tests/functional/search/native_test.php | 2 +- tests/functional/search/postgres_test.php | 2 +- tests/functional/search/sphinx_test.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/functional/search/mysql_test.php b/tests/functional/search/mysql_test.php index db6f688e2a..0693c69968 100644 --- a/tests/functional/search/mysql_test.php +++ b/tests/functional/search/mysql_test.php @@ -14,5 +14,5 @@ require_once dirname(__FILE__) . '/base.php'; */ class phpbb_functional_search_mysql_test extends phpbb_functional_search_base { - protected $search_backend = 'phpbb_search_fulltext_mysql'; + protected $search_backend = '\phpbb\search\fulltext_mysql'; } diff --git a/tests/functional/search/native_test.php b/tests/functional/search/native_test.php index 63e7085308..ce568df616 100644 --- a/tests/functional/search/native_test.php +++ b/tests/functional/search/native_test.php @@ -14,7 +14,7 @@ require_once dirname(__FILE__) . '/base.php'; */ class phpbb_functional_search_native_test extends phpbb_functional_search_base { - protected $search_backend = 'phpbb_search_fulltext_native'; + protected $search_backend = '\phpbb\search\fulltext_native'; protected function assert_search_not_found($keywords) { diff --git a/tests/functional/search/postgres_test.php b/tests/functional/search/postgres_test.php index f733238c8f..487b8aeebb 100644 --- a/tests/functional/search/postgres_test.php +++ b/tests/functional/search/postgres_test.php @@ -14,7 +14,7 @@ require_once dirname(__FILE__) . '/base.php'; */ class phpbb_functional_search_postgres_test extends phpbb_functional_search_base { - protected $search_backend = 'phpbb_search_fulltext_postgres'; + protected $search_backend = '\phpbb\search\fulltext_postgres'; protected function assert_search_not_found($keywords) { diff --git a/tests/functional/search/sphinx_test.php b/tests/functional/search/sphinx_test.php index 9db4138714..ef2522f9ed 100644 --- a/tests/functional/search/sphinx_test.php +++ b/tests/functional/search/sphinx_test.php @@ -14,7 +14,7 @@ require_once dirname(__FILE__) . '/base.php'; */ class phpbb_functional_search_sphinx_test extends phpbb_functional_search_base { - protected $search_backend = 'phpbb_search_fulltext_sphinx'; + protected $search_backend = '\phpbb\search\fulltext_sphinx'; public function test_search_backend() { From 8c73d2834149bdea21c9feb9a5ab8c4525cd6bff Mon Sep 17 00:00:00 2001 From: Dhruv Date: Sat, 5 Oct 2013 22:49:55 +0530 Subject: [PATCH 068/661] [ticket/11608] Mark failed test as incomplete for mysql search backend PHPBB3-11608 --- tests/functional/search/mysql_test.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/functional/search/mysql_test.php b/tests/functional/search/mysql_test.php index 0693c69968..7af8051417 100644 --- a/tests/functional/search/mysql_test.php +++ b/tests/functional/search/mysql_test.php @@ -15,4 +15,9 @@ require_once dirname(__FILE__) . '/base.php'; class phpbb_functional_search_mysql_test extends phpbb_functional_search_base { protected $search_backend = '\phpbb\search\fulltext_mysql'; + + protected function assert_search_not_found($keywords) + { + $this->markTestIncomplete('MySQL search when fails doesn\'t show the search query'); + } } From ed19176aaf9cf29e70505ddbeae7f8986c201f66 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Sat, 5 Oct 2013 22:55:19 +0530 Subject: [PATCH 069/661] [ticket/11888] Use \phpbb\search\fulltext_native as search backend config If \ is missing, the default search backend shown in ACP is wrong. PHPBB3-11888 --- phpBB/install/schemas/schema_data.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 70138f35fd..4458dde6a3 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -237,7 +237,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_block_size' INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_gc', '7200'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_interval', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_anonymous_interval', '0'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_type', 'phpbb\search\fulltext_native'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_type', '\phpbb\search\fulltext_native'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_store_results', '1800'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('secure_allow_deny', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('secure_allow_empty_referer', '1'); From 70c757a3a99b4232c13c31d968df5a9ad20a495d Mon Sep 17 00:00:00 2001 From: Cesar G Date: Sat, 5 Oct 2013 20:59:07 -0700 Subject: [PATCH 070/661] [ticket/11894] Fix typo in "Delete post" option PHPBB3-11894 --- phpBB/language/en/posting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php index 0e8d59a92e..ab851638ae 100644 --- a/phpBB/language/en/posting.php +++ b/phpBB/language/en/posting.php @@ -85,7 +85,7 @@ $lang = array_merge($lang, array( 'DELETE_POSTS_PERMANENTLY_CONFIRM' => 'Are you sure you want to permanently delete these posts?', 'DELETE_REASON' => 'Soft delete reason', 'DELETE_REASON_EXPLAIN' => 'The specified reason for deletion will be visible to moderators.', - 'DELETE_POST_WARN' => 'Deleted this post', + 'DELETE_POST_WARN' => 'Delete this post', 'DELETE_TOPIC_CONFIRM' => 'Are you sure you want to delete this topic?', 'DELETE_TOPIC_PERMANENTLY' => 'Permanently delete this topic so it can not be recovered', 'DELETE_TOPIC_PERMANENTLY_CONFIRM' => 'Are you sure you want to permanently delete this topic?', From 19178421cfe766d12e4ffaa700da3c136137ecd6 Mon Sep 17 00:00:00 2001 From: Cesar G Date: Sat, 5 Oct 2013 21:22:09 -0700 Subject: [PATCH 071/661] [ticket/11893] Remove unnecessary
    causing a large font size PHPBB3-11893 --- phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html b/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html index a6c19508e2..d8a78b8c6d 100644 --- a/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html +++ b/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html @@ -6,7 +6,6 @@
    -

    @@ -38,7 +37,6 @@ -

    From be9b767019bc91fa005fa592be6031d6bc39b078 Mon Sep 17 00:00:00 2001 From: Cesar G Date: Sat, 5 Oct 2013 21:38:20 -0700 Subject: [PATCH 072/661] =?UTF-8?q?[ticket/11739]=20Rename=20=E2=80=9CReme?= =?UTF-8?q?mber=20Me=E2=80=9D=20login=20keys=20module?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PHPBB3-11739 --- phpBB/language/en/ucp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index e2d5dc5ad1..2f4d35a5b4 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -529,7 +529,7 @@ $lang = array_merge($lang, array( 'UCP_PROFILE_PROFILE_INFO' => 'Edit profile', 'UCP_PROFILE_REG_DETAILS' => 'Edit account settings', 'UCP_PROFILE_SIGNATURE' => 'Edit signature', - 'UCP_PROFILE_AUTOLOGIN_KEYS'=> 'Edit "Remember Me" login keys', + 'UCP_PROFILE_AUTOLOGIN_KEYS'=> 'Manage ā€œRemember Meā€ login keys', 'UCP_USERGROUPS' => 'Usergroups', 'UCP_USERGROUPS_MEMBER' => 'Edit memberships', From da1edb4578ab66265c1a846180b1123bbb889c72 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Sun, 6 Oct 2013 10:38:11 +0530 Subject: [PATCH 073/661] [ticket/11888] Update default search backend in namespaces migration PHPBB3-11888 --- phpBB/phpbb/db/migration/data/v310/namespaces.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/phpbb/db/migration/data/v310/namespaces.php b/phpBB/phpbb/db/migration/data/v310/namespaces.php index 9b182f88b8..f74ecbd874 100644 --- a/phpBB/phpbb/db/migration/data/v310/namespaces.php +++ b/phpBB/phpbb/db/migration/data/v310/namespaces.php @@ -23,7 +23,7 @@ class namespaces extends \phpbb\db\migration\migration return array( array('if', array( (preg_match('#^phpbb_search_#', $this->config['search_type'])), - array('config.update', array('search_type', str_replace('phpbb_search_', 'phpbb\\search\\', $this->config['search_type']))), + array('config.update', array('search_type', str_replace('phpbb_search_', '\\phpbb\\search\\', $this->config['search_type']))), )), ); } From 637a5a5eea6eaa876d1d69386dd688d0f44efa69 Mon Sep 17 00:00:00 2001 From: Cesar G Date: Sun, 6 Oct 2013 21:40:21 -0700 Subject: [PATCH 074/661] [ticket/10383] AJAXify poll voting PHPBB3-10383 --- phpBB/styles/prosilver/template/ajax.js | 74 +++++++++++++++++++ .../prosilver/template/viewtopic_body.html | 22 +++--- phpBB/viewtopic.php | 30 +++++++- 3 files changed, 112 insertions(+), 14 deletions(-) diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js index 394aca749b..decbba1d89 100644 --- a/phpBB/styles/prosilver/template/ajax.js +++ b/phpBB/styles/prosilver/template/ajax.js @@ -157,7 +157,81 @@ phpbb.addAjaxCallback('zebra', function(res) { } }); +/** + * This callback updates the poll results after voting. + */ +phpbb.addAjaxCallback('vote_poll', function(res) { + if (typeof res.success !== 'undefined') { + var poll = $('.topic_poll'); + var panel = poll.find('.panel'); + var results_visible = poll.find('dl:first-child .resultbar').is(':visible'); + // Force the current height to prevent the page from jumping when the content changes + panel.height(panel.find('.inner').outerHeight()); + + // Remove the View results link + if (!results_visible) { + poll.find('.poll_view_results').fadeOut(500); + } + + if (!res.can_vote) { + poll.find('.polls, .poll_max_votes, .poll_vote, .poll_option_select').fadeOut(500, function () { + poll.find('.resultbar, .poll_option_percent, .poll_total_votes').show(); + }); + } else { + // If the user can still vote, simply slide down the results + poll.find('.resultbar, .poll_option_percent, .poll_total_votes').slideDown(500); + } + + // Update the total votes count + poll.find('.poll_total_vote_cnt').html(res.total_votes); + + // Update each option + poll.find('[data-poll-option-id]').each(function() { + var option = $(this); + var option_id = option.attr('data-poll-option-id'); + var voted = (typeof res.user_votes[option_id] !== 'undefined') ? true : false; + var percent = (!res.total_votes) ? 0 : Math.round((res.vote_counts[option_id] / res.total_votes) * 100); + + option.toggleClass('voted', voted); + + // Update the bars + var bar = option.find('.resultbar div'); + var bar_time_lapse = (res.can_vote) ? 500 : 1500; + var new_bar_class = (percent == 100) ? 'pollbar5' : 'pollbar' + (Math.floor(percent / 20) + 1); + + setTimeout(function () { + bar.animate({width: percent + '%'}, 500).removeClass('pollbar1 pollbar2 pollbar3 pollbar4 pollbar5').addClass(new_bar_class); + bar.html(res.vote_counts[option_id]); + + var percent_txt = (!percent) ? res.NO_VOTES : percent + '%'; + option.find('.poll_option_percent').html(percent_txt); + }, bar_time_lapse); + }); + + if (!res.can_vote) { + poll.find('.polls').delay(400).fadeIn(500); + } + + // Remove the gap resulting from removing options + setTimeout(function() { + panel.animate({height: panel.find('.inner').height()}, 500); + }, 1500); + } +}); + +/** + * Show poll results when clicking View results link. + */ +$('.poll_view_results a').click(function(e) { + // Do not follow the link + e.preventDefault(); + + var poll = $(this).parents('.topic_poll'); + + poll.find('.resultbar, .poll_option_percent, .poll_total_votes').slideDown(500); + poll.find('.poll_view_results').fadeOut(500); +}); $('[data-ajax]').each(function() { var $this = $(this), diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index e104257e12..61077fd0c4 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -60,41 +60,39 @@
    -
    +

    {POLL_QUESTION}

    -

    {L_POLL_LENGTH}
    {L_MAX_VOTES}

    +

    {L_POLL_LENGTH}
    {L_MAX_VOTES}

    -
    title="{L_POLL_VOTED_OPTION}"> +
    title="{L_POLL_VOTED_OPTION}" data-poll-option-id="{poll_option.POLL_OPTION_ID}">
    {poll_option.POLL_OPTION_CAPTION}
    -
    checked="checked" /> checked="checked" />
    -
    {poll_option.POLL_OPTION_RESULT}
    -
    {L_NO_VOTES}{poll_option.POLL_OPTION_PERCENT}
    +
    checked="checked" /> checked="checked" />
    +
    {poll_option.POLL_OPTION_RESULT}
    +
    {L_NO_VOTES}{poll_option.POLL_OPTION_PERCENT}
    - -
    +
     
    -
    {L_TOTAL_VOTES}{L_COLON} {TOTAL_VOTES}
    +
    {L_TOTAL_VOTES}{L_COLON} {TOTAL_VOTES}
    - -
    +
     
    -
    +
     
    {L_VIEW_RESULTS}
    diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 69a972ed3e..43bf3a27c6 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -689,10 +689,12 @@ if (!empty($topic_data['poll_start'])) ORDER BY o.poll_option_id"; $result = $db->sql_query($sql); - $poll_info = array(); + $poll_info = $vote_counts = array(); while ($row = $db->sql_fetchrow($result)) { $poll_info[] = $row; + $option_id = (int) $row['poll_option_id']; + $vote_counts[$option_id] = (int) $row['poll_option_total']; } $db->sql_freeresult($result); @@ -774,6 +776,8 @@ if (!empty($topic_data['poll_start'])) AND topic_id = ' . (int) $topic_id; $db->sql_query($sql); + $vote_counts[$option]++; + if ($user->data['is_registered']) { $sql_ary = array( @@ -798,6 +802,8 @@ if (!empty($topic_data['poll_start'])) AND topic_id = ' . (int) $topic_id; $db->sql_query($sql); + $vote_counts[$option]--; + if ($user->data['is_registered']) { $sql = 'DELETE FROM ' . POLL_VOTES_TABLE . ' @@ -821,9 +827,29 @@ if (!empty($topic_data['poll_start'])) $db->sql_query($sql); $redirect_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id" . (($start == 0) ? '' : "&start=$start")); + $message = $user->lang['VOTE_SUBMITTED'] . '

    ' . sprintf($user->lang['RETURN_TOPIC'], '', ''); + + if ($request->is_ajax()) + { + // Filter out invalid options + $valid_user_votes = array_intersect(array_keys($vote_counts), $voted_id); + + $data = array( + 'MESSAGE_TITLE' => $user->lang['INFORMATION'], + 'MESSAGE_TEXT' => $message, + 'NO_VOTES' => $user->lang['NO_VOTES'], + 'success' => true, + 'user_votes' => array_flip($valid_user_votes), + 'vote_counts' => $vote_counts, + 'total_votes' => array_sum($vote_counts), + 'can_vote' => !sizeof($valid_user_votes) || ($auth->acl_get('f_votechg', $forum_id) && $topic_data['poll_vote_change']), + ); + $json_response = new \phpbb\json_response(); + $json_response->send($data); + } meta_refresh(5, $redirect_url); - trigger_error($user->lang['VOTE_SUBMITTED'] . '

    ' . sprintf($user->lang['RETURN_TOPIC'], '', '')); + trigger_error($message); } $poll_total = 0; From 7f312772699c10339a8c50ef7952179da40ef7e7 Mon Sep 17 00:00:00 2001 From: Cesar G Date: Mon, 7 Oct 2013 07:39:50 -0700 Subject: [PATCH 075/661] [ticket/10383] Make the content transitions smoother. PHPBB3-10383 --- phpBB/styles/prosilver/template/ajax.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js index decbba1d89..39beab4f16 100644 --- a/phpBB/styles/prosilver/template/ajax.js +++ b/phpBB/styles/prosilver/template/ajax.js @@ -171,7 +171,7 @@ phpbb.addAjaxCallback('vote_poll', function(res) { // Remove the View results link if (!results_visible) { - poll.find('.poll_view_results').fadeOut(500); + poll.find('.poll_view_results').hide(500); } if (!res.can_vote) { @@ -180,7 +180,7 @@ phpbb.addAjaxCallback('vote_poll', function(res) { }); } else { // If the user can still vote, simply slide down the results - poll.find('.resultbar, .poll_option_percent, .poll_total_votes').slideDown(500); + poll.find('.resultbar, .poll_option_percent, .poll_total_votes').show(500); } // Update the total votes count @@ -229,8 +229,8 @@ $('.poll_view_results a').click(function(e) { var poll = $(this).parents('.topic_poll'); - poll.find('.resultbar, .poll_option_percent, .poll_total_votes').slideDown(500); - poll.find('.poll_view_results').fadeOut(500); + poll.find('.resultbar, .poll_option_percent, .poll_total_votes').show(500); + poll.find('.poll_view_results').hide(500); }); $('[data-ajax]').each(function() { From 98a1694c7c1022d50c30b7dcd46f9f0fc9f5f7b4 Mon Sep 17 00:00:00 2001 From: Cesar G Date: Mon, 7 Oct 2013 17:55:04 -0700 Subject: [PATCH 076/661] [ticket/10383] Update the results without the overlay popup. PHPBB3-10383 --- phpBB/styles/prosilver/template/ajax.js | 33 +++++++++++++++++-- .../prosilver/template/viewtopic_body.html | 3 +- phpBB/styles/prosilver/theme/content.css | 6 ++++ phpBB/viewtopic.php | 2 -- 4 files changed, 38 insertions(+), 6 deletions(-) diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js index 39beab4f16..28656d47d3 100644 --- a/phpBB/styles/prosilver/template/ajax.js +++ b/phpBB/styles/prosilver/template/ajax.js @@ -166,8 +166,12 @@ phpbb.addAjaxCallback('vote_poll', function(res) { var panel = poll.find('.panel'); var results_visible = poll.find('dl:first-child .resultbar').is(':visible'); - // Force the current height to prevent the page from jumping when the content changes - panel.height(panel.find('.inner').outerHeight()); + // Set min-height to prevent the page from jumping when the content changes + var update_panel_height = function (height) { + var height = (typeof height === 'undefined') ? panel.find('.inner').outerHeight() : height; + panel.css('min-height', height); + }; + update_panel_height(); // Remove the View results link if (!results_visible) { @@ -213,10 +217,33 @@ phpbb.addAjaxCallback('vote_poll', function(res) { poll.find('.polls').delay(400).fadeIn(500); } + // Display "Your vote has been cast." message. Disappears after 5 seconds. + var confirmation_delay = (res.can_vote) ? 300 : 900; + poll.find('.vote-submitted').delay(confirmation_delay).slideDown(200, function() { + if (results_visible) { + update_panel_height(); + } + + $(this).delay(5000).fadeOut(500, function() { + resize_panel(300); + }); + }); + // Remove the gap resulting from removing options setTimeout(function() { - panel.animate({height: panel.find('.inner').height()}, 500); + resize_panel(500); }, 1500); + + var resize_panel = function (time) { + var panel_height = panel.height(); + var inner_height = panel.find('.inner').outerHeight(); + + if (panel_height != inner_height) { + panel.css({'min-height': '', 'height': panel_height}).animate({height: inner_height}, time, function () { + panel.css({'min-height': inner_height, 'height': ''}); + }); + } + }; } }); diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index 61077fd0c4..e678ea8f8c 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -60,7 +60,7 @@
    - +
    @@ -98,6 +98,7 @@
    +
    diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css index c56c7f9ef8..60475aea7d 100644 --- a/phpBB/styles/prosilver/theme/content.css +++ b/phpBB/styles/prosilver/theme/content.css @@ -662,6 +662,12 @@ fieldset.polls dd div { border-right: 1px solid transparent; } +.vote-submitted { + font-size: 1.2em; + font-weight: bold; + text-align: center; +} + /* Poster profile block ----------------------------------------*/ .postprofile { diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 43bf3a27c6..3a7e633c99 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -835,8 +835,6 @@ if (!empty($topic_data['poll_start'])) $valid_user_votes = array_intersect(array_keys($vote_counts), $voted_id); $data = array( - 'MESSAGE_TITLE' => $user->lang['INFORMATION'], - 'MESSAGE_TEXT' => $message, 'NO_VOTES' => $user->lang['NO_VOTES'], 'success' => true, 'user_votes' => array_flip($valid_user_votes), From 967bef365688508d2e587b228c1bfdd31a227f37 Mon Sep 17 00:00:00 2001 From: Nathaniel Guse Date: Tue, 8 Oct 2013 09:46:46 -0500 Subject: [PATCH 077/661] [ticket/11895] Fix undefined $forum_id PHPBB3-11895 --- phpBB/phpbb/feed/forum.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/phpbb/feed/forum.php b/phpBB/phpbb/feed/forum.php index 5f64d85625..83066d2d25 100644 --- a/phpBB/phpbb/feed/forum.php +++ b/phpBB/phpbb/feed/forum.php @@ -36,7 +36,7 @@ class forum extends \phpbb\feed\post_base * @param int $forum_id Forum ID * @return \phpbb\feed\forum */ - public function set_forum_id($topic_id) + public function set_forum_id($forum_id) { $this->forum_id = (int) $forum_id; From 964f6fe89ad77251b8528ed634d140dc57fc5138 Mon Sep 17 00:00:00 2001 From: Cesar G Date: Tue, 8 Oct 2013 10:56:04 -0700 Subject: [PATCH 078/661] [ticket/11890] Fix untranslated string when deleting posts through MCP. PHPBB3-11890 --- phpBB/includes/mcp/mcp_main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index 4f27d32a5a..7a22c31248 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -921,7 +921,7 @@ function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '', // None of the topics is really deleted, so a redirect won't hurt much. $deleted_topics = 0; - $success_msg = (sizeof($post_info) == 1) ? 'POST_DELETED_SUCCESS' : 'POSTS_DELETED_SUCCESS'; + $success_msg = (sizeof($post_info) == 1) ? $user->lang['POST_DELETED_SUCCESS'] : $user->lang['POSTS_DELETED_SUCCESS']; foreach ($approve_log as $row) { From 6a75edc057270f081c4eb85763771e689770d510 Mon Sep 17 00:00:00 2001 From: Cesar G Date: Tue, 8 Oct 2013 11:17:02 -0700 Subject: [PATCH 079/661] [ticket/11892] Fix undefined variables: to_forum_id & to_topic_id PHPBB3-11892 --- phpBB/includes/mcp/mcp_forum.php | 18 +++++----------- phpBB/includes/mcp/mcp_topic.php | 36 +++++++++----------------------- 2 files changed, 15 insertions(+), 39 deletions(-) diff --git a/phpBB/includes/mcp/mcp_forum.php b/phpBB/includes/mcp/mcp_forum.php index 6df3320a97..d0d13aaf13 100644 --- a/phpBB/includes/mcp/mcp_forum.php +++ b/phpBB/includes/mcp/mcp_forum.php @@ -450,22 +450,14 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id) // Link to the new topic $return_link .= (($return_link) ? '

    ' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '', ''); + $redirect = request_var('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&t=$to_topic_id"); + $redirect = reapply_sid($redirect); + + meta_refresh(3, $redirect); + trigger_error($user->lang[$success_msg] . '

    ' . $return_link); } else { confirm_box(false, 'MERGE_TOPICS', $s_hidden_fields); } - - $redirect = request_var('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&t=$to_topic_id"); - $redirect = reapply_sid($redirect); - - if (!$success_msg) - { - return; - } - else - { - meta_refresh(3, $redirect); - trigger_error($user->lang[$success_msg] . '

    ' . $return_link); - } } diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php index 9c294b96c8..a2aa03c583 100644 --- a/phpBB/includes/mcp/mcp_topic.php +++ b/phpBB/includes/mcp/mcp_topic.php @@ -568,24 +568,16 @@ function split_topic($action, $topic_id, $to_forum_id, $subject) // Link back to both topics $return_link = sprintf($user->lang['RETURN_TOPIC'], '', '') . '

    ' . sprintf($user->lang['RETURN_NEW_TOPIC'], '', ''); + $redirect = request_var('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&t=$to_topic_id"); + $redirect = reapply_sid($redirect); + + meta_refresh(3, $redirect); + trigger_error($user->lang[$success_msg] . '

    ' . $return_link); } else { confirm_box(false, ($action == 'split_all') ? 'SPLIT_TOPIC_ALL' : 'SPLIT_TOPIC_BEYOND', $s_hidden_fields); } - - $redirect = request_var('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&t=$to_topic_id"); - $redirect = reapply_sid($redirect); - - if (!$success_msg) - { - return; - } - else - { - meta_refresh(3, $redirect); - trigger_error($user->lang[$success_msg] . '

    ' . $return_link); - } } /** @@ -677,22 +669,14 @@ function merge_posts($topic_id, $to_topic_id) // Link to the new topic $return_link .= (($return_link) ? '

    ' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '', ''); + $redirect = request_var('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&t=$to_topic_id"); + $redirect = reapply_sid($redirect); + + meta_refresh(3, $redirect); + trigger_error($user->lang[$success_msg] . '

    ' . $return_link); } else { confirm_box(false, 'MERGE_POSTS', $s_hidden_fields); } - - $redirect = request_var('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&t=$to_topic_id"); - $redirect = reapply_sid($redirect); - - if (!$success_msg) - { - return; - } - else - { - meta_refresh(3, $redirect); - trigger_error($user->lang[$success_msg] . '

    ' . $return_link); - } } From e1ed30a40886a26ec1291ebefad9f959766d485b Mon Sep 17 00:00:00 2001 From: Nathaniel Guse Date: Wed, 9 Oct 2013 10:18:14 -0500 Subject: [PATCH 080/661] [ticket/11898] Correct admin S_LOGIN_ACTION PHPBB3-11898 --- phpBB/includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index e1f96c0b1e..dd0dcc09b6 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -5124,7 +5124,7 @@ function phpbb_build_hidden_fields_for_query_params($request, $exclude = null) function page_header($page_title = '', $display_online_list = true, $item_id = 0, $item = 'forum') { global $db, $config, $template, $SID, $_SID, $_EXTRA_URL, $user, $auth, $phpEx, $phpbb_root_path; - global $phpbb_dispatcher, $request, $phpbb_container, $adm_relative_path; + global $phpbb_dispatcher, $request, $phpbb_container, $phpbb_admin_path; if (defined('HEADER_INC')) { @@ -5423,7 +5423,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 'S_FORUM_ID' => $forum_id, 'S_TOPIC_ID' => $topic_id, - 'S_LOGIN_ACTION' => ((!defined('ADMIN_START')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login') : append_sid("{$phpbb_root_path}{$adm_relative_path}index.$phpEx", false, true, $user->session_id)), + 'S_LOGIN_ACTION' => ((!defined('ADMIN_START')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login') : append_sid("{$phpbb_admin_path}index.$phpEx", false, true, $user->session_id)), 'S_LOGIN_REDIRECT' => build_hidden_fields(array('redirect' => build_url())), 'S_ENABLE_FEEDS' => ($config['feed_enable']) ? true : false, From b992686fe080e1ca39dacd108b5eb416cebad493 Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Thu, 10 Oct 2013 09:08:56 -0500 Subject: [PATCH 081/661] [ticket/11898] Correct adm_relative_path created by installer PHPBB3-11898 --- phpBB/includes/functions_install.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/functions_install.php b/phpBB/includes/functions_install.php index bfd669fdfa..1be6e49471 100644 --- a/phpBB/includes/functions_install.php +++ b/phpBB/includes/functions_install.php @@ -505,7 +505,7 @@ function phpbb_create_config_file_data($data, $dbms, $debug = false, $debug_test 'dbpasswd' => htmlspecialchars_decode($data['dbpasswd']), 'table_prefix' => $data['table_prefix'], - 'adm_relative_path' => 'adm/', + 'phpbb_adm_relative_path' => 'adm/', 'acm_type' => 'phpbb\cache\driver\file', ); From d024ba9b092843d5c933a2ac3b8b9d1c217be629 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Thu, 10 Oct 2013 21:01:15 +0200 Subject: [PATCH 082/661] [ticket/11901] Pass empty string as relative_url for non-local magic URL. Only the regular expression for MAGIC_URL_LOCAL has three capturing groups. As a result $matches[3] is only set in this case. Prior to PHPBB3-11606 an empty string was passed to make_clickable_callback() as a replacement in case of less than three capturing groups. This patch reintroduces the empty string. Regression from 49c12ef4be229bf2223139298766ef441b075fbc. PHPBB3-11901 --- phpBB/includes/functions_content.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php index 863450a4b2..c5347ef262 100644 --- a/phpBB/includes/functions_content.php +++ b/phpBB/includes/functions_content.php @@ -773,7 +773,8 @@ function make_clickable($text, $server_url = false, $class = 'postlink') { $text = preg_replace_callback($magic_args[0], function($matches) use ($magic_args) { - return make_clickable_callback($magic_args[1], $matches[1], $matches[2], $matches[3], $magic_args[2]); + $relative_url = isset($matches[3]) ? $matches[3] : ''; + return make_clickable_callback($magic_args[1], $matches[1], $matches[2], $relative_url, $magic_args[2]); }, $text); } } From dba5188f23d0c8ac00ed309003fb3251c204a33c Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Thu, 10 Oct 2013 15:12:55 -0500 Subject: [PATCH 083/661] [ticket/11874] Do not always prepend the web path; only replace phpbb_root_path PHPBB3-11874 --- phpBB/phpbb/path_helper.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/phpBB/phpbb/path_helper.php b/phpBB/phpbb/path_helper.php index b2ed11a927..e9fd092b62 100644 --- a/phpBB/phpbb/path_helper.php +++ b/phpBB/phpbb/path_helper.php @@ -89,26 +89,24 @@ class path_helper } /** - * Update a path to the correct relative root path + * Update a web path to the correct relative root path * * This replaces $phpbb_root_path . some_url with - * get_web_root_path() . some_url OR if $phpbb_root_path - * is not at the beginning of $path, just prepends the - * web root path + * get_web_root_path() . some_url * * @param string $path The path to be updated * @return string */ public function update_web_root_path($path) { - $web_root_path = $this->get_web_root_path($this->symfony_request); - if (strpos($path, $this->phpbb_root_path) === 0) { $path = substr($path, strlen($this->phpbb_root_path)); + + return $this->get_web_root_path() . $path; } - return $web_root_path . $path; + return $path; } /** From 31649f1eb0fa7ce44d4ed8137020f63c5d7e62e6 Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Thu, 10 Oct 2013 16:20:00 -0500 Subject: [PATCH 084/661] [ticket/11874] Fix tests PHPBB3-11874 --- tests/path_helper/web_root_path_test.php | 7 +++++- tests/template/template_includecss_test.php | 4 ++-- tests/template/template_includejs_test.php | 26 ++++++++++----------- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/tests/path_helper/web_root_path_test.php b/tests/path_helper/web_root_path_test.php index 938b58892b..2e1a37e02b 100644 --- a/tests/path_helper/web_root_path_test.php +++ b/tests/path_helper/web_root_path_test.php @@ -52,13 +52,18 @@ class phpbb_path_helper_web_root_path_test extends phpbb_test_case $this->set_phpbb_root_path(); return array( + array( + 'http://www.test.com/test.php', + 'http://www.test.com/test.php', + '/', + ), array( $this->phpbb_root_path . 'test.php', $this->phpbb_root_path . 'test.php', ), array( 'test.php', - $this->phpbb_root_path . 'test.php', + 'test.php', ), array( $this->phpbb_root_path . $this->phpbb_root_path . 'test.php', diff --git a/tests/template/template_includecss_test.php b/tests/template/template_includecss_test.php index 7424af0c93..9ed8bd0947 100644 --- a/tests/template/template_includecss_test.php +++ b/tests/template/template_includecss_test.php @@ -18,8 +18,8 @@ class phpbb_template_template_includecss_test extends phpbb_template_template_te // Prepare correct result $scripts = array( - '', - '', + '', + '', ); // Run test diff --git a/tests/template/template_includejs_test.php b/tests/template/template_includejs_test.php index ab0f4b9ca1..b20d068a64 100644 --- a/tests/template/template_includejs_test.php +++ b/tests/template/template_includejs_test.php @@ -24,51 +24,51 @@ class phpbb_template_template_includejs_test extends phpbb_template_template_tes */ array( array('TEST' => 1), - '', + '', ), array( array('TEST' => 2), - '', + '', ), array( array('TEST' => 3), - '', + '', ), array( array('TEST' => 4), - '', + '', ), array( array('TEST' => 6), - '', + '', ), array( array('TEST' => 7), - '', + '', ), array( array('TEST' => 8), - '', + '', ), array( array('TEST' => 9), - '', + '', ), array( array('TEST' => 10), - '', + '', ), array( array('TEST' => 11), - '', + '', ), array( array('TEST' => 12), - '', + '', ), array( array('TEST' => 14), - '', + '', ), array( array('TEST' => 15), @@ -84,7 +84,7 @@ class phpbb_template_template_includejs_test extends phpbb_template_template_tes ), array( array('TEST' => 18), - '', + '', ), ); } From 94b49d8a925e4bc7f10cbcf117ba81b071019b73 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sun, 14 Jul 2013 20:44:00 +0200 Subject: [PATCH 085/661] [ticket/11703] Make jQuery CDN switch more generic. Config variable: load_jquery_cdn -> allow_cdn Template variable: S_JQUERY_FALLBACK -> S_ALLOW_CDN PHPBB3-11703 --- phpBB/adm/style/install_footer.html | 2 +- phpBB/adm/style/overall_footer.html | 2 +- phpBB/adm/style/simple_footer.html | 2 +- phpBB/includes/acp/acp_board.php | 2 +- phpBB/includes/functions.php | 4 +-- phpBB/includes/functions_acp.php | 4 +-- phpBB/install/schemas/schema_data.sql | 2 +- phpBB/language/en/acp/board.php | 4 +-- .../db/migration/data/v310/allow_cdn.php | 28 +++++++++++++++++++ .../prosilver/template/overall_footer.html | 2 +- .../prosilver/template/simple_footer.html | 2 +- .../subsilver2/template/overall_footer.html | 2 +- .../subsilver2/template/simple_footer.html | 2 +- 13 files changed, 43 insertions(+), 15 deletions(-) create mode 100644 phpBB/phpbb/db/migration/data/v310/allow_cdn.php diff --git a/phpBB/adm/style/install_footer.html b/phpBB/adm/style/install_footer.html index 73c3f5a6b9..f7d62d7c7e 100644 --- a/phpBB/adm/style/install_footer.html +++ b/phpBB/adm/style/install_footer.html @@ -13,7 +13,7 @@
    - + diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html index 9202cec06b..145ad18709 100644 --- a/phpBB/adm/style/overall_footer.html +++ b/phpBB/adm/style/overall_footer.html @@ -35,7 +35,7 @@ - + {$SCRIPTS} diff --git a/phpBB/adm/style/simple_footer.html b/phpBB/adm/style/simple_footer.html index 906a9bebed..a559b25b72 100644 --- a/phpBB/adm/style/simple_footer.html +++ b/phpBB/adm/style/simple_footer.html @@ -17,7 +17,7 @@ - + diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index 8f2548166b..40dca53b76 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -344,7 +344,7 @@ class acp_board 'load_jumpbox' => array('lang' => 'YES_JUMPBOX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), 'load_user_activity' => array('lang' => 'LOAD_USER_ACTIVITY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'load_tplcompile' => array('lang' => 'RECOMPILE_STYLES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), - 'load_jquery_cdn' => array('lang' => 'LOAD_JQUERY_CDN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), + 'allow_cdn' => array('lang' => 'ALLOW_CDN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'legend3' => 'CUSTOM_PROFILE_FIELDS', 'load_cpf_memberlist' => array('lang' => 'LOAD_CPF_MEMBERLIST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index dd0dcc09b6..4ada12b87a 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -5451,8 +5451,8 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 'T_UPLOAD_PATH' => "{$web_path}{$config['upload_path']}/", 'T_STYLESHEET_LINK' => "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/theme/stylesheet.css?assets_version=' . $config['assets_version'], 'T_STYLESHEET_LANG_LINK' => "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/theme/' . $user->lang_name . '/stylesheet.css?assets_version=' . $config['assets_version'], - 'T_JQUERY_LINK' => ($config['load_jquery_cdn'] && !empty($config['load_jquery_url'])) ? $config['load_jquery_url'] : "{$web_path}assets/javascript/jquery.js?assets_version=" . $config['assets_version'], - 'S_JQUERY_FALLBACK' => ($config['load_jquery_cdn']) ? true : false, + 'T_JQUERY_LINK' => ($config['allow_cdn'] && !empty($config['load_jquery_url'])) ? $config['load_jquery_url'] : "{$web_path}assets/javascript/jquery.js?assets_version=" . $config['assets_version'], + 'S_ALLOW_CDN' => !empty($config['allow_cdn']), 'T_THEME_NAME' => rawurlencode($user->style['style_path']), 'T_THEME_LANG_NAME' => $user->data['user_lang'], diff --git a/phpBB/includes/functions_acp.php b/phpBB/includes/functions_acp.php index 60c44e90e1..3ca0049a1c 100644 --- a/phpBB/includes/functions_acp.php +++ b/phpBB/includes/functions_acp.php @@ -175,8 +175,8 @@ function adm_page_footer($copyright_html = true) 'TRANSLATION_INFO' => (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '', 'S_COPYRIGHT_HTML' => $copyright_html, 'CREDIT_LINE' => $user->lang('POWERED_BY', 'phpBB® Forum Software © phpBB Group'), - 'T_JQUERY_LINK' => ($config['load_jquery_cdn'] && !empty($config['load_jquery_url'])) ? $config['load_jquery_url'] : "{$phpbb_root_path}assets/javascript/jquery.js", - 'S_JQUERY_FALLBACK' => ($config['load_jquery_cdn']) ? true : false, + 'T_JQUERY_LINK' => ($config['allow_cdn'] && !empty($config['load_jquery_url'])) ? $config['load_jquery_url'] : "{$phpbb_root_path}assets/javascript/jquery.js", + 'S_ALLOW_CDN' => !empty($config['allow_cdn']), 'VERSION' => $config['version']) ); diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 4458dde6a3..4f1cdf5a83 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -17,6 +17,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_remot INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_bbcode', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_birthdays', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_bookmarks', '1'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_cdn', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_emailreuse', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_password_reset', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_forum_notify', '1'); @@ -176,7 +177,6 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewprofi INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewtopic', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_lastread', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_track', '1'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jquery_cdn', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jquery_url', '//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jumpbox', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_moderators', '1'); diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php index f786374ba6..8ca937a58d 100644 --- a/phpBB/language/en/acp/board.php +++ b/phpBB/language/en/acp/board.php @@ -354,6 +354,8 @@ $lang = array_merge($lang, array( $lang = array_merge($lang, array( 'ACP_LOAD_SETTINGS_EXPLAIN' => 'Here you can enable and disable certain board functions to reduce the amount of processing required. On most servers there is no need to disable any functions. However on certain systems or in shared hosting environments it may be beneficial to disable capabilities you do not really need. You can also specify limits for system load and active sessions beyond which the board will go offline.', + 'ALLOW_CDN' => 'Allow usage of third party content delivery networks', + 'ALLOW_CDN_EXPLAIN' => 'If this setting is enabled, some files will be served from external third party servers instead of your server. This reduces the network bandwidth required by your server, but may present a privacy issue for some board administrators.', 'CUSTOM_PROFILE_FIELDS' => 'Custom profile fields', 'LIMIT_LOAD' => 'Limit system load', 'LIMIT_LOAD_EXPLAIN' => 'If the system’s 1-minute load average exceeds this value the board will automatically go offline. A value of 1.0 equals ~100% utilisation of one processor. This only functions on UNIX based servers and where this information is accessible. The value here resets itself to 0 if phpBB was unable to get the load limit.', @@ -363,8 +365,6 @@ $lang = array_merge($lang, array( 'LOAD_CPF_PM' => 'Display custom profile fields in private messages', 'LOAD_CPF_VIEWPROFILE' => 'Display custom profile fields in user profiles', 'LOAD_CPF_VIEWTOPIC' => 'Display custom profile fields on topic pages', - 'LOAD_JQUERY_CDN' => 'Serve jQuery using Google’s CDN', - 'LOAD_JQUERY_CDN_EXPLAIN' => 'If this setting is enabled, jQuery will be served from Google’s AJAX API CDN instead of the copy included with phpBB on your server. If the CDN fails, phpBB will attempt to fall back to the copy included with phpBB.', 'LOAD_USER_ACTIVITY' => 'Show user’s activity', 'LOAD_USER_ACTIVITY_EXPLAIN' => 'Displays active topic/forum in user profiles and user control panel. It is recommended to disable this on boards with more than one million posts.', 'READ_NOTIFICATION_EXPIRE_DAYS' => 'Read Notification Expiration', diff --git a/phpBB/phpbb/db/migration/data/v310/allow_cdn.php b/phpBB/phpbb/db/migration/data/v310/allow_cdn.php new file mode 100644 index 0000000000..2570998643 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/allow_cdn.php @@ -0,0 +1,28 @@ +config['load_jquery_cdn'])), + array('config.remove', array('load_jquery_cdn')), + ); + } +} diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html index 15a298053b..e26c94f367 100644 --- a/phpBB/styles/prosilver/template/overall_footer.html +++ b/phpBB/styles/prosilver/template/overall_footer.html @@ -57,7 +57,7 @@ - + diff --git a/phpBB/styles/prosilver/template/simple_footer.html b/phpBB/styles/prosilver/template/simple_footer.html index b6afc2fdba..10edece3cd 100644 --- a/phpBB/styles/prosilver/template/simple_footer.html +++ b/phpBB/styles/prosilver/template/simple_footer.html @@ -7,7 +7,7 @@ - + diff --git a/phpBB/styles/subsilver2/template/overall_footer.html b/phpBB/styles/subsilver2/template/overall_footer.html index 348db5d309..dbc9fcd7aa 100644 --- a/phpBB/styles/subsilver2/template/overall_footer.html +++ b/phpBB/styles/subsilver2/template/overall_footer.html @@ -12,7 +12,7 @@ - + diff --git a/phpBB/styles/subsilver2/template/simple_footer.html b/phpBB/styles/subsilver2/template/simple_footer.html index 48d3d934f8..6a9c3096bc 100644 --- a/phpBB/styles/subsilver2/template/simple_footer.html +++ b/phpBB/styles/subsilver2/template/simple_footer.html @@ -6,7 +6,7 @@ - + From 21eae92c27d22a96f847c01770b18f3d00b5aabd Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sun, 14 Jul 2013 21:11:14 +0200 Subject: [PATCH 086/661] [ticket/11703] Add effectively_installed(). PHPBB3-11703 --- phpBB/phpbb/db/migration/data/v310/allow_cdn.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpBB/phpbb/db/migration/data/v310/allow_cdn.php b/phpBB/phpbb/db/migration/data/v310/allow_cdn.php index 2570998643..0b79ac77f9 100644 --- a/phpBB/phpbb/db/migration/data/v310/allow_cdn.php +++ b/phpBB/phpbb/db/migration/data/v310/allow_cdn.php @@ -11,6 +11,11 @@ namespace phpbb\db\migration\data\v310; class allow_cdn extends phpbb_db_migration { + public function effectively_installed() + { + return isset($this->config['allow_cdn']); + } + static public function depends_on() { return array( From a409d398814489b90c94eeb3bf8b3bbde1df0842 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Thu, 10 Oct 2013 23:30:29 +0200 Subject: [PATCH 087/661] [ticket/11703] Also use empty() for T_JQUERY_LINK. PHPBB3-11703 --- phpBB/includes/functions.php | 2 +- phpBB/includes/functions_acp.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 4ada12b87a..1e33e6284a 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -5451,7 +5451,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 'T_UPLOAD_PATH' => "{$web_path}{$config['upload_path']}/", 'T_STYLESHEET_LINK' => "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/theme/stylesheet.css?assets_version=' . $config['assets_version'], 'T_STYLESHEET_LANG_LINK' => "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/theme/' . $user->lang_name . '/stylesheet.css?assets_version=' . $config['assets_version'], - 'T_JQUERY_LINK' => ($config['allow_cdn'] && !empty($config['load_jquery_url'])) ? $config['load_jquery_url'] : "{$web_path}assets/javascript/jquery.js?assets_version=" . $config['assets_version'], + 'T_JQUERY_LINK' => !empty($config['allow_cdn']) && !empty($config['load_jquery_url']) ? $config['load_jquery_url'] : "{$web_path}assets/javascript/jquery.js?assets_version=" . $config['assets_version'], 'S_ALLOW_CDN' => !empty($config['allow_cdn']), 'T_THEME_NAME' => rawurlencode($user->style['style_path']), diff --git a/phpBB/includes/functions_acp.php b/phpBB/includes/functions_acp.php index 3ca0049a1c..c83bc1f7a6 100644 --- a/phpBB/includes/functions_acp.php +++ b/phpBB/includes/functions_acp.php @@ -175,7 +175,7 @@ function adm_page_footer($copyright_html = true) 'TRANSLATION_INFO' => (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '', 'S_COPYRIGHT_HTML' => $copyright_html, 'CREDIT_LINE' => $user->lang('POWERED_BY', 'phpBB® Forum Software © phpBB Group'), - 'T_JQUERY_LINK' => ($config['allow_cdn'] && !empty($config['load_jquery_url'])) ? $config['load_jquery_url'] : "{$phpbb_root_path}assets/javascript/jquery.js", + 'T_JQUERY_LINK' => !empty($config['allow_cdn']) && !empty($config['load_jquery_url']) ? $config['load_jquery_url'] : "{$phpbb_root_path}assets/javascript/jquery.js", 'S_ALLOW_CDN' => !empty($config['allow_cdn']), 'VERSION' => $config['version']) ); From ac9225774ecd93cbc717b99902c9cc94c7d8372e Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Thu, 10 Oct 2013 16:41:31 -0500 Subject: [PATCH 088/661] [ticket/11874] Correct when $phpbb_root_path is appended to build_url() PHPBB3-11874 --- phpBB/includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index dd0dcc09b6..cdadd8ac50 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2866,7 +2866,7 @@ function build_url($strip_vars = false) $url_parts = parse_url($page); // URL - if ($url_parts !== false && !empty($url_parts['scheme']) && !empty($url_parts['host'])) + if ($url_parts === false || empty($url_parts['scheme']) || empty($url_parts['host'])) { $page = $phpbb_root_path . $page; } From 51cc7155041c95ca47147072c1c04449ad0bcf67 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Thu, 10 Oct 2013 23:45:22 +0200 Subject: [PATCH 089/661] [ticket/11703] Extend the correct migration class. PHPBB3-11703 --- phpBB/phpbb/db/migration/data/v310/allow_cdn.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/phpbb/db/migration/data/v310/allow_cdn.php b/phpBB/phpbb/db/migration/data/v310/allow_cdn.php index 0b79ac77f9..aa471df6e7 100644 --- a/phpBB/phpbb/db/migration/data/v310/allow_cdn.php +++ b/phpBB/phpbb/db/migration/data/v310/allow_cdn.php @@ -9,7 +9,7 @@ namespace phpbb\db\migration\data\v310; -class allow_cdn extends phpbb_db_migration +class allow_cdn extends \phpbb\db\migration\migration { public function effectively_installed() { From 4ad1495768d91a24b2744f43a00f922a13b40ce4 Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Thu, 10 Oct 2013 16:51:26 -0500 Subject: [PATCH 090/661] [ticket/11903] Speed up paging test PHPBB3-11903 --- tests/functional/paging_test.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/functional/paging_test.php b/tests/functional/paging_test.php index d5adc6ad0a..91f14cb75d 100644 --- a/tests/functional/paging_test.php +++ b/tests/functional/paging_test.php @@ -18,22 +18,22 @@ class phpbb_functional_paging_test extends phpbb_functional_test_case $this->login(); $post = $this->create_topic(2, 'Test Topic 1', 'This is a test topic posted by the testing framework.'); - for ($post_id = 1; $post_id < 20; $post_id++) + for ($post_id = 1; $post_id <= 11; $post_id++) { $this->create_post(2, $post['topic_id'], 'Re: Test Topic 1', 'This is a test post no' . $post_id . ' posted by the testing framework.'); } $crawler = self::request('GET', "viewtopic.php?t={$post['topic_id']}&sid={$this->sid}"); $this->assertContains('post no9', $crawler->text()); - $this->assertNotContains('post no19', $crawler->text()); + $this->assertNotContains('post no11', $crawler->text()); $next_link = $crawler->filter('#viewtopic > fieldset > a.arrow-right')->attr('href'); $crawler = self::request('GET', $next_link); - $this->assertContains('post no19', $crawler->text()); + $this->assertContains('post no11', $crawler->text()); $this->assertNotContains('post no9', $crawler->text()); $prev_link = $crawler->filter('#viewtopic > fieldset > a.arrow-left')->attr('href'); $crawler = self::request('GET', $prev_link); $this->assertContains('post no9', $crawler->text()); - $this->assertNotContains('post no19', $crawler->text()); + $this->assertNotContains('post no11', $crawler->text()); } } From 79928ebf432d03f5ec3a55a34468ea089586a568 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Thu, 10 Oct 2013 23:59:05 +0200 Subject: [PATCH 091/661] [ticket/11621] Swap columns of post_content index. PHPBB3-11621 --- phpBB/phpbb/search/fulltext_mysql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/phpbb/search/fulltext_mysql.php b/phpBB/phpbb/search/fulltext_mysql.php index 23f27e65d0..260b07fdf9 100644 --- a/phpBB/phpbb/search/fulltext_mysql.php +++ b/phpBB/phpbb/search/fulltext_mysql.php @@ -792,7 +792,7 @@ class fulltext_mysql extends \phpbb\search\base $alter[] = 'MODIFY post_text mediumtext NOT NULL'; } - $alter[] = 'ADD FULLTEXT post_content (post_subject, post_text)'; + $alter[] = 'ADD FULLTEXT post_content (post_text, post_subject)'; } if (sizeof($alter)) From 6e9e07bae2d3b6aefc9292c9447e039e6f713166 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 11 Oct 2013 00:14:50 +0200 Subject: [PATCH 092/661] [ticket/11621] Remove unnecessary things around index_created() return value. PHPBB3-11621 --- phpBB/phpbb/search/fulltext_mysql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/phpbb/search/fulltext_mysql.php b/phpBB/phpbb/search/fulltext_mysql.php index 260b07fdf9..ca2f42358f 100644 --- a/phpBB/phpbb/search/fulltext_mysql.php +++ b/phpBB/phpbb/search/fulltext_mysql.php @@ -855,7 +855,7 @@ class fulltext_mysql extends \phpbb\search\base $this->get_stats(); } - return (isset($this->stats['post_subject']) && isset($this->stats['post_content'])) ? true : false; + return isset($this->stats['post_subject']) && isset($this->stats['post_content']); } /** From 39f77149b2922224bc1a9d741357bf54abec49d9 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 11 Oct 2013 00:23:04 +0200 Subject: [PATCH 093/661] [ticket/11621] Add migration dropping MySQL search indexes. Possibly time-consuming index-regeneration will be left to the user. PHPBB3-11621 --- .../data/v310/mysql_fulltext_drop.php | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php diff --git a/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php b/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php new file mode 100644 index 0000000000..2bb64bdef4 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php @@ -0,0 +1,38 @@ +db->sql_layer, 'mysql') === false) + { + return array(); + } + + return array( + 'drop_keys' => array( + $this->table_prefix . 'posts' => array( + 'post_subject', + 'post_text', + 'post_content', + ), + ), + ); + } +} From 3b1eccbf74a1a66bc5ab2f843d130fe6322c314e Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Thu, 10 Oct 2013 18:16:09 -0500 Subject: [PATCH 094/661] [ticket/11905] 3.1.0-a1 Migration Created a migration tips develop tool to help find the migration tree tips so they can be copied to versions released. With this, A1 is the only current tree tip (it depends on all other migrations). PHPBB3-11905 --- phpBB/develop/migration_tips.php | 42 +++++++++++++++++++ phpBB/phpbb/db/migration/data/v310/alpha1.php | 42 +++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 phpBB/develop/migration_tips.php create mode 100644 phpBB/phpbb/db/migration/data/v310/alpha1.php diff --git a/phpBB/develop/migration_tips.php b/phpBB/develop/migration_tips.php new file mode 100644 index 0000000000..51a579bdb5 --- /dev/null +++ b/phpBB/develop/migration_tips.php @@ -0,0 +1,42 @@ +get('ext.manager'); +$finder = $phpbb_extension_manager->get_finder(); + +$migrations = $finder + ->core_path('phpbb/db/migration/data/') + ->get_classes(); +$tips = $migrations; + +foreach ($migrations as $migration_class) +{ + foreach ($migration_class::depends_on() as $dependency) + { + if (($tips_key = array_search($dependency, $tips)) !== false) + { + unset($tips[$tips_key]); + } + } +} + +foreach ($tips as $migration) +{ + echo "\t\t\t'{$migration}',\n"; +} + diff --git a/phpBB/phpbb/db/migration/data/v310/alpha1.php b/phpBB/phpbb/db/migration/data/v310/alpha1.php new file mode 100644 index 0000000000..04f195daeb --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/alpha1.php @@ -0,0 +1,42 @@ + Date: Fri, 11 Oct 2013 11:47:42 +0200 Subject: [PATCH 095/661] [ticket/11906] Add missing configs from notifications cron to schema_data.sql PHPBB3-11906 --- phpBB/install/schemas/schema_data.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 4f1cdf5a83..cd38f86312 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -230,6 +230,9 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('posts_per_page', ' INSERT INTO phpbb_config (config_name, config_value) VALUES ('print_pm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('queue_interval', '60'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('ranks_path', 'images/ranks'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('read_notification_expire_days', '30'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('read_notification_last_gc', '0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('read_notification_gc', '86400'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('require_activation', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('referer_validation', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', ''); From 5d28d22976f7b03e5eb4b2d3a98f1ae560f82da0 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 11 Oct 2013 11:51:37 +0200 Subject: [PATCH 096/661] [ticket/11906] Add notification purge cron to cron tasks PHPBB3-11906 --- phpBB/config/cron_tasks.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/phpBB/config/cron_tasks.yml b/phpBB/config/cron_tasks.yml index 0c9795c0bd..109c9684f9 100644 --- a/phpBB/config/cron_tasks.yml +++ b/phpBB/config/cron_tasks.yml @@ -23,6 +23,16 @@ services: tags: - { name: cron.task } + cron.task.core.prune_notifications: + class: phpbb\cron\task\core\prune_notifications + arguments: + - @config + - @notification_manager + calls: + - [set_name, [cron.task.core.prune_notifications]] + tags: + - { name: cron.task } + cron.task.core.queue: class: phpbb\cron\task\core\queue arguments: From 698a2236a5e26bdae9359939f6e6be9cfa988b9a Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 11 Oct 2013 11:59:28 +0200 Subject: [PATCH 097/661] [ticket/11867] Schema files are not created by create_schema_files.php PHPBB3-11867 --- phpBB/install/schemas/firebird_schema.sql | 42 ++++++------- phpBB/install/schemas/mssql_schema.sql | 74 +++++++++++------------ phpBB/install/schemas/mysql_40_schema.sql | 40 ++++++------ phpBB/install/schemas/mysql_41_schema.sql | 40 ++++++------ phpBB/install/schemas/oracle_schema.sql | 56 ++++++++--------- phpBB/install/schemas/postgres_schema.sql | 48 +++++++-------- phpBB/install/schemas/sqlite_schema.sql | 40 ++++++------ 7 files changed, 170 insertions(+), 170 deletions(-) diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index 1e47008d73..6c6aca447d 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -128,27 +128,6 @@ CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users(user_id);; CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users(auth_option_id);; CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users(auth_role_id);; -# Table: 'phpbb_oauth_tokens' -CREATE TABLE phpbb_oauth_tokens ( - user_id INTEGER DEFAULT 0 NOT NULL, - session_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL, - provider VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - oauth_token BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL -);; - -CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens(user_id);; -CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens(provider);; - -# Table: 'phpbb_oauth_accounts' -CREATE TABLE phpbb_oauth_accounts ( - user_id INTEGER DEFAULT 0 NOT NULL, - provider VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - oauth_provider_id BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL -);; - -ALTER TABLE phpbb_oauth_accounts ADD PRIMARY KEY (user_id, provider);; - - # Table: 'phpbb_banlist' CREATE TABLE phpbb_banlist ( ban_id INTEGER NOT NULL, @@ -714,6 +693,27 @@ BEGIN END;; +# Table: 'phpbb_oauth_accounts' +CREATE TABLE phpbb_oauth_accounts ( + user_id INTEGER DEFAULT 0 NOT NULL, + provider VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, + oauth_provider_id BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL +);; + +ALTER TABLE phpbb_oauth_accounts ADD PRIMARY KEY (user_id, provider);; + + +# Table: 'phpbb_oauth_tokens' +CREATE TABLE phpbb_oauth_tokens ( + user_id INTEGER DEFAULT 0 NOT NULL, + session_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL, + provider VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, + oauth_token BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL +);; + +CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens(user_id);; +CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens(provider);; + # Table: 'phpbb_poll_options' CREATE TABLE phpbb_poll_options ( poll_option_id INTEGER DEFAULT 0 NOT NULL, diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index 922313236e..49804bdcc0 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -166,43 +166,6 @@ CREATE INDEX [auth_role_id] ON [phpbb_acl_users]([auth_role_id]) ON [PRIMARY] GO -/* - Table: 'phpbb_oauth_tokens' -*/ -CREATE TABLE [phpbb_oauth_tokens] ( - [user_id] [int] DEFAULT (0) NOT NULL , - [session_id] [char] (32) DEFAULT ('') NOT NULL , - [provider] [varchar] (255) DEFAULT ('') NOT NULL , - [oauth_token] [text] DEFAULT ('') NOT NULL -) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] -GO - -CREATE INDEX [user_id] ON [phpbb_oauth_tokens]([user_id]) ON [PRIMARY] -GO - -CREATE INDEX [provider] ON [phpbb_oauth_tokens]([provider]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_oauth_accounts' -*/ -CREATE TABLE [phpbb_oauth_accounts] ( - [user_id] [int] DEFAULT (0) NOT NULL , - [provider] [varchar] (255) DEFAULT ('') NOT NULL , - [oauth_provider_id] [varchar] (4000) DEFAULT ('') NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_oauth_accounts] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_oauth_accounts] PRIMARY KEY CLUSTERED - ( - [user_id], - [provider] - ) ON [PRIMARY] -GO - - /* Table: 'phpbb_banlist' */ @@ -879,6 +842,43 @@ CREATE INDEX [user] ON [phpbb_notifications]([user_id], [notification_read]) ON GO +/* + Table: 'phpbb_oauth_accounts' +*/ +CREATE TABLE [phpbb_oauth_accounts] ( + [user_id] [int] DEFAULT (0) NOT NULL , + [provider] [varchar] (255) DEFAULT ('') NOT NULL , + [oauth_provider_id] [varchar] (4000) DEFAULT ('') NOT NULL +) ON [PRIMARY] +GO + +ALTER TABLE [phpbb_oauth_accounts] WITH NOCHECK ADD + CONSTRAINT [PK_phpbb_oauth_accounts] PRIMARY KEY CLUSTERED + ( + [user_id], + [provider] + ) ON [PRIMARY] +GO + + +/* + Table: 'phpbb_oauth_tokens' +*/ +CREATE TABLE [phpbb_oauth_tokens] ( + [user_id] [int] DEFAULT (0) NOT NULL , + [session_id] [char] (32) DEFAULT ('') NOT NULL , + [provider] [varchar] (255) DEFAULT ('') NOT NULL , + [oauth_token] [text] DEFAULT ('') NOT NULL +) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] +GO + +CREATE INDEX [user_id] ON [phpbb_oauth_tokens]([user_id]) ON [PRIMARY] +GO + +CREATE INDEX [provider] ON [phpbb_oauth_tokens]([provider]) ON [PRIMARY] +GO + + /* Table: 'phpbb_poll_options' */ diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql index e07a768387..e287e7dde1 100644 --- a/phpBB/install/schemas/mysql_40_schema.sql +++ b/phpBB/install/schemas/mysql_40_schema.sql @@ -90,26 +90,6 @@ CREATE TABLE phpbb_acl_users ( ); -# Table: 'phpbb_oauth_tokens' -CREATE TABLE phpbb_oauth_tokens ( - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - session_id binary(32) DEFAULT '' NOT NULL, - provider varbinary(255) DEFAULT '' NOT NULL, - oauth_token mediumblob NOT NULL, - KEY user_id (user_id), - KEY provider (provider) -); - - -# Table: 'phpbb_oauth_accounts' -CREATE TABLE phpbb_oauth_accounts ( - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - provider varbinary(255) DEFAULT '' NOT NULL, - oauth_provider_id blob NOT NULL, - PRIMARY KEY (user_id, provider) -); - - # Table: 'phpbb_banlist' CREATE TABLE phpbb_banlist ( ban_id mediumint(8) UNSIGNED NOT NULL auto_increment, @@ -499,6 +479,26 @@ CREATE TABLE phpbb_notifications ( ); +# Table: 'phpbb_oauth_accounts' +CREATE TABLE phpbb_oauth_accounts ( + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + provider varbinary(255) DEFAULT '' NOT NULL, + oauth_provider_id blob NOT NULL, + PRIMARY KEY (user_id, provider) +); + + +# Table: 'phpbb_oauth_tokens' +CREATE TABLE phpbb_oauth_tokens ( + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + session_id binary(32) DEFAULT '' NOT NULL, + provider varbinary(255) DEFAULT '' NOT NULL, + oauth_token mediumblob NOT NULL, + KEY user_id (user_id), + KEY provider (provider) +); + + # Table: 'phpbb_poll_options' CREATE TABLE phpbb_poll_options ( poll_option_id tinyint(4) DEFAULT '0' NOT NULL, diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql index d3ed1ee15e..870fbd05e4 100644 --- a/phpBB/install/schemas/mysql_41_schema.sql +++ b/phpBB/install/schemas/mysql_41_schema.sql @@ -90,26 +90,6 @@ CREATE TABLE phpbb_acl_users ( ) CHARACTER SET `utf8` COLLATE `utf8_bin`; -# Table: 'phpbb_oauth_tokens' -CREATE TABLE phpbb_oauth_tokens ( - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - session_id char(32) DEFAULT '' NOT NULL, - provider varchar(255) DEFAULT '' NOT NULL, - oauth_token mediumtext NOT NULL, - KEY user_id (user_id), - KEY provider (provider) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_oauth_accounts' -CREATE TABLE phpbb_oauth_accounts ( - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - provider varchar(255) DEFAULT '' NOT NULL, - oauth_provider_id text NOT NULL, - PRIMARY KEY (user_id, provider) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - # Table: 'phpbb_banlist' CREATE TABLE phpbb_banlist ( ban_id mediumint(8) UNSIGNED NOT NULL auto_increment, @@ -499,6 +479,26 @@ CREATE TABLE phpbb_notifications ( ) CHARACTER SET `utf8` COLLATE `utf8_bin`; +# Table: 'phpbb_oauth_accounts' +CREATE TABLE phpbb_oauth_accounts ( + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + provider varchar(255) DEFAULT '' NOT NULL, + oauth_provider_id text NOT NULL, + PRIMARY KEY (user_id, provider) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_oauth_tokens' +CREATE TABLE phpbb_oauth_tokens ( + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + session_id char(32) DEFAULT '' NOT NULL, + provider varchar(255) DEFAULT '' NOT NULL, + oauth_token mediumtext NOT NULL, + KEY user_id (user_id), + KEY provider (provider) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + # Table: 'phpbb_poll_options' CREATE TABLE phpbb_poll_options ( poll_option_id tinyint(4) DEFAULT '0' NOT NULL, diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index f32980e378..5354e5b1bb 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -210,34 +210,6 @@ CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id) CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id) / -/* - Table: 'phpbb_oauth_tokens' -*/ -CREATE TABLE phpbb_oauth_tokens ( - user_id number(8) DEFAULT '0' NOT NULL, - session_id char(32) DEFAULT '' , - provider varchar2(255) DEFAULT '' , - oauth_token clob DEFAULT '' -) -/ - -CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id) -/ -CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider) -/ - -/* - Table: 'phpbb_oauth_accounts' -*/ -CREATE TABLE phpbb_oauth_accounts ( - user_id number(8) DEFAULT '0' NOT NULL, - provider varchar2(255) DEFAULT '' , - oauth_provider_id clob DEFAULT '' , - CONSTRAINT pk_phpbb_oauth_accounts PRIMARY KEY (user_id, provider) -) -/ - - /* Table: 'phpbb_banlist' */ @@ -963,6 +935,34 @@ END; / +/* + Table: 'phpbb_oauth_accounts' +*/ +CREATE TABLE phpbb_oauth_accounts ( + user_id number(8) DEFAULT '0' NOT NULL, + provider varchar2(255) DEFAULT '' , + oauth_provider_id clob DEFAULT '' , + CONSTRAINT pk_phpbb_oauth_accounts PRIMARY KEY (user_id, provider) +) +/ + + +/* + Table: 'phpbb_oauth_tokens' +*/ +CREATE TABLE phpbb_oauth_tokens ( + user_id number(8) DEFAULT '0' NOT NULL, + session_id char(32) DEFAULT '' , + provider varchar2(255) DEFAULT '' , + oauth_token clob DEFAULT '' +) +/ + +CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id) +/ +CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider) +/ + /* Table: 'phpbb_poll_options' */ diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index 14435898eb..7773602c16 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -188,30 +188,6 @@ CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id); CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id); CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id); -/* - Table: 'phpbb_oauth_tokens' -*/ -CREATE TABLE phpbb_oauth_tokens ( - user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), - session_id char(32) DEFAULT '' NOT NULL, - provider varchar(255) DEFAULT '' NOT NULL, - oauth_token TEXT DEFAULT '' NOT NULL -); - -CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id); -CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider); - -/* - Table: 'phpbb_oauth_accounts' -*/ -CREATE TABLE phpbb_oauth_accounts ( - user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), - provider varchar(255) DEFAULT '' NOT NULL, - oauth_provider_id varchar(4000) DEFAULT '' NOT NULL, - PRIMARY KEY (user_id, provider) -); - - /* Table: 'phpbb_banlist' */ @@ -681,6 +657,30 @@ CREATE TABLE phpbb_notifications ( CREATE INDEX phpbb_notifications_item_ident ON phpbb_notifications (notification_type_id, item_id); CREATE INDEX phpbb_notifications_user ON phpbb_notifications (user_id, notification_read); +/* + Table: 'phpbb_oauth_accounts' +*/ +CREATE TABLE phpbb_oauth_accounts ( + user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), + provider varchar(255) DEFAULT '' NOT NULL, + oauth_provider_id varchar(4000) DEFAULT '' NOT NULL, + PRIMARY KEY (user_id, provider) +); + + +/* + Table: 'phpbb_oauth_tokens' +*/ +CREATE TABLE phpbb_oauth_tokens ( + user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), + session_id char(32) DEFAULT '' NOT NULL, + provider varchar(255) DEFAULT '' NOT NULL, + oauth_token TEXT DEFAULT '' NOT NULL +); + +CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id); +CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider); + /* Table: 'phpbb_poll_options' */ diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index de88900f06..079d48bc65 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -89,26 +89,6 @@ CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id); CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id); CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id); -# Table: 'phpbb_oauth_tokens' -CREATE TABLE phpbb_oauth_tokens ( - user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - session_id char(32) NOT NULL DEFAULT '', - provider varchar(255) NOT NULL DEFAULT '', - oauth_token mediumtext(16777215) NOT NULL DEFAULT '' -); - -CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id); -CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider); - -# Table: 'phpbb_oauth_accounts' -CREATE TABLE phpbb_oauth_accounts ( - user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - provider varchar(255) NOT NULL DEFAULT '', - oauth_provider_id text(65535) NOT NULL DEFAULT '', - PRIMARY KEY (user_id, provider) -); - - # Table: 'phpbb_banlist' CREATE TABLE phpbb_banlist ( ban_id INTEGER PRIMARY KEY NOT NULL , @@ -484,6 +464,26 @@ CREATE TABLE phpbb_notifications ( CREATE INDEX phpbb_notifications_item_ident ON phpbb_notifications (notification_type_id, item_id); CREATE INDEX phpbb_notifications_user ON phpbb_notifications (user_id, notification_read); +# Table: 'phpbb_oauth_accounts' +CREATE TABLE phpbb_oauth_accounts ( + user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', + provider varchar(255) NOT NULL DEFAULT '', + oauth_provider_id text(65535) NOT NULL DEFAULT '', + PRIMARY KEY (user_id, provider) +); + + +# Table: 'phpbb_oauth_tokens' +CREATE TABLE phpbb_oauth_tokens ( + user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', + session_id char(32) NOT NULL DEFAULT '', + provider varchar(255) NOT NULL DEFAULT '', + oauth_token mediumtext(16777215) NOT NULL DEFAULT '' +); + +CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id); +CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider); + # Table: 'phpbb_poll_options' CREATE TABLE phpbb_poll_options ( poll_option_id tinyint(4) NOT NULL DEFAULT '0', From 9e0fd29820af282262cbe16363b7b9dd9f6a31d8 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 11 Oct 2013 13:56:00 +0200 Subject: [PATCH 098/661] [ticket/11906] Fix namespace issues in prune_notifications PHPBB3-11906 --- phpBB/phpbb/cron/task/core/prune_notifications.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/phpBB/phpbb/cron/task/core/prune_notifications.php b/phpBB/phpbb/cron/task/core/prune_notifications.php index 296c0ae64f..1f75709322 100644 --- a/phpBB/phpbb/cron/task/core/prune_notifications.php +++ b/phpBB/phpbb/cron/task/core/prune_notifications.php @@ -7,6 +7,8 @@ * */ +namespace phpbb\cron\task\core; + /** * @ignore */ @@ -20,7 +22,7 @@ if (!defined('IN_PHPBB')) * * @package phpBB3 */ -class phpbb_cron_task_core_prune_notifications extends phpbb_cron_task_base +class prune_notifications extends \phpbb\cron\task\base { protected $config; protected $notification_manager; @@ -28,10 +30,10 @@ class phpbb_cron_task_core_prune_notifications extends phpbb_cron_task_base /** * Constructor. * - * @param phpbb_config $config The config - * @param phpbb_notification_manager $notification_manager Notification manager + * @param \phpbb\config\config $config The config + * @param \phpbb\notification\manager $notification_manager Notification manager */ - public function __construct(phpbb_config $config, phpbb_notification_manager $notification_manager) + public function __construct(\phpbb\config\config $config, \phpbb\notification\manager $notification_manager) { $this->config = $config; $this->notification_manager = $notification_manager; From a30f1729d8cb36d9d52167c08a139c99c63c4fdf Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 11 Oct 2013 14:09:29 +0200 Subject: [PATCH 099/661] [ticket/11621] Use effectively_installed() instead. PHPBB3-11621 --- .../db/migration/data/v310/mysql_fulltext_drop.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php b/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php index 2bb64bdef4..13db2f2a40 100644 --- a/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php +++ b/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php @@ -11,6 +11,12 @@ namespace phpbb\db\migration\data\v310; class mysql_fulltext_drop extends \phpbb\db\migration\migration { + public function effectively_installed() + { + // This migration is irrelevant for all non-MySQL DBMSes. + return strpos($this->db->sql_layer, 'mysql') === false; + } + static public function depends_on() { return array( @@ -20,11 +26,6 @@ class mysql_fulltext_drop extends \phpbb\db\migration\migration public function update_schema() { - if (strpos($this->db->sql_layer, 'mysql') === false) - { - return array(); - } - return array( 'drop_keys' => array( $this->table_prefix . 'posts' => array( From a049c4f0afdf558d1f895b20917bddee81a18350 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 11 Oct 2013 14:16:58 +0200 Subject: [PATCH 100/661] [ticket/11621] Put mysql_fulltext_drop into alpha1 migration. PHPBB3-11621 --- phpBB/phpbb/db/migration/data/v310/alpha1.php | 1 + 1 file changed, 1 insertion(+) diff --git a/phpBB/phpbb/db/migration/data/v310/alpha1.php b/phpBB/phpbb/db/migration/data/v310/alpha1.php index 04f195daeb..bd4861b1f5 100644 --- a/phpBB/phpbb/db/migration/data/v310/alpha1.php +++ b/phpBB/phpbb/db/migration/data/v310/alpha1.php @@ -24,6 +24,7 @@ class alpha1 extends \phpbb\db\migration\migration '\phpbb\db\migration\data\v310\config_db_text', '\phpbb\db\migration\data\v310\forgot_password', '\phpbb\db\migration\data\v310\mod_rewrite', + '\phpbb\db\migration\data\v310\mysql_fulltext_drop', '\phpbb\db\migration\data\v310\namespaces', '\phpbb\db\migration\data\v310\notifications_cron', '\phpbb\db\migration\data\v310\notification_options_reconvert', From d310c17c7ffc6c03ed483b9ee870bd4a0fcaa1ff Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 11 Oct 2013 14:51:42 +0200 Subject: [PATCH 101/661] [ticket/11908] Namespacify phpbb_auth_provider_oauth_service_exception. PHPBB3-11908 --- phpBB/phpbb/auth/provider/oauth/service/exception.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/phpBB/phpbb/auth/provider/oauth/service/exception.php b/phpBB/phpbb/auth/provider/oauth/service/exception.php index 23d3387951..0c6cba9fb8 100644 --- a/phpBB/phpbb/auth/provider/oauth/service/exception.php +++ b/phpBB/phpbb/auth/provider/oauth/service/exception.php @@ -7,6 +7,8 @@ * */ +namespace phpbb\auth\provider\oauth\service; + /** * @ignore */ @@ -20,6 +22,6 @@ if (!defined('IN_PHPBB')) * * @package auth */ -class phpbb_auth_provider_oauth_service_exception extends RuntimeException +class exception extends \RuntimeException { } From 67530d132ac6eb1eae74bd184014bcc7c6b7d082 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Wed, 17 Jul 2013 02:42:24 +0200 Subject: [PATCH 102/661] [feature/plupload/cron] Add cronjob for cleaning plupload temporary directory. PHPBB3-10929 --- phpBB/config/cron_tasks.yml | 10 ++ phpBB/language/en/acp/common.php | 2 + phpBB/phpbb/cron/task/core/tidy_plupload.php | 122 +++++++++++++++++++ 3 files changed, 134 insertions(+) create mode 100644 phpBB/phpbb/cron/task/core/tidy_plupload.php diff --git a/phpBB/config/cron_tasks.yml b/phpBB/config/cron_tasks.yml index 109c9684f9..a39c3b5767 100644 --- a/phpBB/config/cron_tasks.yml +++ b/phpBB/config/cron_tasks.yml @@ -65,6 +65,16 @@ services: tags: - { name: cron.task } + cron.task.core.tidy_plupload: + class: phpbb_cron_task_core_tidy_plupload + arguments: + - %core.root_path% + - @config + calls: + - [set_name, [cron.task.core.tidy_plupload]] + tags: + - { name: cron.task } + cron.task.core.tidy_search: class: phpbb\cron\task\core\tidy_search arguments: diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php index 9c470efcd9..77a7618ce0 100644 --- a/phpBB/language/en/acp/common.php +++ b/phpBB/language/en/acp/common.php @@ -666,6 +666,8 @@ $lang = array_merge($lang, array( 'LOG_U_ROLE_EDIT' => 'User role edited
    Ā» %s', 'LOG_U_ROLE_REMOVED' => 'User role removed
    Ā» %s', + 'LOG_PLUPLOAD_TIDY_FAILED' => 'Unable to open %1$s for tidying, check permissions.
    Exception: %2$s
    Trace: %3$s', + 'LOG_PROFILE_FIELD_ACTIVATE' => 'Profile field activated
    Ā» %s', 'LOG_PROFILE_FIELD_CREATE' => 'Profile field added
    Ā» %s', 'LOG_PROFILE_FIELD_DEACTIVATE' => 'Profile field deactivated
    Ā» %s', diff --git a/phpBB/phpbb/cron/task/core/tidy_plupload.php b/phpBB/phpbb/cron/task/core/tidy_plupload.php new file mode 100644 index 0000000000..be447d54a5 --- /dev/null +++ b/phpBB/phpbb/cron/task/core/tidy_plupload.php @@ -0,0 +1,122 @@ +phpbb_root_path = $phpbb_root_path; + $this->config = $config; + + $this->plupload_upload_path = $this->phpbb_root_path . $this->config['upload_path'] . '/plupload'; + } + + /** + * {@inheritDoc} + */ + public function run() + { + // Remove old temporary file (perhaps failed uploads?) + $last_valid_timestamp = time() - $this->max_file_age; + try + { + $iterator = new DirectoryIterator($this->plupload_upload_path); + foreach ($iterator as $file) + { + if (strpos($file->getBasename(), $this->config['plupload_salt']) !== 0) + { + // Skip over any non-plupload files. + continue; + } + + if ($file->getMTime() < $last_valid_timestamp) + { + @unlink($file->getPathname()); + } + } + } + catch (UnexpectedValueException $e) + { + add_log( + 'critical', + 'LOG_PLUPLOAD_TIDY_FAILED', + $this->plupload_upload_path, + $e->getMessage(), + $e->getTraceAsString() + ); + } + + $this->config->set('plupload_last_gc', time(), true); + } + + /** + * {@inheritDoc} + */ + public function is_runnable() + { + return !empty($this->config['plupload_salt']) && is_dir($this->plupload_upload_path); + } + + /** + * {@inheritDoc} + */ + public function should_run() + { + return $this->config['plupload_last_gc'] < time() - $this->cron_frequency; + } +} From beda12c05526aebcc6c968d97030f2b691ab1718 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 11 Oct 2013 15:51:33 +0200 Subject: [PATCH 103/661] [feature/plupload/cron] Namespacification PHPBB3-10929 --- phpBB/config/cron_tasks.yml | 2 +- phpBB/phpbb/cron/task/core/tidy_plupload.php | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/phpBB/config/cron_tasks.yml b/phpBB/config/cron_tasks.yml index a39c3b5767..fd3aea85dc 100644 --- a/phpBB/config/cron_tasks.yml +++ b/phpBB/config/cron_tasks.yml @@ -66,7 +66,7 @@ services: - { name: cron.task } cron.task.core.tidy_plupload: - class: phpbb_cron_task_core_tidy_plupload + class: phpbb\cron\task\core\tidy_plupload arguments: - %core.root_path% - @config diff --git a/phpBB/phpbb/cron/task/core/tidy_plupload.php b/phpBB/phpbb/cron/task/core/tidy_plupload.php index be447d54a5..09e9dfa6b4 100644 --- a/phpBB/phpbb/cron/task/core/tidy_plupload.php +++ b/phpBB/phpbb/cron/task/core/tidy_plupload.php @@ -7,6 +7,8 @@ * */ +namespace phpbb\cron\task\core; + /** * @ignore */ @@ -20,7 +22,7 @@ if (!defined('IN_PHPBB')) * * @package phpBB3 */ -class phpbb_cron_task_core_tidy_plupload extends phpbb_cron_task_base +class tidy_plupload extends \phpbb\cron\task\base { /** * How old a file must be (in seconds) before it is deleted. @@ -42,7 +44,7 @@ class phpbb_cron_task_core_tidy_plupload extends phpbb_cron_task_base /** * Config object - * @var phpbb_config + * @var \phpbb\config\config */ protected $config; @@ -56,9 +58,9 @@ class phpbb_cron_task_core_tidy_plupload extends phpbb_cron_task_base * Constructor. * * @param string $phpbb_root_path The root path - * @param phpbb_config $config The config + * @param \phpbb\config\config $config The config */ - public function __construct($phpbb_root_path, phpbb_config $config) + public function __construct($phpbb_root_path, \phpbb\config\config $config) { $this->phpbb_root_path = $phpbb_root_path; $this->config = $config; @@ -75,7 +77,7 @@ class phpbb_cron_task_core_tidy_plupload extends phpbb_cron_task_base $last_valid_timestamp = time() - $this->max_file_age; try { - $iterator = new DirectoryIterator($this->plupload_upload_path); + $iterator = new \DirectoryIterator($this->plupload_upload_path); foreach ($iterator as $file) { if (strpos($file->getBasename(), $this->config['plupload_salt']) !== 0) @@ -90,7 +92,7 @@ class phpbb_cron_task_core_tidy_plupload extends phpbb_cron_task_base } } } - catch (UnexpectedValueException $e) + catch (\UnexpectedValueException $e) { add_log( 'critical', From 4c560806085f38e33fa0a2e726f99e7d5c457369 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 11 Oct 2013 16:02:56 +0200 Subject: [PATCH 104/661] [ticket/11621] Correct GPLv2 link in file header. PHPBB3-11621 --- phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php b/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php index 13db2f2a40..def4163190 100644 --- a/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php +++ b/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php @@ -3,7 +3,7 @@ * * @package migration * @copyright (c) 2013 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2 +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * */ From 2050a39da793b9ed219beed868ec86ebade423f6 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 11 Oct 2013 17:40:16 +0200 Subject: [PATCH 105/661] [feature/plupload/integration] Integration of Plupload This commit is a highly-refactored and up-to-date version of Fyorl's work which was part of his Google Summer of Code 2012 project "Attachment Improvements". PHPBB3-10929 --- phpBB/config/services.yml | 9 + phpBB/includes/functions_posting.php | 19 +- phpBB/includes/functions_upload.php | 31 +- phpBB/includes/message_parser.php | 49 ++- phpBB/includes/ucp/ucp_pm_compose.php | 10 +- phpBB/install/install_install.php | 4 + phpBB/install/schemas/schema_data.sql | 2 + phpBB/language/en/plupload.php | 65 +++ phpBB/phpbb/db/migration/data/v310/alpha1.php | 1 + .../phpbb/db/migration/data/v310/plupload.php | 32 ++ phpBB/phpbb/plupload/plupload.php | 374 ++++++++++++++++++ phpBB/posting.php | 7 + .../prosilver/template/overall_footer.html | 1 + .../prosilver/template/overall_header.html | 5 + phpBB/styles/prosilver/template/plupload.html | 48 +++ phpBB/styles/prosilver/theme/plupload.css | 11 + tests/functional/fileupload_form_test.php | 19 + tests/functional/plupload_test.php | 149 +++++++ 18 files changed, 827 insertions(+), 9 deletions(-) create mode 100644 phpBB/language/en/plupload.php create mode 100644 phpBB/phpbb/db/migration/data/v310/plupload.php create mode 100644 phpBB/phpbb/plupload/plupload.php create mode 100644 phpBB/styles/prosilver/template/plupload.html create mode 100644 phpBB/styles/prosilver/theme/plupload.css create mode 100644 tests/functional/plupload_test.php diff --git a/phpBB/config/services.yml b/phpBB/config/services.yml index 51ae5c454d..c6490a21d7 100644 --- a/phpBB/config/services.yml +++ b/phpBB/config/services.yml @@ -258,6 +258,15 @@ services: php_ini: class: phpbb\php\ini + plupload: + class: phpbb\plupload\plupload + arguments: + - %core.root_path% + - @config + - @request + - @user + - @php_ini + request: class: phpbb\request\request diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index ce1238d8e0..1bcef7f1f2 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -385,8 +385,18 @@ function posting_gen_topic_types($forum_id, $cur_topic_type = POST_NORMAL) /** * Upload Attachment - filedata is generated here * Uses upload class +* +* @param string $form_name The form name of the file upload input +* @param int $forum_id The id of the forum +* @param bool $local Whether the file is local or not +* @param string $local_storage The path to the local file +* @param bool $is_message Whether it is a PM or not +* @param \filespec $local_filedata A filespec object created for the local file +* @param \phpbb\plupload\plupload $plupload The plupload object if one is being used +* +* @return object filespec */ -function upload_attachment($form_name, $forum_id, $local = false, $local_storage = '', $is_message = false, $local_filedata = false) +function upload_attachment($form_name, $forum_id, $local = false, $local_storage = '', $is_message = false, $local_filedata = false, \phpbb\plupload\plupload $plupload = null) { global $auth, $user, $config, $db, $cache; global $phpbb_root_path, $phpEx; @@ -414,7 +424,7 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage $extensions = $cache->obtain_attach_extensions((($is_message) ? false : (int) $forum_id)); $upload->set_allowed_extensions(array_keys($extensions['_allowed_'])); - $file = ($local) ? $upload->local_upload($local_storage, $local_filedata) : $upload->form_upload($form_name); + $file = ($local) ? $upload->local_upload($local_storage, $local_filedata) : $upload->form_upload($form_name, $plupload); if ($file->init_error) { @@ -469,6 +479,11 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage { $file->remove(); + if ($plupload && $plupload->is_active()) + { + $plupload->emit_error(104, 'ATTACHED_IMAGE_NOT_IMAGE'); + } + // If this error occurs a user tried to exploit an IE Bug by renaming extensions // Since the image category is displaying content inline we need to catch this. trigger_error($user->lang['ATTACHED_IMAGE_NOT_IMAGE']); diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php index 4181896eca..04d483e14c 100644 --- a/phpBB/includes/functions_upload.php +++ b/phpBB/includes/functions_upload.php @@ -43,11 +43,17 @@ class filespec var $upload = ''; + /** + * The plupload object + * @var \phpbb\plupload\plupload + */ + protected $plupload; + /** * File Class * @access private */ - function filespec($upload_ary, $upload_namespace) + function filespec($upload_ary, $upload_namespace, \phpbb\plupload\plupload $plupload = null) { if (!isset($upload_ary)) { @@ -80,6 +86,7 @@ class filespec $this->local = (isset($upload_ary['local_mode'])) ? true : false; $this->upload = $upload_namespace; + $this->plupload = $plupload; } /** @@ -161,12 +168,14 @@ class filespec */ function is_uploaded() { - if (!$this->local && !is_uploaded_file($this->filename)) + $is_plupload = $this->plupload && $this->plupload->is_active(); + + if (!$this->local && !$is_plupload && !is_uploaded_file($this->filename)) { return false; } - if ($this->local && !file_exists($this->filename)) + if (($this->local || $is_plupload) && !file_exists($this->filename)) { return false; } @@ -564,16 +573,28 @@ class fileupload * Upload file from users harddisk * * @param string $form_name Form name assigned to the file input field (if it is an array, the key has to be specified) + * @param \phpbb\plupload\plupload $plupload The plupload object + * * @return object $file Object "filespec" is returned, all further operations can be done with this object * @access public */ - function form_upload($form_name) + function form_upload($form_name, \phpbb\plupload\plupload $plupload = null) { global $user, $request; $upload = $request->file($form_name); unset($upload['local_mode']); - $file = new filespec($upload, $this); + + if ($plupload) + { + $result = $plupload->handle_upload($form_name); + if (is_array($result)) + { + $upload = array_merge($upload, $result); + } + } + + $file = new filespec($upload, $this, $plupload); if ($file->init_error) { diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index 3e348801c7..acd31fd519 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -1049,6 +1049,12 @@ class parse_message extends bbcode_firstpass var $mode; + /** + * The plupload object used for dealing with attachments + * @var \phpbb\plupload\plupload + */ + protected $plupload; + /** * Init - give message here or manually */ @@ -1440,6 +1446,11 @@ class parse_message extends bbcode_firstpass if ($preview || $refresh || sizeof($error)) { + if (isset($this->plupload) && $this->plupload->is_active()) + { + $json_response = new \phpbb\json_response(); + } + // Perform actions on temporary attachments if ($delete_file) { @@ -1484,13 +1495,17 @@ class parse_message extends bbcode_firstpass // Reindex Array $this->attachment_data = array_values($this->attachment_data); + if (isset($this->plupload) && $this->plupload->is_active()) + { + $json_response->send($this->attachment_data); + } } } else if (($add_file || $preview) && $upload_file) { if ($num_attachments < $cfg['max_attachments'] || $auth->acl_gets('m_', 'a_', $forum_id)) { - $filedata = upload_attachment($form_name, $forum_id, false, '', $is_message); + $filedata = upload_attachment($form_name, $forum_id, false, '', $is_message, false, $this->plupload); $error = array_merge($error, $filedata['error']); if (!sizeof($error)) @@ -1521,12 +1536,32 @@ class parse_message extends bbcode_firstpass $this->attachment_data = array_merge(array(0 => $new_entry), $this->attachment_data); $this->message = preg_replace('#\[attachment=([0-9]+)\](.*?)\[\/attachment\]#e', "'[attachment='.(\\1 + 1).']\\2[/attachment]'", $this->message); $this->filename_data['filecomment'] = ''; + + if (isset($this->plupload) && $this->plupload->is_active()) + { + // Send the client the attachment data to maintain state + $json_response->send($this->attachment_data); + } } } else { $error[] = $user->lang('TOO_MANY_ATTACHMENTS', (int) $cfg['max_attachments']); } + + if (!empty($error) && isset($this->plupload) && $this->plupload->is_active()) + { + // If this is a plupload (and thus ajax) request, give the + // client the first error we have + $json_response->send(array( + 'jsonrpc' => '2.0', + 'id' => 'id', + 'error' => array( + 'code' => 105, + 'message' => current($error), + ), + )); + } } } @@ -1687,4 +1722,16 @@ class parse_message extends bbcode_firstpass $poll['poll_max_options'] = ($poll['poll_max_options'] < 1) ? 1 : (($poll['poll_max_options'] > $config['max_poll_options']) ? $config['max_poll_options'] : $poll['poll_max_options']); } + + /** + * Setter function for passing the plupload object + * + * @param \phpbb\plupload\plupload $plupload The plupload object + * + * @return null + */ + public function set_plupload(\phpbb\plupload\plupload $plupload) + { + $this->plupload = $plupload; + } } diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index e0e7a46494..87dfdf902b 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -21,9 +21,10 @@ if (!defined('IN_PHPBB')) */ function compose_pm($id, $mode, $action, $user_folders = array()) { - global $template, $db, $auth, $user; + global $template, $db, $auth, $user, $cache; global $phpbb_root_path, $phpEx, $config; global $request; + global $phpbb_container; // Damn php and globals - i know, this is horrible // Needed for handle_message_list_actions() @@ -385,6 +386,8 @@ function compose_pm($id, $mode, $action, $user_folders = array()) } $message_parser = new parse_message(); + $plupload = $phpbb_container->get('plupload'); + $message_parser->set_plupload($plupload); $message_parser->message = ($action == 'reply') ? '' : $message_text; unset($message_text); @@ -1099,6 +1102,11 @@ function compose_pm($id, $mode, $action, $user_folders = array()) // Show attachment box for adding attachments if true $allowed = ($auth->acl_get('u_pm_attach') && $config['allow_pm_attach'] && $form_enctype); + if ($allowed) + { + $plupload->configure($cache, $template, $s_action, false); + } + // Attachment entry posting_gen_attachment_entry($attachment_data, $filename_data, $allowed); diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index c273660d08..1a7e1d1094 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -1322,6 +1322,10 @@ class install_install extends module SET config_value = '" . md5(mt_rand()) . "' WHERE config_name = 'avatar_salt'", + 'UPDATE ' . $data['table_prefix'] . "config + SET config_value = '" . md5(mt_rand()) . "' + WHERE config_name = 'plupload_salt'", + 'UPDATE ' . $data['table_prefix'] . "users SET username = '" . $db->sql_escape($data['admin_name']) . "', user_password='" . $db->sql_escape(md5($data['admin_pass1'])) . "', user_ip = '" . $db->sql_escape($user_ip) . "', user_lang = '" . $db->sql_escape($data['default_lang']) . "', user_email='" . $db->sql_escape($data['board_email']) . "', user_dateformat='" . $db->sql_escape($lang['default_dateformat']) . "', user_email_hash = " . $db->sql_escape(phpbb_email_hash($data['board_email'])) . ", username_clean = '" . $db->sql_escape(utf8_clean_string($data['admin_name'])) . "' WHERE username = 'Admin'", diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index cd38f86312..094a43c8a0 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -222,6 +222,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('new_member_post_li INSERT INTO phpbb_config (config_name, config_value) VALUES ('new_member_group_default', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('override_user_style', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('pass_complex', 'PASS_TYPE_ANY'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('plupload_salt', 'phpbb_plupload'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('pm_edit_time', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('pm_max_boxes', '4'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('pm_max_msgs', '50'); @@ -284,6 +285,7 @@ INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('num_fi INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('num_posts', '1', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('num_topics', '1', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('num_users', '1', 1); +INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('plupload_last_gc', '0', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('rand_seed', '0', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('rand_seed_last_update', '0', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('record_online_date', '0', 1); diff --git a/phpBB/language/en/plupload.php b/phpBB/language/en/plupload.php new file mode 100644 index 0000000000..cfdce9810e --- /dev/null +++ b/phpBB/language/en/plupload.php @@ -0,0 +1,65 @@ + 'Add files', + 'PLUPLOAD_ADD_FILES_TO_QUEUE' => 'Add files to the upload queue and click the start button.', + 'PLUPLOAD_DRAG' => 'Drag files here.', + 'PLUPLOAD_ERR_INPUT' => 'Failed to open input stream.', + 'PLUPLOAD_ERR_MOVE_UPLOADED' => 'Failed to move uploaded file.', + 'PLUPLOAD_ERR_OUTPUT' => 'Failed to open output stream.', + 'PLUPLOAD_EXTENSION_ERROR' => 'File extension error.', + 'PLUPLOAD_FILENAME' => 'Filename', + 'PLUPLOAD_FILES_QUEUED' => '%d files queued', + 'PLUPLOAD_GENERIC_ERROR' => 'Generic error.', + 'PLUPLOAD_HTTP_ERROR' => 'HTTP error.', + 'PLUPLOAD_INIT_ERROR' => 'Init error.', + 'PLUPLOAD_IO_ERROR' => 'IO error.', + 'PLUPLOAD_NOT_APPLICABLE' => 'N/A', + 'PLUPLOAD_SECURITY_ERROR' => 'Security error.', + 'PLUPLOAD_SELECT_FILES' => 'Select files', + 'PLUPLOAD_SIZE' => 'Size', + 'PLUPLOAD_SIZE_ERROR' => 'File size error.', + 'PLUPLOAD_STATUS' => 'Status', + 'PLUPLOAD_START_UPLOAD' => 'Start upload', + 'PLUPLOAD_START_CURRENT_UPLOAD' => 'Start uploading queue', + 'PLUPLOAD_STOP_UPLOAD' => 'Stop upload', + 'PLUPLOAD_STOP_CURRENT_UPLOAD' => 'Stop current upload', + // Note: This string is formatted independently by plupload and so does not + // use the same formatting rules as normal phpBB translation strings + 'PLUPLOAD_UPLOADED' => 'Uploaded %d/%d files', +)); diff --git a/phpBB/phpbb/db/migration/data/v310/alpha1.php b/phpBB/phpbb/db/migration/data/v310/alpha1.php index 04f195daeb..368c53125e 100644 --- a/phpBB/phpbb/db/migration/data/v310/alpha1.php +++ b/phpBB/phpbb/db/migration/data/v310/alpha1.php @@ -27,6 +27,7 @@ class alpha1 extends \phpbb\db\migration\migration '\phpbb\db\migration\data\v310\namespaces', '\phpbb\db\migration\data\v310\notifications_cron', '\phpbb\db\migration\data\v310\notification_options_reconvert', + '\phpbb\db\migration\data\v310\plupload', '\phpbb\db\migration\data\v310\signature_module_auth', '\phpbb\db\migration\data\v310\softdelete_mcp_modules', '\phpbb\db\migration\data\v310\teampage', diff --git a/phpBB/phpbb/db/migration/data/v310/plupload.php b/phpBB/phpbb/db/migration/data/v310/plupload.php new file mode 100644 index 0000000000..1787c6dafc --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/plupload.php @@ -0,0 +1,32 @@ +config['plupload_last_gc']) && + isset($this->config['plupload_salt']); + } + + static public function depends_on() + { + return array('\phpbb\db\migration\data\310\dev'); + } + + public function update_data() + { + return array( + array('config.add', array('plupload_last_gc', 0)), + array('config.add', array('plupload_salt', unique_id())), + ); + } +} diff --git a/phpBB/phpbb/plupload/plupload.php b/phpBB/phpbb/plupload/plupload.php new file mode 100644 index 0000000000..6eb5adf864 --- /dev/null +++ b/phpBB/phpbb/plupload/plupload.php @@ -0,0 +1,374 @@ +phpbb_root_path = $phpbb_root_path; + $this->config = $config; + $this->request = $request; + $this->user = $user; + $this->php_ini = $php_ini; + + $this->upload_directory = $this->phpbb_root_path . $this->config['upload_path']; + $this->temporary_directory = $this->upload_directory . '/plupload'; + } + + /** + * Plupload allows for chunking so we must check for that and assemble + * the whole file first before performing any checks on it. + * + * @param string $form_name The name of the file element in the upload form + * + * @return array|null null if there are no chunks to piece together + * otherwise array containing the path to the + * pieced-together file and its size + */ + public function handle_upload($form_name) + { + $chunks_expected = $this->request->variable('chunks', 0); + + // If chunking is disabled or we are not using plupload, just return + // and handle the file as usual + if ($chunks_expected < 2) + { + return; + } + + $file_name = $this->request->variable('name', ''); + $chunk = $this->request->variable('chunk', 0); + + $this->user->add_lang('plupload'); + $this->prepare_temporary_directory(); + + $file_path = $this->temporary_filepath($file_name); + $this->integrate_uploaded_file($form_name, $chunk, $file_path); + + // If we are done with all the chunks, strip the .part suffix and then + // handle the resulting file as normal, otherwise die and await the + // next chunk. + if ($chunk == $chunks_expected - 1) + { + rename("{$file_path}.part", $file_path); + + $file_info = new \Symfony\Component\HttpFoundation\File\File($file_path); + + // Need to modify some of the $_FILES values to reflect the new file + return array( + 'tmp_name' => $file_path, + 'name' => $this->request->variable('real_filename', ''), + 'size' => filesize($file_path), + 'type' => $file_info->getMimeType($file_path), + ); + } + else + { + $json_response = new \phpbb\json_response(); + $json_response->send(array( + 'jsonrpc' => '2.0', + 'id' => 'id', + 'result' => null, + )); + } + } + + /** + * Fill in the plupload configuration options in the template + * + * @param \phpbb\cache\service $cache + * @param \phpbb\template\template $template + * @param string $s_action The URL to submit the POST data to + * @param int $forum_id The ID of the forum + * + * @return null + */ + public function configure(\phpbb\cache\service $cache, \phpbb\template\template $template, $s_action, $forum_id) + { + $filters = $this->generate_filter_string($cache, $forum_id); + $chunk_size = $this->get_chunk_size(); + $resize = $this->generate_resize_string(); + + $template->assign_vars(array( + 'S_RESIZE' => $resize, + 'S_PLUPLOAD' => true, + 'FILTERS' => $filters, + 'CHUNK_SIZE' => $chunk_size, + 'S_PLUPLOAD_URL' => htmlspecialchars_decode($s_action), + )); + + $this->user->add_lang('plupload'); + } + + /** + * Checks whether the page request was sent by plupload or not + * + * @return bool + */ + public function is_active() + { + return $this->request->header('X-PHPBB-USING-PLUPLOAD', false); + } + + /** + * Returns whether the current HTTP request is a multipart request. + * + * @return bool + */ + public function is_multipart() + { + $content_type = $this->request->server('CONTENT_TYPE'); + + return strpos($content_type, 'multipart') === 0; + } + + /** + * Sends an error message back to the client via JSON response + * + * @param int $code The error code + * @param string $msg The translation string of the message to be sent + * + * @return null + */ + public function emit_error($code, $msg) + { + $json_response = new \phpbb\json_response(); + $json_response->send(array( + 'jsonrpc' => '2.0', + 'id' => 'id', + 'error' => array( + 'code' => $code, + 'message' => $this->user->lang($msg), + ), + )); + } + + /** + * Looks at the list of allowed extensions and generates a string + * appropriate for use in configuring plupload with + * + * @param \phpbb\cache\service $cache + * @param string $forum_id The ID of the forum + * + * @return string + */ + public function generate_filter_string(\phpbb\cache\service $cache, $forum_id) + { + $attach_extensions = $cache->obtain_attach_extensions($forum_id); + unset($attach_extensions['_allowed_']); + $groups = array(); + + // Re-arrange the extension array to $groups[$group_name][] + foreach ($attach_extensions as $extension => $extension_info) + { + if (!isset($groups[$extension_info['group_name']])) + { + $groups[$extension_info['group_name']] = array(); + } + + $groups[$extension_info['group_name']][] = $extension; + } + + $filters = array(); + foreach ($groups as $group => $extensions) + { + $filters[] = sprintf( + "{title: '%s', extensions: '%s'}", + addslashes(ucfirst(strtolower($group))), + addslashes(implode(',', $extensions)) + ); + } + + return implode(',', $filters); + } + + /** + * Generates a string that is used to tell plupload to automatically resize + * files before uploading them. + * + * @return string + */ + public function generate_resize_string() + { + $resize = ''; + if ($this->config['img_max_height'] > 0 && $this->config['img_max_width'] > 0) + { + $resize = sprintf( + 'resize: {width: %d, height: %d, quality: 100},', + (int) $this->config['img_max_height'], + (int) $this->config['img_max_width'] + ); + } + + return $resize; + } + + /** + * Checks various php.ini values and the maximum file size to determine + * the maximum size chunks a file can be split up into for upload + * + * @return int + */ + public function get_chunk_size() + { + $max = min( + $this->php_ini->get_bytes('upload_max_filesize'), + $this->php_ini->get_bytes('post_max_size'), + max(1, $this->php_ini->get_bytes('memory_limit')), + $this->config['max_filesize'] + ); + + // Use half of the maximum possible to leave plenty of room for other + // POST data. + return floor($max / 2); + } + + protected function temporary_filepath($file_name) + { + // Must preserve the extension for plupload to work. + return sprintf( + '%s/%s_%s%s', + $this->temporary_directory, + $this->config['plupload_salt'], + md5($file_name), + \filespec::get_extension($file_name) + ); + } + + /** + * Checks whether the chunk we are about to deal with was actually uploaded + * by PHP and actually exists, if not, it generates an error + * + * @param string $form_name The name of the file in the form data + * + * @return null + */ + protected function integrate_uploaded_file($form_name, $chunk, $file_path) + { + $is_multipart = $this->is_multipart(); + $upload = $this->request->file($form_name); + if ($is_multipart && (!isset($upload['tmp_name']) || !is_uploaded_file($upload['tmp_name']))) + { + $this->emit_error(103, 'PLUPLOAD_ERR_MOVE_UPLOADED'); + } + + $tmp_file = $this->temporary_filepath($upload['tmp_name']); + + if (!move_uploaded_file($upload['tmp_name'], $tmp_file)) + { + $this->emit_error(103, 'PLUPLOAD_ERR_MOVE_UPLOADED'); + } + + $out = fopen("{$file_path}.part", $chunk == 0 ? 'wb' : 'ab'); + if (!$out) + { + $this->emit_error(102, 'PLUPLOAD_ERR_OUTPUT'); + } + + $in = fopen(($is_multipart) ? $tmp_file : 'php://input', 'rb'); + if (!$in) + { + $this->emit_error(101, 'PLUPLOAD_ERR_INPUT'); + } + + while ($buf = fread($in, 4096)) + { + fwrite($out, $buf); + } + + fclose($in); + fclose($out); + + if ($is_multipart) + { + unlink($tmp_file); + } + } + + /** + * Creates the temporary directory if it does not already exist. + * + * @return null + */ + protected function prepare_temporary_directory() + { + if (!file_exists($this->temporary_directory)) + { + mkdir($this->temporary_directory); + + copy( + $this->upload_directory . '/index.htm', + $this->temporary_directory . '/index.htm' + ); + } + } +} diff --git a/phpBB/posting.php b/phpBB/posting.php index 1609382551..396b320eac 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -452,6 +452,8 @@ if ($mode == 'edit') $orig_poll_options_size = sizeof($post_data['poll_options']); $message_parser = new parse_message(); +$plupload = $phpbb_container->get('plupload'); +$message_parser->set_plupload($plupload); if (isset($post_data['post_text'])) { @@ -1551,6 +1553,11 @@ if (($mode == 'post' || ($mode == 'edit' && $post_id == $post_data['topic_first_ // Show attachment box for adding attachments if true $allowed = ($auth->acl_get('f_attach', $forum_id) && $auth->acl_get('u_attach') && $config['allow_attachments'] && $form_enctype); +if ($allowed) +{ + $plupload->configure($cache, $template, $s_action, $forum_id); +} + // Attachment entry posting_gen_attachment_entry($attachment_data, $filename_data, $allowed); diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html index e26c94f367..b26a4c1610 100644 --- a/phpBB/styles/prosilver/template/overall_footer.html +++ b/phpBB/styles/prosilver/template/overall_footer.html @@ -65,6 +65,7 @@ {$SCRIPTS} + diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html index 6ca5c86fa4..92baf6ee51 100644 --- a/phpBB/styles/prosilver/template/overall_header.html +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -33,6 +33,11 @@ + + + + + diff --git a/phpBB/styles/prosilver/template/plupload.html b/phpBB/styles/prosilver/template/plupload.html new file mode 100644 index 0000000000..564c1b5c36 --- /dev/null +++ b/phpBB/styles/prosilver/template/plupload.html @@ -0,0 +1,48 @@ + + + + + diff --git a/phpBB/styles/prosilver/theme/plupload.css b/phpBB/styles/prosilver/theme/plupload.css new file mode 100644 index 0000000000..16c26822b5 --- /dev/null +++ b/phpBB/styles/prosilver/theme/plupload.css @@ -0,0 +1,11 @@ +.plupload_filelist li.can_delete:hover { + cursor: pointer; +} + +.plupload_filelist li.can_delete:hover a { + background: url('../../../assets/plupload/jquery.plupload.queue/img/delete.gif'); +} + +.plupload_filelist li a.working { + background: url('../../../assets/plupload/jquery.plupload.queue/img/throbber.gif'); +} diff --git a/tests/functional/fileupload_form_test.php b/tests/functional/fileupload_form_test.php index 998c402fa3..ad01d7b2df 100644 --- a/tests/functional/fileupload_form_test.php +++ b/tests/functional/fileupload_form_test.php @@ -22,6 +22,25 @@ class phpbb_functional_fileupload_form_test extends phpbb_functional_test_case $this->login(); } + public function tearDown() + { + $iterator = new DirectoryIterator(__DIR__ . '/../../phpBB/files/'); + foreach ($iterator as $fileinfo) + { + if ( + $fileinfo->isDot() + || $fileinfo->isDir() + || $fileinfo->getFilename() === 'index.htm' + || $fileinfo->getFilename() === '.htaccess' + ) + { + continue; + } + + unlink($fileinfo->getPathname()); + } + } + private function upload_file($filename, $mimetype) { $file = array( diff --git a/tests/functional/plupload_test.php b/tests/functional/plupload_test.php new file mode 100644 index 0000000000..6dd9224839 --- /dev/null +++ b/tests/functional/plupload_test.php @@ -0,0 +1,149 @@ +get_db(); + $query = " + UPDATE phpbb_extension_groups + SET allow_in_pm = '$val' + WHERE group_name = 'IMAGES' + "; + $db->sql_query($query); + } + + public function setUp() + { + parent::setUp(); + $this->set_extension_group_permission(1); + $this->path = __DIR__ . '/fixtures/files/'; + $this->add_lang('posting'); + $this->login(); + } + + public function tearDown() + { + $this->set_extension_group_permission(0); + $iterator = new DirectoryIterator(__DIR__ . '/../../phpBB/files/'); + foreach ($iterator as $fileinfo) + { + if ( + $fileinfo->isDot() + || $fileinfo->isDir() + || $fileinfo->getFilename() === 'index.htm' + || $fileinfo->getFilename() === '.htaccess' + ) + { + continue; + } + + unlink($fileinfo->getPathname()); + } + } + + public function get_urls() + { + return array( + array('posting.php?mode=reply&f=2&t=1'), + array('ucp.php?i=pm&mode=compose'), + ); + } + + /** + * @dataProvider get_urls + */ + public function test_chunked_upload($url) + { + $chunk_size = ceil(filesize($this->path . 'valid.jpg') / self::CHUNKS); + $handle = fopen($this->path . 'valid.jpg', 'rb'); + + for ($i = 0; $i < self::CHUNKS; $i++) + { + $chunk = fread($handle, $chunk_size); + file_put_contents($this-> path . 'chunk', $chunk); + + $file = array( + 'tmp_name' => $this->path . 'chunk', + 'name' => 'blob', + 'type' => 'application/octet-stream', + 'size' => strlen($chunk), + 'error' => UPLOAD_ERR_OK, + ); + + self::$client->setServerParameter('HTTP_X_PHPBB_USING_PLUPLOAD', '1'); + + $crawler = self::$client->request( + 'POST', + $url . '&sid=' . $this->sid, + array( + 'chunk' => $i, + 'chunks' => self::CHUNKS, + 'name' => md5('valid') . '.jpg', + 'real_filename' => 'valid.jpg', + 'add_file' => $this->lang('ADD_FILE'), + ), + array('fileupload' => $file), + array('X-PHPBB-USING-PLUPLOAD' => '1') + ); + + if ($i < self::CHUNKS - 1) + { + $this->assertContains('{"jsonrpc":"2.0","id":"id","result":null}', self::$client->getResponse()->getContent()); + } + else + { + $response = json_decode(self::$client->getResponse()->getContent(), true); + $this->assertEquals('valid.jpg', $response[0]['real_filename']); + } + + unlink($this->path . 'chunk'); + } + + fclose($handle); + } + + /** + * @dataProvider get_urls + */ + public function test_normal_upload($url) + { + $file = array( + 'tmp_name' => $this->path . 'valid.jpg', + 'name' => 'valid.jpg', + 'type' => 'image/jpeg', + 'size' => filesize($this->path . 'valid.jpg'), + 'error' => UPLOAD_ERR_OK, + ); + + $crawler = self::$client->request( + 'POST', + $url . '&sid=' . $this->sid, + array( + 'chunk' => '0', + 'chunks' => '1', + 'name' => md5('valid') . '.jpg', + 'real_filename' => 'valid.jpg', + 'add_file' => $this->lang('ADD_FILE'), + ), + array('fileupload' => $file), + array('X-PHPBB-USING-PLUPLOAD' => '1') + ); + + $response = json_decode(self::$client->getResponse()->getContent(), true); + $this->assertEquals('valid.jpg', $response[0]['real_filename']); + } +} From 6ccceca064929af4f1c59da56586e3d3003bcdda Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sun, 13 Oct 2013 14:25:28 +0200 Subject: [PATCH 106/661] [ticket/11621] Add explanation to mysql_fulltext_drop. PHPBB3-11621 --- .../phpbb/db/migration/data/v310/mysql_fulltext_drop.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php b/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php index def4163190..97d174d4bc 100644 --- a/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php +++ b/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php @@ -26,6 +26,14 @@ class mysql_fulltext_drop extends \phpbb\db\migration\migration public function update_schema() { + /* + * Drop FULLTEXT indexes related to MySQL fulltext search. + * Doing so is equivalent to dropping the search index from the ACP. + * Possibly time-consuming recreation of the search index (i.e. + * FULLTEXT indexes) is left as a task to the admin to not + * unnecessarily stall the upgrade process. The new search index will + * then require about 40% less table space (also see PHPBB3-11621). + */ return array( 'drop_keys' => array( $this->table_prefix . 'posts' => array( From 7e96b663f1c8e5c695449ac4ba2823a9f2f39e6e Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Mon, 14 Oct 2013 00:15:10 +0200 Subject: [PATCH 107/661] [ticket/11913] Better download.phpbb.com directory structure for phpBB 3.1+ PHPBB3-11913 --- build/build_announcement.php | 40 ++++++++++-------------------------- 1 file changed, 11 insertions(+), 29 deletions(-) diff --git a/build/build_announcement.php b/build/build_announcement.php index 3ee96fc67d..a1a496fd68 100755 --- a/build/build_announcement.php +++ b/build/build_announcement.php @@ -22,16 +22,20 @@ $checksum_algorithm = $_SERVER['argv'][4]; $series_version = substr($version, 0, 3); $base_url = "https://download.phpbb.com/pub/release/$series_version"; -if (strpos($version, 'RC') === false) +if (version_compare($version, "$series_version.0", '<')) { - // Final release - $install_url = "$base_url/$version"; - $update_url = "$base_url/update/to_$version"; + // Everything before 3.x.0, i.e. unstable (e.g. alpha, beta, rc) + $url = "$base_url/unstable/$version"; +} +else if (strpos($version, 'RC') !== false) +{ + // Release candidate of stable release + $url = "$base_url/qa/$version"; } else { - $install_url = "$base_url/release_candidates/$version"; - $update_url = "$base_url/release_candidates/update/other_to_$version"; + // Stable release (e.g. 3.x.0, 3.x.1, 3.x.2, 3.x.3-PL1) + $url = "$base_url/$version"; } if ($mode === 'bbcode') @@ -58,41 +62,19 @@ function phpbb_string_ends_with($haystack, $needle) return substr($haystack, -strlen($needle)) === $needle; } -function phpbb_is_update_file($filename) -{ - return strpos($filename, '_to_') !== false; -} - function phpbb_get_checksum($checksum_file) { return array_shift(explode(' ', file_get_contents($checksum_file))); } -$install_files = $update_files = array(); foreach (phpbb_rnatsort(array_diff(scandir($root), array('.', '..'))) as $filename) { if (phpbb_string_ends_with($filename, $checksum_algorithm)) { continue; } - else if (phpbb_is_update_file($filename)) - { - $update_files[] = $filename; - } else { - $install_files[] = $filename; + printf($template, $url, $filename, phpbb_get_checksum("$root/$filename.$checksum_algorithm")); } } - -foreach ($install_files as $filename) -{ - printf($template, $install_url, $filename, phpbb_get_checksum("$root/$filename.$checksum_algorithm")); -} - -echo "\n"; - -foreach ($update_files as $filename) -{ - printf($template, $update_url, $filename, phpbb_get_checksum("$root/$filename.$checksum_algorithm")); -} From 9f1c6279882e34df5b328680029d16b7e91ec126 Mon Sep 17 00:00:00 2001 From: Fyorl Date: Sun, 13 Oct 2013 19:35:31 +0200 Subject: [PATCH 108/661] [feature/plupload/integration] Add missing javascript file. PHPBB3-10929 --- phpBB/assets/javascript/plupload.js | 281 ++++++++++++++++++++++++++++ 1 file changed, 281 insertions(+) create mode 100644 phpBB/assets/javascript/plupload.js diff --git a/phpBB/assets/javascript/plupload.js b/phpBB/assets/javascript/plupload.js new file mode 100644 index 0000000000..32ff178896 --- /dev/null +++ b/phpBB/assets/javascript/plupload.js @@ -0,0 +1,281 @@ +plupload.addI18n(phpbb.plupload.i18n); +plupload.attachment_data = []; + +/** + * Returns the index of the plupload.attachment_data array where the given + * attach id appears + * + * @param int id The attachment id of the file + * + * @return bool Returns false if the id cannot be found + * @return int Returns the index in the main array where the attachment id + * was found + */ +function phpbb_plupload_find_attachment_idx(id) { + var data = plupload.attachment_data; + for (var i = 0; i < data.length; i++) { + if (data[i].attach_id == id) { + return i; + } + } + + return false; +} + +/** + * Converts an array of objects into an object that PHP would expect as POST + * data + * + * @return object An object in the form 'attachment_data[i][key]': value as + * expected by the server + */ +function phpbb_plupload_attachment_data_serialize() { + var obj = {}; + for (var i = 0; i < plupload.attachment_data.length; i++) { + var datum = plupload.attachment_data[i]; + for (var key in datum) { + if (!datum.hasOwnProperty(key)) { + continue; + } + + obj['attachment_data[' + i + '][' + key + ']'] = datum[key]; + } + } + + return obj; +} + +/** + * Unsets all elements in an object whose keys begin with 'attachment_data[' + * + * @param object The object to be cleared + * + * @return undefined + */ +function phpbb_plupload_clear_params(obj) { + for (var key in obj) { + if (!obj.hasOwnProperty(key) || key.indexOf('attachment_data[') !== 0) { + continue; + } + + delete obj[key]; + } +} + +jQuery(function($) { + $(phpbb.plupload.config.element_hook).pluploadQueue(phpbb.plupload.config); + var uploader = $(phpbb.plupload.config.element_hook).pluploadQueue(); + + // Check the page for already-existing attachment data and add it to the + // array + var form = $(phpbb.plupload.config.form_hook)[0]; + for (var i = 0; i < form.length; i++) { + if (form[i].name.indexOf('attachment_data[') !== 0) { + continue; + } + + var matches = form[i].name.match(/\[(\d+)\]\[([^\]]+)\]/); + var index = matches[1]; + var property = matches[2]; + + if (!plupload.attachment_data[index]) { + plupload.attachment_data[index] = {}; + } + + plupload.attachment_data[index][property] = form[i].value; + uploader.settings.multipart_params[form[i].name] = form[i].value; + } + + /** + * Fires before a given file is about to be uploaded. This allows us to + * send the real filename along with the chunk. This is necessary because + * for some reason the filename is set to 'blob' whenever a file is chunked + * + * @param object up The plupload.Uploader object + * @param object file The plupload.File object that is about to be + * uploaded + * + * @return undefined + */ + uploader.bind('BeforeUpload', function(up, file) { + up.settings.multipart_params = $.extend( + up.settings.multipart_params, + {'real_filename': file.name} + ); + }); + + /** + * Fired when a single chunk of any given file is uploaded. This parses the + * response from the server and checks for an error. If an error occurs it + * is reported to the user and the upload of this particular file is halted + * + * @param object up The plupload.Uploader object + * @param object file The plupload.File object whose chunk has just + * been uploaded + * @param object response The response object from the server + * + * @return undefined + */ + uploader.bind('ChunkUploaded', function(up, file, response) { + if (response.chunk >= response.chunks - 1) { + return; + } + + var json = {}; + try { + json = $.parseJSON(response.response); + } catch (e) { + file.status = plupload.FAILED; + up.trigger('FileUploaded', file, { + response: JSON.stringify({ + error: { + message: 'Error parsing server response.' + } + }) + }); + } + + if (json.error) { + file.status = plupload.FAILED; + up.trigger('FileUploaded', file, { + response: JSON.stringify({ + error: { + message: json.error.message + } + }) + }); + } + }); + + /** + * Fires when an entire file has been uploaded. It checks for errors + * returned by the server otherwise parses the list of attachment data and + * appends it to the next file upload so that the server can maintain state + * with regards to the attachments in a given post + * + * @param object up The plupload.Uploader object + * @param object file The plupload.File object that has just been + * uploaded + * @param string response The response string from the server + * + * @return undefined + */ + uploader.bind('FileUploaded', function(up, file, response) { + var json = {}; + try { + json = $.parseJSON(response.response); + } catch (e) { + file.status = plupload.FAILED; + file.error = 'Error parsing server response.' + } + + if (json.error) { + file.status = plupload.FAILED; + file.error = json.error.message; + } else if (file.status === plupload.DONE) { + plupload.attachment_data = json; + file.attachment_data = json[0]; + up.settings.multipart_params = $.extend( + up.settings.multipart_params, + phpbb_plupload_attachment_data_serialize() + ); + } + }); + + /** + * Fires when the entire queue of files have been uploaded. It resets the + * 'add files' button to allow more files to be uploaded and also attaches + * several events to each row of the currently-uploaded files to facilitate + * deleting any one of the files. + * + * Deleting a file removes it from the queue and fires an ajax event to the + * server to tell it to remove the temporary attachment. The server + * responds with the updated attachment data list so that any future + * uploads can maintain state with the server + * + * @param object up The plupload.Uploader object + * @param array files An array of plupload.File objects that have just + * been uploaded as part of a queue + * + * @return undefined + */ + uploader.bind('UploadComplete', function(up, files) { + $('.plupload_upload_status').css('display', 'none'); + $('.plupload_buttons').css('display', 'block'); + + // Insert a bunch of hidden input elements containing the attachment + // data so that the save/preview/submit buttons work as expected. + var form = $(phpbb.plupload.config.form_hook)[0]; + var data = phpbb_plupload_attachment_data_serialize(); + + // Update already existing hidden inputs + for (var i = 0; i < form.length; i++) { + if (data.hasOwnProperty(form[i].name)) { + form[i].value = data[form[i].name]; + delete data[form[i].name]; + } + } + + // Append new inputs + for (var key in data) { + if (!data.hasOwnProperty(key)) { + continue; + } + + var input = $('') + .attr('type', 'hidden') + .attr('name', key) + .attr('value', data[key]); + $(form).append(input); + } + + files.forEach(function(file) { + if (file.status !== plupload.DONE) { + var click = function(evt) { + alert(file.error); + } + + $('#' + file.id).attr('title', file.error); + $('#' + file.id).click(click); + + return; + } + + var click = function(evt) { + $(evt.target).find('a').addClass('working'); + + // The index is always found because file.attachment_data is + // just an element of plupload.attachment_data + var idx = phpbb_plupload_find_attachment_idx(file.attachment_data.attach_id); + var fields = {}; + fields['delete_file[' + idx + ']'] = 1; + + var always = function() { + $(evt.target).find('a').removeClass('working'); + }; + + var done = function(response) { + up.removeFile(file); + plupload.attachment_data = response; + phpbb_plupload_clear_params(up.settings.multipart_params); + up.settings.multipart_params = $.extend( + up.settings.multipart_params, + phpbb_plupload_attachment_data_serialize() + ); + }; + + $.ajax(phpbb.plupload.config.url, { + type: 'POST', + data: $.extend(fields, phpbb_plupload_attachment_data_serialize()), + headers: {'X-PHPBB-USING-PLUPLOAD': '1'} + }) + .always(always) + .done(done); + }; + + $('#' + file.id) + .addClass('can_delete') + .click(click); + }); + }); +}); From 4709cbbed39f0b4d279dfa4ceb08cac56ad90cff Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 14 Oct 2013 12:04:18 +0200 Subject: [PATCH 109/661] [prep-release-3.1.0-a1] Update version to 3.1.0-a1 --- build/build.xml | 2 +- phpBB/includes/constants.php | 2 +- phpBB/install/convertors/convert_phpbb20.php | 2 +- phpBB/install/schemas/schema_data.sql | 2 +- phpBB/styles/prosilver/style.cfg | 4 ++-- phpBB/styles/subsilver2/style.cfg | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/build/build.xml b/build/build.xml index 063f1017fb..4b8fc0e18f 100644 --- a/build/build.xml +++ b/build/build.xml @@ -2,7 +2,7 @@ - + diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php index ae55a71e50..5165463969 100644 --- a/phpBB/includes/constants.php +++ b/phpBB/includes/constants.php @@ -24,7 +24,7 @@ if (!defined('IN_PHPBB')) */ // phpBB Version -define('PHPBB_VERSION', '3.1.0-dev'); +define('PHPBB_VERSION', '3.1.0-a1'); // QA-related // define('PHPBB_QA', 1); diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php index 4532ecb609..c861028b47 100644 --- a/phpBB/install/convertors/convert_phpbb20.php +++ b/phpBB/install/convertors/convert_phpbb20.php @@ -33,7 +33,7 @@ $dbms = phpbb_convert_30_dbms_to_31($dbms); $convertor_data = array( 'forum_name' => 'phpBB 2.0.x', 'version' => '1.0.3', - 'phpbb_version' => '3.1.0-dev', + 'phpbb_version' => '3.1.0-a1', 'author' => 'phpBB Group', 'dbms' => $dbms, 'dbhost' => $dbhost, diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 094a43c8a0..0aa84a7610 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -270,7 +270,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0 INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('use_system_cron', '0'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.1.0-dev'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.1.0-a1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400'); diff --git a/phpBB/styles/prosilver/style.cfg b/phpBB/styles/prosilver/style.cfg index 633079e4a6..aac9d993f5 100644 --- a/phpBB/styles/prosilver/style.cfg +++ b/phpBB/styles/prosilver/style.cfg @@ -18,8 +18,8 @@ # General Information about this style name = prosilver copyright = © phpBB Group, 2007 -style_version = 3.1.0-dev -phpbb_version = 3.1.0-dev +style_version = 3.1.0-a1 +phpbb_version = 3.1.0-a1 # Defining a different template bitfield # template_bitfield = lNg= diff --git a/phpBB/styles/subsilver2/style.cfg b/phpBB/styles/subsilver2/style.cfg index ca81337d17..1d50352885 100644 --- a/phpBB/styles/subsilver2/style.cfg +++ b/phpBB/styles/subsilver2/style.cfg @@ -18,8 +18,8 @@ # General Information about this style name = subsilver2 copyright = © 2005 phpBB Group -style_version = 3.1.0-dev -phpbb_version = 3.1.0-dev +style_version = 3.1.0-a1 +phpbb_version = 3.1.0-a1 # Defining a different template bitfield # template_bitfield = lNg= From a953a65b6c9e657c9c32a30c738a2822bbca3e09 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 14 Oct 2013 12:08:00 +0200 Subject: [PATCH 110/661] [prep-release-3.1.0-a1] Update changelog with 3.1.0-a1 changes --- phpBB/docs/CHANGELOG.html | 722 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 701 insertions(+), 21 deletions(-) diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 2be63eb866..3df124d89f 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -46,6 +46,7 @@
    1. Changelog
        +
      1. Changes since 3.0.x
      2. Changes since 3.0.11
      3. Changes since 3.0.10
      4. Changes since 3.0.9
      5. @@ -86,7 +87,686 @@
        -

        1.i. Changes since 3.0.11

        +

        1.i. Changes since 3.0.x

        + +

        Bug

        +
          +
        • [PHPBB3-4412] - MCP and viewtopic messed up when long profile fields used
        • +
        • [PHPBB3-6109] - MSN is now called Windows Live Messenger (WLM)
        • +
        • [PHPBB3-6855] - The word separator has been misspelled in the code
        • +
        • [PHPBB3-7070] - Making Font Type & Size Easy To modify
        • +
        • [PHPBB3-7252] - Use IMAGETYPE_ constants in get_supported_image_types()
        • +
        • [PHPBB3-7448] - Module management calling non-static method p_master::module_auth()
        • +
        • [PHPBB3-8212] - Comment spelling mistake in includes/acp/acp_board.php
        • +
        • [PHPBB3-8228] - Coding BBcode has whitespace before the code.
        • +
        • [PHPBB3-8542] - No custom profile fields in private messages
        • +
        • [PHPBB3-8641] - Extra and missing comma in acp_board.php
        • +
        • [PHPBB3-8713] - trimming login inputs isn't sensible
        • +
        • [PHPBB3-8841] - Unexpected results when using "PHPBB_USE_BOARD_URL_PATH"
        • +
        • [PHPBB3-8912] - phpbb_styles_template_data contans more than 4k records
        • +
        • [PHPBB3-9022] - Poll Deletion Problem on Global change
        • +
        • [PHPBB3-9163] - style.php cannot be properly cached
        • +
        • [PHPBB3-9341] - Incorrectly named template vars
        • +
        • [PHPBB3-9394] - wrong comment in functions_upload.php
        • +
        • [PHPBB3-9474] - Unnecessary mcp_viewlogs.html included
        • +
        • [PHPBB3-9492] - Group avatar overwrites currently defined user avatars
        • +
        • [PHPBB3-9766] - phpbb_default_captcha::delete_code() takes no argument but uses $confirm_id
        • +
        • [PHPBB3-9918] - $redirect variable set, but not used, in mcp functions
        • +
        • [PHPBB3-10006] - phpbb_config::delete is missing
        • +
        • [PHPBB3-10013] - Cache test writes to a temporary location deep in the source tree
        • +
        • [PHPBB3-10045] - Database updater version for changes between 3.0.x and 3.1.0 should be 3.1.0-dev
        • +
        • [PHPBB3-10070] - CRLF in develop
        • +
        • [PHPBB3-10080] - request_var tests fail when other tests using request_var are executed first
        • +
        • [PHPBB3-10103] - Fix remaining usage of flock() by converting it to use the lock class
        • +
        • [PHPBB3-10136] - Missing $request globalizations in includes/functions.php
        • +
        • [PHPBB3-10139] - Use of $cache for two different things in includes/config/db.php
        • +
        • [PHPBB3-10151] - Version number needs to be updated in installer
        • +
        • [PHPBB3-10152] - Installer places ?> in config.php
        • +
        • [PHPBB3-10156] - Cron tests fail on windows
        • +
        • [PHPBB3-10290] - Who's online broken due to malformed SQL
        • +
        • [PHPBB3-10300] - Groups teampage legends settings
        • +
        • [PHPBB3-10316] - Inconsistency between prosilver and subsilver when locking a topic while moving
        • +
        • [PHPBB3-10322] - No longer possible to include templates via variables, captcha broken
        • +
        • [PHPBB3-10329] - Function pcre_utf8_support() needs the "phpbb_" prefix
        • +
        • [PHPBB3-10350] - class phpbb_template_renderer_eval does not work
        • +
        • [PHPBB3-10355] - Template tests do not correctly end output buffering
        • +
        • [PHPBB3-10359] - Fix phpbb_request regression in download/file.php and style.php
        • +
        • [PHPBB3-10360] - search_results.html gone haywire!
        • +
        • [PHPBB3-10364] - ACP Permissions Roles Tabs Broken
        • +
        • [PHPBB3-10371] - $user->theme['imageset_path'] - doesn't exist anymore
        • +
        • [PHPBB3-10374] - Template cache viewer broken
        • +
        • [PHPBB3-10375] - Template Cache keeps regenerating cache files
        • +
        • [PHPBB3-10378] - Errors in imageset -> theme conversion
        • +
        • [PHPBB3-10380] - Imageset removal: bidi padding change
        • +
        • [PHPBB3-10384] - 1_DAY language variables are not working in templates anymore
        • +
        • [PHPBB3-10392] - Alternate nested block loop syntax broken for auto variables
        • +
        • [PHPBB3-10393] - Syntax error in cached template code
        • +
        • [PHPBB3-10409] - Running database_update.php multiple times breaks the update
        • +
        • [PHPBB3-10417] - phpbb_test_case_helpers::get_test_config() uses array_merge() on undefined $config
        • +
        • [PHPBB3-10444] - Edit reason remains if a post gets edited by a moderator for the second time
        • +
        • [PHPBB3-10457] - Undefined variable $request, when print-viewing PMs
        • +
        • [PHPBB3-10458] - Invalid html when print-viewing a PM
        • +
        • [PHPBB3-10459] - Make "Reply to all"on PMs as a button
        • +
        • [PHPBB3-10463] - Inherit template causes SQL error
        • +
        • [PHPBB3-10464] - Debug error in search settings/search index
        • +
        • [PHPBB3-10477] - Registration, forgot password broken
        • +
        • [PHPBB3-10481] - Test suite does not run on php 5.3
        • +
        • [PHPBB3-10495] - Tests have version checks against php 6.0.0
        • +
        • [PHPBB3-10500] - Miscellaneous issues in the new template engine
        • +
        • [PHPBB3-10541] - Empty "Select form:" dropdown when editing user
        • +
        • [PHPBB3-10547] - Log out instead of acp statistics page at the end of fresh install
        • +
        • [PHPBB3-10560] - Post count not updated to include unapproved posts (though topic count is) for moderators
        • +
        • [PHPBB3-10575] - UCP Register: Non-static method phpbb_captcha_factory::get_instance() should not be called statically
        • +
        • [PHPBB3-10579] - New license block has v2 duplicated
        • +
        • [PHPBB3-10602] - A bug in mail queue processing
        • +
        • [PHPBB3-10618] - Hardcoded phpBB 3.0 language in installer
        • +
        • [PHPBB3-10634] - cp modules: function loaded() only checks current module type
        • +
        • [PHPBB3-10636] - cache_moderators() generates invalid query
        • +
        • [PHPBB3-10637] - Extension manager: missed code changes in search
        • +
        • [PHPBB3-10641] - MCP still uses old plurality forms of language variables
        • +
        • [PHPBB3-10645] - Invalid CSS for checkboxes and radio buttons in ACP css
        • +
        • [PHPBB3-10652] - Template inheritance doesn't work
        • +
        • [PHPBB3-10655] - Bug in test case: phpbb_template_template_inheritance_test
        • +
        • [PHPBB3-10663] - Extension manager: finder class adds directories that should not match the query
        • +
        • [PHPBB3-10667] - Fix extensions and group positions tests under MySQL 5.5 strict mode
        • +
        • [PHPBB3-10671] - Integrity tests failing
        • +
        • [PHPBB3-10672] - Statistics .. Total posts
        • +
        • [PHPBB3-10678] - Provide Firebird, Oracle, and increased MSSQL support in unit tests
        • +
        • [PHPBB3-10685] - Template inheritance test produces a notice on php 5.4 due to an incompatible override of setup_engine
        • +
        • [PHPBB3-10690] - Undefined language string in MCP
        • +
        • [PHPBB3-10703] - extensions.php script dies miserably when ext directory is missing
        • +
        • [PHPBB3-10704] - Typo in a comment
        • +
        • [PHPBB3-10735] - Incorrect styles search order, locator's inability to use template inheritance for extensions
        • +
        • [PHPBB3-10736] - Composer is making tests fail
        • +
        • [PHPBB3-10742] - Tables in users list have incorrect width
        • +
        • [PHPBB3-10752] - acp_styles errors
        • +
        • [PHPBB3-10754] - $style should be renamed to $phpbb_style
        • +
        • [PHPBB3-10756] - Template classes don't belong in style directory
        • +
        • [PHPBB3-10759] - Database updater doesn't reset default style
        • +
        • [PHPBB3-10777] - Typo in viewtopic.php comment line 1632
        • +
        • [PHPBB3-10778] - Extra space on the link "Close Window" in prosilver/template/posting_smilies.html
        • +
        • [PHPBB3-10779] - "Serve jQuery using Google's CDN" Should be on ACP Load Settings, not Board Features
        • +
        • [PHPBB3-10781] - Quick Mod tools don't work
        • +
        • [PHPBB3-10784] - Do not show ajax overlay unless needed
        • +
        • [PHPBB3-10785] - Illegal use of $_REQUEST in develop/fill.php
        • +
        • [PHPBB3-10801] - Move topic in quickmod tools not functional
        • +
        • [PHPBB3-10802] - Splitting topics in quickmod tools not functional
        • +
        • [PHPBB3-10803] - When ajax requests fail, the failure message should remain visible until the user dismisses it
        • +
        • [PHPBB3-10805] - "Request timed out" ui appears over function ui in ajax
        • +
        • [PHPBB3-10807] - Deleting topics via quickmod provides no feedback
        • +
        • [PHPBB3-10808] - Locking topics via quickmod provides no feedback
        • +
        • [PHPBB3-10811] - AJAX callback "alt_text" insufficiently changes links
        • +
        • [PHPBB3-10813] - Installer does not check that php json extension is present
        • +
        • [PHPBB3-10818] - Global Announcements Update Dialog does not terminate with exit_handler()
        • +
        • [PHPBB3-10826] - 3.1-dev Database Updater keeps running group_legend query
        • +
        • [PHPBB3-10837] - Undefined index in extension tests
        • +
        • [PHPBB3-10844] - Extensions are not located when front-end file has a diffferent phpbb_root_path
        • +
        • [PHPBB3-10845] - Reported post text does not get bbcode-parsed when viewing a post report
        • +
        • [PHPBB3-10847] - Dependent is misspelled a number of times
        • +
        • [PHPBB3-10871] - In "Posts awaiting approval" if there's more than one post it shows no posts
        • +
        • [PHPBB3-10875] - SQL Cache is not used
        • +
        • [PHPBB3-10876] - Xampp crashes on Develop when template has too many ORs in an IF statement
        • +
        • [PHPBB3-10885] - UCP Main Error if no forums exist
        • +
        • [PHPBB3-10888] - cachepath in template class is set externally
        • +
        • [PHPBB3-10905] - Last topic title missing in subsilver
        • +
        • [PHPBB3-10906] - Last post title does not work for new installs of 3.1-dev due to missing change to schema_data.sql
        • +
        • [PHPBB3-10912] - Undefined variable: last_post_subject_truncated
        • +
        • [PHPBB3-10915] - Sort not installed styles list in admin control panel - styles
        • +
        • [PHPBB3-10943] - Search Box should display keywords entered by the user
        • +
        • [PHPBB3-10954] - Mark topics as read AJAX
        • +
        • [PHPBB3-10976] - Running tests using phpunit.xml.all fails
        • +
        • [PHPBB3-10982] - Allow setting dimming control overlay also as data-overlay
        • +
        • [PHPBB3-10998] - No border-radius for forum rules block
        • +
        • [PHPBB3-10999] - Asset version not defined in adm/
        • +
        • [PHPBB3-11002] - Etc/GMT timezones return wrong offset
        • +
        • [PHPBB3-11003] - Ability to show full list of timezones with JavaScript enabled
        • +
        • [PHPBB3-11004] - The timezone suggestion button is not a real button
        • +
        • [PHPBB3-11007] - Timezone selector shows all timezones
        • +
        • [PHPBB3-11014] - Previous/next links are no longer displayed.
        • +
        • [PHPBB3-11018] - Pagination in memberlist
        • +
        • [PHPBB3-11023] - Fix excess tabbing and spacing in functions.php
        • +
        • [PHPBB3-11029] - Cannot break/continue 1 level in includes\cache\service.php:340
        • +
        • [PHPBB3-11041] - global $php_ext instead of global $phpEx
        • +
        • [PHPBB3-11043] - Update template hook name
        • +
        • [PHPBB3-11046] - No border-radius for UCP message colours block
        • +
        • [PHPBB3-11047] - Unclosed variable shows incorrect language key
        • +
        • [PHPBB3-11052] - Search class changes not reflected in installer or convertor
        • +
        • [PHPBB3-11065] - li tag on topic display options at MCP is unclosed
        • +
        • [PHPBB3-11067] - Pagination in ACP is missing CSS code from pagination change
        • +
        • [PHPBB3-11077] - Feed still has fallback code for global announcement with forum_id = 0
        • +
        • [PHPBB3-11086] - Database Updater still relies on cache factory - needs to be updated to use DIC
        • +
        • [PHPBB3-11089] - Database type mysql sets unusable board
        • +
        • [PHPBB3-11092] - phpbb_gen_download_links strict standards errors
        • +
        • [PHPBB3-11095] - Jumpbox should use "get" method
        • +
        • [PHPBB3-11099] - Clicking Banning tab in MCP causes all tabs to collapse down
        • +
        • [PHPBB3-11100] - jabber::can_use_ssl() should not be called statically in includes/acp/acp_jabber.php on line 124
        • +
        • [PHPBB3-11101] - Container processors are executed before globals exist
        • +
        • [PHPBB3-11106] - Undefined index: EDITED_TIME_TOTAL
        • +
        • [PHPBB3-11139] - Colour swatch window with Fatal error
        • +
        • [PHPBB3-11140] - MCP Front errors on reported posts
        • +
        • [PHPBB3-11154] - Unable to upgrade 3.0 QI-installed board to 3.1
        • +
        • [PHPBB3-11157] - Strict spam renders spambot countermeasures page unusable
        • +
        • [PHPBB3-11159] - Coding guidelines: static public
        • +
        • [PHPBB3-11166] - AJAX confirm box is not using custom templates given
        • +
        • [PHPBB3-11171] - Copy bbcode fields, etc. for reported posts
        • +
        • [PHPBB3-11176] - Functional tests do not run
        • +
        • [PHPBB3-11177] - Postgres search when query has only negation
        • +
        • [PHPBB3-11187] - Functional tests broken by new config class
        • +
        • [PHPBB3-11188] - postgres search result count does not get the total count
        • +
        • [PHPBB3-11190] - Functional tests do not clear the cache between each test
        • +
        • [PHPBB3-11194] - PHP Notice: Undefined index "tag"
        • +
        • [PHPBB3-11198] - AJAX move up/down links not replaced correctly
        • +
        • [PHPBB3-11199] - Cache purge should remove dumped container
        • +
        • [PHPBB3-11200] - Container construction fails with non-MySQLi drivers
        • +
        • [PHPBB3-11204] - Wrong indentation in functional test case base class
        • +
        • [PHPBB3-11205] - Merge conflict in readme.html
        • +
        • [PHPBB3-11206] - Avatars are broken, includes non-existent files
        • +
        • [PHPBB3-11208] - Functional tests are broken
        • +
        • [PHPBB3-11209] - Always clone Ajax disable images to avoid problems if they are used multiple times on the same page
        • +
        • [PHPBB3-11211] - Call to undefined function phpbb_real_path() in /phpBB/includes/di/extension/ext.php on line 52
        • +
        • [PHPBB3-11212] - Catch non-existent globals if error occurs during container construction
        • +
        • [PHPBB3-11213] - Missing global in install_update.php
        • +
        • [PHPBB3-11227] - @return void -> @return null
        • +
        • [PHPBB3-11236] - Prune users requires group selection if any groups are defined
        • +
        • [PHPBB3-11237] - php spam when pruning users
        • +
        • [PHPBB3-11247] - php spam in flock class
        • +
        • [PHPBB3-11248] - CRLF line endings
        • +
        • [PHPBB3-11253] - Signature module acl is not going to be added to 3.1 boards
        • +
        • [PHPBB3-11256] - Unused service controller.route_collection
        • +
        • [PHPBB3-11257] - Using Service Collection requires set_name() method to exist
        • +
        • [PHPBB3-11263] - PHP Notice: in file functions_messenger.php on line 213: Undefined variable: extension_manager
        • +
        • [PHPBB3-11273] - Missing space after Sphinx "Indexer memory limit" input box
        • +
        • [PHPBB3-11277] - User DST column is not removed on update, and therefor user_timezone is updated everytime the update file is run
        • +
        • [PHPBB3-11279] - "Something went wrong when processing your request." is not acceptable language
        • +
        • [PHPBB3-11291] - "Could not open input file: ../composer.phar" error during phing's create-package
        • +
        • [PHPBB3-11298] - ACP_EXTENSIONS_MANAGEMENT missing string
        • +
        • [PHPBB3-11302] - No timezone is selected by default in registration form
        • +
        • [PHPBB3-11303] - Timezone selection is not preserved in registration form
        • +
        • [PHPBB3-11305] - Installer is broken on develop
        • +
        • [PHPBB3-11309] - phpbb_extension_interface::disable_step correct docblock
        • +
        • [PHPBB3-11310] - CSRF in style installation in acp
        • +
        • [PHPBB3-11311] - Include javascript core.js file in subsilver2 overall_footer.html
        • +
        • [PHPBB3-11313] - Typo in alt_text callback breaks replacement of text
        • +
        • [PHPBB3-11320] - Database test cases fail if functions file is not included and config file exists
        • +
        • [PHPBB3-11321] - Recreate schema files with develop/create_schema_files.php
        • +
        • [PHPBB3-11323] - Not possible to define template variable with other variables
        • +
        • [PHPBB3-11329] - Color values should be in colours.css, not buttons.css
        • +
        • [PHPBB3-11334] - Controller helper url() method still generates URLs like app.php/route/to/page instead of app.php?controller=route/to/page
        • +
        • [PHPBB3-11335] - Hook finder fails to load hooks
        • +
        • [PHPBB3-11342] - Marking subforums as read does not change the unread icons of active topics
        • +
        • [PHPBB3-11344] - ACP_STYLE_COMPONENTS
        • +
        • [PHPBB3-11345] - Font size on new buttons is too thin
        • +
        • [PHPBB3-11350] - $db should not be passed by reference to db_tools
        • +
        • [PHPBB3-11362] - Resource locator does not find admin template files from extensions
        • +
        • [PHPBB3-11363] - Migrations module tool does not load info files from extensions
        • +
        • [PHPBB3-11367] - Migrator throws error if migrations table does not exist
        • +
        • [PHPBB3-11369] - Reverting migration throws error (attempt to unserialize string)
        • +
        • [PHPBB3-11370] - Effectively installed migrations not inserted into migrations table
        • +
        • [PHPBB3-11372] - Migrator should only check if effectively installed if the migration is not installed at all
        • +
        • [PHPBB3-11381] - Finder cannot find items for non-enabled extensions (required during installation)
        • +
        • [PHPBB3-11383] - Uninstalling an extension that adds a module causes an error upon purge
        • +
        • [PHPBB3-11385] - get_module_infos from migrator does not return module info
        • +
        • [PHPBB3-11386] - Migrator can include files multiple times
        • +
        • [PHPBB3-11387] - Module add tool logs module as added even if it fails due to error (migrations)
        • +
        • [PHPBB3-11388] - Extension CSS files are not being auto-loaded
        • +
        • [PHPBB3-11394] - Migration Tools are too strict
        • +
        • [PHPBB3-11395] - acp_modules::get_module_infos can include files multiple times
        • +
        • [PHPBB3-11396] - insert_migration also updates migration (should rename function)
        • +
        • [PHPBB3-11398] - Migrations permission tool's method permission_set causes fatal error
        • +
        • [PHPBB3-11400] - Notification system assumes email is always available
        • +
        • [PHPBB3-11402] - Undefined offset 0 post/topic_in_queue (notifications)
        • +
        • [PHPBB3-11403] - Multiinsert for notifications should use batches
        • +
        • [PHPBB3-11404] - Can not access ACP "manage group" page while creating new groups
        • +
        • [PHPBB3-11405] - Users that are subscribed to a forum, don't receive notifications for new replies
        • +
        • [PHPBB3-11407] - UI notifications have wrong <dfn> info next to checkbox
        • +
        • [PHPBB3-11408] - Undefined index jabber (should be user_jabber)
        • +
        • [PHPBB3-11411] - Broken primary key on phpbb_notification_types table
        • +
        • [PHPBB3-11413] - phpbb_notification_types table should have an integer primary key
        • +
        • [PHPBB3-11415] - Accessing phpbb_migrations table from index page (or other pages)
        • +
        • [PHPBB3-11416] - Primary key on phpbb_notifications table too small
        • +
        • [PHPBB3-11417] - Notification Options page in User Control Panel has "Mark read" as submit button.
        • +
        • [PHPBB3-11420] - Notification methods are not (correctly) imported
        • +
        • [PHPBB3-11421] - Submit button missing from UCP notifications module
        • +
        • [PHPBB3-11422] - Assets should be incremented on database update
        • +
        • [PHPBB3-11423] - Email has HTML from username
        • +
        • [PHPBB3-11433] - Loading alert message is shown beneath overlay
        • +
        • [PHPBB3-11435] - Extension template files curly braces bug
        • +
        • [PHPBB3-11437] - Sphinx debug assert failed when no search results are found
        • +
        • [PHPBB3-11438] - Sphinx default config does not work properly
        • +
        • [PHPBB3-11439] - Notification tests are not run via phpunit.xml.dist
        • +
        • [PHPBB3-11440] - Mixed type (string vs integer) in SQL query against phpbb_users
        • +
        • [PHPBB3-11442] - AJAX in the ACP Does not work wherever Confirm Box modals are used
        • +
        • [PHPBB3-11443] - Two migration tests are not run via phpunit.xml.dist
        • +
        • [PHPBB3-11448] - phpbb_notification_manager::mark_notifications_read takes $user_id as a parameter but isn't using it
        • +
        • [PHPBB3-11450] - phpbb_extension_metadata_manager has wrong docs and too many arguments
        • +
        • [PHPBB3-11451] - class phpbb_notification_method_jabber extends phpbb_notification_method_email
        • +
        • [PHPBB3-11452] - phpbb_notification_method_email::is_available() should return false when user doesn't have an email address
        • +
        • [PHPBB3-11454] - Jabber notifications are not working at all
        • +
        • [PHPBB3-11455] - Sort phpBB/config/tables.yml in alphabetic order
        • +
        • [PHPBB3-11457] - class phpbb_notification_test should not require/use the global set_var() function
        • +
        • [PHPBB3-11460] - New installs have wrong data in phpbb_user_notifications table.
        • +
        • [PHPBB3-11464] - Config table load_cpf_pm is missing on new install
        • +
        • [PHPBB3-11466] - phpunit configs excludes non-existant files
        • +
        • [PHPBB3-11471] - Some email templates contain unrelated text
        • +
        • [PHPBB3-11474] - "Post in queue" notification send to too many moderators
        • +
        • [PHPBB3-11478] - Daylight Savingtime changes old posts in time, too.
        • +
        • [PHPBB3-11479] - Can not access install/index.php?mode=update
        • +
        • [PHPBB3-11485] - migration doesn't add necessary columns to phpbb_styles table when updating schemas.
        • +
        • [PHPBB3-11488] - Notification email error
        • +
        • [PHPBB3-11489] - Change forum list layout to work at any resolution
        • +
        • [PHPBB3-11491] - Functional test for extensions has wrong class name and is in the wrong directory
        • +
        • [PHPBB3-11492] - memberlist user_ids array uninitalized can lead to error
        • +
        • [PHPBB3-11494] - Fix memberlist leaders functional tests
        • +
        • [PHPBB3-11501] - Fix "This test did not perform any assertions" message on some tests
        • +
        • [PHPBB3-11503] - Implementation of DB drivers vary too much
        • +
        • [PHPBB3-11516] - .live() deprecated in new version of jquery
        • +
        • [PHPBB3-11535] - ACP und UCP avatar groups settings do not display an error upon submitting incorrect data
        • +
        • [PHPBB3-11549] - Resource locator does not find admin template files from extensions
        • +
        • [PHPBB3-11550] - Functional extension controller test should use $helpers to copy and remove files
        • +
        • [PHPBB3-11551] - ACP System tab errors: [phpBB Debug] - PHP Notice: in file [ROOT] -/includes/acp/acp_update.php on line 49: Undefined offset: 1
        • +
        • [PHPBB3-11553] - Links list errors
        • +
        • [PHPBB3-11554] - forum_fn.js should be moved to footer
        • +
        • [PHPBB3-11555] - Pagination page selection JS is broken
        • +
        • [PHPBB3-11556] - Remove non-jquery fallback code from forum_fn.js
        • +
        • [PHPBB3-11560] - Missing T_JQUERY_LINK template variable in installer
        • +
        • [PHPBB3-11561] - Notification functional tests fail using phpunit.xml.all
        • +
        • [PHPBB3-11562] - forum_fn.js cleanup
        • +
        • [PHPBB3-11563] - Move subPanels() code from html templates to forum_fn.js
        • +
        • [PHPBB3-11564] - Notifications list errors
        • +
        • [PHPBB3-11567] - Fatal error at database update
        • +
        • [PHPBB3-11569] - Database update fails at continuing on some environments
        • +
        • [PHPBB3-11570] - No way to get back to update routine when in database updater
        • +
        • [PHPBB3-11573] - Test Suite does not work with MySQL STRICT_TRANS_TABLES (MySQL 5.6)
        • +
        • [PHPBB3-11574] - Unable to "auto update" from 3.0 to 3.1
        • +
        • [PHPBB3-11585] - Strict Standars error when editing the role
        • +
        • [PHPBB3-11586] - Fix/cleanup some of upload_attachment()'s code
        • +
        • [PHPBB3-11587] - Group gets removed from legend when editing one in UCP
        • +
        • [PHPBB3-11593] - filter->compile_var_tags uses undefined variable
        • +
        • [PHPBB3-11594] - Template filter not aware of extension context
        • +
        • [PHPBB3-11599] - Tree tests are very slow
        • +
        • [PHPBB3-11602] - Do not call avatar_manager's localize_errors() if avatars are disabled
        • +
        • [PHPBB3-11605] - Order of files and directories given to phpbb_test_case_helpers->remove_files() matters.
        • +
        • [PHPBB3-11622] - Template events are loaded incorrectly
        • +
        • [PHPBB3-11647] - URLs are incorrectly handled by INCLUDEJS
        • +
        • [PHPBB3-11660] - Bootstrap container from config.php bugs
        • +
        • [PHPBB3-11664] - Creating php.html file in root path in tests
        • +
        • [PHPBB3-11665] - Can't change file names already sent to set_filenames
        • +
        • [PHPBB3-11675] - Uncaught exception 'Twig_Error_Syntax' -Permissions User roles-
        • +
        • [PHPBB3-11687] - assets_version is missing in phpbb_config
        • +
        • [PHPBB3-11688] - Cache purge does not purge the twig directory
        • +
        • [PHPBB3-11691] - Soft delete migration conversion should be staggered
        • +
        • [PHPBB3-11692] - Don't update search_type in dev migration if already appended with phpbb_search_
        • +
        • [PHPBB3-11694] - Twig Error on ACP Login page
        • +
        • [PHPBB3-11695] - Cannot edit first post in a topic more than once without manually changing "Options Per User" to 1 on second edit.
        • +
        • [PHPBB3-11696] - phpbb_db_tools does not autoload
        • +
        • [PHPBB3-11697] - fulltext_mysql.php - author_search() uses incorrect $m_approve_fid_ary parameter
        • +
        • [PHPBB3-11701] - TWIG breaks template events for events inside of looped template code
        • +
        • [PHPBB3-11702] - Forumlink gives general error
        • +
        • [PHPBB3-11706] - getimagesize() should be called with @ to prevent PHP warning in remote avatar
        • +
        • [PHPBB3-11707] - Twig DEFINE not working as expected
        • +
        • [PHPBB3-11708] - Invalid bulletin point in notifications
        • +
        • [PHPBB3-11712] - Typo in editor.js
        • +
        • [PHPBB3-11713] - Module gets removed by ajax even if removal was not successful
        • +
        • [PHPBB3-11717] - View unanswered posts = General error
        • +
        • [PHPBB3-11718] - Twig lexer only correcting statements in IF, not ELSEIF
        • +
        • [PHPBB3-11723] - Can not agree to Terms of Service if more than one language is installed
        • +
        • [PHPBB3-11725] - No Avatar image -upload avatar-
        • +
        • [PHPBB3-11727] - INCLUDECSS and INCLUDEJS incorrectly default to /template/ folder
        • +
        • [PHPBB3-11728] - Fix last occurance of topic_approved index
        • +
        • [PHPBB3-11729] - memberlist.php is empty white page
        • +
        • [PHPBB3-11731] - Make calls for captcha garbage collections non-static
        • +
        • [PHPBB3-11733] - Illegal offset type Warning in [ROOT] -/includes/auth/auth.php via [ROOT] -/feed.php
        • +
        • [PHPBB3-11734] - Missing permession in language file
        • +
        • [PHPBB3-11735] - Missing checkbox in User Control Panel / Manage notifications
        • +
        • [PHPBB3-11739] - Wrong name for UCP Module "Edit "Remember Me" login keys"
        • +
        • [PHPBB3-11741] - Brackets exist even without any text
        • +
        • [PHPBB3-11751] - MCP Softdelete Modules missing when updating board
        • +
        • [PHPBB3-11754] - Remove leftovers of style switcher
        • +
        • [PHPBB3-11755] - MySQL Upgrader out of date for 3.1
        • +
        • [PHPBB3-11757] - Typo in signature_module_auth migration
        • +
        • [PHPBB3-11759] - Migrations update to the wrong 3.0.x version numbers.
        • +
        • [PHPBB3-11761] - Example.org no longer serves blank responses, failing functional tests
        • +
        • [PHPBB3-11763] - Debug and SQL Error when reporting a PM
        • +
        • [PHPBB3-11767] - Unable to update DB from 3.0.X to 3.1.X because of post_visibility
        • +
        • [PHPBB3-11770] - Invalid class for pm list in outbox/sentbox
        • +
        • [PHPBB3-11774] - PHP errors on viewing reported post details
        • +
        • [PHPBB3-11777] - Extension template events are not loaded from subdirectories
        • +
        • [PHPBB3-11779] - Invalid class for unapproved posts in mcp index
        • +
        • [PHPBB3-11780] - Remove unused images from prosilver
        • +
        • [PHPBB3-11781] - update_post_information() is not defined in phpbb_content_visibility->set_post_visibility
        • +
        • [PHPBB3-11782] - Notices inside posts look messy
        • +
        • [PHPBB3-11791] - Template events are not loaded in ACP
        • +
        • [PHPBB3-11792] - core.user_setup event doesn't support loading language files from extensions
        • +
        • [PHPBB3-11796] - Duplicate code for pagination
        • +
        • [PHPBB3-11800] - Incorrect inclusion of scripts in popup window
        • +
        • [PHPBB3-11804] - </li> tag at overall_header.html (prosilver) which was not open
        • +
        • [PHPBB3-11805] - pagination does not support controller_helper urls
        • +
        • [PHPBB3-11809] - core.js should be loaded directly after jQuery and after every other JS file
        • +
        • [PHPBB3-11811] - Chrome 30 adds outline to focused elements
        • +
        • [PHPBB3-11812] - No longer able to define empty template variable using DEFINE
        • +
        • [PHPBB3-11816] - Twig regression: parentheses in IF statements stop DEFINE variables and loop lengths from working
        • +
        • [PHPBB3-11822] - Template include asset doesn't follow namespace lookup order
        • +
        • [PHPBB3-11824] - Controller URLs do not work anymore
        • +
        • [PHPBB3-11825] - phpBB/phpbb/ should only contain classes
        • +
        • [PHPBB3-11828] - Twig DEFINE is causing errors
        • +
        • [PHPBB3-11832] - URLs in tests aren't shortened, triggering errors in Composer files
        • +
        • [PHPBB3-11833] - Twig error while viewing user notes
        • +
        • [PHPBB3-11835] - phpbb_db_migration_data_310_auth_provider_oauth: A required module does not exist: UCP_AUTH_LINK
        • +
        • [PHPBB3-11836] - Manage external account associations error
        • +
        • [PHPBB3-11837] - UCP_AUTH_LINK_NOT_SUPPORTED (untranslated)
        • +
        • [PHPBB3-11843] - Regression: using underscores in template DEFINE variables yields unexpected behavior
        • +
        • [PHPBB3-11846] - Empty paragraph elements in jumpbox.html
        • +
        • [PHPBB3-11850] - $user->page contains bogus data on controller (app.php) pages
        • +
        • [PHPBB3-11852] - filesystem class must not depend on a web request
        • +
        • [PHPBB3-11862] - Events core.delete_user_before and core.delete_user_after compact the wrong vars
        • +
        • [PHPBB3-11865] - includes/bbcode.php is missing namespace change
        • +
        • [PHPBB3-11866] - "You have specified an invalid dbms driver" Error with config sample
        • +
        • [PHPBB3-11867] - Schema files are not created by create_schema_files.php
        • +
        • [PHPBB3-11868] - Class 'phpbb_request_interface' not found
        • +
        • [PHPBB3-11871] - Extension modules are not working with namespaces anymore
        • +
        • [PHPBB3-11874] - RSS Feed -Bug Url-
        • +
        • [PHPBB3-11878] - Missing leading \ in dependencies in soft_delete_mcp_modules
        • +
        • [PHPBB3-11882] - Incorrect dependency in signature module auth migration
        • +
        • [PHPBB3-11888] - On New installation the default search backend is not shown correctly.
        • +
        • [PHPBB3-11890] - Language key used when soft-deleting in MCP.
        • +
        • [PHPBB3-11892] - Undefined variable: to_forum_id after cancelling merge topic/move posts
        • +
        • [PHPBB3-11893] - Font size in "Edit 'Remember Me' login keys" is large
        • +
        • [PHPBB3-11895] - Forum feed stopped working
        • +
        • [PHPBB3-11898] - Unable to login to ACP on AREA51
        • +
        • [PHPBB3-11901] - Undefined offset: 3 in file [ROOT] -/includes/functions_content.php on line 776
        • +
        • [PHPBB3-11905] - Alpha 1 Migration
        • +
        • [PHPBB3-11906] - Missing database entries "read_notification"
        • +
        • [PHPBB3-11908] - class phpbb_auth_provider_oauth_service_exception not using namespaces
        • +
        +

        Improvement

        +
          +
        • [PHPBB3-7598] - Reminding inactive users
        • +
        • [PHPBB3-7938] - Display information about unread and new PMs in the header.
        • +
        • [PHPBB3-8065] - Add an option to lock topics while moving them.
        • +
        • [PHPBB3-8270] - Automatically loaded language-files for mods
        • +
        • [PHPBB3-8796] - Mark forum(s) read (or mark topics read) marks some topics you haven't read
        • +
        • [PHPBB3-9346] - Use different message template for jabber notification
        • +
        • [PHPBB3-9532] - Optimized Page Titles
        • +
        • [PHPBB3-9549] - Enhance teampage functionality
        • +
        • [PHPBB3-9596] - Modular cron and allowing cron tasks to be run from system cron
        • +
        • [PHPBB3-9608] - Cleanse object references from codebase for 3.1
        • +
        • [PHPBB3-9649] - Moderator queue does not display icon if the new post is made in old thread
        • +
        • [PHPBB3-9668] - Automatic UTF-8 normalization
        • +
        • [PHPBB3-9669] - Native UTF-8 normalization
        • +
        • [PHPBB3-9684] - Link global announcements to forums
        • +
        • [PHPBB3-9693] - generate_smilies clean up
        • +
        • [PHPBB3-9716] - Handle user input through a request class providing a more complete mechanism than request_var
        • +
        • [PHPBB3-9741] - Do not store any themes or templates in the database
        • +
        • [PHPBB3-9746] - Normalise internet protocol version 6 addresses
        • +
        • [PHPBB3-9792] - Move function definitions out of download/file.php
        • +
        • [PHPBB3-9823] - Move functions definitions out of adm/index.php
        • +
        • [PHPBB3-9979] - Autoloading for test suite
        • +
        • [PHPBB3-10001] - Class Based Forum/Topic Image
        • +
        • [PHPBB3-10076] - STARTTLS for emails
        • +
        • [PHPBB3-10143] - Delete-write-read test for config classes
        • +
        • [PHPBB3-10148] - Turn TEMPLATE_BITFIELD into an instance variable in acp_styles.php
        • +
        • [PHPBB3-10155] - Inclusion of jQuery
        • +
        • [PHPBB3-10161] - Use one of "email" or "e-mail"
        • +
        • [PHPBB3-10172] - Display empty birthday box in prosilver when birthdays are enabled but there are none today
        • +
        • [PHPBB3-10258] - Use HTML5 doctype
        • +
        • [PHPBB3-10271] - confirm_box operations should use AJAX
        • +
        • [PHPBB3-10272] - Simple operations should use AJAX
        • +
        • [PHPBB3-10273] - Accepting / denying posts should use AJAX
        • +
        • [PHPBB3-10281] - Reordering forums in the ACP should use AJAX
        • +
        • [PHPBB3-10312] - Un-check "Leave shadow topic in place" checkbox when moving topics
        • +
        • [PHPBB3-10325] - Ability to disable the "I forgot my password" feature
        • +
        • [PHPBB3-10336] - Removing imagesets in 3.1
        • +
        • [PHPBB3-10344] - Add attachment icons to list of reports and queue
        • +
        • [PHPBB3-10362] - HTML5 Fix - "name" attribute is deprecated in anchors. Use "id" attribute instead.
        • +
        • [PHPBB3-10383] - Polls should use AJAX
        • +
        • [PHPBB3-10387] - generate_pagination() should export the current page number as a template variable
        • +
        • [PHPBB3-10390] - Add an ACP option to use jQuery via local copy or remote CDN
        • +
        • [PHPBB3-10410] - Add option to display users in their first teampage group
        • +
        • [PHPBB3-10412] - Use memory_get_peak_usage for debug output instead of memory_get_usage
        • +
        • [PHPBB3-10431] - Remove language from the button-graphics and use text strings instead
        • +
        • [PHPBB3-10438] - Alligning the Smileys on the same line as the text.
        • +
        • [PHPBB3-10484] - Use variables for sql_build_query() calls, so mods/extensions can extend the arrays
        • +
        • [PHPBB3-10510] - Quick-mod markup should be in the template
        • +
        • [PHPBB3-10524] - Wrong version code name in Ascraeus coding guidelines document.
        • +
        • [PHPBB3-10535] - Remove "Confirm Email Address" field from registration form
        • +
        • [PHPBB3-10557] - Missing IN_PHPBB check in phpBB/includes/functions_acp.php
        • +
        • [PHPBB3-10601] - Move inbox to top module in UCP Private Messages Tab
        • +
        • [PHPBB3-10614] - Script to manage extensions
        • +
        • [PHPBB3-10617] - prosilver clean up: adding proper css reset
        • +
        • [PHPBB3-10619] - prosilver clean up: removing duplicate colors
        • +
        • [PHPBB3-10632] - Merging style components
        • +
        • [PHPBB3-10640] - Bigger Topic Title Length
        • +
        • [PHPBB3-10650] - Last Topic Title on Forum list
        • +
        • [PHPBB3-10659] - Allow all administrators to purge cache
        • +
        • [PHPBB3-10665] - INCLUDEJS template tag
        • +
        • [PHPBB3-10679] - Add new permission for changing profile field information
        • +
        • [PHPBB3-10705] - Replace WARNINGS_ZERO_TOTAL with NO_WARNINGS for consistency
        • +
        • [PHPBB3-10714] - Create a class for add_log() and unit tests
        • +
        • [PHPBB3-10726] - Preview from Quick Reply
        • +
        • [PHPBB3-10727] - Don't hide quickreply with javascript
        • +
        • [PHPBB3-10733] - Adding file locator function to style class
        • +
        • [PHPBB3-10734] - CSS3 rounded corners
        • +
        • [PHPBB3-10741] - Automatically resize textarea
        • +
        • [PHPBB3-10743] - Change theme to style in php code
        • +
        • [PHPBB3-10762] - Separate style and phpBB version numbers in style.cfg
        • +
        • [PHPBB3-10771] - Using Remember Me instead of autologin or persistent keys in the UI.
        • +
        • [PHPBB3-10780] - Move colons from template files to language files
        • +
        • [PHPBB3-10783] - assets_version config var appended to assets (css/js) URLs to prevent caching
        • +
        • [PHPBB3-10786] - Render search options by default on memberlist.php
        • +
        • [PHPBB3-10799] - includejs should not put phpbb root path in generated template code
        • +
        • [PHPBB3-10800] - includejs test confusingly includes an html file
        • +
        • [PHPBB3-10864] - Allow extensions to be accessed via controller with shorter access name than "vendor/extname"
        • +
        • [PHPBB3-10933] - Make style code more understandable
        • +
        • [PHPBB3-10936] - MySQL fulltext search improvement - removing check for PCRE UTF support
        • +
        • [PHPBB3-10938] - Display subforum listing on forumlist via template loop instead of PHP implode()
        • +
        • [PHPBB3-10947] - Quickmod tools have stopped autosubmitting
        • +
        • [PHPBB3-10955] - ajaxify should take options as the only argument
        • +
        • [PHPBB3-10966] - Remove code duplication from mysql* and mssql* dbal
        • +
        • [PHPBB3-10968] - Render pagination fully within the template
        • +
        • [PHPBB3-10970] - Allow INCLUDE template macros to accept paths of the form {FOO}/a/{BAR}/c
        • +
        • [PHPBB3-10972] - Add a new method to phpbb_functional_test_case to allow a new user to be created
        • +
        • [PHPBB3-10973] - Allow mocks to be autoloaded in tests
        • +
        • [PHPBB3-10975] - Memberlist functional tests
        • +
        • [PHPBB3-10990] - $user->lang['COMMA_SEPARATOR'] - is not uniformly used
        • +
        • [PHPBB3-11001] - html5 Placeholder for search box.
        • +
        • [PHPBB3-11008] - Get rid of eval in javascript
        • +
        • [PHPBB3-11010] - HTML5 input types for form fields
        • +
        • [PHPBB3-11011] - Using dependency injection for global variables in all search backends.
        • +
        • [PHPBB3-11012] - Member variable phpEx vs php_ext naming inconstistency
        • +
        • [PHPBB3-11013] - Allow arrays to be assigned and retrieved in templates
        • +
        • [PHPBB3-11015] - Make DBAL classes autoloadable
        • +
        • [PHPBB3-11021] - Link back to main site config setting
        • +
        • [PHPBB3-11025] - Make Last topic title in forum list Bold
        • +
        • [PHPBB3-11032] - Better error reporting for sphinx
        • +
        • [PHPBB3-11037] - Cache drivers require globals
        • +
        • [PHPBB3-11044] - Compress class should keep track of files added and deal with conflicts
        • +
        • [PHPBB3-11048] - Use access specifiers in search backends
        • +
        • [PHPBB3-11050] - Add docblocks missing in properties and methods in all search backends.
        • +
        • [PHPBB3-11051] - Add retrieval functions for all public properties in search backends
        • +
        • [PHPBB3-11068] - Hiding foes posts should use JS to display them, rather then reloading the whole page
        • +
        • [PHPBB3-11070] - Redundant background-position property in Prosilver button CSS?
        • +
        • [PHPBB3-11082] - Redis cache driver should not have executable permission
        • +
        • [PHPBB3-11083] - Abstract cache drivers should use abstract keyword
        • +
        • [PHPBB3-11088] - Combine Style and Extension Management into one Customisations tab in the ACP
        • +
        • [PHPBB3-11116] - Adjust Display of Warning/Error Messages in Extensions Controller
        • +
        • [PHPBB3-11129] - Misleading subscription state messages
        • +
        • [PHPBB3-11152] - Create cached, compiled container class rather than compiling it on every page load
        • +
        • [PHPBB3-11156] - Delete "Misc" tab of forum based permissions + move items
        • +
        • [PHPBB3-11174] - Unit tests for search backends
        • +
        • [PHPBB3-11181] - Bump PHP requirement to 5.3.3
        • +
        • [PHPBB3-11183] - Remove $load_extensions and weird dl() calls
        • +
        • [PHPBB3-11189] - Merge DEBUG and DEBUG_EXTRA
        • +
        • [PHPBB3-11193] - Generalize phpbb_di_pass_collection_pass to handle all collections using service tags
        • +
        • [PHPBB3-11197] - Prefix the css classes for the small arrow with "arrow".
        • +
        • [PHPBB3-11202] - Add response status checks to functional tests
        • +
        • [PHPBB3-11215] - Separate root path for filesystem and urls/assets
        • +
        • [PHPBB3-11217] - Prefix for template values to give back value URL encoded
        • +
        • [PHPBB3-11238] - Specify goutte version
        • +
        • [PHPBB3-11250] - Remake the unit tests for the BBCode parser.
        • +
        • [PHPBB3-11259] - Make $phpbb_admin_path available everywhere
        • +
        • [PHPBB3-11268] - Delete phpbb_db_driver_mysql4 case
        • +
        • [PHPBB3-11275] - editor.js::colorPalette() breaks page with document.write > add proper target
        • +
        • [PHPBB3-11283] - Extensions as symlinks
        • +
        • [PHPBB3-11294] - Update extension list in running tests doc
        • +
        • [PHPBB3-11306] - Container should be created by a phpbb_create_default_container() function
        • +
        • [PHPBB3-11314] - Improve readability and code cleanup in new JavaScript files
        • +
        • [PHPBB3-11328] - New language variables for buttons
        • +
        • [PHPBB3-11373] - Notifications - Purge old with cron
        • +
        • [PHPBB3-11390] - Remove pagination from ucp_notifications.html when list is empty.
        • +
        • [PHPBB3-11393] - Give more information on database_updater about what exactly happened
        • +
        • [PHPBB3-11409] - No feedback provided when updating group position settings in ACP
        • +
        • [PHPBB3-11458] - Automatically add extension permission language files
        • +
        • [PHPBB3-11461] - [Template Event] - viewtopic_body_footer
        • +
        • [PHPBB3-11463] - Add topic title attribute in search results
        • +
        • [PHPBB3-11477] - Allow customisation of "Board index"
        • +
        • [PHPBB3-11482] - Extend syntax for DEFINE tag
        • +
        • [PHPBB3-11495] - Add nested sets implementation to phpBB core
        • +
        • [PHPBB3-11519] - Rename test event template file
        • +
        • [PHPBB3-11533] - Notification settings page is using topiclist class incorrectly
        • +
        • [PHPBB3-11557] - Allow to use tab when typing code and keep indentation
        • +
        • [PHPBB3-11558] - Notifications link in header should not include [ and ] -
        • +
        • [PHPBB3-11577] - Topiclist/Forumlist Needs tweaking after PR 1331
        • +
        • [PHPBB3-11582] - Split permission logic from translations
        • +
        • [PHPBB3-11600] - Increase code test coverage of avatar manager
        • +
        • [PHPBB3-11606] - make_clickable() in includes/functions_content.php uses deprecated preg_replace() /e modifier (PREG_REPLACE_EVAL)
        • +
        • [PHPBB3-11615] - Partial refactoring of session tests
        • +
        • [PHPBB3-11620] - Improve session test coverage
        • +
        • [PHPBB3-11621] - Improve MySQL fulltext search indexes
        • +
        • [PHPBB3-11651] - Bootstrap container from config.php
        • +
        • [PHPBB3-11667] - phpbb_template_twig_node_includeasset should be abstract
        • +
        • [PHPBB3-11669] - Fix PHP bug #55124 (/./ in recursive mkdirs)
        • +
        • [PHPBB3-11684] - No utility to time-wasting user login confirmation message/screen
        • +
        • [PHPBB3-11685] - No utility to time-wasting user logout confirmation message/screen
        • +
        • [PHPBB3-11700] - Use namespaces rather than prefixes for class names
        • +
        • [PHPBB3-11703] - Make "Serve jQuery using Google’s CDN" generic
        • +
        • [PHPBB3-11724] - Support "ELSE IF" and "ELSEIF" in the same way
        • +
        • [PHPBB3-11744] - Group join request notification
        • +
        • [PHPBB3-11745] - Group join approved notification
        • +
        • [PHPBB3-11747] - UCP Prefs Core and Template Events
        • +
        • [PHPBB3-11749] - PHP and Template Event Requests for Topic Preview Extension
        • +
        • [PHPBB3-11784] - Remove naming redundancy for event listeners
        • +
        • [PHPBB3-11786] - Fix various defects in PHPDoc in-code documentation
        • +
        • [PHPBB3-11795] - Move all JavaScript from HTML code to external files
        • +
        • [PHPBB3-11813] - Mock authentication provider should implement base provider class
        • +
        • [PHPBB3-11831] - Update fabpot/goutte to 1.0.*
        • +
        +

        New Feature

        + +

        Sub-task

        +
          +
        • [PHPBB3-9556] - Drop php closing tags
        • +
        • [PHPBB3-9574] - Drop fallback implementations
        • +
        • [PHPBB3-9688] - update_session API
        • +
        • [PHPBB3-9738] - Make installer and updater use migrations
        • +
        • [PHPBB3-9797] - Adjust existing access to superglobals
        • +
        • [PHPBB3-10817] - Use valid composer.json instead of non-standard extension.json
        • +
        • [PHPBB3-10992] - Use updated Goutte in Fileupload tests
        • +
        • [PHPBB3-11109] - Create a separate set of compress tests for the develop branch
        • +
        • [PHPBB3-11243] - Topics with attachments only show "download all attachments" links on pages containing attachments.
        • +
        • [PHPBB3-11318] - Extensions use migrations
        • +
        • [PHPBB3-11351] - Add appropriate language strings for errors
        • +
        • [PHPBB3-11531] - Add functional tests for new avatar system
        • +
        • [PHPBB3-11637] - generate_text_for_display on search.php
        • +
        • [PHPBB3-11638] - generate_text_for_display on viewtopic.php
        • +
        • [PHPBB3-11639] - generate_text_for_display on includes/functions_posting.php
        • +
        • [PHPBB3-11640] - generate_text_for_display on includes/functions_privmsgs.php
        • +
        • [PHPBB3-11641] - generate_text_for_display on includes/mcp/mcp_pm_reports.php
        • +
        • [PHPBB3-11642] - generate_text_for_display on includes/mcp/mcp_post.php
        • +
        • [PHPBB3-11643] - generate_text_for_display on includes/mcp/mcp_queue.php
        • +
        • [PHPBB3-11653] - generate_text_for_display on includes/mcp/mcp_topic.php
        • +
        • [PHPBB3-11654] - generate_text_for_display on includes/mcp/mcp_warn.php
        • +
        • [PHPBB3-11655] - generate_text_for_display on includes/ucp/ucp_pm_viewmessage.php
        • +
        • [PHPBB3-11656] - generate_text_for_display on memberlist.php
        • +
        +

        Task

        +
          +
        • [PHPBB3-7090] - Update minimum PHP version to 5.2
        • +
        • [PHPBB3-9557] - Update coding guidelines for 3.1 and PHP >= 5.2
        • +
        • [PHPBB3-9682] - Add a class loader for auto loading and define naming rules for new phpbb classes
        • +
        • [PHPBB3-9783] - Restore subsilver2
        • +
        • [PHPBB3-9867] - Adjust the implementation of error messages localization
        • +
        • [PHPBB3-9983] - Restructure ACM classes
        • +
        • [PHPBB3-9988] - Replace config with an instance of a class implementing ArrayAccess
        • +
        • [PHPBB3-10091] - Bump minimum required postgresql version for 3.1
        • +
        • [PHPBB3-10173] - Move birthday list logic into templates
        • +
        • [PHPBB3-10202] - Provide a mechanism to manually retrieve long configuration options from a TEXT column
        • +
        • [PHPBB3-10260] - Remove prosilver styleswitcher
        • +
        • [PHPBB3-10314] - Whitelist all files in includes for code coverage reports
        • +
        • [PHPBB3-10389] - JSON extension should be checked in the installer
        • +
        • [PHPBB3-10414] - Functional testing
        • +
        • [PHPBB3-10467] - Check extensions diff for classes/constants not existing in php 5.2
        • +
        • [PHPBB3-10609] - Prefix phpBB functions with phpbb_ to prevent compatibility issues with other software
        • +
        • [PHPBB3-10670] - Require PHP 5.3 at minimum for phpBB 3.1
        • +
        • [PHPBB3-10680] - Add ext/ to .gitignore
        • +
        • [PHPBB3-10688] - Change 3.0 language to 3.1
        • +
        • [PHPBB3-10693] - Change minimum PHP version for Ascraeus to 5.3.2
        • +
        • [PHPBB3-10719] - Remove second 5.2 test suite on ascreaus
        • +
        • [PHPBB3-10732] - Add config_dev.php and config_test.php to .gitignore
        • +
        • [PHPBB3-10855] - Coding guideline change - have curly brackets on same line in JS
        • +
        • [PHPBB3-10869] - Remove PHP 5.2 check from .travis.yml
        • +
        • [PHPBB3-10877] - Have bamboo generate and publish a phpBB package for every build.
        • +
        • [PHPBB3-10882] - Expand test coverage for template engine - add tests for invalid constructs
        • +
        • [PHPBB3-10893] - Update the Usage of Composer
        • +
        • [PHPBB3-10909] - Update Travis Test Configuration: Travis no longer supports PHP 5.3.2
        • +
        • [PHPBB3-10932] - Store composer.phar in the phpBB repository to make sure a working version is always available
        • +
        • [PHPBB3-10939] - Modify the phpbb_request class to handle the $_FILES superglobal as well
        • +
        • [PHPBB3-10941] - Write tests for includes/functions_upload.php
        • +
        • [PHPBB3-10944] - Allow INCLUDEJS to include javascript from the assets directory
        • +
        • [PHPBB3-10949] - 3.1 AJAX code should use new coding guidelines
        • +
        • [PHPBB3-10963] - Use fileinfo in filespec::is_image() instead of trusting the mimetype sent by the browser
        • +
        • [PHPBB3-10969] - Remove remove_comments() and remove_remarks()
        • +
        • [PHPBB3-10993] - Update README to use composer.phar from the repository
        • +
        • [PHPBB3-10994] - Revert changes in PHPBB3-10963
        • +
        • [PHPBB3-11054] - Improper @var documentation syntax in includes/extension/controller.php
        • +
        • [PHPBB3-11061] - Fix README composer instructions
        • +
        • [PHPBB3-11195] - Put conditional opening brace on its own line, as per guidelines
        • +
        • [PHPBB3-11225] - Delete subsilver2 mcp_jumpbox.html
        • +
        • [PHPBB3-11287] - Add Template Event naming guidelines to docs/coding-guidelines.html
        • +
        • [PHPBB3-11338] - Enable Redis tests on Travis
        • +
        • [PHPBB3-11441] - Refactor phpbb_user_loader tests
        • +
        • [PHPBB3-11476] - Remove pass-by-reference from phpbb_db_driver::sql_multi_insert
        • +
        • [PHPBB3-11481] - Feed classes are currently all in feed.php
        • +
        • [PHPBB3-11698] - Move all autoloadable files to phpbb/ rather than includes/
        • +
        • [PHPBB3-11722] - Remove reference assignment for $captcha in report.php
        • +
        • [PHPBB3-11760] - 3.0.x Migration should use the phpbb_version_compare() wrapper.
        • +
        • [PHPBB3-11818] - Upgrade Symfony to 2.3 LTS
        • +
        • [PHPBB3-11870] - No longer exclude ./phpBB/phpbb/search/fulltext_*.php from code coverage
        • +
        • [PHPBB3-11885] - Add migrations for 3.0.12-RCx and 3.0.12
        • +
        • [PHPBB3-11913] - Apply reorganisation of download.phpbb.com to build_announcement.php
        • +
        + +

        1.ii. Changes since 3.0.11

        Bug

          @@ -241,7 +921,7 @@
        • [PHPBB3-11753] - Upgrade mysql_upgrader.php schema data.
        -

        1.ii. Changes since 3.0.10

        +

        1.iii. Changes since 3.0.10

        Bug

          @@ -366,7 +1046,7 @@
        • [PHPBB3-10909] - Update Travis Test Configuration: Travis no longer supports PHP 5.3.2
        -

        1.iii. Changes since 3.0.9

        +

        1.iv. Changes since 3.0.9

        Bug

          @@ -502,7 +1182,7 @@
        • [PHPBB3-10480] - Automate changelog building
        -

        1.iv. Changes since 3.0.8

        +

        1.v. Changes since 3.0.8

        Bug

        @@ -870,7 +1550,7 @@ -

        1.v. Changes since 3.0.7-PL1

        +

        1.vi. Changes since 3.0.7-PL1

        Security

          @@ -1328,13 +2008,13 @@
        -

        1.vi. Changes since 3.0.7

        +

        1.vii. Changes since 3.0.7

        • [Sec] Do not expose forum content of forums with ACL entries but no actual permission in ATOM Feeds. (Bug #58595)
        -

        1.vii. Changes since 3.0.6

        +

        1.viii. Changes since 3.0.6

        • [Fix] Allow ban reason and length to be selected and copied in ACP and subsilver2 MCP. (Bug #51095)
        • @@ -1438,7 +2118,7 @@
        -

        1.viii. Changes since 3.0.5

        +

        1.ix. Changes since 3.0.5

        • [Fix] Allow whitespaces in avatar gallery names. (Bug #44955)
        • @@ -1660,7 +2340,7 @@
        • [Feature] Send anonymous statistical information to phpBB on installation and update (optional).
        -

        1.ix. Changes since 3.0.4

        +

        1.x. Changes since 3.0.4

        • [Fix] Delete user entry from ban list table upon user deletion (Bug #40015 - Patch by TerraFrost)
        • @@ -1749,7 +2429,7 @@
        • [Sec] Only use forum id supplied for posting if global announcement detected. (Reported by nickvergessen)
        -

        1.x. Changes since 3.0.3

        +

        1.xi. Changes since 3.0.3

        • [Fix] Allow mixed-case template directories to be inherited (Bug #36725)
        • @@ -1781,7 +2461,7 @@
        • [Sec] Ask for forum password if post within passworded forum quoted in private message. (Reported by nickvergessen)
        -

        1.xi. Changes since 3.0.2

        +

        1.xii. Changes since 3.0.2

        • [Fix] Correctly set topic starter if first post in topic removed (Bug #30575 - Patch by blueray2048)
        • @@ -1880,7 +2560,7 @@
        • [Sec Precaution] Stricter validation of the HTTP_HOST header (Thanks to Techie-Micheal et al for pointing out possible issues in derived code)
        -

        1.xii. Changes since 3.0.1

        +

        1.xiii. Changes since 3.0.1

        • [Fix] Ability to set permissions on non-mysql dbms (Bug #24955)
        • @@ -1928,7 +2608,7 @@
        • [Sec] Only allow urls gone through redirect() being used within login_box(). (thanks nookieman)
        -

        1.xiii Changes since 3.0.0

        +

        1.xiv Changes since 3.0.0

        • [Change] Validate birthdays (Bug #15004)
        • @@ -1999,7 +2679,7 @@
        • [Fix] Find and display colliding usernames correctly when converting from one database to another (Bug #23925)
        -

        1.xiv. Changes since 3.0.RC8

        +

        1.xv. Changes since 3.0.RC8

        • [Fix] Cleaned usernames contain only single spaces, so "a_name" and "a__name" are treated as the same name (Bug #15634)
        • @@ -2008,7 +2688,7 @@
        • [Fix] Call garbage_collection() within database updater to correctly close connections (affects Oracle for example)
        -

        1.xv. Changes since 3.0.RC7

        +

        1.xvi. Changes since 3.0.RC7

        • [Fix] Fixed MSSQL related bug in the update system
        • @@ -2043,7 +2723,7 @@
        • [Fix] No duplication of active topics (Bug #15474)
        -

        1.xvi. Changes since 3.0.RC6

        +

        1.xvii. Changes since 3.0.RC6

        • [Fix] Submitting language changes using acp_language (Bug #14736)
        • @@ -2053,7 +2733,7 @@
        • [Fix] Able to request new password (Bug #14743)
        -

        1.xvii. Changes since 3.0.RC5

        +

        1.xviii. Changes since 3.0.RC5

        • [Feature] Removing constant PHPBB_EMBEDDED in favor of using an exit_handler(); the constant was meant to achive this more or less.
        • @@ -2116,7 +2796,7 @@
        • [Sec] New password hashing mechanism for storing passwords (#i42)
        -

        1.xviii. Changes since 3.0.RC4

        +

        1.xix. Changes since 3.0.RC4

        • [Fix] MySQL, PostgreSQL and SQLite related database fixes (Bug #13862)
        • @@ -2167,7 +2847,7 @@
        • [Fix] odbc_autocommit causing existing result sets to be dropped (Bug #14182)
        -

        1.xix. Changes since 3.0.RC3

        +

        1.xx. Changes since 3.0.RC3

        • [Fix] Fixing some subsilver2 and prosilver style issues
        • @@ -2276,7 +2956,7 @@
        -

        1.xx. Changes since 3.0.RC2

        +

        1.xxi. Changes since 3.0.RC2

        • [Fix] Re-allow searching within the memberlist
        • @@ -2322,7 +3002,7 @@
        -

        1.xxi. Changes since 3.0.RC1

        +

        1.xxii. Changes since 3.0.RC1

        • [Fix] (X)HTML issues within the templates (Bug #11255, #11255)
        • From 7a46976a785bd2a89004ecdce69662b2ece2ed4d Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 14 Oct 2013 12:21:54 +0200 Subject: [PATCH 111/661] [prep-release-3.1.0-a1] Only build packages for the latest olympus versions --- build/build.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/build.xml b/build/build.xml index 4b8fc0e18f..82bb979a02 100644 --- a/build/build.xml +++ b/build/build.xml @@ -4,7 +4,7 @@ - + From 76ddf1ca4143f38f3bf8fc6aabdb3fa302d6ed40 Mon Sep 17 00:00:00 2001 From: Patrick Webster Date: Mon, 14 Oct 2013 16:37:23 -0500 Subject: [PATCH 112/661] [ticket/11918] Make sql_freeresult() consistent across all DB drivers PHPBB3-11918 --- phpBB/phpbb/db/driver/firebird.php | 2 +- phpBB/phpbb/db/driver/mssql.php | 6 +++--- phpBB/phpbb/db/driver/mssql_odbc.php | 2 +- phpBB/phpbb/db/driver/mssqlnative.php | 3 ++- phpBB/phpbb/db/driver/mysql.php | 2 +- phpBB/phpbb/db/driver/oracle.php | 2 +- phpBB/phpbb/db/driver/postgres.php | 2 +- phpBB/phpbb/db/driver/sqlite.php | 2 +- 8 files changed, 11 insertions(+), 10 deletions(-) diff --git a/phpBB/phpbb/db/driver/firebird.php b/phpBB/phpbb/db/driver/firebird.php index 2df5eaf369..aef75eab15 100644 --- a/phpBB/phpbb/db/driver/firebird.php +++ b/phpBB/phpbb/db/driver/firebird.php @@ -398,7 +398,7 @@ class firebird extends \phpbb\db\driver\driver $query_id = $this->query_result; } - if ($cache && $cache->sql_exists($query_id)) + if ($cache && !is_object($query_id) && $cache->sql_exists($query_id)) { return $cache->sql_freeresult($query_id); } diff --git a/phpBB/phpbb/db/driver/mssql.php b/phpBB/phpbb/db/driver/mssql.php index 4d2cd287da..50096deded 100644 --- a/phpBB/phpbb/db/driver/mssql.php +++ b/phpBB/phpbb/db/driver/mssql.php @@ -318,14 +318,14 @@ class mssql extends \phpbb\db\driver\driver $query_id = $this->query_result; } - if ($cache && $cache->sql_exists($query_id)) + if ($cache && !is_object($query_id) && $cache->sql_exists($query_id)) { return $cache->sql_freeresult($query_id); } - if (isset($this->open_queries[$query_id])) + if (isset($this->open_queries[(int) $query_id])) { - unset($this->open_queries[$query_id]); + unset($this->open_queries[(int) $query_id]); return @mssql_free_result($query_id); } diff --git a/phpBB/phpbb/db/driver/mssql_odbc.php b/phpBB/phpbb/db/driver/mssql_odbc.php index 9db34a69fb..b9881035c0 100644 --- a/phpBB/phpbb/db/driver/mssql_odbc.php +++ b/phpBB/phpbb/db/driver/mssql_odbc.php @@ -305,7 +305,7 @@ class mssql_odbc extends \phpbb\db\driver\mssql_base $query_id = $this->query_result; } - if ($cache && $cache->sql_exists($query_id)) + if ($cache && !is_object($query_id) && $cache->sql_exists($query_id)) { return $cache->sql_freeresult($query_id); } diff --git a/phpBB/phpbb/db/driver/mssqlnative.php b/phpBB/phpbb/db/driver/mssqlnative.php index e6002fe1a3..aade311bcb 100644 --- a/phpBB/phpbb/db/driver/mssqlnative.php +++ b/phpBB/phpbb/db/driver/mssqlnative.php @@ -471,7 +471,7 @@ class mssqlnative extends \phpbb\db\driver\mssql_base $query_id = $this->query_result; } - if ($cache->sql_exists($query_id)) + if ($cache && !is_object($query_id) && $cache->sql_exists($query_id)) { return $cache->sql_freeresult($query_id); } @@ -481,6 +481,7 @@ class mssqlnative extends \phpbb\db\driver\mssql_base unset($this->open_queries[(int) $query_id]); return @sqlsrv_free_stmt($query_id); } + return false; } diff --git a/phpBB/phpbb/db/driver/mysql.php b/phpBB/phpbb/db/driver/mysql.php index c76126763d..d215453ccb 100644 --- a/phpBB/phpbb/db/driver/mysql.php +++ b/phpBB/phpbb/db/driver/mysql.php @@ -289,7 +289,7 @@ class mysql extends \phpbb\db\driver\mysql_base $query_id = $this->query_result; } - if ($cache && $cache->sql_exists($query_id)) + if ($cache && !is_object($query_id) && $cache->sql_exists($query_id)) { return $cache->sql_freeresult($query_id); } diff --git a/phpBB/phpbb/db/driver/oracle.php b/phpBB/phpbb/db/driver/oracle.php index 5dfab21455..4fba654d1e 100644 --- a/phpBB/phpbb/db/driver/oracle.php +++ b/phpBB/phpbb/db/driver/oracle.php @@ -621,7 +621,7 @@ class oracle extends \phpbb\db\driver\driver $query_id = $this->query_result; } - if ($cache && $cache->sql_exists($query_id)) + if ($cache && !is_object($query_id) && $cache->sql_exists($query_id)) { return $cache->sql_freeresult($query_id); } diff --git a/phpBB/phpbb/db/driver/postgres.php b/phpBB/phpbb/db/driver/postgres.php index 7a98b90c73..9cbb1ecb07 100644 --- a/phpBB/phpbb/db/driver/postgres.php +++ b/phpBB/phpbb/db/driver/postgres.php @@ -350,7 +350,7 @@ class postgres extends \phpbb\db\driver\driver $query_id = $this->query_result; } - if ($cache && $cache->sql_exists($query_id)) + if ($cache && !is_object($query_id) && $cache->sql_exists($query_id)) { return $cache->sql_freeresult($query_id); } diff --git a/phpBB/phpbb/db/driver/sqlite.php b/phpBB/phpbb/db/driver/sqlite.php index a548fd2618..55a33284f2 100644 --- a/phpBB/phpbb/db/driver/sqlite.php +++ b/phpBB/phpbb/db/driver/sqlite.php @@ -261,7 +261,7 @@ class sqlite extends \phpbb\db\driver\driver $query_id = $this->query_result; } - if ($cache && $cache->sql_exists($query_id)) + if ($cache && !is_object($query_id) && $cache->sql_exists($query_id)) { return $cache->sql_freeresult($query_id); } From 2b1ee16e4fa859ade2160910c529f59ddd1db697 Mon Sep 17 00:00:00 2001 From: Patrick Webster Date: Mon, 14 Oct 2013 21:18:41 -0500 Subject: [PATCH 113/661] [ticket/11919] Remove extra argument to notification manager's sql_fetchfield() PHPBB3-11919 --- phpBB/phpbb/notification/manager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/phpbb/notification/manager.php b/phpBB/phpbb/notification/manager.php index c42c84fb1f..b92b247c74 100644 --- a/phpBB/phpbb/notification/manager.php +++ b/phpBB/phpbb/notification/manager.php @@ -154,7 +154,7 @@ class manager AND nt.notification_type_id = n.notification_type_id AND nt.notification_type_enabled = 1'; $result = $this->db->sql_query($sql); - $unread_count = (int) $this->db->sql_fetchfield('unread_count', $result); + $unread_count = (int) $this->db->sql_fetchfield('unread_count'); $this->db->sql_freeresult($result); } @@ -167,7 +167,7 @@ class manager AND nt.notification_type_id = n.notification_type_id AND nt.notification_type_enabled = 1'; $result = $this->db->sql_query($sql); - $total_count = (int) $this->db->sql_fetchfield('total_count', $result); + $total_count = (int) $this->db->sql_fetchfield('total_count'); $this->db->sql_freeresult($result); } From a35721f68c95153f46dd67ea465addedf82f538e Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 15 Oct 2013 15:46:11 +0200 Subject: [PATCH 114/661] [prep-release-3.1.0-a1] Update changelog with the latest changes --- phpBB/docs/CHANGELOG.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 3df124d89f..7c96dd1b78 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -477,6 +477,8 @@
        • [PHPBB3-11905] - Alpha 1 Migration
        • [PHPBB3-11906] - Missing database entries "read_notification"
        • [PHPBB3-11908] - class phpbb_auth_provider_oauth_service_exception not using namespaces
        • +
        • [PHPBB3-11918] - Can not update from 3.0.x to 3.1.x with MSSQL
        • +
        • [PHPBB3-11919] - Improper argument order for sql_fetchfield() in notification manager

        Improvement

          From cdaea7a4062c463e9536b3ca52207c013d8af408 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Tue, 15 Oct 2013 16:28:59 +0200 Subject: [PATCH 115/661] [ticket/11920] Add MariaDB environment to Travis-CI. PHPBB3-11920 --- .travis.yml | 3 ++- travis/phpunit-mariadb-travis.xml | 41 +++++++++++++++++++++++++++++++ travis/setup-mariadb.sh | 26 ++++++++++++++++++++ 3 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 travis/phpunit-mariadb-travis.xml create mode 100755 travis/setup-mariadb.sh diff --git a/.travis.yml b/.travis.yml index 5e2569dd22..03bc7fb945 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,13 +7,14 @@ php: - 5.5 env: + - DB=mariadb - DB=mysql - DB=postgres before_script: - sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'DROP DATABASE IF EXISTS phpbb_tests;' -U postgres; fi" - sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'create database phpbb_tests;' -U postgres; fi" - - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database IF NOT EXISTS phpbb_tests;'; fi" + - sh -c "if [ '$DB' = 'mysql' -o '$DB' = 'mariadb' ]; then mysql -e 'create database IF NOT EXISTS phpbb_tests;'; fi" - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.2' ]; then pear install --force phpunit/DbUnit; phpenv rehash; fi" - cd phpBB - sh -c "if [ '$TRAVIS_PHP_VERSION' != '5.2' ]; then php ../composer.phar install --dev --no-interaction --prefer-source; fi" diff --git a/travis/phpunit-mariadb-travis.xml b/travis/phpunit-mariadb-travis.xml new file mode 100644 index 0000000000..d49118b0f8 --- /dev/null +++ b/travis/phpunit-mariadb-travis.xml @@ -0,0 +1,41 @@ + + + + + ../tests/ + tests/functional + tests/lint_test.php + + + ../tests/functional + + + + + + slow + + + + + + + + + + + + + + diff --git a/travis/setup-mariadb.sh b/travis/setup-mariadb.sh new file mode 100755 index 0000000000..68359e400a --- /dev/null +++ b/travis/setup-mariadb.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# +# @copyright (c) 2013 phpBB Group +# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +# +set -e + +# MariaDB Series +VERSION='5.5' + +# Operating system codename, e.g. "precise" +OS_CODENAME=$(lsb_release --codename --short) + +if ! which add-apt-repository > /dev/null +then + sudo apt-get update -qq + sudo apt-get install -qq python-software-properties +fi + +sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db +sudo add-apt-repository "deb http://ftp.osuosl.org/pub/mariadb/repo/$VERSION/ubuntu $OS_CODENAME main" +sudo apt-get update -qq + +sudo debconf-set-selections <<< "mariadb-server-$VERSION mysql-server/root_password password rootpasswd" +sudo debconf-set-selections <<< "mariadb-server-$VERSION mysql-server/root_password_again password rootpasswd" +sudo apt-get install -qq mariadb-server From 55e24eb4f87523c83e74a7174555a48b2a90b7a7 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Tue, 15 Oct 2013 16:57:16 +0200 Subject: [PATCH 116/661] [ticket/11920] Have to use empty root password otherwise db creation fails. PHPBB3-11920 --- travis/phpunit-mariadb-travis.xml | 2 +- travis/setup-mariadb.sh | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/travis/phpunit-mariadb-travis.xml b/travis/phpunit-mariadb-travis.xml index d49118b0f8..1eaee5b7d8 100644 --- a/travis/phpunit-mariadb-travis.xml +++ b/travis/phpunit-mariadb-travis.xml @@ -34,7 +34,7 @@ - + diff --git a/travis/setup-mariadb.sh b/travis/setup-mariadb.sh index 68359e400a..2e974da8eb 100755 --- a/travis/setup-mariadb.sh +++ b/travis/setup-mariadb.sh @@ -24,3 +24,10 @@ sudo apt-get update -qq sudo debconf-set-selections <<< "mariadb-server-$VERSION mysql-server/root_password password rootpasswd" sudo debconf-set-selections <<< "mariadb-server-$VERSION mysql-server/root_password_again password rootpasswd" sudo apt-get install -qq mariadb-server + +# Set root password to empty string. +echo " +USE mysql; +UPDATE user SET Password = PASSWORD('') where User = 'root'; +FLUSH PRIVILEGES; +" | mysql -u root -prootpasswd From 9363986f43aeb6ff6b5f9627eb42aee1ea2eaf57 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Tue, 15 Oct 2013 10:27:00 -0700 Subject: [PATCH 117/661] [ticket/11921] Improve appearance of Notifications in linklist PHPBB3-11921 --- phpBB/language/en/common.php | 6 +----- phpBB/styles/prosilver/theme/bidi.css | 2 +- phpBB/styles/prosilver/theme/buttons.css | 4 ++-- phpBB/styles/prosilver/theme/colours.css | 1 + phpBB/styles/prosilver/theme/common.css | 14 -------------- .../prosilver/theme/images/icon_notification.gif | Bin 0 -> 614 bytes .../subsilver2/template/overall_header.html | 8 ++++---- .../theme/images/icon_mini_notification.gif | Bin 0 -> 321 bytes 8 files changed, 9 insertions(+), 26 deletions(-) create mode 100644 phpBB/styles/prosilver/theme/images/icon_notification.gif create mode 100644 phpBB/styles/subsilver2/theme/images/icon_mini_notification.gif diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index e5c0478d98..d04fe96d97 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -417,11 +417,7 @@ $lang = array_merge($lang, array( 'NOT_WATCHING_FORUM' => 'You are no longer subscribed to updates on this forum.', 'NOT_WATCHING_TOPIC' => 'You are no longer subscribed to this topic.', 'NOTIFICATIONS' => 'Notifications', - 'NOTIFICATIONS_COUNT' => array( - 0 => '%d Notifications', - 1 => '%d Notification', - 2 => '%d Notifications', - ), + 'NOTIFICATIONS_COUNT' => 'Notifications (%d)', 'NOTIFICATION_BOOKMARK' => '%1$s replied to the topic "%2$s" you have bookmarked.', 'NOTIFICATION_GROUP_REQUEST' => '%1$s is requesting to join the group %2$s.', 'NOTIFICATION_GROUP_REQUEST_APPROVED' => 'Your request to join the group %1$s has been approved.', diff --git a/phpBB/styles/prosilver/theme/bidi.css b/phpBB/styles/prosilver/theme/bidi.css index 41a9874a18..c5b72e913e 100644 --- a/phpBB/styles/prosilver/theme/bidi.css +++ b/phpBB/styles/prosilver/theme/bidi.css @@ -535,7 +535,7 @@ /* Icon images ---------------------------------------- */ .rtl .sitehome, .rtl .icon-faq, .rtl .icon-members, .rtl .icon-home, .rtl .icon-ucp, .rtl .icon-register, .rtl .icon-logout, -.rtl .icon-bookmark, .rtl .icon-bump, .rtl .icon-subscribe, .rtl .icon-unsubscribe, .rtl .icon-pages, .rtl .icon-search { +.rtl .icon-bookmark, .rtl .icon-bump, .rtl .icon-subscribe, .rtl .icon-unsubscribe, .rtl .icon-pages, .rtl .icon-search, .rtl .icon-notification { background-position: 100% 50%; padding: 1px 17px 0 0; } diff --git a/phpBB/styles/prosilver/theme/buttons.css b/phpBB/styles/prosilver/theme/buttons.css index 3860869501..d83fefcef3 100644 --- a/phpBB/styles/prosilver/theme/buttons.css +++ b/phpBB/styles/prosilver/theme/buttons.css @@ -91,14 +91,14 @@ a.sendemail { /* Icon images ---------------------------------------- */ .sitehome, .icon-faq, .icon-members, .icon-home, .icon-ucp, .icon-register, .icon-logout, -.icon-bookmark, .icon-bump, .icon-subscribe, .icon-unsubscribe, .icon-pages, .icon-search { +.icon-bookmark, .icon-bump, .icon-subscribe, .icon-unsubscribe, .icon-pages, .icon-search, .icon-notification { background-position: 0 50%; background-repeat: no-repeat; background-image: none; padding: 1px 0 0 17px; } -ul.linklist.bulletin li.icon-home:before, ul.linklist.bulletin li.icon-ucp:before, +ul.linklist.bulletin li.icon-home:before, ul.linklist.bulletin li.icon-ucp:before, ul.linklist.bulletin li.icon-notification:before, ul.linklist.bulletin li.icon-bookmark:before, ul.linklist.bulletin li.icon-bump:before, ul.linklist.bulletin li.icon-subscribe:before, ul.linklist.bulletin li.icon-unsubscribe:before { display: none; } diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css index 08123fd9e8..40311f95fe 100644 --- a/phpBB/styles/prosilver/theme/colours.css +++ b/phpBB/styles/prosilver/theme/colours.css @@ -707,6 +707,7 @@ a.sendemail { .icon-unsubscribe { background-image: url("./images/icon_unsubscribe.gif"); } .icon-pages { background-image: url("./images/icon_pages.gif"); } .icon-search { background-image: url("./images/icon_search.gif"); } +.icon-notification { background-image: url("./images/icon_notification.gif"); } /* Profile & navigation icons */ .email-icon, .email-icon a { background-image: url("./images/icon_contact_email.gif"); } diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css index 9021c157a3..4dbcc6f455 100644 --- a/phpBB/styles/prosilver/theme/common.css +++ b/phpBB/styles/prosilver/theme/common.css @@ -378,20 +378,6 @@ ul.linklist.bulletin li.no-bulletin:before { display: none; } -.icon-notification:before, ul.linklist.bulletin li.icon-notification:before, .icon-notification:after { - display: inline; - font: inherit; -} - -.icon-notification:before, ul.linklist.bulletin li.icon-notification:before { - content: '['; - padding-right: 0; -} - -.icon-notification:after { - content: ']'; -} - /* Table styles ----------------------------------------*/ table.table1 { diff --git a/phpBB/styles/prosilver/theme/images/icon_notification.gif b/phpBB/styles/prosilver/theme/images/icon_notification.gif new file mode 100644 index 0000000000000000000000000000000000000000..0eca47843d18a16ccfb9bbc7f5d6b4ad02701527 GIT binary patch literal 614 zcmZ?wbhEHb6ky7?od(L#KkRp4(~W|edFOvtF|57c;w2Y*^9Ow zyK?&aqt~B)oVfaM-S&NpHtySf?q12lgKxk5IDGN$*PnmR-~agf)3@zMFYG*YV(FIs z?Q2h*zxjCUo|Aw6{-3ku%#Iy9b{@a{_u@7H=-F^A-)3;xf<}I7L?c9GbU>LGM@h1x-1A`-j4#)?fIALHv+~6psF3zUO zCNJN{Cax~!=xD%WZEb5iW!e-Tg9#GaW_*I|i`fPF%(NvYh{-Z=FxhXkXX0Rx6`LR` zy>7#%Eez74j;0FAmWo=N?6njvl@&}iO!QbStxj24vg(;=2pBp%yk_;p@}YyFfC#sZ zjRh<7M`l)wx7;F(4sR_~Isb90zWT@@bbxsRyOGL+83&q^2j(XIyp#`)o0pyCF^^+mVz34PuOihy literal 0 HcmV?d00001 diff --git a/phpBB/styles/subsilver2/template/overall_header.html b/phpBB/styles/subsilver2/template/overall_header.html index 7bfb85017a..1693b8424f 100644 --- a/phpBB/styles/subsilver2/template/overall_header.html +++ b/phpBB/styles/subsilver2/template/overall_header.html @@ -152,7 +152,7 @@ function marklist(id, name, state) - [ {NOTIFICATIONS_COUNT} ]  + * {NOTIFICATIONS_COUNT} 
          {L_NOTIFICATIONS} @@ -191,15 +191,15 @@ function marklist(id, name, state)
          - * {L_LOGIN_LOGOUT}  -  * {L_RESTORE_PERMISSIONS} -  {L_BOARD_DISABLED}  * {PRIVATE_MESSAGE_INFO}, {PRIVATE_MESSAGE_INFO_UNREAD}  * {L_REGISTER} +  * {L_LOGIN_LOGOUT}  +  * {L_RESTORE_PERMISSIONS} +  {L_BOARD_DISABLED} * {L_FAQ} diff --git a/phpBB/styles/subsilver2/theme/images/icon_mini_notification.gif b/phpBB/styles/subsilver2/theme/images/icon_mini_notification.gif new file mode 100644 index 0000000000000000000000000000000000000000..8ff818325aca80e1d781722cc6ae77a982cb289b GIT binary patch literal 321 zcmZ?wbhEHbC>l4yUuB+_b2zSee>?UQbJeZ%q{Kf4&Q$ICV%?oA3uJ4 z|M}Y_cXHX>?G^L3&)sqA Date: Tue, 15 Oct 2013 10:29:15 -0700 Subject: [PATCH 118/661] [ticket/11921] Improve appearance of PM notifications in linklist PHPBB3-11921 --- phpBB/includes/functions.php | 13 +++++-------- phpBB/language/en/common.php | 8 -------- .../styles/prosilver/template/overall_header.html | 6 +++++- phpBB/styles/prosilver/theme/bidi.css | 2 +- phpBB/styles/prosilver/theme/buttons.css | 4 ++-- phpBB/styles/prosilver/theme/colours.css | 1 + phpBB/styles/prosilver/theme/images/icon_pm.gif | Bin 0 -> 576 bytes .../subsilver2/template/overall_header.html | 2 +- 8 files changed, 15 insertions(+), 21 deletions(-) create mode 100644 phpBB/styles/prosilver/theme/images/icon_pm.gif diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 947e29ea02..527d955b0b 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -5225,7 +5225,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 $l_online_time = $user->lang('VIEW_ONLINE_TIMES', (int) $config['load_online_time']); } - $l_privmsgs_text = $l_privmsgs_text_unread = ''; + $l_privmsgs_count = ''; $s_privmsg_new = false; // Obtain number of new private messages if user is logged in @@ -5233,7 +5233,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 { if ($user->data['user_new_privmsg']) { - $l_privmsgs_text = $user->lang('NEW_PMS', (int) $user->data['user_new_privmsg']); + $l_privmsgs_count = (int) $user->data['user_new_privmsg']; if (!$user->data['user_last_privmsg'] || $user->data['user_last_privmsg'] > $user->data['session_last_visit']) { @@ -5251,15 +5251,13 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 } else { - $l_privmsgs_text = $user->lang('NEW_PMS', 0); + $l_privmsgs_count = 0; $s_privmsg_new = false; } - $l_privmsgs_text_unread = ''; - if ($user->data['user_unread_privmsg'] && $user->data['user_unread_privmsg'] != $user->data['user_new_privmsg']) { - $l_privmsgs_text_unread = $user->lang('UNREAD_PMS', (int) $user->data['user_unread_privmsg']); + $l_privmsgs_count = (int) $user->data['user_unread_privmsg']; } } @@ -5350,8 +5348,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 'TOTAL_USERS_ONLINE' => $l_online_users, 'LOGGED_IN_USER_LIST' => $online_userlist, 'RECORD_USERS' => $l_online_record, - 'PRIVATE_MESSAGE_INFO' => $l_privmsgs_text, - 'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread, + 'PRIVATE_MESSAGE_COUNT' => $l_privmsgs_count, 'HIDDEN_FIELDS_FOR_JUMPBOX' => $hidden_fields_for_jumpbox, 'UNREAD_NOTIFICATIONS_COUNT' => ($notifications !== false) ? $notifications['unread_count'] : '', diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index d04fe96d97..3afbc426aa 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -401,10 +401,6 @@ $lang = array_merge($lang, array( 'NEWEST_USER' => 'Our newest member %s', 'NEW_MESSAGE' => 'New message', 'NEW_MESSAGES' => 'New messages', - 'NEW_PMS' => array( - 1 => '%d new message', - 2 => '%d new messages', - ), 'NEW_POST' => 'New post', // Not used anymore 'NEW_POSTS' => 'New posts', // Not used anymore 'NEXT' => 'Next', // Used in pagination @@ -753,10 +749,6 @@ $lang = array_merge($lang, array( 'UNKNOWN_BROWSER' => 'Unknown browser', 'UNMARK_ALL' => 'Unmark all', 'UNREAD_MESSAGES' => 'Unread messages', - 'UNREAD_PMS' => array( - 1 => '%d unread message', - 2 => '%d unread messages', - ), 'UNREAD_POST' => 'Unread post', 'UNREAD_POSTS' => 'Unread posts', 'UNWATCH_FORUM_CONFIRM' => 'Are you sure you wish to unsubscribe from this forum?', diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html index 92baf6ee51..6f787f023c 100644 --- a/phpBB/styles/prosilver/template/overall_header.html +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -135,9 +135,13 @@
        + +
      6. + {L_PRIVATE_MESSAGES} ({PRIVATE_MESSAGE_COUNT}) +
      7. +
      8. {L_PROFILE} - ({PRIVATE_MESSAGE_INFO}, {PRIVATE_MESSAGE_INFO_UNREAD})
      9. {L_SEARCH_SELF}
      10. diff --git a/phpBB/styles/prosilver/theme/bidi.css b/phpBB/styles/prosilver/theme/bidi.css index c5b72e913e..c06ad4eb1c 100644 --- a/phpBB/styles/prosilver/theme/bidi.css +++ b/phpBB/styles/prosilver/theme/bidi.css @@ -535,7 +535,7 @@ /* Icon images ---------------------------------------- */ .rtl .sitehome, .rtl .icon-faq, .rtl .icon-members, .rtl .icon-home, .rtl .icon-ucp, .rtl .icon-register, .rtl .icon-logout, -.rtl .icon-bookmark, .rtl .icon-bump, .rtl .icon-subscribe, .rtl .icon-unsubscribe, .rtl .icon-pages, .rtl .icon-search, .rtl .icon-notification { +.rtl .icon-bookmark, .rtl .icon-bump, .rtl .icon-subscribe, .rtl .icon-unsubscribe, .rtl .icon-pages, .rtl .icon-search, .rtl .icon-notification, .rtl .icon-pm { background-position: 100% 50%; padding: 1px 17px 0 0; } diff --git a/phpBB/styles/prosilver/theme/buttons.css b/phpBB/styles/prosilver/theme/buttons.css index d83fefcef3..b05883b465 100644 --- a/phpBB/styles/prosilver/theme/buttons.css +++ b/phpBB/styles/prosilver/theme/buttons.css @@ -91,14 +91,14 @@ a.sendemail { /* Icon images ---------------------------------------- */ .sitehome, .icon-faq, .icon-members, .icon-home, .icon-ucp, .icon-register, .icon-logout, -.icon-bookmark, .icon-bump, .icon-subscribe, .icon-unsubscribe, .icon-pages, .icon-search, .icon-notification { +.icon-bookmark, .icon-bump, .icon-subscribe, .icon-unsubscribe, .icon-pages, .icon-search, .icon-notification, .icon-pm { background-position: 0 50%; background-repeat: no-repeat; background-image: none; padding: 1px 0 0 17px; } -ul.linklist.bulletin li.icon-home:before, ul.linklist.bulletin li.icon-ucp:before, ul.linklist.bulletin li.icon-notification:before, +ul.linklist.bulletin li.icon-home:before, ul.linklist.bulletin li.icon-ucp:before, ul.linklist.bulletin li.icon-notification:before, ul.linklist.bulletin li.icon-pm:before, ul.linklist.bulletin li.icon-bookmark:before, ul.linklist.bulletin li.icon-bump:before, ul.linklist.bulletin li.icon-subscribe:before, ul.linklist.bulletin li.icon-unsubscribe:before { display: none; } diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css index 40311f95fe..3f837976bf 100644 --- a/phpBB/styles/prosilver/theme/colours.css +++ b/phpBB/styles/prosilver/theme/colours.css @@ -708,6 +708,7 @@ a.sendemail { .icon-pages { background-image: url("./images/icon_pages.gif"); } .icon-search { background-image: url("./images/icon_search.gif"); } .icon-notification { background-image: url("./images/icon_notification.gif"); } +.icon-pm { background-image: url("./images/icon_pm.gif"); } /* Profile & navigation icons */ .email-icon, .email-icon a { background-image: url("./images/icon_contact_email.gif"); } diff --git a/phpBB/styles/prosilver/theme/images/icon_pm.gif b/phpBB/styles/prosilver/theme/images/icon_pm.gif new file mode 100644 index 0000000000000000000000000000000000000000..6d308f37c2a8d02668d389dad5fd2512b322ad08 GIT binary patch literal 576 zcmZ?wbhEHb6kyU7r*`ZwP^E!7jHhie*132{?li#KX~=#{rzXJ?>%{0)-(Ivr?2O4 z-2d|J$A`~fpT2ti_s`$?8}`2a`1Qw+pC3Pe*>>do`n{*#fBN+L&AVmWkCk@Me){Tt z)zr166IV=Fy0dE9+UKv|ZasAJ+s~g1Hy@s~e0M?b;&V41{`mE~WybP%pT0CqUHbm> z*OQm8m-R1;DC=Fd>*Th>Cttn&@aNyZBj+zil=YmxdgK59f3IG@|M}}z>BQwffBkv# z;_dU-Z`SQSUC^`m*PlQ4pFV%^^u>>#zc1f@`0DlB+qZAm&DoMv+y5U77zPL^{$ycf zU0of0V69)FV4dG4AEv;?sE!-j9J-t2L;T&O;r%au~5zfWnF>R_T16R1NftU%; zG$s+v0IhI$9!XnunJI#X-j)v9;XYwZ3i4*2Vd547=DuOZ;p~(3^i_1Mjg;-YCbNgL zhAFY|N=pd`@-y~-mk5(N+ae( Vfnu9B=Q58u9)(Fw+Kmhh)&Qa80n`8h literal 0 HcmV?d00001 diff --git a/phpBB/styles/subsilver2/template/overall_header.html b/phpBB/styles/subsilver2/template/overall_header.html index 1693b8424f..224d02d9c9 100644 --- a/phpBB/styles/subsilver2/template/overall_header.html +++ b/phpBB/styles/subsilver2/template/overall_header.html @@ -193,7 +193,7 @@ function marklist(id, name, state) -  * {PRIVATE_MESSAGE_INFO}, {PRIVATE_MESSAGE_INFO_UNREAD} +  * {L_PRIVATE_MESSAGES} ({PRIVATE_MESSAGE_COUNT})  * {L_REGISTER} From 878cb836f59afffca333b6d42e11c1bc0a4bc16f Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Tue, 15 Oct 2013 22:44:49 +0200 Subject: [PATCH 119/661] [ticket/11920] Actually call travis/setup-mariadb.sh. PHPBB3-11920 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 03bc7fb945..ecaf43c4b5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,7 @@ env: before_script: - sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'DROP DATABASE IF EXISTS phpbb_tests;' -U postgres; fi" - sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'create database phpbb_tests;' -U postgres; fi" + - sh -c "if [ '$DB' = 'mariadb' ]; then travis/setup-mariadb.sh; fi" - sh -c "if [ '$DB' = 'mysql' -o '$DB' = 'mariadb' ]; then mysql -e 'create database IF NOT EXISTS phpbb_tests;'; fi" - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.2' ]; then pear install --force phpunit/DbUnit; phpenv rehash; fi" - cd phpBB From 3bb93ab2d34251a51b67c722db3b40500749fa17 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 15 Oct 2013 22:46:02 +0200 Subject: [PATCH 120/661] [develop] Update version to 3.1.0-a2-dev --- phpBB/includes/constants.php | 2 +- phpBB/install/convertors/convert_phpbb20.php | 2 +- phpBB/install/schemas/schema_data.sql | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php index 5165463969..e1da41d106 100644 --- a/phpBB/includes/constants.php +++ b/phpBB/includes/constants.php @@ -24,7 +24,7 @@ if (!defined('IN_PHPBB')) */ // phpBB Version -define('PHPBB_VERSION', '3.1.0-a1'); +define('PHPBB_VERSION', '3.1.0-a2-dev'); // QA-related // define('PHPBB_QA', 1); diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php index c861028b47..03ed15c0ec 100644 --- a/phpBB/install/convertors/convert_phpbb20.php +++ b/phpBB/install/convertors/convert_phpbb20.php @@ -33,7 +33,7 @@ $dbms = phpbb_convert_30_dbms_to_31($dbms); $convertor_data = array( 'forum_name' => 'phpBB 2.0.x', 'version' => '1.0.3', - 'phpbb_version' => '3.1.0-a1', + 'phpbb_version' => '3.1.0-a2-dev', 'author' => 'phpBB Group', 'dbms' => $dbms, 'dbhost' => $dbhost, diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 0aa84a7610..794def40dc 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -270,7 +270,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0 INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('use_system_cron', '0'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.1.0-a1'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.1.0-a2-dev'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400'); From 457ca9c7633df2bf362f3530952afa15934e0907 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Tue, 15 Oct 2013 14:09:47 -0700 Subject: [PATCH 121/661] [ticket/11921] Remove "l_" from non-lang variables PHPBB3-11921 --- phpBB/includes/functions.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 527d955b0b..310045ed82 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -5225,7 +5225,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 $l_online_time = $user->lang('VIEW_ONLINE_TIMES', (int) $config['load_online_time']); } - $l_privmsgs_count = ''; + $privmsgs_count = 0; $s_privmsg_new = false; // Obtain number of new private messages if user is logged in @@ -5233,7 +5233,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 { if ($user->data['user_new_privmsg']) { - $l_privmsgs_count = (int) $user->data['user_new_privmsg']; + $privmsgs_count = (int) $user->data['user_new_privmsg']; if (!$user->data['user_last_privmsg'] || $user->data['user_last_privmsg'] > $user->data['session_last_visit']) { @@ -5251,13 +5251,13 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 } else { - $l_privmsgs_count = 0; + $privmsgs_count = 0; $s_privmsg_new = false; } if ($user->data['user_unread_privmsg'] && $user->data['user_unread_privmsg'] != $user->data['user_new_privmsg']) { - $l_privmsgs_count = (int) $user->data['user_unread_privmsg']; + $privmsgs_count = (int) $user->data['user_unread_privmsg']; } } @@ -5348,7 +5348,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 'TOTAL_USERS_ONLINE' => $l_online_users, 'LOGGED_IN_USER_LIST' => $online_userlist, 'RECORD_USERS' => $l_online_record, - 'PRIVATE_MESSAGE_COUNT' => $l_privmsgs_count, + 'PRIVATE_MESSAGE_COUNT' => $privmsgs_count, 'HIDDEN_FIELDS_FOR_JUMPBOX' => $hidden_fields_for_jumpbox, 'UNREAD_NOTIFICATIONS_COUNT' => ($notifications !== false) ? $notifications['unread_count'] : '', From 2adbd08714eb710e7c19481bb94646542bbf0e78 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Wed, 16 Oct 2013 00:02:51 +0200 Subject: [PATCH 122/661] [ticket/11926] Fix plupload migration dependency. PHPBB3-11926 --- phpBB/phpbb/db/migration/data/v310/plupload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/phpbb/db/migration/data/v310/plupload.php b/phpBB/phpbb/db/migration/data/v310/plupload.php index 1787c6dafc..7cdba507a2 100644 --- a/phpBB/phpbb/db/migration/data/v310/plupload.php +++ b/phpBB/phpbb/db/migration/data/v310/plupload.php @@ -19,7 +19,7 @@ class plupload extends \phpbb\db\migration\migration static public function depends_on() { - return array('\phpbb\db\migration\data\310\dev'); + return array('\phpbb\db\migration\data\v310\dev'); } public function update_data() From 0f64f0edc409ecea94159bb365b7f7efbd311195 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Wed, 16 Oct 2013 00:24:44 +0200 Subject: [PATCH 123/661] [ticket/11920] Manually purge mysql-common. PHPBB3-11920 --- travis/setup-mariadb.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/travis/setup-mariadb.sh b/travis/setup-mariadb.sh index 2e974da8eb..6742d27263 100755 --- a/travis/setup-mariadb.sh +++ b/travis/setup-mariadb.sh @@ -11,6 +11,9 @@ VERSION='5.5' # Operating system codename, e.g. "precise" OS_CODENAME=$(lsb_release --codename --short) +# Manually purge MySQL to remove conflicting files (e.g. /etc/mysql/my.cnf) +sudo apt-get purge -qq mysql-common + if ! which add-apt-repository > /dev/null then sudo apt-get update -qq From 5a481bb1763477edbacf530de7c64a729a796084 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Wed, 16 Oct 2013 00:25:07 +0200 Subject: [PATCH 124/661] [ticket/11920] Print MariaDB version after successful setup. PHPBB3-11920 --- travis/setup-mariadb.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/travis/setup-mariadb.sh b/travis/setup-mariadb.sh index 6742d27263..02520b1c2c 100755 --- a/travis/setup-mariadb.sh +++ b/travis/setup-mariadb.sh @@ -34,3 +34,5 @@ USE mysql; UPDATE user SET Password = PASSWORD('') where User = 'root'; FLUSH PRIVILEGES; " | mysql -u root -prootpasswd + +mysql --version From 5f788e40d8d2b122b92f2b02dbfdc40960a1e047 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 16 Oct 2013 00:37:54 +0200 Subject: [PATCH 125/661] [ticket/11924] Bring layout of events.md to one style PHPBB3-11924 --- phpBB/docs/events.md | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md index bef4727149..17615d1405 100644 --- a/phpBB/docs/events.md +++ b/phpBB/docs/events.md @@ -21,7 +21,7 @@ acp_overall_footer_after acp_overall_header_head_append === * Location: adm/style/overall_header.html -* Add assets within the `` tags in the ACP +* Purpose: Add assets within the `` tags in the ACP acp_simple_footer_after === @@ -31,7 +31,7 @@ acp_simple_footer_after acp_simple_header_head_append === * Location: adm/style/overall_header.html -* Add assets within the `` tags in the simple header of the ACP +* Purpose: Add assets within the `` tags in the simple header of the ACP acp_users_overview_options_append === @@ -91,7 +91,8 @@ overall_footer_after overall_footer_breadcrumb_append === -* Location: styles/prosilver/template/overall_footer.html +* Locations: + + styles/prosilver/template/overall_footer.html * Purpose: Add links to the list of breadcrumbs in the footer overall_footer_copyright_append @@ -124,12 +125,14 @@ overall_header_head_append overall_header_navigation_append === -* Location: styles/prosilver/template/overall_header.html +* Locations: + + styles/prosilver/template/overall_header.html * Purpose: Add links after the navigation links in the header overall_header_navigation_prepend === -* Location: styles/prosilver/template/overall_header.html +* Locations: + + styles/prosilver/template/overall_header.html * Purpose: Add links before the navigation links in the header posting_editor_options_prepend @@ -141,7 +144,8 @@ posting_editor_options_prepend simple_footer_after === -* Location: styles/prosilver/template/simple_footer.html +* Locations: + + styles/prosilver/template/simple_footer.html * Purpose: Add content directly prior to the `` tag of the simple footer topiclist_row_prepend @@ -164,19 +168,22 @@ topiclist_row_append ucp_pm_viewmessage_custom_fields_after === -* Location: styles/prosilver/template/ucp_pm_viewmessage.html +* Locations: + + styles/prosilver/template/ucp_pm_viewmessage.html * Purpose: Add data after the custom fields on the user profile when viewing a private message ucp_pm_viewmessage_custom_fields_before === -* Location: styles/prosilver/template/ucp_pm_viewmessage.html +* Locations: + + styles/prosilver/template/ucp_pm_viewmessage.html * Purpose: Add data before the custom fields on the user profile when viewing a private message ucp_pm_viewmessage_print_head_append === -* Location: styles/prosilver/template/ucp_pm_viewmessage_print.html +* Locations: + + styles/prosilver/template/ucp_pm_viewmessage_print.html * Purpose: Add asset calls directly before the `` tag of the Print PM screen ucp_prefs_personal_prepend @@ -241,7 +248,8 @@ Display Options screen viewtopic_print_head_append === -* Location: styles/prosilver/template/viewtopic_print.html +* Locations: + + styles/prosilver/template/viewtopic_print.html * Purpose: Add asset calls directly before the `` tag of the Print Topic screen viewtopic_body_footer_before From 9cf634e517a9e1ac4dda8b8b01cc21f8680f529c Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 16 Oct 2013 00:39:52 +0200 Subject: [PATCH 126/661] [ticket/11924] Add script to export events.md with wiki markup PHPBB3-11924 --- phpBB/develop/export_events_for_wiki.php | 102 +++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 phpBB/develop/export_events_for_wiki.php diff --git a/phpBB/develop/export_events_for_wiki.php b/phpBB/develop/export_events_for_wiki.php new file mode 100644 index 0000000000..72e5607e00 --- /dev/null +++ b/phpBB/develop/export_events_for_wiki.php @@ -0,0 +1,102 @@ + Date: Wed, 16 Oct 2013 00:45:28 +0200 Subject: [PATCH 127/661] [ticket/11924] Add version info of template events to events.md PHPBB3-11924 --- phpBB/develop/export_events_for_wiki.php | 5 +-- phpBB/docs/events.md | 44 ++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/phpBB/develop/export_events_for_wiki.php b/phpBB/develop/export_events_for_wiki.php index 72e5607e00..c43d1fdfcd 100644 --- a/phpBB/develop/export_events_for_wiki.php +++ b/phpBB/develop/export_events_for_wiki.php @@ -41,7 +41,8 @@ function export_from_eventsmd($filter) if ($filter == 'acp' && strpos($event_name, 'acp_') !== 0) continue; if ($filter == 'styles' && strpos($event_name, 'acp_') === 0) continue; - list($file_details, $explanition) = explode("\n* Purpose: ", $details); + list($file_details, $details) = explode("\n* Since: ", $details); + list($version, $explanition) = explode("\n* Purpose: ", $details); echo "|- id=\"{$event_name}\"\n"; echo "| [[#{$event_name}|{$event_name}]] || "; @@ -68,7 +69,7 @@ function export_from_eventsmd($filter) { echo substr($file_details, strlen("* Location: adm/style/")); } - echo " || 3.1.0-a1 || " . str_replace("\n", ' ', $explanition) . "\n"; + echo " || {$version} || " . str_replace("\n", ' ', $explanition) . "\n"; } } diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md index 17615d1405..49804a57bc 100644 --- a/phpBB/docs/events.md +++ b/phpBB/docs/events.md @@ -1,41 +1,49 @@ acp_forums_normal_settings_append === * Location: adm/style/acp_forums.html +* Since: 3.1.0-a1 * Purpose: Add settings to forums acp_main_actions_append === * Location: adm/style/acp_main.html +* Since: 3.1.0-a1 * Purpose: Add actions to the ACP main page below the cache purge action acp_main_notice_after === * Location: adm/style/acp_main.html +* Since: 3.1.0-a1 * Purpose: Add notices or other blocks in the ACP below other configuration notices acp_overall_footer_after === * Location: adm/style/overall_footer.html +* Since: 3.1.0-a1 * Purpose: Add content below the footer in the ACP acp_overall_header_head_append === * Location: adm/style/overall_header.html +* Since: 3.1.0-a1 * Purpose: Add assets within the `` tags in the ACP acp_simple_footer_after === * Location: adm/style/simple_footer.html +* Since: 3.1.0-a1 * Purpose: Add content below the simple footer in the ACP acp_simple_header_head_append === * Location: adm/style/overall_header.html +* Since: 3.1.0-a1 * Purpose: Add assets within the `` tags in the simple header of the ACP acp_users_overview_options_append === * Location: adm/style/acp_users.html +* Since: 3.1.0-a1 * Purpose: Add options and settings on user overview page forumlist_body_last_post_title_prepend @@ -43,6 +51,7 @@ forumlist_body_last_post_title_prepend * Locations: + styles/prosilver/template/forumlist_body.html + styles/subsilver2/template/forumlist_body.html +* Since: 3.1.0-a1 * Purpose: Add content before the post title of the latest post in a forum on the forum list. index_body_stat_blocks_before @@ -50,6 +59,7 @@ index_body_stat_blocks_before * Locations: + styles/prosilver/template/index_body.html + styles/subsilver2/template/index_body.html +* Since: 3.1.0-a1 * Purpose: Add new statistic blocks above the Who Is Online and Board Statistics blocks memberlist_body_username_append @@ -57,6 +67,7 @@ memberlist_body_username_append * Locations: + styles/prosilver/template/memberlist_body.html + styles/subsilver2/template/memberlist_body.html +* Since: 3.1.0-a1 * Purpose: Add information after every username in the memberlist. Works in all display modes (leader, group and normal memberlist). @@ -65,6 +76,7 @@ memberlist_body_username_prepend * Locations: + styles/prosilver/template/memberlist_body.html + styles/subsilver2/template/memberlist_body.html +* Since: 3.1.0-a1 * Purpose: Add information before every username in the memberlist. Works in all display modes (leader, group and normal memberlist). @@ -73,6 +85,7 @@ memberlist_view_user_statistics_after * Locations: + styles/prosilver/template/memberlist_view.html + styles/subsilver2/template/memberlist_view.html +* Since: 3.1.0-a1 * Purpose: Add entries after the user statistics part of any user profile memberlist_view_user_statistics_before @@ -80,6 +93,7 @@ memberlist_view_user_statistics_before * Locations: + styles/prosilver/template/memberlist_view.html + styles/subsilver2/template/memberlist_view.html +* Since: 3.1.0-a1 * Purpose: Add entries before the user statistics part of any user profile overall_footer_after @@ -87,12 +101,14 @@ overall_footer_after * Locations: + styles/prosilver/template/overall_footer.html + styles/subsilver2/template/overall_footer.html +* Since: 3.1.0-a1 * Purpose: Add content at the end of the file, directly prior to the `` tag overall_footer_breadcrumb_append === * Locations: + styles/prosilver/template/overall_footer.html +* Since: 3.1.0-a1 * Purpose: Add links to the list of breadcrumbs in the footer overall_footer_copyright_append @@ -100,6 +116,7 @@ overall_footer_copyright_append * Locations: + styles/prosilver/template/overall_footer.html + styles/subsilver2/template/overall_footer.html +* Since: 3.1.0-a1 * Purpose: Add content after the copyright line (no new line by default), before the ACP link overall_footer_copyright_prepend @@ -107,6 +124,7 @@ overall_footer_copyright_prepend * Locations: + styles/prosilver/template/overall_footer.html + styles/subsilver2/template/overall_footer.html +* Since: 3.1.0-a1 * Purpose: Add content before the copyright line overall_header_breadcrumb_append @@ -114,6 +132,7 @@ overall_header_breadcrumb_append * Locations: + styles/prosilver/template/overall_header.html + styles/subsilver2/template/breadcrumbs.html +* Since: 3.1.0-a1 * Purpose: Add links to the list of breadcrumbs in the header overall_header_head_append @@ -121,18 +140,21 @@ overall_header_head_append * Locations: + styles/prosilver/template/overall_header.html + styles/subsilver2/template/overall_header.html +* Since: 3.1.0-a1 * Purpose: Add asset calls directly before the `` tag overall_header_navigation_append === * Locations: + styles/prosilver/template/overall_header.html +* Since: 3.1.0-a1 * Purpose: Add links after the navigation links in the header overall_header_navigation_prepend === * Locations: + styles/prosilver/template/overall_header.html +* Since: 3.1.0-a1 * Purpose: Add links before the navigation links in the header posting_editor_options_prepend @@ -140,12 +162,14 @@ posting_editor_options_prepend * Locations: + styles/prosilver/template/posting_editor.html + styles/prosilver/template/posting_body.html +* Since: 3.1.0-a1 * Purpose: Add posting options on the posting screen simple_footer_after === * Locations: + styles/prosilver/template/simple_footer.html +* Since: 3.1.0-a1 * Purpose: Add content directly prior to the `` tag of the simple footer topiclist_row_prepend @@ -155,6 +179,7 @@ topiclist_row_prepend + styles/prosilver/template/viewforum_body.html + styles/subsilver2/template/search_results.html + styles/subsilver2/template/viewforum_body.html +* Since: 3.1.0-a1 * Purpose: Add content into topic rows (inside the elements containing topic titles) topiclist_row_append @@ -164,12 +189,14 @@ topiclist_row_append + styles/prosilver/template/viewforum_body.html + styles/subsilver2/template/search_results.html + styles/subsilver2/template/viewforum_body.html +* Since: 3.1.0-a1 * Purpose: Add content into topic rows (inside the elements containing topic titles) ucp_pm_viewmessage_custom_fields_after === * Locations: + styles/prosilver/template/ucp_pm_viewmessage.html +* Since: 3.1.0-a1 * Purpose: Add data after the custom fields on the user profile when viewing a private message @@ -177,6 +204,7 @@ ucp_pm_viewmessage_custom_fields_before === * Locations: + styles/prosilver/template/ucp_pm_viewmessage.html +* Since: 3.1.0-a1 * Purpose: Add data before the custom fields on the user profile when viewing a private message @@ -184,6 +212,7 @@ ucp_pm_viewmessage_print_head_append === * Locations: + styles/prosilver/template/ucp_pm_viewmessage_print.html +* Since: 3.1.0-a1 * Purpose: Add asset calls directly before the `` tag of the Print PM screen ucp_prefs_personal_prepend @@ -191,6 +220,7 @@ ucp_prefs_personal_prepend * Locations: + styles/prosilver/template/ucp_prefs_personal.html + styles/subsilver2/template/ucp_prefs_personal.html +* Since: 3.1.0-a1 * Purpose: Add user options to the top of the Edit Global Settings block ucp_prefs_personal_append @@ -198,6 +228,7 @@ ucp_prefs_personal_append * Locations: + styles/prosilver/template/ucp_prefs_personal.html + styles/subsilver2/template/ucp_prefs_personal.html +* Since: 3.1.0-a1 * Purpose: Add user options to the bottom of the Edit Global Settings block ucp_prefs_post_prepend @@ -205,6 +236,7 @@ ucp_prefs_post_prepend * Locations: + styles/prosilver/template/ucp_prefs_post.html + styles/subsilver2/template/ucp_prefs_post.html +* Since: 3.1.0-a1 * Purpose: Add user options to the top of the Edit Posting Defaults block ucp_prefs_post_append @@ -212,6 +244,7 @@ ucp_prefs_post_append * Locations: + styles/prosilver/template/ucp_prefs_post.html + styles/subsilver2/template/ucp_prefs_post.html +* Since: 3.1.0-a1 * Purpose: Add user options to the bottom of the Edit Posting Defaults block ucp_prefs_view_radio_buttons_prepend @@ -219,6 +252,7 @@ ucp_prefs_view_radio_buttons_prepend * Locations: + styles/prosilver/template/ucp_prefs_view.html + styles/subsilver2/template/ucp_prefs_view.html +* Since: 3.1.0-a1 * Purpose: Add options to the top of the radio buttons block of the Edit Display Options screen @@ -227,6 +261,7 @@ ucp_prefs_view_radio_buttons_append * Locations: + styles/prosilver/template/ucp_prefs_view.html + styles/subsilver2/template/ucp_prefs_view.html +* Since: 3.1.0-a1 * Purpose: Add options to the bottom of the radio buttons block of the Edit Display Options screen @@ -235,6 +270,7 @@ ucp_prefs_view_select_menu_prepend * Locations: + styles/prosilver/template/ucp_prefs_view.html + styles/subsilver2/template/ucp_prefs_view.html +* Since: 3.1.0-a1 * Purpose: Add options to the top of the drop-down lists block of the Edit Display Options screen @@ -243,6 +279,7 @@ ucp_prefs_view_select_menu_append * Locations: + styles/prosilver/template/ucp_prefs_view.html + styles/subsilver2/template/ucp_prefs_view.html +* Since: 3.1.0-a1 * Purpose: Add options to the bottom of the drop-down lists block of the Edit Display Options screen @@ -250,6 +287,7 @@ viewtopic_print_head_append === * Locations: + styles/prosilver/template/viewtopic_print.html +* Since: 3.1.0-a1 * Purpose: Add asset calls directly before the `` tag of the Print Topic screen viewtopic_body_footer_before @@ -257,6 +295,7 @@ viewtopic_body_footer_before * Locations: + styles/prosilver/template/viewtopic_body.html + styles/subsilver2/template/viewtopic_body.html +* Since: 3.1.0-a1 * Purpose: Add content to the bottom of the View topic screen below the posts and quick reply, directly before the jumpbox in Prosilver, breadcrumbs in Subsilver2. @@ -266,6 +305,7 @@ viewtopic_body_post_buttons_after * Locations: + styles/prosilver/template/viewtopic_body.html + styles/subsilver2/template/viewtopic_body.html +* Since: 3.1.0-a1 * Purpose: Add post button to posts (next to edit, quote etc), at the end of the list. @@ -274,6 +314,7 @@ viewtopic_body_post_buttons_before * Locations: + styles/prosilver/template/viewtopic_body.html + styles/subsilver2/template/viewtopic_body.html +* Since: 3.1.0-a1 * Purpose: Add post button to posts (next to edit, quote etc), at the start of the list. @@ -282,6 +323,7 @@ viewtopic_body_postrow_custom_fields_after * Locations: + styles/prosilver/template/viewtopic_body.html + styles/subsilver2/template/viewtopic_body.html +* Since: 3.1.0-a1 * Purpose: Add data after the custom fields on the user profile when viewing a post @@ -290,6 +332,7 @@ viewtopic_body_postrow_custom_fields_before * Locations: + styles/prosilver/template/viewtopic_body.html + styles/subsilver2/template/viewtopic_body.html +* Since: 3.1.0-a1 * Purpose: Add data before the custom fields on the user profile when viewing a post @@ -298,4 +341,5 @@ viewtopic_topic_title_prepend * Locations: + styles/prosilver/template/viewtopic_body.html + styles/subsilver2/template/viewtopic_body.html +* Since: 3.1.0-a1 * Purpose: Add content directly before the topic title link on the View topic screen From a03965554e7a286057b18a86c561f874759f8f0a Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 16 Oct 2013 00:48:51 +0200 Subject: [PATCH 128/661] [ticket/11924] Reduce unneccessary load PHPBB3-11924 --- phpBB/develop/export_events_for_wiki.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/phpBB/develop/export_events_for_wiki.php b/phpBB/develop/export_events_for_wiki.php index c43d1fdfcd..5acc698a7e 100644 --- a/phpBB/develop/export_events_for_wiki.php +++ b/phpBB/develop/export_events_for_wiki.php @@ -1,17 +1,13 @@ Date: Wed, 16 Oct 2013 16:32:00 +0200 Subject: [PATCH 129/661] [ticket/11924] Add option to export php event list PHPBB3-11924 --- phpBB/develop/export_events_for_wiki.php | 242 +++++++++++++++++++++++ 1 file changed, 242 insertions(+) diff --git a/phpBB/develop/export_events_for_wiki.php b/phpBB/develop/export_events_for_wiki.php index 5acc698a7e..48eb4224b0 100644 --- a/phpBB/develop/export_events_for_wiki.php +++ b/phpBB/develop/export_events_for_wiki.php @@ -18,6 +18,9 @@ function usage() echo "\n"; echo "styles:\n"; echo " Export all events for files in the prosilver and subsilver2 styles.\n"; + echo "\n"; + echo "php:\n"; + echo " Export all events for php-files.\n"; exit(2); } @@ -70,6 +73,241 @@ function export_from_eventsmd($filter) } } +function export_from_php() +{ + global $phpbb_root_path; + + $files = get_file_list($phpbb_root_path); + $events = array(); + foreach ($files as $file) + { + $file_events = check_for_events($file); + if (!empty($file_events)) + { + $events = array_merge($events, $file_events); + } + } + + ksort($events); + + foreach ($events as $event) + { + echo '|- id="' . $event['event'] . '"' . "\n"; + echo '| [[#' . $event['event'] . '|' . $event['event'] . ']] || ' . $event['file'] . ' || ' . implode(', ', $event['arguments']) . ' || ' . $event['since'] . ' || ' . $event['description'] . "\n"; + } +} + +function check_for_events($file) +{ + global $phpbb_root_path; + + $events = array(); + $content = file_get_contents($phpbb_root_path . $file); + + if (strpos($content, "phpbb_dispatcher->trigger_event('") || strpos($content, "phpbb_dispatcher->dispatch('")) + { + $lines = explode("\n", $content); + for ($i = 0, $num_lines = sizeof($lines); $i < $num_lines; $i++) + { + if ($found_trigger_event = strpos($lines[$i], "phpbb_dispatcher->trigger_event('")) + { + $event_line = $i; + $event_name = $lines[$event_line]; + $event_name = substr($event_name, $found_trigger_event + strlen("phpbb_dispatcher->trigger_event('")); + $event_name = substr($event_name, 0, strpos($event_name, "'")); + + // Validate @event name + $find_event_line = 1; + while (strpos($lines[$event_line - $find_event_line], '* @event ') === false) + { + $find_event_line++; + + if ($find_event_line > min(50, $event_line)) + { + throw new LogicException('Can not find @event tag for event "' . $event_name . '" in file "' . $file . '"'); + } + } + $event_name_tag = substr(trim($lines[$event_line - $find_event_line]), strlen('* @event ')); + if ($event_name_tag !== $event_name) + { + throw new LogicException('Event name does not match @event tag for event "' . $event_name . '" in file "' . $file . '"'); + } + + // Find $vars array lines + $find_varsarray_line = 1; + while (strpos($lines[$event_line - $find_varsarray_line], "vars = array('") === false) + { + $find_varsarray_line++; + + if ($find_varsarray_line > min(50, $event_line)) + { + throw new LogicException('Can not find "$vars = array()"-line for event "' . $event_name . '" in file "' . $file . '"'); + } + } + $varsarray = substr(trim($lines[$event_line - $find_varsarray_line]), strlen("\$vars = array('"), -3); + $arguments = explode("', '", $varsarray); + + // Validate $vars array with @var + $find_vars_line = 3; + $doc_vars = array(); + while (strpos(trim($lines[$event_line - $find_vars_line]), '*') === 0) + { + $var_line = trim($lines[$event_line - $find_vars_line]); + $var_line = preg_replace('!\s+!', ' ', $var_line); + if (strpos($var_line, '* @var ') === 0) + { + $doc_line = explode(' ', $var_line); + if (isset($doc_line[3])) + { + $doc_vars[] = $doc_line[3]; + } + } + $find_vars_line++; + } + if (sizeof($arguments) !== sizeof($doc_vars) && array_intersect($arguments, $doc_vars)) + { + throw new LogicException('$vars array does not match the list of @var tags for event "' . $event_name . '" in file "' . $file . '"'); + } + + // Find @since + $find_since_line = 1; + while (strpos($lines[$event_line - $find_since_line], '* @since ') === false) + { + $find_since_line++; + + if ($find_since_line > min(50, $event_line)) + { + throw new LogicException('Can not find @since tag for event "' . $event_name . '" in file "' . $file . '"'); + } + } + $since = substr(trim($lines[$event_line - $find_since_line]), strlen('* @since ')); + $since = ($since == '3.1-A1') ? '3.1.0-a1' : $since; + + // Find event description line + $find_description_line = 3; + while (strpos(trim($lines[$event_line - $find_description_line]), '*') === 0) + { + $find_description_line++; + + if ($find_description_line > min(50, $event_line)) + { + throw new LogicException('Can not find description-line for event "' . $event_name . '" in file "' . $file . '"'); + } + } + $description = substr(trim($lines[$event_line - $find_description_line + 1]), strlen('* ')); + + $events[$event_name] = array( + 'event' => $event_name, + 'file' => $file, + 'arguments' => $arguments, + 'since' => $since, + 'description' => $description, + ); + } + if ($found_trigger_event = strpos($lines[$i], "phpbb_dispatcher->dispatch('")) + { + $event_line = $i; + $event_name = $lines[$event_line]; + $event_name = substr($event_name, $found_trigger_event + strlen("phpbb_dispatcher->dispatch('")); + $event_name = substr($event_name, 0, strpos($event_name, "'")); + + // Validate @event name + $find_event_line = 1; + while (strpos($lines[$event_line - $find_event_line], '* @event ') === false) + { + $find_event_line++; + } + $event_name_tag = substr(trim($lines[$event_line - $find_event_line]), strlen('* @event ')); + if ($event_name_tag !== $event_name) + { + throw new LogicException('Event name does not match @event tag for event "' . $event_name . '" in file "' . $file . '"'); + } + + // Find @since + $find_since_line = 1; + while (strpos($lines[$event_line - $find_since_line], '* @since ') === false) + { + $find_since_line++; + } + $since = substr(trim($lines[$event_line - $find_since_line]), strlen('* @since ')); + $since = ($since == '3.1-A1') ? '3.1.0-a1' : $since; + + // Find event description line + $find_description_line = 3; + while (strpos(trim($lines[$event_line - $find_description_line]), '*') === 0) + { + $find_description_line++; + } + $description = substr(trim($lines[$event_line - $find_description_line + 1]), strlen('* ')); + + $events[$event_name] = array( + 'event' => $event_name, + 'file' => $file, + 'arguments' => array(), + 'since' => $since, + 'description' => $description, + ); + } + } + } + + return $events; +} + +/** +* Returns a list of files in that directory +* +* Works recursive with any depth +* +* @param string $dir Directory to go through +* @return array List of files (including directories from within $dir +*/ +function get_file_list($dir, $path = '') +{ + try + { + $iterator = new \DirectoryIterator($dir); + } + catch (Exception $e) + { + return array(); + } + + $files = array(); + foreach ($iterator as $file_info) + { + if ($file_info->isDot()) + { + continue; + } + + // Do not scan some directories + if ($file_info->isDir() && ( + ($path == '' && in_array($file_info->getFilename(), array('cache', 'develop', 'ext', 'files', 'language', 'store', 'vendor'))) + || ($path == '/includes' && in_array($file_info->getFilename(), array('utf'))) + || ($path == '/phpbb/db/migration' && in_array($file_info->getFilename(), array('data'))) + || ($path == '/phpbb' && in_array($file_info->getFilename(), array('event'))) + )) + { + continue; + } + else if ($file_info->isDir()) + { + $sub_dir = get_file_list($file_info->getPath() . '/' . $file_info->getFilename(), $path . '/' . $file_info->getFilename()); + foreach ($sub_dir as $file) + { + $files[] = $file_info->getFilename() . '/' . $file; + } + } + else if ($file_info->getExtension() == 'php') + { + $files[] = $file_info->getFilename(); + } + } + + return $files; +} + function validate_argument_count($count) { global $argv; @@ -94,6 +332,10 @@ switch ($action) export_from_eventsmd('styles'); break; + case 'php': + export_from_php(); + break; + default: usage(); } From 3c9a8a3788f4dda1ef16430f16d6392a9e6f8dad Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 16 Oct 2013 16:32:40 +0200 Subject: [PATCH 130/661] [ticket/11924] Fix some minor issues with the php event docs PHPBB3-11924 --- phpBB/includes/acp/acp_forums.php | 2 +- phpBB/includes/functions.php | 12 ++++++------ phpBB/includes/ucp/ucp_zebra.php | 2 +- phpBB/posting.php | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php index 258aabcc0d..029f4b23c9 100644 --- a/phpBB/includes/acp/acp_forums.php +++ b/phpBB/includes/acp/acp_forums.php @@ -1470,7 +1470,7 @@ class acp_forums /** * Event when we move content from one forum to another * - * @event core.acp_manage_forums_move_children + * @event core.acp_manage_forums_move_content * @var int from_id If of the current parent forum * @var int to_id If of the new parent forum * @var bool sync Shall we sync the "to"-forum's data diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 947e29ea02..a077dd4078 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -5609,14 +5609,14 @@ function garbage_collection() global $cache, $db; global $phpbb_dispatcher; - /** - * Unload some objects, to free some memory, before we finish our task - * - * @event core.garbage_collection - * @since 3.1-A1 - */ if (!empty($phpbb_dispatcher)) { + /** + * Unload some objects, to free some memory, before we finish our task + * + * @event core.garbage_collection + * @since 3.1-A1 + */ $phpbb_dispatcher->dispatch('core.garbage_collection'); } diff --git a/phpBB/includes/ucp/ucp_zebra.php b/phpBB/includes/ucp/ucp_zebra.php index 6bb3cdc145..090f9bf34c 100644 --- a/phpBB/includes/ucp/ucp_zebra.php +++ b/phpBB/includes/ucp/ucp_zebra.php @@ -64,7 +64,7 @@ class ucp_zebra * @var array user_ids User ids we remove * @since 3.1-A1 */ - $vars = array('user_ids'); + $vars = array('mode', 'user_ids'); extract($phpbb_dispatcher->trigger_event('core.ucp_remove_zebra', compact($vars))); $sql = 'DELETE FROM ' . ZEBRA_TABLE . ' diff --git a/phpBB/posting.php b/phpBB/posting.php index 396b320eac..e29b74af65 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1525,7 +1525,7 @@ $template->assign_vars(array( * @event core.posting_modify_template_vars * @since 3.1-A1 */ -$phpbb_dispatcher->trigger_event('core.posting_modify_template_vars'); +$phpbb_dispatcher->dispatch('core.posting_modify_template_vars'); // Build custom bbcodes array display_custom_bbcodes(); From 91eeebfb07e416d21d9c4fe57e0387f3b075024d Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 16 Oct 2013 16:38:22 +0200 Subject: [PATCH 131/661] [ticket/11924] Remove duplicated code PHPBB3-11924 --- phpBB/develop/export_events_for_wiki.php | 90 ++++++++---------------- 1 file changed, 29 insertions(+), 61 deletions(-) diff --git a/phpBB/develop/export_events_for_wiki.php b/phpBB/develop/export_events_for_wiki.php index 48eb4224b0..cce5939f48 100644 --- a/phpBB/develop/export_events_for_wiki.php +++ b/phpBB/develop/export_events_for_wiki.php @@ -109,6 +109,7 @@ function check_for_events($file) $lines = explode("\n", $content); for ($i = 0, $num_lines = sizeof($lines); $i < $num_lines; $i++) { + $event_line = 0; if ($found_trigger_event = strpos($lines[$i], "phpbb_dispatcher->trigger_event('")) { $event_line = $i; @@ -116,23 +117,6 @@ function check_for_events($file) $event_name = substr($event_name, $found_trigger_event + strlen("phpbb_dispatcher->trigger_event('")); $event_name = substr($event_name, 0, strpos($event_name, "'")); - // Validate @event name - $find_event_line = 1; - while (strpos($lines[$event_line - $find_event_line], '* @event ') === false) - { - $find_event_line++; - - if ($find_event_line > min(50, $event_line)) - { - throw new LogicException('Can not find @event tag for event "' . $event_name . '" in file "' . $file . '"'); - } - } - $event_name_tag = substr(trim($lines[$event_line - $find_event_line]), strlen('* @event ')); - if ($event_name_tag !== $event_name) - { - throw new LogicException('Event name does not match @event tag for event "' . $event_name . '" in file "' . $file . '"'); - } - // Find $vars array lines $find_varsarray_line = 1; while (strpos($lines[$event_line - $find_varsarray_line], "vars = array('") === false) @@ -168,6 +152,34 @@ function check_for_events($file) { throw new LogicException('$vars array does not match the list of @var tags for event "' . $event_name . '" in file "' . $file . '"'); } + } + else if ($found_trigger_event = strpos($lines[$i], "phpbb_dispatcher->dispatch('")) + { + $event_line = $i; + $event_name = $lines[$event_line]; + $event_name = substr($event_name, $found_trigger_event + strlen("phpbb_dispatcher->dispatch('")); + $event_name = substr($event_name, 0, strpos($event_name, "'")); + $arguments = array(); + } + + if ($event_line) + { + // Validate @event name + $find_event_line = 1; + while (strpos($lines[$event_line - $find_event_line], '* @event ') === false) + { + $find_event_line++; + + if ($find_event_line > min(50, $event_line)) + { + throw new LogicException('Can not find @event tag for event "' . $event_name . '" in file "' . $file . '"'); + } + } + $event_name_tag = substr(trim($lines[$event_line - $find_event_line]), strlen('* @event ')); + if ($event_name_tag !== $event_name) + { + throw new LogicException('Event name does not match @event tag for event "' . $event_name . '" in file "' . $file . '"'); + } // Find @since $find_since_line = 1; @@ -204,50 +216,6 @@ function check_for_events($file) 'description' => $description, ); } - if ($found_trigger_event = strpos($lines[$i], "phpbb_dispatcher->dispatch('")) - { - $event_line = $i; - $event_name = $lines[$event_line]; - $event_name = substr($event_name, $found_trigger_event + strlen("phpbb_dispatcher->dispatch('")); - $event_name = substr($event_name, 0, strpos($event_name, "'")); - - // Validate @event name - $find_event_line = 1; - while (strpos($lines[$event_line - $find_event_line], '* @event ') === false) - { - $find_event_line++; - } - $event_name_tag = substr(trim($lines[$event_line - $find_event_line]), strlen('* @event ')); - if ($event_name_tag !== $event_name) - { - throw new LogicException('Event name does not match @event tag for event "' . $event_name . '" in file "' . $file . '"'); - } - - // Find @since - $find_since_line = 1; - while (strpos($lines[$event_line - $find_since_line], '* @since ') === false) - { - $find_since_line++; - } - $since = substr(trim($lines[$event_line - $find_since_line]), strlen('* @since ')); - $since = ($since == '3.1-A1') ? '3.1.0-a1' : $since; - - // Find event description line - $find_description_line = 3; - while (strpos(trim($lines[$event_line - $find_description_line]), '*') === 0) - { - $find_description_line++; - } - $description = substr(trim($lines[$event_line - $find_description_line + 1]), strlen('* ')); - - $events[$event_name] = array( - 'event' => $event_name, - 'file' => $file, - 'arguments' => array(), - 'since' => $since, - 'description' => $description, - ); - } } } From 2867831232e8c4cb2e556b7fd157a9e0111fa696 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Wed, 16 Oct 2013 09:43:45 -0700 Subject: [PATCH 132/661] [ticket/11921] Move any HTML for Notifications to the templates PHPBB3-11921 --- phpBB/includes/functions.php | 2 +- phpBB/includes/ucp/ucp_notifications.php | 2 +- phpBB/language/en/common.php | 1 - phpBB/styles/prosilver/template/overall_header.html | 4 ++-- phpBB/styles/prosilver/template/ucp_notifications.html | 4 ++-- phpBB/styles/subsilver2/template/overall_header.html | 4 ++-- phpBB/styles/subsilver2/template/ucp_notifications.html | 2 +- 7 files changed, 9 insertions(+), 10 deletions(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 310045ed82..a06be1960c 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -5352,7 +5352,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 'HIDDEN_FIELDS_FOR_JUMPBOX' => $hidden_fields_for_jumpbox, 'UNREAD_NOTIFICATIONS_COUNT' => ($notifications !== false) ? $notifications['unread_count'] : '', - 'NOTIFICATIONS_COUNT' => ($notifications !== false) ? $user->lang('NOTIFICATIONS_COUNT', $notifications['unread_count']) : '', + 'NOTIFICATIONS_COUNT' => ($notifications !== false) ? $notifications['unread_count'] : '', 'U_VIEW_ALL_NOTIFICATIONS' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=ucp_notifications'), 'U_NOTIFICATION_SETTINGS' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=ucp_notifications&mode=notification_options'), 'S_NOTIFICATIONS_DISPLAY' => $config['load_notifications'], diff --git a/phpBB/includes/ucp/ucp_notifications.php b/phpBB/includes/ucp/ucp_notifications.php index 2f22f6cf9c..145963837c 100644 --- a/phpBB/includes/ucp/ucp_notifications.php +++ b/phpBB/includes/ucp/ucp_notifications.php @@ -140,7 +140,7 @@ class ucp_notifications $template->assign_vars(array( 'PAGE_NUMBER' => phpbb_on_page($template, $user, $base_url, $notifications['total_count'], $config['topics_per_page'], $start), - 'TOTAL_COUNT' => $user->lang('NOTIFICATIONS_COUNT', $notifications['total_count']), + 'TOTAL_COUNT' => $notifications['total_count'], 'U_MARK_ALL' => $base_url . '&mark=all&token=' . generate_link_hash('mark_all_notifications_read'), )); diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index 3afbc426aa..bb1c4698ec 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -413,7 +413,6 @@ $lang = array_merge($lang, array( 'NOT_WATCHING_FORUM' => 'You are no longer subscribed to updates on this forum.', 'NOT_WATCHING_TOPIC' => 'You are no longer subscribed to this topic.', 'NOTIFICATIONS' => 'Notifications', - 'NOTIFICATIONS_COUNT' => 'Notifications (%d)', 'NOTIFICATION_BOOKMARK' => '%1$s replied to the topic "%2$s" you have bookmarked.', 'NOTIFICATION_GROUP_REQUEST' => '%1$s is requesting to join the group %2$s.', 'NOTIFICATION_GROUP_REQUEST_APPROVED' => 'Your request to join the group %1$s has been approved.', diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html index 6f787f023c..f2f47332d7 100644 --- a/phpBB/styles/prosilver/template/overall_header.html +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -98,7 +98,7 @@