mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
Merge remote-tracking branch 'upstream/develop' into ticket/11574
* upstream/develop: (575 commits) [ticket/11702] Fix forum_posts left over for link-click counts in viewforum.php [ticket/11696] Move file to new directory [ticket/11696] Rename constructor to __construct() [ticket/11696] Remove manual loading of db_tools in extension controller test [ticket/11696] Rename db_tools.php so it can be autoloaded [ticket/11698] Moving all autoloadable files to phpbb/ [ticket/11694] Do not locate assets with root path [ticket/11692] Don't update search_type in dev migration if already appended [ticket/11675] Fix template loop [ticket/11690] Old module class names may get autoloaded by class_exists [ticket/9649] Display information on index for moderators on unapproved posts [ticket/10999] Fix assets_version in ACP [prep-release-3.0.12] More changelog items for the 3.0.12 release. [ticket/11687] Add assets_version to phpbb_config [ticket/11686] Not checking for phpBB Debug errors on functional tests [ticket/11670] Consistency with logo: Replace "phpBB(tm)" with "phpBB(R)". [ticket/11674] Do not include vendor folder if there are no dependencies. [ticket/11685] Remove logout confirmation page [ticket/11684] Remove useless confirmation page after login and admin login [ticket/9657] Define user before injecting ... Conflicts: phpBB/includes/functions_container.php phpBB/install/database_update.php phpBB/install/index.php
This commit is contained in:
commit
f6865dc33a
509 changed files with 12804 additions and 6068 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,5 +1,6 @@
|
|||
*~
|
||||
/phpunit.xml
|
||||
/phpBB/cache/twig/*
|
||||
/phpBB/cache/*.html
|
||||
/phpBB/cache/*.php
|
||||
/phpBB/cache/*.lock
|
||||
|
|
|
@ -169,26 +169,42 @@
|
|||
command="git archive ${revision} | tar -xf - -C ../${dir}"
|
||||
checkreturn="true" />
|
||||
|
||||
<!--
|
||||
If composer.phar exists in this version of the tree, also export
|
||||
it into ${dir}, install dependencies, then delete it again.
|
||||
-->
|
||||
<!-- Install composer dependencies, if there are any. -->
|
||||
<exec dir="."
|
||||
command="git ls-tree ${revision} composer.phar"
|
||||
command='php -r "\$j = json_decode(file_get_contents("composer.json")); echo isset(\$j->require);"'
|
||||
checkreturn="true"
|
||||
outputProperty='composer-ls-tree-output' />
|
||||
outputProperty='composer-has-dependencies' />
|
||||
<if>
|
||||
<not><equals arg1="${composer-ls-tree-output}" arg2="" trim="true" /></not>
|
||||
<equals arg1="${composer-has-dependencies}" arg2="1" trim="true" />
|
||||
<then>
|
||||
<!-- We have non-dev composer dependencies -->
|
||||
<exec dir="."
|
||||
command="git archive ${revision} composer.phar | tar -xf - -C ${dir}"
|
||||
checkreturn="true" />
|
||||
<exec dir="${dir}"
|
||||
command="php composer.phar install"
|
||||
command="git ls-tree ${revision} composer.phar"
|
||||
checkreturn="true"
|
||||
passthru="true" />
|
||||
<delete file="${dir}/composer.phar" />
|
||||
outputProperty='composer-ls-tree-output' />
|
||||
<if>
|
||||
<equals arg1="${composer-ls-tree-output}" arg2="" trim="true" />
|
||||
<then>
|
||||
<fail message="There are composer dependencies, but composer.phar is missing." />
|
||||
</then>
|
||||
<else>
|
||||
<!-- Export the phar, install dependencies, delete phar. -->
|
||||
<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" />
|
||||
</else>
|
||||
</if>
|
||||
</then>
|
||||
<else>
|
||||
<!-- We do not have composer dependencies, do not ship composer files -->
|
||||
<delete file="${dir}/composer.json" />
|
||||
<delete file="${dir}/composer.lock" />
|
||||
</else>
|
||||
</if>
|
||||
|
||||
<delete file="${dir}/config.php" />
|
||||
|
|
|
@ -33,9 +33,7 @@ else
|
|||
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
|
||||
fi
|
||||
|
||||
error=0
|
||||
errors=""
|
||||
|
||||
if ! which "$PHP_BIN" >/dev/null 2>&1
|
||||
then
|
||||
echo "PHP Syntax check failed:"
|
||||
|
@ -73,63 +71,18 @@ do
|
|||
|
||||
# check the staged file content for syntax errors
|
||||
# using php -l (lint)
|
||||
# note: if display_errors=stderr in php.ini,
|
||||
# parse errors are printed on stderr; otherwise
|
||||
# they are printed on stdout.
|
||||
# we filter everything other than parse errors
|
||||
# with a grep below, therefore it should be safe
|
||||
# to combine stdout and stderr in all circumstances
|
||||
result=$(git cat-file -p $sha | "$PHP_BIN" -l 2>&1)
|
||||
result=$(git cat-file -p $sha | "$PHP_BIN" -n -l -ddisplay_errors\=1 -derror_reporting\=E_ALL -dlog_errrors\=0 2>&1)
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
error=1
|
||||
# Swap back in correct filenames
|
||||
errors=$(echo "$errors"; echo "$result" |sed -e "s@in - on@in $filename on@g")
|
||||
errors=$(echo "$errors"; echo "$result" | grep ':' | sed -e "s@in - on@in $filename on@g")
|
||||
fi
|
||||
done
|
||||
unset IFS
|
||||
|
||||
if [ $error -eq 1 ]
|
||||
if [ -n "$errors" ]
|
||||
then
|
||||
echo "PHP Syntax check failed:"
|
||||
# php "display errors" (display_errors php.ini value)
|
||||
# and "log errors" (log_errors php.ini value).
|
||||
# these are independent settings - see main/main.c in php source.
|
||||
# the "log errors" setting produces output which
|
||||
# starts with "PHP Parse error:"; the "display errors"
|
||||
# setting produces output starting with "Parse error:".
|
||||
# if both are turned on php dumps the parse error twice.
|
||||
# therefore here we try to grep for one version and
|
||||
# if that yields no results grep for the other version.
|
||||
#
|
||||
# other fun php facts:
|
||||
#
|
||||
# 1. in cli, display_errors and log_errors have different
|
||||
# destinations by default. display_errors prints to
|
||||
# standard output and log_errors prints to standard error.
|
||||
# whether these destinations make sense is left
|
||||
# as an exercise for the reader.
|
||||
# 2. as mentioned above, with all output turned on
|
||||
# php will print parse errors twice, one time on stdout
|
||||
# and one time on stderr.
|
||||
# 3. it is possible to set both display_errors and log_errors
|
||||
# to off. if this is done php will print the text
|
||||
# "Errors parsing <file>" but will not say what
|
||||
# the errors are. useful behavior, this.
|
||||
# 4. on my system display_errors defaults to on and
|
||||
# log_errors defaults to off, therefore providing
|
||||
# by default one copy of messages. your mileage may vary.
|
||||
# 5. by setting display_errors=stderr and log_errors=on,
|
||||
# both sets of messages will be printed on stderr.
|
||||
# 6. php-cgi binary, given display_errors=stderr and
|
||||
# log_errors=on, still prints both sets of messages
|
||||
# on stderr, but formats one set as an html fragment.
|
||||
# 7. your entry here? ;)
|
||||
$echo_e "$errors" | grep "^Parse error:"
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
# match failed
|
||||
$echo_e "$errors" | grep "^PHP Parse error:"
|
||||
fi
|
||||
echo "PHP Syntax check failed: "
|
||||
$echo_e "$errors"
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
@ -124,19 +124,34 @@ function get_repository_url($username, $repository, $ssh = false)
|
|||
|
||||
function api_request($query)
|
||||
{
|
||||
$contents = file_get_contents("http://github.com/api/v2/json/$query");
|
||||
return api_url_request("https://api.github.com/$query?per_page=100");
|
||||
}
|
||||
|
||||
function api_url_request($url)
|
||||
{
|
||||
$contents = file_get_contents($url, false, stream_context_create(array(
|
||||
'http' => array(
|
||||
'header' => "User-Agent: phpBB/1.0\r\n",
|
||||
),
|
||||
)));
|
||||
|
||||
if ($contents === false)
|
||||
{
|
||||
throw new RuntimeException("Error: failed to retrieve pull request data\n", 4);
|
||||
}
|
||||
$contents = json_decode($contents);
|
||||
|
||||
return json_decode($contents);
|
||||
if (isset($contents->message) && strpos($contents->message, 'API Rate Limit') === 0)
|
||||
{
|
||||
throw new RuntimeException('Reached github API Rate Limit. Please try again later' . "\n", 4);
|
||||
}
|
||||
|
||||
return $contents;
|
||||
}
|
||||
|
||||
function get_pull($username, $repository, $pull_id)
|
||||
{
|
||||
$request = api_request("pulls/$username/$repository/$pull_id");
|
||||
$request = api_request("repos/$username/$repository/pulls/$pull_id");
|
||||
|
||||
$pull = $request->pull;
|
||||
|
||||
|
|
|
@ -15,14 +15,14 @@ function show_usage()
|
|||
echo "$filename adds repositories of a github network as remotes to a local git repository.\n";
|
||||
echo "\n";
|
||||
|
||||
echo "Usage: [php] $filename -s collaborators|organisation|contributors|network [OPTIONS]\n";
|
||||
echo "Usage: [php] $filename -s collaborators|organisation|contributors|forks [OPTIONS]\n";
|
||||
echo "\n";
|
||||
|
||||
echo "Scopes:\n";
|
||||
echo " collaborators Repositories of people who have push access to the specified repository\n";
|
||||
echo " contributors Repositories of people who have contributed to the specified repository\n";
|
||||
echo " organisation Repositories of members of the organisation at github\n";
|
||||
echo " network All repositories of the whole github network\n";
|
||||
echo " forks All repositories of the whole github network\n";
|
||||
echo "\n";
|
||||
|
||||
echo "Options:\n";
|
||||
|
@ -55,31 +55,31 @@ exit(work($scope, $username, $repository, $developer));
|
|||
function work($scope, $username, $repository, $developer)
|
||||
{
|
||||
// Get some basic data
|
||||
$network = get_network($username, $repository);
|
||||
$forks = get_forks($username, $repository);
|
||||
$collaborators = get_collaborators($username, $repository);
|
||||
|
||||
if ($network === false || $collaborators === false)
|
||||
if ($forks === false || $collaborators === false)
|
||||
{
|
||||
echo "Error: failed to retrieve network or collaborators\n";
|
||||
echo "Error: failed to retrieve forks or collaborators\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
switch ($scope)
|
||||
{
|
||||
case 'collaborators':
|
||||
$remotes = array_intersect_key($network, $collaborators);
|
||||
$remotes = array_intersect_key($forks, $collaborators);
|
||||
break;
|
||||
|
||||
case 'organisation':
|
||||
$remotes = array_intersect_key($network, get_organisation_members($username));
|
||||
$remotes = array_intersect_key($forks, get_organisation_members($username));
|
||||
break;
|
||||
|
||||
case 'contributors':
|
||||
$remotes = array_intersect_key($network, get_contributors($username, $repository));
|
||||
$remotes = array_intersect_key($forks, get_contributors($username, $repository));
|
||||
break;
|
||||
|
||||
case 'network':
|
||||
$remotes = $network;
|
||||
case 'forks':
|
||||
$remotes = $forks;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -145,26 +145,66 @@ function get_repository_url($username, $repository, $ssh = false)
|
|||
|
||||
function api_request($query)
|
||||
{
|
||||
$contents = file_get_contents("http://github.com/api/v2/json/$query");
|
||||
return api_url_request("https://api.github.com/$query?per_page=100");
|
||||
}
|
||||
|
||||
function api_url_request($url)
|
||||
{
|
||||
$contents = file_get_contents($url, false, stream_context_create(array(
|
||||
'http' => array(
|
||||
'header' => "User-Agent: phpBB/1.0\r\n",
|
||||
),
|
||||
)));
|
||||
|
||||
$sub_request_result = array();
|
||||
// Check headers for pagination links
|
||||
if (!empty($http_response_header))
|
||||
{
|
||||
foreach ($http_response_header as $header_element)
|
||||
{
|
||||
// Find Link Header which gives us a link to the next page
|
||||
if (strpos($header_element, 'Link: ') === 0)
|
||||
{
|
||||
list($head, $header_content) = explode(': ', $header_element);
|
||||
foreach (explode(', ', $header_content) as $links)
|
||||
{
|
||||
list($url, $rel) = explode('; ', $links);
|
||||
if ($rel == 'rel="next"')
|
||||
{
|
||||
// Found a next link, follow it and merge the results
|
||||
$sub_request_result = api_url_request(substr($url, 1, -1));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($contents === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return json_decode($contents);
|
||||
$contents = json_decode($contents);
|
||||
|
||||
if (isset($contents->message) && strpos($contents->message, 'API Rate Limit') === 0)
|
||||
{
|
||||
throw new RuntimeException('Reached github API Rate Limit. Please try again later' . "\n", 4);
|
||||
}
|
||||
|
||||
return ($sub_request_result) ? array_merge($sub_request_result, $contents) : $contents;
|
||||
}
|
||||
|
||||
function get_contributors($username, $repository)
|
||||
{
|
||||
$request = api_request("repos/show/$username/$repository/contributors");
|
||||
$request = api_request("repos/$username/$repository/stats/contributors");
|
||||
if ($request === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$usernames = array();
|
||||
foreach ($request->contributors as $contributor)
|
||||
foreach ($request as $contribution)
|
||||
{
|
||||
$usernames[$contributor->login] = $contributor->login;
|
||||
$usernames[$contribution->author->login] = $contribution->author->login;
|
||||
}
|
||||
|
||||
return $usernames;
|
||||
|
@ -172,14 +212,14 @@ function get_contributors($username, $repository)
|
|||
|
||||
function get_organisation_members($username)
|
||||
{
|
||||
$request = api_request("organizations/$username/public_members");
|
||||
$request = api_request("orgs/$username/public_members");
|
||||
if ($request === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$usernames = array();
|
||||
foreach ($request->users as $member)
|
||||
foreach ($request as $member)
|
||||
{
|
||||
$usernames[$member->login] = $member->login;
|
||||
}
|
||||
|
@ -189,35 +229,35 @@ function get_organisation_members($username)
|
|||
|
||||
function get_collaborators($username, $repository)
|
||||
{
|
||||
$request = api_request("repos/show/$username/$repository/collaborators");
|
||||
$request = api_request("repos/$username/$repository/collaborators");
|
||||
if ($request === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$usernames = array();
|
||||
foreach ($request->collaborators as $collaborator)
|
||||
foreach ($request as $collaborator)
|
||||
{
|
||||
$usernames[$collaborator] = $collaborator;
|
||||
$usernames[$collaborator->login] = $collaborator->login;
|
||||
}
|
||||
|
||||
return $usernames;
|
||||
}
|
||||
|
||||
function get_network($username, $repository)
|
||||
function get_forks($username, $repository)
|
||||
{
|
||||
$request = api_request("repos/show/$username/$repository/network");
|
||||
$request = api_request("repos/$username/$repository/forks");
|
||||
if ($request === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$usernames = array();
|
||||
foreach ($request->network as $network)
|
||||
foreach ($request as $fork)
|
||||
{
|
||||
$usernames[$network->owner] = array(
|
||||
'username' => $network->owner,
|
||||
'repository' => $network->name,
|
||||
$usernames[$fork->owner->login] = array(
|
||||
'username' => $fork->owner->login,
|
||||
'repository' => $fork->name,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
<!-- IF S_AUTH -->
|
||||
<!-- BEGIN auth_tpl -->
|
||||
{auth_tpl.TPL}
|
||||
<!-- INCLUDE {auth_tpl.TEMPLATE_FILE} -->
|
||||
<!-- END auth_tpl -->
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
|
|
@ -437,7 +437,7 @@
|
|||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<p><strong>{NAVIGATION}<!-- IF S_NO_FORUMS --> [<a href="{U_EDIT}">{L_EDIT}</a> | <a href="{U_DELETE}">{L_DELETE}</a><!-- IF not S_LINK --> | <a href="{U_SYNC}">{L_RESYNC}</a><!-- ENDIF --->]<!-- ENDIF --></strong></p>
|
||||
<p><strong>{NAVIGATION}<!-- IF S_NO_FORUMS --> [<a href="{U_EDIT}">{L_EDIT}</a> | <a href="{U_DELETE}">{L_DELETE}</a><!-- IF not S_LINK --> | <a href="{U_SYNC}">{L_RESYNC}</a><!-- ENDIF -->]<!-- ENDIF --></strong></p>
|
||||
|
||||
<!-- IF .forums -->
|
||||
<table cellspacing="1">
|
||||
|
|
|
@ -243,8 +243,8 @@
|
|||
<td style="text-align: center;">{items.EMOTION}</td>
|
||||
<!-- ENDIF -->
|
||||
<td style="text-align: right; white-space: nowrap;">
|
||||
<!-- IF items.S_FIRST_ROW and not PREVIOUS_PAGE -->{ICON_MOVE_UP_DISABLED}<!-- ELSE --><a href="{items.U_MOVE_UP}">{ICON_MOVE_UP}</a><!-- ENDIF -->
|
||||
<!-- IF items.S_LAST_ROW and not NEXT_PAGE -->{ICON_MOVE_DOWN_DISABLED}<!-- ELSE --><a href="{items.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a><!-- ENDIF -->
|
||||
<!-- IF items.S_FIRST_ROW and not U_PREVIOUS_PAGE -->{ICON_MOVE_UP_DISABLED}<!-- ELSE --><a href="{items.U_MOVE_UP}">{ICON_MOVE_UP}</a><!-- ENDIF -->
|
||||
<!-- IF items.S_LAST_ROW and not U_NEXT_PAGE -->{ICON_MOVE_DOWN_DISABLED}<!-- ELSE --><a href="{items.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a><!-- ENDIF -->
|
||||
<a href="{items.U_EDIT}">{ICON_EDIT}</a> <a href="{items.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
32
phpBB/adm/style/auth_provider_ldap.html
Normal file
32
phpBB/adm/style/auth_provider_ldap.html
Normal file
|
@ -0,0 +1,32 @@
|
|||
<dl>
|
||||
<dt><label for="ldap_server">{L_LDAP_SERVER}{L_COLON}</label><br /><span>{L_LDAP_SERVER_EXPLAIN}</span></dt>
|
||||
<dd><input type="text" id="ldap_server" size="40" name="config[ldap_server]" value="{AUTH_LDAP_SERVER}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="ldap_port">{L_LDAP_PORT}{L_COLON}</label><br /><span>{L_LDAP_PORT_EXPLAIN}</span></dt>
|
||||
<dd><input type="text" id="ldap_port" size="40" name="config[ldap_port]" value="{AUTH_LDAP_PORT}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="ldap_dn">{L_LDAP_DN}{L_COLON}</label><br /><span>{L_LDAP_DN_EXPLAIN}</span></dt>
|
||||
<dd><input type="text" id="ldap_dn" size="40" name="config[ldap_base_dn]" value="{AUTH_LDAP_BASE_DN}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="ldap_uid">{L_LDAP_UID}{L_COLON}</label><br /><span>{L_LDAP_UID_EXPLAIN}</span></dt>
|
||||
<dd><input type="text" id="ldap_uid" size="40" name="config[ldap_uid]" value="{AUTH_LDAP_UID}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="ldap_user_filter">{L_LDAP_USER_FILTER}{L_COLON}</label><br /><span>{L_LDAP_USER_FILTER_EXPLAIN}</span></dt>
|
||||
<dd><input type="text" id="ldap_user_filter" size="40" name="config[ldap_user_filter]" value="{AUTH_LDAP_USER_FILTER}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="ldap_email">{L_LDAP_EMAIL}{L_COLON}</label><br /><span>{L_LDAP_EMAIL_EXPLAIN}</span></dt>
|
||||
<dd><input type="email" id="ldap_email" size="40" name="config[ldap_email]" value="{AUTH_LDAP_EMAIL}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="ldap_user">{L_LDAP_USER}{L_COLON}</label><br /><span>{L_LDAP_USER_EXPLAIN}</span></dt>
|
||||
<dd><input type="text" id="ldap_user" size="40" name="config[ldap_user]" value="{AUTH_LDAP_USER}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="ldap_password">{L_LDAP_PASSWORD}{L_COLON}</label><br /><span>{L_LDAP_PASSWORD_EXPLAIN}</span></dt>
|
||||
<dd><input type="password" id="ldap_password" size="40" name="config[ldap_password]" value="{AUTH_LDAP_PASSWORD}" autocomplete="off" /></dd>
|
||||
</dl>
|
|
@ -38,7 +38,7 @@
|
|||
<!-- 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 -->
|
||||
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
|
||||
<!-- INCLUDEJS ajax.js -->
|
||||
{SCRIPTS}
|
||||
{$SCRIPTS}
|
||||
|
||||
<!-- EVENT acp_overall_footer_after -->
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<a href="{role_mask.groups.U_PROFILE}">{role_mask.groups.GROUP_NAME}</a><!-- IF not role_mask.groups.S_LAST_ROW --> :: <!-- ENDIF -->
|
||||
<!-- BEGINELSE -->
|
||||
{L_GROUPS_NOT_ASSIGNED}
|
||||
<!-- END users -->
|
||||
<!-- END groups -->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
|
@ -46,7 +46,7 @@ if (!defined('PHPBB_INSTALLED'))
|
|||
$script_path = preg_replace('#[\\\\/]{2,}#', '/', $script_path);
|
||||
|
||||
// Eliminate . and .. from the path
|
||||
require($phpbb_root_path . 'includes/filesystem.' . $phpEx);
|
||||
require($phpbb_root_path . 'phpbb/filesystem.' . $phpEx);
|
||||
$phpbb_filesystem = new phpbb_filesystem();
|
||||
$script_path = $phpbb_filesystem->clean_path($script_path);
|
||||
|
||||
|
@ -71,7 +71,7 @@ $phpbb_adm_relative_path = (isset($phpbb_adm_relative_path)) ? $phpbb_adm_relati
|
|||
$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);
|
||||
require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx);
|
||||
|
||||
require($phpbb_root_path . 'includes/functions.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/functions_content.' . $phpEx);
|
||||
|
@ -85,7 +85,7 @@ require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
|
|||
set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler');
|
||||
|
||||
// Setup class loader first
|
||||
$phpbb_class_loader = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}includes/", $phpEx);
|
||||
$phpbb_class_loader = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}phpbb/", $phpEx);
|
||||
$phpbb_class_loader->register();
|
||||
$phpbb_class_loader_ext = new phpbb_class_loader('phpbb_ext_', "{$phpbb_root_path}ext/", $phpEx);
|
||||
$phpbb_class_loader_ext->register();
|
||||
|
|
|
@ -6,11 +6,13 @@
|
|||
"symfony/event-dispatcher": "2.1.*",
|
||||
"symfony/http-kernel": "2.1.*",
|
||||
"symfony/routing": "2.1.*",
|
||||
"symfony/yaml": "2.1.*"
|
||||
"symfony/yaml": "2.1.*",
|
||||
"twig/twig": "1.13.*"
|
||||
},
|
||||
"require-dev": {
|
||||
"fabpot/goutte": "v0.1.0",
|
||||
"phpunit/dbunit": "1.2.*",
|
||||
"phpunit/phpunit": "3.7.*"
|
||||
"phpunit/phpunit": "3.7.*",
|
||||
"phing/phing": "2.4.*"
|
||||
}
|
||||
}
|
||||
|
|
253
phpBB/composer.lock
generated
253
phpBB/composer.lock
generated
|
@ -3,21 +3,21 @@
|
|||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
|
||||
],
|
||||
"hash": "3792dc25490f24210ece3b40789c5b98",
|
||||
"hash": "6e6125b88160e28568edcb9fd007abed",
|
||||
"packages": [
|
||||
{
|
||||
"name": "symfony/config",
|
||||
"version": "v2.1.10",
|
||||
"version": "v2.1.11",
|
||||
"target-dir": "Symfony/Component/Config",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/Config.git",
|
||||
"reference": "v2.1.10"
|
||||
"reference": "v2.1.11"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/Config/zipball/v2.1.10",
|
||||
"reference": "v2.1.10",
|
||||
"url": "https://api.github.com/repos/symfony/Config/zipball/v2.1.11",
|
||||
"reference": "v2.1.11",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -45,21 +45,21 @@
|
|||
],
|
||||
"description": "Symfony Config Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2013-04-22 04:28:40"
|
||||
"time": "2013-05-09 15:22:40"
|
||||
},
|
||||
{
|
||||
"name": "symfony/dependency-injection",
|
||||
"version": "v2.1.10",
|
||||
"version": "v2.1.11",
|
||||
"target-dir": "Symfony/Component/DependencyInjection",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/DependencyInjection.git",
|
||||
"reference": "v2.1.10"
|
||||
"reference": "v2.1.11"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/v2.1.10",
|
||||
"reference": "v2.1.10",
|
||||
"url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/v2.1.11",
|
||||
"reference": "v2.1.11",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -99,17 +99,17 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/event-dispatcher",
|
||||
"version": "v2.1.10",
|
||||
"version": "v2.1.11",
|
||||
"target-dir": "Symfony/Component/EventDispatcher",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/EventDispatcher.git",
|
||||
"reference": "v2.1.10"
|
||||
"reference": "v2.1.11"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/v2.1.10",
|
||||
"reference": "v2.1.10",
|
||||
"url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/v2.1.11",
|
||||
"reference": "v2.1.11",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -148,17 +148,17 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/http-foundation",
|
||||
"version": "v2.1.10",
|
||||
"version": "v2.1.11",
|
||||
"target-dir": "Symfony/Component/HttpFoundation",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/HttpFoundation.git",
|
||||
"reference": "v2.1.10"
|
||||
"reference": "v2.1.11"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/v2.1.10",
|
||||
"reference": "v2.1.10",
|
||||
"url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/v2.1.11",
|
||||
"reference": "v2.1.11",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -187,21 +187,21 @@
|
|||
],
|
||||
"description": "Symfony HttpFoundation Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2013-04-30 17:01:33"
|
||||
"time": "2013-05-26 18:42:07"
|
||||
},
|
||||
{
|
||||
"name": "symfony/http-kernel",
|
||||
"version": "v2.1.10",
|
||||
"version": "v2.1.11",
|
||||
"target-dir": "Symfony/Component/HttpKernel",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/HttpKernel.git",
|
||||
"reference": "v2.1.10"
|
||||
"reference": "v2.1.11"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/HttpKernel/zipball/v2.1.10",
|
||||
"reference": "v2.1.10",
|
||||
"url": "https://api.github.com/repos/symfony/HttpKernel/zipball/v2.1.11",
|
||||
"reference": "v2.1.11",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -249,21 +249,21 @@
|
|||
],
|
||||
"description": "Symfony HttpKernel Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2013-05-06 11:01:51"
|
||||
"time": "2013-06-02 12:29:05"
|
||||
},
|
||||
{
|
||||
"name": "symfony/routing",
|
||||
"version": "v2.1.9",
|
||||
"version": "v2.1.11",
|
||||
"target-dir": "Symfony/Component/Routing",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/Routing.git",
|
||||
"reference": "v2.1.9"
|
||||
"reference": "v2.1.11"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/Routing/zipball/v2.1.9",
|
||||
"reference": "v2.1.9",
|
||||
"url": "https://api.github.com/repos/symfony/Routing/zipball/v2.1.11",
|
||||
"reference": "v2.1.11",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -302,21 +302,21 @@
|
|||
],
|
||||
"description": "Symfony Routing Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2013-03-23 07:47:35"
|
||||
"time": "2013-05-06 10:48:41"
|
||||
},
|
||||
{
|
||||
"name": "symfony/yaml",
|
||||
"version": "v2.1.9",
|
||||
"version": "v2.1.11",
|
||||
"target-dir": "Symfony/Component/Yaml",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/Yaml.git",
|
||||
"reference": "v2.1.9"
|
||||
"reference": "v2.1.11"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/Yaml/zipball/v2.1.9",
|
||||
"reference": "v2.1.9",
|
||||
"url": "https://api.github.com/repos/symfony/Yaml/zipball/v2.1.11",
|
||||
"reference": "v2.1.11",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -344,7 +344,56 @@
|
|||
],
|
||||
"description": "Symfony Yaml Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2013-03-23 01:54:33"
|
||||
"time": "2013-05-10 00:09:46"
|
||||
},
|
||||
{
|
||||
"name": "twig/twig",
|
||||
"version": "v1.13.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/fabpot/Twig.git",
|
||||
"reference": "v1.13.1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/fabpot/Twig/zipball/v1.13.1",
|
||||
"reference": "v1.13.1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.2.4"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.13-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Twig_": "lib/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Armin Ronacher",
|
||||
"email": "armin.ronacher@active-4.com"
|
||||
}
|
||||
],
|
||||
"description": "Twig, the flexible, fast, and secure template language for PHP",
|
||||
"homepage": "http://twig.sensiolabs.org",
|
||||
"keywords": [
|
||||
"templating"
|
||||
],
|
||||
"time": "2013-06-06 06:06:01"
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
|
@ -492,6 +541,58 @@
|
|||
],
|
||||
"time": "2012-12-19 23:06:35"
|
||||
},
|
||||
{
|
||||
"name": "phing/phing",
|
||||
"version": "2.4.14",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phingofficial/phing",
|
||||
"reference": "2.4.14"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://github.com/phingofficial/phing/archive/2.4.14.zip",
|
||||
"reference": "2.4.14",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.2.0"
|
||||
},
|
||||
"bin": [
|
||||
"bin/phing"
|
||||
],
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"classes/phing/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"include-path": [
|
||||
"classes"
|
||||
],
|
||||
"license": [
|
||||
"LGPL3"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Michiel Rook",
|
||||
"email": "mrook@php.net"
|
||||
},
|
||||
{
|
||||
"name": "Phing Community",
|
||||
"homepage": "http://www.phing.info/trac/wiki/Development/Contributors"
|
||||
}
|
||||
],
|
||||
"description": "PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant.",
|
||||
"homepage": "http://www.phing.info/",
|
||||
"keywords": [
|
||||
"build",
|
||||
"task",
|
||||
"tool"
|
||||
],
|
||||
"time": "2012-11-29 21:23:47"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/dbunit",
|
||||
"version": "1.2.3",
|
||||
|
@ -552,16 +653,16 @@
|
|||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
"version": "1.2.9",
|
||||
"version": "1.2.12",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
||||
"reference": "1.2.9"
|
||||
"reference": "1.2.12"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/1.2.9",
|
||||
"reference": "1.2.9",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/1.2.12",
|
||||
"reference": "1.2.12",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -570,11 +671,19 @@
|
|||
"phpunit/php-text-template": ">=1.1.1@stable",
|
||||
"phpunit/php-token-stream": ">=1.1.3@stable"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "3.7.*@dev"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-dom": "*",
|
||||
"ext-xdebug": ">=2.0.5"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.2.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"PHP/"
|
||||
|
@ -601,7 +710,7 @@
|
|||
"testing",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2013-02-26 18:55:56"
|
||||
"time": "2013-07-06 06:26:16"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-file-iterator",
|
||||
|
@ -783,16 +892,16 @@
|
|||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "3.7.19",
|
||||
"version": "3.7.22",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "3.7.19"
|
||||
"reference": "3.7.22"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3.7.19",
|
||||
"reference": "3.7.19",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3.7.22",
|
||||
"reference": "3.7.22",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -801,12 +910,12 @@
|
|||
"ext-reflection": "*",
|
||||
"ext-spl": "*",
|
||||
"php": ">=5.3.3",
|
||||
"phpunit/php-code-coverage": ">=1.2.1,<1.3.0",
|
||||
"phpunit/php-code-coverage": "~1.2.1",
|
||||
"phpunit/php-file-iterator": ">=1.3.1",
|
||||
"phpunit/php-text-template": ">=1.1.1",
|
||||
"phpunit/php-timer": ">=1.0.2,<1.1.0",
|
||||
"phpunit/phpunit-mock-objects": ">=1.2.0,<1.3.0",
|
||||
"symfony/yaml": ">=2.0.0,<2.3.0"
|
||||
"phpunit/php-timer": "~1.0.2",
|
||||
"phpunit/phpunit-mock-objects": "~1.2.0",
|
||||
"symfony/yaml": "~2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"pear-pear/pear": "1.9.4"
|
||||
|
@ -853,7 +962,7 @@
|
|||
"testing",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2013-03-25 11:45:06"
|
||||
"time": "2013-07-06 06:29:15"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit-mock-objects",
|
||||
|
@ -906,17 +1015,17 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/browser-kit",
|
||||
"version": "v2.1.10",
|
||||
"version": "v2.1.11",
|
||||
"target-dir": "Symfony/Component/BrowserKit",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/BrowserKit.git",
|
||||
"reference": "v2.1.10"
|
||||
"reference": "v2.1.11"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/BrowserKit/zipball/v2.1.10",
|
||||
"reference": "v2.1.10",
|
||||
"url": "https://api.github.com/repos/symfony/BrowserKit/zipball/v2.1.11",
|
||||
"reference": "v2.1.11",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -956,17 +1065,17 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/css-selector",
|
||||
"version": "v2.1.10",
|
||||
"version": "v2.1.11",
|
||||
"target-dir": "Symfony/Component/CssSelector",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/CssSelector.git",
|
||||
"reference": "v2.1.10"
|
||||
"reference": "v2.1.11"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/CssSelector/zipball/v2.1.10",
|
||||
"reference": "v2.1.10",
|
||||
"url": "https://api.github.com/repos/symfony/CssSelector/zipball/v2.1.11",
|
||||
"reference": "v2.1.11",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -994,21 +1103,21 @@
|
|||
],
|
||||
"description": "Symfony CssSelector Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2013-01-09 08:51:07"
|
||||
"time": "2013-05-17 00:31:34"
|
||||
},
|
||||
{
|
||||
"name": "symfony/dom-crawler",
|
||||
"version": "v2.1.10",
|
||||
"version": "v2.1.11",
|
||||
"target-dir": "Symfony/Component/DomCrawler",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/DomCrawler.git",
|
||||
"reference": "v2.1.10"
|
||||
"reference": "v2.1.11"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/DomCrawler/zipball/v2.1.10",
|
||||
"reference": "v2.1.10",
|
||||
"url": "https://api.github.com/repos/symfony/DomCrawler/zipball/v2.1.11",
|
||||
"reference": "v2.1.11",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1042,21 +1151,21 @@
|
|||
],
|
||||
"description": "Symfony DomCrawler Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2013-03-27 17:13:16"
|
||||
"time": "2013-05-16 00:06:15"
|
||||
},
|
||||
{
|
||||
"name": "symfony/finder",
|
||||
"version": "v2.1.10",
|
||||
"version": "v2.1.11",
|
||||
"target-dir": "Symfony/Component/Finder",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/Finder.git",
|
||||
"reference": "v2.1.10"
|
||||
"reference": "v2.1.11"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/Finder/zipball/v2.1.10",
|
||||
"reference": "v2.1.10",
|
||||
"url": "https://api.github.com/repos/symfony/Finder/zipball/v2.1.11",
|
||||
"reference": "v2.1.11",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1084,21 +1193,21 @@
|
|||
],
|
||||
"description": "Symfony Finder Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2013-03-06 19:26:55"
|
||||
"time": "2013-05-25 15:47:15"
|
||||
},
|
||||
{
|
||||
"name": "symfony/process",
|
||||
"version": "v2.1.9",
|
||||
"version": "v2.1.11",
|
||||
"target-dir": "Symfony/Component/Process",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/Process.git",
|
||||
"reference": "v2.1.9"
|
||||
"reference": "v2.1.11"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/Process/zipball/v2.1.9",
|
||||
"reference": "v2.1.9",
|
||||
"url": "https://api.github.com/repos/symfony/Process/zipball/v2.1.11",
|
||||
"reference": "v2.1.11",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1126,7 +1235,7 @@
|
|||
],
|
||||
"description": "Symfony Process Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2013-03-23 07:44:01"
|
||||
"time": "2013-05-06 10:21:56"
|
||||
}
|
||||
],
|
||||
"aliases": [
|
||||
|
|
37
phpBB/config/auth_providers.yml
Normal file
37
phpBB/config/auth_providers.yml
Normal file
|
@ -0,0 +1,37 @@
|
|||
services:
|
||||
auth.provider_collection:
|
||||
class: phpbb_di_service_collection
|
||||
arguments:
|
||||
- @service_container
|
||||
tags:
|
||||
- { name: service_collection, tag: auth.provider }
|
||||
auth.provider.db:
|
||||
class: phpbb_auth_provider_db
|
||||
arguments:
|
||||
- @dbal.conn
|
||||
- @config
|
||||
- @request
|
||||
- @user
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
tags:
|
||||
- { name: auth.provider }
|
||||
auth.provider.apache:
|
||||
class: phpbb_auth_provider_apache
|
||||
arguments:
|
||||
- @dbal.conn
|
||||
- @config
|
||||
- @request
|
||||
- @user
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
tags:
|
||||
- { name: auth.provider }
|
||||
auth.provider.ldap:
|
||||
class: phpbb_auth_provider_ldap
|
||||
arguments:
|
||||
- @dbal.conn
|
||||
- @config
|
||||
- @user
|
||||
tags:
|
||||
- { name: auth.provider }
|
|
@ -23,6 +23,7 @@ services:
|
|||
- @cache.driver
|
||||
- @user
|
||||
- @auth
|
||||
- @content.visibility
|
||||
- %core.php_ext%
|
||||
|
||||
feed.forums:
|
||||
|
@ -35,6 +36,7 @@ services:
|
|||
- @cache.driver
|
||||
- @user
|
||||
- @auth
|
||||
- @content.visibility
|
||||
- %core.php_ext%
|
||||
|
||||
feed.news:
|
||||
|
@ -47,6 +49,7 @@ services:
|
|||
- @cache.driver
|
||||
- @user
|
||||
- @auth
|
||||
- @content.visibility
|
||||
- %core.php_ext%
|
||||
|
||||
feed.overall:
|
||||
|
@ -59,6 +62,7 @@ services:
|
|||
- @cache.driver
|
||||
- @user
|
||||
- @auth
|
||||
- @content.visibility
|
||||
- %core.php_ext%
|
||||
|
||||
feed.topic:
|
||||
|
@ -71,6 +75,7 @@ services:
|
|||
- @cache.driver
|
||||
- @user
|
||||
- @auth
|
||||
- @content.visibility
|
||||
- %core.php_ext%
|
||||
|
||||
feed.topics:
|
||||
|
@ -83,6 +88,7 @@ services:
|
|||
- @cache.driver
|
||||
- @user
|
||||
- @auth
|
||||
- @content.visibility
|
||||
- %core.php_ext%
|
||||
|
||||
feed.topics_active:
|
||||
|
@ -95,4 +101,5 @@ services:
|
|||
- @cache.driver
|
||||
- @user
|
||||
- @auth
|
||||
- @content.visibility
|
||||
- %core.php_ext%
|
||||
|
|
|
@ -5,6 +5,7 @@ imports:
|
|||
- { resource: migrator.yml }
|
||||
- { resource: avatars.yml }
|
||||
- { resource: feed.yml }
|
||||
- { resource: auth_providers.yml }
|
||||
|
||||
services:
|
||||
auth:
|
||||
|
@ -65,6 +66,19 @@ services:
|
|||
- @dbal.conn
|
||||
- %tables.config_text%
|
||||
|
||||
content.visibility:
|
||||
class: phpbb_content_visibility
|
||||
arguments:
|
||||
- @auth
|
||||
- @dbal.conn
|
||||
- @user
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
- %tables.forums%
|
||||
- %tables.posts%
|
||||
- %tables.topics%
|
||||
- %tables.users%
|
||||
|
||||
controller.helper:
|
||||
class: phpbb_controller_helper
|
||||
arguments:
|
||||
|
@ -78,7 +92,7 @@ services:
|
|||
arguments:
|
||||
- @user
|
||||
- @service_container
|
||||
- @ext.finder
|
||||
- @style
|
||||
|
||||
cron.task_collection:
|
||||
class: phpbb_di_service_collection
|
||||
|
@ -112,7 +126,6 @@ services:
|
|||
- [sql_connect, [%dbal.dbhost%, %dbal.dbuser%, %dbal.dbpasswd%, %dbal.dbname%, %dbal.dbport%, false, %dbal.new_link%]]
|
||||
|
||||
dbal.tools:
|
||||
file: %core.root_path%includes/db/db_tools.%core.php_ext%
|
||||
class: phpbb_db_tools
|
||||
arguments:
|
||||
- @dbal.conn
|
||||
|
@ -254,15 +267,15 @@ services:
|
|||
class: phpbb_style_path_provider
|
||||
|
||||
template:
|
||||
class: phpbb_template
|
||||
class: phpbb_template_twig
|
||||
arguments:
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
- @config
|
||||
- @user
|
||||
- @style.resource_locator
|
||||
- @template_context
|
||||
- @ext.manager
|
||||
- %core.adm_relative_path%
|
||||
|
||||
template_context:
|
||||
class: phpbb_template_context
|
||||
|
|
|
@ -2,10 +2,13 @@ parameters:
|
|||
tables.config: %core.table_prefix%config
|
||||
tables.config_text: %core.table_prefix%config_text
|
||||
tables.ext: %core.table_prefix%ext
|
||||
tables.forums: %core.table_prefix%forums
|
||||
tables.log: %core.table_prefix%log
|
||||
tables.migrations: %core.table_prefix%migrations
|
||||
tables.modules: %core.table_prefix%modules
|
||||
tables.notification_types: %core.table_prefix%notification_types
|
||||
tables.notifications: %core.table_prefix%notifications
|
||||
tables.posts: %core.table_prefix%posts
|
||||
tables.topics: %core.table_prefix%topics
|
||||
tables.user_notifications: %core.table_prefix%user_notifications
|
||||
tables.users: %core.table_prefix%users
|
||||
|
|
|
@ -192,13 +192,13 @@ function get_topic_count($forum_id)
|
|||
{
|
||||
global $db;
|
||||
|
||||
$sql = "SELECT forum_topics
|
||||
$sql = "SELECT forum_topics_approved
|
||||
FROM " . FORUMS_TABLE . "
|
||||
WHERE (forum_id = $forum_id)";
|
||||
if($result = $db->sql_query($sql))
|
||||
{
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$topic_count = $row['forum_topics'];
|
||||
$topic_count = $row['forum_topics_approved'];
|
||||
|
||||
unset($result);
|
||||
unset($row);
|
||||
|
@ -263,7 +263,7 @@ function make_post($new_topic_id, $forum_id, $user_id, $post_username, $text, $m
|
|||
|
||||
$post_message = prepare_message($text, $html_on, $bbcode_on, $smilies_on, $bbcode_uid);
|
||||
|
||||
$sql = "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, attach_id, icon_id, post_username, post_time, poster_ip, post_approved, bbcode_uid, enable_bbcode, enable_html, enable_smilies, enable_sig, post_subject, post_text)
|
||||
$sql = "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, attach_id, icon_id, post_username, post_time, poster_ip, post_visibility, bbcode_uid, enable_bbcode, enable_html, enable_smilies, enable_sig, post_subject, post_text)
|
||||
VALUES ($new_topic_id, $forum_id, $user_id, 0, 0, '$post_username', $current_time, '$user_ip', 1, '$bbcode_uid', $bbcode_on, $html_on, $smilies_on, $attach_sig, '$post_subject', '$post_message')";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
|
@ -282,10 +282,10 @@ function make_post($new_topic_id, $forum_id, $user_id, $post_username, $text, $m
|
|||
if($db->sql_query($sql))
|
||||
{
|
||||
$sql = "UPDATE " . FORUMS_TABLE . "
|
||||
SET forum_last_post_id = $new_post_id, forum_posts = forum_posts + 1";
|
||||
SET forum_last_post_id = $new_post_id, forum_posts_approved = forum_posts_approved + 1";
|
||||
if($mode == "newtopic")
|
||||
{
|
||||
$sql .= ", forum_topics = forum_topics + 1";
|
||||
$sql .= ", forum_topics_approved = forum_topics_approved + 1";
|
||||
}
|
||||
$sql .= " WHERE forum_id = $forum_id";
|
||||
|
||||
|
|
|
@ -1104,9 +1104,12 @@ function get_schema_struct()
|
|||
'forum_topics_per_page' => array('TINT:4', 0),
|
||||
'forum_type' => array('TINT:4', 0),
|
||||
'forum_status' => array('TINT:4', 0),
|
||||
'forum_posts' => array('UINT', 0),
|
||||
'forum_topics' => array('UINT', 0),
|
||||
'forum_topics_real' => array('UINT', 0),
|
||||
'forum_posts_approved' => array('UINT', 0),
|
||||
'forum_posts_unapproved' => array('UINT', 0),
|
||||
'forum_posts_softdeleted' => array('UINT', 0),
|
||||
'forum_topics_approved' => array('UINT', 0),
|
||||
'forum_topics_unapproved' => array('UINT', 0),
|
||||
'forum_topics_softdeleted' => array('UINT', 0),
|
||||
'forum_last_post_id' => array('UINT', 0),
|
||||
'forum_last_poster_id' => array('UINT', 0),
|
||||
'forum_last_post_subject' => array('STEXT_UNI', ''),
|
||||
|
@ -1381,7 +1384,7 @@ function get_schema_struct()
|
|||
'icon_id' => array('UINT', 0),
|
||||
'poster_ip' => array('VCHAR:40', ''),
|
||||
'post_time' => array('TIMESTAMP', 0),
|
||||
'post_approved' => array('BOOL', 1),
|
||||
'post_visibility' => array('TINT:3', 0),
|
||||
'post_reported' => array('BOOL', 0),
|
||||
'enable_bbcode' => array('BOOL', 1),
|
||||
'enable_smilies' => array('BOOL', 1),
|
||||
|
@ -1400,6 +1403,9 @@ function get_schema_struct()
|
|||
'post_edit_user' => array('UINT', 0),
|
||||
'post_edit_count' => array('USINT', 0),
|
||||
'post_edit_locked' => array('BOOL', 0),
|
||||
'post_delete_time' => array('TIMESTAMP', 0),
|
||||
'post_delete_reason' => array('STEXT_UNI', ''),
|
||||
'post_delete_user' => array('UINT', 0),
|
||||
),
|
||||
'PRIMARY_KEY' => 'post_id',
|
||||
'KEYS' => array(
|
||||
|
@ -1407,7 +1413,7 @@ function get_schema_struct()
|
|||
'topic_id' => array('INDEX', 'topic_id'),
|
||||
'poster_ip' => array('INDEX', 'poster_ip'),
|
||||
'poster_id' => array('INDEX', 'poster_id'),
|
||||
'post_approved' => array('INDEX', 'post_approved'),
|
||||
'post_visibility' => array('INDEX', 'post_visibility'),
|
||||
'post_username' => array('INDEX', 'post_username'),
|
||||
'tid_post_time' => array('INDEX', array('topic_id', 'post_time')),
|
||||
),
|
||||
|
@ -1739,15 +1745,16 @@ function get_schema_struct()
|
|||
'forum_id' => array('UINT', 0),
|
||||
'icon_id' => array('UINT', 0),
|
||||
'topic_attachment' => array('BOOL', 0),
|
||||
'topic_approved' => array('BOOL', 1),
|
||||
'topic_visibility' => array('TINT:3', 0),
|
||||
'topic_reported' => array('BOOL', 0),
|
||||
'topic_title' => array('STEXT_UNI', '', 'true_sort'),
|
||||
'topic_poster' => array('UINT', 0),
|
||||
'topic_time' => array('TIMESTAMP', 0),
|
||||
'topic_time_limit' => array('TIMESTAMP', 0),
|
||||
'topic_views' => array('UINT', 0),
|
||||
'topic_replies' => array('UINT', 0),
|
||||
'topic_replies_real' => array('UINT', 0),
|
||||
'topic_posts_approved' => array('UINT', 0),
|
||||
'topic_posts_unapproved' => array('UINT', 0),
|
||||
'topic_posts_softdeleted' => array('UINT', 0),
|
||||
'topic_status' => array('TINT:3', 0),
|
||||
'topic_type' => array('TINT:3', 0),
|
||||
'topic_first_post_id' => array('UINT', 0),
|
||||
|
@ -1769,14 +1776,17 @@ function get_schema_struct()
|
|||
'poll_max_options' => array('TINT:4', 1),
|
||||
'poll_last_vote' => array('TIMESTAMP', 0),
|
||||
'poll_vote_change' => array('BOOL', 0),
|
||||
'topic_delete_time' => array('TIMESTAMP', 0),
|
||||
'topic_delete_reason' => array('STEXT_UNI', ''),
|
||||
'topic_delete_user' => array('UINT', 0),
|
||||
),
|
||||
'PRIMARY_KEY' => 'topic_id',
|
||||
'KEYS' => array(
|
||||
'forum_id' => array('INDEX', 'forum_id'),
|
||||
'forum_id_type' => array('INDEX', array('forum_id', 'topic_type')),
|
||||
'last_post_time' => array('INDEX', 'topic_last_post_time'),
|
||||
'topic_approved' => array('INDEX', 'topic_approved'),
|
||||
'forum_appr_last' => array('INDEX', array('forum_id', 'topic_approved', 'topic_last_post_id')),
|
||||
'topic_visibility' => array('INDEX', 'topic_visibility'),
|
||||
'forum_appr_last' => array('INDEX', array('forum_id', 'topic_visibility', 'topic_last_post_id')),
|
||||
'fid_time_moved' => array('INDEX', array('forum_id', 'topic_last_post_time', 'topic_moved_id')),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -86,7 +86,7 @@ switch ($mode)
|
|||
|
||||
$topic_rows[] = "($topic_id, $forum_id, '$forum_id-$topic_id', " . (($topic_id % 34) ? '0' : '1') . ')';
|
||||
|
||||
$sql = 'INSERT IGNORE INTO ' . POSTS_TABLE . ' (topic_id, forum_id, poster_id, post_subject, post_text, post_username, post_approved, post_time, post_reported)
|
||||
$sql = 'INSERT IGNORE INTO ' . POSTS_TABLE . ' (topic_id, forum_id, poster_id, post_subject, post_text, post_username, post_visibility, post_time, post_reported)
|
||||
VALUES ';
|
||||
|
||||
$rows = array();
|
||||
|
|
|
@ -50,7 +50,7 @@ switch ($db->sql_layer)
|
|||
ADD PRIMARY KEY (post_id),
|
||||
ADD INDEX topic_id (topic_id),
|
||||
ADD INDEX poster_ip (poster_ip),
|
||||
ADD INDEX post_approved (post_approved),
|
||||
ADD INDEX post_visibility (post_visibility),
|
||||
MODIFY COLUMN post_id mediumint(8) UNSIGNED NOT NULL auto_increment,
|
||||
ADD COLUMN post_encoding varchar(11) DEFAULT \'iso-8859-15\' NOT NULL';
|
||||
break;
|
||||
|
@ -162,7 +162,7 @@ while ($row = $db->sql_fetchrow($result))
|
|||
$forum_id = $row['forum_id'];
|
||||
|
||||
$sql_ary[] = "UPDATE " . $table_prefix . "forums
|
||||
SET forum_last_poster_id = " . ((!empty($row['user_id']) && $row['user_id'] != ANONYMOUS) ? $row['user_id'] : ANONYMOUS) . ", forum_last_poster_name = '" . ((!empty($row['user_id']) && $row['user_id'] != ANONYMOUS) ? addslashes($row['username']) : addslashes($row['post_username'])) . "', forum_last_post_time = " . $row['post_time'] . ", forum_posts = " . (($post_count[$forum_id]) ? $post_count[$forum_id] : 0) . ", forum_topics = " . (($topic_count[$forum_id]) ? $topic_count[$forum_id] : 0) . "
|
||||
SET forum_last_poster_id = " . ((!empty($row['user_id']) && $row['user_id'] != ANONYMOUS) ? $row['user_id'] : ANONYMOUS) . ", forum_last_poster_name = '" . ((!empty($row['user_id']) && $row['user_id'] != ANONYMOUS) ? addslashes($row['username']) : addslashes($row['post_username'])) . "', forum_last_post_time = " . $row['post_time'] . ", forum_posts_approved = " . (($post_count[$forum_id]) ? $post_count[$forum_id] : 0) . ", forum_topics_approved = " . (($topic_count[$forum_id]) ? $topic_count[$forum_id] : 0) . "
|
||||
WHERE forum_id = $forum_id";
|
||||
|
||||
$sql = "SELECT t.topic_id, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time
|
||||
|
|
|
@ -552,9 +552,12 @@ function get_schema_struct()
|
|||
'forum_topics_per_page' => array('TINT:4', 0),
|
||||
'forum_type' => array('TINT:4', 0),
|
||||
'forum_status' => array('TINT:4', 0),
|
||||
'forum_posts' => array('UINT', 0),
|
||||
'forum_topics' => array('UINT', 0),
|
||||
'forum_topics_real' => array('UINT', 0),
|
||||
'forum_posts_approved' => array('UINT', 0),
|
||||
'forum_posts_unapproved' => array('UINT', 0),
|
||||
'forum_posts_softdeleted' => array('UINT', 0),
|
||||
'forum_topics_approved' => array('UINT', 0),
|
||||
'forum_topics_unapproved' => array('UINT', 0),
|
||||
'forum_topics_softdeleted' => array('UINT', 0),
|
||||
'forum_last_post_id' => array('UINT', 0),
|
||||
'forum_last_poster_id' => array('UINT', 0),
|
||||
'forum_last_post_subject' => array('STEXT_UNI', ''),
|
||||
|
@ -768,7 +771,7 @@ function get_schema_struct()
|
|||
'icon_id' => array('UINT', 0),
|
||||
'poster_ip' => array('VCHAR:40', ''),
|
||||
'post_time' => array('TIMESTAMP', 0),
|
||||
'post_approved' => array('BOOL', 1),
|
||||
'post_visibility' => array('TINT:3', 0),
|
||||
'post_reported' => array('BOOL', 0),
|
||||
'enable_bbcode' => array('BOOL', 1),
|
||||
'enable_smilies' => array('BOOL', 1),
|
||||
|
@ -794,7 +797,7 @@ function get_schema_struct()
|
|||
'topic_id' => array('INDEX', 'topic_id'),
|
||||
'poster_ip' => array('INDEX', 'poster_ip'),
|
||||
'poster_id' => array('INDEX', 'poster_id'),
|
||||
'post_approved' => array('INDEX', 'post_approved'),
|
||||
'post_visibility' => array('INDEX', 'post_visibility'),
|
||||
'post_username' => array('INDEX', 'post_username'),
|
||||
'tid_post_time' => array('INDEX', array('topic_id', 'post_time')),
|
||||
),
|
||||
|
@ -1107,15 +1110,16 @@ function get_schema_struct()
|
|||
'forum_id' => array('UINT', 0),
|
||||
'icon_id' => array('UINT', 0),
|
||||
'topic_attachment' => array('BOOL', 0),
|
||||
'topic_approved' => array('BOOL', 1),
|
||||
'topic_visibility' => array('TINT:3', 0),
|
||||
'topic_reported' => array('BOOL', 0),
|
||||
'topic_title' => array('STEXT_UNI', '', 'true_sort'),
|
||||
'topic_poster' => array('UINT', 0),
|
||||
'topic_time' => array('TIMESTAMP', 0),
|
||||
'topic_time_limit' => array('TIMESTAMP', 0),
|
||||
'topic_views' => array('UINT', 0),
|
||||
'topic_replies' => array('UINT', 0),
|
||||
'topic_replies_real' => array('UINT', 0),
|
||||
'topic_posts_approved' => array('UINT', 0),
|
||||
'topic_posts_unapproved' => array('UINT', 0),
|
||||
'topic_posts_softdeleted' => array('UINT', 0),
|
||||
'topic_status' => array('TINT:3', 0),
|
||||
'topic_type' => array('TINT:3', 0),
|
||||
'topic_first_post_id' => array('UINT', 0),
|
||||
|
@ -1143,8 +1147,8 @@ function get_schema_struct()
|
|||
'forum_id' => array('INDEX', 'forum_id'),
|
||||
'forum_id_type' => array('INDEX', array('forum_id', 'topic_type')),
|
||||
'last_post_time' => array('INDEX', 'topic_last_post_time'),
|
||||
'topic_approved' => array('INDEX', 'topic_approved'),
|
||||
'forum_appr_last' => array('INDEX', array('forum_id', 'topic_approved', 'topic_last_post_id')),
|
||||
'topic_visibility' => array('INDEX', 'topic_visibility'),
|
||||
'forum_appr_last' => array('INDEX', array('forum_id', 'topic_visibility', 'topic_last_post_id')),
|
||||
'fid_time_moved' => array('INDEX', array('forum_id', 'topic_last_post_time', 'topic_moved_id')),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
<ol>
|
||||
<li><a href="#changelog">Changelog</a>
|
||||
<ol style="list-style-type: lower-roman;">
|
||||
<li><a href="#v3011">Changes since 3.0.11</a></li>
|
||||
<li><a href="#v3010">Changes since 3.0.10</a></li>
|
||||
<li><a href="#v309">Changes since 3.0.9</a></li>
|
||||
<li><a href="#v308">Changes since 3.0.8</a></li>
|
||||
|
@ -85,7 +86,154 @@
|
|||
|
||||
<div class="content">
|
||||
|
||||
<a name="v3010"></a><h3>1.i. Changes since 3.0.10</h3>
|
||||
<a name="v3011"></a><h3>1.i. Changes since 3.0.11</h3>
|
||||
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-6723">PHPBB3-6723</a>] - Empty message in deleted messages in PM history</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-7262">PHPBB3-7262</a>] - Clarify docs about is_dynamic not being updated by set_config()</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8319">PHPBB3-8319</a>] - LOCAL_URL not enforced in bbcodes</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9551">PHPBB3-9551</a>] - Mysql fulltext index creation fails due to partial collation change</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9975">PHPBB3-9975</a>] - Hard coded language in sessions.php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10184">PHPBB3-10184</a>] - Bots can be sent private messages</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10491">PHPBB3-10491</a>] - Fatal error in functional tests when server returns 404</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10568">PHPBB3-10568</a>] - Modify the trigger language when you edit a PM</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10602">PHPBB3-10602</a>] - A bug in mail queue processing</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10661">PHPBB3-10661</a>] - UCP > PM > Compose > enumerated recipients > BCC group misses a &nbsp; (prosilver)</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10678">PHPBB3-10678</a>] - Provide Firebird, Oracle, and increased MSSQL support in unit tests</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10772">PHPBB3-10772</a>] - trigger_error is using the default style</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10789">PHPBB3-10789</a>] - PM print template (prosilver) with unnecessary variables</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10820">PHPBB3-10820</a>] - Display images directly in IE9 and 10 instead of download</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10828">PHPBB3-10828</a>] - PostgreSQL dbal tests try to connect to the database named as user specified in configuration</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10838">PHPBB3-10838</a>] - Functional tests are not mentioned in RUNNING_TESTS.txt</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10840">PHPBB3-10840</a>] - If you add a member to a group, the form_token can be set to 0 if the creation_time is 0 too. Maybe even if creation_time is unchanged.</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10848">PHPBB3-10848</a>] - Wrong redirect to installer from acp</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10850">PHPBB3-10850</a>] - create_schema_files.php is not creating the oracle or postgres' schema file properly</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10879">PHPBB3-10879</a>] - prosilver: attachment-link will be displayed wrong, when filename is too long </li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10880">PHPBB3-10880</a>] - m_approve should not imply f_noapprove</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10896">PHPBB3-10896</a>] - board_email & board_contact are not validated as email addresses in ACP</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10897">PHPBB3-10897</a>] - Bot Definitions are outdated</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10918">PHPBB3-10918</a>] - docs/INSTALL.html claims there are tar.gz packages</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10943">PHPBB3-10943</a>] - Search Box should display keywords entered by the user</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10967">PHPBB3-10967</a>] - PHPBB_USE_BOARD_URL_PATH not implemented in posting_gen_topic_icons</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10986">PHPBB3-10986</a>] - Invalid email message ids because config variable server_name is used even when force server URL settings is disabled</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10995">PHPBB3-10995</a>] - Return value of $db->sql_fetchrow() on empty tables is not consistent on mssqlnative</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10996">PHPBB3-10996</a>] - Travis tests fail on Postgres because database does not exist</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11034">PHPBB3-11034</a>] - The functional test case framework does not install a full board each time</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11066">PHPBB3-11066</a>] - MSSQLnative driver contains debug code error_reporting(E_ALL)</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11069">PHPBB3-11069</a>] - missing closing span in subsilver2 simple_footer.html</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11081">PHPBB3-11081</a>] - Duplicated /TD in styles/subsilver2/template/catpcha_qa.html</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11093">PHPBB3-11093</a>] - acp_users_overview.html has a wrongly placed </dd></li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11094">PHPBB3-11094</a>] - prosilver: searching for users: no textbox for Jabber</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11105">PHPBB3-11105</a>] - Missing mandatory space in meta http-equiv=refresh</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11112">PHPBB3-11112</a>] - phpBB Footer Link should be SSL</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11122">PHPBB3-11122</a>] - Update docs/AUTHORS for 3.0.12-RC1</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11144">PHPBB3-11144</a>] - {FORUM_NAME} is not filled in login mask when logging into a password protected forum</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11145">PHPBB3-11145</a>] - ATTACHED_IMAGE_NOT_IMAGE thrown because of file limit in php.ini</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11158">PHPBB3-11158</a>] - modules table lacks acl_u_sig for signature module</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11159">PHPBB3-11159</a>] - Coding guidelines: static public</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11164">PHPBB3-11164</a>] - Composer not finding symfony/config in PHP 5.3.3</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11178">PHPBB3-11178</a>] - database_update.php should not set error_reporting to E_ALL</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11186">PHPBB3-11186</a>] - Database unit tests fail on windows using sqlite2</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11190">PHPBB3-11190</a>] - Functional tests do not clear the cache between each test</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11196">PHPBB3-11196</a>] - /includes/session.php sends 401 HTTP status with "Not authorized" instead of "Unauthorized"</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11219">PHPBB3-11219</a>] - Database sequences are not updated for tests using fixtures with auto_incremented columns</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11227">PHPBB3-11227</a>] - @return void -> @return null</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11233">PHPBB3-11233</a>] - Anonymous can be selected as a PM recipient</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11248">PHPBB3-11248</a>] - CRLF line endings</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11262">PHPBB3-11262</a>] - .lock files are not in .gitignore</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11265">PHPBB3-11265</a>] - Functional tests do not assert that board installation succeeded</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11269">PHPBB3-11269</a>] - Travis functional test case errors</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11278">PHPBB3-11278</a>] - Firebird tables are not removed correctly on 3.0.9-rc1 update</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11288">PHPBB3-11288</a>] - Search fooled by hyphens</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11291">PHPBB3-11291</a>] - "Could not open input file: ../composer.phar" error during phing's create-package</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11292">PHPBB3-11292</a>] - Newlines removed in display of PM reports, no clickable links in PM reports</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11301">PHPBB3-11301</a>] - "String offset cast occured" error on PHP 5.4</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11304">PHPBB3-11304</a>] - check_form_key breaks in tests when form is submitted in the same second it is retrieved</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11343">PHPBB3-11343</a>] - Loose string comparison during new password activation</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11355">PHPBB3-11355</a>] - Incorrect error message when no user selected for action on group membership management page</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11358">PHPBB3-11358</a>] - Success message even withot selecting a user and performing a group operation</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11361">PHPBB3-11361</a>] - "Array to string conversion" error in $user->format_date()</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11493">PHPBB3-11493</a>] - Functional tests should fail if any debug output is made</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11517">PHPBB3-11517</a>] - Numbering is wrong in coding guidelines</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11536">PHPBB3-11536</a>] - Installer incorrectly removes /install from script_path</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11537">PHPBB3-11537</a>] - UCP group manage page's error box differs heavily from the rest of the UCP</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11538">PHPBB3-11538</a>] - SQL error on UCP groups manage page caused by setting color to 7 characters long string</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11544">PHPBB3-11544</a>] - Add admin_login() to 3.0 functional test case</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11545">PHPBB3-11545</a>] - is_absolute() should not depend on DIRECTORY_SEPARATOR</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11546">PHPBB3-11546</a>] - is_absolute() throws E_NOTICE for empty string</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11547">PHPBB3-11547</a>] - Test fixtures do not support utf8 characters</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11548">PHPBB3-11548</a>] - Untranslated TOO_SHORT in UCP "Manage Groups"</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11566">PHPBB3-11566</a>] - Reporting a post should require a captcha to be solved by guests</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11568">PHPBB3-11568</a>] - Functional tests fail with retrieving install pages using file_get_contents</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11575">PHPBB3-11575</a>] - phpbb_dbal_order_lower_test::test_cross_join should be called test_order_lower</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11578">PHPBB3-11578</a>] - Missing underscore after function prefix in validate_data()</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11579">PHPBB3-11579</a>] - Add unit tests for validate_data()</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11580">PHPBB3-11580</a>] - Avoid API Limit from composer downloads on github</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11588">PHPBB3-11588</a>] - install/install_update.php should use version.phpbb.com instead of www</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11590">PHPBB3-11590</a>] - Close database connections from tests whenever possible</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11601">PHPBB3-11601</a>] - Allow manual resync of database columns in unit tests not only on fixture load</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11603">PHPBB3-11603</a>] - git-tools use invalid api urls</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11604">PHPBB3-11604</a>] - Functional tests fail when phpBB can not create the config file</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11617">PHPBB3-11617</a>] - Missing U_ACTION in acp_captcha.php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11618">PHPBB3-11618</a>] - Template tests fail on some systems due to a PHP error in glob()</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11619">PHPBB3-11619</a>] - get_remote_file() should use HTTP 1.0</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11630">PHPBB3-11630</a>] - Improvements to the PHP lint pre-commit hook</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11644">PHPBB3-11644</a>] - Skip phpbb_dbal_order_lower_test on MySQL 5.6</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11662">PHPBB3-11662</a>] - "occured" should be "occurred"</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11670">PHPBB3-11670</a>] - Replace trademark ™ with ® on "Welcome to phpBB" install page</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11674">PHPBB3-11674</a>] - Do not include vendor folder if there are no dependencies.</li>
|
||||
</ul>
|
||||
<h4>Improvement</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8743">PHPBB3-8743</a>] - New topic / reply notifications do not contain author's name.</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10050">PHPBB3-10050</a>] - subsilver2: Do not show "Mark topics as read" when there are no topics</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10205">PHPBB3-10205</a>] - More informative reporting of errors when database connection fails (MySQL and others)</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10716">PHPBB3-10716</a>] - PHP-parse all php files as part of the test suite</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10841">PHPBB3-10841</a>] - Disable style and language selectors if there's only one installed.</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10854">PHPBB3-10854</a>] - sql server drop default constraint when dropping column </li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10865">PHPBB3-10865</a>] - Updated and Added to docs/INSTALL.html</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10873">PHPBB3-10873</a>] - Change language entry for deleted PMs</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10981">PHPBB3-10981</a>] - Upgrade Goutte and use Composer for Installation</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11131">PHPBB3-11131</a>] - Phrasing & semantics of Board settings</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11162">PHPBB3-11162</a>] - Get rid of $db->sql_return_on_error(true) trickery when splitting/merging topics</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11192">PHPBB3-11192</a>] - Add Tebibyte to get_formatted_filesize()</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11202">PHPBB3-11202</a>] - Add response status checks to functional tests</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11220">PHPBB3-11220</a>] - Improve tooltip explaining the [list=] - BBcode</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11238">PHPBB3-11238</a>] - Specify goutte version</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11285">PHPBB3-11285</a>] - Use more granularity in dependency checks in compress test</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11293">PHPBB3-11293</a>] - Prefer mysqli over mysql due to php 5.5 alpha 2 deprecating mysql</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11294">PHPBB3-11294</a>] - Update extension list in running tests doc</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11368">PHPBB3-11368</a>] - Latest pm reports row count</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11583">PHPBB3-11583</a>] - InnoDB supports FULLTEXT index since MySQL 5.6.4.</li>
|
||||
</ul>
|
||||
<h4>Sub-task</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10974">PHPBB3-10974</a>] - Move tests/mock_user.php to tests/mock/user.php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11009">PHPBB3-11009</a>] - Backport phing build.xml from develop to develop-olympus so it uses composer.</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11540">PHPBB3-11540</a>] - Add unit tests for (phpbb_)is_absolute()</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11541">PHPBB3-11541</a>] - Add unit tests for style_select() in functions.php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11542">PHPBB3-11542</a>] - Add unit tests for language_select() in functions.php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11543">PHPBB3-11543</a>] - Add unit tests for obtain online functions in functions.php</li>
|
||||
</ul>
|
||||
<h4>Task</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10877">PHPBB3-10877</a>] - Have bamboo generate and publish a phpBB package for every build.</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11045">PHPBB3-11045</a>] - Add unit tests for the compress class</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11059">PHPBB3-11059</a>] - Fix README logo</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11060">PHPBB3-11060</a>] - Fix travis.yml pyrus config</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11240">PHPBB3-11240</a>] - Turn on PHPUnit's verbose mode on Travis</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11324">PHPBB3-11324</a>] - Add PHP 5.5 environment on Travis-CI</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11337">PHPBB3-11337</a>] - Run functional tests on Travis CI</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11513">PHPBB3-11513</a>] - Install PHPUnit via Composer's require-dev to simplify test running (no need for pear)</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11526">PHPBB3-11526</a>] - Increase composer minimum-stability from beta to stable</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11527">PHPBB3-11527</a>] - Upgrade composer.phar to 1.0.0-alpha7</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11529">PHPBB3-11529</a>] - Rename RUNNING_TESTS file to .md file to render it on GitHub</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11576">PHPBB3-11576</a>] - Make phpBB Test Suite MySQL behave at least as strict as phpBB MySQL driver</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11671">PHPBB3-11671</a>] - Add phing/phing to composer.json</li>
|
||||
</ul>
|
||||
|
||||
<a name="v3010"></a><h3>1.ii. Changes since 3.0.10</h3>
|
||||
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
|
@ -210,7 +358,7 @@
|
|||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10909">PHPBB3-10909</a>] - Update Travis Test Configuration: Travis no longer supports PHP 5.3.2</li>
|
||||
</ul>
|
||||
|
||||
<a name="v309"></a><h3>1.ii. Changes since 3.0.9</h3>
|
||||
<a name="v309"></a><h3>1.iii. Changes since 3.0.9</h3>
|
||||
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
|
@ -346,7 +494,7 @@
|
|||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10480">PHPBB3-10480</a>] - Automate changelog building</li>
|
||||
</ul>
|
||||
|
||||
<a name="v308"></a><h3>1.iii. Changes since 3.0.8</h3>
|
||||
<a name="v308"></a><h3>1.iv. Changes since 3.0.8</h3>
|
||||
|
||||
<h4> Bug
|
||||
</h4>
|
||||
|
@ -714,7 +862,7 @@
|
|||
</ul>
|
||||
|
||||
|
||||
<a name="v307-PL1"></a><h3>1.iv. Changes since 3.0.7-PL1</h3>
|
||||
<a name="v307-PL1"></a><h3>1.v. Changes since 3.0.7-PL1</h3>
|
||||
<h4> Security
|
||||
</h4>
|
||||
<ul>
|
||||
|
@ -1172,13 +1320,13 @@
|
|||
</ul>
|
||||
|
||||
|
||||
<a name="v307"></a><h3>1.iv. Changes since 3.0.7</h3>
|
||||
<a name="v307"></a><h3>1.vi. Changes since 3.0.7</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Sec] Do not expose forum content of forums with ACL entries but no actual permission in ATOM Feeds. (Bug #58595)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v306"></a><h3>1.vi. Changes since 3.0.6</h3>
|
||||
<a name="v306"></a><h3>1.vii. Changes since 3.0.6</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Allow ban reason and length to be selected and copied in ACP and subsilver2 MCP. (Bug #51095)</li>
|
||||
|
@ -1282,7 +1430,7 @@
|
|||
|
||||
</ul>
|
||||
|
||||
<a name="v305"></a><h3>1.vii. Changes since 3.0.5</h3>
|
||||
<a name="v305"></a><h3>1.viii. Changes since 3.0.5</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Allow whitespaces in avatar gallery names. (Bug #44955)</li>
|
||||
|
@ -1504,7 +1652,7 @@
|
|||
<li>[Feature] Send anonymous statistical information to phpBB on installation and update (optional).</li>
|
||||
</ul>
|
||||
|
||||
<a name="v304"></a><h3>1.viii. Changes since 3.0.4</h3>
|
||||
<a name="v304"></a><h3>1.ix. Changes since 3.0.4</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Delete user entry from ban list table upon user deletion (Bug #40015 - Patch by TerraFrost)</li>
|
||||
|
@ -1593,7 +1741,7 @@
|
|||
<li>[Sec] Only use forum id supplied for posting if global announcement detected. (Reported by nickvergessen)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v303"></a><h3>1.ix. Changes since 3.0.3</h3>
|
||||
<a name="v303"></a><h3>1.x. Changes since 3.0.3</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Allow mixed-case template directories to be inherited (Bug #36725)</li>
|
||||
|
@ -1625,7 +1773,7 @@
|
|||
<li>[Sec] Ask for forum password if post within passworded forum quoted in private message. (Reported by nickvergessen)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v302"></a><h3>1.x. Changes since 3.0.2</h3>
|
||||
<a name="v302"></a><h3>1.xi. Changes since 3.0.2</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Correctly set topic starter if first post in topic removed (Bug #30575 - Patch by blueray2048)</li>
|
||||
|
@ -1724,7 +1872,7 @@
|
|||
<li>[Sec Precaution] Stricter validation of the HTTP_HOST header (Thanks to Techie-Micheal et al for pointing out possible issues in derived code)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v301"></a><h3>1.xi. Changes since 3.0.1</h3>
|
||||
<a name="v301"></a><h3>1.xii. Changes since 3.0.1</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Ability to set permissions on non-mysql dbms (Bug #24955)</li>
|
||||
|
@ -1772,7 +1920,7 @@
|
|||
<li>[Sec] Only allow urls gone through redirect() being used within login_box(). (thanks nookieman)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v300"></a><h3>1.xii Changes since 3.0.0</h3>
|
||||
<a name="v300"></a><h3>1.xiii Changes since 3.0.0</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Change] Validate birthdays (Bug #15004)</li>
|
||||
|
@ -1843,7 +1991,7 @@
|
|||
<li>[Fix] Find and display colliding usernames correctly when converting from one database to another (Bug #23925)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc8"></a><h3>1.xiii. Changes since 3.0.RC8</h3>
|
||||
<a name="v30rc8"></a><h3>1.xiv. Changes since 3.0.RC8</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Cleaned usernames contain only single spaces, so "a_name" and "a__name" are treated as the same name (Bug #15634)</li>
|
||||
|
@ -1852,7 +2000,7 @@
|
|||
<li>[Fix] Call garbage_collection() within database updater to correctly close connections (affects Oracle for example)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc7"></a><h3>1.xiv. Changes since 3.0.RC7</h3>
|
||||
<a name="v30rc7"></a><h3>1.xv. Changes since 3.0.RC7</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Fixed MSSQL related bug in the update system</li>
|
||||
|
@ -1887,7 +2035,7 @@
|
|||
<li>[Fix] No duplication of active topics (Bug #15474)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc6"></a><h3>1.xv. Changes since 3.0.RC6</h3>
|
||||
<a name="v30rc6"></a><h3>1.xvi. Changes since 3.0.RC6</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Submitting language changes using acp_language (Bug #14736)</li>
|
||||
|
@ -1897,7 +2045,7 @@
|
|||
<li>[Fix] Able to request new password (Bug #14743)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc5"></a><h3>1.xvi. Changes since 3.0.RC5</h3>
|
||||
<a name="v30rc5"></a><h3>1.xvii. Changes since 3.0.RC5</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Feature] Removing constant PHPBB_EMBEDDED in favor of using an exit_handler(); the constant was meant to achive this more or less.</li>
|
||||
|
@ -1960,7 +2108,7 @@
|
|||
<li>[Sec] New password hashing mechanism for storing passwords (#i42)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc4"></a><h3>1.xvii. Changes since 3.0.RC4</h3>
|
||||
<a name="v30rc4"></a><h3>1.xviii. Changes since 3.0.RC4</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] MySQL, PostgreSQL and SQLite related database fixes (Bug #13862)</li>
|
||||
|
@ -2011,7 +2159,7 @@
|
|||
<li>[Fix] odbc_autocommit causing existing result sets to be dropped (Bug #14182)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc3"></a><h3>1.xviii. Changes since 3.0.RC3</h3>
|
||||
<a name="v30rc3"></a><h3>1.xix. Changes since 3.0.RC3</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Fixing some subsilver2 and prosilver style issues</li>
|
||||
|
@ -2120,7 +2268,7 @@
|
|||
|
||||
</ul>
|
||||
|
||||
<a name="v30rc2"></a><h3>1.xviv. Changes since 3.0.RC2</h3>
|
||||
<a name="v30rc2"></a><h3>1.xx. Changes since 3.0.RC2</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Re-allow searching within the memberlist</li>
|
||||
|
@ -2166,7 +2314,7 @@
|
|||
|
||||
</ul>
|
||||
|
||||
<a name="v30rc1"></a><h3>1.xx. Changes since 3.0.RC1</h3>
|
||||
<a name="v30rc1"></a><h3>1.xxi. Changes since 3.0.RC1</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] (X)HTML issues within the templates (Bug #11255, #11255)</li>
|
||||
|
@ -2301,7 +2449,7 @@
|
|||
|
||||
<div class="content">
|
||||
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="https://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
|
||||
<p>There are people, companies (unrelated to your hosting provider), etc. that will install your forum, either for free or for a payment. We do not recommend you make use of these offers. Unless the service is provided by your hosting company you will have to divulge passwords and other sensitive details. If you did not know how to use an ATM would you give a passer-by your bank card and PIN and ask them to show you what to do? No, probably not! The same applies to your hosting account details!</p>
|
||||
|
||||
<p>We think a better solution is for you to carefully read the enclosed documentation, read through our knowledge base at <a href="http://www.phpbb.com/">www.phpbb.com</a> and if necessary ask for help on any thing you get stuck on. However, the decision is yours but please note we may not offer support if we believe you have had the board installed by a third party. In such cases you should direct your questions to that company or person/s.</p>
|
||||
<p>We think a better solution is for you to carefully read the enclosed documentation, read through our knowledge base at <a href="https://www.phpbb.com/">www.phpbb.com</a> and if necessary ask for help on any thing you get stuck on. However, the decision is yours but please note we may not offer support if we believe you have had the board installed by a third party. In such cases you should direct your questions to that company or person/s.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -143,7 +143,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
|||
|
||||
<div class="content">
|
||||
|
||||
<p>This error will occur if phpBB cannot send mail. phpBB can send email two ways; using the PHP <code>mail()</code> function or directly via SMTP. Some hosting providers limit the <code>mail()</code> function to prevent its use in spamming, others may rename it or limit its functionality. If the <code>mail()</code> function got renamed, you are able to enter the correct name within the administration control panel. In either case you may need to make use of SMTP. This requires that you have access to such a facility, e.g. your hosting provider may provide one (perhaps requiring specific written authorisation), etc. Please see <a href="http://www.phpbb.com/">www.phpbb.com</a> for additional help on this matter.</p>
|
||||
<p>This error will occur if phpBB cannot send mail. phpBB can send email two ways; using the PHP <code>mail()</code> function or directly via SMTP. Some hosting providers limit the <code>mail()</code> function to prevent its use in spamming, others may rename it or limit its functionality. If the <code>mail()</code> function got renamed, you are able to enter the correct name within the administration control panel. In either case you may need to make use of SMTP. This requires that you have access to such a facility, e.g. your hosting provider may provide one (perhaps requiring specific written authorisation), etc. Please see <a href="https://www.phpbb.com/">www.phpbb.com</a> for additional help on this matter.</p>
|
||||
|
||||
<p>If you do require SMTP services please do not ask (on our forums or elsewhere) for someone to provide you with one. Open relays are now things of the past thanks to the unthinking spammers out there. Therefore you are unlikely to find someone willing to offer you (free) services.</p>
|
||||
|
||||
|
@ -243,7 +243,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
|||
|
||||
<div class="content">
|
||||
|
||||
<p>Please read the paragraph about permissions in our extensive <a href="http://www.phpbb.com/support/documentation/3.0/">online documentation</a>.</p>
|
||||
<p>Please read the paragraph about permissions in our extensive <a href="https://www.phpbb.com/support/documentation/3.0/">online documentation</a>.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -299,11 +299,11 @@ I want to sue you because i think you host an illegal board!</h2>
|
|||
|
||||
<div class="content">
|
||||
|
||||
<p>Please read our <a href="http://www.phpbb.com/support/documentation/3.0/">extensive user documentation</a> first, it may just explain what you want to know.</p>
|
||||
<p>Please read our <a href="https://www.phpbb.com/support/documentation/3.0/">extensive user documentation</a> first, it may just explain what you want to know.</p>
|
||||
|
||||
<p>Feel free to search our community forum for the information you require. <strong>PLEASE DO NOT</strong> post your question without having first used search, chances are someone has already asked and answered your question. You can find our board here:</p>
|
||||
|
||||
<p><a href="http://www.phpbb.com">www.phpbb.com</a></p>
|
||||
<p><a href="https://www.phpbb.com">www.phpbb.com</a></p>
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -321,7 +321,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
|||
|
||||
<div class="content">
|
||||
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="https://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
<p>This document will walk you through the basics on installing, updating and converting the forum software.</p>
|
||||
|
||||
<p>A basic overview of running phpBB3 can be found in the accompanying <a href="README.html">README</a> file. Please ensure you read that document in addition to this! For more detailed information on using, installing, updating and converting phpBB3 you should read <a href="http://www.phpbb.com/support/documentation/3.0/">the documentation</a> available online.</p>
|
||||
<p>A basic overview of running phpBB3 can be found in the accompanying <a href="README.html">README</a> file. Please ensure you read that document in addition to this! For more detailed information on using, installing, updating and converting phpBB3 you should read <a href="https://www.phpbb.com/support/documentation/3.0/">the documentation</a> available online.</p>
|
||||
|
||||
<h1>Install</h1>
|
||||
|
||||
|
@ -220,7 +220,7 @@
|
|||
|
||||
<h4>Administrator details</h4>
|
||||
|
||||
<p>Now you have to create your administration user. This user will have full administration access and he/she will be the first user on your forum. All fields on this page are required. You can also set the default language of your forum on this page. In a vanilla phpBB3 installation, we only include British English. You can download further languages from <a href="http://www.phpbb.com/">www.phpbb.com</a>, and add them before installing or later.</p>
|
||||
<p>Now you have to create your administration user. This user will have full administration access and he/she will be the first user on your forum. All fields on this page are required. You can also set the default language of your forum on this page. In a vanilla phpBB3 installation, we only include British English. You can download further languages from <a href="https://www.phpbb.com/">www.phpbb.com</a>, and add them before installing or later.</p>
|
||||
|
||||
<h4>Configuration file</h4>
|
||||
|
||||
|
@ -299,7 +299,7 @@
|
|||
<p>To perform the update, either follow the instructions from the <strong>Administration Control Panel->System</strong> Tab - this should point out that you are running an outdated version and will guide you through the update - or follow the instructions listed below.</p>
|
||||
|
||||
<ul>
|
||||
<li>Go to the <a href="http://www.phpbb.com/downloads/">downloads page</a> and download the latest update package listed there, matching your current version.</li>
|
||||
<li>Go to the <a href="https://www.phpbb.com/downloads/">downloads page</a> and download the latest update package listed there, matching your current version.</li>
|
||||
<li>Upload the uncompressed archive contents to your phpBB installation - only the install folder is required. Upload the whole install folder, retaining the file structure.</li>
|
||||
<li>After the install folder is present, phpBB3 will go offline automatically.</li>
|
||||
<li>Point your browser to the install directory, for example <code>http://www.example.com/phpBB3/install/</code></li>
|
||||
|
@ -346,7 +346,7 @@
|
|||
|
||||
<p>As with install, the conversion is automated. Your previous 2.0.x database tables will not be changed and the original 2.0.x files will remain unaltered. The conversion is actually only filling your phpBB3 database tables and copying additional data over to your phpBB3 installation. This has the benefit that if something goes wrong, you are able to either re-run the conversion or continue a conversion, while your old board is still accessible. We really recommend that you disable your old installation while converting, else you may have inconsistent data after the conversion.</p>
|
||||
|
||||
<p>Please note that this conversion process may take quite some time and depending on your hosting provider this may result in it failing (due to web server resource limits or other timeout issues). If this is the case, you should ask your provider if they are willing to allow the convert script to temporarily exceed their limits (be nice and they will probably be quite helpful). If your host is unwilling to increase the limits to run the convertor, please see this article for performing the conversion on your local machine: <a href="http://www.phpbb.com/kb/article/offline-conversions/">Knowledge Base - Offline Conversions</a></p>
|
||||
<p>Please note that this conversion process may take quite some time and depending on your hosting provider this may result in it failing (due to web server resource limits or other timeout issues). If this is the case, you should ask your provider if they are willing to allow the convert script to temporarily exceed their limits (be nice and they will probably be quite helpful). If your host is unwilling to increase the limits to run the convertor, please see this article for performing the conversion on your local machine: <a href="https://www.phpbb.com/kb/article/offline-conversions/">Knowledge Base - Offline Conversions</a></p>
|
||||
|
||||
<p>Once completed, your board should be immediately available. If you encountered errors, you should report the problems to our bug tracker or seek help via our forums (see <a href="README.html">README</a> for details).</p>
|
||||
|
||||
|
@ -430,7 +430,7 @@
|
|||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
|
||||
<div class="content">
|
||||
<p>Like any online site that allows user input, your board could be subject to unwanted posts; often referred to as <a href="http://en.wikipedia.org/wiki/Forum_spam">forum spam</a>. The vast majority of these attacks will be from automated computer programs known as <a href="http://en.wikipedia.org/wiki/Spambot">spambots</a>. The attacks, generally, are not personal as the spammers are just trying to find accessible targets. phpBB has a number of anti-spam measures built in, including a range of CAPTCHAs. However, administrators are strongly urged to read and follow the advice for <a href="http://www.phpbb.com/support/spam/">Preventing Spam in phpBB</a> as soon as possible after completing the installation of your board.</p>
|
||||
<p>Like any online site that allows user input, your board could be subject to unwanted posts; often referred to as <a href="http://en.wikipedia.org/wiki/Forum_spam">forum spam</a>. The vast majority of these attacks will be from automated computer programs known as <a href="http://en.wikipedia.org/wiki/Spambot">spambots</a>. The attacks, generally, are not personal as the spammers are just trying to find accessible targets. phpBB has a number of anti-spam measures built in, including a range of CAPTCHAs. However, administrators are strongly urged to read and follow the advice for <a href="https://www.phpbb.com/support/spam/">Preventing Spam in phpBB</a> as soon as possible after completing the installation of your board.</p>
|
||||
</div>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
@ -447,7 +447,7 @@
|
|||
|
||||
<div class="content">
|
||||
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>. Please see the source code and <code>docs/</code> directory for more details. This package and its contents are Copyright © <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>. Please see the source code and <code>docs/</code> directory for more details. This package and its contents are Copyright © <a href="https://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
<!-- BEGIN DOCUMENT -->
|
||||
|
||||
<p>Thank you for downloading phpBB3. This README will guide through the basics of installation and operation of phpBB3. Please ensure you read this and the accompanying documentation fully <strong>before</strong> proceeding with the installation.</p>
|
||||
<p>Thank you for downloading phpBB3. This README will guide you through the basics of installation and operation of phpBB3. Please ensure you read this and the accompanying documentation fully <strong>before</strong> proceeding with the installation.</p>
|
||||
|
||||
<h1>Readme</h1>
|
||||
|
||||
|
@ -61,7 +61,7 @@
|
|||
</ol>
|
||||
</li>
|
||||
<li><a href="#status">Status of this version</a></li>
|
||||
<li><a href="#bugs">Reporting Bugs</a>
|
||||
<li><a href="#bugs">Reporting bugs</a>
|
||||
<ol style="list-style-type: lower-roman;">
|
||||
<li><a href="#securitybugs">Security related bugs</a></li>
|
||||
</ol>
|
||||
|
@ -84,12 +84,11 @@
|
|||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>Installation, update and conversion instructions can be found in the <a href="INSTALL.html">INSTALL</a> document contained in this distribution. If you are intending to convert from a previous phpBB 2.0.x or 3.0.x installation we highly recommend you backup any existing data before proceeding!</p>
|
||||
<p>Installation, update and conversion instructions can be found in the <a href="INSTALL.html">INSTALL</a> document in this directory. If you are intending on converting from a phpBB 2.0.x or 3.0.x installation we highly recommend that you backup any existing data before proceeding!</p>
|
||||
|
||||
<p>Users of phpBB 3.0 and 3.1 Beta versions cannot directly update.</p>
|
||||
|
||||
<p>Please note that we won't support the following installation types:</p>
|
||||
<p>Please note that we don't support the following installation types:</p>
|
||||
<ul>
|
||||
<li>Updates from phpBB 3.0 Beta versions to phpBB 3.0 RC1 and higher</li>
|
||||
<li>Updates from phpBB 3.1 Beta versions to phpBB 3.1 RC1 and higher</li>
|
||||
|
@ -103,8 +102,8 @@
|
|||
<li>Updates from phpBB 3.0 RC1 and 3.1 RC1 to the latest version</li>
|
||||
<li>Note: if using the <em>Automatic Update Package</em>, updates are supported from phpBB 3.0.2 onward. To update a pre-3.0.2 installation, first update to 3.0.2 and then update to the current version.</li>
|
||||
<li>Conversions from phpBB 2.0.x to the latest version</li>
|
||||
<li>New installations of phpBB 3.0.x - always only the latest released version</li>
|
||||
<li>New installations of phpBB 3.1.x - always only the latest released version</li>
|
||||
<li>New installations of phpBB 3.0.x - only the latest released version</li>
|
||||
<li>New installations of phpBB 3.1.x - only the latest released version</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -127,21 +126,21 @@
|
|||
|
||||
<a name="i18n"></a><h3>2.i. Languages (Internationalisation - i18n)</h3>
|
||||
|
||||
<p>A number of language packs with included style localisations are available. You can find them listed in the <a href="http://www.phpbb.com/languages/">Language Packs</a> pages of our downloads section or from the <a href="http://www.phpbb.com/customise/db/language_packs-25/">Language Packs</a> section of the <a href="http://www.phpbb.com/customise/db/">Customisation Database</a>.</p>
|
||||
<p>A number of language packs with included style localisations are available. You can find them listed in the <a href="https://www.phpbb.com/languages/">Language Packs</a> pages of our downloads section or from the <a href="https://www.phpbb.com/customise/db/language_packs-25/">Language Packs</a> section of the <a href="https://www.phpbb.com/customise/db/">Customisation Database</a>.</p>
|
||||
|
||||
<p>For more information about language packs, please see: <a href="http://www.phpbb.com/languages/">http://www.phpbb.com/languages/</a></p>
|
||||
<p>For more information about language packs, please see: <a href="https://www.phpbb.com/languages/">https://www.phpbb.com/languages/</a></p>
|
||||
|
||||
<p>This is the <em>official</em> location for all supported language sets. If you download a package from a 3rd party site you do so with the understanding that we cannot offer support. So please, do not ask for help in these cases!</p>
|
||||
<p>This is the <em>official</em> location for all supported language sets. If you download a package from a 3rd party site you do so with the understanding that we cannot offer support. Please do not ask for support if you download a language pack from a 3rd party site.</p>
|
||||
|
||||
<p>Installation of these packages is straightforward: simply download the required language pack, uncompress (unzip) it and via FTP transfer the included <code>language</code> and <code>styles</code> folders to the root of your board installation. The language can then be installed via the Administration Control Panel of your board: <code>System tab -> General Tasks -> Language packs</code>. A more detailed description of the process is in the Knowledge Base article, <a href="http://www.phpbb.com/kb/article/how-to-install-a-language-pack/">How to Install a Language Pack</a>.</p>
|
||||
<p>Installation of these packages is straightforward: simply download the required language pack, uncompress (unzip) it and via FTP transfer the included <code>language</code> and <code>styles</code> folders to the root of your board installation. The language can then be installed via the Administration Control Panel of your board: <code>System tab -> General Tasks -> Language packs</code>. A more detailed description of the process is in the Knowledge Base article, <a href="https://www.phpbb.com/kb/article/how-to-install-a-language-pack/">How to Install a Language Pack</a>.</p>
|
||||
|
||||
<p>If your language is not available, please visit our <a href="http://www.phpbb.com/community/viewforum.php?f=66">[3.0.x] Translations</a> forum where you will find topics on translations in progress. Should you wish to volunteer to translate a language not currently available or assist in maintaining an existing language pack, you can <a href="http://www.phpbb.com/languages/apply.php">Apply to become a translator</a>.</p>
|
||||
<p>If your language is not available, please visit our <a href="https://www.phpbb.com/community/viewforum.php?f=66">[3.0.x] Translations</a> forum where you will find topics on translations in progress. Should you wish to volunteer to translate a language not currently available or assist in maintaining an existing language pack, you can <a href="https://www.phpbb.com/languages/apply.php">Apply to become a translator</a>.</p>
|
||||
|
||||
<a name="styles"></a><h3>2.ii. Styles</h3>
|
||||
|
||||
<p>Although the phpBB Group is rather proud of the included styles, we realise that they may not be to everyone's taste. Therefore, phpBB3 allows styles to be switched with relative ease. First, you need to locate and download a style you like. You can find them listed in the <a href="http://www.phpbb.com/customise/db/styles-2/">Styles</a> section of our <a href="http://www.phpbb.com/customise/db/">Customisation Database</a>.</p>
|
||||
<p>Although the phpBB Group is rather proud of the included styles, we realise that they may not be to everyone's taste. Therefore, phpBB3 allows styles to be switched with relative ease. First, you need to locate and download a style you like. You can find them listed in the <a href="https://www.phpbb.com/customise/db/styles-2/">Styles</a> section of our <a href="https://www.phpbb.com/customise/db/">Customisation Database</a>.</p>
|
||||
|
||||
<p>For more information about styles, please see: <a href="http://www.phpbb.com/styles/">http://www.phpbb.com/styles/</a></p>
|
||||
<p>For more information about styles, please see: <a href="https://www.phpbb.com/styles/">https://www.phpbb.com/styles/</a></p>
|
||||
|
||||
<p><strong>Please note</strong> that 3rd party styles downloaded for versions of phpBB2 will <strong>not</strong> work in phpBB3. It is also important to ensure that the style is updated to match the current version of the phpBB software you are using.</p>
|
||||
|
||||
|
@ -151,9 +150,9 @@
|
|||
|
||||
<a name="mods"></a><h3>2.iii. Modifications</h3>
|
||||
|
||||
<p>Although not officially supported by the phpBB Group, phpBB has a thriving modification scene. These third party modifications to the standard phpBB software, known as <strong>MODs</strong>, extend its capabilities still further. You can browse through many of the MODs in the <a href="http://www.phpbb.com/customise/db/modifications-1/">Modifications</a> section of our <a href="http://www.phpbb.com/customise/db/">Customisation Database</a>.</p>
|
||||
<p>Although not officially supported by the phpBB Group, phpBB has a thriving modification scene. These third party modifications to the standard phpBB software, known as <strong>MODs</strong>, extend its capabilities still further. You can browse through many of the MODs in the <a href="https://www.phpbb.com/customise/db/modifications-1/">Modifications</a> section of our <a href="https://www.phpbb.com/customise/db/">Customisation Database</a>.</p>
|
||||
|
||||
<p>For more information about MODs, please see: <a href="http://www.phpbb.com/mods/">http://www.phpbb.com/mods/</a></p>
|
||||
<p>For more information about MODs, please see: <a href="https://www.phpbb.com/mods/">https://www.phpbb.com/mods/</a></p>
|
||||
|
||||
<p><strong>Please remember</strong> that any bugs or other issues that occur after you have added any modification should <strong>NOT</strong> be reported to the bug tracker (see below). First remove the MOD and see if the problem is resolved. Any support for a MOD should only be sought in the "Discussion/Support" forum for that MOD.</p>
|
||||
|
||||
|
@ -175,35 +174,35 @@
|
|||
|
||||
<div class="content">
|
||||
|
||||
<p>phpBB3 can seem a little daunting to new users in places, particularly with regard the permission system. The first thing you should do is check the <a href="FAQ.html">FAQ</a> which covers a few basic getting started questions. If you need additional help there are several places you should look.</p>
|
||||
<p>phpBB3 can sometimes seem a little daunting to new users, particularly with regards to the permission system. The first thing you should do is check the <a href="FAQ.html">FAQ</a>, which covers a few basic getting started questions. If you need additional help there are several places you can find it.</p>
|
||||
|
||||
<a name="docs"></a><h3>3.i. phpBB3 Documentation</h3>
|
||||
|
||||
<p>A comprehensive documentation is now available online and can be accessed from the following location:</p>
|
||||
<p>Comprehensive documentation is now available on the phpBB website:</p>
|
||||
|
||||
<p><a href="http://www.phpbb.com/support/documentation/3.0/">http://www.phpbb.com/support/documentation/3.0/</a></p>
|
||||
<p><a href="https://www.phpbb.com/support/documentation/3.0/">https://www.phpbb.com/support/documentation/3.0/</a></p>
|
||||
|
||||
<p>This covers everything from installation through setting permissions and managing users.</p>
|
||||
<p>This covers everything from installation to setting permissions and managing users.</p>
|
||||
|
||||
<a name="kb"></a><h3>3.ii. Knowledge Base</h3>
|
||||
|
||||
<p>The Knowledge Base consists of a number of detailed articles on some common issues phpBB users may encounter while using the product. The Knowledge Base can be found at:</p>
|
||||
|
||||
<p><a href="http://www.phpbb.com/kb/">http://www.phpbb.com/kb/</a></p>
|
||||
<p><a href="https://www.phpbb.com/kb/">https://www.phpbb.com/kb/</a></p>
|
||||
|
||||
<a name="website"></a><h3>3.iii. Community Forums</h3>
|
||||
|
||||
<p>The phpBB Group maintains a thriving community where a number of people have generously decided to donate their time to help support users. This site can be found at:</p>
|
||||
|
||||
<p><a href="http://www.phpbb.com/community/">http://www.phpbb.com/community/</a></p>
|
||||
<p><a href="https://www.phpbb.com/community/">https://www.phpbb.com/community/</a></p>
|
||||
|
||||
<p>If you do seek help via our forums please be sure to do a Search before posting. This may well save both you and us time and allow the developer, moderator and support groups to spend more time responding to people with unknown issues and problems. Please also remember that phpBB is an entirely volunteer effort, no one receives any compensation for the time they give, this includes moderators as well as developers. So please be respectful and mindful when awaiting responses.</p>
|
||||
<p>If you do seek help via our forums please be sure to do a search before posting; if someone has experienced the issue before, then you may find that your question has already been answered. Please remember that phpBB is entirely staffed by volunteers, no one receives any compensation for the time they give, including moderators as well as developers; please be respectful and mindful when awaiting responses and receiving support.</p>
|
||||
|
||||
<a name="irc"></a><h3>3.iv Internet Relay Chat</h3>
|
||||
|
||||
<p>Another place you may find help is our IRC channel. This operates on the Freenode IRC network, <a href="irc://irc.freenode.net">irc.freenode.net</a> and the channel is <em>#phpbb</em> and can be accessed by any decent IRC client such as mIRC, XChat, etc. Again, please do not abuse this service and be respectful of other users.</p>
|
||||
|
||||
<p>There are other IRC channels available, please see <a href="http://www.phpbb.com/support/irc/">http://www.phpbb.com/support/irc/</a> for the complete list.</p>
|
||||
<p>There are other IRC channels available, please see <a href="https://www.phpbb.com/support/irc/">https://www.phpbb.com/support/irc/</a> for the complete list.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -268,7 +267,7 @@
|
|||
|
||||
<p>The relevant database type/version is listed within the administration control panel.</p>
|
||||
|
||||
<p>Please also be as detailed as you can in your report, if possible list the steps required to duplicate the problem. If you have a patch that fixes the issue, please attach it to the ticket or submit a pull request <a href="https://github.com/phpbb/phpbb3">on GitHub</a>.</p>
|
||||
<p>Please be as detailed as you can in your report, and if possible, list the steps required to duplicate the problem. If you have a patch that fixes the issue, please attach it to the ticket or submit a pull request to our repository <a href="https://github.com/phpbb/phpbb3">on GitHub</a>.</p>
|
||||
|
||||
<p>If you create a patch, it is very much appreciated (but not required) if you follow the phpBB coding guidelines. Please note that the coding guidelines are somewhat different between different versions of phpBB. For phpBB 3.1.x the coding guidelines may be found here: <a href="http://area51.phpbb.com/docs/31x/coding-guidelines.html">http://area51.phpbb.com/docs/31x/coding-guidelines.html</a></p>
|
||||
|
||||
|
@ -278,7 +277,7 @@
|
|||
|
||||
<p>If you find a potential security related vulnerability in phpBB please <strong>DO NOT</strong> post it to the bug tracker, public forums, etc.! Doing so may allow unscrupulous users to take advantage of it before we have time to put a fix in place. All security related bugs should be sent to our security tracker:</p>
|
||||
|
||||
<p><a href="http://www.phpbb.com/security/">http://www.phpbb.com/security/</a></p>
|
||||
<p><a href="https://www.phpbb.com/security/">https://www.phpbb.com/security/</a></p>
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -299,8 +298,8 @@
|
|||
<p>This list is not complete but does represent those bugs which may affect users on a wider scale. Other bugs listed in the tracker have typically been shown to be limited to certain setups or methods of installation, updating and/or conversions.</p>
|
||||
|
||||
<ul>
|
||||
<li>Conversions may fail to complete on large boards under some hosts</li>
|
||||
<li>Updates may fail to complete on large update sets under some hosts</li>
|
||||
<li>Conversions may fail to complete on large boards under some hosts.</li>
|
||||
<li>Updates may fail to complete on large update sets under some hosts.</li>
|
||||
<li>Smilies placed directly after bbcode tags will not get parsed. Smilies always need to be separated by spaces.</li>
|
||||
</ul>
|
||||
|
||||
|
@ -322,7 +321,7 @@
|
|||
|
||||
<p>phpBB 3.1.x takes advantage of new features added in PHP 5.3. We recommend that you upgrade to the latest stable release of PHP5 to run phpBB. The minimum version required is PHP 5.3.3.</p>
|
||||
|
||||
<p>Please remember that running any application on a developmental version of PHP can lead to strange/unexpected results which may appear to be bugs in the application (which may not be true). Therefore we recommend you upgrade to the newest stable version of PHP before running phpBB3. If you are running a developmental version of PHP please check any bugs you find on a system running a stable release before submitting.</p>
|
||||
<p>Please remember that running any application on a development (unstable, e.g. a beta release) version of PHP can lead to strange/unexpected results which may appear to be bugs in the application. Therefore, we recommend you upgrade to the newest stable version of PHP before running phpBB3. If you are running a development version of PHP please check any bugs you find on a system running a stable release before submitting.</p>
|
||||
|
||||
<p>This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQL 3.23, 4.x, 5.x, MSSQL Server 2000, PostgreSQL 8.x, Oracle 8, SQLite 2 and Firebird. Versions of PHP used range from 5.3.x to 5.4.x without problem.</p>
|
||||
|
||||
|
@ -346,7 +345,7 @@
|
|||
|
||||
<div class="content">
|
||||
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright © <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright © <a href="https://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -268,7 +268,7 @@ $auth_admin = new auth_admin();
|
|||
|
||||
<div class="content">
|
||||
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="https://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1315,7 +1315,7 @@ parent = prosilver
|
|||
<span class="comment"><!-- INCLUDEPHP somefile.php --></span>
|
||||
</pre></div>
|
||||
|
||||
<p>it will be included and executed inline.<br /><br />A note, it is very much encouraged that template designers do not include PHP. The ability to include raw PHP was introduced primarily to allow end users to include banner code, etc. without modifying multiple files (as with 2.0.x). It was not intended for general use ... hence <!-- w --><a href="http://www.phpbb.com">www.phpbb.com</a><!-- w --> will <strong>not</strong> make available template sets which include PHP. And by default templates will have PHP disabled (the admin will need to specifically activate PHP for a template).</p>
|
||||
<p>it will be included and executed inline.<br /><br />A note, it is very much encouraged that template designers do not include PHP. The ability to include raw PHP was introduced primarily to allow end users to include banner code, etc. without modifying multiple files (as with 2.0.x). It was not intended for general use ... hence <!-- w --><a href="https://www.phpbb.com">www.phpbb.com</a><!-- w --> will <strong>not</strong> make available template sets which include PHP. And by default templates will have PHP disabled (the admin will need to specifically activate PHP for a template).</p>
|
||||
|
||||
<h4>Conditionals/Control structures</h4>
|
||||
<p>The most significant addition to 3.x are conditions or control structures, "if something then do this else do that". The system deployed is very similar to Smarty. This may confuse some people at first but it offers great potential and great flexibility with a little imagination. In their most simple form these constructs take the form:</p>
|
||||
|
@ -2499,7 +2499,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
|||
|
||||
<div class="content">
|
||||
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="https://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -861,7 +861,7 @@ function phpbb_hook_register(&$hook)
|
|||
|
||||
<div class="content">
|
||||
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="https://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ source source_phpbb_{SPHINX_ID}_main
|
|||
p.forum_id, \
|
||||
p.topic_id, \
|
||||
p.poster_id, \
|
||||
p.post_visibility, \
|
||||
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, \
|
||||
|
@ -32,6 +33,7 @@ source source_phpbb_{SPHINX_ID}_main
|
|||
sql_attr_uint = forum_id
|
||||
sql_attr_uint = topic_id
|
||||
sql_attr_uint = poster_id
|
||||
sql_attr_uint = post_visibility
|
||||
sql_attr_bool = topic_first_post
|
||||
sql_attr_bool = deleted
|
||||
sql_attr_timestamp = post_time
|
||||
|
@ -48,6 +50,7 @@ source source_phpbb_{SPHINX_ID}_delta : source_phpbb_{SPHINX_ID}_main
|
|||
p.forum_id, \
|
||||
p.topic_id, \
|
||||
p.poster_id, \
|
||||
p.post_visibility, \
|
||||
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, \
|
||||
|
|
|
@ -112,8 +112,8 @@ class acp_bbcodes
|
|||
{
|
||||
$template->assign_block_vars('token', array(
|
||||
'TOKEN' => '{' . $token . '}',
|
||||
'EXPLAIN' => $token_explain)
|
||||
);
|
||||
'EXPLAIN' => ($token === 'LOCAL_URL') ? sprintf($token_explain, generate_board_url() . '/') : $token_explain,
|
||||
));
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -347,6 +347,9 @@ class acp_bbcodes
|
|||
'LOCAL_URL' => array(
|
||||
'!(' . str_replace(array('!', '\#'), array('\!', '#'), get_preg_expression('relative_url')) . ')!e' => "\$this->bbcode_specialchars('$1')"
|
||||
),
|
||||
'RELATIVE_URL' => array(
|
||||
'!(' . str_replace(array('!', '\#'), array('\!', '#'), get_preg_expression('relative_url')) . ')!e' => "\$this->bbcode_specialchars('$1')"
|
||||
),
|
||||
'EMAIL' => array(
|
||||
'!(' . get_preg_expression('email') . ')!ie' => "\$this->bbcode_specialchars('$1')"
|
||||
),
|
||||
|
@ -373,6 +376,7 @@ class acp_bbcodes
|
|||
$sp_tokens = array(
|
||||
'URL' => '(?i)((?:' . str_replace(array('!', '\#'), array('\!', '#'), get_preg_expression('url')) . ')|(?:' . str_replace(array('!', '\#'), array('\!', '#'), get_preg_expression('www_url')) . '))(?-i)',
|
||||
'LOCAL_URL' => '(?i)(' . str_replace(array('!', '\#'), array('\!', '#'), get_preg_expression('relative_url')) . ')(?-i)',
|
||||
'RELATIVE_URL' => '(?i)(' . str_replace(array('!', '\#'), array('\!', '#'), get_preg_expression('relative_url')) . ')(?-i)',
|
||||
'EMAIL' => '(' . get_preg_expression('email') . ')',
|
||||
'TEXT' => '(.*?)',
|
||||
'SIMPLETEXT' => '([a-zA-Z0-9-+.,_ ]+)',
|
||||
|
@ -429,7 +433,11 @@ class acp_bbcodes
|
|||
$fp_replace = str_replace($token, $replace, $fp_replace);
|
||||
|
||||
$sp_match = str_replace(preg_quote($token, '!'), $sp_tokens[$token_type], $sp_match);
|
||||
$sp_replace = str_replace($token, '${' . ($n + 1) . '}', $sp_replace);
|
||||
|
||||
// Prepend the board url to local relative links
|
||||
$replace_prepend = ($token_type === 'LOCAL_URL') ? generate_board_url() . '/' : '';
|
||||
|
||||
$sp_replace = str_replace($token, $replace_prepend . '${' . ($n + 1) . '}', $sp_replace);
|
||||
}
|
||||
|
||||
$fp_match = '!' . $fp_match . '!' . $modifiers;
|
||||
|
|
|
@ -522,84 +522,54 @@ class acp_board
|
|||
if ($mode == 'auth')
|
||||
{
|
||||
// Retrieve a list of auth plugins and check their config values
|
||||
$auth_plugins = array();
|
||||
|
||||
$dp = @opendir($phpbb_root_path . 'includes/auth');
|
||||
|
||||
if ($dp)
|
||||
{
|
||||
while (($file = readdir($dp)) !== false)
|
||||
{
|
||||
if (preg_match('#^auth_(.*?)\.' . $phpEx . '$#', $file))
|
||||
{
|
||||
$auth_plugins[] = basename(preg_replace('#^auth_(.*?)\.' . $phpEx . '$#', '\1', $file));
|
||||
}
|
||||
}
|
||||
closedir($dp);
|
||||
|
||||
sort($auth_plugins);
|
||||
}
|
||||
$auth_providers = $phpbb_container->get('auth.provider_collection');
|
||||
|
||||
$updated_auth_settings = false;
|
||||
$old_auth_config = array();
|
||||
foreach ($auth_plugins as $method)
|
||||
foreach ($auth_providers as $provider)
|
||||
{
|
||||
if ($method && file_exists($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx))
|
||||
if ($fields = $provider->acp())
|
||||
{
|
||||
include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
|
||||
|
||||
$method = 'acp_' . $method;
|
||||
if (function_exists($method))
|
||||
// Check if we need to create config fields for this plugin and save config when submit was pressed
|
||||
foreach ($fields as $field)
|
||||
{
|
||||
if ($fields = $method($this->new_config))
|
||||
if (!isset($config[$field]))
|
||||
{
|
||||
// Check if we need to create config fields for this plugin and save config when submit was pressed
|
||||
foreach ($fields['config'] as $field)
|
||||
{
|
||||
if (!isset($config[$field]))
|
||||
{
|
||||
set_config($field, '');
|
||||
}
|
||||
|
||||
if (!isset($cfg_array[$field]) || strpos($field, 'legend') !== false)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$old_auth_config[$field] = $this->new_config[$field];
|
||||
$config_value = $cfg_array[$field];
|
||||
$this->new_config[$field] = $config_value;
|
||||
|
||||
if ($submit)
|
||||
{
|
||||
$updated_auth_settings = true;
|
||||
set_config($field, $config_value);
|
||||
}
|
||||
}
|
||||
set_config($field, '');
|
||||
}
|
||||
|
||||
if (!isset($cfg_array[$field]) || strpos($field, 'legend') !== false)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$old_auth_config[$field] = $this->new_config[$field];
|
||||
$config_value = $cfg_array[$field];
|
||||
$this->new_config[$field] = $config_value;
|
||||
|
||||
if ($submit)
|
||||
{
|
||||
$updated_auth_settings = true;
|
||||
set_config($field, $config_value);
|
||||
}
|
||||
unset($fields);
|
||||
}
|
||||
}
|
||||
unset($fields);
|
||||
}
|
||||
|
||||
if ($submit && (($cfg_array['auth_method'] != $this->new_config['auth_method']) || $updated_auth_settings))
|
||||
{
|
||||
$method = basename($cfg_array['auth_method']);
|
||||
if ($method && in_array($method, $auth_plugins))
|
||||
if (array_key_exists('auth.provider.' . $method, $auth_providers))
|
||||
{
|
||||
include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
|
||||
|
||||
$method = 'init_' . $method;
|
||||
if (function_exists($method))
|
||||
$provider = $auth_providers['auth.provider.' . $method];
|
||||
if ($error = $provider->init())
|
||||
{
|
||||
if ($error = $method())
|
||||
foreach ($old_auth_config as $config_name => $config_value)
|
||||
{
|
||||
foreach ($old_auth_config as $config_name => $config_value)
|
||||
{
|
||||
set_config($config_name, $config_value);
|
||||
}
|
||||
trigger_error($error . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
set_config($config_name, $config_value);
|
||||
}
|
||||
trigger_error($error . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
set_config('auth_method', basename($cfg_array['auth_method']));
|
||||
}
|
||||
|
@ -683,23 +653,15 @@ class acp_board
|
|||
{
|
||||
$template->assign_var('S_AUTH', true);
|
||||
|
||||
foreach ($auth_plugins as $method)
|
||||
foreach ($auth_providers as $provider)
|
||||
{
|
||||
if ($method && file_exists($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx))
|
||||
$auth_tpl = $provider->get_acp_template($this->new_config);
|
||||
if ($auth_tpl)
|
||||
{
|
||||
$method = 'acp_' . $method;
|
||||
if (function_exists($method))
|
||||
{
|
||||
$fields = $method($this->new_config);
|
||||
|
||||
if ($fields['tpl'])
|
||||
{
|
||||
$template->assign_block_vars('auth_tpl', array(
|
||||
'TPL' => $fields['tpl'])
|
||||
);
|
||||
}
|
||||
unset($fields);
|
||||
}
|
||||
$template->assign_vars($auth_tpl['TEMPLATE_VARS']);
|
||||
$template->assign_block_vars('auth_tpl', array(
|
||||
'TEMPLATE_FILE' => $auth_tpl['TEMPLATE_FILE'],
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -710,25 +672,19 @@ class acp_board
|
|||
*/
|
||||
function select_auth_method($selected_method, $key = '')
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
global $phpbb_root_path, $phpEx, $phpbb_container;
|
||||
|
||||
$auth_plugins = array();
|
||||
$auth_providers = $phpbb_container->get('auth.provider_collection');
|
||||
|
||||
$dp = @opendir($phpbb_root_path . 'includes/auth');
|
||||
|
||||
if (!$dp)
|
||||
foreach ($auth_providers as $key => $value)
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
while (($file = readdir($dp)) !== false)
|
||||
{
|
||||
if (preg_match('#^auth_(.*?)\.' . $phpEx . '$#', $file))
|
||||
if (!($value instanceof phpbb_auth_provider_interface))
|
||||
{
|
||||
$auth_plugins[] = preg_replace('#^auth_(.*?)\.' . $phpEx . '$#', '\1', $file);
|
||||
continue;
|
||||
}
|
||||
$auth_plugins[] = str_replace('auth.provider.', '', $key);
|
||||
}
|
||||
closedir($dp);
|
||||
|
||||
sort($auth_plugins);
|
||||
|
||||
|
|
|
@ -124,6 +124,8 @@ class acp_captcha
|
|||
'CAPTCHA_PREVIEW_TPL' => $demo_captcha->get_demo_template($id),
|
||||
'S_CAPTCHA_HAS_CONFIG' => $demo_captcha->has_config(),
|
||||
'CAPTCHA_SELECT' => $captcha_select,
|
||||
|
||||
'U_ACTION' => $this->u_action,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,10 +28,6 @@ class acp_database
|
|||
global $cache, $db, $user, $auth, $template, $table_prefix;
|
||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
|
||||
if (!class_exists('phpbb_db_tools'))
|
||||
{
|
||||
require($phpbb_root_path . 'includes/db/db_tools.' . $phpEx);
|
||||
}
|
||||
$this->db_tools = new phpbb_db_tools($db);
|
||||
|
||||
$user->add_lang('acp/database');
|
||||
|
|
|
@ -283,7 +283,7 @@ class acp_forums
|
|||
|
||||
@set_time_limit(0);
|
||||
|
||||
$sql = 'SELECT forum_name, forum_topics_real
|
||||
$sql = 'SELECT forum_name, (forum_topics_approved + forum_topics_unapproved + forum_topics_softdeleted) AS total_topics
|
||||
FROM ' . FORUMS_TABLE . "
|
||||
WHERE forum_id = $forum_id";
|
||||
$result = $db->sql_query($sql);
|
||||
|
@ -295,7 +295,7 @@ class acp_forums
|
|||
trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if ($row['forum_topics_real'])
|
||||
if ($row['total_topics'])
|
||||
{
|
||||
$sql = 'SELECT MIN(topic_id) as min_topic_id, MAX(topic_id) as max_topic_id
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
|
@ -314,7 +314,6 @@ class acp_forums
|
|||
$end = $start + $batch_size;
|
||||
|
||||
// Sync all topics in batch mode...
|
||||
sync('topic_approved', 'range', 'topic_id BETWEEN ' . $start . ' AND ' . $end, true, false);
|
||||
sync('topic', 'range', 'topic_id BETWEEN ' . $start . ' AND ' . $end, true, true);
|
||||
|
||||
if ($end < $row2['max_topic_id'])
|
||||
|
@ -330,15 +329,15 @@ class acp_forums
|
|||
|
||||
$start += $batch_size;
|
||||
|
||||
$url = $this->u_action . "&parent_id={$this->parent_id}&f=$forum_id&action=sync&start=$start&topics_done=$topics_done&total={$row['forum_topics_real']}";
|
||||
$url = $this->u_action . "&parent_id={$this->parent_id}&f=$forum_id&action=sync&start=$start&topics_done=$topics_done&total={$row['total_topics']}";
|
||||
|
||||
meta_refresh(0, $url);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'U_PROGRESS_BAR' => $this->u_action . "&action=progress_bar&start=$topics_done&total={$row['forum_topics_real']}",
|
||||
'UA_PROGRESS_BAR' => addslashes($this->u_action . "&action=progress_bar&start=$topics_done&total={$row['forum_topics_real']}"),
|
||||
'U_PROGRESS_BAR' => $this->u_action . "&action=progress_bar&start=$topics_done&total={$row['total_topics']}",
|
||||
'UA_PROGRESS_BAR' => addslashes($this->u_action . "&action=progress_bar&start=$topics_done&total={$row['total_topics']}"),
|
||||
'S_CONTINUE_SYNC' => true,
|
||||
'L_PROGRESS_EXPLAIN' => sprintf($user->lang['SYNC_IN_PROGRESS_EXPLAIN'], $topics_done, $row['forum_topics_real']))
|
||||
'L_PROGRESS_EXPLAIN' => sprintf($user->lang['SYNC_IN_PROGRESS_EXPLAIN'], $topics_done, $row['total_topics']))
|
||||
);
|
||||
|
||||
return;
|
||||
|
@ -352,7 +351,7 @@ class acp_forums
|
|||
'U_PROGRESS_BAR' => $this->u_action . '&action=progress_bar',
|
||||
'UA_PROGRESS_BAR' => addslashes($this->u_action . '&action=progress_bar'),
|
||||
'S_CONTINUE_SYNC' => true,
|
||||
'L_PROGRESS_EXPLAIN' => sprintf($user->lang['SYNC_IN_PROGRESS_EXPLAIN'], 0, $row['forum_topics_real']))
|
||||
'L_PROGRESS_EXPLAIN' => sprintf($user->lang['SYNC_IN_PROGRESS_EXPLAIN'], 0, $row['total_topics']))
|
||||
);
|
||||
|
||||
return;
|
||||
|
@ -857,8 +856,8 @@ class acp_forums
|
|||
'FORUM_IMAGE_SRC' => ($row['forum_image']) ? $phpbb_root_path . $row['forum_image'] : '',
|
||||
'FORUM_NAME' => $row['forum_name'],
|
||||
'FORUM_DESCRIPTION' => generate_text_for_display($row['forum_desc'], $row['forum_desc_uid'], $row['forum_desc_bitfield'], $row['forum_desc_options']),
|
||||
'FORUM_TOPICS' => $row['forum_topics'],
|
||||
'FORUM_POSTS' => $row['forum_posts'],
|
||||
'FORUM_TOPICS' => $row['forum_topics_approved'],
|
||||
'FORUM_POSTS' => $row['forum_posts_approved'],
|
||||
|
||||
'S_FORUM_LINK' => ($forum_type == FORUM_LINK) ? true : false,
|
||||
'S_FORUM_POST' => ($forum_type == FORUM_POST) ? true : false,
|
||||
|
@ -1144,7 +1143,8 @@ class acp_forums
|
|||
return array($user->lang['NO_FORUM_ACTION']);
|
||||
}
|
||||
|
||||
$forum_data_sql['forum_posts'] = $forum_data_sql['forum_topics'] = $forum_data_sql['forum_topics_real'] = $forum_data_sql['forum_last_post_id'] = $forum_data_sql['forum_last_poster_id'] = $forum_data_sql['forum_last_post_time'] = 0;
|
||||
$forum_data_sql['forum_posts_approved'] = $forum_data_sql['forum_posts_unapproved'] = $forum_data_sql['forum_posts_softdeleted'] = $forum_data_sql['forum_topics_approved'] = $forum_data_sql['forum_topics_unapproved'] = $forum_data_sql['forum_topics_softdeleted'] = 0;
|
||||
$forum_data_sql['forum_last_post_id'] = $forum_data_sql['forum_last_poster_id'] = $forum_data_sql['forum_last_post_time'] = 0;
|
||||
$forum_data_sql['forum_last_poster_name'] = $forum_data_sql['forum_last_poster_colour'] = '';
|
||||
}
|
||||
else if ($row['forum_type'] == FORUM_CAT && $forum_data_sql['forum_type'] == FORUM_LINK)
|
||||
|
@ -1264,9 +1264,12 @@ class acp_forums
|
|||
else if ($row['forum_type'] == FORUM_CAT && $forum_data_sql['forum_type'] == FORUM_POST)
|
||||
{
|
||||
// Changing a category to a forum? Reset the data (you can't post directly in a cat, you must use a forum)
|
||||
$forum_data_sql['forum_posts'] = 0;
|
||||
$forum_data_sql['forum_topics'] = 0;
|
||||
$forum_data_sql['forum_topics_real'] = 0;
|
||||
$forum_data_sql['forum_posts_approved'] = 0;
|
||||
$forum_data_sql['forum_posts_unapproved'] = 0;
|
||||
$forum_data_sql['forum_posts_softdeleted'] = 0;
|
||||
$forum_data_sql['forum_topics_approved'] = 0;
|
||||
$forum_data_sql['forum_topics_unapproved'] = 0;
|
||||
$forum_data_sql['forum_topics_softdeleted'] = 0;
|
||||
$forum_data_sql['forum_last_post_id'] = 0;
|
||||
$forum_data_sql['forum_last_post_subject'] = '';
|
||||
$forum_data_sql['forum_last_post_time'] = 0;
|
||||
|
@ -1793,7 +1796,7 @@ class acp_forums
|
|||
FROM ' . POSTS_TABLE . '
|
||||
WHERE forum_id = ' . $forum_id . '
|
||||
AND post_postcount = 1
|
||||
AND post_approved = 1';
|
||||
AND post_visibility = ' . ITEM_APPROVED;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$post_counts = array();
|
||||
|
@ -1931,7 +1934,7 @@ class acp_forums
|
|||
// Make sure the overall post/topic count is correct...
|
||||
$sql = 'SELECT COUNT(post_id) AS stat
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE post_approved = 1';
|
||||
WHERE post_visibility = ' . ITEM_APPROVED;
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
@ -1940,7 +1943,7 @@ class acp_forums
|
|||
|
||||
$sql = 'SELECT COUNT(topic_id) AS stat
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
WHERE topic_approved = 1';
|
||||
WHERE topic_visibility = ' . ITEM_APPROVED;
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
|
|
@ -410,7 +410,7 @@ class acp_groups
|
|||
if ($validation_error = validate_data($submit_ary, $validation_checks))
|
||||
{
|
||||
// Replace "error" string with its real, localised form
|
||||
$error = array_merge($error, array_map(array(&$user, 'lang'), $validation_error));
|
||||
$error = array_merge($error, $validation_error);
|
||||
}
|
||||
|
||||
if (!sizeof($error))
|
||||
|
@ -507,6 +507,7 @@ class acp_groups
|
|||
|
||||
if (sizeof($error))
|
||||
{
|
||||
$error = array_map(array(&$user, 'lang'), $error);
|
||||
$group_rank = $submit_ary['rank'];
|
||||
|
||||
$group_desc_data = array(
|
||||
|
|
|
@ -63,9 +63,7 @@ class acp_main
|
|||
if ($action === 'admlogout')
|
||||
{
|
||||
$user->unset_admin();
|
||||
$redirect_url = append_sid("{$phpbb_root_path}index.$phpEx");
|
||||
meta_refresh(3, $redirect_url);
|
||||
trigger_error($user->lang['ADM_LOGGED_OUT'] . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . $redirect_url . '">', '</a>'));
|
||||
redirect(append_sid("{$phpbb_root_path}index.$phpEx"));
|
||||
}
|
||||
|
||||
if (!confirm_box(true))
|
||||
|
@ -144,14 +142,14 @@ class acp_main
|
|||
|
||||
$sql = 'SELECT COUNT(post_id) AS stat
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE post_approved = 1';
|
||||
WHERE post_visibility = ' . ITEM_APPROVED;
|
||||
$result = $db->sql_query($sql);
|
||||
set_config('num_posts', (int) $db->sql_fetchfield('stat'), true);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = 'SELECT COUNT(topic_id) AS stat
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
WHERE topic_approved = 1';
|
||||
WHERE topic_visibility = ' . ITEM_APPROVED;
|
||||
$result = $db->sql_query($sql);
|
||||
set_config('num_topics', (int) $db->sql_fetchfield('stat'), true);
|
||||
$db->sql_freeresult($result);
|
||||
|
@ -232,7 +230,7 @@ class acp_main
|
|||
$sql = 'SELECT COUNT(post_id) AS num_posts, poster_id
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE post_id BETWEEN ' . ($start + 1) . ' AND ' . ($start + $step) . '
|
||||
AND post_postcount = 1 AND post_approved = 1
|
||||
AND post_postcount = 1 AND post_visibility = ' . ITEM_APPROVED . '
|
||||
GROUP BY poster_id';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
|
@ -430,7 +428,7 @@ class acp_main
|
|||
{
|
||||
$template->assign_vars(array(
|
||||
'S_PHP_VERSION_OLD' => true,
|
||||
'L_PHP_VERSION_OLD' => sprintf($user->lang['PHP_VERSION_OLD'], '<a href="http://www.phpbb.com/community/viewtopic.php?f=14&t=2152375">', '</a>'),
|
||||
'L_PHP_VERSION_OLD' => sprintf($user->lang['PHP_VERSION_OLD'], '<a href="https://www.phpbb.com/community/viewtopic.php?f=14&t=2152375">', '</a>'),
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -575,13 +575,20 @@ class acp_modules
|
|||
// format. phpbb_acp_info_acp_foo needs to be turned into
|
||||
// acp_foo_info and the respective file has to be included
|
||||
// manually because it does not support auto loading
|
||||
if (!class_exists($info_class))
|
||||
$old_info_class_file = str_replace("phpbb_{$module_class}_info_", '', $cur_module);
|
||||
$old_info_class = $old_info_class_file . '_info';
|
||||
|
||||
if (class_exists($old_info_class))
|
||||
{
|
||||
$info_class_file = str_replace("phpbb_{$module_class}_info_", '', $cur_module);
|
||||
$info_class = $info_class_file . '_info';
|
||||
if (!class_exists($info_class) && file_exists($directory . $info_class_file . '.' . $phpEx))
|
||||
$info_class = $old_info_class;
|
||||
}
|
||||
else if (!class_exists($info_class))
|
||||
{
|
||||
$info_class = $old_info_class;
|
||||
// need to check class exists again because previous checks triggered autoloading
|
||||
if (!class_exists($info_class) && file_exists($directory . $old_info_class_file . '.' . $phpEx))
|
||||
{
|
||||
include($directory . $info_class_file . '.' . $phpEx);
|
||||
include($directory . $old_info_class_file . '.' . $phpEx);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ if (!defined('IN_PHPBB'))
|
|||
class acp_permission_roles
|
||||
{
|
||||
var $u_action;
|
||||
protected $auth_admin;
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
|
@ -30,7 +31,7 @@ class acp_permission_roles
|
|||
include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
include_once($phpbb_root_path . 'includes/acp/auth.' . $phpEx);
|
||||
|
||||
$auth_admin = new auth_admin();
|
||||
$this->auth_admin = new auth_admin();
|
||||
|
||||
$user->add_lang('acp/permissions');
|
||||
add_permission_language();
|
||||
|
@ -210,7 +211,7 @@ class acp_permission_roles
|
|||
}
|
||||
|
||||
// Now add the auth settings
|
||||
$auth_admin->acl_set_role($role_id, $auth_settings);
|
||||
$this->auth_admin->acl_set_role($role_id, $auth_settings);
|
||||
|
||||
$role_name = (!empty($user->lang[$role_name])) ? $user->lang[$role_name] : $role_name;
|
||||
add_log('admin', 'LOG_' . strtoupper($permission_type) . 'ROLE_' . strtoupper($action), $role_name);
|
||||
|
@ -343,7 +344,7 @@ class acp_permission_roles
|
|||
// Get users/groups/forums using this preset...
|
||||
if ($action == 'edit')
|
||||
{
|
||||
$hold_ary = $auth_admin->get_role_mask($role_id);
|
||||
$hold_ary = $this->auth_admin->get_role_mask($role_id);
|
||||
|
||||
if (sizeof($hold_ary))
|
||||
{
|
||||
|
@ -354,7 +355,7 @@ class acp_permission_roles
|
|||
'L_ROLE_ASSIGNED_TO' => sprintf($user->lang['ROLE_ASSIGNED_TO'], $role_name))
|
||||
);
|
||||
|
||||
$auth_admin->display_role_mask($hold_ary);
|
||||
$this->auth_admin->display_role_mask($hold_ary);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -445,8 +446,8 @@ class acp_permission_roles
|
|||
'S_DISPLAY_ROLE_MASK' => true)
|
||||
);
|
||||
|
||||
$hold_ary = $auth_admin->get_role_mask($display_item);
|
||||
$auth_admin->display_role_mask($hold_ary);
|
||||
$hold_ary = $this->auth_admin->get_role_mask($display_item);
|
||||
$this->auth_admin->display_role_mask($hold_ary);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -462,7 +463,7 @@ class acp_permission_roles
|
|||
$auth_options = array(0 => $auth_options);
|
||||
|
||||
// Making use of auth_admin method here (we do not really want to change two similar code fragments)
|
||||
auth_admin::build_permission_array($auth_options, $content_array, $categories, $key_sort_array);
|
||||
$this->auth_admin->build_permission_array($auth_options, $content_array, $categories, $key_sort_array);
|
||||
|
||||
$content_array = $content_array[0];
|
||||
|
||||
|
@ -500,8 +501,6 @@ class acp_permission_roles
|
|||
{
|
||||
global $db;
|
||||
|
||||
$auth_admin = new auth_admin();
|
||||
|
||||
// Get complete auth array
|
||||
$sql = 'SELECT auth_option, auth_option_id
|
||||
FROM ' . ACL_OPTIONS_TABLE . "
|
||||
|
@ -529,19 +528,19 @@ class acp_permission_roles
|
|||
$db->sql_freeresult($result);
|
||||
|
||||
// Get role assignments
|
||||
$hold_ary = $auth_admin->get_role_mask($role_id);
|
||||
$hold_ary = $this->auth_admin->get_role_mask($role_id);
|
||||
|
||||
// Re-assign permissions
|
||||
foreach ($hold_ary as $forum_id => $forum_ary)
|
||||
{
|
||||
if (isset($forum_ary['users']))
|
||||
{
|
||||
$auth_admin->acl_set('user', $forum_id, $forum_ary['users'], $auth_settings, 0, false);
|
||||
$this->auth_admin->acl_set('user', $forum_id, $forum_ary['users'], $auth_settings, 0, false);
|
||||
}
|
||||
|
||||
if (isset($forum_ary['groups']))
|
||||
{
|
||||
$auth_admin->acl_set('group', $forum_id, $forum_ary['groups'], $auth_settings, 0, false);
|
||||
$this->auth_admin->acl_set('group', $forum_id, $forum_ary['groups'], $auth_settings, 0, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -563,6 +562,6 @@ class acp_permission_roles
|
|||
WHERE role_id = ' . $role_id;
|
||||
$db->sql_query($sql);
|
||||
|
||||
$auth_admin->acl_clear_prefetch();
|
||||
$this->auth_admin->acl_clear_prefetch();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -560,7 +560,7 @@ class acp_search
|
|||
return $finder
|
||||
->extension_suffix('_backend')
|
||||
->extension_directory('/search')
|
||||
->core_path('includes/search/')
|
||||
->core_path('phpbb/search/')
|
||||
->get_classes();
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ class acp_send_statistics
|
|||
|
||||
include($phpbb_root_path . 'includes/questionnaire/questionnaire.' . $phpEx);
|
||||
|
||||
$collect_url = "http://www.phpbb.com/stats/receive_stats.php";
|
||||
$collect_url = "https://www.phpbb.com/stats/receive_stats.php";
|
||||
|
||||
$this->tpl_name = 'acp_send_statistics';
|
||||
$this->page_title = 'ACP_SEND_STATISTICS';
|
||||
|
|
|
@ -624,29 +624,31 @@ class acp_users
|
|||
$topic_id_ary = $move_topic_ary = $move_post_ary = $new_topic_id_ary = array();
|
||||
$forum_id_ary = array($new_forum_id);
|
||||
|
||||
$sql = 'SELECT topic_id, COUNT(post_id) AS total_posts
|
||||
$sql = 'SELECT topic_id, post_visibility, COUNT(post_id) AS total_posts
|
||||
FROM ' . POSTS_TABLE . "
|
||||
WHERE poster_id = $user_id
|
||||
AND forum_id <> $new_forum_id
|
||||
GROUP BY topic_id";
|
||||
GROUP BY topic_id, post_visibility";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$topic_id_ary[$row['topic_id']] = $row['total_posts'];
|
||||
$topic_id_ary[$row['topic_id']][$row['post_visibility']] = $row['total_posts'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($topic_id_ary))
|
||||
{
|
||||
$sql = 'SELECT topic_id, forum_id, topic_title, topic_replies, topic_replies_real, topic_attachment
|
||||
$sql = 'SELECT topic_id, forum_id, topic_title, topic_posts_approved, topic_posts_unapproved, topic_posts_softdeleted, topic_attachment
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('topic_id', array_keys($topic_id_ary));
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if (max($row['topic_replies'], $row['topic_replies_real']) + 1 == $topic_id_ary[$row['topic_id']])
|
||||
if ($topic_id_ary[$row['topic_id']][ITEM_APPROVED] == $row['topic_posts_approved']
|
||||
&& $topic_id_ary[$row['topic_id']][ITEM_UNAPPROVED] == $row['topic_posts_unapproved']
|
||||
&& $topic_id_ary[$row['topic_id']][ITEM_DELETED] == $row['topic_posts_softdeleted'])
|
||||
{
|
||||
$move_topic_ary[] = $row['topic_id'];
|
||||
}
|
||||
|
@ -679,7 +681,7 @@ class acp_users
|
|||
'topic_time' => time(),
|
||||
'forum_id' => $new_forum_id,
|
||||
'icon_id' => 0,
|
||||
'topic_approved' => 1,
|
||||
'topic_visibility' => ITEM_APPROVED,
|
||||
'topic_title' => $post_ary['title'],
|
||||
'topic_first_poster_name' => $user_row['username'],
|
||||
'topic_type' => POST_NORMAL,
|
||||
|
@ -1036,7 +1038,7 @@ class acp_users
|
|||
$sql = 'SELECT COUNT(post_id) as posts_in_queue
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE poster_id = ' . $user_id . '
|
||||
AND post_approved = 0';
|
||||
AND post_visibility = ' . ITEM_UNAPPROVED;
|
||||
$result = $db->sql_query($sql);
|
||||
$user_row['posts_in_queue'] = (int) $db->sql_fetchfield('posts_in_queue');
|
||||
$db->sql_freeresult($result);
|
||||
|
|
|
@ -1,247 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Apache auth plug-in for phpBB3
|
||||
*
|
||||
* Authentication plug-ins is largely down to Sergey Kanareykin, our thanks to him.
|
||||
*
|
||||
* @package login
|
||||
* @copyright (c) 2005 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the user is identified to apache
|
||||
* Only allow changing authentication to apache if the user is identified
|
||||
* Called in acp_board while setting authentication plugins
|
||||
*
|
||||
* @return boolean|string false if the user is identified and else an error message
|
||||
*/
|
||||
function init_apache()
|
||||
{
|
||||
global $user, $request;
|
||||
|
||||
if (!$request->is_set('PHP_AUTH_USER', phpbb_request_interface::SERVER) || $user->data['username'] !== htmlspecialchars_decode($request->server('PHP_AUTH_USER')))
|
||||
{
|
||||
return $user->lang['APACHE_SETUP_BEFORE_USE'];
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Login function
|
||||
*/
|
||||
function login_apache(&$username, &$password)
|
||||
{
|
||||
global $db, $request;
|
||||
|
||||
// do not allow empty password
|
||||
if (!$password)
|
||||
{
|
||||
return array(
|
||||
'status' => LOGIN_ERROR_PASSWORD,
|
||||
'error_msg' => 'NO_PASSWORD_SUPPLIED',
|
||||
'user_row' => array('user_id' => ANONYMOUS),
|
||||
);
|
||||
}
|
||||
|
||||
if (!$username)
|
||||
{
|
||||
return array(
|
||||
'status' => LOGIN_ERROR_USERNAME,
|
||||
'error_msg' => 'LOGIN_ERROR_USERNAME',
|
||||
'user_row' => array('user_id' => ANONYMOUS),
|
||||
);
|
||||
}
|
||||
|
||||
if (!$request->is_set('PHP_AUTH_USER', phpbb_request_interface::SERVER))
|
||||
{
|
||||
return array(
|
||||
'status' => LOGIN_ERROR_EXTERNAL_AUTH,
|
||||
'error_msg' => 'LOGIN_ERROR_EXTERNAL_AUTH_APACHE',
|
||||
'user_row' => array('user_id' => ANONYMOUS),
|
||||
);
|
||||
}
|
||||
|
||||
$php_auth_user = htmlspecialchars_decode($request->server('PHP_AUTH_USER'));
|
||||
$php_auth_pw = htmlspecialchars_decode($request->server('PHP_AUTH_PW'));
|
||||
|
||||
if (!empty($php_auth_user) && !empty($php_auth_pw))
|
||||
{
|
||||
if ($php_auth_user !== $username)
|
||||
{
|
||||
return array(
|
||||
'status' => LOGIN_ERROR_USERNAME,
|
||||
'error_msg' => 'LOGIN_ERROR_USERNAME',
|
||||
'user_row' => array('user_id' => ANONYMOUS),
|
||||
);
|
||||
}
|
||||
|
||||
$sql = 'SELECT user_id, username, user_password, user_passchg, user_email, user_type
|
||||
FROM ' . USERS_TABLE . "
|
||||
WHERE username = '" . $db->sql_escape($php_auth_user) . "'";
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($row)
|
||||
{
|
||||
// User inactive...
|
||||
if ($row['user_type'] == USER_INACTIVE || $row['user_type'] == USER_IGNORE)
|
||||
{
|
||||
return array(
|
||||
'status' => LOGIN_ERROR_ACTIVE,
|
||||
'error_msg' => 'ACTIVE_ERROR',
|
||||
'user_row' => $row,
|
||||
);
|
||||
}
|
||||
|
||||
// Successful login...
|
||||
return array(
|
||||
'status' => LOGIN_SUCCESS,
|
||||
'error_msg' => false,
|
||||
'user_row' => $row,
|
||||
);
|
||||
}
|
||||
|
||||
// this is the user's first login so create an empty profile
|
||||
return array(
|
||||
'status' => LOGIN_SUCCESS_CREATE_PROFILE,
|
||||
'error_msg' => false,
|
||||
'user_row' => user_row_apache($php_auth_user, $php_auth_pw),
|
||||
);
|
||||
}
|
||||
|
||||
// Not logged into apache
|
||||
return array(
|
||||
'status' => LOGIN_ERROR_EXTERNAL_AUTH,
|
||||
'error_msg' => 'LOGIN_ERROR_EXTERNAL_AUTH_APACHE',
|
||||
'user_row' => array('user_id' => ANONYMOUS),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Autologin function
|
||||
*
|
||||
* @return array containing the user row or empty if no auto login should take place
|
||||
*/
|
||||
function autologin_apache()
|
||||
{
|
||||
global $db, $request;
|
||||
|
||||
if (!$request->is_set('PHP_AUTH_USER', phpbb_request_interface::SERVER))
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
$php_auth_user = htmlspecialchars_decode($request->server('PHP_AUTH_USER'));
|
||||
$php_auth_pw = htmlspecialchars_decode($request->server('PHP_AUTH_PW'));
|
||||
|
||||
if (!empty($php_auth_user) && !empty($php_auth_pw))
|
||||
{
|
||||
set_var($php_auth_user, $php_auth_user, 'string', true);
|
||||
set_var($php_auth_pw, $php_auth_pw, 'string', true);
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . USERS_TABLE . "
|
||||
WHERE username = '" . $db->sql_escape($php_auth_user) . "'";
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($row)
|
||||
{
|
||||
return ($row['user_type'] == USER_INACTIVE || $row['user_type'] == USER_IGNORE) ? array() : $row;
|
||||
}
|
||||
|
||||
if (!function_exists('user_add'))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
}
|
||||
|
||||
// create the user if he does not exist yet
|
||||
user_add(user_row_apache($php_auth_user, $php_auth_pw));
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . USERS_TABLE . "
|
||||
WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($php_auth_user)) . "'";
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($row)
|
||||
{
|
||||
return $row;
|
||||
}
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* This function generates an array which can be passed to the user_add function in order to create a user
|
||||
*/
|
||||
function user_row_apache($username, $password)
|
||||
{
|
||||
global $db, $config, $user;
|
||||
// first retrieve default group id
|
||||
$sql = 'SELECT group_id
|
||||
FROM ' . GROUPS_TABLE . "
|
||||
WHERE group_name = '" . $db->sql_escape('REGISTERED') . "'
|
||||
AND group_type = " . GROUP_SPECIAL;
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!$row)
|
||||
{
|
||||
trigger_error('NO_GROUP');
|
||||
}
|
||||
|
||||
// generate user account data
|
||||
return array(
|
||||
'username' => $username,
|
||||
'user_password' => phpbb_hash($password),
|
||||
'user_email' => '',
|
||||
'group_id' => (int) $row['group_id'],
|
||||
'user_type' => USER_NORMAL,
|
||||
'user_ip' => $user->ip,
|
||||
'user_new' => ($config['new_member_post_limit']) ? 1 : 0,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* The session validation function checks whether the user is still logged in
|
||||
*
|
||||
* @return boolean true if the given user is authenticated or false if the session should be closed
|
||||
*/
|
||||
function validate_session_apache(&$user)
|
||||
{
|
||||
global $request;
|
||||
|
||||
// Check if PHP_AUTH_USER is set and handle this case
|
||||
if ($request->is_set('PHP_AUTH_USER', phpbb_request_interface::SERVER))
|
||||
{
|
||||
$php_auth_user = $request->server('PHP_AUTH_USER');
|
||||
|
||||
return ($php_auth_user === $user['username']) ? true : false;
|
||||
}
|
||||
|
||||
// PHP_AUTH_USER is not set. A valid session is now determined by the user type (anonymous/bot or not)
|
||||
if ($user['user_type'] == USER_IGNORE)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
|
@ -1,289 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Database auth plug-in for phpBB3
|
||||
*
|
||||
* Authentication plug-ins is largely down to Sergey Kanareykin, our thanks to him.
|
||||
*
|
||||
* This is for authentication via the integrated user table
|
||||
*
|
||||
* @package login
|
||||
* @copyright (c) 2005 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Login function
|
||||
*
|
||||
* @param string $username
|
||||
* @param string $password
|
||||
* @param string $ip IP address the login is taking place from. Used to
|
||||
* limit the number of login attempts per IP address.
|
||||
* @param string $browser The user agent used to login
|
||||
* @param string $forwarded_for X_FORWARDED_FOR header sent with login request
|
||||
* @return array A associative array of the format
|
||||
* array(
|
||||
* 'status' => status constant
|
||||
* 'error_msg' => string
|
||||
* 'user_row' => array
|
||||
* )
|
||||
*/
|
||||
function login_db($username, $password, $ip = '', $browser = '', $forwarded_for = '')
|
||||
{
|
||||
global $db, $config;
|
||||
global $request;
|
||||
|
||||
// Auth plugins get the password untrimmed.
|
||||
// For compatibility we trim() here.
|
||||
$password = trim($password);
|
||||
|
||||
// do not allow empty password
|
||||
if (!$password)
|
||||
{
|
||||
return array(
|
||||
'status' => LOGIN_ERROR_PASSWORD,
|
||||
'error_msg' => 'NO_PASSWORD_SUPPLIED',
|
||||
'user_row' => array('user_id' => ANONYMOUS),
|
||||
);
|
||||
}
|
||||
|
||||
if (!$username)
|
||||
{
|
||||
return array(
|
||||
'status' => LOGIN_ERROR_USERNAME,
|
||||
'error_msg' => 'LOGIN_ERROR_USERNAME',
|
||||
'user_row' => array('user_id' => ANONYMOUS),
|
||||
);
|
||||
}
|
||||
|
||||
$username_clean = utf8_clean_string($username);
|
||||
|
||||
$sql = 'SELECT user_id, username, user_password, user_passchg, user_pass_convert, user_email, user_type, user_login_attempts
|
||||
FROM ' . USERS_TABLE . "
|
||||
WHERE username_clean = '" . $db->sql_escape($username_clean) . "'";
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (($ip && !$config['ip_login_limit_use_forwarded']) ||
|
||||
($forwarded_for && $config['ip_login_limit_use_forwarded']))
|
||||
{
|
||||
$sql = 'SELECT COUNT(*) AS attempts
|
||||
FROM ' . LOGIN_ATTEMPT_TABLE . '
|
||||
WHERE attempt_time > ' . (time() - (int) $config['ip_login_limit_time']);
|
||||
if ($config['ip_login_limit_use_forwarded'])
|
||||
{
|
||||
$sql .= " AND attempt_forwarded_for = '" . $db->sql_escape($forwarded_for) . "'";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql .= " AND attempt_ip = '" . $db->sql_escape($ip) . "' ";
|
||||
}
|
||||
|
||||
$result = $db->sql_query($sql);
|
||||
$attempts = (int) $db->sql_fetchfield('attempts');
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$attempt_data = array(
|
||||
'attempt_ip' => $ip,
|
||||
'attempt_browser' => trim(substr($browser, 0, 149)),
|
||||
'attempt_forwarded_for' => $forwarded_for,
|
||||
'attempt_time' => time(),
|
||||
'user_id' => ($row) ? (int) $row['user_id'] : 0,
|
||||
'username' => $username,
|
||||
'username_clean' => $username_clean,
|
||||
);
|
||||
$sql = 'INSERT INTO ' . LOGIN_ATTEMPT_TABLE . $db->sql_build_array('INSERT', $attempt_data);
|
||||
$result = $db->sql_query($sql);
|
||||
}
|
||||
else
|
||||
{
|
||||
$attempts = 0;
|
||||
}
|
||||
|
||||
if (!$row)
|
||||
{
|
||||
if ($config['ip_login_limit_max'] && $attempts >= $config['ip_login_limit_max'])
|
||||
{
|
||||
return array(
|
||||
'status' => LOGIN_ERROR_ATTEMPTS,
|
||||
'error_msg' => 'LOGIN_ERROR_ATTEMPTS',
|
||||
'user_row' => array('user_id' => ANONYMOUS),
|
||||
);
|
||||
}
|
||||
|
||||
return array(
|
||||
'status' => LOGIN_ERROR_USERNAME,
|
||||
'error_msg' => 'LOGIN_ERROR_USERNAME',
|
||||
'user_row' => array('user_id' => ANONYMOUS),
|
||||
);
|
||||
}
|
||||
|
||||
$show_captcha = ($config['max_login_attempts'] && $row['user_login_attempts'] >= $config['max_login_attempts']) ||
|
||||
($config['ip_login_limit_max'] && $attempts >= $config['ip_login_limit_max']);
|
||||
|
||||
// If there are too much login attempts, we need to check for an confirm image
|
||||
// Every auth module is able to define what to do by itself...
|
||||
if ($show_captcha)
|
||||
{
|
||||
// Visual Confirmation handling
|
||||
if (!class_exists('phpbb_captcha_factory', false))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include ($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
|
||||
}
|
||||
|
||||
$captcha = phpbb_captcha_factory::get_instance($config['captcha_plugin']);
|
||||
$captcha->init(CONFIRM_LOGIN);
|
||||
$vc_response = $captcha->validate($row);
|
||||
if ($vc_response)
|
||||
{
|
||||
return array(
|
||||
'status' => LOGIN_ERROR_ATTEMPTS,
|
||||
'error_msg' => 'LOGIN_ERROR_ATTEMPTS',
|
||||
'user_row' => $row,
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$captcha->reset();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// If the password convert flag is set we need to convert it
|
||||
if ($row['user_pass_convert'])
|
||||
{
|
||||
// enable super globals to get literal value
|
||||
// this is needed to prevent unicode normalization
|
||||
$super_globals_disabled = $request->super_globals_disabled();
|
||||
if ($super_globals_disabled)
|
||||
{
|
||||
$request->enable_super_globals();
|
||||
}
|
||||
|
||||
// in phpBB2 passwords were used exactly as they were sent, with addslashes applied
|
||||
$password_old_format = isset($_REQUEST['password']) ? (string) $_REQUEST['password'] : '';
|
||||
$password_old_format = (!STRIP) ? addslashes($password_old_format) : $password_old_format;
|
||||
$password_new_format = $request->variable('password', '', true);
|
||||
|
||||
if ($super_globals_disabled)
|
||||
{
|
||||
$request->disable_super_globals();
|
||||
}
|
||||
|
||||
if ($password == $password_new_format)
|
||||
{
|
||||
if (!function_exists('utf8_to_cp1252'))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include($phpbb_root_path . 'includes/utf/data/recode_basic.' . $phpEx);
|
||||
}
|
||||
|
||||
// cp1252 is phpBB2's default encoding, characters outside ASCII range might work when converted into that encoding
|
||||
// plain md5 support left in for conversions from other systems.
|
||||
if ((strlen($row['user_password']) == 34 && (phpbb_check_hash(md5($password_old_format), $row['user_password']) || phpbb_check_hash(md5(utf8_to_cp1252($password_old_format)), $row['user_password'])))
|
||||
|| (strlen($row['user_password']) == 32 && (md5($password_old_format) == $row['user_password'] || md5(utf8_to_cp1252($password_old_format)) == $row['user_password'])))
|
||||
{
|
||||
$hash = phpbb_hash($password_new_format);
|
||||
|
||||
// Update the password in the users table to the new format and remove user_pass_convert flag
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET user_password = \'' . $db->sql_escape($hash) . '\',
|
||||
user_pass_convert = 0
|
||||
WHERE user_id = ' . $row['user_id'];
|
||||
$db->sql_query($sql);
|
||||
|
||||
$row['user_pass_convert'] = 0;
|
||||
$row['user_password'] = $hash;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Although we weren't able to convert this password we have to
|
||||
// increase login attempt count to make sure this cannot be exploited
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET user_login_attempts = user_login_attempts + 1
|
||||
WHERE user_id = ' . (int) $row['user_id'] . '
|
||||
AND user_login_attempts < ' . LOGIN_ATTEMPTS_MAX;
|
||||
$db->sql_query($sql);
|
||||
|
||||
return array(
|
||||
'status' => LOGIN_ERROR_PASSWORD_CONVERT,
|
||||
'error_msg' => 'LOGIN_ERROR_PASSWORD_CONVERT',
|
||||
'user_row' => $row,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check password ...
|
||||
if (!$row['user_pass_convert'] && phpbb_check_hash($password, $row['user_password']))
|
||||
{
|
||||
// Check for old password hash...
|
||||
if (strlen($row['user_password']) == 32)
|
||||
{
|
||||
$hash = phpbb_hash($password);
|
||||
|
||||
// Update the password in the users table to the new format
|
||||
$sql = 'UPDATE ' . USERS_TABLE . "
|
||||
SET user_password = '" . $db->sql_escape($hash) . "',
|
||||
user_pass_convert = 0
|
||||
WHERE user_id = {$row['user_id']}";
|
||||
$db->sql_query($sql);
|
||||
|
||||
$row['user_password'] = $hash;
|
||||
}
|
||||
|
||||
$sql = 'DELETE FROM ' . LOGIN_ATTEMPT_TABLE . '
|
||||
WHERE user_id = ' . $row['user_id'];
|
||||
$db->sql_query($sql);
|
||||
|
||||
if ($row['user_login_attempts'] != 0)
|
||||
{
|
||||
// Successful, reset login attempts (the user passed all stages)
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET user_login_attempts = 0
|
||||
WHERE user_id = ' . $row['user_id'];
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
// User inactive...
|
||||
if ($row['user_type'] == USER_INACTIVE || $row['user_type'] == USER_IGNORE)
|
||||
{
|
||||
return array(
|
||||
'status' => LOGIN_ERROR_ACTIVE,
|
||||
'error_msg' => 'ACTIVE_ERROR',
|
||||
'user_row' => $row,
|
||||
);
|
||||
}
|
||||
|
||||
// Successful login... set user_login_attempts to zero...
|
||||
return array(
|
||||
'status' => LOGIN_SUCCESS,
|
||||
'error_msg' => false,
|
||||
'user_row' => $row,
|
||||
);
|
||||
}
|
||||
|
||||
// Password incorrect - increase login attempts
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET user_login_attempts = user_login_attempts + 1
|
||||
WHERE user_id = ' . (int) $row['user_id'] . '
|
||||
AND user_login_attempts < ' . LOGIN_ATTEMPTS_MAX;
|
||||
$db->sql_query($sql);
|
||||
|
||||
// Give status about wrong password...
|
||||
return array(
|
||||
'status' => ($show_captcha) ? LOGIN_ERROR_ATTEMPTS : LOGIN_ERROR_PASSWORD,
|
||||
'error_msg' => ($show_captcha) ? 'LOGIN_ERROR_ATTEMPTS' : 'LOGIN_ERROR_PASSWORD',
|
||||
'user_row' => $row,
|
||||
);
|
||||
}
|
|
@ -1,350 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* LDAP auth plug-in for phpBB3
|
||||
*
|
||||
* Authentication plug-ins is largely down to Sergey Kanareykin, our thanks to him.
|
||||
*
|
||||
* @package login
|
||||
* @copyright (c) 2005 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Connect to ldap server
|
||||
* Only allow changing authentication to ldap if we can connect to the ldap server
|
||||
* Called in acp_board while setting authentication plugins
|
||||
*/
|
||||
function init_ldap()
|
||||
{
|
||||
global $config, $user;
|
||||
|
||||
if (!@extension_loaded('ldap'))
|
||||
{
|
||||
return $user->lang['LDAP_NO_LDAP_EXTENSION'];
|
||||
}
|
||||
|
||||
$config['ldap_port'] = (int) $config['ldap_port'];
|
||||
if ($config['ldap_port'])
|
||||
{
|
||||
$ldap = @ldap_connect($config['ldap_server'], $config['ldap_port']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$ldap = @ldap_connect($config['ldap_server']);
|
||||
}
|
||||
|
||||
if (!$ldap)
|
||||
{
|
||||
return $user->lang['LDAP_NO_SERVER_CONNECTION'];
|
||||
}
|
||||
|
||||
@ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3);
|
||||
@ldap_set_option($ldap, LDAP_OPT_REFERRALS, 0);
|
||||
|
||||
if ($config['ldap_user'] || $config['ldap_password'])
|
||||
{
|
||||
if (!@ldap_bind($ldap, htmlspecialchars_decode($config['ldap_user']), htmlspecialchars_decode($config['ldap_password'])))
|
||||
{
|
||||
return $user->lang['LDAP_INCORRECT_USER_PASSWORD'];
|
||||
}
|
||||
}
|
||||
|
||||
// ldap_connect only checks whether the specified server is valid, so the connection might still fail
|
||||
$search = @ldap_search(
|
||||
$ldap,
|
||||
htmlspecialchars_decode($config['ldap_base_dn']),
|
||||
ldap_user_filter($user->data['username']),
|
||||
(empty($config['ldap_email'])) ?
|
||||
array(htmlspecialchars_decode($config['ldap_uid'])) :
|
||||
array(htmlspecialchars_decode($config['ldap_uid']), htmlspecialchars_decode($config['ldap_email'])),
|
||||
0,
|
||||
1
|
||||
);
|
||||
|
||||
if ($search === false)
|
||||
{
|
||||
return $user->lang['LDAP_SEARCH_FAILED'];
|
||||
}
|
||||
|
||||
$result = @ldap_get_entries($ldap, $search);
|
||||
|
||||
@ldap_close($ldap);
|
||||
|
||||
|
||||
if (!is_array($result) || sizeof($result) < 2)
|
||||
{
|
||||
return sprintf($user->lang['LDAP_NO_IDENTITY'], $user->data['username']);
|
||||
}
|
||||
|
||||
if (!empty($config['ldap_email']) && !isset($result[0][htmlspecialchars_decode($config['ldap_email'])]))
|
||||
{
|
||||
return $user->lang['LDAP_NO_EMAIL'];
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Login function
|
||||
*/
|
||||
function login_ldap(&$username, &$password)
|
||||
{
|
||||
global $db, $config, $user;
|
||||
|
||||
// do not allow empty password
|
||||
if (!$password)
|
||||
{
|
||||
return array(
|
||||
'status' => LOGIN_ERROR_PASSWORD,
|
||||
'error_msg' => 'NO_PASSWORD_SUPPLIED',
|
||||
'user_row' => array('user_id' => ANONYMOUS),
|
||||
);
|
||||
}
|
||||
|
||||
if (!$username)
|
||||
{
|
||||
return array(
|
||||
'status' => LOGIN_ERROR_USERNAME,
|
||||
'error_msg' => 'LOGIN_ERROR_USERNAME',
|
||||
'user_row' => array('user_id' => ANONYMOUS),
|
||||
);
|
||||
}
|
||||
|
||||
if (!@extension_loaded('ldap'))
|
||||
{
|
||||
return array(
|
||||
'status' => LOGIN_ERROR_EXTERNAL_AUTH,
|
||||
'error_msg' => 'LDAP_NO_LDAP_EXTENSION',
|
||||
'user_row' => array('user_id' => ANONYMOUS),
|
||||
);
|
||||
}
|
||||
|
||||
$config['ldap_port'] = (int) $config['ldap_port'];
|
||||
if ($config['ldap_port'])
|
||||
{
|
||||
$ldap = @ldap_connect($config['ldap_server'], $config['ldap_port']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$ldap = @ldap_connect($config['ldap_server']);
|
||||
}
|
||||
|
||||
if (!$ldap)
|
||||
{
|
||||
return array(
|
||||
'status' => LOGIN_ERROR_EXTERNAL_AUTH,
|
||||
'error_msg' => 'LDAP_NO_SERVER_CONNECTION',
|
||||
'user_row' => array('user_id' => ANONYMOUS),
|
||||
);
|
||||
}
|
||||
|
||||
@ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3);
|
||||
@ldap_set_option($ldap, LDAP_OPT_REFERRALS, 0);
|
||||
|
||||
if ($config['ldap_user'] || $config['ldap_password'])
|
||||
{
|
||||
if (!@ldap_bind($ldap, htmlspecialchars_decode($config['ldap_user']), htmlspecialchars_decode($config['ldap_password'])))
|
||||
{
|
||||
return array(
|
||||
'status' => LOGIN_ERROR_EXTERNAL_AUTH,
|
||||
'error_msg' => 'LDAP_NO_SERVER_CONNECTION',
|
||||
'user_row' => array('user_id' => ANONYMOUS),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$search = @ldap_search(
|
||||
$ldap,
|
||||
htmlspecialchars_decode($config['ldap_base_dn']),
|
||||
ldap_user_filter($username),
|
||||
(empty($config['ldap_email'])) ?
|
||||
array(htmlspecialchars_decode($config['ldap_uid'])) :
|
||||
array(htmlspecialchars_decode($config['ldap_uid']), htmlspecialchars_decode($config['ldap_email'])),
|
||||
0,
|
||||
1
|
||||
);
|
||||
|
||||
$ldap_result = @ldap_get_entries($ldap, $search);
|
||||
|
||||
if (is_array($ldap_result) && sizeof($ldap_result) > 1)
|
||||
{
|
||||
if (@ldap_bind($ldap, $ldap_result[0]['dn'], htmlspecialchars_decode($password)))
|
||||
{
|
||||
@ldap_close($ldap);
|
||||
|
||||
$sql ='SELECT user_id, username, user_password, user_passchg, user_email, user_type
|
||||
FROM ' . USERS_TABLE . "
|
||||
WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'";
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($row)
|
||||
{
|
||||
unset($ldap_result);
|
||||
|
||||
// User inactive...
|
||||
if ($row['user_type'] == USER_INACTIVE || $row['user_type'] == USER_IGNORE)
|
||||
{
|
||||
return array(
|
||||
'status' => LOGIN_ERROR_ACTIVE,
|
||||
'error_msg' => 'ACTIVE_ERROR',
|
||||
'user_row' => $row,
|
||||
);
|
||||
}
|
||||
|
||||
// Successful login... set user_login_attempts to zero...
|
||||
return array(
|
||||
'status' => LOGIN_SUCCESS,
|
||||
'error_msg' => false,
|
||||
'user_row' => $row,
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
// retrieve default group id
|
||||
$sql = 'SELECT group_id
|
||||
FROM ' . GROUPS_TABLE . "
|
||||
WHERE group_name = '" . $db->sql_escape('REGISTERED') . "'
|
||||
AND group_type = " . GROUP_SPECIAL;
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!$row)
|
||||
{
|
||||
trigger_error('NO_GROUP');
|
||||
}
|
||||
|
||||
// generate user account data
|
||||
$ldap_user_row = array(
|
||||
'username' => $username,
|
||||
'user_password' => phpbb_hash($password),
|
||||
'user_email' => (!empty($config['ldap_email'])) ? utf8_htmlspecialchars($ldap_result[0][htmlspecialchars_decode($config['ldap_email'])][0]) : '',
|
||||
'group_id' => (int) $row['group_id'],
|
||||
'user_type' => USER_NORMAL,
|
||||
'user_ip' => $user->ip,
|
||||
'user_new' => ($config['new_member_post_limit']) ? 1 : 0,
|
||||
);
|
||||
|
||||
unset($ldap_result);
|
||||
|
||||
// this is the user's first login so create an empty profile
|
||||
return array(
|
||||
'status' => LOGIN_SUCCESS_CREATE_PROFILE,
|
||||
'error_msg' => false,
|
||||
'user_row' => $ldap_user_row,
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
unset($ldap_result);
|
||||
@ldap_close($ldap);
|
||||
|
||||
// Give status about wrong password...
|
||||
return array(
|
||||
'status' => LOGIN_ERROR_PASSWORD,
|
||||
'error_msg' => 'LOGIN_ERROR_PASSWORD',
|
||||
'user_row' => array('user_id' => ANONYMOUS),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ldap_close($ldap);
|
||||
|
||||
return array(
|
||||
'status' => LOGIN_ERROR_USERNAME,
|
||||
'error_msg' => 'LOGIN_ERROR_USERNAME',
|
||||
'user_row' => array('user_id' => ANONYMOUS),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a filter string for ldap_search to find a user
|
||||
*
|
||||
* @param $username string Username identifying the searched user
|
||||
*
|
||||
* @return string A filter string for ldap_search
|
||||
*/
|
||||
function ldap_user_filter($username)
|
||||
{
|
||||
global $config;
|
||||
|
||||
$filter = '(' . $config['ldap_uid'] . '=' . ldap_escape(htmlspecialchars_decode($username)) . ')';
|
||||
if ($config['ldap_user_filter'])
|
||||
{
|
||||
$_filter = ($config['ldap_user_filter'][0] == '(' && substr($config['ldap_user_filter'], -1) == ')') ? $config['ldap_user_filter'] : "({$config['ldap_user_filter']})";
|
||||
$filter = "(&{$filter}{$_filter})";
|
||||
}
|
||||
return $filter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Escapes an LDAP AttributeValue
|
||||
*/
|
||||
function ldap_escape($string)
|
||||
{
|
||||
return str_replace(array('*', '\\', '(', ')'), array('\\*', '\\\\', '\\(', '\\)'), $string);
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is used to output any required fields in the authentication
|
||||
* admin panel. It also defines any required configuration table fields.
|
||||
*/
|
||||
function acp_ldap(&$new)
|
||||
{
|
||||
global $user;
|
||||
|
||||
$tpl = '
|
||||
|
||||
<dl>
|
||||
<dt><label for="ldap_server">' . $user->lang['LDAP_SERVER'] . $user->lang['COLON'] . '</label><br /><span>' . $user->lang['LDAP_SERVER_EXPLAIN'] . '</span></dt>
|
||||
<dd><input type="text" id="ldap_server" size="40" name="config[ldap_server]" value="' . $new['ldap_server'] . '" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="ldap_port">' . $user->lang['LDAP_PORT'] . $user->lang['COLON'] . '</label><br /><span>' . $user->lang['LDAP_PORT_EXPLAIN'] . '</span></dt>
|
||||
<dd><input type="text" id="ldap_port" size="40" name="config[ldap_port]" value="' . $new['ldap_port'] . '" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="ldap_dn">' . $user->lang['LDAP_DN'] . $user->lang['COLON'] . '</label><br /><span>' . $user->lang['LDAP_DN_EXPLAIN'] . '</span></dt>
|
||||
<dd><input type="text" id="ldap_dn" size="40" name="config[ldap_base_dn]" value="' . $new['ldap_base_dn'] . '" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="ldap_uid">' . $user->lang['LDAP_UID'] . $user->lang['COLON'] . '</label><br /><span>' . $user->lang['LDAP_UID_EXPLAIN'] . '</span></dt>
|
||||
<dd><input type="text" id="ldap_uid" size="40" name="config[ldap_uid]" value="' . $new['ldap_uid'] . '" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="ldap_user_filter">' . $user->lang['LDAP_USER_FILTER'] . $user->lang['COLON'] . '</label><br /><span>' . $user->lang['LDAP_USER_FILTER_EXPLAIN'] . '</span></dt>
|
||||
<dd><input type="text" id="ldap_user_filter" size="40" name="config[ldap_user_filter]" value="' . $new['ldap_user_filter'] . '" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="ldap_email">' . $user->lang['LDAP_EMAIL'] . $user->lang['COLON'] . '</label><br /><span>' . $user->lang['LDAP_EMAIL_EXPLAIN'] . '</span></dt>
|
||||
<dd><input type="email" id="ldap_email" size="40" name="config[ldap_email]" value="' . $new['ldap_email'] . '" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="ldap_user">' . $user->lang['LDAP_USER'] . $user->lang['COLON'] . '</label><br /><span>' . $user->lang['LDAP_USER_EXPLAIN'] . '</span></dt>
|
||||
<dd><input type="text" id="ldap_user" size="40" name="config[ldap_user]" value="' . $new['ldap_user'] . '" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="ldap_password">' . $user->lang['LDAP_PASSWORD'] . $user->lang['COLON'] . '</label><br /><span>' . $user->lang['LDAP_PASSWORD_EXPLAIN'] . '</span></dt>
|
||||
<dd><input type="password" id="ldap_password" size="40" name="config[ldap_password]" value="' . $new['ldap_password'] . '" autocomplete="off" /></dd>
|
||||
</dl>
|
||||
';
|
||||
|
||||
// These are fields required in the config table
|
||||
return array(
|
||||
'tpl' => $tpl,
|
||||
'config' => array('ldap_server', 'ldap_port', 'ldap_base_dn', 'ldap_uid', 'ldap_user_filter', 'ldap_email', 'ldap_user', 'ldap_password')
|
||||
);
|
||||
}
|
|
@ -134,11 +134,11 @@ class bbcode
|
|||
|
||||
$style_resource_locator = new phpbb_style_resource_locator();
|
||||
$style_path_provider = new phpbb_style_extension_path_provider($phpbb_extension_manager, new phpbb_style_path_provider(), $phpbb_root_path);
|
||||
$template = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator, new phpbb_template_context(), $phpbb_extension_manager);
|
||||
$template = new phpbb_template_twig($phpbb_root_path, $phpEx, $config, $user, new phpbb_template_context(), $phpbb_extension_manager);
|
||||
$style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator, $style_path_provider, $template);
|
||||
$style->set_style();
|
||||
$template->set_filenames(array('bbcode.html' => 'bbcode.html'));
|
||||
$this->template_filename = $style_resource_locator->get_source_file_for_handle('bbcode.html');
|
||||
$this->template_filename = $template->get_source_file_for_handle('bbcode.html');
|
||||
}
|
||||
|
||||
$bbcode_ids = $rowset = $sql = array();
|
||||
|
|
|
@ -110,12 +110,8 @@ class phpbb_captcha_qa
|
|||
*/
|
||||
static public function is_installed()
|
||||
{
|
||||
global $db, $phpbb_root_path, $phpEx;
|
||||
global $db;
|
||||
|
||||
if (!class_exists('phpbb_db_tools', false))
|
||||
{
|
||||
include("$phpbb_root_path/includes/db/db_tools.$phpEx");
|
||||
}
|
||||
$db_tool = new phpbb_db_tools($db);
|
||||
|
||||
return $db_tool->sql_table_exists(CAPTCHA_QUESTIONS_TABLE);
|
||||
|
@ -297,12 +293,8 @@ class phpbb_captcha_qa
|
|||
*/
|
||||
function install()
|
||||
{
|
||||
global $db, $phpbb_root_path, $phpEx;
|
||||
global $db;
|
||||
|
||||
if (!class_exists('phpbb_db_tools'))
|
||||
{
|
||||
include("$phpbb_root_path/includes/db/db_tools.$phpEx");
|
||||
}
|
||||
$db_tool = new phpbb_db_tools($db);
|
||||
|
||||
$tables = array(CAPTCHA_QUESTIONS_TABLE, CAPTCHA_ANSWERS_TABLE, CAPTCHA_QA_CONFIRM_TABLE);
|
||||
|
|
|
@ -87,6 +87,10 @@ define('ITEM_UNLOCKED', 0);
|
|||
define('ITEM_LOCKED', 1);
|
||||
define('ITEM_MOVED', 2);
|
||||
|
||||
define('ITEM_UNAPPROVED', 0); // => has not yet been approved
|
||||
define('ITEM_APPROVED', 1); // => has been approved, and has not been soft deleted
|
||||
define('ITEM_DELETED', 2); // => has been soft deleted
|
||||
|
||||
// Forum Flags
|
||||
define('FORUM_FLAG_LINK_TRACK', 1);
|
||||
define('FORUM_FLAG_PRUNE_POLL', 2);
|
||||
|
@ -156,6 +160,7 @@ define('PHYSICAL_LINK', 2);
|
|||
define('CONFIRM_REG', 1);
|
||||
define('CONFIRM_LOGIN', 2);
|
||||
define('CONFIRM_POST', 3);
|
||||
define('CONFIRM_REPORT', 4);
|
||||
|
||||
// Categories - Attachments
|
||||
define('ATTACHMENT_CATEGORY_NONE', 0);
|
||||
|
|
|
@ -1974,7 +1974,7 @@ function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $s
|
|||
*/
|
||||
function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_time = false, $mark_time_forum = false)
|
||||
{
|
||||
global $db, $tracking_topics, $user, $config, $auth, $request;
|
||||
global $db, $tracking_topics, $user, $config, $auth, $request, $phpbb_container;
|
||||
|
||||
// Determine the users last forum mark time if not given.
|
||||
if ($mark_time_forum === false)
|
||||
|
@ -1999,7 +1999,7 @@ function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_ti
|
|||
|
||||
// Handle update of unapproved topics info.
|
||||
// Only update for moderators having m_approve permission for the forum.
|
||||
$sql_update_unapproved = ($auth->acl_get('m_approve', $forum_id)) ? '': 'AND t.topic_approved = 1';
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
|
||||
// Check the forum for any left unread topics.
|
||||
// If there are none, we mark the forum as read.
|
||||
|
@ -2019,8 +2019,8 @@ function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_ti
|
|||
AND tt.user_id = ' . $user->data['user_id'] . ')
|
||||
WHERE t.forum_id = ' . $forum_id . '
|
||||
AND t.topic_last_post_time > ' . $mark_time_forum . '
|
||||
AND t.topic_moved_id = 0 ' .
|
||||
$sql_update_unapproved . '
|
||||
AND t.topic_moved_id = 0
|
||||
AND ' . $phpbb_content_visibility->get_visibility_sql('topic', $forum_id, 't.') . '
|
||||
AND (tt.topic_id IS NULL
|
||||
OR tt.mark_time < t.topic_last_post_time)';
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
|
@ -2044,8 +2044,8 @@ function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_ti
|
|||
FROM ' . TOPICS_TABLE . ' t
|
||||
WHERE t.forum_id = ' . $forum_id . '
|
||||
AND t.topic_last_post_time > ' . $mark_time_forum . '
|
||||
AND t.topic_moved_id = 0 ' .
|
||||
$sql_update_unapproved;
|
||||
AND t.topic_moved_id = 0
|
||||
AND ' . $phpbb_content_visibility->get_visibility_sql('topic', $forum_id, 't.');
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$check_forum = $tracking_topics['tf'][$forum_id];
|
||||
|
@ -2345,9 +2345,8 @@ function phpbb_generate_template_pagination($template, $base_url, $block_var_nam
|
|||
$tpl_prefix . 'BASE_URL' => $base_url,
|
||||
'A_' . $tpl_prefix . 'BASE_URL' => addslashes($base_url),
|
||||
$tpl_prefix . 'PER_PAGE' => $per_page,
|
||||
$tpl_prefix . 'PREVIOUS_PAGE' => $previous_page,
|
||||
$tpl_prefix . 'PREV_PAGE' => $previous_page,
|
||||
$tpl_prefix . 'NEXT_PAGE' => ($on_page != $total_pages) ? $base_url . $url_delim . $start_name . '=' . ($on_page * $per_page) : '',
|
||||
'U_' . $tpl_prefix . 'PREVIOUS_PAGE' => $previous_page,
|
||||
'U_' . $tpl_prefix . 'NEXT_PAGE' => ($on_page != $total_pages) ? $base_url . $url_delim . $start_name . '=' . ($on_page * $per_page) : '',
|
||||
$tpl_prefix . 'TOTAL_PAGES' => $total_pages,
|
||||
$tpl_prefix . 'CURRENT_PAGE' => $on_page,
|
||||
);
|
||||
|
@ -3302,8 +3301,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
|||
return;
|
||||
}
|
||||
|
||||
$redirect = meta_refresh(3, $redirect);
|
||||
trigger_error($message . '<br /><br />' . sprintf($l_redirect, '<a href="' . $redirect . '">', '</a>'));
|
||||
redirect($redirect);
|
||||
}
|
||||
|
||||
// Something failed, determine what...
|
||||
|
|
|
@ -82,6 +82,8 @@ function adm_page_header($page_title)
|
|||
'T_RANKS_PATH' => "{$phpbb_root_path}{$config['ranks_path']}/",
|
||||
'T_UPLOAD_PATH' => "{$phpbb_root_path}{$config['upload_path']}/",
|
||||
|
||||
'T_ASSETS_VERSION' => $config['assets_version'],
|
||||
|
||||
'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'] . '" />',
|
||||
|
|
|
@ -644,7 +644,7 @@ function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_s
|
|||
'posts' => ($call_delete_posts) ? delete_posts($where_type, $where_ids, false, true, $post_count_sync, false) : 0,
|
||||
);
|
||||
|
||||
$sql = 'SELECT topic_id, forum_id, topic_approved, topic_moved_id
|
||||
$sql = 'SELECT topic_id, forum_id, topic_visibility, topic_moved_id
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
WHERE ' . $where_clause;
|
||||
$result = $db->sql_query($sql);
|
||||
|
@ -654,7 +654,7 @@ function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_s
|
|||
$forum_ids[] = $row['forum_id'];
|
||||
$topic_ids[] = $row['topic_id'];
|
||||
|
||||
if ($row['topic_approved'] && !$row['topic_moved_id'])
|
||||
if ($row['topic_visibility'] == ITEM_APPROVED && !$row['topic_moved_id'])
|
||||
{
|
||||
$approved_topics++;
|
||||
}
|
||||
|
@ -775,7 +775,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
|
|||
$approved_posts = 0;
|
||||
$post_ids = $topic_ids = $forum_ids = $post_counts = $remove_topics = array();
|
||||
|
||||
$sql = 'SELECT post_id, poster_id, post_approved, post_postcount, topic_id, forum_id
|
||||
$sql = 'SELECT post_id, poster_id, post_visibility, post_postcount, topic_id, forum_id
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE ' . $where_clause;
|
||||
$result = $db->sql_query($sql);
|
||||
|
@ -787,12 +787,12 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
|
|||
$topic_ids[] = (int) $row['topic_id'];
|
||||
$forum_ids[] = (int) $row['forum_id'];
|
||||
|
||||
if ($row['post_postcount'] && $post_count_sync && $row['post_approved'])
|
||||
if ($row['post_postcount'] && $post_count_sync && $row['post_visibility'] == ITEM_APPROVED)
|
||||
{
|
||||
$post_counts[$row['poster_id']] = (!empty($post_counts[$row['poster_id']])) ? $post_counts[$row['poster_id']] + 1 : 1;
|
||||
}
|
||||
|
||||
if ($row['post_approved'])
|
||||
if ($row['post_visibility'] == ITEM_APPROVED)
|
||||
{
|
||||
$approved_posts++;
|
||||
}
|
||||
|
@ -889,7 +889,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
|
|||
sync('forum', 'forum_id', $forum_ids, true, true);
|
||||
}
|
||||
|
||||
if ($approved_posts)
|
||||
if ($approved_posts && $post_count_sync)
|
||||
{
|
||||
set_config_count('num_posts', $approved_posts * (-1), true);
|
||||
}
|
||||
|
@ -1292,7 +1292,7 @@ function phpbb_unlink($filename, $mode = 'file', $entry_removed = false)
|
|||
* - forum Resync complete forum
|
||||
* - topic Resync topics
|
||||
* - topic_moved Removes topic shadows that would be in the same forum as the topic they link to
|
||||
* - topic_approved Resyncs the topic_approved flag according to the status of the first post
|
||||
* - topic_visibility Resyncs the topic_visibility flag according to the status of the first post
|
||||
* - post_reported Resyncs the post_reported flag, relying on actual reports
|
||||
* - topic_reported Resyncs the topic_reported flag, relying on post_reported flags
|
||||
* - post_attachement Same as post_reported, but with attachment flags
|
||||
|
@ -1312,7 +1312,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
|||
$where_ids = ($where_ids) ? array((int) $where_ids) : array();
|
||||
}
|
||||
|
||||
if ($mode == 'forum' || $mode == 'topic' || $mode == 'topic_approved' || $mode == 'topic_reported' || $mode == 'post_reported')
|
||||
if ($mode == 'forum' || $mode == 'topic' || $mode == 'topic_visibility' || $mode == 'topic_reported' || $mode == 'post_reported')
|
||||
{
|
||||
if (!$where_type)
|
||||
{
|
||||
|
@ -1398,43 +1398,55 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
|||
$db->sql_transaction('commit');
|
||||
break;
|
||||
|
||||
case 'topic_approved':
|
||||
case 'topic_visibility':
|
||||
|
||||
$db->sql_transaction('begin');
|
||||
switch ($db->sql_layer)
|
||||
|
||||
$sql = 'SELECT t.topic_id, p.post_visibility
|
||||
FROM ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . " p
|
||||
$where_sql_and p.topic_id = t.topic_id
|
||||
AND p.post_visibility = " . ITEM_APPROVED;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$topics_approved = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
case 'mysql4':
|
||||
case 'mysqli':
|
||||
$sql = 'UPDATE ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . " p
|
||||
SET t.topic_approved = p.post_approved
|
||||
$where_sql_and t.topic_first_post_id = p.post_id";
|
||||
$db->sql_query($sql);
|
||||
break;
|
||||
$topics_approved[] = (int) $row['topic_id'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
default:
|
||||
$sql = 'SELECT t.topic_id, p.post_approved
|
||||
FROM ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . " p
|
||||
$where_sql_and p.post_id = t.topic_first_post_id
|
||||
AND p.post_approved <> t.topic_approved";
|
||||
$result = $db->sql_query($sql);
|
||||
$sql = 'SELECT t.topic_id, p.post_visibility
|
||||
FROM ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . " p
|
||||
$where_sql_and " . $db->sql_in_set('t.topic_id', $topics_approved, true, true) . '
|
||||
AND p.topic_id = t.topic_id
|
||||
AND p.post_visibility = ' . ITEM_DELETED;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$topic_ids = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$topic_ids[] = $row['topic_id'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
$topics_softdeleted = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$topics_softdeleted[] = (int) $row['topic_id'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!sizeof($topic_ids))
|
||||
{
|
||||
return;
|
||||
}
|
||||
$topics_softdeleted = array_diff($topics_softdeleted, $topics_approved);
|
||||
$topics_not_unapproved = array_merge($topics_softdeleted, $topics_approved);
|
||||
|
||||
$update_ary = array(
|
||||
ITEM_UNAPPROVED => (!empty($topics_not_unapproved)) ? $where_sql_and . ' ' . $db->sql_in_set('topic_id', $topics_not_unapproved, true) : '',
|
||||
ITEM_APPROVED => (!empty($topics_approved)) ? ' WHERE ' . $db->sql_in_set('topic_id', $topics_approved) : '',
|
||||
ITEM_DELETED => (!empty($topics_softdeleted)) ? ' WHERE ' . $db->sql_in_set('topic_id', $topics_softdeleted) : '',
|
||||
);
|
||||
|
||||
foreach ($topic_visiblities as $visibility => $sql_where)
|
||||
{
|
||||
if ($sql_where)
|
||||
{
|
||||
$sql = 'UPDATE ' . TOPICS_TABLE . '
|
||||
SET topic_approved = 1 - topic_approved
|
||||
WHERE ' . $db->sql_in_set('topic_id', $topic_ids);
|
||||
SET topic_visibility = ' . $visibility . '
|
||||
' . $sql_where;
|
||||
$db->sql_query($sql);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$db->sql_transaction('commit');
|
||||
|
@ -1675,9 +1687,12 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
|||
$forum_data[$forum_id] = $row;
|
||||
if ($sync_extra)
|
||||
{
|
||||
$forum_data[$forum_id]['posts'] = 0;
|
||||
$forum_data[$forum_id]['topics'] = 0;
|
||||
$forum_data[$forum_id]['topics_real'] = 0;
|
||||
$forum_data[$forum_id]['posts_approved'] = 0;
|
||||
$forum_data[$forum_id]['posts_unapproved'] = 0;
|
||||
$forum_data[$forum_id]['posts_softdeleted'] = 0;
|
||||
$forum_data[$forum_id]['topics_approved'] = 0;
|
||||
$forum_data[$forum_id]['topics_unapproved'] = 0;
|
||||
$forum_data[$forum_id]['topics_softdeleted'] = 0;
|
||||
}
|
||||
$forum_data[$forum_id]['last_post_id'] = 0;
|
||||
$forum_data[$forum_id]['last_post_subject'] = '';
|
||||
|
@ -1698,20 +1713,27 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
|||
// 2: Get topic counts for each forum (optional)
|
||||
if ($sync_extra)
|
||||
{
|
||||
$sql = 'SELECT forum_id, topic_approved, COUNT(topic_id) AS forum_topics
|
||||
$sql = 'SELECT forum_id, topic_visibility, COUNT(topic_id) AS total_topics
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('forum_id', $forum_ids) . '
|
||||
GROUP BY forum_id, topic_approved';
|
||||
GROUP BY forum_id, topic_visibility';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$forum_id = (int) $row['forum_id'];
|
||||
$forum_data[$forum_id]['topics_real'] += $row['forum_topics'];
|
||||
|
||||
if ($row['topic_approved'])
|
||||
if ($row['topic_visibility'] == ITEM_APPROVED)
|
||||
{
|
||||
$forum_data[$forum_id]['topics'] = $row['forum_topics'];
|
||||
$forum_data[$forum_id]['topics_approved'] = $row['total_topics'];
|
||||
}
|
||||
else if ($row['topic_visibility'] == ITEM_UNAPPROVED)
|
||||
{
|
||||
$forum_data[$forum_id]['topics_unapproved'] = $row['total_topics'];
|
||||
}
|
||||
else if ($row['topic_visibility'] == ITEM_DELETED)
|
||||
{
|
||||
$forum_data[$forum_id]['topics_softdeleted'] = $row['total_topics'];
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
@ -1722,18 +1744,16 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
|||
{
|
||||
if (sizeof($forum_ids) == 1)
|
||||
{
|
||||
$sql = 'SELECT SUM(t.topic_replies + 1) AS forum_posts
|
||||
$sql = 'SELECT SUM(t.topic_posts_approved) AS forum_posts_approved, SUM(t.topic_posts_unapproved) AS forum_posts_unapproved, SUM(t.topic_posts_softdeleted) AS forum_posts_softdeleted
|
||||
FROM ' . TOPICS_TABLE . ' t
|
||||
WHERE ' . $db->sql_in_set('t.forum_id', $forum_ids) . '
|
||||
AND t.topic_approved = 1
|
||||
AND t.topic_status <> ' . ITEM_MOVED;
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'SELECT t.forum_id, SUM(t.topic_replies + 1) AS forum_posts
|
||||
$sql = 'SELECT t.forum_id, SUM(t.topic_posts_approved) AS forum_posts_approved, SUM(t.topic_posts_unapproved) AS forum_posts_unapproved, SUM(t.topic_posts_softdeleted) AS forum_posts_softdeleted
|
||||
FROM ' . TOPICS_TABLE . ' t
|
||||
WHERE ' . $db->sql_in_set('t.forum_id', $forum_ids) . '
|
||||
AND t.topic_approved = 1
|
||||
AND t.topic_status <> ' . ITEM_MOVED . '
|
||||
GROUP BY t.forum_id';
|
||||
}
|
||||
|
@ -1744,7 +1764,9 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
|||
{
|
||||
$forum_id = (sizeof($forum_ids) == 1) ? (int) $forum_ids[0] : (int) $row['forum_id'];
|
||||
|
||||
$forum_data[$forum_id]['posts'] = (int) $row['forum_posts'];
|
||||
$forum_data[$forum_id]['posts_approved'] = (int) $row['forum_posts_approved'];
|
||||
$forum_data[$forum_id]['posts_unapproved'] = (int) $row['forum_posts_unapproved'];
|
||||
$forum_data[$forum_id]['posts_softdeleted'] = (int) $row['forum_posts_softdeleted'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
@ -1755,14 +1777,14 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
|||
$sql = 'SELECT MAX(t.topic_last_post_id) as last_post_id
|
||||
FROM ' . TOPICS_TABLE . ' t
|
||||
WHERE ' . $db->sql_in_set('t.forum_id', $forum_ids) . '
|
||||
AND t.topic_approved = 1';
|
||||
AND t.topic_visibility = ' . ITEM_APPROVED;
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'SELECT t.forum_id, MAX(t.topic_last_post_id) as last_post_id
|
||||
FROM ' . TOPICS_TABLE . ' t
|
||||
WHERE ' . $db->sql_in_set('t.forum_id', $forum_ids) . '
|
||||
AND t.topic_approved = 1
|
||||
AND t.topic_visibility = ' . ITEM_APPROVED . '
|
||||
GROUP BY t.forum_id';
|
||||
}
|
||||
|
||||
|
@ -1825,7 +1847,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
|||
|
||||
if ($sync_extra)
|
||||
{
|
||||
array_push($fieldnames, 'posts', 'topics', 'topics_real');
|
||||
array_push($fieldnames, 'posts_approved', 'posts_unapproved', 'posts_softdeleted', 'topics_approved', 'topics_unapproved', 'topics_softdeleted');
|
||||
}
|
||||
|
||||
foreach ($forum_data as $forum_id => $row)
|
||||
|
@ -1860,11 +1882,11 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
|||
break;
|
||||
|
||||
case 'topic':
|
||||
$topic_data = $post_ids = $approved_unapproved_ids = $resync_forums = $delete_topics = $delete_posts = $moved_topics = array();
|
||||
$topic_data = $post_ids = $resync_forums = $delete_topics = $delete_posts = $moved_topics = array();
|
||||
|
||||
$db->sql_transaction('begin');
|
||||
|
||||
$sql = 'SELECT t.topic_id, t.forum_id, t.topic_moved_id, t.topic_approved, ' . (($sync_extra) ? 't.topic_attachment, t.topic_reported, ' : '') . 't.topic_poster, t.topic_time, t.topic_replies, t.topic_replies_real, t.topic_first_post_id, t.topic_first_poster_name, t.topic_first_poster_colour, t.topic_last_post_id, t.topic_last_post_subject, t.topic_last_poster_id, t.topic_last_poster_name, t.topic_last_poster_colour, t.topic_last_post_time
|
||||
$sql = 'SELECT t.topic_id, t.forum_id, t.topic_moved_id, t.topic_visibility, ' . (($sync_extra) ? 't.topic_attachment, t.topic_reported, ' : '') . 't.topic_poster, t.topic_time, t.topic_posts_approved, t.topic_posts_unapproved, t.topic_posts_softdeleted, t.topic_first_post_id, t.topic_first_poster_name, t.topic_first_poster_colour, t.topic_last_post_id, t.topic_last_post_subject, t.topic_last_poster_id, t.topic_last_poster_name, t.topic_last_poster_colour, t.topic_last_post_time
|
||||
FROM ' . TOPICS_TABLE . " t
|
||||
$where_sql";
|
||||
$result = $db->sql_query($sql);
|
||||
|
@ -1879,8 +1901,10 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
|||
|
||||
$topic_id = (int) $row['topic_id'];
|
||||
$topic_data[$topic_id] = $row;
|
||||
$topic_data[$topic_id]['replies_real'] = -1;
|
||||
$topic_data[$topic_id]['replies'] = 0;
|
||||
$topic_data[$topic_id]['visibility'] = ITEM_UNAPPROVED;
|
||||
$topic_data[$topic_id]['posts_approved'] = 0;
|
||||
$topic_data[$topic_id]['posts_unapproved'] = 0;
|
||||
$topic_data[$topic_id]['posts_softdeleted'] = 0;
|
||||
$topic_data[$topic_id]['first_post_id'] = 0;
|
||||
$topic_data[$topic_id]['last_post_id'] = 0;
|
||||
unset($topic_data[$topic_id]['topic_id']);
|
||||
|
@ -1897,11 +1921,11 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
|||
$db->sql_freeresult($result);
|
||||
|
||||
// Use "t" as table alias because of the $where_sql clause
|
||||
// NOTE: 't.post_approved' in the GROUP BY is causing a major slowdown.
|
||||
$sql = 'SELECT t.topic_id, t.post_approved, COUNT(t.post_id) AS total_posts, MIN(t.post_id) AS first_post_id, MAX(t.post_id) AS last_post_id
|
||||
// NOTE: 't.post_visibility' in the GROUP BY is causing a major slowdown.
|
||||
$sql = 'SELECT t.topic_id, t.post_visibility, COUNT(t.post_id) AS total_posts, MIN(t.post_id) AS first_post_id, MAX(t.post_id) AS last_post_id
|
||||
FROM ' . POSTS_TABLE . " t
|
||||
$where_sql
|
||||
GROUP BY t.topic_id, t.post_approved";
|
||||
GROUP BY t.topic_id, t.post_visibility";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
|
@ -1922,14 +1946,38 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
|||
// When we'll be done, only topics with no posts will remain
|
||||
unset($delete_topics[$topic_id]);
|
||||
|
||||
$topic_data[$topic_id]['replies_real'] += $row['total_posts'];
|
||||
$topic_data[$topic_id]['first_post_id'] = (!$topic_data[$topic_id]['first_post_id']) ? $row['first_post_id'] : min($topic_data[$topic_id]['first_post_id'], $row['first_post_id']);
|
||||
|
||||
if ($row['post_approved'] || !$topic_data[$topic_id]['last_post_id'])
|
||||
if ($row['post_visibility'] == ITEM_APPROVED)
|
||||
{
|
||||
$topic_data[$topic_id]['replies'] = $row['total_posts'] - 1;
|
||||
$topic_data[$topic_id]['posts_approved'] = $row['total_posts'];
|
||||
}
|
||||
else if ($row['post_visibility'] == ITEM_UNAPPROVED)
|
||||
{
|
||||
$topic_data[$topic_id]['posts_unapproved'] = $row['total_posts'];
|
||||
}
|
||||
else if ($row['post_visibility'] == ITEM_DELETED)
|
||||
{
|
||||
$topic_data[$topic_id]['posts_softdeleted'] = $row['total_posts'];
|
||||
}
|
||||
|
||||
if ($row['post_visibility'] == ITEM_APPROVED)
|
||||
{
|
||||
$topic_data[$topic_id]['visibility'] = ITEM_APPROVED;
|
||||
$topic_data[$topic_id]['first_post_id'] = $row['first_post_id'];
|
||||
$topic_data[$topic_id]['last_post_id'] = $row['last_post_id'];
|
||||
}
|
||||
else if ($topic_data[$topic_id]['visibility'] != ITEM_APPROVED)
|
||||
{
|
||||
// If there is no approved post, we take the min/max of the other visibilities
|
||||
// for the last and first post info, because it is only visible to moderators anyway
|
||||
$topic_data[$topic_id]['first_post_id'] = (!empty($topic_data[$topic_id]['first_post_id'])) ? min($topic_data[$topic_id]['first_post_id'], $row['first_post_id']) : $row['first_post_id'];
|
||||
$topic_data[$topic_id]['last_post_id'] = max($topic_data[$topic_id]['last_post_id'], $row['last_post_id']);
|
||||
|
||||
if ($topic_data[$topic_id]['visibility'] == ITEM_UNAPPROVED)
|
||||
{
|
||||
// Soft delete status is stronger than unapproved.
|
||||
$topic_data[$topic_id]['visibility'] = $row['post_visibility'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
@ -1970,7 +2018,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
|||
unset($delete_topics, $delete_topic_ids);
|
||||
}
|
||||
|
||||
$sql = 'SELECT p.post_id, p.topic_id, p.post_approved, p.poster_id, p.post_subject, p.post_username, p.post_time, u.username, u.user_colour
|
||||
$sql = 'SELECT p.post_id, p.topic_id, p.post_visibility, p.poster_id, p.post_subject, p.post_username, p.post_time, u.username, u.user_colour
|
||||
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
|
||||
WHERE ' . $db->sql_in_set('p.post_id', $post_ids) . '
|
||||
AND u.user_id = p.poster_id';
|
||||
|
@ -1983,10 +2031,6 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
|||
|
||||
if ($row['post_id'] == $topic_data[$topic_id]['first_post_id'])
|
||||
{
|
||||
if ($topic_data[$topic_id]['topic_approved'] != $row['post_approved'])
|
||||
{
|
||||
$approved_unapproved_ids[] = $topic_id;
|
||||
}
|
||||
$topic_data[$topic_id]['time'] = $row['post_time'];
|
||||
$topic_data[$topic_id]['poster'] = $row['poster_id'];
|
||||
$topic_data[$topic_id]['first_poster_name'] = ($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username'];
|
||||
|
@ -2047,7 +2091,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
|||
$sync_shadow_topics = array();
|
||||
if (sizeof($post_ids))
|
||||
{
|
||||
$sql = 'SELECT p.post_id, p.topic_id, p.post_approved, p.poster_id, p.post_subject, p.post_username, p.post_time, u.username, u.user_colour
|
||||
$sql = 'SELECT p.post_id, p.topic_id, p.post_visibility, p.poster_id, p.post_subject, p.post_username, p.post_time, u.username, u.user_colour
|
||||
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
|
||||
WHERE ' . $db->sql_in_set('p.post_id', $post_ids) . '
|
||||
AND u.user_id = p.poster_id';
|
||||
|
@ -2114,18 +2158,8 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
|||
unset($sync_shadow_topics, $shadow_topic_data);
|
||||
}
|
||||
|
||||
// approved becomes unapproved, and vice-versa
|
||||
if (sizeof($approved_unapproved_ids))
|
||||
{
|
||||
$sql = 'UPDATE ' . TOPICS_TABLE . '
|
||||
SET topic_approved = 1 - topic_approved
|
||||
WHERE ' . $db->sql_in_set('topic_id', $approved_unapproved_ids);
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
unset($approved_unapproved_ids);
|
||||
|
||||
// These are fields that will be synchronised
|
||||
$fieldnames = array('time', 'replies', 'replies_real', 'poster', 'first_post_id', 'first_poster_name', 'first_poster_colour', 'last_post_id', 'last_post_subject', 'last_post_time', 'last_poster_id', 'last_poster_name', 'last_poster_colour');
|
||||
$fieldnames = array('time', 'visibility', 'posts_approved', 'posts_unapproved', 'posts_softdeleted', 'poster', 'first_post_id', 'first_poster_name', 'first_poster_colour', 'last_post_id', 'last_post_subject', 'last_post_time', 'last_poster_id', 'last_poster_name', 'last_poster_colour');
|
||||
|
||||
if ($sync_extra)
|
||||
{
|
||||
|
@ -2899,7 +2933,7 @@ function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port
|
|||
|
||||
if ($fsock = @fsockopen($host, $port, $errno, $errstr, $timeout))
|
||||
{
|
||||
@fputs($fsock, "GET $directory/$filename HTTP/1.1\r\n");
|
||||
@fputs($fsock, "GET $directory/$filename HTTP/1.0\r\n");
|
||||
@fputs($fsock, "HOST: $host\r\n");
|
||||
@fputs($fsock, "Connection: close\r\n\r\n");
|
||||
|
||||
|
|
|
@ -20,6 +20,71 @@ if (!defined('IN_PHPBB'))
|
|||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get DB connection from config.php.
|
||||
*
|
||||
* Used to bootstrap the container.
|
||||
*
|
||||
* @param string $config_file
|
||||
* @return phpbb_db_driver
|
||||
*/
|
||||
function phpbb_bootstrap_db_connection($config_file)
|
||||
{
|
||||
require($config_file);
|
||||
$dbal_driver_class = phpbb_convert_30_dbms_to_31($dbms);
|
||||
|
||||
$db = new $dbal_driver_class();
|
||||
$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, defined('PHPBB_DB_NEW_LINK'));
|
||||
|
||||
return $db;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get table prefix from config.php.
|
||||
*
|
||||
* Used to bootstrap the container.
|
||||
*
|
||||
* @param string $config_file
|
||||
* @return string table prefix
|
||||
*/
|
||||
function phpbb_bootstrap_table_prefix($config_file)
|
||||
{
|
||||
require($config_file);
|
||||
return $table_prefix;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get enabled extensions.
|
||||
*
|
||||
* Used to bootstrap the container.
|
||||
*
|
||||
* @param string $config_file
|
||||
* @param string $phpbb_root_path
|
||||
* @return array enabled extensions
|
||||
*/
|
||||
function phpbb_bootstrap_enabled_exts($config_file, $phpbb_root_path)
|
||||
{
|
||||
$db = phpbb_bootstrap_db_connection($config_file);
|
||||
$table_prefix = phpbb_bootstrap_table_prefix($config_file);
|
||||
$extension_table = $table_prefix.'ext';
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . $extension_table . '
|
||||
WHERE ext_active = 1';
|
||||
|
||||
$result = $db->sql_query($sql);
|
||||
$rows = $db->sql_fetchrowset($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$exts = array();
|
||||
foreach ($rows as $row)
|
||||
{
|
||||
$exts[$row['ext_name']] = $phpbb_root_path . 'ext/' . $row['ext_name'] . '/';
|
||||
}
|
||||
|
||||
return $exts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the ContainerBuilder object
|
||||
*
|
||||
|
@ -106,16 +171,9 @@ function phpbb_create_update_container($phpbb_root_path, $php_ext, $config_path)
|
|||
* @param string $php_ext PHP Extension
|
||||
* @return ContainerBuilder object (compiled)
|
||||
*/
|
||||
function phpbb_create_compiled_container(array $extensions, array $passes, $phpbb_root_path, $php_ext)
|
||||
function phpbb_create_compiled_container($config_file, array $extensions, array $passes, $phpbb_root_path, $php_ext)
|
||||
{
|
||||
// Create a temporary container for access to the ext.manager service
|
||||
$tmp_container = phpbb_create_container($extensions, $phpbb_root_path, $php_ext);
|
||||
$tmp_container->compile();
|
||||
|
||||
// XXX stop writing to global $cache when
|
||||
// http://tracker.phpbb.com/browse/PHPBB3-11203 is fixed
|
||||
$GLOBALS['cache'] = $tmp_container->get('cache');
|
||||
$installed_exts = $tmp_container->get('ext.manager')->all_enabled();
|
||||
$installed_exts = phpbb_bootstrap_enabled_exts($config_file, $phpbb_root_path);
|
||||
|
||||
// Now pass the enabled extension paths into the ext compiler extension
|
||||
$extensions[] = new phpbb_di_extension_ext($installed_exts);
|
||||
|
@ -142,7 +200,7 @@ function phpbb_create_compiled_container(array $extensions, array $passes, $phpb
|
|||
* @param string $php_ext PHP Extension
|
||||
* @return ContainerBuilder object (compiled)
|
||||
*/
|
||||
function phpbb_create_dumped_container(array $extensions, array $passes, $phpbb_root_path, $php_ext)
|
||||
function phpbb_create_dumped_container($config_file, array $extensions, array $passes, $phpbb_root_path, $php_ext)
|
||||
{
|
||||
// Check for our cached container; if it exists, use it
|
||||
$container_filename = phpbb_container_filename($phpbb_root_path, $php_ext);
|
||||
|
@ -152,7 +210,7 @@ function phpbb_create_dumped_container(array $extensions, array $passes, $phpbb_
|
|||
return new phpbb_cache_container();
|
||||
}
|
||||
|
||||
$container = phpbb_create_compiled_container($extensions, $passes, $phpbb_root_path, $php_ext);
|
||||
$container = phpbb_create_compiled_container($config_file, $extensions, $passes, $phpbb_root_path, $php_ext);
|
||||
|
||||
// Lastly, we create our cached container class
|
||||
$dumper = new PhpDumper($container);
|
||||
|
@ -182,10 +240,10 @@ function phpbb_create_dumped_container(array $extensions, array $passes, $phpbb_
|
|||
* @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)
|
||||
function phpbb_create_dumped_container_unless_debug($config_file, 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);
|
||||
return $container_factory($config_file, $extensions, $passes, $phpbb_root_path, $php_ext);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -199,9 +257,11 @@ function phpbb_create_dumped_container_unless_debug(array $extensions, array $pa
|
|||
*/
|
||||
function phpbb_create_default_container($phpbb_root_path, $php_ext)
|
||||
{
|
||||
$config_file = $phpbb_root_path . 'config.' . $php_ext;
|
||||
return phpbb_create_dumped_container_unless_debug(
|
||||
$config_file,
|
||||
array(
|
||||
new phpbb_di_extension_config($phpbb_root_path . 'config.' . $php_ext),
|
||||
new phpbb_di_extension_config($config_file),
|
||||
new phpbb_di_extension_core($phpbb_root_path . 'config'),
|
||||
),
|
||||
array(
|
||||
|
|
|
@ -1768,7 +1768,7 @@ function sync_post_count($offset, $limit)
|
|||
$sql = 'SELECT COUNT(post_id) AS num_posts, poster_id
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE post_postcount = 1
|
||||
AND post_approved = 1
|
||||
AND post_visibility = ' . ITEM_APPROVED . '
|
||||
GROUP BY poster_id
|
||||
ORDER BY poster_id';
|
||||
$result = $db->sql_query_limit($sql, $limit, $offset);
|
||||
|
@ -1941,7 +1941,7 @@ function update_dynamic_config()
|
|||
|
||||
$sql = 'SELECT COUNT(post_id) AS stat
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE post_approved = 1';
|
||||
WHERE post_visibility = ' . ITEM_APPROVED;
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
@ -1950,7 +1950,7 @@ function update_dynamic_config()
|
|||
|
||||
$sql = 'SELECT COUNT(topic_id) AS stat
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
WHERE topic_approved = 1';
|
||||
WHERE topic_visibility = ' . ITEM_APPROVED;
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
|
|
@ -22,7 +22,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
|||
{
|
||||
global $db, $auth, $user, $template;
|
||||
global $phpbb_root_path, $phpEx, $config;
|
||||
global $request, $phpbb_dispatcher;
|
||||
global $request, $phpbb_dispatcher, $phpbb_container;
|
||||
|
||||
$forum_rows = $subforums = $forum_ids = $forum_ids_moderator = $forum_moderators = $active_forum_ary = array();
|
||||
$parent_id = $visible_forums = 0;
|
||||
|
@ -149,6 +149,8 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
|||
$forum_tracking_info = array();
|
||||
$branch_root_id = $root_data['forum_id'];
|
||||
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
/**
|
||||
|
@ -213,9 +215,11 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
|||
$forum_tracking_info[$forum_id] = (isset($tracking_topics['f'][$forum_id])) ? (int) (base_convert($tracking_topics['f'][$forum_id], 36, 10) + $config['board_startdate']) : $user->data['user_lastmark'];
|
||||
}
|
||||
|
||||
// Count the difference of real to public topics, so we can display an information to moderators
|
||||
$row['forum_id_unapproved_topics'] = ($auth->acl_get('m_approve', $forum_id) && ($row['forum_topics_real'] != $row['forum_topics'])) ? $forum_id : 0;
|
||||
$row['forum_topics'] = ($auth->acl_get('m_approve', $forum_id)) ? $row['forum_topics_real'] : $row['forum_topics'];
|
||||
// Lets check whether there are unapproved topics/posts, so we can display an information to moderators
|
||||
$row['forum_id_unapproved_topics'] = ($auth->acl_get('m_approve', $forum_id) && $row['forum_topics_unapproved']) ? $forum_id : 0;
|
||||
$row['forum_id_unapproved_posts'] = ($auth->acl_get('m_approve', $forum_id) && $row['forum_posts_unapproved']) ? $forum_id : 0;
|
||||
$row['forum_posts'] = $phpbb_content_visibility->get_count('forum_posts', $row, $forum_id);
|
||||
$row['forum_topics'] = $phpbb_content_visibility->get_count('forum_topics', $row, $forum_id);
|
||||
|
||||
// Display active topics from this forum?
|
||||
if ($show_active && $row['forum_type'] == FORUM_POST && $auth->acl_get('f_read', $forum_id) && ($row['forum_flags'] & FORUM_FLAG_ACTIVE_TOPICS))
|
||||
|
@ -278,6 +282,11 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
|||
$forum_rows[$parent_id]['forum_id_unapproved_topics'] = $forum_id;
|
||||
}
|
||||
|
||||
if (!$forum_rows[$parent_id]['forum_id_unapproved_posts'] && $row['forum_id_unapproved_posts'])
|
||||
{
|
||||
$forum_rows[$parent_id]['forum_id_unapproved_posts'] = $forum_id;
|
||||
}
|
||||
|
||||
$forum_rows[$parent_id]['forum_topics'] += $row['forum_topics'];
|
||||
|
||||
// Do not list redirects in LINK Forums as Posts.
|
||||
|
@ -545,6 +554,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
|||
'L_MODERATOR_STR' => $l_moderator,
|
||||
|
||||
'U_UNAPPROVED_TOPICS' => ($row['forum_id_unapproved_topics']) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=unapproved_topics&f=' . $row['forum_id_unapproved_topics']) : '',
|
||||
'U_UNAPPROVED_POSTS' => ($row['forum_id_unapproved_posts']) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=unapproved_posts&f=' . $row['forum_id_unapproved_posts']) : '',
|
||||
'U_VIEWFORUM' => $u_viewforum,
|
||||
'U_LAST_POSTER' => get_username_string('profile', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
|
||||
'U_LAST_POST' => $last_post_url,
|
||||
|
@ -584,6 +594,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
|||
'L_SUBFORUM' => ($visible_forums == 1) ? $user->lang['SUBFORUM'] : $user->lang['SUBFORUMS'],
|
||||
'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'),
|
||||
'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', 'TOPICS_UNAPPROVED'),
|
||||
'UNAPPROVED_POST_IMG' => $user->img('icon_topic_unapproved', 'POSTS_UNAPPROVED'),
|
||||
));
|
||||
|
||||
if ($return_moderators)
|
||||
|
@ -815,7 +826,7 @@ function gen_forum_auth_level($mode, $forum_id, $forum_status)
|
|||
($auth->acl_get('f_post', $forum_id) && !$locked) ? $user->lang['RULES_POST_CAN'] : $user->lang['RULES_POST_CANNOT'],
|
||||
($auth->acl_get('f_reply', $forum_id) && !$locked) ? $user->lang['RULES_REPLY_CAN'] : $user->lang['RULES_REPLY_CANNOT'],
|
||||
($user->data['is_registered'] && $auth->acl_gets('f_edit', 'm_edit', $forum_id) && !$locked) ? $user->lang['RULES_EDIT_CAN'] : $user->lang['RULES_EDIT_CANNOT'],
|
||||
($user->data['is_registered'] && $auth->acl_gets('f_delete', 'm_delete', $forum_id) && !$locked) ? $user->lang['RULES_DELETE_CAN'] : $user->lang['RULES_DELETE_CANNOT'],
|
||||
($user->data['is_registered'] && ($auth->acl_gets('f_delete', 'm_delete', $forum_id) || $auth->acl_gets('f_softdelete', 'm_softdelete', $forum_id)) && !$locked) ? $user->lang['RULES_DELETE_CAN'] : $user->lang['RULES_DELETE_CANNOT'],
|
||||
);
|
||||
|
||||
if ($config['allow_attachments'])
|
||||
|
@ -1005,7 +1016,7 @@ function display_reasons($reason_id = 0)
|
|||
function display_user_activity(&$userdata)
|
||||
{
|
||||
global $auth, $template, $db, $user;
|
||||
global $phpbb_root_path, $phpEx;
|
||||
global $phpbb_root_path, $phpEx, $phpbb_container;
|
||||
|
||||
// Do not display user activity for users having more than 5000 posts...
|
||||
if ($userdata['user_posts'] > 5000)
|
||||
|
@ -1015,73 +1026,65 @@ function display_user_activity(&$userdata)
|
|||
|
||||
$forum_ary = array();
|
||||
|
||||
// Do not include those forums the user is not having read access to...
|
||||
$forum_read_ary = $auth->acl_getf('!f_read');
|
||||
|
||||
foreach ($forum_read_ary as $forum_id => $not_allowed)
|
||||
$forum_read_ary = $auth->acl_getf('f_read');
|
||||
foreach ($forum_read_ary as $forum_id => $allowed)
|
||||
{
|
||||
if ($not_allowed['f_read'])
|
||||
if ($allowed['f_read'])
|
||||
{
|
||||
$forum_ary[] = (int) $forum_id;
|
||||
}
|
||||
}
|
||||
|
||||
$forum_ary = array_unique($forum_ary);
|
||||
$forum_sql = (sizeof($forum_ary)) ? 'AND ' . $db->sql_in_set('forum_id', $forum_ary, true) : '';
|
||||
$forum_ary = array_diff($forum_ary, $user->get_passworded_forums());
|
||||
|
||||
$fid_m_approve = $auth->acl_getf('m_approve', true);
|
||||
$sql_m_approve = (!empty($fid_m_approve)) ? 'OR ' . $db->sql_in_set('forum_id', array_keys($fid_m_approve)) : '';
|
||||
|
||||
// Obtain active forum
|
||||
$sql = 'SELECT forum_id, COUNT(post_id) AS num_posts
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE poster_id = ' . $userdata['user_id'] . "
|
||||
AND post_postcount = 1
|
||||
AND (post_approved = 1
|
||||
$sql_m_approve)
|
||||
$forum_sql
|
||||
GROUP BY forum_id
|
||||
ORDER BY num_posts DESC";
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
$active_f_row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!empty($active_f_row))
|
||||
$active_f_row = $active_t_row = array();
|
||||
if (!empty($forum_ary))
|
||||
{
|
||||
$sql = 'SELECT forum_name
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
WHERE forum_id = ' . $active_f_row['forum_id'];
|
||||
$result = $db->sql_query($sql, 3600);
|
||||
$active_f_row['forum_name'] = (string) $db->sql_fetchfield('forum_name');
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
|
||||
// Obtain active forum
|
||||
$sql = 'SELECT forum_id, COUNT(post_id) AS num_posts
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE poster_id = ' . $userdata['user_id'] . '
|
||||
AND post_postcount = 1
|
||||
AND ' . $phpbb_content_visibility->get_forums_visibility_sql('post', $forum_ary) . '
|
||||
GROUP BY forum_id
|
||||
ORDER BY num_posts DESC';
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
$active_f_row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
// Obtain active topic
|
||||
// We need to exclude passworded forums here so we do not leak the topic title
|
||||
$forum_ary_topic = array_unique(array_merge($forum_ary, $user->get_passworded_forums()));
|
||||
$forum_sql_topic = (!empty($forum_ary_topic)) ? 'AND ' . $db->sql_in_set('forum_id', $forum_ary_topic, true) : '';
|
||||
if (!empty($active_f_row))
|
||||
{
|
||||
$sql = 'SELECT forum_name
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
WHERE forum_id = ' . $active_f_row['forum_id'];
|
||||
$result = $db->sql_query($sql, 3600);
|
||||
$active_f_row['forum_name'] = (string) $db->sql_fetchfield('forum_name');
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
$sql = 'SELECT topic_id, COUNT(post_id) AS num_posts
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE poster_id = ' . $userdata['user_id'] . "
|
||||
AND post_postcount = 1
|
||||
AND (post_approved = 1
|
||||
$sql_m_approve)
|
||||
$forum_sql_topic
|
||||
GROUP BY topic_id
|
||||
ORDER BY num_posts DESC";
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
$active_t_row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!empty($active_t_row))
|
||||
{
|
||||
$sql = 'SELECT topic_title
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
WHERE topic_id = ' . $active_t_row['topic_id'];
|
||||
$result = $db->sql_query($sql);
|
||||
$active_t_row['topic_title'] = (string) $db->sql_fetchfield('topic_title');
|
||||
// Obtain active topic
|
||||
$sql = 'SELECT topic_id, COUNT(post_id) AS num_posts
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE poster_id = ' . $userdata['user_id'] . '
|
||||
AND post_postcount = 1
|
||||
AND ' . $phpbb_content_visibility->get_forums_visibility_sql('post', $forum_ary) . '
|
||||
GROUP BY topic_id
|
||||
ORDER BY num_posts DESC';
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
$active_t_row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!empty($active_t_row))
|
||||
{
|
||||
$sql = 'SELECT topic_title
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
WHERE topic_id = ' . $active_t_row['topic_id'];
|
||||
$result = $db->sql_query($sql);
|
||||
$active_t_row['topic_title'] = (string) $db->sql_fetchfield('topic_title');
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
}
|
||||
|
||||
$userdata['active_t_row'] = $active_t_row;
|
||||
|
|
|
@ -184,12 +184,6 @@ function dbms_select($default = '', $only_20x_options = false)
|
|||
*/
|
||||
function get_tables(&$db)
|
||||
{
|
||||
if (!class_exists('phpbb_db_tools'))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
require($phpbb_root_path . 'includes/db/db_tools.' . $phpEx);
|
||||
}
|
||||
|
||||
$db_tools = new phpbb_db_tools($db);
|
||||
|
||||
return $db_tools->sql_list_tables();
|
||||
|
|
|
@ -249,7 +249,7 @@ class jabber
|
|||
return true;
|
||||
}
|
||||
|
||||
// Apparently an error occured...
|
||||
// Apparently an error occurred...
|
||||
$this->add_to_log('Error: open_socket() - ' . $errorstr);
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -27,8 +27,9 @@ class messenger
|
|||
var $mail_priority = MAIL_NORMAL_PRIORITY;
|
||||
var $use_queue = true;
|
||||
|
||||
var $tpl_obj = NULL;
|
||||
var $tpl_msg = array();
|
||||
/** @var phpbb_template */
|
||||
protected $template;
|
||||
|
||||
var $eol = "\n";
|
||||
|
||||
/**
|
||||
|
@ -55,10 +56,10 @@ class messenger
|
|||
$this->vars = $this->msg = $this->replyto = $this->from = '';
|
||||
$this->mail_priority = MAIL_NORMAL_PRIORITY;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set addresses for to/im as available
|
||||
*
|
||||
*
|
||||
* @param array $user User row
|
||||
*/
|
||||
function set_addresses($user)
|
||||
|
@ -210,6 +211,8 @@ class messenger
|
|||
{
|
||||
global $config, $phpbb_root_path, $phpEx, $user, $phpbb_extension_manager;
|
||||
|
||||
$this->setup_template();
|
||||
|
||||
if (!trim($template_file))
|
||||
{
|
||||
trigger_error('No template file for emailing set.', E_USER_ERROR);
|
||||
|
@ -219,46 +222,43 @@ class messenger
|
|||
{
|
||||
// fall back to board default language if the user's language is
|
||||
// missing $template_file. If this does not exist either,
|
||||
// $tpl->set_filenames will do a trigger_error
|
||||
// $this->template->set_filenames will do a trigger_error
|
||||
$template_lang = basename($config['default_lang']);
|
||||
}
|
||||
|
||||
// tpl_msg now holds a template object we can use to parse the template file
|
||||
if (!isset($this->tpl_msg[$template_lang . $template_file]))
|
||||
if ($template_path)
|
||||
{
|
||||
$style_resource_locator = new phpbb_style_resource_locator();
|
||||
$style_path_provider = new phpbb_style_extension_path_provider($phpbb_extension_manager, new phpbb_style_path_provider(), $phpbb_root_path);
|
||||
$tpl = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator, new phpbb_template_context(), $phpbb_extension_manager);
|
||||
$style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator, $style_path_provider, $tpl);
|
||||
$template_paths = array(
|
||||
$template_path,
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$template_path = (!empty($user->lang_path)) ? $user->lang_path : $phpbb_root_path . 'language/';
|
||||
$template_path .= $template_lang . '/email';
|
||||
|
||||
$this->tpl_msg[$template_lang . $template_file] = $tpl;
|
||||
$template_paths = array(
|
||||
$template_path,
|
||||
);
|
||||
|
||||
$fallback_template_path = false;
|
||||
|
||||
if (!$template_path)
|
||||
// we can only specify default language fallback when the path is not a custom one for which we
|
||||
// do not know the default language alternative
|
||||
if ($template_lang !== basename($config['default_lang']))
|
||||
{
|
||||
$template_path = (!empty($user->lang_path)) ? $user->lang_path : $phpbb_root_path . 'language/';
|
||||
$template_path .= $template_lang . '/email';
|
||||
$fallback_template_path = (!empty($user->lang_path)) ? $user->lang_path : $phpbb_root_path . 'language/';
|
||||
$fallback_template_path .= basename($config['default_lang']) . '/email';
|
||||
|
||||
// we can only specify default language fallback when the path is not a custom one for which we
|
||||
// do not know the default language alternative
|
||||
if ($template_lang !== basename($config['default_lang']))
|
||||
{
|
||||
$fallback_template_path = (!empty($user->lang_path)) ? $user->lang_path : $phpbb_root_path . 'language/';
|
||||
$fallback_template_path .= basename($config['default_lang']) . '/email';
|
||||
}
|
||||
$template_paths[] = $fallback_template_path;
|
||||
}
|
||||
|
||||
$style->set_custom_style($template_lang . '_email', array($template_path, $fallback_template_path), array(), '');
|
||||
|
||||
$tpl->set_filenames(array(
|
||||
'body' => $template_file . '.txt',
|
||||
));
|
||||
}
|
||||
|
||||
$this->tpl_obj = &$this->tpl_msg[$template_lang . $template_file];
|
||||
$this->vars = &$this->tpl_obj->_rootref;
|
||||
$this->tpl_msg = '';
|
||||
$this->set_template_paths($template_lang . '_email', $template_paths);
|
||||
|
||||
$this->template->set_filenames(array(
|
||||
'body' => $template_file . '.txt',
|
||||
));
|
||||
|
||||
$this->vars = $this->template->get_template_vars();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -268,22 +268,16 @@ class messenger
|
|||
*/
|
||||
function assign_vars($vars)
|
||||
{
|
||||
if (!is_object($this->tpl_obj))
|
||||
{
|
||||
return;
|
||||
}
|
||||
$this->setup_template();
|
||||
|
||||
$this->tpl_obj->assign_vars($vars);
|
||||
$this->template->assign_vars($vars);
|
||||
}
|
||||
|
||||
function assign_block_vars($blockname, $vars)
|
||||
{
|
||||
if (!is_object($this->tpl_obj))
|
||||
{
|
||||
return;
|
||||
}
|
||||
$this->setup_template();
|
||||
|
||||
$this->tpl_obj->assign_block_vars($blockname, $vars);
|
||||
$this->template->assign_block_vars($blockname, $vars);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -316,7 +310,7 @@ class messenger
|
|||
}
|
||||
|
||||
// Parse message through template
|
||||
$this->msg = trim($this->tpl_obj->assign_display('body'));
|
||||
$this->msg = trim($this->template->assign_display('body'));
|
||||
|
||||
// Because we use \n for newlines in the body message we need to fix line encoding errors for those admins who uploaded email template files in the wrong encoding
|
||||
$this->msg = str_replace("\r\n", "\n", $this->msg);
|
||||
|
@ -643,6 +637,31 @@ class messenger
|
|||
unset($addresses);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup template engine
|
||||
*/
|
||||
protected function setup_template()
|
||||
{
|
||||
global $config, $phpbb_root_path, $phpEx, $user, $phpbb_extension_manager;
|
||||
|
||||
if ($this->template instanceof phpbb_template)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$this->template = new phpbb_template_twig($phpbb_root_path, $phpEx, $config, $user, new phpbb_template_context(), $phpbb_extension_manager);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set template paths to load
|
||||
*/
|
||||
protected function set_template_paths($path_name, $paths)
|
||||
{
|
||||
$this->setup_template();
|
||||
|
||||
$this->template->set_style_names(array($path_name), $paths);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -455,7 +455,7 @@ class p_master
|
|||
*/
|
||||
function load_active($mode = false, $module_url = false, $execute_module = true)
|
||||
{
|
||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $user;
|
||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $user, $phpbb_style;
|
||||
|
||||
$module_path = $this->include_path . $this->p_class;
|
||||
$icat = request_var('icat', '');
|
||||
|
@ -494,6 +494,24 @@ class p_master
|
|||
// We pre-define the action parameter we are using all over the place
|
||||
if (defined('IN_ADMIN'))
|
||||
{
|
||||
/*
|
||||
* If this is an extension module, we'll try to automatically set
|
||||
* the style paths for the extension (the ext author can change them
|
||||
* if necessary).
|
||||
*/
|
||||
$module_dir = explode('_', get_class($this->module));
|
||||
|
||||
// 0 phpbb, 1 ext, 2 vendor, 3 extension name, ...
|
||||
if (isset($module_dir[3]) && $module_dir[1] === 'ext')
|
||||
{
|
||||
$module_style_dir = $phpbb_root_path . 'ext/' . $module_dir[2] . '/' . $module_dir[3] . '/adm/style';
|
||||
|
||||
if (is_dir($module_style_dir))
|
||||
{
|
||||
$phpbb_style->set_custom_style('admin', array($module_style_dir, $phpbb_admin_path . 'style'), array(), '');
|
||||
}
|
||||
}
|
||||
|
||||
// Is first module automatically enabled a duplicate and the category not passed yet?
|
||||
if (!$icat && $this->module_ary[$this->active_module_row_id]['is_duplicate'])
|
||||
{
|
||||
|
@ -505,6 +523,24 @@ class p_master
|
|||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* If this is an extension module, we'll try to automatically set
|
||||
* the style paths for the extension (the ext author can change them
|
||||
* if necessary).
|
||||
*/
|
||||
$module_dir = explode('_', get_class($this->module));
|
||||
|
||||
// 0 phpbb, 1 ext, 2 vendor, 3 extension name, ...
|
||||
if (isset($module_dir[3]) && $module_dir[1] === 'ext')
|
||||
{
|
||||
$module_style_dir = 'ext/' . $module_dir[2] . '/' . $module_dir[3] . '/styles';
|
||||
|
||||
if (is_dir($phpbb_root_path . $module_style_dir))
|
||||
{
|
||||
$phpbb_style->set_style(array($module_style_dir, 'styles'));
|
||||
}
|
||||
}
|
||||
|
||||
// If user specified the module url we will use it...
|
||||
if ($module_url !== false)
|
||||
{
|
||||
|
|
|
@ -176,7 +176,7 @@ function update_post_information($type, $ids, $return_update_sql = false)
|
|||
if ($type != 'topic')
|
||||
{
|
||||
$topic_join = ', ' . TOPICS_TABLE . ' t';
|
||||
$topic_condition = 'AND t.topic_id = p.topic_id AND t.topic_approved = 1';
|
||||
$topic_condition = 'AND t.topic_id = p.topic_id AND t.topic_visibility = ' . ITEM_APPROVED;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -190,7 +190,7 @@ function update_post_information($type, $ids, $return_update_sql = false)
|
|||
FROM ' . POSTS_TABLE . " p $topic_join
|
||||
WHERE " . $db->sql_in_set('p.' . $type . '_id', $ids) . "
|
||||
$topic_condition
|
||||
AND p.post_approved = 1";
|
||||
AND p.post_visibility = " . ITEM_APPROVED;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -198,7 +198,7 @@ function update_post_information($type, $ids, $return_update_sql = false)
|
|||
FROM ' . POSTS_TABLE . " p $topic_join
|
||||
WHERE " . $db->sql_in_set('p.' . $type . '_id', $ids) . "
|
||||
$topic_condition
|
||||
AND p.post_approved = 1
|
||||
AND p.post_visibility = " . ITEM_APPROVED . "
|
||||
GROUP BY p.{$type}_id";
|
||||
}
|
||||
$result = $db->sql_query($sql);
|
||||
|
@ -982,13 +982,15 @@ function load_drafts($topic_id = 0, $forum_id = 0, $id = 0, $pm_action = '', $ms
|
|||
function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id = 0, $show_quote_button = true)
|
||||
{
|
||||
global $user, $auth, $db, $template, $bbcode, $cache;
|
||||
global $config, $phpbb_root_path, $phpEx;
|
||||
global $config, $phpbb_root_path, $phpEx, $phpbb_container;
|
||||
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
|
||||
// Go ahead and pull all data for this topic
|
||||
$sql = 'SELECT p.post_id
|
||||
FROM ' . POSTS_TABLE . ' p' . "
|
||||
WHERE p.topic_id = $topic_id
|
||||
" . ((!$auth->acl_get('m_approve', $forum_id)) ? 'AND p.post_approved = 1' : '') . '
|
||||
AND " . $phpbb_content_visibility->get_visibility_sql('post', $forum_id, 'p.') . '
|
||||
' . (($mode == 'post_review') ? " AND p.post_id > $cur_post_id" : '') . '
|
||||
' . (($mode == 'post_review_edit') ? " AND p.post_id = $cur_post_id" : '') . '
|
||||
ORDER BY p.post_time ';
|
||||
|
@ -1175,14 +1177,14 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
|||
/**
|
||||
* Delete Post
|
||||
*/
|
||||
function delete_post($forum_id, $topic_id, $post_id, &$data)
|
||||
function delete_post($forum_id, $topic_id, $post_id, &$data, $is_soft = false, $softdelete_reason = '')
|
||||
{
|
||||
global $db, $user, $auth;
|
||||
global $db, $user, $auth, $phpbb_container;
|
||||
global $config, $phpEx, $phpbb_root_path;
|
||||
|
||||
// Specify our post mode
|
||||
$post_mode = 'delete';
|
||||
if (($data['topic_first_post_id'] === $data['topic_last_post_id']) && $data['topic_replies_real'] == 0)
|
||||
if (($data['topic_first_post_id'] === $data['topic_last_post_id']) && ($data['topic_posts_approved'] + $data['topic_posts_unapproved'] + $data['topic_posts_softdeleted'] == 1))
|
||||
{
|
||||
$post_mode = 'delete_topic';
|
||||
}
|
||||
|
@ -1224,20 +1226,30 @@ function delete_post($forum_id, $topic_id, $post_id, &$data)
|
|||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
if (!delete_posts('post_id', array($post_id), false, false))
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
|
||||
// (Soft) delete the post
|
||||
if ($is_soft && ($post_mode != 'delete_topic'))
|
||||
{
|
||||
// Try to delete topic, we may had an previous error causing inconsistency
|
||||
if ($post_mode == 'delete_topic')
|
||||
$phpbb_content_visibility->set_post_visibility(ITEM_DELETED, $post_id, $topic_id, $forum_id, $user->data['user_id'], time(), $softdelete_reason, ($data['topic_first_post_id'] == $post_id), ($data['topic_last_post_id'] == $post_id));
|
||||
}
|
||||
else if (!$is_soft)
|
||||
{
|
||||
if (!delete_posts('post_id', array($post_id), false, false, false))
|
||||
{
|
||||
delete_topics('topic_id', array($topic_id), false);
|
||||
// Try to delete topic, we may had an previous error causing inconsistency
|
||||
if ($post_mode == 'delete_topic')
|
||||
{
|
||||
delete_topics('topic_id', array($topic_id), false);
|
||||
}
|
||||
trigger_error('ALREADY_DELETED');
|
||||
}
|
||||
trigger_error('ALREADY_DELETED');
|
||||
}
|
||||
|
||||
$db->sql_transaction('commit');
|
||||
|
||||
// Collect the necessary information for updating the tables
|
||||
$sql_data[FORUMS_TABLE] = '';
|
||||
$sql_data[FORUMS_TABLE] = $sql_data[TOPICS_TABLE] = '';
|
||||
switch ($post_mode)
|
||||
{
|
||||
case 'delete_topic':
|
||||
|
@ -1246,21 +1258,43 @@ function delete_post($forum_id, $topic_id, $post_id, &$data)
|
|||
{
|
||||
// counting is fun! we only have to do sizeof($forum_ids) number of queries,
|
||||
// even if the topic is moved back to where its shadow lives (we count how many times it is in a forum)
|
||||
$db->sql_query('UPDATE ' . FORUMS_TABLE . ' SET forum_topics_real = forum_topics_real - ' . $topic_count . ', forum_topics = forum_topics - ' . $topic_count . ' WHERE forum_id = ' . $updated_forum);
|
||||
$sql = 'UPDATE ' . FORUMS_TABLE . '
|
||||
SET forum_topics_approved = forum_topics_approved - ' . $topic_count . '
|
||||
WHERE forum_id = ' . $updated_forum;
|
||||
$db->sql_query($sql);
|
||||
update_post_information('forum', $updated_forum);
|
||||
}
|
||||
|
||||
delete_topics('topic_id', array($topic_id), false);
|
||||
|
||||
$sql_data[FORUMS_TABLE] .= 'forum_topics_real = forum_topics_real - 1';
|
||||
$sql_data[FORUMS_TABLE] .= ($data['topic_approved']) ? ', forum_posts = forum_posts - 1, forum_topics = forum_topics - 1' : '';
|
||||
|
||||
$update_sql = update_post_information('forum', $forum_id, true);
|
||||
if (sizeof($update_sql))
|
||||
if ($is_soft)
|
||||
{
|
||||
$sql_data[FORUMS_TABLE] .= ($sql_data[FORUMS_TABLE]) ? ', ' : '';
|
||||
$sql_data[FORUMS_TABLE] .= implode(', ', $update_sql[$forum_id]);
|
||||
$topic_row = array();
|
||||
$phpbb_content_visibility->set_topic_visibility(ITEM_DELETED, $topic_id, $forum_id, $user->data['user_id'], time(), $softdelete_reason);
|
||||
}
|
||||
else
|
||||
{
|
||||
delete_topics('topic_id', array($topic_id), false);
|
||||
|
||||
if ($data['topic_visibility'] == ITEM_APPROVED)
|
||||
{
|
||||
$sql_data[FORUMS_TABLE] .= 'forum_posts_approved = forum_posts_approved - 1, forum_topics_approved = forum_topics_approved - 1';
|
||||
}
|
||||
else if ($data['topic_visibility'] == ITEM_UNAPPROVED)
|
||||
{
|
||||
$sql_data[FORUMS_TABLE] .= 'forum_posts_unapproved = forum_posts_unapproved - 1, forum_topics_unapproved = forum_topics_unapproved - 1';
|
||||
}
|
||||
else if ($data['topic_visibility'] == ITEM_DELETED)
|
||||
{
|
||||
$sql_data[FORUMS_TABLE] .= 'forum_posts_softdeleted = forum_posts_softdeleted - 1, forum_topics_softdeleted = forum_topics_softdeleted - 1';
|
||||
}
|
||||
|
||||
$update_sql = update_post_information('forum', $forum_id, true);
|
||||
if (sizeof($update_sql))
|
||||
{
|
||||
$sql_data[FORUMS_TABLE] .= ($sql_data[FORUMS_TABLE]) ? ', ' : '';
|
||||
$sql_data[FORUMS_TABLE] .= implode(', ', $update_sql[$forum_id]);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'delete_first_post':
|
||||
|
@ -1268,73 +1302,101 @@ function delete_post($forum_id, $topic_id, $post_id, &$data)
|
|||
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . " u
|
||||
WHERE p.topic_id = $topic_id
|
||||
AND p.poster_id = u.user_id
|
||||
ORDER BY p.post_time ASC";
|
||||
AND p.post_visibility = " . ITEM_APPROVED . '
|
||||
ORDER BY p.post_time ASC';
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql_data[FORUMS_TABLE] = ($data['post_approved']) ? 'forum_posts = forum_posts - 1' : '';
|
||||
|
||||
$sql_data[TOPICS_TABLE] = 'topic_poster = ' . intval($row['poster_id']) . ', topic_first_post_id = ' . intval($row['post_id']) . ", topic_first_poster_colour = '" . $db->sql_escape($row['user_colour']) . "', topic_first_poster_name = '" . (($row['poster_id'] == ANONYMOUS) ? $db->sql_escape($row['post_username']) : $db->sql_escape($row['username'])) . "', topic_time = " . (int) $row['post_time'];
|
||||
|
||||
// Decrementing topic_replies here is fine because this case only happens if there is more than one post within the topic - basically removing one "reply"
|
||||
$sql_data[TOPICS_TABLE] .= ', topic_replies_real = topic_replies_real - 1' . (($data['post_approved']) ? ', topic_replies = topic_replies - 1' : '');
|
||||
if (!$row)
|
||||
{
|
||||
// No approved post, so the first is a not-approved post (unapproved or soft deleted)
|
||||
$sql = 'SELECT p.post_id, p.poster_id, p.post_time, p.post_username, u.username, u.user_colour
|
||||
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . " u
|
||||
WHERE p.topic_id = $topic_id
|
||||
AND p.poster_id = u.user_id
|
||||
ORDER BY p.post_time ASC";
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
$next_post_id = (int) $row['post_id'];
|
||||
|
||||
$sql_data[TOPICS_TABLE] = $db->sql_build_array('UPDATE', array(
|
||||
'topic_poster' => (int) $row['poster_id'],
|
||||
'topic_first_post_id' => (int) $row['post_id'],
|
||||
'topic_first_poster_colour' => $row['user_colour'],
|
||||
'topic_first_poster_name' => ($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username'],
|
||||
'topic_time' => (int) $row['post_time'],
|
||||
));
|
||||
break;
|
||||
|
||||
case 'delete_last_post':
|
||||
$sql_data[FORUMS_TABLE] = ($data['post_approved']) ? 'forum_posts = forum_posts - 1' : '';
|
||||
|
||||
$update_sql = update_post_information('forum', $forum_id, true);
|
||||
if (sizeof($update_sql))
|
||||
if (!$is_soft)
|
||||
{
|
||||
$sql_data[FORUMS_TABLE] .= ($sql_data[FORUMS_TABLE]) ? ', ' : '';
|
||||
$sql_data[FORUMS_TABLE] .= implode(', ', $update_sql[$forum_id]);
|
||||
// Update last post information when hard deleting. Soft delete already did that by itself.
|
||||
$update_sql = update_post_information('forum', $forum_id, true);
|
||||
if (sizeof($update_sql))
|
||||
{
|
||||
$sql_data[FORUMS_TABLE] = (($sql_data[FORUMS_TABLE]) ? $sql_data[FORUMS_TABLE] . ', ' : '') . implode(', ', $update_sql[$forum_id]);
|
||||
}
|
||||
|
||||
$sql_data[TOPICS_TABLE] = (($sql_data[TOPICS_TABLE]) ? $sql_data[TOPICS_TABLE] . ', ' : '') . 'topic_bumped = 0, topic_bumper = 0';
|
||||
|
||||
$update_sql = update_post_information('topic', $topic_id, true);
|
||||
if (!empty($update_sql))
|
||||
{
|
||||
$sql_data[TOPICS_TABLE] .= ', ' . implode(', ', $update_sql[$topic_id]);
|
||||
$next_post_id = (int) str_replace('topic_last_post_id = ', '', $update_sql[$topic_id][0]);
|
||||
}
|
||||
}
|
||||
|
||||
$sql_data[TOPICS_TABLE] = 'topic_bumped = 0, topic_bumper = 0, topic_replies_real = topic_replies_real - 1' . (($data['post_approved']) ? ', topic_replies = topic_replies - 1' : '');
|
||||
|
||||
$update_sql = update_post_information('topic', $topic_id, true);
|
||||
if (sizeof($update_sql))
|
||||
{
|
||||
$sql_data[TOPICS_TABLE] .= ', ' . implode(', ', $update_sql[$topic_id]);
|
||||
$next_post_id = (int) str_replace('topic_last_post_id = ', '', $update_sql[$topic_id][0]);
|
||||
}
|
||||
else
|
||||
if (!$next_post_id)
|
||||
{
|
||||
$sql = 'SELECT MAX(post_id) as last_post_id
|
||||
FROM ' . POSTS_TABLE . "
|
||||
WHERE topic_id = $topic_id " .
|
||||
((!$auth->acl_get('m_approve', $forum_id)) ? 'AND post_approved = 1' : '');
|
||||
WHERE topic_id = $topic_id
|
||||
AND " . $phpbb_content_visibility->get_visibility_sql('post', $forum_id);
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$next_post_id = (int) $db->sql_fetchfield('last_post_id');
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$next_post_id = (int) $row['last_post_id'];
|
||||
}
|
||||
break;
|
||||
|
||||
case 'delete':
|
||||
$sql = 'SELECT post_id
|
||||
FROM ' . POSTS_TABLE . "
|
||||
WHERE topic_id = $topic_id " .
|
||||
((!$auth->acl_get('m_approve', $forum_id)) ? 'AND post_approved = 1' : '') . '
|
||||
WHERE topic_id = $topic_id
|
||||
AND " . $phpbb_content_visibility->get_visibility_sql('post', $forum_id) . '
|
||||
AND post_time > ' . $data['post_time'] . '
|
||||
ORDER BY post_time ASC';
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$next_post_id = (int) $db->sql_fetchfield('post_id');
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql_data[FORUMS_TABLE] = ($data['post_approved']) ? 'forum_posts = forum_posts - 1' : '';
|
||||
|
||||
$sql_data[TOPICS_TABLE] = 'topic_replies_real = topic_replies_real - 1' . (($data['post_approved']) ? ', topic_replies = topic_replies - 1' : '');
|
||||
$next_post_id = (int) $row['post_id'];
|
||||
break;
|
||||
}
|
||||
|
||||
if (($post_mode == 'delete') || ($post_mode == 'delete_last_post') || ($post_mode == 'delete_first_post'))
|
||||
{
|
||||
if (!$is_soft)
|
||||
{
|
||||
if ($data['post_visibility'] == ITEM_APPROVED)
|
||||
{
|
||||
$phpbb_content_visibility->remove_post_from_statistic($data, $sql_data);
|
||||
}
|
||||
else if ($data['post_visibility'] == ITEM_UNAPPROVED)
|
||||
{
|
||||
$sql_data[FORUMS_TABLE] = (($sql_data[FORUMS_TABLE]) ? $sql_data[FORUMS_TABLE] . ', ' : '') . 'forum_posts_unapproved = forum_posts_unapproved - 1';
|
||||
$sql_data[TOPICS_TABLE] = (($sql_data[TOPICS_TABLE]) ? $sql_data[TOPICS_TABLE] . ', ' : '') . 'topic_posts_unapproved = topic_posts_unapproved - 1';
|
||||
}
|
||||
else if ($data['post_visibility'] == ITEM_DELETED)
|
||||
{
|
||||
$sql_data[FORUMS_TABLE] = (($sql_data[FORUMS_TABLE]) ? $sql_data[FORUMS_TABLE] . ', ' : '') . 'forum_posts_softdeleted = forum_posts_softdeleted - 1';
|
||||
$sql_data[TOPICS_TABLE] = (($sql_data[TOPICS_TABLE]) ? $sql_data[TOPICS_TABLE] . ', ' : '') . 'topic_posts_softdeleted = topic_posts_softdeleted - 1';
|
||||
}
|
||||
}
|
||||
|
||||
$sql = 'SELECT 1 AS has_attachments
|
||||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
WHERE topic_id = ' . $topic_id;
|
||||
|
@ -1344,18 +1406,16 @@ function delete_post($forum_id, $topic_id, $post_id, &$data)
|
|||
|
||||
if (!$has_attachments)
|
||||
{
|
||||
$sql_data[TOPICS_TABLE] .= ', topic_attachment = 0';
|
||||
$sql_data[TOPICS_TABLE] = (($sql_data[TOPICS_TABLE]) ? $sql_data[TOPICS_TABLE] . ', ' : '') . 'topic_attachment = 0';
|
||||
}
|
||||
}
|
||||
|
||||
// $sql_data[USERS_TABLE] = ($data['post_postcount']) ? 'user_posts = user_posts - 1' : '';
|
||||
|
||||
$db->sql_transaction('begin');
|
||||
|
||||
$where_sql = array(
|
||||
FORUMS_TABLE => "forum_id = $forum_id",
|
||||
TOPICS_TABLE => "topic_id = $topic_id",
|
||||
USERS_TABLE => 'user_id = ' . $data['poster_id']
|
||||
USERS_TABLE => 'user_id = ' . $data['poster_id'],
|
||||
);
|
||||
|
||||
foreach ($sql_data as $table => $update_sql)
|
||||
|
@ -1425,7 +1485,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
}
|
||||
else if ($mode == 'edit')
|
||||
{
|
||||
$post_mode = ($data['topic_replies_real'] == 0) ? 'edit_topic' : (($data['topic_first_post_id'] == $data['post_id']) ? 'edit_first_post' : (($data['topic_last_post_id'] == $data['post_id']) ? 'edit_last_post' : 'edit'));
|
||||
$post_mode = ($data['topic_posts_approved'] + $data['topic_posts_unapproved'] + $data['topic_posts_softdeleted'] == 1) ? 'edit_topic' : (($data['topic_first_post_id'] == $data['post_id']) ? 'edit_first_post' : (($data['topic_last_post_id'] == $data['post_id']) ? 'edit_last_post' : 'edit'));
|
||||
}
|
||||
|
||||
// First of all make sure the subject and topic title are having the correct length.
|
||||
|
@ -1438,9 +1498,9 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
$poster_id = ($mode == 'edit') ? $data['poster_id'] : (int) $user->data['user_id'];
|
||||
|
||||
// Retrieve some additional information if not present
|
||||
if ($mode == 'edit' && (!isset($data['post_approved']) || !isset($data['topic_approved']) || $data['post_approved'] === false || $data['topic_approved'] === false))
|
||||
if ($mode == 'edit' && (!isset($data['post_visibility']) || !isset($data['topic_visibility']) || $data['post_visibility'] === false || $data['topic_visibility'] === false))
|
||||
{
|
||||
$sql = 'SELECT p.post_approved, t.topic_type, t.topic_replies, t.topic_replies_real, t.topic_approved
|
||||
$sql = 'SELECT p.post_visibility, t.topic_type, t.topic_posts_approved, t.topic_posts_unapproved, t.topic_posts_softdeleted, t.topic_visibility
|
||||
FROM ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . ' p
|
||||
WHERE t.topic_id = p.topic_id
|
||||
AND p.post_id = ' . $data['post_id'];
|
||||
|
@ -1448,26 +1508,29 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
$topic_row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$data['topic_approved'] = $topic_row['topic_approved'];
|
||||
$data['post_approved'] = $topic_row['post_approved'];
|
||||
$data['topic_visibility'] = $topic_row['topic_visibility'];
|
||||
$data['post_visibility'] = $topic_row['post_visibility'];
|
||||
}
|
||||
|
||||
// This variable indicates if the user is able to post or put into the queue - it is used later for all code decisions regarding approval
|
||||
// The variable name should be $post_approved, because it indicates if the post is approved or not
|
||||
$post_approval = 1;
|
||||
// This variable indicates if the user is able to post or put into the queue
|
||||
$post_visibility = ITEM_APPROVED;
|
||||
|
||||
// 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;
|
||||
$post_visibility = ITEM_UNAPPROVED;
|
||||
}
|
||||
|
||||
// Mods are able to force approved/unapproved posts. True means the post is approved, false the post is unapproved
|
||||
// MODs/Extensions are able to force any visibility on posts
|
||||
if (isset($data['force_approved_state']))
|
||||
{
|
||||
$post_approval = ($data['force_approved_state']) ? 1 : 0;
|
||||
$post_visibility = (in_array((int) $data['force_approved_state'], array(ITEM_APPROVED, ITEM_UNAPPROVED, ITEM_DELETED))) ? (int) $data['force_approved_state'] : $post_visibility;
|
||||
}
|
||||
if (isset($data['force_visibility']))
|
||||
{
|
||||
$post_visibility = (in_array((int) $data['force_visibility'], array(ITEM_APPROVED, ITEM_UNAPPROVED, ITEM_DELETED))) ? (int) $data['force_visibility'] : $post_visibility;
|
||||
}
|
||||
|
||||
// Start the transaction here
|
||||
|
@ -1484,7 +1547,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
'icon_id' => $data['icon_id'],
|
||||
'poster_ip' => $user->ip,
|
||||
'post_time' => $current_time,
|
||||
'post_approved' => $post_approval,
|
||||
'post_visibility' => $post_visibility,
|
||||
'enable_bbcode' => $data['enable_bbcode'],
|
||||
'enable_smilies' => $data['enable_smilies'],
|
||||
'enable_magic_url' => $data['enable_urls'],
|
||||
|
@ -1550,7 +1613,8 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
'forum_id' => $data['forum_id'],
|
||||
'poster_id' => $data['poster_id'],
|
||||
'icon_id' => $data['icon_id'],
|
||||
'post_approved' => (!$post_approval) ? 0 : $data['post_approved'],
|
||||
// We will change the visibility later
|
||||
//'post_visibility' => $post_visibility,
|
||||
'enable_bbcode' => $data['enable_bbcode'],
|
||||
'enable_smilies' => $data['enable_smilies'],
|
||||
'enable_magic_url' => $data['enable_urls'],
|
||||
|
@ -1571,8 +1635,6 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
|
||||
break;
|
||||
}
|
||||
|
||||
$post_approved = $sql_data[POSTS_TABLE]['sql']['post_approved'];
|
||||
$topic_row = array();
|
||||
|
||||
// And the topic ladies and gentlemen
|
||||
|
@ -1585,7 +1647,11 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
'topic_last_view_time' => $current_time,
|
||||
'forum_id' => $data['forum_id'],
|
||||
'icon_id' => $data['icon_id'],
|
||||
'topic_approved' => $post_approval,
|
||||
'topic_posts_approved' => ($post_visibility == ITEM_APPROVED) ? 1 : 0,
|
||||
'topic_posts_softdeleted' => ($post_visibility == ITEM_DELETED) ? 1 : 0,
|
||||
'topic_posts_unapproved' => ($post_visibility == ITEM_UNAPPROVED) ? 1 : 0,
|
||||
'topic_visibility' => $post_visibility,
|
||||
'topic_delete_user' => ($post_visibility != ITEM_APPROVED) ? (int) $user->data['user_id'] : 0,
|
||||
'topic_title' => $subject,
|
||||
'topic_first_poster_name' => (!$user->data['is_registered'] && $username) ? $username : (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : ''),
|
||||
'topic_first_poster_colour' => $user->data['user_colour'],
|
||||
|
@ -1617,28 +1683,47 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
);
|
||||
}
|
||||
|
||||
$sql_data[USERS_TABLE]['stat'][] = "user_lastpost_time = $current_time" . (($auth->acl_get('f_postcount', $data['forum_id']) && $post_approval) ? ', user_posts = user_posts + 1' : '');
|
||||
$sql_data[USERS_TABLE]['stat'][] = "user_lastpost_time = $current_time" . (($auth->acl_get('f_postcount', $data['forum_id']) && $post_visibility == ITEM_APPROVED) ? ', user_posts = user_posts + 1' : '');
|
||||
|
||||
if ($post_approval)
|
||||
if ($post_visibility == ITEM_APPROVED)
|
||||
{
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts + 1';
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_topics_approved = forum_topics_approved + 1';
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts_approved = forum_posts_approved + 1';
|
||||
}
|
||||
else if ($post_visibility == ITEM_UNAPPROVED)
|
||||
{
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_topics_unapproved = forum_topics_unapproved + 1';
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts_unapproved = forum_posts_unapproved + 1';
|
||||
}
|
||||
else if ($post_visibility == ITEM_DELETED)
|
||||
{
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_topics_softdeleted = forum_topics_softdeleted + 1';
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts_softdeleted = forum_posts_softdeleted + 1';
|
||||
}
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_topics_real = forum_topics_real + 1' . (($post_approval) ? ', forum_topics = forum_topics + 1' : '');
|
||||
break;
|
||||
|
||||
case 'reply':
|
||||
$sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_view_time = ' . $current_time . ',
|
||||
topic_replies_real = topic_replies_real + 1,
|
||||
topic_bumped = 0,
|
||||
topic_bumper = 0' .
|
||||
(($post_approval) ? ', topic_replies = topic_replies + 1' : '') .
|
||||
(($post_visibility == ITEM_APPROVED) ? ', topic_posts_approved = topic_posts_approved + 1' : '') .
|
||||
(($post_visibility == ITEM_UNAPPROVED) ? ', topic_posts_unapproved = topic_posts_unapproved + 1' : '') .
|
||||
(($post_visibility == ITEM_DELETED) ? ', topic_posts_softdeleted = topic_posts_softdeleted + 1' : '') .
|
||||
((!empty($data['attachment_data']) || (isset($data['topic_attachment']) && $data['topic_attachment'])) ? ', topic_attachment = 1' : '');
|
||||
|
||||
$sql_data[USERS_TABLE]['stat'][] = "user_lastpost_time = $current_time" . (($auth->acl_get('f_postcount', $data['forum_id']) && $post_approval) ? ', user_posts = user_posts + 1' : '');
|
||||
$sql_data[USERS_TABLE]['stat'][] = "user_lastpost_time = $current_time" . (($auth->acl_get('f_postcount', $data['forum_id']) && $post_visibility == ITEM_APPROVED) ? ', user_posts = user_posts + 1' : '');
|
||||
|
||||
if ($post_approval)
|
||||
if ($post_visibility == ITEM_APPROVED)
|
||||
{
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts + 1';
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts_approved = forum_posts_approved + 1';
|
||||
}
|
||||
else if ($post_visibility == ITEM_UNAPPROVED)
|
||||
{
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts_unapproved = forum_posts_unapproved + 1';
|
||||
}
|
||||
else if ($post_visibility == ITEM_DELETED)
|
||||
{
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts_softdeleted = forum_posts_softdeleted + 1';
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1662,7 +1747,6 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
$sql_data[TOPICS_TABLE]['sql'] = array(
|
||||
'forum_id' => $data['forum_id'],
|
||||
'icon_id' => $data['icon_id'],
|
||||
'topic_approved' => (!$post_approval) ? 0 : $data['topic_approved'],
|
||||
'topic_title' => $subject,
|
||||
'topic_first_poster_name' => $username,
|
||||
'topic_type' => $topic_type,
|
||||
|
@ -1677,56 +1761,6 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
'topic_attachment' => (!empty($data['attachment_data'])) ? 1 : (isset($data['topic_attachment']) ? $data['topic_attachment'] : 0),
|
||||
);
|
||||
|
||||
// Correctly set back the topic replies and forum posts... only if the topic was approved before and now gets disapproved
|
||||
if (!$post_approval && $data['topic_approved'])
|
||||
{
|
||||
// Do we need to grab some topic informations?
|
||||
if (!sizeof($topic_row))
|
||||
{
|
||||
$sql = 'SELECT topic_type, topic_replies, topic_replies_real, topic_approved
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
WHERE topic_id = ' . $data['topic_id'];
|
||||
$result = $db->sql_query($sql);
|
||||
$topic_row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
// If this is the only post remaining we do not need to decrement topic_replies.
|
||||
// Also do not decrement if first post - then the topic_replies will not be adjusted if approving the topic again.
|
||||
|
||||
// If this is an edited topic or the first post the topic gets completely disapproved later on...
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_topics = forum_topics - 1';
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts - ' . ($topic_row['topic_replies'] + 1);
|
||||
|
||||
set_config_count('num_topics', -1, true);
|
||||
set_config_count('num_posts', ($topic_row['topic_replies'] + 1) * (-1), true);
|
||||
|
||||
// Only decrement this post, since this is the one non-approved now
|
||||
if ($auth->acl_get('f_postcount', $data['forum_id']))
|
||||
{
|
||||
$sql_data[USERS_TABLE]['stat'][] = 'user_posts = user_posts - 1';
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'edit':
|
||||
case 'edit_last_post':
|
||||
|
||||
// Correctly set back the topic replies and forum posts... but only if the post was approved before.
|
||||
if (!$post_approval && $data['post_approved'])
|
||||
{
|
||||
$sql_data[TOPICS_TABLE]['stat'][] = 'topic_replies = topic_replies - 1, topic_last_view_time = ' . $current_time;
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts - 1';
|
||||
|
||||
set_config_count('num_posts', -1, true);
|
||||
|
||||
if ($auth->acl_get('f_postcount', $data['forum_id']))
|
||||
{
|
||||
$sql_data[USERS_TABLE]['stat'][] = 'user_posts = user_posts - 1';
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1751,27 +1785,48 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
if ($post_mode == 'reply')
|
||||
{
|
||||
$sql_data[POSTS_TABLE]['sql'] = array_merge($sql_data[POSTS_TABLE]['sql'], array(
|
||||
'topic_id' => $data['topic_id'])
|
||||
);
|
||||
'topic_id' => $data['topic_id'],
|
||||
));
|
||||
}
|
||||
|
||||
$sql = 'INSERT INTO ' . POSTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_data[POSTS_TABLE]['sql']);
|
||||
$db->sql_query($sql);
|
||||
$data['post_id'] = $db->sql_nextid();
|
||||
|
||||
if ($post_mode == 'post')
|
||||
if ($post_mode == 'post' || $post_visibility == ITEM_APPROVED)
|
||||
{
|
||||
$sql_data[TOPICS_TABLE]['sql'] = array(
|
||||
'topic_first_post_id' => $data['post_id'],
|
||||
'topic_last_post_id' => $data['post_id'],
|
||||
'topic_last_post_time' => $current_time,
|
||||
'topic_last_poster_id' => (int) $user->data['user_id'],
|
||||
'topic_last_poster_name' => (!$user->data['is_registered'] && $username) ? $username : (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : ''),
|
||||
'topic_last_poster_id' => $sql_data[POSTS_TABLE]['sql']['poster_id'],
|
||||
'topic_last_poster_name' => ($user->data['user_id'] == ANONYMOUS) ? $sql_data[POSTS_TABLE]['sql']['post_username'] : $user->data['username'],
|
||||
'topic_last_poster_colour' => $user->data['user_colour'],
|
||||
'topic_last_post_subject' => (string) $subject,
|
||||
);
|
||||
}
|
||||
|
||||
if ($post_mode == 'post')
|
||||
{
|
||||
$sql_data[TOPICS_TABLE]['sql']['topic_first_post_id'] = $data['post_id'];
|
||||
}
|
||||
|
||||
// Update total post count and forum information
|
||||
if ($post_visibility == ITEM_APPROVED)
|
||||
{
|
||||
if ($post_mode == 'post')
|
||||
{
|
||||
set_config_count('num_topics', 1, true);
|
||||
}
|
||||
set_config_count('num_posts', 1, true);
|
||||
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_id = ' . $data['post_id'];
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_post_subject = '" . $db->sql_escape($subject) . "'";
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_time = ' . $current_time;
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_poster_id = ' . (int) $user->data['user_id'];
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = '" . $db->sql_escape((!$user->data['is_registered'] && $username) ? $username : (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : '')) . "'";
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = '" . $db->sql_escape($user->data['user_colour']) . "'";
|
||||
}
|
||||
|
||||
unset($sql_data[POSTS_TABLE]['sql']);
|
||||
}
|
||||
|
||||
|
@ -1782,6 +1837,8 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
SET ' . $db->sql_build_array('UPDATE', $sql_data[TOPICS_TABLE]['sql']) . '
|
||||
WHERE topic_id = ' . $data['topic_id'];
|
||||
$db->sql_query($sql);
|
||||
|
||||
unset($sql_data[TOPICS_TABLE]['sql']);
|
||||
}
|
||||
|
||||
// Update the posts table
|
||||
|
@ -1791,6 +1848,8 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
SET ' . $db->sql_build_array('UPDATE', $sql_data[POSTS_TABLE]['sql']) . '
|
||||
WHERE post_id = ' . $data['post_id'];
|
||||
$db->sql_query($sql);
|
||||
|
||||
unset($sql_data[POSTS_TABLE]['sql']);
|
||||
}
|
||||
|
||||
// Update Poll Tables
|
||||
|
@ -1936,114 +1995,21 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
}
|
||||
}
|
||||
|
||||
// we need to update the last forum information
|
||||
// only applicable if the topic is approved
|
||||
if ($post_approved || !$data['post_approved'])
|
||||
// Fix the post's and topic's visibility and first/last post information, when the post is edited
|
||||
if (($post_mode != 'post' && $post_mode != 'reply') && $data['post_visibility'] != $post_visibility)
|
||||
{
|
||||
// the last post makes us update the forum table. This can happen if...
|
||||
// We make a new topic
|
||||
// We reply to a topic
|
||||
// We edit the last post in a topic and this post is the latest in the forum (maybe)
|
||||
// We edit the only post in the topic
|
||||
// We edit the first post in the topic and all the other posts are not approved
|
||||
if (($post_mode == 'post' || $post_mode == 'reply') && $post_approved)
|
||||
{
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_id = ' . $data['post_id'];
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_post_subject = '" . $db->sql_escape($subject) . "'";
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_time = ' . $current_time;
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_poster_id = ' . (int) $user->data['user_id'];
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = '" . $db->sql_escape((!$user->data['is_registered'] && $username) ? $username : (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : '')) . "'";
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = '" . $db->sql_escape($user->data['user_colour']) . "'";
|
||||
}
|
||||
else if ($post_mode == 'edit_last_post' || $post_mode == 'edit_topic' || ($post_mode == 'edit_first_post' && !$data['topic_replies']))
|
||||
{
|
||||
// this does not _necessarily_ mean that we must update the info again,
|
||||
// it just means that we might have to
|
||||
$sql = 'SELECT forum_last_post_id, forum_last_post_subject
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
WHERE forum_id = ' . (int) $data['forum_id'];
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
// If the post was not approved, it could also be the starter,
|
||||
// so we sync the starter after approving/restoring, to ensure that the stats are correct
|
||||
// Same applies for the last post
|
||||
$is_starter = ($post_mode == 'edit_first_post' || $data['post_visibility'] != ITEM_APPROVED);
|
||||
$is_latest = ($post_mode == 'edit_last_post' || $post_mode == 'edit_topic' || $data['post_visibility'] != ITEM_APPROVED);
|
||||
|
||||
// this post is the latest post in the forum, better update
|
||||
if ($row['forum_last_post_id'] == $data['post_id'])
|
||||
{
|
||||
// If post approved and subject changed, or poster is anonymous, we need to update the forum_last* rows
|
||||
if ($post_approved && ($row['forum_last_post_subject'] !== $subject || $data['poster_id'] == ANONYMOUS))
|
||||
{
|
||||
// the post's subject changed
|
||||
if ($row['forum_last_post_subject'] !== $subject)
|
||||
{
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_subject = \'' . $db->sql_escape($subject) . '\'';
|
||||
}
|
||||
|
||||
// Update the user name if poster is anonymous... just in case an admin changed it
|
||||
if ($data['poster_id'] == ANONYMOUS)
|
||||
{
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = '" . $db->sql_escape($username) . "'";
|
||||
}
|
||||
}
|
||||
else if ($data['post_approved'] !== $post_approved)
|
||||
{
|
||||
// we need a fresh change of socks, everything has become invalidated
|
||||
$sql = 'SELECT MAX(topic_last_post_id) as last_post_id
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
WHERE forum_id = ' . (int) $data['forum_id'] . '
|
||||
AND topic_approved = 1';
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// any posts left in this forum?
|
||||
if (!empty($row['last_post_id']))
|
||||
{
|
||||
$sql = 'SELECT p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour
|
||||
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
|
||||
WHERE p.poster_id = u.user_id
|
||||
AND p.post_id = ' . (int) $row['last_post_id'];
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// salvation, a post is found! jam it into the forums table
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_id = ' . (int) $row['post_id'];
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_post_subject = '" . $db->sql_escape($row['post_subject']) . "'";
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_time = ' . (int) $row['post_time'];
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_poster_id = ' . (int) $row['poster_id'];
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = '" . $db->sql_escape(($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username']) . "'";
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = '" . $db->sql_escape($row['user_colour']) . "'";
|
||||
}
|
||||
else
|
||||
{
|
||||
// just our luck, the last topic in the forum has just been turned unapproved...
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_id = 0';
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_post_subject = ''";
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_time = 0';
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_poster_id = 0';
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = ''";
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = ''";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
$phpbb_content_visibility->set_post_visibility($post_visibility, $data['post_id'], $data['topic_id'], $data['forum_id'], $user->data['user_id'], time(), '', $is_starter, $is_latest);
|
||||
}
|
||||
|
||||
// topic sync time!
|
||||
// simply, we update if it is a reply or the last post is edited
|
||||
if ($post_approved)
|
||||
else if ($post_mode == 'edit_last_post' || $post_mode == 'edit_topic' || ($post_mode == 'edit_first_post' && !$data['topic_replies']))
|
||||
{
|
||||
// reply requires the whole thing
|
||||
if ($post_mode == 'reply')
|
||||
{
|
||||
$sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_post_id = ' . (int) $data['post_id'];
|
||||
$sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_poster_id = ' . (int) $user->data['user_id'];
|
||||
$sql_data[TOPICS_TABLE]['stat'][] = "topic_last_poster_name = '" . $db->sql_escape((!$user->data['is_registered'] && $username) ? $username : (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : '')) . "'";
|
||||
$sql_data[TOPICS_TABLE]['stat'][] = "topic_last_poster_colour = '" . (($user->data['user_id'] != ANONYMOUS) ? $db->sql_escape($user->data['user_colour']) : '') . "'";
|
||||
$sql_data[TOPICS_TABLE]['stat'][] = "topic_last_post_subject = '" . $db->sql_escape($subject) . "'";
|
||||
$sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_post_time = ' . (int) $current_time;
|
||||
}
|
||||
else if ($post_mode == 'edit_last_post' || $post_mode == 'edit_topic' || ($post_mode == 'edit_first_post' && !$data['topic_replies']))
|
||||
if ($post_visibility == ITEM_APPROVED || $data['topic_visibility'] == $post_visibility)
|
||||
{
|
||||
// only the subject can be changed from edit
|
||||
$sql_data[TOPICS_TABLE]['stat'][] = "topic_last_post_subject = '" . $db->sql_escape($subject) . "'";
|
||||
|
@ -2053,57 +2019,44 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
{
|
||||
$sql_data[TOPICS_TABLE]['stat'][] = "topic_last_poster_name = '" . $db->sql_escape($username) . "'";
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!$data['post_approved'] && ($post_mode == 'edit_last_post' || $post_mode == 'edit_topic' || ($post_mode == 'edit_first_post' && !$data['topic_replies'])))
|
||||
{
|
||||
// like having the rug pulled from under us
|
||||
$sql = 'SELECT MAX(post_id) as last_post_id
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE topic_id = ' . (int) $data['topic_id'] . '
|
||||
AND post_approved = 1';
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// any posts left in this forum?
|
||||
if (!empty($row['last_post_id']))
|
||||
{
|
||||
$sql = 'SELECT p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour
|
||||
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
|
||||
WHERE p.poster_id = u.user_id
|
||||
AND p.post_id = ' . (int) $row['last_post_id'];
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
if ($post_visibility == ITEM_APPROVED)
|
||||
{
|
||||
// this does not _necessarily_ mean that we must update the info again,
|
||||
// it just means that we might have to
|
||||
$sql = 'SELECT forum_last_post_id, forum_last_post_subject
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
WHERE forum_id = ' . (int) $data['forum_id'];
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// salvation, a post is found! jam it into the topics table
|
||||
$sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_post_id = ' . (int) $row['post_id'];
|
||||
$sql_data[TOPICS_TABLE]['stat'][] = "topic_last_post_subject = '" . $db->sql_escape($row['post_subject']) . "'";
|
||||
$sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_post_time = ' . (int) $row['post_time'];
|
||||
$sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_poster_id = ' . (int) $row['poster_id'];
|
||||
$sql_data[TOPICS_TABLE]['stat'][] = "topic_last_poster_name = '" . $db->sql_escape(($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username']) . "'";
|
||||
$sql_data[TOPICS_TABLE]['stat'][] = "topic_last_poster_colour = '" . $db->sql_escape($row['user_colour']) . "'";
|
||||
}
|
||||
}
|
||||
// this post is the latest post in the forum, better update
|
||||
if ($row['forum_last_post_id'] == $data['post_id'] && ($row['forum_last_post_subject'] !== $subject || $data['poster_id'] == ANONYMOUS))
|
||||
{
|
||||
// the post's subject changed
|
||||
if ($row['forum_last_post_subject'] !== $subject)
|
||||
{
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_post_subject = '" . $db->sql_escape($subject) . "'";
|
||||
}
|
||||
|
||||
// Update total post count, do not consider moderated posts/topics
|
||||
if ($post_approval)
|
||||
{
|
||||
if ($post_mode == 'post')
|
||||
{
|
||||
set_config_count('num_topics', 1, true);
|
||||
set_config_count('num_posts', 1, true);
|
||||
}
|
||||
|
||||
if ($post_mode == 'reply')
|
||||
{
|
||||
set_config_count('num_posts', 1, true);
|
||||
// Update the user name if poster is anonymous... just in case a moderator changed it
|
||||
if ($data['poster_id'] == ANONYMOUS)
|
||||
{
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = '" . $db->sql_escape($username) . "'";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Update forum stats
|
||||
$where_sql = array(POSTS_TABLE => 'post_id = ' . $data['post_id'], TOPICS_TABLE => 'topic_id = ' . $data['topic_id'], FORUMS_TABLE => 'forum_id = ' . $data['forum_id'], USERS_TABLE => 'user_id = ' . $poster_id);
|
||||
$where_sql = array(
|
||||
POSTS_TABLE => 'post_id = ' . $data['post_id'],
|
||||
TOPICS_TABLE => 'topic_id = ' . $data['topic_id'],
|
||||
FORUMS_TABLE => 'forum_id = ' . $data['forum_id'],
|
||||
USERS_TABLE => 'user_id = ' . $poster_id
|
||||
);
|
||||
|
||||
foreach ($sql_data as $table => $update_ary)
|
||||
{
|
||||
|
@ -2226,7 +2179,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
|
||||
if ($post_approval)
|
||||
if ($post_visibility == ITEM_APPROVED)
|
||||
{
|
||||
switch ($mode)
|
||||
{
|
||||
|
@ -2259,7 +2212,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
else if ($post_visibility == ITEM_UNAPPROVED)
|
||||
{
|
||||
switch ($mode)
|
||||
{
|
||||
|
@ -2276,6 +2229,32 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
case 'edit_first_post':
|
||||
case 'edit':
|
||||
case 'edit_last_post':
|
||||
// @todo: Check whether these notification deletions are correct
|
||||
$phpbb_notifications->delete_notifications('topic', $data['topic_id']);
|
||||
|
||||
$phpbb_notifications->delete_notifications(array(
|
||||
'quote',
|
||||
'bookmark',
|
||||
'post',
|
||||
), $data['post_id']);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if ($post_visibility == ITEM_DELETED)
|
||||
{
|
||||
switch ($mode)
|
||||
{
|
||||
case 'post':
|
||||
case 'reply':
|
||||
case 'quote':
|
||||
// Nothing to do here
|
||||
break;
|
||||
|
||||
case 'edit_topic':
|
||||
case 'edit_first_post':
|
||||
case 'edit':
|
||||
case 'edit_last_post':
|
||||
// @todo: Check whether these notification deletions are correct
|
||||
$phpbb_notifications->delete_notifications('topic', $data['topic_id']);
|
||||
|
||||
$phpbb_notifications->delete_notifications(array(
|
||||
|
@ -2289,7 +2268,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
|
||||
$params = $add_anchor = '';
|
||||
|
||||
if ($post_approval)
|
||||
if ($post_visibility == ITEM_APPROVED)
|
||||
{
|
||||
$params .= '&t=' . $data['topic_id'];
|
||||
|
||||
|
|
|
@ -21,6 +21,8 @@ class mcp_queue_info
|
|||
'modes' => array(
|
||||
'unapproved_topics' => array('title' => 'MCP_QUEUE_UNAPPROVED_TOPICS', 'auth' => 'aclf_m_approve', 'cat' => array('MCP_QUEUE')),
|
||||
'unapproved_posts' => array('title' => 'MCP_QUEUE_UNAPPROVED_POSTS', 'auth' => 'aclf_m_approve', 'cat' => array('MCP_QUEUE')),
|
||||
'deleted_topics' => array('title' => 'MCP_QUEUE_DELETED_TOPICS', 'auth' => 'aclf_m_approve', 'cat' => array('MCP_QUEUE')),
|
||||
'deleted_posts' => array('title' => 'MCP_QUEUE_DELETED_POSTS', 'auth' => 'aclf_m_approve', 'cat' => array('MCP_QUEUE')),
|
||||
'approve_details' => array('title' => 'MCP_QUEUE_APPROVE_DETAILS', 'auth' => 'acl_m_approve,$id || (!$id && aclf_m_approve)', 'cat' => array('MCP_QUEUE')),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -22,7 +22,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
|||
{
|
||||
global $template, $db, $user, $auth, $cache, $module;
|
||||
global $phpEx, $phpbb_root_path, $config;
|
||||
global $request, $phpbb_dispatcher;
|
||||
global $request, $phpbb_dispatcher, $phpbb_container;
|
||||
|
||||
$user->add_lang(array('viewtopic', 'viewforum'));
|
||||
|
||||
|
@ -98,7 +98,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
|||
$sort_by_sql = $sort_order_sql = array();
|
||||
mcp_sorting('viewforum', $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id);
|
||||
|
||||
$forum_topics = ($total == -1) ? $forum_info['forum_topics'] : $total;
|
||||
$forum_topics = ($total == -1) ? $forum_info['forum_topics_approved'] : $total;
|
||||
$limit_time_sql = ($sort_days) ? 'AND t.topic_last_post_time >= ' . (time() - ($sort_days * 86400)) : '';
|
||||
|
||||
$base_url = $url . "&i=$id&action=$action&mode=$mode&sd=$sort_dir&sk=$sort_key&st=$sort_days" . (($merge_select) ? $selected_ids : '');
|
||||
|
@ -116,6 +116,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
|||
|
||||
'S_CAN_REPORT' => $auth->acl_get('m_report', $forum_id),
|
||||
'S_CAN_DELETE' => $auth->acl_get('m_delete', $forum_id),
|
||||
'S_CAN_RESTORE' => $auth->acl_get('m_approve', $forum_id),
|
||||
'S_CAN_MERGE' => $auth->acl_get('m_merge', $forum_id),
|
||||
'S_CAN_MOVE' => $auth->acl_get('m_move', $forum_id),
|
||||
'S_CAN_FORK' => $auth->acl_get('m_', $forum_id),
|
||||
|
@ -151,10 +152,12 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
|||
$read_tracking_join = $read_tracking_select = '';
|
||||
}
|
||||
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
|
||||
$sql = 'SELECT t.topic_id
|
||||
FROM ' . TOPICS_TABLE . ' t
|
||||
WHERE t.forum_id = ' . $forum_id . '
|
||||
' . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND t.topic_approved = 1') . "
|
||||
AND ' . $phpbb_content_visibility->get_visibility_sql('topic', $forum_id, 't.') . "
|
||||
$limit_time_sql
|
||||
ORDER BY t.topic_type DESC, $sort_order_sql";
|
||||
$result = $db->sql_query_limit($sql, $topics_per_page, $start);
|
||||
|
@ -203,7 +206,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
|||
|
||||
$row = &$topic_rows[$topic_id];
|
||||
|
||||
$replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies'];
|
||||
$replies = $phpbb_content_visibility->get_count('topic_posts', $row, $forum_id) - 1;
|
||||
|
||||
if ($row['topic_status'] == ITEM_MOVED)
|
||||
{
|
||||
|
@ -220,9 +223,11 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
|||
|
||||
$topic_title = censor_text($row['topic_title']);
|
||||
|
||||
$topic_unapproved = (!$row['topic_approved'] && $auth->acl_get('m_approve', $row['forum_id'])) ? true : false;
|
||||
$posts_unapproved = ($row['topic_approved'] && $row['topic_replies'] < $row['topic_replies_real'] && $auth->acl_get('m_approve', $row['forum_id'])) ? true : false;
|
||||
$topic_unapproved = ($row['topic_visibility'] == ITEM_UNAPPROVED && $auth->acl_get('m_approve', $row['forum_id'])) ? true : false;
|
||||
$posts_unapproved = ($row['topic_visibility'] == ITEM_APPROVED && $row['topic_posts_unapproved'] && $auth->acl_get('m_approve', $row['forum_id'])) ? true : false;
|
||||
$topic_deleted = $row['topic_visibility'] == ITEM_DELETED;
|
||||
$u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? $url . '&i=queue&mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . '&t=' . $row['topic_id'] : '';
|
||||
$u_mcp_queue = (!$u_mcp_queue && $topic_deleted) ? $url . '&i=queue&mode=deleted_topics&t=' . $topic_id : $u_mcp_queue;
|
||||
|
||||
$topic_row = array(
|
||||
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['topic_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
|
@ -232,6 +237,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
|||
'TOPIC_ICON_IMG_WIDTH' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['width'] : '',
|
||||
'TOPIC_ICON_IMG_HEIGHT' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['height'] : '',
|
||||
'UNAPPROVED_IMG' => ($topic_unapproved || $posts_unapproved) ? $user->img('icon_topic_unapproved', ($topic_unapproved) ? 'TOPIC_UNAPPROVED' : 'POSTS_UNAPPROVED') : '',
|
||||
'DELETED_IMG' => ($topic_deleted) ? $user->img('icon_topic_deleted', 'POSTS_DELETED') : '',
|
||||
|
||||
'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
|
||||
'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
|
||||
|
@ -245,7 +251,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
|||
|
||||
'TOPIC_TYPE' => $topic_type,
|
||||
'TOPIC_TITLE' => $topic_title,
|
||||
'REPLIES' => ($auth->acl_get('m_approve', $row['forum_id'])) ? $row['topic_replies_real'] : $row['topic_replies'],
|
||||
'REPLIES' => $phpbb_content_visibility->get_count('topic_posts', $row, $row['forum_id']) - 1,
|
||||
'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
|
||||
'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
|
||||
'LAST_POST_SUBJECT' => $row['topic_last_post_subject'],
|
||||
|
@ -254,6 +260,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
|||
'S_TOPIC_REPORTED' => (!empty($row['topic_reported']) && empty($row['topic_moved_id']) && $auth->acl_get('m_report', $row['forum_id'])) ? true : false,
|
||||
'S_TOPIC_UNAPPROVED' => $topic_unapproved,
|
||||
'S_POSTS_UNAPPROVED' => $posts_unapproved,
|
||||
'S_TOPIC_DELETED' => $topic_deleted,
|
||||
'S_UNREAD_TOPIC' => $unread_topic,
|
||||
);
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ function mcp_front_view($id, $mode, $action)
|
|||
$sql = 'SELECT COUNT(post_id) AS total
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('forum_id', $forum_list) . '
|
||||
AND post_approved = 0';
|
||||
AND post_visibility = ' . ITEM_UNAPPROVED;
|
||||
$result = $db->sql_query($sql);
|
||||
$total = (int) $db->sql_fetchfield('total');
|
||||
$db->sql_freeresult($result);
|
||||
|
@ -60,7 +60,7 @@ function mcp_front_view($id, $mode, $action)
|
|||
$sql = 'SELECT post_id
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('forum_id', $forum_list) . '
|
||||
AND post_approved = 0
|
||||
AND post_visibility = ' . ITEM_UNAPPROVED . '
|
||||
ORDER BY post_time DESC';
|
||||
$result = $db->sql_query_limit($sql, 5);
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ class mcp_main
|
|||
function main($id, $mode)
|
||||
{
|
||||
global $auth, $db, $user, $template, $action;
|
||||
global $config, $phpbb_root_path, $phpEx;
|
||||
global $config, $phpbb_root_path, $phpEx, $request;
|
||||
|
||||
$quickmod = ($mode == 'quickmod') ? true : false;
|
||||
|
||||
|
@ -108,27 +108,48 @@ class mcp_main
|
|||
case 'delete_topic':
|
||||
$user->add_lang('viewtopic');
|
||||
|
||||
$topic_ids = (!$quickmod) ? request_var('topic_id_list', array(0)) : array(request_var('t', 0));
|
||||
// f parameter is not reliable for permission usage, however we just use it to decide
|
||||
// which permission we will check later on. So if it is manipulated, we will still catch it later on.
|
||||
$forum_id = $request->variable('f', 0);
|
||||
$topic_ids = (!$quickmod) ? $request->variable('topic_id_list', array(0)) : array($request->variable('t', 0));
|
||||
$soft_delete = (($request->is_set_post('confirm') && !$request->is_set_post('delete_permanent')) || !$auth->acl_get('m_delete', $forum_id)) ? true : false;
|
||||
|
||||
if (!sizeof($topic_ids))
|
||||
{
|
||||
trigger_error('NO_TOPIC_SELECTED');
|
||||
}
|
||||
|
||||
mcp_delete_topic($topic_ids);
|
||||
mcp_delete_topic($topic_ids, $soft_delete, ($soft_delete) ? $request->variable('delete_reason', '', true) : '');
|
||||
break;
|
||||
|
||||
case 'delete_post':
|
||||
$user->add_lang('posting');
|
||||
|
||||
$post_ids = (!$quickmod) ? request_var('post_id_list', array(0)) : array(request_var('p', 0));
|
||||
// f parameter is not reliable for permission usage, however we just use it to decide
|
||||
// which permission we will check later on. So if it is manipulated, we will still catch it later on.
|
||||
$forum_id = $request->variable('f', 0);
|
||||
$post_ids = (!$quickmod) ? $request->variable('post_id_list', array(0)) : array($request->variable('p', 0));
|
||||
$soft_delete = (($request->is_set_post('confirm') && !$request->is_set_post('delete_permanent')) || !$auth->acl_get('m_delete', $forum_id)) ? true : false;
|
||||
|
||||
if (!sizeof($post_ids))
|
||||
{
|
||||
trigger_error('NO_POST_SELECTED');
|
||||
}
|
||||
|
||||
mcp_delete_post($post_ids);
|
||||
mcp_delete_post($post_ids, $soft_delete, ($soft_delete) ? $request->variable('delete_reason', '', true) : '');
|
||||
break;
|
||||
|
||||
case 'restore_topic':
|
||||
$user->add_lang('posting');
|
||||
|
||||
$topic_ids = (!$quickmod) ? $request->variable('topic_id_list', array(0)) : array($request->variable('t', 0));
|
||||
|
||||
if (!sizeof($topic_ids))
|
||||
{
|
||||
trigger_error('NO_TOPIC_SELECTED');
|
||||
}
|
||||
|
||||
mcp_restore_topic($topic_ids);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -455,60 +476,31 @@ function mcp_move_topic($topic_ids)
|
|||
$forum_sync_data[$forum_id] = current($topic_data);
|
||||
$forum_sync_data[$to_forum_id] = $forum_data;
|
||||
|
||||
// Real topics added to target forum
|
||||
$topics_moved = sizeof($topic_data);
|
||||
|
||||
// Approved topics added to target forum
|
||||
$topics_authed_moved = 0;
|
||||
|
||||
// Posts (topic replies + topic post if approved) added to target forum
|
||||
$topic_posts_added = 0;
|
||||
|
||||
// Posts (topic replies + topic post if approved and not global announcement) removed from source forum
|
||||
$topic_posts_removed = 0;
|
||||
|
||||
// Real topics removed from source forum (all topics without global announcements)
|
||||
$topics_removed = 0;
|
||||
|
||||
// Approved topics removed from source forum (except global announcements)
|
||||
$topics_authed_removed = 0;
|
||||
$topics_moved = $topics_moved_unapproved = $topics_moved_softdeleted = 0;
|
||||
$posts_moved = $posts_moved_unapproved = $posts_moved_softdeleted = 0;
|
||||
|
||||
foreach ($topic_data as $topic_id => $topic_info)
|
||||
{
|
||||
if ($topic_info['topic_approved'])
|
||||
if ($topic_info['topic_visibility'] == ITEM_APPROVED)
|
||||
{
|
||||
$topics_authed_moved++;
|
||||
$topic_posts_added++;
|
||||
$topics_moved++;
|
||||
}
|
||||
elseif ($topic_info['topic_visibility'] == ITEM_UNAPPROVED)
|
||||
{
|
||||
$topics_moved_unapproved++;
|
||||
}
|
||||
elseif ($topic_info['topic_visibility'] == ITEM_DELETED)
|
||||
{
|
||||
$topics_moved_softdeleted++;
|
||||
}
|
||||
|
||||
$topic_posts_added += $topic_info['topic_replies'];
|
||||
|
||||
$topics_removed++;
|
||||
$topic_posts_removed += $topic_info['topic_replies'];
|
||||
|
||||
if ($topic_info['topic_approved'])
|
||||
{
|
||||
$topics_authed_removed++;
|
||||
$topic_posts_removed++;
|
||||
}
|
||||
$posts_moved += $topic_info['topic_posts_approved'];
|
||||
$posts_moved_unapproved += $topic_info['topic_posts_unapproved'];
|
||||
$posts_moved_softdeleted += $topic_info['topic_posts_softdeleted'];
|
||||
}
|
||||
|
||||
$db->sql_transaction('begin');
|
||||
|
||||
$sync_sql = array();
|
||||
|
||||
if ($topic_posts_added)
|
||||
{
|
||||
$sync_sql[$to_forum_id][] = 'forum_posts = forum_posts + ' . $topic_posts_added;
|
||||
}
|
||||
|
||||
if ($topics_authed_moved)
|
||||
{
|
||||
$sync_sql[$to_forum_id][] = 'forum_topics = forum_topics + ' . (int) $topics_authed_moved;
|
||||
}
|
||||
|
||||
$sync_sql[$to_forum_id][] = 'forum_topics_real = forum_topics_real + ' . (int) $topics_moved;
|
||||
|
||||
// Move topics, but do not resync yet
|
||||
move_topics($topic_ids, $to_forum_id, false);
|
||||
|
||||
|
@ -520,6 +512,7 @@ function mcp_move_topic($topic_ids)
|
|||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
$shadow_topics = 0;
|
||||
$forum_ids = array($to_forum_id);
|
||||
foreach ($topic_data as $topic_id => $row)
|
||||
{
|
||||
|
@ -528,21 +521,22 @@ function mcp_move_topic($topic_ids)
|
|||
add_log('mod', $to_forum_id, $topic_id, 'LOG_MOVE', $row['forum_name'], $forum_data['forum_name']);
|
||||
|
||||
// Leave a redirection if required and only if the topic is visible to users
|
||||
if ($leave_shadow && $row['topic_approved'] && $row['topic_type'] != POST_GLOBAL)
|
||||
if ($leave_shadow && $row['topic_visibility'] == ITEM_APPROVED && $row['topic_type'] != POST_GLOBAL)
|
||||
{
|
||||
$shadow = array(
|
||||
'forum_id' => (int) $row['forum_id'],
|
||||
'icon_id' => (int) $row['icon_id'],
|
||||
'topic_attachment' => (int) $row['topic_attachment'],
|
||||
'topic_approved' => 1, // a shadow topic is always approved
|
||||
'topic_visibility' => ITEM_APPROVED, // a shadow topic is always approved
|
||||
'topic_reported' => 0, // a shadow topic is never reported
|
||||
'topic_title' => (string) $row['topic_title'],
|
||||
'topic_poster' => (int) $row['topic_poster'],
|
||||
'topic_time' => (int) $row['topic_time'],
|
||||
'topic_time_limit' => (int) $row['topic_time_limit'],
|
||||
'topic_views' => (int) $row['topic_views'],
|
||||
'topic_replies' => (int) $row['topic_replies'],
|
||||
'topic_replies_real' => (int) $row['topic_replies_real'],
|
||||
'topic_posts_approved' => (int) $row['topic_posts_approved'],
|
||||
'topic_posts_unapproved'=> (int) $row['topic_posts_unapproved'],
|
||||
'topic_posts_softdeleted'=> (int) $row['topic_posts_softdeleted'],
|
||||
'topic_status' => ITEM_MOVED,
|
||||
'topic_type' => POST_NORMAL,
|
||||
'topic_first_post_id' => (int) $row['topic_first_post_id'],
|
||||
|
@ -568,25 +562,45 @@ function mcp_move_topic($topic_ids)
|
|||
$db->sql_query('INSERT INTO ' . TOPICS_TABLE . $db->sql_build_array('INSERT', $shadow));
|
||||
|
||||
// Shadow topics only count on new "topics" and not posts... a shadow topic alone has 0 posts
|
||||
$topics_removed--;
|
||||
$topics_authed_removed--;
|
||||
$shadow_topics++;
|
||||
}
|
||||
}
|
||||
unset($topic_data);
|
||||
|
||||
if ($topic_posts_removed)
|
||||
$sync_sql = array();
|
||||
if ($posts_moved)
|
||||
{
|
||||
$sync_sql[$forum_id][] = 'forum_posts = forum_posts - ' . $topic_posts_removed;
|
||||
$sync_sql[$to_forum_id][] = 'forum_posts_approved = forum_posts_approved + ' . (int) $posts_moved;
|
||||
$sync_sql[$forum_id][] = 'forum_posts_approved = forum_posts_approved - ' . (int) $posts_moved;
|
||||
}
|
||||
if ($posts_moved_unapproved)
|
||||
{
|
||||
$sync_sql[$to_forum_id][] = 'forum_posts_unapproved = forum_posts_unapproved + ' . (int) $posts_moved_unapproved;
|
||||
$sync_sql[$forum_id][] = 'forum_posts_unapproved = forum_posts_unapproved - ' . (int) $posts_moved_unapproved;
|
||||
}
|
||||
if ($posts_moved_softdeleted)
|
||||
{
|
||||
$sync_sql[$to_forum_id][] = 'forum_posts_softdeleted = forum_posts_softdeleted + ' . (int) $posts_moved_softdeleted;
|
||||
$sync_sql[$forum_id][] = 'forum_posts_softdeleted = forum_posts_softdeleted - ' . (int) $posts_moved_softdeleted;
|
||||
}
|
||||
|
||||
if ($topics_removed)
|
||||
if ($topics_moved)
|
||||
{
|
||||
$sync_sql[$forum_id][] = 'forum_topics_real = forum_topics_real - ' . (int) $topics_removed;
|
||||
$sync_sql[$to_forum_id][] = 'forum_topics_approved = forum_topics_approved + ' . (int) $topics_moved;
|
||||
if ($topics_moved - $shadow_topics > 0)
|
||||
{
|
||||
$sync_sql[$forum_id][] = 'forum_topics_approved = forum_topics_approved - ' . (int) ($topics_moved - $shadow_topics);
|
||||
}
|
||||
}
|
||||
|
||||
if ($topics_authed_removed)
|
||||
if ($topics_moved_unapproved)
|
||||
{
|
||||
$sync_sql[$forum_id][] = 'forum_topics = forum_topics - ' . (int) $topics_authed_removed;
|
||||
$sync_sql[$to_forum_id][] = 'forum_topics_unapproved = forum_topics_unapproved + ' . (int) $topics_moved_unapproved;
|
||||
$sync_sql[$forum_id][] = 'forum_topics_unapproved = forum_topics_unapproved - ' . (int) $topics_moved_unapproved;
|
||||
}
|
||||
if ($topics_moved_softdeleted)
|
||||
{
|
||||
$sync_sql[$to_forum_id][] = 'forum_topics_softdeleted = forum_topics_softdeleted + ' . (int) $topics_moved_softdeleted;
|
||||
$sync_sql[$forum_id][] = 'forum_topics_softdeleted = forum_topics_softdeleted - ' . (int) $topics_moved_softdeleted;
|
||||
}
|
||||
|
||||
$success_msg = (sizeof($topic_ids) == 1) ? 'TOPIC_MOVED_SUCCESS' : 'TOPICS_MOVED_SUCCESS';
|
||||
|
@ -635,26 +649,99 @@ function mcp_move_topic($topic_ids)
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore Topics
|
||||
*/
|
||||
function mcp_restore_topic($topic_ids)
|
||||
{
|
||||
global $auth, $user, $db, $phpEx, $phpbb_root_path, $request, $phpbb_container;
|
||||
|
||||
if (!check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_approve')))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$redirect = $request->variable('redirect', build_url(array('action', 'quickmod')));
|
||||
$forum_id = $request->variable('f', 0);
|
||||
|
||||
$s_hidden_fields = build_hidden_fields(array(
|
||||
'topic_id_list' => $topic_ids,
|
||||
'f' => $forum_id,
|
||||
'action' => 'restore_topic',
|
||||
'redirect' => $redirect,
|
||||
));
|
||||
$success_msg = '';
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
$success_msg = (sizeof($topic_ids) == 1) ? 'TOPIC_RESTORED_SUCCESS' : 'TOPICS_RESTORED_SUCCESS';
|
||||
|
||||
$data = get_topic_data($topic_ids);
|
||||
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
foreach ($data as $topic_id => $row)
|
||||
{
|
||||
$return = $phpbb_content_visibility->set_topic_visibility(ITEM_APPROVED, $topic_id, $row['forum_id'], $user->data['user_id'], time(), '');
|
||||
if (!empty($return))
|
||||
{
|
||||
add_log('mod', $row['forum_id'], $topic_id, 'LOG_RESTORE_TOPIC', $row['topic_title'], $row['topic_first_poster_name']);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
confirm_box(false, (sizeof($topic_ids) == 1) ? 'RESTORE_TOPIC' : 'RESTORE_TOPICS', $s_hidden_fields);
|
||||
}
|
||||
|
||||
$topic_id = $request->variable('t', 0);
|
||||
if (!$request->is_set('quickmod', phpbb_request_interface::REQUEST))
|
||||
{
|
||||
$redirect = $request->variable('redirect', "index.$phpEx");
|
||||
$redirect = reapply_sid($redirect);
|
||||
$redirect_message = 'PAGE';
|
||||
}
|
||||
else if ($topic_id)
|
||||
{
|
||||
$redirect = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $topic_id);
|
||||
$redirect_message = 'TOPIC';
|
||||
}
|
||||
else
|
||||
{
|
||||
$redirect = append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id);
|
||||
$redirect_message = 'FORUM';
|
||||
}
|
||||
|
||||
if (!$success_msg)
|
||||
{
|
||||
redirect($redirect);
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_refresh(3, $redirect);
|
||||
trigger_error($user->lang[$success_msg] . '<br /><br />' . sprintf($user->lang['RETURN_' . $redirect_message], '<a href="' . $redirect . '">', '</a>'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete Topics
|
||||
*/
|
||||
function mcp_delete_topic($topic_ids)
|
||||
function mcp_delete_topic($topic_ids, $is_soft = false, $soft_delete_reason = '', $action = 'delete_topic')
|
||||
{
|
||||
global $auth, $user, $db, $phpEx, $phpbb_root_path;
|
||||
global $auth, $user, $db, $phpEx, $phpbb_root_path, $request, $phpbb_container;
|
||||
|
||||
if (!check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_delete')))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$redirect = request_var('redirect', build_url(array('action', 'quickmod')));
|
||||
$forum_id = request_var('f', 0);
|
||||
$redirect = $request->variable('redirect', build_url(array('action', 'quickmod')));
|
||||
$forum_id = $request->variable('f', 0);
|
||||
|
||||
$s_hidden_fields = build_hidden_fields(array(
|
||||
$s_hidden_fields = array(
|
||||
'topic_id_list' => $topic_ids,
|
||||
'f' => $forum_id,
|
||||
'action' => 'delete_topic',
|
||||
'redirect' => $redirect)
|
||||
'action' => $action,
|
||||
'redirect' => $redirect,
|
||||
);
|
||||
$success_msg = '';
|
||||
|
||||
|
@ -672,23 +759,81 @@ function mcp_delete_topic($topic_ids)
|
|||
}
|
||||
else
|
||||
{
|
||||
add_log('mod', $row['forum_id'], $topic_id, 'LOG_DELETE_TOPIC', $row['topic_title'], $row['topic_first_poster_name']);
|
||||
// Only soft delete non-shadow topics
|
||||
if ($is_soft)
|
||||
{
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
$return = $phpbb_content_visibility->set_topic_visibility(ITEM_DELETED, $topic_id, $row['forum_id'], $user->data['user_id'], time(), $soft_delete_reason);
|
||||
if (!empty($return))
|
||||
{
|
||||
add_log('mod', $row['forum_id'], $topic_id, 'LOG_SOFTDELETE_TOPIC', $row['topic_title'], $row['topic_first_poster_name']);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
add_log('mod', $row['forum_id'], $topic_id, 'LOG_DELETE_TOPIC', $row['topic_title'], $row['topic_first_poster_name']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$return = delete_topics('topic_id', $topic_ids);
|
||||
if (!$is_soft)
|
||||
{
|
||||
$return = delete_topics('topic_id', $topic_ids);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
confirm_box(false, (sizeof($topic_ids) == 1) ? 'DELETE_TOPIC' : 'DELETE_TOPICS', $s_hidden_fields);
|
||||
global $template;
|
||||
|
||||
$user->add_lang('posting');
|
||||
|
||||
$only_softdeleted = false;
|
||||
if ($auth->acl_get('m_delete', $forum_id) && $auth->acl_get('m_softdelete', $forum_id))
|
||||
{
|
||||
// If there are only soft deleted topics, we display a message why the option is not available
|
||||
$sql = 'SELECT topic_id
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('topic_id', $topic_ids) . '
|
||||
AND topic_visibility <> ' . ITEM_DELETED;
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
$only_softdeleted = !$db->sql_fetchfield('topic_id');
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_SOFTDELETED' => $only_softdeleted,
|
||||
'S_TOPIC_MODE' => true,
|
||||
'S_ALLOWED_DELETE' => $auth->acl_get('m_delete', $forum_id),
|
||||
'S_ALLOWED_SOFTDELETE' => $auth->acl_get('m_softdelete', $forum_id),
|
||||
'S_DELETE_REASON' => $auth->acl_get('m_softdelete', $forum_id),
|
||||
));
|
||||
|
||||
$l_confirm = (sizeof($topic_ids) == 1) ? 'DELETE_TOPIC' : 'DELETE_TOPICS';
|
||||
if ($only_softdeleted)
|
||||
{
|
||||
$l_confirm .= '_PERMANENTLY';
|
||||
$s_hidden_fields['delete_permanent'] = '1';
|
||||
}
|
||||
else if (!$auth->acl_get('m_softdelete', $forum_id))
|
||||
{
|
||||
$s_hidden_fields['delete_permanent'] = '1';
|
||||
}
|
||||
|
||||
confirm_box(false, $l_confirm, build_hidden_fields($s_hidden_fields), 'confirm_delete_body.html');
|
||||
}
|
||||
|
||||
if (!isset($_REQUEST['quickmod']))
|
||||
$topic_id = $request->variable('t', 0);
|
||||
if (!$request->is_set('quickmod', phpbb_request_interface::REQUEST))
|
||||
{
|
||||
$redirect = request_var('redirect', "index.$phpEx");
|
||||
$redirect = $request->variable('redirect', "index.$phpEx");
|
||||
$redirect = reapply_sid($redirect);
|
||||
$redirect_message = 'PAGE';
|
||||
}
|
||||
else if ($is_soft && $topic_id)
|
||||
{
|
||||
$redirect = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $topic_id);
|
||||
$redirect_message = 'TOPIC';
|
||||
}
|
||||
else
|
||||
{
|
||||
$redirect = append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id);
|
||||
|
@ -709,27 +854,93 @@ function mcp_delete_topic($topic_ids)
|
|||
/**
|
||||
* Delete Posts
|
||||
*/
|
||||
function mcp_delete_post($post_ids)
|
||||
function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '', $action = 'delete_post')
|
||||
{
|
||||
global $auth, $user, $db, $phpEx, $phpbb_root_path;
|
||||
global $auth, $user, $db, $phpEx, $phpbb_root_path, $request, $phpbb_container;
|
||||
|
||||
if (!check_ids($post_ids, POSTS_TABLE, 'post_id', array('m_delete')))
|
||||
if (!check_ids($post_ids, POSTS_TABLE, 'post_id', array('m_softdelete')))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$redirect = request_var('redirect', build_url(array('action', 'quickmod')));
|
||||
$forum_id = request_var('f', 0);
|
||||
$redirect = $request->variable('redirect', build_url(array('action', 'quickmod')));
|
||||
$forum_id = $request->variable('f', 0);
|
||||
|
||||
$s_hidden_fields = build_hidden_fields(array(
|
||||
$s_hidden_fields = array(
|
||||
'post_id_list' => $post_ids,
|
||||
'f' => $forum_id,
|
||||
'action' => 'delete_post',
|
||||
'redirect' => $redirect)
|
||||
'action' => $action,
|
||||
'redirect' => $redirect,
|
||||
);
|
||||
$success_msg = '';
|
||||
|
||||
if (confirm_box(true))
|
||||
if (confirm_box(true) && $is_soft)
|
||||
{
|
||||
$post_info = get_post_data($post_ids);
|
||||
|
||||
$topic_info = $approve_log = array();
|
||||
|
||||
// Group the posts by topic_id
|
||||
foreach ($post_info as $post_id => $post_data)
|
||||
{
|
||||
if ($post_data['post_visibility'] != ITEM_APPROVED)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$topic_id = (int) $post_data['topic_id'];
|
||||
|
||||
$topic_info[$topic_id]['posts'][] = (int) $post_id;
|
||||
$topic_info[$topic_id]['forum_id'] = (int) $post_data['forum_id'];
|
||||
|
||||
if ($post_id == $post_data['topic_first_post_id'])
|
||||
{
|
||||
$topic_info[$topic_id]['first_post'] = true;
|
||||
}
|
||||
|
||||
if ($post_id == $post_data['topic_last_post_id'])
|
||||
{
|
||||
$topic_info[$topic_id]['last_post'] = true;
|
||||
}
|
||||
|
||||
$approve_log[] = array(
|
||||
'forum_id' => $post_data['forum_id'],
|
||||
'topic_id' => $post_data['topic_id'],
|
||||
'post_subject' => $post_data['post_subject'],
|
||||
'poster_id' => $post_data['poster_id'],
|
||||
'post_username' => $post_data['post_username'],
|
||||
'username' => $post_data['username'],
|
||||
);
|
||||
}
|
||||
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
foreach ($topic_info as $topic_id => $topic_data)
|
||||
{
|
||||
$phpbb_content_visibility->set_post_visibility(ITEM_DELETED, $topic_data['posts'], $topic_id, $topic_data['forum_id'], $user->data['user_id'], time(), $soft_delete_reason, isset($topic_data['first_post']), isset($topic_data['last_post']));
|
||||
}
|
||||
$affected_topics = sizeof($topic_info);
|
||||
// None of the topics is really deleted, so a redirect won't hurt much.
|
||||
$deleted_topics = 0;
|
||||
|
||||
$success_msg = (sizeof($post_info) == 1) ? 'POST_DELETED_SUCCESS' : 'POSTS_DELETED_SUCCESS';
|
||||
|
||||
foreach ($approve_log as $row)
|
||||
{
|
||||
$post_username = ($row['poster_id'] == ANONYMOUS && !empty($row['post_username'])) ? $row['post_username'] : $row['username'];
|
||||
add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_SOFTDELETE_POST', $row['post_subject'], $post_username);
|
||||
}
|
||||
|
||||
$topic_id = $request->variable('t', 0);
|
||||
|
||||
// Return links
|
||||
$return_link = array();
|
||||
if ($affected_topics == 1 && $topic_id)
|
||||
{
|
||||
$return_link[] = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id") . '">', '</a>');
|
||||
}
|
||||
$return_link[] = sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) . '">', '</a>');
|
||||
|
||||
}
|
||||
else if (confirm_box(true))
|
||||
{
|
||||
if (!function_exists('delete_posts'))
|
||||
{
|
||||
|
@ -772,7 +983,7 @@ function mcp_delete_post($post_ids)
|
|||
$deleted_topics = ($row = $db->sql_fetchrow($result)) ? ($affected_topics - $row['topics_left']) : $affected_topics;
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$topic_id = request_var('t', 0);
|
||||
$topic_id = $request->variable('t', 0);
|
||||
|
||||
// Return links
|
||||
$return_link = array();
|
||||
|
@ -810,10 +1021,45 @@ function mcp_delete_post($post_ids)
|
|||
}
|
||||
else
|
||||
{
|
||||
confirm_box(false, (sizeof($post_ids) == 1) ? 'DELETE_POST' : 'DELETE_POSTS', $s_hidden_fields);
|
||||
global $template;
|
||||
|
||||
$user->add_lang('posting');
|
||||
|
||||
$only_softdeleted = false;
|
||||
if ($auth->acl_get('m_delete', $forum_id) && $auth->acl_get('m_softdelete', $forum_id))
|
||||
{
|
||||
// If there are only soft deleted posts, we display a message why the option is not available
|
||||
$sql = 'SELECT post_id
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('post_id', $post_ids) . '
|
||||
AND post_visibility <> ' . ITEM_DELETED;
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
$only_softdeleted = !$db->sql_fetchfield('post_id');
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_SOFTDELETED' => $only_softdeleted,
|
||||
'S_ALLOWED_DELETE' => $auth->acl_get('m_delete', $forum_id),
|
||||
'S_ALLOWED_SOFTDELETE' => $auth->acl_get('m_softdelete', $forum_id),
|
||||
'S_DELETE_REASON' => $auth->acl_get('m_softdelete', $forum_id),
|
||||
));
|
||||
|
||||
$l_confirm = (sizeof($post_ids) == 1) ? 'DELETE_POST' : 'DELETE_POSTS';
|
||||
if ($only_softdeleted)
|
||||
{
|
||||
$l_confirm .= '_PERMANENTLY';
|
||||
$s_hidden_fields['delete_permanent'] = '1';
|
||||
}
|
||||
else if (!$auth->acl_get('m_softdelete', $forum_id))
|
||||
{
|
||||
$s_hidden_fields['delete_permanent'] = '1';
|
||||
}
|
||||
|
||||
confirm_box(false, $l_confirm, build_hidden_fields($s_hidden_fields), 'confirm_delete_body.html');
|
||||
}
|
||||
|
||||
$redirect = request_var('redirect', "index.$phpEx");
|
||||
$redirect = $request->variable('redirect', "index.$phpEx");
|
||||
$redirect = reapply_sid($redirect);
|
||||
|
||||
if (!$success_msg)
|
||||
|
@ -898,10 +1144,10 @@ function mcp_fork_topic($topic_ids)
|
|||
{
|
||||
$topic_data = get_topic_data($topic_ids, 'f_post');
|
||||
|
||||
$total_posts = 0;
|
||||
$total_topics = $total_topics_unapproved = $total_topics_softdeleted = 0;
|
||||
$total_posts = $total_posts_unapproved = $total_posts_softdeleted = 0;
|
||||
$new_topic_id_list = array();
|
||||
|
||||
|
||||
foreach ($topic_data as $topic_id => $topic_row)
|
||||
{
|
||||
if (!isset($search_type) && $topic_row['enable_indexing'])
|
||||
|
@ -932,13 +1178,14 @@ function mcp_fork_topic($topic_ids)
|
|||
'forum_id' => (int) $to_forum_id,
|
||||
'icon_id' => (int) $topic_row['icon_id'],
|
||||
'topic_attachment' => (int) $topic_row['topic_attachment'],
|
||||
'topic_approved' => 1,
|
||||
'topic_visibility' => (int) $topic_row['topic_visibility'],
|
||||
'topic_reported' => 0,
|
||||
'topic_title' => (string) $topic_row['topic_title'],
|
||||
'topic_poster' => (int) $topic_row['topic_poster'],
|
||||
'topic_time' => (int) $topic_row['topic_time'],
|
||||
'topic_replies' => (int) $topic_row['topic_replies_real'],
|
||||
'topic_replies_real' => (int) $topic_row['topic_replies_real'],
|
||||
'topic_posts_approved' => (int) $topic_row['topic_posts_approved'],
|
||||
'topic_posts_unapproved' => (int) $topic_row['topic_posts_unapproved'],
|
||||
'topic_posts_softdeleted' => (int) $topic_row['topic_posts_softdeleted'],
|
||||
'topic_status' => (int) $topic_row['topic_status'],
|
||||
'topic_type' => (int) $topic_row['topic_type'],
|
||||
'topic_first_poster_name' => (string) $topic_row['topic_first_poster_name'],
|
||||
|
@ -959,6 +1206,19 @@ function mcp_fork_topic($topic_ids)
|
|||
$new_topic_id = $db->sql_nextid();
|
||||
$new_topic_id_list[$topic_id] = $new_topic_id;
|
||||
|
||||
switch ($topic_row['topic_visibility'])
|
||||
{
|
||||
case ITEM_APPROVED:
|
||||
$total_topics++;
|
||||
break;
|
||||
case ITEM_UNAPPROVED:
|
||||
$total_topics_unapproved++;
|
||||
break;
|
||||
case ITEM_DELETED:
|
||||
$total_topics_softdeleted++;
|
||||
break;
|
||||
}
|
||||
|
||||
if ($topic_row['poll_start'])
|
||||
{
|
||||
$poll_rows = array();
|
||||
|
@ -999,7 +1259,6 @@ function mcp_fork_topic($topic_ids)
|
|||
continue;
|
||||
}
|
||||
|
||||
$total_posts += sizeof($post_rows);
|
||||
foreach ($post_rows as $row)
|
||||
{
|
||||
$sql_ary = array(
|
||||
|
@ -1009,7 +1268,7 @@ function mcp_fork_topic($topic_ids)
|
|||
'icon_id' => (int) $row['icon_id'],
|
||||
'poster_ip' => (string) $row['poster_ip'],
|
||||
'post_time' => (int) $row['post_time'],
|
||||
'post_approved' => 1,
|
||||
'post_visibility' => (int) $row['post_visibility'],
|
||||
'post_reported' => 0,
|
||||
'enable_bbcode' => (int) $row['enable_bbcode'],
|
||||
'enable_smilies' => (int) $row['enable_smilies'],
|
||||
|
@ -1033,6 +1292,19 @@ function mcp_fork_topic($topic_ids)
|
|||
$db->sql_query('INSERT INTO ' . POSTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
|
||||
$new_post_id = $db->sql_nextid();
|
||||
|
||||
switch ($row['post_visibility'])
|
||||
{
|
||||
case ITEM_APPROVED:
|
||||
$total_posts++;
|
||||
break;
|
||||
case ITEM_UNAPPROVED:
|
||||
$total_posts_unapproved++;
|
||||
break;
|
||||
case ITEM_DELETED:
|
||||
$total_posts_softdeleted++;
|
||||
break;
|
||||
}
|
||||
|
||||
// Copy whether the topic is dotted
|
||||
markread('post', $to_forum_id, $new_topic_id, 0, $row['poster_id']);
|
||||
|
||||
|
@ -1125,23 +1397,19 @@ function mcp_fork_topic($topic_ids)
|
|||
}
|
||||
|
||||
// Sync new topics, parent forums and board stats
|
||||
$sql = 'UPDATE ' . FORUMS_TABLE . '
|
||||
SET forum_posts_approved = forum_posts_approved + ' . $total_posts . ',
|
||||
forum_posts_unapproved = forum_posts_unapproved + ' . $total_posts_unapproved . ',
|
||||
forum_posts_softdeleted = forum_posts_softdeleted + ' . $total_posts_softdeleted . ',
|
||||
forum_topics_approved = forum_topics_approved + ' . $total_topics . ',
|
||||
forum_topics_unapproved = forum_topics_unapproved + ' . $total_topics_unapproved . ',
|
||||
forum_topics_softdeleted = forum_topics_softdeleted + ' . $total_topics_softdeleted . '
|
||||
WHERE forum_id = ' . $to_forum_id;
|
||||
$db->sql_query($sql);
|
||||
|
||||
sync('topic', 'topic_id', $new_topic_id_list);
|
||||
|
||||
$sync_sql = array();
|
||||
|
||||
$sync_sql[$to_forum_id][] = 'forum_posts = forum_posts + ' . $total_posts;
|
||||
$sync_sql[$to_forum_id][] = 'forum_topics = forum_topics + ' . sizeof($new_topic_id_list);
|
||||
$sync_sql[$to_forum_id][] = 'forum_topics_real = forum_topics_real + ' . sizeof($new_topic_id_list);
|
||||
|
||||
foreach ($sync_sql as $forum_id_key => $array)
|
||||
{
|
||||
$sql = 'UPDATE ' . FORUMS_TABLE . '
|
||||
SET ' . implode(', ', $array) . '
|
||||
WHERE forum_id = ' . $forum_id_key;
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
sync('forum', 'forum_id', $to_forum_id);
|
||||
|
||||
set_config_count('num_topics', sizeof($new_topic_id_list), true);
|
||||
set_config_count('num_posts', $total_posts, true);
|
||||
|
||||
|
|
|
@ -174,6 +174,33 @@ function mcp_post_details($id, $mode, $action)
|
|||
}
|
||||
}
|
||||
|
||||
// Deleting information
|
||||
if ($post_info['post_visibility'] == ITEM_DELETED && $post_info['post_delete_user'])
|
||||
{
|
||||
// User having deleted the post also being the post author?
|
||||
if (!$post_info['post_delete_user'] || $post_info['post_delete_user'] == $post_info['poster_id'])
|
||||
{
|
||||
$display_username = get_username_string('full', $post_info['poster_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'SELECT user_id, username, user_colour
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE user_id = ' . (int) $post_info['post_delete_user'];
|
||||
$result = $db->sql_query($sql);
|
||||
$user_delete_row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
$display_username = get_username_string('full', $post_info['post_delete_user'], $user_delete_row['username'], $user_delete_row['user_colour']);
|
||||
}
|
||||
|
||||
$user->add_lang('viewtopic');
|
||||
$l_deleted_by = $user->lang('DELETED_INFORMATION', $display_username, $user->format_date($post_info['post_delete_time'], false, true));
|
||||
}
|
||||
else
|
||||
{
|
||||
$l_deleted_by = '';
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'U_MCP_ACTION' => "$url&i=main&quickmod=1&mode=post_details", // Use this for mode paramaters
|
||||
'U_POST_ACTION' => "$url&i=$id&mode=post_details", // Use this for action parameters
|
||||
|
@ -185,10 +212,13 @@ function mcp_post_details($id, $mode, $action)
|
|||
'S_CAN_DELETE_POST' => $auth->acl_get('m_delete', $post_info['forum_id']),
|
||||
|
||||
'S_POST_REPORTED' => ($post_info['post_reported']) ? true : false,
|
||||
'S_POST_UNAPPROVED' => (!$post_info['post_approved']) ? true : false,
|
||||
'S_POST_UNAPPROVED' => ($post_info['post_visibility'] == ITEM_UNAPPROVED) ? true : false,
|
||||
'S_POST_DELETED' => ($post_info['post_visibility'] == ITEM_DELETED) ? true : false,
|
||||
'S_POST_LOCKED' => ($post_info['post_edit_locked']) ? true : false,
|
||||
'S_USER_NOTES' => true,
|
||||
'S_CLEAR_ALLOWED' => ($auth->acl_get('a_clearlogs')) ? true : false,
|
||||
'DELETED_MESSAGE' => $l_deleted_by,
|
||||
'DELETE_REASON' => $post_info['post_delete_reason'],
|
||||
|
||||
'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&f={$post_info['forum_id']}&p={$post_info['post_id']}") : '',
|
||||
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp_chgposter&field=username&select_single=true'),
|
||||
|
@ -205,6 +235,7 @@ function mcp_post_details($id, $mode, $action)
|
|||
'RETURN_FORUM' => sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", "f={$post_info['forum_id']}&start={$start}") . '">', '</a>'),
|
||||
'REPORTED_IMG' => $user->img('icon_topic_reported', $user->lang['POST_REPORTED']),
|
||||
'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', $user->lang['POST_UNAPPROVED']),
|
||||
'DELETED_IMG' => $user->img('icon_topic_deleted', $user->lang['POST_DELETED']),
|
||||
'EDIT_IMG' => $user->img('icon_post_edit', $user->lang['EDIT_POST']),
|
||||
'SEARCH_IMG' => $user->img('icon_user_search', $user->lang['SEARCH']),
|
||||
|
||||
|
@ -415,7 +446,7 @@ function change_poster(&$post_info, $userdata)
|
|||
}
|
||||
|
||||
// Adjust post counts... only if the post is approved (else, it was not added the users post count anyway)
|
||||
if ($post_info['post_postcount'] && $post_info['post_approved'])
|
||||
if ($post_info['post_postcount'] && $post_info['post_visibility'] == ITEM_APPROVED)
|
||||
{
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET user_posts = user_posts - 1
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -187,7 +187,7 @@ class mcp_reports
|
|||
'S_CLOSE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $post_info['forum_id'] . '&p=' . $post_id),
|
||||
'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']),
|
||||
'S_POST_REPORTED' => $post_info['post_reported'],
|
||||
'S_POST_UNAPPROVED' => !$post_info['post_approved'],
|
||||
'S_POST_UNAPPROVED' => ($post_info['post_visibility'] == POST_UNAPPROVED),
|
||||
'S_POST_LOCKED' => $post_info['post_edit_locked'],
|
||||
'S_USER_NOTES' => true,
|
||||
|
||||
|
@ -292,11 +292,11 @@ class mcp_reports
|
|||
|
||||
$global_id = $forum_list[0];
|
||||
|
||||
$sql = 'SELECT SUM(forum_topics) as sum_forum_topics
|
||||
$sql = 'SELECT SUM(forum_topics_approved) as sum_forum_topics
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('forum_id', $forum_list);
|
||||
$result = $db->sql_query($sql);
|
||||
$forum_info['forum_topics'] = (int) $db->sql_fetchfield('sum_forum_topics');
|
||||
$forum_info['forum_topics_approved'] = (int) $db->sql_fetchfield('sum_forum_topics');
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
else
|
||||
|
@ -328,7 +328,7 @@ class mcp_reports
|
|||
$sort_by_sql = $sort_order_sql = array();
|
||||
mcp_sorting($mode, $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id, $topic_id);
|
||||
|
||||
$forum_topics = ($total == -1) ? $forum_info['forum_topics'] : $total;
|
||||
$forum_topics = ($total == -1) ? $forum_info['forum_topics_approved'] : $total;
|
||||
$limit_time_sql = ($sort_days) ? 'AND r.report_time >= ' . (time() - ($sort_days * 86400)) : '';
|
||||
|
||||
if ($mode == 'reports')
|
||||
|
|
|
@ -21,7 +21,7 @@ if (!defined('IN_PHPBB'))
|
|||
function mcp_topic_view($id, $mode, $action)
|
||||
{
|
||||
global $phpEx, $phpbb_root_path, $config;
|
||||
global $template, $db, $user, $auth, $cache;
|
||||
global $template, $db, $user, $auth, $cache, $phpbb_container;
|
||||
|
||||
$url = append_sid("{$phpbb_root_path}mcp.$phpEx?" . extra_url());
|
||||
|
||||
|
@ -84,8 +84,8 @@ function mcp_topic_view($id, $mode, $action)
|
|||
$subject = $topic_info['topic_title'];
|
||||
}
|
||||
|
||||
// Approve posts?
|
||||
if ($action == 'approve' && $auth->acl_get('m_approve', $topic_info['forum_id']))
|
||||
// Restore or pprove posts?
|
||||
if (($action == 'restore' || $action == 'approve') && $auth->acl_get('m_approve', $topic_info['forum_id']))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/mcp/mcp_queue.' . $phpEx);
|
||||
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
|
||||
|
@ -98,7 +98,7 @@ function mcp_topic_view($id, $mode, $action)
|
|||
|
||||
if (!$sort)
|
||||
{
|
||||
approve_post($post_id_list, $id, $mode);
|
||||
mcp_queue::approve_posts($action, $post_id_list, $id, $mode);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -112,17 +112,11 @@ function mcp_topic_view($id, $mode, $action)
|
|||
mcp_sorting('viewtopic', $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $topic_info['forum_id'], $topic_id, $where_sql);
|
||||
|
||||
$limit_time_sql = ($sort_days) ? 'AND p.post_time >= ' . (time() - ($sort_days * 86400)) : '';
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
|
||||
if ($total == -1)
|
||||
{
|
||||
if ($auth->acl_get('m_approve', $topic_info['forum_id']))
|
||||
{
|
||||
$total = $topic_info['topic_replies_real'] + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$total = $topic_info['topic_replies'] + 1;
|
||||
}
|
||||
$total = $phpbb_content_visibility->get_count('topic_posts', $topic_info, $topic_info['forum_id']);
|
||||
}
|
||||
|
||||
$posts_per_page = max(0, request_var('posts_per_page', intval($config['posts_per_page'])));
|
||||
|
@ -145,8 +139,8 @@ function mcp_topic_view($id, $mode, $action)
|
|||
$sql = 'SELECT u.username, u.username_clean, u.user_colour, p.*
|
||||
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
|
||||
WHERE ' . (($action == 'reports') ? 'p.post_reported = 1 AND ' : '') . '
|
||||
p.topic_id = ' . $topic_id . ' ' .
|
||||
((!$auth->acl_get('m_approve', $topic_info['forum_id'])) ? ' AND p.post_approved = 1 ' : '') . '
|
||||
p.topic_id = ' . $topic_id . '
|
||||
AND ' . $phpbb_content_visibility->get_visibility_sql('post', $topic_info['forum_id'], 'p.') . '
|
||||
AND p.poster_id = u.user_id ' .
|
||||
$limit_time_sql . '
|
||||
ORDER BY ' . $sort_order_sql;
|
||||
|
@ -182,7 +176,7 @@ function mcp_topic_view($id, $mode, $action)
|
|||
$topic_tracking_info = get_complete_topic_tracking($topic_info['forum_id'], $topic_id);
|
||||
}
|
||||
|
||||
$has_unapproved_posts = false;
|
||||
$has_unapproved_posts = $has_deleted_posts = false;
|
||||
|
||||
// Grab extensions
|
||||
$extensions = $attachments = array();
|
||||
|
@ -227,11 +221,16 @@ function mcp_topic_view($id, $mode, $action)
|
|||
parse_attachments($topic_info['forum_id'], $message, $attachments[$row['post_id']], $update_count);
|
||||
}
|
||||
|
||||
if (!$row['post_approved'])
|
||||
if ($row['post_visibility'] == ITEM_UNAPPROVED)
|
||||
{
|
||||
$has_unapproved_posts = true;
|
||||
}
|
||||
|
||||
if ($row['post_visibility'] == ITEM_DELETED)
|
||||
{
|
||||
$has_deleted_posts = true;
|
||||
}
|
||||
|
||||
$post_unread = (isset($topic_tracking_info[$topic_id]) && $row['post_time'] > $topic_tracking_info[$topic_id]) ? true : false;
|
||||
|
||||
$template->assign_block_vars('postrow', array(
|
||||
|
@ -249,7 +248,8 @@ function mcp_topic_view($id, $mode, $action)
|
|||
'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'UNREAD_POST') : $user->img('icon_post_target', 'POST'),
|
||||
|
||||
'S_POST_REPORTED' => ($row['post_reported'] && $auth->acl_get('m_report', $topic_info['forum_id'])),
|
||||
'S_POST_UNAPPROVED' => (!$row['post_approved'] && $auth->acl_get('m_approve', $topic_info['forum_id'])),
|
||||
'S_POST_UNAPPROVED' => ($row['post_visibility'] == ITEM_UNAPPROVED && $auth->acl_get('m_approve', $topic_info['forum_id'])),
|
||||
'S_POST_DELETED' => ($row['post_visibility'] == ITEM_DELETED && $auth->acl_get('m_approve', $topic_info['forum_id'])),
|
||||
'S_CHECKED' => (($submitted_id_list && !in_array(intval($row['post_id']), $submitted_id_list)) || in_array(intval($row['post_id']), $checked_ids)) ? true : false,
|
||||
'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? true : false,
|
||||
|
||||
|
@ -325,6 +325,7 @@ function mcp_topic_view($id, $mode, $action)
|
|||
|
||||
'REPORTED_IMG' => $user->img('icon_topic_reported', 'POST_REPORTED'),
|
||||
'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', 'POST_UNAPPROVED'),
|
||||
'DELETED_IMG' => $user->img('icon_topic_deleted', 'POST_DELETED_RESTORE'),
|
||||
'INFO_IMG' => $user->img('icon_post_info', 'VIEW_INFO'),
|
||||
|
||||
'S_MCP_ACTION' => "$url&i=$id&mode=$mode&action=$action&start=$start",
|
||||
|
@ -333,6 +334,7 @@ function mcp_topic_view($id, $mode, $action)
|
|||
'S_CAN_MERGE' => ($auth->acl_get('m_merge', $topic_info['forum_id'])) ? true : false,
|
||||
'S_CAN_DELETE' => ($auth->acl_get('m_delete', $topic_info['forum_id'])) ? true : false,
|
||||
'S_CAN_APPROVE' => ($has_unapproved_posts && $auth->acl_get('m_approve', $topic_info['forum_id'])) ? true : false,
|
||||
'S_CAN_RESTORE' => ($has_deleted_posts && $auth->acl_get('m_approve', $topic_info['forum_id'])) ? true : false,
|
||||
'S_CAN_LOCK' => ($auth->acl_get('m_lock', $topic_info['forum_id'])) ? true : false,
|
||||
'S_CAN_REPORT' => ($auth->acl_get('m_report', $topic_info['forum_id'])) ? true : false,
|
||||
'S_CAN_SYNC' => $auth->acl_get('m_', $topic_info['forum_id']),
|
||||
|
@ -448,7 +450,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
|
|||
|
||||
if ($sort_order_sql[0] == 'u')
|
||||
{
|
||||
$sql = 'SELECT p.post_id, p.forum_id, p.post_approved
|
||||
$sql = 'SELECT p.post_id, p.forum_id, p.post_visibility
|
||||
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . " u
|
||||
WHERE p.topic_id = $topic_id
|
||||
AND p.poster_id = u.user_id
|
||||
|
@ -457,7 +459,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
|
|||
}
|
||||
else
|
||||
{
|
||||
$sql = 'SELECT p.post_id, p.forum_id, p.post_approved
|
||||
$sql = 'SELECT p.post_id, p.forum_id, p.post_visibility
|
||||
FROM ' . POSTS_TABLE . " p
|
||||
WHERE p.topic_id = $topic_id
|
||||
$limit_time_sql
|
||||
|
@ -470,7 +472,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
|
|||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
// If split from selected post (split_beyond), we split the unapproved items too.
|
||||
if (!$row['post_approved'] && !$auth->acl_get('m_approve', $row['forum_id']))
|
||||
if ($row['post_visibility'] == ITEM_UNAPPROVED && !$auth->acl_get('m_approve', $row['forum_id']))
|
||||
{
|
||||
// continue;
|
||||
}
|
||||
|
@ -497,10 +499,10 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
|
|||
$icon_id = request_var('icon', 0);
|
||||
|
||||
$sql_ary = array(
|
||||
'forum_id' => $to_forum_id,
|
||||
'topic_title' => $subject,
|
||||
'icon_id' => $icon_id,
|
||||
'topic_approved'=> 1
|
||||
'forum_id' => $to_forum_id,
|
||||
'topic_title' => $subject,
|
||||
'icon_id' => $icon_id,
|
||||
'topic_visibility' => 1
|
||||
);
|
||||
|
||||
$sql = 'INSERT INTO ' . TOPICS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
|
||||
|
|
|
@ -1,166 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @copyright (c) 2005 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
stream_filter_register('phpbb_template', 'phpbb_template_filter');
|
||||
|
||||
/**
|
||||
* Extension of template class - Functions needed for compiling templates only.
|
||||
*
|
||||
* @package phpBB3
|
||||
* @uses template_filter As a PHP stream filter to perform compilation of templates
|
||||
*/
|
||||
class phpbb_template_compile
|
||||
{
|
||||
/**
|
||||
* Array of parameters to forward to template filter
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $filter_params;
|
||||
|
||||
/**
|
||||
* Array of default parameters
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $default_filter_params;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param bool $allow_php Whether PHP code will be allowed in templates (inline PHP code, PHP tag and INCLUDEPHP tag)
|
||||
* @param array $style_names Name of style to which the template being compiled belongs and parents in style tree order
|
||||
* @param phpbb_style_resource_locator $locator Resource locator
|
||||
* @param string $phpbb_root_path Path to phpBB root directory
|
||||
* @param phpbb_extension_manager $extension_manager Extension manager to use for finding template fragments in extensions; if null, template events will not be invoked
|
||||
* @param phpbb_user $user Current user
|
||||
*/
|
||||
public function __construct($allow_php, $style_names, $locator, $phpbb_root_path, $extension_manager = null, $user = null)
|
||||
{
|
||||
$this->filter_params = $this->default_filter_params = array(
|
||||
'allow_php' => $allow_php,
|
||||
'style_names' => $style_names,
|
||||
'locator' => $locator,
|
||||
'phpbb_root_path' => $phpbb_root_path,
|
||||
'extension_manager' => $extension_manager,
|
||||
'user' => $user,
|
||||
'template_compile' => $this,
|
||||
'cleanup' => true,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set filter parameters
|
||||
*
|
||||
* @param array $params Array of parameters (will be merged onto $this->filter_params)
|
||||
*/
|
||||
public function set_filter_params($params)
|
||||
{
|
||||
$this->filter_params = array_merge(
|
||||
$this->filter_params,
|
||||
$params
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset filter parameters to their default settings
|
||||
*/
|
||||
public function reset_filter_params()
|
||||
{
|
||||
$this->filter_params = $this->default_filter_params;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compiles template in $source_file and writes compiled template to
|
||||
* cache directory
|
||||
*
|
||||
* @param string $handle Template handle to compile
|
||||
* @param string $source_file Source template file
|
||||
* @return bool Return true on success otherwise false
|
||||
*/
|
||||
public function compile_file_to_file($source_file, $compiled_file)
|
||||
{
|
||||
$lock = new phpbb_lock_flock($compiled_file);
|
||||
$lock->acquire();
|
||||
|
||||
$source_handle = @fopen($source_file, 'rb');
|
||||
$destination_handle = @fopen($compiled_file, 'wb');
|
||||
|
||||
if (!$source_handle || !$destination_handle)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->compile_stream_to_stream($source_handle, $destination_handle);
|
||||
|
||||
@fclose($source_handle);
|
||||
@fclose($destination_handle);
|
||||
|
||||
phpbb_chmod($compiled_file, CHMOD_READ | CHMOD_WRITE);
|
||||
|
||||
$lock->release();
|
||||
|
||||
clearstatcache();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compiles a template located at $source_file.
|
||||
*
|
||||
* Returns PHP source suitable for eval().
|
||||
*
|
||||
* @param string $source_file Source template file
|
||||
* @return string|bool Return compiled code on successful compilation otherwise false
|
||||
*/
|
||||
public function compile_file($source_file)
|
||||
{
|
||||
$source_handle = @fopen($source_file, 'rb');
|
||||
$destination_handle = @fopen('php://temp' ,'r+b');
|
||||
|
||||
if (!$source_handle || !$destination_handle)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->compile_stream_to_stream($source_handle, $destination_handle);
|
||||
|
||||
@fclose($source_handle);
|
||||
|
||||
rewind($destination_handle);
|
||||
$contents = stream_get_contents($destination_handle);
|
||||
@fclose($dest_handle);
|
||||
|
||||
return $contents;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compiles contents of $source_stream into $dest_stream.
|
||||
*
|
||||
* A stream filter is appended to $source_stream as part of the
|
||||
* process.
|
||||
*
|
||||
* @param resource $source_stream Source stream
|
||||
* @param resource $dest_stream Destination stream
|
||||
* @return null
|
||||
*/
|
||||
private function compile_stream_to_stream($source_stream, $dest_stream)
|
||||
{
|
||||
stream_filter_append($source_stream, 'phpbb_template', null, $this->filter_params);
|
||||
stream_copy_to_stream($source_stream, $dest_stream);
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -1,35 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @copyright (c) 2011 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Template renderer interface.
|
||||
*
|
||||
* Objects implementing this interface encapsulate a means of displaying
|
||||
* a template.
|
||||
*
|
||||
* @package phpBB3
|
||||
*/
|
||||
interface phpbb_template_renderer
|
||||
{
|
||||
/**
|
||||
* Displays the template managed by this renderer.
|
||||
*
|
||||
* @param phpbb_template_context $context Template context to use
|
||||
* @param array $lang Language entries to use
|
||||
*/
|
||||
public function render($context, $lang);
|
||||
}
|
|
@ -1,60 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @copyright (c) 2011 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Template renderer that stores compiled template's php code and
|
||||
* displays it via eval.
|
||||
*
|
||||
* @package phpBB3
|
||||
*/
|
||||
class phpbb_template_renderer_eval implements phpbb_template_renderer
|
||||
{
|
||||
/**
|
||||
* Template code to be eval'ed.
|
||||
*/
|
||||
private $code;
|
||||
|
||||
/**
|
||||
* Constructor. Stores provided code for future evaluation.
|
||||
* Template includes are delegated to template object $template.
|
||||
*
|
||||
* @param string $code php code of the template
|
||||
* @param phpbb_template $template template object
|
||||
*/
|
||||
public function __construct($code, $template)
|
||||
{
|
||||
$this->code = $code;
|
||||
$this->template = $template;
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays the template managed by this renderer by eval'ing php code
|
||||
* of the template.
|
||||
*
|
||||
* @param phpbb_template_context $context Template context to use
|
||||
* @param array $lang Language entries to use
|
||||
*/
|
||||
public function render($context, $lang)
|
||||
{
|
||||
$_template = $this->template;
|
||||
$_tpldata = &$context->get_data_ref();
|
||||
$_rootref = &$context->get_root_ref();
|
||||
$_lang = $lang;
|
||||
|
||||
eval(' ?>' . $this->code . '<?php ');
|
||||
}
|
||||
}
|
|
@ -1,60 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @copyright (c) 2011 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Template renderer that stores path to php file with template code
|
||||
* and displays it by including the file.
|
||||
*
|
||||
* @package phpBB3
|
||||
*/
|
||||
class phpbb_template_renderer_include implements phpbb_template_renderer
|
||||
{
|
||||
/**
|
||||
* Template path to be included.
|
||||
*/
|
||||
private $path;
|
||||
|
||||
/**
|
||||
* Constructor. Stores path to the template for future inclusion.
|
||||
* Template includes are delegated to template object $template.
|
||||
*
|
||||
* @param string $path path to the template
|
||||
*/
|
||||
public function __construct($path, $template)
|
||||
{
|
||||
$this->path = $path;
|
||||
$this->template = $template;
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays the template managed by this renderer by including
|
||||
* the php file containing the template.
|
||||
*
|
||||
* @param phpbb_template_context $context Template context to use
|
||||
* @param array $lang Language entries to use
|
||||
*/
|
||||
public function render($context, $lang)
|
||||
{
|
||||
$_template = $this->template;
|
||||
$_tpldata = &$context->get_data_ref();
|
||||
$_rootref = &$context->get_root_ref();
|
||||
$_lang = $lang;
|
||||
|
||||
include($this->path);
|
||||
}
|
||||
}
|
|
@ -1,515 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @copyright (c) 2005 phpBB Group, sections (c) 2001 ispi of Lincoln Inc
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @todo
|
||||
* IMG_ for image substitution?
|
||||
* {IMG_[key]:[alt]:[type]}
|
||||
* {IMG_ICON_CONTACT:CONTACT:full} -> $user->img('icon_contact', 'CONTACT', 'full');
|
||||
*
|
||||
* More in-depth...
|
||||
* yadayada
|
||||
*/
|
||||
|
||||
/**
|
||||
* Base Template class.
|
||||
* @package phpBB3
|
||||
*/
|
||||
class phpbb_template
|
||||
{
|
||||
/**
|
||||
* Template context.
|
||||
* Stores template data used during template rendering.
|
||||
* @var phpbb_template_context
|
||||
*/
|
||||
private $context;
|
||||
|
||||
/**
|
||||
* Path of the cache directory for the template
|
||||
* @var string
|
||||
*/
|
||||
public $cachepath = '';
|
||||
|
||||
/**
|
||||
* phpBB root path
|
||||
* @var string
|
||||
*/
|
||||
private $phpbb_root_path;
|
||||
|
||||
/**
|
||||
* PHP file extension
|
||||
* @var string
|
||||
*/
|
||||
private $php_ext;
|
||||
|
||||
/**
|
||||
* phpBB config instance
|
||||
* @var phpbb_config
|
||||
*/
|
||||
private $config;
|
||||
|
||||
/**
|
||||
* Current user
|
||||
* @var phpbb_user
|
||||
*/
|
||||
private $user;
|
||||
|
||||
/**
|
||||
* Template locator
|
||||
* @var phpbb_template_locator
|
||||
*/
|
||||
private $locator;
|
||||
|
||||
/**
|
||||
* Extension manager.
|
||||
*
|
||||
* @var phpbb_extension_manager
|
||||
*/
|
||||
private $extension_manager;
|
||||
|
||||
/**
|
||||
* Name of the style that the template being compiled and/or rendered
|
||||
* belongs to, and its parents, in inheritance tree order.
|
||||
*
|
||||
* Used to invoke style-specific template events.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $style_names;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $phpbb_root_path phpBB root path
|
||||
* @param user $user current user
|
||||
* @param phpbb_template_locator $locator template locator
|
||||
* @param phpbb_template_context $context template context
|
||||
* @param phpbb_extension_manager $extension_manager extension manager, if null then template events will not be invoked
|
||||
*/
|
||||
public function __construct($phpbb_root_path, $php_ext, $config, $user, phpbb_template_locator $locator, phpbb_template_context $context, phpbb_extension_manager $extension_manager = null)
|
||||
{
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
$this->php_ext = $php_ext;
|
||||
$this->config = $config;
|
||||
$this->user = $user;
|
||||
$this->locator = $locator;
|
||||
$this->context = $context;
|
||||
$this->extension_manager = $extension_manager;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the template filenames for handles.
|
||||
*
|
||||
* @param array $filename_array Should be a hash of handle => filename pairs.
|
||||
*/
|
||||
public function set_filenames(array $filename_array)
|
||||
{
|
||||
$this->locator->set_filenames($filename_array);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the style names corresponding to style hierarchy being compiled
|
||||
* and/or rendered.
|
||||
*
|
||||
* @param array $style_names List of style names in inheritance tree order
|
||||
* @return null
|
||||
*/
|
||||
public function set_style_names(array $style_names)
|
||||
{
|
||||
$this->style_names = $style_names;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears all variables and blocks assigned to this template.
|
||||
*/
|
||||
public function destroy()
|
||||
{
|
||||
$this->context->clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset/empty complete block
|
||||
*
|
||||
* @param string $blockname Name of block to destroy
|
||||
*/
|
||||
public function destroy_block_vars($blockname)
|
||||
{
|
||||
$this->context->destroy_block_vars($blockname);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a template for provided handle.
|
||||
*
|
||||
* The template will be loaded and compiled, if necessary, first.
|
||||
*
|
||||
* This function calls hooks.
|
||||
*
|
||||
* @param string $handle Handle to display
|
||||
* @return bool True on success, false on failure
|
||||
*/
|
||||
public function display($handle)
|
||||
{
|
||||
$result = $this->call_hook($handle, __FUNCTION__);
|
||||
if ($result !== false)
|
||||
{
|
||||
return $result[0];
|
||||
}
|
||||
|
||||
return $this->load_and_render($handle);
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads a template for $handle, compiling it if necessary, and
|
||||
* renders the template.
|
||||
*
|
||||
* @param string $handle Template handle to render
|
||||
* @return bool True on success, false on failure
|
||||
*/
|
||||
private function load_and_render($handle)
|
||||
{
|
||||
$renderer = $this->_tpl_load($handle);
|
||||
|
||||
if ($renderer)
|
||||
{
|
||||
$renderer->render($this->context, $this->get_lang());
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls hook if any is defined.
|
||||
*
|
||||
* @param string $handle Template handle being displayed.
|
||||
* @param string $method Method name of the caller.
|
||||
*/
|
||||
private function call_hook($handle, $method)
|
||||
{
|
||||
global $phpbb_hook;
|
||||
|
||||
if (!empty($phpbb_hook) && $phpbb_hook->call_hook(array(__CLASS__, $method), $handle, $this))
|
||||
{
|
||||
if ($phpbb_hook->hook_return(array(__CLASS__, $method)))
|
||||
{
|
||||
$result = $phpbb_hook->hook_return_result(array(__CLASS__, $method));
|
||||
return array($result);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtains language array.
|
||||
* This is either lang property of $user property, or if
|
||||
* it is not set an empty array.
|
||||
* @return array language entries
|
||||
*/
|
||||
public function get_lang()
|
||||
{
|
||||
if (isset($this->user->lang))
|
||||
{
|
||||
$lang = $this->user->lang;
|
||||
}
|
||||
else
|
||||
{
|
||||
$lang = array();
|
||||
}
|
||||
return $lang;
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the handle and assign the output to a template variable
|
||||
* or return the compiled result.
|
||||
*
|
||||
* @param string $handle Handle to operate on
|
||||
* @param string $template_var Template variable to assign compiled handle to
|
||||
* @param bool $return_content If true return compiled handle, otherwise assign to $template_var
|
||||
* @return bool|string false on failure, otherwise if $return_content is true return string of the compiled handle, otherwise return true
|
||||
*/
|
||||
public function assign_display($handle, $template_var = '', $return_content = true)
|
||||
{
|
||||
ob_start();
|
||||
$result = $this->display($handle);
|
||||
$contents = ob_get_clean();
|
||||
if ($result === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($return_content)
|
||||
{
|
||||
return $contents;
|
||||
}
|
||||
|
||||
$this->assign_var($template_var, $contents);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtains a template renderer for a template identified by specified
|
||||
* handle. The template renderer can display the template later.
|
||||
*
|
||||
* Template source will first be compiled into php code.
|
||||
* If template cache is writable the compiled php code will be stored
|
||||
* on filesystem and template will not be subsequently recompiled.
|
||||
* If template cache is not writable template source will be recompiled
|
||||
* every time it is needed. DEBUG define and load_tplcompile
|
||||
* configuration setting may be used to force templates to be always
|
||||
* recompiled.
|
||||
*
|
||||
* Returns an object implementing phpbb_template_renderer, or null
|
||||
* if template loading or compilation failed. Call render() on the
|
||||
* renderer to display the template. This will result in template
|
||||
* contents sent to the output stream (unless, of course, output
|
||||
* buffering is in effect).
|
||||
*
|
||||
* @param string $handle Handle of the template to load
|
||||
* @return phpbb_template_renderer Template renderer object, or null on failure
|
||||
* @uses phpbb_template_compile is used to compile template source
|
||||
*/
|
||||
private function _tpl_load($handle)
|
||||
{
|
||||
$output_file = $this->_compiled_file_for_handle($handle);
|
||||
|
||||
$recompile = defined('DEBUG') ||
|
||||
!file_exists($output_file) ||
|
||||
@filesize($output_file) === 0;
|
||||
|
||||
if ($recompile || $this->config['load_tplcompile'])
|
||||
{
|
||||
// Set only if a recompile or an mtime check are required.
|
||||
$source_file = $this->locator->get_source_file_for_handle($handle);
|
||||
|
||||
if (!$recompile && @filemtime($output_file) < @filemtime($source_file))
|
||||
{
|
||||
$recompile = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Recompile page if the original template is newer, otherwise load the compiled version
|
||||
if (!$recompile)
|
||||
{
|
||||
return new phpbb_template_renderer_include($output_file, $this);
|
||||
}
|
||||
|
||||
$compile = new phpbb_template_compile($this->config['tpl_allow_php'], $this->style_names, $this->locator, $this->phpbb_root_path, $this->extension_manager, $this->user);
|
||||
|
||||
if ($compile->compile_file_to_file($source_file, $output_file) !== false)
|
||||
{
|
||||
$renderer = new phpbb_template_renderer_include($output_file, $this);
|
||||
}
|
||||
else if (($code = $compile->compile_file($source_file)) !== false)
|
||||
{
|
||||
$renderer = new phpbb_template_renderer_eval($code, $this);
|
||||
}
|
||||
else
|
||||
{
|
||||
$renderer = null;
|
||||
}
|
||||
|
||||
return $renderer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines compiled file path for handle $handle.
|
||||
*
|
||||
* @param string $handle Template handle (i.e. "friendly" template name)
|
||||
* @return string Compiled file path
|
||||
*/
|
||||
private function _compiled_file_for_handle($handle)
|
||||
{
|
||||
$source_file = $this->locator->get_filename_for_handle($handle);
|
||||
$compiled_file = $this->cachepath . str_replace('/', '.', $source_file) . '.' . $this->php_ext;
|
||||
return $compiled_file;
|
||||
}
|
||||
|
||||
/**
|
||||
* Assign key variable pairs from an array
|
||||
*
|
||||
* @param array $vararray A hash of variable name => value pairs
|
||||
*/
|
||||
public function assign_vars(array $vararray)
|
||||
{
|
||||
foreach ($vararray as $key => $val)
|
||||
{
|
||||
$this->assign_var($key, $val);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Assign a single scalar value to a single key.
|
||||
*
|
||||
* Value can be a string, an integer or a boolean.
|
||||
*
|
||||
* @param string $varname Variable name
|
||||
* @param string $varval Value to assign to variable
|
||||
*/
|
||||
public function assign_var($varname, $varval)
|
||||
{
|
||||
$this->context->assign_var($varname, $varval);
|
||||
}
|
||||
|
||||
/**
|
||||
* Append text to the string value stored in a key.
|
||||
*
|
||||
* Text is appended using the string concatenation operator (.).
|
||||
*
|
||||
* @param string $varname Variable name
|
||||
* @param string $varval Value to append to variable
|
||||
*/
|
||||
public function append_var($varname, $varval)
|
||||
{
|
||||
$this->context->append_var($varname, $varval);
|
||||
}
|
||||
|
||||
// Docstring is copied from phpbb_template_context method with the same name.
|
||||
/**
|
||||
* Assign key variable pairs from an array to a specified block
|
||||
* @param string $blockname Name of block to assign $vararray to
|
||||
* @param array $vararray A hash of variable name => value pairs
|
||||
*/
|
||||
public function assign_block_vars($blockname, array $vararray)
|
||||
{
|
||||
return $this->context->assign_block_vars($blockname, $vararray);
|
||||
}
|
||||
|
||||
// Docstring is copied from phpbb_template_context method with the same name.
|
||||
/**
|
||||
* Change already assigned key variable pair (one-dimensional - single loop entry)
|
||||
*
|
||||
* An example of how to use this function:
|
||||
* {@example alter_block_array.php}
|
||||
*
|
||||
* @param string $blockname the blockname, for example 'loop'
|
||||
* @param array $vararray the var array to insert/add or merge
|
||||
* @param mixed $key Key to search for
|
||||
*
|
||||
* array: KEY => VALUE [the key/value pair to search for within the loop to determine the correct position]
|
||||
*
|
||||
* int: Position [the position to change or insert at directly given]
|
||||
*
|
||||
* If key is false the position is set to 0
|
||||
* If key is true the position is set to the last entry
|
||||
*
|
||||
* @param string $mode Mode to execute (valid modes are 'insert' and 'change')
|
||||
*
|
||||
* If insert, the vararray is inserted at the given position (position counting from zero).
|
||||
* If change, the current block gets merged with the vararray (resulting in new key/value pairs be added and existing keys be replaced by the new value).
|
||||
*
|
||||
* Since counting begins by zero, inserting at the last position will result in this array: array(vararray, last positioned array)
|
||||
* and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars)
|
||||
*
|
||||
* @return bool false on error, true on success
|
||||
*/
|
||||
public function alter_block_array($blockname, array $vararray, $key = false, $mode = 'insert')
|
||||
{
|
||||
return $this->context->alter_block_array($blockname, $vararray, $key, $mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Include a separate template.
|
||||
*
|
||||
* This function is marked public due to the way the template
|
||||
* implementation uses it. It is actually an implementation function
|
||||
* and should not be considered part of template class's public API.
|
||||
*
|
||||
* @param string $filename Template filename to include
|
||||
* @param bool $include True to include the file, false to just load it
|
||||
* @uses template_compile is used to compile uncached templates
|
||||
*/
|
||||
public function _tpl_include($filename, $include = true)
|
||||
{
|
||||
$this->locator->set_filenames(array($filename => $filename));
|
||||
|
||||
if (!$this->load_and_render($filename))
|
||||
{
|
||||
// trigger_error cannot be used here, as the output already started
|
||||
echo 'template->_tpl_include(): Failed including ' . htmlspecialchars($handle) . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Include a PHP file.
|
||||
*
|
||||
* If a relative path is passed in $filename, it is considered to be
|
||||
* relative to board root ($phpbb_root_path). Absolute paths are
|
||||
* also allowed.
|
||||
*
|
||||
* This function is marked public due to the way the template
|
||||
* implementation uses it. It is actually an implementation function
|
||||
* and should not be considered part of template class's public API.
|
||||
*
|
||||
* @param string $filename Path to PHP file to include
|
||||
*/
|
||||
public function _php_include($filename)
|
||||
{
|
||||
if (phpbb_is_absolute($filename))
|
||||
{
|
||||
$file = $filename;
|
||||
}
|
||||
else
|
||||
{
|
||||
$file = $this->phpbb_root_path . $filename;
|
||||
}
|
||||
|
||||
if (!file_exists($file))
|
||||
{
|
||||
// trigger_error cannot be used here, as the output already started
|
||||
echo 'template->_php_include(): File ' . htmlspecialchars($file) . " does not exist\n";
|
||||
return;
|
||||
}
|
||||
include($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* Include JS file
|
||||
*
|
||||
* @param string $file file name
|
||||
* @param bool $locate True if file needs to be located
|
||||
* @param bool $relative True if path is relative to phpBB root directory. Ignored if $locate == true
|
||||
*/
|
||||
public function _js_include($file, $locate = false, $relative = false)
|
||||
{
|
||||
// Locate file
|
||||
if ($locate)
|
||||
{
|
||||
$located = $this->locator->get_first_file_location(array($file), false, true);
|
||||
if ($located)
|
||||
{
|
||||
$file = $located;
|
||||
}
|
||||
}
|
||||
else if ($relative)
|
||||
{
|
||||
$file = $this->phpbb_root_path . $file;
|
||||
}
|
||||
|
||||
$file .= (strpos($file, '?') === false) ? '?' : '&';
|
||||
$file .= 'assets_version=' . $this->config['assets_version'];
|
||||
|
||||
// Add HTML code
|
||||
$code = '<script src="' . htmlspecialchars($file) . '"></script>';
|
||||
$this->context->append_var('SCRIPTS', $code);
|
||||
}
|
||||
}
|
|
@ -565,7 +565,7 @@ class ucp_groups
|
|||
if ($colour_error = validate_data($submit_ary, array('colour' => array('hex_colour', true))))
|
||||
{
|
||||
// Replace "error" string with its real, localised form
|
||||
$error = array_merge($error, array_map(array(&$user, 'lang'), $colour_error));
|
||||
$error = array_merge($error, $colour_error);
|
||||
}
|
||||
|
||||
if (!sizeof($error))
|
||||
|
@ -613,6 +613,7 @@ class ucp_groups
|
|||
|
||||
if (sizeof($error))
|
||||
{
|
||||
$error = array_map(array(&$user, 'lang'), $error);
|
||||
$group_rank = $submit_ary['rank'];
|
||||
|
||||
$group_desc_data = array(
|
||||
|
|
|
@ -642,7 +642,7 @@ class ucp_main
|
|||
*/
|
||||
function assign_topiclist($mode = 'subscribed', $forbidden_forum_ary = array())
|
||||
{
|
||||
global $user, $db, $template, $config, $cache, $auth, $phpbb_root_path, $phpEx;
|
||||
global $user, $db, $template, $config, $cache, $auth, $phpbb_root_path, $phpEx, $phpbb_container;
|
||||
|
||||
$table = ($mode == 'subscribed') ? TOPICS_WATCH_TABLE : BOOKMARKS_TABLE;
|
||||
$start = request_var('start', 0);
|
||||
|
@ -768,6 +768,8 @@ class ucp_main
|
|||
}
|
||||
}
|
||||
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
|
||||
foreach ($topic_list as $topic_id)
|
||||
{
|
||||
$row = &$rowset[$topic_id];
|
||||
|
@ -778,7 +780,7 @@ class ucp_main
|
|||
$unread_topic = (isset($topic_tracking_info[$topic_id]) && $row['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false;
|
||||
|
||||
// Replies
|
||||
$replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies'];
|
||||
$replies = $phpbb_content_visibility->get_count('topic_posts', $row, $forum_id) - 1;
|
||||
|
||||
if ($row['topic_status'] == ITEM_MOVED && !empty($row['topic_moved_id']))
|
||||
{
|
||||
|
|
|
@ -497,8 +497,9 @@ if (!$get_info)
|
|||
array('topic_title', 'topics.topic_title', 'phpbb_set_encoding'),
|
||||
array('topic_time', 'topics.topic_time', ''),
|
||||
array('topic_views', 'topics.topic_views', ''),
|
||||
array('topic_replies', 'topics.topic_replies', ''),
|
||||
array('topic_replies_real', 'topics.topic_replies', ''),
|
||||
array('topic_posts_approved', 'topics.topic_replies + 1', ''),
|
||||
array('topic_posts_unapproved', 0, ''),
|
||||
array('topic_posts_softdeleted',0, ''),
|
||||
array('topic_last_post_id', 'topics.topic_last_post_id', ''),
|
||||
array('topic_status', 'topics.topic_status', 'is_topic_locked'),
|
||||
array('topic_moved_id', 0, ''),
|
||||
|
@ -530,8 +531,9 @@ if (!$get_info)
|
|||
array('topic_title', 'topics.topic_title', 'phpbb_set_encoding'),
|
||||
array('topic_time', 'topics.topic_time', ''),
|
||||
array('topic_views', 'topics.topic_views', ''),
|
||||
array('topic_replies', 'topics.topic_replies', ''),
|
||||
array('topic_replies_real', 'topics.topic_replies', ''),
|
||||
array('topic_posts_approved', 'topics.topic_replies + 1', ''),
|
||||
array('topic_posts_unapproved', 0, ''),
|
||||
array('topic_posts_softdeleted',0, ''),
|
||||
array('topic_last_post_id', 'topics.topic_last_post_id', ''),
|
||||
array('topic_status', ITEM_MOVED, ''),
|
||||
array('topic_moved_id', 'topics.topic_moved_id', ''),
|
||||
|
|
|
@ -243,9 +243,12 @@ function phpbb_insert_forums()
|
|||
'forum_rules_options' => 7,
|
||||
'forum_rules_uid' => '',
|
||||
'forum_topics_per_page' => 0,
|
||||
'forum_posts' => 0,
|
||||
'forum_topics' => 0,
|
||||
'forum_topics_real' => 0,
|
||||
'forum_posts_approved' => 0,
|
||||
'forum_posts_unapproved' => 0,
|
||||
'forum_posts_softdeleted' => 0,
|
||||
'forum_topics_approved' => 0,
|
||||
'forum_topics_unapproved' => 0,
|
||||
'forum_topics_softdeleted' => 0,
|
||||
'forum_last_post_id' => 0,
|
||||
'forum_last_poster_id' => 0,
|
||||
'forum_last_post_subject' => '',
|
||||
|
|
|
@ -102,7 +102,7 @@ $phpbb_adm_relative_path = (isset($phpbb_adm_relative_path)) ? $phpbb_adm_relati
|
|||
$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $phpbb_adm_relative_path;
|
||||
|
||||
// Include files
|
||||
phpbb_require_updated('includes/class_loader.' . $phpEx);
|
||||
phpbb_require_updated('phpbb/class_loader.' . $phpEx);
|
||||
|
||||
phpbb_require_updated('includes/functions.' . $phpEx);
|
||||
phpbb_require_updated('includes/functions_content.' . $phpEx);
|
||||
|
@ -116,9 +116,9 @@ phpbb_require_updated('includes/utf/utf_tools.' . $phpEx);
|
|||
set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler');
|
||||
|
||||
// Setup class loader first
|
||||
$phpbb_class_loader_new = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}install/update/new/includes/", $phpEx);
|
||||
$phpbb_class_loader_new = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}install/update/new/phpbb/", $phpEx);
|
||||
$phpbb_class_loader_new->register();
|
||||
$phpbb_class_loader = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}includes/", $phpEx);
|
||||
$phpbb_class_loader = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}phpbb/", $phpEx);
|
||||
$phpbb_class_loader->register();
|
||||
|
||||
// Set up container (must be done here because extensions table may not exist)
|
||||
|
@ -242,7 +242,7 @@ $phpbb_extension_manager = $phpbb_container->get('ext.manager');
|
|||
$finder = $phpbb_extension_manager->get_finder();
|
||||
|
||||
$migrations = $finder
|
||||
->core_path('includes/db/migration/data/')
|
||||
->core_path('phpbb/db/migration/data/')
|
||||
->get_classes();
|
||||
$migrator->set_migrations($migrations);
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ $phpbb_adm_relative_path = (isset($phpbb_adm_relative_path)) ? $phpbb_adm_relati
|
|||
$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $phpbb_adm_relative_path;
|
||||
|
||||
// Include essential scripts
|
||||
phpbb_require_updated('includes/class_loader.' . $phpEx);
|
||||
phpbb_require_updated('phpbb/class_loader.' . $phpEx);
|
||||
|
||||
phpbb_require_updated('includes/functions.' . $phpEx);
|
||||
phpbb_require_updated('includes/functions_container.' . $phpEx);
|
||||
|
@ -108,9 +108,9 @@ phpbb_include_updated('includes/utf/utf_tools.' . $phpEx);
|
|||
phpbb_require_updated('includes/functions_install.' . $phpEx);
|
||||
|
||||
// Setup class loader first
|
||||
$phpbb_class_loader_new = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}install/update/new/includes/", $phpEx);
|
||||
$phpbb_class_loader_new = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}install/update/new/phpbb/", $phpEx);
|
||||
$phpbb_class_loader_new->register();
|
||||
$phpbb_class_loader = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}includes/", $phpEx);
|
||||
$phpbb_class_loader = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}phpbb/", $phpEx);
|
||||
$phpbb_class_loader->register();
|
||||
$phpbb_class_loader_ext = new phpbb_class_loader('phpbb_ext_', "{$phpbb_root_path}ext/", $phpEx);
|
||||
$phpbb_class_loader_ext->register();
|
||||
|
@ -246,7 +246,7 @@ $config = new phpbb_config(array(
|
|||
|
||||
$phpbb_style_resource_locator = new phpbb_style_resource_locator();
|
||||
$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());
|
||||
$template = new phpbb_template_twig($phpbb_root_path, $phpEx, $config, $user, 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', $phpbb_admin_path . 'style', array(), '');
|
||||
|
|
|
@ -1464,7 +1464,6 @@ class install_convert extends module
|
|||
$end = ($sync_batch + $batch_size - 1);
|
||||
|
||||
// Sync all topics in batch mode...
|
||||
sync('topic_approved', 'range', 'topic_id BETWEEN ' . $sync_batch . ' AND ' . $end, true, false);
|
||||
sync('topic', 'range', 'topic_id BETWEEN ' . $sync_batch . ' AND ' . $end, true, true);
|
||||
|
||||
$template->assign_block_vars('checks', array(
|
||||
|
|
|
@ -53,7 +53,7 @@ class install_install extends module
|
|||
function main($mode, $sub)
|
||||
{
|
||||
global $lang, $template, $language, $phpbb_root_path, $phpEx;
|
||||
global $phpbb_container, $cache, $phpbb_log;
|
||||
global $phpbb_container, $cache, $phpbb_log, $request;
|
||||
|
||||
switch ($sub)
|
||||
{
|
||||
|
@ -102,6 +102,9 @@ class install_install extends module
|
|||
break;
|
||||
|
||||
case 'final':
|
||||
// Enable super globals to prevent issues with the new phpbb_request object
|
||||
$request->enable_super_globals();
|
||||
|
||||
// Create a normal container now
|
||||
$phpbb_container = phpbb_create_default_container($phpbb_root_path, $phpEx);
|
||||
|
||||
|
@ -1432,7 +1435,7 @@ class install_install extends module
|
|||
$db->sql_return_on_error(true);
|
||||
|
||||
include_once($phpbb_root_path . 'includes/constants.' . $phpEx);
|
||||
include_once($phpbb_root_path . 'includes/search/fulltext_native.' . $phpEx);
|
||||
include_once($phpbb_root_path . 'phpbb/search/fulltext_native.' . $phpEx);
|
||||
|
||||
// We need to fill the config to let internal functions correctly work
|
||||
$config = new phpbb_config_db($db, new phpbb_cache_driver_null, CONFIG_TABLE);
|
||||
|
@ -1885,7 +1888,7 @@ class install_install extends module
|
|||
/**
|
||||
* Populate migrations for the installation
|
||||
*
|
||||
* This "installs" all migrations from (root path)/includes/db/migrations/data.
|
||||
* This "installs" all migrations from (root path)/phpbb/db/migrations/data.
|
||||
* "installs" means it adds all migrations to the migrations table, but does not
|
||||
* perform any of the actions in the migrations.
|
||||
*
|
||||
|
@ -1897,7 +1900,7 @@ class install_install extends module
|
|||
$finder = $extension_manager->get_finder();
|
||||
|
||||
$migrations = $finder
|
||||
->core_path('includes/db/migration/data/')
|
||||
->core_path('phpbb/db/migration/data/')
|
||||
->get_classes();
|
||||
$migrator->populate_migrations($migrations);
|
||||
}
|
||||
|
|
|
@ -372,9 +372,12 @@ CREATE TABLE phpbb_forums (
|
|||
forum_topics_per_page INTEGER DEFAULT 0 NOT NULL,
|
||||
forum_type INTEGER DEFAULT 0 NOT NULL,
|
||||
forum_status INTEGER DEFAULT 0 NOT NULL,
|
||||
forum_posts INTEGER DEFAULT 0 NOT NULL,
|
||||
forum_topics INTEGER DEFAULT 0 NOT NULL,
|
||||
forum_topics_real INTEGER DEFAULT 0 NOT NULL,
|
||||
forum_posts_approved INTEGER DEFAULT 0 NOT NULL,
|
||||
forum_posts_unapproved INTEGER DEFAULT 0 NOT NULL,
|
||||
forum_posts_softdeleted INTEGER DEFAULT 0 NOT NULL,
|
||||
forum_topics_approved INTEGER DEFAULT 0 NOT NULL,
|
||||
forum_topics_unapproved INTEGER DEFAULT 0 NOT NULL,
|
||||
forum_topics_softdeleted INTEGER DEFAULT 0 NOT NULL,
|
||||
forum_last_post_id INTEGER DEFAULT 0 NOT NULL,
|
||||
forum_last_poster_id INTEGER DEFAULT 0 NOT NULL,
|
||||
forum_last_post_subject VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
|
||||
|
@ -722,7 +725,7 @@ CREATE TABLE phpbb_posts (
|
|||
icon_id INTEGER DEFAULT 0 NOT NULL,
|
||||
poster_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
|
||||
post_time INTEGER DEFAULT 0 NOT NULL,
|
||||
post_approved INTEGER DEFAULT 1 NOT NULL,
|
||||
post_visibility INTEGER DEFAULT 0 NOT NULL,
|
||||
post_reported INTEGER DEFAULT 0 NOT NULL,
|
||||
enable_bbcode INTEGER DEFAULT 1 NOT NULL,
|
||||
enable_smilies INTEGER DEFAULT 1 NOT NULL,
|
||||
|
@ -740,7 +743,10 @@ CREATE TABLE phpbb_posts (
|
|||
post_edit_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
|
||||
post_edit_user INTEGER DEFAULT 0 NOT NULL,
|
||||
post_edit_count INTEGER DEFAULT 0 NOT NULL,
|
||||
post_edit_locked INTEGER DEFAULT 0 NOT NULL
|
||||
post_edit_locked INTEGER DEFAULT 0 NOT NULL,
|
||||
post_delete_time INTEGER DEFAULT 0 NOT NULL,
|
||||
post_delete_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
|
||||
post_delete_user INTEGER DEFAULT 0 NOT NULL
|
||||
);;
|
||||
|
||||
ALTER TABLE phpbb_posts ADD PRIMARY KEY (post_id);;
|
||||
|
@ -749,7 +755,7 @@ CREATE INDEX phpbb_posts_forum_id ON phpbb_posts(forum_id);;
|
|||
CREATE INDEX phpbb_posts_topic_id ON phpbb_posts(topic_id);;
|
||||
CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts(poster_ip);;
|
||||
CREATE INDEX phpbb_posts_poster_id ON phpbb_posts(poster_id);;
|
||||
CREATE INDEX phpbb_posts_post_approved ON phpbb_posts(post_approved);;
|
||||
CREATE INDEX phpbb_posts_post_visibility ON phpbb_posts(post_visibility);;
|
||||
CREATE INDEX phpbb_posts_post_username ON phpbb_posts(post_username);;
|
||||
CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts(topic_id, post_time);;
|
||||
|
||||
|
@ -1215,15 +1221,16 @@ CREATE TABLE phpbb_topics (
|
|||
forum_id INTEGER DEFAULT 0 NOT NULL,
|
||||
icon_id INTEGER DEFAULT 0 NOT NULL,
|
||||
topic_attachment INTEGER DEFAULT 0 NOT NULL,
|
||||
topic_approved INTEGER DEFAULT 1 NOT NULL,
|
||||
topic_visibility INTEGER DEFAULT 0 NOT NULL,
|
||||
topic_reported INTEGER DEFAULT 0 NOT NULL,
|
||||
topic_title VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
|
||||
topic_poster INTEGER DEFAULT 0 NOT NULL,
|
||||
topic_time INTEGER DEFAULT 0 NOT NULL,
|
||||
topic_time_limit INTEGER DEFAULT 0 NOT NULL,
|
||||
topic_views INTEGER DEFAULT 0 NOT NULL,
|
||||
topic_replies INTEGER DEFAULT 0 NOT NULL,
|
||||
topic_replies_real INTEGER DEFAULT 0 NOT NULL,
|
||||
topic_posts_approved INTEGER DEFAULT 0 NOT NULL,
|
||||
topic_posts_unapproved INTEGER DEFAULT 0 NOT NULL,
|
||||
topic_posts_softdeleted INTEGER DEFAULT 0 NOT NULL,
|
||||
topic_status INTEGER DEFAULT 0 NOT NULL,
|
||||
topic_type INTEGER DEFAULT 0 NOT NULL,
|
||||
topic_first_post_id INTEGER DEFAULT 0 NOT NULL,
|
||||
|
@ -1244,7 +1251,10 @@ CREATE TABLE phpbb_topics (
|
|||
poll_length INTEGER DEFAULT 0 NOT NULL,
|
||||
poll_max_options INTEGER DEFAULT 1 NOT NULL,
|
||||
poll_last_vote INTEGER DEFAULT 0 NOT NULL,
|
||||
poll_vote_change INTEGER DEFAULT 0 NOT NULL
|
||||
poll_vote_change INTEGER DEFAULT 0 NOT NULL,
|
||||
topic_delete_time INTEGER DEFAULT 0 NOT NULL,
|
||||
topic_delete_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
|
||||
topic_delete_user INTEGER DEFAULT 0 NOT NULL
|
||||
);;
|
||||
|
||||
ALTER TABLE phpbb_topics ADD PRIMARY KEY (topic_id);;
|
||||
|
@ -1252,8 +1262,8 @@ ALTER TABLE phpbb_topics ADD PRIMARY KEY (topic_id);;
|
|||
CREATE INDEX phpbb_topics_forum_id ON phpbb_topics(forum_id);;
|
||||
CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics(forum_id, topic_type);;
|
||||
CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics(topic_last_post_time);;
|
||||
CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics(topic_approved);;
|
||||
CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics(forum_id, topic_approved, topic_last_post_id);;
|
||||
CREATE INDEX phpbb_topics_topic_visibility ON phpbb_topics(topic_visibility);;
|
||||
CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics(forum_id, topic_visibility, topic_last_post_id);;
|
||||
CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics(forum_id, topic_last_post_time, topic_moved_id);;
|
||||
|
||||
CREATE GENERATOR phpbb_topics_gen;;
|
||||
|
|
|
@ -459,9 +459,12 @@ CREATE TABLE [phpbb_forums] (
|
|||
[forum_topics_per_page] [int] DEFAULT (0) NOT NULL ,
|
||||
[forum_type] [int] DEFAULT (0) NOT NULL ,
|
||||
[forum_status] [int] DEFAULT (0) NOT NULL ,
|
||||
[forum_posts] [int] DEFAULT (0) NOT NULL ,
|
||||
[forum_topics] [int] DEFAULT (0) NOT NULL ,
|
||||
[forum_topics_real] [int] DEFAULT (0) NOT NULL ,
|
||||
[forum_posts_approved] [int] DEFAULT (0) NOT NULL ,
|
||||
[forum_posts_unapproved] [int] DEFAULT (0) NOT NULL ,
|
||||
[forum_posts_softdeleted] [int] DEFAULT (0) NOT NULL ,
|
||||
[forum_topics_approved] [int] DEFAULT (0) NOT NULL ,
|
||||
[forum_topics_unapproved] [int] DEFAULT (0) NOT NULL ,
|
||||
[forum_topics_softdeleted] [int] DEFAULT (0) NOT NULL ,
|
||||
[forum_last_post_id] [int] DEFAULT (0) NOT NULL ,
|
||||
[forum_last_poster_id] [int] DEFAULT (0) NOT NULL ,
|
||||
[forum_last_post_subject] [varchar] (255) DEFAULT ('') NOT NULL ,
|
||||
|
@ -889,7 +892,7 @@ CREATE TABLE [phpbb_posts] (
|
|||
[icon_id] [int] DEFAULT (0) NOT NULL ,
|
||||
[poster_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
|
||||
[post_time] [int] DEFAULT (0) NOT NULL ,
|
||||
[post_approved] [int] DEFAULT (1) NOT NULL ,
|
||||
[post_visibility] [int] DEFAULT (0) NOT NULL ,
|
||||
[post_reported] [int] DEFAULT (0) NOT NULL ,
|
||||
[enable_bbcode] [int] DEFAULT (1) NOT NULL ,
|
||||
[enable_smilies] [int] DEFAULT (1) NOT NULL ,
|
||||
|
@ -907,7 +910,10 @@ CREATE TABLE [phpbb_posts] (
|
|||
[post_edit_reason] [varchar] (255) DEFAULT ('') NOT NULL ,
|
||||
[post_edit_user] [int] DEFAULT (0) NOT NULL ,
|
||||
[post_edit_count] [int] DEFAULT (0) NOT NULL ,
|
||||
[post_edit_locked] [int] DEFAULT (0) NOT NULL
|
||||
[post_edit_locked] [int] DEFAULT (0) NOT NULL ,
|
||||
[post_delete_time] [int] DEFAULT (0) NOT NULL ,
|
||||
[post_delete_reason] [varchar] (255) DEFAULT ('') NOT NULL ,
|
||||
[post_delete_user] [int] DEFAULT (0) NOT NULL
|
||||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||||
GO
|
||||
|
||||
|
@ -930,7 +936,7 @@ GO
|
|||
CREATE INDEX [poster_id] ON [phpbb_posts]([poster_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [post_approved] ON [phpbb_posts]([post_approved]) ON [PRIMARY]
|
||||
CREATE INDEX [post_visibility] ON [phpbb_posts]([post_visibility]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [post_username] ON [phpbb_posts]([post_username]) ON [PRIMARY]
|
||||
|
@ -1463,15 +1469,16 @@ CREATE TABLE [phpbb_topics] (
|
|||
[forum_id] [int] DEFAULT (0) NOT NULL ,
|
||||
[icon_id] [int] DEFAULT (0) NOT NULL ,
|
||||
[topic_attachment] [int] DEFAULT (0) NOT NULL ,
|
||||
[topic_approved] [int] DEFAULT (1) NOT NULL ,
|
||||
[topic_visibility] [int] DEFAULT (0) NOT NULL ,
|
||||
[topic_reported] [int] DEFAULT (0) NOT NULL ,
|
||||
[topic_title] [varchar] (255) DEFAULT ('') NOT NULL ,
|
||||
[topic_poster] [int] DEFAULT (0) NOT NULL ,
|
||||
[topic_time] [int] DEFAULT (0) NOT NULL ,
|
||||
[topic_time_limit] [int] DEFAULT (0) NOT NULL ,
|
||||
[topic_views] [int] DEFAULT (0) NOT NULL ,
|
||||
[topic_replies] [int] DEFAULT (0) NOT NULL ,
|
||||
[topic_replies_real] [int] DEFAULT (0) NOT NULL ,
|
||||
[topic_posts_approved] [int] DEFAULT (0) NOT NULL ,
|
||||
[topic_posts_unapproved] [int] DEFAULT (0) NOT NULL ,
|
||||
[topic_posts_softdeleted] [int] DEFAULT (0) NOT NULL ,
|
||||
[topic_status] [int] DEFAULT (0) NOT NULL ,
|
||||
[topic_type] [int] DEFAULT (0) NOT NULL ,
|
||||
[topic_first_post_id] [int] DEFAULT (0) NOT NULL ,
|
||||
|
@ -1492,7 +1499,10 @@ CREATE TABLE [phpbb_topics] (
|
|||
[poll_length] [int] DEFAULT (0) NOT NULL ,
|
||||
[poll_max_options] [int] DEFAULT (1) NOT NULL ,
|
||||
[poll_last_vote] [int] DEFAULT (0) NOT NULL ,
|
||||
[poll_vote_change] [int] DEFAULT (0) NOT NULL
|
||||
[poll_vote_change] [int] DEFAULT (0) NOT NULL ,
|
||||
[topic_delete_time] [int] DEFAULT (0) NOT NULL ,
|
||||
[topic_delete_reason] [varchar] (255) DEFAULT ('') NOT NULL ,
|
||||
[topic_delete_user] [int] DEFAULT (0) NOT NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
|
@ -1512,10 +1522,10 @@ GO
|
|||
CREATE INDEX [last_post_time] ON [phpbb_topics]([topic_last_post_time]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [topic_approved] ON [phpbb_topics]([topic_approved]) ON [PRIMARY]
|
||||
CREATE INDEX [topic_visibility] ON [phpbb_topics]([topic_visibility]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [forum_appr_last] ON [phpbb_topics]([forum_id], [topic_approved], [topic_last_post_id]) ON [PRIMARY]
|
||||
CREATE INDEX [forum_appr_last] ON [phpbb_topics]([forum_id], [topic_visibility], [topic_last_post_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [fid_time_moved] ON [phpbb_topics]([forum_id], [topic_last_post_time], [topic_moved_id]) ON [PRIMARY]
|
||||
|
|
|
@ -257,9 +257,12 @@ CREATE TABLE phpbb_forums (
|
|||
forum_topics_per_page tinyint(4) DEFAULT '0' NOT NULL,
|
||||
forum_type tinyint(4) DEFAULT '0' NOT NULL,
|
||||
forum_status tinyint(4) DEFAULT '0' NOT NULL,
|
||||
forum_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
forum_topics mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
forum_topics_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
forum_posts_approved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
forum_posts_unapproved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
forum_posts_softdeleted mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
forum_topics_approved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
forum_topics_unapproved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
forum_topics_softdeleted mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
forum_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
forum_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
forum_last_post_subject blob NOT NULL,
|
||||
|
@ -508,7 +511,7 @@ CREATE TABLE phpbb_posts (
|
|||
icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
poster_ip varbinary(40) DEFAULT '' NOT NULL,
|
||||
post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
post_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
|
||||
post_visibility tinyint(3) DEFAULT '0' NOT NULL,
|
||||
post_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
|
||||
enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
|
||||
|
@ -527,12 +530,15 @@ CREATE TABLE phpbb_posts (
|
|||
post_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
post_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
post_edit_locked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
post_delete_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
post_delete_reason blob NOT NULL,
|
||||
post_delete_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
PRIMARY KEY (post_id),
|
||||
KEY forum_id (forum_id),
|
||||
KEY topic_id (topic_id),
|
||||
KEY poster_ip (poster_ip),
|
||||
KEY poster_id (poster_id),
|
||||
KEY post_approved (post_approved),
|
||||
KEY post_visibility (post_visibility),
|
||||
KEY post_username (post_username(255)),
|
||||
KEY tid_post_time (topic_id, post_time)
|
||||
);
|
||||
|
@ -839,15 +845,16 @@ CREATE TABLE phpbb_topics (
|
|||
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
|
||||
topic_visibility tinyint(3) DEFAULT '0' NOT NULL,
|
||||
topic_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_title blob NOT NULL,
|
||||
topic_poster mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_time_limit int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_views mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_replies mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_replies_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_posts_approved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_posts_unapproved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_posts_softdeleted mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_status tinyint(3) DEFAULT '0' NOT NULL,
|
||||
topic_type tinyint(3) DEFAULT '0' NOT NULL,
|
||||
topic_first_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
|
@ -869,12 +876,15 @@ CREATE TABLE phpbb_topics (
|
|||
poll_max_options tinyint(4) DEFAULT '1' NOT NULL,
|
||||
poll_last_vote int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
poll_vote_change tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_delete_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_delete_reason blob NOT NULL,
|
||||
topic_delete_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
PRIMARY KEY (topic_id),
|
||||
KEY forum_id (forum_id),
|
||||
KEY forum_id_type (forum_id, topic_type),
|
||||
KEY last_post_time (topic_last_post_time),
|
||||
KEY topic_approved (topic_approved),
|
||||
KEY forum_appr_last (forum_id, topic_approved, topic_last_post_id),
|
||||
KEY topic_visibility (topic_visibility),
|
||||
KEY forum_appr_last (forum_id, topic_visibility, topic_last_post_id),
|
||||
KEY fid_time_moved (forum_id, topic_last_post_time, topic_moved_id)
|
||||
);
|
||||
|
||||
|
|
|
@ -257,9 +257,12 @@ CREATE TABLE phpbb_forums (
|
|||
forum_topics_per_page tinyint(4) DEFAULT '0' NOT NULL,
|
||||
forum_type tinyint(4) DEFAULT '0' NOT NULL,
|
||||
forum_status tinyint(4) DEFAULT '0' NOT NULL,
|
||||
forum_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
forum_topics mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
forum_topics_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
forum_posts_approved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
forum_posts_unapproved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
forum_posts_softdeleted mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
forum_topics_approved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
forum_topics_unapproved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
forum_topics_softdeleted mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
forum_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
forum_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
forum_last_post_subject varchar(255) DEFAULT '' NOT NULL,
|
||||
|
@ -508,7 +511,7 @@ CREATE TABLE phpbb_posts (
|
|||
icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
poster_ip varchar(40) DEFAULT '' NOT NULL,
|
||||
post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
post_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
|
||||
post_visibility tinyint(3) DEFAULT '0' NOT NULL,
|
||||
post_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
|
||||
enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
|
||||
|
@ -527,12 +530,15 @@ CREATE TABLE phpbb_posts (
|
|||
post_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
post_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
post_edit_locked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
post_delete_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
post_delete_reason varchar(255) DEFAULT '' NOT NULL,
|
||||
post_delete_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
PRIMARY KEY (post_id),
|
||||
KEY forum_id (forum_id),
|
||||
KEY topic_id (topic_id),
|
||||
KEY poster_ip (poster_ip),
|
||||
KEY poster_id (poster_id),
|
||||
KEY post_approved (post_approved),
|
||||
KEY post_visibility (post_visibility),
|
||||
KEY post_username (post_username),
|
||||
KEY tid_post_time (topic_id, post_time)
|
||||
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
|
||||
|
@ -839,15 +845,16 @@ CREATE TABLE phpbb_topics (
|
|||
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
|
||||
topic_visibility tinyint(3) DEFAULT '0' NOT NULL,
|
||||
topic_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_title varchar(255) DEFAULT '' NOT NULL COLLATE utf8_unicode_ci,
|
||||
topic_poster mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_time_limit int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_views mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_replies mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_replies_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_posts_approved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_posts_unapproved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_posts_softdeleted mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_status tinyint(3) DEFAULT '0' NOT NULL,
|
||||
topic_type tinyint(3) DEFAULT '0' NOT NULL,
|
||||
topic_first_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
|
@ -869,12 +876,15 @@ CREATE TABLE phpbb_topics (
|
|||
poll_max_options tinyint(4) DEFAULT '1' NOT NULL,
|
||||
poll_last_vote int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
poll_vote_change tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_delete_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_delete_reason varchar(255) DEFAULT '' NOT NULL,
|
||||
topic_delete_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
PRIMARY KEY (topic_id),
|
||||
KEY forum_id (forum_id),
|
||||
KEY forum_id_type (forum_id, topic_type),
|
||||
KEY last_post_time (topic_last_post_time),
|
||||
KEY topic_approved (topic_approved),
|
||||
KEY forum_appr_last (forum_id, topic_approved, topic_last_post_id),
|
||||
KEY topic_visibility (topic_visibility),
|
||||
KEY forum_appr_last (forum_id, topic_visibility, topic_last_post_id),
|
||||
KEY fid_time_moved (forum_id, topic_last_post_time, topic_moved_id)
|
||||
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
|
||||
|
||||
|
|
|
@ -520,9 +520,12 @@ CREATE TABLE phpbb_forums (
|
|||
forum_topics_per_page number(4) DEFAULT '0' NOT NULL,
|
||||
forum_type number(4) DEFAULT '0' NOT NULL,
|
||||
forum_status number(4) DEFAULT '0' NOT NULL,
|
||||
forum_posts number(8) DEFAULT '0' NOT NULL,
|
||||
forum_topics number(8) DEFAULT '0' NOT NULL,
|
||||
forum_topics_real number(8) DEFAULT '0' NOT NULL,
|
||||
forum_posts_approved number(8) DEFAULT '0' NOT NULL,
|
||||
forum_posts_unapproved number(8) DEFAULT '0' NOT NULL,
|
||||
forum_posts_softdeleted number(8) DEFAULT '0' NOT NULL,
|
||||
forum_topics_approved number(8) DEFAULT '0' NOT NULL,
|
||||
forum_topics_unapproved number(8) DEFAULT '0' NOT NULL,
|
||||
forum_topics_softdeleted number(8) DEFAULT '0' NOT NULL,
|
||||
forum_last_post_id number(8) DEFAULT '0' NOT NULL,
|
||||
forum_last_poster_id number(8) DEFAULT '0' NOT NULL,
|
||||
forum_last_post_subject varchar2(765) DEFAULT '' ,
|
||||
|
@ -977,7 +980,7 @@ CREATE TABLE phpbb_posts (
|
|||
icon_id number(8) DEFAULT '0' NOT NULL,
|
||||
poster_ip varchar2(40) DEFAULT '' ,
|
||||
post_time number(11) DEFAULT '0' NOT NULL,
|
||||
post_approved number(1) DEFAULT '1' NOT NULL,
|
||||
post_visibility number(3) DEFAULT '0' NOT NULL,
|
||||
post_reported number(1) DEFAULT '0' NOT NULL,
|
||||
enable_bbcode number(1) DEFAULT '1' NOT NULL,
|
||||
enable_smilies number(1) DEFAULT '1' NOT NULL,
|
||||
|
@ -996,6 +999,9 @@ CREATE TABLE phpbb_posts (
|
|||
post_edit_user number(8) DEFAULT '0' NOT NULL,
|
||||
post_edit_count number(4) DEFAULT '0' NOT NULL,
|
||||
post_edit_locked number(1) DEFAULT '0' NOT NULL,
|
||||
post_delete_time number(11) DEFAULT '0' NOT NULL,
|
||||
post_delete_reason varchar2(765) DEFAULT '' ,
|
||||
post_delete_user number(8) DEFAULT '0' NOT NULL,
|
||||
CONSTRAINT pk_phpbb_posts PRIMARY KEY (post_id)
|
||||
)
|
||||
/
|
||||
|
@ -1008,7 +1014,7 @@ CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts (poster_ip)
|
|||
/
|
||||
CREATE INDEX phpbb_posts_poster_id ON phpbb_posts (poster_id)
|
||||
/
|
||||
CREATE INDEX phpbb_posts_post_approved ON phpbb_posts (post_approved)
|
||||
CREATE INDEX phpbb_posts_post_visibility ON phpbb_posts (post_visibility)
|
||||
/
|
||||
CREATE INDEX phpbb_posts_post_username ON phpbb_posts (post_username)
|
||||
/
|
||||
|
@ -1607,15 +1613,16 @@ CREATE TABLE phpbb_topics (
|
|||
forum_id number(8) DEFAULT '0' NOT NULL,
|
||||
icon_id number(8) DEFAULT '0' NOT NULL,
|
||||
topic_attachment number(1) DEFAULT '0' NOT NULL,
|
||||
topic_approved number(1) DEFAULT '1' NOT NULL,
|
||||
topic_visibility number(3) DEFAULT '0' NOT NULL,
|
||||
topic_reported number(1) DEFAULT '0' NOT NULL,
|
||||
topic_title varchar2(765) DEFAULT '' ,
|
||||
topic_poster number(8) DEFAULT '0' NOT NULL,
|
||||
topic_time number(11) DEFAULT '0' NOT NULL,
|
||||
topic_time_limit number(11) DEFAULT '0' NOT NULL,
|
||||
topic_views number(8) DEFAULT '0' NOT NULL,
|
||||
topic_replies number(8) DEFAULT '0' NOT NULL,
|
||||
topic_replies_real number(8) DEFAULT '0' NOT NULL,
|
||||
topic_posts_approved number(8) DEFAULT '0' NOT NULL,
|
||||
topic_posts_unapproved number(8) DEFAULT '0' NOT NULL,
|
||||
topic_posts_softdeleted number(8) DEFAULT '0' NOT NULL,
|
||||
topic_status number(3) DEFAULT '0' NOT NULL,
|
||||
topic_type number(3) DEFAULT '0' NOT NULL,
|
||||
topic_first_post_id number(8) DEFAULT '0' NOT NULL,
|
||||
|
@ -1637,6 +1644,9 @@ CREATE TABLE phpbb_topics (
|
|||
poll_max_options number(4) DEFAULT '1' NOT NULL,
|
||||
poll_last_vote number(11) DEFAULT '0' NOT NULL,
|
||||
poll_vote_change number(1) DEFAULT '0' NOT NULL,
|
||||
topic_delete_time number(11) DEFAULT '0' NOT NULL,
|
||||
topic_delete_reason varchar2(765) DEFAULT '' ,
|
||||
topic_delete_user number(8) DEFAULT '0' NOT NULL,
|
||||
CONSTRAINT pk_phpbb_topics PRIMARY KEY (topic_id)
|
||||
)
|
||||
/
|
||||
|
@ -1647,9 +1657,9 @@ CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics (forum_id, topic_type)
|
|||
/
|
||||
CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics (topic_last_post_time)
|
||||
/
|
||||
CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics (topic_approved)
|
||||
CREATE INDEX phpbb_topics_topic_visibility ON phpbb_topics (topic_visibility)
|
||||
/
|
||||
CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_approved, topic_last_post_id)
|
||||
CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_visibility, topic_last_post_id)
|
||||
/
|
||||
CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics (forum_id, topic_last_post_time, topic_moved_id)
|
||||
/
|
||||
|
|
|
@ -395,9 +395,12 @@ CREATE TABLE phpbb_forums (
|
|||
forum_topics_per_page INT2 DEFAULT '0' NOT NULL,
|
||||
forum_type INT2 DEFAULT '0' NOT NULL,
|
||||
forum_status INT2 DEFAULT '0' NOT NULL,
|
||||
forum_posts INT4 DEFAULT '0' NOT NULL CHECK (forum_posts >= 0),
|
||||
forum_topics INT4 DEFAULT '0' NOT NULL CHECK (forum_topics >= 0),
|
||||
forum_topics_real INT4 DEFAULT '0' NOT NULL CHECK (forum_topics_real >= 0),
|
||||
forum_posts_approved INT4 DEFAULT '0' NOT NULL CHECK (forum_posts_approved >= 0),
|
||||
forum_posts_unapproved INT4 DEFAULT '0' NOT NULL CHECK (forum_posts_unapproved >= 0),
|
||||
forum_posts_softdeleted INT4 DEFAULT '0' NOT NULL CHECK (forum_posts_softdeleted >= 0),
|
||||
forum_topics_approved INT4 DEFAULT '0' NOT NULL CHECK (forum_topics_approved >= 0),
|
||||
forum_topics_unapproved INT4 DEFAULT '0' NOT NULL CHECK (forum_topics_unapproved >= 0),
|
||||
forum_topics_softdeleted INT4 DEFAULT '0' NOT NULL CHECK (forum_topics_softdeleted >= 0),
|
||||
forum_last_post_id INT4 DEFAULT '0' NOT NULL CHECK (forum_last_post_id >= 0),
|
||||
forum_last_poster_id INT4 DEFAULT '0' NOT NULL CHECK (forum_last_poster_id >= 0),
|
||||
forum_last_post_subject varchar(255) DEFAULT '' NOT NULL,
|
||||
|
@ -694,7 +697,7 @@ CREATE TABLE phpbb_posts (
|
|||
icon_id INT4 DEFAULT '0' NOT NULL CHECK (icon_id >= 0),
|
||||
poster_ip varchar(40) DEFAULT '' NOT NULL,
|
||||
post_time INT4 DEFAULT '0' NOT NULL CHECK (post_time >= 0),
|
||||
post_approved INT2 DEFAULT '1' NOT NULL CHECK (post_approved >= 0),
|
||||
post_visibility INT2 DEFAULT '0' NOT NULL,
|
||||
post_reported INT2 DEFAULT '0' NOT NULL CHECK (post_reported >= 0),
|
||||
enable_bbcode INT2 DEFAULT '1' NOT NULL CHECK (enable_bbcode >= 0),
|
||||
enable_smilies INT2 DEFAULT '1' NOT NULL CHECK (enable_smilies >= 0),
|
||||
|
@ -713,6 +716,9 @@ CREATE TABLE phpbb_posts (
|
|||
post_edit_user INT4 DEFAULT '0' NOT NULL CHECK (post_edit_user >= 0),
|
||||
post_edit_count INT2 DEFAULT '0' NOT NULL CHECK (post_edit_count >= 0),
|
||||
post_edit_locked INT2 DEFAULT '0' NOT NULL CHECK (post_edit_locked >= 0),
|
||||
post_delete_time INT4 DEFAULT '0' NOT NULL CHECK (post_delete_time >= 0),
|
||||
post_delete_reason varchar(255) DEFAULT '' NOT NULL,
|
||||
post_delete_user INT4 DEFAULT '0' NOT NULL CHECK (post_delete_user >= 0),
|
||||
PRIMARY KEY (post_id)
|
||||
);
|
||||
|
||||
|
@ -720,7 +726,7 @@ CREATE INDEX phpbb_posts_forum_id ON phpbb_posts (forum_id);
|
|||
CREATE INDEX phpbb_posts_topic_id ON phpbb_posts (topic_id);
|
||||
CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts (poster_ip);
|
||||
CREATE INDEX phpbb_posts_poster_id ON phpbb_posts (poster_id);
|
||||
CREATE INDEX phpbb_posts_post_approved ON phpbb_posts (post_approved);
|
||||
CREATE INDEX phpbb_posts_post_visibility ON phpbb_posts (post_visibility);
|
||||
CREATE INDEX phpbb_posts_post_username ON phpbb_posts (post_username);
|
||||
CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts (topic_id, post_time);
|
||||
|
||||
|
@ -1093,15 +1099,16 @@ CREATE TABLE phpbb_topics (
|
|||
forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
|
||||
icon_id INT4 DEFAULT '0' NOT NULL CHECK (icon_id >= 0),
|
||||
topic_attachment INT2 DEFAULT '0' NOT NULL CHECK (topic_attachment >= 0),
|
||||
topic_approved INT2 DEFAULT '1' NOT NULL CHECK (topic_approved >= 0),
|
||||
topic_visibility INT2 DEFAULT '0' NOT NULL,
|
||||
topic_reported INT2 DEFAULT '0' NOT NULL CHECK (topic_reported >= 0),
|
||||
topic_title varchar(255) DEFAULT '' NOT NULL,
|
||||
topic_poster INT4 DEFAULT '0' NOT NULL CHECK (topic_poster >= 0),
|
||||
topic_time INT4 DEFAULT '0' NOT NULL CHECK (topic_time >= 0),
|
||||
topic_time_limit INT4 DEFAULT '0' NOT NULL CHECK (topic_time_limit >= 0),
|
||||
topic_views INT4 DEFAULT '0' NOT NULL CHECK (topic_views >= 0),
|
||||
topic_replies INT4 DEFAULT '0' NOT NULL CHECK (topic_replies >= 0),
|
||||
topic_replies_real INT4 DEFAULT '0' NOT NULL CHECK (topic_replies_real >= 0),
|
||||
topic_posts_approved INT4 DEFAULT '0' NOT NULL CHECK (topic_posts_approved >= 0),
|
||||
topic_posts_unapproved INT4 DEFAULT '0' NOT NULL CHECK (topic_posts_unapproved >= 0),
|
||||
topic_posts_softdeleted INT4 DEFAULT '0' NOT NULL CHECK (topic_posts_softdeleted >= 0),
|
||||
topic_status INT2 DEFAULT '0' NOT NULL,
|
||||
topic_type INT2 DEFAULT '0' NOT NULL,
|
||||
topic_first_post_id INT4 DEFAULT '0' NOT NULL CHECK (topic_first_post_id >= 0),
|
||||
|
@ -1123,14 +1130,17 @@ CREATE TABLE phpbb_topics (
|
|||
poll_max_options INT2 DEFAULT '1' NOT NULL,
|
||||
poll_last_vote INT4 DEFAULT '0' NOT NULL CHECK (poll_last_vote >= 0),
|
||||
poll_vote_change INT2 DEFAULT '0' NOT NULL CHECK (poll_vote_change >= 0),
|
||||
topic_delete_time INT4 DEFAULT '0' NOT NULL CHECK (topic_delete_time >= 0),
|
||||
topic_delete_reason varchar(255) DEFAULT '' NOT NULL,
|
||||
topic_delete_user INT4 DEFAULT '0' NOT NULL CHECK (topic_delete_user >= 0),
|
||||
PRIMARY KEY (topic_id)
|
||||
);
|
||||
|
||||
CREATE INDEX phpbb_topics_forum_id ON phpbb_topics (forum_id);
|
||||
CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics (forum_id, topic_type);
|
||||
CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics (topic_last_post_time);
|
||||
CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics (topic_approved);
|
||||
CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_approved, topic_last_post_id);
|
||||
CREATE INDEX phpbb_topics_topic_visibility ON phpbb_topics (topic_visibility);
|
||||
CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_visibility, topic_last_post_id);
|
||||
CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics (forum_id, topic_last_post_time, topic_moved_id);
|
||||
|
||||
/*
|
||||
|
|
|
@ -39,6 +39,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_pm', '1'
|
|||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_smilies', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_smilies', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_topic_notify', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('assets_version', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('attachment_quota', '52428800');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_bbcode_pm', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_flash_pm', '0');
|
||||
|
@ -320,6 +321,7 @@ INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_subscribe', 1);
|
|||
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_user_lock', 1);
|
||||
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_vote', 1);
|
||||
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_votechg', 1);
|
||||
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_softdelete', 1);
|
||||
|
||||
# -- Moderator related auth options
|
||||
INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_', 1, 1);
|
||||
|
@ -333,6 +335,7 @@ INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_merg
|
|||
INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_move', 1, 1);
|
||||
INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_report', 1, 1);
|
||||
INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_split', 1, 1);
|
||||
INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_softdelete', 1, 1);
|
||||
|
||||
# -- Global moderator auth option (not a local option)
|
||||
INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_ban', 0, 1);
|
||||
|
@ -453,9 +456,9 @@ INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order)
|
|||
INSERT INTO phpbb_styles (style_name, style_copyright, style_active, style_path, bbcode_bitfield, style_parent_id, style_parent_tree) VALUES ('prosilver', '© phpBB Group', 1, 'prosilver', 'kNg=', 0, '');
|
||||
|
||||
# -- Forums
|
||||
INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts, forum_topics, forum_topics_real, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents) VALUES ('{L_FORUMS_FIRST_CATEGORY}', '', 1, 4, 0, 0, 1, 1, 1, 1, 2, 'Admin', 'AA0000', 972086460, '', '', '', '', '', '', '', 0, 0, '');
|
||||
INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts_approved, forum_posts_unapproved, forum_posts_softdeleted, forum_topics_approved, forum_topics_unapproved, forum_topics_softdeleted, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents) VALUES ('{L_FORUMS_FIRST_CATEGORY}', '', 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 'Admin', 'AA0000', 972086460, '', '', '', '', '', '', '', 0, 0, '');
|
||||
|
||||
INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts, forum_topics, forum_topics_real, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_subject, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents, forum_flags) VALUES ('{L_FORUMS_TEST_FORUM_TITLE}', '{L_FORUMS_TEST_FORUM_DESC}', 2, 3, 1, 1, 1, 1, 1, 1, 2, 'Admin', 'AA0000', '{L_TOPICS_TOPIC_TITLE}', 972086460, '', '', '', '', '', '', '', 0, 0, '', 48);
|
||||
INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts_approved, forum_posts_unapproved, forum_posts_softdeleted, forum_topics_approved, forum_topics_unapproved, forum_topics_softdeleted, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_subject, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents, forum_flags) VALUES ('{L_FORUMS_TEST_FORUM_TITLE}', '{L_FORUMS_TEST_FORUM_DESC}', 2, 3, 1, 1, 1, 0, 0, 1, 0, 0, 1, 2, 'Admin', 'AA0000', '{L_TOPICS_TOPIC_TITLE}', 972086460, '', '', '', '', '', '', '', 0, 0, '', 48);
|
||||
|
||||
# -- Users / Anonymous user
|
||||
INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_from, user_icq, user_aim, user_yim, user_msnm, user_jabber, user_website, user_occ, user_interests, user_actkey, user_newpasswd, user_allow_massemail) VALUES (2, 1, 'Anonymous', 'anonymous', 0, '', '', 'en', 1, 0, '', 0, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 0);
|
||||
|
@ -523,7 +526,7 @@ INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT
|
|||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 11, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option NOT IN ('m_ban', 'm_chgposter');
|
||||
|
||||
# Simple Moderator (m_)
|
||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 12, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option IN ('m_', 'm_delete', 'm_edit', 'm_info', 'm_report');
|
||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 12, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option IN ('m_', 'm_delete', 'm_softdelete', 'm_edit', 'm_info', 'm_report');
|
||||
|
||||
# Queue Moderator (m_)
|
||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 13, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option IN ('m_', 'm_approve', 'm_edit');
|
||||
|
@ -621,10 +624,10 @@ INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id,
|
|||
|
||||
|
||||
# -- Demo Topic
|
||||
INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, topic_views, topic_replies, topic_replies_real, forum_id, topic_status, topic_type, topic_first_post_id, topic_first_poster_name, topic_first_poster_colour, topic_last_post_id, topic_last_poster_id, topic_last_poster_name, topic_last_poster_colour, topic_last_post_subject, topic_last_post_time, topic_last_view_time, poll_title) VALUES ('{L_TOPICS_TOPIC_TITLE}', 2, 972086460, 0, 0, 0, 2, 0, 0, 1, 'Admin', 'AA0000', 1, 2, 'Admin', 'AA0000', '{L_TOPICS_TOPIC_TITLE}', 972086460, 972086460, '');
|
||||
INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, topic_views, topic_posts_approved, topic_posts_unapproved, topic_posts_softdeleted, forum_id, topic_status, topic_type, topic_first_post_id, topic_first_poster_name, topic_first_poster_colour, topic_last_post_id, topic_last_poster_id, topic_last_poster_name, topic_last_poster_colour, topic_last_post_subject, topic_last_post_time, topic_last_view_time, poll_title, topic_visibility) VALUES ('{L_TOPICS_TOPIC_TITLE}', 2, 972086460, 0, 1, 0, 0, 2, 0, 0, 1, 'Admin', 'AA0000', 1, 2, 'Admin', 'AA0000', '{L_TOPICS_TOPIC_TITLE}', 972086460, 972086460, '', 1);
|
||||
|
||||
# -- Demo Post
|
||||
INSERT INTO phpbb_posts (topic_id, forum_id, poster_id, icon_id, post_time, post_username, poster_ip, post_subject, post_text, post_checksum, bbcode_uid) VALUES (1, 2, 2, 0, 972086460, '', '127.0.0.1', '{L_TOPICS_TOPIC_TITLE}', '{L_DEFAULT_INSTALL_POST}', '5dd683b17f641daf84c040bfefc58ce9', '');
|
||||
INSERT INTO phpbb_posts (topic_id, forum_id, poster_id, icon_id, post_time, post_username, poster_ip, post_subject, post_text, post_checksum, bbcode_uid, post_visibility) VALUES (1, 2, 2, 0, 972086460, '', '127.0.0.1', '{L_TOPICS_TOPIC_TITLE}', '{L_DEFAULT_INSTALL_POST}', '5dd683b17f641daf84c040bfefc58ce9', '', 1);
|
||||
|
||||
# -- Admin posted to the demo topic
|
||||
INSERT INTO phpbb_topics_posted (user_id, topic_id, topic_posted) VALUES (2, 1, 1);
|
||||
|
|
|
@ -250,9 +250,12 @@ CREATE TABLE phpbb_forums (
|
|||
forum_topics_per_page tinyint(4) NOT NULL DEFAULT '0',
|
||||
forum_type tinyint(4) NOT NULL DEFAULT '0',
|
||||
forum_status tinyint(4) NOT NULL DEFAULT '0',
|
||||
forum_posts INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
forum_topics INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
forum_topics_real INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
forum_posts_approved INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
forum_posts_unapproved INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
forum_posts_softdeleted INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
forum_topics_approved INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
forum_topics_unapproved INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
forum_topics_softdeleted INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
forum_last_post_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
forum_last_poster_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
forum_last_post_subject text(65535) NOT NULL DEFAULT '',
|
||||
|
@ -493,7 +496,7 @@ CREATE TABLE phpbb_posts (
|
|||
icon_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
poster_ip varchar(40) NOT NULL DEFAULT '',
|
||||
post_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
post_approved INTEGER UNSIGNED NOT NULL DEFAULT '1',
|
||||
post_visibility tinyint(3) NOT NULL DEFAULT '0',
|
||||
post_reported INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
enable_bbcode INTEGER UNSIGNED NOT NULL DEFAULT '1',
|
||||
enable_smilies INTEGER UNSIGNED NOT NULL DEFAULT '1',
|
||||
|
@ -511,14 +514,17 @@ CREATE TABLE phpbb_posts (
|
|||
post_edit_reason text(65535) NOT NULL DEFAULT '',
|
||||
post_edit_user INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
post_edit_count INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
post_edit_locked INTEGER UNSIGNED NOT NULL DEFAULT '0'
|
||||
post_edit_locked INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
post_delete_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
post_delete_reason text(65535) NOT NULL DEFAULT '',
|
||||
post_delete_user INTEGER UNSIGNED NOT NULL DEFAULT '0'
|
||||
);
|
||||
|
||||
CREATE INDEX phpbb_posts_forum_id ON phpbb_posts (forum_id);
|
||||
CREATE INDEX phpbb_posts_topic_id ON phpbb_posts (topic_id);
|
||||
CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts (poster_ip);
|
||||
CREATE INDEX phpbb_posts_poster_id ON phpbb_posts (poster_id);
|
||||
CREATE INDEX phpbb_posts_post_approved ON phpbb_posts (post_approved);
|
||||
CREATE INDEX phpbb_posts_post_visibility ON phpbb_posts (post_visibility);
|
||||
CREATE INDEX phpbb_posts_post_username ON phpbb_posts (post_username);
|
||||
CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts (topic_id, post_time);
|
||||
|
||||
|
@ -811,15 +817,16 @@ CREATE TABLE phpbb_topics (
|
|||
forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
icon_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
topic_attachment INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
topic_approved INTEGER UNSIGNED NOT NULL DEFAULT '1',
|
||||
topic_visibility tinyint(3) NOT NULL DEFAULT '0',
|
||||
topic_reported INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
topic_title text(65535) NOT NULL DEFAULT '',
|
||||
topic_poster INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
topic_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
topic_time_limit INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
topic_views INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
topic_replies INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
topic_replies_real INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
topic_posts_approved INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
topic_posts_unapproved INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
topic_posts_softdeleted INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
topic_status tinyint(3) NOT NULL DEFAULT '0',
|
||||
topic_type tinyint(3) NOT NULL DEFAULT '0',
|
||||
topic_first_post_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
|
@ -840,14 +847,17 @@ CREATE TABLE phpbb_topics (
|
|||
poll_length INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
poll_max_options tinyint(4) NOT NULL DEFAULT '1',
|
||||
poll_last_vote INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
poll_vote_change INTEGER UNSIGNED NOT NULL DEFAULT '0'
|
||||
poll_vote_change INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
topic_delete_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
topic_delete_reason text(65535) NOT NULL DEFAULT '',
|
||||
topic_delete_user INTEGER UNSIGNED NOT NULL DEFAULT '0'
|
||||
);
|
||||
|
||||
CREATE INDEX phpbb_topics_forum_id ON phpbb_topics (forum_id);
|
||||
CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics (forum_id, topic_type);
|
||||
CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics (topic_last_post_time);
|
||||
CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics (topic_approved);
|
||||
CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_approved, topic_last_post_id);
|
||||
CREATE INDEX phpbb_topics_topic_visibility ON phpbb_topics (topic_visibility);
|
||||
CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_visibility, topic_last_post_id);
|
||||
CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics (forum_id, topic_last_post_time, topic_moved_id);
|
||||
|
||||
# Table: 'phpbb_topics_track'
|
||||
|
|
|
@ -311,7 +311,7 @@ $lang = array_merge($lang, array(
|
|||
|
||||
// PHP info
|
||||
$lang = array_merge($lang, array(
|
||||
'ACP_PHP_INFO_EXPLAIN' => 'This page lists information on the version of PHP installed on this server. It includes details of loaded modules, available variables and default settings. This information may be useful when diagnosing problems. Please be aware that some hosting companies will limit what information is displayed here for security reasons. You are advised to not give out any details on this page except when asked by <a href="http://www.phpbb.com/about/team/">official team members</a> on the support forums.',
|
||||
'ACP_PHP_INFO_EXPLAIN' => 'This page lists information on the version of PHP installed on this server. It includes details of loaded modules, available variables and default settings. This information may be useful when diagnosing problems. Please be aware that some hosting companies will limit what information is displayed here for security reasons. You are advised to not give out any details on this page except when asked by <a href="https://www.phpbb.com/about/team/">official team members</a> on the support forums.',
|
||||
|
||||
'NO_PHPINFO_AVAILABLE' => 'Information about your PHP configuration is unable to be determined. Phpinfo() has been disabled for security reasons.',
|
||||
));
|
||||
|
@ -559,12 +559,17 @@ $lang = array_merge($lang, array(
|
|||
'LOG_POST_APPROVED' => '<strong>Approved post</strong><br />» %s',
|
||||
'LOG_POST_DISAPPROVED' => '<strong>Disapproved post “%1$s” with the following reason</strong><br />» %2$s',
|
||||
'LOG_POST_EDITED' => '<strong>Edited post “%1$s” written by</strong><br />» %2$s',
|
||||
'LOG_POST_RESTORED' => '<strong>Restored post</strong><br />» %s',
|
||||
'LOG_REPORT_CLOSED' => '<strong>Closed report</strong><br />» %s',
|
||||
'LOG_REPORT_DELETED' => '<strong>Deleted report</strong><br />» %s',
|
||||
'LOG_RESTORE_TOPIC' => '<strong>Restored topic “%1$s” written by</strong><br />» %2$s',
|
||||
'LOG_SOFTDELETE_POST' => '<strong>Soft deleted post “%1$s” written by</strong><br />» %2$s',
|
||||
'LOG_SOFTDELETE_TOPIC' => '<strong>Soft deleted topic “%1$s” written by</strong><br />» %2$s',
|
||||
'LOG_SPLIT_DESTINATION' => '<strong>Moved split posts</strong><br />» to %s',
|
||||
'LOG_SPLIT_SOURCE' => '<strong>Split posts</strong><br />» from %s',
|
||||
|
||||
'LOG_TOPIC_APPROVED' => '<strong>Approved topic</strong><br />» %s',
|
||||
'LOG_TOPIC_RESTORED' => '<strong>Restored topic</strong><br />» %s',
|
||||
'LOG_TOPIC_DISAPPROVED' => '<strong>Disapproved topic “%1$s” with the following reason</strong><br />%2$s',
|
||||
'LOG_TOPIC_RESYNC' => '<strong>Resynchronised topic counters</strong><br />» %s',
|
||||
'LOG_TOPIC_TYPE_CHANGED' => '<strong>Changed topic type</strong><br />» %s',
|
||||
|
@ -601,7 +606,7 @@ $lang = array_merge($lang, array(
|
|||
'LOG_FORUM_MOVE_UP' => '<strong>Moved forum</strong> %1$s <strong>above</strong> %2$s',
|
||||
'LOG_FORUM_SYNC' => '<strong>Re-synchronised forum</strong><br />» %s',
|
||||
|
||||
'LOG_GENERAL_ERROR' => '<strong>A general error occured</strong>: %1$s <br />» %2$s',
|
||||
'LOG_GENERAL_ERROR' => '<strong>A general error occurred</strong>: %1$s <br />» %2$s',
|
||||
|
||||
'LOG_GROUP_CREATED' => '<strong>New usergroup created</strong><br />» %s',
|
||||
'LOG_GROUP_DEFAULTS' => '<strong>Group “%1$s” made default for members</strong><br />» %2$s',
|
||||
|
|
|
@ -52,7 +52,7 @@ $lang = array_merge($lang, array(
|
|||
|
||||
<br />
|
||||
|
||||
<p>For further information on setting up and managing permissions on your phpBB3 board, please see <a href="http://www.phpbb.com/support/documentation/3.0/quickstart/quick_permissions.html">Chapter 1.5 of our Quick Start Guide</a>.</p>
|
||||
<p>For further information on setting up and managing permissions on your phpBB3 board, please see <a href="https://www.phpbb.com/support/documentation/3.0/quickstart/quick_permissions.html">Chapter 1.5 of our Quick Start Guide</a>.</p>
|
||||
',
|
||||
|
||||
'ACL_NEVER' => 'Never',
|
||||
|
|
|
@ -152,7 +152,8 @@ $lang = array_merge($lang, array(
|
|||
'acl_f_announce' => array('lang' => 'Can post announcements', 'cat' => 'post'),
|
||||
'acl_f_reply' => array('lang' => 'Can reply to topics', 'cat' => 'post'),
|
||||
'acl_f_edit' => array('lang' => 'Can edit own posts', 'cat' => 'post'),
|
||||
'acl_f_delete' => array('lang' => 'Can delete own posts', 'cat' => 'post'),
|
||||
'acl_f_delete' => array('lang' => 'Can permanently delete own posts', 'cat' => 'post'),
|
||||
'acl_f_softdelete' => array('lang' => 'Can soft delete own posts<br /><em>Moderators, who have the approve posts permission, can restore soft deleted posts.</em>', 'cat' => 'post'),
|
||||
'acl_f_ignoreflood' => array('lang' => 'Can ignore flood limit', 'cat' => 'post'),
|
||||
'acl_f_postcount' => array('lang' => 'Increment post counter<br /><em>Please note that this setting only affects new posts.</em>', 'cat' => 'post'),
|
||||
'acl_f_noapprove' => array('lang' => 'Can post without approval', 'cat' => 'post'),
|
||||
|
@ -173,8 +174,9 @@ $lang = array_merge($lang, array(
|
|||
// Moderator Permissions
|
||||
$lang = array_merge($lang, array(
|
||||
'acl_m_edit' => array('lang' => 'Can edit posts', 'cat' => 'post_actions'),
|
||||
'acl_m_delete' => array('lang' => 'Can delete posts', 'cat' => 'post_actions'),
|
||||
'acl_m_approve' => array('lang' => 'Can approve posts', 'cat' => 'post_actions'),
|
||||
'acl_m_delete' => array('lang' => 'Can permanently delete posts', 'cat' => 'post_actions'),
|
||||
'acl_m_softdelete' => array('lang' => 'Can soft delete posts<br /><em>Moderators, who have the approve posts permission, can restore soft deleted posts.</em>', 'cat' => 'post_actions'),
|
||||
'acl_m_approve' => array('lang' => 'Can approve and restore posts', 'cat' => 'post_actions'),
|
||||
'acl_m_report' => array('lang' => 'Can close and delete reports', 'cat' => 'post_actions'),
|
||||
'acl_m_chgposter' => array('lang' => 'Can change post author', 'cat' => 'post_actions'),
|
||||
|
||||
|
|
|
@ -83,7 +83,8 @@ $lang = array_merge($lang, array(
|
|||
'NUMBER' => 'Any series of digits',
|
||||
'EMAIL' => 'A valid email address',
|
||||
'URL' => 'A valid URL using any protocol (http, ftp, etc… cannot be used for javascript exploits). If none is given, “http://” is prefixed to the string.',
|
||||
'LOCAL_URL' => 'A local URL. The URL must be relative to the topic page and cannot contain a server name or protocol.',
|
||||
'LOCAL_URL' => 'A local URL. The URL must be relative to the topic page and cannot contain a server name or protocol, as links are prefixed with “%s”',
|
||||
'RELATIVE_URL' => 'A relative URL. You can use this to match parts of a URL, but be careful: a full URL is a valid relative URL. When you want to use relative URLs of your board, use the LOCAL_URL token.',
|
||||
'COLOR' => 'A HTML colour, can be either in the numeric form <samp>#FF1234</samp> or a <a href="http://www.w3.org/TR/CSS21/syndata.html#value-def-color">CSS colour keyword</a> such as <samp>fuchsia</samp> or <samp>InactiveBorder</samp>'
|
||||
)
|
||||
));
|
||||
|
|
|
@ -204,8 +204,8 @@ $lang = array_merge($lang, array(
|
|||
'ERR_TEMPLATE_EVENT_LOCATION' => 'The specified template event location <em>[%s]</em> is improperly formatted.',
|
||||
'ERR_TEMPLATE_COMPILATION' => 'The file could not be compiled: %s',
|
||||
'ERR_UNABLE_TO_LOGIN' => 'The specified username or password is incorrect.',
|
||||
'ERR_UNWATCHING' => 'An error occured while trying to unsubscribe.',
|
||||
'ERR_WATCHING' => 'An error occured while trying to subscribe.',
|
||||
'ERR_UNWATCHING' => 'An error occurred while trying to unsubscribe.',
|
||||
'ERR_WATCHING' => 'An error occurred while trying to subscribe.',
|
||||
'ERR_WRONG_PATH_TO_PHPBB' => 'The phpBB path specified appears to be invalid.',
|
||||
'ERROR' => 'Error',
|
||||
'EXPAND_VIEW' => 'Expand view',
|
||||
|
@ -338,7 +338,7 @@ $lang = array_merge($lang, array(
|
|||
'LAST_VISIT' => 'Last visit',
|
||||
'LDAP_NO_LDAP_EXTENSION' => 'LDAP extension not available.',
|
||||
'LDAP_NO_SERVER_CONNECTION' => 'Could not connect to LDAP server.',
|
||||
'LDAP_SEARCH_FAILED' => 'An error occured while searching the LDAP directory.',
|
||||
'LDAP_SEARCH_FAILED' => 'An error occurred while searching the LDAP directory.',
|
||||
'LEGEND' => 'Legend',
|
||||
'LOADING' => 'Loading',
|
||||
'LOCATION' => 'Location',
|
||||
|
@ -519,8 +519,12 @@ $lang = array_merge($lang, array(
|
|||
'POSTS' => 'Posts',
|
||||
'POSTS_UNAPPROVED' => 'At least one post in this topic has not been approved.',
|
||||
'POST_BY_AUTHOR' => 'by',
|
||||
'POST_BY_FOE' => 'This post was made by <strong>%1$s</strong> who is currently on your ignore list. %2$sDisplay this post%3$s.',
|
||||
'POST_BY_FOE' => '<strong>%1$s</strong>, who is currently on your ignore list, made this post.',
|
||||
'POST_DISPLAY' => '%1$sDisplay this post%2$s.',
|
||||
'POST_DAY' => '%.2f posts per day',
|
||||
'POST_DELETED' => 'Deleted post:',
|
||||
'POST_DELETED_BY' => '<strong>%2$s</strong> deleted the post by <strong>%1$s</strong> on %3$s.',
|
||||
'POST_DELETED_BY_REASON'=> '<strong>%2$s</strong> deleted the post by <strong>%1$s</strong> on %3$s for the following reason: %4$s',
|
||||
'POST_DETAILS' => 'Post details',
|
||||
'POST_NEW_TOPIC' => 'Post new topic',
|
||||
'POST_PCT' => '%.2f%% of all posts',
|
||||
|
|
|
@ -328,7 +328,7 @@ $help = array(
|
|||
),
|
||||
array(
|
||||
0 => 'Who wrote this bulletin board?',
|
||||
1 => 'This software (in its unmodified form) is produced, released and is copyright <a href="http://www.phpbb.com/">phpBB Group</a>. It is made available under the GNU General Public License and may be freely distributed. See the link for more details.'
|
||||
1 => 'This software (in its unmodified form) is produced, released and is copyright <a href="https://www.phpbb.com/">phpBB Group</a>. It is made available under the GNU General Public License and may be freely distributed. See the link for more details.'
|
||||
),
|
||||
array(
|
||||
0 => 'Why isn’t X feature available?',
|
||||
|
|
|
@ -78,7 +78,7 @@ $lang = array_merge($lang, array(
|
|||
'CONTINUE_OLD_CONVERSION' => 'Continue previously started conversion',
|
||||
'CONVERT' => 'Convert',
|
||||
'CONVERT_COMPLETE' => 'Conversion completed',
|
||||
'CONVERT_COMPLETE_EXPLAIN' => 'You have now successfully converted your board to phpBB 3.1. You can now login and <a href="../">access your board</a>. Please ensure that the settings were transferred correctly before enabling your board by deleting the install directory. Remember that help on using phpBB is available online via the <a href="http://www.phpbb.com/support/documentation/3.0/">Documentation</a> and the <a href="http://www.phpbb.com/community/viewforum.php?f=46">support forums</a>.',
|
||||
'CONVERT_COMPLETE_EXPLAIN' => 'You have now successfully converted your board to phpBB 3.1. You can now login and <a href="../">access your board</a>. Please ensure that the settings were transferred correctly before enabling your board by deleting the install directory. Remember that help on using phpBB is available online via the <a href="https://www.phpbb.com/support/documentation/3.0/">Documentation</a> and the <a href="https://www.phpbb.com/community/viewforum.php?f=46">support forums</a>.',
|
||||
'CONVERT_INTRO' => 'Welcome to the phpBB Unified Convertor Framework',
|
||||
'CONVERT_INTRO_BODY' => 'From here, you are able to import data from other (installed) board systems. The list below shows all the conversion modules currently available. If there is no convertor shown in this list for the board software you wish to convert from, please check our website where further conversion modules may be available for download.',
|
||||
'CONVERT_NEW_CONVERSION' => 'New conversion',
|
||||
|
@ -192,7 +192,7 @@ $lang = array_merge($lang, array(
|
|||
<h2>Convert an existing board to phpBB3</h2>
|
||||
<p>The phpBB Unified Convertor Framework supports the conversion of phpBB 2.0.x and other board systems to phpBB3. If you have an existing board that you wish to convert, please <a href="%2$s">proceed to the convertor</a>.</p>
|
||||
<h2>Go live with your phpBB3!</h2>
|
||||
<p>Clicking the button below will take you to a form for submitting statistical data to phpBB in your Administration Control Panel (ACP). We would appreciate it if you could help us by sending that information. Afterwards you should take some time to examine the options available to you. Remember that help is available online via the <a href="http://www.phpbb.com/support/documentation/3.0/">Documentation</a>, <a href="%3$s">README</a> and the <a href="http://www.phpbb.com/community/viewforum.php?f=46">Support Forums</a>.</p><p><strong>Please delete, move or rename the install directory before using your board. While this directory exists, only the Administration Control Panel (ACP) will be accessible.</strong>',
|
||||
<p>Clicking the button below will take you to a form for submitting statistical data to phpBB in your Administration Control Panel (ACP). We would appreciate it if you could help us by sending that information. Afterwards you should take some time to examine the options available to you. Remember that help is available online via the <a href="https://www.phpbb.com/support/documentation/3.0/">Documentation</a>, <a href="%3$s">README</a> and the <a href="https://www.phpbb.com/community/viewforum.php?f=46">Support Forums</a>.</p><p><strong>Please delete, move or rename the install directory before using your board. While this directory exists, only the Administration Control Panel (ACP) will be accessible.</strong>',
|
||||
'INSTALL_INTRO' => 'Welcome to Installation',
|
||||
|
||||
'INSTALL_INTRO_BODY' => 'With this option, it is possible to install phpBB3 onto your server.</p><p>In order to proceed, you will need your database settings. If you do not know your database settings, please contact your host and ask for them. You will not be able to continue without them. You need:</p>
|
||||
|
@ -275,7 +275,7 @@ $lang = array_merge($lang, array(
|
|||
'MAKE_FOLDER_WRITABLE' => 'Please make sure that this folder exists and is writable by the webserver then try again:<br />»<strong>%s</strong>.',
|
||||
'MAKE_FOLDERS_WRITABLE' => 'Please make sure that these folders exist and are writable by the webserver then try again:<br />»<strong>%s</strong>.',
|
||||
|
||||
'MYSQL_SCHEMA_UPDATE_REQUIRED' => 'Your MySQL database schema for phpBB is outdated. phpBB detected a schema for MySQL 3.x/4.x, but the server runs on MySQL %2$s.<br /><strong>Before you proceed the update, you need to upgrade the schema.</strong><br /><br />Please refer to the <a href="http://www.phpbb.com/kb/article/doesnt-have-a-default-value-errors/">Knowledge Base article about upgrading the MySQL schema</a>. If you encounter problems, please use <a href="http://www.phpbb.com/community/viewforum.php?f=46">our support forums</a>.',
|
||||
'MYSQL_SCHEMA_UPDATE_REQUIRED' => 'Your MySQL database schema for phpBB is outdated. phpBB detected a schema for MySQL 3.x/4.x, but the server runs on MySQL %2$s.<br /><strong>Before you proceed the update, you need to upgrade the schema.</strong><br /><br />Please refer to the <a href="https://www.phpbb.com/kb/article/doesnt-have-a-default-value-errors/">Knowledge Base article about upgrading the MySQL schema</a>. If you encounter problems, please use <a href="https://www.phpbb.com/community/viewforum.php?f=46">our support forums</a>.',
|
||||
|
||||
'NAMING_CONFLICT' => 'Naming conflict: %s and %s are both aliases<br /><br />%s',
|
||||
'NEXT_STEP' => 'Proceed to next step',
|
||||
|
@ -286,7 +286,7 @@ $lang = array_merge($lang, array(
|
|||
'NO_LOCATION' => 'Cannot determine location. If you know Imagemagick is installed, you may specify the location later within your administration control panel',
|
||||
'NO_TABLES_FOUND' => 'No tables found.',
|
||||
|
||||
'OVERVIEW_BODY' => 'Welcome to phpBB3!<br /><br />phpBB™ is the most widely used open source bulletin board solution in the world. phpBB3 is the latest installment in a package line started in 2000. Like its predecessors, phpBB3 is feature-rich, user-friendly, and fully supported by the phpBB Team. phpBB3 greatly improves on what made phpBB2 popular, and adds commonly requested features that were not present in previous versions. We hope it exceeds your expectations.<br /><br />This installation system will guide you through installing phpBB3, updating to the latest version of phpBB3 from past releases, as well as converting to phpBB3 from a different discussion board system (including phpBB2). For more information, we encourage you to read <a href="../docs/INSTALL.html">the installation guide</a>.<br /><br />To read the phpBB3 license or learn about obtaining support and our stance on it, please select the respective options from the side menu. To continue, please select the appropriate tab above.',
|
||||
'OVERVIEW_BODY' => 'Welcome to phpBB3!<br /><br />phpBB® is the most widely used open source bulletin board solution in the world. phpBB3 is the latest installment in a package line started in 2000. Like its predecessors, phpBB3 is feature-rich, user-friendly, and fully supported by the phpBB Team. phpBB3 greatly improves on what made phpBB2 popular, and adds commonly requested features that were not present in previous versions. We hope it exceeds your expectations.<br /><br />This installation system will guide you through installing phpBB3, updating to the latest version of phpBB3 from past releases, as well as converting to phpBB3 from a different discussion board system (including phpBB2). For more information, we encourage you to read <a href="../docs/INSTALL.html">the installation guide</a>.<br /><br />To read the phpBB3 license or learn about obtaining support and our stance on it, please select the respective options from the side menu. To continue, please select the appropriate tab above.',
|
||||
|
||||
'PCRE_UTF_SUPPORT' => 'PCRE UTF-8 support',
|
||||
'PCRE_UTF_SUPPORT_EXPLAIN' => 'phpBB will <strong>not</strong> run if your PHP installation is not compiled with UTF-8 support in the PCRE extension.',
|
||||
|
@ -346,7 +346,7 @@ $lang = array_merge($lang, array(
|
|||
'SUB_LICENSE' => 'License',
|
||||
'SUB_SUPPORT' => 'Support',
|
||||
'SUCCESSFUL_CONNECT' => 'Successful connection',
|
||||
'SUPPORT_BODY' => 'Full support will be provided for the current stable release of phpBB3, free of charge. This includes:</p><ul><li>installation</li><li>configuration</li><li>technical questions</li><li>problems relating to potential bugs in the software</li><li>updating from Release Candidate (RC) versions to the latest stable version</li><li>converting from phpBB 2.0.x to phpBB3</li><li>converting from other discussion board software to phpBB3 (please see the <a href="http://www.phpbb.com/community/viewforum.php?f=65">Convertors Forum</a>)</li></ul><p>We encourage users still running beta versions of phpBB3 to replace their installation with a fresh copy of the latest version.</p><h2>MODs / Styles</h2><p>For issues relating to MODs, please post in the appropriate <a href="http://www.phpbb.com/community/viewforum.php?f=81">Modifications Forum</a>.<br />For issues relating to styles, templates and themes, please post in the appropriate <a href="http://www.phpbb.com/community/viewforum.php?f=80">Styles Forum</a>.<br /><br />If your question relates to a specific package, please post directly in the topic dedicated to the package.</p><h2>Obtaining Support</h2><p><a href="http://www.phpbb.com/community/viewtopic.php?f=14&t=571070">The phpBB Welcome Package</a><br /><a href="http://www.phpbb.com/support/">Support Section</a><br /><a href="http://www.phpbb.com/support/documentation/3.0/quickstart/">Quick Start Guide</a><br /><br />To ensure you stay up to date with the latest news and releases, why not <a href="http://www.phpbb.com/support/">subscribe to our mailing list</a>?<br /><br />',
|
||||
'SUPPORT_BODY' => 'Full support will be provided for the current stable release of phpBB3, free of charge. This includes:</p><ul><li>installation</li><li>configuration</li><li>technical questions</li><li>problems relating to potential bugs in the software</li><li>updating from Release Candidate (RC) versions to the latest stable version</li><li>converting from phpBB 2.0.x to phpBB3</li><li>converting from other discussion board software to phpBB3 (please see the <a href="https://www.phpbb.com/community/viewforum.php?f=65">Convertors Forum</a>)</li></ul><p>We encourage users still running beta versions of phpBB3 to replace their installation with a fresh copy of the latest version.</p><h2>MODs / Styles</h2><p>For issues relating to MODs, please post in the appropriate <a href="https://www.phpbb.com/community/viewforum.php?f=81">Modifications Forum</a>.<br />For issues relating to styles, templates and themes, please post in the appropriate <a href="https://www.phpbb.com/community/viewforum.php?f=80">Styles Forum</a>.<br /><br />If your question relates to a specific package, please post directly in the topic dedicated to the package.</p><h2>Obtaining Support</h2><p><a href="https://www.phpbb.com/community/viewtopic.php?f=14&t=571070">The phpBB Welcome Package</a><br /><a href="https://www.phpbb.com/support/">Support Section</a><br /><a href="https://www.phpbb.com/support/documentation/3.0/quickstart/">Quick Start Guide</a><br /><br />To ensure you stay up to date with the latest news and releases, why not <a href="https://www.phpbb.com/support/">subscribe to our mailing list</a>?<br /><br />',
|
||||
'SYNC_FORUMS' => 'Starting to synchronise forums',
|
||||
'SYNC_POST_COUNT' => 'Synchronising post_counts',
|
||||
'SYNC_POST_COUNT_ID' => 'Synchronising post_counts from <var>entry</var> %1$s to %2$s.',
|
||||
|
@ -364,7 +364,7 @@ $lang = array_merge($lang, array(
|
|||
'UNAVAILABLE' => 'Unavailable',
|
||||
'UNWRITABLE' => 'Unwritable',
|
||||
'UPDATE_TOPICS_POSTED' => 'Generating topics posted information',
|
||||
'UPDATE_TOPICS_POSTED_ERR' => 'An error occured while generating topics posted information. You can retry this step in the ACP after the conversion process is completed.',
|
||||
'UPDATE_TOPICS_POSTED_ERR' => 'An error occurred while generating topics posted information. You can retry this step in the ACP after the conversion process is completed.',
|
||||
'VERIFY_OPTIONS' => 'Verifying conversion options',
|
||||
'VERSION' => 'Version',
|
||||
|
||||
|
@ -472,7 +472,7 @@ $lang = array_merge($lang, array(
|
|||
'NO_ERRORS' => 'No errors',
|
||||
'NO_UPDATE_FILES' => 'Not updating the following files',
|
||||
'NO_UPDATE_FILES_EXPLAIN' => 'The following files are new or modified but the directory they normally reside in could not be found on your installation. If this list contains files to other directories than language/ or styles/ than you may have modified your directory structure and the update may be incomplete.',
|
||||
'NO_UPDATE_FILES_OUTDATED' => 'No valid update directory was found, please make sure you uploaded the relevant files.<br /><br />Your installation does <strong>not</strong> seem to be up to date. Updates are available for your version of phpBB %1$s, please visit <a href="http://www.phpbb.com/downloads/" rel="external">http://www.phpbb.com/downloads/</a> to obtain the correct package to update from Version %2$s to Version %3$s.',
|
||||
'NO_UPDATE_FILES_OUTDATED' => 'No valid update directory was found, please make sure you uploaded the relevant files.<br /><br />Your installation does <strong>not</strong> seem to be up to date. Updates are available for your version of phpBB %1$s, please visit <a href="https://www.phpbb.com/downloads/" rel="external">https://www.phpbb.com/downloads/</a> to obtain the correct package to update from Version %2$s to Version %3$s.',
|
||||
'NO_UPDATE_FILES_UP_TO_DATE' => 'Your version is up to date. There is no need to run the update tool. If you want to make an integrity check on your files make sure you uploaded the correct update files.',
|
||||
'NO_UPDATE_INFO' => 'Update file information could not be found.',
|
||||
'NO_UPDATES_REQUIRED' => 'No updates required',
|
||||
|
@ -540,7 +540,7 @@ $lang = array_merge($lang, array(
|
|||
<p>The recommended way of updating your installation listed here is only valid for the automatic update package. You are also able to update your installation using the methods listed within the INSTALL.html document. The steps for updating phpBB3 automatically are:</p>
|
||||
|
||||
<ul style="margin-left: 20px; font-size: 1.1em;">
|
||||
<li>Go to the <a href="http://www.phpbb.com/downloads/" title="http://www.phpbb.com/downloads/">phpBB.com downloads page</a> and download the "Automatic Update Package" archive.<br /><br /></li>
|
||||
<li>Go to the <a href="https://www.phpbb.com/downloads/" title="https://www.phpbb.com/downloads/">phpBB.com downloads page</a> and download the "Automatic Update Package" archive.<br /><br /></li>
|
||||
<li>Unpack the archive.<br /><br /></li>
|
||||
<li>Upload the complete uncompressed install folder to your phpBB root directory (where your config.php file is).<br /><br /></li>
|
||||
</ul>
|
||||
|
|
|
@ -52,6 +52,10 @@ $lang = array_merge($lang, array(
|
|||
'APPROVE_POST_CONFIRM' => 'Are you sure you want to approve this post?',
|
||||
'APPROVE_POSTS' => 'Approve posts',
|
||||
'APPROVE_POSTS_CONFIRM' => 'Are you sure you want to approve the selected posts?',
|
||||
'APPROVE_TOPIC' => 'Approve topic',
|
||||
'APPROVE_TOPIC_CONFIRM' => 'Are you sure you want to approve this topic?',
|
||||
'APPROVE_TOPICS' => 'Approve topics',
|
||||
'APPROVE_TOPICS_CONFIRM'=> 'Are you sure you want to approve the selected topics?',
|
||||
|
||||
'CANNOT_MOVE_SAME_FORUM'=> 'You cannot move a topic to the forum it’s already in.',
|
||||
'CANNOT_WARN_ANONYMOUS' => 'You cannot warn unregistered guest users.',
|
||||
|
@ -72,16 +76,12 @@ $lang = array_merge($lang, array(
|
|||
'DELETE_PM_REPORTS' => 'Delete PM reports',
|
||||
'DELETE_PM_REPORTS_CONFIRM' => 'Are you sure you want to delete the selected PM reports?',
|
||||
'DELETE_POSTS' => 'Delete posts',
|
||||
'DELETE_POSTS_CONFIRM' => 'Are you sure you want to delete these posts?',
|
||||
'DELETE_POST_CONFIRM' => 'Are you sure you want to delete this post?',
|
||||
'DELETE_REPORT' => 'Delete report',
|
||||
'DELETE_REPORT_CONFIRM' => 'Are you sure you want to delete the selected report?',
|
||||
'DELETE_REPORTS' => 'Delete reports',
|
||||
'DELETE_REPORTS_CONFIRM' => 'Are you sure you want to delete the selected reports?',
|
||||
'DELETE_SHADOW_TOPIC' => 'Delete shadow topic',
|
||||
'DELETE_TOPICS' => 'Delete selected topics',
|
||||
'DELETE_TOPICS_CONFIRM' => 'Are you sure you want to delete these topics?',
|
||||
'DELETE_TOPIC_CONFIRM' => 'Are you sure you want to delete this topic?',
|
||||
'DISAPPROVE' => 'Disapprove',
|
||||
'DISAPPROVE_REASON' => 'Reason for disapproval',
|
||||
'DISAPPROVE_POST' => 'Disapprove post',
|
||||
|
@ -201,6 +201,10 @@ $lang = array_merge($lang, array(
|
|||
'MCP_QUEUE_UNAPPROVED_POSTS_EXPLAIN' => 'This is a list of all posts which require approving before they will be visible to users.',
|
||||
'MCP_QUEUE_UNAPPROVED_TOPICS' => 'Topics awaiting approval',
|
||||
'MCP_QUEUE_UNAPPROVED_TOPICS_EXPLAIN' => 'This is a list of all topics which require approving before they will be visible to users.',
|
||||
'MCP_QUEUE_DELETED_POSTS' => 'Deleted posts',
|
||||
'MCP_QUEUE_DELETED_POSTS_EXPLAIN' => 'This is a list of all soft deleted posts. You can restore or permanently delete the posts from this screen.',
|
||||
'MCP_QUEUE_DELETED_TOPICS' => 'Deleted topics',
|
||||
'MCP_QUEUE_DELETED_TOPICS_EXPLAIN' => 'This is a list of all soft deleted topics. You can restore or permanently delete the topics from this screen.',
|
||||
|
||||
'MCP_VIEW_USER' => 'View warnings for a specific user',
|
||||
|
||||
|
@ -238,6 +242,7 @@ $lang = array_merge($lang, array(
|
|||
'NO_POST' => 'You have to select a post in order to warn the user for a post.',
|
||||
'NO_POST_REPORT' => 'This post was not reported.',
|
||||
'NO_POST_SELECTED' => 'You must select at least one post to perform this action.',
|
||||
'NO_POSTS_DELETED' => 'There are no deleted posts.',
|
||||
'NO_POSTS_QUEUE' => 'There are no posts waiting for approval.',
|
||||
'NO_REASON_DISAPPROVAL' => 'Please give an appropriate reason for disapproval.',
|
||||
'NO_REPORT' => 'No report found',
|
||||
|
@ -245,6 +250,7 @@ $lang = array_merge($lang, array(
|
|||
'NO_REPORT_SELECTED' => 'You must select at least one report to perform this action.',
|
||||
'NO_TOPIC_ICON' => 'None',
|
||||
'NO_TOPIC_SELECTED' => 'You must select at least one topic to perform this action.',
|
||||
'NO_TOPICS_DELETED' => 'There are no deleted topics.',
|
||||
'NO_TOPICS_QUEUE' => 'There are no topics waiting for approval.',
|
||||
|
||||
'ONLY_TOPIC' => 'Only topic “%s”',
|
||||
|
@ -269,15 +275,17 @@ $lang = array_merge($lang, array(
|
|||
'POSTS_DISAPPROVED_SUCCESS' => 'The selected posts have been disapproved.',
|
||||
'POSTS_LOCKED_SUCCESS' => 'The selected posts have been locked successfully.',
|
||||
'POSTS_MERGED_SUCCESS' => 'The selected posts have been merged.',
|
||||
'POSTS_UNLOCKED_SUCCESS' => 'The selected posts have been unlocked successfully.',
|
||||
'POSTS_PER_PAGE' => 'Posts per page',
|
||||
'POSTS_PER_PAGE_EXPLAIN' => '(Set to 0 to view all posts.)',
|
||||
'POSTS_RESTORED_SUCCESS' => 'The selected posts have been restored successfully.',
|
||||
'POSTS_UNLOCKED_SUCCESS' => 'The selected posts have been unlocked successfully.',
|
||||
'POST_APPROVED_SUCCESS' => 'The selected post has been approved.',
|
||||
'POST_DELETED_SUCCESS' => 'The selected post has been successfully removed from the database.',
|
||||
'POST_DISAPPROVED_SUCCESS' => 'The selected post has been disapproved.',
|
||||
'POST_LOCKED_SUCCESS' => 'Post locked successfully.',
|
||||
'POST_NOT_EXIST' => 'The post you requested does not exist.',
|
||||
'POST_REPORTED_SUCCESS' => 'This post has been successfully reported.',
|
||||
'POST_RESTORED_SUCCESS' => 'This post has been restored successfully.',
|
||||
'POST_UNLOCKED_SUCCESS' => 'Post unlocked successfully.',
|
||||
|
||||
'READ_USERNOTES' => 'User notes',
|
||||
|
@ -304,6 +312,15 @@ $lang = array_merge($lang, array(
|
|||
'REPORT_POST_EXPLAIN' => 'Use this form to report the selected post to the forum moderators and board administrators. Reporting should generally be used only if the post breaks forum rules.',
|
||||
'REPORT_REASON' => 'Report reason',
|
||||
'REPORT_TIME' => 'Report time',
|
||||
'RESTORE' => 'Restore',
|
||||
'RESTORE_POST' => 'Restore post',
|
||||
'RESTORE_POST_CONFIRM' => 'Are you sure you want to restore this post?',
|
||||
'RESTORE_POSTS' => 'Restore posts',
|
||||
'RESTORE_POSTS_CONFIRM' => 'Are you sure you want to restore the selected posts?',
|
||||
'RESTORE_TOPIC' => 'Restore topic',
|
||||
'RESTORE_TOPIC_CONFIRM' => 'Are you sure you want to restore this topic?',
|
||||
'RESTORE_TOPICS' => 'Restore topics',
|
||||
'RESTORE_TOPICS_CONFIRM' => 'Are you sure you want to restore the selected topics?',
|
||||
'RESYNC' => 'Resync',
|
||||
'RETURN_MESSAGE' => '%sReturn to the message%s',
|
||||
'RETURN_NEW_FORUM' => '%sGo to the new forum%s',
|
||||
|
@ -344,6 +361,7 @@ $lang = array_merge($lang, array(
|
|||
'TOPICS_FORKED_SUCCESS' => 'The selected topics have been copied successfully.',
|
||||
'TOPICS_LOCKED_SUCCESS' => 'The selected topics have been locked.',
|
||||
'TOPICS_MOVED_SUCCESS' => 'The selected topics have been moved successfully.',
|
||||
'TOPICS_RESTORED_SUCCESS' => 'The selected topics have been restored successfully.',
|
||||
'TOPICS_RESYNC_SUCCESS' => 'The selected topics have been resynchronised.',
|
||||
'TOPICS_TYPE_CHANGED' => 'Topic types changed successfully.',
|
||||
'TOPICS_UNLOCKED_SUCCESS' => 'The selected topics have been unlocked.',
|
||||
|
@ -354,6 +372,7 @@ $lang = array_merge($lang, array(
|
|||
'TOPIC_LOCKED_SUCCESS' => 'The selected topic has been locked.',
|
||||
'TOPIC_MOVED_SUCCESS' => 'The selected topic has been moved successfully.',
|
||||
'TOPIC_NOT_EXIST' => 'The topic you selected does not exist.',
|
||||
'TOPIC_RESTORED_SUCCESS' => 'The selected topic has been restored successfully.',
|
||||
'TOPIC_RESYNC_SUCCESS' => 'The selected topic has been resynchronised.',
|
||||
'TOPIC_SPLIT_SUCCESS' => 'The selected topic has been split successfully.',
|
||||
'TOPIC_TIME' => 'Topic time',
|
||||
|
|
|
@ -45,7 +45,7 @@ $lang = array_merge($lang, array(
|
|||
'MIGRATION_NOT_FULFILLABLE' => 'The migration "%1$s" is not fulfillable, missing migration "%2$s".',
|
||||
'MIGRATION_SCHEMA_DONE' => 'Installed Schema: %s',
|
||||
|
||||
'MODULE_ERROR' => 'An error occured while creating a module: %s',
|
||||
'MODULE_ERROR' => 'An error occurred while creating a module: %s',
|
||||
'MODULE_INFO_FILE_NOT_EXIST' => 'A required module info file is missing: %2$s',
|
||||
'MODULE_NOT_EXIST' => 'A required module does not exist: %s',
|
||||
|
||||
|
|
|
@ -77,8 +77,20 @@ $lang = array_merge($lang, array(
|
|||
'DELETE_MESSAGE' => 'Delete message',
|
||||
'DELETE_MESSAGE_CONFIRM' => 'Are you sure you want to delete this message?',
|
||||
'DELETE_OWN_POSTS' => 'Sorry but you can only delete your own posts.',
|
||||
'DELETE_PERMANENTLY' => 'Delete permanently',
|
||||
'DELETE_POST_CONFIRM' => 'Are you sure you want to delete this post?',
|
||||
'DELETE_POST_WARN' => 'Once deleted the post cannot be recovered',
|
||||
'DELETE_POST_PERMANENTLY_CONFIRM' => 'Are you sure you want to <strong>permanently</strong> delete this post?',
|
||||
'DELETE_POST_PERMANENTLY' => 'Permanently delete this post so it can not be recovered',
|
||||
'DELETE_POSTS_CONFIRM' => 'Are you sure you want to delete these posts?',
|
||||
'DELETE_POSTS_PERMANENTLY_CONFIRM' => 'Are you sure you want to <strong>permanently</strong> delete these posts?',
|
||||
'DELETE_REASON' => 'Soft delete reason',
|
||||
'DELETE_REASON_EXPLAIN' => 'The specified reason for deletion will be visible to moderators.',
|
||||
'DELETE_POST_WARN' => 'Deleted this post',
|
||||
'DELETE_TOPIC_CONFIRM' => 'Are you sure you want to delete this topic?',
|
||||
'DELETE_TOPIC_PERMANENTLY' => 'Permanently delete this topic so it can not be recovered',
|
||||
'DELETE_TOPIC_PERMANENTLY_CONFIRM' => 'Are you sure you want to <strong>permanently</strong> delete this topic?',
|
||||
'DELETE_TOPICS_CONFIRM' => 'Are you sure you want to delete these topics?',
|
||||
'DELETE_TOPICS_PERMANENTLY_CONFIRM' => 'Are you sure you want to <strong>permanently</strong> delete these topics?',
|
||||
'DISABLE_BBCODE' => 'Disable BBCode',
|
||||
'DISABLE_MAGIC_URL' => 'Do not automatically parse URLs',
|
||||
'DISABLE_SMILIES' => 'Disable smilies',
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue