Merge commit 'release-3.0-RC2'

This commit is contained in:
Nils Adermann 2010-03-02 01:05:35 +01:00
commit 0e0c8d7819
197 changed files with 3737 additions and 3152 deletions

View file

@ -161,7 +161,7 @@
</dl>
<dl>
<dt><label for="forum_password">{L_FORUM_PASSWORD}:</label><br /><span>{L_FORUM_PASSWORD_EXPLAIN}</span></dt>
<dd><input type="password" id="forum_password" name="forum_password" value="{FORUM_PASSWORD}" maxlength="40" /></dd>
<dd><input type="password" id="forum_password" name="forum_password" value="{FORUM_PASSWORD}" /></dd>
</dl>
<dl>
<dt><label for="forum_password_confirm">{L_FORUM_PASSWORD_CONFIRM}:</label><br /><span>{L_FORUM_PASSWORD_CONFIRM_EXPLAIN}</span></dt>

View file

@ -38,10 +38,13 @@
<dt><label for="jab_password">{L_JAB_PASSWORD}:</label></dt>
<dd><input type="password" id="jab_password" name="jab_password" value="{JAB_PASSWORD}" /></dd>
</dl>
<!-- IF S_CAN_USE_SSL -->
<dl>
<dt><label for="jab_resource">{L_JAB_RESOURCE}:</label><br /><span>{L_JAB_RESOURCE_EXPLAIN}</span></dt>
<dd><input type="text" id="jab_resource" name="jab_resource" value="{JAB_RESOURCE}" /></dd>
<dt><label for="jab_use_ssl">{L_JAB_USE_SSL}:</label><br /><span>{L_JAB_USE_SSL_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" id="jab_use_ssl" name="jab_use_ssl" value="1"<!-- IF JAB_USE_SSL --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="jab_use_ssl" value="0"<!-- IF not JAB_USE_SSL --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<!-- ENDIF -->
<dl>
<dt><label for="jab_package_size">{L_JAB_PACKAGE_SIZE}:</label><br /><span>{L_JAB_PACKAGE_SIZE_EXPLAIN}</span></dt>
<dd><input type="text" id="jab_package_size" name="jab_package_size" value="{JAB_PACKAGE_SIZE}" maxlength="5" size="5" /></dd>

View file

@ -129,7 +129,7 @@
<fieldset class="quick" style="float: right">
{S_HIDDEN_FIELDS}
<input class="button1" type="submit" name="next" value="{L_NEXT}" />
<input class="button1" type="submit" name="next" value="{L_NEXT_STEP}" />
</fieldset>
<!-- ELSEIF S_STEP_THREE -->

View file

@ -58,6 +58,35 @@
}
//-->
</script>
<script type="text/javascript">
<!--
/**
* Handle displaying/hiding the dimension fields
*/
function display_options(value)
{
if (value == 0)
{
dE('img_dimensions', -1);
}
else
{
dE('img_dimensions', 1);
}
}
/**
* Init the wanted display functionality if javascript is enabled.
* If javascript is not available, the user is still able to properly administrate.
*/
onload = function()
{
<!-- IF not IMAGE_SIZE -->
dE('img_dimensions', -1);
<!-- ENDIF -->
}
//-->
</script>
<form method="post" action="{U_ACTION}">
@ -65,8 +94,8 @@
<legend>{L_SELECT_IMAGE}</legend>
{L_SELECT_IMAGE}: <select name="imgname" onchange="this.form.submit();">
<!-- BEGIN category -->
<option class="sep" value="">{category.NAME}</option>
<!-- BEGIN images --><option value="{category.images.VALUE}"<!-- IF category.images.SELECTED--> selected="selected"<!-- ENDIF -->>{category.images.TEXT}</option>
<option class="sep" value="" disabled="disabled">{category.NAME}</option>
<!-- BEGIN images --><option value="{category.images.VALUE}"<!-- IF category.images.SELECTED--> selected="selected"<!-- ENDIF -->>&nbsp;&nbsp;&nbsp;&nbsp;{category.images.TEXT}</option>
<!-- END images -->
<!-- END category -->
</select>&nbsp; <input class="button1" type="submit" value="{L_SELECT}" tabindex="100" />
@ -80,7 +109,7 @@
</dl>
<dl>
<dt><label>{L_SELECTED_IMAGE}:</label></dt>
<dd><img src="images/no_image.png" id="newimg" alt="" /></dd>
<dd><img src="{IMG_SRC}" id="newimg" alt="" /></dd>
</dl>
</fieldset>
@ -100,9 +129,19 @@
</dl>
<dl>
<dt><label for="imgsize">{L_INCLUDE_DIMENSIONS}:</label><br /><span>{L_DIMENSIONS_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="imgsize" id="imgsize" value="1"<!-- IF IMAGE_SIZE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="imgsize" value="0"<!-- IF not IMAGE_SIZE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
<dd><label><input type="radio" class="radio" name="imgsize" id="imgsize" onclick="display_options(1);" value="1"<!-- IF IMAGE_SIZE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="imgsize" onclick="display_options(0);" value="0"<!-- IF not IMAGE_SIZE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<div id="img_dimensions">
<dl>
<dt><label for="imgwidth">{L_IMAGE_WIDTH}:</label><br /><span>{L_AUTOMATIC_EXPLAIN}</span></dt>
<dd><input type="text" name="imgwidth" value="{IMAGE_SIZE}" /></dd>
</dl>
<dl>
<dt><label for="imgheight">{L_IMAGE_HEIGHT}:</label><br /><span>{L_AUTOMATIC_EXPLAIN}</span></dt>
<dd><input type="text" name="imgheight" value="{IMAGE_HEIGHT}" /></dd>
</dl>
</div>
</fieldset>
<fieldset class="submit-buttons">

View file

@ -173,7 +173,7 @@
<tbody>
<!-- BEGIN attach -->
<!-- IF attach.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td><a href="{attach.U_DOWNLOAD}">{attach.REAL_FILENAME}</a><br /><span class="small"><!-- IF attach.S_IN_MESSAGE --><strong>{L_PM}: </strong><!-- ELSE --><strong>{L_TOPIC}: </strong><!-- ENDIF --><a href="{attach.U_VIEW_TOPIC}">{attach.TOPIC_TITLE}</a></span></td>
<td><a href="{attach.U_DOWNLOAD}">{attach.REAL_FILENAME}</a><br /><span class="small"><!-- IF attach.S_IN_MESSAGE --><strong>{L_PM}: </strong><!-- ELSE --><strong>{L_POST}: </strong><!-- ENDIF --><a href="{attach.U_VIEW_TOPIC}">{attach.TOPIC_TITLE}</a></span></td>
<td style="text-align: center">{attach.POST_TIME}</td>
<td style="text-align: center">{attach.SIZE}</td>
<td style="text-align: center">{attach.DOWNLOAD_COUNT}</td>
@ -184,7 +184,7 @@
</table>
<!-- ELSE -->
<div class="errorbox">
<p>{L_NO_ENTRIES}</p>
<p>{L_USER_NO_ATTACHMENTS}</p>
</div>
<!-- ENDIF -->
<fieldset class="display-options">

View file

@ -191,7 +191,7 @@ a:active {
height: 350px;
}
.simple-page-body {
#page-body.simple-page-body {
padding: 0;
padding-right: 10px;
min-width: 0;
@ -351,6 +351,12 @@ span.corners-bottom span {
margin-left: 2px;
}
.rtl #toggle {
left: 75%;
margin-right: 0;
margin-left: 6px;
}
#toggle-handle {
display: block;
width: 18px;
@ -359,6 +365,11 @@ span.corners-bottom span {
background-image: url(../images/toggle.gif);
}
.rtl #toggle-handle {
background-image: url(../images/toggle.gif);
background-position: 100% 50%;
}
/* Menu */
#menu {
float: left;
@ -721,7 +732,7 @@ option {
}
option.disabled-option {
color: #aaa;
color: graytext;
}
.rtl option {

View file

@ -22,7 +22,7 @@
<p>{L_UPDATE_INSTALLATION_EXPLAIN}</p>
<fieldset class="submit-buttons">
<input class="button1" type="submit" name="submit" value="{L_NEXT}" />
<input class="button1" type="submit" name="submit" value="{L_NEXT_STEP}" />
</fieldset>
</form>
@ -100,8 +100,6 @@
<p>
{L_PERFORM_DATABASE_UPDATE_EXPLAIN}<br />
<br />
<a href="{U_DB_UPDATE}"><strong>&raquo; {L_RUN_DATABASE_SCRIPT} &laquo;</strong></a>
</p>
<br /><br />
@ -109,7 +107,9 @@
<form id="install_dbupdate" method="post" action="{U_DB_UPDATE_ACTION}">
<fieldset class="submit-buttons">
<input class="button1" type="submit" name="db_update" value="{L_CHECK_UPDATE_DATABASE}" />
<a href="{U_DB_UPDATE}" class="button1">{L_RUN_DATABASE_SCRIPT}</a>
<!-- input class="button1" type="submit" name="db_update" value="{L_CHECK_UPDATE_DATABASE}" / -->
</fieldset>
</form>

View file

@ -35,7 +35,7 @@ function resize_panel()
<!--
#main {
font-size: 1.25em;
font-size: 1em;
line-height: 0.7em;
margin: 0;
padding: 0;
@ -214,13 +214,14 @@ table.hrdiff caption span {
<h1>{L_VIEWING_FILE_DIFF}</h1>
<!-- ENDIF -->
<!-- IF not S_DIFF_NEW_FILE -->
<br />
<p id="skip"><a href="#acp">{L_SKIP}</a></p>
<form method="post">
<fieldset class="quick">
<label for="diff_mode">{L_SELECT_DIFF_MODE}:</label>
<select name="diff_mode" id="diff_mode">{S_DIFF_MODE_OPTIONS}</select>
<input class="button1" type="submit" id="submit" name="submit" value="{L_CHANGE}" />
</fieldset>
</form>
<!-- ENDIF -->
</div>

View file

@ -129,11 +129,17 @@ function switch_menu()
main.style.width = '93%';
menu_state = 'hidden';
menu.style.display = 'none';
toggle.style.left = '0';
toggle.style.width = '20px';
handle.style.backgroundImage = 'url(images/toggle.gif)';
handle.style.backgroundPosition = '100% 50%';
handle.style.backgroundRepeat = 'no-repeat';
<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
handle.style.backgroundPosition = '0% 50%';
toggle.style.left = '96%';
<!-- ELSE -->
handle.style.backgroundPosition = '100% 50%';
toggle.style.left = '0';
<!-- ENDIF -->
break;
// show
@ -141,11 +147,17 @@ function switch_menu()
main.style.width = '76%';
menu_state = 'shown';
menu.style.display = 'block';
toggle.style.left = '15%';
toggle.style.width = '5%';
handle.style.backgroundImage = 'url(images/toggle.gif)';
handle.style.backgroundPosition = '0% 50%';
handle.style.backgroundRepeat = 'no-repeat';
<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
handle.style.backgroundPosition = '100% 50%';
toggle.style.left = '75%';
<!-- ELSE -->
handle.style.backgroundPosition = '0% 50%';
toggle.style.left = '15%';
<!-- ENDIF -->
break;
}
}

View file

@ -46,6 +46,6 @@
<br />
<!-- INCLUDE simple_footer.html -->
</div>
<!-- INCLUDE simple_footer.html -->

View file

@ -858,7 +858,7 @@ function get_schema_struct()
),
'PRIMARY_KEY' => array('role_id', 'auth_option_id'),
'KEYS' => array(
'ath_opt_id' => array('INDEX', 'auth_option_id'),
'ath_op_id' => array('INDEX', 'auth_option_id'),
),
);
@ -1256,7 +1256,7 @@ function get_schema_struct()
'enable_magic_url' => array('BOOL', 1),
'enable_sig' => array('BOOL', 1),
'post_username' => array('VCHAR_UNI:255', ''),
'post_subject' => array('XSTEXT_UNI', ''),
'post_subject' => array('XSTEXT_UNI', '', 'true_sort'),
'post_text' => array('MTEXT_UNI', ''),
'post_checksum' => array('VCHAR:32', ''),
'post_attachment' => array('BOOL', 0),
@ -1643,7 +1643,7 @@ function get_schema_struct()
),
'PRIMARY_KEY' => 'image_id',
'KEYS' => array(
'i_id' => array('INDEX', 'imageset_id'),
'i_d' => array('INDEX', 'imageset_id'),
),
);

View file

@ -378,8 +378,12 @@ fclose($fp);
*/
$cheats = array(
'00DF' => 'ss', # German sharp S
'00C5' => 'ae', # Capital A with diaeresis
'00E4' => 'ae', # Small A with diaeresis
'00D6' => 'oe', # Capital O with diaeresis
'00F6' => 'oe', # Small O with diaeresis
'00DC' => 'ue', # Capital U with diaeresis
'00FC' => 'ue', # Small U with diaeresis
);
/**

View file

@ -18,7 +18,7 @@ phpBB Developers : DavidMJ (David M.)
kellanved (Henry Sudhof)
naderman (Nils Adermann)
subBlue (Tom Beddard)
Vic (Vic D'elfant)
Vic D'Elfant (Vic D'Elfant)
-- Previous Contributors --
@ -46,7 +46,7 @@ Smarty (c) 2001, 2002 by ispi of Lincoln, Inc, http://smarty.php.net/
GPL licenced:
phpMyAdmin (c) 2001,2003 phpMyAdmin Devel team, http://www.phpmyadmin.net/
Jabber Class (c) 2004 Nathan Fritz, http://cjphp.netflint.net
Jabber Class (c) 2006 Flyspray.org, http://www.flyspray.org/
Chora (c) 2000-2006, The Horde Project. http://horde.org/chora/
Horde Project (c) 2000-2006, The Horde Project. http://horde.org/

View file

@ -1,4 +1,3 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
@ -185,7 +184,120 @@ p a {
<div class="paragraph">
<ul class="menu">
<li>&nbsp;</li>
<li>[Fix] (X)HTML issues within the templates (Bug #11255, #11255)</li>
<li>[Fix] Tiny language and grammar changes</li>
<li>[Fix] Several style related fixes, mainly fixing cross-browser issues</li>
<li>[Fix] Several RTL fixes within prosilver</li>
<li>[Fix] MCP looses forum_id in some panels (Bug #11255)</li>
<li>[Fix] Moderation queue used unfriendly notification of no posts/topics (Bug #11291)</li>
<li>[Fix] Array in Oracle DBAL not always set (Bug #11475)</li>
<li>[Fix] Improper continue; in acp_styles.php (Bug #11523)</li>
<li>[Fix] Imageset editor more friendly (Bug #11511)</li>
<li>[Fix] Made Custom BBCode validation more strict (Bug #11335)</li>
<li>[Fix] Proper sync of data on topic copy (Bug #11335)</li>
<li>[Fix] Introduced ORDER BY clauses to converter queries (Bug #10697)</li>
<li>[Fix] Stopped bots from getting added to the registered users group during conversion (Bug #11283)</li>
<li>[Fix] Filled &quot;SMILIEYS_DISABLED&quot; template variable (Bug #11257)</li>
<li>[Fix] Properly escaped the delimiter in disallowed username comparisons (Bug #11339)</li>
<li>[Fix] Check global purge setting (Bug #11555)</li>
<li>[Fix] Improper magic url parsing applied to already parsed [url=] bbcode tag (Bug #11429)</li>
<li>[Fix] Renamed two indicies for Oracle support (Bug #11457)</li>
<li>[Fix] Added support for ISO-8859-8(-i) in the character set convertor (Bug #11265, #12039)</li>
<li>[Fix] Added support for Oracle's &quot;easy connect naming&quot;</li>
<li>[Fix] Let Mark/Unmark All work in Manage Drafts (Bug #11679)</li>
<li>[Fix] Display correct message if no attachments found in user administration (Bug #11629)</li>
<li>[Fix] Let the &quot;Delete all board cookies&quot; being displayed for guests too (only prosilver) (Bug #11603)</li>
<li>[Fix] Do not display view topic link in MCP while there is no link present (Bug #11573)</li>
<li>[Fix] MySQL now properly sorts by post_subject (Bug #11637)</li>
<li>[Fix] Introduced checks to stop negative postcounts (Bug #11561, #11421)</li>
<li>[Fix] Allow IP v4/v6 urls for remote avatars (Bug #11633)</li>
<li>[Fix] Delete avatar files automatically (Bug #11631)</li>
<li>[Fix] Automatically add selected columns to group by statements in the converter (Bug #11465)</li>
<li>[Fix] Allow posts without subjects to be clicked in the MCP (Bug #11483)</li>
<li>[Fix] Sync the forums that shadow topics reside in when the topic that they point to is deleted</li>
<li>[Fix] Do not use the gen_random_string function to create cookie names during install (Bug #11431)</li>
<li>[Fix] Send stylesheet in style.php even without a valid session id (Bug #11531)</li>
<li>[Fix] request_var should strictly return the requested number of dimensions</li>
<li>[Fix] Correct assignment of custom width to $user-&gt;img(); / Correctly display poll bars in subsilver2 (Bug #11301)</li>
<li>[Fix] Allow removing polls in prosilver</li>
<li>[Fix] Correct link to post in managing users attachments (Bug #11765)</li>
<li>[Fix] Reload confirm screen for selecting new forum for global topic type change if not postable forum is chosen (Bug #11711)</li>
<li>[Fix] Correctly show system default color for disabled options in Internet Explorer which does not support disabled option fields</li>
<li>[Fix] Update query for custom profiles in user management used wrong order for left/right delimiter (affecting mssql) (Bug #11781)</li>
<li>[Fix] Inconsistent display of more smileys link fixed (Bug #11801)</li>
<li>[Fix] Outbox messages are no always neither new nor unread post-conversion (Bug #11461)</li>
<li>[Feature] Replaced outdated jabber class with the one from the flyspray project</li>
<li>[Feature] The converter no longer relies on the smiley ID to decide if it should be displayed on the posting page</li>
<li>[Change] Limit maximum number of allowed characters in messages to 60.000 by default. Admins should increase their PHP time limits if they want to raise this tremedously.</li>
<li>[Change] Some changes to the conversion documentation</li>
<li>[Fix] Only use permissions from existing forums during the conversion (Bug #11417)</li>
<li>[Fix] Do not permit the decimal as a valid prefix character (Bug #11967)</li>
<li>[Fix] Account for the fact that the IM fields might hold non-IM information</li>
<li>[Fix] Make the queue function on post details</li>
<li>[Fix] Check if there are active styles left before deleting a style</li>
<li>[Fix] Correctly update styles after the deletion of an imageset.</li>
<li>[Fix] Replaced jabber validation to use the method used by the new jabber class (Bug #9822)</li>
<li>[Sec] Adding confirm boxes to UCP group actions (ToonArmy)</li>
<li>[Feature] Added the option to disable the flash bbcode globally (DelvarWorld)</li>
<li>[Sec] Changed the embedding of Flash (NeoThermic, DelvarWorld)</li>
<li>[Fix] Use the signature setting for PMs (Bug #12001)</li>
<li>[Fix] Made the DBMS selection use language variables (Bug #11969)</li>
<li>[Fix] Make sure that a folder is used when viewing messages to oneself (Bug #12105)</li>
<li>[Fix] Account for the fact that a board might have no visible Admins (Bug #12185)</li>
<li>[Fix] Change group ranks even if empty (Bug #12231)</li>
<li>[Fix] Correctly propagate variables across the custom profile field wizard (Bug #12237)</li>
<li>[Fix] Correctly move pm's into folders if more than one is received (Bug #12135)</li>
<li>[Fix] Corrected various bugs with CPF on multi-language boards (Bug #11803)</li>
<li>[Fix] Disable notify checkbox in posting editor when board email is disabled (Bug #12263)</li>
<li>[Fix] Removed maxlength from password/username fields (Bugs #12215, #11797)</li>
<li>[Fix] Use icon-unsubscribe in prosilver (Bug #12211)</li>
<li>[Fix] Seperated PREVIOUS/NEXT language vars for pagination and next/previous step (Bug #12197)</li>
<li>[Feature] append_sid() supporting anchor (Bug #11535) - patch provided by Schumi and ToonArmy</li>
<li>[Fix] Remember selected language while registering after submit (Bug #11435)</li>
<li>[Fix] UTF-8 support in theme and template editors (Bug #12251)</li>
<li>[Fix] Allow for posts per page in the MCP to change during topic selection (Bug #12067)</li>
<li>[Fix] Remove group avatars upon deletion from all profiles, not just the people having the group as default (Bug #12275, #12267)</li>
<li>[Fix] Allow for conversions to SQLite (Bug #12279) - patch provided by ToonArmy</li>
<li>[Fix] Apply colours to guests (Bug #12219)</li>
<li>[Fix] Set the Admin group as founder_manage during conversion (Bug #12287)</li>
<li>[Fix] Fixed a special quote BBCode case (Bug #12189)</li>
<li>[Fix] Correctly parse BBCodes in a post when a poll is being used (Bug #11833)</li>
<li>[Fix] Remember attached files on PM edit (Bug #12019)</li>
<li>[Fix] Correctly display poll ending on preview (Bug #12303)</li>
<li>[Feature] Display the success message on posting longer for posts awaiting approval (Bug #12053)</li>
<li>[Fix] Display maximum and entered number of characters for the &quot;maximum number of characters exceeded&quot; error messages (Bug #11981)</li>
<li>[Fix] Wrongly applied setting for allowing links in private messages (used the signature setting instead of the post setting) (Bug #11945)</li>
<li>[Fix] Unread flag for multipage topic wrongly set under some conditions (Bug #12127) - fix provided by asinshesq</li>
<li>[Fix] Able to delete posts within user prune panel (Bug #11849)</li>
<li>[Feature] Allow to specify dimensions of images manually on imageset config (Bug #11675)</li>
<li>[Fix] Correctly re-assign query result id after seeking rows (MSSQL/Firebird) (Bug #12369)</li>
<li>[Feature] Make effect of a changed hideonline permission instantaneous</li>
<li>[Fix] Do not overwrite larger memory values in the installer (Bug #12195)</li>
<li>[Fix] Order forums on role permission mask (Bug #12337)</li>
<li>[Fix] Show "no image" image when a non-selectable item was selected in the acp imageset editor - IE (Bug #12423)</li>
<li>[Fix] Update session information without new pageload (Bug #12393, Bug #12441)</li>
<li>[Fix] Let polls be edited correctly (Bug #12433)</li>
<li>[Fix] Overcome Oracle's inability to handle IN() clauses with over one thousand elements (Bug #12449)</li>
<li>[Fix] Simulate Firebird's affected rows mechanism for older versions of PHP</li>
<li>[Fix] Custom BBCodes properly handle lowercasing of parameterized tags (Bug #12377)</li>
<li>[Fix] Update the forum_id sequence for PostgreSQL during conversion (Bug #11927)</li>
<li>[Fix] Allow for multiple tags containing URL and LOCAL_URL tokens (Bug #12473)</li>
<li>[Fix] Properly display forum list in the MCP Queue (Bug #11313)</li>
<li>[Fix] Use the localised guest name for quotes (Bug #12483)</li>
<li>[Fix] Added post anchor to links in default warning message (Bug #12489)</li>
<li>[Fix] Allow 5 digits in editing time fields (Bug #12489)</li>
<li>[Fix] MS SQL DBAL drivers now write over extension limitations, they are too low for most installations (Bug #12415)</li>
<li>[Fix] Fix sorting by author on "unanswered posts" (Bug #12545)</li>
<li>[Fix] Allow searching for multibyte authors (Bug #11793)</li>
<li>[Fix] Writing directories/files with correct permissions using FTP for transfers on PHP4</li>
<li>[Fix] Oracle sequences during conversions are now corrected (Bug #12555)</li>
<li>[Fix] Allow users to continue after selecting "No" in the merge quickmod confirmation (Bug #12577)</li>
<li>[Fix] Correctly check permissions on the UCP subscription/bookmark pages (Bug #12595)</li>
<li>[Fix] Only convert non-orphaned PMs</li>
<li>[Fix] Fixed a few Postgres related errors (Bug #12587)</li>
<li>[Feature] New DBAL wrapper for LIKE expressions / sql_like_expression()</li>
<li>[Sec] Stricter validation of language entries. </li>
</ul>
</div>

View file

@ -189,6 +189,7 @@ p a {
<li><a href="#prereq">Requirements before converting</a></li>
<li><a href="#conversion">Converting</a></li>
<li><a href="#postreq">Things to do after conversion</a></li>
<li><a href="#convprob">Common conversion problems</a></li>
</ol>
</li>
<li><a href="#postinstall">Important (security related) post-Install tasks for all installation methods</a>
@ -427,9 +428,11 @@ p a {
<br /><br />
<div class="paragraph">
<p>Before converting we heavily recommend you do a <em>full backup of your database and files</em>! If you are unsure how to achieve this please ask your hosting provider for advice. In order to convert, you need to have a new phpBB3 installation within the same database (but with a different prefix) as your old 2.0.x installation. You basically need to follow the basic instructions given for <a href="#install">New installations</a>. Please <strong>do not</strong> overwrite any old files - install phpBB3 at a different location.</p>
<p>Before converting we heavily recommend you do a <em>full backup of your database and files</em>! If you are unsure how to achieve this please ask your hosting provider for advice. You basically need to follow the basic instructions given for <a href="#install">New installations</a>. Please <strong>do not</strong> overwrite any old files - install phpBB3 at a different location.</p>
<p>Once you made a backup of everything and also have a brand new phpBB3 installation, you can now begin the conversion.</p>
<p>Note that the conversion requires CREATE and DROP privileges for the phpBB3's database user account.</p>
</div>
<a href="#top">Top</a>
<br /><br />
@ -441,7 +444,7 @@ p a {
<p>To begin the conversion visit the install folder of your phpBB3 installation (the same as you have done for installing). Now you will see a new tab <em>Convert</em>. Click this tab.</p>
<p>As with install the conversion is automated. Your previous 2.0.x database tables will not be touched as well as the original 2.0.x files remaining untouched. The conversion is actually only filling your phpBB3 database tables and copying additional data over to your phpBB3 installation. This has the benefit that if something goes wrong you are able to either re-run the conversion or continue a conversion, while your old board is still accessible. We really recommend you disable your old installation while converting, else you may have inconsistent data after the conversion.</p>
<p>As with install the conversion is automated. Your previous 2.0.x database tables will not be changed as well as the original 2.0.x files remaining unaltered. The conversion is actually only filling your phpBB3 database tables and copying additional data over to your phpBB3 installation. This has the benefit that if something goes wrong you are able to either re-run the conversion or continue a conversion, while your old board is still accessible. We really recommend you disable your old installation while converting, else you may have inconsistent data after the conversion.</p>
<p>Please note that this conversion process may take quite some time and depending on your hosting provider this may result in it failing (due to web server or other timeout issues). If this is the case you should ask your provider if they are willing to allow the convert script to temporarily exceed their limits (be nice and they will probably be quite helpful).</p>
@ -461,12 +464,36 @@ p a {
<p>Within the conversion the search index has not been created or transferred. This means after conversion you are not able to find any matches if you want to search for something. We recommend you rebuild your search index within <code>Admin -&gt; Maintenance -&gt; Database -&gt; Search Index</code>.</p>
<p>After verifying the settings in the ACP, you can delete the install directory to enable the board. The board will stay disabled until you do so.</p>
<p>Once you are pleased with your new installation you may want to give it the name of your old installation, changing the directory name. With phpBB3 this is possible without any problems - but you may still want to check your cookie settings within the administration panel, if the cookie path need to be adjusted prior to renaming.</p>
</div>
<a href="#top">Top</a>
<br /><br />
<a name="convprob"></a><b>5.iv. Common conversion problems</b>
<br /><br />
<div class="paragraph">
<p><strong>Broken non-latin characters</strong> The conversion script assumes that the database encoding in the source phpBB2 matches the encoding defined in the <code>lang_main.php</code> file of the default language pack of the source installation. Edit that file to match the database's encoding and re-start the conversion procedure.</p>
<p><strong>http 500 / white pages</strong> The conversion is a load-heavy procedure. Restrictions imposed by some server hosting providers can cause problems. The most common causes are: too low values for the php settings <code>memory_limit</code> and <code>max_execution_time</code>. Limits on the allowed CPU time are also a frequent cause for such errors, as are caps on the number of database queries allowed. If you cannot change such settings, then contact your hosting provider or run the conversion procedure on a different computer. The phpBB.com forums are also an excellent location to ask for support.</p>
<p><strong>Password conversion</strong> Due to the utf-8 based handling of passwords in phpBB3, it is not always possible to transfer all passwords. For passwords "lost in translation" the easiest workaround is to use the "forgotten password" function.</p>
<p><strong>Path to your former board</strong> The converter expects the relative path to your old board's files. So, -for instance - if the new board is located at <code>http://www.yourdomain.com/forum</code> and the phpBB3 is located at <code>http://www.yourdomain.com/phpBB3</code>, then the correct value would be <code>../forum</code>. Note that the webserver user must be able to access the source installation's files.</p>
<p><strong>Missing images</strong> If your default board language's language pack does not include all images, then some images might be missing in your installation. Always use a complete language pack as default language.</p>
<p><strong>Smilies</strong> During the conversion you might see warnings about image files where the copying failed. That can happen if the old board's smilies have the same file names as those on the new board. Copy those files manually after the conversion, if you want to continue using the old smilies.</p>
</div>
<a href="#top">Top</a>
<br /><br />
<hr />
<a name="postinstall"></a><h1>6. Important (security related) post-Install tasks for all installation methods</h1>
@ -476,6 +503,7 @@ p a {
<p>Once you have succssfully installed phpBB3 you <strong>MUST</strong> ensure you remove the entire install/ directory. Leaving the install directory in place is a <em>very serious potential security issue</em> which may lead to deletion or alteration of files, etc. Please note that until this directory is not removed phpBB3 will not operate and a warning message will be displayed. Beyond this <strong>essential</strong> deletion you may also wish to delete the docs/ directories if you wish.</p>
<p>With these directories deleted you should proceed to the administration panel. Depending on how the installation completed you may have been directed there automatically. If not, login as the administrator you specified during install/conversion and click the <strong>Administration Panel</strong> link at the bottom of any page. Ensure that details specified in <code>Admin -&gt; General</code> are correct!</p>
</div>
<a href="#top">Top</a>
<br /><br />

View file

@ -118,7 +118,7 @@ class acp_bbcodes
// Make sure the user didn't pick a "bad" name for the BBCode tag.
$hard_coded = array('code', 'quote', 'quote=', 'attachment', 'attachment=', 'b', 'i', 'url', 'url=', 'img', 'size', 'size=', 'color', 'color=', 'u', 'list', 'list=', 'email', 'email=', 'flash', 'flash=');
if (($action == 'modify' && $data['bbcode_tag'] !== $row['bbcode_tag']) || ($action == 'create'))
if (($action == 'modify' && strtolower($data['bbcode_tag']) !== strtolower($row['bbcode_tag'])) || ($action == 'create'))
{
$sql = 'SELECT 1 as test
FROM ' . BBCODES_TABLE . "
@ -295,10 +295,10 @@ class acp_bbcodes
// @todo Make sure to change this too if something changed in message parsing
$tokens = array(
'URL' => array(
'!([a-z0-9]+://)?([^< "\r\n\t\]]*)!ie' => "(('\$1') ? '\$1\$2' : 'http://\$2')"
'!([a-z0-9]+://)?([^< "\r\n\t\]]*?)!ie' => "(('\$1') ? '\$1\$2' : 'http://\$2')"
),
'LOCAL_URL' => array(
'!([^:]+/[^< "\r\n\t\]]*)!' => '$1'
'!([^:]+/[^< "\r\n\t\]]*?)!' => '$1'
),
'EMAIL' => array(
'!([a-z0-9]+[a-z0-9\-\._]*@(?:(?:[0-9]{1,3}\.){3,5}[0-9]{1,3}|[a-z0-9]+[a-z0-9\-\._]*\.[a-z]+))!i' => '$1'
@ -383,10 +383,18 @@ class acp_bbcodes
// Lowercase tags
$bbcode_tag = preg_replace('/.*?\[([a-z0-9_-]+=?).*/i', '$1', $bbcode_match);
$fp_match = preg_replace('#\[/?' . $bbcode_tag . '#ie', "strtolower('\$0')", $fp_match);
$fp_replace = preg_replace('#\[/?' . $bbcode_tag . '#ie', "strtolower('\$0')", $fp_replace);
$sp_match = preg_replace('#\[/?' . $bbcode_tag . '#ie', "strtolower('\$0')", $sp_match);
$sp_replace = preg_replace('#\[/?' . $bbcode_tag . '#ie', "strtolower('\$0')", $sp_replace);
$bbcode_search = preg_replace('/.*?\[([a-z0-9_-]+)=?.*/i', '$1', $bbcode_match);
if (!preg_match('/^[a-zA-Z0-9_-]+=?$/', $bbcode_tag))
{
global $user;
trigger_error($user->lang['BBCODE_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$fp_match = preg_replace('#\[/?' . $bbcode_search . '#ie', "strtolower('\$0')", $fp_match);
$fp_replace = preg_replace('#\[/?' . $bbcode_search . '#ie', "strtolower('\$0')", $fp_replace);
$sp_match = preg_replace('#\[/?' . $bbcode_search . '#ie', "strtolower('\$0')", $sp_match);
$sp_replace = preg_replace('#\[/?' . $bbcode_search . '#ie', "strtolower('\$0')", $sp_replace);
return array(
'bbcode_tag' => $bbcode_tag,

View file

@ -44,7 +44,7 @@ class acp_board
'site_desc' => array('lang' => 'SITE_DESC', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => false),
'board_disable' => array('lang' => 'DISABLE_BOARD', 'validate' => 'bool', 'type' => 'custom', 'method' => 'board_disable', 'explain' => true),
'board_disable_msg' => false,
'default_lang' => array('lang' => 'DEFAULT_LANGUAGE', 'validate' => 'string', 'type' => 'select', 'function' => 'language_select', 'params' => array('{CONFIG_VALUE}'), 'explain' => false),
'default_lang' => array('lang' => 'DEFAULT_LANGUAGE', 'validate' => 'lang', 'type' => 'select', 'function' => 'language_select', 'params' => array('{CONFIG_VALUE}'), 'explain' => false),
'default_dateformat' => array('lang' => 'DEFAULT_DATE_FORMAT', 'validate' => 'string', 'type' => 'custom', 'method' => 'dateformat_select', 'explain' => true),
'board_timezone' => array('lang' => 'SYSTEM_TIMEZONE', 'validate' => 'string', 'type' => 'select', 'function' => 'tz_select', 'params' => array('{CONFIG_VALUE}', 1), 'explain' => false),
'board_dst' => array('lang' => 'SYSTEM_DST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
@ -114,7 +114,7 @@ class acp_board
'pm_max_boxes' => array('lang' => 'BOXES_MAX', 'validate' => 'int', 'type' => 'text:4:4', 'explain' => true),
'pm_max_msgs' => array('lang' => 'BOXES_LIMIT', 'validate' => 'int', 'type' => 'text:4:4', 'explain' => true),
'full_folder_action' => array('lang' => 'FULL_FOLDER_ACTION', 'validate' => 'int', 'type' => 'select', 'method' => 'full_folder_select', 'explain' => true),
'pm_edit_time' => array('lang' => 'PM_EDIT_TIME', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
'pm_edit_time' => array('lang' => 'PM_EDIT_TIME', 'validate' => 'int', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
'legend2' => 'GENERAL_OPTIONS',
'allow_mass_pm' => array('lang' => 'ALLOW_MASS_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
@ -125,7 +125,7 @@ class acp_board
'print_pm' => array('lang' => 'ALLOW_PRINT_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'forward_pm' => array('lang' => 'ALLOW_FORWARD_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'auth_img_pm' => array('lang' => 'ALLOW_IMG_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'auth_flash_pm' => array('lang' => 'ALLOW_FLASH_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'auth_flash_pm' => array('lang' => 'ALLOW_FLASH_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'enable_pm_icons' => array('lang' => 'ENABLE_PM_ICONS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false)
)
);
@ -139,6 +139,7 @@ class acp_board
'allow_topic_notify' => array('lang' => 'ALLOW_TOPIC_NOTIFY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_forum_notify' => array('lang' => 'ALLOW_FORUM_NOTIFY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_bbcode' => array('lang' => 'ALLOW_BBCODE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_post_flash' => array('lang' => 'ALLOW_POST_FLASH', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'allow_smilies' => array('lang' => 'ALLOW_SMILIES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_post_links' => array('lang' => 'ALLOW_POST_LINKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'allow_nocensors' => array('lang' => 'ALLOW_NO_CENSORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
@ -147,7 +148,7 @@ class acp_board
'legend2' => 'POSTING',
'bump_type' => false,
'edit_time' => array('lang' => 'EDIT_TIME', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
'edit_time' => array('lang' => 'EDIT_TIME', 'validate' => 'int', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
'display_last_edited' => array('lang' => 'DISPLAY_LAST_EDITED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'flood_interval' => array('lang' => 'FLOOD_INTERVAL', 'validate' => 'int', 'type' => 'text:3:10', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']),
'bump_interval' => array('lang' => 'BUMP_INTERVAL', 'validate' => 'int', 'type' => 'custom', 'method' => 'bump_interval', 'explain' => true),

View file

@ -1709,9 +1709,15 @@ class acp_forums
{
foreach ($post_counts as $poster_id => $substract)
{
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_posts = 0
WHERE user_id = ' . $poster_id . '
AND user_posts < ' . $substract;
$db->sql_query($sql);
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_posts = user_posts - ' . $substract . '
WHERE user_id = ' . $poster_id;
WHERE user_id = ' . $poster_id . '
AND user_posts >= ' . $substract;
$db->sql_query($sql);
}
}

View file

@ -359,7 +359,7 @@ class acp_groups
{
if (isset($group_row['group_avatar']) && $group_row['group_avatar'])
{
avatar_delete('group', $group_row);
avatar_delete('group', $group_row, true);
}
}

View file

@ -41,121 +41,59 @@ class acp_jabber
$jab_port = request_var('jab_port', $config['jab_port']);
$jab_username = request_var('jab_username', $config['jab_username']);
$jab_password = request_var('jab_password', $config['jab_password']);
$jab_resource = request_var('jab_resource', $config['jab_resource']);
$jab_package_size = request_var('jab_package_size', $config['jab_package_size']);
$jab_use_ssl = request_var('jab_use_ssl', $config['jab_use_ssl']);
$jabber = new jabber($jab_host, $jab_port, $jab_username, $jab_password, $jab_resource);
if ($submit)
{
$error = array();
$message = $user->lang['JAB_SETTINGS_CHANGED'];
$log = 'JAB_SETTINGS_CHANGED';
// Are changing (or initialising) a new host or username? If so run some checks and
// try to create account if it doesn't exist
// Is this feature enabled? Then try to establish a connection
if ($jab_enable)
{
if (($jab_host != $config['jab_host'] || $jab_username != $config['jab_username']) && $jab_username)
{
$jabber = new jabber($jab_host, $jab_port, $jab_username, $jab_password, $jab_use_ssl);
if (!$jabber->connect())
{
trigger_error($user->lang['ERR_JAB_CONNECT'] . $jabber->get_log() . adm_back_link($this->u_action), E_USER_WARNING);
trigger_error($user->lang['ERR_JAB_CONNECT'] . '<br /><br />' . $jabber->get_log() . adm_back_link($this->u_action), E_USER_WARNING);
}
// First we'll try to authorise using this account, if that fails we'll try to create it.
if (!($result = $jabber->send_auth()))
// We'll try to authorise using this account
if (!$jabber->login())
{
if (($result = $jabber->account_registration($config['board_email'], $config['sitename'])) <> 2)
{
$error[] = ($result == 1) ? $user->lang['ERR_JAB_USERNAME'] : sprintf($user->lang['ERR_JAB_REGISTER'], $result);
}
else
{
$message = $user->lang['JAB_REGISTERED'];
$log = 'JAB_REGISTER';
}
}
else
{
$message = $user->lang['JAB_CHANGED'];
$log = 'JAB_CHANGED';
trigger_error($user->lang['ERR_JAB_AUTH'] . '<br /><br />' . $jabber->get_log() . adm_back_link($this->u_action), E_USER_WARNING);
}
sleep(1);
$jabber->disconnect();
}
else if ($jab_password != $config['jab_password'])
{
if (!$jabber->connect())
{
trigger_error($user->lang['ERR_JAB_CONNECT'] . $jabber->get_log() . adm_back_link($this->u_action), E_USER_WARNING);
}
if (!$jabber->send_auth())
{
trigger_error($user->lang['ERR_JAB_AUTH'] . $jabber->get_log() . adm_back_link($this->u_action), E_USER_WARNING);
}
$jabber->send_presence(NULL, NULL, 'online');
set_config('jab_enable', $jab_enable);
set_config('jab_host', $jab_host);
set_config('jab_port', $jab_port);
set_config('jab_username', $jab_username);
set_config('jab_password', $jab_password);
set_config('jab_package_size', $jab_package_size);
set_config('jab_use_ssl', $jab_use_ssl);
if (($result = $jabber->change_password($jab_password)) <> 2)
{
$error[] = ($result == 1) ? $user->lang['ERR_JAB_PASSCHG'] : sprintf($user->lang['ERR_JAB_PASSFAIL'], $result);
}
else
{
$message = $user->lang['JAB_PASS_CHANGED'];
$log = 'JAB_PASSCHG';
}
sleep(1);
$jabber->disconnect();
}
}
// Pull relevant config data
$sql = 'SELECT *
FROM ' . CONFIG_TABLE . "
WHERE config_name LIKE 'jab_%'";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$config_name = $row['config_name'];
$config_value = $row['config_value'];
$default_config[$config_name] = $config_value;
$new[$config_name] = (isset($_POST[$config_name])) ? request_var($config_name, '') : $default_config[$config_name];
if ($submit && !sizeof($error))
{
set_config($config_name, $new[$config_name]);
}
}
if ($submit && !sizeof($error))
{
add_log('admin', 'LOG_' . $log);
trigger_error($message . adm_back_link($this->u_action));
}
if (sizeof($error))
{
$template->assign_vars(array(
'S_WARNING' => true,
'WARNING_MSG' => implode('<br />', $error))
);
}
$template->assign_vars(array(
'U_ACTION' => $this->u_action,
'JAB_ENABLE' => $new['jab_enable'],
'JAB_ENABLE' => $jab_enable,
'L_JAB_SERVER_EXPLAIN' => sprintf($user->lang['JAB_SERVER_EXPLAIN'], '<a href="http://www.jabber.org/">', '</a>'),
'JAB_HOST' => $new['jab_host'],
'JAB_PORT' => $new['jab_port'],
'JAB_USERNAME' => $new['jab_username'],
'JAB_PASSWORD' => $new['jab_password'],
'JAB_RESOURCE' => $new['jab_resource'],
'JAB_PACKAGE_SIZE' => $new['jab_package_size'])
);
'JAB_HOST' => $jab_host,
'JAB_PORT' => $jab_port,
'JAB_USERNAME' => $jab_username,
'JAB_PASSWORD' => $jab_password,
'JAB_PACKAGE_SIZE' => $jab_package_size,
'JAB_USE_SSL' => $jab_use_ssl,
'S_CAN_USE_SSL' => jabber::can_use_ssl(),
));
}
}

View file

@ -239,7 +239,7 @@ class acp_permission_roles
{
$sql = 'SELECT auth_option_id, auth_option
FROM ' . ACL_OPTIONS_TABLE . "
WHERE auth_option LIKE '{$permission_type}%'
WHERE auth_option " . $db->sql_like_expression($permission_type . $db->any_char) . "
AND auth_option <> '{$permission_type}'
ORDER BY auth_option_id";
$result = $db->sql_query($sql);
@ -305,7 +305,7 @@ class acp_permission_roles
// We need to fill the auth options array with ACL_NO options ;)
$sql = 'SELECT auth_option_id, auth_option
FROM ' . ACL_OPTIONS_TABLE . "
WHERE auth_option LIKE '{$permission_type}%'
WHERE auth_option " . $db->sql_like_expression($permission_type . $db->any_char) . "
AND auth_option <> '{$permission_type}'
ORDER BY auth_option_id";
$result = $db->sql_query($sql);
@ -490,7 +490,7 @@ class acp_permission_roles
// Get complete auth array
$sql = 'SELECT auth_option, auth_option_id
FROM ' . ACL_OPTIONS_TABLE . "
WHERE auth_option LIKE '" . $db->sql_escape($permission_type) . "%'";
WHERE auth_option " . $db->sql_like_expression($permission_type . $db->any_char);
$result = $db->sql_query($sql);
$auth_settings = array();

View file

@ -593,7 +593,7 @@ class acp_permissions
{
global $user, $auth;
$psubmit = request_var('psubmit', array(0));
$psubmit = request_var('psubmit', array(0 => array(0 => 0)));
// User or group to be set?
$ug_type = (sizeof($user_id)) ? 'user' : 'group';
@ -616,7 +616,7 @@ class acp_permissions
$assigned_role = (isset($_POST['role'][$ug_id][$forum_id])) ? (int) $_POST['role'][$ug_id][$forum_id] : 0;
// Do the admin want to set these permissions to other items too?
$inherit = request_var('inherit', array(0));
$inherit = request_var('inherit', array(0 => array(0)));
$ug_id = array($ug_id);
$forum_id = array($forum_id);
@ -1069,7 +1069,7 @@ class acp_permissions
global $db, $user;
$sql_forum_id = ($permission_scope == 'global') ? 'AND a.forum_id = 0' : ((sizeof($forum_id)) ? 'AND ' . $db->sql_in_set('a.forum_id', $forum_id) : 'AND a.forum_id <> 0');
$sql_permission_option = "AND o.auth_option LIKE '" . $db->sql_escape($permission_type) . "%'";
$sql_permission_option = ' AND o.auth_option ' . $db->sql_like_expression($permission_type . $db->any_char);
$sql = $db->sql_build_query('SELECT_DISTINCT', array(
'SELECT' => 'u.username, u.username_clean, u.user_regdate, u.user_id',

View file

@ -449,8 +449,7 @@ class acp_profile
// Get the number of options if this key is 'field_maxlen'
$var = sizeof(explode("\n", request_var('lang_options', '', true)));
}
if ($field_type == FIELD_TEXT && $key == 'field_length')
else if ($field_type == FIELD_TEXT && $key == 'field_length')
{
if (isset($_REQUEST['rows']))
{
@ -465,8 +464,7 @@ class acp_profile
$cp->vars['columns'] = $row_col[1];
}
}
if ($field_type == FIELD_DATE && $key == 'field_default_value')
else if ($field_type == FIELD_DATE && $key == 'field_default_value')
{
$always_now = request_var('always_now', 0);
@ -542,12 +540,17 @@ class acp_profile
{
$cp->vars[$key] = $$key;
}
else if ($key == 'l_lang_options' && sizeof($cp->vars[$key]) > 1)
else if ($key == 'l_lang_options' && $field_type == FIELD_BOOL)
{
$cp->vars[$key] = request_var($key, array(0 => array('')), true);
}
else if ($key == 'l_lang_options' && is_array($cp->vars[$key]))
{
foreach ($cp->vars[$key] as $lang_id => $options)
{
$cp->vars[$key][$lang_id] = explode("\n", $options);
}
}
}
@ -621,6 +624,19 @@ class acp_profile
$_new_key_ary = array();
foreach ($key_ary as $key)
{
if ($field_type == FIELD_TEXT && $key == 'field_length' && isset($_REQUEST['rows']))
{
$cp->vars['rows'] = request_var('rows', 0);
$cp->vars['columns'] = request_var('columns', 0);
$_new_key_ary[$key] = $cp->vars['rows'] . '|' . $cp->vars['columns'];
}
if ($field_type == FIELD_BOOL && $key == 'l_lang_options' && isset($_REQUEST['l_lang_options']))
{
$_new_key_ary[$key] = request_var($key, array(array('')), true);
}
else
{
if (!isset($_REQUEST[$key]))
{
@ -631,6 +647,7 @@ class acp_profile
$_new_key_ary[$key] = (is_array($_REQUEST[$key])) ? request_var($key, array(''), true) : request_var($key, '', true);
}
}
}
$s_hidden_fields .= build_hidden_fields($_new_key_ary);
}
@ -1073,8 +1090,14 @@ class acp_profile
$cp->vars['l_lang_name'] = request_var('l_lang_name', array(0 => ''), true);
$cp->vars['l_lang_explain'] = request_var('l_lang_explain', array(0 => ''), true);
$cp->vars['l_lang_default_value'] = request_var('l_lang_default_value', array(0 => ''), true);
if ($field_type != FIELD_BOOL)
{
$cp->vars['l_lang_options'] = request_var('l_lang_options', array(0 => ''), true);
}
else
{
$cp->vars['l_lang_default_value'] = request_var('l_lang_default_value', array(0 => array('')), true);
}
if ($cp->vars['lang_options'])
{
if (!is_array($cp->vars['lang_options']))
@ -1508,7 +1531,7 @@ class acp_profile
case 'oracle':
// We are defining the biggest common value, because of the possibility to edit the min/max values of each field.
$sql = 'ALTER TABLE ' . PROFILE_FIELDS_DATA_TABLE . " ADD \"$field_ident\" ";
$sql = 'ALTER TABLE ' . PROFILE_FIELDS_DATA_TABLE . " ADD $field_ident ";
switch ($field_type)
{

View file

@ -230,6 +230,7 @@ class acp_prune
if ($prune)
{
$action = request_var('action', 'deactivate');
$deleteposts = request_var('deleteposts', 0);
if (confirm_box(true))
{
@ -361,7 +362,6 @@ class acp_prune
global $user, $db;
$users = request_var('users', '', true);
$deleteposts = request_var('deleteposts', 0);
if ($users)
{
@ -393,8 +393,8 @@ class acp_prune
$sort_by_types = array('username', 'user_email', 'user_posts', 'user_regdate', 'user_lastvisit');
$where_sql = '';
$where_sql .= ($username) ? " AND username_clean LIKE '" . $db->sql_escape(str_replace('*', '%', utf8_clean_string($username))) . "'" : '';
$where_sql .= ($email) ? " AND user_email LIKE '" . $db->sql_escape(str_replace('*', '%', $email)) . "' " : '';
$where_sql .= ($username) ? ' AND username_clean ' . $db->sql_like_expression(str_replace('*', $db->any_char, utf8_clean_string($username))) : '';
$where_sql .= ($email) ? ' AND user_email ' . $db->sql_like_expression(str_replace('*', $db->any_char, $email)) . ' ' : '';
$where_sql .= (sizeof($joined)) ? " AND user_regdate " . $key_match[$joined_select] . ' ' . gmmktime(0, 0, 0, (int) $joined[1], (int) $joined[2], (int) $joined[0]) : '';
$where_sql .= ($count !== '') ? " AND user_posts " . $key_match[$count_select] . ' ' . (int) $count . ' ' : '';
$where_sql .= (sizeof($active)) ? " AND user_lastvisit " . $key_match[$active_select] . " " . gmmktime(0, 0, 0, (int) $active[1], (int) $active[2], (int) $active[0]) : '';

View file

@ -481,8 +481,8 @@ class acp_search
$template->assign_vars(array(
'S_CONTINUE_INDEXING' => $this->state[1],
'U_CONTINUE_INDEXING' => $this->u_action . '&amp;action=' . $this->state[1],
'L_CONTINUE' => ($this->state[1] == 'create') ? $user->lang['CONTINUE_INDEXING'] : $user->lang['CONTINUE_INDEX_DELETING'],
'L_CONTINUE_EXPLAIN' => ($this->state[1] == 'create') ? $user->lang['CONTINUE_INDEXING_EXPLAIN'] : $user->lang['CONTINUE_INDEX_DELETING_EXPLAIN'])
'L_CONTINUE' => ($this->state[1] == 'create') ? $user->lang['CONTINUE_INDEXING'] : $user->lang['CONTINUE_DELETING_INDEX'],
'L_CONTINUE_EXPLAIN' => ($this->state[1] == 'create') ? $user->lang['CONTINUE_INDEXING_EXPLAIN'] : $user->lang['CONTINUE_DELETING_INDEX_EXPLAIN'])
);
}
}

View file

@ -670,7 +670,7 @@ parse_css_file = {PARSE_CSS_FILE}
$_POST['template_data'] = (isset($_POST['template_data']) && !empty($_POST['template_data'])) ? str_replace(array("\r\n", "\r"), array("\n", "\n"), $_POST['template_data']) : '';
$template_data = (STRIP) ? stripslashes($_POST['template_data']) : $_POST['template_data'];
$template_file = request_var('template_file', '');
$template_file = request_var('template_file', '', true);
$text_rows = max(5, min(999, request_var('text_rows', 20)));
$save_changes = (isset($_POST['save'])) ? true : false;
@ -1023,7 +1023,7 @@ parse_css_file = {PARSE_CSS_FILE}
$_POST['template_data'] = (isset($_POST['template_data']) && !empty($_POST['template_data'])) ? str_replace(array("\r\n", "\r"), array("\n", "\n"), $_POST['template_data']) : '';
$theme_data = (STRIP) ? stripslashes($_POST['template_data']) : $_POST['template_data'];
$theme_file = request_var('template_file', '');
$theme_file = request_var('template_file', '', true);
$text_rows = max(5, min(999, request_var('text_rows', 20)));
$save_changes = (isset($_POST['save'])) ? true : false;
@ -1209,6 +1209,7 @@ parse_css_file = {PARSE_CSS_FILE}
$imgpath = request_var('imgpath', '');
$imgsize = request_var('imgsize', false);
$imgwidth = request_var('imgwidth', 0);
$imgheight = request_var('imgheight', 0);
$imgname = preg_replace('#[^a-z0-9\-+_]#i', '', $imgname);
$imgpath = str_replace('..', '.', $imgpath);
@ -1269,7 +1270,8 @@ parse_css_file = {PARSE_CSS_FILE}
{
// 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 = $imgheight = 0;
$imgwidth = request_var('imgwidth', 0);
$imgheight = request_var('imgheight', 0);
$imglang = '';
if ($imgpath && !file_exists("{$phpbb_root_path}styles/$imageset_path/imageset/$imgpath"))
@ -1279,11 +1281,17 @@ parse_css_file = {PARSE_CSS_FILE}
if ($imgsize && $imgpath)
{
list($imgwidth, $imgheight) = getimagesize("{$phpbb_root_path}styles/$imageset_path/imageset/$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;
}
if (strpos($imgpath, '/') !== false)
{
list($imglang, $imgfilename) = explode('/', $imgpath);
@ -1355,11 +1363,8 @@ parse_css_file = {PARSE_CSS_FILE}
{
$dp2 = @opendir("$dir/$imgnamelang");
if (!$dp2)
if ($dp2)
{
continue;
}
while (($file2 = readdir($dp2)) !== false)
{
if (preg_match('#\.(?:gif|jpg|png)$#', $file2))
@ -1369,6 +1374,7 @@ parse_css_file = {PARSE_CSS_FILE}
}
closedir($dp2);
}
}
closedir($dp);
}
@ -1408,7 +1414,8 @@ parse_css_file = {PARSE_CSS_FILE}
sort($imagesetlist['lang']);
sort($imagesetlist['nolang']);
$imagesetlist_options = '';
$image_found = false;
$img_val = '';
foreach ($imagesetlist as $type => $img_ary)
{
if ($type !== 'lang' || $sql_extra)
@ -1424,7 +1431,8 @@ parse_css_file = {PARSE_CSS_FILE}
$selected = (!empty($imgname) && strpos($image_filename, $imgtext) !== false);
if ($selected)
{
$template->assign_var('IMAGE_SELECT', true);
$image_found = true;
$img_val = htmlspecialchars($img);
}
$template->assign_block_vars('imagesetlist.images', array(
'SELECTED' => $selected,
@ -1442,13 +1450,15 @@ parse_css_file = {PARSE_CSS_FILE}
'L_TITLE' => $user->lang[$this->page_title],
'L_EXPLAIN' => $user->lang[$this->page_title . '_EXPLAIN'],
'IMAGE_OPTIONS' => $img_options,
'IMAGELIST_OPTIONS' => $imagesetlist_options,
'IMAGE_SIZE' => $imgsize_bool,
'IMAGE_REQUEST' => $image_request,
'IMAGE_SIZE' => $image_width,
'IMAGE_HEIGHT' => $image_height,
'IMAGE_REQUEST' => (empty($image_filename)) ? 'images/no_image.png' : $image_request,
'U_ACTION' => $this->u_action . "&amp;action=edit&amp;id=$imageset_id",
'U_BACK' => $this->u_action,
'NAME' => $imageset_name,
'ERROR' => !$valid_name
'ERROR' => !$valid_name,
'IMG_SRC' => ($image_found) ? '../styles/' . $imageset_path . '/imageset/' . $img_val : 'images/no_image.png',
'IMAGE_SELECT' => $image_found
));
}
@ -1461,12 +1471,14 @@ parse_css_file = {PARSE_CSS_FILE}
$new_id = request_var('new_id', 0);
$update = (isset($_POST['update'])) ? true : false;
$sql_where = '';
switch ($mode)
{
case 'style':
$sql_from = STYLES_TABLE;
$sql_select = 'style_name';
$sql_where = 'AND style_active = 1';
break;
case 'template':
@ -1502,6 +1514,7 @@ parse_css_file = {PARSE_CSS_FILE}
$sql = "SELECT {$mode}_id, {$mode}_name
FROM $sql_from
WHERE {$mode}_id <> $style_id
$sql_where
ORDER BY {$mode}_name ASC";
$result = $db->sql_query($sql);
@ -1544,14 +1557,14 @@ parse_css_file = {PARSE_CSS_FILE}
set_config('default_style', $new_id);
}
}
else if ($mode == 'imageset')
else
{
if ($mode == 'imageset')
{
$sql = 'DELETE FROM ' . STYLES_IMAGESET_DATA_TABLE . "
WHERE imageset_id = $style_id";
$db->sql_query($sql);
}
else
{
$sql = 'UPDATE ' . STYLES_TABLE . "
SET {$mode}_id = $new_id
WHERE {$mode}_id = $style_id";

View file

@ -33,7 +33,7 @@ class acp_update
if ($info === false)
{
trigger_error($errstr . adm_back_link($this->u_action));
trigger_error($errstr, E_USER_WARNING);
}
$info = explode("\n", $info);

View file

@ -669,7 +669,7 @@ class acp_users
// Make sure the user is not setting an Inactive or ignored user to be a founder
if ($user_row['user_type'] == USER_IGNORE)
{
trigger_error($user->lang['CANNOT_SET_FOUNDER_BOT'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
trigger_error($user->lang['CANNOT_SET_FOUNDER_IGNORED'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
}
if ($user_row['user_type'] == USER_INACTIVE)
@ -970,7 +970,7 @@ class acp_users
'aim' => request_var('aim', $user_row['user_aim']),
'msn' => request_var('msn', $user_row['user_msnm']),
'yim' => request_var('yim', $user_row['user_yim']),
'jabber' => request_var('jabber', $user_row['user_jabber']),
'jabber' => utf8_normalize_nfc(request_var('jabber', $user_row['user_jabber'], true)),
'website' => request_var('website', $user_row['user_website']),
'location' => utf8_normalize_nfc(request_var('location', $user_row['user_from'], true)),
'occupation' => utf8_normalize_nfc(request_var('occupation', $user_row['user_occ'], true)),
@ -999,7 +999,7 @@ class acp_users
'msn' => array('string', true, 5, 255),
'jabber' => array(
array('string', true, 5, 255),
array('match', true, '#^[^@:\'"<>&\x00-\x1F\x7F\t\r\n]+@(.*?\.)*?[a-z0-9\-_]+?\.[a-z]{2,4}(/.*)?$#iu')),
array('jabber')),
'yim' => array('string', true, 5, 255),
'website' => array(
array('string', true, 12, 255),
@ -1067,7 +1067,7 @@ class acp_users
foreach ($cp_data as $key => $value)
{
$cp_data[$right_delim . $key . $left_delim] = $value;
$cp_data[$left_delim . $key . $right_delim] = $value;
unset($cp_data[$key]);
}
@ -1149,7 +1149,7 @@ class acp_users
$data = array(
'dateformat' => request_var('dateformat', $user_row['user_dateformat'], true),
'lang' => request_var('lang', $user_row['user_lang']),
'lang' => basename(request_var('lang', $user_row['user_lang'])),
'tz' => request_var('tz', (float) $user_row['user_timezone']),
'style' => request_var('style', $user_row['user_style']),
'dst' => request_var('dst', $user_row['user_dst']),
@ -1616,7 +1616,7 @@ class acp_users
}
else
{
$view_topic = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t={$row['topic_id']}&amp;p={$row['post_msg_id']}#{$row['post_msg_id']}");
$view_topic = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t={$row['topic_id']}&amp;p={$row['post_msg_id']}") . '#p' . $row['post_msg_id'];
}
$template->assign_block_vars('attach', array(
@ -1830,19 +1830,14 @@ class acp_users
{
// Select auth options
$sql = 'SELECT auth_option, is_local, is_global
FROM ' . ACL_OPTIONS_TABLE . "
WHERE auth_option LIKE '%\_'";
if ($db->sql_layer == 'mssql' || $db->sql_layer == 'mssql_odbc')
{
$sql .= " ESCAPE '\\' ";
}
$sql .= 'AND is_global = 1
FROM ' . ACL_OPTIONS_TABLE . '
WHERE auth_option ' . $db->sql_like_expression($db->any_char . '_') . '
AND is_global = 1
ORDER BY auth_option';
$result = $db->sql_query($sql);
$hold_ary = array();
while ($row = $db->sql_fetchrow($result))
{
$hold_ary = $auth_admin->get_mask('view', $user_id, false, false, $row['auth_option'], 'global', ACL_NEVER);
@ -1856,15 +1851,9 @@ class acp_users
{
$sql = 'SELECT auth_option, is_local, is_global
FROM ' . ACL_OPTIONS_TABLE . "
WHERE auth_option LIKE '%\_'";
if ($db->sql_layer == 'mssql' || $db->sql_layer == 'mssql_odbc')
{
$sql .= " ESCAPE '\\' ";
}
$sql .= 'AND is_local = 1
ORDER BY is_global DESC, auth_option';
WHERE auth_option " . $db->sql_like_expression($db->any_char . '_') . "
AND is_local = 1
ORDER BY is_global DESC, auth_option";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))

View file

@ -587,7 +587,8 @@ class auth_admin extends auth
// Get forum names
$sql = 'SELECT forum_id, forum_name
FROM ' . FORUMS_TABLE . '
WHERE ' . $db->sql_in_set('forum_id', array_keys($hold_ary));
WHERE ' . $db->sql_in_set('forum_id', array_keys($hold_ary)) . '
ORDER BY left_id';
$result = $db->sql_query($sql);
$forum_names = array();
@ -597,16 +598,12 @@ class auth_admin extends auth
}
$db->sql_freeresult($result);
foreach ($hold_ary as $forum_id => $auth_ary)
foreach ($forum_names as $forum_id => $forum_name)
{
// If there is no forum present the database holds auth information for a non-existent forum... continue then
if ($forum_id && !isset($forum_names[$forum_id]))
{
continue;
}
$auth_ary = $hold_ary[$forum_id];
$template->assign_block_vars('role_mask', array(
'NAME' => ($forum_id == 0) ? $user->lang['GLOBAL_MASK'] : $forum_names[$forum_id],
'NAME' => ($forum_id == 0) ? $user->lang['GLOBAL_MASK'] : $forum_name,
'FORUM_ID' => $forum_id)
);
@ -969,20 +966,9 @@ class auth_admin extends auth
if ($permission_type !== false)
{
// Get permission type
if ($db->sql_layer == 'sqlite')
{
$sql = 'SELECT auth_option, auth_option_id
FROM ' . ACL_OPTIONS_TABLE . "
WHERE auth_option LIKE '" . $db->sql_escape($permission_type) . "%'";
}
else
{
$sql = 'SELECT auth_option, auth_option_id
FROM ' . ACL_OPTIONS_TABLE . "
WHERE auth_option LIKE '" . $db->sql_escape(str_replace('_', "\_", $permission_type)) . "%'";
$sql .= ($db->sql_layer == 'mssql' || $db->sql_layer == 'mssql_odbc') ? " ESCAPE '\\'" : '';
}
WHERE auth_option " . $db->sql_like_expression($permission_type . $db->any_char);
$result = $db->sql_query($sql);
$auth_id_ary = array();

View file

@ -842,15 +842,7 @@ class auth
{
if (strpos($auth_options, '%') !== false)
{
if (strpos($auth_options, '_') !== false && $db->sql_layer !== 'sqlite')
{
$sql_opts = "AND $key LIKE '" . $db->sql_escape(str_replace('_', "\_", $auth_options)) . "'";
$sql_opts .= ($db->sql_layer == 'mssql' || $db->sql_layer == 'mssql_odbc') ? " ESCAPE '\\' " : '';
}
else
{
$sql_opts = "AND $key LIKE '" . $db->sql_escape($auth_options) . "'";
}
$sql_opts = "AND $key " . $db->sql_like_expression(str_replace('%', $db->any_char, $auth_options));
}
else
{
@ -881,16 +873,7 @@ class auth
{
if (strpos($option, '%') !== false)
{
if (strpos($option, '_') !== false && $db->sql_layer !== 'sqlite')
{
$_sql = $key . " LIKE '" . $db->sql_escape(str_replace('_', "\_", $option)) . "'";
$_sql .= ($db->sql_layer == 'mssql' || $db->sql_layer == 'mssql_odbc') ? " ESCAPE '\\'" : '';
$sql[] = $_sql;
}
else
{
$sql[] = $key . " LIKE '" . $db->sql_escape($option) . "'";
}
$sql[] = $key . ' ' . $db->sql_like_expression(str_replace('%', $db->any_char, $option));
}
else
{

View file

@ -394,7 +394,7 @@ class cache extends acm
$usernames = array();
while ($row = $db->sql_fetchrow($result))
{
$usernames[] = utf8_clean_string(str_replace('%', '.*?', preg_quote($row['disallow_username'], '$#')));
$usernames[] = str_replace('%', '.*?', preg_quote(utf8_clean_string($row['disallow_username']), '#'));
}
$db->sql_freeresult($result);

View file

@ -49,6 +49,12 @@ class dbal
*/
var $sql_layer = '';
/**
* Wildcards for matching any (%) or exactly one (_) character within LIKE expressions
*/
var $any_char;
var $one_char;
/**
* Constructor
*/
@ -63,6 +69,10 @@ class dbal
// Fill default sql layer based on the class being called.
// This can be changed by the specified layer itself later if needed.
$this->sql_layer = substr(get_class($this), 5);
// Do not change this please! This variable is used to easy the use of it - and is hardcoded.
$this->any_char = chr(0) . '%';
$this->one_char = chr(0) . '_';
}
/**
@ -191,6 +201,21 @@ class dbal
return false;
}
/**
* Correctly adjust LIKE expression for special characters
* Some DBMS are handling them in a different way
*
* @param string $expression The expression to use. Every wildcard is escaped, except $this->any_char and $this->one_char
* @return string LIKE expression including the keyword!
*/
function sql_like_expression($expression)
{
$expression = str_replace(array('_', '%'), array("\_", "\%"), $expression);
$expression = str_replace(array(chr(0) . "\_", chr(0) . "\%"), array('_', '%'), $expression);
return $this->_sql_like_expression('LIKE \'' . $this->sql_escape($expression) . '\'');
}
/**
* SQL Transaction
* @access private

View file

@ -27,6 +27,7 @@ class dbal_firebird extends dbal
{
var $last_query_text = '';
var $service_handle = false;
var $affected_rows = 0;
/**
* Connect to server
@ -109,13 +110,11 @@ class dbal_firebird extends dbal
if ($this->query_result === false)
{
$prepared = false;
$array = array();
// We overcome Firebird's 32767 char limit by binding vars
if (strlen($query) > 32767)
{
$array = array();
if (preg_match('/^(INSERT INTO[^(]+)\\(([^()]+)\\) VALUES[^(]+\\((.*?)\\)$/s', $query, $regs))
if (preg_match('/^(INSERT INTO[^(]++)\\(([^()]+)\\) VALUES[^(]++\\((.*?)\\)$/s', $query, $regs))
{
if (strlen($regs[3]) > 32767)
{
@ -134,45 +133,55 @@ class dbal_firebird extends dbal
}
$query = $regs[1] . '(' . $regs[2] . ') VALUES (' . implode(', ', $inserts) . ')';
unset($art);
$prepared = true;
}
}
else if (preg_match_all('/^(UPDATE ([\\w_]++)\\s+SET )(\\w+ = (?:\'(?:[^\']++|\'\')*+\'|\\d+)(?:, \\w+ = (?:\'(?:[^\']++|\'\')*+\'|\\d+))*+)\\s+(WHERE.*)$/s', $query, $data, PREG_SET_ORDER))
else if (preg_match('/^(UPDATE ([\\w_]++)\\s+SET )([\\w_]++\\s*=\\s*(?:\'(?:[^\']++|\'\')*+\'|\\d+)(?:,\\s*[\\w_]++\\s*=\\s*(?:\'(?:[^\']++|\'\')*+\'|\\d+))*+)\\s+(WHERE.*)$/s', $query, $data))
{
if (strlen($data[0][3]) > 32767)
if (strlen($data[3]) > 32767)
{
$update = $data[0][1];
$where = $data[0][4];
preg_match_all('/(\\w++) = (\'(?:[^\']++|\'\')*+\'|\\d++)/', $data[0][3], $temp, PREG_SET_ORDER);
$update = $data[1];
$where = $data[4];
preg_match_all('/(\\w++)\\s*=\\s*(\'(?:[^\']++|\'\')*+\'|\\d++)/', $data[3], $temp, PREG_SET_ORDER);
unset($data);
$art = array();
$cols = array();
foreach ($temp as $value)
{
if (!empty($value[2]) && $value[2][0] === "'" && strlen($value[2]) > 32769) // check to see if this thing is greater than the max + 'x2
{
$array[] = str_replace("''", "'", substr($value[2], 1, -1));
$art[] = $value[1] . '=?';
$cols[] = $value[1] . '=?';
}
else
{
$art[] = $value[1] . '=' . $value[2];
$cols[] = $value[1] . '=' . $value[2];
}
}
$query = $update . implode(', ', $art) . ' ' . $where;
unset($art);
$prepared = true;
$query = $update . implode(', ', $cols) . ' ' . $where;
unset($cols);
}
}
}
if ($prepared)
if (!function_exists('ibase_affected_rows') && (preg_match('/^UPDATE ([\w_]++)\s+SET [\w_]++\s*=\s*(?:\'(?:[^\']++|\'\')*+\'|\d+)(?:,\s*[\w_]++\s*=\s*(?:\'(?:[^\']++|\'\')*+\'|\d+))*+\s+(WHERE.*)$/s', $query, $regs) || preg_match('/^DELETE FROM ([\w_]++)\s*WHERE\s*(.*)$/s', $query, $regs)))
{
$p_query = ibase_prepare($this->db_connect_id, $query);
$affected_sql = 'SELECT COUNT(*) as num_rows_affected FROM ' . $regs[1] . ' ' . $regs[2];
if (!($temp_q_id = @ibase_query($this->db_connect_id, $affected_sql)))
{
return false;
}
$temp_result = @ibase_fetch_assoc($temp_q_id);
@ibase_free_result($temp_q_id);
$this->affected_rows = ($temp_result) ? $temp_result['NUM_ROWS_AFFECTED'] : false;
}
if (sizeof($array))
{
$p_query = @ibase_prepare($this->db_connect_id, $query);
array_unshift($array, $p_query);
$this->query_result = call_user_func_array('ibase_execute', $array);
unset($array);
@ -252,7 +261,7 @@ class dbal_firebird extends dbal
}
else
{
return ($this->query_result) ? true : false;
return $this->affected_rows;
}
}
@ -298,7 +307,7 @@ class dbal_firebird extends dbal
* Seek to given row number
* rownum is zero-based
*/
function sql_rowseek($rownum, $query_id = false)
function sql_rowseek($rownum, &$query_id)
{
global $cache;
@ -399,6 +408,15 @@ class dbal_firebird extends dbal
return str_replace("'", "''", $msg);
}
/**
* Build LIKE expression
* @access private
*/
function _sql_like_expression($expression)
{
return $expression . " ESCAPE '\\'";
}
/**
* Build db-specific query data
* @access private

View file

@ -36,6 +36,8 @@ class dbal_mssql extends dbal
$this->dbname = $database;
@ini_set('mssql.charset', 'UTF-8');
@ini_set('mssql.textlimit', 2147483647);
@ini_set('mssql.textsize', 2147483647);
$this->db_connect_id = ($this->persistency) ? @mssql_pconnect($this->server, $this->user, $sqlpassword, $new_link) : @mssql_connect($this->server, $this->user, $sqlpassword, $new_link);
@ -236,7 +238,7 @@ class dbal_mssql extends dbal
* Seek to given row number
* rownum is zero-based
*/
function sql_rowseek($rownum, $query_id = false)
function sql_rowseek($rownum, &$query_id)
{
global $cache;
@ -306,6 +308,15 @@ class dbal_mssql extends dbal
return str_replace("'", "''", $msg);
}
/**
* Build LIKE expression
* @access private
*/
function _sql_like_expression($expression)
{
return $expression . " ESCAPE '\\'";
}
/**
* return sql error array
* @access private
@ -372,21 +383,9 @@ class dbal_mssql extends dbal
switch ($mode)
{
case 'start':
$explain_query = $query;
if (preg_match('/UPDATE ([a-z0-9_]+).*?WHERE(.*)/s', $query, $m))
{
$explain_query = 'SELECT * FROM ' . $m[1] . ' WHERE ' . $m[2];
}
else if (preg_match('/DELETE FROM ([a-z0-9_]+).*?WHERE(.*)/s', $query, $m))
{
$explain_query = 'SELECT * FROM ' . $m[1] . ' WHERE ' . $m[2];
}
if (preg_match('/^SELECT/', $explain_query))
{
$html_table = false;
@mssql_query('SET SHOWPLAN_TEXT ON;', $this->db_connect_id);
if ($result = @mssql_query($explain_query, $this->db_connect_id))
if ($result = @mssql_query($query, $this->db_connect_id))
{
@mssql_next_result($result);
while ($row = @mssql_fetch_row($result))
@ -401,7 +400,6 @@ class dbal_mssql extends dbal
{
$this->html_hold .= '</table>';
}
}
break;
case 'fromcache':

View file

@ -43,8 +43,7 @@ class dbal_mssql_odbc extends dbal
$this->server = $sqlserver . (($port) ? ':' . $port : '');
$this->dbname = $database;
//
// @ini_set('odbc.defaultlrl', '32M');
@ini_set('odbc.defaultlrl', 65536);
$this->db_connect_id = ($this->persistency) ? @odbc_pconnect($this->server, $this->user, $sqlpassword) : @odbc_connect($this->server, $this->user, $sqlpassword);
@ -226,7 +225,7 @@ class dbal_mssql_odbc extends dbal
* Seek to given row number
* rownum is zero-based
*/
function sql_rowseek($rownum, $query_id = false)
function sql_rowseek($rownum, &$query_id)
{
global $cache;
@ -320,6 +319,15 @@ class dbal_mssql_odbc extends dbal
return str_replace("'", "''", $msg);
}
/**
* Build LIKE expression
* @access private
*/
function _sql_like_expression($expression)
{
return $expression . " ESCAPE '\\'";
}
/**
* Build db-specific query data
* @access private
@ -359,36 +367,6 @@ class dbal_mssql_odbc extends dbal
switch ($mode)
{
case 'start':
$explain_query = $query;
if (preg_match('/UPDATE ([a-z0-9_]+).*?WHERE(.*)/s', $query, $m))
{
$explain_query = 'SELECT * FROM ' . $m[1] . ' WHERE ' . $m[2];
}
else if (preg_match('/DELETE FROM ([a-z0-9_]+).*?WHERE(.*)/s', $query, $m))
{
$explain_query = 'SELECT * FROM ' . $m[1] . ' WHERE ' . $m[2];
}
if (preg_match('/^SELECT/', $explain_query))
{
$html_table = false;
@odbc_exec($this->db_connect_id, 'SET SHOWPLAN_TEXT ON;');
if ($result = @odbc_exec($this->db_connect_id, $explain_query))
{
@odbc_next_result($result);
while ($row = @odbc_fetch_array($result))
{
$html_table = $this->sql_report('add_select_row', $query, $html_table, $row);
}
}
@odbc_exec($this->db_connect_id, 'SET SHOWPLAN_TEXT OFF;');
@odbc_free_result($result);
if ($html_table)
{
$this->html_hold .= '</table>';
}
}
break;
case 'fromcache':

View file

@ -212,7 +212,7 @@ class dbal_mysql extends dbal
* Seek to given row number
* rownum is zero-based
*/
function sql_rowseek($rownum, $query_id = false)
function sql_rowseek($rownum, &$query_id)
{
global $cache;
@ -276,6 +276,15 @@ class dbal_mysql extends dbal
return @mysql_real_escape_string($msg, $this->db_connect_id);
}
/**
* Build LIKE expression
* @access private
*/
function _sql_like_expression($expression)
{
return $expression;
}
/**
* Build db-specific query data
* @access private

View file

@ -192,7 +192,7 @@ class dbal_mysqli extends dbal
* Seek to given row number
* rownum is zero-based
*/
function sql_rowseek($rownum, $query_id = false)
function sql_rowseek($rownum, &$query_id)
{
global $cache;
@ -245,6 +245,15 @@ class dbal_mysqli extends dbal
return @mysqli_real_escape_string($this->db_connect_id, $msg);
}
/**
* Build LIKE expression
* @access private
*/
function _sql_like_expression($expression)
{
return $expression;
}
/**
* Build db-specific query data
* @access private
@ -408,7 +417,6 @@ class dbal_mysqli extends dbal
break;
}
@mysqli_query($this->db_connect_id, "SET profiling = 0;");
}
}

View file

@ -36,7 +36,19 @@ class dbal_oracle extends dbal
$this->server = $sqlserver . (($port) ? ':' . $port : '');
$this->dbname = $database;
$this->db_connect_id = ($new_link) ? @ocinlogon($this->user, $sqlpassword, $this->dbname, 'UTF8') : (($this->persistency) ? @ociplogon($this->user, $sqlpassword, $this->dbname, 'UTF8') : @ocinlogon($this->user, $sqlpassword, $this->dbname, 'UTF8'));
$connect = $database;
// support for "easy connect naming"
if ($sqlserver !== '' && $sqlserver !== '/')
{
if (substr($sqlserver, -1, 1) == '/')
{
$sqlserver == substr($sqlserver, 0, -1);
}
$connect = $sqlserver . (($port) ? ':' . $port : '') . '/' . $database;
}
$this->db_connect_id = ($new_link) ? @ocinlogon($this->user, $sqlpassword, $connect, 'UTF8') : (($this->persistency) ? @ociplogon($this->user, $sqlpassword, $connect, 'UTF8') : @ocilogon($this->user, $sqlpassword, $connect, 'UTF8'));
return ($this->db_connect_id) ? $this->db_connect_id : $this->sql_error('');
}
@ -73,6 +85,113 @@ class dbal_oracle extends dbal
return true;
}
/**
* Oracle specific code to handle the fact that it does not compare columns properly
* @access private
*/
function _rewrite_col_compare($args)
{
if (sizeof($args) == 4)
{
if ($args[2] == '=')
{
return '(' . $args[0] . ' OR (' . $args[1] . ' is NULL AND ' . $args[3] . ' is NULL))';
}
else if ($args[2] == '<>')
{
// really just a fancy way of saying foo <> bar or (foo is NULL XOR bar is NULL) but SQL has no XOR :P
return '(' . $args[0] . ' OR ((' . $args[1] . ' is NULL AND ' . $args[3] . ' is NOT NULL) OR (' . $args[1] . ' is NOT NULL AND ' . $args[3] . ' is NULL)))';
}
}
else
{
return $this->_rewrite_where($args[0]);
}
}
/**
* Oracle specific code to handle it's lack of sanity
* @access private
*/
function _rewrite_where($where_clause)
{
preg_match_all('/\s*(AND|OR)?\s*([\w_.]++)\s*(?:(=|<>)\s*((?>\'(?>[^\']++|\'\')*+\'|\d+))|((NOT )?IN\s*\((?>\'(?>[^\']++|\'\')*+\',? ?|\d+,? ?)*+\)))/', $where_clause, $result, PREG_SET_ORDER);
$out = '';
foreach ($result as $val)
{
if (!isset($val[5]))
{
if ($val[4] !== "''")
{
$out .= $val[0];
}
else
{
$out .= ' ' . $val[1] . ' ' . $val[2];
if ($val[3] == '=')
{
$out .= ' is NULL';
}
else if ($val[3] == '<>')
{
$out .= ' is NOT NULL';
}
}
}
else
{
$in_clause = array();
$sub_exp = substr($val[5], strpos($val[5], '(') + 1, -1);
$extra = false;
preg_match_all('/\'(?>[^\']++|\'\')*+\'|\d++/', $sub_exp, $sub_vals, PREG_PATTERN_ORDER);
$i = 0;
foreach ($sub_vals[0] as $sub_val)
{
// two things:
// 1) This determines if an empty string was in the IN clausing, making us turn it into a NULL comparison
// 2) This fixes the 1000 list limit that Oracle has (ORA-01795)
if ($sub_val !== "''")
{
$in_clause[(int) $i++/1000][] = $sub_val;
}
else
{
$extra = true;
}
}
if (!$extra && $i < 1000)
{
$out .= $val[0];
}
else
{
$out .= ' ' . $val[1] . '(';
$in_array = array();
// constuct each IN() clause
foreach ($in_clause as $in_values)
{
$in_array[] = $val[2] . ' ' . (isset($val[6]) ? $val[6] : '') . 'IN(' . implode(', ', $in_values) . ')';
}
// Join the IN() clauses against a few ORs (IN is just a nicer OR anyway)
$out .= implode(' OR ', $in_array);
// handle the empty string case
if ($extra)
{
$out .= ' OR ' . $val[2] . ' is ' . (isset($val[6]) ? $val[6] : '') . 'NULL';
}
$out .= ')';
unset($in_array, $in_clause);
}
}
}
return $out;
}
/**
* Base query method
*
@ -110,12 +229,12 @@ class dbal_oracle extends dbal
$in_transaction = true;
}
$array = array();
// We overcome Oracle's 4000 char limit by binding vars
if (strlen($query) > 4000)
{
$array = array();
if (preg_match('/^(INSERT INTO[^(]+)\\(([^()]+)\\) VALUES[^(]+\\((.*?)\\)$/s', $query, $regs))
if (preg_match('/^(INSERT INTO[^(]++)\\(([^()]+)\\) VALUES[^(]++\\((.*?)\\)$/s', $query, $regs))
{
if (strlen($regs[3]) > 4000)
{
@ -135,38 +254,60 @@ class dbal_oracle extends dbal
}
$query = $regs[1] . '(' . $regs[2] . ') VALUES (' . implode(', ', $inserts) . ')';
unset($art);
}
}
else if (preg_match_all('/^(UPDATE [\\w_]++\\s+SET )(\\w+ = (?:\'(?:[^\']++|\'\')*+\'|\\d+)(?:, \\w+ = (?:\'(?:[^\']++|\'\')*+\'|\\d+))*+)\\s+(WHERE.*)$/s', $query, $data, PREG_SET_ORDER))
else if (preg_match_all('/^(UPDATE [\\w_]++\\s+SET )([\\w_]++\\s*=\\s*(?:\'(?:[^\']++|\'\')*+\'|\\d+)(?:,\\s*[\\w_]++\\s*=\\s*(?:\'(?:[^\']++|\'\')*+\'|\\d+))*+)\\s+(WHERE.*)$/s', $query, $data, PREG_SET_ORDER))
{
if (strlen($data[0][2]) > 4000)
{
$update = $data[0][1];
$where = $data[0][3];
preg_match_all('/(\\w++) = (\'(?:[^\']++|\'\')*+\'|\\d++)/', $data[0][2], $temp, PREG_SET_ORDER);
preg_match_all('/([\\w_]++)\\s*=\\s*(\'(?:[^\']++|\'\')*+\'|\\d++)/', $data[0][2], $temp, PREG_SET_ORDER);
unset($data);
$art = array();
$cols = array();
foreach ($temp as $value)
{
if (!empty($value[2]) && $value[2][0] === "'" && strlen($value[2]) > 4002) // check to see if this thing is greater than the max + 'x2
{
$art[] = $value[1] . '=:' . strtoupper($value[1]);
$cols[] = $value[1] . '=:' . strtoupper($value[1]);
$array[$value[1]] = str_replace("''", "'", substr($value[2], 1, -1));
}
else
{
$art[] = $value[1] . '=' . $value[2];
$cols[] = $value[1] . '=' . $value[2];
}
}
$query = $update . implode(', ', $art) . ' ' . $where;
unset($art);
$query = $update . implode(', ', $cols) . ' ' . $where;
unset($cols);
}
}
}
switch (substr($query, 0, 6))
{
case 'DELETE':
if (preg_match('/^(DELETE FROM [\w_]++ WHERE)((?:\s*(?:AND|OR)?\s*[\w_]+\s*(?:(?:=|<>)\s*(?>\'(?>[^\']++|\'\')*+\'|\d+)|(?:NOT )?IN\s*\((?>\'(?>[^\']++|\'\')*+\',? ?|\d+,? ?)*+\)))*+)$/', $query, $regs))
{
$query = $regs[1] . $this->_rewrite_where($regs[2]);
unset($regs);
}
break;
case 'UPDATE':
if (preg_match('/^(UPDATE [\\w_]++\\s+SET [\\w_]+\s*=\s*(?:\'(?:[^\']++|\'\')*+\'|\\d++|:\w++)(?:, [\\w_]+\s*=\s*(?:\'(?:[^\']++|\'\')*+\'|\\d++|:\w++))*+\\s+WHERE)(.*)$/s', $query, $regs))
{
$query = $regs[1] . $this->_rewrite_where($regs[2]);
unset($regs);
}
break;
case 'SELECT':
$query = preg_replace_callback('/([\w_.]++)\s*(?:(=|<>)\s*(?>\'(?>[^\']++|\'\')*+\'|\d++|([\w_.]++))|(?:NOT )?IN\s*\((?>\'(?>[^\']++|\'\')*+\',? ?|\d++,? ?)*+\))/', array($this, '_rewrite_col_compare'), $query);
break;
}
$this->query_result = @ociparse($this->db_connect_id, $query);
foreach ($array as $key => $value)
@ -267,6 +408,12 @@ class dbal_oracle extends dbal
$result_row = array();
foreach ($row as $key => $value)
{
// Oracle treats empty strings as null
if (is_null($value))
{
$value = '';
}
// OCI->CLOB?
if (is_object($value))
{
@ -286,7 +433,7 @@ class dbal_oracle extends dbal
* Seek to given row number
* rownum is zero-based
*/
function sql_rowseek($rownum, $query_id = false)
function sql_rowseek($rownum, &$query_id)
{
global $cache;
@ -386,6 +533,15 @@ class dbal_oracle extends dbal
return str_replace("'", "''", $msg);
}
/**
* Build LIKE expression
* @access private
*/
function _sql_like_expression($expression)
{
return $expression . " ESCAPE '\\'";
}
function _sql_custom_build($stage, $data)
{
return $data;
@ -431,6 +587,67 @@ class dbal_oracle extends dbal
switch ($mode)
{
case 'start':
$html_table = false;
// Grab a plan table, any will do
$sql = "SELECT table_name
FROM USER_TABLES
WHERE table_name LIKE '%PLAN_TABLE%'";
$stmt = ociparse($this->db_connect_id, $sql);
ociexecute($stmt);
$result = array();
if (ocifetchinto($stmt, $result, OCI_ASSOC + OCI_RETURN_NULLS))
{
$table = $result['TABLE_NAME'];
// This is the statement_id that will allow us to track the plan
$statement_id = substr(md5($query), 0, 30);
// Remove any stale plans
$stmt2 = ociparse($this->db_connect_id, "DELETE FROM $table WHERE statement_id='$statement_id'");
ociexecute($stmt2);
ocifreestatement($stmt2);
// Explain the plan
$sql = "EXPLAIN PLAN
SET STATEMENT_ID = '$statement_id'
FOR $query";
$stmt2 = ociparse($this->db_connect_id, $sql);
ociexecute($stmt2);
ocifreestatement($stmt2);
// Get the data from the plan
$sql = "SELECT operation, options, object_name, object_type, cardinality, cost
FROM plan_table
START WITH id = 0 AND statement_id = '$statement_id'
CONNECT BY PRIOR id = parent_id
AND statement_id = '$statement_id'";
$stmt2 = ociparse($this->db_connect_id, $sql);
ociexecute($stmt2);
$row = array();
while (ocifetchinto($stmt2, $row, OCI_ASSOC + OCI_RETURN_NULLS))
{
$html_table = $this->sql_report('add_select_row', $query, $html_table, $row);
}
ocifreestatement($stmt2);
// Remove the plan we just made, we delete them on request anyway
$stmt2 = ociparse($this->db_connect_id, "DELETE FROM $table WHERE statement_id='$statement_id'");
ociexecute($stmt2);
ocifreestatement($stmt2);
}
ocifreestatement($stmt);
if ($html_table)
{
$this->html_hold .= '</table>';
}
break;
case 'fromcache':

View file

@ -264,7 +264,7 @@ class dbal_postgres extends dbal
* Seek to given row number
* rownum is zero-based
*/
function sql_rowseek($rownum, $query_id = false)
function sql_rowseek($rownum, &$query_id)
{
global $cache;
@ -345,6 +345,15 @@ class dbal_postgres extends dbal
return @pg_escape_string($msg);
}
/**
* Build LIKE expression
* @access private
*/
function _sql_like_expression($expression)
{
return $expression;
}
/**
* return sql error array
* @access private

View file

@ -188,7 +188,7 @@ class dbal_sqlite extends dbal
* Seek to given row number
* rownum is zero-based
*/
function sql_rowseek($rownum, $query_id = false)
function sql_rowseek($rownum, &$query_id)
{
global $cache;
@ -241,6 +241,22 @@ class dbal_sqlite extends dbal
return @sqlite_escape_string($msg);
}
/**
* Correctly adjust LIKE expression for special characters
* For SQLite an underscore is a not-known character... this may change with SQLite3
*/
function sql_like_expression($expression)
{
// Unlike LIKE, GLOB is case sensitive (unfortunatly). SQLite users need to live with it!
// We only catch * and ? here, not the character map possible on file globbing.
$expression = str_replace(array(chr(0) . '_', chr(0) . '%'), array(chr(0) . '?', chr(0) . '*'), $expression);
$expression = str_replace(array('?', '*'), array("\?", "\*"), $expression);
$expression = str_replace(array(chr(0) . "\?", chr(0) . "\*"), array('?', '*'), $expression);
return 'GLOB \'' . $this->sql_escape($expression) . '\'';
}
/**
* return sql error array
* @access private

View file

@ -78,6 +78,14 @@ function request_var($var_name, $default, $multibyte = false, $cookie = false)
list($key_type, $type) = each($default);
$type = gettype($type);
$key_type = gettype($key_type);
if ($type == 'array')
{
reset($default);
list($sub_key_type, $sub_type) = each(current($default));
$sub_type = gettype($sub_type);
$sub_type = ($sub_type == 'array') ? 'NULL' : $sub_type;
$sub_key_type = gettype($sub_key_type);
}
}
if (is_array($var))
@ -87,18 +95,25 @@ function request_var($var_name, $default, $multibyte = false, $cookie = false)
foreach ($_var as $k => $v)
{
if (is_array($v))
set_var($k, $k, $key_type);
if ($type == 'array' && is_array($v))
{
foreach ($v as $_k => $_v)
{
set_var($k, $k, $key_type);
set_var($_k, $_k, $key_type);
set_var($var[$k][$_k], $_v, $type, $multibyte);
if (is_array($_v))
{
$_v = null;
}
set_var($_k, $_k, $sub_key_type);
set_var($var[$k][$_k], $_v, $sub_type, $multibyte);
}
}
else
{
set_var($k, $k, $key_type);
if ($type == 'array' || is_array($v))
{
$v = null;
}
set_var($var[$k], $v, $type, $multibyte);
}
}
@ -1257,7 +1272,7 @@ function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_ti
WHERE t.forum_id = ' . $forum_id . '
AND t.topic_last_post_time > ' . $mark_time_forum . '
AND t.topic_moved_id = 0
AND tt.topic_id IS NULL
AND (tt.topic_id IS NULL OR tt.mark_time < t.topic_last_post_time)
GROUP BY t.forum_id';
$result = $db->sql_query_limit($sql, 1);
$row = $db->sql_fetchrow($result);
@ -1571,11 +1586,30 @@ function append_sid($url, $params = false, $is_amp = true, $session_id = false)
// Appending custom url parameter?
$append_url = (!empty($_EXTRA_URL)) ? implode($amp_delim, $_EXTRA_URL) : '';
$anchor = '';
if (strpos($url, '#') !== false)
{
list($url, $anchor) = explode('#', $url, 2);
$anchor = '#' . $anchor;
}
else if (!is_array($params) && strpos($params, '#') !== false)
{
list($params, $anchor) = explode('#', $params, 2);
$anchor = '#' . $anchor;
}
// Use the short variant if possible ;)
if ($params === false)
{
// Append session id
return (!$session_id) ? $url . (($append_url) ? $url_delim . $append_url : '') : $url . (($append_url) ? $url_delim . $append_url . $amp_delim : $url_delim) . 'sid=' . $session_id;
if (!$session_id)
{
return $url . (($append_url) ? $url_delim . $append_url : '') . $anchor;
}
else
{
return $url . (($append_url) ? $url_delim . $append_url . $amp_delim : $url_delim) . 'sid=' . $session_id . $anchor;
}
}
// Build string if parameters are specified as array
@ -1590,6 +1624,12 @@ function append_sid($url, $params = false, $is_amp = true, $session_id = false)
continue;
}
if ($key == '#')
{
$anchor = '#' . $item;
continue;
}
$output[] = $key . '=' . $item;
}
@ -1598,7 +1638,7 @@ function append_sid($url, $params = false, $is_amp = true, $session_id = false)
// Append session id and parameters (even if they are empty)
// If parameters are empty, the developer can still append his/her parameters without caring about the delimiter
return $url . (($append_url) ? $url_delim . $append_url . $amp_delim : $url_delim) . $params . ((!$session_id) ? '' : $amp_delim . 'sid=' . $session_id);
return $url . (($append_url) ? $url_delim . $append_url . $amp_delim : $url_delim) . $params . ((!$session_id) ? '' : $amp_delim . 'sid=' . $session_id) . $anchor;
}
/**
@ -2090,24 +2130,6 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
// append/replace SID (may change during the session for AOL users)
$redirect = reapply_sid($redirect);
// Make sure the user is able to hide his session
if (!$viewonline)
{
$check_auth = new auth();
$check_auth->acl($user->data);
// Reset online status if not allowed to hide the session...
if (!$check_auth->acl_get('u_hideonline'))
{
$sql = 'UPDATE ' . SESSIONS_TABLE . '
SET session_viewonline = 1
WHERE session_user_id = ' . $user->data['user_id'];
$db->sql_query($sql);
}
unset($check_auth);
}
// Special case... the user is effectively banned, but we allow founders to login
if (defined('IN_CHECK_BAN') && $result['user_row']['user_type'] != USER_FOUNDER)
{
@ -2613,6 +2635,7 @@ function make_clickable_callback($type, $whitespace, $url, $relative_url, $class
// make sure no HTML entities were matched
$chars = array('<', '>', '"');
$split = false;
foreach ($chars as $char)
{
$next_split = strpos($url, $char);
@ -2668,6 +2691,7 @@ function make_clickable_callback($type, $whitespace, $url, $relative_url, $class
{
$url = substr($url, 0, -1);
}
break;
}
switch ($type)
@ -2692,8 +2716,8 @@ function make_clickable_callback($type, $whitespace, $url, $relative_url, $class
case MAGIC_URL_EMAIL:
$tag = 'e';
$url = 'mailto:' . $url;
$text = (strlen($url) > 55) ? substr($url, 0, 39) . ' ... ' . substr($url, -10) : $url;
$url = 'mailto:' . $url;
break;
}
@ -2734,19 +2758,19 @@ function make_clickable($text, $server_url = false, $class = 'postlink')
// Be sure to not let the matches cross over. ;)
// relative urls for this board
$magic_url_match[] = '#(^|[\n\t (>\]])(' . preg_quote($server_url, '#') . ')/(' . get_preg_expression('relative_url_inline') . ')#ie';
$magic_url_match[] = '#(^|[\n\t (>])(' . preg_quote($server_url, '#') . ')/(' . get_preg_expression('relative_url_inline') . ')#ie';
$magic_url_replace[] = "make_clickable_callback(MAGIC_URL_LOCAL, '\$1', '\$2', '\$3', '$local_class')";
// matches a xxxx://aaaaa.bbb.cccc. ...
$magic_url_match[] = '#(^|[\n\t (>\]])(' . get_preg_expression('url_inline') . ')#ie';
$magic_url_match[] = '#(^|[\n\t (>])(' . get_preg_expression('url_inline') . ')#ie';
$magic_url_replace[] = "make_clickable_callback(MAGIC_URL_FULL, '\$1', '\$2', '', '$class')";
// matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing
$magic_url_match[] = '#(^|[\n\t (>\]])(' . get_preg_expression('www_url_inline') . ')#ie';
$magic_url_match[] = '#(^|[\n\t (>])(' . get_preg_expression('www_url_inline') . ')#ie';
$magic_url_replace[] = "make_clickable_callback(MAGIC_URL_WWW, '\$1', '\$2', '', '$class')";
// matches an email@domain type address at the start of a line, or after a space or after what might be a BBCode.
$magic_url_match[] = '/(^|[\n\t (>\]])(' . get_preg_expression('email') . ')/ie';
$magic_url_match[] = '/(^|[\n\t (>])(' . get_preg_expression('email') . ')/ie';
$magic_url_replace[] = "make_clickable_callback(MAGIC_URL_EMAIL, '\$1', '\$2', '', '')";
}
@ -2788,7 +2812,7 @@ function smiley_text($text, $force_option = false)
}
else
{
return str_replace('<img src="{SMILIES_PATH}', '<img src="' . $phpbb_root_path . $config['smilies_path'], $text);
return preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/(.*?) \/><!\-\- s\1 \-\->#', '<img src="' . $phpbb_root_path . $config['smilies_path'] . '/\2 />', $text);
}
}
@ -3853,14 +3877,7 @@ function page_header($page_title = '', $display_online_list = true)
{
$f = request_var('f', 0);
// Do not change this (it is defined as _f_={forum_id}x within session.php)
$reading_sql = " AND s.session_page LIKE '%\_f\_={$f}x%'";
// Specify escape character for MSSQL
if ($db->sql_layer == 'mssql' || $db->sql_layer == 'mssql_odbc')
{
$reading_sql .= " ESCAPE '\\' ";
}
$reading_sql = ' AND s.session_page ' . $db->sql_like_expression("{$db->any_char}_f_={$f}x{$db->any_char}");
}
// Get number of online guests
@ -3917,7 +3934,7 @@ function page_header($page_title = '', $display_online_list = true)
$user_colour = '';
}
if ($row['user_allow_viewonline'] && $row['session_viewonline'])
if ($row['session_viewonline'])
{
$user_online_link = $row['username'];
$logged_visible_online++;
@ -3928,7 +3945,7 @@ function page_header($page_title = '', $display_online_list = true)
$logged_hidden_online++;
}
if (($row['user_allow_viewonline'] && $row['session_viewonline']) || $auth->acl_get('u_viewonline'))
if (($row['session_viewonline']) || $auth->acl_get('u_viewonline'))
{
if ($row['user_type'] <> USER_IGNORE)
{

View file

@ -257,11 +257,31 @@ function get_forum_list($acl_list = 'f_list', $id_only = true, $postable_only =
$result = $db->sql_query($sql, $expire_time);
$forum_rows = array();
$right = $padding = 0;
$padding_store = array('0' => 0);
while ($row = $db->sql_fetchrow($result))
{
if ($row['left_id'] < $right)
{
$padding++;
$padding_store[$row['parent_id']] = $padding;
}
else if ($row['left_id'] > $right + 1)
{
// Ok, if the $padding_store for this parent is empty there is something wrong. For now we will skip over it.
// @todo digging deep to find out "how" this can happen.
$padding = (isset($padding_store[$row['parent_id']])) ? $padding_store[$row['parent_id']] : $padding;
}
$right = $row['right_id'];
$row['padding'] = $padding;
$forum_rows[] = $row;
}
$db->sql_freeresult($result);
unset($padding_store);
}
$rowset = array();
@ -559,15 +579,33 @@ function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_s
}
unset($table_ary);
$sql = 'DELETE FROM ' . TOPICS_TABLE . '
$moved_topic_ids = array();
// update the other forums
$sql = 'SELECT topic_id, forum_id
FROM ' . TOPICS_TABLE . '
WHERE ' . $db->sql_in_set('topic_moved_id', $topic_ids);
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$forum_ids[] = $row['forum_id'];
$moved_topic_ids[] = $row['topic_id'];
}
$db->sql_freeresult($result);
if (sizeof($moved_topic_ids))
{
$sql = 'DELETE FROM ' . TOPICS_TABLE . '
WHERE ' . $db->sql_in_set('topic_id', $moved_topic_ids);
$db->sql_query($sql);
}
$db->sql_transaction('commit');
if ($auto_sync)
{
sync('forum', 'forum_id', $forum_ids, true, true);
sync('forum', 'forum_id', array_unique($forum_ids), true, true);
sync('topic_reported', $where_type, $where_ids);
}
@ -658,9 +696,15 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
{
foreach ($post_counts as $poster_id => $substract)
{
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_posts = 0
WHERE user_id = ' . $poster_id . '
AND user_posts < ' . $substract;
$db->sql_query($sql);
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_posts = user_posts - ' . $substract . '
WHERE user_id = ' . $poster_id;
WHERE user_id = ' . $poster_id . '
AND user_posts >= ' . $substract;
$db->sql_query($sql);
}
}
@ -2162,8 +2206,7 @@ function cache_moderators()
AND a.group_id = ug.group_id
AND ' . $db->sql_in_set('ug.user_id', $ug_id_ary) . "
AND ug.user_pending = 0
AND o.auth_option LIKE 'm\_%'" .
(($db->sql_layer == 'mssql' || $db->sql_layer == 'mssql_odbc') ? " ESCAPE '\\'" : ''),
AND o.auth_option " . $db->sql_like_expression('m_' . $db->any_char),
));
$result = $db->sql_query($sql);
@ -2800,6 +2843,14 @@ function get_database_size()
$database_size = $row['size'];
}
break;
case 'oracle':
$sql = 'SELECT SUM(bytes) as dbsize
FROM user_segments';
$result = $db->sql_query($sql);
$database_size = ($row = $db->sql_fetchrow($result)) ? $row['dbsize'] : false;
$db->sql_freeresult($result);
break;
}
if ($database_size !== false)

View file

@ -1137,21 +1137,12 @@ function user_group_auth($group, $select_query, $use_src_db)
}
else
{
$result = $src_db->sql_query(str_replace('{' . strtoupper($group) . '}', $group_id . ', 0', $select_query));
$result = $src_db->sql_query(str_replace('{' . strtoupper($group) . '}', $group_id . ' ', $select_query));
while ($row = $src_db->sql_fetchrow($result))
{
// make sure it's exactly 3 ints that were returned
$data = array();
reset($row);
for ($i = 0; $i < 3; $i++)
{
$data[] = (int) current($row);
next($row);
}
// this might become quite a lot of INSERTS unfortunately
$sql = 'INSERT INTO ' . USER_GROUP_TABLE . ' (user_id, group_id, user_pending)
VALUES (' . implode(', ', $data) . ')';
$sql = 'INSERT INTO ' . USER_GROUP_TABLE . " (user_id, group_id, user_pending)
VALUES ({$row['user_id']}, $group_id, 0)";
$db->sql_query($sql);
}
$src_db->sql_freeresult($result);
@ -1235,7 +1226,7 @@ function get_config()
if (!sizeof($convert_config))
{
$convert->p_master->error($lang['CONV_ERROR_CONFIG_EMPTY'], __LINE__, __FILE__);
$convert->p_master->error($user->lang['CONV_ERROR_CONFIG_EMPTY'], __LINE__, __FILE__);
}
return $convert_config;
@ -1484,7 +1475,7 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting = ACL_NO)
{
$sql = 'SELECT role_id
FROM ' . ACL_ROLES_TABLE . "
WHERE role_description = 'ROLE_DESCRIPTION_" . $db->sql_escape($acl_list) . "'";
WHERE role_name = 'ROLE_" . $db->sql_escape($acl_list) . "'";
$result = $db->sql_query_limit($sql, 1);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
@ -1676,12 +1667,12 @@ function add_default_groups()
global $db;
$default_groups = array(
'GUESTS' => array('', 0),
'REGISTERED' => array('', 0),
'REGISTERED_COPPA' => array('', 0),
'GLOBAL_MODERATORS' => array('00AA00', 1),
'ADMINISTRATORS' => array('AA0000', 1),
'BOTS' => array('9E8DA7', 0)
'GUESTS' => array('', 0, 0),
'REGISTERED' => array('', 0, 0),
'REGISTERED_COPPA' => array('', 0, 0),
'GLOBAL_MODERATORS' => array('00AA00', 1, 0),
'ADMINISTRATORS' => array('AA0000', 1, 1),
'BOTS' => array('9E8DA7', 0, 0)
);
$sql = 'SELECT *
@ -1707,6 +1698,7 @@ function add_default_groups()
'group_type' => GROUP_SPECIAL,
'group_colour' => $data[0],
'group_legend' => $data[1],
'group_founder_manage' => $data[2]
);
}
@ -1716,6 +1708,27 @@ function add_default_groups()
}
}
/**
* Sync post count. We might need to do this in batches.
*/
function sync_post_count($offset, $limit)
{
global $db;
$sql = 'SELECT COUNT(post_id) AS num_posts, poster_id
FROM ' . POSTS_TABLE . '
WHERE post_postcount = 1
GROUP BY poster_id
ORDER BY poster_id';
$result = $db->sql_query_limit($sql, $limit, $offset);
while ($row = $db->sql_fetchrow($result))
{
$db->sql_query('UPDATE ' . USERS_TABLE . " SET user_posts = {$row['num_posts']} WHERE user_id = {$row['poster_id']}");
}
$db->sql_freeresult($result);
}
/**
* Add the search bots into the database
* This code should be used in execute_last if the source database did not have bots
@ -2076,7 +2089,7 @@ function fix_empty_primary_groups()
*/
function remove_invalid_users()
{
global $convert, $db;
global $convert, $db, $phpEx, $phpbb_root_path;
// username_clean is UNIQUE
$sql = 'SELECT user_id
@ -2393,4 +2406,11 @@ function relative_base($path, $is_relative = true, $line = false, $file = false)
return $convert->options['forum_path'] . '/' . $path;
}
function get_smiley_display()
{
static $smiley_count = 0;
$smiley_count++;
return ($smiley_count < 50) ? 1 : 0;
}
?>

View file

@ -420,7 +420,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
}
$template->assign_vars(array(
'U_MARK_FORUMS' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $root_data['forum_id'] . '&amp;mark=forums'),
'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $root_data['forum_id'] . '&amp;mark=forums') : '',
'S_HAS_SUBFORUM' => ($visible_forums) ? true : false,
'L_SUBFORUM' => ($visible_forums == 1) ? $user->lang['SUBFORUM'] : $user->lang['SUBFORUMS'],
'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'))
@ -476,6 +476,8 @@ function generate_forum_nav(&$forum_data)
$forum_parents = get_forum_parents($forum_data);
// Build navigation links
if (!empty($forum_parents))
{
foreach ($forum_parents as $parent_forum_id => $parent_data)
{
list($parent_name, $parent_type) = array_values($parent_data);
@ -495,6 +497,7 @@ function generate_forum_nav(&$forum_data)
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $parent_forum_id))
);
}
}
$template->assign_block_vars('navlinks', array(
'S_IS_CAT' => ($forum_data['forum_type'] == FORUM_CAT) ? true : false,
@ -1057,6 +1060,7 @@ function watch_topic_forum($mode, &$s_watching, &$s_watching_img, $user_id, $for
{
$s_watching['link'] = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&amp;" . (($is_watching) ? 'unwatch' : 'watch') . "=$mode&amp;start=$start");
$s_watching['title'] = $user->lang[(($is_watching) ? 'STOP' : 'START') . '_WATCHING_' . strtoupper($mode)];
$s_watching['is_watching'] = $is_watching;
}
return;

View file

@ -29,6 +29,7 @@ function can_load_dll($dll)
*/
function get_available_dbms($dbms = false, $return_unavailable = false, $only_20x_options = false)
{
global $lang;
$available_dbms = array(
'firebird' => array(
'LABEL' => 'FireBird',
@ -172,12 +173,14 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20
*/
function dbms_select($default = '', $only_20x_options = false)
{
global $lang;
$available_dbms = get_available_dbms(false, false, $only_20x_options);
$dbms_options = '';
foreach ($available_dbms as $dbms_name => $details)
{
$selected = ($dbms_name == $default) ? ' selected="selected"' : '';
$dbms_options .= '<option value="' . $dbms_name . '"' . $selected .'>' . $details['LABEL'] . '</option>';
$dbms_options .= '<option value="' . $dbms_name . '"' . $selected .'>' . $lang['DLL_' . strtoupper($dbms_name)] . '</option>';
}
return $dbms_options;
}
@ -280,7 +283,7 @@ function connect_check_db($error_connect, &$error, $dbms, $table_prefix, $dbhost
{
case 'mysql':
case 'mysqli':
if (strpos($table_prefix, '-') !== false)
if (strpos($table_prefix, '-') !== false || strpos($table_prefix, '.') !== false)
{
$error[] = $lang['INST_ERR_PREFIX_INVALID'];
return false;

File diff suppressed because it is too large Load diff

View file

@ -458,7 +458,7 @@ class messenger
if (!$use_queue)
{
include_once($phpbb_root_path . 'includes/functions_jabber.' . $phpEx);
$this->jabber = new jabber($config['jab_host'], $config['jab_port'], $config['jab_username'], $config['jab_password'], $config['jab_resource']);
$this->jabber = new jabber($config['jab_host'], $config['jab_port'], $config['jab_username'], $config['jab_password'], $config['jab_use_ssl']);
if (!$this->jabber->connect())
{
@ -466,19 +466,17 @@ class messenger
return false;
}
if (!$this->jabber->send_auth())
if (!$this->jabber->login())
{
$this->error('JABBER', 'Could not authorise on Jabber server<br />' . $this->jabber->get_log());
return false;
}
$this->jabber->send_presence(NULL, NULL, 'online');
foreach ($addresses as $address)
{
$this->jabber->send_message($address, 'normal', NULL, array('body' => $this->msg, 'subject' => $this->subject));
$this->jabber->send_message($address, $this->msg, $this->subject);
}
sleep(1);
$this->jabber->disconnect();
}
else
@ -592,7 +590,7 @@ class queue
}
include_once($phpbb_root_path . 'includes/functions_jabber.'.$phpEx);
$this->jabber = new jabber($config['jab_host'], $config['jab_port'], $config['jab_username'], $config['jab_password'], $config['jab_resource']);
$this->jabber = new jabber($config['jab_host'], $config['jab_port'], $config['jab_username'], $config['jab_password'], $config['jab_use_ssl']);
if (!$this->jabber->connect())
{
@ -600,12 +598,11 @@ class queue
continue 2;
}
if (!$this->jabber->send_auth())
if (!$this->jabber->login())
{
messenger::error('JABBER', 'Could not authorise on Jabber server');
continue 2;
}
$this->jabber->send_presence(NULL, NULL, 'online');
break;
@ -647,7 +644,7 @@ class queue
case 'jabber':
foreach ($addresses as $address)
{
if ($this->jabber->send_message($address, 'normal', NULL, array('body' => $msg, 'subject' => $subject)) === false)
if ($this->jabber->send_message($address, $msg, $subject) === false)
{
messenger::error('JABBER', $this->jabber->get_log());
continue 3;
@ -669,7 +666,6 @@ class queue
case 'jabber':
// Hang about a couple of secs to ensure the messages are
// handled, then disconnect
sleep(1);
$this->jabber->disconnect();
break;
}

View file

@ -1635,7 +1635,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
'topic_approved' => (!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id'])) ? 0 : 1,
'topic_title' => $subject,
'topic_first_poster_name' => (!$user->data['is_registered'] && $username) ? $username : (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : ''),
'topic_first_poster_colour' => (($user->data['user_id'] != ANONYMOUS) ? $user->data['user_colour'] : ''),
'topic_first_poster_colour' => $user->data['user_colour'],
'topic_type' => $topic_type,
'topic_time_limit' => ($topic_type == POST_STICKY || $topic_type == POST_ANNOUNCE) ? ($data['topic_time_limit'] * 86400) : 0,
'topic_attachment' => (!empty($data['attachment_data'])) ? 1 : 0,
@ -1774,7 +1774,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
'topic_last_post_time' => $current_time,
'topic_last_poster_id' => (int) $user->data['user_id'],
'topic_last_poster_name' => (!$user->data['is_registered'] && $username) ? $username : (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : ''),
'topic_last_poster_colour' => (($user->data['user_id'] != ANONYMOUS) ? $user->data['user_colour'] : ''),
'topic_last_poster_colour' => $user->data['user_colour'],
);
}
@ -2012,7 +2012,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_time = ' . $current_time;
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_poster_id = ' . (int) $user->data['user_id'];
$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = '" . $db->sql_escape((!$user->data['is_registered'] && $username) ? $username : (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : '')) . "'";
$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = '" . (($user->data['user_id'] != ANONYMOUS) ? $db->sql_escape($user->data['user_colour']) : '') . "'";
$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = '" . $db->sql_escape($user->data['user_colour']) . "'";
}
else if ($post_mode == 'edit_last_post')
{

View file

@ -504,6 +504,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
{
// It is allowed to execute actions more than once, except placing messages into folder
$folder_action = false;
$message_removed = false;
foreach ($msg_ary as $pos => $rule_ary)
{
@ -517,9 +518,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
case ACTION_PLACE_INTO_FOLDER:
// Folder actions have precedence, so we will remove any other ones
$folder_action = true;
$_folder_id = (int) $rule_ary['folder_id'];
$move_into_folder = array();
$move_into_folder[$_folder_id][] = $msg_id;
$move_into_folder[(int) $rule_ary['folder_id']][] = $msg_id;
$num_new++;
break;
@ -528,15 +527,11 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
{
$unread_ids[] = $msg_id;
}
if (!$folder_action)
{
$move_into_folder[PRIVMSGS_INBOX][] = $msg_id;
}
break;
case ACTION_DELETE_MESSAGE:
$delete_ids[] = $msg_id;
$message_removed = true;
break;
case ACTION_MARK_AS_IMPORTANT:
@ -544,14 +539,16 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
{
$important_ids[] = $msg_id;
}
if (!$folder_action)
{
$move_into_folder[PRIVMSGS_INBOX][] = $msg_id;
}
break;
}
}
// We place this here because it could happen that the messages are doubled if a rule marks a message and then moves it into a specific
// folder. Here we simply move the message into the INBOX if it gets not removed and also not put into a custom folder.
if (!$folder_action && !$message_removed)
{
$move_into_folder[PRIVMSGS_INBOX][] = $msg_id;
}
}
// $num_new += sizeof(array_unique($delete_ids));
@ -875,7 +872,7 @@ function update_unread_status($unread, $msg_id, $user_id, $folder_id)
*/
function handle_mark_actions($user_id, $mark_action)
{
global $db, $user, $_POST, $phpbb_root_path, $phpEx;
global $db, $user, $phpbb_root_path, $phpEx;
$msg_ids = request_var('marked_msg_id', array(0));
$cur_folder_id = request_var('cur_folder_id', PRIVMSGS_NO_BOX);

View file

@ -382,7 +382,9 @@ class ftp extends transfer
}
else
{
$chmod_cmd = 'CHMOD ' . $perms . ' ' . $file;
// Unfortunatly CHMOD is not expecting an octal value...
// We need to transform the integer (which was an octal) to an octal representation (to get the int) and then pass as is. ;)
$chmod_cmd = 'CHMOD ' . base_convert($perms, 10, 8) . ' ' . $file;
$err = $this->_site($chmod_cmd);
}
@ -605,7 +607,9 @@ class ftp_fsock extends transfer
*/
function _chmod($file, $perms)
{
return $this->_send_command('SITE CHMOD', $perms . ' ' . $file);
// Unfortunatly CHMOD is not expecting an octal value...
// We need to transform the integer (which was an octal) to an octal representation (to get the int) and then pass as is. ;)
return $this->_send_command('SITE CHMOD', base_convert($perms, 10, 8) . ' ' . $file);
}
/**

View file

@ -143,9 +143,16 @@ function user_add($user_row, $cp_data = false)
return false;
}
$username_clean = utf8_clean_string($user_row['username']);
if (empty($username_clean))
{
return false;
}
$sql_ary = array(
'username' => $user_row['username'],
'username_clean' => utf8_clean_string($user_row['username']),
'username_clean' => $username_clean,
'user_password' => (isset($user_row['user_password'])) ? $user_row['user_password'] : '',
'user_pass_convert' => 0,
'user_email' => strtolower($user_row['user_email']),
@ -1262,7 +1269,7 @@ function validate_username($username, $allowed_username = false)
}
// ... fast checks first.
if (strpos($username, '&quot;') !== false || strpos($username, '"') !== false)
if (strpos($username, '&quot;') !== false || strpos($username, '"') !== false || empty($clean_username))
{
return 'INVALID_CHARS';
}
@ -1556,12 +1563,212 @@ function validate_email($email, $allowed_email = false)
return false;
}
/**
* Validate jabber address
* Taken from the jabber class within flyspray (see author notes)
*
* @author flyspray.org
*/
function validate_jabber($jid)
{
if (!$jid)
{
return false;
}
$seperator_pos = strpos($jid, '@');
if ($seperator_pos === false)
{
return 'WRONG_DATA';
}
$username = substr($jid, 0, $seperator_pos);
$realm = substr($jid, $seperator_pos + 1);
if (strlen($username) == 0 || strlen($realm) < 3)
{
return 'WRONG_DATA';
}
$arr = explode('.', $realm);
if (sizeof($arr) == 0)
{
return 'WRONG_DATA';
}
foreach ($arr as $part)
{
if (substr($part, 0, 1) == '-' || substr($part, -1, 1) == '-')
{
return 'WRONG_DATA';
}
if (!preg_match("@^[a-zA-Z0-9-.]+$@", $part))
{
return 'WRONG_DATA';
}
}
$boundary = array(array(0, 127), array(192, 223), array(224, 239), array(240, 247), array(248, 251), array(252, 253));
// Prohibited Characters RFC3454 + RFC3920
$prohibited = array(
// Table C.1.1
array(0x0020, 0x0020), // SPACE
// Table C.1.2
array(0x00A0, 0x00A0), // NO-BREAK SPACE
array(0x1680, 0x1680), // OGHAM SPACE MARK
array(0x2000, 0x2001), // EN QUAD
array(0x2001, 0x2001), // EM QUAD
array(0x2002, 0x2002), // EN SPACE
array(0x2003, 0x2003), // EM SPACE
array(0x2004, 0x2004), // THREE-PER-EM SPACE
array(0x2005, 0x2005), // FOUR-PER-EM SPACE
array(0x2006, 0x2006), // SIX-PER-EM SPACE
array(0x2007, 0x2007), // FIGURE SPACE
array(0x2008, 0x2008), // PUNCTUATION SPACE
array(0x2009, 0x2009), // THIN SPACE
array(0x200A, 0x200A), // HAIR SPACE
array(0x200B, 0x200B), // ZERO WIDTH SPACE
array(0x202F, 0x202F), // NARROW NO-BREAK SPACE
array(0x205F, 0x205F), // MEDIUM MATHEMATICAL SPACE
array(0x3000, 0x3000), // IDEOGRAPHIC SPACE
// Table C.2.1
array(0x0000, 0x001F), // [CONTROL CHARACTERS]
array(0x007F, 0x007F), // DELETE
// Table C.2.2
array(0x0080, 0x009F), // [CONTROL CHARACTERS]
array(0x06DD, 0x06DD), // ARABIC END OF AYAH
array(0x070F, 0x070F), // SYRIAC ABBREVIATION MARK
array(0x180E, 0x180E), // MONGOLIAN VOWEL SEPARATOR
array(0x200C, 0x200C), // ZERO WIDTH NON-JOINER
array(0x200D, 0x200D), // ZERO WIDTH JOINER
array(0x2028, 0x2028), // LINE SEPARATOR
array(0x2029, 0x2029), // PARAGRAPH SEPARATOR
array(0x2060, 0x2060), // WORD JOINER
array(0x2061, 0x2061), // FUNCTION APPLICATION
array(0x2062, 0x2062), // INVISIBLE TIMES
array(0x2063, 0x2063), // INVISIBLE SEPARATOR
array(0x206A, 0x206F), // [CONTROL CHARACTERS]
array(0xFEFF, 0xFEFF), // ZERO WIDTH NO-BREAK SPACE
array(0xFFF9, 0xFFFC), // [CONTROL CHARACTERS]
array(0x1D173, 0x1D17A), // [MUSICAL CONTROL CHARACTERS]
// Table C.3
array(0xE000, 0xF8FF), // [PRIVATE USE, PLANE 0]
array(0xF0000, 0xFFFFD), // [PRIVATE USE, PLANE 15]
array(0x100000, 0x10FFFD), // [PRIVATE USE, PLANE 16]
// Table C.4
array(0xFDD0, 0xFDEF), // [NONCHARACTER CODE POINTS]
array(0xFFFE, 0xFFFF), // [NONCHARACTER CODE POINTS]
array(0x1FFFE, 0x1FFFF), // [NONCHARACTER CODE POINTS]
array(0x2FFFE, 0x2FFFF), // [NONCHARACTER CODE POINTS]
array(0x3FFFE, 0x3FFFF), // [NONCHARACTER CODE POINTS]
array(0x4FFFE, 0x4FFFF), // [NONCHARACTER CODE POINTS]
array(0x5FFFE, 0x5FFFF), // [NONCHARACTER CODE POINTS]
array(0x6FFFE, 0x6FFFF), // [NONCHARACTER CODE POINTS]
array(0x7FFFE, 0x7FFFF), // [NONCHARACTER CODE POINTS]
array(0x8FFFE, 0x8FFFF), // [NONCHARACTER CODE POINTS]
array(0x9FFFE, 0x9FFFF), // [NONCHARACTER CODE POINTS]
array(0xAFFFE, 0xAFFFF), // [NONCHARACTER CODE POINTS]
array(0xBFFFE, 0xBFFFF), // [NONCHARACTER CODE POINTS]
array(0xCFFFE, 0xCFFFF), // [NONCHARACTER CODE POINTS]
array(0xDFFFE, 0xDFFFF), // [NONCHARACTER CODE POINTS]
array(0xEFFFE, 0xEFFFF), // [NONCHARACTER CODE POINTS]
array(0xFFFFE, 0xFFFFF), // [NONCHARACTER CODE POINTS]
array(0x10FFFE, 0x10FFFF), // [NONCHARACTER CODE POINTS]
// Table C.5
array(0xD800, 0xDFFF), // [SURROGATE CODES]
// Table C.6
array(0xFFF9, 0xFFF9), // INTERLINEAR ANNOTATION ANCHOR
array(0xFFFA, 0xFFFA), // INTERLINEAR ANNOTATION SEPARATOR
array(0xFFFB, 0xFFFB), // INTERLINEAR ANNOTATION TERMINATOR
array(0xFFFC, 0xFFFC), // OBJECT REPLACEMENT CHARACTER
array(0xFFFD, 0xFFFD), // REPLACEMENT CHARACTER
// Table C.7
array(0x2FF0, 0x2FFB), // [IDEOGRAPHIC DESCRIPTION CHARACTERS]
// Table C.8
array(0x0340, 0x0340), // COMBINING GRAVE TONE MARK
array(0x0341, 0x0341), // COMBINING ACUTE TONE MARK
array(0x200E, 0x200E), // LEFT-TO-RIGHT MARK
array(0x200F, 0x200F), // RIGHT-TO-LEFT MARK
array(0x202A, 0x202A), // LEFT-TO-RIGHT EMBEDDING
array(0x202B, 0x202B), // RIGHT-TO-LEFT EMBEDDING
array(0x202C, 0x202C), // POP DIRECTIONAL FORMATTING
array(0x202D, 0x202D), // LEFT-TO-RIGHT OVERRIDE
array(0x202E, 0x202E), // RIGHT-TO-LEFT OVERRIDE
array(0x206A, 0x206A), // INHIBIT SYMMETRIC SWAPPING
array(0x206B, 0x206B), // ACTIVATE SYMMETRIC SWAPPING
array(0x206C, 0x206C), // INHIBIT ARABIC FORM SHAPING
array(0x206D, 0x206D), // ACTIVATE ARABIC FORM SHAPING
array(0x206E, 0x206E), // NATIONAL DIGIT SHAPES
array(0x206F, 0x206F), // NOMINAL DIGIT SHAPES
// Table C.9
array(0xE0001, 0xE0001), // LANGUAGE TAG
array(0xE0020, 0xE007F), // [TAGGING CHARACTERS]
// RFC3920
array(0x22, 0x22), // "
array(0x26, 0x26), // &
array(0x27, 0x27), // '
array(0x2F, 0x2F), // /
array(0x3A, 0x3A), // :
array(0x3C, 0x3C), // <
array(0x3E, 0x3E), // >
array(0x40, 0x40) // @
);
$pos = 0;
$result = true;
while ($pos < strlen($username))
{
$len = $uni = 0;
for ($i = 0; $i <= 5; $i++)
{
if (ord($username[$pos]) >= $boundary[$i][0] && ord($username[$pos]) <= $boundary[$i][1])
{
$len = $i + 1;
$uni = (ord($username[$pos]) - $boundary[$i][0]) * pow(2, $i * 6);
for ($k = 1; $k < $len; $k++)
{
$uni += (ord($username[$pos + $k]) - 128) * pow(2, ($i - $k) * 6);
}
break;
}
}
if ($len == 0)
{
return 'WRONG_DATA';
}
foreach ($prohibited as $pval)
{
if ($uni >= $pval[0] && $uni <= $pval[1])
{
$result = false;
break 2;
}
}
$pos = $pos + $len;
}
if (!$result)
{
return 'WRONG_DATA';
}
return false;
}
/**
* Remove avatar
*/
function avatar_delete($mode, $row)
function avatar_delete($mode, $row, $clean_db = false)
{
global $phpbb_root_path, $config, $db, $user;
@ -1574,6 +1781,10 @@ function avatar_delete($mode, $row)
}
}
if ($clean_db)
{
avatar_remove_db($row[$mode . '_avatar']);
}
$filename = get_avatar_filename($row[$mode . '_avatar']);
if (file_exists($phpbb_root_path . $config['avatar_path'] . '/' . $filename))
{
@ -1595,8 +1806,7 @@ function avatar_remote($data, &$error)
{
$data['remotelink'] = 'http://' . $data['remotelink'];
}
if (!preg_match('#^(http|https|ftp)://(.*?\.)*?[a-z0-9\-]+?\.[a-z]{2,4}:?([0-9]*?).*?\.(gif|jpg|jpeg|png)$#i', $data['remotelink']))
if (!preg_match('#^(http|https|ftp)://(?:(.*?\.)*?[a-z0-9\-]+?\.[a-z]{2,4}|(?:\d{1,3}\.){3,5}\d{1,3}):?([0-9]*?).*?\.(gif|jpg|jpeg|png)$#i', $data['remotelink']))
{
$error[] = $user->lang['AVATAR_URL_INVALID'];
return false;
@ -1962,7 +2172,7 @@ function avatar_process_user(&$error, $custom_userdata = false)
$sql_ary['user_avatar'] = '';
$sql_ary['user_avatar_type'] = $sql_ary['user_avatar_width'] = $sql_ary['user_avatar_height'] = 0;
}
elseif (!empty($userdata['user_avatar']))
else if (!empty($userdata['user_avatar']))
{
// Only update the dimensions
@ -2023,7 +2233,8 @@ function avatar_process_user(&$error, $custom_userdata = false)
$userdata = ($custom_userdata === false) ? $user->data : $custom_userdata;
// Delete old avatar if present
if ($userdata['user_avatar'] && empty($sql_ary['user_avatar']) && $userdata['user_avatar_type'] != AVATAR_GALLERY)
if ((!empty($userdata['user_avatar']) && empty($sql_ary['user_avatar']) && $userdata['user_avatar_type'] == AVATAR_UPLOAD)
|| ( !empty($userdata['user_avatar']) && !empty($sql_ary['user_avatar']) && $userdata['user_avatar_type'] == AVATAR_UPLOAD && $sql_ary['user_avatar_type'] != AVATAR_UPLOAD))
{
avatar_delete('user', $userdata);
}
@ -2215,6 +2426,22 @@ function group_correct_avatar($group_id, $old_entry)
}
}
/**
* Remove avatar also for users not having the group as default
*/
function avatar_remove_db($avatar_name)
{
global $config, $db;
$sql = 'UPDATE ' . USERS_TABLE . "
SET user_avatar = '',
user_avatar_type = 0
WHERE user_avatar = '" . $db->sql_escape($avatar_name) . '\'';
$db->sql_query($sql);
}
/**
* Group Delete
*/
@ -2702,12 +2929,6 @@ function group_set_user_default($group_id, $user_id_ary, $group_attributes = fal
continue;
}
// Do not update the rank if it is set to "user default"
if (strpos($attribute, 'group_rank') === 0 && !$group_attributes[$attribute])
{
continue;
}
settype($group_attributes[$attribute], $type);
$sql_ary[str_replace('group_', 'user_', $attribute)] = $group_attributes[$attribute];
}

View file

@ -63,7 +63,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
}
$selected_ids = '';
if (sizeof($post_id_list))
if (sizeof($post_id_list) && $action != 'merge_topics')
{
foreach ($post_id_list as $num => $post_id)
{
@ -318,6 +318,11 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id)
{
global $db, $template, $user, $phpEx, $phpbb_root_path, $auth;
if (!sizeof($topic_ids))
{
$template->assign_var('MESSAGE', $user->lang['NO_TOPIC_SELECTED']);
return;
}
if (!$to_topic_id)
{
$template->assign_var('MESSAGE', $user->lang['NO_FINAL_TOPIC_SELECTED']);

View file

@ -1146,7 +1146,7 @@ function mcp_fork_topic($topic_ids)
}
// Sync new topics, parent forums and board stats
sync('topic', 'topic_id', $new_topic_id_list, true);
sync('topic', 'topic_id', $new_topic_id_list);
$sync_sql = array();
@ -1162,7 +1162,7 @@ function mcp_fork_topic($topic_ids)
$db->sql_query($sql);
}
sync('forum', 'forum_id', $to_forum_id, true);
sync('forum', 'forum_id', $to_forum_id);
set_config('num_topics', $config['num_topics'] + sizeof($new_topic_id_list), true);
set_config('num_posts', $config['num_posts'] + $total_posts, true);

View file

@ -161,6 +161,7 @@ function mcp_post_details($id, $mode, $action)
$template->assign_vars(array(
'U_MCP_ACTION' => "$url&amp;i=main&amp;quickmod=1", // Use this for mode paramaters
'U_POST_ACTION' => "$url&amp;i=$id&amp;mode=post_details", // Use this for action parameters
'U_APPROVE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&amp;p=$post_id&amp;f={$post_info['forum_id']}"),
'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']),
'S_CAN_CHGPOSTER' => $auth->acl_get('m_chgposter', $post_info['forum_id']),
@ -403,7 +404,8 @@ function change_poster(&$post_info, $userdata)
{
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_posts = user_posts - 1
WHERE user_id = ' . $post_info['user_id'];
WHERE user_id = ' . $post_info['user_id'] .'
AND user_posts > 0';
$db->sql_query($sql);
$sql = 'UPDATE ' . USERS_TABLE . '

View file

@ -170,7 +170,7 @@ class mcp_queue
$template->assign_vars(array(
'S_MCP_QUEUE' => true,
'S_APPROVE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&amp;p=$post_id&amp;f=$forum_id"),
'U_APPROVE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&amp;p=$post_id&amp;f=$forum_id"),
'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']),
'S_POST_REPORTED' => $post_info['post_reported'],
'S_POST_UNAPPROVED' => !$post_info['post_approved'],
@ -274,7 +274,7 @@ class mcp_queue
$forum_options = '<option value="0"' . (($forum_id == 0) ? ' selected="selected"' : '') . '>' . $user->lang['ALL_FORUMS'] . '</option>';
foreach ($forum_list_approve as $row)
{
$forum_options .= '<option value="' . $row['forum_id'] . '"' . (($forum_id == $row['forum_id']) ? ' selected="selected"' : '') . '>' . $row['forum_name'] . '</option>';
$forum_options .= '<option value="' . $row['forum_id'] . '"' . (($forum_id == $row['forum_id']) ? ' selected="selected"' : '') . '>' . str_repeat('&nbsp; &nbsp;', $row['padding']) . $row['forum_name'] . '</option>';
}
$sort_days = $total = 0;

View file

@ -378,7 +378,7 @@ class mcp_reports
'FORUM_NAME' => (!$global_topic) ? $forum_data[$row['forum_id']]['forum_name'] : $user->lang['GLOBAL_ANNOUNCEMENT'],
'POST_ID' => $row['post_id'],
'POST_SUBJECT' => $row['post_subject'],
'POST_SUBJECT' => ($row['post_subject']) ? $row['post_subject'] : $user->lang['NO_SUBJECT'],
'POST_TIME' => $user->format_date($row['post_time']),
'REPORT_ID' => $row['report_id'],
'REPORT_TIME' => $user->format_date($row['report_time']),

View file

@ -37,18 +37,25 @@ function mcp_topic_view($id, $mode, $action)
$to_topic_id = request_var('to_topic_id', 0);
$to_forum_id = request_var('to_forum_id', 0);
$post_id_list = request_var('post_id_list', array(0));
$sort = isset($_POST['sort']) ? true : false;
// Split Topic?
if ($action == 'split_all' || $action == 'split_beyond')
{
if (!$sort)
{
split_topic($action, $topic_id, $to_forum_id, $subject);
}
$action = 'split';
}
// Merge Posts?
if ($action == 'merge_posts')
{
if (!$sort)
{
merge_posts($topic_id, $to_topic_id);
}
$action = 'merge';
}
@ -69,8 +76,11 @@ function mcp_topic_view($id, $mode, $action)
trigger_error('NO_POST_SELECTED');
}
if (!$sort)
{
approve_post($post_id_list, $id, $mode);
}
}
// Jumpbox, sort selects and that kind of things
make_jumpbox($url . "&amp;i=$id&amp;mode=forum_view", $topic_info['forum_id'], false, 'm_');
@ -407,7 +417,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
$post_id_list = array();
while ($row = $db->sql_fetchrow($result))
{
// If splitted from selected post (split_beyond), we split the unapproved items too.
// If split from selected post (split_beyond), we split the unapproved items too.
if (!$row['post_approved'] && !$auth->acl_get('m_approve', $row['forum_id']))
{
// continue;

View file

@ -291,7 +291,7 @@ class mcp_warn
'AVATAR_IMG' => $avatar_img,
'RANK_IMG' => $rank_img,
'L_WARNING_POST_DEFAULT' => sprintf($user->lang['WARNING_POST_DEFAULT'], generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&amp;p=$post_id"),
'L_WARNING_POST_DEFAULT' => sprintf($user->lang['WARNING_POST_DEFAULT'], generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&amp;p=$post_id#p$post_id"),
));
}

View file

@ -367,7 +367,7 @@ class bbcode_firstpass extends bbcode
* Parse code text from code tag
* @private
*/
function bbcode_parse_code($stx, $code)
function bbcode_parse_code($stx, &$code)
{
switch (strtolower($stx))
{
@ -447,7 +447,6 @@ class bbcode_firstpass extends bbcode
unset($htm_match[4], $htm_match[5]);
$htm_replace = array('\1', '\1', '\2', '\1');
$in = preg_replace($htm_match, $htm_replace, $in);
$out = $code_block = '';
$open = 1;
@ -488,6 +487,7 @@ class bbcode_firstpass extends bbcode
if ($open == 1)
{
$code_block .= substr($in, 0, $pos2);
$code_block = preg_replace($htm_match, $htm_replace, $code_block);
// Parse this code block
$out .= $this->bbcode_parse_code($stx, $code_block);
@ -514,6 +514,8 @@ class bbcode_firstpass extends bbcode
if ($code_block)
{
$code_block = substr($code_block, 0, -7);
$code_block = preg_replace($htm_match, $htm_replace, $code_block);
$out .= $this->bbcode_parse_code($stx, $code_block);
}
@ -688,7 +690,7 @@ class bbcode_firstpass extends bbcode
if ($tok == ']')
{
if ($buffer == '/quote' && sizeof($close_tags))
if ($buffer == '/quote' && sizeof($close_tags) && substr($out, -1, 1) == '[')
{
// we have found a closing tag
$out .= array_pop($close_tags) . ']';
@ -1039,7 +1041,7 @@ class parse_message extends bbcode_firstpass
if ((!$msg_len && $mode !== 'sig') || $config['max_' . $mode . '_chars'] && $msg_len > $config['max_' . $mode . '_chars'])
{
$this->warn_msg[] = (!$msg_len) ? $user->lang['TOO_FEW_CHARS'] : $user->lang['TOO_MANY_CHARS'];
$this->warn_msg[] = (!$msg_len) ? $user->lang['TOO_FEW_CHARS'] : sprintf($user->lang['TOO_MANY_CHARS_' . strtoupper($mode)], $msg_len, $config['max_' . $mode . '_chars']);
return $this->warn_msg;
}
}
@ -1237,28 +1239,19 @@ class parse_message extends bbcode_firstpass
{
if ($max_smilies)
{
$count = 0;
foreach ($match as $key => $smilie)
{
if ($small_count = preg_match_all($smilie, $this->message, $array))
{
$count += $small_count;
if ($count > $max_smilies)
$num_matches = preg_match_all('#' . str_replace('#', '', implode('|', $match)) . '#', $this->message, $matches);
unset($matches);
if ($num_matches !== false && $num_matches > $max_smilies)
{
$this->warn_msg[] = sprintf($user->lang['TOO_MANY_SMILIES'], $max_smilies);
return;
}
}
$this->message = preg_replace($smilie, $replace[$key], $this->message);
}
$this->message = trim($this->message);
}
else
{
$this->message = trim(preg_replace($match, $replace, $this->message));
}
}
}
/**
* Parse Attachments
@ -1546,15 +1539,18 @@ class parse_message extends bbcode_firstpass
// Parse Poll Option text ;)
$tmp_message = $this->message;
$this->message = $poll['poll_option_text'];
$bbcode_bitfield = $this->bbcode_bitfield;
$poll['poll_option_text'] = $this->parse($poll['enable_bbcode'], ($config['allow_post_links']) ? $poll['enable_urls'] : false, $poll['enable_smilies'], $poll['img_status'], false, false, $config['allow_post_links'], false);
$this->bbcode_bitfield = base64_encode(base64_decode($bbcode_bitfield) | base64_decode($this->bbcode_bitfield));
$this->message = $tmp_message;
// Parse Poll Title
$tmp_message = $this->message;
$this->message = $poll['poll_title'];
$this->bbcode_bitfield = $bbcode_bitfield;
$poll['poll_options'] = explode("\n", trim($poll['poll_option_text']));
$poll['poll_options_size'] = sizeof($poll['poll_options']);
@ -1576,8 +1572,8 @@ class parse_message extends bbcode_firstpass
}
}
$this->bbcode_bitfield = base64_encode(base64_decode($bbcode_bitfield) | base64_decode($this->bbcode_bitfield));
$this->message = $tmp_message;
unset($tmp_message);
if (sizeof($poll['poll_options']) == 1)

View file

@ -698,7 +698,7 @@ class fulltext_mysql extends search_backend
{
if ($db->sql_layer == 'mysqli' || version_compare($db->mysql_version, '4.1.3', '>='))
{
$alter[] = 'MODIFY post_subject varchar(100) COLLATE utf8_unicode_ci DEFAULT \'\' NOT NULL';
//$alter[] = 'MODIFY post_subject varchar(100) COLLATE utf8_unicode_ci DEFAULT \'\' NOT NULL';
}
else
{

View file

@ -273,7 +273,7 @@ class search_backend
$sql_where = '';
foreach ($words as $word)
{
$sql_where .= ' OR search_keywords LIKE \'%' . $db->sql_escape($word) . '%\'';
$sql_where .= " OR search_keywords " . $db->sql_like_expression($db->any_char . $word . $db->any_char);
}
$sql = 'SELECT search_key

View file

@ -414,6 +414,7 @@ class session
$result = $db->sql_query($sql);
$this->data = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$bot = false;
}
else if ($user_id !== false && !sizeof($this->data))
{
@ -427,6 +428,7 @@ class session
$result = $db->sql_query($sql);
$this->data = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$bot = false;
}
// If no data was returned one or more of the following occurred:
@ -543,7 +545,6 @@ class session
$SID = '?sid=';
$_SID = '';
return true;
}
else
@ -618,8 +619,10 @@ class session
$this->set_login_key();
}
// refresh data
$SID = '?sid=' . $this->session_id;
$_SID = $this->session_id;
$this->data = array_merge($this->data, $sql_ary);
if (!$bot)
{
@ -1203,7 +1206,7 @@ class user extends session
if ($this->data['user_id'] != ANONYMOUS)
{
$this->lang_name = (file_exists($phpbb_root_path . 'language/' . $this->data['user_lang'] . "/common.$phpEx")) ? $this->data['user_lang'] : $config['default_lang'];
$this->lang_path = $phpbb_root_path . 'language/' . $this->lang_name . '/';
$this->lang_path = $phpbb_root_path . 'language/' . basename($this->lang_name) . '/';
$this->date_format = $this->data['user_dateformat'];
$this->timezone = $this->data['user_timezone'] * 3600;
@ -1212,7 +1215,7 @@ class user extends session
else
{
$this->lang_name = $config['default_lang'];
$this->lang_path = $phpbb_root_path . 'language/' . $this->lang_name . '/';
$this->lang_path = $phpbb_root_path . 'language/' . basename($this->lang_name) . '/';
$this->date_format = $config['default_dateformat'];
$this->timezone = $config['board_timezone'] * 3600;
$this->dst = $config['board_dst'] * 3600;
@ -1507,6 +1510,33 @@ class user extends session
}
}
// Make sure the user is able to hide his session
if (!$this->data['session_viewonline'])
{
// Reset online status if not allowed to hide the session...
if (!$auth->acl_get('u_hideonline'))
{
$sql = 'UPDATE ' . SESSIONS_TABLE . '
SET session_viewonline = 1
WHERE session_user_id = ' . $this->data['user_id'];
$db->sql_query($sql);
$this->data['session_viewonline'] = 1;
}
}
else if (!$this->data['user_allow_viewonline'])
{
// the user wants to hide and is allowed to -> cloaking device on.
if ($auth->acl_get('u_hideonline'))
{
$sql = 'UPDATE ' . SESSIONS_TABLE . '
SET session_viewonline = 0
WHERE session_user_id = ' . $this->data['user_id'];
$db->sql_query($sql);
$this->data['session_viewonline'] = 0;
}
}
// Does the user need to change their password? If so, redirect to the
// ucp profile reg_details page ... of course do not redirect if we're already in the ucp
if (!defined('IN_ADMIN') && !defined('ADMIN_START') && $config['chg_passforce'] && $this->data['is_registered'] && $auth->acl_get('u_chgpasswd') && $this->data['user_passchg'] < time() - ($config['chg_passforce'] * 86400))
@ -1586,7 +1616,7 @@ class user extends session
{
global $phpbb_root_path, $config;
$this->lang_path = $phpbb_root_path . 'language/' . $config['default_lang'] . '/';
$this->lang_path = $phpbb_root_path . 'language/' . basename($config['default_lang']) . '/';
}
// $lang == $this->lang
@ -1712,7 +1742,7 @@ class user extends session
$img_data = &$imgs[$img];
if (empty($img_data) || $width !== false)
if (empty($img_data))
{
if (!isset($this->img_array[$img]))
{
@ -1735,7 +1765,7 @@ class user extends session
break;
case 'width':
return $img_data['width'];
return ($width === false) ? $img_data['width'] : $width;
break;
case 'height':
@ -1743,7 +1773,9 @@ class user extends session
break;
default:
return '<img src="' . $img_data['src'] . '"' . (($img_data['width']) ? ' width="' . $img_data['width'] . '"' : '') . (($img_data['height']) ? ' height="' . $img_data['height'] . '"' : '') . ' alt="' . $alt . '" title="' . $alt . '" />';
$use_width = ($width === false) ? $img_data['width'] : $width;
return '<img src="' . $img_data['src'] . '"' . (($use_width) ? ' width="' . $use_width . '"' : '') . (($img_data['height']) ? ' height="' . $img_data['height'] . '"' : '') . ' alt="' . $alt . '" title="' . $alt . '" />';
break;
}
}

View file

@ -226,7 +226,7 @@ class template
FROM ' . STYLES_TEMPLATE_DATA_TABLE . '
WHERE template_id = ' . $user->theme['template_id'] . "
AND (template_filename = '" . $db->sql_escape($this->filename[$handle]) . "'
OR template_included LIKE '%" . $db->sql_escape($this->filename[$handle]) . ":%')";
OR template_included " . $db->sql_like_expression($db->any_char . $this->filename[$handle] . ':' . $db->any_char) . ')';
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);

View file

@ -548,7 +548,7 @@ class ucp_groups
{
if (isset($group_row['group_avatar']) && $group_row['group_avatar'])
{
avatar_delete('group', $group_row);
avatar_delete('group', $group_row, true);
}
}
@ -943,14 +943,14 @@ class ucp_groups
$user->add_lang(array('acp/groups', 'acp/common'));
$name_ary = request_var('usernames', '', true);
$names = request_var('usernames', '', true);
if (!$group_id)
{
trigger_error($user->lang['NO_GROUP'] . $return_page);
}
if (!$name_ary)
if (!$names)
{
trigger_error($user->lang['NO_USERS'] . $return_page);
}
@ -966,16 +966,31 @@ class ucp_groups
trigger_error($user->lang['NOT_LEADER_OF_GROUP'] . $return_page);
}
$name_ary = array_unique(explode("\n", $name_ary));
$name_ary = array_unique(explode("\n", $names));
$group_name = ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name'];
$default = request_var('default', 0);
if (confirm_box(true))
{
// Add user/s to group
if ($error = group_user_add($group_id, false, $name_ary, $group_name, $default, 0, 0, $group_row))
{
trigger_error($user->lang[$error] . $return_page);
}
}
else
{
$s_hidden_fields = array(
'default' => $default,
'usernames' => $names,
'g' => $group_id,
'i' => $id,
'mode' => $mode,
'action' => $action
);
confirm_box(false, sprintf($user->lang['GROUP_CONFIRM_ADD_USER' . ((sizeof($name_ary) == 1) ? '' : 'S')], implode(', ', $name_ary)), build_hidden_fields($s_hidden_fields));
}
trigger_error($user->lang['GROUP_USERS_ADDED'] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $this->u_action . '&amp;action=list&amp;g=' . $group_id . '">', '</a>'));

View file

@ -231,8 +231,13 @@ class ucp_main
}
}
$forbidden_forums = array();
if ($config['allow_forum_notify'])
{
$forbidden_forums = $forbidden_forums = $auth->acl_getf('!f_read', true);
$forbidden_forums = array_unique(array_keys($forbidden_forums));
$sql_array = array(
'SELECT' => 'f.*',
@ -242,7 +247,8 @@ class ucp_main
),
'WHERE' => 'fw.user_id = ' . $user->data['user_id'] . '
AND f.forum_id = fw.forum_id',
AND f.forum_id = fw.forum_id
AND ' . $db->sql_in_set('f.forum_id', $forbidden_forums, true, true),
'ORDER_BY' => 'left_id'
);
@ -330,7 +336,12 @@ class ucp_main
// Subscribed Topics
if ($config['allow_topic_notify'])
{
$this->assign_topiclist('subscribed');
if (empty($forbidden_forums))
{
$forbidden_forums = $auth->acl_getf('!f_read', true);
$forbidden_forums = array_unique(array_keys($forbidden_forums));
}
$this->assign_topiclist('subscribed', $forbidden_forums);
}
$template->assign_vars(array(
@ -386,8 +397,10 @@ class ucp_main
confirm_box(false, 'REMOVE_SELECTED_BOOKMARKS', build_hidden_fields($s_hidden_fields));
}
}
$forbidden_forums = $auth->acl_getf('!f_read', true);
$forbidden_forums = array_unique(array_keys($forbidden_forums));
$this->assign_topiclist('bookmarks');
$this->assign_topiclist('bookmarks', $forbidden_forums);
break;
@ -584,16 +597,26 @@ class ucp_main
/**
* Build and assign topiclist for bookmarks/subscribed topics
*/
function assign_topiclist($mode = 'subscribed')
function assign_topiclist($mode = 'subscribed', $forbidden_forum_ary = array())
{
global $user, $db, $template, $config, $auth, $phpbb_root_path, $phpEx;
$table = ($mode == 'subscribed') ? TOPICS_WATCH_TABLE : BOOKMARKS_TABLE;
$start = request_var('start', 0);
$sql = 'SELECT COUNT(topic_id) as topics_count
FROM ' . $table . '
WHERE user_id = ' . $user->data['user_id'];
$sql_array = array(
'SELECT' => 'COUNT(t.topic_id) as topics_count',
'FROM' => array(
$table => 'i',
TOPICS_TABLE => 't'
),
'WHERE' => 'i.topic_id = t.topic_id
AND i.user_id = ' . $user->data['user_id'] . '
AND ' . $db->sql_in_set('t.forum_id', $forbidden_forum_ary, true, true),
);
$sql = $db->sql_build_query('SELECT', $sql_array);
$result = $db->sql_query($sql);
$topics_count = (int) $db->sql_fetchfield('topics_count');
$db->sql_freeresult($result);
@ -618,7 +641,9 @@ class ucp_main
),
'WHERE' => 'tw.user_id = ' . $user->data['user_id'] . '
AND t.topic_id = tw.topic_id',
AND t.topic_id = tw.topic_id
AND ' . $db->sql_in_set('t.forum_id', $forbidden_forum_ary, true, true),
'ORDER_BY' => 't.topic_last_post_time DESC'
);
@ -634,7 +659,8 @@ class ucp_main
BOOKMARKS_TABLE => 'b',
),
'WHERE' => 'b.user_id = ' . $user->data['user_id'],
'WHERE' => 'b.user_id = ' . $user->data['user_id'] . '
AND ' . $db->sql_in_set('f.forum_id', $forbidden_forum_ary, true, true),
'ORDER_BY' => 't.topic_last_post_time DESC'
);

View file

@ -271,7 +271,8 @@ class ucp_pm
$sql = 'SELECT folder_id
FROM ' . PRIVMSGS_TO_TABLE . "
WHERE msg_id = $msg_id
AND user_id = " . $user->data['user_id'];
AND folder_id <> " . PRIVMSGS_NO_BOX . '
AND user_id = ' . $user->data['user_id'];
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);

View file

@ -245,7 +245,7 @@ function compose_pm($id, $mode, $action)
$enable_urls = $post['enable_magic_url'];
$enable_sig = (isset($post['enable_sig'])) ? $post['enable_sig'] : 0;
$message_attachment = (isset($post['message_attachement'])) ? $post['message_attachement'] : 0;
$message_attachment = (isset($post['message_attachment'])) ? $post['message_attachment'] : 0;
$message_subject = $post['message_subject'];
$message_time = $post['message_time'];
$bbcode_uid = $post['bbcode_uid'];
@ -377,7 +377,7 @@ function compose_pm($id, $mode, $action)
if (!in_array($action, array('quote', 'edit', 'delete', 'forward')))
{
$enable_sig = ($config['allow_sig'] && $auth->acl_get('u_sig') && $user->optionget('attachsig'));
$enable_sig = ($config['allow_sig'] && $config['allow_sig_pm'] && $auth->acl_get('u_sig') && $user->optionget('attachsig'));
$enable_smilies = ($config['allow_smilies'] && $auth->acl_get('u_pm_smilies') && $user->optionget('smilies'));
$enable_bbcode = ($config['allow_bbcode'] && $auth->acl_get('u_pm_bbcode') && $user->optionget('bbcode'));
$enable_urls = true;
@ -516,7 +516,7 @@ function compose_pm($id, $mode, $action)
$enable_bbcode = (!$bbcode_status || isset($_POST['disable_bbcode'])) ? false : true;
$enable_smilies = (!$smilies_status || isset($_POST['disable_smilies'])) ? false : true;
$enable_urls = (isset($_POST['disable_magic_url'])) ? 0 : 1;
$enable_sig = (!$config['allow_sig']) ? false : ((isset($_POST['attach_sig'])) ? true : false);
$enable_sig = (!$config['allow_sig'] ||!$config['allow_sig_pm']) ? false : ((isset($_POST['attach_sig'])) ? true : false);
if ($submit)
{
@ -538,7 +538,7 @@ function compose_pm($id, $mode, $action)
}
// Parse message
$message_parser->parse($enable_bbcode, ($config['allow_post_links']) ? $enable_urls : false, $enable_smilies, $img_status, $flash_status, true, $config['allow_sig_links']);
$message_parser->parse($enable_bbcode, ($config['allow_post_links']) ? $enable_urls : false, $enable_smilies, $img_status, $flash_status, true, $config['allow_post_links']);
// On a refresh we do not care about message parsing errors
if (sizeof($message_parser->warn_msg) && !$refresh)
@ -925,11 +925,11 @@ function compose_pm($id, $mode, $action)
'S_BBCODE_CHECKED' => ($bbcode_checked) ? ' checked="checked"' : '',
'S_SMILIES_ALLOWED' => $smilies_status,
'S_SMILIES_CHECKED' => ($smilies_checked) ? ' checked="checked"' : '',
'S_SIG_ALLOWED' => ($config['allow_sig'] && $auth->acl_get('u_sig')),
'S_SIG_ALLOWED' => ($config['allow_sig'] && $config['allow_sig_pm'] && $auth->acl_get('u_sig')),
'S_SIGNATURE_CHECKED' => ($sig_checked) ? ' checked="checked"' : '',
'S_LINKS_ALLOWED' => $url_status,
'S_MAGIC_URL_CHECKED' => ($urls_checked) ? ' checked="checked"' : '',
'S_SAVE_ALLOWED' => $auth->acl_get('u_savedrafts'),
'S_SAVE_ALLOWED' => ($auth->acl_get('u_savedrafts') && $action != 'edit') ? true : false,
'S_HAS_DRAFTS' => ($auth->acl_get('u_savedrafts') && $drafts),
'S_FORM_ENCTYPE' => $form_enctype,

View file

@ -406,7 +406,7 @@ function get_user_information($user_id, $user_row)
$update_time = $config['load_online_time'] * 60;
if ($row)
{
$user_row['online'] = (time() - $update_time < $row['online_time'] && ($row['viewonline'] && $user_row['user_allow_viewonline'])) ? true : false;
$user_row['online'] = (time() - $update_time < $row['online_time'] && ($row['viewonline'])) ? true : false;
}
}

View file

@ -32,7 +32,7 @@ class ucp_prefs
$data = array(
'notifymethod' => request_var('notifymethod', $user->data['user_notify_type']),
'dateformat' => request_var('dateformat', $user->data['user_dateformat'], true),
'lang' => request_var('lang', $user->data['user_lang']),
'lang' => basename(request_var('lang', $user->data['user_lang'])),
'style' => request_var('style', (int) $user->data['user_style']),
'tz' => request_var('tz', (float) $user->data['user_timezone']),

View file

@ -261,7 +261,7 @@ class ucp_profile
'aim' => request_var('aim', $user->data['user_aim']),
'msn' => request_var('msn', $user->data['user_msnm']),
'yim' => request_var('yim', $user->data['user_yim']),
'jabber' => request_var('jabber', $user->data['user_jabber']),
'jabber' => utf8_normalize_nfc(request_var('jabber', $user->data['user_jabber'], true)),
'website' => request_var('website', $user->data['user_website']),
'location' => utf8_normalize_nfc(request_var('location', $user->data['user_from'], true)),
'occupation' => utf8_normalize_nfc(request_var('occupation', $user->data['user_occ'], true)),
@ -290,7 +290,7 @@ class ucp_profile
'msn' => array('string', true, 5, 255),
'jabber' => array(
array('string', true, 5, 255),
array('match', true, '#^[^@:\'"<>&\x00-\x1F\x7F\t\r\n]+@(.*?\.)*?[a-z0-9\-_]+?\.[a-z]{2,4}(/.*)?$#iu')),
array('jabber')),
'yim' => array('string', true, 5, 255),
'website' => array(
array('string', true, 12, 255),

View file

@ -34,26 +34,31 @@ class ucp_register
$agreed = (!empty($_POST['agreed'])) ? 1 : 0;
$submit = (isset($_POST['submit'])) ? true : false;
$change_lang = request_var('change_lang', '');
$user_lang = request_var('lang', $user->lang_name);
if ($change_lang || $user_lang != $config['default_lang'])
{
$use_lang = ($change_lang) ? basename($change_lang) : basename($user_lang);
if (file_exists($phpbb_root_path . 'language/' . $use_lang . '/'))
{
if ($change_lang)
{
$change_lang = basename($change_lang);
if (file_exists($phpbb_root_path . 'language/' . $change_lang . '/'))
{
$submit = false;
$user->lang_name = $lang = $change_lang;
$user->lang_path = $phpbb_root_path . 'language/' . $lang . '/';
$user->lang = array();
$user->add_lang(array('common', 'ucp'));
// Setting back agreed to let the user view the agreement in his/her language
$agreed = (empty($_GET['change_lang'])) ? 0 : $agreed;
}
$user->lang_name = $lang = $use_lang;
$user->lang_path = $phpbb_root_path . 'language/' . $lang . '/';
$user->lang = array();
$user->add_lang(array('common', 'ucp'));
}
else
{
$change_lang = '';
$user_lang = $user->lang_name;
}
}
@ -143,7 +148,7 @@ class ucp_register
'email' => strtolower(request_var('email', '')),
'email_confirm' => strtolower(request_var('email_confirm', '')),
'confirm_code' => request_var('confirm_code', ''),
'lang' => request_var('lang', $user->lang_name),
'lang' => basename(request_var('lang', $user->lang_name)),
'tz' => request_var('tz', (float) $timezone),
);

View file

@ -406,9 +406,48 @@ function iso_8859_7($string)
return strtr($string, $transform);
}
function iso_8859_8($string)
{
static $transform = array(
"\xC2\xAA" => "\xC3\x97",
"\xC2\xBA" => "\xC3\xB7",
"\xC3\x9F" => "\xE2\x80\x97",
"\xC3\xA0" => "\xD7\x90",
"\xC3\xA1" => "\xD7\x91",
"\xC3\xA2" => "\xD7\x92",
"\xC3\xA3" => "\xD7\x93",
"\xC3\xA4" => "\xD7\x94",
"\xC3\xA5" => "\xD7\x95",
"\xC3\xA6" => "\xD7\x96",
"\xC3\xA7" => "\xD7\x97",
"\xC3\xA8" => "\xD7\x98",
"\xC3\xA9" => "\xD7\x99",
"\xC3\xAA" => "\xD7\x9A",
"\xC3\xAB" => "\xD7\x9B",
"\xC3\xAC" => "\xD7\x9C",
"\xC3\xAD" => "\xD7\x9D",
"\xC3\xAE" => "\xD7\x9E",
"\xC3\xAF" => "\xD7\x9F",
"\xC3\xB0" => "\xD7\xA0",
"\xC3\xB1" => "\xD7\xA1",
"\xC3\xB2" => "\xD7\xA2",
"\xC3\xB3" => "\xD7\xA3",
"\xC3\xB4" => "\xD7\xA4",
"\xC3\xB5" => "\xD7\xA5",
"\xC3\xB6" => "\xD7\xA6",
"\xC3\xB7" => "\xD7\xA7",
"\xC3\xB8" => "\xD7\xA8",
"\xC3\xB9" => "\xD7\xA9",
"\xC3\xBA" => "\xD7\xAA",
"\xC3\xBD" => "\xE2\x80\x8E",
"\xC3\xBE" => "\xE2\x80\x8F",
);
return strtr(utf8_encode($string), $transform);
}
function iso_8859_9($string)
{
static $tranform = array(
static $transform = array(
"\xC3\x90" => "\xC4\x9E",
"\xC3\x9D" => "\xC4\xB0",
"\xC3\x9E" => "\xC5\x9E",
@ -421,7 +460,7 @@ function iso_8859_9($string)
function iso_8859_15($string)
{
static $tranform = array(
static $transform = array(
"\xC2\xA4" => "\xE2\x82\xAC",
"\xC2\xA6" => "\xC5\xA0",
"\xC2\xA8" => "\xC5\xA1",
@ -965,7 +1004,7 @@ function cp1252($string)
function cp1254($string)
{
static $tranform = array(
static $transform = array(
"\xC2\x80" => "\xE2\x82\xAC",
"\xC2\x82" => "\xE2\x80\x9A",
"\xC2\x83" => "\xC6\x92",

View file

@ -7455,7 +7455,7 @@ function gb2312($string)
function sjis($string)
{
static $array = array(
static $transform = array(
"\x5C"=>"\xC2\xA5",
"\x7E"=>"\xE2\x80\xBE",
"\x81\x40"=>"\xE3\x80\x80",

File diff suppressed because one or more lines are too long

View file

@ -713,6 +713,12 @@ function utf8_recode($string, $encoding)
{
$encoding = 'cp1252';
}
// convert iso-8859-8-i to iso-8859-8
else if ($encoding == 'iso-8859-8-i')
{
$encoding = 'iso-8859-8';
$string = hebrev($string);
}
// First, try iconv()
if (function_exists('iconv'))
@ -782,6 +788,7 @@ function utf8_recode($string, $encoding)
case '2':
case '4':
case '7':
case '8':
case '9':
case '15':
if (!function_exists('iso_8859_' . $array[1]))

View file

@ -116,7 +116,7 @@ $template->assign_vars(array(
'S_LOGIN_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'),
'S_DISPLAY_BIRTHDAY_LIST' => ($config['load_birthdays']) ? true : false,
'U_MARK_FORUMS' => append_sid("{$phpbb_root_path}index.$phpEx", 'mark=forums'),
'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}index.$phpEx", 'mark=forums') : '',
'U_MCP' => ($auth->acl_get('m_') || $auth->acl_getf_global('m_')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&amp;mode=front', true, $user->session_id) : '')
);

View file

@ -31,7 +31,7 @@ unset($dbpasswd);
*/
$convertor_data = array(
'forum_name' => 'phpBB 2.0.x',
'version' => '0.92',
'version' => '1.0.RC2',
'phpbb_version' => '3.0.0',
'author' => '<a href="http://www.phpbb.com/">phpBB Group</a>',
'dbms' => $dbms,
@ -184,8 +184,14 @@ if (!$get_info)
'extensions',
'extension_groups'
);
}
$src_db->sql_freeresult($result);
}
else if ($result)
{
$src_db->sql_freeresult($result);
}
/**
* Tests for further MODs can be included here.
@ -540,9 +546,7 @@ if (!$get_info)
array('smiley_width', 'smilies.smile_url', 'get_smiley_width'),
array('smiley_height', 'smilies.smile_url', 'get_smiley_height'),
array('smiley_order', 'smilies.smilies_id', ''),
array('display_on_posting', 'smilies.smilies_id', array(
'execute' => '{RESULT} = ({VALUE}[0] <= 20) ? 1 : 0;',
)),
array('display_on_posting', 'smilies.smilies_id', 'get_smiley_display'),
'order_by' => 'smilies.smilies_id ASC',
),
@ -702,7 +706,8 @@ if (!$get_info)
array('pm_forwarded', 0, ''),
array('folder_id', PRIVMSGS_INBOX, ''),
'where' => 'privmsgs.privmsgs_type = 0 OR privmsgs.privmsgs_type = 1 OR privmsgs.privmsgs_type = 5',
'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id
AND (privmsgs.privmsgs_type = 0 OR privmsgs.privmsgs_type = 1 OR privmsgs.privmsgs_type = 5)',
),
// Outbox
@ -714,14 +719,15 @@ if (!$get_info)
array('user_id', 'privmsgs.privmsgs_from_userid', 'phpbb_user_id'),
array('author_id', 'privmsgs.privmsgs_from_userid', 'phpbb_user_id'),
array('pm_deleted', 0, ''),
array('pm_new', 'privmsgs.privmsgs_type', 'phpbb_new_pm'),
array('pm_unread', 'privmsgs.privmsgs_type', 'phpbb_unread_pm'),
array('pm_new', 0, ''),
array('pm_unread', 0, ''),
array('pm_replied', 0, ''),
array('pm_marked', 0, ''),
array('pm_forwarded', 0, ''),
array('folder_id', PRIVMSGS_OUTBOX, ''),
'where' => 'privmsgs.privmsgs_type = 1 OR privmsgs.privmsgs_type = 5',
'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id
AND (privmsgs.privmsgs_type = 1 OR privmsgs.privmsgs_type = 5)',
),
// Sentbox
@ -740,7 +746,8 @@ if (!$get_info)
array('pm_forwarded', 0, ''),
array('folder_id', PRIVMSGS_SENTBOX, ''),
'where' => 'privmsgs.privmsgs_type = 2',
'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id
AND privmsgs.privmsgs_type = 2',
),
// Savebox (SAVED IN)
@ -759,7 +766,8 @@ if (!$get_info)
array('pm_forwarded', 0, ''),
array('folder_id', 'privmsgs.privmsgs_to_userid', 'phpbb_get_savebox_id'),
'where' => 'privmsgs.privmsgs_type = 3',
'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id
AND privmsgs.privmsgs_type = 3',
),
// Savebox (SAVED OUT)
@ -778,7 +786,8 @@ if (!$get_info)
array('pm_forwarded', 0, ''),
array('folder_id', 'privmsgs.privmsgs_from_userid', 'phpbb_get_savebox_id'),
'where' => 'privmsgs.privmsgs_type = 4',
'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id
AND privmsgs.privmsgs_type = 4',
),
array(
@ -853,7 +862,7 @@ if (!$get_info)
array('user_lang', $config['default_lang'], ''),
array('', 'users.user_lang', ''),
array('user_timezone', 'users.user_timezone', ''),
array('user_dateformat', 'users.user_dateformat', ''),
array('user_dateformat', 'users.user_dateformat', array('function1' => 'phpbb_set_encoding')),
array('user_inactive_reason', '', 'phpbb_inactive_reason'),
array('user_inactive_time', '', 'phpbb_inactive_time'),
@ -861,10 +870,10 @@ if (!$get_info)
array('user_occ', 'users.user_occ', array('function1' => 'phpbb_set_encoding')),
array('user_website', 'users.user_website', 'validate_website'),
array('user_jabber', '', ''),
array('user_msnm', 'users.user_msnm', ''),
array('user_yim', 'users.user_yim', ''),
array('user_aim', 'users.user_aim', ''),
array('user_icq', 'users.user_icq', ''),
array('user_msnm', 'users.user_msnm', array('function1' => 'phpbb_set_encoding')),
array('user_yim', 'users.user_yim', array('function1' => 'phpbb_set_encoding')),
array('user_aim', 'users.user_aim', array('function1' => 'phpbb_set_encoding')),
array('user_icq', 'users.user_icq', array('function1' => 'phpbb_set_encoding')),
array('user_from', 'users.user_from', array('function1' => 'phpbb_set_encoding')),
array('user_rank', 'users.user_rank', ''),
array('user_permissions', '', ''),

View file

@ -59,6 +59,15 @@ function phpbb_insert_forums()
$max_forum_id++;
// pruning disabled globally?
$sql = "SELECT config_value
FROM {$convert->src_table_prefix}config
WHERE config_name = 'prune_enable'";
$result = $src_db->sql_query($sql);
$prune_enabled = (int) $src_db->sql_fetchfield('config_value');
$src_db->sql_freeresult($result);
// Insert categories
$sql = 'SELECT cat_id, cat_title
FROM ' . $convert->src_table_prefix . 'categories
@ -206,7 +215,7 @@ function phpbb_insert_forums()
'forum_desc' => htmlspecialchars(phpbb_set_default_encoding($row['forum_desc']), ENT_COMPAT, 'UTF-8'),
'forum_type' => FORUM_POST,
'forum_status' => is_item_locked($row['forum_status']),
'enable_prune' => $row['prune_enable'],
'enable_prune' => ($prune_enabled) ? $row['prune_enable'] : 0,
'prune_next' => null_to_zero($row['prune_next']),
'prune_days' => null_to_zero($row['prune_days']),
'prune_viewed' => 0,
@ -270,10 +279,28 @@ function phpbb_insert_forums()
switch ($db->sql_layer)
{
case 'postgres':
$db->sql_query("SELECT SETVAL('" . FORUMS_TABLE . "_seq',(select case when max(forum_id)>0 then max(forum_id)+1 else 1 end from " . FORUMS_TABLE . '));');
break;
case 'mssql':
case 'mssql_odbc':
$db->sql_query('SET IDENTITY_INSERT ' . FORUMS_TABLE . ' OFF');
break;
case 'oracle':
$result = $db->sql_query('SELECT MAX(forum_id) as max_id FROM ' . FORUMS_TABLE);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$largest_id = (int) $row['max_id'];
if ($largest_id)
{
$db->sql_query('DROP SEQUENCE ' . FORUMS_TABLE . '_seq');
$db->sql_query('CREATE SEQUENCE ' . FORUMS_TABLE . '_seq START WITH ' . ($largest_id + 1));
}
break;
}
}
@ -536,7 +563,6 @@ function phpbb_convert_authentication($mode)
while ($row = $src_db->sql_fetchrow($result))
{
$user_id = (int) phpbb_user_id($row['user_id']);
// Set founder admin...
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_type = ' . USER_FOUNDER . "
@ -544,6 +570,13 @@ function phpbb_convert_authentication($mode)
$db->sql_query($sql);
}
$src_db->sql_freeresult($result);
$sql = 'SELECT group_id
FROM ' . GROUPS_TABLE . "
WHERE group_name = '" . $db->sql_escape('BOTS') . "'";
$result = $db->sql_query($sql);
$bot_group_id = (int) $db->sql_fetchfield('group_id');
$db->sql_freeresult($result);
}
// Grab forum auth information
@ -564,10 +597,11 @@ function phpbb_convert_authentication($mode)
}
// Grab user auth information from 2.0.x board
$sql = "SELECT ug.user_id, aa.*
FROM {$convert->src_table_prefix}auth_access aa, {$convert->src_table_prefix}user_group ug, {$convert->src_table_prefix}groups g
FROM {$convert->src_table_prefix}auth_access aa, {$convert->src_table_prefix}user_group ug, {$convert->src_table_prefix}groups g, {$convert->src_table_prefix}forums f
WHERE g.group_id = aa.group_id
AND g.group_single_user = 1
AND ug.group_id = g.group_id";
AND ug.group_id = g.group_id
AND f.forum_id = aa.forum_id";
$result = $src_db->sql_query($sql);
$user_access = array();
@ -710,7 +744,7 @@ function phpbb_convert_authentication($mode)
if ($mode == 'start')
{
user_group_auth('guests', 'SELECT user_id, {GUESTS} FROM ' . USERS_TABLE . ' WHERE user_id = ' . ANONYMOUS, false);
user_group_auth('registered', 'SELECT user_id, {REGISTERED} FROM ' . USERS_TABLE . ' WHERE user_id <> ' . ANONYMOUS, false);
user_group_auth('registered', 'SELECT user_id, {REGISTERED} FROM ' . USERS_TABLE . ' WHERE user_id <> ' . ANONYMOUS . " AND group_id <> $bot_group_id", false);
// Selecting from old table
if (!empty($config['increment_user_id']))
@ -1693,7 +1727,7 @@ function phpbb_check_username_collisions()
break;
case 'oracle':
$create_sql = 'CREATE TABLE ' . $table_prefix . 'userconv
$create_sql = 'CREATE TABLE ' . $table_prefix . 'userconv (
user_id number(8) NOT NULL,
username_clean varchar2(255) DEFAULT \'\'
)';
@ -1709,15 +1743,15 @@ function phpbb_check_username_collisions()
case 'sqlite':
$create_sql = 'CREATE TABLE ' . $table_prefix . 'userconv (
user_id INTEGER NOT NULL DEFAULT \'0\',
username_clean varchar(255) NOT NULL DEFAULT \'\',
username_clean varchar(255) NOT NULL DEFAULT \'\'
)';
break;
}
$db->sql_return_on_error(true);
$db->sql_query($drop_sql);
$db->sql_query($create_sql);
$db->sql_return_on_error(false);
$db->sql_query($create_sql);
// now select all user_ids and usernames and then convert the username (this can take quite a while!)
$sql = 'SELECT user_id, username

View file

@ -8,7 +8,7 @@
*
*/
$updates_to_version = '3.0.RC1';
$updates_to_version = '3.0.RC2';
if (defined('IN_PHPBB') && defined('IN_INSTALL'))
{
@ -311,169 +311,25 @@ $unsigned_types = array('UINT', 'UINT:', 'USINT', 'BOOL', 'TIMESTAMP');
// Only an example, but also commented out
$database_update_info = array(
// Changes from 3.0.b5 to the next version
'3.0.b5' => array(
// Add the following columns
'add_columns' => array(
SEARCH_WORDLIST_TABLE => array(
'word_count' => array('UINT', 0),
),
),
// Change the following columns...
'change_columns' => array(
TOPICS_TABLE => array(
'poll_title' => array('STEXT_UNI', ''),
),
SESSIONS_TABLE => array(
'session_forwarded_for' => array('VCHAR:255', ''),
),
),
// Changes from 3.0.RC1 to the next version
'3.0.RC1' => array(
// Remove the following keys
'drop_keys' => array(
USERS_TABLE => array(
'username_clean',
STYLES_IMAGESET_DATA_TABLE => array(
'i_id',
),
STYLES_IMAGESET_TABLE => array(
'imgset_nm',
),
BOOKMARKS_TABLE => array(
'order_id',
'topic_user_id',
ACL_ROLES_DATA_TABLE => array(
'ath_opt_id',
),
),
// Add the following keys
'add_index' => array(
SEARCH_WORDLIST_TABLE => array(
'wrd_cnt' => array('word_count'),
),
ACL_GROUPS_TABLE => array(
'auth_role_id' => array('auth_role_id'),
),
ACL_USERS_TABLE => array(
'auth_role_id' => array('auth_role_id'),
STYLES_IMAGESET_DATA_TABLE => array(
'i_d' => array('imageset_id'),
),
ACL_ROLES_DATA_TABLE => array(
'ath_opt_id' => array('auth_option_id'),
),
TOPICS_TABLE => array(
'forum_appr_last' => array('forum_id', 'topic_approved', 'topic_last_post_id'),
),
),
// Add the following unique indexes
'add_unique_index' => array(
SEARCH_WORDMATCH_TABLE => array(
'unq_mtch' => array('word_id', 'post_id', 'title_match'),
),
USERS_TABLE => array(
'username_clean' => array('username_clean'),
),
),
// Drop the following columns
'drop_columns' => array(
STYLES_IMAGESET_TABLE => array(
'site_logo',
'upload_bar',
'poll_left',
'poll_center',
'poll_right',
'icon_friend',
'icon_foe',
'forum_link',
'forum_read',
'forum_read_locked',
'forum_read_subforum',
'forum_unread',
'forum_unread_locked',
'forum_unread_subforum',
'topic_moved',
'topic_read',
'topic_read_mine',
'topic_read_hot',
'topic_read_hot_mine',
'topic_read_locked',
'topic_read_locked_mine',
'topic_unread',
'topic_unread_mine',
'topic_unread_hot',
'topic_unread_hot_mine',
'topic_unread_locked',
'topic_unread_locked_mine',
'sticky_read',
'sticky_read_mine',
'sticky_read_locked',
'sticky_read_locked_mine',
'sticky_unread',
'sticky_unread_mine',
'sticky_unread_locked',
'sticky_unread_locked_mine',
'announce_read',
'announce_read_mine',
'announce_read_locked',
'announce_read_locked_mine',
'announce_unread',
'announce_unread_mine',
'announce_unread_locked',
'announce_unread_locked_mine',
'global_read',
'global_read_mine',
'global_read_locked',
'global_read_locked_mine',
'global_unread',
'global_unread_mine',
'global_unread_locked',
'global_unread_locked_mine',
'pm_read',
'pm_unread',
'icon_contact_aim',
'icon_contact_email',
'icon_contact_icq',
'icon_contact_jabber',
'icon_contact_msnm',
'icon_contact_pm',
'icon_contact_yahoo',
'icon_contact_www',
'icon_post_delete',
'icon_post_edit',
'icon_post_info',
'icon_post_quote',
'icon_post_report',
'icon_post_target',
'icon_post_target_unread',
'icon_topic_attach',
'icon_topic_latest',
'icon_topic_newest',
'icon_topic_reported',
'icon_topic_unapproved',
'icon_user_online',
'icon_user_offline',
'icon_user_profile',
'icon_user_search',
'icon_user_warn',
'button_pm_forward',
'button_pm_new',
'button_pm_reply',
'button_topic_locked',
'button_topic_new',
'button_topic_reply',
'user_icon1',
'user_icon2',
'user_icon3',
'user_icon4',
'user_icon5',
'user_icon6',
'user_icon7',
'user_icon8',
'user_icon9',
'user_icon10'
),
BOOKMARKS_TABLE => array(
'order_id',
),
),
// Adding primary key
'add_primary_keys' => array(
BOOKMARKS_TABLE => array(
'topic_id', 'user_id',
),
),
),
);
@ -719,439 +575,56 @@ flush();
$no_updates = true;
// some code magic
if (version_compare($current_version, '3.0.b5', '<='))
if (version_compare($current_version, '3.0.RC1', '<='))
{
switch ($map_dbms)
{
case 'sqlite':
case 'firebird':
$db->sql_query('DELETE FROM ' . STYLES_IMAGESET_TABLE);
$db->sql_query('DELETE FROM ' . STYLES_TEMPLATE_TABLE);
$db->sql_query('DELETE FROM ' . STYLES_TABLE);
$db->sql_query('DELETE FROM ' . STYLES_THEME_TABLE);
// we have to remove a few extra entries from converted boards.
$sql = 'SELECT group_id
FROM ' . GROUPS_TABLE . "
WHERE group_name = '" . $db->sql_escape('BOTS') . "'";
$result = $db->sql_query($sql);
$bot_group_id = (int) $db->sql_fetchfield('group_id');
$db->sql_freeresult($result);
// $db->sql_query('DELETE FROM ' . STYLES_IMAGESET_DATA_TABLE);
break;
default:
$db->sql_query('TRUNCATE TABLE ' . STYLES_IMAGESET_TABLE);
$db->sql_query('TRUNCATE TABLE ' . STYLES_TEMPLATE_TABLE);
$db->sql_query('TRUNCATE TABLE ' . STYLES_TABLE);
$db->sql_query('TRUNCATE TABLE ' . STYLES_THEME_TABLE);
// This table does not exist, as well as the constant not exist...
// $db->sql_query('TRUNCATE TABLE ' . STYLES_IMAGESET_DATA_TABLE);
break;
}
$tablename = $table_prefix . 'styles_imageset_data';
switch ($map_dbms)
{
case 'mysql_41':
$sql_ary = array(
"CREATE TABLE $tablename (
image_id smallint(4) UNSIGNED NOT NULL auto_increment,
image_name varchar(200) DEFAULT '' NOT NULL,
image_filename varchar(200) DEFAULT '' NOT NULL,
image_lang varchar(30) DEFAULT '' NOT NULL,
image_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
image_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
imageset_id tinyint(4) DEFAULT '0' NOT NULL,
PRIMARY KEY (image_id),
KEY i_id (imageset_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`");
break;
case 'mysql_40':
$sql_ary = array(
"CREATE TABLE $tablename (
image_id smallint(4) UNSIGNED NOT NULL auto_increment,
image_name varbinary(200) DEFAULT '' NOT NULL,
image_filename varbinary(200) DEFAULT '' NOT NULL,
image_lang varbinary(30) DEFAULT '' NOT NULL,
image_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
image_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
imageset_id tinyint(4) DEFAULT '0' NOT NULL,
PRIMARY KEY (image_id),
KEY i_id (imageset_id)
);");
break;
case 'mssql':
$sql_ary = array(
"CREATE TABLE [$tablename] (
[image_id] [int] IDENTITY (1, 1) NOT NULL ,
[image_name] [varchar] (200) DEFAULT ('') NOT NULL ,
[image_filename] [varchar] (200) DEFAULT ('') NOT NULL ,
[image_lang] [varchar] (30) DEFAULT ('') NOT NULL ,
[image_height] [int] DEFAULT (0) NOT NULL ,
[image_width] [int] DEFAULT (0) NOT NULL ,
[imageset_id] [int] DEFAULT (0) NOT NULL
) ON [PRIMARY]",
"ALTER TABLE [$tablename] WITH NOCHECK ADD
CONSTRAINT [PK_$tablename] PRIMARY KEY CLUSTERED
(
[image_id]
) ON [PRIMARY]",
"CREATE INDEX [i_id] ON [$tablename]([imageset_id]) ON [PRIMARY]",
);
break;
case 'oracle':
$sql_ary = array(
"CREATE TABLE $tablename (
image_id number(4) NOT NULL,
image_name varchar2(200) DEFAULT '' ,
image_filename varchar2(200) DEFAULT '' ,
image_lang varchar2(30) DEFAULT '' ,
image_height number(4) DEFAULT '0' NOT NULL,
image_width number(4) DEFAULT '0' NOT NULL,
imageset_id number(4) DEFAULT '0' NOT NULL,
CONSTRAINT pk_phpbb_styles_imageset_data PRIMARY KEY (image_id)
)",
"CREATE INDEX {$tablename}_i_id ON $tablename (imageset_id)",
"CREATE SEQUENCE {$tablename}_imgset_id_seq",
"CREATE OR REPLACE TRIGGER t_$tablename
BEFORE INSERT ON $tablename
FOR EACH ROW WHEN (
new.image_id IS NULL OR new.image_id = 0
)
BEGIN
SELECT {$tablename}_seq.nextval
INTO :new.image_id
FROM dual;
END",
);
break;
case 'postgres':
$sql_ary = array(
"CREATE SEQUENCE {$tablename}_seq;",
"CREATE TABLE $tablename (
image_id INT2 DEFAULT nextval('{$tablename}_seq'),
image_name varchar(200) DEFAULT '' NOT NULL,
image_filename varchar(200) DEFAULT '' NOT NULL,
image_lang varchar(30) DEFAULT '' NOT NULL,
image_height INT2 DEFAULT '0' NOT NULL CHECK (image_height >= 0),
image_width INT2 DEFAULT '0' NOT NULL CHECK (image_width >= 0),
imageset_id INT2 DEFAULT '0' NOT NULL,
PRIMARY KEY (image_id)
);",
"CREATE INDEX {$tablename}_i_id ON $tablename (imageset_id);"
);
break;
case 'sqlite':
$sql_ary = array(
"CREATE TABLE $tablename (
image_id INTEGER PRIMARY KEY NOT NULL ,
image_name varchar(200) NOT NULL DEFAULT '',
image_filename varchar(200) NOT NULL DEFAULT '',
image_lang varchar(30) NOT NULL DEFAULT '',
image_height INTEGER UNSIGNED NOT NULL DEFAULT '0',
image_width INTEGER UNSIGNED NOT NULL DEFAULT '0',
imageset_id tinyint(4) NOT NULL DEFAULT '0'
);",
"CREATE INDEX {$tablename}_i_id ON $tablename (imageset_id);"
);
break;
case 'firebird':
$sql_ary = array(
"CREATE TABLE $tablename (
image_id INTEGER NOT NULL,
image_name VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL,
image_filename VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL,
image_lang VARCHAR(30) CHARACTER SET NONE DEFAULT '' NOT NULL,
image_height INTEGER DEFAULT 0 NOT NULL,
image_width INTEGER DEFAULT 0 NOT NULL,
imageset_id INTEGER DEFAULT 0 NOT NULL
);",
"ALTER TABLE $tablename ADD PRIMARY KEY (image_id);",
"CREATE INDEX {$tablename}_i_id ON $tablename(imageset_id);",
"CREATE GENERATOR {$tablename}_gen;",
"SET GENERATOR {$tablename}_gen TO 0;",
"CREATE TRIGGER t_$tablename FOR $tablename
BEFORE INSERT
AS
BEGIN
NEW.image_id = GEN_ID({$tablename}_gen, 1);
END"
);
break;
}
// add the various statements
foreach ($sql_ary as $sql)
{
$db->sql_query($sql);
}
$data = "INSERT INTO phpbb_styles (style_name, style_copyright, style_active, template_id, theme_id, imageset_id) VALUES ('prosilver', '&copy; phpBB Group', 1, 1, 1, 1);
INSERT INTO phpbb_styles (style_name, style_copyright, style_active, template_id, theme_id, imageset_id) VALUES ('subsilver2', '&copy; phpBB Group', 1, 2, 2, 2);
INSERT INTO phpbb_styles_imageset (imageset_name, imageset_copyright, imageset_path) VALUES ('prosilver', '&copy; phpBB Group', 'prosilver');
INSERT INTO phpbb_styles_imageset (imageset_name, imageset_copyright, imageset_path) VALUES ('subsilver2', '&copy; phpBB Group', 'subsilver2');
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('site_logo', 'site_logo.gif', '', 94, 170, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('upload_bar', 'upload_bar.gif', '', 16, 280, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('poll_left', 'poll_left.gif', '', 12, 4, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('poll_center', 'poll_center.gif', '', 12, 0, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('poll_right', 'poll_right.gif', '', 12, 4, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_link', 'forum_link.gif', '', 25, 46, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_read', 'forum_read.gif', '', 25, 46, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_read_locked', 'forum_read_locked.gif', '', 25, 46, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_read_subforum', 'forum_read_subforum.gif', '', 25, 46, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_unread', 'forum_unread.gif', '', 25, 46, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_unread_locked', 'forum_unread_locked.gif', '', 25, 46, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_unread_subforum', 'forum_unread_subforum.gif', '', 25, 46, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_moved', 'topic_moved.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read', 'topic_read.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_mine', 'topic_read_mine.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_hot', 'topic_read_hot.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_hot_mine', 'topic_read_hot_mine.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_locked', 'topic_read_locked.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_locked_mine', 'topic_read_locked_mine.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread', 'topic_unread.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_mine', 'topic_unread_mine.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_hot', 'topic_unread_hot.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_hot_mine', 'topic_unread_hot_mine.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_locked', 'topic_unread_locked.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_locked_mine', 'topic_unread_locked_mine.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read', 'sticky_read.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read_mine', 'sticky_read_mine.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read_locked', 'sticky_read_locked.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read_locked_mine', 'sticky_read_locked_mine.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread', 'sticky_unread.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread_mine', 'sticky_unread_mine.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread_locked', 'sticky_unread_locked.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread_locked_mine', 'sticky_unread_locked_mine.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read', 'announce_read.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read_mine', 'announce_read_mine.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read_locked', 'announce_read_locked.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read_locked_mine', 'announce_read_locked_mine.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread', 'announce_unread.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread_mine', 'announce_unread_mine.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread_locked', 'announce_unread_locked.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread_locked_mine', 'announce_unread_locked_mine.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read', 'announce_read.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read_mine', 'announce_read_mine.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read_locked', 'announce_read_locked.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read_locked_mine', 'announce_read_locked_mine.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread', 'announce_unread.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread_mine', 'announce_unread_mine.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread_locked', 'announce_unread_locked.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread_locked_mine', 'announce_unread_locked_mine.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('pm_read', 'topic_read.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('pm_unread', 'topic_unread.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_target', 'icon_post_target.gif', '', 9, 12, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_target_unread', 'icon_post_target_unread.gif', '', 9, 12, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_attach', 'icon_topic_attach.gif', '', 18, 14, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_latest', 'icon_topic_latest.gif', '', 9, 18, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_newest', 'icon_topic_newest.gif', '', 9, 18, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_reported', 'icon_topic_reported.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_unapproved', 'icon_topic_unapproved.gif', '', 18, 19, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_aim', 'icon_contact_aim.gif', 'en', 0, 0, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_email', 'icon_contact_email.gif', 'en', 0, 0, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_icq', 'icon_contact_icq.gif', 'en', 0, 0, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_jabber', 'icon_contact_jabber.gif', 'en', 0, 0, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_msnm', 'icon_contact_msnm.gif', 'en', 0, 0, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_pm', 'icon_contact_pm.gif', 'en', 0, 0, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_yahoo', 'icon_contact_yahoo.gif', 'en', 0, 0, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_www', 'icon_contact_www.gif', 'en', 0, 0, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_delete', 'icon_post_delete.gif', 'en', 0, 0, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_edit', 'icon_post_edit.gif', 'en', 0, 0, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_info', 'icon_post_info.gif', 'en', 0, 0, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_quote', 'icon_post_quote.gif', 'en', 0, 0, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_report', 'icon_post_report.gif', 'en', 0, 0, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_user_online', 'icon_user_online.gif', 'en', 0, 0, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_user_offline', 'icon_user_offline.gif', 'en', 0, 0, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_user_profile', 'icon_user_profile.gif', 'en', 0, 0, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_user_search', 'icon_user_search.gif', 'en', 0, 0, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_user_warn', 'icon_user_warn.gif', 'en', 0, 0, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('button_pm_new', 'button_pm_new.gif', 'en', 0, 0, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('button_pm_reply', 'button_pm_reply.gif', 'en', 0, 0, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('button_topic_locked', 'button_topic_locked.gif', 'en', 0, 0, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('button_topic_new', 'button_topic_new.gif', 'en', 0, 0, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('button_topic_reply', 'button_topic_reply.gif', 'en', 0, 0, 2);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('site_logo', 'site_logo.gif', '', 52, 139, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_link', 'forum_link.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_read', 'forum_read.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_read_locked', 'forum_read_locked.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_read_subforum', 'forum_read_subforum.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_unread', 'forum_unread.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_unread_locked', 'forum_unread_locked.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_unread_subforum', 'forum_unread_subforum.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_moved', 'topic_moved.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read', 'topic_read.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_mine', 'topic_read_mine.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_hot', 'topic_read_hot.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_hot_mine', 'topic_read_hot_mine.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_locked', 'topic_read_locked.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_locked_mine', 'topic_read_locked_mine.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread', 'topic_unread.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_mine', 'topic_unread_mine.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_hot', 'topic_unread_hot.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_hot_mine', 'topic_unread_hot_mine.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_locked', 'topic_unread_locked.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_locked_mine', 'topic_unread_locked_mine.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read', 'sticky_read.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read_mine', 'sticky_read_mine.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read_locked', 'sticky_read_locked.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read_locked_mine', 'sticky_read_locked_mine.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread', 'sticky_unread.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread_mine', 'sticky_unread_mine.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread_locked', 'sticky_unread_locked.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread_locked_mine', 'sticky_unread_locked_mine.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read', 'announce_read.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read_mine', 'announce_read_mine.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read_locked', 'announce_read_locked.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read_locked_mine', 'announce_read_locked_mine.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread', 'announce_unread.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread_mine', 'announce_unread_mine.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread_locked', 'announce_unread_locked.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread_locked_mine', 'announce_unread_locked_mine.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read', 'announce_read.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read_mine', 'announce_read_mine.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read_locked', 'announce_read_locked.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read_locked_mine', 'announce_read_locked_mine.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread', 'announce_unread.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread_mine', 'announce_unread_mine.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread_locked', 'announce_unread_locked.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread_locked_mine', 'announce_unread_locked_mine.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('pm_read', 'topic_read.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('pm_unread', 'topic_unread.gif', '', 27, 27, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_back_top', 'icon_back_top.gif', '', 11, 11, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_aim', 'icon_contact_aim.gif', '', 20, 20, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_email', 'icon_contact_email.gif', '', 20, 20, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_icq', 'icon_contact_icq.gif', '', 20, 20, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_jabber', 'icon_contact_jabber.gif', '', 20, 20, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_msnm', 'icon_contact_msnm.gif', '', 20, 20, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_www', 'icon_contact_www.gif', '', 20, 20, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_yahoo', 'icon_contact_yahoo.gif', '', 20, 20, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_delete', 'icon_post_delete.gif', '', 20, 20, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_info', 'icon_post_info.gif', '', 20, 20, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_report', 'icon_post_report.gif', '', 20, 20, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_target', 'icon_post_target.gif', '', 9, 11, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_target_unread', 'icon_post_target_unread.gif', '', 9, 11, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_attach', 'icon_topic_attach.gif', '', 10, 7, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_latest', 'icon_topic_latest.gif', '', 9, 11, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_newest', 'icon_topic_newest.gif', '', 9, 11, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_reported', 'icon_topic_reported.gif', '', 14, 16, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_unapproved', 'icon_topic_unapproved.gif', '', 14, 16, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_user_profile', 'icon_user_profile.gif', '', 11, 11, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_user_warn', 'icon_user_warn.gif', '', 20, 20, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('subforum_read', 'subforum_read.gif', '', 9, 11, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('subforum_unread', 'subforum_unread.gif', '', 9, 11, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_pm', 'icon_contact_pm.gif', 'en', 20, 28, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_edit', 'icon_post_edit.gif', 'en', 20, 42, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_quote', 'icon_post_quote.gif', 'en', 20, 54, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_user_online', 'icon_user_online.gif', 'en', 58, 58, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_user_offline', 'icon_user_offline.gif', 'en', 0, 0, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_user_search', 'icon_user_search.gif', 'en', 0, 0, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('button_pm_forward', 'button_pm_forward.gif', 'en', 25, 96, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('button_pm_new', 'button_pm_new.gif', 'en', 25, 84, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('button_pm_reply', 'button_pm_reply.gif', 'en', 25, 96, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('button_topic_locked', 'button_topic_locked.gif', 'en', 25, 88, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('button_topic_new', 'button_topic_new.gif', 'en', 25, 96, 1);
INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('button_topic_reply', 'button_topic_reply.gif', 'en', 25, 96, 1);";
$data = str_replace('phpbb_', $table_prefix, $data);
$sql_ary = explode("\n", $data);
foreach ($sql_ary as $sql)
{
$db->sql_query($sql);
}
$user_char_ary = array('.*' => 'USERNAME_CHARS_ANY', '[a-z]+' => 'USERNAME_ALPHA_ONLY', '[-\]_+ [a-z]+' => 'USERNAME_ALPHA_SPACERS', '\w+' => 'USERNAME_LETTER_NUM', '[-\]_+ [\w]+' => 'USERNAME_LETTER_NUM_SPACERS', '[\x01-\x7F]+' => 'USERNAME_ASCII');
set_config('allow_name_chars', $config['allow_name_chars']);
// sorting thang
if ($map_dbms === 'mysql_41')
{
sql_column_change($map_dbms, TOPICS_TABLE, 'topic_title', array('XSTEXT_UNI', '', 'true_sort'));
}
if ($config['fulltext_native_common_thres'] == 20)
{
set_config('fulltext_native_common_thres', '5');
}
set_config('default_style', '1');
$sql = 'SELECT m.word_id, COUNT(m.word_id) as word_count
FROM ' . SEARCH_WORDMATCH_TABLE . ' m, ' . SEARCH_WORDLIST_TABLE . ' w
WHERE m.word_id = w.word_id
AND w.word_common = 0
GROUP BY m.word_id
ORDER BY word_count ASC';
$bots = array();
$sql = 'SELECT u.user_id
FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . ' ug
WHERE ug.group_id = ' . $bot_group_id . '
AND ug.user_id = u.user_id';
$result = $db->sql_query($sql);
$value = 0;
$sql_in = array();
while ($row = $db->sql_fetchrow($result))
{
if ($value != $row['word_count'] && $value != 0 || sizeof($sql_in) > 500)
$bots[] = (int)$row['user_id'];
}
$db->sql_freeresult($result);
if (sizeof($bots))
{
$sql = 'UPDATE ' . SEARCH_WORDLIST_TABLE . '
SET word_count = ' . $value . '
WHERE ' . $db->sql_in_set('word_id', $sql_in);
$sql = 'DELETE FROM ' . USER_GROUP_TABLE . "
WHERE group_id <> $bot_group_id
AND " . $db->sql_in_set('user_id', $bots);
$db->sql_query($sql);
$sql_in = array();
}
$value = $row['word_count'];
$sql_in[] = $row['word_id'];
}
if (sizeof($sql_in))
if ($map_dbms === 'mysql_41')
{
$sql = 'UPDATE ' . SEARCH_WORDLIST_TABLE . '
SET word_count = ' . $value . '
WHERE ' . $db->sql_in_set('word_id', $sql_in);
$db->sql_query($sql);
sql_column_change($map_dbms, POSTS_TABLE, 'post_subject', array('XSTEXT_UNI', '', 'true_sort'));
}
unset($sql_in);
set_config('avatar_salt', md5(mt_rand()));
set_config('captcha_gd_x_grid', 25);
set_config('captcha_gd_y_grid', 25);
set_config('captcha_gd_foreground_noise', 1);
$sql = 'DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = 'jab_resource'";
_sql($sql, $errored, $error_ary);
$sql = 'UPDATE ' . ACL_OPTIONS_TABLE . "
SET is_local = 0
WHERE auth_option = 'm_warn'";
$db->sql_query($sql);
$cache->destroy('_acl_options');
$sql = 'UPDATE ' . MODULES_TABLE . '
SET module_auth = \'acl_m_warn && acl_f_read,$id\'
WHERE module_basename = \'warn\'
AND module_mode = \'warn_post\'
AND module_class = \'mcp\'';
$db->sql_query($sql);
$cache->destroy('_modules_mcp');
$sql = 'UPDATE ' . USERS_TABLE . " SET user_permissions = ''";
$db->sql_query($sql);
set_config('jab_use_ssl', '0');
set_config('allow_post_flash', '1');
$no_updates = false;
}
//if (version_compare($current_version, '3.0.RC2', '<='))
//{
// $no_updates = false;
//}
_write_result($no_updates, $errored, $error_ary);
$error_ary = array();
@ -1220,7 +693,7 @@ else
<p><?php echo ((isset($lang['INLINE_UPDATE_SUCCESSFUL'])) ? $lang['INLINE_UPDATE_SUCCESSFUL'] : 'The database update was successful. Now you need to continue the update process.'); ?></p>
<p><a href="<?php echo append_sid("{$phpbb_root_path}install/index.{$phpEx}", "mode=update&amp;sub=file_check&amp;lang=$language"); ?>">&raquo; <?php echo (isset($lang['CONTINUE_UPDATE_NOW'])) ? $lang['CONTINUE_UPDATE_NOW'] : 'Continue the update process now'; ?></a></p>
<p><a href="<?php echo append_sid("{$phpbb_root_path}install/index.{$phpEx}", "mode=update&amp;sub=file_check&amp;lang=$language"); ?>" class="button1"><?php echo (isset($lang['CONTINUE_UPDATE_NOW'])) ? $lang['CONTINUE_UPDATE_NOW'] : 'Continue the update process now'; ?></a></p>
<?php
}

View file

@ -104,7 +104,30 @@ else
// Try to override some limits - maybe it helps some...
@set_time_limit(0);
@ini_set('memory_limit', '128M');
$mem_limit = @ini_get('memory_limit');
if (!empty($mem_limit ))
{
$unit = strtolower(substr($mem_limit, -1, 1));
$mem_limit = (int)$mem_limit;
if ($unit == 'k')
{
$mem_limit = floor($mem_limit/1024);
}
else if ($unit == 'g')
{
$mem_limit *= 1024;
}
else if (is_numeric($unit))
{
$mem_limit = floor($mem_limit/1048576);
}
$mem_limit = max(128, $mem_limit) . 'M';
}
else
{
$mem_limit = '128M';
}
@ini_set('memory_limit', $mem_limit );
// Include essential scripts
require($phpbb_root_path . 'includes/functions.' . $phpEx);

View file

@ -572,6 +572,8 @@ class install_convert extends module
}
$template->assign_vars(array(
'TITLE' => $lang['STAGE_SETTINGS'],
'BODY' => $lang['CONV_OPTIONS_BODY'],
'L_SUBMIT' => $lang['BEGIN_CONVERT'],
'U_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&amp;sub=settings&amp;tag=$convertor_tag",
));
@ -1110,6 +1112,20 @@ class install_convert extends module
case 'postgres':
$db->sql_query("SELECT SETVAL('" . $schema['target'] . "_seq',(select case when max(" . $schema['autoincrement'] . ")>0 then max(" . $schema['autoincrement'] . ")+1 else 1 end from " . $schema['target'] . '));');
break;
case 'oracle':
$result = $db->sql_query('SELECT MAX(' . $schema['autoincrement'] . ') as max_id FROM ' . $schema['target']);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$largest_id = (int) $row['max_id'];
if ($largest_id)
{
$db->sql_query('DROP SEQUENCE ' . $schema['target'] . '_seq');
$db->sql_query('CREATE SEQUENCE ' . $schema['target'] . '_seq START WITH ' . ($largest_id + 1));
}
break;
}
}
}
@ -1157,12 +1173,29 @@ class install_convert extends module
$sql .= (!empty($schema['where'])) ? "\nWHERE (" . $schema['where'] . ')' : '';
// Group By
$sql .= (!empty($schema['group_by'])) ? "\nGROUP BY " . $schema['group_by'] : '';
if (!empty($schema['group_by']))
{
$schema['group_by'] = array($schema['group_by']);
foreach($sql_data['select_fields'] as $select)
{
$alias = strpos(strtolower($select), ' as ');
$select = ($alias) ? substr($select, 0, $alias) : $select;
if (!in_array($select, $schema['group_by']))
{
$schema['group_by'][] = $select;
}
}
}
$sql .= (!empty($schema['group_by'])) ? "\nGROUP BY " . implode(', ', $schema['group_by']) : '';
// Having
$sql .= (!empty($schema['having'])) ? "\nHAVING " . $schema['having'] : '';
// Order By
if (empty($schema['order_by']) && !empty($schema['primary']))
{
$schema['order_by'] = $schema['primary'];
}
$sql .= (!empty($schema['order_by'])) ? "\nORDER BY " . $schema['order_by'] : '';
// Counting basically holds the amount of rows processed.
@ -1228,7 +1261,6 @@ class install_convert extends module
if (!$convert_row)
{
// move to the next batch or table
$src_db->sql_freeresult($___result);
break;
}
@ -1349,6 +1381,20 @@ class install_convert extends module
case 'postgres':
$db->sql_query("SELECT SETVAL('" . $schema['target'] . "_seq',(select case when max(" . $schema['autoincrement'] . ")>0 then max(" . $schema['autoincrement'] . ")+1 else 1 end from " . $schema['target'] . '));');
break;
case 'oracle':
$result = $db->sql_query('SELECT MAX(' . $schema['autoincrement'] . ') as max_id FROM ' . $schema['target']);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$largest_id = (int) $row['max_id'];
if ($largest_id)
{
$db->sql_query('DROP SEQUENCE ' . $schema['target'] . '_seq');
$db->sql_query('CREATE SEQUENCE ' . $schema['target'] . '_seq START WITH ' . ($largest_id + 1));
}
break;
}
}
}

View file

@ -63,7 +63,7 @@ class install_install extends module
$template->assign_vars(array(
'TITLE' => $lang['INSTALL_INTRO'],
'BODY' => $lang['INSTALL_INTRO_BODY'],
'L_SUBMIT' => $lang['NEXT'],
'L_SUBMIT' => $lang['NEXT_STEP'],
'S_LANG_SELECT' => '<select id="language" name="language">' . $this->p_master->inst_language_select($language) . '</select>',
'U_ACTION' => $this->p_master->module_url . "?mode=$mode&amp;sub=requirements&amp;language=$language",
));
@ -1359,7 +1359,10 @@ class install_install extends module
// We set a (semi-)unique cookie name to bypass login issues related to the cookie name.
$cookie_name = 'phpbb3_';
$cookie_name .= strtolower(gen_rand_string(5));
$rand_str = md5(mt_rand());
$rand_str = str_replace('0', 'z', base_convert($rand_str, 16, 35));
$rand_str = substr($rand_str, 0, 5);
$cookie_name .= strtolower($rand_str);
$sql_ary[] = 'UPDATE ' . $table_prefix . "config
SET config_value = '" . $db->sql_escape($cookie_name) . "'
@ -1642,14 +1645,19 @@ class install_install extends module
AND module_class = '" . $db->sql_escape($module_class) . "'
AND module_basename <> ''";
$result = $db->sql_query_limit($sql, 1);
$module_data = $db->sql_fetchrow($result);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
unset($module_data['module_id']);
unset($module_data['left_id']);
unset($module_data['right_id']);
$module_data['parent_id'] = (int) $row2['module_id'];
$module_data = array(
'module_basename' => $row['module_basename'],
'module_enabled' => $row['module_enabled'],
'module_display' => $row['module_display'],
'parent_id' => (int) $row2['module_id'],
'module_class' => $row['module_class'],
'module_langname' => $row['module_langname'],
'module_mode' => $row['module_mode'],
'module_auth' => $row['module_auth'],
);
$_module->update_module_data($module_data, true);

View file

@ -108,6 +108,9 @@ class install_update extends module
}
$db->sql_freeresult($result);
// Force template recompile
$config['load_tplcompile'] = 1;
// First of all, init the user session
$user->session_begin();
$auth->acl($user->data);
@ -267,7 +270,7 @@ class install_update extends module
$template->assign_vars(array(
'S_DB_UPDATE' => true,
'S_DB_UPDATE_FINISHED' => ($config['version'] == $this->latest_version) ? true : false,
'U_DB_UPDATE' => append_sid($phpbb_root_path . 'install/database_update.' . $phpEx, 'type=1&amp;language=' . $language),
'U_DB_UPDATE' => append_sid($phpbb_root_path . 'install/database_update.' . $phpEx, 'type=1&amp;language=' . $user->data['user_lang']),
'U_DB_UPDATE_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&amp;sub=update_db"),
'U_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&amp;sub=file_check"),
));
@ -1172,8 +1175,8 @@ class install_update extends module
{
// Adjust the update info file to hold some specific style-related information
$info['custom'] = array();
/* Get custom installed styles...
/*
// Get custom installed styles...
$sql = 'SELECT template_name, template_path
FROM ' . STYLES_TEMPLATE_TABLE . "
WHERE LOWER(template_name) NOT IN ('subsilver2', 'prosilver')";
@ -1191,16 +1194,16 @@ class install_update extends module
foreach ($info['files'] as $filename)
{
// Template update?
if (strpos(strtolower($filename), 'styles/subsilver2/template/') === 0)
if (strpos(strtolower($filename), 'styles/prosilver/template/') === 0)
{
foreach ($templates as $row)
{
$info['custom'][$filename][] = str_replace('/subsilver2/', '/' . $row['template_path'] . '/', $filename);
$info['custom'][$filename][] = str_replace('/prosilver/', '/' . $row['template_path'] . '/', $filename);
}
}
}
}
*/
*/
}
break;

View file

@ -112,7 +112,7 @@ CREATE TABLE phpbb_acl_roles_data (
ALTER TABLE phpbb_acl_roles_data ADD PRIMARY KEY (role_id, auth_option_id);;
CREATE INDEX phpbb_acl_roles_data_ath_opt_id ON phpbb_acl_roles_data(auth_option_id);;
CREATE INDEX phpbb_acl_roles_data_ath_op_id ON phpbb_acl_roles_data(auth_option_id);;
# Table: 'phpbb_acl_users'
CREATE TABLE phpbb_acl_users (
@ -1176,7 +1176,7 @@ CREATE TABLE phpbb_styles_imageset_data (
ALTER TABLE phpbb_styles_imageset_data ADD PRIMARY KEY (image_id);;
CREATE INDEX phpbb_styles_imageset_data_i_id ON phpbb_styles_imageset_data(imageset_id);;
CREATE INDEX phpbb_styles_imageset_data_i_d ON phpbb_styles_imageset_data(imageset_id);;
CREATE GENERATOR phpbb_styles_imageset_data_gen;;
SET GENERATOR phpbb_styles_imageset_data_gen TO 0;;

View file

@ -141,7 +141,7 @@ ALTER TABLE [phpbb_acl_roles_data] WITH NOCHECK ADD
) ON [PRIMARY]
GO
CREATE INDEX [ath_opt_id] ON [phpbb_acl_roles_data]([auth_option_id]) ON [PRIMARY]
CREATE INDEX [ath_op_id] ON [phpbb_acl_roles_data]([auth_option_id]) ON [PRIMARY]
GO
@ -1392,7 +1392,7 @@ ALTER TABLE [phpbb_styles_imageset_data] WITH NOCHECK ADD
) ON [PRIMARY]
GO
CREATE INDEX [i_id] ON [phpbb_styles_imageset_data]([imageset_id]) ON [PRIMARY]
CREATE INDEX [i_d] ON [phpbb_styles_imageset_data]([imageset_id]) ON [PRIMARY]
GO

View file

@ -72,7 +72,7 @@ CREATE TABLE phpbb_acl_roles_data (
auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
auth_setting tinyint(2) DEFAULT '0' NOT NULL,
PRIMARY KEY (role_id, auth_option_id),
KEY ath_opt_id (auth_option_id)
KEY ath_op_id (auth_option_id)
);
@ -788,7 +788,7 @@ CREATE TABLE phpbb_styles_imageset_data (
image_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
imageset_id tinyint(4) DEFAULT '0' NOT NULL,
PRIMARY KEY (image_id),
KEY i_id (imageset_id)
KEY i_d (imageset_id)
);

View file

@ -72,7 +72,7 @@ CREATE TABLE phpbb_acl_roles_data (
auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
auth_setting tinyint(2) DEFAULT '0' NOT NULL,
PRIMARY KEY (role_id, auth_option_id),
KEY ath_opt_id (auth_option_id)
KEY ath_op_id (auth_option_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
@ -436,7 +436,7 @@ CREATE TABLE phpbb_posts (
enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
post_username varchar(255) DEFAULT '' NOT NULL,
post_subject varchar(100) DEFAULT '' NOT NULL,
post_subject varchar(100) DEFAULT '' NOT NULL COLLATE utf8_unicode_ci,
post_text mediumtext NOT NULL,
post_checksum varchar(32) DEFAULT '' NOT NULL,
post_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
@ -788,7 +788,7 @@ CREATE TABLE phpbb_styles_imageset_data (
image_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
imageset_id tinyint(4) DEFAULT '0' NOT NULL,
PRIMARY KEY (image_id),
KEY i_id (imageset_id)
KEY i_d (imageset_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;

View file

@ -187,7 +187,7 @@ CREATE TABLE phpbb_acl_roles_data (
)
/
CREATE INDEX phpbb_acl_roles_data_ath_opt_id ON phpbb_acl_roles_data (auth_option_id)
CREATE INDEX phpbb_acl_roles_data_ath_op_id ON phpbb_acl_roles_data (auth_option_id)
/
/*
@ -1560,7 +1560,7 @@ CREATE TABLE phpbb_styles_imageset_data (
)
/
CREATE INDEX phpbb_styles_imageset_data_i_id ON phpbb_styles_imageset_data (imageset_id)
CREATE INDEX phpbb_styles_imageset_data_i_d ON phpbb_styles_imageset_data (imageset_id)
/
CREATE SEQUENCE phpbb_styles_imageset_data_seq

View file

@ -169,7 +169,7 @@ CREATE TABLE phpbb_acl_roles_data (
PRIMARY KEY (role_id, auth_option_id)
);
CREATE INDEX phpbb_acl_roles_data_ath_opt_id ON phpbb_acl_roles_data (auth_option_id);
CREATE INDEX phpbb_acl_roles_data_ath_op_id ON phpbb_acl_roles_data (auth_option_id);
/*
Table: 'phpbb_acl_users'
@ -1039,7 +1039,7 @@ CREATE TABLE phpbb_styles_imageset_data (
PRIMARY KEY (image_id)
);
CREATE INDEX phpbb_styles_imageset_data_i_id ON phpbb_styles_imageset_data (imageset_id);
CREATE INDEX phpbb_styles_imageset_data_i_d ON phpbb_styles_imageset_data (imageset_id);
/*
Table: 'phpbb_topics'

View file

@ -20,6 +20,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_name_chars',
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_namechange', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_nocensors', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_pm_attach', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_post_flash', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_post_links', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_privmsg', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig', '1');
@ -113,7 +114,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_host', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_password', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_package_size', '20');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_port', '5222');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_resource', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_use_ssl', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_username', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_base_dn', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_email', '');
@ -148,7 +149,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_login_attempts
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_name_chars', '20');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_pass_chars', '30');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_poll_options', '10');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_chars', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_chars', '60000');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_font_size', '200');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_img_height', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_img_width', '0');
@ -204,7 +205,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page',
INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.RC1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.RC2');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400');
@ -537,7 +538,7 @@ INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 14, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%';
# Standard Access (f_)
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 15, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_ignoreflood', 'f_poll', 'f_sticky', 'f_user_lock');
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 15, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_flash', 'f_ignoreflood', 'f_poll', 'f_sticky', 'f_user_lock');
# No Access (f_)
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 16, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option = 'f_';
@ -556,7 +557,7 @@ INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 20, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_noapprove');
# Standard Access + Polls (f_)
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 21, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_ignoreflood', 'f_sticky', 'f_user_lock');
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 21, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_flash', 'f_ignoreflood', 'f_sticky', 'f_user_lock');
# Limited Access + Polls (f_)
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 22, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_attach', 'f_bump', 'f_delete', 'f_flash', 'f_icons', 'f_ignoreflood', 'f_sticky', 'f_user_lock', 'f_votechg');
@ -677,11 +678,11 @@ INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, disp
INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/question.gif', 16, 16, 6, 1);
INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/alert.gif', 16, 16, 7, 1);
# -- reasons - the report_description here is not used, only to fill up the db. ;)
INSERT INTO phpbb_reports_reasons (reason_title, reason_description, reason_order) VALUES ('warez', 'The reported post contains links to pirated or illegal software', 1);
INSERT INTO phpbb_reports_reasons (reason_title, reason_description, reason_order) VALUES ('spam', 'The reported post has for only purpose to advertise for a website or another product', 2);
INSERT INTO phpbb_reports_reasons (reason_title, reason_description, reason_order) VALUES ('off_topic', 'The reported post is off topic', 3);
INSERT INTO phpbb_reports_reasons (reason_title, reason_description, reason_order) VALUES ('other', 'The reported post does not fit into any other category (please use the description field)', 4);
# -- reasons
INSERT INTO phpbb_reports_reasons (reason_title, reason_description, reason_order) VALUES ('warez', '{L_REPORT_WAREZ}', 1);
INSERT INTO phpbb_reports_reasons (reason_title, reason_description, reason_order) VALUES ('spam', '{L_REPORT_SPAM}', 2);
INSERT INTO phpbb_reports_reasons (reason_title, reason_description, reason_order) VALUES ('off_topic', '{L_REPORT_OFF_TOPIC}', 3);
INSERT INTO phpbb_reports_reasons (reason_title, reason_description, reason_order) VALUES ('other', '{L_REPORT_OTHER}', 4);
# -- extension_groups
INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('{L_EXT_GROUP_IMAGES}', 1, 1, 1, '', 0, '');

View file

@ -73,7 +73,7 @@ CREATE TABLE phpbb_acl_roles_data (
PRIMARY KEY (role_id, auth_option_id)
);
CREATE INDEX phpbb_acl_roles_data_ath_opt_id ON phpbb_acl_roles_data (auth_option_id);
CREATE INDEX phpbb_acl_roles_data_ath_op_id ON phpbb_acl_roles_data (auth_option_id);
# Table: 'phpbb_acl_users'
CREATE TABLE phpbb_acl_users (
@ -761,7 +761,7 @@ CREATE TABLE phpbb_styles_imageset_data (
imageset_id tinyint(4) NOT NULL DEFAULT '0'
);
CREATE INDEX phpbb_styles_imageset_data_i_id ON phpbb_styles_imageset_data (imageset_id);
CREATE INDEX phpbb_styles_imageset_data_i_d ON phpbb_styles_imageset_data (imageset_id);
# Table: 'phpbb_topics'
CREATE TABLE phpbb_topics (

View file

@ -102,6 +102,7 @@ $lang = array_merge($lang, array(
'ALLOW_BBCODE_PM' => 'Allow BBCode in private messages',
'ALLOW_FLASH_PM' => 'Allow use of <code>[FLASH]</code> BBCode tag',
'ALLOW_FLASH_PM_EXPLAIN' => 'Note that the ability to use flash in private messages, if enabled here, also depends on the permissions.',
'ALLOW_FORWARD_PM' => 'Allow forwarding of private messages',
'ALLOW_IMG_PM' => 'Allow use of <code>[IMG]</code> BBCode tag',
'ALLOW_MASS_PM' => 'Allow sending of private messages to multiple users and groups',
@ -126,6 +127,8 @@ $lang = array_merge($lang, array(
'ACP_POST_SETTINGS_EXPLAIN' => 'Here you can set all default settings for posting.',
'ALLOW_POST_LINKS' => 'Allow links in posts/private messages',
'ALLOW_POST_LINKS_EXPLAIN' => 'If disallowed the <code>[URL]</code> BBCode tag and automatic/magic URLs are disabled.',
'ALLOW_POST_FLASH' => 'Allow use of <code>[FLASH]</code> BBCode tag in posts. ',
'ALLOW_POST_FLASH_EXPLAIN' => 'If disallowed the <code>[FLASH]</code> BBCode tag is disabled in posts. Otherwise the permission system controls which users can use the <code>[FLASH]</code> BBCode tag.',
'BUMP_INTERVAL' => 'Bump interval',
'BUMP_INTERVAL_EXPLAIN' => 'Number of minutes, hours or days between the last post to a topic and the ability to bump this topic.',
@ -181,10 +184,10 @@ $lang = array_merge($lang, array(
'ACC_ACTIVATION' => 'Account activation',
'ACC_ACTIVATION_EXPLAIN' => 'This determines whether users have immediate access to the board or if confirmation is required. You can also completely disable new registrations.',
'ACC_ADMIN' => 'Admin',
'ACC_ADMIN' => 'By Admin',
'ACC_DISABLE' => 'Disable',
'ACC_NONE' => 'None',
'ACC_USER' => 'User',
'ACC_USER' => 'By User',
// 'ACC_USER_ADMIN' => 'User + Admin',
'ALLOW_EMAIL_REUSE' => 'Allow e-mail address re-use',
'ALLOW_EMAIL_REUSE_EXPLAIN' => 'Different users can register with the same e-mail address.',
@ -193,7 +196,7 @@ $lang = array_merge($lang, array(
'COPPA_MAIL' => 'COPPA mailing address',
'COPPA_MAIL_EXPLAIN' => 'This is the mailing address where parents will send COPPA registration forms.',
'ENABLE_COPPA' => 'Enable COPPA',
'ENABLE_COPPA_EXPLAIN' => 'This requires users to declare whether they are 13 or over for compliance with the U.S. COPPA Act. If this is disabled the COPPA specific groups will no longer be displayed.',
'ENABLE_COPPA_EXPLAIN' => 'This requires users to declare whether they are 13 or over for compliance with the U.S. COPPA. If this is disabled the COPPA specific groups will no longer be displayed.',
'MAX_CHARS' => 'Max',
'MIN_CHARS' => 'Min',
'NO_AUTH_PLUGIN' => 'No suitable auth plugin found.',
@ -412,32 +415,24 @@ $lang = array_merge($lang, array(
// Jabber settings
$lang = array_merge($lang, array(
'ACP_JABBER_SETTINGS_EXPLAIN' => 'Here you can enable and control the use of Jabber for instant messaging and board notifications. Jabber is an open source protocol and therefore available for use by anyone. Some Jabber servers include gateways or transports which allow you to contact users on other networks. Not all servers offer all transports and changes in protocols can prevent transports from operating. Note that it may take several seconds to update Jabber account details, so do not stop the script until it is completed!',
'ACP_JABBER_SETTINGS_EXPLAIN' => 'Here you can enable and control the use of Jabber for instant messaging and board notifications. Jabber is an open source protocol and therefore available for use by anyone. Some Jabber servers include gateways or transports which allow you to contact users on other networks. Not all servers offer all transports and changes in protocols can prevent transports from operating. Please be sure to enter already registered account details - phpBB will use the details you enter here as is.',
'ERR_JAB_AUTH' => 'Could not authorise on Jabber server.',
'ERR_JAB_CONNECT' => 'Could not connect to Jabber server.',
'ERR_JAB_PASSCHG' => 'Could not change password.',
'ERR_JAB_PASSFAIL' => 'Password update failed, %s.',
'ERR_JAB_REGISTER' => 'An error occurred trying to register this account, %s.',
'ERR_JAB_USERNAME' => 'The username specified already exists, please choose an alternative.',
'JAB_CHANGED' => 'Jabber account changed successfully.',
'JAB_ENABLE' => 'Enable Jabber',
'JAB_ENABLE_EXPLAIN' => 'Enables use of Jabber messaging and notifications.',
'JAB_PACKAGE_SIZE' => 'Jabber package size',
'JAB_PACKAGE_SIZE_EXPLAIN' => 'This is the number of messages sent in one package. If set to 0 the message is sent immediately and is not queued for later sending.',
'JAB_PACKAGE_SIZE_EXPLAIN' => 'This is the number of messages sent in one package. If set to 0 the message is sent immediately and will not be queued for later sending.',
'JAB_PASSWORD' => 'Jabber password',
'JAB_PASS_CHANGED' => 'Jabber password changed successfully.',
'JAB_PORT' => 'Jabber port',
'JAB_PORT_EXPLAIN' => 'Leave blank unless you know it is not port 5222.',
'JAB_REGISTERED' => 'New account registered successfully.',
'JAB_RESOURCE' => 'Jabber resource',
'JAB_RESOURCE_EXPLAIN' => 'The resource locates this particular connection, e.g. board, home, etc.',
'JAB_SERVER' => 'Jabber server',
'JAB_SERVER_EXPLAIN' => 'See %sjabber.org%s for a list of servers.',
'JAB_SETTINGS_CHANGED' => 'Jabber settings changed successfully.',
'JAB_USE_SSL' => 'Use SSL to connect',
'JAB_USE_SSL_EXPLAIN' => 'If enabled a secure connection is tried to be established. The Jabber port will be modified to 5223 if port 5222 is specified.',
'JAB_USERNAME' => 'Jabber username',
'JAB_USERNAME_EXPLAIN' => 'If this user is not registered it will be created if possible.',
'JAB_USERNAME_EXPLAIN' => 'Specify a registered username. The username will not be checked for validity.',
));
?>

View file

@ -466,8 +466,8 @@ $lang = array_merge($lang, array(
'LOG_POST_EDITED' => '<strong>Edited post “%1$s” written by</strong><br />» %2$s',
'LOG_REPORT_CLOSED' => '<strong>Closed report</strong><br />» %s',
'LOG_REPORT_DELETED' => '<strong>Deleted report</strong><br />» %s',
'LOG_SPLIT_DESTINATION' => '<strong>Moved splitted posts</strong><br />» to %s',
'LOG_SPLIT_SOURCE' => '<strong>Splitted posts</strong><br />» from %s',
'LOG_SPLIT_DESTINATION' => '<strong>Moved split posts</strong><br />» to %s',
'LOG_SPLIT_SOURCE' => '<strong>Split posts</strong><br />» from %s',
'LOG_TOPIC_DELETED' => '<strong>Deleted topic</strong><br />» %s',
'LOG_TOPIC_APPROVED' => '<strong>Approved topic</strong><br />» %s',
@ -647,7 +647,7 @@ $lang = array_merge($lang, array(
'LOG_USER_DEL_AVATAR_USER' => '<strong>User avatar removed</strong>',
'LOG_USER_DEL_SIG_USER' => '<strong>User signature removed</strong>',
'LOG_USER_FEEDBACK' => '<strong>Added user feedback</strong><br />» %s',
'LOG_USER_GENERAL' => '%s',
'LOG_USER_GENERAL' => '<strong>Entry added:</strong><br />» %s',
'LOG_USER_INACTIVE_USER' => '<strong>User account de-activated</strong>',
'LOG_USER_LOCK' => '<strong>User locked own topic</strong><br />» %s',
'LOG_USER_MOVE_POSTS_USER' => '<strong>Moved all posts to forum</strong>» %s',

View file

@ -33,7 +33,7 @@ if (empty($lang) || !is_array($lang))
// Database Backup/Restore
$lang = array_merge($lang, array(
'ACP_BACKUP_EXPLAIN' => 'Here you can backup all your phpBB related data. You may store the resulting archive in your <samp>store/</samp> folder or download it directly. Depending on your server configuration you may be able to compress the file in a number of formats.',
'ACP_RESTORE_EXPLAIN' => 'This will perform a full restore of all phpBB tables from a saved file. If your server supports it you may use a gzip or bzip2 compressed text file and it will automatically be decompressed. <strong>WARNING</strong> This will overwrite any existing data. The restore may take a long time to process please do not move from this page till it is complete.',
'ACP_RESTORE_EXPLAIN' => 'This will perform a full restore of all phpBB tables from a saved file. If your server supports it you may use a gzip or bzip2 compressed text file and it will automatically be decompressed. <strong>WARNING</strong> This will overwrite any existing data. The restore may take a long time to process please do not move from this page till it is complete. Backups are stored in the <samp>store/</samp> folder and are assumed to be generated by phpBB\'s backup functionality. Restoring backups that were not created by the built in system may or may not work.',
'BACKUP_DELETE' => 'The backup file has been deleted successfully.',
'BACKUP_INVALID' => 'The selected file to backup is invalid.',

View file

@ -41,6 +41,7 @@ $lang = array_merge($lang, array(
'GROUPS_NO_MEMBERS' => 'This group has no members',
'GROUPS_NO_MODS' => 'No group leaders defined',
'GROUP_APPROVE' => 'Approve member',
'GROUP_APPROVED' => 'Approved members',
'GROUP_AVATAR' => 'Group avatar',
@ -48,6 +49,8 @@ $lang = array_merge($lang, array(
'GROUP_CLOSED' => 'Closed',
'GROUP_COLOR' => 'Group colour',
'GROUP_COLOR_EXPLAIN' => 'Defines the colour members usernames will appear in, leave blank for user default.',
'GROUP_CONFIRM_ADD_USER' => 'Are you sure that you want to add the user %1$s to the group?',
'GROUP_CONFIRM_ADD_USERS' => 'Are you sure that you want to add the users %1$s to the group?',
'GROUP_CREATED' => 'Group has been created successfully.',
'GROUP_DEFAULT' => 'Make group default for member',
'GROUP_DEFS_UPDATED' => 'Default group set for all selected members.',
@ -90,6 +93,7 @@ $lang = array_merge($lang, array(
'GROUP_TYPE' => 'Group type',
'GROUP_TYPE_EXPLAIN' => 'This determines which users can join or view this group.',
'GROUP_UPDATED' => 'Group preferences updated successfully.',
'GROUP_USERS_ADDED' => 'New users added to group successfully.',
'GROUP_USERS_EXIST' => 'The selected users are already members.',
'GROUP_USERS_REMOVE' => 'Users removed from group and new defaults set successfully.',

View file

@ -130,7 +130,7 @@ $lang = array_merge($lang, array(
'acl_f_read' => array('lang' => 'Can read forum', 'cat' => 'post'),
'acl_f_post' => array('lang' => 'Can start new topics', 'cat' => 'post'),
'acl_f_reply' => array('lang' => 'Can reply to topics', 'cat' => 'post'),
'acl_f_icons' => array('lang' => 'Can use post icons', 'cat' => 'post'),
'acl_f_icons' => array('lang' => 'Can use topic/post icons', 'cat' => 'post'),
'acl_f_announce' => array('lang' => 'Can post announcements', 'cat' => 'post'),
'acl_f_sticky' => array('lang' => 'Can post stickies', 'cat' => 'post'),
@ -191,7 +191,7 @@ $lang = array_merge($lang, array(
'acl_a_forumdel' => array('lang' => 'Can delete forums', 'cat' => 'forums'),
'acl_a_prune' => array('lang' => 'Can prune forums', 'cat' => 'forums'),
'acl_a_icons' => array('lang' => 'Can alter topic icons and smilies', 'cat' => 'posting'),
'acl_a_icons' => array('lang' => 'Can alter topic/post icons and smilies', 'cat' => 'posting'),
'acl_a_words' => array('lang' => 'Can alter word censors', 'cat' => 'posting'),
'acl_a_bbcode' => array('lang' => 'Can define BBCode tags', 'cat' => 'posting'),
'acl_a_attach' => array('lang' => 'Can alter attachment related settings', 'cat' => 'posting'),

View file

@ -43,6 +43,7 @@ $lang = array_merge($lang, array(
'BBCODE_HELPLINE_EXPLAIN' => 'This field contains the mouse over text of the BBCode.',
'BBCODE_HELPLINE_TEXT' => 'Help line text',
'BBCODE_INVALID_TAG_NAME' => 'The BBCode tag name that you selected already exists.',
'BBCODE_INVALID' => 'Your BBCode is constructed in an invalid form.',
'BBCODE_OPEN_ENDED_TAG' => 'Your custom BBCode must contain both an opening and a closing tag.',
'BBCODE_TAG' => 'Tag',
'BBCODE_TAG_TOO_LONG' => 'The tag name you selected is too long.',

View file

@ -110,7 +110,6 @@ $lang = array_merge($lang, array(
'NO_VALUE_OPTION_EXPLAIN' => 'Value for a non-entry. If the field is required, the user gets an error if he choose the option selected here.',
'NUMBERS_ONLY' => 'Only numbers (0-9)',
'PREVIEW_PROFILE_FIELD' => 'Preview profile field',
'PROFILE_BASIC_OPTIONS' => 'Basic options',
'PROFILE_FIELD_ACTIVATED' => 'Profile field successfully activated.',
'PROFILE_FIELD_DEACTIVATED' => 'Profile field successfully deactivated.',
@ -130,7 +129,7 @@ $lang = array_merge($lang, array(
'STEP_1_TITLE_CREATE' => 'Add profile field',
'STEP_1_TITLE_EDIT' => 'Edit profile field',
'STEP_2_EXPLAIN_CREATE' => 'Here you are able to define some common options you may want to adjust.',
'STEP_2_EXPLAIN_EDIT' => 'Here you are able to change some common options. Further you are able to preview the changed field, as the user will see it. Play around with it until you are satisfied as how the field behaves.<br /><strong>Please note that changes to profile fields will not affect existing profile fields entered by your users.</strong>',
'STEP_2_EXPLAIN_EDIT' => 'Here you are able to change some common options.<br /><strong>Please note that changes to profile fields will not affect existing profile fields entered by your users.</strong>',
'STEP_2_TITLE_CREATE' => 'Profile type specific options',
'STEP_2_TITLE_EDIT' => 'Profile type specific options',
'STEP_3_EXPLAIN_CREATE' => 'Since you have more than one board language installed, you have to fill out the remaining language items too. The profile field will work with the default language enabled, you are able to fill out the remaining language items later too.',
@ -142,7 +141,6 @@ $lang = array_merge($lang, array(
'TEXT_DEFAULT_VALUE_EXPLAIN' => 'Enter a default text to be displayed, a default value. Leave empty if you want to show it empty at the first place.',
'TRANSLATE' => 'Translate',
'UPDATE_PREVIEW' => 'Update preview',
'USER_FIELD_NAME' => 'Field name/title presented to the user',
'VISIBILITY_OPTION' => 'Visibility option',

View file

@ -32,7 +32,7 @@ if (empty($lang) || !is_array($lang))
$lang = array_merge($lang, array(
'ACP_IMAGESETS_EXPLAIN' => 'Imagesets comprise all the button, forum, folder, etc. and other non-style specific images used by the board. Here you can edit, export or delete existing imagesets and import or activate new sets.',
'ACP_STYLES_EXPLAIN' => 'Here you can manage the available styles on your board. A style consists off a template, theme and imageset. You may alter existing styles, delete, deactivate, reactivate, create or import new ones. You can also see what a style will look like using the preview function. The current default style is noted by the presence of an asterisk (*). Also listed is the total user count for each style, note that overriding user styles will not be reflected here.',
'ACP_STYLES_EXPLAIN' => 'Here you can manage the available styles on your board. A style consists of a template, theme and imageset. You may alter existing styles, delete, deactivate, reactivate, create or import new ones. You can also see what a style will look like using the preview function. The current default style is noted by the presence of an asterisk (*). Also listed is the total user count for each style, note that overriding user styles will not be reflected here.',
'ACP_TEMPLATES_EXPLAIN' => 'A template set comprises all the markup used to generate the layout of your board. Here you can edit existing template sets, delete, export, import and preview sets. You can also modify the templating code used to generate BBCode.',
'ACP_THEMES_EXPLAIN' => 'From here you can create, install, edit, delete and export themes. A theme is the combination of colours and images that are applied to your templates to define the basic look of your board. The range of options open to you depends on the configuration of your server and phpBB installation, see the manual for further details. Please note that when creating new themes the use of an existing theme as a basis is optional.',
'ADD_IMAGESET' => 'Create imageset',
@ -44,6 +44,7 @@ $lang = array_merge($lang, array(
'ADD_THEME' => 'Create theme',
'ADD_THEME_EXPLAIN' => 'Here you can add a new theme. Depending on your server configuration and file permissions you may have additional options here. For example you may be able to base this theme on an existing one. You may also be able to upload or import (from the store directory) a theme archive. If you upload or import an archive the theme name can be optionally taken from the archive name (to do this leave the theme name blank).',
'ARCHIVE_FORMAT' => 'Archive file type',
'AUTOMATIC_EXPLAIN' => 'Leave blank to attempt automatic detection.',
'BACKGROUND' => 'Background',
'BACKGROUND_COLOUR' => 'Background colour',

View file

@ -47,7 +47,7 @@ $lang = array_merge($lang, array(
'CANNOT_FORCE_REACT_YOURSELF' => 'You are not allowed to force reactivation of your own account.',
'CANNOT_REMOVE_ANONYMOUS' => 'You are not able to remove the guest user account.',
'CANNOT_REMOVE_YOURSELF' => 'You are not allowed to remove your own user account.',
'CANNOT_SET_FOUNDER_BOT' => 'You are not able to promote ignored users to be founders.',
'CANNOT_SET_FOUNDER_IGNORED' => 'You are not able to promote ignored users to be founders.',
'CANNOT_SET_FOUNDER_INACTIVE' => 'You need to activate users before you promote them to founders, only activated users are able to be promoted.',
'CONFIRM_EMAIL_EXPLAIN' => 'You only need to specify this if you are changing the users e-mail address.',
@ -111,6 +111,7 @@ $lang = array_merge($lang, array(
'USER_GROUP_NORMAL' => 'Normal groups user is a member of',
'USER_GROUP_PENDING' => 'Groups user is in pending mode',
'USER_GROUP_SPECIAL' => 'Special groups user is a member of',
'USER_NO_ATTACHMENTS' => 'There are no attached files to display.',
'USER_OVERVIEW_UPDATED' => 'User details updated.',
'USER_POSTS_DELETED' => 'Successfully removed all posts made by this user.',
'USER_POSTS_MOVED' => 'Successfully moved users posts to target forum.',

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