mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Merge commit 'release-3.0-RC5'
This commit is contained in:
commit
1a09d0e238
127 changed files with 1944 additions and 672 deletions
|
@ -205,7 +205,10 @@ function adm_page_footer($copyright_html = true)
|
|||
|
||||
garbage_collection();
|
||||
|
||||
exit;
|
||||
if (!defined('PHPBB_EMBEDDED'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -477,7 +480,7 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
|
|||
$cfg_array[$config_name] = trim($cfg_array[$config_name]);
|
||||
|
||||
// Make sure no NUL byte is present...
|
||||
if (strpos($cfg_array[$config_name], '\0') !== false || strpos($cfg_array[$config_name], '%00') !== false)
|
||||
if (strpos($cfg_array[$config_name], "\0") !== false || strpos($cfg_array[$config_name], '%00') !== false)
|
||||
{
|
||||
$cfg_array[$config_name] = '';
|
||||
break;
|
||||
|
|
|
@ -31,9 +31,9 @@
|
|||
|
||||
function display_details(option)
|
||||
{
|
||||
document.getElementById('acp_ban').unbangivereason.value = ban_give_reason[option];
|
||||
document.getElementById('acp_ban').unbanreason.value = ban_reason[option];
|
||||
document.getElementById('acp_ban').unbanlength.value = ban_length[option];
|
||||
document.getElementById('acp_unban').unbangivereason.value = ban_give_reason[option];
|
||||
document.getElementById('acp_unban').unbanreason.value = ban_reason[option];
|
||||
document.getElementById('acp_unban').unbanlength.value = ban_length[option];
|
||||
}
|
||||
|
||||
//-->
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
|
||||
<!-- IF S_EDIT -->
|
||||
|
||||
<script type="text/javascript" defer="defer">
|
||||
<!--
|
||||
<!-- IF S_ADD_CODE -->
|
||||
<script type="text/javascript" defer="defer">
|
||||
<!--
|
||||
|
||||
|
||||
var smiley = Array();
|
||||
<!-- BEGIN smile -->
|
||||
smiley['{smile.SMILEY_URL}'] = Array();
|
||||
|
@ -37,10 +37,33 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
||||
function toggle_select(icon, display, select)
|
||||
{
|
||||
var disp = document.getElementById('order_disp[' + icon + ']');
|
||||
var nodisp = document.getElementById('order_no_disp[' + icon + ']');
|
||||
disp.disabled = !display;
|
||||
nodisp.disabled = display;
|
||||
if (display)
|
||||
{
|
||||
document.getElementById(select).selectedIndex = 0;
|
||||
nodisp.className = 'disabled-options';
|
||||
disp.className = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById(select).selectedIndex = {S_ORDER_LIST_DISPLAY_COUNT};
|
||||
disp.className = 'disabled-options';
|
||||
nodisp.className = '';
|
||||
}
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
|
||||
<a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">« {L_BACK}</a>
|
||||
|
||||
<h1>{L_TITLE}</h1>
|
||||
|
@ -89,13 +112,16 @@
|
|||
<td><input class="text post" type="text" size="3" name="width[{items.IMG}]" value="{items.WIDTH}" /></td>
|
||||
<td><input class="text post" type="text" size="3" name="height[{items.IMG}]" value="{items.HEIGHT}" /></td>
|
||||
<td>
|
||||
<input type="checkbox" class="radio" name="display_on_posting[{items.IMG}]"{items.POSTING_CHECKED} />
|
||||
<input type="checkbox" class="radio" name="display_on_posting[{items.IMG}]"{items.POSTING_CHECKED} onclick="toggle_select('{items.IMG}', this.checked, 'order[{items.IMG}]');"/>
|
||||
<!-- IF items.S_ID -->
|
||||
<input type="hidden" name="id[{items.IMG}]" value="{items.ID}" />
|
||||
<!-- ENDIF -->
|
||||
</td>
|
||||
<!-- IF ID or S_ADD -->
|
||||
<td><select name="order[{items.IMG}]">{S_ORDER_LIST}</select></td>
|
||||
<td><select id="order[{items.IMG}]" name="order[{items.IMG}]">
|
||||
<optgroup id="order_disp[{items.IMG}]" label="{L_DISPLAY_POSTING}" <!-- IF not items.POSTING_CHECKED -->disabled="disabled" class="disabled-options" <!-- ENDIF -->>{S_ORDER_LIST_DISPLAY}</optgroup>
|
||||
<optgroup id="order_no_disp[{items.IMG}]" label="{L_DISPLAY_POSTING_NO}" <!-- IF items.POSTING_CHECKED -->disabled="disabled" class="disabled-options" <!-- ENDIF -->>{S_ORDER_LIST_UNDISPLAY}</optgroup>
|
||||
</select></td>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_ADD -->
|
||||
<td><input type="checkbox" class="radio" name="add_img[{items.IMG}]" value="1" /></td>
|
||||
|
@ -113,8 +139,11 @@
|
|||
<td><input class="text post" type="text" name="add_emotion" id="add_emotion" value="{EMOTION}" size="10" maxlength="50" /></td>
|
||||
<td><input class="text post" type="text" size="3" name="add_width" id="add_width" value="{WIDTH}" /></td>
|
||||
<td><input class="text post" type="text" size="3" name="add_height" id="add_height" value="{HEIGHT}" /></td>
|
||||
<td><input type="checkbox" class="radio" name="add_display_on_posting" checked="checked" /></td>
|
||||
<td><select name="add_order" id="add_order">{S_ADD_ORDER_LIST}</select></td>
|
||||
<td><input type="checkbox" class="radio" name="add_display_on_posting" checked="checked" onclick="toggle_select('add', this.checked, 'add_order');"/></td>
|
||||
<td><select id="add_order" name="add_order">
|
||||
<optgroup id="order_disp[add]" label="{L_DISPLAY_POSTING}">{S_ADD_ORDER_LIST_DISPLAY}</optgroup>
|
||||
<optgroup id="order_no_disp[add]" label="{L_DISPLAY_POSTING_NO}" disabled="disabled" class="disabled-options" >{S_ADD_ORDER_LIST_UNDISPLAY}</optgroup>
|
||||
</select></td>
|
||||
<td><input type="checkbox" class="radio" name="add_additional_code" value="1" /></td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
<legend>{L_USER_CUSTOM_PROFILE_FIELDS}</legend>
|
||||
<!-- BEGIN profile_fields -->
|
||||
<dl>
|
||||
<dt><label>{profile_fields.LANG_NAME}:</label><!-- IF profile_fields.LANG_EXPLAIN --><br /><span>{profile_fields.LANG_EXPLAIN}</span><!-- ENDIF --></dt>
|
||||
<dt><label<!-- IF profile_fields.FIELD_ID --> for="{profile_fields.FIELD_ID}"<!-- ENDIF -->>{profile_fields.LANG_NAME}:</label><!-- IF profile_fields.LANG_EXPLAIN --><br /><span>{profile_fields.LANG_EXPLAIN}</span><!-- ENDIF --></dt>
|
||||
<dd>{profile_fields.FIELD}</dd>
|
||||
<!-- IF profile_fields.ERROR -->
|
||||
<dd><span class="small" style="color: red;">{profile_fields.ERROR}</span></dd>
|
||||
|
|
|
@ -726,6 +726,11 @@ optgroup {
|
|||
font-weight: bold;
|
||||
}
|
||||
|
||||
optgroup.disabled-options {
|
||||
display: none;
|
||||
background-color: gray;
|
||||
}
|
||||
|
||||
option {
|
||||
padding: 0 1em 0 0;
|
||||
color: #000;
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
|
||||
<!-- BEGIN dropdown -->
|
||||
<select name="{dropdown.FIELD_IDENT}">
|
||||
<select name="{dropdown.FIELD_IDENT}" id="{dropdown.FIELD_IDENT}">
|
||||
<!-- BEGIN options --><option value="{dropdown.options.OPTION_ID}"{dropdown.options.SELECTED}>{dropdown.options.VALUE}</option><!-- END options -->
|
||||
</select>
|
||||
<!-- END dropdown -->
|
||||
|
||||
<!-- BEGIN text -->
|
||||
<textarea name="{text.FIELD_IDENT}" rows="{text.FIELD_ROWS}" cols="{text.FIELD_COLS}">{text.FIELD_VALUE}</textarea>
|
||||
<textarea name="{text.FIELD_IDENT}" id="{text.FIELD_IDENT}" rows="{text.FIELD_ROWS}" cols="{text.FIELD_COLS}">{text.FIELD_VALUE}</textarea>
|
||||
<!-- END text -->
|
||||
|
||||
<!-- BEGIN string -->
|
||||
<input type="text" name="{string.FIELD_IDENT}" size="{string.FIELD_LENGTH}" maxlength="{string.FIELD_MAXLEN}" value="{string.FIELD_VALUE}" />
|
||||
<input type="text" name="{string.FIELD_IDENT}" id="{string.FIELD_IDENT}" size="{string.FIELD_LENGTH}" maxlength="{string.FIELD_MAXLEN}" value="{string.FIELD_VALUE}" />
|
||||
<!-- END string -->
|
||||
|
||||
<!-- BEGIN bool -->
|
||||
<!-- IF bool.FIELD_LENGTH eq 1 -->
|
||||
<!-- BEGIN options --><label><input type="radio" class="radio" name="{bool.FIELD_IDENT}" value="{bool.options.OPTION_ID}"{bool.options.CHECKED} /> {bool.options.VALUE}</label><!-- END options -->
|
||||
<!-- BEGIN options --><label for="{bool.FIELD_IDENT}_{bool.options.OPTION_ID}"><input type="radio" class="radio" name="{bool.FIELD_IDENT}" id="{bool.FIELD_IDENT}_{bool.options.OPTION_ID}" value="{bool.options.OPTION_ID}"{bool.options.CHECKED} /> {bool.options.VALUE}</label> <!-- END options -->
|
||||
<!-- ELSE -->
|
||||
<input type="checkbox" class="radio" name="{bool.FIELD_IDENT}" value="1"<!-- IF bool.FIELD_VALUE --> checked="checked"<!-- ENDIF --> />
|
||||
<input type="checkbox" class="radio" name="{bool.FIELD_IDENT}" id="{bool.FIELD_IDENT}" value="1"<!-- IF bool.FIELD_VALUE --> checked="checked"<!-- ENDIF --> />
|
||||
<!-- ENDIF -->
|
||||
<!-- END bool -->
|
||||
|
||||
<!-- BEGIN int -->
|
||||
<input type="text" name="{int.FIELD_IDENT}" size="{int.FIELD_LENGTH}" value="{int.FIELD_VALUE}" />
|
||||
<input type="text" name="{int.FIELD_IDENT}" id="{int.FIELD_IDENT}" size="{int.FIELD_LENGTH}" value="{int.FIELD_VALUE}" />
|
||||
<!-- END int -->
|
||||
|
||||
<!-- BEGIN date -->
|
||||
<span>{L_DAY}:</span> <select name="{date.FIELD_IDENT}_day">{date.S_DAY_OPTIONS}</select>
|
||||
<span>{L_MONTH}:</span> <select name="{date.FIELD_IDENT}_month">{date.S_MONTH_OPTIONS}</select>
|
||||
<span>{L_YEAR}:</span> <select name="{date.FIELD_IDENT}_year">{date.S_YEAR_OPTIONS}</select>
|
||||
<span>{L_DAY}:</span> <select name="{date.FIELD_IDENT}_day" id="{date.FIELD_IDENT}_day">{date.S_DAY_OPTIONS}</select>
|
||||
<span>{L_MONTH}:</span> <select name="{date.FIELD_IDENT}_month" id="{date.FIELD_IDENT}_month">{date.S_MONTH_OPTIONS}</select>
|
||||
<span>{L_YEAR}:</span> <select name="{date.FIELD_IDENT}_year" id="{date.FIELD_IDENT}_year">{date.S_YEAR_OPTIONS}</select>
|
||||
<!-- END date -->
|
||||
|
|
|
@ -120,8 +120,9 @@
|
|||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF L_SUBMIT -->
|
||||
<!-- IF L_MESSAGE --><p>{L_MESSAGE}</p><!-- ENDIF -->
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
<!-- IF L_MESSAGE --><p>{L_MESSAGE}</p><!-- ENDIF -->
|
||||
{S_HIDDEN}
|
||||
<!-- IF L_SUBMIT --><input class="button1<!-- IF S_REFRESH --> disabled<!-- ENDIF -->" type="submit" id="submit" <!-- IF S_REFRESH -->disabled="disabled" <!-- ELSE --> onclick="this.className = 'button1 disabled';" onsubmit="this.disabled = 'disabled';" <!-- ENDIF -->name="submit" value="{L_SUBMIT}" /><!-- ENDIF -->
|
||||
</fieldset>
|
||||
|
|
|
@ -98,16 +98,7 @@ else
|
|||
|
||||
if (defined('IN_CRON'))
|
||||
{
|
||||
chdir($phpbb_root_path);
|
||||
if (@function_exists('getcwd'))
|
||||
{
|
||||
$phpbb_root_path = getcwd() . '/';
|
||||
}
|
||||
else
|
||||
{
|
||||
// This is a best guess
|
||||
$phpbb_root_path = pathinfo($_SERVER['SCRIPT_FILENAME'], PATHINFO_DIRNAME) . '/';
|
||||
}
|
||||
$phpbb_root_path = dirname(__FILE__) . DIRECTORY_SEPARATOR;
|
||||
}
|
||||
|
||||
if (!file_exists($phpbb_root_path . 'config.' . $phpEx))
|
||||
|
|
|
@ -33,6 +33,12 @@ echo base64_decode('R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==
|
|||
// test without flush ;)
|
||||
// flush();
|
||||
|
||||
//
|
||||
if (!isset($config['cron_lock']))
|
||||
{
|
||||
set_config('cron_lock', '0', true);
|
||||
}
|
||||
|
||||
// make sure cron doesn't run multiple times in parallel
|
||||
if ($config['cron_lock'])
|
||||
{
|
||||
|
|
|
@ -46,6 +46,9 @@ $dbms_type_map = array(
|
|||
'MTEXT_UNI' => 'mediumtext',
|
||||
'TIMESTAMP' => 'int(11) UNSIGNED',
|
||||
'DECIMAL' => 'decimal(5,2)',
|
||||
'DECIMAL:' => 'decimal(%d,2)',
|
||||
'PDECIMAL' => 'decimal(6,3)',
|
||||
'PDECIMAL:' => 'decimal(%d,3)',
|
||||
'VCHAR_UNI' => 'varchar(255)',
|
||||
'VCHAR_UNI:'=> 'varchar(%d)',
|
||||
'VCHAR_CI' => 'varchar(255)',
|
||||
|
@ -73,6 +76,9 @@ $dbms_type_map = array(
|
|||
'MTEXT_UNI' => 'mediumblob',
|
||||
'TIMESTAMP' => 'int(11) UNSIGNED',
|
||||
'DECIMAL' => 'decimal(5,2)',
|
||||
'DECIMAL:' => 'decimal(%d,2)',
|
||||
'PDECIMAL' => 'decimal(6,3)',
|
||||
'PDECIMAL:' => 'decimal(%d,3)',
|
||||
'VCHAR_UNI' => 'blob',
|
||||
'VCHAR_UNI:'=> array('varbinary(%d)', 'limit' => array('mult', 3, 255, 'blob')),
|
||||
'VCHAR_CI' => 'blob',
|
||||
|
@ -100,6 +106,9 @@ $dbms_type_map = array(
|
|||
'MTEXT_UNI' => 'BLOB SUB_TYPE TEXT CHARACTER SET UTF8',
|
||||
'TIMESTAMP' => 'INTEGER',
|
||||
'DECIMAL' => 'DOUBLE PRECISION',
|
||||
'DECIMAL:' => 'DOUBLE PRECISION',
|
||||
'PDECIMAL' => 'DOUBLE PRECISION',
|
||||
'PDECIMAL:' => 'DOUBLE PRECISION',
|
||||
'VCHAR_UNI' => 'VARCHAR(255) CHARACTER SET UTF8',
|
||||
'VCHAR_UNI:'=> 'VARCHAR(%d) CHARACTER SET UTF8',
|
||||
'VCHAR_CI' => 'VARCHAR(255) CHARACTER SET UTF8',
|
||||
|
@ -127,6 +136,9 @@ $dbms_type_map = array(
|
|||
'MTEXT_UNI' => '[text]',
|
||||
'TIMESTAMP' => '[int]',
|
||||
'DECIMAL' => '[float]',
|
||||
'DECIMAL:' => '[float]',
|
||||
'PDECIMAL' => '[float]',
|
||||
'PDECIMAL:' => '[float]',
|
||||
'VCHAR_UNI' => '[varchar] (255)',
|
||||
'VCHAR_UNI:'=> '[varchar] (%d)',
|
||||
'VCHAR_CI' => '[varchar] (255)',
|
||||
|
@ -154,6 +166,9 @@ $dbms_type_map = array(
|
|||
'MTEXT_UNI' => 'clob',
|
||||
'TIMESTAMP' => 'number(11)',
|
||||
'DECIMAL' => 'number(5, 2)',
|
||||
'DECIMAL:' => 'number(%d, 2)',
|
||||
'PDECIMAL' => 'number(6, 3)',
|
||||
'PDECIMAL:' => 'number(%d, 3)',
|
||||
'VCHAR_UNI' => 'varchar2(765)',
|
||||
'VCHAR_UNI:'=> array('varchar2(%d)', 'limit' => array('mult', 3, 765, 'clob')),
|
||||
'VCHAR_CI' => 'varchar2(255)',
|
||||
|
@ -181,6 +196,9 @@ $dbms_type_map = array(
|
|||
'MTEXT_UNI' => 'mediumtext(16777215)',
|
||||
'TIMESTAMP' => 'INTEGER UNSIGNED', //'int(11) UNSIGNED',
|
||||
'DECIMAL' => 'decimal(5,2)',
|
||||
'DECIMAL:' => 'decimal(%d,2)',
|
||||
'PDECIMAL' => 'decimal(6,3)',
|
||||
'PDECIMAL:' => 'decimal(%d,3)',
|
||||
'VCHAR_UNI' => 'varchar(255)',
|
||||
'VCHAR_UNI:'=> 'varchar(%d)',
|
||||
'VCHAR_CI' => 'varchar(255)',
|
||||
|
@ -208,6 +226,9 @@ $dbms_type_map = array(
|
|||
'MTEXT_UNI' => 'TEXT',
|
||||
'TIMESTAMP' => 'INT4', // unsigned
|
||||
'DECIMAL' => 'decimal(5,2)',
|
||||
'DECIMAL:' => 'decimal(%d,2)',
|
||||
'PDECIMAL' => 'decimal(6,3)',
|
||||
'PDECIMAL:' => 'decimal(%d,3)',
|
||||
'VCHAR_UNI' => 'varchar(255)',
|
||||
'VCHAR_UNI:'=> 'varchar(%d)',
|
||||
'VCHAR_CI' => 'varchar_ci',
|
||||
|
@ -771,6 +792,9 @@ foreach ($supported_dbms as $dbms)
|
|||
* VCHAR:x => varchar(x)
|
||||
* TIMESTAMP => int(11) UNSIGNED
|
||||
* DECIMAL => decimal number (5,2)
|
||||
* DECIMAL: => decimal number (x,2)
|
||||
* PDECIMAL => precision decimal number (6,3)
|
||||
* PDECIMAL: => precision decimal number (x,3)
|
||||
* VCHAR_UNI => varchar(255) BINARY
|
||||
* VCHAR_CI => varchar_ci for postgresql, others VCHAR
|
||||
*/
|
||||
|
@ -1590,7 +1614,7 @@ function get_schema_struct()
|
|||
|
||||
$schema_data['phpbb_styles_template_data'] = array(
|
||||
'COLUMNS' => array(
|
||||
'template_id' => array('USINT', NULL, 'auto_increment'),
|
||||
'template_id' => array('USINT', 0),
|
||||
'template_filename' => array('VCHAR:100', ''),
|
||||
'template_included' => array('TEXT', ''),
|
||||
'template_mtime' => array('TIMESTAMP', 0),
|
||||
|
|
|
@ -132,7 +132,8 @@ while (!feof($fp))
|
|||
|
||||
foreach ($tests as $test)
|
||||
{
|
||||
$utf_result = call_user_func(array('utf_normalizer', $form), $utf_expected);
|
||||
$utf_result = $utf_expected;
|
||||
call_user_func(array('utf_normalizer', $form), $utf_result);
|
||||
|
||||
if (strcmp($utf_expected, $utf_result))
|
||||
{
|
||||
|
@ -196,7 +197,8 @@ while (!feof($fp))
|
|||
|
||||
foreach (array('nfc', 'nfkc', 'nfd', 'nfkd') as $form)
|
||||
{
|
||||
$utf_result = utf_normalizer::$form($utf_expected);
|
||||
$utf_result = $utf_expected;
|
||||
utf_normalizer::$form($utf_result);
|
||||
$hex_result = utf_to_hexseq($utf_result);
|
||||
// echo "$form($utf_expected) == $utf_result\n";
|
||||
|
||||
|
|
|
@ -169,6 +169,7 @@ p a {
|
|||
<ol class="menu">
|
||||
<li><a href="#changelog">Changelog</a>
|
||||
<ol type="i">
|
||||
<li><a href="#v30rc4">Changes since RC-4</a></li>
|
||||
<li><a href="#v30rc3">Changes since RC-3</a></li>
|
||||
<li><a href="#v30rc2">Changes since RC-2</a></li>
|
||||
<li><a href="#v30rc1">Changes since RC-1</a></li>
|
||||
|
@ -181,12 +182,71 @@ p a {
|
|||
|
||||
<a name="changelog"></a><h1>1. Changelog</h1>
|
||||
|
||||
<a name="v30rc3"></a><b>1.i. Changes since 3.0.RC3</b>
|
||||
<a name="v30rc4"></a><b>1.i. Changes since 3.0.RC4</b>
|
||||
<br /><br />
|
||||
<div class="paragraph">
|
||||
|
||||
<p>These fixes/changes are currently only present within CVS and will appear within the next phpBB3 version.</p>
|
||||
|
||||
<ul class="menu">
|
||||
<li>[Fix] MySQL, PostgreSQL and SQLite related database fixes (Bug #13862)</li>
|
||||
<li>[Fix] Allow MS SQL to properly connect when using the mssql driver and PHP is less than either 4.4.1 or 5.1 (Bug #13874)</li>
|
||||
<li>[Fix] Ignore files containing HTML special chars in the filenames as gallery avatars (Bug #13906)</li>
|
||||
<li>[Fix] Multiple PM recipients not separated (Bug #13876)</li>
|
||||
<li>[Change] Split the select list for the smilie order to clarify which are feasible and which are not (Bug #13911)</li>
|
||||
<li>[Fix] Convert empty homepage fields (Bug #13917)</li>
|
||||
<li>[Fix] Use board default DST setting on creating new profiles (Bug #11563)</li>
|
||||
<li>[Feature] New constant PHPBB_EMBEDDED can be used to let phpBB not call exit; if wrapped/embedded (We may re-check this constant on other code locations later too)</li>
|
||||
<li>[Feature] append_sid() having a check for the function append_sid_phpbb_hook(). This function is called in favour of append_sid() with the exact same parameters if present.</li>
|
||||
<li>[Fix] Only list enabled modes within the dropdown at user administration (Bug #13883) - patch provided by damnian</li>
|
||||
<li>[Fix] Properly display ban reason if selecting banned entries within the ACP (Bug #13896)</li>
|
||||
<li>[Fix] Properly parse SQL expressions for Oracle (Bug #13916)</li>
|
||||
<li>[Fix] Added label bindings to the custom profile fields in the ACP (Bug #13936) - patch provided by damnian</li>
|
||||
<li>[Change] Made group avatar/rank changes more intuitive</li>
|
||||
<li>[Fix] Give more feedback in icon/smilie management (Bug #13295)</li>
|
||||
<li>[Fix] Correctly set user::lang_id (Bug #14010)</li>
|
||||
<li>[Fix] Properly display the smiley export screen (Bug #13968)</li>
|
||||
<li>[Feature] Add "DECIMAL:", "PDECIMAL", and "PDECIMAL:" to the schema creation code (Bug #13999) - patch provided by poyntesm</li>
|
||||
<li>[Fix] Don't show the notify checkbox in the approval queue if the only posts are written by ANONYMOUS (Bug #13973)</li>
|
||||
<li>[Fix] Redirect to bots management page on edit/add (Bug #14073)</li>
|
||||
<li>[Fix] Display locked icon in viewforum/prosilver if forum locked (Bug #14009)</li>
|
||||
<li>[Feature] Display message history in compose PM screen</li>
|
||||
<li>[Change] Do not force login on visiting topic/forum from notification emails (Bug #13818)</li>
|
||||
<li>[Fix] Fixed cron_lock value for cron execution. This bug led to users having problems with the email queue and other cron related issues.</li>
|
||||
<li>[Fix] Prevent white pages on php notices with gzip compression enabled (Bug #14096)</li>
|
||||
<li>[Fix] Propagate the cleaned identifier for CFPs (Bug #14072)</li>
|
||||
<li>[Fix] Do not display NO_TOPICS message if viewing non-postable category (Bug #13489)</li>
|
||||
<li>[Fix] Let the theme immediately expire if changed from ACP for at least 30 minutes after change</li>
|
||||
<li>[Fix] Do not append hilit= in search if highlighting term is empty (Bug #13910)</li>
|
||||
<li>[Fix] Return to last page after voting in viewtopic instead of first page in topic (Bug #13976)</li>
|
||||
<li>[Fix] If sending PM's to groups only include activated member (Bug #14040)</li>
|
||||
<li>[Fix] Correctly wrap words in emails containing utf8 characters (Bug #14109)</li>
|
||||
<li>[Change] For new posts or editing the first post topic titles have a maxlength of 60 characters. For any subsequent posts the length is extended to 64 to make room for the Re: part, but cutting at 60 characters. The maxlength need to be 64, else users using opera are unable to post (opera does not allow pre-filling a field with more characters than specified within the maxlength attribute)</li>
|
||||
<li>[Fix] Disable gzip compression for cached stylesheet for Internet Explorer 6 or empty browser (IE6 is not able to properly display the compressed stylesheet) (Bug #14054)</li>
|
||||
<li>[Fix] Header icons fixed in FF for RTL languages (Bug #14084)</li>
|
||||
<li>[Change] Words in topic titles and post subjects are highlighted on the search results page and viewtopic too now (Bug #13383)</li>
|
||||
<li>[Fix] Made sure strip_bbcode cannot get the idea that a smiley is a BBCode (Bug #14030)</li>
|
||||
<li>[Change] Added a filter for user objects to LDAP configuration and improved explanations (Bug #12627)</li>
|
||||
<li>[Fix] Display searchable subforums of invisible parents in advanced search forum selection (Bug #11395)</li>
|
||||
<li>[Fix] Allow line breaks in custom BBCodes (Bug #10758)</li>
|
||||
<li>[Fix] Ordered BBcode parsing functions in the same way everywhere where they are used</li>
|
||||
<li>[Fix] Prevent {URL} token in custom BBCodes from make_clickable messing (Bug #14151)</li>
|
||||
<li>[Sec] Added alternative tokens to custom BBCodes which are safe for CSS/Javascript and changed TEXT token to entitise opening and closing parantheses.</li>
|
||||
<li>[Fix] Convert 2.0 moderator posting permissions (Bug #14105)</li>
|
||||
<li>[Fix] Correctly apply PM box limit of 0 to custom folder (Bug #14154)</li>
|
||||
<li>[Fix] odbc_autocommit causing existing result sets to be dropped (Bug #14182)</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<a href="#top">Top</a>
|
||||
<br /><br />
|
||||
|
||||
<hr />
|
||||
|
||||
<a name="v30rc3"></a><b>1.ii. Changes since 3.0.RC3</b>
|
||||
<br /><br />
|
||||
<div class="paragraph">
|
||||
|
||||
<ul class="menu">
|
||||
<li>[Fix] Fixing some subsilver2 and prosilver style issues</li>
|
||||
<li>[Fix] Parse error in MCP ban (Bug #13109)</li>
|
||||
|
@ -246,7 +306,7 @@ p a {
|
|||
<li>[Fix] Use global url validation for img bbcode tag (Bug #11935)</li>
|
||||
<li>[Fix] Added proper unicode support to style names (Bug #12165)</li>
|
||||
<li>[Fix] Search result extract should not end in the middle of a multibyte character (Bug #11863)</li>
|
||||
<li>[Fix] Missing localisation for an imageset no longer triggers a lot of "imageset refreshed" log messages (Bug #12027)</li>
|
||||
<li>[Fix] Missing localisation for an imageset no longer triggers a lot of "imageset refreshed" log messages (Bug #12027)</li>
|
||||
<li>[Fix] Explain that themes which need parsing cannot be stored on the filesystem (Bug #11134)</li>
|
||||
<li>[Fix] Normalize usernames</li>
|
||||
<li>[Change] Improved utf8_clean_string with a more complete list of homographs and NFKC normalization</li>
|
||||
|
@ -300,7 +360,7 @@ p a {
|
|||
|
||||
<hr />
|
||||
|
||||
<a name="v30rc2"></a><b>1.ii. Changes since 3.0.RC2</b>
|
||||
<a name="v30rc2"></a><b>1.iii. Changes since 3.0.RC2</b>
|
||||
<br /><br />
|
||||
<div class="paragraph">
|
||||
|
||||
|
@ -354,7 +414,7 @@ p a {
|
|||
|
||||
<hr />
|
||||
|
||||
<a name="v30rc1"></a><b>1.iii. Changes since 3.0.RC1</b>
|
||||
<a name="v30rc1"></a><b>1.iiii. Changes since 3.0.RC1</b>
|
||||
<br /><br />
|
||||
<div class="paragraph">
|
||||
|
||||
|
@ -485,7 +545,7 @@ p a {
|
|||
|
||||
<div class="paragraph">
|
||||
|
||||
<p>This application is opensource software released under the <a href="http://www.gnu.org/licenses/gpl.html">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) 2007 <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
|
||||
</div>
|
||||
<a href="#top">Top</a>
|
||||
|
|
|
@ -310,7 +310,7 @@ p a {
|
|||
|
||||
<div class="paragraph">
|
||||
|
||||
<p>Please read our documentation about <a href="#">permissions</a>.</p>
|
||||
<p>Please read the paragraph about permissions in our extensive <a href="http://www.phpbb.com/support/documentation/3.0/">online documentation</a>.</p>
|
||||
|
||||
</div>
|
||||
<a href="#top">Top</a>
|
||||
|
@ -348,7 +348,7 @@ p a {
|
|||
|
||||
<div class="paragraph">
|
||||
|
||||
<p>Please read our <a href="#">extensive user documentation</a> first, it may just explain what you want to know.</p>
|
||||
<p>Please read our <a href="http://www.phpbb.com/support/documentation/3.0/">extensive user documentation</a> first, it may just explain what you want to know.</p>
|
||||
|
||||
<p>Feel free to search our community forum for the information you require. <strong>PLEASE DO NOT</strong> post your question without having first used search, chances are someone has already asked and answered your question. You can find our board here:</p>
|
||||
|
||||
|
@ -364,7 +364,7 @@ p a {
|
|||
|
||||
<div class="paragraph">
|
||||
|
||||
<p>This application is opensource software released under the <a href="http://www.gnu.org/licenses/gpl.html">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) 2007 <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
|
||||
</div>
|
||||
<a href="#top">Top</a>
|
||||
|
|
|
@ -531,7 +531,7 @@ p a {
|
|||
|
||||
<div class="paragraph">
|
||||
|
||||
<p>This application is opensource software released under the <a href="http://www.gnu.org/licenses/gpl.html">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) 2007 <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
|
||||
</div>
|
||||
<a href="#top">Top</a>
|
||||
|
|
|
@ -431,7 +431,7 @@ p a {
|
|||
|
||||
<div class="paragraph">
|
||||
|
||||
<p>This application is opensource software released under the <a href="http://www.gnu.org/licenses/gpl.html">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) 2007 <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
|
||||
</div>
|
||||
<a href="#top">Top</a>
|
||||
|
|
|
@ -178,7 +178,7 @@ body {
|
|||
|
||||
<a name="top"></a><div id="main">
|
||||
|
||||
<p>This is an explanation of how to use the phpBB auth/acl API. This document is (c) 2006 phpBB Group, copying or redistribution is not allowed without permission.</p>
|
||||
<p>This is an explanation of how to use the phpBB auth/acl API.</p>
|
||||
|
||||
<h1>Auth API</h1>
|
||||
|
||||
|
@ -195,6 +195,7 @@ body {
|
|||
</ol>
|
||||
</li>
|
||||
<li><a href="#admin_related">Admin related functions</a></li>
|
||||
<li><a href="#disclaimer">Copyright and disclaimer</a></li>
|
||||
</ol>
|
||||
|
||||
<hr />
|
||||
|
@ -360,6 +361,18 @@ $auth_admin = new auth_admin();
|
|||
|
||||
</div>
|
||||
<a href="#top">Top</a>
|
||||
<br /><br />
|
||||
|
||||
<hr />
|
||||
|
||||
<a name="disclaimer"></a><h1>4. Copyright and disclaimer</h1>
|
||||
|
||||
<div class="paragraph">
|
||||
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
|
||||
</div>
|
||||
<a href="#top">Top</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Coding Guidelines</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="Content-Style-Type" content="text/css" />
|
||||
<meta name="resource-type" content="document" />
|
||||
<meta name="description" lang="en" content="Olympus coding guidelines document" />
|
||||
|
@ -192,7 +192,7 @@ p a {
|
|||
|
||||
<!-- BEGIN DOCUMENT -->
|
||||
|
||||
<p>These are the phpBB Coding Guidelines for Olympus, all attempts should be made to follow them as closely as possible.<br />This document is (c) 2006 phpBB Group, copying or redistribution is not allowed without permission.</p>
|
||||
<p>These are the phpBB Coding Guidelines for Olympus, all attempts should be made to follow them as closely as possible.</p>
|
||||
|
||||
<h1>Coding Guidelines</h1>
|
||||
|
||||
|
@ -215,6 +215,7 @@ p a {
|
|||
</li>
|
||||
<li><a href="#styling">Styling</a></li>
|
||||
<li><a href="#templating">Templating</a></li>
|
||||
<li><a href="#charsets">Character Sets and Encodings</a></li>
|
||||
<li><a href="#translation">Translation (<abbr title="Internationalisation">i18n</abbr>/<abbr title="Localisation">L10n</abbr>) Guidelines</a>
|
||||
<ol type="i">
|
||||
<li><a href="#standardisation">Standardisation</a></li>
|
||||
|
@ -223,6 +224,7 @@ p a {
|
|||
</ol>
|
||||
</li>
|
||||
<li><a href="#changes">Guidelines Changelog</a></li>
|
||||
<li><a href="#disclaimer">Copyright and disclaimer</a></li>
|
||||
</ol>
|
||||
|
||||
<hr />
|
||||
|
@ -344,6 +346,7 @@ class ...
|
|||
<li><code>/includes/db/sqlite.php</code><br />Sqlite Database Abstraction Layer</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b>diff</b><br /><code>/includes/diff</code><br />Diff Engine</li>
|
||||
<li><b>docs</b><br /><code>/docs</code><br />phpBB Documentation</li>
|
||||
<li><b>images</b><br /><code>/images</code><br />All global images not connected to styles</li>
|
||||
<li><b>install</b><br /><code>/install</code><br />Installation System</li>
|
||||
|
@ -352,6 +355,7 @@ class ...
|
|||
<li><b>VC</b><br /><code>/includes/captcha</code><br />CAPTCHA</li>
|
||||
<li><b>mcp</b><br /><code>mcp.php</code>, <code>/includes/mcp</code>, <code>report.php</code><br />Moderator Control Panel</li>
|
||||
<li><b>ucp</b><br /><code>ucp.php</code>, <code>/includes/ucp</code><br />User Control Panel</li>
|
||||
<li><b>utf</b><br /><code>/includes/utf</code><br />UTF8-related functions/classes</li>
|
||||
<li><b>search</b><br /><code>/includes/search</code>, <code>search.php</code><br />Search System</li>
|
||||
<li><b>styles</b><br /><code>/styles</code>, <code>style.php</code><br />phpBB Styles/Templates/Themes/Imagesets</li>
|
||||
</ul>
|
||||
|
@ -800,7 +804,7 @@ $sql = 'SELECT *
|
|||
|
||||
<h3>sql_escape():</h3>
|
||||
|
||||
<p>Always use <code>$db->sql_escape()</code> if you need to check for a string within an SQL statement (even if you are sure the variable can not contain single quotes - never trust your input), for example:</p>
|
||||
<p>Always use <code>$db->sql_escape()</code> if you need to check for a string within an SQL statement (even if you are sure the variable cannot contain single quotes - never trust your input), for example:</p>
|
||||
|
||||
<blockquote><pre>
|
||||
$sql = 'SELECT *
|
||||
|
@ -1558,9 +1562,85 @@ div
|
|||
|
||||
<hr />
|
||||
|
||||
<a name="translation"></a><h1>5. Translation (<abbr title="Internationalisation">i18n</abbr>/<abbr title="Localisation">L10n</abbr>) Guidelines</h1>
|
||||
<a name="charsets"></a><h1>5. Character Sets and Encodings</h1>
|
||||
|
||||
<a name="standardisation"></a><b>5.i. Standardisation</b>
|
||||
<div class="paragraph">
|
||||
|
||||
<h3>What are Unicode, UCS and UTF-8?</h3>
|
||||
<p>The <a href="http://en.wikipedia.org/wiki/Universal_Character_Set">Universal Character Set (UCS)</a> described in ISO/IEC 10646 consists of a large amount of characters. Each of them has a unique name and a code point which is an integer number. <a href="http://en.wikipedia.org/wiki/Unicode">Unicode</a> - which is an industry standard - complements the Universal Character Set with further information about the characters' properties and alternative character encodings. More information on Unicode can be found on the <a href="http://www.unicode.org/">Unicode Consortium's website</a>. One of the Unicode encodings is the <a href="http://en.wikipedia.org/wiki/UTF-8">8-bit Unicode Transformation Format (UTF-8)</a>. It encodes characters with up to four bytes aiming for maximum compatability with the <a href="http://en.wikipedia.org/wiki/ASCII">American Standard Code for Information Interchange</a> which is a 7-bit encoding of a relatively small subset of the UCS.</p>
|
||||
|
||||
<h3>phpBB's use of Unicode</h3>
|
||||
<p>Unfortunately PHP does not faciliate the use of Unicode prior to version 6. Most functions simply treat strings as sequences of bytes assuming that each character takes up exactly one byte. This behaviour still allows for storing UTF-8 encoded text in PHP strings but many operations on strings have unexpected results. To circumvent this problem we have created some alternative functions to PHP's native string operations which use code points instead of bytes. These functions can be found in <code>/includes/utf/utf_tools.php</code>. They are also covered in the <a href="http://area51.phpbb.com/docs/code/">phpBB3 Sourcecode Documentation</a>. A lot of native PHP functions still work with UTF-8 as long as you stick to certain restrictions. For example <code>explode</code> still works as long as the first and the last character of the delimiter string are ASCII characters.</p>
|
||||
|
||||
<p>phpBB only uses the ASCII and the UTF-8 character encodings. Still all Strings are UTF-8 encoded because ASCII is a subset of UTF-8. The only exceptions to this rule are code sections which deal with external systems which use other encodings and character sets. Such external data should be converted to UTF-8 using the <code>utf8_recode()</code> function supplied with phpBB. It supports a variety of other character sets and encodings, a full list can be found below.</p>
|
||||
|
||||
<p>With <code>request_var()</code> you can either allow all UCS characters in user input or restrict user input to ASCII characters. This feature is controlled by the function's third parameter called <code>$multibyte</code>. You should allow multibyte characters in posts, PMs, topic titles, forum names, etc. but it's not necessary for internal uses like a <code>$mode</code> variable which should only hold a predefined list of ASCII strings anyway.</p>
|
||||
|
||||
<blockquote><pre>
|
||||
// an input string containing a multibyte character
|
||||
$_REQUEST['multibyte_string'] = 'Käse';
|
||||
|
||||
// print request variable as a UTF-8 string allowing multibyte characters
|
||||
echo request_var('multibyte_string', '', true);
|
||||
// print request variable as ASCII string
|
||||
echo request_var('multibyte_string', '');
|
||||
</pre></blockquote>
|
||||
|
||||
<p>This code snippet will generate the following output:</p>
|
||||
|
||||
<blockquote><pre>
|
||||
Käse
|
||||
K??se
|
||||
</pre></blockquote>
|
||||
|
||||
<h3>Unicode Normalization</h3>
|
||||
|
||||
<p>If you retrieve user input with multibyte characters you should additionally normalize the string using <code>utf8_normalize_nfc()</code> before you work with it. This is necessary to make sure that equal characters can only occur in one particular binary representation. For example the character Å can be represented either as <code>U+00C5</code> (LATIN CAPITAL LETTER A WITH RING ABOVE) or as <code>U+212B</code> (ANGSTROM SIGN). phpBB uses Normalization Form Canonical Composition (NFC) for all text. So the correct version of the above example would look like this:</p>
|
||||
|
||||
<blockquote><pre>
|
||||
$_REQUEST['multibyte_string'] = 'Käse';
|
||||
|
||||
// normalize multibyte strings
|
||||
echo utf8_normalize_nfc(request_var('multibyte_string', '', true));
|
||||
// ASCII strings do not need to be normalized
|
||||
echo request_var('multibyte_string', '');
|
||||
</pre></blockquote>
|
||||
|
||||
<h3>Case Folding</h3>
|
||||
|
||||
<p>Case insensitive comparison of strings is no longer possible with <code>strtolower</code> or <code>strtoupper</code> as some characters have multiple lower case or multiple upper case forms depending on their position in a word. The <code>utf8_strtolower</code> and the <code>utf8_strtoupper</code> functions suffer from the same problem so they can only be used to display upper/lower case versions of a string but they cannot be used for case insensitive comparisons either. So instead you should use case folding which gives you a case insensitive version of the string which can be used for case insensitive comparisons. An NFC normalized string can be case folded using <code>utf8_case_fold_nfc()</code>.</p>
|
||||
|
||||
<p class="bad">// Bad - The strings might be the same even if strtolower differs</p>
|
||||
|
||||
<blockquote><pre>
|
||||
if (strtolower($string1) == strtolower($string2))
|
||||
{
|
||||
echo '$string1 and $string2 are equal or differ in case';
|
||||
}
|
||||
</pre></blockquote>
|
||||
|
||||
<p class="good">// Good - Case folding is really case insensitive</p>
|
||||
|
||||
<blockquote><pre>
|
||||
if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||
{
|
||||
echo '$string1 and $string2 are equal or differ in case';
|
||||
}
|
||||
</pre></blockquote>
|
||||
|
||||
<h3>Confusables Detection</h3>
|
||||
|
||||
<p>phpBB offers a special method <code>utf8_clean_string</code> which can be used to make sure string identifiers are unique. This method uses Normalization Form Compatibility Composition (NFKC) instead of NFC and replaces similarly looking characters with a particular representative of the equivalence class. This method is currently used for usernames and group names to avoid confusion with similarly looking names.</p>
|
||||
|
||||
</div>
|
||||
<a href="#top">Top</a>
|
||||
<br /><br />
|
||||
|
||||
<hr />
|
||||
|
||||
<a name="translation"></a><h1>6. Translation (<abbr title="Internationalisation">i18n</abbr>/<abbr title="Localisation">L10n</abbr>) Guidelines</h1>
|
||||
|
||||
<a name="standardisation"></a><b>6.i. Standardisation</b>
|
||||
<br /><br />
|
||||
<div class="paragraph">
|
||||
|
||||
|
@ -1854,7 +1934,7 @@ div
|
|||
<a href="#top">Top</a>
|
||||
<br /><br />
|
||||
|
||||
<a name="otherconsiderations"></a><b>5.ii. Other considerations</b>
|
||||
<a name="otherconsiderations"></a><b>6.ii. Other considerations</b>
|
||||
<br /><br />
|
||||
<div class="paragraph">
|
||||
|
||||
|
@ -2118,7 +2198,7 @@ div
|
|||
<a href="#top">Top</a>
|
||||
<br /><br />
|
||||
|
||||
<a name="writingstyle"></a><b>5.iii. Writing Style</b>
|
||||
<a name="writingstyle"></a><b>6.iii. Writing Style</b>
|
||||
<br /><br />
|
||||
<div class="paragraph">
|
||||
|
||||
|
@ -2229,13 +2309,19 @@ div
|
|||
|
||||
<hr />
|
||||
|
||||
<a name="changes"></a><h1>6. Guidelines Changelog</h1>
|
||||
<a name="changes"></a><h1>7. Guidelines Changelog</h1>
|
||||
<div class="paragraph">
|
||||
|
||||
<h2>Revision 1.24</h2>
|
||||
|
||||
<ul class="menu">
|
||||
<li>Added <a href="#translation">5. Character Sets and Encodings</a> section to explain the recommended treatment of strings in phpBB.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Revision 1.16</h2>
|
||||
|
||||
<ul class="menu">
|
||||
<li>Added <a href="#translation">5. Translation (<abbr title="Internationalisation">i18n</abbr>/<abbr title="Localisation">L10n</abbr>) Guidelines</a> section to explain expected format and authoring considerations for language packs that are to be created for phpBB.</li>
|
||||
<li>Added <a href="#translation">6. Translation (<abbr title="Internationalisation">i18n</abbr>/<abbr title="Localisation">L10n</abbr>) Guidelines</a> section to explain expected format and authoring considerations for language packs that are to be created for phpBB.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Revision 1.11-1.15</h2>
|
||||
|
@ -2268,6 +2354,18 @@ div
|
|||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a href="#top">Top</a>
|
||||
<br /><br />
|
||||
|
||||
<hr />
|
||||
|
||||
<a name="disclaimer"></a><h1>8. Copyright and disclaimer</h1>
|
||||
|
||||
<div class="paragraph">
|
||||
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
|
||||
</div>
|
||||
<a href="#top">Top</a>
|
||||
|
||||
|
|
|
@ -295,16 +295,22 @@ class acp_bbcodes
|
|||
// @todo Make sure to change this too if something changed in message parsing
|
||||
$tokens = array(
|
||||
'URL' => array(
|
||||
'!([a-z0-9]+://)?([^< "\r\n\t\]]*?)!ie' => "(('\$1') ? '\$1\$2' : 'http://\$2')"
|
||||
'!(?:(' . str_replace(array('!', '\#'), array('\!', '#'), get_preg_expression('url')) . ')|(' . str_replace(array('!', '\#'), array('\!', '#'), get_preg_expression('www_url')) . '))!ie' => "\$this->bbcode_specialchars(('\$1') ? '\$1' : 'http://\$2')"
|
||||
),
|
||||
'LOCAL_URL' => array(
|
||||
'!([^:]+/[^< "\r\n\t\]]*?)!' => '$1'
|
||||
'!(' . str_replace(array('!', '\#'), array('\!', '#'), get_preg_expression('relative_url')) . ')!e' => "\$this->bbcode_specialchars('$1')"
|
||||
),
|
||||
'EMAIL' => array(
|
||||
'!([a-z0-9]+[a-z0-9\-\._]*@(?:(?:[0-9]{1,3}\.){3,5}[0-9]{1,3}|[a-z0-9]+[a-z0-9\-\._]*\.[a-z]+))!i' => '$1'
|
||||
'!([a-z0-9]+[a-z0-9\-\._]*@(?:(?:[0-9]{1,3}\.){3,5}[0-9]{1,3}|[a-z0-9]+[a-z0-9\-\._]*\.[a-z]+))!i' => "\$this->bbcode_specialchars('$1')"
|
||||
),
|
||||
'TEXT' => array(
|
||||
'!(.*?)!es' => "str_replace(\"\\r\\n\",\"\\n\", str_replace('\\\"', '\"', str_replace('\\'', ''', trim('\$1'))))"
|
||||
'!(.*?)!es' => "str_replace(array(\"\\r\\n\", '\\\"', '\\'', '(', ')'), array(\"\\n\", '\"', ''', '(', ')'), trim('\$1'))"
|
||||
),
|
||||
'SIMPLETEXT' => array(
|
||||
'!([a-zA-Z0-9-+.,_ ]+)!' => "$1"
|
||||
),
|
||||
'IDENTIFIER' => array(
|
||||
'!([a-zA-Z0-9-_]+)!' => "$1"
|
||||
),
|
||||
'COLOR' => array(
|
||||
'!([a-z]+|#[0-9abcdef]+)!i' => '$1'
|
||||
|
|
|
@ -279,7 +279,7 @@ class acp_bots
|
|||
$cache->destroy('_bots');
|
||||
|
||||
add_log('admin', 'LOG_BOT_' . $log, $bot_row['bot_name']);
|
||||
trigger_error($user->lang['BOT_' . $log] . adm_back_link($this->u_action . "&id=$bot_id&action=$action"));
|
||||
trigger_error($user->lang['BOT_' . $log] . adm_back_link($this->u_action));
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -376,14 +376,19 @@ class acp_bots
|
|||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate bot name against username table
|
||||
*/
|
||||
function validate_botname($newname, $oldname = false)
|
||||
{
|
||||
global $db;
|
||||
|
||||
if ($oldname && utf8_clean_string($newname) === $oldname)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
// Admins might want to use names otherwise forbidden, thus we only check for duplicates.
|
||||
|
||||
// Admins might want to use names otherwise forbidden, thus we only check for duplicates.
|
||||
$sql = 'SELECT username
|
||||
FROM ' . USERS_TABLE . "
|
||||
WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($newname)) . "'";
|
||||
|
@ -391,14 +396,7 @@ class acp_bots
|
|||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($row)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return ($row) ? false : true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -144,13 +144,19 @@ class acp_icons
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$sql = "SELECT *
|
||||
FROM $table
|
||||
ORDER BY {$fields}_order " . (($icon_id || $action == 'add') ? 'DESC' : 'ASC');
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
|
||||
$data = array();
|
||||
$after = false;
|
||||
$display = 0;
|
||||
$order_lists = array('', '');
|
||||
$add_order_lists = array('', '');
|
||||
$display_count = 0;
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if ($action == 'add')
|
||||
|
@ -158,9 +164,11 @@ class acp_icons
|
|||
unset($_images[$row[$fields . '_url']]);
|
||||
}
|
||||
|
||||
|
||||
if ($row[$fields . '_id'] == $icon_id)
|
||||
{
|
||||
$after = true;
|
||||
$display = $row['display_on_posting'];
|
||||
$data[$row[$fields . '_url']] = $row;
|
||||
}
|
||||
else
|
||||
|
@ -176,35 +184,41 @@ class acp_icons
|
|||
$selected = ' selected="selected"';
|
||||
$after = false;
|
||||
}
|
||||
|
||||
if ($row['display_on_posting'])
|
||||
{
|
||||
$display_count++;
|
||||
}
|
||||
$after_txt = ($mode == 'smilies') ? $row['code'] : $row['icons_url'];
|
||||
$order_list = '<option value="' . ($row[$fields . '_order'] + 1) . '"' . $selected . '>' . sprintf($user->lang['AFTER_' . $lang], ' -> ' . $after_txt) . '</option>' . $order_list;
|
||||
$order_lists[$row['display_on_posting']] = '<option value="' . ($row[$fields . '_order'] + 1) . '"' . $selected . '>' . sprintf($user->lang['AFTER_' . $lang], ' -> ' . $after_txt) . '</option>' . $order_lists[$row['display_on_posting']];
|
||||
|
||||
if (!empty($default_row))
|
||||
{
|
||||
$add_order_list = '<option value="' . ($row[$fields . '_order'] + 1) . '"' . (($row[$fields . '_id'] == $default_row['smiley_id']) ? ' selected="selected"' : '') . '>' . sprintf($user->lang['AFTER_' . $lang], ' -> ' . $after_txt) . '</option>' . $add_order_list;
|
||||
$add_order_lists[$row['display_on_posting']] = '<option value="' . ($row[$fields . '_order'] + 1) . '"' . (($row[$fields . '_id'] == $default_row['smiley_id']) ? ' selected="selected"' : '') . '>' . sprintf($user->lang['AFTER_' . $lang], ' -> ' . $after_txt) . '</option>' . $add_order_lists[$row['display_on_posting']];
|
||||
}
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$order_list = '<option value="1"' . ((!isset($after)) ? ' selected="selected"' : '') . '>' . $user->lang['FIRST'] . '</option>' . $order_list;
|
||||
$add_order_list = '<option value="1">' . $user->lang['FIRST'] . '</option>' . $add_order_list;
|
||||
|
||||
$order_list = '<option value="1"' . ((!isset($after)) ? ' selected="selected"' : '') . '>' . $user->lang['FIRST'] . '</option>';
|
||||
$add_order_list = '<option value="1">' . $user->lang['FIRST'] . '</option>';
|
||||
|
||||
if ($action == 'add')
|
||||
{
|
||||
$data = $_images;
|
||||
}
|
||||
|
||||
|
||||
$colspan = (($mode == 'smilies') ? '7' : '5');
|
||||
$colspan += ($icon_id) ? 1 : 0;
|
||||
$colspan += ($action == 'add') ? 2 : 0;
|
||||
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_EDIT' => true,
|
||||
'S_SMILIES' => ($mode == 'smilies') ? true : false,
|
||||
'S_ADD' => ($action == 'add') ? true : false,
|
||||
'S_ORDER_LIST' => $order_list,
|
||||
|
||||
'S_ORDER_LIST_DISPLAY' => $order_list . $order_lists[1],
|
||||
'S_ORDER_LIST_UNDISPLAY' => $order_list . $order_lists[0],
|
||||
'S_ORDER_LIST_DISPLAY_COUNT' => $display_count + 1,
|
||||
|
||||
'L_TITLE' => $user->lang['ACP_' . $lang],
|
||||
'L_EXPLAIN' => $user->lang['ACP_' . $lang . '_EXPLAIN'],
|
||||
|
@ -247,7 +261,10 @@ class acp_icons
|
|||
'S_ADD_CODE' => true,
|
||||
|
||||
'S_IMG_OPTIONS' => $smiley_options,
|
||||
'S_ADD_ORDER_LIST' => $add_order_list,
|
||||
|
||||
'S_ADD_ORDER_LIST_DISPLAY' => $add_order_list . $add_order_lists[1],
|
||||
'S_ADD_ORDER_LIST_UNDISPLAY' => $add_order_list . $add_order_lists[0],
|
||||
|
||||
'IMG_SRC' => $phpbb_root_path . $img_path . '/' . $default_row['smiley_url'],
|
||||
'IMG_PATH' => $img_path,
|
||||
'PHPBB_ROOT_PATH' => $phpbb_root_path,
|
||||
|
@ -306,6 +323,7 @@ class acp_icons
|
|||
}
|
||||
}
|
||||
|
||||
$icons_updated = 0;
|
||||
foreach ($images as $image)
|
||||
{
|
||||
if (($mode == 'smilies' && ($image_emotion[$image] == '' || $image_code[$image] == '')) ||
|
||||
|
@ -370,25 +388,43 @@ class acp_icons
|
|||
SET " . $db->sql_build_array('UPDATE', $img_sql) . "
|
||||
WHERE {$fields}_id = " . $image_id[$image];
|
||||
$db->sql_query($sql);
|
||||
$icons_updated++;
|
||||
}
|
||||
else if ($action !== 'modify')
|
||||
{
|
||||
$sql = "INSERT INTO $table " . $db->sql_build_array('INSERT', $img_sql);
|
||||
$db->sql_query($sql);
|
||||
$icons_updated++;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$cache->destroy('_icons');
|
||||
$cache->destroy('sql', $table);
|
||||
|
||||
|
||||
$level = E_USER_NOTICE;
|
||||
switch ($icons_updated)
|
||||
{
|
||||
case 0:
|
||||
$suc_lang = "{$lang}_NONE";
|
||||
$level = E_USER_WARNING;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
$suc_lang = "{$lang}_ONE";
|
||||
break;
|
||||
|
||||
default:
|
||||
$suc_lang = $lang;
|
||||
}
|
||||
if ($action == 'modify')
|
||||
{
|
||||
trigger_error($user->lang[$lang . '_EDITED'] . adm_back_link($this->u_action));
|
||||
trigger_error($user->lang[$suc_lang . '_EDITED'] . adm_back_link($this->u_action), $level);
|
||||
}
|
||||
else
|
||||
{
|
||||
trigger_error($user->lang[$lang . '_ADDED'] . adm_back_link($this->u_action));
|
||||
trigger_error($user->lang[$suc_lang . '_ADDED'] . adm_back_link($this->u_action), $level);
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -579,7 +615,10 @@ class acp_icons
|
|||
|
||||
$template->assign_vars(array(
|
||||
'MESSAGE_TITLE' => $user->lang['EXPORT_' . $lang],
|
||||
'MESSAGE_TEXT' => sprintf($user->lang['EXPORT_' . $lang . '_EXPLAIN'], '<a href="' . $this->u_action . '&action=send">', '</a>'))
|
||||
'MESSAGE_TEXT' => sprintf($user->lang['EXPORT_' . $lang . '_EXPLAIN'], '<a href="' . $this->u_action . '&action=send">', '</a>'),
|
||||
|
||||
'S_USER_NOTICE' => true,
|
||||
)
|
||||
);
|
||||
|
||||
return;
|
||||
|
|
|
@ -163,7 +163,7 @@ class acp_language
|
|||
case 'download_file':
|
||||
case 'upload_data':
|
||||
|
||||
if (!$lang_id || empty($_POST['entry']))
|
||||
if (!$lang_id || empty($_POST['entry']) || !is_array($_POST['entry']))
|
||||
{
|
||||
trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
|
|
@ -492,11 +492,11 @@ class acp_profile
|
|||
}
|
||||
}
|
||||
}
|
||||
else if ($field_type == FIELD_BOOL && $key == 'field_default_value')
|
||||
/* else if ($field_type == FIELD_BOOL && $key == 'field_default_value')
|
||||
{
|
||||
// Get the number of options if this key is 'field_maxlen'
|
||||
$var = request_var('field_default_value', 0);
|
||||
}
|
||||
}*/
|
||||
|
||||
$cp->vars[$key] = $var;
|
||||
}
|
||||
|
@ -662,6 +662,10 @@ class acp_profile
|
|||
{
|
||||
$var = false;
|
||||
}
|
||||
else if ($key == 'field_ident' && isset($cp->vars[$key]))
|
||||
{
|
||||
$_new_key_ary[$key]= $cp->vars[$key];
|
||||
}
|
||||
else
|
||||
{
|
||||
$_new_key_ary[$key] = (is_array($_REQUEST[$key])) ? utf8_normalize_nfc(request_var($key, array(''), true)) : utf8_normalize_nfc(request_var($key, '', true));
|
||||
|
@ -921,7 +925,7 @@ class acp_profile
|
|||
$lang_options[1]['lang_iso'] = $this->lang_defs['id'][$default_lang_id];
|
||||
$lang_options[1]['fields'][$field] = array(
|
||||
'TITLE' => $user->lang['CP_' . strtoupper($field)],
|
||||
'FIELD' => '<dd>' . ((is_array($cp->vars[$field])) ? implode('<br />', $cp->vars[$field]) : str_replace("\n", '<br />', $cp->vars[$field])) . '</dd>'
|
||||
'FIELD' => '<dd>' . ((is_array($cp->vars[$field])) ? implode('<br />', $cp->vars[$field]) : bbcode_nl2br($cp->vars[$field])) . '</dd>'
|
||||
);
|
||||
|
||||
if (isset($user->lang['CP_' . strtoupper($field) . '_EXPLAIN']))
|
||||
|
|
|
@ -92,7 +92,7 @@ class acp_search
|
|||
unset($search);
|
||||
unset($error);
|
||||
|
||||
$cfg_array = (isset($_REQUEST['config'])) ? request_var('config', array('' => '')) : array();
|
||||
$cfg_array = (isset($_REQUEST['config'])) ? request_var('config', array('' => ''), true) : array();
|
||||
$updated = request_var('updated', false);
|
||||
|
||||
foreach ($settings as $config_name => $var_type)
|
||||
|
|
|
@ -666,10 +666,8 @@ parse_css_file = {PARSE_CSS_FILE}
|
|||
|
||||
$filelist = $filelist_cats = array();
|
||||
|
||||
// we want newlines no carriage returns!
|
||||
$_POST['template_data'] = (isset($_POST['template_data']) && !empty($_POST['template_data'])) ? str_replace(array("\r\n", "\r"), array("\n", "\n"), $_POST['template_data']) : '';
|
||||
|
||||
$template_data = (STRIP) ? stripslashes($_POST['template_data']) : $_POST['template_data'];
|
||||
$template_data = utf8_normalize_nfc(request_var('template_data', '', true));
|
||||
$template_data = htmlspecialchars_decode($template_data);
|
||||
$template_file = utf8_normalize_nfc(request_var('template_file', '', true));
|
||||
$text_rows = max(5, min(999, request_var('text_rows', 20)));
|
||||
$save_changes = (isset($_POST['save'])) ? true : false;
|
||||
|
@ -871,7 +869,7 @@ parse_css_file = {PARSE_CSS_FILE}
|
|||
|
||||
'SELECTED_TEMPLATE' => $template_info['template_name'],
|
||||
'TEMPLATE_FILE' => $template_file,
|
||||
'TEMPLATE_DATA' => htmlspecialchars($template_data),
|
||||
'TEMPLATE_DATA' => utf8_htmlspecialchars($template_data),
|
||||
'TEXT_ROWS' => $text_rows)
|
||||
);
|
||||
}
|
||||
|
@ -1021,11 +1019,9 @@ parse_css_file = {PARSE_CSS_FILE}
|
|||
|
||||
$filelist = $filelist_cats = array();
|
||||
|
||||
// we want newlines no carriage returns!
|
||||
$_POST['template_data'] = (isset($_POST['template_data']) && !empty($_POST['template_data'])) ? str_replace(array("\r\n", "\r"), array("\n", "\n"), $_POST['template_data']) : '';
|
||||
|
||||
$theme_data = (STRIP) ? stripslashes($_POST['template_data']) : $_POST['template_data'];
|
||||
$theme_file = utf8_normalize_nfc(request_var('template_file', '', true));
|
||||
$theme_data = utf8_normalize_nfc(request_var('template_data', '', true));
|
||||
$theme_data = htmlspecialchars_decode($theme_data);
|
||||
$theme_file = utf8_normalize_nfc(request_var('template_file', '', true));
|
||||
$text_rows = max(5, min(999, request_var('text_rows', 20)));
|
||||
$save_changes = (isset($_POST['save'])) ? true : false;
|
||||
|
||||
|
@ -1040,7 +1036,7 @@ parse_css_file = {PARSE_CSS_FILE}
|
|||
|
||||
if (!($theme_info = $db->sql_fetchrow($result)))
|
||||
{
|
||||
trigger_error($user->lang['NO_THEME'] . adm_bacl_link($this->u_action), E_USER_WARNING);
|
||||
trigger_error($user->lang['NO_THEME'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
@ -1188,7 +1184,7 @@ parse_css_file = {PARSE_CSS_FILE}
|
|||
|
||||
'SELECTED_TEMPLATE' => $theme_info['theme_name'],
|
||||
'TEMPLATE_FILE' => $theme_file,
|
||||
'TEMPLATE_DATA' => htmlspecialchars($theme_data),
|
||||
'TEMPLATE_DATA' => utf8_htmlspecialchars($theme_data),
|
||||
'TEXT_ROWS' => $text_rows)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -114,19 +114,31 @@ class acp_users
|
|||
// Generate overall "header" for user admin
|
||||
$s_form_options = '';
|
||||
|
||||
// Include info file...
|
||||
include_once($phpbb_root_path . 'includes/acp/info/acp_users.' . $phpEx);
|
||||
$forms_ary = acp_users_info::module();
|
||||
// Build modes dropdown list
|
||||
$sql = 'SELECT module_mode, module_auth
|
||||
FROM ' . MODULES_TABLE . "
|
||||
WHERE module_basename = 'users'
|
||||
AND module_enabled = 1
|
||||
AND module_class = 'acp'
|
||||
ORDER BY left_id, module_mode";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
foreach ($forms_ary['modes'] as $value => $ary)
|
||||
$dropdown_modes = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if (!$this->p_master->module_auth($ary['auth']))
|
||||
if (!$this->p_master->module_auth($row['module_auth']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$selected = ($mode == $value) ? ' selected="selected"' : '';
|
||||
$s_form_options .= '<option value="' . $value . '"' . $selected . '>' . $user->lang['ACP_USER_' . strtoupper($value)] . '</option>';
|
||||
|
||||
$dropdown_modes[$row['module_mode']] = true;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
foreach ($dropdown_modes as $module_mode => $null)
|
||||
{
|
||||
$selected = ($mode == $module_mode) ? ' selected="selected"' : '';
|
||||
$s_form_options .= '<option value="' . $module_mode . '"' . $selected . '>' . $user->lang['ACP_USER_' . strtoupper($module_mode)] . '</option>';
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
|
|
|
@ -349,7 +349,7 @@ class auth
|
|||
// Since this function is not called that often (we are caching the data) we check for this inconsistency.
|
||||
$sql = 'SELECT forum_id
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('forum_id', array_keys($hold_ary));
|
||||
WHERE ' . $db->sql_in_set('forum_id', array_keys($hold_ary), false, true);
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$forum_ids = (isset($hold_ary[0])) ? array(0) : array();
|
||||
|
|
|
@ -26,7 +26,17 @@ function init_ldap()
|
|||
return $user->lang['LDAP_NO_LDAP_EXTENSION'];
|
||||
}
|
||||
|
||||
if (!($ldap = @ldap_connect($config['ldap_server'])))
|
||||
$config['ldap_port'] = (int) $config['ldap_port'];
|
||||
if ($config['ldap_port'])
|
||||
{
|
||||
$ldap = @ldap_connect($config['ldap_server'], $config['ldap_port']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$ldap = @ldap_connect($config['ldap_server']);
|
||||
}
|
||||
|
||||
if (!$ldap)
|
||||
{
|
||||
return $user->lang['LDAP_NO_SERVER_CONNECTION'];
|
||||
}
|
||||
|
@ -46,7 +56,7 @@ function init_ldap()
|
|||
$search = @ldap_search(
|
||||
$ldap,
|
||||
$config['ldap_base_dn'],
|
||||
'(' . $config['ldap_uid'] . '=' . ldap_escape(htmlspecialchars_decode($user->data['username'])) . ')',
|
||||
ldap_user_filter($user->data['username']),
|
||||
(empty($config['ldap_email'])) ? array($config['ldap_uid']) : array($config['ldap_uid'], $config['ldap_email']),
|
||||
0,
|
||||
1
|
||||
|
@ -91,7 +101,17 @@ function login_ldap(&$username, &$password)
|
|||
);
|
||||
}
|
||||
|
||||
if (!($ldap = @ldap_connect($config['ldap_server'])))
|
||||
$config['ldap_port'] = (int) $config['ldap_port'];
|
||||
if ($config['ldap_port'])
|
||||
{
|
||||
$ldap = @ldap_connect($config['ldap_server'], $config['ldap_port']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$ldap = @ldap_connect($config['ldap_server']);
|
||||
}
|
||||
|
||||
if (!$ldap)
|
||||
{
|
||||
return array(
|
||||
'status' => LOGIN_ERROR_EXTERNAL_AUTH,
|
||||
|
@ -114,7 +134,7 @@ function login_ldap(&$username, &$password)
|
|||
$search = @ldap_search(
|
||||
$ldap,
|
||||
$config['ldap_base_dn'],
|
||||
'(' . $config['ldap_uid'] . '=' . ldap_escape(htmlspecialchars_decode($username)) . ')',
|
||||
ldap_user_filter($username),
|
||||
(empty($config['ldap_email'])) ? array($config['ldap_uid']) : array($config['ldap_uid'], $config['ldap_email']),
|
||||
0,
|
||||
1
|
||||
|
@ -215,6 +235,25 @@ function login_ldap(&$username, &$password)
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a filter string for ldap_search to find a user
|
||||
*
|
||||
* @param $username string Username identifying the searched user
|
||||
*
|
||||
* @return string A filter string for ldap_search
|
||||
*/
|
||||
function ldap_user_filter($username)
|
||||
{
|
||||
global $config;
|
||||
|
||||
$filter = '(' . $config['ldap_uid'] . '=' . ldap_escape(htmlspecialchars_decode($username)) . ')';
|
||||
if ($config['ldap_user_filter'])
|
||||
{
|
||||
$filter = "(&$filter({$config['ldap_user_filter']}))";
|
||||
}
|
||||
return $filter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Escapes an LDAP AttributeValue
|
||||
*/
|
||||
|
@ -238,12 +277,8 @@ function acp_ldap(&$new)
|
|||
<dd><input type="text" id="ldap_server" size="40" name="config[ldap_server]" value="' . $new['ldap_server'] . '" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="ldap_user">' . $user->lang['LDAP_USER'] . ':</label><br /><span>' . $user->lang['LDAP_USER_EXPLAIN'] . '</span></dt>
|
||||
<dd><input type="text" id="ldap_user" size="40" name="config[ldap_user]" value="' . $new['ldap_user'] . '" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="ldap_password">' . $user->lang['LDAP_PASSWORD'] . ':</label><br /><span>' . $user->lang['LDAP_PASSWORD_EXPLAIN'] . '</span></dt>
|
||||
<dd><input type="password" id="ldap_password" size="40" name="config[ldap_password]" value="' . $new['ldap_password'] . '" /></dd>
|
||||
<dt><label for="ldap_port">' . $user->lang['LDAP_PORT'] . ':</label><br /><span>' . $user->lang['LDAP_PORT_EXPLAIN'] . '</span></dt>
|
||||
<dd><input type="text" id="ldap_port" size="40" name="config[ldap_port]" value="' . $new['ldap_port'] . '" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="ldap_dn">' . $user->lang['LDAP_DN'] . ':</label><br /><span>' . $user->lang['LDAP_DN_EXPLAIN'] . '</span></dt>
|
||||
|
@ -253,16 +288,28 @@ function acp_ldap(&$new)
|
|||
<dt><label for="ldap_uid">' . $user->lang['LDAP_UID'] . ':</label><br /><span>' . $user->lang['LDAP_UID_EXPLAIN'] . '</span></dt>
|
||||
<dd><input type="text" id="ldap_uid" size="40" name="config[ldap_uid]" value="' . $new['ldap_uid'] . '" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="ldap_user_filter">' . $user->lang['LDAP_USER_FILTER'] . ':</label><br /><span>' . $user->lang['LDAP_USER_FILTER_EXPLAIN'] . '</span></dt>
|
||||
<dd><input type="text" id="ldap_user_filter" size="40" name="config[ldap_user_filter]" value="' . $new['ldap_user_filter'] . '" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="ldap_email">' . $user->lang['LDAP_EMAIL'] . ':</label><br /><span>' . $user->lang['LDAP_EMAIL_EXPLAIN'] . '</span></dt>
|
||||
<dd><input type="text" id="ldap_email" size="40" name="config[ldap_email]" value="' . $new['ldap_email'] . '" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="ldap_user">' . $user->lang['LDAP_USER'] . ':</label><br /><span>' . $user->lang['LDAP_USER_EXPLAIN'] . '</span></dt>
|
||||
<dd><input type="text" id="ldap_user" size="40" name="config[ldap_user]" value="' . $new['ldap_user'] . '" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="ldap_password">' . $user->lang['LDAP_PASSWORD'] . ':</label><br /><span>' . $user->lang['LDAP_PASSWORD_EXPLAIN'] . '</span></dt>
|
||||
<dd><input type="password" id="ldap_password" size="40" name="config[ldap_password]" value="' . $new['ldap_password'] . '" /></dd>
|
||||
</dl>
|
||||
';
|
||||
|
||||
// These are fields required in the config table
|
||||
return array(
|
||||
'tpl' => $tpl,
|
||||
'config' => array('ldap_server', 'ldap_user', 'ldap_password', 'ldap_base_dn', 'ldap_uid', 'ldap_email')
|
||||
'config' => array('ldap_server', 'ldap_port', 'ldap_base_dn', 'ldap_uid', 'ldap_user_filter', 'ldap_email', 'ldap_user', 'ldap_password')
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -156,10 +156,9 @@ class bbcode
|
|||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
// To circumvent replacing newlines with <br /> for the generated html,
|
||||
// we just remove newlines here. We do not do this within the admin panel to
|
||||
// let the admin lay out his html code nicely
|
||||
$row['bbcode_tpl'] = str_replace(array("\n", "\r"), '', $row['bbcode_tpl']);
|
||||
$row['second_pass_replace'] = str_replace(array("\n", "\r"), '', $row['second_pass_replace']);
|
||||
// we use carriage returns here. They are later changed back to newlines
|
||||
$row['bbcode_tpl'] = str_replace("\n", "\r", $row['bbcode_tpl']);
|
||||
$row['second_pass_replace'] = str_replace("\n", "\r", $row['second_pass_replace']);
|
||||
|
||||
$rowset[$row['bbcode_id']] = $row;
|
||||
}
|
||||
|
@ -333,7 +332,7 @@ class bbcode
|
|||
// In order to use templates with custom bbcodes we need
|
||||
// to replace all {VARS} to corresponding backreferences
|
||||
// Note that backreferences are numbered from bbcode_match
|
||||
if (preg_match_all('/\{(URL|EMAIL|TEXT|COLOR|NUMBER)[0-9]*\}/', $rowset[$bbcode_id]['bbcode_match'], $m))
|
||||
if (preg_match_all('/\{(URL|LOCAL_URL|EMAIL|TEXT|SIMPLETEXT|IDENTIFIER|COLOR|NUMBER)[0-9]*\}/', $rowset[$bbcode_id]['bbcode_match'], $m))
|
||||
{
|
||||
foreach ($m[0] as $i => $tok)
|
||||
{
|
||||
|
|
|
@ -164,9 +164,13 @@ class dbal_firebird extends dbal
|
|||
}
|
||||
}
|
||||
|
||||
if (!function_exists('ibase_affected_rows') && (preg_match('/^UPDATE ([\w_]++)\s+SET [\w_]++\s*=\s*(?:\'(?:[^\']++|\'\')*+\'|[\d-.]+)(?:,\s*[\w_]++\s*=\s*(?:\'(?:[^\']++|\'\')*+\'|[\d-.]+))*+\s+(WHERE.*)$/s', $query, $regs) || preg_match('/^DELETE FROM ([\w_]++)\s*WHERE\s*(.*)$/s', $query, $regs)))
|
||||
if (!function_exists('ibase_affected_rows') && (preg_match('/^UPDATE ([\w_]++)\s+SET [\w_]++\s*=\s*(?:\'(?:[^\']++|\'\')*+\'|[\d-.]+)(?:,\s*[\w_]++\s*=\s*(?:\'(?:[^\']++|\'\')*+\'|[\d-.]+))*+\s+(WHERE.*)?$/s', $query, $regs) || preg_match('/^DELETE FROM ([\w_]++)\s*(WHERE\s*.*)?$/s', $query, $regs)))
|
||||
{
|
||||
$affected_sql = 'SELECT COUNT(*) as num_rows_affected FROM ' . $regs[1] . ' ' . $regs[2];
|
||||
$affected_sql = 'SELECT COUNT(*) as num_rows_affected FROM ' . $regs[1];
|
||||
if (!empty($regs[2]))
|
||||
{
|
||||
$affected_sql .= ' ' . $regs[2];
|
||||
}
|
||||
|
||||
if (!($temp_q_id = @ibase_query($this->db_connect_id, $affected_sql)))
|
||||
{
|
||||
|
@ -297,7 +301,7 @@ class dbal_firebird extends dbal
|
|||
|
||||
foreach (get_object_vars($cur_row) as $key => $value)
|
||||
{
|
||||
$row[strtolower($key)] = trim(str_replace(array("\\0", "\\n"), array("\0", "\n"), $value));
|
||||
$row[strtolower($key)] = (is_string($value)) ? trim(str_replace(array("\\0", "\\n"), array("\0", "\n"), $value)) : $value;
|
||||
}
|
||||
|
||||
return (sizeof($row)) ? $row : false;
|
||||
|
|
|
@ -39,7 +39,14 @@ class dbal_mssql extends dbal
|
|||
@ini_set('mssql.textlimit', 2147483647);
|
||||
@ini_set('mssql.textsize', 2147483647);
|
||||
|
||||
$this->db_connect_id = ($this->persistency) ? @mssql_pconnect($this->server, $this->user, $sqlpassword, $new_link) : @mssql_connect($this->server, $this->user, $sqlpassword, $new_link);
|
||||
if (version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.1', '>=')))
|
||||
{
|
||||
$this->db_connect_id = ($this->persistency) ? @mssql_pconnect($this->server, $this->user, $sqlpassword, $new_link) : @mssql_connect($this->server, $this->user, $sqlpassword, $new_link);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->db_connect_id = ($this->persistency) ? @mssql_pconnect($this->server, $this->user, $sqlpassword) : @mssql_connect($this->server, $this->user, $sqlpassword);
|
||||
}
|
||||
|
||||
if ($this->db_connect_id && $this->dbname != '')
|
||||
{
|
||||
|
|
|
@ -43,7 +43,28 @@ class dbal_mssql_odbc extends dbal
|
|||
$this->server = $sqlserver . (($port) ? ':' . $port : '');
|
||||
$this->dbname = $database;
|
||||
|
||||
@ini_set('odbc.defaultlrl', 65536);
|
||||
$max_size = @ini_get('odbc.defaultlrl');
|
||||
if (!empty($max_size))
|
||||
{
|
||||
$unit = strtolower(substr($max_size, -1, 1));
|
||||
$max_size = (int) $max_size;
|
||||
|
||||
if ($unit == 'k')
|
||||
{
|
||||
$max_size = floor($max_size / 1024);
|
||||
}
|
||||
else if ($unit == 'g')
|
||||
{
|
||||
$max_size *= 1024;
|
||||
}
|
||||
else if (is_numeric($unit))
|
||||
{
|
||||
$max_size = floor((int) ($max_size . $unit) / 1048576);
|
||||
}
|
||||
$max_size = max(8, $max_size) . 'M';
|
||||
|
||||
@ini_set('odbc.defaultlrl', $max_size);
|
||||
}
|
||||
|
||||
$this->db_connect_id = ($this->persistency) ? @odbc_pconnect($this->server, $this->user, $sqlpassword) : @odbc_connect($this->server, $this->user, $sqlpassword);
|
||||
|
||||
|
@ -81,19 +102,15 @@ class dbal_mssql_odbc extends dbal
|
|||
switch ($status)
|
||||
{
|
||||
case 'begin':
|
||||
return @odbc_autocommit($this->db_connect_id, false);
|
||||
return @odbc_exec($this->db_connect_id, 'BEGIN TRANSACTION');
|
||||
break;
|
||||
|
||||
case 'commit':
|
||||
$result = @odbc_commit($this->db_connect_id);
|
||||
@odbc_autocommit($this->db_connect_id, true);
|
||||
return $result;
|
||||
return @odbc_exec($this->db_connect_id, 'COMMIT TRANSACTION');
|
||||
break;
|
||||
|
||||
case 'rollback':
|
||||
$result = @odbc_rollback($this->db_connect_id);
|
||||
@odbc_autocommit($this->db_connect_id, true);
|
||||
return $result;
|
||||
return @odbc_exec($this->db_connect_id, 'ROLLBACK TRANSACTION');
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -57,6 +57,31 @@ class dbal_mysql extends dbal
|
|||
if (version_compare($this->mysql_version, '4.1.3', '>='))
|
||||
{
|
||||
@mysql_query("SET NAMES 'utf8'", $this->db_connect_id);
|
||||
// enforce strict mode on databases that support it
|
||||
if (version_compare($this->mysql_version, '5.0.2', '>='))
|
||||
{
|
||||
$result = @mysql_query('SELECT @@session.sql_mode AS sql_mode', $this->db_connect_id);
|
||||
$row = @mysql_fetch_assoc($result);
|
||||
@mysql_free_result($result);
|
||||
$modes = array_map('trim', explode(',', $row['sql_mode']));
|
||||
|
||||
// TRADITIONAL includes STRICT_ALL_TABLES and STRICT_TRANS_TABLES
|
||||
if (!in_array('TRADITIONAL', $modes))
|
||||
{
|
||||
if (!in_array('STRICT_ALL_TABLES', $modes))
|
||||
{
|
||||
$modes[] = 'STRICT_ALL_TABLES';
|
||||
}
|
||||
|
||||
if (!in_array('STRICT_TRANS_TABLES', $modes))
|
||||
{
|
||||
$modes[] = 'STRICT_TRANS_TABLES';
|
||||
}
|
||||
}
|
||||
|
||||
$mode = implode(',', $modes);
|
||||
@mysql_query("SET SESSION sql_mode='{$mode}'", $this->db_connect_id);
|
||||
}
|
||||
}
|
||||
else if (version_compare($this->mysql_version, '4.0.0', '<'))
|
||||
{
|
||||
|
|
|
@ -45,6 +45,31 @@ class dbal_mysqli extends dbal
|
|||
if ($this->db_connect_id && $this->dbname != '')
|
||||
{
|
||||
@mysqli_query($this->db_connect_id, "SET NAMES 'utf8'");
|
||||
// enforce strict mode on databases that support it
|
||||
if (mysqli_get_server_version($this->db_connect_id) >= 50002)
|
||||
{
|
||||
$result = @mysqli_query($this->db_connect_id, 'SELECT @@session.sql_mode AS sql_mode');
|
||||
$row = @mysqli_fetch_assoc($result);
|
||||
@mysqli_free_result($result);
|
||||
$modes = array_map('trim', explode(',', $row['sql_mode']));
|
||||
|
||||
// TRADITIONAL includes STRICT_ALL_TABLES and STRICT_TRANS_TABLES
|
||||
if (!in_array('TRADITIONAL', $modes))
|
||||
{
|
||||
if (!in_array('STRICT_ALL_TABLES', $modes))
|
||||
{
|
||||
$modes[] = 'STRICT_ALL_TABLES';
|
||||
}
|
||||
|
||||
if (!in_array('STRICT_TRANS_TABLES', $modes))
|
||||
{
|
||||
$modes[] = 'STRICT_TRANS_TABLES';
|
||||
}
|
||||
}
|
||||
|
||||
$mode = implode(',', $modes);
|
||||
@mysqli_query($this->db_connect_id, "SET SESSION sql_mode='{$mode}'");
|
||||
}
|
||||
return $this->db_connect_id;
|
||||
}
|
||||
|
||||
|
@ -314,7 +339,7 @@ class dbal_mysqli extends dbal
|
|||
if (strpos(mysqli_get_server_info($this->db_connect_id), 'community') !== false)
|
||||
{
|
||||
$ver = mysqli_get_server_version($this->db_connect_id);
|
||||
if ($ver >= 50037 && $ver < 51000)
|
||||
if ($ver >= 50037 && $ver < 50100)
|
||||
{
|
||||
$test_prof = true;
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ class dbal_oracle extends dbal
|
|||
*/
|
||||
function _rewrite_where($where_clause)
|
||||
{
|
||||
preg_match_all('/\s*(AND|OR)?\s*([\w_.]++)\s*(?:(=|<>)\s*((?>\'(?>[^\']++|\'\')*+\'|[\d-.]+))|((NOT )?IN\s*\((?>\'(?>[^\']++|\'\')*+\',? ?|[\d-.]+,? ?)*+\)))/', $where_clause, $result, PREG_SET_ORDER);
|
||||
preg_match_all('/\s*(AND|OR)?\s*([\w_.]++)\s*(?:(=|<[=>]?|>=?)\s*((?>\'(?>[^\']++|\'\')*+\'|[\d-.]+))|((NOT )?IN\s*\((?>\'(?>[^\']++|\'\')*+\',? ?|[\d-.]+,? ?)*+\)))/', $where_clause, $result, PREG_SET_ORDER);
|
||||
$out = '';
|
||||
foreach ($result as $val)
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @package diff
|
||||
* @version $Id$
|
||||
* @copyright (c) 2006 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
|
@ -25,7 +25,7 @@ if (!defined('IN_PHPBB'))
|
|||
* General API for generating and formatting diffs - the differences between
|
||||
* two sequences of strings.
|
||||
*
|
||||
* @package phpBB3
|
||||
* @package diff
|
||||
* @author Geoffrey T. Dairiki <dairiki@dairiki.org>
|
||||
*/
|
||||
class diff
|
||||
|
@ -226,7 +226,7 @@ class diff
|
|||
}
|
||||
|
||||
/**
|
||||
* @package phpBB3
|
||||
* @package diff
|
||||
* @author Geoffrey T. Dairiki <dairiki@dairiki.org>
|
||||
*/
|
||||
class mapped_diff extends diff
|
||||
|
@ -274,7 +274,7 @@ class mapped_diff extends diff
|
|||
}
|
||||
|
||||
/**
|
||||
* @package phpBB3
|
||||
* @package diff
|
||||
* @author Geoffrey T. Dairiki <dairiki@dairiki.org>
|
||||
*
|
||||
* @access private
|
||||
|
@ -301,7 +301,7 @@ class diff_op
|
|||
}
|
||||
|
||||
/**
|
||||
* @package phpBB3
|
||||
* @package diff
|
||||
* @author Geoffrey T. Dairiki <dairiki@dairiki.org>
|
||||
*
|
||||
* @access private
|
||||
|
@ -326,7 +326,7 @@ class diff_op_copy extends diff_op
|
|||
}
|
||||
|
||||
/**
|
||||
* @package phpBB3
|
||||
* @package diff
|
||||
* @author Geoffrey T. Dairiki <dairiki@dairiki.org>
|
||||
*
|
||||
* @access private
|
||||
|
@ -347,7 +347,7 @@ class diff_op_delete extends diff_op
|
|||
}
|
||||
|
||||
/**
|
||||
* @package phpBB3
|
||||
* @package diff
|
||||
* @author Geoffrey T. Dairiki <dairiki@dairiki.org>
|
||||
*
|
||||
* @access private
|
||||
|
@ -368,7 +368,7 @@ class diff_op_add extends diff_op
|
|||
}
|
||||
|
||||
/**
|
||||
* @package phpBB3
|
||||
* @package diff
|
||||
* @author Geoffrey T. Dairiki <dairiki@dairiki.org>
|
||||
*
|
||||
* @access private
|
||||
|
@ -392,7 +392,7 @@ class diff_op_change extends diff_op
|
|||
/**
|
||||
* A class for computing three way diffs.
|
||||
*
|
||||
* @package phpBB3
|
||||
* @package diff
|
||||
* @author Geoffrey T. Dairiki <dairiki@dairiki.org>
|
||||
*/
|
||||
class diff3 extends diff
|
||||
|
@ -637,7 +637,7 @@ class diff3 extends diff
|
|||
}
|
||||
|
||||
/**
|
||||
* @package phpBB3
|
||||
* @package diff
|
||||
* @author Geoffrey T. Dairiki <dairiki@dairiki.org>
|
||||
*
|
||||
* @access private
|
||||
|
@ -683,7 +683,7 @@ class diff3_op
|
|||
}
|
||||
|
||||
/**
|
||||
* @package phpBB3
|
||||
* @package diff
|
||||
* @author Geoffrey T. Dairiki <dairiki@dairiki.org>
|
||||
*
|
||||
* @access private
|
||||
|
@ -709,7 +709,7 @@ class diff3_op_copy extends diff3_op
|
|||
}
|
||||
|
||||
/**
|
||||
* @package phpBB3
|
||||
* @package diff
|
||||
* @author Geoffrey T. Dairiki <dairiki@dairiki.org>
|
||||
*
|
||||
* @access private
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @package diff
|
||||
* @version $Id$
|
||||
* @copyright (c) 2006 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
|
@ -41,7 +41,7 @@ if (!defined('IN_PHPBB'))
|
|||
* code was written by him, and is used/adapted with his permission.
|
||||
*
|
||||
* @author Geoffrey T. Dairiki <dairiki@dairiki.org>
|
||||
* @package phpBB3
|
||||
* @package diff
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @package diff
|
||||
* @version $Id$
|
||||
* @copyright (c) 2006 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
|
@ -27,7 +27,7 @@ if (!defined('IN_PHPBB'))
|
|||
* This class renders the diff in classic diff format. It is intended that
|
||||
* this class be customized via inheritance, to obtain fancier outputs.
|
||||
*
|
||||
* @package phpBB3
|
||||
* @package diff
|
||||
*/
|
||||
class diff_renderer
|
||||
{
|
||||
|
@ -267,7 +267,7 @@ class diff_renderer
|
|||
|
||||
/**
|
||||
* Renders a unified diff
|
||||
* @package phpBB3
|
||||
* @package diff
|
||||
*/
|
||||
class diff_renderer_unified extends diff_renderer
|
||||
{
|
||||
|
@ -340,7 +340,7 @@ class diff_renderer_unified extends diff_renderer
|
|||
* This class renders diffs in the Wiki-style "inline" format.
|
||||
*
|
||||
* @author Ciprian Popovici
|
||||
* @package phpBB3
|
||||
* @package diff
|
||||
*/
|
||||
class diff_renderer_inline extends diff_renderer
|
||||
{
|
||||
|
@ -503,7 +503,7 @@ class diff_renderer_inline extends diff_renderer
|
|||
* "raw" diff renderer.
|
||||
* This class could be used to output a raw unified patch file
|
||||
*
|
||||
* @package phpBB3
|
||||
* @package diff
|
||||
*/
|
||||
class diff_renderer_raw extends diff_renderer
|
||||
{
|
||||
|
@ -557,7 +557,7 @@ class diff_renderer_raw extends diff_renderer
|
|||
* "chora (Horde)" diff renderer - similar style.
|
||||
* This renderer class is a modified human_readable function from the Horde Framework.
|
||||
*
|
||||
* @package phpBB3
|
||||
* @package diff
|
||||
*/
|
||||
class diff_renderer_side_by_side extends diff_renderer
|
||||
{
|
||||
|
|
|
@ -1582,6 +1582,13 @@ function append_sid($url, $params = false, $is_amp = true, $session_id = false)
|
|||
{
|
||||
global $_SID, $_EXTRA_URL;
|
||||
|
||||
// Developers using the hook function need to globalise the $_SID and $_EXTRA_URL on their own and also handle it appropiatly.
|
||||
// They could mimick most of what is within this function
|
||||
if (function_exists('append_sid_phpbb_hook'))
|
||||
{
|
||||
return append_sid_phpbb_hook($url, $params, $is_amp, $session_id);
|
||||
}
|
||||
|
||||
// Assign sid if session id is not specified
|
||||
if ($session_id === false)
|
||||
{
|
||||
|
@ -1950,8 +1957,8 @@ function meta_refresh($time, $url)
|
|||
* @param boolean $check True for checking if confirmed (without any additional parameters) and false for displaying the confirm box
|
||||
* @param string $title Title/Message used for confirm box.
|
||||
* message text is _CONFIRM appended to title.
|
||||
* If title can not be found in user->lang a default one is displayed
|
||||
* If title_CONFIRM can not be found in user->lang the text given is used.
|
||||
* If title cannot be found in user->lang a default one is displayed
|
||||
* If title_CONFIRM cannot be found in user->lang the text given is used.
|
||||
* @param string $hidden Hidden variables
|
||||
* @param string $html_body Template used for confirm box
|
||||
* @param string $u_action Custom form action
|
||||
|
@ -1970,7 +1977,7 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo
|
|||
if (isset($_POST['confirm']))
|
||||
{
|
||||
// language frontier
|
||||
if ($_POST['confirm'] == $user->lang['YES'])
|
||||
if ($_POST['confirm'] === $user->lang['YES'])
|
||||
{
|
||||
$confirm = true;
|
||||
}
|
||||
|
@ -2286,8 +2293,10 @@ function login_forum_box($forum_data)
|
|||
if ($password)
|
||||
{
|
||||
// Remove expired authorised sessions
|
||||
$sql = 'SELECT session_id
|
||||
FROM ' . SESSIONS_TABLE;
|
||||
$sql = 'SELECT f.session_id
|
||||
FROM ' . FORUMS_ACCESS_TABLE . ' f
|
||||
LEFT JOIN ' . SESSIONS_TABLE . ' s ON (f.session_id = s.session_id)
|
||||
WHERE s.session_id IS NULL';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
if ($row = $db->sql_fetchrow($result))
|
||||
|
@ -2301,7 +2310,7 @@ function login_forum_box($forum_data)
|
|||
|
||||
// Remove expired sessions
|
||||
$sql = 'DELETE FROM ' . FORUMS_ACCESS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('session_id', $sql_in, true);
|
||||
WHERE ' . $db->sql_in_set('session_id', $sql_in);
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
@ -2520,7 +2529,7 @@ function strip_bbcode(&$text, $uid = '')
|
|||
$uid = '[0-9a-z]{5,}';
|
||||
}
|
||||
|
||||
$text = preg_replace("#\[\/?[a-z0-9\*\+\-]+(?:=.*?)?(?::[a-z])?(\:?$uid)\]#", ' ', $text);
|
||||
$text = preg_replace("#\[\/?[a-z0-9\*\+\-]+(?:=(?:".*"|[^\]]*))?(?::[a-z])?(\:$uid)\]#", ' ', $text);
|
||||
|
||||
$match = get_preg_expression('bbcode_htm');
|
||||
$replace = array('\1', '\1', '\2', '\1', '', '');
|
||||
|
@ -2564,8 +2573,7 @@ function generate_text_for_display($text, $uid, $bitfield, $flags)
|
|||
$bbcode->bbcode_second_pass($text, $uid);
|
||||
}
|
||||
|
||||
$text = str_replace("\n", '<br />', $text);
|
||||
|
||||
$text = bbcode_nl2br($text);
|
||||
$text = smiley_text($text, !($flags & OPTION_FLAG_SMILIES));
|
||||
|
||||
return $text;
|
||||
|
@ -2806,6 +2814,17 @@ function censor_text($text)
|
|||
return $text;
|
||||
}
|
||||
|
||||
/**
|
||||
* custom version of nl2br which takes custom BBCodes into account
|
||||
*/
|
||||
function bbcode_nl2br($text)
|
||||
{
|
||||
// custom BBCodes might contain carriage returns so they
|
||||
// are not converted into <br /> so now revert that
|
||||
$text = str_replace(array("\n", "\r"), array('<br />', "\n"), $text);
|
||||
return $text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Smiley processing
|
||||
*/
|
||||
|
@ -2948,7 +2967,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
|
|||
$size_lang = ($filesize >= 1048576) ? $user->lang['MB'] : ( ($filesize >= 1024) ? $user->lang['KB'] : $user->lang['BYTES'] );
|
||||
$filesize = ($filesize >= 1048576) ? round((round($filesize / 1048576 * 100) / 100), 2) : (($filesize >= 1024) ? round((round($filesize / 1024 * 100) / 100), 2) : $filesize);
|
||||
|
||||
$comment = str_replace("\n", '<br />', censor_text($attachment['attach_comment']));
|
||||
$comment = bbcode_nl2br(censor_text($attachment['attach_comment']));
|
||||
|
||||
$block_array += array(
|
||||
'UPLOAD_ICON' => $upload_icon,
|
||||
|
@ -3491,14 +3510,14 @@ function truncate_string($string, $max_length = 60, $allow_reply = true, $append
|
|||
}
|
||||
|
||||
$_chars = utf8_str_split(htmlspecialchars_decode($string));
|
||||
$chars = array_map('htmlspecialchars', $_chars);
|
||||
$chars = array_map('utf8_htmlspecialchars', $_chars);
|
||||
|
||||
// Now check the length ;)
|
||||
if (sizeof($chars) > $max_length)
|
||||
{
|
||||
// Cut off the last elements from the array
|
||||
$string = implode('', array_slice($chars, 0, $max_length));
|
||||
$stripped = true;
|
||||
$stripped = true;
|
||||
}
|
||||
|
||||
if ($strip_reply)
|
||||
|
@ -3685,6 +3704,15 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
|
|||
|
||||
if (strpos($errfile, 'cache') === false && strpos($errfile, 'template.') === false)
|
||||
{
|
||||
// flush the content, else we get a white page if output buffering is on
|
||||
if ($config['gzip_compress'])
|
||||
{
|
||||
if (@extension_loaded('zlib') && !headers_sent())
|
||||
{
|
||||
ob_flush();
|
||||
}
|
||||
}
|
||||
|
||||
// remove complete path to installation, with the risk of changing backslashes meant to be there
|
||||
$errfile = str_replace(array(phpbb_realpath($phpbb_root_path), '\\'), array('', '/'), $errfile);
|
||||
$msg_text = str_replace(array(phpbb_realpath($phpbb_root_path), '\\'), array('', '/'), $msg_text);
|
||||
|
@ -4276,7 +4304,10 @@ function page_footer($run_cron = true)
|
|||
|
||||
garbage_collection();
|
||||
|
||||
exit;
|
||||
if (!defined('PHPBB_EMBEDDED'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2429,11 +2429,11 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id
|
|||
// If within the admin panel we do not censor text out
|
||||
if (defined('IN_ADMIN'))
|
||||
{
|
||||
$log[$i]['action'] = str_replace("\n", '<br />', $log[$i]['action']);
|
||||
$log[$i]['action'] = bbcode_nl2br($log[$i]['action']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$log[$i]['action'] = str_replace("\n", '<br />', censor_text($log[$i]['action']));
|
||||
$log[$i]['action'] = bbcode_nl2br(censor_text($log[$i]['action']));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -228,7 +228,7 @@ function validate_website($url)
|
|||
{
|
||||
return '';
|
||||
}
|
||||
else if (strpos(strtolower($url), 'http://') !== 0)
|
||||
else if (!preg_match('#^[a-z0-9]+://#i', $url) && strlen($url) > 0)
|
||||
{
|
||||
return 'http://' . $url;
|
||||
}
|
||||
|
|
|
@ -997,7 +997,7 @@ function watch_topic_forum($mode, &$s_watching, &$s_watching_img, $user_id, $for
|
|||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
if (!is_null($notify_status))
|
||||
if (!is_null($notify_status) && $notify_status !== '')
|
||||
{
|
||||
if (isset($_GET['unwatch']))
|
||||
{
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
*
|
||||
* @version class.jabber2.php 1306 2007-06-21
|
||||
* @copyright 2006 Flyspray.org
|
||||
* @author: Florian Schmitz (floele)
|
||||
* @author Florian Schmitz (floele)
|
||||
*
|
||||
* Modified by Acyd Burn
|
||||
*
|
||||
|
@ -416,7 +416,7 @@ class jabber
|
|||
}
|
||||
|
||||
// Let's use TLS if SSL is not enabled and we can actually use it
|
||||
if (!$this->session['ssl'] && $this->can_use_tls() && isset($xml['stream:features'][0]['#']['starttls']))
|
||||
if (!$this->session['ssl'] && $this->can_use_tls() && $this->can_use_ssl() && isset($xml['stream:features'][0]['#']['starttls']))
|
||||
{
|
||||
$this->add_to_log('Switching to TLS.');
|
||||
$this->send("<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>\n");
|
||||
|
|
|
@ -399,12 +399,12 @@ class messenger
|
|||
|
||||
if ($config['smtp_delivery'])
|
||||
{
|
||||
$result = smtpmail($this->addresses, mail_encode($this->subject), wordwrap($this->msg), $err_msg, $headers);
|
||||
$result = smtpmail($this->addresses, mail_encode($this->subject), wordwrap(utf8_wordwrap($this->msg), 997, "\n", true), $err_msg, $headers);
|
||||
}
|
||||
else
|
||||
{
|
||||
ob_start();
|
||||
$result = $config['email_function_name']($mail_to, mail_encode($this->subject), implode("\n", preg_split("/\r?\n/", wordwrap($this->msg))), $headers);
|
||||
$result = $config['email_function_name']($mail_to, mail_encode($this->subject), wordwrap(utf8_wordwrap($this->msg), 997, "\n", true), $headers);
|
||||
$err_msg = ob_get_clean();
|
||||
}
|
||||
|
||||
|
@ -575,6 +575,12 @@ class queue
|
|||
$package_size = $data_ary['package_size'];
|
||||
$num_items = (!$package_size || sizeof($data_ary['data']) < $package_size) ? sizeof($data_ary['data']) : $package_size;
|
||||
|
||||
// If the amount of emails to be sent is way more than package_size than we need to increase it to prevent backlogs...
|
||||
if (sizeof($data_ary['data']) > $package_size * 2.5)
|
||||
{
|
||||
$num_items = sizeof($data_ary['data']);
|
||||
}
|
||||
|
||||
switch ($object)
|
||||
{
|
||||
case 'email':
|
||||
|
@ -627,12 +633,12 @@ class queue
|
|||
|
||||
if ($config['smtp_delivery'])
|
||||
{
|
||||
$result = smtpmail($addresses, mail_encode($subject), wordwrap($msg), $err_msg, $headers);
|
||||
$result = smtpmail($addresses, mail_encode($subject), wordwrap(utf8_wordwrap($msg), 997, "\n", true), $err_msg, $headers);
|
||||
}
|
||||
else
|
||||
{
|
||||
ob_start();
|
||||
$result = $config['email_function_name']($to, mail_encode($subject), implode("\n", preg_split("/\r?\n/", wordwrap($msg))), $headers);
|
||||
$result = $config['email_function_name']($to, mail_encode($subject), wordwrap(utf8_wordwrap($msg), 997, "\n", true), $headers);
|
||||
$err_msg = ob_get_clean();
|
||||
}
|
||||
|
||||
|
|
|
@ -652,11 +652,23 @@ function create_thumbnail($source, $destination, $mimetype)
|
|||
if ($type['version'] == 1)
|
||||
{
|
||||
$new_image = imagecreate($new_width, $new_height);
|
||||
|
||||
if ($new_image === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
imagecopyresized($new_image, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
|
||||
}
|
||||
else
|
||||
{
|
||||
$new_image = imagecreatetruecolor($new_width, $new_height);
|
||||
|
||||
if ($new_image === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
imagecopyresampled($new_image, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
|
||||
}
|
||||
|
||||
|
@ -1009,8 +1021,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
|||
$decoded_message = $message;
|
||||
decode_message($decoded_message, $row['bbcode_uid']);
|
||||
|
||||
$decoded_message = censor_text($decoded_message);
|
||||
$decoded_message = str_replace("\n", "<br />", $decoded_message);
|
||||
$decoded_message = bbcode_nl2br($decoded_message);
|
||||
}
|
||||
|
||||
if ($row['bbcode_bitfield'])
|
||||
|
@ -1018,8 +1029,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
|||
$bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']);
|
||||
}
|
||||
|
||||
$message = str_replace("\n", '<br />', $message);
|
||||
|
||||
$message = bbcode_nl2br($message);
|
||||
$message = smiley_text($message, !$row['enable_smilies']);
|
||||
|
||||
if (!empty($attachments[$row['post_id']]))
|
||||
|
@ -1238,8 +1248,8 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id
|
|||
'TOPIC_TITLE' => htmlspecialchars_decode($topic_title),
|
||||
'FORUM_NAME' => htmlspecialchars_decode($forum_name),
|
||||
|
||||
'U_FORUM' => generate_board_url() . "/viewforum.$phpEx?f=$forum_id&e=0",
|
||||
'U_TOPIC' => generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&t=$topic_id&e=0",
|
||||
'U_FORUM' => generate_board_url() . "/viewforum.$phpEx?f=$forum_id",
|
||||
'U_TOPIC' => generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&t=$topic_id",
|
||||
'U_NEWEST_POST' => generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&t=$topic_id&p=$post_id&e=$post_id",
|
||||
'U_STOP_WATCHING_TOPIC' => generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&t=$topic_id&unwatch=topic",
|
||||
'U_STOP_WATCHING_FORUM' => generate_board_url() . "/viewforum.$phpEx?f=$forum_id&unwatch=forum",
|
||||
|
|
|
@ -778,7 +778,7 @@ function move_pm($user_id, $message_limit, $move_msg_ids, $dest_folder, $cur_fol
|
|||
trigger_error('NOT_AUTHORISED');
|
||||
}
|
||||
|
||||
if ($row['pm_count'] + sizeof($move_msg_ids) > $message_limit)
|
||||
if ($message_limit && $row['pm_count'] + sizeof($move_msg_ids) > $message_limit)
|
||||
{
|
||||
$message = sprintf($user->lang['NOT_ENOUGH_SPACE_FOLDER'], $row['folder_name']) . '<br /><br />';
|
||||
$message .= sprintf($user->lang['CLICK_RETURN_FOLDER'], '<a href="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=' . $row['folder_id']) . '">', '</a>', $row['folder_name']);
|
||||
|
@ -795,7 +795,7 @@ function move_pm($user_id, $message_limit, $move_msg_ids, $dest_folder, $cur_fol
|
|||
$num_messages = (int) $db->sql_fetchfield('num_messages');
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($num_messages + sizeof($move_msg_ids) > $message_limit)
|
||||
if ($message_limit && $num_messages + sizeof($move_msg_ids) > $message_limit)
|
||||
{
|
||||
$message = sprintf($user->lang['NOT_ENOUGH_SPACE_FOLDER'], $user->lang['PM_INBOX']) . '<br /><br />';
|
||||
$message .= sprintf($user->lang['CLICK_RETURN_FOLDER'], '<a href="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox') . '">', '</a>', $user->lang['PM_INBOX']);
|
||||
|
@ -1281,9 +1281,9 @@ function get_folder_status($folder_id, $folder)
|
|||
$return = array(
|
||||
'folder_name' => $folder['folder_name'],
|
||||
'cur' => $folder['num_messages'],
|
||||
'remaining' => $user->data['message_limit'] - $folder['num_messages'],
|
||||
'remaining' => ($user->data['message_limit']) ? $user->data['message_limit'] - $folder['num_messages'] : 0,
|
||||
'max' => $user->data['message_limit'],
|
||||
'percent' => ($user->data['message_limit'] > 0) ? round(($folder['num_messages'] / $user->data['message_limit']) * 100) : 100,
|
||||
'percent' => ($user->data['message_limit']) ? (($user->data['message_limit'] > 0) ? round(($folder['num_messages'] / $user->data['message_limit']) * 100) : 100) : 0,
|
||||
);
|
||||
|
||||
$return['message'] = sprintf($user->lang['FOLDER_STATUS_MSG'], $return['percent'], $return['cur'], $return['max']);
|
||||
|
@ -1348,10 +1348,12 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true)
|
|||
|
||||
if (isset($data['address_list']['g']) && sizeof($data['address_list']['g']))
|
||||
{
|
||||
$sql = 'SELECT group_id, user_id
|
||||
FROM ' . USER_GROUP_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('group_id', array_keys($data['address_list']['g'])) . '
|
||||
AND user_pending = 0';
|
||||
$sql = 'SELECT u.user_type, ug.group_id, ug.user_id
|
||||
FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . ' ug
|
||||
WHERE ' . $db->sql_in_set('ug.group_id', array_keys($data['address_list']['g'])) . '
|
||||
AND ug.user_pending = 0
|
||||
AND u.user_id = ug.user_id
|
||||
AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
|
@ -1684,4 +1686,145 @@ function pm_notification($mode, $author, $recipients, $subject, $message)
|
|||
unset($messenger);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display Message History
|
||||
*/
|
||||
function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode = false)
|
||||
{
|
||||
global $db, $user, $config, $template, $phpbb_root_path, $phpEx, $auth, $bbcode;
|
||||
|
||||
// Get History Messages (could be newer)
|
||||
$sql = 'SELECT t.*, p.*, u.*
|
||||
FROM ' . PRIVMSGS_TABLE . ' p, ' . PRIVMSGS_TO_TABLE . ' t, ' . USERS_TABLE . ' u
|
||||
WHERE t.msg_id = p.msg_id
|
||||
AND p.author_id = u.user_id
|
||||
AND t.folder_id NOT IN (' . PRIVMSGS_NO_BOX . ', ' . PRIVMSGS_HOLD_BOX . ")
|
||||
AND t.user_id = $user_id";
|
||||
|
||||
if (!$message_row['root_level'])
|
||||
{
|
||||
$sql .= " AND (p.root_level = $msg_id OR (p.root_level = 0 AND p.msg_id = $msg_id))";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql .= " AND (p.root_level = " . $message_row['root_level'] . ' OR p.msg_id = ' . $message_row['root_level'] . ')';
|
||||
}
|
||||
$sql .= ' ORDER BY p.message_time DESC';
|
||||
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
|
||||
if (!$row)
|
||||
{
|
||||
$db->sql_freeresult($result);
|
||||
return false;
|
||||
}
|
||||
|
||||
$rowset = array();
|
||||
$bbcode_bitfield = '';
|
||||
$folder_url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm') . '&folder=';
|
||||
|
||||
do
|
||||
{
|
||||
$folder_id = (int) $row['folder_id'];
|
||||
|
||||
$row['folder'][] = (isset($folder[$folder_id])) ? '<a href="' . $folder_url . $folder_id . '">' . $folder[$folder_id]['folder_name'] . '</a>' : $user->lang['UNKNOWN_FOLDER'];
|
||||
|
||||
if (isset($rowset[$row['msg_id']]))
|
||||
{
|
||||
$rowset[$row['msg_id']]['folder'][] = (isset($folder[$folder_id])) ? '<a href="' . $folder_url . $folder_id . '">' . $folder[$folder_id]['folder_name'] . '</a>' : $user->lang['UNKNOWN_FOLDER'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$rowset[$row['msg_id']] = $row;
|
||||
$bbcode_bitfield = $bbcode_bitfield | base64_decode($row['bbcode_bitfield']);
|
||||
}
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$title = $row['message_subject'];
|
||||
|
||||
if (sizeof($rowset) == 1 && !$in_post_mode)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Instantiate BBCode class
|
||||
if ((empty($bbcode) || $bbcode === false) && $bbcode_bitfield !== '')
|
||||
{
|
||||
if (!class_exists('bbcode'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
|
||||
}
|
||||
$bbcode = new bbcode(base64_encode($bbcode_bitfield));
|
||||
}
|
||||
|
||||
$title = censor_text($title);
|
||||
|
||||
$url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm');
|
||||
$next_history_pm = $previous_history_pm = $prev_id = 0;
|
||||
|
||||
foreach ($rowset as $id => $row)
|
||||
{
|
||||
$author_id = $row['author_id'];
|
||||
$folder_id = (int) $row['folder_id'];
|
||||
|
||||
$subject = $row['message_subject'];
|
||||
$message = $row['message_text'];
|
||||
|
||||
$message = censor_text($message);
|
||||
|
||||
if ($row['bbcode_bitfield'])
|
||||
{
|
||||
$bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']);
|
||||
}
|
||||
|
||||
$message = bbcode_nl2br($message);
|
||||
$message = smiley_text($message, !$row['enable_smilies']);
|
||||
|
||||
$subject = censor_text($subject);
|
||||
|
||||
if ($id == $msg_id)
|
||||
{
|
||||
$next_history_pm = next($rowset);
|
||||
$next_history_pm = (sizeof($next_history_pm)) ? (int) $next_history_pm['msg_id'] : 0;
|
||||
$previous_history_pm = $prev_id;
|
||||
}
|
||||
|
||||
$template->assign_block_vars('history_row', array(
|
||||
'MESSAGE_AUTHOR_FULL' => get_username_string('full', $author_id, $row['username'], $row['user_colour'], $row['username']),
|
||||
'MESSAGE_AUTHOR_COLOUR' => get_username_string('colour', $author_id, $row['username'], $row['user_colour'], $row['username']),
|
||||
'MESSAGE_AUTHOR' => get_username_string('username', $author_id, $row['username'], $row['user_colour'], $row['username']),
|
||||
'U_MESSAGE_AUTHOR' => get_username_string('profile', $author_id, $row['username'], $row['user_colour'], $row['username']),
|
||||
|
||||
'SUBJECT' => $subject,
|
||||
'SENT_DATE' => $user->format_date($row['message_time']),
|
||||
'MESSAGE' => $message,
|
||||
'FOLDER' => implode(', ', $row['folder']),
|
||||
|
||||
'S_CURRENT_MSG' => ($row['msg_id'] == $msg_id),
|
||||
'S_AUTHOR_DELETED' => ($author_id == ANONYMOUS) ? true : false,
|
||||
'S_IN_POST_MODE' => $in_post_mode,
|
||||
|
||||
'MSG_ID' => $row['msg_id'],
|
||||
'U_VIEW_MESSAGE' => "$url&f=$folder_id&p=" . $row['msg_id'],
|
||||
'U_QUOTE' => (!$in_post_mode && $auth->acl_get('u_sendpm') && $author_id != ANONYMOUS && $author_id != $user->data['user_id']) ? "$url&mode=compose&action=quote&f=" . $folder_id . "&p=" . $row['msg_id'] : '',
|
||||
'U_POST_REPLY_PM' => ($author_id != $user->data['user_id'] && $author_id != ANONYMOUS && $auth->acl_get('u_sendpm')) ? "$url&mode=compose&action=reply&f=$folder_id&p=" . $row['msg_id'] : '')
|
||||
);
|
||||
unset($rowset[$id]);
|
||||
$prev_id = $id;
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'QUOTE_IMG' => $user->img('icon_post_quote', $user->lang['REPLY_WITH_QUOTE']),
|
||||
'HISTORY_TITLE' => $title,
|
||||
|
||||
'U_VIEW_NEXT_HISTORY' => "$url&p=" . (($next_history_pm) ? $next_history_pm : $msg_id),
|
||||
'U_VIEW_PREVIOUS_HISTORY' => "$url&p=" . (($previous_history_pm) ? $previous_history_pm : $msg_id))
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
?>
|
|
@ -176,7 +176,7 @@ class custom_profile
|
|||
|
||||
if (!empty($field_data['field_validation']) && $field_data['field_validation'] != '.*')
|
||||
{
|
||||
$field_validate = ($field_type == FIELD_STRING) ? $field_value : str_replace("\n", ' ', $field_value);
|
||||
$field_validate = ($field_type == FIELD_STRING) ? $field_value : bbcode_nl2br($field_value);
|
||||
if (!preg_match('#^' . str_replace('\\\\', '\\', $field_data['field_validation']) . '$#i', $field_validate))
|
||||
{
|
||||
return 'FIELD_INVALID_CHARS';
|
||||
|
@ -462,7 +462,7 @@ class custom_profile
|
|||
|
||||
$value = make_clickable($value);
|
||||
$value = censor_text($value);
|
||||
$value = str_replace("\n", '<br />', $value);
|
||||
$value = bbcode_nl2br($value);
|
||||
return $value;
|
||||
break;
|
||||
|
||||
|
|
|
@ -173,6 +173,7 @@ function user_add($user_row, $cp_data = false)
|
|||
'user_ip' => '',
|
||||
'user_regdate' => time(),
|
||||
'user_passchg' => time(),
|
||||
'user_options' => 895,
|
||||
|
||||
'user_inactive_reason' => 0,
|
||||
'user_inactive_time' => 0,
|
||||
|
@ -181,7 +182,7 @@ function user_add($user_row, $cp_data = false)
|
|||
'user_lastpost_time' => 0,
|
||||
'user_lastpage' => '',
|
||||
'user_posts' => 0,
|
||||
'user_dst' => 0,
|
||||
'user_dst' => (int) $config['board_dst'],
|
||||
'user_colour' => '',
|
||||
'user_occ' => '',
|
||||
'user_interests' => '',
|
||||
|
@ -1981,14 +1982,13 @@ function avatar_gallery($category, $avatar_select, $items_per_column, $block_var
|
|||
$dp2 = @opendir("$path/$file");
|
||||
while (($sub_file = readdir($dp2)) !== false)
|
||||
{
|
||||
if (preg_match('#\.(?:gif|png|jpe?g)$#i', $sub_file))
|
||||
if (preg_match('#^[^&"<>]*\.(?:gif|png|jpe?g)$#i', $sub_file))
|
||||
{
|
||||
$avatar_list[$file][$avatar_row_count][$avatar_col_count] = array(
|
||||
'file' => "$file/$sub_file",
|
||||
'filename' => $sub_file,
|
||||
'name' => ucfirst(str_replace('_', ' ', preg_replace('#^(.*)\..*$#', '\1', $sub_file))),
|
||||
);
|
||||
|
||||
$avatar_col_count++;
|
||||
if ($avatar_col_count == $items_per_column)
|
||||
{
|
||||
|
@ -2302,6 +2302,7 @@ function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow
|
|||
|
||||
if (!sizeof($error))
|
||||
{
|
||||
$user_ary = array();
|
||||
$sql_ary = array(
|
||||
'group_name' => (string) $name,
|
||||
'group_desc' => (string) $desc,
|
||||
|
@ -2335,6 +2336,26 @@ function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow
|
|||
|
||||
if ($group_id)
|
||||
{
|
||||
$sql = 'SELECT user_id
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE group_id = ' . $group_id;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$user_ary[] = $row['user_id'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (isset($sql_ary['group_avatar']) && !$sql_ary['group_avatar'])
|
||||
{
|
||||
remove_default_avatar($group_id, $user_ary);
|
||||
}
|
||||
if (isset($sql_ary['group_rank']) && !$sql_ary['group_rank'])
|
||||
{
|
||||
remove_default_rank($group_id, $user_ary);
|
||||
}
|
||||
|
||||
$sql = 'UPDATE ' . GROUPS_TABLE . '
|
||||
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
|
||||
WHERE group_id = $group_id";
|
||||
|
@ -2380,24 +2401,10 @@ function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow
|
|||
}
|
||||
}
|
||||
|
||||
if (sizeof($sql_ary))
|
||||
if (sizeof($sql_ary) && sizeof($user_ary))
|
||||
{
|
||||
$sql = 'SELECT user_id
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE group_id = ' . $group_id;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$user_ary = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$user_ary[] = $row['user_id'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($user_ary))
|
||||
{
|
||||
group_set_user_default($group_id, $user_ary, $sql_ary, false, true);
|
||||
}
|
||||
group_set_user_default($group_id, $user_ary, $sql_ary);
|
||||
|
||||
}
|
||||
|
||||
$name = ($type == GROUP_SPECIAL) ? $user->lang['G_' . $name] : $name;
|
||||
|
@ -2711,7 +2718,9 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false,
|
|||
{
|
||||
if (isset($sql_where_ary[$gid]) && sizeof($sql_where_ary[$gid]))
|
||||
{
|
||||
group_set_user_default($gid, $sql_where_ary[$gid], $special_group_data[$gid]);
|
||||
remove_default_rank($group_id, $sql_where_ary[$gid]);
|
||||
remove_default_avatar($group_id, $sql_where_ary[$gid]);
|
||||
group_set_user_default($gid, $sql_where_ary[$gid], $default_data_ary);
|
||||
}
|
||||
}
|
||||
unset($special_group_data);
|
||||
|
@ -2739,6 +2748,86 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false,
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Removes the group avatar of the default group from the users in user_ids who have that group as default.
|
||||
*/
|
||||
function remove_default_avatar($group_id, $user_ids)
|
||||
{
|
||||
global $db;
|
||||
|
||||
if (!is_array($user_ids))
|
||||
{
|
||||
$user_ids = array($user_ids);
|
||||
}
|
||||
if (empty($user_ids))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$user_ids = array_map('intval', $user_ids);
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
WHERE group_id = ' . (int)$group_id;
|
||||
$result = $db->sql_query($sql);
|
||||
if (!$row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$db->sql_freeresult($result);
|
||||
return false;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET user_avatar = \'\',
|
||||
user_avatar_type = 0,
|
||||
user_avatar_width = 0,
|
||||
user_avatar_height = 0
|
||||
WHERE group_id = ' . (int)$group_id . '
|
||||
AND user_avatar = \'' . $db->sql_escape($row['group_avatar']) . '\'
|
||||
AND ' . $db->sql_in_set('user_id', $user_ids);
|
||||
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the group rank of the default group from the users in user_ids who have that group as default.
|
||||
*/
|
||||
function remove_default_rank($group_id, $user_ids)
|
||||
{
|
||||
global $db;
|
||||
|
||||
if (!is_array($user_ids))
|
||||
{
|
||||
$user_ids = array($user_ids);
|
||||
}
|
||||
if (empty($user_ids))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$user_ids = array_map('intval', $user_ids);
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
WHERE group_id = ' . (int)$group_id;
|
||||
$result = $db->sql_query($sql);
|
||||
if (!$row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$db->sql_freeresult($result);
|
||||
return false;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET user_rank = 0
|
||||
WHERE group_id = ' . (int)$group_id . '
|
||||
AND user_rank <> 0
|
||||
AND user_rank = ' . (int)$row['group_rank'] . '
|
||||
AND ' . $db->sql_in_set('user_id', $user_ids);
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* This is used to promote (to leader), demote or set as default a member/s
|
||||
*/
|
||||
|
@ -2827,6 +2916,26 @@ function group_user_attributes($action, $group_id, $user_id_ary = false, $userna
|
|||
break;
|
||||
|
||||
case 'default':
|
||||
$sql = 'SELECT user_id, group_id FROM ' . USERS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('user_id', $user_id_ary, false, true);
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$groups = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if (!isset($groups[$row['group_id']]))
|
||||
{
|
||||
$groups[$row['group_id']] = array();
|
||||
}
|
||||
$groups[$row['group_id']][] = $row['user_id'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
foreach ($groups as $gid => $uids)
|
||||
{
|
||||
remove_default_rank($gid, $uids);
|
||||
remove_default_avatar($gid, $uids);
|
||||
}
|
||||
group_set_user_default($group_id, $user_id_ary, $group_attributes);
|
||||
$log = 'LOG_GROUP_DEFAULTS';
|
||||
break;
|
||||
|
@ -2893,7 +3002,7 @@ function group_validate_groupname($group_id, $group_name)
|
|||
*
|
||||
* @private
|
||||
*/
|
||||
function group_set_user_default($group_id, $user_id_ary, $group_attributes = false, $update_listing = false, $same_group = false)
|
||||
function group_set_user_default($group_id, $user_id_ary, $group_attributes = false, $update_listing = false)
|
||||
{
|
||||
global $db;
|
||||
|
||||
|
@ -2926,12 +3035,14 @@ function group_set_user_default($group_id, $user_id_ary, $group_attributes = fal
|
|||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
|
||||
|
||||
foreach ($attribute_ary as $attribute => $type)
|
||||
{
|
||||
if (isset($group_attributes[$attribute]))
|
||||
{
|
||||
// If we are about to set an avatar or rank, we will not overwrite with empty, unless we are not actually changing the default group
|
||||
if (!$same_group && (strpos($attribute, 'group_avatar') === 0 || strpos($attribute, 'group_rank') === 0) && !$group_attributes[$attribute])
|
||||
if ((strpos($attribute, 'group_avatar') === 0 || strpos($attribute, 'group_rank') === 0) && !$group_attributes[$attribute])
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -2957,6 +3068,12 @@ function group_set_user_default($group_id, $user_id_ary, $group_attributes = fal
|
|||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
unset($sql_ary['user_avatar_type']);
|
||||
unset($sql_ary['user_avatar_height']);
|
||||
unset($sql_ary['user_avatar_width']);
|
||||
}
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
||||
WHERE ' . $db->sql_in_set('user_id', $user_id_ary);
|
||||
|
|
|
@ -112,13 +112,15 @@ function mcp_post_details($id, $mode, $action)
|
|||
|
||||
// Process message, leave it uncensored
|
||||
$message = $post_info['post_text'];
|
||||
$message = str_replace("\n", '<br />', $message);
|
||||
|
||||
if ($post_info['bbcode_bitfield'])
|
||||
{
|
||||
include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
|
||||
$bbcode = new bbcode($post_info['bbcode_bitfield']);
|
||||
$bbcode->bbcode_second_pass($message, $post_info['bbcode_uid'], $post_info['bbcode_bitfield']);
|
||||
}
|
||||
|
||||
$message = bbcode_nl2br($message);
|
||||
$message = smiley_text($message);
|
||||
|
||||
if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id']))
|
||||
|
@ -261,8 +263,8 @@ function mcp_post_details($id, $mode, $action)
|
|||
'U_REPORTER' => ($row['user_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']) : '',
|
||||
'USER_NOTIFY' => ($row['user_notify']) ? true : false,
|
||||
'REPORT_TIME' => $user->format_date($row['report_time']),
|
||||
'REPORT_TEXT' => str_replace("\n", '<br />', trim($row['report_text'])))
|
||||
);
|
||||
'REPORT_TEXT' => bbcode_nl2br(trim($row['report_text'])),
|
||||
));
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
}
|
||||
|
|
|
@ -119,13 +119,15 @@ class mcp_queue
|
|||
|
||||
// Process message, leave it uncensored
|
||||
$message = $post_info['post_text'];
|
||||
$message = str_replace("\n", '<br />', $message);
|
||||
|
||||
if ($post_info['bbcode_bitfield'])
|
||||
{
|
||||
include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
|
||||
$bbcode = new bbcode($post_info['bbcode_bitfield']);
|
||||
$bbcode->bbcode_second_pass($message, $post_info['bbcode_uid'], $post_info['bbcode_bitfield']);
|
||||
}
|
||||
|
||||
$message = bbcode_nl2br($message);
|
||||
$message = smiley_text($message);
|
||||
|
||||
if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id']))
|
||||
|
@ -460,12 +462,12 @@ function approve_post($post_id_list, $id, $mode)
|
|||
'redirect' => $redirect)
|
||||
);
|
||||
|
||||
$post_info = get_post_data($post_id_list, 'm_approve');
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
$notify_poster = (isset($_REQUEST['notify_poster'])) ? true : false;
|
||||
|
||||
$post_info = get_post_data($post_id_list, 'm_approve');
|
||||
|
||||
// If Topic -> total_topics = total_topics+1, total_posts = total_posts+1, forum_topics = forum_topics+1, forum_posts = forum_posts+1
|
||||
// If Post -> total_posts = total_posts+1, forum_posts = forum_posts+1, topic_replies = topic_replies+1
|
||||
|
||||
|
@ -690,8 +692,23 @@ function approve_post($post_id_list, $id, $mode)
|
|||
}
|
||||
else
|
||||
{
|
||||
$show_notify = false;
|
||||
|
||||
foreach ($post_info as $post_data)
|
||||
{
|
||||
if ($post_data['poster_id'] == ANONYMOUS)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
$show_notify = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_NOTIFY_POSTER' => true,
|
||||
'S_NOTIFY_POSTER' => $show_notify,
|
||||
'S_APPROVE' => true)
|
||||
);
|
||||
|
||||
|
@ -771,9 +788,10 @@ function disapprove_post($post_id_list, $id, $mode)
|
|||
}
|
||||
}
|
||||
|
||||
$post_info = get_post_data($post_id_list, 'm_approve');
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
$post_info = get_post_data($post_id_list, 'm_approve');
|
||||
|
||||
// If Topic -> forum_topics_real -= 1
|
||||
// If Post -> topic_replies_real -= 1
|
||||
|
@ -929,8 +947,23 @@ function disapprove_post($post_id_list, $id, $mode)
|
|||
|
||||
display_reasons($reason_id);
|
||||
|
||||
$show_notify = false;
|
||||
|
||||
foreach ($post_info as $post_data)
|
||||
{
|
||||
if ($post_data['poster_id'] == ANONYMOUS)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
$show_notify = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_NOTIFY_POSTER' => true,
|
||||
'S_NOTIFY_POSTER' => $show_notify,
|
||||
'S_APPROVE' => false,
|
||||
'REASON' => $reason,
|
||||
'ADDITIONAL_MSG' => $additional_msg)
|
||||
|
|
|
@ -128,13 +128,15 @@ class mcp_reports
|
|||
|
||||
// Process message, leave it uncensored
|
||||
$message = $post_info['post_text'];
|
||||
$message = str_replace("\n", '<br />', $message);
|
||||
|
||||
if ($post_info['bbcode_bitfield'])
|
||||
{
|
||||
include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
|
||||
$bbcode = new bbcode($post_info['bbcode_bitfield']);
|
||||
$bbcode->bbcode_second_pass($message, $post_info['bbcode_uid'], $post_info['bbcode_bitfield']);
|
||||
}
|
||||
|
||||
$message = bbcode_nl2br($message);
|
||||
$message = smiley_text($message);
|
||||
|
||||
if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id']))
|
||||
|
|
|
@ -175,13 +175,13 @@ function mcp_topic_view($id, $mode, $action)
|
|||
{
|
||||
$message = $row['post_text'];
|
||||
$post_subject = ($row['post_subject'] != '') ? $row['post_subject'] : $topic_info['topic_title'];
|
||||
$message = str_replace("\n", '<br />', $message);
|
||||
|
||||
if ($row['bbcode_bitfield'])
|
||||
{
|
||||
$bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']);
|
||||
}
|
||||
|
||||
$message = bbcode_nl2br($message);
|
||||
$message = smiley_text($message);
|
||||
|
||||
if (!empty($attachments[$row['post_id']]))
|
||||
|
|
|
@ -253,8 +253,7 @@ class mcp_warn
|
|||
|
||||
// We want to make the message available here as a reminder
|
||||
// Parse the message and subject
|
||||
$message = $user_row['post_text'];
|
||||
$message = str_replace("\n", '<br />', censor_text($message));
|
||||
$message = censor_text($user_row['post_text']);
|
||||
|
||||
// Second parse bbcode here
|
||||
if ($user_row['bbcode_bitfield'])
|
||||
|
@ -265,7 +264,7 @@ class mcp_warn
|
|||
$bbcode->bbcode_second_pass($message, $user_row['bbcode_uid'], $user_row['bbcode_bitfield']);
|
||||
}
|
||||
|
||||
// Always process smilies after parsing bbcodes
|
||||
$message = bbcode_nl2br($message);
|
||||
$message = smiley_text($message);
|
||||
|
||||
// Generate the appropriate user information for the user we are looking at
|
||||
|
|
|
@ -426,10 +426,10 @@ class bbcode_firstpass extends bbcode
|
|||
}
|
||||
|
||||
$code = preg_replace('#^<span class="[a-z]+"><span class="([a-z]+)">(.*)</span></span>#s', '<span class="$1">$2</span>', $code);
|
||||
$code = preg_replace('#(?:[\n\r\s\t]| )*</span>$#u', '</span>', $code);
|
||||
$code = preg_replace('#(?:\s++| )*+</span>$#u', '</span>', $code);
|
||||
|
||||
// remove newline at the end
|
||||
if (!empty($code) && $code[strlen($code) - 1] == "\n")
|
||||
if (!empty($code) && substr($code, -1) == "\n")
|
||||
{
|
||||
$code = substr($code, 0, -1);
|
||||
}
|
||||
|
@ -1138,6 +1138,9 @@ class parse_message extends bbcode_firstpass
|
|||
$this->parse($allow_bbcode, $allow_magic_url, $allow_smilies, $this->allow_img_bbcode, $this->allow_flash_bbcode, $this->allow_quote_bbcode, $this->allow_url_bbcode, true);
|
||||
}
|
||||
|
||||
// Replace naughty words such as farty pants
|
||||
$this->message = censor_text($this->message);
|
||||
|
||||
// Parse BBcode
|
||||
if ($allow_bbcode)
|
||||
{
|
||||
|
@ -1147,11 +1150,9 @@ class parse_message extends bbcode_firstpass
|
|||
$this->bbcode_second_pass($this->message, $this->bbcode_uid);
|
||||
}
|
||||
|
||||
$this->message = bbcode_nl2br($this->message);
|
||||
$this->message = smiley_text($this->message, !$allow_smilies);
|
||||
|
||||
// Replace naughty words such as farty pants
|
||||
$this->message = str_replace("\n", '<br />', censor_text($this->message));
|
||||
|
||||
if (!$update_this_message)
|
||||
{
|
||||
unset($this->message);
|
||||
|
@ -1370,9 +1371,10 @@ class parse_message extends bbcode_firstpass
|
|||
{
|
||||
include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
|
||||
$index = (int) key($_POST['delete_file']);
|
||||
$index = array_keys(request_var('delete_file', array(0 => 0)));
|
||||
$index = (!empty($index)) ? $index[0] : false;
|
||||
|
||||
if (!empty($this->attachment_data[$index]))
|
||||
if ($index !== false && !empty($this->attachment_data[$index]))
|
||||
{
|
||||
// delete selected attachment
|
||||
if ($this->attachment_data[$index]['is_orphan'])
|
||||
|
@ -1564,7 +1566,7 @@ class parse_message extends bbcode_firstpass
|
|||
|
||||
$poll['poll_option_text'] = $this->parse($poll['enable_bbcode'], ($config['allow_post_links']) ? $poll['enable_urls'] : false, $poll['enable_smilies'], $poll['img_status'], false, false, $config['allow_post_links'], false);
|
||||
|
||||
$this->bbcode_bitfield = base64_encode(base64_decode($bbcode_bitfield) | base64_decode($this->bbcode_bitfield));
|
||||
$bbcode_bitfield = base64_encode(base64_decode($bbcode_bitfield) | base64_decode($this->bbcode_bitfield));
|
||||
$this->message = $tmp_message;
|
||||
|
||||
// Parse Poll Title
|
||||
|
|
|
@ -1190,6 +1190,7 @@ class user extends session
|
|||
var $dst;
|
||||
|
||||
var $lang_name;
|
||||
var $lang_id = false;
|
||||
var $lang_path;
|
||||
var $img_lang;
|
||||
var $img_array = array();
|
||||
|
@ -1397,7 +1398,7 @@ class user extends session
|
|||
$sql = 'SELECT image_name, image_filename, image_lang, image_height, image_width
|
||||
FROM ' . STYLES_IMAGESET_DATA_TABLE . '
|
||||
WHERE imageset_id = ' . $this->theme['imageset_id'] . "
|
||||
AND image_lang IN('" . $db->sql_escape($this->img_lang) . "', '')";
|
||||
AND image_lang IN ('" . $db->sql_escape($this->img_lang) . "', '')";
|
||||
$result = $db->sql_query($sql, 3600);
|
||||
|
||||
$localised_images = false;
|
||||
|
@ -1720,7 +1721,7 @@ class user extends session
|
|||
{
|
||||
global $config, $db;
|
||||
|
||||
if (isset($this->lang_id))
|
||||
if (!empty($this->lang_id))
|
||||
{
|
||||
return $this->lang_id;
|
||||
}
|
||||
|
@ -1734,10 +1735,10 @@ class user extends session
|
|||
FROM ' . LANG_TABLE . "
|
||||
WHERE lang_iso = '" . $db->sql_escape($this->lang_name) . "'";
|
||||
$result = $db->sql_query($sql);
|
||||
$lang_id = (int) $db->sql_fetchfield('lang_id');
|
||||
$this->lang_id = (int) $db->sql_fetchfield('lang_id');
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
return $lang_id;
|
||||
return $this->lang_id;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -149,6 +149,14 @@ class template
|
|||
{
|
||||
global $user;
|
||||
|
||||
if (defined('IN_ERROR_HANDLER'))
|
||||
{
|
||||
if ((E_NOTICE & error_reporting()) == E_NOTICE)
|
||||
{
|
||||
error_reporting(error_reporting() ^ E_NOTICE);
|
||||
}
|
||||
}
|
||||
|
||||
if ($filename = $this->_tpl_load($handle))
|
||||
{
|
||||
($include_once) ? include_once($filename) : include($filename);
|
||||
|
|
|
@ -121,7 +121,7 @@ class ucp_attachments
|
|||
$template->assign_block_vars('attachrow', array(
|
||||
'ROW_NUMBER' => $row_count + ($start + 1),
|
||||
'FILENAME' => $row['real_filename'],
|
||||
'COMMENT' => str_replace("\n", '<br />', $row['attach_comment']),
|
||||
'COMMENT' => bbcode_nl2br($row['attach_comment']),
|
||||
'EXTENSION' => $row['extension'],
|
||||
'SIZE' => ($row['filesize'] >= 1048576) ? ($row['filesize'] >> 20) . ' ' . $user->lang['MB'] : (($row['filesize'] >= 1024) ? ($row['filesize'] >> 10) . ' ' . $user->lang['KB'] : $row['filesize'] . ' ' . $user->lang['BYTES']),
|
||||
'DOWNLOAD_COUNT' => $row['download_count'],
|
||||
|
|
|
@ -320,6 +320,11 @@ function compose_pm($id, $mode, $action)
|
|||
}
|
||||
}
|
||||
|
||||
if ($action == 'post')
|
||||
{
|
||||
$template->assign_var('S_NEW_MESSAGE', true);
|
||||
}
|
||||
|
||||
if (!isset($icon_id))
|
||||
{
|
||||
$icon_id = 0;
|
||||
|
@ -976,6 +981,15 @@ function compose_pm($id, $mode, $action)
|
|||
{
|
||||
posting_gen_attachment_entry($attachment_data, $filename_data);
|
||||
}
|
||||
|
||||
// Message History
|
||||
if ($action == 'reply' || $action == 'quote' || $action == 'forward')
|
||||
{
|
||||
if (message_history($msg_id, $user->data['user_id'], $post, array(), true))
|
||||
{
|
||||
$template->assign_var('S_DISPLAY_HISTORY', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -312,8 +312,8 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
|
|||
// Remove Rule
|
||||
if (isset($_POST['delete_rule']) && !isset($_POST['cancel']))
|
||||
{
|
||||
$delete_id = array_map('intval', array_keys($_POST['delete_rule']));
|
||||
$delete_id = (int) $delete_id[0];
|
||||
$delete_id = array_keys(request_var('delete_rule', array(0 => 0)));
|
||||
$delete_id = (!empty($delete_id[0])) ? $delete_id[0] : 0;
|
||||
|
||||
if (!$delete_id)
|
||||
{
|
||||
|
|
|
@ -56,8 +56,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
|||
$user_info = get_user_information($author_id, $message_row);
|
||||
|
||||
// Parse the message and subject
|
||||
$message = $message_row['message_text'];
|
||||
$message = str_replace("\n", '<br />', censor_text($message));
|
||||
$message = censor_text($message_row['message_text']);
|
||||
|
||||
// Second parse bbcode here
|
||||
if ($message_row['bbcode_bitfield'])
|
||||
|
@ -66,6 +65,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
|||
}
|
||||
|
||||
// Always process smilies after parsing bbcodes
|
||||
$message = bbcode_nl2br($message);
|
||||
$message = smiley_text($message);
|
||||
|
||||
// Replace naughty words such as farty pants
|
||||
|
@ -142,7 +142,6 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
|||
if ($signature)
|
||||
{
|
||||
$signature = censor_text($signature);
|
||||
$signature = str_replace("\n", '<br />', censor_text($signature));
|
||||
|
||||
if ($user_info['user_sig_bbcode_bitfield'])
|
||||
{
|
||||
|
@ -155,6 +154,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
|||
$bbcode->bbcode_second_pass($signature, $user_info['user_sig_bbcode_uid'], $user_info['user_sig_bbcode_bitfield']);
|
||||
}
|
||||
|
||||
$signature = bbcode_nl2br($signature);
|
||||
$signature = smiley_text($signature);
|
||||
}
|
||||
|
||||
|
@ -230,146 +230,6 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Display Message History
|
||||
*/
|
||||
function message_history($msg_id, $user_id, $message_row, $folder)
|
||||
{
|
||||
global $db, $user, $config, $template, $phpbb_root_path, $phpEx, $auth, $bbcode;
|
||||
|
||||
// Get History Messages (could be newer)
|
||||
$sql = 'SELECT t.*, p.*, u.*
|
||||
FROM ' . PRIVMSGS_TABLE . ' p, ' . PRIVMSGS_TO_TABLE . ' t, ' . USERS_TABLE . ' u
|
||||
WHERE t.msg_id = p.msg_id
|
||||
AND p.author_id = u.user_id
|
||||
AND t.folder_id NOT IN (' . PRIVMSGS_NO_BOX . ', ' . PRIVMSGS_HOLD_BOX . ")
|
||||
AND t.user_id = $user_id";
|
||||
|
||||
if (!$message_row['root_level'])
|
||||
{
|
||||
$sql .= " AND (p.root_level = $msg_id OR (p.root_level = 0 AND p.msg_id = $msg_id))";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql .= " AND (p.root_level = " . $message_row['root_level'] . ' OR p.msg_id = ' . $message_row['root_level'] . ')';
|
||||
}
|
||||
$sql .= ' ORDER BY p.message_time DESC';
|
||||
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
|
||||
if (!$row)
|
||||
{
|
||||
$db->sql_freeresult($result);
|
||||
return false;
|
||||
}
|
||||
|
||||
$rowset = array();
|
||||
$bbcode_bitfield = '';
|
||||
$folder_url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm') . '&folder=';
|
||||
|
||||
do
|
||||
{
|
||||
$folder_id = (int) $row['folder_id'];
|
||||
|
||||
$row['folder'][] = (isset($folder[$folder_id])) ? '<a href="' . $folder_url . $folder_id . '">' . $folder[$folder_id]['folder_name'] . '</a>' : $user->lang['UNKNOWN_FOLDER'];
|
||||
|
||||
if (isset($rowset[$row['msg_id']]))
|
||||
{
|
||||
$rowset[$row['msg_id']]['folder'][] = (isset($folder[$folder_id])) ? '<a href="' . $folder_url . $folder_id . '">' . $folder[$folder_id]['folder_name'] . '</a>' : $user->lang['UNKNOWN_FOLDER'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$rowset[$row['msg_id']] = $row;
|
||||
$bbcode_bitfield = $bbcode_bitfield | base64_decode($row['bbcode_bitfield']);
|
||||
}
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$title = $row['message_subject'];
|
||||
|
||||
if (sizeof($rowset) == 1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Instantiate BBCode class
|
||||
if ((empty($bbcode) || $bbcode === false) && $bbcode_bitfield !== '')
|
||||
{
|
||||
if (!class_exists('bbcode'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
|
||||
}
|
||||
$bbcode = new bbcode(base64_encode($bbcode_bitfield));
|
||||
}
|
||||
|
||||
$title = censor_text($title);
|
||||
|
||||
$url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm');
|
||||
$next_history_pm = $previous_history_pm = $prev_id = 0;
|
||||
|
||||
foreach ($rowset as $id => $row)
|
||||
{
|
||||
$author_id = $row['author_id'];
|
||||
$folder_id = (int) $row['folder_id'];
|
||||
|
||||
$subject = $row['message_subject'];
|
||||
$message = $row['message_text'];
|
||||
|
||||
$message = censor_text($message);
|
||||
$message = str_replace("\n", '<br />', $message);
|
||||
|
||||
if ($row['bbcode_bitfield'])
|
||||
{
|
||||
$bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']);
|
||||
}
|
||||
|
||||
$message = smiley_text($message, !$row['enable_smilies']);
|
||||
|
||||
$subject = censor_text($subject);
|
||||
|
||||
if ($id == $msg_id)
|
||||
{
|
||||
$next_history_pm = next($rowset);
|
||||
$next_history_pm = (sizeof($next_history_pm)) ? (int) $next_history_pm['msg_id'] : 0;
|
||||
$previous_history_pm = $prev_id;
|
||||
}
|
||||
|
||||
$template->assign_block_vars('history_row', array(
|
||||
'MESSAGE_AUTHOR_FULL' => get_username_string('full', $author_id, $row['username'], $row['user_colour'], $row['username']),
|
||||
'MESSAGE_AUTHOR_COLOUR' => get_username_string('colour', $author_id, $row['username'], $row['user_colour'], $row['username']),
|
||||
'MESSAGE_AUTHOR' => get_username_string('username', $author_id, $row['username'], $row['user_colour'], $row['username']),
|
||||
'U_MESSAGE_AUTHOR' => get_username_string('profile', $author_id, $row['username'], $row['user_colour'], $row['username']),
|
||||
|
||||
'SUBJECT' => $subject,
|
||||
'SENT_DATE' => $user->format_date($row['message_time']),
|
||||
'MESSAGE' => $message,
|
||||
'FOLDER' => implode(', ', $row['folder']),
|
||||
|
||||
'S_CURRENT_MSG' => ($row['msg_id'] == $msg_id),
|
||||
'S_AUTHOR_DELETED' => ($author_id == ANONYMOUS) ? true : false,
|
||||
|
||||
'MSG_ID' => $row['msg_id'],
|
||||
'U_VIEW_MESSAGE' => "$url&f=$folder_id&p=" . $row['msg_id'],
|
||||
'U_QUOTE' => ($auth->acl_get('u_sendpm') && $author_id != ANONYMOUS && $author_id != $user->data['user_id']) ? "$url&mode=compose&action=quote&f=" . $folder_id . "&p=" . $row['msg_id'] : '',
|
||||
'U_POST_REPLY_PM' => ($author_id != $user->data['user_id'] && $author_id != ANONYMOUS && $auth->acl_get('u_sendpm')) ? "$url&mode=compose&action=reply&f=$folder_id&p=" . $row['msg_id'] : '')
|
||||
);
|
||||
unset($rowset[$id]);
|
||||
$prev_id = $id;
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'QUOTE_IMG' => $user->img('icon_post_quote', $user->lang['REPLY_WITH_QUOTE']),
|
||||
'TITLE' => $title,
|
||||
|
||||
'U_VIEW_NEXT_HISTORY' => "$url&p=" . (($next_history_pm) ? $next_history_pm : $msg_id),
|
||||
'U_VIEW_PREVIOUS_HISTORY' => "$url&p=" . (($previous_history_pm) ? $previous_history_pm : $msg_id))
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user information (only for message display)
|
||||
*/
|
||||
|
|
|
@ -427,8 +427,10 @@ class ucp_register
|
|||
$str = '';
|
||||
if (!$change_lang)
|
||||
{
|
||||
$sql = 'SELECT session_id
|
||||
FROM ' . SESSIONS_TABLE;
|
||||
$sql = 'SELECT DISTINCT c.session_id
|
||||
FROM ' . CONFIRM_TABLE . ' c
|
||||
LEFT JOIN ' . SESSIONS_TABLE . ' s ON (c.session_id = s.session_id)
|
||||
WHERE s.session_id IS NULL';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
if ($row = $db->sql_fetchrow($result))
|
||||
|
@ -443,7 +445,7 @@ class ucp_register
|
|||
if (sizeof($sql_in))
|
||||
{
|
||||
$sql = 'DELETE FROM ' . CONFIRM_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('session_id', $sql_in, true) . '
|
||||
WHERE ' . $db->sql_in_set('session_id', $sql_in) . '
|
||||
AND confirm_type = ' . CONFIRM_REG;
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @package utf
|
||||
* @version $Id$
|
||||
* @copyright (c) 2005 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
|
@ -57,7 +57,7 @@ define('UNICODE_JAMO_T', 2);
|
|||
/**
|
||||
* Unicode normalization routines
|
||||
*
|
||||
* @package phpBB3
|
||||
* @package utf
|
||||
*/
|
||||
class utf_normalizer
|
||||
{
|
||||
|
@ -89,6 +89,12 @@ class utf_normalizer
|
|||
include($phpbb_root_path . 'includes/utf/data/utf_nfc_qc.' . $phpEx);
|
||||
}
|
||||
|
||||
if (!isset($GLOBALS['utf_canonical_decomp']))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include($phpbb_root_path . 'includes/utf/data/utf_canonical_decomp.' . $phpEx);
|
||||
}
|
||||
|
||||
// Replace any byte in the range 0x00..0x1F, except for \r, \n and \t
|
||||
// We replace those characters with a 0xFF byte, which is illegal in UTF-8 and will in turn be replaced with a UTF replacement char
|
||||
$str = strtr(
|
||||
|
@ -123,6 +129,12 @@ class utf_normalizer
|
|||
include($phpbb_root_path . 'includes/utf/data/utf_nfc_qc.' . $phpEx);
|
||||
}
|
||||
|
||||
if (!isset($GLOBALS['utf_canonical_decomp']))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include($phpbb_root_path . 'includes/utf/data/utf_canonical_decomp.' . $phpEx);
|
||||
}
|
||||
|
||||
$str = utf_normalizer::recompose($str, $pos, $len, $GLOBALS['utf_nfc_qc'], $GLOBALS['utf_canonical_decomp']);
|
||||
}
|
||||
|
||||
|
@ -149,10 +161,10 @@ class utf_normalizer
|
|||
include($phpbb_root_path . 'includes/utf/data/utf_nfkc_qc.' . $phpEx);
|
||||
}
|
||||
|
||||
if (!isset($GLOBALS['utf_canonical_comp']))
|
||||
if (!isset($GLOBALS['utf_compatibility_decomp']))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include($phpbb_root_path . 'includes/utf/data/utf_canonical_comp.' . $phpEx);
|
||||
include($phpbb_root_path . 'includes/utf/data/utf_compatibility_decomp.' . $phpEx);
|
||||
}
|
||||
|
||||
$str = utf_normalizer::recompose($str, $pos, $len, $GLOBALS['utf_nfkc_qc'], $GLOBALS['utf_compatibility_decomp']);
|
||||
|
@ -234,6 +246,13 @@ class utf_normalizer
|
|||
include($phpbb_root_path . 'includes/utf/data/utf_normalizer_common.' . $phpEx);
|
||||
}
|
||||
|
||||
// Load the canonical composition table
|
||||
if (!isset($utf_canonical_comp))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include($phpbb_root_path . 'includes/utf/data/utf_canonical_comp.' . $phpEx);
|
||||
}
|
||||
|
||||
// Buffer the last ASCII char before the UTF-8 stuff if applicable
|
||||
$tmp = '';
|
||||
$i = $tmp_pos = $last_cc = 0;
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @package utf
|
||||
* @version $Id$
|
||||
* @copyright (c) 2006 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
* @todo make sure the replacements are called correctly
|
||||
* already done: strtolower, strtoupper, ucfirst, str_split, strrpos, strlen (hopefully!), strpos, substr, htmlspecialchars
|
||||
* remaining: strspn, chr, ord
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -27,7 +24,7 @@ setlocale(LC_CTYPE, 'C');
|
|||
* Whenever possible, these functions will try to use PHP's built-in functions or
|
||||
* extensions, otherwise they will default to custom routines.
|
||||
*
|
||||
* @package phpBB3
|
||||
* @package utf
|
||||
*/
|
||||
|
||||
if (!extension_loaded('xml'))
|
||||
|
@ -621,7 +618,7 @@ else
|
|||
* @author Harry Fuecks
|
||||
* @param string $str UTF-8 encoded
|
||||
* @param int $split_len number to characters to split string by
|
||||
* @return string characters in string reverses
|
||||
* @return array characters in string reverses
|
||||
*/
|
||||
function utf8_str_split($str, $split_len = 1)
|
||||
{
|
||||
|
@ -911,8 +908,8 @@ function utf8_recode($string, $encoding)
|
|||
}
|
||||
|
||||
// Trigger an error?! Fow now just give bad data :-(
|
||||
//trigger_error('Unknown encoding: ' . $encoding, E_USER_ERROR);
|
||||
return $string;
|
||||
trigger_error('Unknown encoding: ' . $encoding, E_USER_ERROR);
|
||||
//return $string; // use utf_normalizer::cleanup() ?
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1864,4 +1861,57 @@ function utf8_convert_message($message)
|
|||
return utf8_htmlspecialchars(utf8_recode($message, 'ISO-8859-1'));
|
||||
}
|
||||
|
||||
/**
|
||||
* UTF8-compatible wordwrap replacement
|
||||
*
|
||||
* @param string $string The input string
|
||||
* @param int $width The column width. Defaults to 75.
|
||||
* @param string $break The line is broken using the optional break parameter. Defaults to '\n'.
|
||||
* @param bool $cut If the cut is set to TRUE, the string is always wrapped at the specified width. So if you have a word that is larger than the given width, it is broken apart.
|
||||
*
|
||||
* @return string the given string wrapped at the specified column.
|
||||
*
|
||||
*/
|
||||
function utf8_wordwrap($string, $width = 75, $break = "\n", $cut = false)
|
||||
{
|
||||
// We first need to explode on $break, not destroying existing (intended) breaks
|
||||
$lines = explode($break, $string);
|
||||
$new_lines = array(0 => '');
|
||||
$index = 0;
|
||||
|
||||
foreach ($lines as $line)
|
||||
{
|
||||
$words = explode(' ', $line);
|
||||
|
||||
for ($i = 0, $size = sizeof($words); $i < $size; $i++)
|
||||
{
|
||||
$word = $words[$i];
|
||||
|
||||
// If cut is true we need to cut the word if it is > width chars
|
||||
if ($cut && utf8_strlen($word) > $width)
|
||||
{
|
||||
$words[$i] = utf8_substr($word, $width);
|
||||
$word = utf8_substr($word, 0, $width);
|
||||
$i--;
|
||||
}
|
||||
|
||||
if (utf8_strlen($new_lines[$index] . $word) > $width)
|
||||
{
|
||||
$new_lines[$index] = substr($new_lines[$index], 0, -1);
|
||||
$index++;
|
||||
$new_lines[$index] = '';
|
||||
}
|
||||
|
||||
$new_lines[$index] .= $word . ' ';
|
||||
}
|
||||
|
||||
$new_lines[$index] = substr($new_lines[$index], 0, -1);
|
||||
$index++;
|
||||
$new_lines[$index] = '';
|
||||
}
|
||||
|
||||
unset($new_lines[$index]);
|
||||
return implode($break, $new_lines);
|
||||
}
|
||||
|
||||
?>
|
|
@ -31,7 +31,7 @@ unset($dbpasswd);
|
|||
*/
|
||||
$convertor_data = array(
|
||||
'forum_name' => 'phpBB 2.0.x',
|
||||
'version' => '1.0.RC4',
|
||||
'version' => '1.0.RC5',
|
||||
'phpbb_version' => '3.0.0',
|
||||
'author' => '<a href="http://www.phpbb.com/">phpBB Group</a>',
|
||||
'dbms' => $dbms,
|
||||
|
|
|
@ -587,7 +587,7 @@ function phpbb_convert_authentication($mode)
|
|||
$forum_access = array();
|
||||
while ($row = $src_db->sql_fetchrow($result))
|
||||
{
|
||||
$forum_access[] = $row;
|
||||
$forum_access[$row['forum_id']] = $row;
|
||||
}
|
||||
$src_db->sql_freeresult($result);
|
||||
|
||||
|
@ -967,6 +967,12 @@ function phpbb_convert_authentication($mode)
|
|||
{
|
||||
// And now the moderators
|
||||
// We make sure that they have at least standard access to the forums they moderate in addition to the moderating permissions
|
||||
|
||||
$mod_post_map = array(
|
||||
'auth_announce' => 'f_announce',
|
||||
'auth_sticky' => 'f_sticky'
|
||||
);
|
||||
|
||||
foreach ($user_access as $forum_id => $access_map)
|
||||
{
|
||||
$forum_id = (int) $forum_id;
|
||||
|
@ -977,6 +983,13 @@ function phpbb_convert_authentication($mode)
|
|||
{
|
||||
mass_auth('user_role', $forum_id, (int) phpbb_user_id($access['user_id']), 'MOD_STANDARD');
|
||||
mass_auth('user_role', $forum_id, (int) phpbb_user_id($access['user_id']), 'FORUM_STANDARD');
|
||||
foreach ($mod_post_map as $old => $new)
|
||||
{
|
||||
if (isset($forum_access[$forum_id]) && isset($forum_access[$forum_id][$old]) && $forum_access[$forum_id][$old] == AUTH_MOD)
|
||||
{
|
||||
mass_auth('user', $forum_id, (int) phpbb_user_id($access['user_id']), $new, ACL_YES);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -991,6 +1004,13 @@ function phpbb_convert_authentication($mode)
|
|||
{
|
||||
mass_auth('group_role', $forum_id, (int) $access['group_id'], 'MOD_STANDARD');
|
||||
mass_auth('group_role', $forum_id, (int) $access['group_id'], 'FORUM_STANDARD');
|
||||
foreach ($mod_post_map as $old => $new)
|
||||
{
|
||||
if (isset($forum_access[$forum_id]) && isset($forum_access[$forum_id][$old]) && $forum_access[$forum_id][$old] == AUTH_MOD)
|
||||
{
|
||||
mass_auth('group', $forum_id, (int) $access['group_id'], $new, ACL_YES);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -621,7 +621,7 @@ function utf8_new_case_fold_nfkc($text, $option = 'full')
|
|||
}
|
||||
|
||||
// convert to NFKC
|
||||
utf_normalizer::nfkc($text);
|
||||
utf_new_normalizer::nfkc($text);
|
||||
|
||||
// FC_NFKC_Closure, http://www.unicode.org/Public/5.0.0/ucd/DerivedNormalizationProps.txt
|
||||
$text = strtr($text, $fc_nfkc_closure);
|
||||
|
|
181
phpBB/install/data/new_normalizer.php
Normal file
181
phpBB/install/data/new_normalizer.php
Normal file
|
@ -0,0 +1,181 @@
|
|||
<?php
|
||||
|
||||
|
||||
/**
|
||||
* A wrapper function for the normalizer which takes care of including the class if required and modifies the passed strings
|
||||
* to be in NFC (Normalization Form Composition).
|
||||
*
|
||||
* @param mixed $strings a string or an array of strings to normalize
|
||||
* @return mixed the normalized content, preserving array keys if array given.
|
||||
*/
|
||||
function utf8_new_normalize_nfc($strings)
|
||||
{
|
||||
if (empty($strings))
|
||||
{
|
||||
return $strings;
|
||||
}
|
||||
|
||||
if (!is_array($strings))
|
||||
{
|
||||
utf_new_normalizer::nfc($strings);
|
||||
}
|
||||
else if (is_array($strings))
|
||||
{
|
||||
foreach ($strings as $key => $string)
|
||||
{
|
||||
if (is_array($string))
|
||||
{
|
||||
foreach ($string as $_key => $_string)
|
||||
{
|
||||
utf_new_normalizer::nfc($strings[$key][$_key]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
utf_new_normalizer::nfc($strings[$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $strings;
|
||||
}
|
||||
|
||||
class utf_new_normalizer
|
||||
{
|
||||
/**
|
||||
* Validate, cleanup and normalize a string
|
||||
*
|
||||
* The ultimate convenience function! Clean up invalid UTF-8 sequences,
|
||||
* and convert to Normal Form C, canonical composition.
|
||||
*
|
||||
* @param string &$str The dirty string
|
||||
* @return string The same string, all shiny and cleaned-up
|
||||
*/
|
||||
function cleanup(&$str)
|
||||
{
|
||||
// The string below is the list of all autorized characters, sorted by frequency in latin text
|
||||
$pos = strspn($str, "\x20\x65\x69\x61\x73\x6E\x74\x72\x6F\x6C\x75\x64\x5D\x5B\x63\x6D\x70\x27\x0A\x67\x7C\x68\x76\x2E\x66\x62\x2C\x3A\x3D\x2D\x71\x31\x30\x43\x32\x2A\x79\x78\x29\x28\x4C\x39\x41\x53\x2F\x50\x22\x45\x6A\x4D\x49\x6B\x33\x3E\x35\x54\x3C\x44\x34\x7D\x42\x7B\x38\x46\x77\x52\x36\x37\x55\x47\x4E\x3B\x4A\x7A\x56\x23\x48\x4F\x57\x5F\x26\x21\x4B\x3F\x58\x51\x25\x59\x5C\x09\x5A\x2B\x7E\x5E\x24\x40\x60\x7F\x0D");
|
||||
$len = strlen($str);
|
||||
|
||||
if ($pos == $len)
|
||||
{
|
||||
// ASCII strings with no special chars return immediately
|
||||
return;
|
||||
}
|
||||
|
||||
// Note: we do not check for $GLOBALS['utf_canonical_decomp']. It is assumed they are always loaded together
|
||||
if (!isset($GLOBALS['utf_nfc_qc']))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include($phpbb_root_path . 'includes/utf/data/utf_nfc_qc.' . $phpEx);
|
||||
}
|
||||
|
||||
if (!isset($GLOBALS['utf_canonical_decomp']))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include($phpbb_root_path . 'includes/utf/data/utf_canonical_decomp.' . $phpEx);
|
||||
}
|
||||
|
||||
// Replace any byte in the range 0x00..0x1F, except for \r, \n and \t
|
||||
// We replace those characters with a 0xFF byte, which is illegal in UTF-8 and will in turn be replaced with a UTF replacement char
|
||||
$str = strtr(
|
||||
$str,
|
||||
"\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F",
|
||||
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
||||
);
|
||||
|
||||
$str = utf_new_normalizer::recompose($str, $pos, $len, $GLOBALS['utf_nfc_qc'], $GLOBALS['utf_canonical_decomp']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate and normalize a UTF string to NFC
|
||||
*
|
||||
* @param string &$str Unchecked UTF string
|
||||
* @return string The string, validated and in normal form
|
||||
*/
|
||||
function nfc(&$str)
|
||||
{
|
||||
$pos = strspn($str, UTF8_ASCII_RANGE);
|
||||
$len = strlen($str);
|
||||
|
||||
if ($pos == $len)
|
||||
{
|
||||
// ASCII strings return immediately
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isset($GLOBALS['utf_nfc_qc']))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include($phpbb_root_path . 'includes/utf/data/utf_nfc_qc.' . $phpEx);
|
||||
}
|
||||
|
||||
if (!isset($GLOBALS['utf_canonical_decomp']))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include($phpbb_root_path . 'includes/utf/data/utf_canonical_decomp.' . $phpEx);
|
||||
}
|
||||
|
||||
$str = utf_new_normalizer::recompose($str, $pos, $len, $GLOBALS['utf_nfc_qc'], $GLOBALS['utf_canonical_decomp']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate and normalize a UTF string to NFKC
|
||||
*
|
||||
* @param string &$str Unchecked UTF string
|
||||
* @return string The string, validated and in normal form
|
||||
*/
|
||||
function nfkc(&$str)
|
||||
{
|
||||
$pos = strspn($str, UTF8_ASCII_RANGE);
|
||||
$len = strlen($str);
|
||||
|
||||
if ($pos == $len)
|
||||
{
|
||||
// ASCII strings return immediately
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isset($GLOBALS['utf_nfkc_qc']))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include($phpbb_root_path . 'includes/utf/data/utf_nfkc_qc.' . $phpEx);
|
||||
}
|
||||
|
||||
if (!isset($GLOBALS['utf_compatibility_decomp']))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include($phpbb_root_path . 'includes/utf/data/utf_compatibility_decomp.' . $phpEx);
|
||||
}
|
||||
|
||||
$str = utf_new_normalizer::recompose($str, $pos, $len, $GLOBALS['utf_nfkc_qc'], $GLOBALS['utf_compatibility_decomp']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Recompose a UTF string
|
||||
*
|
||||
* @param string $str Unchecked UTF string
|
||||
* @param integer $pos Position of the first UTF char (in bytes)
|
||||
* @param integer $len Length of the string (in bytes)
|
||||
* @param array &$qc Quick-check array, passed by reference but never modified
|
||||
* @param array &$decomp_map Decomposition mapping, passed by reference but never modified
|
||||
* @return string The string, validated and recomposed
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
function recompose($str, $pos, $len, &$qc, &$decomp_map)
|
||||
{
|
||||
global $utf_canonical_comp;
|
||||
|
||||
// Load the canonical composition table
|
||||
if (!isset($utf_canonical_comp))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include($phpbb_root_path . 'includes/utf/data/utf_canonical_comp.' . $phpEx);
|
||||
}
|
||||
|
||||
return utf_normalizer::recompose($str, $pos, $len, $qc, $decomp_map);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
$updates_to_version = '3.0.RC4';
|
||||
$updates_to_version = '3.0.RC5';
|
||||
|
||||
// Return if we "just include it" to find out for which version the database update is responsuble for
|
||||
if (defined('IN_PHPBB') && defined('IN_INSTALL'))
|
||||
|
@ -387,6 +387,43 @@ $database_update_info = array(
|
|||
),
|
||||
),
|
||||
),
|
||||
// Changes from 3.0.RC4 to the next version
|
||||
'3.0.RC4' => array(
|
||||
// Change the following columns
|
||||
'change_columns' => array(
|
||||
STYLES_TABLE => array(
|
||||
'style_id' => array('USINT', NULL, 'auto_increment'),
|
||||
'template_id' => array('USINT', 0),
|
||||
'theme_id' => array('USINT', 0),
|
||||
'imageset_id' => array('USINT', 0),
|
||||
),
|
||||
STYLES_TEMPLATE_TABLE => array(
|
||||
'template_id' => array('USINT', NULL, 'auto_increment'),
|
||||
),
|
||||
STYLES_TEMPLATE_DATA_TABLE => array(
|
||||
'template_id' => array('USINT', 0),
|
||||
),
|
||||
STYLES_THEME_TABLE => array(
|
||||
'theme_id' => array('USINT', NULL, 'auto_increment'),
|
||||
),
|
||||
STYLES_IMAGESET_TABLE => array(
|
||||
'imageset_id' => array('USINT', NULL, 'auto_increment'),
|
||||
),
|
||||
STYLES_IMAGESET_DATA_TABLE => array(
|
||||
'imageset_id' => array('USINT', 0),
|
||||
),
|
||||
USERS_TABLE => array(
|
||||
'user_style' => array('USINT', 0),
|
||||
),
|
||||
FORUMS_TABLE => array(
|
||||
'forum_style' => array('USINT', 0),
|
||||
),
|
||||
GROUPS_TABLE => array(
|
||||
'group_avatar_width' => array('USINT', 0),
|
||||
'group_avatar_height' => array('USINT', 0),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
// Determine mapping database type
|
||||
|
@ -473,7 +510,7 @@ while ($row = $db->sql_fetchrow($result))
|
|||
$db->sql_freeresult($result);
|
||||
|
||||
echo $lang['PREVIOUS_VERSION'] . ' :: <strong>' . $config['version'] . '</strong><br />';
|
||||
echo $lang['UPDATED_VERSION'] . ' :: <strong>' . $updates_to_version . '</strong>';
|
||||
echo $lang['UPDATED_VERSION'] . ' :: <strong>' . $updates_to_version . '</strong></p>';
|
||||
|
||||
$current_version = str_replace('rc', 'RC', strtolower($config['version']));
|
||||
$latest_version = str_replace('rc', 'RC', strtolower($updates_to_version));
|
||||
|
@ -495,7 +532,7 @@ else
|
|||
|
||||
// Checks/Operations that have to be completed prior to starting the update itself
|
||||
$exit = false;
|
||||
if (version_compare($current_version, '3.0.RC3', '<='))
|
||||
if (version_compare($current_version, '3.0.RC4', '<='))
|
||||
{
|
||||
// Define missing language entries...
|
||||
if (!isset($lang['CLEANING_USERNAMES']))
|
||||
|
@ -517,7 +554,7 @@ if (version_compare($current_version, '3.0.RC3', '<='))
|
|||
));
|
||||
}
|
||||
?>
|
||||
</p><br /><br />
|
||||
<br /><br />
|
||||
|
||||
<h1><?php echo $lang['CLEANING_USERNAMES']; ?></h1>
|
||||
|
||||
|
@ -530,6 +567,16 @@ if (version_compare($current_version, '3.0.RC3', '<='))
|
|||
$modify_users = request_var('modify_users', array(0 => ''));
|
||||
$new_usernames = request_var('new_usernames', array(0 => ''), true);
|
||||
|
||||
if (!class_exists('utf_new_normalizer'))
|
||||
{
|
||||
if (!file_exists($phpbb_root_path . 'install/data/new_normalizer.' . $phpEx))
|
||||
{
|
||||
global $lang;
|
||||
trigger_error(sprintf($lang['UPDATE_REQUIRES_FILE'], $phpbb_root_path . 'install/data/new_normalizer.' . $phpEx), E_USER_ERROR);
|
||||
}
|
||||
include($phpbb_root_path . 'install/data/new_normalizer.' . $phpEx);
|
||||
}
|
||||
|
||||
// the admin decided to change some usernames
|
||||
if (sizeof($modify_users) && $submit)
|
||||
{
|
||||
|
@ -564,7 +611,7 @@ if (version_compare($current_version, '3.0.RC3', '<='))
|
|||
case 'edit':
|
||||
if (isset($new_usernames[$user_id]))
|
||||
{
|
||||
$data = array('username' => utf8_normalize_nfc($new_usernames[$user_id]));
|
||||
$data = array('username' => utf8_new_normalize_nfc($new_usernames[$user_id]));
|
||||
// Need to update config, forum, topic, posting, messages, etc.
|
||||
if ($data['username'] != $row['username'])
|
||||
{
|
||||
|
@ -720,6 +767,8 @@ if (version_compare($current_version, '3.0.RC3', '<='))
|
|||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
_write_result(false, $errored, $error_ary);
|
||||
|
||||
// now retrieve all information about the users and let the admin decide what to do
|
||||
if (sizeof($colliding_users))
|
||||
{
|
||||
|
@ -775,7 +824,7 @@ if (version_compare($current_version, '3.0.RC3', '<='))
|
|||
// for the admin: keep name, change name (with text input) or delete user
|
||||
$u_action = "database_update.$phpEx?language=$language&type=$inline_update";
|
||||
?>
|
||||
</strong></p><br /><br />
|
||||
<br /><br />
|
||||
|
||||
<p><?php echo $lang['CHANGE_CLEAN_NAMES']; ?></p>
|
||||
<form id="change_clean_names" method="post" action="<?php echo $u_action; ?>">
|
||||
|
@ -939,7 +988,7 @@ if ($exit)
|
|||
|
||||
// Schema updates
|
||||
?>
|
||||
</p><br /><br />
|
||||
<br /><br />
|
||||
|
||||
<h1><?php echo $lang['UPDATE_DATABASE_SCHEMA']; ?></h1>
|
||||
|
||||
|
@ -1253,6 +1302,206 @@ if (version_compare($current_version, '3.0.RC3', '<='))
|
|||
$no_updates = false;
|
||||
}
|
||||
|
||||
if (version_compare($current_version, '3.0.RC4', '<='))
|
||||
{
|
||||
$update_auto_increment = array(
|
||||
STYLES_TABLE => 'style_id',
|
||||
STYLES_TEMPLATE_TABLE => 'template_id',
|
||||
STYLES_THEME_TABLE => 'theme_id',
|
||||
STYLES_IMAGESET_TABLE => 'imageset_id'
|
||||
);
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . STYLES_TABLE . '
|
||||
WHERE style_id = 0';
|
||||
$result = _sql($sql, $errored, $error_ary);
|
||||
$bad_style_row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($bad_style_row)
|
||||
{
|
||||
$sql = 'SELECT MAX(style_id) as max_id
|
||||
FROM ' . STYLES_TABLE;
|
||||
$result = _sql($sql, $errored, $error_ary);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$proper_id = $row['max_id'] + 1;
|
||||
|
||||
_sql('UPDATE ' . STYLES_TABLE . " SET style_id = $proper_id WHERE style_id = 0", $errored, $error_ary);
|
||||
_sql('UPDATE ' . FORUMS_TABLE . " SET forum_style = $proper_id WHERE forum_style = 0", $errored, $error_ary);
|
||||
_sql('UPDATE ' . USERS_TABLE . " SET user_style = $proper_id WHERE user_style = 0", $errored, $error_ary);
|
||||
|
||||
$sql = 'SELECT config_value
|
||||
FROM ' . CONFIG_TABLE . "
|
||||
WHERE config_name = 'default_style'";
|
||||
$result = _sql($sql, $errored, $error_ary);
|
||||
$style_config = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($style_config['config_value'] === '0')
|
||||
{
|
||||
set_config('default_style', (string) $proper_id);
|
||||
}
|
||||
}
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . STYLES_TEMPLATE_TABLE . '
|
||||
WHERE template_id = 0';
|
||||
$result = _sql($sql, $errored, $error_ary);
|
||||
$bad_style_row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($bad_style_row)
|
||||
{
|
||||
$sql = 'SELECT MAX(template_id) as max_id
|
||||
FROM ' . STYLES_TEMPLATE_TABLE;
|
||||
$result = _sql($sql, $errored, $error_ary);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$proper_id = $row['max_id'] + 1;
|
||||
|
||||
_sql('UPDATE ' . STYLES_TABLE . " SET template_id = $proper_id WHERE template_id = 0", $errored, $error_ary);
|
||||
}
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . STYLES_THEME_TABLE . '
|
||||
WHERE theme_id = 0';
|
||||
$result = _sql($sql, $errored, $error_ary);
|
||||
$bad_style_row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($bad_style_row)
|
||||
{
|
||||
$sql = 'SELECT MAX(theme_id) as max_id
|
||||
FROM ' . STYLES_THEME_TABLE;
|
||||
$result = _sql($sql, $errored, $error_ary);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$proper_id = $row['max_id'] + 1;
|
||||
|
||||
_sql('UPDATE ' . STYLES_TABLE . " SET theme_id = $proper_id WHERE theme_id = 0", $errored, $error_ary);
|
||||
}
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . STYLES_IMAGESET_TABLE . '
|
||||
WHERE imageset_id = 0';
|
||||
$result = _sql($sql, $errored, $error_ary);
|
||||
$bad_style_row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($bad_style_row)
|
||||
{
|
||||
$sql = 'SELECT MAX(imageset_id) as max_id
|
||||
FROM ' . STYLES_IMAGESET_TABLE;
|
||||
$result = _sql($sql, $errored, $error_ary);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$proper_id = $row['max_id'] + 1;
|
||||
|
||||
_sql('UPDATE ' . STYLES_TABLE . " SET imageset_id = $proper_id WHERE imageset_id = 0", $errored, $error_ary);
|
||||
_sql('UPDATE ' . STYLES_IMAGESET_DATA_TABLE . " SET imageset_id = $proper_id WHERE imageset_id = 0", $errored, $error_ary);
|
||||
}
|
||||
|
||||
if ($map_dbms == 'mysql_40' || $map_dbms == 'mysql_41')
|
||||
{
|
||||
foreach ($update_auto_increment as $auto_table_name => $auto_column_name)
|
||||
{
|
||||
$sql = "SELECT MAX({$auto_column_name}) as max_id
|
||||
FROM {$auto_table_name}";
|
||||
$result = _sql($sql, $errored, $error_ary);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$max_id = ((int) $row['max_id']) + 1;
|
||||
_sql("ALTER TABLE {$auto_table_name} AUTO_INCREMENT = {$max_id}", $errored, $error_ary);
|
||||
}
|
||||
|
||||
$no_updates = false;
|
||||
}
|
||||
else if ($map_dbms == 'postgres')
|
||||
{
|
||||
foreach ($update_auto_increment as $auto_table_name => $auto_column_name)
|
||||
{
|
||||
$sql = "SELECT SETVAL('" . $auto_table_name . "_seq',(select case when max({$auto_column_name})>0 then max({$auto_column_name})+1 else 1 end from " . $auto_table_name . '));';
|
||||
_sql($sql, $errored, $error_ary);
|
||||
}
|
||||
|
||||
$sql = 'DROP SEQUENCE ' . STYLES_TEMPLATE_DATA_TABLE . '_seq';
|
||||
_sql($sql, $errored, $error_ary);
|
||||
}
|
||||
else if ($map_dbms == 'firebird')
|
||||
{
|
||||
$sql = 'DROP TRIGGER t_' . STYLES_TEMPLATE_DATA_TABLE;
|
||||
_sql($sql, $errored, $error_ary);
|
||||
|
||||
$sql = 'DROP GENERATOR ' . STYLES_TEMPLATE_DATA_TABLE . '_gen';
|
||||
_sql($sql, $errored, $error_ary);
|
||||
}
|
||||
else if ($map_dbms == 'oracle')
|
||||
{
|
||||
$sql = 'DROP TRIGGER t_' . STYLES_TEMPLATE_DATA_TABLE;
|
||||
_sql($sql, $errored, $error_ary);
|
||||
|
||||
$sql = 'DROP SEQUENCE ' . STYLES_TEMPLATE_DATA_TABLE . '_seq';
|
||||
_sql($sql, $errored, $error_ary);
|
||||
}
|
||||
else if ($map_dbms == 'mssql')
|
||||
{
|
||||
// we use transactions because we need to have a working DB at the end of all of this
|
||||
$db->sql_transaction('begin');
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . STYLES_TEMPLATE_DATA_TABLE;
|
||||
$result = _sql($sql, $errored, $error_ary);
|
||||
$old_style_rows = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$old_style_rows[] = $row;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// death to the table, it is evil!
|
||||
$sql = 'DROP TABLE ' . STYLES_TEMPLATE_DATA_TABLE;
|
||||
_sql($sql, $errored, $error_ary);
|
||||
|
||||
// the table of awesomeness, praise be to it (or something)
|
||||
$sql = 'CREATE TABLE [' . STYLES_TEMPLATE_DATA_TABLE . "] (
|
||||
[template_id] [int] DEFAULT (0) NOT NULL ,
|
||||
[template_filename] [varchar] (100) DEFAULT ('') NOT NULL ,
|
||||
[template_included] [varchar] (8000) DEFAULT ('') NOT NULL ,
|
||||
[template_mtime] [int] DEFAULT (0) NOT NULL ,
|
||||
[template_data] [text] DEFAULT ('') NOT NULL
|
||||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]";
|
||||
_sql($sql, $errored, $error_ary);
|
||||
|
||||
// index? index
|
||||
$sql = 'CREATE INDEX [tid] ON [' . STYLES_TEMPLATE_DATA_TABLE . ']([template_id]) ON [PRIMARY]';
|
||||
_sql($sql, $errored, $error_ary);
|
||||
|
||||
// yet another index
|
||||
$sql = 'CREATE INDEX [tfn] ON [' . STYLES_TEMPLATE_DATA_TABLE . ']([template_filename]) ON [PRIMARY]';
|
||||
_sql($sql, $errored, $error_ary);
|
||||
|
||||
foreach ($old_style_rows as $return_row)
|
||||
{
|
||||
_sql('INSERT INTO ' . STYLES_TEMPLATE_DATA_TABLE . ' ' . $db->sql_build_array('INSERT', $return_row), $errored, $error_ary);
|
||||
}
|
||||
|
||||
$db->sql_transaction('commit');
|
||||
}
|
||||
|
||||
// Setting this here again because new installations may not have it...
|
||||
set_config('cron_lock', '0', true);
|
||||
set_config('ldap_port', '');
|
||||
set_config('ldap_user_filter', '');
|
||||
|
||||
$no_updates = false;
|
||||
}
|
||||
|
||||
_write_result($no_updates, $errored, $error_ary);
|
||||
|
||||
$error_ary = array();
|
||||
|
@ -1336,8 +1585,6 @@ add_log('admin', 'LOG_UPDATE_DATABASE', $orig_version, $updates_to_version);
|
|||
// Now we purge the session table as well as all cache files
|
||||
$cache->purge();
|
||||
|
||||
exit;
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
@ -1357,6 +1604,9 @@ exit;
|
|||
|
||||
<?php
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
/**
|
||||
* Function for triggering an sql statement
|
||||
*/
|
||||
|
@ -1372,7 +1622,6 @@ function _sql($sql, &$errored, &$error_ary, $echo_dot = true)
|
|||
$db->sql_return_on_error(true);
|
||||
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
if ($db->sql_error_triggered)
|
||||
{
|
||||
$errored = true;
|
||||
|
@ -1570,7 +1819,7 @@ function column_exists($dbms, $table, $column_name)
|
|||
/**
|
||||
* Function to prepare some column information for better usage
|
||||
*/
|
||||
function prepare_column_data($dbms, $column_data)
|
||||
function prepare_column_data($dbms, $column_data, $table_name, $column_name)
|
||||
{
|
||||
global $dbms_type_map, $unsigned_types;
|
||||
|
||||
|
@ -1704,22 +1953,32 @@ function prepare_column_data($dbms, $column_data)
|
|||
|
||||
// In Oracle empty strings ('') are treated as NULL.
|
||||
// Therefore in oracle we allow NULL's for all DEFAULT '' entries
|
||||
$sql .= ($column_data[1] === '') ? '' : 'NOT NULL';
|
||||
// Oracle does not like setting NOT NULL on a column that is already NOT NULL (this happens only on number fields)
|
||||
if (preg_match('/number/i', $column_type))
|
||||
{
|
||||
$sql .= ($column_data[1] === '') ? '' : 'NOT NULL';
|
||||
}
|
||||
break;
|
||||
|
||||
case 'postgres':
|
||||
$return_array['column_type'] = $column_type;
|
||||
$return_array['null'] = 'NOT NULL';
|
||||
|
||||
if (!is_null($column_data[1]))
|
||||
{
|
||||
$return_array['default'] = $column_data[1];
|
||||
}
|
||||
|
||||
$sql .= " {$column_type} ";
|
||||
$sql .= 'NOT NULL ';
|
||||
|
||||
$sql .= (!is_null($column_data[1])) ? "DEFAULT '{$column_data[1]}' " : '';
|
||||
if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
|
||||
{
|
||||
$default_val = "nextval('{$table_name}_seq')";
|
||||
}
|
||||
else if (!is_null($column_data[1]))
|
||||
{
|
||||
$default_val = "'" . $column_data[1] . "'";
|
||||
$return_array['null'] = 'NOT NULL';
|
||||
$sql .= 'NOT NULL ';
|
||||
}
|
||||
|
||||
$return_array['default'] = $default_val;
|
||||
|
||||
$sql .= "DEFAULT {$default_val}";
|
||||
|
||||
// Unsigned? Then add a CHECK contraint
|
||||
if (in_array($orig_column_type, $unsigned_types))
|
||||
|
@ -1730,7 +1989,7 @@ function prepare_column_data($dbms, $column_data)
|
|||
break;
|
||||
|
||||
case 'sqlite':
|
||||
/* if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
|
||||
if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
|
||||
{
|
||||
$sql .= ' INTEGER PRIMARY KEY';
|
||||
}
|
||||
|
@ -1738,8 +1997,6 @@ function prepare_column_data($dbms, $column_data)
|
|||
{
|
||||
$sql .= ' ' . $column_type;
|
||||
}
|
||||
*/
|
||||
$sql .= ' ' . $column_type;
|
||||
|
||||
$sql .= ' NOT NULL ';
|
||||
$sql .= (!is_null($column_data[1])) ? "DEFAULT '{$column_data[1]}'" : '';
|
||||
|
@ -1758,7 +2015,7 @@ function sql_column_add($dbms, $table_name, $column_name, $column_data)
|
|||
{
|
||||
global $errored, $error_ary;
|
||||
|
||||
$column_data = prepare_column_data($dbms, $column_data);
|
||||
$column_data = prepare_column_data($dbms, $column_data, $table_name, $column_name);
|
||||
|
||||
switch ($dbms)
|
||||
{
|
||||
|
@ -2300,7 +2557,7 @@ function sql_column_change($dbms, $table_name, $column_name, $column_data)
|
|||
global $dbms_type_map, $db;
|
||||
global $errored, $error_ary;
|
||||
|
||||
$column_data = prepare_column_data($dbms, $column_data);
|
||||
$column_data = prepare_column_data($dbms, $column_data, $table_name, $column_name);
|
||||
|
||||
switch ($dbms)
|
||||
{
|
||||
|
@ -2332,18 +2589,21 @@ function sql_column_change($dbms, $table_name, $column_name, $column_data)
|
|||
$sql_array = array();
|
||||
$sql_array[] = 'ALTER COLUMN ' . $column_name . ' TYPE ' . $column_data['column_type'];
|
||||
|
||||
if ($column_data['null'] == 'NOT NULL')
|
||||
if (isset($column_data['null']))
|
||||
{
|
||||
$sql_array[] = 'ALTER COLUMN ' . $column_name . ' SET NOT NULL';
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql_array[] = 'ALTER COLUMN ' . $column_name . ' DROP NOT NULL';
|
||||
if ($column_data['null'] == 'NOT NULL')
|
||||
{
|
||||
$sql_array[] = 'ALTER COLUMN ' . $column_name . ' SET NOT NULL';
|
||||
}
|
||||
else if ($column_data['null'] == 'NULL')
|
||||
{
|
||||
$sql_array[] = 'ALTER COLUMN ' . $column_name . ' DROP NOT NULL';
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($column_data['default']))
|
||||
{
|
||||
$sql_array[] = 'ALTER COLUMN ' . $column_name . " SET DEFAULT '" . $column_data['default'] . "'";
|
||||
$sql_array[] = 'ALTER COLUMN ' . $column_name . ' SET DEFAULT ' . $column_data['default'];
|
||||
}
|
||||
|
||||
// we don't want to double up on constraints if we change different number data types
|
||||
|
@ -2377,7 +2637,7 @@ function sql_column_change($dbms, $table_name, $column_name, $column_data)
|
|||
|
||||
if (!$constraint_exists)
|
||||
{
|
||||
$sql_array[] = "ADD '" . $column_data['constraint'] . "'";
|
||||
$sql_array[] = 'ADD ' . $column_data['constraint'];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -109,9 +109,10 @@ if (!empty($mem_limit))
|
|||
{
|
||||
$unit = strtolower(substr($mem_limit, -1, 1));
|
||||
$mem_limit = (int) $mem_limit;
|
||||
|
||||
if ($unit == 'k')
|
||||
{
|
||||
$mem_limit = floor($mem_limit/1024);
|
||||
$mem_limit = floor($mem_limit / 1024);
|
||||
}
|
||||
else if ($unit == 'g')
|
||||
{
|
||||
|
@ -119,7 +120,7 @@ if (!empty($mem_limit))
|
|||
}
|
||||
else if (is_numeric($unit))
|
||||
{
|
||||
$mem_limit = floor($mem_limit/1048576);
|
||||
$mem_limit = floor((int) ($mem_limit . $unit) / 1048576);
|
||||
}
|
||||
$mem_limit = max(128, $mem_limit) . 'M';
|
||||
}
|
||||
|
|
|
@ -1093,7 +1093,7 @@ END;;
|
|||
|
||||
# Table: 'phpbb_styles_template_data'
|
||||
CREATE TABLE phpbb_styles_template_data (
|
||||
template_id INTEGER NOT NULL,
|
||||
template_id INTEGER DEFAULT 0 NOT NULL,
|
||||
template_filename VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL,
|
||||
template_included BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL,
|
||||
template_mtime INTEGER DEFAULT 0 NOT NULL,
|
||||
|
@ -1103,17 +1103,6 @@ CREATE TABLE phpbb_styles_template_data (
|
|||
CREATE INDEX phpbb_styles_template_data_tid ON phpbb_styles_template_data(template_id);;
|
||||
CREATE INDEX phpbb_styles_template_data_tfn ON phpbb_styles_template_data(template_filename);;
|
||||
|
||||
CREATE GENERATOR phpbb_styles_template_data_gen;;
|
||||
SET GENERATOR phpbb_styles_template_data_gen TO 0;;
|
||||
|
||||
CREATE TRIGGER t_phpbb_styles_template_data FOR phpbb_styles_template_data
|
||||
BEFORE INSERT
|
||||
AS
|
||||
BEGIN
|
||||
NEW.template_id = GEN_ID(phpbb_styles_template_data_gen, 1);
|
||||
END;;
|
||||
|
||||
|
||||
# Table: 'phpbb_styles_theme'
|
||||
CREATE TABLE phpbb_styles_theme (
|
||||
theme_id INTEGER NOT NULL,
|
||||
|
|
|
@ -1309,7 +1309,7 @@ GO
|
|||
Table: 'phpbb_styles_template_data'
|
||||
*/
|
||||
CREATE TABLE [phpbb_styles_template_data] (
|
||||
[template_id] [int] IDENTITY (1, 1) NOT NULL ,
|
||||
[template_id] [int] DEFAULT (0) NOT NULL ,
|
||||
[template_filename] [varchar] (100) DEFAULT ('') NOT NULL ,
|
||||
[template_included] [varchar] (8000) DEFAULT ('') NOT NULL ,
|
||||
[template_mtime] [int] DEFAULT (0) NOT NULL ,
|
||||
|
|
|
@ -743,7 +743,7 @@ CREATE TABLE phpbb_styles_template (
|
|||
|
||||
# Table: 'phpbb_styles_template_data'
|
||||
CREATE TABLE phpbb_styles_template_data (
|
||||
template_id smallint(4) UNSIGNED NOT NULL auto_increment,
|
||||
template_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
template_filename varbinary(100) DEFAULT '' NOT NULL,
|
||||
template_included blob NOT NULL,
|
||||
template_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
|
|
|
@ -743,7 +743,7 @@ CREATE TABLE phpbb_styles_template (
|
|||
|
||||
# Table: 'phpbb_styles_template_data'
|
||||
CREATE TABLE phpbb_styles_template_data (
|
||||
template_id smallint(4) UNSIGNED NOT NULL auto_increment,
|
||||
template_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
template_filename varchar(100) DEFAULT '' NOT NULL,
|
||||
template_included text NOT NULL,
|
||||
template_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
|
|
|
@ -1453,7 +1453,7 @@ END;
|
|||
Table: 'phpbb_styles_template_data'
|
||||
*/
|
||||
CREATE TABLE phpbb_styles_template_data (
|
||||
template_id number(4) NOT NULL,
|
||||
template_id number(4) DEFAULT '0' NOT NULL,
|
||||
template_filename varchar2(100) DEFAULT '' ,
|
||||
template_included clob DEFAULT '' ,
|
||||
template_mtime number(11) DEFAULT '0' NOT NULL,
|
||||
|
@ -1466,22 +1466,6 @@ CREATE INDEX phpbb_styles_template_data_tid ON phpbb_styles_template_data (templ
|
|||
CREATE INDEX phpbb_styles_template_data_tfn ON phpbb_styles_template_data (template_filename)
|
||||
/
|
||||
|
||||
CREATE SEQUENCE phpbb_styles_template_data_seq
|
||||
/
|
||||
|
||||
CREATE OR REPLACE TRIGGER t_phpbb_styles_template_data
|
||||
BEFORE INSERT ON phpbb_styles_template_data
|
||||
FOR EACH ROW WHEN (
|
||||
new.template_id IS NULL OR new.template_id = 0
|
||||
)
|
||||
BEGIN
|
||||
SELECT phpbb_styles_template_data_seq.nextval
|
||||
INTO :new.template_id
|
||||
FROM dual;
|
||||
END;
|
||||
/
|
||||
|
||||
|
||||
/*
|
||||
Table: 'phpbb_styles_theme'
|
||||
*/
|
||||
|
|
|
@ -977,10 +977,8 @@ CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template (te
|
|||
/*
|
||||
Table: 'phpbb_styles_template_data'
|
||||
*/
|
||||
CREATE SEQUENCE phpbb_styles_template_data_seq;
|
||||
|
||||
CREATE TABLE phpbb_styles_template_data (
|
||||
template_id INT2 DEFAULT nextval('phpbb_styles_template_data_seq'),
|
||||
template_id INT2 DEFAULT '0' NOT NULL CHECK (template_id >= 0),
|
||||
template_filename varchar(100) DEFAULT '' NOT NULL,
|
||||
template_included varchar(8000) DEFAULT '' NOT NULL,
|
||||
template_mtime INT4 DEFAULT '0' NOT NULL CHECK (template_mtime >= 0),
|
||||
|
|
|
@ -120,9 +120,11 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_username', '')
|
|||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_base_dn', '');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_email', '');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_password', '');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_port', '');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_server', '');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_uid', '');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_user', '');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_user_filter', '');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('limit_load', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('limit_search_load', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_anon_lastread', '0');
|
||||
|
@ -206,11 +208,12 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page',
|
|||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.RC4');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.RC5');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400');
|
||||
|
||||
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('cache_last_gc', '0', 1);
|
||||
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('cron_lock', '0', 1);
|
||||
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('database_last_gc', '0', 1);
|
||||
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('last_queue_run', '0', 1);
|
||||
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('newest_user_colour', 'AA0000', 1);
|
||||
|
|
|
@ -717,7 +717,7 @@ CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template (te
|
|||
|
||||
# Table: 'phpbb_styles_template_data'
|
||||
CREATE TABLE phpbb_styles_template_data (
|
||||
template_id INTEGER PRIMARY KEY NOT NULL ,
|
||||
template_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
template_filename varchar(100) NOT NULL DEFAULT '',
|
||||
template_included text(65535) NOT NULL DEFAULT '',
|
||||
template_mtime INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
|
|
|
@ -304,13 +304,17 @@ $lang = array_merge($lang, array(
|
|||
'LDAP_NO_EMAIL' => 'The specified e-mail attribute does not exist.',
|
||||
'LDAP_NO_IDENTITY' => 'Could not find a login identity for %s.',
|
||||
'LDAP_PASSWORD' => 'LDAP password',
|
||||
'LDAP_PASSWORD_EXPLAIN' => 'Leave blank to use anonymous access. Else fill in the password for the above user. <strong>WARNING:</strong> This password will be stored as plain text in the database visible to everybody who can access your database.',
|
||||
'LDAP_PASSWORD_EXPLAIN' => 'Leave blank to use anonymous binding. Else fill in the password for the above user. Required for Active Directory Servers. <strong>WARNING:</strong> This password will be stored as plain text in the database visible to everybody who can access your database or who can view this configuration page.',
|
||||
'LDAP_PORT' => 'LDAP server port',
|
||||
'LDAP_PORT_EXPLAIN' => 'Optionally you can specify a port which should be used to connect to the LDAP server instead of the default port 389.',
|
||||
'LDAP_SERVER' => 'LDAP server name',
|
||||
'LDAP_SERVER_EXPLAIN' => 'If using LDAP this is the name or IP address of the server.',
|
||||
'LDAP_SERVER_EXPLAIN' => 'If using LDAP this is the hostname or IP address of the LDAP server. Alternatively you can specify an URL like ldap://hostname:port/',
|
||||
'LDAP_UID' => 'LDAP <var>uid</var>',
|
||||
'LDAP_UID_EXPLAIN' => 'This is the key under which to search for a given login identity, e.g. <var>uid</var>, <var>sn</var>, etc.',
|
||||
'LDAP_USER' => 'LDAP user',
|
||||
'LDAP_USER_EXPLAIN' => 'Leave blank to use anonymous access. If filled in phpBB will connect to the LDAP server as the specified user.',
|
||||
'LDAP_USER' => 'LDAP user <var>dn</var>',
|
||||
'LDAP_USER_EXPLAIN' => 'Leave blank to use anonymous binding. If filled in phpBB uses the specified distinguished name on login attempts to find the correct user, e.g. <samp>uid=Username,ou=MyUnit,o=MyCompany,c=US</samp>. Required for Active Directory Servers.',
|
||||
'LDAP_USER_FILTER' => 'LDAP user filter',
|
||||
'LDAP_USER_FILTER_EXPLAIN' => 'Optionally you can further limit the searched objects with additional filters. For example <samp>objectClass=posixGroup</samp> would result in the use of <samp>(&(uid=$username)(objectClass=posixGroup))</samp>',
|
||||
));
|
||||
|
||||
// Server Settings
|
||||
|
@ -353,7 +357,7 @@ $lang = array_merge($lang, array(
|
|||
'BROWSER_VALID' => 'Validate browser',
|
||||
'BROWSER_VALID_EXPLAIN' => 'Enables browser validation for each session improving security.',
|
||||
'CHECK_DNSBL' => 'Check IP against DNS Blackhole List',
|
||||
'CHECK_DNSBL_EXPLAIN' => 'If enabled the user’s IP address is checked against the following DNSBL services on registration and posting: <a href="http://spamcop.net">spamcop.net</a>, <a href="http://dsbl.org">dsbl.org</a> and <a href="http://spamhaus.org">spamhaus.org</a>. This lookup may take a while, depending on the server’s configuration. If slowdowns are experienced or too many false positives reported it is recommended to disable this check.',
|
||||
'CHECK_DNSBL_EXPLAIN' => 'If enabled the user’s IP address is checked against the following DNSBL services on registration and posting: <a href="http://spamcop.net">spamcop.net</a>, <a href="http://dsbl.org">dsbl.org</a> and <a href="http://www.spamhaus.org">www.spamhaus.org</a>. This lookup may take a while, depending on the server’s configuration. If slowdowns are experienced or too many false positives reported it is recommended to disable this check.',
|
||||
'CLASS_B' => 'A.B',
|
||||
'CLASS_C' => 'A.B.C',
|
||||
'EMAIL_CHECK_MX' => 'Check e-mail domain for valid MX record',
|
||||
|
|
|
@ -268,7 +268,7 @@ $lang = array_merge($lang, array(
|
|||
$lang = array_merge($lang, array(
|
||||
'ACP_PHP_INFO_EXPLAIN' => 'This page lists information on the version of PHP installed on this server. It includes details of loaded modules, available variables and default settings. This information may be useful when diagnosing problems. Please be aware that some hosting companies will limit what information is displayed here for security reasons. You are advised to not give out any details on this page except when asked by <a href="http://www.phpbb.com/about/team/">official team members</a> on the support forums.',
|
||||
|
||||
'NO_PHPINFO_AVAILABLE' => 'The PHP informations are unable to be determined. Phpinfo() has been disabled for security reasons.',
|
||||
'NO_PHPINFO_AVAILABLE' => 'Information about your PHP configuration is unable to be determined. Phpinfo() has been disabled for security reasons.',
|
||||
));
|
||||
|
||||
// Logs
|
||||
|
|
|
@ -33,7 +33,7 @@ if (empty($lang) || !is_array($lang))
|
|||
// Database Backup/Restore
|
||||
$lang = array_merge($lang, array(
|
||||
'ACP_BACKUP_EXPLAIN' => 'Here you can backup all your phpBB related data. You may store the resulting archive in your <samp>store/</samp> folder or download it directly. Depending on your server configuration you may be able to compress the file in a number of formats.',
|
||||
'ACP_RESTORE_EXPLAIN' => 'This will perform a full restore of all phpBB tables from a saved file. If your server supports it you may use a gzip or bzip2 compressed text file and it will automatically be decompressed. <strong>WARNING</strong> This will overwrite any existing data. The restore may take a long time to process please do not move from this page till it is complete. Backups are stored in the <samp>store/</samp> folder and are assumed to be generated by phpBB’s backup functionality. Restoring backups that were not created by the built in system may or may not work.',
|
||||
'ACP_RESTORE_EXPLAIN' => 'This will perform a full restore of all phpBB tables from a saved file. If your server supports it you may use a gzip or bzip2 compressed text file and it will automatically be decompressed. <strong>WARNING</strong> This will overwrite any existing data. The restore may take a long time to process please do not move from this page till it is complete. Backups are stored in the <samp>store/</samp> folder and are assumed to be generated by phpBB’s backup functionality. Restoring backups that were not created by the built in system may or may not work.',
|
||||
|
||||
'BACKUP_DELETE' => 'The backup file has been deleted successfully.',
|
||||
'BACKUP_INVALID' => 'The selected file to backup is invalid.',
|
||||
|
|
|
@ -49,14 +49,14 @@ $lang = array_merge($lang, array(
|
|||
'BBCODE_TAG_TOO_LONG' => 'The tag name you selected is too long.',
|
||||
'BBCODE_TAG_DEF_TOO_LONG' => 'The tag definition that you have entered is too long, please shorten your tag definition.',
|
||||
'BBCODE_USAGE' => 'BBCode usage',
|
||||
'BBCODE_USAGE_EXAMPLE' => '[hilight={COLOR}]{TEXT}[/hilight]<br /><br />[font={TEXT1}]{TEXT2}[/font]',
|
||||
'BBCODE_USAGE_EXAMPLE' => '[hilight={COLOR}]{TEXT}[/hilight]<br /><br />[font={SIMPLETEXT1}]{SIMPLETEXT2}[/font]',
|
||||
'BBCODE_USAGE_EXPLAIN' => 'Here you define how to use the BBCode. Replace any variable input by the corresponding token (%ssee below%s).',
|
||||
|
||||
'EXAMPLE' => 'Example:',
|
||||
'EXAMPLES' => 'Examples:',
|
||||
|
||||
'HTML_REPLACEMENT' => 'HTML replacement',
|
||||
'HTML_REPLACEMENT_EXAMPLE' => '<span style="background-color: {COLOR};">{TEXT}</span><br /><br /><span style="font-family: {TEXT1};">{TEXT2}</span>',
|
||||
'HTML_REPLACEMENT_EXAMPLE' => '<span style="background-color: {COLOR};">{TEXT}</span><br /><br /><span style="font-family: {SIMPLETEXT1};">{SIMPLETEXT2}</span>',
|
||||
'HTML_REPLACEMENT_EXPLAIN' => 'Here you define the default HTML replacement. Do not forget to put back tokens you used above!',
|
||||
|
||||
'TOKEN' => 'Token',
|
||||
|
@ -66,7 +66,9 @@ $lang = array_merge($lang, array(
|
|||
'TOO_MANY_BBCODES' => 'You cannot create any more BBCodes. Please remove one or more BBCodes then try again.',
|
||||
|
||||
'tokens' => array(
|
||||
'TEXT' => 'Any text, including foreign characters, numbers, etc…',
|
||||
'TEXT' => 'Any text, including foreign characters, numbers, etc… You should not use this token in HTML tags. Instead try to use IDENTIFIER or SIMPLETEXT.',
|
||||
'SIMPLETEXT' => 'Characters from the latin alphabet (A-Z), numbers, spaces, commas, dots, minus, plus, hyphen and underscore',
|
||||
'IDENTIFIER' => 'Characters from the latin alphabet (A-Z), numbers, hyphen and underscore',
|
||||
'NUMBER' => 'Any series of digits',
|
||||
'EMAIL' => 'A valid e-mail address',
|
||||
'URL' => 'A valid URL using any protocol (http, ftp, etc… cannot be used for javascript exploits). If none is given, "http://" is prefixed to the string.',
|
||||
|
@ -91,8 +93,12 @@ $lang = array_merge($lang, array(
|
|||
'CURRENT_SMILIES' => 'Current smilies',
|
||||
'CURRENT_SMILIES_EXPLAIN' => 'Choose what to do with the currently installed smilies.',
|
||||
|
||||
'DISPLAY_ON_POSTING' => 'Display on posting page',
|
||||
'DISPLAY_ON_POSTING' => 'Display on posting page',
|
||||
'DISPLAY_POSTING' => 'On posting page',
|
||||
'DISPLAY_POSTING_NO' => 'Not on posting page',
|
||||
|
||||
|
||||
|
||||
'EDIT_ICONS' => 'Edit icons',
|
||||
'EDIT_SMILIES' => 'Edit smilies',
|
||||
'EMOTION' => 'Emotion',
|
||||
|
@ -104,11 +110,15 @@ $lang = array_merge($lang, array(
|
|||
'FIRST' => 'First',
|
||||
|
||||
'ICONS_ADD' => 'Add a new icon',
|
||||
'ICONS_ADDED' => 'The icon has been added successfully.',
|
||||
'ICON_NONE_ADDED' => 'No icons were added.',
|
||||
'ICONS_ONE_ADDED' => 'The icon has been added successfully.',
|
||||
'ICONS_ADDED' => 'The icons have been added successfully.',
|
||||
'ICONS_CONFIG' => 'Icon configuration',
|
||||
'ICONS_DELETED' => 'The icon has been removed successfully.',
|
||||
'ICONS_EDIT' => 'Edit icon',
|
||||
'ICONS_EDITED' => 'The icon has been updated successfully.',
|
||||
'ICONS_ONE_EDITED' => 'The icon has been updated successfully.',
|
||||
'ICON_NONE_EDITED' => 'No icons were updated.',
|
||||
'ICONS_EDITED' => 'The icons have been updated successfully.',
|
||||
'ICONS_HEIGHT' => 'Icon height',
|
||||
'ICONS_IMAGE' => 'Icon image',
|
||||
'ICONS_IMPORTED' => 'The icons pack has been installed successfully.',
|
||||
|
@ -140,12 +150,16 @@ $lang = array_merge($lang, array(
|
|||
|
||||
'SELECT_PACKAGE' => 'Select a package file',
|
||||
'SMILIES_ADD' => 'Add a new smiley',
|
||||
'SMILIES_ADDED' => 'The smiley has been added successfully.',
|
||||
'SMILIES_NONE_ADDED' => 'No smilies were added.',
|
||||
'SMILIES_ONE_ADDED' => 'The smiley has been added successfully.',
|
||||
'SMILIES_ADDED' => 'The smilies have been added successfully.',
|
||||
'SMILIES_CODE' => 'Smiley code',
|
||||
'SMILIES_CONFIG' => 'Smiley configuration',
|
||||
'SMILIES_DELETED' => 'The smiley has been removed successfully.',
|
||||
'SMILIES_EDIT' => 'Edit smiley',
|
||||
'SMILIES_EDITED' => 'The smiley has been updated successfully.',
|
||||
'SMILIES_NONE_EDITED' => 'No smilies were updated.',
|
||||
'SMILIES_ONE_EDITED' => 'The smiley has been updated successfully.',
|
||||
'SMILIES_EDITED' => 'The smilies have been updated successfully.',
|
||||
'SMILIES_EMOTION' => 'Emotion',
|
||||
'SMILIES_HEIGHT' => 'Smiley height',
|
||||
'SMILIES_IMAGE' => 'Smiley image',
|
||||
|
|
|
@ -99,7 +99,7 @@ $lang = array_merge($lang, array(
|
|||
'USER_ADMIN_DEL_AVATAR' => 'Delete avatar',
|
||||
'USER_ADMIN_DEL_POSTS' => 'Delete all posts',
|
||||
'USER_ADMIN_DEL_SIG' => 'Delete signature',
|
||||
'USER_ADMIN_EXPLAIN' => 'Here you can change your users information and certain specific options. To modify the users permissions please use the user and group permissions system.',
|
||||
'USER_ADMIN_EXPLAIN' => 'Here you can change your users information and certain specific options.',
|
||||
'USER_ADMIN_FORCE' => 'Force reactivation',
|
||||
'USER_ADMIN_MOVE_POSTS' => 'Move all posts',
|
||||
'USER_ADMIN_SIG_REMOVED' => 'Successfully removed signature from user account.',
|
||||
|
|
|
@ -526,6 +526,7 @@ $lang = array_merge($lang, array(
|
|||
|
||||
'TOO_LONG_AIM' => 'The screenname you entered is too long.',
|
||||
'TOO_LONG_CONFIRM_CODE' => 'The confirm code you entered is too long.',
|
||||
'TOO_LONG_DATEFORMAT' => 'The date format you entered is too long.',
|
||||
'TOO_LONG_ICQ' => 'The ICQ number you entered is too long.',
|
||||
'TOO_LONG_INTERESTS' => 'The interests you entered is too long.',
|
||||
'TOO_LONG_JABBER' => 'The Jabber account name you entered is too long.',
|
||||
|
@ -545,6 +546,7 @@ $lang = array_merge($lang, array(
|
|||
|
||||
'TOO_SHORT_AIM' => 'The screenname you entered is too short.',
|
||||
'TOO_SHORT_CONFIRM_CODE' => 'The confirm code you entered is too short.',
|
||||
'TOO_SHORT_DATEFORMAT' => 'The date format you entered is too short.',
|
||||
'TOO_SHORT_ICQ' => 'The ICQ number you entered is too short.',
|
||||
'TOO_SHORT_INTERESTS' => 'The interests you entered is too short.',
|
||||
'TOO_SHORT_JABBER' => 'The Jabber account name you entered is too short.',
|
||||
|
@ -591,8 +593,9 @@ $lang = array_merge($lang, array(
|
|||
'UNREAD_MESSAGES' => 'Unread messages',
|
||||
'UNREAD_PM' => '<strong>%d</strong> unread message',
|
||||
'UNREAD_PMS' => '<strong>%d</strong> unread messages',
|
||||
'UNWATCHED_FORUMS' => 'You are no longer subscribed to the selected forums.',
|
||||
'UNWATCHED_TOPICS' => 'You are no longer subscribed to the selected topics.',
|
||||
'UNWATCHED_FORUMS' => 'You are no longer subscribed to the selected forums.',
|
||||
'UNWATCHED_TOPICS' => 'You are no longer subscribed to the selected topics.',
|
||||
'UNWATCHED_FORUMS_TOPICS' => 'You are no longer subscribed to the selected entries.',
|
||||
'UPDATE' => 'Update',
|
||||
'UPLOAD_IN_PROGRESS' => 'The upload is currently in progress.',
|
||||
'URL_REDIRECT' => 'If your browser does not support meta redirection %splease click HERE to be redirected%s.',
|
||||
|
@ -622,8 +625,8 @@ $lang = array_merge($lang, array(
|
|||
'VIEW_LATEST_POST' => 'View the latest post',
|
||||
'VIEW_NEWEST_POST' => 'View first unread post',
|
||||
'VIEW_NOTES' => 'View user notes',
|
||||
'VIEW_ONLINE_TIME' => 'This data is based on users active over the past %d minute',
|
||||
'VIEW_ONLINE_TIMES' => 'This data is based on users active over the past %d minutes',
|
||||
'VIEW_ONLINE_TIME' => 'based on users active over the past %d minute',
|
||||
'VIEW_ONLINE_TIMES' => 'based on users active over the past %d minutes',
|
||||
'VIEW_TOPIC' => 'View topic',
|
||||
'VIEW_TOPIC_ANNOUNCEMENT' => 'Announcement: ',
|
||||
'VIEW_TOPIC_GLOBAL' => 'Global Announcement: ',
|
||||
|
|
|
@ -6,6 +6,12 @@ You are receiving this notification because you are watching the forum, "{FORUM_
|
|||
|
||||
{U_NEWEST_POST}
|
||||
|
||||
If you want to view the topic, click the following link:
|
||||
{U_TOPIC}
|
||||
|
||||
If you want to view the forum, click the following link:
|
||||
{U_TOPIC}
|
||||
|
||||
If you no longer wish to watch this forum you can either click the "Unsubscribe forum" link found in the forum above, or by clicking the following link:
|
||||
|
||||
{U_STOP_WATCHING_FORUM}
|
||||
|
|
|
@ -10,6 +10,9 @@ If you want to view the newest post made since your last visit, click the follow
|
|||
If you want to view the topic, click the following link:
|
||||
{U_TOPIC}
|
||||
|
||||
If you want to view the forum, click the following link:
|
||||
{U_FORUM}
|
||||
|
||||
If you no longer wish to watch this topic you can either click the "Unsubscribe topic" link found at the bottom of the topic above, or by clicking the following link:
|
||||
|
||||
{U_STOP_WATCHING_TOPIC}
|
||||
|
|
|
@ -44,7 +44,7 @@ $help = array(
|
|||
),
|
||||
array(
|
||||
0 => 'How do I prevent my username appearing in the online user listings?',
|
||||
1 => 'Within your User Control Panel, under “Board preferences”, you will find the option <em>Hide your online status</em>. Enable this option with <samp>Yes</samp>and you will only appear to the administrators, moderators and yourself. You will be counted as a hidden user.'
|
||||
1 => 'Within your User Control Panel, under “Board preferences”, you will find the option <em>Hide your online status</em>. Enable this option with <samp>Yes</samp> and you will only appear to the administrators, moderators and yourself. You will be counted as a hidden user.'
|
||||
),
|
||||
array(
|
||||
0 => 'I’ve lost my password!',
|
||||
|
@ -88,7 +88,7 @@ $help = array(
|
|||
),
|
||||
array(
|
||||
0 => 'My language is not in the list!',
|
||||
1 => 'Either the administrator has not installed your language or someone has not translated this board into your language. Try asking the board administrator if they can install the language pack you need. If the language pack does not exist, feel free to create a new translation. More information can be found at the phpBB website (see link at the bottom of board pages).'
|
||||
1 => 'Either the administrator has not installed your language or nobody has translated this board into your language. Try asking the board administrator if they can install the language pack you need. If the language pack does not exist, feel free to create a new translation. More information can be found at the phpBB website (see link at the bottom of board pages).'
|
||||
),
|
||||
array(
|
||||
0 => 'How do I show an image below my username?',
|
||||
|
@ -216,7 +216,7 @@ $help = array(
|
|||
),
|
||||
array(
|
||||
0 => 'Where are the usergroups and how do I join one?',
|
||||
1 => 'You can view all usergroups by via the “Usergroups” link within your User Control Panel. If you would like to join one, proceed by clicking the appropriate button. Not all groups have open access, however. Some may require approval to join, some may be closed and some may even have hidden memberships. If the group is open, you can join it by clicking the appropriate button. If a group requires approval to join you may request to join by clicking the appropriate button. The user group leader will need to approve your request and may ask why you want to join the group. Please do not harass a group leader if they reject your request; they will have their reasons.'
|
||||
1 => 'You can view all usergroups via the “Usergroups” link within your User Control Panel. If you would like to join one, proceed by clicking the appropriate button. Not all groups have open access, however. Some may require approval to join, some may be closed and some may even have hidden memberships. If the group is open, you can join it by clicking the appropriate button. If a group requires approval to join you may request to join by clicking the appropriate button. The user group leader will need to approve your request and may ask why you want to join the group. Please do not harass a group leader if they reject your request; they will have their reasons.'
|
||||
),
|
||||
array(
|
||||
0 => 'How do I become a usergroup leader?',
|
||||
|
|
|
@ -34,10 +34,10 @@ $lang = array_merge($lang, array(
|
|||
'ADMIN_CONFIG' => 'Administrator configuration',
|
||||
'ADMIN_PASSWORD' => 'Administrator password',
|
||||
'ADMIN_PASSWORD_CONFIRM' => 'Confirm administrator password',
|
||||
'ADMIN_PASSWORD_EXPLAIN' => '(Please enter a password between 6 and 30 characters in length.)',
|
||||
'ADMIN_PASSWORD_EXPLAIN' => 'Please enter a password between 6 and 30 characters in length.',
|
||||
'ADMIN_TEST' => 'Check administrator settings',
|
||||
'ADMIN_USERNAME' => 'Administrator username',
|
||||
'ADMIN_USERNAME_EXPLAIN' => '(Please enter a username between 3 and 20 characters in length.)',
|
||||
'ADMIN_USERNAME_EXPLAIN' => 'Please enter a username between 3 and 20 characters in length.',
|
||||
'APP_MAGICK' => 'Imagemagick support [ Attachments ]',
|
||||
'AUTHOR_NOTES' => 'Author notes<br />» %s',
|
||||
'AVAILABLE' => 'Available',
|
||||
|
@ -333,10 +333,10 @@ $lang = array_merge($lang, array(
|
|||
'SUCCESSFUL_CONNECT' => 'Successful connection',
|
||||
// TODO: Write some text on obtaining support
|
||||
'SUPPORT_BODY' => 'During the release candidate phase full support will be given at <a href="http://www.phpbb.com/community/viewforum.php?f=46">the phpBB 3.0.x support forums</a>. We will provide answers to general setup questions, configuration problems, conversion problems and support for determining common problems mostly related to bugs. We also allow discussions about modifications and custom code/style additions.</p><p>For additional assistance, please refer to our <a href="http://www.phpbb.com/support/documentation/3.0/quickstart/">Quick Start Guide</a> and <a href="http://www.phpbb.com/support/documentation/3.0/">the online documentation</a>.</p><p>To ensure you stay up to date with the latest news and releases, why not <a href="http://www.phpbb.com/support/">subscribe to our mailing list</a>?',
|
||||
'SYNC_FORUMS' => 'Starting to sync forums',
|
||||
'SYNC_FORUMS' => 'Starting to synchronise forums',
|
||||
'SYNC_POST_COUNT' => 'Synchronising post_counts',
|
||||
'SYNC_POST_COUNT_ID' => 'Synchronising post_counts from <var>entry</var> %1$s to %2$s.',
|
||||
'SYNC_TOPICS' => 'Starting to sync topics',
|
||||
'SYNC_TOPICS' => 'Starting to synchronise topics',
|
||||
'SYNC_TOPIC_ID' => 'Synchronising topics from <var>topic_id</var> %1$s to %2$s.',
|
||||
|
||||
'TABLES_MISSING' => 'Could not find these tables<br />» <strong>%s</strong>.',
|
||||
|
|
|
@ -43,7 +43,7 @@ $lang = array_merge($lang, array(
|
|||
'GLOBAL' => 'Global announcement',
|
||||
|
||||
'IGNORED_TERMS' => 'ignored',
|
||||
'IGNORED_TERMS_EXPLAIN' => 'The following words in your search query were ignored: <strong>%s</strong>.',
|
||||
'IGNORED_TERMS_EXPLAIN' => 'The following words in your search query were ignored because they are too common words: <strong>%s</strong>.',
|
||||
|
||||
'JUMP_TO_POST' => 'Jump to post',
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ if (empty($lang) || !is_array($lang))
|
|||
$lang = array_merge($lang, array(
|
||||
'TERMS_OF_USE_CONTENT' => 'By accessing “%1$s” (hereinafter “we”, “us”, “our”, “%1$s”, “%2$s”), you agree to be legally bound by the following terms. If you do not agree to be legally bound by all of the following terms then please do not access and/or use “%1$s”. We may change these at any time and we’ll do our utmost in informing you, though it would be prudent to review this regularly yourself as your continued usage of “%1$s” after changes mean you agree to be legally bound by these terms as they are updated and/or amended.<br />
|
||||
<br />
|
||||
Our forums are powered by phpBB (hereinafter “they”, “them”, “their”, “phpBB software”, “www.phpbb.com”, “phpBB Group”, “phpBB Teams”) which is a bulletin board solution released under the “<a href="http://www.gnu.org/licenses/gpl.html">General Public License</a>” (hereinafter “GPL”) and can be downloaded from <a href="http://www.phpbb.com/">www.phpbb.com</a>. The phpBB software only facilitates internet based discussions, the phpBB Group are not responsible for what we allow and/or disallow as permissible content and/or conduct. For further information about phpBB, please see: <a href="http://www.phpbb.com/">http://www.phpbb.com/</a>.<br />
|
||||
Our forums are powered by phpBB (hereinafter “they”, “them”, “their”, “phpBB software”, “www.phpbb.com”, “phpBB Group”, “phpBB Teams”) which is a bulletin board solution released under the “<a href="http://opensource.org/licenses/gpl-license.php">General Public License</a>” (hereinafter “GPL”) and can be downloaded from <a href="http://www.phpbb.com/">www.phpbb.com</a>. The phpBB software only facilitates internet based discussions, the phpBB Group are not responsible for what we allow and/or disallow as permissible content and/or conduct. For further information about phpBB, please see: <a href="http://www.phpbb.com/">http://www.phpbb.com/</a>.<br />
|
||||
<br />
|
||||
You agree not to post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate any laws be it of your country, the country where “%1$s” is hosted or International Law. Doing so may lead to you being immediately and permanently banned, with notification of your Internet Service Provider if deemed required by us. The IP address of all posts are recorded to aid in enforcing these conditions. You agree that “%1$s” have the right to remove, edit, move or close any topic at any time should we see fit. As a user you agree to any information you have entered to being stored in a database. While this information will not be disclosed to any third party without your consent, neither “%1$s” nor phpBB shall be held responsible for any hacking attempt that may lead to the data being compromised.
|
||||
',
|
||||
|
@ -104,10 +104,10 @@ $lang = array_merge($lang, array(
|
|||
'BOOKMARKS_REMOVED' => 'Bookmarks removed successfully.',
|
||||
|
||||
'CANNOT_EDIT_MESSAGE_TIME' => 'You can no longer edit or delete that message.',
|
||||
'CANNOT_MOVE_TO_SAME_FOLDER'=> 'Messages can not be moved to the folder you want to remove.',
|
||||
'CANNOT_MOVE_FROM_SPECIAL' => 'Messages can not be moved from the outbox.',
|
||||
'CANNOT_RENAME_FOLDER' => 'This folder can not be renamed.',
|
||||
'CANNOT_REMOVE_FOLDER' => 'This folder can not be removed.',
|
||||
'CANNOT_MOVE_TO_SAME_FOLDER'=> 'Messages cannot be moved to the folder you want to remove.',
|
||||
'CANNOT_MOVE_FROM_SPECIAL' => 'Messages cannot be moved from the outbox.',
|
||||
'CANNOT_RENAME_FOLDER' => 'This folder cannot be renamed.',
|
||||
'CANNOT_REMOVE_FOLDER' => 'This folder cannot be removed.',
|
||||
'CHANGE_DEFAULT_GROUP' => 'Change default group',
|
||||
'CHANGE_PASSWORD' => 'Change password',
|
||||
'CLICK_RETURN_FOLDER' => '%1$sReturn to your “%3$s” folder%2$s',
|
||||
|
|
|
@ -471,7 +471,6 @@ switch ($mode)
|
|||
if ($member['user_sig'])
|
||||
{
|
||||
$member['user_sig'] = censor_text($member['user_sig']);
|
||||
$member['user_sig'] = str_replace("\n", '<br />', $member['user_sig']);
|
||||
|
||||
if ($member['user_sig_bbcode_bitfield'])
|
||||
{
|
||||
|
@ -480,6 +479,7 @@ switch ($mode)
|
|||
$bbcode->bbcode_second_pass($member['user_sig'], $member['user_sig_bbcode_uid'], $member['user_sig_bbcode_bitfield']);
|
||||
}
|
||||
|
||||
$member['user_sig'] = bbcode_nl2br($member['user_sig']);
|
||||
$member['user_sig'] = smiley_text($member['user_sig']);
|
||||
}
|
||||
|
||||
|
|
|
@ -113,6 +113,7 @@ switch ($mode)
|
|||
else
|
||||
{
|
||||
upload_popup();
|
||||
garbage_collection();
|
||||
exit;
|
||||
}
|
||||
break;
|
||||
|
@ -323,6 +324,11 @@ if ($mode == 'bump')
|
|||
trigger_error('BUMP_ERROR');
|
||||
}
|
||||
|
||||
// Subject length limiting to 60 characters if first post...
|
||||
if ($mode == 'post' || ($mode == 'edit' && $post_data['topic_first_post_id'] == $post_data['post_id']))
|
||||
{
|
||||
$template->assign_var('S_NEW_MESSAGE', true);
|
||||
}
|
||||
|
||||
// Determine some vars
|
||||
if (isset($post_data['poster_id']) && $post_data['poster_id'] == ANONYMOUS)
|
||||
|
@ -333,6 +339,7 @@ else
|
|||
{
|
||||
$post_data['quote_username'] = isset($post_data['username']) ? $post_data['username'] : '';
|
||||
}
|
||||
|
||||
$post_data['post_edit_locked'] = (isset($post_data['post_edit_locked'])) ? (int) $post_data['post_edit_locked'] : 0;
|
||||
$post_data['post_subject'] = (in_array($mode, array('quote', 'edit'))) ? $post_data['post_subject'] : ((isset($post_data['topic_title'])) ? $post_data['topic_title'] : '');
|
||||
$post_data['topic_time_limit'] = (isset($post_data['topic_time_limit'])) ? (($post_data['topic_time_limit']) ? (int) $post_data['topic_time_limit'] / 86400 : (int) $post_data['topic_time_limit']) : 0;
|
||||
|
|
|
@ -761,7 +761,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
|||
$u_forum_id = $forum_id;
|
||||
}
|
||||
|
||||
$view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$u_forum_id&t=$result_topic_id&hilit=$u_hilit");
|
||||
$view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$u_forum_id&t=$result_topic_id" . (($u_hilit) ? "&hilit=$u_hilit" : ''));
|
||||
|
||||
$replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies'];
|
||||
|
||||
|
@ -776,6 +776,8 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
|||
$posts_unapproved = ($row['topic_approved'] && $row['topic_replies'] < $row['topic_replies_real'] && $auth->acl_get('m_approve', $forum_id)) ? true : false;
|
||||
$u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&t=$result_topic_id", true, $user->session_id) : '';
|
||||
|
||||
$row['topic_title'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">$1</span>', $row['topic_title']);
|
||||
|
||||
$tpl_ary = array(
|
||||
'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
|
||||
'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
|
||||
|
@ -836,18 +838,19 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
|||
{
|
||||
// now find context for the searched words
|
||||
$row['post_text'] = get_context($row['post_text'], array_filter(explode('|', $hilit), 'strlen'), $return_chars);
|
||||
$row['post_text'] = str_replace("\n", '<br />', $row['post_text']);
|
||||
$row['post_text'] = bbcode_nl2br($row['post_text']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$row['post_text'] = str_replace("\n", '<br />', $row['post_text']);
|
||||
|
||||
// Second parse bbcode here
|
||||
if ($row['bbcode_bitfield'])
|
||||
{
|
||||
$bbcode->bbcode_second_pass($row['post_text'], $row['bbcode_uid'], $row['bbcode_bitfield']);
|
||||
}
|
||||
|
||||
$row['post_text'] = bbcode_nl2br($row['post_text']);
|
||||
$row['post_text'] = smiley_text($row['post_text']);
|
||||
|
||||
if (!empty($attachments[$row['post_id']]))
|
||||
{
|
||||
parse_attachments($forum_id, $row['post_text'], $attachments[$row['post_id']], $update_count);
|
||||
|
@ -855,15 +858,13 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
|||
// we only display inline attachments
|
||||
unset($attachments[$row['post_id']]);
|
||||
}
|
||||
|
||||
// Always process smilies after parsing bbcodes
|
||||
$row['post_text'] = smiley_text($row['post_text']);
|
||||
}
|
||||
|
||||
if ($hilit)
|
||||
{
|
||||
// post highlighting
|
||||
$row['post_text'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">$1</span>', $row['post_text']);
|
||||
$row['post_subject'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">$1</span>', $row['post_subject']);
|
||||
}
|
||||
|
||||
$tpl_ary = array(
|
||||
|
@ -890,7 +891,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
|||
|
||||
'U_VIEW_TOPIC' => $view_topic_url,
|
||||
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id),
|
||||
'U_VIEW_POST' => (!empty($row['post_id'])) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=" . $row['topic_id'] . '&p=' . $row['post_id'] . '&hilit=' . $u_hilit) . '#p' . $row['post_id'] : '')
|
||||
'U_VIEW_POST' => (!empty($row['post_id'])) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=" . $row['topic_id'] . '&p=' . $row['post_id'] . (($u_hilit) ? '&hilit=' . $u_hilit : '')) . '#p' . $row['post_id'] : '')
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -936,9 +937,9 @@ while ($row = $db->sql_fetchrow($result))
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!$auth->acl_get('f_list', $row['forum_id']) || $row['forum_type'] == FORUM_LINK || ($row['forum_password'] && !$row['user_id']))
|
||||
if ($row['forum_type'] == FORUM_LINK || ($row['forum_password'] && !$row['user_id']))
|
||||
{
|
||||
// if the user does not have permissions to list this forum skip to the next branch
|
||||
// if this forum is a link or password protected (user has not entered the password yet) then skip to the next branch
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -961,9 +962,9 @@ while ($row = $db->sql_fetchrow($result))
|
|||
|
||||
$right = $row['right_id'];
|
||||
|
||||
if (!$auth->acl_get('f_search', $row['forum_id']))
|
||||
if ($auth->acl_gets('!f_search', '!f_list', $row['forum_id']))
|
||||
{
|
||||
// if the user does not have permissions to search this forum skip only this forum/category
|
||||
// if the user does not have permissions to search or see this forum skip only this forum/category
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -1041,45 +1042,49 @@ $template->assign_vars(array(
|
|||
'S_IN_SEARCH' => true,
|
||||
));
|
||||
|
||||
// Handle large objects differently for Oracle and MSSQL
|
||||
switch ($db->sql_layer)
|
||||
// only show recent searches to search administrators
|
||||
if ($auth->acl_get('a_search'))
|
||||
{
|
||||
case 'oracle':
|
||||
$sql = 'SELECT search_time, search_keywords
|
||||
FROM ' . SEARCH_RESULTS_TABLE . '
|
||||
WHERE dbms_lob.getlength(search_keywords) > 0
|
||||
ORDER BY search_time DESC';
|
||||
break;
|
||||
// Handle large objects differently for Oracle and MSSQL
|
||||
switch ($db->sql_layer)
|
||||
{
|
||||
case 'oracle':
|
||||
$sql = 'SELECT search_time, search_keywords
|
||||
FROM ' . SEARCH_RESULTS_TABLE . '
|
||||
WHERE dbms_lob.getlength(search_keywords) > 0
|
||||
ORDER BY search_time DESC';
|
||||
break;
|
||||
|
||||
case 'mssql':
|
||||
case 'mssql_odbc':
|
||||
$sql = 'SELECT search_time, search_keywords
|
||||
FROM ' . SEARCH_RESULTS_TABLE . '
|
||||
WHERE DATALENGTH(search_keywords) > 0
|
||||
ORDER BY search_time DESC';
|
||||
break;
|
||||
|
||||
default:
|
||||
$sql = 'SELECT search_time, search_keywords
|
||||
FROM ' . SEARCH_RESULTS_TABLE . '
|
||||
WHERE search_keywords <> \'\'
|
||||
ORDER BY search_time DESC';
|
||||
break;
|
||||
}
|
||||
$result = $db->sql_query_limit($sql, 5);
|
||||
|
||||
case 'mssql':
|
||||
case 'mssql_odbc':
|
||||
$sql = 'SELECT search_time, search_keywords
|
||||
FROM ' . SEARCH_RESULTS_TABLE . '
|
||||
WHERE DATALENGTH(search_keywords) > 0
|
||||
ORDER BY search_time DESC';
|
||||
break;
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$keywords = $row['search_keywords'];
|
||||
|
||||
default:
|
||||
$sql = 'SELECT search_time, search_keywords
|
||||
FROM ' . SEARCH_RESULTS_TABLE . '
|
||||
WHERE search_keywords <> \'\'
|
||||
ORDER BY search_time DESC';
|
||||
break;
|
||||
$template->assign_block_vars('recentsearch', array(
|
||||
'KEYWORDS' => $keywords,
|
||||
'TIME' => $user->format_date($row['search_time']),
|
||||
|
||||
'U_KEYWORDS' => append_sid("{$phpbb_root_path}search.$phpEx", 'keywords=' . urlencode(htmlspecialchars_decode($keywords)))
|
||||
));
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
$result = $db->sql_query_limit($sql, 5);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$keywords = $row['search_keywords'];
|
||||
|
||||
$template->assign_block_vars('recentsearch', array(
|
||||
'KEYWORDS' => $keywords,
|
||||
'TIME' => $user->format_date($row['search_time']),
|
||||
|
||||
'U_KEYWORDS' => append_sid("{$phpbb_root_path}search.$phpEx", 'keywords=' . urlencode(htmlspecialchars_decode($keywords)))
|
||||
));
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Output the basic page
|
||||
page_header($user->lang['SEARCH']);
|
||||
|
|
|
@ -46,7 +46,7 @@ if (strspn($sid, 'abcdefABCDEF0123456789') !== strlen($sid))
|
|||
// happen to have a current session it will output nothing. We will also cache the
|
||||
// resulting CSS data for five minutes ... anything to reduce the load on the SQL
|
||||
// server a little
|
||||
if ($id && $sid)
|
||||
if ($id)
|
||||
{
|
||||
if (empty($acm_type) || empty($dbms))
|
||||
{
|
||||
|
@ -101,6 +101,11 @@ if ($id && $sid)
|
|||
$theme = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!$theme)
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($user['user_id'] == ANONYMOUS)
|
||||
{
|
||||
$user['user_lang'] = $config['default_lang'];
|
||||
|
@ -111,25 +116,23 @@ if ($id && $sid)
|
|||
$sql = 'SELECT *
|
||||
FROM ' . STYLES_IMAGESET_DATA_TABLE . '
|
||||
WHERE imageset_id = ' . $theme['imageset_id'] . "
|
||||
AND image_lang IN('" . $db->sql_escape($user_image_lang) . "', '')";
|
||||
AND image_lang IN ('" . $db->sql_escape($user_image_lang) . "', '')";
|
||||
$result = $db->sql_query($sql, 3600);
|
||||
|
||||
$img_array = array();
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$img_array[$row['image_name']] = $row;
|
||||
}
|
||||
|
||||
if (!$theme)
|
||||
{
|
||||
exit;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// gzip_compression
|
||||
if ($config['gzip_compress'])
|
||||
{
|
||||
if (@extension_loaded('zlib') && !headers_sent())
|
||||
// IE6 is not able to compress the style (do not ask us why!)
|
||||
$browser = (!empty($_SERVER['HTTP_USER_AGENT'])) ? strtolower(htmlspecialchars((string) $_SERVER['HTTP_USER_AGENT'])) : '';
|
||||
|
||||
if ($browser && strpos($browser, 'msie 6.0') === false && @extension_loaded('zlib') && !headers_sent())
|
||||
{
|
||||
ob_start('ob_gzhandler');
|
||||
}
|
||||
|
@ -171,8 +174,6 @@ if ($id && $sid)
|
|||
}
|
||||
}
|
||||
|
||||
header('Content-type: text/css; charset=UTF-8');
|
||||
|
||||
if ($recache)
|
||||
{
|
||||
include_once($phpbb_root_path . 'includes/acp/acp_styles.' . $phpEx);
|
||||
|
@ -191,16 +192,20 @@ if ($id && $sid)
|
|||
$db->sql_query($sql);
|
||||
|
||||
$cache->destroy('sql', STYLES_THEME_TABLE);
|
||||
}
|
||||
|
||||
header('Cache-Control: private, no-cache="set-cookie"');
|
||||
// Only set the expire time if the theme changed data is older than 30 minutes - to cope with changes from the ACP
|
||||
if ($recache || $theme['theme_mtime'] > (time() - 1800))
|
||||
{
|
||||
header('Expires: 0');
|
||||
header('Pragma: no-cache');
|
||||
}
|
||||
else
|
||||
{
|
||||
header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + $expire_time));
|
||||
}
|
||||
|
||||
header('Content-type: text/css; charset=UTF-8');
|
||||
|
||||
// Parse Theme Data
|
||||
$replace = array(
|
||||
'{T_THEME_PATH}' => "{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme',
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
|
||||
<!-- BEGIN bool -->
|
||||
<!-- IF bool.FIELD_LENGTH eq 1 -->
|
||||
<!-- BEGIN options --><label for="{bool.FIELD_IDENT}_{bool.options.OPTION_ID}"><input type="radio" name="{bool.FIELD_IDENT}" id="{bool.FIELD_IDENT}_{bool.options.OPTION_ID}" value="{bool.options.OPTION_ID}"{bool.options.CHECKED} /> {bool.options.VALUE}</label> <!-- END options -->
|
||||
<!-- BEGIN options --><label for="{bool.FIELD_IDENT}_{bool.options.OPTION_ID}"><input type="radio" class="radio" name="{bool.FIELD_IDENT}" id="{bool.FIELD_IDENT}_{bool.options.OPTION_ID}" value="{bool.options.OPTION_ID}"{bool.options.CHECKED} /> {bool.options.VALUE}</label> <!-- END options -->
|
||||
<!-- ELSE -->
|
||||
<input type="checkbox" name="{bool.FIELD_IDENT}" id="{bool.FIELD_IDENT}"<!-- IF bool.FIELD_VALUE --> checked="checked"<!-- ENDIF --> />
|
||||
<input type="checkbox" class="radio" name="{bool.FIELD_IDENT}" id="{bool.FIELD_IDENT}"<!-- IF bool.FIELD_VALUE --> checked="checked"<!-- ENDIF --> />
|
||||
<!-- ENDIF -->
|
||||
<!-- END bool -->
|
||||
|
||||
|
|
|
@ -227,7 +227,8 @@ function addquote(post_id, username)
|
|||
theSelection = theSelection.replace(/<br\/>/ig, '\n');
|
||||
theSelection = theSelection.replace(/<\;/ig, '<');
|
||||
theSelection = theSelection.replace(/>\;/ig, '>');
|
||||
theSelection = theSelection.replace(/&\;/ig, '&');
|
||||
theSelection = theSelection.replace(/&\;/ig, '&');
|
||||
theSelection = theSelection.replace(/ \;/ig, ' ');
|
||||
}
|
||||
else if (document.all)
|
||||
{
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
<label for="username">{L_USERNAME}:</label> <input type="text" name="username" id="username" size="10" class="inputbox" title="{L_USERNAME}" />
|
||||
<label for="password">{L_PASSWORD}:</label> <input type="password" name="password" id="password" size="10" class="inputbox" title="{L_PASSWORD}" />
|
||||
<!-- IF S_AUTOLOGIN_ENABLED -->
|
||||
| <label for="autologin">{L_LOG_ME_IN} <input type="checkbox" name="autologin" id="autologin" />
|
||||
| <label for="autologin">{L_LOG_ME_IN} <input type="checkbox" name="autologin" id="autologin" /></label>
|
||||
<!-- ENDIF -->
|
||||
</label> <input type="submit" name="login" value="{L_LOGIN}" class="button2" />
|
||||
<input type="submit" name="login" value="{L_LOGIN}" class="button2" />
|
||||
</fieldset>
|
||||
</form>
|
||||
<!-- ENDIF -->
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<!-- ELSE -->
|
||||
<fieldset class="jumpbox">
|
||||
<!-- ENDIF -->
|
||||
<label for="f" accesskey="j"><!-- IF S_IN_MCP and S_MERGE_SELECT -->{L_SELECT_TOPICS_FROM}<!-- ELSEIF S_IN_MCP -->{L_MODERATE_FORUM}<!-- ELSE -->{L_JUMP_TO}<!-- ENDIF -->: </label>
|
||||
<label for="f" accesskey="j"><!-- IF S_IN_MCP and S_MERGE_SELECT -->{L_SELECT_TOPICS_FROM}<!-- ELSEIF S_IN_MCP -->{L_MODERATE_FORUM}<!-- ELSE -->{L_JUMP_TO}<!-- ENDIF -->:</label>
|
||||
<select name="f" id="f" onchange="if(this.options[this.selectedIndex].value != -1){ document.forms['jumpbox'].submit() }">
|
||||
<!-- BEGIN jumpbox_forums -->
|
||||
<!-- IF jumpbox_forums.S_FORUM_COUNT == 1 --><option value="-1">------------------</option><!-- ENDIF -->
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
<fieldset>
|
||||
<dl>
|
||||
<dt><label for="ban">{L_BAN_CELL}: </label></dt>
|
||||
<dt><label for="ban">{L_BAN_CELL}:</label></dt>
|
||||
<dd><label for="ban"><textarea name="ban" id="ban" class="inputbox" cols="40" rows="3">{USERNAMES}</textarea></label></dd>
|
||||
<!-- IF S_USERNAME_BAN --><dd><strong><a href="#" onclick="window.open('{U_FIND_USER}', '_phpbbsearch', 'height=500, resizable=yes, scrollbars=yes, width=740'); return false;">{L_FIND_USERNAME}</a></strong></dd><!-- ENDIF -->
|
||||
</dl>
|
||||
|
|
|
@ -22,10 +22,10 @@
|
|||
<!-- IF U_SWITCH_PERMISSIONS --> [ <a href="{U_SWITCH_PERMISSIONS}">{L_USE_PERMISSIONS}</a> ]<!-- ENDIF -->
|
||||
</dd>
|
||||
<!-- IF not AVATAR_IMG -->
|
||||
<!-- IF RANK_TITLE --><dt>{L_RANK}:</dt><dd>{RANK_TITLE}</dd><!-- ENDIF -->
|
||||
<!-- IF RANK_IMG --><dt><!-- IF RANK_TITLE --> <!-- ELSE -->{L_RANK}:<!-- ENDIF --></dt><dd>{RANK_IMG}</dd><!-- ENDIF -->
|
||||
<!-- IF RANK_TITLE --><dt>{L_RANK}:</dt> <dd>{RANK_TITLE}</dd><!-- ENDIF -->
|
||||
<!-- IF RANK_IMG --><dt><!-- IF RANK_TITLE --> <!-- ELSE -->{L_RANK}:<!-- ENDIF --></dt> <dd>{RANK_IMG}</dd><!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_USER_INACTIVE --><dt>{L_USER_IS_INACTIVE}:</dt><dd>{USER_INACTIVE_REASON}</dd><!-- ENDIF -->
|
||||
<!-- IF S_USER_INACTIVE --><dt>{L_USER_IS_INACTIVE}:</dt> <dd>{USER_INACTIVE_REASON}</dd><!-- ENDIF -->
|
||||
<!-- IF LOCATION --><dt>{L_LOCATION}:</dt> <dd>{LOCATION}</dd><!-- ENDIF -->
|
||||
<!-- IF AGE --><dt>{L_AGE}:</dt> <dd>{AGE}</dd><!-- ENDIF -->
|
||||
<!-- IF OCCUPATION --><dt>{L_OCCUPATION}:</dt> <dd>{OCCUPATION}</dd><!-- ENDIF -->
|
||||
|
@ -96,8 +96,8 @@
|
|||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
|
||||
<h3>{L_SIGNATURE}</h3>
|
||||
|
||||
<div class="postbody"><div class="content">{SIGNATURE}</div></div>
|
||||
|
||||
<div class="postbody"><div class="signature" style="border-top:none; margin-top: 0;">{SIGNATURE}</div></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
|
|
|
@ -124,7 +124,7 @@
|
|||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
|
||||
<ul class="linklist navlinks">
|
||||
<li><a class="icon-home" href="{U_INDEX}" accesskey="h">{L_INDEX}</a> <!-- BEGIN navlinks --> <strong>‹</strong> <a href="{navlinks.U_VIEW_FORUM}">{navlinks.FORUM_NAME}</a><!-- END navlinks --></li>
|
||||
<li class="icon-home"><a href="{U_INDEX}" accesskey="h">{L_INDEX}</a> <!-- BEGIN navlinks --> <strong>‹</strong> <a href="{navlinks.U_VIEW_FORUM}">{navlinks.FORUM_NAME}</a><!-- END navlinks --></li>
|
||||
|
||||
<li class="rightside"><a href="#" onclick="fontsizeup(); return false;" class="fontsize" title="{L_CHANGE_FONT_SIZE}">{L_CHANGE_FONT_SIZE}</a></li>
|
||||
|
||||
|
@ -134,28 +134,27 @@
|
|||
<!-- IF U_PRINT_PM --><li class="rightside"><a href="{U_PRINT_PM}" title="{L_PRINT_PM}" accesskey="p" class="print">{L_PRINT_PM}</a></li><!-- ENDIF -->
|
||||
</ul>
|
||||
|
||||
<ul class="linklist">
|
||||
<!-- IF not S_IS_BOT -->
|
||||
<!-- IF S_USER_LOGGED_IN -->
|
||||
<li>
|
||||
<a href="{U_PROFILE}" title="{L_PROFILE}" accesskey="u" class="icon-ucp">{L_PROFILE}</a>
|
||||
<!-- IF S_DISPLAY_PM --> (<a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}</a>)<!-- ENDIF --> •
|
||||
<a href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a>
|
||||
<!-- IF U_RESTORE_PERMISSIONS --> •
|
||||
<a href="{U_RESTORE_PERMISSIONS}">{L_RESTORE_PERMISSIONS}</a>
|
||||
<!-- ENDIF -->
|
||||
</li>
|
||||
<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
<li class="rightside">
|
||||
<a href="{U_FAQ}" title="{L_FAQ_EXPLAIN}" class="icon-faq">{L_FAQ}</a>
|
||||
<!-- IF not S_IS_BOT -->
|
||||
<!-- IF S_DISPLAY_MEMBERLIST --><a href="{U_MEMBERLIST}" title="{L_MEMBERLIST_EXPLAIN}" class="icon-members">{L_MEMBERLIST}</a> <!-- ENDIF -->
|
||||
<!-- IF not S_USER_LOGGED_IN --><a href="{U_REGISTER}" class="icon-register">{L_REGISTER}</a> <!-- ENDIF -->
|
||||
<a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="l" class="icon-logout">{L_LOGIN_LOGOUT}</a>
|
||||
<!-- IF not S_IS_BOT and S_USER_LOGGED_IN -->
|
||||
<ul class="linklist leftside">
|
||||
<li class="icon-ucp">
|
||||
<a href="{U_PROFILE}" title="{L_PROFILE}" accesskey="u">{L_PROFILE}</a>
|
||||
<!-- IF S_DISPLAY_PM --> (<a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}</a>)<!-- ENDIF --> •
|
||||
<a href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a>
|
||||
<!-- IF U_RESTORE_PERMISSIONS --> •
|
||||
<a href="{U_RESTORE_PERMISSIONS}">{L_RESTORE_PERMISSIONS}</a>
|
||||
<!-- ENDIF -->
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<ul class="linklist rightside">
|
||||
<li class="icon-faq"><a href="{U_FAQ}" title="{L_FAQ_EXPLAIN}">{L_FAQ}</a></li>
|
||||
<!-- IF not S_IS_BOT -->
|
||||
<!-- IF S_DISPLAY_MEMBERLIST --><li class="icon-members"><a href="{U_MEMBERLIST}" title="{L_MEMBERLIST_EXPLAIN}">{L_MEMBERLIST}</a></li><!-- ENDIF -->
|
||||
<!-- IF not S_USER_LOGGED_IN --><li class="icon-register"><a href="{U_REGISTER}">{L_REGISTER}</a></li><!-- ENDIF -->
|
||||
<li class="icon-logout"><a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="l">{L_LOGIN_LOGOUT}</a></li>
|
||||
<!-- ENDIF -->
|
||||
</ul>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
<!-- IF S_POST_ACTION or S_PRIVMSGS or S_EDIT_DRAFT -->
|
||||
<dl style="clear: left;">
|
||||
<dt><label for="subject">{L_SUBJECT}:</label></dt>
|
||||
<dd><input type="text" name="subject" id="subject" size="45" maxlength="64" tabindex="2" value="{SUBJECT}{DRAFT_SUBJECT}" class="inputbox autowidth" /></dd>
|
||||
<dd><input type="text" name="subject" id="subject" size="45" maxlength="<!-- IF S_NEW_MESSAGE -->60<!-- ELSE -->64<!-- ENDIF -->" tabindex="2" value="{SUBJECT}{DRAFT_SUBJECT}" class="inputbox autowidth" /></dd>
|
||||
</dl>
|
||||
<!-- IF S_CONFIRM_CODE -->
|
||||
<dl>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue