mirror of
https://github.com/phpbb/phpbb.git
synced 2025-09-12 09:10:44 +02:00
Compare commits
1 Commits
release-3.
...
release-3.
Author | SHA1 | Date | |
---|---|---|---|
|
21ce021519 |
0
phpBB/adm/images/progress_bar.gif
Normal file → Executable file
0
phpBB/adm/images/progress_bar.gif
Normal file → Executable file
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
@@ -45,7 +45,7 @@ define('IN_ADMIN', true);
|
||||
$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : './';
|
||||
|
||||
// Some oft used variables
|
||||
$safe_mode = (@ini_get('safe_mode') == '1' || strtolower(@ini_get('safe_mode')) === 'on') ? true : false;
|
||||
$safe_mode = (@ini_get('safe_mode') == '1' || @strtolower(ini_get('safe_mode')) === 'on') ? true : false;
|
||||
$file_uploads = (@ini_get('file_uploads') == '1' || strtolower(@ini_get('file_uploads')) === 'on') ? true : false;
|
||||
$module_id = request_var('i', '');
|
||||
$mode = request_var('mode', '');
|
||||
@@ -116,7 +116,6 @@ function adm_page_header($page_title)
|
||||
'ROOT_PATH' => $phpbb_admin_path,
|
||||
|
||||
'U_LOGOUT' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=logout'),
|
||||
'U_ADM_LOGOUT' => append_sid("{$phpbb_admin_path}index.$phpEx", 'action=admlogout'),
|
||||
'U_ADM_INDEX' => append_sid("{$phpbb_admin_path}index.$phpEx"),
|
||||
'U_INDEX' => append_sid("{$phpbb_root_path}index.$phpEx"),
|
||||
|
||||
@@ -131,7 +130,7 @@ function adm_page_header($page_title)
|
||||
'ICON_MOVE_UP' => '<img src="' . $phpbb_admin_path . 'images/icon_up.gif" alt="' . $user->lang['MOVE_UP'] . '" title="' . $user->lang['MOVE_UP'] . '" />',
|
||||
'ICON_MOVE_UP_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_up_disabled.gif" alt="' . $user->lang['MOVE_UP'] . '" title="' . $user->lang['MOVE_UP'] . '" />',
|
||||
'ICON_MOVE_DOWN' => '<img src="' . $phpbb_admin_path . 'images/icon_down.gif" alt="' . $user->lang['MOVE_DOWN'] . '" title="' . $user->lang['MOVE_DOWN'] . '" />',
|
||||
'ICON_MOVE_DOWN_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_down_disabled.gif" alt="' . $user->lang['MOVE_DOWN'] . '" title="' . $user->lang['MOVE_DOWN'] . '" />',
|
||||
'ICON_MOVE_DOWN_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_down_disabled.gif" alt="' . $user->lang['MOVE_DOWN'] . '" title="' . $user->lang['MOVE_DOWN'] . '" />',
|
||||
'ICON_EDIT' => '<img src="' . $phpbb_admin_path . 'images/icon_edit.gif" alt="' . $user->lang['EDIT'] . '" title="' . $user->lang['EDIT'] . '" />',
|
||||
'ICON_EDIT_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_edit_disabled.gif" alt="' . $user->lang['EDIT'] . '" title="' . $user->lang['EDIT'] . '" />',
|
||||
'ICON_DELETE' => '<img src="' . $phpbb_admin_path . 'images/icon_delete.gif" alt="' . $user->lang['DELETE'] . '" title="' . $user->lang['DELETE'] . '" />',
|
||||
@@ -263,12 +262,6 @@ function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars)
|
||||
$tpl = '';
|
||||
$name = 'config[' . $config_key . ']';
|
||||
|
||||
// Make sure there is no notice printed out for non-existent config options (we simply set them)
|
||||
if (!isset($new[$config_key]))
|
||||
{
|
||||
$new[$config_key] = '';
|
||||
}
|
||||
|
||||
switch ($tpl_type[0])
|
||||
{
|
||||
case 'text':
|
||||
@@ -308,7 +301,7 @@ function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars)
|
||||
|
||||
case 'select':
|
||||
case 'custom':
|
||||
|
||||
|
||||
$return = '';
|
||||
|
||||
if (isset($vars['method']))
|
||||
@@ -347,7 +340,7 @@ function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars)
|
||||
{
|
||||
$args = array($new[$config_key], $key);
|
||||
}
|
||||
|
||||
|
||||
$return = call_user_func_array($call, $args);
|
||||
|
||||
if ($tpl_type[0] == 'select')
|
||||
@@ -383,19 +376,19 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
|
||||
$type = 0;
|
||||
$min = 1;
|
||||
$max = 2;
|
||||
|
||||
|
||||
foreach ($config_vars as $config_name => $config_definition)
|
||||
{
|
||||
if (!isset($cfg_array[$config_name]) || strpos($config_name, 'legend') !== false)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (!isset($config_definition['validate']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
$validator = explode(':', $config_definition['validate']);
|
||||
|
||||
// Validate a bit. ;) (0 = type, 1 = min, 2= max)
|
||||
@@ -554,14 +547,14 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
|
||||
function validate_range($value_ary, &$error)
|
||||
{
|
||||
global $user;
|
||||
|
||||
|
||||
$column_types = array(
|
||||
'BOOL' => array('php_type' => 'int', 'min' => 0, 'max' => 1),
|
||||
'USINT' => array('php_type' => 'int', 'min' => 0, 'max' => 65535),
|
||||
'UINT' => array('php_type' => 'int', 'min' => 0, 'max' => (int) 0x7fffffff),
|
||||
'INT' => array('php_type' => 'int', 'min' => (int) 0x80000000, 'max' => (int) 0x7fffffff),
|
||||
'TINT' => array('php_type' => 'int', 'min' => -128, 'max' => 127),
|
||||
|
||||
|
||||
'VCHAR' => array('php_type' => 'string', 'min' => 0, 'max' => 255),
|
||||
);
|
||||
foreach ($value_ary as $value)
|
||||
@@ -588,7 +581,7 @@ function validate_range($value_ary, &$error)
|
||||
}
|
||||
break;
|
||||
|
||||
case 'int':
|
||||
case 'int':
|
||||
$min = (isset($column[1])) ? max($column[1],$type['min']) : $type['min'];
|
||||
$max = (isset($column[2])) ? min($column[2],$type['max']) : $type['max'];
|
||||
if ($value['value'] < $min)
|
||||
|
@@ -97,11 +97,11 @@
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="unbanreason">{L_BAN_REASON}:</label></dt>
|
||||
<dd><textarea style="border: 0;" class="text full" disabled="disabled" name="unbanreason" id="unbanreason" rows="5" cols="80"> </textarea></dd>
|
||||
<dd><input style="border: 0;" type="text" class="text full" disabled="disabled" name="unbanreason" id="unbanreason" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="unbangivereason">{L_BAN_GIVE_REASON}:</label></dt>
|
||||
<dd><textarea style="border: 0;" class="text full" disabled="disabled" name="unbangivereason" id="unbangivereason" rows="5" cols="80"> </textarea></dd>
|
||||
<dd><input style="border: 0;" type="text" class="text full" disabled="disabled" name="unbangivereason" id="unbangivereason" /></dd>
|
||||
</dl>
|
||||
|
||||
<p class="submit-buttons">
|
||||
|
@@ -17,49 +17,52 @@
|
||||
<dd><label><input type="radio" class="radio" id="enable_confirm" name="enable_confirm" value="1"<!-- IF REG_ENABLE --> checked="checked"<!-- ENDIF --> /> {L_ENABLED}</label>
|
||||
<label><input type="radio" class="radio" name="enable_confirm" value="0"<!-- IF not REG_ENABLE --> checked="checked"<!-- ENDIF --> /> {L_DISABLED}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="max_reg_attempts">{L_REG_LIMIT}:</label><br /><span>{L_REG_LIMIT_EXPLAIN}</span></dt>
|
||||
<dd><input id="max_reg_attempts" type="text" size="4" maxlength="4" name="max_reg_attempts" value="{REG_LIMIT}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="enable_post_confirm">{L_VISUAL_CONFIRM_POST}:</label><br /><span>{L_VISUAL_CONFIRM_POST_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" id="enable_post_confirm" name="enable_post_confirm" value="1"<!-- IF POST_ENABLE --> checked="checked"<!-- ENDIF --> /> {L_ENABLED}</label>
|
||||
<label><input type="radio" class="radio" name="enable_post_confirm" value="0"<!-- IF not POST_ENABLE --> checked="checked"<!-- ENDIF --> /> {L_DISABLED}</label></dd>
|
||||
</dl>
|
||||
<!-- IF GD -->
|
||||
<dl>
|
||||
<dt><label for="confirm_refresh">{L_VISUAL_CONFIRM_REFRESH}:</label><br /><span>{L_VISUAL_CONFIRM_REFRESH_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" id="confirm_refresh" name="confirm_refresh" value="1"<!-- IF CONFIRM_REFRESH --> checked="checked"<!-- ENDIF --> /> {L_ENABLED}</label>
|
||||
<label><input type="radio" class="radio" name="confirm_refresh" value="0"<!-- IF not CONFIRM_REFRESH --> checked="checked"<!-- ENDIF --> /> {L_DISABLED}</label></dd>
|
||||
<dt><label for="captcha_gd">{L_CAPTCHA_GD}:</label><br /><span>{L_CAPTCHA_GD_EXPLAIN}</span></dt>
|
||||
<dd><label><input id="captcha_gd" name="captcha_gd" value="1" class="radio" type="radio"<!-- IF CAPTCHA_GD --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input name="captcha_gd" value="0" class="radio" type="radio"<!-- IF not CAPTCHA_GD --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_AVAILABLE_CAPTCHAS}</legend>
|
||||
<dl>
|
||||
<dt><label for="captcha_select">{L_CAPTCHA_SELECT}:</label><br /><span>{L_CAPTCHA_SELECT_EXPLAIN}</span></dt>
|
||||
<dd><select id="captcha_select" name="select_captcha" onchange="(document.getElementById('acp_captcha')).submit()" >{CAPTCHA_SELECT}</select></dd>
|
||||
<dt><label for="captcha_gd_foreground_noise">{L_CAPTCHA_GD_FOREGROUND_NOISE}:</label><br /><span>{L_CAPTCHA_GD_FOREGROUND_NOISE_EXPLAIN}</span></dt>
|
||||
<dd><label><input id="captcha_gd_foreground_noise" name="captcha_gd_foreground_noise" value="1" class="radio" type="radio"<!-- IF CAPTCHA_GD_FOREGROUND_NOISE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input name="captcha_gd_foreground_noise" value="0" class="radio" type="radio"<!-- IF not CAPTCHA_GD_FOREGROUND_NOISE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<!-- IF S_CAPTCHA_HAS_CONFIG -->
|
||||
<dl>
|
||||
<dt><label for="configure">{L_CAPTCHA_CONFIGURE}:</label><br /><span>{L_CAPTCHA_CONFIGURE_EXPLAIN}</span></dt>
|
||||
<dd><input class="button2" type="submit" id="configure" name="configure" value="{L_CONFIGURE}" /></dd>
|
||||
<dt><label for="captcha_gd_x_grid">{L_CAPTCHA_GD_X_GRID}:</label><br /><span>{L_CAPTCHA_GD_X_GRID_EXPLAIN}</span></dt>
|
||||
<dd><input id="captcha_gd_x_grid" name="captcha_gd_x_grid" value="{CAPTCHA_GD_X_GRID}" type="text" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="captcha_gd_y_grid">{L_CAPTCHA_GD_Y_GRID}:</label><br /><span>{L_CAPTCHA_GD_Y_GRID_EXPLAIN}</span></dt>
|
||||
<dd><input id="captcha_gd_y_grid" name="captcha_gd_y_grid" value="{CAPTCHA_GD_Y_GRID}" type="text" /></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
</fieldset>
|
||||
|
||||
<!-- IF CAPTCHA_PREVIEW_TPL -->
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{L_PREVIEW}</legend>
|
||||
<!-- INCLUDE {CAPTCHA_PREVIEW_TPL} -->
|
||||
</fieldset>
|
||||
<!-- IF PREVIEW -->
|
||||
<div class="successbox">
|
||||
<h3>{L_WARNING}</h3>
|
||||
<p>{L_CAPTCHA_PREVIEW_MSG}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<dl>
|
||||
<dt><label for="captcha_preview">{L_PREVIEW}:</label><br /><span>{L_CAPTCHA_PREVIEW_EXPLAIN}</span></dt>
|
||||
<dd><img src="{CAPTCHA_PREVIEW}" alt="{L_PREVIEW}" <!-- IF CAPTCHA_GD_PREVIEWED -->width="360" height="96"<!-- ELSE --> width="320" height="50"<!-- ENDIF --> id="captcha_preview" /></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_ACP_SUBMIT_CHANGES}</legend>
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="main_submit" name="main_submit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="form_reset" name="reset" value="{L_RESET}" />
|
||||
</p>
|
||||
<fieldset class="submit-buttons">
|
||||
<legend>{L_SUBMIT}</legend>
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
||||
<input class="button2" type="submit" id="preview" name="preview" value="{L_PREVIEW}" />
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
@@ -70,10 +70,9 @@
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="where">{L_ACTION}:</label></dt>
|
||||
<dd>
|
||||
<label><input id="where" type="radio" class="radio" name="where" value="store" checked="checked" /> {L_STORE_LOCAL}</label>
|
||||
<label><input type="radio" class="radio" name="where" value="download" /> {L_DOWNLOAD}</label>
|
||||
</dd>
|
||||
<dd><label><input type="radio" class="radio" name="where" value="store_and_download" id="where" checked="checked" /> {L_STORE_AND_DOWNLOAD}</label>
|
||||
<label><input type="radio" class="radio" name="where" value="store" /> {L_STORE_LOCAL}</label>
|
||||
<label><input type="radio" class="radio" name="where" value="download" /> {L_DOWNLOAD}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="table">{L_TABLE_SELECT}:</label></dt>
|
||||
|
@@ -44,7 +44,7 @@
|
||||
</dl>
|
||||
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SEND_EMAIL}" />
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_EMAIL}" />
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
||||
</p>
|
||||
{S_FORM_TOKEN}
|
||||
|
@@ -96,7 +96,7 @@
|
||||
|
||||
<a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">« {L_BACK}</a>
|
||||
|
||||
<h1>{L_TITLE} <!-- IF FORUM_NAME -->:: {FORUM_NAME}<!-- ENDIF --></h1>
|
||||
<h1>{L_TITLE} :: {FORUM_NAME}</h1>
|
||||
|
||||
<p>{L_FORUM_EDIT_EXPLAIN}</p>
|
||||
|
||||
@@ -217,11 +217,6 @@
|
||||
<dd><label><input type="radio" class="radio" name="enable_post_review" value="1"<!-- IF S_ENABLE_POST_REVIEW --> id="enable_post_review" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="enable_post_review" value="0"<!-- IF not S_ENABLE_POST_REVIEW --> id="enable_post_review" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="enable_quick_reply">{L_ENABLE_QUICK_REPLY}:</label><br /><span>{L_ENABLE_QUICK_REPLY_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="enable_quick_reply" value="1"<!-- IF S_ENABLE_QUICK_REPLY --> id="enable_quick_reply" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="enable_quick_reply" value="0"<!-- IF not S_ENABLE_QUICK_REPLY --> id="enable_quick_reply" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="enable_indexing">{L_ENABLE_INDEXING}:</label><br /><span>{L_ENABLE_INDEXING_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="enable_indexing" value="1"<!-- IF S_ENABLE_INDEXING --> id="enable_indexing" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
@@ -449,7 +444,7 @@
|
||||
<!-- IF forums.FORUM_IMAGE --><div style="float: {S_CONTENT_FLOW_BEGIN}; margin-right: 5px;">{forums.FORUM_IMAGE}</div><!-- ENDIF -->
|
||||
<strong><!-- IF forums.S_FORUM_LINK -->{forums.FORUM_NAME}<!-- ELSE --><a href="{forums.U_FORUM}">{forums.FORUM_NAME}</a><!-- ENDIF --></strong>
|
||||
<!-- IF forums.FORUM_DESCRIPTION --><br /><span>{forums.FORUM_DESCRIPTION}</span><!-- ENDIF -->
|
||||
<!-- IF forums.S_FORUM_POST --><br /><br /><span>{L_TOPICS}: <strong>{forums.FORUM_TOPICS}</strong> / {L_POSTS}: <strong>{forums.FORUM_POSTS}</strong></span><!-- ENDIF -->
|
||||
<!-- IF forums.S_FORUM_POST --><br /><br /><span>{L_TOPICS}: <strong>{forums.FORUM_TOPICS}</strong> / {L_POSTS}: <b>{forums.FORUM_POSTS}</b></span><!-- ENDIF -->
|
||||
</td>
|
||||
<td style="vertical-align: top; width: 100px; text-align: right; white-space: nowrap;">
|
||||
<!-- IF forums.S_FIRST_ROW && not forums.S_LAST_ROW -->
|
||||
|
@@ -1,22 +0,0 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<h1>{L_COPY_PERMISSIONS}</h1>
|
||||
|
||||
<p>{L_COPY_PERMISSIONS_EXPLAIN}</p>
|
||||
<p>{L_ACL_LINK}</p>
|
||||
|
||||
<form id="confirm" method="post" action="{S_COPY_ACTION}">
|
||||
|
||||
<fieldset>
|
||||
<dl>
|
||||
<dt><label for="forum_perm_from">{L_COPY_PERMISSIONS}:</label><br /><span>{L_COPY_PERMISSIONS_EXPLAIN}</span></dt>
|
||||
<dd><select id="forum_perm_from" name="forum_perm_from"><option value="0">{L_NO_PERMISSIONS}</option>{S_FORUM_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
<div style="text-align: center;">{S_FORM_TOKEN}{S_HIDDEN_FIELDS}
|
||||
<input type="submit" name="update" value="{L_CONTINUE}" class="button2" />
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
@@ -55,40 +55,28 @@
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_GROUP_OPTIONS_SAVE}</legend>
|
||||
<legend>{L_GROUP_SETTINGS_SAVE}</legend>
|
||||
<!-- IF S_USER_FOUNDER -->
|
||||
<dl>
|
||||
<dt><label for="group_founder_manage">{L_GROUP_FOUNDER_MANAGE}:</label><br /><span>{L_GROUP_FOUNDER_MANAGE_EXPLAIN}</span></dt>
|
||||
<dd><input name="group_founder_manage" type="checkbox" value="1" class="radio" id="group_founder_manage"{GROUP_FOUNDER_MANAGE} /></dd>
|
||||
<dd><input name="group_founder_manage" type="checkbox" class="radio" id="group_founder_manage"{GROUP_FOUNDER_MANAGE} /></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<dl>
|
||||
<dt><label for="group_skip_auth">{L_GROUP_SKIP_AUTH}:</label><br /><span>{L_GROUP_SKIP_AUTH_EXPLAIN}</span></dt>
|
||||
<dd><input name="group_skip_auth" type="checkbox" value="1" class="radio" id="group_skip_auth"{GROUP_SKIP_AUTH} /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="group_legend">{L_GROUP_LEGEND}:</label></dt>
|
||||
<dd><input name="group_legend" type="checkbox" value="1" class="radio" id="group_legend"{GROUP_LEGEND} /></dd>
|
||||
<dd><input name="group_legend" type="checkbox" class="radio" id="group_legend"{GROUP_LEGEND} /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="group_receive_pm">{L_GROUP_RECEIVE_PM}:</label><br /><span>{L_GROUP_RECEIVE_PM_EXPLAIN}</span></dt>
|
||||
<dd><input name="group_receive_pm" type="checkbox" value="1" class="radio" id="group_receive_pm"{GROUP_RECEIVE_PM} /></dd>
|
||||
<dd><input name="group_receive_pm" type="checkbox" class="radio" id="group_receive_pm"{GROUP_RECEIVE_PM} /></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_GROUP_SETTINGS_SAVE}</legend>
|
||||
<dl>
|
||||
<dt><label for="group_message_limit">{L_GROUP_MESSAGE_LIMIT}:</label><br /><span>{L_GROUP_MESSAGE_LIMIT_EXPLAIN}</span></dt>
|
||||
<dd><input name="group_message_limit" type="text" id="group_message_limit" maxlength="4" size="4" value="{GROUP_MESSAGE_LIMIT}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="group_max_recipients">{L_GROUP_MAX_RECIPIENTS}:</label><br /><span>{L_GROUP_MAX_RECIPIENTS_EXPLAIN}</span></dt>
|
||||
<dd><input name="group_max_recipients" type="text" id="group_max_recipients" maxlength="10" size="4" value="{GROUP_MAX_RECIPIENTS}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="group_colour">{L_GROUP_COLOR}:</label><br /><span>{L_GROUP_COLOR_EXPLAIN}</span></dt>
|
||||
<dd><input name="group_colour" type="text" id="group_colour" value="{GROUP_COLOUR}" size="6" maxlength="6" /><!-- IF GROUP_COLOUR --> <span style="background-color: #{GROUP_COLOUR}"> </span><!-- ENDIF --> <span>[ <a href="{U_SWATCH}" onclick="popup(this.href, 636, 150, '_swatch'); return false">{L_COLOUR_SWATCH}</a> ]</span></dd>
|
||||
<dd><input name="group_colour" type="text" id="group_colour" value="{GROUP_COLOUR}" size="6" maxlength="6" /> <span>[ <a href="{U_SWATCH}" onclick="popup(this.href, 636, 150, '_swatch'); return false">{L_COLOUR_SWATCH}</a> ]</span></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="group_rank">{L_GROUP_RANK}:</label></dt>
|
||||
@@ -105,7 +93,7 @@
|
||||
</dl>
|
||||
<!-- IF not S_IN_AVATAR_GALLERY -->
|
||||
<!-- IF S_CAN_UPLOAD -->
|
||||
<dl>
|
||||
<dl>
|
||||
<dt><label for="uploadfile">{L_UPLOAD_AVATAR_FILE}:</label></dt>
|
||||
<dd><input type="file" id="uploadfile" name="uploadfile" /></dd>
|
||||
</dl>
|
||||
@@ -123,7 +111,7 @@
|
||||
<dd><input name="width" type="text" id="width" size="3" value="{AVATAR_WIDTH}" /> <span>px X </span> <input type="text" name="height" size="3" value="{AVATAR_HEIGHT}" /> <span>px</span></dd>
|
||||
</dl>
|
||||
<!-- IF S_DISPLAY_GALLERY -->
|
||||
<dl>
|
||||
<dl>
|
||||
<dt><label>{L_AVATAR_GALLERY}:</label></dt>
|
||||
<dd><input class="button2" type="submit" name="display_gallery" value="{L_DISPLAY_GALLERY}" /></dd>
|
||||
</dl>
|
||||
@@ -140,7 +128,7 @@
|
||||
<dl>
|
||||
<table cellspacing="1">
|
||||
<!-- BEGIN avatar_row -->
|
||||
<tr>
|
||||
<tr>
|
||||
<!-- BEGIN avatar_column -->
|
||||
<td class="row1" style="text-align: center;"><img src="{avatar_row.avatar_column.AVATAR_IMAGE}" alt="{avatar_row.avatar_column.AVATAR_NAME}" title="{avatar_row.avatar_column.AVATAR_NAME}" /></td>
|
||||
<!-- END avatar_column -->
|
||||
@@ -154,11 +142,11 @@
|
||||
</table>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset class="quick" style="margin-top: -15px;">
|
||||
<input class="button2" type="submit" name="cancel" value="{L_CANCEL}" />
|
||||
</fieldset>
|
||||
|
||||
|
||||
<!-- ENDIF -->
|
||||
</fieldset>
|
||||
|
||||
@@ -200,7 +188,7 @@
|
||||
</tr>
|
||||
<!-- BEGIN leader -->
|
||||
<!-- IF leader.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
||||
<td><!-- IF leader.USERNAME_COLOUR --><a href="{leader.U_USER_EDIT}" style="color: #{leader.USERNAME_COLOUR};" class="username-coloured">{leader.USERNAME}</a><!-- ELSE --><a href="{leader.U_USER_EDIT}">{leader.USERNAME}</a><!-- ENDIF --></td>
|
||||
<td><a href="{leader.U_USER_EDIT}">{leader.USERNAME}</a></td>
|
||||
<td style="text-align: center;"><!-- IF leader.S_GROUP_DEFAULT -->{L_YES}<!-- ELSE -->{L_NO}<!-- ENDIF --></td>
|
||||
<td style="text-align: center;">{leader.JOINED}</td>
|
||||
<td style="text-align: center;">{leader.USER_POSTS}</td>
|
||||
@@ -221,7 +209,7 @@
|
||||
</tr>
|
||||
<!-- ELSE -->
|
||||
<!-- IF member.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
||||
<td><!-- IF member.USERNAME_COLOUR --><a href="{member.U_USER_EDIT}" style="color: #{member.USERNAME_COLOUR};" class="username-coloured">{member.USERNAME}</a><!-- ELSE --><a href="{member.U_USER_EDIT}">{member.USERNAME}</a><!-- ENDIF --></td>
|
||||
<td><a href="{member.U_USER_EDIT}">{member.USERNAME}</a></td>
|
||||
<td style="text-align: center;"><!-- IF member.S_GROUP_DEFAULT -->{L_YES}<!-- ELSE -->{L_NO}<!-- ENDIF --></td>
|
||||
<td style="text-align: center;">{member.JOINED}</td>
|
||||
<td style="text-align: center;">{member.USER_POSTS}</td>
|
||||
@@ -239,12 +227,12 @@
|
||||
<div class="pagination">
|
||||
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> • <span>{PAGINATION}</span>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
|
||||
<fieldset class="quick">
|
||||
<select name="action"><option class="sep" value="">{L_SELECT_OPTION}</option>{S_ACTION_OPTIONS}</select>
|
||||
<input class="button2" type="submit" name="update" value="{L_SUBMIT}" />
|
||||
<p class="small"><a href="#" onclick="marklist('list', 'mark', true); return false;">{L_MARK_ALL}</a> • <a href="#" onclick="marklist('list', 'mark', false); return false;">{L_UNMARK_ALL}</a></p>
|
||||
<p class="small"><a href="#" onclick="marklist('list', 'mark', true); return false;">{L_MARK_ALL}</a> • <a href="#" onclick="marklist('list', 'mark', false); return false;">{L_UNMARK_ALL}</a></p>
|
||||
</fieldset>
|
||||
|
||||
<h1>{L_ADD_USERS}</h1>
|
||||
|
@@ -243,8 +243,8 @@
|
||||
<td style="text-align: center;">{items.EMOTION}</td>
|
||||
<!-- ENDIF -->
|
||||
<td style="text-align: right; white-space: nowrap;">
|
||||
<!-- IF items.S_FIRST_ROW and not PREVIOUS_PAGE -->{ICON_MOVE_UP_DISABLED}<!-- ELSE --><a href="{items.U_MOVE_UP}">{ICON_MOVE_UP}</a><!-- ENDIF -->
|
||||
<!-- IF items.S_LAST_ROW and not NEXT_PAGE -->{ICON_MOVE_DOWN_DISABLED}<!-- ELSE --><a href="{items.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a><!-- ENDIF -->
|
||||
<!-- IF items.S_FIRST_ROW -->{ICON_MOVE_UP_DISABLED}<!-- ELSE --><a href="{items.U_MOVE_UP}">{ICON_MOVE_UP}</a><!-- ENDIF -->
|
||||
<!-- IF items.S_LAST_ROW -->{ICON_MOVE_DOWN_DISABLED}<!-- ELSE --><a href="{items.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a><!-- ENDIF -->
|
||||
<a href="{items.U_EDIT}">{ICON_EDIT}</a> <a href="{items.U_DELETE}">{ICON_DELETE}</a>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -255,7 +255,7 @@
|
||||
<!-- END items -->
|
||||
</tbody>
|
||||
</table>
|
||||
<div>{PAGINATION}</div>
|
||||
|
||||
<p class="quick">
|
||||
<input class="button2" name="add" type="submit" value="{L_ICON_ADD}" /> <input class="button2" type="submit" name="edit" value="{L_ICON_EDIT}" />
|
||||
</p>
|
||||
|
52
phpBB/adm/style/acp_inactive.html
Normal file → Executable file
52
phpBB/adm/style/acp_inactive.html
Normal file → Executable file
@@ -12,7 +12,7 @@
|
||||
|
||||
<!-- IF PAGINATION -->
|
||||
<div class="pagination">
|
||||
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> • <span>{PAGINATION}</span>
|
||||
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> • <span>{PAGINATION}</span>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
<th>{L_USERNAME}</th>
|
||||
<th>{L_JOINED}</th>
|
||||
<th>{L_INACTIVE_DATE}</th>
|
||||
<th>{L_LAST_VISIT}</th>
|
||||
<th>{L_INACTIVE_REASON}</th>
|
||||
<th>{L_LAST_VISIT}</th>
|
||||
<th>{L_MARK}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -31,17 +31,11 @@
|
||||
<!-- BEGIN inactive -->
|
||||
<!-- IF inactive.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
||||
|
||||
<td style="vertical-align: top;">
|
||||
{inactive.USERNAME_FULL}
|
||||
<!-- IF inactive.POSTS --><br />{L_POSTS}: <strong>{inactive.POSTS}</strong> [<a href="{inactive.U_SEARCH_USER}">{L_SEARCH_USER_POSTS}</a>]<!-- ENDIF -->
|
||||
</td>
|
||||
<td style="vertical-align: top;">{inactive.JOINED}</td>
|
||||
<td style="vertical-align: top;">{inactive.INACTIVE_DATE}</td>
|
||||
<td style="vertical-align: top;">{inactive.LAST_VISIT}</td>
|
||||
<td style="vertical-align: top;">
|
||||
{inactive.REASON}
|
||||
<!-- IF inactive.REMINDED --><br />{inactive.REMINDED_EXPLAIN}<!-- ENDIF -->
|
||||
</td>
|
||||
<td><a href="{inactive.U_USER_ADMIN}">{inactive.USERNAME}</a></td>
|
||||
<td>{inactive.JOINED}</td>
|
||||
<td>{inactive.INACTIVE_DATE}</td>
|
||||
<td>{inactive.REASON}</td>
|
||||
<td>{inactive.LAST_VISIT}</td>
|
||||
<td> <input type="checkbox" class="radio" name="mark[]" value="{inactive.USER_ID}" /> </td>
|
||||
</tr>
|
||||
<!-- BEGINELSE -->
|
||||
@@ -52,25 +46,25 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<fieldset class="display-options">
|
||||
{L_DISPLAY_LOG}: {S_LIMIT_DAYS} {L_SORT_BY}: {S_SORT_KEY} {S_SORT_DIR}<!-- IF PAGINATION --> Users per page: <input class="inputbox autowidth" type="text" name="users_per_page" id="users_per_page" size="3" value="{USERS_PER_PAGE}" /><!-- ENDIF -->
|
||||
<input class="button2" type="submit" value="{L_GO}" name="sort" />
|
||||
</fieldset>
|
||||
|
||||
<hr />
|
||||
|
||||
<!-- IF PAGINATION -->
|
||||
<fieldset class="display-options">
|
||||
{L_DISPLAY_LOG}: {S_LIMIT_DAYS} {L_SORT_BY}: {S_SORT_KEY} {S_SORT_DIR}
|
||||
<input class="button2" type="submit" value="{L_GO}" name="sort" />
|
||||
</fieldset>
|
||||
<hr />
|
||||
<!-- IF PAGINATION -->
|
||||
<div class="pagination">
|
||||
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> • <span>{PAGINATION}</span>
|
||||
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> • <span>{PAGINATION}</span>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
|
||||
<fieldset class="quick">
|
||||
<select name="action">{S_INACTIVE_OPTIONS}</select>
|
||||
<input class="button2" type="submit" name="submit" value="{L_SUBMIT}" />
|
||||
<p class="small"><a href="#" onclick="marklist('inactive', 'mark', true); return false;">{L_MARK_ALL}</a> • <a href="#" onclick="marklist('inactive', 'mark', false); return false;">{L_UNMARK_ALL}</a></p>
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset class="quick">
|
||||
<select name="action">{S_INACTIVE_OPTIONS}</select>
|
||||
<input class="button2" type="submit" name="submit" value="{L_SUBMIT}" />
|
||||
<p class="small"><a href="#" onclick="marklist('inactive', 'mark', true); return false;">{L_MARK_ALL}</a> • <a href="#" onclick="marklist('inactive', 'mark', false); return false;">{L_UNMARK_ALL}</a></p>
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
|
||||
|
@@ -8,19 +8,12 @@
|
||||
|
||||
<form id="list" method="post" action="{U_ACTION}">
|
||||
|
||||
<fieldset class="display-options" style="float: left">
|
||||
{L_SEARCH_KEYWORDS}: <input type="text" name="keywords" value="{S_KEYWORDS}" /> <input type="submit" class="button2" name="filter" value="{L_SEARCH}" />
|
||||
</fieldset>
|
||||
|
||||
<!-- IF PAGINATION -->
|
||||
<div class="pagination" style="float: right; margin: 15px 0 2px 0">
|
||||
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> • <span>{PAGINATION}</span>
|
||||
<div class="pagination">
|
||||
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> • <span>{PAGINATION}</span>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<div class="clearfix"> </div>
|
||||
<div><br style="clear: both;" /></div>
|
||||
|
||||
<!-- IF .log -->
|
||||
<table cellspacing="1">
|
||||
<thead>
|
||||
@@ -29,14 +22,13 @@
|
||||
<th>{L_IP}</th>
|
||||
<th>{L_TIME}</th>
|
||||
<th>{L_ACTION}</th>
|
||||
<!-- IF S_CLEARLOGS -->
|
||||
<th>{L_MARK}</th>
|
||||
<!-- ENDIF -->
|
||||
<th>{L_MARK}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- BEGIN log -->
|
||||
<!-- IF log.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
||||
|
||||
<td>
|
||||
{log.USERNAME}
|
||||
<!-- IF log.REPORTEE_USERNAME -->
|
||||
@@ -46,33 +38,32 @@
|
||||
<td style="text-align: center;">{log.IP}</td>
|
||||
<td style="text-align: center;">{log.DATE}</td>
|
||||
<td>{log.ACTION}<!-- IF log.DATA --><br /><span>{log.DATA}</span><!-- ENDIF --></td>
|
||||
<!-- IF S_CLEARLOGS -->
|
||||
<td style="text-align: center;"><input type="checkbox" class="radio" name="mark[]" value="{log.ID}" /></td>
|
||||
<!-- ENDIF -->
|
||||
<td style="text-align: center;"><input type="checkbox" class="radio" name="mark[]" value="{log.ID}" /></td>
|
||||
</tr>
|
||||
<!-- END log -->
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- IF PAGINATION -->
|
||||
<div class="pagination">
|
||||
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> • <span>{PAGINATION}</span>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- ELSE -->
|
||||
|
||||
<div class="errorbox">
|
||||
<p>{L_NO_ENTRIES}</p>
|
||||
</div>
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
||||
<fieldset class="display-options">
|
||||
{L_DISPLAY_LOG}: {S_LIMIT_DAYS} {L_SORT_BY}: {S_SORT_KEY} {S_SORT_DIR}
|
||||
<input class="button2" type="submit" value="{L_GO}" name="sort" />
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
<hr />
|
||||
|
||||
<!-- IF PAGINATION -->
|
||||
<div class="pagination">
|
||||
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> • <span>{PAGINATION}</span>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_SHOW_FORUMS -->
|
||||
<fieldset class="quick">
|
||||
{L_SELECT_FORUM}: <select name="f" onchange="if(this.options[this.selectedIndex].value != -1){ this.form.submit(); }">{S_FORUM_BOX}</select>
|
||||
@@ -80,7 +71,7 @@
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF .log and S_CLEARLOGS -->
|
||||
<!-- IF S_CLEARLOGS -->
|
||||
<fieldset class="quick">
|
||||
<input class="button2" type="submit" name="delall" value="{L_DELETE_ALL}" />
|
||||
<input class="button2" type="submit" name="delmarked" value="{L_DELETE_MARKED}" /><br />
|
||||
@@ -88,6 +79,7 @@
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
||||
<!-- INCLUDE overall_footer.html -->
|
@@ -14,19 +14,6 @@
|
||||
|
||||
<p>{L_ADMIN_INTRO}</p>
|
||||
|
||||
<!-- IF S_VERSIONCHECK_FAIL -->
|
||||
<div class="errorbox notice">
|
||||
<p>{L_VERSIONCHECK_FAIL}</p>
|
||||
<p><a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a> · <a href="{U_VERSIONCHECK}">{L_MORE_INFORMATION}</a></p>
|
||||
</div>
|
||||
<!-- ELSEIF not S_VERSION_UP_TO_DATE -->
|
||||
<div class="errorbox">
|
||||
<p>{L_VERSION_NOT_UP_TO_DATE_TITLE}</p>
|
||||
<p><a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a> · <a href="{U_VERSIONCHECK}">{L_MORE_INFORMATION}</a></p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
||||
<!-- IF S_REMOVE_INSTALL -->
|
||||
<div class="errorbox">
|
||||
<h3>{L_WARNING}</h3>
|
||||
@@ -34,12 +21,6 @@
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF S_WRITABLE_CONFIG -->
|
||||
<div class="errorbox notice">
|
||||
<p>{L_WRITABLE_CONFIG}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<table cellspacing="1">
|
||||
<caption>{L_FORUM_STATS}</caption>
|
||||
<col class="col1" /><col class="col2" /><col class="col1" /><col class="col2" />
|
||||
@@ -98,9 +79,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{L_BOARD_VERSION}: </td>
|
||||
<td>
|
||||
<strong><a href="{U_VERSIONCHECK}" <!-- IF S_VERSION_UP_TO_DATE -->style="color: #228822;"<!-- ELSE -->style="color: #BC2A4D;"<!-- ENDIF --> title="{L_MORE_INFORMATION}">{BOARD_VERSION}</a></strong> [ <a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a> ]
|
||||
</td>
|
||||
<td><strong>{BOARD_VERSION}</strong></td>
|
||||
<!-- IF S_TOTAL_ORPHAN -->
|
||||
<td>{L_NUMBER_ORPHAN}: </td>
|
||||
<td><strong>{TOTAL_ORPHAN}</strong></td>
|
||||
@@ -152,12 +131,6 @@
|
||||
</form>
|
||||
|
||||
<!-- IF S_FOUNDER -->
|
||||
<form id="action_purge_sessions_form" method="post" action="{U_ACTION}">
|
||||
<dl>
|
||||
<dt><label for="action_purge_sessions">{L_PURGE_SESSIONS}</label><br /><span>{L_PURGE_SESSIONS_EXPLAIN}</span></dt>
|
||||
<dd><input type="hidden" name="action" value="purge_sessions" /><input class="button2" type="submit" id="action_purge_sessions" name="action_purge_sessions" value="{L_RUN}" /></dd>
|
||||
</dl>
|
||||
</form>
|
||||
<form id="action_purge_cache_form" method="post" action="{U_ACTION}">
|
||||
<dl>
|
||||
<dt><label for="action_purge_cache">{L_PURGE_CACHE}</label><br /><span>{L_PURGE_CACHE_EXPLAIN}</span></dt>
|
||||
@@ -214,25 +187,19 @@
|
||||
<th>{L_USERNAME}</th>
|
||||
<th>{L_JOINED}</th>
|
||||
<th>{L_INACTIVE_DATE}</th>
|
||||
<th>{L_LAST_VISIT}</th>
|
||||
<th>{L_INACTIVE_REASON}</th>
|
||||
<th>{L_LAST_VISIT}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- BEGIN inactive -->
|
||||
<!-- IF inactive.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
||||
|
||||
<td style="vertical-align: top;">
|
||||
{inactive.USERNAME_FULL}
|
||||
<!-- IF inactive.POSTS --><br />{L_POSTS}: <strong>{inactive.POSTS}</strong> [<a href="{inactive.U_SEARCH_USER}">{L_SEARCH_USER_POSTS}</a>]<!-- ENDIF -->
|
||||
</td>
|
||||
<td style="vertical-align: top;">{inactive.JOINED}</td>
|
||||
<td style="vertical-align: top;">{inactive.INACTIVE_DATE}</td>
|
||||
<td style="vertical-align: top;">{inactive.LAST_VISIT}</td>
|
||||
<td style="vertical-align: top;">
|
||||
{inactive.REASON}
|
||||
<!-- IF inactive.REMINDED --><br />{inactive.REMINDED_EXPLAIN}<!-- ENDIF -->
|
||||
</td>
|
||||
<td><a href="{inactive.U_USER_ADMIN}">{inactive.USERNAME}</a></td>
|
||||
<td>{inactive.JOINED}</td>
|
||||
<td>{inactive.INACTIVE_DATE}</td>
|
||||
<td>{inactive.REASON}</td>
|
||||
<td>{inactive.LAST_VISIT}</td>
|
||||
</tr>
|
||||
<!-- BEGINELSE -->
|
||||
<tr>
|
||||
|
@@ -3,7 +3,7 @@
|
||||
<a name="maincontent"></a>
|
||||
|
||||
<!-- IF S_INTRO -->
|
||||
|
||||
|
||||
<h1>{L_ACP_PERMISSIONS}</h1>
|
||||
|
||||
{L_ACP_PERMISSIONS_EXPLAIN}
|
||||
@@ -12,12 +12,10 @@
|
||||
|
||||
<!-- IF S_SELECT_VICTIM -->
|
||||
|
||||
<!-- IF U_BACK --><a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">« {L_BACK}</a><!-- ENDIF -->
|
||||
|
||||
<h1>{L_TITLE}</h1>
|
||||
|
||||
<p>{L_EXPLAIN}</p>
|
||||
|
||||
|
||||
<!-- IF S_FORUM_NAMES -->
|
||||
<p><strong>{L_FORUMS}:</strong> {FORUM_NAMES}</p>
|
||||
<!-- ENDIF -->
|
||||
@@ -64,7 +62,7 @@
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- ELSEIF S_SELECT_USER and S_CAN_SELECT_USER -->
|
||||
@@ -125,7 +123,7 @@
|
||||
<!-- IF S_ALLOW_ALL_SELECT --><dd class="full" style="text-align: right;"><label><input type="checkbox" class="radio" name="all_users" value="1" /> {L_ALL_USERS}</label></dd><!-- ENDIF -->
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset class="quick">
|
||||
{S_HIDDEN_FIELDS}
|
||||
{S_FORM_TOKEN}
|
||||
@@ -156,7 +154,7 @@
|
||||
</div>
|
||||
|
||||
<div style="float: {S_CONTENT_FLOW_END}; width: 48%">
|
||||
|
||||
|
||||
<!-- IF S_CAN_SELECT_GROUP -->
|
||||
|
||||
<h1>{L_USERGROUPS}</h1>
|
||||
@@ -170,7 +168,7 @@
|
||||
<!-- IF S_ALLOW_ALL_SELECT --><dd class="full" style="text-align: right;"><label><input type="checkbox" class="radio" name="all_groups" value="1" /> {L_ALL_GROUPS}</label></dd><!-- ENDIF -->
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset class="quick">
|
||||
{S_HIDDEN_FIELDS}
|
||||
{S_FORM_TOKEN}
|
||||
@@ -179,7 +177,7 @@
|
||||
</form>
|
||||
|
||||
<form id="add_groups" method="post" action="{U_ACTION}">
|
||||
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_ADD_GROUPS}</legend>
|
||||
<dl>
|
||||
@@ -201,7 +199,7 @@
|
||||
<!-- ELSEIF S_SELECT_USERGROUP_VIEW -->
|
||||
|
||||
<div style="float: {S_CONTENT_FLOW_BEGIN}; width: 48%;">
|
||||
|
||||
|
||||
<h1>{L_USERS}</h1>
|
||||
|
||||
<form id="users" method="post" action="{U_ACTION}">
|
||||
@@ -212,7 +210,7 @@
|
||||
<dd class="full"><select style="width: 100%;" name="user_id[]" multiple="multiple" size="5">{S_DEFINED_USER_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset class="quick">
|
||||
{S_HIDDEN_FIELDS}
|
||||
{S_FORM_TOKEN}
|
||||
@@ -242,7 +240,7 @@
|
||||
</div>
|
||||
|
||||
<div style="float: {S_CONTENT_FLOW_END}; width: 48%">
|
||||
|
||||
|
||||
<h1>{L_USERGROUPS}</h1>
|
||||
|
||||
<form id="groups" method="post" action="{U_ACTION}">
|
||||
@@ -253,7 +251,7 @@
|
||||
<dd class="full"><select style="width: 100%;" name="group_id[]" multiple="multiple" size="5">{S_DEFINED_GROUP_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset class="quick">
|
||||
{S_HIDDEN_FIELDS}
|
||||
{S_FORM_TOKEN}
|
||||
@@ -313,11 +311,11 @@
|
||||
|
||||
<!-- IF S_PERMISSION_DROPDOWN -->
|
||||
<form id="pselect" method="post" action="{U_ACTION}">
|
||||
|
||||
|
||||
<fieldset class="quick" style="float: {S_CONTENT_FLOW_BEGIN};">
|
||||
{S_HIDDEN_FIELDS}
|
||||
{S_FORM_TOKEN}
|
||||
{L_SELECT_TYPE}: <select name="type">{S_PERMISSION_DROPDOWN}</select>
|
||||
{L_SELECT_TYPE}: <select name="type">{S_PERMISSION_DROPDOWN}</select>
|
||||
|
||||
<input class="button2" type="submit" name="submit" value="{L_GO}" />
|
||||
</fieldset>
|
||||
@@ -349,7 +347,7 @@
|
||||
</fieldset>
|
||||
|
||||
<br /><br />
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
@@ -48,24 +48,20 @@
|
||||
<fieldset>
|
||||
<legend>{L_VISIBILITY_OPTION}</legend>
|
||||
<dl>
|
||||
<dt><label for="field_show_profile">{L_DISPLAY_AT_PROFILE}:</label><br /><span>{L_DISPLAY_AT_PROFILE_EXPLAIN}</span></dt>
|
||||
<dd><input type="checkbox" class="radio" id="field_show_profile" name="field_show_profile" value="1"<!-- IF S_SHOW_PROFILE --> checked="checked"<!-- ENDIF --> /></dd>
|
||||
<dt><label for="field_option_none">{L_DISPLAY_AT_PROFILE}:</label><br /><span>{L_DISPLAY_AT_PROFILE_EXPLAIN}</span></dt>
|
||||
<dd><input type="radio" class="radio" id="field_option_none" name="field_option" value="none"<!-- IF not S_SHOW_ON_REG and not S_FIELD_REQUIRED and not S_FIELD_HIDE --> checked="checked"<!-- ENDIF --> /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="field_show_on_reg">{L_DISPLAY_AT_REGISTER}:</label><br /><span>{L_DISPLAY_AT_REGISTER_EXPLAIN}</span></dt>
|
||||
<dd><input type="checkbox" class="radio" id="field_show_on_reg" name="field_show_on_reg" value="1"<!-- IF S_SHOW_ON_REG --> checked="checked"<!-- ENDIF --> /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="field_show_on_vt">{L_DISPLAY_ON_VT}:</label><br /><span>{L_DISPLAY_ON_VT_EXPLAIN}</span></dt>
|
||||
<dd><input type="checkbox" class="radio" id="field_show_on_vt" name="field_show_on_vt" value="1"<!-- IF S_SHOW_ON_VT --> checked="checked"<!-- ENDIF --> /></dd>
|
||||
<dd><input type="radio" class="radio" id="field_show_on_reg" name="field_option" value="field_show_on_reg"<!-- IF S_SHOW_ON_REG --> checked="checked"<!-- ENDIF --> /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="field_required">{L_REQUIRED_FIELD}:</label><br /><span>{L_REQUIRED_FIELD_EXPLAIN}</span></dt>
|
||||
<dd><input type="checkbox" class="radio" id="field_required" name="field_required" value="1"<!-- IF S_FIELD_REQUIRED --> checked="checked"<!-- ENDIF --> /></dd>
|
||||
<dd><input type="radio" class="radio" id="field_required" name="field_option" value="field_required"<!-- IF S_FIELD_REQUIRED --> checked="checked"<!-- ENDIF --> /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="field_hide">{L_HIDE_PROFILE_FIELD}:</label><br /><span>{L_HIDE_PROFILE_FIELD_EXPLAIN}</span></dt>
|
||||
<dd><input type="checkbox" class="radio" id="field_hide" name="field_hide" value="1"<!-- IF S_FIELD_HIDE --> checked="checked"<!-- ENDIF --> /></dd>
|
||||
<dd><input type="radio" class="radio" id="field_hide" name="field_option" value="field_hide"<!-- IF S_FIELD_HIDE --> checked="checked"<!-- ENDIF --> /></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
@@ -131,7 +127,7 @@
|
||||
<fieldset class="quick" style="float: {S_CONTENT_FLOW_BEGIN};">
|
||||
<input class="button1" type="submit" name="prev" value="{L_PROFILE_BASIC_OPTIONS}" />
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset class="quick" style="float: {S_CONTENT_FLOW_END};">
|
||||
{S_HIDDEN_FIELDS}
|
||||
{S_FORM_TOKEN}
|
||||
@@ -155,15 +151,15 @@
|
||||
<fieldset class="quick" style="float: {S_CONTENT_FLOW_BEGIN};">
|
||||
<input class="button1" type="submit" name="prev" value="{L_PROFILE_TYPE_OPTIONS}" />
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset class="quick" style="float: {S_CONTENT_FLOW_END};">
|
||||
{S_HIDDEN_FIELDS}
|
||||
<input class="button1" type="submit" name="save" value="{L_SAVE}" />
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
<!-- ELSE -->
|
||||
@@ -198,14 +194,14 @@
|
||||
{ICON_MOVE_UP_DISABLED}
|
||||
<a href="{fields.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
|
||||
<!-- ELSEIF not fields.S_FIRST_ROW && not fields.S_LAST_ROW-->
|
||||
<a href="{fields.U_MOVE_UP}">{ICON_MOVE_UP}</a>
|
||||
<a href="{fields.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
|
||||
<a href="{fields.U_MOVE_UP}">{ICON_MOVE_UP}</a>
|
||||
<a href="{fields.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
|
||||
<!-- ELSEIF fields.S_LAST_ROW && not fields.S_FIRST_ROW -->
|
||||
<a href="{fields.U_MOVE_UP}">{ICON_MOVE_UP}</a>
|
||||
{ICON_MOVE_DOWN_DISABLED}
|
||||
{ICON_MOVE_DOWN_DISABLED}
|
||||
<!-- ENDIF -->
|
||||
<!-- IF not fields.S_NEED_EDIT -->
|
||||
<a href="{fields.U_EDIT}">{ICON_EDIT}</a>
|
||||
<a href="{fields.U_EDIT}">{ICON_EDIT}</a>
|
||||
<!-- ELSE -->
|
||||
{ICON_EDIT_DISABLED}
|
||||
<!-- ENDIF -->
|
||||
@@ -213,16 +209,12 @@
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<!-- BEGINELSE -->
|
||||
<tr class="row3">
|
||||
<td colspan="4">{L_ACP_NO_ITEMS}</td>
|
||||
</tr>
|
||||
<!-- END fields -->
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<form id="profile_fields" method="post" action="{U_ACTION}">
|
||||
|
||||
|
||||
<fieldset class="quick">
|
||||
<input class="text small" type="text" name="field_ident" /> <select name="field_type">{S_TYPE_OPTIONS}</select>
|
||||
<input class="button1" type="submit" name="submit" value="{L_CREATE_NEW_FIELD}" />
|
||||
|
@@ -32,10 +32,6 @@
|
||||
<dt><label for="min_search_author_chars">{L_MIN_SEARCH_AUTHOR_CHARS}:</label><br /><span>{L_MIN_SEARCH_AUTHOR_CHARS_EXPLAIN}</span></dt>
|
||||
<dd><input id="min_search_author_chars" type="text" size="4" maxlength="4" name="config[min_search_author_chars]" value="{MIN_SEARCH_AUTHOR_CHARS}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="max_num_search_keywords">{L_MAX_NUM_SEARCH_KEYWORDS}:</label><br /><span>{L_MAX_NUM_SEARCH_KEYWORDS_EXPLAIN}</span></dt>
|
||||
<dd><input id="max_num_search_keywords" type="text" size="4" maxlength="4" name="config[max_num_search_keywords]" value="{MAX_NUM_SEARCH_KEYWORDS}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="search_store_results">{L_SEARCH_STORE_RESULTS}:</label><br /><span>{L_SEARCH_STORE_RESULTS_EXPLAIN}</span></dt>
|
||||
<dd><input id="search_store_results" type="text" size="4" maxlength="6" name="config[search_store_results]" value="{SEARCH_STORE_RESULTS}" /> {L_SECONDS}</dd>
|
||||
@@ -134,9 +130,9 @@
|
||||
<!-- END data -->
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
||||
<p class="quick">
|
||||
<!-- IF backend.S_INDEXED -->
|
||||
<input class="button2" type="submit" name="action[delete]" value="{L_DELETE_INDEX}" onclick="popup_progress_bar('delete');" />
|
||||
@@ -146,7 +142,7 @@
|
||||
</p>
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
|
||||
|
||||
</form>
|
||||
<!-- END backend -->
|
||||
|
||||
|
@@ -1,71 +0,0 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<a name="maincontent"></a>
|
||||
|
||||
<h1>{L_SEND_STATISTICS}</h1>
|
||||
|
||||
<p>{L_EXPLAIN_SEND_STATISTICS}</p>
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
var iframect = 0;
|
||||
|
||||
function iframe_updated()
|
||||
{
|
||||
if (iframect++ == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
dE('questionnaire-form', -1);
|
||||
dE('questionnaire-thanks', 1);
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<iframe onload="iframe_updated();" name="questionaire_result" style="display: none;"></iframe>
|
||||
|
||||
<form action="{U_COLLECT_STATS}" method="post" target="questionaire_result" id="questionnaire-form">
|
||||
|
||||
<p><a href="{U_ACP_MAIN}">{L_DONT_SEND_STATISTICS}</a></p>
|
||||
|
||||
<p>{L_EXPLAIN_SHOW_STATISTICS}</p>
|
||||
|
||||
<p id="show-button"><input type="button" class="button2" onclick="dE('configlist', 1); dE('show-button', -1);" value="{L_SHOW_STATISTICS}" /></p>
|
||||
|
||||
<div id="configlist">
|
||||
<input type="button" class="button2" onclick="dE('show-button', 1); dE('configlist', -1);" value="{L_HIDE_STATISTICS}" />
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SEND_STATISTICS}" />
|
||||
</p>
|
||||
|
||||
<!-- BEGIN providers -->
|
||||
<fieldset>
|
||||
<legend>{providers.NAME}</legend>
|
||||
<!-- BEGIN values -->
|
||||
<dl>
|
||||
<dt>{providers.values.KEY}</dt>
|
||||
<dd>{providers.values.VALUE}</dd>
|
||||
</dl>
|
||||
<!-- END values -->
|
||||
</fieldset>
|
||||
<!-- END providers -->
|
||||
</div>
|
||||
<p class="submit-buttons">
|
||||
<input type="hidden" name="systemdata" value="{RAW_DATA}" />
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SEND_STATISTICS}" />
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<div id="questionnaire-thanks" class="successbox">
|
||||
<p><strong>{L_THANKS_SEND_STATISTICS}</strong><br /><br /><a href="{U_ACP_MAIN}">« {L_GO_ACP_MAIN}</a></p>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
dE('configlist', -1);
|
||||
dE('questionnaire-thanks', -1);
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
@@ -20,7 +20,7 @@
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="new_id">{L_REPLACE}:</label><br /><span>{L_REPLACE_EXPLAIN}</span></dt>
|
||||
<dd><select id="new_id" name="new_id">{S_REPLACE_OPTIONS}</select></dd>
|
||||
<dd><select name="new_id">{S_REPLACE_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
|
||||
<p class="quick">
|
||||
@@ -54,7 +54,7 @@
|
||||
// <![CDATA[
|
||||
function update_image(newimage)
|
||||
{
|
||||
document.getElementById('newimg').src = (newimage) ? '../styles/{A_PATH}/imageset/' + encodeURI(newimage) : 'images/no_image.png';
|
||||
document.getElementById('newimg').src = (newimage) ? '../styles/{A_NAME}/imageset/' + encodeURI(newimage) : 'images/no_image.png';
|
||||
}
|
||||
// ]]>
|
||||
</script>
|
||||
@@ -135,11 +135,11 @@
|
||||
<div id="img_dimensions">
|
||||
<dl>
|
||||
<dt><label for="imgwidth">{L_IMAGE_WIDTH}:</label><br /><span>{L_AUTOMATIC_EXPLAIN}</span></dt>
|
||||
<dd><input id="imgwidth" type="text" name="imgwidth" value="{IMAGE_SIZE}" /></dd>
|
||||
<dd><input type="text" name="imgwidth" value="{IMAGE_SIZE}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="imgheight">{L_IMAGE_HEIGHT}:</label><br /><span>{L_AUTOMATIC_EXPLAIN}</span></dt>
|
||||
<dd><input id="imgheight" type="text" name="imgheight" value="{IMAGE_HEIGHT}" /></dd>
|
||||
<dd><input type="text" name="imgheight" value="{IMAGE_HEIGHT}" /></dd>
|
||||
</dl>
|
||||
</div>
|
||||
</fieldset>
|
||||
@@ -261,12 +261,12 @@
|
||||
<!-- ELSEIF S_CACHE -->
|
||||
|
||||
<a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">« {L_BACK}</a>
|
||||
|
||||
|
||||
<h1>{L_TEMPLATE_CACHE}</h1>
|
||||
|
||||
|
||||
<p>{L_TEMPLATE_CACHE_EXPLAIN}</p>
|
||||
|
||||
<form id="acp_styles" method="post" action="{U_ACTION}">
|
||||
|
||||
<form name="acp_styles" method="post" action="{U_ACTION}">
|
||||
<fieldset class="tabulated">
|
||||
<legend>{L_TEMPLATE_CACHE}</legend>
|
||||
|
||||
@@ -283,7 +283,7 @@
|
||||
<tbody>
|
||||
<!-- BEGIN file -->
|
||||
<!-- IF file.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
||||
<td><a href="{file.U_VIEWSOURCE}" onclick="popup(this.href, 750, 550, '_source'); return false;">{file.FILENAME_PATH}</a></td>
|
||||
<td><a href="{file.U_VIEWSOURCE}" onclick="popup(this.href, 750, 550, '_source'); return false;">{file.FILENAME}</a></td>
|
||||
<td>{file.FILESIZE}</td>
|
||||
<td>{file.CACHED}</td>
|
||||
<td>{file.MODIFIED}</td>
|
||||
@@ -361,7 +361,7 @@
|
||||
</p>
|
||||
</fieldset>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
<!-- ELSEIF S_FRONTEND -->
|
||||
@@ -455,37 +455,31 @@
|
||||
<legend>{L_TITLE}</legend>
|
||||
<dl>
|
||||
<dt><label for="name">{L_NAME}:</label></dt>
|
||||
<dd><!-- IF S_INSTALL --><strong id="name">{NAME}</strong><!-- ELSE --><input type="text" id="name" name="name" value="{NAME}" /><!-- ENDIF --></dd>
|
||||
<dd><!-- IF S_INSTALL --><b id="name">{NAME}</b><!-- ELSE --><input type="text" id="name" name="name" value="{NAME}" /><!-- ENDIF --></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="copyright">{L_COPYRIGHT}:</label></dt>
|
||||
<dd><!-- IF S_INSTALL --><strong id="copyright">{COPYRIGHT}</strong><!-- ELSE --><input type="text" id="copyright" name="copyright" value="{COPYRIGHT}" /><!-- ENDIF --></dd>
|
||||
<dd><!-- IF S_INSTALL --><b id="copyright">{COPYRIGHT}</b><!-- ELSE --><input type="text" id="copyright" name="copyright" value="{COPYRIGHT}" /><!-- ENDIF --></dd>
|
||||
</dl>
|
||||
<!-- IF S_SUPERTEMPLATE -->
|
||||
<dl>
|
||||
<dt><label for="inheriting">{L_INHERITING_FROM}:</label></dt>
|
||||
<dd><strong id="inheriting">{S_SUPERTEMPLATE}</strong></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_STYLE and not S_BASIS -->
|
||||
<dl>
|
||||
<dt><label for="template_id">{L_STYLE_TEMPLATE}:</label></dt>
|
||||
<dd><!-- IF S_INSTALL --><strong id="template_id">{TEMPLATE_NAME}</strong><!-- ELSE --><select id="template_id" name="template_id">{S_TEMPLATE_OPTIONS}</select><!-- ENDIF --></dd>
|
||||
<dd><!-- IF S_INSTALL --><b id="template_id">{TEMPLATE_NAME}</b><!-- ELSE --><select id="template_id" name="template_id">{S_TEMPLATE_OPTIONS}</select><!-- ENDIF --></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="theme_id">{L_STYLE_THEME}:</label></dt>
|
||||
<dd><!-- IF S_INSTALL --><strong id="theme_id">{THEME_NAME}</strong><!-- ELSE --><select id="theme_id" name="theme_id">{S_THEME_OPTIONS}</select><!-- ENDIF --></dd>
|
||||
<dd><!-- IF S_INSTALL --><b id="theme_id">{THEME_NAME}</b><!-- ELSE --><select id="theme_id" name="theme_id">{S_THEME_OPTIONS}</select><!-- ENDIF --></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="imageset_id">{L_STYLE_IMAGESET}:</label></dt>
|
||||
<dd><!-- IF S_INSTALL --><strong id="imageset_id">{IMAGESET_NAME}</strong><!-- ELSE --><select id="imageset_id" name="imageset_id">{S_IMAGESET_OPTIONS}</select><!-- ENDIF --></dd>
|
||||
<dd><!-- IF S_INSTALL --><b id="imageset_id">{IMAGESET_NAME}</b><!-- ELSE --><select id="imageset_id" name="imageset_id">{S_IMAGESET_OPTIONS}</select><!-- ENDIF --></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF (S_TEMPLATE or S_THEME) and (S_LOCATION or not S_INSTALL) -->
|
||||
<!-- IF S_TEMPLATE or S_THEME -->
|
||||
<dl>
|
||||
<dt><label for="store_db">{L_LOCATION}:</label><br /><span><!-- IF S_STORE_DB_DISABLED -->{L_LOCATION_DISABLED_EXPLAIN}<!-- ELSE -->{L_LOCATION_EXPLAIN}<!-- ENDIF --></span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="store_db" value="0"<!-- IF not S_STORE_DB --> id="store_db" checked="checked"<!-- ENDIF --> <!-- IF S_STORE_DB_DISABLED -->disabled="disabled" <!-- ENDIF --> />{L_STORE_FILESYSTEM}</label>
|
||||
<label><input type="radio" class="radio" name="store_db" value="1"<!-- IF S_STORE_DB --> id="store_db" checked="checked"<!-- ENDIF --> <!-- IF S_STORE_DB_DISABLED -->disabled="disabled" <!-- ENDIF -->/> {L_STORE_DATABASE}</label></dd>
|
||||
<dt><label for="store_db">{L_LOCATION}:</label><br /><span>{L_LOCATION_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="store_db" value="0"<!-- IF not S_STORE_DB --> id="store_db" checked="checked"<!-- ENDIF --> /> {L_STORE_FILESYSTEM}</label>
|
||||
<label><input type="radio" class="radio" name="store_db" value="1"<!-- IF S_STORE_DB --> id="store_db" checked="checked"<!-- ENDIF --> /> {L_STORE_DATABASE}</label></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_STYLE -->
|
||||
@@ -513,7 +507,7 @@
|
||||
<input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
@@ -10,11 +10,11 @@
|
||||
|
||||
<!-- IF S_UP_TO_DATE and S_UP_TO_DATE_AUTO -->
|
||||
<div class="successbox">
|
||||
<p>{L_VERSION_UP_TO_DATE_ACP} - <a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a></p>
|
||||
<p>{L_VERSION_UP_TO_DATE_ACP}</p>
|
||||
</div>
|
||||
<!-- ELSE -->
|
||||
<div class="errorbox">
|
||||
<p>{L_VERSION_NOT_UP_TO_DATE_ACP} - <a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a></p>
|
||||
<p>{L_VERSION_NOT_UP_TO_DATE_ACP}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
@@ -83,10 +83,6 @@
|
||||
|
||||
<!-- INCLUDE acp_users_feedback.html -->
|
||||
|
||||
<!-- ELSEIF S_WARNINGS -->
|
||||
|
||||
<!-- INCLUDE acp_users_warnings.html -->
|
||||
|
||||
<!-- ELSEIF S_PROFILE -->
|
||||
|
||||
<!-- INCLUDE acp_users_profile.html -->
|
||||
@@ -135,8 +131,8 @@
|
||||
<!-- ELSE -->
|
||||
<!-- IF group.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
||||
<td><a href="{group.U_EDIT_GROUP}">{group.GROUP_NAME}</a></td>
|
||||
<td><!-- IF group.S_IS_MEMBER --><!-- IF group.S_NO_DEFAULT --><a href="{group.U_DEFAULT}">{L_GROUP_DEFAULT}</a><!-- ELSE --><strong>{L_GROUP_DEFAULT}</strong><!-- ENDIF --><!-- ELSEIF not group.S_IS_MEMBER and group.U_APPROVE --><a href="{group.U_APPROVE}">{L_GROUP_APPROVE}</a><!-- ELSE --> <!-- ENDIF --></td>
|
||||
<td><!-- IF group.S_IS_MEMBER and not group.S_SPECIAL_GROUP --><a href="{group.U_DEMOTE_PROMOTE}">{group.L_DEMOTE_PROMOTE}</a><!-- ELSE --> <!-- ENDIF --></td>
|
||||
<td><!-- IF group.S_NO_DEFAULT --><a href="{group.U_DEFAULT}">{L_GROUP_DEFAULT}</a><!-- ELSE --><strong>{L_GROUP_DEFAULT}</strong><!-- ENDIF --></td>
|
||||
<td><!-- IF not group.S_SPECIAL_GROUP --><a href="{group.U_DEMOTE_PROMOTE}">{group.L_DEMOTE_PROMOTE}</a><!-- ELSE --> <!-- ENDIF --></td>
|
||||
<td><a href="{group.U_DELETE}">{L_GROUP_DELETE}</a></td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
@@ -201,7 +197,7 @@
|
||||
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> • <span>{PAGINATION}</span>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
||||
<fieldset class="quick">
|
||||
<input class="button2" type="submit" name="delmarked" value="{L_DELETE_MARKED}" />
|
||||
<p class="small"><a href="#" onclick="marklist('user_attachments', 'mark', true);">{L_MARK_ALL}</a> • <a href="#" onclick="marklist('user_attachments', 'mark', false);">{L_UNMARK_ALL}</a></p>
|
||||
@@ -219,7 +215,7 @@
|
||||
<form id="select_forum" method="post" action="{U_ACTION}">
|
||||
|
||||
<fieldset class="quick" style="text-align: left;">
|
||||
{L_SELECT_FORUM}: <select name="f">{S_FORUM_OPTIONS}</select>
|
||||
{L_SELECT_FORUM}: <select name="f">{S_FORUM_OPTIONS}</select>
|
||||
<input class="button2" type="submit" value="{L_GO}" name="select" />
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
|
@@ -8,13 +8,11 @@
|
||||
<dd><label><input type="checkbox" class="radio" name="delete" /> {L_DELETE_AVATAR}</label></dd>
|
||||
</dl>
|
||||
<!-- IF not S_IN_AVATAR_GALLERY -->
|
||||
<!-- IF S_UPLOAD_FILE -->
|
||||
<!-- IF S_CAN_UPLOAD -->
|
||||
<dl>
|
||||
<dt><label for="uploadfile">{L_UPLOAD_AVATAR_FILE}:</label></dt>
|
||||
<dd><input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_MAX_FILESIZE}" /><input type="file" id="uploadfile" name="uploadfile" /></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_REMOTE_UPLOAD -->
|
||||
<dl>
|
||||
<dt><label for="uploadurl">{L_UPLOAD_AVATAR_URL}:</label><br /><span>{L_UPLOAD_AVATAR_URL_EXPLAIN}</span></dt>
|
||||
<dd><input name="uploadurl" type="text" id="uploadurl" value="" /></dd>
|
||||
|
@@ -30,7 +30,7 @@
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label>{L_POSTS}:</label></dt>
|
||||
<dd><strong>{USER_POSTS}</strong><!-- IF POSTS_IN_QUEUE and U_MCP_QUEUE --> (<a href="{U_MCP_QUEUE}">{L_POSTS_IN_QUEUE}</a>)<!-- ELSEIF POSTS_IN_QUEUE --> ({L_POSTS_IN_QUEUE})<!-- ENDIF --></dd>
|
||||
<dd><strong>{USER_POSTS}</strong></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label>{L_WARNINGS}:</label></dt>
|
||||
@@ -138,7 +138,7 @@
|
||||
</p>
|
||||
|
||||
</fieldset>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
@@ -93,7 +93,7 @@
|
||||
// ]]>
|
||||
</script>
|
||||
</dt>
|
||||
<dd style="margin-left: 90px;"><textarea name="signature" rows="10" cols="60" style="width: 95%;" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onfocus="initInsertions();">{SIGNATURE}</textarea></dd>
|
||||
<dd style="margin-left: 90px;"><textarea name="signature" rows="10" cols="60" style="width: 95%;" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{SIGNATURE}</textarea></dd>
|
||||
<dd style="margin-left: 90px; margin-top: 5px;">
|
||||
<!-- IF S_BBCODE_ALLOWED -->
|
||||
<label><input type="checkbox" class="radio" name="disable_bbcode"{S_BBCODE_CHECKED} /> {L_DISABLE_BBCODE}</label>
|
||||
|
@@ -1,36 +0,0 @@
|
||||
<form id="list" method="post" action="{U_ACTION}">
|
||||
|
||||
<!-- IF .warn -->
|
||||
<table cellspacing="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{L_REPORT_BY}</th>
|
||||
<th>{L_TIME}</th>
|
||||
<th>{L_FEEDBACK}</th>
|
||||
<th>{L_MARK}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- BEGIN warn -->
|
||||
<!-- IF warn.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
||||
<td>{warn.USERNAME}</td>
|
||||
<td style="text-align: center; nowrap: nowrap;">{warn.DATE}</td>
|
||||
<td>{warn.ACTION}</td>
|
||||
<td style="text-align: center;"><input type="checkbox" class="radio" name="mark[]" value="{warn.ID}" /></td>
|
||||
</tr>
|
||||
<!-- END warn -->
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- ELSE -->
|
||||
<div class="errorbox">
|
||||
<p>{L_NO_WARNINGS}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<fieldset class="quick">
|
||||
<input class="button2" type="submit" name="delall" value="{L_DELETE_ALL}" />
|
||||
<input class="button2" type="submit" name="delmarked" value="{L_DELETE_MARKED}" />
|
||||
<p class="small"><a href="#" onclick="marklist('list', 'mark', true);">{L_MARK_ALL}</a> • <a href="#" onclick="marklist('list', 'mark', false);">{L_UNMARK_ALL}</a></p>
|
||||
</fieldset>
|
||||
{S_FORM_TOKEN}
|
||||
</form>
|
@@ -69,8 +69,8 @@ h2, caption {
|
||||
h3, h4 {
|
||||
font-family: "Trebuchet MS", Helvetica, sans-serif;
|
||||
font-size: 1.20em;
|
||||
text-decoration: none;
|
||||
line-height: 1.20em;
|
||||
text-decoration: none;
|
||||
line-height: 1.20em;
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
@@ -97,8 +97,8 @@ hr {
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
.small {
|
||||
font-size: 0.85em;
|
||||
.small {
|
||||
font-size: 0.85em;
|
||||
}
|
||||
|
||||
/* General links */
|
||||
@@ -121,17 +121,6 @@ a:active {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* List items */
|
||||
ul, ol {
|
||||
list-style-position: inside;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
li {
|
||||
display: list-item;
|
||||
list-style-type: inherit;
|
||||
}
|
||||
|
||||
/* Main blocks
|
||||
---------------------------------------- */
|
||||
#wrap {
|
||||
@@ -202,8 +191,8 @@ li {
|
||||
margin: 0 3% 0 0;
|
||||
}
|
||||
|
||||
* html #main {
|
||||
height: 350px;
|
||||
* html #main {
|
||||
height: 350px;
|
||||
}
|
||||
|
||||
#page-body.simple-page-body {
|
||||
@@ -315,7 +304,7 @@ li {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
span.corners-top, span.corners-bottom,
|
||||
span.corners-top, span.corners-bottom,
|
||||
span.corners-top span, span.corners-bottom span {
|
||||
font-size: 1px;
|
||||
line-height: 1px;
|
||||
@@ -794,7 +783,7 @@ label img {
|
||||
|
||||
fieldset.quick, p.quick {
|
||||
margin: 0 0 5px;
|
||||
padding: 5px 0 0;
|
||||
padding: 5px 0 0;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
text-align: right;
|
||||
@@ -847,7 +836,7 @@ select option.disabled {
|
||||
}
|
||||
|
||||
/* Special case inputs */
|
||||
select#board_timezone,
|
||||
select#board_timezone,
|
||||
select#full_folder_action {
|
||||
width: 95%;
|
||||
}
|
||||
@@ -1186,10 +1175,6 @@ input.disabled {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.notice {
|
||||
background-color: #62A5CC;
|
||||
}
|
||||
|
||||
/* Special cases for the error page */
|
||||
#errorpage #page-header a {
|
||||
font-weight: bold;
|
||||
@@ -1244,12 +1229,12 @@ input.disabled {
|
||||
}
|
||||
|
||||
/* Nice method for clearing floated blocks without having to insert any extra markup
|
||||
From http://www.positioniseverything.net/easyclearing.html
|
||||
From http://www.positioniseverything.net/easyclearing.html
|
||||
.clearfix:after, #tabs:after, .row:after, #content:after, fieldset dl:after, #page-body:after {
|
||||
content: ".";
|
||||
display: block;
|
||||
height: 0;
|
||||
clear: both;
|
||||
content: ".";
|
||||
display: block;
|
||||
height: 0;
|
||||
clear: both;
|
||||
visibility: hidden;
|
||||
}*/
|
||||
|
||||
@@ -1316,7 +1301,7 @@ fieldset.permissions legend input{
|
||||
height: 1.1em;
|
||||
}
|
||||
|
||||
/* Permission sections */
|
||||
/* Permission sections */
|
||||
fieldset.permissions .permissions-simple {
|
||||
text-align: left;
|
||||
padding-top: 3px;
|
||||
@@ -1348,21 +1333,18 @@ fieldset.permissions .permissions-switch {
|
||||
fieldset.permissions .padding {
|
||||
}
|
||||
|
||||
.permissions-switch {
|
||||
margin-top: -6px;
|
||||
font-size: .9em;
|
||||
}
|
||||
|
||||
.permissions-switch a {
|
||||
text-decoration: underline;
|
||||
font-size: 0.90em;
|
||||
}
|
||||
|
||||
.permissions-reset {
|
||||
margin-top: -6px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.permissions-reset a {
|
||||
font-size: .85em;
|
||||
font-size: .8em;
|
||||
}
|
||||
|
||||
/* Tabbed menu */
|
||||
@@ -1527,7 +1509,7 @@ fieldset.permissions .padding {
|
||||
background-image: url("../images/corners_right2.gif");
|
||||
}
|
||||
|
||||
.permissions-panel span.corners-top, .permissions-panel span.corners-bottom,
|
||||
.permissions-panel span.corners-top, .permissions-panel span.corners-bottom,
|
||||
.permissions-panel span.corners-top span, .permissions-panel span.corners-bottom span {
|
||||
font-size: 1px;
|
||||
line-height: 1px;
|
||||
@@ -1605,7 +1587,7 @@ fieldset.permissions .padding {
|
||||
}
|
||||
|
||||
.permissions-panel th.row4 {
|
||||
background-image: none;
|
||||
background-image: none;
|
||||
background-color: #E4E8EB;
|
||||
color: #536482;
|
||||
border: none;
|
||||
@@ -1613,8 +1595,8 @@ fieldset.permissions .padding {
|
||||
|
||||
.permissions-panel th a:link, .permissions-panel th a:hover, .permissions-panel th a:visited {
|
||||
display: block;
|
||||
color: #FFFFFF;
|
||||
text-decoration: underline;
|
||||
color: #FFFFFF;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.permissions-panel td.permissions-yes label:hover {
|
||||
|
@@ -1,4 +0,0 @@
|
||||
<dl>
|
||||
<dt><label for="captcha_preview">{L_PREVIEW}:</label><br /><span>{L_CAPTCHA_PREVIEW_EXPLAIN}</span></dt>
|
||||
<dd><img src="{CONFIRM_IMAGE}" alt="{L_PREVIEW}" width="360" height="96" id="captcha_preview" /></dd>
|
||||
</dl>
|
@@ -1,74 +0,0 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<a name="maincontent"></a>
|
||||
<a href="{U_ACTION}" style="float: {S_CONTENT_FLOW_END};">« {L_BACK}</a>
|
||||
|
||||
<h1>{L_ACP_VC_SETTINGS}</h1>
|
||||
|
||||
<p>{L_ACP_VC_SETTINGS_EXPLAIN}</p>
|
||||
|
||||
|
||||
<form id="acp_captcha" method="post" action="{U_ACTION}">
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_GENERAL_OPTIONS}</legend>
|
||||
|
||||
<dl>
|
||||
<dt><label for="captcha_gd_foreground_noise">{L_CAPTCHA_GD_FOREGROUND_NOISE}:</label><br /><span>{L_CAPTCHA_GD_FOREGROUND_NOISE_EXPLAIN}</span></dt>
|
||||
<dd><label><input id="captcha_gd_foreground_noise" name="captcha_gd_foreground_noise" value="1" class="radio" type="radio"<!-- IF CAPTCHA_GD_FOREGROUND_NOISE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input name="captcha_gd_foreground_noise" value="0" class="radio" type="radio"<!-- IF not CAPTCHA_GD_FOREGROUND_NOISE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="captcha_gd_x_grid">{L_CAPTCHA_GD_X_GRID}:</label><br /><span>{L_CAPTCHA_GD_X_GRID_EXPLAIN}</span></dt>
|
||||
<dd><input id="captcha_gd_x_grid" name="captcha_gd_x_grid" value="{CAPTCHA_GD_X_GRID}" type="text" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="captcha_gd_y_grid">{L_CAPTCHA_GD_Y_GRID}:</label><br /><span>{L_CAPTCHA_GD_Y_GRID_EXPLAIN}</span></dt>
|
||||
<dd><input id="captcha_gd_y_grid" name="captcha_gd_y_grid" value="{CAPTCHA_GD_Y_GRID}" type="text" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="captcha_gd_wave">{L_CAPTCHA_GD_WAVE}:</label><br /><span>{L_CAPTCHA_GD_WAVE_EXPLAIN}</span></dt>
|
||||
<dd><label><input id="captcha_gd_wave" name="captcha_gd_wave" value="1" class="radio" type="radio"<!-- IF CAPTCHA_GD_WAVE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input name="captcha_gd_wave" value="0" class="radio" type="radio"<!-- IF not CAPTCHA_GD_WAVE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="captcha_gd_3d_noise">{L_CAPTCHA_GD_3D_NOISE}:</label><br /><span>{L_CAPTCHA_GD_3D_NOISE_EXPLAIN}</span></dt>
|
||||
<dd><label><input id="captcha_gd_3d_noise" name="captcha_gd_3d_noise" value="1" class="radio" type="radio"<!-- IF CAPTCHA_GD_3D_NOISE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input name="captcha_gd_3d_noise" value="0" class="radio" type="radio"<!-- IF not CAPTCHA_GD_3D_NOISE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="captcha_gd_fonts">{L_CAPTCHA_GD_FONTS}:</label><br /><span>{L_CAPTCHA_GD_FONTS_EXPLAIN}</span></dt>
|
||||
<dd><label><input id="captcha_gd_fonts" name="captcha_gd_fonts" value="1" class="radio" type="radio"<!-- IF CAPTCHA_GD_FONTS == 1 --> checked="checked"<!-- ENDIF --> /> {L_CAPTCHA_FONT_DEFAULT}</label>
|
||||
<label><input name="captcha_gd_fonts" value="2" class="radio" type="radio"<!-- IF CAPTCHA_GD_FONTS == 2 --> checked="checked"<!-- ENDIF --> /> {L_CAPTCHA_FONT_NEW}</label>
|
||||
<label><input name="captcha_gd_fonts" value="3" class="radio" type="radio"<!-- IF CAPTCHA_GD_FONTS == 3 --> checked="checked"<!-- ENDIF --> /> {L_CAPTCHA_FONT_LOWER}</label>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{L_PREVIEW}</legend>
|
||||
<!-- IF CAPTCHA_PREVIEW -->
|
||||
<!-- INCLUDE {CAPTCHA_PREVIEW} -->
|
||||
<!-- ENDIF -->
|
||||
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_ACP_SUBMIT_CHANGES}</legend>
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
||||
<input class="button2" type="submit" id="preview" name="preview" value="{L_PREVIEW}" />
|
||||
</p>
|
||||
|
||||
<input type="hidden" name="select_captcha" value="{CAPTCHA_NAME}" />
|
||||
<input type="hidden" name="configure" value="1" />
|
||||
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
@@ -1,92 +0,0 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<a name="maincontent"></a>
|
||||
|
||||
|
||||
<a href="<!-- IF U_LIST -->{U_LIST}<!-- ELSE -->{U_ACTION}<!-- ENDIF -->" style="float: {S_CONTENT_FLOW_END};">« {L_BACK}</a>
|
||||
|
||||
<h1>{L_QUESTIONS}</h1>
|
||||
|
||||
<p>{L_QUESTIONS_EXPLAIN}</p>
|
||||
<!-- IF S_LIST -->
|
||||
<form id="captcha_qa" method="post" action="{U_ACTION}">
|
||||
|
||||
<fieldset class="tabulated">
|
||||
<legend>{L_QUESTIONS}</legend>
|
||||
|
||||
<table cellspacing="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3">{L_QUESTIONS}</th>
|
||||
</tr>
|
||||
<tr class="row3">
|
||||
<td style="text-align: center;">{L_QUESTION_TEXT}</td>
|
||||
<td style="width: 5%; text-align: center;">{L_QUESTION_LANG}</td>
|
||||
<td style="vertical-align: top; width: 50px; text-align: center; white-space: nowrap;">{L_ACTION}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- BEGIN questions -->
|
||||
|
||||
<!-- IF questions.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
||||
|
||||
<td style="text-align: left;">{questions.QUESTION_TEXT}</td>
|
||||
<td style="text-align: center;">{questions.QUESTION_LANG}</td>
|
||||
<td style="text-align: center;"><a href="{questions.U_EDIT}">{ICON_EDIT}</a> <a href="{questions.U_DELETE}">{ICON_DELETE}</a></td>
|
||||
</tr>
|
||||
<!-- END questions -->
|
||||
</tbody>
|
||||
</table>
|
||||
<fieldset class="quick">
|
||||
<input class="button1" type="submit" name="add" value="{L_ADD}" />
|
||||
<input type="hidden" name="action" value="add" />
|
||||
<input type="hidden" name="configure" value="1" />
|
||||
<input type="hidden" name="select_captcha" value="{CLASS}" />
|
||||
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
<!-- ELSE -->
|
||||
<!-- IF S_ERROR -->
|
||||
<div class="errorbox">
|
||||
<h3>{L_WARNING}</h3>
|
||||
<p>{L_QA_ERROR_MSG}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<form id="captcha_qa" method="post" action="{U_ACTION}">
|
||||
<fieldset>
|
||||
<legend>{L_EDIT_QUESTION}</legend>
|
||||
<dl>
|
||||
<dt><label for="strict">{L_QUESTION_STRICT}:</label><br /><span>{L_QUESTION_STRICT_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="strict" value="1"<!-- IF STRICT --> id="strict" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="strict" value="0"<!-- IF not STRICT --> id="strict" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
|
||||
<dl>
|
||||
<dt><label for="lang_iso">{L_QUESTION_LANG}</label><br /><span>{L_QUESTION_LANG_EXPLAIN}</span></dt>
|
||||
<dd><select id="lang_iso" name="lang_iso"><!-- BEGIN langs --><option value="{langs.ISO}" <!-- IF langs.ISO == LANG_ISO --> selected="selected" <!-- ENDIF -->>{langs.NAME}</option><!-- END langs --></select></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="question_text">{L_QUESTION_TEXT}</label><br /><span>{L_QUESTION_TEXT_EXPLAIN}</span></dt>
|
||||
<dd><input id="question_text" maxlength="255" size="60" name="question_text" type="text" value="{QUESTION_TEXT}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="answers">{L_QUESTION_ANSWERS}</label><br /><span>{L_ANSWERS_EXPLAIN}</span></dt>
|
||||
<dd><textarea id="answers" style="word-wrap: normal; overflow-x: scroll;" name="answers" rows="15" cols="800" >{ANSWERS}</textarea></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
<fieldset class="quick">
|
||||
<input class="button1" type="submit" name="submit" value="{L_SUBMIT}" />
|
||||
<input type="hidden" name="question_id" value="{QUESTION_ID}" />
|
||||
<input type="hidden" name="action" value="add" />
|
||||
<input type="hidden" name="configure" value="1" />
|
||||
<input type="hidden" name="select_captcha" value="{CLASS}" />
|
||||
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
@@ -1,7 +0,0 @@
|
||||
<dl>
|
||||
<dt><label for="answer">{L_CONFIRM_QUESTION}:</label><br /><span>{L_CONFIRM_QUESTION_EXPLAIN}</span></dt>
|
||||
|
||||
<dd>
|
||||
<input type="text" tabindex="10" name="answer" id="answer" size="45" class="inputbox autowidth" title="{L_ANSWER}" />
|
||||
</dd>
|
||||
</dl>
|
@@ -1,33 +0,0 @@
|
||||
<!-- IF S_RECAPTCHA_AVAILABLE -->
|
||||
<dl>
|
||||
<dd>
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
var RecaptchaOptions = {
|
||||
lang : '{L_RECAPTCHA_LANG}',
|
||||
};
|
||||
// ]]>
|
||||
</script>
|
||||
<script type="text/javascript" src="{RECAPTCHA_SERVER}/challenge?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}"></script>
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
|
||||
document.getElementById('recaptcha_table').style.direction = 'ltr';
|
||||
<!-- ENDIF -->
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
|
||||
<noscript>
|
||||
<div>
|
||||
<object data="{RECAPTCHA_SERVER}/noscript?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}" type="text/html" height="300" width="500"></object><br />
|
||||
<textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
|
||||
<input type="hidden" name="recaptcha_response_field" value="manual_challenge" />
|
||||
</div>
|
||||
</noscript>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<!-- ELSE -->
|
||||
{L_RECAPTCHA_NOT_AVAILABLE}
|
||||
<!-- ENDIF -->
|
@@ -1,50 +0,0 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<a name="maincontent"></a>
|
||||
|
||||
<h1>{L_ACP_VC_SETTINGS}</h1>
|
||||
|
||||
<p>{L_ACP_VC_SETTINGS_EXPLAIN}</p>
|
||||
|
||||
|
||||
<form id="acp_captcha" method="post" action="{U_ACTION}">
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_GENERAL_OPTIONS}</legend>
|
||||
|
||||
<dl>
|
||||
<dt><label for="recaptcha_pubkey">{L_RECAPTCHA_PUBLIC}:</label><br /><span>{L_RECAPTCHA_PUBLIC_EXPLAIN}</span></dt>
|
||||
<dd><input id="recaptcha_pubkey" name="recaptcha_pubkey" value="{RECAPTCHA_PUBKEY}" size="50" type="text" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="recaptcha_privkey">{L_RECAPTCHA_PRIVATE}:</label><br /><span>{L_RECAPTCHA_PRIVATE_EXPLAIN}</span></dt>
|
||||
<dd><input id="recaptcha_privkey" name="recaptcha_privkey" value="{RECAPTCHA_PRIVKEY}" size="50" type="text" /></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{L_PREVIEW}</legend>
|
||||
<!-- IF PREVIEW -->
|
||||
<div class="successbox">
|
||||
<h3>{L_WARNING}</h3>
|
||||
<p>{L_CAPTCHA_PREVIEW_MSG}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<!-- INCLUDE {CAPTCHA_PREVIEW} -->
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_ACP_SUBMIT_CHANGES}</legend>
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
||||
</p>
|
||||
<input type="hidden" name="select_captcha" value="{CAPTCHA_NAME}" />
|
||||
<input type="hidden" name="configure" value="1" />
|
||||
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
@@ -16,6 +16,7 @@ var is_ie = ((clientPC.indexOf('msie') != -1) && (clientPC.indexOf('opera') == -
|
||||
var is_win = ((clientPC.indexOf('win') != -1) || (clientPC.indexOf('16bit') != -1));
|
||||
|
||||
var baseHeight;
|
||||
window.onload = initInsertions;
|
||||
|
||||
/**
|
||||
* Shows the help messages in the helpline window
|
||||
@@ -258,7 +259,7 @@ function addquote(post_id, username)
|
||||
*/
|
||||
function mozWrap(txtarea, open, close)
|
||||
{
|
||||
var selLength = (typeof(txtarea.textLength) == 'undefined') ? txtarea.value.length : txtarea.textLength;
|
||||
var selLength = txtarea.textLength;
|
||||
var selStart = txtarea.selectionStart;
|
||||
var selEnd = txtarea.selectionEnd;
|
||||
var scrollTop = txtarea.scrollTop;
|
||||
|
0
phpBB/adm/style/install_convert.html
Normal file → Executable file
0
phpBB/adm/style/install_convert.html
Normal file → Executable file
0
phpBB/adm/style/install_error.html
Normal file → Executable file
0
phpBB/adm/style/install_error.html
Normal file → Executable file
1
phpBB/adm/style/install_footer.html
Normal file → Executable file
1
phpBB/adm/style/install_footer.html
Normal file → Executable file
@@ -2,7 +2,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
0
phpBB/adm/style/install_header.html
Normal file → Executable file
0
phpBB/adm/style/install_header.html
Normal file → Executable file
0
phpBB/adm/style/install_install.html
Normal file → Executable file
0
phpBB/adm/style/install_install.html
Normal file → Executable file
0
phpBB/adm/style/install_main.html
Normal file → Executable file
0
phpBB/adm/style/install_main.html
Normal file → Executable file
@@ -63,7 +63,7 @@
|
||||
<p>{L_UPDATE_SUCCESS_EXPLAIN}</p>
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
<input class="button1" type="submit" name="check_again" value="{L_CONTINUE_UPDATE}" />
|
||||
<input class="button1" type="submit" name="check_again" value="{L_CHECK_FILES_AGAIN}" />
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
@@ -186,174 +186,100 @@
|
||||
<p>{L_NO_UPDATE_FILES_EXPLAIN}</p><br />
|
||||
|
||||
<strong>{NO_UPDATE_FILES}</strong>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<form id="install_update" method="post" action="{U_UPDATE_ACTION}">
|
||||
|
||||
<!-- IF .up_to_date -->
|
||||
<h2>{L_FILES_UP_TO_DATE}</h2>
|
||||
<p>{L_FILES_UP_TO_DATE_EXPLAIN}</p>
|
||||
|
||||
<fieldset>
|
||||
<legend><img src="{T_IMAGE_PATH}file_up_to_date.gif" alt="{L_STATUS_UP_TO_DATE}" /></legend>
|
||||
<!-- BEGIN up_to_date -->
|
||||
<dl>
|
||||
<dd class="full" style="text-align: left;"><strong>{up_to_date.FILENAME}</strong></dd>
|
||||
</dl>
|
||||
<!-- END up_to_date -->
|
||||
</fieldset>
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF .new -->
|
||||
<h2>{L_FILES_NEW}</h2>
|
||||
<p>{L_FILES_NEW_EXPLAIN}</p>
|
||||
|
||||
<fieldset>
|
||||
<legend><img src="{T_IMAGE_PATH}file_new.gif" alt="{L_STATUS_NEW}" /></legend>
|
||||
<!-- BEGIN new -->
|
||||
<dl>
|
||||
<dt style="width: 60%;"><strong><!-- IF new.DIR_PART -->{new.DIR_PART}<br /><!-- ENDIF -->{new.FILE_PART}</strong>
|
||||
<!-- IF new.S_CUSTOM --><br /><span><em>{L_FILE_USED}: </em>{new.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
|
||||
</dt>
|
||||
<dd style="margin-left: 60%;">
|
||||
<!-- IF not new.S_BINARY -->[<a href="{new.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{new.L_SHOW_DIFF}</a>]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF -->
|
||||
</dd>
|
||||
<!-- IF new.S_CUSTOM -->
|
||||
<dd style="margin-left: 60%;"><label><input type="checkbox" name="no_update[]" value="{new.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
|
||||
<!-- ENDIF -->
|
||||
</dl>
|
||||
<!-- END new -->
|
||||
</fieldset>
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF .not_modified -->
|
||||
<h2>{L_FILES_NOT_MODIFIED}</h2>
|
||||
<div style="float: {S_CONTENT_FLOW_END};">» <a href="#" onclick="dE('not_modified', 0); return false;">{L_TOGGLE_DISPLAY}</a></div>
|
||||
<p>{L_FILES_NOT_MODIFIED_EXPLAIN}</p>
|
||||
|
||||
<fieldset id="not_modified" style="display: none;">
|
||||
<legend><img src="{T_IMAGE_PATH}file_not_modified.gif" alt="{L_STATUS_NOT_MODIFIED}" /></legend>
|
||||
<!-- BEGIN not_modified -->
|
||||
<dl>
|
||||
<dt style="width: 60%;"><strong><!-- IF not_modified.DIR_PART -->{not_modified.DIR_PART}<br /><!-- ENDIF -->{not_modified.FILE_PART}</strong>
|
||||
<!-- IF not_modified.S_CUSTOM --><br /><span><em>{L_FILE_USED}: </em>{not_modified.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
|
||||
</dt>
|
||||
<dd style="margin-left: 60%;"><!-- IF not not_modified.S_BINARY -->[<a href="{not_modified.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{not_modified.L_SHOW_DIFF}</a>]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF --></dd>
|
||||
<!-- IF not_modified.S_CUSTOM -->
|
||||
<dd style="margin-left: 60%;"><label><input type="checkbox" name="no_update[]" value="{not_modified.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
|
||||
<!-- IF .files -->
|
||||
<!-- BEGIN files -->
|
||||
<!-- IF files.S_STATUS -->
|
||||
<!-- IF not files.S_FIRST_ROW -->
|
||||
</fieldset></div>
|
||||
<!-- ENDIF -->
|
||||
</dl>
|
||||
<!-- END not_modified -->
|
||||
</fieldset>
|
||||
|
||||
<!-- ENDIF -->
|
||||
<h2>{files.TITLE}</h2>
|
||||
|
||||
<!-- IF .modified -->
|
||||
<h2>{L_FILES_MODIFIED}</h2>
|
||||
<p>{L_FILES_MODIFIED_EXPLAIN}</p>
|
||||
<!-- IF files.STATUS eq 'not_modified' --><div style="float: {S_CONTENT_FLOW_END};">» <a href="#" onclick="dE('not_modified', 0); return false;">{L_TOGGLE_DISPLAY}</a></div><!-- ENDIF -->
|
||||
<p>{files.EXPLAIN}</p>
|
||||
|
||||
<!-- BEGIN modified -->
|
||||
<fieldset>
|
||||
<legend><img src="{T_IMAGE_PATH}file_modified.gif" alt="{L_STATUS_MODIFIED}" /></legend>
|
||||
<dl>
|
||||
<dt style="width: 60%;"><strong><!-- IF modified.DIR_PART -->{modified.DIR_PART}<br /><!-- ENDIF -->{modified.FILE_PART}</strong>
|
||||
<!-- IF modified.S_CUSTOM --><br /><span><em>{L_FILE_USED}: </em>{modified.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
|
||||
</dt>
|
||||
<dd style="margin-left: 60%;"> </dd>
|
||||
<!-- IF modified.S_CUSTOM -->
|
||||
<dd style="margin-left: 60%;"><label><input type="checkbox" name="no_update[]" value="{modified.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
|
||||
<!-- ENDIF -->
|
||||
</dl>
|
||||
<dl>
|
||||
<dt style="width: 60%"><label><input type="radio" class="radio" name="modified[{modified.FILENAME}]" value="0" checked="checked" /> {L_MERGE_MODIFICATIONS_OPTION}</label></dt>
|
||||
<dd style="margin-left: 60%;"><!-- IF not modified.S_BINARY -->[<a href="{modified.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{modified.L_SHOW_DIFF}</a>]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF --></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt style="width: 60%"><label><input type="radio" class="radio" name="modified[{modified.FILENAME}]" value="1" /> {L_MERGE_NO_MERGE_NEW_OPTION}</label></dt>
|
||||
<dd style="margin-left: 60%;"><!-- IF not modified.S_BINARY -->[<a href="{modified.U_VIEW_NO_MERGE_NEW}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]<!-- ELSE --> <!-- ENDIF --></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt style="width: 60%"><label><input type="radio" class="radio" name="modified[{modified.FILENAME}]" value="2" /> {L_MERGE_NO_MERGE_MOD_OPTION}</label></dt>
|
||||
<dd style="margin-left: 60%;"><!-- IF not modified.S_BINARY -->[<a href="{modified.U_VIEW_NO_MERGE_MOD}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]<!-- ELSE --> <!-- ENDIF --></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
<!-- END modified -->
|
||||
<div style="display: <!-- IF files.STATUS neq 'not_modified' -->block<!-- ELSE -->none<!-- ENDIF -->;" id="{files.STATUS}">
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF .new_conflict -->
|
||||
<h2>{L_FILES_NEW_CONFLICT}</h2>
|
||||
<p>{L_FILES_NEW_CONFLICT_EXPLAIN}</p>
|
||||
|
||||
<fieldset>
|
||||
<legend><img src="{T_IMAGE_PATH}file_new_conflict.gif" alt="{L_STATUS_NEW_CONFLICT}" /></legend>
|
||||
<!-- BEGIN new_conflict -->
|
||||
<dl>
|
||||
<dt style="width: 60%;"><strong><!-- IF new_conflict.DIR_PART -->{new_conflict.DIR_PART}<br /><!-- ENDIF -->{new_conflict.FILE_PART}</strong>
|
||||
<!-- IF new_conflict.S_CUSTOM --><br /><span><em>{L_FILE_USED}: </em>{new_conflict.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
|
||||
</dt>
|
||||
<dd style="margin-left: 60%;">
|
||||
<!-- IF not new_conflict.S_BINARY -->[<a href="{new_conflict.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{new_conflict.L_SHOW_DIFF}</a>]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF -->
|
||||
</dd>
|
||||
<!-- IF new_conflict.S_CUSTOM -->
|
||||
<dd style="margin-left: 60%;"><label><input type="checkbox" name="no_update[]" value="{new_conflict.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
|
||||
<!-- ENDIF -->
|
||||
</dl>
|
||||
<!-- END new_conflict -->
|
||||
</fieldset>
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF .conflict -->
|
||||
<h2>{L_FILES_CONFLICT}</h2>
|
||||
<p>{L_FILES_CONFLICT_EXPLAIN}</p>
|
||||
|
||||
<!-- BEGIN conflict -->
|
||||
<fieldset>
|
||||
<legend><img src="{T_IMAGE_PATH}file_conflict.gif" alt="{L_STATUS_CONFLICT}" /></legend>
|
||||
<dl>
|
||||
<dt style="width: 60%;"><strong><!-- IF conflict.DIR_PART -->{conflict.DIR_PART}<br /><!-- ENDIF -->{conflict.FILE_PART}</strong>
|
||||
<!-- IF conflict.S_CUSTOM --><br /><span><em>{L_FILE_USED}: </em>{conflict.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
|
||||
<!-- IF conflict.NUM_CONFLICTS --><br /><span>{L_NUM_CONFLICTS}: {conflict.NUM_CONFLICTS}</span><!-- ENDIF -->
|
||||
</dt>
|
||||
<dd style="margin-left: 60%;">
|
||||
<!-- IF not conflict.S_BINARY -->[<a href="{conflict.U_SHOW_DIFF}">{L_DOWNLOAD_CONFLICTS}</a>]<br />{L_DOWNLOAD_CONFLICTS_EXPLAIN}
|
||||
<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF -->
|
||||
</dd>
|
||||
<!-- IF conflict.S_CUSTOM -->
|
||||
<dd style="margin-left: 60%;"><label><input type="checkbox" name="no_update[]" value="{conflict.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
|
||||
<!-- ENDIF -->
|
||||
</dl>
|
||||
<!-- IF conflict.S_BINARY -->
|
||||
<dl>
|
||||
<dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{conflict.FILENAME}]" value="1" checked="checked" /> {L_MERGE_NO_MERGE_NEW_OPTION}</label></dt>
|
||||
<dd style="margin-left: 60%;"> </dd>
|
||||
</dl>
|
||||
<fieldset>
|
||||
<legend><img src="{T_IMAGE_PATH}file_{files.STATUS}.gif" alt="{files.L_STATUS}" /></legend>
|
||||
<!-- ELSE -->
|
||||
<dl>
|
||||
<dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{conflict.FILENAME}]" value="3" checked="checked" /> {L_MERGE_NEW_FILE_OPTION}</label></dt>
|
||||
<dd style="margin-left: 60%;">[<a href="{conflict.U_VIEW_NEW_FILE}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_MODIFIED}</a>]</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{conflict.FILENAME}]" value="4" /> {L_MERGE_MOD_FILE_OPTION}</label></dt>
|
||||
<dd style="margin-left: 60%;">[<a href="{conflict.U_VIEW_MOD_FILE}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_MODIFIED}</a>]</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{conflict.FILENAME}]" value="1" /> {L_MERGE_NO_MERGE_NEW_OPTION}</label></dt>
|
||||
<dd style="margin-left: 60%;">[<a href="{conflict.U_VIEW_NO_MERGE_NEW}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{conflict.FILENAME}]" value="2" /> {L_MERGE_NO_MERGE_MOD_OPTION}</label></dt>
|
||||
<dd style="margin-left: 60%;">[<a href="{conflict.U_VIEW_NO_MERGE_MOD}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]</dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
</fieldset>
|
||||
<!-- END conflict -->
|
||||
<!-- IF files.STATUS eq 'up_to_date' -->
|
||||
<dd class="full" style="text-align: left;"><strong>{files.FILENAME}</strong></dd>
|
||||
<!-- ELSE -->
|
||||
<dt style="width: 60%;">
|
||||
<strong><!-- IF files.DIR_PART -->{files.DIR_PART}<br /><!-- ENDIF -->{files.FILE_PART}</strong>
|
||||
<!-- IF files.S_CUSTOM -->
|
||||
<br /><span><em>{L_FILE_USED}: </em>{files.CUSTOM_ORIGINAL}</span>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF files.NUM_CONFLICTS -->
|
||||
<br /><span>{L_NUM_CONFLICTS}: {files.NUM_CONFLICTS}</span>
|
||||
<!-- ENDIF -->
|
||||
</dt>
|
||||
<dd style="margin-left: 60%;"><!-- IF files.STATUS eq 'modified' --> <!-- ELSE --><!-- IF not files.S_BINARY -->[ <a href="{files.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{files.L_SHOW_DIFF}</a> ]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF --><!-- ENDIF --></dd>
|
||||
<!-- IF files.S_CUSTOM -->
|
||||
<dd style="margin-left: 60%;"><label><input type="checkbox" name="no_update[]" value="{files.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF files.STATUS eq 'modified' -->
|
||||
</dl>
|
||||
<dl>
|
||||
<dt style="width: 60%"><label><input type="radio" class="radio" name="modified[{files.FILENAME}]" value="0" checked="checked" /> {L_MERGE_MODIFICATIONS_OPTION}</label></dt>
|
||||
<dd style="margin-left: 60%;"><!-- IF not files.S_BINARY -->[ <a href="{files.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{files.L_SHOW_DIFF}</a> ]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF --></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt style="width: 60%"><label><input type="radio" class="radio" name="modified[{files.FILENAME}]" value="1" /> {L_MERGE_NO_MERGE_NEW_OPTION}</label></dt>
|
||||
<dd style="margin-left: 60%;"><!-- IF not files.S_BINARY -->[<a href="{files.U_VIEW_NO_MERGE_NEW}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]<!-- ELSE --> <!-- ENDIF --></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt style="width: 60%"><label><input type="radio" class="radio" name="modified[{files.FILENAME}]" value="2" /> {L_MERGE_NO_MERGE_MOD_OPTION}</label></dt>
|
||||
<dd style="margin-left: 60%;"><!-- IF not files.S_BINARY -->[<a href="{files.U_VIEW_NO_MERGE_MOD}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]<!-- ELSE --> <!-- ENDIF --></dd>
|
||||
</dl>
|
||||
<!-- IF not files.S_LAST_ROW -->
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend><img src="{T_IMAGE_PATH}file_{files.STATUS}.gif" alt="{files.L_STATUS}" /></legend>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF files.STATUS eq 'conflict' -->
|
||||
</dl>
|
||||
<dl>
|
||||
<dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{files.FILENAME}]" value="1" checked="checked" /> {L_MERGE_NO_MERGE_NEW_OPTION}</label></dt>
|
||||
<dd style="margin-left: 60%;"><!-- IF not files.S_BINARY -->[<a href="{files.U_VIEW_NO_MERGE_NEW}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]<!-- ELSE --> <!-- ENDIF --></dd>
|
||||
</dl>
|
||||
<!-- IF not files.S_BINARY -->
|
||||
<dl>
|
||||
<dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{files.FILENAME}]" value="3" /> {L_MERGE_NEW_FILE_OPTION}</label></dt>
|
||||
<dd style="margin-left: 60%;">[<a href="{files.U_VIEW_NEW_FILE}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{files.FILENAME}]" value="4" /> {L_MERGE_MOD_FILE_OPTION}</label></dt>
|
||||
<dd style="margin-left: 60%;">[<a href="{files.U_VIEW_MOD_FILE}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]</dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF not files.S_LAST_ROW -->
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend><img src="{T_IMAGE_PATH}file_{files.STATUS}.gif" alt="{files.L_STATUS}" /></legend>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
<!-- IF files.STATUS neq 'conflict' and files.STATUS neq 'modified' --></dl><!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
<!-- END files -->
|
||||
|
||||
</fieldset></div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<br />
|
||||
@@ -369,7 +295,7 @@
|
||||
<p>{L_UPDATE_METHOD_EXPLAIN}</p>
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
<input class="button1" type="submit" name="ftp_upload" value="{L_FTP_UPDATE_METHOD}" /> <input class="button1" type="submit" name="download" value="{L_DOWNLOAD_UPDATE_METHOD_BUTTON}" />
|
||||
<input class="button1" type="submit" name="ftp_upload" value="{L_FTP_UPDATE_METHOD}" /> <input class="button1" type="submit" name="download" value="{L_DOWNLOAD_UPDATE_METHOD}" />
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
@@ -394,7 +320,7 @@
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
{S_HIDDEN_FIELDS}
|
||||
<input type="submit" class="button2" value="{L_CONTINUE_UPDATE}" name="check_again" /> <input type="submit" class="button1" value="{L_DOWNLOAD}" name="download" />
|
||||
<input type="submit" class="button2" value="{L_CHECK_FILES_AGAIN}" name="check_again" /> <input type="submit" class="button1" value="{L_DOWNLOAD}" name="download" />
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
@@ -434,14 +360,6 @@
|
||||
<p>{L_CONNECTION_SUCCESS}</p>
|
||||
</div>
|
||||
<!-- ELSEIF S_CONNECTION_FAILED -->
|
||||
<div class="successbox">
|
||||
<p>{L_TRY_DOWNLOAD_METHOD}</p>
|
||||
|
||||
<fieldset class="quick">
|
||||
<input class="button1" type="submit" name="download" value="{L_TRY_DOWNLOAD_METHOD_BUTTON}" />
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="errorbox">
|
||||
<p>{L_CONNECTION_FAILED}<br />{ERROR_MSG}</p>
|
||||
</div>
|
||||
@@ -460,7 +378,7 @@
|
||||
</dl>
|
||||
<!-- END data -->
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
{S_HIDDEN_FIELDS}
|
||||
<input class="button2" type="submit" name="check_again" value="{L_BACK}" />
|
||||
|
@@ -15,9 +15,9 @@
|
||||
// <![CDATA[
|
||||
function resize_panel()
|
||||
{
|
||||
var block = document.getElementById('codepanel');
|
||||
var block = document.getElementById('codepanel');
|
||||
var height;
|
||||
|
||||
|
||||
if (window.innerHeight)
|
||||
{
|
||||
height = window.innerHeight - 150;
|
||||
@@ -26,11 +26,8 @@ function resize_panel()
|
||||
else
|
||||
{
|
||||
//whatever IE needs to do this
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
window.onresize = resize_panel;
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
@@ -51,30 +48,23 @@ window.onresize = resize_panel;
|
||||
|
||||
<!-- IF DIFF_MODE neq 'side_by_side' and DIFF_MODE neq 'raw' -->
|
||||
div#codepanel {
|
||||
overflow: auto;
|
||||
width: 100%;
|
||||
height: 350px;
|
||||
display: inline-block;
|
||||
}
|
||||
<!-- ELSE -->
|
||||
div#codepanel {
|
||||
div#codepanel {
|
||||
background-color: #eee;
|
||||
}
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF DIFF_MODE neq 'unified' and DIFF_MODE neq 'side_by_side' -->
|
||||
div#diff_content pre {
|
||||
overflow: auto;
|
||||
height: 414px;
|
||||
width: 100% !important;
|
||||
}
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF not S_DIFF_NEW_FILE -->
|
||||
/**
|
||||
* Unified Diff
|
||||
*/
|
||||
.file {
|
||||
line-height: .7em;
|
||||
overflow: auto;
|
||||
height: 414px;
|
||||
}
|
||||
|
||||
.diff {
|
||||
@@ -149,10 +139,10 @@ table.hrdiff tbody th {
|
||||
|
||||
table.hrdiff tbody td.old {
|
||||
border-left: 1px solid #999;
|
||||
border-right: 1px solid #999;
|
||||
border-right: 1px solid #999;
|
||||
}
|
||||
table.hrdiff tbody td.new {
|
||||
border-right: 1px solid #999;
|
||||
border-right: 1px solid #999;
|
||||
}
|
||||
|
||||
table.hrdiff td pre {
|
||||
@@ -213,8 +203,9 @@ table.hrdiff caption span {
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
<!-- IF DIFF_MODE neq 'side_by_side' and DIFF_MODE neq 'raw' -->
|
||||
<body onload="resize_panel();">
|
||||
<body onresize="resize_panel();" onload="resize_panel();">
|
||||
<!-- ELSE -->
|
||||
<body>
|
||||
<!-- ENDIF -->
|
||||
@@ -229,7 +220,7 @@ table.hrdiff caption span {
|
||||
<!-- ENDIF -->
|
||||
<!-- IF not S_DIFF_NEW_FILE -->
|
||||
<p id="skip"><a href="#acp">{L_SKIP}</a></p>
|
||||
<form method="post" action="">
|
||||
<form method="post">
|
||||
<fieldset class="quick">
|
||||
<label for="diff_mode">{L_SELECT_DIFF_MODE}:</label>
|
||||
<select name="diff_mode" id="diff_mode">{S_DIFF_MODE_OPTIONS}</select>
|
||||
@@ -237,19 +228,19 @@ table.hrdiff caption span {
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_CHANGE}" />
|
||||
</fieldset>
|
||||
</form>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_DIFF_CONFLICT_FILE -->
|
||||
<div style="float: {S_CONTENT_FLOW_BEGIN};"><strong>{L_NUM_CONFLICTS}: {NUM_CONFLICTS}</strong></div>
|
||||
<br style="clear: both;" />
|
||||
<!-- ENDIF -->
|
||||
</div>
|
||||
|
||||
|
||||
<div id="page-body">
|
||||
<div id="acp">
|
||||
<div class="panel" id="codepanel">
|
||||
<span class="corners-top"><span></span></span>
|
||||
<div id="diff_content">
|
||||
<div id="main">
|
||||
|
||||
<!-- IF S_DIFF_CONFLICT_FILE -->
|
||||
<div style="float: {S_CONTENT_FLOW_END};"><strong>{L_NUM_CONFLICTS}: {NUM_CONFLICTS}</strong></div>
|
||||
<!-- ENDIF -->
|
||||
{DIFF_CONTENT}
|
||||
</div>
|
||||
</div>
|
||||
@@ -257,6 +248,6 @@ table.hrdiff caption span {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- INCLUDE simple_footer.html -->
|
@@ -2,7 +2,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<span class="corners-bottom"><span></span></span>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -28,16 +28,9 @@ function jumpto()
|
||||
{
|
||||
var page = prompt(jump_page, on_page);
|
||||
|
||||
if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0)
|
||||
if (page !== null && !isNaN(page) && page > 0)
|
||||
{
|
||||
if (base_url.indexOf('?') == -1)
|
||||
{
|
||||
document.location.href = base_url + '?start=' + ((page - 1) * per_page);
|
||||
}
|
||||
else
|
||||
{
|
||||
document.location.href = base_url.replace(/&/g, '&') + '&start=' + ((page - 1) * per_page);
|
||||
}
|
||||
document.location.href = base_url.replace(/&/g, '&') + '&start=' + ((page - 1) * per_page);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,33 +181,27 @@ function switch_menu()
|
||||
<span class="corners-top"><span></span></span>
|
||||
<div id="content">
|
||||
<!-- IF not S_USER_NOTICE -->
|
||||
<div id="toggle">
|
||||
<div id="toggle">
|
||||
<a id="toggle-handle" accesskey="m" title="{L_MENU_TOGGLE}" onclick="switch_menu(); return false;" href="#"></a></div>
|
||||
<!-- ENDIF -->
|
||||
<div id="menu">
|
||||
<p>{L_LOGGED_IN_AS}<br /><strong>{USERNAME}</strong> [ <a href="{U_LOGOUT}">{L_LOGOUT}</a> ][ <a href="{U_ADM_LOGOUT}">{L_ADM_LOGOUT}</a> ] </p>
|
||||
<p>{L_LOGGED_IN_AS}<br /><strong>{USERNAME}</strong> [ <a href="{U_LOGOUT}">{L_LOGOUT}</a> ]</p>
|
||||
<ul>
|
||||
<!-- DEFINE $LI_USED = 0 -->
|
||||
<!-- BEGIN l_block1 -->
|
||||
<!-- IF l_block1.S_SELECTED -->
|
||||
|
||||
<!-- BEGIN l_block2 -->
|
||||
<!-- IF .l_block1.l_block2.l_block3 -->
|
||||
<li class="header">{l_block1.l_block2.L_TITLE}</li>
|
||||
<!-- DEFINE $LI_USED = 1 -->
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- BEGIN l_block3 -->
|
||||
<li<!-- IF l_block1.l_block2.l_block3.S_SELECTED --> id="activemenu"<!-- ENDIF -->><a href="{l_block1.l_block2.l_block3.U_TITLE}"><span>{l_block1.l_block2.l_block3.L_TITLE}</span></a></li>
|
||||
<!-- DEFINE $LI_USED = 1 -->
|
||||
<!-- END l_block3 -->
|
||||
<!-- END l_block2 -->
|
||||
|
||||
<!-- ENDIF -->
|
||||
<!-- END l_block1 -->
|
||||
<!-- IF not $LI_USED -->
|
||||
<li></li>
|
||||
<!-- ENDIF -->
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
@@ -1,40 +0,0 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<a name="maincontent"></a>
|
||||
|
||||
<h1>{L_ACP_FORUM_PERMISSIONS_COPY}</h1>
|
||||
|
||||
{L_ACP_FORUM_PERMISSIONS_COPY_EXPLAIN}
|
||||
|
||||
<form id="forum_perm_copy" method="post" action="{U_ACTION}">
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_LOOK_UP_FORUM}</legend>
|
||||
|
||||
<dl>
|
||||
<dt><label for="src_forum">{L_COPY_PERMISSIONS_FROM}:</label><br /><span>{L_COPY_PERMISSIONS_FORUM_FROM_EXPLAIN}</span></dt>
|
||||
<dd><select id="src_forum" name="src_forum_id"><option value="0">{L_SELECT_FORUM}</option><option value="-1">------------------</option>{S_FORUM_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_LOOK_UP_FORUM}</legend>
|
||||
<p>{L_LOOK_UP_FORUMS_EXPLAIN}</p>
|
||||
|
||||
<dl>
|
||||
<dt><label for="dest_forums">{L_COPY_PERMISSIONS_TO}:</label><br /><span>{L_COPY_PERMISSIONS_FORUM_TO_EXPLAIN}</span></dt>
|
||||
<dd><select id="dest_forums" name="dest_forum_ids[]" multiple="multiple" size="10">{S_FORUM_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
<legend>{L_SUBMIT}</legend>
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
||||
{S_HIDDEN_FIELDS}
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
@@ -68,7 +68,7 @@
|
||||
<!-- ELSE -->
|
||||
<li class="permissions-preset-custom<!-- IF p_mask.S_FIRST_ROW and p_mask.f_mask.S_FIRST_ROW and p_mask.f_mask.category.S_FIRST_ROW --> activetab<!-- ENDIF -->" id="tab{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}">
|
||||
<!-- ENDIF -->
|
||||
<a href="#" onclick="swap_options('{p_mask.S_ROW_COUNT}', '{p_mask.f_mask.S_ROW_COUNT}', '{p_mask.f_mask.category.S_ROW_COUNT}', false<!-- IF p_mask.S_VIEW -->, true<!-- ENDIF -->); return false;"><span class="tabbg"><span class="colour"></span>{p_mask.f_mask.category.CAT_NAME}</span></a></li>
|
||||
<a href="#" onclick="swap_options('{p_mask.S_ROW_COUNT}', '{p_mask.f_mask.S_ROW_COUNT}', '{p_mask.f_mask.category.S_ROW_COUNT}', false<!-- IF p_mask.S_VIEW -->, true<!-- ENDIF -->); return false;"><span class="tabbg"><span class="colour"></span>{category.CAT_NAME}</span></a></li>
|
||||
<!-- END category -->
|
||||
</ul>
|
||||
</div>
|
||||
|
@@ -39,16 +39,9 @@ function jumpto()
|
||||
{
|
||||
var page = prompt(jump_page, on_page);
|
||||
|
||||
if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0)
|
||||
if (page !== null && !isNaN(page) && page > 0)
|
||||
{
|
||||
if (base_url.indexOf('?') == -1)
|
||||
{
|
||||
document.location.href = base_url + '?start=' + ((page - 1) * per_page);
|
||||
}
|
||||
else
|
||||
{
|
||||
document.location.href = base_url.replace(/&/g, '&') + '&start=' + ((page - 1) * per_page);
|
||||
}
|
||||
document.location.href = base_url.replace(/&/g, '&') + '&start=' + ((page - 1) * per_page);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -103,7 +103,7 @@ if (version_compare(PHP_VERSION, '6.0.0-dev', '>='))
|
||||
}
|
||||
else
|
||||
{
|
||||
@set_magic_quotes_runtime(0);
|
||||
set_magic_quotes_runtime(0);
|
||||
|
||||
// Be paranoid with passed vars
|
||||
if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on' || !function_exists('ini_get'))
|
||||
|
0
phpBB/develop/adjust_avatars.php
Normal file → Executable file
0
phpBB/develop/adjust_avatars.php
Normal file → Executable file
0
phpBB/develop/adjust_uids.php
Normal file → Executable file
0
phpBB/develop/adjust_uids.php
Normal file → Executable file
@@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
DIR=$(dirname "$0")/../cache;
|
||||
cat "$DIR/sql_*.php" | grep '/* SELECT' | sed 's,/\* ,,;s, \*/,,' | sort
|
@@ -674,7 +674,7 @@ foreach ($supported_dbms as $dbms)
|
||||
}
|
||||
|
||||
$line .= ($key_data[0] == 'INDEX') ? 'CREATE INDEX' : '';
|
||||
|
||||
|
||||
$line .= " {$table_name}_{$key_name} ON {$table_name} (" . implode(', ', $key_data[1]) . ")\n";
|
||||
$line .= "/\n";
|
||||
break;
|
||||
@@ -855,7 +855,7 @@ function get_schema_struct()
|
||||
),
|
||||
'PRIMARY_KEY' => 'auth_option_id',
|
||||
'KEYS' => array(
|
||||
'auth_option' => array('UNIQUE', 'auth_option'),
|
||||
'auth_option' => array('INDEX', 'auth_option'),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -983,7 +983,6 @@ function get_schema_struct()
|
||||
'confirm_type' => array('TINT:3', 0),
|
||||
'code' => array('VCHAR:8', ''),
|
||||
'seed' => array('UINT:10', 0),
|
||||
'attempts' => array('UINT', 0),
|
||||
),
|
||||
'PRIMARY_KEY' => array('session_id', 'confirm_id'),
|
||||
'KEYS' => array(
|
||||
@@ -1006,7 +1005,7 @@ function get_schema_struct()
|
||||
'topic_id' => array('UINT', 0),
|
||||
'forum_id' => array('UINT', 0),
|
||||
'save_time' => array('TIMESTAMP', 0),
|
||||
'draft_subject' => array('STEXT_UNI', ''),
|
||||
'draft_subject' => array('XSTEXT_UNI', ''),
|
||||
'draft_message' => array('MTEXT_UNI', ''),
|
||||
),
|
||||
'PRIMARY_KEY' => 'draft_id',
|
||||
@@ -1053,7 +1052,7 @@ function get_schema_struct()
|
||||
'forum_desc_uid' => array('VCHAR:8', ''),
|
||||
'forum_link' => array('VCHAR_UNI', ''),
|
||||
'forum_password' => array('VCHAR_UNI:40', ''),
|
||||
'forum_style' => array('UINT', 0),
|
||||
'forum_style' => array('USINT', 0),
|
||||
'forum_image' => array('VCHAR', ''),
|
||||
'forum_rules' => array('TEXT_UNI', ''),
|
||||
'forum_rules_link' => array('VCHAR_UNI', ''),
|
||||
@@ -1068,12 +1067,11 @@ function get_schema_struct()
|
||||
'forum_topics_real' => array('UINT', 0),
|
||||
'forum_last_post_id' => array('UINT', 0),
|
||||
'forum_last_poster_id' => array('UINT', 0),
|
||||
'forum_last_post_subject' => array('STEXT_UNI', ''),
|
||||
'forum_last_post_subject' => array('XSTEXT_UNI', ''),
|
||||
'forum_last_post_time' => array('TIMESTAMP', 0),
|
||||
'forum_last_poster_name'=> array('VCHAR_UNI', ''),
|
||||
'forum_last_poster_colour'=> array('VCHAR:6', ''),
|
||||
'forum_flags' => array('TINT:4', 32),
|
||||
'forum_options' => array('UINT:20', 0),
|
||||
'display_subforum_list' => array('BOOL', 1),
|
||||
'display_on_index' => array('BOOL', 1),
|
||||
'enable_indexing' => array('BOOL', 1),
|
||||
@@ -1127,7 +1125,6 @@ function get_schema_struct()
|
||||
'group_id' => array('UINT', NULL, 'auto_increment'),
|
||||
'group_type' => array('TINT:4', 1),
|
||||
'group_founder_manage' => array('BOOL', 0),
|
||||
'group_skip_auth' => array('BOOL', 0),
|
||||
'group_name' => array('VCHAR_CI', ''),
|
||||
'group_desc' => array('TEXT_UNI', ''),
|
||||
'group_desc_bitfield' => array('VCHAR:255', ''),
|
||||
@@ -1143,7 +1140,6 @@ function get_schema_struct()
|
||||
'group_sig_chars' => array('UINT', 0),
|
||||
'group_receive_pm' => array('BOOL', 0),
|
||||
'group_message_limit' => array('UINT', 0),
|
||||
'group_max_recipients' => array('UINT', 0),
|
||||
'group_legend' => array('BOOL', 1),
|
||||
),
|
||||
'PRIMARY_KEY' => 'group_id',
|
||||
@@ -1198,7 +1194,6 @@ function get_schema_struct()
|
||||
'PRIMARY_KEY' => 'log_id',
|
||||
'KEYS' => array(
|
||||
'log_type' => array('INDEX', 'log_type'),
|
||||
'log_time' => array('INDEX', 'log_time'),
|
||||
'forum_id' => array('INDEX', 'forum_id'),
|
||||
'topic_id' => array('INDEX', 'topic_id'),
|
||||
'reportee_id' => array('INDEX', 'reportee_id'),
|
||||
@@ -1286,7 +1281,7 @@ function get_schema_struct()
|
||||
'enable_magic_url' => array('BOOL', 1),
|
||||
'enable_sig' => array('BOOL', 1),
|
||||
'post_username' => array('VCHAR_UNI:255', ''),
|
||||
'post_subject' => array('STEXT_UNI', '', 'true_sort'),
|
||||
'post_subject' => array('XSTEXT_UNI', '', 'true_sort'),
|
||||
'post_text' => array('MTEXT_UNI', ''),
|
||||
'post_checksum' => array('VCHAR:32', ''),
|
||||
'post_attachment' => array('BOOL', 0),
|
||||
@@ -1306,7 +1301,6 @@ function get_schema_struct()
|
||||
'poster_ip' => array('INDEX', 'poster_ip'),
|
||||
'poster_id' => array('INDEX', 'poster_id'),
|
||||
'post_approved' => array('INDEX', 'post_approved'),
|
||||
'post_username' => array('INDEX', 'post_username'),
|
||||
'tid_post_time' => array('INDEX', array('topic_id', 'post_time')),
|
||||
),
|
||||
);
|
||||
@@ -1323,7 +1317,7 @@ function get_schema_struct()
|
||||
'enable_smilies' => array('BOOL', 1),
|
||||
'enable_magic_url' => array('BOOL', 1),
|
||||
'enable_sig' => array('BOOL', 1),
|
||||
'message_subject' => array('STEXT_UNI', ''),
|
||||
'message_subject' => array('XSTEXT_UNI', ''),
|
||||
'message_text' => array('MTEXT_UNI', ''),
|
||||
'message_edit_reason' => array('STEXT_UNI', ''),
|
||||
'message_edit_user' => array('UINT', 0),
|
||||
@@ -1334,7 +1328,6 @@ function get_schema_struct()
|
||||
'message_edit_count' => array('USINT', 0),
|
||||
'to_address' => array('TEXT_UNI', ''),
|
||||
'bcc_address' => array('TEXT_UNI', ''),
|
||||
'message_reported' => array('BOOL', 0),
|
||||
),
|
||||
'PRIMARY_KEY' => 'msg_id',
|
||||
'KEYS' => array(
|
||||
@@ -1410,8 +1403,6 @@ function get_schema_struct()
|
||||
'field_validation' => array('VCHAR_UNI:20', ''),
|
||||
'field_required' => array('BOOL', 0),
|
||||
'field_show_on_reg' => array('BOOL', 0),
|
||||
'field_show_on_vt' => array('BOOL', 0),
|
||||
'field_show_profile' => array('BOOL', 0),
|
||||
'field_hide' => array('BOOL', 0),
|
||||
'field_no_view' => array('BOOL', 0),
|
||||
'field_active' => array('BOOL', 0),
|
||||
@@ -1469,7 +1460,6 @@ function get_schema_struct()
|
||||
'report_id' => array('UINT', NULL, 'auto_increment'),
|
||||
'reason_id' => array('USINT', 0),
|
||||
'post_id' => array('UINT', 0),
|
||||
'pm_id' => array('UINT', 0),
|
||||
'user_id' => array('UINT', 0),
|
||||
'user_notify' => array('BOOL', 0),
|
||||
'report_closed' => array('BOOL', 0),
|
||||
@@ -1477,10 +1467,6 @@ function get_schema_struct()
|
||||
'report_text' => array('MTEXT_UNI', ''),
|
||||
),
|
||||
'PRIMARY_KEY' => 'report_id',
|
||||
'KEYS' => array(
|
||||
'post_id' => array('INDEX', 'post_id'),
|
||||
'pm_id' => array('INDEX', 'pm_id'),
|
||||
),
|
||||
);
|
||||
|
||||
$schema_data['phpbb_reports_reasons'] = array(
|
||||
@@ -1550,7 +1536,7 @@ function get_schema_struct()
|
||||
'KEYS' => array(
|
||||
'session_time' => array('INDEX', 'session_time'),
|
||||
'session_user_id' => array('INDEX', 'session_user_id'),
|
||||
'session_fid' => array('INDEX', 'session_forum_id'),
|
||||
'session_forum_id' => array('INDEX', 'session_forum_id'),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -1597,13 +1583,13 @@ function get_schema_struct()
|
||||
|
||||
$schema_data['phpbb_styles'] = array(
|
||||
'COLUMNS' => array(
|
||||
'style_id' => array('UINT', NULL, 'auto_increment'),
|
||||
'style_id' => array('USINT', NULL, 'auto_increment'),
|
||||
'style_name' => array('VCHAR_UNI:255', ''),
|
||||
'style_copyright' => array('VCHAR_UNI', ''),
|
||||
'style_active' => array('BOOL', 1),
|
||||
'template_id' => array('UINT', 0),
|
||||
'theme_id' => array('UINT', 0),
|
||||
'imageset_id' => array('UINT', 0),
|
||||
'template_id' => array('USINT', 0),
|
||||
'theme_id' => array('USINT', 0),
|
||||
'imageset_id' => array('USINT', 0),
|
||||
),
|
||||
'PRIMARY_KEY' => 'style_id',
|
||||
'KEYS' => array(
|
||||
@@ -1616,14 +1602,12 @@ function get_schema_struct()
|
||||
|
||||
$schema_data['phpbb_styles_template'] = array(
|
||||
'COLUMNS' => array(
|
||||
'template_id' => array('UINT', NULL, 'auto_increment'),
|
||||
'template_id' => array('USINT', NULL, 'auto_increment'),
|
||||
'template_name' => array('VCHAR_UNI:255', ''),
|
||||
'template_copyright' => array('VCHAR_UNI', ''),
|
||||
'template_path' => array('VCHAR:100', ''),
|
||||
'bbcode_bitfield' => array('VCHAR:255', 'kNg='),
|
||||
'template_storedb' => array('BOOL', 0),
|
||||
'template_inherits_id' => array('UINT:4', 0),
|
||||
'template_inherit_path' => array('VCHAR', ''),
|
||||
),
|
||||
'PRIMARY_KEY' => 'template_id',
|
||||
'KEYS' => array(
|
||||
@@ -1633,7 +1617,7 @@ function get_schema_struct()
|
||||
|
||||
$schema_data['phpbb_styles_template_data'] = array(
|
||||
'COLUMNS' => array(
|
||||
'template_id' => array('UINT', 0),
|
||||
'template_id' => array('USINT', 0),
|
||||
'template_filename' => array('VCHAR:100', ''),
|
||||
'template_included' => array('TEXT', ''),
|
||||
'template_mtime' => array('TIMESTAMP', 0),
|
||||
@@ -1647,7 +1631,7 @@ function get_schema_struct()
|
||||
|
||||
$schema_data['phpbb_styles_theme'] = array(
|
||||
'COLUMNS' => array(
|
||||
'theme_id' => array('UINT', NULL, 'auto_increment'),
|
||||
'theme_id' => array('USINT', NULL, 'auto_increment'),
|
||||
'theme_name' => array('VCHAR_UNI:255', ''),
|
||||
'theme_copyright' => array('VCHAR_UNI', ''),
|
||||
'theme_path' => array('VCHAR:100', ''),
|
||||
@@ -1663,7 +1647,7 @@ function get_schema_struct()
|
||||
|
||||
$schema_data['phpbb_styles_imageset'] = array(
|
||||
'COLUMNS' => array(
|
||||
'imageset_id' => array('UINT', NULL, 'auto_increment'),
|
||||
'imageset_id' => array('USINT', NULL, 'auto_increment'),
|
||||
'imageset_name' => array('VCHAR_UNI:255', ''),
|
||||
'imageset_copyright' => array('VCHAR_UNI', ''),
|
||||
'imageset_path' => array('VCHAR:100', ''),
|
||||
@@ -1676,13 +1660,13 @@ function get_schema_struct()
|
||||
|
||||
$schema_data['phpbb_styles_imageset_data'] = array(
|
||||
'COLUMNS' => array(
|
||||
'image_id' => array('UINT', NULL, 'auto_increment'),
|
||||
'image_id' => array('USINT', NULL, 'auto_increment'),
|
||||
'image_name' => array('VCHAR:200', ''),
|
||||
'image_filename' => array('VCHAR:200', ''),
|
||||
'image_lang' => array('VCHAR:30', ''),
|
||||
'image_height' => array('USINT', 0),
|
||||
'image_width' => array('USINT', 0),
|
||||
'imageset_id' => array('UINT', 0),
|
||||
'imageset_id' => array('USINT', 0),
|
||||
),
|
||||
'PRIMARY_KEY' => 'image_id',
|
||||
'KEYS' => array(
|
||||
@@ -1698,7 +1682,7 @@ function get_schema_struct()
|
||||
'topic_attachment' => array('BOOL', 0),
|
||||
'topic_approved' => array('BOOL', 1),
|
||||
'topic_reported' => array('BOOL', 0),
|
||||
'topic_title' => array('STEXT_UNI', '', 'true_sort'),
|
||||
'topic_title' => array('XSTEXT_UNI', '', 'true_sort'),
|
||||
'topic_poster' => array('UINT', 0),
|
||||
'topic_time' => array('TIMESTAMP', 0),
|
||||
'topic_time_limit' => array('TIMESTAMP', 0),
|
||||
@@ -1714,7 +1698,7 @@ function get_schema_struct()
|
||||
'topic_last_poster_id' => array('UINT', 0),
|
||||
'topic_last_poster_name' => array('VCHAR_UNI', ''),
|
||||
'topic_last_poster_colour' => array('VCHAR:6', ''),
|
||||
'topic_last_post_subject' => array('STEXT_UNI', ''),
|
||||
'topic_last_post_subject' => array('XSTEXT_UNI', ''),
|
||||
'topic_last_post_time' => array('TIMESTAMP', 0),
|
||||
'topic_last_view_time' => array('TIMESTAMP', 0),
|
||||
'topic_moved_id' => array('UINT', 0),
|
||||
@@ -1820,7 +1804,7 @@ function get_schema_struct()
|
||||
'user_timezone' => array('DECIMAL', 0),
|
||||
'user_dst' => array('BOOL', 0),
|
||||
'user_dateformat' => array('VCHAR_UNI:30', 'd M Y H:i'),
|
||||
'user_style' => array('UINT', 0),
|
||||
'user_style' => array('USINT', 0),
|
||||
'user_rank' => array('UINT', 0),
|
||||
'user_colour' => array('VCHAR:6', ''),
|
||||
'user_new_privmsg' => array('INT:4', 0),
|
||||
@@ -1842,7 +1826,7 @@ function get_schema_struct()
|
||||
'user_allow_viewonline' => array('BOOL', 1),
|
||||
'user_allow_viewemail' => array('BOOL', 1),
|
||||
'user_allow_massemail' => array('BOOL', 1),
|
||||
'user_options' => array('UINT:11', 230271),
|
||||
'user_options' => array('UINT:11', 895),
|
||||
'user_avatar' => array('VCHAR', ''),
|
||||
'user_avatar_type' => array('TINT:2', 0),
|
||||
'user_avatar_width' => array('USINT', 0),
|
||||
@@ -1862,9 +1846,7 @@ function get_schema_struct()
|
||||
'user_actkey' => array('VCHAR:32', ''),
|
||||
'user_newpasswd' => array('VCHAR_UNI:40', ''),
|
||||
'user_form_salt' => array('VCHAR_UNI:32', ''),
|
||||
'user_new' => array('BOOL', 1),
|
||||
'user_reminded' => array('TINT:4', 0),
|
||||
'user_reminded_time' => array('TIMESTAMP', 0),
|
||||
|
||||
),
|
||||
'PRIMARY_KEY' => 'user_id',
|
||||
'KEYS' => array(
|
||||
|
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
/**
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @version $Id$
|
||||
* @copyright (c) 2006 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
* @copyright (c) 2006 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
* This file creates SQL statements to upgrade phpBB on MySQL 3.x/4.0.x to 4.1.x/5.x
|
||||
*
|
||||
@@ -40,18 +40,13 @@ $row = $db->sql_fetchrow($result);
|
||||
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$mysql_indexer = $drop_index = false;
|
||||
$mysql_indexer = false;
|
||||
|
||||
if (strtolower($row['Type']) === 'mediumtext')
|
||||
{
|
||||
$mysql_indexer = true;
|
||||
}
|
||||
|
||||
if (strtolower($row['Key']) === 'mul')
|
||||
{
|
||||
$drop_index = true;
|
||||
}
|
||||
|
||||
echo "USE $dbname;$newline$newline";
|
||||
|
||||
|
||||
@@ -129,17 +124,10 @@ foreach ($schema_data as $table_name => $table_data)
|
||||
// Create Table statement
|
||||
$generator = $textimage = false;
|
||||
|
||||
// Do we need to DROP a fulltext index before we alter the table?
|
||||
if ($table_name == ($prefix . 'posts') && $drop_index)
|
||||
{
|
||||
echo "ALTER TABLE {$table_name}{$newline}";
|
||||
echo "DROP INDEX post_text,{$newline}DROP INDEX post_subject,{$newline}DROP INDEX post_content;{$newline}{$newline}";
|
||||
}
|
||||
|
||||
$line = "ALTER TABLE {$table_name} $newline";
|
||||
|
||||
// Table specific so we don't get overlap
|
||||
$modded_array = array();
|
||||
$modded_array = array();
|
||||
|
||||
// Write columns one by one...
|
||||
foreach ($table_data['COLUMNS'] as $column_name => $column_data)
|
||||
@@ -248,12 +236,6 @@ foreach ($schema_data as $table_name => $table_data)
|
||||
$line .= "\tDEFAULT CHARSET=utf8 COLLATE=utf8_bin;$newline$newline";
|
||||
|
||||
echo $line . "$newline";
|
||||
|
||||
// Do we now need to re-add the fulltext index? ;)
|
||||
if ($table_name == ($prefix . 'posts') && $drop_index)
|
||||
{
|
||||
echo "ALTER TABLE $table_name ADD FULLTEXT (post_subject), ADD FULLTEXT (post_text), ADD FULLTEXT post_content (post_subject, post_text){$newline}";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -345,7 +327,7 @@ function get_schema_struct()
|
||||
),
|
||||
'PRIMARY_KEY' => 'auth_option_id',
|
||||
'KEYS' => array(
|
||||
'auth_option' => array('UNIQUE', 'auth_option'),
|
||||
'auth_option' => array('INDEX', 'auth_option'),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -473,7 +455,6 @@ function get_schema_struct()
|
||||
'confirm_type' => array('TINT:3', 0),
|
||||
'code' => array('VCHAR:8', ''),
|
||||
'seed' => array('UINT:10', 0),
|
||||
'attempts' => array('UINT', 0),
|
||||
),
|
||||
'PRIMARY_KEY' => array('session_id', 'confirm_id'),
|
||||
'KEYS' => array(
|
||||
@@ -496,7 +477,7 @@ function get_schema_struct()
|
||||
'topic_id' => array('UINT', 0),
|
||||
'forum_id' => array('UINT', 0),
|
||||
'save_time' => array('TIMESTAMP', 0),
|
||||
'draft_subject' => array('STEXT_UNI', ''),
|
||||
'draft_subject' => array('XSTEXT_UNI', ''),
|
||||
'draft_message' => array('MTEXT_UNI', ''),
|
||||
),
|
||||
'PRIMARY_KEY' => 'draft_id',
|
||||
@@ -543,7 +524,7 @@ function get_schema_struct()
|
||||
'forum_desc_uid' => array('VCHAR:8', ''),
|
||||
'forum_link' => array('VCHAR_UNI', ''),
|
||||
'forum_password' => array('VCHAR_UNI:40', ''),
|
||||
'forum_style' => array('UINT', 0),
|
||||
'forum_style' => array('USINT', 0),
|
||||
'forum_image' => array('VCHAR', ''),
|
||||
'forum_rules' => array('TEXT_UNI', ''),
|
||||
'forum_rules_link' => array('VCHAR_UNI', ''),
|
||||
@@ -558,13 +539,11 @@ function get_schema_struct()
|
||||
'forum_topics_real' => array('UINT', 0),
|
||||
'forum_last_post_id' => array('UINT', 0),
|
||||
'forum_last_poster_id' => array('UINT', 0),
|
||||
'forum_last_post_subject' => array('STEXT_UNI', ''),
|
||||
'forum_last_post_subject' => array('XSTEXT_UNI', ''),
|
||||
'forum_last_post_time' => array('TIMESTAMP', 0),
|
||||
'forum_last_poster_name'=> array('VCHAR_UNI', ''),
|
||||
'forum_last_poster_colour'=> array('VCHAR:6', ''),
|
||||
'forum_flags' => array('TINT:4', 32),
|
||||
'forum_options' => array('UINT:20', 0),
|
||||
'display_subforum_list' => array('BOOL', 1),
|
||||
'display_on_index' => array('BOOL', 1),
|
||||
'enable_indexing' => array('BOOL', 1),
|
||||
'enable_icons' => array('BOOL', 1),
|
||||
@@ -617,7 +596,6 @@ function get_schema_struct()
|
||||
'group_id' => array('UINT', NULL, 'auto_increment'),
|
||||
'group_type' => array('TINT:4', 1),
|
||||
'group_founder_manage' => array('BOOL', 0),
|
||||
'group_skip_auth' => array('BOOL', 0),
|
||||
'group_name' => array('VCHAR_CI', ''),
|
||||
'group_desc' => array('TEXT_UNI', ''),
|
||||
'group_desc_bitfield' => array('VCHAR:255', ''),
|
||||
@@ -633,12 +611,11 @@ function get_schema_struct()
|
||||
'group_sig_chars' => array('UINT', 0),
|
||||
'group_receive_pm' => array('BOOL', 0),
|
||||
'group_message_limit' => array('UINT', 0),
|
||||
'group_max_recipients' => array('UINT', 0),
|
||||
'group_legend' => array('BOOL', 1),
|
||||
),
|
||||
'PRIMARY_KEY' => 'group_id',
|
||||
'KEYS' => array(
|
||||
'group_legend_name' => array('INDEX', array('group_legend', 'group_name')),
|
||||
'group_legend' => array('INDEX', 'group_legend'),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -688,7 +665,6 @@ function get_schema_struct()
|
||||
'PRIMARY_KEY' => 'log_id',
|
||||
'KEYS' => array(
|
||||
'log_type' => array('INDEX', 'log_type'),
|
||||
'log_time' => array('INDEX', 'log_time'),
|
||||
'forum_id' => array('INDEX', 'forum_id'),
|
||||
'topic_id' => array('INDEX', 'topic_id'),
|
||||
'reportee_id' => array('INDEX', 'reportee_id'),
|
||||
@@ -776,8 +752,8 @@ function get_schema_struct()
|
||||
'enable_magic_url' => array('BOOL', 1),
|
||||
'enable_sig' => array('BOOL', 1),
|
||||
'post_username' => array('VCHAR_UNI:255', ''),
|
||||
'post_subject' => array('STEXT_UNI', '', 'true_sort'),
|
||||
'post_text' => array('MTEXT_UNI', ''),
|
||||
'post_subject' => array('XSTEXT_UNI', '', 'true_sort'),
|
||||
'post_text' => array('MTEXT_UNI', '', ($GLOBALS['mysql_indexer']) ? 'true_sort' : 'no_sort'),
|
||||
'post_checksum' => array('VCHAR:32', ''),
|
||||
'post_attachment' => array('BOOL', 0),
|
||||
'bbcode_bitfield' => array('VCHAR:255', ''),
|
||||
@@ -796,7 +772,6 @@ function get_schema_struct()
|
||||
'poster_ip' => array('INDEX', 'poster_ip'),
|
||||
'poster_id' => array('INDEX', 'poster_id'),
|
||||
'post_approved' => array('INDEX', 'post_approved'),
|
||||
'post_username' => array('INDEX', 'post_username'),
|
||||
'tid_post_time' => array('INDEX', array('topic_id', 'post_time')),
|
||||
),
|
||||
);
|
||||
@@ -813,7 +788,7 @@ function get_schema_struct()
|
||||
'enable_smilies' => array('BOOL', 1),
|
||||
'enable_magic_url' => array('BOOL', 1),
|
||||
'enable_sig' => array('BOOL', 1),
|
||||
'message_subject' => array('STEXT_UNI', ''),
|
||||
'message_subject' => array('XSTEXT_UNI', ''),
|
||||
'message_text' => array('MTEXT_UNI', ''),
|
||||
'message_edit_reason' => array('STEXT_UNI', ''),
|
||||
'message_edit_user' => array('UINT', 0),
|
||||
@@ -824,7 +799,6 @@ function get_schema_struct()
|
||||
'message_edit_count' => array('USINT', 0),
|
||||
'to_address' => array('TEXT_UNI', ''),
|
||||
'bcc_address' => array('TEXT_UNI', ''),
|
||||
'message_reported' => array('BOOL', 0),
|
||||
),
|
||||
'PRIMARY_KEY' => 'msg_id',
|
||||
'KEYS' => array(
|
||||
@@ -900,8 +874,6 @@ function get_schema_struct()
|
||||
'field_validation' => array('VCHAR_UNI:20', ''),
|
||||
'field_required' => array('BOOL', 0),
|
||||
'field_show_on_reg' => array('BOOL', 0),
|
||||
'field_show_on_vt' => array('BOOL', 0),
|
||||
'field_show_profile' => array('BOOL', 0),
|
||||
'field_hide' => array('BOOL', 0),
|
||||
'field_no_view' => array('BOOL', 0),
|
||||
'field_active' => array('BOOL', 0),
|
||||
@@ -959,7 +931,6 @@ function get_schema_struct()
|
||||
'report_id' => array('UINT', NULL, 'auto_increment'),
|
||||
'reason_id' => array('USINT', 0),
|
||||
'post_id' => array('UINT', 0),
|
||||
'pm_id' => array('UINT', 0),
|
||||
'user_id' => array('UINT', 0),
|
||||
'user_notify' => array('BOOL', 0),
|
||||
'report_closed' => array('BOOL', 0),
|
||||
@@ -967,10 +938,6 @@ function get_schema_struct()
|
||||
'report_text' => array('MTEXT_UNI', ''),
|
||||
),
|
||||
'PRIMARY_KEY' => 'report_id',
|
||||
'KEYS' => array(
|
||||
'post_id' => array('INDEX', 'post_id'),
|
||||
'pm_id' => array('INDEX', 'pm_id'),
|
||||
),
|
||||
);
|
||||
|
||||
$schema_data['phpbb_reports_reasons'] = array(
|
||||
@@ -1024,7 +991,6 @@ function get_schema_struct()
|
||||
'COLUMNS' => array(
|
||||
'session_id' => array('CHAR:32', ''),
|
||||
'session_user_id' => array('UINT', 0),
|
||||
'session_forum_id' => array('UINT', 0),
|
||||
'session_last_visit' => array('TIMESTAMP', 0),
|
||||
'session_start' => array('TIMESTAMP', 0),
|
||||
'session_time' => array('TIMESTAMP', 0),
|
||||
@@ -1040,7 +1006,6 @@ function get_schema_struct()
|
||||
'KEYS' => array(
|
||||
'session_time' => array('INDEX', 'session_time'),
|
||||
'session_user_id' => array('INDEX', 'session_user_id'),
|
||||
'session_fid' => array('INDEX', 'session_forum_id'),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -1087,13 +1052,13 @@ function get_schema_struct()
|
||||
|
||||
$schema_data['phpbb_styles'] = array(
|
||||
'COLUMNS' => array(
|
||||
'style_id' => array('UINT', NULL, 'auto_increment'),
|
||||
'style_id' => array('USINT', NULL, 'auto_increment'),
|
||||
'style_name' => array('VCHAR_UNI:255', ''),
|
||||
'style_copyright' => array('VCHAR_UNI', ''),
|
||||
'style_active' => array('BOOL', 1),
|
||||
'template_id' => array('UINT', 0),
|
||||
'theme_id' => array('UINT', 0),
|
||||
'imageset_id' => array('UINT', 0),
|
||||
'template_id' => array('USINT', 0),
|
||||
'theme_id' => array('USINT', 0),
|
||||
'imageset_id' => array('USINT', 0),
|
||||
),
|
||||
'PRIMARY_KEY' => 'style_id',
|
||||
'KEYS' => array(
|
||||
@@ -1106,14 +1071,12 @@ function get_schema_struct()
|
||||
|
||||
$schema_data['phpbb_styles_template'] = array(
|
||||
'COLUMNS' => array(
|
||||
'template_id' => array('UINT', NULL, 'auto_increment'),
|
||||
'template_id' => array('USINT', NULL, 'auto_increment'),
|
||||
'template_name' => array('VCHAR_UNI:255', ''),
|
||||
'template_copyright' => array('VCHAR_UNI', ''),
|
||||
'template_path' => array('VCHAR:100', ''),
|
||||
'bbcode_bitfield' => array('VCHAR:255', 'kNg='),
|
||||
'template_storedb' => array('BOOL', 0),
|
||||
'template_inherits_id' => array('UINT:4', 0),
|
||||
'template_inherit_path' => array('VCHAR', ''),
|
||||
),
|
||||
'PRIMARY_KEY' => 'template_id',
|
||||
'KEYS' => array(
|
||||
@@ -1123,7 +1086,7 @@ function get_schema_struct()
|
||||
|
||||
$schema_data['phpbb_styles_template_data'] = array(
|
||||
'COLUMNS' => array(
|
||||
'template_id' => array('UINT', 0),
|
||||
'template_id' => array('USINT', 0),
|
||||
'template_filename' => array('VCHAR:100', ''),
|
||||
'template_included' => array('TEXT', ''),
|
||||
'template_mtime' => array('TIMESTAMP', 0),
|
||||
@@ -1137,7 +1100,7 @@ function get_schema_struct()
|
||||
|
||||
$schema_data['phpbb_styles_theme'] = array(
|
||||
'COLUMNS' => array(
|
||||
'theme_id' => array('UINT', NULL, 'auto_increment'),
|
||||
'theme_id' => array('USINT', NULL, 'auto_increment'),
|
||||
'theme_name' => array('VCHAR_UNI:255', ''),
|
||||
'theme_copyright' => array('VCHAR_UNI', ''),
|
||||
'theme_path' => array('VCHAR:100', ''),
|
||||
@@ -1153,7 +1116,7 @@ function get_schema_struct()
|
||||
|
||||
$schema_data['phpbb_styles_imageset'] = array(
|
||||
'COLUMNS' => array(
|
||||
'imageset_id' => array('UINT', NULL, 'auto_increment'),
|
||||
'imageset_id' => array('USINT', NULL, 'auto_increment'),
|
||||
'imageset_name' => array('VCHAR_UNI:255', ''),
|
||||
'imageset_copyright' => array('VCHAR_UNI', ''),
|
||||
'imageset_path' => array('VCHAR:100', ''),
|
||||
@@ -1166,13 +1129,13 @@ function get_schema_struct()
|
||||
|
||||
$schema_data['phpbb_styles_imageset_data'] = array(
|
||||
'COLUMNS' => array(
|
||||
'image_id' => array('UINT', NULL, 'auto_increment'),
|
||||
'image_id' => array('USINT', NULL, 'auto_increment'),
|
||||
'image_name' => array('VCHAR:200', ''),
|
||||
'image_filename' => array('VCHAR:200', ''),
|
||||
'image_lang' => array('VCHAR:30', ''),
|
||||
'image_height' => array('USINT', 0),
|
||||
'image_width' => array('USINT', 0),
|
||||
'imageset_id' => array('UINT', 0),
|
||||
'imageset_id' => array('USINT', 0),
|
||||
),
|
||||
'PRIMARY_KEY' => 'image_id',
|
||||
'KEYS' => array(
|
||||
@@ -1188,7 +1151,7 @@ function get_schema_struct()
|
||||
'topic_attachment' => array('BOOL', 0),
|
||||
'topic_approved' => array('BOOL', 1),
|
||||
'topic_reported' => array('BOOL', 0),
|
||||
'topic_title' => array('STEXT_UNI', '', 'true_sort'),
|
||||
'topic_title' => array('XSTEXT_UNI', '', 'true_sort'),
|
||||
'topic_poster' => array('UINT', 0),
|
||||
'topic_time' => array('TIMESTAMP', 0),
|
||||
'topic_time_limit' => array('TIMESTAMP', 0),
|
||||
@@ -1204,7 +1167,7 @@ function get_schema_struct()
|
||||
'topic_last_poster_id' => array('UINT', 0),
|
||||
'topic_last_poster_name' => array('VCHAR_UNI', ''),
|
||||
'topic_last_poster_colour' => array('VCHAR:6', ''),
|
||||
'topic_last_post_subject' => array('STEXT_UNI', ''),
|
||||
'topic_last_post_subject' => array('XSTEXT_UNI', ''),
|
||||
'topic_last_post_time' => array('TIMESTAMP', 0),
|
||||
'topic_last_view_time' => array('TIMESTAMP', 0),
|
||||
'topic_moved_id' => array('UINT', 0),
|
||||
@@ -1310,7 +1273,7 @@ function get_schema_struct()
|
||||
'user_timezone' => array('DECIMAL', 0),
|
||||
'user_dst' => array('BOOL', 0),
|
||||
'user_dateformat' => array('VCHAR_UNI:30', 'd M Y H:i'),
|
||||
'user_style' => array('UINT', 0),
|
||||
'user_style' => array('USINT', 0),
|
||||
'user_rank' => array('UINT', 0),
|
||||
'user_colour' => array('VCHAR:6', ''),
|
||||
'user_new_privmsg' => array('INT:4', 0),
|
||||
@@ -1332,7 +1295,7 @@ function get_schema_struct()
|
||||
'user_allow_viewonline' => array('BOOL', 1),
|
||||
'user_allow_viewemail' => array('BOOL', 1),
|
||||
'user_allow_massemail' => array('BOOL', 1),
|
||||
'user_options' => array('UINT:11', 230271),
|
||||
'user_options' => array('UINT:11', 895),
|
||||
'user_avatar' => array('VCHAR', ''),
|
||||
'user_avatar_type' => array('TINT:2', 0),
|
||||
'user_avatar_width' => array('USINT', 0),
|
||||
@@ -1352,9 +1315,7 @@ function get_schema_struct()
|
||||
'user_actkey' => array('VCHAR:32', ''),
|
||||
'user_newpasswd' => array('VCHAR_UNI:40', ''),
|
||||
'user_form_salt' => array('VCHAR_UNI:32', ''),
|
||||
'user_new' => array('BOOL', 1),
|
||||
'user_reminded' => array('TINT:4', 0),
|
||||
'user_reminded_time' => array('TIMESTAMP', 0),
|
||||
|
||||
),
|
||||
'PRIMARY_KEY' => 'user_id',
|
||||
'KEYS' => array(
|
||||
|
0
phpBB/develop/repair_bots.php
Normal file → Executable file
0
phpBB/develop/repair_bots.php
Normal file → Executable file
@@ -1,57 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Corrects user_email_hash values if DB moved from 32-bit system to 64-bit system or vice versa.
|
||||
* The CRC32 function in PHP generates different results for both systems.
|
||||
* @PHP dev team: no, a hexdec() applied to it does not solve the issue. And please document it.
|
||||
*
|
||||
*/
|
||||
die("Please read the first lines of this script for instructions on how to enable it");
|
||||
|
||||
set_time_limit(0);
|
||||
|
||||
define('IN_PHPBB', true);
|
||||
$phpbb_root_path = './../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
include($phpbb_root_path . 'common.' . $phpEx);
|
||||
|
||||
// Start session management
|
||||
$user->session_begin();
|
||||
$auth->acl($user->data);
|
||||
$user->setup();
|
||||
|
||||
$start = request_var('start', 0);
|
||||
$num_items = 1000;
|
||||
|
||||
echo '<br />Updating user email hashes' . "\n";
|
||||
|
||||
$sql = 'SELECT user_id, user_email
|
||||
FROM ' . USERS_TABLE . '
|
||||
ORDER BY user_id ASC';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$echos = 0;
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$echos++;
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . "
|
||||
SET user_email_hash = '" . $db->sql_escape(phpbb_email_hash($row['user_email'])) . "'
|
||||
WHERE user_id = " . (int) $row['user_id'];
|
||||
$db->sql_query($sql);
|
||||
|
||||
if ($echos == 200)
|
||||
{
|
||||
echo '<br />';
|
||||
$echos = 0;
|
||||
}
|
||||
|
||||
echo '.';
|
||||
flush();
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
echo 'FINISHED';
|
||||
|
||||
// Done
|
||||
$db->sql_close();
|
||||
?>
|
@@ -20,39 +20,30 @@
|
||||
Please see: http://www.phpbb.com/about/team/ for a list of all the people currently
|
||||
involved in phpBB.
|
||||
|
||||
phpBB Lead Developer : Acyd Burn (Meik Sievertsen)
|
||||
|
||||
phpBB Developers : APTX (Marek A. R.)
|
||||
bantu (Andreas Fischer)
|
||||
DavidMJ (David M.)
|
||||
dhn (Dominik Dr<44>scher)
|
||||
kellanved (Henry Sudhof)
|
||||
naderman (Nils Adermann)
|
||||
Terrafrost (Jim Wigginton)
|
||||
ToonArmy (Chris Smith)
|
||||
|
||||
Contributions by : leviatan21 (Gabriel Vazquez)
|
||||
nickvergessen (Joas Schilling)
|
||||
Raimon (Raimon Meuldijk)
|
||||
rxu (Ruslan Uzdenov)
|
||||
Xore (Robert Hetzler)
|
||||
phpBB Lead Developer : Acyd Burn (Meik Sievertsen)
|
||||
|
||||
phpBB Developers : DavidMJ (David M.)
|
||||
dhn (Dominik Dr<44>scher)
|
||||
kellanved (Henry Sudhof)
|
||||
naderman (Nils Adermann)
|
||||
subBlue (Tom Beddard)
|
||||
Vic D'Elfant (Vic D'Elfant)
|
||||
|
||||
-- Previous Contributors --
|
||||
|
||||
phpBB Project Manager : theFinn (James Atkinson) [Founder - 04/2007]
|
||||
SHS` (Jonathan Stanley)
|
||||
phpBB Project Manager : theFinn (James Atkinson) [Founder - 04/2007]
|
||||
SHS` (Jonathan Stanley)
|
||||
|
||||
phpBB Lead Developer : psoTFX (Paul S. Owen) [2001 - 09/2005]
|
||||
phpBB Lead Developer : psoTFX (Paul S. Owen) [2001 - 09/2005]
|
||||
|
||||
phpBB Developers : Ashe (Ludovic Arnaud) [10/2002 - 11/2003, 06/2006 - 10/2006]
|
||||
BartVB (Bart van Bragt) [11/2000 - 03/2006]
|
||||
GrahamJE (Graham Eames) [09/2005 - 11/2006]
|
||||
|
||||
phpBB Developers : Ashe (Ludovic Arnaud) [10/2002 - 11/2003, 06/2006 - 10/2006]
|
||||
BartVB (Bart van Bragt) [11/2000 - 03/2006]
|
||||
GrahamJE (Graham Eames) [09/2005 - 11/2006]
|
||||
Vic D'Elfant (Vic D'Elfant) [04/2007 - 04/2009]
|
||||
|
||||
-- Copyrights --
|
||||
|
||||
Visual Confirmation : Xore (Robert Hetzler)
|
||||
Visual Confirmation : Xore (Robert Hetzler)
|
||||
|
||||
Original subSilver by subBlue Design, Tom Beddard, (c) 2001 phpBB Group
|
||||
prosilver by subBlue Design, Tom Beddard, (c) 2004 phpBB Group
|
||||
|
@@ -53,11 +53,6 @@
|
||||
<ol>
|
||||
<li><a href="#changelog">Changelog</a>
|
||||
<ol style="list-style-type: lower-roman;">
|
||||
<li><a href="#v305">Changes since 3.0.5</a></li>
|
||||
<li><a href="#v304">Changes since 3.0.4</a></li>
|
||||
<li><a href="#v303">Changes since 3.0.3</a></li>
|
||||
<li><a href="#v302">Changes since 3.0.2</a></li>
|
||||
<li><a href="#v301">Changes since 3.0.1</a></li>
|
||||
<li><a href="#v300">Changes since 3.0.0</a></li>
|
||||
<li><a href="#v30rc8">Changes since RC-8</a></li>
|
||||
<li><a href="#v30rc7">Changes since RC-7</a></li>
|
||||
@@ -76,7 +71,7 @@
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
|
||||
|
||||
<hr />
|
||||
|
||||
<a name="changelog"></a><h2>1. Changelog</h2>
|
||||
@@ -85,495 +80,8 @@
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
|
||||
<div class="content">
|
||||
<a name="v305"></a><h3>1.i. Changes since 3.0.5</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Allow whitespaces in avatar gallery names. (Bug #44955)</li>
|
||||
<li>[Fix] Sorting by author or subject on viewtopic now preserves the order. (Bug #44875)</li>
|
||||
<li>[Fix] Correctly determine writable status of files on Windows operating system. (Bug #39035)</li>
|
||||
<li>[Fix] Show report button in prosilver for guests who are allowed to report posts. (Bug #45695 - Patch by bantu)</li>
|
||||
<li>[Fix] Correctly show private message history (Bug #46065 - Patch by bantu)</li>
|
||||
<li>[Fix] Various XHTML mistakes in prosilver, subsilver2 and the ACP. (Bugs #25545 - Patch by bantu, #26315, #38555, #45505 - Patch by Raimon, #45785, #45865, #47085 - Patch by Raimon)</li>
|
||||
<li>[Fix] Fix some ACP style issues (Bug #16109 - Patch by prototech)</li>
|
||||
<li>[Fix] Move post bump information markup to the template. (Bug #34295 - Patch by bantu)</li>
|
||||
<li>[Fix] Show error in the ACP when template folder is not readable. (Bug #45705 - Patch by bantu)</li>
|
||||
<li>[Fix] Adjust viewonline filename regular expression to be less strict. (Bug #46215 - Patch by bantu)</li>
|
||||
<li>[Fix] Correctly apply the can change vote permission again. Regression introduced in r9470. (Bug #45895)</li>
|
||||
<li>[Fix] Also remove data from friend/foe table when deleting user. (Bug #45345 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Correctly hide skiplink in prosilver right-to-left mode. (Bug #45765 - Patch by prototech and bantu)</li>
|
||||
<li>[Fix] Fix dynamic config update routine error if firebird is used (Bug #46315)</li>
|
||||
<li>[Fix] Allow friends/foes to be added and removed at the same time. (Bug #46255 - Patch by bantu)</li>
|
||||
<li>[Fix] Only change topic/post icon if icons are enabled and user is allowed to. (Bug #46355 - Patch by bantu)</li>
|
||||
<li>[Fix] Fix saving custom profile fields in ACP if Oracle is used. (Bug #46015)</li>
|
||||
<li>[Fix] Make view_log() more resilient to corrupt serialized data. (Bug #46545)</li>
|
||||
<li>[Fix] Show error if hostname lookup doesn't return a valid IP address when banning. (Bug #45585 - Patch by bantu)</li>
|
||||
<li>[Fix] Fix incorrect layout when loading private message draft. (Bug #38435 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Show proper error message when trying to add bots to friends/foes list. (Bug #40205 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Fix Oracle database backup (Bug #46715)</li>
|
||||
<li>[Fix] Update attachments table when deleting user and retaining his posts. (Bug #40245 - Patch by rxu)</li>
|
||||
<li>[Fix] Correctly detect files in subfolders when viewing cached template files. (Bug #46145 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Display user's Jabber address in popup when Jabber functionality is disabled (Bug #20775 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Correctly exclude forums from active topics list. (Bug #19135 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Do not display birthdays of banned users (Bug #20625 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Fix function to recalculate Nested Sets (Bug #41555 - Patch by EXreaction)</li>
|
||||
<li>[Fix] Display but also highlight already used rank images when creating new ranks. (Bug #22665 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Correctly orientate quoted text image on RTL languages (Bug #33745 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Do not display "View user notes" and "Warn user" links in user profile if corresponding MCP modules are disabled. (Bug #10519 - Patch by rxu)</li>
|
||||
<li>[Fix] Show proper error message when trying to create a private messages folder with an empty name. (Bug #39875 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] No longer state that it is possible to manage group leaders from the UCP. (Bug #19945 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Do not throw an error when PDO is a shared module and not loaded preventing SQLite from being loaded.</li>
|
||||
<li>[Fix] Fix censoring of unicode words. (Bug #16555 - Patches by rxu)</li>
|
||||
<li>[Fix] Display coloured usernames in ACP groups management screens</li>
|
||||
<li>[Fix] Correctly describe founder permissions on trace-information (Bug #37235 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Correct the width value for poll_center.gif omitted in imageset.cfg for subsilver2. (Bug #43005 - Patch by rxu)</li>
|
||||
<li>[Fix] Correctly load complex language variable using acp_language (Bug #45735 - Patch by leviatan21)</li>
|
||||
<li>[Fix] Fix reapply_sid() to correctly strip session id in certain circumstances (Bug #43125 - Patch by leviatan21)</li>
|
||||
<li>[Fix] Correctly state why one language pack is marked with an asterisk in the ACP. (Bug #37565 - Patch by bantu)</li>
|
||||
<li>[Fix] Correctly check if install directory is still present. (Bug #46965 - Patch by rxu)</li>
|
||||
<li>[Fix] Correct banned user behaviour when "force password change" is enabled (Bug #47145 - Patch by nickvergessen and leviatan21)</li>
|
||||
<li>[Fix] Correctly display ACP logs options, without permission to clear logs. (Bug #24155 - Patch by leviatan21)</li>
|
||||
<li>[Fix] Display topic icons in MCP forum view again (only prosilver).</li>
|
||||
<li>[Fix] Properly display post status messages in topic when post is reported and unapproved (Bug #44455 - Patch by leviatan21)</li>
|
||||
<li>[Fix] Do not remove recipients when loading private message draft. (Bug #38395 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Add author name to moderator log when deleting post/topic. (Bug #46225 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Fix broken "Report details" link in the MCP. (Bug #46975 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Resolve accesskey conflicts in prosilver. (Bug #44685 - Patch by bantu)</li>
|
||||
<li>[Fix] Check if template file is empty before trying to read from it. (Bug #47345 - Patch by bantu)</li>
|
||||
<li>[Fix] Correct descriptions of the permissions to use BBCode, smilies, images and flash to be more relevant. (Bug #36065 - Patch by rxu)</li>
|
||||
<li>[Fix] Fix style issues in print mode. (Bug #26375 - Patch by leviatan21)</li>
|
||||
<li>[Fix] Fix minor issue with L_QUOTE language string missing in several PM composing modes. (Bug #39625 - Patch by rxu)</li>
|
||||
<li>[Fix] Also fetch posts of guests and deleted or deactivated users when searching for author names. (Bug #36565, #47765 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Show end of ban in MCP and ACP when user is banned by duration. (Bug #47815 - Patch by Pyramide)</li>
|
||||
<li>[Fix] Correctly count posts awaiting approval in the MCP. (Bug #47685 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Display user's posts count in private message when it is equal to 0 (prosilver). (Bug #40155 - Patch by rxu)</li>
|
||||
<li>[Fix] Only allow users to disable word censor if globally allowed. (Bug #47575 - Patch by 00mohgta7)</li>
|
||||
<li>[Fix] Fix database updater and db tools to support multiple column changes/additions/removals with SQLite</li>
|
||||
<li>[Fix] Correctly detect GZIP status in debug mode. (Bug #24075 - Patch by rxu)</li>
|
||||
<li>[Fix] Posting smilies in view more smilies now work again in IE (Bug #46025 - Patch by leviatan21)</li>
|
||||
<li>[Fix] Properly convert and show filesize information. (Bug #47775 - Patch by bantu)</li>
|
||||
<li>[Fix] Add ability to prune users who never logged in. (Bug #44295 - Patch by rxu)</li>
|
||||
<li>[Fix] Show smilies and images in topic print view. (Bug #47265 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Force full date in private message print view. (Patch by nickvergessen)</li>
|
||||
<li>[Fix] Fix "Always show a scrollbar for short pages" for IE8 and Firefox 3.5 (Bug #47865 - Patch by stokerpiller)</li>
|
||||
<li>[Fix] Do not allow setting group as default group for pending users. (Bug #45675 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Fail gracefully if store folder is not writable during update. (Bugs #46615, #46945)</li>
|
||||
<li>[Fix] Hide profile-icon from viewtopic-page if user has no permissions (subsilver2 only) (Bug #37635 - Patch by leviatan21)</li>
|
||||
<li>[Fix] Correct escaping/unescaping in the LDAP authentication plugin. (Bug #48175)</li>
|
||||
<li>[Fix] Add hard limit for smilies.</li>
|
||||
<li>[Fix] Remove redundant SQL query from ucp.php. (Bug #40305)</li>
|
||||
<li>[Fix] Reorder frame order of animated subsilver2 topic icons to be useful when animation is disabled. (Bug #29385 - Patch by prototech)</li>
|
||||
<li>[Fix] Ensure user errors are displayed regardless of PHP settings. (Bug #47505)</li>
|
||||
<li>[Fix] Permit null values for non-required integer custom profile fields and ensure zero complies with the range limits. (Bug #40925)</li>
|
||||
<li>[Fix] Allow changing forum from select box under certain circumstances. (Bug #37525)</li>
|
||||
<li>[Fix] Display required fields notice on registration above the custom profile fields. (Bug #39665)</li>
|
||||
<li>[Fix] Copy poll options properly when copying topic. (Bug #39065)</li>
|
||||
<li>[Fix] Fix error with disapproval of topics having several queued posts only. (Bug #47705 - Patch by rxu)</li>
|
||||
<li>[Fix] Preserve newlines in template files (one newline had been always dropped after a template variable due to PHP's handling of closing tags)</li>
|
||||
<li>[Fix] Be less strict with FTP daemons when getting directory filelists. (Bug #46295)</li>
|
||||
<li>[Fix] Fix set_custom_template for database-stored styles (Bug #40515 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Banning an already banned user states to be successful, but has no effect (Bug #47825 - Patch by Pyramide)</li>
|
||||
<li>[Fix] Do not add style-parameter to URL again, after admin re-authentification (Bug #18005 - Patch by leviatan21)</li>
|
||||
<li>[Fix] Do not cut post-message in between HTML-Entities on search.php (Bug #31505 - Patch by leviatan21)</li>
|
||||
<li>[Fix] Correctly set attachment flag for topics, posts and pms after deleting attachments (Bug #48265 - Patch by MarcoDM and nickvergessen)</li>
|
||||
<li>[Fix] Display "Locked" button instead of "Reply" one for locked forum in viewtopic (prosilver). (Bug #38055 - Patch by Raimon)</li>
|
||||
<li>[Fix] Correctly propagate umlauts over search result pages (Bug #33755)</li>
|
||||
<li>[Fix] Preserve post options when refusing to save the post as a draft. (Bug #39115)</li>
|
||||
<li>[Fix] Do not send private message back to sender if sender is in the same group the private message was sent to.</li>
|
||||
<li>[Fix] Correctly add user to a group making it a default one. (Bug #48345 - Patch by rxu)</li>
|
||||
<li>[Fix] Add log entry when copying forum permissions.</li>
|
||||
<li>[Fix] Min/max characters per posts no longer affects poll options (Bug #47295 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Correctly log action when users request to join a group (Bug #37585 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Do not try to create thumbnails for images we cannot open properly. (Bug #48695)</li>
|
||||
<li>[Fix] Apply locale-independent basename() to attachment filenames. New function added: utf8_basename(). (Bug #43335 - Patch by ocean=Yohsuke)</li>
|
||||
<li>[Fix] Adjust build_url() to not prepend $phpbb_root_path if path returned from redirect() is an URL. This fixes redirect issues with some installations and bridges. (Bug #47535)</li>
|
||||
<li>[Fix] Do not mark global announcements as read if all topics in a forum become read (Bug #15729).</li>
|
||||
<li>[Fix] Fix general error while registration, through undefined variable $config in validate_referer (Bug #49035 - Patch by wjvriend)</li>
|
||||
<li>[Fix] Correctly extract column default value when exporting PostgreSQL tables. (Bug #48955)</li>
|
||||
<li>[Fix] Allow updater to work correctly with PHP filename extensions other than ".php". (Bugs #15809, #49215)</li>
|
||||
<li>[Fix] Update search index if only post subject changed. (Bug #49435)</li>
|
||||
<li>[Fix] Fix who is online displaying incorrect data. (Bug #49485, thanks Brainy)</li>
|
||||
<li>[Fix] Fixed incorrect "topic does not exist" when unapproved posts were visited without global moderator permissions. (Bug #47795)</li>
|
||||
<li>[Fix] Prevent style switcher from blocking the tab key. (Bug #49335)</li>
|
||||
<li>[Fix] Correctly redirect on MCP main page after posts approval/disapproval from it. (Bug #49625)</li>
|
||||
<li>[Fix] Do not display topic approval status image for shadow topic if a user is not a moderator in the forum the topic has been moved to. (Bug #43295)</li>
|
||||
<li>[Fix] Fix email problems on servers with PHP installations not accepting RFC-compliant subject string passed to the the mail()-function. (Bug #46725)</li>
|
||||
<li>[Fix] Correctly orientate Control-Panel-Navigation background-image on RTL languages. (Bug #49945)</li>
|
||||
<li>[Fix] Sort private messages by message time and not message id. (Bug #50015)</li>
|
||||
<li>[Fix] Make sure only logs for existing users are displayed and user-specific logs removed on user deletion. (Bug #49855)</li>
|
||||
<li>[Fix] Only show "Add friend" and "Add foe" links if the specific module is enabled. (Bug #50475)</li>
|
||||
<li>[Fix] Correctly display list items in forum description in prosilver and administration. (Bug #48055 - Patch by leviatan21)</li>
|
||||
<li>[Fix] Only embed cron.php if there is no cron lock present to reduce overhead. (Bug #45725 - Patch by TerryE)</li>
|
||||
<li>[Fix] Add header gradient back into subsilver2 but keep site logo easily replaceable with smaller and bigger ones. (Bug #11142 - Patch by dark/Rain and Raimon)</li>
|
||||
<li>[Fix] Send activation email when activating user from user settings. (Bug #43145)</li>
|
||||
<li>[Fix] Do not show resend activation email link when using admin activation. (Bug #44375 - Patch by bbrunnrman)</li>
|
||||
<li>[Fix] Do not display links to user/post search if search is disabled. (Bug #50685 - Patch by HardStyle)</li>
|
||||
<li>[Fix] Fix icon alignment for forums with large descriptions in subsilver2. (Bug #50445)</li>
|
||||
<li>[Fix] Correctly display underlined links placed in last line in viewtopic. (Bug #14811 - Patch by primehalo)</li>
|
||||
<li>[Fix] Only check whether forum image exists if forum image is specified. (Bug #51905)</li>
|
||||
<li>[Fix] Fixed database backup and restore with Oracle DBMS.</li>
|
||||
<li>[Fix] Fixed database updater for changes to columns having default value in MSSQL (adding/dropping constraints)</li>
|
||||
<li>[Change] Database updater now supports checking for existing/missing indexes.</li>
|
||||
<li>[Change] submit_post() now accepts force_approved_state key passed to $data to indicate new posts being approved (true) or unapproved (false).</li>
|
||||
<li>[Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.</li>
|
||||
<li>[Change] Template engine now permits to a limited extent variable includes.</li>
|
||||
<li>[Change] Quote BBCode no longer requires the f_reply permission. (Bug #16079)</li>
|
||||
<li>[Change] Banning/unbanning users now generates an entry in their user notes (Bug #21825 - Patch by nickvergessen)</li>
|
||||
<li>[Change] Smilies no longer require the f_bbcode permission. (Bug #26545)</li>
|
||||
<li>[Change] Ability to define column split in FAQ/BBCode help (Bug #31405)</li>
|
||||
<li>[Change] Changed behaviour of group_create() function to support specifying additional group columns</li>
|
||||
<li>[Change] Hide avatar when avatar-type is not allowed (Bug #46785 - Patch by cYbercOsmOnauT and nickvergessen)</li>
|
||||
<li>[Change] INCLUDEPHP not depending on phpbb_root_path (Bug #45805 - Patch by nickvergessen)</li>
|
||||
<li>[Change] Ability to fetch moderators with get_moderators() even if load_moderators setting is off. (Bug #35955)</li>
|
||||
<li>[Change] "Post details" links with image in MCP. (Bug #39845 - Patch by leviatan21)</li>
|
||||
<li>[Change] PM history now only shows PMs of users you currently reply to. (Bug #39505 - Patch by nickvergessen)</li>
|
||||
<li>[Change] Show quote button for own PMs in PM history. (Bug #37285 - Patch by nickvergessen)</li>
|
||||
<li>[Change] Fetch requested cookie variables directly from cookie super global. (Bug #47785)</li>
|
||||
<li>[Change] Add confirmation for deactivating styles (Bug #14304 - Patch by leviatan21)</li>
|
||||
<li>[Change] Add confirmation for deactivating language packs (Patch by leviatan21)</li>
|
||||
<li>[Change] Add confirm-box when deleting permissions (Bug #13673 - Patch by nickvergessen)</li>
|
||||
<li>[Change] Add pagination for icons and smilies in the ACP and smilies in the smiley popup</li>
|
||||
<li>[Change] Cache get_username_string() function calls on viewtopic.</li>
|
||||
<li>[Change] Cache version check.</li>
|
||||
<li>[Change] When creating a new forum without copying permissions, ask again.</li>
|
||||
<li>[Change] Parse multiline url title for [url] BBCode tag. (Bug #1309)</li>
|
||||
<li>[Change] Introduce new parameter to page_header() for forum specific who is online listings.</li>
|
||||
<li>[Change] Lifted minimum requirement for Firebird DBMS from 2.0+ to 2.1+.</li>
|
||||
<li>[Change] Unapproved topics can no longer be replied to (Bug #44005, #47675, #23605)</li>
|
||||
<li>[Change] Require user to be registered and logged in to search for unread posts if topic read tracking is disabled for guests (Bug #49525)</li>
|
||||
<li>[Change] Allow three-digit hex notation in Color BBcode. (Bug #39965 - Patch by m0rpha)</li>
|
||||
<li>[Change] Simplified login_box() and redirection after login. S_LOGIN_ACTION can now be used on every page. (Bug #50285)</li>
|
||||
<li>[Change] Do not take edit post time into account for determining permission to delete last post in topic. (Bug #48615)</li>
|
||||
<li>[Change] Resize oversized Topic icons (Bug #44415)</li>
|
||||
<li>[Change] Banned IPs are now sorted (Bug #43045 - Patch by DavidIQ)</li>
|
||||
<li>[Change] phpBB updater now skips sole whitespace/tab changes while computing differences. This reduces the chance of conflicts tremendously.</li>
|
||||
<li>[Change] phpBB updater now solves common conflicts on it's own. This further reduces the chance of conflicts.</li>
|
||||
<li>[Feature] Add language selection on the registration terms page (Bug #15085 - Patch by leviatan21)</li>
|
||||
<li>[Feature] Backported 3.2 captcha plugins.
|
||||
<ul>
|
||||
<li>Classic and GD CAPTCHA</li>
|
||||
<li>reCaptcha (based on API from recaptcha.net by Mike Crawford and Ben Maurer)</li>
|
||||
<li>Q&A CAPTCHA</li>
|
||||
<li>3D Wave (by Robert "Xore" Hetzler)</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>[Feature] Introduced new ACM plugins:
|
||||
<ul>
|
||||
<li>null</li>
|
||||
<li><a href="http://pecl.php.net/package/memcache">memcache</a></li>
|
||||
<li><a href="http://pecl.php.net/package/APC">APC</a></li>
|
||||
<li><a href="http://xcache.lighttpd.net/">XCache</a></li>
|
||||
<li><a href="http://eaccelerator.net/">eAccelerator</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>[Feature] ATOM Feeds (Idea and diversed from RSS Feed 2.0 MOD (Version 1.0.8/9) by leviatan21)</li>
|
||||
<li>[Feature] New groups option to excempt group leaders from group permissions</li>
|
||||
<li>[Feature] New "Newly Registered Users" group for assigning permissions to newly registered users. They will be removed from this group once they reach a defineable amount of posts.</li>
|
||||
<li>[Feature] Ability to define if the "Newly Registered Users" group will be assigned as the default group to newly registered users.</li>
|
||||
<li>[Feature] Add new option to disable avatars board-wide (Bug #46785 - Patch by cYbercOsmOnauT and nickvergessen)</li>
|
||||
<li>[Feature] Enhance obtain_users_online_string to be able to return user-lists for other session-items (Bug #31975 - Patch by nickvergessen)</li>
|
||||
<li>[Feature] Add unapproved topic icon for moderators on forum list (Bug #46865 - Patch by nickvergessen)</li>
|
||||
<li>[Feature] Ability to define minimum number of characters for posts/pms</li>
|
||||
<li>[Feature] Store signature configuration options in database (Bug #45115 - Patch by rxu)</li>
|
||||
<li>[Feature] Add bare-bones quick-reply editor to viewtopic.</li>
|
||||
<li>[Feature] Detect when a post has been altered by someone else while editing. (Patch by bantu)</li>
|
||||
<li>[Feature] Add unread posts quick search option (Bug #46765 - Patch by rxu)</li>
|
||||
<li>[Feature] Add option to disable avatar uploads from remote locations. (Bug #45375 - Patch by nickvergessen)</li>
|
||||
<li>[Feature] Ability to delete warnings and keep warnings permanently (Bug #43375 - Patch by nickvergessen)</li>
|
||||
<li>[Feature] Ability to empty a user's outbox from the user ACP quick tools.</li>
|
||||
<li>[Feature] Ability to search ACP / MCP logs</li>
|
||||
<li>[Feature] Users can report PMs to moderators which are then visible in a new MCP module</li>
|
||||
<li>[Feature] Parse email text files with the template engine.</li>
|
||||
<li>[Feature] Use email-style quoting when bbcodes are disabled.</li>
|
||||
<li>[Feature] Added new functionality to inactive users module:
|
||||
<ul>
|
||||
<li>Ability to set users per page.</li>
|
||||
<li>Ability to sort by posts/number of reminders/last reminded date.</li>
|
||||
<li>Show number of posts and ability to search posts.</li>
|
||||
<li>Show number of reminders sent to user.</li>
|
||||
<li>Show date of last reminder sent to user.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>[Feature] Display version check on ACP main page.</li>
|
||||
<li>[Feature] Ability to copy permissions from one forum to several other forums.</li>
|
||||
<li>[Feature] Ability to control the display of custom profile fields on viewtopic (Bug #48985).</li>
|
||||
<li>[Feature] Fallback options for missing language files. (Bug #38575 - Patch by EXreaction)</li>
|
||||
<li>[Feature] Separate PM Reply and PM Reply to all in prosilver.</li>
|
||||
<li>[Feature] Place debug notices during captcha rendering in the error log - useful for debugging output already started errors.</li>
|
||||
<li>[Feature] Ability to define constant PHPBB_USE_BOARD_URL_PATH to use board url for images/avatars/ranks/imageset...</li>
|
||||
<li>[Feature] Added function to generate Email hash. (Bug #49195)</li>
|
||||
<li>[Feature] Style authors are now able to define the default submit button used for form submission on ENTER keypress on forms using more than one. Prosilver uses this for the posting page(s) and registration screen.</li>
|
||||
<li>[Feature] Ability to specify amount of time user is able to delete his last post in topic.</li>
|
||||
<li>[Feature] Send anonymous statistical information to phpBB on installation and update (optional).</li>
|
||||
</ul>
|
||||
<a name="v304"></a><h3>1.ii. Changes since 3.0.4</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Delete user entry from ban list table upon user deletion (Bug #40015 - Patch by TerraFrost)</li>
|
||||
<li>[Fix] Posts incremented for multiple approval of the same topic (Bug #40495 - Patch by TerraFrost)</li>
|
||||
<li>[Fix] Missing end " in quote bb tag deletes text (Bug #40565 - Patch by TerraFrost)</li>
|
||||
<li>[Fix] Friend/foe system displays posts made by foes while composing (Bug #40325 - Patch by TerraFrost and Highway of Life)</li>
|
||||
<li>[Fix] Check forum_image whether it exists (Bug #39005 - Patch by TerraFrost)</li>
|
||||
<li>[Fix] The sql query in acp_users.php lacks a condition (Bug #40275 - Patch by grimskies)</li>
|
||||
<li>[Fix] Added missing read permission information for some phpbb_chmod() calls</li>
|
||||
<li>[Fix] Correctly display future dates (Bug #38755)</li>
|
||||
<li>[Fix] Fix guest/bot session problems with apache authentication plugin (Bug #41085)</li>
|
||||
<li>[Fix] Whois now works reliably for RIRs other than APNIC and RIPE. (Bug #40085)</li>
|
||||
<li>[Fix] Correctly convert Niels' Birthday MOD to the date format used in phpBB3. (Bug #32895)</li>
|
||||
<li>[Fix] Changed the success message when requesting a new password to be more accurate. (Bug #41405)</li>
|
||||
<li>[Fix] Add missing anti-abuse email headers to acp_inactive.php and ucp_resend.php.</li>
|
||||
<li>[Fix] Only remind users in the correct inactive states depending on the board account activation level.</li>
|
||||
<li>[Fix] Various XHTML mistakes in prosilver, subsilver2 and the ACP. (Bugs #41745, #42265 - Patch by nickvergessen, #38465, #43015, #46585 - Patch by Raimon)</li>
|
||||
<li>[Fix] Log password changes via password reset function. (Bug #41365)</li>
|
||||
<li>[Fix] Poll, negative durations generate error (Bug #41295 - Patch by TerraFrost)</li>
|
||||
<li>[Fix] Visibility of custom field on registration is incorrectly controlled by setting "display" (Bug #41385 - Patch by Eelke and fade2gray)</li>
|
||||
<li>[Fix] Smilies in username are misparsed on [quote=""] (Bug #41955 - Patch by TerraFrost)</li>
|
||||
<li>[Fix] Deleting all posts in a topic - bad redirect (Bug #41705 - Patch by TerraFrost)</li>
|
||||
<li>[Fix] Deleted users still appear logged in (Bug #41985 - Patch by TerraFrost)</li>
|
||||
<li>[Fix] Removed redundant code and unnecessary queries in forum management. (Bug #42265 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Correct mbstring regular expression for the allowable username characters, only affects <code>USERNAME_LETTER_NUM_SPACERS</code>. (Bug #42325)</li>
|
||||
<li>[Fix] Fix infinite loop in message handler if cache directory is not writable. (Bug #38675)</li>
|
||||
<li>[Fix] While post is awaiting approval it can still be edited even though it can not be seen (Bug #41435 - Patch by TerraFrost)</li>
|
||||
<li>[Fix] Fix imageset editing for retaining and correctly setting dimensions for images, as well as displaying correct settings for first page load.</li>
|
||||
<li>[Fix] Use OS-specific line endings for mail headers. (related to Bug #42755)</li>
|
||||
<li>[Fix] Hide font size options which are bigger than the allowed size in the editor. (Bug #42615 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Better thumbnail quality with imagemagick. (Bug #42565)</li>
|
||||
<li>[Fix] Fix download count increments for image attachments without corresponding thumbnails. (Bug #42505)</li>
|
||||
<li>[Fix] Fix wrong bot ip check if bot ip was wrongly entered by admin. (Bug #42485)</li>
|
||||
<li>[Fix] Fix javascript errors in simple header (prosilver) by adding forum_fn.js and the corresponding variables. (Bug #42135)</li>
|
||||
<li>[Fix] Set connection encoding for MySQL versions 4.1.0 to 4.1.2. This may fix some conversion issues with special characters. (Bug #41805)</li>
|
||||
<li>[Fix] Deleting private message attachments could delete post attachments. (Bug #42815)</li>
|
||||
<li>[Fix] Do not suppress PHP notices/errors in language packs if DEBUG_EXTRA mode enabled. (Bug #41485)</li>
|
||||
<li>[Fix] Flash files do not display anymore after update to flash player 10 (Bug #41315)</li>
|
||||
<li>[Fix] Use FQDN for SMTP EHLO/HELO command. (Bug #41025)</li>
|
||||
<li>[Fix] Mass Email works again for users with empty jabber address but notification set to 'both'. (Bug #39755)</li>
|
||||
<li>[Fix] Fix race condition for updating post/topic/etc. counter. (Reported by BartVB)</li>
|
||||
<li>[Fix] Fix duplicate creation of acl options in acl_add_options() under certain conditions. (Bug #38385, #40225)</li>
|
||||
<li>[Fix] Cancel when replying to global announcement redirects to first forum - not to the current forum (Bug #41225 - Patch by TerraFrost)</li>
|
||||
<li>[Fix] Cursor Jumps on New Topic in IE (Bug #42455 - Patch by TerraFrost)</li>
|
||||
<li>[Fix] Add indicator to be used in code if session was created (user visits the site for the first time).</li>
|
||||
<li>[Fix] Correctly count topic views for guests visiting the website the first time by entering the topic directly (Bug #43445)</li>
|
||||
<li>[Fix] Fix bug in postgresql db layer for LIMIT ALL clauses (Reported by JRSweets)</li>
|
||||
<li>[Fix] Sort backups by date, newest first (Bug #14818)</li>
|
||||
<li>[Fix] Prevent incomplete backups stored if option "store and download" is selected and admin cancel download by removing the option. (Bug #20325)</li>
|
||||
<li>[Fix] Enforce correct case for template variables</li>
|
||||
<li>[Fix] Set topic_last_view_time on post/reply/edit to circumvent race conditions in auto prune and false removal of topics for manual forum prune (Bug #18055, #43515)</li>
|
||||
<li>[Fix] Correctly split long subject lines according to the used RFC. This fixes extra spaces within long subjects. (Bug #43715)</li>
|
||||
<li>[Fix] Fix skipping messages if using next/prev PM in history links. (Bug #22205)</li>
|
||||
<li>[Fix] Messenger now also able to use a custom language path. (Bug #36545)</li>
|
||||
<li>[Fix] PM Export uses ISO 8601 date now. (Bug #32645)</li>
|
||||
<li>[Fix] Apply append_sid() to newest/latest post links in viewforum/search and UCP main module. (Bug #26815)</li>
|
||||
<li>[Fix] Do not create thumbnail if thumbnail would've the same size as the original image. (Bug #30725)</li>
|
||||
<li>[Fix] Ability to vote in poll is now required for the ability to change existing vote. (Bug #38925)</li>
|
||||
<li>[Fix] Search for 'topic title only' and 'first post' should work again for non-mysql dbms. (Bug #40605)</li>
|
||||
<li>[Fix] Make sure additional information for accessibility is always exposed to screen readers (Bug #44335 - Patch by MarcoZ)</li>
|
||||
<li>[Fix] Approving a topic when some of the posts within that topic have already been approved (Bug #42585 - Patch by TerraFrost)</li>
|
||||
<li>[Fix] Online status shown when post hidden (Bug #35505 - Patch by Raimon)</li>
|
||||
<li>[Fix] memberlist.php display formating can be distorted by posting long URL for website (Bug #36675 - Patch by TerraFrost)</li>
|
||||
<li>[Fix] Display the online status of hidden users to users with the u_viewonline permission when viewing PMs.</li>
|
||||
<li>[Fix] "Select all" selects much too much in Opera (Bug #42885 - Patch by TerraFrost and ToonArmy)</li>
|
||||
<li>[Fix] Correct calculation of source/target forum statistics if mass moving topics with global announcements (Bug #44545)</li>
|
||||
<li>[Fix] Fix column handling in db updater, custom profile fields an db tools for firebird DBMS (Bug #44555)</li>
|
||||
<li>[Fix] IE8 textarea issues (Bug #43305)</li>
|
||||
<li>[Fix] Prevent accounts from being activated by users when admin activation is turned on and the correct activation key is known.</li>
|
||||
<li>[Fix] Allow the installer to operate under PHP 5.3. (Bug #45255)</li>
|
||||
<li>[Change] Default difference view is now 'inline' instead of 'side by side'</li>
|
||||
<li>[Change] Added new option for merging differences to conflicting files in automatic updater</li>
|
||||
<li>[Change] Add link to user profile in the MCP for user notes and warn user.</li>
|
||||
<li>[Change] Add IN_PHPBB check to generated cache files. (Reported by bantu)</li>
|
||||
<li>[Change] Add topic icons to prosilver UCP main and subscribed templates (Bug #42735 - Patch by Raimon)</li>
|
||||
<li>[Change] Add unique key to ACL options table to prevent duplicate permission options. (Bug #41835)</li>
|
||||
<li>[Change] Redirect to relevant MCP page of multi-page topic if accessing quickmod tools (Split option for example)</li>
|
||||
<li>[Change] Performance improvements for native fulltext search (Patch by Paul)</li>
|
||||
<li>[Change] Changed jumpto() JS function to be more fail-safe. (But #27635 - Patch by peterkclee)</li>
|
||||
<li>[Feature] Added new options for visual confirmation.</li>
|
||||
<li>[Feature] Allow download of conflicting file for later reference in automatic updater</li>
|
||||
<li>[Feature] Allow translation of custom BBCode help messages. (Patch by bantu)</li>
|
||||
<li>[Feature] db_tools now support create table and drop table.</li>
|
||||
<li>[Feature] Database updater checks for incompatible db schema (MySQL 3.x/4.x against MySQL 4.1.x/5.x/6.x)</li>
|
||||
<li>[Feature] New search option: Maximum number of words allowed to search for.</li>
|
||||
<li>[Sec] Only use forum id supplied for posting if global announcement detected. (Reported by nickvergessen)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v303"></a><h3>1.iii. Changes since 3.0.3</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Allow mixed-case template directories to be inherited (Bug #36725)</li>
|
||||
<li>[Fix] Regression bug from revision #8908 regarding log display in ACP</li>
|
||||
<li>[Fix] Allow the UCP group management to work for groups with avatars. (Bug #37375)</li>
|
||||
<li>[Fix] Fix header list build for replying oldest PM in PM history (Bug #37275)</li>
|
||||
<li>[Fix] Do not display COPPA group in memberlist find member dialog if COPPA disabled (Bug #37175)</li>
|
||||
<li>[Fix] Do not try to send jabber notifications if no jid entered (Bug #36775)</li>
|
||||
<li>[Fix] Only display special ranks to guests; no longer display normal ranks for guests (Bug #36735)</li>
|
||||
<li>[Fix] Properly treat punctuation marks after local urls (Bug #37055)</li>
|
||||
<li>[Fix] Make searching for members by YIM address work in prosilver</li>
|
||||
<li>[Fix] Tell users to recreate the search index after changing the common word threshold for fulltext_native (Bug #36345)</li>
|
||||
<li>[Fix] Adjusted phpbb_chmod() to always set permissions for group bit.</li>
|
||||
<li>[Fix] Do not increment users post count after post approval if post had been posted in a forum with no post count increasing set (Bug #37865)</li>
|
||||
<li>[Fix] Extend vertical line for last post column if no posts in forum (Bug #37125)</li>
|
||||
<li>[Fix] correctly update last topic/forum information if changing guest usernames through editing posts (Bug #38095)</li>
|
||||
<li>[Fix] fix postcount resync for situations where low and high post ids are higher than step value, resulting in users having 0 posts. (Bug #38195)</li>
|
||||
<li>[Fix] Use a left join for the topics table on search to avoid trouble with FROM syntax on some databases (Bug #37005)</li>
|
||||
<li>[Fix] Do not show 'Forward' button if the user cannot send PM's</li>
|
||||
<li>[Change] Alllow applications to set custom module inclusion path (idea by HoL)</li>
|
||||
<li>[Change] Handle checking for duplicate usernames in chunks (Bug #17285 - Patch by A_Jelly_Doughnut)</li>
|
||||
<li>[Change] Better handling and finer control for custom profile fields visibility options. (Patch by Highway of Life)</li>
|
||||
<li>[Change] Performance increase for format_date() (Bug #37575 - Patch by BartVB)</li>
|
||||
<li>[Change] Changed prosilver date separator from 'on' to '»'</li>
|
||||
<li>[Change] Performance increase for get_username_string() (Bug #37545 - Patch by BartVB)</li>
|
||||
<li>[Change] Slight performance increase for common parameter calls to append_sid() (Bug #37555 - Patch by BartVB)</li>
|
||||
<li>[Feature] Added 'AGO' setting to relative date strings. For example: posted 14 minutes ago. (Patch by BartVB)</li>
|
||||
<li>[Sec] Fixed an issue where deactivated accounts could be re-activated without the required privileges. (Reported by Jorick)</li>
|
||||
<li>[Sec] Ask for forum password if post within passworded forum quoted in private message. (Reported by nickvergessen)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v302"></a><h3>1.iv. Changes since 3.0.2</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Correctly set topic starter if first post in topic removed (Bug #30575 - Patch by blueray2048)</li>
|
||||
<li>[Fix] Delete avatar files (Bug #29985).</li>
|
||||
<li>[Fix] Preserve selection in the MCP. (Bug #31265).</li>
|
||||
<li>[Fix] Added VST - Venezuela Standard Time (Bug #30545).</li>
|
||||
<li>[Fix] Close DB connections in file.php.</li>
|
||||
<li>[Fix] Correctly return results for nested cached queries (Bug #31445 - Patch by faw).</li>
|
||||
<li>[Fix] Allow export of PM pages greater one. (#33155)</li>
|
||||
<li>[Fix] Display coloured username of last poster in list of subscribed forums (prosilver).</li>
|
||||
<li>[Fix] Added missing UCP language string <em>NO_AUTH_READ_HOLD_MESSAGE</em>.</li>
|
||||
<li>[Fix] Do not jump back to page 1 when hiding member search in memberlist. (Bug #32515)</li>
|
||||
<li>[Fix] Correctly limit input of the users location to 100 characters in the UCP and ACP. (Bug #32655)</li>
|
||||
<li>[Fix] Sync reports when using the move all users posts tool in the ACP. (Bug #31165)</li>
|
||||
<li>[Fix] Extra slash is included in the redirect url when redirecting to the forum root directory. (Bug #33605)</li>
|
||||
<li>[Fix] Remove reported flag from shadow topics when closing reports. (Bug #19765)</li>
|
||||
<li>[Fix] Do not show non indexed forums on the search page if they contain no subforums. (Bug #33125)</li>
|
||||
<li>[Fix] Stop search bots incrementing topic views. (Bug #32675 - Patch by eviL<3)</li>
|
||||
<li>[Fix] Use correct link for post author search. (Bug #32595)</li>
|
||||
<li>[Fix] Do not decrease topics counter when deleting shadow topics. (Bug #26495)</li>
|
||||
<li>[Fix] Send localised disapproval reasons in the recipients local language. (Bug #31645)</li>
|
||||
<li>[Fix] Language typos/fixes. (Bugs #27625, #30755, #34185, #32795)</li>
|
||||
<li>[Fix] Added missing terms parameter to search pagination. (Bug #34085)</li>
|
||||
<li>[Fix] Wrong table order in query obtaining posts if post id given.</li>
|
||||
<li>[Fix] Do not display reported topic icon for shadow topics. (Bug #13970)</li>
|
||||
<li>[Fix] Display popular topic based on posts within topic instead of replies within topic. (Bug #16099)</li>
|
||||
<li>[Fix] Expand shown ban reason in unban screen to fully show long entries. (Bug #16234)</li>
|
||||
<li>[Fix] Preserve alpha transparency for created thumbnails. (Bug #16575)</li>
|
||||
<li>[Fix] Use correct port delimiter for MSSQL connections in windows. (Bug #16615)</li>
|
||||
<li>[Fix] Do not allow setting forums parent to the forum itself. (Bug #18855)</li>
|
||||
<li>[Fix] Display assigned rank/avatar for guests. (Bug #19155)</li>
|
||||
<li>[Fix] Set secure cookie for style switcher if required. (Bug #19625)</li>
|
||||
<li>[Fix] Fix native full text search on postgresql while using excluding keyword matches. (Bug #19195)</li>
|
||||
<li>[Fix] Pass S_SEARCH_ACTION through append_sid() in search.php. (Bug #21585)</li>
|
||||
<li>[Fix] Correctly delete message attachments. (Bug #23755)</li>
|
||||
<li>[Fix] Correctly handle unread status of subforums (that are not shown on the index) of forums that are shown on the index. (Bug #14589)</li>
|
||||
<li>[Fix] Stop users from deleting posts after the edit time has passed or they have been locked. (Bug #19115)</li>
|
||||
<li>[Fix] Split posts target forum requires 'f_post' now instead of 'm_split'. (Bug #31015)</li>
|
||||
<li>[Fix] Duplicate log messages for deleting a topic ('LOG_TOPIC_DELETED' has been deprecated in favour of 'LOG_DELETE_TOPIC').</li>
|
||||
<li>[Fix] Use a distinct log message for shadow topic deletions to differentiate between normal topic deletions. (Bug #34635)</li>
|
||||
<li>[Fix] Fix problems with styles using an underscore within the filename. (Bug #34315)</li>
|
||||
<li>[Fix] Better return links when deleting topics through the MCP. (Bug #34655)</li>
|
||||
<li>[Fix] Add quoting support to PM history when composing a reply. (Bug #34285)</li>
|
||||
<li>[Fix] Use phpBB 3.1.x method for storing cached data to prevent PHP bug with our usage of var_export(). (Thanks to Techie-Micheal and HoL for pointing out possible problems)</li>
|
||||
<li>[Fix] Check users pm preferences for pm's sent to groups. (Bug #33245)</li>
|
||||
<li>[Fix] Do not allow password reminders if u_passchg permission is not given. (Bug #14806)</li>
|
||||
<li>[Fix] Implemented strict check for cached user permissions and existing ACL options. This fix makes sure cached permissions are valid, even if they got already cached.</li>
|
||||
<li>[Fix] Do not show link to user/group profiles if user has no permission to view the linked page and gets a denied message anyway. (Bug #15088)</li>
|
||||
<li>[Fix] Do not display last post link and sort display options for search engines. (Bug #15088)</li>
|
||||
<li>[Fix] Make sure users still get notifications if they set to only be notified by Jabber, but Jabber service disabled. (Bug #29715 - Patch by Paul)</li>
|
||||
<li>[Fix] Don't show forum subscription link on categories. (Bug #34895)</li>
|
||||
<li>[Fix] Display a message if no topics or forums are selected when unsubscribing. (Bug #34855)</li>
|
||||
<li>[Fix] Mark/unmark all links in UCP now select/unselect both subscribed topics and forums.</li>
|
||||
<li>[Fix] Increase board topic counter when splitting topics. (Bug #32125)</li>
|
||||
<li>[Fix] Display profile icons when viewing a topic, or PM when only the jabber icon is to be visible. (Bug #34755)</li>
|
||||
<li>[Fix] Do not send PMs with warnings if the user cannot read PMs or they are disabled. (Bug #30815)</li>
|
||||
<li>[Fix] Correctly convert Niels' Birthday MOD to the date format used in phpBB3. (Bug #32895)</li>
|
||||
<li>[Fix] Parse BBCode lists of type square, circle and disc. (Bug #35295)</li>
|
||||
<li>[Fix] Round the displayed percentages in polls. (Bug #32375)</li>
|
||||
<li>[Fix] Disable mass e-mail when e-mail is disabled. (Bug #27385)</li>
|
||||
<li>[Fix] Display coloured poster username of queued posts displayed on the front of the MCP.</li>
|
||||
<li>[Fix] Moderators can only see reports/queue/logs from forums they can actually read. (Bug #31085)</li>
|
||||
<li>[Fix] Correctly display topic when start parameter is equal to the number of posts.</li>
|
||||
<li>[Fix] Correctly display topic in MCP when start parameter is equal to or greater than the number of posts. (Bug #30525)</li>
|
||||
|
||||
<li>[Change] No longer allow the direct use of MULTI_INSERT in sql_build_array. sql_multi_insert() must be used.</li>
|
||||
<li>[Change] Display warning in ACP if config.php file is left writable.</li>
|
||||
<li>[Change] More restrictive chmod to new files being created. (phpbb_chmod() function mostly by faw)</li>
|
||||
<li>[Change] Set headers to allow browsers to better cache attachments (Mylek pointed this out)</li>
|
||||
<li>[Change] Hide parameters if they equal the default in viewforum/viewtopic (Bug #31185)</li>
|
||||
<li>[Change] Various improvements to group listings (Bugs #32155, #32145, #32085, #26675, #26265)</li>
|
||||
<li>[Change] Set headers for IE 8 in file.php</li>
|
||||
<li>[Change] Do not count queued posts to user_posts.</li>
|
||||
<li>[Change] Allow setting birth year to current year.</li>
|
||||
<li>[Change] Do not use the topics posted table when performing an egosearch.</li>
|
||||
<li>[Change] Log the forum name that topics are moved into.</li>
|
||||
<li>[Change] Automatically add users/groups to the PM recipient list, if entered or selected.</li>
|
||||
<li>[Change] Reply to PM now includes all previous recipients and not only the original sender.</li>
|
||||
<li>[Change] Make topic selection for merge less confusing by removing unneeded controls. (Bug #21925)</li>
|
||||
<li>[Change] MCP topic view checkboxes now default to unchecked.</li>
|
||||
<li>[Change] Adjust language key <em>SPLIT_AFTER</em> to make the action clearer.</li>
|
||||
<li>[Change] Add links to the post and forum when viewing a report from the MCP. (Bugs #33795, #33805)</li>
|
||||
<li>[Change] Added CSRF protection to GET-only actions like marking forums.</li>
|
||||
<li>[Change] Remove NUL-Bytes directly in request_var() for strings and within the custom DBAL sql_escape() functions (MSSQL, Firebird, Oracle) (reported by AdhostMikeSw)</li>
|
||||
|
||||
<li>[Feature] Allow limited inheritance for template sets.</li>
|
||||
<li>[Feature] Allow hard disabling of the template editor.</li>
|
||||
<li>[Feature] Allow setting custom language path through $user->set_custom_lang_path(). $user->lang_path now also do not include the user language, but only the path.</li>
|
||||
<li>[Feature] Ability to define nullar/singular/plural language entries</li>
|
||||
<li>[Feature] Ability to mimic sprintf() calls with $user->lang() with the ability to correctly assign nullar/singular/plural language entries.</li>
|
||||
<li>[Feature] Added the possibility to force user posts put in queue if post count is lower than an admin defined value. Guest posting is not affected by this setting.</li>
|
||||
<li>[Feature] Added 'max_recipients' setting for private messages. This setting allows admins to define the maximum number of recipients per private message with a board-wide setting and a group-specific setting.</li>
|
||||
<li>[Feature] Added new permission setting for sending private messages to groups. Now there are two permissions to define sending private messages to multiple recipients and private messages to groups.</li>
|
||||
<li>[Feature] Allow specific connection to different server for jabber functionality by providing a valid JID as username. This also allows the use of talk.google.com as jabber server with gmail.com JIDs. (Bug #14989)</li>
|
||||
|
||||
<li>[Sec Precaution] Stricter validation of the HTTP_HOST header (Thanks to Techie-Micheal et al for pointing out possible issues in derived code)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v301"></a><h3>1.v. Changes since 3.0.1</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Ability to set permissions on non-mysql dbms (Bug #24955)</li>
|
||||
<li>[Fix] Fixed blank style on setups having no username defined within config.php (Bug #25065)</li>
|
||||
<li>[Fix] Made the compress_tar class tolerate archives that do not properly have their archived contents listed (Bug #14429 / thanks to JRSweets for his patch)</li>
|
||||
<li>[Fix] Moved topics should not count towards the number of topics in a forum (Bug #14648 / thanks to Schumi for his patch)</li>
|
||||
<li>[Fix] Properly check for invalid characters in MySQL DB prefixes during install (Bug #18775)</li>
|
||||
<li>[Fix] Bring the PostgreSQL backup system back to working order (Bug #22385)</li>
|
||||
<li>[Fix] Update correct theme for cached styles in style.php (Bug #25805)</li>
|
||||
<li>[Fix] Also add PHPBB_INSTALLED check to download/file.php for inline avatar delivery</li>
|
||||
<li>[Fix] Unable to login to some jabber server, reverted previous change (Bug #25095)</li>
|
||||
<li>[Fix] Do not return BMP as valid image type for GD image manipulation (Bug #25925)</li>
|
||||
<li>[Fix] Correctly determine safe mode for temp file creation in functions_upload.php (Bug #23525)</li>
|
||||
<li>[Fix] Correctly sort by rank in memberlist (Bug #24435)</li>
|
||||
<li>[Fix] Purge cache after database restore (Bug #24245)</li>
|
||||
<li>[Fix] Correctly display subforum read/unread icons from RTL in FF3, Konqueror and Safari3+. (thanks arod-1 for the fix, related to Bug #14830)</li>
|
||||
<li>[Fix] Added missing form token in acp (thanks NBBN).</li>
|
||||
<li>[Fix] Do not remove whitespace in front of url containing the boards url and no relative path appended (Bug #27355)</li>
|
||||
<li>[Fix] reset forum notifications in viewtopic (Bug #28025)</li>
|
||||
<li>[Fix] corrected link for searching post author's other posts (Bug #26455)</li>
|
||||
<li>[Fix] HTTP Authentication supports UTF-8 usernames now (Bug #21135)</li>
|
||||
<li>[Fix] Topic searches by author no longer return invalid results (Bug #11777)</li>
|
||||
<li>[Fix] Delete drafts and bookmarks when deleting an user. (#27585, thanks Schumi for the fix)</li>
|
||||
<li>[Fix] Set last_post_subject for new topics. (#23945)</li>
|
||||
<li>[Fix] Allow moving posts to invisible forums. (#27325)</li>
|
||||
<li>[Fix] Don't allow promoting unapproved group members (#16124)</li>
|
||||
<li>[Fix] Correctly fetch server name if using non-standard port (#27395)</li>
|
||||
<li>[Fix] Regular expression for email matching in posts will no longer die on long words.</li>
|
||||
<li>[Fix] Do not display ban message if direct call to cron. (thanks Dog Cow for reporting)</li>
|
||||
<li>[Fix] Correctly display double-colon on special conditions within highlighted php source (Bug #26795)</li>
|
||||
<li>[Fix] Increase storage capacity of titles/subjects due to specialchared content (Bug #25235)</li>
|
||||
<li>[Fix] Catch invalid username wildcard ban (we do not support these) (Bug #29305)</li>
|
||||
<li>[Fix] Fix (email)-domain checks for those having DNS prefixes set (Bug #29635)</li>
|
||||
<li>[Change] Adjust truncate_string() to be able to adjust the maximum storage length.</li>
|
||||
<li>[Change] Generalize load check (Bug #21255 / thanks to Xipher)</li>
|
||||
<li>[Change] Make utf8_htmlspecialchars not pass its argument by reference (Bug #21885)</li>
|
||||
<li>[Change] Sort the tables at the database table backup screen</li>
|
||||
<li>[Change] For determining the maximum number of private messages in one box, use the biggest value from all groups the user is a member of (Bug #24665)</li>
|
||||
<li>[Change] Show email ban reason on registration. Additionally allow custom errors properly returned if using validate_data(). (Bug #26885)</li>
|
||||
<li>[Change] Don't allow redirects to different domains. (thanks nookieman)</li>
|
||||
<li>[Feature] Added optional referer validation of POST requests as additional CSRF protection.</li>
|
||||
<li>[Feature] Added optional stricter upload validation to avoid mime sniffing in addition to the safeguards provided by file.php. (thanks to Nicolas Grekas for compiling the list).</li>
|
||||
<li>[Feature] Streamlined banning via the MCP by adding a ban link to the user profile. Also pre-fills ban fields as far as possible.</li>
|
||||
<li>[Feature] Added ACP logout to reset an admin session.</li>
|
||||
<li>[Sec] Only allow urls gone through redirect() being used within login_box(). (thanks nookieman)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v300"></a><h3>1.vi Changes since 3.0.0</h3>
|
||||
<a name="v300"></a><h3>1.i. Changes since 3.0.0</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Change] Validate birthdays (Bug #15004)</li>
|
||||
@@ -591,7 +99,7 @@
|
||||
<li>[Fix] Fixing wrong sync() calls if moving all posts by a member in ACP (Bug #18385)</li>
|
||||
<li>[Fix] Check entered imagemagick path for trailing slash (Bug #18205)</li>
|
||||
<li>[Fix] Use proper title on index for new/unread posts (Bug #13101) - patch provided by Pyramide</li>
|
||||
<li>[Fix] Allow calls to $user->set_cookie() define no cookie time for setting session cookies (Bug #18025)</li>
|
||||
<li>[Fix] Allow calls to $user->set_cookie() define no cookie time for setting session cookies (Bug #18025)</li>
|
||||
<li>[Fix] Stricter checks on smilie packs (Bug #19675)</li>
|
||||
<li>[Fix] Gracefully return from cancelling pm drafts (Bug #19675)</li>
|
||||
<li>[Fix] Possible login problems with IE7 if browser check is activated (Bug #20135)</li>
|
||||
@@ -640,11 +148,9 @@
|
||||
<li>[Fix] If pruning users based on last activity, do not include users never logged in before (Bug #18105)</li>
|
||||
<li>[Sec] Only allow searching by email address in memberlist for users having the a_user permission (reported by evil<3)</li>
|
||||
<li>[Sec] Limit private message attachments to be viewable only by the recipient(s)/sender (Report #s23535) - reported by AlleyKat</li>
|
||||
<li>[Sec] Check for non-empty config.php within style.php (Report #s24575) - reported by bantu</li>
|
||||
<li>[Fix] Find and display colliding usernames correctly when converting from one database to another (Bug #23925)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc8"></a><h3>1.vii. Changes since 3.0.RC8</h3>
|
||||
<a name="v30rc8"></a><h3>1.i. Changes since 3.0.RC8</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Cleaned usernames contain only single spaces, so "a_name" and "a__name" are treated as the same name (Bug #15634)</li>
|
||||
@@ -653,7 +159,7 @@
|
||||
<li>[Fix] Call garbage_collection() within database updater to correctly close connections (affects Oracle for example)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc7"></a><h3>1.viii. Changes since 3.0.RC7</h3>
|
||||
<a name="v30rc7"></a><h3>1.ii. Changes since 3.0.RC7</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Fixed MSSQL related bug in the update system</li>
|
||||
@@ -688,7 +194,7 @@
|
||||
<li>[Fix] No duplication of active topics (Bug #15474)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc6"></a><h3>1.ix. Changes since 3.0.RC6</h3>
|
||||
<a name="v30rc6"></a><h3>1.iii. Changes since 3.0.RC6</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Submitting language changes using acp_language (Bug #14736)</li>
|
||||
@@ -698,7 +204,7 @@
|
||||
<li>[Fix] Able to request new password (Bug #14743)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc5"></a><h3>1.x. Changes since 3.0.RC5</h3>
|
||||
<a name="v30rc5"></a><h3>1.iv. Changes since 3.0.RC5</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Feature] Removing constant PHPBB_EMBEDDED in favor of using an exit_handler(); the constant was meant to achive this more or less.</li>
|
||||
@@ -761,7 +267,7 @@
|
||||
<li>[Sec] New password hashing mechanism for storing passwords (#i42)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc4"></a><h3>1.xi. Changes since 3.0.RC4</h3>
|
||||
<a name="v30rc4"></a><h3>1.v. Changes since 3.0.RC4</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] MySQL, PostgreSQL and SQLite related database fixes (Bug #13862)</li>
|
||||
@@ -812,7 +318,7 @@
|
||||
<li>[Fix] odbc_autocommit causing existing result sets to be dropped (Bug #14182)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc3"></a><h3>1.xii. Changes since 3.0.RC3</h3>
|
||||
<a name="v30rc3"></a><h3>1.vi. Changes since 3.0.RC3</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Fixing some subsilver2 and prosilver style issues</li>
|
||||
@@ -921,7 +427,7 @@
|
||||
|
||||
</ul>
|
||||
|
||||
<a name="v30rc2"></a><h3>1.xiii. Changes since 3.0.RC2</h3>
|
||||
<a name="v30rc2"></a><h3>1.vii. Changes since 3.0.RC2</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Re-allow searching within the memberlist</li>
|
||||
@@ -946,7 +452,7 @@
|
||||
<li>[Fix] Use our global expression for checking email syntax in memberlist (Bug #12827)</li>
|
||||
<li>[Fix] Correctly retrieve/refresh templates stored in database if using subdirectories within template directory (Bug #12839)</li>
|
||||
<li>[Fix] Correctly translate special group names in ucp_groups.php (Bug #12597)</li>
|
||||
<li>[Fix] Search boxes not losing session id (changing method from get to post) (Bug #12643)</li>
|
||||
<li>[Fix] Search boxes not loosing session id (changing method from get to post) (Bug #12643)</li>
|
||||
<li>[Fix] Make sure the automatic update is also working for those having fsockopen disabled</li>
|
||||
<li>[Fix] Simulate recache of theme data on automatic update finished page - recaching it if css data changed</li>
|
||||
<li>[Feature] Allow dropping in custom "info_[module class]_*.php" files to language/*/mods directory for inclusion into the menu structure without the need to modify phpBB language files for menu placements</li>
|
||||
@@ -963,11 +469,11 @@
|
||||
<li>[Fix] Some jabber related bugs (Bug #12989, #11805, #11809)</li>
|
||||
<li>[Fix] Added UTF-8 support for banning via the MCP (Bug #13013)</li>
|
||||
<li>[Fix] Properly detect the script name in session::extract_current_page() if PHP_SELF is not defined (Bug #12705) - patch provided by ToonArmy</li>
|
||||
<li>[Fix] Show role mask for global permission class under Permissions->Permission Roles (Bug #13057)</li>
|
||||
<li>[Fix] Show role mask for global permission class under Permissions->Permission Roles (Bug #13057)</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<a name="v30rc1"></a><h3>1.xiv. Changes since 3.0.RC1</h3>
|
||||
<a name="v30rc1"></a><h3>1.viii. Changes since 3.0.RC1</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] (X)HTML issues within the templates (Bug #11255, #11255)</li>
|
||||
@@ -1123,4 +629,4 @@
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
@@ -53,7 +53,7 @@
|
||||
|
||||
<!-- add entry about common UTF8 problems (for example wrong uploading, editing) -->
|
||||
<ul>
|
||||
<li><a href="#install">I am finding phpBB too difficult to install. Will you do it for me?</a></li>
|
||||
<li><a href="#install">I cannot install this it is too difficult! Will you do it?</a></li>
|
||||
<li><a href="#legal">I am having problems with the admin at a certain board, help!</a></li>
|
||||
<li><a href="#legal">A board has ripped off my graphics/software/etc., stop them!</a></li>
|
||||
<li><a href="#legal">A board is dealing in warez/porn/etc., you need to prevent them doing this!</a></li>
|
||||
@@ -62,7 +62,7 @@
|
||||
<li><a href="#mail">I keep getting Mail sending errors when I (or my users) post/send PM's/etc.!</a></li>
|
||||
<li><a href="#mail_language">My users are complaining that emails are not in their selected language!</a></li>
|
||||
<li><a href="#aol_browser">My AOL based users keep getting logged out!</a></li>
|
||||
<li><a href="#avatars">I am unable to upload avatars from my computer, regardless of the settings.</a></li>
|
||||
<li><a href="#avatars">No matter what I set the uploadable avatars to I cannot upload one from my computer!</a></li>
|
||||
<li><a href="#gallery_avatars">I just cannot get gallery avatars to appear!</a></li>
|
||||
<li><a href="#permissions">How do I use/set permissions?</a></li>
|
||||
<li><a href="#login_issues">I (or my users) cannot stay logged in to the forum!</a></li>
|
||||
@@ -78,7 +78,7 @@
|
||||
|
||||
<hr />
|
||||
|
||||
<a name="install"></a><h2>I am finding phpBB too difficult to install. Will you do it for me?</h2>
|
||||
<a name="install"></a><h2>I cannot install this it is too difficult! Will you do it?</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
@@ -205,7 +205,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
|
||||
<hr />
|
||||
|
||||
<a name="avatars"></a><h2>I am unable to upload avatars from my computer, regardless of the settings.</h2>
|
||||
<a name="avatars"></a><h2>No matter what I set the uploadable avatars to I cannot upload one from my computer!</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
|
@@ -139,7 +139,7 @@
|
||||
<li>MySQL 3.23 or above (MySQLi supported)</li>
|
||||
<li>PostgreSQL 7.3+</li>
|
||||
<li>SQLite 2.8.2+</li>
|
||||
<li>Firebird 2.1+</li>
|
||||
<li>Firebird 2.0+</li>
|
||||
<li>MS SQL Server 2000 or above (directly or via ODBC)</li>
|
||||
<li>Oracle</li>
|
||||
</ul>
|
||||
@@ -273,7 +273,7 @@
|
||||
|
||||
<p>This package is meant for those wanting to only replace changed files from a previous version to the latest version. This package normally contains the changed files from up to five previous versions.</p>
|
||||
|
||||
<p>This package contains a number of archives, each contains the files changed from a given release to the latest version. You should select the appropriate archive for your current version, e.g. if you currently have <samp>3.0.5</samp> you should select the phpBB-3.0.5_to_3.0.6.zip/tar.gz file.</p>
|
||||
<p>This package contains a number of archives, each contains the files changed from a given release to the latest version. You should select the appropriate archive for your current version, e.g. if you currently have <samp>3.0.0</samp> you should select the phpBB-3.0.0_to_3.0.1.zip/tar.gz file.</p>
|
||||
|
||||
<p>The directory structure has been preserved enabling you (if you wish) to simply upload the contents of the archive to the appropriate location on your server, i.e. simply overwrite the existing files with the new versions. Do not forget that if you have installed any MODs these files will overwrite the originals possibly destroying them in the process. You will need to re-add MODs to any affected file before uploading.</p>
|
||||
|
||||
@@ -283,9 +283,9 @@
|
||||
|
||||
<p>The patch file package is for those wanting to update through the patch application, and being comfortable with it.</p>
|
||||
|
||||
<p>The patch file is one solution for those with many Modifications (MODs) or other changes who do not want to re-add them back to all the changed files if they use the method explained above. To use this you will need command line access to a standard UNIX type <strong>patch</strong> application. If you do not have access to such an application but still want to use this update approach, we strongly recommend the <a href="#update_auto">Automatic update package</a> explained below. It is also the recommended update method.</p>
|
||||
<p>The patch file is one solution for those with many Modifications (MODs) or other changes who do not want to re-add them back to all the changed files if they use the method explained above. To use this you will need command line access to a standard UNIX type <strong>patch</strong> application. If you do not have access to such an application but still want to use this update approach, we strongly recommend the <a href="#update_auto">Automatic update package</a> explained below. It is also the preferred update method.</p>
|
||||
|
||||
<p>A number of patch files are provided to allow you to update from previous stable releases. Select the correct patch, e.g. if your current version is 3.0.5 you need the phpBB-3.0.5_to_3.0.6.patch file. Place the correct patch in the parent directory containing the phpBB3 core files (i.e. index.php, viewforum.php, etc.). With this done you should run the following command: <strong>patch -cl -d [PHPBB DIRECTORY] -p1 < [PATCH NAME]</strong> (where PHPBB DIRECTORY is the directory name your phpBB Installation resides in, for example phpBB3, and where PATCH NAME is the relevant filename of the selected patch file). This should complete quickly, hopefully without any HUNK FAILED comments.</p>
|
||||
<p>A number of patch files are provided to allow you to update from previous stable releases. Select the correct patch, e.g. if your current version is 3.0.0 you need the phpBB-3.0.0_to_3.0.1.patch file. Place the correct patch in the parent directory containing the phpBB3 core files (i.e. index.php, viewforum.php, etc.). With this done you should run the following command: <strong>patch -cl -d [PHPBB DIRECTORY] -p1 < [PATCH NAME]</strong> (where PHPBB DIRECTORY is the directory name your phpBB Installation resides in, for example phpBB3, and where PATCH NAME is the relevant filename of the selected patch file). This should complete quickly, hopefully without any HUNK FAILED comments.</p>
|
||||
|
||||
<p>If you do get failures you should look at using the <a href="#update_files">Changed files only</a> package to replace the files which failed to patch, please note that you will need to manually re-add any Modifications (MODs) to these particular files. Alternatively if you know how you can examine the .rej files to determine what failed where and make manual adjustments to the relevant source.</p>
|
||||
|
||||
@@ -293,9 +293,9 @@
|
||||
|
||||
<a name="update_auto"></a><h3>4.iv. Automatic update package</h3>
|
||||
|
||||
<p>This update method is the recommended method for updating. This package allows detecting changed files automatically and merges changes if needed.</p>
|
||||
<p>This update method is the preferred method for updating. This package allows detecting changed files automatically and merges changes if needed.</p>
|
||||
|
||||
<p>The automatic update package contains - contrary to the others - only the information required to update the previous release version to the latest available version. These packages are meant for use with the automatic update tool.</p>
|
||||
<p>The automatic update package is holding - contrary to the others - only the update informations for updating the last released version to the latest available version. These package is meant for use with the automatic update tool.</p>
|
||||
|
||||
<p>To perform the update, either follow the instructions from the <code>Administration Control Panel->System</code> Tab - this should point out that you are running an outdated version and will guide you through the update - or follow the instructions listed below.</p>
|
||||
|
||||
@@ -371,9 +371,9 @@
|
||||
|
||||
<p><strong>Path to your former board</strong> The converter expects the relative path to your old board's files. So, - for instance - if the old board is located at <code>http://www.yourdomain.com/forum</code> and the phpBB3 installation is located at <code>http://www.yourdomain.com/phpBB3</code>, then the correct value would be <code>../forum</code>. Note that the webserver user must be able to access the source installation's files.</p>
|
||||
|
||||
<p><strong>Missing images</strong> If your default board language's language pack does not include all images, then some images might be missing in your installation. Always use a complete language pack as default language.</p>
|
||||
<p><strong>Missing images</strong> If your default board language's language pack does not include all images, then some images might be missing in your installation. Always use a complete language pack as default language.</p>
|
||||
|
||||
<p><strong>Smilies</strong> During the conversion you might see warnings about image files where the copying failed. That can happen if the old board's smilies have the same file names as those on the new board. Copy those files manually after the conversion, if you want to continue using the old smilies.</p>
|
||||
<p><strong>Smilies</strong> During the conversion you might see warnings about image files where the copying failed. That can happen if the old board's smilies have the same file names as those on the new board. Copy those files manually after the conversion, if you want to continue using the old smilies.</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
@@ -57,7 +57,6 @@
|
||||
<li><a href="#editorsettings">Editor Settings</a></li>
|
||||
<li><a href="#fileheader">File Header</a></li>
|
||||
<li><a href="#locations">File Locations</a></li>
|
||||
<li><a href="#constants">Special Constants</a></li>
|
||||
</ol>
|
||||
</li>
|
||||
<li><a href="#code">Code Layout/Guidelines</a>
|
||||
@@ -70,15 +69,7 @@
|
||||
</ol>
|
||||
</li>
|
||||
<li><a href="#styling">Styling</a></li>
|
||||
<ol style="list-style-type: lower-roman;">
|
||||
<li><a href="#cfgfiles">Style Config Files</a></li>
|
||||
<li><a href="#genstyling">General Styling Rules</a></li>
|
||||
</ol></li>
|
||||
<li><a href="#templating">Templating</a>
|
||||
<ol style="list-style-type: lower-roman;">
|
||||
<li><a href="#templates">General Templating</a></li>
|
||||
<li><a href="#inheritance">Template Inheritance</a></li>
|
||||
</ol></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 style="list-style-type: lower-roman;">
|
||||
@@ -87,12 +78,6 @@
|
||||
<li><a href="#writingstyle">Writing Style</a></li>
|
||||
</ol>
|
||||
</li>
|
||||
<li><a href="#vcs">VCS Guidelines</a>
|
||||
<ol style="list-style-type: lower-roman;">
|
||||
<li><a href="#repostruct">Repository structure</a></li>
|
||||
<li><a href="#commitmessage">Commit messages</a></li>
|
||||
</ol>
|
||||
</li>
|
||||
<li><a href="#changes">Guidelines Changelog</a></li>
|
||||
<li><a href="#disclaimer">Copyright and disclaimer</a></li>
|
||||
</ol>
|
||||
@@ -203,7 +188,8 @@ class ...
|
||||
<li><code>/includes/db/firebird.php</code><br />Firebird/Interbase Database Abstraction Layer</li>
|
||||
<li><code>/includes/db/msssql.php</code><br />MSSQL Database Abstraction Layer</li>
|
||||
<li><code>/includes/db/mssql_odbc.php</code><br />MSSQL ODBC Database Abstraction Layer for MSSQL</li>
|
||||
<li><code>/includes/db/mysql.php</code><br />MySQL Database Abstraction Layer for MySQL 3.x/4.0.x/4.1.x/5.x
|
||||
<li><code>/includes/db/mysql.php</code><br />MySQL Database Abstraction Layer for MySQL 3.x/4.0.x</li>
|
||||
<li><code>/includes/db/mysql4.php</code><br />MySQL4 Database Abstraction Layer for MySQL 4.1.x/5.x</li>
|
||||
<li><code>/includes/db/mysqli.php</code><br />MySQLi Database Abstraction Layer</li>
|
||||
<li><code>/includes/db/oracle.php</code><br />Oracle Database Abstraction Layer</li>
|
||||
<li><code>/includes/db/postgres.php</code><br />PostgreSQL Database Abstraction Layer</li>
|
||||
@@ -224,54 +210,6 @@ class ...
|
||||
<li><strong>styles</strong><br /><code>/styles</code>, <code>style.php</code><br />phpBB Styles/Templates/Themes/Imagesets</li>
|
||||
</ul>
|
||||
|
||||
<a name="constants"></a></h3>1.iv. Special Constants</h3>
|
||||
|
||||
<p>There are some special constants application developers are able to utilize to bend some of phpBB's internal functionality to suit their needs.</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
PHPBB_MSG_HANDLER (overwrite message handler)
|
||||
PHPBB_DB_NEW_LINK (overwrite new_link parameter for sql_connect)
|
||||
PHPBB_ROOT_PATH (overwrite $phpbb_root_path)
|
||||
PHPBB_ADMIN_PATH (overwrite $phpbb_admin_path)
|
||||
PHPBB_USE_BOARD_URL_PATH (use generate_board_url() for image paths instead of $phpbb_root_path)
|
||||
PHPBB_DISABLE_ACP_EDITOR (disable ACP style editor for templates)
|
||||
PHPBB_DISABLE_CONFIG_CHECK (disable ACP config.php writeable check)
|
||||
|
||||
PHPBB_ACM_MEMCACHE_PORT (overwrite memcached port, default is 11211)
|
||||
PHPBB_ACM_MEMCACHE_COMPRESS (overwrite memcached compress setting, default is disabled)
|
||||
PHPBB_ACM_MEMCACHE_HOST (overwrite memcached host name, default is localhost)
|
||||
|
||||
PHPBB_QA (Set board to QA-Mode, which means the updater also checks for RC-releases)
|
||||
</pre></div>
|
||||
|
||||
<h4>PHPBB_USE_BOARD_URL_PATH</h4>
|
||||
|
||||
<p>If the <code>PHPBB_USE_BOARD_URL_PATH</code> constant is set to true, phpBB uses generate_board_url() (this will return the boards url with the script path included) on all instances where web-accessible images are loaded. The exact locations are:</p>
|
||||
|
||||
<ul>
|
||||
<li>/includes/session.php - user::img()</li>
|
||||
<li>/includes/functions_content.php - smiley_text()</li>
|
||||
</ul>
|
||||
|
||||
<p>Path locations for the following template variables are affected by this too:</p>
|
||||
|
||||
<ul>
|
||||
<li>{T_THEME_PATH} - styles/xxx/theme</li>
|
||||
<li>{T_TEMPLATE_PATH} - styles/xxx/template</li>
|
||||
<li>{T_SUPER_TEMPLATE_PATH} - styles/xxx/template</li>
|
||||
<li>{T_IMAGESET_PATH} - styles/xxx/imageset</li>
|
||||
<li>{T_IMAGESET_LANG_PATH} - styles/xxx/imageset/yy</li>
|
||||
<li>{T_IMAGES_PATH} - images/</li>
|
||||
<li>{T_SMILIES_PATH} - $config['smilies_path']/</li>
|
||||
<li>{T_AVATAR_PATH} - $config['avatar_path']/</li>
|
||||
<li>{T_AVATAR_GALLERY_PATH} - $config['avatar_gallery_path']/</li>
|
||||
<li>{T_ICONS_PATH} - $config['icons_path']/</li>
|
||||
<li>{T_RANKS_PATH} - $config['ranks_path']/</li>
|
||||
<li>{T_UPLOAD_PATH} - $config['upload_path']/</li>
|
||||
<li>{T_STYLESHEET_LINK} - styles/xxx/theme/stylesheet.css (or link to style.php if css is parsed dynamically)</li>
|
||||
<li>New template variable {BOARD_URL} for the board url + script path.</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
@@ -580,7 +518,7 @@ switch ($mode)
|
||||
break;
|
||||
|
||||
default:
|
||||
// Always assume that a case was not caught
|
||||
// Always assume that the case got not catched
|
||||
break;
|
||||
}
|
||||
</pre></div>
|
||||
@@ -603,7 +541,7 @@ switch ($mode)
|
||||
|
||||
default:
|
||||
|
||||
// Always assume that a case was not caught
|
||||
// Always assume that the case got not catched
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -631,7 +569,7 @@ switch ($mode)
|
||||
|
||||
default:
|
||||
|
||||
// Always assume that a case was not caught
|
||||
// Always assume that the case got not catched
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -752,29 +690,7 @@ $sql = 'UPDATE ' . SOME_TABLE . '
|
||||
$db->sql_query($sql);
|
||||
</pre></div>
|
||||
|
||||
<p>The <code>$db->sql_build_array()</code> function supports the following modes: <code>INSERT</code> (example above), <code>INSERT_SELECT</code> (building query for <code>INSERT INTO table (...) SELECT value, column ...</code> statements), <code>UPDATE</code> (example above) and <code>SELECT</code> (for building WHERE statement [AND logic]).</p>
|
||||
|
||||
<h4>sql_multi_insert():</h4>
|
||||
|
||||
<p>If you want to insert multiple statements at once, please use the separate <code>sql_multi_insert()</code> method. An example:</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
$sql_ary = array();
|
||||
|
||||
$sql_ary[] = array(
|
||||
'somedata' => $my_string_1,
|
||||
'otherdata' => $an_int_1,
|
||||
'moredata' => $another_int_1,
|
||||
);
|
||||
|
||||
$sql_ary[] = array(
|
||||
'somedata' => $my_string_2,
|
||||
'otherdata' => $an_int_2,
|
||||
'moredata' => $another_int_2,
|
||||
);
|
||||
|
||||
$db->sql_multi_insert(SOME_TABLE, $sql_ary);
|
||||
</pre></div>
|
||||
<p>The <code>$db->sql_build_array()</code> function supports the following modes: <code>INSERT</code> (example above), <code>INSERT_SELECT</code> (building query for <code>INSERT INTO table (...) SELECT value, column ...</code> statements), <code>MULTI_INSERT</code> (for returning extended inserts), <code>UPDATE</code> (example above) and <code>SELECT</code> (for building WHERE statement [AND logic]).</p>
|
||||
|
||||
<h4>sql_in_set():</h4>
|
||||
|
||||
@@ -1057,18 +973,8 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
|
||||
<div class="content">
|
||||
<a name="cfgfiles"></a><h3>3.i. Style Config Files</h3>
|
||||
<p>Style cfg files are simple name-value lists with the information necessary for installing a style. Similar cfg files exist for templates, themes and imagesets. These follow the same principle and will not be introduced individually. Styles can use installed components by using the required_theme/required_template/required_imageset entries. The important part of the style configuration file is assigning an unique name.</p>
|
||||
<div class="codebox"><pre>
|
||||
# General Information about this style
|
||||
name = prosilver_duplicate
|
||||
copyright = © phpBB Group, 2007
|
||||
version = 3.0.3
|
||||
required_template = prosilver
|
||||
required_theme = prosilver
|
||||
required_imageset = prosilver
|
||||
</pre></div>
|
||||
<a name="genstyling"></a><h3>3.2. General Styling Rules</h3>
|
||||
|
||||
<h4>General things</h4>
|
||||
<p>Templates should be produced in a consistent manner. Where appropriate they should be based off an existing copy, e.g. index, viewforum or viewtopic (the combination of which implement a range of conditional and variable forms). Please also note that the intendation and coding guidelines also apply to templates where possible.</p>
|
||||
|
||||
<p>The outer table class <code>forumline</code> has gone and is replaced with <code>tablebg</code>.</p>
|
||||
@@ -1135,7 +1041,6 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
|
||||
<div class="content">
|
||||
<a name="templates"></a><h3>4.i. General Templating</h3>
|
||||
|
||||
<h4>File naming</h4>
|
||||
<p>Firstly templates now take the suffix ".html" rather than ".tpl". This was done simply to make the lifes of some people easier wrt syntax highlighting, etc.</p>
|
||||
@@ -1165,29 +1070,6 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;
|
||||
|
||||
<p>You will note in the 3.0 templates the major sources start with <code><!-- INCLUDE overall_header.html --></code> or <code><!-- INCLUDE simple_header.html --></code>, etc. In 2.0.x control of "which" header to use was defined entirely within the code. In 3.0.x the template designer can output what they like. Note that you can introduce new templates (i.e. other than those in the default set) using this system and include them as you wish ... perhaps useful for a common "menu" bar or some such. No need to modify loads of files as with 2.0.x.</p>
|
||||
|
||||
<p>Added in <strong>3.0.6</strong> is the ability to include a file using a template variable to specify the file, this functionality only works for root variables (i.e. not block variables).</p>
|
||||
<div class="codebox"><pre>
|
||||
<span class="comment"><!-- INCLUDE {FILE_VAR} --></span>
|
||||
</pre></div>
|
||||
|
||||
<p>Template defined variables can also be utilised.
|
||||
|
||||
<div class="codebox"><pre>
|
||||
<span class="comment"><!-- DEFINE $SOME_VAR = 'my_file.html' --></span>
|
||||
<span class="comment"><!-- INCLUDE {$SOME_VAR} --></span>
|
||||
</pre></div>
|
||||
<!-- no longer added in 3.0.6
|
||||
<p>Also added in <strong>3.0.6</strong> is the ability to increment or decrement a variable on use. This can be used for instances like tabindexes, where the amount of entries is not statically known.
|
||||
The INC (for incrementing) and DEC (for decrementing) commands will print the <strong>current</strong> state of a defined var and then increment/decrement it by one (postincrement/postdecrement).</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
<span class="comment"><!-- DEFINE $SOME_VAR = 1 --></span>
|
||||
<span class="comment"><!-- INC $SOME_VAR --></span>
|
||||
Result: 1<br />
|
||||
<span class="comment">{$SOME_VAR}</span>
|
||||
Result: 2<br />
|
||||
</pre></div>
|
||||
//-->
|
||||
<h4>PHP</h4>
|
||||
<p>A contentious decision has seen the ability to include PHP within the template introduced. This is achieved by enclosing the PHP within relevant tags:</p>
|
||||
|
||||
@@ -1547,29 +1429,6 @@ div
|
||||
</fieldset>
|
||||
</form>
|
||||
</pre></div><br />
|
||||
|
||||
<a name="inheritance"></a><h3>4.ii. Template Inheritance</h3>
|
||||
<p>When basing a new template on an existing one, it is not necessary to provide all template files. By declaring the template to be "<strong>inheriting</strong>" in the template configuration file.</p>
|
||||
|
||||
<p>The limitation on this is that the base style has to be installed and complete, meaning that it is not itself inheriting.</p>
|
||||
|
||||
<p>The effect of doing so is that the template engine will use the files in the new template where they exist, but fall back to files in the base template otherwise. Declaring a style to be inheriting also causes it to use some of the configuration settings of the base style, notably database storage.</p>
|
||||
|
||||
<p>We strongly encourage the use of inheritance for styles based on the bundled styles, as it will ease the update procedure.</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
# General Information about this template
|
||||
name = inherits
|
||||
copyright = © phpBB Group, 2007
|
||||
version = 3.0.3
|
||||
|
||||
# Defining a different template bitfield
|
||||
template_bitfield = lNg=
|
||||
|
||||
# Are we inheriting?
|
||||
inherit_from = prosilver
|
||||
</pre></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
@@ -1591,7 +1450,7 @@ div
|
||||
|
||||
|
||||
<h4>What are Unicode, UCS and UTF-8?</h4>
|
||||
<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 compatibility 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>
|
||||
<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>
|
||||
|
||||
<h4>phpBB's use of Unicode</h4>
|
||||
<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>
|
||||
@@ -2330,86 +2189,12 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||
|
||||
<hr />
|
||||
|
||||
<a name="vcs"></a><h2>7. VCS Guidelines</h2>
|
||||
|
||||
<a name="changes"></a><h2>7. Guidelines Changelog</h2>
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>The version control system for phpBB3 is subversion. The repository is available at <a href="http://code.phpbb.com/svn/phpbb" title="repository">http://code.phpbb.com/svn/phpbb</a>.
|
||||
|
||||
<a name="repostruct"></a><h3>7.i. Repository Structure</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>trunk</strong><br />The latest unstable development version with new features etc. Contains the actual board in <code>/trunk/phpBB</code></li>
|
||||
<li><strong>branches</strong><br />Development branches of stable phpBB releases. Copied from <code>/trunk</code> at the time of release.
|
||||
<ul>
|
||||
<li><strong>phpBB3.0</strong><code>/branches/phpBB-3_0_0/phpBB</code><br />Development branch of the stable 3.0 line. Bug fixes are applied here.</li>
|
||||
<li><strong>phpBB2</strong><code>/branches/phpBB-2_0_0/phpBB</code><br />Old phpBB2 development branch.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>tags</strong><br />Released versions. Copies of trunk or the respective branch, made at the time of release.
|
||||
<ul>
|
||||
<li><code>/tags/release_3_0_BX</code><br />Beta release X of the 3.0 line.</li>
|
||||
<li><code>/tags/release_3_0_RCX</code><br />Release candidate X of the 3.0 line.</li>
|
||||
<li><code>/tags/release_3_0_X-RCY</code><br />Release candidate Y of the stable 3.0.X release.</li>
|
||||
<li><code>/tags/release_3_0_X</code><br />Stable <strong>3.0.X</strong> release.</li>
|
||||
<li><code>/tags/release_2_0_X</code><br />Old stable 2.0.X release.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<a name="commitmessage"></a><h3>7.ii. Commit Messages</h3>
|
||||
|
||||
<p>The commit message should contain a brief explanation of all changes made within the commit. Often identical to the changelog entry. A bug ticket can be referenced by specifying the ticket ID with a hash, e.g. #12345. A reference to another revision should simply be prefixed with r, e.g. r12345.</p>
|
||||
|
||||
<p>Junior Developers need to have their patches approved by a development team member first. The commit message must end in a line with the following format:</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
Authorised by: developer1[, developer2[, ...]]
|
||||
</pre></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<a name="changes"></a><h2>8. Guidelines Changelog</h2>
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
|
||||
<div class="content">
|
||||
<h3>Revision 10007</h3>
|
||||
|
||||
<ul>
|
||||
<li>Added <a href="#constants">Special Constants</a> section.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Revision 9817</h3>
|
||||
|
||||
<ul>
|
||||
<li>Added VCS section.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Revision 8732</h3>
|
||||
|
||||
<ul>
|
||||
<li>Added cfg files.</li>
|
||||
<li>Added template <a href="#inheritance">inheritance</a>.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Revision 8596+</h3>
|
||||
|
||||
<ul>
|
||||
<li>Removed sql_build_array('MULTI_INSERT'... statements.</li>
|
||||
<li>Added sql_multi_insert() explanation.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Revision 1.31</h3>
|
||||
|
||||
<ul>
|
||||
@@ -2467,7 +2252,7 @@ Authorised by: developer1[, developer2[, ...]]
|
||||
|
||||
<hr />
|
||||
|
||||
<a name="disclaimer"></a><h2>9. Copyright and disclaimer</h2>
|
||||
<a name="disclaimer"></a><h2>8. Copyright and disclaimer</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
|
@@ -104,14 +104,14 @@ h3 {
|
||||
border-top: 1px solid #ccc;
|
||||
}
|
||||
|
||||
code {
|
||||
color: #006600;
|
||||
font-weight: normal;
|
||||
font-family: 'Courier New', monospace;
|
||||
border-color: #D1D7DC;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
background-color: #FAFAFA;
|
||||
code {
|
||||
color: #006600;
|
||||
font-weight: normal;
|
||||
font-family: 'Courier New', monospace;
|
||||
border-color: #D1D7DC;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
background-color: #FAFAFA;
|
||||
}
|
||||
|
||||
#wrap {
|
||||
@@ -387,36 +387,8 @@ PHPBB_MSG_HANDLER (overwrite message handler)
|
||||
PHPBB_DB_NEW_LINK (overwrite new_link parameter for sql_connect)
|
||||
PHPBB_ROOT_PATH (overwrite $phpbb_root_path)
|
||||
PHPBB_ADMIN_PATH (overwrite $phpbb_admin_path)
|
||||
PHPBB_USE_BOARD_URL_PATH (use generate_board_url() for image paths instead of $phpbb_root_path)
|
||||
</pre></div>
|
||||
|
||||
<p>If the <code>PHPBB_USE_BOARD_URL_PATH</code> constant is set to true, phpBB uses generate_board_url() (this will return the boards url with the script path included) on all instances where web-accessible images are loaded. The exact locations are:</p>
|
||||
|
||||
<ul>
|
||||
<li>/includes/session.php - user::img()</li>
|
||||
<li>/includes/functions_content.php - smiley_text()</li>
|
||||
</ul>
|
||||
|
||||
<p>Path locations for the following template variables are affected by this too:</p>
|
||||
|
||||
<ul>
|
||||
<li>{T_THEME_PATH} - styles/xxx/theme</li>
|
||||
<li>{T_TEMPLATE_PATH} - styles/xxx/template</li>
|
||||
<li>{T_SUPER_TEMPLATE_PATH} - styles/xxx/template</li>
|
||||
<li>{T_IMAGESET_PATH} - styles/xxx/imageset</li>
|
||||
<li>{T_IMAGESET_LANG_PATH} - styles/xxx/imageset/yy</li>
|
||||
<li>{T_IMAGES_PATH} - images/</li>
|
||||
<li>{T_SMILIES_PATH} - $config['smilies_path']/</li>
|
||||
<li>{T_AVATAR_PATH} - $config['avatar_path']/</li>
|
||||
<li>{T_AVATAR_GALLERY_PATH} - $config['avatar_gallery_path']/</li>
|
||||
<li>{T_ICONS_PATH} - $config['icons_path']/</li>
|
||||
<li>{T_RANKS_PATH} - $config['ranks_path']/</li>
|
||||
<li>{T_UPLOAD_PATH} - $config['upload_path']/</li>
|
||||
<li>{T_STYLESHEET_LINK} - styles/xxx/theme/stylesheet.css (or link to style.php if css is parsed dynamically)</li>
|
||||
<li>New template variable {BOARD_URL} for the board url + script path.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
@@ -644,7 +616,7 @@ echo $second_object->hook_me('first', 'second') . '<br />';
|
||||
|
||||
<div class="codebox"><pre>
|
||||
not hooked
|
||||
hooked
|
||||
hooked
|
||||
</pre></div>
|
||||
|
||||
<p>A different possibility would be using a function variable (which could be left out on passing the function variables to the hook):</p>
|
||||
@@ -698,7 +670,7 @@ echo $second_object->hook_me('first', 'second') . '<br />';
|
||||
|
||||
<div class="codebox"><pre>
|
||||
not hooked
|
||||
hooked
|
||||
hooked
|
||||
</pre></div>
|
||||
|
||||
</div>
|
||||
|
@@ -15,29 +15,9 @@ define('IN_PHPBB', true);
|
||||
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
|
||||
|
||||
// Thank you sun.
|
||||
if (isset($_SERVER['CONTENT_TYPE']))
|
||||
{
|
||||
if ($_SERVER['CONTENT_TYPE'] === 'application/x-java-archive')
|
||||
{
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else if (isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], 'Java') !== false)
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (isset($_GET['avatar']))
|
||||
{
|
||||
require($phpbb_root_path . 'config.' . $phpEx);
|
||||
|
||||
if (!defined('PHPBB_INSTALLED') || empty($dbms) || empty($acm_type))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/cache.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
|
||||
@@ -59,8 +39,6 @@ if (isset($_GET['avatar']))
|
||||
$config = $cache->obtain_config();
|
||||
$filename = $_GET['avatar'];
|
||||
$avatar_group = false;
|
||||
$exit = false;
|
||||
|
||||
if ($filename[0] === 'g')
|
||||
{
|
||||
$avatar_group = true;
|
||||
@@ -71,37 +49,75 @@ if (isset($_GET['avatar']))
|
||||
if (strpos($filename, '.') == false)
|
||||
{
|
||||
header('HTTP/1.0 403 Forbidden');
|
||||
$exit = true;
|
||||
}
|
||||
|
||||
if (!$exit)
|
||||
{
|
||||
$ext = substr(strrchr($filename, '.'), 1);
|
||||
$stamp = (int) substr(stristr($filename, '_'), 1);
|
||||
$filename = (int) $filename;
|
||||
$exit = set_modified_headers($stamp, $browser);
|
||||
}
|
||||
if (!$exit && !in_array($ext, array('png', 'gif', 'jpg', 'jpeg')))
|
||||
{
|
||||
// no way such an avatar could exist. They are not following the rules, stop the show.
|
||||
header("HTTP/1.0 403 Forbidden");
|
||||
$exit = true;
|
||||
}
|
||||
|
||||
|
||||
if (!$exit)
|
||||
{
|
||||
if (!$filename)
|
||||
if (!empty($cache))
|
||||
{
|
||||
// no way such an avatar could exist. They are not following the rules, stop the show.
|
||||
header("HTTP/1.0 403 Forbidden");
|
||||
$cache->unload();
|
||||
}
|
||||
$db->sql_close();
|
||||
exit;
|
||||
}
|
||||
|
||||
$ext = substr(strrchr($filename, '.'), 1);
|
||||
$stamp = (int) substr(stristr($filename, '_'), 1);
|
||||
$filename = (int) $filename;
|
||||
|
||||
// let's see if we have to send the file at all
|
||||
$last_load = isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) ? strtotime(trim($_SERVER['HTTP_IF_MODIFIED_SINCE'])) : false;
|
||||
if (strpos(strtolower($browser), 'msie 6.0') === false)
|
||||
{
|
||||
if ($last_load !== false && $last_load <= $stamp)
|
||||
{
|
||||
if (@php_sapi_name() === 'CGI')
|
||||
{
|
||||
header('Status: 304 Not Modified', true, 304);
|
||||
}
|
||||
else
|
||||
{
|
||||
header('HTTP/1.0 304 Not Modified', true, 304);
|
||||
}
|
||||
// seems that we need those too ... browsers
|
||||
header('Pragma: public');
|
||||
header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 31536000));
|
||||
exit();
|
||||
}
|
||||
else
|
||||
{
|
||||
send_avatar_to_browser(($avatar_group ? 'g' : '') . $filename . '.' . $ext, $browser);
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $stamp) . ' GMT');
|
||||
}
|
||||
}
|
||||
file_gc();
|
||||
|
||||
if (!in_array($ext, array('png', 'gif', 'jpg', 'jpeg')))
|
||||
{
|
||||
// no way such an avatar could exist. They are not following the rules, stop the show.
|
||||
header("HTTP/1.0 403 Forbidden");
|
||||
if (!empty($cache))
|
||||
{
|
||||
$cache->unload();
|
||||
}
|
||||
$db->sql_close();
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!$filename)
|
||||
{
|
||||
// no way such an avatar could exist. They are not following the rules, stop the show.
|
||||
header("HTTP/1.0 403 Forbidden");
|
||||
if (!empty($cache))
|
||||
{
|
||||
$cache->unload();
|
||||
}
|
||||
$db->sql_close();
|
||||
exit;
|
||||
}
|
||||
|
||||
send_avatar_to_browser(($avatar_group ? 'g' : '') . $filename . '.' . $ext, $browser);
|
||||
|
||||
if (!empty($cache))
|
||||
{
|
||||
$cache->unload();
|
||||
}
|
||||
$db->sql_close();
|
||||
exit;
|
||||
}
|
||||
|
||||
// implicit else: we are not in avatar mode
|
||||
@@ -126,7 +142,7 @@ if (!$config['allow_attachments'] && !$config['allow_pm_attach'])
|
||||
trigger_error('ATTACHMENT_FUNCTIONALITY_DISABLED');
|
||||
}
|
||||
|
||||
$sql = 'SELECT attach_id, in_message, post_msg_id, extension, is_orphan, poster_id, filetime
|
||||
$sql = 'SELECT attach_id, in_message, post_msg_id, extension, is_orphan, poster_id
|
||||
FROM ' . ATTACHMENTS_TABLE . "
|
||||
WHERE attach_id = $download_id";
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
@@ -237,7 +253,7 @@ if (!download_allowed())
|
||||
$download_mode = (int) $extensions[$attachment['extension']]['download_mode'];
|
||||
|
||||
// Fetching filename here to prevent sniffing of filename
|
||||
$sql = 'SELECT attach_id, is_orphan, in_message, post_msg_id, extension, physical_filename, real_filename, mimetype, filetime
|
||||
$sql = 'SELECT attach_id, is_orphan, in_message, post_msg_id, extension, physical_filename, real_filename, mimetype
|
||||
FROM ' . ATTACHMENTS_TABLE . "
|
||||
WHERE attach_id = $download_id";
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
@@ -249,7 +265,7 @@ if (!$attachment)
|
||||
trigger_error('ERROR_NO_ATTACHMENT');
|
||||
}
|
||||
|
||||
$attachment['physical_filename'] = utf8_basename($attachment['physical_filename']);
|
||||
$attachment['physical_filename'] = basename($attachment['physical_filename']);
|
||||
$display_cat = $extensions[$attachment['extension']]['display_cat'];
|
||||
|
||||
if (($display_cat == ATTACHMENT_CATEGORY_IMAGE || $display_cat == ATTACHMENT_CATEGORY_THUMB) && !$user->optionget('viewimg'))
|
||||
@@ -266,7 +282,7 @@ if ($thumbnail)
|
||||
{
|
||||
$attachment['physical_filename'] = 'thumb_' . $attachment['physical_filename'];
|
||||
}
|
||||
else if (($display_cat == ATTACHMENT_CATEGORY_NONE/* || $display_cat == ATTACHMENT_CATEGORY_IMAGE*/) && !$attachment['is_orphan'])
|
||||
else if (($display_cat == ATTACHMENT_CATEGORY_NONE || $display_cat == ATTACHMENT_CATEGORY_IMAGE) && !$attachment['is_orphan'])
|
||||
{
|
||||
// Update download count
|
||||
$sql = 'UPDATE ' . ATTACHMENTS_TABLE . '
|
||||
@@ -275,10 +291,9 @@ else if (($display_cat == ATTACHMENT_CATEGORY_NONE/* || $display_cat == ATTACHME
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
if ($display_cat == ATTACHMENT_CATEGORY_IMAGE && $mode === 'view' && (strpos($attachment['mimetype'], 'image') === 0) && ((strpos(strtolower($user->browser), 'msie') !== false) && (strpos(strtolower($user->browser), 'msie 8.0') === false)))
|
||||
if ($display_cat == ATTACHMENT_CATEGORY_IMAGE && $mode === 'view' && (strpos($attachment['mimetype'], 'image') === 0) && strpos(strtolower($user->browser), 'msie') !== false)
|
||||
{
|
||||
wrap_img_in_html(append_sid($phpbb_root_path . 'download/file.' . $phpEx, 'id=' . $attachment['attach_id']), $attachment['real_filename']);
|
||||
file_gc();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -292,12 +307,12 @@ else
|
||||
}
|
||||
|
||||
redirect($phpbb_root_path . $config['upload_path'] . '/' . $attachment['physical_filename']);
|
||||
file_gc();
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
send_file_to_browser($attachment, $config['upload_path'], $display_cat);
|
||||
file_gc();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -333,7 +348,7 @@ function send_avatar_to_browser($file, $browser)
|
||||
$image_data = @getimagesize($file_path);
|
||||
header('Content-Type: ' . image_type_to_mime_type($image_data[2]));
|
||||
|
||||
if (strpos(strtolower($browser), 'msie') !== false && strpos(strtolower($browser), 'msie 8.0') === false)
|
||||
if (strpos(strtolower($browser), 'msie') !== false)
|
||||
{
|
||||
header('Content-Disposition: attachment; ' . header_filename($file));
|
||||
|
||||
@@ -358,7 +373,7 @@ function send_avatar_to_browser($file, $browser)
|
||||
header("Content-Length: $size");
|
||||
}
|
||||
|
||||
if (@readfile($file_path) == false)
|
||||
if (@readfile($file_path) === false)
|
||||
{
|
||||
$fp = @fopen($file_path, 'rb');
|
||||
|
||||
@@ -376,7 +391,7 @@ function send_avatar_to_browser($file, $browser)
|
||||
}
|
||||
else
|
||||
{
|
||||
header('HTTP/1.0 404 Not Found');
|
||||
header('HTTP/1.0 404 not found');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -463,37 +478,19 @@ function send_file_to_browser($attachment, $upload_dir, $category)
|
||||
*/
|
||||
|
||||
// Send out the Headers. Do not set Content-Disposition to inline please, it is a security measure for users using the Internet Explorer.
|
||||
$is_ie8 = (strpos(strtolower($user->browser), 'msie 8.0') !== false);
|
||||
header('Content-Type: ' . $attachment['mimetype']);
|
||||
|
||||
if ($is_ie8)
|
||||
if (empty($user->browser) || (strpos(strtolower($user->browser), 'msie') !== false))
|
||||
{
|
||||
header('X-Content-Type-Options: nosniff');
|
||||
}
|
||||
|
||||
if ($category == ATTACHMENT_CATEGORY_FLASH && request_var('view', 0) === 1)
|
||||
{
|
||||
// We use content-disposition: inline for flash files and view=1 to let it correctly play with flash player 10 - any other disposition will fail to play inline
|
||||
header('Content-Disposition: inline');
|
||||
header('Content-Disposition: attachment; ' . header_filename(htmlspecialchars_decode($attachment['real_filename'])));
|
||||
if (empty($user->browser) || (strpos(strtolower($user->browser), 'msie 6.0') !== false))
|
||||
{
|
||||
header('expires: -1');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (empty($user->browser) || (!$is_ie8 && (strpos(strtolower($user->browser), 'msie') !== false)))
|
||||
{
|
||||
header('Content-Disposition: attachment; ' . header_filename(htmlspecialchars_decode($attachment['real_filename'])));
|
||||
if (empty($user->browser) || (strpos(strtolower($user->browser), 'msie 6.0') !== false))
|
||||
{
|
||||
header('expires: -1');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
header('Content-Disposition: ' . ((strpos($attachment['mimetype'], 'image') === 0) ? 'inline' : 'attachment') . '; ' . header_filename(htmlspecialchars_decode($attachment['real_filename'])));
|
||||
if ($is_ie8 && (strpos($attachment['mimetype'], 'image') !== 0))
|
||||
{
|
||||
header('X-Download-Options: noopen');
|
||||
}
|
||||
}
|
||||
header('Content-Disposition: ' . ((strpos($attachment['mimetype'], 'image') === 0) ? 'inline' : 'attachment') . '; ' . header_filename(htmlspecialchars_decode($attachment['real_filename'])));
|
||||
}
|
||||
|
||||
if ($size)
|
||||
@@ -501,32 +498,26 @@ function send_file_to_browser($attachment, $upload_dir, $category)
|
||||
header("Content-Length: $size");
|
||||
}
|
||||
|
||||
// Close the db connection before sending the file
|
||||
$db->sql_close();
|
||||
// Try to deliver in chunks
|
||||
@set_time_limit(0);
|
||||
|
||||
if (!set_modified_headers($attachment['filetime'], $user->browser))
|
||||
$fp = @fopen($filename, 'rb');
|
||||
|
||||
if ($fp !== false)
|
||||
{
|
||||
// Try to deliver in chunks
|
||||
@set_time_limit(0);
|
||||
|
||||
$fp = @fopen($filename, 'rb');
|
||||
|
||||
if ($fp !== false)
|
||||
while (!feof($fp))
|
||||
{
|
||||
while (!feof($fp))
|
||||
{
|
||||
echo fread($fp, 8192);
|
||||
}
|
||||
fclose($fp);
|
||||
echo fread($fp, 8192);
|
||||
}
|
||||
else
|
||||
{
|
||||
@readfile($filename);
|
||||
}
|
||||
|
||||
flush();
|
||||
fclose($fp);
|
||||
}
|
||||
file_gc();
|
||||
else
|
||||
{
|
||||
@readfile($filename);
|
||||
}
|
||||
|
||||
flush();
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -658,49 +649,4 @@ function download_allowed()
|
||||
return $allowed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the browser has the file already and set the appropriate headers-
|
||||
* @returns false if a resend is in order.
|
||||
*/
|
||||
function set_modified_headers($stamp, $browser)
|
||||
{
|
||||
// let's see if we have to send the file at all
|
||||
$last_load = isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) ? strtotime(trim($_SERVER['HTTP_IF_MODIFIED_SINCE'])) : false;
|
||||
if ((strpos(strtolower($browser), 'msie 6.0') === false) && (strpos(strtolower($browser), 'msie 8.0') === false))
|
||||
{
|
||||
if ($last_load !== false && $last_load <= $stamp)
|
||||
{
|
||||
if (substr(strtolower(@php_sapi_name()),0,3) === 'cgi')
|
||||
{
|
||||
// in theory, we shouldn't need that due to php doing it. Reality offers a differing opinion, though
|
||||
header('Status: 304 Not Modified', true, 304);
|
||||
}
|
||||
else
|
||||
{
|
||||
header('HTTP/1.0 304 Not Modified', true, 304);
|
||||
}
|
||||
// seems that we need those too ... browsers
|
||||
header('Pragma: public');
|
||||
header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 31536000));
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $stamp) . ' GMT');
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function file_gc()
|
||||
{
|
||||
global $cache, $db;
|
||||
if (!empty($cache))
|
||||
{
|
||||
$cache->unload();
|
||||
}
|
||||
$db->sql_close();
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
0
phpBB/download/index.htm
Normal file → Executable file
0
phpBB/download/index.htm
Normal file → Executable file
@@ -38,28 +38,15 @@ switch ($mode)
|
||||
}
|
||||
|
||||
// Pull the array data from the lang pack
|
||||
$switch_column = $found_switch = false;
|
||||
$help_blocks = array();
|
||||
foreach ($user->help as $help_ary)
|
||||
{
|
||||
if ($help_ary[0] == '--')
|
||||
{
|
||||
if ($help_ary[1] == '--')
|
||||
{
|
||||
$switch_column = true;
|
||||
$found_switch = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
$template->assign_block_vars('faq_block', array(
|
||||
'BLOCK_TITLE' => $help_ary[1],
|
||||
'SWITCH_COLUMN' => $switch_column,
|
||||
));
|
||||
'BLOCK_TITLE' => $help_ary[1])
|
||||
);
|
||||
|
||||
if ($switch_column)
|
||||
{
|
||||
$switch_column = false;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -71,13 +58,11 @@ foreach ($user->help as $help_ary)
|
||||
|
||||
// Lets build a page ...
|
||||
$template->assign_vars(array(
|
||||
'L_FAQ_TITLE' => $l_title,
|
||||
'L_BACK_TO_TOP' => $user->lang['BACK_TO_TOP'],
|
||||
'L_FAQ_TITLE' => $l_title,
|
||||
'L_BACK_TO_TOP' => $user->lang['BACK_TO_TOP'])
|
||||
);
|
||||
|
||||
'SWITCH_COLUMN_MANUALLY' => (!$found_switch) ? true : false,
|
||||
));
|
||||
|
||||
page_header($l_title, false);
|
||||
page_header($l_title);
|
||||
|
||||
$template->set_filenames(array(
|
||||
'body' => 'faq_body.html')
|
||||
|
1064
phpBB/feed.php
1064
phpBB/feed.php
File diff suppressed because it is too large
Load Diff
0
phpBB/images/avatars/upload/.htaccess
Normal file → Executable file
0
phpBB/images/avatars/upload/.htaccess
Normal file → Executable file
@@ -1,84 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package acm
|
||||
* @version $Id$
|
||||
* @copyright (c) 2005, 2009 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
// Include the abstract base
|
||||
if (!class_exists('acm_memory'))
|
||||
{
|
||||
require("{$phpbb_root_path}includes/acm/acm_memory.$phpEx");
|
||||
}
|
||||
|
||||
/**
|
||||
* ACM for APC
|
||||
* @package acm
|
||||
*/
|
||||
class acm extends acm_memory
|
||||
{
|
||||
var $extension = 'apc';
|
||||
|
||||
/**
|
||||
* Purge cache data
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function purge()
|
||||
{
|
||||
apc_clear_cache('user');
|
||||
|
||||
parent::purge();
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch an item from the cache
|
||||
*
|
||||
* @access protected
|
||||
* @param string $var Cache key
|
||||
* @return mixed Cached data
|
||||
*/
|
||||
function _read($var)
|
||||
{
|
||||
return apc_fetch($this->key_prefix . $var);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store data in the cache
|
||||
*
|
||||
* @access protected
|
||||
* @param string $var Cache key
|
||||
* @param mixed $data Data to store
|
||||
* @param int $ttl Time-to-live of cached data
|
||||
* @return bool True if the operation succeeded
|
||||
*/
|
||||
function _write($var, $data, $ttl = 2592000)
|
||||
{
|
||||
return apc_store($this->key_prefix . $var, $data, $ttl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove an item from the cache
|
||||
*
|
||||
* @access protected
|
||||
* @param string $var Cache key
|
||||
* @return bool True if the operation succeeded
|
||||
*/
|
||||
function _delete($var)
|
||||
{
|
||||
return apc_delete($this->key_prefix . $var);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@@ -1,120 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package acm
|
||||
* @version $Id$
|
||||
* @copyright (c) 2005, 2009 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
// Include the abstract base
|
||||
if (!class_exists('acm_memory'))
|
||||
{
|
||||
require("{$phpbb_root_path}includes/acm/acm_memory.$phpEx");
|
||||
}
|
||||
|
||||
/**
|
||||
* ACM for eAccelerator
|
||||
* @package acm
|
||||
* @todo Missing locks from destroy() talk with David
|
||||
*/
|
||||
class acm extends acm_memory
|
||||
{
|
||||
var $extension = 'eaccelerator';
|
||||
|
||||
var $serialize_header = '#phpbb-serialized#';
|
||||
|
||||
/**
|
||||
* Purge cache data
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function purge()
|
||||
{
|
||||
foreach (eaccelerator_list_keys() as $var)
|
||||
{
|
||||
// @todo Check why the substr()
|
||||
// @todo Only unset vars matching $this->key_prefix
|
||||
eaccelerator_rm(substr($var['name'], 1));
|
||||
}
|
||||
|
||||
parent::purge();
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform cache garbage collection
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function tidy()
|
||||
{
|
||||
eaccelerator_gc();
|
||||
|
||||
set_config('cache_last_gc', time(), true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch an item from the cache
|
||||
*
|
||||
* @access protected
|
||||
* @param string $var Cache key
|
||||
* @return mixed Cached data
|
||||
*/
|
||||
function _read($var)
|
||||
{
|
||||
$result = eaccelerator_get($this->key_prefix . $var);
|
||||
|
||||
if ($result === null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Handle serialized objects
|
||||
if (is_string($result) && strpos($result, $this->serialize_header . 'O:') === 0)
|
||||
{
|
||||
$result = unserialize(substr($result, strlen($this->serialize_header)));
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Store data in the cache
|
||||
*
|
||||
* @access protected
|
||||
* @param string $var Cache key
|
||||
* @param mixed $data Data to store
|
||||
* @param int $ttl Time-to-live of cached data
|
||||
* @return bool True if the operation succeeded
|
||||
*/
|
||||
function _write($var, $data, $ttl = 2592000)
|
||||
{
|
||||
// Serialize objects and make them easy to detect
|
||||
$data = (is_object($data)) ? $this->serialize_header . serialize($data) : $data;
|
||||
|
||||
return eaccelerator_put($this->key_prefix . $var, $data, $ttl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove an item from the cache
|
||||
*
|
||||
* @access protected
|
||||
* @param string $var Cache key
|
||||
* @return bool True if the operation succeeded
|
||||
*/
|
||||
function _delete($var)
|
||||
{
|
||||
return eaccelerator_rm($this->key_prefix . $var);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* @package acm
|
||||
* @version $Id$
|
||||
* @copyright (c) 2005, 2009 phpBB Group
|
||||
* @copyright (c) 2005 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
@@ -44,7 +44,17 @@ class acm
|
||||
*/
|
||||
function load()
|
||||
{
|
||||
return $this->_read('data_global');
|
||||
global $phpEx;
|
||||
if (file_exists($this->cache_dir . 'data_global.' . $phpEx))
|
||||
{
|
||||
@include($this->cache_dir . 'data_global.' . $phpEx);
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -76,18 +86,24 @@ class acm
|
||||
|
||||
global $phpEx;
|
||||
|
||||
if (!$this->_write('data_global'))
|
||||
if ($fp = @fopen($this->cache_dir . 'data_global.' . $phpEx, 'wb'))
|
||||
{
|
||||
@flock($fp, LOCK_EX);
|
||||
fwrite($fp, "<?php\n\$this->vars = " . var_export($this->vars, true) . ";\n\n\$this->var_expires = " . var_export($this->var_expires, true) . "\n?>");
|
||||
@flock($fp, LOCK_UN);
|
||||
fclose($fp);
|
||||
|
||||
@chmod($this->cache_dir . 'data_global.' . $phpEx, 0666);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Now, this occurred how often? ... phew, just tell the user then...
|
||||
if (!@is_writable($this->cache_dir))
|
||||
{
|
||||
// We need to use die() here, because else we may encounter an infinite loop (the message handler calls $cache->unload())
|
||||
die($this->cache_dir . ' is NOT writable.');
|
||||
exit;
|
||||
trigger_error($this->cache_dir . ' is NOT writable.', E_USER_ERROR);
|
||||
}
|
||||
|
||||
die('Not able to open ' . $this->cache_dir . 'data_global.' . $phpEx);
|
||||
exit;
|
||||
trigger_error('Not able to open ' . $this->cache_dir . 'data_global.' . $phpEx, E_USER_ERROR);
|
||||
}
|
||||
|
||||
$this->is_modified = false;
|
||||
@@ -107,8 +123,6 @@ class acm
|
||||
return;
|
||||
}
|
||||
|
||||
$time = time();
|
||||
|
||||
while (($entry = readdir($dir)) !== false)
|
||||
{
|
||||
if (!preg_match('/^(sql_|data_(?!global))/', $entry))
|
||||
@@ -116,20 +130,9 @@ class acm
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!($handle = @fopen($this->cache_dir . $entry, 'rb')))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Skip the PHP header
|
||||
fgets($handle);
|
||||
|
||||
// Skip expiration
|
||||
$expires = (int) fgets($handle);
|
||||
|
||||
fclose($handle);
|
||||
|
||||
if ($time >= $expires)
|
||||
$expired = true;
|
||||
@include($this->cache_dir . $entry);
|
||||
if ($expired)
|
||||
{
|
||||
$this->remove_file($this->cache_dir . $entry);
|
||||
}
|
||||
@@ -145,13 +148,13 @@ class acm
|
||||
|
||||
foreach ($this->var_expires as $var_name => $expires)
|
||||
{
|
||||
if ($time >= $expires)
|
||||
if (time() > $expires)
|
||||
{
|
||||
$this->destroy($var_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
set_config('cache_last_gc', time(), true);
|
||||
}
|
||||
|
||||
@@ -169,7 +172,8 @@ class acm
|
||||
return false;
|
||||
}
|
||||
|
||||
return $this->_read('data' . $var_name);
|
||||
@include($this->cache_dir . "data{$var_name}.$phpEx");
|
||||
return (isset($data)) ? $data : false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -184,7 +188,17 @@ class acm
|
||||
{
|
||||
if ($var_name[0] == '_')
|
||||
{
|
||||
$this->_write('data' . $var_name, $var, time() + $ttl);
|
||||
global $phpEx;
|
||||
|
||||
if ($fp = @fopen($this->cache_dir . "data{$var_name}.$phpEx", 'wb'))
|
||||
{
|
||||
@flock($fp, LOCK_EX);
|
||||
fwrite($fp, "<?php\n\$expired = (time() > " . (time() + $ttl) . ") ? true : false;\nif (\$expired) { return; }\n\n\$data = " . var_export($var, true) . ";\n?>");
|
||||
@flock($fp, LOCK_UN);
|
||||
fclose($fp);
|
||||
|
||||
@chmod($this->cache_dir . "data{$var_name}.$phpEx", 0666);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -259,31 +273,32 @@ class acm
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!($handle = @fopen($this->cache_dir . $entry, 'rb')))
|
||||
// The following method is more failproof than simply assuming the query is on line 3 (which it should be)
|
||||
$check_line = @file_get_contents($this->cache_dir . $entry);
|
||||
|
||||
if (empty($check_line))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Skip the PHP header
|
||||
fgets($handle);
|
||||
|
||||
// Skip expiration
|
||||
fgets($handle);
|
||||
|
||||
// Grab the query, remove the LF
|
||||
$query = substr(fgets($handle), 0, -1);
|
||||
|
||||
fclose($handle);
|
||||
// Now get the contents between /* and */
|
||||
$check_line = substr($check_line, strpos($check_line, '/* ') + 3, strpos($check_line, ' */') - strpos($check_line, '/* ') - 3);
|
||||
|
||||
$found = false;
|
||||
foreach ($table as $check_table)
|
||||
{
|
||||
// Better catch partial table names than no table names. ;)
|
||||
if (strpos($query, $check_table) !== false)
|
||||
if (strpos($check_line, $check_table) !== false)
|
||||
{
|
||||
$this->remove_file($this->cache_dir . $entry);
|
||||
$found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($found)
|
||||
{
|
||||
$this->remove_file($this->cache_dir . $entry);
|
||||
}
|
||||
}
|
||||
closedir($dir);
|
||||
|
||||
@@ -341,16 +356,29 @@ class acm
|
||||
*/
|
||||
function sql_load($query)
|
||||
{
|
||||
global $phpEx;
|
||||
|
||||
// Remove extra spaces and tabs
|
||||
$query = preg_replace('/[\n\r\s\t]+/', ' ', $query);
|
||||
$query_id = sizeof($this->sql_rowset);
|
||||
|
||||
if (($rowset = $this->_read('sql_' . md5($query))) === false)
|
||||
if (!file_exists($this->cache_dir . 'sql_' . md5($query) . ".$phpEx"))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$query_id = sizeof($this->sql_rowset);
|
||||
$this->sql_rowset[$query_id] = $rowset;
|
||||
@include($this->cache_dir . 'sql_' . md5($query) . ".$phpEx");
|
||||
|
||||
if (!isset($expired))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if ($expired)
|
||||
{
|
||||
$this->remove_file($this->cache_dir . 'sql_' . md5($query) . ".$phpEx", true);
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->sql_row_pointer[$query_id] = 0;
|
||||
|
||||
return $query_id;
|
||||
@@ -361,23 +389,35 @@ class acm
|
||||
*/
|
||||
function sql_save($query, &$query_result, $ttl)
|
||||
{
|
||||
global $db;
|
||||
global $db, $phpEx;
|
||||
|
||||
// Remove extra spaces and tabs
|
||||
$query = preg_replace('/[\n\r\s\t]+/', ' ', $query);
|
||||
$filename = $this->cache_dir . 'sql_' . md5($query) . '.' . $phpEx;
|
||||
|
||||
$query_id = sizeof($this->sql_rowset);
|
||||
$this->sql_rowset[$query_id] = array();
|
||||
$this->sql_row_pointer[$query_id] = 0;
|
||||
|
||||
while ($row = $db->sql_fetchrow($query_result))
|
||||
if ($fp = @fopen($filename, 'wb'))
|
||||
{
|
||||
$this->sql_rowset[$query_id][] = $row;
|
||||
}
|
||||
$db->sql_freeresult($query_result);
|
||||
@flock($fp, LOCK_EX);
|
||||
|
||||
$query_id = sizeof($this->sql_rowset);
|
||||
$this->sql_rowset[$query_id] = array();
|
||||
$this->sql_row_pointer[$query_id] = 0;
|
||||
|
||||
while ($row = $db->sql_fetchrow($query_result))
|
||||
{
|
||||
$this->sql_rowset[$query_id][] = $row;
|
||||
}
|
||||
$db->sql_freeresult($query_result);
|
||||
|
||||
$file = "<?php\n\n/* " . str_replace('*/', '*\/', $query) . " */\n";
|
||||
$file .= "\n\$expired = (time() > " . (time() + $ttl) . ") ? true : false;\nif (\$expired) { return; }\n";
|
||||
|
||||
fwrite($fp, $file . "\n\$this->sql_rowset[\$query_id] = " . var_export($this->sql_rowset[$query_id], true) . ";\n?>");
|
||||
@flock($fp, LOCK_UN);
|
||||
fclose($fp);
|
||||
|
||||
@chmod($filename, 0666);
|
||||
|
||||
if ($this->_write('sql_' . md5($query), $this->sql_rowset[$query_id], $ttl + time(), $query))
|
||||
{
|
||||
$query_result = $query_id;
|
||||
}
|
||||
}
|
||||
@@ -446,268 +486,12 @@ class acm
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read cached data from a specified file
|
||||
*
|
||||
* @access private
|
||||
* @param string $filename Filename to write
|
||||
* @return mixed False if an error was encountered, otherwise the data type of the cached data
|
||||
*/
|
||||
function _read($filename)
|
||||
{
|
||||
global $phpEx;
|
||||
|
||||
$file = "{$this->cache_dir}$filename.$phpEx";
|
||||
|
||||
$type = substr($filename, 0, strpos($filename, '_'));
|
||||
|
||||
if (!file_exists($file))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!($handle = @fopen($file, 'rb')))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Skip the PHP header
|
||||
fgets($handle);
|
||||
|
||||
if ($filename == 'data_global')
|
||||
{
|
||||
$this->vars = $this->var_expires = array();
|
||||
|
||||
$time = time();
|
||||
|
||||
while (($expires = (int) fgets($handle)) && !feof($handle))
|
||||
{
|
||||
// Number of bytes of data
|
||||
$bytes = substr(fgets($handle), 0, -1);
|
||||
|
||||
if (!is_numeric($bytes) || ($bytes = (int) $bytes) === 0)
|
||||
{
|
||||
// We cannot process the file without a valid number of bytes
|
||||
// so we discard it
|
||||
fclose($handle);
|
||||
|
||||
$this->vars = $this->var_expires = array();
|
||||
$this->is_modified = false;
|
||||
|
||||
$this->remove_file($file);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($time >= $expires)
|
||||
{
|
||||
fseek($handle, $bytes, SEEK_CUR);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
$var_name = substr(fgets($handle), 0, -1);
|
||||
|
||||
// Read the length of bytes that consists of data.
|
||||
$data = fread($handle, $bytes - strlen($var_name));
|
||||
$data = @unserialize($data);
|
||||
|
||||
// Don't use the data if it was invalid
|
||||
if ($data !== false)
|
||||
{
|
||||
$this->vars[$var_name] = $data;
|
||||
$this->var_expires[$var_name] = $expires;
|
||||
}
|
||||
|
||||
// Absorb the LF
|
||||
fgets($handle);
|
||||
}
|
||||
|
||||
fclose($handle);
|
||||
|
||||
$this->is_modified = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$data = false;
|
||||
$line = 0;
|
||||
|
||||
while (($buffer = fgets($handle)) && !feof($handle))
|
||||
{
|
||||
$buffer = substr($buffer, 0, -1); // Remove the LF
|
||||
|
||||
// $buffer is only used to read integers
|
||||
// if it is non numeric we have an invalid
|
||||
// cache file, which we will now remove.
|
||||
if (!is_numeric($buffer))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if ($line == 0)
|
||||
{
|
||||
$expires = (int) $buffer;
|
||||
|
||||
if (time() >= $expires)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if ($type == 'sql')
|
||||
{
|
||||
// Skip the query
|
||||
fgets($handle);
|
||||
}
|
||||
}
|
||||
else if ($line == 1)
|
||||
{
|
||||
$bytes = (int) $buffer;
|
||||
|
||||
// Never should have 0 bytes
|
||||
if (!$bytes)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
// Grab the serialized data
|
||||
$data = fread($handle, $bytes);
|
||||
|
||||
// Read 1 byte, to trigger EOF
|
||||
fread($handle, 1);
|
||||
|
||||
if (!feof($handle))
|
||||
{
|
||||
// Somebody tampered with our data
|
||||
$data = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Something went wrong
|
||||
break;
|
||||
}
|
||||
$line++;
|
||||
}
|
||||
fclose($handle);
|
||||
|
||||
// unserialize if we got some data
|
||||
$data = ($data !== false) ? @unserialize($data) : $data;
|
||||
|
||||
if ($data === false)
|
||||
{
|
||||
$this->remove_file($file);
|
||||
return false;
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Write cache data to a specified file
|
||||
*
|
||||
* 'data_global' is a special case and the generated format is different for this file:
|
||||
* <code>
|
||||
* <?php exit; ?>
|
||||
* (expiration)
|
||||
* (length of var and serialised data)
|
||||
* (var)
|
||||
* (serialised data)
|
||||
* ... (repeat)
|
||||
* </code>
|
||||
*
|
||||
* The other files have a similar format:
|
||||
* <code>
|
||||
* <?php exit; ?>
|
||||
* (expiration)
|
||||
* (query) [SQL files only]
|
||||
* (length of serialised data)
|
||||
* (serialised data)
|
||||
* </code>
|
||||
*
|
||||
* @access private
|
||||
* @param string $filename Filename to write
|
||||
* @param mixed $data Data to store
|
||||
* @param int $expires Timestamp when the data expires
|
||||
* @param string $query Query when caching SQL queries
|
||||
* @return bool True if the file was successfully created, otherwise false
|
||||
*/
|
||||
function _write($filename, $data = null, $expires = 0, $query = '')
|
||||
{
|
||||
global $phpEx;
|
||||
|
||||
$file = "{$this->cache_dir}$filename.$phpEx";
|
||||
|
||||
if ($handle = @fopen($file, 'wb'))
|
||||
{
|
||||
@flock($handle, LOCK_EX);
|
||||
|
||||
// File header
|
||||
fwrite($handle, '<' . '?php exit; ?' . '>');
|
||||
|
||||
if ($filename == 'data_global')
|
||||
{
|
||||
// Global data is a different format
|
||||
foreach ($this->vars as $var => $data)
|
||||
{
|
||||
if (strpos($var, "\r") !== false || strpos($var, "\n") !== false)
|
||||
{
|
||||
// CR/LF would cause fgets() to read the cache file incorrectly
|
||||
// do not cache test entries, they probably won't be read back
|
||||
// the cache keys should really be alphanumeric with a few symbols.
|
||||
continue;
|
||||
}
|
||||
$data = serialize($data);
|
||||
|
||||
// Write out the expiration time
|
||||
fwrite($handle, "\n" . $this->var_expires[$var] . "\n");
|
||||
|
||||
// Length of the remaining data for this var (ignoring two LF's)
|
||||
fwrite($handle, strlen($data . $var) . "\n");
|
||||
fwrite($handle, $var . "\n");
|
||||
fwrite($handle, $data);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite($handle, "\n" . $expires . "\n");
|
||||
|
||||
if (strpos($filename, 'sql_') === 0)
|
||||
{
|
||||
fwrite($handle, $query . "\n");
|
||||
}
|
||||
$data = serialize($data);
|
||||
|
||||
fwrite($handle, strlen($data) . "\n");
|
||||
fwrite($handle, $data);
|
||||
}
|
||||
|
||||
@flock($handle, LOCK_UN);
|
||||
fclose($handle);
|
||||
|
||||
if (!function_exists('phpbb_chmod'))
|
||||
{
|
||||
global $phpbb_root_path;
|
||||
include($phpbb_root_path . 'includes/functions.' . $phpEx);
|
||||
}
|
||||
|
||||
phpbb_chmod($file, CHMOD_READ | CHMOD_WRITE);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes/unlinks file
|
||||
*/
|
||||
function remove_file($filename, $check = false)
|
||||
{
|
||||
if ($check && !@is_writable($this->cache_dir))
|
||||
if ($check && !@is_writeable($this->cache_dir))
|
||||
{
|
||||
// E_USER_ERROR - not using language entry - intended.
|
||||
trigger_error('Unable to remove files within ' . $this->cache_dir . '. Please check directory permissions.', E_USER_ERROR);
|
||||
|
@@ -1,124 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package acm
|
||||
* @version $Id$
|
||||
* @copyright (c) 2005, 2009 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
// Include the abstract base
|
||||
if (!class_exists('acm_memory'))
|
||||
{
|
||||
require("{$phpbb_root_path}includes/acm/acm_memory.$phpEx");
|
||||
}
|
||||
|
||||
if (!defined('PHPBB_ACM_MEMCACHE_PORT'))
|
||||
{
|
||||
define('PHPBB_ACM_MEMCACHE_PORT', 11211);
|
||||
}
|
||||
|
||||
if (!defined('PHPBB_ACM_MEMCACHE_COMPRESS'))
|
||||
{
|
||||
define('PHPBB_ACM_MEMCACHE_COMPRESS', false);
|
||||
}
|
||||
|
||||
if (!defined('PHPBB_ACM_MEMCACHE_HOST'))
|
||||
{
|
||||
define('PHPBB_ACM_MEMCACHE_HOST', 'localhost');
|
||||
}
|
||||
|
||||
/**
|
||||
* ACM for Memcached
|
||||
* @package acm
|
||||
*/
|
||||
class acm extends acm_memory
|
||||
{
|
||||
var $extension = 'memcache';
|
||||
|
||||
var $memcache;
|
||||
var $flags = 0;
|
||||
|
||||
function acm()
|
||||
{
|
||||
// Call the parent constructor
|
||||
parent::acm_memory();
|
||||
|
||||
$this->memcache = new Memcache;
|
||||
$this->memcache->connect(PHPBB_ACM_MEMCACHE_HOST, PHPBB_ACM_MEMCACHE_PORT);
|
||||
$this->flags = (PHPBB_ACM_MEMCACHE_COMPRESS) ? MEMCACHE_COMPRESSED : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the cache resources
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function unload()
|
||||
{
|
||||
parent::unload();
|
||||
|
||||
$this->memcache->close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Purge cache data
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function purge()
|
||||
{
|
||||
$this->memcache->flush();
|
||||
|
||||
parent::purge();
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch an item from the cache
|
||||
*
|
||||
* @access protected
|
||||
* @param string $var Cache key
|
||||
* @return mixed Cached data
|
||||
*/
|
||||
function _read($var)
|
||||
{
|
||||
return $this->memcache->get($this->key_prefix . $var);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store data in the cache
|
||||
*
|
||||
* @access protected
|
||||
* @param string $var Cache key
|
||||
* @param mixed $data Data to store
|
||||
* @param int $ttl Time-to-live of cached data
|
||||
* @return bool True if the operation succeeded
|
||||
*/
|
||||
function _write($var, $data, $ttl = 2592000)
|
||||
{
|
||||
return $this->memcache->set($this->key_prefix . $var, $data, $this->flags, $ttl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove an item from the cache
|
||||
*
|
||||
* @access protected
|
||||
* @param string $var Cache key
|
||||
* @return bool True if the operation succeeded
|
||||
*/
|
||||
function _delete($var)
|
||||
{
|
||||
return $this->memcache->delete($this->key_prefix . $var);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@@ -1,426 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package acm
|
||||
* @version $Id$
|
||||
* @copyright (c) 2005 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* ACM Abstract Memory Class
|
||||
* @package acm
|
||||
*/
|
||||
class acm_memory
|
||||
{
|
||||
var $key_prefix;
|
||||
|
||||
var $vars = array();
|
||||
var $is_modified = false;
|
||||
|
||||
var $sql_rowset = array();
|
||||
var $sql_row_pointer = array();
|
||||
var $cache_dir = '';
|
||||
|
||||
/**
|
||||
* Set cache path
|
||||
*/
|
||||
function acm_memory()
|
||||
{
|
||||
global $phpbb_root_path, $dbname, $table_prefix;
|
||||
|
||||
$this->cache_dir = $phpbb_root_path . 'cache/';
|
||||
$this->key_prefix = substr(md5($dbname . $table_prefix), 0, 8) . '_';
|
||||
|
||||
if (!isset($this->extension) || !extension_loaded($this->extension))
|
||||
{
|
||||
global $acm_type;
|
||||
|
||||
trigger_error("Could not find required extension [{$this->extension}] for the ACM module $acm_type.", E_USER_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Load global cache
|
||||
*/
|
||||
function load()
|
||||
{
|
||||
// grab the global cache
|
||||
$this->vars = $this->_read('global');
|
||||
|
||||
if ($this->vars !== false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload cache object
|
||||
*/
|
||||
function unload()
|
||||
{
|
||||
$this->save();
|
||||
unset($this->vars);
|
||||
unset($this->sql_rowset);
|
||||
unset($this->sql_row_pointer);
|
||||
|
||||
$this->vars = array();
|
||||
$this->sql_rowset = array();
|
||||
$this->sql_row_pointer = array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Save modified objects
|
||||
*/
|
||||
function save()
|
||||
{
|
||||
if (!$this->is_modified)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$this->_write('global', $this->vars, 2592000);
|
||||
|
||||
$this->is_modified = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tidy cache
|
||||
*/
|
||||
function tidy()
|
||||
{
|
||||
// cache has auto GC, no need to have any code here :)
|
||||
|
||||
set_config('cache_last_gc', time(), true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get saved cache object
|
||||
*/
|
||||
function get($var_name)
|
||||
{
|
||||
if ($var_name[0] == '_')
|
||||
{
|
||||
if (!$this->_exists($var_name))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return $this->_read($var_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
return ($this->_exists($var_name)) ? $this->vars[$var_name] : false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Put data into cache
|
||||
*/
|
||||
function put($var_name, $var, $ttl = 2592000)
|
||||
{
|
||||
if ($var_name[0] == '_')
|
||||
{
|
||||
$this->_write($var_name, $var, $ttl);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->vars[$var_name] = $var;
|
||||
$this->is_modified = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Purge cache data
|
||||
*/
|
||||
function purge()
|
||||
{
|
||||
// Purge all phpbb cache files
|
||||
$dir = @opendir($this->cache_dir);
|
||||
|
||||
if (!$dir)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
while (($entry = readdir($dir)) !== false)
|
||||
{
|
||||
if (strpos($entry, 'sql_') !== 0 && strpos($entry, 'data_') !== 0 && strpos($entry, 'ctpl_') !== 0 && strpos($entry, 'tpl_') !== 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->remove_file($this->cache_dir . $entry);
|
||||
}
|
||||
closedir($dir);
|
||||
|
||||
unset($this->vars);
|
||||
unset($this->sql_rowset);
|
||||
unset($this->sql_row_pointer);
|
||||
|
||||
$this->vars = array();
|
||||
$this->sql_rowset = array();
|
||||
$this->sql_row_pointer = array();
|
||||
|
||||
$this->is_modified = false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Destroy cache data
|
||||
*/
|
||||
function destroy($var_name, $table = '')
|
||||
{
|
||||
if ($var_name == 'sql' && !empty($table))
|
||||
{
|
||||
if (!is_array($table))
|
||||
{
|
||||
$table = array($table);
|
||||
}
|
||||
|
||||
foreach ($table as $table_name)
|
||||
{
|
||||
// gives us the md5s that we want
|
||||
$temp = $this->_read('sql_' . $table_name);
|
||||
|
||||
if ($temp === false)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// delete each query ref
|
||||
foreach ($temp as $md5_id => $void)
|
||||
{
|
||||
$this->_delete('sql_' . $md5_id);
|
||||
}
|
||||
|
||||
// delete the table ref
|
||||
$this->_delete('sql_' . $table_name);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$this->_exists($var_name))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ($var_name[0] == '_')
|
||||
{
|
||||
$this->_delete($var_name);
|
||||
}
|
||||
else if (isset($this->vars[$var_name]))
|
||||
{
|
||||
$this->is_modified = true;
|
||||
unset($this->vars[$var_name]);
|
||||
|
||||
// We save here to let the following cache hits succeed
|
||||
$this->save();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given cache entry exist
|
||||
*/
|
||||
function _exists($var_name)
|
||||
{
|
||||
if ($var_name[0] == '_')
|
||||
{
|
||||
return $this->_isset($var_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!sizeof($this->vars))
|
||||
{
|
||||
$this->load();
|
||||
}
|
||||
|
||||
return isset($this->vars[$var_name]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Load cached sql query
|
||||
*/
|
||||
function sql_load($query)
|
||||
{
|
||||
// Remove extra spaces and tabs
|
||||
$query = preg_replace('/[\n\r\s\t]+/', ' ', $query);
|
||||
$query_id = sizeof($this->sql_rowset);
|
||||
|
||||
if (($result = $this->_read('sql_' . md5($query))) === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->sql_rowset[$query_id] = $result;
|
||||
$this->sql_row_pointer[$query_id] = 0;
|
||||
|
||||
return $query_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Save sql query
|
||||
*/
|
||||
function sql_save($query, &$query_result, $ttl)
|
||||
{
|
||||
global $db;
|
||||
|
||||
// Remove extra spaces and tabs
|
||||
$query = preg_replace('/[\n\r\s\t]+/', ' ', $query);
|
||||
$hash = md5($query);
|
||||
|
||||
// determine which tables this query belongs to
|
||||
// Some queries use backticks, namely the get_database_size() query
|
||||
// don't check for conformity, the SQL would error and not reach here.
|
||||
if (!preg_match('/FROM \\(?(`?\\w+`?(?: \\w+)?(?:, ?`?\\w+`?(?: \\w+)?)*)\\)?/', $query, $regs))
|
||||
{
|
||||
// Bail out if the match fails.
|
||||
return;
|
||||
}
|
||||
$tables = array_map('trim', explode(',', $regs[1]));
|
||||
|
||||
foreach ($tables as $table_name)
|
||||
{
|
||||
// Remove backticks
|
||||
$table_name = ($table_name[0] == '`') ? substr($table_name, 1, -1) : $table_name;
|
||||
|
||||
if (($pos = strpos($table_name, ' ')) !== false)
|
||||
{
|
||||
$table_name = substr($table_name, 0, $pos);
|
||||
}
|
||||
|
||||
$temp = $this->_read('sql_' . $table_name);
|
||||
|
||||
if ($temp === false)
|
||||
{
|
||||
$temp = array();
|
||||
}
|
||||
|
||||
$temp[$hash] = true;
|
||||
|
||||
// This must never expire
|
||||
$this->_write('sql_' . $table_name, $temp, 0);
|
||||
}
|
||||
|
||||
// store them in the right place
|
||||
$query_id = sizeof($this->sql_rowset);
|
||||
$this->sql_rowset[$query_id] = array();
|
||||
$this->sql_row_pointer[$query_id] = 0;
|
||||
|
||||
while ($row = $db->sql_fetchrow($query_result))
|
||||
{
|
||||
$this->sql_rowset[$query_id][] = $row;
|
||||
}
|
||||
$db->sql_freeresult($query_result);
|
||||
|
||||
$this->_write('sql_' . $hash, $this->sql_rowset[$query_id], $ttl);
|
||||
|
||||
$query_result = $query_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ceck if a given sql query exist in cache
|
||||
*/
|
||||
function sql_exists($query_id)
|
||||
{
|
||||
return isset($this->sql_rowset[$query_id]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch row from cache (database)
|
||||
*/
|
||||
function sql_fetchrow($query_id)
|
||||
{
|
||||
if ($this->sql_row_pointer[$query_id] < sizeof($this->sql_rowset[$query_id]))
|
||||
{
|
||||
return $this->sql_rowset[$query_id][$this->sql_row_pointer[$query_id]++];
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch a field from the current row of a cached database result (database)
|
||||
*/
|
||||
function sql_fetchfield($query_id, $field)
|
||||
{
|
||||
if ($this->sql_row_pointer[$query_id] < sizeof($this->sql_rowset[$query_id]))
|
||||
{
|
||||
return (isset($this->sql_rowset[$query_id][$this->sql_row_pointer[$query_id]][$field])) ? $this->sql_rowset[$query_id][$this->sql_row_pointer[$query_id]][$field] : false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Seek a specific row in an a cached database result (database)
|
||||
*/
|
||||
function sql_rowseek($rownum, $query_id)
|
||||
{
|
||||
if ($rownum >= sizeof($this->sql_rowset[$query_id]))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->sql_row_pointer[$query_id] = $rownum;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Free memory used for a cached database result (database)
|
||||
*/
|
||||
function sql_freeresult($query_id)
|
||||
{
|
||||
if (!isset($this->sql_rowset[$query_id]))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
unset($this->sql_rowset[$query_id]);
|
||||
unset($this->sql_row_pointer[$query_id]);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes/unlinks file
|
||||
*/
|
||||
function remove_file($filename, $check = false)
|
||||
{
|
||||
if ($check && !@is_writable($this->cache_dir))
|
||||
{
|
||||
// E_USER_ERROR - not using language entry - intended.
|
||||
trigger_error('Unable to remove files within ' . $this->cache_dir . '. Please check directory permissions.', E_USER_ERROR);
|
||||
}
|
||||
|
||||
return @unlink($filename);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a cache var exists
|
||||
*
|
||||
* @access protected
|
||||
* @param string $var Cache key
|
||||
* @return bool True if it exists, otherwise false
|
||||
*/
|
||||
function _isset($var)
|
||||
{
|
||||
// Most caches don't need to check
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@@ -1,156 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package acm
|
||||
* @version $Id$
|
||||
* @copyright (c) 2005, 2009 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* ACM Null Caching
|
||||
* @package acm
|
||||
*/
|
||||
class acm
|
||||
{
|
||||
/**
|
||||
* Set cache path
|
||||
*/
|
||||
function acm()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Load global cache
|
||||
*/
|
||||
function load()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload cache object
|
||||
*/
|
||||
function unload()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Save modified objects
|
||||
*/
|
||||
function save()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Tidy cache
|
||||
*/
|
||||
function tidy()
|
||||
{
|
||||
// This cache always has a tidy room.
|
||||
set_config('cache_last_gc', time(), true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get saved cache object
|
||||
*/
|
||||
function get($var_name)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Put data into cache
|
||||
*/
|
||||
function put($var_name, $var, $ttl = 0)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Purge cache data
|
||||
*/
|
||||
function purge()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroy cache data
|
||||
*/
|
||||
function destroy($var_name, $table = '')
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given cache entry exist
|
||||
*/
|
||||
function _exists($var_name)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load cached sql query
|
||||
*/
|
||||
function sql_load($query)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Save sql query
|
||||
*/
|
||||
function sql_save($query, &$query_result, $ttl)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Ceck if a given sql query exist in cache
|
||||
*/
|
||||
function sql_exists($query_id)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch row from cache (database)
|
||||
*/
|
||||
function sql_fetchrow($query_id)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch a field from the current row of a cached database result (database)
|
||||
*/
|
||||
function sql_fetchfield($query_id, $field)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Seek a specific row in an a cached database result (database)
|
||||
*/
|
||||
function sql_rowseek($rownum, $query_id)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Free memory used for a cached database result (database)
|
||||
*/
|
||||
function sql_freeresult($query_id)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@@ -1,121 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package acm
|
||||
* @version $Id$
|
||||
* @copyright (c) 2005, 2009 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
// Include the abstract base
|
||||
if (!class_exists('acm_memory'))
|
||||
{
|
||||
require("{$phpbb_root_path}includes/acm/acm_memory.$phpEx");
|
||||
}
|
||||
|
||||
/**
|
||||
* ACM for XCache
|
||||
* @package acm
|
||||
*
|
||||
* To use this module you need ini_get() enabled and the following INI settings configured as follows:
|
||||
* - xcache.var_size > 0
|
||||
* - xcache.admin.enable_auth = off (or xcache.admin.user and xcache.admin.password set)
|
||||
*
|
||||
*/
|
||||
class acm extends acm_memory
|
||||
{
|
||||
var $extension = 'XCache';
|
||||
|
||||
function acm()
|
||||
{
|
||||
parent::acm_memory();
|
||||
|
||||
if (!function_exists('ini_get') || (int) ini_get('xcache.var_size') <= 0)
|
||||
{
|
||||
trigger_error('Increase xcache.var_size setting above 0 or enable ini_get() to use this ACM module.', E_USER_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Purge cache data
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function purge()
|
||||
{
|
||||
// Run before for XCache, if admin functions are disabled it will terminate execution
|
||||
parent::purge();
|
||||
|
||||
// If the admin authentication is enabled but not set up, this will cause a nasty error.
|
||||
// Not much we can do about it though.
|
||||
$n = xcache_count(XC_TYPE_VAR);
|
||||
|
||||
for ($i = 0; $i < $n; $i++)
|
||||
{
|
||||
xcache_clear_cache(XC_TYPE_VAR, $i);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch an item from the cache
|
||||
*
|
||||
* @access protected
|
||||
* @param string $var Cache key
|
||||
* @return mixed Cached data
|
||||
*/
|
||||
function _read($var)
|
||||
{
|
||||
$result = xcache_get($this->key_prefix . $var);
|
||||
|
||||
return ($result !== null) ? $result : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Store data in the cache
|
||||
*
|
||||
* @access protected
|
||||
* @param string $var Cache key
|
||||
* @param mixed $data Data to store
|
||||
* @param int $ttl Time-to-live of cached data
|
||||
* @return bool True if the operation succeeded
|
||||
*/
|
||||
function _write($var, $data, $ttl = 2592000)
|
||||
{
|
||||
return xcache_set($this->key_prefix . $var, $data, $ttl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove an item from the cache
|
||||
*
|
||||
* @access protected
|
||||
* @param string $var Cache key
|
||||
* @return bool True if the operation succeeded
|
||||
*/
|
||||
function _delete($var)
|
||||
{
|
||||
return xcache_unset($this->key_prefix . $var);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a cache var exists
|
||||
*
|
||||
* @access protected
|
||||
* @param string $var Cache key
|
||||
* @return bool True if it exists, otherwise false
|
||||
*/
|
||||
function _isset($var)
|
||||
{
|
||||
return xcache_isset($this->key_prefix . $var);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@@ -99,13 +99,9 @@ class acp_attachments
|
||||
$display_vars = array(
|
||||
'title' => 'ACP_ATTACHMENT_SETTINGS',
|
||||
'vars' => array(
|
||||
'img_max_width' => false, 'img_max_height' => false, 'img_link_width' => false, 'img_link_height' => false,
|
||||
|
||||
'legend1' => 'ACP_ATTACHMENT_SETTINGS',
|
||||
|
||||
'img_max_width' => array('lang' => 'MAX_IMAGE_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false,),
|
||||
'img_max_height' => array('lang' => 'MAX_IMAGE_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false,),
|
||||
'img_link_width' => array('lang' => 'IMAGE_LINK_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false,),
|
||||
'img_link_height' => array('lang' => 'IMAGE_LINK_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false,),
|
||||
|
||||
'allow_attachments' => array('lang' => 'ALLOW_ATTACHMENTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
'allow_pm_attach' => array('lang' => 'ALLOW_PM_ATTACHMENTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
'upload_path' => array('lang' => 'UPLOAD_DIR', 'validate' => 'wpath', 'type' => 'text:25:100', 'explain' => true),
|
||||
@@ -117,9 +113,7 @@ class acp_attachments
|
||||
'max_attachments_pm' => array('lang' => 'MAX_ATTACHMENTS_PM', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => false),
|
||||
'secure_downloads' => array('lang' => 'SECURE_DOWNLOADS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'secure_allow_deny' => array('lang' => 'SECURE_ALLOW_DENY', 'validate' => 'int', 'type' => 'custom', 'method' => 'select_allow_deny', 'explain' => true),
|
||||
'secure_allow_empty_referer' => array('lang' => 'SECURE_EMPTY_REFERRER', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'check_attachment_content' => array('lang' => 'CHECK_CONTENT', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
|
||||
'secure_allow_empty_referer' => array('lang' => 'SECURE_EMPTY_REFERRER', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
|
||||
'legend2' => $l_legend_cat_images,
|
||||
'img_display_inlined' => array('lang' => 'DISPLAY_INLINED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
@@ -158,7 +152,7 @@ class acp_attachments
|
||||
if (in_array($config_name, array('attachment_quota', 'max_filesize', 'max_filesize_pm')))
|
||||
{
|
||||
$size_var = request_var($config_name, '');
|
||||
$this->new_config[$config_name] = $config_value = ($size_var == 'kb') ? round($config_value * 1024) : (($size_var == 'mb') ? round($config_value * 1048576) : $config_value);
|
||||
$this->new_config[$config_name] = $config_value = ($size_var == 'kb') ? ($config_value << 10) : (($size_var == 'mb') ? ($config_value << 20) : $config_value);
|
||||
}
|
||||
|
||||
if ($submit)
|
||||
@@ -280,18 +274,12 @@ class acp_attachments
|
||||
$l_explain = (isset($user->lang[$vars['lang'] . '_EXPLAIN'])) ? $user->lang[$vars['lang'] . '_EXPLAIN'] : '';
|
||||
}
|
||||
|
||||
$content = build_cfg_template($type, $config_key, $this->new_config, $config_key, $vars);
|
||||
if (empty($content))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$template->assign_block_vars('options', array(
|
||||
'KEY' => $config_key,
|
||||
'TITLE' => $user->lang[$vars['lang']],
|
||||
'S_EXPLAIN' => $vars['explain'],
|
||||
'TITLE_EXPLAIN' => $l_explain,
|
||||
'CONTENT' => $content,
|
||||
'CONTENT' => build_cfg_template($type, $config_key, $this->new_config, $config_key, $vars),
|
||||
)
|
||||
);
|
||||
|
||||
@@ -512,7 +500,7 @@ class acp_attachments
|
||||
$allowed_forums = request_var('allowed_forums', array(0));
|
||||
$allow_in_pm = (isset($_POST['allow_in_pm'])) ? true : false;
|
||||
$max_filesize = request_var('max_filesize', 0);
|
||||
$max_filesize = ($size_select == 'kb') ? round($max_filesize * 1024) : (($size_select == 'mb') ? round($max_filesize * 1048576) : $max_filesize);
|
||||
$max_filesize = ($size_select == 'kb') ? ($max_filesize << 10) : (($size_select == 'mb') ? ($max_filesize << 20) : $max_filesize);
|
||||
$allow_group = (isset($_POST['allow_group'])) ? true : false;
|
||||
|
||||
if ($max_filesize == $config['max_filesize'])
|
||||
@@ -684,9 +672,8 @@ class acp_attachments
|
||||
$ext_group_row['max_filesize'] = (int) $config['max_filesize'];
|
||||
}
|
||||
|
||||
$max_filesize = get_formatted_filesize($ext_group_row['max_filesize'], false, array('mb', 'kb', 'b'));
|
||||
$size_format = $max_filesize['si_identifier'];
|
||||
$ext_group_row['max_filesize'] = $max_filesize['value'];
|
||||
$size_format = ($ext_group_row['max_filesize'] >= 1048576) ? 'mb' : (($ext_group_row['max_filesize'] >= 1024) ? 'kb' : 'b');
|
||||
$ext_group_row['max_filesize'] = get_formatted_filesize($ext_group_row['max_filesize'], false);
|
||||
|
||||
$img_path = $config['upload_icons_path'];
|
||||
|
||||
@@ -695,7 +682,7 @@ class acp_attachments
|
||||
|
||||
$imglist = filelist($phpbb_root_path . $img_path);
|
||||
|
||||
if (!empty($imglist['']))
|
||||
if (sizeof($imglist))
|
||||
{
|
||||
$imglist = array_values($imglist);
|
||||
$imglist = $imglist[0];
|
||||
@@ -766,8 +753,6 @@ class acp_attachments
|
||||
|
||||
$s_forum_id_options = '';
|
||||
|
||||
/** @todo use in-built function **/
|
||||
|
||||
$sql = 'SELECT forum_id, forum_name, parent_id, forum_type, left_id, right_id
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
ORDER BY left_id ASC';
|
||||
@@ -798,7 +783,7 @@ class acp_attachments
|
||||
}
|
||||
else if ($row['left_id'] > $right + 1)
|
||||
{
|
||||
$padding = empty($padding_store[$row['parent_id']]) ? '' : $padding_store[$row['parent_id']];
|
||||
$padding = $padding_store[$row['parent_id']];
|
||||
}
|
||||
|
||||
$right = $row['right_id'];
|
||||
@@ -1004,8 +989,8 @@ class acp_attachments
|
||||
|
||||
if ($files_added)
|
||||
{
|
||||
set_config_count('upload_dir_size', $space_taken, true);
|
||||
set_config_count('num_files', $files_added, true);
|
||||
set_config('upload_dir_size', $config['upload_dir_size'] + $space_taken, true);
|
||||
set_config('num_files', $config['num_files'] + $files_added, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1027,8 +1012,8 @@ class acp_attachments
|
||||
$template->assign_block_vars('orphan', array(
|
||||
'FILESIZE' => get_formatted_filesize($row['filesize']),
|
||||
'FILETIME' => $user->format_date($row['filetime']),
|
||||
'REAL_FILENAME' => utf8_basename($row['real_filename']),
|
||||
'PHYSICAL_FILENAME' => utf8_basename($row['physical_filename']),
|
||||
'REAL_FILENAME' => basename($row['real_filename']),
|
||||
'PHYSICAL_FILENAME' => basename($row['physical_filename']),
|
||||
'ATTACH_ID' => $row['attach_id'],
|
||||
'POST_IDS' => (!empty($post_ids[$row['attach_id']])) ? $post_ids[$row['attach_id']] : '',
|
||||
'U_FILE' => append_sid($phpbb_root_path . 'download/file.' . $phpEx, 'mode=view&id=' . $row['attach_id']))
|
||||
@@ -1171,7 +1156,7 @@ class acp_attachments
|
||||
$location .= '/';
|
||||
}
|
||||
|
||||
if (@file_exists($location) && @is_readable($location . 'mogrify' . $exe) && @filesize($location . 'mogrify' . $exe) > 3000)
|
||||
if (@is_readable($location . 'mogrify' . $exe) && @filesize($location . 'mogrify' . $exe) > 3000)
|
||||
{
|
||||
$imagick = str_replace('\\', '/', $location);
|
||||
continue;
|
||||
@@ -1199,7 +1184,7 @@ class acp_attachments
|
||||
if (!file_exists($phpbb_root_path . $upload_dir))
|
||||
{
|
||||
@mkdir($phpbb_root_path . $upload_dir, 0777);
|
||||
phpbb_chmod($phpbb_root_path . $upload_dir, CHMOD_READ | CHMOD_WRITE);
|
||||
@chmod($phpbb_root_path . $upload_dir, 0777);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1430,9 +1415,8 @@ class acp_attachments
|
||||
function max_filesize($value, $key = '')
|
||||
{
|
||||
// Determine size var and adjust the value accordingly
|
||||
$filesize = get_formatted_filesize($value, false, array('mb', 'kb', 'b'));
|
||||
$size_var = $filesize['si_identifier'];
|
||||
$value = $filesize['value'];
|
||||
$size_var = ($value >= 1048576) ? 'mb' : (($value >= 1024) ? 'kb' : 'b');
|
||||
$value = get_formatted_filesize($value, false);
|
||||
|
||||
return '<input type="text" id="' . $key . '" size="8" maxlength="15" name="config[' . $key . ']" value="' . $value . '" /> <select name="' . $key . '">' . size_select_options($size_var) . '</select>';
|
||||
}
|
||||
|
@@ -156,8 +156,7 @@ class acp_ban
|
||||
FROM ' . BANLIST_TABLE . '
|
||||
WHERE (ban_end >= ' . time() . "
|
||||
OR ban_end = 0)
|
||||
AND ban_ip <> ''
|
||||
ORDER BY ban_ip";
|
||||
AND ban_ip <> ''";
|
||||
break;
|
||||
|
||||
case 'email':
|
||||
@@ -169,8 +168,7 @@ class acp_ban
|
||||
FROM ' . BANLIST_TABLE . '
|
||||
WHERE (ban_end >= ' . time() . "
|
||||
OR ban_end = 0)
|
||||
AND ban_email <> ''
|
||||
ORDER BY ban_email";
|
||||
AND ban_email <> ''";
|
||||
break;
|
||||
}
|
||||
$result = $db->sql_query($sql);
|
||||
@@ -183,22 +181,7 @@ class acp_ban
|
||||
$banned_options .= '<option' . (($row['ban_exclude']) ? ' class="sep"' : '') . ' value="' . $row['ban_id'] . '">' . $row[$field] . '</option>';
|
||||
|
||||
$time_length = ($row['ban_end']) ? ($row['ban_end'] - $row['ban_start']) / 60 : 0;
|
||||
|
||||
if ($time_length == 0)
|
||||
{
|
||||
// Banned permanently
|
||||
$ban_length[$row['ban_id']] = $user->lang['PERMANENT'];
|
||||
}
|
||||
else if (isset($ban_end_text[$time_length]))
|
||||
{
|
||||
// Banned for a given duration
|
||||
$ban_length[$row['ban_id']] = sprintf($user->lang['BANNED_UNTIL_DURATION'], $ban_end_text[$time_length], $user->format_date($row['ban_end'], false, true));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Banned until given date
|
||||
$ban_length[$row['ban_id']] = sprintf($user->lang['BANNED_UNTIL_DATE'], $user->format_date($row['ban_end'], false, true));
|
||||
}
|
||||
$ban_length[$row['ban_id']] = (isset($ban_end_text[$time_length])) ? $ban_end_text[$time_length] : $user->lang['UNTIL'] . ' -> ' . $user->format_date($row['ban_end']);
|
||||
|
||||
$ban_reasons[$row['ban_id']] = $row['ban_reason'];
|
||||
$ban_give_reasons[$row['ban_id']] = $row['ban_give_reason'];
|
||||
|
@@ -168,12 +168,6 @@ class acp_bbcodes
|
||||
{
|
||||
trigger_error($user->lang['BBCODE_TAG_DEF_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
|
||||
if (strlen($bbcode_helpline) > 255)
|
||||
{
|
||||
trigger_error($user->lang['BBCODE_HELPLINE_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$sql_ary = array(
|
||||
'bbcode_tag' => $data['bbcode_tag'],
|
||||
|
@@ -64,8 +64,6 @@ class acp_board
|
||||
|
||||
'legend2' => 'WARNINGS',
|
||||
'warnings_expire_days' => array('lang' => 'WARNINGS_EXPIRE', 'validate' => 'int', 'type' => 'text:3:4', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
|
||||
|
||||
'legend3' => 'ACP_SUBMIT_CHANGES',
|
||||
)
|
||||
);
|
||||
break;
|
||||
@@ -81,14 +79,12 @@ class acp_board
|
||||
'allow_namechange' => array('lang' => 'ALLOW_NAME_CHANGE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
'allow_attachments' => array('lang' => 'ALLOW_ATTACHMENTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
'allow_pm_attach' => array('lang' => 'ALLOW_PM_ATTACHMENTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
'allow_pm_report' => array('lang' => 'ALLOW_PM_REPORT', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'allow_bbcode' => array('lang' => 'ALLOW_BBCODE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
'allow_smilies' => array('lang' => 'ALLOW_SMILIES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
'allow_sig' => array('lang' => 'ALLOW_SIG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
'allow_nocensors' => array('lang' => 'ALLOW_NO_CENSORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'allow_bookmarks' => array('lang' => 'ALLOW_BOOKMARKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'allow_birthdays' => array('lang' => 'ALLOW_BIRTHDAYS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'allow_quick_reply' => array('lang' => 'ALLOW_QUICK_REPLY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
|
||||
'legend2' => 'ACP_LOAD_SETTINGS',
|
||||
'load_birthdays' => array('lang' => 'YES_BIRTHDAYS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
@@ -97,8 +93,6 @@ class acp_board
|
||||
'load_cpf_memberlist' => array('lang' => 'LOAD_CPF_MEMBERLIST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
'load_cpf_viewprofile' => array('lang' => 'LOAD_CPF_VIEWPROFILE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
'load_cpf_viewtopic' => array('lang' => 'LOAD_CPF_VIEWTOPIC', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
|
||||
'legend3' => 'ACP_SUBMIT_CHANGES',
|
||||
)
|
||||
);
|
||||
break;
|
||||
@@ -108,17 +102,11 @@ class acp_board
|
||||
'title' => 'ACP_AVATAR_SETTINGS',
|
||||
'vars' => array(
|
||||
'legend1' => 'ACP_AVATAR_SETTINGS',
|
||||
'avatar_min_height' => false, 'avatar_min_width' => false, 'avatar_max_height' => false, 'avatar_max_width' => false,
|
||||
|
||||
'avatar_min_width' => array('lang' => 'MIN_AVATAR_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false,),
|
||||
'avatar_min_height' => array('lang' => 'MIN_AVATAR_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false,),
|
||||
'avatar_max_width' => array('lang' => 'MAX_AVATAR_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false,),
|
||||
'avatar_max_height' => array('lang' => 'MAX_AVATAR_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false,),
|
||||
|
||||
'allow_avatar' => array('lang' => 'ALLOW_AVATARS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'allow_avatar_local' => array('lang' => 'ALLOW_LOCAL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
'allow_avatar_remote' => array('lang' => 'ALLOW_REMOTE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'allow_avatar_upload' => array('lang' => 'ALLOW_UPLOAD', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
'allow_avatar_remote_upload'=> array('lang' => 'ALLOW_REMOTE_UPLOAD', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'avatar_filesize' => array('lang' => 'MAX_FILESIZE', 'validate' => 'int:0', 'type' => 'text:4:10', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']),
|
||||
'avatar_min' => array('lang' => 'MIN_AVATAR_SIZE', 'validate' => 'int:0', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
|
||||
'avatar_max' => array('lang' => 'MAX_AVATAR_SIZE', 'validate' => 'int:0', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
|
||||
@@ -139,7 +127,6 @@ class acp_board
|
||||
'pm_max_msgs' => array('lang' => 'BOXES_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
|
||||
'full_folder_action' => array('lang' => 'FULL_FOLDER_ACTION', 'validate' => 'int', 'type' => 'select', 'method' => 'full_folder_select', 'explain' => true),
|
||||
'pm_edit_time' => array('lang' => 'PM_EDIT_TIME', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
|
||||
'pm_max_recipients' => array('lang' => 'PM_MAX_RECIPIENTS', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true),
|
||||
|
||||
'legend2' => 'GENERAL_OPTIONS',
|
||||
'allow_mass_pm' => array('lang' => 'ALLOW_MASS_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
@@ -151,9 +138,7 @@ class acp_board
|
||||
'forward_pm' => array('lang' => 'ALLOW_FORWARD_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
'auth_img_pm' => array('lang' => 'ALLOW_IMG_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
'auth_flash_pm' => array('lang' => 'ALLOW_FLASH_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'enable_pm_icons' => array('lang' => 'ENABLE_PM_ICONS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
|
||||
'legend3' => 'ACP_SUBMIT_CHANGES',
|
||||
'enable_pm_icons' => array('lang' => 'ENABLE_PM_ICONS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false)
|
||||
)
|
||||
);
|
||||
break;
|
||||
@@ -172,30 +157,24 @@ class acp_board
|
||||
'allow_nocensors' => array('lang' => 'ALLOW_NO_CENSORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'allow_bookmarks' => array('lang' => 'ALLOW_BOOKMARKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'enable_post_confirm' => array('lang' => 'VISUAL_CONFIRM_POST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'allow_quick_reply' => array('lang' => 'ALLOW_QUICK_REPLY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
|
||||
'legend2' => 'POSTING',
|
||||
'bump_type' => false,
|
||||
'edit_time' => array('lang' => 'EDIT_TIME', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
|
||||
'delete_time' => array('lang' => 'DELETE_TIME', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
|
||||
'display_last_edited' => array('lang' => 'DISPLAY_LAST_EDITED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'flood_interval' => array('lang' => 'FLOOD_INTERVAL', 'validate' => 'int:0', 'type' => 'text:3:10', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']),
|
||||
'bump_interval' => array('lang' => 'BUMP_INTERVAL', 'validate' => 'int:0', 'type' => 'custom', 'method' => 'bump_interval', 'explain' => true),
|
||||
'topics_per_page' => array('lang' => 'TOPICS_PER_PAGE', 'validate' => 'int:1', 'type' => 'text:3:4', 'explain' => false),
|
||||
'posts_per_page' => array('lang' => 'POSTS_PER_PAGE', 'validate' => 'int:1', 'type' => 'text:3:4', 'explain' => false),
|
||||
'smilies_per_page' => array('lang' => 'SMILIES_PER_PAGE', 'validate' => 'int:1', 'type' => 'text:3:4', 'explain' => false),
|
||||
'hot_threshold' => array('lang' => 'HOT_THRESHOLD', 'validate' => 'int:0', 'type' => 'text:3:4', 'explain' => true),
|
||||
'max_poll_options' => array('lang' => 'MAX_POLL_OPTIONS', 'validate' => 'int:2:127', 'type' => 'text:4:4', 'explain' => false),
|
||||
'max_post_chars' => array('lang' => 'CHAR_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:6', 'explain' => true),
|
||||
'min_post_chars' => array('lang' => 'MIN_CHAR_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:6', 'explain' => true),
|
||||
'max_post_smilies' => array('lang' => 'SMILIES_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
|
||||
'max_post_urls' => array('lang' => 'MAX_POST_URLS', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true),
|
||||
'max_post_font_size' => array('lang' => 'MAX_POST_FONT_SIZE', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' %'),
|
||||
'max_quote_depth' => array('lang' => 'QUOTE_DEPTH_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
|
||||
'max_post_img_width' => array('lang' => 'MAX_POST_IMG_WIDTH', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
|
||||
'max_post_img_height' => array('lang' => 'MAX_POST_IMG_HEIGHT', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
|
||||
|
||||
'legend3' => 'ACP_SUBMIT_CHANGES',
|
||||
'edit_time' => array('lang' => 'EDIT_TIME', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
|
||||
'display_last_edited' => array('lang' => 'DISPLAY_LAST_EDITED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'flood_interval' => array('lang' => 'FLOOD_INTERVAL', 'validate' => 'int:0', 'type' => 'text:3:10', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']),
|
||||
'bump_interval' => array('lang' => 'BUMP_INTERVAL', 'validate' => 'int:0', 'type' => 'custom', 'method' => 'bump_interval', 'explain' => true),
|
||||
'topics_per_page' => array('lang' => 'TOPICS_PER_PAGE', 'validate' => 'int:1', 'type' => 'text:3:4', 'explain' => false),
|
||||
'posts_per_page' => array('lang' => 'POSTS_PER_PAGE', 'validate' => 'int:1', 'type' => 'text:3:4', 'explain' => false),
|
||||
'hot_threshold' => array('lang' => 'HOT_THRESHOLD', 'validate' => 'int:0', 'type' => 'text:3:4', 'explain' => true),
|
||||
'max_poll_options' => array('lang' => 'MAX_POLL_OPTIONS', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => false),
|
||||
'max_post_chars' => array('lang' => 'CHAR_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:6', 'explain' => true),
|
||||
'max_post_smilies' => array('lang' => 'SMILIES_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
|
||||
'max_post_urls' => array('lang' => 'MAX_POST_URLS', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true),
|
||||
'max_post_font_size' => array('lang' => 'MAX_POST_FONT_SIZE', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' %'),
|
||||
'max_quote_depth' => array('lang' => 'QUOTE_DEPTH_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
|
||||
'max_post_img_width' => array('lang' => 'MAX_POST_IMG_WIDTH', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
|
||||
'max_post_img_height' => array('lang' => 'MAX_POST_IMG_HEIGHT', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
|
||||
)
|
||||
);
|
||||
break;
|
||||
@@ -219,8 +198,6 @@ class acp_board
|
||||
'max_sig_smilies' => array('lang' => 'MAX_SIG_SMILIES', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true),
|
||||
'max_sig_img_width' => array('lang' => 'MAX_SIG_IMG_WIDTH', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
|
||||
'max_sig_img_height' => array('lang' => 'MAX_SIG_IMG_HEIGHT', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
|
||||
|
||||
'legend3' => 'ACP_SUBMIT_CHANGES',
|
||||
)
|
||||
);
|
||||
break;
|
||||
@@ -234,8 +211,6 @@ class acp_board
|
||||
'max_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int:8:255', 'type' => false, 'method' => false, 'explain' => false,),
|
||||
|
||||
'require_activation' => array('lang' => 'ACC_ACTIVATION', 'validate' => 'int', 'type' => 'custom', 'method' => 'select_acc_activation', 'explain' => true),
|
||||
'new_member_post_limit' => array('lang' => 'NEW_MEMBER_POST_LIMIT', 'validate' => 'int:0:255', 'type' => 'text:4:4', 'explain' => true, 'append' => ' ' . $user->lang['POSTS']),
|
||||
'new_member_group_default'=> array('lang' => 'NEW_MEMBER_GROUP_DEFAULT', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'min_name_chars' => array('lang' => 'USERNAME_LENGTH', 'validate' => 'int:1', 'type' => 'custom:5:180', 'method' => 'username_length', 'explain' => true),
|
||||
'min_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int:1', 'type' => 'custom', 'method' => 'password_length', 'explain' => true),
|
||||
'allow_name_chars' => array('lang' => 'USERNAME_CHARS', 'validate' => 'string', 'type' => 'select', 'method' => 'select_username_chars', 'explain' => true),
|
||||
@@ -253,28 +228,6 @@ class acp_board
|
||||
'coppa_enable' => array('lang' => 'ENABLE_COPPA', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'coppa_mail' => array('lang' => 'COPPA_MAIL', 'validate' => 'string', 'type' => 'textarea:5:40', 'explain' => true),
|
||||
'coppa_fax' => array('lang' => 'COPPA_FAX', 'validate' => 'string', 'type' => 'text:25:100', 'explain' => false),
|
||||
|
||||
'legend4' => 'ACP_SUBMIT_CHANGES',
|
||||
)
|
||||
);
|
||||
break;
|
||||
|
||||
case 'feed':
|
||||
$display_vars = array(
|
||||
'title' => 'ACP_FEED_MANAGEMENT',
|
||||
'vars' => array(
|
||||
'legend1' => 'ACP_FEED_GENERAL',
|
||||
'feed_enable' => array('lang' => 'ACP_FEED_ENABLE', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
|
||||
'feed_item_statistics' => array('lang' => 'ACP_FEED_ITEM_STATISTICS', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true),
|
||||
'feed_limit' => array('lang' => 'ACP_FEED_LIMIT', 'validate' => 'int:5', 'type' => 'text:3:4', 'explain' => true),
|
||||
'feed_overall_forums' => array('lang' => 'ACP_FEED_OVERALL_FORUMS', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
|
||||
'feed_overall_forums_limit' => array('lang' => 'ACP_FEED_OVERALL_FORUMS_LIMIT', 'validate' => 'int:5', 'type' => 'text:3:4', 'explain' => false),
|
||||
'feed_overall_topics' => array('lang' => 'ACP_FEED_OVERALL_TOPIC', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
|
||||
'feed_overall_topics_limit' => array('lang' => 'ACP_FEED_OVERALL_TOPIC_LIMIT', 'validate' => 'int:5', 'type' => 'text:3:4', 'explain' => false),
|
||||
'feed_forum' => array('lang' => 'ACP_FEED_FORUM', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
|
||||
'feed_topic' => array('lang' => 'ACP_FEED_TOPIC', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
|
||||
'feed_news_id' => array('lang' => 'ACP_FEED_NEWS', 'validate' => 'string', 'type' => 'custom', 'method' => 'select_news_forums', 'explain' => true),
|
||||
'feed_exclude_id' => array('lang' => 'ACP_FEED_EXCLUDE_ID', 'validate' => 'string', 'type' => 'custom', 'method' => 'select_exclude_forums', 'explain' => true),
|
||||
)
|
||||
);
|
||||
break;
|
||||
@@ -319,8 +272,6 @@ class acp_board
|
||||
'load_cpf_memberlist' => array('lang' => 'LOAD_CPF_MEMBERLIST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
'load_cpf_viewprofile' => array('lang' => 'LOAD_CPF_VIEWPROFILE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
'load_cpf_viewtopic' => array('lang' => 'LOAD_CPF_VIEWTOPIC', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
|
||||
'legend4' => 'ACP_SUBMIT_CHANGES',
|
||||
)
|
||||
);
|
||||
break;
|
||||
@@ -354,8 +305,6 @@ class acp_board
|
||||
'server_name' => array('lang' => 'SERVER_NAME', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => true),
|
||||
'server_port' => array('lang' => 'SERVER_PORT', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true),
|
||||
'script_path' => array('lang' => 'SCRIPT_PATH', 'validate' => 'script_path', 'type' => 'text::255', 'explain' => true),
|
||||
|
||||
'legend4' => 'ACP_SUBMIT_CHANGES',
|
||||
)
|
||||
);
|
||||
break;
|
||||
@@ -370,7 +319,6 @@ class acp_board
|
||||
'ip_check' => array('lang' => 'IP_VALID', 'validate' => 'int', 'type' => 'custom', 'method' => 'select_ip_check', 'explain' => true),
|
||||
'browser_check' => array('lang' => 'BROWSER_VALID', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'forwarded_for_check' => array('lang' => 'FORWARDED_FOR_VALID', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'referer_validation' => array('lang' => 'REFERER_VALID', 'validate' => 'int:0:3','type' => 'custom', 'method' => 'select_ref_check', 'explain' => true),
|
||||
'check_dnsbl' => array('lang' => 'CHECK_DNSBL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'email_check_mx' => array('lang' => 'EMAIL_CHECK_MX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'pass_complex' => array('lang' => 'PASSWORD_TYPE', 'validate' => 'string', 'type' => 'select', 'method' => 'select_password_chars', 'explain' => true),
|
||||
@@ -404,9 +352,7 @@ class acp_board
|
||||
'smtp_port' => array('lang' => 'SMTP_PORT', 'validate' => 'int:0', 'type' => 'text:4:5', 'explain' => true),
|
||||
'smtp_auth_method' => array('lang' => 'SMTP_AUTH_METHOD', 'validate' => 'string', 'type' => 'select', 'method' => 'mail_auth_select', 'explain' => true),
|
||||
'smtp_username' => array('lang' => 'SMTP_USERNAME', 'validate' => 'string', 'type' => 'text:25:255', 'explain' => true),
|
||||
'smtp_password' => array('lang' => 'SMTP_PASSWORD', 'validate' => 'string', 'type' => 'password:25:255', 'explain' => true),
|
||||
|
||||
'legend3' => 'ACP_SUBMIT_CHANGES',
|
||||
'smtp_password' => array('lang' => 'SMTP_PASSWORD', 'validate' => 'string', 'type' => 'password:25:255', 'explain' => true)
|
||||
)
|
||||
);
|
||||
break;
|
||||
@@ -446,7 +392,7 @@ class acp_board
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($config_name == 'auth_method' || $config_name == 'feed_news_id' || $config_name == 'feed_exclude_id')
|
||||
if ($config_name == 'auth_method')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -466,13 +412,6 @@ class acp_board
|
||||
}
|
||||
}
|
||||
|
||||
// Store news and exclude ids
|
||||
if ($mode == 'feed' && $submit)
|
||||
{
|
||||
$this->store_feed_forums(FORUM_OPTION_FEED_NEWS, 'feed_news_id');
|
||||
$this->store_feed_forums(FORUM_OPTION_FEED_EXCLUDE, 'feed_exclude_id');
|
||||
}
|
||||
|
||||
if ($mode == 'auth')
|
||||
{
|
||||
// Retrieve a list of auth plugins and check their config values
|
||||
@@ -613,20 +552,20 @@ class acp_board
|
||||
{
|
||||
$l_explain = (isset($user->lang[$vars['lang'] . '_EXPLAIN'])) ? $user->lang[$vars['lang'] . '_EXPLAIN'] : '';
|
||||
}
|
||||
|
||||
|
||||
$content = build_cfg_template($type, $config_key, $this->new_config, $config_key, $vars);
|
||||
|
||||
|
||||
if (empty($content))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
$template->assign_block_vars('options', array(
|
||||
'KEY' => $config_key,
|
||||
'TITLE' => (isset($user->lang[$vars['lang']])) ? $user->lang[$vars['lang']] : $vars['lang'],
|
||||
'S_EXPLAIN' => $vars['explain'],
|
||||
'TITLE_EXPLAIN' => $l_explain,
|
||||
'CONTENT' => $content,
|
||||
'CONTENT' => build_cfg_template($type, $config_key, $this->new_config, $config_key, $vars),
|
||||
)
|
||||
);
|
||||
|
||||
@@ -734,16 +673,6 @@ class acp_board
|
||||
return h_radio('config[ip_check]', $radio_ary, $value, $key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Select referer validation
|
||||
*/
|
||||
function select_ref_check($value, $key = '')
|
||||
{
|
||||
$radio_ary = array(REFERER_VALIDATE_PATH => 'REF_PATH', REFERER_VALIDATE_HOST => 'REF_HOST', REFERER_VALIDATE_NONE => 'NO_REF_VALIDATION');
|
||||
|
||||
return h_radio('config[referer_validation]', $radio_ary, $value, $key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Select account activation method
|
||||
*/
|
||||
@@ -883,75 +812,6 @@ class acp_board
|
||||
return "<select name=\"dateoptions\" id=\"dateoptions\" onchange=\"if (this.value == 'custom') { document.getElementById('" . addslashes($key) . "').value = '" . addslashes($value) . "'; } else { document.getElementById('" . addslashes($key) . "').value = this.value; }\">$dateformat_options</select>
|
||||
<input type=\"text\" name=\"config[$key]\" id=\"$key\" value=\"$value\" maxlength=\"30\" />";
|
||||
}
|
||||
|
||||
/**
|
||||
* Select multiple forums
|
||||
*/
|
||||
function select_news_forums($value, $key)
|
||||
{
|
||||
global $user, $config;
|
||||
|
||||
$forum_list = make_forum_select(false, false, true, true, true, false, true);
|
||||
|
||||
// Build forum options
|
||||
$s_forum_options = '<select id="' . $key . '" name="' . $key . '[]" multiple="multiple">';
|
||||
foreach ($forum_list as $f_id => $f_row)
|
||||
{
|
||||
$f_row['selected'] = phpbb_optionget(FORUM_OPTION_FEED_NEWS, $f_row['forum_options']);
|
||||
|
||||
$s_forum_options .= '<option value="' . $f_id . '"' . (($f_row['selected']) ? ' selected="selected"' : '') . (($f_row['disabled']) ? ' disabled="disabled" class="disabled-option"' : '') . '>' . $f_row['padding'] . $f_row['forum_name'] . '</option>';
|
||||
}
|
||||
$s_forum_options .= '</select>';
|
||||
|
||||
return $s_forum_options;
|
||||
}
|
||||
|
||||
function select_exclude_forums($value, $key)
|
||||
{
|
||||
global $user, $config;
|
||||
|
||||
$forum_list = make_forum_select(false, false, true, false, false, false, true);
|
||||
|
||||
// Build forum options
|
||||
$s_forum_options = '<select id="' . $key . '" name="' . $key . '[]" multiple="multiple">';
|
||||
foreach ($forum_list as $f_id => $f_row)
|
||||
{
|
||||
$f_row['selected'] = phpbb_optionget(FORUM_OPTION_FEED_EXCLUDE, $f_row['forum_options']);
|
||||
|
||||
$s_forum_options .= '<option value="' . $f_id . '"' . (($f_row['selected']) ? ' selected="selected"' : '') . (($f_row['disabled']) ? ' disabled="disabled" class="disabled-option"' : '') . '>' . $f_row['padding'] . $f_row['forum_name'] . '</option>';
|
||||
}
|
||||
$s_forum_options .= '</select>';
|
||||
|
||||
return $s_forum_options;
|
||||
}
|
||||
|
||||
function store_feed_forums($option, $key)
|
||||
{
|
||||
global $db, $cache;
|
||||
|
||||
// Get key
|
||||
$values = request_var($key, array(0 => 0));
|
||||
|
||||
// Empty option bit for all forums
|
||||
$sql = 'UPDATE ' . FORUMS_TABLE . '
|
||||
SET forum_options = forum_options - ' . (1 << $option) . '
|
||||
WHERE ' . $db->sql_bit_and('forum_options', $option, '<> 0');
|
||||
$db->sql_query($sql);
|
||||
|
||||
// Already emptied for all...
|
||||
if (sizeof($values))
|
||||
{
|
||||
// Set for selected forums
|
||||
$sql = 'UPDATE ' . FORUMS_TABLE . '
|
||||
SET forum_options = forum_options + ' . (1 << $option) . '
|
||||
WHERE ' . $db->sql_in_set('forum_id', $values);
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
// Empty sql cache for forums table because options changed
|
||||
$cache->destroy('sql', FORUMS_TABLE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
@@ -29,118 +29,89 @@ class acp_captcha
|
||||
|
||||
$user->add_lang('acp/board');
|
||||
|
||||
include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
|
||||
$captchas = phpbb_captcha_factory::get_captcha_types();
|
||||
|
||||
$captcha_vars = array(
|
||||
'captcha_gd_x_grid' => 'CAPTCHA_GD_X_GRID',
|
||||
'captcha_gd_y_grid' => 'CAPTCHA_GD_Y_GRID',
|
||||
'captcha_gd_foreground_noise' => 'CAPTCHA_GD_FOREGROUND_NOISE',
|
||||
'captcha_gd' => 'CAPTCHA_GD_PREVIEWED'
|
||||
);
|
||||
|
||||
$selected = request_var('select_captcha', $config['captcha_plugin']);
|
||||
$selected = (isset($captchas['available'][$selected]) || isset($captchas['unavailable'][$selected])) ? $selected : $config['captcha_plugin'];
|
||||
$configure = request_var('configure', false);
|
||||
|
||||
|
||||
// Oh, they are just here for the view
|
||||
if (isset($_GET['captcha_demo']))
|
||||
if (isset($_GET['demo']))
|
||||
{
|
||||
$this->deliver_demo($selected);
|
||||
}
|
||||
|
||||
// Delegate
|
||||
if ($configure)
|
||||
{
|
||||
$config_captcha =& phpbb_captcha_factory::get_instance($selected);
|
||||
$config_captcha->acp_page($id, $this);
|
||||
}
|
||||
else
|
||||
{
|
||||
$config_vars = array(
|
||||
'enable_confirm' => array('tpl' => 'REG_ENABLE', 'default' => false),
|
||||
'enable_post_confirm' => array('tpl' => 'POST_ENABLE', 'default' => false),
|
||||
'confirm_refresh' => array('tpl' => 'CONFIRM_REFRESH', 'default' => false),
|
||||
'max_reg_attempts' => array('tpl' => 'REG_LIMIT', 'default' => 0),
|
||||
);
|
||||
|
||||
$this->tpl_name = 'acp_captcha';
|
||||
$this->page_title = 'ACP_VC_SETTINGS';
|
||||
$form_key = 'acp_captcha';
|
||||
add_form_key($form_key);
|
||||
|
||||
$submit = request_var('main_submit', false);
|
||||
|
||||
if ($submit && check_form_key($form_key))
|
||||
$captcha_vars = array_keys($captcha_vars);
|
||||
foreach ($captcha_vars as $captcha_var)
|
||||
{
|
||||
foreach ($config_vars as $config_var => $options)
|
||||
{
|
||||
set_config($config_var, request_var($config_var, $options['default']));
|
||||
}
|
||||
|
||||
if ($selected !== $config['captcha_plugin'])
|
||||
{
|
||||
// sanity check
|
||||
if (isset($captchas['available'][$selected]))
|
||||
{
|
||||
$old_captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
|
||||
$old_captcha->uninstall();
|
||||
|
||||
set_config('captcha_plugin', $selected);
|
||||
$new_captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
|
||||
$new_captcha->install();
|
||||
|
||||
add_log('admin', 'LOG_CONFIG_VISUAL');
|
||||
}
|
||||
else
|
||||
{
|
||||
trigger_error($user->lang['CAPTCHA_UNAVAILABLE'] . adm_back_link($this->u_action));
|
||||
}
|
||||
}
|
||||
trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action));
|
||||
$config[$captcha_var] = (isset($_REQUEST[$captcha_var])) ? request_var($captcha_var, 0) : $config[$captcha_var];
|
||||
}
|
||||
else if ($submit)
|
||||
if ($config['captcha_gd'])
|
||||
{
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link());
|
||||
include($phpbb_root_path . 'includes/captcha/captcha_gd.' . $phpEx);
|
||||
}
|
||||
else
|
||||
{
|
||||
$captcha_select = '';
|
||||
foreach ($captchas['available'] as $value => $title)
|
||||
{
|
||||
$current = ($selected !== false && $value == $selected) ? ' selected="selected"' : '';
|
||||
$captcha_select .= '<option value="' . $value . '"' . $current . '>' . $user->lang[$title] . '</option>';
|
||||
}
|
||||
|
||||
foreach ($captchas['unavailable'] as $value => $title)
|
||||
{
|
||||
$current = ($selected !== false && $value == $selected) ? ' selected="selected"' : '';
|
||||
$captcha_select .= '<option value="' . $value . '"' . $current . ' class="disabled-option">' . $user->lang[$title] . '</option>';
|
||||
}
|
||||
|
||||
$demo_captcha =& phpbb_captcha_factory::get_instance($selected);
|
||||
|
||||
foreach ($config_vars as $config_var => $options)
|
||||
{
|
||||
$template->assign_var($options['tpl'], (isset($_POST[$config_var])) ? request_var($config_var, $options['default']) : $config[$config_var]) ;
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'CAPTCHA_PREVIEW_TPL' => $demo_captcha->get_demo_template($id),
|
||||
'S_CAPTCHA_HAS_CONFIG' => $demo_captcha->has_config(),
|
||||
'CAPTCHA_SELECT' => $captcha_select,
|
||||
));
|
||||
include($phpbb_root_path . 'includes/captcha/captcha_non_gd.' . $phpEx);
|
||||
}
|
||||
$captcha = new captcha();
|
||||
$captcha->execute(gen_rand_string(mt_rand(5, 8)), time());
|
||||
exit_handler();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Entry point for delivering image CAPTCHAs in the ACP.
|
||||
*/
|
||||
function deliver_demo($selected)
|
||||
{
|
||||
global $db, $user, $config;
|
||||
$config_vars = array(
|
||||
'enable_confirm' => 'REG_ENABLE',
|
||||
'enable_post_confirm' => 'POST_ENABLE',
|
||||
'captcha_gd' => 'CAPTCHA_GD',
|
||||
);
|
||||
|
||||
$captcha =& phpbb_captcha_factory::get_instance($selected);
|
||||
$captcha->init(CONFIRM_REG);
|
||||
$captcha->execute_demo();
|
||||
$this->tpl_name = 'acp_captcha';
|
||||
$this->page_title = 'ACP_VC_SETTINGS';
|
||||
$form_key = 'acp_captcha';
|
||||
add_form_key($form_key);
|
||||
|
||||
garbage_collection();
|
||||
exit_handler();
|
||||
$submit = request_var('submit', '');
|
||||
|
||||
if ($submit && check_form_key($form_key))
|
||||
{
|
||||
$config_vars = array_keys($config_vars);
|
||||
foreach ($config_vars as $config_var)
|
||||
{
|
||||
set_config($config_var, request_var($config_var, ''));
|
||||
}
|
||||
$captcha_vars = array_keys($captcha_vars);
|
||||
foreach ($captcha_vars as $captcha_var)
|
||||
{
|
||||
set_config($captcha_var, request_var($captcha_var, 0));
|
||||
}
|
||||
trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action));
|
||||
}
|
||||
else if ($submit)
|
||||
{
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$preview_image_src = append_sid(append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&demo=demo"));
|
||||
if (@extension_loaded('gd'))
|
||||
{
|
||||
$template->assign_var('GD', true);
|
||||
}
|
||||
foreach ($config_vars as $config_var => $template_var)
|
||||
{
|
||||
$template->assign_var($template_var, (isset($_REQUEST[$config_var])) ? request_var($config_var, '') : $config[$config_var]) ;
|
||||
}
|
||||
foreach ($captcha_vars as $captcha_var => $template_var)
|
||||
{
|
||||
$var = (isset($_REQUEST[$captcha_var])) ? request_var($captcha_var, 0) : $config[$captcha_var];
|
||||
$template->assign_var($template_var, $var);
|
||||
$preview_image_src .= "&$captcha_var=" . $var;
|
||||
}
|
||||
$template->assign_vars(array(
|
||||
'CAPTCHA_PREVIEW' => $preview_image_src,
|
||||
'PREVIEW' => isset($_POST['preview']),
|
||||
));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -25,9 +25,9 @@ class acp_database
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $cache, $db, $user, $auth, $template, $table_prefix;
|
||||
global $db, $user, $auth, $template, $table_prefix;
|
||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
|
||||
|
||||
$user->add_lang('acp/database');
|
||||
|
||||
$this->tpl_name = 'acp_database';
|
||||
@@ -82,7 +82,6 @@ class acp_database
|
||||
}
|
||||
|
||||
@set_time_limit(1200);
|
||||
@set_time_limit(0);
|
||||
|
||||
$time = time();
|
||||
|
||||
@@ -142,7 +141,7 @@ class acp_database
|
||||
break;
|
||||
|
||||
case 'oracle':
|
||||
$extractor->flush('TRUNCATE TABLE ' . $table_name . "/\n");
|
||||
$extractor->flush('TRUNCATE TABLE ' . $table_name . "\\\n");
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -160,20 +159,18 @@ class acp_database
|
||||
|
||||
$extractor->write_end();
|
||||
|
||||
add_log('admin', 'LOG_DB_BACKUP');
|
||||
|
||||
if ($download == true)
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
add_log('admin', 'LOG_DB_BACKUP');
|
||||
trigger_error($user->lang['BACKUP_SUCCESS'] . adm_back_link($this->u_action));
|
||||
break;
|
||||
|
||||
default:
|
||||
include($phpbb_root_path . 'includes/functions_install.' . $phpEx);
|
||||
$tables = get_tables($db);
|
||||
asort($tables);
|
||||
foreach ($tables as $table_name)
|
||||
{
|
||||
if (strlen($table_prefix) === 0 || stripos($table_name, $table_prefix) === 0)
|
||||
@@ -188,7 +185,7 @@ class acp_database
|
||||
$template->assign_vars(array(
|
||||
'U_ACTION' => $this->u_action . '&action=download'
|
||||
));
|
||||
|
||||
|
||||
$available_methods = array('gzip' => 'zlib', 'bzip2' => 'bz2');
|
||||
|
||||
foreach ($available_methods as $type => $module)
|
||||
@@ -344,29 +341,10 @@ class acp_database
|
||||
break;
|
||||
|
||||
case 'postgres':
|
||||
$delim = ";\n";
|
||||
while (($sql = $fgetd($fp, $delim, $read, $seek, $eof)) !== false)
|
||||
{
|
||||
$query = trim($sql);
|
||||
|
||||
if (substr($query, 0, 13) == 'CREATE DOMAIN')
|
||||
{
|
||||
list(, , $domain) = explode(' ', $query);
|
||||
$sql = "SELECT domain_name
|
||||
FROM information_schema.domains
|
||||
WHERE domain_name = '$domain';";
|
||||
$result = $db->sql_query($sql);
|
||||
if (!$db->sql_fetchrow($result))
|
||||
{
|
||||
$db->sql_query($query);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->sql_query($query);
|
||||
}
|
||||
|
||||
$db->sql_query($query);
|
||||
if (substr($query, 0, 4) == 'COPY')
|
||||
{
|
||||
while (($sub = $fgetd($fp, "\n", $read, $seek, $eof)) !== '\.')
|
||||
@@ -401,9 +379,6 @@ class acp_database
|
||||
|
||||
$close($fp);
|
||||
|
||||
// Purge the cache due to updated data
|
||||
$cache->purge();
|
||||
|
||||
add_log('admin', 'LOG_DB_RESTORE');
|
||||
trigger_error($user->lang['RESTORE_SUCCESS'] . adm_back_link($this->u_action));
|
||||
break;
|
||||
@@ -425,37 +400,27 @@ class acp_database
|
||||
$dir = $phpbb_root_path . 'store/';
|
||||
$dh = @opendir($dir);
|
||||
|
||||
$backup_files = array();
|
||||
|
||||
if ($dh)
|
||||
{
|
||||
while (($file = readdir($dh)) !== false)
|
||||
{
|
||||
if (preg_match('#^backup_(\d{10,})_[a-z\d]{16}\.(sql(?:\.(?:gz|bz2))?)$#', $file, $matches))
|
||||
{
|
||||
if (in_array($matches[2], $methods))
|
||||
$supported = in_array($matches[2], $methods);
|
||||
|
||||
if ($supported == 'true')
|
||||
{
|
||||
$backup_files[gmdate("d-m-Y H:i:s", $matches[1])] = $file;
|
||||
$template->assign_block_vars('files', array(
|
||||
'FILE' => $file,
|
||||
'NAME' => gmdate("d-m-Y H:i:s", $matches[1]),
|
||||
'SUPPORTED' => $supported
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($dh);
|
||||
}
|
||||
|
||||
if (!empty($backup_files))
|
||||
{
|
||||
krsort($backup_files);
|
||||
|
||||
foreach ($backup_files as $name => $file)
|
||||
{
|
||||
$template->assign_block_vars('files', array(
|
||||
'FILE' => $file,
|
||||
'NAME' => $name,
|
||||
'SUPPORTED' => true,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'U_ACTION' => $this->u_action . '&action=submit'
|
||||
));
|
||||
@@ -519,7 +484,7 @@ class base_extractor
|
||||
header('Pragma: no-cache');
|
||||
header("Content-Type: $mimetype; name=\"$name\"");
|
||||
header("Content-disposition: attachment; filename=$name");
|
||||
|
||||
|
||||
switch ($format)
|
||||
{
|
||||
case 'bzip2':
|
||||
@@ -538,17 +503,17 @@ class base_extractor
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($store == true)
|
||||
{
|
||||
global $phpbb_root_path;
|
||||
$file = $phpbb_root_path . 'store/' . $filename . $ext;
|
||||
|
||||
|
||||
$this->fp = $open($file, 'w');
|
||||
|
||||
|
||||
if (!$this->fp)
|
||||
{
|
||||
trigger_error('FILE_WRITE_FAIL', E_USER_ERROR);
|
||||
trigger_error('Unable to write temporary file to storage folder', E_USER_ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -556,7 +521,6 @@ class base_extractor
|
||||
function write_end()
|
||||
{
|
||||
static $close;
|
||||
|
||||
if ($this->store)
|
||||
{
|
||||
if ($close === null)
|
||||
@@ -632,7 +596,7 @@ class mysql_extractor extends base_extractor
|
||||
|
||||
if ($new_extract === null)
|
||||
{
|
||||
if ($db->sql_layer === 'mysqli' || version_compare($db->sql_server_info(true), '3.23.20', '>='))
|
||||
if ($db->sql_layer === 'mysqli' || version_compare($db->mysql_version, '3.23.20', '>='))
|
||||
{
|
||||
$new_extract = true;
|
||||
}
|
||||
@@ -674,11 +638,11 @@ class mysql_extractor extends base_extractor
|
||||
if ($result != false)
|
||||
{
|
||||
$fields_cnt = mysqli_num_fields($result);
|
||||
|
||||
|
||||
// Get field information
|
||||
$field = mysqli_fetch_fields($result);
|
||||
$field_set = array();
|
||||
|
||||
|
||||
for ($j = 0; $j < $fields_cnt; $j++)
|
||||
{
|
||||
$field_set[] = $field[$j]->name;
|
||||
@@ -691,7 +655,7 @@ class mysql_extractor extends base_extractor
|
||||
$first_set = true;
|
||||
$query_len = 0;
|
||||
$max_len = get_usable_memory();
|
||||
|
||||
|
||||
while ($row = mysqli_fetch_row($result))
|
||||
{
|
||||
$values = array();
|
||||
@@ -762,7 +726,7 @@ class mysql_extractor extends base_extractor
|
||||
$field[] = mysql_fetch_field($result, $i);
|
||||
}
|
||||
$field_set = array();
|
||||
|
||||
|
||||
for ($j = 0; $j < $fields_cnt; $j++)
|
||||
{
|
||||
$field_set[] = $field[$j]->name;
|
||||
@@ -978,7 +942,7 @@ class sqlite_extractor extends base_extractor
|
||||
$ar[] = $row;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
foreach ($ar as $value)
|
||||
{
|
||||
if (strpos($value['name'], 'autoindex') !== false)
|
||||
@@ -1122,7 +1086,7 @@ class postgres_extractor extends base_extractor
|
||||
}
|
||||
|
||||
$sql_data = '-- Table: ' . $table_name . "\n";
|
||||
$sql_data .= "DROP TABLE $table_name;\n";
|
||||
//$sql_data .= "DROP TABLE $table_name;\n";
|
||||
// PGSQL does not "tightly" bind sequences and tables, we must guess...
|
||||
$sql = "SELECT relname
|
||||
FROM pg_class
|
||||
@@ -1136,7 +1100,7 @@ class postgres_extractor extends base_extractor
|
||||
$sql_data .= "CREATE SEQUENCE {$table_name}_seq;\n";
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
$field_query = "SELECT a.attnum, a.attname as field, t.typname as type, a.attlen as length, a.atttypmod as lengthvar, a.attnotnull as notnull
|
||||
FROM pg_class c, pg_attribute a, pg_type t
|
||||
WHERE c.relname = '" . $db->sql_escape($table_name) . "'
|
||||
@@ -1157,17 +1121,16 @@ class postgres_extractor extends base_extractor
|
||||
AND (c.oid = d.adrelid)
|
||||
AND d.adnum = " . $row['attnum'];
|
||||
$def_res = $db->sql_query($sql_get_default);
|
||||
$def_row = $db->sql_fetchrow($def_res);
|
||||
$db->sql_freeresult($def_res);
|
||||
|
||||
if (empty($def_row))
|
||||
if (!$def_res)
|
||||
{
|
||||
unset($row['rowdefault']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$row['rowdefault'] = $def_row['rowdefault'];
|
||||
$row['rowdefault'] = $db->sql_fetchfield('rowdefault', false, $def_res);
|
||||
}
|
||||
$db->sql_freeresult($def_res);
|
||||
|
||||
if ($row['type'] == 'bpchar')
|
||||
{
|
||||
@@ -1192,7 +1155,7 @@ class postgres_extractor extends base_extractor
|
||||
$line .= ')';
|
||||
}
|
||||
|
||||
if (isset($row['rowdefault']))
|
||||
if (!empty($row['rowdefault']))
|
||||
{
|
||||
$line .= ' DEFAULT ' . $row['rowdefault'];
|
||||
}
|
||||
@@ -1201,7 +1164,7 @@ class postgres_extractor extends base_extractor
|
||||
{
|
||||
$line .= ' NOT NULL';
|
||||
}
|
||||
|
||||
|
||||
$lines[] = $line;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
@@ -1401,33 +1364,33 @@ class mssql_extractor extends base_extractor
|
||||
$sql_data .= "GO\n";
|
||||
$sql_data .= "\nCREATE TABLE [$table_name] (\n";
|
||||
$rows = array();
|
||||
|
||||
|
||||
$text_flag = false;
|
||||
|
||||
|
||||
$sql = "SELECT COLUMN_NAME, COLUMN_DEFAULT, IS_NULLABLE, DATA_TYPE, CHARACTER_MAXIMUM_LENGTH, COLUMNPROPERTY(object_id(TABLE_NAME), COLUMN_NAME, 'IsIdentity') as IS_IDENTITY
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE TABLE_NAME = '$table_name'";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$line = "\t[{$row['COLUMN_NAME']}] [{$row['DATA_TYPE']}]";
|
||||
|
||||
|
||||
if ($row['DATA_TYPE'] == 'text')
|
||||
{
|
||||
$text_flag = true;
|
||||
}
|
||||
|
||||
|
||||
if ($row['IS_IDENTITY'])
|
||||
{
|
||||
$line .= ' IDENTITY (1 , 1)';
|
||||
}
|
||||
|
||||
|
||||
if ($row['CHARACTER_MAXIMUM_LENGTH'] && $row['DATA_TYPE'] !== 'text')
|
||||
{
|
||||
$line .= ' (' . $row['CHARACTER_MAXIMUM_LENGTH'] . ')';
|
||||
}
|
||||
|
||||
|
||||
if ($row['IS_NULLABLE'] == 'YES')
|
||||
{
|
||||
$line .= ' NULL';
|
||||
@@ -1436,27 +1399,27 @@ class mssql_extractor extends base_extractor
|
||||
{
|
||||
$line .= ' NOT NULL';
|
||||
}
|
||||
|
||||
|
||||
if ($row['COLUMN_DEFAULT'])
|
||||
{
|
||||
$line .= ' DEFAULT ' . $row['COLUMN_DEFAULT'];
|
||||
}
|
||||
|
||||
|
||||
$rows[] = $line;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
$sql_data .= implode(",\n", $rows);
|
||||
$sql_data .= "\n) ON [PRIMARY]";
|
||||
|
||||
|
||||
if ($text_flag)
|
||||
{
|
||||
$sql_data .= " TEXTIMAGE_ON [PRIMARY]";
|
||||
}
|
||||
|
||||
|
||||
$sql_data .= "\nGO\n\n";
|
||||
$rows = array();
|
||||
|
||||
|
||||
$sql = "SELECT CONSTRAINT_NAME, COLUMN_NAME
|
||||
FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE
|
||||
WHERE TABLE_NAME = '$table_name'";
|
||||
@@ -1476,7 +1439,7 @@ class mssql_extractor extends base_extractor
|
||||
$sql_data .= "\n\t) ON [PRIMARY] \nGO\n";
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
$index = array();
|
||||
$sql = "EXEC sp_statistics '$table_name'";
|
||||
$result = $db->sql_query($sql);
|
||||
@@ -1488,12 +1451,12 @@ class mssql_extractor extends base_extractor
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
foreach ($index as $index_name => $column_name)
|
||||
{
|
||||
$index[$index_name] = implode(', ', $column_name);
|
||||
}
|
||||
|
||||
|
||||
foreach ($index as $index_name => $columns)
|
||||
{
|
||||
$sql_data .= "\nCREATE INDEX [$index_name] ON [$table_name]($columns) ON [PRIMARY]\nGO\n";
|
||||
@@ -1521,7 +1484,7 @@ class mssql_extractor extends base_extractor
|
||||
$ary_type = $ary_name = array();
|
||||
$ident_set = false;
|
||||
$sql_data = '';
|
||||
|
||||
|
||||
// Grab all of the data from current table.
|
||||
$sql = "SELECT *
|
||||
FROM $table_name";
|
||||
@@ -1615,7 +1578,7 @@ class mssql_extractor extends base_extractor
|
||||
$ary_type = $ary_name = array();
|
||||
$ident_set = false;
|
||||
$sql_data = '';
|
||||
|
||||
|
||||
// Grab all of the data from current table.
|
||||
$sql = "SELECT *
|
||||
FROM $table_name";
|
||||
@@ -1716,7 +1679,8 @@ class oracle_extractor extends base_extractor
|
||||
{
|
||||
global $db;
|
||||
$sql_data = '-- Table: ' . $table_name . "\n";
|
||||
$sql_data .= "DROP TABLE $table_name\n/\n";
|
||||
$sql_data .= "DROP TABLE $table_name;\n";
|
||||
$sql_data .= '\\' . "\n";
|
||||
$sql_data .= "\nCREATE TABLE $table_name (\n";
|
||||
|
||||
$sql = "SELECT COLUMN_NAME, DATA_TYPE, DATA_PRECISION, DATA_LENGTH, NULLABLE, DATA_DEFAULT
|
||||
@@ -1731,7 +1695,7 @@ class oracle_extractor extends base_extractor
|
||||
|
||||
if ($row['data_type'] !== 'CLOB')
|
||||
{
|
||||
if ($row['data_type'] !== 'VARCHAR2' && $row['data_type'] !== 'CHAR')
|
||||
if ($row['data_type'] !== 'VARCHAR2')
|
||||
{
|
||||
$line .= '(' . $row['data_precision'] . ')';
|
||||
}
|
||||
@@ -1761,20 +1725,12 @@ class oracle_extractor extends base_extractor
|
||||
AND A.TABLE_NAME = '{$table_name}'";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$primary_key = array();
|
||||
$contraint_name = '';
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$constraint_name = '"' . $row['constraint_name'] . '"';
|
||||
$primary_key[] = '"' . $row['column_name'] . '"';
|
||||
$rows[] = " CONSTRAINT {$row['constraint_name']} PRIMARY KEY ({$row['column_name']})";
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($primary_key))
|
||||
{
|
||||
$rows[] = " CONSTRAINT {$constraint_name} PRIMARY KEY (" . implode(', ', $primary_key) . ')';
|
||||
}
|
||||
|
||||
$sql = "SELECT A.CONSTRAINT_NAME, A.COLUMN_NAME
|
||||
FROM USER_CONS_COLUMNS A, USER_CONSTRAINTS B
|
||||
WHERE A.CONSTRAINT_NAME = B.CONSTRAINT_NAME
|
||||
@@ -1782,44 +1738,24 @@ class oracle_extractor extends base_extractor
|
||||
AND A.TABLE_NAME = '{$table_name}'";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$unique = array();
|
||||
$contraint_name = '';
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$constraint_name = '"' . $row['constraint_name'] . '"';
|
||||
$unique[] = '"' . $row['column_name'] . '"';
|
||||
$rows[] = " CONSTRAINT {$row['constraint_name']} UNIQUE ({$row['column_name']})";
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($unique))
|
||||
{
|
||||
$rows[] = " CONSTRAINT {$constraint_name} UNIQUE (" . implode(', ', $unique) . ')';
|
||||
}
|
||||
|
||||
$sql_data .= implode(",\n", $rows);
|
||||
$sql_data .= "\n)\n/\n";
|
||||
$sql_data .= "\n)\n\\";
|
||||
|
||||
$sql = "SELECT A.REFERENCED_NAME, C.*
|
||||
FROM USER_DEPENDENCIES A, USER_TRIGGERS B, USER_SEQUENCES C
|
||||
$sql = "SELECT A.REFERENCED_NAME
|
||||
FROM USER_DEPENDENCIES A, USER_TRIGGERS B
|
||||
WHERE A.REFERENCED_TYPE = 'SEQUENCE'
|
||||
AND A.NAME = B.TRIGGER_NAME
|
||||
AND B.TABLE_NAME = '{$table_name}'
|
||||
AND C.SEQUENCE_NAME = A.REFERENCED_NAME";
|
||||
AND B. TABLE_NAME = '{$table_name}'";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$type = request_var('type', '');
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$sql_data .= "\nDROP SEQUENCE \"{$row['referenced_name']}\"\n/\n";
|
||||
$sql_data .= "\nCREATE SEQUENCE \"{$row['referenced_name']}\"";
|
||||
|
||||
if ($type == 'full')
|
||||
{
|
||||
$sql_data .= ' START WITH ' . $row['last_number'];
|
||||
}
|
||||
|
||||
$sql_data .= "\n/\n";
|
||||
$sql_data .= "\nCREATE SEQUENCE {$row['referenced_name']}\\\n";
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
@@ -1829,7 +1765,7 @@ class oracle_extractor extends base_extractor
|
||||
$result = $db->sql_query($sql);
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$sql_data .= "\nCREATE OR REPLACE TRIGGER {$row['description']}WHEN ({$row['when_clause']})\n{$row['trigger_body']}\n/\n";
|
||||
$sql_data .= "\nCREATE OR REPLACE TRIGGER {$row['description']}WHEN ({$row['when_clause']})\n{$row['trigger_body']}\\";
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
@@ -1849,7 +1785,7 @@ class oracle_extractor extends base_extractor
|
||||
|
||||
foreach ($index as $index_name => $column_names)
|
||||
{
|
||||
$sql_data .= "\nCREATE INDEX $index_name ON $table_name(" . implode(', ', $column_names) . ")\n/\n";
|
||||
$sql_data .= "\nCREATE INDEX $index_name ON $table_name(" . implode(', ', $column_names) . ")\n\\";
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
$this->flush($sql_data);
|
||||
@@ -1859,7 +1795,7 @@ class oracle_extractor extends base_extractor
|
||||
{
|
||||
global $db;
|
||||
$ary_type = $ary_name = array();
|
||||
|
||||
|
||||
// Grab all of the data from current table.
|
||||
$sql = "SELECT *
|
||||
FROM $table_name";
|
||||
@@ -1882,10 +1818,9 @@ class oracle_extractor extends base_extractor
|
||||
// Build the SQL statement to recreate the data.
|
||||
for ($i = 0; $i < $i_num_fields; $i++)
|
||||
{
|
||||
// Oracle uses uppercase - we use lowercase
|
||||
$str_val = $row[strtolower($ary_name[$i])];
|
||||
$str_val = $row[$ary_name[$i]];
|
||||
|
||||
if (preg_match('#char|text|bool|raw|clob#i', $ary_type[$i]))
|
||||
if (preg_match('#char|text|bool|raw#i', $ary_type[$i]))
|
||||
{
|
||||
$str_quote = '';
|
||||
$str_empty = "''";
|
||||
@@ -1914,12 +1849,12 @@ class oracle_extractor extends base_extractor
|
||||
}
|
||||
|
||||
$schema_vals[$i] = $str_quote . $str_val . $str_quote;
|
||||
$schema_fields[$i] = '"' . $ary_name[$i] . '"';
|
||||
$schema_fields[$i] = '"' . $ary_name[$i] . "'";
|
||||
}
|
||||
|
||||
// Take the ordered fields and their associated data and build it
|
||||
// into a valid sql statement to recreate that field in the data.
|
||||
$sql_data = "INSERT INTO $table_name (" . implode(', ', $schema_fields) . ') VALUES (' . implode(', ', $schema_vals) . ")\n/\n";
|
||||
$sql_data = "INSERT INTO $table_name (" . implode(', ', $schema_fields) . ') VALUES (' . implode(', ', $schema_vals) . ");\n";
|
||||
|
||||
$this->flush($sql_data);
|
||||
}
|
||||
@@ -1956,7 +1891,7 @@ class firebird_extractor extends base_extractor
|
||||
{
|
||||
global $db;
|
||||
$ary_type = $ary_name = array();
|
||||
|
||||
|
||||
// Grab all of the data from current table.
|
||||
$sql = "SELECT *
|
||||
FROM $table_name";
|
||||
@@ -2238,10 +2173,8 @@ function sanitize_data_mssql($text)
|
||||
|
||||
function sanitize_data_oracle($text)
|
||||
{
|
||||
// $data = preg_split('/[\0\n\t\r\b\f\'"\/\\\]/', $text);
|
||||
// preg_match_all('/[\0\n\t\r\b\f\'"\/\\\]/', $text, $matches);
|
||||
$data = preg_split('/[\0\b\f\'\/]/', $text);
|
||||
preg_match_all('/[\0\r\b\f\'\/]/', $text, $matches);
|
||||
$data = preg_split('/[\0\n\t\r\b\f\'"\\\]/', $text);
|
||||
preg_match_all('/[\0\n\t\r\b\f\'"\\\]/', $text, $matches);
|
||||
|
||||
$val = array();
|
||||
|
||||
@@ -2287,7 +2220,7 @@ function fgetd(&$fp, $delim, $read, $seek, $eof, $buffer = 8192)
|
||||
{
|
||||
$record = '';
|
||||
$delim_len = strlen($delim);
|
||||
|
||||
|
||||
while (!$eof($fp))
|
||||
{
|
||||
$pos = strpos($record, $delim);
|
||||
|
@@ -108,7 +108,7 @@ class acp_email
|
||||
$db->sql_freeresult($result);
|
||||
trigger_error($user->lang['NO_USER'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
|
||||
$i = $j = 0;
|
||||
|
||||
// Send with BCC, no more than 50 recipients for one mail (to not exceed the limit)
|
||||
@@ -121,7 +121,7 @@ class acp_email
|
||||
{
|
||||
if (($row['user_notify_type'] == NOTIFY_EMAIL && $row['user_email']) ||
|
||||
($row['user_notify_type'] == NOTIFY_IM && $row['user_jabber']) ||
|
||||
($row['user_notify_type'] == NOTIFY_BOTH && ($row['user_email'] || $row['user_jabber'])))
|
||||
($row['user_notify_type'] == NOTIFY_BOTH && $row['user_email'] && $row['user_jabber']))
|
||||
{
|
||||
if ($i == $max_chunk_size || $row['user_lang'] != $old_lang || $row['user_notify_type'] != $old_notify_type)
|
||||
{
|
||||
@@ -173,7 +173,7 @@ class acp_email
|
||||
$messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
|
||||
$messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
|
||||
$messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
|
||||
|
||||
|
||||
$messenger->subject(htmlspecialchars_decode($subject));
|
||||
$messenger->set_mail_priority($priority);
|
||||
|
||||
@@ -181,7 +181,7 @@ class acp_email
|
||||
'CONTACT_EMAIL' => $config['board_contact'],
|
||||
'MESSAGE' => htmlspecialchars_decode($message))
|
||||
);
|
||||
|
||||
|
||||
if (!($messenger->send($used_method)))
|
||||
{
|
||||
$errored = true;
|
||||
@@ -239,7 +239,7 @@ class acp_email
|
||||
|
||||
$select_list = '<option value="0"' . ((!$group_id) ? ' selected="selected"' : '') . '>' . $user->lang['ALL_USERS'] . '</option>';
|
||||
$select_list .= group_select_options($group_id, $exclude);
|
||||
|
||||
|
||||
$s_priority_options = '<option value="' . MAIL_LOW_PRIORITY . '">' . $user->lang['MAIL_LOW_PRIORITY'] . '</option>';
|
||||
$s_priority_options .= '<option value="' . MAIL_NORMAL_PRIORITY . '" selected="selected">' . $user->lang['MAIL_NORMAL_PRIORITY'] . '</option>';
|
||||
$s_priority_options .= '<option value="' . MAIL_HIGH_PRIORITY . '">' . $user->lang['MAIL_HIGH_PRIORITY'] . '</option>';
|
||||
|
@@ -56,7 +56,7 @@ class acp_forums
|
||||
$total = request_var('total', 0);
|
||||
|
||||
$this->display_progress_bar($start, $total);
|
||||
exit;
|
||||
exit_handler();
|
||||
break;
|
||||
|
||||
case 'delete':
|
||||
@@ -74,14 +74,7 @@ class acp_forums
|
||||
{
|
||||
trigger_error($user->lang['NO_PERMISSION_FORUM_ADD'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
|
||||
}
|
||||
|
||||
case 'copy_perm':
|
||||
|
||||
if (!(($auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))))
|
||||
{
|
||||
trigger_error($user->lang['NO_PERMISSION_COPY'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -107,7 +100,7 @@ class acp_forums
|
||||
$cache->destroy('sql', FORUMS_TABLE);
|
||||
|
||||
trigger_error($user->lang['FORUM_DELETED'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id));
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case 'edit':
|
||||
@@ -125,7 +118,6 @@ class acp_forums
|
||||
'type_action' => request_var('type_action', ''),
|
||||
'forum_status' => request_var('forum_status', ITEM_UNLOCKED),
|
||||
'forum_parents' => '',
|
||||
'forum_options' => 0,
|
||||
'forum_name' => utf8_normalize_nfc(request_var('forum_name', '', true)),
|
||||
'forum_link' => request_var('forum_link', ''),
|
||||
'forum_link_track' => request_var('forum_link_track', false),
|
||||
@@ -147,7 +139,6 @@ class acp_forums
|
||||
'enable_icons' => request_var('enable_icons', false),
|
||||
'enable_prune' => request_var('enable_prune', false),
|
||||
'enable_post_review' => request_var('enable_post_review', true),
|
||||
'enable_quick_reply' => request_var('enable_quick_reply', false),
|
||||
'prune_days' => request_var('prune_days', 7),
|
||||
'prune_viewed' => request_var('prune_viewed', 7),
|
||||
'prune_freq' => request_var('prune_freq', 1),
|
||||
@@ -163,15 +154,12 @@ class acp_forums
|
||||
if ($forum_data['forum_type'] == FORUM_LINK)
|
||||
{
|
||||
$forum_data['display_on_index'] = request_var('link_display_on_index', false);
|
||||
}
|
||||
|
||||
// Linked forums and categories are not able to be locked...
|
||||
if ($forum_data['forum_type'] == FORUM_LINK || $forum_data['forum_type'] == FORUM_CAT)
|
||||
{
|
||||
// Linked forums are not able to be locked...
|
||||
$forum_data['forum_status'] = ITEM_UNLOCKED;
|
||||
}
|
||||
|
||||
$forum_data['show_active'] = ($forum_data['forum_type'] == FORUM_POST) ? request_var('display_recent', true) : request_var('display_active', true);
|
||||
$forum_data['show_active'] = ($forum_data['forum_type'] == FORUM_POST) ? request_var('display_recent', false) : request_var('display_active', false);
|
||||
|
||||
// Get data for forum rules if specified...
|
||||
if ($forum_data['forum_rules'])
|
||||
@@ -190,24 +178,74 @@ class acp_forums
|
||||
if (!sizeof($errors))
|
||||
{
|
||||
$forum_perm_from = request_var('forum_perm_from', 0);
|
||||
$cache->destroy('sql', FORUMS_TABLE);
|
||||
|
||||
// Copy permissions?
|
||||
if ($forum_perm_from && $forum_perm_from != $forum_data['forum_id'] &&
|
||||
($action != 'edit' || empty($forum_id) || ($auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))))
|
||||
if ($forum_perm_from && !empty($forum_perm_from) && $forum_perm_from != $forum_data['forum_id'] &&
|
||||
(($action != 'edit') || empty($forum_id) || ($auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))))
|
||||
{
|
||||
copy_forum_permissions($forum_perm_from, $forum_data['forum_id'], ($action == 'edit') ? true : false);
|
||||
// if we edit a forum delete current permissions first
|
||||
if ($action == 'edit')
|
||||
{
|
||||
$sql = 'DELETE FROM ' . ACL_USERS_TABLE . '
|
||||
WHERE forum_id = ' . (int) $forum_data['forum_id'];
|
||||
$db->sql_query($sql);
|
||||
|
||||
$sql = 'DELETE FROM ' . ACL_GROUPS_TABLE . '
|
||||
WHERE forum_id = ' . (int) $forum_data['forum_id'];
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
// From the mysql documentation:
|
||||
// Prior to MySQL 4.0.14, the target table of the INSERT statement cannot appear in the FROM clause of the SELECT part of the query. This limitation is lifted in 4.0.14.
|
||||
// Due to this we stay on the safe side if we do the insertion "the manual way"
|
||||
|
||||
// Copy permisisons from/to the acl users table (only forum_id gets changed)
|
||||
$sql = 'SELECT user_id, auth_option_id, auth_role_id, auth_setting
|
||||
FROM ' . ACL_USERS_TABLE . '
|
||||
WHERE forum_id = ' . $forum_perm_from;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$users_sql_ary = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$users_sql_ary[] = array(
|
||||
'user_id' => (int) $row['user_id'],
|
||||
'forum_id' => (int) $forum_data['forum_id'],
|
||||
'auth_option_id' => (int) $row['auth_option_id'],
|
||||
'auth_role_id' => (int) $row['auth_role_id'],
|
||||
'auth_setting' => (int) $row['auth_setting']
|
||||
);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Copy permisisons from/to the acl groups table (only forum_id gets changed)
|
||||
$sql = 'SELECT group_id, auth_option_id, auth_role_id, auth_setting
|
||||
FROM ' . ACL_GROUPS_TABLE . '
|
||||
WHERE forum_id = ' . $forum_perm_from;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$groups_sql_ary = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$groups_sql_ary[] = array(
|
||||
'group_id' => (int) $row['group_id'],
|
||||
'forum_id' => (int) $forum_data['forum_id'],
|
||||
'auth_option_id' => (int) $row['auth_option_id'],
|
||||
'auth_role_id' => (int) $row['auth_role_id'],
|
||||
'auth_setting' => (int) $row['auth_setting']
|
||||
);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Now insert the data
|
||||
$db->sql_multi_insert(ACL_USERS_TABLE, $users_sql_ary);
|
||||
$db->sql_multi_insert(ACL_GROUPS_TABLE, $groups_sql_ary);
|
||||
cache_moderators();
|
||||
}
|
||||
/* Commented out because of questionable UI workflow - re-visit for 3.0.7
|
||||
else if (!$this->parent_id && $action != 'edit' && $auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))
|
||||
{
|
||||
$this->copy_permission_page($forum_data);
|
||||
return;
|
||||
}
|
||||
*/
|
||||
$auth->acl_clear_prefetch();
|
||||
|
||||
$auth->acl_clear_prefetch();
|
||||
$cache->destroy('sql', FORUMS_TABLE);
|
||||
|
||||
$acl_url = '&mode=setting_forum_local&forum_id[]=' . $forum_data['forum_id'];
|
||||
|
||||
$message = ($action == 'add') ? $user->lang['FORUM_CREATED'] : $user->lang['FORUM_UPDATED'];
|
||||
@@ -382,7 +420,6 @@ class acp_forums
|
||||
$forum_data['forum_flags'] += (request_var('prune_sticky', false)) ? FORUM_FLAG_PRUNE_STICKY : 0;
|
||||
$forum_data['forum_flags'] += ($forum_data['show_active']) ? FORUM_FLAG_ACTIVE_TOPICS : 0;
|
||||
$forum_data['forum_flags'] += (request_var('enable_post_review', true)) ? FORUM_FLAG_POST_REVIEW : 0;
|
||||
$forum_data['forum_flags'] += (request_var('enable_quick_reply', false)) ? FORUM_FLAG_QUICK_REPLY : 0;
|
||||
}
|
||||
|
||||
// Show form to create/modify a forum
|
||||
@@ -444,8 +481,7 @@ class acp_forums
|
||||
'prune_days' => 7,
|
||||
'prune_viewed' => 7,
|
||||
'prune_freq' => 1,
|
||||
'forum_flags' => FORUM_FLAG_POST_REVIEW + FORUM_FLAG_ACTIVE_TOPICS,
|
||||
'forum_options' => 0,
|
||||
'forum_flags' => FORUM_FLAG_POST_REVIEW,
|
||||
'forum_password' => '',
|
||||
'forum_password_confirm'=> '',
|
||||
);
|
||||
@@ -507,7 +543,7 @@ class acp_forums
|
||||
|
||||
$forum_type_options = '';
|
||||
$forum_type_ary = array(FORUM_CAT => 'CAT', FORUM_POST => 'FORUM', FORUM_LINK => 'LINK');
|
||||
|
||||
|
||||
foreach ($forum_type_ary as $value => $lang)
|
||||
{
|
||||
$forum_type_options .= '<option value="' . $value . '"' . (($value == $forum_data['forum_type']) ? ' selected="selected"' : '') . '>' . $user->lang['TYPE_' . $lang] . '</option>';
|
||||
@@ -521,12 +557,13 @@ class acp_forums
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
WHERE forum_type = ' . FORUM_POST . "
|
||||
AND forum_id <> $forum_id";
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$postable_forum_exists = false;
|
||||
if ($db->sql_fetchrow($result))
|
||||
{
|
||||
$postable_forum_exists = true;
|
||||
$template->assign_vars(array(
|
||||
'S_MOVE_FORUM_OPTIONS' => make_forum_select($forum_data['parent_id'], $forum_id, false, true, false))
|
||||
);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
@@ -543,24 +580,25 @@ class acp_forums
|
||||
|
||||
$forums_list = make_forum_select($forum_data['parent_id'], $subforums_id);
|
||||
|
||||
if ($postable_forum_exists)
|
||||
$sql = 'SELECT forum_id
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
WHERE forum_type = ' . FORUM_POST . "
|
||||
AND forum_id <> $forum_id";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
if ($db->sql_fetchrow($result))
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_MOVE_FORUM_OPTIONS' => make_forum_select($forum_data['parent_id'], $subforums_id)) // , false, true, false???
|
||||
);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_HAS_SUBFORUMS' => ($forum_data['right_id'] - $forum_data['left_id'] > 1) ? true : false,
|
||||
'S_FORUMS_LIST' => $forums_list)
|
||||
);
|
||||
}
|
||||
else if ($postable_forum_exists)
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_MOVE_FORUM_OPTIONS' => make_forum_select($forum_data['parent_id'], $forum_id, false, true, false))
|
||||
);
|
||||
}
|
||||
|
||||
$s_show_display_on_index = false;
|
||||
|
||||
@@ -575,7 +613,7 @@ class acp_forums
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (strlen($forum_data['forum_password']) == 32)
|
||||
{
|
||||
$errors[] = $user->lang['FORUM_PASSWORD_OLD'];
|
||||
@@ -643,7 +681,6 @@ class acp_forums
|
||||
'S_PRUNE_STICKY' => ($forum_data['forum_flags'] & FORUM_FLAG_PRUNE_STICKY) ? true : false,
|
||||
'S_DISPLAY_ACTIVE_TOPICS' => ($forum_data['forum_flags'] & FORUM_FLAG_ACTIVE_TOPICS) ? true : false,
|
||||
'S_ENABLE_POST_REVIEW' => ($forum_data['forum_flags'] & FORUM_FLAG_POST_REVIEW) ? true : false,
|
||||
'S_ENABLE_QUICK_REPLY' => ($forum_data['forum_flags'] & FORUM_FLAG_QUICK_REPLY) ? true : false,
|
||||
'S_CAN_COPY_PERMISSIONS' => ($action != 'edit' || empty($forum_id) || ($auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))) ? true : false,
|
||||
));
|
||||
|
||||
@@ -674,7 +711,7 @@ class acp_forums
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
WHERE forum_type = ' . FORUM_POST . "
|
||||
AND forum_id <> $forum_id";
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
if ($db->sql_fetchrow($result))
|
||||
{
|
||||
@@ -702,32 +739,6 @@ class acp_forums
|
||||
|
||||
return;
|
||||
break;
|
||||
|
||||
case 'copy_perm':
|
||||
$forum_perm_from = request_var('forum_perm_from', 0);
|
||||
|
||||
// Copy permissions?
|
||||
if (!empty($forum_perm_from) && $forum_perm_from != $forum_id)
|
||||
{
|
||||
copy_forum_permissions($forum_perm_from, $forum_id, true);
|
||||
cache_moderators();
|
||||
$auth->acl_clear_prefetch();
|
||||
$cache->destroy('sql', FORUMS_TABLE);
|
||||
|
||||
$acl_url = '&mode=setting_forum_local&forum_id[]=' . $forum_id;
|
||||
|
||||
$message = $user->lang['FORUM_UPDATED'];
|
||||
|
||||
// Redirect to permissions
|
||||
if ($auth->acl_get('a_fauth'))
|
||||
{
|
||||
$message .= '<br /><br />' . sprintf($user->lang['REDIRECT_ACL'], '<a href="' . append_sid("{$phpbb_admin_path}index.$phpEx", 'i=permissions' . $acl_url) . '">', '</a>');
|
||||
}
|
||||
|
||||
trigger_error($message . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id));
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
// Default management page
|
||||
@@ -793,6 +804,10 @@ class acp_forums
|
||||
|
||||
$url = $this->u_action . "&parent_id=$this->parent_id&f={$row['forum_id']}";
|
||||
|
||||
$forum_title = ($forum_type != FORUM_LINK) ? '<a href="' . $this->u_action . '&parent_id=' . $row['forum_id'] . '">' : '';
|
||||
$forum_title .= $row['forum_name'];
|
||||
$forum_title .= ($forum_type != FORUM_LINK) ? '</a>' : '';
|
||||
|
||||
$template->assign_block_vars('forums', array(
|
||||
'FOLDER_IMAGE' => $folder_image,
|
||||
'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="" />' : '',
|
||||
@@ -870,7 +885,7 @@ class acp_forums
|
||||
*/
|
||||
function update_forum_data(&$forum_data)
|
||||
{
|
||||
global $db, $user, $cache, $phpbb_root_path;
|
||||
global $db, $user, $cache;
|
||||
|
||||
$errors = array();
|
||||
|
||||
@@ -903,18 +918,14 @@ class acp_forums
|
||||
$forum_data['prune_days'] = $forum_data['prune_viewed'] = $forum_data['prune_freq'] = 0;
|
||||
$errors[] = $user->lang['FORUM_DATA_NEGATIVE'];
|
||||
}
|
||||
|
||||
|
||||
$range_test_ary = array(
|
||||
array('lang' => 'FORUM_TOPICS_PAGE', 'value' => $forum_data['forum_topics_per_page'], 'column_type' => 'TINT:0'),
|
||||
);
|
||||
|
||||
if (!empty($forum_data['forum_image']) && !file_exists($phpbb_root_path . $forum_data['forum_image']))
|
||||
{
|
||||
$errors[] = $user->lang['FORUM_IMAGE_NO_EXIST'];
|
||||
}
|
||||
|
||||
validate_range($range_test_ary, $errors);
|
||||
|
||||
|
||||
|
||||
// Set forum flags
|
||||
// 1 = link tracking
|
||||
// 2 = prune old polls
|
||||
@@ -929,7 +940,6 @@ class acp_forums
|
||||
$forum_data['forum_flags'] += ($forum_data['prune_sticky']) ? FORUM_FLAG_PRUNE_STICKY : 0;
|
||||
$forum_data['forum_flags'] += ($forum_data['show_active']) ? FORUM_FLAG_ACTIVE_TOPICS : 0;
|
||||
$forum_data['forum_flags'] += ($forum_data['enable_post_review']) ? FORUM_FLAG_POST_REVIEW : 0;
|
||||
$forum_data['forum_flags'] += ($forum_data['enable_quick_reply']) ? FORUM_FLAG_QUICK_REPLY : 0;
|
||||
|
||||
// Unset data that are not database fields
|
||||
$forum_data_sql = $forum_data;
|
||||
@@ -940,7 +950,6 @@ class acp_forums
|
||||
unset($forum_data_sql['prune_sticky']);
|
||||
unset($forum_data_sql['show_active']);
|
||||
unset($forum_data_sql['enable_post_review']);
|
||||
unset($forum_data_sql['enable_quick_reply']);
|
||||
unset($forum_data_sql['forum_password_confirm']);
|
||||
|
||||
// What are we going to do tonight Brain? The same thing we do everynight,
|
||||
@@ -965,7 +974,7 @@ class acp_forums
|
||||
$forum_data_sql['forum_password'] = phpbb_hash($forum_data_sql['forum_password']);
|
||||
}
|
||||
unset($forum_data_sql['forum_password_unset']);
|
||||
|
||||
|
||||
if (!isset($forum_data_sql['forum_id']))
|
||||
{
|
||||
// no forum_id means we're creating a new forum
|
||||
@@ -1197,14 +1206,7 @@ class acp_forums
|
||||
|
||||
if ($row['parent_id'] != $forum_data_sql['parent_id'])
|
||||
{
|
||||
if ($row['forum_id'] != $forum_data_sql['parent_id'])
|
||||
{
|
||||
$errors = $this->move_forum($forum_data_sql['forum_id'], $forum_data_sql['parent_id']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$forum_data_sql['parent_id'] = $row['parent_id'];
|
||||
}
|
||||
$errors = $this->move_forum($forum_data_sql['forum_id'], $forum_data_sql['parent_id']);
|
||||
}
|
||||
|
||||
if (sizeof($errors))
|
||||
@@ -1630,7 +1632,7 @@ class acp_forums
|
||||
WHERE p.forum_id = $forum_id
|
||||
AND a.in_message = 0
|
||||
AND a.topic_id = p.topic_id";
|
||||
$result = $db->sql_query($sql);
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$topic_ids = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
@@ -1645,8 +1647,7 @@ class acp_forums
|
||||
$sql = 'SELECT poster_id
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE forum_id = ' . $forum_id . '
|
||||
AND post_postcount = 1
|
||||
AND post_approved = 1';
|
||||
AND post_postcount = 1';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$post_counts = array();
|
||||
@@ -1689,7 +1690,7 @@ class acp_forums
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
|
||||
// Delete everything else and curse your DB for not offering multi-table deletion
|
||||
$tables_ary = array(
|
||||
'post_id' => array(
|
||||
@@ -1767,7 +1768,6 @@ class acp_forums
|
||||
WHERE user_id = ' . $poster_id . '
|
||||
AND user_posts < ' . $substract;
|
||||
$db->sql_query($sql);
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET user_posts = user_posts - ' . $substract . '
|
||||
WHERE user_id = ' . $poster_id . '
|
||||
@@ -1811,7 +1811,7 @@ class acp_forums
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
set_config('upload_dir_size', (float) $row['stat'], true);
|
||||
set_config('upload_dir_size', (int) $row['stat'], true);
|
||||
|
||||
return array();
|
||||
}
|
||||
@@ -1917,31 +1917,6 @@ class acp_forums
|
||||
|
||||
adm_page_footer();
|
||||
}
|
||||
|
||||
/**
|
||||
* Display copy permission page
|
||||
* Not used at the moment - we will have a look at it for 3.0.7
|
||||
*/
|
||||
function copy_permission_page($forum_data)
|
||||
{
|
||||
global $phpEx, $phpbb_admin_path, $template, $user;
|
||||
|
||||
$acl_url = '&mode=setting_forum_local&forum_id[]=' . $forum_data['forum_id'];
|
||||
$action = append_sid($this->u_action . "&parent_id={$this->parent_id}&f={$forum_data['forum_id']}&action=copy_perm");
|
||||
|
||||
$l_acl = sprintf($user->lang['COPY_TO_ACL'], '<a href="' . append_sid("{$phpbb_admin_path}index.$phpEx", 'i=permissions' . $acl_url) . '">', '</a>');
|
||||
|
||||
$this->tpl_name = 'acp_forums_copy_perm';
|
||||
|
||||
$template->assign_vars(array(
|
||||
'U_ACL' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=permissions' . $acl_url),
|
||||
'L_ACL_LINK' => $l_acl,
|
||||
'L_BACK_LINK' => adm_back_link($this->u_action . '&parent_id=' . $this->parent_id),
|
||||
'S_COPY_ACTION' => $action,
|
||||
'S_FORUM_OPTIONS' => make_forum_select($forum_data['parent_id'], $forum_data['forum_id'], false, false, false),
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
@@ -87,32 +87,24 @@ class acp_groups
|
||||
|
||||
// Approve, demote or promote
|
||||
$group_name = ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name'];
|
||||
$error = group_user_attributes($action, $group_id, $mark_ary, false, $group_name);
|
||||
group_user_attributes($action, $group_id, $mark_ary, false, $group_name);
|
||||
|
||||
if (!$error)
|
||||
switch ($action)
|
||||
{
|
||||
switch ($action)
|
||||
{
|
||||
case 'demote':
|
||||
$message = 'GROUP_MODS_DEMOTED';
|
||||
break;
|
||||
case 'demote':
|
||||
$message = 'GROUP_MODS_DEMOTED';
|
||||
break;
|
||||
|
||||
case 'promote':
|
||||
$message = 'GROUP_MODS_PROMOTED';
|
||||
break;
|
||||
case 'promote':
|
||||
$message = 'GROUP_MODS_PROMOTED';
|
||||
break;
|
||||
|
||||
case 'approve':
|
||||
$message = 'USERS_APPROVED';
|
||||
break;
|
||||
}
|
||||
|
||||
trigger_error($user->lang[$message] . adm_back_link($this->u_action . '&action=list&g=' . $group_id));
|
||||
}
|
||||
else
|
||||
{
|
||||
trigger_error($user->lang[$error] . adm_back_link($this->u_action . '&action=list&g=' . $group_id), E_USER_WARNING);
|
||||
case 'approve':
|
||||
$message = 'USERS_APPROVED';
|
||||
break;
|
||||
}
|
||||
|
||||
trigger_error($user->lang[$message] . adm_back_link($this->u_action . '&action=list&g=' . $group_id));
|
||||
break;
|
||||
|
||||
case 'default':
|
||||
@@ -180,17 +172,13 @@ class acp_groups
|
||||
|
||||
case 'deleteusers':
|
||||
case 'delete':
|
||||
if (!$group_id)
|
||||
{
|
||||
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
else if ($action === 'delete' && $group_row['group_type'] == GROUP_SPECIAL)
|
||||
{
|
||||
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
if (!$group_id)
|
||||
{
|
||||
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$error = '';
|
||||
|
||||
switch ($action)
|
||||
@@ -307,9 +295,7 @@ class acp_groups
|
||||
'receive_pm' => isset($_REQUEST['group_receive_pm']) ? 1 : 0,
|
||||
'legend' => isset($_REQUEST['group_legend']) ? 1 : 0,
|
||||
'message_limit' => request_var('group_message_limit', 0),
|
||||
'max_recipients' => request_var('group_max_recipients', 0),
|
||||
'founder_manage' => 0,
|
||||
'skip_auth' => request_var('group_skip_auth', 0),
|
||||
);
|
||||
|
||||
if ($user->data['user_type'] == USER_FOUNDER)
|
||||
@@ -401,26 +387,11 @@ class acp_groups
|
||||
// were made.
|
||||
|
||||
$group_attributes = array();
|
||||
$test_variables = array(
|
||||
'rank' => 'int',
|
||||
'colour' => 'string',
|
||||
'avatar' => 'string',
|
||||
'avatar_type' => 'int',
|
||||
'avatar_width' => 'int',
|
||||
'avatar_height' => 'int',
|
||||
'receive_pm' => 'int',
|
||||
'legend' => 'int',
|
||||
'message_limit' => 'int',
|
||||
'max_recipients'=> 'int',
|
||||
'founder_manage'=> 'int',
|
||||
'skip_auth' => 'int',
|
||||
);
|
||||
|
||||
foreach ($test_variables as $test => $type)
|
||||
$test_variables = array('rank', 'colour', 'avatar', 'avatar_type', 'avatar_width', 'avatar_height', 'receive_pm', 'legend', 'message_limit', 'founder_manage');
|
||||
foreach ($test_variables as $test)
|
||||
{
|
||||
if (isset($submit_ary[$test]) && ($action == 'add' || $group_row['group_' . $test] != $submit_ary[$test]))
|
||||
{
|
||||
settype($submit_ary[$test], $type);
|
||||
$group_attributes['group_' . $test] = $group_row['group_' . $test] = $submit_ary[$test];
|
||||
}
|
||||
}
|
||||
@@ -576,9 +547,8 @@ class acp_groups
|
||||
'GROUP_FOUNDER_MANAGE' => (isset($group_row['group_founder_manage']) && $group_row['group_founder_manage']) ? ' checked="checked"' : '',
|
||||
'GROUP_LEGEND' => (isset($group_row['group_legend']) && $group_row['group_legend']) ? ' checked="checked"' : '',
|
||||
'GROUP_MESSAGE_LIMIT' => (isset($group_row['group_message_limit'])) ? $group_row['group_message_limit'] : 0,
|
||||
'GROUP_MAX_RECIPIENTS' => (isset($group_row['group_max_recipients'])) ? $group_row['group_max_recipients'] : 0,
|
||||
'GROUP_COLOUR' => (isset($group_row['group_colour'])) ? $group_row['group_colour'] : '',
|
||||
'GROUP_SKIP_AUTH' => (!empty($group_row['group_skip_auth'])) ? ' checked="checked"' : '',
|
||||
|
||||
|
||||
'S_DESC_BBCODE_CHECKED' => $group_desc_data['allow_bbcode'],
|
||||
'S_DESC_URLS_CHECKED' => $group_desc_data['allow_urls'],
|
||||
@@ -607,7 +577,8 @@ class acp_groups
|
||||
'U_SWATCH' => append_sid("{$phpbb_admin_path}swatch.$phpEx", 'form=settings&name=group_colour'),
|
||||
'U_ACTION' => "{$this->u_action}&action=$action&g=$group_id",
|
||||
'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], round($config['avatar_filesize'] / 1024)),
|
||||
));
|
||||
)
|
||||
);
|
||||
|
||||
return;
|
||||
break;
|
||||
@@ -622,7 +593,7 @@ class acp_groups
|
||||
$this->page_title = 'GROUP_MEMBERS';
|
||||
|
||||
// Grab the leaders - always, on every page...
|
||||
$sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_regdate, u.user_colour, u.user_posts, u.group_id, ug.group_leader, ug.user_pending
|
||||
$sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_regdate, u.user_posts, u.group_id, ug.group_leader, ug.user_pending
|
||||
FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug
|
||||
WHERE ug.group_id = $group_id
|
||||
AND u.user_id = ug.user_id
|
||||
@@ -636,12 +607,11 @@ class acp_groups
|
||||
'U_USER_EDIT' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=users&action=edit&u={$row['user_id']}"),
|
||||
|
||||
'USERNAME' => $row['username'],
|
||||
'USERNAME_COLOUR' => $row['user_colour'],
|
||||
'S_GROUP_DEFAULT' => ($row['group_id'] == $group_id) ? true : false,
|
||||
'JOINED' => ($row['user_regdate']) ? $user->format_date($row['user_regdate']) : ' - ',
|
||||
'USER_POSTS' => $row['user_posts'],
|
||||
'USER_ID' => $row['user_id'],
|
||||
));
|
||||
'USER_ID' => $row['user_id'])
|
||||
);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
@@ -678,7 +648,7 @@ class acp_groups
|
||||
));
|
||||
|
||||
// Grab the members
|
||||
$sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_colour, u.user_regdate, u.user_posts, u.group_id, ug.group_leader, ug.user_pending
|
||||
$sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_regdate, u.user_posts, u.group_id, ug.group_leader, ug.user_pending
|
||||
FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug
|
||||
WHERE ug.group_id = $group_id
|
||||
AND u.user_id = ug.user_id
|
||||
@@ -703,7 +673,6 @@ class acp_groups
|
||||
'U_USER_EDIT' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=users&action=edit&u={$row['user_id']}"),
|
||||
|
||||
'USERNAME' => $row['username'],
|
||||
'USERNAME_COLOUR' => $row['user_colour'],
|
||||
'S_GROUP_DEFAULT' => ($row['group_id'] == $group_id) ? true : false,
|
||||
'JOINED' => ($row['user_regdate']) ? $user->format_date($row['user_regdate']) : ' - ',
|
||||
'USER_POSTS' => $row['user_posts'],
|
||||
@@ -770,17 +739,18 @@ class acp_groups
|
||||
foreach ($row_ary as $group_id => $row)
|
||||
{
|
||||
$group_name = (!empty($user->lang['G_' . $row['group_name']]))? $user->lang['G_' . $row['group_name']] : $row['group_name'];
|
||||
|
||||
|
||||
$template->assign_block_vars('groups', array(
|
||||
'U_LIST' => "{$this->u_action}&action=list&g=$group_id",
|
||||
'U_EDIT' => "{$this->u_action}&action=edit&g=$group_id",
|
||||
'U_DELETE' => ($auth->acl_get('a_groupdel')) ? "{$this->u_action}&action=delete&g=$group_id" : '',
|
||||
|
||||
'S_GROUP_SPECIAL' => ($row['group_type'] == GROUP_SPECIAL) ? true : false,
|
||||
|
||||
|
||||
'GROUP_NAME' => $group_name,
|
||||
'TOTAL_MEMBERS' => $row['total_members'],
|
||||
));
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -73,13 +73,6 @@ class acp_icons
|
||||
|
||||
foreach ($imglist as $path => $img_ary)
|
||||
{
|
||||
if (empty($img_ary))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
asort($img_ary, SORT_STRING);
|
||||
|
||||
foreach ($img_ary as $img)
|
||||
{
|
||||
$img_size = getimagesize($phpbb_root_path . $img_path . '/' . $path . $img);
|
||||
@@ -89,18 +82,6 @@ class acp_icons
|
||||
continue;
|
||||
}
|
||||
|
||||
// adjust the width and height to be lower than 128px while perserving the aspect ratio
|
||||
if ($img_size[0] > 127 && $img_size[0] > $img_size[1])
|
||||
{
|
||||
$img_size[1] = (int) ($img_size[1] * (127 / $img_size[0]));
|
||||
$img_size[0] = 127;
|
||||
}
|
||||
else if ($img_size[1] > 127)
|
||||
{
|
||||
$img_size[0] = (int) ($img_size[0] * (127 / $img_size[1]));
|
||||
$img_size[1] = 127;
|
||||
}
|
||||
|
||||
$_images[$path . $img]['file'] = $path . $img;
|
||||
$_images[$path . $img]['width'] = $img_size[0];
|
||||
$_images[$path . $img]['height'] = $img_size[1];
|
||||
@@ -118,11 +99,6 @@ class acp_icons
|
||||
}
|
||||
}
|
||||
closedir($dir);
|
||||
|
||||
if (!empty($_paks))
|
||||
{
|
||||
asort($_paks, SORT_STRING);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,19 +156,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')
|
||||
@@ -243,15 +219,15 @@ class acp_icons
|
||||
$data = $_images;
|
||||
}
|
||||
|
||||
$colspan = (($mode == 'smilies') ? 7 : 5);
|
||||
$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_DISPLAY' => $order_list . $order_lists[1],
|
||||
'S_ORDER_LIST_UNDISPLAY' => $order_list . $order_lists[0],
|
||||
'S_ORDER_LIST_DISPLAY_COUNT' => $display_count + 1,
|
||||
@@ -298,10 +274,10 @@ class acp_icons
|
||||
'S_ADD_CODE' => true,
|
||||
|
||||
'S_IMG_OPTIONS' => $smiley_options,
|
||||
|
||||
|
||||
'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,
|
||||
@@ -315,7 +291,7 @@ class acp_icons
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case 'create':
|
||||
@@ -323,7 +299,7 @@ class acp_icons
|
||||
|
||||
// Get items to create/modify
|
||||
$images = (isset($_POST['image'])) ? array_keys(request_var('image', array('' => 0))) : array();
|
||||
|
||||
|
||||
// Now really get the items
|
||||
$image_id = (isset($_POST['id'])) ? request_var('id', array('' => 0)) : array();
|
||||
$image_order = (isset($_POST['order'])) ? request_var('order', array('' => 0)) : array();
|
||||
@@ -360,25 +336,6 @@ class acp_icons
|
||||
}
|
||||
}
|
||||
|
||||
if ($mode == 'smilies' && $action == 'create')
|
||||
{
|
||||
$smiley_count = $this->item_count($table);
|
||||
|
||||
$addable_smileys_count = sizeof($images);
|
||||
foreach ($images as $image)
|
||||
{
|
||||
if (!isset($image_add[$image]))
|
||||
{
|
||||
--$addable_smileys_count;
|
||||
}
|
||||
}
|
||||
|
||||
if ($smiley_count + $addable_smileys_count > SMILEY_LIMIT)
|
||||
{
|
||||
trigger_error(sprintf($user->lang['TOO_MANY_SMILIES'], SMILEY_LIMIT) . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
}
|
||||
|
||||
$icons_updated = 0;
|
||||
$errors = array();
|
||||
foreach ($images as $image)
|
||||
@@ -400,17 +357,6 @@ class acp_icons
|
||||
$image_height[$image] = $img_size[1];
|
||||
}
|
||||
|
||||
if ($image_width[$image] > 127 && $image_width[$image] > $image_height[$image])
|
||||
{
|
||||
$image_height[$image] = (int) ($image_height[$image] * (127 / $image_width[$image]));
|
||||
$image_width[$image] = 127;
|
||||
}
|
||||
else if ($image_height[$image] > 127)
|
||||
{
|
||||
$image_width[$image] = (int) ($image_width[$image] * (127 / $image_height[$image]));
|
||||
$image_height[$image] = 127;
|
||||
}
|
||||
|
||||
$img_sql = array(
|
||||
$fields . '_url' => $image,
|
||||
$fields . '_width' => $image_width[$image],
|
||||
@@ -468,13 +414,13 @@ class acp_icons
|
||||
$db->sql_query($sql);
|
||||
$icons_updated++;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$cache->destroy('_icons');
|
||||
$cache->destroy('sql', $table);
|
||||
|
||||
|
||||
$level = E_USER_NOTICE;
|
||||
switch ($icons_updated)
|
||||
{
|
||||
@@ -482,15 +428,15 @@ class acp_icons
|
||||
$suc_lang = "{$lang}_NONE";
|
||||
$level = E_USER_WARNING;
|
||||
break;
|
||||
|
||||
|
||||
case 1:
|
||||
$suc_lang = "{$lang}_ONE";
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
$suc_lang = $lang;
|
||||
}
|
||||
$errormsgs = '';
|
||||
$errormsgs = '<br />';
|
||||
foreach ($errors as $img => $error)
|
||||
{
|
||||
$errormsgs .= '<br />' . sprintf($user->lang[$error], $img);
|
||||
@@ -501,7 +447,7 @@ class acp_icons
|
||||
}
|
||||
else
|
||||
{
|
||||
trigger_error($user->lang[$suc_lang . '_ADDED'] . $errormsgs . adm_back_link($this->u_action), $level);
|
||||
trigger_error($user->lang[$suc_lang . '_ADDED'] . $errormsgs .adm_back_link($this->u_action), $level);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -537,6 +483,7 @@ class acp_icons
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// The user has already selected a smilies_pak file
|
||||
if ($current == 'delete')
|
||||
{
|
||||
@@ -582,15 +529,6 @@ class acp_icons
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
if ($mode == 'smilies')
|
||||
{
|
||||
$smiley_count = $this->item_count($table);
|
||||
if ($smiley_count + sizeof($pak_ary) > SMILEY_LIMIT)
|
||||
{
|
||||
trigger_error(sprintf($user->lang['TOO_MANY_SMILIES'], SMILEY_LIMIT) . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($pak_ary as $pak_entry)
|
||||
{
|
||||
$data = array();
|
||||
@@ -885,14 +823,11 @@ class acp_icons
|
||||
);
|
||||
|
||||
$spacer = false;
|
||||
$pagination_start = request_var('start', 0);
|
||||
|
||||
$item_count = $this->item_count($table);
|
||||
|
||||
$sql = "SELECT *
|
||||
FROM $table
|
||||
ORDER BY {$fields}_order ASC";
|
||||
$result = $db->sql_query_limit($sql, $config['smilies_per_page'], $pagination_start);
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
@@ -908,9 +843,9 @@ class acp_icons
|
||||
'EMOTION' => (isset($row['emotion'])) ? $row['emotion'] : '',
|
||||
'U_EDIT' => $this->u_action . '&action=edit&id=' . $row[$fields . '_id'],
|
||||
'U_DELETE' => $this->u_action . '&action=delete&id=' . $row[$fields . '_id'],
|
||||
'U_MOVE_UP' => $this->u_action . '&action=move_up&id=' . $row[$fields . '_id'] . '&start=' . $pagination_start,
|
||||
'U_MOVE_DOWN' => $this->u_action . '&action=move_down&id=' . $row[$fields . '_id'] . '&start=' . $pagination_start,
|
||||
));
|
||||
'U_MOVE_UP' => $this->u_action . '&action=move_up&id=' . $row[$fields . '_id'],
|
||||
'U_MOVE_DOWN' => $this->u_action . '&action=move_down&id=' . $row[$fields . '_id'])
|
||||
);
|
||||
|
||||
if (!$spacer && !$row['display_on_posting'])
|
||||
{
|
||||
@@ -918,28 +853,6 @@ class acp_icons
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$template->assign_var('PAGINATION',
|
||||
generate_pagination($this->u_action, $item_count, $config['smilies_per_page'], $pagination_start, true)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the count of smilies or icons in the database
|
||||
*
|
||||
* @param string $table The table of items to count.
|
||||
* @return int number of items
|
||||
*/
|
||||
/* private */ function item_count($table)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$sql = "SELECT COUNT(*) AS count
|
||||
FROM $table";
|
||||
$result = $db->sql_query($sql);
|
||||
$item_count = (int) $db->sql_fetchfield('count');
|
||||
$db->sql_freeresult($result);
|
||||
return $item_count;
|
||||
}
|
||||
}
|
||||
|
||||
|
89
phpBB/includes/acp/acp_inactive.php
Normal file → Executable file
89
phpBB/includes/acp/acp_inactive.php
Normal file → Executable file
@@ -51,19 +51,6 @@ class acp_inactive
|
||||
$form_key = 'acp_inactive';
|
||||
add_form_key($form_key);
|
||||
|
||||
// We build the sort key and per page settings here, because they may be needed later
|
||||
|
||||
// Number of entries to display
|
||||
$per_page = request_var('users_per_page', (int) $config['topics_per_page']);
|
||||
|
||||
// Sorting
|
||||
$limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
|
||||
$sort_by_text = array('i' => $user->lang['SORT_INACTIVE'], 'j' => $user->lang['SORT_REG_DATE'], 'l' => $user->lang['SORT_LAST_VISIT'], 'd' => $user->lang['SORT_LAST_REMINDER'], 'r' => $user->lang['SORT_REASON'], 'u' => $user->lang['SORT_USERNAME'], 'p' => $user->lang['SORT_POSTS'], 'e' => $user->lang['SORT_REMINDER']);
|
||||
$sort_by_sql = array('i' => 'user_inactive_time', 'j' => 'user_regdate', 'l' => 'user_lastvisit', 'd' => 'user_reminded_time', 'r' => 'user_inactive_reason', 'u' => 'username_clean', 'p' => 'user_posts', 'e' => 'user_reminded');
|
||||
|
||||
$s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
|
||||
gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
|
||||
|
||||
if ($submit && sizeof($mark))
|
||||
{
|
||||
if ($action !== 'delete' && !check_form_key($form_key))
|
||||
@@ -80,7 +67,7 @@ class acp_inactive
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('user_id', $mark);
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
|
||||
$user_affected = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
@@ -113,7 +100,7 @@ class acp_inactive
|
||||
{
|
||||
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
|
||||
|
||||
$messenger = new messenger(false);
|
||||
$messenger = new messenger();
|
||||
|
||||
foreach ($inactive_users as $row)
|
||||
{
|
||||
@@ -124,7 +111,6 @@ class acp_inactive
|
||||
$messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
|
||||
$messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
|
||||
$messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
|
||||
$messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
|
||||
|
||||
$messenger->assign_vars(array(
|
||||
'USERNAME' => htmlspecialchars_decode($row['username']))
|
||||
@@ -135,12 +121,6 @@ class acp_inactive
|
||||
|
||||
$messenger->save_queue();
|
||||
}
|
||||
|
||||
// For activate we really need to redirect, else a refresh can result in users being deactivated again
|
||||
$u_action = $this->u_action . "&$u_sort_param&start=$start";
|
||||
$u_action .= ($per_page != $config['topics_per_page']) ? "&users_per_page=$per_page" : '';
|
||||
|
||||
redirect($u_action);
|
||||
}
|
||||
else if ($action == 'delete')
|
||||
{
|
||||
@@ -181,11 +161,7 @@ class acp_inactive
|
||||
|
||||
$sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type, user_regdate, user_actkey
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('user_id', $mark) . '
|
||||
AND user_inactive_reason';
|
||||
|
||||
$sql .= ($config['require_activation'] == USER_ACTIVATION_ADMIN) ? ' = ' . INACTIVE_REMIND : ' <> ' . INACTIVE_MANUAL;
|
||||
|
||||
WHERE ' . $db->sql_in_set('user_id', $mark);
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
if ($row = $db->sql_fetchrow($result))
|
||||
@@ -194,7 +170,7 @@ class acp_inactive
|
||||
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
|
||||
|
||||
$messenger = new messenger();
|
||||
$usernames = $user_ids = array();
|
||||
$usernames = array();
|
||||
|
||||
do
|
||||
{
|
||||
@@ -203,48 +179,37 @@ class acp_inactive
|
||||
$messenger->to($row['user_email'], $row['username']);
|
||||
$messenger->im($row['user_jabber'], $row['username']);
|
||||
|
||||
$messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
|
||||
$messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
|
||||
$messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
|
||||
$messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
|
||||
|
||||
$messenger->assign_vars(array(
|
||||
'USERNAME' => htmlspecialchars_decode($row['username']),
|
||||
'REGISTER_DATE' => $user->format_date($row['user_regdate'], false, true),
|
||||
'REGISTER_DATE' => $user->format_date($row['user_regdate']),
|
||||
'U_ACTIVATE' => generate_board_url() . "/ucp.$phpEx?mode=activate&u=" . $row['user_id'] . '&k=' . $row['user_actkey'])
|
||||
);
|
||||
|
||||
$messenger->send($row['user_notify_type']);
|
||||
|
||||
$usernames[] = $row['username'];
|
||||
$user_ids[] = (int) $row['user_id'];
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
|
||||
$messenger->save_queue();
|
||||
|
||||
// Add the remind state to the database
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET user_reminded = user_reminded + 1,
|
||||
user_reminded_time = ' . time() . '
|
||||
WHERE ' . $db->sql_in_set('user_id', $user_ids);
|
||||
$db->sql_query($sql);
|
||||
|
||||
add_log('admin', 'LOG_INACTIVE_REMIND', implode(', ', $usernames));
|
||||
unset($usernames);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// For remind we really need to redirect, else a refresh can result in more than one reminder
|
||||
$u_action = $this->u_action . "&$u_sort_param&start=$start";
|
||||
$u_action .= ($per_page != $config['topics_per_page']) ? "&users_per_page=$per_page" : '';
|
||||
|
||||
redirect($u_action);
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Sorting
|
||||
$limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
|
||||
$sort_by_text = array('i' => $user->lang['SORT_INACTIVE'], 'j' => $user->lang['SORT_REG_DATE'], 'l' => $user->lang['SORT_LAST_VISIT'], 'r' => $user->lang['SORT_REASON'], 'u' => $user->lang['SORT_USERNAME']);
|
||||
$sort_by_sql = array('i' => 'user_inactive_time', 'j' => 'user_regdate', 'l' => 'user_lastvisit', 'r' => 'user_inactive_reason', 'u' => 'username_clean');
|
||||
|
||||
$s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
|
||||
gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
|
||||
|
||||
// Define where and sort sql for use in displaying logs
|
||||
$sql_where = ($sort_days) ? (time() - ($sort_days * 86400)) : 0;
|
||||
$sql_sort = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
|
||||
@@ -252,30 +217,19 @@ class acp_inactive
|
||||
$inactive = array();
|
||||
$inactive_count = 0;
|
||||
|
||||
$start = view_inactive_users($inactive, $inactive_count, $per_page, $start, $sql_where, $sql_sort);
|
||||
$start = view_inactive_users($inactive, $inactive_count, $config['topics_per_page'], $start, $sql_where, $sql_sort);
|
||||
|
||||
foreach ($inactive as $row)
|
||||
{
|
||||
$template->assign_block_vars('inactive', array(
|
||||
'INACTIVE_DATE' => $user->format_date($row['user_inactive_time']),
|
||||
'REMINDED_DATE' => $user->format_date($row['user_reminded_time']),
|
||||
'JOINED' => $user->format_date($row['user_regdate']),
|
||||
'LAST_VISIT' => (!$row['user_lastvisit']) ? ' - ' : $user->format_date($row['user_lastvisit']),
|
||||
|
||||
'REASON' => $row['inactive_reason'],
|
||||
'USER_ID' => $row['user_id'],
|
||||
'POSTS' => ($row['user_posts']) ? $row['user_posts'] : 0,
|
||||
'REMINDED' => $row['user_reminded'],
|
||||
|
||||
'REMINDED_EXPLAIN' => $user->lang('USER_LAST_REMINDED', (int) $row['user_reminded'], $user->format_date($row['user_reminded_time'])),
|
||||
|
||||
'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], false, append_sid("{$phpbb_admin_path}index.$phpEx", 'i=users&mode=overview')),
|
||||
'USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
'USER_COLOR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
|
||||
'U_USER_ADMIN' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=users&mode=overview&u={$row['user_id']}"),
|
||||
'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", "author_id={$row['user_id']}&sr=posts") : '',
|
||||
));
|
||||
'USERNAME' => $row['username'],
|
||||
'U_USER_ADMIN' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=users&mode=overview&u={$row['user_id']}"))
|
||||
);
|
||||
}
|
||||
|
||||
$option_ary = array('activate' => 'ACTIVATE', 'delete' => 'DELETE');
|
||||
@@ -291,10 +245,9 @@ class acp_inactive
|
||||
'S_LIMIT_DAYS' => $s_limit_days,
|
||||
'S_SORT_KEY' => $s_sort_key,
|
||||
'S_SORT_DIR' => $s_sort_dir,
|
||||
'S_ON_PAGE' => on_page($inactive_count, $per_page, $start),
|
||||
'PAGINATION' => generate_pagination($this->u_action . "&$u_sort_param&users_per_page=$per_page", $inactive_count, $per_page, $start, true),
|
||||
'USERS_PER_PAGE' => $per_page,
|
||||
|
||||
'S_ON_PAGE' => on_page($inactive_count, $config['topics_per_page'], $start),
|
||||
'PAGINATION' => generate_pagination($this->u_action . "&$u_sort_param", $inactive_count, $config['topics_per_page'], $start, true),
|
||||
|
||||
'U_ACTION' => $this->u_action . '&start=' . $start,
|
||||
));
|
||||
|
||||
|
@@ -85,20 +85,6 @@ class acp_jabber
|
||||
|
||||
$jabber->disconnect();
|
||||
}
|
||||
else
|
||||
{
|
||||
// This feature is disabled.
|
||||
// We update the user table to be sure all users that have IM as notify type are set to both as notify type
|
||||
// We set this to both because users still have their jabber address entered and may want to receive jabber notifications again once it is re-enabled.
|
||||
$sql_ary = array(
|
||||
'user_notify_type' => NOTIFY_BOTH,
|
||||
);
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
||||
WHERE user_notify_type = ' . NOTIFY_IM;
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
set_config('jab_enable', $jab_enable);
|
||||
set_config('jab_host', $jab_host);
|
||||
|
@@ -181,7 +181,7 @@ class acp_language
|
||||
case 'submit_file':
|
||||
case 'download_file':
|
||||
case 'upload_data':
|
||||
|
||||
|
||||
if (!$submit || !check_form_key($form_name))
|
||||
{
|
||||
trigger_error($user->lang['FORM_INVALID']. adm_back_link($this->u_action), E_USER_WARNING);
|
||||
@@ -261,16 +261,16 @@ class acp_language
|
||||
if (!$safe_mode)
|
||||
{
|
||||
$mkdir_ary = array('language', 'language/' . $row['lang_iso']);
|
||||
|
||||
|
||||
if ($this->language_directory)
|
||||
{
|
||||
$mkdir_ary[] = 'language/' . $row['lang_iso'] . '/' . $this->language_directory;
|
||||
}
|
||||
|
||||
|
||||
foreach ($mkdir_ary as $dir)
|
||||
{
|
||||
$dir = $phpbb_root_path . 'store/' . $dir;
|
||||
|
||||
|
||||
if (!is_dir($dir))
|
||||
{
|
||||
if (!@mkdir($dir, 0777))
|
||||
@@ -316,7 +316,7 @@ class acp_language
|
||||
}
|
||||
|
||||
$entry = "\tarray(\n";
|
||||
|
||||
|
||||
foreach ($value as $_key => $_value)
|
||||
{
|
||||
$entry .= "\t\t" . (int) $_key . "\t=> '" . $this->prepare_lang_entry($_value) . "',\n";
|
||||
@@ -433,7 +433,7 @@ class acp_language
|
||||
{
|
||||
trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
|
||||
$this->page_title = 'LANGUAGE_PACK_DETAILS';
|
||||
|
||||
$sql = 'SELECT *
|
||||
@@ -442,7 +442,7 @@ class acp_language
|
||||
$result = $db->sql_query($sql);
|
||||
$lang_entries = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
$lang_iso = $lang_entries['lang_iso'];
|
||||
$missing_vars = $missing_files = array();
|
||||
|
||||
@@ -488,7 +488,7 @@ class acp_language
|
||||
trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&action=details&id=' . $lang_id), E_USER_WARNING);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (isset($_POST['remove_store']))
|
||||
{
|
||||
$store_filename = $this->get_filename($lang_iso, $this->language_directory, $this->language_file, true, true);
|
||||
@@ -532,7 +532,7 @@ class acp_language
|
||||
if (file_exists($phpbb_root_path . $this->get_filename($lang_iso, '', $file)))
|
||||
{
|
||||
$missing_vars[$file] = $this->compare_language_files($config['default_lang'], $lang_iso, '', $file);
|
||||
|
||||
|
||||
if (sizeof($missing_vars[$file]))
|
||||
{
|
||||
$is_missing_var = true;
|
||||
@@ -550,7 +550,7 @@ class acp_language
|
||||
if (file_exists($phpbb_root_path . $this->get_filename($lang_iso, 'acp', $file)))
|
||||
{
|
||||
$missing_vars['acp/' . $file] = $this->compare_language_files($config['default_lang'], $lang_iso, 'acp', $file);
|
||||
|
||||
|
||||
if (sizeof($missing_vars['acp/' . $file]))
|
||||
{
|
||||
$is_missing_var = true;
|
||||
@@ -569,7 +569,7 @@ class acp_language
|
||||
if (file_exists($phpbb_root_path . $this->get_filename($lang_iso, 'mods', $file)))
|
||||
{
|
||||
$missing_vars['mods/' . $file] = $this->compare_language_files($config['default_lang'], $lang_iso, 'mods', $file);
|
||||
|
||||
|
||||
if (sizeof($missing_vars['mods/' . $file]))
|
||||
{
|
||||
$is_missing_var = true;
|
||||
@@ -581,7 +581,7 @@ class acp_language
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// More missing files... for example email templates?
|
||||
foreach ($email_files as $file)
|
||||
{
|
||||
@@ -766,41 +766,28 @@ class acp_language
|
||||
trigger_error($user->lang['NO_REMOVE_DEFAULT_LANG'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
$db->sql_query('DELETE FROM ' . LANG_TABLE . ' WHERE lang_id = ' . $lang_id);
|
||||
$db->sql_query('DELETE FROM ' . LANG_TABLE . ' WHERE lang_id = ' . $lang_id);
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . "
|
||||
SET user_lang = '" . $db->sql_escape($config['default_lang']) . "'
|
||||
WHERE user_lang = '" . $db->sql_escape($row['lang_iso']) . "'";
|
||||
$db->sql_query($sql);
|
||||
$sql = 'UPDATE ' . USERS_TABLE . "
|
||||
SET user_lang = '" . $db->sql_escape($config['default_lang']) . "'
|
||||
WHERE user_lang = '" . $db->sql_escape($row['lang_iso']) . "'";
|
||||
$db->sql_query($sql);
|
||||
|
||||
// We also need to remove the translated entries for custom profile fields - we want clean tables, don't we?
|
||||
$sql = 'DELETE FROM ' . PROFILE_LANG_TABLE . ' WHERE lang_id = ' . $lang_id;
|
||||
$db->sql_query($sql);
|
||||
// We also need to remove the translated entries for custom profile fields - we want clean tables, don't we?
|
||||
$sql = 'DELETE FROM ' . PROFILE_LANG_TABLE . ' WHERE lang_id = ' . $lang_id;
|
||||
$db->sql_query($sql);
|
||||
|
||||
$sql = 'DELETE FROM ' . PROFILE_FIELDS_LANG_TABLE . ' WHERE lang_id = ' . $lang_id;
|
||||
$db->sql_query($sql);
|
||||
$sql = 'DELETE FROM ' . PROFILE_FIELDS_LANG_TABLE . ' WHERE lang_id = ' . $lang_id;
|
||||
$db->sql_query($sql);
|
||||
|
||||
$sql = 'DELETE FROM ' . STYLES_IMAGESET_DATA_TABLE . " WHERE image_lang = '" . $db->sql_escape($row['lang_iso']) . "'";
|
||||
$result = $db->sql_query($sql);
|
||||
$sql = 'DELETE FROM ' . STYLES_IMAGESET_DATA_TABLE . " WHERE image_lang = '" . $db->sql_escape($row['lang_iso']) . "'";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$cache->destroy('sql', STYLES_IMAGESET_DATA_TABLE);
|
||||
$cache->destroy('sql', STYLES_IMAGESET_DATA_TABLE);
|
||||
|
||||
add_log('admin', 'LOG_LANGUAGE_PACK_DELETED', $row['lang_english_name']);
|
||||
add_log('admin', 'LOG_LANGUAGE_PACK_DELETED', $row['lang_english_name']);
|
||||
|
||||
trigger_error(sprintf($user->lang['LANGUAGE_PACK_DELETED'], $row['lang_english_name']) . adm_back_link($this->u_action));
|
||||
}
|
||||
else
|
||||
{
|
||||
$s_hidden_fields = array(
|
||||
'i' => $id,
|
||||
'mode' => $mode,
|
||||
'action' => $action,
|
||||
'id' => $lang_id,
|
||||
);
|
||||
confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields($s_hidden_fields));
|
||||
}
|
||||
trigger_error(sprintf($user->lang['LANGUAGE_PACK_DELETED'], $row['lang_english_name']) . adm_back_link($this->u_action));
|
||||
break;
|
||||
|
||||
case 'install':
|
||||
@@ -1059,7 +1046,7 @@ class acp_language
|
||||
$compress->add_data('', 'language/' . $row['lang_iso'] . '/index.html');
|
||||
$compress->add_data('', 'language/' . $row['lang_iso'] . '/email/index.html');
|
||||
$compress->add_data('', 'language/' . $row['lang_iso'] . '/acp/index.html');
|
||||
|
||||
|
||||
if (sizeof($mod_files))
|
||||
{
|
||||
$compress->add_data('', 'language/' . $row['lang_iso'] . '/mods/index.html');
|
||||
@@ -1221,7 +1208,7 @@ $lang = array_merge($lang, array(
|
||||
function get_filename($lang_iso, $directory, $filename, $check_store = false, $only_return_filename = false)
|
||||
{
|
||||
global $phpbb_root_path, $safe_mode;
|
||||
|
||||
|
||||
$check_filename = "language/$lang_iso/" . (($directory) ? $directory . '/' : '') . $filename;
|
||||
|
||||
if ($check_store)
|
||||
@@ -1267,7 +1254,7 @@ $lang = array_merge($lang, array(
|
||||
$keys = func_get_args();
|
||||
|
||||
$non_static = array_shift($keys);
|
||||
$value = utf8_normalize_nfc(array_shift($keys));
|
||||
$value = array_shift($keys);
|
||||
|
||||
if (!$non_static)
|
||||
{
|
||||
|
@@ -33,7 +33,6 @@ class acp_logs
|
||||
// Set up general vars
|
||||
$action = request_var('action', '');
|
||||
$forum_id = request_var('f', 0);
|
||||
$topic_id = request_var('t', 0);
|
||||
$start = request_var('start', 0);
|
||||
$deletemark = (!empty($_POST['delmarked'])) ? true : false;
|
||||
$deleteall = (!empty($_POST['delall'])) ? true : false;
|
||||
@@ -105,9 +104,6 @@ class acp_logs
|
||||
$sql_where = ($sort_days) ? (time() - ($sort_days * 86400)) : 0;
|
||||
$sql_sort = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
|
||||
|
||||
$keywords = utf8_normalize_nfc(request_var('keywords', '', true));
|
||||
$keywords_param = !empty($keywords) ? '&keywords=' . urlencode(htmlspecialchars_decode($keywords)) : '';
|
||||
|
||||
$l_title = $user->lang['ACP_' . strtoupper($mode) . '_LOGS'];
|
||||
$l_title_explain = $user->lang['ACP_' . strtoupper($mode) . '_LOGS_EXPLAIN'];
|
||||
|
||||
@@ -127,7 +123,7 @@ class acp_logs
|
||||
// Grab log data
|
||||
$log_data = array();
|
||||
$log_count = 0;
|
||||
view_log($mode, $log_data, $log_count, $config['topics_per_page'], $start, $forum_id, 0, 0, $sql_where, $sql_sort, $keywords);
|
||||
view_log($mode, $log_data, $log_count, $config['topics_per_page'], $start, $forum_id, 0, 0, $sql_where, $sql_sort);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'L_TITLE' => $l_title,
|
||||
@@ -135,13 +131,12 @@ class acp_logs
|
||||
'U_ACTION' => $this->u_action,
|
||||
|
||||
'S_ON_PAGE' => on_page($log_count, $config['topics_per_page'], $start),
|
||||
'PAGINATION' => generate_pagination($this->u_action . "&$u_sort_param$keywords_param", $log_count, $config['topics_per_page'], $start, true),
|
||||
'PAGINATION' => generate_pagination($this->u_action . "&$u_sort_param", $log_count, $config['topics_per_page'], $start, true),
|
||||
|
||||
'S_LIMIT_DAYS' => $s_limit_days,
|
||||
'S_SORT_KEY' => $s_sort_key,
|
||||
'S_SORT_DIR' => $s_sort_dir,
|
||||
'S_CLEARLOGS' => $auth->acl_get('a_clearlogs'),
|
||||
'S_KEYWORDS' => $keywords,
|
||||
)
|
||||
);
|
||||
|
||||
|
@@ -61,14 +61,6 @@ class acp_main
|
||||
|
||||
if ($action)
|
||||
{
|
||||
if ($action === 'admlogout')
|
||||
{
|
||||
$user->unset_admin();
|
||||
$redirect_url = append_sid("{$phpbb_root_path}index.$phpEx");
|
||||
meta_refresh(3, $redirect_url);
|
||||
trigger_error($user->lang['ADM_LOGGED_OUT'] . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . $redirect_url . '">', '</a>'));
|
||||
}
|
||||
|
||||
if (!confirm_box(true))
|
||||
{
|
||||
switch ($action)
|
||||
@@ -97,10 +89,6 @@ class acp_main
|
||||
$confirm = true;
|
||||
$confirm_lang = 'PURGE_CACHE_CONFIRM';
|
||||
break;
|
||||
case 'purge_sessions':
|
||||
$confirm = true;
|
||||
$confirm_lang = 'PURGE_SESSIONS_CONFIRM';
|
||||
break;
|
||||
|
||||
default:
|
||||
$confirm = true;
|
||||
@@ -120,7 +108,6 @@ class acp_main
|
||||
{
|
||||
switch ($action)
|
||||
{
|
||||
|
||||
case 'online':
|
||||
if (!$auth->acl_get('a_board'))
|
||||
{
|
||||
@@ -170,9 +157,9 @@ class acp_main
|
||||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
WHERE is_orphan = 0';
|
||||
$result = $db->sql_query($sql);
|
||||
set_config('upload_dir_size', (float) $db->sql_fetchfield('stat'), true);
|
||||
set_config('upload_dir_size', (int) $db->sql_fetchfield('stat'), true);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
if (!function_exists('update_last_username'))
|
||||
{
|
||||
include($phpbb_root_path . "includes/functions_user.$phpEx");
|
||||
@@ -188,63 +175,22 @@ class acp_main
|
||||
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
// Resync post counts
|
||||
$start = $max_post_id = 0;
|
||||
|
||||
// Find the maximum post ID, we can only stop the cycle when we've reached it
|
||||
$sql = 'SELECT MAX(forum_last_post_id) as max_post_id
|
||||
FROM ' . FORUMS_TABLE;
|
||||
$sql = 'SELECT COUNT(p.post_id) AS num_posts, u.user_id
|
||||
FROM ' . USERS_TABLE . ' u
|
||||
LEFT JOIN ' . POSTS_TABLE . ' p ON (u.user_id = p.poster_id AND p.post_postcount = 1)
|
||||
GROUP BY u.user_id';
|
||||
$result = $db->sql_query($sql);
|
||||
$max_post_id = (int) $db->sql_fetchfield('max_post_id');
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$db->sql_query('UPDATE ' . USERS_TABLE . " SET user_posts = {$row['num_posts']} WHERE user_id = {$row['user_id']}");
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// No maximum post id? :o
|
||||
if (!$max_post_id)
|
||||
{
|
||||
$sql = 'SELECT MAX(post_id)
|
||||
FROM ' . POSTS_TABLE;
|
||||
$result = $db->sql_query($sql);
|
||||
$max_post_id = (int) $db->sql_fetchfield('max_post_id');
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
// Still no maximum post id? Then we are finished
|
||||
if (!$max_post_id)
|
||||
{
|
||||
add_log('admin', 'LOG_RESYNC_POSTCOUNTS');
|
||||
break;
|
||||
}
|
||||
|
||||
$step = ($config['num_posts']) ? (max((int) ($config['num_posts'] / 5), 20000)) : 20000;
|
||||
$db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_posts = 0');
|
||||
|
||||
while ($start < $max_post_id)
|
||||
{
|
||||
$sql = 'SELECT COUNT(post_id) AS num_posts, poster_id
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE post_id BETWEEN ' . ($start + 1) . ' AND ' . ($start + $step) . '
|
||||
AND post_postcount = 1 AND post_approved = 1
|
||||
GROUP BY poster_id';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
if ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
do
|
||||
{
|
||||
$sql = 'UPDATE ' . USERS_TABLE . " SET user_posts = user_posts + {$row['num_posts']} WHERE user_id = {$row['poster_id']}";
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$start += $step;
|
||||
}
|
||||
|
||||
add_log('admin', 'LOG_RESYNC_POSTCOUNTS');
|
||||
|
||||
break;
|
||||
|
||||
|
||||
case 'date':
|
||||
if (!$auth->acl_get('a_board'))
|
||||
{
|
||||
@@ -254,7 +200,7 @@ class acp_main
|
||||
set_config('board_startdate', time() - 1);
|
||||
add_log('admin', 'LOG_RESET_DATE');
|
||||
break;
|
||||
|
||||
|
||||
case 'db_track':
|
||||
switch ($db->sql_layer)
|
||||
{
|
||||
@@ -276,7 +222,7 @@ class acp_main
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
WHERE forum_type <> ' . FORUM_CAT;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
|
||||
$forum_ids = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
@@ -326,7 +272,7 @@ class acp_main
|
||||
$db->sql_multi_insert(TOPICS_POSTED_TABLE, $sql_ary);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
add_log('admin', 'LOG_RESYNC_POST_MARKING');
|
||||
break;
|
||||
|
||||
@@ -345,76 +291,10 @@ class acp_main
|
||||
|
||||
add_log('admin', 'LOG_PURGE_CACHE');
|
||||
break;
|
||||
|
||||
case 'purge_sessions':
|
||||
if ((int) $user->data['user_type'] !== USER_FOUNDER)
|
||||
{
|
||||
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$tables = array(CONFIRM_TABLE, SESSIONS_TABLE);
|
||||
|
||||
foreach ($tables as $table)
|
||||
{
|
||||
switch ($db->sql_layer)
|
||||
{
|
||||
case 'sqlite':
|
||||
case 'firebird':
|
||||
$db->sql_query("DELETE FROM $table");
|
||||
break;
|
||||
|
||||
default:
|
||||
$db->sql_query("TRUNCATE TABLE $table");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// let's restore the admin session
|
||||
$reinsert_ary = array(
|
||||
'session_id' => (string) $user->session_id,
|
||||
'session_page' => (string) substr($user->page['page'], 0, 199),
|
||||
'session_forum_id' => $user->page['forum'],
|
||||
'session_user_id' => (int) $user->data['user_id'],
|
||||
'session_start' => (int) $user->data['session_start'],
|
||||
'session_last_visit' => (int) $user->data['session_last_visit'],
|
||||
'session_time' => (int) $user->time_now,
|
||||
'session_browser' => (string) trim(substr($user->browser, 0, 149)),
|
||||
'session_forwarded_for' => (string) $user->forwarded_for,
|
||||
'session_ip' => (string) $user->ip,
|
||||
'session_autologin' => (int) $user->data['session_autologin'],
|
||||
'session_admin' => 1,
|
||||
'session_viewonline' => (int) $user->data['session_viewonline'],
|
||||
);
|
||||
|
||||
$sql = 'INSERT INTO ' . SESSIONS_TABLE . ' ' . $db->sql_build_array('INSERT', $reinsert_ary);
|
||||
$db->sql_query($sql);
|
||||
|
||||
add_log('admin', 'LOG_PURGE_SESSIONS');
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Version check
|
||||
$user->add_lang('install');
|
||||
|
||||
$latest_version_info = false;
|
||||
if (($latest_version_info = obtain_latest_version_info(request_var('versioncheck_force', false))) === false)
|
||||
{
|
||||
$template->assign_var('S_VERSIONCHECK_FAIL', true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$latest_version_info = explode("\n", $latest_version_info);
|
||||
|
||||
$latest_version = str_replace('rc', 'RC', strtolower(trim($latest_version_info[0])));
|
||||
$current_version = str_replace('rc', 'RC', strtolower($config['version']));
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_VERSION_UP_TO_DATE' => version_compare($current_version, $latest_version, '<') ? false : true,
|
||||
));
|
||||
}
|
||||
|
||||
// Get forum statistics
|
||||
$total_posts = $config['num_posts'];
|
||||
$total_topics = $config['num_topics'];
|
||||
@@ -431,7 +311,7 @@ class acp_main
|
||||
$files_per_day = sprintf('%.2f', $total_files / $boarddays);
|
||||
|
||||
$upload_dir_size = get_formatted_filesize($config['upload_dir_size']);
|
||||
|
||||
|
||||
$avatar_dir_size = 0;
|
||||
|
||||
if ($avatar_dir = @opendir($phpbb_root_path . $config['avatar_path']))
|
||||
@@ -505,15 +385,13 @@ class acp_main
|
||||
'UPLOAD_DIR_SIZE' => $upload_dir_size,
|
||||
'TOTAL_ORPHAN' => $total_orphan,
|
||||
'S_TOTAL_ORPHAN' => ($total_orphan === false) ? false : true,
|
||||
'GZIP_COMPRESSION' => ($config['gzip_compress'] && @extension_loaded('zlib')) ? $user->lang['ON'] : $user->lang['OFF'],
|
||||
'GZIP_COMPRESSION' => ($config['gzip_compress']) ? $user->lang['ON'] : $user->lang['OFF'],
|
||||
'DATABASE_INFO' => $db->sql_server_info(),
|
||||
'BOARD_VERSION' => $config['version'],
|
||||
|
||||
'U_ACTION' => $this->u_action,
|
||||
'U_ADMIN_LOG' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=logs&mode=admin'),
|
||||
'U_INACTIVE_USERS' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=inactive&mode=list'),
|
||||
'U_VERSIONCHECK' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=update&mode=version_check'),
|
||||
'U_VERSIONCHECK_FORCE' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=1&versioncheck_force=1'),
|
||||
|
||||
'S_ACTION_OPTIONS' => ($auth->acl_get('a_board')) ? true : false,
|
||||
'S_FOUNDER' => ($user->data['user_type'] == USER_FOUNDER) ? true : false,
|
||||
@@ -540,8 +418,6 @@ class acp_main
|
||||
|
||||
if ($auth->acl_get('a_user'))
|
||||
{
|
||||
$user->add_lang('memberlist');
|
||||
|
||||
$inactive = array();
|
||||
$inactive_count = 0;
|
||||
|
||||
@@ -551,24 +427,13 @@ class acp_main
|
||||
{
|
||||
$template->assign_block_vars('inactive', array(
|
||||
'INACTIVE_DATE' => $user->format_date($row['user_inactive_time']),
|
||||
'REMINDED_DATE' => $user->format_date($row['user_reminded_time']),
|
||||
'JOINED' => $user->format_date($row['user_regdate']),
|
||||
'LAST_VISIT' => (!$row['user_lastvisit']) ? ' - ' : $user->format_date($row['user_lastvisit']),
|
||||
|
||||
'REASON' => $row['inactive_reason'],
|
||||
'USER_ID' => $row['user_id'],
|
||||
'POSTS' => ($row['user_posts']) ? $row['user_posts'] : 0,
|
||||
'REMINDED' => $row['user_reminded'],
|
||||
|
||||
'REMINDED_EXPLAIN' => $user->lang('USER_LAST_REMINDED', (int) $row['user_reminded'], $user->format_date($row['user_reminded_time'])),
|
||||
|
||||
'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], false, append_sid("{$phpbb_admin_path}index.$phpEx", 'i=users&mode=overview')),
|
||||
'USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
'USER_COLOR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
|
||||
'U_USER_ADMIN' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=users&mode=overview&u={$row['user_id']}"),
|
||||
'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", "author_id={$row['user_id']}&sr=posts") : '',
|
||||
));
|
||||
'USERNAME' => $row['username'],
|
||||
'U_USER_ADMIN' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=users&mode=overview&u={$row['user_id']}"))
|
||||
);
|
||||
}
|
||||
|
||||
$option_ary = array('activate' => 'ACTIVATE', 'delete' => 'DELETE');
|
||||
@@ -584,23 +449,11 @@ class acp_main
|
||||
}
|
||||
|
||||
// Warn if install is still present
|
||||
if (file_exists($phpbb_root_path . 'install') && !is_file($phpbb_root_path . 'install'))
|
||||
if (file_exists($phpbb_root_path . 'install'))
|
||||
{
|
||||
$template->assign_var('S_REMOVE_INSTALL', true);
|
||||
}
|
||||
|
||||
if (!defined('PHPBB_DISABLE_CONFIG_CHECK') && file_exists($phpbb_root_path . 'config.' . $phpEx) && phpbb_is_writable($phpbb_root_path . 'config.' . $phpEx))
|
||||
{
|
||||
// World-Writable? (000x)
|
||||
$template->assign_var('S_WRITABLE_CONFIG', (bool) (@fileperms($phpbb_root_path . 'config.' . $phpEx) & 0x0002));
|
||||
}
|
||||
|
||||
// Fill dbms version if not yet filled
|
||||
if (empty($config['dbms_version']))
|
||||
{
|
||||
set_config('dbms_version', $db->sql_server_info(true));
|
||||
}
|
||||
|
||||
$this->tpl_name = 'acp_main';
|
||||
$this->page_title = 'ACP_MAIN';
|
||||
}
|
||||
|
@@ -658,8 +658,6 @@ class acp_modules
|
||||
|
||||
$iteration++;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
unset($padding_store);
|
||||
|
||||
return $module_list;
|
||||
|
@@ -23,7 +23,7 @@ class acp_permissions
|
||||
{
|
||||
var $u_action;
|
||||
var $permission_dropdown;
|
||||
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $auth, $template, $cache;
|
||||
@@ -57,21 +57,6 @@ class acp_permissions
|
||||
trigger_error('NO_MODE', E_USER_ERROR);
|
||||
}
|
||||
|
||||
// Copy forum permissions
|
||||
if ($mode == 'setting_forum_copy')
|
||||
{
|
||||
$this->tpl_name = 'permission_forum_copy';
|
||||
|
||||
if ($auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))
|
||||
{
|
||||
$this->page_title = 'ACP_FORUM_PERMISSIONS_COPY';
|
||||
$this->copy_forum_permissions();
|
||||
return;
|
||||
}
|
||||
|
||||
trigger_error('NO_MODE', E_USER_ERROR);
|
||||
}
|
||||
|
||||
// Set some vars
|
||||
$action = request_var('action', array('' => 0));
|
||||
$action = key($action);
|
||||
@@ -109,7 +94,7 @@ class acp_permissions
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
|
||||
// Map usernames to ids and vice versa
|
||||
if ($usernames)
|
||||
{
|
||||
@@ -127,7 +112,7 @@ class acp_permissions
|
||||
}
|
||||
}
|
||||
unset($username);
|
||||
|
||||
|
||||
// Build forum ids (of all forums are checked or subforum listing used)
|
||||
if ($all_forums)
|
||||
{
|
||||
@@ -232,71 +217,43 @@ class acp_permissions
|
||||
trigger_error($user->lang['WRONG_PERMISSION_TYPE'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
|
||||
// Handle actions
|
||||
if (strpos($mode, 'setting_') === 0 && $action)
|
||||
{
|
||||
switch ($action)
|
||||
{
|
||||
case 'delete':
|
||||
if (confirm_box(true))
|
||||
|
||||
if (!check_form_key($form_name))
|
||||
{
|
||||
// All users/groups selected?
|
||||
$all_users = (isset($_POST['all_users'])) ? true : false;
|
||||
$all_groups = (isset($_POST['all_groups'])) ? true : false;
|
||||
trigger_error($user->lang['FORM_INVALID']. adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
// All users/groups selected?
|
||||
$all_users = (isset($_POST['all_users'])) ? true : false;
|
||||
$all_groups = (isset($_POST['all_groups'])) ? true : false;
|
||||
|
||||
if ($all_users || $all_groups)
|
||||
{
|
||||
$items = $this->retrieve_defined_user_groups($permission_scope, $forum_id, $permission_type);
|
||||
if ($all_users || $all_groups)
|
||||
{
|
||||
$items = $this->retrieve_defined_user_groups($permission_scope, $forum_id, $permission_type);
|
||||
|
||||
if ($all_users && sizeof($items['user_ids']))
|
||||
{
|
||||
$user_id = $items['user_ids'];
|
||||
}
|
||||
else if ($all_groups && sizeof($items['group_ids']))
|
||||
{
|
||||
$group_id = $items['group_ids'];
|
||||
}
|
||||
if ($all_users && sizeof($items['user_ids']))
|
||||
{
|
||||
$user_id = $items['user_ids'];
|
||||
}
|
||||
else if ($all_groups && sizeof($items['group_ids']))
|
||||
{
|
||||
$group_id = $items['group_ids'];
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof($user_id) || sizeof($group_id))
|
||||
{
|
||||
$this->remove_permissions($mode, $permission_type, $auth_admin, $user_id, $group_id, $forum_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
trigger_error($user->lang['NO_USER_GROUP_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
if (sizeof($user_id) || sizeof($group_id))
|
||||
{
|
||||
$this->remove_permissions($mode, $permission_type, $auth_admin, $user_id, $group_id, $forum_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isset($_POST['cancel']))
|
||||
{
|
||||
$u_redirect = $this->u_action . '&type=' . $permission_type;
|
||||
foreach ($forum_id as $fid)
|
||||
{
|
||||
$u_redirect .= '&forum_id[]=' . $fid;
|
||||
}
|
||||
redirect($u_redirect);
|
||||
}
|
||||
|
||||
$s_hidden_fields = array(
|
||||
'i' => $id,
|
||||
'mode' => $mode,
|
||||
'action' => array($action => 1),
|
||||
'user_id' => $user_id,
|
||||
'group_id' => $group_id,
|
||||
'forum_id' => $forum_id,
|
||||
'type' => $permission_type,
|
||||
);
|
||||
if (isset($_POST['all_users']))
|
||||
{
|
||||
$s_hidden_fields['all_users'] = 1;
|
||||
}
|
||||
if (isset($_POST['all_groups']))
|
||||
{
|
||||
$s_hidden_fields['all_groups'] = 1;
|
||||
}
|
||||
confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields($s_hidden_fields));
|
||||
trigger_error($user->lang['NO_USER_GROUP_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -412,8 +369,8 @@ class acp_permissions
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_SELECT_GROUP' => true,
|
||||
'S_GROUP_OPTIONS' => group_select_options(false, false, false), // Show all groups
|
||||
));
|
||||
'S_GROUP_OPTIONS' => group_select_options(false, false, (($user->data['user_type'] == USER_FOUNDER) ? false : 0)))
|
||||
);
|
||||
|
||||
break;
|
||||
|
||||
@@ -458,7 +415,7 @@ class acp_permissions
|
||||
'S_SELECT_USERGROUP_VIEW' => ($victim == 'usergroup_view') ? true : false,
|
||||
'S_DEFINED_USER_OPTIONS' => $items['user_ids_options'],
|
||||
'S_DEFINED_GROUP_OPTIONS' => $items['group_ids_options'],
|
||||
'S_ADD_GROUP_OPTIONS' => group_select_options(false, $items['group_ids'], false), // Show all groups
|
||||
'S_ADD_GROUP_OPTIONS' => group_select_options(false, $items['group_ids'], (($user->data['user_type'] == USER_FOUNDER) ? false : 0)),
|
||||
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=add_user&field=username&select_single=true'),
|
||||
));
|
||||
|
||||
@@ -571,7 +528,7 @@ class acp_permissions
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if ($branch_there)
|
||||
{
|
||||
$s_options .= ' [' . $user->lang['PLUS_SUBFORUMS'] . ']';
|
||||
@@ -582,14 +539,14 @@ class acp_permissions
|
||||
|
||||
return $s_options;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Build dropdown field for changing permission types
|
||||
*/
|
||||
function build_permission_dropdown($options, $default_option, $permission_scope)
|
||||
{
|
||||
global $user, $auth;
|
||||
|
||||
|
||||
$s_dropdown_options = '';
|
||||
foreach ($options as $setting)
|
||||
{
|
||||
@@ -669,7 +626,7 @@ class acp_permissions
|
||||
{
|
||||
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
|
||||
$ug_id = $forum_id = 0;
|
||||
|
||||
// We loop through the auth settings defined in our submit
|
||||
@@ -805,14 +762,7 @@ class acp_permissions
|
||||
|
||||
$this->log_action($mode, 'add', $permission_type, $ug_type, $ug_ids, $forum_ids);
|
||||
|
||||
if ($mode == 'setting_forum_local' || $mode == 'setting_mod_local')
|
||||
{
|
||||
trigger_error($user->lang['AUTH_UPDATED'] . adm_back_link($this->u_action . '&forum_id[]=' . implode('&forum_id[]=', $forum_ids)));
|
||||
}
|
||||
else
|
||||
{
|
||||
trigger_error($user->lang['AUTH_UPDATED'] . adm_back_link($this->u_action));
|
||||
}
|
||||
trigger_error($user->lang['AUTH_UPDATED'] . adm_back_link($this->u_action));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -859,7 +809,7 @@ class acp_permissions
|
||||
function remove_permissions($mode, $permission_type, &$auth_admin, &$user_id, &$group_id, &$forum_id)
|
||||
{
|
||||
global $user, $db, $auth;
|
||||
|
||||
|
||||
// User or group to be set?
|
||||
$ug_type = (sizeof($user_id)) ? 'user' : 'group';
|
||||
|
||||
@@ -879,14 +829,7 @@ class acp_permissions
|
||||
|
||||
$this->log_action($mode, 'del', $permission_type, $ug_type, (($ug_type == 'user') ? $user_id : $group_id), (sizeof($forum_id) ? $forum_id : array(0 => 0)));
|
||||
|
||||
if ($mode == 'setting_forum_local' || $mode == 'setting_mod_local')
|
||||
{
|
||||
trigger_error($user->lang['AUTH_UPDATED'] . adm_back_link($this->u_action . '&forum_id[]=' . implode('&forum_id[]=', $forum_id)));
|
||||
}
|
||||
else
|
||||
{
|
||||
trigger_error($user->lang['AUTH_UPDATED'] . adm_back_link($this->u_action));
|
||||
}
|
||||
trigger_error($user->lang['AUTH_UPDATED'] . adm_back_link($this->u_action));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1006,7 +949,6 @@ class acp_permissions
|
||||
LEFT JOIN ' . USER_GROUP_TABLE . ' ug ON (ug.group_id = g.group_id)
|
||||
WHERE ug.user_id = ' . $user_id . '
|
||||
AND ug.user_pending = 0
|
||||
AND NOT (ug.group_leader = 1 AND g.group_skip_auth = 1)
|
||||
ORDER BY g.group_type DESC, g.group_id DESC';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
@@ -1167,57 +1109,6 @@ class acp_permissions
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles copying permissions from one forum to others
|
||||
*/
|
||||
function copy_forum_permissions()
|
||||
{
|
||||
global $auth, $cache, $template, $user;
|
||||
|
||||
$user->add_lang('acp/forums');
|
||||
|
||||
$submit = isset($_POST['submit']) ? true : false;
|
||||
|
||||
if ($submit)
|
||||
{
|
||||
$src = request_var('src_forum_id', 0);
|
||||
$dest = request_var('dest_forum_ids', array(0));
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
if (copy_forum_permissions($src, $dest))
|
||||
{
|
||||
cache_moderators();
|
||||
|
||||
$auth->acl_clear_prefetch();
|
||||
$cache->destroy('sql', FORUMS_TABLE);
|
||||
|
||||
trigger_error($user->lang['AUTH_UPDATED'] . adm_back_link($this->u_action));
|
||||
}
|
||||
else
|
||||
{
|
||||
trigger_error($user->lang['SELECTED_FORUM_NOT_EXIST'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$s_hidden_fields = array(
|
||||
'submit' => $submit,
|
||||
'src_forum_id' => $src,
|
||||
'dest_forum_ids' => $dest,
|
||||
);
|
||||
|
||||
$s_hidden_fields = build_hidden_fields($s_hidden_fields);
|
||||
|
||||
confirm_box(false, $user->lang['COPY_PERMISSIONS_CONFIRM'], $s_hidden_fields);
|
||||
}
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_FORUM_OPTIONS' => make_forum_select(false, false, false, false, false),
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get already assigned users/groups
|
||||
*/
|
||||
@@ -1259,17 +1150,13 @@ class acp_permissions
|
||||
{
|
||||
$sql_where = 'AND (' . $db->sql_in_set('a.auth_option_id', $option_ids) . ' OR ' . $db->sql_in_set('a.auth_role_id', $role_ids) . ')';
|
||||
}
|
||||
else if (sizeof($role_ids))
|
||||
{
|
||||
$sql_where = 'AND ' . $db->sql_in_set('a.auth_role_id', $role_ids);
|
||||
}
|
||||
else if (sizeof($option_ids))
|
||||
else
|
||||
{
|
||||
$sql_where = 'AND ' . $db->sql_in_set('a.auth_option_id', $option_ids);
|
||||
}
|
||||
|
||||
// Not ideal, due to the filesort, non-use of indexes, etc.
|
||||
$sql = 'SELECT DISTINCT u.user_id, u.username, u.username_clean, u.user_regdate
|
||||
$sql = 'SELECT DISTINCT u.user_id, u.username
|
||||
FROM ' . USERS_TABLE . ' u, ' . ACL_USERS_TABLE . " a
|
||||
WHERE u.user_id = a.user_id
|
||||
$sql_forum_id
|
||||
|
@@ -77,7 +77,7 @@ class acp_profile
|
||||
FROM ' . PROFILE_LANG_TABLE . '
|
||||
ORDER BY lang_id';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
// Which languages are available for each item
|
||||
@@ -206,7 +206,7 @@ class acp_profile
|
||||
'field_id' => $field_id,
|
||||
)));
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case 'activate':
|
||||
@@ -216,7 +216,7 @@ class acp_profile
|
||||
{
|
||||
trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
|
||||
$sql = 'SELECT lang_id
|
||||
FROM ' . LANG_TABLE . "
|
||||
WHERE lang_iso = '" . $db->sql_escape($config['default_lang']) . "'";
|
||||
@@ -253,7 +253,7 @@ class acp_profile
|
||||
{
|
||||
trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
|
||||
$sql = 'UPDATE ' . PROFILE_FIELDS_TABLE . "
|
||||
SET field_active = 0
|
||||
WHERE field_id = $field_id";
|
||||
@@ -285,7 +285,7 @@ class acp_profile
|
||||
|
||||
case 'create':
|
||||
case 'edit':
|
||||
|
||||
|
||||
$field_id = request_var('field_id', 0);
|
||||
$step = request_var('step', 1);
|
||||
|
||||
@@ -354,22 +354,20 @@ class acp_profile
|
||||
{
|
||||
// We are adding a new field, define basic params
|
||||
$lang_options = $field_row = array();
|
||||
|
||||
|
||||
$field_type = request_var('field_type', 0);
|
||||
|
||||
|
||||
if (!$field_type)
|
||||
{
|
||||
trigger_error($user->lang['NO_FIELD_TYPE'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$field_row = array_merge($default_values[$field_type], array(
|
||||
'field_ident' => str_replace(' ', '_', utf8_clean_string(request_var('field_ident', '', true))),
|
||||
'field_ident' => utf8_clean_string(request_var('field_ident', '', true)),
|
||||
'field_required' => 0,
|
||||
'field_hide' => 0,
|
||||
'field_show_profile'=> 0,
|
||||
'field_no_view' => 0,
|
||||
'field_show_on_reg' => 0,
|
||||
'field_show_on_vt' => 0,
|
||||
'lang_name' => utf8_normalize_nfc(request_var('field_ident', '', true)),
|
||||
'lang_explain' => '',
|
||||
'lang_default_value'=> '')
|
||||
@@ -380,7 +378,7 @@ class acp_profile
|
||||
|
||||
// $exclude contains the data we gather in each step
|
||||
$exclude = array(
|
||||
1 => array('field_ident', 'lang_name', 'lang_explain', 'field_option_none', 'field_show_on_reg', 'field_show_on_vt', 'field_required', 'field_hide', 'field_show_profile', 'field_no_view'),
|
||||
1 => array('field_ident', 'lang_name', 'lang_explain', 'field_option', 'field_no_view'),
|
||||
2 => array('field_length', 'field_maxlen', 'field_minlen', 'field_validation', 'field_novalue', 'field_default_value'),
|
||||
3 => array('l_lang_name', 'l_lang_explain', 'l_lang_default_value', 'l_lang_options')
|
||||
);
|
||||
@@ -402,21 +400,25 @@ class acp_profile
|
||||
$cp->vars['lang_explain'] = utf8_normalize_nfc(request_var('lang_explain', $field_row['lang_explain'], true));
|
||||
$cp->vars['lang_default_value'] = utf8_normalize_nfc(request_var('lang_default_value', $field_row['lang_default_value'], true));
|
||||
|
||||
// Visibility Options...
|
||||
$visibility_ary = array(
|
||||
'field_required',
|
||||
'field_show_on_reg',
|
||||
'field_show_on_vt',
|
||||
'field_show_profile',
|
||||
'field_hide',
|
||||
);
|
||||
|
||||
foreach ($visibility_ary as $val)
|
||||
// Field option...
|
||||
if (isset($_REQUEST['field_option']))
|
||||
{
|
||||
$cp->vars[$val] = ($submit || $save) ? request_var($val, 0) : $field_row[$val];
|
||||
$field_option = request_var('field_option', '');
|
||||
|
||||
$cp->vars['field_required'] = ($field_option == 'field_required') ? 1 : 0;
|
||||
$cp->vars['field_show_on_reg'] = ($field_option == 'field_show_on_reg') ? 1 : 0;
|
||||
$cp->vars['field_hide'] = ($field_option == 'field_hide') ? 1 : 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$cp->vars['field_required'] = $field_row['field_required'];
|
||||
$cp->vars['field_show_on_reg'] = $field_row['field_show_on_reg'];
|
||||
$cp->vars['field_hide'] = $field_row['field_hide'];
|
||||
|
||||
$field_option = ($field_row['field_required']) ? 'field_required' : (($field_row['field_show_on_reg']) ? 'field_show_on_reg' : (($field_row['field_hide']) ? 'field_hide' : ''));
|
||||
}
|
||||
|
||||
$cp->vars['field_no_view'] = request_var('field_no_view', (int) $field_row['field_no_view']);
|
||||
$cp->vars['field_no_view'] = request_var('field_no_view', $field_row['field_no_view']);
|
||||
|
||||
// A boolean field expects an array as the lang options
|
||||
if ($field_type == FIELD_BOOL)
|
||||
@@ -479,7 +481,7 @@ class acp_profile
|
||||
else if ($field_type == FIELD_DATE && $key == 'field_default_value')
|
||||
{
|
||||
$always_now = request_var('always_now', -1);
|
||||
|
||||
|
||||
if ($always_now == 1 || ($always_now === -1 && $var == 'now'))
|
||||
{
|
||||
$now = getdate();
|
||||
@@ -502,21 +504,13 @@ class acp_profile
|
||||
{
|
||||
list($cp->vars['field_default_value_day'], $cp->vars['field_default_value_month'], $cp->vars['field_default_value_year']) = explode('-', $var);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/* 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);
|
||||
}*/
|
||||
else if ($field_type == FIELD_INT && $key == 'field_default_value')
|
||||
{
|
||||
// Permit an empty string
|
||||
if (request_var('field_default_value', '') === '')
|
||||
{
|
||||
$var = '';
|
||||
}
|
||||
}
|
||||
|
||||
$cp->vars[$key] = $var;
|
||||
}
|
||||
@@ -539,7 +533,7 @@ class acp_profile
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
|
||||
$sql = 'SELECT lang_id, lang_name, lang_explain, lang_default_value
|
||||
FROM ' . PROFILE_LANG_TABLE . '
|
||||
WHERE lang_id <> ' . $this->edit_lang_id . "
|
||||
@@ -556,7 +550,7 @@ class acp_profile
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
|
||||
foreach ($exclude[3] as $key)
|
||||
{
|
||||
$cp->vars[$key] = utf8_normalize_nfc(request_var($key, array(0 => ''), true));
|
||||
@@ -575,7 +569,7 @@ class acp_profile
|
||||
{
|
||||
$cp->vars[$key][$lang_id] = explode("\n", $options);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -715,7 +709,7 @@ class acp_profile
|
||||
|
||||
'L_TITLE' => $user->lang['STEP_' . $step . '_TITLE_' . strtoupper($action)],
|
||||
'L_EXPLAIN' => $user->lang['STEP_' . $step . '_EXPLAIN_' . strtoupper($action)],
|
||||
|
||||
|
||||
'U_ACTION' => $this->u_action . "&action=$action&step=$step",
|
||||
'U_BACK' => $this->u_action)
|
||||
);
|
||||
@@ -725,15 +719,13 @@ class acp_profile
|
||||
{
|
||||
// Create basic options - only small differences between field types
|
||||
case 1:
|
||||
|
||||
|
||||
// Build common create options
|
||||
$template->assign_vars(array(
|
||||
'S_STEP_ONE' => true,
|
||||
'S_FIELD_REQUIRED' => ($cp->vars['field_required']) ? true : false,
|
||||
'S_SHOW_ON_REG' => ($cp->vars['field_show_on_reg']) ? true : false,
|
||||
'S_SHOW_ON_VT' => ($cp->vars['field_show_on_vt']) ? true : false,
|
||||
'S_FIELD_HIDE' => ($cp->vars['field_hide']) ? true : false,
|
||||
'S_SHOW_PROFILE' => ($cp->vars['field_show_profile']) ? true : false,
|
||||
'S_FIELD_NO_VIEW' => ($cp->vars['field_no_view']) ? true : false,
|
||||
|
||||
'L_LANG_SPECIFIC' => sprintf($user->lang['LANG_SPECIFIC_OPTIONS'], $config['default_lang']),
|
||||
@@ -754,7 +746,7 @@ class acp_profile
|
||||
'LANG_DEFAULT_VALUE' => $cp->vars['lang_default_value'])
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
if ($field_type == FIELD_BOOL || $field_type == FIELD_DROPDOWN)
|
||||
{
|
||||
// Initialize these array elements if we are creating a new field
|
||||
@@ -783,11 +775,11 @@ class acp_profile
|
||||
'SECOND_LANG_OPTION' => ($field_type == FIELD_BOOL) ? $cp->vars['lang_options'][1] : '')
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case 2:
|
||||
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_STEP_TWO' => true,
|
||||
'L_NEXT_STEP' => (sizeof($this->lang_defs['iso']) == 1) ? $user->lang['SAVE'] : $user->lang['PROFILE_LANG_OPTIONS'])
|
||||
@@ -825,7 +817,7 @@ class acp_profile
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -837,7 +829,7 @@ class acp_profile
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . PROFILE_FIELDS_TABLE . '
|
||||
ORDER BY field_order';
|
||||
@@ -913,14 +905,14 @@ class acp_profile
|
||||
$languages[$row['lang_id']] = $row['lang_iso'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
$options = array();
|
||||
$options['lang_name'] = 'string';
|
||||
if ($cp->vars['lang_explain'])
|
||||
{
|
||||
$options['lang_explain'] = 'text';
|
||||
}
|
||||
|
||||
|
||||
switch ($field_type)
|
||||
{
|
||||
case FIELD_BOOL:
|
||||
@@ -930,16 +922,16 @@ class acp_profile
|
||||
case FIELD_DROPDOWN:
|
||||
$options['lang_options'] = 'optionfield';
|
||||
break;
|
||||
|
||||
|
||||
case FIELD_TEXT:
|
||||
case FIELD_STRING:
|
||||
if (strlen($cp->vars['lang_default_value']))
|
||||
if ($cp->vars['lang_default_value'])
|
||||
{
|
||||
$options['lang_default_value'] = ($field_type == FIELD_STRING) ? 'string' : 'text';
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
$lang_options = array();
|
||||
|
||||
foreach ($options as $field => $field_type)
|
||||
@@ -965,7 +957,7 @@ class acp_profile
|
||||
if ($field == 'lang_options')
|
||||
{
|
||||
$var = (!isset($cp->vars['l_lang_options'][$lang_id]) || !is_array($cp->vars['l_lang_options'][$lang_id])) ? $cp->vars['lang_options'] : $cp->vars['l_lang_options'][$lang_id];
|
||||
|
||||
|
||||
switch ($field_type)
|
||||
{
|
||||
case 'two_options':
|
||||
@@ -986,7 +978,7 @@ class acp_profile
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (isset($user->lang['CP_' . strtoupper($field) . '_EXPLAIN']))
|
||||
{
|
||||
$lang_options[$lang_id]['fields'][$field]['EXPLAIN'] = $user->lang['CP_' . strtoupper($field) . '_EXPLAIN'];
|
||||
@@ -1000,7 +992,7 @@ class acp_profile
|
||||
'TITLE' => $user->lang['CP_' . strtoupper($field)],
|
||||
'FIELD' => ($field_type == 'string') ? '<dd><input class="medium" type="text" name="l_' . $field . '[' . $lang_id . ']" value="' . ((isset($value[$lang_id])) ? $value[$lang_id] : $var) . '" /></dd>' : '<dd><textarea name="l_' . $field . '[' . $lang_id . ']" rows="3" cols="80">' . ((isset($value[$lang_id])) ? $value[$lang_id] : $var) . '</textarea></dd>'
|
||||
);
|
||||
|
||||
|
||||
if (isset($user->lang['CP_' . strtoupper($field) . '_EXPLAIN']))
|
||||
{
|
||||
$lang_options[$lang_id]['fields'][$field]['EXPLAIN'] = $user->lang['CP_' . strtoupper($field) . '_EXPLAIN'];
|
||||
@@ -1047,9 +1039,7 @@ class acp_profile
|
||||
'field_validation' => $cp->vars['field_validation'],
|
||||
'field_required' => $cp->vars['field_required'],
|
||||
'field_show_on_reg' => $cp->vars['field_show_on_reg'],
|
||||
'field_show_on_vt' => $cp->vars['field_show_on_vt'],
|
||||
'field_hide' => $cp->vars['field_hide'],
|
||||
'field_show_profile' => $cp->vars['field_show_profile'],
|
||||
'field_no_view' => $cp->vars['field_no_view']
|
||||
);
|
||||
|
||||
@@ -1075,7 +1065,7 @@ class acp_profile
|
||||
WHERE field_id = $field_id";
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
|
||||
if ($action == 'create')
|
||||
{
|
||||
$field_ident = 'pf_' . $field_ident;
|
||||
@@ -1092,7 +1082,7 @@ class acp_profile
|
||||
{
|
||||
$sql_ary['field_id'] = $field_id;
|
||||
$sql_ary['lang_id'] = $default_lang_id;
|
||||
|
||||
|
||||
$profile_sql[] = 'INSERT INTO ' . PROFILE_LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
|
||||
}
|
||||
else
|
||||
@@ -1165,7 +1155,7 @@ class acp_profile
|
||||
AND lang_id = " . (int) $default_lang_id;
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
|
||||
foreach ($cp->vars['lang_options'] as $option_id => $value)
|
||||
{
|
||||
$sql_ary = array(
|
||||
@@ -1268,7 +1258,7 @@ class acp_profile
|
||||
$lang_id = $sql['lang_id'];
|
||||
$option_id = $sql['option_id'];
|
||||
unset($sql['lang_id'], $sql['field_id'], $sql['option_id']);
|
||||
|
||||
|
||||
$this->update_insert(PROFILE_FIELDS_LANG_TABLE, $sql, array(
|
||||
'lang_id' => $lang_id,
|
||||
'field_id' => $field_id,
|
||||
@@ -1288,7 +1278,7 @@ class acp_profile
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$db->sql_transaction('commit');
|
||||
|
||||
if ($action == 'edit')
|
||||
@@ -1334,7 +1324,7 @@ class acp_profile
|
||||
if (!$row)
|
||||
{
|
||||
$sql_ary = array_merge($where_fields, $sql_ary);
|
||||
|
||||
|
||||
if (sizeof($sql_ary))
|
||||
{
|
||||
$db->sql_query("INSERT INTO $table " . $db->sql_build_array('INSERT', $sql_ary));
|
||||
@@ -1386,7 +1376,7 @@ class acp_profile
|
||||
case FIELD_BOOL:
|
||||
$sql .= 'TINYINT(2) ';
|
||||
break;
|
||||
|
||||
|
||||
case FIELD_DROPDOWN:
|
||||
$sql .= 'MEDIUMINT(8) ';
|
||||
break;
|
||||
@@ -1551,7 +1541,7 @@ class acp_profile
|
||||
case 'firebird':
|
||||
|
||||
// We are defining the biggest common value, because of the possibility to edit the min/max values of each field.
|
||||
$sql = 'ALTER TABLE ' . PROFILE_FIELDS_DATA_TABLE . ' ADD "' . strtoupper($field_ident) . '" ';
|
||||
$sql = 'ALTER TABLE ' . PROFILE_FIELDS_DATA_TABLE . " ADD \"$field_ident\" ";
|
||||
|
||||
switch ($field_type)
|
||||
{
|
||||
@@ -1622,4 +1612,4 @@ class acp_profile
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
@@ -406,12 +406,7 @@ class acp_prune
|
||||
$where_sql .= (sizeof($joined)) ? " AND user_regdate " . $key_match[$joined_select] . ' ' . gmmktime(0, 0, 0, (int) $joined[1], (int) $joined[2], (int) $joined[0]) : '';
|
||||
$where_sql .= ($count !== '') ? " AND user_posts " . $key_match[$count_select] . ' ' . (int) $count . ' ' : '';
|
||||
|
||||
// First handle pruning of users who never logged in, last active date is 0000-00-00
|
||||
if (sizeof($active) && (int) $active[0] == 0 && (int) $active[1] == 0 && (int) $active[2] == 0)
|
||||
{
|
||||
$where_sql .= ' AND user_lastvisit = 0';
|
||||
}
|
||||
else if (sizeof($active) && $active_select != 'lt')
|
||||
if (sizeof($active) && $active_select != 'lt')
|
||||
{
|
||||
$where_sql .= ' AND user_lastvisit ' . $key_match[$active_select] . ' ' . gmmktime(0, 0, 0, (int) $active[1], (int) $active[2], (int) $active[0]);
|
||||
}
|
||||
|
@@ -39,7 +39,7 @@ class acp_ranks
|
||||
$this->tpl_name = 'acp_ranks';
|
||||
$this->page_title = 'ACP_MANAGE_RANKS';
|
||||
|
||||
$form_name = 'acp_ranks';
|
||||
$form_name = 'acp_prune';
|
||||
add_form_key($form_name);
|
||||
|
||||
switch ($action)
|
||||
@@ -168,22 +168,25 @@ class acp_ranks
|
||||
{
|
||||
$img = $path . $img;
|
||||
|
||||
if ($ranks && $img == $ranks['rank_image'])
|
||||
if (!in_array($img, $existing_imgs) || $action == 'edit')
|
||||
{
|
||||
$selected = ' selected="selected"';
|
||||
$edit_img = $img;
|
||||
}
|
||||
else
|
||||
{
|
||||
$selected = '';
|
||||
}
|
||||
if ($ranks && $img == $ranks['rank_image'])
|
||||
{
|
||||
$selected = ' selected="selected"';
|
||||
$edit_img = $img;
|
||||
}
|
||||
else
|
||||
{
|
||||
$selected = '';
|
||||
}
|
||||
|
||||
if (strlen($img) > 255)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (strlen($img) > 255)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$filename_list .= '<option value="' . htmlspecialchars($img) . '"' . $selected . '>' . $img . ((in_array($img, $existing_imgs)) ? ' ' . $user->lang['RANK_IMAGE_IN_USE'] : '') . '</option>';
|
||||
$filename_list .= '<option value="' . htmlspecialchars($img) . '"' . $selected . '>' . $img . '</option>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -63,7 +63,6 @@ class acp_search
|
||||
'load_search' => 'bool',
|
||||
'limit_search_load' => 'float',
|
||||
'min_search_author_chars' => 'integer',
|
||||
'max_num_search_keywords' => 'integer',
|
||||
'search_store_results' => 'integer',
|
||||
);
|
||||
|
||||
@@ -217,7 +216,6 @@ class acp_search
|
||||
'SEARCH_INTERVAL' => (float) $config['search_interval'],
|
||||
'SEARCH_GUEST_INTERVAL' => (float) $config['search_anonymous_interval'],
|
||||
'SEARCH_STORE_RESULTS' => (int) $config['search_store_results'],
|
||||
'MAX_NUM_SEARCH_KEYWORDS' => (int) $config['max_num_search_keywords'],
|
||||
|
||||
'S_SEARCH_TYPES' => $search_options,
|
||||
'S_YES_SEARCH' => (bool) $config['load_search'],
|
||||
@@ -593,7 +591,7 @@ class acp_search
|
||||
|
||||
ksort($this->state);
|
||||
|
||||
set_config('search_indexing_state', implode(',', $this->state), true);
|
||||
set_config('search_indexing_state', implode(',', $this->state));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -1,90 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package acp
|
||||
* @version $Id$
|
||||
* @copyright (c) 2005 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
include($phpbb_root_path . 'includes/questionnaire/questionnaire.' . $phpEx);
|
||||
|
||||
/**
|
||||
* @package acp
|
||||
*/
|
||||
class acp_send_statistics
|
||||
{
|
||||
var $u_action;
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $config, $template, $phpbb_admin_path, $phpEx;
|
||||
|
||||
$collect_url = "http://www.phpbb.com/stats/receive_stats.php";
|
||||
|
||||
$this->tpl_name = 'acp_send_statistics';
|
||||
$this->page_title = 'ACP_SEND_STATISTICS';
|
||||
|
||||
// generate a unique id if necessary
|
||||
if (!isset($config['questionnaire_unique_id']))
|
||||
{
|
||||
$install_id = unique_id();
|
||||
set_config('questionnaire_unique_id', $install_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
$install_id = $config['questionnaire_unique_id'];
|
||||
}
|
||||
|
||||
$collector = new phpbb_questionnaire_data_collector($install_id);
|
||||
|
||||
// Add data provider
|
||||
$collector->add_data_provider(new phpbb_questionnaire_php_data_provider());
|
||||
$collector->add_data_provider(new phpbb_questionnaire_system_data_provider());
|
||||
$collector->add_data_provider(new phpbb_questionnaire_phpbb_data_provider($config));
|
||||
|
||||
$template->assign_vars(array(
|
||||
'U_COLLECT_STATS' => $collect_url,
|
||||
'RAW_DATA' => $collector->get_data_for_form(),
|
||||
'U_ACP_MAIN' => append_sid("{$phpbb_admin_path}index.$phpEx"),
|
||||
));
|
||||
|
||||
$raw = $collector->get_data_raw();
|
||||
|
||||
foreach ($raw as $provider => $data)
|
||||
{
|
||||
if ($provider == 'install_id')
|
||||
{
|
||||
$data = array($provider => $data);
|
||||
}
|
||||
|
||||
$template->assign_block_vars('providers', array(
|
||||
'NAME' => htmlspecialchars($provider),
|
||||
));
|
||||
|
||||
foreach ($data as $key => $value)
|
||||
{
|
||||
if (is_array($value))
|
||||
{
|
||||
$value = utf8_wordwrap(serialize($value), 75, "\n", true);
|
||||
}
|
||||
|
||||
$template->assign_block_vars('providers.values', array(
|
||||
'KEY' => utf8_htmlspecialchars($key),
|
||||
'VALUE' => utf8_htmlspecialchars($value),
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
File diff suppressed because it is too large
Load Diff
@@ -37,18 +37,17 @@ class acp_update
|
||||
$errstr = '';
|
||||
$errno = 0;
|
||||
|
||||
$info = obtain_latest_version_info(request_var('versioncheck_force', false), true);
|
||||
$info = get_remote_file('www.phpbb.com', '/updatecheck', ((defined('PHPBB_QA')) ? '30x_qa.txt' : '30x.txt'), $errstr, $errno);
|
||||
|
||||
if ($info === false)
|
||||
{
|
||||
trigger_error('VERSIONCHECK_FAIL', E_USER_WARNING);
|
||||
trigger_error($errstr, E_USER_WARNING);
|
||||
}
|
||||
|
||||
$info = explode("\n", $info);
|
||||
$latest_version = trim($info[0]);
|
||||
|
||||
$announcement_url = trim($info[1]);
|
||||
$announcement_url = (strpos($announcement_url, '&') === false) ? str_replace('&', '&', $announcement_url) : $announcement_url;
|
||||
$update_link = append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=update');
|
||||
|
||||
// Determine automatic update...
|
||||
@@ -69,7 +68,6 @@ class acp_update
|
||||
'S_UP_TO_DATE_AUTO' => $up_to_date_automatic,
|
||||
'S_VERSION_CHECK' => true,
|
||||
'U_ACTION' => $this->u_action,
|
||||
'U_VERSIONCHECK_FORCE' => append_sid($this->u_action . '&versioncheck_force=1'),
|
||||
|
||||
'LATEST_VERSION' => $latest_version,
|
||||
'CURRENT_VERSION' => $config['version'],
|
||||
|
@@ -385,31 +385,6 @@ class acp_users
|
||||
|
||||
user_active_flip('flip', $user_id);
|
||||
|
||||
if ($user_row['user_type'] == USER_INACTIVE)
|
||||
{
|
||||
if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
|
||||
{
|
||||
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
|
||||
|
||||
$messenger = new messenger(false);
|
||||
|
||||
$messenger->template('admin_welcome_activated', $user_row['user_lang']);
|
||||
|
||||
$messenger->to($user_row['user_email'], $user_row['username']);
|
||||
|
||||
$messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
|
||||
$messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
|
||||
$messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
|
||||
$messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
|
||||
|
||||
$messenger->assign_vars(array(
|
||||
'USERNAME' => htmlspecialchars_decode($user_row['username']))
|
||||
);
|
||||
|
||||
$messenger->send(NOTIFY_EMAIL);
|
||||
}
|
||||
}
|
||||
|
||||
$message = ($user_row['user_type'] == USER_INACTIVE) ? 'USER_ADMIN_ACTIVATED' : 'USER_ADMIN_DEACTIVED';
|
||||
$log = ($user_row['user_type'] == USER_INACTIVE) ? 'LOG_USER_ACTIVE' : 'LOG_USER_INACTIVE';
|
||||
|
||||
@@ -520,56 +495,6 @@ class acp_users
|
||||
|
||||
break;
|
||||
|
||||
case 'deloutbox':
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
$msg_ids = array();
|
||||
$lang = 'EMPTY';
|
||||
|
||||
$sql = 'SELECT msg_id
|
||||
FROM ' . PRIVMSGS_TO_TABLE . "
|
||||
WHERE author_id = $user_id
|
||||
AND folder_id = " . PRIVMSGS_OUTBOX;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
if ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if (!function_exists('delete_pm'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx);
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
$msg_ids[] = (int) $row['msg_id'];
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
delete_pm($user_id, $msg_ids, PRIVMSGS_OUTBOX);
|
||||
|
||||
add_log('admin', 'LOG_USER_DEL_OUTBOX', $user_row['username']);
|
||||
|
||||
$lang = 'EMPTIED';
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
trigger_error($user->lang['USER_OUTBOX_' . $lang] . adm_back_link($this->u_action . '&u=' . $user_id));
|
||||
}
|
||||
else
|
||||
{
|
||||
confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
|
||||
'u' => $user_id,
|
||||
'i' => $id,
|
||||
'mode' => $mode,
|
||||
'action' => $action,
|
||||
'update' => true))
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'moveposts':
|
||||
|
||||
if (!check_form_key($form_name))
|
||||
@@ -709,7 +634,7 @@ class acp_users
|
||||
|
||||
if (sizeof($topic_id_ary))
|
||||
{
|
||||
sync('topic_reported', 'topic_id', $topic_id_ary);
|
||||
sync('reported', 'topic_id', $topic_id_ary);
|
||||
sync('topic', 'topic_id', $topic_id_ary);
|
||||
}
|
||||
|
||||
@@ -725,28 +650,6 @@ class acp_users
|
||||
trigger_error($user->lang['USER_POSTS_MOVED'] . adm_back_link($this->u_action . '&u=' . $user_id));
|
||||
|
||||
break;
|
||||
|
||||
case 'leave_nr':
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
remove_newly_registered($user_id, $user_row);
|
||||
|
||||
add_log('admin', 'LOG_USER_REMOVED_NR', $user_row['username']);
|
||||
trigger_error($user->lang['USER_LIFTED_NR'] . adm_back_link($this->u_action . '&u=' . $user_id));
|
||||
}
|
||||
else
|
||||
{
|
||||
confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
|
||||
'u' => $user_id,
|
||||
'i' => $id,
|
||||
'mode' => $mode,
|
||||
'action' => $action,
|
||||
'update' => true))
|
||||
);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
// Handle registration info updates
|
||||
@@ -872,7 +775,7 @@ class acp_users
|
||||
{
|
||||
$sql_ary += array(
|
||||
'user_email' => $update_email,
|
||||
'user_email_hash' => phpbb_email_hash($update_email),
|
||||
'user_email_hash' => crc32($update_email) . strlen($update_email)
|
||||
);
|
||||
|
||||
add_log('user', $user_id, 'LOG_USER_UPDATE_EMAIL', $user_row['username'], $user_row['user_email'], $update_email);
|
||||
@@ -917,11 +820,7 @@ class acp_users
|
||||
|
||||
if ($user_id == $user->data['user_id'])
|
||||
{
|
||||
$quick_tool_ary = array('delsig' => 'DEL_SIG', 'delavatar' => 'DEL_AVATAR', 'moveposts' => 'MOVE_POSTS', 'delposts' => 'DEL_POSTS', 'delattach' => 'DEL_ATTACH', 'deloutbox' => 'DEL_OUTBOX');
|
||||
if ($user_row['user_new'])
|
||||
{
|
||||
$quick_tool_ary['leave_nr'] = 'LEAVE_NR';
|
||||
}
|
||||
$quick_tool_ary = array('delsig' => 'DEL_SIG', 'delavatar' => 'DEL_AVATAR', 'moveposts' => 'MOVE_POSTS', 'delposts' => 'DEL_POSTS', 'delattach' => 'DEL_ATTACH');
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -937,17 +836,12 @@ class acp_users
|
||||
$quick_tool_ary += array('active' => (($user_row['user_type'] == USER_INACTIVE) ? 'ACTIVATE' : 'DEACTIVATE'));
|
||||
}
|
||||
|
||||
$quick_tool_ary += array('delsig' => 'DEL_SIG', 'delavatar' => 'DEL_AVATAR', 'moveposts' => 'MOVE_POSTS', 'delposts' => 'DEL_POSTS', 'delattach' => 'DEL_ATTACH', 'deloutbox' => 'DEL_OUTBOX');
|
||||
$quick_tool_ary += array('delsig' => 'DEL_SIG', 'delavatar' => 'DEL_AVATAR', 'moveposts' => 'MOVE_POSTS', 'delposts' => 'DEL_POSTS', 'delattach' => 'DEL_ATTACH');
|
||||
|
||||
if ($config['email_enable'] && ($user_row['user_type'] == USER_NORMAL || $user_row['user_type'] == USER_INACTIVE))
|
||||
{
|
||||
$quick_tool_ary['reactivate'] = 'FORCE';
|
||||
}
|
||||
|
||||
if ($user_row['user_new'])
|
||||
{
|
||||
$quick_tool_ary['leave_nr'] = 'LEAVE_NR';
|
||||
}
|
||||
}
|
||||
|
||||
$s_action_options = '<option class="sep" value="">' . $user->lang['SELECT_OPTION'] . '</option>';
|
||||
@@ -997,19 +891,9 @@ class acp_users
|
||||
}
|
||||
}
|
||||
|
||||
// Posts in Queue
|
||||
$sql = 'SELECT COUNT(post_id) as posts_in_queue
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE poster_id = ' . $user_id . '
|
||||
AND post_approved = 0';
|
||||
$result = $db->sql_query($sql);
|
||||
$user_row['posts_in_queue'] = (int) $db->sql_fetchfield('posts_in_queue');
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'L_NAME_CHARS_EXPLAIN' => sprintf($user->lang[$config['allow_name_chars'] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']),
|
||||
'L_CHANGE_PASSWORD_EXPLAIN' => sprintf($user->lang[$config['pass_complex'] . '_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']),
|
||||
'L_POSTS_IN_QUEUE' => $user->lang('NUM_POSTS_IN_QUEUE', $user_row['posts_in_queue']),
|
||||
'S_FOUNDER' => ($user->data['user_type'] == USER_FOUNDER) ? true : false,
|
||||
|
||||
'S_OVERVIEW' => true,
|
||||
@@ -1021,11 +905,9 @@ class acp_users
|
||||
|
||||
'U_SHOW_IP' => $this->u_action . "&u=$user_id&ip=" . (($ip == 'ip') ? 'hostname' : 'ip'),
|
||||
'U_WHOIS' => $this->u_action . "&action=whois&user_ip={$user_row['user_ip']}",
|
||||
'U_MCP_QUEUE' => ($auth->acl_getf_global('m_approve')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue', true, $user->session_id) : '',
|
||||
|
||||
'U_SWITCH_PERMISSIONS' => ($auth->acl_get('a_switchperm') && $user->data['user_id'] != $user_row['user_id']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", "mode=switch_perm&u={$user_row['user_id']}&hash=" . generate_link_hash('switchperm')) : '',
|
||||
'U_SWITCH_PERMISSIONS' => ($auth->acl_get('a_switchperm') && $user->data['user_id'] != $user_row['user_id']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", "mode=switch_perm&u={$user_row['user_id']}") : '',
|
||||
|
||||
'POSTS_IN_QUEUE' => $user_row['posts_in_queue'],
|
||||
'USER' => $user_row['username'],
|
||||
'USER_REGISTERED' => $user->format_date($user_row['user_regdate']),
|
||||
'REGISTERED_IP' => ($ip == 'hostname') ? gethostbyaddr($user_row['user_ip']) : $user_row['user_ip'],
|
||||
@@ -1078,7 +960,6 @@ class acp_users
|
||||
{
|
||||
$sql = 'DELETE FROM ' . LOG_TABLE . '
|
||||
WHERE log_type = ' . LOG_USERS . "
|
||||
AND reportee_id = $user_id
|
||||
$where_sql";
|
||||
$db->sql_query($sql);
|
||||
|
||||
@@ -1141,154 +1022,6 @@ class acp_users
|
||||
|
||||
break;
|
||||
|
||||
case 'warnings':
|
||||
$user->add_lang('mcp');
|
||||
|
||||
// Set up general vars
|
||||
$start = request_var('start', 0);
|
||||
$deletemark = (isset($_POST['delmarked'])) ? true : false;
|
||||
$deleteall = (isset($_POST['delall'])) ? true : false;
|
||||
$confirm = (isset($_POST['confirm'])) ? true : false;
|
||||
$marked = request_var('mark', array(0));
|
||||
$message = utf8_normalize_nfc(request_var('message', '', true));
|
||||
|
||||
// Sort keys
|
||||
$sort_days = request_var('st', 0);
|
||||
$sort_key = request_var('sk', 't');
|
||||
$sort_dir = request_var('sd', 'd');
|
||||
|
||||
// Delete entries if requested and able
|
||||
if ($deletemark || $deleteall || $confirm)
|
||||
{
|
||||
if (confirm_box(true))
|
||||
{
|
||||
$where_sql = '';
|
||||
$deletemark = request_var('delmarked', 0);
|
||||
$deleteall = request_var('delall', 0);
|
||||
if ($deletemark && $marked)
|
||||
{
|
||||
$where_sql = ' AND ' . $db->sql_in_set('warning_id', array_values($marked));
|
||||
}
|
||||
|
||||
if ($where_sql || $deleteall)
|
||||
{
|
||||
$sql = 'DELETE FROM ' . WARNINGS_TABLE . "
|
||||
WHERE user_id = $user_id
|
||||
$where_sql";
|
||||
$db->sql_query($sql);
|
||||
|
||||
if ($deleteall)
|
||||
{
|
||||
$log_warnings = $deleted_warnings = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$num_warnings = (int) $db->sql_affectedrows();
|
||||
$deleted_warnings = ' user_warnings - ' . $num_warnings;
|
||||
$log_warnings = ($num_warnings > 2) ? 2 : $num_warnings;
|
||||
}
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . "
|
||||
SET user_warnings = $deleted_warnings
|
||||
WHERE user_id = $user_id";
|
||||
$db->sql_query($sql);
|
||||
|
||||
switch ($log_warnings)
|
||||
{
|
||||
case 2:
|
||||
add_log('admin', 'LOG_WARNINGS_DELETED', $user_row['username'], $num_warnings);
|
||||
break;
|
||||
case 1:
|
||||
add_log('admin', 'LOG_WARNING_DELETED', $user_row['username']);
|
||||
break;
|
||||
default:
|
||||
add_log('admin', 'LOG_WARNINGS_DELETED_ALL', $user_row['username']);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$s_hidden_fields = array(
|
||||
'i' => $id,
|
||||
'mode' => $mode,
|
||||
'u' => $user_id,
|
||||
'mark' => $marked,
|
||||
);
|
||||
if (isset($_POST['delmarked']))
|
||||
{
|
||||
$s_hidden_fields['delmarked'] = 1;
|
||||
}
|
||||
if (isset($_POST['delall']))
|
||||
{
|
||||
$s_hidden_fields['delall'] = 1;
|
||||
}
|
||||
if (isset($_POST['delall']) || (isset($_POST['delmarked']) && sizeof($marked)))
|
||||
{
|
||||
confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields($s_hidden_fields));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$sql = 'SELECT w.warning_id, w.warning_time, w.post_id, l.log_operation, l.log_data, l.user_id AS mod_user_id, m.username AS mod_username, m.user_colour AS mod_user_colour
|
||||
FROM ' . WARNINGS_TABLE . ' w
|
||||
LEFT JOIN ' . LOG_TABLE . ' l
|
||||
ON (w.log_id = l.log_id)
|
||||
LEFT JOIN ' . USERS_TABLE . ' m
|
||||
ON (l.user_id = m.user_id)
|
||||
WHERE w.user_id = ' . $user_id . '
|
||||
ORDER BY w.warning_time DESC';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if (!$row['log_operation'])
|
||||
{
|
||||
// We do not have a log-entry anymore, so there is no data available
|
||||
$row['action'] = $user->lang['USER_WARNING_LOG_DELETED'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$row['action'] = (isset($user->lang[$row['log_operation']])) ? $user->lang[$row['log_operation']] : '{' . ucfirst(str_replace('_', ' ', $row['log_operation'])) . '}';
|
||||
if (!empty($row['log_data']))
|
||||
{
|
||||
$log_data_ary = @unserialize($row['log_data']);
|
||||
$log_data_ary = ($log_data_ary === false) ? array() : $log_data_ary;
|
||||
|
||||
if (isset($user->lang[$row['log_operation']]))
|
||||
{
|
||||
// Check if there are more occurrences of % than arguments, if there are we fill out the arguments array
|
||||
// It doesn't matter if we add more arguments than placeholders
|
||||
if ((substr_count($row['action'], '%') - sizeof($log_data_ary)) > 0)
|
||||
{
|
||||
$log_data_ary = array_merge($log_data_ary, array_fill(0, substr_count($row['action'], '%') - sizeof($log_data_ary), ''));
|
||||
}
|
||||
$row['action'] = vsprintf($row['action'], $log_data_ary);
|
||||
$row['action'] = bbcode_nl2br(censor_text($row['action']));
|
||||
}
|
||||
else if (!empty($log_data_ary))
|
||||
{
|
||||
$row['action'] .= '<br />' . implode('', $log_data_ary);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$template->assign_block_vars('warn', array(
|
||||
'ID' => $row['warning_id'],
|
||||
'USERNAME' => ($row['log_operation']) ? get_username_string('full', $row['mod_user_id'], $row['mod_username'], $row['mod_user_colour']) : '-',
|
||||
'ACTION' => make_clickable($row['action']),
|
||||
'DATE' => $user->format_date($row['warning_time']),
|
||||
));
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_WARNINGS' => true,
|
||||
));
|
||||
|
||||
break;
|
||||
|
||||
case 'profile':
|
||||
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
@@ -1348,7 +1081,7 @@ class acp_users
|
||||
'website' => array(
|
||||
array('string', true, 12, 255),
|
||||
array('match', true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')),
|
||||
'location' => array('string', true, 2, 100),
|
||||
'location' => array('string', true, 2, 255),
|
||||
'occupation' => array('string', true, 2, 500),
|
||||
'interests' => array('string', true, 2, 500),
|
||||
'bday_day' => array('num', true, 1, 31),
|
||||
@@ -1390,7 +1123,53 @@ class acp_users
|
||||
$db->sql_query($sql);
|
||||
|
||||
// Update Custom Fields
|
||||
$cp->update_profile_field_data($user_id, $cp_data);
|
||||
if (sizeof($cp_data))
|
||||
{
|
||||
switch ($db->sql_layer)
|
||||
{
|
||||
case 'oracle':
|
||||
case 'firebird':
|
||||
case 'postgres':
|
||||
$right_delim = $left_delim = '"';
|
||||
break;
|
||||
|
||||
case 'sqlite':
|
||||
case 'mssql':
|
||||
case 'mssql_odbc':
|
||||
$right_delim = ']';
|
||||
$left_delim = '[';
|
||||
break;
|
||||
|
||||
case 'mysql':
|
||||
case 'mysql4':
|
||||
case 'mysqli':
|
||||
$right_delim = $left_delim = '`';
|
||||
break;
|
||||
}
|
||||
|
||||
foreach ($cp_data as $key => $value)
|
||||
{
|
||||
$cp_data[$left_delim . $key . $right_delim] = $value;
|
||||
unset($cp_data[$key]);
|
||||
}
|
||||
|
||||
$sql = 'UPDATE ' . PROFILE_FIELDS_DATA_TABLE . '
|
||||
SET ' . $db->sql_build_array('UPDATE', $cp_data) . "
|
||||
WHERE user_id = $user_id";
|
||||
$db->sql_query($sql);
|
||||
|
||||
if (!$db->sql_affectedrows())
|
||||
{
|
||||
$cp_data['user_id'] = (int) $user_id;
|
||||
|
||||
$db->sql_return_on_error(true);
|
||||
|
||||
$sql = 'INSERT INTO ' . PROFILE_FIELDS_DATA_TABLE . ' ' . $db->sql_build_array('INSERT', $cp_data);
|
||||
$db->sql_query($sql);
|
||||
|
||||
$db->sql_return_on_error(false);
|
||||
}
|
||||
}
|
||||
|
||||
trigger_error($user->lang['USER_PROFILE_UPDATED'] . adm_back_link($this->u_action . '&u=' . $user_id));
|
||||
}
|
||||
@@ -1683,19 +1462,8 @@ class acp_users
|
||||
$error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
|
||||
}
|
||||
|
||||
if (!$config['allow_avatar'] && $user_row['user_avatar_type'])
|
||||
{
|
||||
$error[] = $user->lang['USER_AVATAR_NOT_ALLOWED'];
|
||||
}
|
||||
else if ((($user_row['user_avatar_type'] == AVATAR_UPLOAD) && !$config['allow_avatar_upload']) ||
|
||||
(($user_row['user_avatar_type'] == AVATAR_REMOTE) && !$config['allow_avatar_remote']) ||
|
||||
(($user_row['user_avatar_type'] == AVATAR_GALLERY) && !$config['allow_avatar_local']))
|
||||
{
|
||||
$error[] = $user->lang['USER_AVATAR_TYPE_NOT_ALLOWED'];
|
||||
}
|
||||
|
||||
// Generate users avatar
|
||||
$avatar_img = ($user_row['user_avatar']) ? get_user_avatar($user_row['user_avatar'], $user_row['user_avatar_type'], $user_row['user_avatar_width'], $user_row['user_avatar_height'], 'USER_AVATAR', true) : '<img src="' . $phpbb_admin_path . 'images/no_avatar.gif" alt="" />';
|
||||
$avatar_img = ($user_row['user_avatar']) ? get_user_avatar($user_row['user_avatar'], $user_row['user_avatar_type'], $user_row['user_avatar_width'], $user_row['user_avatar_height']) : '<img src="' . $phpbb_admin_path . 'images/no_avatar.gif" alt="" />';
|
||||
|
||||
$display_gallery = (isset($_POST['display_gallery'])) ? true : false;
|
||||
$avatar_select = basename(request_var('avatar_select', ''));
|
||||
@@ -1708,12 +1476,10 @@ class acp_users
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_AVATAR' => true,
|
||||
'S_CAN_UPLOAD' => $can_upload,
|
||||
'S_UPLOAD_FILE' => ($config['allow_avatar'] && $can_upload && $config['allow_avatar_upload']) ? true : false,
|
||||
'S_REMOTE_UPLOAD' => ($config['allow_avatar'] && $can_upload && $config['allow_avatar_remote_upload']) ? true : false,
|
||||
'S_ALLOW_REMOTE' => ($config['allow_avatar'] && $config['allow_avatar_remote']) ? true : false,
|
||||
'S_DISPLAY_GALLERY' => ($config['allow_avatar'] && $config['allow_avatar_local'] && !$display_gallery) ? true : false,
|
||||
'S_IN_GALLERY' => ($config['allow_avatar'] && $config['allow_avatar_local'] && $display_gallery) ? true : false,
|
||||
'S_CAN_UPLOAD' => ($can_upload && $config['allow_avatar_upload']) ? true : false,
|
||||
'S_ALLOW_REMOTE' => ($config['allow_avatar_remote']) ? true : false,
|
||||
'S_DISPLAY_GALLERY' => ($config['allow_avatar_local'] && !$display_gallery) ? true : false,
|
||||
'S_IN_GALLERY' => ($config['allow_avatar_local'] && $display_gallery) ? true : false,
|
||||
|
||||
'AVATAR_IMAGE' => $avatar_img,
|
||||
'AVATAR_MAX_FILESIZE' => $config['avatar_filesize'],
|
||||
@@ -1771,9 +1537,9 @@ class acp_users
|
||||
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
|
||||
include_once($phpbb_root_path . 'includes/functions_display.' . $phpEx);
|
||||
|
||||
$enable_bbcode = ($config['allow_sig_bbcode']) ? (bool) $this->optionget($user_row, 'sig_bbcode') : false;
|
||||
$enable_smilies = ($config['allow_sig_smilies']) ? (bool) $this->optionget($user_row, 'sig_smilies') : false;
|
||||
$enable_urls = ($config['allow_sig_links']) ? (bool) $this->optionget($user_row, 'sig_links') : false;
|
||||
$enable_bbcode = ($config['allow_sig_bbcode']) ? ((request_var('disable_bbcode', !$user->optionget('bbcode'))) ? false : true) : false;
|
||||
$enable_smilies = ($config['allow_sig_smilies']) ? ((request_var('disable_smilies', !$user->optionget('smilies'))) ? false : true) : false;
|
||||
$enable_urls = ($config['allow_sig_links']) ? ((request_var('disable_magic_url', false)) ? false : true) : false;
|
||||
$signature = utf8_normalize_nfc(request_var('signature', (string) $user_row['user_sig'], true));
|
||||
|
||||
$preview = (isset($_POST['preview'])) ? true : false;
|
||||
@@ -1782,10 +1548,6 @@ class acp_users
|
||||
{
|
||||
include_once($phpbb_root_path . 'includes/message_parser.' . $phpEx);
|
||||
|
||||
$enable_bbcode = ($config['allow_sig_bbcode']) ? ((request_var('disable_bbcode', false)) ? false : true) : false;
|
||||
$enable_smilies = ($config['allow_sig_smilies']) ? ((request_var('disable_smilies', false)) ? false : true) : false;
|
||||
$enable_urls = ($config['allow_sig_links']) ? ((request_var('disable_magic_url', false)) ? false : true) : false;
|
||||
|
||||
$message_parser = new parse_message($signature);
|
||||
|
||||
// Allowing Quote BBCode
|
||||
@@ -1803,13 +1565,8 @@ class acp_users
|
||||
|
||||
if (!sizeof($error) && $submit)
|
||||
{
|
||||
$this->optionset($user_row, 'sig_bbcode', $enable_bbcode);
|
||||
$this->optionset($user_row, 'sig_smilies', $enable_smilies);
|
||||
$this->optionset($user_row, 'sig_links', $enable_urls);
|
||||
|
||||
$sql_ary = array(
|
||||
'user_sig' => (string) $message_parser->message,
|
||||
'user_options' => $user_row['user_options'],
|
||||
'user_sig_bbcode_uid' => (string) $message_parser->bbcode_uid,
|
||||
'user_sig_bbcode_bitfield' => (string) $message_parser->bbcode_bitfield
|
||||
);
|
||||
@@ -2077,39 +1834,6 @@ class acp_users
|
||||
}
|
||||
|
||||
$error = array();
|
||||
|
||||
// The delete action was successful - therefore update the user row...
|
||||
$sql = 'SELECT u.*, s.*
|
||||
FROM ' . USERS_TABLE . ' u
|
||||
LEFT JOIN ' . SESSIONS_TABLE . ' s ON (s.session_user_id = u.user_id)
|
||||
WHERE u.user_id = ' . $user_id . '
|
||||
ORDER BY s.session_time DESC';
|
||||
$result = $db->sql_query($sql);
|
||||
$user_row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
|
||||
'u' => $user_id,
|
||||
'i' => $id,
|
||||
'mode' => $mode,
|
||||
'action' => $action,
|
||||
'g' => $group_id))
|
||||
);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'approve':
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
if (!$group_id)
|
||||
{
|
||||
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING);
|
||||
}
|
||||
group_user_attributes($action, $group_id, $user_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2215,12 +1939,10 @@ class acp_users
|
||||
'U_DEFAULT' => $this->u_action . "&action=default&u=$user_id&g=" . $data['group_id'],
|
||||
'U_DEMOTE_PROMOTE' => $this->u_action . '&action=' . (($data['group_leader']) ? 'demote' : 'promote') . "&u=$user_id&g=" . $data['group_id'],
|
||||
'U_DELETE' => $this->u_action . "&action=delete&u=$user_id&g=" . $data['group_id'],
|
||||
'U_APPROVE' => ($group_type == 'pending') ? $this->u_action . "&action=approve&u=$user_id&g=" . $data['group_id'] : '',
|
||||
|
||||
'GROUP_NAME' => ($group_type == 'special') ? $user->lang['G_' . $data['group_name']] : $data['group_name'],
|
||||
'L_DEMOTE_PROMOTE' => ($data['group_leader']) ? $user->lang['GROUP_DEMOTE'] : $user->lang['GROUP_PROMOTE'],
|
||||
|
||||
'S_IS_MEMBER' => ($group_type != 'pending') ? true : false,
|
||||
'S_NO_DEFAULT' => ($user_row['group_id'] != $data['group_id']) ? true : false,
|
||||
'S_SPECIAL_GROUP' => ($group_type == 'special') ? true : false,
|
||||
)
|
||||
|
@@ -23,7 +23,7 @@ if (!defined('IN_PHPBB'))
|
||||
class acp_words
|
||||
{
|
||||
var $u_action;
|
||||
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $auth, $template, $cache;
|
||||
@@ -47,9 +47,8 @@ class acp_words
|
||||
switch ($action)
|
||||
{
|
||||
case 'edit':
|
||||
|
||||
$word_id = request_var('id', 0);
|
||||
|
||||
|
||||
if (!$word_id)
|
||||
{
|
||||
trigger_error($user->lang['NO_WORD'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
@@ -74,7 +73,7 @@ class acp_words
|
||||
'REPLACEMENT' => (isset($word_info['replacement'])) ? $word_info['replacement'] : '',
|
||||
'S_HIDDEN_FIELDS' => $s_hidden_fields)
|
||||
);
|
||||
|
||||
|
||||
return;
|
||||
|
||||
break;
|
||||
@@ -85,12 +84,11 @@ class acp_words
|
||||
{
|
||||
trigger_error($user->lang['FORM_INVALID']. adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$word_id = request_var('id', 0);
|
||||
$word = utf8_normalize_nfc(request_var('word', '', true));
|
||||
$replacement = utf8_normalize_nfc(request_var('replacement', '', true));
|
||||
|
||||
if ($word === '' || $replacement === '')
|
||||
|
||||
if (!$word || !$replacement)
|
||||
{
|
||||
trigger_error($user->lang['ENTER_WORD'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
@@ -58,7 +58,7 @@ class auth_admin extends auth
|
||||
$cache->put('_acl_options', $this->acl_options);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get permission mask
|
||||
* This function only supports getting permissions of one type (for example a_)
|
||||
@@ -140,7 +140,7 @@ class auth_admin extends auth
|
||||
$auth2 = &$auth;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$hold_ary[$userdata['user_id']] = array();
|
||||
foreach ($forum_ids as $f_id)
|
||||
{
|
||||
@@ -345,7 +345,7 @@ class auth_admin extends auth
|
||||
|
||||
// Build js roles array (role data assignments)
|
||||
$s_role_js_array = '';
|
||||
|
||||
|
||||
if (sizeof($roles))
|
||||
{
|
||||
$s_role_js_array = array();
|
||||
@@ -696,7 +696,6 @@ class auth_admin extends auth
|
||||
|
||||
$cur_options = array();
|
||||
|
||||
// Determine current options
|
||||
$sql = 'SELECT auth_option, is_global, is_local
|
||||
FROM ' . ACL_OPTIONS_TABLE . '
|
||||
ORDER BY auth_option_id';
|
||||
@@ -704,7 +703,15 @@ class auth_admin extends auth
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$cur_options[$row['auth_option']] = ($row['is_global'] && $row['is_local']) ? 'both' : (($row['is_global']) ? 'global' : 'local');
|
||||
if ($row['is_global'])
|
||||
{
|
||||
$cur_options['global'][] = $row['auth_option'];
|
||||
}
|
||||
|
||||
if ($row['is_local'])
|
||||
{
|
||||
$cur_options['local'][] = $row['auth_option'];
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
@@ -719,11 +726,14 @@ class auth_admin extends auth
|
||||
|
||||
foreach ($option_ary as $option_value)
|
||||
{
|
||||
$new_options[$type][] = $option_value;
|
||||
if (!in_array($option_value, $cur_options[$type]))
|
||||
{
|
||||
$new_options[$type][] = $option_value;
|
||||
}
|
||||
|
||||
$flag = substr($option_value, 0, strpos($option_value, '_') + 1);
|
||||
|
||||
if (!in_array($flag, $new_options[$type]))
|
||||
if (!in_array($flag, $cur_options[$type]) && !in_array($flag, $new_options[$type]))
|
||||
{
|
||||
$new_options[$type][] = $flag;
|
||||
}
|
||||
@@ -734,53 +744,23 @@ class auth_admin extends auth
|
||||
$options = array();
|
||||
$options['local'] = array_diff($new_options['local'], $new_options['global']);
|
||||
$options['global'] = array_diff($new_options['global'], $new_options['local']);
|
||||
$options['both'] = array_intersect($new_options['local'], $new_options['global']);
|
||||
$options['local_global'] = array_intersect($new_options['local'], $new_options['global']);
|
||||
|
||||
// Now check which options to add/update
|
||||
$add_options = $update_options = array();
|
||||
$sql_ary = array();
|
||||
|
||||
// First local ones...
|
||||
foreach ($options as $type => $option_ary)
|
||||
{
|
||||
foreach ($option_ary as $option)
|
||||
{
|
||||
if (!isset($cur_options[$option]))
|
||||
{
|
||||
$add_options[] = array(
|
||||
'auth_option' => (string) $option,
|
||||
'is_global' => ($type == 'global' || $type == 'both') ? 1 : 0,
|
||||
'is_local' => ($type == 'local' || $type == 'both') ? 1 : 0
|
||||
);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
// Else, update existing entry if it is changed...
|
||||
if ($type === $cur_options[$option])
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// New type is always both:
|
||||
// If is now both, we set both.
|
||||
// If it was global the new one is local and we need to set it to both
|
||||
// If it was local the new one is global and we need to set it to both
|
||||
$update_options[] = $option;
|
||||
$sql_ary[] = array(
|
||||
'auth_option' => (string) $option,
|
||||
'is_global' => ($type == 'global' || $type == 'local_global') ? 1 : 0,
|
||||
'is_local' => ($type == 'local' || $type == 'local_global') ? 1 : 0
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($add_options))
|
||||
{
|
||||
$db->sql_multi_insert(ACL_OPTIONS_TABLE, $add_options);
|
||||
}
|
||||
|
||||
if (!empty($update_options))
|
||||
{
|
||||
$sql = 'UPDATE ' . ACL_OPTIONS_TABLE . '
|
||||
SET is_global = 1, is_local = 1
|
||||
WHERE ' . $db->sql_in_set('auth_option', $update_options);
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
$db->sql_multi_insert(ACL_OPTIONS_TABLE, $sql_ary);
|
||||
|
||||
$cache->destroy('_acl_options');
|
||||
$this->acl_clear_prefetch();
|
||||
@@ -822,7 +802,7 @@ class auth_admin extends auth
|
||||
reset($auth);
|
||||
$flag = key($auth);
|
||||
$flag = substr($flag, 0, strpos($flag, '_') + 1);
|
||||
|
||||
|
||||
// This ID (the any-flag) is set if one or more permissions are true...
|
||||
$any_option_id = (int) $this->acl_options['id'][$flag];
|
||||
|
||||
@@ -936,7 +916,7 @@ class auth_admin extends auth
|
||||
reset($auth);
|
||||
$flag = key($auth);
|
||||
$flag = substr($flag, 0, strpos($flag, '_') + 1);
|
||||
|
||||
|
||||
// Remove any-flag from auth ary
|
||||
if (isset($auth[$flag]))
|
||||
{
|
||||
@@ -1087,7 +1067,7 @@ class auth_admin extends auth
|
||||
{
|
||||
$where_sql[] = $db->sql_in_set('auth_option_id', array_map('intval', $option_id_ary));
|
||||
}
|
||||
|
||||
|
||||
$sql = "DELETE FROM $table
|
||||
WHERE " . implode(' AND ', $where_sql);
|
||||
$db->sql_query($sql);
|
||||
@@ -1110,7 +1090,7 @@ class auth_admin extends auth
|
||||
'S_YES' => ($cat_array['S_YES'] && !$cat_array['S_NEVER'] && !$cat_array['S_NO']) ? true : false,
|
||||
'S_NEVER' => ($cat_array['S_NEVER'] && !$cat_array['S_YES'] && !$cat_array['S_NO']) ? true : false,
|
||||
'S_NO' => ($cat_array['S_NO'] && !$cat_array['S_NEVER'] && !$cat_array['S_YES']) ? true : false,
|
||||
|
||||
|
||||
'CAT_NAME' => $user->lang['permission_cat'][$cat])
|
||||
);
|
||||
|
||||
@@ -1199,9 +1179,9 @@ class auth_admin extends auth
|
||||
'lang' => '{ acl_' . $permission . ' }'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
$cat = $user->lang['acl_' . $permission]['cat'];
|
||||
|
||||
|
||||
// Build our categories array
|
||||
if (!isset($categories[$cat]))
|
||||
{
|
||||
|
@@ -26,7 +26,6 @@ class acp_board_info
|
||||
'message' => array('title' => 'ACP_MESSAGE_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION', 'ACP_MESSAGES')),
|
||||
'post' => array('title' => 'ACP_POST_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
|
||||
'signature' => array('title' => 'ACP_SIGNATURE_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
|
||||
'feed' => array('title' => 'ACP_FEED_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
|
||||
'registration' => array('title' => 'ACP_REGISTER_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
|
||||
|
||||
'auth' => array('title' => 'ACP_AUTH_SETTINGS', 'auth' => 'acl_a_server', 'cat' => array('ACP_CLIENT_COMMUNICATION')),
|
||||
|
@@ -20,7 +20,7 @@ class acp_email_info
|
||||
'title' => 'ACP_MASS_EMAIL',
|
||||
'version' => '1.0.0',
|
||||
'modes' => array(
|
||||
'email' => array('title' => 'ACP_MASS_EMAIL', 'auth' => 'acl_a_email && cfg_email_enable', 'cat' => array('ACP_GENERAL_TASKS')),
|
||||
'email' => array('title' => 'ACP_MASS_EMAIL', 'auth' => 'acl_a_email', 'cat' => array('ACP_GENERAL_TASKS')),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user