Merge branch 'develop' into ticket/10380

* develop: (325 commits)
  [ticket/10641] Update MCP template with new plurality forms
  [ticket/10637] Leftovers from implementation of extensions in convertor
  [ticket/10637] Leftovers from implementation of extensions in develop tools
  [ticket/10637] Leftovers from implementation of extensions in mcp_post
  [ticket/10637] Leftovers from implementation of extensions in mcp_main
  [ticket/10637] Leftovers from implementation of extensions
  [ticket/10606] Also correctly use $s_search_hidden_fields in view(forum|topic).
  [ticket/10606] Fix incorrect hidden fields array name in page_header().
  [ticket/10633] Stop leaking filename of attachments when thumbnail is requested
  [ticket/10636] Resolve variable name ($sql_ary) conflict in cache_moderators().
  [ticket/10634] Specify module type when viewing profile
  [ticket/10634] Changing p_master::is_full_class
  [ticket/10569] Invalid string comparison in prosilver
  [ticket/10495] Update request/type_cast_helper for PHP 5.4 magic_quotes_gpc drop
  [ticket/10512] Call startup.php from tests/bootstrap.php
  [ticket/10535] Delete no longer needed email confirm language entries.
  [ticket/9914] Add backup warning to updater.
  [ticket/10616] Add template inheritance to exported template
  [ticket/10616] Ignore template inheritance that points to self
  [ticket/10616] Add template inheritance to default styles
  ...
This commit is contained in:
Igor Wiedler 2012-02-17 13:48:48 +01:00
commit d70c3f1eb8
488 changed files with 6196 additions and 2904 deletions

View file

@ -2,9 +2,9 @@
<project name="phpBB" description="The phpBB forum software" default="all" basedir="../">
<!-- a few settings for the build -->
<property name="newversion" value="3.0.9" />
<property name="prevversion" value="3.0.8" />
<property name="olderversions" value="3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.0.7-PL1, 3.0.9-RC1, 3.0.9-RC2, 3.0.9-RC3, 3.0.9-RC4" />
<property name="newversion" value="3.0.10" />
<property name="prevversion" value="3.0.9" />
<property name="olderversions" value="3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.0.7-PL1, 3.0.8, 3.0.10-RC1, 3.0.10-RC2, 3.0.10-RC3" />
<!-- no configuration should be needed beyond this point -->
<property name="oldversions" value="${olderversions}, ${prevversion}" />
@ -119,6 +119,7 @@
<target name="create-package" depends="prepare-new-version,old-version-diffs">
<exec dir="build" command="php -f package.php '${versions}' > logs/package.log" escape="false" />
<exec dir="build" command="php -f build_diff.php '${prevversion}' '${newversion}' > logs/build_diff.log" escape="false" />
<exec dir="build" escape="false"
command="diff -crNEBwd old_versions/release-${prevversion}/language new_version/phpBB3/language >
save/save_${prevversion}_to_${newversion}/language/phpbb-${prevversion}_to_${newversion}_language.patch" />
@ -128,6 +129,19 @@
<exec dir="build" escape="false"
command="diff -crNEBwd old_versions/release-${prevversion}/styles/subsilver2 new_version/phpBB3/styles/subsilver2 >
save/save_${prevversion}_to_${newversion}/subsilver2/phpbb-${prevversion}_to_${newversion}_subsilver2.patch" />
<exec dir="build" escape="false"
command="git shortlog --summary --numbered release-${prevversion}...HEAD >
save/save_${prevversion}_to_${newversion}/phpbb-${prevversion}_to_${newversion}_git_shortlog.txt" />
<exec dir="build" escape="false"
command="git diff --stat release-${prevversion}...HEAD >
save/save_${prevversion}_to_${newversion}/phpbb-${prevversion}_to_${newversion}_git_diffstat.txt" />
</target>
<target name="changelog" depends="prepare">
<exec dir="build" escape="false"
command="php -f build_changelog.php '${newversion}' >
save/changelog_${newversion}.html" />
</target>
<!--

53
build/build_changelog.php Executable file
View file

@ -0,0 +1,53 @@
#!/usr/bin/env php
<?php
/**
*
* @package build
* @copyright (c) 2011 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
if ($_SERVER['argc'] != 2)
{
echo "Please specify the new version as argument (e.g. build_changelog.php '1.0.2').\n";
exit(1);
}
$fixVersion = $_SERVER['argv'][1];
$query = 'project = PHPBB3
AND resolution = Fixed
AND fixVersion = "' . $fixVersion . '"
AND status IN ("Unverified Fix", Closed)';
$url = 'http://tracker.phpbb.com/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=' . urlencode($query) . '&tempMax=1000';
$xml = simplexml_load_string(file_get_contents($url));
foreach ($xml->xpath('//item') as $item)
{
$key = (string) $item->key;
$keyUrl = 'http://tracker.phpbb.com/browse/' . $key;
$keyLink = '<a href="' . $keyUrl . '">' . $key . '</a>';
$value = str_replace($key, $keyLink, htmlspecialchars($item->title));
$value = str_replace(']', '] -', $value);
$types[(string) $item->type][$key] = $value;
}
ksort($types);
foreach ($types as $type => $tickets)
{
echo "<h4>$type</h4>\n";
echo "<ul>\n";
uksort($tickets, 'strnatcasecmp');
foreach ($tickets as $ticket)
{
echo "<li>$ticket</li>\n";
}
echo "</ul>\n";
}

View file

@ -3,9 +3,8 @@
/**
*
* @package build
* @version $Id$
* @copyright (c) 2010 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@ -388,7 +387,7 @@ function build_header($mode, $filenames, $header)
$html .= "## {$filename['phpbb_filename']}\n";
}
}
$html .= "## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 \n";
$html .= "## License: http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 \n";
$html .= "############################################################## \n";
$html .= "\n";

View file

@ -2,9 +2,8 @@
/**
*
* @package build
* @version $Id$
* @copyright (c) 2010 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,10 +2,9 @@
/**
*
* @package build
* @version $Id$
* @copyright (c) 2000 Geoffrey T. Dairiki <dairiki@dairiki.org>
* @copyright (c) 2010 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -3,9 +3,8 @@
/**
*
* @package build
* @version $Id$
* @copyright (c) 2010 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -4,7 +4,7 @@
* @package code_sniffer
* @version $Id: $
* @copyright (c) 2007 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -4,7 +4,7 @@
* @package code_sniffer
* @version $Id: $
* @copyright (c) 2007 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -4,7 +4,7 @@
* @package code_sniffer
* @version $Id: $
* @copyright (c) 2007 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -11,16 +11,16 @@
#
# ln -s ../../git-tools/hooks/commit-msg \\
# .git/hooks/commit-msg
#
# Warning/error messages use color by default if the output is a terminal
# ("output" here is normally standard error when you run git commit).
# To force or disable the use of color:
#
# git config phpbb.hooks.commit-msg.color true (force color output)
# git config phpbb.hooks.commit-msg.color false (disable color output)
config_ns="phpbb.hooks.commit-msg";
if [ "$(git config --bool $config_ns.fatal)" = "false" ]
then
fatal=0;
else
fatal=1;
fi
debug_level=$(git config --int $config_ns.debug || echo 0);
# Error codes
@ -47,11 +47,55 @@ debug()
quit()
{
if [ $1 -gt 0 ] && [ $1 -ne $ERR_UNKNOWN ] && [ $fatal -eq 0 ]
# Now we always exit with success, since git will trash
# entered commit message if commit-msg hook exits with a failure.
exit 0
}
use_color()
{
if [ -z "$use_color_cached" ]
then
exit 0;
case $(git config --bool $config_ns.color)
in
false)
use_color_cached=1
;;
true)
use_color_cached=0
;;
*)
# tty detection in shell:
# http://hwi.ath.cx/jsh/list/shext/isatty.sh.html
tty 0>/dev/stdout >/dev/null 2>&1
use_color_cached=$?
;;
esac
fi
# return value is the flag inverted -
# if return value is 0, this means use color
return $use_color_cached
}
complain()
{
if use_color
then
# Careful: our argument may include arguments to echo like -n
# ANSI color codes:
# http://pueblo.sourceforge.net/doc/manual/ansi_color_codes.html
printf "\033[31m\033[1m"
if [ "$1" = "-n" ]
then
echo "$@"
printf "\033[0m"
else
# This will print one trailing space.
# Not sure how to avoid this at the moment.
echo "$@" $(printf "\033[0m")
fi
else
exit $1;
echo "$@"
fi
}
@ -70,9 +114,9 @@ msg=$(grep -v '^#' "$1" |grep -nE '.{81,}')
if [ $? -eq 0 ]
then
echo "The following lines are greater than 80 characters long:" >&2;
echo >&2
echo "$msg" >&2;
complain "The following lines are greater than 80 characters long:" >&2;
complain >&2
complain "$msg" >&2;
quit $ERR_LENGTH;
fi
@ -126,9 +170,9 @@ do
# Don't be too strict.
# Commits may be temporary, intended to be squashed later.
# Just issue a warning here.
echo "Warning: heading should be a sentence beginning with a capital letter." 1>&2
echo "You entered:" 1>&2
echo "$line" 1>&2
complain "Warning: heading should be a sentence beginning with a capital letter." 1>&2
complain "You entered:" 1>&2
complain "$line" 1>&2
fi
# restore exit code
(exit $result)
@ -160,7 +204,7 @@ do
echo "$line" | grep -Eq "^#";
;;
*)
echo "Unrecognised token $expect" >&2;
complain "Unrecognised token $expect" >&2;
quit $err;
;;
esac
@ -231,7 +275,7 @@ do
expecting="eof";
;;
*)
echo "Unrecognised token $expect" >&2;
complain "Unrecognised token $expect" >&2;
quit 254;
;;
esac
@ -245,11 +289,11 @@ do
else
# None of the expected line formats matched
# Guess we'll call it a day here then
echo "Syntax error on line $i:" >&2;
echo ">> $line" >&2;
echo -n "Expecting: " >&2;
echo "$expecting" | sed 's/ /, /g' >&2;
exit $err;
complain "Syntax error on line $i:" >&2;
complain ">> $line" >&2;
complain -n "Expecting: " >&2;
complain "$expecting" | sed 's/ /, /g' >&2;
quit $err;
fi
i=$(( $i + 1 ));
@ -258,7 +302,7 @@ done
# If EOF is expected exit cleanly
echo "$expecting" | grep -q "eof" || (
# Unexpected EOF, error
echo "Unexpected EOF encountered" >&2;
complain "Unexpected EOF encountered" >&2;
quit $ERR_EOF;
) && (
# Do post scan checks
@ -269,8 +313,8 @@ echo "$expecting" | grep -q "eof" || (
if [ ! -z "$dupes" ]
then
echo "The following tickets are repeated:" >&2;
echo "$dupes" | sed 's/ /\n/g;s/^/* /g' >&2;
complain "The following tickets are repeated:" >&2;
complain "$dupes" | sed 's/ /\n/g;s/^/* /g' >&2;
quit $ERR_FOOTER;
fi
fi
@ -278,8 +322,8 @@ echo "$expecting" | grep -q "eof" || (
if [ $ticket -gt 0 ]
then
echo "$tickets" | grep -Eq "\bPHPBB3-$ticket\b" || (
echo "Ticket ID [$ticket] of branch missing from list of tickets:" >&2;
echo "$tickets" | sed 's/ /\n/g;s/^/* /g' >&2;
complain "Ticket ID [$ticket] of branch missing from list of tickets:" >&2;
complain "$tickets" | sed 's/ /\n/g;s/^/* /g' >&2;
quit $ERR_FOOTER;
) || exit $?;
fi

View file

@ -4,7 +4,7 @@
*
* @package phpBB3
* @copyright (c) 2011 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -4,7 +4,7 @@
*
* @package phpBB3
* @copyright (c) 2011 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@ -52,6 +51,7 @@ $module_id = request_var('i', '');
$mode = request_var('mode', '');
// Set custom template for admin area
$template->set_ext_dir_prefix('adm/');
$template->set_custom_template($phpbb_admin_path . 'style', 'admin');
$template->assign_var('T_ASSETS_PATH', $phpbb_root_path . 'assets');
$template->assign_var('T_TEMPLATE_PATH', $phpbb_admin_path . 'style');

View file

@ -82,10 +82,11 @@
<fieldset>
<legend>{L_TEAMPAGE_SETTINGS}</legend>
<dl>
<dt><label for="teampage_multiple">{L_TEAMPAGE_MULTIPLE}:</label><br /><span>{L_TEAMPAGE_MULTIPLE_EXPLAIN}</span></dt>
<dt><label for="teampage_multiple">{L_TEAMPAGE_MEMBERSHIPS}:</label></dt>
<dd>
<label><input type="radio" name="teampage_multiple" class="radio" value="1"<!-- IF DISPLAY_MULTIPLE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" name="teampage_multiple" class="radio" value="0"<!-- IF not DISPLAY_MULTIPLE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
<label><input type="radio" name="teampage_memberships" class="radio" value="0"<!-- IF DISPLAY_MEMBERSHIPS == 0 --> checked="checked"<!-- ENDIF --> /> {L_TEAMPAGE_DISP_FIRST}</label><br />
<label><input type="radio" name="teampage_memberships" class="radio" value="1"<!-- IF DISPLAY_MEMBERSHIPS == 1 --> checked="checked"<!-- ENDIF --> /> {L_TEAMPAGE_DISP_DEFAULT}</label><br />
<label><input type="radio" name="teampage_memberships" class="radio" value="2"<!-- IF DISPLAY_MEMBERSHIPS == 2 --> checked="checked"<!-- ENDIF --> /> {L_TEAMPAGE_DISP_ALL}</label>
</dd>
</dl>
<dl>

View file

@ -74,7 +74,7 @@
<fieldset class="tabulated">
<legend>{L_TITLE}</legend>
<table cellspacing="1">
<table cellspacing="1" id="smilies">
<thead>
<tr>
<th colspan="{COLSPAN}">{L_CONFIG}</th>
@ -94,7 +94,7 @@
<td>{L_ORDER}</td>
<!-- ENDIF -->
<!-- IF S_ADD -->
<td>{L_ADD}</td>
<td>{L_ADD} <a href="#" onclick="marklist('smilies', 'add_img', true); return false;">({L_MARK_ALL})</a></td>
<!-- ENDIF -->
</tr>
</thead>

View file

@ -34,6 +34,36 @@
</div>
<!-- ENDIF -->
<!-- IF S_MBSTRING_LOADED -->
<!-- IF S_MBSTRING_FUNC_OVERLOAD_FAIL -->
<div class="errorbox">
<h3>{L_ERROR_MBSTRING_FUNC_OVERLOAD}</h3>
<p>{L_ERROR_MBSTRING_FUNC_OVERLOAD_EXPLAIN}</p>
</div>
<!-- ENDIF -->
<!-- IF S_MBSTRING_ENCODING_TRANSLATION_FAIL -->
<div class="errorbox">
<h3>{L_ERROR_MBSTRING_ENCODING_TRANSLATION}</h3>
<p>{L_ERROR_MBSTRING_ENCODING_TRANSLATION_EXPLAIN}</p>
</div>
<!-- ENDIF -->
<!-- IF S_MBSTRING_HTTP_INPUT_FAIL -->
<div class="errorbox">
<h3>{L_ERROR_MBSTRING_HTTP_INPUT}</h3>
<p>{L_ERROR_MBSTRING_HTTP_INPUT_EXPLAIN}</p>
</div>
<!-- ENDIF -->
<!-- IF S_MBSTRING_HTTP_OUTPUT_FAIL -->
<div class="errorbox">
<h3>{L_ERROR_MBSTRING_HTTP_OUTPUT}</h3>
<p>{L_ERROR_MBSTRING_HTTP_OUTPUT_EXPLAIN}</p>
</div>
<!-- ENDIF -->
<!-- ENDIF -->
<!-- IF S_WRITABLE_CONFIG -->
<div class="errorbox notice">
<p>{L_WRITABLE_CONFIG}</p>

View file

@ -272,6 +272,12 @@
<td class="row3" colspan="{$COLSPAN}"><strong>{L_INSTALLED}</strong></td>
</tr>
<!-- BEGIN installed -->
<!-- IF installed.S_INACTIVE and not $INACTIVE_STYLES -->
<!-- DEFINE $INACTIVE_STYLES = 1 -->
<tr>
<td class="row3" colspan="{$COLSPAN}"><strong>{L_INACTIVE_STYLES}</strong></td>
</tr>
<!-- ENDIF -->
<tr>
<td><strong>{installed.NAME}</strong><!-- IF installed.S_DEFAULT_STYLE --> *<!-- ENDIF --></td>
<!-- IF S_STYLE -->

View file

@ -13,7 +13,7 @@
<fieldset>
<legend>{L_SELECT_USER}</legend>
<dl>
<dt><label for="username">{L_FIND_USERNAME}:</label></dt>
<dt><label for="username">{L_ENTER_USERNAME}:</label></dt>
<dd><input class="text medium" type="text" id="username" name="username" /></dd>
<dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd>
<dd class="full" style="text-align: left;"><label><input type="checkbox" class="radio" id="anonymous" name="u" value="{ANONYMOUS_USER_ID}" /> {L_SELECT_ANONYMOUS}</label></dd>

View file

@ -45,10 +45,6 @@
<dt><label for="user_email">{L_EMAIL}:</label></dt>
<dd><input class="text medium" type="text" id="user_email" name="user_email" value="{USER_EMAIL}" autocomplete="off" /></dd>
</dl>
<dl>
<dt><label for="email_confirm">{L_CONFIRM_EMAIL}:</label><br /><span>{L_CONFIRM_EMAIL_EXPLAIN}</span></dt>
<dd><input class="text medium" type="text" id="email_confirm" name="email_confirm" value="" autocomplete="off" /></dd>
</dl>
<dl>
<dt><label for="new_password">{L_NEW_PASSWORD}:</label><br /><span>{L_CHANGE_PASSWORD_EXPLAIN}</span></dt>
<dd><input type="password" id="new_password" name="new_password" value="" autocomplete="off" /></dd>

View file

@ -899,12 +899,15 @@ html>body dd label input { vertical-align: text-bottom;} /* Tweak for Moz to ali
dd input {
font-size: 1.00em;
max-width: 100%;
margin: 2px 0;
}
dd select {
font-size: 100%;
font-size: 1em;
width: auto;
max-width: 100%;
margin: 2px 0;
}
dd textarea {
@ -912,11 +915,6 @@ dd textarea {
width: 90%;
}
dd select {
width: auto;
font-size: 1.00em;
}
fieldset dl {
margin-bottom: 10px;
font-size: 0.85em;

View file

@ -12,7 +12,8 @@
</div>
</div>
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/jquery.js"></script>
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
</body>
</html>

View file

@ -43,6 +43,11 @@
<p>{WARNING_MSG}</p>
</div>
<!-- ENDIF -->
<div class="errorbox" style="margin-top: 0;">
<h3>{L_NOTICE}</h3>
<p>{L_BACKUP_NOTICE}</p>
</div>
<form id="install_update" method="post" action="{U_ACTION}">

View file

@ -20,7 +20,8 @@
</div>
</div>
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/jquery.js"></script>
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
</body>
</html>

View file

@ -16,7 +16,8 @@
</div>
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/jquery.js"></script>
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
</body>
</html>

View file

@ -2,9 +2,8 @@
/**
*
* @package phpBB3
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package phpBB3
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
* Minimum Requirement: PHP 5.2.0
*/
@ -59,15 +58,6 @@ if (!defined('PHPBB_INSTALLED'))
exit;
}
if (defined('DEBUG_EXTRA'))
{
$base_memory_usage = 0;
if (function_exists('memory_get_usage'))
{
$base_memory_usage = memory_get_usage();
}
}
// Load Extensions
// dl() is deprecated and disabled by default as of PHP 5.3.
if (!empty($load_extensions) && function_exists('dl'))
@ -96,13 +86,16 @@ 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
$class_loader = new phpbb_class_loader($phpbb_root_path, '.' . $phpEx);
$class_loader->register();
$phpbb_class_loader_ext = new phpbb_class_loader('phpbb_ext_', $phpbb_root_path . 'ext/', ".$phpEx");
$phpbb_class_loader_ext->register();
$phpbb_class_loader = new phpbb_class_loader('phpbb_', $phpbb_root_path . 'includes/', ".$phpEx");
$phpbb_class_loader->register();
// set up caching
$cache_factory = new phpbb_cache_factory($acm_type);
$cache = $cache_factory->get_service();
$class_loader->set_cache($cache->get_driver());
$phpbb_class_loader_ext->set_cache($cache->get_driver());
$phpbb_class_loader->set_cache($cache->get_driver());
// Instantiate some basic classes
$request = new phpbb_request();
@ -124,8 +117,12 @@ $config = new phpbb_config_db($db, $cache->get_driver(), CONFIG_TABLE);
set_config(null, null, null, $config);
set_config_count(null, null, null, $config);
$template_locator = new phpbb_template_locator();
$template = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $template_locator);
// load extensions
$phpbb_extension_manager = new phpbb_extension_manager($db, EXT_TABLE, $phpbb_root_path, ".$phpEx", $cache->get_driver());
$phpbb_template_locator = new phpbb_template_locator();
$phpbb_template_path_provider = new phpbb_template_extension_path_provider($phpbb_extension_manager, new phpbb_template_path_provider());
$template = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $phpbb_template_locator, $phpbb_template_path_provider);
// Add own hook handler
require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
@ -138,5 +135,5 @@ foreach ($cache->obtain_hooks() as $hook)
if (!$config['use_system_cron'])
{
$cron = new phpbb_cron_manager($phpbb_root_path . 'includes/cron/task', $phpEx, $cache->get_driver());
$cron = new phpbb_cron_manager(new phpbb_cron_task_provider($phpbb_extension_manager), $cache->get_driver());
}

View file

@ -2,9 +2,8 @@
/**
*
* @package phpBB3
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@ -62,7 +61,7 @@ function do_cron($cron_lock, $run_tasks)
if ($config['use_system_cron'])
{
$cron = new phpbb_cron_manager($phpbb_root_path . 'includes/cron/task', $phpEx, $cache->get_driver());
$cron = new phpbb_cron_manager(new phpbb_cron_task_provider($phpbb_extension_manager), $cache->get_driver());
}
else
{

View file

@ -5,8 +5,6 @@
* begin : Tuesday, February 25, 2003
* copyright : (C) 2003 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
***************************************************************************/

View file

@ -2,9 +2,8 @@
/**
*
* @package phpBB3
* @version $Id$
* @copyright (c) 2009, 2010 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package phpBB3
* @version $Id$
* @copyright (c) 2006 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
* This file creates new schema files for every database.
* The filenames will be prefixed with an underscore to not overwrite the current schema files.
@ -12,11 +11,7 @@
* If you overwrite the original schema files please make sure you save the file with UNIX linefeeds.
*/
die("Please read the first lines of this script for instructions on how to enable it");
@set_time_limit(0);
$schema_path = './../install/schemas/';
$schema_path = dirname(__FILE__) . '/../install/schemas/';
if (!is_writable($schema_path))
{
@ -242,7 +237,7 @@ $supported_dbms = array('firebird', 'mssql', 'mysql_40', 'mysql_41', 'oracle', '
foreach ($supported_dbms as $dbms)
{
$fp = fopen($schema_path . '_' . $dbms . '_schema.sql', 'wt');
$fp = fopen($schema_path . $dbms . '_schema.sql', 'wt');
$line = '';
@ -251,32 +246,43 @@ foreach ($supported_dbms as $dbms)
{
case 'mysql_40':
case 'mysql_41':
$line = "#\n# \$I" . "d: $\n#\n\n";
case 'firebird':
case 'sqlite':
fwrite($fp, "# DO NOT EDIT THIS FILE, IT IS GENERATED\n");
fwrite($fp, "#\n");
fwrite($fp, "# To change the contents of this file, edit\n");
fwrite($fp, "# phpBB/develop/create_schema_files.php and\n");
fwrite($fp, "# run it.\n");
break;
case 'mssql':
case 'oracle':
case 'postgres':
fwrite($fp, "/*\n");
fwrite($fp, " * DO NOT EDIT THIS FILE, IT IS GENERATED\n");
fwrite($fp, " *\n");
fwrite($fp, " * To change the contents of this file, edit\n");
fwrite($fp, " * phpBB/develop/create_schema_files.php and\n");
fwrite($fp, " * run it.\n");
fwrite($fp, " */\n\n");
break;
}
switch ($dbms)
{
case 'firebird':
$line = "#\n# \$I" . "d: $\n#\n\n";
$line .= custom_data('firebird') . "\n";
break;
case 'sqlite':
$line = "#\n# \$I" . "d: $\n#\n\n";
$line .= "BEGIN TRANSACTION;\n\n";
break;
case 'mssql':
$line = "/*\n\n \$I" . "d: $\n\n*/\n\n";
// no need to do this, no transaction support for schema changes
//$line .= "BEGIN TRANSACTION\nGO\n\n";
break;
case 'oracle':
$line = "/*\n\n \$I" . "d: $\n\n*/\n\n";
$line .= custom_data('oracle') . "\n";
break;
case 'postgres':
$line = "/*\n\n \$I" . "d: $\n\n*/\n\n";
$line .= "BEGIN;\n\n";
$line .= custom_data('postgres') . "\n";
break;
@ -1031,6 +1037,17 @@ function get_schema_struct()
),
);
$schema_data['phpbb_ext'] = array(
'COLUMNS' => array(
'ext_name' => array('VCHAR', ''),
'ext_active' => array('BOOL', 0),
'ext_state' => array('TEXT', ''),
),
'KEYS' => array(
'ext_name' => array('UNIQUE', 'ext_name'),
),
);
$schema_data['phpbb_extensions'] = array(
'COLUMNS' => array(
'extension_id' => array('UINT', NULL, 'auto_increment'),
@ -1639,14 +1656,12 @@ function get_schema_struct()
'style_active' => array('BOOL', 1),
'template_id' => array('UINT', 0),
'theme_id' => array('UINT', 0),
'imageset_id' => array('UINT', 0),
),
'PRIMARY_KEY' => 'style_id',
'KEYS' => array(
'style_name' => array('UNIQUE', 'style_name'),
'template_id' => array('INDEX', 'template_id'),
'theme_id' => array('INDEX', 'theme_id'),
'imageset_id' => array('INDEX', 'imageset_id'),
),
);
@ -1679,35 +1694,6 @@ function get_schema_struct()
),
);
$schema_data['phpbb_styles_imageset'] = array(
'COLUMNS' => array(
'imageset_id' => array('UINT', NULL, 'auto_increment'),
'imageset_name' => array('VCHAR_UNI:255', ''),
'imageset_copyright' => array('VCHAR_UNI', ''),
'imageset_path' => array('VCHAR:100', ''),
),
'PRIMARY_KEY' => 'imageset_id',
'KEYS' => array(
'imgset_nm' => array('UNIQUE', 'imageset_name'),
),
);
$schema_data['phpbb_styles_imageset_data'] = array(
'COLUMNS' => array(
'image_id' => array('UINT', NULL, 'auto_increment'),
'image_name' => array('VCHAR:200', ''),
'image_filename' => array('VCHAR:200', ''),
'image_lang' => array('VCHAR:30', ''),
'image_height' => array('USINT', 0),
'image_width' => array('USINT', 0),
'imageset_id' => array('UINT', 0),
),
'PRIMARY_KEY' => 'image_id',
'KEYS' => array(
'i_d' => array('INDEX', 'imageset_id'),
),
);
$schema_data['phpbb_topics'] = array(
'COLUMNS' => array(
'topic_id' => array('UINT', NULL, 'auto_increment'),

View file

@ -0,0 +1,136 @@
<?php
/**
*
* @package phpBB3
* @copyright (c) 2011 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
if (php_sapi_name() != 'cli')
{
die("This program must be run from the command line.\n");
}
if ($argc < 2)
{
echo 'Usage: php ' . basename(__FILE__) . " index_type [batch_size]\n";
exit(1);
}
$class_name = basename($argv[1]);
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
require($phpbb_root_path . 'common.' . $phpEx);
require($phpbb_root_path . 'includes/acp/acp_search.' . $phpEx);
$user->session_begin();
$auth->acl($user->data);
$user->setup('acp/search');
$search_name = ucfirst(strtolower(str_replace('_', ' ', $class_name)));
$search_errors = array();
$search = new $class_name($search_errors);
$batch_size = isset($argv[2]) ? $argv[2] : 2000;
$time = time();
if (method_exists($search, 'create_index'))
{
if ($error = $search->create_index(null, ''))
{
var_dump($error);
exit(1);
}
}
else
{
$sql = 'SELECT forum_id, enable_indexing
FROM ' . FORUMS_TABLE;
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$forums[$row['forum_id']] = (bool) $row['enable_indexing'];
}
$db->sql_freeresult($result);
$sql = 'SELECT post_id
FROM ' . POSTS_TABLE . '
ORDER BY post_id DESC';
$result = $db->sql_query_limit($sql, 1);
$max_post_id = (int) $db->sql_fetchfield('post_id');
$post_counter = 0;
while ($post_counter <= $max_post_id)
{
$row_count = 0;
printf("Processing posts with %d <= post_id <= %d\n",
$post_counter + 1,
$post_counter + $batch_size
);
$sql = 'SELECT post_id, post_subject, post_text, poster_id, forum_id
FROM ' . POSTS_TABLE . '
WHERE post_id >= ' . (int) ($post_counter + 1) . '
AND post_id <= ' . (int) ($post_counter + $batch_size);
$result = $db->sql_query($sql);
$buffer = $db->sql_buffer_nested_transactions();
if ($buffer)
{
$rows = $db->sql_fetchrowset($result);
$rows[] = false; // indicate end of array for while loop below
$db->sql_freeresult($result);
}
$i = 0;
while ($row = ($buffer ? $rows[$i++] : $db->sql_fetchrow($result)))
{
// Indexing enabled for this forum or global announcement?
// Global announcements get indexed by default.
if (!$row['forum_id'] || !empty($forums[$row['forum_id']]))
{
++$row_count;
$search->index('post',
$row['post_id'],
$row['post_text'],
$row['post_subject'],
$row['poster_id'],
$row['forum_id']
);
if ($row_count % 10 == 0)
{
echo '.';
}
}
}
$delta = (time() - $time);
$delta = $delta <= 0 ? 1 : $delta;
printf(" %d posts/sec\n", $row_count / $delta);
if (!$buffer)
{
$db->sql_freeresult($result);
}
$post_counter += $batch_size;
}
}
$search->tidy();
add_log('admin', 'LOG_SEARCH_INDEX_CREATED', $search_name);
echo $user->lang['SEARCH_INDEX_CREATED'] . "\n";
echo 'Peak Memory Usage: ' . get_formatted_filesize(memory_get_peak_usage()) . "\n";
exit(0);

View file

@ -1,8 +1,6 @@
<?php
// -------------------------------------------------------------
//
// $Id$
//
// FILENAME : create_variable_overview.php
// STARTED : Fri Aug 15 2003
// COPYRIGHT : Š 2003 phpBB Group

View file

@ -1,8 +1,6 @@
<?php
// -------------------------------------------------------------
//
// $Id$
//
// FILENAME : fill.php
// STARTED : Mon Sep 15, 2003
// COPYRIGHT : © 2001, 2003 phpBB Group

View file

@ -2,9 +2,8 @@
/**
*
* @package phpBB3
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package phpBB3
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package phpBB3
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -15,10 +15,8 @@ die("Please read the first lines of this script for instructions on how to enabl
// -------------------------------------------------------------
//
// $Id$
//
// @copyright (c) 2005 phpBB Group
// @license http://opensource.org/licenses/gpl-license.php GNU Public License
// @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
//
// -------------------------------------------------------------
// Thanks to arod-1

View file

@ -6,7 +6,6 @@
* copyright : (C) 2003 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
***************************************************************************/

View file

@ -2,9 +2,8 @@
/**
*
* @package phpBB3
* @version $Id$
* @copyright (c) 2006 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
* This file creates SQL statements to upgrade phpBB on MySQL 3.x/4.0.x to 4.1.x/5.x
*

View file

@ -1,7 +1,7 @@
#!/usr/bin/env python
# Remove ending PHP tags '?>'
# @author Oleg Pudeyev
# @license http://opensource.org/licenses/gpl-license.php GNU Public License
# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
import sys, os, os.path, optparse

View file

@ -34,13 +34,11 @@ $user->setup();
$search_type = $config['search_type'];
if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
if (!class_exists($search_type))
{
trigger_error('NO_SUCH_SEARCH_MODULE');
}
require($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx);
$error = false;
$search = new $search_type($error);

View file

@ -2,9 +2,8 @@
/**
*
* @package phpBB3
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -13,7 +13,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>.
* along with this program. If not, see <http://opensource.org/licenses/gpl-2.0.php>
*
*/

View file

@ -46,6 +46,7 @@
<ol>
<li><a href="#changelog">Changelog</a>
<ol style="list-style-type: lower-roman;">
<li><a href="#v309">Changes since 3.0.9</a></li>
<li><a href="#v308">Changes since 3.0.8</a></li>
<li><a href="#v307-PL1">Changes since 3.0.7-PL1</a></li>
<li><a href="#v307">Changes since 3.0.7</a></li>
@ -83,7 +84,143 @@
<div class="content">
<a name="v308"></a><h3>1.i. Changes since 3.0.8</h3>
<a name="v309"></a><h3>1.i. Changes since 3.0.9</h3>
<h4>Bug</h4>
<ul>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-5506">PHPBB3-5506</a>] - Deleting all items from last page results in empty list display</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-6458">PHPBB3-6458</a>] - Width of Topics and Posts columns in Board Index is causing problems with language packs</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-7138">PHPBB3-7138</a>] - Cannot display simple header/footer with trigger_error()</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-7291">PHPBB3-7291</a>] - Broken links of char selection in memberlist</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-7932">PHPBB3-7932</a>] - Fix font size in select boxes</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8094">PHPBB3-8094</a>] - Text in the forums.php and install.php not matching</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8173">PHPBB3-8173</a>] - Redundant BBCode helpline in JS</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8177">PHPBB3-8177</a>] - February 29th birthdays not shown in non-leap year</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8571">PHPBB3-8571</a>] - Users can make their age a negative number on memberlist</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8691">PHPBB3-8691</a>] - Error creating log_time index</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8937">PHPBB3-8937</a>] - Code tags - single space indent</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9008">PHPBB3-9008</a>] - Incorrect unread topic tracking for unapproved topics</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9066">PHPBB3-9066</a>] - Invalid Prefix Names Allowed</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9416">PHPBB3-9416</a>] - HTML entities in poll titles and options incorrectly re-encoded</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9525">PHPBB3-9525</a>] - Minimum characters per post/message should never be '0'</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9645">PHPBB3-9645</a>] - XHTML error on phpinfo page in ACP</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9776">PHPBB3-9776</a>] - When deleting and recreating a poll, old options aren't deleted and reappear with the new ones</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9956">PHPBB3-9956</a>] - No error message displayed when disapprove reason is invalid or empty</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9976">PHPBB3-9976</a>] - Direct post links open the wrong page of viewtopic when multiple posts are posted in the same second</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9978">PHPBB3-9978</a>] - Missing semicolons in // &lt;![CDATA[ part of overall_header.html</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10087">PHPBB3-10087</a>] - Limited browser support for ban exclusion emphasis</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10157">PHPBB3-10157</a>] - Missing error handling when a custom profile field is not defined for current language</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10166">PHPBB3-10166</a>] - Post-admin activation email confusingly refers to username</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10187">PHPBB3-10187</a>] - XHTML error in ucp_groups_manage.html</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10190">PHPBB3-10190</a>] - Misleading information about permissions displayed after editing forum settings</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10212">PHPBB3-10212</a>] - Captcha not displayed when username not exists</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10216">PHPBB3-10216</a>] - Updater's failed query language grammatically incorrect</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10226">PHPBB3-10226</a>] - Mysqli dbal extension does not allow connection via pipes</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10227">PHPBB3-10227</a>] - Mysqli dbal extension does not allow persistent connection for PHP &gt;= 5.3.0</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10237">PHPBB3-10237</a>] - Unwatching a forum/topic does not check for correct hash parameter</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10240">PHPBB3-10240</a>] - Word filter evasion</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10253">PHPBB3-10253</a>] - IE9 Quote problem</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10255">PHPBB3-10255</a>] - gitignore ignores too much</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10257">PHPBB3-10257</a>] - AAAA record parsing fails on older versions of Windows</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10259">PHPBB3-10259</a>] - Incorrect email on joining Open group</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10265">PHPBB3-10265</a>] - Unit test tests/random/mt_rand.php is not run because of missing _test suffix.</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10266">PHPBB3-10266</a>] - Poor navigation links after reporting a post</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10267">PHPBB3-10267</a>] - Missing strlen() on $table_prefix in db tools index name length check</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10274">PHPBB3-10274</a>] - Hardcoded module ID in &quot;Re-check version&quot; link on ACP front page</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10275">PHPBB3-10275</a>] - Wrong information about sent passwords in FAQ</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10292">PHPBB3-10292</a>] - Whitespace inconsistency in acp_ranks</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10293">PHPBB3-10293</a>] - Jumpbox allows jumping to invalid forums in prosilver</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10294">PHPBB3-10294</a>] - sqlsrv_rows_affected non-functional in MSSQLNative.php</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10296">PHPBB3-10296</a>] - incorrect cross join in SQL Server</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10298">PHPBB3-10298</a>] - EMBED Tag Not Closed Properly In subSilver2 attachment.html</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10299">PHPBB3-10299</a>] - Typo in comment about $max_store_length in truncate_string() (in functions_content.php)</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10303">PHPBB3-10303</a>] - send_status_line() doesn't validate user input</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10304">PHPBB3-10304</a>] - Bad url in U_ICQ on /ucp_mp_viewmessage.php</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10307">PHPBB3-10307</a>] - Return value of $db-&gt;sql_fetchrow() on empty tables is not consistent</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10309">PHPBB3-10309</a>] - Utf tests download data into temporary locations deep in source tree</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10320">PHPBB3-10320</a>] - &quot;Most active topic&quot; can leak topic title of topics in password-protected forums</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10321">PHPBB3-10321</a>] - Link to page 1 of the Memberlist has a useless question mark at the end</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10324">PHPBB3-10324</a>] - XHTML error in Prosilver - MCP - User Notes</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10339">PHPBB3-10339</a>] - Typo in prosilver's mcp_front.html</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10341">PHPBB3-10341</a>] - Topic title of &quot;0&quot; does not show as &quot;Most active topic&quot;</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10351">PHPBB3-10351</a>] - Invalid syntax for Oracle's sql_column_remove()</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10352">PHPBB3-10352</a>] - Missing break for Oracle's sql_table_drop()</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10365">PHPBB3-10365</a>] - Moderators can view forbidden information</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10377">PHPBB3-10377</a>] - All moderators can change topic type</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10394">PHPBB3-10394</a>] - Tests use call-time pass by reference which results in Fatal error on PHP 5.4</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10397">PHPBB3-10397</a>] - Pagination code inconsistency </li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10400">PHPBB3-10400</a>] - '0' (zero) not allowed as forum name</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10413">PHPBB3-10413</a>] - Make create_schema_files usable</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10416">PHPBB3-10416</a>] - Use dbport in phpbb_database_test_connection_manager::connect()</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10420">PHPBB3-10420</a>] - Update startup to account for PHP 5.4</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10421">PHPBB3-10421</a>] - Interchanged parameters in includes/acp/acp_users.php</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10422">PHPBB3-10422</a>] - Unnecessary &lt;!-- IF --&gt; statement in viewtopic_body.html</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10435">PHPBB3-10435</a>] - Topic count mismatch on viewforum</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10437">PHPBB3-10437</a>] - Announcements on moderation queue are not hidden</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10446">PHPBB3-10446</a>] - Unencoded 8bit characters in email headers</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10452">PHPBB3-10452</a>] - XHTML error when printing a PM</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10461">PHPBB3-10461</a>] - MCP's recent actions list is empty</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10479">PHPBB3-10479</a>] - Remove PostgreSQL version numbers from driver's language string</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10485">PHPBB3-10485</a>] - XHTML error in Prosilver - index and viewforum</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10488">PHPBB3-10488</a>] - Database updater for 3.0.10-RC1 overwrites config variable email_max_chunk_size without checking for custom value</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10497">PHPBB3-10497</a>] - SQL error when guest visits forum with unread topic</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10319">PHPBB3-10319</a>] - Missing hidden fields in search form</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10501">PHPBB3-10501</a>] - Description of table prefix is wrong</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10502">PHPBB3-10502</a>] - CHANGELOG.html has a typo: 'red' should be 'read'.</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10503">PHPBB3-10503</a>] - Debug error when previewing edits</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10504">PHPBB3-10504</a>] - MCP Layout STILL broken in ProSilver when screen is resized to less 1200 pixels</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10531">PHPBB3-10531</a>] - Last remaining style can be uninstalled</li>
</ul>
<h4>Improvement</h4>
<ul>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8616">PHPBB3-8616</a>] - Add direct link to PM to notification message</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9036">PHPBB3-9036</a>] - Forums that can be listed but not read expose forum information</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9297">PHPBB3-9297</a>] - Add support for Extended Passive Mode (EPSV) in class ftp_fsock to better support IPv6 connections.</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9307">PHPBB3-9307</a>] - Mass email $max_chunk_size</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9361">PHPBB3-9361</a>] - Edit account settings - Improved clarification needed</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9778">PHPBB3-9778</a>] - Member Search from the Admin Control Panel is not Intuitive</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9898">PHPBB3-9898</a>] - Readme needs updating to reflect more opening for patches</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9995">PHPBB3-9995</a>] - Unnecessary coding in display_forums() in functions_display.php</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10032">PHPBB3-10032</a>] - BBCode Add List Item Control Name Contains Typo</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10074">PHPBB3-10074</a>] - Change default value of 'Set as special rank' to No for Add new rank</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10185">PHPBB3-10185</a>] - Board startdate not being set</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10189">PHPBB3-10189</a>] - Add &quot;automatically generated&quot; comment into schema-files.</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10199">PHPBB3-10199</a>] - Performance: viewtopic has a useless join</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10222">PHPBB3-10222</a>] - Also build language and styles changes in diff/patch format</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10239">PHPBB3-10239</a>] - Add &quot;Are you sure&quot; confirmation to backup restore in ACP</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10243">PHPBB3-10243</a>] - Add gmgetdate() wrapper for getdate() which returns dates in UTC.</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10245">PHPBB3-10245</a>] - Messenger uses output buffering for error collection, should use error collector instead</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10246">PHPBB3-10246</a>] - Remove VCS section from docs/coding-guidelines.html</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10254">PHPBB3-10254</a>] - Remove style names from themes and fix some information on it</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10263">PHPBB3-10263</a>] - Add phpbb_version_compare() wrapper for version_compare()</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10278">PHPBB3-10278</a>] - Improve timeout handling in get_remote_file()</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10315">PHPBB3-10315</a>] - Radio Buttons in ACP are clipped in Safari - Fix suggested</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10327">PHPBB3-10327</a>] - Use &quot;ALTER TABLE ... ADD INDEX&quot; instead of &quot;CREATE INDEX&quot;</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10334">PHPBB3-10334</a>] - Birthday List display not dependent on user privileges</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10335">PHPBB3-10335</a>] - Responses to bots should have extra header to be used by reverse proxies</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10346">PHPBB3-10346</a>] - Add drop_tables key for database updater</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10354">PHPBB3-10354</a>] - When template tests are skipped because cache is not writable, print cache directory path</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10369">PHPBB3-10369</a>] - Change error collector to always report errfile and errline</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10370">PHPBB3-10370</a>] - Various improvements for get_backtrace()</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10402">PHPBB3-10402</a>] - Displaying report texts with linebreaks and clickable links</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10419">PHPBB3-10419</a>] - Add mbstring PHP ini parameters checks to ACP</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10430">PHPBB3-10430</a>] - Some typos and the like in docs/coding-guidelines.html</li>
</ul>
<h4>New Feature</h4>
<ul>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8240">PHPBB3-8240</a>] - Request: db_tools to have two additional functions, table list and column list</li>
</ul>
<h4>Task</h4>
<ul>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9689">PHPBB3-9689</a>] - Scripts and utilities</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10003">PHPBB3-10003</a>] - Resolve db_tools proliferation</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10313">PHPBB3-10313</a>] - Include slow unit tests when running build script</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10483">PHPBB3-10483</a>] - Test suite does not run with MySQL strict mode</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10486">PHPBB3-10486</a>] - Create git shortlog and git diff --stat in build script</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10480">PHPBB3-10480</a>] - Automate changelog building</li>
</ul>
<a name="v308"></a><h3>1.ii. Changes since 3.0.8</h3>
<h4> Bug
</h4>
@ -451,7 +588,7 @@
</ul>
<a name="v307-PL1"></a><h3>1.ii. Changes since 3.0.7-PL1</h3>
<a name="v307-PL1"></a><h3>1.iii. Changes since 3.0.7-PL1</h3>
<h4> Security
</h4>
<ul>
@ -909,13 +1046,13 @@
</ul>
<a name="v307"></a><h3>1.iii. Changes since 3.0.7</h3>
<a name="v307"></a><h3>1.iiv. 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.iv. Changes since 3.0.6</h3>
<a name="v306"></a><h3>1.v. 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>
@ -1019,7 +1156,7 @@
</ul>
<a name="v305"></a><h3>1.v. Changes since 3.0.5</h3>
<a name="v305"></a><h3>1.vi. Changes since 3.0.5</h3>
<ul>
<li>[Fix] Allow whitespaces in avatar gallery names. (Bug #44955)</li>
@ -1241,7 +1378,7 @@
<li>[Feature] Send anonymous statistical information to phpBB on installation and update (optional).</li>
</ul>
<a name="v304"></a><h3>1.vi. Changes since 3.0.4</h3>
<a name="v304"></a><h3>1.vii. 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>
@ -1330,7 +1467,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.vii. Changes since 3.0.3</h3>
<a name="v303"></a><h3>1.viii. Changes since 3.0.3</h3>
<ul>
<li>[Fix] Allow mixed-case template directories to be inherited (Bug #36725)</li>
@ -1362,7 +1499,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.viii. Changes since 3.0.2</h3>
<a name="v302"></a><h3>1.ix. 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>
@ -1461,7 +1598,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.ix. Changes since 3.0.1</h3>
<a name="v301"></a><h3>1.x. Changes since 3.0.1</h3>
<ul>
<li>[Fix] Ability to set permissions on non-mysql dbms (Bug #24955)</li>
@ -1509,7 +1646,7 @@
<li>[Sec] Only allow urls gone through redirect() being used within login_box(). (thanks nookieman)</li>
</ul>
<a name="v300"></a><h3>1.x Changes since 3.0.0</h3>
<a name="v300"></a><h3>1.xi Changes since 3.0.0</h3>
<ul>
<li>[Change] Validate birthdays (Bug #15004)</li>
@ -1580,7 +1717,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.xi. Changes since 3.0.RC8</h3>
<a name="v30rc8"></a><h3>1.xii. Changes since 3.0.RC8</h3>
<ul>
<li>[Fix] Cleaned usernames contain only single spaces, so &quot;a_name&quot; and &quot;a__name&quot; are treated as the same name (Bug #15634)</li>
@ -1589,7 +1726,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.xii. Changes since 3.0.RC7</h3>
<a name="v30rc7"></a><h3>1.xiii. Changes since 3.0.RC7</h3>
<ul>
<li>[Fix] Fixed MSSQL related bug in the update system</li>
@ -1624,7 +1761,7 @@
<li>[Fix] No duplication of active topics (Bug #15474)</li>
</ul>
<a name="v30rc6"></a><h3>1.xiii. Changes since 3.0.RC6</h3>
<a name="v30rc6"></a><h3>1.xiv. Changes since 3.0.RC6</h3>
<ul>
<li>[Fix] Submitting language changes using acp_language (Bug #14736)</li>
@ -1634,7 +1771,7 @@
<li>[Fix] Able to request new password (Bug #14743)</li>
</ul>
<a name="v30rc5"></a><h3>1.xiv. Changes since 3.0.RC5</h3>
<a name="v30rc5"></a><h3>1.xv. 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>
@ -1697,7 +1834,7 @@
<li>[Sec] New password hashing mechanism for storing passwords (#i42)</li>
</ul>
<a name="v30rc4"></a><h3>1.xv. Changes since 3.0.RC4</h3>
<a name="v30rc4"></a><h3>1.xvi. Changes since 3.0.RC4</h3>
<ul>
<li>[Fix] MySQL, PostgreSQL and SQLite related database fixes (Bug #13862)</li>
@ -1748,7 +1885,7 @@
<li>[Fix] odbc_autocommit causing existing result sets to be dropped (Bug #14182)</li>
</ul>
<a name="v30rc3"></a><h3>1.xvi. Changes since 3.0.RC3</h3>
<a name="v30rc3"></a><h3>1.xvii. Changes since 3.0.RC3</h3>
<ul>
<li>[Fix] Fixing some subsilver2 and prosilver style issues</li>
@ -1857,7 +1994,7 @@
</ul>
<a name="v30rc2"></a><h3>1.xvii. Changes since 3.0.RC2</h3>
<a name="v30rc2"></a><h3>1.xviii. Changes since 3.0.RC2</h3>
<ul>
<li>[Fix] Re-allow searching within the memberlist</li>
@ -1903,7 +2040,7 @@
</ul>
<a name="v30rc1"></a><h3>1.xviii. Changes since 3.0.RC1</h3>
<a name="v30rc1"></a><h3>1.xix. Changes since 3.0.RC1</h3>
<ul>
<li>[Fix] (X)HTML issues within the templates (Bug #11255, #11255)</li>
@ -2038,7 +2175,7 @@
<div class="content">
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</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="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
</div>

View file

@ -103,7 +103,7 @@ I want to sue you because i think you host an illegal board!</h2>
<div class="content">
<p>We provide the software, we have absolutely nothing to do with any board that runs it (beyond phpbb.com of course!) and we also do not host any site. The GPL grants the user an unlimited right of use subject to their adherence of that licence. Therefore we cannot prevent, dictate, control or otherwise limit the use of phpBB software. So please do not contact us for such matters.</p>
<p>We provide the software, we have absolutely nothing to do with any board that runs it (beyond phpbb.com of course!) and we also do not host any site. The GPL grants the user an unlimited right of use subject to their adherence of that license. Therefore we cannot prevent, dictate, control or otherwise limit the use of phpBB software. So please do not contact us for such matters.</p>
<p>If you have a problem with a given board please take it up with them, not us. We are not and cannot be held legally responsible for any third party use of this software (much like Microsoft et al cannot be held responsible for the use of Windows in illegal activities, etc.). Additionally we do <strong>not</strong> track the use of phpBB software in any way. So please do not ask us for details on a &quot;given&quot; board we will not be able to help you. If any law firms or lawyers out there send us writs, cease and desist orders, etc. for third party website use of this software we reserve the right to charge for time wasted dealing with such issues...</p>
@ -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-license.php">GPL</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="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
</div>

View file

@ -75,7 +75,7 @@
<li><a href="#webserver_configuration">Webserver configuration</a></li>
</ol>
</li>
<li><a href="#disclaimer">Disclaimer</a></li>
<li><a href="#disclaimer">Copyright and disclaimer</a></li>
</ol>
</div>
@ -267,7 +267,7 @@
<p>This package is meant for those wanting to only replace changed files from a previous version to the latest version. This package normally contains the changed files from up to five previous versions.</p>
<p>This package contains a number of archives, each contains the files changed from a given release to the latest version. You should select the appropriate archive for your current version, e.g. if you currently have <samp>3.0.8</samp> you should select the phpBB-3.0.8_to_3.0.9.zip/tar.gz file.</p>
<p>This package contains a number of archives, each contains the files changed from a given release to the latest version. You should select the appropriate archive for your current version, e.g. if you currently have <samp>3.0.9</samp> you should select the phpBB-3.0.9_to_3.0.10.zip/tar.gz file.</p>
<p>The directory structure has been preserved enabling you (if you wish) to simply upload the contents of the archive to the appropriate location on your server, i.e. simply overwrite the existing files with the new versions. Do not forget that if you have installed any MODs these files will overwrite the originals possibly destroying them in the process. You will need to re-add MODs to any affected file before uploading.</p>
@ -279,7 +279,7 @@
<p>The patch file is one solution for those with many Modifications (MODs) or other changes who do not want to re-add them back to all the changed files if they use the method explained above. To use this you will need command line access to a standard UNIX type <strong>patch</strong> application. If you do not have access to such an application but still want to use this update approach, we strongly recommend the <a href="#update_auto">Automatic update package</a> explained below. It is also the recommended update method.</p>
<p>A number of patch files are provided to allow you to update from previous stable releases. Select the correct patch, e.g. if your current version is <samp>3.0.8</samp> you need the phpBB-3.0.8_to_3.0.9.patch file. Place the correct patch in the parent directory containing the phpBB3 core files (i.e. index.php, viewforum.php, etc.). With this done you should run the following command: <strong>patch -cl -d [PHPBB DIRECTORY] -p1 &lt; [PATCH NAME]</strong> (where PHPBB DIRECTORY is the directory name your phpBB Installation resides in, for example phpBB3, and where PATCH NAME is the relevant filename of the selected patch file). This should complete quickly, hopefully without any HUNK FAILED comments.</p>
<p>A number of patch files are provided to allow you to update from previous stable releases. Select the correct patch, e.g. if your current version is <samp>3.0.9</samp> you need the phpBB-3.0.9_to_3.0.10.patch file. Place the correct patch in the parent directory containing the phpBB3 core files (i.e. index.php, viewforum.php, etc.). With this done you should run the following command: <strong>patch -cl -d [PHPBB DIRECTORY] -p1 &lt; [PATCH NAME]</strong> (where PHPBB DIRECTORY is the directory name your phpBB Installation resides in, for example phpBB3, and where PATCH NAME is the relevant filename of the selected patch file). This should complete quickly, hopefully without any HUNK FAILED comments.</p>
<p>If you do get failures you should look at using the <a href="#update_files">Changed files only</a> package to replace the files which failed to patch, please note that you will need to manually re-add any Modifications (MODs) to these particular files. Alternatively if you know how you can examine the .rej files to determine what failed where and make manual adjustments to the relevant source.</p>
@ -424,7 +424,7 @@
<div class="content">
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</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="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
</div>

View file

@ -256,7 +256,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 fix which you are <strong>VERY SURE</strong> works (and is consistent with our <a href="coding-guidelines.html">coding guidelines</a>) and does not introduce further problems or incompatibilities please let us know. However only include it in the bug report if you really must, if we need it we'll ask you for it.</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>Once a bug has been submitted you will be emailed any follow up comments added to it. <strong>Please</strong> if you are requested to supply additional information, do so! It is frustrating for us to receive bug reports, ask for additional information but get nothing. In these cases we have a policy of closing the bug, which may leave a very real problem in place. Obviously we would rather not have this situation arise.</p>
@ -332,7 +332,7 @@
<div class="content">
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</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="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
</div>

View file

@ -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-license.php">GPL</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="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="keywords" content="" />
<meta name="description" content="Olympus coding guidelines document" />
<meta name="description" content="Ascraeus coding guidelines document" />
<title>phpBB3 &bull; Coding Guidelines</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
@ -21,7 +21,7 @@
<div id="doc-description">
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
<h1>Coding Guidelines</h1>
<p>Olympus coding guidelines document</p>
<p>Ascraeus coding guidelines document</p>
<p style="display: none;"><a href="#start_here">Skip</a></p>
</div>
@ -35,7 +35,7 @@
<!-- BEGIN DOCUMENT -->
<p>These are the phpBB Coding Guidelines for Olympus, all attempts should be made to follow them as closely as possible.</p>
<p>These are the phpBB Coding Guidelines for Ascraeus, all attempts should be made to follow them as closely as possible.</p>
<h1>Coding Guidelines</h1>
@ -81,12 +81,6 @@
<li><a href="#writingstyle">Writing Style</a></li>
</ol>
</li>
<li><a href="#vcs">VCS Guidelines</a>
<ol style="list-style-type: lower-roman;">
<li><a href="#repostruct">Repository structure</a></li>
<li><a href="#commitmessage">Commit Messages and Repository Rules</a></li>
</ol>
</li>
<li><a href="#disclaimer">Copyright and disclaimer</a></li>
</ol>
@ -129,9 +123,8 @@
/**
*
* @package {PACKAGENAME}
* @version &#36;Id: &#36;
* @copyright (c) 2007 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
</pre></div>
@ -501,12 +494,12 @@ do_stuff($str);
$post_url = $phpbb_root_path . 'posting.' . $phpEx . '?mode=' . $mode . '&amp;amp;start=' . $start;
</pre></div>
<p class="good">// Double quotes are sometimes needed to not overcroud the line with concentinations</p>
<p class="good">// Double quotes are sometimes needed to not overcrowd the line with concatenations.</p>
<div class="codebox"><pre>
$post_url = "{$phpbb_root_path}posting.$phpEx?mode=$mode&amp;amp;start=$start";
</pre></div>
<p>In SQL Statements mixing single and double quotes is partly allowed (following the guidelines listed here about SQL Formatting), else it should be tryed to only use one method - mostly single quotes.</p>
<p>In SQL statements mixing single and double quotes is partly allowed (following the guidelines listed here about SQL formatting), else one should try to only use one method - mostly single quotes.</p>
<h4>Commas after every array element:</h4>
<p>If an array is defined with each element on its own line, you still have to modify the previous line to add a comma when appending a new element. PHP allows for trailing (useless) commas in array definitions. These should always be used so each element including the comma can be appended with a single line</p>
@ -555,7 +548,7 @@ $foo = $assoc_array[$var];
<p>Each complex function should be preceded by a comment that tells a programmer everything they need to know to use that function. The meaning of every parameter, the expected input, and the output are required as a minimal comment. The function's behaviour in error conditions (and what those error conditions are) should also be present - but mostly included within the comment about the output.<br /><br />Especially important to document are any assumptions the code makes, or preconditions for its proper operation. Any one of the developers should be able to look at any part of the application and figure out what's going on in a reasonable amount of time.<br /><br />Avoid using <code>/* */</code> comment blocks for one-line comments, <code>//</code> should be used for one/two-liners.</p>
<h4>Magic numbers:</h4>
<p>Don't use them. Use named constants for any literal value other than obvious special cases. Basically, it's ok to check if an array has 0 elements by using the literal 0. It's not ok to assign some special meaning to a number and then use it everywhere as a literal. This hurts readability AND maintainability. The constants <code>true</code> and <code>false</code> should be used in place of the literals 1 and 0 -- even though they have the same values (but not type!), it's more obvious what the actual logic is when you use the named constants. Typecast variables where it is needed, do not rely on the correct variable type (PHP is currently very loose on typecasting which can lead to security problems if a developer does not have a very close eye to it).</p>
<p>Don't use them. Use named constants for any literal value other than obvious special cases. Basically, it's ok to check if an array has 0 elements by using the literal 0. It's not ok to assign some special meaning to a number and then use it everywhere as a literal. This hurts readability AND maintainability. The constants <code>true</code> and <code>false</code> should be used in place of the literals 1 and 0 -- even though they have the same values (but not type!), it's more obvious what the actual logic is when you use the named constants. Typecast variables where it is needed, do not rely on the correct variable type (PHP is currently very loose on typecasting which can lead to security problems if a developer does not keep a very close eye on it).</p>
<h4>Shortcut operators:</h4>
<p>The only shortcut operators that cause readability problems are the shortcut increment <code>$i++</code> and decrement <code>$j--</code> operators. These operators should not be used as part of an expression. They can, however, be used on their own line. Using them in expressions is just not worth the headaches when debugging, examples:</p>
@ -744,7 +737,7 @@ $sql = 'SELECT *
</pre></div>
<h4>SQL Quotes: </h4>
<p>Double quotes where applicable (The variables in these examples are typecasted to integers before) ... examples: </p>
<p>Use double quotes where applicable. (The variables in these examples are typecasted to integers beforehand.) Examples: </p>
<p class="bad">// These are wrong.</p>
<div class="codebox"><pre>
@ -905,7 +898,7 @@ SELECT FROM phpbb_forums WHERE forum_id <strong>&lt;&gt;</strong> 1
<h4>sql_build_query():</h4>
<p>The <code>$db-&gt;sql_build_query()</code> function is responsible for building sql statements for select and select distinct queries if you need to JOIN on more than one table or retrieving data from more than one table while doing a JOIN. This needs to be used to make sure the resulting statement is working on all supported db's. Instead of explaining every possible combination, i will give a short example:</p>
<p>The <code>$db-&gt;sql_build_query()</code> function is responsible for building sql statements for SELECT and SELECT DISTINCT queries if you need to JOIN on more than one table or retrieve data from more than one table while doing a JOIN. This needs to be used to make sure the resulting statement is working on all supported db's. Instead of explaining every possible combination, I will give a short example:</p>
<div class="codebox"><pre>
$sql_array = array(
@ -990,7 +983,7 @@ for ($i = 0, $size = sizeof($post_data); $i &lt; $size; $i++)
</pre></div>
<h4>Use of in_array(): </h4>
<p>Try to avoid using in_array() on huge arrays, and try to not place them into loops if the array to check consist of more than 20 entries. in_array() can be very time consuming and uses a lot of cpu processing time. For little checks it is not noticable, but if checked against a huge array within a loop those checks alone can be a bunch of seconds. If you need this functionality, try using isset() on the arrays keys instead, actually shifting the values into keys and vice versa. A call to <code>isset($array[$var])</code> is a lot faster than <code>in_array($var, array_keys($array))</code> for example.</p>
<p>Try to avoid using in_array() on huge arrays, and try to not place them into loops if the array to check consist of more than 20 entries. in_array() can be very time consuming and uses a lot of cpu processing time. For little checks it is not noticeable, but if checked against a huge array within a loop those checks alone can take several seconds. If you need this functionality, try using isset() on the arrays keys instead, actually shifting the values into keys and vice versa. A call to <code>isset($array[$var])</code> is a lot faster than <code>in_array($var, array_keys($array))</code> for example.</p>
<a name="general"></a><h3>2.v. General Guidelines</h3>
@ -1003,7 +996,7 @@ for ($i = 0, $size = sizeof($post_data); $i &lt; $size; $i++)
<p>No attempt should be made to remove any copyright information (either contained within the source or displayed interactively when the source is run/compiled), neither should the copyright information be altered in any way (it may be added to).</p>
<h4>Variables: </h4>
<p>Make use of the <code>request_var()</code> function for anything except for submit or single checking params. </p>
<p>Make use of the <code>request_var()</code> function for anything except for submit or single checking params.</p>
<p>The request_var function determines the type to set from the second parameter (which determines the default value too). If you need to get a scalar variable type, you need to tell this the request_var function explicitly. Examples:</p>
<p class="bad">// Old method, do not use it</p>
@ -1070,7 +1063,7 @@ $user-&gt;setup();
<p>The <code>$user-&gt;setup()</code> call can be used to pass on additional language definition and a custom style (used in viewforum).</p>
<h4>Errors and messages: </h4>
<p>All messages/errors should be outputed by calling <code>trigger_error()</code> using the appropriate message type and language string. Example:</p>
<p>All messages/errors should be outputted by calling <code>trigger_error()</code> using the appropriate message type and language string. Example:</p>
<div class="codebox"><pre>
trigger_error('NO_FORUM');
@ -1088,7 +1081,7 @@ trigger_error('NO_MODE', E_USER_ERROR);
<p>All urls pointing to internal files need to be prepended by the <code>$phpbb_root_path</code> variable. Within the administration control panel all urls pointing to internal files need to be prepended by the <code>$phpbb_admin_path</code> variable. This makes sure the path is always correct and users being able to just rename the admin folder and the acp still working as intended (though some links will fail and the code need to be slightly adjusted).</p>
<p>The <code>append_sid()</code> function from 2.0.x is available too, though does not handle url alterations automatically. Please have a look at the code documentation if you want to get more details on how to use append_sid(). A sample call to append_sid() can look like this:</p>
<p>The <code>append_sid()</code> function from 2.0.x is available too, though it does not handle url alterations automatically. Please have a look at the code documentation if you want to get more details on how to use append_sid(). A sample call to append_sid() can look like this:</p>
<div class="codebox"><pre>
append_sid(&quot;{$phpbb_root_path}memberlist.$phpEx&quot;, 'mode=group&amp;amp;g=' . $row['group_id'])
@ -1096,7 +1089,7 @@ append_sid(&quot;{$phpbb_root_path}memberlist.$phpEx&quot;, 'mode=group&amp;amp;
<h4>General function usage: </h4>
<p>Some of these functions are only chosen over others because of personal preference and having no other benefit than to be consistent over the code.</p>
<p>Some of these functions are only chosen over others because of personal preference and have no benefit other than maintaining consistency throughout the code.</p>
<ul>
<li>
@ -1162,7 +1155,7 @@ append_sid(&quot;{$phpbb_root_path}memberlist.$phpEx&quot;, 'mode=group&amp;amp;
required_imageset = prosilver
</pre></div>
<a name="genstyling"></a><h3>3.2. General Styling Rules</h3>
<p>Templates should be produced in a consistent manner. Where appropriate they should be based off an existing copy, e.g. index, viewforum or viewtopic (the combination of which implement a range of conditional and variable forms). Please also note that the intendation and coding guidelines also apply to templates where possible.</p>
<p>Templates should be produced in a consistent manner. Where appropriate they should be based off an existing copy, e.g. index, viewforum or viewtopic (the combination of which implement a range of conditional and variable forms). Please also note that the indentation and coding guidelines also apply to templates where possible.</p>
<p>The outer table class <code>forumline</code> has gone and is replaced with <code>tablebg</code>.</p>
<p>When writing <code>&lt;table&gt;</code> the order <code>&lt;table class="" cellspacing="" cellpadding="" border="" align=""&gt;</code> creates consistency and allows everyone to easily see which table produces which "look". The same applies to most other tags for which additional parameters can be set, consistency is the major aim here.</p>
@ -1182,7 +1175,7 @@ append_sid(&quot;{$phpbb_root_path}memberlist.$phpEx&quot;, 'mode=group&amp;amp;
<p>Row colours/classes are now defined by the template, use an <code>IF S_ROW_COUNT</code> switch, see viewtopic or viewforum for an example.</p>
<p>Remember block level ordering is important ... while not all pages validate as XHTML 1.0 Strict compliant it is something we're trying to work too.</p>
<p>Remember block level ordering is important ... while not all pages validate as XHTML 1.0 Strict compliant it is something we're trying to work on.</p>
<p>Use a standard cellpadding of 2 and cellspacing of 0 on outer tables. Inner tables can vary from 0 to 3 or even 4 depending on the need.</p>
@ -1231,12 +1224,12 @@ append_sid(&quot;{$phpbb_root_path}memberlist.$phpEx&quot;, 'mode=group&amp;amp;
<a name="templates"></a><h3>4.i. General Templating</h3>
<h4>File naming</h4>
<p>Firstly templates now take the suffix &quot;.html&quot; rather than &quot;.tpl&quot;. This was done simply to make the lifes of some people easier wrt syntax highlighting, etc.</p>
<p>Firstly templates now take the suffix &quot;.html&quot; rather than &quot;.tpl&quot;. This was done simply to make the lives of some people easier wrt syntax highlighting, etc.</p>
<h4>Variables</h4>
<p>All template variables should be named appropriately (using underscores for spaces), language entries should be prefixed with L_, system data with S_, urls with U_, javascript urls with UA_, language to be put in javascript statements with LA_, all other variables should be presented 'as is'.</p>
<p>L_* template variables are automatically tried to be mapped to the corresponding language entry if the code does not set (and therefore overwrite) this variable specifically. For example <code>{L_USERNAME}</code> maps to <code>$user-&gt;lang['USERNAME']</code>. The LA_* template variables are handled within the same way, but properly escaped to be put in javascript code. This should reduce the need to assign loads of new lang vars in Modifications.
<p>L_* template variables are automatically mapped to the corresponding language entry if the code does not set (and therefore overwrite) this variable specifically and if the language entry exists. For example <code>{L_USERNAME}</code> maps to <code>$user-&gt;lang['USERNAME']</code>. The LA_* template variables are handled within the same way, but properly escaped so they can be put in javascript code. This should reduce the need to assign loads of new language variables in MODifications.
</p>
<h4>Blocks/Loops</h4>
@ -1519,9 +1512,9 @@ div
<span class="comment">&lt;!-- END l_block1 --&gt;</span>
</pre></div>
<p>Here we open the loop l_block1 and doing some things if the value S_SELECTED within the current loop iteration is true, else we write the blocks link and title. Here, you see <code>{l_block1.L_TITLE}</code> referenced - you remember that L_* variables get automatically assigned the corresponding language entry? This is true, but not within loops. The L_TITLE variable within the loop l_block1 is assigned within the code itself.</p>
<p>Here we open the loop l_block1 and do some things if the value S_SELECTED within the current loop iteration is true, else we write the blocks link and title. Here, you see <code>{l_block1.L_TITLE}</code> referenced - you remember that L_* variables get automatically assigned the corresponding language entry? This is true, but not within loops. The L_TITLE variable within the loop l_block1 is assigned within the code itself.</p>
<p>Let's have a closer look to the markup:</p>
<p>Let's have a closer look at the markup:</p>
<div class="codebox"><pre>
<span class="comment">&lt;!-- BEGIN l_block1 --&gt;</span>
@ -1615,7 +1608,7 @@ div
&lt;/ul&gt; <span class="comment">&lt;!-- written on third iteration --&gt;</span>
</pre></div>
<p>Just always remember that processing is taking place from up to down.</p>
<p>Just always remember that processing is taking place from top to bottom.</p>
<h4>Forms</h4>
<p>If a form is used for a non-trivial operation (i.e. more than a jumpbox), then it should include the <code>{S_FORM_TOKEN}</code> template variable.</p>
@ -1631,11 +1624,9 @@ div
</pre></div><br />
<a name="inheritance"></a><h3>4.ii. Template Inheritance</h3>
<p>When basing a new template on an existing one, it is not necessary to provide all template files. By declaring the template to be &quot;<strong>inheriting</strong>&quot; in the template configuration file.</p>
<p>When basing a new style on an existing one, it is not necessary to provide all the template files. By declaring the base style name in the <strong>inherit_from</strong> field in the template configuration file, the style can be set to inherit template files from the base style. The limitation on this is that the base style has to be installed and complete, meaning that it is not itself inheriting.</p>
<p>The limitation on this is that the base style has to be installed and complete, meaning that it is not itself inheriting.</p>
<p>The effect of doing so is that the template engine will use the files in the new template where they exist, but fall back to files in the base template otherwise. Declaring a style to be inheriting also causes it to use some of the configuration settings of the base style, notably database storage.</p>
<p>The effect of doing so is that the template engine will use the template files in the new style where they exist, but fall back to files in the base style otherwise. Declaring a style to inherit from another also causes it to use some of the configuration settings of the base style, notably database storage.</p>
<p>We strongly encourage the use of inheritance for styles based on the bundled styles, as it will ease the update procedure.</p>
@ -1762,7 +1753,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
<h4>Encoding:</h4>
<p>With phpBB3, the output encoding for the forum in now UTF-8, a Universal Character Encoding by the Unicode Consortium that is by design a superset to US-ASCII and ISO-8859-1. By using one character set which simultaenously supports all scripts which previously would have required different encodings (eg: ISO-8859-1 to ISO-8859-15 (Latin, Greek, Cyrillic, Thai, Hebrew, Arabic); GB2312 (Simplified Chinese); Big5 (Traditional Chinese), EUC-JP (Japanese), EUC-KR (Korean), VISCII (Vietnamese); et cetera), this removes the need to convert between encodings and improves the accessibility of multilingual forums.</p>
<p>With phpBB3, the output encoding for the forum in now UTF-8, a Universal Character Encoding by the Unicode Consortium that is by design a superset to US-ASCII and ISO-8859-1. By using one character set which simultaenously supports all scripts which previously would have required different encodings (eg: ISO-8859-1 to ISO-8859-15 (Latin, Greek, Cyrillic, Thai, Hebrew, Arabic); GB2312 (Simplified Chinese); Big5 (Traditional Chinese), EUC-JP (Japanese), EUC-KR (Korean), VISCII (Vietnamese); et cetera), we remove the need to convert between encodings and improves the accessibility of multilingual forums.</p>
<p>The impact is that the language files for phpBB must now also be encoded as UTF-8, with a caveat that the files must <strong>not contain</strong> a <abbr title="Byte-Order-Mark">BOM</abbr> for compatibility reasons with non-Unicode aware versions of PHP. For those with forums using the Latin character set (ie: most European languages), this change is transparent since UTF-8 is superset to US-ASCII and ISO-8859-1.</p>
@ -2412,58 +2403,14 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
<hr />
<a name="vcs"></a><h2>7. VCS Guidelines</h2>
<a name="disclaimer"></a><h2>8. Copyright and disclaimer</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="content">
<p>The version control system for phpBB3 is git. The repository is available at <a href="http://github.com/phpbb/phpbb3" title="repository">http://github.com/phpbb/phpbb3</a>.</p>
<a name="repostruct"></a><h3>7.i. Repository Structure</h3>
<ul>
<li><strong>develop</strong><br />The latest unstable development version with new features etc.</li>
<li><strong>develop-*</strong><br />Development branches of stable phpBB releases. Branched off of <code>develop</code> at the time of feature freeze.
<ul>
<li><strong>phpBB3.0</strong><code>develop-olympus</code><br />Development branch of the stable 3.0 line. Bug fixes are applied here.</li>
<li><strong>phpBB3.1</strong><code>develop-ascraeus</code><br />Development branch of the stable 3.1 line. Bug fixes are applied here.</li>
</ul>
</li>
<li><strong>master</strong><br />A branch containing all stable phpBB3 release points</li>
<li><strong>tags</strong><br />Released versions. Stable ones get merged into the master branch.
<ul>
<li><code>release-3.Y-BX</code><br />Beta release X of the 3.Y line.</li>
<li><code>release-3.Y-RCX</code><br />Release candidate X of the 3.Y line.</li>
<li><code>release-3.Y.Z-RCX</code><br />Release candidate X of the stable 3.Y.Z release.</li>
<li><code>release-3.0.X</code><br />Stable <strong>3.0.X</strong> release.</li>
<li><code>release-2.0.X</code><br />Old stable 2.0.X release.</li>
</ul>
</li>
</ul>
<a name="commitmessage"></a><h3>7.ii. Commit Messages and Repository Rules</h3>
<p>Information on repository rules, such as commit messages can be found at <a href="http://wiki.phpbb.com/display/DEV/Git" title="phpBB Git Information">http://wiki.phpbb.com/display/DEV/Git</a>.</p>
</div>
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
<span class="corners-bottom"><span></span></span></div>
</div>
<hr />
<a name="disclaimer"></a><h2>9. Copyright and disclaimer</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="content">
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</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="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
</div>

View file

@ -861,7 +861,7 @@ function phpbb_hook_register(&amp;$hook)
<div class="content">
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</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="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
</div>

View file

@ -2,9 +2,8 @@
/**
*
* @package phpBB3
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@ -46,13 +45,16 @@ if (isset($_GET['avatar']))
require($phpbb_root_path . 'includes/functions_download' . '.' . $phpEx);
require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
$class_loader = new phpbb_class_loader($phpbb_root_path, '.' . $phpEx);
$class_loader->register();
$phpbb_class_loader_ext = new phpbb_class_loader('phpbb_ext_', $phpbb_root_path . 'ext/', ".$phpEx");
$phpbb_class_loader_ext->register();
$phpbb_class_loader = new phpbb_class_loader('phpbb_', $phpbb_root_path . 'includes/', ".$phpEx");
$phpbb_class_loader->register();
// set up caching
$cache_factory = new phpbb_cache_factory($acm_type);
$cache = $cache_factory->get_service();
$class_loader->set_cache($cache->get_driver());
$phpbb_class_loader_ext->set_cache($cache->get_driver());
$phpbb_class_loader->set_cache($cache->get_driver());
$request = new phpbb_request();
$db = new $sql_db();
@ -73,6 +75,9 @@ if (isset($_GET['avatar']))
set_config(null, null, null, $config);
set_config_count(null, null, null, $config);
// load extensions
$phpbb_extension_manager = new phpbb_extension_manager($db, EXT_TABLE, $phpbb_root_path, ".$phpEx", $cache->get_driver());
$filename = request_var('avatar', '');
$avatar_group = false;
$exit = false;

View file

@ -2,9 +2,8 @@
/**
*
* @package phpBB3
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -1,9 +1,8 @@
<?php
/**
* @package phpBB3
* @version $Id$
* @copyright (c) 2009 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
* Idea and original RSS Feed 2.0 MOD (Version 1.0.8/9) by leviatan21
* Original MOD: http://www.phpbb.com/community/viewtopic.php?f=69&t=1214645
@ -1106,8 +1105,8 @@ class phpbb_feed_forums extends phpbb_feed_base
{
global $user;
$item_row['statistics'] = sprintf($user->lang['TOTAL_TOPICS_OTHER'], $row['forum_topics'])
. ' ' . $this->separator_stats . ' ' . sprintf($user->lang['TOTAL_POSTS_OTHER'], $row['forum_posts']);
$item_row['statistics'] = $user->lang('TOTAL_TOPICS', (int) $row['forum_topics'])
. ' ' . $this->separator_stats . ' ' . $user->lang('TOTAL_POSTS_OTHER', (int) $row['forum_posts']);
}
}
}

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@ -1159,7 +1158,7 @@ class acp_attachments
// Issue warning message if files stats are inaccurate
if (($num_files != $num_files_real) || ($total_size != $total_size_real))
{
$error[] = sprintf($user->lang['FILES_STATS_WRONG'], $num_files_real, get_formatted_filesize($total_size_real));
$error[] = $user->lang('FILES_STATS_WRONG', (int) $num_files_real, get_formatted_filesize($total_size_real));
$template->assign_vars(array(
'S_ACTION_OPTIONS' => ($auth->acl_get('a_board')) ? true : false,
@ -1244,8 +1243,7 @@ class acp_attachments
$row['extension'] = strtolower(trim((string) $row['extension']));
$comment = ($row['attach_comment'] && !$row['in_message']) ? str_replace(array("\n", "\r"), array('<br />', "\n"), $row['attach_comment']) : '';
$display_cat = $extensions[$row['extension']]['display_cat'];
$l_downloaded_viewed = ($display_cat == ATTACHMENT_CATEGORY_NONE) ? 'DOWNLOAD_COUNT' : 'VIEWED_COUNT';
$l_download_count = (!isset($row['download_count']) || (int) $row['download_count'] == 0) ? $user->lang[$l_downloaded_viewed . '_NONE'] : (((int) $row['download_count'] == 1) ? sprintf($user->lang[$l_downloaded_viewed], $row['download_count']) : sprintf($user->lang[$l_downloaded_viewed . 'S'], $row['download_count']));
$l_downloaded_viewed = ($display_cat == ATTACHMENT_CATEGORY_NONE) ? 'DOWNLOAD_COUNTS' : 'VIEWED_COUNTS';
$template->assign_block_vars('attachments', array(
'ATTACHMENT_POSTER' => get_username_string('full', (int) $row['poster_id'], (string) $row['username'], (string) $row['user_colour'], (string) $row['username']),
@ -1261,7 +1259,7 @@ class acp_attachments
'TOPIC_ID' => (int) $row['topic_id'],
'POST_IDS' => (!empty($post_ids[$row['attach_id']])) ? (int) $post_ids[$row['attach_id']] : '',
'L_DOWNLOAD_COUNT' => $l_download_count,
'L_DOWNLOAD_COUNT' => $user->lang($l_downloaded_viewed, (int) $row['download_count']),
'S_IN_MESSAGE' => (bool) $row['in_message'],

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@ -175,12 +174,21 @@ class acp_ban
}
$result = $db->sql_query($sql);
$banned_options = '';
$banned_options = $excluded_options = array();
$ban_length = $ban_reasons = $ban_give_reasons = array();
while ($row = $db->sql_fetchrow($result))
{
$banned_options .= '<option' . (($row['ban_exclude']) ? ' class="sep"' : '') . ' value="' . $row['ban_id'] . '">' . $row[$field] . '</option>';
$option = '<option value="' . $row['ban_id'] . '">' . $row[$field] . '</option>';
if ($row['ban_exclude'])
{
$excluded_options[] = $option;
}
else
{
$banned_options[] = $option;
}
$time_length = ($row['ban_end']) ? ($row['ban_end'] - $row['ban_start']) / 60 : 0;
@ -241,10 +249,25 @@ class acp_ban
}
}
$options = '';
if ($excluded_options)
{
$options .= '<optgroup label="' . $user->lang['OPTIONS_EXCLUDED'] . '">';
$options .= implode('', $excluded_options);
$options .= '</optgroup>';
}
if ($banned_options)
{
$options .= '<optgroup label="' . $user->lang['OPTIONS_BANNED'] . '">';
$options .= implode('', $banned_options);
$options .= '</optgroup>';
}
$template->assign_vars(array(
'S_BAN_END_OPTIONS' => $ban_end_options,
'S_BANNED_OPTIONS' => ($banned_options) ? true : false,
'BANNED_OPTIONS' => $banned_options)
);
'S_BANNED_OPTIONS' => ($banned_options || $excluded_options) ? true : false,
'BANNED_OPTIONS' => $options,
));
}
}

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
* @todo add cron intervals to server settings? (database_gc, queue_interval, session_gc, search_gc, cache_gc, warnings_gc)
*/
@ -99,6 +98,7 @@ class acp_board
'load_cpf_pm' => array('lang' => 'LOAD_CPF_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_cpf_viewprofile' => array('lang' => 'LOAD_CPF_VIEWPROFILE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_cpf_viewtopic' => array('lang' => 'LOAD_CPF_VIEWTOPIC', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_jquery_cdn' => array('lang' => 'LOAD_JQUERY_CDN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend3' => 'ACP_SUBMIT_CHANGES',
)
@ -189,7 +189,7 @@ class acp_board
'hot_threshold' => array('lang' => 'HOT_THRESHOLD', 'validate' => 'int:0', 'type' => 'text:3:4', 'explain' => true),
'max_poll_options' => array('lang' => 'MAX_POLL_OPTIONS', 'validate' => 'int:2:127', 'type' => 'text:4:4', 'explain' => false),
'max_post_chars' => array('lang' => 'CHAR_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:6', 'explain' => true),
'min_post_chars' => array('lang' => 'MIN_CHAR_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:6', 'explain' => true),
'min_post_chars' => array('lang' => 'MIN_CHAR_LIMIT', 'validate' => 'int:1', 'type' => 'text:4:6', 'explain' => true),
'max_post_smilies' => array('lang' => 'SMILIES_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
'max_post_urls' => array('lang' => 'MAX_POST_URLS', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true),
'max_post_font_size' => array('lang' => 'MAX_POST_FONT_SIZE', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' %'),
@ -235,7 +235,7 @@ class acp_board
'max_name_chars' => array('lang' => 'USERNAME_LENGTH', 'validate' => 'int:8:180', 'type' => false, 'method' => false, 'explain' => false,),
'max_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int:8:255', 'type' => false, 'method' => false, 'explain' => false,),
'require_activation' => array('lang' => 'ACC_ACTIVATION', 'validate' => 'int', 'type' => 'custom', 'method' => 'select_acc_activation', 'explain' => true),
'require_activation' => array('lang' => 'ACC_ACTIVATION', 'validate' => 'int', 'type' => 'select', 'method' => 'select_acc_activation', 'explain' => true),
'new_member_post_limit' => array('lang' => 'NEW_MEMBER_POST_LIMIT', 'validate' => 'int:0:255', 'type' => 'text:4:4', 'explain' => true, 'append' => ' ' . $user->lang['POSTS']),
'new_member_group_default'=> array('lang' => 'NEW_MEMBER_GROUP_DEFAULT', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'min_name_chars' => array('lang' => 'USERNAME_LENGTH', 'validate' => 'int:1', 'type' => 'custom:5:180', 'method' => 'username_length', 'explain' => true),
@ -386,6 +386,8 @@ class acp_board
'referer_validation' => array('lang' => 'REFERER_VALID', 'validate' => 'int:0:3','type' => 'custom', 'method' => 'select_ref_check', 'explain' => true),
'check_dnsbl' => array('lang' => 'CHECK_DNSBL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'email_check_mx' => array('lang' => 'EMAIL_CHECK_MX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'max_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int:8:255', 'type' => false, 'method' => false, 'explain' => false,),
'min_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int:1', 'type' => 'custom', 'method' => 'password_length', 'explain' => true),
'pass_complex' => array('lang' => 'PASSWORD_TYPE', 'validate' => 'string', 'type' => 'select', 'method' => 'select_password_chars', 'explain' => true),
'chg_passforce' => array('lang' => 'FORCE_PASS_CHANGE', 'validate' => 'int:0', 'type' => 'text:3:3', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
'max_login_attempts' => array('lang' => 'MAX_LOGIN_ATTEMPTS', 'validate' => 'int:0', 'type' => 'text:3:3', 'explain' => true),
@ -771,24 +773,28 @@ class acp_board
/**
* Select account activation method
*/
function select_acc_activation($value, $key = '')
function select_acc_activation($selected_value, $value)
{
global $user, $config;
$radio_ary = array(
USER_ACTIVATION_DISABLE => 'ACC_DISABLE',
USER_ACTIVATION_NONE => 'ACC_NONE',
$act_ary = array(
'ACC_DISABLE' => USER_ACTIVATION_DISABLE,
'ACC_NONE' => USER_ACTIVATION_NONE,
);
if ($config['email_enable'])
{
$radio_ary[USER_ACTIVATION_SELF] = 'ACC_USER';
$radio_ary[USER_ACTIVATION_ADMIN] = 'ACC_ADMIN';
$act_ary['ACC_USER'] = USER_ACTIVATION_SELF;
$act_ary['ACC_ADMIN'] = USER_ACTIVATION_ADMIN;
}
$act_options = '';
foreach ($act_ary as $key => $value)
{
$selected = ($selected_value == $value) ? ' selected="selected"' : '';
$act_options .= '<option value="' . $value . '"' . $selected . '>' . $user->lang[$key] . '</option>';
}
$radio_text = h_radio('config[require_activation]', $radio_ary, $value, 'require_activation', $key, '<br />');
return $radio_text;
return $act_options;
}
/**

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*/
/**
@ -96,7 +95,7 @@ class acp_captcha
}
else if ($submit)
{
trigger_error($user->lang['FORM_INVALID'] . adm_back_link(), E_USER_WARNING);
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
else
{
@ -104,13 +103,13 @@ class acp_captcha
foreach ($captchas['available'] as $value => $title)
{
$current = ($selected !== false && $value == $selected) ? ' selected="selected"' : '';
$captcha_select .= '<option value="' . $value . '"' . $current . '>' . $user->lang[$title] . '</option>';
$captcha_select .= '<option value="' . $value . '"' . $current . '>' . $user->lang($title) . '</option>';
}
foreach ($captchas['unavailable'] as $value => $title)
{
$current = ($selected !== false && $value == $selected) ? ' selected="selected"' : '';
$captcha_select .= '<option value="' . $value . '"' . $current . ' class="disabled-option">' . $user->lang[$title] . '</option>';
$captcha_select .= '<option value="' . $value . '"' . $current . ' class="disabled-option">' . $user->lang($title) . '</option>';
}
$demo_captcha = phpbb_captcha_factory::get_instance($selected);

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@ -221,6 +220,7 @@ class acp_database
case 'submit':
$delete = request_var('delete', '');
$file = request_var('file', '');
$download = request_var('download', '');
if (!preg_match('#^backup_\d{10,}_[a-z\d]{16}\.(sql(?:\.(?:gz|bz2))?)$#', $file, $matches))
{
@ -247,10 +247,8 @@ class acp_database
confirm_box(false, $user->lang['DELETE_SELECTED_BACKUP'], build_hidden_fields(array('delete' => $delete, 'file' => $file)));
}
}
else
else if ($download || confirm_box(true))
{
$download = request_var('download', '');
if ($download)
{
$name = $matches[0];
@ -411,6 +409,10 @@ class acp_database
trigger_error($user->lang['RESTORE_SUCCESS'] . adm_back_link($this->u_action));
break;
}
else if (!$download)
{
confirm_box(false, $user->lang['RESTORE_SELECTED_BACKUP'], build_hidden_fields(array('file' => $file)));
}
default:
$methods = array('sql');

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@ -136,8 +135,9 @@ class acp_email
$i = $j = 0;
// Send with BCC, no more than 50 recipients for one mail (to not exceed the limit)
$max_chunk_size = 50;
// Send with BCC
// Maximum number of bcc recipients
$max_chunk_size = (int) $config['email_max_chunk_size'];
$email_list = array();
$old_lang = $row['user_lang'];
$old_notify_type = $row['user_notify_type'];
@ -194,10 +194,7 @@ class acp_email
$messenger->template('admin_send_email', $used_lang);
$messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
$messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
$messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
$messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
$messenger->anti_abuse_headers($config, $user);
$messenger->subject(htmlspecialchars_decode($subject));
$messenger->set_mail_priority($priority);

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@ -212,15 +211,11 @@ class acp_forums
$message = ($action == 'add') ? $user->lang['FORUM_CREATED'] : $user->lang['FORUM_UPDATED'];
// Redirect to permissions
if ($auth->acl_get('a_fauth') && !$copied_permissions)
{
$message .= '<br /><br />' . sprintf($user->lang['REDIRECT_ACL'], '<a href="' . append_sid("{$phpbb_admin_path}index.$phpEx", 'i=permissions' . $acl_url) . '">', '</a>');
}
// redirect directly to permission settings screen if authed
if ($action == 'add' && !$copied_permissions && $auth->acl_get('a_fauth'))
{
$message .= '<br /><br />' . sprintf($user->lang['REDIRECT_ACL'], '<a href="' . append_sid("{$phpbb_admin_path}index.$phpEx", 'i=permissions' . $acl_url) . '">', '</a>');
meta_refresh(4, append_sid("{$phpbb_admin_path}index.$phpEx", 'i=permissions' . $acl_url));
}
@ -875,7 +870,7 @@ class acp_forums
$errors = array();
if (!$forum_data['forum_name'])
if ($forum_data['forum_name'] == '')
{
$errors[] = $user->lang['FORUM_NAME_EMPTY'];
}

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@ -371,7 +370,7 @@ class acp_groups
{
if ($data['width'] > $config['avatar_max_width'] || $data['height'] > $config['avatar_max_height'])
{
$error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
$error[] = phpbb_avatar_error_wrong_size($data['width'], $data['height']);
}
}
@ -381,7 +380,7 @@ class acp_groups
{
if ($data['width'] < $config['avatar_min_width'] || $data['height'] < $config['avatar_min_height'])
{
$error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
$error[] = phpbb_avatar_error_wrong_size($data['width'], $data['height']);
}
}
}
@ -415,6 +414,9 @@ class acp_groups
// Only set the rank, colour, etc. if it's changed or if we're adding a new
// group. This prevents existing group members being updated if no changes
// were made.
// However there are some attributes that need to be set everytime,
// otherwise the group gets removed from the feature.
$set_attributes = array('legend', 'teampage');
$group_attributes = array();
$test_variables = array(
@ -435,7 +437,7 @@ class acp_groups
foreach ($test_variables as $test => $type)
{
if (isset($submit_ary[$test]) && ($action == 'add' || $group_row['group_' . $test] != $submit_ary[$test]))
if (isset($submit_ary[$test]) && ($action == 'add' || $group_row['group_' . $test] != $submit_ary[$test] || in_array($test, $set_attributes)))
{
settype($submit_ary[$test], $type);
$group_attributes['group_' . $test] = $group_row['group_' . $test] = $submit_ary[$test];
@ -624,7 +626,7 @@ class acp_groups
'U_BACK' => $u_back,
'U_SWATCH' => append_sid("{$phpbb_admin_path}swatch.$phpEx", 'form=settings&amp;name=group_colour'),
'U_ACTION' => "{$this->u_action}&amp;action=$action&amp;g=$group_id",
'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], round($config['avatar_filesize'] / 1024)),
'L_AVATAR_EXPLAIN' => phpbb_avatar_explanation_string(),
));
return;
@ -832,7 +834,7 @@ class acp_groups
case 'set_config_teampage':
set_config('teampage_forums', request_var('teampage_forums', 0));
set_config('teampage_multiple', request_var('teampage_multiple', 0));
set_config('teampage_memberships', request_var('teampage_memberships', 0));
break;
case 'add':
@ -913,11 +915,11 @@ class acp_groups
'U_ACTION_LEGEND' => $this->u_action . '&amp;field=legend',
'U_ACTION_TEAMPAGE' => $this->u_action . '&amp;field=teampage',
'S_GROUP_SELECT_LEGEND' => $s_group_select_legend,
'S_GROUP_SELECT_TEAMPAGE' => $s_group_select_teampage,
'DISPLAY_FORUMS' => ($config['teampage_forums']) ? true : false,
'DISPLAY_MULTIPLE' => ($config['teampage_multiple']) ? true : false,
'LEGEND_SORT_GROUPNAME' => ($config['legend_sort_groupname']) ? true : false,
'S_GROUP_SELECT_LEGEND' => $s_group_select_legend,
'S_GROUP_SELECT_TEAMPAGE' => $s_group_select_teampage,
'DISPLAY_FORUMS' => ($config['teampage_forums']) ? true : false,
'DISPLAY_MEMBERSHIPS' => $config['teampage_memberships'],
'LEGEND_SORT_GROUPNAME' => ($config['legend_sort_groupname']) ? true : false,
));
}
}

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@ -379,7 +378,7 @@ class acp_icons
if ($smiley_count + $addable_smileys_count > SMILEY_LIMIT)
{
trigger_error(sprintf($user->lang['TOO_MANY_SMILIES'], SMILEY_LIMIT) . adm_back_link($this->u_action), E_USER_WARNING);
trigger_error($user->lang('TOO_MANY_SMILIES', SMILEY_LIMIT) . adm_back_link($this->u_action), E_USER_WARNING);
}
}
@ -487,21 +486,7 @@ class acp_icons
$cache->destroy('_icons');
$cache->destroy('sql', $table);
$level = E_USER_NOTICE;
switch ($icons_updated)
{
case 0:
$suc_lang = "{$lang}_NONE";
$level = E_USER_WARNING;
break;
case 1:
$suc_lang = "{$lang}_ONE";
break;
default:
$suc_lang = $lang;
}
$level = ($icons_updated) ? E_USER_NOTICE : E_USER_WARNING;
$errormsgs = '';
foreach ($errors as $img => $error)
{
@ -509,11 +494,11 @@ class acp_icons
}
if ($action == 'modify')
{
trigger_error($user->lang[$suc_lang . '_EDITED'] . $errormsgs . adm_back_link($this->u_action), $level);
trigger_error($user->lang($lang . '_EDITED', $icons_updated) . $errormsgs . adm_back_link($this->u_action), $level);
}
else
{
trigger_error($user->lang[$suc_lang . '_ADDED'] . $errormsgs . adm_back_link($this->u_action), $level);
trigger_error($user->lang($lang . '_ADDED', $icons_updated) . $errormsgs . adm_back_link($this->u_action), $level);
}
break;
@ -599,7 +584,7 @@ class acp_icons
$smiley_count = $this->item_count($table);
if ($smiley_count + sizeof($pak_ary) > SMILEY_LIMIT)
{
trigger_error(sprintf($user->lang['TOO_MANY_SMILIES'], SMILEY_LIMIT) . adm_back_link($this->u_action), E_USER_WARNING);
trigger_error($user->lang('TOO_MANY_SMILIES', SMILEY_LIMIT) . adm_back_link($this->u_action), E_USER_WARNING);
}
}

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2006 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@ -118,10 +117,7 @@ class acp_inactive
$messenger->to($row['user_email'], $row['username']);
$messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
$messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
$messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
$messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
$messenger->anti_abuse_headers($config, $user);
$messenger->assign_vars(array(
'USERNAME' => htmlspecialchars_decode($row['username']))
@ -209,10 +205,7 @@ class acp_inactive
$messenger->to($row['user_email'], $row['username']);
$messenger->im($row['user_jabber'], $row['username']);
$messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
$messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
$messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
$messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
$messenger->anti_abuse_headers($config, $user);
$messenger->assign_vars(array(
'USERNAME' => htmlspecialchars_decode($row['username']),

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
* @todo Check/enter/update transport info
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@ -869,6 +868,9 @@ class acp_language
$default_lang_id = (int) $db->sql_fetchfield('lang_id');
$db->sql_freeresult($result);
// We want to notify the admin that custom profile fields need to be updated for the new language.
$notify_cpf_update = false;
// From the mysql documentation:
// Prior to MySQL 4.0.14, the target table of the INSERT statement cannot appear in the FROM clause of the SELECT part of the query. This limitation is lifted in 4.0.14.
// Due to this we stay on the safe side if we do the insertion "the manual way"
@ -882,6 +884,7 @@ class acp_language
{
$row['lang_id'] = $lang_id;
$db->sql_query('INSERT INTO ' . PROFILE_LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $row));
$notify_cpf_update = true;
}
$db->sql_freeresult($result);
@ -894,12 +897,15 @@ class acp_language
{
$row['lang_id'] = $lang_id;
$db->sql_query('INSERT INTO ' . PROFILE_FIELDS_LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $row));
$notify_cpf_update = true;
}
$db->sql_freeresult($result);
add_log('admin', 'LOG_LANGUAGE_PACK_INSTALLED', $lang_pack['name']);
trigger_error(sprintf($user->lang['LANGUAGE_PACK_INSTALLED'], $lang_pack['name']) . adm_back_link($this->u_action));
$message = sprintf($user->lang['LANGUAGE_PACK_INSTALLED'], $lang_pack['name']);
$message .= ($notify_cpf_update) ? '<br /><br />' . $user->lang['LANGUAGE_PACK_CPF_UPDATE'] : '';
trigger_error($message . adm_back_link($this->u_action));
break;
@ -1129,10 +1135,9 @@ class acp_language
* {FILENAME} [{LANG_NAME}]
*
* @package language
* @version $' . 'Id: ' . '$
* @copyright (c) ' . date('Y') . ' phpBB Group
* @author {CHANGED} - {AUTHOR}
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@ -600,6 +599,17 @@ class acp_main
$template->assign_var('S_WRITABLE_CONFIG', (bool) (@fileperms($phpbb_root_path . 'config.' . $phpEx) & 0x0002));
}
if (extension_loaded('mbstring'))
{
$template->assign_vars(array(
'S_MBSTRING_LOADED' => true,
'S_MBSTRING_FUNC_OVERLOAD_FAIL' => (intval(@ini_get('mbstring.func_overload')) & (MB_OVERLOAD_MAIL | MB_OVERLOAD_STRING)),
'S_MBSTRING_ENCODING_TRANSLATION_FAIL' => (@ini_get('mbstring.encoding_translation') != 0),
'S_MBSTRING_HTTP_INPUT_FAIL' => (@ini_get('mbstring.http_input') != 'pass'),
'S_MBSTRING_HTTP_OUTPUT_FAIL' => (@ini_get('mbstring.http_output') != 'pass'),
));
}
// Fill dbms version if not yet filled
if (empty($config['dbms_version']))
{

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@ -111,7 +110,7 @@ class acp_modules
}
break;
case 'enable':
case 'disable':
if (!$module_id)
@ -170,7 +169,7 @@ class acp_modules
add_log('admin', 'LOG_MODULE_' . strtoupper($action), $this->lang_name($row['module_langname']), $move_module_name);
$this->remove_cache_file();
}
break;
case 'quickadd':
@ -207,7 +206,7 @@ class acp_modules
if (!sizeof($errors))
{
$this->remove_cache_file();
trigger_error($user->lang['MODULE_ADDED'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
}
}
@ -231,7 +230,7 @@ class acp_modules
{
trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
}
$module_row = $this->get_module_row($module_id);
// no break
@ -250,7 +249,7 @@ class acp_modules
'module_auth' => '',
);
}
$module_data = array();
$module_data['module_basename'] = request_var('module_basename', (string) $module_row['module_basename']);
@ -295,7 +294,7 @@ class acp_modules
if (!sizeof($errors))
{
$this->remove_cache_file();
trigger_error((($action == 'add') ? $user->lang['MODULE_ADDED'] : $user->lang['MODULE_EDITED']) . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
}
}
@ -316,7 +315,7 @@ class acp_modules
}
// Name options
$s_name_options .= '<option value="' . $option . '"' . (($option == $module_data['module_basename']) ? ' selected="selected"' : '') . '>' . $this->lang_name($values['title']) . ' [' . $this->module_class . '_' . $option . ']</option>';
$s_name_options .= '<option value="' . $option . '"' . (($option == $module_data['module_basename']) ? ' selected="selected"' : '') . '>' . $this->lang_name($values['title']) . ' [' . $option . ']</option>';
$template->assign_block_vars('m_names', array('NAME' => $option, 'A_NAME' => addslashes($option)));
@ -327,7 +326,7 @@ class acp_modules
{
$s_mode_options .= '<option value="' . $m_mode . '"' . (($m_mode == $module_data['module_mode']) ? ' selected="selected"' : '') . '>' . $this->lang_name($m_values['title']) . '</option>';
}
$template->assign_block_vars('m_names.modes', array(
'OPTION' => $m_mode,
'VALUE' => $this->lang_name($m_values['title']),
@ -336,7 +335,7 @@ class acp_modules
);
}
}
$s_cat_option = '<option value="0"' . (($module_data['parent_id'] == 0) ? ' selected="selected"' : '') . '>' . $user->lang['NO_PARENT'] . '</option>';
$template->assign_vars(array_merge(array(
@ -349,7 +348,7 @@ class acp_modules
'U_EDIT_ACTION' => $this->u_action . '&amp;parent_id=' . $this->parent_id,
'L_TITLE' => $user->lang[strtoupper($action) . '_MODULE'],
'MODULENAME' => $this->lang_name($module_data['module_langname']),
'ACTION' => $action,
'MODULE_ID' => $module_id,
@ -480,7 +479,7 @@ class acp_modules
foreach ($module_infos as $option => $values)
{
// Name options
$s_install_options .= '<optgroup label="' . $this->lang_name($values['title']) . ' [' . $this->module_class . '_' . $option . ']">';
$s_install_options .= '<optgroup label="' . $this->lang_name($values['title']) . ' [' . $option . ']">';
// Build module modes
foreach ($values['modes'] as $m_mode => $m_values)
@ -516,7 +515,7 @@ class acp_modules
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!$row)
{
trigger_error($user->lang['NO_MODULE'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
@ -524,14 +523,14 @@ class acp_modules
return $row;
}
/**
* Get available module information from module files
*/
function get_module_infos($module = '', $module_class = false)
{
global $phpbb_root_path, $phpEx;
$module_class = ($module_class === false) ? $this->module_class : $module_class;
$directory = $phpbb_root_path . 'includes/' . $module_class . '/info/';
@ -539,57 +538,72 @@ class acp_modules
if (!$module)
{
$dh = @opendir($directory);
global $phpbb_extension_manager;
if (!$dh)
{
return $fileinfo;
}
$finder = $phpbb_extension_manager->get_finder();
while (($file = readdir($dh)) !== false)
$modules = $finder
->extension_suffix('_module')
->extension_directory("/$module_class")
->core_path("includes/$module_class/info/")
->core_prefix($module_class . '_')
->get_classes();
foreach ($modules as $module)
{
// Is module?
if (preg_match('/^' . $module_class . '_.+\.' . $phpEx . '$/', $file))
$info_class = preg_replace('/_module$/', '_info', $module);
// If the class does not exist it might be following the old
// 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))
{
$class = str_replace(".$phpEx", '', $file) . '_info';
if (!class_exists($class))
$info_class = str_replace("phpbb_{$module_class}_info_", '', $module) . '_info';
if (file_exists($directory . $info_class . '.' . $phpEx))
{
include($directory . $file);
}
// Get module title tag
if (class_exists($class))
{
$c_class = new $class();
$module_info = $c_class->module();
$fileinfo[str_replace($module_class . '_', '', $module_info['filename'])] = $module_info;
include($directory . $info_class . '.' . $phpEx);
}
}
if (class_exists($info_class))
{
$info = new $info_class();
$module_info = $info->module();
$main_class = (isset($module_info['filename'])) ? $module_info['filename'] : $module;
$fileinfo[$main_class] = $module_info;
}
}
closedir($dh);
ksort($fileinfo);
}
else
{
$filename = $module_class . '_' . basename($module);
$class = $module_class . '_' . basename($module) . '_info';
$info_class = preg_replace('/_module$/', '_info', $module);
if (!class_exists($class))
if (!class_exists($info_class))
{
include($directory . $filename . '.' . $phpEx);
if (file_exists($directory . $module . '.' . $phpEx))
{
include($directory . $module . '.' . $phpEx);
}
$info_class = $module . '_info';
}
// Get module title tag
if (class_exists($class))
if (class_exists($info_class))
{
$c_class = new $class();
$module_info = $c_class->module();
$fileinfo[str_replace($module_class . '_', '', $module_info['filename'])] = $module_info;
$info = new $info_class();
$module_info = $info->module();
$main_class = (isset($module_info['filename'])) ? $module_info['filename'] : $module;
$fileinfo[$main_class] = $module_info;
}
}
return $fileinfo;
}
@ -721,7 +735,7 @@ class acp_modules
// Sanitise for future path use, it's escaped as appropriate for queries
$p_class = str_replace(array('.', '/', '\\'), '', basename($this->module_class));
$cache->destroy('_modules_' . $p_class);
// Additionally remove sql cache

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@ -199,7 +198,7 @@ class acp_ranks
'RANK_TITLE' => (isset($ranks['rank_title'])) ? $ranks['rank_title'] : '',
'S_FILENAME_LIST' => $filename_list,
'RANK_IMAGE' => ($edit_img) ? $phpbb_root_path . $config['ranks_path'] . '/' . $edit_img : $phpbb_admin_path . 'images/spacer.gif',
'S_SPECIAL_RANK' => (!isset($ranks['rank_special']) || $ranks['rank_special']) ? true : false,
'S_SPECIAL_RANK' => (isset($ranks['rank_special']) && $ranks['rank_special']) ? true : false,
'MIN_POSTS' => (isset($ranks['rank_min']) && !$ranks['rank_special']) ? $ranks['rank_min'] : 0)
);

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@ -77,7 +76,8 @@ class acp_search
continue;
}
$name = ucfirst(strtolower(str_replace('_', ' ', $type)));
$name = $search->get_name();
$selected = ($config['search_type'] == $type) ? ' selected="selected"' : '';
$search_options .= '<option value="' . $type . '"' . $selected . '>' . $name . '</option>';
@ -275,7 +275,7 @@ class acp_search
{
trigger_error($error . adm_back_link($this->u_action), E_USER_WARNING);
}
$name = ucfirst(strtolower(str_replace('_', ' ', $this->state[0])));
$name = $this->search->get_name();
$action = &$this->state[1];
@ -337,7 +337,7 @@ class acp_search
$totaltime = $mtime[0] + $mtime[1] - $starttime;
$rows_per_second = $row_count / $totaltime;
meta_refresh(1, append_sid($this->u_action . '&amp;action=delete&amp;skip_rows=' . $post_counter));
trigger_error(sprintf($user->lang['SEARCH_INDEX_DELETE_REDIRECT'], $post_counter, $row_count, $rows_per_second));
trigger_error($user->lang('SEARCH_INDEX_DELETE_REDIRECT', (int) $row_count, $post_counter, $rows_per_second));
}
}
@ -427,7 +427,7 @@ class acp_search
$totaltime = $mtime[0] + $mtime[1] - $starttime;
$rows_per_second = $row_count / $totaltime;
meta_refresh(1, append_sid($this->u_action . '&amp;action=create&amp;skip_rows=' . $post_counter));
trigger_error(sprintf($user->lang['SEARCH_INDEX_CREATE_REDIRECT'], $post_counter, $row_count, $rows_per_second));
trigger_error($user->lang('SEARCH_INDEX_CREATE_REDIRECT', (int) $row_count, $post_counter) . $user->lang('SEARCH_INDEX_CREATE_REDIRECT_RATE', $rows_per_second));
}
}
@ -454,7 +454,7 @@ class acp_search
continue;
}
$name = ucfirst(strtolower(str_replace('_', ' ', $type)));
$name = $search->get_name();
$data = array();
if (method_exists($search, 'index_stats'))
@ -553,27 +553,15 @@ class acp_search
function get_search_types()
{
global $phpbb_root_path, $phpEx;
global $phpbb_root_path, $phpEx, $phpbb_extension_manager;
$search_types = array();
$finder = $phpbb_extension_manager->get_finder();
$dp = @opendir($phpbb_root_path . 'includes/search');
if ($dp)
{
while (($file = readdir($dp)) !== false)
{
if ((preg_match('#\.' . $phpEx . '$#', $file)) && ($file != "search.$phpEx"))
{
$search_types[] = preg_replace('#^(.*?)\.' . $phpEx . '$#', '\1', $file);
}
}
closedir($dp);
sort($search_types);
}
return $search_types;
return $finder
->extension_suffix('_backend')
->extension_directory('/search')
->core_path('includes/search/')
->get_classes();
}
function get_max_post_id()
@ -610,15 +598,7 @@ class acp_search
{
global $phpbb_root_path, $phpEx, $user;
if (!preg_match('#^\w+$#', $type) || !file_exists("{$phpbb_root_path}includes/search/$type.$phpEx"))
{
$error = $user->lang['NO_SUCH_SEARCH_MODULE'];
return $error;
}
include_once("{$phpbb_root_path}includes/search/$type.$phpEx");
if (!class_exists($type))
if (!class_exists($type) || !method_exists($type, 'get_name'))
{
$error = $user->lang['NO_SUCH_SEARCH_MODULE'];
return $error;

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@ -62,7 +61,7 @@ class acp_styles
#
# @package phpBB3
# @copyright (c) 2005 phpBB Group
# @license http://opensource.org/licenses/gpl-license.php GNU Public License
# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
#
#
# At the left is the name, please do not change this
@ -84,11 +83,11 @@ version = {VERSION}
$this->template_cfg .= '
# Some configuration options
#
# You can use this function to inherit templates from another template.
# The template of the given name has to be installed.
# Templates cannot inherit from inheriting templates.
#';
# Template inheritance
# See http://blog.phpbb.com/2008/07/31/templating-just-got-easier/
# Set value to empty or this template name to ignore template inheritance.
inherit_from = {INHERIT_FROM}
';
// Execute overall actions
switch ($action)
@ -258,12 +257,14 @@ version = {VERSION}
global $user, $template, $db, $config, $phpbb_root_path, $phpEx;
$sql_from = '';
$sql_sort = 'LOWER(' . $mode . '_name)';
$style_count = array();
switch ($mode)
{
case 'style':
$sql_from = STYLES_TABLE;
$sql_sort = 'style_active DESC, ' . $sql_sort;
$sql = 'SELECT user_style, COUNT(user_style) AS style_count
FROM ' . USERS_TABLE . '
@ -285,6 +286,9 @@ version = {VERSION}
case 'theme':
$sql_from = STYLES_THEME_TABLE;
break;
default:
trigger_error($user->lang['NO_MODE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$l_prefix = strtoupper($mode);
@ -308,7 +312,8 @@ version = {VERSION}
);
$sql = "SELECT *
FROM $sql_from";
FROM $sql_from
ORDER BY $sql_sort ASC";
$result = $db->sql_query($sql);
$installed = array();
@ -344,6 +349,8 @@ version = {VERSION}
'NAME' => $row[$mode . '_name'],
'STYLE_COUNT' => ($mode == 'style' && isset($style_count[$row['style_id']])) ? $style_count[$row['style_id']] : 0,
'S_INACTIVE' => ($mode == 'style' && !$row['style_active']) ? true : false,
)
);
}
@ -962,6 +969,13 @@ version = {VERSION}
trigger_error($user->lang['NO_' . $l_prefix] . adm_back_link($this->u_action), E_USER_WARNING);
}
$s_only_component = $this->display_component_options($mode, $style_row[$mode . '_id'], $style_row);
if ($s_only_component)
{
trigger_error($user->lang['ONLY_' . $l_prefix] . adm_back_link($this->u_action), E_USER_WARNING);
}
if ($update)
{
if ($mode == 'style')
@ -1006,8 +1020,6 @@ version = {VERSION}
trigger_error($user->lang[$message] . adm_back_link($this->u_action));
}
$this->display_component_options($mode, $style_row[$mode . '_id'], $style_row);
$this->page_title = 'DELETE_' . $l_prefix;
$template->assign_vars(array(
@ -1082,11 +1094,14 @@ version = {VERSION}
/**
* Display the options which can be used to replace a style/template/theme
*
* @return boolean Returns true if the component is the only component and can not be deleted.
*/
function display_component_options($component, $component_id, $style_row = false, $style_id = false)
{
global $db, $template, $user;
$is_only_component = true;
$component_in_use = array();
if ($component != 'style')
{
@ -1114,6 +1129,9 @@ version = {VERSION}
$s_options = '';
if (($component != 'style') && empty($component_in_use))
{
// If it is not in use, there must be another component
$is_only_component = false;
$sql = "SELECT {$component}_id, {$component}_name
FROM $sql_from
WHERE {$component}_id = {$component_id}";
@ -1137,6 +1155,7 @@ version = {VERSION}
{
if ($row[$component . '_id'] != $component_id)
{
$is_only_component = false;
$s_options .= '<option value="' . $row[$component . '_id'] . '">' . sprintf($user->lang['REPLACE_WITH_OPTION'], $row[$component . '_name']) . '</option>';
}
else if ($component != 'style')
@ -1164,6 +1183,8 @@ version = {VERSION}
}
}
}
return $is_only_component;
}
/**
@ -1325,9 +1346,7 @@ version = {VERSION}
// Export template core code
if ($mode == 'template' || $inc_template)
{
$template_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}'), array($mode, $style_row['template_name'], $style_row['template_copyright'], $config['version']), $this->template_cfg);
$use_template_name = '';
$use_template_name = $style_row['template_name'];
// Add the inherit from variable, depending on it's use...
if ($style_row['template_inherits_id'])
@ -1341,7 +1360,8 @@ version = {VERSION}
$db->sql_freeresult($result);
}
$template_cfg .= ($use_template_name) ? "\ninherit_from = $use_template_name" : "\n#inherit_from = ";
$template_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}', '{INHERIT_FROM}'), array($mode, $style_row['template_name'], $style_row['template_copyright'], $config['version'], $use_template_name), $this->template_cfg);
$template_cfg .= "\n\nbbcode_bitfield = {$style_row['bbcode_bitfield']}";
$data[] = array(
@ -2400,7 +2420,7 @@ version = {VERSION}
$select_bf = '';
}
$sql = "SELECT {$mode}_id, {$mode}_name, {$mode}_path, $select_bf
$sql = "SELECT {$mode}_id, {$mode}_name, {$mode}_path $select_bf
FROM $sql_from
WHERE {$mode}_name = '" . $db->sql_escape($cfg_data['inherit_from']) . "'
AND {$mode}_inherits_id = 0";

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@ -37,7 +36,7 @@ class acp_update
$errstr = '';
$errno = 0;
$info = obtain_latest_version_info(request_var('versioncheck_force', false), true);
$info = obtain_latest_version_info(request_var('versioncheck_force', false));
if ($info === false)
{

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@ -120,7 +119,7 @@ class acp_users
// Build modes dropdown list
$sql = 'SELECT module_mode, module_auth
FROM ' . MODULES_TABLE . "
WHERE module_basename = 'users'
WHERE module_basename = 'acp_users'
AND module_enabled = 1
AND module_class = 'acp'
ORDER BY left_id, module_mode";
@ -348,10 +347,7 @@ class acp_users
$messenger->to($user_row['user_email'], $user_row['username']);
$messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
$messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
$messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
$messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
$messenger->anti_abuse_headers($config, $user);
$messenger->assign_vars(array(
'WELCOME_MSG' => htmlspecialchars_decode(sprintf($user->lang['WELCOME_SUBJECT'], $config['sitename'])),
@ -406,10 +402,7 @@ class acp_users
$messenger->to($user_row['user_email'], $user_row['username']);
$messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
$messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
$messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
$messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
$messenger->anti_abuse_headers($config, $user);
$messenger->assign_vars(array(
'USERNAME' => htmlspecialchars_decode($user_row['username']))
@ -763,7 +756,6 @@ class acp_users
'username' => utf8_normalize_nfc(request_var('user', $user_row['username'], true)),
'user_founder' => request_var('user_founder', ($user_row['user_type'] == USER_FOUNDER) ? 1 : 0),
'email' => strtolower(request_var('user_email', $user_row['user_email'])),
'email_confirm' => strtolower(request_var('email_confirm', '')),
'new_password' => request_var('new_password', '', true),
'password_confirm' => request_var('password_confirm', '', true),
);
@ -795,7 +787,6 @@ class acp_users
array('string', false, 6, 60),
array('email', $user_row['user_email'])
),
'email_confirm' => array('string', true, 6, 60)
);
}
@ -806,11 +797,6 @@ class acp_users
$error[] = 'NEW_PASSWORD_ERROR';
}
if ($data['email'] != $user_row['user_email'] && $data['email_confirm'] != $data['email'])
{
$error[] = 'NEW_EMAIL_ERROR';
}
if (!check_form_key($form_name))
{
$error[] = 'FORM_INVALID';
@ -818,7 +804,7 @@ class acp_users
// Which updates do we need to do?
$update_username = ($user_row['username'] != $data['username']) ? $data['username'] : false;
$update_password = ($data['new_password'] && !phpbb_check_hash($user_row['user_password'], $data['new_password'])) ? true : false;
$update_password = ($data['new_password'] && !phpbb_check_hash($data['new_password'], $user_row['user_password'])) ? true : false;
$update_email = ($data['email'] != $user_row['user_email']) ? $data['email'] : false;
if (!sizeof($error))
@ -1016,8 +1002,8 @@ class acp_users
$db->sql_freeresult($result);
$template->assign_vars(array(
'L_NAME_CHARS_EXPLAIN' => sprintf($user->lang[$config['allow_name_chars'] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']),
'L_CHANGE_PASSWORD_EXPLAIN' => sprintf($user->lang[$config['pass_complex'] . '_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']),
'L_NAME_CHARS_EXPLAIN' => $user->lang($config['allow_name_chars'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_name_chars']), $user->lang('CHARACTERS', (int) $config['max_name_chars'])),
'L_CHANGE_PASSWORD_EXPLAIN' => $user->lang($config['pass_complex'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_pass_chars']), $user->lang('CHARACTERS', (int) $config['max_pass_chars'])),
'L_POSTS_IN_QUEUE' => $user->lang('NUM_POSTS_IN_QUEUE', $user_row['posts_in_queue']),
'S_FOUNDER' => ($user->data['user_type'] == USER_FOUNDER) ? true : false,
@ -1754,8 +1740,8 @@ class acp_users
'USER_AVATAR_WIDTH' => $user_row['user_avatar_width'],
'USER_AVATAR_HEIGHT' => $user_row['user_avatar_height'],
'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], round($config['avatar_filesize'] / 1024)))
);
'L_AVATAR_EXPLAIN' => phpbb_avatar_explanation_string(),
));
break;
@ -1887,7 +1873,7 @@ class acp_users
'FLASH_STATUS' => ($config['allow_sig_flash']) ? $user->lang['FLASH_IS_ON'] : $user->lang['FLASH_IS_OFF'],
'URL_STATUS' => ($config['allow_sig_links']) ? $user->lang['URL_IS_ON'] : $user->lang['URL_IS_OFF'],
'L_SIGNATURE_EXPLAIN' => sprintf($user->lang['SIGNATURE_EXPLAIN'], $config['max_sig_chars']),
'L_SIGNATURE_EXPLAIN' => $user->lang('SIGNATURE_EXPLAIN', (int) $config['max_sig_chars']),
'S_BBCODE_ALLOWED' => $config['allow_sig_bbcode'],
'S_SMILIES_ALLOWED' => $config['allow_sig_smilies'],
@ -2345,46 +2331,61 @@ class acp_users
}
/**
* Optionset replacement for this module based on $user->optionset
* Set option bit field for user options in a user row array.
*
* Optionset replacement for this module based on $user->optionset.
*
* @param array $user_row Row from the users table.
* @param int $key Option key, as defined in $user->keyoptions property.
* @param bool $value True to set the option, false to clear the option.
* @param int $data Current bit field value, or false to use $user_row['user_options']
* @return int|bool If $data is false, the bit field is modified and
* written back to $user_row['user_options'], and
* return value is true if the bit field changed and
* false otherwise. If $data is not false, the new
* bitfield value is returned.
*/
function optionset(&$user_row, $key, $value, $data = false)
{
global $user;
$var = ($data) ? $data : $user_row['user_options'];
$var = ($data !== false) ? $data : $user_row['user_options'];
if ($value && !($var & 1 << $user->keyoptions[$key]))
$new_var = phpbb_optionset($user->keyoptions[$key], $value, $var);
if ($data === false)
{
$var += 1 << $user->keyoptions[$key];
}
else if (!$value && ($var & 1 << $user->keyoptions[$key]))
{
$var -= 1 << $user->keyoptions[$key];
if ($new_var != $var)
{
$user_row['user_options'] = $new_var;
return true;
}
else
{
return false;
}
}
else
{
return ($data) ? $var : false;
}
if (!$data)
{
$user_row['user_options'] = $var;
return true;
}
else
{
return $var;
return $new_var;
}
}
/**
* Optionget replacement for this module based on $user->optionget
* Get option bit field from user options in a user row array.
*
* Optionget replacement for this module based on $user->optionget.
*
* @param array $user_row Row from the users table.
* @param int $key option key, as defined in $user->keyoptions property.
* @param int $data bit field value to use, or false to use $user_row['user_options']
* @return bool true if the option is set in the bit field, false otherwise
*/
function optionget(&$user_row, $key, $data = false)
{
global $user;
$var = ($data) ? $data : $user_row['user_options'];
return ($var & 1 << $user->keyoptions[$key]) ? true : false;
$var = ($data !== false) ? $data : $user_row['user_options'];
return phpbb_optionget($user->keyoptions[$key], $var);
}
}

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package phpBB3
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2006 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View file

@ -2,9 +2,8 @@
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

Some files were not shown because too many files have changed in this diff Show more