1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-05 05:55:15 +02:00

Merge branch 'develop' into feature/extension-manager

* develop: (93 commits)
  [ticket/10157] Add notification to update cpfs when installing a language.
  [ticket/10185] Always set board startdate on conversion
  [ticket/10419] Reword the language strings
  [ticket/9361] View correct error messages when editing account information
  [ticket/10457] Undefined variable $request, when print-viewing PMs
  [ticket/10452] Fix xHTML errors when print-viewing PMs
  [ticket/9066] Move regex into get_preg_expression function and add tests
  [ticket/10254] Add "phpBB Group" to "Modified by" in prosilver stylesheet.css
  [ticket/10254] Removing the subsilver2 NOTE, incompatible with phpBB.com.
  [ticket/10254] Removing the NOTE as it is incompatible with phpBB.com.
  [ticket/10254] Remove subsilver2 as default style on theme.
  [ticket/10254] Remove style names from themes and fix some informations on it.
  [ticket/7138] Allow simple header and footer for trigger_error() messages
  [ticket/9066] Disallow some database prefix to prevent same errors and problems
  [ticket/10365] Fix up S_POST_UNAPPROVED check, make it easier to read
  [ticket/10437] Do not display announcements that are waiting for approval
  [ticket/10087] Organize bans in acp_baninto optgroups
  [ticket/8616] Include old U_INBOX var for BC
  [ticket/10435] Remove global announcement from forums total topic count
  [ticket/10435] Readd local announcements to total topic count in viewforum
  ...

Conflicts:
	phpBB/install/database_update.php
This commit is contained in:
Nils Adermann 2011-11-18 19:14:06 +01:00
commit addf81f62e
98 changed files with 1182 additions and 711 deletions
phpBB
phpunit.xml.allphpunit.xml.distphpunit.xml.functional
tests
vendor

@ -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>

@ -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>

@ -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>

@ -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>

@ -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>

@ -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>

@ -59,15 +59,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'))

@ -12,11 +12,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 +238,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 +247,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;
@ -1650,14 +1657,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'),
),
);
@ -1690,35 +1695,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'),

@ -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>

@ -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>
@ -501,12 +495,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 +549,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 +738,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 +899,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 +984,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 +997,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 +1064,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 +1082,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 +1090,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 +1156,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 +1176,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 +1225,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 +1513,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 +1609,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 +1625,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 +1754,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,51 +2404,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
<hr />
<a name="vcs"></a><h2>7. VCS Guidelines</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>
<a name="disclaimer"></a><h2>8. Copyright and disclaimer</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>

@ -175,12 +175,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 +250,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,
));
}
}

@ -99,6 +99,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 +190,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' => ' %'),

@ -136,8 +136,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'];

@ -212,15 +212,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 +871,7 @@ class acp_forums
$errors = array();
if (!$forum_data['forum_name'])
if ($forum_data['forum_name'] == '')
{
$errors[] = $user->lang['FORUM_NAME_EMPTY'];
}

@ -415,6 +415,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 +438,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];
@ -832,7 +835,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 +916,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,
));
}
}

@ -869,6 +869,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 +885,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 +898,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;

@ -600,6 +600,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']))
{

@ -199,7 +199,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)
);

@ -37,7 +37,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)
{

@ -818,7 +818,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))

@ -108,6 +108,15 @@ function login_db($username, $password, $ip = '', $browser = '', $forwarded_for
if (!$row)
{
if ($config['ip_login_limit_max'] && $attempts >= $config['ip_login_limit_max'])
{
return array(
'status' => LOGIN_ERROR_ATTEMPTS,
'error_msg' => 'LOGIN_ERROR_ATTEMPTS',
'user_row' => array('user_id' => ANONYMOUS),
);
}
return array(
'status' => LOGIN_ERROR_USERNAME,
'error_msg' => 'LOGIN_ERROR_USERNAME',

@ -347,6 +347,66 @@ class phpbb_db_tools
}
}
/**
* Gets a list of tables in the database.
*
* @return array Array of table names (all lower case)
*/
function sql_list_tables()
{
switch ($this->db->sql_layer)
{
case 'mysql':
case 'mysql4':
case 'mysqli':
$sql = 'SHOW TABLES';
break;
case 'sqlite':
$sql = 'SELECT name
FROM sqlite_master
WHERE type = "table"';
break;
case 'mssql':
case 'mssql_odbc':
case 'mssqlnative':
$sql = "SELECT name
FROM sysobjects
WHERE type='U'";
break;
case 'postgres':
$sql = 'SELECT relname
FROM pg_stat_user_tables';
break;
case 'firebird':
$sql = 'SELECT rdb$relation_name
FROM rdb$relations
WHERE rdb$view_source is null
AND rdb$system_flag = 0';
break;
case 'oracle':
$sql = 'SELECT table_name
FROM USER_TABLES';
break;
}
$result = $this->db->sql_query($sql);
$tables = array();
while ($row = $this->db->sql_fetchrow($result))
{
$name = current($row);
$tables[$name] = $name;
}
$this->db->sql_freeresult($result);
return $tables;
}
/**
* Check if table exists
*
@ -1011,34 +1071,21 @@ class phpbb_db_tools
}
/**
* Check if a specified column exist
* Gets a list of columns of a table.
*
* @param string $table Table to check the column at
* @param string $column_name The column to check
* @param string $table Table name
*
* @return bool True if column exists, else false
* @return array Array of column names (all lower case)
*/
function sql_column_exists($table, $column_name)
function sql_list_columns($table)
{
$columns = array();
switch ($this->sql_layer)
{
case 'mysql_40':
case 'mysql_41':
$sql = "SHOW COLUMNS FROM $table";
$result = $this->db->sql_query($sql);
while ($row = $this->db->sql_fetchrow($result))
{
// lower case just in case
if (strtolower($row['Field']) == $column_name)
{
$this->db->sql_freeresult($result);
return true;
}
}
$this->db->sql_freeresult($result);
return false;
break;
// PostgreSQL has a way of doing this in a much simpler way but would
@ -1049,19 +1096,6 @@ class phpbb_db_tools
WHERE c.relname = '{$table}'
AND a.attnum > 0
AND a.attrelid = c.oid";
$result = $this->db->sql_query($sql);
while ($row = $this->db->sql_fetchrow($result))
{
// lower case just in case
if (strtolower($row['attname']) == $column_name)
{
$this->db->sql_freeresult($result);
return true;
}
}
$this->db->sql_freeresult($result);
return false;
break;
// same deal with PostgreSQL, we must perform more complex operations than
@ -1072,62 +1106,26 @@ class phpbb_db_tools
FROM syscolumns c
LEFT JOIN sysobjects o ON c.id = o.id
WHERE o.name = '{$table}'";
$result = $this->db->sql_query($sql);
while ($row = $this->db->sql_fetchrow($result))
{
// lower case just in case
if (strtolower($row['name']) == $column_name)
{
$this->db->sql_freeresult($result);
return true;
}
}
$this->db->sql_freeresult($result);
return false;
break;
case 'oracle':
$sql = "SELECT column_name
FROM user_tab_columns
WHERE LOWER(table_name) = '" . strtolower($table) . "'";
$result = $this->db->sql_query($sql);
while ($row = $this->db->sql_fetchrow($result))
{
// lower case just in case
if (strtolower($row['column_name']) == $column_name)
{
$this->db->sql_freeresult($result);
return true;
}
}
$this->db->sql_freeresult($result);
return false;
break;
case 'firebird':
$sql = "SELECT RDB\$FIELD_NAME as FNAME
FROM RDB\$RELATION_FIELDS
WHERE RDB\$RELATION_NAME = '" . strtoupper($table) . "'";
$result = $this->db->sql_query($sql);
while ($row = $this->db->sql_fetchrow($result))
{
// lower case just in case
if (strtolower($row['fname']) == $column_name)
{
$this->db->sql_freeresult($result);
return true;
}
}
$this->db->sql_freeresult($result);
return false;
break;
// ugh, SQLite
case 'sqlite':
$sql = "SELECT sql
FROM sqlite_master
WHERE type = 'table'
AND name = '{$table}'";
$result = $this->db->sql_query($sql);
if (!$result)
@ -1151,14 +1149,39 @@ class phpbb_db_tools
continue;
}
if (strtolower($entities[0]) == $column_name)
{
return true;
}
$column = strtolower($entities[0]);
$columns[$column] = $column;
}
return false;
return $columns;
break;
}
$result = $this->db->sql_query($sql);
while ($row = $this->db->sql_fetchrow($result))
{
$column = strtolower(current($row));
$columns[$column] = $column;
}
$this->db->sql_freeresult($result);
return $columns;
}
/**
* Check whether a specified column exist in a table
*
* @param string $table Table to check
* @param string $column_name Column to check
*
* @return bool True if column exists, false otherwise
*/
function sql_column_exists($table, $column_name)
{
$columns = $this->sql_list_columns($table);
return isset($columns[$column_name]);
}
/**
@ -2092,7 +2115,7 @@ class phpbb_db_tools
case 'mysql_40':
case 'mysql_41':
$statements[] = 'CREATE UNIQUE INDEX ' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ')';
$statements[] = 'ALTER TABLE ' . $table_name . ' ADD UNIQUE INDEX (' . implode(', ', $column) . ')';
break;
case 'mssql':
@ -2145,7 +2168,7 @@ class phpbb_db_tools
}
// no break
case 'mysql_41':
$statements[] = 'CREATE INDEX ' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ')';
$statements[] = 'ALTER TABLE ' . $table_name . ' ADD INDEX ' . $index_name . '(' . implode(', ', $column) . ')';
break;
case 'mssql':

@ -249,7 +249,13 @@ class dbal_mysqli extends dbal
return $cache->sql_fetchrow($query_id);
}
return ($query_id !== false) ? @mysqli_fetch_assoc($query_id) : false;
if ($query_id !== false)
{
$result = @mysqli_fetch_assoc($query_id);
return $result !== null ? $result : false;
}
return false;
}
/**

@ -1654,7 +1654,7 @@ function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $s
*/
function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_time = false, $mark_time_forum = false)
{
global $db, $tracking_topics, $user, $config, $request;
global $db, $tracking_topics, $user, $config, $auth, $request;
// Determine the users last forum mark time if not given.
if ($mark_time_forum === false)
@ -1677,6 +1677,10 @@ function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_ti
}
}
// Handle update of unapproved topics info.
// Only update for moderators having m_approve permission for the forum.
$sql_update_unapproved = ($auth->acl_get('m_approve', $forum_id)) ? '': 'AND t.topic_approved = 1';
// Check the forum for any left unread topics.
// If there are none, we mark the forum as read.
if ($config['load_db_lastread'] && $user->data['is_registered'])
@ -1692,7 +1696,8 @@ function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_ti
LEFT JOIN ' . TOPICS_TRACK_TABLE . ' tt ON (tt.topic_id = t.topic_id AND tt.user_id = ' . $user->data['user_id'] . ')
WHERE t.forum_id = ' . $forum_id . '
AND t.topic_last_post_time > ' . $mark_time_forum . '
AND t.topic_moved_id = 0
AND t.topic_moved_id = 0 ' .
$sql_update_unapproved . '
AND (tt.topic_id IS NULL OR tt.mark_time < t.topic_last_post_time)
GROUP BY t.forum_id';
$result = $db->sql_query_limit($sql, 1);
@ -1716,7 +1721,8 @@ function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_ti
FROM ' . TOPICS_TABLE . '
WHERE forum_id = ' . $forum_id . '
AND topic_last_post_time > ' . $mark_time_forum . '
AND topic_moved_id = 0';
AND topic_moved_id = 0 ' .
$sql_update_unapproved;
$result = $db->sql_query($sql);
$check_forum = $tracking_topics['tf'][$forum_id];
@ -1901,7 +1907,7 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add
$start_cnt = min(max(1, $on_page - 4), $total_pages - 5);
$end_cnt = max(min($total_pages, $on_page + 4), 6);
$page_string .= ($start_cnt > 1) ? ' ... ' : $separator;
$page_string .= ($start_cnt > 1) ? '<span class="page-dots"> ... </span>' : $separator;
for ($i = $start_cnt + 1; $i < $end_cnt; $i++)
{
@ -1912,7 +1918,7 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add
}
}
$page_string .= ($end_cnt < $total_pages) ? ' ... ' : $separator;
$page_string .= ($end_cnt < $total_pages) ? '<span class="page-dots"> ... </span>' : $separator;
}
else
{
@ -3256,6 +3262,10 @@ function get_preg_expression($mode)
$inline = ($mode == 'relative_url') ? ')' : '';
return "(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})*(?:/(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?";
break;
case 'table_prefix':
return '#^[a-zA-Z][a-zA-Z0-9_]*$#';
break;
}
return '';
@ -4570,6 +4580,8 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
'T_STYLESHEET_LINK' => "{$web_path}styles/" . $user->theme['theme_path'] . '/theme/stylesheet.css',
'T_STYLESHEET_LANG_LINK' => "{$web_path}styles/" . $user->theme['theme_path'] . '/theme/' . $user->lang_name . '/stylesheet.css',
'T_STYLESHEET_NAME' => $user->theme['theme_name'],
'T_JQUERY_LINK' => ($config['load_jquery_cdn'] && !empty($config['load_jquery_url'])) ? $config['load_jquery_url'] : "{$web_path}assets/javascript/jquery.js",
'S_JQUERY_FALLBACK' => ($config['load_jquery_cdn']) ? true : false,
'T_THEME_NAME' => $user->theme['theme_path'],
'T_THEME_LANG_NAME' => $user->data['user_lang'],
@ -4627,15 +4639,13 @@ function page_footer($run_cron = true)
if ($auth->acl_get('a_') && defined('DEBUG_EXTRA'))
{
if (function_exists('memory_get_usage'))
if (function_exists('memory_get_peak_usage'))
{
if ($memory_usage = memory_get_usage())
if ($memory_usage = memory_get_peak_usage())
{
global $base_memory_usage;
$memory_usage -= $base_memory_usage;
$memory_usage = get_formatted_filesize($memory_usage);
$debug_output .= ' | Memory Usage: ' . $memory_usage;
$debug_output .= ' | Peak Memory Usage: ' . $memory_usage;
}
}

@ -106,15 +106,13 @@ function adm_page_footer($copyright_html = true)
if ($auth->acl_get('a_') && defined('DEBUG_EXTRA'))
{
if (function_exists('memory_get_usage'))
if (function_exists('memory_get_peak_usage'))
{
if ($memory_usage = memory_get_usage())
if ($memory_usage = memory_get_peak_usage())
{
global $base_memory_usage;
$memory_usage -= $base_memory_usage;
$memory_usage = get_formatted_filesize($memory_usage);
$debug_output .= ' | Memory Usage: ' . $memory_usage;
$debug_output .= ' | Peak Memory Usage: ' . $memory_usage;
}
}
@ -126,6 +124,8 @@ function adm_page_footer($copyright_html = true)
'DEBUG_OUTPUT' => (defined('DEBUG')) ? $debug_output : '',
'TRANSLATION_INFO' => (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '',
'S_COPYRIGHT_HTML' => $copyright_html,
'T_JQUERY_LINK' => ($config['load_jquery_cdn'] && !empty($config['load_jquery_url'])) ? $config['load_jquery_url'] : "{$phpbb_root_path}assets/javascript/jquery.js",
'S_JQUERY_FALLBACK' => ($config['load_jquery_cdn']) ? true : false,
'VERSION' => $config['version'])
);

@ -3111,7 +3111,7 @@ function get_database_size()
/**
* Retrieve contents from remotely stored file
*/
function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port = 80, $timeout = 10)
function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port = 80, $timeout = 6)
{
global $user;
@ -3121,6 +3121,9 @@ function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port
@fputs($fsock, "HOST: $host\r\n");
@fputs($fsock, "Connection: close\r\n\r\n");
$timer_stop = time() + $timeout;
stream_set_timeout($fsock, $timeout);
$file_info = '';
$get_info = false;
@ -3143,6 +3146,14 @@ function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port
return false;
}
}
$stream_meta_data = stream_get_meta_data($fsock);
if (!empty($stream_meta_data['timed_out']) || time() >= $timer_stop)
{
$errstr = $user->lang['FSOCK_TIMEOUT'];
return false;
}
}
@fclose($fsock);
}

@ -446,6 +446,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
'S_NO_CAT' => $catless && !$last_catless,
'S_IS_LINK' => ($row['forum_type'] == FORUM_LINK) ? true : false,
'S_UNREAD_FORUM' => $forum_unread,
'S_AUTH_READ' => $auth->acl_get('f_read', $row['forum_id']),
'S_LOCKED_FORUM' => ($row['forum_status'] == ITEM_LOCKED) ? true : false,
'S_LIST_SUBFORUMS' => ($row['display_subforum_list']) ? true : false,
'S_SUBFORUMS' => (sizeof($subforums_list)) ? true : false,
@ -655,7 +656,7 @@ function topic_generate_pagination($replies, $url)
$pagination .= '<a href="' . $url . ($j == 0 ? '' : '&amp;start=' . $j) . '">' . $times . '</a>';
if ($times == 1 && $total_pages > 5)
{
$pagination .= ' ... ';
$pagination .= '<span class="page-dots"> ... </span>';
// Display the last three pages
$times = $total_pages - 3;
@ -1065,6 +1066,7 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
$match_id = ($mode == 'forum') ? $forum_id : $topic_id;
$u_url = "uid={$user->data['user_id']}";
$u_url .= ($mode == 'forum') ? '&amp;f' : '&amp;f=' . $forum_id . '&amp;t';
$is_watching = 0;
// Is user watching this thread?
if ($user_id != ANONYMOUS)
@ -1090,9 +1092,9 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
$uid = request_var('uid', 0);
$token = request_var('hash', '');
if (($token && check_link_hash($token, "{$mode}_$match_id")) || confirm_box(true))
if ($token && check_link_hash($token, "{$mode}_$match_id") || confirm_box(true))
{
if (($uid != $user_id) || ($request->variable('unwatch', '', false, phpbb_request_interface::GET) != $mode))
if ($uid != $user_id || $request->variable('unwatch', '', false, phpbb_request_interface::GET) != $mode)
{
$redirect_url = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&amp;start=$start");
$message = $user->lang['ERR_UNWATCHING'] . '<br /><br />' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
@ -1105,7 +1107,8 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
$db->sql_query($sql);
$redirect_url = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&amp;start=$start");
$message = $user->lang['NOT_WATCHING_' . strtoupper($mode)] . '<br /><br />' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
$message = $user->lang['NOT_WATCHING_' . strtoupper($mode)] . '<br /><br />';
$message .= sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
meta_refresh(3, $redirect_url);
trigger_error($message);
}
@ -1122,7 +1125,14 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
$s_hidden_fields['t'] = $topic_id;
}
$confirm_box_message = (($item_title == '') ? 'UNWATCH_' . strtoupper($mode) : $user->lang('UNWATCH_' . strtoupper($mode) . '_DETAILED', $item_title));
if ($item_title == '')
{
$confirm_box_message = 'UNWATCH_' . strtoupper($mode);
}
else
{
$confirm_box_message = $user->lang('UNWATCH_' . strtoupper($mode) . '_DETAILED', $item_title);
}
confirm_box(false, $confirm_box_message, build_hidden_fields($s_hidden_fields));
}
}
@ -1147,9 +1157,9 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
$uid = request_var('uid', 0);
$token = request_var('hash', '');
if (($token && check_link_hash($token, "{$mode}_$match_id")) || confirm_box(true))
if ($token && check_link_hash($token, "{$mode}_$match_id") || confirm_box(true))
{
if (($uid != $user_id) || ($request->variable('watch', '', false, phpbb_request_interface::GET) != $mode))
if ($uid != $user_id || $request->variable('watch', '', false, phpbb_request_interface::GET) != $mode)
{
$redirect_url = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&amp;start=$start");
$message = $user->lang['ERR_WATCHING'] . '<br /><br />' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');

@ -104,7 +104,7 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20
'DRIVER' => 'mssqlnative',
'AVAILABLE' => true,
'2.0.x' => false,
),
),
'oracle' => array(
'LABEL' => 'Oracle',
'SCHEMA' => 'oracle',
@ -211,61 +211,20 @@ function dbms_select($default = '', $only_20x_options = false)
/**
* Get tables of a database
*
* @deprecated
*/
function get_tables($db)
function get_tables(&$db)
{
switch ($db->sql_layer)
if (!class_exists('phpbb_db_tools'))
{
case 'mysql':
case 'mysql4':
case 'mysqli':
$sql = 'SHOW TABLES';
break;
case 'sqlite':
$sql = 'SELECT name
FROM sqlite_master
WHERE type = "table"';
break;
case 'mssql':
case 'mssql_odbc':
case 'mssqlnative':
$sql = "SELECT name
FROM sysobjects
WHERE type='U'";
break;
case 'postgres':
$sql = 'SELECT relname
FROM pg_stat_user_tables';
break;
case 'firebird':
$sql = 'SELECT rdb$relation_name
FROM rdb$relations
WHERE rdb$view_source is null
AND rdb$system_flag = 0';
break;
case 'oracle':
$sql = 'SELECT table_name
FROM USER_TABLES';
break;
global $phpbb_root_path, $phpEx;
require($phpbb_root_path . 'includes/db/db_tools.' . $phpEx);
}
$result = $db->sql_query($sql);
$db_tools = new phpbb_db_tools($db);
$tables = array();
while ($row = $db->sql_fetchrow($result))
{
$tables[] = current($row);
}
$db->sql_freeresult($result);
return $tables;
return $db_tools->sql_list_tables();
}
/**
@ -555,3 +514,45 @@ function adjust_language_keys_callback($matches)
return (!empty($lang[$matches[1]])) ? $db->sql_escape($lang[$matches[1]]) : $db->sql_escape($matches[1]);
}
}
function phpbb_create_config_file_data($data, $dbms, $load_extensions, $debug = false)
{
$load_extensions = implode(',', $load_extensions);
$config_data = "<?php\n";
$config_data .= "// phpBB 3.0.x auto-generated configuration file\n// Do not change anything in this file!\n";
$config_data_array = array(
'dbms' => $dbms,
'dbhost' => $data['dbhost'],
'dbport' => $data['dbport'],
'dbname' => $data['dbname'],
'dbuser' => $data['dbuser'],
'dbpasswd' => htmlspecialchars_decode($data['dbpasswd']),
'table_prefix' => $data['table_prefix'],
'acm_type' => 'file',
'load_extensions' => $load_extensions,
);
foreach ($config_data_array as $key => $value)
{
$config_data .= "\${$key} = '" . str_replace("'", "\\'", str_replace('\\', '\\\\', $value)) . "';\n";
}
$config_data .= "\n@define('PHPBB_INSTALLED', true);\n";
if ($debug)
{
$config_data .= "@define('DEBUG', true);\n";
$config_data .= "@define('DEBUG_EXTRA', true);\n";
}
else
{
$config_data .= "// @define('DEBUG', true);\n";
$config_data .= "// @define('DEBUG_EXTRA', true);\n";
}
$config_data .= '?' . '>'; // Done this to prevent highlighting editors getting confused!
return $config_data;
}

@ -19,7 +19,8 @@ if (!defined('IN_PHPBB'))
Ability to simply add own rules by doing three things:
1) Add an appropriate constant
2) Add a new check array to the global_privmsgs_rules variable and the condition array (if one is required)
3) Add a new language variable to ucp.php
3) Implement the rule logic in the check_rule() function
4) Add a new language variable to ucp.php
The user is then able to select the new rule. It will be checked against and handled as specified.
To add new actions (yes, checks can be added here too) to the rule management, the core code has to be modified.
@ -57,42 +58,42 @@ define('CHECK_TO', 5);
*/
$global_privmsgs_rules = array(
CHECK_SUBJECT => array(
RULE_IS_LIKE => array('check0' => 'message_subject', 'function' => 'preg_match("/" . preg_quote({STRING}, "/") . "/i", {CHECK0})'),
RULE_IS_NOT_LIKE => array('check0' => 'message_subject', 'function' => '!(preg_match("/" . preg_quote({STRING}, "/") . "/i", {CHECK0}))'),
RULE_IS => array('check0' => 'message_subject', 'function' => '{CHECK0} == {STRING}'),
RULE_IS_NOT => array('check0' => 'message_subject', 'function' => '{CHECK0} != {STRING}'),
RULE_BEGINS_WITH => array('check0' => 'message_subject', 'function' => 'preg_match("/^" . preg_quote({STRING}, "/") . "/i", {CHECK0})'),
RULE_ENDS_WITH => array('check0' => 'message_subject', 'function' => 'preg_match("/" . preg_quote({STRING}, "/") . "$/i", {CHECK0})'),
RULE_IS_LIKE => array('check0' => 'message_subject'),
RULE_IS_NOT_LIKE => array('check0' => 'message_subject'),
RULE_IS => array('check0' => 'message_subject'),
RULE_IS_NOT => array('check0' => 'message_subject'),
RULE_BEGINS_WITH => array('check0' => 'message_subject'),
RULE_ENDS_WITH => array('check0' => 'message_subject'),
),
CHECK_SENDER => array(
RULE_IS_LIKE => array('check0' => 'username', 'function' => 'preg_match("/" . preg_quote({STRING}, "/") . "/i", {CHECK0})'),
RULE_IS_NOT_LIKE => array('check0' => 'username', 'function' => '!(preg_match("/" . preg_quote({STRING}, "/") . "/i", {CHECK0}))'),
RULE_IS => array('check0' => 'username', 'function' => '{CHECK0} == {STRING}'),
RULE_IS_NOT => array('check0' => 'username', 'function' => '{CHECK0} != {STRING}'),
RULE_BEGINS_WITH => array('check0' => 'username', 'function' => 'preg_match("/^" . preg_quote({STRING}, "/") . "/i", {CHECK0})'),
RULE_ENDS_WITH => array('check0' => 'username', 'function' => 'preg_match("/" . preg_quote({STRING}, "/") . "$/i", {CHECK0})'),
RULE_IS_FRIEND => array('check0' => 'friend', 'function' => '{CHECK0} == 1'),
RULE_IS_FOE => array('check0' => 'foe', 'function' => '{CHECK0} == 1'),
RULE_IS_USER => array('check0' => 'author_id', 'function' => '{CHECK0} == {USER_ID}'),
RULE_IS_GROUP => array('check0' => 'author_in_group', 'function' => 'in_array({GROUP_ID}, {CHECK0})'),
RULE_IS_LIKE => array('check0' => 'username'),
RULE_IS_NOT_LIKE => array('check0' => 'username'),
RULE_IS => array('check0' => 'username'),
RULE_IS_NOT => array('check0' => 'username'),
RULE_BEGINS_WITH => array('check0' => 'username'),
RULE_ENDS_WITH => array('check0' => 'username'),
RULE_IS_FRIEND => array('check0' => 'friend'),
RULE_IS_FOE => array('check0' => 'foe'),
RULE_IS_USER => array('check0' => 'author_id'),
RULE_IS_GROUP => array('check0' => 'author_in_group'),
),
CHECK_MESSAGE => array(
RULE_IS_LIKE => array('check0' => 'message_text', 'function' => 'preg_match("/" . preg_quote({STRING}, "/") . "/i", {CHECK0})'),
RULE_IS_NOT_LIKE => array('check0' => 'message_text', 'function' => '!(preg_match("/" . preg_quote({STRING}, "/") . "/i", {CHECK0}))'),
RULE_IS => array('check0' => 'message_text', 'function' => '{CHECK0} == {STRING}'),
RULE_IS_NOT => array('check0' => 'message_text', 'function' => '{CHECK0} != {STRING}'),
RULE_IS_LIKE => array('check0' => 'message_text'),
RULE_IS_NOT_LIKE => array('check0' => 'message_text'),
RULE_IS => array('check0' => 'message_text'),
RULE_IS_NOT => array('check0' => 'message_text'),
),
CHECK_STATUS => array(
RULE_ANSWERED => array('check0' => 'pm_replied', 'function' => '{CHECK0} == 1'),
RULE_FORWARDED => array('check0' => 'pm_forwarded', 'function' => '{CHECK0} == 1'),
RULE_ANSWERED => array('check0' => 'pm_replied'),
RULE_FORWARDED => array('check0' => 'pm_forwarded'),
),
CHECK_TO => array(
RULE_TO_GROUP => array('check0' => 'to', 'check1' => 'bcc', 'check2' => 'user_in_group', 'function' => 'in_array("g_" . {CHECK2}, {CHECK0}) || in_array("g_" . {CHECK2}, {CHECK1})'),
RULE_TO_ME => array('check0' => 'to', 'check1' => 'bcc', 'function' => 'in_array("u_" . $user_id, {CHECK0}) || in_array("u_" . $user_id, {CHECK1})'),
RULE_TO_GROUP => array('check0' => 'to', 'check1' => 'bcc', 'check2' => 'user_in_group'),
RULE_TO_ME => array('check0' => 'to', 'check1' => 'bcc'),
)
);
@ -260,16 +261,60 @@ function check_rule(&$rules, &$rule_row, &$message_row, $user_id)
$check_ary = $rules[$rule_row['rule_check']][$rule_row['rule_connection']];
// Replace Check Literals
$evaluate = $check_ary['function'];
$evaluate = preg_replace('/{(CHECK[0-9])}/', '$message_row[$check_ary[strtolower("\1")]]', $evaluate);
// Replace Rule Literals
$evaluate = preg_replace('/{(STRING|USER_ID|GROUP_ID)}/', '$rule_row["rule_" . strtolower("\1")]', $evaluate);
// Evil Statement
$result = false;
eval('$result = (' . $evaluate . ') ? true : false;');
$check0 = $message_row[$check_ary['check0']];
switch ($rule_row['rule_connection'])
{
case RULE_IS_LIKE:
$result = preg_match("/" . preg_quote($rule_row['rule_string'], '/') . '/i', $check0);
break;
case RULE_IS_NOT_LIKE:
$result = !preg_match("/" . preg_quote($rule_row['rule_string'], '/') . '/i', $check0);
break;
case RULE_IS:
$result = ($check0 == $rule_row['rule_string']);
break;
case RULE_IS_NOT:
$result = ($check0 != $rule_row['rule_string']);
break;
case RULE_BEGINS_WITH:
$result = preg_match("/^" . preg_quote($rule_row['rule_string'], '/') . '/i', $check0);
break;
case RULE_ENDS_WITH:
$result = preg_match("/" . preg_quote($rule_row['rule_string'], '/') . '$/i', $check0);
break;
case RULE_IS_FRIEND:
case RULE_IS_FOE:
case RULE_ANSWERED:
case RULE_FORWARDED:
$result = ($check0 == 1);
break;
case RULE_IS_USER:
$result = ($check0 == $rule_row['rule_user_id']);
break;
case RULE_IS_GROUP:
$result = in_array($rule_row['rule_group_id'], $check0);
break;
case RULE_TO_GROUP:
$result = (in_array('g_' . $message_row[$check_ary['check2']], $check0) || in_array('g_' . $message_row[$check_ary['check2']], $message_row[$check_ary['check1']]));
break;
case RULE_TO_ME:
$result = (in_array('u_' . $user_id, $check0) || in_array('u_' . $user_id, $message_row[$check_ary['check1']]));
break;
}
if (!$result)
{
@ -1607,7 +1652,7 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true)
// Send Notifications
if ($mode != 'edit')
{
pm_notification($mode, $data['from_username'], $recipients, $subject, $data['message']);
pm_notification($mode, $data['from_username'], $recipients, $subject, $data['message'], $data['msg_id']);
}
return $data['msg_id'];
@ -1616,7 +1661,7 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true)
/**
* PM Notification
*/
function pm_notification($mode, $author, $recipients, $subject, $message)
function pm_notification($mode, $author, $recipients, $subject, $message, $msg_id)
{
global $db, $user, $config, $phpbb_root_path, $phpEx, $auth;
@ -1688,8 +1733,9 @@ function pm_notification($mode, $author, $recipients, $subject, $message)
'AUTHOR_NAME' => htmlspecialchars_decode($author),
'USERNAME' => htmlspecialchars_decode($addr['name']),
'U_INBOX' => generate_board_url() . "/ucp.$phpEx?i=pm&folder=inbox")
);
'U_INBOX' => generate_board_url() . "/ucp.$phpEx?i=pm&folder=inbox",
'U_VIEW_MESSAGE' => generate_board_url() . "/ucp.$phpEx?i=pm&mode=view&p=$msg_id",
));
$messenger->send($addr['method']);
}

@ -286,14 +286,6 @@ function change_topic_type($action, $topic_ids)
{
global $auth, $user, $db, $phpEx, $phpbb_root_path;
// For changing topic types, we only allow operations in one forum.
$forum_id = check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('f_announce', 'f_sticky', 'm_'), true);
if ($forum_id === false)
{
return;
}
switch ($action)
{
case 'make_announce':
@ -316,11 +308,18 @@ function change_topic_type($action, $topic_ids)
default:
$new_topic_type = POST_NORMAL;
$check_acl = '';
$check_acl = false;
$l_new_type = (sizeof($topic_ids) == 1) ? 'MCP_MAKE_NORMAL' : 'MCP_MAKE_NORMALS';
break;
}
$forum_id = check_ids($topic_ids, TOPICS_TABLE, 'topic_id', $check_acl, true);
if ($forum_id === false)
{
return;
}
$redirect = request_var('redirect', build_url(array('action', 'quickmod')));
$s_hidden_fields = array(

@ -246,7 +246,7 @@ function mcp_post_details($id, $mode, $action)
}
// Get Reports
if ($auth->acl_get('m_', $post_info['forum_id']))
if ($auth->acl_get('m_report', $post_info['forum_id']))
{
$sql = 'SELECT r.*, re.*, u.user_id, u.username
FROM ' . REPORTS_TABLE . ' r, ' . USERS_TABLE . ' u, ' . REPORTS_REASONS_TABLE . " re

@ -239,8 +239,8 @@ function mcp_topic_view($id, $mode, $action)
'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'UNREAD_POST') : $user->img('icon_post_target', 'POST'),
'S_POST_REPORTED' => ($row['post_reported']) ? true : false,
'S_POST_UNAPPROVED' => ($row['post_approved']) ? false : true,
'S_POST_REPORTED' => ($row['post_reported'] && $auth->acl_get('m_report', $topic_info['forum_id'])),
'S_POST_UNAPPROVED' => (!$row['post_approved'] && $auth->acl_get('m_approve', $topic_info['forum_id'])),
'S_CHECKED' => (($submitted_id_list && !in_array(intval($row['post_id']), $submitted_id_list)) || in_array(intval($row['post_id']), $checked_ids)) ? true : false,
'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? true : false,

@ -97,8 +97,8 @@ function deregister_globals()
unset($input);
}
// If we are on PHP >= 6.0.0 we do not need some code
if (version_compare(PHP_VERSION, '6.0.0-dev', '>='))
// Register globals and magic quotes have been dropped in PHP 5.4
if (version_compare(PHP_VERSION, '5.4.0-dev', '>='))
{
/**
* @ignore

@ -194,48 +194,44 @@ class ucp_groups
if ($group_row[$group_id]['group_type'] == GROUP_FREE)
{
group_user_add($group_id, $user->data['user_id']);
$email_template = 'group_added';
}
else
{
group_user_add($group_id, $user->data['user_id'], false, false, false, 0, 1);
$email_template = 'group_request';
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
$messenger = new messenger();
$sql = 'SELECT u.username, u.username_clean, u.user_email, u.user_notify_type, u.user_jabber, u.user_lang
FROM ' . USER_GROUP_TABLE . ' ug, ' . USERS_TABLE . " u
WHERE ug.user_id = u.user_id
AND ug.group_leader = 1
AND ug.group_id = $group_id";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$messenger->template('group_request', $row['user_lang']);
$messenger->to($row['user_email'], $row['username']);
$messenger->im($row['user_jabber'], $row['username']);
$messenger->assign_vars(array(
'USERNAME' => htmlspecialchars_decode($row['username']),
'GROUP_NAME' => htmlspecialchars_decode($group_row[$group_id]['group_name']),
'REQUEST_USERNAME' => $user->data['username'],
'U_PENDING' => generate_board_url() . "/ucp.$phpEx?i=groups&mode=manage&action=list&g=$group_id",
'U_GROUP' => generate_board_url() . "/memberlist.$phpEx?mode=group&g=$group_id")
);
$messenger->send($row['user_notify_type']);
}
$db->sql_freeresult($result);
$messenger->save_queue();
}
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
$messenger = new messenger();
$sql = 'SELECT u.username, u.username_clean, u.user_email, u.user_notify_type, u.user_jabber, u.user_lang
FROM ' . USER_GROUP_TABLE . ' ug, ' . USERS_TABLE . ' u
WHERE ug.user_id = u.user_id
AND ' . (($group_row[$group_id]['group_type'] == GROUP_FREE) ? "ug.user_id = {$user->data['user_id']}" : 'ug.group_leader = 1') . "
AND ug.group_id = $group_id";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$messenger->template($email_template, $row['user_lang']);
$messenger->to($row['user_email'], $row['username']);
$messenger->im($row['user_jabber'], $row['username']);
$messenger->assign_vars(array(
'USERNAME' => htmlspecialchars_decode($row['username']),
'GROUP_NAME' => htmlspecialchars_decode($group_row[$group_id]['group_name']),
'REQUEST_USERNAME' => $user->data['username'],
'U_PENDING' => generate_board_url() . "/ucp.$phpEx?i=groups&mode=manage&action=list&g=$group_id",
'U_GROUP' => generate_board_url() . "/memberlist.$phpEx?mode=group&g=$group_id")
);
$messenger->send($row['user_notify_type']);
}
$db->sql_freeresult($result);
$messenger->save_queue();
add_log('user', $user->data['user_id'], 'LOG_USER_GROUP_JOIN' . (($group_row[$group_id]['group_type'] == GROUP_FREE) ? '' : '_PENDING'), $group_row[$group_id]['group_name']);
meta_refresh(3, $this->u_action);

@ -243,7 +243,7 @@ class ucp_pm
$num_not_moved = $num_removed = 0;
$release = request_var('release', 0);
if ($user->data['user_new_privmsg'] && $action == 'view_folder')
if ($user->data['user_new_privmsg'] && ($action == 'view_folder' || $action == 'view_message'))
{
$return = place_pm_into_folder($global_privmsgs_rules, $release);
$num_not_moved = $return['not_moved'];

@ -22,7 +22,7 @@ if (!defined('IN_PHPBB'))
function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
{
global $user, $template, $auth, $db, $cache;
global $phpbb_root_path, $phpEx, $config;
global $phpbb_root_path, $request, $phpEx, $config;
$user->add_lang(array('viewtopic', 'memberlist'));
@ -239,7 +239,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($user_info['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=compose&amp;u=' . $author_id) : '',
'U_WWW' => (!empty($user_info['user_website'])) ? $user_info['user_website'] : '',
'U_ICQ' => ($user_info['user_icq']) ? 'http://www.icq.com/people' . urlencode($user_info['user_icq']) . '/' : '',
'U_ICQ' => ($user_info['user_icq']) ? 'http://www.icq.com/people/' . urlencode($user_info['user_icq']) . '/' : '',
'U_AIM' => ($user_info['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&amp;action=aim&amp;u=' . $author_id) : '',
'U_YIM' => ($user_info['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($user_info['user_yim']) . '&amp;.src=pg' : '',
'U_MSN' => ($user_info['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&amp;action=msnm&amp;u=' . $author_id) : '',

@ -79,14 +79,14 @@ class ucp_profile
$error = validate_data($data, $check_ary);
if ($auth->acl_get('u_chgpasswd') && $data['new_password'] && $data['password_confirm'] != $data['new_password'])
if ($auth->acl_get('u_chgemail') && $data['email'] != $user->data['user_email'] && $data['email_confirm'] != $data['email'])
{
$error[] = 'NEW_PASSWORD_ERROR';
$error[] = ($data['email_confirm']) ? 'NEW_EMAIL_ERROR' : 'NEW_EMAIL_CONFIRM_EMPTY';
}
if (($data['new_password'] || ($auth->acl_get('u_chgemail') && $data['email'] != $user->data['user_email']) || ($data['username'] != $user->data['username'] && $auth->acl_get('u_chgname') && $config['allow_namechange'])) && !phpbb_check_hash($data['cur_password'], $user->data['user_password']))
if ($auth->acl_get('u_chgpasswd') && $data['new_password'] && $data['password_confirm'] != $data['new_password'])
{
$error[] = 'CUR_PASSWORD_ERROR';
$error[] = ($data['password_confirm']) ? 'NEW_PASSWORD_ERROR' : 'NEW_PASSWORD_CONFIRM_EMPTY';
}
// Only check the new password against the previous password if there have been no errors
@ -95,9 +95,9 @@ class ucp_profile
$error[] = 'SAME_PASSWORD_ERROR';
}
if ($auth->acl_get('u_chgemail') && $data['email'] != $user->data['user_email'] && $data['email_confirm'] != $data['email'])
if (!phpbb_check_hash($data['cur_password'], $user->data['user_password']))
{
$error[] = 'NEW_EMAIL_ERROR';
$error[] = ($data['cur_password']) ? 'CUR_PASSWORD_ERROR' : 'CUR_PASSWORD_EMPTY';
}
if (!check_form_key('ucp_reg_details'))

@ -2113,6 +2113,11 @@ function change_database_data(&$no_updates, $version)
case '3.0.9-RC4':
break;
// Changes from 3.0.9 to 3.0.10-RC1
case '3.0.9':
set_config('email_max_chunk_size', '50');
break;
// Changes from 3.1.0-dev to 3.1.0-A1
case '3.1.0-dev':
@ -2146,46 +2151,80 @@ function change_database_data(&$no_updates, $version)
$db->sql_freeresult($result);
// try to guess the new auto loaded search class name
// works for native and mysql fulltext
set_config('search_type', 'phpbb_search_' . $config['search_type']);
if (substr($config['search_type'], 0, 6) !== 'phpbb_')
{
// try to guess the new auto loaded search class name
// works for native and mysql fulltext
set_config('search_type', 'phpbb_search_' . $config['search_type']);
}
set_config('use_system_cron', 0);
if (!isset($config['load_jquery_cdn']))
{
set_config('load_jquery_cdn', 0);
set_config('load_jquery_url', '//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js');
}
$sql = 'UPDATE ' . GROUPS_TABLE . '
SET group_teampage = 1
WHERE group_type = ' . GROUP_SPECIAL . "
AND group_name = 'ADMINISTRATORS'";
_sql($sql, $errored, $error_ary);
if (!isset($config['use_system_cron']))
{
set_config('use_system_cron', 0);
}
$sql = 'UPDATE ' . GROUPS_TABLE . '
SET group_teampage = 2
WHERE group_type = ' . GROUP_SPECIAL . "
AND group_name = 'GLOBAL_MODERATORS'";
_sql($sql, $errored, $error_ary);
set_config('legend_sort_groupname', '0');
set_config('teampage_multiple', '1');
set_config('teampage_forums', '1');
$sql = 'SELECT group_id
$sql = 'SELECT group_teampage
FROM ' . GROUPS_TABLE . '
WHERE group_legend = 1
ORDER BY group_name ASC';
$result = $db->sql_query($sql);
WHERE group_teampage > 0';
$result = $db->sql_query_limit($sql, 1);
$added_groups_teampage = (bool) $db->sql_fetchfield('group_teampage');
$db->sql_freeresult($result);
$next_legend = 1;
while ($row = $db->sql_fetchrow($result))
if (!$added_groups_teampage)
{
$sql = 'UPDATE ' . GROUPS_TABLE . '
SET group_legend = ' . $next_legend . '
WHERE group_id = ' . (int) $row['group_id'];
SET group_teampage = 1
WHERE group_type = ' . GROUP_SPECIAL . "
AND group_name = 'ADMINISTRATORS'";
_sql($sql, $errored, $error_ary);
$next_legend++;
$sql = 'UPDATE ' . GROUPS_TABLE . '
SET group_teampage = 2
WHERE group_type = ' . GROUP_SPECIAL . "
AND group_name = 'GLOBAL_MODERATORS'";
_sql($sql, $errored, $error_ary);
}
if (!isset($config['legend_sort_groupname']))
{
set_config('legend_sort_groupname', '0');
set_config('teampage_forums', '1');
}
$sql = 'SELECT group_legend
FROM ' . GROUPS_TABLE . '
WHERE group_teampage > 1';
$result = $db->sql_query_limit($sql, 1);
$updated_group_legend = (bool) $db->sql_fetchfield('group_teampage');
$db->sql_freeresult($result);
unset($next_legend);
if (!$updated_group_legend)
{
$sql = 'SELECT group_id
FROM ' . GROUPS_TABLE . '
WHERE group_legend = 1
ORDER BY group_name ASC';
$result = $db->sql_query($sql);
$next_legend = 1;
while ($row = $db->sql_fetchrow($result))
{
$sql = 'UPDATE ' . GROUPS_TABLE . '
SET group_legend = ' . $next_legend . '
WHERE group_id = ' . (int) $row['group_id'];
_sql($sql, $errored, $error_ary);
$next_legend++;
}
$db->sql_freeresult($result);
unset($next_legend);
}
// Install modules
$modules_to_install = array(
@ -2206,7 +2245,7 @@ function change_database_data(&$no_updates, $version)
);
_add_modules($modules_to_install);
$sql = 'DELETE FROM ' . MODULES_TABLE . "
WHERE module_basename = 'styles' AND module_mode = 'imageset'";
_sql($sql, $errored, $error_ary);
@ -2289,7 +2328,15 @@ function change_database_data(&$no_updates, $version)
}
// Allow custom profile fields in pm templates
set_config('load_cpf_pm', '0');
if (!isset($config['load_cpf_pm']))
{
set_config('load_cpf_pm', '0');
}
if (!isset($config['teampage_memberships']))
{
set_config('teampage_memberships', '1');
}
$no_updates = false;
break;

@ -1697,19 +1697,16 @@ class install_convert extends module
fix_empty_primary_groups();
if (!isset($config['board_startdate']))
{
$sql = 'SELECT MIN(user_regdate) AS board_startdate
FROM ' . USERS_TABLE;
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$sql = 'SELECT MIN(user_regdate) AS board_startdate
FROM ' . USERS_TABLE;
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (($row['board_startdate'] < $config['board_startdate'] && $row['board_startdate'] > 0) || !isset($config['board_startdate']))
{
set_config('board_startdate', $row['board_startdate']);
$db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_regdate = ' . $row['board_startdate'] . ' WHERE user_id = ' . ANONYMOUS);
}
if (!isset($config['board_startdate']) || ($row['board_startdate'] < $config['board_startdate'] && $row['board_startdate'] > 0))
{
set_config('board_startdate', $row['board_startdate']);
$db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_regdate = ' . $row['board_startdate'] . ' WHERE user_id = ' . ANONYMOUS);
}
update_dynamic_config();

@ -546,6 +546,11 @@ class install_install extends module
$error[] = $lang['INST_ERR_NO_DB'];
$connect_test = false;
}
else if (!preg_match(get_preg_expression('table_prefix'), $data['table_prefix']))
{
$error[] = $lang['INST_ERR_DB_INVALID_PREFIX'];
$connect_test = false;
}
else
{
$connect_test = connect_check_db(true, $error, $available_dbms[$data['dbms']], $data['table_prefix'], $data['dbhost'], $data['dbuser'], htmlspecialchars_decode($data['dbpasswd']), $data['dbname'], $data['dbport']);
@ -876,33 +881,8 @@ class install_install extends module
@chmod($phpbb_root_path . 'cache/install_lock', 0777);
$load_extensions = implode(',', $load_extensions);
// Time to convert the data provided into a config file
$config_data = "<?php\n";
$config_data .= "// phpBB 3.0.x auto-generated configuration file\n// Do not change anything in this file!\n";
$config_data_array = array(
'dbms' => $available_dbms[$data['dbms']]['DRIVER'],
'dbhost' => $data['dbhost'],
'dbport' => $data['dbport'],
'dbname' => $data['dbname'],
'dbuser' => $data['dbuser'],
'dbpasswd' => htmlspecialchars_decode($data['dbpasswd']),
'table_prefix' => $data['table_prefix'],
'acm_type' => 'file',
'load_extensions' => $load_extensions,
);
foreach ($config_data_array as $key => $value)
{
$config_data .= "\${$key} = '" . str_replace("'", "\\'", str_replace('\\', '\\\\', $value)) . "';\n";
}
unset($config_data_array);
$config_data .= "\n@define('PHPBB_INSTALLED', true);\n";
$config_data .= "// @define('DEBUG', true);\n";
$config_data .= "// @define('DEBUG_EXTRA', true);\n";
$config_data = phpbb_create_config_file_data($data, $available_dbms[$data['dbms']]['DRIVER'], $load_extensions);
// Attempt to write out the config file directly. If it works, this is the easiest way to do it ...
if ((file_exists($phpbb_root_path . 'config.' . $phpEx) && phpbb_is_writable($phpbb_root_path . 'config.' . $phpEx)) || phpbb_is_writable($phpbb_root_path))
@ -1947,7 +1927,7 @@ class install_install extends module
'dbname' => array('lang' => 'DB_NAME', 'type' => 'text:25:100', 'explain' => false),
'dbuser' => array('lang' => 'DB_USERNAME', 'type' => 'text:25:100', 'explain' => false),
'dbpasswd' => array('lang' => 'DB_PASSWORD', 'type' => 'password:25:100', 'explain' => false),
'table_prefix' => array('lang' => 'TABLE_PREFIX', 'type' => 'text:25:100', 'explain' => false),
'table_prefix' => array('lang' => 'TABLE_PREFIX', 'type' => 'text:25:100', 'explain' => true),
);
var $admin_config_options = array(
'legend1' => 'ADMIN_CONFIG',

@ -1,7 +1,8 @@
# DO NOT EDIT THIS FILE, IT IS GENERATED
#
# $Id: $
#
# To change the contents of this file, edit
# phpBB/develop/create_schema_files.php and
# run it.
# Table: 'phpbb_attachments'
CREATE TABLE phpbb_attachments (

@ -1,8 +1,10 @@
/*
$Id: $
*/
* DO NOT EDIT THIS FILE, IT IS GENERATED
*
* To change the contents of this file, edit
* phpBB/develop/create_schema_files.php and
* run it.
*/
/*
Table: 'phpbb_attachments'
@ -1321,7 +1323,7 @@ CREATE TABLE [phpbb_styles] (
[style_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
[style_active] [int] DEFAULT (1) NOT NULL ,
[template_id] [int] DEFAULT (0) NOT NULL ,
[theme_id] [int] DEFAULT (0) NOT NULL
[theme_id] [int] DEFAULT (0) NOT NULL
) ON [PRIMARY]
GO

@ -1,7 +1,8 @@
# DO NOT EDIT THIS FILE, IT IS GENERATED
#
# $Id: $
#
# To change the contents of this file, edit
# phpBB/develop/create_schema_files.php and
# run it.
# Table: 'phpbb_attachments'
CREATE TABLE phpbb_attachments (
attach_id mediumint(8) UNSIGNED NOT NULL auto_increment,

@ -1,7 +1,8 @@
# DO NOT EDIT THIS FILE, IT IS GENERATED
#
# $Id: $
#
# To change the contents of this file, edit
# phpBB/develop/create_schema_files.php and
# run it.
# Table: 'phpbb_attachments'
CREATE TABLE phpbb_attachments (
attach_id mediumint(8) UNSIGNED NOT NULL auto_increment,

@ -1,8 +1,10 @@
/*
$Id: $
*/
* DO NOT EDIT THIS FILE, IT IS GENERATED
*
* To change the contents of this file, edit
* phpBB/develop/create_schema_files.php and
* run it.
*/
/*
This first section is optional, however its probably the best method

@ -1,8 +1,10 @@
/*
$Id: $
*/
* DO NOT EDIT THIS FILE, IT IS GENERATED
*
* To change the contents of this file, edit
* phpBB/develop/create_schema_files.php and
* run it.
*/
BEGIN;

@ -94,6 +94,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('delete_time', '0')
INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_check_mx', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_enable', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_function_name', 'mail');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_max_chunk_size', '50');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_package_size', '20');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_confirm', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_pm_icons', '1');
@ -165,6 +166,8 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewprofi
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewtopic', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_lastread', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_track', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jquery_cdn', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jquery_url', '//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jumpbox', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_moderators', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_online', '1');
@ -243,7 +246,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_host', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_password', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_port', '25');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_username', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('teampage_multiple', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('teampage_memberships', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('teampage_forums', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page', '25');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0');

@ -1,7 +1,8 @@
# DO NOT EDIT THIS FILE, IT IS GENERATED
#
# $Id: $
#
# To change the contents of this file, edit
# phpBB/develop/create_schema_files.php and
# run it.
BEGIN TRANSACTION;
# Table: 'phpbb_attachments'

@ -68,6 +68,9 @@ $lang = array_merge($lang, array(
'LENGTH_BAN_INVALID' => 'The date has to be formatted <kbd>YYYY-MM-DD</kbd>.',
'OPTIONS_BANNED' => 'Banned',
'OPTIONS_EXCLUDED' => 'Excluded',
'PERMANENT' => 'Permanent',
'UNTIL' => 'Until',

@ -174,7 +174,7 @@ $lang = array_merge($lang, array(
'MAX_POST_URLS' => 'Maximum links per post',
'MAX_POST_URLS_EXPLAIN' => 'Maximum number of URLs in a post. Set to 0 for unlimited links.',
'MIN_CHAR_LIMIT' => 'Minimum characters per post/message',
'MIN_CHAR_LIMIT_EXPLAIN' => 'The minimum number of characters the user need to enter within a post/private message.',
'MIN_CHAR_LIMIT_EXPLAIN' => 'The minimum number of characters the user need to enter within a post/private message. The minimum for this setting is 1.',
'POSTING' => 'Posting',
'POSTS_PER_PAGE' => 'Posts per page',
'QUOTE_DEPTH_LIMIT' => 'Maximum nesting depth for quotes',
@ -356,6 +356,8 @@ $lang = array_merge($lang, array(
'LOAD_CPF_PM' => 'Display custom profile fields in private messages',
'LOAD_CPF_VIEWPROFILE' => 'Display custom profile fields in user profiles',
'LOAD_CPF_VIEWTOPIC' => 'Display custom profile fields on topic pages',
'LOAD_JQUERY_CDN' => 'Serve jQuery using Googles CDN',
'LOAD_JQUERY_CDN_EXPLAIN' => 'If this setting is enabled, jQuery will be served from Googles AJAX API CDN instead of the copy included with phpBB on your server. If the CDN fails, phpBB will attempt to fall back to the copy included with phpBB.',
'LOAD_USER_ACTIVITY' => 'Show users activity',
'LOAD_USER_ACTIVITY_EXPLAIN' => 'Displays active topic/forum in user profiles and user control panel. It is recommended to disable this on boards with more than one million posts.',
'RECOMPILE_STYLES' => 'Recompile stale style components',

@ -340,6 +340,16 @@ $lang = array_merge($lang, array(
'DATABASE_SERVER_INFO' => 'Database server',
'DATABASE_SIZE' => 'Database size',
// Enviroment configuration checks, mbstring related
'ERROR_MBSTRING_FUNC_OVERLOAD' => 'Function overloading is improperly configured',
'ERROR_MBSTRING_FUNC_OVERLOAD_EXPLAIN' => '<var>mbstring.func_overload</var> must be set to either 0 or 4. You can check the current value on the <samp>PHP information</samp> page.',
'ERROR_MBSTRING_ENCODING_TRANSLATION' => 'Transparent character encoding is improperly configured',
'ERROR_MBSTRING_ENCODING_TRANSLATION_EXPLAIN' => '<var>mbstring.encoding_translation</var> must be set to 0. You can check the current value on the <samp>PHP information</samp> page.',
'ERROR_MBSTRING_HTTP_INPUT' => 'HTTP input character conversion is improperly configured',
'ERROR_MBSTRING_HTTP_INPUT_EXPLAIN' => '<var>mbstring.http_input</var> must be set to <samp>pass</samp>. You can check the current value on the <samp>PHP information</samp> page.',
'ERROR_MBSTRING_HTTP_OUTPUT' => 'HTTP output character conversion is improperly configured',
'ERROR_MBSTRING_HTTP_OUTPUT_EXPLAIN' => '<var>mbstring.http_output</var> must be set to <samp>pass</samp>. You can check the current value on the <samp>PHP information</samp> page.',
'FILES_PER_DAY' => 'Attachments per day',
'FORUM_STATS' => 'Board statistics',

@ -72,7 +72,7 @@ $lang = array_merge($lang, array(
'ENABLE_TOPIC_ICONS' => 'Enable topic icons',
'FORUM_ADMIN' => 'Forum administration',
'FORUM_ADMIN_EXPLAIN' => 'In phpBB3 there are no categories, everything is forum based. Each forum can have an unlimited number of sub-forums and you can determine whether each may be posted to or not (i.e. whether it acts like an old category). Here you can add, edit, delete, lock, unlock individual forums as well as set certain additional controls. If your posts and topics have got out of sync you can also resynchronise a forum. <strong>You need to copy or set appropriate permissions for newly created forums to have them displayed.</strong>',
'FORUM_ADMIN_EXPLAIN' => 'In phpBB3 everything is forum based. A category is just a special type of forum. Each forum can have an unlimited number of sub-forums and you can determine whether each may be posted to or not (i.e. whether it acts like an old category). Here you can add, edit, delete, lock, unlock individual forums as well as set certain additional controls. If your posts and topics have got out of sync you can also resynchronise a forum. <strong>You need to copy or set appropriate permissions for newly created forums to have them displayed.</strong>',
'FORUM_AUTO_PRUNE' => 'Enable auto-pruning',
'FORUM_AUTO_PRUNE_EXPLAIN' => 'Prunes the forum of topics, set the frequency/age parameters below.',
'FORUM_CREATED' => 'Forum created successfully.',

@ -129,11 +129,13 @@ $lang = array_merge($lang, array(
'SPECIAL_GROUPS' => 'Pre-defined groups',
'SPECIAL_GROUPS_EXPLAIN' => 'Pre-defined groups are special groups, they cannot be deleted or directly modified. However you can still add users and alter basic settings.',
'TEAMPAGE_DISP_ALL' => 'All memberships',
'TEAMPAGE_DISP_DEFAULT' => 'Users default group only',
'TEAMPAGE_DISP_FIRST' => 'First membership only',
'TEAMPAGE_EXPLAIN' => 'These are the groups which are displayed on the teampage:',
'TEAMPAGE_FORUMS' => 'Display moderated forums',
'TEAMPAGE_FORUMS_EXPLAIN' => 'If set to yes, moderators will have a list with all of the forums where they have moderator permissions displayed in their row. This can be very database intensive for big boards.',
'TEAMPAGE_MULTIPLE' => 'Display users in all groups',
'TEAMPAGE_MULTIPLE_EXPLAIN' => 'If set to no, the users will only be displayed in their primary group (If the primary group is not listed, the users will be displayed in their first displayed group).',
'TEAMPAGE_MEMBERSHIPS' => 'Display user memberships',
'TEAMPAGE_SETTINGS' => 'Teampage settings',
'TOTAL_MEMBERS' => 'Members',

@ -59,6 +59,7 @@ $lang = array_merge($lang, array(
'LANGUAGE_PACK_DELETED' => 'The language pack <strong>%s</strong> has been removed successfully. All users using this language have been reset to the boards default language.',
'LANGUAGE_PACK_DETAILS' => 'Language pack details',
'LANGUAGE_PACK_INSTALLED' => 'The language pack <strong>%s</strong> has been successfully installed.',
'LANGUAGE_PACK_CPF_UPDATE' => 'The custom profile fields language strings were copied from the default language. Please change them if necessary.',
'LANGUAGE_PACK_ISO' => 'ISO',
'LANGUAGE_PACK_LOCALNAME' => 'Local name',
'LANGUAGE_PACK_NAME' => 'Name',

@ -165,6 +165,7 @@ $lang = array_merge($lang, array(
'EMPTY_MESSAGE_SUBJECT' => 'You must specify a subject when composing a new message.',
'ENABLED' => 'Enabled',
'ENCLOSURE' => 'Enclosure',
'ENTER_USERNAME' => 'Enter username',
'ERR_CHANGING_DIRECTORY' => 'Unable to change directory.',
'ERR_CONNECTING_SERVER' => 'Error connecting to the server.',
'ERR_JAB_AUTH' => 'Could not authorise on Jabber server.',
@ -200,6 +201,7 @@ $lang = array_merge($lang, array(
'FORUM_RULES_LINK' => 'Please click here to view the forum rules',
'FROM' => 'from',
'FSOCK_DISABLED' => 'The operation could not be completed because the <var>fsockopen</var> function has been disabled or the server being queried could not be found.',
'FSOCK_TIMEOUT' => 'A timeout occurred while reading from the network stream.',
'FTP_FSOCK_HOST' => 'FTP host',
'FTP_FSOCK_HOST_EXPLAIN' => 'FTP server used to connect your site.',

@ -2,7 +2,7 @@ Subject: Account activated
Hello {USERNAME},
Your account on "{SITENAME}" has now been activated, you may login using the username you received in a previous e-mail.
Your account on "{SITENAME}" has been activated by an administrator, you may login now.
Your password has been securely stored in our database and cannot be retrieved. In the event that it is forgotten, you will be able to reset it using the email address associated with your account.

@ -8,7 +8,7 @@ You have received a new private message from "{AUTHOR_NAME}" to your account on
You can view your new message by clicking on the following link:
{U_INBOX}
{U_VIEW_MESSAGE}
You have requested that you be notified on this event, remember that you can always choose not to be notified of new messages by changing the appropriate setting in your profile.

@ -60,7 +60,7 @@ $help = array(
),
array(
0 => 'I registered in the past but cannot login any more?!',
1 => 'Attempt to locate the e-mail sent to you when you first registered, check your username and password and try again. It is possible an administrator has deactivated or deleted your account for some reason. Also, many boards periodically remove users who have not posted for a long time to reduce the size of the database. If this has happened, try registering again and being more involved in discussions.'
1 => 'It is possible an administrator has deactivated or deleted your account for some reason. Also, many boards periodically remove users who have not posted for a long time to reduce the size of the database. If this has happened, try registering again and being more involved in discussions.'
),
array(
0 => 'What is COPPA?',

@ -232,6 +232,7 @@ $lang = array_merge($lang, array(
'INST_ERR' => 'Installation error',
'INST_ERR_DB_CONNECT' => 'Could not connect to the database, see error message below.',
'INST_ERR_DB_FORUM_PATH' => 'The database file specified is within your board directory tree. You should put this file in a non web-accessible location.',
'INST_ERR_DB_INVALID_PREFIX'=> 'The prefix you entered is invalid. It must start with an alphanumeric character and must only contain alphanumeric characters, numbers and underscores.',
'INST_ERR_DB_NO_ERROR' => 'No error message given.',
'INST_ERR_DB_NO_MYSQLI' => 'The version of MySQL installed on this machine is incompatible with the “MySQL with MySQLi Extension” option you have selected. Please try the “MySQL” option instead.',
'INST_ERR_DB_NO_SQLITE' => 'The version of the SQLite extension you have installed is too old, it must be upgraded to at least 2.8.2.',
@ -353,6 +354,7 @@ $lang = array_merge($lang, array(
'TABLES_MISSING' => 'Could not find these tables<br />» <strong>%s</strong>.',
'TABLE_PREFIX' => 'Prefix for tables in database',
'TABLE_PREFIX_EXPLAIN' => 'The prefix must start with an alphanumeric character and must only contain alphanumeric characters, numbers and underscores.',
'TABLE_PREFIX_SAME' => 'The table prefix needs to be the one used by the software you are converting from.<br />» Specified table prefix was %s.',
'TESTS_PASSED' => 'Tests passed',
'TESTS_FAILED' => 'Tests failed',

@ -138,6 +138,7 @@ $lang = array_merge($lang, array(
'CURRENT_IMAGE' => 'Current image',
'CURRENT_PASSWORD' => 'Current password',
'CURRENT_PASSWORD_EXPLAIN' => 'You must confirm your current password if you wish to change it, alter your e-mail address or username.',
'CUR_PASSWORD_EMPTY' => 'You did not enter your current password.',
'CUR_PASSWORD_ERROR' => 'The current password you entered is incorrect.',
'CUSTOM_DATEFORMAT' => 'Custom…',
@ -268,9 +269,11 @@ $lang = array_merge($lang, array(
'MOVE_TO_FOLDER' => 'Move to folder',
'MOVE_UP' => 'Move up',
'NEW_EMAIL_CONFIRM_EMPTY' => 'You did not enter a confirm e-mail address.',
'NEW_EMAIL_ERROR' => 'The e-mail addresses you entered do not match.',
'NEW_FOLDER_NAME' => 'New folder name',
'NEW_PASSWORD' => 'New password',
'NEW_PASSWORD_CONFIRM_EMPTY' => 'You did not enter a confirm password.',
'NEW_PASSWORD_ERROR' => 'The passwords you entered do not match.',
'NOTIFY_METHOD' => 'Notification method',
'NOTIFY_METHOD_BOTH' => 'Both',

@ -229,7 +229,7 @@ switch ($mode)
if (isset($user_ary[$user_id]))
{
$row = $user_ary[$user_id];
if (!$config['teampage_multiple'] && ($group_id != $groups_ary[$row['default_group']]['group_id']) && $groups_ary[$row['default_group']]['group_teampage'])
if ($config['teampage_memberships'] == 1 && ($group_id != $groups_ary[$row['default_group']]['group_id']) && $groups_ary[$row['default_group']]['group_teampage'])
{
// Display users in their primary group, instead of the first group, when it is displayed on the teampage.
continue;
@ -259,7 +259,7 @@ switch ($mode)
'U_VIEW_PROFILE' => get_username_string('profile', $row['user_id'], $row['username'], $row['user_colour']),
));
if (!$config['teampage_multiple'])
if ($config['teampage_memberships'] != 2)
{
unset($user_ary[$user_id]);
}

@ -1,4 +1,8 @@
<!-- INCLUDE overall_header.html -->
<!-- IF S_SIMPLE_MESSAGE -->
<!-- INCLUDE simple_header.html -->
<!-- ELSE -->
<!-- INCLUDE overall_header.html -->
<!-- ENDIF -->
<div class="panel" id="message">
<div class="inner"><span class="corners-top"><span></span></span>
@ -8,4 +12,8 @@
<span class="corners-bottom"><span></span></span></div>
</div>
<!-- INCLUDE overall_footer.html -->
<!-- IF S_SIMPLE_MESSAGE -->
<!-- INCLUDE simple_footer.html -->
<!-- ELSE -->
<!-- INCLUDE overall_footer.html -->
<!-- ENDIF -->

@ -33,7 +33,8 @@
<!-- IF not S_IS_BOT -->{RUN_CRON_TASK}<!-- ENDIF -->
</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>

@ -6,7 +6,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>

@ -20,7 +20,7 @@
<ul class="topiclist">
<li class="header">
<dl>
<dt style="width: 40%"><a href="{U_SORT_FILENAME}">{L_FILENAME}</a></dt>
<dt><a href="{U_SORT_FILENAME}">{L_FILENAME}</a></dt>
<dd class="extra"><a href="{U_SORT_DOWNLOADS}">{L_DOWNLOADS}</a></dd>
<dd class="time"><span><a href="{U_SORT_POST_TIME}">{L_POST_TIME}</a></span></dd>
<dd class="mark">{L_MARK}</dd>
@ -32,7 +32,7 @@
<!-- BEGIN attachrow -->
<li class="row<!-- IF attachrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl>
<dt style="width: 40%"><a href="{attachrow.U_VIEW_ATTACHMENT}" class="topictitle">{attachrow.FILENAME}</a> ({attachrow.SIZE})<br />
<dt><a href="{attachrow.U_VIEW_ATTACHMENT}" class="topictitle">{attachrow.FILENAME}</a> ({attachrow.SIZE})<br />
<!-- IF attachrow.S_IN_MESSAGE -->{L_PM}: <!-- ELSE -->{L_TOPIC}: <!-- ENDIF --><a href="{attachrow.U_VIEW_TOPIC}">{attachrow.TOPIC_TITLE}</a></dt>
<dd class="extra">{attachrow.DOWNLOAD_COUNT}</dd>
<dd class="time"><span>{attachrow.POST_TIME}</span></dd>

@ -143,8 +143,15 @@
</tr>
<!-- ENDIF -->
<!-- BEGINELSE -->
<table class="table1" cellspacing="1">
<thead>
<tr>
<td class="bg1" colspan="5">{L_GROUPS_NO_MEMBERS}</td>
<th class="name">{L_MEMBERS}</th>
</tr>
</thead>
<tbody>
<tr>
<td class="bg1">{L_GROUPS_NO_MEMBERS}</td>
</tr>
<!-- END member -->
</tbody>

@ -1,117 +1,54 @@
<!DOCTYPE html>
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<title>{SITENAME} :: {PAGE_TITLE}</title>
<style type="text/css">
/* <![CDATA[ */
body {
font-family: Verdana,serif;
font-size: 10pt;
}
td {
font-family: Verdana,serif;
font-size: 10pt;
line-height: 150%;
}
.code, .quote {
font-size: smaller;
border: black solid 1px;
}
.forum {
font-family: Arial,Helvetica,sans-serif;
font-weight: bold;
font-size: 18pt;
}
.topic {
font-family: Arial,Helvetica,sans-serif;
font-size: 14pt;
font-weight: bold;
}
.gensmall {
font-size: 8pt;
}
hr {
color: #888888;
height: 3px;
border-style: solid;
}
hr.sep {
color: #AAAAAA;
height: 1px;
border-style: dashed;
}
/* ]]> */
</style>
<meta http-equiv="imagetoolbar" content="no" />
<meta name="resource-type" content="document" />
<meta name="distribution" content="global" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="robots" content="noindex" />
{META}
<title>{SITENAME} &bull; {PAGE_TITLE}</title>
<link href="{T_THEME_PATH}/print.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width="85%" cellspacing="3" cellpadding="0" border="0" align="center">
<tr>
<td colspan="2" align="center"><span class="forum">{SITENAME}</span><br /><span class="gensmall">{L_PRIVATE_MESSAGING}</a></span></td>
</tr>
<tr>
<td colspan="2"><br /></td>
</tr>
<tr>
<td><span class="topic">{SUBJECT}</span><br /></td>
<td align="right" valign="bottom"><span class="gensmall">{PAGE_NUMBER}</span></td>
</tr>
</table>
<body id="phpbb">
<div id="wrap">
<a id="top" name="top" accesskey="t"></a>
<hr width="85%" />
<div id="page-header">
<h1>{SITENAME}</h1>
<p>{SITE_DESCRIPTION}<br /><a href="{U_FORUM}">{U_FORUM}</a></p>
<table width="85%" cellspacing="3" cellpadding="0" border="0" align="center">
<tr>
<td width="10%" nowrap="nowrap">{L_PM_FROM}:&nbsp;</td>
<td><strong>{MESSAGE_AUTHOR}</strong> [ {SENT_DATE} ]</td>
</tr>
<h2>{TOPIC_TITLE}</h2>
<p><a href="{U_TOPIC}">{U_TOPIC}</a></p>
</div>
<!-- IF S_TO_RECIPIENT -->
<tr>
<td width="10%" nowrap="nowrap">{L_TO}:</td>
<td>
<!-- BEGIN to_recipient -->
<span<!-- IF to_recipient.IS_GROUP --> class="sep"<!-- ENDIF -->>{to_recipient.NAME}</span>&nbsp;
<!-- END to_recipient -->
</td>
</tr>
<!-- ENDIF -->
<div id="page-body">
<div class="page-number">{PAGE_NUMBER}</div>
<div class="post">
<h3>{SUBJECT}</h3>
<div class="date">{L_SENT_AT} <strong>{SENT_DATE}</strong></div>
<div class="author">{L_PM_FROM} <strong>{MESSAGE_AUTHOR}</strong></div>
<!-- IF S_TO_RECIPIENT -->
<div class="author">{L_TO} <strong><!-- BEGIN to_recipient -->{to_recipient.NAME}&nbsp;<!-- END to_recipient --></strong></div>
<!-- ENDIF -->
<!-- IF S_BCC_RECIPIENT -->
<div class="author">{L_BCC} <strong><!-- BEGIN bcc_recipient -->{bcc_recipient.NAME}&nbsp;<!-- END bcc_recipient --></strong></div>
<!-- ENDIF -->
<hr />
<div class="content">{MESSAGE}</div>
</div>
<hr />
</div>
<!-- IF S_BCC_RECIPIENT -->
<tr>
<td width="10%" nowrap="nowrap">{L_BCC}:</td>
<td>
<!-- BEGIN bcc_recipient -->
<!-- IF bcc_recipient.COLOUR --><span style="color:{bcc_recipient.COLOUR}"><!-- ELSE --><span<!-- IF bcc_recipient.IS_GROUP --> class="sep"<!-- ENDIF -->><!-- ENDIF -->{bcc_recipient.NAME}</span>&nbsp;
<!-- END bcc_recipient -->
</td>
</tr>
<!-- ENDIF -->
<tr>
<td colspan="2"><hr class="sep" />{MESSAGE}</td>
</tr>
</table>
<hr width="85%" />
<table width="85%" cellspacing="3" cellpadding="0" border="0" align="center">
<tr>
<td><span class="gensmall">{PAGE_NUMBER}</span></td>
<td align="{S_CONTENT_FLOW_END}"><span class="gensmall">{S_TIMEZONE}</span></td>
</tr>
<tr>
<td colspan="2" align="center"><span class="gensmall">Powered by phpBB&reg; Forum Software &copy; phpBB Group<br />http://www.phpbb.com/</span></td>
</tr>
</table>
<div id="page-footer">
<div class="page-number">{S_TIMEZONE}<br />{PAGE_NUMBER}</div>
<div class="copyright">Powered by phpBB&reg; Forum Software &copy; phpBB Group<br />http://www.phpbb.com/</div>
</div>
</div>
</body>
</html>

@ -4,13 +4,10 @@
<!-- NOTE: remove the style="display: none" when you want to have the forum description on the topic body -->
<!-- IF FORUM_DESC --><div style="display: none !important;">{FORUM_DESC}<br /></div><!-- ENDIF -->
<!-- IF MODERATORS or U_MCP -->
<p>
<!-- IF MODERATORS -->
<strong><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->:</strong> {MODERATORS}
<!-- ENDIF -->
</p>
<!-- IF MODERATORS -->
<p>
<strong><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->:</strong> {MODERATORS}
</p>
<!-- ENDIF -->
<!-- IF S_FORUM_RULES -->

@ -1,4 +1,4 @@
/* proSilver RTL definitions
/* RTL definitions
---------------------------------------- */
/**
@ -519,7 +519,7 @@
/**
* cp.css
*/
/* proSilver Control Panel Styles
/* Control Panel Styles
---------------------------------------- */

@ -1,4 +1,4 @@
/* proSilver Button Styles
/* Button Styles
---------------------------------------- */
/* Rollover buttons

@ -1,4 +1,4 @@
/* General proSilver Markup Styles
/* General Markup Styles
---------------------------------------- */
* {

@ -1,4 +1,4 @@
/* proSilver Content Styles
/* Content Styles
---------------------------------------- */
ul.topiclist {
@ -192,7 +192,7 @@ dd.extra {
dd.mark {
float: right !important;
width: 9%;
width: 90px;
text-align: center;
line-height: 200%;
font-size: 1.2em;

@ -1,4 +1,4 @@
/* proSilver Control Panel Styles
/* Control Panel Styles
---------------------------------------- */

@ -1,4 +1,4 @@
/* proSilver Form Styles
/* Form Styles
---------------------------------------- */
/* General form styles
@ -26,6 +26,7 @@ select {
border: 1px solid #666666;
padding: 1px;
background-color: #FAFAFA;
font-size: 1em;
}
option {

@ -1,4 +1,4 @@
/* proSilver Link Styles
/* Link Styles
---------------------------------------- */
/* Links adjustment to correctly display an order of rtl/ltr mixed content */

@ -1,10 +1,5 @@
/* proSilver Print Style Sheet
-------------------------------------------------
Author: subBlue ( http://www.subBlue.com/ )
Version: 25 August 2004
Copyright 2004 phpBB Group
-------------------------------------------------*/
/* Print Style Sheet
---------------------------------------- */
/* Lots still TODO here! */

@ -1,11 +1,9 @@
/* phpBB 3.0 Style Sheet
/* phpBB3 Style Sheet
--------------------------------------------------------------
Style name: proSilver
Based on style: proSilver (this is the default phpBB 3 style)
Original author: subBlue ( http://www.subBlue.com/ )
Modified by:
Copyright 2006 phpBB Group ( http://www.phpbb.com/ )
Style name: prosilver (the default phpBB 3.0.x style)
Based on style:
Original author: Tom Beddard ( http://www.subblue.com/ )
Modified by: phpBB Group ( http://www.phpbb.com/ )
--------------------------------------------------------------
*/
@ -17,4 +15,4 @@
@import url("forms.css");
@import url("tweaks.css");
@import url("colours.css");
@import url("imageset.css");
@import url("imageset.css");

@ -1,4 +1,4 @@
/* proSilver Style Sheet Tweaks
/* Style Sheet Tweaks
These style definitions are mainly IE specific
tweaks required due to its poor CSS support.

@ -8,7 +8,8 @@
<!-- IF DEBUG_OUTPUT --><br /><bdo dir="ltr">[ {DEBUG_OUTPUT} ]</bdo><!-- ENDIF --></span>
</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>

@ -5,7 +5,8 @@
<span class="copyright">Powered by <a href="http://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Group</span>
</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>

@ -59,7 +59,7 @@ hr.sep {
<table width="85%" cellspacing="3" cellpadding="0" border="0" align="center">
<tr>
<td colspan="2" align="center"><span class="Forum">{SITENAME}</span><br /><span class="gensmall">{L_PRIVATE_MESSAGING}</a></span></td>
<td colspan="2" align="center"><span class="Forum">{SITENAME}</span><br /><span class="gensmall">{L_PRIVATE_MESSAGING}</span></td>
</tr>
<tr>
<td colspan="2"><br /></td>

@ -1,14 +1,9 @@
/* phpBB 3.0 Style Sheet
/* phpBB3 Style Sheet
--------------------------------------------------------------
Style name: subsilver2
Based on style: subSilver (the default phpBB 2 style)
Original author: subBlue ( http://www.subBlue.com/ )
Modified by: psoTFX and the phpBB team ( http://www.phpbb.com )
This is an alternative style for phpBB3 for those wishing to stay with
the familiar subSilver style of phpBB version 2.x
Copyright 2006 phpBB Group ( http://www.phpbb.com/ )
Style name: subsilver2
Based on style: subSilver (the default phpBB 2.0.x style)
Original author: Tom Beddard ( http://www.subblue.com/ )
Modified by: phpBB Group ( http://www.phpbb.com/ )
--------------------------------------------------------------
*/

@ -256,6 +256,12 @@ if (!$user->data['is_registered'])
redirect(append_sid("{$phpbb_root_path}index.$phpEx"));
}
if ($id == 'pm' && $mode == 'view' && isset($_GET['p']))
{
$redirect_url = append_sid("{$phpbb_root_path}ucp.$phpEx?i=pm&p=" . request_var('p', 0));
login_box($redirect_url, $user->lang['LOGIN_EXPLAIN_UCP']);
}
login_box('', $user->lang['LOGIN_EXPLAIN_UCP']);
}

@ -209,7 +209,7 @@ $s_watching_forum = array(
'is_watching' => false,
);
if (($config['email_enable'] || $config['jab_enable']) && $config['allow_forum_notify'] && $forum_data['forum_type'] == FORUM_POST && $auth->acl_get('f_subscribe', $forum_id))
if (($config['email_enable'] || $config['jab_enable']) && $config['allow_forum_notify'] && $forum_data['forum_type'] == FORUM_POST && ($auth->acl_get('f_subscribe', $forum_id) || $user->data['user_id'] == ANONYMOUS))
{
$notify_status = (isset($forum_data['notify_status'])) ? $forum_data['notify_status'] : NULL;
watch_topic_forum('forum', $s_watching_forum, $user->data['user_id'], $forum_id, 0, $notify_status, $start, $forum_data['forum_name']);
@ -391,6 +391,12 @@ if ($forum_data['forum_type'] == FORUM_POST)
while ($row = $db->sql_fetchrow($result))
{
if (!$row['topic_approved'] && !$auth->acl_get('m_approve', $row['forum_id']))
{
// Do not display announcements that are waiting for approval.
continue;
}
$rowset[$row['topic_id']] = $row;
$announcement_list[] = $row['topic_id'];
@ -567,10 +573,14 @@ if ($s_display_active)
$topics_count = 1;
}
// We need to remove the global announcements from the forums total topic count,
// otherwise the number is different from the one on the forum list
$total_topic_count = $topics_count - sizeof($global_announce_forums);
$template->assign_vars(array(
'PAGINATION' => generate_pagination(append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id" . ((strlen($u_sort_param)) ? "&amp;$u_sort_param" : '')), $topics_count, $config['topics_per_page'], $start),
'PAGE_NUMBER' => on_page($topics_count, $config['topics_per_page'], $start),
'TOTAL_TOPICS' => ($s_display_active) ? false : (($topics_count == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $topics_count)))
'TOTAL_TOPICS' => ($s_display_active) ? false : (($total_topic_count == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $total_topic_count)))
);
$topic_list = ($store_reverse) ? array_merge($announcement_list, array_reverse($topic_list)) : array_merge($announcement_list, $topic_list);

@ -454,9 +454,10 @@ $s_watching_topic = array(
'is_watching' => false,
);
if (($config['email_enable'] || $config['jab_enable']) && $config['allow_topic_notify'] && $user->data['is_registered'])
if (($config['email_enable'] || $config['jab_enable']) && $config['allow_topic_notify'])
{
watch_topic_forum('topic', $s_watching_topic, $user->data['user_id'], $forum_id, $topic_id, $topic_data['notify_status'], $start, $topic_data['topic_title']);
$notify_status = (isset($topic_data['notify_status'])) ? $topic_data['notify_status'] : null;
watch_topic_forum('topic', $s_watching_topic, $user->data['user_id'], $forum_id, $topic_id, $notify_status, $start, $topic_data['topic_title']);
// Reset forum notification if forum notify is set
if ($config['allow_forum_notify'] && $auth->acl_get('f_subscribe', $forum_id))

@ -14,6 +14,10 @@
<testsuites>
<testsuite name="phpBB Test Suite">
<directory suffix="_test.php">./tests/</directory>
<exclude>./tests/functional</exclude>
</testsuite>
<testsuite name="phpBB Functional Tests">
<directory suffix="_test.php" phpVersion="5.3.0" phpVersionOperator=">=">./tests/functional</directory>
</testsuite>
</testsuites>

@ -14,11 +14,16 @@
<testsuites>
<testsuite name="phpBB Test Suite">
<directory suffix="_test.php">./tests/</directory>
<exclude>./tests/functional</exclude>
</testsuite>
<testsuite name="phpBB Functional Tests">
<directory suffix="_test.php" phpVersion="5.3.0" phpVersionOperator=">=">./tests/functional</directory>
</testsuite>
</testsuites>
<groups>
<exclude>
<group>functional</group>
<group>slow</group>
</exclude>
</groups>

52
phpunit.xml.functional Normal file

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="true"
backupStaticAttributes="true"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="tests/bootstrap.php"
>
<testsuites>
<testsuite name="phpBB Test Suite">
<directory suffix="_test.php">./tests/</directory>
<exclude>./tests/functional</exclude>
</testsuite>
<testsuite name="phpBB Functional Tests">
<directory suffix="_test.php" phpVersion="5.3.0" phpVersionOperator=">=">./tests/functional</directory>
</testsuite>
</testsuites>
<groups>
<include>
<group>functional</group>
</include>
</groups>
<filter>
<blacklist>
<directory>./tests/</directory>
</blacklist>
<whitelist>
<directory suffix=".php">./phpBB/includes/</directory>
<exclude>
<file>./phpBB/includes/db/firebird.php</file>
<file>./phpBB/includes/db/mysql.php</file>
<file>./phpBB/includes/db/mysqli.php</file>
<file>./phpBB/includes/db/mssql.php</file>
<file>./phpBB/includes/db/mssql_odbc.php</file>
<file>./phpBB/includes/db/mssqlnative.php</file>
<file>./phpBB/includes/db/oracle.php</file>
<file>./phpBB/includes/db/postgres.php</file>
<file>./phpBB/includes/db/sqlite.php</file>
<file>./phpBB/includes/search/fulltext_native.php</file>
<file>./phpBB/includes/search/fulltext_mysql.php</file>
<directory suffix=".php">./phpBB/includes/captcha/</directory>
</exclude>
</whitelist>
</filter>
</phpunit>

@ -41,3 +41,8 @@ require_once 'test_framework/phpbb_test_case_helpers.php';
require_once 'test_framework/phpbb_test_case.php';
require_once 'test_framework/phpbb_database_test_case.php';
require_once 'test_framework/phpbb_database_test_connection_manager.php';
if (version_compare(PHP_VERSION, '5.3.0-dev', '>='))
{
require_once 'test_framework/phpbb_functional_test_case.php';
}

@ -234,6 +234,14 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case
$this->assertEquals($row2, $row_actual);
}
public function test_list_columns()
{
$this->assertEquals(
array_keys($this->table_data['COLUMNS']),
array_values($this->tools->sql_list_columns('prefix_table_name'))
);
}
public function test_column_exists()
{
$this->assertTrue($this->tools->sql_column_exists('prefix_table_name', 'c_id'));
@ -258,6 +266,13 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case
$this->assertFalse($this->tools->sql_column_exists('prefix_table_name', 'c_id'));
}
public function test_list_tables()
{
$tables = $this->tools->sql_list_tables();
$this->assertTrue(isset($tables['prefix_table_name']));
$this->assertFalse(isset($tables['prefix_does_not_exist']));
}
public function test_table_exists()
{
$this->assertTrue($this->tools->sql_table_exists('prefix_table_name'));
@ -333,4 +348,15 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case
),
));
}
public function test_index_exists()
{
$this->assertTrue($this->tools->sql_index_exists('prefix_table_name', 'i_simple'));
}
public function test_create_index_against_index_exists()
{
$this->tools->sql_create_index('prefix_table_name', 'fookey', array('c_timestamp', 'c_decimal'));
$this->assertTrue($this->tools->sql_index_exists('prefix_table_name', 'fookey'));
}
}

@ -319,7 +319,7 @@ class phpbb_dbal_select_test extends phpbb_database_test_case
$db->sql_freeresult($result);
}
function test_nested_transactions()
public function test_nested_transactions()
{
$db = $this->new_dbal();
@ -341,4 +341,20 @@ class phpbb_dbal_select_test extends phpbb_database_test_case
$this->assertEquals('1', $row['user_id']);
}
/**
* fix for PHPBB3-10307
*/
public function test_sql_fetchrow_returns_false_when_empty()
{
$db = $this->new_dbal();
$sql = 'SELECT * FROM (SELECT 1) AS TBL WHERE 1 = 0';
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$this->assertSame(false, $row);
}
}

@ -0,0 +1,26 @@
<?php
/**
*
* @package testing
* @copyright (c) 2011 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* @group functional
*/
class phpbb_functional_browse_test extends phpbb_functional_test_case
{
public function test_index()
{
$crawler = $this->request('GET', 'index.php');
$this->assertGreaterThan(0, $crawler->filter('.topiclist')->count());
}
public function test_viewforum()
{
$crawler = $this->request('GET', 'viewforum.php?f=2');
$this->assertGreaterThan(0, $crawler->filter('.topiclist')->count());
}
}

@ -0,0 +1,35 @@
<?php
/**
*
* @package testing
* @copyright (c) 2011 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
class phpbb_regex_table_prefix_test extends phpbb_test_case
{
public function table_prefix_test_data()
{
return array(
array('phpbb_', 1),
array('phpBB3', 1),
array('a', 1),
array('', 0),
array('_', 0),
array('a-', 0),
array("'", 0),
);
}
/**
* @dataProvider table_prefix_test_data
*/
public function test_table_prefix($prefix, $expected)
{
$this->assertEquals($expected, preg_match(get_preg_expression('table_prefix'), $prefix));
}
}

@ -40,46 +40,14 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
public function get_database_config()
{
if (isset($_SERVER['PHPBB_TEST_DBMS']))
{
return array(
'dbms' => isset($_SERVER['PHPBB_TEST_DBMS']) ? $_SERVER['PHPBB_TEST_DBMS'] : '',
'dbhost' => isset($_SERVER['PHPBB_TEST_DBHOST']) ? $_SERVER['PHPBB_TEST_DBHOST'] : '',
'dbport' => isset($_SERVER['PHPBB_TEST_DBPORT']) ? $_SERVER['PHPBB_TEST_DBPORT'] : '',
'dbname' => isset($_SERVER['PHPBB_TEST_DBNAME']) ? $_SERVER['PHPBB_TEST_DBNAME'] : '',
'dbuser' => isset($_SERVER['PHPBB_TEST_DBUSER']) ? $_SERVER['PHPBB_TEST_DBUSER'] : '',
'dbpasswd' => isset($_SERVER['PHPBB_TEST_DBPASSWD']) ? $_SERVER['PHPBB_TEST_DBPASSWD'] : '',
);
}
else if (file_exists(dirname(__FILE__) . '/../test_config.php'))
{
include(dirname(__FILE__) . '/../test_config.php');
$config = phpbb_test_case_helpers::get_test_config();
return array(
'dbms' => $dbms,
'dbhost' => $dbhost,
'dbport' => $dbport,
'dbname' => $dbname,
'dbuser' => $dbuser,
'dbpasswd' => $dbpasswd,
);
}
else if (extension_loaded('sqlite') && version_compare(PHPUnit_Runner_Version::id(), '3.4.15', '>='))
{
// Silently use sqlite
return array(
'dbms' => 'sqlite',
'dbhost' => dirname(__FILE__) . '/../phpbb_unit_tests.sqlite2', // filename
'dbport' => '',
'dbname' => '',
'dbuser' => '',
'dbpasswd' => '',
);
}
else
if (!isset($config['dbms']))
{
$this->markTestSkipped('Missing test_config.php: See first error.');
}
return $config;
}
public function getConnection()

@ -69,6 +69,11 @@ class phpbb_database_test_connection_manager
default:
$dsn .= 'host=' . $this->config['dbhost'];
if ($this->config['dbport'])
{
$dsn .= ';port=' . $this->config['dbport'];
}
if ($use_db)
{
$dsn .= ';dbname=' . $this->config['dbname'];

@ -0,0 +1,148 @@
<?php
/**
*
* @package testing
* @copyright (c) 2011 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
require_once __DIR__ . '/../../vendor/goutte.phar';
require_once __DIR__ . '/../../phpBB/includes/functions_install.php';
class phpbb_functional_test_case extends phpbb_test_case
{
protected $client;
protected $root_url;
static protected $config = array();
static protected $already_installed = false;
public function setUp()
{
if (!isset(self::$config['phpbb_functional_url']))
{
$this->markTestSkipped('phpbb_functional_url was not set in test_config and wasn\'t set as PHPBB_FUNCTIONAL_URL environment variable either.');
}
$this->client = new Goutte\Client();
$this->root_url = self::$config['phpbb_functional_url'];
}
public function request($method, $path)
{
return $this->client->request($method, $this->root_url . $path);
}
public function __construct($name = NULL, array $data = array(), $dataName = '')
{
parent::__construct($name, $data, $dataName);
$this->backupStaticAttributesBlacklist += array(
'phpbb_functional_test_case' => array('config', 'already_installed'),
);
if (!self::$already_installed)
{
$this->install_board();
self::$already_installed = true;
}
}
protected function install_board()
{
global $phpbb_root_path, $phpEx;
self::$config = phpbb_test_case_helpers::get_test_config();
if (!isset(self::$config['phpbb_functional_url']))
{
return;
}
self::$config['table_prefix'] = 'phpbb_';
$this->recreate_database(self::$config);
if (file_exists($phpbb_root_path . "config.$phpEx"))
{
if (!file_exists($phpbb_root_path . "config_dev.$phpEx"))
{
rename($phpbb_root_path . "config.$phpEx", $phpbb_root_path . "config_dev.$phpEx");
}
else
{
unlink($phpbb_root_path . "config.$phpEx");
}
}
// begin data
$data = array();
$data = array_merge($data, self::$config);
$data = array_merge($data, array(
'default_lang' => 'en',
'admin_name' => 'admin',
'admin_pass1' => 'admin',
'admin_pass2' => 'admin',
'board_email1' => 'nobody@example.com',
'board_email2' => 'nobody@example.com',
));
$parseURL = parse_url(self::$config['phpbb_functional_url']);
$data = array_merge($data, array(
'email_enable' => false,
'smtp_delivery' => false,
'smtp_host' => '',
'smtp_auth' => '',
'smtp_user' => '',
'smtp_pass' => '',
'cookie_secure' => false,
'force_server_vars' => false,
'server_protocol' => $parseURL['scheme'] . '://',
'server_name' => 'localhost',
'server_port' => isset($parseURL['port']) ? (int) $parseURL['port'] : 80,
'script_path' => $parseURL['path'],
));
// end data
$content = $this->do_request('install');
$this->assertContains('Welcome to Installation', $content);
$this->do_request('create_table', $data);
file_put_contents($phpbb_root_path . "config.$phpEx", phpbb_create_config_file_data($data, self::$config['dbms'], array(), true));
$this->do_request('config_file', $data);
copy($phpbb_root_path . "config.$phpEx", $phpbb_root_path . "config_test.$phpEx");
$this->do_request('final', $data);
}
private function do_request($sub, $post_data = null)
{
$context = null;
if ($post_data)
{
$context = stream_context_create(array(
'http' => array(
'method' => 'POST',
'header' => 'Content-Type: application/x-www-form-urlencoded',
'content' => http_build_query($post_data),
'ignore_errors' => true,
),
));
}
return file_get_contents(self::$config['phpbb_functional_url'] . 'install/index.php?mode=install&sub=' . $sub, false, $context);
}
private function recreate_database($config)
{
$db_conn_mgr = new phpbb_database_test_connection_manager($config);
$db_conn_mgr->recreate_db();
}
}

@ -46,4 +46,61 @@ class phpbb_test_case_helpers
{
mkdir($path, 0777, true);
}
static public function get_test_config()
{
$config = array();
if (extension_loaded('sqlite') && version_compare(PHPUnit_Runner_Version::id(), '3.4.15', '>='))
{
$config = array_merge($config, array(
'dbms' => 'sqlite',
'dbhost' => dirname(__FILE__) . '/../phpbb_unit_tests.sqlite2', // filename
'dbport' => '',
'dbname' => '',
'dbuser' => '',
'dbpasswd' => '',
));
}
if (file_exists(dirname(__FILE__) . '/../test_config.php'))
{
include(dirname(__FILE__) . '/../test_config.php');
$config = array_merge($config, array(
'dbms' => $dbms,
'dbhost' => $dbhost,
'dbport' => $dbport,
'dbname' => $dbname,
'dbuser' => $dbuser,
'dbpasswd' => $dbpasswd,
));
if (isset($phpbb_functional_url))
{
$config['phpbb_functional_url'] = $phpbb_functional_url;
}
}
if (isset($_SERVER['PHPBB_TEST_DBMS']))
{
$config = array_merge($config, array(
'dbms' => isset($_SERVER['PHPBB_TEST_DBMS']) ? $_SERVER['PHPBB_TEST_DBMS'] : '',
'dbhost' => isset($_SERVER['PHPBB_TEST_DBHOST']) ? $_SERVER['PHPBB_TEST_DBHOST'] : '',
'dbport' => isset($_SERVER['PHPBB_TEST_DBPORT']) ? $_SERVER['PHPBB_TEST_DBPORT'] : '',
'dbname' => isset($_SERVER['PHPBB_TEST_DBNAME']) ? $_SERVER['PHPBB_TEST_DBNAME'] : '',
'dbuser' => isset($_SERVER['PHPBB_TEST_DBUSER']) ? $_SERVER['PHPBB_TEST_DBUSER'] : '',
'dbpasswd' => isset($_SERVER['PHPBB_TEST_DBPASSWD']) ? $_SERVER['PHPBB_TEST_DBPASSWD'] : ''
));
}
if (isset($_SERVER['PHPBB_FUNCTIONAL_URL']))
{
$config = array_merge($config, array(
'phpbb_functional_url' => isset($_SERVER['PHPBB_FUNCTIONAL_URL']) ? $_SERVER['PHPBB_FUNCTIONAL_URL'] : '',
));
}
return $config;
}
}

BIN
vendor/goutte.phar vendored Normal file

Binary file not shown.