Compare commits
356 Commits
release-3.
...
olympus_me
Author | SHA1 | Date | |
---|---|---|---|
|
1ef96b504d | ||
|
8c9af252cb | ||
|
7e95a3ee6c | ||
|
79f2dedb51 | ||
|
c48f64ce94 | ||
|
a39e879300 | ||
|
a0c9705bb7 | ||
|
bb5c5adab1 | ||
|
c076becc5a | ||
|
4e3d564be6 | ||
|
16e8b8271b | ||
|
9ef743ba7d | ||
|
79dc2e79b2 | ||
|
a236d24ae5 | ||
|
eddddaa3a4 | ||
|
d054940739 | ||
|
45ac6aba10 | ||
|
b68a102491 | ||
|
be17000b92 | ||
|
f49fe16766 | ||
|
132a1d2efa | ||
|
81b57da147 | ||
|
4379b3d7bc | ||
|
b4bf675273 | ||
|
764c1c4f2b | ||
|
0d92e30b38 | ||
|
d57b4d0b48 | ||
|
de51ec8a15 | ||
|
7b5dc8f3c5 | ||
|
c95f0c7935 | ||
|
332521a369 | ||
|
9954d9c29f | ||
|
81c44f8351 | ||
|
f816e67c36 | ||
|
528bd80651 | ||
|
0955e2e539 | ||
|
ae9c4068e7 | ||
|
21573a8473 | ||
|
0b11951412 | ||
|
c8cba06910 | ||
|
bcfcf9b048 | ||
|
07e9b83a3d | ||
|
8427ae3fd4 | ||
|
6e2d2f85b5 | ||
|
500eb05c48 | ||
|
3f11fc12ac | ||
|
aa3a2f565b | ||
|
3bd6984785 | ||
|
dcf0b15c9f | ||
|
ff22d7a368 | ||
|
f4c079a62b | ||
|
d26f38c4e0 | ||
|
99fa62267e | ||
|
74121b41fa | ||
|
416270ee77 | ||
|
efe06af913 | ||
|
04f7c1da69 | ||
|
a9274f1d63 | ||
|
08bd36f0b2 | ||
|
d46e8e6f98 | ||
|
47b4b83468 | ||
|
c8e3035a4b | ||
|
ef0c0d4c82 | ||
|
1739da9335 | ||
|
36635929a8 | ||
|
f353fd2d57 | ||
|
6a15c2a936 | ||
|
c903b453fa | ||
|
1b10cb9c37 | ||
|
d0e630157c | ||
|
69cfb5b821 | ||
|
baf8d571e3 | ||
|
5ce6035aad | ||
|
746b617807 | ||
|
9c7d8dcd7d | ||
|
73db74dfa1 | ||
|
d4c8a078a2 | ||
|
9d9d61b1a2 | ||
|
89f1b88fe1 | ||
|
9a7804cb71 | ||
|
8f2b4562b1 | ||
|
18bfc5e69b | ||
|
ad4d7c036e | ||
|
e4c3a743ca | ||
|
f3844a17f7 | ||
|
c439b286e9 | ||
|
0b6dd99a76 | ||
|
0a4c62f12e | ||
|
1cc419fb4c | ||
|
f6a47c6f82 | ||
|
10d3191198 | ||
|
9f9a89c78e | ||
|
884cde18fe | ||
|
ec1be2563c | ||
|
ec88ec534b | ||
|
bb97d3531a | ||
|
ce6b87ccec | ||
|
b486710ea1 | ||
|
aa9dbcec3c | ||
|
08428f8fa1 | ||
|
0f14f278d0 | ||
|
c67fa83652 | ||
|
1f6eea1b5b | ||
|
6f0ea3c9d2 | ||
|
8fd7f16642 | ||
|
80ced5c0b7 | ||
|
01c1c27f2c | ||
|
eee2f89ace | ||
|
461be11e8d | ||
|
5349280538 | ||
|
24da8c474d | ||
|
158a15ba9c | ||
|
958d077faa | ||
|
4649b93e0d | ||
|
2fc6d5147a | ||
|
e2736dea20 | ||
|
76c0e5aa5e | ||
|
d135060c12 | ||
|
3b79fd122e | ||
|
b6949c47ec | ||
|
235f552974 | ||
|
1651c5df57 | ||
|
17ec98b834 | ||
|
cc5d77e06d | ||
|
2eeeaadcfd | ||
|
de0bc7476a | ||
|
ca07af715f | ||
|
46b4d09e3a | ||
|
af26b56470 | ||
|
310375db66 | ||
|
e5425dfd46 | ||
|
0e0100c525 | ||
|
a32f3a6709 | ||
|
10c8d29205 | ||
|
6f754d49e4 | ||
|
c83e6f7e94 | ||
|
3a330753f4 | ||
|
a736c97c04 | ||
|
199ab53f30 | ||
|
63e2f5cf14 | ||
|
4658e3f828 | ||
|
44416f4744 | ||
|
0dbe7e3b6c | ||
|
f2abefeaed | ||
|
57ec5805df | ||
|
73da6084d0 | ||
|
323fb23b49 | ||
|
cbacffd9fc | ||
|
589db44b56 | ||
|
8174462e89 | ||
|
a45ac24bd7 | ||
|
3a3b9eb8ef | ||
|
76a542a03e | ||
|
d67b943ef6 | ||
|
b46bd90f6e | ||
|
c119d0b424 | ||
|
15e04808fc | ||
|
4235be4bcb | ||
|
f741c4ff05 | ||
|
8236a7438d | ||
|
ae27aaf1a4 | ||
|
cec12340b9 | ||
|
f405535730 | ||
|
6eed0e5bd2 | ||
|
6a401ab68b | ||
|
b3e2250391 | ||
|
c002c468c4 | ||
|
1071d9cb31 | ||
|
48701289ff | ||
|
360e245a1a | ||
|
97b5920055 | ||
|
492354344b | ||
|
c1cf3404a2 | ||
|
96948b010c | ||
|
9047c986da | ||
|
4580ca9683 | ||
|
be1849a901 | ||
|
e9b2e6174e | ||
|
fe93fa0e9d | ||
|
dceaf59d3b | ||
|
db4011c9d9 | ||
|
7c79d0f860 | ||
|
8c186d97c6 | ||
|
1b67e80422 | ||
|
d8f2c4a1c4 | ||
|
41d3effa19 | ||
|
e6e9618be6 | ||
|
0c4ae1cd97 | ||
|
036dc071e7 | ||
|
d5d7de4ffa | ||
|
79dd5b164b | ||
|
e0799b79e2 | ||
|
95462dca58 | ||
|
ad739a358c | ||
|
3892e7330a | ||
|
aeb36226c0 | ||
|
eeba8f4560 | ||
|
677e6451c4 | ||
|
c44d2edc4a | ||
|
50dd4c183a | ||
|
97d2fb55b7 | ||
|
0ebc5cc9ee | ||
|
0ca7e81ca4 | ||
|
fc8db76da9 | ||
|
d168abdcc9 | ||
|
50f5502cc9 | ||
|
e199f55ba2 | ||
|
d7a217c28c | ||
|
8f3c085f7f | ||
|
4ba2921cec | ||
|
fe2343965b | ||
|
d0140a096c | ||
|
fc126eec66 | ||
|
1aa40171e0 | ||
|
6a59f3efd6 | ||
|
b54a9ec1e2 | ||
|
24b9d6432f | ||
|
7524ca5249 | ||
|
4dddc3a130 | ||
|
8822747b91 | ||
|
ea3eb9e9c3 | ||
|
a156e31f0c | ||
|
443ec9dcb0 | ||
|
e08a400b9f | ||
|
a11f41986f | ||
|
150c6c4c24 | ||
|
e8b7c45d85 | ||
|
e8e807f797 | ||
|
65fb840b76 | ||
|
59e6bc27f1 | ||
|
7591a84c0d | ||
|
990e3cd4b2 | ||
|
de5ddf3907 | ||
|
7c159b8c6e | ||
|
98dadd5eb8 | ||
|
8ce9e1b852 | ||
|
2f4a618900 | ||
|
91b4fe1868 | ||
|
28e8c3ea85 | ||
|
0c1fa73423 | ||
|
e7a043a22a | ||
|
53dc95d429 | ||
|
41d8c20836 | ||
|
8dde998e87 | ||
|
9aac603888 | ||
|
2cfc6b7e0b | ||
|
6871e7caa4 | ||
|
0d631c2ae0 | ||
|
1219ff4717 | ||
|
22f6e1ed1e | ||
|
eb664ddafb | ||
|
771fd3696d | ||
|
b1915b6f25 | ||
|
378838499e | ||
|
60aad364c8 | ||
|
52400baafa | ||
|
ebb801ebff | ||
|
4b9077a58b | ||
|
5e7c936618 | ||
|
c5dcff536a | ||
|
91d0c8b3bf | ||
|
f2ba40f294 | ||
|
0cf75b2546 | ||
|
5c2b9b17d1 | ||
|
dbae1db24c | ||
|
82454165c3 | ||
|
4879a7a075 | ||
|
c5081a685e | ||
|
2deee69e2f | ||
|
3e42df098c | ||
|
45c97a40d2 | ||
|
b935389427 | ||
|
195cd7e148 | ||
|
22c304092e | ||
|
7596a3bfdc | ||
|
a3da99f358 | ||
|
6a30daeb59 | ||
|
5417ec5c4d | ||
|
65b0f6b165 | ||
|
6c8a8163e8 | ||
|
312bd1a670 | ||
|
02a5032a52 | ||
|
c34599126f | ||
|
9b96e12678 | ||
|
d1f48526d7 | ||
|
8c64d7c32a | ||
|
f115ab68a5 | ||
|
cf17b13c98 | ||
|
da966fed65 | ||
|
a765c1aba1 | ||
|
f465cdd782 | ||
|
05ba2058c6 | ||
|
2a3eb724a8 | ||
|
30b24d476c | ||
|
f83b47bc11 | ||
|
42073ab0af | ||
|
a800565393 | ||
|
0c5839a0b9 | ||
|
2cedbbac09 | ||
|
6dc85449c1 | ||
|
95f11a38c0 | ||
|
65ba4fe94e | ||
|
b33ec670a2 | ||
|
3b669aedfd | ||
|
7b262babcd | ||
|
e9e9e8e69c | ||
|
2e5e0a7868 | ||
|
9a4a3a089a | ||
|
48ed77f046 | ||
|
4b5fab372f | ||
|
1407460895 | ||
|
e970da6514 | ||
|
1819be3ed1 | ||
|
9f5841219a | ||
|
e683deeeb8 | ||
|
fedee2c07e | ||
|
7fed5dd166 | ||
|
e6991260df | ||
|
dbcf8a6f31 | ||
|
835558ea38 | ||
|
8608cea5c8 | ||
|
18a081bc6c | ||
|
5195509f3b | ||
|
13ee383aad | ||
|
9dcb557a5e | ||
|
b9da54ba91 | ||
|
24a359e9f5 | ||
|
cbb4db46b2 | ||
|
35f59ceb9a | ||
|
b9b46a8b45 | ||
|
7193d91e40 | ||
|
370e189f15 | ||
|
b4e64655af | ||
|
2928574ed4 | ||
|
159ce6f8d1 | ||
|
5dddcb42ae | ||
|
6dfa770986 | ||
|
2f08a36062 | ||
|
57645ad5bc | ||
|
f0dea06097 | ||
|
a4633d8ac0 | ||
|
3b29db4545 | ||
|
f14f82775f | ||
|
af738dbc2a | ||
|
edd6c34eda | ||
|
6b8f2fb4cc | ||
|
a7c29a06bf | ||
|
12d7c9b007 | ||
|
4b1b950068 | ||
|
85055ac97f | ||
|
0f26ffbade | ||
|
fe56349e34 | ||
|
5eb46fb67e | ||
|
c3ef1109c0 | ||
|
bf2741ca80 | ||
|
253c07733e |
210
code_sniffer/phpbb/Sniffs/Commenting/FileCommentSniff.php
Normal file
@@ -0,0 +1,210 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package code_sniffer
|
||||
* @version $Id: $
|
||||
* @copyright (c) 2007 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Checks that each source file contains the standard header.
|
||||
*
|
||||
* Based on Coding Guidelines 1.ii File Header.
|
||||
*
|
||||
* @package code_sniffer
|
||||
* @author Manuel Pichler <mapi@phpundercontrol.org>
|
||||
*/
|
||||
class phpbb_Sniffs_Commenting_FileCommentSniff implements PHP_CodeSniffer_Sniff
|
||||
{
|
||||
/**
|
||||
* Returns an array of tokens this test wants to listen for.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
return array(T_OPEN_TAG);
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes this test, when one of its tokens is encountered.
|
||||
*
|
||||
* @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
||||
* @param int $stackPtr The position of the current token
|
||||
* in the stack passed in $tokens.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
|
||||
{
|
||||
// We are only interested in the first file comment.
|
||||
if ($stackPtr !== 0)
|
||||
{
|
||||
if ($phpcsFile->findPrevious(T_OPEN_TAG, $stackPtr - 1) !== false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Fetch next non whitespace token
|
||||
$tokens = $phpcsFile->getTokens();
|
||||
$start = $phpcsFile->findNext(T_WHITESPACE, $stackPtr + 1, null, true);
|
||||
|
||||
// Skip empty files
|
||||
if ($tokens[$start]['code'] === T_CLOSE_TAG)
|
||||
{
|
||||
return;
|
||||
}
|
||||
// Mark as error if this is not a doc comment
|
||||
else if ($start === false || $tokens[$start]['code'] !== T_DOC_COMMENT)
|
||||
{
|
||||
$phpcsFile->addError('Missing required file doc comment.', $stackPtr);
|
||||
return;
|
||||
}
|
||||
|
||||
// Find comment end token
|
||||
$end = $phpcsFile->findNext(T_DOC_COMMENT, $start + 1, null, true) - 1;
|
||||
|
||||
// If there is no end, skip processing here
|
||||
if ($end === false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// List of found comment tags
|
||||
$tags = array();
|
||||
|
||||
// check comment lines without the first(/**) an last(*/) line
|
||||
for ($i = $start + 1, $c = ($end - $start); $i <= $c; ++$i)
|
||||
{
|
||||
$line = $tokens[$i]['content'];
|
||||
|
||||
// Check that each line starts with a '*'
|
||||
if (substr($line, 0, 1) !== '*')
|
||||
{
|
||||
$message = 'The file doc comment should not be idented.';
|
||||
$phpcsFile->addWarning($message, $i);
|
||||
}
|
||||
else if (preg_match('/^\*\s+@([\w]+)\s+(.*)$/', $line, $match) !== 0)
|
||||
{
|
||||
$tags[$match[1]] = array($match[2], $i);
|
||||
}
|
||||
}
|
||||
|
||||
// Check that the first and last line is empty
|
||||
if (trim($tokens[$start + 1]['content']) !== '*')
|
||||
{
|
||||
$message = 'The first file comment line should be empty.';
|
||||
$phpcsFile->addWarning($message, ($start + 1));
|
||||
}
|
||||
if (trim($tokens[$end - $start]['content']) !== '*')
|
||||
{
|
||||
$message = 'The last file comment line should be empty.';
|
||||
$phpcsFile->addWarning($message, ($end - $start));
|
||||
}
|
||||
|
||||
$this->processPackage($phpcsFile, $start, $tags);
|
||||
$this->processVersion($phpcsFile, $start, $tags);
|
||||
$this->processCopyright($phpcsFile, $start, $tags);
|
||||
$this->processLicense($phpcsFile, $start, $tags);
|
||||
|
||||
//print_r($tags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that the tags array contains a valid package tag
|
||||
*
|
||||
* @param PHP_CodeSniffer_File $phpcsFile The context source file instance.
|
||||
* @param integer The stack pointer for the first comment token.
|
||||
* @param array(string=>array) $tags The found file doc comment tags.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function processPackage(PHP_CodeSniffer_File $phpcsFile, $ptr, $tags)
|
||||
{
|
||||
if (!isset($tags['package']))
|
||||
{
|
||||
$message = 'Missing require @package tag in file doc comment.';
|
||||
$phpcsFile->addError($message, $ptr);
|
||||
}
|
||||
else if (preg_match('/^([\w]+)$/', $tags['package'][0]) === 0)
|
||||
{
|
||||
$message = 'Invalid content found for @package tag.';
|
||||
$phpcsFile->addWarning($message, $tags['package'][1]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that the tags array contains a valid version tag
|
||||
*
|
||||
* @param PHP_CodeSniffer_File $phpcsFile The context source file instance.
|
||||
* @param integer The stack pointer for the first comment token.
|
||||
* @param array(string=>array) $tags The found file doc comment tags.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function processVersion(PHP_CodeSniffer_File $phpcsFile, $ptr, $tags)
|
||||
{
|
||||
if (!isset($tags['version']))
|
||||
{
|
||||
$message = 'Missing require @version tag in file doc comment.';
|
||||
$phpcsFile->addError($message, $ptr);
|
||||
}
|
||||
else if (preg_match('/^\$Id:[^\$]+\$$/', $tags['version'][0]) === 0)
|
||||
{
|
||||
$message = 'Invalid content found for @version tag, use "$Id: $".';
|
||||
$phpcsFile->addError($message, $tags['version'][1]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that the tags array contains a valid copyright tag
|
||||
*
|
||||
* @param PHP_CodeSniffer_File $phpcsFile The context source file instance.
|
||||
* @param integer The stack pointer for the first comment token.
|
||||
* @param array(string=>array) $tags The found file doc comment tags.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function processCopyright(PHP_CodeSniffer_File $phpcsFile, $ptr, $tags)
|
||||
{
|
||||
if (!isset($tags['copyright']))
|
||||
{
|
||||
$message = 'Missing require @copyright tag in file doc comment.';
|
||||
$phpcsFile->addError($message, $ptr);
|
||||
}
|
||||
else if (preg_match('/^\(c\) 2[0-9]{3} phpBB Group\s*$/', $tags['copyright'][0]) === 0)
|
||||
{
|
||||
$message = 'Invalid content found for @copyright tag, use "(c) <year> phpBB Group".';
|
||||
$phpcsFile->addError($message, $tags['copyright'][1]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that the tags array contains a valid license tag
|
||||
*
|
||||
* @param PHP_CodeSniffer_File $phpcsFile The context source file instance.
|
||||
* @param integer The stack pointer for the first comment token.
|
||||
* @param array(string=>array) $tags The found file doc comment tags.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function processLicense(PHP_CodeSniffer_File $phpcsFile, $ptr, $tags)
|
||||
{
|
||||
$license = 'http://opensource.org/licenses/gpl-license.php GNU Public License';
|
||||
|
||||
if (!isset($tags['license']))
|
||||
{
|
||||
$message = 'Missing require @license tag in file doc comment.';
|
||||
$phpcsFile->addError($message, $ptr);
|
||||
}
|
||||
else if (trim($tags['license'][0]) !== $license)
|
||||
{
|
||||
$message = 'Invalid content found for @license tag, use '
|
||||
. '"' . $license . '".';
|
||||
$phpcsFile->addError($message, $tags['license'][1]);
|
||||
}
|
||||
}
|
||||
}
|
19
code_sniffer/phpbb/Tests/Commenting/FileCommentUnitTest.inc
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package code_sniffer³
|
||||
* @version $Id: $
|
||||
* @copyright (c) 2008 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php BSD License
|
||||
*
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* Broken but not first file doc comment.
|
||||
*
|
||||
* @version @package_version@
|
||||
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
|
||||
* @copyright (c) 2007 phpBB Group
|
||||
*
|
||||
*/
|
51
code_sniffer/phpbb/Tests/Commenting/FileCommentUnitTest.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package code_sniffer
|
||||
* @version $Id: $
|
||||
* @copyright (c) 2007 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Unit test class for the EmptyStatement sniff.
|
||||
*
|
||||
* @package code_sniffer
|
||||
* @author Manuel Pichler <mapi@phpundercontrol.org>
|
||||
*/
|
||||
class phpbb_Tests_Commenting_FileCommentUnitTest extends AbstractSniffUnitTest
|
||||
{
|
||||
|
||||
/**
|
||||
* Returns the lines where errors should occur.
|
||||
*
|
||||
* The key of the array should represent the line number and the value
|
||||
* should represent the number of errors that should occur on that line.
|
||||
*
|
||||
* @return array(int => int)
|
||||
*/
|
||||
public function getErrorList()
|
||||
{
|
||||
return array(
|
||||
7 => 1 // BSD License error :)
|
||||
);
|
||||
}//end getErrorList()
|
||||
|
||||
|
||||
/**
|
||||
* Returns the lines where warnings should occur.
|
||||
*
|
||||
* The key of the array should represent the line number and the value
|
||||
* should represent the number of warnings that should occur on that line.
|
||||
*
|
||||
* @return array(int => int)
|
||||
*/
|
||||
public function getWarningList()
|
||||
{
|
||||
return array(
|
||||
4 => 1,
|
||||
8 => 1
|
||||
);
|
||||
}//end getWarningList()
|
||||
}
|
65
code_sniffer/phpbb/build.xml
Normal file
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project name="code_sniffer" basedir="." default="phpunit">
|
||||
|
||||
<property name="cvs.module" value="pear/PHP_CodeSniffer" />
|
||||
<property name="working.dir" value="${basedir}/_work/code" />
|
||||
<property name="test.coverage" value="${basedir}/_work/coverage" />
|
||||
|
||||
<target name="phpunit" depends="update,prepare">
|
||||
<exec executable="phpunit">
|
||||
<arg line="--coverage-html ${test.coverage}
|
||||
PHP_CodeSniffer_AllTests
|
||||
${working.dir}/${cvs.module}/tests/AllTests.php" />
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="prepare">
|
||||
<delete dir="${working.dir}/${cvs.module}/CodeSniffer/Standards/phpbb" />
|
||||
<mkdir dir="${working.dir}/${cvs.module}/CodeSniffer/Standards/phpbb"/>
|
||||
|
||||
<copy todir="${working.dir}/${cvs.module}/CodeSniffer/Standards/phpbb/Sniffs">
|
||||
<fileset dir="${basedir}/Sniffs" />
|
||||
</copy>
|
||||
|
||||
<copy todir="${working.dir}/${cvs.module}/CodeSniffer/Standards/phpbb/Tests">
|
||||
<fileset dir="${basedir}/Tests" />
|
||||
</copy>
|
||||
|
||||
<copy todir="${working.dir}/${cvs.module}/CodeSniffer/Standards/phpbb">
|
||||
<fileset file="${basedir}/phpbbCodingStandard.php" />
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="cleanup">
|
||||
<delete dir="${working.dir}" />
|
||||
</target>
|
||||
|
||||
<target name="update">
|
||||
<exec executable="cvs" dir="${working.dir}/${cvs.module}">
|
||||
<arg line="up" />
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="checkout" depends="cleanup">
|
||||
<cvspass cvsroot=":pserver:cvsread@cvs.php.net:/repository" password="phpfi" />
|
||||
<cvs cvsRoot=":pserver:cvsread@cvs.php.net:/repository"
|
||||
package="${cvs.module}"
|
||||
dest="${working.dir}" />
|
||||
</target>
|
||||
|
||||
<!--
|
||||
Installs the sniffs on my local development machine
|
||||
-->
|
||||
<target name="install">
|
||||
<delete dir="/usr/local/pear/PEAR/PHP/CodeSniffer/Standards/phpbb" />
|
||||
<mkdir dir="/usr/local/pear/PEAR/PHP/CodeSniffer/Standards/phpbb" />
|
||||
|
||||
<copy todir="/usr/local/pear/PEAR/PHP/CodeSniffer/Standards/phpbb">
|
||||
<fileset file="${basedir}/phpbbCodingStandard.php" />
|
||||
</copy>
|
||||
<copy todir="/usr/local/pear/PEAR/PHP/CodeSniffer/Standards/phpbb/Sniffs">
|
||||
<fileset dir="${basedir}/Sniffs" />
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
</project>
|
43
code_sniffer/phpbb/phpbbCodingStandard.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package code_sniffer
|
||||
* @version $Id: $
|
||||
* @copyright (c) 2007 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
if (class_exists('PHP_CodeSniffer_Standards_CodingStandard', true) === false) {
|
||||
throw new PHP_CodeSniffer_Exception(
|
||||
'Class PHP_CodeSniffer_Standards_CodingStandard not found'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Primary class for the phpbb coding standard.
|
||||
*
|
||||
* @package code_sniffer
|
||||
*/
|
||||
class PHP_CodeSniffer_Standards_phpbb_phpbbCodingStandard extends PHP_CodeSniffer_Standards_CodingStandard
|
||||
{
|
||||
/**
|
||||
* Return a list of external sniffs to include with this standard.
|
||||
*
|
||||
* External locations can be single sniffs, a whole directory of sniffs, or
|
||||
* an entire coding standard. Locations start with the standard name. For
|
||||
* example:
|
||||
* PEAR => include all sniffs in this standard
|
||||
* PEAR/Sniffs/Files => include all sniffs in this dir
|
||||
* PEAR/Sniffs/Files/LineLengthSniff => include this single sniff
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getIncludedSniffs()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
}
|
0
phpBB/adm/images/progress_bar.gif
Executable file → Normal file
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
@@ -15,11 +15,13 @@ define('ADMIN_START', true);
|
||||
define('NEED_SID', true);
|
||||
|
||||
// Include files
|
||||
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
require($phpbb_root_path . 'common.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/functions_module.' . $phpEx);
|
||||
if (!defined('PHPBB_ROOT_PATH')) define('PHPBB_ROOT_PATH', './../');
|
||||
if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
|
||||
if (!defined('PHPBB_ADMIN_PATH')) define('PHPBB_ADMIN_PATH', './');
|
||||
|
||||
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
|
||||
require(PHPBB_ROOT_PATH . 'includes/functions_admin.' . PHP_EXT);
|
||||
require(PHPBB_ROOT_PATH . 'includes/functions_module.' . PHP_EXT);
|
||||
|
||||
// Start session management
|
||||
$user->session_begin();
|
||||
@@ -28,10 +30,14 @@ $user->setup('acp/common');
|
||||
// End session management
|
||||
|
||||
// Have they authenticated (again) as an admin for this session?
|
||||
if (!isset($user->data['session_admin']) || !$user->data['session_admin'])
|
||||
if ($user->data['user_id'] != ANONYMOUS && (!isset($user->data['session_admin']) || !$user->data['session_admin']))
|
||||
{
|
||||
login_box('', $user->lang['LOGIN_ADMIN_CONFIRM'], $user->lang['LOGIN_ADMIN_SUCCESS'], true, false);
|
||||
}
|
||||
else if ($user->data['user_id'] == ANONYMOUS)
|
||||
{
|
||||
login_box('');
|
||||
}
|
||||
|
||||
// Is user any type of admin? No, then stop here, each script needs to
|
||||
// check specific permissions but this is a catchall
|
||||
@@ -42,20 +48,16 @@ if (!$auth->acl_get('a_'))
|
||||
|
||||
// We define the admin variables now, because the user is now able to use the admin related features...
|
||||
define('IN_ADMIN', true);
|
||||
$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : './';
|
||||
|
||||
// Some oft used variables
|
||||
$safe_mode = (@ini_get('safe_mode') || @strtolower(ini_get('safe_mode')) == 'on') ? true : false;
|
||||
$file_uploads = (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on') ? true : false;
|
||||
$safe_mode = (@ini_get('safe_mode') == '1' || strtolower(@ini_get('safe_mode')) === 'on') ? true : false;
|
||||
$file_uploads = (@ini_get('file_uploads') == '1' || strtolower(@ini_get('file_uploads')) === 'on') ? true : false;
|
||||
$module_id = request_var('i', '');
|
||||
$mode = request_var('mode', '');
|
||||
|
||||
// Set custom template for admin area
|
||||
$template->set_custom_template($phpbb_admin_path . 'style', 'admin');
|
||||
$template->assign_var('T_TEMPLATE_PATH', $phpbb_admin_path . 'style');
|
||||
|
||||
// the acp template is never stored in the database
|
||||
$user->theme['template_storedb'] = false;
|
||||
$template->set_custom_template(PHPBB_ADMIN_PATH . 'style', 'admin');
|
||||
$template->assign_var('T_TEMPLATE_PATH', PHPBB_ADMIN_PATH . 'style');
|
||||
|
||||
// Instantiate new module
|
||||
$module = new p_master();
|
||||
@@ -68,7 +70,7 @@ $module->set_active($module_id, $mode);
|
||||
|
||||
// Assign data to the template engine for the list of modules
|
||||
// We do this before loading the active module for correct menu display in trigger_error
|
||||
$module->assign_tpl_vars(append_sid("{$phpbb_admin_path}index.$phpEx"));
|
||||
$module->assign_tpl_vars(append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT));
|
||||
|
||||
// Load and execute the relevant module
|
||||
$module->load_active();
|
||||
@@ -88,7 +90,7 @@ adm_page_footer();
|
||||
function adm_page_header($page_title)
|
||||
{
|
||||
global $config, $db, $user, $template;
|
||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $SID, $_SID;
|
||||
global $SID, $_SID;
|
||||
|
||||
if (defined('HEADER_INC'))
|
||||
{
|
||||
@@ -108,35 +110,39 @@ function adm_page_header($page_title)
|
||||
|
||||
$template->assign_vars(array(
|
||||
'PAGE_TITLE' => $page_title,
|
||||
'USERNAME' => $user->data['username'],
|
||||
'USERNAME' => ($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : '',
|
||||
|
||||
'SID' => $SID,
|
||||
'_SID' => $_SID,
|
||||
'SESSION_ID' => $user->session_id,
|
||||
'ROOT_PATH' => $phpbb_admin_path,
|
||||
'ROOT_PATH' => PHPBB_ADMIN_PATH,
|
||||
|
||||
'U_LOGOUT' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=logout'),
|
||||
'U_ADM_INDEX' => append_sid("{$phpbb_admin_path}index.$phpEx"),
|
||||
'U_INDEX' => append_sid("{$phpbb_root_path}index.$phpEx"),
|
||||
'U_LOGOUT' => append_sid('ucp', 'mode=logout'),
|
||||
'U_ADM_LOGOUT' => append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, 'action=admlogout'),
|
||||
'U_ADM_INDEX' => append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT),
|
||||
'U_INDEX' => append_sid('index'),
|
||||
|
||||
'T_IMAGES_PATH' => "{$phpbb_root_path}images/",
|
||||
'T_SMILIES_PATH' => "{$phpbb_root_path}{$config['smilies_path']}/",
|
||||
'T_AVATAR_PATH' => "{$phpbb_root_path}{$config['avatar_path']}/",
|
||||
'T_AVATAR_GALLERY_PATH' => "{$phpbb_root_path}{$config['avatar_gallery_path']}/",
|
||||
'T_ICONS_PATH' => "{$phpbb_root_path}{$config['icons_path']}/",
|
||||
'T_RANKS_PATH' => "{$phpbb_root_path}{$config['ranks_path']}/",
|
||||
'T_UPLOAD_PATH' => "{$phpbb_root_path}{$config['upload_path']}/",
|
||||
'S_USER_ADMIN' => $user->data['session_admin'],
|
||||
'S_USER_LOGGED_IN' => ($user->data['user_id'] != ANONYMOUS && !$user->data['is_bot']),
|
||||
|
||||
'ICON_MOVE_UP' => '<img src="' . $phpbb_admin_path . 'images/icon_up.gif" alt="' . $user->lang['MOVE_UP'] . '" title="' . $user->lang['MOVE_UP'] . '" />',
|
||||
'ICON_MOVE_UP_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_up_disabled.gif" alt="' . $user->lang['MOVE_UP'] . '" title="' . $user->lang['MOVE_UP'] . '" />',
|
||||
'ICON_MOVE_DOWN' => '<img src="' . $phpbb_admin_path . 'images/icon_down.gif" alt="' . $user->lang['MOVE_DOWN'] . '" title="' . $user->lang['MOVE_DOWN'] . '" />',
|
||||
'ICON_MOVE_DOWN_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_down_disabled.gif" alt="' . $user->lang['MOVE_DOWN'] . '" title="' . $user->lang['MOVE_DOWN'] . '" />',
|
||||
'ICON_EDIT' => '<img src="' . $phpbb_admin_path . 'images/icon_edit.gif" alt="' . $user->lang['EDIT'] . '" title="' . $user->lang['EDIT'] . '" />',
|
||||
'ICON_EDIT_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_edit_disabled.gif" alt="' . $user->lang['EDIT'] . '" title="' . $user->lang['EDIT'] . '" />',
|
||||
'ICON_DELETE' => '<img src="' . $phpbb_admin_path . 'images/icon_delete.gif" alt="' . $user->lang['DELETE'] . '" title="' . $user->lang['DELETE'] . '" />',
|
||||
'ICON_DELETE_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_delete_disabled.gif" alt="' . $user->lang['DELETE'] . '" title="' . $user->lang['DELETE'] . '" />',
|
||||
'ICON_SYNC' => '<img src="' . $phpbb_admin_path . 'images/icon_sync.gif" alt="' . $user->lang['RESYNC'] . '" title="' . $user->lang['RESYNC'] . '" />',
|
||||
'ICON_SYNC_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_sync_disabled.gif" alt="' . $user->lang['RESYNC'] . '" title="' . $user->lang['RESYNC'] . '" />',
|
||||
'T_IMAGES_PATH' => PHPBB_ROOT_PATH . 'images/',
|
||||
'T_SMILIES_PATH' => PHPBB_ROOT_PATH . $config['smilies_path'] . '/',
|
||||
'T_AVATAR_PATH' => PHPBB_ROOT_PATH . $config['avatar_path'] . '/',
|
||||
'T_AVATAR_GALLERY_PATH' => PHPBB_ROOT_PATH . $config['avatar_gallery_path'] . '/',
|
||||
'T_ICONS_PATH' => PHPBB_ROOT_PATH . $config['icons_path'] . '/',
|
||||
'T_RANKS_PATH' => PHPBB_ROOT_PATH . $config['ranks_path'] . '/',
|
||||
'T_UPLOAD_PATH' => PHPBB_ROOT_PATH . $config['upload_path'] . '/',
|
||||
|
||||
'ICON_MOVE_UP' => '<img src="' . PHPBB_ADMIN_PATH . 'images/icon_up.gif" alt="' . $user->lang['MOVE_UP'] . '" title="' . $user->lang['MOVE_UP'] . '" />',
|
||||
'ICON_MOVE_UP_DISABLED' => '<img src="' . PHPBB_ADMIN_PATH . 'images/icon_up_disabled.gif" alt="' . $user->lang['MOVE_UP'] . '" title="' . $user->lang['MOVE_UP'] . '" />',
|
||||
'ICON_MOVE_DOWN' => '<img src="' . PHPBB_ADMIN_PATH . 'images/icon_down.gif" alt="' . $user->lang['MOVE_DOWN'] . '" title="' . $user->lang['MOVE_DOWN'] . '" />',
|
||||
'ICON_MOVE_DOWN_DISABLED' => '<img src="' . PHPBB_ADMIN_PATH . 'images/icon_down_disabled.gif" alt="' . $user->lang['MOVE_DOWN'] . '" title="' . $user->lang['MOVE_DOWN'] . '" />',
|
||||
'ICON_EDIT' => '<img src="' . PHPBB_ADMIN_PATH . 'images/icon_edit.gif" alt="' . $user->lang['EDIT'] . '" title="' . $user->lang['EDIT'] . '" />',
|
||||
'ICON_EDIT_DISABLED' => '<img src="' . PHPBB_ADMIN_PATH . 'images/icon_edit_disabled.gif" alt="' . $user->lang['EDIT'] . '" title="' . $user->lang['EDIT'] . '" />',
|
||||
'ICON_DELETE' => '<img src="' . PHPBB_ADMIN_PATH . 'images/icon_delete.gif" alt="' . $user->lang['DELETE'] . '" title="' . $user->lang['DELETE'] . '" />',
|
||||
'ICON_DELETE_DISABLED' => '<img src="' . PHPBB_ADMIN_PATH . 'images/icon_delete_disabled.gif" alt="' . $user->lang['DELETE'] . '" title="' . $user->lang['DELETE'] . '" />',
|
||||
'ICON_SYNC' => '<img src="' . PHPBB_ADMIN_PATH . 'images/icon_sync.gif" alt="' . $user->lang['RESYNC'] . '" title="' . $user->lang['RESYNC'] . '" />',
|
||||
'ICON_SYNC_DISABLED' => '<img src="' . PHPBB_ADMIN_PATH . 'images/icon_sync_disabled.gif" alt="' . $user->lang['RESYNC'] . '" title="' . $user->lang['RESYNC'] . '" />',
|
||||
|
||||
'S_USER_LANG' => $user->lang['USER_LANG'],
|
||||
'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
|
||||
@@ -161,7 +167,7 @@ function adm_page_header($page_title)
|
||||
function adm_page_footer($copyright_html = true)
|
||||
{
|
||||
global $db, $config, $template, $user, $auth, $cache;
|
||||
global $starttime, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
global $starttime;
|
||||
|
||||
// Output page creation time
|
||||
if (defined('DEBUG'))
|
||||
@@ -169,7 +175,7 @@ function adm_page_footer($copyright_html = true)
|
||||
$mtime = explode(' ', microtime());
|
||||
$totaltime = $mtime[0] + $mtime[1] - $starttime;
|
||||
|
||||
if (!empty($_REQUEST['explain']) && $auth->acl_get('a_') && defined('DEBUG_EXTRA') && method_exists($db, 'sql_report'))
|
||||
if (request::variable('explain', false) && $auth->acl_get('a_') && defined('DEBUG_EXTRA') && method_exists($db, 'sql_report'))
|
||||
{
|
||||
$db->sql_report('display');
|
||||
}
|
||||
@@ -184,7 +190,7 @@ function adm_page_footer($copyright_html = true)
|
||||
{
|
||||
global $base_memory_usage;
|
||||
$memory_usage -= $base_memory_usage;
|
||||
$memory_usage = ($memory_usage >= 1048576) ? round((round($memory_usage / 1048576 * 100) / 100), 2) . ' ' . $user->lang['MB'] : (($memory_usage >= 1024) ? round((round($memory_usage / 1024 * 100) / 100), 2) . ' ' . $user->lang['KB'] : $memory_usage . ' ' . $user->lang['BYTES']);
|
||||
$memory_usage = get_formatted_filesize($memory_usage);
|
||||
|
||||
$debug_output .= ' | Memory Usage: ' . $memory_usage;
|
||||
}
|
||||
@@ -367,33 +373,65 @@ function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars)
|
||||
}
|
||||
|
||||
/**
|
||||
* Going through a config array and validate values, writing errors to $error.
|
||||
* Going through a config array and validate values, writing errors to $error. The validation method accepts parameters separated by ':' for string and int.
|
||||
* The first parameter defines the type to be used, the second the lower bound and the third the upper bound. Only the type is required.
|
||||
*/
|
||||
function validate_config_vars($config_vars, &$cfg_array, &$error)
|
||||
{
|
||||
global $phpbb_root_path, $user;
|
||||
global $user;
|
||||
|
||||
$type = 0;
|
||||
$min = 1;
|
||||
$max = 2;
|
||||
|
||||
foreach ($config_vars as $config_name => $config_definition)
|
||||
{
|
||||
if (!isset($cfg_array[$config_name]) || strpos($config_name, 'legend') !== false)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (!isset($config_definition['validate']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$validator = explode(':', $config_definition['validate']);
|
||||
|
||||
// Validate a bit. ;) String is already checked through request_var(), therefore we do not check this again
|
||||
switch ($config_definition['validate'])
|
||||
// Validate a bit. ;) (0 = type, 1 = min, 2= max)
|
||||
switch ($validator[$type])
|
||||
{
|
||||
case 'string':
|
||||
$length = strlen($cfg_array[$config_name]);
|
||||
|
||||
// the column is a VARCHAR
|
||||
$validator[$max] = (isset($validator[$max])) ? min(255, $validator[$max]) : 255;
|
||||
|
||||
if (isset($validator[$min]) && $length < $validator[$min])
|
||||
{
|
||||
$error[] = sprintf($user->lang['SETTING_TOO_SHORT'], $user->lang[$config_definition['lang']], $validator[$min]);
|
||||
}
|
||||
else if (isset($validator[$max]) && $length > $validator[2])
|
||||
{
|
||||
$error[] = sprintf($user->lang['SETTING_TOO_LONG'], $user->lang[$config_definition['lang']], $validator[$max]);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'bool':
|
||||
$cfg_array[$config_name] = ($cfg_array[$config_name]) ? 1 : 0;
|
||||
break;
|
||||
|
||||
case 'int':
|
||||
$cfg_array[$config_name] = (int) $cfg_array[$config_name];
|
||||
|
||||
if (isset($validator[$min]) && $cfg_array[$config_name] < $validator[$min])
|
||||
{
|
||||
$error[] = sprintf($user->lang['SETTING_TOO_LOW'], $user->lang[$config_definition['lang']], $validator[$min]);
|
||||
}
|
||||
else if (isset($validator[$max]) && $cfg_array[$config_name] > $validator[$max])
|
||||
{
|
||||
$error[] = sprintf($user->lang['SETTING_TOO_BIG'], $user->lang[$config_definition['lang']], $validator[$max]);
|
||||
}
|
||||
break;
|
||||
|
||||
// Absolute path
|
||||
@@ -434,13 +472,13 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
|
||||
|
||||
$cfg_array[$config_name] = basename($cfg_array[$config_name]);
|
||||
|
||||
if (!file_exists($phpbb_root_path . 'language/' . $cfg_array[$config_name] . '/'))
|
||||
if (!file_exists(PHPBB_ROOT_PATH . 'language/' . $cfg_array[$config_name] . '/'))
|
||||
{
|
||||
$error[] = $user->lang['WRONG_DATA_LANG'];
|
||||
}
|
||||
break;
|
||||
|
||||
// Relative path (appended $phpbb_root_path)
|
||||
// Relative path (appended PHPBB_ROOT_PATH)
|
||||
case 'rpath':
|
||||
case 'rwpath':
|
||||
if (!$cfg_array[$config_name])
|
||||
@@ -482,12 +520,12 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!file_exists($phpbb_root_path . $cfg_array[$config_name]))
|
||||
if (!file_exists(PHPBB_ROOT_PATH . $cfg_array[$config_name]))
|
||||
{
|
||||
$error[] = sprintf($user->lang['DIRECTORY_DOES_NOT_EXIST'], $cfg_array[$config_name]);
|
||||
}
|
||||
|
||||
if (file_exists($phpbb_root_path . $cfg_array[$config_name]) && !is_dir($phpbb_root_path . $cfg_array[$config_name]))
|
||||
if (file_exists(PHPBB_ROOT_PATH . $cfg_array[$config_name]) && !is_dir(PHPBB_ROOT_PATH . $cfg_array[$config_name]))
|
||||
{
|
||||
$error[] = sprintf($user->lang['DIRECTORY_NOT_DIR'], $cfg_array[$config_name]);
|
||||
}
|
||||
@@ -495,7 +533,7 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
|
||||
// Check if the path is writable
|
||||
if ($config_definition['validate'] == 'wpath' || $config_definition['validate'] == 'rwpath')
|
||||
{
|
||||
if (file_exists($phpbb_root_path . $cfg_array[$config_name]) && !@is_writable($phpbb_root_path . $cfg_array[$config_name]))
|
||||
if (file_exists(PHPBB_ROOT_PATH . $cfg_array[$config_name]) && !@is_writable(PHPBB_ROOT_PATH . $cfg_array[$config_name]))
|
||||
{
|
||||
$error[] = sprintf($user->lang['DIRECTORY_NOT_WRITABLE'], $cfg_array[$config_name]);
|
||||
}
|
||||
@@ -508,4 +546,62 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whatever or not a variable is OK for use in the Database
|
||||
* param mixed $value_ary An array of the form array(array('lang' => ..., 'value' => ..., 'column_type' =>))'
|
||||
* param mixed $error The error array
|
||||
*/
|
||||
function validate_range($value_ary, &$error)
|
||||
{
|
||||
global $user;
|
||||
|
||||
$column_types = array(
|
||||
'BOOL' => array('php_type' => 'int', 'min' => 0, 'max' => 1),
|
||||
'USINT' => array('php_type' => 'int', 'min' => 0, 'max' => 65535),
|
||||
'UINT' => array('php_type' => 'int', 'min' => 0, 'max' => (int) 0x7fffffff),
|
||||
'INT' => array('php_type' => 'int', 'min' => (int) 0x80000000, 'max' => (int) 0x7fffffff),
|
||||
'TINT' => array('php_type' => 'int', 'min' => -128, 'max' => 127),
|
||||
|
||||
'VCHAR' => array('php_type' => 'string', 'min' => 0, 'max' => 255),
|
||||
);
|
||||
foreach ($value_ary as $value)
|
||||
{
|
||||
$column = explode(':', $value['column_type']);
|
||||
$max = $min = 0;
|
||||
$type = 0;
|
||||
if (!isset($column_types[$column[0]]))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
$type = $column_types[$column[0]];
|
||||
}
|
||||
|
||||
switch ($type['php_type'])
|
||||
{
|
||||
case 'string' :
|
||||
$max = (isset($column[1])) ? min($column[1],$type['max']) : $type['max'];
|
||||
if (strlen($value['value']) > $max)
|
||||
{
|
||||
$error[] = sprintf($user->lang['SETTING_TOO_LONG'], $user->lang[$value['lang']], $max);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'int':
|
||||
$min = (isset($column[1])) ? max($column[1],$type['min']) : $type['min'];
|
||||
$max = (isset($column[2])) ? min($column[2],$type['max']) : $type['max'];
|
||||
if ($value['value'] < $min)
|
||||
{
|
||||
$error[] = sprintf($user->lang['SETTING_TOO_LOW'], $user->lang[$value['lang']], $min);
|
||||
}
|
||||
else if ($value['value'] > $max)
|
||||
{
|
||||
$error[] = sprintf($user->lang['SETTING_TOO_BIG'], $user->lang[$value['lang']], $max);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@@ -122,11 +122,11 @@
|
||||
{
|
||||
if (newimage == 'no_image')
|
||||
{
|
||||
document.image_upload_icon.src = "{PHPBB_ROOT_PATH}images/spacer.gif";
|
||||
document.getElementById('image_upload_icon').src = "{PHPBB_ROOT_PATH}images/spacer.gif";
|
||||
}
|
||||
else
|
||||
{
|
||||
document.image_upload_icon.src = "{PHPBB_ROOT_PATH}{IMG_PATH}/" + newimage;
|
||||
document.getElementById('image_upload_icon').src = "{PHPBB_ROOT_PATH}{IMG_PATH}/" + newimage;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
<dd><select name="upload_icon" id="upload_icon" onchange="update_image(this.options[selectedIndex].value);">
|
||||
<option value="no_image"<!-- IF S_NO_IMAGE --> selected="selected"<!-- ENDIF -->>{L_NO_IMAGE}</option>{S_FILENAME_LIST}
|
||||
</select></dd>
|
||||
<dd> <img <!-- IF S_NO_IMAGE -->src="{PHPBB_ROOT_PATH}images/spacer.gif"<!-- ELSE -->src="{UPLOAD_ICON_SRC}"<!-- ENDIF --> name="image_upload_icon" alt="" title="" /> </dd>
|
||||
<dd> <img <!-- IF S_NO_IMAGE -->src="{PHPBB_ROOT_PATH}images/spacer.gif"<!-- ELSE -->src="{UPLOAD_ICON_SRC}"<!-- ENDIF --> id="image_upload_icon" alt="" title="" /> </dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="extgroup_filesize">{L_MAX_EXTGROUP_FILESIZE}:</label></dt>
|
||||
|
@@ -97,11 +97,11 @@
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="unbanreason">{L_BAN_REASON}:</label></dt>
|
||||
<dd><input style="border: 0;" type="text" class="text full" disabled="disabled" name="unbanreason" id="unbanreason" /></dd>
|
||||
<dd><textarea style="border: 0;" class="text full" disabled="disabled" name="unbanreason" id="unbanreason" rows="5" cols="80"> </textarea></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="unbangivereason">{L_BAN_GIVE_REASON}:</label></dt>
|
||||
<dd><input style="border: 0;" type="text" class="text full" disabled="disabled" name="unbangivereason" id="unbangivereason" /></dd>
|
||||
<dd><textarea style="border: 0;" class="text full" disabled="disabled" name="unbangivereason" id="unbangivereason" rows="5" cols="80"> </textarea></dd>
|
||||
</dl>
|
||||
|
||||
<p class="submit-buttons">
|
||||
|
@@ -103,6 +103,10 @@
|
||||
<td style="text-align: center;">{bbcodes.BBCODE_TAG}</td>
|
||||
<td style="text-align: right; width: 40px;"><a href="{bbcodes.U_EDIT}">{ICON_EDIT}</a> <a href="{bbcodes.U_DELETE}">{ICON_DELETE}</a></td>
|
||||
</tr>
|
||||
<!-- BEGINELSE -->
|
||||
<tr class="row3">
|
||||
<td colspan="2">{L_ACP_NO_ITEMS}</td>
|
||||
</tr>
|
||||
<!-- END bbcodes -->
|
||||
</tbody>
|
||||
</table>
|
||||
|
@@ -22,47 +22,34 @@
|
||||
<dd><label><input type="radio" class="radio" id="enable_post_confirm" name="enable_post_confirm" value="1"<!-- IF POST_ENABLE --> checked="checked"<!-- ENDIF --> /> {L_ENABLED}</label>
|
||||
<label><input type="radio" class="radio" name="enable_post_confirm" value="0"<!-- IF not POST_ENABLE --> checked="checked"<!-- ENDIF --> /> {L_DISABLED}</label></dd>
|
||||
</dl>
|
||||
<!-- IF GD -->
|
||||
<dl>
|
||||
<dt><label for="captcha_gd">{L_CAPTCHA_GD}:</label><br /><span>{L_CAPTCHA_GD_EXPLAIN}</span></dt>
|
||||
<dd><label><input id="captcha_gd" name="captcha_gd" value="1" class="radio" type="radio"<!-- IF CAPTCHA_GD --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input name="captcha_gd" value="0" class="radio" type="radio"<!-- IF not CAPTCHA_GD --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="captcha_gd_foreground_noise">{L_CAPTCHA_GD_FOREGROUND_NOISE}:</label><br /><span>{L_CAPTCHA_GD_FOREGROUND_NOISE_EXPLAIN}</span></dt>
|
||||
<dd><label><input id="captcha_gd_foreground_noise" name="captcha_gd_foreground_noise" value="1" class="radio" type="radio"<!-- IF CAPTCHA_GD_FOREGROUND_NOISE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input name="captcha_gd_foreground_noise" value="0" class="radio" type="radio"<!-- IF not CAPTCHA_GD_FOREGROUND_NOISE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="captcha_gd_x_grid">{L_CAPTCHA_GD_X_GRID}:</label><br /><span>{L_CAPTCHA_GD_X_GRID_EXPLAIN}</span></dt>
|
||||
<dd><input id="captcha_gd_x_grid" name="captcha_gd_x_grid" value="{CAPTCHA_GD_X_GRID}" type="text" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="captcha_gd_y_grid">{L_CAPTCHA_GD_Y_GRID}:</label><br /><span>{L_CAPTCHA_GD_Y_GRID_EXPLAIN}</span></dt>
|
||||
<dd><input id="captcha_gd_y_grid" name="captcha_gd_y_grid" value="{CAPTCHA_GD_Y_GRID}" type="text" /></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_AVAILABLE_CAPTCHAS}</legend>
|
||||
|
||||
<dl>
|
||||
<dt><label for="captcha_select">{L_CAPTCHA_SELECT}:</label><br /><span>{L_CAPTCHA_SELECT_EXPLAIN}</span></dt>
|
||||
<dd><select id="captcha_select" name="select_captcha" onchange="(document.getElementById('acp_captcha')).submit()" >{CAPTCHA_SELECT}</select></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="configure">{L_CAPTCHA_CONFIGURE}:</label><br /><span>{L_CAPTCHA_CONFIGURE_EXPLAIN}</span></dt>
|
||||
<dd><input class="button2" type="submit" id="configure" name="configure" value="{L_CONFIGURE}" /></dd>
|
||||
</dl>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<!-- IF CAPTCHA_PREVIEW -->
|
||||
<fieldset>
|
||||
<legend>{L_PREVIEW}</legend>
|
||||
<!-- IF PREVIEW -->
|
||||
<div class="successbox">
|
||||
<h3>{L_WARNING}</h3>
|
||||
<p>{L_CAPTCHA_PREVIEW_MSG}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<dl>
|
||||
<dt><label for="captcha_preview">{L_PREVIEW}:</label><br /><span>{L_CAPTCHA_PREVIEW_EXPLAIN}</span></dt>
|
||||
<dd><img src="{CAPTCHA_PREVIEW}" alt="{L_PREVIEW}" <!-- IF CAPTCHA_GD_PREVIEWED -->width="360" height="96"<!-- ELSE --> width="320" height="50"<!-- ENDIF --> id="captcha_preview" /></dd>
|
||||
</dl>
|
||||
{CAPTCHA_PREVIEW}
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
<legend>{L_SUBMIT}</legend>
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
||||
<input class="button2" type="submit" id="preview" name="preview" value="{L_PREVIEW}" />
|
||||
<input class="button1" type="submit" id="main_submit" name="main_submit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="form_reset" name="reset" value="{L_RESET}" />
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
@@ -7,8 +7,9 @@
|
||||
|
||||
<p>{L_ACP_RESTORE_EXPLAIN}</p>
|
||||
|
||||
<!-- IF .files -->
|
||||
<form id="acp_backup" method="post" action="{U_ACTION}">
|
||||
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_RESTORE_OPTIONS}</legend>
|
||||
<dl>
|
||||
@@ -16,16 +17,19 @@
|
||||
<dd><select id="file" name="file" size="10"><!-- BEGIN files --><option value="{files.FILE}"<!-- IF files.S_LAST_ROW --> selected="selected"<!-- ENDIF -->>{files.NAME}</option><!-- END files --></select></dd>
|
||||
</dl>
|
||||
|
||||
<!-- IF .files -->
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_START_RESTORE}" />
|
||||
<input class="button2" type="submit" id="delete" name="delete" value="{L_DELETE_BACKUP}" />
|
||||
<input class="button2" type="submit" id="download" name="download" value="{L_DOWNLOAD_BACKUP}" />
|
||||
</p>
|
||||
<!-- ENDIF -->
|
||||
{S_FORM_TOKEN}
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_START_RESTORE}" />
|
||||
<input class="button2" type="submit" id="delete" name="delete" value="{L_DELETE_BACKUP}" />
|
||||
<input class="button2" type="submit" id="download" name="download" value="{L_DOWNLOAD_BACKUP}" />
|
||||
</p>
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
<!-- ELSE -->
|
||||
<div class="errorbox">
|
||||
<p>{L_ACP_NO_ITEMS}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- ELSE -->
|
||||
<h1>{L_ACP_BACKUP}</h1>
|
||||
@@ -77,7 +81,7 @@
|
||||
<option value="{tables.TABLE}">{tables.TABLE}</option>
|
||||
<!-- END tables -->
|
||||
</select></dd>
|
||||
<dd><a href="#" onclick="selector(true)">{L_SELECT_ALL}</a> :: <a href="#" onclick="selector(false)">{L_DESELECT_ALL}</a></dd>
|
||||
<dd><a href="#" onclick="selector(true); return false;">{L_SELECT_ALL}</a> :: <a href="#" onclick="selector(false); return false;">{L_DESELECT_ALL}</a></dd>
|
||||
</dl>
|
||||
|
||||
<p class="submit-buttons">
|
||||
|
@@ -96,7 +96,7 @@
|
||||
|
||||
<a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">« {L_BACK}</a>
|
||||
|
||||
<h1>{L_TITLE} :: {FORUM_NAME}</h1>
|
||||
<h1>{L_TITLE} <!-- IF FORUM_NAME -->:: {FORUM_NAME}<!-- ENDIF --></h1>
|
||||
|
||||
<p>{L_FORUM_EDIT_EXPLAIN}</p>
|
||||
|
||||
@@ -202,6 +202,11 @@
|
||||
<dt><label for="forum_status">{L_FORUM_STATUS}:</label></dt>
|
||||
<dd><select id="forum_status" name="forum_status">{S_STATUS_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="display_subforum_list">{L_LIST_SUBFORUMS}:</label><br /><span>{L_LIST_SUBFORUMS_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="display_subforum_list" value="1"<!-- IF S_DISPLAY_SUBFORUM_LIST --> id="display_subforum_list" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="display_subforum_list" value="0"<!-- IF not S_DISPLAY_SUBFORUM_LIST --> id="display_subforum_list" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="display_on_index">{L_LIST_INDEX}:</label><br /><span>{L_LIST_INDEX_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="display_on_index" value="1"<!-- IF S_DISPLAY_ON_INDEX --> id="display_on_index" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
@@ -445,7 +450,7 @@
|
||||
<!-- IF forums.S_FIRST_ROW && not forums.S_LAST_ROW -->
|
||||
{ICON_MOVE_UP_DISABLED}
|
||||
<a href="{forums.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
|
||||
<!-- ELSEIF not forums.S_FIRST_ROW && not forums.S_LAST_ROW-->
|
||||
<!-- ELSEIF not forums.S_FIRST_ROW && not forums.S_LAST_ROW -->
|
||||
<a href="{forums.U_MOVE_UP}">{ICON_MOVE_UP}</a>
|
||||
<a href="{forums.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
|
||||
<!-- ELSEIF forums.S_LAST_ROW && not forums.S_FIRST_ROW -->
|
||||
|
@@ -74,6 +74,10 @@
|
||||
<dt><label for="group_message_limit">{L_GROUP_MESSAGE_LIMIT}:</label><br /><span>{L_GROUP_MESSAGE_LIMIT_EXPLAIN}</span></dt>
|
||||
<dd><input name="group_message_limit" type="text" id="group_message_limit" maxlength="4" size="4" value="{GROUP_MESSAGE_LIMIT}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="group_max_recipients">{L_GROUP_MAX_RECIPIENTS}:</label><br /><span>{L_GROUP_MAX_RECIPIENTS_EXPLAIN}</span></dt>
|
||||
<dd><input name="group_max_recipients" type="text" id="group_max_recipients" maxlength="10" size="4" value="{GROUP_MAX_RECIPIENTS}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="group_colour">{L_GROUP_COLOR}:</label><br /><span>{L_GROUP_COLOR_EXPLAIN}</span></dt>
|
||||
<dd><input name="group_colour" type="text" id="group_colour" value="{GROUP_COLOUR}" size="6" maxlength="6" /> <span>[ <a href="{U_SWATCH}" onclick="popup(this.href, 636, 150, '_swatch'); return false">{L_COLOUR_SWATCH}</a> ]</span></dd>
|
||||
|
@@ -43,19 +43,19 @@
|
||||
|
||||
function toggle_select(icon, display, select)
|
||||
{
|
||||
var disp = document.getElementById('order_disp[' + icon + ']');
|
||||
var nodisp = document.getElementById('order_no_disp[' + icon + ']');
|
||||
var disp = document.getElementById('order_disp_' + select);
|
||||
var nodisp = document.getElementById('order_no_disp_' + select);
|
||||
disp.disabled = !display;
|
||||
nodisp.disabled = display;
|
||||
if (display)
|
||||
{
|
||||
document.getElementById(select).selectedIndex = 0;
|
||||
document.getElementById('order_' + select).selectedIndex = 0;
|
||||
nodisp.className = 'disabled-options';
|
||||
disp.className = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById(select).selectedIndex = {S_ORDER_LIST_DISPLAY_COUNT};
|
||||
document.getElementById('order_' + select).selectedIndex = {S_ORDER_LIST_DISPLAY_COUNT};
|
||||
disp.className = 'disabled-options';
|
||||
nodisp.className = '';
|
||||
}
|
||||
@@ -111,15 +111,15 @@
|
||||
<td><input class="text post" type="text" size="3" name="width[{items.IMG}]" value="{items.WIDTH}" /></td>
|
||||
<td><input class="text post" type="text" size="3" name="height[{items.IMG}]" value="{items.HEIGHT}" /></td>
|
||||
<td>
|
||||
<input type="checkbox" class="radio" name="display_on_posting[{items.IMG}]"{items.POSTING_CHECKED} onclick="toggle_select('{items.A_IMG}', this.checked, 'order[{items.A_IMG}]');"/>
|
||||
<input type="checkbox" class="radio" name="display_on_posting[{items.IMG}]"{items.POSTING_CHECKED} onclick="toggle_select('{items.A_IMG}', this.checked, '{items.S_ROW_COUNT}');"/>
|
||||
<!-- IF items.S_ID -->
|
||||
<input type="hidden" name="id[{items.IMG}]" value="{items.ID}" />
|
||||
<!-- ENDIF -->
|
||||
</td>
|
||||
<!-- IF ID or S_ADD -->
|
||||
<td><select id="order[{items.IMG}]" name="order[{items.IMG}]">
|
||||
<optgroup id="order_disp[{items.IMG}]" label="{L_DISPLAY_POSTING}" <!-- IF not items.POSTING_CHECKED -->disabled="disabled" class="disabled-options" <!-- ENDIF -->>{S_ORDER_LIST_DISPLAY}</optgroup>
|
||||
<optgroup id="order_no_disp[{items.IMG}]" label="{L_DISPLAY_POSTING_NO}" <!-- IF items.POSTING_CHECKED -->disabled="disabled" class="disabled-options" <!-- ENDIF -->>{S_ORDER_LIST_UNDISPLAY}</optgroup>
|
||||
<td><select id="order_{items.S_ROW_COUNT}" name="order[{items.IMG}]">
|
||||
<optgroup id="order_disp_{items.S_ROW_COUNT}" label="{L_DISPLAY_POSTING}" <!-- IF not items.POSTING_CHECKED -->disabled="disabled" class="disabled-options" <!-- ENDIF -->>{S_ORDER_LIST_DISPLAY}</optgroup>
|
||||
<optgroup id="order_no_disp_{items.S_ROW_COUNT}" label="{L_DISPLAY_POSTING_NO}" <!-- IF items.POSTING_CHECKED -->disabled="disabled" class="disabled-options" <!-- ENDIF -->>{S_ORDER_LIST_UNDISPLAY}</optgroup>
|
||||
</select></td>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_ADD -->
|
||||
@@ -248,6 +248,10 @@
|
||||
<a href="{items.U_EDIT}">{ICON_EDIT}</a> <a href="{items.U_DELETE}">{ICON_DELETE}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- BEGINELSE -->
|
||||
<tr class="row3">
|
||||
<td colspan="{COLSPAN}">{L_ACP_NO_ITEMS}</td>
|
||||
</tr>
|
||||
<!-- END items -->
|
||||
</tbody>
|
||||
</table>
|
||||
|
0
phpBB/adm/style/acp_inactive.html
Executable file → Normal file
@@ -121,9 +121,11 @@
|
||||
|
||||
<!--[if lt IE 8]>
|
||||
<style type="text/css">
|
||||
/* <![CDATA[ */
|
||||
input.langvalue, textarea.langvalue {
|
||||
width: 450px;
|
||||
}
|
||||
/* ]]> */
|
||||
</style>
|
||||
<![endif]-->
|
||||
|
||||
|
46
phpBB/adm/style/acp_login.html
Normal file
@@ -0,0 +1,46 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
<h1>{PAGE_TITLE}</h1>
|
||||
<p><!-- IF LOGIN_EXPLAIN -->{LOGIN_EXPLAIN}<!-- ELSE -->{L_LOGIN}<!-- ENDIF --></p>
|
||||
|
||||
<!-- IF LOGIN_ERROR -->
|
||||
<div class="errorbox">
|
||||
<h3>{L_WARNING}</h3>
|
||||
<p>{LOGIN_ERROR}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<form action="{S_LOGIN_ACTION}" method="post" id="login">
|
||||
|
||||
<fieldset>
|
||||
<dl>
|
||||
<dt><label for="{USERNAME_CREDENTIAL}">{L_USERNAME}:</label></dt>
|
||||
<dd><input type="text" tabindex="1" name="{USERNAME_CREDENTIAL}" id="{USERNAME_CREDENTIAL}" size="25" value="{USERNAME}" class="inputbox autowidth" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="{PASSWORD_CREDENTIAL}">{L_PASSWORD}:</label></dt>
|
||||
<dd><input type="password" tabindex="2" id="{PASSWORD_CREDENTIAL}" name="{PASSWORD_CREDENTIAL}" size="25" class="inputbox autowidth" /></dd>
|
||||
<!-- IF S_DISPLAY_FULL_LOGIN and (U_SEND_PASSWORD or U_RESEND_ACTIVATION) -->
|
||||
<!-- IF U_SEND_PASSWORD --><dd><a href="{U_SEND_PASSWORD}">{L_FORGOT_PASS}</a></dd><!-- ENDIF -->
|
||||
<!-- IF U_RESEND_ACTIVATION --><dd><a href="{U_RESEND_ACTIVATION}">{L_RESEND_ACTIVATION}</a></dd><!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
</dl>
|
||||
|
||||
<!-- IF S_CONFIRM_CODE -->
|
||||
<dl>
|
||||
<dt><label for="confirm_code">{L_CONFIRM_CODE}:</label><br /><span>{L_CONFIRM_CODE_EXPLAIN}</span></dt>
|
||||
<dd><input type="hidden" name="confirm_id" value="{CONFIRM_ID}" />{CONFIRM_IMAGE}</dd>
|
||||
<dd><input type="text" name="confirm_code" id="confirm_code" size="8" maxlength="8" tabindex="3" class="inputbox narrow" title="{L_CONFIRM_CODE}" /></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<p class="submit-buttons">
|
||||
<!-- IF S_DISPLAY_FULL_LOGIN -->
|
||||
<!-- IF S_AUTOLOGIN_ENABLED --><label for="autologin"><input type="checkbox" name="autologin" id="autologin" tabindex="4" /> {L_LOG_ME_IN}</label><!-- ENDIF -->
|
||||
<label for="viewonline"><input type="checkbox" name="viewonline" id="viewonline" tabindex="5" /> {L_HIDE_ME}</label>
|
||||
<!-- ENDIF -->
|
||||
|
||||
{S_HIDDEN_FIELDS}<input type="submit" name="login" tabindex="6" value="{L_LOGIN}" class="button1" />
|
||||
</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
@@ -21,6 +21,12 @@
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF S_WRITABLE_CONFIG -->
|
||||
<div class="errorbox notice">
|
||||
<p>{L_WRITABLE_CONFIG}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<table cellspacing="1">
|
||||
<caption>{L_FORUM_STATS}</caption>
|
||||
<col class="col1" /><col class="col2" /><col class="col1" /><col class="col2" />
|
||||
|
@@ -28,11 +28,11 @@
|
||||
|
||||
<p>{L_EXPLAIN}</p>
|
||||
|
||||
<form id="acp_roles" method="post" action="{U_ACTION}">
|
||||
|
||||
<br />
|
||||
<a href="#acl">» {L_SET_ROLE_PERMISSIONS}</a>
|
||||
|
||||
<form id="acp_roles" method="post" action="{U_ACTION}">
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_ROLE_DETAILS}</legend>
|
||||
<dl>
|
||||
@@ -46,6 +46,7 @@
|
||||
|
||||
<p class="quick">
|
||||
<input type="submit" class="button1" name="submit" value="{L_SUBMIT}" />
|
||||
{S_FORM_TOKEN}
|
||||
</p>
|
||||
</fieldset>
|
||||
|
||||
@@ -57,11 +58,15 @@
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
<p>
|
||||
|
||||
<a name="acl"></a>
|
||||
|
||||
<a href="#maincontent">» {L_BACK_TO_TOP}</a><br />
|
||||
<br /><br />
|
||||
|
||||
</p>
|
||||
|
||||
<h1>{L_ACL_TYPE}</h1>
|
||||
|
||||
<fieldset class="perm nolegend">
|
||||
@@ -107,9 +112,9 @@
|
||||
<!-- IF auth.mask.S_ROW_COUNT is even --><tr class="row4"><!-- ELSE --><tr class="row3"><!-- ENDIF -->
|
||||
<th class="permissions-name<!-- IF auth.mask.S_ROW_COUNT is even --> row4<!-- ELSE --> row3<!-- ENDIF -->">{auth.mask.PERMISSION}</th>
|
||||
|
||||
<td class="permissions-yes"><label for="{auth.mask.FIELD_NAME}_y"><input onchange="set_colours('00{auth.S_ROW_COUNT}', false)" id="setting[{auth.mask.FIELD_NAME}]_y" name="setting[{auth.mask.FIELD_NAME}]" class="radio" type="radio"<!-- IF auth.mask.S_YES --> checked="checked"<!-- ENDIF --> value="1" /></label></td>
|
||||
<td class="permissions-no"><label for="{auth.mask.FIELD_NAME}_u"><input onchange="set_colours('00{auth.S_ROW_COUNT}', false)" id="setting[{auth.mask.FIELD_NAME}]_u" name="setting[{auth.mask.FIELD_NAME}]" class="radio" type="radio"<!-- IF auth.mask.S_NO --> checked="checked"<!-- ENDIF --> value="-1" /></label></td>
|
||||
<td class="permissions-never"><label for="{auth.mask.FIELD_NAME}_n"><input onchange="set_colours('00{auth.S_ROW_COUNT}', false)" id="setting[{auth.mask.FIELD_NAME}]_n" name="setting[{auth.mask.FIELD_NAME}]" class="radio" type="radio"<!-- IF auth.mask.S_NEVER --> checked="checked"<!-- ENDIF --> value="0" /></label></td>
|
||||
<td class="permissions-yes"><label for="setting_{auth.mask.FIELD_NAME}_y"><input onchange="set_colours('00{auth.S_ROW_COUNT}', false)" id="setting_{auth.mask.FIELD_NAME}_y" name="setting[{auth.mask.FIELD_NAME}]" class="radio" type="radio"<!-- IF auth.mask.S_YES --> checked="checked"<!-- ENDIF --> value="1" /></label></td>
|
||||
<td class="permissions-no"><label for="setting_{auth.mask.FIELD_NAME}_u"><input onchange="set_colours('00{auth.S_ROW_COUNT}', false)" id="setting_{auth.mask.FIELD_NAME}_u" name="setting[{auth.mask.FIELD_NAME}]" class="radio" type="radio"<!-- IF auth.mask.S_NO --> checked="checked"<!-- ENDIF --> value="-1" /></label></td>
|
||||
<td class="permissions-never"><label for="setting_{auth.mask.FIELD_NAME}_n"><input onchange="set_colours('00{auth.S_ROW_COUNT}', false)" id="setting_{auth.mask.FIELD_NAME}_n" name="setting[{auth.mask.FIELD_NAME}]" class="radio" type="radio"<!-- IF auth.mask.S_NEVER --> checked="checked"<!-- ENDIF --> value="0" /></label></td>
|
||||
</tr>
|
||||
<!-- END mask -->
|
||||
</tbody>
|
||||
|
@@ -44,7 +44,7 @@
|
||||
<p>{L_LOOK_UP_FORUMS_EXPLAIN}</p>
|
||||
<dl>
|
||||
<dt><label for="forum">{L_LOOK_UP_FORUM}:</label></dt>
|
||||
<dd><select name="f[]" multiple="multiple" size="10">{S_FORUM_OPTIONS}</select></dd>
|
||||
<dd><select id="forum" name="f[]" multiple="multiple" size="10">{S_FORUM_OPTIONS}</select></dd>
|
||||
<dd><label><input type="checkbox" class="radio" name="all_forums" value="1" /> {L_ALL_FORUMS}</label></dd>
|
||||
</dl>
|
||||
|
||||
|
@@ -459,7 +459,7 @@
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="copyright">{L_COPYRIGHT}:</label></dt>
|
||||
<dd><!-- IF S_INSTALL --><b id="name">{COPYRIGHT}</b><!-- ELSE --><input type="text" id="copyright" name="copyright" value="{COPYRIGHT}" /><!-- ENDIF --></dd>
|
||||
<dd><!-- IF S_INSTALL --><b id="copyright">{COPYRIGHT}</b><!-- ELSE --><input type="text" id="copyright" name="copyright" value="{COPYRIGHT}" /><!-- ENDIF --></dd>
|
||||
</dl>
|
||||
<!-- IF S_STYLE and not S_BASIS -->
|
||||
<dl>
|
||||
@@ -475,13 +475,6 @@
|
||||
<dd><!-- IF S_INSTALL --><b id="imageset_id">{IMAGESET_NAME}</b><!-- ELSE --><select id="imageset_id" name="imageset_id">{S_IMAGESET_OPTIONS}</select><!-- ENDIF --></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_TEMPLATE or S_THEME -->
|
||||
<dl>
|
||||
<dt><label for="store_db">{L_LOCATION}:</label><br /><span>{L_LOCATION_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="store_db" value="0"<!-- IF not S_STORE_DB --> id="store_db" checked="checked"<!-- ENDIF --> /> {L_STORE_FILESYSTEM}</label>
|
||||
<label><input type="radio" class="radio" name="store_db" value="1"<!-- IF S_STORE_DB --> id="store_db" checked="checked"<!-- ENDIF --> /> {L_STORE_DATABASE}</label></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_STYLE -->
|
||||
</fieldset>
|
||||
|
||||
|
@@ -197,7 +197,7 @@
|
||||
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> • <span>{PAGINATION}</span>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
||||
<fieldset class="quick">
|
||||
<input class="button2" type="submit" name="delmarked" value="{L_DELETE_MARKED}" />
|
||||
<p class="small"><a href="#" onclick="marklist('user_attachments', 'mark', true);">{L_MARK_ALL}</a> • <a href="#" onclick="marklist('user_attachments', 'mark', false);">{L_UNMARK_ALL}</a></p>
|
||||
@@ -215,7 +215,7 @@
|
||||
<form id="select_forum" method="post" action="{U_ACTION}">
|
||||
|
||||
<fieldset class="quick" style="text-align: left;">
|
||||
{L_SELECT_FORUM}: <select name="f">{S_FORUM_OPTIONS}</select>
|
||||
{L_SELECT_FORUM}: <select name="f">{S_FORUM_OPTIONS}</select>
|
||||
<input class="button2" type="submit" value="{L_GO}" name="select" />
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
|
@@ -30,7 +30,7 @@
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label>{L_POSTS}:</label></dt>
|
||||
<dd><strong>{USER_POSTS}</strong></dd>
|
||||
<dd><strong>{USER_POSTS}</strong><!-- IF POSTS_IN_QUEUE and U_MCP_QUEUE --> (<a href="{U_MCP_QUEUE}">{L_POSTS_IN_QUEUE}</a>)<!-- ELSEIF POSTS_IN_QUEUE --> ({L_POSTS_IN_QUEUE})<!-- ENDIF --></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label>{L_WARNINGS}:</label></dt>
|
||||
@@ -138,7 +138,7 @@
|
||||
</p>
|
||||
|
||||
</fieldset>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
@@ -62,6 +62,10 @@
|
||||
<td style="text-align: center;">{words.REPLACEMENT}</td>
|
||||
<td> <a href="{words.U_EDIT}">{ICON_EDIT}</a> <a href="{words.U_DELETE}">{ICON_DELETE}</a> </td>
|
||||
</tr>
|
||||
<!-- BEGINELSE -->
|
||||
<tr class="row3">
|
||||
<td colspan="3">{L_ACP_NO_ITEMS}</td>
|
||||
</tr>
|
||||
<!-- END words -->
|
||||
</tbody>
|
||||
</table>
|
||||
|
@@ -1175,6 +1175,10 @@ input.disabled {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.notice {
|
||||
background-color: #62A5CC;
|
||||
}
|
||||
|
||||
/* Special cases for the error page */
|
||||
#errorpage #page-header a {
|
||||
font-weight: bold;
|
||||
@@ -1333,18 +1337,21 @@ fieldset.permissions .permissions-switch {
|
||||
fieldset.permissions .padding {
|
||||
}
|
||||
|
||||
.permissions-switch {
|
||||
margin-top: -6px;
|
||||
font-size: .9em;
|
||||
}
|
||||
|
||||
.permissions-switch a {
|
||||
text-decoration: underline;
|
||||
font-size: 0.90em;
|
||||
}
|
||||
|
||||
.permissions-reset {
|
||||
margin-top: -6px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.permissions-reset a {
|
||||
font-size: .8em;
|
||||
font-size: .85em;
|
||||
}
|
||||
|
||||
/* Tabbed menu */
|
||||
|
5
phpBB/adm/style/captcha_default_acp_demo.html
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
<dl>
|
||||
<dt><label for="captcha_preview">{L_PREVIEW}:</label><br /><span>{L_CAPTCHA_PREVIEW_EXPLAIN}</span></dt>
|
||||
<dd><img src="{CONFIRM_IMAGE}" alt="{L_PREVIEW}" width="360" height="96" id="captcha_preview" /></dd>
|
||||
</dl>
|
53
phpBB/adm/style/captcha_gd_acp.html
Normal file
@@ -0,0 +1,53 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<a name="maincontent"></a>
|
||||
|
||||
<h1>{L_ACP_VC_SETTINGS}</h1>
|
||||
|
||||
<p>{L_ACP_VC_SETTINGS_EXPLAIN}</p>
|
||||
|
||||
|
||||
<form id="acp_captcha" method="post" action="{U_ACTION}">
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_GENERAL_OPTIONS}</legend>
|
||||
|
||||
<dl>
|
||||
<dt><label for="captcha_gd_foreground_noise">{L_CAPTCHA_GD_FOREGROUND_NOISE}:</label><br /><span>{L_CAPTCHA_GD_FOREGROUND_NOISE_EXPLAIN}</span></dt>
|
||||
<dd><label><input id="captcha_gd_foreground_noise" name="captcha_gd_foreground_noise" value="1" class="radio" type="radio"<!-- IF CAPTCHA_GD_FOREGROUND_NOISE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input name="captcha_gd_foreground_noise" value="0" class="radio" type="radio"<!-- IF not CAPTCHA_GD_FOREGROUND_NOISE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="captcha_gd_x_grid">{L_CAPTCHA_GD_X_GRID}:</label><br /><span>{L_CAPTCHA_GD_X_GRID_EXPLAIN}</span></dt>
|
||||
<dd><input id="captcha_gd_x_grid" name="captcha_gd_x_grid" value="{CAPTCHA_GD_X_GRID}" type="text" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="captcha_gd_y_grid">{L_CAPTCHA_GD_Y_GRID}:</label><br /><span>{L_CAPTCHA_GD_Y_GRID_EXPLAIN}</span></dt>
|
||||
<dd><input id="captcha_gd_y_grid" name="captcha_gd_y_grid" value="{CAPTCHA_GD_Y_GRID}" type="text" /></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{L_PREVIEW}</legend>
|
||||
<!-- IF PREVIEW -->
|
||||
<div class="successbox">
|
||||
<h3>{L_WARNING}</h3>
|
||||
<p>{L_CAPTCHA_PREVIEW_MSG}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
{CAPTCHA_PREVIEW}
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
<legend>{L_SUBMIT}</legend>
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
||||
<input type="hidden" name="select_captcha" value="{CAPTCHA_NAME}" />
|
||||
<input type="hidden" name="configure" value="1" />
|
||||
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
19
phpBB/adm/style/captcha_recaptcha.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<!-- IF S_RECAPTCHA_AVAILABLE -->
|
||||
<dl>
|
||||
<script type="text/javascript" src="{RECAPTCHA_SERVER}/challenge?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}">
|
||||
// <![CDATA[
|
||||
var RecaptchaOptions = {
|
||||
lang : {L_RECAPTCHA_LANG}
|
||||
};
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
<noscript>
|
||||
<iframe src="{RECAPTCHA_SERVER}/noscript?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}" height="300" width="500" frameborder="0"></iframe><br/>
|
||||
<textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
|
||||
<input type="hidden" name="recaptcha_response_field" value="manual_challenge"/>
|
||||
</noscript>
|
||||
</dl>
|
||||
<!-- ELSE -->
|
||||
{L_RECAPTCHA_NOT_AVAILABLE}
|
||||
<!-- ENDIF -->
|
48
phpBB/adm/style/captcha_recaptcha_acp.html
Normal file
@@ -0,0 +1,48 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<a name="maincontent"></a>
|
||||
|
||||
<h1>{L_ACP_VC_SETTINGS}</h1>
|
||||
|
||||
<p>{L_ACP_VC_SETTINGS_EXPLAIN}</p>
|
||||
|
||||
|
||||
<form id="acp_captcha" method="post" action="{U_ACTION}">
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_GENERAL_OPTIONS}</legend>
|
||||
|
||||
<dl>
|
||||
<dt><label for="recaptcha_pubkey">{L_RECAPTCHA_PUBLIC}:</label><br /><span>{L_RECAPTCHA_PUBLIC_EXPLAIN}</span></dt>
|
||||
<dd><input id="recaptcha_pubkey" name="recaptcha_pubkey" value="{RECAPTCHA_PUBKEY}" size="50" type="text" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="recaptcha_privkey">{L_RECAPTCHA_PRIVATE}:</label><br /><span>{L_RECAPTCHA_PRIVATE_EXPLAIN}</span></dt>
|
||||
<dd><input id="recaptcha_privkey" name="recaptcha_privkey" value="{RECAPTCHA_PRIVKEY}" size="50" type="text" /></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{L_PREVIEW}</legend>
|
||||
<!-- IF PREVIEW -->
|
||||
<div class="successbox">
|
||||
<h3>{L_WARNING}</h3>
|
||||
<p>{L_CAPTCHA_PREVIEW_MSG}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
{CAPTCHA_PREVIEW}
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
<legend>{L_SUBMIT}</legend>
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
||||
<input type="hidden" name="select_captcha" value="{CAPTCHA_NAME}" />
|
||||
<input type="hidden" name="configure" value="1" />
|
||||
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
@@ -8,7 +8,7 @@
|
||||
<title>{L_COLOUR_SWATCH}</title>
|
||||
|
||||
<style type="text/css">
|
||||
<!--
|
||||
/* <![CDATA[ */
|
||||
body {
|
||||
background-color: #404040;
|
||||
color: #fff;
|
||||
@@ -29,7 +29,7 @@
|
||||
img {
|
||||
border: 0;
|
||||
}
|
||||
//-->
|
||||
/* ]]> */
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
0
phpBB/adm/style/install_convert.html
Executable file → Normal file
0
phpBB/adm/style/install_error.html
Executable file → Normal file
0
phpBB/adm/style/install_footer.html
Executable file → Normal file
0
phpBB/adm/style/install_header.html
Executable file → Normal file
0
phpBB/adm/style/install_install.html
Executable file → Normal file
0
phpBB/adm/style/install_main.html
Executable file → Normal file
@@ -186,7 +186,7 @@
|
||||
<p>{L_NO_UPDATE_FILES_EXPLAIN}</p><br />
|
||||
|
||||
<strong>{NO_UPDATE_FILES}</strong>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
<!-- IF files.S_CUSTOM -->
|
||||
<dd style="margin-left: 60%;"><label><input type="checkbox" name="no_update[]" value="{files.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
||||
<!-- IF files.STATUS eq 'modified' -->
|
||||
</dl>
|
||||
<dl>
|
||||
@@ -295,7 +295,7 @@
|
||||
<p>{L_UPDATE_METHOD_EXPLAIN}</p>
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
<input class="button1" type="submit" name="ftp_upload" value="{L_FTP_UPDATE_METHOD}" /> <input class="button1" type="submit" name="download" value="{L_DOWNLOAD_UPDATE_METHOD}" />
|
||||
<input class="button1" type="submit" name="ftp_upload" value="{L_FTP_UPDATE_METHOD}" /> <input class="button1" type="submit" name="download" value="{L_DOWNLOAD_UPDATE_METHOD_BUTTON}" />
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
@@ -360,9 +360,18 @@
|
||||
<p>{L_CONNECTION_SUCCESS}</p>
|
||||
</div>
|
||||
<!-- ELSEIF S_CONNECTION_FAILED -->
|
||||
<div class="successbox">
|
||||
<p>{L_TRY_DOWNLOAD_METHOD}</p>
|
||||
|
||||
<fieldset class="quick">
|
||||
<input class="button1" type="submit" name="download" value="{L_TRY_DOWNLOAD_METHOD_BUTTON}" />
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="errorbox">
|
||||
<p>{L_CONNECTION_FAILED}<br />{ERROR_MSG}</p>
|
||||
</div>
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
<fieldset>
|
||||
@@ -378,7 +387,7 @@
|
||||
</dl>
|
||||
<!-- END data -->
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
{S_HIDDEN_FIELDS}
|
||||
<input class="button2" type="submit" name="check_again" value="{L_BACK}" />
|
||||
|
@@ -32,7 +32,7 @@ function resize_panel()
|
||||
</script>
|
||||
|
||||
<style type="text/css">
|
||||
<!--
|
||||
/* <![CDATA[ */
|
||||
|
||||
#main {
|
||||
font-size: 1em;
|
||||
@@ -198,7 +198,7 @@ table.hrdiff caption span {
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
//-->
|
||||
/* ]]> */
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
@@ -181,11 +181,12 @@ function switch_menu()
|
||||
<span class="corners-top"><span></span></span>
|
||||
<div id="content">
|
||||
<!-- IF not S_USER_NOTICE -->
|
||||
<div id="toggle">
|
||||
<div id="toggle">
|
||||
<a id="toggle-handle" accesskey="m" title="{L_MENU_TOGGLE}" onclick="switch_menu(); return false;" href="#"></a></div>
|
||||
<!-- ENDIF -->
|
||||
<div id="menu">
|
||||
<p>{L_LOGGED_IN_AS}<br /><strong>{USERNAME}</strong> [ <a href="{U_LOGOUT}">{L_LOGOUT}</a> ]</p>
|
||||
<p><!-- IF S_USER_LOGGED_IN --> {L_LOGGED_IN_AS}<br /><strong>{USERNAME}</strong> [ <a href="{U_LOGOUT}">{L_LOGOUT}</a> ]<!-- ENDIF --><!-- IF S_USER_ADMIN -->[ <a href="{U_ADM_LOGOUT}">{L_ADM_LOGOUT}</a> ]<!-- ENDIF --></p>
|
||||
<!-- IF S_USER_ADMIN -->
|
||||
<ul>
|
||||
<!-- BEGIN l_block1 -->
|
||||
<!-- IF l_block1.S_SELECTED -->
|
||||
@@ -203,6 +204,7 @@ function switch_menu()
|
||||
<!-- ENDIF -->
|
||||
<!-- END l_block1 -->
|
||||
</ul>
|
||||
<!-- ENDIF -->
|
||||
</div>
|
||||
|
||||
<div id="main">
|
||||
|
@@ -68,7 +68,7 @@
|
||||
<!-- ELSE -->
|
||||
<li class="permissions-preset-custom<!-- IF p_mask.S_FIRST_ROW and p_mask.f_mask.S_FIRST_ROW and p_mask.f_mask.category.S_FIRST_ROW --> activetab<!-- ENDIF -->" id="tab{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}">
|
||||
<!-- ENDIF -->
|
||||
<a href="#" onclick="swap_options('{p_mask.S_ROW_COUNT}', '{p_mask.f_mask.S_ROW_COUNT}', '{p_mask.f_mask.category.S_ROW_COUNT}', false<!-- IF p_mask.S_VIEW -->, true<!-- ENDIF -->); return false;"><span class="tabbg"><span class="colour"></span>{category.CAT_NAME}</span></a></li>
|
||||
<a href="#" onclick="swap_options('{p_mask.S_ROW_COUNT}', '{p_mask.f_mask.S_ROW_COUNT}', '{p_mask.f_mask.category.S_ROW_COUNT}', false<!-- IF p_mask.S_VIEW -->, true<!-- ENDIF -->); return false;"><span class="tabbg"><span class="colour"></span>{p_mask.f_mask.category.CAT_NAME}</span></a></li>
|
||||
<!-- END category -->
|
||||
</ul>
|
||||
</div>
|
||||
|
@@ -13,9 +13,9 @@
|
||||
*/
|
||||
define('IN_PHPBB', true);
|
||||
define('ADMIN_START', true);
|
||||
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
include($phpbb_root_path . 'common.' . $phpEx);
|
||||
if (!defined('PHPBB_ROOT_PATH')) define('PHPBB_ROOT_PATH', './../');
|
||||
if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
|
||||
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
|
||||
|
||||
// Start session management
|
||||
$user->session_begin(false);
|
||||
@@ -23,7 +23,7 @@ $auth->acl($user->data);
|
||||
$user->setup();
|
||||
|
||||
// Set custom template for admin area
|
||||
$template->set_custom_template($phpbb_root_path . 'adm/style', 'admin');
|
||||
$template->set_custom_template(PHPBB_ROOT_PATH . CONFIG_ADM_FOLDER . '/style', 'admin');
|
||||
|
||||
$template->set_filenames(array(
|
||||
'body' => 'colour_swatch.html')
|
||||
@@ -39,7 +39,7 @@ $name = (!preg_match('/^[a-z0-9_-]+$/i', $name)) ? '' : $name;
|
||||
$template->assign_vars(array(
|
||||
'OPENER' => $form,
|
||||
'NAME' => $name,
|
||||
'T_IMAGES_PATH' => "{$phpbb_root_path}images/",
|
||||
'T_IMAGES_PATH' => PHPBB_ROOT_PATH . 'images/',
|
||||
|
||||
'S_USER_LANG' => $user->lang['USER_LANG'],
|
||||
'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @copyright (c) 2005 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
* Minimum Requirement: PHP 4.3.3
|
||||
* Minimum Requirement: PHP 5.2.0+
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -21,6 +21,7 @@ $starttime = $starttime[1] + $starttime[0];
|
||||
|
||||
// Report all errors, except notices
|
||||
error_reporting(E_ALL ^ E_NOTICE);
|
||||
date_default_timezone_set('UTC');
|
||||
|
||||
/*
|
||||
* Remove variables created by register_globals from the global scope
|
||||
@@ -103,7 +104,7 @@ if (version_compare(PHP_VERSION, '6.0.0-dev', '>='))
|
||||
}
|
||||
else
|
||||
{
|
||||
set_magic_quotes_runtime(0);
|
||||
@set_magic_quotes_runtime(0);
|
||||
|
||||
// Be paranoid with passed vars
|
||||
if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on' || !function_exists('ini_get'))
|
||||
@@ -116,22 +117,22 @@ else
|
||||
|
||||
if (defined('IN_CRON'))
|
||||
{
|
||||
$phpbb_root_path = dirname(__FILE__) . DIRECTORY_SEPARATOR;
|
||||
@define('PHPBB_ROOT_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
if (!file_exists($phpbb_root_path . 'config.' . $phpEx))
|
||||
if (!file_exists(PHPBB_ROOT_PATH . 'config.' . PHP_EXT))
|
||||
{
|
||||
die("<p>The config.$phpEx file could not be found.</p><p><a href=\"{$phpbb_root_path}install/index.$phpEx\">Click here to install phpBB</a></p>");
|
||||
die('<p>The config.' . PHP_EXT . ' file could not be found.</p><p><a href="' . PHPBB_ROOT_PATH . 'install/index.' . PHP_EXT . '">Click here to install phpBB</a></p>');
|
||||
}
|
||||
|
||||
require($phpbb_root_path . 'config.' . $phpEx);
|
||||
require(PHPBB_ROOT_PATH . 'config.' . PHP_EXT);
|
||||
|
||||
if (!defined('PHPBB_INSTALLED'))
|
||||
{
|
||||
// Redirect the user to the installer
|
||||
// We have to generate a full HTTP/1.1 header here since we can't guarantee to have any of the information
|
||||
// available as used by the redirect function
|
||||
$server_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME');
|
||||
$server_name = (!empty($_SERVER['HTTP_HOST'])) ? strtolower($_SERVER['HTTP_HOST']) : ((!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME'));
|
||||
$server_port = (!empty($_SERVER['SERVER_PORT'])) ? (int) $_SERVER['SERVER_PORT'] : (int) getenv('SERVER_PORT');
|
||||
$secure = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 1 : 0;
|
||||
|
||||
@@ -143,14 +144,18 @@ if (!defined('PHPBB_INSTALLED'))
|
||||
|
||||
// Replace any number of consecutive backslashes and/or slashes with a single slash
|
||||
// (could happen on some proxy setups and/or Windows servers)
|
||||
$script_path = trim(dirname($script_name)) . '/install/index.' . $phpEx;
|
||||
$script_path = trim(dirname($script_name)) . '/install/index.' . PHP_EXT;
|
||||
$script_path = preg_replace('#[\\\\/]{2,}#', '/', $script_path);
|
||||
|
||||
$url = (($secure) ? 'https://' : 'http://') . $server_name;
|
||||
|
||||
if ($server_port && (($secure && $server_port <> 443) || (!$secure && $server_port <> 80)))
|
||||
{
|
||||
$url .= ':' . $server_port;
|
||||
// HTTP HOST can carry a port number...
|
||||
if (strpos($server_name, ':') === false)
|
||||
{
|
||||
$url .= ':' . $server_port;
|
||||
}
|
||||
}
|
||||
|
||||
$url .= $script_path;
|
||||
@@ -179,27 +184,30 @@ if (!empty($load_extensions))
|
||||
}
|
||||
|
||||
// Include files
|
||||
require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/cache.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/template.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/session.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/auth.' . $phpEx);
|
||||
require(PHPBB_ROOT_PATH . 'includes/acm/acm_' . $acm_type . '.' . PHP_EXT);
|
||||
require(PHPBB_ROOT_PATH . 'includes/cache.' . PHP_EXT);
|
||||
require(PHPBB_ROOT_PATH . 'includes/template.' . PHP_EXT);
|
||||
require(PHPBB_ROOT_PATH . 'includes/session.' . PHP_EXT);
|
||||
require(PHPBB_ROOT_PATH . 'includes/auth.' . PHP_EXT);
|
||||
|
||||
require($phpbb_root_path . 'includes/functions.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/functions_content.' . $phpEx);
|
||||
require(PHPBB_ROOT_PATH . 'includes/functions.' . PHP_EXT);
|
||||
require(PHPBB_ROOT_PATH . 'includes/functions_content.' . PHP_EXT);
|
||||
|
||||
require($phpbb_root_path . 'includes/constants.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
|
||||
require(PHPBB_ROOT_PATH . 'includes/constants.' . PHP_EXT);
|
||||
require(PHPBB_ROOT_PATH . 'includes/db/' . $dbms . '.' . PHP_EXT);
|
||||
require(PHPBB_ROOT_PATH . 'includes/utf/utf_tools.' . PHP_EXT);
|
||||
|
||||
// Set PHP error handler to ours
|
||||
set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler');
|
||||
|
||||
// enforce the use of the request class
|
||||
request::disable_super_globals();
|
||||
|
||||
// Instantiate some basic classes
|
||||
$user = new user();
|
||||
$auth = new auth();
|
||||
$template = new template();
|
||||
$cache = new cache();
|
||||
$cache = new acm();
|
||||
$db = new $sql_db();
|
||||
|
||||
// Connect to DB
|
||||
@@ -209,15 +217,15 @@ $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, defined('
|
||||
unset($dbpasswd);
|
||||
|
||||
// Grab global variables, re-cache if necessary
|
||||
$config = $cache->obtain_config();
|
||||
$config = cache::obtain_config();
|
||||
|
||||
// Add own hook handler
|
||||
require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
|
||||
require(PHPBB_ROOT_PATH . 'includes/hooks/index.' . PHP_EXT);
|
||||
$phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('template', 'display')));
|
||||
|
||||
foreach ($cache->obtain_hooks() as $hook)
|
||||
foreach (cache::obtain_hooks() as $hook)
|
||||
{
|
||||
@include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx);
|
||||
@include(PHPBB_ROOT_PATH . 'includes/hooks/' . $hook . '.' . PHP_EXT);
|
||||
}
|
||||
|
||||
?>
|
@@ -12,9 +12,9 @@
|
||||
*/
|
||||
define('IN_PHPBB', true);
|
||||
define('IN_CRON', true);
|
||||
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
include($phpbb_root_path . 'common.' . $phpEx);
|
||||
if (!defined('PHPBB_ROOT_PATH')) define('PHPBB_ROOT_PATH', './');
|
||||
if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
|
||||
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
|
||||
|
||||
// Do not update users last page entry
|
||||
$user->session_begin(false);
|
||||
@@ -74,7 +74,7 @@ switch ($cron_type)
|
||||
{
|
||||
case 'queue':
|
||||
|
||||
if (time() - $config['queue_interval'] <= $config['last_queue_run'] || !file_exists($phpbb_root_path . 'cache/queue.' . $phpEx))
|
||||
if (time() - $config['queue_interval'] <= $config['last_queue_run'] || !file_exists(PHPBB_ROOT_PATH . 'cache/queue.' . PHP_EXT))
|
||||
{
|
||||
break;
|
||||
}
|
||||
@@ -85,7 +85,7 @@ switch ($cron_type)
|
||||
$use_shutdown_function = false;
|
||||
}
|
||||
|
||||
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
|
||||
include_once(PHPBB_ROOT_PATH . 'includes/functions_messenger.' . PHP_EXT);
|
||||
$queue = new queue();
|
||||
|
||||
if ($use_shutdown_function)
|
||||
@@ -118,16 +118,16 @@ switch ($cron_type)
|
||||
break;
|
||||
|
||||
case 'tidy_search':
|
||||
|
||||
|
||||
// Select the search method
|
||||
$search_type = basename($config['search_type']);
|
||||
|
||||
if (time() - $config['search_gc'] <= $config['search_last_gc'] || !file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
|
||||
if (time() - $config['search_gc'] <= $config['search_last_gc'] || !file_exists(PHPBB_ROOT_PATH . 'includes/search/' . $search_type . '.' . PHP_EXT))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
include_once("{$phpbb_root_path}includes/search/$search_type.$phpEx");
|
||||
include_once(PHPBB_ROOT_PATH . "includes/search/$search_type." . PHP_EXT);
|
||||
|
||||
// We do some additional checks in the module to ensure it can actually be utilised
|
||||
$error = false;
|
||||
@@ -156,7 +156,7 @@ switch ($cron_type)
|
||||
break;
|
||||
}
|
||||
|
||||
include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
include_once(PHPBB_ROOT_PATH . 'includes/functions_admin.' . PHP_EXT);
|
||||
|
||||
if ($use_shutdown_function)
|
||||
{
|
||||
@@ -176,7 +176,7 @@ switch ($cron_type)
|
||||
break;
|
||||
}
|
||||
|
||||
include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
include_once(PHPBB_ROOT_PATH . 'includes/functions_admin.' . PHP_EXT);
|
||||
|
||||
if ($use_shutdown_function)
|
||||
{
|
||||
@@ -226,7 +226,7 @@ switch ($cron_type)
|
||||
// Do the forum Prune thang
|
||||
if ($row['prune_next'] < time() && $row['enable_prune'])
|
||||
{
|
||||
include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
include_once(PHPBB_ROOT_PATH . 'includes/functions_admin.' . PHP_EXT);
|
||||
|
||||
if ($row['prune_days'])
|
||||
{
|
||||
|
@@ -20,34 +20,10 @@
|
||||
//
|
||||
die("Please read the first lines of this script for instructions on how to enable it");
|
||||
|
||||
|
||||
// This script adds missing permissions
|
||||
$db = $dbhost = $dbuser = $dbpasswd = $dbport = $dbname = '';
|
||||
|
||||
define('IN_PHPBB', 1);
|
||||
define('ANONYMOUS', 1);
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
$phpbb_root_path='./../';
|
||||
include($phpbb_root_path . 'config.'.$phpEx);
|
||||
require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.'.$phpEx);
|
||||
require($phpbb_root_path . 'includes/db/' . $dbms . '.'.$phpEx);
|
||||
include($phpbb_root_path . 'includes/functions.'.$phpEx);
|
||||
|
||||
define('ACL_NEVER', 0);
|
||||
define('ACL_YES', 1);
|
||||
define('ACL_NO', -1);
|
||||
|
||||
define('ACL_GROUPS_TABLE', $table_prefix.'acl_groups');
|
||||
define('ACL_OPTIONS_TABLE', $table_prefix.'acl_options');
|
||||
define('ACL_USERS_TABLE', $table_prefix.'acl_users');
|
||||
define('GROUPS_TABLE', $table_prefix.'groups');
|
||||
define('USERS_TABLE', $table_prefix.'users');
|
||||
|
||||
$cache = new acm();
|
||||
$db = new sql_db();
|
||||
|
||||
// Connect to DB
|
||||
$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
|
||||
define('PHPBB_ROOT_PATH', './../');
|
||||
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
|
||||
require(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
|
||||
|
||||
// auth => is_local, is_global
|
||||
$f_permissions = array(
|
||||
@@ -250,7 +226,7 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting)
|
||||
$sql = 'SELECT group_id FROM ' . GROUPS_TABLE . "
|
||||
WHERE group_name = '" . strtoupper($ug_id) . "'";
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
$id = (int) $db->sql_fetchfield('group_id', 0, $result);
|
||||
$id = (int) $db->sql_fetchfield('group_id', $result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!$id)
|
||||
@@ -414,4 +390,7 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting)
|
||||
|
||||
}
|
||||
|
||||
garbage_collection();
|
||||
exit_handler();
|
||||
|
||||
?>
|
10
phpBB/develop/adjust_avatars.php
Executable file → Normal file
@@ -9,9 +9,9 @@ die("Please read the first lines of this script for instructions on how to enabl
|
||||
set_time_limit(0);
|
||||
|
||||
define('IN_PHPBB', true);
|
||||
$phpbb_root_path = './../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
include($phpbb_root_path . 'common.'.$phpEx);
|
||||
define('PHPBB_ROOT_PATH', './../');
|
||||
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
|
||||
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
|
||||
|
||||
// Start session management
|
||||
$user->session_begin();
|
||||
@@ -130,9 +130,9 @@ $db->sql_close();
|
||||
|
||||
function adjust_avatar($old_name, $midfix)
|
||||
{
|
||||
global $config, $phpbb_root_path;
|
||||
global $config;
|
||||
|
||||
$avatar_path = $phpbb_root_path . $config['avatar_path'];
|
||||
$avatar_path = PHPBB_ROOT_PATH . $config['avatar_path'];
|
||||
$extension = strtolower(substr(strrchr($old_name, '.'), 1));
|
||||
$new_name = $config['avatar_salt'] . '_' . $midfix . '.' . $extension;
|
||||
|
||||
|
@@ -11,10 +11,10 @@ die("Please read the first lines of this script for instructions on how to enabl
|
||||
set_time_limit(0);
|
||||
|
||||
define('IN_PHPBB', true);
|
||||
$phpbb_root_path = './../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
include($phpbb_root_path . 'common.'.$phpEx);
|
||||
include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
|
||||
define('PHPBB_ROOT_PATH', './../');
|
||||
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
|
||||
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
|
||||
include(PHPBB_ROOT_PATH . 'includes/message_parser.' . PHP_EXT);
|
||||
|
||||
// Start session management
|
||||
$user->session_begin();
|
||||
|
@@ -10,9 +10,9 @@ die("Please read the first lines of this script for instructions on how to enabl
|
||||
set_time_limit(0);
|
||||
|
||||
define('IN_PHPBB', true);
|
||||
$phpbb_root_path = './../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
include($phpbb_root_path . 'common.'.$phpEx);
|
||||
define('PHPBB_ROOT_PATH', './../');
|
||||
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
|
||||
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
|
||||
|
||||
// Start session management
|
||||
$user->session_begin();
|
||||
|
@@ -13,9 +13,9 @@ set_time_limit(0);
|
||||
@ini_set('memory_limit', '128M');
|
||||
|
||||
define('IN_PHPBB', true);
|
||||
$phpbb_root_path = './../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
include($phpbb_root_path . 'common.'.$phpEx);
|
||||
define('PHPBB_ROOT_PATH', './../');
|
||||
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
|
||||
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
|
||||
|
||||
// Start session management
|
||||
$user->session_begin();
|
||||
|
@@ -7,9 +7,9 @@ die("Please read the first lines of this script for instructions on how to enabl
|
||||
set_time_limit(0);
|
||||
|
||||
define('IN_PHPBB', true);
|
||||
$phpbb_root_path = './../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
include($phpbb_root_path . 'common.'.$phpEx);
|
||||
define('PHPBB_ROOT_PATH', './../');
|
||||
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
|
||||
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
|
||||
|
||||
// Start session management
|
||||
$user->session_begin();
|
||||
|
6
phpBB/develop/adjust_uids.php
Executable file → Normal file
@@ -12,9 +12,9 @@ set_time_limit(0);
|
||||
@ini_set('memory_limit', '512M');
|
||||
|
||||
define('IN_PHPBB', true);
|
||||
$phpbb_root_path = './../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
include($phpbb_root_path . 'common.'.$phpEx);
|
||||
define('PHPBB_ROOT_PATH', './../');
|
||||
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
|
||||
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
|
||||
|
||||
// Start session management
|
||||
$user->session_begin();
|
||||
|
@@ -9,9 +9,9 @@ die("Please read the first lines of this script for instructions on how to enabl
|
||||
set_time_limit(0);
|
||||
|
||||
define('IN_PHPBB', true);
|
||||
$phpbb_root_path = './../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
include($phpbb_root_path . 'common.'.$phpEx);
|
||||
define('PHPBB_ROOT_PATH', './../');
|
||||
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
|
||||
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
|
||||
|
||||
// Start session management
|
||||
$user->session_begin();
|
||||
|
@@ -1,462 +0,0 @@
|
||||
<?php
|
||||
|
||||
//
|
||||
// Security message:
|
||||
//
|
||||
// This script is potentially dangerous.
|
||||
// Remove or comment the next line (die(".... ) to enable this script.
|
||||
// Do NOT FORGET to either remove this script or disable it after you have used it.
|
||||
//
|
||||
die("Please read the first lines of this script for instructions on how to enable it");
|
||||
|
||||
//
|
||||
// Do not change anything below this line.
|
||||
//
|
||||
|
||||
|
||||
$phpbb_root_path = "../";
|
||||
include($phpbb_root_path . 'extension.inc');
|
||||
include($phpbb_root_path . 'common.'.$phpEx);
|
||||
include($phpbb_root_path . 'includes/post.'.$phpEx);
|
||||
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
|
||||
|
||||
srand ((double) microtime() * 1000000);
|
||||
set_time_limit(240*60);
|
||||
|
||||
// Here's the text we stick in posts..
|
||||
$bigass_text = '
|
||||
phpBB BBCode test suite v0.0.2
|
||||
auto-linkification:
|
||||
http://something.com
|
||||
www.something.com
|
||||
nate@phpbb.com
|
||||
http://something.com/foo.php?this=that&theother=some%20encoded%20string is a link.
|
||||
[code]
|
||||
Simple code block with some <html> <tags>.
|
||||
[/code]
|
||||
[b]bolded[/b], [i]italic[/i]
|
||||
[email]james@totalgeek.org[/email]
|
||||
[url=http://www.totalgeek.org]totalgeek.org[/url]
|
||||
[url]www.totalgeek.org[/url]
|
||||
[list]
|
||||
[*] This is the first bulleted item.
|
||||
[*] This is the second bulleted item.
|
||||
[/list]
|
||||
[list=A]
|
||||
[*] This is the first bulleted item.
|
||||
[*] This is the second bulleted item.
|
||||
[/list]
|
||||
[quote]
|
||||
And a quote!
|
||||
[/quote]
|
||||
';
|
||||
|
||||
|
||||
// The script expects the ID's in the tables to sequential (1,2,3,4,5),
|
||||
// so no holes please (1,4,5,8)...
|
||||
$nr_of_users = nrof(USERS_TABLE);
|
||||
$nr_of_cats = nrof(CATEGORIES_TABLE);
|
||||
$nr_of_forums = nrof(FORUMS_TABLE);
|
||||
$nr_of_posts = nrof(POSTS_TABLE);
|
||||
|
||||
$u = $users;
|
||||
|
||||
$starttime = microtime();
|
||||
|
||||
$usercreationcount = 0;
|
||||
while($users > 0)
|
||||
{
|
||||
|
||||
$name = "testuser_" . substr(md5(uniqid(rand())), 0, 10);
|
||||
if (make_user($name))
|
||||
{
|
||||
$usercreationcount++;
|
||||
$users--;
|
||||
}
|
||||
if (($usercreationcount % 500) == 0)
|
||||
{
|
||||
echo "status: $usercreationcount <br>\n";
|
||||
flush();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ($posts > 0)
|
||||
{
|
||||
filldb($posts);
|
||||
}
|
||||
|
||||
$endtime = microtime();
|
||||
|
||||
if ($submit="" || !isset($submit))
|
||||
{
|
||||
?>
|
||||
Hello, welcome to this little phpBB Benchmarking script :)<p>
|
||||
|
||||
At the moment there are:<br>
|
||||
|
||||
<table>
|
||||
<tr><td align="right"><?php echo $nr_of_users?></td><td>Users</td></tr>
|
||||
<tr><td align="right"><?php echo $nr_of_forums?></td><td>Forums</td></tr>
|
||||
<tr><td align="right"><?php echo $nr_of_posts?></td><td>Posts</td></tr>
|
||||
</table>
|
||||
<p>
|
||||
What do you want to create?<p>
|
||||
|
||||
<form method="get" action="<?php echo $PHP_SELF?>">
|
||||
<input type="text" name="users" size="3"> Users<br>
|
||||
<input type="text" name="posts" size="3"> Posts/topics (optional: post size in <input type="text" name="size" size="3"> bytes)<br>
|
||||
<input type="submit" name="submit">
|
||||
</form>
|
||||
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
list ($starttime_msec,$starttime_sec) = explode(" ",$starttime);
|
||||
list ($endtime_msec,$endtime_sec) = explode(" ",$endtime);
|
||||
$timetaken_sec = ($endtime_sec+$endtime_msec) - ($starttime_sec+$starttime_msec);
|
||||
print "<B>TIME TAKEN : ".$timetaken_sec."s</B><BR>\n";
|
||||
|
||||
print "<p>\n<a href=\"$PHP_SELF\">Back to the overview page</a>\n";
|
||||
}
|
||||
|
||||
|
||||
function filldb($newposts)
|
||||
{
|
||||
global $nr_of_forums;
|
||||
global $nr_of_users;
|
||||
|
||||
$forum_topic_counts = array();
|
||||
|
||||
for ($i = 1; $i <= $nr_of_forums; $i++)
|
||||
{
|
||||
$forum_topic_counts[$i] = get_topic_count($i);
|
||||
}
|
||||
|
||||
for($i = 0; $i < $newposts; $i++)
|
||||
{
|
||||
$userid = rand(2, $nr_of_users - 1);
|
||||
$forum = rand(1,$nr_of_forums);
|
||||
|
||||
if ((rand(0,30) < 1) || ($forum_topic_count[$forum] == 0))
|
||||
{
|
||||
// create a new topic 1 in 30 times (or when there are none);
|
||||
$topic = make_topic($userid, "Testing topic $i", $forum);
|
||||
$forum_topic_count[$forum]++;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Otherwise create a reply(posting) somewhere.
|
||||
$topic = get_smallest_topic($forum);
|
||||
create_posting($userid, $topic, $forum, "reply");
|
||||
}
|
||||
|
||||
if (($i % 1000) == 0)
|
||||
{
|
||||
echo "status: $i <br>";
|
||||
flush();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function get_smallest_topic($forum_id)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$sql = "SELECT topic_id
|
||||
FROM " . TOPICS_TABLE . "
|
||||
WHERE (forum_id = $forum_id)
|
||||
ORDER BY topic_replies ASC LIMIT 1";
|
||||
if($result = $db->sql_query($sql))
|
||||
{
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$topic_id = $row['topic_id'];
|
||||
|
||||
unset($result);
|
||||
unset($row);
|
||||
return $topic_id;
|
||||
}
|
||||
else
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't get smallest topic.", "", __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function get_topic_count($forum_id)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$sql = "SELECT forum_topics
|
||||
FROM " . FORUMS_TABLE . "
|
||||
WHERE (forum_id = $forum_id)";
|
||||
if($result = $db->sql_query($sql))
|
||||
{
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$topic_count = $row['forum_topics'];
|
||||
|
||||
unset($result);
|
||||
unset($row);
|
||||
return $topic_count;
|
||||
}
|
||||
else
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't get topic count.", "", __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function make_topic($user_id, $subject, $forum_id)
|
||||
{
|
||||
global $db;
|
||||
$topic_type = POST_NORMAL;
|
||||
$topic_vote = 0;
|
||||
$current_time = time();
|
||||
|
||||
$sql = "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote)
|
||||
VALUES ('$subject', $user_id, $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote)";
|
||||
|
||||
if( $result = $db->sql_query($sql, BEGIN_TRANSACTION) )
|
||||
{
|
||||
$new_topic_id = $db->sql_nextid();
|
||||
}
|
||||
else
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Error inserting data into topics table", "", __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
create_posting($user_id, $new_topic_id, $forum_id);
|
||||
|
||||
return $new_topic_id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function create_posting($userid, $topic_id, $forum, $mode='newtopic')
|
||||
{
|
||||
$message = generatepost();
|
||||
|
||||
return make_post($topic_id, $forum, $userid, "", $message, $mode);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function make_post($new_topic_id, $forum_id, $user_id, $post_username, $text, $mode='newtopic')
|
||||
{
|
||||
global $db;
|
||||
$current_time = time();
|
||||
$user_ip = "ac100202";
|
||||
$bbcode_on = 1;
|
||||
$html_on = 1;
|
||||
$smilies_on = 1;
|
||||
$attach_sig = 1;
|
||||
$bbcode_uid = make_bbcode_uid();
|
||||
|
||||
$post_subject = 'random subject';
|
||||
|
||||
$post_message = prepare_message($text, $html_on, $bbcode_on, $smilies_on, $bbcode_uid);
|
||||
|
||||
$sql = "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, attach_id, icon_id, post_username, post_time, poster_ip, post_approved, bbcode_uid, enable_bbcode, enable_html, enable_smilies, enable_sig, post_subject, post_text)
|
||||
VALUES ($new_topic_id, $forum_id, $user_id, 0, 0, '$post_username', $current_time, '$user_ip', 1, '$bbcode_uid', $bbcode_on, $html_on, $smilies_on, $attach_sig, '$post_subject', '$post_message')";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
if ($result)
|
||||
{
|
||||
$new_post_id = $db->sql_nextid();
|
||||
|
||||
$sql = "UPDATE " . TOPICS_TABLE . "
|
||||
SET topic_last_post_id = $new_post_id";
|
||||
if($mode == "reply")
|
||||
{
|
||||
$sql .= ", topic_replies = topic_replies + 1 ";
|
||||
}
|
||||
$sql .= " WHERE topic_id = $new_topic_id";
|
||||
|
||||
if($db->sql_query($sql))
|
||||
{
|
||||
$sql = "UPDATE " . FORUMS_TABLE . "
|
||||
SET forum_last_post_id = $new_post_id, forum_posts = forum_posts + 1";
|
||||
if($mode == "newtopic")
|
||||
{
|
||||
$sql .= ", forum_topics = forum_topics + 1";
|
||||
}
|
||||
$sql .= " WHERE forum_id = $forum_id";
|
||||
|
||||
if($db->sql_query($sql))
|
||||
{
|
||||
$sql = "UPDATE " . USERS_TABLE . "
|
||||
SET user_posts = user_posts + 1
|
||||
WHERE user_id = " . $user_id;
|
||||
|
||||
if($db->sql_query($sql, END_TRANSACTION))
|
||||
{
|
||||
// SUCCESS.
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Error updating users table", "", __LINE__, __FILE__, $sql);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Error updating forums table", "", __LINE__, __FILE__, $sql);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Rollback
|
||||
if($db->sql_layer == "mysql")
|
||||
{
|
||||
$sql = "DELETE FROM " . POSTS_TABLE . "
|
||||
WHERE post_id = $new_post_id";
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
message_die(GENERAL_ERROR, "Error updating topics table", "", __LINE__, __FILE__, $sql);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Error inserting data into posts table", "", __LINE__, __FILE__, $sql);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function generatepost($size=850)
|
||||
{
|
||||
global $bigass_text;
|
||||
// Returns a string with a length between $size and $size*0.2
|
||||
$size = rand(0.2*$size, $size);
|
||||
|
||||
$textsize = strlen($bigass_text);
|
||||
$currentsize = 0;
|
||||
// Add whole $text multiple times
|
||||
while($currentsize < $size && $size-$currentsize <= $textsize)
|
||||
{
|
||||
$message .= $bigass_text;
|
||||
$currentsize += $textsize;
|
||||
}
|
||||
// Add the remainder number of chars and return it.
|
||||
$message .= substr($bigass_text, 0, $size-$currentsize);
|
||||
|
||||
return (addslashes($message));
|
||||
}
|
||||
|
||||
|
||||
function nrof($table)
|
||||
{
|
||||
global $db;
|
||||
$sql = "SELECT count(*) AS counted FROM $table";
|
||||
$result = $db->sql_query($sql);
|
||||
$topics = $db->sql_fetchrow($result);
|
||||
return $topics[counted];
|
||||
}
|
||||
|
||||
|
||||
function make_user($username)
|
||||
{
|
||||
global $db, $board_config;
|
||||
|
||||
$password = md5("benchpass");
|
||||
$email = "nobody@localhost";
|
||||
$icq = "12345678";
|
||||
$website = "http://www.phpbb.com";
|
||||
$occupation = "phpBB tester";
|
||||
$location = "phpBB world hq";
|
||||
$interests = "Eating, sleeping, living, and breathing phpBB";
|
||||
$signature = "$username: phpBB tester.";
|
||||
$signature_bbcode_uid = "";
|
||||
$avatar_filename = "";
|
||||
$viewemail = 0;
|
||||
$aim = 0;
|
||||
$yim = 0;
|
||||
$msn = 0;
|
||||
$attachsig = 1;
|
||||
$allowsmilies = 1;
|
||||
$allowhtml = 1;
|
||||
$allowbbcode = 1;
|
||||
$allowviewonline = 1;
|
||||
$notifyreply = 0;
|
||||
$notifypm = 0;
|
||||
$user_timezone = $board_config['board_timezone'];
|
||||
$user_dateformat = $board_config['default_dateformat'];
|
||||
$user_lang = $board_config['default_lang'];
|
||||
$user_style = $board_config['default_style'];
|
||||
|
||||
|
||||
$sql = "SELECT MAX(user_id) AS total
|
||||
FROM " . USERS_TABLE;
|
||||
if($result = $db->sql_query($sql))
|
||||
{
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$new_user_id = $row['total'] + 1;
|
||||
|
||||
unset($result);
|
||||
unset($row);
|
||||
}
|
||||
else
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't obtained next user_id information.", "", __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
$sql = "SELECT MAX(group_id) AS total
|
||||
FROM " . GROUPS_TABLE;
|
||||
if($result = $db->sql_query($sql))
|
||||
{
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$new_group_id = $row['total'] + 1;
|
||||
|
||||
unset($result);
|
||||
unset($row);
|
||||
}
|
||||
else
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't obtained next user_id information.", "", __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
|
||||
$sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmilies, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey)
|
||||
VALUES ($new_user_id, '$username', " . time() . ", '$password', '$email', '$icq', '$website', '$occupation', '$location', '$interests', '$signature', '$signature_bbcode_uid', '$avatar_filename', $viewemail, '$aim', '$yim', '$msn', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $user_timezone, '$user_dateformat', '$user_lang', $user_style, 0, 1, ";
|
||||
|
||||
|
||||
$sql .= "1, '')";
|
||||
|
||||
if($result = $db->sql_query($sql, BEGIN_TRANSACTION))
|
||||
{
|
||||
$sql = "INSERT INTO " . GROUPS_TABLE . " (group_id, group_name, group_description, group_single_user, group_moderator)
|
||||
VALUES ($new_group_id, '', 'Personal User', 1, 0)";
|
||||
if($result = $db->sql_query($sql))
|
||||
{
|
||||
$sql = "INSERT INTO " . USER_GROUP_TABLE . " (user_id, group_id, user_pending)
|
||||
VALUES ($new_user_id, $new_group_id, 0)";
|
||||
if($result = $db->sql_query($sql, END_TRANSACTION))
|
||||
{
|
||||
|
||||
// SUCCESS.
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't insert data into user_group table", "", __LINE__, __FILE__, $sql);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't insert data into groups table", "", __LINE__, __FILE__, $sql);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't insert data into users table", "", __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
@@ -21,22 +21,10 @@
|
||||
die("Please read the first lines of this script for instructions on how to enable it");
|
||||
@set_time_limit(300);
|
||||
|
||||
$db = $dbhost = $dbuser = $dbpasswd = $dbport = $dbname = '';
|
||||
|
||||
define('IN_PHPBB', 1);
|
||||
define('ANONYMOUS', 1);
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
$phpbb_root_path='./../';
|
||||
include($phpbb_root_path . 'config.'.$phpEx);
|
||||
require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.'.$phpEx);
|
||||
require($phpbb_root_path . 'includes/db/' . $dbms . '.'.$phpEx);
|
||||
include($phpbb_root_path . 'includes/functions.'.$phpEx);
|
||||
|
||||
$cache = new acm();
|
||||
$db = new sql_db();
|
||||
|
||||
// Connect to DB
|
||||
$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
|
||||
define('PHPBB_ROOT_PATH', './../');
|
||||
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
|
||||
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
|
||||
|
||||
$start = 0;
|
||||
do
|
||||
|
@@ -30,23 +30,9 @@ die("Please read the first lines of this script for instructions on how to enabl
|
||||
|
||||
@set_time_limit(2400);
|
||||
|
||||
// This script adds missing permissions
|
||||
$db = $dbhost = $dbuser = $dbpasswd = $dbport = $dbname = '';
|
||||
|
||||
define('IN_PHPBB', 1);
|
||||
define('ANONYMOUS', 1);
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
$phpbb_root_path='./../';
|
||||
include($phpbb_root_path . 'config.'.$phpEx);
|
||||
require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.'.$phpEx);
|
||||
require($phpbb_root_path . 'includes/db/' . $dbms . '.'.$phpEx);
|
||||
include($phpbb_root_path . 'includes/functions.'.$phpEx);
|
||||
|
||||
$cache = new acm();
|
||||
$db = new $sql_db();
|
||||
|
||||
// Connect to DB
|
||||
$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
|
||||
define('PHPBB_ROOT_PATH', './../');
|
||||
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
|
||||
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
|
||||
|
||||
$sql = "SELECT post_id, post_text FROM {$table_prefix}posts WHERE post_text LIKE '%{SMILE_PATH}%'";
|
||||
$result = $db->sql_query($sql);
|
||||
|
@@ -21,10 +21,10 @@ die("Please read the first lines of this script for instructions on how to enabl
|
||||
|
||||
|
||||
define('IN_PHPBB', true);
|
||||
$phpbb_root_path = './../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
include($phpbb_root_path . 'common.'.$phpEx);
|
||||
include($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
|
||||
define('PHPBB_ROOT_PATH', './../');
|
||||
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
|
||||
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
|
||||
include(PHPBB_ROOT_PATH . 'includes/functions_admin.' . PHP_EXT);
|
||||
|
||||
set_time_limit(0);
|
||||
header('Expires: 0');
|
||||
@@ -117,14 +117,14 @@ switch ($mode)
|
||||
|
||||
if ($topic_id >= $num_topics)
|
||||
{
|
||||
echo '<meta http-equiv="refresh" content="10; url=fill.' . $phpEx . '?mode=sync&' . time() . '">And now for something completely different...';
|
||||
echo '<meta http-equiv="refresh" content="10; url=fill.' . PHP_EXT . '?mode=sync&' . time() . '">And now for something completely different...';
|
||||
|
||||
$db->sql_query('ANALYZE TABLES ' . TOPICS_TABLE . ', ' . POSTS_TABLE);
|
||||
flush();
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<meta http-equiv="refresh" content="10; url=fill.' . $phpEx . '?start=' . $topic_id . '&' . time() . '">To the next page... (' . $topic_id . '/' . $num_topics . ')';
|
||||
echo '<meta http-equiv="refresh" content="10; url=fill.' . PHP_EXT . '?start=' . $topic_id . '&' . time() . '">To the next page... (' . $topic_id . '/' . $num_topics . ')';
|
||||
flush();
|
||||
}
|
||||
break;
|
||||
@@ -141,7 +141,7 @@ switch ($mode)
|
||||
$e = explode(' ', microtime());
|
||||
|
||||
echo '<pre><b>' . ($e[0] + $e[1] - $s[0] - $s[1]) . '</b></pre>';
|
||||
echo '<a href="fill.' . $phpEx . '">Here we go again</a>';
|
||||
echo '<a href="fill.' . PHP_EXT . '">Here we go again</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -157,11 +157,11 @@ switch ($mode)
|
||||
if ($end < $num_topics)
|
||||
{
|
||||
$start += $batch_size;
|
||||
echo '<meta http-equiv="refresh" content="0; url=fill.' . $phpEx . "?mode=sync&start=$start&" . time() . "\">And now for something completely different... ($start/$num_topics)";
|
||||
echo '<meta http-equiv="refresh" content="0; url=fill.' . PHP_EXT . "?mode=sync&start=$start&" . time() . "\">And now for something completely different... ($start/$num_topics)";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<a href="fill.' . $phpEx . '">Here we go again</a>';
|
||||
echo '<a href="fill.' . PHP_EXT . '">Here we go again</a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -25,8 +25,8 @@ die("Please read the first lines of this script for instructions on how to enabl
|
||||
set_time_limit(0);
|
||||
|
||||
define('IN_PHPBB', true);
|
||||
$phpbb_root_path = '../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
define('PHPBB_ROOT_PATH', './../');
|
||||
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
|
||||
|
||||
echo "Checking for required files\n";
|
||||
download('http://unicode.org/Public/UNIDATA/CaseFolding.txt');
|
||||
@@ -71,8 +71,8 @@ foreach ($array as $value)
|
||||
|
||||
foreach ($uniarray as $idx => $contents)
|
||||
{
|
||||
echo "Writing to case_fold_$idx.$phpEx\n";
|
||||
$fp = fopen($phpbb_root_path . 'includes/utf/data/case_fold_' . strtolower($idx) . '.' . $phpEx, 'wb');
|
||||
echo "Writing to case_fold_$idx." . PHP_EXT . "\n";
|
||||
$fp = fopen(PHPBB_ROOT_PATH . 'includes/utf/data/case_fold_' . strtolower($idx) . '.' . PHP_EXT, 'wb');
|
||||
fwrite($fp, '<?php return ' . my_var_export($contents) . ';');
|
||||
fclose($fp);
|
||||
}
|
||||
@@ -116,9 +116,7 @@ function my_var_export($var)
|
||||
*/
|
||||
function download($url)
|
||||
{
|
||||
global $phpbb_root_path;
|
||||
|
||||
if (file_exists($phpbb_root_path . 'develop/' . basename($url)))
|
||||
if (file_exists(PHPBB_ROOT_PATH . 'develop/' . basename($url)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -130,7 +128,7 @@ function download($url)
|
||||
die("Can't download from $url\nPlease download it yourself and put it in the develop/ dir, kthxbai");
|
||||
}
|
||||
|
||||
if (!$fpw = fopen($phpbb_root_path . 'develop/' . basename($url), 'wb'))
|
||||
if (!$fpw = fopen(PHPBB_ROOT_PATH . 'develop/' . basename($url), 'wb'))
|
||||
{
|
||||
die("Can't open develop/" . basename($url) . " for output... please check your permissions or something");
|
||||
}
|
||||
|
@@ -25,8 +25,8 @@ die("Please read the first lines of this script for instructions on how to enabl
|
||||
set_time_limit(0);
|
||||
|
||||
define('IN_PHPBB', true);
|
||||
$phpbb_root_path = '../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
define('PHPBB_ROOT_PATH', './../');
|
||||
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
|
||||
|
||||
echo "Checking for required files\n";
|
||||
download('http://unicode.org/reports/tr39/data/confusables.txt');
|
||||
@@ -155,9 +155,9 @@ foreach ($array as $value)
|
||||
$uniarray[utf8_chr(hexdec((string)$value[1]))] = $temp_hold;
|
||||
}
|
||||
|
||||
echo "Writing to confusables.$phpEx\n";
|
||||
echo "Writing to confusables." . PHP_EXT . "\n";
|
||||
|
||||
$fp = fopen($phpbb_root_path . 'includes/utf/data/confusables.' . $phpEx, 'wb');
|
||||
$fp = fopen(PHPBB_ROOT_PATH . 'includes/utf/data/confusables.' . PHP_EXT, 'wb');
|
||||
fwrite($fp, '<?php return ' . my_var_export($uniarray) . ';');
|
||||
fclose($fp);
|
||||
|
||||
@@ -200,9 +200,7 @@ function my_var_export($var)
|
||||
*/
|
||||
function download($url)
|
||||
{
|
||||
global $phpbb_root_path;
|
||||
|
||||
if (file_exists($phpbb_root_path . 'develop/' . basename($url)))
|
||||
if (file_exists(PHPBB_ROOT_PATH . 'develop/' . basename($url)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -214,7 +212,7 @@ function download($url)
|
||||
die("Can't download from $url\nPlease download it yourself and put it in the develop/ dir, kthxbai");
|
||||
}
|
||||
|
||||
if (!$fpw = fopen($phpbb_root_path . 'develop/' . basename($url), 'wb'))
|
||||
if (!$fpw = fopen(PHPBB_ROOT_PATH . 'develop/' . basename($url), 'wb'))
|
||||
{
|
||||
die("Can't open develop/" . basename($url) . " for output... please check your permissions or something");
|
||||
}
|
||||
|
@@ -25,8 +25,8 @@ die("Please read the first lines of this script for instructions on how to enabl
|
||||
set_time_limit(0);
|
||||
|
||||
define('IN_PHPBB', true);
|
||||
$phpbb_root_path = '../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
define('PHPBB_ROOT_PATH', './../');
|
||||
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
|
||||
|
||||
echo "Checking for required files\n";
|
||||
download('http://www.unicode.org/Public/UNIDATA/CompositionExclusions.txt');
|
||||
@@ -34,7 +34,7 @@ download('http://www.unicode.org/Public/UNIDATA/DerivedNormalizationProps.txt');
|
||||
download('http://www.unicode.org/Public/UNIDATA/UnicodeData.txt');
|
||||
echo "\n";
|
||||
|
||||
require_once($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
|
||||
require_once(PHPBB_ROOT_PATH . 'includes/utf/utf_normalizer.' . PHP_EXT);
|
||||
$file_contents = array();
|
||||
|
||||
/**
|
||||
@@ -172,7 +172,7 @@ fclose($fp);
|
||||
* Do mappings
|
||||
*/
|
||||
echo "Loading Unicode decomposition mappings\n";
|
||||
$fp = fopen($phpbb_root_path . 'develop/UnicodeData.txt', 'rt');
|
||||
$fp = fopen(PHPBB_ROOT_PATH . 'develop/UnicodeData.txt', 'rt');
|
||||
|
||||
$map = array();
|
||||
while (!feof($fp))
|
||||
@@ -266,9 +266,9 @@ foreach ($file_contents as $file => $contents)
|
||||
/**
|
||||
* Generate a new file
|
||||
*/
|
||||
echo "Writing to $file.$phpEx\n";
|
||||
echo "Writing to $file." . PHP_EXT . "\n";
|
||||
|
||||
if (!$fp = fopen($phpbb_root_path . 'includes/utf/data/' . $file . '.' . $phpEx, 'wb'))
|
||||
if (!$fp = fopen(PHPBB_ROOT_PATH . 'includes/utf/data/' . $file . '.' . PHP_EXT, 'wb'))
|
||||
{
|
||||
trigger_error('Cannot open ' . $file . ' for write');
|
||||
}
|
||||
@@ -288,7 +288,7 @@ echo "\n*** UTF-8 normalization tables done\n\n";
|
||||
*/
|
||||
echo "Generating search indexer tables\n";
|
||||
|
||||
$fp = fopen($phpbb_root_path . 'develop/UnicodeData.txt', 'rt');
|
||||
$fp = fopen(PHPBB_ROOT_PATH . 'develop/UnicodeData.txt', 'rt');
|
||||
|
||||
$map = array();
|
||||
while ($line = fgets($fp, 1024))
|
||||
@@ -406,8 +406,8 @@ unset($map);
|
||||
|
||||
foreach ($file_contents as $idx => $contents)
|
||||
{
|
||||
echo "Writing to search_indexer_$idx.$phpEx\n";
|
||||
$fp = fopen($phpbb_root_path . 'includes/utf/data/search_indexer_' . $idx . '.' . $phpEx, 'wb');
|
||||
echo "Writing to search_indexer_$idx." . PHP_EXT . "\n";
|
||||
$fp = fopen(PHPBB_ROOT_PATH . 'includes/utf/data/search_indexer_' . $idx . '.' . PHP_EXT, 'wb');
|
||||
fwrite($fp, '<?php return ' . my_var_export($contents) . ';');
|
||||
fclose($fp);
|
||||
}
|
||||
@@ -486,9 +486,7 @@ function my_var_export($var)
|
||||
*/
|
||||
function download($url)
|
||||
{
|
||||
global $phpbb_root_path;
|
||||
|
||||
if (file_exists($phpbb_root_path . 'develop/' . basename($url)))
|
||||
if (file_exists(PHPBB_ROOT_PATH . 'develop/' . basename($url)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -500,7 +498,7 @@ function download($url)
|
||||
die("Can't download from $url\nPlease download it yourself and put it in the develop/ dir, kthxbai");
|
||||
}
|
||||
|
||||
if (!$fpw = fopen($phpbb_root_path . 'develop/' . basename($url), 'wb'))
|
||||
if (!$fpw = fopen(PHPBB_ROOT_PATH . 'develop/' . basename($url), 'wb'))
|
||||
{
|
||||
die("Can't open develop/" . basename($url) . " for output... please check your permissions or something");
|
||||
}
|
||||
|
@@ -24,13 +24,13 @@ die("Please read the first lines of this script for instructions on how to enabl
|
||||
// Thanks to arod-1
|
||||
|
||||
define('IN_PHPBB', 1);
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
$phpbb_root_path='./../';
|
||||
include($phpbb_root_path . 'common.'.$phpEx);
|
||||
define('PHPBB_ROOT_PATH', './../');
|
||||
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
|
||||
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
|
||||
|
||||
$mode = request_var('mode', '');
|
||||
|
||||
$modules = find_modules($phpbb_root_path . 'language/en');
|
||||
$modules = find_modules(PHPBB_ROOT_PATH . 'language/en');
|
||||
|
||||
$kkeys = $keys = array();
|
||||
$langdir = dirname(__FILE__);
|
||||
@@ -81,7 +81,7 @@ while ($module = array_shift($keys))
|
||||
}
|
||||
|
||||
$color = '';
|
||||
if ((basename($module) == "common.$phpEx") || (basename($other_module) == "common.$phpEx"))
|
||||
if ((basename($module) == "common." . PHP_EXT) || (basename($other_module) == "common." . PHP_EXT))
|
||||
{
|
||||
$color = ' style="color:#B00000;"';
|
||||
}
|
||||
|
@@ -1,80 +0,0 @@
|
||||
<?php
|
||||
// -------------------------------------------------------------
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// FILENAME : merge_attachment_tables.php
|
||||
// STARTED : Tue Nov 04, 2003
|
||||
// COPYRIGHT : <20> 2001, 2003 phpBB Group
|
||||
// WWW : http://www.phpbb.com/
|
||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
||||
//
|
||||
// -------------------------------------------------------------
|
||||
|
||||
//
|
||||
// Security message:
|
||||
//
|
||||
// This script is potentially dangerous.
|
||||
// Remove or comment the next line (die(".... ) to enable this script.
|
||||
// Do NOT FORGET to either remove this script or disable it after you have used it.
|
||||
//
|
||||
die("Please read the first lines of this script for instructions on how to enable it");
|
||||
|
||||
$db = $dbhost = $dbuser = $dbpasswd = $dbport = $dbname = '';
|
||||
|
||||
define('IN_PHPBB', 1);
|
||||
define('ANONYMOUS', 1);
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
$phpbb_root_path='./../';
|
||||
include($phpbb_root_path . 'config.'.$phpEx);
|
||||
require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.'.$phpEx);
|
||||
require($phpbb_root_path . 'includes/db/' . $dbms . '.'.$phpEx);
|
||||
include($phpbb_root_path . 'includes/functions.'.$phpEx);
|
||||
|
||||
$cache = new acm();
|
||||
$db = new sql_db();
|
||||
|
||||
// Connect to DB
|
||||
$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
|
||||
|
||||
// Rename the attachments table...
|
||||
$sql = "RENAME TABLE {$table_prefix}attachments TO {$table_prefix}attach_temp";
|
||||
$db->sql_query($sql);
|
||||
|
||||
$sql = "CREATE TABLE {$table_prefix}attachments
|
||||
SELECT d.*, a.post_id, a.user_id_from as poster_id, p.topic_id
|
||||
FROM {$table_prefix}attach_desc d, {$table_prefix}attach_temp a, {$table_prefix}posts p
|
||||
WHERE a.attach_id = d.attach_id
|
||||
AND a.post_id = p.post_id";
|
||||
$db->sql_query($sql);
|
||||
|
||||
switch ($db->sql_layer)
|
||||
{
|
||||
case 'mysql':
|
||||
case 'mysql4':
|
||||
$sql = 'ALTER TABLE ' . $table_prefix . 'attachments
|
||||
ADD PRIMARY KEY (attach_id),
|
||||
ADD INDEX filetime (filetime),
|
||||
ADD INDEX post_id (post_id),
|
||||
ADD INDEX poster_id (poster_id),
|
||||
ADD INDEX physical_filename (physical_filename(10)),
|
||||
ADD INDEX filesize (filesize),
|
||||
ADD INDEX topic_id (topic_id),
|
||||
MODIFY COLUMN attach_id mediumint(8) UNSIGNED NOT NULL auto_increment';
|
||||
break;
|
||||
|
||||
case 'mssql':
|
||||
case 'mssql-odbc':
|
||||
case 'msaccess':
|
||||
break;
|
||||
|
||||
case 'postgresql':
|
||||
break;
|
||||
}
|
||||
$db->sql_query($sql);
|
||||
|
||||
//$db->sql_query("DROP TABLE {$table_prefix}attach_temp");
|
||||
|
||||
echo "<p><b>Done</b></p>\n";
|
||||
|
||||
?>
|
@@ -1,209 +0,0 @@
|
||||
<?php
|
||||
/***************************************************************************
|
||||
* merge_clean_posts.php
|
||||
* -------------------
|
||||
* begin : Tuesday, February 25, 2003
|
||||
* copyright : (C) 2003 The phpBB Group
|
||||
* email : support@phpbb.com
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
//
|
||||
// Security message:
|
||||
//
|
||||
// This script is potentially dangerous.
|
||||
// Remove or comment the next line (die(".... ) to enable this script.
|
||||
// Do NOT FORGET to either remove this script or disable it after you have used it.
|
||||
//
|
||||
die("Please read the first lines of this script for instructions on how to enable it");
|
||||
|
||||
@set_time_limit(2400);
|
||||
|
||||
$db = $dbhost = $dbuser = $dbpasswd = $dbport = $dbname = '';
|
||||
|
||||
define('IN_PHPBB', 1);
|
||||
define('ANONYMOUS', 1);
|
||||
$phpbb_root_path='./../';
|
||||
include($phpbb_root_path . 'extension.inc');
|
||||
include($phpbb_root_path . 'config.'.$phpEx);
|
||||
include($phpbb_root_path . 'includes/functions.'.$phpEx);
|
||||
require($phpbb_root_path . 'includes/acm/cache_' . $acm_type . '.'.$phpEx);
|
||||
include($phpbb_root_path . 'db/' . $dbms . '.'.$phpEx);
|
||||
|
||||
$cache = new acm();
|
||||
$db = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
|
||||
|
||||
// Just Do it (tm)
|
||||
$sql = "RENAME TABLE {$table_prefix}posts TO {$table_prefix}posts_temp";
|
||||
$db->sql_query($sql);
|
||||
|
||||
$sql = "CREATE TABLE {$table_prefix}posts
|
||||
SELECT p.*, pt.post_subject, pt.post_text, pt.post_checksum, pt.bbcode_bitfield, pt.bbcode_uid
|
||||
FROM {$table_prefix}posts_temp p, {$table_prefix}posts_text pt
|
||||
WHERE pt.post_id = p.post_id";
|
||||
$db->sql_query($sql);
|
||||
|
||||
switch ($db->sql_layer)
|
||||
{
|
||||
case 'mysql':
|
||||
case 'mysql4':
|
||||
$sql = 'ALTER TABLE ' . $table_prefix . 'posts
|
||||
ADD PRIMARY KEY (post_id),
|
||||
ADD INDEX topic_id (topic_id),
|
||||
ADD INDEX poster_ip (poster_ip),
|
||||
ADD INDEX post_approved (post_approved),
|
||||
MODIFY COLUMN post_id mediumint(8) UNSIGNED NOT NULL auto_increment,
|
||||
ADD COLUMN post_encoding varchar(11) DEFAULT \'iso-8859-15\' NOT NULL';
|
||||
break;
|
||||
|
||||
case 'mssql':
|
||||
case 'mssql-odbc':
|
||||
case 'msaccess':
|
||||
break;
|
||||
|
||||
case 'postgresql':
|
||||
break;
|
||||
}
|
||||
$db->sql_query($sql);
|
||||
|
||||
$sql = "UPDATE {$table_prefix}topics SET topic_poster = 1 WHERE topic_poster = 0 OR topic_poster IS NULL";
|
||||
$db->sql_query($sql);
|
||||
$sql = "UPDATE {$table_prefix}topics SET topic_last_poster_id = 1 WHERE topic_last_poster_id = 0 OR topic_last_poster_id IS NULL";
|
||||
$db->sql_query($sql);
|
||||
$sql = "UPDATE {$table_prefix}posts SET poster_id = 1 WHERE poster_id = 0 OR poster_id IS NULL";
|
||||
$db->sql_query($sql);
|
||||
$sql = "UPDATE {$table_prefix}users SET user_id = 1 WHERE user_id = 0";
|
||||
$db->sql_query($sql);
|
||||
|
||||
$sql = "SELECT t.topic_id
|
||||
FROM {$table_prefix}topics t
|
||||
LEFT JOIN {$table_prefix}posts p ON p.topic_id = t.topic_id
|
||||
WHERE p.topic_id IS NULL";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
if ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$del_sql = '';
|
||||
do
|
||||
{
|
||||
$del_sql .= (($del_sql != '') ? ', ' : '') . $row['topic_id'];
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
|
||||
$sql = "DELETE FROM {$table_prefix}topics
|
||||
WHERE topic_id IN ($del_sql)";
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$del_sql = '';
|
||||
$sql = "SELECT topic_id, MIN(post_id) AS first_post_id, MAX(post_id) AS last_post_id, COUNT(post_id) AS total_posts
|
||||
FROM {$table_prefix}posts
|
||||
GROUP BY topic_id";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$del_sql .= (($del_sql != '') ? ', ' : '') . $row['topic_id'];
|
||||
|
||||
$sql = "UPDATE {$table_prefix}topics
|
||||
SET topic_first_post_id = " . $row['first_post_id'] . ", topic_last_post_id = " . $row['last_post_id'] . ", topic_replies = " . ($row['total_posts'] - 1) . "
|
||||
WHERE topic_id = " . $row['topic_id'];
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = "DELETE FROM {$table_prefix}topics WHERE topic_id NOT IN ($del_sql)";
|
||||
$db->sql_query($sql);
|
||||
|
||||
$topic_count = $post_count = array();
|
||||
$sql = "SELECT forum_id, COUNT(topic_id) AS topics
|
||||
FROM {$table_prefix}topics
|
||||
GROUP BY forum_id";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$topic_count[$row['forum_id']] = $row['topics'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = "SELECT forum_id, COUNT(post_id) AS posts
|
||||
FROM {$table_prefix}posts
|
||||
GROUP BY forum_id";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$post_count[$row['forum_id']] = $row['posts'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
switch ($db->sql_layer)
|
||||
{
|
||||
case 'oracle':
|
||||
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
|
||||
FROM " . $table_prefix . "forums f, " . $table_prefix . "posts p, " . $table_prefix . "users u
|
||||
WHERE p.post_id = f.forum_last_post_id(+)
|
||||
AND u.user_id = p.poster_id(+)";
|
||||
break;
|
||||
|
||||
default:
|
||||
$sql = "SELECT f.forum_id, p.post_time, p.post_username, u.username, u.user_id
|
||||
FROM ((" . $table_prefix . "forums f
|
||||
LEFT JOIN " . $table_prefix . "posts p ON p.post_id = f.forum_last_post_id)
|
||||
LEFT JOIN " . $table_prefix . "users u ON u.user_id = p.poster_id)";
|
||||
break;
|
||||
}
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$sql_ary = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$forum_id = $row['forum_id'];
|
||||
|
||||
$sql_ary[] = "UPDATE " . $table_prefix . "forums
|
||||
SET forum_last_poster_id = " . ((!empty($row['user_id']) && $row['user_id'] != ANONYMOUS) ? $row['user_id'] : ANONYMOUS) . ", forum_last_poster_name = '" . ((!empty($row['user_id']) && $row['user_id'] != ANONYMOUS) ? addslashes($row['username']) : addslashes($row['post_username'])) . "', forum_last_post_time = " . $row['post_time'] . ", forum_posts = " . (($post_count[$forum_id]) ? $post_count[$forum_id] : 0) . ", forum_topics = " . (($topic_count[$forum_id]) ? $topic_count[$forum_id] : 0) . "
|
||||
WHERE forum_id = $forum_id";
|
||||
|
||||
$sql = "SELECT t.topic_id, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time
|
||||
FROM " . $table_prefix . "topics t, " . $table_prefix . "users u, " . $table_prefix . "posts p, " . $table_prefix . "posts p2, " . $table_prefix . "users u2
|
||||
WHERE t.forum_id = $forum_id
|
||||
AND u.user_id = t.topic_poster
|
||||
AND p.post_id = t.topic_first_post_id
|
||||
AND p2.post_id = t.topic_last_post_id
|
||||
AND u2.user_id = p2.poster_id";
|
||||
$result2 = $db->sql_query($sql);
|
||||
|
||||
while ($row2 = $db->sql_fetchrow($result2))
|
||||
{
|
||||
$sql_ary[] = "UPDATE " . $table_prefix . "topics
|
||||
SET topic_poster = " . $row2['user_id'] . ", topic_first_poster_name = '" . ((!empty($row2['user_id']) && $row2['user_id'] != ANONYMOUS) ? addslashes($row2['username']) : addslashes($row2['post_username'])) . "', topic_last_poster_id = " . ((!empty($row2['id2']) && $row2['id2'] != ANONYMOUS) ? $row2['id2'] : ANONYMOUS) . ", topic_last_post_time = " . $row2['post_time'] . ", topic_last_poster_name = '" . ((!empty($row2['id2']) && $row2['id2'] != ANONYMOUS) ? addslashes($row2['user2']) : addslashes($row2['post_username2'])) . "'
|
||||
WHERE topic_id = " . $row2['topic_id'];
|
||||
}
|
||||
$db->sql_freeresult($result2);
|
||||
|
||||
unset($row2);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
foreach ($sql_ary as $sql)
|
||||
{
|
||||
$sql . "<br />";
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
echo "<p><b>Done</b></p>\n";
|
||||
|
||||
?>
|
866
phpBB/develop/posting-api.php
Normal file
@@ -0,0 +1,866 @@
|
||||
<?php
|
||||
define('IN_PHPBB', true);
|
||||
define('PHPBB_ROOT_PATH', './../');
|
||||
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
|
||||
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
|
||||
|
||||
//$db = new dbal_mysqli();
|
||||
|
||||
class posting_api
|
||||
{
|
||||
/*
|
||||
topic table:
|
||||
topic_id
|
||||
forum_id
|
||||
topic_title
|
||||
topic_status
|
||||
topic_type
|
||||
topic_shadow_id // to implement
|
||||
|
||||
sec:
|
||||
topic_posts
|
||||
topic_shadow_posts
|
||||
topic_deleted_posts
|
||||
topic_unapproved_posts
|
||||
|
||||
all must be approved:
|
||||
topic_poster
|
||||
topic_first_poster_name
|
||||
topic_first_poster_id
|
||||
topic_last_post_id
|
||||
topic_last_poster_name
|
||||
topic_last_poster_id
|
||||
topic_last_post_title
|
||||
topic_last_post_time
|
||||
*/
|
||||
|
||||
/*
|
||||
post table:
|
||||
post_id
|
||||
topic_id
|
||||
post_subject
|
||||
post_body
|
||||
post_status
|
||||
post_type
|
||||
post_username
|
||||
poster_id
|
||||
forum_id
|
||||
post_time
|
||||
|
||||
/*
|
||||
forum table:
|
||||
forum_id
|
||||
forum_posts
|
||||
forum_shadow_posts
|
||||
forum_deleted_posts
|
||||
forum_unapproved_posts
|
||||
|
||||
sec:
|
||||
forum_topics
|
||||
forum_shadow_topics
|
||||
forum_deleted_topics
|
||||
forum_unapproved_topics
|
||||
|
||||
forum_last_poster_name
|
||||
forum_last_user_id
|
||||
forum_last_post_title
|
||||
forum_last_post_time
|
||||
*/
|
||||
|
||||
const NORMAL = 0;
|
||||
|
||||
// status
|
||||
const UNAPPROVED = 1;
|
||||
const DELETED = 2;
|
||||
|
||||
// type
|
||||
const ANNOUNCEMENT = 1;
|
||||
const STICKY = 2;
|
||||
|
||||
// we, for now, only support the insertion of posts that are not already
|
||||
// shadow'd and not deleted (it must first exist for it to be shadow'd or deleted!)
|
||||
static function insert_topic($data)
|
||||
{
|
||||
global $db;
|
||||
|
||||
// one transaction, we can now garuntee that atomicity of insertions
|
||||
$db->sql_transaction('begin');
|
||||
|
||||
$user_id = (int) $data['user_id'];
|
||||
$forum_id = (int) $data['forum_id'];
|
||||
$topic_title = $data['title'];
|
||||
$post_contents = $data['post_contents'];
|
||||
$topic_status = (int) $data['status'];
|
||||
$topic_type = (int) $data['type'];
|
||||
$approved = (bool) $data['approved'];
|
||||
|
||||
$shadow_forums = $data['shadow_forums'];
|
||||
|
||||
$time = ($data['time']) ? (int) $data['time'] : time();
|
||||
|
||||
if (isset($data['username']))
|
||||
{
|
||||
$username = $data['username'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'SELECT username
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE user_id = ' . $user_id;
|
||||
$result = $db->sql_query($sql);
|
||||
$username = (string) $db->sql_fetchfield('username');
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
$sql = 'SELECT forum_topics, forum_unapproved_topics, forum_posts, forum_unapproved_posts
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
WHERE forum_id = ' . (int) $forum_id;
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// throw our topic to the dogs
|
||||
$topic_data = array(
|
||||
'topic_title' => $topic_title,
|
||||
'topic_status' => $topic_status,
|
||||
'topic_type' => $topic_type,
|
||||
'topic_posts' => 1,
|
||||
'topic_shadow_posts' => 0,
|
||||
'topic_deleted_posts' => 0,
|
||||
'topic_unapproved_posts' => ($approved) ? 0 : 1,
|
||||
'topic_first_poster_name' => $username,
|
||||
'topic_poster' => $user_id,
|
||||
'topic_last_username' => $username,
|
||||
'topic_last_post_title' => $topic_title,
|
||||
'topic_last_post_time' => $time,
|
||||
'topic_last_poster_id' => $user_id,
|
||||
'forum_id' => $forum_id
|
||||
);
|
||||
|
||||
$db->sql_handle_data('INSERT', TOPICS_TABLE, $topic_data);
|
||||
$topic_id = $db->sql_nextid();
|
||||
|
||||
// I suppose it is time to make us a post, no?
|
||||
$post_data = array(
|
||||
'topic_id' => $topic_id,
|
||||
'post_subject' => $topic_title,
|
||||
'post_body' => $post_contents,
|
||||
'post_username' => $username,
|
||||
'poster_id' => $user_id,
|
||||
'post_status' => $topic_status, // first post inherits its type from the topic
|
||||
'post_type' => self::NORMAL, // for now, there are no shadow, global or sticky posts
|
||||
'forum_id' => $forum_id
|
||||
);
|
||||
|
||||
$db->sql_handle_data('INSERT', POSTS_TABLE, $post_data);
|
||||
$post_id = $db->sql_nextid();
|
||||
|
||||
// time to fill in the blanks
|
||||
$db->sql_handle_data('UPDATE', TOPICS_TABLE, array('topic_first_post_id' => $post_id, 'topic_last_post_id' => $post_id), "topic_id = $topic_id");
|
||||
|
||||
// let's go update the forum table
|
||||
$forum_data = array(
|
||||
'forum_posts' => ++$row['forum_posts'],
|
||||
'forum_topics' => ++$row['forum_topics'],
|
||||
);
|
||||
|
||||
// the last post inserted is always the latest,
|
||||
// we must update the forum records to make sure everybody knows the good news
|
||||
if ($approved)
|
||||
{
|
||||
$forum_data['forum_last_poster_name'] = $username;
|
||||
$forum_data['forum_last_user_id'] = $user_id;
|
||||
$forum_data['forum_last_post_title'] = $topic_title;
|
||||
$forum_data['forum_last_post_time'] = $time;
|
||||
}
|
||||
else
|
||||
{
|
||||
$forum_data['forum_unapproved_posts'] = ++$row['forum_unapproved_posts'];
|
||||
$forum_data['forum_unapproved_topics'] = ++$row['forum_unapproved_topics'];
|
||||
}
|
||||
|
||||
$db->sql_handle_data('UPDATE', FORUMS_TABLE, $forum_data, "forum_id = $forum_id");
|
||||
|
||||
foreach ($shadow_forums as $shadow_forum_id)
|
||||
{
|
||||
$data['shadow_topic_id'] = $topic_id;
|
||||
$data['forum_id'] = $shadow_forum_id;
|
||||
self::insert_shadow_topic($data);
|
||||
}
|
||||
|
||||
// we are consistant, victory is ours
|
||||
$db->sql_transaction('commit');
|
||||
}
|
||||
|
||||
// inserts a shadow topic into the database
|
||||
static function insert_shadow_topic($data)
|
||||
{
|
||||
global $db;
|
||||
|
||||
// one transaction, we can now garuntee that atomicity of insertions
|
||||
$db->sql_transaction('begin');
|
||||
|
||||
$user_id = (int) $data['user_id'];
|
||||
$forum_id = (int) $data['forum_id'];
|
||||
$topic_title = $data['title'];
|
||||
$topic_status = (int) $data['status'];
|
||||
$topic_type = (int) $data['type'];
|
||||
$time = ($data['time']) ? (int) $data['time'] : time();
|
||||
$shadow_topic_id = (int) $data['shadow_topic_id'];
|
||||
$approved = (bool) $data['approved'];
|
||||
|
||||
if (isset($data['username']))
|
||||
{
|
||||
$username = $data['username'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'SELECT username
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE user_id = ' . $user_id;
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$username = $row['username'];
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
$sql = 'SELECT forum_topics, forum_shadow_topics
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
WHERE forum_id = ' . (int) $forum_id;
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// throw our topic to the dogs
|
||||
$topic_data = array(
|
||||
'topic_title' => $topic_title,
|
||||
'topic_status' => $topic_status,
|
||||
'topic_type' => $topic_type,
|
||||
'topic_posts' => 0,
|
||||
'topic_shadow_posts' => 0,
|
||||
'topic_deleted_posts' => 0,
|
||||
'topic_unapproved_posts' => ($approved ? 0 : 1),
|
||||
'topic_first_poster_name' => $username,
|
||||
'topic_poster' => $user_id,
|
||||
'topic_last_username' => $username,
|
||||
'topic_last_post_title' => $topic_title,
|
||||
'topic_last_post_time' => $time,
|
||||
'topic_last_poster_id' => $user_id,
|
||||
'forum_id' => $forum_id,
|
||||
'topic_shadow_id' => $shadow_topic_id
|
||||
);
|
||||
|
||||
$db->sql_handle_data('INSERT', TOPICS_TABLE, $topic_data);
|
||||
|
||||
// let's go update the forum table
|
||||
$forum_data = array(
|
||||
'forum_topics' => ++$row['forum_topics'],
|
||||
'forum_shadow_topics' => ++$row['forum_shadow_topics']
|
||||
);
|
||||
|
||||
// an unapproved shadow topic? I suppose...
|
||||
if (!$approved)
|
||||
{
|
||||
$forum_data['forum_unapproved_topics'] = ++$row['forum_unapproved_topics'];
|
||||
}
|
||||
|
||||
$db->sql_handle_data('UPDATE', FORUMS_TABLE, $forum_data, "forum_id = $forum_id");
|
||||
|
||||
// we are consistant, victory is ours
|
||||
$db->transaction('END');
|
||||
}
|
||||
|
||||
static function insert_post($data)
|
||||
{
|
||||
global $db;
|
||||
// one transaction, we can now garuntee that atomicity of insertions
|
||||
$db->transaction('BEGIN');
|
||||
|
||||
$user_id = (int) $data['user_id'];
|
||||
$topic_id = (int) $data['topic_id'];
|
||||
|
||||
// begin massive amounts of hand holding
|
||||
|
||||
if (isset($data['forum_id']))
|
||||
{
|
||||
$forum_id = (int) $data['forum_id'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'SELECT forum_id
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
WHERE topic_id = ' . $topic_id;
|
||||
$result = $db->sql_query($sql);
|
||||
$forum_id = (int) $db->sql_fetchfield('forum_id');
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
$post_title = $data['title'];
|
||||
$post_contents = $data['post_contents'];
|
||||
$time = ($data['time']) ? (int) $data['time'] : time();
|
||||
|
||||
if (isset($data['username']))
|
||||
{
|
||||
$username = $data['username'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'SELECT username
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE user_id = ' . $user_id;
|
||||
$result = $db->sql_query($sql);
|
||||
$username = (string) $db->sql_fetchfield('username');
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
// hand holding complete, lets write some posts
|
||||
|
||||
$sql = 'SELECT forum_topics, forum_unapproved_topics, forum_posts, forum_unapproved_posts
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
WHERE forum_id = ' . (int) $forum_id;
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$post_status = (int) $data['post_status'];
|
||||
$approved = ($post_status === self::NORMAL);
|
||||
|
||||
// I suppose it is time to make us a post, no?
|
||||
$post_data = array(
|
||||
'topic_id' => $topic_id,
|
||||
'post_subject' => $post_title,
|
||||
'post_body' => $post_contents,
|
||||
'post_username' => $username,
|
||||
'poster_id' => $user_id,
|
||||
'post_status' => $post_status,
|
||||
'forum_id' => $forum_id,
|
||||
);
|
||||
$db->sql_handle_data('INSERT', POSTS_TABLE, $post_data);
|
||||
|
||||
// what is the new post_id?
|
||||
$post_id = $db->sql_nextid();
|
||||
|
||||
// iceberg ahead! we must only update the topic information if the post is approved ;)
|
||||
if ($approved)
|
||||
{
|
||||
// time to fill in the blanks
|
||||
$topics_data = array(
|
||||
'topic_last_poster_id' => $user_id,
|
||||
'topic_last_post_id' => $post_id,
|
||||
'topic_last_poster_name'=> $username,
|
||||
'topic_last_post_title' => $post_title,
|
||||
'topic_last_post_time' => $time,
|
||||
);
|
||||
$db->sql_handle_data('UPDATE', TOPICS_TABLE, $topics_data, "topic_id = $topic_id");
|
||||
}
|
||||
|
||||
// let's go update the forum table
|
||||
$forum_data = array(
|
||||
'forum_posts' => ++$row['forum_posts'],
|
||||
);
|
||||
|
||||
// the last post inserted is always the latest,
|
||||
// we must update the forum records to make sure everybody knows the good news
|
||||
if ($approved)
|
||||
{
|
||||
$forum_data['forum_last_poster_name'] = $username;
|
||||
$forum_data['forum_last_user_id'] = $user_id;
|
||||
$forum_data['forum_last_post_title'] = $post_title;
|
||||
$forum_data['forum_last_post_time'] = $time;
|
||||
}
|
||||
else
|
||||
{
|
||||
$forum_data['forum_unapproved_posts'] = ++$row['forum_unapproved_posts'];
|
||||
}
|
||||
|
||||
$db->sql_handle_data('UPDATE', FORUMS_TABLE, $forum_data, "forum_id = $forum_id");
|
||||
|
||||
// we are consistant, victory is ours
|
||||
$db->sql_transaction('commit');
|
||||
}
|
||||
|
||||
static function delete_topic($data)
|
||||
{
|
||||
// just call the more powerful variant with just one topic :)
|
||||
self::delete_topics(array('topic_ids' => array($data['topic_id'])));
|
||||
}
|
||||
|
||||
static function delete_topics($data)
|
||||
{
|
||||
global $db;
|
||||
|
||||
// lets get this party started
|
||||
$db->sql_transaction('begin');
|
||||
|
||||
$topic_ids = array_map('intval', $data['topic_ids']);
|
||||
|
||||
// what kind of topic is this? lets find out how much we must tamper with the forum table...
|
||||
// TODO: investigate how aggregate functions can speed this up/reduce the number of results returned/misc. other benefits
|
||||
$sql = 'SELECT topic_posts, topic_shadow_posts, topic_deleted_posts, topic_unapproved_posts, topic_shadow_id, forum_id, topic_status
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('topic_id', $topic_ids);
|
||||
$result = $db->sql_query($sql);
|
||||
// the following in an array, key'd by forum id that refers to topic rows
|
||||
$forum_lookup = array();
|
||||
while ($topic_row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$forum_id = (int) $topic_row['forum_id'];
|
||||
|
||||
// deal with posts
|
||||
$forum_lookup[$forum_id]['forum_posts'] += $topic_row['topic_posts'];
|
||||
$forum_lookup[$forum_id]['forum_shadow_posts'] += $topic_row['topic_shadow_posts'];
|
||||
$forum_lookup[$forum_id]['forum_deleted_posts'] += $topic_row['topic_deleted_posts'];
|
||||
$forum_lookup[$forum_id]['forum_unapproved_posts'] += $topic_row['topic_unapproved_posts'];
|
||||
|
||||
// deal with topics
|
||||
$topic_status = (int) $topic_row['topic_status'];
|
||||
$forum_lookup[$forum_id]['forum_topics']++; // a topic is a topic
|
||||
$forum_lookup[$forum_id]['forum_shadow_topics'] += ($topic_row['topic_shadow_id'] != 0);
|
||||
$forum_lookup[$forum_id]['forum_deleted_topics'] += ($topic_status & self::DELETED);
|
||||
$forum_lookup[$forum_id]['forum_unapproved_topics'] += ($topic_status & self::UNAPPROVED);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// goodnight, topics
|
||||
$db->sql_query('DELETE FROM ' . TOPICS_TABLE . ' WHERE ' . $db->sql_in_set('topic_id', $topic_ids));
|
||||
|
||||
// goodnight, posts
|
||||
$db->sql_query('DELETE FROM ' . POSTS_TABLE . ' WHERE ' . $db->sql_in_set('topic_id', $topic_ids));
|
||||
|
||||
$forum_ids = array_keys($forum_lookup);
|
||||
|
||||
// what kind of topic is this? lets find out how much we must tamper with the forum table...
|
||||
$sql = 'SELECT forum_posts, forum_shadow_posts, forum_deleted_posts, forum_unapproved_posts, forum_id
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('forum_id', $forum_ids);
|
||||
$result = $db->sql_query($sql);
|
||||
$forum_rows = array();
|
||||
while ($forum_row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$forum_id = (int) $forum_row['forum_id'];
|
||||
$forum_rows[$forum_id] = $forum_row;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$shadow_topic_ids = array();
|
||||
foreach ($forum_rows as $forum_id => $forum_row)
|
||||
{
|
||||
$topic_row = $forum_lookup[$forum_id];
|
||||
$forum_array = array(
|
||||
'forum_posts' => max($forum_row['forum_posts'] - $topic_row['forum_posts'], 0),
|
||||
'forum_shadow_posts' => max($forum_row['forum_shadow_posts'] - $topic_row['forum_shadow_posts'], 0),
|
||||
'forum_deleted_posts' => max($forum_row['forum_deleted_posts'] - $topic_row['forum_deleted_posts'], 0),
|
||||
'forum_unapproved_posts' => max($forum_row['forum_unapproved_posts'] - $topic_row['forum_unapproved_posts'], 0),
|
||||
|
||||
'forum_topics' => max($forum_row['forum_topics'] - $topic_row['forum_topics'], 0),
|
||||
'forum_shadow_topics' => max($forum_row['forum_shadow_topics'] - $topic_row['forum_shadow_topics'], 0),
|
||||
'forum_deleted_topics' => max($forum_row['forum_deleted_topics'] - $topic_row['forum_deleted_topics'], 0),
|
||||
'forum_unapproved_topics' => max($forum_row['forum_unapproved_topics'] - $topic_row['forum_unapproved_topics'], 0),
|
||||
);
|
||||
|
||||
// get the last "normal" post in the forum, we _must_ update it
|
||||
$sql = 'SELECT MAX(post_id) as max_post_id
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE post_status = ' . self::NORMAL . '
|
||||
AND forum_id = ' . $forum_id;
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// anything left?
|
||||
if ($row)
|
||||
{
|
||||
// OK, lets go do some magick
|
||||
$sql = 'SELECT post_username, poster_id, post_subject, post_time
|
||||
FROM '. POSTS_TABLE . '
|
||||
WHERE post_id = ' . (int) $row['max_post_id'];
|
||||
$result = $db->sql_query($sql);
|
||||
$last_post = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$forum_array['forum_last_user_id'] = (int) $last_post['poster_id'];
|
||||
$forum_array['forum_last_poster_name'] = $last_post['post_username'];
|
||||
$forum_array['forum_last_post_title'] = $last_post['post_subject'];
|
||||
$forum_array['forum_last_post_time'] = (int) $last_post['post_time'];
|
||||
}
|
||||
else
|
||||
{
|
||||
// reset forum state
|
||||
$forum_array['forum_last_user_id'] = 0;
|
||||
$forum_array['forum_last_poster_name'] = '';
|
||||
$forum_array['forum_last_post_title'] = '';
|
||||
$forum_array['forum_last_post_time'] = 0;
|
||||
}
|
||||
|
||||
$db->sql_handle_data('UPDATE', FORUMS_TABLE, $forum_array, "forum_id = $forum_id");
|
||||
}
|
||||
|
||||
// let's not get too hasty, we can kill off the shadows later,
|
||||
// instead we compose a list of all shadows and then efficiently kill them off :)
|
||||
$sql = 'SELECT topic_id
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('topic_shadow_id', $topic_ids);
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$shadow_topic_ids[] = $row['topic_id'];
|
||||
}
|
||||
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// recursion, the other white meat.
|
||||
if (sizeof($shadow_topic_ids))
|
||||
{
|
||||
self::delete_topics(array('topic_ids' => $shadow_topic_ids));
|
||||
}
|
||||
|
||||
// goodnight, moon
|
||||
$db->transaction('commit');
|
||||
}
|
||||
|
||||
static function delete_post($data)
|
||||
{
|
||||
// just call the more powerful variant with just one post :)
|
||||
self::delete_posts(array('post_ids' => array($data['post_id'])));
|
||||
}
|
||||
|
||||
static function delete_posts($data)
|
||||
{
|
||||
global $db;
|
||||
|
||||
// lets get this party started
|
||||
$db->sql_transaction('begin');
|
||||
|
||||
$post_ids = array_map('intval', $data['post_ids']);
|
||||
|
||||
$sql = 'SELECT topic_id, post_status, post_id, post_shadow_id, forum_id
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('post_id', $post_ids);
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
// the following arrays are designed to allow for much faster updates
|
||||
$topic_lookup = array();
|
||||
$forum_lookup = array();
|
||||
|
||||
while ($post_row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$topic_id = (int) $post_row['topic_id'];
|
||||
$forum_id = (int) $post_row['forum_id'];
|
||||
$post_status = (int) $post_row['post_status'];
|
||||
|
||||
$topic_lookup[$topic_id]['topic_posts']++; // we remove a post, go figure
|
||||
$topic_lookup[$topic_id]['topic_shadow_posts'] += ($post_row['post_shadow_id'] != 0); // did we just try to kill a shadow post?!
|
||||
$topic_lookup[$topic_id]['topic_deleted_posts'] += ($post_status & self::DELETED);
|
||||
$topic_lookup[$topic_id]['topic_unapproved_posts'] += ($post_status & self::UNAPPROVED);
|
||||
|
||||
$forum_lookup[$forum_id]['forum_posts']++;
|
||||
$forum_lookup[$topic_id]['forum_shadow_posts'] += ($post_row['post_shadow_id'] != 0); // did we just try to kill a shadow post?!
|
||||
$forum_lookup[$topic_id]['forum_deleted_posts'] += ($post_status & self::DELETED);
|
||||
$forum_lookup[$topic_id]['forum_unapproved_posts'] += ($post_status & self::UNAPPROVED);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$topic_ids = array_keys($forum_lookup);
|
||||
|
||||
// goodnight, posts
|
||||
$db->sql_query('DELETE FROM ' . POSTS_TABLE . ' WHERE ' . $db->sql_in_set('topic_id', $topic_ids));
|
||||
|
||||
// mangle the forums table
|
||||
$sql = 'SELECT forum_posts, forum_shadow_posts, forum_deleted_posts, forum_unapproved_posts, forum_id
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
WHERE forum_id = ' . $forum_id;
|
||||
$result = $db->sql_query($sql);
|
||||
$forum_rows = array();
|
||||
while ($forum_row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$forum_id = (int) $forum_row['forum_id'];
|
||||
$forum_rows[$forum_id] = $forum_row;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$shadow_topic_ids = array();
|
||||
foreach ($forum_rows as $forum_id => $forum_row)
|
||||
{
|
||||
$topic_row = $forum_lookup[$forum_id];
|
||||
$forum_array = array(
|
||||
'forum_posts' => max($forum_row['forum_posts'] - $topic_row['forum_posts'], 0),
|
||||
'forum_shadow_posts' => max($forum_row['forum_shadow_posts'] - $topic_row['forum_shadow_posts'], 0),
|
||||
'forum_deleted_posts' => max($forum_row['forum_deleted_posts'] - $topic_row['forum_deleted_posts'], 0),
|
||||
'forum_unapproved_posts' => max($forum_row['forum_unapproved_posts'] - $topic_row['forum_unapproved_posts'], 0),
|
||||
);
|
||||
|
||||
// get the last "normal" post in the forum, we _must_ update it
|
||||
$sql = 'SELECT MAX(post_id) as max_post_id
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE post_status = ' . self::NORMAL . '
|
||||
AND forum_id = ' . $forum_id;
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// anything left?
|
||||
if ($row)
|
||||
{
|
||||
// OK, lets go do some magick
|
||||
$sql = 'SELECT post_username, poster_id, post_subject, post_time
|
||||
FROM '. POSTS_TABLE . '
|
||||
WHERE post_id = ' . (int) $row['max_post_id'];
|
||||
$result = $db->sql_query($sql);
|
||||
$last_post = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$forum_array['forum_last_user_id'] = (int) $last_post['poster_id'];
|
||||
$forum_array['forum_last_poster_name'] = $last_post['post_username'];
|
||||
$forum_array['forum_last_post_title'] = $last_post['post_subject'];
|
||||
$forum_array['forum_last_post_time'] = (int) $last_post['post_time'];
|
||||
}
|
||||
else
|
||||
{
|
||||
// reset forum state
|
||||
$forum_array['forum_last_user_id'] = 0;
|
||||
$forum_array['forum_last_poster_name'] = '';
|
||||
$forum_array['forum_last_post_title'] = '';
|
||||
$forum_array['forum_last_post_time'] = 0;
|
||||
}
|
||||
|
||||
$db->sql_handle_data('UPDATE', FORUMS_TABLE, $forum_array, "forum_id = $forum_id");
|
||||
}
|
||||
|
||||
// mangle the topics table now :)
|
||||
$sql = 'SELECT topic_posts, topic_shadow_posts, topic_deleted_posts, topic_unapproved_posts, topic_id
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
WHERE forum_id = ' . $forum_id;
|
||||
$result = $db->sql_query($sql);
|
||||
$topic_rows = array();
|
||||
while ($topic_row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$topic_id = (int) $topic_row['topic_id'];
|
||||
$topic_rows[$topic_id] = $topic_row;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$empty_topic_ids = array();
|
||||
|
||||
foreach ($topic_rows as $topic_id => $topic_row)
|
||||
{
|
||||
$post_row = $topic_lookup[$topic_id];
|
||||
$topic_array = array(
|
||||
'topic_posts' => max($topic_row['topic_posts'] - $post_row['topic_posts'], 0),
|
||||
'topic_shadow_posts' => max($topic_row['topic_shadow_posts'] - $post_row['topic_shadow_posts'], 0),
|
||||
'topic_deleted_posts' => max($topic_row['topic_deleted_posts'] - $post_row['topic_deleted_posts'], 0),
|
||||
'topic_unapproved_posts' => max($topic_row['topic_unapproved_posts'] - $post_row['topic_unapproved_posts'], 0),
|
||||
);
|
||||
|
||||
// get the last "normal" post in the topic, we _must_ update it
|
||||
$sql = 'SELECT MAX(post_id) as max_post_id
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE post_status = ' . self::NORMAL . '
|
||||
AND topic_id = ' . $topic_id;
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// anything left?
|
||||
if ($row)
|
||||
{
|
||||
// OK, lets go do some magick
|
||||
$sql = 'SELECT post_username, poster_id, post_subject, post_time
|
||||
FROM '. POSTS_TABLE . '
|
||||
WHERE post_id = ' . (int) $row['max_post_id'];
|
||||
$result = $db->sql_query($sql);
|
||||
$last_post = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$topic_array['topic_last_user_id'] = (int) $last_post['poster_id'];
|
||||
$topic_array['topic_last_poster_name'] = $last_post['post_username'];
|
||||
$topic_array['topic_last_post_title'] = $last_post['post_subject'];
|
||||
$topic_array['topic_last_post_time'] = (int) $last_post['post_time'];
|
||||
}
|
||||
else
|
||||
{
|
||||
// mark this post for execution!
|
||||
$empty_topic_ids[] = $topic_id;
|
||||
}
|
||||
|
||||
$db->sql_handle_data('UPDATE', TOPICS_TABLE, $topic_array, "topic_id = $topic_id");
|
||||
}
|
||||
|
||||
$shadow_post_ids = array();
|
||||
|
||||
// let's not get too hasty, we can kill off the shadows later,
|
||||
// instead we compose a list of all shadows and then efficiently kill them off :)
|
||||
$sql = 'SELECT post_id
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('post_shadow_id', $topic_ids);
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$shadow_post_ids[] = $row['post_id'];
|
||||
}
|
||||
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// recursion, the other white meat.
|
||||
if (sizeof($shadow_topic_ids))
|
||||
{
|
||||
self::delete_posts(array('post_ids' => $shadow_post_ids));
|
||||
}
|
||||
|
||||
// we killed all the posts in a topic, time to kill the topics!
|
||||
if (sizeof($empty_topic_ids))
|
||||
{
|
||||
self::delete_topics(array('topic_ids' => $empty_topic_ids));
|
||||
}
|
||||
|
||||
// goodnight, moon
|
||||
$db->transaction('commit');
|
||||
}
|
||||
|
||||
static function move_topic($data)
|
||||
{
|
||||
self::move_topics(array('topic_forum_mapping' => array(array('topic_id' => $data['topic_id'], 'forum_id' => $data['forum_id'], 'make_shadow' => $data['make_shadow']))));
|
||||
}
|
||||
|
||||
static function move_topics($data)
|
||||
{
|
||||
global $db;
|
||||
|
||||
// lets get this party started
|
||||
$db->transaction('begin');
|
||||
|
||||
// all of each are indexed by topic id
|
||||
$to_forum_ids = $shadow_topic_ids = array();
|
||||
|
||||
foreach ($data['topic_forum_mapping'] as $mapping)
|
||||
{
|
||||
$topic_id = (int) $mapping['topic_id'];
|
||||
$to_forum_ids[$topic_id] = (int) $mapping['forum_id'];
|
||||
if ($mapping['make_shadow'])
|
||||
{
|
||||
$shadow_topic_ids[] = $topic_id;
|
||||
}
|
||||
}
|
||||
|
||||
$forum_columns = array('forum_posts', 'forum_shadow_posts', 'forum_deleted_posts', 'forum_unapproved_posts', 'forum_topics', 'forum_shadow_topics', 'forum_deleted_topics', 'forum_unapproved_topics');
|
||||
|
||||
$topic_ids = array_keys($to_forum_ids);
|
||||
|
||||
// let us first determine how many items we are removing from the pool
|
||||
$sql = 'SELECT topic_posts, topic_shadow_posts, topic_deleted_posts, topic_unapproved_posts, forum_id, topic_status, topic_type, topic_shadow_id, topic_id
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('topic_id', $topic_ids);
|
||||
$result = $db->sql_query($sql);
|
||||
$forum_lookup = array();
|
||||
while ($topic_row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$topic_id = $topic_row['topic_id'];
|
||||
$from_forum_id = (int) $topic_row['forum_id'];
|
||||
$to_forum_id = $to_forum_ids[$topic_id];
|
||||
|
||||
// we are iterating one topic at a time...
|
||||
$forum_lookup[$from_forum_id]['forum_topics'] = $forum_lookup[$to_forum_id]['forum_topics'] = 1;
|
||||
|
||||
foreach ($forum_columns as $column)
|
||||
{
|
||||
$forum_lookup[$from_forum_id][$column] -= $topic_row['topic_posts'];
|
||||
$forum_lookup[$to_forum_id][$column] += $topic_row['topic_posts'];
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// determine the totals
|
||||
$sql = 'SELECT forum_posts, forum_shadow_posts, forum_deleted_posts, forum_unapproved_posts, forum_id, forum_topics, forum_deleted_topics, forum_unapproved_topics
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('forum_id', array_keys($forum_lookup));
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$forum_id = (int) $row['forum_id'];
|
||||
|
||||
foreach ($forum_columns as $column)
|
||||
{
|
||||
$forum_lookup[$forum_id][$column] += (int) $row[$column];
|
||||
}
|
||||
}
|
||||
|
||||
// create a listing of which topics are going in which forums
|
||||
$update_list = array();
|
||||
|
||||
foreach ($to_forum_ids as $topic_id => $forum_id)
|
||||
{
|
||||
$update_list[$forum_id][] = $topic_id;
|
||||
}
|
||||
|
||||
// we save as many queries as we can by updating all similar topics at once
|
||||
foreach ($update_list as $forum_id => $topic_ids)
|
||||
{
|
||||
// update the topic itself
|
||||
$db->sql_handle_data('UPDATE', TOPICS_TABLE, array('forum_id' => $to_forum_id), $db->sql_in_set('topic_id', $topic_ids));
|
||||
|
||||
// update the posts now
|
||||
$db->sql_handle_data('UPDATE', POSTS_TABLE, array('forum_id' => $to_forum_id), $db->sql_in_set('topic_id', $topic_ids));
|
||||
}
|
||||
|
||||
// start building the needed arrays for updating the forum data
|
||||
foreach ($forum_lookup as $forum_id => $forum_data)
|
||||
{
|
||||
foreach ($forum_columns as $column)
|
||||
{
|
||||
$forum_data[$column] = max($forum_data[$column], 0); // ensure the result is unsigned
|
||||
}
|
||||
|
||||
// get the last "normal" post in the old forum, we _must_ update it
|
||||
$sql = 'SELECT MAX(post_id) as max_post_id
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE post_status = ' . self::NORMAL . '
|
||||
AND forum_id = ' . $forum_id;
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// anything left?
|
||||
if ($row)
|
||||
{
|
||||
// OK, lets go do some magick
|
||||
$sql = 'SELECT post_username, poster_id, post_subject, post_time
|
||||
FROM '. POSTS_TABLE . '
|
||||
WHERE post_id = ' . (int) $row['max_post_id'];
|
||||
$result = $db->sql_query($sql);
|
||||
$last_post = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$forum_data['forum_last_user_id'] = (int) $last_post['poster_id'];
|
||||
$forum_data['forum_last_poster_name'] = $last_post['post_username'];
|
||||
$forum_data['forum_last_post_title'] = $last_post['post_subject'];
|
||||
$forum_data['forum_last_post_time'] = (int) $last_post['post_time'];
|
||||
}
|
||||
else
|
||||
{
|
||||
// reset forum state
|
||||
$forum_data['forum_last_user_id'] = 0;
|
||||
$forum_data['forum_last_poster_name'] = '';
|
||||
$forum_data['forum_last_post_title'] = '';
|
||||
$forum_data['forum_last_post_time'] = 0;
|
||||
}
|
||||
|
||||
// update the old forum
|
||||
$db->sql_handle_data('UPDATE', FORUMS_TABLE, $forum_data, "forum_id = $forum_id");
|
||||
}
|
||||
|
||||
// hooray for code reuse!
|
||||
foreach ($shadow_topic_ids as $topic_id)
|
||||
{
|
||||
$data['shadow_topic_id'] = $topic_id;
|
||||
$data['forum_id'] = $from_forum_id;
|
||||
self::insert_shadow_topic($data);
|
||||
}
|
||||
|
||||
$db->sql_transaction('commit');
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@@ -80,4 +80,4 @@ echo 'www.URL: ' . $www_url . "<br />\n";
|
||||
$relative_url = "$segment$path_abempty(?:\?$query)?(?:\#$fragment)?";
|
||||
echo 'relative URL: ' . $relative_url . "<br />\n";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
12
phpBB/develop/repair_bots.php
Executable file → Normal file
@@ -11,10 +11,10 @@ die("Please read the first lines of this script for instructions on how to enabl
|
||||
set_time_limit(0);
|
||||
|
||||
define('IN_PHPBB', true);
|
||||
$phpbb_root_path = './../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
include($phpbb_root_path . 'common.'.$phpEx);
|
||||
include($phpbb_root_path . '/includes/functions_user.'.$phpEx);
|
||||
define('PHPBB_ROOT_PATH', './../');
|
||||
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
|
||||
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
|
||||
include(PHPBB_ROOT_PATH . 'includes/functions_user.' . PHP_EXT);
|
||||
|
||||
|
||||
// Start session management
|
||||
@@ -98,7 +98,7 @@ function add_bots($bots)
|
||||
|
||||
$sql = 'SELECT group_id FROM ' . GROUPS_TABLE . " WHERE group_name = 'BOTS'";
|
||||
$result = $db->sql_query($sql);
|
||||
$group_id = (int) $db->sql_fetchfield('group_id', false, $result);
|
||||
$group_id = (int) $db->sql_fetchfield('group_id', $result);
|
||||
$db->sql_freeresult($result);
|
||||
$db->sql_query('TRUNCATE TABLE ' . BOTS_TABLE);
|
||||
|
||||
@@ -108,7 +108,7 @@ function add_bots($bots)
|
||||
|
||||
$sql = 'SELECT group_id FROM ' . GROUPS_TABLE . " WHERE group_name = 'BOTS'";
|
||||
$result = $db->sql_query($sql);
|
||||
$group_id = (int) $db->sql_fetchfield('group_id', false, $result);
|
||||
$group_id = (int) $db->sql_fetchfield('group_id', $result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
}
|
||||
|
@@ -23,9 +23,9 @@ die("Please read the first lines of this script for instructions on how to enabl
|
||||
set_time_limit(0);
|
||||
|
||||
define('IN_PHPBB', true);
|
||||
$phpbb_root_path = '../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
include($phpbb_root_path . 'common.'.$phpEx);
|
||||
define('PHPBB_ROOT_PATH', './../');
|
||||
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
|
||||
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
|
||||
|
||||
// Start session management
|
||||
$user->session_begin();
|
||||
@@ -34,12 +34,12 @@ $user->setup();
|
||||
|
||||
$search_type = $config['search_type'];
|
||||
|
||||
if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
|
||||
if (!file_exists(PHPBB_ROOT_PATH . 'includes/search/' . $search_type . '.' . PHP_EXT))
|
||||
{
|
||||
trigger_error('NO_SUCH_SEARCH_MODULE');
|
||||
}
|
||||
|
||||
require($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx);
|
||||
require(PHPBB_ROOT_PATH . 'includes/search/' . $search_type . '.' . PHP_EXT);
|
||||
|
||||
$error = false;
|
||||
$search = new $search_type($error);
|
||||
|
@@ -98,8 +98,7 @@ function utf8_normalize_nfkc($strings)
|
||||
|
||||
if (!class_exists('utf_normalizer'))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
|
||||
include(PHPBB_ROOT_PATH . 'includes/utf/utf_normalizer.' . PHP_EXT);
|
||||
}
|
||||
|
||||
if (!is_array($strings))
|
||||
|
@@ -26,8 +26,8 @@ set_time_limit(0);
|
||||
error_reporting(E_ALL);
|
||||
|
||||
define('IN_PHPBB', true);
|
||||
$phpbb_root_path = '../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
define('PHPBB_ROOT_PATH', './../');
|
||||
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
|
||||
|
||||
|
||||
/**
|
||||
@@ -77,13 +77,13 @@ $test_suite = array(
|
||||
)
|
||||
);
|
||||
|
||||
require_once($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
|
||||
require_once(PHPBB_ROOT_PATH . 'includes/utf/utf_normalizer.' . PHP_EXT);
|
||||
|
||||
$i = $n = 0;
|
||||
$failed = false;
|
||||
$tested_chars = array();
|
||||
|
||||
$fp = fopen($phpbb_root_path . 'develop/NormalizationTest.txt', 'rb');
|
||||
$fp = fopen(PHPBB_ROOT_PATH . 'develop/NormalizationTest.txt', 'rb');
|
||||
while (!feof($fp))
|
||||
{
|
||||
$line = fgets($fp);
|
||||
@@ -158,7 +158,7 @@ fclose($fp);
|
||||
*/
|
||||
echo "\n\nTesting for invariants...\n\n";
|
||||
|
||||
$fp = fopen($phpbb_root_path . 'develop/UnicodeData.txt', 'rt');
|
||||
$fp = fopen(PHPBB_ROOT_PATH . 'develop/UnicodeData.txt', 'rt');
|
||||
|
||||
$n = 0;
|
||||
while (!feof($fp))
|
||||
@@ -184,21 +184,21 @@ while (!feof($fp))
|
||||
|
||||
$utf_expected = hex_to_utf($hex_expected);
|
||||
|
||||
if ($utf_expected >= UTF8_SURROGATE_FIRST
|
||||
&& $utf_expected <= UTF8_SURROGATE_LAST)
|
||||
if ($utf_expected >= utf_normalizer::UTF8_SURROGATE_FIRST
|
||||
&& $utf_expected <= utf_normalizer::UTF8_SURROGATE_LAST)
|
||||
{
|
||||
/**
|
||||
* Surrogates are illegal on their own, we expect the normalizer
|
||||
* to return a replacement char
|
||||
*/
|
||||
$utf_expected = UTF8_REPLACEMENT;
|
||||
$utf_expected = utf_normalizer::UTF8_REPLACEMENT;
|
||||
$hex_expected = utf_to_hexseq($utf_expected);
|
||||
}
|
||||
|
||||
foreach (array('nfc', 'nfkc', 'nfd', 'nfkd') as $form)
|
||||
{
|
||||
$utf_result = $utf_expected;
|
||||
utf_normalizer::$form($utf_result);
|
||||
call_user_func(array('utf_normalizer', $form), $utf_result);
|
||||
$hex_result = utf_to_hexseq($utf_result);
|
||||
// echo "$form($utf_expected) == $utf_result\n";
|
||||
|
||||
@@ -227,9 +227,7 @@ die("\n\nALL TESTS PASSED SUCCESSFULLY\n");
|
||||
*/
|
||||
function download($url)
|
||||
{
|
||||
global $phpbb_root_path;
|
||||
|
||||
if (file_exists($phpbb_root_path . 'develop/' . basename($url)))
|
||||
if (file_exists(PHPBB_ROOT_PATH . 'develop/' . basename($url)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -241,7 +239,7 @@ function download($url)
|
||||
die("Can't download from $url\nPlease download it yourself and put it in the develop/ dir, kthxbai");
|
||||
}
|
||||
|
||||
if (!$fpw = fopen($phpbb_root_path . 'develop/' . basename($url), 'wb'))
|
||||
if (!$fpw = fopen(PHPBB_ROOT_PATH . 'develop/' . basename($url), 'wb'))
|
||||
{
|
||||
die("Can't open develop/" . basename($url) . " for output... please check your permissions or something");
|
||||
}
|
||||
|
@@ -22,13 +22,15 @@ involved in phpBB.
|
||||
|
||||
phpBB Lead Developer : Acyd Burn (Meik Sievertsen)
|
||||
|
||||
phpBB Developers : DavidMJ (David M.)
|
||||
phpBB Developers : APTX (Marek A. R.)
|
||||
DavidMJ (David M.)
|
||||
dhn (Dominik Dr<44>scher)
|
||||
kellanved (Henry Sudhof)
|
||||
naderman (Nils Adermann)
|
||||
subBlue (Tom Beddard)
|
||||
ToonArmy (Chris Smith)
|
||||
Vic D'Elfant (Vic D'Elfant)
|
||||
|
||||
|
||||
-- Previous Contributors --
|
||||
|
||||
phpBB Project Manager : theFinn (James Atkinson) [Founder - 04/2007]
|
||||
|
@@ -1,570 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en">
|
||||
<head>
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="content-style-type" content="text/css" />
|
||||
<meta http-equiv="content-language" content="en" />
|
||||
<meta http-equiv="imagetoolbar" content="no" />
|
||||
<meta name="resource-type" content="document" />
|
||||
<meta name="distribution" content="global" />
|
||||
<meta name="copyright" content="2007 phpBB Group" />
|
||||
<meta name="keywords" content="" />
|
||||
<meta name="description" content="phpBB 3.0.x Changelog" />
|
||||
<title>phpBB3 • Changelog</title>
|
||||
|
||||
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
||||
|
||||
</head>
|
||||
|
||||
<body id="phpbb" class="section-docs">
|
||||
|
||||
<div id="wrap">
|
||||
<a id="top" name="top" accesskey="t"></a>
|
||||
<div id="page-header">
|
||||
<div class="headerbar">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
|
||||
<div id="doc-description">
|
||||
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
|
||||
<h1>phpBB 3.0.x Changelog</h1>
|
||||
<p style="display: none;"><a href="#start_here">Skip</a></p>
|
||||
</div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="start_here"></a>
|
||||
|
||||
<div id="page-body">
|
||||
|
||||
<!-- BEGIN DOCUMENT -->
|
||||
|
||||
<p>This is a non-exhaustive (but still near complete) changelog for phpBB 3.0.x including release candidate versions. Our thanks to all those people who've contributed bug reports and code fixes.</p>
|
||||
|
||||
<h1>Changelog</h1>
|
||||
|
||||
<div class="paragraph menu">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
|
||||
<div class="content">
|
||||
|
||||
<ol>
|
||||
<li><a href="#changelog">Changelog</a>
|
||||
<ol style="list-style-type: lower-roman;">
|
||||
<li><a href="#v300">Changes since 3.0.0</a></li>
|
||||
<li><a href="#v30rc8">Changes since RC-8</a></li>
|
||||
<li><a href="#v30rc7">Changes since RC-7</a></li>
|
||||
<li><a href="#v30rc6">Changes since RC-6</a></li>
|
||||
<li><a href="#v30rc5">Changes since RC-5</a></li>
|
||||
<li><a href="#v30rc4">Changes since RC-4</a></li>
|
||||
<li><a href="#v30rc3">Changes since RC-3</a></li>
|
||||
<li><a href="#v30rc2">Changes since RC-2</a></li>
|
||||
<li><a href="#v30rc1">Changes since RC-1</a></li>
|
||||
</ol>
|
||||
</li>
|
||||
<li><a href="#disclaimer">Copyright and disclaimer</a></li>
|
||||
</ol>
|
||||
|
||||
</div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<a name="changelog"></a><h2>1. Changelog</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
|
||||
<div class="content">
|
||||
|
||||
<a name="v300"></a><h3>1.i. Changes since 3.0.0</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Change] Validate birthdays (Bug #15004)</li>
|
||||
<li>[Fix] Allow correct avatar caching for CGI installations. (thanks wildbill)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc8"></a><h3>1.i. Changes since 3.0.RC8</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Cleaned usernames contain only single spaces, so "a_name" and "a__name" are treated as the same name (Bug #15634)</li>
|
||||
<li>[Fix] Check "able to disable word censor" option while applying word censor on text (Bug #15974)</li>
|
||||
<li>[Fix] Rollback changes on failed transaction if returning on sql error is set</li>
|
||||
<li>[Fix] Call garbage_collection() within database updater to correctly close connections (affects Oracle for example)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc7"></a><h3>1.ii. Changes since 3.0.RC7</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Fixed MSSQL related bug in the update system</li>
|
||||
<li>[Fix] Display "Return to" links on unwritable forums (Bug #14824)</li>
|
||||
<li>[Fix] Mitigating different realpath() handling between PHP versions (fixing confirm box redirects)</li>
|
||||
<li>[Fix] Fix signature editing - ability to remove signature (Bug #14820)</li>
|
||||
<li>[Fix] Send correct activation key by forcing reactivation for inactive user (Bug #14819)</li>
|
||||
<li>[Fix] Adding correct IP for private messages sent by issuing warnings (Bug #14781)</li>
|
||||
<li>[Fix] Open private message notification (Bug #14773)</li>
|
||||
<li>[Fix] Fixing false new private message indicator (Bug #14627)</li>
|
||||
<li>[Fix] Let newly activated passwords work if users were converted (Bug #14787)</li>
|
||||
<li>[Fix] Quote bbcode fixes. Letting parse quote="[" and re-allowing whitelisted bbcodes within username portion (Bug #14770)</li>
|
||||
<li>[Fix] Allow alternative text for styled buttons if images turned off, but CSS staying on</li>
|
||||
<li>[Sec] Fix bbcode helpline display for custom bbcodes - this requires style changes for any custom style (Bug #14850)</li>
|
||||
<li>[Fix] Correctly count announcements when filtering forums by date (Bug #14877)</li>
|
||||
<li>[Fix] Allow charset names containing underscores or spaces</li>
|
||||
<li>[Fix] Don't allow previous/next links for non-existing topics (Bug #15039)</li>
|
||||
<li>[Change] Do not assign converted votes to the first option in a vote.</li>
|
||||
<li>[Fix] Use correct RFC 2822 date format in emails (Bug #15042)</li>
|
||||
<li>[Fix] Require founder status for some actions on founder-only groups (Bug #15119)</li>
|
||||
<li>[Fix] Allow changing the "now" option of date CPFs (Bug #15111)</li>
|
||||
<li>[Change] Some improvements to the caching of avatars</li>
|
||||
<li>[Change] Set template recompilation to be disabled by default. All mod and style authors and all those who want to modify their styles should enabled it after installation.</li>
|
||||
<li>[Change] Disable debug mode. All mod and style authors should enable DEBUG and DEBUG_EXTRA.</li>
|
||||
<li>[Fix] Check error reporting level for all error level. This fixes a problem for hosts having manipulated the error handler. (Bug #14831)</li>
|
||||
<li>[Feature] Constant PHPBB_DB_NEW_LINK introduced which can be used to force phpBB to create a new database connection instead of reusing an existing one if the dbms supports it (Bug #14927)</li>
|
||||
<li>[Fix] Automatic URL parsing no longer allows dots in the schema but can parse URLs starting after a dot (Bug #15110)</li>
|
||||
<li>[Fix] Dynamic width for birthday select boxes (Bug #15149)</li>
|
||||
<li>[Fix] Recache Moderators when copying permissions. (Bug #15384)</li>
|
||||
<li>[Fix] Propagate sort options in mcp_forums (Bug #15464)</li>
|
||||
<li>[Change] Do not allow [size=0] bbcodes (font-size of 0)</li>
|
||||
<li>[Fix] No duplication of active topics (Bug #15474)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc6"></a><h3>1.iii. Changes since 3.0.RC6</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Submitting language changes using acp_language (Bug #14736)</li>
|
||||
<li>[Fix] Fixed wrong bbcode handling for forum rules, forum descriptions and group descriptions</li>
|
||||
<li>[Fix] Fixed faulty form tokens (Bug #14725, #14762 and #14755)</li>
|
||||
<li>[Fix] Fixed bbcode uid generation in the phpBB2 converter (Bug #14722)</li>
|
||||
<li>[Fix] Able to request new password (Bug #14743)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc5"></a><h3>1.iv. Changes since 3.0.RC5</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Feature] Removing constant PHPBB_EMBEDDED in favor of using an exit_handler(); the constant was meant to achive this more or less.</li>
|
||||
<li>[Feature] Constant PHPBB_ADMIN_PATH introduced, having the same purpose as PHPBB_ROOT_PATH, but for the ACP.</li>
|
||||
<li>[Fix] Further fixing user profile view (please do not forget to update/refresh your template and style) (Bug #14230)</li>
|
||||
<li>[Fix] Adjust google adsense bot information (Bug #14296)</li>
|
||||
<li>[Fix] Fix horizontal scrollbar problem in IE6 (Bug #14228) - fix provided by Danny-dev</li>
|
||||
<li>[Fix] Use correct size values in ACP user signature screen (Bug #13367)</li>
|
||||
<li>[Fix] Attachment Place inline won't work with single quotes (Bug #14291)</li>
|
||||
<li>[Fix] Unable to save email templates through ACP language page (Bug #14266)</li>
|
||||
<li>[Fix] Correctly set user style for guest user (able to be changed within user management)</li>
|
||||
<li>[Change] Moved note about dns_get_record function for using GTalk (Jabber) from Jabber log to Jabber ACP panel</li>
|
||||
<li>[Fix] Do not use register_shutdown_function within cron.php if handling the queue and the mail function being used (Bug #14321)</li>
|
||||
<li>[Fix] Fixing private message on-hold code if moving messages into folder based on rules (Bug #14309)</li>
|
||||
<li>[Fix] Allow the merge selection screen to work (Bug #14363)</li>
|
||||
<li>[Change] Require additional permissions for copying permission when editing forums </li>
|
||||
<li>[Fix] Local magic URLs no longer get an additional trailing slash (Bug #14362)</li>
|
||||
<li>[Fix] Do not let the cron script stale for one hour if register_shutdown_function is not able to be called (Bug #14436)</li>
|
||||
<li>[Feature] Added /includes/db/db_tools.php file, which includes tools for handling cross-db actions such as altering columns, etc.</li>
|
||||
<li>[Change] Reset the start parameter when the timeframe is changed in the mcp topic page (Ticket #14438)</li>
|
||||
<li>[Change] Added Code for cleaning the confirm table to the session garbage collection</li>
|
||||
<li>[Fix] Fixed token handling in jabber class for extremely spec-compliant XMPP server (Bug #14445)</li>
|
||||
<li>[Fix] Disallowed galleries from using special characters (Bug #14466)</li>
|
||||
<li>[Change] Listing the board url within the email text instead of appending it to the subject (Bug #14378)</li>
|
||||
<li>[Fix] Always display the quote button as the most accessible one (this means edit is before quote in prosilver due to the way we lay out profiles)</li>
|
||||
<li>[Fix] Use correct dimension (width x height) in ACP (Bug #14452)</li>
|
||||
<li>[Fix] Only display PM history links if there are PM's to be displayed (Bug #14484)</li>
|
||||
<li>[Feature] Added completely new hook system to allow better application/mod integration - see docs/hook_system.html</li>
|
||||
<li>[Fix] Correctly delete excess poll options (Bug #14566)</li>
|
||||
<li>[Fix] Allow names evaluating to false for poll options</li>
|
||||
<li>[Change] use in-build functions for user online list (Bug #14596) - provided by rxu</li>
|
||||
<li>[Fix] Fixing google cache display problems with Firefox (Bug #14472) - patch provided by Raimon</li>
|
||||
<li>[Fix] Prevent topic unlocking if locked by someone else while posting (Bug #10307)</li>
|
||||
<li>[Change] Allow years in future be selected for date custom profile field (Bug #14519)</li>
|
||||
<li>[Fix] Don't display "Avatars Disabled" message on edit groups in UCP (Bug #14636)</li>
|
||||
<li>[Change] Require confirm for deleting inactive users. (Bug #14641)</li>
|
||||
<li>[Fix] Match custom BBCodes in the same way during first and second pass - patch provided by IBBoard (Bug #14268)</li>
|
||||
<li>[Fix] Correct quote parsing if opening bracket before opening quote (Bug #14667)</li>
|
||||
<li>[Fix] Clean post message for checking length to prevent posting empty messages</li>
|
||||
<li>[Fix] Display jumpbox if needed for functionality (Bug #14702)</li>
|
||||
<li>[Feature] Added an option to enforce that users spend a configurable amount of time on the terms page during registration</li>
|
||||
<li>[Fix] Fixed copy permissions box in the ACP</li>
|
||||
<li>[Fix] Enforce types for the user table during conversions</li>
|
||||
<li>[Sec] Fixing possible XSS through compromised WHOIS server (#i63, #i64)</li>
|
||||
<li>[Sec] Missing access control on whois in viewonline.php (#i51)</li>
|
||||
<li>[Sec] Encoding some variables within user::page array correctly (to cope with browser not doing it correctly) to prevent XSS through functions re-using them (#i61)</li>
|
||||
<li>[Sec] Fixed XSS through memberlist search feature (#i62)</li>
|
||||
<li>[Sec] Fixed XSS through colour swatch (#i65)</li>
|
||||
<li>[Sec] Fixed insecure attachment deletion (#i53)</li>
|
||||
<li>[Sec] Only allow whitelisted protocols in meta_redirect/redirect (#i66)</li>
|
||||
<li>[Sec] Check file names to be written in language management panel (#i52)</li>
|
||||
<li>[Sec] Deregister globals if ini_get has been disabled (#i112)</li>
|
||||
<li>[Sec] Added form tokens to most forms to enforce a lighter variant of CSRF protection (#i91 - #i96)</li>
|
||||
<li>[Sec] Use new password hash method for forum passwords (#i43)</li>
|
||||
<li>[Sec] Changed download file location to prevent flash crossdomain policies taking effect (#i8)</li>
|
||||
<li>[Sec] Do not allow autocompletion for password on admin re-authentication (#i41)</li>
|
||||
<li>[Sec] Made sure users are not completely locked out if they have a GLOBALS cookie (#i101)</li>
|
||||
<li>[Sec] Use the secure hash to generate BBCODE_UIDs (#i71)</li>
|
||||
<li>[Sec] Increase the length of BBCODE_UIDs (#i72)</li>
|
||||
<li>[Sec] New password hashing mechanism for storing passwords (#i42)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc4"></a><h3>1.v. Changes since 3.0.RC4</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] MySQL, PostgreSQL and SQLite related database fixes (Bug #13862)</li>
|
||||
<li>[Fix] Allow MS SQL to properly connect when using the mssql driver and PHP is less than either 4.4.1 or 5.1 (Bug #13874)</li>
|
||||
<li>[Fix] Ignore files containing HTML special chars in the filenames as gallery avatars (Bug #13906)</li>
|
||||
<li>[Fix] Multiple PM recipients not separated (Bug #13876)</li>
|
||||
<li>[Change] Split the select list for the smilie order to clarify which are feasible and which are not (Bug #13911)</li>
|
||||
<li>[Fix] Convert empty homepage fields (Bug #13917)</li>
|
||||
<li>[Fix] Use board default DST setting on creating new profiles (Bug #11563)</li>
|
||||
<li>[Feature] New constant PHPBB_EMBEDDED can be used to let phpBB not call exit; if wrapped/embedded (We may re-check this constant on other code locations later too)</li>
|
||||
<li>[Feature] append_sid() having a check for the function append_sid_phpbb_hook(). This function is called in favour of append_sid() with the exact same parameters if present.</li>
|
||||
<li>[Fix] Only list enabled modes within the dropdown at user administration (Bug #13883) - patch provided by damnian</li>
|
||||
<li>[Fix] Properly display ban reason if selecting banned entries within the ACP (Bug #13896)</li>
|
||||
<li>[Fix] Properly parse SQL expressions for Oracle (Bug #13916)</li>
|
||||
<li>[Fix] Added label bindings to the custom profile fields in the ACP (Bug #13936) - patch provided by damnian</li>
|
||||
<li>[Change] Made group avatar/rank changes more intuitive</li>
|
||||
<li>[Fix] Give more feedback in icon/smilie management (Bug #13295)</li>
|
||||
<li>[Fix] Correctly set user::lang_id (Bug #14010)</li>
|
||||
<li>[Fix] Properly display the smiley export screen (Bug #13968)</li>
|
||||
<li>[Feature] Add "DECIMAL:", "PDECIMAL", and "PDECIMAL:" to the schema creation code (Bug #13999) - patch provided by poyntesm</li>
|
||||
<li>[Fix] Don't show the notify checkbox in the approval queue if the only posts are written by ANONYMOUS (Bug #13973)</li>
|
||||
<li>[Fix] Redirect to bots management page on edit/add (Bug #14073)</li>
|
||||
<li>[Fix] Display locked icon in viewforum/prosilver if forum locked (Bug #14009)</li>
|
||||
<li>[Feature] Display message history in compose PM screen</li>
|
||||
<li>[Change] Do not force login on visiting topic/forum from notification emails (Bug #13818)</li>
|
||||
<li>[Fix] Fixed cron_lock value for cron execution. This bug led to users having problems with the email queue and other cron related issues.</li>
|
||||
<li>[Fix] Prevent white pages on php notices with gzip compression enabled (Bug #14096)</li>
|
||||
<li>[Fix] Propagate the cleaned identifier for CFPs (Bug #14072)</li>
|
||||
<li>[Fix] Do not display NO_TOPICS message if viewing non-postable category (Bug #13489)</li>
|
||||
<li>[Fix] Let the theme immediately expire if changed from ACP for at least 30 minutes after change</li>
|
||||
<li>[Fix] Do not append hilit= in search if highlighting term is empty (Bug #13910)</li>
|
||||
<li>[Fix] Return to last page after voting in viewtopic instead of first page in topic (Bug #13976)</li>
|
||||
<li>[Fix] If sending PM's to groups only include activated member (Bug #14040)</li>
|
||||
<li>[Fix] Correctly wrap words in emails containing utf8 characters (Bug #14109)</li>
|
||||
<li>[Change] For new posts or editing the first post topic titles have a maxlength of 60 characters. For any subsequent posts the length is extended to 64 to make room for the Re: part, but cutting at 60 characters. The maxlength need to be 64, else users using opera are unable to post (opera does not allow pre-filling a field with more characters than specified within the maxlength attribute)</li>
|
||||
<li>[Fix] Disable gzip compression for cached stylesheet for Internet Explorer 6 or empty browser (IE6 is not able to properly display the compressed stylesheet) (Bug #14054)</li>
|
||||
<li>[Fix] Header icons fixed in FF for RTL languages (Bug #14084)</li>
|
||||
<li>[Change] Words in topic titles and post subjects are highlighted on the search results page and viewtopic too now (Bug #13383)</li>
|
||||
<li>[Fix] Made sure strip_bbcode cannot get the idea that a smiley is a BBCode (Bug #14030)</li>
|
||||
<li>[Change] Added a filter for user objects to LDAP configuration and improved explanations (Bug #12627)</li>
|
||||
<li>[Fix] Display searchable subforums of invisible parents in advanced search forum selection (Bug #11395)</li>
|
||||
<li>[Fix] Allow line breaks in custom BBCodes (Bug #10758)</li>
|
||||
<li>[Fix] Ordered BBcode parsing functions in the same way everywhere where they are used</li>
|
||||
<li>[Fix] Prevent {URL} token in custom BBCodes from make_clickable messing (Bug #14151)</li>
|
||||
<li>[Sec] Added alternative tokens to custom BBCodes which are safe for CSS/Javascript and changed TEXT token to entitise opening and closing parantheses.</li>
|
||||
<li>[Fix] Convert 2.0 moderator posting permissions (Bug #14105)</li>
|
||||
<li>[Fix] Correctly apply PM box limit of 0 to custom folder (Bug #14154)</li>
|
||||
<li>[Fix] odbc_autocommit causing existing result sets to be dropped (Bug #14182)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc3"></a><h3>1.vi. Changes since 3.0.RC3</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Fixing some subsilver2 and prosilver style issues</li>
|
||||
<li>[Fix] Parse error in MCP ban (Bug #13109)</li>
|
||||
<li>[Fix] Correctly hide online status in the profile (Bug #13059)</li>
|
||||
<li>[Feature] Let the user choose how to update modified files (merging, using new file or using old file) within automatic updater</li>
|
||||
<li>[Fix] An extra \ in an Oracle SQL regex was corrected (Bug #13151)</li>
|
||||
<li>[Fix] Added a missing global to get_file() (Bug #13149)</li>
|
||||
<li>[Fix] Hide autologin box when autologin is disabled (Bug #13093)</li>
|
||||
<li>[Fix] Account for the forum id not being part of the request uri in prosilver (Bug #13121)</li>
|
||||
<li>[Fix] Properly alter PostgreSQL tables</li>
|
||||
<li>[Fix] Properly cache template files that were stored in the database (Bug #12675)</li>
|
||||
<li>[Fix] Do not count the deletion of an unapproved topic as a decrease in normally viewable posts (Bug #13167)</li>
|
||||
<li>[Fix] Allow column_exists() to return true if the column exists but no data is in the table</li>
|
||||
<li>[Fix] Allow setting the smiley order via the select. Also allow to add smileys at the top. (Bug #13199)</li>
|
||||
<li>[Fix] Fix php notice on sending jabber messages (Bug #13201)</li>
|
||||
<li>[Fix] Make the window showing file differences a little wider (Bug #13157)</li>
|
||||
<li>[Fix] Preserve preview style on search form (Bug #13205)</li>
|
||||
<li>[Fix] Place attachment filename in new line in posting editor (Bug #9726)</li>
|
||||
<li>[Fix] Don't allow caching to occur in the update sequence (Bug #13207)</li>
|
||||
<li>[Fix] Enforce the max password length for automatically generated password created by the password sender (Bug #13181)</li>
|
||||
<li>[Fix] Handle phpinfo() when expose_php is false (Bug #12777)</li>
|
||||
<li>[Fix] Allow managing of forum roles without global users (Bug #13249)</li>
|
||||
<li>[Change] Do not run cron script if board is disabled</li>
|
||||
<li>[Fix] Correctly destroy sql cache for some query combinations (Bug #13237)</li>
|
||||
<li>[Fix] Allow link forums being password protected (Bug #12967)</li>
|
||||
<li>[Fix] Allow wrapping topic/post icons in posting editor (Bug #12843)</li>
|
||||
<li>[Fix] Display L_RANK only once in template if rank title and image defined (Bug #13231)</li>
|
||||
<li>[Fix] Make sure selected transfer method exists before calling (Bug #13265)</li>
|
||||
<li>[Fix] Correctly escape language keys in language editor (Bug #13279)</li>
|
||||
<li>[Fix] Correctly hide post/reply buttons if permissions are not given (related to Bug #12809)</li>
|
||||
<li>[Fix] Remove orphan/wrong permission entries for non-existent forums - self-repairing permissions if conversions went "crazy"</li>
|
||||
<li>[Feature] Allow "older" updates applied with the automatic updater. This allows people using it for updating, say, from 3.0.0 to 3.0.1 (with the correct package of course) and then from 3.0.1 to 3.0.2 if the latest version at this time is 3.0.2. These changes take effect beginning with RC4 or people replacing install/install_update.php manually prior doing the updates.</li>
|
||||
<li>[Fix] Present correct error message if user tries to edit already read private message (Bug #13271)</li>
|
||||
<li>[Fix] Also display board disabled notice for admins/mods if board got disabled due to exceeding the load limit (Bug #13267)</li>
|
||||
<li>[Fix] Correctly deliver avatar if readfile function has been disabled (Bug #13309)</li>
|
||||
<li>[Fix] Display php information page with the correct direction (Bug #12557)</li>
|
||||
<li>[Fix] Increased the number of style objects (styles, templates, themes and imagesets) possible from 127 to 65535 for MySQL (Bug #13179)</li>
|
||||
<li>[Fix] Although theoretically impossible in our code, removed the chance of trying to open a file that does not exist (Bug #13327)</li>
|
||||
<li>[Fix] Although theoretically impossible in our code, changed the handling of non-existent language files (Bug #13329, #13331)</li>
|
||||
<li>[Fix] Removed extra ampersand from ACP link (Bug #13315)</li>
|
||||
<li>[Fix] used cleaned up version of given field identification for pre-filling a new custom profile field (Bug #13319)</li>
|
||||
<li>[Fix] Correctly convert 2.0 website profile fields. (Bug #13379)</li>
|
||||
<li>[Fix] Fixed the "Alphanumeric" and "Alphanumeric and spacers" username selection limitations (Bug #13391)</li>
|
||||
<li>[Fix] Make sure filelist() is only returning array types (Bug #13385)</li>
|
||||
<li>[Fix] Correctly mark forums read if using cookie based topic tracking (Bug #13245)</li>
|
||||
<li>[Change] Put custom profile fields into top box and signature into separate box in members profile view (Bug #13357)</li>
|
||||
<li>[Fix] Only show moderator log entries for forums the user is having moderation rights in (Bug #12481)</li>
|
||||
<li>[Feature] Show resulting permission alone in trace window (Bug #10952) - thanks to dark/rain for the proposal</li>
|
||||
<li>[Fix] Fixed bug in realpath replacement letting it actually work again</li>
|
||||
<li>[Change] Try to be a bit more specific regarding global/local permission trace (Bug #11032)</li>
|
||||
<li>[Fix] Fixed some strangeness in password validation due to mb_ereg()</li>
|
||||
<li>[Fix] Subforums of a forum would overwrite the latest post information even if they did not contain the latest post (Bug #11931)</li>
|
||||
<li>[Fix] Use global username display function on several places (Bug #11080, #11098) - patch by HoL</li>
|
||||
<li>[Fix] Several viewonline fixes and feature changes. Also displaying the users browser in viewonline list to let the admin easier spot additional search bots, connected to a_user permission (Bug #11088) - patch and suggestions provided by HoL</li>
|
||||
<li>[Change] u_viewprofile permission also affecting viewonline list now</li>
|
||||
<li>[Fix] Do not display return to search link in prosilver if search is not allowed (Bug #11393)</li>
|
||||
<li>[Fix] Use global url validation for img bbcode tag (Bug #11935)</li>
|
||||
<li>[Fix] Added proper unicode support to style names (Bug #12165)</li>
|
||||
<li>[Fix] Search result extract should not end in the middle of a multibyte character (Bug #11863)</li>
|
||||
<li>[Fix] Missing localisation for an imageset no longer triggers a lot of "imageset refreshed" log messages (Bug #12027)</li>
|
||||
<li>[Fix] Explain that themes which need parsing cannot be stored on the filesystem (Bug #11134)</li>
|
||||
<li>[Fix] Normalize usernames</li>
|
||||
<li>[Change] Improved utf8_clean_string with a more complete list of homographs and NFKC normalization</li>
|
||||
<li>[Fix] Fixed error messages that ACP Database can give (Bug #13463)</li>
|
||||
<li>[Fix] Fixed potential issues with databases that use tables names is uppercase</li>
|
||||
<li>[Fix] Handle forum links/redirects within viewforum if no read permission given (to display login box or error message) (Bug #13467)</li>
|
||||
<li>[Fix] Prevent changing postable forum having subforums to link forum without moving subforums out first</li>
|
||||
<li>[Fix] Do not display version in admin template (Bug #13495)</li>
|
||||
<li>[Fix] Allow manual specification of remote avatar dimensions if getimagesize is disabled (Bug #13531)</li>
|
||||
<li>[Fix] Make viewonline use the session page's added forum parameter (Bug #13597)</li>
|
||||
<li>[Fix] Correcting BBCode FAQ (Bug #11180)</li>
|
||||
<li>[Fix] Make to/bcc line in view private message display consistent with other username displays in prosilver (Bug #11989)</li>
|
||||
<li>[Fix] Send out activation email if admin activation is enabled and user activated through inactive users panel upon registration (Bug #12065)</li>
|
||||
<li>[Change] Re-implemented All Yes/No/Never links in permission panels for easier changing all categories at once</li>
|
||||
<li>[Change] Advanced permission link now "marked" if no role is assigned and custom permissions set. With this an admin can instantly see if the object is not set at all or having custom permissions, something you only saw if advanced permissions were viewed before.</li>
|
||||
<li>[Fix] Change misleading custom BBCodes explanation, regarding tokens and useable template variables (Bug #12403, #5660)</li>
|
||||
<li>[Feature] Ability to disable birthdays completely with new board features setting</li>
|
||||
<li>[Fix] Fix disallowed username check (Bug #13511)</li>
|
||||
<li>[Fix] Allow for unicode usernames to be pruned (Bug #13643)</li>
|
||||
<li>[Fix] Do not copy forum permissions from self (Bug #13663)</li>
|
||||
<li>[Fix] Allow for polls to work during preview (Bug #13657) - thanks to Thatbitextra</li>
|
||||
<li>[Fix] Finer error conditions for sending IM messages (Bugs #13681, #13683)</li>
|
||||
<li>[Fix] Add a confirmation for log deletion in the MCP (Bug #13693)</li>
|
||||
<li>[Fix] Do not erase ranks and avatars when changing default groups (Bugs #13701, #13697)</li>
|
||||
<li>[Fix] Limit author searches to firstpost, if selected (Bug #13579)</li>
|
||||
<li>[Fix] Properly resync user post counts for users that have no posts (Bug #13581)</li>
|
||||
<li>[Fix] Do not require space after , in smiley pak files (Bug #13647)</li>
|
||||
<li>[Fix] Properly display the subscribe link in topic and forum display for Oracle (Bug #13583)</li>
|
||||
<li>[Change] Add version number to ACP index (Bug #13703)</li>
|
||||
<li>[Fix] Several fixes for custom profile fields on multi-lingual boards (Bugs #13763, #13527, #13525, #11515)</li>
|
||||
<li>[Fix] Return to the mode previously selected after disaproving a post (Bug #13796)</li>
|
||||
<li>[Fix] Cron now uses a locking variable to make sure it does not spawn too many webserver processes (Bug #12741)</li>
|
||||
<li>[Fix] Cached stylesheet now supporting gzip compression</li>
|
||||
<li>[Fix] Added link to inbox for deleted PMs (Bug #13813)</li>
|
||||
<li>[Fix] Re-syncing the board stats also refreshes the newest user (Bug #13831)</li>
|
||||
<li>[Feature] Ability to externally set $phpbb_root_path if wrapping phpBB3 by defining constant PHPBB_ROOT_PATH</li>
|
||||
<li>[Fix] Implemented correct left/right floating within ACP in regard to RTL languages (Bug #13777)</li>
|
||||
<li>[Fix] Fixing session problems when using MySQL strict mode in conjunction with very long browser agent string (Bug #13827)</li>
|
||||
<li>[Fix] Disallow post/pm subjects entirely made up from non-printable chars and whitespaces (Bug #13800)</li>
|
||||
<li>[Fix] Allow moving private messages from the sentbox (Bug #13791)</li>
|
||||
<li>[Fix] Properly export localized imagesets</li>
|
||||
<li>[Feature] Show the size of Firebird databases</li>
|
||||
<li>[Fix] Show error when moving topic into a category via quickmod (Bug #11611)</li>
|
||||
<li>[Fix] Allow Oracle to install on a database without specify the database name</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<a name="v30rc2"></a><h3>1.vii. Changes since 3.0.RC2</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Re-allow searching within the memberlist</li>
|
||||
<li>[Fix] Force prune related values to integers during conversions</li>
|
||||
<li>[Fix] Updater now detects successfully merged files having conflicts and user chose to merge with modifications (Bug #12685)</li>
|
||||
<li>[Fix] Updater is no longer listing missing language entries and styles if these had been removed (Bug #12655)</li>
|
||||
<li>[Fix] Correct approval of posts in global announcements (Bug #12699)</li>
|
||||
<li>[Sec] Do not allow setup spiders/robots to post, even if permissions are given. We see no reason why this should be possible. (Thanks to Frank Rizzo for convincing us regarding this)</li>
|
||||
<li>[Sec] Do not display the last active column within the memberlist if u_viewonline permission is not given (Bug #12797)</li>
|
||||
<li>[Fix] Display custom profile field "date" based on users language (Bug #12787)</li>
|
||||
<li>[Fix] Allow adding of help language files within subdirectories (Bug #12783)</li>
|
||||
<li>[Fix] Correctly apply smileys on posting having # within their emotion code</li>
|
||||
<li>[Fix] Correctly convert smileys having double quotes within their emotion code (Bug #12731)</li>
|
||||
<li>[Fix] The converter now adds the protocol to user website profile fields missing it (Bug #12819)</li>
|
||||
<li>[Fix] Correctly escape banned ip/email using wildcard for ban check (Bug #12815)</li>
|
||||
<li>[Fix] Fixed some very nasty opera bugs (dropdown list bug, cpu spike bug) (Bug #12763, #11609)</li>
|
||||
<li>[Fix] Font colour list having the correct height in IE (Bug #9571)</li>
|
||||
<li>[Feature] Added mark/unmark all links to the bots page (Bug #12461)</li>
|
||||
<li>[Fix] Introduced check on duplicate usernames during bot creation/edit (Bug #12461)</li>
|
||||
<li>[Fix] Allow multibyte letters for smilie codes(Bug #12321)</li>
|
||||
<li>[Fix] Correctly chmod created cache files (Bug #12859)</li>
|
||||
<li>[Fix] Use our global expression for checking email syntax in memberlist (Bug #12827)</li>
|
||||
<li>[Fix] Correctly retrieve/refresh templates stored in database if using subdirectories within template directory (Bug #12839)</li>
|
||||
<li>[Fix] Correctly translate special group names in ucp_groups.php (Bug #12597)</li>
|
||||
<li>[Fix] Search boxes not loosing session id (changing method from get to post) (Bug #12643)</li>
|
||||
<li>[Fix] Make sure the automatic update is also working for those having fsockopen disabled</li>
|
||||
<li>[Fix] Simulate recache of theme data on automatic update finished page - recaching it if css data changed</li>
|
||||
<li>[Feature] Allow dropping in custom "info_[module class]_*.php" files to language/*/mods directory for inclusion into the menu structure without the need to modify phpBB language files for menu placements</li>
|
||||
<li>[Fix] Added login box to egosearch (Bug #12941)</li>
|
||||
<li>[Fix] Deal with slashed quotes during quote bbcode conversion (Bug #12607)</li>
|
||||
<li>[Fix] Minor language and style fixes (Bugs #12235, #12493, #11949)</li>
|
||||
<li>[Feature] Added backlinks to mcp_report (Bug #12905)</li>
|
||||
<li>[Fix] Only check usernames in guest posts upon edit (Bug #11349)</li>
|
||||
<li>[Fix] Consider viewonline permission when viewing friends/foes (Bug #12955)</li>
|
||||
<li>[Fix] Added proper unicode support to ban reasons (Bug #12947)</li>
|
||||
<li>[Fix] The forum/topic sync code now recognizes other ways that the latest post in a topic can be expressed (Bug #12947) - patch provided by APTX</li>
|
||||
<li>[Fix] Topic deletion via the user post deletion mechanism did not take into account statistics for forums that hold shadow topics (Bug #12981)</li>
|
||||
<li>[Fix] Allow for negative and decimal numbers to be in transposed queries in the Oracle and Firebird DBAL (Bug #13033)</li>
|
||||
<li>[Fix] Some jabber related bugs (Bug #12989, #11805, #11809)</li>
|
||||
<li>[Fix] Added UTF-8 support for banning via the MCP (Bug #13013)</li>
|
||||
<li>[Fix] Properly detect the script name in session::extract_current_page() if PHP_SELF is not defined (Bug #12705) - patch provided by ToonArmy</li>
|
||||
<li>[Fix] Show role mask for global permission class under Permissions->Permission Roles (Bug #13057)</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<a name="v30rc1"></a><h3>1.viii. Changes since 3.0.RC1</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] (X)HTML issues within the templates (Bug #11255, #11255)</li>
|
||||
<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 "SMILIEYS_DISABLED" 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 "easy connect naming"</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 "Delete all board cookies" 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->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 "maximum number of characters exceeded" 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>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<a name="disclaimer"></a><h2>2. Copyright and disclaimer</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
|
||||
<!-- END DOCUMENT -->
|
||||
|
||||
<div id="page-footer">
|
||||
<div class="version">Note that a full list of fixed bugs can be found at the bug tracker (<a href="README.html#bugs">see section on bug reporting</a>)</div>
|
||||
</div>
|
||||
</div></div>
|
||||
|
||||
<div>
|
||||
<a id="bottom" name="bottom" accesskey="z"></a>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -273,7 +273,7 @@
|
||||
|
||||
<p>This package is meant for those wanting to only replace changed files from a previous version to the latest version. This package normally contains the changed files from up to five previous versions.</p>
|
||||
|
||||
<p>This package contains a number of archives, each contains the files changed from a given release to the latest version. You should select the appropriate archive for your current version, e.g. if you currently have <samp>3.0.0</samp> you should select the phpBB-3.0.0_to_3.0.1.zip/tar.gz file.</p>
|
||||
<p>This package contains a number of archives, each contains the files changed from a given release to the latest version. You should select the appropriate archive for your current version, e.g. if you currently have <samp>3.0.2</samp> you should select the phpBB-3.0.2_to_3.0.3.zip/tar.gz file.</p>
|
||||
|
||||
<p>The directory structure has been preserved enabling you (if you wish) to simply upload the contents of the archive to the appropriate location on your server, i.e. simply overwrite the existing files with the new versions. Do not forget that if you have installed any MODs these files will overwrite the originals possibly destroying them in the process. You will need to re-add MODs to any affected file before uploading.</p>
|
||||
|
||||
@@ -281,11 +281,11 @@
|
||||
|
||||
<a name="update_patch"></a><h3>4.iii. Patch file</h3>
|
||||
|
||||
<p>The patch file package is for those wanting to update through the patch application, and being compfortable with it.</p>
|
||||
<p>The patch file package is for those wanting to update through the patch application, and being comfortable with it.</p>
|
||||
|
||||
<p>The patch file is one solution for those with many Modifications (MODs) or other changes who do not want to re-add them back to all the changed files if they use the method explained above. To use this you will need command line access to a standard UNIX type <strong>patch</strong> application. If you do not have access to such an application but still want to use this update approach, we strongly recommend the <a href="update_auto">Automatic update package</a> explained below. It is also the preferred update method.</p>
|
||||
<p>The patch file is one solution for those with many Modifications (MODs) or other changes who do not want to re-add them back to all the changed files if they use the method explained above. To use this you will need command line access to a standard UNIX type <strong>patch</strong> application. If you do not have access to such an application but still want to use this update approach, we strongly recommend the <a href="#update_auto">Automatic update package</a> explained below. It is also the preferred update method.</p>
|
||||
|
||||
<p>A number of patch files are provided to allow you to update from previous stable releases. Select the correct patch, e.g. if your current version is 3.0.0 you need the phpBB-3.0.0_to_3.0.1.patch file. Place the correct patch in the parent directory containing the phpBB3 core files (i.e. index.php, viewforum.php, etc.). With this done you should run the following command: <strong>patch -cl -d [PHPBB DIRECTORY] -p1 < [PATCH NAME]</strong> (where PHPBB DIRECTORY is the directory name your phpBB Installation resides in, for example phpBB3, and where PATCH NAME is the relevant filename of the selected patch file). This should complete quickly, hopefully without any HUNK FAILED comments.</p>
|
||||
<p>A number of patch files are provided to allow you to update from previous stable releases. Select the correct patch, e.g. if your current version is 3.0.2 you need the phpBB-3.0.2_to_3.0.3.patch file. Place the correct patch in the parent directory containing the phpBB3 core files (i.e. index.php, viewforum.php, etc.). With this done you should run the following command: <strong>patch -cl -d [PHPBB DIRECTORY] -p1 < [PATCH NAME]</strong> (where PHPBB DIRECTORY is the directory name your phpBB Installation resides in, for example phpBB3, and where PATCH NAME is the relevant filename of the selected patch file). This should complete quickly, hopefully without any HUNK FAILED comments.</p>
|
||||
|
||||
<p>If you do get failures you should look at using the <a href="#update_files">Changed files only</a> package to replace the files which failed to patch, please note that you will need to manually re-add any Modifications (MODs) to these particular files. Alternatively if you know how you can examine the .rej files to determine what failed where and make manual adjustments to the relevant source.</p>
|
||||
|
||||
@@ -295,7 +295,7 @@
|
||||
|
||||
<p>This update method is the preferred method for updating. This package allows detecting changed files automatically and merges changes if needed.</p>
|
||||
|
||||
<p>The automatic update package is holding - contrary to the others - only the update informations for updating the last released version to the latest available version. These package is meant for use with the automatic update tool.</p>
|
||||
<p>The automatic update package contains - contrary to the others - only the information required to update the previous release version to the latest available version. These packages are meant for use with the automatic update tool.</p>
|
||||
|
||||
<p>To perform the update, either follow the instructions from the <code>Administration Control Panel->System</code> Tab - this should point out that you are running an outdated version and will guide you through the update - or follow the instructions listed below.</p>
|
||||
|
||||
@@ -369,11 +369,11 @@
|
||||
|
||||
<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>Path to your former board</strong> The converter expects the relative path to your old board's files. So, - for instance - if the old board is located at <code>http://www.yourdomain.com/forum</code> and the phpBB3 installation is located at <code>http://www.yourdomain.com/phpBB3</code>, then the correct value would be <code>../forum</code>. Note that the webserver user must be able to access the source installation's files.</p>
|
||||
|
||||
<p><strong>Missing images</strong> If your default board language's language pack does not include all images, then some images might be missing in your installation. Always use a complete language pack as default language.</p>
|
||||
<p><strong>Missing images</strong> If your default board language's language pack does not include all images, then some images might be missing in your installation. Always use a complete language pack as default language.</p>
|
||||
|
||||
<p><strong>Smilies</strong> During the conversion you might see warnings about image files where the copying failed. That can happen if the old board's smilies have the same file names as those on the new board. Copy those files manually after the conversion, if you want to continue using the old smilies.</p>
|
||||
<p><strong>Smilies</strong> During the conversion you might see warnings about image files where the copying failed. That can happen if the old board's smilies have the same file names as those on the new board. Copy those files manually after the conversion, if you want to continue using the old smilies.</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
4
phpBB/docs/changes.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
List of major changes since 3.0.x:
|
||||
|
||||
- new stack-based bbcode system
|
||||
- Migrate phpBB to PHP versions >= 5.2
|
@@ -110,7 +110,7 @@
|
||||
<p>If entered with tabs (replace the {TAB}) both equal signs need to be on the same column.</p>
|
||||
|
||||
<h3>Linefeeds:</h3>
|
||||
<p>Ensure that your editor is saving files in the UNIX format. This means lines are terminated with a newline, not with a CR/LF combo as they are on Win32, or whatever the Mac uses. Any decent editor should be able to do this, but it might not always be the default. Know your editor. If you want advice on Windows text editors, just ask one of the developers. Some of them do their editing on Win32.</p>
|
||||
<p>Ensure that your editor is saving files in the UNIX (LF) line ending format. This means that lines are terminated with a newline, not with Windows Line endings (CR/LF combo) as they are on Win32 or Classic Mac (CR) Line endings. Any decent editor should be able to do this, but it might not always be the default setting. Know your editor. If you want advice for an editor for your Operating System, just ask one of the developers. Some of them do their editing on Win32.
|
||||
|
||||
<a name="fileheader"></a><h3>1.ii. File Header</h3>
|
||||
|
||||
@@ -188,8 +188,7 @@ class ...
|
||||
<li><code>/includes/db/firebird.php</code><br />Firebird/Interbase Database Abstraction Layer</li>
|
||||
<li><code>/includes/db/msssql.php</code><br />MSSQL Database Abstraction Layer</li>
|
||||
<li><code>/includes/db/mssql_odbc.php</code><br />MSSQL ODBC Database Abstraction Layer for MSSQL</li>
|
||||
<li><code>/includes/db/mysql.php</code><br />MySQL Database Abstraction Layer for MySQL 3.x/4.0.x</li>
|
||||
<li><code>/includes/db/mysql4.php</code><br />MySQL4 Database Abstraction Layer for MySQL 4.1.x/5.x</li>
|
||||
<li><code>/includes/db/mysql.php</code><br />MySQL Database Abstraction Layer for MySQL 3.x/4.0.x/4.1.x/5.x
|
||||
<li><code>/includes/db/mysqli.php</code><br />MySQLi Database Abstraction Layer</li>
|
||||
<li><code>/includes/db/oracle.php</code><br />Oracle Database Abstraction Layer</li>
|
||||
<li><code>/includes/db/postgres.php</code><br />PostgreSQL Database Abstraction Layer</li>
|
||||
@@ -399,12 +398,12 @@ do_stuff($str);
|
||||
|
||||
<p class="bad">// Sometimes single quotes are just not right</p>
|
||||
<div class="codebox"><pre>
|
||||
$post_url = $phpbb_root_path . 'posting.' . $phpEx . '?mode=' . $mode . '&amp;start=' . $start;
|
||||
$some_string = $board_url . 'someurl.php?mode=' . $mode . '&amp;start=' . $start;
|
||||
</pre></div>
|
||||
|
||||
<p class="good">// Double quotes are sometimes needed to not overcroud the line with concentinations</p>
|
||||
<div class="codebox"><pre>
|
||||
$post_url = "{$phpbb_root_path}posting.$phpEx?mode=$mode&amp;start=$start";
|
||||
$some_string = "{$board_url}someurl.php?mode=$mode&amp;start=$start";
|
||||
</pre></div>
|
||||
|
||||
<p>In SQL Statements mixing single and double quotes is partly allowed (following the guidelines listed here about SQL Formatting), else it should be tryed to only use one method - mostly single quotes.</p>
|
||||
@@ -518,7 +517,7 @@ switch ($mode)
|
||||
break;
|
||||
|
||||
default:
|
||||
// Always assume that the case got not catched
|
||||
// Always assume that a case was not caught
|
||||
break;
|
||||
}
|
||||
</pre></div>
|
||||
@@ -541,7 +540,7 @@ switch ($mode)
|
||||
|
||||
default:
|
||||
|
||||
// Always assume that the case got not catched
|
||||
// Always assume that a case was not caught
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -569,7 +568,7 @@ switch ($mode)
|
||||
|
||||
default:
|
||||
|
||||
// Always assume that the case got not catched
|
||||
// Always assume that a case was not caught
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -690,7 +689,29 @@ $sql = 'UPDATE ' . SOME_TABLE . '
|
||||
$db->sql_query($sql);
|
||||
</pre></div>
|
||||
|
||||
<p>The <code>$db->sql_build_array()</code> function supports the following modes: <code>INSERT</code> (example above), <code>INSERT_SELECT</code> (building query for <code>INSERT INTO table (...) SELECT value, column ...</code> statements), <code>MULTI_INSERT</code> (for returning extended inserts), <code>UPDATE</code> (example above) and <code>SELECT</code> (for building WHERE statement [AND logic]).</p>
|
||||
<p>The <code>$db->sql_build_array()</code> function supports the following modes: <code>INSERT</code> (example above), <code>INSERT_SELECT</code> (building query for <code>INSERT INTO table (...) SELECT value, column ...</code> statements), <code>UPDATE</code> (example above) and <code>SELECT</code> (for building WHERE statement [AND logic]).</p>
|
||||
|
||||
<h4>sql_multi_insert():</h4>
|
||||
|
||||
<p>If you want to insert multiple statements at once, please use the separate <code>sql_multi_insert()</code> method. An example:</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
$sql_ary = array();
|
||||
|
||||
$sql_ary[] = array(
|
||||
'somedata' => $my_string_1,
|
||||
'otherdata' => $an_int_1,
|
||||
'moredata' => $another_int_1,
|
||||
);
|
||||
|
||||
$sql_ary[] = array(
|
||||
'somedata' => $my_string_2,
|
||||
'otherdata' => $an_int_2,
|
||||
'moredata' => $another_int_2,
|
||||
);
|
||||
|
||||
$db->sql_multi_insert(SOME_TABLE, $sql_ary);
|
||||
</pre></div>
|
||||
|
||||
<h4>sql_in_set():</h4>
|
||||
|
||||
@@ -854,7 +875,7 @@ $submit = (isset($HTTP_POST_VARS['submit'])) ? true : false;
|
||||
<p class="good">// Use request var and define a default variable (use the correct type)</p>
|
||||
<div class="codebox"><pre>
|
||||
$start = request_var('start', 0);
|
||||
$submit = (isset($_POST['submit'])) ? true : false;
|
||||
$submit = request::is_set_post('submit');
|
||||
</pre></div>
|
||||
|
||||
<p class="bad">// $start is an int, the following use of request_var therefore is not allowed</p>
|
||||
@@ -925,12 +946,18 @@ trigger_error('NO_MODE', E_USER_ERROR);
|
||||
|
||||
<h4>Url formatting</h4>
|
||||
|
||||
<p>All urls pointing to internal files need to be prepended by the <code>$phpbb_root_path</code> variable. Within the administration control panel all urls pointing to internal files need to be prepended by the <code>$phpbb_admin_path</code> variable. This makes sure the path is always correct and users being able to just rename the admin folder and the acp still working as intended (though some links will fail and the code need to be slightly adjusted).</p>
|
||||
<p>All urls pointing to internal files need to be prepended by the <code>PHPBB_ROOT_PATH</code> constant. Within the administration control panel all urls pointing to internal files need to be prepended by the <code>PHPBB_ADMIN_PATH</code> constant. This makes sure the path is always correct and users being able to just rename the admin folder and the acp still working as intended (though some links will fail and the code need to be slightly adjusted).</p>
|
||||
|
||||
<p>The <code>append_sid()</code> function from 2.0.x is available too, though does not handle url alterations automatically. Please have a look at the code documentation if you want to get more details on how to use append_sid(). A sample call to append_sid() can look like this:</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;g=' . $row['group_id'])
|
||||
append_sid(PHPBB_ROOT_PATH . 'memberlist.' . PHP_EXT, 'mode=group&amp;g=' . $row['group_id'])
|
||||
</pre></div>
|
||||
|
||||
<p>For shorter writing internal urls are allowed to be written in short notation, not providing the root path and the extension. The append_sid() function will prepend the root path and append the extension automatically (and before calling the hook).</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
append_sid('memberlist', 'mode=group&amp;g=' . $row['group_id'])
|
||||
</pre></div>
|
||||
|
||||
<h4>General function usage: </h4>
|
||||
@@ -973,8 +1000,18 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
|
||||
<div class="content">
|
||||
|
||||
<h4>General things</h4>
|
||||
<a name="cfgfiles"></a><h3>3.i. Style Config Files</h3>
|
||||
<p>Style cfg files are simple name-value lists with the information necessary for installing a style. Similar cfg files exist for templates, themes and imagesets. These follow the same principle and will not be introduced individually. Styles can use installed components by using the required_theme/required_template/required_imageset entries. The important part of the style configuration file is assigning an unique name.</p>
|
||||
<div class="codebox"><pre>
|
||||
# General Information about this style
|
||||
name = prosilver_duplicate
|
||||
copyright = © phpBB Group, 2007
|
||||
version = 3.0.3
|
||||
required_template = prosilver
|
||||
required_theme = prosilver
|
||||
required_imageset = prosilver
|
||||
</pre></div>
|
||||
<a name="genstyling"></a><h3>3.2. General Styling Rules</h3>
|
||||
<p>Templates should be produced in a consistent manner. Where appropriate they should be based off an existing copy, e.g. index, viewforum or viewtopic (the combination of which implement a range of conditional and variable forms). Please also note that the intendation and coding guidelines also apply to templates where possible.</p>
|
||||
|
||||
<p>The outer table class <code>forumline</code> has gone and is replaced with <code>tablebg</code>.</p>
|
||||
@@ -1042,6 +1079,8 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;
|
||||
|
||||
<div class="content">
|
||||
|
||||
<a name="templates"></a><h3>4.i. General Templating</h3>
|
||||
|
||||
<h4>File naming</h4>
|
||||
<p>Firstly templates now take the suffix ".html" rather than ".tpl". This was done simply to make the lifes of some people easier wrt syntax highlighting, etc.</p>
|
||||
|
||||
@@ -1059,7 +1098,7 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;
|
||||
<span class="comment"><!-- END loopname --></span>
|
||||
</pre></div>
|
||||
|
||||
<p>A bit later loops will be explained further. To not irretate you we will explain conditionals as well as other statements first.</p>
|
||||
<p>A bit later loops will be explained further. To not irritate you we will explain conditionals as well as other statements first.</p>
|
||||
|
||||
<h4>Including files</h4>
|
||||
<p>Something that existed in 2.0.x which no longer exists in 3.0.x is the ability to assign a template to a variable. This was used (for example) to output the jumpbox. Instead (perhaps better, perhaps not but certainly more flexible) we now have INCLUDE. This takes the simple form:</p>
|
||||
@@ -1429,6 +1468,29 @@ div
|
||||
</fieldset>
|
||||
</form>
|
||||
</pre></div><br />
|
||||
|
||||
<a name="inheritance"></a><h3>4.ii. Template Inheritance</h3>
|
||||
<p>When basing a new template on an existing one, it is not necessary to provide all template files. By declaring the template to be "<strong>inheriting</strong>" in the template configuration file.</p>
|
||||
|
||||
<p>The limitation on this is that the base style has to be installed and complete, meaning that it is not itself inheriting.</p>
|
||||
|
||||
<p>The effect of doing so is that the template engine will use the files in the new template where they exist, but fall back to files in the base template otherwise. Declaring a style to be inheriting also causes it to use some of the configuration settings of the base style, notably database storage.</p>
|
||||
|
||||
<p>We strongly encourage the use of inheritance for styles based on the bundled styles, as it will ease the update procedure.</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
# General Information about this template
|
||||
name = inherits
|
||||
copyright = © phpBB Group, 2007
|
||||
version = 3.0.3
|
||||
|
||||
# Defining a different template bitfield
|
||||
template_bitfield = lNg=
|
||||
|
||||
# Are we inheriting?
|
||||
inherit_from = prosilver
|
||||
</pre></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
@@ -1450,7 +1512,7 @@ div
|
||||
|
||||
|
||||
<h4>What are Unicode, UCS and UTF-8?</h4>
|
||||
<p>The <a href="http://en.wikipedia.org/wiki/Universal_Character_Set">Universal Character Set (UCS)</a> described in ISO/IEC 10646 consists of a large amount of characters. Each of them has a unique name and a code point which is an integer number. <a href="http://en.wikipedia.org/wiki/Unicode">Unicode</a> - which is an industry standard - complements the Universal Character Set with further information about the characters' properties and alternative character encodings. More information on Unicode can be found on the <a href="http://www.unicode.org/">Unicode Consortium's website</a>. One of the Unicode encodings is the <a href="http://en.wikipedia.org/wiki/UTF-8">8-bit Unicode Transformation Format (UTF-8)</a>. It encodes characters with up to four bytes aiming for maximum compatability with the <a href="http://en.wikipedia.org/wiki/ASCII">American Standard Code for Information Interchange</a> which is a 7-bit encoding of a relatively small subset of the UCS.</p>
|
||||
<p>The <a href="http://en.wikipedia.org/wiki/Universal_Character_Set">Universal Character Set (UCS)</a> described in ISO/IEC 10646 consists of a large amount of characters. Each of them has a unique name and a code point which is an integer number. <a href="http://en.wikipedia.org/wiki/Unicode">Unicode</a> - which is an industry standard - complements the Universal Character Set with further information about the characters' properties and alternative character encodings. More information on Unicode can be found on the <a href="http://www.unicode.org/">Unicode Consortium's website</a>. One of the Unicode encodings is the <a href="http://en.wikipedia.org/wiki/UTF-8">8-bit Unicode Transformation Format (UTF-8)</a>. It encodes characters with up to four bytes aiming for maximum compatibility with the <a href="http://en.wikipedia.org/wiki/ASCII">American Standard Code for Information Interchange</a> which is a 7-bit encoding of a relatively small subset of the UCS.</p>
|
||||
|
||||
<h4>phpBB's use of Unicode</h4>
|
||||
<p>Unfortunately PHP does not faciliate the use of Unicode prior to version 6. Most functions simply treat strings as sequences of bytes assuming that each character takes up exactly one byte. This behaviour still allows for storing UTF-8 encoded text in PHP strings but many operations on strings have unexpected results. To circumvent this problem we have created some alternative functions to PHP's native string operations which use code points instead of bytes. These functions can be found in <code>/includes/utf/utf_tools.php</code>. They are also covered in the <a href="http://area51.phpbb.com/docs/code/">phpBB3 Sourcecode Documentation</a>. A lot of native PHP functions still work with UTF-8 as long as you stick to certain restrictions. For example <code>explode</code> still works as long as the first and the last character of the delimiter string are ASCII characters.</p>
|
||||
@@ -2195,6 +2257,13 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||
|
||||
<div class="content">
|
||||
|
||||
<h3>Revision 8596+</h3>
|
||||
|
||||
<ul>
|
||||
<li>Removed sql_build_array('MULTI_INSERT'... statements.</li>
|
||||
<li>Added sql_multi_insert() explanation.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Revision 1.31</h3>
|
||||
|
||||
<ul>
|
||||
|
@@ -14,7 +14,7 @@
|
||||
<title>phpBB3 • Hook System</title>
|
||||
|
||||
<style type="text/css">
|
||||
<!--
|
||||
/* <![CDATA[ */
|
||||
|
||||
/*
|
||||
The original "prosilver" theme for phpBB3
|
||||
@@ -309,7 +309,7 @@ a:active { color: #368AD2; }
|
||||
margin-left: 25px;
|
||||
}
|
||||
|
||||
//-->
|
||||
/* ]]> */
|
||||
</style>
|
||||
|
||||
</head>
|
||||
@@ -383,10 +383,10 @@ a:active { color: #368AD2; }
|
||||
<p>There are also valid external constants you may want to use if you embed phpBB3 into your application:</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
PHPBB_MSG_HANDLER (overwrite message handler)
|
||||
PHPBB_MSG_HANDLER (define own message handler)
|
||||
PHPBB_DB_NEW_LINK (overwrite new_link parameter for sql_connect)
|
||||
PHPBB_ROOT_PATH (overwrite $phpbb_root_path)
|
||||
PHPBB_ADMIN_PATH (overwrite $phpbb_admin_path)
|
||||
PHPBB_ROOT_PATH (define own PHPBB_ROOT_PATH)
|
||||
PHPBB_ADMIN_PATH (define own PHPBB_ADMIN_PATH)
|
||||
</pre></div>
|
||||
|
||||
</div>
|
||||
|
@@ -12,117 +12,78 @@
|
||||
* @ignore
|
||||
*/
|
||||
define('IN_PHPBB', true);
|
||||
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
if (!defined('PHPBB_ROOT_PATH')) define('PHPBB_ROOT_PATH', './../');
|
||||
if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
|
||||
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
|
||||
|
||||
if (isset($_GET['avatar']))
|
||||
|
||||
// Thank you sun.
|
||||
if (isset($_SERVER['CONTENT_TYPE']))
|
||||
{
|
||||
require($phpbb_root_path . 'config.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/cache.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/constants.' . $phpEx);
|
||||
|
||||
$db = new $sql_db();
|
||||
$cache = new cache();
|
||||
|
||||
// Connect to DB
|
||||
if (!@$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false))
|
||||
if ($_SERVER['CONTENT_TYPE'] === 'application/x-java-archive')
|
||||
{
|
||||
exit;
|
||||
}
|
||||
unset($dbpasswd);
|
||||
|
||||
}
|
||||
else if (isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], 'Java') !== false)
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (request::is_set('avatar', request::GET))
|
||||
{
|
||||
// worst-case default
|
||||
$browser = (!empty($_SERVER['HTTP_USER_AGENT'])) ? htmlspecialchars((string) $_SERVER['HTTP_USER_AGENT']) : 'msie 6.0';
|
||||
|
||||
$config = $cache->obtain_config();
|
||||
$filename = $_GET['avatar'];
|
||||
$config = cache::obtain_config();
|
||||
$filename = request::variable('avatar', '', false, request::GET);
|
||||
$avatar_group = false;
|
||||
$exit = false;
|
||||
|
||||
if ($filename[0] === 'g')
|
||||
{
|
||||
$avatar_group = true;
|
||||
$filename = substr($filename, 1);
|
||||
}
|
||||
|
||||
|
||||
// '==' is not a bug - . as the first char is as bad as no dot at all
|
||||
if (strpos($filename, '.') == false)
|
||||
{
|
||||
header('HTTP/1.0 403 forbidden');
|
||||
if (!empty($cache))
|
||||
{
|
||||
$cache->unload();
|
||||
}
|
||||
$db->sql_close();
|
||||
exit;
|
||||
$exit = true;
|
||||
}
|
||||
|
||||
if (!$exit)
|
||||
{
|
||||
$ext = substr(strrchr($filename, '.'), 1);
|
||||
$stamp = (int) substr(stristr($filename, '_'), 1);
|
||||
$filename = (int) $filename;
|
||||
$exit = set_modified_headers($stamp, $browser);
|
||||
}
|
||||
if (!$exit && !in_array($ext, array('png', 'gif', 'jpg', 'jpeg')))
|
||||
{
|
||||
// no way such an avatar could exist. They are not following the rules, stop the show.
|
||||
header("HTTP/1.0 403 Forbidden");
|
||||
$exit = true;
|
||||
}
|
||||
|
||||
$ext = substr(strrchr($filename, '.'), 1);
|
||||
$stamp = (int) substr(stristr($filename, '_'), 1);
|
||||
$filename = (int) $filename;
|
||||
|
||||
// let's see if we have to send the file at all
|
||||
$last_load = isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) ? strtotime(trim($_SERVER['HTTP_IF_MODIFIED_SINCE'])) : false;
|
||||
if (strpos(strtolower($browser), 'msie 6.0') === false)
|
||||
if (!$exit)
|
||||
{
|
||||
if ($last_load !== false && $last_load <= $stamp)
|
||||
if (!$filename)
|
||||
{
|
||||
if (@php_sapi_name() === 'CGI')
|
||||
{
|
||||
header('Status: 304 Not Modified', true, 304);
|
||||
}
|
||||
else
|
||||
{
|
||||
header('HTTP/1.0 304 Not Modified', true, 304);
|
||||
}
|
||||
// seems that we need those too ... browsers
|
||||
header('Pragma: public');
|
||||
header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 31536000));
|
||||
exit();
|
||||
}
|
||||
// no way such an avatar could exist. They are not following the rules, stop the show.
|
||||
header("HTTP/1.0 403 Forbidden");
|
||||
}
|
||||
else
|
||||
{
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $stamp) . ' GMT');
|
||||
send_avatar_to_browser(($avatar_group ? 'g' : '') . $filename . '.' . $ext, $browser);
|
||||
}
|
||||
}
|
||||
|
||||
if (!in_array($ext, array('png', 'gif', 'jpg', 'jpeg')))
|
||||
{
|
||||
// no way such an avatar could exist. They are not following the rules, stop the show.
|
||||
header("HTTP/1.0 403 forbidden");
|
||||
if (!empty($cache))
|
||||
{
|
||||
$cache->unload();
|
||||
}
|
||||
$db->sql_close();
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!$filename)
|
||||
{
|
||||
// no way such an avatar could exist. They are not following the rules, stop the show.
|
||||
header("HTTP/1.0 403 forbidden");
|
||||
if (!empty($cache))
|
||||
{
|
||||
$cache->unload();
|
||||
}
|
||||
$db->sql_close();
|
||||
exit;
|
||||
}
|
||||
|
||||
send_avatar_to_browser(($avatar_group ? 'g' : '') . $filename . '.' . $ext, $browser);
|
||||
|
||||
if (!empty($cache))
|
||||
{
|
||||
$cache->unload();
|
||||
}
|
||||
$db->sql_close();
|
||||
exit;
|
||||
file_gc();
|
||||
}
|
||||
|
||||
// implicit else: we are not in avatar mode
|
||||
include($phpbb_root_path . 'common.' . $phpEx);
|
||||
|
||||
$download_id = request_var('id', 0);
|
||||
$mode = request_var('mode', '');
|
||||
$thumbnail = request_var('t', false);
|
||||
@@ -142,7 +103,7 @@ if (!$config['allow_attachments'] && !$config['allow_pm_attach'])
|
||||
trigger_error('ATTACHMENT_FUNCTIONALITY_DISABLED');
|
||||
}
|
||||
|
||||
$sql = 'SELECT attach_id, in_message, post_msg_id, extension, is_orphan, poster_id
|
||||
$sql = 'SELECT attach_id, in_message, post_msg_id, extension, is_orphan, poster_id, filetime
|
||||
FROM ' . ATTACHMENTS_TABLE . "
|
||||
WHERE attach_id = $download_id";
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
@@ -172,7 +133,7 @@ if ($attachment['is_orphan'])
|
||||
}
|
||||
|
||||
// Obtain all extensions...
|
||||
$extensions = $cache->obtain_attach_extensions(true);
|
||||
$extensions = cache::obtain_attach_extensions(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -208,8 +169,32 @@ else
|
||||
$row['forum_id'] = false;
|
||||
if (!$auth->acl_get('u_pm_download'))
|
||||
{
|
||||
header('HTTP/1.0 403 forbidden');
|
||||
trigger_error('SORRY_AUTH_VIEW_ATTACH');
|
||||
}
|
||||
|
||||
// Check if the attachment is within the users scope...
|
||||
$sql = 'SELECT user_id, author_id
|
||||
FROM ' . PRIVMSGS_TO_TABLE . '
|
||||
WHERE msg_id = ' . $attachment['post_msg_id'];
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$allowed = false;
|
||||
while ($user_row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if ($user->data['user_id'] == $user_row['user_id'] || $user->data['user_id'] == $user_row['author_id'])
|
||||
{
|
||||
$allowed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!$allowed)
|
||||
{
|
||||
header('HTTP/1.0 403 forbidden');
|
||||
trigger_error('ERROR_NO_ATTACHMENT');
|
||||
}
|
||||
}
|
||||
|
||||
// disallowed?
|
||||
@@ -222,13 +207,14 @@ else
|
||||
|
||||
if (!download_allowed())
|
||||
{
|
||||
header('HTTP/1.0 403 forbidden');
|
||||
trigger_error($user->lang['LINKAGE_FORBIDDEN']);
|
||||
}
|
||||
|
||||
$download_mode = (int) $extensions[$attachment['extension']]['download_mode'];
|
||||
|
||||
// Fetching filename here to prevent sniffing of filename
|
||||
$sql = 'SELECT attach_id, is_orphan, in_message, post_msg_id, extension, physical_filename, real_filename, mimetype
|
||||
$sql = 'SELECT attach_id, is_orphan, in_message, post_msg_id, extension, physical_filename, real_filename, mimetype, filetime
|
||||
FROM ' . ATTACHMENTS_TABLE . "
|
||||
WHERE attach_id = $download_id";
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
@@ -266,9 +252,9 @@ else if (($display_cat == ATTACHMENT_CATEGORY_NONE || $display_cat == ATTACHMENT
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
if ($display_cat == ATTACHMENT_CATEGORY_IMAGE && $mode === 'view' && (strpos($attachment['mimetype'], 'image') === 0) && strpos(strtolower($user->browser), 'msie') !== false)
|
||||
if ($display_cat == ATTACHMENT_CATEGORY_IMAGE && $mode === 'view' && (strpos($attachment['mimetype'], 'image') === 0) && ((strpos(strtolower($user->browser), 'msie') !== false) && (strpos(strtolower($user->browser), 'msie 8.0') === false)))
|
||||
{
|
||||
wrap_img_in_html(append_sid($phpbb_root_path . 'download/file.' . $phpEx, 'id=' . $attachment['attach_id']), $attachment['real_filename']);
|
||||
wrap_img_in_html(append_sid('download/file', 'id=' . $attachment['attach_id']), $attachment['real_filename']);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -276,18 +262,18 @@ else
|
||||
if ($download_mode == PHYSICAL_LINK)
|
||||
{
|
||||
// This presenting method should no longer be used
|
||||
if (!@is_dir($phpbb_root_path . $config['upload_path']))
|
||||
if (!@is_dir(PHPBB_ROOT_PATH . $config['upload_path']))
|
||||
{
|
||||
trigger_error($user->lang['PHYSICAL_DOWNLOAD_NOT_POSSIBLE']);
|
||||
}
|
||||
|
||||
redirect($phpbb_root_path . $config['upload_path'] . '/' . $attachment['physical_filename']);
|
||||
exit;
|
||||
|
||||
redirect(PHPBB_ROOT_PATH . $config['upload_path'] . '/' . $attachment['physical_filename']);
|
||||
file_gc();
|
||||
}
|
||||
else
|
||||
{
|
||||
send_file_to_browser($attachment, $config['upload_path'], $display_cat);
|
||||
exit;
|
||||
file_gc();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -298,7 +284,7 @@ else
|
||||
*/
|
||||
function send_avatar_to_browser($file, $browser)
|
||||
{
|
||||
global $config, $phpbb_root_path;
|
||||
global $config;
|
||||
|
||||
$prefix = $config['avatar_salt'] . '_';
|
||||
$image_dir = $config['avatar_path'];
|
||||
@@ -314,7 +300,7 @@ function send_avatar_to_browser($file, $browser)
|
||||
{
|
||||
$image_dir = '';
|
||||
}
|
||||
$file_path = $phpbb_root_path . $image_dir . '/' . $prefix . $file;
|
||||
$file_path = PHPBB_ROOT_PATH . $image_dir . '/' . $prefix . $file;
|
||||
|
||||
if ((@file_exists($file_path) && @is_readable($file_path)) && !headers_sent())
|
||||
{
|
||||
@@ -323,7 +309,7 @@ function send_avatar_to_browser($file, $browser)
|
||||
$image_data = @getimagesize($file_path);
|
||||
header('Content-Type: ' . image_type_to_mime_type($image_data[2]));
|
||||
|
||||
if (strpos(strtolower($browser), 'msie') !== false)
|
||||
if (strpos(strtolower($browser), 'msie') !== false && strpos(strtolower($browser), 'msie 8.0') === false)
|
||||
{
|
||||
header('Content-Disposition: attachment; ' . header_filename($file));
|
||||
|
||||
@@ -348,7 +334,7 @@ function send_avatar_to_browser($file, $browser)
|
||||
header("Content-Length: $size");
|
||||
}
|
||||
|
||||
if (@readfile($file_path) === false)
|
||||
if (@readfile($file_path) == false)
|
||||
{
|
||||
$fp = @fopen($file_path, 'rb');
|
||||
|
||||
@@ -396,9 +382,9 @@ function wrap_img_in_html($src, $title)
|
||||
*/
|
||||
function send_file_to_browser($attachment, $upload_dir, $category)
|
||||
{
|
||||
global $user, $db, $config, $phpbb_root_path;
|
||||
global $user, $db, $config;
|
||||
|
||||
$filename = $phpbb_root_path . $upload_dir . '/' . $attachment['physical_filename'];
|
||||
$filename = PHPBB_ROOT_PATH . $upload_dir . '/' . $attachment['physical_filename'];
|
||||
|
||||
if (!@file_exists($filename))
|
||||
{
|
||||
@@ -453,9 +439,10 @@ function send_file_to_browser($attachment, $upload_dir, $category)
|
||||
*/
|
||||
|
||||
// Send out the Headers. Do not set Content-Disposition to inline please, it is a security measure for users using the Internet Explorer.
|
||||
header('Content-Type: ' . $attachment['mimetype']);
|
||||
$is_ie8 = (strpos(strtolower($user->browser), 'msie 8.0') !== false);
|
||||
header('Content-Type: ' . $attachment['mimetype'] . (($is_ie8) ? '; authoritative=true;' : ''));
|
||||
|
||||
if (empty($user->browser) || (strpos(strtolower($user->browser), 'msie') !== false))
|
||||
if (empty($user->browser) || (!$is_ie8 && (strpos(strtolower($user->browser), 'msie') !== false)))
|
||||
{
|
||||
header('Content-Disposition: attachment; ' . header_filename(htmlspecialchars_decode($attachment['real_filename'])));
|
||||
if (empty($user->browser) || (strpos(strtolower($user->browser), 'msie 6.0') !== false))
|
||||
@@ -466,33 +453,43 @@ function send_file_to_browser($attachment, $upload_dir, $category)
|
||||
else
|
||||
{
|
||||
header('Content-Disposition: ' . ((strpos($attachment['mimetype'], 'image') === 0) ? 'inline' : 'attachment') . '; ' . header_filename(htmlspecialchars_decode($attachment['real_filename'])));
|
||||
if ($is_ie8 && (strpos($attachment['mimetype'], 'image') !== 0))
|
||||
{
|
||||
header('X-Download-Options: noopen');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($size)
|
||||
{
|
||||
header("Content-Length: $size");
|
||||
}
|
||||
|
||||
// Try to deliver in chunks
|
||||
@set_time_limit(0);
|
||||
// Close the db connection before sending the file
|
||||
$db->sql_close();
|
||||
|
||||
$fp = @fopen($filename, 'rb');
|
||||
|
||||
if ($fp !== false)
|
||||
if (!set_modified_headers($attachment['filetime'], $user->browser))
|
||||
{
|
||||
while (!feof($fp))
|
||||
// Try to deliver in chunks
|
||||
@set_time_limit(0);
|
||||
|
||||
$fp = @fopen($filename, 'rb');
|
||||
|
||||
if ($fp !== false)
|
||||
{
|
||||
echo fread($fp, 8192);
|
||||
while (!feof($fp))
|
||||
{
|
||||
echo fread($fp, 8192);
|
||||
}
|
||||
fclose($fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
@readfile($filename);
|
||||
}
|
||||
fclose($fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
@readfile($filename);
|
||||
}
|
||||
|
||||
flush();
|
||||
exit;
|
||||
flush();
|
||||
}
|
||||
file_gc();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -556,9 +553,9 @@ function download_allowed()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Check for own server...
|
||||
$server_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME');
|
||||
$server_name = $user->host;
|
||||
|
||||
// Forcing server vars is the only way to specify/override the protocol
|
||||
if ($config['force_server_vars'] || !$server_name)
|
||||
@@ -570,7 +567,7 @@ function download_allowed()
|
||||
{
|
||||
$allowed = true;
|
||||
}
|
||||
|
||||
|
||||
// Get IP's and Hostnames
|
||||
if (!$allowed)
|
||||
{
|
||||
@@ -620,8 +617,52 @@ function download_allowed()
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
|
||||
return $allowed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the browser has the file already and set the appropriate headers-
|
||||
* @returns false if a resend is in order.
|
||||
*/
|
||||
function set_modified_headers($stamp, $browser)
|
||||
{
|
||||
// let's see if we have to send the file at all
|
||||
$last_load = isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) ? strtotime(trim($_SERVER['HTTP_IF_MODIFIED_SINCE'])) : false;
|
||||
if ((strpos(strtolower($browser), 'msie 6.0') === false) && (strpos(strtolower($browser), 'msie 8.0') === false))
|
||||
{
|
||||
if ($last_load !== false && $last_load <= $stamp)
|
||||
{
|
||||
if (@php_sapi_name() === 'CGI')
|
||||
{
|
||||
header('Status: 304 Not Modified', true, 304);
|
||||
}
|
||||
else
|
||||
{
|
||||
header('HTTP/1.0 304 Not Modified', true, 304);
|
||||
}
|
||||
// seems that we need those too ... browsers
|
||||
header('Pragma: public');
|
||||
header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 31536000));
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $stamp) . ' GMT');
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function file_gc()
|
||||
{
|
||||
global $cache, $db;
|
||||
if (!empty($cache))
|
||||
{
|
||||
$cache->unload();
|
||||
}
|
||||
$db->sql_close();
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
0
phpBB/download/index.htm
Executable file → Normal file
@@ -12,9 +12,9 @@
|
||||
* @ignore
|
||||
*/
|
||||
define('IN_PHPBB', true);
|
||||
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
include($phpbb_root_path . 'common.' . $phpEx);
|
||||
if (!defined('PHPBB_ROOT_PATH')) define('PHPBB_ROOT_PATH', './');
|
||||
if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
|
||||
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
|
||||
|
||||
// Start session management
|
||||
$user->session_begin();
|
||||
@@ -67,7 +67,7 @@ page_header($l_title);
|
||||
$template->set_filenames(array(
|
||||
'body' => 'faq_body.html')
|
||||
);
|
||||
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
|
||||
make_jumpbox(append_sid('viewforum'));
|
||||
|
||||
page_footer();
|
||||
|
||||
|
0
phpBB/images/avatars/upload/.htaccess
Executable file → Normal file
Before Width: | Height: | Size: 170 B After Width: | Height: | Size: 407 B |
Before Width: | Height: | Size: 172 B After Width: | Height: | Size: 408 B |
Before Width: | Height: | Size: 498 B After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 413 B After Width: | Height: | Size: 627 B |
Before Width: | Height: | Size: 410 B After Width: | Height: | Size: 628 B |
Before Width: | Height: | Size: 410 B After Width: | Height: | Size: 623 B |
Before Width: | Height: | Size: 420 B After Width: | Height: | Size: 628 B |
Before Width: | Height: | Size: 416 B After Width: | Height: | Size: 630 B |
Before Width: | Height: | Size: 427 B After Width: | Height: | Size: 415 B |
Before Width: | Height: | Size: 422 B After Width: | Height: | Size: 631 B |
Before Width: | Height: | Size: 413 B After Width: | Height: | Size: 630 B |
Before Width: | Height: | Size: 170 B After Width: | Height: | Size: 619 B |
Before Width: | Height: | Size: 236 B After Width: | Height: | Size: 648 B |
Before Width: | Height: | Size: 236 B After Width: | Height: | Size: 632 B |
Before Width: | Height: | Size: 176 B After Width: | Height: | Size: 411 B |
Before Width: | Height: | Size: 336 B After Width: | Height: | Size: 707 B |
Before Width: | Height: | Size: 174 B After Width: | Height: | Size: 646 B |
Before Width: | Height: | Size: 349 B After Width: | Height: | Size: 608 B |
Before Width: | Height: | Size: 171 B After Width: | Height: | Size: 621 B |