mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 13:28:55 +00:00
Merge branch 'develop' of github.com:phpbb/phpbb3 into ticket/11103
# By Oleg Pudeyev (37) and others # Via Oleg Pudeyev (24) and others * 'develop' of github.com:phpbb/phpbb3: (179 commits) [ticket/11323] Add tests for inclusion of defined variables [ticket/11324] Add PHP 5.5 environment to travis and allow it to fail. [ticket/11321] Recreate schema files with develop/create_schema_files.php [ticket/11320] Include functions file as we need phpbb_convert_30_dbms_to_31 [ticket/11313] Use correct object el instead of eel in alt_text callback [ticket/11301] Guidelines: Add spaces in front and after the / operator. [ticket/11301] Explicitly cast str offset to int to prevent E_NOTICE on 5.4. [ticket/11311] Include asset core.js in subsilver2 overall_footer.html [ticket/10949] Remove not needed comma [ticket/11309] phpbb_extension_interface::disable_step correct docblock. [ticket/10949] Converted missing code to new JS coding guidelines [ticket/11302] Correctly select first timezone or selected timezone [ticket/11305] Mock container for cache driver in functional create_user() [ticket/11305] Check for $cache being null before using it in db drivers. [ticket/10805] Compare phpbbAlertTimer against null [ticket/11305] Define hook finder as a service on the container. [ticket/11305] Adjust comment. [ticket/11305] Use phpbb_create_default_container. [ticket/11305] Create a normal container during final installation step. [ticket/11305] Retrieve cache driver from container rather than cache service. ... Conflicts: phpBB/install/schemas/firebird_schema.sql phpBB/install/schemas/mssql_schema.sql phpBB/install/schemas/mysql_40_schema.sql phpBB/install/schemas/mysql_41_schema.sql phpBB/install/schemas/oracle_schema.sql phpBB/install/schemas/postgres_schema.sql phpBB/install/schemas/sqlite_schema.sql phpBB/styles/subsilver2/template/overall_footer.html
This commit is contained in:
commit
51e0f002ee
125 changed files with 3514 additions and 2562 deletions
|
@ -3,11 +3,16 @@ php:
|
|||
- 5.3.3
|
||||
- 5.3
|
||||
- 5.4
|
||||
- 5.5
|
||||
|
||||
env:
|
||||
- DB=mysql
|
||||
- DB=postgres
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- php: 5.5
|
||||
|
||||
before_script:
|
||||
- sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'DROP DATABASE IF EXISTS phpbb_tests;' -U postgres; fi"
|
||||
- sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'create database phpbb_tests;' -U postgres; fi"
|
||||
|
|
|
@ -2,17 +2,16 @@
|
|||
|
||||
<project name="phpBB" description="The phpBB forum software" default="all" basedir="../">
|
||||
<!-- a few settings for the build -->
|
||||
<property name="newversion" value="3.0.11" />
|
||||
<property name="prevversion" value="3.0.10" />
|
||||
<property name="olderversions" value="3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.0.7-PL1, 3.0.8, 3.0.9, 3.0.11-RC1, 3.0.11-RC2" />
|
||||
<property name="newversion" value="3.1.0-dev" />
|
||||
<property name="prevversion" value="3.0.11" />
|
||||
<property name="olderversions" value="3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.0.7-PL1, 3.0.8, 3.0.9, 3.0.10" />
|
||||
<!-- no configuration should be needed beyond this point -->
|
||||
|
||||
<property name="oldversions" value="${olderversions}, ${prevversion}" />
|
||||
<property name="versions" value="${oldversions}, ${newversion}" />
|
||||
|
||||
<!-- These are the main targets which you will probably want to use -->
|
||||
<target name="package" depends="clean,prepare,composer,create-package" />
|
||||
<target name="all" depends="clean,prepare,composer,test,docs,create-package" />
|
||||
<target name="all" depends="clean,prepare,composer,test,docs,package" />
|
||||
<target name="build" depends="clean,prepare,composer,test,docs" />
|
||||
|
||||
<target name="prepare">
|
||||
|
@ -43,9 +42,15 @@
|
|||
<delete dir="build/save" />
|
||||
</target>
|
||||
|
||||
<target name="composer" depends="clean,prepare">
|
||||
<exec dir="./phpBB/"
|
||||
command="php ../composer.phar install"
|
||||
<!--
|
||||
This target basically just runs composer in the phpBB tree to ensure
|
||||
all dependencies are loaded. Additional development dependencies are
|
||||
loaded because testing framework may depend on them.
|
||||
-->
|
||||
<target name="composer">
|
||||
<exec dir="phpBB"
|
||||
command="php ../composer.phar install --dev"
|
||||
checkreturn="true"
|
||||
passthru="true" />
|
||||
</target>
|
||||
|
||||
|
@ -122,7 +127,7 @@
|
|||
|
||||
</target>
|
||||
|
||||
<target name="create-package" depends="prepare-new-version,old-version-diffs">
|
||||
<target name="package" depends="clean,prepare,prepare-new-version,old-version-diffs">
|
||||
<exec dir="build" command="php -f package.php '${versions}' > logs/package.log" escape="false" />
|
||||
<exec dir="build" command="php -f build_diff.php '${prevversion}' '${newversion}' > logs/build_diff.log" escape="false" />
|
||||
|
||||
|
@ -162,9 +167,27 @@
|
|||
command="git archive ${revision} | tar -xf - -C ../${dir}"
|
||||
checkreturn="true" />
|
||||
|
||||
<exec dir="${dir}"
|
||||
command="php ../composer.phar install"
|
||||
passthru="true" />
|
||||
<!--
|
||||
If composer.phar exists in this version of the tree, also export
|
||||
it into ${dir}, install dependencies, then delete it again.
|
||||
-->
|
||||
<exec dir="."
|
||||
command="git ls-tree ${revision} composer.phar"
|
||||
checkreturn="true"
|
||||
outputProperty='composer-ls-tree-output' />
|
||||
<if>
|
||||
<not><equals arg1="${composer-ls-tree-output}" arg2="" trim="true" /></not>
|
||||
<then>
|
||||
<exec dir="."
|
||||
command="git archive ${revision} composer.phar | tar -xf - -C ${dir}"
|
||||
checkreturn="true" />
|
||||
<exec dir="${dir}"
|
||||
command="php composer.phar install"
|
||||
checkreturn="true"
|
||||
passthru="true" />
|
||||
<delete file="${dir}/composer.phar" />
|
||||
</then>
|
||||
</if>
|
||||
|
||||
<delete file="${dir}/config.php" />
|
||||
<delete dir="${dir}/develop" />
|
||||
|
@ -187,6 +210,7 @@
|
|||
<delete dir="${dir}/files" />
|
||||
<delete dir="${dir}/install" />
|
||||
<delete dir="${dir}/store" />
|
||||
<delete dir="${dir}/vendor" />
|
||||
</target>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -42,7 +42,6 @@ if (!$auth->acl_get('a_'))
|
|||
|
||||
// We define the admin variables now, because the user is now able to use the admin related features...
|
||||
define('IN_ADMIN', true);
|
||||
$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : './';
|
||||
|
||||
// Some oft used variables
|
||||
$safe_mode = (@ini_get('safe_mode') == '1' || strtolower(@ini_get('safe_mode')) === 'on') ? true : false;
|
||||
|
|
|
@ -241,6 +241,7 @@
|
|||
<dt><label for="topics_per_page">{L_FORUM_TOPICS_PAGE}{L_COLON}</label><br /><span>{L_FORUM_TOPICS_PAGE_EXPLAIN}</span></dt>
|
||||
<dd><input type="text" id="topics_per_page" name="topics_per_page" value="{TOPICS_PER_PAGE}" size="4" maxlength="4" /></dd>
|
||||
</dl>
|
||||
<!-- EVENT acp_forums_normal_settings_append -->
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
|
|
|
@ -76,6 +76,8 @@
|
|||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- EVENT acp_main_notice_after -->
|
||||
|
||||
<table cellspacing="1">
|
||||
<caption>{L_FORUM_STATS}</caption>
|
||||
<col class="col1" /><col class="col2" /><col class="col1" /><col class="col2" />
|
||||
|
@ -202,6 +204,8 @@
|
|||
<dd><input type="hidden" name="action" value="purge_cache" /><input class="button2" type="submit" id="action_purge_cache" name="action_purge_cache" value="{L_RUN}" /></dd>
|
||||
</dl>
|
||||
</form>
|
||||
|
||||
<!-- EVENT acp_main_actions_append -->
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
<dt><label for="password_confirm">{L_CONFIRM_PASSWORD}{L_COLON}</label><br /><span>{L_CONFIRM_PASSWORD_EXPLAIN}</span></dt>
|
||||
<dd><input type="password" id="password_confirm" name="password_confirm" value="" autocomplete="off" /></dd>
|
||||
</dl>
|
||||
<!-- EVENT acp_users_overview_options_append -->
|
||||
|
||||
<p class="quick">
|
||||
<input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
var img_templates = {
|
||||
var imgTemplates = {
|
||||
up: $('.template-up-img'),
|
||||
up_disabled: $('.template-up-img-disabled'),
|
||||
upDisabled: $('.template-up-img-disabled'),
|
||||
down: $('.template-down-img'),
|
||||
down_disabled: $('.template-down-img-disabled')
|
||||
downDisabled: $('.template-down-img-disabled')
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -15,20 +15,19 @@ var img_templates = {
|
|||
* an item is moved up. It moves the row up or down, and deactivates /
|
||||
* activates any up / down icons that require it (the ones at the top or bottom).
|
||||
*/
|
||||
phpbb.add_ajax_callback('row_down', function() {
|
||||
phpbb.addAjaxCallback('row_down', function() {
|
||||
var el = $(this),
|
||||
tr = el.parents('tr'),
|
||||
tr_swap = tr.next();
|
||||
trSwap = tr.next();
|
||||
|
||||
/*
|
||||
* If the element was the first one, we have to:
|
||||
* - Add the up-link to the row we moved
|
||||
* - Remove the up-link on the next row
|
||||
*/
|
||||
if (tr.is(':first-child'))
|
||||
{
|
||||
var up_img = img_templates.up.clone().attr('href', tr.attr('data-up'));
|
||||
tr.find('.up').html(up_img);
|
||||
if (tr.is(':first-child')) {
|
||||
var upImg = imgTemplates.up.clone().attr('href', tr.attr('data-up'));
|
||||
tr.find('.up').html(upImg);
|
||||
|
||||
phpbb.ajaxify({
|
||||
selector: tr.find('.up').children('a'),
|
||||
|
@ -36,45 +35,43 @@ phpbb.add_ajax_callback('row_down', function() {
|
|||
overlay: false
|
||||
});
|
||||
|
||||
tr_swap.find('.up').html(img_templates.up_disabled.clone());
|
||||
trSwap.find('.up').html(imgTemplates.upDisabled.clone());
|
||||
}
|
||||
|
||||
tr.insertAfter(tr_swap);
|
||||
tr.insertAfter(trSwap);
|
||||
|
||||
/*
|
||||
* As well as:
|
||||
* - Remove the down-link on the moved row, if it is now the last row
|
||||
* - Add the down-link to the next row, if it was the last row
|
||||
*/
|
||||
if (tr.is(':last-child'))
|
||||
{
|
||||
tr.find('.down').html(img_templates.down_disabled.clone());
|
||||
if (tr.is(':last-child')) {
|
||||
tr.find('.down').html(imgTemplates.downDisabled.clone());
|
||||
|
||||
var down_img = img_templates.down.clone().attr('href', tr_swap.attr('data-down'));
|
||||
tr_swap.find('.down').html(down_img);
|
||||
var downImg = imgTemplates.down.clone().attr('href', trSwap.attr('data-down'));
|
||||
trSwap.find('.down').html(downImg);
|
||||
|
||||
phpbb.ajaxify({
|
||||
selector: tr_swap.find('.down').children('a'),
|
||||
selector: trSwap.find('.down').children('a'),
|
||||
callback: 'row_down',
|
||||
overlay: false
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
phpbb.add_ajax_callback('row_up', function() {
|
||||
phpbb.addAjaxCallback('row_up', function() {
|
||||
var el = $(this),
|
||||
tr = el.parents('tr'),
|
||||
tr_swap = tr.prev();
|
||||
trSwap = tr.prev();
|
||||
|
||||
/*
|
||||
* If the element was the last one, we have to:
|
||||
* - Add the down-link to the row we moved
|
||||
* - Remove the down-link on the next row
|
||||
*/
|
||||
if (tr.is(':last-child'))
|
||||
{
|
||||
var down_img = img_templates.down.clone().attr('href', tr.attr('data-down'));
|
||||
tr.find('.down').html(down_img);
|
||||
if (tr.is(':last-child')) {
|
||||
var downImg = imgTemplates.down.clone().attr('href', tr.attr('data-down'));
|
||||
tr.find('.down').html(downImg);
|
||||
|
||||
phpbb.ajaxify({
|
||||
selector: tr.find('.down').children('a'),
|
||||
|
@ -82,25 +79,24 @@ phpbb.add_ajax_callback('row_up', function() {
|
|||
overlay: false
|
||||
});
|
||||
|
||||
tr_swap.find('.down').html(img_templates.down_disabled.clone());
|
||||
trSwap.find('.down').html(imgTemplates.downDisabled.clone());
|
||||
}
|
||||
|
||||
tr.insertBefore(tr_swap);
|
||||
tr.insertBefore(trSwap);
|
||||
|
||||
/*
|
||||
* As well as:
|
||||
* - Remove the up-link on the moved row, if it is now the first row
|
||||
* - Add the up-link to the previous row, if it was the first row
|
||||
*/
|
||||
if (tr.is(':first-child'))
|
||||
{
|
||||
tr.find('.up').html(img_templates.up_disabled.clone());
|
||||
if (tr.is(':first-child')) {
|
||||
tr.find('.up').html(imgTemplates.upDisabled.clone());
|
||||
|
||||
var up_img = img_templates.up.clone().attr('href', tr_swap.attr('data-up'));
|
||||
tr_swap.find('.up').html(up_img);
|
||||
var upImg = imgTemplates.up.clone().attr('href', trSwap.attr('data-up'));
|
||||
trSwap.find('.up').html(upImg);
|
||||
|
||||
phpbb.ajaxify({
|
||||
selector: tr_swap.find('.up').children('a'),
|
||||
selector: trSwap.find('.up').children('a'),
|
||||
callback: 'row_up',
|
||||
overlay: false
|
||||
});
|
||||
|
@ -112,29 +108,26 @@ phpbb.add_ajax_callback('row_up', function() {
|
|||
* It does this by replacing the text, and replacing all instances of "activate"
|
||||
* in the href with "deactivate", and vice versa.
|
||||
*/
|
||||
phpbb.add_ajax_callback('activate_deactivate', function(res) {
|
||||
phpbb.addAjaxCallback('activate_deactivate', function(res) {
|
||||
var el = $(this),
|
||||
new_href = el.attr('href');
|
||||
newHref = el.attr('href');
|
||||
|
||||
el.text(res.text);
|
||||
|
||||
if (new_href.indexOf('deactivate') !== -1)
|
||||
{
|
||||
new_href = new_href.replace('deactivate', 'activate')
|
||||
}
|
||||
else
|
||||
{
|
||||
new_href = new_href.replace('activate', 'deactivate')
|
||||
if (newHref.indexOf('deactivate') !== -1) {
|
||||
newHref = newHref.replace('deactivate', 'activate')
|
||||
} else {
|
||||
newHref = newHref.replace('activate', 'deactivate')
|
||||
}
|
||||
|
||||
el.attr('href', new_href);
|
||||
el.attr('href', newHref);
|
||||
});
|
||||
|
||||
/**
|
||||
* The removes the parent row of the link or form that triggered the callback,
|
||||
* and is good for stuff like the removal of forums.
|
||||
*/
|
||||
phpbb.add_ajax_callback('row_delete', function() {
|
||||
phpbb.addAjaxCallback('row_delete', function() {
|
||||
$(this).parents('tr').remove();
|
||||
});
|
||||
|
||||
|
@ -145,8 +138,7 @@ $('[data-ajax]').each(function() {
|
|||
ajax = $this.attr('data-ajax'),
|
||||
fn;
|
||||
|
||||
if (ajax !== 'false')
|
||||
{
|
||||
if (ajax !== 'false') {
|
||||
fn = (ajax !== 'true') ? ajax : null;
|
||||
phpbb.ajaxify({
|
||||
selector: this,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<!-- IF META -->{META}<!-- ENDIF -->
|
||||
<title>{PAGE_TITLE}</title>
|
||||
|
||||
<link href="../adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
<link href="{T_TEMPLATE_PATH}/admin.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
@ -49,7 +49,7 @@ function dE(n, s, type)
|
|||
</form>
|
||||
<!-- ENDIF -->
|
||||
</div>
|
||||
|
||||
|
||||
<div id="page-body">
|
||||
<div id="tabs">
|
||||
<ul>
|
||||
|
@ -73,5 +73,5 @@ function dE(n, s, type)
|
|||
<!-- END l_block2 -->
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="main" class="install-body">
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<!-- IF META -->{META}<!-- ENDIF -->
|
||||
<title>{PAGE_TITLE}</title>
|
||||
|
||||
<link href="../adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
<link href="{T_TEMPLATE_PATH}/admin.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
|
|
@ -42,5 +42,7 @@
|
|||
<!-- INCLUDEJS ajax.js -->
|
||||
{SCRIPTS}
|
||||
|
||||
<!-- EVENT acp_overall_footer_after -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -155,6 +155,7 @@ function switch_menu()
|
|||
|
||||
// ]]>
|
||||
</script>
|
||||
<!-- EVENT acp_overall_header_head_append -->
|
||||
</head>
|
||||
|
||||
<body class="{S_CONTENT_DIRECTION}">
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
|
||||
<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
|
||||
<!-- EVENT acp_simple_footer_after -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -101,6 +101,7 @@ function find_username(url)
|
|||
|
||||
// ]]>
|
||||
</script>
|
||||
<!-- EVENT acp_simple_header_head_append -->
|
||||
</head>
|
||||
|
||||
<body class="{S_CONTENT_DIRECTION}">
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
(function($) { // Avoid conflicts with other libraries
|
||||
|
||||
$('#tz_date').change(function() {
|
||||
phpbb.timezone_switch_date(false);
|
||||
phpbb.timezoneSwitchDate(false);
|
||||
});
|
||||
|
||||
$(document).ready(
|
||||
phpbb.timezone_enable_date_selection
|
||||
phpbb.timezoneEnableDateSelection
|
||||
);
|
||||
|
||||
})(jQuery); // Avoid conflicts with other libraries
|
||||
|
|
|
@ -21,8 +21,6 @@ $user->session_begin(false);
|
|||
$auth->acl($user->data);
|
||||
$user->setup();
|
||||
|
||||
$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : './';
|
||||
|
||||
// Set custom template for admin area
|
||||
$phpbb_style->set_custom_style('admin', $phpbb_admin_path . 'style', array(), '');
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
var phpbb = {};
|
||||
phpbb.alert_time = 100;
|
||||
phpbb.alertTime = 100;
|
||||
|
||||
(function($) { // Avoid conflicts with other libraries
|
||||
|
||||
|
@ -12,35 +12,42 @@ var keymap = {
|
|||
};
|
||||
|
||||
var dark = $('#darkenwrapper');
|
||||
var loading_alert = $('#loadingalert');
|
||||
var loadingAlert = $('#loadingalert');
|
||||
var phpbbAlertTimer = null;
|
||||
|
||||
|
||||
/**
|
||||
* Display a loading screen.
|
||||
* Display a loading screen
|
||||
*
|
||||
* @returns object Returns loading_alert.
|
||||
* @returns object Returns loadingAlert.
|
||||
*/
|
||||
phpbb.loading_alert = function() {
|
||||
if (dark.is(':visible'))
|
||||
{
|
||||
loading_alert.fadeIn(phpbb.alert_time);
|
||||
}
|
||||
else
|
||||
{
|
||||
loading_alert.show();
|
||||
dark.fadeIn(phpbb.alert_time, function() {
|
||||
phpbb.loadingAlert = function() {
|
||||
if (dark.is(':visible')) {
|
||||
loadingAlert.fadeIn(phpbb.alertTime);
|
||||
} else {
|
||||
loadingAlert.show();
|
||||
dark.fadeIn(phpbb.alertTime, function() {
|
||||
// Wait five seconds and display an error if nothing has been returned by then.
|
||||
setTimeout(function() {
|
||||
if (loading_alert.is(':visible'))
|
||||
{
|
||||
phpbbAlertTimer = setTimeout(function() {
|
||||
if (loadingAlert.is(':visible')) {
|
||||
phpbb.alert($('#phpbb_alert').attr('data-l-err'), $('#phpbb_alert').attr('data-l-timeout-processing-req'));
|
||||
}
|
||||
}, 5000);
|
||||
});
|
||||
}
|
||||
|
||||
return loading_alert;
|
||||
}
|
||||
return loadingAlert;
|
||||
};
|
||||
|
||||
/**
|
||||
* Clear loading alert timeout
|
||||
*/
|
||||
phpbb.clearLoadingTimeout = function() {
|
||||
if (phpbbAlertTimer !== null) {
|
||||
clearTimeout(phpbbAlertTimer);
|
||||
phpbbAlertTimer = null;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Display a simple alert similar to JSs native alert().
|
||||
|
@ -67,7 +74,7 @@ phpbb.alert = function(title, msg, fadedark) {
|
|||
|
||||
div.find('.alert_close').unbind('click');
|
||||
fade = (typeof fadedark !== 'undefined' && !fadedark) ? div : dark;
|
||||
fade.fadeOut(phpbb.alert_time, function() {
|
||||
fade.fadeOut(phpbb.alertTime, function() {
|
||||
div.hide();
|
||||
});
|
||||
|
||||
|
@ -90,27 +97,22 @@ phpbb.alert = function(title, msg, fadedark) {
|
|||
e.preventDefault();
|
||||
});
|
||||
|
||||
if (loading_alert.is(':visible'))
|
||||
{
|
||||
loading_alert.fadeOut(phpbb.alert_time, function() {
|
||||
if (loadingAlert.is(':visible')) {
|
||||
loadingAlert.fadeOut(phpbb.alertTime, function() {
|
||||
dark.append(div);
|
||||
div.fadeIn(phpbb.alert_time);
|
||||
div.fadeIn(phpbb.alertTime);
|
||||
});
|
||||
}
|
||||
else if (dark.is(':visible'))
|
||||
{
|
||||
} else if (dark.is(':visible')) {
|
||||
dark.append(div);
|
||||
div.fadeIn(phpbb.alert_time);
|
||||
}
|
||||
else
|
||||
{
|
||||
div.fadeIn(phpbb.alertTime);
|
||||
} else {
|
||||
dark.append(div);
|
||||
div.show();
|
||||
dark.fadeIn(phpbb.alert_time);
|
||||
dark.fadeIn(phpbb.alertTime);
|
||||
}
|
||||
|
||||
return div;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Display a simple yes / no box to the user.
|
||||
|
@ -133,13 +135,13 @@ phpbb.confirm = function(msg, callback, fadedark) {
|
|||
e.stopPropagation();
|
||||
});
|
||||
|
||||
var click_handler = function(e) {
|
||||
var clickHandler = function(e) {
|
||||
var res = this.className === 'button1';
|
||||
var fade = (typeof fadedark !== 'undefined' && !fadedark && res) ? div : dark;
|
||||
fade.fadeOut(phpbb.alert_time, function() {
|
||||
fade.fadeOut(phpbb.alertTime, function() {
|
||||
div.hide();
|
||||
});
|
||||
div.find('input[type="button"]').unbind('click', click_handler);
|
||||
div.find('input[type="button"]').unbind('click', clickHandler);
|
||||
callback(res);
|
||||
|
||||
if (e) {
|
||||
|
@ -147,11 +149,11 @@ phpbb.confirm = function(msg, callback, fadedark) {
|
|||
e.stopPropagation();
|
||||
}
|
||||
};
|
||||
div.find('input[type="button"]').one('click', click_handler);
|
||||
div.find('input[type="button"]').one('click', clickHandler);
|
||||
|
||||
dark.one('click', function(e) {
|
||||
div.find('.alert_close').unbind('click');
|
||||
dark.fadeOut(phpbb.alert_time, function() {
|
||||
dark.fadeOut(phpbb.alertTime, function() {
|
||||
div.hide();
|
||||
});
|
||||
callback(false);
|
||||
|
@ -174,7 +176,7 @@ phpbb.confirm = function(msg, callback, fadedark) {
|
|||
|
||||
div.find('.alert_close').one('click', function(e) {
|
||||
var fade = (typeof fadedark !== 'undefined' && fadedark) ? div : dark;
|
||||
fade.fadeOut(phpbb.alert_time, function() {
|
||||
fade.fadeOut(phpbb.alertTime, function() {
|
||||
div.hide();
|
||||
});
|
||||
callback(false);
|
||||
|
@ -182,27 +184,22 @@ phpbb.confirm = function(msg, callback, fadedark) {
|
|||
e.preventDefault();
|
||||
});
|
||||
|
||||
if (loading_alert.is(':visible'))
|
||||
{
|
||||
loading_alert.fadeOut(phpbb.alert_time, function() {
|
||||
if (loadingAlert.is(':visible')) {
|
||||
loadingAlert.fadeOut(phpbb.alertTime, function() {
|
||||
dark.append(div);
|
||||
div.fadeIn(phpbb.alert_time);
|
||||
div.fadeIn(phpbb.alertTime);
|
||||
});
|
||||
}
|
||||
else if (dark.is(':visible'))
|
||||
{
|
||||
} else if (dark.is(':visible')) {
|
||||
dark.append(div);
|
||||
div.fadeIn(phpbb.alert_time);
|
||||
}
|
||||
else
|
||||
{
|
||||
div.fadeIn(phpbb.alertTime);
|
||||
} else {
|
||||
dark.append(div);
|
||||
div.show();
|
||||
dark.fadeIn(phpbb.alert_time);
|
||||
dark.fadeIn(phpbb.alertTime);
|
||||
}
|
||||
|
||||
return div;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Turn a querystring into an array.
|
||||
|
@ -210,17 +207,16 @@ phpbb.confirm = function(msg, callback, fadedark) {
|
|||
* @argument string string The querystring to parse.
|
||||
* @returns object The object created.
|
||||
*/
|
||||
phpbb.parse_querystring = function(string) {
|
||||
phpbb.parseQuerystring = function(string) {
|
||||
var params = {}, i, split;
|
||||
|
||||
string = string.split('&');
|
||||
for (i = 0; i < string.length; i++)
|
||||
{
|
||||
for (i = 0; i < string.length; i++) {
|
||||
split = string[i].split('=');
|
||||
params[split[0]] = decodeURIComponent(split[1]);
|
||||
}
|
||||
return params;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
|
@ -246,14 +242,13 @@ phpbb.ajaxify = function(options) {
|
|||
refresh = options.refresh,
|
||||
callback = options.callback,
|
||||
overlay = (typeof options.overlay !== 'undefined') ? options.overlay : true,
|
||||
is_form = elements.is('form'),
|
||||
event_name = is_form ? 'submit' : 'click';
|
||||
isForm = elements.is('form'),
|
||||
eventName = isForm ? 'submit' : 'click';
|
||||
|
||||
elements.bind(event_name, function(event) {
|
||||
elements.bind(eventName, function(event) {
|
||||
var action, method, data, submit, that = this, $this = $(this);
|
||||
|
||||
if ($this.find('input[type="submit"][data-clicked]').attr('data-ajax') === 'false')
|
||||
{
|
||||
if ($this.find('input[type="submit"][data-clicked]').attr('data-ajax') === 'false') {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -267,110 +262,88 @@ phpbb.ajaxify = function(options) {
|
|||
*
|
||||
* @param object res The object sent back by the server.
|
||||
*/
|
||||
function return_handler(res)
|
||||
{
|
||||
function returnHandler(res) {
|
||||
var alert;
|
||||
|
||||
phpbb.clearLoadingTimeout();
|
||||
|
||||
// Is a confirmation required?
|
||||
if (typeof res.S_CONFIRM_ACTION === 'undefined')
|
||||
{
|
||||
if (typeof res.S_CONFIRM_ACTION === 'undefined') {
|
||||
// If a confirmation is not required, display an alert and call the
|
||||
// callbacks.
|
||||
if (typeof res.MESSAGE_TITLE !== 'undefined')
|
||||
{
|
||||
if (typeof res.MESSAGE_TITLE !== 'undefined') {
|
||||
alert = phpbb.alert(res.MESSAGE_TITLE, res.MESSAGE_TEXT);
|
||||
}
|
||||
else
|
||||
{
|
||||
dark.fadeOut(phpbb.alert_time);
|
||||
} else {
|
||||
dark.fadeOut(phpbb.alertTime);
|
||||
}
|
||||
|
||||
if (typeof phpbb.ajax_callbacks[callback] === 'function')
|
||||
{
|
||||
phpbb.ajax_callbacks[callback].call(that, res);
|
||||
if (typeof phpbb.ajaxCallbacks[callback] === 'function') {
|
||||
phpbb.ajaxCallbacks[callback].call(that, res);
|
||||
}
|
||||
|
||||
// If the server says to refresh the page, check whether the page should
|
||||
// be refreshed and refresh page after specified time if required.
|
||||
if (res.REFRESH_DATA)
|
||||
{
|
||||
if (typeof refresh === 'function')
|
||||
{
|
||||
if (res.REFRESH_DATA) {
|
||||
if (typeof refresh === 'function') {
|
||||
refresh = refresh(res.REFRESH_DATA.url);
|
||||
}
|
||||
else if (typeof refresh !== 'boolean')
|
||||
{
|
||||
} else if (typeof refresh !== 'boolean') {
|
||||
refresh = false;
|
||||
}
|
||||
|
||||
setTimeout(function() {
|
||||
if (refresh)
|
||||
{
|
||||
if (refresh) {
|
||||
window.location = res.REFRESH_DATA.url;
|
||||
}
|
||||
|
||||
// Hide the alert even if we refresh the page, in case the user
|
||||
// presses the back button.
|
||||
dark.fadeOut(phpbb.alert_time, function() {
|
||||
dark.fadeOut(phpbb.alertTime, function() {
|
||||
alert.hide();
|
||||
});
|
||||
}, res.REFRESH_DATA.time * 1000); // Server specifies time in seconds
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
// If confirmation is required, display a diologue to the user.
|
||||
phpbb.confirm(res.MESSAGE_TEXT, function(del) {
|
||||
if (del)
|
||||
{
|
||||
phpbb.loading_alert();
|
||||
if (del) {
|
||||
phpbb.loadingAlert();
|
||||
data = $('<form>' + res.S_HIDDEN_FIELDS + '</form>').serialize();
|
||||
$.ajax({
|
||||
url: res.S_CONFIRM_ACTION,
|
||||
type: 'POST',
|
||||
data: data + '&confirm=' + res.YES_VALUE,
|
||||
success: return_handler,
|
||||
error: error_handler
|
||||
success: returnHandler,
|
||||
error: errorHandler
|
||||
});
|
||||
}
|
||||
}, false);
|
||||
}
|
||||
}
|
||||
|
||||
function error_handler()
|
||||
{
|
||||
function errorHandler() {
|
||||
var alert;
|
||||
|
||||
phpbb.clearLoadingTimeout();
|
||||
alert = phpbb.alert(dark.attr('data-ajax-error-title'), dark.attr('data-ajax-error-text'));
|
||||
|
||||
setTimeout(function () {
|
||||
dark.fadeOut(phpbb.alert_time, function() {
|
||||
alert.hide();
|
||||
});
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
// If the element is a form, POST must be used and some extra data must
|
||||
// be taken from the form.
|
||||
var run_filter = (typeof options.filter === 'function');
|
||||
var runFilter = (typeof options.filter === 'function');
|
||||
|
||||
if (is_form)
|
||||
{
|
||||
if (isForm) {
|
||||
action = $this.attr('action').replace('&', '&');
|
||||
data = $this.serializeArray();
|
||||
method = $this.attr('method') || 'GET';
|
||||
|
||||
if ($this.find('input[type="submit"][data-clicked]'))
|
||||
{
|
||||
if ($this.find('input[type="submit"][data-clicked]')) {
|
||||
submit = $this.find('input[type="submit"][data-clicked]');
|
||||
data.push({
|
||||
name: submit.attr('name'),
|
||||
value: submit.val()
|
||||
});
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
action = this.href;
|
||||
data = null;
|
||||
method = 'GET';
|
||||
|
@ -378,28 +351,27 @@ phpbb.ajaxify = function(options) {
|
|||
|
||||
// If filter function returns false, cancel the AJAX functionality,
|
||||
// and return true (meaning that the HTTP request will be sent normally).
|
||||
if (run_filter && !options.filter.call(this, data))
|
||||
{
|
||||
if (runFilter && !options.filter.call(this, data)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (overlay && (typeof $this.attr('data-overlay') === 'undefined' || $this.attr('data-overlay') == 'true'))
|
||||
{
|
||||
phpbb.loading_alert();
|
||||
phpbb.loadingAlert();
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: action,
|
||||
type: method,
|
||||
data: data,
|
||||
success: return_handler,
|
||||
error: error_handler
|
||||
success: returnHandler,
|
||||
error: errorHandler
|
||||
});
|
||||
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
if (is_form) {
|
||||
if (isForm) {
|
||||
elements.find('input:submit').click(function () {
|
||||
var $this = $(this);
|
||||
|
||||
|
@ -409,14 +381,14 @@ phpbb.ajaxify = function(options) {
|
|||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Hide the optgroups that are not the selected timezone
|
||||
*
|
||||
* @param bool keep_selection Shall we keep the value selected, or shall the user be forced to repick one.
|
||||
* @param bool keepSelection Shall we keep the value selected, or shall the user be forced to repick one.
|
||||
*/
|
||||
phpbb.timezone_switch_date = function(keep_selection) {
|
||||
phpbb.timezoneSwitchDate = function(keepSelection) {
|
||||
if ($('#timezone_copy').length == 0) {
|
||||
// We make a backup of the original dropdown, so we can remove optgroups
|
||||
// instead of setting display to none, because IE and chrome will not
|
||||
|
@ -440,27 +412,30 @@ phpbb.timezone_switch_date = function(keep_selection) {
|
|||
if ($("#timezone > optgroup[label='" + $('#tz_date').val() + "'] > option").size() == 1) {
|
||||
// If there is only one timezone for the selected date, we just select that automatically.
|
||||
$("#timezone > optgroup[label='" + $('#tz_date').val() + "'] > option:first").attr('selected', true);
|
||||
keep_selection = true;
|
||||
keepSelection = true;
|
||||
}
|
||||
|
||||
if (typeof keep_selection !== 'undefined' && !keep_selection) {
|
||||
$('#timezone > option:first').attr('selected', true);
|
||||
if (typeof keepSelection !== 'undefined' && !keepSelection) {
|
||||
var timezoneOptions = $('#timezone > optgroup option');
|
||||
if (timezoneOptions.filter(':selected').length <= 0) {
|
||||
timezoneOptions.filter(':first').attr('selected', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Display the date/time select
|
||||
*/
|
||||
phpbb.timezone_enable_date_selection = function() {
|
||||
phpbb.timezoneEnableDateSelection = function() {
|
||||
$('#tz_select_date').css('display', 'block');
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Preselect a date/time or suggest one, if it is not picked.
|
||||
*
|
||||
* @param bool force_selector Shall we select the suggestion?
|
||||
* @param bool forceSelector Shall we select the suggestion?
|
||||
*/
|
||||
phpbb.timezone_preselect_select = function(force_selector) {
|
||||
phpbb.timezonePreselectSelect = function(forceSelector) {
|
||||
|
||||
// The offset returned here is in minutes and negated.
|
||||
// http://www.w3schools.com/jsref/jsref_getTimezoneOffset.asp
|
||||
|
@ -489,21 +464,21 @@ phpbb.timezone_preselect_select = function(force_selector) {
|
|||
}
|
||||
|
||||
var prefix = 'GMT' + sign + hours + ':' + minutes;
|
||||
var prefix_length = prefix.length;
|
||||
var selector_options = $('#tz_date > option');
|
||||
var prefixLength = prefix.length;
|
||||
var selectorOptions = $('#tz_date > option');
|
||||
|
||||
for (var i = 0; i < selector_options.length; ++i) {
|
||||
var option = selector_options[i];
|
||||
for (var i = 0; i < selectorOptions.length; ++i) {
|
||||
var option = selectorOptions[i];
|
||||
|
||||
if (option.value.substring(0, prefix_length) == prefix) {
|
||||
if ($('#tz_date').val() != option.value && !force_selector) {
|
||||
if (option.value.substring(0, prefixLength) == prefix) {
|
||||
if ($('#tz_date').val() != option.value && !forceSelector) {
|
||||
// We do not select the option for the user, but notify him,
|
||||
// that we would suggest a different setting.
|
||||
phpbb.timezone_switch_date(true);
|
||||
phpbb.timezoneSwitchDate(true);
|
||||
$('#tz_select_date_suggest').css('display', 'inline');
|
||||
} else {
|
||||
option.selected = true;
|
||||
phpbb.timezone_switch_date(!force_selector);
|
||||
phpbb.timezoneSwitchDate(!forceSelector);
|
||||
$('#tz_select_date_suggest').css('display', 'none');
|
||||
}
|
||||
|
||||
|
@ -515,9 +490,22 @@ phpbb.timezone_preselect_select = function(force_selector) {
|
|||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
phpbb.ajax_callbacks = {};
|
||||
// Toggle notification list
|
||||
$('#notification_list_button').click(function(e) {
|
||||
$('#notification_list').toggle();
|
||||
e.preventDefault();
|
||||
});
|
||||
$('#phpbb').click(function(e) {
|
||||
var target = e.target;
|
||||
|
||||
if (!$(target).is('#notification_list') && !$(target).is('#notification_list_button') && !$(target).parents().is('#notification_list')) {
|
||||
$('#notification_list').hide();
|
||||
}
|
||||
});
|
||||
|
||||
phpbb.ajaxCallbacks = {};
|
||||
|
||||
/**
|
||||
* Adds an AJAX callback to be used by phpbb.ajaxify.
|
||||
|
@ -527,14 +515,12 @@ phpbb.ajax_callbacks = {};
|
|||
* @param string id The name of the callback.
|
||||
* @param function callback The callback to be called.
|
||||
*/
|
||||
phpbb.add_ajax_callback = function(id, callback)
|
||||
{
|
||||
if (typeof callback === 'function')
|
||||
{
|
||||
phpbb.ajax_callbacks[id] = callback;
|
||||
phpbb.addAjaxCallback = function(id, callback) {
|
||||
if (typeof callback === 'function') {
|
||||
phpbb.ajaxCallbacks[id] = callback;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
|
@ -542,14 +528,14 @@ phpbb.add_ajax_callback = function(id, callback)
|
|||
* the alt-text data attribute, and replaces the text in the attribute with the
|
||||
* current text so that the process can be repeated.
|
||||
*/
|
||||
phpbb.add_ajax_callback('alt_text', function() {
|
||||
phpbb.addAjaxCallback('alt_text', function() {
|
||||
var el = $(this),
|
||||
alt_text;
|
||||
altText;
|
||||
|
||||
alt_text = el.attr('data-alt-text');
|
||||
altText = el.attr('data-alt-text');
|
||||
el.attr('data-alt-text', el.text());
|
||||
el.attr('title', alt_text);
|
||||
el.text(alt_text);
|
||||
el.attr('title', altText);
|
||||
el.text(altText);
|
||||
});
|
||||
|
||||
/**
|
||||
|
@ -561,28 +547,28 @@ phpbb.add_ajax_callback('alt_text', function() {
|
|||
* Additionally it replaces the class of the link's parent
|
||||
* and changes the link itself.
|
||||
*/
|
||||
phpbb.add_ajax_callback('toggle_link', function() {
|
||||
phpbb.addAjaxCallback('toggle_link', function() {
|
||||
var el = $(this),
|
||||
toggle_text,
|
||||
toggle_url,
|
||||
toggle_class;
|
||||
toggleText,
|
||||
toggleUrl,
|
||||
toggleClass;
|
||||
|
||||
// Toggle link text
|
||||
|
||||
toggle_text = el.attr('data-toggle-text');
|
||||
toggleText = el.attr('data-toggle-text');
|
||||
el.attr('data-toggle-text', el.text());
|
||||
el.attr('title', toggle_text);
|
||||
el.text(toggle_text);
|
||||
el.attr('title', toggleText);
|
||||
el.text(toggleText);
|
||||
|
||||
// Toggle link url
|
||||
toggle_url = el.attr('data-toggle-url');
|
||||
toggleUrl = el.attr('data-toggle-url');
|
||||
el.attr('data-toggle-url', el.attr('href'));
|
||||
el.attr('href', toggle_url);
|
||||
el.attr('href', toggleUrl);
|
||||
|
||||
// Toggle class of link parent
|
||||
toggle_class = el.attr('data-toggle-class');
|
||||
toggleClass = el.attr('data-toggle-class');
|
||||
el.attr('data-toggle-class', el.parent().attr('class'));
|
||||
el.parent().attr('class', toggle_class);
|
||||
el.parent().attr('class', toggleClass);
|
||||
});
|
||||
|
||||
})(jQuery); // Avoid conflicts with other libraries
|
||||
|
|
|
@ -63,6 +63,10 @@ if (!defined('PHPBB_INSTALLED'))
|
|||
exit;
|
||||
}
|
||||
|
||||
// In case $phpbb_adm_relative_path is not set (in case of an update), use the default.
|
||||
$phpbb_adm_relative_path = (isset($phpbb_adm_relative_path)) ? $phpbb_adm_relative_path : 'adm/';
|
||||
$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $phpbb_adm_relative_path;
|
||||
|
||||
// Include files
|
||||
require($phpbb_root_path . 'includes/class_loader.' . $phpEx);
|
||||
|
||||
|
@ -83,18 +87,7 @@ $phpbb_class_loader_ext = new phpbb_class_loader('phpbb_ext_', "{$phpbb_root_pat
|
|||
$phpbb_class_loader_ext->register();
|
||||
|
||||
// Set up container
|
||||
$phpbb_container = phpbb_create_dumped_container_unless_debug(
|
||||
array(
|
||||
new phpbb_di_extension_config($phpbb_root_path . 'config.' . $phpEx),
|
||||
new phpbb_di_extension_core($phpbb_root_path),
|
||||
),
|
||||
array(
|
||||
new phpbb_di_pass_collection_pass(),
|
||||
new phpbb_di_pass_kernel_pass(),
|
||||
),
|
||||
$phpbb_root_path,
|
||||
$phpEx
|
||||
);
|
||||
$phpbb_container = phpbb_create_default_container($phpbb_root_path, $phpEx);
|
||||
|
||||
$phpbb_class_loader->set_cache($phpbb_container->get('cache.driver'));
|
||||
$phpbb_class_loader_ext->set_cache($phpbb_container->get('cache.driver'));
|
||||
|
@ -127,8 +120,9 @@ $phpbb_style = $phpbb_container->get('style');
|
|||
// Add own hook handler
|
||||
require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
|
||||
$phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('phpbb_template', 'display')));
|
||||
$phpbb_hook_finder = $phpbb_container->get('hook_finder');
|
||||
|
||||
foreach ($cache->obtain_hooks() as $hook)
|
||||
foreach ($phpbb_hook_finder->find() as $hook)
|
||||
{
|
||||
@include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx);
|
||||
}
|
||||
|
|
|
@ -11,6 +11,10 @@ services:
|
|||
class: phpbb_cache_service
|
||||
arguments:
|
||||
- @cache.driver
|
||||
- @config
|
||||
- @dbal.conn
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
|
||||
cache.driver:
|
||||
class: %cache.driver.class%
|
||||
|
@ -124,6 +128,13 @@ services:
|
|||
- @dispatcher
|
||||
- @controller.resolver
|
||||
|
||||
hook_finder:
|
||||
class: phpbb_hook_finder
|
||||
arguments:
|
||||
- %core.root_path%
|
||||
- .%core.php_ext%
|
||||
- @cache.driver
|
||||
|
||||
kernel_request_subscriber:
|
||||
class: phpbb_event_kernel_request_subscriber
|
||||
arguments:
|
||||
|
|
|
@ -1546,18 +1546,21 @@ function get_schema_struct()
|
|||
|
||||
$schema_data['phpbb_reports'] = array(
|
||||
'COLUMNS' => array(
|
||||
'report_id' => array('UINT', NULL, 'auto_increment'),
|
||||
'reason_id' => array('USINT', 0),
|
||||
'post_id' => array('UINT', 0),
|
||||
'pm_id' => array('UINT', 0),
|
||||
'user_id' => array('UINT', 0),
|
||||
'user_notify' => array('BOOL', 0),
|
||||
'report_closed' => array('BOOL', 0),
|
||||
'report_time' => array('TIMESTAMP', 0),
|
||||
'report_text' => array('MTEXT_UNI', ''),
|
||||
'reported_post_text' => array('MTEXT_UNI', ''),
|
||||
'reported_post_uid' => array('VCHAR:8', ''),
|
||||
'reported_post_bitfield' => array('VCHAR:255', ''),
|
||||
'report_id' => array('UINT', NULL, 'auto_increment'),
|
||||
'reason_id' => array('USINT', 0),
|
||||
'post_id' => array('UINT', 0),
|
||||
'pm_id' => array('UINT', 0),
|
||||
'user_id' => array('UINT', 0),
|
||||
'user_notify' => array('BOOL', 0),
|
||||
'report_closed' => array('BOOL', 0),
|
||||
'report_time' => array('TIMESTAMP', 0),
|
||||
'report_text' => array('MTEXT_UNI', ''),
|
||||
'reported_post_text' => array('MTEXT_UNI', ''),
|
||||
'reported_post_uid' => array('VCHAR:8', ''),
|
||||
'reported_post_bitfield' => array('VCHAR:255', ''),
|
||||
'reported_post_enable_magic_url' => array('BOOL', 1),
|
||||
'reported_post_enable_smilies' => array('BOOL', 1),
|
||||
'reported_post_enable_bbcode' => array('BOOL', 1)
|
||||
),
|
||||
'PRIMARY_KEY' => 'report_id',
|
||||
'KEYS' => array(
|
||||
|
|
|
@ -72,6 +72,7 @@
|
|||
<ol style="list-style-type: lower-roman;">
|
||||
<li><a href="#templates">General Templating</a></li>
|
||||
<li><a href="#stylestree">Styles Tree</a></li>
|
||||
<li><a href="#template-events">Template Events</a></li>
|
||||
</ol></li>
|
||||
<li><a href="#charsets">Character Sets and Encodings</a></li>
|
||||
<li><a href="#translation">Translation (<abbr title="Internationalisation">i18n</abbr>/<abbr title="Localisation">L10n</abbr>) Guidelines</a>
|
||||
|
@ -1678,6 +1679,57 @@ version = 3.1.0
|
|||
parent = prosilver
|
||||
</pre></div>
|
||||
|
||||
<a name="template-events"></a><h3>4.iii. Template Events</h3>
|
||||
<p>Template events must follow this format: <code><!-- EVENT event_name --></code></p>
|
||||
<p>Using the above example, files named <code>event_name.html</code> located within extensions will be injected into the location of the event.</p>
|
||||
|
||||
<h4>Template event naming guidelines:</h4>
|
||||
<ul>
|
||||
<li>An event name must be all lowercase, with each word separated by an underscore.</li>
|
||||
<li>An event name must briefly describe the location and purpose of the event.</li>
|
||||
<li>An event name must end with one of the following suffixes:</li>
|
||||
<ul>
|
||||
<li><code>_prepend</code> - This event adds an item to the beginning of a block of related items, or adds to the beginning of individual items in a block.</li>
|
||||
<li><code>_append</code> - This event adds an item to the end of a block of related items, or adds to the end of individual items in a block.</li>
|
||||
<li><code>_before</code> - This event adds content directly before the specified block</li>
|
||||
<li><code>_after</code> - This event adds content directly after the specified block</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h4>Template event documentation</h4>
|
||||
<p>Events must be documented in <code>phpBB/docs/events.md</code> in alphabetical order based on the event name. The format is as follows:</p>
|
||||
|
||||
<ul><li>An event found in only one template file:
|
||||
<div class="codebox"><pre>event_name
|
||||
===
|
||||
* Location: styles/<style_name>/template/filename.html
|
||||
* Purpose: A brief description of what this event should be used for.
|
||||
This may span multiple lines.
|
||||
</pre></div></li>
|
||||
<li>An event found in multiple template files:
|
||||
<div class="codebox"><pre>event_name
|
||||
===
|
||||
* Locations:
|
||||
+ first/file/path.html
|
||||
+ second/file/path.html
|
||||
* Purpose: Same as above.
|
||||
</pre></div>
|
||||
<li>An event that is found multiple times in a file should have the number of instances in parenthesis next to the filename.
|
||||
<div class="codebox"><pre>event_name
|
||||
===
|
||||
* Locations:
|
||||
+ first/file/path.html (2)
|
||||
+ second/file/path.html
|
||||
* Purpose: Same as above.
|
||||
</pre></div></li>
|
||||
<li>An actual example event documentation:
|
||||
<div class="codebox"><pre>forumlist_body_last_post_title_prepend
|
||||
====
|
||||
* Locations:
|
||||
+ styles/prosilver/template/forumlist_body.html
|
||||
+ styles/subsilver2/template/forumlist_body.html
|
||||
* Purpose: Add content before the post title of the latest post in a forum on the forum list.</pre></div></ul><br />
|
||||
|
||||
</div>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
|
132
phpBB/docs/events.md
Normal file
132
phpBB/docs/events.md
Normal file
|
@ -0,0 +1,132 @@
|
|||
acp_forums_normal_settings_append
|
||||
===
|
||||
* Location: adm/style/acp_forums.html
|
||||
* Purpose: Add settings to forums
|
||||
|
||||
acp_main_actions_append
|
||||
===
|
||||
* Location: adm/style/acp_main.html
|
||||
* Purpose: Add actions to the ACP main page below the cache purge action
|
||||
|
||||
acp_main_notice_after
|
||||
===
|
||||
* Location: adm/style/acp_main.html
|
||||
* Purpose: Add notices or other blocks in the ACP below other configuration notices
|
||||
|
||||
acp_overall_footer_after
|
||||
===
|
||||
* Location: adm/style/overall_footer.html
|
||||
* Purpose: Add content below the footer in the ACP
|
||||
|
||||
acp_overall_header_head_append
|
||||
===
|
||||
* Location: adm/style/overall_header.html
|
||||
* Add assets within the `<head>` tags in the ACP
|
||||
|
||||
acp_simple_footer_after
|
||||
===
|
||||
* Location: adm/style/simple_footer.html
|
||||
* Purpose: Add content below the simple footer in the ACP
|
||||
|
||||
acp_simple_header_head_append
|
||||
===
|
||||
* Location: adm/style/overall_header.html
|
||||
* Add assets within the `<head>` tags in the simple header of the ACP
|
||||
|
||||
acp_users_overview_options_append
|
||||
===
|
||||
* Location: adm/style/acp_users.html
|
||||
* Purpose: Add options and settings on user overview page
|
||||
|
||||
forumlist_body_last_post_title_prepend
|
||||
====
|
||||
* Locations:
|
||||
+ styles/prosilver/template/forumlist_body.html
|
||||
+ styles/subsilver2/template/forumlist_body.html
|
||||
* Purpose: Add content before the post title of the latest post in a forum on the forum list.
|
||||
|
||||
index_body_stat_blocks_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/index_body.html
|
||||
+ styles/subsilver2/template/index_body.html
|
||||
* Purpose: Add new statistic blocks above the Who Is Online and Board Statistics blocks
|
||||
|
||||
overall_footer_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/overall_footer.html
|
||||
+ styles/subsilver2/template/overall_footer.html
|
||||
* Purpose: Add content at the end of the file, directly prior to the `</body>` tag
|
||||
|
||||
overall_footer_breadcrumb_append
|
||||
===
|
||||
* Location: styles/prosilver/template/overall_footer.html
|
||||
* Purpose: Add links to the list of breadcrumbs in the footer
|
||||
|
||||
overall_footer_copyright_append
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/overall_footer.html
|
||||
+ styles/subsilver2/template/overall_footer.html
|
||||
* Purpose: Add content after the copyright line (no new line by default), before the ACP link
|
||||
|
||||
overall_footer_copyright_prepend
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/overall_footer.html
|
||||
+ styles/subsilver2/template/overall_footer.html
|
||||
* Purpose: Add content before the copyright line
|
||||
|
||||
overall_header_breadcrumb_append
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/overall_header.html
|
||||
+ styles/subsilver2/template/breadcrumbs.html
|
||||
* Purpose: Add links to the list of breadcrumbs in the header
|
||||
|
||||
overall_header_head_append
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/overall_header.html
|
||||
+ styles/subsilver2/template/overall_header.html
|
||||
* Purpose: Add asset calls directly before the `</head>` tag
|
||||
|
||||
overall_header_navigation_append
|
||||
===
|
||||
* Location: styles/prosilver/template/overall_header.html
|
||||
* Purpose: Add links after the navigation links in the header
|
||||
|
||||
overall_header_navigation_prepend
|
||||
===
|
||||
* Location: styles/prosilver/template/overall_header.html
|
||||
* Purpose: Add links before the navigation links in the header
|
||||
|
||||
posting_editor_options_prepend
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/posting_editor.html
|
||||
+ styles/prosilver/template/posting_body.html
|
||||
* Purpose: Add posting options on the posting screen
|
||||
|
||||
simple_footer_after
|
||||
===
|
||||
* Location: styles/prosilver/template/simple_footer.html
|
||||
* Purpose: Add content directly prior to the `</body>` tag of the simple footer
|
||||
|
||||
ucp_pm_viewmessage_print_head_append
|
||||
===
|
||||
* Location: styles/prosilver/template/ucp_pm_viewmessage_print.html
|
||||
* Purpose: Add asset calls directly before the `</head>` tag of the Print PM screen
|
||||
|
||||
viewtopic_print_head_append
|
||||
===
|
||||
* Location: styles/prosilver/template/viewtopic_print.html
|
||||
* Purpose: Add asset calls directly before the `</head>` tag of the Print Topic screen
|
||||
|
||||
viewtopic_topic_title_prepend
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_body.html
|
||||
+ styles/subsilver2/template/viewtopic_body.html
|
||||
* Purpose: Add content directly before the topic title link on the View topic screen
|
|
@ -10,21 +10,36 @@ source source_phpbb_{SPHINX_ID}_main
|
|||
sql_query_pre = UPDATE phpbb_sphinx SET max_doc_id = MAX(post_id) WHERE counter_id = 1
|
||||
sql_query_range = SELECT MIN(post_id), MAX(post_id) FROM phpbb_posts
|
||||
sql_range_step = 5000
|
||||
sql_query = SELECT
\
|
||||
p.post_id AS id,
\
|
||||
p.forum_id,
\
|
||||
p.topic_id,
\
|
||||
p.poster_id,
\
|
||||
CASE WHEN p.post_id = t.topic_first_post_id THEN 1 ELSE 0 END as topic_first_post,
\
|
||||
p.post_time,
\
|
||||
p.post_subject,
\
|
||||
p.post_subject as title,
\
|
||||
p.post_text as data,
\
|
||||
t.topic_last_post_time,
\
|
||||
0 as deleted
\
|
||||
FROM phpbb_posts p, phpbb_topics t
\
|
||||
WHERE
\
|
||||
p.topic_id = t.topic_id
\
|
||||
sql_query = SELECT
|
||||
\
|
||||
p.post_id AS id,
|
||||
\
|
||||
p.forum_id,
|
||||
\
|
||||
p.topic_id,
|
||||
\
|
||||
p.poster_id,
|
||||
\
|
||||
CASE WHEN p.post_id = t.topic_first_post_id THEN 1 ELSE 0 END as topic_first_post,
|
||||
\
|
||||
p.post_time,
|
||||
\
|
||||
p.post_subject,
|
||||
\
|
||||
p.post_subject as title,
|
||||
\
|
||||
p.post_text as data,
|
||||
\
|
||||
t.topic_last_post_time,
|
||||
\
|
||||
0 as deleted
|
||||
\
|
||||
FROM phpbb_posts p, phpbb_topics t
|
||||
\
|
||||
WHERE
|
||||
\
|
||||
p.topic_id = t.topic_id
|
||||
\
|
||||
AND p.post_id >= $start AND p.post_id <= $end
|
||||
sql_query_post =
|
||||
sql_query_post_index = UPDATE phpbb_sphinx SET max_doc_id = $maxid WHERE counter_id = 1
|
||||
|
@ -42,21 +57,36 @@ source source_phpbb_{SPHINX_ID}_delta : source_phpbb_{SPHINX_ID}_main
|
|||
{
|
||||
sql_query_range =
|
||||
sql_range_step =
|
||||
sql_query = SELECT
\
|
||||
p.post_id AS id,
\
|
||||
p.forum_id,
\
|
||||
p.topic_id,
\
|
||||
p.poster_id,
\
|
||||
CASE WHEN p.post_id = t.topic_first_post_id THEN 1 ELSE 0 END as topic_first_post,
\
|
||||
p.post_time,
\
|
||||
p.post_subject,
\
|
||||
p.post_subject as title,
\
|
||||
p.post_text as data,
\
|
||||
t.topic_last_post_time,
\
|
||||
0 as deleted
\
|
||||
FROM phpbb_posts p, phpbb_topics t
\
|
||||
WHERE
\
|
||||
p.topic_id = t.topic_id
\
|
||||
sql_query = SELECT
|
||||
\
|
||||
p.post_id AS id,
|
||||
\
|
||||
p.forum_id,
|
||||
\
|
||||
p.topic_id,
|
||||
\
|
||||
p.poster_id,
|
||||
\
|
||||
CASE WHEN p.post_id = t.topic_first_post_id THEN 1 ELSE 0 END as topic_first_post,
|
||||
\
|
||||
p.post_time,
|
||||
\
|
||||
p.post_subject,
|
||||
\
|
||||
p.post_subject as title,
|
||||
\
|
||||
p.post_text as data,
|
||||
\
|
||||
t.topic_last_post_time,
|
||||
\
|
||||
0 as deleted
|
||||
\
|
||||
FROM phpbb_posts p, phpbb_topics t
|
||||
\
|
||||
WHERE
|
||||
\
|
||||
p.topic_id = t.topic_id
|
||||
\
|
||||
AND p.post_id >= ( SELECT max_doc_id FROM phpbb_sphinx WHERE counter_id=1 )
|
||||
sql_query_pre =
|
||||
}
|
||||
|
|
|
@ -56,18 +56,7 @@ if (isset($_GET['avatar']))
|
|||
$phpbb_class_loader_ext->register();
|
||||
|
||||
// Set up container
|
||||
$phpbb_container = phpbb_create_dumped_container_unless_debug(
|
||||
array(
|
||||
new phpbb_di_extension_config($phpbb_root_path . 'config.' . $phpEx),
|
||||
new phpbb_di_extension_core($phpbb_root_path),
|
||||
),
|
||||
array(
|
||||
new phpbb_di_pass_collection_pass(),
|
||||
new phpbb_di_pass_kernel_pass(),
|
||||
),
|
||||
$phpbb_root_path,
|
||||
$phpEx
|
||||
);
|
||||
$phpbb_container = phpbb_create_default_container($phpbb_root_path, $phpEx);
|
||||
|
||||
$phpbb_class_loader->set_cache($phpbb_container->get('cache.driver'));
|
||||
$phpbb_class_loader_ext->set_cache($phpbb_container->get('cache.driver'));
|
||||
|
|
|
@ -206,7 +206,7 @@ class acp_forums
|
|||
($action != 'edit' || empty($forum_id) || ($auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))))
|
||||
{
|
||||
copy_forum_permissions($forum_perm_from, $forum_data['forum_id'], ($action == 'edit') ? true : false);
|
||||
cache_moderators();
|
||||
phpbb_cache_moderators($db, $cache, $auth);
|
||||
$copied_permissions = true;
|
||||
}
|
||||
/* Commented out because of questionable UI workflow - re-visit for 3.0.7
|
||||
|
@ -266,7 +266,7 @@ class acp_forums
|
|||
add_log('admin', 'LOG_FORUM_' . strtoupper($action), $row['forum_name'], $move_forum_name);
|
||||
$cache->destroy('sql', FORUMS_TABLE);
|
||||
}
|
||||
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
$json_response = new phpbb_json_response;
|
||||
|
@ -768,7 +768,7 @@ class acp_forums
|
|||
if (!empty($forum_perm_from) && $forum_perm_from != $forum_id)
|
||||
{
|
||||
copy_forum_permissions($forum_perm_from, $forum_id, true);
|
||||
cache_moderators();
|
||||
phpbb_cache_moderators($db, $cache, $auth);
|
||||
$auth->acl_clear_prefetch();
|
||||
$cache->destroy('sql', FORUMS_TABLE);
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ class acp_main
|
|||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $config, $db, $user, $auth, $template, $request;
|
||||
global $config, $db, $cache, $user, $auth, $template, $request;
|
||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
|
||||
// Show restore permissions notice
|
||||
|
@ -129,7 +129,7 @@ class acp_main
|
|||
set_config('record_online_users', 1, true);
|
||||
set_config('record_online_date', time(), true);
|
||||
add_log('admin', 'LOG_RESET_ONLINE');
|
||||
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
trigger_error('RESET_ONLINE_SUCCESS');
|
||||
|
@ -184,7 +184,7 @@ class acp_main
|
|||
update_last_username();
|
||||
|
||||
add_log('admin', 'LOG_RESYNC_STATS');
|
||||
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
trigger_error('RESYNC_STATS_SUCCESS');
|
||||
|
@ -251,7 +251,7 @@ class acp_main
|
|||
}
|
||||
|
||||
add_log('admin', 'LOG_RESYNC_POSTCOUNTS');
|
||||
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
trigger_error('RESYNC_POSTCOUNTS_SUCCESS');
|
||||
|
@ -266,7 +266,7 @@ class acp_main
|
|||
|
||||
set_config('board_startdate', time() - 1);
|
||||
add_log('admin', 'LOG_RESET_DATE');
|
||||
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
trigger_error('RESET_DATE_SUCCESS');
|
||||
|
@ -346,7 +346,7 @@ class acp_main
|
|||
}
|
||||
|
||||
add_log('admin', 'LOG_RESYNC_POST_MARKING');
|
||||
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
trigger_error('RESYNC_POST_MARKING_SUCCESS');
|
||||
|
@ -359,10 +359,10 @@ class acp_main
|
|||
|
||||
// Clear permissions
|
||||
$auth->acl_clear_prefetch();
|
||||
cache_moderators();
|
||||
phpbb_cache_moderators($db, $cache, $auth);
|
||||
|
||||
add_log('admin', 'LOG_PURGE_CACHE');
|
||||
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
trigger_error('PURGE_CACHE_SUCCESS');
|
||||
|
@ -413,7 +413,7 @@ class acp_main
|
|||
$db->sql_query($sql);
|
||||
|
||||
add_log('admin', 'LOG_PURGE_SESSIONS');
|
||||
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
trigger_error('PURGE_SESSIONS_SUCCESS');
|
||||
|
|
|
@ -740,15 +740,15 @@ class acp_modules
|
|||
*/
|
||||
function remove_cache_file()
|
||||
{
|
||||
global $cache;
|
||||
global $phpbb_container;
|
||||
|
||||
// Sanitise for future path use, it's escaped as appropriate for queries
|
||||
$p_class = str_replace(array('.', '/', '\\'), '', basename($this->module_class));
|
||||
|
||||
$cache->destroy('_modules_' . $p_class);
|
||||
$phpbb_container->get('cache.driver')->destroy('_modules_' . $p_class);
|
||||
|
||||
// Additionally remove sql cache
|
||||
$cache->destroy('sql', MODULES_TABLE);
|
||||
$phpbb_container->get('cache.driver')->destroy('sql', MODULES_TABLE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -656,7 +656,7 @@ class acp_permissions
|
|||
*/
|
||||
function set_permissions($mode, $permission_type, &$auth_admin, &$user_id, &$group_id)
|
||||
{
|
||||
global $user, $auth;
|
||||
global $db, $cache, $user, $auth;
|
||||
global $request;
|
||||
|
||||
$psubmit = request_var('psubmit', array(0 => array(0 => 0)));
|
||||
|
@ -726,13 +726,13 @@ class acp_permissions
|
|||
// Do we need to recache the moderator lists?
|
||||
if ($permission_type == 'm_')
|
||||
{
|
||||
cache_moderators();
|
||||
phpbb_cache_moderators($db, $cache, $auth);
|
||||
}
|
||||
|
||||
// Remove users who are now moderators or admins from everyones foes list
|
||||
if ($permission_type == 'm_' || $permission_type == 'a_')
|
||||
{
|
||||
update_foes($group_id, $user_id);
|
||||
phpbb_update_foes($db, $auth, $group_id, $user_id);
|
||||
}
|
||||
|
||||
$this->log_action($mode, 'add', $permission_type, $ug_type, $ug_id, $forum_id);
|
||||
|
@ -745,7 +745,7 @@ class acp_permissions
|
|||
*/
|
||||
function set_all_permissions($mode, $permission_type, &$auth_admin, &$user_id, &$group_id)
|
||||
{
|
||||
global $user, $auth;
|
||||
global $db, $cache, $user, $auth;
|
||||
global $request;
|
||||
|
||||
// User or group to be set?
|
||||
|
@ -794,13 +794,13 @@ class acp_permissions
|
|||
// Do we need to recache the moderator lists?
|
||||
if ($permission_type == 'm_')
|
||||
{
|
||||
cache_moderators();
|
||||
phpbb_cache_moderators($db, $cache, $auth);
|
||||
}
|
||||
|
||||
// Remove users who are now moderators or admins from everyones foes list
|
||||
if ($permission_type == 'm_' || $permission_type == 'a_')
|
||||
{
|
||||
update_foes($group_id, $user_id);
|
||||
phpbb_update_foes($db, $auth, $group_id, $user_id);
|
||||
}
|
||||
|
||||
$this->log_action($mode, 'add', $permission_type, $ug_type, $ug_ids, $forum_ids);
|
||||
|
@ -858,7 +858,7 @@ class acp_permissions
|
|||
*/
|
||||
function remove_permissions($mode, $permission_type, &$auth_admin, &$user_id, &$group_id, &$forum_id)
|
||||
{
|
||||
global $user, $db, $auth;
|
||||
global $user, $db, $cache, $auth;
|
||||
|
||||
// User or group to be set?
|
||||
$ug_type = (sizeof($user_id)) ? 'user' : 'group';
|
||||
|
@ -874,7 +874,7 @@ class acp_permissions
|
|||
// Do we need to recache the moderator lists?
|
||||
if ($permission_type == 'm_')
|
||||
{
|
||||
cache_moderators();
|
||||
phpbb_cache_moderators($db, $cache, $auth);
|
||||
}
|
||||
|
||||
$this->log_action($mode, 'del', $permission_type, $ug_type, (($ug_type == 'user') ? $user_id : $group_id), (sizeof($forum_id) ? $forum_id : array(0 => 0)));
|
||||
|
@ -952,12 +952,7 @@ class acp_permissions
|
|||
|
||||
if ($user_id != $user->data['user_id'])
|
||||
{
|
||||
$sql = 'SELECT user_id, username, user_permissions, user_type
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE user_id = ' . $user_id;
|
||||
$result = $db->sql_query($sql);
|
||||
$userdata = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
$userdata = $auth->obtain_user_data($user_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1172,7 +1167,7 @@ class acp_permissions
|
|||
*/
|
||||
function copy_forum_permissions()
|
||||
{
|
||||
global $auth, $cache, $template, $user;
|
||||
global $db, $auth, $cache, $template, $user;
|
||||
|
||||
$user->add_lang('acp/forums');
|
||||
|
||||
|
@ -1187,7 +1182,7 @@ class acp_permissions
|
|||
{
|
||||
if (copy_forum_permissions($src, $dest))
|
||||
{
|
||||
cache_moderators();
|
||||
phpbb_cache_moderators($db, $cache, $auth);
|
||||
|
||||
$auth->acl_clear_prefetch();
|
||||
$cache->destroy('sql', FORUMS_TABLE);
|
||||
|
|
|
@ -71,7 +71,7 @@ class acp_ranks
|
|||
'rank_min' => $min_posts,
|
||||
'rank_image' => htmlspecialchars_decode($rank_image)
|
||||
);
|
||||
|
||||
|
||||
if ($rank_id)
|
||||
{
|
||||
$sql = 'UPDATE ' . RANKS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " WHERE rank_id = $rank_id";
|
||||
|
@ -122,7 +122,7 @@ class acp_ranks
|
|||
$cache->destroy('_ranks');
|
||||
|
||||
add_log('admin', 'LOG_RANK_REMOVED', $rank_title);
|
||||
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
$json_response = new phpbb_json_response;
|
||||
|
@ -151,7 +151,7 @@ class acp_ranks
|
|||
case 'add':
|
||||
|
||||
$data = $ranks = $existing_imgs = array();
|
||||
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . RANKS_TABLE . '
|
||||
ORDER BY rank_min ASC, rank_special ASC';
|
||||
|
@ -209,17 +209,17 @@ class acp_ranks
|
|||
|
||||
'RANK_TITLE' => (isset($ranks['rank_title'])) ? $ranks['rank_title'] : '',
|
||||
'S_FILENAME_LIST' => $filename_list,
|
||||
'RANK_IMAGE' => ($edit_img) ? $phpbb_root_path . $config['ranks_path'] . '/' . $edit_img : $phpbb_admin_path . 'images/spacer.gif',
|
||||
'RANK_IMAGE' => ($edit_img) ? $phpbb_root_path . $config['ranks_path'] . '/' . $edit_img : htmlspecialchars($phpbb_admin_path) . 'images/spacer.gif',
|
||||
'S_SPECIAL_RANK' => (isset($ranks['rank_special']) && $ranks['rank_special']) ? true : false,
|
||||
'MIN_POSTS' => (isset($ranks['rank_min']) && !$ranks['rank_special']) ? $ranks['rank_min'] : 0)
|
||||
);
|
||||
|
||||
|
||||
|
||||
return;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
$template->assign_vars(array(
|
||||
'U_ACTION' => $this->u_action)
|
||||
);
|
||||
|
@ -241,7 +241,7 @@ class acp_ranks
|
|||
|
||||
'U_EDIT' => $this->u_action . '&action=edit&id=' . $row['rank_id'],
|
||||
'U_DELETE' => $this->u_action . '&action=delete&id=' . $row['rank_id'])
|
||||
);
|
||||
);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
|
|
@ -137,11 +137,13 @@ class acp_styles
|
|||
*/
|
||||
protected function action_cache()
|
||||
{
|
||||
global $db, $cache, $auth;
|
||||
|
||||
$this->cache->purge();
|
||||
|
||||
// Clear permissions
|
||||
$this->auth->acl_clear_prefetch();
|
||||
cache_moderators();
|
||||
phpbb_cache_moderators($db, $cache, $auth);
|
||||
|
||||
add_log('admin', 'LOG_PURGE_CACHE');
|
||||
|
||||
|
|
|
@ -102,6 +102,26 @@ class phpbb_auth
|
|||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves data wanted by acl function from the database for the
|
||||
* specified user.
|
||||
*
|
||||
* @param int $user_id User ID
|
||||
* @return array User attributes
|
||||
*/
|
||||
public function obtain_user_data($user_id)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$sql = 'SELECT user_id, username, user_permissions, user_type
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE user_id = ' . $user_id;
|
||||
$result = $db->sql_query($sql);
|
||||
$user_data = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
return $user_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fill ACL array with relevant bitstrings from user_permissions column
|
||||
* @access private
|
||||
|
@ -191,7 +211,7 @@ class phpbb_auth
|
|||
|
||||
/**
|
||||
* Get forums with the specified permission setting
|
||||
* if the option is prefixed with !, then the result becomes nagated
|
||||
* if the option is prefixed with !, then the result becomes negated
|
||||
*
|
||||
* @param bool $clean set to true if only values needs to be returned which are set/unset
|
||||
*/
|
||||
|
|
6
phpBB/includes/cache/driver/file.php
vendored
6
phpBB/includes/cache/driver/file.php
vendored
|
@ -367,12 +367,10 @@ class phpbb_cache_driver_file extends phpbb_cache_driver_base
|
|||
}
|
||||
|
||||
/**
|
||||
* Save sql query
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
function sql_save($query, $query_result, $ttl)
|
||||
function sql_save(phpbb_db_driver $db, $query, $query_result, $ttl)
|
||||
{
|
||||
global $db;
|
||||
|
||||
// Remove extra spaces and tabs
|
||||
$query = preg_replace('/[\n\r\s\t]+/', ' ', $query);
|
||||
|
||||
|
|
3
phpBB/includes/cache/driver/interface.php
vendored
3
phpBB/includes/cache/driver/interface.php
vendored
|
@ -85,6 +85,7 @@ interface phpbb_cache_driver_interface
|
|||
* result to persistent storage. In other words, there is no need
|
||||
* to call save() afterwards.
|
||||
*
|
||||
* @param phpbb_db_driver $db Database connection
|
||||
* @param string $query SQL query, should be used for generating storage key
|
||||
* @param mixed $query_result The result from dbal::sql_query, to be passed to
|
||||
* dbal::sql_fetchrow to get all rows and store them
|
||||
|
@ -95,7 +96,7 @@ interface phpbb_cache_driver_interface
|
|||
* representing the query should be returned. Otherwise
|
||||
* the original $query_result should be returned.
|
||||
*/
|
||||
public function sql_save($query, $query_result, $ttl);
|
||||
public function sql_save(phpbb_db_driver $db, $query, $query_result, $ttl);
|
||||
|
||||
/**
|
||||
* Check if result for a given SQL query exists in cache.
|
||||
|
|
6
phpBB/includes/cache/driver/memory.php
vendored
6
phpBB/includes/cache/driver/memory.php
vendored
|
@ -283,12 +283,10 @@ abstract class phpbb_cache_driver_memory extends phpbb_cache_driver_base
|
|||
}
|
||||
|
||||
/**
|
||||
* Save sql query
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
function sql_save($query, $query_result, $ttl)
|
||||
function sql_save(phpbb_db_driver $db, $query, $query_result, $ttl)
|
||||
{
|
||||
global $db;
|
||||
|
||||
// Remove extra spaces and tabs
|
||||
$query = preg_replace('/[\n\r\s\t]+/', ' ', $query);
|
||||
$hash = md5($query);
|
||||
|
|
4
phpBB/includes/cache/driver/null.php
vendored
4
phpBB/includes/cache/driver/null.php
vendored
|
@ -105,9 +105,9 @@ class phpbb_cache_driver_null extends phpbb_cache_driver_base
|
|||
}
|
||||
|
||||
/**
|
||||
* Save sql query
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
function sql_save($query, $query_result, $ttl)
|
||||
function sql_save(phpbb_db_driver $db, $query, $query_result, $ttl)
|
||||
{
|
||||
return $query_result;
|
||||
}
|
||||
|
|
133
phpBB/includes/cache/service.php
vendored
133
phpBB/includes/cache/service.php
vendored
|
@ -21,16 +21,57 @@ if (!defined('IN_PHPBB'))
|
|||
*/
|
||||
class phpbb_cache_service
|
||||
{
|
||||
private $driver;
|
||||
/**
|
||||
* Cache driver.
|
||||
*
|
||||
* @var phpbb_cache_driver_interface
|
||||
*/
|
||||
protected $driver;
|
||||
|
||||
/**
|
||||
* The config.
|
||||
*
|
||||
* @var phpbb_config
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
/**
|
||||
* Database connection.
|
||||
*
|
||||
* @var phpbb_db_driver
|
||||
*/
|
||||
protected $db;
|
||||
|
||||
/**
|
||||
* Root path.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $phpbb_root_path;
|
||||
|
||||
/**
|
||||
* PHP extension.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $php_ext;
|
||||
|
||||
/**
|
||||
* Creates a cache service around a cache driver
|
||||
*
|
||||
* @param phpbb_cache_driver_interface $driver The cache driver
|
||||
* @param phpbb_config $config The config
|
||||
* @param phpbb_db_driver $db Database connection
|
||||
* @param string $phpbb_root_path Root path
|
||||
* @param string $php_ext PHP extension
|
||||
*/
|
||||
public function __construct(phpbb_cache_driver_interface $driver = null)
|
||||
public function __construct(phpbb_cache_driver_interface $driver, phpbb_config $config, phpbb_db_driver $db, $phpbb_root_path, $php_ext)
|
||||
{
|
||||
$this->set_driver($driver);
|
||||
$this->config = $config;
|
||||
$this->db = $db;
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
$this->php_ext = $php_ext;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -64,21 +105,19 @@ class phpbb_cache_service
|
|||
*/
|
||||
function obtain_word_list()
|
||||
{
|
||||
global $db;
|
||||
|
||||
if (($censors = $this->driver->get('_word_censors')) === false)
|
||||
{
|
||||
$sql = 'SELECT word, replacement
|
||||
FROM ' . WORDS_TABLE;
|
||||
$result = $db->sql_query($sql);
|
||||
$result = $this->db->sql_query($sql);
|
||||
|
||||
$censors = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
{
|
||||
$censors['match'][] = get_censor_preg_expression($row['word']);
|
||||
$censors['replace'][] = $row['replacement'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
$this->driver->put('_word_censors', $censors);
|
||||
}
|
||||
|
@ -93,23 +132,21 @@ class phpbb_cache_service
|
|||
{
|
||||
if (($icons = $this->driver->get('_icons')) === false)
|
||||
{
|
||||
global $db;
|
||||
|
||||
// Topic icons
|
||||
$sql = 'SELECT *
|
||||
FROM ' . ICONS_TABLE . '
|
||||
ORDER BY icons_order';
|
||||
$result = $db->sql_query($sql);
|
||||
$result = $this->db->sql_query($sql);
|
||||
|
||||
$icons = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
{
|
||||
$icons[$row['icons_id']]['img'] = $row['icons_url'];
|
||||
$icons[$row['icons_id']]['width'] = (int) $row['icons_width'];
|
||||
$icons[$row['icons_id']]['height'] = (int) $row['icons_height'];
|
||||
$icons[$row['icons_id']]['display'] = (bool) $row['display_on_posting'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
$this->driver->put('_icons', $icons);
|
||||
}
|
||||
|
@ -124,15 +161,13 @@ class phpbb_cache_service
|
|||
{
|
||||
if (($ranks = $this->driver->get('_ranks')) === false)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . RANKS_TABLE . '
|
||||
ORDER BY rank_min DESC';
|
||||
$result = $db->sql_query($sql);
|
||||
$result = $this->db->sql_query($sql);
|
||||
|
||||
$ranks = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
{
|
||||
if ($row['rank_special'])
|
||||
{
|
||||
|
@ -150,7 +185,7 @@ class phpbb_cache_service
|
|||
);
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
$this->driver->put('_ranks', $ranks);
|
||||
}
|
||||
|
@ -169,8 +204,6 @@ class phpbb_cache_service
|
|||
{
|
||||
if (($extensions = $this->driver->get('_extensions')) === false)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$extensions = array(
|
||||
'_allowed_post' => array(),
|
||||
'_allowed_pm' => array(),
|
||||
|
@ -181,9 +214,9 @@ class phpbb_cache_service
|
|||
FROM ' . EXTENSIONS_TABLE . ' e, ' . EXTENSION_GROUPS_TABLE . ' g
|
||||
WHERE e.group_id = g.group_id
|
||||
AND (g.allow_group = 1 OR g.allow_in_pm = 1)';
|
||||
$result = $db->sql_query($sql);
|
||||
$result = $this->db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
{
|
||||
$extension = strtolower(trim($row['extension']));
|
||||
|
||||
|
@ -210,7 +243,7 @@ class phpbb_cache_service
|
|||
$extensions['_allowed_pm'][$extension] = 0;
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
$this->driver->put('_extensions', $extensions);
|
||||
}
|
||||
|
@ -275,9 +308,7 @@ class phpbb_cache_service
|
|||
{
|
||||
if (($bots = $this->driver->get('_bots')) === false)
|
||||
{
|
||||
global $db;
|
||||
|
||||
switch ($db->sql_layer)
|
||||
switch ($this->db->sql_layer)
|
||||
{
|
||||
case 'mssql':
|
||||
case 'mssql_odbc':
|
||||
|
@ -303,14 +334,14 @@ class phpbb_cache_service
|
|||
ORDER BY LENGTH(bot_agent) DESC';
|
||||
break;
|
||||
}
|
||||
$result = $db->sql_query($sql);
|
||||
$result = $this->db->sql_query($sql);
|
||||
|
||||
$bots = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
{
|
||||
$bots[] = $row;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
$this->driver->put('_bots', $bots);
|
||||
}
|
||||
|
@ -323,8 +354,6 @@ class phpbb_cache_service
|
|||
*/
|
||||
function obtain_cfg_items($style)
|
||||
{
|
||||
global $config, $phpbb_root_path;
|
||||
|
||||
$parsed_array = $this->driver->get('_cfg_' . $style['style_path']);
|
||||
|
||||
if ($parsed_array === false)
|
||||
|
@ -332,14 +361,14 @@ class phpbb_cache_service
|
|||
$parsed_array = array();
|
||||
}
|
||||
|
||||
$filename = $phpbb_root_path . 'styles/' . $style['style_path'] . '/style.cfg';
|
||||
$filename = $this->phpbb_root_path . 'styles/' . $style['style_path'] . '/style.cfg';
|
||||
|
||||
if (!file_exists($filename))
|
||||
{
|
||||
return $parsed_array;
|
||||
}
|
||||
|
||||
if (!isset($parsed_array['filetime']) || (($config['load_tplcompile'] && @filemtime($filename) > $parsed_array['filetime'])))
|
||||
if (!isset($parsed_array['filetime']) || (($this->config['load_tplcompile'] && @filemtime($filename) > $parsed_array['filetime'])))
|
||||
{
|
||||
// Re-parse cfg file
|
||||
$parsed_array = parse_cfg_file($filename);
|
||||
|
@ -358,54 +387,20 @@ class phpbb_cache_service
|
|||
{
|
||||
if (($usernames = $this->driver->get('_disallowed_usernames')) === false)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$sql = 'SELECT disallow_username
|
||||
FROM ' . DISALLOW_TABLE;
|
||||
$result = $db->sql_query($sql);
|
||||
$result = $this->db->sql_query($sql);
|
||||
|
||||
$usernames = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
{
|
||||
$usernames[] = str_replace('%', '.*?', preg_quote(utf8_clean_string($row['disallow_username']), '#'));
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
$this->driver->put('_disallowed_usernames', $usernames);
|
||||
}
|
||||
|
||||
return $usernames;
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtain hooks...
|
||||
*/
|
||||
function obtain_hooks()
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
if (($hook_files = $this->driver->get('_hooks')) === false)
|
||||
{
|
||||
$hook_files = array();
|
||||
|
||||
// Now search for hooks...
|
||||
$dh = @opendir($phpbb_root_path . 'includes/hooks/');
|
||||
|
||||
if ($dh)
|
||||
{
|
||||
while (($file = readdir($dh)) !== false)
|
||||
{
|
||||
if (strpos($file, 'hook_') === 0 && substr($file, -(strlen($phpEx) + 1)) === '.' . $phpEx)
|
||||
{
|
||||
$hook_files[] = substr($file, 0, -(strlen($phpEx) + 1));
|
||||
}
|
||||
}
|
||||
closedir($dh);
|
||||
}
|
||||
|
||||
$this->driver->put('_hooks', $hook_files);
|
||||
}
|
||||
|
||||
return $hook_files;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -118,7 +118,7 @@ class captcha
|
|||
$new_line = '';
|
||||
|
||||
$end = strlen($scanline) - ceil($width/2);
|
||||
for ($i = floor($width/2); $i < $end; $i++)
|
||||
for ($i = (int) floor($width / 2); $i < $end; $i++)
|
||||
{
|
||||
$pixel = ord($scanline{$i});
|
||||
|
||||
|
|
|
@ -206,7 +206,7 @@ class phpbb_db_driver
|
|||
$query_id = $this->query_result;
|
||||
}
|
||||
|
||||
if ($cache->sql_exists($query_id))
|
||||
if ($cache && $cache->sql_exists($query_id))
|
||||
{
|
||||
return $cache->sql_rowseek($rownum, $query_id);
|
||||
}
|
||||
|
@ -256,7 +256,7 @@ class phpbb_db_driver
|
|||
$this->sql_rowseek($rownum, $query_id);
|
||||
}
|
||||
|
||||
if (!is_object($query_id) && $cache->sql_exists($query_id))
|
||||
if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
|
||||
{
|
||||
return $cache->sql_fetchfield($query_id, $field);
|
||||
}
|
||||
|
@ -822,7 +822,7 @@ class phpbb_db_driver
|
|||
*/
|
||||
function sql_report($mode, $query = '')
|
||||
{
|
||||
global $cache, $starttime, $phpbb_root_path, $user;
|
||||
global $cache, $starttime, $phpbb_root_path, $phpbb_admin_path, $user;
|
||||
global $request;
|
||||
|
||||
if (is_object($request) && !$request->variable('explain', false))
|
||||
|
@ -852,7 +852,7 @@ class phpbb_db_driver
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>SQL Report</title>
|
||||
<link href="' . $phpbb_root_path . 'adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
<link href="' . htmlspecialchars($phpbb_admin_path) . 'style/admin.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body id="errorpage">
|
||||
<div id="wrap">
|
||||
|
|
|
@ -154,7 +154,7 @@ class phpbb_db_driver_firebird extends phpbb_db_driver
|
|||
}
|
||||
|
||||
$this->last_query_text = $query;
|
||||
$this->query_result = ($cache_ttl) ? $cache->sql_load($query) : false;
|
||||
$this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;
|
||||
$this->sql_add_num_queries($this->query_result);
|
||||
|
||||
if ($this->query_result === false)
|
||||
|
@ -267,10 +267,10 @@ class phpbb_db_driver_firebird extends phpbb_db_driver
|
|||
}
|
||||
}
|
||||
|
||||
if ($cache_ttl)
|
||||
if ($cache && $cache_ttl)
|
||||
{
|
||||
$this->open_queries[(int) $this->query_result] = $this->query_result;
|
||||
$this->query_result = $cache->sql_save($query, $this->query_result, $cache_ttl);
|
||||
$this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
|
||||
}
|
||||
else if (strpos($query, 'SELECT') === 0 && $this->query_result)
|
||||
{
|
||||
|
@ -330,7 +330,7 @@ class phpbb_db_driver_firebird extends phpbb_db_driver
|
|||
$query_id = $this->query_result;
|
||||
}
|
||||
|
||||
if ($cache->sql_exists($query_id))
|
||||
if ($cache && $cache->sql_exists($query_id))
|
||||
{
|
||||
return $cache->sql_fetchrow($query_id);
|
||||
}
|
||||
|
@ -396,7 +396,7 @@ class phpbb_db_driver_firebird extends phpbb_db_driver
|
|||
$query_id = $this->query_result;
|
||||
}
|
||||
|
||||
if ($cache->sql_exists($query_id))
|
||||
if ($cache && $cache->sql_exists($query_id))
|
||||
{
|
||||
return $cache->sql_freeresult($query_id);
|
||||
}
|
||||
|
|
|
@ -150,7 +150,7 @@ class phpbb_db_driver_mssql extends phpbb_db_driver
|
|||
$this->sql_report('start', $query);
|
||||
}
|
||||
|
||||
$this->query_result = ($cache_ttl) ? $cache->sql_load($query) : false;
|
||||
$this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;
|
||||
$this->sql_add_num_queries($this->query_result);
|
||||
|
||||
if ($this->query_result === false)
|
||||
|
@ -165,10 +165,10 @@ class phpbb_db_driver_mssql extends phpbb_db_driver
|
|||
$this->sql_report('stop', $query);
|
||||
}
|
||||
|
||||
if ($cache_ttl)
|
||||
if ($cache && $cache_ttl)
|
||||
{
|
||||
$this->open_queries[(int) $this->query_result] = $this->query_result;
|
||||
$this->query_result = $cache->sql_save($query, $this->query_result, $cache_ttl);
|
||||
$this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
|
||||
}
|
||||
else if (strpos($query, 'SELECT') === 0 && $this->query_result)
|
||||
{
|
||||
|
@ -240,7 +240,7 @@ class phpbb_db_driver_mssql extends phpbb_db_driver
|
|||
$query_id = $this->query_result;
|
||||
}
|
||||
|
||||
if ($cache->sql_exists($query_id))
|
||||
if ($cache && $cache->sql_exists($query_id))
|
||||
{
|
||||
return $cache->sql_fetchrow($query_id);
|
||||
}
|
||||
|
@ -277,7 +277,7 @@ class phpbb_db_driver_mssql extends phpbb_db_driver
|
|||
$query_id = $this->query_result;
|
||||
}
|
||||
|
||||
if ($cache->sql_exists($query_id))
|
||||
if ($cache && $cache->sql_exists($query_id))
|
||||
{
|
||||
return $cache->sql_rowseek($rownum, $query_id);
|
||||
}
|
||||
|
@ -316,7 +316,7 @@ class phpbb_db_driver_mssql extends phpbb_db_driver
|
|||
$query_id = $this->query_result;
|
||||
}
|
||||
|
||||
if ($cache->sql_exists($query_id))
|
||||
if ($cache && $cache->sql_exists($query_id))
|
||||
{
|
||||
return $cache->sql_freeresult($query_id);
|
||||
}
|
||||
|
|
|
@ -179,7 +179,7 @@ class phpbb_db_driver_mssql_odbc extends phpbb_db_driver
|
|||
}
|
||||
|
||||
$this->last_query_text = $query;
|
||||
$this->query_result = ($cache_ttl) ? $cache->sql_load($query) : false;
|
||||
$this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;
|
||||
$this->sql_add_num_queries($this->query_result);
|
||||
|
||||
if ($this->query_result === false)
|
||||
|
@ -194,10 +194,10 @@ class phpbb_db_driver_mssql_odbc extends phpbb_db_driver
|
|||
$this->sql_report('stop', $query);
|
||||
}
|
||||
|
||||
if ($cache_ttl)
|
||||
if ($cache && $cache_ttl)
|
||||
{
|
||||
$this->open_queries[(int) $this->query_result] = $this->query_result;
|
||||
$this->query_result = $cache->sql_save($query, $this->query_result, $cache_ttl);
|
||||
$this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
|
||||
}
|
||||
else if (strpos($query, 'SELECT') === 0 && $this->query_result)
|
||||
{
|
||||
|
@ -270,7 +270,7 @@ class phpbb_db_driver_mssql_odbc extends phpbb_db_driver
|
|||
$query_id = $this->query_result;
|
||||
}
|
||||
|
||||
if ($cache->sql_exists($query_id))
|
||||
if ($cache && $cache->sql_exists($query_id))
|
||||
{
|
||||
return $cache->sql_fetchrow($query_id);
|
||||
}
|
||||
|
@ -311,7 +311,7 @@ class phpbb_db_driver_mssql_odbc extends phpbb_db_driver
|
|||
$query_id = $this->query_result;
|
||||
}
|
||||
|
||||
if ($cache->sql_exists($query_id))
|
||||
if ($cache && $cache->sql_exists($query_id))
|
||||
{
|
||||
return $cache->sql_freeresult($query_id);
|
||||
}
|
||||
|
|
|
@ -317,7 +317,7 @@ class phpbb_db_driver_mssqlnative extends phpbb_db_driver
|
|||
}
|
||||
|
||||
$this->last_query_text = $query;
|
||||
$this->query_result = ($cache_ttl) ? $cache->sql_load($query) : false;
|
||||
$this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;
|
||||
$this->sql_add_num_queries($this->query_result);
|
||||
|
||||
if ($this->query_result === false)
|
||||
|
@ -337,7 +337,7 @@ class phpbb_db_driver_mssqlnative extends phpbb_db_driver
|
|||
if ($cache_ttl)
|
||||
{
|
||||
$this->open_queries[(int) $this->query_result] = $this->query_result;
|
||||
$this->query_result = $cache->sql_save($query, $this->query_result, $cache_ttl);
|
||||
$this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
|
||||
}
|
||||
else if (strpos($query, 'SELECT') === 0 && $this->query_result)
|
||||
{
|
||||
|
|
|
@ -188,7 +188,7 @@ class phpbb_db_driver_mysql extends phpbb_db_driver
|
|||
$this->sql_report('start', $query);
|
||||
}
|
||||
|
||||
$this->query_result = ($cache_ttl) ? $cache->sql_load($query) : false;
|
||||
$this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;
|
||||
$this->sql_add_num_queries($this->query_result);
|
||||
|
||||
if ($this->query_result === false)
|
||||
|
@ -203,10 +203,10 @@ class phpbb_db_driver_mysql extends phpbb_db_driver
|
|||
$this->sql_report('stop', $query);
|
||||
}
|
||||
|
||||
if ($cache_ttl)
|
||||
if ($cache && $cache_ttl)
|
||||
{
|
||||
$this->open_queries[(int) $this->query_result] = $this->query_result;
|
||||
$this->query_result = $cache->sql_save($query, $this->query_result, $cache_ttl);
|
||||
$this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
|
||||
}
|
||||
else if (strpos($query, 'SELECT') === 0 && $this->query_result)
|
||||
{
|
||||
|
@ -265,7 +265,7 @@ class phpbb_db_driver_mysql extends phpbb_db_driver
|
|||
$query_id = $this->query_result;
|
||||
}
|
||||
|
||||
if ($cache->sql_exists($query_id))
|
||||
if ($cache && $cache->sql_exists($query_id))
|
||||
{
|
||||
return $cache->sql_fetchrow($query_id);
|
||||
}
|
||||
|
@ -286,7 +286,7 @@ class phpbb_db_driver_mysql extends phpbb_db_driver
|
|||
$query_id = $this->query_result;
|
||||
}
|
||||
|
||||
if ($cache->sql_exists($query_id))
|
||||
if ($cache && $cache->sql_exists($query_id))
|
||||
{
|
||||
return $cache->sql_rowseek($rownum, $query_id);
|
||||
}
|
||||
|
@ -314,7 +314,7 @@ class phpbb_db_driver_mysql extends phpbb_db_driver
|
|||
$query_id = $this->query_result;
|
||||
}
|
||||
|
||||
if ($cache->sql_exists($query_id))
|
||||
if ($cache && $cache->sql_exists($query_id))
|
||||
{
|
||||
return $cache->sql_freeresult($query_id);
|
||||
}
|
||||
|
|
|
@ -184,7 +184,7 @@ class phpbb_db_driver_mysqli extends phpbb_db_driver
|
|||
$this->sql_report('start', $query);
|
||||
}
|
||||
|
||||
$this->query_result = ($cache_ttl) ? $cache->sql_load($query) : false;
|
||||
$this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;
|
||||
$this->sql_add_num_queries($this->query_result);
|
||||
|
||||
if ($this->query_result === false)
|
||||
|
@ -199,9 +199,9 @@ class phpbb_db_driver_mysqli extends phpbb_db_driver
|
|||
$this->sql_report('stop', $query);
|
||||
}
|
||||
|
||||
if ($cache_ttl)
|
||||
if ($cache && $cache_ttl)
|
||||
{
|
||||
$this->query_result = $cache->sql_save($query, $this->query_result, $cache_ttl);
|
||||
$this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
|
||||
}
|
||||
}
|
||||
else if (defined('DEBUG'))
|
||||
|
@ -256,7 +256,7 @@ class phpbb_db_driver_mysqli extends phpbb_db_driver
|
|||
$query_id = $this->query_result;
|
||||
}
|
||||
|
||||
if (!is_object($query_id) && $cache->sql_exists($query_id))
|
||||
if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
|
||||
{
|
||||
return $cache->sql_fetchrow($query_id);
|
||||
}
|
||||
|
@ -283,7 +283,7 @@ class phpbb_db_driver_mysqli extends phpbb_db_driver
|
|||
$query_id = $this->query_result;
|
||||
}
|
||||
|
||||
if (!is_object($query_id) && $cache->sql_exists($query_id))
|
||||
if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
|
||||
{
|
||||
return $cache->sql_rowseek($rownum, $query_id);
|
||||
}
|
||||
|
@ -311,7 +311,7 @@ class phpbb_db_driver_mysqli extends phpbb_db_driver
|
|||
$query_id = $this->query_result;
|
||||
}
|
||||
|
||||
if (!is_object($query_id) && $cache->sql_exists($query_id))
|
||||
if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
|
||||
{
|
||||
return $cache->sql_freeresult($query_id);
|
||||
}
|
||||
|
|
|
@ -267,7 +267,7 @@ class phpbb_db_driver_oracle extends phpbb_db_driver
|
|||
}
|
||||
|
||||
$this->last_query_text = $query;
|
||||
$this->query_result = ($cache_ttl) ? $cache->sql_load($query) : false;
|
||||
$this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;
|
||||
$this->sql_add_num_queries($this->query_result);
|
||||
|
||||
if ($this->query_result === false)
|
||||
|
@ -443,10 +443,10 @@ class phpbb_db_driver_oracle extends phpbb_db_driver
|
|||
$this->sql_report('stop', $query);
|
||||
}
|
||||
|
||||
if ($cache_ttl)
|
||||
if ($cache && $cache_ttl)
|
||||
{
|
||||
$this->open_queries[(int) $this->query_result] = $this->query_result;
|
||||
$this->query_result = $cache->sql_save($query, $this->query_result, $cache_ttl);
|
||||
$this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
|
||||
}
|
||||
else if (strpos($query, 'SELECT') === 0 && $this->query_result)
|
||||
{
|
||||
|
@ -498,7 +498,7 @@ class phpbb_db_driver_oracle extends phpbb_db_driver
|
|||
$query_id = $this->query_result;
|
||||
}
|
||||
|
||||
if ($cache->sql_exists($query_id))
|
||||
if ($cache && $cache->sql_exists($query_id))
|
||||
{
|
||||
return $cache->sql_fetchrow($query_id);
|
||||
}
|
||||
|
@ -550,7 +550,7 @@ class phpbb_db_driver_oracle extends phpbb_db_driver
|
|||
$query_id = $this->query_result;
|
||||
}
|
||||
|
||||
if ($cache->sql_exists($query_id))
|
||||
if ($cache && $cache->sql_exists($query_id))
|
||||
{
|
||||
return $cache->sql_rowseek($rownum, $query_id);
|
||||
}
|
||||
|
@ -619,7 +619,7 @@ class phpbb_db_driver_oracle extends phpbb_db_driver
|
|||
$query_id = $this->query_result;
|
||||
}
|
||||
|
||||
if ($cache->sql_exists($query_id))
|
||||
if ($cache && $cache->sql_exists($query_id))
|
||||
{
|
||||
return $cache->sql_freeresult($query_id);
|
||||
}
|
||||
|
|
|
@ -193,7 +193,7 @@ class phpbb_db_driver_postgres extends phpbb_db_driver
|
|||
}
|
||||
|
||||
$this->last_query_text = $query;
|
||||
$this->query_result = ($cache_ttl) ? $cache->sql_load($query) : false;
|
||||
$this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;
|
||||
$this->sql_add_num_queries($this->query_result);
|
||||
|
||||
if ($this->query_result === false)
|
||||
|
@ -208,10 +208,10 @@ class phpbb_db_driver_postgres extends phpbb_db_driver
|
|||
$this->sql_report('stop', $query);
|
||||
}
|
||||
|
||||
if ($cache_ttl)
|
||||
if ($cache && $cache_ttl)
|
||||
{
|
||||
$this->open_queries[(int) $this->query_result] = $this->query_result;
|
||||
$this->query_result = $cache->sql_save($query, $this->query_result, $cache_ttl);
|
||||
$this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
|
||||
}
|
||||
else if (strpos($query, 'SELECT') === 0 && $this->query_result)
|
||||
{
|
||||
|
@ -278,7 +278,7 @@ class phpbb_db_driver_postgres extends phpbb_db_driver
|
|||
$query_id = $this->query_result;
|
||||
}
|
||||
|
||||
if ($cache->sql_exists($query_id))
|
||||
if ($cache && $cache->sql_exists($query_id))
|
||||
{
|
||||
return $cache->sql_fetchrow($query_id);
|
||||
}
|
||||
|
@ -299,7 +299,7 @@ class phpbb_db_driver_postgres extends phpbb_db_driver
|
|||
$query_id = $this->query_result;
|
||||
}
|
||||
|
||||
if ($cache->sql_exists($query_id))
|
||||
if ($cache && $cache->sql_exists($query_id))
|
||||
{
|
||||
return $cache->sql_rowseek($rownum, $query_id);
|
||||
}
|
||||
|
@ -348,7 +348,7 @@ class phpbb_db_driver_postgres extends phpbb_db_driver
|
|||
$query_id = $this->query_result;
|
||||
}
|
||||
|
||||
if ($cache->sql_exists($query_id))
|
||||
if ($cache && $cache->sql_exists($query_id))
|
||||
{
|
||||
return $cache->sql_freeresult($query_id);
|
||||
}
|
||||
|
|
|
@ -134,7 +134,7 @@ class phpbb_db_driver_sqlite extends phpbb_db_driver
|
|||
$this->sql_report('start', $query);
|
||||
}
|
||||
|
||||
$this->query_result = ($cache_ttl) ? $cache->sql_load($query) : false;
|
||||
$this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;
|
||||
$this->sql_add_num_queries($this->query_result);
|
||||
|
||||
if ($this->query_result === false)
|
||||
|
@ -149,10 +149,10 @@ class phpbb_db_driver_sqlite extends phpbb_db_driver
|
|||
$this->sql_report('stop', $query);
|
||||
}
|
||||
|
||||
if ($cache_ttl)
|
||||
if ($cache && $cache_ttl)
|
||||
{
|
||||
$this->open_queries[(int) $this->query_result] = $this->query_result;
|
||||
$this->query_result = $cache->sql_save($query, $this->query_result, $cache_ttl);
|
||||
$this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
|
||||
}
|
||||
else if (strpos($query, 'SELECT') === 0 && $this->query_result)
|
||||
{
|
||||
|
@ -210,7 +210,7 @@ class phpbb_db_driver_sqlite extends phpbb_db_driver
|
|||
$query_id = $this->query_result;
|
||||
}
|
||||
|
||||
if ($cache->sql_exists($query_id))
|
||||
if ($cache && $cache->sql_exists($query_id))
|
||||
{
|
||||
return $cache->sql_fetchrow($query_id);
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ class phpbb_db_driver_sqlite extends phpbb_db_driver
|
|||
$query_id = $this->query_result;
|
||||
}
|
||||
|
||||
if ($cache->sql_exists($query_id))
|
||||
if ($cache && $cache->sql_exists($query_id))
|
||||
{
|
||||
return $cache->sql_rowseek($rownum, $query_id);
|
||||
}
|
||||
|
@ -259,7 +259,7 @@ class phpbb_db_driver_sqlite extends phpbb_db_driver
|
|||
$query_id = $this->query_result;
|
||||
}
|
||||
|
||||
if ($cache->sql_exists($query_id))
|
||||
if ($cache && $cache->sql_exists($query_id))
|
||||
{
|
||||
return $cache->sql_freeresult($query_id);
|
||||
}
|
||||
|
|
|
@ -42,6 +42,7 @@ class phpbb_di_extension_config extends Extension
|
|||
{
|
||||
require($this->config_file);
|
||||
|
||||
$container->setParameter('core.adm_relative_path', (isset($phpbb_adm_relative_path) ? $phpbb_adm_relative_path : 'adm/'));
|
||||
$container->setParameter('core.table_prefix', $table_prefix);
|
||||
$container->setParameter('cache.driver.class', $this->convert_30_acm_type($acm_type));
|
||||
$container->setParameter('dbal.driver.class', phpbb_convert_30_dbms_to_31($dbms));
|
||||
|
|
|
@ -45,7 +45,9 @@ interface phpbb_extension_interface
|
|||
*
|
||||
* @param mixed $old_state The return value of the previous call
|
||||
* of this method, or false on the first call
|
||||
* @return null
|
||||
* @return mixed Returns false after last step, otherwise
|
||||
* temporary state which is passed as an
|
||||
* argument to the next step
|
||||
*/
|
||||
public function disable_step($old_state);
|
||||
|
||||
|
|
|
@ -384,7 +384,7 @@ class phpbb_extension_manager
|
|||
}
|
||||
|
||||
$iterator = new RecursiveIteratorIterator(
|
||||
new RecursiveDirectoryIterator($this->phpbb_root_path . 'ext/'),
|
||||
new RecursiveDirectoryIterator($this->phpbb_root_path . 'ext/', FilesystemIterator::NEW_CURRENT_AND_KEY | FilesystemIterator::FOLLOW_SYMLINKS),
|
||||
RecursiveIteratorIterator::SELF_FIRST);
|
||||
foreach ($iterator as $file_info)
|
||||
{
|
||||
|
|
|
@ -5417,7 +5417,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
|
|||
function page_footer($run_cron = true, $display_template = true, $exit_handler = true)
|
||||
{
|
||||
global $db, $config, $template, $user, $auth, $cache, $starttime, $phpbb_root_path, $phpEx;
|
||||
global $request, $phpbb_dispatcher;
|
||||
global $request, $phpbb_dispatcher, $phpbb_admin_path;
|
||||
|
||||
// A listener can set this variable to `true` when it overrides this function
|
||||
$page_footer_override = false;
|
||||
|
@ -5473,7 +5473,7 @@ function page_footer($run_cron = true, $display_template = true, $exit_handler =
|
|||
'TRANSLATION_INFO' => (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '',
|
||||
'CREDIT_LINE' => $user->lang('POWERED_BY', '<a href="https://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Group'),
|
||||
|
||||
'U_ACP' => ($auth->acl_get('a_') && !empty($user->data['is_registered'])) ? append_sid("{$phpbb_root_path}adm/index.$phpEx", false, true, $user->session_id) : '')
|
||||
'U_ACP' => ($auth->acl_get('a_') && !empty($user->data['is_registered'])) ? append_sid("{$phpbb_admin_path}index.$phpEx", false, true, $user->session_id) : '')
|
||||
);
|
||||
|
||||
// Call cron-type script
|
||||
|
|
|
@ -82,16 +82,16 @@ function adm_page_header($page_title)
|
|||
'T_RANKS_PATH' => "{$phpbb_root_path}{$config['ranks_path']}/",
|
||||
'T_UPLOAD_PATH' => "{$phpbb_root_path}{$config['upload_path']}/",
|
||||
|
||||
'ICON_MOVE_UP' => '<img src="' . $phpbb_admin_path . 'images/icon_up.gif" alt="' . $user->lang['MOVE_UP'] . '" title="' . $user->lang['MOVE_UP'] . '" />',
|
||||
'ICON_MOVE_UP_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_up_disabled.gif" alt="' . $user->lang['MOVE_UP'] . '" title="' . $user->lang['MOVE_UP'] . '" />',
|
||||
'ICON_MOVE_DOWN' => '<img src="' . $phpbb_admin_path . 'images/icon_down.gif" alt="' . $user->lang['MOVE_DOWN'] . '" title="' . $user->lang['MOVE_DOWN'] . '" />',
|
||||
'ICON_MOVE_DOWN_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_down_disabled.gif" alt="' . $user->lang['MOVE_DOWN'] . '" title="' . $user->lang['MOVE_DOWN'] . '" />',
|
||||
'ICON_EDIT' => '<img src="' . $phpbb_admin_path . 'images/icon_edit.gif" alt="' . $user->lang['EDIT'] . '" title="' . $user->lang['EDIT'] . '" />',
|
||||
'ICON_EDIT_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_edit_disabled.gif" alt="' . $user->lang['EDIT'] . '" title="' . $user->lang['EDIT'] . '" />',
|
||||
'ICON_DELETE' => '<img src="' . $phpbb_admin_path . 'images/icon_delete.gif" alt="' . $user->lang['DELETE'] . '" title="' . $user->lang['DELETE'] . '" />',
|
||||
'ICON_DELETE_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_delete_disabled.gif" alt="' . $user->lang['DELETE'] . '" title="' . $user->lang['DELETE'] . '" />',
|
||||
'ICON_SYNC' => '<img src="' . $phpbb_admin_path . 'images/icon_sync.gif" alt="' . $user->lang['RESYNC'] . '" title="' . $user->lang['RESYNC'] . '" />',
|
||||
'ICON_SYNC_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_sync_disabled.gif" alt="' . $user->lang['RESYNC'] . '" title="' . $user->lang['RESYNC'] . '" />',
|
||||
'ICON_MOVE_UP' => '<img src="' . htmlspecialchars($phpbb_admin_path) . 'images/icon_up.gif" alt="' . $user->lang['MOVE_UP'] . '" title="' . $user->lang['MOVE_UP'] . '" />',
|
||||
'ICON_MOVE_UP_DISABLED' => '<img src="' . htmlspecialchars($phpbb_admin_path) . 'images/icon_up_disabled.gif" alt="' . $user->lang['MOVE_UP'] . '" title="' . $user->lang['MOVE_UP'] . '" />',
|
||||
'ICON_MOVE_DOWN' => '<img src="' . htmlspecialchars($phpbb_admin_path) . 'images/icon_down.gif" alt="' . $user->lang['MOVE_DOWN'] . '" title="' . $user->lang['MOVE_DOWN'] . '" />',
|
||||
'ICON_MOVE_DOWN_DISABLED' => '<img src="' . htmlspecialchars($phpbb_admin_path) . 'images/icon_down_disabled.gif" alt="' . $user->lang['MOVE_DOWN'] . '" title="' . $user->lang['MOVE_DOWN'] . '" />',
|
||||
'ICON_EDIT' => '<img src="' . htmlspecialchars($phpbb_admin_path) . 'images/icon_edit.gif" alt="' . $user->lang['EDIT'] . '" title="' . $user->lang['EDIT'] . '" />',
|
||||
'ICON_EDIT_DISABLED' => '<img src="' . htmlspecialchars($phpbb_admin_path) . 'images/icon_edit_disabled.gif" alt="' . $user->lang['EDIT'] . '" title="' . $user->lang['EDIT'] . '" />',
|
||||
'ICON_DELETE' => '<img src="' . htmlspecialchars($phpbb_admin_path) . 'images/icon_delete.gif" alt="' . $user->lang['DELETE'] . '" title="' . $user->lang['DELETE'] . '" />',
|
||||
'ICON_DELETE_DISABLED' => '<img src="' . htmlspecialchars($phpbb_admin_path) . 'images/icon_delete_disabled.gif" alt="' . $user->lang['DELETE'] . '" title="' . $user->lang['DELETE'] . '" />',
|
||||
'ICON_SYNC' => '<img src="' . htmlspecialchars($phpbb_admin_path) . 'images/icon_sync.gif" alt="' . $user->lang['RESYNC'] . '" title="' . $user->lang['RESYNC'] . '" />',
|
||||
'ICON_SYNC_DISABLED' => '<img src="' . htmlspecialchars($phpbb_admin_path) . 'images/icon_sync_disabled.gif" alt="' . $user->lang['RESYNC'] . '" title="' . $user->lang['RESYNC'] . '" />',
|
||||
|
||||
'S_USER_LANG' => $user->lang['USER_LANG'],
|
||||
'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
|
||||
|
|
|
@ -2310,13 +2310,17 @@ function auto_prune($forum_id, $prune_mode, $prune_flags, $prune_days, $prune_fr
|
|||
}
|
||||
|
||||
/**
|
||||
* Cache moderators, called whenever permissions are changed via admin_permissions. Changes of username
|
||||
* and group names must be carried through for the moderators table
|
||||
* Cache moderators. Called whenever permissions are changed
|
||||
* via admin_permissions. Changes of usernames and group names
|
||||
* must be carried through for the moderators table.
|
||||
*
|
||||
* @param phpbb_db_driver $db Database connection
|
||||
* @param phpbb_cache_driver_interface Cache driver
|
||||
* @param phpbb_auth $auth Authentication object
|
||||
* @return null
|
||||
*/
|
||||
function cache_moderators()
|
||||
function phpbb_cache_moderators($db, $cache, $auth)
|
||||
{
|
||||
global $db, $cache, $auth, $phpbb_root_path, $phpEx;
|
||||
|
||||
// Remove cached sql results
|
||||
$cache->destroy('sql', MODERATOR_CACHE_TABLE);
|
||||
|
||||
|
@ -2486,6 +2490,20 @@ function cache_moderators()
|
|||
$db->sql_multi_insert(MODERATOR_CACHE_TABLE, $sql_ary);
|
||||
}
|
||||
|
||||
/**
|
||||
* Cache moderators. Called whenever permissions are changed
|
||||
* via admin_permissions. Changes of usernames and group names
|
||||
* must be carried through for the moderators table.
|
||||
*
|
||||
* @deprecated 3.1
|
||||
* @return null
|
||||
*/
|
||||
function cache_moderators()
|
||||
{
|
||||
global $db, $cache, $auth;
|
||||
return phpbb_cache_moderators($db, $cache, $auth);
|
||||
}
|
||||
|
||||
/**
|
||||
* View log
|
||||
* If $log_count is set to false, we will skip counting all entries in the database.
|
||||
|
@ -2758,12 +2776,16 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id
|
|||
}
|
||||
|
||||
/**
|
||||
* Update foes - remove moderators and administrators from foe lists...
|
||||
* Removes moderators and administrators from foe lists.
|
||||
*
|
||||
* @param phpbb_db_driver $db Database connection
|
||||
* @param phpbb_auth $auth Authentication object
|
||||
* @param array|bool $group_id If an array, remove all members of this group from foe lists, or false to ignore
|
||||
* @param array|bool $user_id If an array, remove this user from foe lists, or false to ignore
|
||||
* @return null
|
||||
*/
|
||||
function update_foes($group_id = false, $user_id = false)
|
||||
function phpbb_update_foes($db, $auth, $group_id = false, $user_id = false)
|
||||
{
|
||||
global $db, $auth;
|
||||
|
||||
// update foes for some user
|
||||
if (is_array($user_id) && sizeof($user_id))
|
||||
{
|
||||
|
@ -2872,6 +2894,20 @@ function update_foes($group_id = false, $user_id = false)
|
|||
unset($perms);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes moderators and administrators from foe lists.
|
||||
*
|
||||
* @deprecated 3.1
|
||||
* @param array|bool $group_id If an array, remove all members of this group from foe lists, or false to ignore
|
||||
* @param array|bool $user_id If an array, remove this user from foe lists, or false to ignore
|
||||
* @return null
|
||||
*/
|
||||
function update_foes($group_id = false, $user_id = false)
|
||||
{
|
||||
global $db, $auth;
|
||||
return phpbb_update_foes($db, $auth, $group_id, $user_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists inactive users
|
||||
*/
|
||||
|
|
|
@ -105,6 +105,15 @@ function phpbb_create_compiled_container(array $extensions, array $passes, $phpb
|
|||
return $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a compiled and dumped ContainerBuilder object
|
||||
*
|
||||
* @param array $extensions Array of Container extension objects
|
||||
* @param array $passes Array of Compiler Pass objects
|
||||
* @param string $phpbb_root_path Root path
|
||||
* @param string $php_ext PHP Extension
|
||||
* @return ContainerBuilder object (compiled)
|
||||
*/
|
||||
function phpbb_create_dumped_container(array $extensions, array $passes, $phpbb_root_path, $php_ext)
|
||||
{
|
||||
// Check for our cached container; if it exists, use it
|
||||
|
@ -129,12 +138,60 @@ function phpbb_create_dumped_container(array $extensions, array $passes, $phpbb_
|
|||
return $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an environment-specific ContainerBuilder object
|
||||
*
|
||||
* If debug is enabled, the container is re-compiled every time.
|
||||
* This ensures that the latest changes will always be reflected
|
||||
* during development.
|
||||
*
|
||||
* Otherwise it will get the existing dumped container and use
|
||||
* that one instead.
|
||||
*
|
||||
* @param array $extensions Array of Container extension objects
|
||||
* @param array $passes Array of Compiler Pass objects
|
||||
* @param string $phpbb_root_path Root path
|
||||
* @param string $php_ext PHP Extension
|
||||
* @return ContainerBuilder object (compiled)
|
||||
*/
|
||||
function phpbb_create_dumped_container_unless_debug(array $extensions, array $passes, $phpbb_root_path, $php_ext)
|
||||
{
|
||||
$container_factory = defined('DEBUG') ? 'phpbb_create_compiled_container' : 'phpbb_create_dumped_container';
|
||||
return $container_factory($extensions, $passes, $phpbb_root_path, $php_ext);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a default ContainerBuilder object
|
||||
*
|
||||
* Contains the default configuration of the phpBB container.
|
||||
*
|
||||
* @param array $extensions Array of Container extension objects
|
||||
* @param array $passes Array of Compiler Pass objects
|
||||
* @return ContainerBuilder object (compiled)
|
||||
*/
|
||||
function phpbb_create_default_container($phpbb_root_path, $php_ext)
|
||||
{
|
||||
return phpbb_create_dumped_container_unless_debug(
|
||||
array(
|
||||
new phpbb_di_extension_config($phpbb_root_path . 'config.' . $php_ext),
|
||||
new phpbb_di_extension_core($phpbb_root_path),
|
||||
),
|
||||
array(
|
||||
new phpbb_di_pass_collection_pass(),
|
||||
new phpbb_di_pass_kernel_pass(),
|
||||
),
|
||||
$phpbb_root_path,
|
||||
$php_ext
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the filename under which the dumped container will be stored.
|
||||
*
|
||||
* @param string $phpbb_root_path Root path
|
||||
* @param string $php_ext PHP Extension
|
||||
* @return Path for dumped container
|
||||
*/
|
||||
function phpbb_container_filename($phpbb_root_path, $php_ext)
|
||||
{
|
||||
$filename = str_replace(array('/', '.'), array('slash', 'dot'), $phpbb_root_path);
|
||||
|
|
|
@ -61,6 +61,20 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
|||
{
|
||||
markread('all', false, false, request_var('mark_time', 0));
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
// Tell the ajax script what language vars and URL need to be replaced
|
||||
$data = array(
|
||||
'NO_UNREAD_POSTS' => $user->lang['NO_UNREAD_POSTS'],
|
||||
'UNREAD_POSTS' => $user->lang['UNREAD_POSTS'],
|
||||
'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}index.$phpEx", 'hash=' . generate_link_hash('global') . '&mark=forums&mark_time=' . time()) : '',
|
||||
'MESSAGE_TITLE' => $user->lang['INFORMATION'],
|
||||
'MESSAGE_TEXT' => $user->lang['FORUMS_MARKED']
|
||||
);
|
||||
$json_response = new phpbb_json_response();
|
||||
$json_response->send($data);
|
||||
}
|
||||
|
||||
trigger_error(
|
||||
$user->lang['FORUMS_MARKED'] . '<br /><br />' .
|
||||
sprintf($user->lang['RETURN_INDEX'], '<a href="' . $redirect . '">', '</a>')
|
||||
|
@ -313,6 +327,20 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
|||
$message = sprintf($user->lang['RETURN_FORUM'], '<a href="' . $redirect . '">', '</a>');
|
||||
meta_refresh(3, $redirect);
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
// Tell the ajax script what language vars and URL need to be replaced
|
||||
$data = array(
|
||||
'NO_UNREAD_POSTS' => $user->lang['NO_UNREAD_POSTS'],
|
||||
'UNREAD_POSTS' => $user->lang['UNREAD_POSTS'],
|
||||
'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . '&f=' . $root_data['forum_id'] . '&mark=forums&mark_time=' . time()) : '',
|
||||
'MESSAGE_TITLE' => $user->lang['INFORMATION'],
|
||||
'MESSAGE_TEXT' => $user->lang['FORUMS_MARKED']
|
||||
);
|
||||
$json_response = new phpbb_json_response();
|
||||
$json_response->send($data);
|
||||
}
|
||||
|
||||
trigger_error($user->lang['FORUMS_MARKED'] . '<br /><br />' . $message);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -32,6 +32,8 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20
|
|||
'AVAILABLE' => true,
|
||||
'2.0.x' => false,
|
||||
),
|
||||
// Note: php 5.5 alpha 2 deprecated mysql.
|
||||
// Keep mysqli before mysql in this list.
|
||||
'mysqli' => array(
|
||||
'LABEL' => 'MySQL with MySQLi Extension',
|
||||
'SCHEMA' => 'mysql_41',
|
||||
|
@ -508,6 +510,9 @@ function phpbb_create_config_file_data($data, $dbms, $debug = false, $debug_test
|
|||
'dbuser' => $data['dbuser'],
|
||||
'dbpasswd' => htmlspecialchars_decode($data['dbpasswd']),
|
||||
'table_prefix' => $data['table_prefix'],
|
||||
|
||||
'adm_relative_path' => 'adm/',
|
||||
|
||||
'acm_type' => 'phpbb_cache_driver_file',
|
||||
);
|
||||
|
||||
|
|
|
@ -1463,8 +1463,9 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
// The variable name should be $post_approved, because it indicates if the post is approved or not
|
||||
$post_approval = 1;
|
||||
|
||||
// Check the permissions for post approval. Moderators are not affected.
|
||||
if (!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id']))
|
||||
// Check the permissions for post approval.
|
||||
// Moderators must go through post approval like ordinary users.
|
||||
if (!$auth->acl_get('f_noapprove', $data['forum_id']))
|
||||
{
|
||||
// Post not approved, but in queue
|
||||
$post_approval = 0;
|
||||
|
|
|
@ -70,7 +70,7 @@ class filespec
|
|||
$this->mimetype = 'application/octetstream';
|
||||
}
|
||||
|
||||
$this->extension = strtolower($this->get_extension($this->realname));
|
||||
$this->extension = strtolower(self::get_extension($this->realname));
|
||||
|
||||
// Try to get real filesize from temporary folder (not always working) ;)
|
||||
$this->filesize = (@filesize($this->filename)) ? @filesize($this->filename) : $this->filesize;
|
||||
|
@ -187,8 +187,11 @@ class filespec
|
|||
|
||||
/**
|
||||
* Get file extension
|
||||
*
|
||||
* @param string Filename that needs to be checked
|
||||
* @return string Extension of the supplied filename
|
||||
*/
|
||||
function get_extension($filename)
|
||||
static public function get_extension($filename)
|
||||
{
|
||||
if (strpos($filename, '.') === false)
|
||||
{
|
||||
|
@ -369,7 +372,7 @@ class filespec
|
|||
}
|
||||
|
||||
// Check image type
|
||||
$types = $this->upload->image_types();
|
||||
$types = fileupload::image_types();
|
||||
|
||||
if (!isset($types[$this->image_info[2]]) || !in_array($this->extension, $types[$this->image_info[2]]))
|
||||
{
|
||||
|
@ -1019,9 +1022,11 @@ class fileupload
|
|||
}
|
||||
|
||||
/**
|
||||
* Return image type/extension mapping
|
||||
* Get image type/extension mapping
|
||||
*
|
||||
* @return array Array containing the image types and their extensions
|
||||
*/
|
||||
function image_types()
|
||||
static public function image_types()
|
||||
{
|
||||
return array(
|
||||
IMAGETYPE_GIF => array('gif'),
|
||||
|
|
|
@ -2842,7 +2842,7 @@ function avatar_remove_db($avatar_name)
|
|||
*/
|
||||
function group_delete($group_id, $group_name = false)
|
||||
{
|
||||
global $db, $phpbb_root_path, $phpEx, $phpbb_dispatcher;
|
||||
global $db, $cache, $auth, $phpbb_root_path, $phpEx, $phpbb_dispatcher;
|
||||
|
||||
if (!$group_name)
|
||||
{
|
||||
|
@ -2913,12 +2913,12 @@ function group_delete($group_id, $group_name = false)
|
|||
extract($phpbb_dispatcher->trigger_event('core.delete_group_after', compact($vars)));
|
||||
|
||||
// Re-cache moderators
|
||||
if (!function_exists('cache_moderators'))
|
||||
if (!function_exists('phpbb_cache_moderators'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
}
|
||||
|
||||
cache_moderators();
|
||||
phpbb_cache_moderators($db, $cache, $auth);
|
||||
|
||||
add_log('admin', 'LOG_GROUP_DELETE', $group_name);
|
||||
|
||||
|
@ -3463,7 +3463,7 @@ function group_validate_groupname($group_id, $group_name)
|
|||
*/
|
||||
function group_set_user_default($group_id, $user_id_ary, $group_attributes = false, $update_listing = false)
|
||||
{
|
||||
global $cache, $db, $phpbb_dispatcher;
|
||||
global $phpbb_container, $db, $phpbb_dispatcher;
|
||||
|
||||
if (empty($user_id_ary))
|
||||
{
|
||||
|
@ -3579,7 +3579,7 @@ function group_set_user_default($group_id, $user_id_ary, $group_attributes = fal
|
|||
}
|
||||
|
||||
// Because some tables/caches use usercolour-specific data we need to purge this here.
|
||||
$cache->destroy('sql', MODERATOR_CACHE_TABLE);
|
||||
$phpbb_container->get('cache.driver')->destroy('sql', MODERATOR_CACHE_TABLE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3678,7 +3678,7 @@ function group_memberships($group_id_ary = false, $user_id_ary = false, $return_
|
|||
*/
|
||||
function group_update_listings($group_id)
|
||||
{
|
||||
global $auth;
|
||||
global $db, $cache, $auth;
|
||||
|
||||
$hold_ary = $auth->acl_group_raw_data($group_id, array('a_', 'm_'));
|
||||
|
||||
|
@ -3720,22 +3720,22 @@ function group_update_listings($group_id)
|
|||
|
||||
if ($mod_permissions)
|
||||
{
|
||||
if (!function_exists('cache_moderators'))
|
||||
if (!function_exists('phpbb_cache_moderators'))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
}
|
||||
cache_moderators();
|
||||
phpbb_cache_moderators($db, $cache, $auth);
|
||||
}
|
||||
|
||||
if ($mod_permissions || $admin_permissions)
|
||||
{
|
||||
if (!function_exists('update_foes'))
|
||||
if (!function_exists('phpbb_update_foes'))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
}
|
||||
update_foes(array($group_id));
|
||||
phpbb_update_foes($db, $auth, array($group_id));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
84
phpBB/includes/hook/finder.php
Normal file
84
phpBB/includes/hook/finder.php
Normal file
|
@ -0,0 +1,84 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package extension
|
||||
* @copyright (c) 2013 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* The hook finder locates installed hooks.
|
||||
*
|
||||
* @package phpBB3
|
||||
*/
|
||||
class phpbb_hook_finder
|
||||
{
|
||||
protected $phpbb_root_path;
|
||||
protected $cache;
|
||||
protected $php_ext;
|
||||
|
||||
/**
|
||||
* Creates a new finder instance.
|
||||
*
|
||||
* @param string $phpbb_root_path Path to the phpbb root directory
|
||||
* @param string $php_ext php file extension
|
||||
* @param phpbb_cache_driver_interface $cache A cache instance or null
|
||||
*/
|
||||
public function __construct($phpbb_root_path, $php_ext, phpbb_cache_driver_interface $cache = null)
|
||||
{
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
$this->cache = $cache;
|
||||
$this->php_ext = $php_ext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds all hook files.
|
||||
*
|
||||
* @param bool $cache Whether the result should be cached
|
||||
* @return array An array of paths to found hook files
|
||||
*/
|
||||
public function find($cache = true)
|
||||
{
|
||||
if (!defined('DEBUG') && $cache && $this->cache)
|
||||
{
|
||||
$hook_files = $this->cache->get('_hooks');
|
||||
if ($hook_files !== false)
|
||||
{
|
||||
return $hook_files;
|
||||
}
|
||||
}
|
||||
|
||||
$hook_files = array();
|
||||
|
||||
// Now search for hooks...
|
||||
$dh = @opendir($this->phpbb_root_path . 'includes/hooks/');
|
||||
|
||||
if ($dh)
|
||||
{
|
||||
while (($file = readdir($dh)) !== false)
|
||||
{
|
||||
if (strpos($file, 'hook_') === 0 && substr($file, -(strlen($this->php_ext) + 1)) === '.' . $this->php_ext)
|
||||
{
|
||||
$hook_files[] = substr($file, 0, -(strlen($this->php_ext) + 1));
|
||||
}
|
||||
}
|
||||
closedir($dh);
|
||||
}
|
||||
|
||||
if ($cache && $this->cache)
|
||||
{
|
||||
$this->cache->put('_hooks', $hook_files);
|
||||
}
|
||||
|
||||
return $hook_files;
|
||||
}
|
||||
}
|
|
@ -430,13 +430,17 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id)
|
|||
// Message and return links
|
||||
$success_msg = 'POSTS_MERGED_SUCCESS';
|
||||
|
||||
// Update the topic watch table.
|
||||
if (!function_exists('phpbb_update_rows_avoiding_duplicates_notify_status'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_database_helper.' . $phpEx);
|
||||
}
|
||||
|
||||
// Update the topic watch table.
|
||||
phpbb_update_rows_avoiding_duplicates_notify_status($db, TOPICS_WATCH_TABLE, 'topic_id', $topic_ids, $to_topic_id);
|
||||
|
||||
// Update the bookmarks table.
|
||||
phpbb_update_rows_avoiding_duplicates($db, BOOKMARKS_TABLE, 'topic_id', $topic_ids, $to_topic_id);
|
||||
|
||||
// Link to the new topic
|
||||
$return_link .= (($return_link) ? '<br /><br />' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&t=' . $to_topic_id) . '">', '</a>');
|
||||
}
|
||||
|
|
|
@ -1080,6 +1080,7 @@ function mcp_fork_topic($topic_ids)
|
|||
}
|
||||
}
|
||||
|
||||
// Copy topic subscriptions to new topic
|
||||
$sql = 'SELECT user_id, notify_status
|
||||
FROM ' . TOPICS_WATCH_TABLE . '
|
||||
WHERE topic_id = ' . $topic_id;
|
||||
|
@ -1100,6 +1101,27 @@ function mcp_fork_topic($topic_ids)
|
|||
{
|
||||
$db->sql_multi_insert(TOPICS_WATCH_TABLE, $sql_ary);
|
||||
}
|
||||
|
||||
// Copy bookmarks to new topic
|
||||
$sql = 'SELECT user_id
|
||||
FROM ' . BOOKMARKS_TABLE . '
|
||||
WHERE topic_id = ' . $topic_id;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$sql_ary = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$sql_ary[] = array(
|
||||
'topic_id' => (int) $new_topic_id,
|
||||
'user_id' => (int) $row['user_id'],
|
||||
);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($sql_ary))
|
||||
{
|
||||
$db->sql_multi_insert(BOOKMARKS_TABLE, $sql_ary);
|
||||
}
|
||||
}
|
||||
|
||||
// Sync new topics, parent forums and board stats
|
||||
|
|
|
@ -126,6 +126,7 @@ class mcp_pm_reports
|
|||
|
||||
$message = bbcode_nl2br($message);
|
||||
$message = smiley_text($message);
|
||||
$report['report_text'] = make_clickable(bbcode_nl2br($report['report_text']));
|
||||
|
||||
if ($pm_info['message_attachment'] && $auth->acl_get('u_pm_download'))
|
||||
{
|
||||
|
|
|
@ -71,7 +71,7 @@ class mcp_reports
|
|||
// closed reports are accessed by report id
|
||||
$report_id = request_var('r', 0);
|
||||
|
||||
$sql = 'SELECT r.post_id, r.user_id, r.report_id, r.report_closed, report_time, r.report_text, r.reported_post_text, r.reported_post_uid, r.reported_post_bitfield, rr.reason_title, rr.reason_description, u.username, u.username_clean, u.user_colour
|
||||
$sql = 'SELECT r.post_id, r.user_id, r.report_id, r.report_closed, report_time, r.report_text, r.reported_post_text, r.reported_post_uid, r.reported_post_bitfield, r.reported_post_enable_magic_url, r.reported_post_enable_smilies, r.reported_post_enable_bbcode, rr.reason_title, rr.reason_description, u.username, u.username_clean, u.user_colour
|
||||
FROM ' . REPORTS_TABLE . ' r, ' . REPORTS_REASONS_TABLE . ' rr, ' . USERS_TABLE . ' u
|
||||
WHERE ' . (($report_id) ? 'r.report_id = ' . $report_id : "r.post_id = $post_id") . '
|
||||
AND rr.reason_id = r.reason_id
|
||||
|
@ -98,6 +98,10 @@ class mcp_reports
|
|||
|
||||
$post_id = $report['post_id'];
|
||||
$report_id = $report['report_id'];
|
||||
|
||||
$parse_post_flags = $report['reported_post_enable_bbcode'] ? OPTION_FLAG_BBCODE : 0;
|
||||
$parse_post_flags += $report['reported_post_enable_smilies'] ? OPTION_FLAG_SMILIES : 0;
|
||||
$parse_post_flags += $report['reported_post_enable_magic_url'] ? OPTION_FLAG_LINKS : 0;
|
||||
|
||||
$post_info = get_post_data(array($post_id), 'm_report', true);
|
||||
|
||||
|
@ -140,18 +144,7 @@ class mcp_reports
|
|||
|
||||
$post_unread = (isset($topic_tracking_info[$post_info['topic_id']]) && $post_info['post_time'] > $topic_tracking_info[$post_info['topic_id']]) ? true : false;
|
||||
|
||||
// Process message, leave it uncensored
|
||||
$message = $post_info['post_text'];
|
||||
|
||||
if ($post_info['bbcode_bitfield'])
|
||||
{
|
||||
include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
|
||||
$bbcode = new bbcode($post_info['bbcode_bitfield']);
|
||||
$bbcode->bbcode_second_pass($message, $post_info['bbcode_uid'], $post_info['bbcode_bitfield']);
|
||||
}
|
||||
|
||||
$message = bbcode_nl2br($message);
|
||||
$message = smiley_text($message);
|
||||
$report['report_text'] = make_clickable(bbcode_nl2br($report['report_text']));
|
||||
|
||||
if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id']))
|
||||
|
@ -172,7 +165,7 @@ class mcp_reports
|
|||
if (sizeof($attachments))
|
||||
{
|
||||
$update_count = array();
|
||||
parse_attachments($post_info['forum_id'], $message, $attachments, $update_count);
|
||||
parse_attachments($post_info['forum_id'], $report['reported_post_text'], $attachments, $update_count);
|
||||
}
|
||||
|
||||
// Display not already displayed Attachments for this post, we already parsed them. ;)
|
||||
|
@ -231,7 +224,7 @@ class mcp_reports
|
|||
'REPORTER_NAME' => get_username_string('username', $report['user_id'], $report['username'], $report['user_colour']),
|
||||
'U_VIEW_REPORTER_PROFILE' => get_username_string('profile', $report['user_id'], $report['username'], $report['user_colour']),
|
||||
|
||||
'POST_PREVIEW' => generate_text_for_display($report['reported_post_text'], $report['reported_post_uid'], $report['reported_post_bitfield'], OPTION_FLAG_BBCODE | OPTION_FLAG_SMILIES, false),
|
||||
'POST_PREVIEW' => generate_text_for_display($report['reported_post_text'], $report['reported_post_uid'], $report['reported_post_bitfield'], $parse_post_flags, false),
|
||||
'POST_SUBJECT' => ($post_info['post_subject']) ? $post_info['post_subject'] : $user->lang['NO_SUBJECT'],
|
||||
'POST_DATE' => $user->format_date($post_info['post_time']),
|
||||
'POST_IP' => $post_info['poster_ip'],
|
||||
|
|
|
@ -521,6 +521,49 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
|
|||
WHERE post_id = {$post_id_list[0]}";
|
||||
$db->sql_query($sql);
|
||||
|
||||
// Copy topic subscriptions to new topic
|
||||
$sql = 'SELECT user_id, notify_status
|
||||
FROM ' . TOPICS_WATCH_TABLE . '
|
||||
WHERE topic_id = ' . $topic_id;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$sql_ary = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$sql_ary[] = array(
|
||||
'topic_id' => (int) $to_topic_id,
|
||||
'user_id' => (int) $row['user_id'],
|
||||
'notify_status' => (int) $row['notify_status'],
|
||||
);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($sql_ary))
|
||||
{
|
||||
$db->sql_multi_insert(TOPICS_WATCH_TABLE, $sql_ary);
|
||||
}
|
||||
|
||||
// Copy bookmarks to new topic
|
||||
$sql = 'SELECT user_id
|
||||
FROM ' . BOOKMARKS_TABLE . '
|
||||
WHERE topic_id = ' . $topic_id;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$sql_ary = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$sql_ary[] = array(
|
||||
'topic_id' => (int) $to_topic_id,
|
||||
'user_id' => (int) $row['user_id'],
|
||||
);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($sql_ary))
|
||||
{
|
||||
$db->sql_multi_insert(BOOKMARKS_TABLE, $sql_ary);
|
||||
}
|
||||
|
||||
$success_msg = 'TOPIC_SPLIT_SUCCESS';
|
||||
|
||||
// Update forum statistics
|
||||
|
@ -623,12 +666,16 @@ function merge_posts($topic_id, $to_topic_id)
|
|||
}
|
||||
else
|
||||
{
|
||||
// If the topic no longer exist, we will update the topic watch table.
|
||||
if (!function_exists('phpbb_update_rows_avoiding_duplicates_notify_status'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_database_helper.' . $phpEx);
|
||||
}
|
||||
|
||||
// If the topic no longer exist, we will update the topic watch table.
|
||||
phpbb_update_rows_avoiding_duplicates_notify_status($db, TOPICS_WATCH_TABLE, 'topic_id', $topic_ids, $to_topic_id);
|
||||
|
||||
// If the topic no longer exist, we will update the bookmarks table.
|
||||
phpbb_update_rows_avoiding_duplicates($db, BOOKMARKS_TABLE, 'topic_id', $topic_id, $to_topic_id);
|
||||
}
|
||||
|
||||
// Link to the new topic
|
||||
|
|
|
@ -476,10 +476,14 @@ class phpbb_search_fulltext_postgres extends phpbb_search_base
|
|||
$tmp_sql_match[] = "to_tsvector ('" . $this->db->sql_escape($this->config['fulltext_postgres_ts_name']) . "', " . $sql_match_column . ") @@ to_tsquery ('" . $this->db->sql_escape($this->config['fulltext_postgres_ts_name']) . "', '" . $this->db->sql_escape($this->tsearch_query) . "')";
|
||||
}
|
||||
|
||||
$this->db->sql_transaction('begin');
|
||||
|
||||
$sql_from = "FROM $sql_from$sql_sort_table" . POSTS_TABLE . " p";
|
||||
$sql_where = "WHERE (" . implode(' OR ', $tmp_sql_match) . ")
|
||||
$sql_where_options";
|
||||
$sql = "SELECT $sql_select
|
||||
FROM $sql_from$sql_sort_table" . POSTS_TABLE . " p
|
||||
WHERE (" . implode(' OR ', $tmp_sql_match) . ")
|
||||
$sql_where_options
|
||||
$sql_from
|
||||
$sql_where
|
||||
ORDER BY $sql_sort";
|
||||
$result = $this->db->sql_query_limit($sql, $this->config['search_block_size'], $start);
|
||||
|
||||
|
@ -499,7 +503,12 @@ class phpbb_search_fulltext_postgres extends phpbb_search_base
|
|||
// if the total result count is not cached yet, retrieve it from the db
|
||||
if (!$result_count)
|
||||
{
|
||||
$result_count = sizeof ($id_ary);
|
||||
$sql_count = "SELECT COUNT(*) as result_count
|
||||
$sql_from
|
||||
$sql_where";
|
||||
$result = $this->db->sql_query($sql_count);
|
||||
$result_count = (int) $this->db->sql_fetchfield('result_count');
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
if (!$result_count)
|
||||
{
|
||||
|
@ -507,6 +516,8 @@ class phpbb_search_fulltext_postgres extends phpbb_search_base
|
|||
}
|
||||
}
|
||||
|
||||
$this->db->sql_transaction('commit');
|
||||
|
||||
// store the ids, from start on then delete anything that isn't on the current page because we only need ids for one page
|
||||
$this->save_ids($search_key, implode(' ', $this->split_words), $author_ary, $result_count, $id_ary, $start, $sort_dir);
|
||||
$id_ary = array_slice($id_ary, 0, (int) $per_page);
|
||||
|
@ -647,6 +658,8 @@ class phpbb_search_fulltext_postgres extends phpbb_search_base
|
|||
$field = 'topic_id';
|
||||
}
|
||||
|
||||
$this->db->sql_transaction('begin');
|
||||
|
||||
// Only read one block of posts from the db and then cache it
|
||||
$result = $this->db->sql_query_limit($sql, $this->config['search_block_size'], $start);
|
||||
|
||||
|
@ -659,7 +672,35 @@ class phpbb_search_fulltext_postgres extends phpbb_search_base
|
|||
// retrieve the total result count if needed
|
||||
if (!$result_count)
|
||||
{
|
||||
$result_count = sizeof ($id_ary);
|
||||
if ($type == 'posts')
|
||||
{
|
||||
$sql_count = "SELECT COUNT(*) as result_count
|
||||
FROM " . $sql_sort_table . POSTS_TABLE . ' p' . (($firstpost_only) ? ', ' . TOPICS_TABLE . ' t ' : ' ') . "
|
||||
WHERE $sql_author
|
||||
$sql_topic_id
|
||||
$sql_firstpost
|
||||
$m_approve_fid_sql
|
||||
$sql_fora
|
||||
$sql_sort_join
|
||||
$sql_time";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql_count = "SELECT COUNT(*) as result_count
|
||||
FROM " . $sql_sort_table . TOPICS_TABLE . ' t, ' . POSTS_TABLE . " p
|
||||
WHERE $sql_author
|
||||
$sql_topic_id
|
||||
$sql_firstpost
|
||||
$m_approve_fid_sql
|
||||
$sql_fora
|
||||
AND t.topic_id = p.topic_id
|
||||
$sql_sort_join
|
||||
$sql_time
|
||||
GROUP BY t.topic_id, $sort_by_sql[$sort_key]";
|
||||
}
|
||||
|
||||
$result = $this->db->sql_query($sql_count);
|
||||
$result_count = (int) $this->db->sql_fetchfield('result_count');
|
||||
|
||||
if (!$result_count)
|
||||
{
|
||||
|
@ -667,6 +708,8 @@ class phpbb_search_fulltext_postgres extends phpbb_search_base
|
|||
}
|
||||
}
|
||||
|
||||
$this->db->sql_transaction('commit');
|
||||
|
||||
if (sizeof($id_ary))
|
||||
{
|
||||
$this->save_ids($search_key, '', $author_ary, $result_count, $id_ary, $start, $sort_dir);
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -25,7 +25,7 @@ class ucp_groups
|
|||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $config, $phpbb_root_path, $phpEx;
|
||||
global $config, $phpbb_root_path, $phpEx, $phpbb_admin_path;
|
||||
global $db, $user, $auth, $cache, $template;
|
||||
global $request;
|
||||
|
||||
|
@ -438,7 +438,7 @@ class ucp_groups
|
|||
$group_name = $group_row['group_name'];
|
||||
$group_type = $group_row['group_type'];
|
||||
|
||||
$avatar_img = (!empty($group_row['group_avatar'])) ? get_user_avatar($group_row['group_avatar'], $group_row['group_avatar_type'], $group_row['group_avatar_width'], $group_row['group_avatar_height'], 'GROUP_AVATAR') : '<img src="' . $phpbb_root_path . 'adm/images/no_avatar.gif" alt="" />';
|
||||
$avatar_img = (!empty($group_row['group_avatar'])) ? get_user_avatar($group_row['group_avatar'], $group_row['group_avatar_type'], $group_row['group_avatar_width'], $group_row['group_avatar_height'], 'GROUP_AVATAR') : '<img src="' . $phpbb_admin_path . 'images/no_avatar.gif" alt="" />';
|
||||
|
||||
$template->assign_vars(array(
|
||||
'GROUP_NAME' => ($group_type == GROUP_SPECIAL) ? $user->lang['G_' . $group_name] : $group_name,
|
||||
|
@ -730,7 +730,7 @@ class ucp_groups
|
|||
'GROUP_CLOSED' => $type_closed,
|
||||
'GROUP_HIDDEN' => $type_hidden,
|
||||
|
||||
'U_SWATCH' => append_sid("{$phpbb_root_path}adm/swatch.$phpEx", 'form=ucp&name=group_colour'),
|
||||
'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(),
|
||||
));
|
||||
|
|
|
@ -73,6 +73,10 @@ if (!defined('PHPBB_INSTALLED') || empty($dbms) || empty($acm_type))
|
|||
die("Please read: <a href='../docs/INSTALL.html'>INSTALL.html</a> before attempting to update.");
|
||||
}
|
||||
|
||||
// In case $phpbb_adm_relative_path is not set (in case of an update), use the default.
|
||||
$phpbb_adm_relative_path = (isset($phpbb_adm_relative_path)) ? $phpbb_adm_relative_path : 'adm/';
|
||||
$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $phpbb_adm_relative_path;
|
||||
|
||||
// Include files
|
||||
require($phpbb_root_path . 'includes/class_loader.' . $phpEx);
|
||||
|
||||
|
@ -117,18 +121,7 @@ $phpbb_class_loader_ext = new phpbb_class_loader('phpbb_ext_', "{$phpbb_root_pat
|
|||
$phpbb_class_loader_ext->register();
|
||||
|
||||
// Set up container
|
||||
$phpbb_container = phpbb_create_dumped_container_unless_debug(
|
||||
array(
|
||||
new phpbb_di_extension_config($phpbb_root_path . 'config.' . $phpEx),
|
||||
new phpbb_di_extension_core($phpbb_root_path),
|
||||
),
|
||||
array(
|
||||
new phpbb_di_pass_collection_pass(),
|
||||
new phpbb_di_pass_kernel_pass(),
|
||||
),
|
||||
$phpbb_root_path,
|
||||
$phpEx
|
||||
);
|
||||
$phpbb_container = phpbb_create_default_container($phpbb_root_path, $phpEx);
|
||||
|
||||
$phpbb_class_loader->set_cache($phpbb_container->get('cache.driver'));
|
||||
$phpbb_class_loader_ext->set_cache($phpbb_container->get('cache.driver'));
|
||||
|
@ -152,7 +145,8 @@ if (file_exists($phpbb_root_path . 'includes/hooks/index.' . $phpEx))
|
|||
require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
|
||||
$phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('template', 'display')));
|
||||
|
||||
foreach ($cache->obtain_hooks() as $hook)
|
||||
$phpbb_hook_finder = $phpbb_container->get('hook_finder');
|
||||
foreach ($phpbb_hook_finder->find() as $hook)
|
||||
{
|
||||
@include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx);
|
||||
}
|
||||
|
@ -205,7 +199,7 @@ include($phpbb_root_path . 'language/' . $language . '/install.' . $phpEx);
|
|||
$inline_update = (request_var('type', 0)) ? true : false;
|
||||
|
||||
// To let set_config() calls succeed, we need to make the config array available globally
|
||||
$config = new phpbb_config_db($db, $cache->get_driver(), CONFIG_TABLE);
|
||||
$config = new phpbb_config_db($db, $phpbb_container->get('cache.driver'), CONFIG_TABLE);
|
||||
set_config(null, null, null, $config);
|
||||
set_config_count(null, null, null, $config);
|
||||
|
||||
|
@ -243,7 +237,7 @@ if ($has_global && !$ga_forum_id)
|
|||
|
||||
<title><?php echo $lang['UPDATING_TO_LATEST_STABLE']; ?></title>
|
||||
|
||||
<link href="../adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
<link href="<?php echo htmlspecialchars($phpbb_admin_path); ?>style/admin.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
|
||||
</head>
|
||||
|
||||
|
@ -293,7 +287,7 @@ header('Content-type: text/html; charset=UTF-8');
|
|||
|
||||
<title><?php echo $lang['UPDATING_TO_LATEST_STABLE']; ?></title>
|
||||
|
||||
<link href="../adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
<link href="<?php echo htmlspecialchars($phpbb_admin_path); ?>style/admin.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
|
||||
</head>
|
||||
|
||||
|
@ -592,7 +586,7 @@ else
|
|||
add_log('admin', 'LOG_UPDATE_DATABASE', $orig_version, $updates_to_version);
|
||||
|
||||
// Now we purge the session table as well as all cache files
|
||||
$cache->purge();
|
||||
$phpbb_container->get('cache.driver')->purge();
|
||||
|
||||
_print_footer();
|
||||
|
||||
|
@ -1237,9 +1231,12 @@ function database_update_info()
|
|||
'style_parent_tree' => array('TEXT', ''),
|
||||
),
|
||||
REPORTS_TABLE => array(
|
||||
'reported_post_text' => array('MTEXT_UNI', ''),
|
||||
'reported_post_uid' => array('VCHAR:8', ''),
|
||||
'reported_post_bitfield' => array('VCHAR:255', ''),
|
||||
'reported_post_text' => array('MTEXT_UNI', ''),
|
||||
'reported_post_uid' => array('VCHAR:8', ''),
|
||||
'reported_post_bitfield' => array('VCHAR:255', ''),
|
||||
'reported_post_enable_bbcode' => array('BOOL', 1),
|
||||
'reported_post_enable_smilies' => array('BOOL', 1),
|
||||
'reported_post_enable_magic_url' => array('BOOL', 1),
|
||||
),
|
||||
),
|
||||
'change_columns' => array(
|
||||
|
@ -1261,7 +1258,7 @@ function database_update_info()
|
|||
*****************************************************************************/
|
||||
function change_database_data(&$no_updates, $version)
|
||||
{
|
||||
global $db, $errored, $error_ary, $config, $phpbb_root_path, $phpEx, $db_tools;
|
||||
global $db, $db_tools, $errored, $error_ary, $config, $table_prefix, $phpbb_root_path, $phpEx;
|
||||
|
||||
$update_helpers = new phpbb_update_helpers();
|
||||
|
||||
|
@ -1578,8 +1575,6 @@ function change_database_data(&$no_updates, $version)
|
|||
),
|
||||
);
|
||||
|
||||
global $db_tools;
|
||||
|
||||
$statements = $db_tools->perform_schema_changes($changes);
|
||||
|
||||
foreach ($statements as $sql)
|
||||
|
@ -2221,26 +2216,41 @@ function change_database_data(&$no_updates, $version)
|
|||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
global $db_tools, $table_prefix;
|
||||
|
||||
// Recover from potentially broken Q&A CAPTCHA table on firebird
|
||||
// Q&A CAPTCHA was uninstallable, so it's safe to remove these
|
||||
// without data loss
|
||||
/*
|
||||
* Due to a bug, vanilla phpbb could not create captcha tables
|
||||
* in 3.0.8 on firebird. It was possible for board administrators
|
||||
* to adjust the code to work. If code was manually adjusted by
|
||||
* board administrators, index names would not be the same as
|
||||
* what 3.0.9 and newer expect. This code fragment drops captcha
|
||||
* tables, destroying all entered Q&A captcha configuration, such
|
||||
* that when Q&A is configured next the respective tables will be
|
||||
* created with correct index names.
|
||||
*
|
||||
* If you wish to preserve your Q&A captcha configuration, you can
|
||||
* manually rename indexes to the currently expected name:
|
||||
* phpbb_captcha_questions_lang_iso => phpbb_captcha_questions_lang
|
||||
* phpbb_captcha_answers_question_id => phpbb_captcha_answers_qid
|
||||
*
|
||||
* Again, this needs to be done only if a board was manually modified
|
||||
* to fix broken captcha code.
|
||||
*
|
||||
if ($db_tools->sql_layer == 'firebird')
|
||||
{
|
||||
$tables = array(
|
||||
$table_prefix . 'captcha_questions',
|
||||
$table_prefix . 'captcha_answers',
|
||||
$table_prefix . 'qa_confirm',
|
||||
$changes = array(
|
||||
'drop_tables' => array(
|
||||
$table_prefix . 'captcha_questions',
|
||||
$table_prefix . 'captcha_answers',
|
||||
$table_prefix . 'qa_confirm',
|
||||
),
|
||||
);
|
||||
foreach ($tables as $table)
|
||||
$statements = $db_tools->perform_schema_changes($changes);
|
||||
|
||||
foreach ($statements as $sql)
|
||||
{
|
||||
if ($db_tools->sql_table_exists($table))
|
||||
{
|
||||
$db_tools->sql_table_drop($table);
|
||||
}
|
||||
_sql($sql, $errored, $error_ary);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
$no_updates = false;
|
||||
break;
|
||||
|
@ -2950,7 +2960,11 @@ function change_database_data(&$no_updates, $version)
|
|||
set_config('board_timezone', $update_helpers->convert_phpbb30_timezone($config['board_timezone'], $config['board_dst']));
|
||||
|
||||
// After we have calculated the timezones we can delete user_dst column from user table.
|
||||
$db_tools->sql_column_remove(USERS_TABLE, 'user_dst');
|
||||
$statements = $db_tools->sql_column_remove(USERS_TABLE, 'user_dst');
|
||||
foreach ($statements as $sql)
|
||||
{
|
||||
_sql($sql, $errored, $error_ary);
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($config['site_home_url']))
|
||||
|
@ -3046,6 +3060,7 @@ function change_database_data(&$no_updates, $version)
|
|||
_sql($sql, $errored, $error_ary);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
// Add new permissions
|
||||
include_once($phpbb_root_path . 'includes/acp/auth.' . $phpEx);
|
||||
|
|
|
@ -73,6 +73,10 @@ else
|
|||
}
|
||||
@ini_set('memory_limit', $mem_limit);
|
||||
|
||||
// In case $phpbb_adm_relative_path is not set (in case of an update), use the default.
|
||||
$phpbb_adm_relative_path = (isset($phpbb_adm_relative_path)) ? $phpbb_adm_relative_path : 'adm/';
|
||||
$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $phpbb_adm_relative_path;
|
||||
|
||||
// Include essential scripts
|
||||
require($phpbb_root_path . 'includes/class_loader.' . $phpEx);
|
||||
|
||||
|
@ -97,9 +101,6 @@ $phpbb_container = phpbb_create_install_container($phpbb_root_path, $phpEx);
|
|||
$phpbb_class_loader->set_cache($phpbb_container->get('cache.driver'));
|
||||
$phpbb_class_loader_ext->set_cache($phpbb_container->get('cache.driver'));
|
||||
|
||||
// set up caching
|
||||
$cache = $phpbb_container->get('cache');
|
||||
|
||||
$phpbb_dispatcher = $phpbb_container->get('dispatcher');
|
||||
$request = $phpbb_container->get('request');
|
||||
|
||||
|
@ -195,7 +196,8 @@ if (file_exists($phpbb_root_path . 'includes/hooks/index.' . $phpEx))
|
|||
require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
|
||||
$phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('template', 'display')));
|
||||
|
||||
foreach ($cache->obtain_hooks() as $hook)
|
||||
$phpbb_hook_finder = $phpbb_container->get('hook_finder');
|
||||
foreach ($phpbb_hook_finder->find() as $hook)
|
||||
{
|
||||
@include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx);
|
||||
}
|
||||
|
@ -215,9 +217,9 @@ $phpbb_style_path_provider = new phpbb_style_path_provider();
|
|||
$template = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, new phpbb_template_context());
|
||||
$phpbb_style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider, $template);
|
||||
$phpbb_style->set_ext_dir_prefix('adm/');
|
||||
$phpbb_style->set_custom_style('admin', '../adm/style', array(), '');
|
||||
$phpbb_style->set_custom_style('admin', $phpbb_admin_path . 'style', array(), '');
|
||||
$template->assign_var('T_ASSETS_PATH', '../assets');
|
||||
$template->assign_var('T_TEMPLATE_PATH', '../adm/style');
|
||||
$template->assign_var('T_TEMPLATE_PATH', $phpbb_admin_path . 'style');
|
||||
|
||||
$install = new module();
|
||||
|
||||
|
@ -361,7 +363,7 @@ class module
|
|||
}
|
||||
|
||||
define('HEADER_INC', true);
|
||||
global $template, $lang, $stage, $phpbb_root_path;
|
||||
global $template, $lang, $stage, $phpbb_root_path, $phpbb_admin_path;
|
||||
|
||||
$template->assign_vars(array(
|
||||
'L_CHANGE' => $lang['CHANGE'],
|
||||
|
@ -370,7 +372,7 @@ class module
|
|||
'L_SELECT_LANG' => $lang['SELECT_LANG'],
|
||||
'L_SKIP' => $lang['SKIP'],
|
||||
'PAGE_TITLE' => $this->get_page_title(),
|
||||
'T_IMAGE_PATH' => $phpbb_root_path . 'adm/images/',
|
||||
'T_IMAGE_PATH' => htmlspecialchars($phpbb_admin_path) . 'images/',
|
||||
|
||||
'S_CONTENT_DIRECTION' => $lang['DIRECTION'],
|
||||
'S_CONTENT_FLOW_BEGIN' => ($lang['DIRECTION'] == 'ltr') ? 'left' : 'right',
|
||||
|
@ -551,7 +553,7 @@ class module
|
|||
*/
|
||||
function error($error, $line, $file, $skip = false)
|
||||
{
|
||||
global $lang, $db, $template;
|
||||
global $lang, $db, $template, $phpbb_admin_path;
|
||||
|
||||
if ($skip)
|
||||
{
|
||||
|
@ -573,7 +575,7 @@ class module
|
|||
echo '<head>';
|
||||
echo '<meta charset="utf-8">';
|
||||
echo '<title>' . $lang['INST_ERR_FATAL'] . '</title>';
|
||||
echo '<link href="../adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />';
|
||||
echo '<link href="' . htmlspecialchars($phpbb_admin_path) . 'style/admin.css" rel="stylesheet" type="text/css" media="screen" />';
|
||||
echo '</head>';
|
||||
echo '<body id="errorpage">';
|
||||
echo '<div id="wrap">';
|
||||
|
|
|
@ -1538,6 +1538,7 @@ class install_convert extends module
|
|||
function finish_conversion()
|
||||
{
|
||||
global $db, $phpbb_root_path, $phpEx, $convert, $config, $language, $user, $template;
|
||||
global $cache, $auth;
|
||||
|
||||
$db->sql_query('DELETE FROM ' . CONFIG_TABLE . "
|
||||
WHERE config_name = 'convert_progress'
|
||||
|
@ -1547,7 +1548,7 @@ class install_convert extends module
|
|||
$db->sql_query('DELETE FROM ' . SESSIONS_TABLE);
|
||||
|
||||
@unlink($phpbb_root_path . 'cache/data_global.' . $phpEx);
|
||||
cache_moderators();
|
||||
phpbb_cache_moderators($db, $cache, $auth);
|
||||
|
||||
// And finally, add a note to the log
|
||||
add_log('admin', 'LOG_INSTALL_CONVERTED', $convert->convertor_data['forum_name'], $config['version']);
|
||||
|
|
|
@ -52,12 +52,13 @@ class install_install extends module
|
|||
|
||||
function main($mode, $sub)
|
||||
{
|
||||
global $lang, $template, $language, $phpbb_root_path, $cache;
|
||||
global $lang, $template, $language, $phpbb_root_path, $phpEx;
|
||||
global $phpbb_container, $cache;
|
||||
|
||||
switch ($sub)
|
||||
{
|
||||
case 'intro':
|
||||
$cache->purge();
|
||||
$phpbb_container->get('cache.driver')->purge();
|
||||
|
||||
$this->page_title = $lang['SUB_INTRO'];
|
||||
|
||||
|
@ -101,6 +102,12 @@ class install_install extends module
|
|||
break;
|
||||
|
||||
case 'final':
|
||||
// Create a normal container now
|
||||
$phpbb_container = phpbb_create_default_container($phpbb_root_path, $phpEx);
|
||||
|
||||
// Sets the global $cache variable
|
||||
$cache = $phpbb_container->get('cache');
|
||||
|
||||
$this->build_search_index($mode, $sub);
|
||||
$this->add_modules($mode, $sub);
|
||||
$this->add_language($mode, $sub);
|
||||
|
@ -1807,7 +1814,7 @@ class install_install extends module
|
|||
*/
|
||||
function email_admin($mode, $sub)
|
||||
{
|
||||
global $auth, $config, $db, $lang, $template, $user, $phpbb_root_path, $phpEx;
|
||||
global $auth, $config, $db, $lang, $template, $user, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
|
||||
$this->page_title = $lang['STAGE_FINAL'];
|
||||
|
||||
|
@ -1854,7 +1861,7 @@ class install_install extends module
|
|||
'TITLE' => $lang['INSTALL_CONGRATS'],
|
||||
'BODY' => sprintf($lang['INSTALL_CONGRATS_EXPLAIN'], $config['version'], append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=convert&language=' . $data['language']), '../docs/README.html'),
|
||||
'L_SUBMIT' => $lang['INSTALL_LOGIN'],
|
||||
'U_ACTION' => append_sid($phpbb_root_path . 'adm/index.' . $phpEx, 'i=send_statistics&mode=send_statistics'),
|
||||
'U_ACTION' => append_sid($phpbb_admin_path . 'index.' . $phpEx, 'i=send_statistics&mode=send_statistics'),
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ class install_update extends module
|
|||
function main($mode, $sub)
|
||||
{
|
||||
global $phpbb_style, $template, $phpEx, $phpbb_root_path, $user, $db, $config, $cache, $auth, $language;
|
||||
global $request;
|
||||
global $request, $phpbb_admin_path, $phpbb_adm_relative_path;
|
||||
|
||||
$this->tpl_name = 'install_update';
|
||||
$this->page_title = 'UPDATE_INSTALLATION';
|
||||
|
@ -132,7 +132,7 @@ class install_update extends module
|
|||
}
|
||||
|
||||
// Set custom template again. ;)
|
||||
$phpbb_style->set_custom_style('admin', '../adm/style', array(), '');
|
||||
$phpbb_style->set_custom_style('admin', $phpbb_admin_path . 'style', array(), '');
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_USER_LANG' => $user->lang['USER_LANG'],
|
||||
|
@ -217,7 +217,7 @@ class install_update extends module
|
|||
if ($this->test_update === false)
|
||||
{
|
||||
// Got the updater template itself updated? If so, we are able to directly use it - but only if all three files are present
|
||||
if (in_array('adm/style/install_update.html', $this->update_info['files']))
|
||||
if (in_array($phpbb_adm_relative_path . 'style/install_update.html', $this->update_info['files']))
|
||||
{
|
||||
$this->tpl_name = '../../install/update/new/adm/style/install_update';
|
||||
}
|
||||
|
@ -494,6 +494,7 @@ class install_update extends module
|
|||
$template->assign_vars(array(
|
||||
'S_FILE_CHECK' => true,
|
||||
'S_ALL_UP_TO_DATE' => $all_up_to_date,
|
||||
'L_ALL_FILES_UP_TO_DATE' => $user->lang('ALL_FILES_UP_TO_DATE', append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'), append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login&redirect=' . $phpbb_adm_relative_path . 'index.php%3Fi=send_statistics%26mode=send_statistics')),
|
||||
'S_VERSION_UP_TO_DATE' => $up_to_date,
|
||||
'U_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=file_check"),
|
||||
'U_UPDATE_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=update_files"),
|
||||
|
@ -1078,12 +1079,12 @@ class install_update extends module
|
|||
*/
|
||||
function show_diff(&$update_list)
|
||||
{
|
||||
global $phpbb_root_path, $template, $user;
|
||||
global $phpbb_root_path, $template, $user, $phpbb_adm_relative_path;
|
||||
|
||||
$this->tpl_name = 'install_update_diff';
|
||||
|
||||
// Got the diff template itself updated? If so, we are able to directly use it
|
||||
if (in_array('adm/style/install_update_diff.html', $this->update_info['files']))
|
||||
if (in_array($phpbb_adm_relative_path . 'style/install_update_diff.html', $this->update_info['files']))
|
||||
{
|
||||
$this->tpl_name = '../../install/update/new/adm/style/install_update_diff';
|
||||
}
|
||||
|
|
|
@ -950,7 +950,10 @@ CREATE TABLE phpbb_reports (
|
|||
report_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
|
||||
reported_post_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
|
||||
reported_post_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL,
|
||||
reported_post_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL
|
||||
reported_post_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
|
||||
reported_post_enable_magic_url INTEGER DEFAULT 1 NOT NULL,
|
||||
reported_post_enable_smilies INTEGER DEFAULT 1 NOT NULL,
|
||||
reported_post_enable_bbcode INTEGER DEFAULT 1 NOT NULL
|
||||
);;
|
||||
|
||||
ALTER TABLE phpbb_reports ADD PRIMARY KEY (report_id);;
|
||||
|
|
|
@ -1159,7 +1159,10 @@ CREATE TABLE [phpbb_reports] (
|
|||
[report_text] [text] DEFAULT ('') NOT NULL ,
|
||||
[reported_post_text] [text] DEFAULT ('') NOT NULL ,
|
||||
[reported_post_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
|
||||
[reported_post_bitfield] [varchar] (255) DEFAULT ('') NOT NULL
|
||||
[reported_post_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
|
||||
[reported_post_enable_magic_url] [int] DEFAULT (1) NOT NULL ,
|
||||
[reported_post_enable_smilies] [int] DEFAULT (1) NOT NULL ,
|
||||
[reported_post_enable_bbcode] [int] DEFAULT (1) NOT NULL
|
||||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||||
GO
|
||||
|
||||
|
|
|
@ -675,6 +675,9 @@ CREATE TABLE phpbb_reports (
|
|||
reported_post_text mediumblob NOT NULL,
|
||||
reported_post_uid varbinary(8) DEFAULT '' NOT NULL,
|
||||
reported_post_bitfield varbinary(255) DEFAULT '' NOT NULL,
|
||||
reported_post_enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
|
||||
reported_post_enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
|
||||
reported_post_enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
|
||||
PRIMARY KEY (report_id),
|
||||
KEY post_id (post_id),
|
||||
KEY pm_id (pm_id)
|
||||
|
|
|
@ -675,6 +675,9 @@ CREATE TABLE phpbb_reports (
|
|||
reported_post_text mediumtext NOT NULL,
|
||||
reported_post_uid varchar(8) DEFAULT '' NOT NULL,
|
||||
reported_post_bitfield varchar(255) DEFAULT '' NOT NULL,
|
||||
reported_post_enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
|
||||
reported_post_enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
|
||||
reported_post_enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
|
||||
PRIMARY KEY (report_id),
|
||||
KEY post_id (post_id),
|
||||
KEY pm_id (pm_id)
|
||||
|
|
|
@ -1266,6 +1266,9 @@ CREATE TABLE phpbb_reports (
|
|||
reported_post_text clob DEFAULT '' ,
|
||||
reported_post_uid varchar2(8) DEFAULT '' ,
|
||||
reported_post_bitfield varchar2(255) DEFAULT '' ,
|
||||
reported_post_enable_magic_url number(1) DEFAULT '1' NOT NULL,
|
||||
reported_post_enable_smilies number(1) DEFAULT '1' NOT NULL,
|
||||
reported_post_enable_bbcode number(1) DEFAULT '1' NOT NULL,
|
||||
CONSTRAINT pk_phpbb_reports PRIMARY KEY (report_id)
|
||||
)
|
||||
/
|
||||
|
|
|
@ -887,6 +887,9 @@ CREATE TABLE phpbb_reports (
|
|||
reported_post_text TEXT DEFAULT '' NOT NULL,
|
||||
reported_post_uid varchar(8) DEFAULT '' NOT NULL,
|
||||
reported_post_bitfield varchar(255) DEFAULT '' NOT NULL,
|
||||
reported_post_enable_magic_url INT2 DEFAULT '1' NOT NULL CHECK (reported_post_enable_magic_url >= 0),
|
||||
reported_post_enable_smilies INT2 DEFAULT '1' NOT NULL CHECK (reported_post_enable_smilies >= 0),
|
||||
reported_post_enable_bbcode INT2 DEFAULT '1' NOT NULL CHECK (reported_post_enable_bbcode >= 0),
|
||||
PRIMARY KEY (report_id)
|
||||
);
|
||||
|
||||
|
|
|
@ -654,7 +654,10 @@ CREATE TABLE phpbb_reports (
|
|||
report_text mediumtext(16777215) NOT NULL DEFAULT '',
|
||||
reported_post_text mediumtext(16777215) NOT NULL DEFAULT '',
|
||||
reported_post_uid varchar(8) NOT NULL DEFAULT '',
|
||||
reported_post_bitfield varchar(255) NOT NULL DEFAULT ''
|
||||
reported_post_bitfield varchar(255) NOT NULL DEFAULT '',
|
||||
reported_post_enable_magic_url INTEGER UNSIGNED NOT NULL DEFAULT '1',
|
||||
reported_post_enable_smilies INTEGER UNSIGNED NOT NULL DEFAULT '1',
|
||||
reported_post_enable_bbcode INTEGER UNSIGNED NOT NULL DEFAULT '1'
|
||||
);
|
||||
|
||||
CREATE INDEX phpbb_reports_post_id ON phpbb_reports (post_id);
|
||||
|
|
|
@ -374,7 +374,7 @@ $lang = array_merge($lang, array(
|
|||
|
||||
// Updater
|
||||
$lang = array_merge($lang, array(
|
||||
'ALL_FILES_UP_TO_DATE' => 'All files are up to date with the latest phpBB version. You should now <a href="../ucp.php?mode=login">login to your board</a> and check if everything is working fine. Do not forget to delete, rename or move your install directory! Please send us updated information about your server and board configurations from the <a href="../ucp.php?mode=login&redirect=adm/index.php%3Fi=send_statistics%26mode=send_statistics">Send statistics</a> module in your ACP.',
|
||||
'ALL_FILES_UP_TO_DATE' => 'All files are up to date with the latest phpBB version. You should now <a href="%1$s">login to your board</a> and check if everything is working fine. Do not forget to delete, rename or move your install directory! Please send us updated information about your server and board configurations from the <a href="%2$s">Send statistics</a> module in your ACP.',
|
||||
'ARCHIVE_FILE' => 'Source file within archive',
|
||||
|
||||
'BACK' => 'Back',
|
||||
|
|
|
@ -649,7 +649,7 @@ switch ($mode)
|
|||
'S_GROUP_OPTIONS' => $group_options,
|
||||
'S_CUSTOM_FIELDS' => (isset($profile_fields['row']) && sizeof($profile_fields['row'])) ? true : false,
|
||||
|
||||
'U_USER_ADMIN' => ($auth->acl_get('a_user')) ? append_sid("{$phpbb_root_path}adm/index.$phpEx", 'i=users&mode=overview&u=' . $user_id, true, $user->session_id) : '',
|
||||
'U_USER_ADMIN' => ($auth->acl_get('a_user')) ? append_sid("{$phpbb_admin_path}index.$phpEx", 'i=users&mode=overview&u=' . $user_id, true, $user->session_id) : '',
|
||||
'U_USER_BAN' => ($auth->acl_get('m_ban') && $user_id != $user->data['user_id']) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=ban&mode=user&u=' . $user_id, true, $user->session_id) : '',
|
||||
'U_MCP_QUEUE' => ($auth->acl_getf_global('m_approve')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue', true, $user->session_id) : '',
|
||||
|
||||
|
|
|
@ -1116,8 +1116,9 @@ if ($submit || $preview || $refresh)
|
|||
$captcha->reset();
|
||||
}
|
||||
|
||||
// Check the permissions for post approval. Moderators are not affected.
|
||||
if ((!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id']) && empty($data['force_approved_state'])) || (isset($data['force_approved_state']) && !$data['force_approved_state']))
|
||||
// Check the permissions for post approval.
|
||||
// Moderators must go through post approval like ordinary users.
|
||||
if ((!$auth->acl_get('f_noapprove', $data['forum_id']) && empty($data['force_approved_state'])) || (isset($data['force_approved_state']) && !$data['force_approved_state']))
|
||||
{
|
||||
meta_refresh(10, $redirect_url);
|
||||
$message = ($mode == 'edit') ? $user->lang['POST_EDITED_MOD'] : $user->lang['POST_STORED_MOD'];
|
||||
|
|
|
@ -71,11 +71,14 @@ if ($post_id)
|
|||
trigger_error('POST_NOT_EXIST');
|
||||
}
|
||||
|
||||
$forum_id = (int) $report_data['forum_id'];
|
||||
$topic_id = (int) $report_data['topic_id'];
|
||||
$reported_post_text = $report_data['post_text'];
|
||||
$reported_post_bitfield = $report_data['bbcode_bitfield'];
|
||||
$reported_post_uid = $report_data['bbcode_uid'];
|
||||
$forum_id = (int) $report_data['forum_id'];
|
||||
$topic_id = (int) $report_data['topic_id'];
|
||||
$reported_post_text = $report_data['post_text'];
|
||||
$reported_post_bitfield = $report_data['bbcode_bitfield'];
|
||||
$reported_post_uid = $report_data['bbcode_uid'];
|
||||
$reported_post_enable_bbcode = $report_data['enable_bbcode'];
|
||||
$reported_post_enable_smilies = $report_data['enable_smilies'];
|
||||
$reported_post_enable_magic_url = $report_data['enable_magic_url'];
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
|
@ -134,9 +137,11 @@ else
|
|||
trigger_error($message);
|
||||
}
|
||||
|
||||
$reported_post_text = $report_data['message_text'];
|
||||
$reported_post_bitfield = $report_data['bbcode_bitfield'];
|
||||
$reported_post_uid = $report_data['bbcode_uid'];
|
||||
$reported_post_text = $report_data['message_text'];
|
||||
$reported_post_bitfield = $report_data['bbcode_bitfield'];
|
||||
$reported_post_enable_bbcode = $report_data['reported_post_enable_bbcode'];
|
||||
$reported_post_enable_smilies = $report_data['reported_post_enable_smilies'];
|
||||
$reported_post_enable_magic_url = $report_data['reported_post_enable_magic_url'];
|
||||
}
|
||||
|
||||
// Submit report?
|
||||
|
@ -155,17 +160,20 @@ if ($submit && $reason_id)
|
|||
}
|
||||
|
||||
$sql_ary = array(
|
||||
'reason_id' => (int) $reason_id,
|
||||
'post_id' => $post_id,
|
||||
'pm_id' => $pm_id,
|
||||
'user_id' => (int) $user->data['user_id'],
|
||||
'user_notify' => (int) $user_notify,
|
||||
'report_closed' => 0,
|
||||
'report_time' => (int) time(),
|
||||
'report_text' => (string) $report_text,
|
||||
'reported_post_text' => $reported_post_text,
|
||||
'reported_post_uid' => $reported_post_uid,
|
||||
'reported_post_bitfield'=> $reported_post_bitfield,
|
||||
'reason_id' => (int) $reason_id,
|
||||
'post_id' => $post_id,
|
||||
'pm_id' => $pm_id,
|
||||
'user_id' => (int) $user->data['user_id'],
|
||||
'user_notify' => (int) $user_notify,
|
||||
'report_closed' => 0,
|
||||
'report_time' => (int) time(),
|
||||
'report_text' => (string) $report_text,
|
||||
'reported_post_text' => $reported_post_text,
|
||||
'reported_post_uid' => $reported_post_uid,
|
||||
'reported_post_bitfield' => $reported_post_bitfield,
|
||||
'reported_post_enable_bbcode' => $reported_post_enable_bbcode,
|
||||
'reported_post_enable_smilies' => $reported_post_enable_smilies,
|
||||
'reported_post_enable_magic_url' => $reported_post_enable_magic_url,
|
||||
);
|
||||
|
||||
$sql = 'INSERT INTO ' . REPORTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
|
||||
|
|
|
@ -2,17 +2,103 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
// This callback finds the post from the delete link, and removes it.
|
||||
phpbb.add_ajax_callback('post_delete', function() {
|
||||
var el = $(this),
|
||||
post_id;
|
||||
/**
|
||||
* Close popup alert after a specified delay
|
||||
*
|
||||
* @param int Delay in ms until darkenwrapper's click event is triggered
|
||||
*/
|
||||
phpbb.closeDarkenWrapper = function(delay) {
|
||||
setTimeout(function() {
|
||||
$('#darkenwrapper').trigger('click');
|
||||
}, delay);
|
||||
};
|
||||
|
||||
if (el.attr('data-refresh') === undefined)
|
||||
{
|
||||
post_id = el[0].href.split('&p=')[1];
|
||||
var post = el.parents('#p' + post_id).css('pointer-events', 'none');
|
||||
if (post.hasClass('bg1') || post.hasClass('bg2'))
|
||||
{
|
||||
// This callback will mark all forum icons read
|
||||
phpbb.addAjaxCallback('mark_forums_read', function(res) {
|
||||
var readTitle = res.NO_UNREAD_POSTS;
|
||||
var unreadTitle = res.UNREAD_POSTS;
|
||||
var iconsArray = {
|
||||
'forum_unread': 'forum_read',
|
||||
'forum_unread_subforum': 'forum_read_subforum',
|
||||
'forum_unread_locked': 'forum_read_locked'
|
||||
};
|
||||
|
||||
$('li.row').find('dl[class*="forum_unread"]').each(function() {
|
||||
var $this = $(this);
|
||||
|
||||
$.each(iconsArray, function(unreadClass, readClass) {
|
||||
if ($this.hasClass(unreadClass)) {
|
||||
$this.removeClass(unreadClass).addClass(readClass);
|
||||
}
|
||||
});
|
||||
$this.children('dt[title="' + unreadTitle + '"]').attr('title', readTitle);
|
||||
});
|
||||
|
||||
// Mark subforums read
|
||||
$('a.subforum[class*="unread"]').removeClass('unread').addClass('read');
|
||||
|
||||
// Update mark forums read links
|
||||
$('[data-ajax="mark_forums_read"]').attr('href', res.U_MARK_FORUMS);
|
||||
|
||||
phpbb.closeDarkenWrapper(3000);
|
||||
});
|
||||
|
||||
// This callback will mark all topic icons read
|
||||
phpbb.addAjaxCallback('mark_topics_read', function(res) {
|
||||
var readTitle = res.NO_UNREAD_POSTS;
|
||||
var unreadTitle = res.UNREAD_POSTS;
|
||||
var iconsArray = {
|
||||
'global_unread': 'global_read',
|
||||
'announce_unread': 'announce_read',
|
||||
'sticky_unread': 'sticky_read',
|
||||
'topic_unread': 'topic_read'
|
||||
};
|
||||
var iconsState = ['', '_hot', '_hot_mine', '_locked', '_locked_mine', '_mine'];
|
||||
var unreadClassSelectors = '';
|
||||
var classMap = {};
|
||||
var classNames = [];
|
||||
|
||||
$.each(iconsArray, function(unreadClass, readClass) {
|
||||
$.each(iconsState, function(key, value) {
|
||||
// Only topics can be hot
|
||||
if ((value == '_hot' || value == '_hot_mine') && unreadClass != 'topic_unread') {
|
||||
return true;
|
||||
}
|
||||
classMap[unreadClass + value] = readClass + value;
|
||||
classNames.push(unreadClass + value);
|
||||
});
|
||||
});
|
||||
|
||||
unreadClassSelectors = '.' + classNames.join(',.');
|
||||
|
||||
$('li.row').find(unreadClassSelectors).each(function() {
|
||||
var $this = $(this);
|
||||
$.each(classMap, function(unreadClass, readClass) {
|
||||
if ($this.hasClass(unreadClass)) {
|
||||
$this.removeClass(unreadClass).addClass(readClass);
|
||||
}
|
||||
});
|
||||
$this.children('dt[title="' + unreadTitle + '"]').attr('title', readTitle);
|
||||
});
|
||||
|
||||
// Remove link to first unread post
|
||||
$('a').has('span.icon_topic_newest').remove();
|
||||
|
||||
// Update mark topics read links
|
||||
$('[data-ajax="mark_topics_read"]').attr('href', res.U_MARK_TOPICS);
|
||||
|
||||
phpbb.closeDarkenWrapper(3000);
|
||||
});
|
||||
|
||||
// This callback finds the post from the delete link, and removes it.
|
||||
phpbb.addAjaxCallback('post_delete', function() {
|
||||
var el = $(this),
|
||||
postId;
|
||||
|
||||
if (el.attr('data-refresh') === undefined) {
|
||||
postId = el[0].href.split('&p=')[1];
|
||||
var post = el.parents('#p' + postId).css('pointer-events', 'none');
|
||||
if (post.hasClass('bg1') || post.hasClass('bg2')) {
|
||||
var posts1 = post.nextAll('.bg1');
|
||||
post.nextAll('.bg2').removeClass('bg2').addClass('bg1');
|
||||
posts1.removeClass('bg1').addClass('bg2');
|
||||
|
@ -24,7 +110,7 @@ phpbb.add_ajax_callback('post_delete', function() {
|
|||
});
|
||||
|
||||
// This callback removes the approve / disapprove div or link.
|
||||
phpbb.add_ajax_callback('post_approve', function(res) {
|
||||
phpbb.addAjaxCallback('post_approve', function(res) {
|
||||
var remove = (res.approved) ? $(this) : $(this).parents('.post');
|
||||
$(remove).css('pointer-events', 'none').fadeOut(function() {
|
||||
$(this).remove();
|
||||
|
@ -32,12 +118,12 @@ phpbb.add_ajax_callback('post_approve', function(res) {
|
|||
});
|
||||
|
||||
// This removes the parent row of the link or form that fired the callback.
|
||||
phpbb.add_ajax_callback('row_delete', function() {
|
||||
phpbb.addAjaxCallback('row_delete', function() {
|
||||
$(this).parents('tr').remove();
|
||||
});
|
||||
|
||||
// This handles friend / foe additions removals.
|
||||
phpbb.add_ajax_callback('zebra', function(res) {
|
||||
phpbb.addAjaxCallback('zebra', function(res) {
|
||||
var zebra;
|
||||
|
||||
if (res.success) {
|
||||
|
@ -54,8 +140,7 @@ $('[data-ajax]').each(function() {
|
|||
ajax = $this.attr('data-ajax'),
|
||||
fn;
|
||||
|
||||
if (ajax !== 'false')
|
||||
{
|
||||
if (ajax !== 'false') {
|
||||
fn = (ajax !== 'true') ? ajax : null;
|
||||
phpbb.ajaxify({
|
||||
selector: this,
|
||||
|
@ -76,19 +161,6 @@ $('#qr_full_editor').click(function() {
|
|||
});
|
||||
});
|
||||
|
||||
// Toggle notification list
|
||||
$('#notification_list_button').click(function(e) {
|
||||
$('#notification_list').toggle();
|
||||
e.preventDefault();
|
||||
});
|
||||
$('#phpbb').click(function(e) {
|
||||
var target = e.target;
|
||||
|
||||
if (!$(target).is('#notification_list') && !$(target).is('#notification_list_button') && !$(target).parents().is('#notification_list')) {
|
||||
$('#notification_list').hide();
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* This AJAXifies the quick-mod tools. The reason it cannot be a standard
|
||||
* callback / data attribute is that it requires filtering - some of the options
|
||||
|
@ -100,12 +172,9 @@ phpbb.ajaxify({
|
|||
filter: function (data) {
|
||||
var action = $('#quick-mod-select').val();
|
||||
|
||||
if (action === 'make_normal')
|
||||
{
|
||||
if (action === 'make_normal') {
|
||||
return $(this).find('select option[value="make_global"]').length > 0;
|
||||
}
|
||||
else if (action === 'lock' || action === 'unlock')
|
||||
{
|
||||
} else if (action === 'lock' || action === 'unlock') {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
<!-- IF forumrow.U_UNAPPROVED_TOPICS --><a href="{forumrow.U_UNAPPROVED_TOPICS}">{UNAPPROVED_IMG}</a><!-- ENDIF -->
|
||||
<!-- IF forumrow.LAST_POST_TIME --><dfn>{L_LAST_POST}</dfn>
|
||||
<!-- IF forumrow.S_DISPLAY_SUBJECT -->
|
||||
<!-- EVENT forumlist_body_last_post_title_prepend -->
|
||||
<a href="{forumrow.U_LAST_POST}" title="{forumrow.LAST_POST_SUBJECT}" class="lastsubject">{forumrow.LAST_POST_SUBJECT_TRUNCATED}</a> <br />
|
||||
<!-- ENDIF -->
|
||||
{L_POST_BY_AUTHOR} {forumrow.LAST_POSTER_FULL}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<!-- IF S_DISPLAY_SEARCH -->
|
||||
<li><a href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a><!-- IF S_LOAD_UNREADS --> • <a href="{U_SEARCH_UNREAD}">{L_SEARCH_UNREAD}</a><!-- ENDIF --><!-- IF S_USER_LOGGED_IN --> • <a href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a><!-- ENDIF --> • <a href="{U_SEARCH_ACTIVE_TOPICS}">{L_SEARCH_ACTIVE_TOPICS}</a></li>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF not S_IS_BOT and U_MARK_FORUMS --><li class="rightside"><a href="{U_MARK_FORUMS}" accesskey="m" data-ajax="true">{L_MARK_FORUMS_READ}</a></li><!-- ENDIF -->
|
||||
<!-- IF not S_IS_BOT and U_MARK_FORUMS --><li class="rightside"><a href="{U_MARK_FORUMS}" accesskey="m" data-ajax="mark_forums_read" data-overlay="false">{L_MARK_FORUMS_READ}</a></li><!-- ENDIF -->
|
||||
</ul>
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
@ -29,6 +29,8 @@
|
|||
</form>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- EVENT index_body_stat_blocks_before -->
|
||||
|
||||
<!-- IF S_DISPLAY_ONLINE_LIST -->
|
||||
<!-- IF U_VIEWONLINE --><h3><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></h3><!-- ELSE --><h3>{L_WHO_IS_ONLINE}</h3><!-- ENDIF -->
|
||||
<p>{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}<br /> <br />{LOGGED_IN_USER_LIST}
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
<div class="inner">
|
||||
|
||||
<ul class="linklist">
|
||||
<li class="icon-home"><!-- IF U_SITE_HOME --><a href="{U_SITE_HOME}">{L_SITE_HOME}</a> <strong>‹</strong> <!-- ENDIF --><a href="{U_INDEX}" accesskey="h">{L_INDEX}</a></li>
|
||||
<li class="icon-home"><!-- IF U_SITE_HOME --><a href="{U_SITE_HOME}">{L_SITE_HOME}</a> <strong>‹</strong> <!-- ENDIF --><a href="{U_INDEX}" accesskey="h">{L_INDEX}</a>
|
||||
<!-- 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 -->
|
||||
|
@ -19,8 +20,11 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="copyright">{CREDIT_LINE}
|
||||
<div class="copyright">
|
||||
<!-- EVENT overall_footer_copyright_prepend -->
|
||||
{CREDIT_LINE}
|
||||
<!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF -->
|
||||
<!-- EVENT overall_footer_copyright_append -->
|
||||
<!-- IF DEBUG_OUTPUT --><br />{DEBUG_OUTPUT}<!-- ENDIF -->
|
||||
<!-- IF U_ACP --><br /><strong><a href="{U_ACP}">{L_ACP}</a></strong><!-- ENDIF -->
|
||||
</div>
|
||||
|
@ -55,5 +59,6 @@
|
|||
<!-- INCLUDEJS template/ajax.js -->
|
||||
{SCRIPTS}
|
||||
|
||||
<!-- EVENT overall_footer_after -->
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -84,8 +84,9 @@
|
|||
<link href="{T_THEME_PATH}/tweaks.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="screen, projection" />
|
||||
<![endif]-->
|
||||
|
||||
</head>
|
||||
<!-- EVENT overall_header_head_append -->
|
||||
|
||||
</head>
|
||||
<body id="phpbb" class="section-{SCRIPT_NAME} {S_CONTENT_DIRECTION}">
|
||||
|
||||
<div id="wrap">
|
||||
|
@ -121,7 +122,11 @@
|
|||
|
||||
<ul class="linklist navlinks">
|
||||
<!-- DEFINE $MICRODATA = ' itemtype="http://data-vocabulary.org/Breadcrumb" itemscope=""' -->
|
||||
<li class="icon-home"><!-- IF U_SITE_HOME --><a href="{U_SITE_HOME}"{$MICRODATA}>{L_SITE_HOME}</a> <strong>‹</strong> <!-- ENDIF --><a href="{U_INDEX}" accesskey="h"{$MICRODATA}>{L_INDEX}</a> <!-- BEGIN navlinks --> <strong>‹</strong> <a href="{navlinks.U_VIEW_FORUM}"{$MICRODATA}>{navlinks.FORUM_NAME}</a><!-- END navlinks --></li>
|
||||
<li class="icon-home"><!-- IF U_SITE_HOME --><a href="{U_SITE_HOME}"{$MICRODATA}>{L_SITE_HOME}</a> <strong>‹</strong> <!-- ENDIF -->
|
||||
<a href="{U_INDEX}" accesskey="h"{$MICRODATA}>{L_INDEX}</a>
|
||||
<!-- BEGIN navlinks --> <strong>‹</strong> <a href="{navlinks.U_VIEW_FORUM}"{$MICRODATA}>{navlinks.FORUM_NAME}</a><!-- END navlinks -->
|
||||
<!-- EVENT overall_header_breadcrumb_append -->
|
||||
</li>
|
||||
|
||||
<!-- IF U_EMAIL_TOPIC --><li class="rightside"><a href="{U_EMAIL_TOPIC}" title="{L_EMAIL_TOPIC}" class="sendemail">{L_EMAIL_TOPIC}</a></li><!-- ENDIF -->
|
||||
<!-- IF U_EMAIL_PM --><li class="rightside"><a href="{U_EMAIL_PM}" title="{L_EMAIL_PM}" class="sendemail">{L_EMAIL_PM}</a></li><!-- ENDIF -->
|
||||
|
@ -183,12 +188,14 @@
|
|||
<!-- ENDIF -->
|
||||
|
||||
<ul class="linklist rightside">
|
||||
<!-- EVENT overall_header_navigation_prepend -->
|
||||
<li class="icon-faq"><a href="{U_FAQ}" title="{L_FAQ_EXPLAIN}">{L_FAQ}</a></li>
|
||||
<!-- IF not S_IS_BOT -->
|
||||
<!-- IF S_DISPLAY_MEMBERLIST --><li class="icon-members"><a href="{U_MEMBERLIST}" title="{L_MEMBERLIST_EXPLAIN}">{L_MEMBERLIST}</a></li><!-- ENDIF -->
|
||||
<!-- IF not S_USER_LOGGED_IN and S_REGISTER_ENABLED and not (S_SHOW_COPPA or S_REGISTRATION) --><li class="icon-register"><a href="{U_REGISTER}">{L_REGISTER}</a></li><!-- ENDIF -->
|
||||
<li class="icon-logout"><a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x">{L_LOGIN_LOGOUT}</a></li>
|
||||
<!-- ENDIF -->
|
||||
<!-- EVENT overall_header_navigation_append -->
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -213,6 +213,7 @@
|
|||
<div class="inner">
|
||||
|
||||
<fieldset class="fields1">
|
||||
<!-- EVENT posting_editor_options_prepend -->
|
||||
<!-- IF S_BBCODE_ALLOWED -->
|
||||
<div><label for="disable_bbcode"><input type="checkbox" name="disable_bbcode" id="disable_bbcode"{S_BBCODE_CHECKED} /> {L_DISABLE_BBCODE}</label></div>
|
||||
<!-- ENDIF -->
|
||||
|
|
|
@ -10,5 +10,6 @@
|
|||
<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
|
||||
{SCRIPTS}
|
||||
|
||||
<!-- EVENT simple_footer_after -->
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
(function($) { // Avoid conflicts with other libraries
|
||||
|
||||
$('#tz_date').change(function() {
|
||||
phpbb.timezone_switch_date(false);
|
||||
phpbb.timezoneSwitchDate(false);
|
||||
});
|
||||
|
||||
$('#tz_select_date_suggest').click(function(){
|
||||
phpbb.timezone_preselect_select(true);
|
||||
phpbb.timezonePreselectSelect(true);
|
||||
});
|
||||
|
||||
$(document).ready(
|
||||
phpbb.timezone_enable_date_selection
|
||||
phpbb.timezoneEnableDateSelection
|
||||
);
|
||||
|
||||
$(document).ready(
|
||||
phpbb.timezone_preselect_select($('#tz_select_date_suggest').attr('data-is-registration') == 'true')
|
||||
phpbb.timezonePreselectSelect($('#tz_select_date_suggest').attr('data-is-registration') == 'true')
|
||||
);
|
||||
|
||||
})(jQuery); // Avoid conflicts with other libraries
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
<title>{SITENAME} • {PAGE_TITLE}</title>
|
||||
|
||||
<link href="{T_THEME_PATH}/print.css" rel="stylesheet" type="text/css" />
|
||||
<!-- EVENT ucp_pm_viewmessage_print_head_append -->
|
||||
</head>
|
||||
|
||||
<body id="phpbb">
|
||||
<div id="wrap">
|
||||
<a id="top" accesskey="t"></a>
|
||||
|
|
|
@ -104,7 +104,4 @@
|
|||
</div>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/timezone.js"></script>
|
||||
<script type="text/javascript">phpbb_preselect_tz_select();</script>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<!-- IF S_HAS_SUBFORUM -->
|
||||
<!-- IF not S_IS_BOT and U_MARK_FORUMS -->
|
||||
<ul class="linklist">
|
||||
<li class="rightside"><a href="{U_MARK_FORUMS}">{L_MARK_SUBFORUMS_READ}</a></li>
|
||||
<li class="rightside"><a href="{U_MARK_FORUMS}" data-ajax="mark_forums_read" data-overlay="false">{L_MARK_SUBFORUMS_READ}</a></li>
|
||||
</ul>
|
||||
<!-- ENDIF -->
|
||||
<!-- INCLUDE forumlist_body.html -->
|
||||
|
@ -57,7 +57,7 @@
|
|||
|
||||
<!-- IF .pagination or TOTAL_POSTS or TOTAL_TOPICS -->
|
||||
<div class="pagination">
|
||||
<!-- IF not S_IS_BOT and U_MARK_TOPICS --><a href="{U_MARK_TOPICS}" accesskey="m" data-ajax="true">{L_MARK_TOPICS_READ}</a> • <!-- ENDIF -->
|
||||
<!-- IF not S_IS_BOT and U_MARK_TOPICS --><a href="{U_MARK_TOPICS}" accesskey="m" data-ajax="mark_topics_read" data-overlay="false">{L_MARK_TOPICS_READ}</a> • <!-- ENDIF -->
|
||||
<!-- IF TOTAL_TOPICS -->{TOTAL_TOPICS} • <!-- ENDIF -->
|
||||
<!-- IF .pagination -->
|
||||
<!-- INCLUDE pagination.html -->
|
||||
|
@ -211,7 +211,7 @@
|
|||
|
||||
<!-- IF PAGE_NUMBER or TOTAL_POSTS or TOTAL_TOPICS -->
|
||||
<div class="pagination">
|
||||
<!-- IF TOTAL_TOPICS and not S_IS_BOT and U_MARK_TOPICS --><a href="{U_MARK_TOPICS}">{L_MARK_TOPICS_READ}</a> • <!-- ENDIF -->
|
||||
<!-- IF TOTAL_TOPICS and not S_IS_BOT and U_MARK_TOPICS --><a href="{U_MARK_TOPICS}" data-ajax="mark_topics_read" data-overlay="false">{L_MARK_TOPICS_READ}</a> • <!-- ENDIF -->
|
||||
<!-- IF TOTAL_POSTS and not NEWEST_USER --> {TOTAL_POSTS}<!-- ELSEIF TOTAL_TOPICS and not NEWEST_USER --> {TOTAL_TOPICS} • <!-- ENDIF -->
|
||||
<!-- IF TOTAL_USERS -->{TOTAL_USERS} • <!-- ENDIF -->
|
||||
<!-- IF .pagination -->
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<!-- INCLUDE overall_header.html -->
|
||||
<!-- IF U_MCP --><p>[ <a href="{U_MCP}">{L_MCP}</a> ]</p><!-- ENDIF -->
|
||||
<h2><a href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h2>
|
||||
<h2><!-- EVENT viewtopic_topic_title_prepend --><a href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h2>
|
||||
<!-- NOTE: remove the style="display: none" when you want to have the forum description on the topic body -->
|
||||
<!-- IF FORUM_DESC --><div style="display: none !important;">{FORUM_DESC}<br /></div><!-- ENDIF -->
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
<title>{SITENAME} • {PAGE_TITLE}</title>
|
||||
|
||||
<link href="{T_THEME_PATH}/print.css" rel="stylesheet" type="text/css" />
|
||||
<!-- EVENT viewtopic_print_head_append -->
|
||||
</head>
|
||||
|
||||
<body id="phpbb">
|
||||
<div id="wrap">
|
||||
<a id="top" accesskey="t"></a>
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
<table class="tablebg" width="100%" cellspacing="1" cellpadding="0" style="margin-top: 5px;">
|
||||
<tr>
|
||||
<td class="row1">
|
||||
<p class="breadcrumbs"><!-- IF U_SITE_HOME --><a href="{U_SITE_HOME}"{$MICRODATA}>{L_SITE_HOME}</a> <strong>»</strong> <!-- ENDIF --><a href="{U_INDEX}"{$MICRODATA}>{L_INDEX}</a><!-- BEGIN navlinks --> » <a href="{navlinks.U_VIEW_FORUM}"{$MICRODATA}>{navlinks.FORUM_NAME}</a><!-- END navlinks --></p>
|
||||
<p class="breadcrumbs"><!-- IF U_SITE_HOME --><a href="{U_SITE_HOME}"{$MICRODATA}>{L_SITE_HOME}</a> <strong>»</strong> <!-- ENDIF --><a href="{U_INDEX}"{$MICRODATA}>{L_INDEX}</a><!-- BEGIN navlinks --> » <a href="{navlinks.U_VIEW_FORUM}"{$MICRODATA}>{navlinks.FORUM_NAME}</a><!-- END navlinks -->
|
||||
<!-- EVENT overall_header_breadcrumb_append --></p>
|
||||
<p class="datetime">{S_TIMEZONE}</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
(function($) { // Avoid conflicts with other libraries
|
||||
|
||||
"use strict";
|
||||
|
||||
// Toggle notification list
|
||||
$('#notification_list_button').click(function(e) {
|
||||
$('#notification_list').toggle();
|
||||
e.preventDefault();
|
||||
});
|
||||
$(document).click(function(e) {
|
||||
var target = e.target;
|
||||
|
||||
if (!$(target).is('#notification_list') && !$(target).is('#notification_list_button') && !$(target).parents().is('#notification_list')) {
|
||||
$('#notification_list').hide();
|
||||
}
|
||||
});
|
||||
|
||||
})(jQuery); // Avoid conflicts with other libraries
|
|
@ -61,6 +61,7 @@
|
|||
<td class="row2" align="center" nowrap="nowrap">
|
||||
<!-- IF forumrow.LAST_POST_TIME -->
|
||||
<!-- IF forumrow.S_DISPLAY_SUBJECT -->
|
||||
<!-- EVENT forumlist_body_last_post_title_prepend -->
|
||||
<p class="topicdetails"><a href="{forumrow.U_LAST_POST}" title="{forumrow.LAST_POST_SUBJECT}" class="lastsubject">{forumrow.LAST_POST_SUBJECT_TRUNCATED}</a></p>
|
||||
<!-- ENDIF -->
|
||||
<p class="topicdetails"><!-- IF forumrow.U_UNAPPROVED_TOPICS --><a href="{forumrow.U_UNAPPROVED_TOPICS}" class="imageset">{UNAPPROVED_IMG}</a> <!-- ENDIF -->{forumrow.LAST_POST_TIME}</p>
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
|
||||
<!-- INCLUDE breadcrumbs.html -->
|
||||
|
||||
<!-- EVENT index_body_stat_blocks_before -->
|
||||
|
||||
<!-- IF S_DISPLAY_ONLINE_LIST -->
|
||||
<br clear="all" />
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue