mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
Merge branch 'develop' of https://github.com/phpbb/phpbb into ticket/11997
Conflicts: tests/functional/fixtures/ext/foo/bar/config/services.yml
This commit is contained in:
commit
47ea6bc9e6
183 changed files with 3570 additions and 1986 deletions
|
@ -10,6 +10,9 @@ env:
|
|||
- DB=mysql
|
||||
- DB=postgres
|
||||
|
||||
services:
|
||||
- redis-server
|
||||
|
||||
install:
|
||||
- sh -c "if [ '$DB' = 'mariadb' ]; then travis/setup-mariadb.sh; fi"
|
||||
- sh -c "if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.3.19', '>=');"` = "1" ]; then travis/setup-webserver.sh; fi"
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
<project name="phpBB" description="The phpBB forum software" default="all" basedir="../">
|
||||
<!-- a few settings for the build -->
|
||||
<property name="newversion" value="3.1.0-a1" />
|
||||
<property name="prevversion" value="3.0.12" />
|
||||
<property name="olderversions" value="3.0.11" />
|
||||
<property name="newversion" value="3.1.0-a2" />
|
||||
<property name="prevversion" value="3.1.0-a1" />
|
||||
<property name="olderversions" value="3.0.12" />
|
||||
<!-- no configuration should be needed beyond this point -->
|
||||
|
||||
<property name="oldversions" value="${olderversions}, ${prevversion}" />
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<form id="acp_extensions" method="post" action="{U_PURGE}">
|
||||
<fieldset class="submit-buttons">
|
||||
<legend>{L_EXTENSION_DELETE_DATA}</legend>
|
||||
<input class="button1" type="submit" name="purge" value="{L_EXTENSION_DELETE_DATA}" />
|
||||
<input class="button1" type="submit" name="delete_data" value="{L_EXTENSION_DELETE_DATA}" />
|
||||
<input class="button2" type="submit" name="cancel" value="{L_CANCEL}" />
|
||||
</fieldset>
|
||||
</form>
|
||||
|
|
|
@ -92,7 +92,12 @@
|
|||
</dl>
|
||||
<dl>
|
||||
<dt><label for="group_colour">{L_GROUP_COLOR}{L_COLON}</label><br /><span>{L_GROUP_COLOR_EXPLAIN}</span></dt>
|
||||
<dd><input name="group_colour" type="text" id="group_colour" value="{GROUP_COLOUR}" size="6" maxlength="6" /><!-- IF GROUP_COLOUR --> <span style="background-color: #{GROUP_COLOUR}"> </span><!-- ENDIF --> <span>[ <a href="{U_SWATCH}" onclick="popup(this.href, 636, 150, '_swatch'); return false">{L_COLOUR_SWATCH}</a> ]</span></dd>
|
||||
<dd>
|
||||
<input name="group_colour" type="text" id="group_colour" value="{GROUP_COLOUR}" size="6" maxlength="6" />
|
||||
<!-- IF GROUP_COLOUR --> <span style="background-color: #{GROUP_COLOUR}"> </span><!-- ENDIF --> <span>
|
||||
[ <a href="#" id="color_palette_toggle">{L_COLOUR_SWATCH}</a> ]</span>
|
||||
<div id="color_palette_placeholder" style="display: none;" data-orientation="h" data-height="12" data-width="15" data-target="#group_colour"></div>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="group_rank">{L_GROUP_RANK}{L_COLON}</label></dt>
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
</table>
|
||||
|
||||
<fieldset class="display-options">
|
||||
{L_DISPLAY_LOG}{L_COLON} {S_LIMIT_DAYS} {L_SORT_BY}{L_COLON} {S_SORT_KEY} {S_SORT_DIR}<!-- IF .pagination --> Users per page{L_COLON} <input class="inputbox autowidth" type="number" name="users_per_page" id="users_per_page" size="3" value="{USERS_PER_PAGE}" /><!-- ENDIF -->
|
||||
{L_DISPLAY_LOG}{L_COLON} {S_LIMIT_DAYS} {L_SORT_BY}{L_COLON} {S_SORT_KEY} {S_SORT_DIR}<!-- IF .pagination --> {L_USERS_PER_PAGE}{L_COLON} <input class="inputbox autowidth" type="number" name="users_per_page" id="users_per_page" size="3" value="{USERS_PER_PAGE}" /><!-- ENDIF -->
|
||||
<input class="button2" type="submit" value="{L_GO}" name="sort" />
|
||||
</fieldset>
|
||||
|
||||
|
|
|
@ -151,7 +151,7 @@
|
|||
<td style="width: 15%; white-space: nowrap; text-align: center; vertical-align: middle;"> <!-- IF modules.MODULE_ENABLED --><a href="{modules.U_DISABLE}">{L_DISABLE}</a><!-- ELSE --><a href="{modules.U_ENABLE}">{L_ENABLE}</a><!-- ENDIF --> </td>
|
||||
<td class="actions">
|
||||
<span class="up-disabled" style="display:none;">{ICON_MOVE_UP_DISABLED}</span>
|
||||
<span class="up"><a href="{modules.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a></span>
|
||||
<span class="up"><a href="{modules.U_MOVE_UP}">{ICON_MOVE_UP}</a></span>
|
||||
<span class="down-disabled" style="display:none;">{ICON_MOVE_DOWN_DISABLED}</span>
|
||||
<span class="down"><a href="{modules.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a></span>
|
||||
<a href="{modules.U_EDIT}">{ICON_EDIT}</a>
|
||||
|
|
|
@ -39,11 +39,11 @@
|
|||
</dl>
|
||||
<dl>
|
||||
<dt><label for="posts_on_queue">{L_POSTS_ON_QUEUE}{L_COLON}</label></dt>
|
||||
<dd><select name="queue_select">{S_COUNT_OPTIONS}</select> <input type="number" id="posts_on_queue" name="posts_on_queue" /></select>
|
||||
<dd><select name="queue_select">{S_COUNT_OPTIONS}</select> <input type="number" id="posts_on_queue" name="posts_on_queue" /></dd>
|
||||
</dl>
|
||||
<!-- IF S_GROUP_LIST -->
|
||||
<dl>
|
||||
<dt><label for="group_id">{L_GROUP}{L_COLON}</label><br /><span>{L_PRUNE_USERS_GROUP_EXPLAIN}</dt>
|
||||
<dt><label for="group_id">{L_GROUP}{L_COLON}</label><br /><span>{L_PRUNE_USERS_GROUP_EXPLAIN}</span></dt>
|
||||
<dd><select name="group_id">{S_GROUP_LIST}</select></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
|
|
|
@ -39,11 +39,6 @@
|
|||
<dd><label><input type="radio" class="radio" name="notifypm" value="1"<!-- IF NOTIFY_PM --> id="notifypm" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="notifypm" value="0"<!-- IF not NOTIFY_PM --> id="notifypm" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="popuppm">{L_POPUP_ON_PM}{L_COLON}</label></dt>
|
||||
<dd><label><input type="radio" class="radio" name="popuppm" value="1"<!-- IF POPUP_PM --> id="popuppm" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="popuppm" value="0"<!-- IF not POPUP_PM --> id="popuppm" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="lang">{L_BOARD_LANGUAGE}{L_COLON}</label></dt>
|
||||
<dd><select id="lang" name="lang">{S_LANG_OPTIONS}</select></dd>
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
var form_name = 'user_signature';
|
||||
var text_name = 'signature';
|
||||
var load_draft = false;
|
||||
var upload = false;
|
||||
|
||||
// Define the bbCode tags
|
||||
var bbcode = new Array();
|
||||
|
@ -20,11 +22,11 @@
|
|||
o: '{LA_BBCODE_O_HELP}',
|
||||
p: '{LA_BBCODE_P_HELP}',
|
||||
w: '{LA_BBCODE_W_HELP}',
|
||||
a: '{LA_BBCODE_A_HELP}',
|
||||
s: '{LA_BBCODE_S_HELP}',
|
||||
f: '{LA_BBCODE_F_HELP}',
|
||||
y: '{LA_BBCODE_Y_HELP}',
|
||||
d: '{LA_BBCODE_D_HELP}',
|
||||
tip: '{L_STYLES_TIP}'
|
||||
d: '{LA_BBCODE_D_HELP}'
|
||||
<!-- BEGIN custom_tags -->
|
||||
,cb_{custom_tags.BBCODE_ID}{L_COLON} '{custom_tags.A_BBCODE_HELPLINE}'
|
||||
<!-- END custom_tags -->
|
||||
|
@ -32,7 +34,7 @@
|
|||
|
||||
// ]]>
|
||||
</script>
|
||||
<script type="text/javascript" src="{T_TEMPLATE_PATH}/editor.js"></script>
|
||||
<!-- INCLUDEJS {T_ASSETS_PATH}/javascript/editor.js -->
|
||||
|
||||
<form id="user_signature" method="post" action="{U_ACTION}">
|
||||
|
||||
|
@ -48,52 +50,46 @@
|
|||
<p>{L_SIGNATURE_EXPLAIN}</p>
|
||||
|
||||
<div id="format-buttons">
|
||||
<input type="button" class="button2" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px;" onclick="bbstyle(0)" onmouseover="helpline('b')" onmouseout="helpline('tip')" />
|
||||
<input type="button" class="button2" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px;" onclick="bbstyle(2)" onmouseover="helpline('i')" onmouseout="helpline('tip')" />
|
||||
<input type="button" class="button2" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px;" onclick="bbstyle(4)" onmouseover="helpline('u')" onmouseout="helpline('tip')" />
|
||||
<input type="button" class="button2" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" onmouseover="helpline('q')" onmouseout="helpline('tip')" />
|
||||
<input type="button" class="button2" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" onmouseover="helpline('c')" onmouseout="helpline('tip')" />
|
||||
<input type="button" class="button2" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" onmouseover="helpline('l')" onmouseout="helpline('tip')" />
|
||||
<input type="button" class="button2" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" onmouseover="helpline('o')" onmouseout="helpline('tip')" />
|
||||
<input type="button" class="button2" accesskey="y" name="addlistitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" onmouseover="helpline('y')" onmouseout="helpline('tip')" />
|
||||
<input type="button" class="button2" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onclick="bbstyle(0)" title="{L_BBCODE_B_HELP}" />
|
||||
<input type="button" class="button2" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px" onclick="bbstyle(2)" title="{L_BBCODE_I_HELP}" />
|
||||
<input type="button" class="button2" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px" onclick="bbstyle(4)" title="{L_BBCODE_U_HELP}" />
|
||||
<!-- IF S_BBCODE_QUOTE -->
|
||||
<input type="button" class="button2" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" title="{L_BBCODE_Q_HELP}" />
|
||||
<!-- ENDIF -->
|
||||
<input type="button" class="button2" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" title="{L_BBCODE_C_HELP}" />
|
||||
<input type="button" class="button2" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" title="{L_BBCODE_L_HELP}" />
|
||||
<input type="button" class="button2" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" title="{L_BBCODE_O_HELP}" />
|
||||
<input type="button" class="button2" accesskey="y" name="addlistitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" title="{L_BBCODE_LISTITEM_HELP}" />
|
||||
<!-- IF S_BBCODE_IMG -->
|
||||
<input type="button" class="button2" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" onmouseover="helpline('p')" onmouseout="helpline('tip')" />
|
||||
<input type="button" class="button2" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" title="{L_BBCODE_P_HELP}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_LINKS_ALLOWED -->
|
||||
<input type="button" class="button2" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" onmouseover="helpline('w')" onmouseout="helpline('tip')" />
|
||||
<input type="button" class="button2" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" title="{L_BBCODE_W_HELP}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_BBCODE_FLASH -->
|
||||
<input type="button" class="button2" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" onmouseover="helpline('d')" onmouseout="helpline('tip')" />
|
||||
<input type="button" class="button2" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" title="{L_BBCODE_D_HELP}" />
|
||||
<!-- ENDIF -->
|
||||
|
||||
{L_FONT_SIZE}{L_COLON} <select name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" title="{L_FONT_SIZE}" onmouseover="helpline('f')" onmouseout="helpline('tip')">
|
||||
<select name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" title="{L_BBCODE_F_HELP}">
|
||||
<option value="50">{L_FONT_TINY}</option>
|
||||
<option value="85">{L_FONT_SMALL}</option>
|
||||
<option value="100" selected="selected">{L_FONT_NORMAL}</option>
|
||||
<option value="150">{L_FONT_LARGE}</option>
|
||||
<option value="200">{L_FONT_HUGE}</option>
|
||||
<!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 150 -->
|
||||
<option value="150">{L_FONT_LARGE}</option>
|
||||
<!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 200 -->
|
||||
<option value="200">{L_FONT_HUGE}</option>
|
||||
<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
</select>
|
||||
<!-- IF .custom_tags -->
|
||||
<br /><br />
|
||||
<!-- BEGIN custom_tags -->
|
||||
<input type="button" class="button2" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})"<!-- IF custom_tags.BBCODE_HELPLINE !== '' --> onmouseover="helpline('cb_{custom_tags.BBCODE_ID}')" onmouseout="helpline('tip')"<!-- ENDIF --> />
|
||||
<input type="button" class="button2" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})" title="{custom_tags.BBCODE_HELPLINE}" />
|
||||
<!-- END custom_tags -->
|
||||
<!-- ENDIF -->
|
||||
|
||||
</div>
|
||||
|
||||
<p><input type="text" class="text full" style="border: 0; background: none;" name="helpbox" value="{L_STYLES_TIP}" /></p>
|
||||
|
||||
<dl>
|
||||
<dt style="width: 90px;">
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
colorPalette('v', 12, 10);
|
||||
// ]]>
|
||||
</script>
|
||||
<dt style="width: 90px;" id="color_palette_placeholder" data-orientation="v" data-height="12" data-width="15" data-bbcode="true">
|
||||
</dt>
|
||||
<dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 90px;"><textarea name="signature" rows="10" cols="60" style="width: 95%;" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onfocus="initInsertions();" data-bbcode="true">{SIGNATURE}</textarea></dd>
|
||||
<dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 90px; margin-top: 5px;">
|
||||
<dd style="margin-{S_CONTENT_FLOW_BEGIN}: 90px;"><textarea name="signature" rows="10" cols="60" style="width: 95%;" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onfocus="initInsertions();" data-bbcode="true">{SIGNATURE}</textarea></dd>
|
||||
<dd style="margin-{S_CONTENT_FLOW_BEGIN}: 90px; margin-top: 5px;">
|
||||
<!-- IF S_BBCODE_ALLOWED -->
|
||||
<label><input type="checkbox" class="radio" name="disable_bbcode"{S_BBCODE_CHECKED} /> {L_DISABLE_BBCODE}</label>
|
||||
<!-- ENDIF -->
|
||||
|
@ -104,7 +100,7 @@
|
|||
<label><input type="checkbox" class="radio" name="disable_magic_url"{S_MAGIC_URL_CHECKED} /> {L_DISABLE_MAGIC_URL}</label>
|
||||
<!-- ENDIF -->
|
||||
</dd>
|
||||
<dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 90px; margin-top: 10px;"><strong>{L_OPTIONS}{L_COLON} </strong>{BBCODE_STATUS} :: {IMG_STATUS} :: {FLASH_STATUS} :: {URL_STATUS} :: {SMILIES_STATUS}</dd>
|
||||
<dd style="margin-{S_CONTENT_FLOW_BEGIN}: 90px; margin-top: 10px;"><strong>{L_OPTIONS}{L_COLON} </strong>{BBCODE_STATUS} :: {IMG_STATUS} :: {FLASH_STATUS} :: {URL_STATUS} :: {SMILIES_STATUS}</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
|
|
|
@ -381,6 +381,14 @@ li {
|
|||
color: #BC2A4D;
|
||||
}
|
||||
|
||||
#tabs a:hover {
|
||||
background-position: 0 -69px;
|
||||
}
|
||||
|
||||
#tabs a:hover span {
|
||||
background-position: 100% -69px;
|
||||
}
|
||||
|
||||
#tabs .activetab a {
|
||||
background-position: 0 0;
|
||||
border-bottom: 1px solid #DCDEE2;
|
||||
|
@ -392,14 +400,6 @@ li {
|
|||
color: #23649F;
|
||||
}
|
||||
|
||||
#tabs a:hover {
|
||||
background-position: 0 -69px;
|
||||
}
|
||||
|
||||
#tabs a:hover span {
|
||||
background-position: 100% -69px;
|
||||
}
|
||||
|
||||
#tabs .activetab a:hover span {
|
||||
color: #115098;
|
||||
}
|
||||
|
@ -737,6 +737,15 @@ td {
|
|||
border-spacing: 1px;
|
||||
}
|
||||
|
||||
dt#color_palette_placeholder table {
|
||||
margin-right: 5px;
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
#color_palette_placeholder td {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
table.type2 {
|
||||
border: none;
|
||||
background: none;
|
||||
|
@ -1578,6 +1587,8 @@ input.button1:focus, input.button2:focus, input.button3:focus {
|
|||
|
||||
#darkenwrapper {
|
||||
display: none;
|
||||
position: relative;
|
||||
z-index: 44;
|
||||
}
|
||||
|
||||
#darken {
|
||||
|
@ -2354,11 +2365,14 @@ fieldset.permissions .padding {
|
|||
.dropdown .dropdown-contents {
|
||||
z-index: 2;
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
background: #fff;
|
||||
border: 1px solid #b9b9b9;
|
||||
border-radius: 5px;
|
||||
padding: 5px;
|
||||
position: relative;
|
||||
min-width: 40px;
|
||||
max-height: 200px;
|
||||
box-shadow: 1px 3px 5px rgba(0, 0, 0, 0.2);
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
|
|
|
@ -133,6 +133,9 @@ function parse_document(container)
|
|||
column += colspan;
|
||||
});
|
||||
});
|
||||
|
||||
// Remove <dfn> in disabled extensions list
|
||||
$this.find('tr.ext_disabled > .empty:nth-child(2) + .empty').siblings(':first-child').children('dfn').remove();
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,82 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{L_COLOUR_SWATCH}</title>
|
||||
|
||||
<style type="text/css">
|
||||
/* <![CDATA[ */
|
||||
body {
|
||||
background-color: #404040;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
td {
|
||||
border: solid 1px #333;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.over {
|
||||
border-color: white;
|
||||
}
|
||||
|
||||
.out {
|
||||
border-color: #333333;
|
||||
}
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
}
|
||||
/* ]]> */
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
var r = 0, g = 0, b = 0;
|
||||
|
||||
var numberList = new Array(6);
|
||||
numberList[0] = '00';
|
||||
numberList[1] = '33';
|
||||
numberList[2] = '66';
|
||||
numberList[3] = '99';
|
||||
numberList[4] = 'CC';
|
||||
numberList[5] = 'FF';
|
||||
|
||||
document.writeln('<table>');
|
||||
|
||||
for (r = 0; r < 6; r++)
|
||||
{
|
||||
document.writeln('<tr>');
|
||||
|
||||
for (g = 0; g < 6; g++)
|
||||
{
|
||||
for (b = 0; b < 6; b++)
|
||||
{
|
||||
color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
|
||||
document.write('<td style="background-color: #' + color + ';" onmouseover="this.className=\'over\'" onmouseout="this.className=\'out\'">');
|
||||
document.write('<a href="#" onclick="cell(\'' + color + '\'); return false;"><img src="{T_IMAGES_PATH}spacer.gif" width="13" height="10" alt="#' + color + '" title="#' + color + '" \/><\/a>');
|
||||
document.writeln('<\/td>');
|
||||
}
|
||||
}
|
||||
document.writeln('<\/tr>');
|
||||
}
|
||||
document.writeln('<\/table>');
|
||||
|
||||
function cell(color)
|
||||
{
|
||||
opener.document.forms["{OPENER}"].{NAME}.value = color;
|
||||
}
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,336 +0,0 @@
|
|||
/**
|
||||
* bbCode control by subBlue design [ www.subBlue.com ]
|
||||
* Includes unixsafe colour palette selector by SHS`
|
||||
*/
|
||||
|
||||
// Startup variables
|
||||
var imageTag = false;
|
||||
var theSelection = false;
|
||||
|
||||
// Check for Browser & Platform for PC & IE specific bits
|
||||
// More details from: http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html
|
||||
var clientPC = navigator.userAgent.toLowerCase(); // Get client info
|
||||
var clientVer = parseInt(navigator.appVersion, 10); // Get browser version
|
||||
|
||||
var is_ie = ((clientPC.indexOf('msie') !== -1) && (clientPC.indexOf('opera') === -1));
|
||||
var is_win = ((clientPC.indexOf('win') !== -1) || (clientPC.indexOf('16bit') !== -1));
|
||||
var baseHeight;
|
||||
|
||||
/**
|
||||
* Shows the help messages in the helpline window
|
||||
*/
|
||||
function helpline(help) {
|
||||
document.forms[form_name].helpbox.value = help_line[help];
|
||||
}
|
||||
|
||||
/**
|
||||
* Fix a bug involving the TextRange object. From
|
||||
* http://www.frostjedi.com/terra/scripts/demo/caretBug.html
|
||||
*/
|
||||
function initInsertions() {
|
||||
var doc;
|
||||
|
||||
if (document.forms[form_name]) {
|
||||
doc = document;
|
||||
} else {
|
||||
doc = opener.document;
|
||||
}
|
||||
|
||||
var textarea = doc.forms[form_name].elements[text_name];
|
||||
|
||||
if (is_ie && typeof(baseHeight) !== 'number') {
|
||||
textarea.focus();
|
||||
baseHeight = doc.selection.createRange().duplicate().boundingHeight;
|
||||
|
||||
if (!document.forms[form_name]) {
|
||||
document.body.focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* bbstyle
|
||||
*/
|
||||
function bbstyle(bbnumber) {
|
||||
if (bbnumber !== -1) {
|
||||
bbfontstyle(bbtags[bbnumber], bbtags[bbnumber+1]);
|
||||
} else {
|
||||
insert_text('[*]');
|
||||
document.forms[form_name].elements[text_name].focus();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply bbcodes
|
||||
*/
|
||||
function bbfontstyle(bbopen, bbclose) {
|
||||
theSelection = false;
|
||||
|
||||
var textarea = document.forms[form_name].elements[text_name];
|
||||
|
||||
textarea.focus();
|
||||
|
||||
if ((clientVer >= 4) && is_ie && is_win) {
|
||||
// Get text selection
|
||||
theSelection = document.selection.createRange().text;
|
||||
|
||||
if (theSelection) {
|
||||
// Add tags around selection
|
||||
document.selection.createRange().text = bbopen + theSelection + bbclose;
|
||||
document.forms[form_name].elements[text_name].focus();
|
||||
theSelection = '';
|
||||
return;
|
||||
}
|
||||
} else if (document.forms[form_name].elements[text_name].selectionEnd
|
||||
&& (document.forms[form_name].elements[text_name].selectionEnd - document.forms[form_name].elements[text_name].selectionStart > 0)) {
|
||||
mozWrap(document.forms[form_name].elements[text_name], bbopen, bbclose);
|
||||
document.forms[form_name].elements[text_name].focus();
|
||||
theSelection = '';
|
||||
return;
|
||||
}
|
||||
|
||||
//The new position for the cursor after adding the bbcode
|
||||
var caret_pos = getCaretPosition(textarea).start;
|
||||
var new_pos = caret_pos + bbopen.length;
|
||||
|
||||
// Open tag
|
||||
insert_text(bbopen + bbclose);
|
||||
|
||||
// Center the cursor when we don't have a selection
|
||||
// Gecko and proper browsers
|
||||
if (!isNaN(textarea.selectionStart)) {
|
||||
textarea.selectionStart = new_pos;
|
||||
textarea.selectionEnd = new_pos;
|
||||
}
|
||||
// IE
|
||||
else if (document.selection) {
|
||||
var range = textarea.createTextRange();
|
||||
range.move("character", new_pos);
|
||||
range.select();
|
||||
storeCaret(textarea);
|
||||
}
|
||||
|
||||
textarea.focus();
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert text at position
|
||||
*/
|
||||
function insert_text(text, spaces, popup) {
|
||||
var textarea;
|
||||
|
||||
if (!popup) {
|
||||
textarea = document.forms[form_name].elements[text_name];
|
||||
} else {
|
||||
textarea = opener.document.forms[form_name].elements[text_name];
|
||||
}
|
||||
|
||||
if (spaces) {
|
||||
text = ' ' + text + ' ';
|
||||
}
|
||||
|
||||
if (!isNaN(textarea.selectionStart)) {
|
||||
var sel_start = textarea.selectionStart;
|
||||
var sel_end = textarea.selectionEnd;
|
||||
|
||||
mozWrap(textarea, text, '');
|
||||
textarea.selectionStart = sel_start + text.length;
|
||||
textarea.selectionEnd = sel_end + text.length;
|
||||
} else if (textarea.createTextRange && textarea.caretPos) {
|
||||
if (baseHeight !== textarea.caretPos.boundingHeight) {
|
||||
textarea.focus();
|
||||
storeCaret(textarea);
|
||||
}
|
||||
|
||||
var caret_pos = textarea.caretPos;
|
||||
caret_pos.text = caret_pos.text.charAt(caret_pos.text.length - 1) === ' ' ? caret_pos.text + text + ' ' : caret_pos.text + text;
|
||||
} else {
|
||||
textarea.value = textarea.value + text;
|
||||
}
|
||||
|
||||
if (!popup) {
|
||||
textarea.focus();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add inline attachment at position
|
||||
*/
|
||||
function attach_inline(index, filename) {
|
||||
insert_text('[attachment=' + index + ']' + filename + '[/attachment]');
|
||||
document.forms[form_name].elements[text_name].focus();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add quote text to message
|
||||
*/
|
||||
function addquote(post_id, username)
|
||||
{
|
||||
var message_name = 'message_' + post_id;
|
||||
var theSelection = '';
|
||||
var divarea = false;
|
||||
|
||||
if (document.all) {
|
||||
divarea = document.all[message_name];
|
||||
} else {
|
||||
divarea = document.getElementById(message_name);
|
||||
}
|
||||
|
||||
// Get text selection - not only the post content :(
|
||||
if (window.getSelection) {
|
||||
theSelection = window.getSelection().toString();
|
||||
} else if (document.getSelection) {
|
||||
theSelection = document.getSelection();
|
||||
} else if (document.selection) {
|
||||
theSelection = document.selection.createRange().text;
|
||||
}
|
||||
|
||||
if (theSelection === '' || typeof theSelection === 'undefined' || theSelection === null) {
|
||||
if (divarea.innerHTML) {
|
||||
theSelection = divarea.innerHTML.replace(/<br>/ig, '\n');
|
||||
theSelection = theSelection.replace(/<br\/>/ig, '\n');
|
||||
theSelection = theSelection.replace(/<\;/ig, '<');
|
||||
theSelection = theSelection.replace(/>\;/ig, '>');
|
||||
theSelection = theSelection.replace(/&\;/ig, '&');
|
||||
theSelection = theSelection.replace(/ \;/ig, ' ');
|
||||
} else if (document.all) {
|
||||
theSelection = divarea.innerText;
|
||||
} else if (divarea.textContent) {
|
||||
theSelection = divarea.textContent;
|
||||
} else if (divarea.firstChild.nodeValue) {
|
||||
theSelection = divarea.firstChild.nodeValue;
|
||||
}
|
||||
}
|
||||
|
||||
if (theSelection) {
|
||||
insert_text('[quote="' + username + '"]' + theSelection + '[/quote]');
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* From http://www.massless.org/mozedit/
|
||||
*/
|
||||
function mozWrap(txtarea, open, close) {
|
||||
var selLength = (typeof(txtarea.textLength) === 'undefined') ? txtarea.value.length : txtarea.textLength;
|
||||
var selStart = txtarea.selectionStart;
|
||||
var selEnd = txtarea.selectionEnd;
|
||||
var scrollTop = txtarea.scrollTop;
|
||||
|
||||
if (selEnd === 1 || selEnd === 2) {
|
||||
selEnd = selLength;
|
||||
}
|
||||
|
||||
var s1 = (txtarea.value).substring(0,selStart);
|
||||
var s2 = (txtarea.value).substring(selStart, selEnd);
|
||||
var s3 = (txtarea.value).substring(selEnd, selLength);
|
||||
|
||||
txtarea.value = s1 + open + s2 + close + s3;
|
||||
txtarea.selectionStart = selStart + open.length;
|
||||
txtarea.selectionEnd = selEnd + open.length;
|
||||
txtarea.focus();
|
||||
txtarea.scrollTop = scrollTop;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert at Caret position. Code from
|
||||
* http://www.faqts.com/knowledge_base/view.phtml/aid/1052/fid/130
|
||||
*/
|
||||
function storeCaret(textEl) {
|
||||
if (textEl.createTextRange) {
|
||||
textEl.caretPos = document.selection.createRange().duplicate();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Color pallette
|
||||
*/
|
||||
function colorPalette(dir, width, height) {
|
||||
var r = 0, g = 0, b = 0;
|
||||
var numberList = new Array(6);
|
||||
var color = '';
|
||||
|
||||
numberList[0] = '00';
|
||||
numberList[1] = '40';
|
||||
numberList[2] = '80';
|
||||
numberList[3] = 'BF';
|
||||
numberList[4] = 'FF';
|
||||
|
||||
document.writeln('<table class="type2">');
|
||||
|
||||
for (r = 0; r < 5; r++) {
|
||||
if (dir === 'h') {
|
||||
document.writeln('<tr>');
|
||||
}
|
||||
|
||||
for (g = 0; g < 5; g++) {
|
||||
if (dir === 'v') {
|
||||
document.writeln('<tr>');
|
||||
}
|
||||
|
||||
for (b = 0; b < 5; b++) {
|
||||
color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
|
||||
document.write('<td bgcolor="#' + color + '" style="width: ' + width + 'px; height: ' + height + 'px;">');
|
||||
document.write('<a href="#" onclick="bbfontstyle(\'[color=#' + color + ']\', \'[/color]\'); return false;"><img src="images/spacer.gif" width="' + width + '" height="' + height + '" alt="#' + color + '" title="#' + color + '" /></a>');
|
||||
document.writeln('</td>');
|
||||
}
|
||||
|
||||
if (dir === 'v') {
|
||||
document.writeln('</tr>');
|
||||
}
|
||||
}
|
||||
|
||||
if (dir === 'h') {
|
||||
document.writeln('</tr>');
|
||||
}
|
||||
}
|
||||
document.writeln('</table>');
|
||||
}
|
||||
|
||||
/**
|
||||
* Caret Position object
|
||||
*/
|
||||
function caretPosition() {
|
||||
var start = null;
|
||||
var end = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the caret position in an textarea
|
||||
*/
|
||||
function getCaretPosition(txtarea) {
|
||||
var caretPos = new caretPosition();
|
||||
|
||||
// simple Gecko/Opera way
|
||||
if (txtarea.selectionStart || txtarea.selectionStart === 0) {
|
||||
caretPos.start = txtarea.selectionStart;
|
||||
caretPos.end = txtarea.selectionEnd;
|
||||
}
|
||||
// dirty and slow IE way
|
||||
else if (document.selection) {
|
||||
// get current selection
|
||||
var range = document.selection.createRange();
|
||||
|
||||
// a new selection of the whole textarea
|
||||
var range_all = document.body.createTextRange();
|
||||
range_all.moveToElementText(txtarea);
|
||||
|
||||
// calculate selection start point by moving beginning of range_all to beginning of range
|
||||
var sel_start;
|
||||
for (sel_start = 0; range_all.compareEndPoints('StartToStart', range) < 0; sel_start++) {
|
||||
range_all.moveStart('character', 1);
|
||||
}
|
||||
|
||||
txtarea.sel_start = sel_start;
|
||||
|
||||
// we ignore the end value for IE, this is already dirty enough and we don't need it
|
||||
caretPos.start = txtarea.sel_start;
|
||||
caretPos.end = txtarea.sel_start;
|
||||
}
|
||||
|
||||
return caretPos;
|
||||
}
|
|
@ -36,9 +36,9 @@
|
|||
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
|
||||
<!-- INCLUDEJS ajax.js -->
|
||||
<!-- INCLUDEJS admin.js -->
|
||||
{$SCRIPTS}
|
||||
|
||||
<!-- EVENT acp_overall_footer_after -->
|
||||
{$SCRIPTS}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -103,7 +103,11 @@ function popup(url, width, height, name)
|
|||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
<!-- EVENT acp_overall_header_head_append -->
|
||||
|
||||
{$STYLESHEETS}
|
||||
|
||||
</head>
|
||||
|
||||
<body class="{S_CONTENT_DIRECTION} nojs">
|
||||
|
@ -153,7 +157,6 @@ function popup(url, width, height, name)
|
|||
</ul>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="main">
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @copyright (c) 2005 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
define('IN_PHPBB', true);
|
||||
define('ADMIN_START', true);
|
||||
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
include($phpbb_root_path . 'common.' . $phpEx);
|
||||
|
||||
// Start session management
|
||||
$user->session_begin(false);
|
||||
$auth->acl($user->data);
|
||||
$user->setup();
|
||||
|
||||
// Set custom template for admin area
|
||||
$template->set_custom_style('adm', $phpbb_admin_path . 'style');
|
||||
|
||||
$template->set_filenames(array(
|
||||
'body' => 'colour_swatch.html')
|
||||
);
|
||||
|
||||
$form = request_var('form', '');
|
||||
$name = request_var('name', '');
|
||||
|
||||
// We validate form and name here, only id/class allowed
|
||||
$form = (!preg_match('/^[a-z0-9_-]+$/i', $form)) ? '' : $form;
|
||||
$name = (!preg_match('/^[a-z0-9_-]+$/i', $name)) ? '' : $name;
|
||||
|
||||
$template->assign_vars(array(
|
||||
'OPENER' => $form,
|
||||
'NAME' => $name,
|
||||
'T_IMAGES_PATH' => "{$phpbb_root_path}images/",
|
||||
|
||||
'S_USER_LANG' => $user->lang['USER_LANG'],
|
||||
'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
|
||||
'S_CONTENT_ENCODING' => 'UTF-8',
|
||||
));
|
||||
|
||||
$template->display('body');
|
||||
|
||||
garbage_collection();
|
|
@ -15,6 +15,7 @@ var dark = $('#darkenwrapper');
|
|||
var loadingIndicator = $('#loading_indicator');
|
||||
var phpbbAlertTimer = null;
|
||||
|
||||
var isTouch = (window && typeof window.ontouchstart !== 'undefined');
|
||||
|
||||
/**
|
||||
* Display a loading screen
|
||||
|
@ -335,7 +336,7 @@ phpbb.ajaxify = function(options) {
|
|||
$.ajax({
|
||||
url: res.S_CONFIRM_ACTION,
|
||||
type: 'POST',
|
||||
data: data + '&confirm=' + res.YES_VALUE,
|
||||
data: data + '&confirm=' + res.YES_VALUE + '&' + $('#phpbb_confirm form').serialize(),
|
||||
success: returnHandler,
|
||||
error: errorHandler
|
||||
});
|
||||
|
@ -623,8 +624,9 @@ phpbb.resizeTextArea = function(items, options) {
|
|||
resetCallback: function(item) { }
|
||||
};
|
||||
|
||||
if (arguments.length > 1)
|
||||
{
|
||||
if (isTouch) return;
|
||||
|
||||
if (arguments.length > 1) {
|
||||
configuration = $.extend(configuration, options);
|
||||
}
|
||||
|
||||
|
@ -929,6 +931,14 @@ phpbb.toggleDropdown = function() {
|
|||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Toggle dropdown submenu
|
||||
*/
|
||||
phpbb.toggleSubmenu = function(e) {
|
||||
$(this).siblings('.dropdown-submenu').toggle();
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
/**
|
||||
* Register dropdown menu
|
||||
* Shows/hides dropdown, decides which side to open to
|
||||
|
@ -960,8 +970,96 @@ phpbb.registerDropdown = function(toggle, dropdown, options)
|
|||
toggle.data('dropdown-options', ops);
|
||||
|
||||
toggle.click(phpbb.toggleDropdown);
|
||||
$('.dropdown-toggle-submenu', ops.parent).click(phpbb.toggleSubmenu);
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the HTML for a color palette table.
|
||||
*
|
||||
* @param string dir Palette direction - either v or h
|
||||
* @param int width Palette cell width.
|
||||
* @param int height Palette cell height.
|
||||
*/
|
||||
phpbb.colorPalette = function(dir, width, height) {
|
||||
var r = 0,
|
||||
g = 0,
|
||||
b = 0,
|
||||
numberList = new Array(6),
|
||||
color = '',
|
||||
html = '';
|
||||
|
||||
numberList[0] = '00';
|
||||
numberList[1] = '40';
|
||||
numberList[2] = '80';
|
||||
numberList[3] = 'BF';
|
||||
numberList[4] = 'FF';
|
||||
|
||||
html += '<table style="width: auto;">';
|
||||
|
||||
for (r = 0; r < 5; r++) {
|
||||
if (dir == 'h') {
|
||||
html += '<tr>';
|
||||
}
|
||||
|
||||
for (g = 0; g < 5; g++) {
|
||||
if (dir == 'v') {
|
||||
html += '<tr>';
|
||||
}
|
||||
|
||||
for (b = 0; b < 5; b++) {
|
||||
color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
|
||||
html += '<td style="background-color: #' + color + '; width: ' + width + 'px; height: ' + height + 'px;">';
|
||||
html += '<a href="#" data-color="' + color + '" style="display: block; width: ' + width + 'px; height: ' + height + 'px; " alt="#' + color + '" title="#' + color + '"></a>';
|
||||
html += '</td>';
|
||||
}
|
||||
|
||||
if (dir == 'v') {
|
||||
html += '</tr>';
|
||||
}
|
||||
}
|
||||
|
||||
if (dir == 'h') {
|
||||
html += '</tr>';
|
||||
}
|
||||
}
|
||||
html += '</table>';
|
||||
return html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a color palette.
|
||||
*
|
||||
* @param object el jQuery object for the palette container.
|
||||
*/
|
||||
phpbb.registerPalette = function(el) {
|
||||
var orientation = el.attr('data-orientation'),
|
||||
height = el.attr('data-height'),
|
||||
width = el.attr('data-width'),
|
||||
target = el.attr('data-target'),
|
||||
bbcode = el.attr('data-bbcode');
|
||||
|
||||
// Insert the palette HTML into the container.
|
||||
el.html(phpbb.colorPalette(orientation, width, height));
|
||||
|
||||
// Add toggle control.
|
||||
$('#color_palette_toggle').click(function(e) {
|
||||
el.toggle();
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
// Attach event handler when a palette cell is clicked.
|
||||
$(el).on('click', 'a', function(e) {
|
||||
var color = $(this).attr('data-color');
|
||||
|
||||
if (bbcode) {
|
||||
bbfontstyle('[color=#' + color + ']', '[/color]');
|
||||
} else {
|
||||
$(target).val(color);
|
||||
}
|
||||
e.preventDefault();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply code editor to all textarea elements with data-bbcode attribute
|
||||
*/
|
||||
|
@ -977,6 +1075,10 @@ $(document).ready(function() {
|
|||
$(phpbb.dropdownHandles).each(phpbb.toggleDropdown);
|
||||
}
|
||||
});
|
||||
|
||||
$('#color_palette_placeholder').each(function() {
|
||||
phpbb.registerPalette($(this));
|
||||
});
|
||||
});
|
||||
|
||||
})(jQuery); // Avoid conflicts with other libraries
|
||||
|
|
|
@ -294,63 +294,6 @@ function storeCaret(textEl) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Color pallette
|
||||
*/
|
||||
function colorPalette(dir, width, height) {
|
||||
var r = 0,
|
||||
g = 0,
|
||||
b = 0,
|
||||
numberList = new Array(6),
|
||||
color = '',
|
||||
html = '';
|
||||
|
||||
numberList[0] = '00';
|
||||
numberList[1] = '40';
|
||||
numberList[2] = '80';
|
||||
numberList[3] = 'BF';
|
||||
numberList[4] = 'FF';
|
||||
|
||||
html += '<table>';
|
||||
|
||||
for (r = 0; r < 5; r++) {
|
||||
if (dir == 'h') {
|
||||
html += '<tr>';
|
||||
}
|
||||
|
||||
for (g = 0; g < 5; g++) {
|
||||
if (dir == 'v') {
|
||||
html += '<tr>';
|
||||
}
|
||||
|
||||
for (b = 0; b < 5; b++) {
|
||||
color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
|
||||
html += '<td style="background-color: #' + color + '; width: ' + width + 'px; height: ' + height + 'px;">';
|
||||
html += '<a href="#" onclick="bbfontstyle(\'[color=#' + color + ']\', \'[/color]\'); return false;" style="display: block; width: ' + width + 'px; height: ' + height + 'px; " alt="#' + color + '" title="#' + color + '"></a>';
|
||||
html += '</td>';
|
||||
}
|
||||
|
||||
if (dir == 'v') {
|
||||
html += '</tr>';
|
||||
}
|
||||
}
|
||||
|
||||
if (dir == 'h') {
|
||||
html += '</tr>';
|
||||
}
|
||||
}
|
||||
html += '</table>';
|
||||
return html;
|
||||
}
|
||||
|
||||
(function($) {
|
||||
$(document).ready(function() {
|
||||
$('#color_palette_placeholder').each(function() {
|
||||
$(this).html(colorPalette('h', 15, 12));
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
|
||||
/**
|
||||
* Caret Position object
|
||||
*/
|
|
@ -1,177 +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;
|
||||
}
|
||||
/*
|
||||
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;
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
1
phpBB/assets/plupload/jquery.plupload.queue/jquery.plupload.queue.min.js
vendored
Normal file
1
phpBB/assets/plupload/jquery.plupload.queue/jquery.plupload.queue.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
28
phpBB/assets/plupload/plupload.full.min.js
vendored
Normal file
28
phpBB/assets/plupload/plupload.full.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
36
phpBB/bin/phpbbcli.php
Executable file
36
phpBB/bin/phpbbcli.php
Executable file
|
@ -0,0 +1,36 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @copyright (c) 2013 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
if (php_sapi_name() != 'cli')
|
||||
{
|
||||
echo 'This program must be run from the command line.' . PHP_EOL;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
define('IN_PHPBB', true);
|
||||
$phpbb_root_path = __DIR__ . '/../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
require($phpbb_root_path . 'includes/startup.' . $phpEx);
|
||||
require($phpbb_root_path . 'config.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/constants.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/functions.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/functions_container.' . $phpEx);
|
||||
require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx);
|
||||
|
||||
$phpbb_class_loader = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}phpbb/", $phpEx);
|
||||
$phpbb_class_loader->register();
|
||||
$phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx);
|
||||
$phpbb_class_loader_ext->register();
|
||||
|
||||
$phpbb_container = phpbb_create_update_container($phpbb_root_path, $phpEx, "$phpbb_root_path/config");
|
||||
|
||||
$application = new \phpbb\console\application('phpBB Console', PHPBB_VERSION);
|
||||
$application->register_container_commands($phpbb_container);
|
||||
$application->run();
|
|
@ -3,6 +3,7 @@
|
|||
"require": {
|
||||
"lusitanian/oauth": "0.2.*",
|
||||
"symfony/config": "2.3.*",
|
||||
"symfony/console": "2.3.*",
|
||||
"symfony/dependency-injection": "2.3.*",
|
||||
"symfony/event-dispatcher": "2.3.*",
|
||||
"symfony/http-kernel": "2.3.*",
|
||||
|
|
55
phpBB/composer.lock
generated
55
phpBB/composer.lock
generated
|
@ -3,7 +3,7 @@
|
|||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
|
||||
],
|
||||
"hash": "7bcfe8f8ce4fa46cb53c276cf93dcd3e",
|
||||
"hash": "cc83663b780856890f787b9b4d6ea474",
|
||||
"packages": [
|
||||
{
|
||||
"name": "lusitanian/oauth",
|
||||
|
@ -154,6 +154,59 @@
|
|||
"homepage": "http://symfony.com",
|
||||
"time": "2013-08-06 05:49:23"
|
||||
},
|
||||
{
|
||||
"name": "symfony/console",
|
||||
"version": "v2.3.6",
|
||||
"target-dir": "Symfony/Component/Console",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/Console.git",
|
||||
"reference": "f880062d56edefb25b36f2defa65aafe65959dc7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/Console/zipball/f880062d56edefb25b36f2defa65aafe65959dc7",
|
||||
"reference": "f880062d56edefb25b36f2defa65aafe65959dc7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/event-dispatcher": "~2.1"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/event-dispatcher": ""
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.3-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Symfony\\Component\\Console\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "http://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony Console Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2013-09-25 06:04:15"
|
||||
},
|
||||
{
|
||||
"name": "symfony/debug",
|
||||
"version": "v2.3.4",
|
||||
|
|
35
phpBB/config/console.yml
Normal file
35
phpBB/config/console.yml
Normal file
|
@ -0,0 +1,35 @@
|
|||
services:
|
||||
console.command.extension.disable:
|
||||
class: phpbb\console\command\extension\disable
|
||||
arguments:
|
||||
- @ext.manager
|
||||
tags:
|
||||
- { name: console.command }
|
||||
|
||||
console.command.extension.enable:
|
||||
class: phpbb\console\command\extension\enable
|
||||
arguments:
|
||||
- @ext.manager
|
||||
tags:
|
||||
- { name: console.command }
|
||||
|
||||
console.command.extension.purge:
|
||||
class: phpbb\console\command\extension\purge
|
||||
arguments:
|
||||
- @ext.manager
|
||||
tags:
|
||||
- { name: console.command }
|
||||
|
||||
console.command.extension.show:
|
||||
class: phpbb\console\command\extension\show
|
||||
arguments:
|
||||
- @ext.manager
|
||||
tags:
|
||||
- { name: console.command }
|
||||
|
||||
console.command.fixup.recalculate_email_hash:
|
||||
class: phpbb\console\command\fixup\recalculate_email_hash
|
||||
arguments:
|
||||
- @dbal.conn
|
||||
tags:
|
||||
- { name: console.command }
|
43
phpBB/config/mimetype_guessers.yml
Normal file
43
phpBB/config/mimetype_guessers.yml
Normal file
|
@ -0,0 +1,43 @@
|
|||
parameters:
|
||||
mimetype.guesser.priority.lowest: -2
|
||||
mimetype.guesser.priority.low: -1
|
||||
mimetype.guesser.priority.default: 0
|
||||
mimetype.guesser.priority.high: 1
|
||||
mimetype.guesser.priority.highest: 2
|
||||
|
||||
services:
|
||||
mimetype.fileinfo_mimetype_guesser:
|
||||
class: Symfony\Component\HttpFoundation\File\MimeType\FileinfoMimeTypeGuesser
|
||||
tags:
|
||||
- { name: mimetype.guessers }
|
||||
|
||||
mimetype.filebinary_mimetype_guesser:
|
||||
class: Symfony\Component\HttpFoundation\File\MimeType\FileBinaryMimeTypeGuesser
|
||||
tags:
|
||||
- { name: mimetype.guessers }
|
||||
|
||||
mimetype.content_guesser:
|
||||
class: phpbb\mimetype\content_guesser
|
||||
calls:
|
||||
- [set_priority, [%mimetype.guesser.priority.low%]]
|
||||
tags:
|
||||
- { name: mimetype.guessers }
|
||||
|
||||
mimetype.extension_guesser:
|
||||
class: phpbb\mimetype\extension_guesser
|
||||
calls:
|
||||
- [set_priority, [%mimetype.guesser.priority.lowest%]]
|
||||
tags:
|
||||
- { name: mimetype.guessers }
|
||||
|
||||
mimetype.guesser_collection:
|
||||
class: phpbb\di\service_collection
|
||||
arguments:
|
||||
- @service_container
|
||||
tags:
|
||||
- { name: service_collection, tag: mimetype.guessers }
|
||||
|
||||
mimetype.guesser:
|
||||
class: phpbb\mimetype\guesser
|
||||
arguments:
|
||||
- @mimetype.guesser_collection
|
|
@ -6,6 +6,8 @@ imports:
|
|||
- { resource: avatars.yml }
|
||||
- { resource: feed.yml }
|
||||
- { resource: auth_providers.yml }
|
||||
- { resource: console.yml }
|
||||
- { resource: mimetype_guessers.yml }
|
||||
|
||||
services:
|
||||
acl.permissions:
|
||||
|
@ -140,10 +142,17 @@ services:
|
|||
class: phpbb\event\extension_subscriber_loader
|
||||
arguments:
|
||||
- @dispatcher
|
||||
- @ext.manager
|
||||
- @event.listener_collection
|
||||
calls:
|
||||
- [load, []]
|
||||
|
||||
event.listener_collection:
|
||||
class: phpbb\di\service_collection
|
||||
arguments:
|
||||
- @service_container
|
||||
tags:
|
||||
- { name: service_collection, tag: event.listener }
|
||||
|
||||
ext.manager:
|
||||
class: phpbb\extension\manager
|
||||
arguments:
|
||||
|
@ -236,6 +245,7 @@ services:
|
|||
- @notification.method_collection
|
||||
- @service_container
|
||||
- @user_loader
|
||||
- @config
|
||||
- @dbal.conn
|
||||
- @cache
|
||||
- @user
|
||||
|
@ -265,6 +275,7 @@ services:
|
|||
- @request
|
||||
- @user
|
||||
- @php_ini
|
||||
- @mimetype.guesser
|
||||
|
||||
request:
|
||||
class: phpbb\request\request
|
||||
|
|
|
@ -1,129 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @copyright (c) 2012 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
define('IN_PHPBB', 1);
|
||||
define('ANONYMOUS', 1);
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
$phpbb_root_path = __DIR__.'/../';
|
||||
|
||||
include($phpbb_root_path . 'common.'.$phpEx);
|
||||
|
||||
function usage()
|
||||
{
|
||||
echo "Usage: extensions.php COMMAND [OPTION]...\n";
|
||||
echo "Console extension manager.\n";
|
||||
echo "\n";
|
||||
echo "list:\n";
|
||||
echo " Lists all extensions in the database and the filesystem.\n";
|
||||
echo "\n";
|
||||
echo "enable NAME:\n";
|
||||
echo " Enables the specified extension.\n";
|
||||
echo "\n";
|
||||
echo "disable NAME:\n";
|
||||
echo " Disables the specified extension.\n";
|
||||
echo "\n";
|
||||
echo "purge NAME:\n";
|
||||
echo " Purges the specified extension.\n";
|
||||
exit(2);
|
||||
}
|
||||
|
||||
function list_extensions()
|
||||
{
|
||||
global $phpbb_extension_manager;
|
||||
|
||||
$phpbb_extension_manager->load_extensions();
|
||||
$all = array_keys($phpbb_extension_manager->all_available());
|
||||
|
||||
if (empty($all))
|
||||
{
|
||||
echo "There were no extensions found.\n";
|
||||
exit(3);
|
||||
}
|
||||
|
||||
echo "Enabled:\n";
|
||||
$enabled = array_keys($phpbb_extension_manager->all_enabled());
|
||||
print_extensions($enabled);
|
||||
echo "\n";
|
||||
|
||||
echo "Disabled:\n";
|
||||
$disabled = array_keys($phpbb_extension_manager->all_disabled());
|
||||
print_extensions($disabled);
|
||||
echo "\n";
|
||||
|
||||
echo "Available:\n";
|
||||
$purged = array_diff($all, $enabled, $disabled);
|
||||
print_extensions($purged);
|
||||
}
|
||||
|
||||
function print_extensions($exts)
|
||||
{
|
||||
foreach ($exts as $ext)
|
||||
{
|
||||
echo "- $ext\n";
|
||||
}
|
||||
}
|
||||
|
||||
function enable_extension($name)
|
||||
{
|
||||
global $phpbb_extension_manager;
|
||||
|
||||
$phpbb_extension_manager->enable($name);
|
||||
}
|
||||
|
||||
function disable_extension($name)
|
||||
{
|
||||
global $phpbb_extension_manager;
|
||||
|
||||
$phpbb_extension_manager->disable($name);
|
||||
}
|
||||
|
||||
function purge_extension($name)
|
||||
{
|
||||
global $phpbb_extension_manager;
|
||||
|
||||
$phpbb_extension_manager->purge($name);
|
||||
}
|
||||
|
||||
function validate_argument_count($count)
|
||||
{
|
||||
global $argv;
|
||||
|
||||
if (count($argv) <= $count)
|
||||
{
|
||||
usage();
|
||||
}
|
||||
}
|
||||
|
||||
validate_argument_count(1);
|
||||
|
||||
$action = $argv[1];
|
||||
|
||||
switch ($action)
|
||||
{
|
||||
case 'list':
|
||||
list_extensions();
|
||||
break;
|
||||
|
||||
case 'enable':
|
||||
validate_argument_count(2);
|
||||
enable_extension($argv[2]);
|
||||
break;
|
||||
|
||||
case 'disable':
|
||||
validate_argument_count(2);
|
||||
disable_extension($argv[2]);
|
||||
break;
|
||||
|
||||
case 'purge':
|
||||
validate_argument_count(2);
|
||||
purge_extension($argv[2]);
|
||||
break;
|
||||
|
||||
default:
|
||||
usage();
|
||||
}
|
|
@ -46,6 +46,7 @@
|
|||
<ol>
|
||||
<li><a href="#changelog">Changelog</a>
|
||||
<ol style="list-style-type: lower-roman;">
|
||||
<li><a href="#v310a1">Changes since 3.1.0-a1</a></li>
|
||||
<li><a href="#v30x">Changes since 3.0.x</a></li>
|
||||
<li><a href="#v3011">Changes since 3.0.11</a></li>
|
||||
<li><a href="#v3010">Changes since 3.0.10</a></li>
|
||||
|
@ -87,7 +88,83 @@
|
|||
|
||||
<div class="content">
|
||||
|
||||
<a name="v30x"></a><h3>1.i. Changes since 3.0.x</h3>
|
||||
<a name="v310a1"></a><h3>1.i. Changes since 3.1.0-a1</h3>
|
||||
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-4776">PHPBB3-4776</a>] - Long post gets hidden behind posting profile</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10449">PHPBB3-10449</a>] - Lines spilling in subscriptions view</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10948">PHPBB3-10948</a>] - Color swatch in 3.1 does not display properly</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11030">PHPBB3-11030</a>] - I beam cursor in prosilver when hovering on browse button for uploading attachments</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11073">PHPBB3-11073</a>] - Reported/Unapproved moderator information in viewtopic is striked through instead of underlined</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11138">PHPBB3-11138</a>] - Resync features in ACP should not use AJAX</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11280">PHPBB3-11280</a>] - Double clicking "mark topics read" produces an error the second time</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11525">PHPBB3-11525</a>] - phpbb_avatar_manager::clean_row collapses user_id and group_id</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11534">PHPBB3-11534</a>] - Remote avatar does not properly check if remote file is an image</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11626">PHPBB3-11626</a>] - Auth ACP options should be moved to separate html file</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11663">PHPBB3-11663</a>] - In generate_text_for_storage the function does not check for errors of parse_message:parse() and act accordingly</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11691">PHPBB3-11691</a>] - Soft delete migration conversion should be staggered</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11739">PHPBB3-11739</a>] - Wrong name for UCP Module "Edit "Remember Me" login keys"</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11842">PHPBB3-11842</a>] - Create a new group Error with avatar driver</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11857">PHPBB3-11857</a>] - Avatar manager must not depend on entire container</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11872">PHPBB3-11872</a>] - MCP: Users with most warnings list is invalid</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11896">PHPBB3-11896</a>] - "Mark all notifications read" does not work</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11899">PHPBB3-11899</a>] - New ajax poll vote should give feedback while waiting for servers response</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11916">PHPBB3-11916</a>] - Remove files from hidden attach list after deletion</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11922">PHPBB3-11922</a>] - Migrator fails to remove columns on MSSQL when they have/had an index</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11923">PHPBB3-11923</a>] - UCP avatar error when user has no permissions to change his/her avatar</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11924">PHPBB3-11924</a>] - Add a script to export the events in wiki format</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11926">PHPBB3-11926</a>] - Plupload Migration has a broken dependency.</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11927">PHPBB3-11927</a>] - Missing Files after 3.1.0-A1 Automatic Updater</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11930">PHPBB3-11930</a>] - Avatar paths are incorrect when using app.php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11935">PHPBB3-11935</a>] - Invalid HTML in "Sort By" form elements in Prosilver</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11936">PHPBB3-11936</a>] - Fixes to Notifications Window</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11939">PHPBB3-11939</a>] - Quick reply editor has unnecessary data-ajax attribute</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11943">PHPBB3-11943</a>] - $VAR = false has unexpected result</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11945">PHPBB3-11945</a>] - Focused buttons are hard to notice</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11947">PHPBB3-11947</a>] - Notification popup does not appear when clicking number in text</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11948">PHPBB3-11948</a>] - Extensions should be allowed to have more then 1 routing file</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11949">PHPBB3-11949</a>] - cannot upgrade to 3.1</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11960">PHPBB3-11960</a>] - Responsive design removed teampage names</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11972">PHPBB3-11972</a>] - Add template event posting_editor_subject_after</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11977">PHPBB3-11977</a>] - Ajax delete should disable moving options</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11982">PHPBB3-11982</a>] - Navigation is shown above AJAX background in ACP</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11983">PHPBB3-11983</a>] - Subscriptions argument missing from docblock in ucp_notifications</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11986">PHPBB3-11986</a>] - Undefined index: poster_id in file.php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11987">PHPBB3-11987</a>] - {ROOT_PATH} in ACP leads to adm/</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11990">PHPBB3-11990</a>] - Remove result_mssqlnative from acp_database</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11991">PHPBB3-11991</a>] - PHP notices when closing reported posts entries in MCP</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11992">PHPBB3-11992</a>] - Wrong variable to close "Users with most warnings" block at MCP</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11994">PHPBB3-11994</a>] - Admin options for extensions are bad/misleading</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11995">PHPBB3-11995</a>] - Reverting a config.remove fails</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12002">PHPBB3-12002</a>] - Extension management page should use generate/check link hash</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12007">PHPBB3-12007</a>] - Default last_result of callable steps must be integer instead of false</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12008">PHPBB3-12008</a>] - "Prune notifications" cron task always ran, blocking others</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12016">PHPBB3-12016</a>] - Event listeners should be services</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12017">PHPBB3-12017</a>] - Extension tests are broken on current develop</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12018">PHPBB3-12018</a>] - Use path_helper for admin style CSS in sql report</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12023">PHPBB3-12023</a>] - New css files missing after update</li>
|
||||
</ul>
|
||||
<h4>Improvement</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11552">PHPBB3-11552</a>] - Responsive design for prosilver</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11746">PHPBB3-11746</a>] - Add "account activation required" notification for Administrators</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11921">PHPBB3-11921</a>] - Improve Notifications and PMs in the header</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11928">PHPBB3-11928</a>] - Replace AJAX loading info pop up with animation</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11957">PHPBB3-11957</a>] - Responsive design for admin control panel</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11973">PHPBB3-11973</a>] - Remove logic from language files where possible</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11974">PHPBB3-11974</a>] - All timezones should be translatable</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11975">PHPBB3-11975</a>] - Add ACP link next to MCP</li>
|
||||
</ul>
|
||||
<h4>Task</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11031">PHPBB3-11031</a>] - Bring phpBB2 converter up to speed with 3.1 changes</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11980">PHPBB3-11980</a>] - Setup PHP Code Sniffer</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11981">PHPBB3-11981</a>] - Review/Fix Code Sniffer complaints</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11998">PHPBB3-11998</a>] - Add console / command line client environment </li>
|
||||
</ul>
|
||||
|
||||
<a name="v30x"></a><h3>1.ii. Changes since 3.0.x</h3>
|
||||
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
|
@ -768,7 +845,7 @@
|
|||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11913">PHPBB3-11913</a>] - Apply reorganisation of download.phpbb.com to build_announcement.php</li>
|
||||
</ul>
|
||||
|
||||
<a name="v3011"></a><h3>1.ii. Changes since 3.0.11</h3>
|
||||
<a name="v3011"></a><h3>1.iii. Changes since 3.0.11</h3>
|
||||
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
|
@ -923,7 +1000,7 @@
|
|||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11753">PHPBB3-11753</a>] - Upgrade mysql_upgrader.php schema data.</li>
|
||||
</ul>
|
||||
|
||||
<a name="v3010"></a><h3>1.iii. Changes since 3.0.10</h3>
|
||||
<a name="v3010"></a><h3>1.iv. Changes since 3.0.10</h3>
|
||||
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
|
@ -1048,7 +1125,7 @@
|
|||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10909">PHPBB3-10909</a>] - Update Travis Test Configuration: Travis no longer supports PHP 5.3.2</li>
|
||||
</ul>
|
||||
|
||||
<a name="v309"></a><h3>1.iv. Changes since 3.0.9</h3>
|
||||
<a name="v309"></a><h3>1.v. Changes since 3.0.9</h3>
|
||||
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
|
@ -1184,7 +1261,7 @@
|
|||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10480">PHPBB3-10480</a>] - Automate changelog building</li>
|
||||
</ul>
|
||||
|
||||
<a name="v308"></a><h3>1.v. Changes since 3.0.8</h3>
|
||||
<a name="v308"></a><h3>1.vi. Changes since 3.0.8</h3>
|
||||
|
||||
<h4> Bug
|
||||
</h4>
|
||||
|
@ -1552,7 +1629,7 @@
|
|||
</ul>
|
||||
|
||||
|
||||
<a name="v307-PL1"></a><h3>1.vi. Changes since 3.0.7-PL1</h3>
|
||||
<a name="v307-PL1"></a><h3>1.vii. Changes since 3.0.7-PL1</h3>
|
||||
<h4> Security
|
||||
</h4>
|
||||
<ul>
|
||||
|
@ -2010,13 +2087,13 @@
|
|||
</ul>
|
||||
|
||||
|
||||
<a name="v307"></a><h3>1.vii. Changes since 3.0.7</h3>
|
||||
<a name="v307"></a><h3>1.viii. Changes since 3.0.7</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Sec] Do not expose forum content of forums with ACL entries but no actual permission in ATOM Feeds. (Bug #58595)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v306"></a><h3>1.viii. Changes since 3.0.6</h3>
|
||||
<a name="v306"></a><h3>1.ix. Changes since 3.0.6</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Allow ban reason and length to be selected and copied in ACP and subsilver2 MCP. (Bug #51095)</li>
|
||||
|
@ -2120,7 +2197,7 @@
|
|||
|
||||
</ul>
|
||||
|
||||
<a name="v305"></a><h3>1.ix. Changes since 3.0.5</h3>
|
||||
<a name="v305"></a><h3>1.x. Changes since 3.0.5</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Allow whitespaces in avatar gallery names. (Bug #44955)</li>
|
||||
|
@ -2342,7 +2419,7 @@
|
|||
<li>[Feature] Send anonymous statistical information to phpBB on installation and update (optional).</li>
|
||||
</ul>
|
||||
|
||||
<a name="v304"></a><h3>1.x. Changes since 3.0.4</h3>
|
||||
<a name="v304"></a><h3>1.xi. Changes since 3.0.4</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Delete user entry from ban list table upon user deletion (Bug #40015 - Patch by TerraFrost)</li>
|
||||
|
@ -2431,7 +2508,7 @@
|
|||
<li>[Sec] Only use forum id supplied for posting if global announcement detected. (Reported by nickvergessen)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v303"></a><h3>1.xi. Changes since 3.0.3</h3>
|
||||
<a name="v303"></a><h3>1.xii. Changes since 3.0.3</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Allow mixed-case template directories to be inherited (Bug #36725)</li>
|
||||
|
@ -2463,7 +2540,7 @@
|
|||
<li>[Sec] Ask for forum password if post within passworded forum quoted in private message. (Reported by nickvergessen)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v302"></a><h3>1.xii. Changes since 3.0.2</h3>
|
||||
<a name="v302"></a><h3>1.xiii. Changes since 3.0.2</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Correctly set topic starter if first post in topic removed (Bug #30575 - Patch by blueray2048)</li>
|
||||
|
@ -2562,7 +2639,7 @@
|
|||
<li>[Sec Precaution] Stricter validation of the HTTP_HOST header (Thanks to Techie-Micheal et al for pointing out possible issues in derived code)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v301"></a><h3>1.xiii. Changes since 3.0.1</h3>
|
||||
<a name="v301"></a><h3>1.xiv. Changes since 3.0.1</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Ability to set permissions on non-mysql dbms (Bug #24955)</li>
|
||||
|
@ -2610,7 +2687,7 @@
|
|||
<li>[Sec] Only allow urls gone through redirect() being used within login_box(). (thanks nookieman)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v300"></a><h3>1.xiv Changes since 3.0.0</h3>
|
||||
<a name="v300"></a><h3>1.xv Changes since 3.0.0</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Change] Validate birthdays (Bug #15004)</li>
|
||||
|
@ -2681,7 +2758,7 @@
|
|||
<li>[Fix] Find and display colliding usernames correctly when converting from one database to another (Bug #23925)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc8"></a><h3>1.xv. Changes since 3.0.RC8</h3>
|
||||
<a name="v30rc8"></a><h3>1.xvi. Changes since 3.0.RC8</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Cleaned usernames contain only single spaces, so "a_name" and "a__name" are treated as the same name (Bug #15634)</li>
|
||||
|
@ -2690,7 +2767,7 @@
|
|||
<li>[Fix] Call garbage_collection() within database updater to correctly close connections (affects Oracle for example)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc7"></a><h3>1.xvi. Changes since 3.0.RC7</h3>
|
||||
<a name="v30rc7"></a><h3>1.xvii. Changes since 3.0.RC7</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Fixed MSSQL related bug in the update system</li>
|
||||
|
@ -2725,7 +2802,7 @@
|
|||
<li>[Fix] No duplication of active topics (Bug #15474)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc6"></a><h3>1.xvii. Changes since 3.0.RC6</h3>
|
||||
<a name="v30rc6"></a><h3>1.xviii. Changes since 3.0.RC6</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Submitting language changes using acp_language (Bug #14736)</li>
|
||||
|
@ -2735,7 +2812,7 @@
|
|||
<li>[Fix] Able to request new password (Bug #14743)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc5"></a><h3>1.xviii. Changes since 3.0.RC5</h3>
|
||||
<a name="v30rc5"></a><h3>1.xix. Changes since 3.0.RC5</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Feature] Removing constant PHPBB_EMBEDDED in favor of using an exit_handler(); the constant was meant to achive this more or less.</li>
|
||||
|
@ -2798,7 +2875,7 @@
|
|||
<li>[Sec] New password hashing mechanism for storing passwords (#i42)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc4"></a><h3>1.xix. Changes since 3.0.RC4</h3>
|
||||
<a name="v30rc4"></a><h3>1.xx. Changes since 3.0.RC4</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] MySQL, PostgreSQL and SQLite related database fixes (Bug #13862)</li>
|
||||
|
@ -2849,7 +2926,7 @@
|
|||
<li>[Fix] odbc_autocommit causing existing result sets to be dropped (Bug #14182)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc3"></a><h3>1.xx. Changes since 3.0.RC3</h3>
|
||||
<a name="v30rc3"></a><h3>1.xxi. Changes since 3.0.RC3</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Fixing some subsilver2 and prosilver style issues</li>
|
||||
|
@ -2958,7 +3035,7 @@
|
|||
|
||||
</ul>
|
||||
|
||||
<a name="v30rc2"></a><h3>1.xxi. Changes since 3.0.RC2</h3>
|
||||
<a name="v30rc2"></a><h3>1.xxii. Changes since 3.0.RC2</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Re-allow searching within the memberlist</li>
|
||||
|
@ -3004,7 +3081,7 @@
|
|||
|
||||
</ul>
|
||||
|
||||
<a name="v30rc1"></a><h3>1.xxii. Changes since 3.0.RC1</h3>
|
||||
<a name="v30rc1"></a><h3>1.xxiii. Changes since 3.0.RC1</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] (X)HTML issues within the templates (Bug #11255, #11255)</li>
|
||||
|
|
|
@ -54,6 +54,14 @@ forumlist_body_last_post_title_prepend
|
|||
* 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_forumlist_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/index_body.html
|
||||
+ styles/subsilver2/template/index_body.html
|
||||
* Since: 3.1.0-a3
|
||||
* Purpose: Add content above the forums list (on forum index only)
|
||||
|
||||
index_body_stat_blocks_before
|
||||
===
|
||||
* Locations:
|
||||
|
@ -111,6 +119,14 @@ overall_footer_breadcrumb_append
|
|||
* Since: 3.1.0-a1
|
||||
* Purpose: Add links to the list of breadcrumbs in the footer
|
||||
|
||||
overall_footer_content_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/overall_footer.html
|
||||
+ styles/subsilver2/template/overall_footer.html
|
||||
* Since: 3.1.0-a3
|
||||
* Purpose: Add content on all pages after the main content, before the footer
|
||||
|
||||
overall_footer_copyright_append
|
||||
===
|
||||
* Locations:
|
||||
|
@ -135,6 +151,14 @@ overall_header_breadcrumb_append
|
|||
* Since: 3.1.0-a1
|
||||
* Purpose: Add links to the list of breadcrumbs in the header
|
||||
|
||||
overall_header_content_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/overall_header.html
|
||||
+ styles/subsilver2/template/overall_header.html
|
||||
* Since: 3.1.0-a3
|
||||
* Purpose: Add content on all pages before the main content, after the header
|
||||
|
||||
overall_header_head_append
|
||||
===
|
||||
* Locations:
|
||||
|
@ -375,3 +399,17 @@ viewtopic_topic_title_prepend
|
|||
+ 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
|
||||
|
||||
viewtopic_topic_tools_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_topic_tools.html
|
||||
* Since: 3.1.0-a3
|
||||
* Purpose: Add a new topic tool after the rest of the existing ones
|
||||
|
||||
viewtopic_topic_tools_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_topic_tools.html
|
||||
* Since: 3.1.0-a3
|
||||
* Purpose: Add a new topic tool before the rest of the existing ones
|
||||
|
|
|
@ -55,6 +55,11 @@ class acp_extensions
|
|||
$ext_name = '';
|
||||
}
|
||||
|
||||
if (in_array($action, array('enable', 'disable', 'delete_data')) && !check_link_hash($request->variable('hash', ''), $action . '.' . $ext_name))
|
||||
{
|
||||
trigger_error('FORM_INVALID', E_USER_WARNING);
|
||||
}
|
||||
|
||||
// If they've specified an extension, let's load the metadata manager and validate it.
|
||||
if ($ext_name)
|
||||
{
|
||||
|
@ -98,7 +103,7 @@ class acp_extensions
|
|||
$template->assign_vars(array(
|
||||
'PRE' => true,
|
||||
'L_CONFIRM_MESSAGE' => $this->user->lang('EXTENSION_ENABLE_CONFIRM', $md_manager->get_metadata('display-name')),
|
||||
'U_ENABLE' => $this->u_action . '&action=enable&ext_name=' . urlencode($ext_name),
|
||||
'U_ENABLE' => $this->u_action . '&action=enable&ext_name=' . urlencode($ext_name) . '&hash=' . generate_link_hash('enable.' . $ext_name),
|
||||
));
|
||||
break;
|
||||
|
||||
|
@ -117,7 +122,7 @@ class acp_extensions
|
|||
{
|
||||
$template->assign_var('S_NEXT_STEP', true);
|
||||
|
||||
meta_refresh(0, $this->u_action . '&action=enable&ext_name=' . urlencode($ext_name));
|
||||
meta_refresh(0, $this->u_action . '&action=enable&ext_name=' . urlencode($ext_name) . '&hash=' . generate_link_hash('enable.' . $ext_name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -144,7 +149,7 @@ class acp_extensions
|
|||
$template->assign_vars(array(
|
||||
'PRE' => true,
|
||||
'L_CONFIRM_MESSAGE' => $this->user->lang('EXTENSION_DISABLE_CONFIRM', $md_manager->get_metadata('display-name')),
|
||||
'U_DISABLE' => $this->u_action . '&action=disable&ext_name=' . urlencode($ext_name),
|
||||
'U_DISABLE' => $this->u_action . '&action=disable&ext_name=' . urlencode($ext_name) . '&hash=' . generate_link_hash('disable.' . $ext_name),
|
||||
));
|
||||
break;
|
||||
|
||||
|
@ -156,7 +161,7 @@ class acp_extensions
|
|||
{
|
||||
$template->assign_var('S_NEXT_STEP', true);
|
||||
|
||||
meta_refresh(0, $this->u_action . '&action=disable&ext_name=' . urlencode($ext_name));
|
||||
meta_refresh(0, $this->u_action . '&action=disable&ext_name=' . urlencode($ext_name) . '&hash=' . generate_link_hash('disable.' . $ext_name));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -177,7 +182,7 @@ class acp_extensions
|
|||
$template->assign_vars(array(
|
||||
'PRE' => true,
|
||||
'L_CONFIRM_MESSAGE' => $this->user->lang('EXTENSION_DELETE_DATA_CONFIRM', $md_manager->get_metadata('display-name')),
|
||||
'U_PURGE' => $this->u_action . '&action=delete_data&ext_name=' . urlencode($ext_name),
|
||||
'U_PURGE' => $this->u_action . '&action=delete_data&ext_name=' . urlencode($ext_name) . '&hash=' . generate_link_hash('delete_data.' . $ext_name),
|
||||
));
|
||||
break;
|
||||
|
||||
|
@ -191,7 +196,7 @@ class acp_extensions
|
|||
{
|
||||
$template->assign_var('S_NEXT_STEP', true);
|
||||
|
||||
meta_refresh(0, $this->u_action . '&action=delete_data&ext_name=' . urlencode($ext_name));
|
||||
meta_refresh(0, $this->u_action . '&action=delete_data&ext_name=' . urlencode($ext_name) . '&hash=' . generate_link_hash('delete_data.' . $ext_name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -324,7 +324,11 @@ class acp_groups
|
|||
$avatar_drivers = $phpbb_avatar_manager->get_enabled_drivers();
|
||||
|
||||
// This is normalised data, without the group_ prefix
|
||||
$avatar_data = \phpbb\avatar\manager::clean_row($group_row);
|
||||
$avatar_data = \phpbb\avatar\manager::clean_row($group_row, 'group');
|
||||
if (!isset($avatar_data['id']))
|
||||
{
|
||||
$avatar_data['id'] = 'g' . $group_id;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -379,7 +383,7 @@ class acp_groups
|
|||
}
|
||||
else
|
||||
{
|
||||
$driver = $phpbb_avatar_manager->get_driver($user->data['user_avatar_type']);
|
||||
$driver = $phpbb_avatar_manager->get_driver($avatar_data['avatar_type']);
|
||||
if ($driver)
|
||||
{
|
||||
$driver->delete($avatar_data);
|
||||
|
@ -657,7 +661,6 @@ class acp_groups
|
|||
'GROUP_HIDDEN' => $type_hidden,
|
||||
|
||||
'U_BACK' => $u_back,
|
||||
'U_SWATCH' => append_sid("{$phpbb_admin_path}swatch.$phpEx", 'form=settings&name=group_colour'),
|
||||
'U_ACTION' => "{$this->u_action}&action=$action&g=$group_id",
|
||||
'L_AVATAR_EXPLAIN' => phpbb_avatar_explanation_string(),
|
||||
));
|
||||
|
|
|
@ -331,23 +331,30 @@ class acp_prune
|
|||
$s_find_active_time .= '<option value="' . $key . '">' . $value . '</option>';
|
||||
}
|
||||
|
||||
$s_group_list = '<option value="0"></option>';
|
||||
$sql = 'SELECT group_id, group_name
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
WHERE group_type <> ' . GROUP_SPECIAL . '
|
||||
ORDER BY group_name ASC';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$s_group_list = '';
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$s_group_list .= '<option value="' . $row['group_id'] . '">' . $row['group_name'] . '</option>';
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($s_group_list)
|
||||
{
|
||||
// Only prepend the "All groups" option if there are groups,
|
||||
// otherwise we don't want to display this option at all.
|
||||
$s_group_list = '<option value="0">' . $user->lang['PRUNE_USERS_GROUP_NONE'] . '</option>' . $s_group_list;
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'U_ACTION' => $this->u_action,
|
||||
'S_ACTIVE_OPTIONS' => $s_find_active_time,
|
||||
'S_GROUP_LIST' => $s_group_list,
|
||||
'S_GROUP_LIST' => $s_group_list,
|
||||
'S_COUNT_OPTIONS' => $s_find_count,
|
||||
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=acp_prune&field=users'),
|
||||
));
|
||||
|
@ -358,12 +365,12 @@ class acp_prune
|
|||
*/
|
||||
function get_prune_users(&$user_ids, &$usernames)
|
||||
{
|
||||
global $user, $db;
|
||||
global $user, $db, $request;
|
||||
|
||||
$users_by_name = request_var('users', '', true);
|
||||
$users_by_id = request_var('user_ids', array(0));
|
||||
$group_id = request_var('group_id', 0);
|
||||
$posts_on_queue = request_var('posts_on_queue', 0);
|
||||
$posts_on_queue = (trim($request->variable('posts_on_queue', '')) === '') ? false : $request->variable('posts_on_queue', 0);
|
||||
|
||||
if ($users_by_name)
|
||||
{
|
||||
|
@ -450,8 +457,8 @@ class acp_prune
|
|||
}
|
||||
}
|
||||
|
||||
// Protect the admin, do not prune if no options are given...
|
||||
if (!$where_sql)
|
||||
// If no search criteria were provided, go no further.
|
||||
if (!$where_sql && !$group_id && $posts_on_queue === false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -468,34 +475,40 @@ class acp_prune
|
|||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Do not prune founder members
|
||||
$sql = 'SELECT user_id, username
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE user_id <> ' . ANONYMOUS . '
|
||||
AND user_type <> ' . USER_FOUNDER . "
|
||||
$where_sql";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$user_ids = $usernames = array();
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
// Protect the admin, do not prune if no options are given...
|
||||
if ($where_sql)
|
||||
{
|
||||
// Do not prune bots and the user currently pruning.
|
||||
if ($row['user_id'] != $user->data['user_id'] && !in_array($row['user_id'], $bot_ids))
|
||||
// Do not prune founder members
|
||||
$sql = 'SELECT user_id, username
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE user_id <> ' . ANONYMOUS . '
|
||||
AND user_type <> ' . USER_FOUNDER . "
|
||||
$where_sql";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$user_ids = $usernames = array();
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$user_ids[] = $row['user_id'];
|
||||
$usernames[$row['user_id']] = $row['username'];
|
||||
// Do not prune bots and the user currently pruning.
|
||||
if ($row['user_id'] != $user->data['user_id'] && !in_array($row['user_id'], $bot_ids))
|
||||
{
|
||||
$user_ids[] = $row['user_id'];
|
||||
$usernames[$row['user_id']] = $row['username'];
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($group_id)
|
||||
{
|
||||
$sql = 'SELECT u.user_id, u.username
|
||||
FROM ' . USER_GROUP_TABLE . ' ug, ' . USERS_TABLE . ' u
|
||||
WHERE ug.group_id = ' . (int) $group_id . '
|
||||
AND ug.user_pending = 0
|
||||
AND ' . $db->sql_in_set('ug.user_id', $user_ids, false, true) . '
|
||||
AND ug.user_id <> ' . ANONYMOUS . '
|
||||
AND u.user_type <> ' . USER_FOUNDER . '
|
||||
AND ug.user_pending = 0 ' .
|
||||
((!empty($user_ids)) ? 'AND ' . $db->sql_in_set('ug.user_id', $user_ids) : '') . '
|
||||
AND u.user_id = ug.user_id';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
|
@ -505,28 +518,39 @@ class acp_prune
|
|||
$user_ids = $usernames = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$user_ids[] = $row['user_id'];
|
||||
$usernames[$row['user_id']] = $row['username'];
|
||||
// Do not prune bots and the user currently pruning.
|
||||
if ($row['user_id'] != $user->data['user_id'] && !in_array($row['user_id'], $bot_ids))
|
||||
{
|
||||
$user_ids[] = $row['user_id'];
|
||||
$usernames[$row['user_id']] = $row['username'];
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
if ($posts_on_queue)
|
||||
if ($posts_on_queue !== false)
|
||||
{
|
||||
$sql = 'SELECT u.user_id, u.username, COUNT(p.post_id) AS queue_posts
|
||||
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
|
||||
WHERE ' . $db->sql_in_set('p.poster_id', $user_ids, false, true) . '
|
||||
WHERE u.user_id <> ' . ANONYMOUS . '
|
||||
AND u.user_type <> ' . USER_FOUNDER .
|
||||
((!empty($user_ids)) ? 'AND ' . $db->sql_in_set('p.poster_id', $user_ids) : '') . '
|
||||
AND p.post_visibility = ' . ITEM_UNAPPROVED . '
|
||||
AND u.user_id = p.poster_id
|
||||
GROUP BY p.poster_id
|
||||
HAVING queue_posts ' . $key_match[$queue_select] . ' ' . $posts_on_queue;
|
||||
$result = $db->sql_query($result);
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
// same intersection logic as the above group ID portion
|
||||
$user_ids = $usernames = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$user_ids[] = $row['user_id'];
|
||||
$usernames[$row['user_id']] = $row['username'];
|
||||
// Do not prune bots and the user currently pruning.
|
||||
if ($row['user_id'] != $user->data['user_id'] && !in_array($row['user_id'], $bot_ids))
|
||||
{
|
||||
$user_ids[] = $row['user_id'];
|
||||
$usernames[$row['user_id']] = $row['username'];
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
|
|
@ -1512,7 +1512,6 @@ class acp_users
|
|||
'hideonline' => request_var('hideonline', !$user_row['user_allow_viewonline']),
|
||||
'notifymethod' => request_var('notifymethod', $user_row['user_notify_type']),
|
||||
'notifypm' => request_var('notifypm', $user_row['user_notify_pm']),
|
||||
'popuppm' => request_var('popuppm', $this->optionget($user_row, 'popuppm')),
|
||||
'allowpm' => request_var('allowpm', $user_row['user_allow_pm']),
|
||||
|
||||
'topic_sk' => request_var('topic_sk', ($user_row['user_topic_sortby_type']) ? $user_row['user_topic_sortby_type'] : 't'),
|
||||
|
@ -1556,7 +1555,6 @@ class acp_users
|
|||
|
||||
if (!sizeof($error))
|
||||
{
|
||||
$this->optionset($user_row, 'popuppm', $data['popuppm']);
|
||||
$this->optionset($user_row, 'viewimg', $data['view_images']);
|
||||
$this->optionset($user_row, 'viewflash', $data['view_flash']);
|
||||
$this->optionset($user_row, 'viewsmilies', $data['view_smilies']);
|
||||
|
@ -1699,7 +1697,6 @@ class acp_users
|
|||
'NOTIFY_IM' => ($data['notifymethod'] == NOTIFY_IM) ? true : false,
|
||||
'NOTIFY_BOTH' => ($data['notifymethod'] == NOTIFY_BOTH) ? true : false,
|
||||
'NOTIFY_PM' => $data['notifypm'],
|
||||
'POPUP_PM' => $data['popuppm'],
|
||||
'BBCODE' => $data['bbcode'],
|
||||
'SMILIES' => $data['smilies'],
|
||||
'ATTACH_SIG' => $data['sig'],
|
||||
|
@ -1745,7 +1742,7 @@ class acp_users
|
|||
$avatar_drivers = $phpbb_avatar_manager->get_enabled_drivers();
|
||||
|
||||
// This is normalised data, without the user_ prefix
|
||||
$avatar_data = \phpbb\avatar\manager::clean_row($user_row);
|
||||
$avatar_data = \phpbb\avatar\manager::clean_row($user_row, 'user');
|
||||
|
||||
if ($submit)
|
||||
{
|
||||
|
@ -1778,7 +1775,7 @@ class acp_users
|
|||
}
|
||||
else
|
||||
{
|
||||
$driver = $phpbb_avatar_manager->get_driver($user->data['user_avatar_type']);
|
||||
$driver = $phpbb_avatar_manager->get_driver($avatar_data['avatar_type']);
|
||||
if ($driver)
|
||||
{
|
||||
$driver->delete($avatar_data);
|
||||
|
|
|
@ -362,7 +362,7 @@ class bbcode
|
|||
}
|
||||
|
||||
// Replace {L_*} lang strings
|
||||
$bbcode_tpl = preg_replace('/{L_([A-Z_]+)}/e', "(!empty(\$user->lang['\$1'])) ? \$user->lang['\$1'] : ucwords(strtolower(str_replace('_', ' ', '\$1')))", $bbcode_tpl);
|
||||
$bbcode_tpl = preg_replace('/{L_([A-Z0-9_]+)}/e', "(!empty(\$user->lang['\$1'])) ? \$user->lang['\$1'] : ucwords(strtolower(str_replace('_', ' ', '\$1')))", $bbcode_tpl);
|
||||
|
||||
if (!empty($rowset[$bbcode_id]['second_pass_replace']))
|
||||
{
|
||||
|
@ -466,7 +466,7 @@ class bbcode
|
|||
'email' => array('{EMAIL}' => '$1', '{DESCRIPTION}' => '$2')
|
||||
);
|
||||
|
||||
$tpl = preg_replace('/{L_([A-Z_]+)}/e', "(!empty(\$user->lang['\$1'])) ? \$user->lang['\$1'] : ucwords(strtolower(str_replace('_', ' ', '\$1')))", $tpl);
|
||||
$tpl = preg_replace('/{L_([A-Z0-9_]+)}/e', "(!empty(\$user->lang['\$1'])) ? \$user->lang['\$1'] : ucwords(strtolower(str_replace('_', ' ', '\$1')))", $tpl);
|
||||
|
||||
if (!empty($replacements[$tpl_name]))
|
||||
{
|
||||
|
|
|
@ -24,7 +24,7 @@ if (!defined('IN_PHPBB'))
|
|||
*/
|
||||
|
||||
// phpBB Version
|
||||
define('PHPBB_VERSION', '3.1.0-a2-dev');
|
||||
define('PHPBB_VERSION', '3.1.0-a3-dev');
|
||||
|
||||
// QA-related
|
||||
// define('PHPBB_QA', 1);
|
||||
|
|
|
@ -5368,7 +5368,6 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
|
|||
|
||||
'U_PRIVATEMSGS' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox'),
|
||||
'U_RETURN_INBOX' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox'),
|
||||
'U_POPUP_PM' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=popup'),
|
||||
'U_MEMBERLIST' => append_sid("{$phpbb_root_path}memberlist.$phpEx"),
|
||||
'U_VIEWONLINE' => ($auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel')) ? append_sid("{$phpbb_root_path}viewonline.$phpEx") : '',
|
||||
'U_LOGIN_LOGOUT' => $u_login_logout,
|
||||
|
@ -5396,7 +5395,6 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
|
|||
'S_BOARD_DISABLED' => ($config['board_disable']) ? true : false,
|
||||
'S_REGISTERED_USER' => (!empty($user->data['is_registered'])) ? true : false,
|
||||
'S_IS_BOT' => (!empty($user->data['is_bot'])) ? true : false,
|
||||
'S_USER_PM_POPUP' => $user->optionget('popuppm'),
|
||||
'S_USER_LANG' => $user_lang,
|
||||
'S_USER_BROWSER' => (isset($user->data['session_browser'])) ? $user->data['session_browser'] : $user->lang['UNKNOWN_BROWSER'],
|
||||
'S_USERNAME' => $user->data['username'],
|
||||
|
|
|
@ -363,7 +363,9 @@ function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars)
|
|||
|
||||
if ($tpl_type[0] == 'select')
|
||||
{
|
||||
$tpl = '<select id="' . $key . '" name="' . $name . '">' . $return . '</select>';
|
||||
$size = (isset($tpl_type[1])) ? (int) $tpl_type[1] : 1;
|
||||
|
||||
$tpl = '<select id="' . $key . '" name="' . $name . '"' . (($size > 1) ? ' size="' . $size . '"' : '') . '>' . $return . '</select>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1027,7 +1027,6 @@ function set_user_options()
|
|||
'attachsig' => array('bit' => 6, 'default' => 0),
|
||||
'bbcode' => array('bit' => 8, 'default' => 1),
|
||||
'smilies' => array('bit' => 9, 'default' => 1),
|
||||
'popuppm' => array('bit' => 10, 'default' => 0),
|
||||
'sig_bbcode' => array('bit' => 15, 'default' => 1),
|
||||
'sig_smilies' => array('bit' => 16, 'default' => 1),
|
||||
'sig_links' => array('bit' => 17, 'default' => 1),
|
||||
|
|
|
@ -1167,7 +1167,12 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
|
|||
if ($uid != $user_id || $request->variable('unwatch', '', false, \phpbb\request\request_interface::GET) != $mode)
|
||||
{
|
||||
$redirect_url = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&start=$start");
|
||||
$message = $user->lang['ERR_UNWATCHING'] . '<br /><br />' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
|
||||
$message = $user->lang['ERR_UNWATCHING'];
|
||||
|
||||
if (!$request->is_ajax())
|
||||
{
|
||||
$message .= '<br /><br />' . $user->lang('RETURN_' . strtoupper($mode), '<a href="' . $redirect_url . '">', '</a>');
|
||||
}
|
||||
trigger_error($message);
|
||||
}
|
||||
|
||||
|
@ -1177,8 +1182,12 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
|
|||
$db->sql_query($sql);
|
||||
|
||||
$redirect_url = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&start=$start");
|
||||
$message = $user->lang['NOT_WATCHING_' . strtoupper($mode)] . '<br /><br />';
|
||||
$message .= sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
|
||||
$message = $user->lang['NOT_WATCHING_' . strtoupper($mode)];
|
||||
|
||||
if (!$request->is_ajax())
|
||||
{
|
||||
$message .= '<br /><br />' . $user->lang('RETURN_' . strtoupper($mode), '<a href="' . $redirect_url . '">', '</a>');
|
||||
}
|
||||
meta_refresh(3, $redirect_url);
|
||||
trigger_error($message);
|
||||
}
|
||||
|
@ -1232,7 +1241,12 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
|
|||
if ($uid != $user_id || $request->variable('watch', '', false, \phpbb\request\request_interface::GET) != $mode)
|
||||
{
|
||||
$redirect_url = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&start=$start");
|
||||
$message = $user->lang['ERR_WATCHING'] . '<br /><br />' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
|
||||
$message = $user->lang['ERR_WATCHING'];
|
||||
|
||||
if (!$request->is_ajax())
|
||||
{
|
||||
$message .= '<br /><br />' . $user->lang('RETURN_' . strtoupper($mode), '<a href="' . $redirect_url . '">', '</a>');
|
||||
}
|
||||
trigger_error($message);
|
||||
}
|
||||
|
||||
|
@ -1243,7 +1257,12 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
|
|||
$db->sql_query($sql);
|
||||
|
||||
$redirect_url = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&start=$start");
|
||||
$message = $user->lang['ARE_WATCHING_' . strtoupper($mode)] . '<br /><br />' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
|
||||
$message = $user->lang['ARE_WATCHING_' . strtoupper($mode)];
|
||||
|
||||
if (!$request->is_ajax())
|
||||
{
|
||||
$message .= '<br /><br />' . $user->lang('RETURN_' . strtoupper($mode), '<a href="' . $redirect_url . '">', '</a>');
|
||||
}
|
||||
meta_refresh(3, $redirect_url);
|
||||
trigger_error($message);
|
||||
}
|
||||
|
@ -1352,7 +1371,7 @@ function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank
|
|||
*/
|
||||
function phpbb_get_user_avatar($user_row, $alt = 'USER_AVATAR', $ignore_config = false)
|
||||
{
|
||||
$row = \phpbb\avatar\manager::clean_row($user_row);
|
||||
$row = \phpbb\avatar\manager::clean_row($user_row, 'user');
|
||||
return phpbb_get_avatar($row, $alt, $ignore_config);
|
||||
}
|
||||
|
||||
|
@ -1367,7 +1386,7 @@ function phpbb_get_user_avatar($user_row, $alt = 'USER_AVATAR', $ignore_config =
|
|||
*/
|
||||
function phpbb_get_group_avatar($user_row, $alt = 'GROUP_AVATAR', $ignore_config = false)
|
||||
{
|
||||
$row = \phpbb\avatar\manager::clean_row($user_row);
|
||||
$row = \phpbb\avatar\manager::clean_row($user_row, 'group');
|
||||
return phpbb_get_avatar($row, $alt, $ignore_config);
|
||||
}
|
||||
|
||||
|
@ -1445,6 +1464,8 @@ function phpbb_gen_download_links($param_key, $param_val, $phpbb_root_path, $php
|
|||
}
|
||||
|
||||
$methods = compress::methods();
|
||||
// Sort by preferred type.
|
||||
$methods = array_intersect(array('.zip', '.tar.bz2', '.tar.gz', '.tar'), $methods);
|
||||
$links = array();
|
||||
|
||||
foreach ($methods as $method)
|
||||
|
|
|
@ -533,3 +533,51 @@ function phpbb_create_config_file_data($data, $dbms, $debug = false, $debug_test
|
|||
|
||||
return $config_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether a file should be ignored on update
|
||||
*
|
||||
* We ignore new files in some circumstances:
|
||||
* 1. The file is a language file, but the language is not installed
|
||||
* 2. The file is a style file, but the style is not installed
|
||||
* 3. The file is a style language file, but the language is not installed
|
||||
*
|
||||
* @param string $phpbb_root_path phpBB root path
|
||||
* @param string $file File including path from phpbb root
|
||||
* @return bool Should we ignore the new file or add it to the board?
|
||||
*/
|
||||
function phpbb_ignore_new_file_on_update($phpbb_root_path, $file)
|
||||
{
|
||||
$ignore_new_file = false;
|
||||
|
||||
// We ignore new files in some circumstances:
|
||||
// 1. The file is a language file, but the language is not installed
|
||||
if (!$ignore_new_file && strpos($file, 'language/') === 0)
|
||||
{
|
||||
list($language_dir, $language_iso) = explode('/', $file);
|
||||
$ignore_new_file = !file_exists($phpbb_root_path . $language_dir . '/' . $language_iso);
|
||||
}
|
||||
|
||||
// 2. The file is a style file, but the style is not installed
|
||||
if (!$ignore_new_file && strpos($file, 'styles/') === 0)
|
||||
{
|
||||
list($styles_dir, $style_name) = explode('/', $file);
|
||||
$ignore_new_file = !file_exists($phpbb_root_path . $styles_dir . '/' . $style_name);
|
||||
}
|
||||
|
||||
// 3. The file is a style language file, but the language is not installed
|
||||
if (!$ignore_new_file && strpos($file, 'styles/') === 0)
|
||||
{
|
||||
$dirs = explode('/', $file);
|
||||
if (sizeof($dirs) >= 5)
|
||||
{
|
||||
list($styles_dir, $style_name, $template_component, $language_iso) = explode('/', $file);
|
||||
if ($template_component == 'theme' && $language_iso !== 'images')
|
||||
{
|
||||
$ignore_new_file = !file_exists($phpbb_root_path . 'language/' . $language_iso);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $ignore_new_file;
|
||||
}
|
||||
|
|
|
@ -528,12 +528,12 @@ class p_master
|
|||
* the style paths for the extension (the ext author can change them
|
||||
* if necessary).
|
||||
*/
|
||||
$module_dir = explode('_', get_class($this->module));
|
||||
$module_dir = explode('\\', get_class($this->module));
|
||||
|
||||
// 0 phpbb, 1 ext, 2 vendor, 3 extension name, ...
|
||||
if (isset($module_dir[3]) && $module_dir[1] === 'ext')
|
||||
// 0 vendor, 1 extension name, ...
|
||||
if (isset($module_dir[1]))
|
||||
{
|
||||
$module_style_dir = 'ext/' . $module_dir[2] . '/' . $module_dir[3] . '/styles';
|
||||
$module_style_dir = 'ext/' . $module_dir[0] . '/' . $module_dir[1] . '/styles';
|
||||
|
||||
if (is_dir($phpbb_root_path . $module_style_dir))
|
||||
{
|
||||
|
|
|
@ -213,7 +213,7 @@ function user_add($user_row, $cp_data = false)
|
|||
'user_occ' => '',
|
||||
'user_interests' => '',
|
||||
'user_avatar' => '',
|
||||
'user_avatar_type' => 0,
|
||||
'user_avatar_type' => '',
|
||||
'user_avatar_width' => 0,
|
||||
'user_avatar_height' => 0,
|
||||
'user_new_privmsg' => 0,
|
||||
|
@ -281,8 +281,9 @@ function user_add($user_row, $cp_data = false)
|
|||
include_once($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
|
||||
}
|
||||
|
||||
$cp = new custom_profile();
|
||||
$sql = 'INSERT INTO ' . PROFILE_FIELDS_DATA_TABLE . ' ' .
|
||||
$db->sql_build_array('INSERT', custom_profile::build_insert_sql_array($cp_data));
|
||||
$db->sql_build_array('INSERT', $cp->build_insert_sql_array($cp_data));
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
|
@ -463,7 +464,7 @@ function user_delete($mode, $user_ids, $retain_username = true)
|
|||
$added_guest_posts = 0;
|
||||
foreach ($user_rows as $user_id => $user_row)
|
||||
{
|
||||
if ($user_row['user_avatar'] && $user_row['user_avatar_type'] == AVATAR_UPLOAD)
|
||||
if ($user_row['user_avatar'] && $user_row['user_avatar_type'] == 'avatar.driver.upload')
|
||||
{
|
||||
avatar_delete('user', $user_row);
|
||||
}
|
||||
|
@ -2314,7 +2315,7 @@ function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow
|
|||
{
|
||||
$group_id = $db->sql_nextid();
|
||||
|
||||
if (isset($sql_ary['group_avatar_type']) && $sql_ary['group_avatar_type'] == AVATAR_UPLOAD)
|
||||
if (isset($sql_ary['group_avatar_type']) && $sql_ary['group_avatar_type'] == 'avatar.driver.upload')
|
||||
{
|
||||
group_correct_avatar($group_id, $sql_ary['group_avatar']);
|
||||
}
|
||||
|
@ -2415,7 +2416,7 @@ function avatar_remove_db($avatar_name)
|
|||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . "
|
||||
SET user_avatar = '',
|
||||
user_avatar_type = 0
|
||||
user_avatar_type = ''
|
||||
WHERE user_avatar = '" . $db->sql_escape($avatar_name) . '\'';
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
@ -2825,7 +2826,7 @@ function remove_default_avatar($group_id, $user_ids)
|
|||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . "
|
||||
SET user_avatar = '',
|
||||
user_avatar_type = 0,
|
||||
user_avatar_type = '',
|
||||
user_avatar_width = 0,
|
||||
user_avatar_height = 0
|
||||
WHERE group_id = " . (int) $group_id . "
|
||||
|
@ -3083,7 +3084,7 @@ function group_set_user_default($group_id, $user_id_ary, $group_attributes = fal
|
|||
'group_colour' => 'string',
|
||||
'group_rank' => 'int',
|
||||
'group_avatar' => 'string',
|
||||
'group_avatar_type' => 'int',
|
||||
'group_avatar_type' => 'string',
|
||||
'group_avatar_width' => 'int',
|
||||
'group_avatar_height' => 'int',
|
||||
);
|
||||
|
|
|
@ -219,7 +219,7 @@ class mcp_main
|
|||
*/
|
||||
function lock_unlock($action, $ids)
|
||||
{
|
||||
global $auth, $user, $db, $phpEx, $phpbb_root_path;
|
||||
global $auth, $user, $db, $phpEx, $phpbb_root_path, $request;
|
||||
|
||||
if ($action == 'lock' || $action == 'unlock')
|
||||
{
|
||||
|
@ -256,6 +256,7 @@ function lock_unlock($action, $ids)
|
|||
unset($orig_ids);
|
||||
|
||||
$redirect = request_var('redirect', build_url(array('action', 'quickmod')));
|
||||
$redirect = reapply_sid($redirect);
|
||||
|
||||
$s_hidden_fields = build_hidden_fields(array(
|
||||
$sql_id . '_list' => $ids,
|
||||
|
@ -279,24 +280,22 @@ function lock_unlock($action, $ids)
|
|||
}
|
||||
|
||||
$success_msg = $l_prefix . ((sizeof($ids) == 1) ? '' : 'S') . '_' . (($action == 'lock' || $action == 'lock_post') ? 'LOCKED' : 'UNLOCKED') . '_SUCCESS';
|
||||
|
||||
meta_refresh(2, $redirect);
|
||||
$message = $user->lang[$success_msg];
|
||||
|
||||
if (!$request->is_ajax())
|
||||
{
|
||||
$message .= '<br /><br />' . $user->lang('RETURN_PAGE', '<a href="' . $redirect . '">', '</a>');
|
||||
}
|
||||
trigger_error($message);
|
||||
}
|
||||
else
|
||||
{
|
||||
confirm_box(false, strtoupper($action) . '_' . $l_prefix . ((sizeof($ids) == 1) ? '' : 'S'), $s_hidden_fields);
|
||||
}
|
||||
|
||||
$redirect = request_var('redirect', "index.$phpEx");
|
||||
$redirect = reapply_sid($redirect);
|
||||
|
||||
if (!$success_msg)
|
||||
{
|
||||
redirect($redirect);
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_refresh(2, $redirect);
|
||||
trigger_error($user->lang[$success_msg] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>'));
|
||||
}
|
||||
redirect($redirect);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -304,7 +303,7 @@ function lock_unlock($action, $ids)
|
|||
*/
|
||||
function change_topic_type($action, $topic_ids)
|
||||
{
|
||||
global $auth, $user, $db, $phpEx, $phpbb_root_path;
|
||||
global $auth, $user, $db, $phpEx, $phpbb_root_path, $request;
|
||||
|
||||
switch ($action)
|
||||
{
|
||||
|
@ -341,6 +340,7 @@ function change_topic_type($action, $topic_ids)
|
|||
}
|
||||
|
||||
$redirect = request_var('redirect', build_url(array('action', 'quickmod')));
|
||||
$redirect = reapply_sid($redirect);
|
||||
|
||||
$s_hidden_fields = array(
|
||||
'topic_id_list' => $topic_ids,
|
||||
|
@ -381,24 +381,22 @@ function change_topic_type($action, $topic_ids)
|
|||
add_log('mod', $forum_id, $topic_id, 'LOG_TOPIC_TYPE_CHANGED', $row['topic_title']);
|
||||
}
|
||||
}
|
||||
|
||||
meta_refresh(2, $redirect);
|
||||
$message = $user->lang[$success_msg];
|
||||
|
||||
if (!$request->is_ajax())
|
||||
{
|
||||
$message .= '<br /><br />' . $user->lang('RETURN_PAGE', '<a href="' . $redirect . '">', '</a>');
|
||||
}
|
||||
trigger_error($message);
|
||||
}
|
||||
else
|
||||
{
|
||||
confirm_box(false, $l_new_type, build_hidden_fields($s_hidden_fields));
|
||||
}
|
||||
|
||||
$redirect = request_var('redirect', "index.$phpEx");
|
||||
$redirect = reapply_sid($redirect);
|
||||
|
||||
if (!$success_msg)
|
||||
{
|
||||
redirect($redirect);
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_refresh(2, $redirect);
|
||||
trigger_error($user->lang[$success_msg] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>'));
|
||||
}
|
||||
redirect($redirect);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -576,6 +576,7 @@ class mcp_queue
|
|||
}
|
||||
|
||||
$redirect = $request->variable('redirect', build_url(array('quickmod')));
|
||||
$redirect = reapply_sid($redirect);
|
||||
$success_msg = $post_url = '';
|
||||
$approve_log = array();
|
||||
|
||||
|
@ -678,6 +679,28 @@ class mcp_queue
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
meta_refresh(3, $redirect);
|
||||
$message = $user->lang[$success_msg];
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
$json_response = new \phpbb\json_response;
|
||||
$json_response->send(array(
|
||||
'MESSAGE_TITLE' => $user->lang['INFORMATION'],
|
||||
'MESSAGE_TEXT' => $message,
|
||||
'REFRESH_DATA' => null,
|
||||
'visible' => true,
|
||||
));
|
||||
}
|
||||
$message .= '<br /><br />' . $user->lang('RETURN_PAGE', '<a href="' . $redirect . '">', '</a>');
|
||||
|
||||
// If approving one post, also give links back to post...
|
||||
if (sizeof($post_info) == 1 && $post_url)
|
||||
{
|
||||
$message .= '<br /><br />' . $user->lang('RETURN_POST', '<a href="' . $post_url . '">', '</a>');
|
||||
}
|
||||
trigger_error($message);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -707,39 +730,7 @@ class mcp_queue
|
|||
confirm_box(false, strtoupper($action) . '_POST' . ((sizeof($post_id_list) == 1) ? '' : 'S'), $s_hidden_fields, 'mcp_approve.html');
|
||||
}
|
||||
|
||||
$redirect = $request->variable('redirect', "index.$phpEx");
|
||||
$redirect = reapply_sid($redirect);
|
||||
|
||||
if (!$success_msg)
|
||||
{
|
||||
redirect($redirect);
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_refresh(3, $redirect);
|
||||
|
||||
// If approving one post, also give links back to post...
|
||||
$add_message = '';
|
||||
if (sizeof($post_info) == 1 && $post_url)
|
||||
{
|
||||
$add_message = '<br /><br />' . sprintf($user->lang['RETURN_POST'], '<a href="' . $post_url . '">', '</a>');
|
||||
}
|
||||
|
||||
$message = $user->lang[$success_msg] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>') . $add_message;
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
$json_response = new \phpbb\json_response;
|
||||
$json_response->send(array(
|
||||
'MESSAGE_TITLE' => $user->lang['INFORMATION'],
|
||||
'MESSAGE_TEXT' => $message,
|
||||
'REFRESH_DATA' => null,
|
||||
'visible' => true,
|
||||
));
|
||||
}
|
||||
|
||||
trigger_error($message);
|
||||
}
|
||||
redirect($redirect);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -762,6 +753,7 @@ class mcp_queue
|
|||
}
|
||||
|
||||
$redirect = $request->variable('redirect', build_url(array('quickmod')));
|
||||
$redirect = reapply_sid($redirect);
|
||||
$success_msg = $topic_url = '';
|
||||
$approve_log = array();
|
||||
|
||||
|
@ -826,6 +818,28 @@ class mcp_queue
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
meta_refresh(3, $redirect);
|
||||
$message = $user->lang[$success_msg];
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
$json_response = new \phpbb\json_response;
|
||||
$json_response->send(array(
|
||||
'MESSAGE_TITLE' => $user->lang['INFORMATION'],
|
||||
'MESSAGE_TEXT' => $message,
|
||||
'REFRESH_DATA' => null,
|
||||
'visible' => true,
|
||||
));
|
||||
}
|
||||
$message .= '<br /><br />' . $user->lang('RETURN_PAGE', '<a href="' . $redirect . '">', '</a>');
|
||||
|
||||
// If approving one topic, also give links back to topic...
|
||||
if (sizeof($topic_info) == 1 && $topic_url)
|
||||
{
|
||||
$message .= '<br /><br />' . $user->lang('RETURN_TOPIC', '<a href="' . $topic_url . '">', '</a>');
|
||||
}
|
||||
trigger_error($message);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -855,39 +869,7 @@ class mcp_queue
|
|||
confirm_box(false, strtoupper($action) . '_TOPIC' . ((sizeof($topic_id_list) == 1) ? '' : 'S'), $s_hidden_fields, 'mcp_approve.html');
|
||||
}
|
||||
|
||||
$redirect = $request->variable('redirect', "index.$phpEx");
|
||||
$redirect = reapply_sid($redirect);
|
||||
|
||||
if (!$success_msg)
|
||||
{
|
||||
redirect($redirect);
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_refresh(3, $redirect);
|
||||
|
||||
// If approving one topic, also give links back to topic...
|
||||
$add_message = '';
|
||||
if (sizeof($topic_info) == 1 && $topic_url)
|
||||
{
|
||||
$add_message = '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $topic_url . '">', '</a>');
|
||||
}
|
||||
|
||||
$message = $user->lang[$success_msg] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>') . $add_message;
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
$json_response = new \phpbb\json_response;
|
||||
$json_response->send(array(
|
||||
'MESSAGE_TITLE' => $user->lang['INFORMATION'],
|
||||
'MESSAGE_TEXT' => $message,
|
||||
'REFRESH_DATA' => null,
|
||||
'visible' => true,
|
||||
));
|
||||
}
|
||||
|
||||
trigger_error($message);
|
||||
}
|
||||
redirect($redirect);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -909,6 +891,7 @@ class mcp_queue
|
|||
}
|
||||
|
||||
$redirect = $request->variable('redirect', build_url(array('t', 'mode', 'quickmod')) . "&mode=$mode");
|
||||
$redirect = reapply_sid($redirect);
|
||||
$reason = $request->variable('reason', '', true);
|
||||
$reason_id = $request->variable('reason_id', 0);
|
||||
$success_msg = $additional_msg = '';
|
||||
|
@ -1151,6 +1134,22 @@ class mcp_queue
|
|||
{
|
||||
$success_msg .= '_DELETED_SUCCESS';
|
||||
}
|
||||
|
||||
meta_refresh(3, $redirect);
|
||||
$message = $user->lang[$success_msg];
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
$json_response = new \phpbb\json_response;
|
||||
$json_response->send(array(
|
||||
'MESSAGE_TITLE' => $user->lang['INFORMATION'],
|
||||
'MESSAGE_TEXT' => $message,
|
||||
'REFRESH_DATA' => null,
|
||||
'visible' => false,
|
||||
));
|
||||
}
|
||||
$message .= '<br /><br />' . $user->lang('RETURN_PAGE', '<a href="' . $redirect . '">', '</a>');
|
||||
trigger_error($message);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1199,30 +1198,6 @@ class mcp_queue
|
|||
confirm_box(false, $l_confirm_msg, $s_hidden_fields, $confirm_template);
|
||||
}
|
||||
|
||||
$redirect = $request->variable('redirect', "index.$phpEx");
|
||||
$redirect = reapply_sid($redirect);
|
||||
|
||||
if (!$success_msg)
|
||||
{
|
||||
redirect($redirect);
|
||||
}
|
||||
else
|
||||
{
|
||||
$message = $user->lang[$success_msg] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>');
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
$json_response = new \phpbb\json_response;
|
||||
$json_response->send(array(
|
||||
'MESSAGE_TITLE' => $user->lang['INFORMATION'],
|
||||
'MESSAGE_TEXT' => $message,
|
||||
'REFRESH_DATA' => null,
|
||||
'visible' => false,
|
||||
));
|
||||
}
|
||||
|
||||
meta_refresh(3, $redirect);
|
||||
trigger_error($message);
|
||||
}
|
||||
redirect($redirect);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,6 @@ class ucp_pm_info
|
|||
'compose' => array('title' => 'UCP_PM_COMPOSE', 'auth' => 'cfg_allow_privmsg', 'cat' => array('UCP_PM')),
|
||||
'drafts' => array('title' => 'UCP_PM_DRAFTS', 'auth' => 'cfg_allow_privmsg', 'cat' => array('UCP_PM')),
|
||||
'options' => array('title' => 'UCP_PM_OPTIONS', 'auth' => 'cfg_allow_privmsg', 'cat' => array('UCP_PM')),
|
||||
'popup' => array('title' => 'UCP_PM_POPUP_TITLE', 'auth' => 'cfg_allow_privmsg', 'display' => false, 'cat' => array('UCP_PM')),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -465,7 +465,7 @@ class ucp_groups
|
|||
$avatar_drivers = $phpbb_avatar_manager->get_enabled_drivers();
|
||||
|
||||
// This is normalised data, without the group_ prefix
|
||||
$avatar_data = \phpbb\avatar\manager::clean_row($group_row);
|
||||
$avatar_data = \phpbb\avatar\manager::clean_row($group_row, 'group');
|
||||
}
|
||||
|
||||
// Did we submit?
|
||||
|
@ -509,7 +509,7 @@ class ucp_groups
|
|||
}
|
||||
else
|
||||
{
|
||||
if ($driver = $phpbb_avatar_manager->get_driver($user->data['user_avatar_type']))
|
||||
if ($driver = $phpbb_avatar_manager->get_driver($avatar_data['avatar_type']))
|
||||
{
|
||||
$driver->delete($avatar_data);
|
||||
}
|
||||
|
@ -699,7 +699,6 @@ class ucp_groups
|
|||
'GROUP_CLOSED' => $type_closed,
|
||||
'GROUP_HIDDEN' => $type_hidden,
|
||||
|
||||
'U_SWATCH' => append_sid("{$phpbb_admin_path}swatch.$phpEx", 'form=ucp&name=group_colour'),
|
||||
'S_UCP_ACTION' => $this->u_action . "&action=$action&g=$group_id",
|
||||
'L_AVATAR_EXPLAIN' => phpbb_avatar_explanation_string(),
|
||||
));
|
||||
|
|
|
@ -27,7 +27,8 @@ class ucp_notifications
|
|||
add_form_key('ucp_notification');
|
||||
|
||||
$start = $request->variable('start', 0);
|
||||
$form_time = min($request->variable('form_time', 0), time());
|
||||
$form_time = $request->variable('form_time', 0);
|
||||
$form_time = ($form_time <= 0 || $form_time > time()) ? time() : $form_time;
|
||||
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
|
||||
|
|
|
@ -83,33 +83,6 @@ class ucp_pm
|
|||
|
||||
switch ($mode)
|
||||
{
|
||||
// New private messages popup
|
||||
case 'popup':
|
||||
|
||||
$l_new_message = '';
|
||||
if ($user->data['is_registered'])
|
||||
{
|
||||
if ($user->data['user_new_privmsg'])
|
||||
{
|
||||
$l_new_message = ($user->data['user_new_privmsg'] == 1) ? $user->lang['YOU_NEW_PM'] : $user->lang['YOU_NEW_PMS'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$l_new_message = $user->lang['YOU_NO_NEW_PM'];
|
||||
}
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'MESSAGE' => $l_new_message,
|
||||
'S_NOT_LOGGED_IN' => ($user->data['user_id'] == ANONYMOUS) ? true : false,
|
||||
'CLICK_TO_VIEW' => sprintf($user->lang['CLICK_VIEW_PRIVMSG'], '<a href="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox') . '" onclick="jump_to_inbox(this.href); return false;">', '</a>'),
|
||||
'U_INBOX' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox'),
|
||||
'UA_INBOX' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox', false))
|
||||
);
|
||||
|
||||
$tpl_file = 'ucp_pm_popup';
|
||||
break;
|
||||
|
||||
// Compose message
|
||||
case 'compose':
|
||||
$action = request_var('action', 'post');
|
||||
|
|
|
@ -567,7 +567,7 @@ class ucp_profile
|
|||
$avatar_drivers = $phpbb_avatar_manager->get_enabled_drivers();
|
||||
|
||||
// This is normalised data, without the user_ prefix
|
||||
$avatar_data = \phpbb\avatar\manager::clean_row($user->data);
|
||||
$avatar_data = \phpbb\avatar\manager::clean_row($user->data, 'user');
|
||||
|
||||
if ($submit)
|
||||
{
|
||||
|
@ -603,7 +603,7 @@ class ucp_profile
|
|||
}
|
||||
else
|
||||
{
|
||||
if ($driver = $phpbb_avatar_manager->get_driver($user->data['user_avatar_type']))
|
||||
if ($driver = $phpbb_avatar_manager->get_driver($avatar_data['avatar_type']))
|
||||
{
|
||||
$driver->delete($avatar_data);
|
||||
}
|
||||
|
|
|
@ -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-a2-dev',
|
||||
'phpbb_version' => '3.1.0-a2',
|
||||
'author' => '<a href="https://www.phpbb.com/">phpBB Group</a>',
|
||||
'dbms' => $dbms,
|
||||
'dbhost' => $dbhost,
|
||||
|
|
|
@ -1311,7 +1311,7 @@ class install_update extends module
|
|||
}
|
||||
}*/
|
||||
|
||||
if (file_exists($phpbb_root_path . dirname($file)) || (strpos($file, 'styles/') !== 0 && strpos($file, 'language/') !== 0))
|
||||
if (!phpbb_ignore_new_file_on_update($phpbb_root_path, $file))
|
||||
{
|
||||
$this->get_custom_info($update_list['new'], $file);
|
||||
$update_list['new'][] = array('filename' => $file, 'custom' => false);
|
||||
|
|
|
@ -232,7 +232,6 @@ 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');
|
||||
|
@ -270,7 +269,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-a2-dev');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.1.0-a3-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');
|
||||
|
||||
|
@ -288,6 +287,7 @@ INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('num_us
|
|||
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 ('read_notification_last_gc', '0', 1);
|
||||
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('record_online_date', '0', 1);
|
||||
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('record_online_users', '0', 1);
|
||||
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('search_indexing_state', '', 1);
|
||||
|
|
|
@ -52,6 +52,7 @@ $lang = array_merge($lang, array(
|
|||
|
||||
'POSTS_ON_QUEUE' => 'Posts Awaiting Approval',
|
||||
'PRUNE_USERS_GROUP_EXPLAIN' => 'Limit to users within the selected group.',
|
||||
'PRUNE_USERS_GROUP_NONE' => 'All groups',
|
||||
'PRUNE_USERS_LIST' => 'Users to be pruned',
|
||||
'PRUNE_USERS_LIST_DELETE' => 'With the selected critera for pruning users the following accounts will be removed. You can remove individual users from the deletion list by unchecking the box next to their username.',
|
||||
'PRUNE_USERS_LIST_DEACTIVATE' => 'With the selected critera for pruning users the following accounts will be deactivated. You can remove individual users from the deactivation list by unchecking the box next to their username.',
|
||||
|
|
|
@ -143,6 +143,7 @@ $lang = array_merge($lang, array(
|
|||
'BUTTON_QUOTE' => 'Quote',
|
||||
'BUTTON_TOPIC_LOCKED' => 'Locked',
|
||||
'BYTES' => 'Bytes',
|
||||
'BYTES_SHORT' => 'B',
|
||||
|
||||
'CANCEL' => 'Cancel',
|
||||
'CHANGE' => 'Change',
|
||||
|
@ -153,7 +154,6 @@ $lang = array_merge($lang, array(
|
|||
1 => '%d character',
|
||||
2 => '%d characters',
|
||||
),
|
||||
'CLICK_VIEW_PRIVMSG' => '%sGo to your inbox%s',
|
||||
'COLLAPSE_VIEW' => 'Collapse view',
|
||||
'CLOSE_WINDOW' => 'Close window',
|
||||
'COLOUR_SWATCH' => 'Colour swatch',
|
||||
|
@ -280,6 +280,8 @@ $lang = array_merge($lang, array(
|
|||
'GB' => 'GB',
|
||||
'GIB' => 'GiB',
|
||||
'GO' => 'Go',
|
||||
'GOTO_FIRST_POST' => 'Go to first post',
|
||||
'GOTO_LAST_POST' => 'Go to last post',
|
||||
'GOTO_PAGE' => 'Go to page',
|
||||
'GROUP' => 'Group',
|
||||
'GROUPS' => 'Groups',
|
||||
|
@ -416,14 +418,17 @@ $lang = array_merge($lang, array(
|
|||
'NOT_WATCHING_TOPIC' => 'You are no longer subscribed to this topic.',
|
||||
'NOTIFICATIONS' => 'Notifications',
|
||||
'NOTIFICATION_BOOKMARK' => '%1$s replied to the topic "%2$s" you have bookmarked.',
|
||||
'NOTIFICATION_BOOKMARK_TRIMMED' => '%1$s and %3$d others 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.',
|
||||
'NOTIFICATION_PM' => '%1$s sent you a Private Message "%2$s".',
|
||||
'NOTIFICATION_POST' => '%1$s replied to the topic "%2$s".',
|
||||
'NOTIFICATION_POST_TRIMMED' => '%1$s and %3$d others replied to the topic “%2$s”',
|
||||
'NOTIFICATION_POST_APPROVED' => 'Your post was approved "%2$s".',
|
||||
'NOTIFICATION_POST_DISAPPROVED' => 'Your post "%1$s" was disapproved for reason: "%2$s".',
|
||||
'NOTIFICATION_POST_IN_QUEUE' => 'A new post titled "%2$s" was posted by %1$s and needs approval.',
|
||||
'NOTIFICATION_QUOTE' => '%1$s quoted you in the post "%2$s".',
|
||||
'NOTIFICATION_QUOTE_TRIMMED' => '%1$s and %3$d others replied to the topic “%2$s”',
|
||||
'NOTIFICATION_REPORT_PM' => '%1$s reported a Private Message "%2$s" for reason: "%3$s".',
|
||||
'NOTIFICATION_REPORT_POST' => '%1$s reported a post "%2$s" for reason: "%3$s".',
|
||||
'NOTIFICATION_REPORT_CLOSED' => '%1$s closed the report you made for "%2$s".',
|
||||
|
@ -836,9 +841,6 @@ $lang = array_merge($lang, array(
|
|||
'YES' => 'Yes',
|
||||
'YIM' => 'YIM',
|
||||
'YOU_LAST_VISIT' => 'Last visit was: %s',
|
||||
'YOU_NEW_PM' => 'A new private message is waiting for you in your Inbox.',
|
||||
'YOU_NEW_PMS' => 'New private messages are waiting for you in your Inbox.',
|
||||
'YOU_NO_NEW_PM' => 'No new private messages are waiting for you.',
|
||||
|
||||
'datetime' => array(
|
||||
'TODAY' => 'Today',
|
||||
|
|
|
@ -2,7 +2,7 @@ Subject: Topic reply notification - "{TOPIC_TITLE}"
|
|||
|
||||
Hello {USERNAME},
|
||||
|
||||
You are receiving this notification because you are watching the topic "{TOPIC_TITLE}" at "{SITENAME}". This topic has received a reply<!-- IF AUTHOR_NAME !== '' --> by {AUTHOR_NAME}<!-- ENDIF --> since your last visit. You can use the following link to view the replies made, no more notifications will be sent until you visit the topic.
|
||||
You are receiving this notification because you are watching the topic "{TOPIC_TITLE}" at "{SITENAME}". This topic has received a reply<!-- IF AUTHOR_NAME !== '' --> by {AUTHOR_NAME}<!-- ENDIF --> since your last visit. No more notifications will be sent until you visit the topic.
|
||||
|
||||
If you want to view the newest post made since your last visit, click the following link:
|
||||
{U_NEWEST_POST}
|
||||
|
@ -14,7 +14,6 @@ If you want to view the forum, click the following link:
|
|||
{U_FORUM}
|
||||
|
||||
If you no longer wish to watch this topic you can either click the "Unsubscribe topic" link found at the bottom of the topic above, or by clicking the following link:
|
||||
|
||||
{U_STOP_WATCHING_TOPIC}
|
||||
|
||||
{EMAIL_SIG}
|
||||
|
|
|
@ -140,6 +140,7 @@ $lang = array_merge($lang, array(
|
|||
),
|
||||
'USER_ONLINE' => 'Online',
|
||||
'USER_PRESENCE' => 'Board presence',
|
||||
'USERS_PER_PAGE' => 'Users per page',
|
||||
|
||||
'VIEWING_PROFILE' => 'Viewing profile - %s',
|
||||
'VISITED' => 'Last visited',
|
||||
|
|
|
@ -38,15 +38,27 @@ if (empty($lang) || !is_array($lang))
|
|||
$lang = array_merge($lang, array(
|
||||
'PLUPLOAD_ADD_FILES' => 'Add files',
|
||||
'PLUPLOAD_ADD_FILES_TO_QUEUE' => 'Add files to the upload queue and click the start button.',
|
||||
'PLUPLOAD_ALREADY_QUEUED' => '%s already present in the queue.',
|
||||
'PLUPLOAD_CLOSE' => 'Close',
|
||||
'PLUPLOAD_DRAG' => 'Drag files here.',
|
||||
'PLUPLOAD_DUPLICATE_ERROR' => 'Duplicate file error.',
|
||||
'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_ERR_FILE_TOO_LARGE' => 'Error: File too large:',
|
||||
'PLUPLOAD_ERR_FILE_COUNT' => 'File count error.',
|
||||
'PLUPLOAD_ERR_FILE_INVALID_EXT' => 'Error: Invalid file extension:',
|
||||
'PLUPLOAD_ERR_RUNTIME_MEMORY' => 'Runtime ran out of available memory.',
|
||||
'PLUPLOAD_ERR_UPLOAD_LIMIT' => 'Upload element accepts only %d file(s) at a time. Extra files were stripped.',
|
||||
'PLUPLOAD_ERR_UPLOAD_URL' => 'Upload URL might be wrong or does not exist.',
|
||||
'PLUPLOAD_EXTENSION_ERROR' => 'File extension error.',
|
||||
'PLUPLOAD_FILE' => 'File: %s',
|
||||
'PLUPLOAD_FILE_DETAILS' => 'File: %s, size: %d, max file size: %d',
|
||||
'PLUPLOAD_FILENAME' => 'Filename',
|
||||
'PLUPLOAD_FILES_QUEUED' => '%d files queued',
|
||||
'PLUPLOAD_GENERIC_ERROR' => 'Generic error.',
|
||||
'PLUPLOAD_HTTP_ERROR' => 'HTTP error.',
|
||||
'PLUPLOAD_IMAGE_FORMAT' => 'Image format either wrong or not supported.',
|
||||
'PLUPLOAD_INIT_ERROR' => 'Init error.',
|
||||
'PLUPLOAD_IO_ERROR' => 'IO error.',
|
||||
'PLUPLOAD_NOT_APPLICABLE' => 'N/A',
|
||||
|
|
|
@ -409,7 +409,6 @@ $lang = array_merge($lang, array(
|
|||
'PM_SUBJECT' => 'Message subject',
|
||||
'PM_TO' => 'Send to',
|
||||
'PM_USERS_REMOVED_NO_PM' => 'Some users couldn’t be added as they have disabled private message receipt.',
|
||||
'POPUP_ON_PM' => 'Pop up window on new private message',
|
||||
'POST_EDIT_PM' => 'Edit message',
|
||||
'POST_FORWARD_PM' => 'Forward message',
|
||||
'POST_NEW_PM' => 'Compose message',
|
||||
|
@ -521,8 +520,6 @@ $lang = array_merge($lang, array(
|
|||
'UCP_PM_COMPOSE' => 'Compose message',
|
||||
'UCP_PM_DRAFTS' => 'Manage PM drafts',
|
||||
'UCP_PM_OPTIONS' => 'Rules, folders & settings',
|
||||
'UCP_PM_POPUP' => 'Private messages',
|
||||
'UCP_PM_POPUP_TITLE' => 'Private message popup',
|
||||
'UCP_PM_UNREAD' => 'Unread messages',
|
||||
'UCP_PM_VIEW' => 'View messages',
|
||||
|
||||
|
|
|
@ -104,6 +104,7 @@ $lang = array_merge($lang, array(
|
|||
|
||||
'SUBMIT_VOTE' => 'Submit vote',
|
||||
|
||||
'TOPIC_TOOLS' => 'Topic tools',
|
||||
'TOTAL_VOTES' => 'Total votes',
|
||||
|
||||
'UNLOCK_TOPIC' => 'Unlock topic',
|
||||
|
|
|
@ -178,14 +178,16 @@ class manager
|
|||
}
|
||||
|
||||
/**
|
||||
* Strip out user_ and group_ prefixes from keys
|
||||
* Strip out user_, group_, or other prefixes from array keys
|
||||
*
|
||||
* @param array $row User data or group data
|
||||
* @param array $row User data or group data
|
||||
* @param string $prefix Prefix of data keys (e.g. user), should not include the trailing underscore
|
||||
*
|
||||
* @return array User data or group data with keys that have been
|
||||
* stripped from the preceding "user_" or "group_"
|
||||
* @return array User or group data with keys that have been
|
||||
* stripped from the preceding "user_" or "group_"
|
||||
* Also the group id is prefixed with g, when the prefix group is removed.
|
||||
*/
|
||||
static public function clean_row($row)
|
||||
static public function clean_row($row, $prefix = '')
|
||||
{
|
||||
// Upon creation of a user/group $row might be empty
|
||||
if (empty($row))
|
||||
|
@ -193,23 +195,19 @@ class manager
|
|||
return self::$default_row;
|
||||
}
|
||||
|
||||
$keys = array_keys($row);
|
||||
$values = array_values($row);
|
||||
$output = array();
|
||||
foreach ($row as $key => $value)
|
||||
{
|
||||
$key = preg_replace("#^(?:{$prefix}_)#", '', $key);
|
||||
$output[$key] = $value;
|
||||
}
|
||||
|
||||
$keys = array_map(array('\phpbb\avatar\manager', 'strip_prefix'), $keys);
|
||||
if ($prefix === 'group' && isset($output['id']))
|
||||
{
|
||||
$output['id'] = 'g' . $output['id'];
|
||||
}
|
||||
|
||||
return array_combine($keys, $values);
|
||||
}
|
||||
|
||||
/**
|
||||
* Strip prepending user_ or group_ prefix from key
|
||||
*
|
||||
* @param string Array key
|
||||
* @return string Key that has been stripped from its prefix
|
||||
*/
|
||||
static protected function strip_prefix($key)
|
||||
{
|
||||
return preg_replace('#^(?:user_|group_)#', '', $key);
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
23
phpBB/phpbb/console/application.php
Normal file
23
phpBB/phpbb/console/application.php
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @copyright (c) 2013 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\console;
|
||||
|
||||
use Symfony\Component\DependencyInjection\TaggedContainerInterface;
|
||||
|
||||
class application extends \Symfony\Component\Console\Application
|
||||
{
|
||||
function register_container_commands(TaggedContainerInterface $container, $tag = 'console.command')
|
||||
{
|
||||
foreach($container->findTaggedServiceIds($tag) as $id => $void)
|
||||
{
|
||||
$this->add($container->get($id));
|
||||
}
|
||||
}
|
||||
}
|
14
phpBB/phpbb/console/command/command.php
Normal file
14
phpBB/phpbb/console/command/command.php
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @copyright (c) 2013 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\console\command;
|
||||
|
||||
abstract class command extends \Symfony\Component\Console\Command\Command
|
||||
{
|
||||
}
|
22
phpBB/phpbb/console/command/extension/command.php
Normal file
22
phpBB/phpbb/console/command/extension/command.php
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @copyright (c) 2013 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
namespace phpbb\console\command\extension;
|
||||
|
||||
abstract class command extends \phpbb\console\command\command
|
||||
{
|
||||
/** @var \phpbb\extension\manager */
|
||||
protected $manager;
|
||||
|
||||
function __construct(\phpbb\extension\manager $manager)
|
||||
{
|
||||
$this->manager = $manager;
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
}
|
47
phpBB/phpbb/console/command/extension/disable.php
Normal file
47
phpBB/phpbb/console/command/extension/disable.php
Normal file
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @copyright (c) 2013 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
namespace phpbb\console\command\extension;
|
||||
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
class disable extends command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('extension:disable')
|
||||
->setDescription('Disables the specified extension.')
|
||||
->addArgument(
|
||||
'extension-name',
|
||||
InputArgument::REQUIRED,
|
||||
'Name of the extension'
|
||||
)
|
||||
;
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$name = $input->getArgument('extension-name');
|
||||
$this->manager->disable($name);
|
||||
$this->manager->load_extensions();
|
||||
|
||||
if ($this->manager->enabled($name))
|
||||
{
|
||||
$output->writeln("<error>Could not disable extension $name</error>");
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$output->writeln("<info>Successfully disabled extension $name</info>");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
47
phpBB/phpbb/console/command/extension/enable.php
Normal file
47
phpBB/phpbb/console/command/extension/enable.php
Normal file
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @copyright (c) 2013 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
namespace phpbb\console\command\extension;
|
||||
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
class enable extends command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('extension:enable')
|
||||
->setDescription('Enables the specified extension.')
|
||||
->addArgument(
|
||||
'extension-name',
|
||||
InputArgument::REQUIRED,
|
||||
'Name of the extension'
|
||||
)
|
||||
;
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$name = $input->getArgument('extension-name');
|
||||
$this->manager->enable($name);
|
||||
$this->manager->load_extensions();
|
||||
|
||||
if ($this->manager->enabled($name))
|
||||
{
|
||||
$output->writeln("<info>Successfully enabled extension $name</info>");
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$output->writeln("<error>Could not enable extension $name</error>");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
47
phpBB/phpbb/console/command/extension/purge.php
Normal file
47
phpBB/phpbb/console/command/extension/purge.php
Normal file
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @copyright (c) 2013 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
namespace phpbb\console\command\extension;
|
||||
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
class purge extends command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('extension:purge')
|
||||
->setDescription('Purges the specified extension.')
|
||||
->addArgument(
|
||||
'extension-name',
|
||||
InputArgument::REQUIRED,
|
||||
'Name of the extension'
|
||||
)
|
||||
;
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$name = $input->getArgument('extension-name');
|
||||
$this->manager->purge($name);
|
||||
$this->manager->load_extensions();
|
||||
|
||||
if ($this->manager->enabled($name))
|
||||
{
|
||||
$output->writeln("<error>Could not purge extension $name</error>");
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$output->writeln("<info>Successfully purge extension $name</info>");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
58
phpBB/phpbb/console/command/extension/show.php
Normal file
58
phpBB/phpbb/console/command/extension/show.php
Normal file
|
@ -0,0 +1,58 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @copyright (c) 2013 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
namespace phpbb\console\command\extension;
|
||||
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
class show extends command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('extension:show')
|
||||
->setDescription('Lists all extensions in the database and on the filesystem.')
|
||||
;
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$this->manager->load_extensions();
|
||||
$all = array_keys($this->manager->all_available());
|
||||
|
||||
if (empty($all))
|
||||
{
|
||||
$output->writeln('<comment>No extensions were found.</comment>');
|
||||
return 3;
|
||||
}
|
||||
|
||||
$enabled = array_keys($this->manager->all_enabled());
|
||||
$this->print_extension_list($output, 'Enabled', $enabled);
|
||||
|
||||
$output->writeln('');
|
||||
|
||||
$disabled = array_keys($this->manager->all_disabled());
|
||||
$this->print_extension_list($output, 'Disabled', $disabled);
|
||||
|
||||
$output->writeln('');
|
||||
|
||||
$purged = array_diff($all, $enabled, $disabled);
|
||||
$this->print_extension_list($output, 'Available', $purged);
|
||||
}
|
||||
|
||||
protected function print_extension_list(OutputInterface $output, $type, array $extensions)
|
||||
{
|
||||
$output->writeln("<info>$type:</info>");
|
||||
|
||||
foreach ($extensions as $extension)
|
||||
{
|
||||
$output->writeln(" - $extension");
|
||||
}
|
||||
}
|
||||
}
|
71
phpBB/phpbb/console/command/fixup/recalculate_email_hash.php
Normal file
71
phpBB/phpbb/console/command/fixup/recalculate_email_hash.php
Normal file
|
@ -0,0 +1,71 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @copyright (c) 2013 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
namespace phpbb\console\command\fixup;
|
||||
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
class recalculate_email_hash extends \phpbb\console\command\command
|
||||
{
|
||||
/** @var \phpbb\db\driver\driver */
|
||||
protected $db;
|
||||
|
||||
function __construct(\phpbb\db\driver\driver $db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('fixup:recalculate-email-hash')
|
||||
->setDescription('Recalculates the user_email_hash column of the users table.')
|
||||
;
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$sql = 'SELECT user_id, user_email, user_email_hash
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE user_type <> ' . USER_IGNORE . "
|
||||
AND user_email <> ''";
|
||||
$result = $this->db->sql_query($sql);
|
||||
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
{
|
||||
$user_email_hash = phpbb_email_hash($row['user_email']);
|
||||
if ($user_email_hash !== $row['user_email_hash'])
|
||||
{
|
||||
$sql_ary = array(
|
||||
'user_email_hash' => $user_email_hash,
|
||||
);
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . '
|
||||
WHERE user_id = ' . (int) $row['user_id'];
|
||||
$this->db->sql_query($sql);
|
||||
|
||||
if ($output->getVerbosity() >= OutputInterface::VERBOSITY_DEBUG)
|
||||
{
|
||||
$output->writeln(sprintf(
|
||||
'user_id %d, email %s => %s',
|
||||
$row['user_id'],
|
||||
$row['user_email'],
|
||||
$user_email_hash
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
$output->writeln('<info>Successfully recalculated all email hashes.</info>');
|
||||
}
|
||||
}
|
|
@ -816,7 +816,7 @@ class driver
|
|||
*/
|
||||
function sql_report($mode, $query = '')
|
||||
{
|
||||
global $cache, $starttime, $phpbb_root_path, $phpbb_admin_path, $user;
|
||||
global $cache, $starttime, $phpbb_root_path, $phpbb_path_helper, $user;
|
||||
global $request;
|
||||
|
||||
if (is_object($request) && !$request->variable('explain', false))
|
||||
|
@ -846,7 +846,7 @@ class driver
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>SQL Report</title>
|
||||
<link href="' . htmlspecialchars($phpbb_admin_path) . 'style/admin.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
<link href="' . htmlspecialchars($phpbb_path_helper->update_web_root_path($phpbb_root_path) . $phpbb_path_helper->get_adm_relative_path()) . 'style/admin.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body id="errorpage">
|
||||
<div id="wrap">
|
||||
|
|
28
phpBB/phpbb/db/migration/data/v310/alpha2.php
Normal file
28
phpBB/phpbb/db/migration/data/v310/alpha2.php
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package migration
|
||||
* @copyright (c) 2013 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\migration\data\v310;
|
||||
|
||||
class alpha2 extends \phpbb\db\migration\migration
|
||||
{
|
||||
static public function depends_on()
|
||||
{
|
||||
return array(
|
||||
'\phpbb\db\migration\data\v310\alpha1',
|
||||
'\phpbb\db\migration\data\v310\notifications_cron_p2',
|
||||
);
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return array(
|
||||
array('config.update', array('version', '3.1.0-a2')),
|
||||
);
|
||||
}
|
||||
}
|
60
phpBB/phpbb/db/migration/data/v310/avatar_types.php
Normal file
60
phpBB/phpbb/db/migration/data/v310/avatar_types.php
Normal file
|
@ -0,0 +1,60 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package migration
|
||||
* @copyright (c) 2013 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\migration\data\v310;
|
||||
|
||||
class avatar_types extends \phpbb\db\migration\migration
|
||||
{
|
||||
/**
|
||||
* @var avatar type map
|
||||
*/
|
||||
protected $avatar_type_map = array(
|
||||
AVATAR_UPLOAD => 'avatar.driver.upload',
|
||||
AVATAR_REMOTE => 'avatar.driver.remote',
|
||||
AVATAR_GALLERY => 'avatar.driver.local',
|
||||
);
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array(
|
||||
'\phpbb\db\migration\data\v310\dev',
|
||||
'\phpbb\db\migration\data\v310\avatars',
|
||||
);
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return array(
|
||||
array('custom', array(array($this, 'update_user_avatar_type'))),
|
||||
array('custom', array(array($this, 'update_group_avatar_type'))),
|
||||
);
|
||||
}
|
||||
|
||||
public function update_user_avatar_type()
|
||||
{
|
||||
foreach ($this->avatar_type_map as $old => $new)
|
||||
{
|
||||
$sql = 'UPDATE ' . $this->table_prefix . "users
|
||||
SET user_avatar_type = '$new'
|
||||
WHERE user_avatar_type = '$old'";
|
||||
$this->db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
public function update_group_avatar_type()
|
||||
{
|
||||
foreach ($this->avatar_type_map as $old => $new)
|
||||
{
|
||||
$sql = 'UPDATE ' . $this->table_prefix . "groups
|
||||
SET group_avatar_type = '$new'
|
||||
WHERE group_avatar_type = '$old'";
|
||||
$this->db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
}
|
27
phpBB/phpbb/db/migration/data/v310/notifications_cron_p2.php
Normal file
27
phpBB/phpbb/db/migration/data/v310/notifications_cron_p2.php
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package migration
|
||||
* @copyright (c) 2013 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\migration\data\v310;
|
||||
|
||||
class notifications_cron_p2 extends \phpbb\db\migration\migration
|
||||
{
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('\phpbb\db\migration\data\v310\notifications_cron');
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return array(
|
||||
// Make read_notification_last_gc dynamic.
|
||||
array('config.remove', array('read_notification_last_gc')),
|
||||
array('config.add', array('read_notification_last_gc', 0, 1)),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -34,7 +34,10 @@ class softdelete_p2 extends \phpbb\db\migration\migration
|
|||
),
|
||||
'drop_keys' => array(
|
||||
$this->table_prefix . 'posts' => array('post_approved'),
|
||||
$this->table_prefix . 'topics' => array('forum_appr_last'),
|
||||
$this->table_prefix . 'topics' => array(
|
||||
'forum_appr_last',
|
||||
'topic_approved',
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -63,6 +66,7 @@ class softdelete_p2 extends \phpbb\db\migration\migration
|
|||
),
|
||||
$this->table_prefix . 'topics' => array(
|
||||
'forum_appr_last' => array('forum_id', 'topic_approved', 'topic_last_post_id'),
|
||||
'topic_approved' => array('topic_approved'),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -24,6 +24,14 @@ class style_update_p2 extends \phpbb\db\migration\migration
|
|||
public function update_schema()
|
||||
{
|
||||
return array(
|
||||
'drop_keys' => array(
|
||||
$this->table_prefix . 'styles' => array(
|
||||
'imageset_id',
|
||||
'template_id',
|
||||
'theme_id',
|
||||
),
|
||||
),
|
||||
|
||||
'drop_columns' => array(
|
||||
$this->table_prefix . 'styles' => array(
|
||||
'imageset_id',
|
||||
|
@ -53,6 +61,14 @@ class style_update_p2 extends \phpbb\db\migration\migration
|
|||
),
|
||||
),
|
||||
|
||||
'add_index' => array(
|
||||
$this->table_prefix . 'styles' => array(
|
||||
'imageset_id' => array('imageset_id'),
|
||||
'template_id' => array('template_id'),
|
||||
'theme_id' => array('theme_id'),
|
||||
),
|
||||
),
|
||||
|
||||
'add_tables' => array(
|
||||
$this->table_prefix . 'styles_imageset' => array(
|
||||
'COLUMNS' => array(
|
||||
|
|
42
phpBB/phpbb/db/migration/data/v310/ucp_popuppm_module.php
Normal file
42
phpBB/phpbb/db/migration/data/v310/ucp_popuppm_module.php
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package migration
|
||||
* @copyright (c) 2013 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\migration\data\v310;
|
||||
|
||||
class ucp_popuppm_module extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
$sql = 'SELECT module_id
|
||||
FROM ' . MODULES_TABLE . "
|
||||
WHERE module_class = 'ucp'
|
||||
AND module_langname = 'UCP_PM_POPUP_TITLE'";
|
||||
$result = $this->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\v310\dev');
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return array(
|
||||
array('module.remove', array(
|
||||
'ucp',
|
||||
'UCP_PM',
|
||||
'UCP_PM_POPUP_TITLE',
|
||||
)),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -375,7 +375,7 @@ class migrator
|
|||
|
||||
foreach ($steps as $step_identifier => $step)
|
||||
{
|
||||
$last_result = false;
|
||||
$last_result = 0;
|
||||
if ($state)
|
||||
{
|
||||
// Continue until we reach the step that matches the last step called
|
||||
|
@ -436,7 +436,7 @@ class migrator
|
|||
* @param bool $reverse False to install, True to attempt uninstallation by reversing the call
|
||||
* @return null
|
||||
*/
|
||||
protected function run_step($step, $last_result = false, $reverse = false)
|
||||
protected function run_step($step, $last_result = 0, $reverse = false)
|
||||
{
|
||||
$callable_and_parameters = $this->get_callable_from_step($step, $last_result, $reverse);
|
||||
|
||||
|
@ -459,7 +459,7 @@ class migrator
|
|||
* @param bool $reverse False to install, True to attempt uninstallation by reversing the call
|
||||
* @return array Array with parameters for call_user_func_array(), 0 is the callable, 1 is parameters
|
||||
*/
|
||||
protected function get_callable_from_step(array $step, $last_result = false, $reverse = false)
|
||||
protected function get_callable_from_step(array $step, $last_result = 0, $reverse = false)
|
||||
{
|
||||
$type = $step[0];
|
||||
$parameters = $step[1];
|
||||
|
|
|
@ -70,7 +70,7 @@ class config extends Extension
|
|||
{
|
||||
if (preg_match('#^[a-z]+$#', $acm_type))
|
||||
{
|
||||
return '\\phpbb\cache\driver\\'.$acm_type;
|
||||
return 'phpbb\\cache\\driver\\' . $acm_type;
|
||||
}
|
||||
|
||||
return $acm_type;
|
||||
|
|
|
@ -14,26 +14,22 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
|||
class extension_subscriber_loader
|
||||
{
|
||||
private $dispatcher;
|
||||
private $extension_manager;
|
||||
private $listener_collection;
|
||||
|
||||
public function __construct(EventDispatcherInterface $dispatcher, \phpbb\extension\manager $extension_manager)
|
||||
public function __construct(EventDispatcherInterface $dispatcher, \phpbb\di\service_collection $listener_collection)
|
||||
{
|
||||
$this->dispatcher = $dispatcher;
|
||||
$this->extension_manager = $extension_manager;
|
||||
$this->listener_collection = $listener_collection;
|
||||
}
|
||||
|
||||
public function load()
|
||||
{
|
||||
$finder = $this->extension_manager->get_finder();
|
||||
$subscriber_classes = $finder
|
||||
->extension_directory('/event')
|
||||
->core_path('event/')
|
||||
->get_classes();
|
||||
|
||||
foreach ($subscriber_classes as $class)
|
||||
if (!empty($this->listener_collection))
|
||||
{
|
||||
$subscriber = new $class();
|
||||
$this->dispatcher->addSubscriber($subscriber);
|
||||
foreach ($this->listener_collection as $listener)
|
||||
{
|
||||
$this->dispatcher->addSubscriber($listener);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
33
phpBB/phpbb/mimetype/content_guesser.php
Normal file
33
phpBB/phpbb/mimetype/content_guesser.php
Normal file
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @copyright (c) 2013 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\mimetype;
|
||||
|
||||
/**
|
||||
* @package mimetype
|
||||
*/
|
||||
|
||||
class content_guesser extends guesser_base
|
||||
{
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function is_supported()
|
||||
{
|
||||
return function_exists('mime_content_type');
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function guess($file, $file_name = '')
|
||||
{
|
||||
return mime_content_type($file);
|
||||
}
|
||||
}
|
509
phpBB/phpbb/mimetype/extension_guesser.php
Normal file
509
phpBB/phpbb/mimetype/extension_guesser.php
Normal file
|
@ -0,0 +1,509 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @copyright (c) 2013 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\mimetype;
|
||||
|
||||
/**
|
||||
* @package mimetype
|
||||
*/
|
||||
|
||||
class extension_guesser extends guesser_base
|
||||
{
|
||||
/**
|
||||
* @var file extension map
|
||||
*/
|
||||
protected $extension_map = array(
|
||||
'3dm' => 'x-world/x-3dmf',
|
||||
'3dmf' => 'x-world/x-3dmf',
|
||||
'a' => 'application/octet-stream',
|
||||
'aab' => 'application/x-authorware-bin',
|
||||
'aam' => 'application/x-authorware-map',
|
||||
'aas' => 'application/x-authorware-seg',
|
||||
'abc' => 'text/vnd.abc',
|
||||
'acgi' => 'text/html',
|
||||
'afl' => 'video/animaflex',
|
||||
'ai' => 'application/postscript',
|
||||
'aif' => 'audio/aiff',
|
||||
'aifc' => 'audio/aiff',
|
||||
'aiff' => 'audio/aiff',
|
||||
'aim' => 'application/x-aim',
|
||||
'aip' => 'text/x-audiosoft-intra',
|
||||
'ani' => 'application/x-navi-animation',
|
||||
'aos' => 'application/x-nokia-9000-communicator-add-on-software',
|
||||
'aps' => 'application/mime',
|
||||
'arc' => 'application/octet-stream',
|
||||
'arj' => 'application/arj',
|
||||
'art' => 'image/x-jg',
|
||||
'asf' => 'video/x-ms-asf',
|
||||
'asm' => 'text/x-asm',
|
||||
'asp' => 'text/asp',
|
||||
'asx' => 'video/x-ms-asf',
|
||||
'au' => 'audio/x-au',
|
||||
'avi' => 'video/avi',
|
||||
'avs' => 'video/avs-video',
|
||||
'bcpio' => 'application/x-bcpio',
|
||||
'bin' => 'application/x-binary',
|
||||
'bm' => 'image/bmp',
|
||||
'bmp' => 'image/bmp',
|
||||
'boo' => 'application/book',
|
||||
'book' => 'application/book',
|
||||
'boz' => 'application/x-bzip2',
|
||||
'bsh' => 'application/x-bsh',
|
||||
'bz' => 'application/x-bzip',
|
||||
'bz2' => 'application/x-bzip2',
|
||||
'c' => 'text/x-c',
|
||||
'c++' => 'text/x-c',
|
||||
'cat' => 'application/vnd.ms-pki.seccat',
|
||||
'cc' => 'text/plain',
|
||||
'ccad' => 'application/clariscad',
|
||||
'cco' => 'application/x-cocoa',
|
||||
'cdf' => 'application/cdf',
|
||||
'cer' => 'application/x-x509-ca-cert',
|
||||
'cha' => 'application/x-chat',
|
||||
'chat' => 'application/x-chat',
|
||||
'class' => 'application/java',
|
||||
'com' => 'application/octet-stream',
|
||||
'conf' => 'text/plain',
|
||||
'cpio' => 'application/x-cpio',
|
||||
'cpp' => 'text/x-c',
|
||||
'cpt' => 'application/x-cpt',
|
||||
'crl' => 'application/pkix-crl',
|
||||
'crt' => 'application/x-x509-ca-cert',
|
||||
'csh' => 'application/x-csh',
|
||||
'css' => 'text/css',
|
||||
'cxx' => 'text/plain',
|
||||
'dcr' => 'application/x-director',
|
||||
'deepv' => 'application/x-deepv',
|
||||
'def' => 'text/plain',
|
||||
'der' => 'application/x-x509-ca-cert',
|
||||
'dif' => 'video/x-dv',
|
||||
'dir' => 'application/x-director',
|
||||
'dl' => 'video/dl',
|
||||
'doc' => 'application/msword',
|
||||
'dot' => 'application/msword',
|
||||
'dp' => 'application/commonground',
|
||||
'drw' => 'application/drafting',
|
||||
'dump' => 'application/octet-stream',
|
||||
'dv' => 'video/x-dv',
|
||||
'dvi' => 'application/x-dvi',
|
||||
'dwf' => 'model/vnd.dwf',
|
||||
'dwg' => 'image/x-dwg',
|
||||
'dxf' => 'image/x-dwg',
|
||||
'dxr' => 'application/x-director',
|
||||
'el' => 'text/x-script.elisp',
|
||||
'elc' => 'application/x-elc',
|
||||
'env' => 'application/x-envoy',
|
||||
'eps' => 'application/postscript',
|
||||
'es' => 'application/x-esrehber',
|
||||
'etx' => 'text/x-setext',
|
||||
'evy' => 'application/x-envoy',
|
||||
'exe' => 'application/octet-stream',
|
||||
'f' => 'text/x-fortran',
|
||||
'f77' => 'text/x-fortran',
|
||||
'f90' => 'text/x-fortran',
|
||||
'fdf' => 'application/vnd.fdf',
|
||||
'fif' => 'image/fif',
|
||||
'fli' => 'video/x-fli',
|
||||
'flo' => 'image/florian',
|
||||
'flx' => 'text/vnd.fmi.flexstor',
|
||||
'fmf' => 'video/x-atomic3d-feature',
|
||||
'for' => 'text/x-fortran',
|
||||
'fpx' => 'image/vnd.fpx',
|
||||
'frl' => 'application/freeloader',
|
||||
'funk' => 'audio/make',
|
||||
'g' => 'text/plain',
|
||||
'g3' => 'image/g3fax',
|
||||
'gif' => 'image/gif',
|
||||
'gl' => 'video/x-gl',
|
||||
'gsd' => 'audio/x-gsm',
|
||||
'gsm' => 'audio/x-gsm',
|
||||
'gsp' => 'application/x-gsp',
|
||||
'gss' => 'application/x-gss',
|
||||
'gtar' => 'application/x-gtar',
|
||||
'gz' => 'application/x-gzip',
|
||||
'gzip' => 'application/x-gzip',
|
||||
'h' => 'text/x-h',
|
||||
'hdf' => 'application/x-hdf',
|
||||
'help' => 'application/x-helpfile',
|
||||
'hgl' => 'application/vnd.hp-hpgl',
|
||||
'hh' => 'text/x-h',
|
||||
'hlb' => 'text/x-script',
|
||||
'hlp' => 'application/hlp',
|
||||
'hpg' => 'application/vnd.hp-hpgl',
|
||||
'hpgl' => 'application/vnd.hp-hpgl',
|
||||
'hqx' => 'application/x-binhex40',
|
||||
'hta' => 'application/hta',
|
||||
'htc' => 'text/x-component',
|
||||
'htm' => 'text/html',
|
||||
'html' => 'text/html',
|
||||
'htmls' => 'text/html',
|
||||
'htt' => 'text/webviewhtml',
|
||||
'htx' => 'text/html',
|
||||
'ice' => 'x-conference/x-cooltalk',
|
||||
'ico' => 'image/x-icon',
|
||||
'idc' => 'text/plain',
|
||||
'ief' => 'image/ief',
|
||||
'iefs' => 'image/ief',
|
||||
'iges' => 'application/iges',
|
||||
'igs' => 'application/iges',
|
||||
'ima' => 'application/x-ima',
|
||||
'imap' => 'application/x-httpd-imap',
|
||||
'inf' => 'application/inf',
|
||||
'ins' => 'application/x-internett-signup',
|
||||
'ip' => 'application/x-ip2',
|
||||
'isu' => 'video/x-isvideo',
|
||||
'it' => 'audio/it',
|
||||
'iv' => 'application/x-inventor',
|
||||
'ivr' => 'i-world/i-vrml',
|
||||
'ivy' => 'application/x-livescreen',
|
||||
'jam' => 'audio/x-jam',
|
||||
'jav' => 'text/plain',
|
||||
'jav' => 'text/x-java-source',
|
||||
'java' => 'text/x-java-source',
|
||||
'jcm' => 'application/x-java-commerce',
|
||||
'jfif' => 'image/jpeg',
|
||||
'jfif-tbnl' => 'image/jpeg',
|
||||
'jpe' => 'image/jpeg',
|
||||
'jpeg' => 'image/jpeg',
|
||||
'jpg' => 'image/jpeg',
|
||||
'jps' => 'image/x-jps',
|
||||
'js' => 'application/x-javascript',
|
||||
'jut' => 'image/jutvision',
|
||||
'kar' => 'audio/midi',
|
||||
'ksh' => 'text/x-script.ksh',
|
||||
'la' => 'audio/x-nspaudio',
|
||||
'lam' => 'audio/x-liveaudio',
|
||||
'latex' => 'application/x-latex',
|
||||
'lha' => 'application/x-lha',
|
||||
'lhx' => 'application/octet-stream',
|
||||
'list' => 'text/plain',
|
||||
'lma' => 'audio/x-nspaudio',
|
||||
'log' => 'text/plain',
|
||||
'lsp' => 'text/x-script.lisp',
|
||||
'lst' => 'text/plain',
|
||||
'lsx' => 'text/x-la-asf',
|
||||
'ltx' => 'application/x-latex',
|
||||
'lzh' => 'application/x-lzh',
|
||||
'lzx' => 'application/x-lzx',
|
||||
'm' => 'text/x-m',
|
||||
'm1v' => 'video/mpeg',
|
||||
'm2a' => 'audio/mpeg',
|
||||
'm2v' => 'video/mpeg',
|
||||
'm3u' => 'audio/x-mpequrl',
|
||||
'man' => 'application/x-troff-man',
|
||||
'map' => 'application/x-navimap',
|
||||
'mar' => 'text/plain',
|
||||
'mbd' => 'application/mbedlet',
|
||||
'mc$' => 'application/x-magic-cap-package-1.0',
|
||||
'mcd' => 'application/x-mathcad',
|
||||
'mcf' => 'text/mcf',
|
||||
'mcp' => 'application/netmc',
|
||||
'me' => 'application/x-troff-me',
|
||||
'mht' => 'message/rfc822',
|
||||
'mhtml' => 'message/rfc822',
|
||||
'mid' => 'audio/x-midi',
|
||||
'midi' => 'audio/x-midi',
|
||||
'mif' => 'application/x-mif',
|
||||
'mime' => 'www/mime',
|
||||
'mjf' => 'audio/x-vnd.audioexplosion.mjuicemediafile',
|
||||
'mjpg' => 'video/x-motion-jpeg',
|
||||
'mm' => 'application/x-meme',
|
||||
'mme' => 'application/base64',
|
||||
'mod' => 'audio/x-mod',
|
||||
'moov' => 'video/quicktime',
|
||||
'mov' => 'video/quicktime',
|
||||
'movie' => 'video/x-sgi-movie',
|
||||
'mp2' => 'audio/x-mpeg',
|
||||
'mp3' => 'audio/x-mpeg-3',
|
||||
'mpa' => 'audio/mpeg',
|
||||
'mpc' => 'application/x-project',
|
||||
'mpe' => 'video/mpeg',
|
||||
'mpeg' => 'video/mpeg',
|
||||
'mpg' => 'video/mpeg',
|
||||
'mpga' => 'audio/mpeg',
|
||||
'mpp' => 'application/vnd.ms-project',
|
||||
'mpt' => 'application/x-project',
|
||||
'mpv' => 'application/x-project',
|
||||
'mpx' => 'application/x-project',
|
||||
'mrc' => 'application/marc',
|
||||
'ms' => 'application/x-troff-ms',
|
||||
'mv' => 'video/x-sgi-movie',
|
||||
'my' => 'audio/make',
|
||||
'mzz' => 'application/x-vnd.audioexplosion.mzz',
|
||||
'nap' => 'image/naplps',
|
||||
'naplps' => 'image/naplps',
|
||||
'nc' => 'application/x-netcdf',
|
||||
'ncm' => 'application/vnd.nokia.configuration-message',
|
||||
'nif' => 'image/x-niff',
|
||||
'niff' => 'image/x-niff',
|
||||
'nix' => 'application/x-mix-transfer',
|
||||
'nsc' => 'application/x-conference',
|
||||
'nvd' => 'application/x-navidoc',
|
||||
'o' => 'application/octet-stream',
|
||||
'oda' => 'application/oda',
|
||||
'omc' => 'application/x-omc',
|
||||
'omcd' => 'application/x-omcdatamaker',
|
||||
'omcr' => 'application/x-omcregerator',
|
||||
'p' => 'text/x-pascal',
|
||||
'p10' => 'application/x-pkcs10',
|
||||
'p12' => 'application/x-pkcs12',
|
||||
'p7a' => 'application/x-pkcs7-signature',
|
||||
'p7c' => 'application/x-pkcs7-mime',
|
||||
'p7m' => 'application/x-pkcs7-mime',
|
||||
'p7r' => 'application/x-pkcs7-certreqresp',
|
||||
'p7s' => 'application/pkcs7-signature',
|
||||
'part' => 'application/pro_eng',
|
||||
'pas' => 'text/pascal',
|
||||
'pbm' => 'image/x-portable-bitmap',
|
||||
'pcl' => 'application/x-pcl',
|
||||
'pct' => 'image/x-pict',
|
||||
'pcx' => 'image/x-pcx',
|
||||
'pdb' => 'chemical/x-pdb',
|
||||
'pdf' => 'application/pdf',
|
||||
'pfunk' => 'audio/make.my.funk',
|
||||
'pgm' => 'image/x-portable-greymap',
|
||||
'pic' => 'image/pict',
|
||||
'pict' => 'image/pict',
|
||||
'pkg' => 'application/x-newton-compatible-pkg',
|
||||
'pko' => 'application/vnd.ms-pki.pko',
|
||||
'pl' => 'text/x-script.perl',
|
||||
'plx' => 'application/x-pixclscript',
|
||||
'pm' => 'text/x-script.perl-module',
|
||||
'pm4' => 'application/x-pagemaker',
|
||||
'pm5' => 'application/x-pagemaker',
|
||||
'png' => 'image/png',
|
||||
'pnm' => 'image/x-portable-anymap',
|
||||
'pot' => 'application/mspowerpoint',
|
||||
'pov' => 'model/x-pov',
|
||||
'ppa' => 'application/vnd.ms-powerpoint',
|
||||
'ppm' => 'image/x-portable-pixmap',
|
||||
'pps' => 'application/mspowerpoint',
|
||||
'ppt' => 'application/mspowerpoint',
|
||||
'ppz' => 'application/mspowerpoint',
|
||||
'pre' => 'application/x-freelance',
|
||||
'prt' => 'application/pro_eng',
|
||||
'ps' => 'application/postscript',
|
||||
'psd' => 'application/octet-stream',
|
||||
'pvu' => 'paleovu/x-pv',
|
||||
'pwz' => 'application/vnd.ms-powerpoint',
|
||||
'py' => 'text/x-script.phyton',
|
||||
'pyc' => 'applicaiton/x-bytecode.python',
|
||||
'qcp' => 'audio/vnd.qcelp',
|
||||
'qd3' => 'x-world/x-3dmf',
|
||||
'qd3d' => 'x-world/x-3dmf',
|
||||
'qif' => 'image/x-quicktime',
|
||||
'qt' => 'video/quicktime',
|
||||
'qtc' => 'video/x-qtc',
|
||||
'qti' => 'image/x-quicktime',
|
||||
'qtif' => 'image/x-quicktime',
|
||||
'ra' => 'audio/x-realaudio',
|
||||
'ram' => 'audio/x-pn-realaudio',
|
||||
'ras' => 'image/x-cmu-raster',
|
||||
'rast' => 'image/cmu-raster',
|
||||
'rexx' => 'text/x-script.rexx',
|
||||
'rf' => 'image/vnd.rn-realflash',
|
||||
'rgb' => 'image/x-rgb',
|
||||
'rm' => 'audio/x-pn-realaudio',
|
||||
'rmi' => 'audio/mid',
|
||||
'rmm' => 'audio/x-pn-realaudio',
|
||||
'rmp' => 'audio/x-pn-realaudio',
|
||||
'rng' => 'application/vnd.nokia.ringing-tone',
|
||||
'rnx' => 'application/vnd.rn-realplayer',
|
||||
'roff' => 'application/x-troff',
|
||||
'rp' => 'image/vnd.rn-realpix',
|
||||
'rpm' => 'audio/x-pn-realaudio-plugin',
|
||||
'rt' => 'text/richtext',
|
||||
'rtf' => 'text/richtext',
|
||||
'rtx' => 'text/richtext',
|
||||
'rv' => 'video/vnd.rn-realvideo',
|
||||
's' => 'text/x-asm',
|
||||
's3m' => 'audio/s3m',
|
||||
'saveme' => 'application/octet-stream',
|
||||
'sbk' => 'application/x-tbook',
|
||||
'scm' => 'video/x-scm',
|
||||
'sdml' => 'text/plain',
|
||||
'sdp' => 'application/x-sdp',
|
||||
'sdr' => 'application/sounder',
|
||||
'sea' => 'application/x-sea',
|
||||
'set' => 'application/set',
|
||||
'sgm' => 'text/x-sgml',
|
||||
'sgml' => 'text/x-sgml',
|
||||
'sh' => 'text/x-script.sh',
|
||||
'shar' => 'application/x-shar',
|
||||
'shtml' => 'text/x-server-parsed-html',
|
||||
'sid' => 'audio/x-psid',
|
||||
'sit' => 'application/x-stuffit',
|
||||
'skd' => 'application/x-koan',
|
||||
'skm' => 'application/x-koan',
|
||||
'skp' => 'application/x-koan',
|
||||
'skt' => 'application/x-koan',
|
||||
'sl' => 'application/x-seelogo',
|
||||
'smi' => 'application/smil',
|
||||
'smil' => 'application/smil',
|
||||
'snd' => 'audio/x-adpcm',
|
||||
'sol' => 'application/solids',
|
||||
'spc' => 'text/x-speech',
|
||||
'spl' => 'application/futuresplash',
|
||||
'spr' => 'application/x-sprite',
|
||||
'sprite' => 'application/x-sprite',
|
||||
'src' => 'application/x-wais-source',
|
||||
'ssi' => 'text/x-server-parsed-html',
|
||||
'ssm' => 'application/streamingmedia',
|
||||
'sst' => 'application/vnd.ms-pki.certstore',
|
||||
'step' => 'application/step',
|
||||
'stl' => 'application/vnd.ms-pki.stl',
|
||||
'stp' => 'application/step',
|
||||
'sv4cpio' => 'application/x-sv4cpio',
|
||||
'sv4crc' => 'application/x-sv4crc',
|
||||
'svf' => 'image/x-dwg',
|
||||
'svr' => 'application/x-world',
|
||||
'swf' => 'application/x-shockwave-flash',
|
||||
't' => 'application/x-troff',
|
||||
'talk' => 'text/x-speech',
|
||||
'tar' => 'application/x-tar',
|
||||
'tbk' => 'application/x-tbook',
|
||||
'tcl' => 'text/x-script.tcl',
|
||||
'tcsh' => 'text/x-script.tcsh',
|
||||
'tex' => 'application/x-tex',
|
||||
'texi' => 'application/x-texinfo',
|
||||
'texinfo' => 'application/x-texinfo',
|
||||
'text' => 'text/plain',
|
||||
'tgz' => 'application/x-compressed',
|
||||
'tif' => 'image/tiff',
|
||||
'tiff' => 'image/tiff',
|
||||
'tr' => 'application/x-troff',
|
||||
'tsi' => 'audio/tsp-audio',
|
||||
'tsp' => 'audio/tsplayer',
|
||||
'tsv' => 'text/tab-separated-values',
|
||||
'turbot' => 'image/florian',
|
||||
'txt' => 'text/plain',
|
||||
'uil' => 'text/x-uil',
|
||||
'uni' => 'text/uri-list',
|
||||
'unis' => 'text/uri-list',
|
||||
'unv' => 'application/i-deas',
|
||||
'uri' => 'text/uri-list',
|
||||
'uris' => 'text/uri-list',
|
||||
'ustar' => 'multipart/x-ustar',
|
||||
'uu' => 'text/x-uuencode',
|
||||
'uue' => 'text/x-uuencode',
|
||||
'vcd' => 'application/x-cdlink',
|
||||
'vcs' => 'text/x-vcalendar',
|
||||
'vda' => 'application/vda',
|
||||
'vdo' => 'video/vdo',
|
||||
'vew' => 'application/groupwise',
|
||||
'viv' => 'video/vivo',
|
||||
'vivo' => 'video/vivo',
|
||||
'vmd' => 'application/vocaltec-media-desc',
|
||||
'vmf' => 'application/vocaltec-media-file',
|
||||
'voc' => 'audio/voc',
|
||||
'vos' => 'video/vosaic',
|
||||
'vox' => 'audio/voxware',
|
||||
'vqe' => 'audio/x-twinvq-plugin',
|
||||
'vqf' => 'audio/x-twinvq',
|
||||
'vql' => 'audio/x-twinvq-plugin',
|
||||
'vrml' => 'application/x-vrml',
|
||||
'vrt' => 'x-world/x-vrt',
|
||||
'vsd' => 'application/x-visio',
|
||||
'vst' => 'application/x-visio',
|
||||
'vsw' => 'application/x-visio',
|
||||
'w60' => 'application/wordperfect6.0',
|
||||
'w61' => 'application/wordperfect6.1',
|
||||
'w6w' => 'application/msword',
|
||||
'wav' => 'audio/wav',
|
||||
'wb1' => 'application/x-qpro',
|
||||
'wbmp' => 'image/vnd.wap.wbmp',
|
||||
'web' => 'application/vnd.xara',
|
||||
'wiz' => 'application/msword',
|
||||
'wk1' => 'application/x-123',
|
||||
'wmf' => 'windows/metafile',
|
||||
'wml' => 'text/vnd.wap.wml',
|
||||
'wmlc' => 'application/vnd.wap.wmlc',
|
||||
'wmls' => 'text/vnd.wap.wmlscript',
|
||||
'wmlsc' => 'application/vnd.wap.wmlscriptc',
|
||||
'word' => 'application/msword',
|
||||
'wp' => 'application/wordperfect',
|
||||
'wp5' => 'application/wordperfect',
|
||||
'wp6' => 'application/wordperfect',
|
||||
'wpd' => 'application/wordperfect',
|
||||
'wq1' => 'application/x-lotus',
|
||||
'wri' => 'application/mswrite',
|
||||
'wrl' => 'model/vrml',
|
||||
'wrz' => 'model/vrml',
|
||||
'wsc' => 'text/scriplet',
|
||||
'wsrc' => 'application/x-wais-source',
|
||||
'wtk' => 'application/x-wintalk',
|
||||
'xbm' => 'image/xbm',
|
||||
'xdr' => 'video/x-amt-demorun',
|
||||
'xgz' => 'xgl/drawing',
|
||||
'xif' => 'image/vnd.xiff',
|
||||
'xl' => 'application/excel',
|
||||
'xla' => 'application/excel',
|
||||
'xlb' => 'application/excel',
|
||||
'xlc' => 'application/excel',
|
||||
'xld' => 'application/excel',
|
||||
'xlk' => 'application/excel',
|
||||
'xll' => 'application/excel',
|
||||
'xlm' => 'application/excel',
|
||||
'xls' => 'application/excel',
|
||||
'xlt' => 'application/excel',
|
||||
'xlv' => 'application/excel',
|
||||
'xlw' => 'application/excel',
|
||||
'xm' => 'audio/xm',
|
||||
'xml' => 'text/xml',
|
||||
'xmz' => 'xgl/movie',
|
||||
'xpix' => 'application/x-vnd.ls-xpix',
|
||||
'xpm' => 'image/xpm',
|
||||
'x-png' => 'image/png',
|
||||
'xsr' => 'video/x-amt-showrun',
|
||||
'xwd' => 'image/x-xwindowdump',
|
||||
'xyz' => 'chemical/x-pdb',
|
||||
'z' => 'application/x-compressed',
|
||||
'zip' => 'application/x-zip-compressed',
|
||||
'zoo' => 'application/octet-stream',
|
||||
'zsh' => 'text/x-script.zsh',
|
||||
);
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function is_supported()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function guess($file, $file_name = '')
|
||||
{
|
||||
$file_name = (empty($file_name)) ? $file : $file_name;
|
||||
return $this->map_extension_to_type($file_name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Map extension of supplied file_name to mime type
|
||||
*
|
||||
* @param string $file_name Path to file or filename
|
||||
*
|
||||
* @return string|null Mimetype if known or null if not
|
||||
*/
|
||||
protected function map_extension_to_type($file_name)
|
||||
{
|
||||
$extension = pathinfo($file_name, PATHINFO_EXTENSION);
|
||||
|
||||
if (isset($this->extension_map[$extension]))
|
||||
{
|
||||
return $this->extension_map[$extension];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
130
phpBB/phpbb/mimetype/guesser.php
Normal file
130
phpBB/phpbb/mimetype/guesser.php
Normal file
|
@ -0,0 +1,130 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @copyright (c) 2013 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\mimetype;
|
||||
|
||||
/**
|
||||
* @package mimetype
|
||||
*/
|
||||
|
||||
class guesser
|
||||
{
|
||||
/**
|
||||
* @const Default priority for mimetype guessers
|
||||
*/
|
||||
const PRIORITY_DEFAULT = 0;
|
||||
|
||||
/**
|
||||
* @var mimetype guessers
|
||||
*/
|
||||
protected $guessers;
|
||||
|
||||
/**
|
||||
* Construct a mimetype guesser object
|
||||
*
|
||||
* @param array $mimetype_guessers Mimetype guesser service collection
|
||||
*/
|
||||
public function __construct($mimetype_guessers)
|
||||
{
|
||||
$this->register_guessers($mimetype_guessers);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register MimeTypeGuessers and sort them by priority
|
||||
*
|
||||
* @param array $mimetype_guessers Mimetype guesser service collection
|
||||
*
|
||||
* @throws \LogicException If incorrect or not mimetype guessers have
|
||||
* been supplied to class
|
||||
*/
|
||||
protected function register_guessers($mimetype_guessers)
|
||||
{
|
||||
foreach ($mimetype_guessers as $guesser)
|
||||
{
|
||||
$is_supported = (method_exists($guesser, 'is_supported')) ? 'is_supported' : '';
|
||||
$is_supported = (method_exists($guesser, 'isSupported')) ? 'isSupported' : $is_supported;
|
||||
|
||||
if (empty($is_supported))
|
||||
{
|
||||
throw new \LogicException('Incorrect mimetype guesser supplied.');
|
||||
}
|
||||
|
||||
if ($guesser->$is_supported())
|
||||
{
|
||||
$this->guessers[] = $guesser;
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($this->guessers))
|
||||
{
|
||||
throw new \LogicException('No mimetype guesser supplied.');
|
||||
}
|
||||
|
||||
// Sort guessers by priority
|
||||
usort($this->guessers, array($this, 'sort_priority'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sort the priority of supplied guessers
|
||||
* This is a compare function for usort. A guesser with higher priority
|
||||
* should be used first and vice versa. usort() orders the array values
|
||||
* from low to high depending on what the comparison function returns
|
||||
* to it. Return value should be smaller than 0 if value a is smaller
|
||||
* than value b. This has been reversed in the comparision function in
|
||||
* order to sort the guessers from high to low.
|
||||
* Method has been set to public in order to allow proper testing.
|
||||
*
|
||||
* @param object $guesser_a Mimetype guesser a
|
||||
* @param object $guesser_b Mimetype guesser b
|
||||
*
|
||||
* @return int If both guessers have the same priority 0, bigger
|
||||
* than 0 if first guesser has lower priority, and lower
|
||||
* than 0 if first guesser has higher priority
|
||||
*/
|
||||
public function sort_priority($guesser_a, $guesser_b)
|
||||
{
|
||||
$priority_a = (int) (method_exists($guesser_a, 'get_priority')) ? $guesser_a->get_priority() : self::PRIORITY_DEFAULT;
|
||||
$priority_b = (int) (method_exists($guesser_b, 'get_priority')) ? $guesser_b->get_priority() : self::PRIORITY_DEFAULT;
|
||||
|
||||
return $priority_b - $priority_a;
|
||||
}
|
||||
|
||||
/**
|
||||
* Guess mimetype of supplied file
|
||||
*
|
||||
* @param string $file Path to file
|
||||
*
|
||||
* @return string Guess for mimetype of file
|
||||
*/
|
||||
public function guess($file, $file_name = '')
|
||||
{
|
||||
if (!is_file($file))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!is_readable($file))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach ($this->guessers as $guesser)
|
||||
{
|
||||
$mimetype = $guesser->guess($file, $file_name);
|
||||
|
||||
// Try to guess something that is not the fallback application/octet-stream
|
||||
if ($mimetype !== null && $mimetype !== 'application/octet-stream')
|
||||
{
|
||||
return $mimetype;
|
||||
}
|
||||
}
|
||||
// Return any mimetype if we got a result or the fallback value
|
||||
return (!empty($mimetype)) ? $mimetype : 'application/octet-stream';
|
||||
}
|
||||
}
|
38
phpBB/phpbb/mimetype/guesser_base.php
Normal file
38
phpBB/phpbb/mimetype/guesser_base.php
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @copyright (c) 2013 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\mimetype;
|
||||
|
||||
/**
|
||||
* @package mimetype
|
||||
*/
|
||||
|
||||
abstract class guesser_base implements guesser_interface
|
||||
{
|
||||
/**
|
||||
* @var int Guesser Priority
|
||||
*/
|
||||
protected $priority;
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function get_priority()
|
||||
{
|
||||
return $this->priority;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function set_priority($priority)
|
||||
{
|
||||
$this->priority = $priority;
|
||||
}
|
||||
}
|
49
phpBB/phpbb/mimetype/guesser_interface.php
Normal file
49
phpBB/phpbb/mimetype/guesser_interface.php
Normal file
|
@ -0,0 +1,49 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @copyright (c) 2013 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\mimetype;
|
||||
|
||||
/**
|
||||
* @package mimetype
|
||||
*/
|
||||
|
||||
interface guesser_interface
|
||||
{
|
||||
/**
|
||||
* Returns whether this guesser is supported on the current OS
|
||||
*
|
||||
* @return bool True if guesser is supported, false if not
|
||||
*/
|
||||
public function is_supported();
|
||||
|
||||
/**
|
||||
* Guess mimetype of supplied file
|
||||
*
|
||||
* @param string $file Path to file
|
||||
*
|
||||
* @return string Guess for mimetype of file
|
||||
*/
|
||||
public function guess($file, $file_name = '');
|
||||
|
||||
/**
|
||||
* Get the guesser priority
|
||||
*
|
||||
* @return int Guesser priority
|
||||
*/
|
||||
public function get_priority();
|
||||
|
||||
/**
|
||||
* Set the guesser priority
|
||||
*
|
||||
* @param int Guesser priority
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function set_priority($priority);
|
||||
}
|
|
@ -27,6 +27,9 @@ class manager
|
|||
/** @var \phpbb\user_loader */
|
||||
protected $user_loader;
|
||||
|
||||
/** @var \phpbb\config\config */
|
||||
protected $config;
|
||||
|
||||
/** @var \phpbb\db\driver\driver */
|
||||
protected $db;
|
||||
|
||||
|
@ -58,6 +61,7 @@ class manager
|
|||
* @param array $notification_methods
|
||||
* @param ContainerBuilder $phpbb_container
|
||||
* @param \phpbb\user_loader $user_loader
|
||||
* @param \phpbb\config\config $config
|
||||
* @param \phpbb\db\driver\driver $db
|
||||
* @param \phpbb\user $user
|
||||
* @param string $phpbb_root_path
|
||||
|
@ -67,13 +71,14 @@ class manager
|
|||
* @param string $user_notifications_table
|
||||
* @return \phpbb\notification\manager
|
||||
*/
|
||||
public function __construct($notification_types, $notification_methods, $phpbb_container, \phpbb\user_loader $user_loader, \phpbb\db\driver\driver $db, \phpbb\cache\service $cache, $user, $phpbb_root_path, $php_ext, $notification_types_table, $notifications_table, $user_notifications_table)
|
||||
public function __construct($notification_types, $notification_methods, $phpbb_container, \phpbb\user_loader $user_loader, \phpbb\config\config $config, \phpbb\db\driver\driver $db, \phpbb\cache\service $cache, $user, $phpbb_root_path, $php_ext, $notification_types_table, $notifications_table, $user_notifications_table)
|
||||
{
|
||||
$this->notification_types = $notification_types;
|
||||
$this->notification_methods = $notification_methods;
|
||||
$this->phpbb_container = $phpbb_container;
|
||||
|
||||
$this->user_loader = $user_loader;
|
||||
$this->config = $config;
|
||||
$this->db = $db;
|
||||
$this->cache = $cache;
|
||||
$this->user = $user;
|
||||
|
@ -797,6 +802,8 @@ class manager
|
|||
WHERE notification_time < ' . (int) $timestamp .
|
||||
(($only_read) ? ' AND notification_read = 1' : '');
|
||||
$this->db->sql_query($sql);
|
||||
|
||||
$this->config->set('read_notification_last_gc', time(), false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -183,6 +183,10 @@ class post extends \phpbb\notification\type\base
|
|||
'username' => $this->get_data('post_username'),
|
||||
)), $responders);
|
||||
|
||||
$responders_cnt = sizeof($responders);
|
||||
$responders = $this->trim_user_ary($responders);
|
||||
$trimmed_responders_cnt = $responders_cnt - sizeof($responders);
|
||||
|
||||
foreach ($responders as $responder)
|
||||
{
|
||||
if ($responder['username'])
|
||||
|
@ -194,11 +198,18 @@ class post extends \phpbb\notification\type\base
|
|||
$usernames[] = $this->user_loader->get_username($responder['poster_id'], 'no_profile');
|
||||
}
|
||||
}
|
||||
$lang_key = $this->language_key;
|
||||
|
||||
if ($trimmed_responders_cnt)
|
||||
{
|
||||
$lang_key .= '_TRIMMED';
|
||||
}
|
||||
|
||||
return $this->user->lang(
|
||||
$this->language_key,
|
||||
implode(', ', $usernames),
|
||||
censor_text($this->get_data('topic_title'))
|
||||
$lang_key,
|
||||
implode($this->user->lang['COMMA_SEPARATOR'], $usernames),
|
||||
censor_text($this->get_data('topic_title')),
|
||||
$trimmed_responders_cnt
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -234,7 +245,7 @@ class post extends \phpbb\notification\type\base
|
|||
'TOPIC_TITLE' => htmlspecialchars_decode(censor_text($this->get_data('topic_title'))),
|
||||
|
||||
'U_VIEW_POST' => generate_board_url() . "/viewtopic.{$this->php_ext}?p={$this->item_id}#p{$this->item_id}",
|
||||
'U_NEWEST_POST' => generate_board_url() . "/viewtopic.{$this->php_ext}?f={$this->get_data('forum_id')}&t={$this->item_parent_id}&view=unread#unread",
|
||||
'U_NEWEST_POST' => generate_board_url() . "/viewtopic.{$this->php_ext}?f={$this->get_data('forum_id')}&t={$this->item_parent_id}&e=1&view=unread#unread",
|
||||
'U_TOPIC' => generate_board_url() . "/viewtopic.{$this->php_ext}?f={$this->get_data('forum_id')}&t={$this->item_parent_id}",
|
||||
'U_VIEW_TOPIC' => generate_board_url() . "/viewtopic.{$this->php_ext}?f={$this->get_data('forum_id')}&t={$this->item_parent_id}",
|
||||
'U_FORUM' => generate_board_url() . "/viewforum.{$this->php_ext}?f={$this->get_data('forum_id')}",
|
||||
|
@ -272,6 +283,22 @@ class post extends \phpbb\notification\type\base
|
|||
}
|
||||
}
|
||||
|
||||
return $this->trim_user_ary($users);
|
||||
}
|
||||
|
||||
/**
|
||||
* Trim the user array passed down to 3 users if the array contains
|
||||
* more than 4 users.
|
||||
*
|
||||
* @param array $users Array of users
|
||||
* @return array Trimmed array of user_ids
|
||||
*/
|
||||
public function trim_user_ary($users)
|
||||
{
|
||||
if (sizeof($users) > 4)
|
||||
{
|
||||
array_splice($users, 3);
|
||||
}
|
||||
return $users;
|
||||
}
|
||||
|
||||
|
|
|
@ -41,6 +41,11 @@ class plupload
|
|||
*/
|
||||
protected $php_ini;
|
||||
|
||||
/**
|
||||
* @var \phpbb\mimetype\guesser
|
||||
*/
|
||||
protected $mimetype_guesser;
|
||||
|
||||
/**
|
||||
* Final destination for uploaded files, i.e. the "files" directory.
|
||||
* @var string
|
||||
|
@ -61,16 +66,18 @@ class plupload
|
|||
* @param \phpbb\request\request_interface $request
|
||||
* @param \phpbb\user $user
|
||||
* @param \phpbb\php\ini $php_ini
|
||||
* @param \phpbb\mimetype\guesser $mimetype_guesser
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
public function __construct($phpbb_root_path, \phpbb\config\config $config, \phpbb\request\request_interface $request, \phpbb\user $user, \phpbb\php\ini $php_ini)
|
||||
public function __construct($phpbb_root_path, \phpbb\config\config $config, \phpbb\request\request_interface $request, \phpbb\user $user, \phpbb\php\ini $php_ini, \phpbb\mimetype\guesser $mimetype_guesser)
|
||||
{
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
$this->config = $config;
|
||||
$this->request = $request;
|
||||
$this->user = $user;
|
||||
$this->php_ini = $php_ini;
|
||||
$this->mimetype_guesser = $mimetype_guesser;
|
||||
|
||||
$this->upload_directory = $this->phpbb_root_path . $this->config['upload_path'];
|
||||
$this->temporary_directory = $this->upload_directory . '/plupload';
|
||||
|
@ -113,14 +120,12 @@ class plupload
|
|||
{
|
||||
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),
|
||||
'type' => $this->mimetype_guesser->guess($file_path, $file_name),
|
||||
);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -68,6 +68,12 @@ class lexer extends \Twig_Lexer
|
|||
);
|
||||
|
||||
// Fix tokens that may have inline variables (e.g. <!-- DEFINE $TEST = '{FOO}')
|
||||
$code = $this->strip_surrounding_quotes(array(
|
||||
'INCLUDE',
|
||||
'INCLUDEPHP',
|
||||
'INCLUDEJS',
|
||||
'INCLUDECSS',
|
||||
), $code);
|
||||
$code = $this->fix_inline_variable_tokens(array(
|
||||
'DEFINE \$[a-zA-Z0-9_]+ =',
|
||||
'INCLUDE',
|
||||
|
@ -75,6 +81,12 @@ class lexer extends \Twig_Lexer
|
|||
'INCLUDEJS',
|
||||
'INCLUDECSS',
|
||||
), $code);
|
||||
$code = $this->add_surrounding_quotes(array(
|
||||
'INCLUDE',
|
||||
'INCLUDEPHP',
|
||||
'INCLUDEJS',
|
||||
'INCLUDECSS',
|
||||
), $code);
|
||||
|
||||
// Fix our BEGIN statements
|
||||
$code = $this->fix_begin_tokens($code);
|
||||
|
@ -107,10 +119,30 @@ class lexer extends \Twig_Lexer
|
|||
return parent::tokenize($code, $filename);
|
||||
}
|
||||
|
||||
/**
|
||||
* Strip surrounding quotes
|
||||
*
|
||||
* First step to fix tokens that may have inline variables
|
||||
* E.g. <!-- INCLUDE '{TEST}.html' to <!-- INCLUDE {TEST}.html
|
||||
*
|
||||
* @param array $tokens array of tokens to search for (imploded to a regular expression)
|
||||
* @param string $code
|
||||
* @return string
|
||||
*/
|
||||
protected function strip_surrounding_quotes($tokens, $code)
|
||||
{
|
||||
// Remove matching quotes at the beginning/end if a statement;
|
||||
// E.g. 'asdf'"' -> asdf'"
|
||||
// E.g. "asdf'"" -> asdf'"
|
||||
// E.g. 'asdf'" -> 'asdf'"
|
||||
return preg_replace('#<!-- (' . implode('|', $tokens) . ') (([\'"])?(.*?)\1) -->#', '<!-- $1 $2 -->', $code);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fix tokens that may have inline variables
|
||||
*
|
||||
* E.g. <!-- INCLUDE {TEST}.html
|
||||
* Second step to fix tokens that may have inline variables
|
||||
* E.g. <!-- INCLUDE '{TEST}.html' to <!-- INCLUDE ' ~ {TEST} ~ '.html
|
||||
*
|
||||
* @param array $tokens array of tokens to search for (imploded to a regular expression)
|
||||
* @param string $code
|
||||
|
@ -120,22 +152,30 @@ class lexer extends \Twig_Lexer
|
|||
{
|
||||
$callback = function($matches)
|
||||
{
|
||||
// Remove matching quotes at the beginning/end if a statement;
|
||||
// E.g. 'asdf'"' -> asdf'"
|
||||
// E.g. "asdf'"" -> asdf'"
|
||||
// E.g. 'asdf'" -> 'asdf'"
|
||||
$matches[2] = preg_replace('#^([\'"])?(.*?)\1$#', '$2', $matches[2]);
|
||||
|
||||
// Replace template variables with start/end to parse variables (' ~ TEST ~ '.html)
|
||||
$matches[2] = preg_replace('#{([a-zA-Z0-9_\.$]+)}#', "'~ \$1 ~'", $matches[2]);
|
||||
|
||||
// Surround the matches in single quotes ('' ~ TEST ~ '.html')
|
||||
return "<!-- {$matches[1]} '{$matches[2]}' -->";
|
||||
return "<!-- {$matches[1]} {$matches[2]} -->";
|
||||
};
|
||||
|
||||
return preg_replace_callback('#<!-- (' . implode('|', $tokens) . ') (.+?) -->#', $callback, $code);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add surrounding quotes
|
||||
*
|
||||
* Last step to fix tokens that may have inline variables
|
||||
* E.g. <!-- INCLUDE '{TEST}.html' to <!-- INCLUDE '' ~ {TEST} ~ '.html'
|
||||
*
|
||||
* @param array $tokens array of tokens to search for (imploded to a regular expression)
|
||||
* @param string $code
|
||||
* @return string
|
||||
*/
|
||||
protected function add_surrounding_quotes($tokens, $code)
|
||||
{
|
||||
return preg_replace('#<!-- (' . implode('|', $tokens) . ') (.+?) -->#', '<!-- $1 \'$2\' -->', $code);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fix begin tokens (convert our BEGIN to Twig for)
|
||||
*
|
||||
|
|
|
@ -30,6 +30,13 @@ class defineparser extends \Twig_TokenParser
|
|||
$stream->next();
|
||||
$value = $this->parser->getExpressionParser()->parseExpression();
|
||||
|
||||
if ($value instanceof \Twig_Node_Expression_Name)
|
||||
{
|
||||
// This would happen if someone improperly formed their DEFINE syntax
|
||||
// e.g. <!-- DEFINE $VAR = foo -->
|
||||
throw new \Twig_Error_Syntax('Invalid DEFINE', $token->getLine(), $this->parser->getFilename());
|
||||
}
|
||||
|
||||
$stream->expect(\Twig_Token::BLOCK_END_TYPE);
|
||||
} else {
|
||||
$capture = true;
|
||||
|
|
|
@ -36,7 +36,7 @@ class user extends \phpbb\session
|
|||
var $img_array = array();
|
||||
|
||||
// Able to add new options (up to id 31)
|
||||
var $keyoptions = array('viewimg' => 0, 'viewflash' => 1, 'viewsmilies' => 2, 'viewsigs' => 3, 'viewavatars' => 4, 'viewcensors' => 5, 'attachsig' => 6, 'bbcode' => 8, 'smilies' => 9, 'popuppm' => 10, 'sig_bbcode' => 15, 'sig_smilies' => 16, 'sig_links' => 17);
|
||||
var $keyoptions = array('viewimg' => 0, 'viewflash' => 1, 'viewsmilies' => 2, 'viewsigs' => 3, 'viewavatars' => 4, 'viewcensors' => 5, 'attachsig' => 6, 'bbcode' => 8, 'smilies' => 9, 'sig_bbcode' => 15, 'sig_smilies' => 16, 'sig_links' => 17);
|
||||
|
||||
/**
|
||||
* Constructor to set the lang path
|
||||
|
|
|
@ -385,9 +385,13 @@ if ($mode == 'bump')
|
|||
{
|
||||
$meta_url = phpbb_bump_topic($forum_id, $topic_id, $post_data, $current_time);
|
||||
meta_refresh(3, $meta_url);
|
||||
$message = $user->lang['TOPIC_BUMPED'];
|
||||
|
||||
$message = $user->lang['TOPIC_BUMPED'] . '<br /><br />' . $user->lang('VIEW_MESSAGE', '<a href="' . $meta_url . '">', '</a>');
|
||||
$message .= '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) . '">', '</a>');
|
||||
if (!$request->is_ajax())
|
||||
{
|
||||
$message .= '<br /><br />' . $user->lang('VIEW_MESSAGE', '<a href="' . $meta_url . '">', '</a>');
|
||||
$message .= '<br /><br />' . $user->lang('RETURN_FORUM', '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) . '">', '</a>');
|
||||
}
|
||||
|
||||
trigger_error($message);
|
||||
}
|
||||
|
@ -1616,7 +1620,7 @@ function upload_popup($forum_style = 0)
|
|||
*/
|
||||
function handle_post_delete($forum_id, $topic_id, $post_id, &$post_data, $is_soft = false, $soft_delete_reason = '')
|
||||
{
|
||||
global $user, $db, $auth, $config;
|
||||
global $user, $db, $auth, $config, $request;
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
$perm_check = ($is_soft) ? 'softdelete' : 'delete';
|
||||
|
@ -1662,11 +1666,19 @@ function handle_post_delete($forum_id, $topic_id, $post_id, &$post_data, $is_sof
|
|||
add_log('mod', $forum_id, $topic_id, (($is_soft) ? 'LOG_SOFTDELETE_POST' : 'LOG_DELETE_POST'), $post_data['post_subject'], $post_username);
|
||||
|
||||
$meta_info = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&p=$next_post_id") . "#p$next_post_id";
|
||||
$message = $user->lang['POST_DELETED'] . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $meta_info . '">', '</a>');
|
||||
$message = $user->lang['POST_DELETED'];
|
||||
|
||||
if (!$request->is_ajax())
|
||||
{
|
||||
$message .= '<br /><br />' . $user->lang('RETURN_TOPIC', '<a href="' . $meta_info . '">', '</a>');
|
||||
}
|
||||
}
|
||||
|
||||
meta_refresh(3, $meta_info);
|
||||
$message .= '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) . '">', '</a>');
|
||||
if (!$request->is_ajax())
|
||||
{
|
||||
$message .= '<br /><br />' . $user->lang('RETURN_FORUM', '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) . '">', '</a>');
|
||||
}
|
||||
trigger_error($message);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
# General Information about this style
|
||||
name = prosilver
|
||||
copyright = © phpBB Group, 2007
|
||||
style_version = 3.1.0-a1
|
||||
phpbb_version = 3.1.0-a1
|
||||
style_version = 3.1.0-a2
|
||||
phpbb_version = 3.1.0-a2
|
||||
|
||||
# Defining a different template bitfield
|
||||
# template_bitfield = lNg=
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
<!-- IF S_AJAX_REQUEST -->
|
||||
<form action="{S_CONFIRM_ACTION}" method="post">
|
||||
<h3>{MESSAGE_TITLE}</h3>
|
||||
<p>{MESSAGE_TEXT}</p>
|
||||
|
||||
<h3>{MESSAGE_TITLE}</h3>
|
||||
<p>{MESSAGE_TEXT}</p>
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
<input type="button" name="confirm" value="{L_YES}" class="button2" />
|
||||
<input type="button" name="cancel" value="{L_NO}" class="button2" />
|
||||
</fieldset>
|
||||
<fieldset class="submit-buttons">
|
||||
<input type="button" name="confirm" value="{L_YES}" class="button2" />
|
||||
<input type="button" name="cancel" value="{L_NO}" class="button2" />
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- ELSE -->
|
||||
|
||||
|
|
|
@ -1,27 +1,29 @@
|
|||
<!-- IF S_AJAX_REQUEST -->
|
||||
<p>{MESSAGE_TEXT}</p>
|
||||
<form action="{S_CONFIRM_ACTION}" method="post">
|
||||
<p>{MESSAGE_TEXT}</p>
|
||||
|
||||
<!-- IF not S_SOFTDELETED and (S_DELETE_REASON or (S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE)) -->
|
||||
<!-- IF S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE -->
|
||||
<label>
|
||||
<strong>{L_DELETE_PERMANENTLY}{L_COLON}</strong>
|
||||
<input id="delete_permanent" name="delete_permanent" type="checkbox" value="1" {S_CHECKED_PERMANENT} />
|
||||
<!-- IF S_TOPIC_MODE -->{L_DELETE_TOPIC_PERMANENTLY}<!-- ELSE -->{L_DELETE_POST_PERMANENTLY}<!-- ENDIF -->
|
||||
</label>
|
||||
<!-- IF not S_SOFTDELETED and (S_DELETE_REASON or (S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE)) -->
|
||||
<!-- IF S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE -->
|
||||
<label>
|
||||
<strong>{L_DELETE_PERMANENTLY}{L_COLON}</strong>
|
||||
<input id="delete_permanent" name="delete_permanent" type="checkbox" value="1" {S_CHECKED_PERMANENT} />
|
||||
<!-- IF S_TOPIC_MODE -->{L_DELETE_TOPIC_PERMANENTLY}<!-- ELSE -->{L_DELETE_POST_PERMANENTLY}<!-- ENDIF -->
|
||||
</label>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF S_DELETE_REASON -->
|
||||
<label for="delete_reason">
|
||||
<strong>{L_DELETE_REASON}{L_COLON}</strong><br /><span>{L_DELETE_REASON_EXPLAIN}</span><br />
|
||||
<input type="text" name="delete_reason" value="" class="inputbox autowidth" maxlength="120" size="45" />
|
||||
</label>
|
||||
<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF S_DELETE_REASON -->
|
||||
<label for="delete_reason">
|
||||
<strong>{L_DELETE_REASON}{L_COLON}</strong><br /><span>{L_DELETE_REASON_EXPLAIN}</span><br />
|
||||
<input type="text" name="delete_reason" value="" class="inputbox autowidth" maxlength="120" size="45" />
|
||||
</label>
|
||||
<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
<input type="button" name="confirm" value="{L_YES}" class="button1" />
|
||||
<input type="button" name="cancel" value="{L_NO}" class="button2" />
|
||||
</fieldset>
|
||||
<fieldset class="submit-buttons">
|
||||
<input type="button" name="confirm" value="{L_YES}" class="button1" />
|
||||
<input type="button" name="cancel" value="{L_NO}" class="button2" />
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- ELSE -->
|
||||
|
||||
|
|
|
@ -433,6 +433,39 @@ function parse_document(container)
|
|||
jumpto($(this));
|
||||
});
|
||||
|
||||
/**
|
||||
* Dropdowns
|
||||
*/
|
||||
container.find('.dropdown-container').each(function() {
|
||||
var $this = $(this),
|
||||
trigger = $this.find('.dropdown-trigger:first'),
|
||||
contents = $this.find('.dropdown'),
|
||||
options = {
|
||||
direction: 'auto',
|
||||
verticalDirection: 'auto'
|
||||
},
|
||||
data;
|
||||
|
||||
if (!trigger.length) {
|
||||
data = $this.attr('data-dropdown-trigger');
|
||||
trigger = data ? $this.children(data) : $this.children('a:first');
|
||||
}
|
||||
|
||||
if (!contents.length) {
|
||||
data = $this.attr('data-dropdown-contents');
|
||||
contents = data ? $this.children(data) : $this.children('div:first');
|
||||
}
|
||||
|
||||
if (!trigger.length || !contents.length) return;
|
||||
|
||||
if ($this.hasClass('dropdown-up')) options.verticalDirection = 'up';
|
||||
if ($this.hasClass('dropdown-down')) options.verticalDirection = 'down';
|
||||
if ($this.hasClass('dropdown-left')) options.direction = 'left';
|
||||
if ($this.hasClass('dropdown-right')) options.direction = 'right';
|
||||
|
||||
phpbb.registerDropdown(trigger, contents, options);
|
||||
});
|
||||
|
||||
/**
|
||||
* Adjust HTML code for IE8 and older versions
|
||||
*/
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
</ul>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- EVENT index_body_forumlist_before -->
|
||||
|
||||
<!-- INCLUDE forumlist_body.html -->
|
||||
|
||||
<!-- IF not S_USER_LOGGED_IN and not S_IS_BOT -->
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<!-- EVENT overall_footer_content_after -->
|
||||
</div>
|
||||
|
||||
<div id="page-footer">
|
||||
|
@ -6,14 +7,11 @@
|
|||
<div class="inner">
|
||||
|
||||
<ul class="linklist bulletin">
|
||||
<li class="icon-home breadcrumbs"><!-- IF U_SITE_HOME --><span class="crumb"><a href="{U_SITE_HOME}">{L_SITE_HOME}</a> <strong>‹</strong></span> <!-- ENDIF --><span class="crumb"><a href="{U_INDEX}" accesskey="h">{L_INDEX}</a></span>
|
||||
<li class="small-icon icon-home breadcrumbs"><!-- IF U_SITE_HOME --><span class="crumb"><a href="{U_SITE_HOME}">{L_SITE_HOME}</a> <strong>‹</strong></span> <!-- ENDIF --><span class="crumb"><a href="{U_INDEX}" accesskey="h">{L_INDEX}</a></span>
|
||||
<!-- EVENT overall_footer_breadcrumb_append -->
|
||||
</li>
|
||||
<!-- IF not S_IS_BOT -->
|
||||
<!-- IF U_WATCH_FORUM_LINK --><li <!-- IF S_WATCHING_FORUM -->class="icon-unsubscribe"<!-- ELSE -->class="icon-subscribe"<!-- ENDIF -->><a href="{U_WATCH_FORUM_LINK}" title="{S_WATCH_FORUM_TITLE}" data-ajax="toggle_link" data-toggle-class="icon-<!-- IF not S_WATCHING_FORUM -->unsubscribe<!-- ELSE -->subscribe<!-- ENDIF -->" data-toggle-text="{S_WATCH_FORUM_TOGGLE}" data-toggle-url="{U_WATCH_FORUM_TOGGLE}">{S_WATCH_FORUM_TITLE}</a></li><!-- ENDIF -->
|
||||
<!-- IF U_WATCH_TOPIC --><li <!-- IF S_WATCHING_TOPIC -->class="icon-unsubscribe"<!-- ELSE -->class="icon-subscribe"<!-- ENDIF -->><a href="{U_WATCH_TOPIC}" title="{S_WATCH_TOPIC_TITLE}" data-ajax="toggle_link" data-toggle-class="<!-- IF not S_WATCHING_TOPIC -->icon-unsubscribe<!-- ELSE -->icon-subscribe<!-- ENDIF -->" data-toggle-text="{S_WATCH_TOPIC_TOGGLE}" data-toggle-url="{U_WATCH_TOPIC_TOGGLE}">{S_WATCH_TOPIC_TITLE}</a></li><!-- ENDIF -->
|
||||
<!-- IF U_BOOKMARK_TOPIC --><li class="icon-bookmark"><a href="{U_BOOKMARK_TOPIC}" title="{L_BOOKMARK_TOPIC}" data-ajax="alt_text" data-alt-text="{S_BOOKMARK_TOGGLE}">{S_BOOKMARK_TOPIC}</a></li><!-- ENDIF -->
|
||||
<!-- IF U_BUMP_TOPIC --><li class="icon-bump"><a href="{U_BUMP_TOPIC}" title="{L_BUMP_TOPIC}" data-ajax="true">{L_BUMP_TOPIC}</a></li><!-- ENDIF -->
|
||||
<!-- IF U_WATCH_FORUM_LINK --><li class="small-icon icon-<!-- IF S_WATCHING_FORUM -->unsubscribe<!-- ELSE -->subscribe<!-- ENDIF -->"><a href="{U_WATCH_FORUM_LINK}" title="{S_WATCH_FORUM_TITLE}" data-ajax="toggle_link" data-toggle-class="small-icon icon-<!-- IF not S_WATCHING_FORUM -->unsubscribe<!-- ELSE -->subscribe<!-- ENDIF -->" data-toggle-text="{S_WATCH_FORUM_TOGGLE}" data-toggle-url="{U_WATCH_FORUM_TOGGLE}">{S_WATCH_FORUM_TITLE}</a></li><!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
<li class="rightside">{S_TIMEZONE}</li>
|
||||
<!-- IF not S_IS_BOT --><li class="rightside"><a href="{U_DELETE_COOKIES}" data-ajax="true" data-refresh="true">{L_DELETE_COOKIES}</a></li><!-- ENDIF -->
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue