aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2009-03-22 16:34:26 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2009-03-22 16:34:26 +0000
commit4cbf6bc703bdadf716197b68a89b3438247ff022 (patch)
tree952f7fe84b9428d10e4d49d535c5108e06d4640a /phpBB
parentfac9c024ff370eb4c34f7a7ffa9048732e5c74c7 (diff)
downloadforums-4cbf6bc703bdadf716197b68a89b3438247ff022.tar
forums-4cbf6bc703bdadf716197b68a89b3438247ff022.tar.gz
forums-4cbf6bc703bdadf716197b68a89b3438247ff022.tar.bz2
forums-4cbf6bc703bdadf716197b68a89b3438247ff022.tar.xz
forums-4cbf6bc703bdadf716197b68a89b3438247ff022.zip
Merge most changes from 3.0.x branch since the 25th december.
(Captcha changes for refreshing captcha image not included) git-svn-id: file:///svn/phpbb/trunk@9404 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/adm/index.php12
-rw-r--r--phpBB/adm/style/acp_captcha.html43
-rw-r--r--phpBB/adm/style/acp_forums.html2
-rw-r--r--phpBB/adm/style/acp_styles.html28
-rw-r--r--phpBB/adm/style/install/update.html237
-rwxr-xr-xphpBB/develop/collect_cache_stats.sh3
-rw-r--r--phpBB/download/file.php9
-rw-r--r--phpBB/includes/acm/acm_file.php11
-rw-r--r--phpBB/includes/auth/auth_apache.php14
-rw-r--r--phpBB/includes/captcha/captcha_gd.php1956
-rw-r--r--phpBB/includes/classes/session.php5
-rw-r--r--phpBB/includes/diff/diff.php97
-rw-r--r--phpBB/includes/diff/engine.php2
-rw-r--r--phpBB/includes/diff/renderer.php2
-rw-r--r--phpBB/includes/functions.php31
-rw-r--r--phpBB/includes/functions_admin.php17
-rw-r--r--phpBB/includes/functions_content.php5
-rw-r--r--phpBB/includes/functions_display.php6
-rw-r--r--phpBB/includes/functions_messenger.php76
-rw-r--r--phpBB/includes/functions_posting.php67
-rw-r--r--phpBB/includes/functions_privmsgs.php4
-rw-r--r--phpBB/includes/functions_profile_fields.php4
-rw-r--r--phpBB/includes/functions_user.php79
-rw-r--r--phpBB/includes/message_parser.php20
-rw-r--r--phpBB/install/convertors/convert_phpbb20.php4
-rw-r--r--phpBB/install/convertors/functions_phpbb20.php2
-rw-r--r--phpBB/install/database_update.php26
-rw-r--r--phpBB/install/install_install.php2
-rw-r--r--phpBB/install/install_update.php55
-rw-r--r--phpBB/install/schemas/schema_data.php4
-rw-r--r--phpBB/install/schemas/schema_structure.php2
-rw-r--r--phpBB/language/en/acp/board.php14
-rw-r--r--phpBB/language/en/acp/common.php10
-rw-r--r--phpBB/language/en/acp/forums.php1
-rw-r--r--phpBB/language/en/acp/posting.php2
-rw-r--r--phpBB/language/en/acp/profile.php2
-rw-r--r--phpBB/language/en/email/newtopic_notify.txt2
-rw-r--r--phpBB/language/en/install.php14
-rw-r--r--phpBB/language/en/ucp.php5
-rw-r--r--phpBB/modules/acp/acp_attachments.php4
-rw-r--r--phpBB/modules/acp/acp_captcha.php2
-rw-r--r--phpBB/modules/acp/acp_email.php2
-rw-r--r--phpBB/modules/acp/acp_forums.php35
-rw-r--r--phpBB/modules/acp/acp_inactive.php14
-rw-r--r--phpBB/modules/acp/acp_jabber.php3
-rw-r--r--phpBB/modules/acp/acp_main.php6
-rw-r--r--phpBB/modules/acp/acp_permissions.php6
-rw-r--r--phpBB/modules/acp/acp_styles.php217
-rw-r--r--phpBB/modules/acp/acp_users.php1
-rw-r--r--phpBB/modules/acp/auth.php64
-rw-r--r--phpBB/modules/mcp/mcp_main.php9
-rw-r--r--phpBB/modules/mcp/mcp_notes.php7
-rw-r--r--phpBB/modules/mcp/mcp_queue.php19
-rw-r--r--phpBB/modules/mcp/mcp_topic.php2
-rw-r--r--phpBB/modules/mcp/mcp_warn.php7
-rw-r--r--phpBB/modules/ucp/ucp_activate.php2
-rw-r--r--phpBB/modules/ucp/ucp_groups.php2
-rw-r--r--phpBB/modules/ucp/ucp_main.php4
-rw-r--r--phpBB/modules/ucp/ucp_pm_compose.php1
-rw-r--r--phpBB/modules/ucp/ucp_profile.php5
-rw-r--r--phpBB/modules/ucp/ucp_register.php2
-rw-r--r--phpBB/modules/ucp/ucp_resend.php5
-rw-r--r--phpBB/posting.php4
-rw-r--r--phpBB/search.php2
-rw-r--r--phpBB/styles/prosilver/template/attachment.html4
-rw-r--r--phpBB/styles/prosilver/template/mcp_notes_user.html2
-rw-r--r--phpBB/styles/prosilver/template/mcp_topic.html2
-rw-r--r--phpBB/styles/prosilver/template/mcp_warn_user.html2
-rw-r--r--phpBB/styles/prosilver/template/posting_buttons.html8
-rw-r--r--phpBB/styles/prosilver/template/posting_editor.html6
-rw-r--r--phpBB/styles/prosilver/template/posting_review.html10
-rw-r--r--phpBB/styles/prosilver/template/posting_topic_review.html9
-rw-r--r--phpBB/styles/prosilver/template/simple_header.html6
-rw-r--r--phpBB/styles/prosilver/template/ucp_main_bookmarks.html2
-rw-r--r--phpBB/styles/prosilver/template/ucp_main_subscribed.html2
-rw-r--r--phpBB/styles/prosilver/template/ucp_register.html10
-rw-r--r--phpBB/styles/prosilver/template/viewtopic_print.html2
-rw-r--r--phpBB/styles/prosilver/theme/common.css2
-rw-r--r--phpBB/styles/prosilver/theme/content.css6
-rw-r--r--phpBB/viewtopic.php8
80 files changed, 2478 insertions, 903 deletions
diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php
index 59ef826df4..a6ab6ec182 100644
--- a/phpBB/adm/index.php
+++ b/phpBB/adm/index.php
@@ -301,6 +301,7 @@ function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars)
break;
case 'select':
+ case 'select_multiple':
case 'custom':
$return = '';
@@ -339,12 +340,21 @@ function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars)
}
else
{
+ if ($tpl_type[0] == 'select_multiple')
+ {
+ $new[$config_key] = @unserialize(trim($new[$config_key]));
+ }
+
$args = array($new[$config_key], $key);
}
$return = call_user_func_array($call, $args);
- if ($tpl_type[0] == 'select')
+ if ($tpl_type[0] == 'select_multiple')
+ {
+ $tpl = '<select id="' . $key . '" name="' . $name . '[]" multiple="multiple">' . $return . '</select>';
+ }
+ else if ($tpl_type[0] == 'select')
{
$tpl = '<select id="' . $key . '" name="' . $name . '">' . $return . '</select>';
}
diff --git a/phpBB/adm/style/acp_captcha.html b/phpBB/adm/style/acp_captcha.html
index 5d04938778..af67de16ea 100644
--- a/phpBB/adm/style/acp_captcha.html
+++ b/phpBB/adm/style/acp_captcha.html
@@ -22,12 +22,12 @@
<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>
-
-</fieldset>
-
-<fieldset>
-<legend>{L_AVAILABLE_CAPTCHAS}</legend>
-
+<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>
+</dl>
+<!-- IF GD -->
<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>
@@ -36,7 +36,36 @@
<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>
</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>
+<!-- ENDIF -->
+
</fieldset>
<!-- IF CAPTCHA_PREVIEW -->
diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html
index 636d4ded7b..547ac66e3c 100644
--- a/phpBB/adm/style/acp_forums.html
+++ b/phpBB/adm/style/acp_forums.html
@@ -444,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}: <b>{forums.FORUM_POSTS}</b></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 -->
</td>
<td style="vertical-align: top; width: 100px; text-align: right; white-space: nowrap;">
<!-- IF forums.S_FIRST_ROW && not forums.S_LAST_ROW -->
diff --git a/phpBB/adm/style/acp_styles.html b/phpBB/adm/style/acp_styles.html
index 3f25ded9f7..4c738ad618 100644
--- a/phpBB/adm/style/acp_styles.html
+++ b/phpBB/adm/style/acp_styles.html
@@ -54,7 +54,7 @@
// <![CDATA[
function update_image(newimage)
{
- document.getElementById('newimg').src = (newimage) ? '../styles/{A_NAME}/imageset/' + encodeURI(newimage) : 'images/no_image.png';
+ document.getElementById('newimg').src = (newimage) ? '../styles/{A_PATH}/imageset/' + encodeURI(newimage) : 'images/no_image.png';
}
// ]]>
</script>
@@ -261,11 +261,11 @@
<!-- ELSEIF S_CACHE -->
<a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
-
+
<h1>{L_TEMPLATE_CACHE}</h1>
-
+
<p>{L_TEMPLATE_CACHE_EXPLAIN}</p>
-
+
<form name="acp_styles" method="post" action="{U_ACTION}">
<fieldset class="tabulated">
<legend>{L_TEMPLATE_CACHE}</legend>
@@ -361,7 +361,7 @@
</p>
</fieldset>
-
+
</form>
<!-- ELSEIF S_FRONTEND -->
@@ -455,24 +455,30 @@
<legend>{L_TITLE}</legend>
<dl>
<dt><label for="name">{L_NAME}:</label></dt>
- <dd><!-- IF S_INSTALL --><b id="name">{NAME}</b><!-- ELSE --><input type="text" id="name" name="name" value="{NAME}" /><!-- ENDIF --></dd>
+ <dd><!-- IF S_INSTALL --><strong id="name">{NAME}</strong><!-- 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 --><b id="copyright">{COPYRIGHT}</b><!-- ELSE --><input type="text" id="copyright" name="copyright" value="{COPYRIGHT}" /><!-- ENDIF --></dd>
+ <dd><!-- IF S_INSTALL --><strong id="copyright">{COPYRIGHT}</strong><!-- 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 --><b id="template_id">{TEMPLATE_NAME}</b><!-- ELSE --><select id="template_id" name="template_id">{S_TEMPLATE_OPTIONS}</select><!-- ENDIF --></dd>
+ <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>
</dl>
<dl>
<dt><label for="theme_id">{L_STYLE_THEME}:</label></dt>
- <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>
+ <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>
</dl>
<dl>
<dt><label for="imageset_id">{L_STYLE_IMAGESET}:</label></dt>
- <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>
+ <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>
</dl>
<!-- ENDIF -->
<!-- IF S_STYLE -->
@@ -500,7 +506,7 @@
<input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
{S_FORM_TOKEN}
</fieldset>
-
+
</form>
<!-- ENDIF -->
diff --git a/phpBB/adm/style/install/update.html b/phpBB/adm/style/install/update.html
index 640a02d57d..3d0ce31ffd 100644
--- a/phpBB/adm/style/install/update.html
+++ b/phpBB/adm/style/install/update.html
@@ -192,94 +192,170 @@
<form id="install_update" method="post" action="{U_UPDATE_ACTION}">
- <!-- IF .files -->
- <!-- BEGIN files -->
- <!-- IF files.S_STATUS -->
- <!-- IF not files.S_FIRST_ROW -->
- </fieldset></div>
+ <!-- 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};">&raquo; <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>
<!-- ENDIF -->
+ </dl>
+ <!-- END not_modified -->
+ </fieldset>
- <h2>{files.TITLE}</h2>
+ <!-- ENDIF -->
- <!-- IF files.STATUS eq 'not_modified' --><div style="float: {S_CONTENT_FLOW_END};">&raquo; <a href="#" onclick="dE('not_modified', 0); return false;">{L_TOGGLE_DISPLAY}</a></div><!-- ENDIF -->
- <p>{files.EXPLAIN}</p>
+ <!-- IF .modified -->
+ <h2>{L_FILES_MODIFIED}</h2>
+ <p>{L_FILES_MODIFIED_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%;">&nbsp;</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 -->&nbsp;<!-- 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 -->&nbsp;<!-- ENDIF --></dd>
+ </dl>
+ </fieldset>
+ <!-- END modified -->
- <div style="display: <!-- IF files.STATUS neq 'not_modified' -->block<!-- ELSE -->none<!-- ENDIF -->;" id="{files.STATUS}">
+ <!-- ENDIF -->
- <fieldset>
- <legend><img src="{T_IMAGE_PATH}file_{files.STATUS}.gif" alt="{files.L_STATUS}" /></legend>
+ <!-- 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%;">&nbsp;</dd>
+ </dl>
<!-- ELSE -->
<dl>
- <!-- 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' -->&nbsp;<!-- 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 -->&nbsp;<!-- 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 -->&nbsp;<!-- 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 -->&nbsp;<!-- 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 -->
+ <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 -->
- <!-- END files -->
+ </fieldset>
+ <!-- END conflict -->
- </fieldset></div>
<!-- ENDIF -->
<br />
@@ -371,7 +447,6 @@
<div class="errorbox">
<p>{L_CONNECTION_FAILED}<br />{ERROR_MSG}</p>
</div>
-
<!-- ENDIF -->
<fieldset>
@@ -387,7 +462,7 @@
</dl>
<!-- END data -->
</fieldset>
-
+
<fieldset class="submit-buttons">
{S_HIDDEN_FIELDS}
<input class="button2" type="submit" name="check_again" value="{L_BACK}" />
diff --git a/phpBB/develop/collect_cache_stats.sh b/phpBB/develop/collect_cache_stats.sh
new file mode 100755
index 0000000000..5bb31c5173
--- /dev/null
+++ b/phpBB/develop/collect_cache_stats.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+DIR=$(dirname "$0")/../cache;
+cat "$DIR/sql_*.php" | grep '/* SELECT' | sed 's,/\* ,,;s, \*/,,' | sort
diff --git a/phpBB/download/file.php b/phpBB/download/file.php
index cc96caa33d..61c108c626 100644
--- a/phpBB/download/file.php
+++ b/phpBB/download/file.php
@@ -242,7 +242,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 . '
@@ -437,7 +437,12 @@ function send_file_to_browser($attachment, $upload_dir, $category)
$is_ie8 = (strpos(strtolower(phpbb::$user->system['browser']), 'msie 8.0') !== false);
header('Content-Type: ' . $attachment['mimetype'] . (($is_ie8) ? '; authoritative=true;' : ''));
- if (empty(phpbb::$user->system['browser']) || (!$is_ie8 && (strpos(strtolower(phpbb::$user->system['browser']), 'msie') !== false)))
+ 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');
+ }
+ else if (empty(phpbb::$user->system['browser']) || (!$is_ie8 && (strpos(strtolower(phpbb::$user->system['browser']), 'msie') !== false)))
{
header('Content-Disposition: attachment; ' . header_filename(htmlspecialchars_decode($attachment['real_filename'])));
if (empty(phpbb::$user->system['browser']) || (strpos(strtolower(phpbb::$user->system['browser']), 'msie 6.0') !== false))
diff --git a/phpBB/includes/acm/acm_file.php b/phpBB/includes/acm/acm_file.php
index a6733245bf..e073230d49 100644
--- a/phpBB/includes/acm/acm_file.php
+++ b/phpBB/includes/acm/acm_file.php
@@ -89,7 +89,7 @@ class phpbb_acm_file extends phpbb_acm_abstract
if ($fp = @fopen($filename, 'wb'))
{
@flock($fp, LOCK_EX);
- fwrite($fp, "<?php\n\$expired = (time() > " . (time() + $ttl) . ") ? true : false;\nif (\$expired) { return; }\n\$data = " . (sizeof($data) ? "unserialize(" . var_export(serialize($data), true) . ");" : 'array();'));
+ fwrite($fp, "<?php\nif (!defined('IN_PHPBB')) exit;\n\$expired = (time() > " . (time() + $ttl) . ") ? true : false;\nif (\$expired) { return; }\n\$data = " . (sizeof($data) ? "unserialize(" . var_export(serialize($data), true) . ");" : 'array();'));
@flock($fp, LOCK_UN);
fclose($fp);
@@ -163,7 +163,7 @@ class phpbb_acm_file extends phpbb_acm_abstract
if ($fp = @fopen($filename, 'wb'))
{
@flock($fp, LOCK_EX);
- fwrite($fp, "<?php\n\$this->vars = unserialize(" . var_export(serialize($this->vars), true) . ");\n\$this->var_expires = unserialize(" . var_export(serialize($this->var_expires), true) . ");");
+ fwrite($fp, "<?php\nif (!defined('IN_PHPBB')) exit;\n\$this->vars = unserialize(" . var_export(serialize($this->vars), true) . ");\n\$this->var_expires = unserialize(" . var_export(serialize($this->var_expires), true) . ");");
@flock($fp, LOCK_UN);
fclose($fp);
@@ -174,10 +174,13 @@ class phpbb_acm_file extends phpbb_acm_abstract
// Now, this occurred how often? ... phew, just tell the user then...
if (!@is_writable($this->cache_dir))
{
- trigger_error($this->cache_dir . ' is NOT writable.', E_USER_ERROR);
+ // 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('Not able to open ' . $filename, E_USER_ERROR);
+ die('Not able to open ' . $filename);
+ exit;
}
$this->is_modified = false;
diff --git a/phpBB/includes/auth/auth_apache.php b/phpBB/includes/auth/auth_apache.php
index 5c34d7f768..2b9c068672 100644
--- a/phpBB/includes/auth/auth_apache.php
+++ b/phpBB/includes/auth/auth_apache.php
@@ -232,13 +232,19 @@ function validate_session_apache(&$user)
if (!isset($_SERVER['PHP_AUTH_USER']))
{
- return false;
+ $php_auth_user = '';
+ set_var($php_auth_user, $_SERVER['PHP_AUTH_USER'], 'string', true);
+
+ return ($php_auth_user === $user['username']) ? true : false;
}
- $php_auth_user = '';
- set_var($php_auth_user, $_SERVER['PHP_AUTH_USER'], 'string', true);
+ // PHP_AUTH_USER is not set. A valid session is now determined by the user type (anonymous/bot or not)
+ if ($user['user_type'] == USER_IGNORE)
+ {
+ return true;
+ }
- return ($php_auth_user === $user['username']) ? true : false;
+ return false;
}
?> \ No newline at end of file
diff --git a/phpBB/includes/captcha/captcha_gd.php b/phpBB/includes/captcha/captcha_gd.php
index e8ad9df37d..9db4bea46f 100644
--- a/phpBB/includes/captcha/captcha_gd.php
+++ b/phpBB/includes/captcha/captcha_gd.php
@@ -51,7 +51,7 @@ class captcha
$bg_colours = array_splice($scheme, mt_rand(6, 12));
// Generate code characters
- $characters = $sizes = $bounding_boxes = array();
+ $characters = $sizes = $bounding_boxes = $noise = array();
$width_avail = self::width - 15;
$code_len = strlen($code);
@@ -68,6 +68,7 @@ class captcha
$bounding_boxes[$i] = $box;
}
+
// Redistribute leftover x-space
$offset = array();
for ($i = 0; $i < $code_len; ++$i)
@@ -98,6 +99,33 @@ class captcha
}
}
+ if (phpbb::$config['captcha_gd_wave'] && (phpbb::$config['captcha_gd_y_grid'] || phpbb::$config['captcha_gd_y_grid']))
+ {
+ self::wave($img);
+ }
+
+ if (phpbb::$config['captcha_gd_3d_noise'])
+ {
+ $xoffset = rand(0,9);
+ $noise_bitmaps = self::captcha_noise_bg_bitmaps();
+ for ($i = 0; $i < $code_len; ++$i)
+ {
+ $noise[$i] = new char_cube3d($noise_bitmaps, mt_rand(1, count($noise_bitmaps['data'])));
+
+ list($min, $max) = $noise[$i]->range();
+ //$box = $noise[$i]->dimensions($sizes[$i]);
+ }
+ $xoffset = 0;
+ for ($i = 0; $i < $code_len; ++$i)
+ {
+ $dimm = $bounding_boxes[$i];
+ $xoffset += ($offset[$i] - $dimm[0]);
+ $yoffset = mt_rand(-$dimm[1], self::height - $dimm[3]);
+
+ $noise[$i]->drawchar($sizes[$i], $xoffset, $yoffset, $img, $colour->get_resource('background'), $scheme);
+ $xoffset += $dimm[2];
+ }
+ }
$xoffset = 5;
for ($i = 0; $i < $code_len; ++$i)
{
@@ -109,11 +137,15 @@ class captcha
$xoffset += $dimm[2];
}
+ if (phpbb::$config['captcha_gd_wave'])
+ {
+ self::wave($img);
+ }
+
if (phpbb::$config['captcha_gd_foreground_noise'])
{
self::noise_line($img, 0, 0, self::width, self::height, $colour->get_resource('background'), $scheme, $bg_colours);
}
-
// Send image
header('Content-Type: image/png');
header('Cache-control: no-cache, no-store');
@@ -122,6 +154,36 @@ class captcha
}
/**
+ * Sinus
+ */
+ private static function wave($img)
+ {
+ $period_x = mt_rand(12,18);
+ $period_y = mt_rand(7,14);
+ $amp_x = mt_rand(5,10);
+ $amp_y = mt_rand(2,4);
+ $socket = mt_rand(0,100);
+
+ $dampen_x = mt_rand(self::width/5, self::width/2);
+ $dampen_y = mt_rand(self::height/5, self::height/2);
+ $direction_x = (mt_rand (0, 1));
+ $direction_y = (mt_rand (0, 1));
+
+ for ($i = 0; $i < self::width; $i++)
+ {
+ $dir = ($direction_x) ? $i : (self::width - $i);
+ imagecopy($img, $img, $i-1, sin($socket+ $i/($period_x + $dir/$dampen_x)) * $amp_x, $i, 0, 1, self::height);
+ }
+ $socket = mt_rand(0,100);
+ for ($i = 0; $i < self::height; $i++)
+ {
+ $dir = ($direction_y) ? $i : (self::height - $i);
+ imagecopy($img, $img ,sin($socket + $i/($period_y + ($dir)/$dampen_y)) * $amp_y, $i-1, 0, $i, self::width, 1);
+ }
+ return $img;
+ }
+
+ /**
* Noise line
*/
private static function noise_line($img, $min_x, $min_y, $max_x, $max_y, $bg, $font, $non_font)
@@ -170,458 +232,1466 @@ class captcha
imagesetthickness($img, 1);
}
- /**
- * Return bitmaps
- */
- private static function captcha_bitmaps()
+
+ function captcha_noise_bg_bitmaps()
{
return array(
- 'width' => 9,
- 'height' => 15,
+ 'width' => 15,
+ 'height' => 5,
'data' => array(
- 'A' => array(
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,1,0,1,0,0,0),
- array(0,0,0,1,0,1,0,0,0),
- array(0,0,0,1,0,1,0,0,0),
- array(0,0,1,0,0,0,1,0,0),
- array(0,0,1,0,0,0,1,0,0),
- array(0,0,1,0,0,0,1,0,0),
- array(0,1,0,0,0,0,0,1,0),
- array(0,1,0,0,0,0,0,1,0),
- array(0,1,1,1,1,1,1,1,0),
- array(0,1,0,0,0,0,0,1,0),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- ),
- 'B' => array(
- array(1,1,1,1,1,1,1,0,0),
- array(1,0,0,0,0,0,0,1,0),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,1,0),
- array(1,1,1,1,1,1,1,0,0),
- array(1,0,0,0,0,0,0,1,0),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,1,0),
- array(1,1,1,1,1,1,1,0,0),
- ),
- 'C' => array(
- array(0,0,1,1,1,1,1,0,0),
- array(0,1,0,0,0,0,0,1,0),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(0,1,0,0,0,0,0,1,0),
- array(0,0,1,1,1,1,1,0,0),
- ),
- 'D' => array(
- array(1,1,1,1,1,1,1,0,0),
- array(1,0,0,0,0,0,0,1,0),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,1,0),
- array(1,1,1,1,1,1,1,0,0),
- ),
- 'E' => array(
- array(1,1,1,1,1,1,1,1,1),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,1,1,1,1,1,1,1,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,1,1,1,1,1,1,1,1),
- ),
- 'F' => array(
- array(1,1,1,1,1,1,1,1,1),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,1,1,1,1,1,1,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- ),
- 'G' => array(
- array(0,0,1,1,1,1,1,0,0),
- array(0,1,0,0,0,0,0,1,0),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,1,1,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(0,1,0,0,0,0,0,1,0),
- array(0,0,1,1,1,1,1,0,0),
- ),
- 'H' => array(
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,1,1,1,1,1,1,1,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- ),
- 'I' => array(
- array(1,1,1,1,1,1,1,1,1),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(1,1,1,1,1,1,1,1,1),
- ),
- 'J' => array(
- array(1,1,1,1,1,1,1,1,1),
- array(0,0,0,0,0,1,0,0,0),
- array(0,0,0,0,0,1,0,0,0),
- array(0,0,0,0,0,1,0,0,0),
- array(0,0,0,0,0,1,0,0,0),
- array(0,0,0,0,0,1,0,0,0),
- array(0,0,0,0,0,1,0,0,0),
- array(0,0,0,0,0,1,0,0,0),
- array(0,0,0,0,0,1,0,0,0),
- array(0,0,0,0,0,1,0,0,0),
- array(0,0,0,0,0,1,0,0,0),
- array(1,0,0,0,0,1,0,0,0),
- array(1,0,0,0,0,1,0,0,0),
- array(0,1,0,0,1,0,0,0,0),
- array(0,0,1,1,0,0,0,0,0),
- ),
- 'K' => array( // New 'K', supplied by NeoThermic
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,1,0),
- array(1,0,0,0,0,0,1,0,0),
- array(1,0,0,0,0,1,0,0,0),
- array(1,0,0,0,1,0,0,0,0),
- array(1,0,0,1,0,0,0,0,0),
- array(1,0,1,0,0,0,0,0,0),
- array(1,1,0,0,0,0,0,0,0),
- array(1,0,1,0,0,0,0,0,0),
- array(1,0,0,1,0,0,0,0,0),
- array(1,0,0,0,1,0,0,0,0),
- array(1,0,0,0,0,1,0,0,0),
- array(1,0,0,0,0,0,1,0,0),
- array(1,0,0,0,0,0,0,1,0),
- array(1,0,0,0,0,0,0,0,1),
- ),
- 'L' => array(
- array(0,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,1,1,1,1,1,1,1,1),
+ 1 => array(
+ array(1,0,0,0,1,0,0,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,1,0,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,1,0,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0,0,0,1,0,0,0),
),
- 'M' => array(
- array(1,1,0,0,0,0,0,1,1),
- array(1,1,0,0,0,0,0,1,1),
- array(1,0,1,0,0,0,1,0,1),
- array(1,0,1,0,0,0,1,0,1),
- array(1,0,1,0,0,0,1,0,1),
- array(1,0,0,1,0,1,0,0,1),
- array(1,0,0,1,0,1,0,0,1),
- array(1,0,0,1,0,1,0,0,1),
- array(1,0,0,0,1,0,0,0,1),
- array(1,0,0,0,1,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
+ 2 => array(
+ array(1,1,mt_rand(0,1),1,0,1,1,1,1,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,1,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0,1,1,0,1,1,1),
),
- 'N' => array(
- array(1,1,0,0,0,0,0,0,1),
- array(1,1,0,0,0,0,0,0,1),
- array(1,0,1,0,0,0,0,0,1),
- array(1,0,1,0,0,0,0,0,1),
- array(1,0,0,1,0,0,0,0,1),
- array(1,0,0,1,0,0,0,0,1),
- array(1,0,0,0,1,0,0,0,1),
- array(1,0,0,0,1,0,0,0,1),
- array(1,0,0,0,1,0,0,0,1),
- array(1,0,0,0,0,1,0,0,1),
- array(1,0,0,0,0,1,0,0,1),
- array(1,0,0,0,0,0,1,0,1),
- array(1,0,0,0,0,0,1,0,1),
- array(1,0,0,0,0,0,0,1,1),
- array(1,0,0,0,0,0,0,1,1),
+ 3 => array(
+ array(1,0,0,0,0,0,0,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,1,0,0,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,0,0,0,0,0,0,1),
),
- 'O' => array(
- array(0,0,1,1,1,1,1,0,0),
- array(0,1,0,0,0,0,0,1,0),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(0,1,0,0,0,0,0,1,0),
- array(0,0,1,1,1,1,1,0,0),
+ 4 => array(
+ array(1,0,1,0,1,0,0,1,1,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,1,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
+ array(1,0,1,0,0,0,0,0,0,0,0,0,0,0,0),
),
- 'P' => array(
- array(1,1,1,1,1,1,1,0,0),
- array(1,0,0,0,0,0,0,1,0),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,1,0),
- array(1,1,1,1,1,1,1,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
+ 5 => array(
+ array(1,1,1,1,0,0,0,1,1,1,0,0,1,0,1),
+ array(0,0,0,0,0,0,0,1,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
+ array(1,0,1,0,0,0,0,0,0,0,0,0,0,0,0),
),
- 'Q' => array(
- array(0,0,1,1,1,1,1,0,0),
- array(0,1,0,0,0,0,0,1,0),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,1,0,0,1),
- array(1,0,0,0,0,0,1,0,1),
- array(0,1,0,0,0,0,0,1,0),
- array(0,0,1,1,1,1,1,0,1),
+ 6 => array(
+ array(mt_rand(0,1),mt_rand(0,1),mt_rand(0,1),mt_rand(0,1),mt_rand(0,1),0,mt_rand(0,1),mt_rand(0,1),mt_rand(0,1),mt_rand(0,1),mt_rand(0,1),0,mt_rand(0,1),mt_rand(0,1),mt_rand(0,1)),
+ array(0,0,0,0,0,0,0,mt_rand(0,1),0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
+ array(mt_rand(0,1),0,mt_rand(0,1),0,0,0,0,0,0,0,0,0,0,0,0),
),
- 'R' => array(
- array(1,1,1,1,1,1,1,0,0),
- array(1,0,0,0,0,0,0,1,0),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,1,0),
- array(1,1,1,1,1,1,1,0,0),
- array(1,1,1,0,0,0,0,0,0),
- array(1,0,0,1,0,0,0,0,0),
- array(1,0,0,0,1,0,0,0,0),
- array(1,0,0,0,0,1,0,0,0),
- array(1,0,0,0,0,0,1,0,0),
- array(1,0,0,0,0,0,0,1,0),
- array(1,0,0,0,0,0,0,0,1),
- ),
- 'S' => array(
- array(0,0,1,1,1,1,1,0,0),
- array(0,1,0,0,0,0,0,1,0),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(0,1,0,0,0,0,0,0,0),
- array(0,0,1,1,1,1,1,0,0),
- array(0,0,0,0,0,0,0,1,0),
- array(0,0,0,0,0,0,0,0,1),
- array(0,0,0,0,0,0,0,0,1),
- array(0,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(0,1,0,0,0,0,0,1,0),
- array(0,0,1,1,1,1,1,0,0),
- ),
- 'T' => array(
- array(1,1,1,1,1,1,1,1,1),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- ),
- 'U' => array(
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(0,1,0,0,0,0,0,1,0),
- array(0,0,1,1,1,1,1,0,0),
- ),
- 'V' => array(
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(0,1,0,0,0,0,0,1,0),
- array(0,1,0,0,0,0,0,1,0),
- array(0,1,0,0,0,0,0,1,0),
- array(0,0,1,0,0,0,1,0,0),
- array(0,0,1,0,0,0,1,0,0),
- array(0,0,1,0,0,0,1,0,0),
- array(0,0,1,0,0,0,1,0,0),
- array(0,0,0,1,0,1,0,0,0),
- array(0,0,0,1,0,1,0,0,0),
- array(0,0,0,1,0,1,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- ),
- 'W' => array( // New 'W', supplied by MHobbit
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,1,0,0,0,1),
- array(1,0,0,0,1,0,0,0,1),
- array(1,0,0,1,0,1,0,0,1),
- array(1,0,0,1,0,1,0,0,1),
- array(1,0,0,1,0,1,0,0,1),
- array(1,0,1,0,0,0,1,0,1),
- array(1,0,1,0,0,0,1,0,1),
- array(1,0,1,0,0,0,1,0,1),
- array(1,1,0,0,0,0,0,1,1),
- array(1,1,0,0,0,0,0,1,1),
- ),
- 'X' => array(
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(0,1,0,0,0,0,0,1,0),
- array(0,1,0,0,0,0,0,1,0),
- array(0,0,1,0,0,0,1,0,0),
- array(0,0,0,1,0,1,0,0,0),
- array(0,0,0,1,0,1,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,1,0,1,0,0,0),
- array(0,0,0,1,0,1,0,0,0),
- array(0,0,1,0,0,0,1,0,0),
- array(0,1,0,0,0,0,1,0,0),
- array(0,1,0,0,0,0,0,1,0),
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- ),
- 'Y' => array(
- array(1,0,0,0,0,0,0,0,1),
- array(1,0,0,0,0,0,0,0,1),
- array(0,1,0,0,0,0,0,1,0),
- array(0,1,0,0,0,0,0,1,0),
- array(0,0,1,0,0,0,1,0,0),
- array(0,0,1,0,0,0,1,0,0),
- array(0,0,0,1,0,1,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- ),
- 'Z' => array( // New 'Z' supplied by Anon
- array(1,1,1,1,1,1,1,1,1),
- array(1,0,0,0,0,0,0,0,1),
- array(0,0,0,0,0,0,0,0,1),
- array(0,0,0,0,0,0,0,1,0),
- array(0,0,0,0,0,0,1,0,0),
- array(0,0,0,0,0,1,0,0,0),
- array(0,0,0,0,0,1,0,0,0),
- array(0,0,0,0,1,0,0,0,0),
- array(0,0,0,1,0,0,0,0,0),
- array(0,0,0,1,0,0,0,0,0),
- array(0,0,1,0,0,0,0,0,0),
- array(0,1,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,0),
- array(1,0,0,0,0,0,0,0,1),
- array(1,1,1,1,1,1,1,1,1),
+ 7 => array(
+ array(0,0,0,0,0,0,0,0,0,0,1,1,0,1,1),
+ array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
+ array(0,0,1,1,0,0,0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,1,0,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
),
+ ));
+ }
+
+ /**
+ * Return bitmaps
+ */
+ private static function captcha_bitmaps()
+ {
+ $chars = array(
+ 'A' => array(
+ array(
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,1,1,1,1,1,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,1,1,0,1,1,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,1,1,1,1,1,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,1,1,0,0,0,1,1,1),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,1,1,0,0,0,1,1,0),
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,1,1),
+ array(0,0,0,0,0,1,1,1,1),
+ array(0,0,0,1,1,1,0,0,1),
+ array(0,1,1,1,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,1,0,0,0,0,1,1,1),
+ array(0,1,1,1,1,1,1,0,1),
+ ),
+ ),
+ 'B' => array(
+ array(
+ array(1,1,1,1,1,1,1,0,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,1,1,1,1,1,1,0,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,1,1,1,1,1,1,0,0),
+ ),
+ array(
+ array(1,1,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,1,1,1,1,1,1,0,0),
+ ),
+ array(
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,1,1,1,1,1,0,0),
+ ),
+ ),
+ 'C' => array(
+ array(
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,1,1,1,1,0,0),
+ ),
+ array(
+ array(0,0,1,1,1,1,1,0,1),
+ array(0,1,0,0,0,0,0,1,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,1),
+ array(0,0,1,1,1,1,1,0,1),
+ ),
+ ),
+ 'D' => array(
+ array(
+ array(1,1,1,1,1,1,1,0,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,1,1,1,1,1,1,0,0),
+ ),
+ array(
+ array(1,1,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,1,1,1,1,1,1,0,0),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,1,1,1,1,1,0,1),
+ array(0,1,1,0,0,0,1,1,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,1,0,0,0,1,1,1),
+ array(0,0,1,1,1,1,1,0,1),
+ ),
+ ),
+ 'E' => array(
+ array(
+ array(1,1,1,1,1,1,1,1,1),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,1,1,1,1,1,1,1,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,1,1,1,1,1,1,1,1),
+ ),
+ array(
+ array(1,1,1,1,1,1,1,1,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,1,1,1,1,1,1,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,1,1,1,1,1,1,1,1),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,1,1,0,0,0,1,1,0),
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,1,1,1,1,1,1,1,1),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,1,0,0,0,0,0,1,1),
+ array(0,1,1,1,1,1,1,1,0),
+ ),
+ ),
+ 'F' => array(
+ array(
+ array(1,1,1,1,1,1,1,1,1),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,1,1,1,1,1,1,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ ),
+ array(
+ array(0,1,1,1,1,1,1,1,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(1,1,1,0,0,0,0,0,0),
+ ),
+ array(
+ array(0,0,0,1,1,0,0,0,0),
+ array(0,0,1,1,0,0,0,0,0),
+ array(0,1,1,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(1,1,1,1,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ ),
+ ),
+ 'G' => array(
+ array(
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,1,1,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,1,1,1,1,0,0),
+ ),
+ array(
+ array(0,0,1,1,1,1,1,0,1),
+ array(0,1,0,0,0,0,0,1,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,1,1,1,1,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,1),
+ array(0,0,1,1,1,1,1,0,1),
+ ),
+ array(
+ array(0,0,1,1,1,1,1,0,1),
+ array(0,1,1,0,0,0,0,1,1),
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,1,1,0,0,0,0,0,1),
+ array(0,0,1,1,1,1,1,1,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,1,1),
+ array(1,1,1,1,1,1,1,1,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ ),
+ 'H' => array(
+ array(
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,1,1,1,1,1,1,1,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ ),
+ array(
+ array(1,1,1,0,0,0,1,1,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,1,1,1,1,1,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,1,1,0,0,0,1,1,1),
+ ),
+ array(
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,1,1,1,0,0,0),
+ array(1,1,1,1,0,1,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ ),
+ ),
+ 'I' => array(
+ array(
+ array(1,1,1,1,1,1,1,1,1),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(1,1,1,1,1,1,1,1,1),
+ ),
+ array(
+ array(0,0,0,1,1,1,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,1,1,1,0,0,0),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,1,1,1,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,1,1,1,0,0,0),
+ ),
+ ),
+ 'J' => array(
+ array(
+ array(1,1,1,1,1,1,1,1,1),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(1,0,0,0,0,1,0,0,0),
+ array(1,0,0,0,0,1,0,0,0),
+ array(0,1,0,0,1,0,0,0,0),
+ array(0,0,1,1,0,0,0,0,0),
+ ),
+ array(
+ array(1,1,1,1,1,1,1,1,1),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(1,0,0,0,0,1,0,0,0),
+ array(1,0,0,0,0,1,0,0,0),
+ array(1,1,0,0,1,0,0,0,0),
+ array(1,0,1,1,0,0,0,0,0),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(1,0,0,0,0,1,0,0,0),
+ array(1,0,0,0,0,1,0,0,0),
+ array(0,1,0,0,1,0,0,0,0),
+ array(0,0,1,1,0,0,0,0,0),
+ ),
+ ),
+ 'K' => array(
+ array( // New 'K', supplied by NeoThermic
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,1,0,0,0),
+ array(1,0,0,0,1,0,0,0,0),
+ array(1,0,0,1,0,0,0,0,0),
+ array(1,0,1,0,0,0,0,0,0),
+ array(1,1,0,0,0,0,0,0,0),
+ array(1,0,1,0,0,0,0,0,0),
+ array(1,0,0,1,0,0,0,0,0),
+ array(1,0,0,0,1,0,0,0,0),
+ array(1,0,0,0,0,1,0,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ ),
+ array(
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,1,0,0),
+ array(0,1,0,0,0,1,0,0,0),
+ array(0,1,0,0,1,0,0,0,0),
+ array(0,1,0,1,0,0,0,0,0),
+ array(0,1,1,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,1,0,0,0,0,0,0),
+ array(0,1,0,1,0,0,0,0,0),
+ array(0,1,0,0,1,0,0,0,0),
+ array(0,1,0,0,0,1,0,0,0),
+ array(0,1,0,0,0,0,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,1,1,0,0,0,1,1,1),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,1,0,0,0),
+ array(0,1,0,0,1,0,0,0,0),
+ array(0,1,0,1,0,0,0,0,0),
+ array(0,1,1,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,1,0,0,0,0,0,0),
+ array(0,1,0,1,0,0,0,0,0),
+ array(0,1,0,0,1,0,0,0,0),
+ array(0,1,0,0,0,1,0,0,0),
+ array(0,1,0,0,0,0,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ ),
+ ),
+ 'L' => array(
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,1,1,1,1,1,1,1,1),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,1),
+ array(1,1,1,1,1,1,1,1,1),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,1,0,0,0,0,0,0),
+ array(0,0,1,1,1,0,0,0,0),
+ ),
+ ),
+ 'M' => array(
+ array(
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,0,1,0,0,0,1,0,1),
+ array(1,0,1,0,0,0,1,0,1),
+ array(1,0,1,0,0,0,1,0,1),
+ array(1,0,0,1,0,1,0,0,1),
+ array(1,0,0,1,0,1,0,0,1),
+ array(1,0,0,1,0,1,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,1,0,0,0,1,1,0),
+ array(0,1,1,0,0,0,1,1,0),
+ array(0,1,1,0,0,0,1,1,0),
+ array(0,1,0,1,0,1,0,1,0),
+ array(0,1,0,1,0,1,0,1,0),
+ array(0,1,0,1,0,1,0,1,0),
+ array(0,1,0,0,1,0,0,1,0),
+ array(0,1,0,0,1,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,1,1,0,0,0,1,1,1),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,1,1,1,0,1,1,1,0),
+ array(1,1,0,1,1,1,0,1,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ ),
+ ),
+ 'N' => array(
+ array(
+ array(1,1,0,0,0,0,0,0,1),
+ array(1,1,0,0,0,0,0,0,1),
+ array(1,0,1,0,0,0,0,0,1),
+ array(1,0,1,0,0,0,0,0,1),
+ array(1,0,0,1,0,0,0,0,1),
+ array(1,0,0,1,0,0,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,0,0,1,0,0,1),
+ array(1,0,0,0,0,1,0,0,1),
+ array(1,0,0,0,0,0,1,0,1),
+ array(1,0,0,0,0,0,1,0,1),
+ array(1,0,0,0,0,0,0,1,1),
+ array(1,0,0,0,0,0,0,1,1),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,1,0,0,0,0,1,0),
+ array(0,1,1,0,0,0,0,1,0),
+ array(0,1,1,0,0,0,0,1,0),
+ array(0,1,0,1,0,0,0,1,0),
+ array(0,1,0,1,0,0,0,1,0),
+ array(0,1,0,1,0,0,0,1,0),
+ array(0,1,0,0,1,0,0,1,0),
+ array(0,1,0,0,1,1,0,1,0),
+ array(0,1,0,0,0,1,0,1,0),
+ array(0,1,0,0,0,1,1,1,0),
+ array(0,1,0,0,0,0,1,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,1,1,0,0,0,1,1,1),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(1,0,1,1,1,1,0,0,0),
+ array(1,1,1,0,0,1,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ ),
+ ),
+ 'O' => array(
+ array(
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,1,1,1,1,0,0),
+ ),
+ array(
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,1,0,0,0,0,0,1,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,1,1,1,1,0,0),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,1,1,1,1,1,0,0,0),
+ array(1,1,1,0,0,1,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,1,0,0,0,1,1,0,0),
+ array(0,1,1,1,1,1,0,0,0),
+ ),
+ ),
+ 'P' => array(
+ array(
+ array(1,1,1,1,1,1,1,0,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,1,1,1,1,1,1,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ ),
+ array(
+ array(1,1,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,1,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(1,1,1,0,0,0,0,0,0),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,1,1,0,0,0,0,0),
+ array(1,1,0,1,1,0,0,0,0),
+ array(1,0,0,0,1,0,0,0,0),
+ array(1,0,0,0,1,0,0,0,0),
+ array(1,0,0,1,1,0,0,0,0),
+ array(1,1,1,1,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ ),
+ ),
+ 'Q' => array(
+ array(
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,1,0,0,1),
+ array(1,0,0,0,0,0,1,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,1,1,1,1,0,1),
+ ),
+ array(
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,1,0,0,1,1,0,1,1),
+ array(0,1,1,1,1,1,1,1,0),
+ array(0,0,0,0,0,0,1,1,0),
+ array(0,0,0,0,0,0,0,1,1),
+ array(0,0,0,0,0,0,0,0,1),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,1,1,1,1),
+ array(0,0,0,0,1,1,0,0,1),
+ array(0,0,0,0,1,0,0,0,1),
+ array(0,0,0,0,1,0,0,0,1),
+ array(0,0,0,0,1,1,0,1,1),
+ array(0,0,0,0,0,1,1,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ ),
+ ),
+ 'R' => array(
+ array(
+ array(1,1,1,1,1,1,1,0,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,1,1,1,1,1,1,0,0),
+ array(1,1,1,0,0,0,0,0,0),
+ array(1,0,0,1,0,0,0,0,0),
+ array(1,0,0,0,1,0,0,0,0),
+ array(1,0,0,0,0,1,0,0,0),
+ array(1,0,0,0,0,0,1,0,0),
+ array(1,0,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ ),
+ array(
+ array(1,1,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,1,1,1,1,1,1,0,0),
+ array(0,1,1,0,0,0,0,0,0),
+ array(0,1,1,1,0,0,0,0,0),
+ array(0,1,0,1,1,0,0,0,0),
+ array(0,1,0,0,1,1,0,0,0),
+ array(0,1,0,0,0,1,1,0,0),
+ array(0,1,0,0,0,0,1,1,0),
+ array(1,1,1,0,0,0,1,1,1),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,1,1,1,1,0,0,0,0),
+ array(1,1,0,0,1,1,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ ),
+ ),
+ 'S' => array(
+ array(
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,1,1,1,1,0,0),
+ ),
+ array(
+ array(0,0,1,1,1,1,1,0,1),
+ array(0,1,0,0,0,0,0,1,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,1,0,0,0,0,0,1,0),
+ array(1,0,1,1,1,1,1,0,0),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,1,1,1,1,0,0,0,0),
+ array(1,0,0,0,0,1,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,1,0,0,0,0,0,0,0),
+ array(0,1,1,1,1,0,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(1,0,0,0,1,1,0,0,0),
+ array(0,1,1,1,1,0,0,0,0),
+ ),
+ ),
+ 'T' => array(
+ array(
+ array(1,1,1,1,1,1,1,1,1),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ ),
+ array(
+ array(1,1,1,1,1,1,1,1,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,1,1,1,0,0,0),
+ ),
+ array(
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,1,1,1,1,1,1,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,1,0,0,0),
+ array(0,0,0,0,0,1,1,1,0),
+ ),
+ ),
+ 'U' => array(
+ array(
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,1,1,1,1,0,0),
+ ),
+ array(
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,1,1,0,0,0,1,1,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,1,0,0,0,1,1,0),
+ array(0,0,1,1,1,1,1,0,0),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,1,0,0,0,0,0,1),
+ array(0,0,1,0,0,0,0,0,1),
+ array(0,0,1,0,0,0,0,0,1),
+ array(0,0,1,0,0,0,0,0,1),
+ array(0,0,1,0,0,0,0,0,1),
+ array(0,0,1,0,0,0,0,1,1),
+ array(0,0,1,1,0,0,1,1,1),
+ array(0,0,0,1,1,1,1,0,1),
+ ),
+ ),
+ 'V' => array(
+ array(
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(1,1,1,0,0,0,1,1,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ ),
+ ),
+ 'W' => array(
+ array(
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,0,1,0,0,0,1),
+ array(1,0,0,1,0,1,0,0,1),
+ array(1,0,0,1,0,1,0,0,1),
+ array(1,0,0,1,0,1,0,0,1),
+ array(1,0,1,0,0,0,1,0,1),
+ array(1,0,1,0,0,0,1,0,1),
+ array(1,0,1,0,0,0,1,0,1),
+ array(1,1,0,0,0,0,0,1,1),
+ array(1,1,0,0,0,0,0,1,1),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(1,1,1,0,0,0,1,1,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,1,0,0,1,0),
+ array(0,1,0,0,1,0,0,1,0),
+ array(0,1,0,1,1,1,0,1,0),
+ array(0,1,0,1,0,1,0,1,0),
+ array(0,1,1,1,0,1,1,1,0),
+ array(0,1,1,0,0,0,1,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,1,0,0,1,0),
+ array(0,1,0,0,1,0,0,1,0),
+ array(0,1,0,1,1,1,0,1,0),
+ array(0,1,0,1,0,1,0,1,0),
+ array(0,1,1,1,0,1,1,1,0),
+ array(0,1,1,0,0,0,1,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ ),
+ 'X' => array(
+ array(
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,1,0,0,0,0,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(1,1,1,0,0,0,1,1,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,1,0,0,0,0,1,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(1,1,1,0,0,0,1,1,1),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,1,0,0,0,1,1,0),
+ array(0,0,1,1,0,1,1,0,0),
+ array(0,0,0,1,1,1,0,0,0),
+ array(0,0,0,1,1,1,0,0,0),
+ array(0,0,1,1,0,1,1,0,0),
+ array(0,1,1,0,0,0,1,1,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ ),
+ 'Y' => array(
+ array(
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(1,1,1,0,0,0,1,1,1),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,1,0,0,0,0,0,1,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,1,0,0,0,1,0,0),
+ array(0,0,0,1,0,1,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,1,1,1,0,0,0),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,1,0,0,0,0,1),
+ array(0,0,0,1,1,0,0,0,1),
+ array(0,0,0,0,1,0,0,1,1),
+ array(0,0,0,0,1,1,0,1,0),
+ array(0,0,0,0,0,1,1,1,0),
+ array(0,0,0,0,0,0,1,0,0),
+ array(0,0,0,0,0,1,1,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,1,1,0,0,0),
+ array(0,0,1,1,1,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ ),
+ ),
+ 'Z' => array(
+ array(
+ array(1,1,1,1,1,1,1,1,1),
+ array(1,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,1,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,1,0,0,0,0),
+ array(0,0,0,1,0,0,0,0,0),
+ array(0,0,0,1,0,0,0,0,0),
+ array(0,0,1,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,1),
+ array(1,1,1,1,1,1,1,1,1),
+ ),
+ array(
+ array(1,1,1,1,1,1,1,1,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,0,1),
+ array(0,0,0,0,0,0,0,1,0),
+ array(0,0,0,0,0,0,1,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,0,0,0,1,0,0,0),
+ array(0,0,1,1,1,1,1,0,0),
+ array(0,0,0,1,0,0,0,0,0),
+ array(0,0,0,1,0,0,0,0,0),
+ array(0,0,1,0,0,0,0,0,0),
+ array(0,1,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,0,0,0,0,0,0,0,0),
+ array(1,1,1,1,1,1,1,1,1),
+ ),
+ array(
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,0,0,0,0,0,0,0,0),
+ array(0,1,1,1,1,1,1,1,0),
+ array(0,0,0,0,0,1,1,0,0),
+ array(0,0,0,0,1,1,0,0,0),
+ array(0,0,0,1,1,0,0,0,0),
+ array(0,0,1,1,0,0,0,0,0),
+ array(0,0,1,0,0,0,0,0,0),
+ array(0,1,1,1,1,1,1,1,0),
+ ),
+ ),
+ );
+ return array(
+ 'width' => 9,
+ 'height' => 15,
+ 'data' => array(
+
+ 'A' => $chars['A'][mt_rand(0, min(count($chars['A']), phpbb::$config['captcha_gd_fonts']) -1)],
+ 'B' => $chars['B'][mt_rand(0, min(count($chars['B']), phpbb::$config['captcha_gd_fonts']) -1)],
+ 'C' => $chars['C'][mt_rand(0, min(count($chars['C']), phpbb::$config['captcha_gd_fonts']) -1)],
+ 'D' => $chars['D'][mt_rand(0, min(count($chars['D']), phpbb::$config['captcha_gd_fonts']) -1)],
+ 'E' => $chars['E'][mt_rand(0, min(count($chars['E']), phpbb::$config['captcha_gd_fonts']) -1)],
+ 'F' => $chars['F'][mt_rand(0, min(count($chars['F']), phpbb::$config['captcha_gd_fonts']) -1)],
+ 'G' => $chars['G'][mt_rand(0, min(count($chars['G']), phpbb::$config['captcha_gd_fonts']) -1)],
+ 'H' => $chars['H'][mt_rand(0, min(count($chars['H']), phpbb::$config['captcha_gd_fonts']) -1)],
+ 'I' => $chars['I'][mt_rand(0, min(count($chars['I']), phpbb::$config['captcha_gd_fonts']) -1)],
+ 'J' => $chars['J'][mt_rand(0, min(count($chars['J']), phpbb::$config['captcha_gd_fonts']) -1)],
+ 'K' => $chars['K'][mt_rand(0, min(count($chars['K']), phpbb::$config['captcha_gd_fonts']) -1)],
+ 'L' => $chars['L'][mt_rand(0, min(count($chars['L']), phpbb::$config['captcha_gd_fonts']) -1)],
+ 'M' => $chars['M'][mt_rand(0, min(count($chars['M']), phpbb::$config['captcha_gd_fonts']) -1)],
+ 'N' => $chars['N'][mt_rand(0, min(count($chars['N']), phpbb::$config['captcha_gd_fonts']) -1)],
+ 'O' => $chars['O'][mt_rand(0, min(count($chars['O']), phpbb::$config['captcha_gd_fonts']) -1)],
+ 'P' => $chars['P'][mt_rand(0, min(count($chars['P']), phpbb::$config['captcha_gd_fonts']) -1)],
+ 'Q' => $chars['Q'][mt_rand(0, min(count($chars['Q']), phpbb::$config['captcha_gd_fonts']) -1)],
+ 'R' => $chars['R'][mt_rand(0, min(count($chars['R']), phpbb::$config['captcha_gd_fonts']) -1)],
+ 'S' => $chars['S'][mt_rand(0, min(count($chars['S']), phpbb::$config['captcha_gd_fonts']) -1)],
+ 'T' => $chars['T'][mt_rand(0, min(count($chars['T']), phpbb::$config['captcha_gd_fonts']) -1)],
+ 'U' => $chars['U'][mt_rand(0, min(count($chars['U']), phpbb::$config['captcha_gd_fonts']) -1)],
+ 'V' => $chars['V'][mt_rand(0, min(count($chars['V']), phpbb::$config['captcha_gd_fonts']) -1)],
+ 'W' => $chars['W'][mt_rand(0, min(count($chars['W']), phpbb::$config['captcha_gd_fonts']) -1)],
+ 'X' => $chars['X'][mt_rand(0, min(count($chars['X']), phpbb::$config['captcha_gd_fonts']) -1)],
+ 'Y' => $chars['Y'][mt_rand(0, min(count($chars['Y']), phpbb::$config['captcha_gd_fonts']) -1)],
+ 'Z' => $chars['Z'][mt_rand(0, min(count($chars['Z']), phpbb::$config['captcha_gd_fonts']) -1)],
+
'1' => array(
array(0,0,0,1,1,0,0,0,0),
array(0,0,1,0,1,0,0,0,0),
diff --git a/phpBB/includes/classes/session.php b/phpBB/includes/classes/session.php
index 04840fff55..05a2b60a66 100644
--- a/phpBB/includes/classes/session.php
+++ b/phpBB/includes/classes/session.php
@@ -1192,6 +1192,11 @@ abstract class phpbb_session
foreach (explode(',', $row['bot_ip']) as $bot_ip)
{
+ if (!trim($bot_ip))
+ {
+ continue;
+ }
+
if (strpos($this->system['ip'], $bot_ip) === 0)
{
$bot = (int) $row['user_id'];
diff --git a/phpBB/includes/diff/diff.php b/phpBB/includes/diff/diff.php
index 674a3b58b4..c5249ee3c1 100644
--- a/phpBB/includes/diff/diff.php
+++ b/phpBB/includes/diff/diff.php
@@ -17,7 +17,7 @@ if (!defined('IN_PHPBB'))
}
/**
-* Code from pear.php.net, Text_Diff-1.0.0 package
+* Code from pear.php.net, Text_Diff-1.1.0 package
* http://pear.php.net/package/Text_Diff/
*
* Modified by phpBB Group to meet our coding standards
@@ -61,6 +61,48 @@ class diff
}
/**
+ * returns the number of new (added) lines in a given diff.
+ *
+ * @since Text_Diff 1.1.0
+ *
+ * @return integer The number of new lines
+ */
+ function count_added_lines()
+ {
+ $count = 0;
+
+ foreach ($this->_edits as $edit)
+ {
+ if (is_a($edit, 'diff_op_add') || is_a($edit, 'diff_op_change'))
+ {
+ $count += $edit->nfinal();
+ }
+ }
+ return $count;
+ }
+
+ /**
+ * Returns the number of deleted (removed) lines in a given diff.
+ *
+ * @since Text_Diff 1.1.0
+ *
+ * @return integer The number of deleted lines
+ */
+ function count_deleted_lines()
+ {
+ $count = 0;
+
+ foreach ($this->_edits as $edit)
+ {
+ if (is_a($edit, 'diff_op_delete') || is_a($edit, 'diff_op_change'))
+ {
+ $count += $edit->norig();
+ }
+ }
+ return $count;
+ }
+
+ /**
* Computes a reversed diff.
*
* Example:
@@ -427,31 +469,35 @@ class diff3 extends diff
}
/**
- * Return merged output
+ * Return number of conflicts
+ */
+ function get_num_conflicts()
+ {
+ $conflicts = 0;
+
+ foreach ($this->_edits as $edit)
+ {
+ if ($edit->is_conflict())
+ {
+ $conflicts++;
+ }
+ }
+
+ return $conflicts;
+ }
+
+ /**
+ * Get conflicts content for download. This is generally a merged file, but preserving conflicts and adding explanations to it.
+ * A user could then go through this file, search for the conflicts and changes the code accordingly.
*
* @param string $label1 the cvs file version/label from the original set of lines
* @param string $label2 the cvs file version/label from the new set of lines
* @param string $label_sep the explanation between label1 and label2 - more of a helper for the user
- * @param bool $get_conflicts if set to true only the number of conflicts is returned
- * @param bool $merge_new if set to true the merged output will have the new file contents on a conflicting merge
*
* @return mixed the merged output
*/
- function merged_output($label1 = 'CURRENT_FILE', $label2 = 'NEW_FILE', $label_sep = 'DIFF_SEP_EXPLAIN', $get_conflicts = false, $merge_new = false)
+ function get_conflicts_content($label1 = 'CURRENT_FILE', $label2 = 'NEW_FILE', $label_sep = 'DIFF_SEP_EXPLAIN')
{
- if ($get_conflicts)
- {
- foreach ($this->_edits as $edit)
- {
- if ($edit->is_conflict())
- {
- $this->_conflicting_blocks++;
- }
- }
-
- return $this->_conflicting_blocks;
- }
-
$label1 = (!empty(phpbb::$user->lang[$label1])) ? phpbb::$user->lang[$label1] : $label1;
$label2 = (!empty(phpbb::$user->lang[$label2])) ? phpbb::$user->lang[$label2] : $label2;
$label_sep = (!empty(phpbb::$user->lang[$label_sep])) ? phpbb::$user->lang[$label_sep] : $label_sep;
@@ -462,15 +508,12 @@ class diff3 extends diff
{
if ($edit->is_conflict())
{
- if (!$merge_new)
- {
- $lines = array_merge($lines, array('<<<<<<<' . ($label1 ? ' ' . $label1 : '')), $edit->final1, array('=======' . ($label_sep ? ' ' . $label_sep : '')), $edit->final2, array('>>>>>>>' . ($label2 ? ' ' . $label2 : '')));
- }
- else
- {
- $lines = array_merge($lines, $edit->final1);
- }
- $this->_conflicting_blocks++;
+ // Start conflict label
+ $label_start = array('<<<<<<< ' . $label1);
+ $label_mid = array('======= ' . $label_sep);
+ $label_end = array('>>>>>>> ' . $label2);
+
+ $lines = array_merge($lines, $label_start, $edit->final1, $label_mid, $edit->final2, $label_end);
}
else
{
diff --git a/phpBB/includes/diff/engine.php b/phpBB/includes/diff/engine.php
index d82afb048a..eb0dcce395 100644
--- a/phpBB/includes/diff/engine.php
+++ b/phpBB/includes/diff/engine.php
@@ -17,7 +17,7 @@ if (!defined('IN_PHPBB'))
}
/**
-* Code from pear.php.net, Text_Diff-1.0.0 package
+* Code from pear.php.net, Text_Diff-1.1.0 package
* http://pear.php.net/package/Text_Diff/ (native engine)
*
* Modified by phpBB Group to meet our coding standards
diff --git a/phpBB/includes/diff/renderer.php b/phpBB/includes/diff/renderer.php
index 8194b63da6..2d3ab88a26 100644
--- a/phpBB/includes/diff/renderer.php
+++ b/phpBB/includes/diff/renderer.php
@@ -17,7 +17,7 @@ if (!defined('IN_PHPBB'))
}
/**
-* Code from pear.php.net, Text_Diff-1.0.0 package
+* Code from pear.php.net, Text_Diff-1.1.0 package
* http://pear.php.net/package/Text_Diff/
*
* Modified by phpBB Group to meet our coding standards
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 6ea76617fa..71b96757b5 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -80,6 +80,35 @@ function set_config($config_name, $config_value, $is_dynamic = false)
}
/**
+* Set dynamic config value with arithmetic operation.
+*/
+function set_config_count($config_name, $increment, $is_dynamic = false)
+{
+ switch (phpbb::$db->sql_layer)
+ {
+ case 'firebird':
+ $sql_update = 'CAST(CAST(config_value as integer) + ' . (int) $increment . ' as CHAR)';
+ break;
+
+ case 'postgres':
+ $sql_update = 'int4(config_value) + ' . (int) $increment;
+ break;
+
+ // MySQL, SQlite, mssql, mssql_odbc, oracle
+ default:
+ $sql_update = 'config_value + ' . (int) $increment;
+ break;
+ }
+
+ phpbb::$db->sql_query('UPDATE ' . CONFIG_TABLE . ' SET config_value = ' . $sql_update . " WHERE config_name = '" . phpbb::$db->sql_escape($config_name) . "'");
+
+ if (!$is_dynamic)
+ {
+ phpbb::$acm->destroy('#config');
+ }
+}
+
+/**
* Return formatted string for filesizes
* @todo move those functions to a helper class?
*/
@@ -314,7 +343,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
$sql_update = array();
while ($row = phpbb::$db->sql_fetchrow($result))
{
- $sql_update[] = $row['forum_id'];
+ $sql_update[] = (int) $row['forum_id'];
}
phpbb::$db->sql_freeresult($result);
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 9b81ee09dd..ead47e4dba 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -602,7 +602,7 @@ function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_s
if ($approved_topics)
{
- set_config('num_topics', phpbb::$config['num_topics'] - $approved_topics, true);
+ set_config_count('num_topics', $approved_topics * (-1), true);
}
return $return;
@@ -757,7 +757,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
if ($approved_posts)
{
- set_config('num_posts', phpbb::$config['num_posts'] - $approved_posts, true);
+ set_config_count('num_posts', $approved_posts * (-1), true);
}
// We actually remove topics now to not be inconsistent (the delete_topics function calls this function too)
@@ -793,11 +793,14 @@ function delete_attachments($mode, $ids, $resync = true)
return false;
}
+ $sql_where = '';
+
switch ($mode)
{
case 'post':
case 'message':
$sql_id = 'post_msg_id';
+ $sql_where = ' AND in_message = ' . ($mode == 'message' ? 1 : 0);
break;
case 'topic':
@@ -821,6 +824,9 @@ function delete_attachments($mode, $ids, $resync = true)
$sql = 'SELECT post_msg_id, topic_id, in_message, physical_filename, thumbnail, filesize, is_orphan
FROM ' . ATTACHMENTS_TABLE . '
WHERE ' . phpbb::$db->sql_in_set($sql_id, $ids);
+
+ $sql .= $sql_where;
+
$result = phpbb::$db->sql_query($sql);
while ($row = phpbb::$db->sql_fetchrow($result))
@@ -846,6 +852,9 @@ function delete_attachments($mode, $ids, $resync = true)
// Delete attachments
$sql = 'DELETE FROM ' . ATTACHMENTS_TABLE . '
WHERE ' . phpbb::$db->sql_in_set($sql_id, $ids);
+
+ $sql .= $sql_where;
+
phpbb::$db->sql_query($sql);
$num_deleted = phpbb::$db->sql_affectedrows();
@@ -873,8 +882,8 @@ function delete_attachments($mode, $ids, $resync = true)
if ($space_removed || $files_removed)
{
- set_config('upload_dir_size', phpbb::$config['upload_dir_size'] - $space_removed, true);
- set_config('num_files', phpbb::$config['num_files'] - $files_removed, true);
+ set_config_count('upload_dir_size', $space_removed * (-1), true);
+ set_config_count('num_files', $files_removed * (-1), true);
}
// If we do not resync, we do not need to adjust any message, post, topic or user entries
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php
index 1ef19be8d2..27d70a708c 100644
--- a/phpBB/includes/functions_content.php
+++ b/phpBB/includes/functions_content.php
@@ -932,6 +932,8 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
'S_THUMBNAIL' => true,
'THUMB_IMAGE' => $thumbnail_link,
);
+
+ $update_count[] = $attachment['attach_id'];
break;
// Windows Media Streams
@@ -978,6 +980,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
'S_FLASH_FILE' => true,
'WIDTH' => $width,
'HEIGHT' => $height,
+ 'U_VIEW_LINK' => $download_link . '&amp;view=1',
);
// Viewed/Heared File ... update the download count
@@ -1153,7 +1156,7 @@ function get_username_string($mode, $user_id, $username, $username_colour = '',
switch ($mode)
{
case 'full':
- case 'noprofile':
+ case 'no_profile':
case 'colour':
// Build correct username colour
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index 5fe6d39fe1..18f23fbeea 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -838,6 +838,12 @@ function display_custom_bbcodes()
$i = 0;
while ($row = phpbb::$db->sql_fetchrow($result))
{
+ // If the helpline is defined within the language file, we will use the localised version, else just use the database entry...
+ if (isset(phpbb::$user->lang[strtoupper($row['bbcode_helpline'])]))
+ {
+ $row['bbcode_helpline'] = phpbb::$user->lang[strtoupper($row['bbcode_helpline'])];
+ }
+
phpbb::$template->assign_block_vars('custom_tags', array(
'BBCODE_NAME' => "'[{$row['bbcode_tag']}]', '[/" . str_replace('=', '', $row['bbcode_tag']) . "]'",
'BBCODE_ID' => $num_predefined_bbcodes + ($i * 2),
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index 24b291cc7e..a985a7b2ec 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -53,6 +53,11 @@ class messenger
*/
function to($address, $realname = '')
{
+ if (!trim($address))
+ {
+ return;
+ }
+
$pos = isset($this->addresses['to']) ? sizeof($this->addresses['to']) : 0;
$this->addresses['to'][$pos]['email'] = trim($address);
@@ -73,6 +78,11 @@ class messenger
*/
function cc($address, $realname = '')
{
+ if (!trim($address))
+ {
+ return;
+ }
+
$pos = isset($this->addresses['cc']) ? sizeof($this->addresses['cc']) : 0;
$this->addresses['cc'][$pos]['email'] = trim($address);
$this->addresses['cc'][$pos]['name'] = trim($realname);
@@ -83,6 +93,11 @@ class messenger
*/
function bcc($address, $realname = '')
{
+ if (!trim($address))
+ {
+ return;
+ }
+
$pos = isset($this->addresses['bcc']) ? sizeof($this->addresses['bcc']) : 0;
$this->addresses['bcc'][$pos]['email'] = trim($address);
$this->addresses['bcc'][$pos]['name'] = trim($realname);
@@ -94,7 +109,7 @@ class messenger
function im($address, $realname = '')
{
// IM-Addresses could be empty
- if (!$address)
+ if (!trim($address))
{
return;
}
@@ -324,15 +339,12 @@ class messenger
$headers[] = 'X-MimeOLE: phpBB3';
$headers[] = 'X-phpBB-Origin: phpbb://' . str_replace(array('http://', 'https://'), array('', ''), generate_board_url());
- // We use \n here instead of \r\n because our smtp mailer is adjusting it to \r\n automatically, whereby the php mail function only works
- // if using \n.
-
if (sizeof($this->extra_headers))
{
- $headers[] = implode("\n", $this->extra_headers);
+ $headers = array_merge($headers, $this->extra_headers);
}
- return implode("\n", $headers);
+ return $headers;
}
/**
@@ -345,6 +357,13 @@ class messenger
return false;
}
+ // Addresses to send to?
+ if (empty($this->addresses) || (empty($this->addresses['to']) && empty($this->addresses['cc']) && empty($this->addresses['bcc'])))
+ {
+ // Send was successful. ;)
+ return true;
+ }
+
$use_queue = false;
if (phpbb::$config['email_package_size'] && $this->use_queue)
{
@@ -396,6 +415,10 @@ class messenger
}
else
{
+ // We use the EOL character for the OS here because the PHP mail function does not correctly transform line endings. On Windows SMTP is used (SMTP is \r\n), on UNIX a command is used...
+ // Reference: http://bugs.php.net/bug.php?id=15841
+ $headers = implode(PHP_EOL, $headers);
+
ob_start();
$result = phpbb::$config['email_function_name']($mail_to, mail_encode($this->subject), wordwrap(utf8_wordwrap($this->msg), 997, "\n", true), $headers);
$err_msg = ob_get_clean();
@@ -433,7 +456,8 @@ class messenger
if (empty($this->addresses['im']))
{
- return false;
+ // Send was successful. ;)
+ return true;
}
$use_queue = false;
@@ -630,7 +654,7 @@ class queue
else
{
ob_start();
- $result = phpbb::$config['email_function_name']($to, mail_encode($subject), wordwrap(utf8_wordwrap($msg), 997, "\n", true), $headers);
+ $result = phpbb::$config['email_function_name']($to, mail_encode($subject), wordwrap(utf8_wordwrap($msg), 997, "\n", true), implode(PHP_EOL, $headers));
$err_msg = ob_get_clean();
}
@@ -682,7 +706,7 @@ class queue
if ($fp = @fopen($this->cache_file, 'wb'))
{
@flock($fp, LOCK_EX);
- fwrite($fp, "<?php\n\$this->queue_data = unserialize(" . var_export(serialize($this->queue_data), true) . ");\n\n?>");
+ fwrite($fp, "<?php\nif (!defined('IN_PHPBB')) exit;\n\$this->queue_data = unserialize(" . var_export(serialize($this->queue_data), true) . ");\n\n?>");
@flock($fp, LOCK_UN);
fclose($fp);
@@ -723,7 +747,7 @@ class queue
if ($fp = @fopen($this->cache_file, 'w'))
{
@flock($fp, LOCK_EX);
- fwrite($fp, "<?php\n\$this->queue_data = unserialize(" . var_export(serialize($this->data), true) . ");\n\n?>");
+ fwrite($fp, "<?php\nif (!defined('IN_PHPBB')) exit;\n\$this->queue_data = unserialize(" . var_export(serialize($this->data), true) . ");\n\n?>");
@flock($fp, LOCK_UN);
fclose($fp);
@@ -735,38 +759,35 @@ class queue
/**
* Replacement or substitute for PHP's mail command
*/
-function smtpmail($addresses, $subject, $message, &$err_msg, $headers = '')
+function smtpmail($addresses, $subject, $message, &$err_msg, $headers = false)
{
// Fix any bare linefeeds in the message to make it RFC821 Compliant.
$message = preg_replace("#(?<!\r)\n#si", "\r\n", $message);
- if ($headers != '')
+ if ($headers !== false)
{
- if (is_array($headers))
+ if (!is_array($headers))
{
- $headers = (sizeof($headers) > 1) ? join("\n", $headers) : $headers[0];
+ // Make sure there are no bare linefeeds in the headers
+ $headers = preg_replace('#(?<!\r)\n#si', "\n", $headers);
+ $headers = explode("\n", $headers);
}
- $headers = chop($headers);
-
- // Make sure there are no bare linefeeds in the headers
- $headers = preg_replace('#(?<!\r)\n#si', "\r\n", $headers);
// Ok this is rather confusing all things considered,
// but we have to grab bcc and cc headers and treat them differently
// Something we really didn't take into consideration originally
- $header_array = explode("\r\n", $headers);
- $headers = '';
+ $headers_used = array();
- foreach ($header_array as $header)
+ foreach ($headers as $header)
{
if (strpos(strtolower($header), 'cc:') === 0 || strpos(strtolower($header), 'bcc:') === 0)
{
- $header = '';
+ continue;
}
- $headers .= ($header != '') ? $header . "\r\n" : '';
+ $headers_used[] = trim($header);
}
- $headers = chop($headers);
+ $headers = chop(implode("\r\n", $headers_used));
}
if (trim($subject) == '')
@@ -922,7 +943,10 @@ function smtpmail($addresses, $subject, $message, &$err_msg, $headers = '')
}
// Now any custom headers....
- $smtp->server_send("$headers\r\n");
+ if ($headers !== false)
+ {
+ $smtp->server_send("$headers\r\n");
+ }
// Ok now we are ready for the message...
$smtp->server_send($message);
@@ -1039,7 +1063,7 @@ class smtp_class
public function log_into_server($hostname, $username, $password, $default_auth_method)
{
$err_msg = '';
- $local_host = (function_exists('php_uname')) ? php_uname('n') : phpbb::$user->system['host'];
+ $local_host = (function_exists('php_uname')) ? gethostbyaddr(gethostbyname(php_uname('n'))) : phpbb::$user->system['host'];
// If we are authenticating through pop-before-smtp, we
// have to login ones before we get authenticated
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 13018e47f5..baa2ab3180 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -615,7 +615,7 @@ function create_thumbnail($source, $destination, $mimetype)
phpbb::$config['img_imagick'] .= '/';
}
- @passthru(escapeshellcmd(phpbb::$config['img_imagick']) . 'convert' . ((defined('PHP_OS') && preg_match('#^win#i', PHP_OS)) ? '.exe' : '') . ' -quality 85 -antialias -sample ' . $new_width . 'x' . $new_height . ' "' . str_replace('\\', '/', $source) . '" +profile "*" "' . str_replace('\\', '/', $destination) . '"');
+ @passthru(escapeshellcmd(phpbb::$config['img_imagick']) . 'convert' . ((defined('PHP_OS') && preg_match('#^win#i', PHP_OS)) ? '.exe' : '') . ' -quality 85 -geometry ' . $new_width . 'x' . $new_height . ' "' . str_replace('\\', '/', $source) . '" "' . str_replace('\\', '/', $destination) . '"');
if (file_exists($destination))
{
@@ -940,13 +940,20 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
}
$sql = phpbb::$db->sql_build_query('SELECT', array(
- 'SELECT' => 'u.username, u.user_id, u.user_colour, p.*',
+ 'SELECT' => 'u.username, u.user_id, u.user_colour, p.*, z.friend, z.foe',
'FROM' => array(
USERS_TABLE => 'u',
POSTS_TABLE => 'p',
),
+ 'LEFT_JOIN' => array(
+ array(
+ 'FROM' => array(ZEBRA_TABLE => 'z'),
+ 'ON' => 'z.user_id = ' . phpbb::$user->data['user_id'] . ' AND z.zebra_id = p.poster_id'
+ )
+ ),
+
'WHERE' => phpbb::$db->sql_in_set('p.post_id', $post_list) . '
AND u.user_id = p.poster_id'
));
@@ -1037,6 +1044,9 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
$post_subject = censor_text($post_subject);
+ $post_anchor = ($mode == 'post_review') ? 'ppr' . $row['post_id'] : 'pr' . $row['post_id'];
+ $u_show_post = append_sid('viewtopic', "f=$forum_id&amp;t=$topic_id&amp;p={$row['post_id']}&amp;view=show#p{$row['post_id']}");
+
phpbb::$template->assign_block_vars($mode . '_row', array(
'POST_AUTHOR_FULL' => get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
'POST_AUTHOR_COLOUR' => get_username_string('colour', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
@@ -1044,6 +1054,9 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
'U_POST_AUTHOR' => get_username_string('profile', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? true : false,
+ 'S_FRIEND' => ($row['friend']) ? true : false,
+ 'S_IGNORE_POST' => ($row['foe']) ? true : false,
+ 'L_IGNORE_POST' => ($row['foe']) ? phpbb::$user->lang('POST_BY_FOE', get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), "<a href=\"{$u_show_post}\" onclick=\"dE('{$post_anchor}', 1); return false;\">", '</a>') : '',
'POST_SUBJECT' => $post_subject,
'MINI_POST_IMG' => phpbb::$user->img('icon_post_target', 'POST'),
@@ -1708,11 +1721,23 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
if (isset($poll['poll_options']) && !empty($poll['poll_options']))
{
+ $poll_start = ($poll['poll_start']) ? $poll['poll_start'] : $current_time;
+ $poll_length = $poll['poll_length'] * 86400;
+ if ($poll_length < 0)
+ {
+ $poll_start = $poll_start + $poll_length;
+ if ($poll_start < 0)
+ {
+ $poll_start = 0;
+ }
+ $poll_length = 1;
+ }
+
$sql_data[TOPICS_TABLE]['sql'] = array_merge($sql_data[TOPICS_TABLE]['sql'], array(
'poll_title' => $poll['poll_title'],
- 'poll_start' => ($poll['poll_start']) ? $poll['poll_start'] : $current_time,
+ 'poll_start' => $poll_start,
'poll_max_options' => $poll['poll_max_options'],
- 'poll_length' => ($poll['poll_length'] * 86400),
+ 'poll_length' => $poll_length,
'poll_vote_change' => $poll['poll_vote_change'])
);
}
@@ -1741,6 +1766,20 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
case 'edit_topic':
case 'edit_first_post':
+ if (isset($poll['poll_options']) && !empty($poll['poll_options']))
+ {
+ $poll_start = ($poll['poll_start']) ? $poll['poll_start'] : $current_time;
+ $poll_length = $poll['poll_length'] * 86400;
+ if ($poll_length < 0)
+ {
+ $poll_start = $poll_start + $poll_length;
+ if ($poll_start < 0)
+ {
+ $poll_start = 0;
+ }
+ $poll_length = 1;
+ }
+ }
$sql_data[TOPICS_TABLE]['sql'] = array(
'forum_id' => ($topic_type == POST_GLOBAL) ? 0 : $data['forum_id'],
@@ -1751,9 +1790,9 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
'topic_type' => $topic_type,
'topic_time_limit' => ($topic_type == POST_STICKY || $topic_type == POST_ANNOUNCE) ? ($data['topic_time_limit'] * 86400) : 0,
'poll_title' => (isset($poll['poll_options'])) ? $poll['poll_title'] : '',
- 'poll_start' => (isset($poll['poll_options'])) ? (($poll['poll_start']) ? $poll['poll_start'] : $current_time) : 0,
+ 'poll_start' => (isset($poll['poll_options'])) ? $poll_start : 0,
'poll_max_options' => (isset($poll['poll_options'])) ? $poll['poll_max_options'] : 1,
- 'poll_length' => (isset($poll['poll_options'])) ? ($poll['poll_length'] * 86400) : 0,
+ 'poll_length' => (isset($poll['poll_options'])) ? $poll_length : 0,
'poll_vote_change' => (isset($poll['poll_vote_change'])) ? $poll['poll_vote_change'] : 0,
'topic_attachment' => (!empty($data['attachment_data'])) ? 1 : (isset($data['topic_attachment']) ? $data['topic_attachment'] : 0),
@@ -1780,8 +1819,8 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_topics = forum_topics - 1';
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts - ' . ($topic_row['topic_replies'] + 1);
- set_config('num_topics', phpbb::$config['num_topics'] - 1, true);
- set_config('num_posts', phpbb::$config['num_posts'] - ($topic_row['topic_replies'] + 1), true);
+ set_config_count('num_topics', -1, true);
+ set_config_count('num_posts', ($topic_row['topic_replies'] + 1) * (-1), true);
// Only decrement this post, since this is the one non-approved now
if (phpbb::$acl->acl_get('f_postcount', $data['forum_id']))
@@ -1801,7 +1840,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
$sql_data[TOPICS_TABLE]['stat'][] = 'topic_replies = topic_replies - 1';
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts - 1';
- set_config('num_posts', phpbb::$config['num_posts'] - 1, true);
+ set_config_count('num_posts', -1, true);
if (phpbb::$acl->acl_get('f_postcount', $data['forum_id']))
{
@@ -2068,8 +2107,8 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
if ($space_taken && $files_added)
{
- set_config('upload_dir_size', phpbb::$config['upload_dir_size'] + $space_taken, true);
- set_config('num_files', phpbb::$config['num_files'] + $files_added, true);
+ set_config_count('upload_dir_size', $space_taken, true);
+ set_config_count('num_files', $files_added, true);
}
}
@@ -2302,13 +2341,13 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
{
if ($post_mode == 'post')
{
- set_config('num_topics', phpbb::$config['num_topics'] + 1, true);
- set_config('num_posts', phpbb::$config['num_posts'] + 1, true);
+ set_config_count('num_topics', 1, true);
+ set_config_count('num_posts', 1, true);
}
if ($post_mode == 'reply')
{
- set_config('num_posts', phpbb::$config['num_posts'] + 1, true);
+ set_config_count('num_posts', 1, true);
}
}
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index 523a688a6b..de7a1e7d18 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -1541,8 +1541,8 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true)
if ($space_taken && $files_added)
{
- set_config('upload_dir_size', phpbb::$config['upload_dir_size'] + $space_taken, true);
- set_config('num_files', phpbb::$config['num_files'] + $files_added, true);
+ set_config_count('upload_dir_size', $space_taken, true);
+ set_config_count('num_files', $files_added, true);
}
}
diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php
index 0c4aed73e7..32c3782941 100644
--- a/phpBB/includes/functions_profile_fields.php
+++ b/phpBB/includes/functions_profile_fields.php
@@ -37,8 +37,8 @@ class custom_profile
switch ($mode)
{
case 'register':
- // If the field is required we show it on the registration page and do not show hidden fields
- $sql_where .= ' AND (f.field_show_on_reg = 1 OR f.field_required = 1) AND f.field_hide = 0';
+ // If the field is required we show it on the registration page
+ $sql_where .= ' AND f.field_show_on_reg = 1';
break;
case 'profile':
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index d4bd9a78a8..58149b9527 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -272,7 +272,7 @@ function user_add($user_row, $cp_data = false)
{
set_config('newest_user_id', $user_id, true);
set_config('newest_username', $user_row['username'], true);
- set_config('num_users', phpbb::$config['num_users'] + 1, true);
+ set_config_count('num_users', 1, true);
$sql = 'SELECT group_colour
FROM ' . GROUPS_TABLE . '
@@ -479,7 +479,7 @@ function user_delete($mode, $user_id, $post_username = false)
phpbb::$db->sql_transaction('begin');
- $table_ary = array(USERS_TABLE, USER_GROUP_TABLE, TOPICS_WATCH_TABLE, FORUMS_WATCH_TABLE, ACL_USERS_TABLE, TOPICS_TRACK_TABLE, TOPICS_POSTED_TABLE, FORUMS_TRACK_TABLE, PROFILE_FIELDS_DATA_TABLE, MODERATOR_CACHE_TABLE, DRAFTS_TABLE, BOOKMARKS_TABLE);
+ $table_ary = array(USERS_TABLE, USER_GROUP_TABLE, TOPICS_WATCH_TABLE, FORUMS_WATCH_TABLE, ACL_USERS_TABLE, TOPICS_TRACK_TABLE, TOPICS_POSTED_TABLE, FORUMS_TRACK_TABLE, PROFILE_FIELDS_DATA_TABLE, MODERATOR_CACHE_TABLE, DRAFTS_TABLE, BOOKMARKS_TABLE, SESSIONS_KEYS_TABLE);
foreach ($table_ary as $table)
{
@@ -490,6 +490,16 @@ function user_delete($mode, $user_id, $post_username = false)
phpbb::$acm->destroy_sql(MODERATOR_CACHE_TABLE);
+ // Delete the user_id from the banlist
+ $sql = 'DELETE FROM ' . BANLIST_TABLE . '
+ WHERE ban_userid = ' . $user_id;
+ phpbb::$db->sql_query($sql);
+
+ // Delete the user_id from the session table
+ $sql = 'DELETE FROM ' . SESSIONS_TABLE . '
+ WHERE session_user_id = ' . $user_id;
+ phpbb::$db->sql_query($sql);
+
// Remove any undelivered mails...
$sql = 'SELECT msg_id, user_id
FROM ' . PRIVMSGS_TO_TABLE . '
@@ -558,7 +568,7 @@ function user_delete($mode, $user_id, $post_username = false)
// Decrement number of users if this user is active
if ($user_row['user_type'] != phpbb::USER_INACTIVE && $user_row['user_type'] != phpbb::USER_IGNORE)
{
- set_config('num_users', phpbb::$config['num_users'] - 1, true);
+ set_config_count('num_users', -1, true);
}
return false;
@@ -637,12 +647,12 @@ function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL)
if ($deactivated)
{
- set_config('num_users', phpbb::$config['num_users'] - $deactivated, true);
+ set_config_count('num_users', $deactivated * (-1), true);
}
if ($activated)
{
- set_config('num_users', phpbb::$config['num_users'] + $activated, true);
+ set_config_count('num_users', $activated, true);
}
// Update latest username
@@ -1117,6 +1127,8 @@ function user_unban($mode, $ban)
/**
* Whois facility
+*
+* @link http://tools.ietf.org/html/rfc3912 RFC3912: WHOIS Protocol Specification
*/
function user_ipwhois($ip)
{
@@ -1129,16 +1141,10 @@ function user_ipwhois($ip)
return '';
}
- $match = array(
- '#RIPE\.NET#is' => 'whois.ripe.net',
- '#whois\.apnic\.net#is' => 'whois.apnic.net',
- '#nic\.ad\.jp#is' => 'whois.nic.ad.jp',
- '#whois\.registro\.br#is' => 'whois.registro.br'
- );
-
if (($fsk = @fsockopen('whois.arin.net', 43)))
{
- fputs($fsk, "$ip\n");
+ // CRLF as per RFC3912
+ fputs($fsk, "$ip\r\n");
while (!feof($fsk))
{
$ipwhois .= fgets($fsk, 1024);
@@ -1146,22 +1152,38 @@ function user_ipwhois($ip)
@fclose($fsk);
}
- foreach (array_keys($match) as $server)
+ $match = array();
+
+ // Test for referrals from ARIN to other whois databases, roll on rwhois
+ if (preg_match('#ReferralServer: whois://(.+)#im', $ipwhois, $match))
{
- if (preg_match($server, $ipwhois))
+ if (strpos($match[1], ':') !== false)
+ {
+ $pos = strrpos($match[1], ':');
+ $server = substr($match[1], 0, $pos);
+ $port = (int) substr($match[1], $pos + 1);
+ unset($pos);
+ }
+ else
{
- $ipwhois = '';
- if (($fsk = @fsockopen($match[$server], 43)))
+ $server = $match[1];
+ $port = 43;
+ }
+
+ $buffer = '';
+
+ if (($fsk = @fsockopen($server, $port)))
+ {
+ fputs($fsk, "$ip\r\n");
+ while (!feof($fsk))
{
- fputs($fsk, "$ip\n");
- while (!feof($fsk))
- {
- $ipwhois .= fgets($fsk, 1024);
- }
- @fclose($fsk);
+ $buffer .= fgets($fsk, 1024);
}
- break;
+ @fclose($fsk);
}
+
+ // Use the result from ARIN if we don't get any result here
+ $ipwhois = (empty($buffer)) ? $ipwhois : $buffer;
}
$ipwhois = htmlspecialchars($ipwhois);
@@ -2591,7 +2613,14 @@ function group_user_add($group_id, $user_id_ary = false, $username_ary = false,
*/
function group_user_del($group_id, $user_id_ary = false, $username_ary = false, $group_name = false)
{
- $group_order = array('ADMINISTRATORS', 'GLOBAL_MODERATORS', 'REGISTERED_COPPA', 'REGISTERED', 'BOTS', 'GUESTS');
+ if (phpbb::$config['coppa_enable'])
+ {
+ $group_order = array('ADMINISTRATORS', 'GLOBAL_MODERATORS', 'REGISTERED_COPPA', 'REGISTERED', 'BOTS', 'GUESTS');
+ }
+ else
+ {
+ $group_order = array('ADMINISTRATORS', 'GLOBAL_MODERATORS', 'REGISTERED', 'BOTS', 'GUESTS');
+ }
// We need both username and user_id info
$result = user_get_id_name($user_id_ary, $username_ary);
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index dd44e403f4..9a13d2d14c 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -684,6 +684,7 @@ class bbcode_firstpass extends bbcode
* [quote="[i]test[/i]"]test[/quote] (correct: parsed)
* [quote="[quote]test[/quote]"]test[/quote] (correct: parsed - Username displayed as [quote]test[/quote])
* #20735 - [quote]test[/[/b]quote] test [/quote][/quote] test - (correct: quoted: "test[/[/b]quote] test" / non-quoted: "[/quote] test" - also failed if layout distorted)
+ * #40565 - [quote="a"]a[/quote][quote="a]a[/quote] (correct: first quote tag parsed, second quote tag unparsed)
*/
$in = str_replace("\r\n", "\n", str_replace('\"', '"', trim($in)));
@@ -694,7 +695,7 @@ class bbcode_firstpass extends bbcode
}
// To let the parser not catch tokens within quote_username quotes we encode them before we start this...
- $in = preg_replace('#quote=&quot;(.*?)&quot;\]#ie', "'quote=&quot;' . str_replace(array('[', ']'), array('&#91;', '&#93;'), '\$1') . '&quot;]'", $in);
+ $in = preg_replace('#quote=&quot;(.*?)&quot;\]#ie', "'quote=&quot;' . str_replace(array('[', ']', '\\\"'), array('&#91;', '&#93;', '\"'), '\$1') . '&quot;]'", $in);
$tok = ']';
$out = '[';
@@ -847,6 +848,8 @@ class bbcode_firstpass extends bbcode
}
while ($in);
+ $out .= $buffer;
+
if (sizeof($close_tags))
{
$out .= '[' . implode('][', $close_tags) . ']';
@@ -1085,13 +1088,6 @@ class parse_message extends bbcode_firstpass
}
}
- // Check for "empty" message
- if ($mode !== 'sig' && utf8_clean_string($this->message) === '')
- {
- $this->warn_msg[] = phpbb::$user->lang['TOO_FEW_CHARS'];
- return (!$update_this_message) ? $return_message : $this->warn_msg;
- }
-
// Prepare BBcode (just prepares some tags for better parsing)
if ($allow_bbcode && strpos($this->message, '[') !== false)
{
@@ -1134,6 +1130,14 @@ class parse_message extends bbcode_firstpass
}
}
+ // Check for "empty" message. We do not check here for maximum length, because bbcode, smilies, etc. can add to the length.
+ // The maximum length check happened before any parsings.
+ if ($mode !== 'sig' && utf8_clean_string($this->message) === '')
+ {
+ $this->warn_msg[] = $user->lang['TOO_FEW_CHARS'];
+ return (!$update_this_message) ? $return_message : $this->warn_msg;
+ }
+
// Check number of links
if (phpbb::$config['max_' . $mode . '_urls'] && $num_urls > phpbb::$config['max_' . $mode . '_urls'])
{
diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php
index 4753ae6be1..f9cc9ed194 100644
--- a/phpBB/install/convertors/convert_phpbb20.php
+++ b/phpBB/install/convertors/convert_phpbb20.php
@@ -494,7 +494,7 @@ if (!$get_info)
array('topic_moved_id', 0, ''),
array('topic_type', 'topics.topic_type', 'phpbb_convert_topic_type'),
array('topic_first_post_id', 'topics.topic_first_post_id', ''),
-
+ array('topic_last_view_time', 'posts.post_time', 'intval'),
array('poll_title', 'vote_desc.vote_text', array('function1' => 'null_to_str', 'function2' => 'phpbb_set_encoding', 'function3' => 'utf8_htmlspecialchars')),
array('poll_start', 'vote_desc.vote_start', 'null_to_zero'),
array('poll_length', 'vote_desc.vote_length', 'null_to_zero'),
@@ -866,7 +866,7 @@ if (!$get_info)
array('user_regdate', 'users.user_regdate', ''),
array('username', 'users.username', 'phpbb_set_default_encoding'), // recode to utf8 with default lang
array('username_clean', 'users.username', array('function1' => 'phpbb_set_default_encoding', 'function2' => 'utf8_clean_string')),
- array('user_password', 'users.user_password', ''),
+ array('user_password', 'users.user_password', 'phpbb_hash'),
array('user_pass_convert', 1, ''),
array('user_posts', 'users.user_posts', 'intval'),
array('user_email', 'users.user_email', 'strtolower'),
diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php
index a9710031f8..4b04f85ba7 100644
--- a/phpBB/install/convertors/functions_phpbb20.php
+++ b/phpBB/install/convertors/functions_phpbb20.php
@@ -457,7 +457,7 @@ function phpbb_get_birthday($birthday = '')
}
// The birthday mod from niels is using this code to transform to day/month/year
- return sprintf('%2d-%2d-%4d', gmdate('n', $birthday * 86400 + 1), gmdate('j', $birthday * 86400 + 1), gmdate('Y', $birthday * 86400 + 1));
+ return sprintf('%2d-%2d-%4d', gmdate('j', $birthday * 86400 + 1), gmdate('n', $birthday * 86400 + 1), gmdate('Y', $birthday * 86400 + 1));
}
}
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index c9dd0a523f..2eef013742 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -10,7 +10,10 @@
$updates_to_version = '3.1.0';
-// Return if we "just include it" to find out for which version the database update is responsuble for
+// Enter any version to update from to test updates. The version within the db will not be updated.
+$debug_from_version = false;
+
+// Return if we "just include it" to find out for which version the database update is responsible for
if (defined('IN_PHPBB') && defined('IN_INSTALL'))
{
return;
@@ -86,7 +89,7 @@ header('Content-type: text/html; charset=UTF-8');
<div class="panel">
<span class="corners-top"><span></span></span>
<div id="content">
- <div id="main">
+ <div id="main" class="install-body">
<h1><?php echo phpbb::$user->lang['UPDATING_TO_LATEST_STABLE']; ?></h1>
@@ -106,6 +109,12 @@ $current_version = str_replace('rc', 'RC', strtolower(phpbb::$config['version'])
$latest_version = str_replace('rc', 'RC', strtolower($updates_to_version));
$orig_version = phpbb::$config['version'];
+// Fill DB version
+if (empty(phpbb::$config['dbms_version']))
+{
+ set_config('dbms_version', phpbb::$db->sql_server_info(true));
+}
+
// If the latest version and the current version are 'unequal', we will update the version_update_from, else we do not update anything.
if ($inline_update)
{
@@ -224,11 +233,14 @@ $errored = $no_updates = false;
flush();
-// update the version
-$sql = "UPDATE " . CONFIG_TABLE . "
- SET config_value = '$updates_to_version'
- WHERE config_name = 'version'";
-_sql($sql, $errored, $error_ary);
+if ($debug_from_version === false)
+{
+ // update the version
+ $sql = "UPDATE " . CONFIG_TABLE . "
+ SET config_value = '$updates_to_version'
+ WHERE config_name = 'version'";
+ _sql($sql, $errored, $error_ary);
+}
// Reset permissions
$sql = 'UPDATE ' . USERS_TABLE . "
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index 97ff0f1508..6f05a222cf 100644
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -1712,7 +1712,7 @@ class install_install extends module
'Heritrix [Crawler]' => array('heritrix/1.', ''),
'IBM Research [Bot]' => array('ibm.com/cs/crawler', ''),
'ICCrawler - ICjobs' => array('ICCrawler - ICjobs', ''),
- 'ichiro [Crawler]' => array('ichiro/2', ''),
+ 'ichiro [Crawler]' => array('ichiro/', ''),
'Majestic-12 [Bot]' => array('MJ12bot/', ''),
'Metager [Bot]' => array('MetagerBot/', ''),
'MSN NewsBlogs' => array('msnbot-NewsBlogs/', ''),
diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php
index b815e36e29..383a4d8cca 100644
--- a/phpBB/install/install_update.php
+++ b/phpBB/install/install_update.php
@@ -148,6 +148,12 @@ class install_update extends module
));
}
+ // Fill DB version
+ if (empty(phpbb::$config['dbms_version']))
+ {
+ set_config('dbms_version', phpbb::$db->sql_server_info(true));
+ }
+
if ($this->test_update === false)
{
// Got the updater template itself updated? If so, we are able to directly use it - but only if all three files are present
@@ -336,13 +342,14 @@ class install_update extends module
continue;
}
- phpbb::$template->assign_block_vars('files', array(
+/* phpbb::$template->assign_block_vars('files', array(
'S_STATUS' => true,
'STATUS' => $status,
'L_STATUS' => phpbb::$user->lang['STATUS_' . strtoupper($status)],
'TITLE' => phpbb::$user->lang['FILES_' . strtoupper($status)],
'EXPLAIN' => phpbb::$user->lang['FILES_' . strtoupper($status) . '_EXPLAIN'],
- ));
+ )
+ );*/
foreach ($filelist as $file_struct)
{
@@ -362,7 +369,7 @@ class install_update extends module
$diff_url = append_sid($this->p_master->module_url, "mode=$mode&amp;sub=file_check&amp;action=diff&amp;status=$status&amp;file=" . urlencode($file_struct['filename']));
- phpbb::$template->assign_block_vars('files', array(
+ phpbb::$template->assign_block_vars($status, array(
'STATUS' => $status,
'FILENAME' => $filename,
@@ -649,7 +656,7 @@ class install_update extends module
default:
$diff = $this->return_diff($this->old_location . $original_filename, PHPBB_ROOT_PATH . $file_struct['filename'], $this->new_location . $original_filename);
- $contents = implode("\n", $diff->merged_output());
+ $contents = implode("\n", $diff->merged_new_output());
unset($diff);
break;
}
@@ -1015,7 +1022,7 @@ class install_update extends module
$status = request_var('status', '');
$file = request_var('file', '');
- $diff_mode = request_var('diff_mode', 'side_by_side');
+ $diff_mode = request_var('diff_mode', 'inline');
// First of all make sure the file is within our file update list with the correct status
$found_entry = array();
@@ -1059,9 +1066,7 @@ class install_update extends module
break;
- case MERGE_NEW_FILE:
- case MERGE_MOD_FILE:
-
+/*
$diff = $this->return_diff($this->old_location . $original_file, PHPBB_ROOT_PATH . $file, $this->new_location . $original_file);
$tmp = array(
@@ -1078,17 +1083,37 @@ class install_update extends module
$this->page_title = 'VIEWING_FILE_CONTENTS';
break;
-
- default:
+*/
+ // Merge differences and use new phpBB code for conflicted blocks
+ case MERGE_NEW_FILE:
+ case MERGE_MOD_FILE:
$diff = $this->return_diff($this->old_location . $original_file, PHPBB_ROOT_PATH . $file, $this->new_location . $original_file);
phpbb::$template->assign_vars(array(
'S_DIFF_CONFLICT_FILE' => true,
- 'NUM_CONFLICTS' => $diff->merged_output(false, false, false, true),
+ 'NUM_CONFLICTS' => $diff->get_num_conflicts(),
));
- $diff = $this->return_diff(PHPBB_ROOT_PATH . $file, $diff->merged_output());
+ $diff = $this->return_diff(PHPBB_ROOT_PATH . $file, ($option == MERGE_NEW_FILE) ? $diff->merged_new_output() : $diff->merged_orig_output());
+ break;
+
+ // Download conflict file
+ default:
+
+ $diff = $this->return_diff($this->old_location . $original_file, $phpbb_root_path . $file, $this->new_location . $original_file);
+
+ header('Pragma: no-cache');
+ header("Content-Type: application/octetstream; name=\"$file\"");
+ header("Content-disposition: attachment; filename=$file");
+
+ @set_time_limit(0);
+
+ echo implode("\n", $diff->get_conflicts_content());
+
+ flush();
+ exit;
+
break;
}
@@ -1391,9 +1416,9 @@ class install_update extends module
unset($tmp);
- if ($diff->merged_output(false, false, false, true))
+ if ($diff->get_num_conflicts())
{
- $update_ary['conflicts'] = $diff->_conflicting_blocks;
+ $update_ary['conflicts'] = $diff->get_num_conflicts();
// There is one special case... users having merged with a conflicting file... we need to check this
$tmp = array(
@@ -1420,7 +1445,7 @@ class install_update extends module
$tmp = array(
'file1' => file_get_contents(PHPBB_ROOT_PATH . $file),
- 'file2' => implode("\n", $diff->merged_output()),
+ 'file2' => implode("\n", $diff->merged_new_output()),
);
// now compare the merged output with the original file to see if the modified file is up to date
diff --git a/phpBB/install/schemas/schema_data.php b/phpBB/install/schemas/schema_data.php
index ff14ef26fa..f4f5d3444d 100644
--- a/phpBB/install/schemas/schema_data.php
+++ b/phpBB/install/schemas/schema_data.php
@@ -109,6 +109,10 @@ $schema_data[] = array(
array('captcha_gd_foreground_noise', '0'),
array('captcha_gd_x_grid', '25'),
array('captcha_gd_y_grid', '25'),
+ array('captcha_gd_wave', '0'),
+ array('captcha_gd_3d_noise', '1'),
+ array('captcha_gd_fonts', '1'),
+ array('confirm_refresh', '1'),
array('check_attachment_content', '1'),
array('check_dnsbl', '0'),
array('chg_passforce', '0'),
diff --git a/phpBB/install/schemas/schema_structure.php b/phpBB/install/schemas/schema_structure.php
index f438ff2215..641fafc4ac 100644
--- a/phpBB/install/schemas/schema_structure.php
+++ b/phpBB/install/schemas/schema_structure.php
@@ -55,7 +55,7 @@ $schema_data['phpbb_acl_options'] = array(
),
'PRIMARY_KEY' => 'auth_option_id',
'KEYS' => array(
- 'auth_option' => array('INDEX', 'auth_option'),
+ 'auth_option' => array('UNIQUE', 'auth_option'),
),
);
diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php
index b9b089969e..dc12cbb42a 100644
--- a/phpBB/language/en/acp/board.php
+++ b/phpBB/language/en/acp/board.php
@@ -245,12 +245,20 @@ $lang = array_merge($lang, array(
'CAPTCHA_GD_X_GRID_EXPLAIN' => 'Use lower settings of this to make the GD based CAPTCHA harder. 0 will disable x-axis background noise.',
'CAPTCHA_GD_Y_GRID' => 'GD CAPTCHA background noise y-axis',
'CAPTCHA_GD_Y_GRID_EXPLAIN' => 'Use lower settings of this to make the GD based CAPTCHA harder. 0 will disable y-axis background noise.',
+ 'CAPTCHA_GD_WAVE' => 'GD CAPTCHA wave distortion',
+ 'CAPTCHA_GD_WAVE_EXPLAIN' => 'This applies a wave distortion to the CAPTCHA.',
+ 'CAPTCHA_GD_3D_NOISE' => 'Add 3D-noise objects',
+ 'CAPTCHA_GD_3D_NOISE_EXPLAIN' => 'This adds additional objects to the CAPTCHA, over the letters.',
+ 'CAPTCHA_GD_FONTS' => 'Use different fonts',
+ 'CAPTCHA_GD_FONTS_EXPLAIN' => 'This setting controls how many different letter shapes are used. You can just use the default shapes or introduce altered letters. Adding lowercase letters is also possible.',
+ 'CAPTCHA_FONT_DEFAULT' => 'Default',
+ 'CAPTCHA_FONT_NEW' => 'New Shapes',
+ 'CAPTCHA_FONT_LOWER' => 'Also use lowercase',
- 'CAPTCHA_NO_GD' => 'CAPTCHA without GD',
'CAPTCHA_PREVIEW_MSG' => 'Your changes to the visual confirmation setting were not saved. This is just a preview.',
'CAPTCHA_PREVIEW_EXPLAIN' => 'The CAPTCHA as it would look like using the current selection.',
-
+
'CAPTCHA_SELECT' => 'Installed CAPTCHA plugins',
'CAPTCHA_SELECT_EXPLAIN' => 'The dropdown holds the CAPTCHA plugins recognized by the board. Gray entries are not available right now and might need configuration prior to use.',
'CAPTCHA_CONFIGURE' => 'Configure CAPTCHAs',
@@ -261,6 +269,8 @@ $lang = array_merge($lang, array(
'VISUAL_CONFIRM_POST_EXPLAIN' => 'Requires anonymous users to enter a random code matching an image to help prevent mass postings.',
'VISUAL_CONFIRM_REG' => 'Enable visual confirmation for registrations',
'VISUAL_CONFIRM_REG_EXPLAIN' => 'Requires new users to enter a random code matching an image to help prevent mass registrations.',
+ 'VISUAL_CONFIRM_REFRESH' => 'Enable users to request new images',
+ 'VISUAL_CONFIRM_REFRESH_EXPLAIN' => 'Allows users to request new images, if they are unable to solve the VC during registration.',
));
// Cookie Settings
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
index 8b936979ed..d1157b4dc4 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -201,7 +201,7 @@ $lang = array_merge($lang, array(
'ADMIN_INDEX' => 'Admin index',
'ADMIN_PANEL' => 'Administration Control Panel',
- 'ADM_LOGOUT' => 'ACP Logout',
+ 'ADM_LOGOUT' => 'ACP&nbsp;Logout',
'ADM_LOGGED_OUT' => 'Successfully logged out from Administration Control Panel',
'BACK' => 'Back',
@@ -516,11 +516,11 @@ $lang = array_merge($lang, array(
'LOG_FORUM_DEL_FORUMS' => '<strong>Deleted forum and its subforums</strong><br />» %s',
'LOG_FORUM_DEL_MOVE_FORUMS' => '<strong>Deleted forum and moved subforums</strong> to %1$s<br />» %2$s',
'LOG_FORUM_DEL_MOVE_POSTS' => '<strong>Deleted forum and moved posts </strong> to %1$s<br />» %2$s',
- 'LOG_FORUM_DEL_MOVE_POSTS_FORUMS' => '<strong>Deleted forum and its subforums, moved messages</strong> to %1$s<br />» %2$s',
+ 'LOG_FORUM_DEL_MOVE_POSTS_FORUMS' => '<strong>Deleted forum and its subforums, moved posts</strong> to %1$s<br />» %2$s',
'LOG_FORUM_DEL_MOVE_POSTS_MOVE_FORUMS' => '<strong>Deleted forum, moved posts</strong> to %1$s <strong>and subforums</strong> to %2$s<br />» %3$s',
- 'LOG_FORUM_DEL_POSTS' => '<strong>Deleted forum and its messages</strong><br />» %s',
- 'LOG_FORUM_DEL_POSTS_FORUMS' => '<strong>Deleted forum, its messages and subforums</strong><br />» %s',
- 'LOG_FORUM_DEL_POSTS_MOVE_FORUMS' => '<strong>Deleted forum and its messages, moved subforums</strong> to %1$s<br />» %2$s',
+ 'LOG_FORUM_DEL_POSTS' => '<strong>Deleted forum and its posts</strong><br />» %s',
+ 'LOG_FORUM_DEL_POSTS_FORUMS' => '<strong>Deleted forum, its posts and subforums</strong><br />» %s',
+ 'LOG_FORUM_DEL_POSTS_MOVE_FORUMS' => '<strong>Deleted forum and its posts, moved subforums</strong> to %1$s<br />» %2$s',
'LOG_FORUM_EDIT' => '<strong>Edited forum details</strong><br />» %s',
'LOG_FORUM_MOVE_DOWN' => '<strong>Moved forum</strong> %1$s <strong>below</strong> %2$s',
'LOG_FORUM_MOVE_UP' => '<strong>Moved forum</strong> %1$s <strong>above</strong> %2$s',
diff --git a/phpBB/language/en/acp/forums.php b/phpBB/language/en/acp/forums.php
index 84f280c779..52919f4f40 100644
--- a/phpBB/language/en/acp/forums.php
+++ b/phpBB/language/en/acp/forums.php
@@ -81,6 +81,7 @@ $lang = array_merge($lang, array(
'FORUM_EDIT_EXPLAIN' => 'The form below will allow you to customise this forum. Please note that moderation and post count controls are set via forum permissions for each user or usergroup.',
'FORUM_IMAGE' => 'Forum image',
'FORUM_IMAGE_EXPLAIN' => 'Location, relative to the phpBB root directory, of an additional image to associate with this forum.',
+ 'FORUM_IMAGE_NO_EXIST' => 'The specified forum image does not exist',
'FORUM_LINK_EXPLAIN' => 'Full URL (including the protocol, i.e.: <samp>http://</samp>) to the destination location that clicking this forum will take the user, e.g.: <samp>http://www.phpbb.com/</samp>.',
'FORUM_LINK_TRACK' => 'Track link redirects',
'FORUM_LINK_TRACK_EXPLAIN' => 'Records the number of times a forum link was clicked.',
diff --git a/phpBB/language/en/acp/posting.php b/phpBB/language/en/acp/posting.php
index 66ce911ff6..01453b85ef 100644
--- a/phpBB/language/en/acp/posting.php
+++ b/phpBB/language/en/acp/posting.php
@@ -185,7 +185,7 @@ $lang = array_merge($lang, array(
// Word censors
$lang = array_merge($lang, array(
- 'ACP_WORDS_EXPLAIN' => 'From this control panel you can add, edit, and remove words that will be automatically censored on your forums. In addition people will not be allowed to register with usernames containing these words. Wildcards (*) are accepted in the word field, e.g. *test* will match detestable, test* would match testing, *test would match detest.',
+ 'ACP_WORDS_EXPLAIN' => 'From this control panel you can add, edit, and remove words that will be automatically censored on your forums. People are still allowed to register with usernames containing these words. Wildcards (*) are accepted in the word field, e.g. *test* will match detestable, test* would match testing, *test would match detest.',
'ADD_WORD' => 'Add new word',
'EDIT_WORD' => 'Edit word censor',
diff --git a/phpBB/language/en/acp/profile.php b/phpBB/language/en/acp/profile.php
index ca63c9c639..295571226e 100644
--- a/phpBB/language/en/acp/profile.php
+++ b/phpBB/language/en/acp/profile.php
@@ -66,7 +66,7 @@ $lang = array_merge($lang, array(
'DISPLAY_AT_PROFILE_EXPLAIN' => 'The user is able to change this profile field within the user control panel.',
'DISPLAY_AT_REGISTER' => 'Display at registration screen',
'DISPLAY_AT_REGISTER_EXPLAIN' => 'If this option is enabled, the field will be displayed on registration and able to be changed within the user control panel.',
- 'DISPLAY_PROFILE_FIELD' => 'Display profile field',
+ 'DISPLAY_PROFILE_FIELD' => 'Publicly display profile field',
'DISPLAY_PROFILE_FIELD_EXPLAIN' => 'The profile field will be shown in all places allowed within the load settings. Setting this to “no” will hide the field from topic pages, profiles and the memberlist.',
'DROPDOWN_ENTRIES_EXPLAIN' => 'Enter your options now, every option in one line.',
diff --git a/phpBB/language/en/email/newtopic_notify.txt b/phpBB/language/en/email/newtopic_notify.txt
index 1c471a3c01..529bbf0f8f 100644
--- a/phpBB/language/en/email/newtopic_notify.txt
+++ b/phpBB/language/en/email/newtopic_notify.txt
@@ -2,7 +2,7 @@ Subject: New topic notification - "{FORUM_NAME}"
Hello {USERNAME},
-You are receiving this notification because you are watching the forum, "{FORUM_NAME}" at "{SITENAME}". This forum has received a new topic since your last visit, "{TOPIC_TITLE}". You can use the following link to view forum, no more notifications will be sent until you visit the forum.
+You are receiving this notification because you are watching the forum, "{FORUM_NAME}" at "{SITENAME}". This forum has received a new topic since your last visit, "{TOPIC_TITLE}". You can use the following link to view the forum, no more notifications will be sent until you visit the forum.
{U_FORUM}
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index 4181e081ca..087149e5aa 100644
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -278,6 +278,8 @@ $lang = array_merge($lang, array(
'MAKE_FOLDER_WRITABLE' => 'Please make sure that this folder exists and is writable by the webserver then try again:<br />»<strong>%s</strong>.',
'MAKE_FOLDERS_WRITABLE' => 'Please make sure that these folders exist and are writable by the webserver then try again:<br />»<strong>%s</strong>.',
+ 'MYSQL_SCHEMA_UPDATE_REQUIRED' => 'Your MySQL database schema for phpBB is outdated. phpBB detected a schema for MySQL 3.x/4.x, but the server runs on MySQL %2s.<br /><strong>Before you proceed the update, you need to upgrade the schema.</strong><br /><br />Please refer to the <a href="http://www.phpbb.com/kb/article/doesnt-have-a-default-value-errors/">Knowledge Base article about upgrading the MySQL schema</a>. If you encounter problems, please use <a href="http://www.phpbb.com/community/viewforum.php?f=46">our support forums</a>.',
+
'NAMING_CONFLICT' => 'Naming conflict: %s and %s are both aliases<br /><br />%s',
'NEXT_STEP' => 'Proceed to next step',
'NOT_FOUND' => 'Cannot find',
@@ -391,7 +393,7 @@ $lang = array_merge($lang, array(
'COLLECTING_FILE_DIFFS' => 'Collecting file differences',
'COMPLETE_LOGIN_TO_BOARD' => 'You should now <a href="../ucp.php?mode=login">login to your board</a> and check if everything is working fine. Do not forget to delete, rename or move your install directory!',
'CONTINUE_UPDATE_NOW' => 'Continue the update process now',
- 'CURRENT_FILE' => 'Beginning of current original file',
+ 'CURRENT_FILE' => 'Begin of Conflict - Original File code before update',
'CURRENT_VERSION' => 'Current version',
'DATABASE_TYPE' => 'Database type',
@@ -401,7 +403,7 @@ $lang = array_merge($lang, array(
'DESTINATION' => 'Destination file',
'DIFF_INLINE' => 'Inline',
'DIFF_RAW' => 'Raw unified diff',
- 'DIFF_SEP_EXPLAIN' => 'End of current original file / Beginning of new updated file',
+ 'DIFF_SEP_EXPLAIN' => 'Code block used within the updated/new file',
'DIFF_SIDE_BY_SIDE' => 'Side by Side',
'DIFF_UNIFIED' => 'Unified diff',
'DO_NOT_UPDATE' => 'Do not update this file',
@@ -409,6 +411,8 @@ $lang = array_merge($lang, array(
'DOWNLOAD' => 'Download',
'DOWNLOAD_AS' => 'Download as',
'DOWNLOAD_UPDATE_METHOD_BUTTON' => 'Download modified files archive (recommended)',
+ 'DOWNLOAD_CONFLICTS' => 'Download conflicts for this file',
+ 'DOWNLOAD_CONFLICTS_EXPLAIN' => 'Search for &lt;&lt;&lt; to spot conflicts',
'DOWNLOAD_UPDATE_METHOD' => 'Download modified files archive',
'DOWNLOAD_UPDATE_METHOD_EXPLAIN' => 'Once downloaded you should unpack the archive. You will find the modified files you need to upload to your phpBB root directory within it. Please upload the files to their respective locations then. After you have uploaded all files, please check the files again with the other button below.',
@@ -453,13 +457,13 @@ $lang = array_merge($lang, array(
'MERGE_NO_MERGE_NEW_OPTION' => 'Do not merge - use new file',
'MERGE_NO_MERGE_MOD_OPTION' => 'Do not merge - use currently installed file',
- 'MERGE_MOD_FILE_OPTION' => 'Merge differences and use modified code within conflicting block',
- 'MERGE_NEW_FILE_OPTION' => 'Merge differences and use new file code within conflicting block',
+ 'MERGE_MOD_FILE_OPTION' => 'Merge modifications (Loose new phpBB code within conflicting block)',
+ 'MERGE_NEW_FILE_OPTION' => 'Merge modifications (Loose modified code within conflicting block)',
'MERGE_SELECT_ERROR' => 'Conflicting file merge modes are not correctly selected.',
'MERGING_FILES' => 'Merging differences',
'MERGING_FILES_EXPLAIN' => 'Currently collecting final file changes.<br /><br />Please wait until phpBB has completed all operations on changed files.',
- 'NEW_FILE' => 'End of new updated file',
+ 'NEW_FILE' => 'End of Conflict',
'NEW_USERNAME' => 'New username',
'NO_AUTH_UPDATE' => 'Not authorised to update',
'NO_ERRORS' => 'No errors',
diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php
index 4ece142031..0c26e612e3 100644
--- a/phpBB/language/en/ucp.php
+++ b/phpBB/language/en/ucp.php
@@ -122,6 +122,9 @@ $lang = array_merge($lang, array(
'CONFIRM_EMAIL' => 'Confirm e-mail address',
'CONFIRM_EMAIL_EXPLAIN' => 'You only need to specify this if you are changing your e-mail address.',
'CONFIRM_EXPLAIN' => 'To prevent automated registrations the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.',
+ 'VC_REFRESH' => 'New Image',
+ 'VC_REFRESH_EXPLAIN' => 'If you cannot read the code, then you can request a new one by clicking the button.',
+
'CONFIRM_PASSWORD' => 'Confirm password',
'CONFIRM_PASSWORD_EXPLAIN' => 'You only need to confirm your password if you changed it above.',
'COPPA_BIRTHDAY' => 'To continue with the registration procedure please tell us when you were born.',
@@ -325,7 +328,7 @@ $lang = array_merge($lang, array(
'PASS_TYPE_SYMBOL_EXPLAIN' => 'Password must be between %1$d and %2$d characters long, must contain letters in mixed case, must contain numbers and must contain symbols.',
'PASSWORD' => 'Password',
'PASSWORD_ACTIVATED' => 'Your new password has been activated.',
- 'PASSWORD_UPDATED' => 'Your password has been sent successfully to your original e-mail address.',
+ 'PASSWORD_UPDATED' => 'A new password was sent to your registered email address.',
'PERMISSIONS_RESTORED' => 'Successfully restored original permissions.',
'PERMISSIONS_TRANSFERRED' => 'Successfully transferred permissions from <strong>%s</strong>, you are now able to browse the board with this user’s permissions.<br />Please note that admin permissions were not transferred. You are able to revert to your permission set at any time.',
'PM_DISABLED' => 'Private messaging has been disabled on this board.',
diff --git a/phpBB/modules/acp/acp_attachments.php b/phpBB/modules/acp/acp_attachments.php
index 580490d472..a6c35acdbd 100644
--- a/phpBB/modules/acp/acp_attachments.php
+++ b/phpBB/modules/acp/acp_attachments.php
@@ -1002,8 +1002,8 @@ class acp_attachments
if ($files_added)
{
- set_config('upload_dir_size', phpbb::$config['upload_dir_size'] + $space_taken, true);
- set_config('num_files', phpbb::$config['num_files'] + $files_added, true);
+ set_config_count('upload_dir_size', $space_taken, true);
+ set_config_count('num_files', $files_added, true);
}
}
}
diff --git a/phpBB/modules/acp/acp_captcha.php b/phpBB/modules/acp/acp_captcha.php
index e4a269aaed..3ffefa85a1 100644
--- a/phpBB/modules/acp/acp_captcha.php
+++ b/phpBB/modules/acp/acp_captcha.php
@@ -52,6 +52,8 @@ class acp_captcha
$config_vars = array(
'enable_confirm' => 'REG_ENABLE',
'enable_post_confirm' => 'POST_ENABLE',
+ 'confirm_refresh' => 'CONFIRM_REFRESH',
+ 'captcha_gd' => 'CAPTCHA_GD',
);
$this->tpl_name = 'acp_captcha';
diff --git a/phpBB/modules/acp/acp_email.php b/phpBB/modules/acp/acp_email.php
index 3fc3db2055..b0dbb87641 100644
--- a/phpBB/modules/acp/acp_email.php
+++ b/phpBB/modules/acp/acp_email.php
@@ -118,7 +118,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)
{
diff --git a/phpBB/modules/acp/acp_forums.php b/phpBB/modules/acp/acp_forums.php
index 047636c6a1..d0581a2a68 100644
--- a/phpBB/modules/acp/acp_forums.php
+++ b/phpBB/modules/acp/acp_forums.php
@@ -180,7 +180,7 @@ class acp_forums
$forum_perm_from = request_var('forum_perm_from', 0);
// Copy permissions?
- if ($forum_perm_from && !empty($forum_perm_from) && $forum_perm_from != $forum_data['forum_id'] &&
+ if (!empty($forum_perm_from) && $forum_perm_from != $forum_data['forum_id'] &&
(($action != 'edit') || empty($forum_id) || (phpbb::$acl->acl_get('a_fauth') && phpbb::$acl->acl_get('a_authusers') && phpbb::$acl->acl_get('a_authgroups') && phpbb::$acl->acl_get('a_mauth'))))
{
// if we edit a forum delete current permissions first
@@ -557,13 +557,12 @@ class acp_forums
FROM ' . FORUMS_TABLE . '
WHERE forum_type = ' . FORUM_POST . "
AND forum_id <> $forum_id";
- $result = phpbb::$db->sql_query($sql);
+ $result = phpbb::$db->sql_query_limit($sql, 1);
+ $postable_forum_exists = false;
if (phpbb::$db->sql_fetchrow($result))
{
- phpbb::$template->assign_vars(array(
- 'S_MOVE_FORUM_OPTIONS' => make_forum_select($forum_data['parent_id'], $forum_id, false, true, false),
- ));
+ $postable_forum_exists = true;
}
phpbb::$db->sql_freeresult($result);
@@ -580,25 +579,24 @@ class acp_forums
$forums_list = make_forum_select($forum_data['parent_id'], $subforums_id);
- $sql = 'SELECT forum_id
- FROM ' . FORUMS_TABLE . '
- WHERE forum_type = ' . FORUM_POST . "
- AND forum_id <> $forum_id";
- $result = phpbb::$db->sql_query($sql);
-
- if (phpbb::$db->sql_fetchrow($result))
+ if ($postable_forum_exists)
{
phpbb::$template->assign_vars(array(
'S_MOVE_FORUM_OPTIONS' => make_forum_select($forum_data['parent_id'], $subforums_id), // , false, true, false???
));
}
- phpbb::$db->sql_freeresult($result);
phpbb::$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;
@@ -711,7 +709,7 @@ class acp_forums
FROM ' . FORUMS_TABLE . '
WHERE forum_type = ' . FORUM_POST . "
AND forum_id <> $forum_id";
- $result = phpbb::$db->sql_query($sql);
+ $result = phpbb::$db->sql_query_limit($sql, 1);
if (phpbb::$db->sql_fetchrow($result))
{
@@ -804,10 +802,6 @@ class acp_forums
$url = $this->u_action . "&amp;parent_id=$this->parent_id&amp;f={$row['forum_id']}";
- $forum_title = ($forum_type != FORUM_LINK) ? '<a href="' . $this->u_action . '&amp;parent_id=' . $row['forum_id'] . '">' : '';
- $forum_title .= $row['forum_name'];
- $forum_title .= ($forum_type != FORUM_LINK) ? '</a>' : '';
-
phpbb::$template->assign_block_vars('forums', array(
'FOLDER_IMAGE' => $folder_image,
'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . PHPBB_ROOT_PATH . $row['forum_image'] . '" alt="" />' : '',
@@ -919,6 +913,11 @@ class acp_forums
array('lang' => 'FORUM_TOPICS_PAGE', 'value' => $forum_data['forum_topics_per_page'], 'column_type' => 'TINT:0'),
);
+ if (!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
diff --git a/phpBB/modules/acp/acp_inactive.php b/phpBB/modules/acp/acp_inactive.php
index 89583575db..d93b2146a6 100644
--- a/phpBB/modules/acp/acp_inactive.php
+++ b/phpBB/modules/acp/acp_inactive.php
@@ -108,6 +108,7 @@ class acp_inactive
$messenger->headers('X-AntiAbuse: Board servername - ' . phpbb::$config['server_name']);
$messenger->headers('X-AntiAbuse: User_id - ' . phpbb::$user->data['user_id']);
$messenger->headers('X-AntiAbuse: Username - ' . phpbb::$user->data['username']);
+ $messenger->headers('X-AntiAbuse: User IP - ' . phpbb::$user->ip);
$messenger->assign_vars(array(
'USERNAME' => htmlspecialchars_decode($row['username']))
@@ -158,7 +159,11 @@ 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 ' . phpbb::$db->sql_in_set('user_id', $mark);
+ WHERE ' . phpbb::$db->sql_in_set('user_id', $mark) . '
+ AND user_inactive_reason';
+
+ $sql .= (phpbb::$config['require_activation'] == USER_ACTIVATION_ADMIN) ? ' = ' . INACTIVE_REMIND : ' <> ' . INACTIVE_MANUAL;
+
$result = phpbb::$db->sql_query($sql);
if ($row = phpbb::$db->sql_fetchrow($result))
@@ -176,9 +181,14 @@ class acp_inactive
$messenger->to($row['user_email'], $row['username']);
$messenger->im($row['user_jabber'], $row['username']);
+ $messenger->headers('X-AntiAbuse: Board servername - ' . phpbb::$config['server_name']);
+ $messenger->headers('X-AntiAbuse: User_id - ' . phpbb::$user->data['user_id']);
+ $messenger->headers('X-AntiAbuse: Username - ' . phpbb::$user->data['username']);
+ $messenger->headers('X-AntiAbuse: User IP - ' . phpbb::$user->ip);
+
$messenger->assign_vars(array(
'USERNAME' => htmlspecialchars_decode($row['username']),
- 'REGISTER_DATE' => phpbb::$user->format_date($row['user_regdate']),
+ 'REGISTER_DATE' => phpbb::$user->format_date($row['user_regdate'], false, true),
'U_ACTIVATE' => generate_board_url() . '/ucp.' . PHP_EXT . '?mode=activate&u=' . $row['user_id'] . '&k=' . $row['user_actkey'])
);
diff --git a/phpBB/modules/acp/acp_jabber.php b/phpBB/modules/acp/acp_jabber.php
index d9c192601c..875998a00c 100644
--- a/phpBB/modules/acp/acp_jabber.php
+++ b/phpBB/modules/acp/acp_jabber.php
@@ -85,7 +85,8 @@ class acp_jabber
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 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,
);
diff --git a/phpBB/modules/acp/acp_main.php b/phpBB/modules/acp/acp_main.php
index fb66f5dc15..a7d3dbf0cf 100644
--- a/phpBB/modules/acp/acp_main.php
+++ b/phpBB/modules/acp/acp_main.php
@@ -503,6 +503,12 @@ class acp_main
phpbb::$template->assign_var('S_WRITABLE_CONFIG', (bool) (@fileperms(PHPBB_ROOT_PATH . 'config.' . PHP_EXT) & 0x0002));
}
+ // Fill dbms version if not yet filled
+ if (empty(phpbb::$config['dbms_version']))
+ {
+ set_config('dbms_version', phpbb::$db->sql_server_info(true));
+ }
+
$this->tpl_name = 'acp_main';
$this->page_title = 'ACP_MAIN';
}
diff --git a/phpBB/modules/acp/acp_permissions.php b/phpBB/modules/acp/acp_permissions.php
index d9db7b1bf0..85b2cda164 100644
--- a/phpBB/modules/acp/acp_permissions.php
+++ b/phpBB/modules/acp/acp_permissions.php
@@ -1121,7 +1121,11 @@ class acp_permissions
{
$sql_where = 'AND (' . phpbb::$db->sql_in_set('a.auth_option_id', $option_ids) . ' OR ' . phpbb::$db->sql_in_set('a.auth_role_id', $role_ids) . ')';
}
- else
+ else if (sizeof($role_ids))
+ {
+ $sql_where = 'AND ' . phpbb::$db->sql_in_set('a.auth_role_id', $role_ids);
+ }
+ else if (sizeof($option_ids))
{
$sql_where = 'AND ' . phpbb::$db->sql_in_set('a.auth_option_id', $option_ids);
}
diff --git a/phpBB/modules/acp/acp_styles.php b/phpBB/modules/acp/acp_styles.php
index 4f21a44e1d..a087348b36 100644
--- a/phpBB/modules/acp/acp_styles.php
+++ b/phpBB/modules/acp/acp_styles.php
@@ -1101,139 +1101,142 @@ parse_css_file = {PARSE_CSS_FILE}
{
$this->page_title = 'EDIT_IMAGESET';
+ if (!$imageset_id)
+ {
+ trigger_error(phpbb::$user->lang['NO_IMAGESET'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
$update = phpbb_request::is_set_post('update');
+ $imgname = request_var('imgname', 'site_logo');
+ $imgname = preg_replace('#[^a-z0-9\-+_]#i', '', $imgname);
+ $sql_extra = $imgnamelang = '';
- $imgname = request_var('imgname', '');
- $imgpath = request_var('imgpath', '');
- $imgsize = request_var('imgsize', false);
- $imgwidth = request_var('imgwidth', 0);
- $imgheight = request_var('imgheight', 0);
+ $sql = 'SELECT imageset_path, imageset_name
+ FROM ' . STYLES_IMAGESET_TABLE . "
+ WHERE imageset_id = $imageset_id";
+ $result = phpbb::$db->sql_query($sql);
+ $imageset_row = phpbb::$db->sql_fetchrow($result);
+ phpbb::$db->sql_freeresult($result);
- $imgname = preg_replace('#[^a-z0-9\-+_]#i', '', $imgname);
- $imgpath = str_replace('..', '.', $imgpath);
+ if (!$imageset_row)
+ {
+ trigger_error(phpbb::$user->lang['NO_IMAGESET'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
- if ($imageset_id)
+ $imageset_path = $imageset_row['imageset_path'];
+ $imageset_name = $imageset_row['imageset_name'];
+
+ if (strpos($imgname, '-') !== false)
{
- $sql = 'SELECT imageset_path, imageset_name
- FROM ' . STYLES_IMAGESET_TABLE . "
- WHERE imageset_id = $imageset_id";
- $result = phpbb::$db->sql_query($sql);
- $imageset_row = phpbb::$db->sql_fetchrow($result);
- phpbb::$db->sql_freeresult($result);
+ list($imgname, $imgnamelang) = explode('-', $imgname);
+ $sql_extra = " AND image_lang IN ('" . phpbb::$db->sql_escape($imgnamelang) . "', '')";
+ }
+
+ $sql = 'SELECT image_filename, image_width, image_height, image_lang, image_id
+ FROM ' . STYLES_IMAGESET_DATA_TABLE . "
+ WHERE imageset_id = $imageset_id
+ AND image_name = '" . phpbb::$db->sql_escape($imgname) . "'$sql_extra";
+ $result = phpbb::$db->sql_query($sql);
+ $imageset_data_row = phpbb::$db->sql_fetchrow($result);
+ phpbb::$db->sql_freeresult($result);
+
+ $image_filename = $imageset_data_row['image_filename'];
+ $image_width = $imageset_data_row['image_width'];
+ $image_height = $imageset_data_row['image_height'];
+ $image_lang = $imageset_data_row['image_lang'];
+ $image_id = $imageset_data_row['image_id'];
+ $imgsize = ($imageset_data_row['image_width'] && $imageset_data_row['image_height']) ? 1 : 0;
- $imageset_path = $imageset_row['imageset_path'];
- $imageset_name = $imageset_row['imageset_name'];
+ // Check to see whether the selected image exists in the table
+ $valid_name = ($update) ? false : true;
- $sql_extra = '';
- if (strpos($imgname, '-') !== false)
+ foreach ($this->imageset_keys as $category => $img_ary)
+ {
+ if (in_array($imgname, $img_ary))
{
- list($imgname, $imgnamelang) = explode('-', $imgname);
- $sql_extra = " AND image_lang IN ('" . phpbb::$db->sql_escape($imgnamelang) . "', '')";
+ $valid_name = true;
+ break;
}
+ }
- $sql = 'SELECT image_filename, image_width, image_height, image_lang, image_id
- FROM ' . STYLES_IMAGESET_DATA_TABLE . "
- WHERE imageset_id = $imageset_id
- AND image_name = '" . phpbb::$db->sql_escape($imgname) . "'$sql_extra";
- $result = phpbb::$db->sql_query($sql);
- $imageset_data_row = phpbb::$db->sql_fetchrow($result);
- phpbb::$db->sql_freeresult($result);
-
- $image_filename = $imageset_data_row['image_filename'];
- $image_width = $imageset_data_row['image_width'];
- $image_height = $imageset_data_row['image_height'];
- $image_lang = $imageset_data_row['image_lang'];
- $image_id = $imageset_data_row['image_id'];
+ if ($update && phpbb_request::is_set_post('imgpath') && $valid_name)
+ {
+ // If imgwidth and imgheight are non-zero grab the actual size
+ // from the image itself ... we ignore width settings for the poll center image
+ $imgwidth = request_var('imgwidth', 0);
+ $imgheight = request_var('imgheight', 0);
+ $imgsize = request_var('imgsize', 0);
+ $imgpath = request_var('imgpath', '');
+ $imgpath = str_replace('..', '.', $imgpath);
- if (!$imageset_row)
+ // If no dimensions selected, we reset width and height to 0 ;)
+ if (!$imgsize)
{
- trigger_error(phpbb::$user->lang['NO_IMAGESET'] . adm_back_link($this->u_action), E_USER_WARNING);
+ $imgwidth = $imgheight = 0;
}
- // Check to see whether the selected image exists in the table
- $valid_name = ($update) ? false : true;
+ $imglang = '';
- foreach ($this->imageset_keys as $category => $img_ary)
+ if ($imgpath && !file_exists(PHPBB_ROOT_PATH . "styles/$imageset_path/imageset/$imgpath"))
{
- if (in_array($imgname, $img_ary))
- {
- $valid_name = true;
- break;
- }
+ trigger_error(phpbb::$user->lang['NO_IMAGE_ERROR'] . adm_back_link($this->u_action), E_USER_WARNING);
}
- if ($update && phpbb_request::is_set_post('imgpath'))
+ // Determine width/height. If dimensions included and no width/height given, we detect them automatically...
+ if ($imgsize && $imgpath)
{
- if ($valid_name)
+ if (!$imgwidth || !$imgheight)
{
- // If imgwidth and imgheight are non-zero grab the actual size
- // from the image itself ... we ignore width settings for the poll center image
- $imgwidth = request_var('imgwidth', 0);
- $imgheight = request_var('imgheight', 0);
- $imglang = '';
-
- if ($imgpath && !file_exists(PHPBB_ROOT_PATH . "styles/$imageset_path/imageset/$imgpath"))
- {
- trigger_error(phpbb::$user->lang['NO_IMAGE_ERROR'] . adm_back_link($this->u_action), E_USER_WARNING);
- }
-
- if ($imgsize && $imgpath)
- {
- if (!$imgwidth || !$imgheight)
- {
- list($imgwidth_file, $imgheight_file) = getimagesize(PHPBB_ROOT_PATH . "styles/$imageset_path/imageset/$imgpath");
- $imgwidth = ($imgwidth) ? $imgwidth : $imgwidth_file;
- $imgheight = ($imgheight) ? $imgheight : $imgheight_file;
- }
- $imgwidth = ($imgname != 'poll_center') ? (int) $imgwidth : 0;
- $imgheight = (int) $imgheight;
- }
-
+ list($imgwidth_file, $imgheight_file) = getimagesize(PHPBB_ROOT_PATH . "styles/$imageset_path/imageset/$imgpath");
+ $imgwidth = ($imgwidth) ? $imgwidth : $imgwidth_file;
+ $imgheight = ($imgheight) ? $imgheight : $imgheight_file;
+ }
+ $imgwidth = ($imgname != 'poll_center') ? (int) $imgwidth : 0;
+ $imgheight = (int) $imgheight;
+ }
- if (strpos($imgpath, '/') !== false)
- {
- list($imglang, $imgfilename) = explode('/', $imgpath);
- }
- else
- {
- $imgfilename = $imgpath;
- }
+ if (strpos($imgpath, '/') !== false)
+ {
+ list($imglang, $imgfilename) = explode('/', $imgpath);
+ }
+ else
+ {
+ $imgfilename = $imgpath;
+ }
- $sql_ary = array(
- 'image_filename' => (string) $imgfilename,
- 'image_width' => (int) $imgwidth,
- 'image_height' => (int) $imgheight,
- 'image_lang' => (string) $imglang,
- );
+ $sql_ary = array(
+ 'image_filename' => (string) $imgfilename,
+ 'image_width' => (int) $imgwidth,
+ 'image_height' => (int) $imgheight,
+ 'image_lang' => (string) $imglang,
+ );
- // already exists
- if ($imageset_data_row)
- {
- $sql = 'UPDATE ' . STYLES_IMAGESET_DATA_TABLE . '
- SET ' . phpbb::$db->sql_build_array('UPDATE', $sql_ary) . "
- WHERE image_id = $image_id";
- phpbb::$db->sql_query($sql);
- }
- // does not exist
- else if (!$imageset_data_row)
- {
- $sql_ary['image_name'] = $imgname;
- $sql_ary['imageset_id'] = (int) $imageset_id;
- phpbb::$db->sql_query('INSERT INTO ' . STYLES_IMAGESET_DATA_TABLE . ' ' . phpbb::$db->sql_build_array('INSERT', $sql_ary));
- }
+ // already exists
+ if ($imageset_data_row)
+ {
+ $sql = 'UPDATE ' . STYLES_IMAGESET_DATA_TABLE . '
+ SET ' . phpbb::$db->sql_build_array('UPDATE', $sql_ary) . "
+ WHERE image_id = $image_id";
+ phpbb::$db->sql_query($sql);
+ }
+ // does not exist
+ else if (!$imageset_data_row)
+ {
+ $sql_ary['image_name'] = $imgname;
+ $sql_ary['imageset_id'] = (int) $imageset_id;
+ phpbb::$db->sql_query('INSERT INTO ' . STYLES_IMAGESET_DATA_TABLE . ' ' . phpbb::$db->sql_build_array('INSERT', $sql_ary));
+ }
- phpbb::$acm->destroy_sql(STYLES_IMAGESET_DATA_TABLE);
+ phpbb::$acm->destroy_sql(STYLES_IMAGESET_DATA_TABLE);
- add_log('admin', 'LOG_IMAGESET_EDIT', $imageset_name);
+ add_log('admin', 'LOG_IMAGESET_EDIT', $imageset_name);
- phpbb::$template->assign_var('SUCCESS', true);
+ phpbb::$template->assign_var('SUCCESS', true);
- $image_filename = $imgfilename;
- $image_width = $imgwidth;
- $image_height = $imgheight;
- $image_lang = $imglang;
- }
- }
+ $image_filename = $imgfilename;
+ $image_width = $imgwidth;
+ $image_height = $imgheight;
+ $image_lang = $imglang;
}
$imglang = '';
@@ -1355,6 +1358,8 @@ parse_css_file = {PARSE_CSS_FILE}
'U_BACK' => $this->u_action,
'NAME' => $imageset_name,
'A_NAME' => addslashes($imageset_name),
+ 'PATH' => $imageset_path,
+ 'A_PATH' => addslashes($imageset_path),
'ERROR' => !$valid_name,
'IMG_SRC' => ($image_found) ? '../styles/' . $imageset_path . '/imageset/' . $img_val : 'images/no_image.png',
'IMAGE_SELECT' => $image_found,
diff --git a/phpBB/modules/acp/acp_users.php b/phpBB/modules/acp/acp_users.php
index c012612a24..54296c386c 100644
--- a/phpBB/modules/acp/acp_users.php
+++ b/phpBB/modules/acp/acp_users.php
@@ -971,6 +971,7 @@ class acp_users
{
$sql = 'DELETE FROM ' . LOG_TABLE . '
WHERE log_type = ' . LOG_USERS . "
+ AND reportee_id = $user_id
$where_sql";
phpbb::$db->sql_query($sql);
diff --git a/phpBB/modules/acp/auth.php b/phpBB/modules/acp/auth.php
index 396b66c76f..b1dae06cea 100644
--- a/phpBB/modules/acp/auth.php
+++ b/phpBB/modules/acp/auth.php
@@ -679,6 +679,7 @@ 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';
@@ -686,15 +687,7 @@ class auth_admin extends auth
while ($row = phpbb::$db->sql_fetchrow($result))
{
- if ($row['is_global'])
- {
- $cur_options['global'][] = $row['auth_option'];
- }
-
- if ($row['is_local'])
- {
- $cur_options['local'][] = $row['auth_option'];
- }
+ $cur_options[$row['auth_option']] = ($row['is_global'] && $row['is_local']) ? 'both' : (($row['is_global']) ? 'global' : 'local');
}
phpbb::$db->sql_freeresult($result);
@@ -709,14 +702,11 @@ class auth_admin extends auth
foreach ($option_ary as $option_value)
{
- if (!in_array($option_value, $cur_options[$type]))
- {
- $new_options[$type][] = $option_value;
- }
+ $new_options[$type][] = $option_value;
$flag = substr($option_value, 0, strpos($option_value, '_') + 1);
- if (!in_array($flag, $cur_options[$type]) && !in_array($flag, $new_options[$type]))
+ if (!in_array($flag, $new_options[$type]))
{
$new_options[$type][] = $flag;
}
@@ -727,23 +717,53 @@ 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['local_global'] = array_intersect($new_options['local'], $new_options['global']);
+ $options['both'] = array_intersect($new_options['local'], $new_options['global']);
- $sql_ary = array();
+ // Now check which options to add/update
+ $add_options = $update_options = array();
+ // First local ones...
foreach ($options as $type => $option_ary)
{
foreach ($option_ary as $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 (!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;
}
}
- phpbb::$db->sql_multi_insert(ACL_OPTIONS_TABLE, $sql_ary);
+ if (!empty($add_options))
+ {
+ phpbb::$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 ' . phpbb::$db->sql_in_set('auth_option', $update_options);
+ phpbb::$db->sql_query($sql);
+ }
phpbb::$acm->destroy('acl_options');
$this->acl_clear_prefetch();
diff --git a/phpBB/modules/mcp/mcp_main.php b/phpBB/modules/mcp/mcp_main.php
index 8a9a930678..b2b71722e2 100644
--- a/phpBB/modules/mcp/mcp_main.php
+++ b/phpBB/modules/mcp/mcp_main.php
@@ -909,6 +909,11 @@ function mcp_delete_post($post_ids)
}
else
{
+ if ($affected_topics != 1 || $deleted_topics || !$topic_id)
+ {
+ $redirect = append_sid('mcp', "f=$forum_id&i=main&mode=forum_view", false);
+ }
+
meta_refresh(3, $redirect);
trigger_error($success_msg . '<br /><br />' . sprintf(phpbb::$user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>') . '<br /><br />' . implode('<br /><br />', $return_link));
}
@@ -1160,8 +1165,8 @@ function mcp_fork_topic($topic_ids)
}
sync('forum', 'forum_id', $to_forum_id);
- set_config('num_topics', phpbb::$config['num_topics'] + sizeof($new_topic_id_list), true);
- set_config('num_posts', phpbb::$config['num_posts'] + $total_posts, true);
+ set_config_count('num_topics', sizeof($new_topic_id_list), true);
+ set_config_count('num_posts', $total_posts, true);
foreach ($new_topic_id_list as $topic_id => $new_topic_id)
{
diff --git a/phpBB/modules/mcp/mcp_notes.php b/phpBB/modules/mcp/mcp_notes.php
index b39f10428c..ed0bf373bf 100644
--- a/phpBB/modules/mcp/mcp_notes.php
+++ b/phpBB/modules/mcp/mcp_notes.php
@@ -220,13 +220,16 @@ class mcp_notes
'PAGINATION' => generate_pagination($this->u_action . "&amp;st=$st&amp;sk=$sk&amp;sd=$sd", $log_count, phpbb::$config['posts_per_page'], $start),
'TOTAL_REPORTS' => ($log_count == 1) ? phpbb::$user->lang['LIST_REPORT'] : sprintf(phpbb::$user->lang['LIST_REPORTS'], $log_count),
- 'USERNAME' => $userrow['username'],
- 'USER_COLOR' => (!empty($userrow['user_colour'])) ? $userrow['user_colour'] : '',
'RANK_TITLE' => $rank_title,
'JOINED' => phpbb::$user->format_date($userrow['user_regdate']),
'POSTS' => ($userrow['user_posts']) ? $userrow['user_posts'] : 0,
'WARNINGS' => ($userrow['user_warnings']) ? $userrow['user_warnings'] : 0,
+ 'USERNAME_FULL' => get_username_string('full', $userrow['user_id'], $userrow['username'], $userrow['user_colour']),
+ 'USERNAME_COLOUR' => get_username_string('colour', $userrow['user_id'], $userrow['username'], $userrow['user_colour']),
+ 'USERNAME' => get_username_string('username', $userrow['user_id'], $userrow['username'], $userrow['user_colour']),
+ 'U_PROFILE' => get_username_string('profile', $userrow['user_id'], $userrow['username'], $userrow['user_colour']),
+
'AVATAR_IMG' => $avatar_img,
'RANK_IMG' => $rank_img,
));
diff --git a/phpBB/modules/mcp/mcp_queue.php b/phpBB/modules/mcp/mcp_queue.php
index 147a63cf59..ff4698b117 100644
--- a/phpBB/modules/mcp/mcp_queue.php
+++ b/phpBB/modules/mcp/mcp_queue.php
@@ -488,12 +488,18 @@ function approve_post($post_id_list, $id, $mode)
$total_topics = $total_posts = 0;
$forum_topics_posts = $topic_approve_sql = $topic_replies_sql = $post_approve_sql = $topic_id_list = $forum_id_list = $approve_log = array();
- $user_posts_sql = array();
+ $user_posts_sql = $post_approved_list = array();
$update_forum_information = false;
foreach ($post_info as $post_id => $post_data)
{
+ if ($post_data['post_approved'])
+ {
+ $post_approved_list[] = $post_id;
+ continue;
+ }
+
$topic_id_list[$post_data['topic_id']] = 1;
if ($post_data['forum_id'])
@@ -579,6 +585,11 @@ function approve_post($post_id_list, $id, $mode)
$update_forum_information = true;
}
}
+ $post_id_list = array_values(array_diff($post_id_list, $post_approved_list));
+ for ($i = 0, $size = sizeof($post_approved_list); $i < $size; $i++)
+ {
+ unset($post_info[$post_approved_list[$i]]);
+ }
if (sizeof($topic_approve_sql))
{
@@ -648,12 +659,12 @@ function approve_post($post_id_list, $id, $mode)
if ($total_topics)
{
- set_config('num_topics', phpbb::$config['num_topics'] + $total_topics, true);
+ set_config_count('num_topics', $total_topics, true);
}
if ($total_posts)
{
- set_config('num_posts', phpbb::$config['num_posts'] + $total_posts, true);
+ set_config_count('num_posts', $total_posts, true);
}
unset($topic_approve_sql, $topic_replies_sql, $post_approve_sql);
@@ -729,7 +740,7 @@ function approve_post($post_id_list, $id, $mode)
}
else
{
- $success_msg = (sizeof($post_id_list) == 1) ? 'POST_APPROVED_SUCCESS' : 'POSTS_APPROVED_SUCCESS';
+ $success_msg = (sizeof($post_id_list) + sizeof($post_approved_list) == 1) ? 'POST_APPROVED_SUCCESS' : 'POSTS_APPROVED_SUCCESS';
}
}
else
diff --git a/phpBB/modules/mcp/mcp_topic.php b/phpBB/modules/mcp/mcp_topic.php
index c5a8a3fa88..91579b1059 100644
--- a/phpBB/modules/mcp/mcp_topic.php
+++ b/phpBB/modules/mcp/mcp_topic.php
@@ -496,7 +496,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
$success_msg = 'TOPIC_SPLIT_SUCCESS';
// Update forum statistics
- set_config('num_topics', phpbb::$config['num_topics'] + 1, true);
+ set_config_count('num_topics', 1, true);
// Link back to both topics
$return_link = sprintf(phpbb::$user->lang['RETURN_TOPIC'], '<a href="' . append_sid('viewtopic', 'f=' . $post_info['forum_id'] . '&amp;t=' . $post_info['topic_id']) . '">', '</a>') . '<br /><br />' . sprintf(phpbb::$user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid('viewtopic', 'f=' . $to_forum_id . '&amp;t=' . $to_topic_id) . '">', '</a>');
diff --git a/phpBB/modules/mcp/mcp_warn.php b/phpBB/modules/mcp/mcp_warn.php
index 6b3f896ae4..734a61b8f2 100644
--- a/phpBB/modules/mcp/mcp_warn.php
+++ b/phpBB/modules/mcp/mcp_warn.php
@@ -407,13 +407,16 @@ class mcp_warn
phpbb::$template->assign_vars(array(
'U_POST_ACTION' => $this->u_action,
- 'USERNAME' => $user_row['username'],
- 'USER_COLOR' => (!empty($user_row['user_colour'])) ? $user_row['user_colour'] : '',
'RANK_TITLE' => $rank_title,
'JOINED' => phpbb::$user->format_date($user_row['user_regdate']),
'POSTS' => ($user_row['user_posts']) ? $user_row['user_posts'] : 0,
'WARNINGS' => ($user_row['user_warnings']) ? $user_row['user_warnings'] : 0,
+ 'USERNAME_FULL' => get_username_string('full', $user_row['user_id'], $user_row['username'], $user_row['user_colour']),
+ 'USERNAME_COLOUR' => get_username_string('colour', $user_row['user_id'], $user_row['username'], $user_row['user_colour']),
+ 'USERNAME' => get_username_string('username', $user_row['user_id'], $user_row['username'], $user_row['user_colour']),
+ 'U_PROFILE' => get_username_string('profile', $user_row['user_id'], $user_row['username'], $user_row['user_colour']),
+
'AVATAR_IMG' => $avatar_img,
'RANK_IMG' => $rank_img,
diff --git a/phpBB/modules/ucp/ucp_activate.php b/phpBB/modules/ucp/ucp_activate.php
index 2738da4275..0f1d122a42 100644
--- a/phpBB/modules/ucp/ucp_activate.php
+++ b/phpBB/modules/ucp/ucp_activate.php
@@ -69,6 +69,8 @@ class ucp_activate
SET ' . phpbb::$db->sql_build_array('UPDATE', $sql_ary) . '
WHERE user_id = ' . $user_row['user_id'];
phpbb::$db->sql_query($sql);
+
+ add_log('user', $user_row['user_id'], 'LOG_USER_NEW_PASSWORD', $user_row['username']);
}
if (!$update_password)
diff --git a/phpBB/modules/ucp/ucp_groups.php b/phpBB/modules/ucp/ucp_groups.php
index 98ca194a68..c8627802e2 100644
--- a/phpBB/modules/ucp/ucp_groups.php
+++ b/phpBB/modules/ucp/ucp_groups.php
@@ -336,7 +336,7 @@ class ucp_groups
'S_GROUP_DEFAULT' => ($row['group_id'] == phpbb::$user->data['group_id']) ? true : false,
));
- $group_id_ary[] = $row['group_id'];
+ $group_id_ary[] = (int) $row['group_id'];
}
phpbb::$db->sql_freeresult($result);
diff --git a/phpBB/modules/ucp/ucp_main.php b/phpBB/modules/ucp/ucp_main.php
index 587ebe2dd9..8bd03baf49 100644
--- a/phpBB/modules/ucp/ucp_main.php
+++ b/phpBB/modules/ucp/ucp_main.php
@@ -634,6 +634,9 @@ class ucp_main
$table = ($mode == 'subscribed') ? TOPICS_WATCH_TABLE : BOOKMARKS_TABLE;
$start = request_var('start', 0);
+ // Grab icons
+ $icons = phpbb_cache::obtain_icons();
+
$sql_array = array(
'SELECT' => 'COUNT(t.topic_id) as topics_count',
@@ -805,6 +808,7 @@ class ucp_main
'TOPIC_FOLDER_IMG' => phpbb::$user->img($folder_img, $folder_alt),
'TOPIC_FOLDER_IMG_SRC' => phpbb::$user->img($folder_img, $folder_alt, 'src'),
+ 'TOPIC_FOLDER_IMG_ALT' => phpbb::$user->lang[$folder_alt],
'TOPIC_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['img'] : '',
'TOPIC_ICON_IMG_WIDTH' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['width'] : '',
'TOPIC_ICON_IMG_HEIGHT' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['height'] : '',
diff --git a/phpBB/modules/ucp/ucp_pm_compose.php b/phpBB/modules/ucp/ucp_pm_compose.php
index 507ff2bdc2..122e08bc41 100644
--- a/phpBB/modules/ucp/ucp_pm_compose.php
+++ b/phpBB/modules/ucp/ucp_pm_compose.php
@@ -1029,6 +1029,7 @@ function compose_pm($id, $mode, $action)
'FLASH_STATUS' => ($flash_status) ? phpbb::$user->lang['FLASH_IS_ON'] : phpbb::$user->lang['FLASH_IS_OFF'],
'SMILIES_STATUS' => ($smilies_status) ? phpbb::$user->lang['SMILIES_ARE_ON'] : phpbb::$user->lang['SMILIES_ARE_OFF'],
'URL_STATUS' => ($url_status) ? phpbb::$user->lang['URL_IS_ON'] : phpbb::$user->lang['URL_IS_OFF'],
+ 'MAX_FONT_SIZE' => (int) phpbb::$config['max_post_font_size'],
'MINI_POST_IMG' => phpbb::$user->img('icon_post_target', phpbb::$user->lang['PM']),
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
'MAX_RECIPIENTS' => (phpbb::$config['allow_mass_pm'] && (phpbb::$acl->acl_get('u_masspm') || phpbb::$acl->acl_get('u_masspm_group'))) ? $max_recipients : 0,
diff --git a/phpBB/modules/ucp/ucp_profile.php b/phpBB/modules/ucp/ucp_profile.php
index 7bd748dcad..7c2edb2a80 100644
--- a/phpBB/modules/ucp/ucp_profile.php
+++ b/phpBB/modules/ucp/ucp_profile.php
@@ -347,11 +347,11 @@ class ucp_profile
{
$data['notify'] = phpbb::$user->data['user_notify_type'];
- if (!phpbb::$config['jab_enable'] || !$data['jabber'] || !@extension_loaded('xml'))
+ if ($data['notify'] == NOTIFY_IM && (!phpbb::$config['jab_enable'] || !$data['jabber'] || !@extension_loaded('xml')))
{
// User has not filled in a jabber address (Or one of the modules is disabled or jabber is disabled)
// Disable notify by Jabber now for this user.
- $data['notify'] = NOTIFY_BOTH;
+ $data['notify'] = NOTIFY_EMAIL;
}
$sql_ary = array(
@@ -547,6 +547,7 @@ class ucp_profile
'IMG_STATUS' => (phpbb::$config['allow_sig_img']) ? phpbb::$user->lang['IMAGES_ARE_ON'] : phpbb::$user->lang['IMAGES_ARE_OFF'],
'FLASH_STATUS' => (phpbb::$config['allow_sig_flash']) ? phpbb::$user->lang['FLASH_IS_ON'] : phpbb::$user->lang['FLASH_IS_OFF'],
'URL_STATUS' => (phpbb::$config['allow_sig_links']) ? phpbb::$user->lang['URL_IS_ON'] : phpbb::$user->lang['URL_IS_OFF'],
+ 'MAX_FONT_SIZE' => (int) phpbb::$config['max_sig_font_size'],
'L_SIGNATURE_EXPLAIN' => sprintf(phpbb::$user->lang['SIGNATURE_EXPLAIN'], phpbb::$config['max_sig_chars']),
diff --git a/phpBB/modules/ucp/ucp_register.php b/phpBB/modules/ucp/ucp_register.php
index 20402883cf..ee721f4f3a 100644
--- a/phpBB/modules/ucp/ucp_register.php
+++ b/phpBB/modules/ucp/ucp_register.php
@@ -50,7 +50,6 @@ class ucp_register
add_form_key('ucp_register_terms');
}
-
if (phpbb::$config['enable_confirm'])
{
include(PHPBB_ROOT_PATH . 'includes/captcha/captcha_factory.' . PHP_EXT);
@@ -466,6 +465,7 @@ class ucp_register
'S_LANG_OPTIONS' => language_select($data['lang']),
'S_TZ_OPTIONS' => tz_select($data['tz']),
+ 'S_CONFIRM_REFRESH' => (phpbb::$config['enable_confirm'] && phpbb::$config['confirm_refresh']) ? true : false,
'S_COPPA' => $coppa,
'S_HIDDEN_FIELDS' => $s_hidden_fields,
'S_UCP_ACTION' => append_sid('ucp', 'mode=register'),
diff --git a/phpBB/modules/ucp/ucp_resend.php b/phpBB/modules/ucp/ucp_resend.php
index 1ee8a976ea..56579d42ba 100644
--- a/phpBB/modules/ucp/ucp_resend.php
+++ b/phpBB/modules/ucp/ucp_resend.php
@@ -130,6 +130,11 @@ class ucp_resend
$messenger->to($row['user_email'], $row['username']);
$messenger->im($row['user_jabber'], $row['username']);
+ $messenger->headers('X-AntiAbuse: Board servername - ' . phpbb::$config['server_name']);
+ $messenger->headers('X-AntiAbuse: User_id - ' . phpbb::$user->data['user_id']);
+ $messenger->headers('X-AntiAbuse: Username - ' . phpbb::$user->data['username']);
+ $messenger->headers('X-AntiAbuse: User IP - ' . phpbb::$user->ip);
+
$messenger->assign_vars(array(
'USERNAME' => htmlspecialchars_decode($user_row['username']),
'U_USER_DETAILS' => generate_board_url() . '/memberlist.' . PHP_EXT . "?mode=viewprofile&u={$user_row['user_id']}",
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 73417d0ee1..f5ad0961fd 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -102,7 +102,8 @@ switch ($mode)
AND t.topic_id = p.topic_id
AND u.user_id = p.poster_id
AND (f.forum_id = t.forum_id
- OR f.forum_id = $forum_id)";
+ OR f.forum_id = $forum_id)" .
+ (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND p.post_approved = 1');
break;
case 'smilies':
@@ -1260,6 +1261,7 @@ phpbb::$template->assign_vars(array(
'FLASH_STATUS' => ($flash_status) ? phpbb::$user->lang['FLASH_IS_ON'] : phpbb::$user->lang['FLASH_IS_OFF'],
'SMILIES_STATUS' => ($smilies_status) ? phpbb::$user->lang['SMILIES_ARE_ON'] : phpbb::$user->lang['SMILIES_ARE_OFF'],
'URL_STATUS' => ($bbcode_status && $url_status) ? phpbb::$user->lang['URL_IS_ON'] : phpbb::$user->lang['URL_IS_OFF'],
+ 'MAX_FONT_SIZE' => (int) phpbb::$config['max_post_font_size'],
'MINI_POST_IMG' => phpbb::$user->img('icon_post_target', 'POST'),
'POST_DATE' => ($post_data['post_time']) ? phpbb::$user->format_date($post_data['post_time']) : '',
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
diff --git a/phpBB/search.php b/phpBB/search.php
index 15f9aade93..835ec11b94 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -395,7 +395,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
while ($row = phpbb::$db->sql_fetchrow($result))
{
- $id_ary[] = $row[$field];
+ $id_ary[] = (int) $row[$field];
}
phpbb::$db->sql_freeresult($result);
diff --git a/phpBB/styles/prosilver/template/attachment.html b/phpBB/styles/prosilver/template/attachment.html
index 7472abaee6..cc5aacff2f 100644
--- a/phpBB/styles/prosilver/template/attachment.html
+++ b/phpBB/styles/prosilver/template/attachment.html
@@ -61,13 +61,13 @@
<!-- ELSEIF _file.S_FLASH_FILE -->
<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="{_file.WIDTH}" height="{_file.HEIGHT}">
- <param name="movie" value="{_file.U_DOWNLOAD_LINK}" />
+ <param name="movie" value="{_file.U_VIEW_LINK}" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="quality" value="high" />
<param name="allowScriptAccess" value="never" />
<param name="allowNetworking" value="internal" />
- <embed src="{_file.U_DOWNLOAD_LINK}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{_file.WIDTH}" height="{_file.HEIGHT}" play="true" loop="true" quality="high" allowscriptaccess="never" allownetworking="internal"></embed>
+ <embed src="{_file.U_VIEW_LINK}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{_file.WIDTH}" height="{_file.HEIGHT}" play="true" loop="true" quality="high" allowscriptaccess="never" allownetworking="internal"></embed>
</object>
<!-- ELSEIF _file.S_QUICKTIME_FILE -->
<object id="qtstream_{_file.ATTACH_ID}" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0" width="0" height="16">
diff --git a/phpBB/styles/prosilver/template/mcp_notes_user.html b/phpBB/styles/prosilver/template/mcp_notes_user.html
index bf9ea2d7da..60bdbc7b9f 100644
--- a/phpBB/styles/prosilver/template/mcp_notes_user.html
+++ b/phpBB/styles/prosilver/template/mcp_notes_user.html
@@ -7,7 +7,7 @@
<div class="panel">
<div class="inner"><span class="corners-top"><span></span></span>
- <h3><!-- IF USER_COLOR --><span style="color: #{USER_COLOR}">{USERNAME}</span><!-- ELSE -->{USERNAME}<!-- ENDIF --></h3>
+ <h3>{USERNAME_FULL}</h3>
<div>
<div class="column1">
diff --git a/phpBB/styles/prosilver/template/mcp_topic.html b/phpBB/styles/prosilver/template/mcp_topic.html
index 80efdca5fe..c95bb923fa 100644
--- a/phpBB/styles/prosilver/template/mcp_topic.html
+++ b/phpBB/styles/prosilver/template/mcp_topic.html
@@ -160,7 +160,7 @@ onload_functions.push('subPanels()');
<!-- IF S_CAN_SPLIT --><option value="split_all"<!-- IF S_SPLIT_VIEW --> selected="selected"<!-- ENDIF -->>{L_SPLIT_POSTS}</option><option value="split_beyond">{L_SPLIT_AFTER}</option><!-- ENDIF -->
</select>&nbsp;
<input class="button1" type="submit" name="mcp_topic_submit" value="{L_SUBMIT}" />
- <div><a href="#" onclick="marklist('mcp', '', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('mcp', '', false); return false;">{L_UNMARK_ALL}</a></div>
+ <div><a href="#" onclick="marklist('mcp', 'post', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('mcp', 'post', false); return false;">{L_UNMARK_ALL}</a></div>
{S_HIDDEN_FIELDS}
{S_FORM_TOKEN}
</fieldset>
diff --git a/phpBB/styles/prosilver/template/mcp_warn_user.html b/phpBB/styles/prosilver/template/mcp_warn_user.html
index 5b5156f3a1..dfc167399f 100644
--- a/phpBB/styles/prosilver/template/mcp_warn_user.html
+++ b/phpBB/styles/prosilver/template/mcp_warn_user.html
@@ -7,7 +7,7 @@
<div class="panel">
<div class="inner"><span class="corners-top"><span></span></span>
- <h3><!-- IF USER_COLOR --><span style="color: #{USER_COLOR}">{USERNAME}</span><!-- ELSE -->{USERNAME}<!-- ENDIF --></h3>
+ <h3>{USERNAME_FULL}</h3>
<div>
<div class="column1">
diff --git a/phpBB/styles/prosilver/template/posting_buttons.html b/phpBB/styles/prosilver/template/posting_buttons.html
index 40f9503ca1..4d866681f0 100644
--- a/phpBB/styles/prosilver/template/posting_buttons.html
+++ b/phpBB/styles/prosilver/template/posting_buttons.html
@@ -93,8 +93,12 @@
<option value="50">{L_FONT_TINY}</option>
<option value="85">{L_FONT_SMALL}</option>
<option value="100" selected="selected">{L_FONT_NORMAL}</option>
- <option value="150">{L_FONT_LARGE}</option>
- <option value="200">{L_FONT_HUGE}</option>
+ <!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 150 -->
+ <option value="150">{L_FONT_LARGE}</option>
+ <!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 200 -->
+ <option value="200">{L_FONT_HUGE}</option>
+ <!-- ENDIF -->
+ <!-- ENDIF -->
</select>
<input type="button" class="button2" name="bbpalette" id="bbpalette" value="{L_FONT_COLOR}" onclick="change_palette();" title="{L_BBCODE_S_HELP}" />
<!-- BEGIN custom_tags -->
diff --git a/phpBB/styles/prosilver/template/posting_editor.html b/phpBB/styles/prosilver/template/posting_editor.html
index b9bfae6014..a6d779e98a 100644
--- a/phpBB/styles/prosilver/template/posting_editor.html
+++ b/phpBB/styles/prosilver/template/posting_editor.html
@@ -61,7 +61,7 @@
<!-- IF S_GROUP_OPTIONS -->
<div class="column2">
<dl>
- <dd><label for="group_list">{L_USERGROUPS}:</label> <select name="group_list[]" id="group_list "multiple="true" size="4" class="inputbox">{S_GROUP_OPTIONS}</select></dd>
+ <dd><label for="group_list">{L_USERGROUPS}:</label> <select name="group_list[]" id="group_list "multiple="multiple" size="4" class="inputbox">{S_GROUP_OPTIONS}</select></dd>
</dl>
</div>
<!-- ENDIF -->
@@ -156,8 +156,8 @@
<!-- BEGIN attach_row -->
<dl>
- <dt><label for="comment_list[{attach_row.ASSOC_INDEX}]">{L_FILE_COMMENT}:</label></dt>
- <dd><textarea name="comment_list[{attach_row.ASSOC_INDEX}]" id="comment_list[{attach_row.ASSOC_INDEX}]" rows="1" cols="35" class="inputbox">{attach_row.FILE_COMMENT}</textarea></dd>
+ <dt><label for="comment_list_{attach_row.ASSOC_INDEX}">{L_FILE_COMMENT}:</label></dt>
+ <dd><textarea name="comment_list[{attach_row.ASSOC_INDEX}]" id="comment_list_{attach_row.ASSOC_INDEX}" rows="1" cols="35" class="inputbox">{attach_row.FILE_COMMENT}</textarea></dd>
<dd><a href="{attach_row.U_VIEW_ATTACHMENT}" class="{S_CONTENT_FLOW_END}">{attach_row.FILENAME}</a></dd>
<dd style="margin-top: 5px;">
<!-- IF S_INLINE_ATTACHMENT_OPTIONS --><input type="button" value="{L_PLACE_INLINE}" onclick="attach_inline({attach_row.ASSOC_INDEX}, '{attach_row.A_FILENAME}');" class="button2" />&nbsp; <!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/posting_review.html b/phpBB/styles/prosilver/template/posting_review.html
index bb67481583..78b994c989 100644
--- a/phpBB/styles/prosilver/template/posting_review.html
+++ b/phpBB/styles/prosilver/template/posting_review.html
@@ -3,10 +3,16 @@
<p>{L_POST_REVIEW_EXPLAIN}</p>
<!-- BEGIN post_review_row -->
-<div id="ppr{post_review_row.POST_ID}" class="post <!-- IF post_review_row.S_ROW_NUM is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF post_review_row.ONLINE_STATUS --> online<!-- ENDIF -->">
+<!-- IF post_review_row.S_IGNORE_POST -->
+<div class="post bg3 post-ignore">
<div class="inner"><span class="corners-top"><span></span></span>
+ {post_review_row.L_IGNORE_POST}
+<!-- ELSE -->
+<div class="post <!-- IF post_review_row.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF post_review_row.ONLINE_STATUS --> online<!-- ENDIF -->">
+ <div class="inner"><span class="corners-top"><span></span></span>
+<!-- ENDIF -->
- <div class="postbody">
+ <div class="postbody" id="ppr{post_review_row.POST_ID}">
<h3><a href="#ppr{post_review_row.POST_ID}">{post_review_row.POST_SUBJECT}</a></h3>
<p class="author"><!-- IF S_IS_BOT -->{post_review_row.MINI_POST_IMG}<!-- ELSE --><a href="{post_review_row.U_MINI_POST}">{post_review_row.MINI_POST_IMG}</a><!-- ENDIF --> {L_POST_BY_AUTHOR}<strong> {post_review_row.POST_AUTHOR_FULL}</strong> &raquo; {post_review_row.POST_DATE}</p>
<div class="content">{post_review_row.MESSAGE}</div>
diff --git a/phpBB/styles/prosilver/template/posting_topic_review.html b/phpBB/styles/prosilver/template/posting_topic_review.html
index bbeea72878..428a830ef3 100644
--- a/phpBB/styles/prosilver/template/posting_topic_review.html
+++ b/phpBB/styles/prosilver/template/posting_topic_review.html
@@ -6,8 +6,15 @@
<div id="topicreview">
<!-- BEGIN topic_review_row -->
- <div class="post <!-- IF topic_review_row.S_ROW_NUM is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
+
+ <!-- IF topic_review_row.S_IGNORE_POST -->
+ <div class="post bg3 post-ignore">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ {topic_review_row.L_IGNORE_POST}
+ <!-- ELSE -->
+ <div class="post <!-- IF topic_review_row.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
<div class="inner"><span class="corners-top"><span></span></span>
+ <!-- ENDIF -->
<div class="postbody" id="pr{topic_review_row.POST_ID}">
<!-- IF topic_review_row.POSTER_QUOTE and topic_review_row.DECODED_MESSAGE -->
diff --git a/phpBB/styles/prosilver/template/simple_header.html b/phpBB/styles/prosilver/template/simple_header.html
index d14f89935e..0e2409586c 100644
--- a/phpBB/styles/prosilver/template/simple_header.html
+++ b/phpBB/styles/prosilver/template/simple_header.html
@@ -17,6 +17,11 @@
<script type="text/javascript">
// <![CDATA[
+ var jump_page = '{LA_JUMP_PAGE}:';
+ var on_page = '{ON_PAGE}';
+ var per_page = '{PER_PAGE}';
+ var base_url = '{A_BASE_URL}';
+ var style_cookie = 'phpBBstyle';
var onload_functions = new Array();
var onunload_functions = new Array();
var style_cookie_settings = '{A_COOKIE_SETTINGS}';
@@ -43,6 +48,7 @@
// ]]>
</script>
<script type="text/javascript" src="{T_TEMPLATE_PATH}/styleswitcher.js"></script>
+<script type="text/javascript" src="{T_TEMPLATE_PATH}/forum_fn.js"></script>
<link href="{T_THEME_PATH}/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" />
<link href="{T_STYLESHEET_LINK}" rel="stylesheet" type="text/css" media="screen, projection" />
diff --git a/phpBB/styles/prosilver/template/ucp_main_bookmarks.html b/phpBB/styles/prosilver/template/ucp_main_bookmarks.html
index 4c2be0d792..af3c2398a0 100644
--- a/phpBB/styles/prosilver/template/ucp_main_bookmarks.html
+++ b/phpBB/styles/prosilver/template/ucp_main_bookmarks.html
@@ -32,7 +32,7 @@
</dl>
<!-- ELSE -->
<dl class="icon" style="background-image: url({topicrow.TOPIC_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
- <dt style="<!-- IF topicrow.TOPIC_ICON_IMG -->background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;<!-- ENDIF -->" title="{topicrow.TOPIC_FOLDER_IMG_ALT}">
+ <dt<!-- IF topicrow.TOPIC_ICON_IMG --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}">
<!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF -->
<!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
diff --git a/phpBB/styles/prosilver/template/ucp_main_subscribed.html b/phpBB/styles/prosilver/template/ucp_main_subscribed.html
index 2a34858040..89a879847e 100644
--- a/phpBB/styles/prosilver/template/ucp_main_subscribed.html
+++ b/phpBB/styles/prosilver/template/ucp_main_subscribed.html
@@ -52,7 +52,7 @@
<!-- BEGIN topicrow -->
<li class="row<!-- IF topicrow.S_TOPIC_REPORTED --> reported<!-- ELSEIF topicrow.S_ROW_NUM is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl class="icon" style="background-image: url({topicrow.TOPIC_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
- <dt style="<!-- IF topicrow.TOPIC_ICON_IMG -->background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;<!-- ENDIF -->" title="{topicrow.TOPIC_FOLDER_IMG_ALT}">
+ <dt<!-- IF topicrow.TOPIC_ICON_IMG --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}">
<!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF -->
<!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
diff --git a/phpBB/styles/prosilver/template/ucp_register.html b/phpBB/styles/prosilver/template/ucp_register.html
index 8d635198d3..458d50a197 100644
--- a/phpBB/styles/prosilver/template/ucp_register.html
+++ b/phpBB/styles/prosilver/template/ucp_register.html
@@ -82,7 +82,13 @@
<p>{L_CONFIRM_EXPLAIN}</p>
<fieldset class="fields2">
- {S_CAPTCHA}
+ <dl>
+ <dt><label for="confirm_code">{L_CONFIRM_CODE}:</label></dt>
+ <dd>{CONFIRM_IMG}</dd>
+ <dd><input type="text" name="confirm_code" id="confirm_code" size="8" maxlength="8" class="inputbox narrow" title="{L_CONFIRM_CODE}" /></dd>
+ <dd>{L_CONFIRM_CODE_EXPLAIN}<!-- IF S_CONFIRM_REFRESH --> {L_VC_REFRESH_EXPLAIN}<!-- ENDIF --></dd>
+ <!-- IF S_CONFIRM_REFRESH --><dd><input type="submit" value="{L_VC_REFRESH}" class="button2" /></dd> <!-- ENDIF -->
+ </dl>
</fieldset>
<!-- ENDIF -->
@@ -107,7 +113,7 @@
<fieldset class="submit-buttons">
{S_HIDDEN_FIELDS}
<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
- <input type="submit" name="submit" id ="submit" value="{L_SUBMIT}" class="button1" />
+ <input type="submit" name="submit" id="submit" value="{L_SUBMIT}" class="button1" />
{S_FORM_TOKEN}
</fieldset>
diff --git a/phpBB/styles/prosilver/template/viewtopic_print.html b/phpBB/styles/prosilver/template/viewtopic_print.html
index 45c7010867..2946d7645c 100644
--- a/phpBB/styles/prosilver/template/viewtopic_print.html
+++ b/phpBB/styles/prosilver/template/viewtopic_print.html
@@ -11,7 +11,7 @@
<meta name="copyright" content="2000, 2002, 2005, 2007 phpBB Group" />
<meta name="keywords" content="" />
<meta name="description" content="" />
-<meta name="robots" CONTENT="noindex" />
+<meta name="robots" content="noindex" />
{META}
<title>{SITENAME} &bull; {PAGE_TITLE}</title>
diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css
index c3fa42115f..3a26ceac06 100644
--- a/phpBB/styles/prosilver/theme/common.css
+++ b/phpBB/styles/prosilver/theme/common.css
@@ -397,7 +397,7 @@ table.table1 .joined { text-align: left; width: 15%; }
table.table1 .active { text-align: left; width: 15%; }
table.table1 .mark { text-align: center; width: 7%; }
table.table1 .info { text-align: left; width: 30%; }
-table.table1 .info div { width: 100%; white-space: nowrap; overflow: hidden; }
+table.table1 .info div { width: 100%; white-space: normal; overflow: hidden; }
table.table1 .autocol { line-height: 2em; white-space: nowrap; }
table.table1 thead .autocol { padding-left: 1em; }
diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css
index 00342604bb..b6d3efa8a3 100644
--- a/phpBB/styles/prosilver/theme/content.css
+++ b/phpBB/styles/prosilver/theme/content.css
@@ -280,6 +280,10 @@ div[class].topic-actions {
border-bottom-width: 0;
}
+.post-ignore .postbody {
+ display: none;
+}
+
/* Content container styles
----------------------------------------*/
.content {
@@ -750,4 +754,4 @@ dl.pmlist dt textarea {
dl.pmlist dd {
margin-left: 61% !important;
margin-bottom: 2px;
-}
+} \ No newline at end of file
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 16b0f486ae..7f20a7f4b3 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -899,7 +899,7 @@ $result = phpbb::$db->sql_query_limit($sql, $sql_limit, $sql_start);
$i = ($store_reverse) ? $sql_limit - 1 : 0;
while ($row = phpbb::$db->sql_fetchrow($result))
{
- $post_list[$i] = $row['post_id'];
+ $post_list[$i] = (int) $row['post_id'];
($store_reverse) ? $i-- : $i++;
}
phpbb::$db->sql_freeresult($result);
@@ -953,12 +953,12 @@ while ($row = phpbb::$db->sql_fetchrow($result))
$max_post_time = $row['post_time'];
}
- $poster_id = $row['poster_id'];
+ $poster_id = (int) $row['poster_id'];
// Does post have an attachment? If so, add it to the list
if ($row['post_attachment'] && phpbb::$config['allow_attachments'])
{
- $attach_list[] = $row['post_id'];
+ $attach_list[] = (int) $row['post_id'];
if ($row['post_approved'])
{
@@ -1382,7 +1382,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
// It is safe to grab the username from the user cache array, we are at the last
// post and only the topic poster and last poster are allowed to bump.
// Admins and mods are bound to the above rules too...
- $l_bumped_by = '<br /><br />' . sprintf(phpbb::$user->lang['BUMPED_BY'], $user_cache[$topic_data['topic_bumper']]['username'], phpbb::$user->format_date($topic_data['topic_last_post_time']));
+ $l_bumped_by = '<br /><br />' . sprintf(phpbb::$user->lang['BUMPED_BY'], $user_cache[$topic_data['topic_bumper']]['username'], phpbb::$user->format_date($topic_data['topic_last_post_time'], false, false));
}
else
{