mirror of
https://github.com/phpbb/phpbb.git
synced 2025-09-10 08:10:44 +02:00
Compare commits
295 Commits
release-3.
...
release-3.
Author | SHA1 | Date | |
---|---|---|---|
|
f7a28642fe | ||
|
872ad322ec | ||
|
a6f2f7e9a9 | ||
|
c089fe8e39 | ||
|
cb2d1bd4fc | ||
|
33de245e64 | ||
|
1d098379d9 | ||
|
df3ac64083 | ||
|
9e389e8a5b | ||
|
df24e4feaf | ||
|
27fa1a69e8 | ||
|
f9a01af732 | ||
|
82219d51c2 | ||
|
4c2421dc1e | ||
|
775f8981f8 | ||
|
3a48b03547 | ||
|
d3459b3f49 | ||
|
63e07777cd | ||
|
bffd7eb6a7 | ||
|
4f439593ce | ||
|
87bc1c6760 | ||
|
9aa4a822ef | ||
|
aa2d9e6765 | ||
|
d7f4922993 | ||
|
a63ceb28e2 | ||
|
fff87d544d | ||
|
5ae48dd873 | ||
|
19da9ac065 | ||
|
dccd529498 | ||
|
b68d23347a | ||
|
0ddc370386 | ||
|
6a9e5ea78f | ||
|
8682f644e5 | ||
|
f631d62508 | ||
|
4a17abbcc4 | ||
|
dec3e2f728 | ||
|
20301d6b9f | ||
|
f68f33780d | ||
|
9487673f9c | ||
|
926d0f980e | ||
|
edd57359c8 | ||
|
2906a24122 | ||
|
c0cd713f4c | ||
|
6e31ce8573 | ||
|
81e62b4da8 | ||
|
8fa06090c4 | ||
|
62d7e3c634 | ||
|
5df687f820 | ||
|
283ad368eb | ||
|
8a9c7c92be | ||
|
3e224cf856 | ||
|
ac27e1961a | ||
|
345de34ac1 | ||
|
b4c87cc504 | ||
|
b4d6b1e980 | ||
|
a314b2807f | ||
|
ff1aa876b5 | ||
|
870921c872 | ||
|
5306a586b1 | ||
|
bdd81806f2 | ||
|
fe98d43bb5 | ||
|
4eda4855ef | ||
|
7a1b507fa6 | ||
|
c5e01c9508 | ||
|
60e68b1b58 | ||
|
fb96fcd90a | ||
|
92e7b1e3df | ||
|
7d6718630b | ||
|
71366a2ad2 | ||
|
c496d2561e | ||
|
b44288e0cf | ||
|
04ce664604 | ||
|
f98ca7ce48 | ||
|
77af6caed7 | ||
|
ff0b94f238 | ||
|
f40418296a | ||
|
ad14664a3a | ||
|
cb389894e9 | ||
|
6924580e7d | ||
|
53a51744c0 | ||
|
e2deb29d59 | ||
|
bdf60ab2c1 | ||
|
5cce7d0bae | ||
|
af6c5dd41d | ||
|
2fd7cd661b | ||
|
0480a4e91e | ||
|
f9692abe92 | ||
|
b9ef9b8786 | ||
|
1d0197a3dd | ||
|
f7575b3a0c | ||
|
f7f3471e3f | ||
|
b4d8a0e538 | ||
|
ef2cd7b6c9 | ||
|
9532ba3c3d | ||
|
1f59edf140 | ||
|
f8178778f8 | ||
|
9dde6d8583 | ||
|
0139246ccb | ||
|
0f5856ce5b | ||
|
7462724a24 | ||
|
35dc866cf5 | ||
|
085f89e1c1 | ||
|
aa14d12abb | ||
|
2be2a2eb63 | ||
|
f4aa5b7ac7 | ||
|
e5c228d564 | ||
|
fffe436914 | ||
|
4a80b883ab | ||
|
9dc5c9271a | ||
|
a16c624d26 | ||
|
771774f09a | ||
|
a096b3d981 | ||
|
267692ad5c | ||
|
5c3788b9c0 | ||
|
ac94d2dea3 | ||
|
4729046bf4 | ||
|
d67d6ed26a | ||
|
33fde908ee | ||
|
5537c3c736 | ||
|
665359e929 | ||
|
ab4f3157ac | ||
|
ad7e3ccf4c | ||
|
d7261a5425 | ||
|
f94b24bc62 | ||
|
faf95e858f | ||
|
f601599e63 | ||
|
dd02aed6e1 | ||
|
38d0f0f2d9 | ||
|
409dfe5256 | ||
|
035fe74264 | ||
|
749fe6f9d0 | ||
|
a7ecefd89d | ||
|
736f26dea1 | ||
|
9ad40c8821 | ||
|
04945c5432 | ||
|
ce07fd5086 | ||
|
54c97ee608 | ||
|
a4cee51de5 | ||
|
42c5be5dac | ||
|
cc43a90996 | ||
|
d0c596a5ea | ||
|
bc0cc313df | ||
|
ba1d50559f | ||
|
1261e21eac | ||
|
64898803af | ||
|
d7e8e4d9cb | ||
|
757afe0b76 | ||
|
773f3727de | ||
|
2f0d9f7d3d | ||
|
183045072f | ||
|
d64516057f | ||
|
7ac774432e | ||
|
28c33de6d9 | ||
|
7d406a36cd | ||
|
2eb337ba41 | ||
|
9d436a33f6 | ||
|
437c66e8c8 | ||
|
4e49152529 | ||
|
69c07b8330 | ||
|
6cc60ee8c2 | ||
|
d5c16e4c8f | ||
|
4168104fcc | ||
|
792a1ea3a7 | ||
|
e94224ecc7 | ||
|
2ac753b725 | ||
|
c3e65a957b | ||
|
1f2f658920 | ||
|
4dae08997a | ||
|
67a9a7b074 | ||
|
9fc3a40c5e | ||
|
d096696ef2 | ||
|
321ec3644e | ||
|
85977941b3 | ||
|
d779e1267d | ||
|
b6f9a1a6e8 | ||
|
07c990302c | ||
|
5bdb6b733c | ||
|
f593ae1f35 | ||
|
d7a6e63a9a | ||
|
44b9dfaff5 | ||
|
f150bb8281 | ||
|
c9b343b2c8 | ||
|
8362c3b6b7 | ||
|
e2fe61b7df | ||
|
d3cd9ce01e | ||
|
afa8dcb42a | ||
|
c207c530b7 | ||
|
9189b8203a | ||
|
b63cad6b89 | ||
|
3f35de4c63 | ||
|
56cc34602b | ||
|
b577dece44 | ||
|
aec3c26894 | ||
|
3665540ffb | ||
|
25545c06b2 | ||
|
aedff9c97a | ||
|
5a2eb175bb | ||
|
9d5ac32d8e | ||
|
ccc774412e | ||
|
57f71690e3 | ||
|
0fbea43f4b | ||
|
b5dcc21280 | ||
|
db46647c9e | ||
|
fe6958d54f | ||
|
a5c9a2f36e | ||
|
57ddd53d59 | ||
|
1de328e2fe | ||
|
cf9e42ffd8 | ||
|
edc475b83f | ||
|
85f062c7d9 | ||
|
313648f07b | ||
|
5a8fb00ff9 | ||
|
40bc220a41 | ||
|
00859fa47c | ||
|
02235a87cd | ||
|
4f0db631d9 | ||
|
f864e75174 | ||
|
2d83f5be70 | ||
|
a019b15746 | ||
|
efc1f8139b | ||
|
10bc773979 | ||
|
f5cbd9ea0e | ||
|
4701b446f5 | ||
|
c80f98ea10 | ||
|
72c4b694cf | ||
|
926ce5abaa | ||
|
6ad759539a | ||
|
2ef4f51b4c | ||
|
f59a9221e9 | ||
|
e4d1addc2c | ||
|
46112228c0 | ||
|
978f707fd1 | ||
|
a0d7f6ebc4 | ||
|
1f5e93eab2 | ||
|
c693127b18 | ||
|
a691f4c8bc | ||
|
b39f618001 | ||
|
0382b08fe2 | ||
|
b35b4063f4 | ||
|
91721d67fa | ||
|
f0ef35ce6e | ||
|
9c7109d59e | ||
|
b8cac00366 | ||
|
7d4a25e73f | ||
|
b5c4dc3284 | ||
|
5553cfc2ed | ||
|
c2832affae | ||
|
c02f276c5f | ||
|
cdeca65aec | ||
|
2258d85623 | ||
|
3d3e673396 | ||
|
401ee9ce59 | ||
|
110f81684e | ||
|
87e717ae87 | ||
|
df5fa06035 | ||
|
d53f9a22d6 | ||
|
44719bd041 | ||
|
b23f6c90ba | ||
|
56c8e34145 | ||
|
6ca7b21dc9 | ||
|
6d1c40f6e6 | ||
|
d7d810a586 | ||
|
b850fc4fbe | ||
|
131ba8c2ba | ||
|
4e8e766ed6 | ||
|
30f3ba83e3 | ||
|
ba73a77f30 | ||
|
98bde3441e | ||
|
cdc780b798 | ||
|
69746fe683 | ||
|
2a0a16bca3 | ||
|
cc0eadb67f | ||
|
08437d1538 | ||
|
ae88f95808 | ||
|
d94da30c5d | ||
|
9ccd209930 | ||
|
457a195797 | ||
|
aef6352a35 | ||
|
d5fe2e7db7 | ||
|
e9c1c03ca6 | ||
|
8525e97c28 | ||
|
53965f0085 | ||
|
a53c9abf7e | ||
|
8661541d0d | ||
|
8bae495874 | ||
|
485576395c | ||
|
3850de87fc | ||
|
80bc2d8dc9 | ||
|
d47c61bbb3 | ||
|
d657c05ed5 | ||
|
823cbdc2d9 | ||
|
5e22b11be1 | ||
|
19b417cee9 | ||
|
4208ed9c57 | ||
|
eb7ac464cf |
408
build/build_diff.php
Executable file
408
build/build_diff.php
Executable file
@@ -0,0 +1,408 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package build
|
||||
* @version $Id$
|
||||
* @copyright (c) 2010 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
// CONFIG - Begin
|
||||
$substitute_old = '3.0.6';
|
||||
$substitute_new = '3.0.7';
|
||||
$simple_name_old = 'phpbb306';
|
||||
$simple_name_new = 'phpbb307';
|
||||
$echo_changes = false;
|
||||
// Set this to true to just compress the changes and do not build them again
|
||||
// This should be used for building custom modified txt file. ;)
|
||||
$package_changed_files = false;
|
||||
// CONFIG - End
|
||||
|
||||
//$debug_file = 'includes/functions_user.php'; //'styles/prosilver/style.cfg';
|
||||
$debug_file = false;
|
||||
|
||||
if ($debug_file !== false)
|
||||
{
|
||||
$echo_changes = false;
|
||||
}
|
||||
|
||||
$s_name = 'save_' . $substitute_old . '_to_' . $substitute_new;
|
||||
|
||||
$location = dirname(__FILE__);
|
||||
|
||||
if (!$package_changed_files)
|
||||
{
|
||||
if (!$echo_changes)
|
||||
{
|
||||
// Cleanup...
|
||||
run_command("rm -R $location/save/*");
|
||||
|
||||
// Create directory...
|
||||
run_command("mkdir $location/save/{$s_name}");
|
||||
run_command("mkdir $location/save/{$s_name}/language");
|
||||
run_command("mkdir $location/save/{$s_name}/prosilver");
|
||||
run_command("mkdir $location/save/{$s_name}/subsilver2");
|
||||
}
|
||||
}
|
||||
|
||||
// Build code changes and place them into 'save'
|
||||
if (!$package_changed_files)
|
||||
{
|
||||
build_code_changes('language');
|
||||
build_code_changes('prosilver');
|
||||
build_code_changes('subsilver2');
|
||||
}
|
||||
|
||||
// Package code changes
|
||||
$code_changes_filename = 'phpBB-' . $substitute_old . '_to_' . $substitute_new . '-codechanges';
|
||||
|
||||
if (!$echo_changes)
|
||||
{
|
||||
// Now compress the files...
|
||||
// Build Main phpBB Release
|
||||
$compress_programs = array(
|
||||
// 'tar.gz' => 'tar -czf',
|
||||
'tar.bz2' => 'tar -cjf',
|
||||
'zip' => 'zip -r'
|
||||
);
|
||||
|
||||
chdir($location . '/save/' . $s_name);
|
||||
foreach ($compress_programs as $extension => $compress_command)
|
||||
{
|
||||
echo "Packaging code changes for $extension\n";
|
||||
run_command("rm ./../../release_files/{$code_changes_filename}.{$extension}");
|
||||
flush();
|
||||
|
||||
// Build Package
|
||||
run_command("$compress_command ./../../release_files/{$code_changes_filename}.{$extension} *");
|
||||
|
||||
// Build MD5 Sum
|
||||
run_command("md5sum ./../../release_files/{$code_changes_filename}.{$extension} > ./../../release_files/{$code_changes_filename}.{$extension}.md5");
|
||||
flush();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* $output_format can be: language, prosilver and subsilver2
|
||||
*/
|
||||
function build_code_changes($output_format)
|
||||
{
|
||||
global $substitute_new, $substitute_old, $simple_name_old, $simple_name_new, $echo_changes, $package_changed_files, $location, $debug_file, $s_name;
|
||||
|
||||
// Global array holding the data entries
|
||||
$data = array(
|
||||
'header' => array(),
|
||||
'diff' => array(),
|
||||
);
|
||||
|
||||
// Read diff file and prepare the output filedata...
|
||||
//$patch_filename = '../new_version/patches/phpBB-' . $substitute_old . '_to_' . $substitute_new . '.patch';
|
||||
$release_filename = 'phpbb-' . $substitute_old . '_to_' . $substitute_new . '_' . $output_format . '.txt';
|
||||
|
||||
if (!$package_changed_files)
|
||||
{
|
||||
if (!$echo_changes)
|
||||
{
|
||||
$fp = fopen('save/' . $s_name . '/' . $output_format . '/' . $release_filename, 'wb');
|
||||
|
||||
if (!$fp)
|
||||
{
|
||||
die('Unable to create ' . $release_filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
include_once($location . '/build_helper.php');
|
||||
$package = new build_package(array($substitute_old, $substitute_new), false);
|
||||
|
||||
$titles = array(
|
||||
'language' => 'phpBB ' . $substitute_old . ' to phpBB ' . $substitute_new . ' Language Pack Changes',
|
||||
'prosilver' => 'phpBB ' . $substitute_old . ' to phpBB ' . $substitute_new . ' prosilver Changes',
|
||||
'subsilver2' => 'phpBB ' . $substitute_old . ' to phpBB ' . $substitute_new . ' subsilver2 Changes',
|
||||
);
|
||||
|
||||
$data['header'] = array(
|
||||
'title' => $titles[$output_format],
|
||||
'intro' => '
|
||||
|
||||
These are the ' . $titles[$output_format] . ' summed up into a little Mod. These changes are only partial and do not include any code changes, therefore not meant for updating phpBB.
|
||||
|
||||
',
|
||||
'included_files' => array(),
|
||||
);
|
||||
|
||||
// We collect the files we want to diff first (ironically we grab this from a diff file)
|
||||
if (!$echo_changes)
|
||||
{
|
||||
echo "\n\nCollecting Filenames:";
|
||||
}
|
||||
|
||||
// We re-create the patch file
|
||||
foreach ($package->old_packages as $_package_name => $dest_package_filename)
|
||||
{
|
||||
chdir($package->locations['old_versions']);
|
||||
|
||||
if (!$echo_changes)
|
||||
{
|
||||
echo "\n\n" . 'Creating patch/diff files for phpBB-' . $dest_package_filename . $package->get('new_version_number');
|
||||
}
|
||||
|
||||
$dest_package_filename = $location . '/save/' . $s_name . '/phpBB-' . $dest_package_filename . $package->get('new_version_number') . '.patch';
|
||||
$package->run_command('diff ' . $package->diff_options . ' ' . $_package_name . ' ' . $package->get('simple_name') . ' > ' . $dest_package_filename);
|
||||
|
||||
// Parse this diff to determine file changes from the checked versions and save them
|
||||
$result = $package->collect_diff_files($dest_package_filename, $_package_name);
|
||||
$package->run_command('rm ' . $dest_package_filename);
|
||||
}
|
||||
|
||||
chdir($location);
|
||||
|
||||
$filenames = array();
|
||||
foreach ($result['files'] as $filename)
|
||||
{
|
||||
if ($debug_file !== false && $filename != $debug_file)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Decide which files to compare...
|
||||
switch ($output_format)
|
||||
{
|
||||
case 'language':
|
||||
if (strpos($filename, 'language/en/') !== 0)
|
||||
{
|
||||
continue 2;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'prosilver':
|
||||
if (strpos($filename, 'styles/prosilver/') !== 0)
|
||||
{
|
||||
continue 2;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'subsilver2':
|
||||
if (strpos($filename, 'styles/subsilver2/') !== 0)
|
||||
{
|
||||
continue 2;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (!file_exists($location . '/old_versions/' . $simple_name_old . '/' . $filename))
|
||||
{
|
||||
// New file... include it
|
||||
$data['header']['included_files'][] = array(
|
||||
'old' => $location . '/old_versions/' . $simple_name_old . '/' . $filename,
|
||||
'new' => $location . '/old_versions/' . $simple_name_new . '/' . $filename,
|
||||
'phpbb_filename' => $filename,
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
$filenames[] = array(
|
||||
'old' => $location . '/old_versions/' . $simple_name_old . '/' . $filename,
|
||||
'new' => $location . '/old_versions/' . $simple_name_new . '/' . $filename,
|
||||
'phpbb_filename' => $filename,
|
||||
);
|
||||
}
|
||||
|
||||
// Now let us go through the filenames list and create a more comprehensive diff
|
||||
if (!$echo_changes)
|
||||
{
|
||||
fwrite($fp, build_header($output_format, $filenames, $data['header']));
|
||||
}
|
||||
else
|
||||
{
|
||||
//echo build_header('text', $filenames, $data['header']);
|
||||
}
|
||||
|
||||
// Copy files...
|
||||
$files_to_copy = array();
|
||||
|
||||
foreach ($data['header']['included_files'] as $filename)
|
||||
{
|
||||
$files_to_copy[] = $filename['phpbb_filename'];
|
||||
}
|
||||
|
||||
// First step is to copy the new version over (clean structure)
|
||||
if (!$echo_changes && sizeof($files_to_copy))
|
||||
{
|
||||
foreach ($files_to_copy as $file)
|
||||
{
|
||||
// Create directory?
|
||||
$dirname = dirname($file);
|
||||
|
||||
if ($dirname)
|
||||
{
|
||||
$dirname = explode('/', $dirname);
|
||||
$__dir = array();
|
||||
|
||||
foreach ($dirname as $i => $dir)
|
||||
{
|
||||
$__dir[] = $dir;
|
||||
run_command("mkdir -p $location/save/" . $s_name . '/' . $output_format . '/' . implode('/', $__dir));
|
||||
}
|
||||
}
|
||||
|
||||
$source_file = $location . '/new_version/phpBB3/' . $file;
|
||||
$dest_file = $location . '/save/' . $s_name . '/' . $output_format . '/';
|
||||
$dest_file .= $file;
|
||||
|
||||
$command = "cp -p $source_file $dest_file";
|
||||
$result = trim(`$command`);
|
||||
echo "- Copied File: " . $source_file . " -> " . $dest_file . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
include_once('diff_class.php');
|
||||
|
||||
if (!$echo_changes)
|
||||
{
|
||||
echo "\n\nDiffing Codebases:";
|
||||
}
|
||||
|
||||
foreach ($filenames as $file_ary)
|
||||
{
|
||||
if (!file_exists($file_ary['old']))
|
||||
{
|
||||
$lines1 = array();
|
||||
}
|
||||
else
|
||||
{
|
||||
$lines1 = file($file_ary['old']);
|
||||
}
|
||||
$lines2 = file($file_ary['new']);
|
||||
|
||||
if (!sizeof($lines1))
|
||||
{
|
||||
// New File
|
||||
}
|
||||
else
|
||||
{
|
||||
$diff = new Diff($lines1, $lines2);
|
||||
$fmt = new BBCodeDiffFormatter(false, 5, $debug_file);
|
||||
|
||||
if (!$echo_changes)
|
||||
{
|
||||
fwrite($fp, $fmt->format_open($file_ary['phpbb_filename']));
|
||||
fwrite($fp, $fmt->format($diff, $lines1));
|
||||
fwrite($fp, $fmt->format_close($file_ary['phpbb_filename']));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $fmt->format_open($file_ary['phpbb_filename']);
|
||||
echo $fmt->format($diff, $lines1);
|
||||
echo $fmt->format_close($file_ary['phpbb_filename']);
|
||||
}
|
||||
|
||||
if ($debug_file !== false)
|
||||
{
|
||||
echo $fmt->format_open($file_ary['phpbb_filename']);
|
||||
echo $fmt->format($diff, $lines1);
|
||||
echo $fmt->format_close($file_ary['phpbb_filename']);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$echo_changes)
|
||||
{
|
||||
fwrite($fp, build_footer($output_format));
|
||||
|
||||
// Close file
|
||||
fclose($fp);
|
||||
|
||||
chmod('save/' . $s_name . '/' . $output_format . '/' . $release_filename, 0666);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo build_footer($output_format);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Build Footer
|
||||
*/
|
||||
function build_footer($mode)
|
||||
{
|
||||
$html = '';
|
||||
|
||||
$html .= "# \n";
|
||||
$html .= "#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ \n";
|
||||
$html .= "# \n";
|
||||
$html .= "# EoM";
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build Header
|
||||
*/
|
||||
function build_header($mode, $filenames, $header)
|
||||
{
|
||||
global $substitute_old;
|
||||
|
||||
$html = '';
|
||||
|
||||
$html .= "############################################################## \n";
|
||||
$html .= "## Title: " . $header['title'] . "\n";
|
||||
$html .= "## Author: naderman < naderman@phpbb.com > (Nils Adermann) http://www.phpbb.com \n";
|
||||
$html .= "## Description: \n";
|
||||
|
||||
$intr = explode("\n", $header['intro']);
|
||||
$introduction = '';
|
||||
foreach ($intr as $_line)
|
||||
{
|
||||
$introduction .= wordwrap($_line, 80) . "\n";
|
||||
}
|
||||
$intr = explode("\n", $introduction);
|
||||
|
||||
foreach ($intr as $_line)
|
||||
{
|
||||
$html .= "## " . $_line . "\n";
|
||||
}
|
||||
$html .= "## \n";
|
||||
$html .= "## Files To Edit: \n";
|
||||
|
||||
foreach ($filenames as $file_ary)
|
||||
{
|
||||
$html .= "## " . $file_ary['phpbb_filename'] . "\n";
|
||||
}
|
||||
$html .= "##\n";
|
||||
if (sizeof($header['included_files']))
|
||||
{
|
||||
$html .= "## Included Files: \n";
|
||||
foreach ($header['included_files'] as $filename)
|
||||
{
|
||||
$html .= "## {$filename['phpbb_filename']}\n";
|
||||
}
|
||||
}
|
||||
$html .= "## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 \n";
|
||||
$html .= "############################################################## \n";
|
||||
$html .= "\n";
|
||||
|
||||
// COPY Statement?
|
||||
if (sizeof($header['included_files']))
|
||||
{
|
||||
$html .= "#\n#-----[ COPY ]------------------------------------------\n#\n";
|
||||
foreach ($header['included_files'] as $filename)
|
||||
{
|
||||
$html .= "copy {$filename['phpbb_filename']} to {$filename['phpbb_filename']}\n";
|
||||
}
|
||||
$html .= "\n";
|
||||
}
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
function run_command($command)
|
||||
{
|
||||
$result = trim(`$command`);
|
||||
echo "\n- Command Run: " . $command . "\n";
|
||||
}
|
||||
|
||||
?>
|
485
build/build_helper.php
Normal file
485
build/build_helper.php
Normal file
@@ -0,0 +1,485 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package build
|
||||
* @version $Id$
|
||||
* @copyright (c) 2010 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
class build_package
|
||||
{
|
||||
var $package_infos;
|
||||
var $old_packages;
|
||||
var $versions;
|
||||
var $locations;
|
||||
var $clean_directory_structure;
|
||||
var $files_to_copy;
|
||||
var $files_to_remove;
|
||||
var $remove_from_diff_structure;
|
||||
|
||||
// -c - context diff
|
||||
// -r - compare recursive
|
||||
// -N - Treat missing files as empty
|
||||
// -E - Ignore tab expansions
|
||||
// not used: -b - Ignore space changes.
|
||||
// -w - Ignore all whitespace
|
||||
// -B - Ignore blank lines
|
||||
// -d - Try to find smaller set of changes
|
||||
var $diff_options = '-crNEBwd';
|
||||
var $diff_options_long = '-x images -crNEB'; // -x fonts -x imageset //imageset not used here, because it includes the imageset.cfg file. ;)
|
||||
|
||||
var $verbose = false;
|
||||
var $status_begun = false;
|
||||
var $num_dots = 0;
|
||||
|
||||
function build_package($versions, $verbose = false)
|
||||
{
|
||||
$this->versions = $versions;
|
||||
$this->verbose = $verbose;
|
||||
|
||||
// Get last two entries
|
||||
$_latest = $this->versions[sizeof($this->versions) - 1];
|
||||
$_before = $this->versions[sizeof($this->versions) - 2];
|
||||
|
||||
$this->locations = array(
|
||||
'new_version' => dirname(dirname(__FILE__)) . '/phpBB/',
|
||||
'old_versions' => dirname(__FILE__) . '/old_versions/',
|
||||
'root' => dirname(__FILE__) . '/',
|
||||
'package_dir' => dirname(__FILE__) . '/new_version/'
|
||||
);
|
||||
|
||||
$this->package_infos = array(
|
||||
'package_name' => 'phpBB3',
|
||||
'name_prefix' => 'phpbb',
|
||||
'simple_name' => 'phpbb' . str_replace('.', '', $_latest),
|
||||
'new_version_number' => $_latest,
|
||||
'short_version_number' => str_replace('.', '', $_latest),
|
||||
'release_filename' => 'phpBB-' . $_latest,
|
||||
'last_version' => 'phpbb' . str_replace('.', '', $_before),
|
||||
'last_version_number' => $_before,
|
||||
);
|
||||
|
||||
$this->package_infos['dest_dir'] = $this->locations['package_dir'] . $this->package_infos['package_name'];
|
||||
$this->package_infos['diff_dir'] = $this->locations['old_versions'] . $this->package_infos['simple_name'];
|
||||
$this->package_infos['patch_directory'] = $this->locations['package_dir'] . 'patches';
|
||||
$this->package_infos['files_directory'] = $this->locations['package_dir'] . 'files';
|
||||
$this->package_infos['update_directory'] = $this->locations['package_dir'] . 'update';
|
||||
$this->package_infos['release_directory'] = $this->locations['package_dir'] . 'release_files';
|
||||
|
||||
// Old packages always exclude the latest version. ;)
|
||||
$this->old_packages = array();
|
||||
|
||||
foreach ($this->versions as $package_version)
|
||||
{
|
||||
if ($package_version == $_latest)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->old_packages['phpbb' . str_replace('.', '', $package_version)] = $package_version . '_to_';
|
||||
}
|
||||
|
||||
// We need to make sure this is up to date with the latest version
|
||||
$this->clean_directory_structure = array(
|
||||
'adm' => array(
|
||||
'images' => '',
|
||||
'style' => '',
|
||||
),
|
||||
'cache' => '',
|
||||
'docs' => '',
|
||||
'download' => '',
|
||||
'files' => '',
|
||||
'images' => array(
|
||||
'avatars' => array(
|
||||
'gallery' => '',
|
||||
'upload' => '',
|
||||
),
|
||||
'icons' => array(
|
||||
'misc' => '',
|
||||
'smile' => '',
|
||||
),
|
||||
'ranks' => '',
|
||||
'smilies' => '',
|
||||
'upload_icons' => '',
|
||||
),
|
||||
'includes' => array(
|
||||
'acm' => '',
|
||||
'acp' => array(
|
||||
'info' => '',
|
||||
),
|
||||
'auth' => '',
|
||||
'captcha' => array(
|
||||
'plugins' => '',
|
||||
),
|
||||
'diff' => '',
|
||||
'db' => '',
|
||||
'hooks' => '',
|
||||
'mcp' => array(
|
||||
'info' => '',
|
||||
),
|
||||
'questionnaire' => '',
|
||||
'search' => '',
|
||||
'ucp' => array(
|
||||
'info' => '',
|
||||
),
|
||||
'utf' => array(
|
||||
'data' => '',
|
||||
),
|
||||
),
|
||||
'install' => array(
|
||||
'convertors'=> '',
|
||||
'schemas' => '',
|
||||
// 'data' => '',
|
||||
),
|
||||
'language' => array(
|
||||
'en' => array(
|
||||
'acp' => '',
|
||||
'email' => '',
|
||||
'mods' => '',
|
||||
),
|
||||
),
|
||||
'store' => '',
|
||||
'styles' => array(
|
||||
'subsilver2' => array(
|
||||
'imageset' => array(
|
||||
'en' => '',
|
||||
),
|
||||
'template' => '',
|
||||
'theme' => array(
|
||||
'images' => '',
|
||||
),
|
||||
),
|
||||
'prosilver' => array(
|
||||
'imageset' => array(
|
||||
'en' => '',
|
||||
),
|
||||
'template' => '',
|
||||
'theme' => array(
|
||||
'images' => '',
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
// Files to remove (not include within package)
|
||||
$this->files_to_remove = array(); //array('includes/utf/data/recode_cjk.php');
|
||||
|
||||
// Files within the main directory to copy - do not include config.php
|
||||
$this->files_to_copy = array(
|
||||
'.htaccess', 'common.php', 'cron.php', 'faq.php', 'feed.php', 'index.php', 'mcp.php', 'memberlist.php', 'posting.php', 'report.php',
|
||||
'search.php', 'style.php', 'ucp.php', 'viewforum.php', 'viewonline.php', 'viewtopic.php'
|
||||
);
|
||||
|
||||
// These files/directories will be removed and not used for creating the patch files
|
||||
$this->remove_from_diff_structure = array(
|
||||
'config.php', 'cache', 'docs', 'files', 'install', 'store', 'develop'
|
||||
);
|
||||
|
||||
// Writeable directories
|
||||
$this->writeable = array('cache', 'store', 'images/avatars/upload', 'files');
|
||||
|
||||
// Fill the rest of the files_to_copy array
|
||||
foreach ($this->clean_directory_structure as $cur_dir => $dir_struct)
|
||||
{
|
||||
$this->_fill_files_to_copy($this->locations['new_version'] . $cur_dir, $cur_dir, $dir_struct);
|
||||
}
|
||||
}
|
||||
|
||||
function get($var)
|
||||
{
|
||||
return $this->package_infos[$var];
|
||||
}
|
||||
|
||||
function _fill_files_to_copy($directory, $cur_dir, $dir_struct)
|
||||
{
|
||||
$dh = opendir($directory);
|
||||
|
||||
while ($file = readdir($dh))
|
||||
{
|
||||
if (is_file($directory . '/' . $file) && $file != '.' && $file != '..')
|
||||
{
|
||||
$_loc = str_replace($this->locations['new_version'], '', $directory . '/' . $file);
|
||||
|
||||
if (in_array($_loc, $this->files_to_remove))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->files_to_copy[] = $cur_dir . '/' . $file;
|
||||
}
|
||||
}
|
||||
closedir($dh);
|
||||
|
||||
if (is_array($dir_struct))
|
||||
{
|
||||
foreach ($dir_struct as $_cur_dir => $_dir_struct)
|
||||
{
|
||||
$this->_fill_files_to_copy($directory . '/' . $_cur_dir, $cur_dir . '/' . $_cur_dir, $_dir_struct);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function adjust_permissions($directory)
|
||||
{
|
||||
$dh = opendir($directory);
|
||||
|
||||
while ($file = readdir($dh))
|
||||
{
|
||||
if ($file == '.' || $file == '..' || $file == '.svn')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// If file, then 644
|
||||
if (is_file($directory . '/' . $file))
|
||||
{
|
||||
chmod($directory . '/' . $file, 0644);
|
||||
}
|
||||
else if (is_dir($directory . '/' . $file))
|
||||
{
|
||||
$_loc = str_replace($this->package_infos['dest_dir'] . '/', '', $directory . '/' . $file);
|
||||
|
||||
// If directory is within the writeable chmod to 777, else 755
|
||||
$mode = (in_array($_loc, $this->writeable)) ? 0777 : 0755;
|
||||
chmod($directory . '/' . $file, $mode);
|
||||
|
||||
// Now traverse to the directory
|
||||
$this->adjust_permissions($directory . '/' . $file);
|
||||
}
|
||||
}
|
||||
closedir($dh);
|
||||
}
|
||||
|
||||
function begin_status($headline)
|
||||
{
|
||||
if ($this->status_begun)
|
||||
{
|
||||
echo "\nDone.\n\n";
|
||||
}
|
||||
|
||||
$this->num_dots = 0;
|
||||
|
||||
echo $headline . "\n ";
|
||||
|
||||
$this->status_begun = true;
|
||||
}
|
||||
|
||||
function run_command($command)
|
||||
{
|
||||
$result = trim(`$command`);
|
||||
|
||||
if ($this->verbose)
|
||||
{
|
||||
echo " command : " . getcwd() . '$ ' . $command . "\n";
|
||||
echo " result : " . $result . "\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($this->num_dots > 70)
|
||||
{
|
||||
echo "\n";
|
||||
$this->num_dots = 0;
|
||||
}
|
||||
echo '.';
|
||||
$this->num_dots++;
|
||||
}
|
||||
|
||||
flush();
|
||||
}
|
||||
|
||||
function create_directory($directory, $dir_struct)
|
||||
{
|
||||
if (!file_exists($directory))
|
||||
{
|
||||
$this->run_command("mkdir $directory");
|
||||
}
|
||||
|
||||
if (is_array($dir_struct))
|
||||
{
|
||||
foreach ($dir_struct as $_dir => $_dir_struct)
|
||||
{
|
||||
$this->create_directory($directory . '/' . $_dir, $_dir_struct);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function collect_diff_files($diff_filename, $package_name)
|
||||
{
|
||||
$diff_result = $binary = array();
|
||||
$diff_contents = file($diff_filename);
|
||||
|
||||
$special_diff_contents = array();
|
||||
|
||||
foreach ($diff_contents as $num => $line)
|
||||
{
|
||||
$line = trim($line);
|
||||
|
||||
if (!$line)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Special diff content?
|
||||
if (strpos($line, 'diff ' . $this->diff_options . ' ') === 0 || strpos($line, '*** ') === 0 || strpos($line, '--- ') === 0 || (strpos($line, ' Exp $') !== false && strpos($line, '$Id:') !== false))
|
||||
{
|
||||
$special_diff_contents[] = $line;
|
||||
}
|
||||
else if (strpos($line, 'diff ' . $this->diff_options . ' ') === 0 || strpos($line, '*** ') === 0 || strpos($line, '--- ') === 0 || (strpos($line, ' Exp $') !== false && strpos($line, '$Id:') !== false) || (strpos($line, ' $') !== false && strpos($line, '$Id:') !== false))
|
||||
{
|
||||
$special_diff_contents[] = $line;
|
||||
}
|
||||
|
||||
// Is diffing line?
|
||||
if (strstr($line, 'diff ' . $this->diff_options . ' '))
|
||||
{
|
||||
$next_line = $diff_contents[$num+1];
|
||||
if (strpos($next_line, '***') === 0)
|
||||
{
|
||||
// *** phpbb208/admin/admin_board.php Sat Jul 10 20:16:26 2004
|
||||
$next_line = explode("\t", $next_line);
|
||||
$next_line = trim($next_line[0]);
|
||||
$next_line = str_replace('*** ' . $package_name . '/', '', $next_line);
|
||||
$diff_result[] = $next_line;
|
||||
}
|
||||
}
|
||||
|
||||
// Is binary?
|
||||
if (preg_match('/^Binary files ' . $package_name . '\/(.*) and [a-z0-9_-]+\/\1 differ/i', $line, $match))
|
||||
{
|
||||
$binary[] = trim($match[1]);
|
||||
}
|
||||
}
|
||||
|
||||
// Now go through the list again and find out which files have how many changes...
|
||||
$num_changes = array();
|
||||
|
||||
/* [1070] => diff -crN phpbb200/includes/usercp_avatar.php phpbb2023/includes/usercp_avatar.php
|
||||
[1071] => *** phpbb200/includes/usercp_avatar.php Sat Jul 10 20:16:13 2004
|
||||
[1072] => --- phpbb2023/includes/usercp_avatar.php Wed Feb 6 22:28:04 2008
|
||||
[1073] => *** 6,12 ****
|
||||
[1074] => ! * $Id$
|
||||
[1075] => --- 6,12 ----
|
||||
[1076] => *** 51,59 ****
|
||||
[1077] => --- 51,60 ----
|
||||
[1078] => *** 62,80 ****
|
||||
[1079] => --- 63,108 ----
|
||||
[1080] => *** 87,97 ****
|
||||
*/
|
||||
while (($line = array_shift($special_diff_contents)) !== NULL)
|
||||
{
|
||||
$line = trim($line);
|
||||
|
||||
if (!$line)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Is diffing line?
|
||||
if (strstr($line, 'diff ' . $this->diff_options . ' '))
|
||||
{
|
||||
$next_line = array_shift($special_diff_contents);
|
||||
if (strpos($next_line, '*** ') === 0)
|
||||
{
|
||||
// *** phpbb208/admin/admin_board.php Sat Jul 10 20:16:26 2004
|
||||
$next_line = explode("\t", $next_line);
|
||||
$next_line = trim($next_line[0]);
|
||||
$next_line = str_replace('*** ' . $package_name . '/', '', $next_line);
|
||||
|
||||
$is_reached = false;
|
||||
$prev_line = '';
|
||||
|
||||
while (!$is_reached)
|
||||
{
|
||||
$line = array_shift($special_diff_contents);
|
||||
|
||||
if (strpos($line, 'diff ' . $this->diff_options) === 0 || empty($special_diff_contents))
|
||||
{
|
||||
$is_reached = true;
|
||||
array_unshift($special_diff_contents, $line);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (strpos($line, '*** ') === 0 && strpos($line, ' ****') !== false)
|
||||
{
|
||||
$is_comment = false;
|
||||
while (!(strpos($line, '--- ') === 0 && strpos($line, ' ----') !== false))
|
||||
{
|
||||
$line = array_shift($special_diff_contents);
|
||||
if (strpos($line, ' Exp $') !== false || strpos($line, '$Id:') !== false)
|
||||
{
|
||||
$is_comment = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$is_comment)
|
||||
{
|
||||
if (!isset($num_changes[$next_line]))
|
||||
{
|
||||
$num_changes[$next_line] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$num_changes[$next_line]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Now remove those results not having changes
|
||||
$return = array();
|
||||
|
||||
foreach ($diff_result as $key => $value)
|
||||
{
|
||||
if (isset($num_changes[$value]))
|
||||
{
|
||||
$return[] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($binary as $value)
|
||||
{
|
||||
$return[] = $value;
|
||||
}
|
||||
|
||||
$diff_result = $return;
|
||||
unset($return);
|
||||
unset($special_diff_contents);
|
||||
|
||||
$result = array(
|
||||
'files' => array(),
|
||||
'binary' => array(),
|
||||
'all' => $diff_result,
|
||||
);
|
||||
|
||||
$binary_extensions = array('gif', 'jpg', 'jpeg', 'png', 'ttf');
|
||||
|
||||
// Split into file and binary
|
||||
foreach ($diff_result as $filename)
|
||||
{
|
||||
if (strpos($filename, '.') === false)
|
||||
{
|
||||
$result['files'][] = $filename;
|
||||
continue;
|
||||
}
|
||||
|
||||
$extension = explode('.', $filename);
|
||||
$extension = array_pop($extension);
|
||||
|
||||
if (in_array($extension, $binary_extensions))
|
||||
{
|
||||
$result['binary'][] = $filename;
|
||||
}
|
||||
else
|
||||
{
|
||||
$result['files'][] = $filename;
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
39
build/compare.sh
Executable file
39
build/compare.sh
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env bash
|
||||
orig_dir="../../phpBB"
|
||||
|
||||
|
||||
rm -rf test_release_files
|
||||
mkdir test_release_files
|
||||
cd test_release_files
|
||||
|
||||
for ext in "tar.bz2" "zip"
|
||||
do
|
||||
cp "../new_version/release_files/$1.$ext" ./
|
||||
|
||||
if [ "$ext" = "tar.bz2" ]
|
||||
then
|
||||
command="tar -xjf"
|
||||
else
|
||||
command="unzip -q"
|
||||
fi
|
||||
|
||||
$command "$1.$ext"
|
||||
|
||||
for file in `find phpBB3 -name '.svn' -prune -o -type f -print`
|
||||
do
|
||||
orig_file="${file/#phpBB3/$orig_dir}"
|
||||
diff_result=`diff $orig_file $file`
|
||||
|
||||
if [ -n "$diff_result" ]
|
||||
then
|
||||
echo "Difference in package $1.$ext"
|
||||
echo $diff_result
|
||||
fi
|
||||
done
|
||||
|
||||
rm -rf phpBB3
|
||||
done
|
||||
|
||||
cd ..
|
||||
rm -rf test_release_files
|
||||
|
1711
build/diff_class.php
Normal file
1711
build/diff_class.php
Normal file
File diff suppressed because it is too large
Load Diff
526
build/package.php
Executable file
526
build/package.php
Executable file
@@ -0,0 +1,526 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package build
|
||||
* @version $Id$
|
||||
* @copyright (c) 2010 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
// The only thing i need to adjust. ;)
|
||||
// Please always add the latest version number to the end
|
||||
// Only have 5 releases here...
|
||||
// If RC8 drops remove the install/data directory
|
||||
//$versions = array('3.0.2', '3.0.3-RC1', '3.0.3', '3.0.4-RC1', '3.0.4', '3.0.5-RC1', '3.0.5', '3.0.6-RC1', '3.0.6-RC2', '3.0.6-RC3');
|
||||
//$versions = array('3.0.2', '3.0.3', '3.0.4', '3.0.5', '3.0.6', '3.0.7-RC1', '3.0.7');
|
||||
$versions = array('3.0.2', '3.0.3', '3.0.4', '3.0.5', '3.0.6', '3.0.7-RC1', '3.0.7-RC2', '3.0.7');
|
||||
$verbose = false;
|
||||
|
||||
require('build_helper.php');
|
||||
|
||||
$package = new build_package($versions, $verbose);
|
||||
|
||||
echo "Building Release Packages\n";
|
||||
echo "Now all three package types (patch, files, release) are built as well as the update package (update).\n";
|
||||
|
||||
$package->begin_status('Remove temporary files');
|
||||
|
||||
// Cleanup...
|
||||
$package->run_command('rm -Rv ' . $package->get('dest_dir'));
|
||||
$package->run_command('rm -Rv ' . $package->get('diff_dir'));
|
||||
$package->run_command('rm -Rv ' . $package->get('patch_directory'));
|
||||
$package->run_command('rm -Rv ' . $package->get('files_directory'));
|
||||
$package->run_command('rm -Rv ' . $package->get('update_directory'));
|
||||
$package->run_command('rm -Rv ' . $package->get('release_directory'));
|
||||
|
||||
$package->begin_status('Create new directories');
|
||||
|
||||
// Make sure the directories got removed
|
||||
while (file_exists($package->get('update_directory')))
|
||||
{
|
||||
sleep(1);
|
||||
}
|
||||
|
||||
if (!file_exists($package->get('dest_dir')))
|
||||
{
|
||||
$package->run_command('mkdir ' . $package->get('dest_dir'));
|
||||
}
|
||||
|
||||
if (!file_exists($package->get('diff_dir')))
|
||||
{
|
||||
$package->run_command('mkdir ' . $package->get('diff_dir'));
|
||||
}
|
||||
|
||||
if (!file_exists($package->get('patch_directory')))
|
||||
{
|
||||
$package->run_command('mkdir ' . $package->get('patch_directory'));
|
||||
}
|
||||
|
||||
if (!file_exists($package->get('files_directory')))
|
||||
{
|
||||
$package->run_command('mkdir ' . $package->get('files_directory'));
|
||||
}
|
||||
|
||||
if (!file_exists($package->get('update_directory')))
|
||||
{
|
||||
$package->run_command('mkdir ' . $package->get('update_directory'));
|
||||
}
|
||||
|
||||
if (!file_exists($package->get('release_directory')))
|
||||
{
|
||||
$package->run_command('mkdir ' . $package->get('release_directory'));
|
||||
}
|
||||
|
||||
$package->begin_status('Copy release files to clean release directory');
|
||||
|
||||
// Create config.php file
|
||||
$package->run_command('touch ' . $package->get('dest_dir') . '/config.php');
|
||||
//$package->run_command('sudo chown www-data:www-data ' . $package->get('dest_dir') . '/config.php');
|
||||
|
||||
// Create new directory structure
|
||||
foreach ($package->clean_directory_structure as $dir => $dir_struct)
|
||||
{
|
||||
$package->create_directory($package->get('dest_dir') . '/' . $dir, $dir_struct);
|
||||
}
|
||||
|
||||
// First step is to copy the new version over (clean structure)
|
||||
foreach ($package->files_to_copy as $file)
|
||||
{
|
||||
$source_file = $package->locations['new_version'] . $file;
|
||||
$dest_file = $package->get('dest_dir') . '/' . $file;
|
||||
|
||||
$package->run_command("cp -p $source_file $dest_file");
|
||||
}
|
||||
|
||||
// fix line endings
|
||||
chdir($package->get('dest_dir'));
|
||||
$package->run_command($package->locations['new_version'] . 'develop/fix_files.sh');
|
||||
|
||||
// Now clean up the permissions
|
||||
$package->begin_status('Adjust permissions');
|
||||
|
||||
$package->adjust_permissions($package->get('dest_dir'));
|
||||
|
||||
// Now create a version for diffing the version - copy the tree over to old_versions...
|
||||
$package->begin_status('Create diff directory for obtaining file differences');
|
||||
|
||||
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/* ' . $package->get('diff_dir'));
|
||||
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/.htaccess ' . $package->get('diff_dir'));
|
||||
|
||||
// Cleanup diff directory (only contents to diff)
|
||||
foreach ($package->remove_from_diff_structure as $remove_dir)
|
||||
{
|
||||
$package->run_command('rm -Rv ' . $package->get('diff_dir') . '/' . $remove_dir);
|
||||
}
|
||||
|
||||
// Now, first of all we need to rebuild all old packages we want to support
|
||||
foreach ($package->old_packages as $package_name => $tag_name)
|
||||
{
|
||||
$package->begin_status('Create old packages directory for diffing to ' . $package_name);
|
||||
|
||||
chdir($package->locations['old_versions']);
|
||||
|
||||
if (is_dir($package->locations['old_versions'] . $package_name))
|
||||
{
|
||||
$package->run_command('rm -Rv ' . $package->locations['old_versions'] . $package_name);
|
||||
}
|
||||
|
||||
// Now, create a new one...
|
||||
$tag_name = 'release_' . str_replace(array('.', '_to_'), array('_', ''), $tag_name);
|
||||
|
||||
$package->run_command('svn export --non-interactive http://code.phpbb.com/svn/phpbb/tags/' . $tag_name . '/phpBB/ ' . $package_name);
|
||||
|
||||
$location = $package->locations['old_versions'] . $package_name;
|
||||
chdir($location . '/');
|
||||
|
||||
$package->run_command($package->locations['new_version'] . 'develop/fix_files.sh');
|
||||
|
||||
// Now clean up the permissions
|
||||
$package->begin_status('Adjust permissions for package ' . $package_name);
|
||||
|
||||
$package->adjust_permissions($location);
|
||||
|
||||
// Cleanup diff directory (only contents to diff)
|
||||
foreach ($package->remove_from_diff_structure as $remove_dir)
|
||||
{
|
||||
$package->run_command('rm -Rv ' . $location . '/' . $remove_dir);
|
||||
}
|
||||
}
|
||||
|
||||
// Go trough all versions making a diff if we even have old versions
|
||||
// For phpBB 3.0.x we might choose a different update method, rendering the things below useless...
|
||||
if (sizeof($package->old_packages))
|
||||
{
|
||||
chdir($package->locations['old_versions']);
|
||||
|
||||
// This array is for holding the filenames change
|
||||
$diff_file_changes = array();
|
||||
|
||||
foreach ($package->old_packages as $_package_name => $dest_package_filename)
|
||||
{
|
||||
$package->begin_status('Creating patch/diff files for phpBB-' . $dest_package_filename . $package->get('new_version_number'));
|
||||
|
||||
$dest_package_filename = $package->get('patch_directory') . '/phpBB-' . $dest_package_filename . $package->get('new_version_number') . '.patch';
|
||||
$package->run_command('diff ' . $package->diff_options . ' ' . $_package_name . ' ' . $package->get('simple_name') . ' > ' . $dest_package_filename);
|
||||
|
||||
// Parse this diff to determine file changes from the checked versions and save them
|
||||
$diff_file_changes[$_package_name] = $package->collect_diff_files($dest_package_filename, $_package_name);
|
||||
}
|
||||
|
||||
// Now put those files determined within the correct directories
|
||||
foreach ($diff_file_changes as $_package_name => $file_contents)
|
||||
{
|
||||
$package->begin_status('Creating files-only informations for ' . $package->old_packages[$_package_name] . $package->get('new_version_number'));
|
||||
|
||||
$dest_filename_dir = $package->get('files_directory') . '/' . $package->old_packages[$_package_name] . $package->get('new_version_number');
|
||||
|
||||
if (!file_exists($dest_filename_dir))
|
||||
{
|
||||
$package->run_command('mkdir ' . $dest_filename_dir);
|
||||
}
|
||||
|
||||
// Now copy the file contents
|
||||
foreach ($file_contents['all'] as $file)
|
||||
{
|
||||
$source_filename = $package->get('dest_dir') . '/' . $file;
|
||||
$dest_filename = $dest_filename_dir . '/' . $file;
|
||||
|
||||
// Create Directories along the way?
|
||||
$file = explode('/', $file);
|
||||
// Remove filename portion
|
||||
$file[sizeof($file)-1] = '';
|
||||
|
||||
chdir($dest_filename_dir);
|
||||
foreach ($file as $entry)
|
||||
{
|
||||
$entry = trim($entry);
|
||||
if ($entry)
|
||||
{
|
||||
if (!file_exists('./' . $entry))
|
||||
{
|
||||
$package->run_command('mkdir ' . $entry);
|
||||
}
|
||||
chdir('./' . $entry);
|
||||
}
|
||||
}
|
||||
|
||||
$package->run_command('cp ' . $source_filename . ' ' . $dest_filename);
|
||||
}
|
||||
}
|
||||
|
||||
// Because there might be binary changes, we re-create the patch files... without parsing file differences.
|
||||
$package->run_command('rm -Rv ' . $package->get('patch_directory'));
|
||||
|
||||
if (!file_exists($package->get('patch_directory')))
|
||||
{
|
||||
$package->run_command('mkdir ' . $package->get('patch_directory'));
|
||||
}
|
||||
|
||||
chdir($package->locations['old_versions']);
|
||||
|
||||
foreach ($package->old_packages as $_package_name => $dest_package_filename)
|
||||
{
|
||||
$package->begin_status('Creating patch/diff files for phpBB-' . $dest_package_filename . $package->get('new_version_number'));
|
||||
|
||||
$dest_package_filename = $package->get('patch_directory') . '/phpBB-' . $dest_package_filename . $package->get('new_version_number') . '.patch';
|
||||
$package->run_command('diff ' . $package->diff_options_long . ' ' . $_package_name . ' ' . $package->get('simple_name') . ' > ' . $dest_package_filename);
|
||||
}
|
||||
|
||||
$packages = $diff_file_changes;
|
||||
|
||||
foreach ($packages as $_package_name => $file_contents)
|
||||
{
|
||||
$package->begin_status('Building specific update files for ' . $package->old_packages[$_package_name] . $package->get('new_version_number'));
|
||||
|
||||
$dest_filename_dir = $package->get('update_directory') . '/' . $package->old_packages[$_package_name] . $package->get('new_version_number');
|
||||
|
||||
if (!file_exists($dest_filename_dir))
|
||||
{
|
||||
$package->run_command('mkdir ' . $dest_filename_dir);
|
||||
}
|
||||
|
||||
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/docs ' . $dest_filename_dir);
|
||||
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/install ' . $dest_filename_dir);
|
||||
|
||||
$package->run_command('mkdir ' . $dest_filename_dir . '/install/update');
|
||||
$package->run_command('mkdir ' . $dest_filename_dir . '/install/update/old');
|
||||
$package->run_command('mkdir ' . $dest_filename_dir . '/install/update/new');
|
||||
|
||||
// Remove some files
|
||||
$package->run_command('rm -v ' . $dest_filename_dir . '/install/install_install.php');
|
||||
$package->run_command('rm -v ' . $dest_filename_dir . '/install/install_convert.php');
|
||||
$package->run_command('rm -Rv ' . $dest_filename_dir . '/install/schemas');
|
||||
$package->run_command('rm -Rv ' . $dest_filename_dir . '/install/convertors');
|
||||
|
||||
foreach ($file_contents['all'] as $index => $file)
|
||||
{
|
||||
if (strpos($file, 'recode_cjk') !== false)
|
||||
{
|
||||
unset($file_contents['all'][$index]);
|
||||
}
|
||||
}
|
||||
|
||||
// First of all, fill the 'old' directory
|
||||
foreach ($file_contents['all'] as $file)
|
||||
{
|
||||
$source_filename = $package->locations['old_versions'] . $_package_name . '/' . $file;
|
||||
$dest_filename = $dest_filename_dir . '/install/update/old/' . $file;
|
||||
|
||||
if (!file_exists($source_filename))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Create Directories along the way?
|
||||
$file = explode('/', $file);
|
||||
// Remove filename portion
|
||||
$file[sizeof($file)-1] = '';
|
||||
|
||||
chdir($dest_filename_dir . '/install/update/old');
|
||||
foreach ($file as $entry)
|
||||
{
|
||||
$entry = trim($entry);
|
||||
if ($entry)
|
||||
{
|
||||
if (!file_exists('./' . $entry))
|
||||
{
|
||||
$package->run_command('mkdir ' . $entry);
|
||||
}
|
||||
chdir('./' . $entry);
|
||||
}
|
||||
}
|
||||
|
||||
$package->run_command('cp ' . $source_filename . ' ' . $dest_filename);
|
||||
}
|
||||
|
||||
// Then fill the 'new' directory
|
||||
foreach ($file_contents['all'] as $file)
|
||||
{
|
||||
$source_filename = $package->locations['old_versions'] . $package->get('simple_name') . '/' . $file;
|
||||
$dest_filename = $dest_filename_dir . '/install/update/new/' . $file;
|
||||
|
||||
if (!file_exists($source_filename))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Create Directories along the way?
|
||||
$file = explode('/', $file);
|
||||
// Remove filename portion
|
||||
$file[sizeof($file)-1] = '';
|
||||
|
||||
chdir($dest_filename_dir . '/install/update/new');
|
||||
foreach ($file as $entry)
|
||||
{
|
||||
$entry = trim($entry);
|
||||
if ($entry)
|
||||
{
|
||||
if (!file_exists('./' . $entry))
|
||||
{
|
||||
$package->run_command('mkdir ' . $entry);
|
||||
}
|
||||
chdir('./' . $entry);
|
||||
}
|
||||
}
|
||||
|
||||
$package->run_command('cp ' . $source_filename . ' ' . $dest_filename);
|
||||
}
|
||||
|
||||
// Build index.php file for holding the file structure
|
||||
$index_contents = '<?php
|
||||
|
||||
if (!defined(\'IN_PHPBB\'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
// Set update info with file structure to update
|
||||
$update_info = array(
|
||||
\'version\' => array(\'from\' => \'' . str_replace('_to_', '', $package->old_packages[$_package_name]) . '\', \'to\' => \'' . $package->get('new_version_number') . '\'),
|
||||
';
|
||||
|
||||
if (sizeof($file_contents['all']))
|
||||
{
|
||||
$index_contents .= '\'files\' => array(\'' . implode("',\n\t'", $file_contents['all']) . '\'),
|
||||
';
|
||||
}
|
||||
else
|
||||
{
|
||||
$index_contents .= '\'files\' => array(),
|
||||
';
|
||||
}
|
||||
|
||||
if (sizeof($file_contents['binary']))
|
||||
{
|
||||
$index_contents .= '\'binary\' => array(\'' . implode("',\n\t'", $file_contents['binary']) . '\'),
|
||||
';
|
||||
}
|
||||
else
|
||||
{
|
||||
$index_contents .= '\'binary\' => array(),
|
||||
';
|
||||
}
|
||||
|
||||
$index_contents .= ');
|
||||
|
||||
?' . '>';
|
||||
|
||||
$fp = fopen($dest_filename_dir . '/install/update/index.php', 'wt');
|
||||
fwrite($fp, $index_contents);
|
||||
fclose($fp);
|
||||
}
|
||||
unset($diff_file_changes);
|
||||
|
||||
$package->begin_status('Clean up all install files');
|
||||
|
||||
// Copy the install files to their respective locations
|
||||
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/docs ' . $package->get('patch_directory'));
|
||||
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/install ' . $package->get('patch_directory'));
|
||||
|
||||
// Remove some files
|
||||
chdir($package->get('patch_directory') . '/install');
|
||||
|
||||
$package->run_command('rm -v install_install.php');
|
||||
$package->run_command('rm -v install_update.php');
|
||||
$package->run_command('rm -v install_convert.php');
|
||||
$package->run_command('rm -Rv schemas');
|
||||
$package->run_command('rm -Rv convertors');
|
||||
}
|
||||
|
||||
// Build Main phpBB Release
|
||||
$compress_programs = array(
|
||||
// 'tar.gz' => 'tar -czf',
|
||||
'tar.bz2' => 'tar -cjf',
|
||||
'zip' => 'zip -r'
|
||||
);
|
||||
|
||||
if (sizeof($package->old_packages))
|
||||
{
|
||||
// Build Patch Files
|
||||
chdir($package->get('patch_directory'));
|
||||
|
||||
foreach ($compress_programs as $extension => $compress_command)
|
||||
{
|
||||
$package->begin_status('Packaging phpBB Patch Files for ' . $extension);
|
||||
$package->run_command('rm -v ../release_files/' . $package->get('release_filename') . '-patch.' . $extension);
|
||||
|
||||
// Build Package
|
||||
$package->run_command($compress_command . ' ../release_files/' . $package->get('release_filename') . '-patch.' . $extension . ' *');
|
||||
|
||||
// Build MD5 Sum
|
||||
$package->run_command('md5sum ../release_files/' . $package->get('release_filename') . '-patch.' . $extension . ' > ../release_files/' . $package->get('release_filename') . '-patch.' . $extension . '.md5');
|
||||
}
|
||||
|
||||
// Build Files Package
|
||||
chdir($package->get('files_directory'));
|
||||
|
||||
foreach ($compress_programs as $extension => $compress_command)
|
||||
{
|
||||
$package->begin_status('Packaging phpBB Files for ' . $extension);
|
||||
|
||||
$package->run_command('rm -v ../release_files/' . $package->get('release_filename') . '-files.' . $extension);
|
||||
$package->run_command('mkdir ' . $package->get('files_directory') . '/release');
|
||||
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/docs ' . $package->get('files_directory') . '/release');
|
||||
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/install ' . $package->get('files_directory') . '/release');
|
||||
|
||||
$package->run_command('rm -v ' . $package->get('files_directory') . '/release/install/install_install.php');
|
||||
$package->run_command('rm -v ' . $package->get('files_directory') . '/release/install/install_update.php');
|
||||
$package->run_command('rm -v ' . $package->get('files_directory') . '/release/install/install_convert.php');
|
||||
$package->run_command('rm -Rv ' . $package->get('files_directory') . '/release/install/schemas');
|
||||
$package->run_command('rm -Rv ' . $package->get('files_directory') . '/release/install/convertors');
|
||||
|
||||
// Pack files
|
||||
foreach ($package->old_packages as $_package_name => $package_path)
|
||||
{
|
||||
chdir($package_path . $package->get('new_version_number'));
|
||||
$command = ($extension == 'zip') ? 'zip -r' : 'tar cf';
|
||||
$_ext = ($extension == 'zip') ? 'zip' : 'tar';
|
||||
$package->run_command("$command ../release/phpBB-$package_path" . $package->get('new_version_number') . ".$_ext *");
|
||||
chdir('..');
|
||||
}
|
||||
|
||||
chdir('./release');
|
||||
$package->run_command("$compress_command ../../release_files/" . $package->get('release_filename') . '-files.' . $extension . ' *');
|
||||
// Build MD5 Sum
|
||||
$package->run_command('md5sum ../../release_files/' . $package->get('release_filename') . '-files.' . $extension . ' > ../../release_files/' . $package->get('release_filename') . '-files.' . $extension . '.md5');
|
||||
chdir('..');
|
||||
|
||||
$package->run_command('rm -Rv ' . $package->get('files_directory') . '/release');
|
||||
}
|
||||
|
||||
// Build Update Package
|
||||
foreach ($compress_programs as $extension => $compress_command)
|
||||
{
|
||||
chdir($package->get('update_directory'));
|
||||
|
||||
$package->begin_status('Packaging phpBB Update for ' . $extension);
|
||||
|
||||
$package->run_command('rm -v ../release_files/' . $package->get('release_filename') . '-update.' . $extension);
|
||||
$package->run_command('mkdir ' . $package->get('update_directory') . '/release');
|
||||
|
||||
// Pack update files
|
||||
$packages = $package->old_packages;
|
||||
|
||||
foreach ($packages as $_package_name => $package_path)
|
||||
{
|
||||
chdir($package_path . $package->get('new_version_number'));
|
||||
|
||||
$package->run_command('rm -v install/install_install.php');
|
||||
$package->run_command('rm -v install/install_convert.php');
|
||||
$package->run_command('rm -v includes/utf/data/recode_cjk.php');
|
||||
$package->run_command('rm -Rv install/schemas');
|
||||
$package->run_command('rm -Rv install/convertors');
|
||||
|
||||
$command = ($extension == 'zip') ? 'zip -r' : 'tar cf';
|
||||
$_ext = ($extension == 'zip') ? 'zip' : 'tar';
|
||||
$package->run_command("$command ../release/$package_path" . $package->get('new_version_number') . ".$_ext *");
|
||||
chdir('..');
|
||||
|
||||
$last_version = $package_path . $package->get('new_version_number');
|
||||
|
||||
// chdir('./release');
|
||||
// $package->run_command("$compress_command ../../release_files/" . $package->get('release_filename') . '-update.' . $extension . ' *');
|
||||
// chdir('..');
|
||||
|
||||
chdir('./' . $last_version);
|
||||
// Copy last package over...
|
||||
$package->run_command('rm -v ../release_files/phpBB-' . $last_version . ".$extension");
|
||||
$package->run_command("$compress_command ../../release_files/phpBB-$last_version.$extension *");
|
||||
|
||||
// Build MD5 Sum
|
||||
$package->run_command("md5sum ../../release_files/phpBB-$last_version.$extension > ../../release_files/phpBB-$last_version.$extension.md5");
|
||||
chdir('..');
|
||||
}
|
||||
|
||||
$package->run_command('rm -Rv ' . $package->get('update_directory') . '/release');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Delete updater and convertor from main archive
|
||||
chdir($package->get('dest_dir') . '/install');
|
||||
|
||||
// $package->run_command('rm -v database_update.php');
|
||||
$package->run_command('rm -v install_update.php');
|
||||
|
||||
chdir($package->locations['package_dir']);
|
||||
foreach ($compress_programs as $extension => $compress_command)
|
||||
{
|
||||
$package->begin_status('Packaging phpBB for ' . $extension);
|
||||
$package->run_command('rm -v ./release_files/' . $package->get('release_filename') . ".{$extension}");
|
||||
|
||||
// Build Package
|
||||
$package->run_command("$compress_command ./release_files/" . $package->get('release_filename') . '.' . $extension . ' ' . $package->get('package_name'));
|
||||
|
||||
// Build MD5 Sum
|
||||
$package->run_command('md5sum ./release_files/' . $package->get('release_filename') . '.' . $extension . ' > ./release_files/' . $package->get('release_filename') . '.' . $extension . '.md5');
|
||||
}
|
||||
|
||||
// verify results
|
||||
chdir($package->locations['root']);
|
||||
$package->begin_status('********** Verifying packages **********');
|
||||
$package->run_command('./compare.sh ' . $package->package_infos['release_filename']);
|
||||
|
||||
echo "Done.\n";
|
@@ -1,3 +1,13 @@
|
||||
#
|
||||
# Uncomment the statement below if you want to make use of
|
||||
# HTTP authentication and it does not already work.
|
||||
# This could be required if you are for example using PHP via Apache CGI.
|
||||
#
|
||||
#<IfModule mod_rewrite.c>
|
||||
#RewriteEngine on
|
||||
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
|
||||
#</IfModule>
|
||||
|
||||
<Files "config.php">
|
||||
Order Allow,Deny
|
||||
Deny from All
|
||||
|
@@ -246,7 +246,7 @@ function h_radio($name, &$input_ary, $input_default = false, $id = false, $key =
|
||||
foreach ($input_ary as $value => $title)
|
||||
{
|
||||
$selected = ($input_default !== false && $value == $input_default) ? ' checked="checked"' : '';
|
||||
$html .= '<label><input type="radio" name="' . $name . '"' . (($id && !$id_assigned) ? ' id="' . $id . '"' : '') . ' value="' . $value . '"' . $selected . (($key) ? ' accesskey="' . $key . '"' : '') . ' class="radio" /> ' . $user->lang[$title] . '</label> ';
|
||||
$html .= '<label><input type="radio" name="' . $name . '"' . (($id && !$id_assigned) ? ' id="' . $id . '"' : '') . ' value="' . $value . '"' . $selected . (($key) ? ' accesskey="' . $key . '"' : '') . ' class="radio" /> ' . $user->lang[$title] . '</label>';
|
||||
$id_assigned = true;
|
||||
}
|
||||
|
||||
|
@@ -93,15 +93,15 @@
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="unbanlength">{L_BAN_LENGTH}:</label></dt>
|
||||
<dd><input style="border: 0;" type="text" class="text full" disabled="disabled" name="unbanlength" id="unbanlength" /></dd>
|
||||
<dd><input style="border: 0;" type="text" class="text full" readonly="readonly" name="unbanlength" id="unbanlength" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="unbanreason">{L_BAN_REASON}:</label></dt>
|
||||
<dd><textarea style="border: 0;" class="text full" disabled="disabled" name="unbanreason" id="unbanreason" rows="5" cols="80"> </textarea></dd>
|
||||
<dd><textarea style="border: 0;" class="text full" readonly="readonly" name="unbanreason" id="unbanreason" rows="5" cols="80"> </textarea></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="unbangivereason">{L_BAN_GIVE_REASON}:</label></dt>
|
||||
<dd><textarea style="border: 0;" class="text full" disabled="disabled" name="unbangivereason" id="unbangivereason" rows="5" cols="80"> </textarea></dd>
|
||||
<dd><textarea style="border: 0;" class="text full" readonly="readonly" name="unbangivereason" id="unbangivereason" rows="5" cols="80"> </textarea></dd>
|
||||
</dl>
|
||||
|
||||
<p class="submit-buttons">
|
||||
|
@@ -21,6 +21,10 @@
|
||||
<dt><label for="max_reg_attempts">{L_REG_LIMIT}:</label><br /><span>{L_REG_LIMIT_EXPLAIN}</span></dt>
|
||||
<dd><input id="max_reg_attempts" type="text" size="4" maxlength="4" name="max_reg_attempts" value="{REG_LIMIT}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="max_login_attempts">{L_MAX_LOGIN_ATTEMPTS}:</label><br /><span>{L_MAX_LOGIN_ATTEMPTS_EXPLAIN}</span></dt>
|
||||
<dd><input id="max_login_attempts" type="text" size="4" maxlength="4" name="max_login_attempts" value="{MAX_LOGIN_ATTEMPTS}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="enable_post_confirm">{L_VISUAL_CONFIRM_POST}:</label><br /><span>{L_VISUAL_CONFIRM_POST_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" id="enable_post_confirm" name="enable_post_confirm" value="1"<!-- IF POST_ENABLE --> checked="checked"<!-- ENDIF --> /> {L_ENABLED}</label>
|
||||
|
@@ -1,21 +1,22 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<h1>{L_COPY_PERMISSIONS}</h1>
|
||||
|
||||
<p>{L_COPY_PERMISSIONS_EXPLAIN}</p>
|
||||
<p>{L_ACL_LINK}</p>
|
||||
|
||||
<form id="confirm" method="post" action="{S_COPY_ACTION}">
|
||||
|
||||
<fieldset>
|
||||
<h1>{L_COPY_PERMISSIONS}</h1>
|
||||
<p>{L_COPY_PERMISSIONS_EXPLAIN}</p>
|
||||
<p>{L_ACL_LINK}</p>
|
||||
<dl>
|
||||
<dt><label for="forum_perm_from">{L_COPY_PERMISSIONS}:</label><br /><span>{L_COPY_PERMISSIONS_EXPLAIN}</span></dt>
|
||||
<dd><select id="forum_perm_from" name="forum_perm_from"><option value="0">{L_NO_PERMISSIONS}</option>{S_FORUM_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
<div style="text-align: center;">{S_FORM_TOKEN}{S_HIDDEN_FIELDS}
|
||||
<input type="submit" name="update" value="{L_CONTINUE}" class="button2" />
|
||||
<input type="submit" name="update" value="{L_CONTINUE}" class="button2" />
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
||||
|
@@ -120,7 +120,7 @@
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="width">{L_LINK_REMOTE_SIZE}:</label><br /><span>{L_LINK_REMOTE_SIZE_EXPLAIN}</span></dt>
|
||||
<dd><input name="width" type="text" id="width" size="3" value="{AVATAR_WIDTH}" /> <span>px X </span> <input type="text" name="height" size="3" value="{AVATAR_HEIGHT}" /> <span>px</span></dd>
|
||||
<dd><input name="width" type="text" id="width" size="3" value="{AVATAR_WIDTH}" /> <span>{L_PIXEL} × </span> <input type="text" name="height" size="3" value="{AVATAR_HEIGHT}" /> <span>{L_PIXEL}</span></dd>
|
||||
</dl>
|
||||
<!-- IF S_DISPLAY_GALLERY -->
|
||||
<dl>
|
||||
|
@@ -139,9 +139,9 @@
|
||||
<td><input class="text post" type="text" size="3" name="add_width" id="add_width" value="{WIDTH}" /></td>
|
||||
<td><input class="text post" type="text" size="3" name="add_height" id="add_height" value="{HEIGHT}" /></td>
|
||||
<td><input type="checkbox" class="radio" name="add_display_on_posting" checked="checked" onclick="toggle_select('add', this.checked, 'add_order');"/></td>
|
||||
<td><select id="add_order" name="add_order">
|
||||
<optgroup id="order_disp[add]" label="{L_DISPLAY_POSTING}">{S_ADD_ORDER_LIST_DISPLAY}</optgroup>
|
||||
<optgroup id="order_no_disp[add]" label="{L_DISPLAY_POSTING_NO}" disabled="disabled" class="disabled-options" >{S_ADD_ORDER_LIST_UNDISPLAY}</optgroup>
|
||||
<td><select id="order_add_order" name="add_order">
|
||||
<optgroup id="order_disp_add_order" label="{L_DISPLAY_POSTING}">{S_ADD_ORDER_LIST_DISPLAY}</optgroup>
|
||||
<optgroup id="order_no_disp_add_order" label="{L_DISPLAY_POSTING_NO}" disabled="disabled" class="disabled-options" >{S_ADD_ORDER_LIST_UNDISPLAY}</optgroup>
|
||||
</select></td>
|
||||
<td><input type="checkbox" class="radio" name="add_additional_code" value="1" /></td>
|
||||
</tr>
|
||||
|
@@ -38,7 +38,7 @@
|
||||
<dd><input type="text" id="jab_username" name="jab_username" value="{JAB_USERNAME}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="jab_password">{L_JAB_PASSWORD}:</label></dt>
|
||||
<dt><label for="jab_password">{L_JAB_PASSWORD}:</label><br /><span>{L_JAB_PASSWORD_EXPLAIN}</span></dt>
|
||||
<dd><input type="password" id="jab_password" name="jab_password" value="{JAB_PASSWORD}" /></dd>
|
||||
</dl>
|
||||
<!-- IF S_CAN_USE_SSL -->
|
||||
|
@@ -40,6 +40,12 @@
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF S_PHP_VERSION_OLD -->
|
||||
<div class="errorbox notice">
|
||||
<p>{L_PHP_VERSION_OLD}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<table cellspacing="1">
|
||||
<caption>{L_FORUM_STATS}</caption>
|
||||
<col class="col1" /><col class="col2" /><col class="col1" /><col class="col2" />
|
||||
|
@@ -27,7 +27,7 @@
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="width">{L_LINK_REMOTE_SIZE}:</label><br /><span>{L_LINK_REMOTE_SIZE_EXPLAIN}</span></dt>
|
||||
<dd><input name="width" type="text" id="width" size="3" value="{USER_AVATAR_WIDTH}" /> <span>px X </span> <input type="text" name="height" size="3" value="{USER_AVATAR_HEIGHT}" /> <span>px</span></dd>
|
||||
<dd><input name="width" type="text" id="width" size="3" value="{USER_AVATAR_WIDTH}" /> <span>{L_PIXEL} × </span> <input type="text" name="height" size="3" value="{USER_AVATAR_HEIGHT}" /> <span>{L_PIXEL}</span></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_DISPLAY_GALLERY -->
|
||||
|
@@ -124,13 +124,6 @@
|
||||
<dd><input name="ban_give_reason" type="text" class="text medium" maxlength="3000" id="ban_give_reason" /></dd>
|
||||
</dl>
|
||||
</div>
|
||||
<!-- IF not S_OWN_ACCOUNT -->
|
||||
<dl>
|
||||
<dt><label for="delete_user">{L_DELETE_USER}:</label><br /><span>{L_DELETE_USER_EXPLAIN}</span></dt>
|
||||
<dd><input type="checkbox" class="radio" name="delete" value="1" /></dd>
|
||||
<dd><select id="delete_user" name="delete_type"><option value="retain">{L_RETAIN_POSTS}</option><option value="remove">{L_DELETE_POSTS}</option></select></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<p class="quick">
|
||||
<input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
|
||||
@@ -141,4 +134,20 @@
|
||||
|
||||
</form>
|
||||
|
||||
<!-- IF not S_OWN_ACCOUNT -->
|
||||
<form id="user_delete" method="post" action="{U_ACTION}">
|
||||
<fieldset>
|
||||
<legend>{L_DELETE_USER}</legend>
|
||||
<dl>
|
||||
<dt><label for="delete_type">{L_DELETE_USER}:</label><br /><span>{L_DELETE_USER_EXPLAIN}</span></dt>
|
||||
<dd><select id="delete_type" name="delete_type"><option value="retain">{L_RETAIN_POSTS}</option><option value="remove">{L_DELETE_POSTS}</option></select></dd>
|
||||
</dl>
|
||||
<p class="quick">
|
||||
<input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
|
||||
<input type="hidden" name="delete" value="1" />
|
||||
{S_FORM_TOKEN}
|
||||
</p>
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
</form>
|
||||
<!-- ENDIF -->
|
||||
|
@@ -195,7 +195,6 @@ li {
|
||||
width: 76%;
|
||||
margin: 0 0 0 3%;
|
||||
min-height: 350px;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.rtl #main {
|
||||
@@ -205,7 +204,6 @@ li {
|
||||
|
||||
* html #main {
|
||||
height: 350px;
|
||||
overflow-x: visible;
|
||||
}
|
||||
|
||||
#page-body.simple-page-body {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<dl>
|
||||
<dt><label for="answer">{L_CONFIRM_QUESTION}:</label><br /><span>{L_CONFIRM_QUESTION_EXPLAIN}</span></dt>
|
||||
<dt><label for="answer"><!-- IF QA_CONFIRM_QUESTION --> {QA_CONFIRM_QUESTION} <!-- ELSE --> {L_CONFIRM_QUESTION} <!-- ENDIF -->:</label><br /><span>{L_CONFIRM_QUESTION_EXPLAIN}</span></dt>
|
||||
|
||||
<dd>
|
||||
<input type="text" tabindex="10" name="answer" id="answer" size="45" class="inputbox autowidth" title="{L_ANSWER}" />
|
||||
|
@@ -1,13 +1,21 @@
|
||||
<!-- IF S_RECAPTCHA_AVAILABLE -->
|
||||
<dl>
|
||||
<dd>
|
||||
<script type="text/javascript" src="{RECAPTCHA_SERVER}/challenge?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}">
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
var RecaptchaOptions = {
|
||||
lang : {L_RECAPTCHA_LANG}
|
||||
lang : '{LA_RECAPTCHA_LANG}'
|
||||
};
|
||||
// ]]>
|
||||
</script>
|
||||
<script type="text/javascript" src="{RECAPTCHA_SERVER}/challenge?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}"></script>
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
|
||||
document.getElementById('recaptcha_table').style.direction = 'ltr';
|
||||
<!-- ENDIF -->
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
|
||||
<noscript>
|
||||
|
22
phpBB/adm/style/confirm_bbcode.html
Normal file
22
phpBB/adm/style/confirm_bbcode.html
Normal file
@@ -0,0 +1,22 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<form id="confirm" method="post" action="{S_CONFIRM_ACTION}">
|
||||
<div class="errorbox">
|
||||
<h3>{L_WARNING}</h3>
|
||||
<p>{MESSAGE_TEXT}</p>
|
||||
</div>
|
||||
<fieldset>
|
||||
|
||||
|
||||
{S_HIDDEN_FIELDS}
|
||||
|
||||
<div style="text-align: center;">
|
||||
<input type="submit" name="confirm" value="{L_YES}" class="button2" />
|
||||
<input type="submit" name="cancel" value="{L_CANCEL}" class="button2" />
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
@@ -19,8 +19,12 @@ if (!defined('IN_PHPBB'))
|
||||
$starttime = explode(' ', microtime());
|
||||
$starttime = $starttime[1] + $starttime[0];
|
||||
|
||||
// Report all errors, except notices
|
||||
error_reporting(E_ALL ^ E_NOTICE);
|
||||
// Report all errors, except notices and deprecation messages
|
||||
if (!defined('E_DEPRECATED'))
|
||||
{
|
||||
define('E_DEPRECATED', 8192);
|
||||
}
|
||||
error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);
|
||||
|
||||
/*
|
||||
* Remove variables created by register_globals from the global scope
|
||||
@@ -172,7 +176,8 @@ if (defined('DEBUG_EXTRA'))
|
||||
}
|
||||
|
||||
// Load Extensions
|
||||
if (!empty($load_extensions))
|
||||
// dl() is deprecated and disabled by default as of PHP 5.3.
|
||||
if (!empty($load_extensions) && function_exists('dl'))
|
||||
{
|
||||
$load_extensions = explode(',', $load_extensions);
|
||||
|
||||
|
@@ -1198,7 +1198,6 @@ function get_schema_struct()
|
||||
'PRIMARY_KEY' => 'log_id',
|
||||
'KEYS' => array(
|
||||
'log_type' => array('INDEX', 'log_type'),
|
||||
'log_time' => array('INDEX', 'log_time'),
|
||||
'forum_id' => array('INDEX', 'forum_id'),
|
||||
'topic_id' => array('INDEX', 'topic_id'),
|
||||
'reportee_id' => array('INDEX', 'reportee_id'),
|
||||
@@ -1747,6 +1746,7 @@ function get_schema_struct()
|
||||
),
|
||||
'PRIMARY_KEY' => array('user_id', 'topic_id'),
|
||||
'KEYS' => array(
|
||||
'topic_id' => array('INDEX', 'topic_id'),
|
||||
'forum_id' => array('INDEX', 'forum_id'),
|
||||
),
|
||||
);
|
||||
|
@@ -21,9 +21,9 @@ rm FILELIST.$$
|
||||
|
||||
for i in $(cat FILELIST); do
|
||||
if [ -f $i ]; then
|
||||
sed -e s/
|
||||
//g $i > $i.tmp
|
||||
mv $i.tmp $i
|
||||
cat $i | tr -d '\r' > $i.tmp
|
||||
mv $i.tmp $i
|
||||
fi
|
||||
done
|
||||
rm FILELIST
|
||||
|
||||
|
@@ -114,10 +114,14 @@ $uniarray = array(
|
||||
|
||||
$copy = $uniarray;
|
||||
|
||||
/**
|
||||
* @todo we need to check that the $uniarray does not reverse any of the mappings defined in the unicode definition
|
||||
*/
|
||||
|
||||
foreach ($array as $value)
|
||||
{
|
||||
$temp_hold = implode(array_map('utf8_chr', array_map('hexdec', explode(' ', trim($value[2])))));
|
||||
|
||||
|
||||
if (isset($copy[utf8_chr(hexdec((string)$value[1]))]))
|
||||
{
|
||||
$num = '';
|
||||
|
@@ -688,7 +688,6 @@ function get_schema_struct()
|
||||
'PRIMARY_KEY' => 'log_id',
|
||||
'KEYS' => array(
|
||||
'log_type' => array('INDEX', 'log_type'),
|
||||
'log_time' => array('INDEX', 'log_time'),
|
||||
'forum_id' => array('INDEX', 'forum_id'),
|
||||
'topic_id' => array('INDEX', 'topic_id'),
|
||||
'reportee_id' => array('INDEX', 'reportee_id'),
|
||||
@@ -796,6 +795,7 @@ function get_schema_struct()
|
||||
'poster_ip' => array('INDEX', 'poster_ip'),
|
||||
'poster_id' => array('INDEX', 'poster_id'),
|
||||
'post_approved' => array('INDEX', 'post_approved'),
|
||||
'post_username' => array('INDEX', 'post_username'),
|
||||
'tid_post_time' => array('INDEX', array('topic_id', 'post_time')),
|
||||
),
|
||||
);
|
||||
@@ -1236,6 +1236,7 @@ function get_schema_struct()
|
||||
),
|
||||
'PRIMARY_KEY' => array('user_id', 'topic_id'),
|
||||
'KEYS' => array(
|
||||
'topic_id' => array('INDEX', 'topic_id'),
|
||||
'forum_id' => array('INDEX', 'forum_id'),
|
||||
),
|
||||
);
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
*
|
||||
* phpBB3 <EFBFBD> Copyright 2000, 2002, 2005, 2007 phpBB Group
|
||||
* phpBB3 © Copyright 2000, 2002, 2005, 2007 phpBB Group
|
||||
* http://www.phpbb.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -20,39 +20,41 @@
|
||||
Please see: http://www.phpbb.com/about/team/ for a list of all the people currently
|
||||
involved in phpBB.
|
||||
|
||||
phpBB Lead Developer : Acyd Burn (Meik Sievertsen)
|
||||
phpBB Lead Developer: naderman (Nils Adermann)
|
||||
|
||||
phpBB Developers : APTX (Marek A. R.)
|
||||
bantu (Andreas Fischer)
|
||||
DavidMJ (David M.)
|
||||
dhn (Dominik Dr<44>scher)
|
||||
kellanved (Henry Sudhof)
|
||||
naderman (Nils Adermann)
|
||||
Terrafrost (Jim Wigginton)
|
||||
ToonArmy (Chris Smith)
|
||||
phpBB Developers: A_Jelly_Doughnut (Josh Woody)
|
||||
Acyd Burn (Meik Sievertsen) [Lead 09/2005 - 01/2010]
|
||||
APTX (Marek A. R.)
|
||||
bantu (Andreas Fischer)
|
||||
DavidMJ (David M.)
|
||||
dhn (Dominik Dröscher)
|
||||
kellanved (Henry Sudhof)
|
||||
Terrafrost (Jim Wigginton)
|
||||
ToonArmy (Chris Smith)
|
||||
|
||||
Contributions by : leviatan21 (Gabriel Vazquez)
|
||||
nickvergessen (Joas Schilling)
|
||||
Raimon (Raimon Meuldijk)
|
||||
rxu (Ruslan Uzdenov)
|
||||
Xore (Robert Hetzler)
|
||||
Contributions by: Brainy (Cullen Walsh)
|
||||
leviatan21 (Gabriel Vazquez)
|
||||
nickvergessen (Joas Schilling)
|
||||
Raimon (Raimon Meuldijk)
|
||||
rxu (Ruslan Uzdenov)
|
||||
Xore (Robert Hetzler)
|
||||
|
||||
|
||||
-- Previous Contributors --
|
||||
-- Former Contributors --
|
||||
|
||||
phpBB Project Manager : theFinn (James Atkinson) [Founder - 04/2007]
|
||||
SHS` (Jonathan Stanley)
|
||||
phpBB Project Manager: theFinn (James Atkinson) [Founder - 04/2007]
|
||||
SHS` (Jonathan Stanley)
|
||||
|
||||
phpBB Lead Developer : psoTFX (Paul S. Owen) [2001 - 09/2005]
|
||||
phpBB Lead Developer: psoTFX (Paul S. Owen) [2001 - 09/2005]
|
||||
|
||||
phpBB Developers : Ashe (Ludovic Arnaud) [10/2002 - 11/2003, 06/2006 - 10/2006]
|
||||
BartVB (Bart van Bragt) [11/2000 - 03/2006]
|
||||
GrahamJE (Graham Eames) [09/2005 - 11/2006]
|
||||
Vic D'Elfant (Vic D'Elfant) [04/2007 - 04/2009]
|
||||
phpBB Developers: Ashe (Ludovic Arnaud) [10/2002 - 11/2003, 06/2006 - 10/2006]
|
||||
BartVB (Bart van Bragt) [11/2000 - 03/2006]
|
||||
GrahamJE (Graham Eames) [09/2005 - 11/2006]
|
||||
Vic D'Elfant (Vic D'Elfant) [04/2007 - 04/2009]
|
||||
|
||||
-- Copyrights --
|
||||
|
||||
Visual Confirmation : Xore (Robert Hetzler)
|
||||
Visual Confirmation: Xore (Robert Hetzler)
|
||||
|
||||
Original subSilver by subBlue Design, Tom Beddard, (c) 2001 phpBB Group
|
||||
prosilver by subBlue Design, Tom Beddard, (c) 2004 phpBB Group
|
||||
|
@@ -53,6 +53,7 @@
|
||||
<ol>
|
||||
<li><a href="#changelog">Changelog</a>
|
||||
<ol style="list-style-type: lower-roman;">
|
||||
<li><a href="#v306">Changes since 3.0.6</a></li>
|
||||
<li><a href="#v305">Changes since 3.0.5</a></li>
|
||||
<li><a href="#v304">Changes since 3.0.4</a></li>
|
||||
<li><a href="#v303">Changes since 3.0.3</a></li>
|
||||
@@ -85,124 +86,227 @@
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
|
||||
<div class="content">
|
||||
<a name="v305"></a><h3>1.i. Changes since 3.0.5</h3>
|
||||
<a name="v306"></a><h3>1.i. Changes since 3.0.6</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Allow ban reason and length to be selected and copied in ACP and subsilver2 MCP. (Bug #51095)</li>
|
||||
<li>[Fix] Force full date for board online record date.</li>
|
||||
<li>[Fix] Correctly reset login keys if passed value is the current user. (Bug #54125)</li>
|
||||
<li>[Fix] Correctly set last modified headers. (Bug #54245, thanks Paul.J.Murphy)</li>
|
||||
<li>[Fix] Show correct HTML title when reporting private messages. (Bug #54375)</li>
|
||||
<li>[Fix] Correctly exclude subforums from ATOM Feeds. (Bug #54285)</li>
|
||||
<li>[Fix] Do not link to user profile in ATOM feed entry if post has been made by the guest user. (Bug #54275)</li>
|
||||
<li>[Fix] Make word censoring case insensitive. (Bug #54265)</li>
|
||||
<li>[Fix] Fulltext-MySQL search for keywords and username at the same time. (Bug #54325)</li>
|
||||
<li>[Fix] Various XHTML and CSS mistakes in prosilver and subsilver2. (Bugs #54705, #55895, #57505, #57875 - Patch by HardStyle)</li>
|
||||
<li>[Fix] Correctly show topic ATOM feed link when only post id is specified. (Bug #53025)</li>
|
||||
<li>[Fix] Cleanly handle forum/topic not found in ATOM Feeds. (Bug #54295)</li>
|
||||
<li>[Fix] PHP 5.3 compatibility: Check if function dl() exists before calling it. (Bug #54665)</li>
|
||||
<li>[Fix] PHP 5.3 compatibility: Disable E_DEPRECATED on startup to keep set_magic_quotes_runtime(0) quiet. (Bug #54495)</li>
|
||||
<li>[Fix] Correctly replace table prefix before inserting schema data into the database. (Bug #54815)</li>
|
||||
<li>[Fix] Correctly take post time instead of topic time for the overall forum feed statistics row. (Bug #55005)</li>
|
||||
<li>[Fix] Posting errors with CAPTCHAs using user::add_lang(). (Bug #55245)</li>
|
||||
<li>[Fix] Use memcache::replace() instead of memcache::set() for existing keys to prevent problems.</li>
|
||||
<li>[Fix] Check for required functions in eAccelerator. (Bug #54465)</li>
|
||||
<li>[Fix] Use correct RFC 3339 date format in ATOM feed. (Bug #55005)</li>
|
||||
<li>[Fix] Do not deliver topics from unreadable or passworded forums in the news feed. (Bug #54345)</li>
|
||||
<li>[Fix] Restore user language choice to compiled stylesheets. (Bug #54035)</li>
|
||||
<li>[Fix] Add missing language entries. (Bug #55095)</li>
|
||||
<li>[Fix] Do not permit unauthorised users to delete private messages from folder listing. (Bug #54355)</li>
|
||||
<li>[Fix] Correctly check for empty strings in custom profile fields. (Bug #55335)</li>
|
||||
<li>[Fix] Use correct options to parse BBCodes in signatures when previewing PMs.</li>
|
||||
<li>[Fix] Correct rendering of prosilver quick reply under IE6. (Bug #54115 - Patch by Raimon)</li>
|
||||
<li>[Fix] Correct wording for "How do I show an image below my username" question answer in FAQ. (Bug #23935)</li>
|
||||
<li>[Fix] Handle export of private messages where all recipients were deleted. (Bug #50985)</li>
|
||||
<li>[Fix] Correctly get unread status information for global announcements in search results.</li>
|
||||
<li>[Fix] Correctly handle global announcements in ATOM feeds.</li>
|
||||
<li>[Fix] Use correct limit config parameter in the News feed.</li>
|
||||
<li>[Fix] Restrict search for styles/../style.cfg to folders. (Bug #55665)</li>
|
||||
<li>[Fix] Add ability to disable overall (aka board-wide) feed.</li>
|
||||
<li>[Fix] Do not pass new_link parameter when creating a persistent connection with mysql. (Bug #55785)</li>
|
||||
<li>[Fix] Improved search query performance through sorting words by their occurance. (Bug #21555)</li>
|
||||
<li>[Fix] Correctly move sql_row_pointer forward when calling sql_fetchfield() on cached queries. (Bug #55865)</li>
|
||||
<li>[Fix] Remove item limit from "All forums" feed.</li>
|
||||
<li>[Fix] Do not use group colours for usernames on print view. (Bug #30315 - Patch by Pasqualle)</li>
|
||||
<li>[Fix] Pagination of User Notes in MCP uses two different config values. (Bug #56025)</li>
|
||||
<li>[Fix] List hidden groups on viewprofile where the viewing user is also a member. (Bug #31845)</li>
|
||||
<li>[Fix] Sort viewprofile group list by group name.</li>
|
||||
<li>[Fix] Strictly check whether a moderator can post in the destination forum when moving topic. (Bug #56255)</li>
|
||||
<li>[Fix] Added some error handling to the compress class.</li>
|
||||
<li>[Fix] Correctly determine permissions to show quick reply button. (Bug #56555)</li>
|
||||
<li>[Fix] Do not unsubscribe users from topics replying with quickreply. (Bug #56235)</li>
|
||||
<li>[Fix] Don't submit when pressing enter on preview button. (Bug #54395)</li>
|
||||
<li>[Fix] Load reCAPTCHA over https when using a secure connection to the board. (Bug #55755)</li>
|
||||
<li>[Fix] Clarify explanation of bump feature setting. (Bug #56075)</li>
|
||||
<li>[Fix] Properly paginate unapproved posts in the MCP. (Bug #56285)</li>
|
||||
<li>[Fix] Do not duplicate previous/next links in pagination text of moderator logs and user notes in MCP for subsilver2. (Bug #55045)</li>
|
||||
<li>[Fix] Do not automatically unsubscribe users from topics, when email and jabber is disabled.</li>
|
||||
<li>[Fix] Don't send activation email when user tries to change email without permission. (Bug #56335 - Fix by nrohler)</li>
|
||||
<li>[Fix] Replace hard coded "px" with translated language-string. (Bug #52495)</li>
|
||||
<li>[Fix] Correctly hover list menu in UCP and MCP for RTL languages. (Bug #49945)</li>
|
||||
<li>[Fix] Correctly orientate quoted text image on RTL languages. (Bug #33745)</li>
|
||||
<li>[Fix] Deprecate $allow_reply parameter to truncate_string() (Bug #56675)</li>
|
||||
<li>[Fix] Fall back to default language email template if specified file does not exist. (Bug #35595)</li>
|
||||
<li>[Fix] Update users last visit field correctly when changing activation status. (Bug #56185)</li>
|
||||
<li>[Fix] Database updater now separates ADD COLUMN from SET NOT NULL and SET DEFAULT, when using PostgreSQL <= 7.4 (Bug #54435)</li>
|
||||
<li>[Fix] Styles adjustment to correctly display an order of rtl/ltr mixed content. (Bugs #55485, #55545)</li>
|
||||
<li>[Fix] Fix language string for PM-Reports refering to post-data. (Bug #54745)</li>
|
||||
<li>[Fix] Do not store email templates in database. (Bug #54505)</li>
|
||||
<li>[Fix] Fix javascript bug in the smilies ACP. (Bug #55725)</li>
|
||||
<li>[Fix] Unify BBCode Selection across browsers. (Bug #38765)</li>
|
||||
<li>[Fix] Allow convertors to read in configuration from files. (Bug #57265 - Patch by Dicky)</li>
|
||||
<li>[Fix] Fix problems with firebird by no longer using 'count' as a column alias. (Bug #57455)</li>
|
||||
<li>[Fix] Small language correction for the FAQ page. (Bug #57825)</li>
|
||||
<li>[Fix] Restrict search for language/../iso.txt to folders. (Bug #57795)</li>
|
||||
<li>[Fix] Make user_email_hash() function independent from system's architecture. (Bug #57755)</li>
|
||||
<li>[Fix] Correct behavior of "force_approved_state" when value is false. (Bug #57715)</li>
|
||||
<li>[Fix] Global announcements could not be accessed on a board using Firebird as the database server. (Bug #57525)</li>
|
||||
<li>[Fix] BBCode parser now uses the user object for all settings rather than taking some from the template object (Bug #57365)</li>
|
||||
<li>[Fix] Ensure a database connection is available before logging general errors. (Bug #57975)</li>
|
||||
<li>[Fix] Do not delete unrelated attachments when deleting empty forums. (Bug #57375)</li>
|
||||
<li>[Fix] Update: Store expected resulting file contents in cache and do not suggest further merges if the contents match, also fixes infinite merge loop (Bug #54075)</li>
|
||||
<li>[Change] Move redirect into a hidden field to avoid issues with mod_security. (Bug #54145)</li>
|
||||
<li>[Change] Log activation through inactive users ACP. (Bug #30145)</li>
|
||||
<li>[Change] Send time of last item instead of current time in ATOM Feeds. (Bug #53305)</li>
|
||||
<li>[Change] Use em dash instead of hyphen/minus as separator in ATOM Feeds item statistics. (Bug #53565)</li>
|
||||
<li>[Change] Alter ACP user quick tools interface to reduce confusion with the delete operation.</li>
|
||||
<li>[Change] Send statistics now check for IPv6 and send private network status as a boolean.</li>
|
||||
<li>[Change] Split "All topics" feed into "New Topics" and "Active Topics" feeds.</li>
|
||||
<li>[Change] Forum feed no longer includes posts of subforums.</li>
|
||||
<li>[Change] Show login attempt CAPTCHA option in the captcha plugin module.</li>
|
||||
<li>[Change] It is no longer possible to persist a solution for the login CAPTCHA.</li>
|
||||
<li>[Change] SQLite is no longer autoloaded by the installer. (Bug #56105)</li>
|
||||
<li>[Change] Friends and foes will not show up as private message rule options if their respective UCP modules are disabled. (Bug #51155)</li>
|
||||
<li>[Change] Offer for guests to log in for egosearch and unreadposts search before the search permissions check. (Bug #51585)</li>
|
||||
<li>[Change] Show warning box for users of PHP < 5.2.0 about phpBB ending support.</li>
|
||||
<li>[Change] Disallow deleting the last question of the Q&A CAPTCHA.</li>
|
||||
<li>[Change] Tweak Q&A CAPTCHA garbage collection.</li>
|
||||
<li>[Change] Show a proper preview for the Q&A CAPTCHA. (Bug #56365)</li>
|
||||
<li>[Change] Speed up topic move operation by adding an index for topic_id on the topics track table. (Bug #56545)</li>
|
||||
<li>[Change] Warn users about potentially dangerous BBcodes.</li>
|
||||
<li>[Feature] Ability to use HTTP authentication in ATOM feeds by passing the GET parameter "auth=http".</li>
|
||||
<li>[Feature] Add INTTEXT token type to custom bbcodes to allow non-ASCII letters in html attributes.</li>
|
||||
<li>[Feature] Add ability to enable quick reply in all forums.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<a name="v305"></a><h3>1.ii. Changes since 3.0.5</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Allow whitespaces in avatar gallery names. (Bug #44955)</li>
|
||||
<li>[Fix] Sorting by author or subject on viewtopic now preserves the order. (Bug #44875)</li>
|
||||
<li>[Fix] Correctly determine writable status of files on Windows operating system. (Bug #39035)</li>
|
||||
<li>[Fix] Show report button in prosilver for guests who are allowed to report posts. (Bug #45695 - Patch by bantu)</li>
|
||||
<li>[Fix] Correctly show private message history (Bug #46065 - Patch by bantu)</li>
|
||||
<li>[Fix] Various XHTML mistakes in prosilver, subsilver2 and the ACP. (Bugs #25545 - Patch by bantu, #26315, #38555, #45505 - Patch by Raimon, #45785, #45865, #47085 - Patch by Raimon)</li>
|
||||
<li>[Fix] Fix some ACP style issues (Bug #45975 - Patch by leviatan21, Bug #16109 - Patch by prototech)</li>
|
||||
<li>[Fix] Move post bump information markup to the template. (Bug #34295 - Patch by bantu)</li>
|
||||
<li>[Fix] Show error in the ACP when template folder is not readable. (Bug #45705 - Patch by bantu)</li>
|
||||
<li>[Fix] Adjust viewonline filename regular expression to be less strict. (Bug #46215 - Patch by bantu)</li>
|
||||
<li>[Fix] Correctly apply the can change vote permission again. Regression introduced in r9470. (Bug #45895)</li>
|
||||
<li>[Fix] Also remove data from friend/foe table when deleting user. (Bug #45345 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Correctly determine writable status of files on Windows operating systems. (Bug #39035)</li>
|
||||
<li>[Fix] Show report button in prosilver for guests who are allowed to report posts. (Bug #45695)</li>
|
||||
<li>[Fix] Correctly show private message history. (Bug #46065)</li>
|
||||
<li>[Fix] Various XHTML mistakes in prosilver, subsilver2 and the ACP. (Bugs #25545, #26315, #38555, #45505 - Patch by Raimon, #45785, #45865, #47085 - Patch by Raimon)</li>
|
||||
<li>[Fix] Fix some ACP style issues. (Bug #16109 - Patch by prototech)</li>
|
||||
<li>[Fix] Move post bump information markup to the template. (Bug #34295)</li>
|
||||
<li>[Fix] Show error in the ACP when template folder is not readable. (Bug #45705)</li>
|
||||
<li>[Fix] Adjust viewonline filename regular expression to be less strict. (Bug #46215)</li>
|
||||
<li>[Fix] Correctly apply the "can change vote" permission again. Regression introduced in r9470. (Bug #45895)</li>
|
||||
<li>[Fix] Remove data from friend/foe table when deleting user. (Bug #45345)</li>
|
||||
<li>[Fix] Correctly hide skiplink in prosilver right-to-left mode. (Bug #45765 - Patch by prototech and bantu)</li>
|
||||
<li>[Fix] Fix dynamic config update routine error if firebird is used (Bug #46315)</li>
|
||||
<li>[Fix] Allow friends/foes to be added and removed at the same time. (Bug #46255 - Patch by bantu)</li>
|
||||
<li>[Fix] Only change topic/post icon if icons are enabled and user is allowed to. (Bug #46355 - Patch by bantu)</li>
|
||||
<li>[Fix] Fix dynamic config update routine error if firebird is used. (Bug #46315)</li>
|
||||
<li>[Fix] Allow friends/foes to be added and removed at the same time. (Bug #46255)</li>
|
||||
<li>[Fix] Only change topic/post icon on edit if icons are enabled and user is allowed to use icons. (Bug #46355)</li>
|
||||
<li>[Fix] Fix saving custom profile fields in ACP if Oracle is used. (Bug #46015)</li>
|
||||
<li>[Fix] Make view_log() more resilient to corrupt serialized data. (Bug #46545)</li>
|
||||
<li>[Fix] Show error if hostname lookup doesn't return a valid IP address when banning. (Bug #45585 - Patch by bantu)</li>
|
||||
<li>[Fix] Show error if hostname lookup doesn't return a valid IP address when banning. (Bug #45585)</li>
|
||||
<li>[Fix] Fix incorrect layout when loading private message draft. (Bug #38435 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Show proper error message when trying to add bots to friends/foes list. (Bug #40205 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Fix Oracle database backup (Bug #46715)</li>
|
||||
<li>[Fix] Update attachments table when deleting user and retaining his posts. (Bug #40245 - Patch by rxu)</li>
|
||||
<li>[Fix] Correctly detect files in subfolders when viewing cached template files. (Bug #46145 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Display user's Jabber address in popup when Jabber functionality is disabled (Bug #20775 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Correctly exclude forums from active topics list. (Bug #19135 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Do not display birthdays of banned users (Bug #20625 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Fix function to recalculate Nested Sets (Bug #41555 - Patch by EXreaction)</li>
|
||||
<li>[Fix] Display but also highlight already used rank images when creating new ranks. (Bug #22665 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Correctly orientate quoted text image on RTL languages (Bug #33745 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Do not display "View user notes" and "Warn user" links in user profile if corresponding MCP modules are disabled. (Bug #10519 - Patch by rxu)</li>
|
||||
<li>[Fix] Show proper error message when trying to create a private messages folder with an empty name. (Bug #39875 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] No longer state that it is possible to manage group leaders from the UCP. (Bug #19945 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Show proper error message when trying to add bots to friends/foes list. (Bug #40205)</li>
|
||||
<li>[Fix] Fixed database backup and restore with Oracle DBMS. (Bug #46715)</li>
|
||||
<li>[Fix] Update attachments table when deleting user and retaining his posts. (Bug #40245)</li>
|
||||
<li>[Fix] Correctly detect files in subfolders when viewing cached template files. (Bug #46145)</li>
|
||||
<li>[Fix] Display user's jabber address in popup if jabber functionality is disabled. (Bug #20775)</li>
|
||||
<li>[Fix] Correctly exclude forums from active topics list. (Bug #19135)</li>
|
||||
<li>[Fix] Do not display banned users in birthday list. (Bug #20625)</li>
|
||||
<li>[Fix] Fix function to recalculate nested sets. (Bug #41555 - Patch by EXreaction)</li>
|
||||
<li>[Fix] Display but also highlight already used rank images while assigning new ranks. (Bug #22665)</li>
|
||||
<li>[Fix] Correctly orientate quoted text image on RTL languages. (Bug #33745)</li>
|
||||
<li>[Fix] Do not display "View user notes" and "Warn user" links in user profile if corresponding MCP modules are disabled. (Bug #10519)</li>
|
||||
<li>[Fix] Show proper error message when trying to create a private messages folder with an empty name. (Bug #39875)</li>
|
||||
<li>[Fix] No longer state that it is possible to manage group leaders from the UCP. (Bug #19945)</li>
|
||||
<li>[Fix] Do not throw an error when PDO is a shared module and not loaded preventing SQLite from being loaded.</li>
|
||||
<li>[Fix] Fix censoring of unicode words. (Bug #16555 - Patches by rxu)</li>
|
||||
<li>[Fix] Display coloured usernames in ACP groups management screens</li>
|
||||
<li>[Fix] Correctly describe founder permissions on trace-information (Bug #37235 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Correct the width value for poll_center.gif omitted in imageset.cfg for subsilver2. (Bug #43005 - Patch by rxu)</li>
|
||||
<li>[Fix] Correctly load complex language variable using acp_language (Bug #45735 - Patch by leviatan21)</li>
|
||||
<li>[Fix] Fix reapply_sid() to correctly strip session id in certain circumstances (Bug #43125 - Patch by leviatan21)</li>
|
||||
<li>[Fix] Correctly state why one language pack is marked with an asterisk in the ACP. (Bug #37565 - Patch by bantu)</li>
|
||||
<li>[Fix] Correctly check if install directory is still present. (Bug #46965 - Patch by rxu)</li>
|
||||
<li>[Fix] Correct banned user behaviour when "force password change" is enabled (Bug #47145 - Patch by nickvergessen and leviatan21)</li>
|
||||
<li>[Fix] Fix censoring of unicode words. (Bug #16555)</li>
|
||||
<li>[Fix] Display coloured usernames in ACP groups management screens.</li>
|
||||
<li>[Fix] Correctly describe founder permissions on trace-information. (Bug #37235)</li>
|
||||
<li>[Fix] Correct the width value for poll_center.gif omitted in imageset.cfg for subsilver2. (Bug #43005)</li>
|
||||
<li>[Fix] Correctly load complex language variable using acp_language. (Bug #45735 - Patch by leviatan21)</li>
|
||||
<li>[Fix] Fix reapply_sid() to correctly strip session id in certain circumstances. (Bug #43125 - Patch by leviatan21)</li>
|
||||
<li>[Fix] Correctly state why one language pack is marked with an asterisk in the ACP. (Bug #37565)</li>
|
||||
<li>[Fix] Correctly check if install directory is still present. (Bug #46965)</li>
|
||||
<li>[Fix] Correct banned user behaviour when "force password change" is enabled. (Bug #47145 - Patch by nickvergessen and leviatan21)</li>
|
||||
<li>[Fix] Correctly display ACP logs options, without permission to clear logs. (Bug #24155 - Patch by leviatan21)</li>
|
||||
<li>[Fix] Display topic icons in MCP forum view again (only prosilver).</li>
|
||||
<li>[Fix] Properly display post status messages in topic when post is reported and unapproved (Bug #44455 - Patch by leviatan21)</li>
|
||||
<li>[Fix] Do not remove recipients when loading private message draft. (Bug #38395 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Add author name to moderator log when deleting post/topic. (Bug #46225 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Fix broken "Report details" link in the MCP. (Bug #46975 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Resolve accesskey conflicts in prosilver. (Bug #44685 - Patch by bantu)</li>
|
||||
<li>[Fix] Check if template file is empty before trying to read from it. (Bug #47345 - Patch by bantu)</li>
|
||||
<li>[Fix] Correct descriptions of the permissions to use BBCode, smilies, images and flash to be more relevant. (Bug #36065 - Patch by rxu)</li>
|
||||
<li>[Fix] Do not remove recipients when loading private message draft. (Bug #38395)</li>
|
||||
<li>[Fix] Add author name to moderator log when deleting post/topic. (Bug #46225)</li>
|
||||
<li>[Fix] Fix broken "Report details" link in the MCP. (Bug #46975)</li>
|
||||
<li>[Fix] Resolve accesskey conflicts in prosilver. (Bug #44685)</li>
|
||||
<li>[Fix] Check if template file is empty before trying to read from it. (Bug #47345)</li>
|
||||
<li>[Fix] More descriptive descriptions for permissions to use BBCode, smilies, images and flash. (Bug #36065)</li>
|
||||
<li>[Fix] Fix style issues in print mode. (Bug #26375 - Patch by leviatan21)</li>
|
||||
<li>[Fix] Fix minor issue with L_QUOTE language string missing in several PM composing modes. (Bug #39625 - Patch by rxu)</li>
|
||||
<li>[Fix] Also fetch posts of guests and deleted or deactivated users when searching for author names. (Bug #36565, #47765 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Fix minor issue with L_QUOTE language string missing in several PM composing modes. (Bug #39625)</li>
|
||||
<li>[Fix] Also fetch posts of guests and deleted or deactivated users while searching for author names. (Bug #36565, #47765)</li>
|
||||
<li>[Fix] Show end of ban in MCP and ACP when user is banned by duration. (Bug #47815 - Patch by Pyramide)</li>
|
||||
<li>[Fix] Correctly count posts awaiting approval in the MCP. (Bug #47685 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Display user's posts count in private message when it is equal to 0 (prosilver). (Bug #40155 - Patch by rxu)</li>
|
||||
<li>[Fix] Correctly count posts awaiting approval in the MCP. (Bug #47685)</li>
|
||||
<li>[Fix] Display user's posts count in private message when it is equal to 0 (prosilver). (Bug #40155)</li>
|
||||
<li>[Fix] Only allow users to disable word censor if globally allowed. (Bug #47575 - Patch by 00mohgta7)</li>
|
||||
<li>[Fix] Fix database updater and db tools to support multiple column changes/additions/removals with SQLite</li>
|
||||
<li>[Fix] Correctly detect GZIP status in debug mode. (Bug #24075 - Patch by rxu)</li>
|
||||
<li>[Fix] Posting smilies in view more smilies now work again in IE (Bug #46025 - Patch by leviatan21)</li>
|
||||
<li>[Fix] Properly convert and show filesize information. (Bug #47775 - Patch by bantu)</li>
|
||||
<li>[Fix] Add ability to prune users who never logged in. (Bug #44295 - Patch by rxu)</li>
|
||||
<li>[Fix] Show smilies and images in topic print view. (Bug #47265 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Force full date in private message print view. (Patch by nickvergessen)</li>
|
||||
<li>[Fix] Fix "Always show a scrollbar for short pages" for IE8 and Firefox 3.5 (Bug #47865 - Patch by stokerpiller)</li>
|
||||
<li>[Fix] Do not allow setting group as default group for pending users. (Bug #45675 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Fix database updater and db tools to support multiple column changes/additions/removals with SQLite.</li>
|
||||
<li>[Fix] Correctly detect GZIP status in debug mode. (Bug #24075)</li>
|
||||
<li>[Fix] Posting smilies in view more smilies screen now works again in IE. (Bug #46025 - Patch by leviatan21)</li>
|
||||
<li>[Fix] Properly convert and show filesize information. (Bug #47775)</li>
|
||||
<li>[Fix] Add ability to prune users who never logged in. (Bug #44295)</li>
|
||||
<li>[Fix] Show smilies and images in topic print view. (Bug #47265)</li>
|
||||
<li>[Fix] Force full date in private message print view.</li>
|
||||
<li>[Fix] Fix "Always show a scrollbar for short pages" for IE8 and Firefox 3.5. (Bug #47865 - Patch by stokerpiller)</li>
|
||||
<li>[Fix] Do not allow setting group as default group for pending users. (Bug #45675)</li>
|
||||
<li>[Fix] Fail gracefully if store folder is not writable during update. (Bugs #46615, #46945)</li>
|
||||
<li>[Fix] Hide profile-icon from viewtopic-page if user has no permissions (subsilver2 only) (Bug #37635 - Patch by leviatan21)</li>
|
||||
<li>[Fix] Hide profile-icon from viewtopic page if user has no permissions (subsilver2 only). (Bug #37635 - Patch by leviatan21)</li>
|
||||
<li>[Fix] Correct escaping/unescaping in the LDAP authentication plugin. (Bug #48175)</li>
|
||||
<li>[Fix] Add hard limit for smilies.</li>
|
||||
<li>[Fix] Remove redundant SQL query from ucp.php. (Bug #40305)</li>
|
||||
<li>[Fix] Reorder frame order of animated subsilver2 topic icons to be useful when animation is disabled. (Bug #29385 - Patch by prototech)</li>
|
||||
<li>[Fix] Reorder frame order of animated subsilver2 topic icons to be useful when animations are disabled. (Bug #29385 - Patch by prototech)</li>
|
||||
<li>[Fix] Ensure user errors are displayed regardless of PHP settings. (Bug #47505)</li>
|
||||
<li>[Fix] Permit null values for non-required integer custom profile fields and ensure zero complies with the range limits. (Bug #40925)</li>
|
||||
<li>[Fix] Allow changing forum from select box under certain circumstances. (Bug #37525)</li>
|
||||
<li>[Fix] Display required fields notice on registration above the custom profile fields. (Bug #39665)</li>
|
||||
<li>[Fix] Copy poll options properly when copying topic. (Bug #39065)</li>
|
||||
<li>[Fix] Fix error with disapproval of topics having several queued posts only. (Bug #47705 - Patch by rxu)</li>
|
||||
<li>[Fix] Preserve newlines in template files (one newline had been always dropped after a template variable due to PHP's handling of closing tags)</li>
|
||||
<li>[Fix] Be less strict with FTP daemons when getting directory filelists. (Bug #46295)</li>
|
||||
<li>[Fix] Fix set_custom_template for database-stored styles (Bug #40515 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Banning an already banned user states to be successful, but has no effect (Bug #47825 - Patch by Pyramide)</li>
|
||||
<li>[Fix] Do not add style-parameter to URL again, after admin re-authentification (Bug #18005 - Patch by leviatan21)</li>
|
||||
<li>[Fix] Do not cut post-message in between HTML-Entities on search.php (Bug #31505 - Patch by leviatan21)</li>
|
||||
<li>[Fix] Correctly set attachment flag for topics, posts and pms after deleting attachments (Bug #48265 - Patch by MarcoDM and nickvergessen)</li>
|
||||
<li>[Fix] Fix error with disapproval of topics having several queued posts only. (Bug #47705)</li>
|
||||
<li>[Fix] Preserve newlines in template files (one newline had been always dropped after a template variable due to PHP's handling of closing tags).</li>
|
||||
<li>[Fix] Be less strict with FTP daemons for getting directory filelists. (Bug #46295)</li>
|
||||
<li>[Fix] Fix set_custom_template for database-stored styles. (Bug #40515)</li>
|
||||
<li>[Fix] Banning an already banned user states to be successful, but has no effect. (Bug #47825 - Patch by Pyramide)</li>
|
||||
<li>[Fix] Do not add style parameter again to URL after admin re-authentification. (Bug #18005 - Patch by leviatan21)</li>
|
||||
<li>[Fix] Do not cut post-message in between HTML-Entities on search.php. (Bug #31505 - Patch by leviatan21)</li>
|
||||
<li>[Fix] Correctly set attachment flag for topics, posts and pms after deleting attachments. (Bug #48265 - Patch by MarcoDM and nickvergessen)</li>
|
||||
<li>[Fix] Display "Locked" button instead of "Reply" one for locked forum in viewtopic (prosilver). (Bug #38055 - Patch by Raimon)</li>
|
||||
<li>[Fix] Correctly propagate umlauts over search result pages (Bug #33755)</li>
|
||||
<li>[Fix] Correctly propagate umlauts over search result pages. (Bug #33755)</li>
|
||||
<li>[Fix] Preserve post options when refusing to save the post as a draft. (Bug #39115)</li>
|
||||
<li>[Fix] Do not send private message back to sender if sender is in the same group the private message was sent to.</li>
|
||||
<li>[Fix] Correctly add user to a group making it a default one. (Bug #48345 - Patch by rxu)</li>
|
||||
<li>[Fix] Correctly add user to a group making it a default one. (Bug #48345)</li>
|
||||
<li>[Fix] Add log entry when copying forum permissions.</li>
|
||||
<li>[Fix] Min/max characters per posts no longer affects poll options (Bug #47295 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Correctly log action when users request to join a group (Bug #37585 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Min/max characters per posts no longer affects poll options. (Bug #47295)</li>
|
||||
<li>[Fix] Correctly log action when users request to join a group. (Bug #37585)</li>
|
||||
<li>[Fix] Do not try to create thumbnails for images we cannot open properly. (Bug #48695)</li>
|
||||
<li>[Fix] Apply locale-independent basename() to attachment filenames. New function added: utf8_basename(). (Bug #43335 - Patch by ocean=Yohsuke)</li>
|
||||
<li>[Fix] Adjust build_url() to not prepend $phpbb_root_path if path returned from redirect() is an URL. This fixes redirect issues with some installations and bridges. (Bug #47535)</li>
|
||||
<li>[Fix] Do not mark global announcements as read if all topics in a forum become read (Bug #15729).</li>
|
||||
<li>[Fix] Fix general error while registration, through undefined variable $config in validate_referer (Bug #49035 - Patch by wjvriend)</li>
|
||||
<li>[Fix] Fix general error in registration, caused by an undefined $config variable in validate_referer(). (Bug #49035 - Patch by wjvriend)</li>
|
||||
<li>[Fix] Correctly extract column default value when exporting PostgreSQL tables. (Bug #48955)</li>
|
||||
<li>[Fix] Allow updater to work correctly with PHP filename extensions other than ".php". (Bugs #15809, #49215)</li>
|
||||
<li>[Fix] Update search index if only post subject changed. (Bug #49435)</li>
|
||||
<li>[Fix] Fix who is online displaying incorrect data. (Bug #49485, thanks Brainy)</li>
|
||||
<li>[Fix] Fixed incorrect "topic does not exist" when unapproved posts were visited without global moderator permissions. (Bug #47795)</li>
|
||||
<li>[Fix] Fixed incorrect "topic does not exist" if unapproved posts were visited without global moderator permissions. (Bug #47795)</li>
|
||||
<li>[Fix] Prevent style switcher from blocking the tab key. (Bug #49335)</li>
|
||||
<li>[Fix] Correctly redirect on MCP main page after posts approval/disapproval from it. (Bug #49625)</li>
|
||||
<li>[Fix] Correctly redirect back to MCP main page after posts approval/disapproval from it. (Bug #49625)</li>
|
||||
<li>[Fix] Do not display topic approval status image for shadow topic if a user is not a moderator in the forum the topic has been moved to. (Bug #43295)</li>
|
||||
<li>[Fix] Fix email problems on servers with PHP installations not accepting RFC-compliant subject string passed to the the mail()-function. (Bug #46725)</li>
|
||||
<li>[Fix] Correctly orientate Control-Panel-Navigation background-image on RTL languages. (Bug #49945)</li>
|
||||
<li>[Fix] Fix email problems on servers with PHP installations not accepting RFC-compliant subject string passed to the mail()-function. (Bug #46725)</li>
|
||||
<li>[Fix] Correctly orientate control panel navigation background-image on RTL languages. (Bug #49945)</li>
|
||||
<li>[Fix] Sort private messages by message time and not message id. (Bug #50015)</li>
|
||||
<li>[Fix] Make sure only logs for existing users are displayed and user-specific logs removed on user deletion. (Bug #49855)</li>
|
||||
<li>[Fix] Only show "Add friend" and "Add foe" links if the specific module is enabled. (Bug #50475)</li>
|
||||
<li>[Fix] Correctly display list items in forum description in prosilver and administration. (Bug #48055 - Patch by leviatan21)</li>
|
||||
<li>[Fix] Fix handling of bookmarks and subscriptions on "split topics", "merge topics" and "merge posts". (Bug #50035)</li>
|
||||
<li>[Fix] Only embed cron.php if there is no cron lock present to reduce overhead. (Bug #45725 - Patch by TerryE)</li>
|
||||
<li>[Fix] Add header gradient back into subsilver2 but keep site logo easily replaceable with smaller and bigger ones. (Bug #11142 - Patch by dark/Rain and Raimon)</li>
|
||||
<li>[Fix] Send activation email when activating user from user settings. (Bug #43145)</li>
|
||||
@@ -211,45 +315,46 @@
|
||||
<li>[Fix] Fix icon alignment for forums with large descriptions in subsilver2. (Bug #50445)</li>
|
||||
<li>[Fix] Correctly display underlined links placed in last line in viewtopic. (Bug #14811 - Patch by primehalo)</li>
|
||||
<li>[Fix] Only check whether forum image exists if forum image is specified. (Bug #51905)</li>
|
||||
<li>[Fix] Fixed database backup and restore with Oracle DBMS.</li>
|
||||
<li>[Fix] Fixed database updater for changes to columns having default value in MSSQL (adding/dropping constraints)</li>
|
||||
<li>[Fix] Fixed database updater for changes to columns having default value in MSSQL (adding/dropping constraints).</li>
|
||||
<li>[Fix] Jabber SASL PLAIN authentication failures. (Bug #52995)</li>
|
||||
<li>[Fix] Check sort options on memberlist to avoid a general error. (Bug #53655)</li>
|
||||
<li>[Fix] Fix sql error in cache_moderators() if using postgresql. (Bug #53765)</li>
|
||||
<li>[Change] Database updater now supports checking for existing/missing indexes.</li>
|
||||
<li>[Change] submit_post() now accepts force_approved_state key passed to $data to indicate new posts being approved (true) or unapproved (false).</li>
|
||||
<li>[Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.</li>
|
||||
<li>[Change] Template engine now permits to a limited extent variable includes.</li>
|
||||
<li>[Change] Template engine now permits variable includes to a limited extent.</li>
|
||||
<li>[Change] Quote BBCode no longer requires the f_reply permission. (Bug #16079)</li>
|
||||
<li>[Change] Banning/unbanning users now generates an entry in their user notes (Bug #21825 - Patch by nickvergessen)</li>
|
||||
<li>[Change] Banning/unbanning users now generates an entry in their user notes. (Bug #21825)</li>
|
||||
<li>[Change] Smilies no longer require the f_bbcode permission. (Bug #26545)</li>
|
||||
<li>[Change] Ability to define column split in FAQ/BBCode help (Bug #31405)</li>
|
||||
<li>[Change] Changed behaviour of group_create() function to support specifying additional group columns</li>
|
||||
<li>[Change] Hide avatar when avatar-type is not allowed (Bug #46785 - Patch by cYbercOsmOnauT and nickvergessen)</li>
|
||||
<li>[Change] INCLUDEPHP not depending on phpbb_root_path (Bug #45805 - Patch by nickvergessen)</li>
|
||||
<li>[Change] Ability to define column split in FAQ/BBCode help. (Bug #31405)</li>
|
||||
<li>[Change] Changed behaviour of group_create() function to support specifying additional group columns.</li>
|
||||
<li>[Change] Hide avatar when avatar-type is not allowed. (Bug #46785 - Patch by cYbercOsmOnauT and nickvergessen)</li>
|
||||
<li>[Change] INCLUDEPHP paths are now relative to $phpbb_root_path. (Bug #45805)</li>
|
||||
<li>[Change] Ability to fetch moderators with get_moderators() even if load_moderators setting is off. (Bug #35955)</li>
|
||||
<li>[Change] "Post details" links with image in MCP. (Bug #39845 - Patch by leviatan21)</li>
|
||||
<li>[Change] PM history now only shows PMs of users you currently reply to. (Bug #39505 - Patch by nickvergessen)</li>
|
||||
<li>[Change] Show quote button for own PMs in PM history. (Bug #37285 - Patch by nickvergessen)</li>
|
||||
<li>[Change] PM history now only shows PMs of users you currently reply to. (Bug #39505)</li>
|
||||
<li>[Change] Show quote button for own PMs in PM history. (Bug #37285)</li>
|
||||
<li>[Change] Fetch requested cookie variables directly from cookie super global. (Bug #47785)</li>
|
||||
<li>[Change] Add confirmation for deactivating styles (Bug #14304 - Patch by leviatan21)</li>
|
||||
<li>[Change] Add confirmation for deactivating language packs (Patch by leviatan21)</li>
|
||||
<li>[Change] Add confirm-box when deleting permissions (Bug #13673 - Patch by nickvergessen)</li>
|
||||
<li>[Change] Add pagination for icons and smilies in the ACP and smilies in the smiley popup</li>
|
||||
<li>[Change] Add confirmation for deactivating styles. (Bug #14304 - Patch by leviatan21)</li>
|
||||
<li>[Change] Add confirmation for deactivating language packs. (Patch by leviatan21)</li>
|
||||
<li>[Change] Add confirmation for deleting permissions. (Bug #13673)</li>
|
||||
<li>[Change] Add pagination for icons and smilies in the ACP and smilies in the smiley popup.</li>
|
||||
<li>[Change] Cache get_username_string() function calls on viewtopic.</li>
|
||||
<li>[Change] Cache version check.</li>
|
||||
<li>[Change] When creating a new forum without copying permissions, ask again.</li>
|
||||
<li>[Change] Parse multiline url title for [url] BBCode tag. (Bug #1309)</li>
|
||||
<li>[Change] Introduce new parameter to page_header() for forum specific who is online listings.</li>
|
||||
<li>[Change] Lifted minimum requirement for Firebird DBMS from 2.0+ to 2.1+.</li>
|
||||
<li>[Change] Unapproved topics can no longer be replied to (Bug #44005, #47675, #23605)</li>
|
||||
<li>[Change] Require user to be registered and logged in to search for unread posts if topic read tracking is disabled for guests (Bug #49525)</li>
|
||||
<li>[Change] Allow three-digit hex notation in Color BBcode. (Bug #39965 - Patch by m0rpha)</li>
|
||||
<li>[Change] Changed minimum requirement for Firebird DBMS from 2.0+ to 2.1+.</li>
|
||||
<li>[Change] Unapproved topics can no longer be replied to. (Bug #44005, #47675, #23605)</li>
|
||||
<li>[Change] Require user to be registered and logged in to search for unread posts if topic read tracking is disabled for guests. (Bug #49525)</li>
|
||||
<li>[Change] Allow three-digit hex notation in color BBcode. (Bug #39965 - Patch by m0rpha)</li>
|
||||
<li>[Change] Simplified login_box() and redirection after login. S_LOGIN_ACTION can now be used on every page. (Bug #50285)</li>
|
||||
<li>[Change] Do not take edit post time into account for determining permission to delete last post in topic. (Bug #48615)</li>
|
||||
<li>[Change] Resize oversized Topic icons (Bug #44415)</li>
|
||||
<li>[Change] Banned IPs are now sorted (Bug #43045 - Patch by DavidIQ)</li>
|
||||
<li>[Change] Resize oversized topic icons. (Bug #44415)</li>
|
||||
<li>[Change] Banned IPs are now sorted. (Bug #43045 - Patch by DavidIQ)</li>
|
||||
<li>[Change] phpBB updater now skips sole whitespace/tab changes while computing differences. This reduces the chance of conflicts tremendously.</li>
|
||||
<li>[Change] phpBB updater now solves common conflicts on it's own. This further reduces the chance of conflicts.</li>
|
||||
<li>[Feature] Add language selection on the registration terms page (Bug #15085 - Patch by leviatan21)</li>
|
||||
<li>[Feature] Backported 3.2 captcha plugins.
|
||||
<li>[Change] phpBB updater now solves common conflicts on its own. This further reduces the chance of conflicts.</li>
|
||||
<li>[Feature] Add language selection to the registration terms page. (Bug #15085 - Patch by leviatan21)</li>
|
||||
<li>[Feature] Backported 3.2 captcha plugins:
|
||||
<ul>
|
||||
<li>Classic and GD CAPTCHA</li>
|
||||
<li>reCaptcha (based on API from recaptcha.net by Mike Crawford and Ben Maurer)</li>
|
||||
@@ -257,32 +362,32 @@
|
||||
<li>3D Wave (by Robert "Xore" Hetzler)</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>[Feature] Introduced new ACM plugins:
|
||||
<li>[Feature] Introduced new ACM (Cache) plugins:
|
||||
<ul>
|
||||
<li>null</li>
|
||||
<li>null (to disable caching completely)</li>
|
||||
<li><a href="http://pecl.php.net/package/memcache">memcache</a></li>
|
||||
<li><a href="http://pecl.php.net/package/APC">APC</a></li>
|
||||
<li><a href="http://xcache.lighttpd.net/">XCache</a></li>
|
||||
<li><a href="http://eaccelerator.net/">eAccelerator</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>[Feature] ATOM Feeds (Idea and diversed from RSS Feed 2.0 MOD (Version 1.0.8/9) by leviatan21)</li>
|
||||
<li>[Feature] New groups option to excempt group leaders from group permissions</li>
|
||||
<li>[Feature] ATOM Feeds (Idea from RSS Feed 2.0 MOD (Version 1.0.8/9) by leviatan21)</li>
|
||||
<li>[Feature] New groups option to excempt group leaders from group permissions.</li>
|
||||
<li>[Feature] New "Newly Registered Users" group for assigning permissions to newly registered users. They will be removed from this group once they reach a defineable amount of posts.</li>
|
||||
<li>[Feature] Ability to define if the "Newly Registered Users" group will be assigned as the default group to newly registered users.</li>
|
||||
<li>[Feature] Add new option to disable avatars board-wide (Bug #46785 - Patch by cYbercOsmOnauT and nickvergessen)</li>
|
||||
<li>[Feature] Enhance obtain_users_online_string to be able to return user-lists for other session-items (Bug #31975 - Patch by nickvergessen)</li>
|
||||
<li>[Feature] Add unapproved topic icon for moderators on forum list (Bug #46865 - Patch by nickvergessen)</li>
|
||||
<li>[Feature] Ability to define minimum number of characters for posts/pms</li>
|
||||
<li>[Feature] Store signature configuration options in database (Bug #45115 - Patch by rxu)</li>
|
||||
<li>[Feature] Add new option to disable avatars board-wide. (Bug #46785 - Patch by cYbercOsmOnauT and nickvergessen)</li>
|
||||
<li>[Feature] Enhance obtain_users_online_string to be able to return user-lists for other session items. (Bug #31975)</li>
|
||||
<li>[Feature] Add unapproved topic icon for moderators on forum list. (Bug #46865)</li>
|
||||
<li>[Feature] Ability to define minimum number of characters for posts/pms.</li>
|
||||
<li>[Feature] Store signature configuration options in database. (Bug #45115)</li>
|
||||
<li>[Feature] Add bare-bones quick-reply editor to viewtopic.</li>
|
||||
<li>[Feature] Detect when a post has been altered by someone else while editing. (Patch by bantu)</li>
|
||||
<li>[Feature] Add unread posts quick search option (Bug #46765 - Patch by rxu)</li>
|
||||
<li>[Feature] Add option to disable avatar uploads from remote locations. (Bug #45375 - Patch by nickvergessen)</li>
|
||||
<li>[Feature] Ability to delete warnings and keep warnings permanently (Bug #43375 - Patch by nickvergessen)</li>
|
||||
<li>[Feature] Detect if a post has been altered by someone else while editing.</li>
|
||||
<li>[Feature] Add unread posts quick search option. (Bug #46765)</li>
|
||||
<li>[Feature] Add option to disable avatar uploads from remote locations. (Bug #45375)</li>
|
||||
<li>[Feature] Ability to delete warnings and keep warnings permanently. (Bug #43375)</li>
|
||||
<li>[Feature] Ability to empty a user's outbox from the user ACP quick tools.</li>
|
||||
<li>[Feature] Ability to search ACP / MCP logs</li>
|
||||
<li>[Feature] Users can report PMs to moderators which are then visible in a new MCP module</li>
|
||||
<li>[Feature] Ability to search ACP/MCP logs.</li>
|
||||
<li>[Feature] Users can report PMs to moderators which are then visible in a new MCP module.</li>
|
||||
<li>[Feature] Parse email text files with the template engine.</li>
|
||||
<li>[Feature] Use email-style quoting when bbcodes are disabled.</li>
|
||||
<li>[Feature] Added new functionality to inactive users module:
|
||||
@@ -296,17 +401,18 @@
|
||||
</li>
|
||||
<li>[Feature] Display version check on ACP main page.</li>
|
||||
<li>[Feature] Ability to copy permissions from one forum to several other forums.</li>
|
||||
<li>[Feature] Ability to control the display of custom profile fields on viewtopic (Bug #48985).</li>
|
||||
<li>[Feature] Ability to control the display of custom profile fields on viewtopic. (Bug #48985)</li>
|
||||
<li>[Feature] Fallback options for missing language files. (Bug #38575 - Patch by EXreaction)</li>
|
||||
<li>[Feature] Separate PM Reply and PM Reply to all in prosilver.</li>
|
||||
<li>[Feature] Separate "PM Reply" and "PM Reply to all" in prosilver.</li>
|
||||
<li>[Feature] Place debug notices during captcha rendering in the error log - useful for debugging output already started errors.</li>
|
||||
<li>[Feature] Ability to define constant PHPBB_USE_BOARD_URL_PATH to use board url for images/avatars/ranks/imageset...</li>
|
||||
<li>[Feature] Added function to generate Email hash. (Bug #49195)</li>
|
||||
<li>[Feature] Style authors are now able to define the default submit button used for form submission on ENTER keypress on forms using more than one. Prosilver uses this for the posting page(s) and registration screen.</li>
|
||||
<li>[Feature] Ability to define constant PHPBB_USE_BOARD_URL_PATH to use board url for images/avatars/ranks/imageset (useful for bridges and applications using phpBB).</li>
|
||||
<li>[Feature] Added function to generate email hash. (Bug #49195)</li>
|
||||
<li>[Feature] Style authors are now able to define the default submit button used for form submission on ENTER keypress on forms using more than one submit button. Prosilver uses this for the posting page(s) and registration screen.</li>
|
||||
<li>[Feature] Ability to specify amount of time user is able to delete his last post in topic.</li>
|
||||
<li>[Feature] Send anonymous statistical information to phpBB on installation and update (optional).</li>
|
||||
</ul>
|
||||
<a name="v304"></a><h3>1.ii. Changes since 3.0.4</h3>
|
||||
|
||||
<a name="v304"></a><h3>1.iii. Changes since 3.0.4</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Delete user entry from ban list table upon user deletion (Bug #40015 - Patch by TerraFrost)</li>
|
||||
@@ -395,7 +501,7 @@
|
||||
<li>[Sec] Only use forum id supplied for posting if global announcement detected. (Reported by nickvergessen)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v303"></a><h3>1.iii. Changes since 3.0.3</h3>
|
||||
<a name="v303"></a><h3>1.iv. Changes since 3.0.3</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Allow mixed-case template directories to be inherited (Bug #36725)</li>
|
||||
@@ -427,7 +533,7 @@
|
||||
<li>[Sec] Ask for forum password if post within passworded forum quoted in private message. (Reported by nickvergessen)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v302"></a><h3>1.iv. Changes since 3.0.2</h3>
|
||||
<a name="v302"></a><h3>1.v. Changes since 3.0.2</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Correctly set topic starter if first post in topic removed (Bug #30575 - Patch by blueray2048)</li>
|
||||
@@ -526,7 +632,7 @@
|
||||
<li>[Sec Precaution] Stricter validation of the HTTP_HOST header (Thanks to Techie-Micheal et al for pointing out possible issues in derived code)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v301"></a><h3>1.v. Changes since 3.0.1</h3>
|
||||
<a name="v301"></a><h3>1.vi. Changes since 3.0.1</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Ability to set permissions on non-mysql dbms (Bug #24955)</li>
|
||||
@@ -574,7 +680,7 @@
|
||||
<li>[Sec] Only allow urls gone through redirect() being used within login_box(). (thanks nookieman)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v300"></a><h3>1.vi Changes since 3.0.0</h3>
|
||||
<a name="v300"></a><h3>1.vii Changes since 3.0.0</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Change] Validate birthdays (Bug #15004)</li>
|
||||
@@ -645,7 +751,7 @@
|
||||
<li>[Fix] Find and display colliding usernames correctly when converting from one database to another (Bug #23925)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc8"></a><h3>1.vii. Changes since 3.0.RC8</h3>
|
||||
<a name="v30rc8"></a><h3>1.viii. 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>
|
||||
@@ -654,7 +760,7 @@
|
||||
<li>[Fix] Call garbage_collection() within database updater to correctly close connections (affects Oracle for example)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc7"></a><h3>1.viii. Changes since 3.0.RC7</h3>
|
||||
<a name="v30rc7"></a><h3>1.ix. Changes since 3.0.RC7</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Fixed MSSQL related bug in the update system</li>
|
||||
@@ -689,7 +795,7 @@
|
||||
<li>[Fix] No duplication of active topics (Bug #15474)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc6"></a><h3>1.ix. Changes since 3.0.RC6</h3>
|
||||
<a name="v30rc6"></a><h3>1.x. Changes since 3.0.RC6</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Submitting language changes using acp_language (Bug #14736)</li>
|
||||
@@ -699,7 +805,7 @@
|
||||
<li>[Fix] Able to request new password (Bug #14743)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc5"></a><h3>1.x. Changes since 3.0.RC5</h3>
|
||||
<a name="v30rc5"></a><h3>1.xi. 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>
|
||||
@@ -762,7 +868,7 @@
|
||||
<li>[Sec] New password hashing mechanism for storing passwords (#i42)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc4"></a><h3>1.xi. Changes since 3.0.RC4</h3>
|
||||
<a name="v30rc4"></a><h3>1.xii. Changes since 3.0.RC4</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] MySQL, PostgreSQL and SQLite related database fixes (Bug #13862)</li>
|
||||
@@ -813,7 +919,7 @@
|
||||
<li>[Fix] odbc_autocommit causing existing result sets to be dropped (Bug #14182)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc3"></a><h3>1.xii. Changes since 3.0.RC3</h3>
|
||||
<a name="v30rc3"></a><h3>1.xiii. Changes since 3.0.RC3</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Fixing some subsilver2 and prosilver style issues</li>
|
||||
@@ -922,7 +1028,7 @@
|
||||
|
||||
</ul>
|
||||
|
||||
<a name="v30rc2"></a><h3>1.xiii. Changes since 3.0.RC2</h3>
|
||||
<a name="v30rc2"></a><h3>1.xiv. Changes since 3.0.RC2</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Re-allow searching within the memberlist</li>
|
||||
@@ -968,7 +1074,7 @@
|
||||
|
||||
</ul>
|
||||
|
||||
<a name="v30rc1"></a><h3>1.xiv. Changes since 3.0.RC1</h3>
|
||||
<a name="v30rc1"></a><h3>1.xv. Changes since 3.0.RC1</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] (X)HTML issues within the templates (Bug #11255, #11255)</li>
|
||||
|
@@ -273,7 +273,7 @@
|
||||
|
||||
<p>This package is meant for those wanting to only replace changed files from a previous version to the latest version. This package normally contains the changed files from up to five previous versions.</p>
|
||||
|
||||
<p>This package contains a number of archives, each contains the files changed from a given release to the latest version. You should select the appropriate archive for your current version, e.g. if you currently have <samp>3.0.5</samp> you should select the phpBB-3.0.5_to_3.0.6.zip/tar.gz file.</p>
|
||||
<p>This package contains a number of archives, each contains the files changed from a given release to the latest version. You should select the appropriate archive for your current version, e.g. if you currently have <samp>3.0.6</samp> you should select the phpBB-3.0.6_to_3.0.7.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>
|
||||
|
||||
@@ -285,7 +285,7 @@
|
||||
|
||||
<p>The patch file is one solution for those with many Modifications (MODs) or other changes who do not want to re-add them back to all the changed files if they use the method explained above. To use this you will need command line access to a standard UNIX type <strong>patch</strong> application. If you do not have access to such an application but still want to use this update approach, we strongly recommend the <a href="#update_auto">Automatic update package</a> explained below. It is also the recommended update method.</p>
|
||||
|
||||
<p>A number of patch files are provided to allow you to update from previous stable releases. Select the correct patch, e.g. if your current version is 3.0.5 you need the phpBB-3.0.5_to_3.0.6.patch file. Place the correct patch in the parent directory containing the phpBB3 core files (i.e. index.php, viewforum.php, etc.). With this done you should run the following command: <strong>patch -cl -d [PHPBB DIRECTORY] -p1 < [PATCH NAME]</strong> (where PHPBB DIRECTORY is the directory name your phpBB Installation resides in, for example phpBB3, and where PATCH NAME is the relevant filename of the selected patch file). This should complete quickly, hopefully without any HUNK FAILED comments.</p>
|
||||
<p>A number of patch files are provided to allow you to update from previous stable releases. Select the correct patch, e.g. if your current version is 3.0.5 you need the phpBB-3.0.6_to_3.0.7.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>
|
||||
|
||||
|
@@ -69,7 +69,7 @@
|
||||
<li><a href="#general">General Guidelines</a></li>
|
||||
</ol>
|
||||
</li>
|
||||
<li><a href="#styling">Styling</a></li>
|
||||
<li><a href="#styling">Styling</a>
|
||||
<ol style="list-style-type: lower-roman;">
|
||||
<li><a href="#cfgfiles">Style Config Files</a></li>
|
||||
<li><a href="#genstyling">General Styling Rules</a></li>
|
||||
@@ -125,7 +125,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 (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.
|
||||
<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.</p>
|
||||
|
||||
<a name="fileheader"></a><h3>1.ii. File Header</h3>
|
||||
|
||||
@@ -203,7 +203,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/4.1.x/5.x
|
||||
<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>
|
||||
<li><code>/includes/db/mysqli.php</code><br />MySQLi Database Abstraction Layer</li>
|
||||
<li><code>/includes/db/oracle.php</code><br />Oracle Database Abstraction Layer</li>
|
||||
<li><code>/includes/db/postgres.php</code><br />PostgreSQL Database Abstraction Layer</li>
|
||||
@@ -224,7 +224,7 @@ class ...
|
||||
<li><strong>styles</strong><br /><code>/styles</code>, <code>style.php</code><br />phpBB Styles/Templates/Themes/Imagesets</li>
|
||||
</ul>
|
||||
|
||||
<a name="constants"></a></h3>1.iv. Special Constants</h3>
|
||||
<a name="constants"></a><h3>1.iv. Special Constants</h3>
|
||||
|
||||
<p>There are some special constants application developers are able to utilize to bend some of phpBB's internal functionality to suit their needs.</p>
|
||||
|
||||
@@ -1170,24 +1170,13 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;
|
||||
<span class="comment"><!-- INCLUDE {FILE_VAR} --></span>
|
||||
</pre></div>
|
||||
|
||||
<p>Template defined variables can also be utilised.
|
||||
<p>Template defined variables can also be utilised.</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
<span class="comment"><!-- DEFINE $SOME_VAR = 'my_file.html' --></span>
|
||||
<span class="comment"><!-- INCLUDE {$SOME_VAR} --></span>
|
||||
</pre></div>
|
||||
<!-- no longer added in 3.0.6
|
||||
<p>Also added in <strong>3.0.6</strong> is the ability to increment or decrement a variable on use. This can be used for instances like tabindexes, where the amount of entries is not statically known.
|
||||
The INC (for incrementing) and DEC (for decrementing) commands will print the <strong>current</strong> state of a defined var and then increment/decrement it by one (postincrement/postdecrement).</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
<span class="comment"><!-- DEFINE $SOME_VAR = 1 --></span>
|
||||
<span class="comment"><!-- INC $SOME_VAR --></span>
|
||||
Result: 1<br />
|
||||
<span class="comment">{$SOME_VAR}</span>
|
||||
Result: 2<br />
|
||||
</pre></div>
|
||||
//-->
|
||||
<h4>PHP</h4>
|
||||
<p>A contentious decision has seen the ability to include PHP within the template introduced. This is achieved by enclosing the PHP within relevant tags:</p>
|
||||
|
||||
@@ -1541,11 +1530,11 @@ div
|
||||
<form method="post" id="mcp" action="{U_POST_ACTION}">
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
<input type="reset" value="{L_RESET}" name="reset" class="button2" />
|
||||
<input type="submit" name="action[add_warning]" value="{L_SUBMIT}" class="button1" />
|
||||
<input type="reset" value="{L_RESET}" name="reset" class="button2" />
|
||||
<input type="submit" name="action[add_warning]" value="{L_SUBMIT}" class="button1" />
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
</fieldset>
|
||||
</form>
|
||||
</pre></div><br />
|
||||
|
||||
<a name="inheritance"></a><h3>4.ii. Template Inheritance</h3>
|
||||
@@ -2337,7 +2326,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>The version control system for phpBB3 is subversion. The repository is available at <a href="http://code.phpbb.com/svn/phpbb" title="repository">http://code.phpbb.com/svn/phpbb</a>.
|
||||
<p>The version control system for phpBB3 is subversion. The repository is available at <a href="http://code.phpbb.com/svn/phpbb" title="repository">http://code.phpbb.com/svn/phpbb</a>.</p>
|
||||
|
||||
<a name="repostruct"></a><h3>7.i. Repository Structure</h3>
|
||||
|
||||
|
@@ -668,7 +668,7 @@ function set_modified_headers($stamp, $browser)
|
||||
$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 ($last_load !== false && $last_load >= $stamp)
|
||||
{
|
||||
if (substr(strtolower(@php_sapi_name()),0,3) === 'cgi')
|
||||
{
|
||||
|
1484
phpBB/feed.php
1484
phpBB/feed.php
File diff suppressed because it is too large
Load Diff
@@ -30,6 +30,7 @@ if (!class_exists('acm_memory'))
|
||||
class acm extends acm_memory
|
||||
{
|
||||
var $extension = 'eaccelerator';
|
||||
var $function = 'eaccelerator_get';
|
||||
|
||||
var $serialize_header = '#phpbb-serialized#';
|
||||
|
||||
|
@@ -410,7 +410,7 @@ class acm
|
||||
{
|
||||
if ($this->sql_row_pointer[$query_id] < sizeof($this->sql_rowset[$query_id]))
|
||||
{
|
||||
return (isset($this->sql_rowset[$query_id][$this->sql_row_pointer[$query_id]][$field])) ? $this->sql_rowset[$query_id][$this->sql_row_pointer[$query_id]][$field] : false;
|
||||
return (isset($this->sql_rowset[$query_id][$this->sql_row_pointer[$query_id]][$field])) ? $this->sql_rowset[$query_id][$this->sql_row_pointer[$query_id]++][$field] : false;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@@ -105,7 +105,11 @@ class acm extends acm_memory
|
||||
*/
|
||||
function _write($var, $data, $ttl = 2592000)
|
||||
{
|
||||
return $this->memcache->set($this->key_prefix . $var, $data, $this->flags, $ttl);
|
||||
if (!$this->memcache->replace($this->key_prefix . $var, $data, $this->flags, $ttl))
|
||||
{
|
||||
return $this->memcache->set($this->key_prefix . $var, $data, $this->flags, $ttl);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -47,6 +47,13 @@ class acm_memory
|
||||
|
||||
trigger_error("Could not find required extension [{$this->extension}] for the ACM module $acm_type.", E_USER_ERROR);
|
||||
}
|
||||
|
||||
if (isset($this->function) && !function_exists($this->function))
|
||||
{
|
||||
global $acm_type;
|
||||
|
||||
trigger_error("The required function [{$this->function}] is not available for the ACM module $acm_type.", E_USER_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -359,7 +366,7 @@ class acm_memory
|
||||
{
|
||||
if ($this->sql_row_pointer[$query_id] < sizeof($this->sql_rowset[$query_id]))
|
||||
{
|
||||
return (isset($this->sql_rowset[$query_id][$this->sql_row_pointer[$query_id]][$field])) ? $this->sql_rowset[$query_id][$this->sql_row_pointer[$query_id]][$field] : false;
|
||||
return (isset($this->sql_rowset[$query_id][$this->sql_row_pointer[$query_id]][$field])) ? $this->sql_rowset[$query_id][$this->sql_row_pointer[$query_id]++][$field] : false;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@@ -124,11 +124,11 @@ class acp_attachments
|
||||
'legend2' => $l_legend_cat_images,
|
||||
'img_display_inlined' => array('lang' => 'DISPLAY_INLINED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'img_create_thumbnail' => array('lang' => 'CREATE_THUMBNAIL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'img_max_thumb_width' => array('lang' => 'MAX_THUMB_WIDTH', 'validate' => 'int', 'type' => 'text:7:15', 'explain' => true, 'append' => ' px'),
|
||||
'img_max_thumb_width' => array('lang' => 'MAX_THUMB_WIDTH', 'validate' => 'int', 'type' => 'text:7:15', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
|
||||
'img_min_thumb_filesize' => array('lang' => 'MIN_THUMB_FILESIZE', 'validate' => 'int', 'type' => 'text:7:15', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']),
|
||||
'img_imagick' => array('lang' => 'IMAGICK_PATH', 'validate' => 'string', 'type' => 'text:20:200', 'explain' => true, 'append' => ' <span>[ <a href="' . $this->u_action . '&action=imgmagick">' . $user->lang['SEARCH_IMAGICK'] . '</a> ]</span>'),
|
||||
'img_max' => array('lang' => 'MAX_IMAGE_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' px'),
|
||||
'img_link' => array('lang' => 'IMAGE_LINK_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' px'),
|
||||
'img_max' => array('lang' => 'MAX_IMAGE_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
|
||||
'img_link' => array('lang' => 'IMAGE_LINK_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
|
||||
)
|
||||
);
|
||||
|
||||
|
@@ -124,121 +124,137 @@ class acp_bbcodes
|
||||
case 'modify':
|
||||
case 'create':
|
||||
|
||||
$data = $this->build_regexp($bbcode_match, $bbcode_tpl);
|
||||
|
||||
// Make sure the user didn't pick a "bad" name for the BBCode tag.
|
||||
$hard_coded = array('code', 'quote', 'quote=', 'attachment', 'attachment=', 'b', 'i', 'url', 'url=', 'img', 'size', 'size=', 'color', 'color=', 'u', 'list', 'list=', 'email', 'email=', 'flash', 'flash=');
|
||||
|
||||
if (($action == 'modify' && strtolower($data['bbcode_tag']) !== strtolower($row['bbcode_tag'])) || ($action == 'create'))
|
||||
$warn_text = preg_match('%<[^>]*\{text[\d]*\}[^>]*>%i', $bbcode_tpl);
|
||||
if (!$warn_text || confirm_box(true))
|
||||
{
|
||||
$sql = 'SELECT 1 as test
|
||||
FROM ' . BBCODES_TABLE . "
|
||||
WHERE LOWER(bbcode_tag) = '" . $db->sql_escape(strtolower($data['bbcode_tag'])) . "'";
|
||||
$result = $db->sql_query($sql);
|
||||
$info = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
$data = $this->build_regexp($bbcode_match, $bbcode_tpl);
|
||||
|
||||
// Grab the end, interrogate the last closing tag
|
||||
if ($info['test'] === '1' || in_array(strtolower($data['bbcode_tag']), $hard_coded) || (preg_match('#\[/([^[]*)]$#', $bbcode_match, $regs) && in_array(strtolower($regs[1]), $hard_coded)))
|
||||
// Make sure the user didn't pick a "bad" name for the BBCode tag.
|
||||
$hard_coded = array('code', 'quote', 'quote=', 'attachment', 'attachment=', 'b', 'i', 'url', 'url=', 'img', 'size', 'size=', 'color', 'color=', 'u', 'list', 'list=', 'email', 'email=', 'flash', 'flash=');
|
||||
|
||||
if (($action == 'modify' && strtolower($data['bbcode_tag']) !== strtolower($row['bbcode_tag'])) || ($action == 'create'))
|
||||
{
|
||||
trigger_error($user->lang['BBCODE_INVALID_TAG_NAME'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
}
|
||||
$sql = 'SELECT 1 as test
|
||||
FROM ' . BBCODES_TABLE . "
|
||||
WHERE LOWER(bbcode_tag) = '" . $db->sql_escape(strtolower($data['bbcode_tag'])) . "'";
|
||||
$result = $db->sql_query($sql);
|
||||
$info = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (substr($data['bbcode_tag'], -1) === '=')
|
||||
{
|
||||
$test = substr($data['bbcode_tag'], 0, -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$test = $data['bbcode_tag'];
|
||||
}
|
||||
|
||||
if (!preg_match('%\\[' . $test . '[^]]*].*?\\[/' . $test . ']%s', $bbcode_match))
|
||||
{
|
||||
trigger_error($user->lang['BBCODE_OPEN_ENDED_TAG'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if (strlen($data['bbcode_tag']) > 16)
|
||||
{
|
||||
trigger_error($user->lang['BBCODE_TAG_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if (strlen($bbcode_match) > 4000)
|
||||
{
|
||||
trigger_error($user->lang['BBCODE_TAG_DEF_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
|
||||
if (strlen($bbcode_helpline) > 255)
|
||||
{
|
||||
trigger_error($user->lang['BBCODE_HELPLINE_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$sql_ary = array(
|
||||
'bbcode_tag' => $data['bbcode_tag'],
|
||||
'bbcode_match' => $bbcode_match,
|
||||
'bbcode_tpl' => $bbcode_tpl,
|
||||
'display_on_posting' => $display_on_posting,
|
||||
'bbcode_helpline' => $bbcode_helpline,
|
||||
'first_pass_match' => $data['first_pass_match'],
|
||||
'first_pass_replace' => $data['first_pass_replace'],
|
||||
'second_pass_match' => $data['second_pass_match'],
|
||||
'second_pass_replace' => $data['second_pass_replace']
|
||||
);
|
||||
|
||||
if ($action == 'create')
|
||||
{
|
||||
$sql = 'SELECT MAX(bbcode_id) as max_bbcode_id
|
||||
FROM ' . BBCODES_TABLE;
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($row)
|
||||
{
|
||||
$bbcode_id = $row['max_bbcode_id'] + 1;
|
||||
|
||||
// Make sure it is greater than the core bbcode ids...
|
||||
if ($bbcode_id <= NUM_CORE_BBCODES)
|
||||
// Grab the end, interrogate the last closing tag
|
||||
if ($info['test'] === '1' || in_array(strtolower($data['bbcode_tag']), $hard_coded) || (preg_match('#\[/([^[]*)]$#', $bbcode_match, $regs) && in_array(strtolower($regs[1]), $hard_coded)))
|
||||
{
|
||||
$bbcode_id = NUM_CORE_BBCODES + 1;
|
||||
trigger_error($user->lang['BBCODE_INVALID_TAG_NAME'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
}
|
||||
|
||||
if (substr($data['bbcode_tag'], -1) === '=')
|
||||
{
|
||||
$test = substr($data['bbcode_tag'], 0, -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$bbcode_id = NUM_CORE_BBCODES + 1;
|
||||
$test = $data['bbcode_tag'];
|
||||
}
|
||||
|
||||
if ($bbcode_id > 1511)
|
||||
if (!preg_match('%\\[' . $test . '[^]]*].*?\\[/' . $test . ']%s', $bbcode_match))
|
||||
{
|
||||
trigger_error($user->lang['TOO_MANY_BBCODES'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
trigger_error($user->lang['BBCODE_OPEN_ENDED_TAG'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$sql_ary['bbcode_id'] = (int) $bbcode_id;
|
||||
if (strlen($data['bbcode_tag']) > 16)
|
||||
{
|
||||
trigger_error($user->lang['BBCODE_TAG_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$db->sql_query('INSERT INTO ' . BBCODES_TABLE . $db->sql_build_array('INSERT', $sql_ary));
|
||||
$cache->destroy('sql', BBCODES_TABLE);
|
||||
if (strlen($bbcode_match) > 4000)
|
||||
{
|
||||
trigger_error($user->lang['BBCODE_TAG_DEF_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$lang = 'BBCODE_ADDED';
|
||||
$log_action = 'LOG_BBCODE_ADD';
|
||||
|
||||
if (strlen($bbcode_helpline) > 255)
|
||||
{
|
||||
trigger_error($user->lang['BBCODE_HELPLINE_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$sql_ary = array(
|
||||
'bbcode_tag' => $data['bbcode_tag'],
|
||||
'bbcode_match' => $bbcode_match,
|
||||
'bbcode_tpl' => $bbcode_tpl,
|
||||
'display_on_posting' => $display_on_posting,
|
||||
'bbcode_helpline' => $bbcode_helpline,
|
||||
'first_pass_match' => $data['first_pass_match'],
|
||||
'first_pass_replace' => $data['first_pass_replace'],
|
||||
'second_pass_match' => $data['second_pass_match'],
|
||||
'second_pass_replace' => $data['second_pass_replace']
|
||||
);
|
||||
|
||||
if ($action == 'create')
|
||||
{
|
||||
$sql = 'SELECT MAX(bbcode_id) as max_bbcode_id
|
||||
FROM ' . BBCODES_TABLE;
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($row)
|
||||
{
|
||||
$bbcode_id = $row['max_bbcode_id'] + 1;
|
||||
|
||||
// Make sure it is greater than the core bbcode ids...
|
||||
if ($bbcode_id <= NUM_CORE_BBCODES)
|
||||
{
|
||||
$bbcode_id = NUM_CORE_BBCODES + 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$bbcode_id = NUM_CORE_BBCODES + 1;
|
||||
}
|
||||
|
||||
if ($bbcode_id > 1511)
|
||||
{
|
||||
trigger_error($user->lang['TOO_MANY_BBCODES'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$sql_ary['bbcode_id'] = (int) $bbcode_id;
|
||||
|
||||
$db->sql_query('INSERT INTO ' . BBCODES_TABLE . $db->sql_build_array('INSERT', $sql_ary));
|
||||
$cache->destroy('sql', BBCODES_TABLE);
|
||||
|
||||
$lang = 'BBCODE_ADDED';
|
||||
$log_action = 'LOG_BBCODE_ADD';
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'UPDATE ' . BBCODES_TABLE . '
|
||||
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
||||
WHERE bbcode_id = ' . $bbcode_id;
|
||||
$db->sql_query($sql);
|
||||
$cache->destroy('sql', BBCODES_TABLE);
|
||||
|
||||
$lang = 'BBCODE_EDITED';
|
||||
$log_action = 'LOG_BBCODE_EDIT';
|
||||
}
|
||||
|
||||
add_log('admin', $log_action, $data['bbcode_tag']);
|
||||
|
||||
trigger_error($user->lang[$lang] . adm_back_link($this->u_action));
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'UPDATE ' . BBCODES_TABLE . '
|
||||
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
||||
WHERE bbcode_id = ' . $bbcode_id;
|
||||
$db->sql_query($sql);
|
||||
$cache->destroy('sql', BBCODES_TABLE);
|
||||
|
||||
$lang = 'BBCODE_EDITED';
|
||||
$log_action = 'LOG_BBCODE_EDIT';
|
||||
confirm_box(false, $user->lang['BBCODE_DANGER'], build_hidden_fields(array(
|
||||
'action' => $action,
|
||||
'bbcode' => $bbcode_id,
|
||||
'bbcode_match' => $bbcode_match,
|
||||
'bbcode_tpl' => htmlspecialchars($bbcode_tpl),
|
||||
'bbcode_helpline' => $bbcode_helpline,
|
||||
'display_on_posting' => $display_on_posting,
|
||||
))
|
||||
, 'confirm_bbcode.html');
|
||||
}
|
||||
|
||||
add_log('admin', $log_action, $data['bbcode_tag']);
|
||||
|
||||
trigger_error($user->lang[$lang] . adm_back_link($this->u_action));
|
||||
|
||||
break;
|
||||
|
||||
case 'delete':
|
||||
@@ -299,6 +315,18 @@ class acp_bbcodes
|
||||
{
|
||||
$bbcode_match = trim($bbcode_match);
|
||||
$bbcode_tpl = trim($bbcode_tpl);
|
||||
$utf8 = strpos($bbcode_match, 'INTTEXT') !== false;
|
||||
|
||||
// make sure we have utf8 support
|
||||
$utf8_pcre_properties = false;
|
||||
if (version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.0', '>=')))
|
||||
{
|
||||
// While this is the proper range of PHP versions, PHP may not be linked with the bundled PCRE lib and instead with an older version
|
||||
if (@preg_match('/\p{L}/u', 'a') !== false)
|
||||
{
|
||||
$utf8_pcre_properties = true;
|
||||
}
|
||||
}
|
||||
|
||||
$fp_match = preg_quote($bbcode_match, '!');
|
||||
$fp_replace = preg_replace('#^\[(.*?)\]#', '[$1:$uid]', $bbcode_match);
|
||||
@@ -326,6 +354,9 @@ class acp_bbcodes
|
||||
'SIMPLETEXT' => array(
|
||||
'!([a-zA-Z0-9-+.,_ ]+)!' => "$1"
|
||||
),
|
||||
'INTTEXT' => array(
|
||||
($utf8_pcre_properties) ? '!([\p{L}\p{N}\-+,_. ]+)!u' : '!([a-zA-Z0-9\-+,_. ]+)!u' => "$1"
|
||||
),
|
||||
'IDENTIFIER' => array(
|
||||
'!([a-zA-Z0-9-_]+)!' => "$1"
|
||||
),
|
||||
@@ -343,6 +374,7 @@ class acp_bbcodes
|
||||
'EMAIL' => '(' . get_preg_expression('email') . ')',
|
||||
'TEXT' => '(.*?)',
|
||||
'SIMPLETEXT' => '([a-zA-Z0-9-+.,_ ]+)',
|
||||
'INTTEXT' => ($utf8_pcre_properties) ? '([\p{L}\p{N}\-+,_. ]+)' : '([a-zA-Z0-9\-+,_. ]+)',
|
||||
'IDENTIFIER' => '([a-zA-Z0-9-_]+)',
|
||||
'COLOR' => '([a-zA-Z]+|#[0-9abcdefABCDEF]+)',
|
||||
'NUMBER' => '([0-9]+)',
|
||||
@@ -350,6 +382,7 @@ class acp_bbcodes
|
||||
|
||||
$pad = 0;
|
||||
$modifiers = 'i';
|
||||
$modifiers .= ($utf8 && $utf8_pcre_properties) ? 'u' : '';
|
||||
|
||||
if (preg_match_all('/\{(' . implode('|', array_keys($tokens)) . ')[0-9]*\}/i', $bbcode_match, $m))
|
||||
{
|
||||
@@ -398,7 +431,7 @@ class acp_bbcodes
|
||||
}
|
||||
|
||||
$fp_match = '!' . $fp_match . '!' . $modifiers;
|
||||
$sp_match = '!' . $sp_match . '!s';
|
||||
$sp_match = '!' . $sp_match . '!s' . (($utf8) ? 'u' : '');
|
||||
|
||||
if (strpos($fp_match, 'e') !== false)
|
||||
{
|
||||
|
@@ -29,11 +29,12 @@ class acp_board
|
||||
{
|
||||
global $db, $user, $auth, $template;
|
||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
global $cache;
|
||||
|
||||
$user->add_lang('acp/board');
|
||||
|
||||
$action = request_var('action', '');
|
||||
$submit = (isset($_POST['submit'])) ? true : false;
|
||||
$submit = (isset($_POST['submit']) || isset($_POST['allow_quick_reply_enable'])) ? true : false;
|
||||
|
||||
$form_key = 'acp_board';
|
||||
add_form_key($form_key);
|
||||
@@ -88,7 +89,7 @@ class acp_board
|
||||
'allow_nocensors' => array('lang' => 'ALLOW_NO_CENSORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'allow_bookmarks' => array('lang' => 'ALLOW_BOOKMARKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'allow_birthdays' => array('lang' => 'ALLOW_BIRTHDAYS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'allow_quick_reply' => array('lang' => 'ALLOW_QUICK_REPLY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'allow_quick_reply' => array('lang' => 'ALLOW_QUICK_REPLY', 'validate' => 'bool', 'type' => 'custom', 'method' => 'quick_reply', 'explain' => true),
|
||||
|
||||
'legend2' => 'ACP_LOAD_SETTINGS',
|
||||
'load_birthdays' => array('lang' => 'YES_BIRTHDAYS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
@@ -172,7 +173,7 @@ class acp_board
|
||||
'allow_nocensors' => array('lang' => 'ALLOW_NO_CENSORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'allow_bookmarks' => array('lang' => 'ALLOW_BOOKMARKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'enable_post_confirm' => array('lang' => 'VISUAL_CONFIRM_POST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'allow_quick_reply' => array('lang' => 'ALLOW_QUICK_REPLY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'allow_quick_reply' => array('lang' => 'ALLOW_QUICK_REPLY', 'validate' => 'bool', 'type' => 'custom', 'method' => 'quick_reply', 'explain' => true),
|
||||
|
||||
'legend2' => 'POSTING',
|
||||
'bump_type' => false,
|
||||
@@ -266,14 +267,22 @@ class acp_board
|
||||
'legend1' => 'ACP_FEED_GENERAL',
|
||||
'feed_enable' => array('lang' => 'ACP_FEED_ENABLE', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
|
||||
'feed_item_statistics' => array('lang' => 'ACP_FEED_ITEM_STATISTICS', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true),
|
||||
'feed_limit' => array('lang' => 'ACP_FEED_LIMIT', 'validate' => 'int:5', 'type' => 'text:3:4', 'explain' => true),
|
||||
'feed_overall_forums' => array('lang' => 'ACP_FEED_OVERALL_FORUMS', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
|
||||
'feed_overall_forums_limit' => array('lang' => 'ACP_FEED_OVERALL_FORUMS_LIMIT', 'validate' => 'int:5', 'type' => 'text:3:4', 'explain' => false),
|
||||
'feed_overall_topics' => array('lang' => 'ACP_FEED_OVERALL_TOPIC', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
|
||||
'feed_overall_topics_limit' => array('lang' => 'ACP_FEED_OVERALL_TOPIC_LIMIT', 'validate' => 'int:5', 'type' => 'text:3:4', 'explain' => false),
|
||||
'feed_http_auth' => array('lang' => 'ACP_FEED_HTTP_AUTH', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true),
|
||||
|
||||
'legend2' => 'ACP_FEED_POST_BASED',
|
||||
'feed_limit_post' => array('lang' => 'ACP_FEED_LIMIT', 'validate' => 'int:5', 'type' => 'text:3:4', 'explain' => true),
|
||||
'feed_overall' => array('lang' => 'ACP_FEED_OVERALL', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
|
||||
'feed_forum' => array('lang' => 'ACP_FEED_FORUM', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
|
||||
'feed_topic' => array('lang' => 'ACP_FEED_TOPIC', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
|
||||
|
||||
'legend3' => 'ACP_FEED_TOPIC_BASED',
|
||||
'feed_limit_topic' => array('lang' => 'ACP_FEED_LIMIT', 'validate' => 'int:5', 'type' => 'text:3:4', 'explain' => true),
|
||||
'feed_topics_new' => array('lang' => 'ACP_FEED_TOPICS_NEW', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
|
||||
'feed_topics_active' => array('lang' => 'ACP_FEED_TOPICS_ACTIVE', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
|
||||
'feed_news_id' => array('lang' => 'ACP_FEED_NEWS', 'validate' => 'string', 'type' => 'custom', 'method' => 'select_news_forums', 'explain' => true),
|
||||
|
||||
'legend4' => 'ACP_FEED_SETTINGS_OTHER',
|
||||
'feed_overall_forums' => array('lang' => 'ACP_FEED_OVERALL_FORUMS', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
|
||||
'feed_exclude_id' => array('lang' => 'ACP_FEED_EXCLUDE_ID', 'validate' => 'string', 'type' => 'custom', 'method' => 'select_exclude_forums', 'explain' => true),
|
||||
)
|
||||
);
|
||||
@@ -463,12 +472,20 @@ class acp_board
|
||||
if ($submit)
|
||||
{
|
||||
set_config($config_name, $config_value);
|
||||
|
||||
if ($config_name == 'allow_quick_reply' && isset($_POST['allow_quick_reply_enable']))
|
||||
{
|
||||
enable_bitfield_column_flag(FORUMS_TABLE, 'forum_flags', log(FORUM_FLAG_QUICK_REPLY, 2));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Store news and exclude ids
|
||||
if ($mode == 'feed' && $submit)
|
||||
{
|
||||
$cache->destroy('_feed_news_forum_ids');
|
||||
$cache->destroy('_feed_excluded_forum_ids');
|
||||
|
||||
$this->store_feed_forums(FORUM_OPTION_FEED_NEWS, 'feed_news_id');
|
||||
$this->store_feed_forums(FORUM_OPTION_FEED_EXCLUDE, 'feed_exclude_id');
|
||||
}
|
||||
@@ -846,6 +863,20 @@ class acp_board
|
||||
return h_radio('config[board_disable]', $radio_ary, $value) . '<br /><input id="' . $key . '" type="text" name="config[board_disable_msg]" maxlength="255" size="40" value="' . $this->new_config['board_disable_msg'] . '" />';
|
||||
}
|
||||
|
||||
/**
|
||||
* Global quick reply enable/disable setting and button to enable in all forums
|
||||
*/
|
||||
function quick_reply($value, $key)
|
||||
{
|
||||
global $user;
|
||||
|
||||
$radio_ary = array(1 => 'YES', 0 => 'NO');
|
||||
|
||||
return h_radio('config[allow_quick_reply]', $radio_ary, $value) .
|
||||
'<br /><br /><input class="button2" type="submit" id="' . $key . '_enable" name="' . $key . '_enable" value="' . $user->lang['ALLOW_QUICK_REPLY_BUTTON'] . '" />';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Select default dateformat
|
||||
*/
|
||||
@@ -910,7 +941,7 @@ class acp_board
|
||||
{
|
||||
global $user, $config;
|
||||
|
||||
$forum_list = make_forum_select(false, false, true, false, false, false, true);
|
||||
$forum_list = make_forum_select(false, false, true, true, true, false, true);
|
||||
|
||||
// Build forum options
|
||||
$s_forum_options = '<select id="' . $key . '" name="' . $key . '[]" multiple="multiple">';
|
||||
|
@@ -56,6 +56,7 @@ class acp_captcha
|
||||
'enable_post_confirm' => array('tpl' => 'POST_ENABLE', 'default' => false),
|
||||
'confirm_refresh' => array('tpl' => 'CONFIRM_REFRESH', 'default' => false),
|
||||
'max_reg_attempts' => array('tpl' => 'REG_LIMIT', 'default' => 0),
|
||||
'max_login_attempts' => array('tpl' => 'MAX_LOGIN_ATTEMPTS', 'default' => 0),
|
||||
);
|
||||
|
||||
$this->tpl_name = 'acp_captcha';
|
||||
|
@@ -75,13 +75,6 @@ class acp_forums
|
||||
trigger_error($user->lang['NO_PERMISSION_FORUM_ADD'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
|
||||
}
|
||||
|
||||
case 'copy_perm':
|
||||
|
||||
if (!(($auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))))
|
||||
{
|
||||
trigger_error($user->lang['NO_PERMISSION_COPY'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -125,7 +118,6 @@ class acp_forums
|
||||
'type_action' => request_var('type_action', ''),
|
||||
'forum_status' => request_var('forum_status', ITEM_UNLOCKED),
|
||||
'forum_parents' => '',
|
||||
'forum_options' => 0,
|
||||
'forum_name' => utf8_normalize_nfc(request_var('forum_name', '', true)),
|
||||
'forum_link' => request_var('forum_link', ''),
|
||||
'forum_link_track' => request_var('forum_link_track', false),
|
||||
@@ -159,6 +151,12 @@ class acp_forums
|
||||
'forum_password_unset' => request_var('forum_password_unset', false),
|
||||
);
|
||||
|
||||
// On add, add empty forum_options... else do not consider it (not updating it)
|
||||
if ($action == 'add')
|
||||
{
|
||||
$forum_data['forum_options'] = 0;
|
||||
}
|
||||
|
||||
// Use link_display_on_index setting if forum type is link
|
||||
if ($forum_data['forum_type'] == FORUM_LINK)
|
||||
{
|
||||
@@ -193,18 +191,19 @@ class acp_forums
|
||||
$cache->destroy('sql', FORUMS_TABLE);
|
||||
|
||||
// Copy permissions?
|
||||
if (!empty($forum_perm_from) && $forum_perm_from != $forum_data['forum_id'] &&
|
||||
(($action != 'edit') || empty($forum_id) || ($auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))))
|
||||
if ($forum_perm_from && $forum_perm_from != $forum_data['forum_id'] &&
|
||||
($action != 'edit' || empty($forum_id) || ($auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))))
|
||||
{
|
||||
copy_forum_permissions($forum_perm_from, $forum_data['forum_id'], ($action == 'edit') ? true : false);
|
||||
cache_moderators();
|
||||
}
|
||||
else if (($action != 'edit') && $auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))
|
||||
/* Commented out because of questionable UI workflow - re-visit for 3.0.7
|
||||
else if (!$this->parent_id && $action != 'edit' && $auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))
|
||||
{
|
||||
$this->copy_permission_page($forum_data);
|
||||
return;
|
||||
}
|
||||
|
||||
*/
|
||||
$auth->acl_clear_prefetch();
|
||||
|
||||
$acl_url = '&mode=setting_forum_local&forum_id[]=' . $forum_data['forum_id'];
|
||||
@@ -1919,6 +1918,7 @@ class acp_forums
|
||||
|
||||
/**
|
||||
* Display copy permission page
|
||||
* Not used at the moment - we will have a look at it for 3.0.7
|
||||
*/
|
||||
function copy_permission_page($forum_data)
|
||||
{
|
||||
|
@@ -89,16 +89,19 @@ class acp_icons
|
||||
continue;
|
||||
}
|
||||
|
||||
// adjust the width and height to be lower than 128px while perserving the aspect ratio
|
||||
if ($img_size[0] > 127 && $img_size[0] > $img_size[1])
|
||||
// adjust the width and height to be lower than 128px while perserving the aspect ratio (for icons)
|
||||
if ($mode == 'icons')
|
||||
{
|
||||
$img_size[1] = (int) ($img_size[1] * (127 / $img_size[0]));
|
||||
$img_size[0] = 127;
|
||||
}
|
||||
else if ($img_size[1] > 127)
|
||||
{
|
||||
$img_size[0] = (int) ($img_size[0] * (127 / $img_size[1]));
|
||||
$img_size[1] = 127;
|
||||
if ($img_size[0] > 127 && $img_size[0] > $img_size[1])
|
||||
{
|
||||
$img_size[1] = (int) ($img_size[1] * (127 / $img_size[0]));
|
||||
$img_size[0] = 127;
|
||||
}
|
||||
else if ($img_size[1] > 127)
|
||||
{
|
||||
$img_size[0] = (int) ($img_size[0] * (127 / $img_size[1]));
|
||||
$img_size[1] = 127;
|
||||
}
|
||||
}
|
||||
|
||||
$_images[$path . $img]['file'] = $path . $img;
|
||||
@@ -363,7 +366,7 @@ class acp_icons
|
||||
if ($mode == 'smilies' && $action == 'create')
|
||||
{
|
||||
$smiley_count = $this->item_count($table);
|
||||
|
||||
|
||||
$addable_smileys_count = sizeof($images);
|
||||
foreach ($images as $image)
|
||||
{
|
||||
@@ -372,7 +375,7 @@ class acp_icons
|
||||
--$addable_smileys_count;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($smiley_count + $addable_smileys_count > SMILEY_LIMIT)
|
||||
{
|
||||
trigger_error(sprintf($user->lang['TOO_MANY_SMILIES'], SMILEY_LIMIT) . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
@@ -400,15 +403,19 @@ class acp_icons
|
||||
$image_height[$image] = $img_size[1];
|
||||
}
|
||||
|
||||
if ($image_width[$image] > 127 && $image_width[$image] > $image_height[$image])
|
||||
// Adjust image width/height for icons
|
||||
if ($mode == 'icons')
|
||||
{
|
||||
$image_height[$image] = (int) ($image_height[$image] * (127 / $image_width[$image]));
|
||||
$image_width[$image] = 127;
|
||||
}
|
||||
else if ($image_height[$image] > 127)
|
||||
{
|
||||
$image_width[$image] = (int) ($image_width[$image] * (127 / $image_height[$image]));
|
||||
$image_height[$image] = 127;
|
||||
if ($image_width[$image] > 127 && $image_width[$image] > $image_height[$image])
|
||||
{
|
||||
$image_height[$image] = (int) ($image_height[$image] * (127 / $image_width[$image]));
|
||||
$image_width[$image] = 127;
|
||||
}
|
||||
else if ($image_height[$image] > 127)
|
||||
{
|
||||
$image_width[$image] = (int) ($image_width[$image] * (127 / $image_height[$image]));
|
||||
$image_height[$image] = 127;
|
||||
}
|
||||
}
|
||||
|
||||
$img_sql = array(
|
||||
@@ -923,7 +930,7 @@ class acp_icons
|
||||
generate_pagination($this->u_action, $item_count, $config['smilies_per_page'], $pagination_start, true)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the count of smilies or icons in the database
|
||||
*
|
||||
@@ -934,11 +941,12 @@ class acp_icons
|
||||
{
|
||||
global $db;
|
||||
|
||||
$sql = "SELECT COUNT(*) AS count
|
||||
$sql = "SELECT COUNT(*) AS item_count
|
||||
FROM $table";
|
||||
$result = $db->sql_query($sql);
|
||||
$item_count = (int) $db->sql_fetchfield('count');
|
||||
$item_count = (int) $db->sql_fetchfield('item_count');
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
return $item_count;
|
||||
}
|
||||
}
|
||||
|
@@ -90,22 +90,19 @@ class acp_inactive
|
||||
|
||||
if ($action == 'activate')
|
||||
{
|
||||
if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
|
||||
{
|
||||
// Get those 'being activated'...
|
||||
$sql = 'SELECT user_id, username, user_email, user_lang
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('user_id', $mark) . '
|
||||
AND user_type = ' . USER_INACTIVE;
|
||||
$result = $db->sql_query($sql);
|
||||
// Get those 'being activated'...
|
||||
$sql = 'SELECT user_id, username' . (($config['require_activation'] == USER_ACTIVATION_ADMIN) ? ', user_email, user_lang' : '') . '
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('user_id', $mark) . '
|
||||
AND user_type = ' . USER_INACTIVE;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$inactive_users = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$inactive_users[] = $row;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
$inactive_users = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$inactive_users[] = $row;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
user_active_flip('activate', $mark);
|
||||
|
||||
@@ -136,6 +133,15 @@ class acp_inactive
|
||||
$messenger->save_queue();
|
||||
}
|
||||
|
||||
if (!empty($inactive_users))
|
||||
{
|
||||
foreach ($inactive_users as $row)
|
||||
{
|
||||
add_log('admin', 'LOG_USER_ACTIVE', $row['username']);
|
||||
add_log('user', $row['user_id'], 'LOG_USER_ACTIVE_USER');
|
||||
}
|
||||
}
|
||||
|
||||
// For activate we really need to redirect, else a refresh can result in users being deactivated again
|
||||
$u_action = $this->u_action . "&$u_sort_param&start=$start";
|
||||
$u_action .= ($per_page != $config['topics_per_page']) ? "&users_per_page=$per_page" : '';
|
||||
|
@@ -44,13 +44,13 @@ class acp_jabber
|
||||
$this->tpl_name = 'acp_jabber';
|
||||
$this->page_title = 'ACP_JABBER_SETTINGS';
|
||||
|
||||
$jab_enable = request_var('jab_enable', $config['jab_enable']);
|
||||
$jab_host = request_var('jab_host', $config['jab_host']);
|
||||
$jab_port = request_var('jab_port', $config['jab_port']);
|
||||
$jab_username = request_var('jab_username', $config['jab_username']);
|
||||
$jab_password = request_var('jab_password', $config['jab_password']);
|
||||
$jab_package_size = request_var('jab_package_size', $config['jab_package_size']);
|
||||
$jab_use_ssl = request_var('jab_use_ssl', $config['jab_use_ssl']);
|
||||
$jab_enable = request_var('jab_enable', (bool) $config['jab_enable']);
|
||||
$jab_host = request_var('jab_host', (string) $config['jab_host']);
|
||||
$jab_port = request_var('jab_port', (int) $config['jab_port']);
|
||||
$jab_username = request_var('jab_username', (string) $config['jab_username']);
|
||||
$jab_password = request_var('jab_password', (string) $config['jab_password']);
|
||||
$jab_package_size = request_var('jab_package_size', (int) $config['jab_package_size']);
|
||||
$jab_use_ssl = request_var('jab_use_ssl', (bool) $config['jab_use_ssl']);
|
||||
|
||||
$form_name = 'acp_jabber';
|
||||
add_form_key($form_name);
|
||||
@@ -117,7 +117,7 @@ class acp_jabber
|
||||
'JAB_ENABLE' => $jab_enable,
|
||||
'L_JAB_SERVER_EXPLAIN' => sprintf($user->lang['JAB_SERVER_EXPLAIN'], '<a href="http://www.jabber.org/">', '</a>'),
|
||||
'JAB_HOST' => $jab_host,
|
||||
'JAB_PORT' => $jab_port,
|
||||
'JAB_PORT' => ($jab_port) ? $jab_port : '',
|
||||
'JAB_USERNAME' => $jab_username,
|
||||
'JAB_PASSWORD' => $jab_password,
|
||||
'JAB_PACKAGE_SIZE' => $jab_package_size,
|
||||
|
@@ -1120,6 +1120,11 @@ class acp_language
|
||||
{
|
||||
while (($file = readdir($dp)) !== false)
|
||||
{
|
||||
if (!is_dir($phpbb_root_path . 'language/' . $file))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($file[0] != '.' && file_exists("{$phpbb_root_path}language/$file/iso.txt"))
|
||||
{
|
||||
if (!in_array($file, $installed))
|
||||
|
@@ -398,6 +398,14 @@ class acp_main
|
||||
// Version check
|
||||
$user->add_lang('install');
|
||||
|
||||
if ($auth->acl_get('a_server') && version_compare(PHP_VERSION, '5.2.0', '<'))
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_PHP_VERSION_OLD' => true,
|
||||
'L_PHP_VERSION_OLD' => sprintf($user->lang['PHP_VERSION_OLD'], '<a href="http://www.phpbb.com/community/viewtopic.php?f=14&t=1958605">', '</a>'),
|
||||
));
|
||||
}
|
||||
|
||||
$latest_version_info = false;
|
||||
if (($latest_version_info = obtain_latest_version_info(request_var('versioncheck_force', false))) === false)
|
||||
{
|
||||
|
@@ -509,6 +509,14 @@ class acp_profile
|
||||
// Get the number of options if this key is 'field_maxlen'
|
||||
$var = request_var('field_default_value', 0);
|
||||
}*/
|
||||
else if ($field_type == FIELD_INT && $key == 'field_default_value')
|
||||
{
|
||||
// Permit an empty string
|
||||
if (request_var('field_default_value', '') === '')
|
||||
{
|
||||
$var = '';
|
||||
}
|
||||
}
|
||||
|
||||
$cp->vars[$key] = $var;
|
||||
}
|
||||
|
@@ -643,6 +643,11 @@ parse_css_file = {PARSE_CSS_FILE}
|
||||
{
|
||||
while (($file = readdir($dp)) !== false)
|
||||
{
|
||||
if (!is_dir($phpbb_root_path . 'styles/' . $file))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$subpath = ($mode != 'style') ? "$mode/" : '';
|
||||
if ($file[0] != '.' && file_exists("{$phpbb_root_path}styles/$file/$subpath$mode.cfg"))
|
||||
{
|
||||
|
@@ -39,6 +39,11 @@ class acp_update
|
||||
|
||||
$info = obtain_latest_version_info(request_var('versioncheck_force', false), true);
|
||||
|
||||
if ($info === false)
|
||||
{
|
||||
trigger_error('VERSIONCHECK_FAIL', E_USER_WARNING);
|
||||
}
|
||||
|
||||
$info = explode("\n", $info);
|
||||
$latest_version = trim($info[0]);
|
||||
|
||||
|
@@ -1023,7 +1023,7 @@ class acp_users
|
||||
'U_WHOIS' => $this->u_action . "&action=whois&user_ip={$user_row['user_ip']}",
|
||||
'U_MCP_QUEUE' => ($auth->acl_getf_global('m_approve')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue', true, $user->session_id) : '',
|
||||
|
||||
'U_SWITCH_PERMISSIONS' => ($auth->acl_get('a_switchperm') && $user->data['user_id'] != $user_row['user_id']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", "mode=switch_perm&u={$user_row['user_id']}") : '',
|
||||
'U_SWITCH_PERMISSIONS' => ($auth->acl_get('a_switchperm') && $user->data['user_id'] != $user_row['user_id']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", "mode=switch_perm&u={$user_row['user_id']}&hash=" . generate_link_hash('switchperm')) : '',
|
||||
|
||||
'POSTS_IN_QUEUE' => $user_row['posts_in_queue'],
|
||||
'USER' => $user_row['username'],
|
||||
@@ -1416,7 +1416,7 @@ class acp_users
|
||||
|
||||
$now = getdate();
|
||||
$s_birthday_year_options = '<option value="0"' . ((!$data['bday_year']) ? ' selected="selected"' : '') . '>--</option>';
|
||||
for ($i = $now['year'] - 100; $i < $now['year']; $i++)
|
||||
for ($i = $now['year'] - 100; $i <= $now['year']; $i++)
|
||||
{
|
||||
$selected = ($i == $data['bday_year']) ? ' selected="selected"' : '';
|
||||
$s_birthday_year_options .= "<option value=\"$i\"$selected>$i</option>";
|
||||
|
@@ -62,16 +62,22 @@ function login_db(&$username, &$password)
|
||||
'user_row' => array('user_id' => ANONYMOUS),
|
||||
);
|
||||
}
|
||||
$show_captcha = $config['max_login_attempts'] && $row['user_login_attempts'] >= $config['max_login_attempts'];
|
||||
|
||||
// If there are too much login attempts, we need to check for an confirm image
|
||||
// Every auth module is able to define what to do by itself...
|
||||
if ($config['max_login_attempts'] && $row['user_login_attempts'] >= $config['max_login_attempts'])
|
||||
if ($show_captcha)
|
||||
{
|
||||
// Visual Confirmation handling
|
||||
if (!class_exists('phpbb_captcha_factory'))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include ($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
|
||||
}
|
||||
|
||||
$captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
|
||||
$captcha->init(CONFIRM_LOGIN);
|
||||
$vc_response = $captcha->validate();
|
||||
$vc_response = $captcha->validate($row);
|
||||
if ($vc_response)
|
||||
{
|
||||
return array(
|
||||
@@ -80,6 +86,10 @@ function login_db(&$username, &$password)
|
||||
'user_row' => $row,
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$captcha->reset();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -189,8 +199,8 @@ function login_db(&$username, &$password)
|
||||
|
||||
// Give status about wrong password...
|
||||
return array(
|
||||
'status' => LOGIN_ERROR_PASSWORD,
|
||||
'error_msg' => 'LOGIN_ERROR_PASSWORD',
|
||||
'status' => ($show_captcha) ? LOGIN_ERROR_ATTEMPTS : LOGIN_ERROR_PASSWORD,
|
||||
'error_msg' => ($show_captcha) ? 'LOGIN_ERROR_ATTEMPTS' : 'LOGIN_ERROR_PASSWORD',
|
||||
'user_row' => $row,
|
||||
);
|
||||
}
|
||||
|
@@ -137,7 +137,7 @@ class bbcode
|
||||
|
||||
if (!@file_exists($this->template_filename))
|
||||
{
|
||||
if (isset($template->orig_tpl_inherits_id) && $template->orig_tpl_inherits_id)
|
||||
if (isset($user->theme['template_inherits_id']) && $user->theme['template_inherits_id'])
|
||||
{
|
||||
$this->template_filename = $phpbb_root_path . 'styles/' . $user->theme['template_inherit_path'] . '/template/bbcode.html';
|
||||
if (!@file_exists($this->template_filename))
|
||||
@@ -360,7 +360,7 @@ class bbcode
|
||||
// In order to use templates with custom bbcodes we need
|
||||
// to replace all {VARS} to corresponding backreferences
|
||||
// Note that backreferences are numbered from bbcode_match
|
||||
if (preg_match_all('/\{(URL|LOCAL_URL|EMAIL|TEXT|SIMPLETEXT|IDENTIFIER|COLOR|NUMBER)[0-9]*\}/', $rowset[$bbcode_id]['bbcode_match'], $m))
|
||||
if (preg_match_all('/\{(URL|LOCAL_URL|EMAIL|TEXT|SIMPLETEXT|INTTEXT|IDENTIFIER|COLOR|NUMBER)[0-9]*\}/', $rowset[$bbcode_id]['bbcode_match'], $m))
|
||||
{
|
||||
foreach ($m[0] as $i => $tok)
|
||||
{
|
||||
|
@@ -86,7 +86,7 @@ class cache extends acm
|
||||
{
|
||||
if ((version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.0', '>='))) && @preg_match('/\p{L}/u', 'a') !== false)
|
||||
{
|
||||
$censors['match'][] = '#(?<![\p{Nd}\p{L}_])(' . str_replace('\*', '[\p{Nd}\p{L}_]*?', preg_quote($row['word'], '#')) . ')(?![\p{Nd}\p{L}_])#u';
|
||||
$censors['match'][] = '#(?<![\p{Nd}\p{L}_])(' . str_replace('\*', '[\p{Nd}\p{L}_]*?', preg_quote($row['word'], '#')) . ')(?![\p{Nd}\p{L}_])#iu';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -35,7 +35,7 @@ class phpbb_captcha_factory
|
||||
{
|
||||
include($phpbb_root_path . "includes/captcha/plugins/{$name}_plugin." . $phpEx);
|
||||
}
|
||||
$instance =& call_user_func(array($name, 'get_instance'));
|
||||
$instance = call_user_func(array($name, 'get_instance'));
|
||||
return $instance;
|
||||
}
|
||||
|
||||
|
@@ -193,6 +193,11 @@ class phpbb_default_captcha
|
||||
{
|
||||
global $config, $db, $user;
|
||||
|
||||
if (empty($user->lang))
|
||||
{
|
||||
$user->setup();
|
||||
}
|
||||
|
||||
$error = '';
|
||||
if (!$this->confirm_id)
|
||||
{
|
||||
|
@@ -53,7 +53,7 @@ class phpbb_captcha_qa
|
||||
|
||||
// read input
|
||||
$this->confirm_id = request_var('qa_confirm_id', '');
|
||||
$this->answer = request_var('qa_answer', '', true);
|
||||
$this->answer = utf8_normalize_nfc(request_var('qa_answer', '', true));
|
||||
|
||||
$this->type = (int) $type;
|
||||
$this->question_lang = $user->lang_name;
|
||||
@@ -87,9 +87,9 @@ class phpbb_captcha_qa
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
// okay, if there is a confirm_id, we try to load that confirm's state
|
||||
if (!strlen($this->confirm_id) || !$this->load_answer())
|
||||
|
||||
// okay, if there is a confirm_id, we try to load that confirm's state. If not, we try to find one
|
||||
if (!$this->load_answer() && (!$this->load_confirm_id() || !$this->load_answer()))
|
||||
{
|
||||
// we have no valid confirm ID, better get ready to ask something
|
||||
$this->select_question();
|
||||
@@ -137,14 +137,14 @@ class phpbb_captcha_qa
|
||||
return false;
|
||||
}
|
||||
|
||||
$sql = 'SELECT COUNT(question_id) as count
|
||||
$sql = 'SELECT COUNT(question_id) AS question_count
|
||||
FROM ' . CAPTCHA_QUESTIONS_TABLE . "
|
||||
WHERE lang_iso = '" . $db->sql_escape($config['default_lang']) . "'";
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
return ((bool) $row['count']);
|
||||
return ((bool) $row['question_count']);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -214,6 +214,22 @@ class phpbb_captcha_qa
|
||||
*/
|
||||
function get_demo_template()
|
||||
{
|
||||
global $config, $db, $template;
|
||||
|
||||
if ($this->is_available())
|
||||
{
|
||||
$sql = 'SELECT question_text
|
||||
FROM ' . CAPTCHA_QUESTIONS_TABLE . "
|
||||
WHERE lang_iso = '" . $db->sql_escape($config['default_lang']) . "'";
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
if ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'QA_CONFIRM_QUESTION' => $row['question_text'],
|
||||
));
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
return 'captcha_qa_acp_demo.html';
|
||||
}
|
||||
|
||||
@@ -237,11 +253,11 @@ class phpbb_captcha_qa
|
||||
/**
|
||||
* API function
|
||||
*/
|
||||
function garbage_collect($type)
|
||||
function garbage_collect($type = 0)
|
||||
{
|
||||
global $db, $config;
|
||||
|
||||
$sql = 'SELECT DISTINCT c.session_id
|
||||
$sql = 'SELECT c.confirm_id
|
||||
FROM ' . CAPTCHA_QA_CONFIRM_TABLE . ' c
|
||||
LEFT JOIN ' . SESSIONS_TABLE . ' s
|
||||
ON (c.session_id = s.session_id)
|
||||
@@ -255,14 +271,14 @@ class phpbb_captcha_qa
|
||||
|
||||
do
|
||||
{
|
||||
$sql_in[] = (string) $row['session_id'];
|
||||
$sql_in[] = (string) $row['confirm_id'];
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
|
||||
if (sizeof($sql_in))
|
||||
{
|
||||
$sql = 'DELETE FROM ' . CAPTCHA_QA_CONFIRM_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('session_id', $sql_in);
|
||||
WHERE ' . $db->sql_in_set('confirm_id', $sql_in);
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
@@ -349,7 +365,12 @@ class phpbb_captcha_qa
|
||||
global $config, $db, $user;
|
||||
|
||||
$error = '';
|
||||
|
||||
|
||||
if (!sizeof($this->question_ids))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$this->confirm_id)
|
||||
{
|
||||
$error = $user->lang['CONFIRM_QUESTION_WRONG'];
|
||||
@@ -388,6 +409,10 @@ class phpbb_captcha_qa
|
||||
{
|
||||
global $db, $user;
|
||||
|
||||
if (!sizeof($this->question_ids))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$this->confirm_id = md5(unique_id($user->ip));
|
||||
$this->question = (int) array_rand($this->question_ids);
|
||||
|
||||
@@ -409,6 +434,11 @@ class phpbb_captcha_qa
|
||||
function reselect_question()
|
||||
{
|
||||
global $db, $user;
|
||||
|
||||
if (!sizeof($this->question_ids))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->question = (int) array_rand($this->question_ids);
|
||||
$this->solved = 0;
|
||||
@@ -443,12 +473,43 @@ class phpbb_captcha_qa
|
||||
$this->load_answer();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* See if there is already an entry for the current session.
|
||||
*/
|
||||
function load_confirm_id()
|
||||
{
|
||||
global $db, $user;
|
||||
|
||||
$sql = 'SELECT confirm_id
|
||||
FROM ' . CAPTCHA_QA_CONFIRM_TABLE . "
|
||||
WHERE
|
||||
session_id = '" . $db->sql_escape($user->session_id) . "'
|
||||
AND lang_iso = '" . $db->sql_escape($this->question_lang) . "'
|
||||
AND confirm_type = " . $this->type;
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($row)
|
||||
{
|
||||
$this->confirm_id = $row['confirm_id'];
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Look up everything we need and populate the instance variables.
|
||||
*/
|
||||
function load_answer()
|
||||
{
|
||||
global $db, $user;
|
||||
|
||||
if (!strlen($this->confirm_id) || !sizeof($this->question_ids))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$sql = 'SELECT con.question_id, attempts, question_text, strict
|
||||
FROM ' . CAPTCHA_QA_CONFIRM_TABLE . ' con, ' . CAPTCHA_QUESTIONS_TABLE . " qes
|
||||
@@ -482,7 +543,7 @@ class phpbb_captcha_qa
|
||||
{
|
||||
global $db;
|
||||
|
||||
$answer = ($this->question_strict) ? request_var('qa_answer', '', true) : utf8_clean_string(request_var('qa_answer', '', true));
|
||||
$answer = ($this->question_strict) ? utf8_normalize_nfc(request_var('qa_answer', '', true)) : utf8_clean_string(utf8_normalize_nfc(request_var('qa_answer', '', true)));
|
||||
|
||||
$sql = 'SELECT answer_text
|
||||
FROM ' . CAPTCHA_ANSWERS_TABLE . '
|
||||
@@ -597,21 +658,28 @@ class phpbb_captcha_qa
|
||||
}
|
||||
else if ($question_id && $action == 'delete')
|
||||
{
|
||||
if (confirm_box(true))
|
||||
if ($this->get_class_name() !== $config['captcha_plugin'] || !$this->acp_is_last($question_id))
|
||||
{
|
||||
$this->acp_delete_question($question_id);
|
||||
if (confirm_box(true))
|
||||
{
|
||||
$this->acp_delete_question($question_id);
|
||||
|
||||
trigger_error($user->lang['QUESTION_DELETED'] . adm_back_link($list_url));
|
||||
trigger_error($user->lang['QUESTION_DELETED'] . adm_back_link($list_url));
|
||||
}
|
||||
else
|
||||
{
|
||||
confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
|
||||
'question_id' => $question_id,
|
||||
'action' => $action,
|
||||
'configure' => 1,
|
||||
'select_captcha' => $this->get_class_name(),
|
||||
))
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
|
||||
'question_id' => $question_id,
|
||||
'action' => $action,
|
||||
'configure' => 1,
|
||||
'select_captcha' => $this->get_class_name(),
|
||||
))
|
||||
);
|
||||
trigger_error($user->lang['QA_LAST_QUESTION'] . adm_back_link($list_url), E_USER_WARNING);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -691,7 +759,7 @@ class phpbb_captcha_qa
|
||||
}
|
||||
else if ($submit)
|
||||
{
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($list_url));
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($list_url), E_USER_WARNING);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -769,11 +837,12 @@ class phpbb_captcha_qa
|
||||
*/
|
||||
function acp_get_question_input()
|
||||
{
|
||||
$answers = utf8_normalize_nfc(request_var('answers', '', true));
|
||||
$question = array(
|
||||
'question_text' => request_var('question_text', '', true),
|
||||
'strict' => request_var('strict', false),
|
||||
'lang_iso' => request_var('lang_iso', ''),
|
||||
'answers' => explode("\n", request_var('answers', '', true)),
|
||||
'answers' => (strlen($answers)) ? explode("\n", $answers) : '',
|
||||
);
|
||||
|
||||
return $question;
|
||||
@@ -888,8 +957,9 @@ class phpbb_captcha_qa
|
||||
}
|
||||
|
||||
if (!isset($langs[$question_data['lang_iso']]) ||
|
||||
!$question_data['question_text'] ||
|
||||
!sizeof($question_data['answers']))
|
||||
!strlen($question_data['question_text']) ||
|
||||
!sizeof($question_data['answers']) ||
|
||||
!is_array($question_data['answers']))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -920,6 +990,33 @@ class phpbb_captcha_qa
|
||||
|
||||
return $langs;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* See if there is a question other than the one we have
|
||||
*/
|
||||
function acp_is_last($question_id)
|
||||
{
|
||||
global $config, $db;
|
||||
|
||||
if ($question_id)
|
||||
{
|
||||
$sql = 'SELECT question_id
|
||||
FROM ' . CAPTCHA_QUESTIONS_TABLE . "
|
||||
WHERE lang_iso = '" . $db->sql_escape($config['default_lang']) . "'
|
||||
AND question_id <> " . (int) $question_id;
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
$question = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!$question)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@@ -28,10 +28,17 @@ if (!class_exists('phpbb_default_captcha'))
|
||||
class phpbb_recaptcha extends phpbb_default_captcha
|
||||
{
|
||||
var $recaptcha_server = 'http://api.recaptcha.net';
|
||||
var $recaptcha_server_secure = 'https://api-secure.recaptcha.net'; // class constants :(
|
||||
var $recaptcha_verify_server = 'api-verify.recaptcha.net';
|
||||
var $challenge;
|
||||
var $response;
|
||||
|
||||
// PHP4 Constructor
|
||||
function phpbb_recaptcha()
|
||||
{
|
||||
$this->recaptcha_server = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? $this->recaptcha_server_secure : $this->recaptcha_server;
|
||||
}
|
||||
|
||||
function init($type)
|
||||
{
|
||||
global $config, $db, $user;
|
||||
|
@@ -25,7 +25,7 @@ if (!defined('IN_PHPBB'))
|
||||
*/
|
||||
|
||||
// phpBB Version
|
||||
define('PHPBB_VERSION', '3.0.6-RC2');
|
||||
define('PHPBB_VERSION', '3.0.7');
|
||||
|
||||
// QA-related
|
||||
// define('PHPBB_QA', 1);
|
||||
|
@@ -453,11 +453,17 @@ class phpbb_db_tools
|
||||
|
||||
case 'firebird':
|
||||
case 'mssql':
|
||||
// We need the data here
|
||||
$old_return_statements = $this->return_statements;
|
||||
$this->return_statements = true;
|
||||
|
||||
$primary_key_stmts = $this->sql_create_primary_key($table_name, $table_data['PRIMARY_KEY']);
|
||||
foreach ($primary_key_stmts as $pk_stmt)
|
||||
{
|
||||
$statements[] = $pk_stmt;
|
||||
}
|
||||
|
||||
$this->return_statements = $old_return_statements;
|
||||
break;
|
||||
|
||||
case 'oracle':
|
||||
@@ -1342,7 +1348,29 @@ class phpbb_db_tools
|
||||
break;
|
||||
|
||||
case 'postgres':
|
||||
$statements[] = 'ALTER TABLE ' . $table_name . ' ADD COLUMN "' . $column_name . '" ' . $column_data['column_type_sql'];
|
||||
if (version_compare($this->db->sql_server_info(true), '8.0', '>='))
|
||||
{
|
||||
$statements[] = 'ALTER TABLE ' . $table_name . ' ADD COLUMN "' . $column_name . '" ' . $column_data['column_type_sql'];
|
||||
}
|
||||
else
|
||||
{
|
||||
// old versions cannot add columns with default and null information
|
||||
$statements[] = 'ALTER TABLE ' . $table_name . ' ADD COLUMN "' . $column_name . '" ' . $column_data['column_type'] . ' ' . $column_data['constraint'];
|
||||
|
||||
if (isset($column_data['null']))
|
||||
{
|
||||
if ($column_data['null'] == 'NOT NULL')
|
||||
{
|
||||
$statements[] = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN ' . $column_name . ' SET NOT NULL';
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($column_data['default']))
|
||||
{
|
||||
$statements[] = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN ' . $column_name . ' SET DEFAULT ' . $column_data['default'];
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'sqlite':
|
||||
@@ -1867,7 +1895,7 @@ class phpbb_db_tools
|
||||
}
|
||||
else
|
||||
{
|
||||
$statements[] = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN "' . strtoupper($column_name) . '" TYPE ' . ' ' . $column_data['column_type_sql'];
|
||||
$statements[] = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN "' . strtoupper($column_name) . '" TYPE ' . ' ' . $column_data['column_type_sql_type'];
|
||||
}
|
||||
break;
|
||||
|
||||
|
@@ -429,6 +429,24 @@ class dbal
|
||||
return $column_name . ' & ' . (1 << $bit) . (($compare) ? ' ' . $compare : '');
|
||||
}
|
||||
|
||||
/**
|
||||
* Run binary OR operator on DB column.
|
||||
* Results in sql statement: "{$column_name} | (1 << {$bit}) {$compare}"
|
||||
*
|
||||
* @param string $column_name The column name to use
|
||||
* @param int $bit The value to use for the OR operator, will be converted to (1 << $bit). Is used by options, using the number schema... 0, 1, 2...29
|
||||
* @param string $compare Any custom SQL code after the check (for example "= 0")
|
||||
*/
|
||||
function sql_bit_or($column_name, $bit, $compare = '')
|
||||
{
|
||||
if (method_exists($this, '_sql_bit_or'))
|
||||
{
|
||||
return $this->_sql_bit_or($column_name, $bit, $compare);
|
||||
}
|
||||
|
||||
return $column_name . ' | ' . (1 << $bit) . (($compare) ? ' ' . $compare : '');
|
||||
}
|
||||
|
||||
/**
|
||||
* Run more than one insert statement.
|
||||
*
|
||||
|
@@ -451,6 +451,11 @@ class dbal_firebird extends dbal
|
||||
return 'BIN_AND(' . $column_name . ', ' . (1 << $bit) . ')' . (($compare) ? ' ' . $compare : '');
|
||||
}
|
||||
|
||||
function _sql_bit_or($column_name, $bit, $compare = '')
|
||||
{
|
||||
return 'BIN_OR(' . $column_name . ', ' . (1 << $bit) . ')' . (($compare) ? ' ' . $compare : '');
|
||||
}
|
||||
|
||||
/**
|
||||
* return sql error array
|
||||
* @access private
|
||||
|
@@ -44,7 +44,7 @@ class dbal_mysql extends dbal
|
||||
|
||||
$this->sql_layer = 'mysql4';
|
||||
|
||||
$this->db_connect_id = ($this->persistency) ? @mysql_pconnect($this->server, $this->user, $sqlpassword, $new_link) : @mysql_connect($this->server, $this->user, $sqlpassword, $new_link);
|
||||
$this->db_connect_id = ($this->persistency) ? @mysql_pconnect($this->server, $this->user, $sqlpassword) : @mysql_connect($this->server, $this->user, $sqlpassword, $new_link);
|
||||
|
||||
if ($this->db_connect_id && $this->dbname != '')
|
||||
{
|
||||
|
@@ -136,7 +136,7 @@ class dbal_oracle extends dbal
|
||||
*/
|
||||
function _rewrite_where($where_clause)
|
||||
{
|
||||
preg_match_all('/\s*(AND|OR)?\s*([\w_.]++)\s*(?:(=|<[=>]?|>=?)\s*((?>\'(?>[^\']++|\'\')*+\'|[\d-.]+))|((NOT )?IN\s*\((?>\'(?>[^\']++|\'\')*+\',? ?|[\d-.]+,? ?)*+\)))/', $where_clause, $result, PREG_SET_ORDER);
|
||||
preg_match_all('/\s*(AND|OR)?\s*([\w_.()]++)\s*(?:(=|<[=>]?|>=?|LIKE)\s*((?>\'(?>[^\']++|\'\')*+\'|[\d-.()]+))|((NOT )?IN\s*\((?>\'(?>[^\']++|\'\')*+\',? ?|[\d-.]+,? ?)*+\)))/', $where_clause, $result, PREG_SET_ORDER);
|
||||
$out = '';
|
||||
foreach ($result as $val)
|
||||
{
|
||||
@@ -622,6 +622,11 @@ class dbal_oracle extends dbal
|
||||
return 'BITAND(' . $column_name . ', ' . (1 << $bit) . ')' . (($compare) ? ' ' . $compare : '');
|
||||
}
|
||||
|
||||
function _sql_bit_or($column_name, $bit, $compare = '')
|
||||
{
|
||||
return 'BITOR(' . $column_name . ', ' . (1 << $bit) . ')' . (($compare) ? ' ' . $compare : '');
|
||||
}
|
||||
|
||||
/**
|
||||
* return sql error array
|
||||
* @access private
|
||||
|
@@ -556,11 +556,11 @@ function _hash_crypt_private($password, $setting, &$itoa64)
|
||||
*
|
||||
* @param string $email Email address
|
||||
*
|
||||
* @return string Big Integer
|
||||
* @return string Unsigned Big Integer
|
||||
*/
|
||||
function phpbb_email_hash($email)
|
||||
{
|
||||
return crc32(strtolower($email)) . strlen($email);
|
||||
return sprintf('%u', crc32(strtolower($email))) . strlen($email);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3531,7 +3531,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
|
||||
}
|
||||
}
|
||||
|
||||
if (defined('DEBUG') || defined('IN_CRON') || defined('IMAGE_OUTPUT'))
|
||||
if ((defined('DEBUG') || defined('IN_CRON') || defined('IMAGE_OUTPUT')) && isset($db))
|
||||
{
|
||||
// let's avoid loops
|
||||
$db->sql_return_on_error(true);
|
||||
@@ -3920,6 +3920,108 @@ function phpbb_optionset($bit, $set, $data)
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Login using http authenticate.
|
||||
*
|
||||
* @param array $param Parameter array, see $param_defaults array.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function phpbb_http_login($param)
|
||||
{
|
||||
global $auth, $user;
|
||||
global $config;
|
||||
|
||||
$param_defaults = array(
|
||||
'auth_message' => '',
|
||||
|
||||
'autologin' => false,
|
||||
'viewonline' => true,
|
||||
'admin' => false,
|
||||
);
|
||||
|
||||
// Overwrite default values with passed values
|
||||
$param = array_merge($param_defaults, $param);
|
||||
|
||||
// User is already logged in
|
||||
// We will not overwrite his session
|
||||
if (!empty($user->data['is_registered']))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// $_SERVER keys to check
|
||||
$username_keys = array(
|
||||
'PHP_AUTH_USER',
|
||||
'Authorization',
|
||||
'REMOTE_USER', 'REDIRECT_REMOTE_USER',
|
||||
'HTTP_AUTHORIZATION', 'REDIRECT_HTTP_AUTHORIZATION',
|
||||
'REMOTE_AUTHORIZATION', 'REDIRECT_REMOTE_AUTHORIZATION',
|
||||
'AUTH_USER',
|
||||
);
|
||||
|
||||
$password_keys = array(
|
||||
'PHP_AUTH_PW',
|
||||
'REMOTE_PASSWORD',
|
||||
'AUTH_PASSWORD',
|
||||
);
|
||||
|
||||
$username = null;
|
||||
foreach ($username_keys as $k)
|
||||
{
|
||||
if (isset($_SERVER[$k]))
|
||||
{
|
||||
$username = $_SERVER[$k];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$password = null;
|
||||
foreach ($password_keys as $k)
|
||||
{
|
||||
if (isset($_SERVER[$k]))
|
||||
{
|
||||
$password = $_SERVER[$k];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Decode encoded information (IIS, CGI, FastCGI etc.)
|
||||
if (!is_null($username) && is_null($password) && strpos($username, 'Basic ') === 0)
|
||||
{
|
||||
list($username, $password) = explode(':', base64_decode(substr($username, 6)), 2);
|
||||
}
|
||||
|
||||
if (!is_null($username) && !is_null($password))
|
||||
{
|
||||
set_var($username, $username, 'string', true);
|
||||
set_var($password, $password, 'string', true);
|
||||
|
||||
$auth_result = $auth->login($username, $password, $param['autologin'], $param['viewonline'], $param['admin']);
|
||||
|
||||
if ($auth_result['status'] == LOGIN_SUCCESS)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else if ($auth_result['status'] == LOGIN_ERROR_ATTEMPTS)
|
||||
{
|
||||
header('HTTP/1.0 401 Unauthorized');
|
||||
trigger_error('NOT_AUTHORISED');
|
||||
}
|
||||
}
|
||||
|
||||
// Prepend sitename to auth_message
|
||||
$param['auth_message'] = ($param['auth_message'] === '') ? $config['sitename'] : $config['sitename'] . ' - ' . $param['auth_message'];
|
||||
|
||||
// We should probably filter out non-ASCII characters - RFC2616
|
||||
$param['auth_message'] = preg_replace('/[\x80-\xFF]/', '?', $param['auth_message']);
|
||||
|
||||
header('WWW-Authenticate: Basic realm="' . $param['auth_message'] . '"');
|
||||
header('HTTP/1.0 401 Unauthorized');
|
||||
|
||||
trigger_error('NOT_AUTHORISED');
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate page header
|
||||
*/
|
||||
@@ -3959,7 +4061,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
|
||||
$s_last_visit = ($user->data['user_id'] != ANONYMOUS) ? $user->format_date($user->data['session_last_visit']) : '';
|
||||
|
||||
// Get users online list ... if required
|
||||
$l_online_users = $online_userlist = $l_online_record = '';
|
||||
$l_online_users = $online_userlist = $l_online_record = $l_online_time = '';
|
||||
|
||||
if ($config['load_online'] && $config['load_online_time'] && $display_online_list)
|
||||
{
|
||||
@@ -3982,15 +4084,11 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
|
||||
set_config('record_online_date', time(), true);
|
||||
}
|
||||
|
||||
$l_online_record = sprintf($user->lang['RECORD_ONLINE_USERS'], $config['record_online_users'], $user->format_date($config['record_online_date']));
|
||||
$l_online_record = sprintf($user->lang['RECORD_ONLINE_USERS'], $config['record_online_users'], $user->format_date($config['record_online_date'], false, true));
|
||||
|
||||
$l_online_time = ($config['load_online_time'] == 1) ? 'VIEW_ONLINE_TIME' : 'VIEW_ONLINE_TIMES';
|
||||
$l_online_time = sprintf($user->lang[$l_online_time], $config['load_online_time']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$l_online_time = '';
|
||||
}
|
||||
|
||||
$l_privmsgs_text = $l_privmsgs_text_unread = '';
|
||||
$s_privmsg_new = false;
|
||||
@@ -4139,11 +4237,14 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
|
||||
'S_FORUM_ID' => $forum_id,
|
||||
'S_TOPIC_ID' => $topic_id,
|
||||
|
||||
'S_LOGIN_ACTION' => (!defined('ADMIN_START')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login') . '&redirect=' . urlencode(str_replace('&', '&', build_url())) : append_sid("index.$phpEx", false, true, $user->session_id) . '&redirect=' . urlencode(str_replace('&', '&', build_url())),
|
||||
'S_LOGIN_ACTION' => ((!defined('ADMIN_START')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login') : append_sid("index.$phpEx", false, true, $user->session_id)),
|
||||
'S_LOGIN_REDIRECT' => build_hidden_fields(array('redirect' => str_replace('&', '&', build_url()))),
|
||||
|
||||
'S_ENABLE_FEEDS' => ($config['feed_enable']) ? true : false,
|
||||
'S_ENABLE_FEEDS_OVERALL' => ($config['feed_overall']) ? true : false,
|
||||
'S_ENABLE_FEEDS_FORUMS' => ($config['feed_overall_forums']) ? true : false,
|
||||
'S_ENABLE_FEEDS_TOPICS' => ($config['feed_overall_topics']) ? true : false,
|
||||
'S_ENABLE_FEEDS_TOPICS' => ($config['feed_topics_new']) ? true : false,
|
||||
'S_ENABLE_FEEDS_TOPICS_ACTIVE' => ($config['feed_topics_active']) ? true : false,
|
||||
'S_ENABLE_FEEDS_NEWS' => ($s_feed_news) ? true : false,
|
||||
|
||||
'T_THEME_PATH' => "{$web_path}styles/" . $user->theme['theme_path'] . '/theme',
|
||||
@@ -4158,7 +4259,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
|
||||
'T_ICONS_PATH' => "{$web_path}{$config['icons_path']}/",
|
||||
'T_RANKS_PATH' => "{$web_path}{$config['ranks_path']}/",
|
||||
'T_UPLOAD_PATH' => "{$web_path}{$config['upload_path']}/",
|
||||
'T_STYLESHEET_LINK' => (!$user->theme['theme_storedb']) ? "{$web_path}styles/" . $user->theme['theme_path'] . '/theme/stylesheet.css' : append_sid("{$phpbb_root_path}style.$phpEx", 'id=' . $user->theme['style_id'] . '&lang=' . $user->data['user_lang']),
|
||||
'T_STYLESHEET_LINK' => (!$user->theme['theme_storedb']) ? "{$web_path}styles/" . $user->theme['theme_path'] . '/theme/stylesheet.css' : append_sid("{$phpbb_root_path}style.$phpEx", 'id=' . $user->theme['style_id'] . '&lang=' . $user->data['user_lang'], true, $user->session_id),
|
||||
'T_STYLESHEET_NAME' => $user->theme['theme_name'],
|
||||
|
||||
'T_THEME_NAME' => $user->theme['theme_path'],
|
||||
|
@@ -66,8 +66,6 @@ function make_forum_select($select_id = false, $ignore_id = false, $ignore_acl =
|
||||
{
|
||||
global $db, $user, $auth;
|
||||
|
||||
$acl = ($ignore_acl) ? '' : (($only_acl_post) ? 'f_post' : array('f_list', 'a_forum', 'a_forumadd', 'a_forumdel'));
|
||||
|
||||
// This query is identical to the jumpbox one
|
||||
$sql = 'SELECT forum_id, forum_name, parent_id, forum_type, forum_flags, forum_options, left_id, right_id
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
@@ -98,18 +96,21 @@ function make_forum_select($select_id = false, $ignore_id = false, $ignore_acl =
|
||||
$right = $row['right_id'];
|
||||
$disabled = false;
|
||||
|
||||
if ($acl && !$auth->acl_gets($acl, $row['forum_id']))
|
||||
if (!$ignore_acl && $auth->acl_get('f_list', $row['forum_id']))
|
||||
{
|
||||
// List permission?
|
||||
if ($auth->acl_get('f_list', $row['forum_id']))
|
||||
if ($only_acl_post && !$auth->acl_get('f_post', $row['forum_id']) || (!$auth->acl_get('m_approve', $row['forum_id']) && !$auth->acl_get('f_noapprove', $row['forum_id'])))
|
||||
{
|
||||
$disabled = true;
|
||||
}
|
||||
else
|
||||
else if (!$only_acl_post && !$auth->acl_gets(array('f_list', 'a_forum', 'a_forumadd', 'a_forumdel'), $row['forum_id']))
|
||||
{
|
||||
continue;
|
||||
$disabled = true;
|
||||
}
|
||||
}
|
||||
else if (!$ignore_acl)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (
|
||||
((is_array($ignore_id) && in_array($row['forum_id'], $ignore_id)) || $row['forum_id'] == $ignore_id)
|
||||
@@ -912,7 +913,13 @@ function delete_attachments($mode, $ids, $resync = true)
|
||||
{
|
||||
global $db, $config;
|
||||
|
||||
if (is_array($ids) && sizeof($ids))
|
||||
// 0 is as bad as an empty array
|
||||
if (empty($ids))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (is_array($ids))
|
||||
{
|
||||
$ids = array_unique($ids);
|
||||
$ids = array_map('intval', $ids);
|
||||
@@ -922,11 +929,6 @@ function delete_attachments($mode, $ids, $resync = true)
|
||||
$ids = array((int) $ids);
|
||||
}
|
||||
|
||||
if (!sizeof($ids))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$sql_where = '';
|
||||
|
||||
switch ($mode)
|
||||
@@ -2361,8 +2363,8 @@ function cache_moderators()
|
||||
'FROM' => array(
|
||||
ACL_OPTIONS_TABLE => 'o',
|
||||
USER_GROUP_TABLE => 'ug',
|
||||
ACL_GROUPS_TABLE => 'a',
|
||||
GROUPS_TABLE => 'g',
|
||||
ACL_GROUPS_TABLE => 'a',
|
||||
),
|
||||
|
||||
'LEFT_JOIN' => array(
|
||||
@@ -2549,17 +2551,24 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id
|
||||
return;
|
||||
}
|
||||
|
||||
$keywords = preg_split('#[\s+\-|*()]+#u', utf8_strtolower(preg_quote($keywords, '#')), 0, PREG_SPLIT_NO_EMPTY);
|
||||
// Use no preg_quote for $keywords because this would lead to sole backslashes being added
|
||||
// We also use an OR connection here for spaces and the | string. Currently, regex is not supported for searching (but may come later).
|
||||
$keywords = preg_split('#[\s|]+#u', utf8_strtolower($keywords), 0, PREG_SPLIT_NO_EMPTY);
|
||||
$sql_keywords = '';
|
||||
|
||||
if (!empty($keywords))
|
||||
{
|
||||
$keywords_pattern = '#' . implode('|', $keywords) . '#ui';
|
||||
$keywords_pattern = array();
|
||||
|
||||
// Build pattern and keywords...
|
||||
for ($i = 0, $num_keywords = sizeof($keywords); $i < $num_keywords; $i++)
|
||||
{
|
||||
$keywords_pattern[] = preg_quote($keywords[$i], '#');
|
||||
$keywords[$i] = $db->sql_like_expression($db->any_char . $keywords[$i] . $db->any_char);
|
||||
}
|
||||
|
||||
$keywords_pattern = '#' . implode('|', $keywords_pattern) . '#ui';
|
||||
|
||||
$operations = array();
|
||||
foreach ($user->lang as $key => $value)
|
||||
{
|
||||
@@ -3300,4 +3309,24 @@ function obtain_latest_version_info($force_update = false, $warn_fail = false, $
|
||||
return $info;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables a particular flag in a bitfield column of a given table.
|
||||
*
|
||||
* @param string $table_name The table to update
|
||||
* @param string $column_name The column containing a bitfield to update
|
||||
* @param int $flag The binary flag which is OR-ed with the current column value
|
||||
* @param string $sql_more This string is attached to the sql query generated to update the table.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function enable_bitfield_column_flag($table_name, $column_name, $flag, $sql_more = '')
|
||||
{
|
||||
global $db;
|
||||
|
||||
$sql = 'UPDATE ' . $table_name . '
|
||||
SET ' . $column_name . ' = ' . $db->sql_bit_or($column_name, $flag) . '
|
||||
' . $sql_more;
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
?>
|
@@ -80,6 +80,11 @@ class compress
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// $src does not exist
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -89,6 +94,11 @@ class compress
|
||||
*/
|
||||
function add_custom_file($src, $filename)
|
||||
{
|
||||
if (!file_exists($src))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->data($filename, file_get_contents($src), false, stat($src));
|
||||
return true;
|
||||
}
|
||||
|
@@ -1106,10 +1106,11 @@ function extension_allowed($forum_id, $extension, &$extensions)
|
||||
* @param string $string The text to truncate to the given length. String is specialchared.
|
||||
* @param int $max_length Maximum length of string (multibyte character count as 1 char / Html entity count as 1 char)
|
||||
* @param int $max_store_length Maximum character length of string (multibyte character count as 1 char / Html entity count as entity chars).
|
||||
* @param bool $allow_reply Allow Re: in front of string
|
||||
* @param bool $allow_reply Allow Re: in front of string
|
||||
* NOTE: This parameter can cause undesired behavior (returning strings longer than $max_store_legnth) and is deprecated.
|
||||
* @param string $append String to be appended
|
||||
*/
|
||||
function truncate_string($string, $max_length = 60, $max_store_length = 255, $allow_reply = true, $append = '')
|
||||
function truncate_string($string, $max_length = 60, $max_store_length = 255, $allow_reply = false, $append = '')
|
||||
{
|
||||
$chars = array();
|
||||
|
||||
|
@@ -205,10 +205,12 @@ function get_group_id($group_name)
|
||||
|
||||
/**
|
||||
* Generate the email hash stored in the users table
|
||||
*
|
||||
* Note: Deprecated, calls should directly go to phpbb_email_hash()
|
||||
*/
|
||||
function gen_email_hash($email)
|
||||
{
|
||||
return (crc32(strtolower($email)) . strlen($email));
|
||||
return phpbb_email_hash($email);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1232,6 +1234,11 @@ function get_config()
|
||||
$convert->p_master->error($user->lang['FILE_NOT_FOUND'] . ': ' . $filename, __LINE__, __FILE__);
|
||||
}
|
||||
|
||||
if (isset($convert->config_schema['array_name']))
|
||||
{
|
||||
unset($convert->config_schema['array_name']);
|
||||
}
|
||||
|
||||
$convert_config = extract_variables_from_file($filename);
|
||||
if (!empty($convert->config_schema['array_name']))
|
||||
{
|
||||
@@ -1264,6 +1271,7 @@ function restore_config($schema)
|
||||
global $db, $config;
|
||||
|
||||
$convert_config = get_config();
|
||||
|
||||
foreach ($schema['settings'] as $config_name => $src)
|
||||
{
|
||||
if (preg_match('/(.*)\((.*)\)/', $src, $m))
|
||||
@@ -1274,8 +1282,16 @@ function restore_config($schema)
|
||||
}
|
||||
else
|
||||
{
|
||||
$config_value = (isset($convert_config[$src])) ? $convert_config[$src] : '';
|
||||
}
|
||||
if ($schema['table_format'] != 'file' || empty($schema['array_name']))
|
||||
{
|
||||
$config_value = (isset($convert_config[$src])) ? $convert_config[$src] : '';
|
||||
}
|
||||
else if (!empty($schema['array_name']))
|
||||
{
|
||||
$src_ary = $schema['array_name'];
|
||||
$config_value = (isset($convert_config[$src_ary][$src])) ? $convert_config[$src_ary][$src] : '';
|
||||
}
|
||||
}
|
||||
|
||||
if ($config_value !== '')
|
||||
{
|
||||
|
@@ -323,7 +323,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
$forum_unread = (isset($forum_tracking_info[$forum_id]) && $row['orig_forum_last_post_time'] > $forum_tracking_info[$forum_id]) ? true : false;
|
||||
|
||||
// Mark the first visible forum on index as unread if there's any unread global announcement
|
||||
if (($forum_id == $forum_ids_moderator[0]) && ($root_data['forum_id'] == 0) && $ga_unread)
|
||||
if ($ga_unread && !empty($forum_ids_moderator) && $forum_id == $forum_ids_moderator[0])
|
||||
{
|
||||
$forum_unread = true;
|
||||
}
|
||||
@@ -594,7 +594,7 @@ function generate_forum_nav(&$forum_data)
|
||||
'FORUM_NAME' => $forum_data['forum_name'],
|
||||
'FORUM_DESC' => generate_text_for_display($forum_data['forum_desc'], $forum_data['forum_desc_uid'], $forum_data['forum_desc_bitfield'], $forum_data['forum_desc_options']),
|
||||
|
||||
'S_ENABLE_FEEDS_FORUM' => ($config['feed_forum'] && !phpbb_optionget(FORUM_OPTION_FEED_EXCLUDE, $forum_data['forum_options'])) ? true : false,
|
||||
'S_ENABLE_FEEDS_FORUM' => ($config['feed_forum'] && $forum_data['forum_type'] == FORUM_POST && !phpbb_optionget(FORUM_OPTION_FEED_EXCLUDE, $forum_data['forum_options'])) ? true : false,
|
||||
));
|
||||
|
||||
return;
|
||||
|
@@ -23,7 +23,14 @@ function can_load_dll($dll)
|
||||
{
|
||||
// SQLite2 is a tricky thing, from 5.0.0 it requires PDO; if PDO is not loaded we must state that SQLite is unavailable
|
||||
// as the installer doesn't understand that the extension has a prerequisite.
|
||||
if ($dll == 'sqlite' && version_compare(PHP_VERSION, '5.0.0', '>=') && !extension_loaded('pdo'))
|
||||
//
|
||||
// On top of this sometimes the SQLite extension is compiled for a different version of PDO
|
||||
// by some Linux distributions which causes phpBB to bomb out with a blank page.
|
||||
//
|
||||
// Net result we'll disable automatic inclusion of SQLite support
|
||||
//
|
||||
// See: r9618 and #56105
|
||||
if ($dll == 'sqlite')
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@@ -476,8 +476,9 @@ class jabber
|
||||
}
|
||||
else if (in_array('PLAIN', $methods) && ($this->session['ssl'] || !empty($this->session['tls'])))
|
||||
{
|
||||
// http://www.ietf.org/rfc/rfc4616.txt (PLAIN SASL Mechanism)
|
||||
$this->send("<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>"
|
||||
. base64_encode(chr(0) . $this->username . '@' . $this->server . chr(0) . $this->password) .
|
||||
. base64_encode($this->username . '@' . $this->server . chr(0) . $this->username . chr(0) . $this->password) .
|
||||
'</auth>');
|
||||
}
|
||||
else if (in_array('ANONYMOUS', $methods))
|
||||
|
@@ -184,6 +184,9 @@ class messenger
|
||||
|
||||
if (!trim($template_lang))
|
||||
{
|
||||
// fall back to board default language if the user's language is
|
||||
// missing $template_file. If this does not exist either,
|
||||
// $tpl->set_custom_template will do a trigger_error
|
||||
$template_lang = basename($config['default_lang']);
|
||||
}
|
||||
|
||||
@@ -193,13 +196,23 @@ class messenger
|
||||
$this->tpl_msg[$template_lang . $template_file] = new template();
|
||||
$tpl = &$this->tpl_msg[$template_lang . $template_file];
|
||||
|
||||
$fallback_template_path = false;
|
||||
|
||||
if (!$template_path)
|
||||
{
|
||||
$template_path = (!empty($user->lang_path)) ? $user->lang_path : $phpbb_root_path . 'language/';
|
||||
$template_path .= $template_lang . '/email';
|
||||
|
||||
// we can only specify default language fallback when the path is not a custom one for which we
|
||||
// do not know the default language alternative
|
||||
if ($template_lang !== basename($config['default_lang']))
|
||||
{
|
||||
$fallback_template_path = (!empty($user->lang_path)) ? $user->lang_path : $phpbb_root_path . 'language/';
|
||||
$fallback_template_path .= basename($config['default_lang']) . '/email';
|
||||
}
|
||||
}
|
||||
|
||||
$tpl->set_custom_template($template_path, $template_lang . '_email', 'email');
|
||||
$tpl->set_custom_template($template_path, $template_lang . '_email', $fallback_template_path);
|
||||
|
||||
$tpl->set_filenames(array(
|
||||
'body' => $template_file . '.txt',
|
||||
|
@@ -46,7 +46,7 @@ function generate_smilies($mode, $forum_id)
|
||||
|
||||
page_header($user->lang['SMILIES']);
|
||||
|
||||
$sql = 'SELECT COUNT(smiley_id) AS count
|
||||
$sql = 'SELECT COUNT(smiley_id) AS item_count
|
||||
FROM ' . SMILIES_TABLE . '
|
||||
GROUP BY smiley_url';
|
||||
$result = $db->sql_query($sql, 3600);
|
||||
@@ -88,7 +88,7 @@ function generate_smilies($mode, $forum_id)
|
||||
$sql = 'SELECT smiley_url, MIN(emotion) as emotion, MIN(code) AS code, smiley_width, smiley_height
|
||||
FROM ' . SMILIES_TABLE . '
|
||||
GROUP BY smiley_url, smiley_width, smiley_height
|
||||
ORDER BY smiley_order';
|
||||
ORDER BY MIN(smiley_order)';
|
||||
$result = $db->sql_query_limit($sql, $config['smilies_per_page'], $start, 3600);
|
||||
}
|
||||
else
|
||||
@@ -2525,7 +2525,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
||||
VALUES (' . $user->data['user_id'] . ', ' . $data['topic_id'] . ')';
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
else if ($data['notify_set'] && !$data['notify'])
|
||||
else if (($config['email_enable'] || $config['jab_enable']) && $data['notify_set'] && !$data['notify'])
|
||||
{
|
||||
$sql = 'DELETE FROM ' . TOPICS_WATCH_TABLE . '
|
||||
WHERE user_id = ' . $user->data['user_id'] . '
|
||||
|
@@ -894,6 +894,13 @@ function handle_mark_actions($user_id, $mark_action)
|
||||
|
||||
case 'delete_marked':
|
||||
|
||||
global $auth;
|
||||
|
||||
if (!$auth->acl_get('u_pm_delete'))
|
||||
{
|
||||
trigger_error('NO_AUTH_DELETE_MESSAGE');
|
||||
}
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
delete_pm($user_id, $msg_ids, $cur_folder_id);
|
||||
|
@@ -158,11 +158,11 @@ class custom_profile
|
||||
|
||||
case FIELD_STRING:
|
||||
case FIELD_TEXT:
|
||||
if (empty($field_value) && !$field_data['field_required'])
|
||||
if (trim($field_value) === '' && !$field_data['field_required'])
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (empty($field_value) && $field_data['field_required'])
|
||||
else if (trim($field_value) === '' && $field_data['field_required'])
|
||||
{
|
||||
return 'FIELD_REQUIRED';
|
||||
}
|
||||
@@ -624,7 +624,7 @@ class custom_profile
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!$preview && isset($user->profile_fields[$user_ident]) && is_null($user->profile_fields[$user_ident]))
|
||||
if (!$preview && array_key_exists($user_ident, $user->profile_fields) && is_null($user->profile_fields[$user_ident]))
|
||||
{
|
||||
$value = NULL;
|
||||
}
|
||||
|
@@ -2832,11 +2832,11 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false,
|
||||
|
||||
if ($config['coppa_enable'])
|
||||
{
|
||||
$group_order = array('ADMINISTRATORS', 'GLOBAL_MODERATORS', 'REGISTERED_COPPA', 'REGISTERED', 'BOTS', 'GUESTS');
|
||||
$group_order = array('ADMINISTRATORS', 'GLOBAL_MODERATORS', 'NEWLY_REGISTERED', 'REGISTERED_COPPA', 'REGISTERED', 'BOTS', 'GUESTS');
|
||||
}
|
||||
else
|
||||
{
|
||||
$group_order = array('ADMINISTRATORS', 'GLOBAL_MODERATORS', 'REGISTERED', 'BOTS', 'GUESTS');
|
||||
$group_order = array('ADMINISTRATORS', 'GLOBAL_MODERATORS', 'NEWLY_REGISTERED', 'REGISTERED', 'BOTS', 'GUESTS');
|
||||
}
|
||||
|
||||
// We need both username and user_id info
|
||||
|
@@ -416,14 +416,11 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id)
|
||||
|
||||
// If the topic no longer exist, we will update the topic watch table.
|
||||
// To not let it error out on users watching both topics, we just return on an error...
|
||||
// Same for Bookmarks
|
||||
$db->sql_return_on_error(true);
|
||||
$db->sql_query('UPDATE ' . TOPICS_WATCH_TABLE . ' SET topic_id = ' . (int) $to_topic_id . ' WHERE ' . $db->sql_in_set('topic_id', $topic_ids));
|
||||
$db->sql_query('UPDATE ' . BOOKMARKS_TABLE . ' SET topic_id = ' . (int) $to_topic_id . ' WHERE ' . $db->sql_in_set('topic_id', $topic_ids));
|
||||
$db->sql_return_on_error(false);
|
||||
|
||||
$db->sql_query('DELETE FROM ' . TOPICS_WATCH_TABLE . ' WHERE ' . $db->sql_in_set('topic_id', $topic_ids));
|
||||
$db->sql_query('DELETE FROM ' . BOOKMARKS_TABLE . ' WHERE ' . $db->sql_in_set('topic_id', $topic_ids));
|
||||
|
||||
// Link to the new topic
|
||||
$return_link .= (($return_link) ? '<br /><br />' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&t=' . $to_topic_id) . '">', '</a>');
|
||||
|
@@ -175,7 +175,7 @@ class mcp_logs
|
||||
$template->assign_vars(array(
|
||||
'PAGE_NUMBER' => on_page($log_count, $config['topics_per_page'], $start),
|
||||
'TOTAL' => ($log_count == 1) ? $user->lang['TOTAL_LOG'] : sprintf($user->lang['TOTAL_LOGS'], $log_count),
|
||||
'PAGINATION' => generate_pagination($this->u_action . "&$u_sort_param$keywords_param", $log_count, $config['topics_per_page'], $start, true),
|
||||
'PAGINATION' => generate_pagination($this->u_action . "&$u_sort_param$keywords_param", $log_count, $config['topics_per_page'], $start),
|
||||
|
||||
'L_TITLE' => $user->lang['MCP_LOGS'],
|
||||
|
||||
|
@@ -568,7 +568,7 @@ function mcp_move_topic($topic_ids)
|
||||
{
|
||||
$additional_msg = $user->lang['FORUM_NOT_POSTABLE'];
|
||||
}
|
||||
else if (!$auth->acl_get('f_post', $to_forum_id))
|
||||
else if (!$auth->acl_get('f_post', $to_forum_id) || (!$auth->acl_get('m_approve', $to_forum_id) && !$auth->acl_get('f_noapprove', $to_forum_id)))
|
||||
{
|
||||
$additional_msg = $user->lang['USER_CANNOT_POST'];
|
||||
}
|
||||
@@ -813,7 +813,14 @@ function mcp_delete_topic($topic_ids)
|
||||
|
||||
foreach ($data as $topic_id => $row)
|
||||
{
|
||||
add_log('mod', $row['forum_id'], $topic_id, 'LOG_DELETE_' . ($row['topic_moved_id'] ? 'SHADOW_' : '') . 'TOPIC', $row['topic_title']);
|
||||
if ($row['topic_moved_id'])
|
||||
{
|
||||
add_log('mod', $row['forum_id'], $topic_id, 'LOG_DELETE_SHADOW_TOPIC', $row['topic_title']);
|
||||
}
|
||||
else
|
||||
{
|
||||
add_log('mod', $row['forum_id'], $topic_id, 'LOG_DELETE_TOPIC', $row['topic_title'], $row['topic_first_poster_name']);
|
||||
}
|
||||
}
|
||||
|
||||
$return = delete_topics('topic_id', $topic_ids);
|
||||
@@ -897,7 +904,8 @@ function mcp_delete_post($post_ids)
|
||||
|
||||
foreach ($post_data as $id => $row)
|
||||
{
|
||||
add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_DELETE_POST', $row['post_subject']);
|
||||
$post_username = ($row['poster_id'] == ANONYMOUS && !empty($row['post_username'])) ? $row['post_username'] : $row['username'];
|
||||
add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_DELETE_POST', $row['post_subject'], $post_username);
|
||||
}
|
||||
|
||||
// Now delete the posts, topics and forums are automatically resync'ed
|
||||
|
@@ -198,7 +198,7 @@ class mcp_notes
|
||||
|
||||
$log_data = array();
|
||||
$log_count = 0;
|
||||
view_log('user', $log_data, $log_count, $config['posts_per_page'], $start, 0, 0, $user_id, $sql_where, $sql_sort, $keywords);
|
||||
view_log('user', $log_data, $log_count, $config['topics_per_page'], $start, 0, 0, $user_id, $sql_where, $sql_sort, $keywords);
|
||||
|
||||
if ($log_count)
|
||||
{
|
||||
@@ -226,8 +226,8 @@ class mcp_notes
|
||||
|
||||
'L_TITLE' => $user->lang['MCP_NOTES_USER'],
|
||||
|
||||
'PAGE_NUMBER' => on_page($log_count, $config['posts_per_page'], $start),
|
||||
'PAGINATION' => generate_pagination($this->u_action . "&$u_sort_param$keywords_param", $log_count, $config['topics_per_page'], $start, true),
|
||||
'PAGE_NUMBER' => on_page($log_count, $config['topics_per_page'], $start),
|
||||
'PAGINATION' => generate_pagination($this->u_action . "&$u_sort_param$keywords_param", $log_count, $config['topics_per_page'], $start),
|
||||
'TOTAL_REPORTS' => ($log_count == 1) ? $user->lang['LIST_REPORT'] : sprintf($user->lang['LIST_REPORTS'], $log_count),
|
||||
|
||||
'RANK_TITLE' => $rank_title,
|
||||
|
@@ -105,6 +105,7 @@ class mcp_queue
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_TOPIC_REVIEW' => true,
|
||||
'S_BBCODE_ALLOWED' => $post_info['enable_bbcode'],
|
||||
'TOPIC_TITLE' => $post_info['topic_title'])
|
||||
);
|
||||
}
|
||||
|
@@ -116,6 +116,7 @@ class mcp_reports
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_TOPIC_REVIEW' => true,
|
||||
'S_BBCODE_ALLOWED' => $post_info['enable_bbcode'],
|
||||
'TOPIC_TITLE' => $post_info['topic_title'])
|
||||
);
|
||||
}
|
||||
@@ -429,7 +430,7 @@ class mcp_reports
|
||||
'PAGE_NUMBER' => on_page($total, $config['topics_per_page'], $start),
|
||||
'TOPIC_ID' => $topic_id,
|
||||
'TOTAL' => $total,
|
||||
'TOTAL_REPORTS' => ($total == 1) ? $user->lang['LIST_REPORT'] : sprintf($user->lang['LIST_REPORTS'], $total),
|
||||
'TOTAL_REPORTS' => ($total == 1) ? $user->lang['LIST_REPORT'] : sprintf($user->lang['LIST_REPORTS'], $total),
|
||||
)
|
||||
);
|
||||
|
||||
@@ -671,7 +672,7 @@ function close_report($report_id_list, $mode, $action, $pm = false)
|
||||
$messenger->send($reporter['user_notify_type']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!$pm)
|
||||
{
|
||||
foreach ($post_info as $post)
|
||||
@@ -712,13 +713,13 @@ function close_report($report_id_list, $mode, $action, $pm = false)
|
||||
{
|
||||
$return_forum = sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . current($forum_ids)) . '">', '</a>') . '<br /><br />';
|
||||
}
|
||||
|
||||
|
||||
if (sizeof($topic_ids) === 1)
|
||||
{
|
||||
$return_topic = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . current($topic_ids) . '&f=' . current($forum_ids)) . '">', '</a>') . '<br /><br />';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
trigger_error($user->lang[$success_msg] . '<br /><br />' . $return_forum . $return_topic . sprintf($user->lang['RETURN_PAGE'], "<a href=\"$redirect\">", '</a>'));
|
||||
}
|
||||
}
|
||||
|
@@ -106,7 +106,14 @@ function mcp_topic_view($id, $mode, $action)
|
||||
|
||||
if ($total == -1)
|
||||
{
|
||||
$total = $topic_info['topic_replies'] + 1;
|
||||
if ($auth->acl_get('m_approve', $topic_info['forum_id']))
|
||||
{
|
||||
$total = $topic_info['topic_replies_real'] + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$total = $topic_info['topic_replies'] + 1;
|
||||
}
|
||||
}
|
||||
|
||||
$posts_per_page = max(0, request_var('posts_per_page', intval($config['posts_per_page'])));
|
||||
@@ -504,45 +511,6 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
|
||||
// Update forum statistics
|
||||
set_config_count('num_topics', 1, true);
|
||||
|
||||
// Add new topic to bookmarks
|
||||
$bookmarks = array();
|
||||
$sql = 'SELECT user_id
|
||||
FROM ' . BOOKMARKS_TABLE . '
|
||||
WHERE topic_id = ' . $topic_id;
|
||||
$result = $db->sql_query($sql);
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$bookmarks[] = array(
|
||||
'user_id' => (int) $row['user_id'],
|
||||
'topic_id' => $to_topic_id,
|
||||
);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
if (sizeof($bookmarks))
|
||||
{
|
||||
$db->sql_multi_insert(BOOKMARKS_TABLE, $bookmarks);
|
||||
}
|
||||
|
||||
// Add new topic to watch-list
|
||||
$notifications = array();
|
||||
$sql = 'SELECT user_id, notify_status
|
||||
FROM ' . TOPICS_WATCH_TABLE . '
|
||||
WHERE topic_id = ' . $topic_id;
|
||||
$result = $db->sql_query($sql);
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$notifications[] = array(
|
||||
'user_id' => (int) $row['user_id'],
|
||||
'topic_id' => $to_topic_id,
|
||||
'notify_status' => (int) $row['notify_status'],
|
||||
);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
if (sizeof($notifications))
|
||||
{
|
||||
$db->sql_multi_insert(TOPICS_WATCH_TABLE, $notifications);
|
||||
}
|
||||
|
||||
// Link back to both topics
|
||||
$return_link = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&t=' . $post_info['topic_id']) . '">', '</a>') . '<br /><br />' . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&t=' . $to_topic_id) . '">', '</a>');
|
||||
}
|
||||
@@ -636,65 +604,17 @@ function merge_posts($topic_id, $to_topic_id)
|
||||
|
||||
if ($row)
|
||||
{
|
||||
// Add new topic to bookmarks
|
||||
$bookmarks = array();
|
||||
$sql = 'SELECT user_id
|
||||
FROM ' . BOOKMARKS_TABLE . '
|
||||
WHERE topic_id = ' . (int) $topic_id;
|
||||
$result = $db->sql_query($sql);
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$bookmarks[] = array(
|
||||
'user_id' => (int) $row['user_id'],
|
||||
'topic_id' => (int) $to_topic_id,
|
||||
);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
if (sizeof($bookmarks))
|
||||
{
|
||||
// To not let it error out on users, who already bookmarked the topic, we just return on an error...
|
||||
$db->sql_return_on_error(true);
|
||||
$db->sql_multi_insert(BOOKMARKS_TABLE, $bookmarks);
|
||||
$db->sql_return_on_error(false);
|
||||
}
|
||||
|
||||
// Add new topic to notifications
|
||||
$notifications = array();
|
||||
$sql = 'SELECT user_id, notify_status
|
||||
FROM ' . TOPICS_WATCH_TABLE . '
|
||||
WHERE topic_id = ' . (int) $topic_id;
|
||||
$result = $db->sql_query($sql);
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$notifications[] = array(
|
||||
'user_id' => (int) $row['user_id'],
|
||||
'topic_id' => (int) $to_topic_id,
|
||||
'notify_status' => (int) $row['notify_status'],
|
||||
);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
if (sizeof($notifications))
|
||||
{
|
||||
// To not let it error out on users, who already watch the topic, we just return on an error...
|
||||
$db->sql_return_on_error(true);
|
||||
$db->sql_multi_insert(TOPICS_WATCH_TABLE, $notifications);
|
||||
$db->sql_return_on_error(false);
|
||||
}
|
||||
|
||||
$return_link .= sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $topic_id) . '">', '</a>');
|
||||
}
|
||||
else
|
||||
{
|
||||
// If the topic no longer exist, we will update the topic watch table.
|
||||
// To not let it error out on users watching both topics, we just return on an error...
|
||||
// Same for bookmarks
|
||||
$db->sql_return_on_error(true);
|
||||
$db->sql_query('UPDATE ' . TOPICS_WATCH_TABLE . ' SET topic_id = ' . (int) $to_topic_id . ' WHERE topic_id = ' . (int) $topic_id);
|
||||
$db->sql_query('UPDATE ' . BOOKMARKS_TABLE . ' SET topic_id = ' . (int) $to_topic_id . ' WHERE topic_id = ' . (int) $topic_id);
|
||||
$db->sql_return_on_error(false);
|
||||
|
||||
$db->sql_query('DELETE FROM ' . TOPICS_WATCH_TABLE . ' WHERE topic_id = ' . (int) $topic_id);
|
||||
$db->sql_query('DELETE FROM ' . BOOKMARKS_TABLE . ' WHERE topic_id = ' . (int) $topic_id);
|
||||
}
|
||||
|
||||
// Link to the new topic
|
||||
|
@@ -115,7 +115,7 @@ class bbcode_firstpass extends bbcode
|
||||
'attachment' => array('bbcode_id' => 12, 'regexp' => array('#\[attachment=([0-9]+)\](.*?)\[/attachment\]#ise' => "\$this->bbcode_attachment('\$1', '\$2')")),
|
||||
'b' => array('bbcode_id' => 1, 'regexp' => array('#\[b\](.*?)\[/b\]#ise' => "\$this->bbcode_strong('\$1')")),
|
||||
'i' => array('bbcode_id' => 2, 'regexp' => array('#\[i\](.*?)\[/i\]#ise' => "\$this->bbcode_italic('\$1')")),
|
||||
'url' => array('bbcode_id' => 3, 'regexp' => array('#\[url(=(.*))?\]((?s).*)\[/url\]#iUe' => "\$this->validate_url('\$2', '\$3')")),
|
||||
'url' => array('bbcode_id' => 3, 'regexp' => array('#\[url(=(.*))?\](.*)\[/url\]#iUe' => "\$this->validate_url('\$2', '\$3')")),
|
||||
'img' => array('bbcode_id' => 4, 'regexp' => array('#\[img\](.*)\[/img\]#iUe' => "\$this->bbcode_img('\$1')")),
|
||||
'size' => array('bbcode_id' => 5, 'regexp' => array('#\[size=([\-\+]?\d+)\](.*?)\[/size\]#ise' => "\$this->bbcode_size('\$1', '\$2')")),
|
||||
'color' => array('bbcode_id' => 6, 'regexp' => array('!\[color=(#[0-9a-f]{3}|#[0-9a-f]{6}|[a-z\-]+)\](.*?)\[/color\]!ise' => "\$this->bbcode_color('\$1', '\$2')")),
|
||||
@@ -1064,17 +1064,12 @@ class parse_message extends bbcode_firstpass
|
||||
|
||||
$this->mode = $mode;
|
||||
|
||||
if (!isset($config['max_' . $mode . '_chars']))
|
||||
foreach (array('chars', 'smilies', 'urls', 'font_size', 'img_height', 'img_width') as $key)
|
||||
{
|
||||
$config['max_' . $mode . '_chars'] = 0;
|
||||
}
|
||||
if (!isset($config['max_' . $mode . '_smilies']))
|
||||
{
|
||||
$config['max_' . $mode . '_smilies'] = 0;
|
||||
}
|
||||
if (!isset($config['max_' . $mode . '_urls']))
|
||||
{
|
||||
$config['max_' . $mode . '_urls'] = 0;
|
||||
if (!isset($config['max_' . $mode . '_' . $key]))
|
||||
{
|
||||
$config['max_' . $mode . '_' . $key] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
$this->allow_img_bbcode = $allow_img_bbcode;
|
||||
|
@@ -162,25 +162,59 @@ class phpbb_questionnaire_system_data_provider
|
||||
$server_address = $_SERVER['LOCAL_ADDR'];
|
||||
}
|
||||
|
||||
$ip_address_ary = explode('.', $server_address);
|
||||
|
||||
// build ip
|
||||
if (!isset($ip_address_ary[0]) || !isset($ip_address_ary[1]))
|
||||
{
|
||||
$ip_address_ary = explode('.', '0.0.0.0');
|
||||
}
|
||||
|
||||
return array(
|
||||
'os' => PHP_OS,
|
||||
'httpd' => $_SERVER['SERVER_SOFTWARE'],
|
||||
// we don't want the real IP address (for privacy policy reasons) but only
|
||||
// a network address to see whether your installation is running on a private or public network.
|
||||
'private_ip' => $this->is_private_ip($server_address),
|
||||
'ipv6' => strpos($server_address, ':') !== false,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the given IP is in a private network.
|
||||
*
|
||||
* @param string $ip IP in v4 dot-decimal or v6 hex format
|
||||
* @return bool true if the IP is from a private network, else false
|
||||
*/
|
||||
function is_private_ip($ip)
|
||||
{
|
||||
// IPv4
|
||||
if (strpos($ip, ':') === false)
|
||||
{
|
||||
$ip_address_ary = explode('.', $ip);
|
||||
|
||||
// build ip
|
||||
if (!isset($ip_address_ary[0]) || !isset($ip_address_ary[1]))
|
||||
{
|
||||
$ip_address_ary = explode('.', '0.0.0.0');
|
||||
}
|
||||
|
||||
// IANA reserved addresses for private networks (RFC 1918) are:
|
||||
// - 10.0.0.0/8
|
||||
// - 172.16.0.0/12
|
||||
// - 192.168.0.0/16
|
||||
'ip' => $ip_address_ary[0] . '.' . $ip_address_ary[1] . '.XXX.YYY',
|
||||
);
|
||||
if ($ip_address_ary[0] == '10' ||
|
||||
($ip_address_ary[0] == '172' && intval($ip_address_ary[1]) > 15 && intval($ip_address_ary[1]) < 32) ||
|
||||
($ip_address_ary[0] == '192' && $ip_address_ary[1] == '168') ||
|
||||
($ip_address_ary[0] == '192' && $ip_address_ary[1] == '168'))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// IPv6
|
||||
else
|
||||
{
|
||||
// unique local unicast
|
||||
$prefix = substr($ip, 0, 2);
|
||||
if ($prefix == 'fc' || $prefix == 'fd')
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -233,6 +267,7 @@ class phpbb_questionnaire_phpbb_data_provider
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include("{$phpbb_root_path}config.$phpEx");
|
||||
unset($dbhost, $dbport, $dbname, $dbuser, $dbpasswd); // Just a precaution
|
||||
|
||||
// Only send certain config vars
|
||||
$config_vars = array(
|
||||
@@ -303,6 +338,7 @@ class phpbb_questionnaire_phpbb_data_provider
|
||||
'database_gc' => true,
|
||||
'dbms_version' => true,
|
||||
'default_dateformat' => true,
|
||||
'default_lang' => true,
|
||||
'display_last_edited' => true,
|
||||
'display_order' => true,
|
||||
'edit_time' => true,
|
||||
@@ -314,13 +350,15 @@ class phpbb_questionnaire_phpbb_data_provider
|
||||
'enable_pm_icons' => true,
|
||||
'enable_post_confirm' => true,
|
||||
'feed_enable' => true,
|
||||
'feed_limit' => true,
|
||||
'feed_http_auth' => true,
|
||||
'feed_limit_post' => true,
|
||||
'feed_limit_topic' => true,
|
||||
'feed_overall' => true,
|
||||
'feed_overall_forums' => true,
|
||||
'feed_overall_forums_limit' => true,
|
||||
'feed_overall_topics' => true,
|
||||
'feed_overall_topics_limit' => true,
|
||||
'feed_forum' => true,
|
||||
'feed_topic' => true,
|
||||
'feed_topics_new' => true,
|
||||
'feed_topics_active' => true,
|
||||
'feed_item_statistics' => true,
|
||||
'flood_interval' => true,
|
||||
'force_server_vars' => true,
|
||||
@@ -444,10 +482,13 @@ class phpbb_questionnaire_phpbb_data_provider
|
||||
}
|
||||
}
|
||||
|
||||
global $db;
|
||||
|
||||
$result['dbms'] = $dbms;
|
||||
$result['acm_type'] = $acm_type;
|
||||
$result['load_extensions'] = $load_extensions;
|
||||
$result['user_agent'] = 'Unknown';
|
||||
$result['dbms_version'] = $db->sql_server_info(true);
|
||||
|
||||
// Try to get user agent vendor and version
|
||||
$match = array();
|
||||
|
@@ -444,7 +444,7 @@ class fulltext_mysql extends search_backend
|
||||
if (sizeof($author_ary) && $author_name)
|
||||
{
|
||||
// first one matches post of registered users, second one guests and deleted users
|
||||
$sql_author = '(' . $db->sql_in_set('p.poster_id', array_diff($author_ary, array(ANONYMOUS)), false, true) . ' OR p.post_username ' . $author_name . ')';
|
||||
$sql_author = ' AND (' . $db->sql_in_set('p.poster_id', array_diff($author_ary, array(ANONYMOUS)), false, true) . ' OR p.post_username ' . $author_name . ')';
|
||||
}
|
||||
else if (sizeof($author_ary))
|
||||
{
|
||||
@@ -473,7 +473,7 @@ class fulltext_mysql extends search_backend
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$id_ary[] = $row[$field];
|
||||
$id_ary[] = (int) $row[$field];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
@@ -650,7 +650,7 @@ class fulltext_mysql extends search_backend
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$id_ary[] = $row[$field];
|
||||
$id_ary[] = (int) $row[$field];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
@@ -202,7 +202,8 @@ class fulltext_native extends search_backend
|
||||
{
|
||||
$sql = 'SELECT word_id, word_text, word_common
|
||||
FROM ' . SEARCH_WORDLIST_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('word_text', $exact_words);
|
||||
WHERE ' . $db->sql_in_set('word_text', $exact_words) . '
|
||||
ORDER BY word_count ASC';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
// store an array of words and ids, remove common words
|
||||
@@ -377,10 +378,6 @@ class fulltext_native extends search_backend
|
||||
return false;
|
||||
}
|
||||
|
||||
sort($this->must_contain_ids);
|
||||
sort($this->must_not_contain_ids);
|
||||
sort($this->must_exclude_one_ids);
|
||||
|
||||
if (!empty($this->search_query))
|
||||
{
|
||||
return true;
|
||||
@@ -420,11 +417,19 @@ class fulltext_native extends search_backend
|
||||
return false;
|
||||
}
|
||||
|
||||
$must_contain_ids = $this->must_contain_ids;
|
||||
$must_not_contain_ids = $this->must_not_contain_ids;
|
||||
$must_exclude_one_ids = $this->must_exclude_one_ids;
|
||||
|
||||
sort($must_contain_ids);
|
||||
sort($must_not_contain_ids);
|
||||
sort($must_exclude_one_ids);
|
||||
|
||||
// generate a search_key from all the options to identify the results
|
||||
$search_key = md5(implode('#', array(
|
||||
serialize($this->must_contain_ids),
|
||||
serialize($this->must_not_contain_ids),
|
||||
serialize($this->must_exclude_one_ids),
|
||||
serialize($must_contain_ids),
|
||||
serialize($must_not_contain_ids),
|
||||
serialize($must_exclude_one_ids),
|
||||
$type,
|
||||
$fields,
|
||||
$terms,
|
||||
@@ -739,7 +744,7 @@ class fulltext_native extends search_backend
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$id_ary[] = $row[(($type == 'posts') ? 'post_id' : 'topic_id')];
|
||||
$id_ary[] = (int) $row[(($type == 'posts') ? 'post_id' : 'topic_id')];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
@@ -981,7 +986,7 @@ class fulltext_native extends search_backend
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$id_ary[] = $row[$field];
|
||||
$id_ary[] = (int) $row[$field];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
@@ -1355,13 +1355,13 @@ class session
|
||||
{
|
||||
global $config, $db;
|
||||
|
||||
$user_id = ($user_id === false) ? $this->data['user_id'] : $user_id;
|
||||
$user_id = ($user_id === false) ? (int) $this->data['user_id'] : (int) $user_id;
|
||||
|
||||
$sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . '
|
||||
WHERE user_id = ' . (int) $user_id;
|
||||
$db->sql_query($sql);
|
||||
|
||||
// Update last visit info first before deleting sessions
|
||||
// If the user is logged in, update last visit info first before deleting sessions
|
||||
$sql = 'SELECT session_time, session_page
|
||||
FROM ' . SESSIONS_TABLE . '
|
||||
WHERE session_user_id = ' . (int) $user_id . '
|
||||
@@ -1370,15 +1370,18 @@ class session
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET user_lastvisit = ' . (int) $row['session_time'] . ", user_lastpage = '" . $db->sql_escape($row['session_page']) . "'
|
||||
WHERE user_id = " . (int) $user_id;
|
||||
$db->sql_query($sql);
|
||||
if ($row)
|
||||
{
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET user_lastvisit = ' . (int) $row['session_time'] . ", user_lastpage = '" . $db->sql_escape($row['session_page']) . "'
|
||||
WHERE user_id = " . (int) $user_id;
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
// Let's also clear any current sessions for the specified user_id
|
||||
// If it's the current user then we'll leave this session intact
|
||||
$sql_where = 'session_user_id = ' . (int) $user_id;
|
||||
$sql_where .= ($user_id === $this->data['user_id']) ? " AND session_id <> '" . $db->sql_escape($this->session_id) . "'" : '';
|
||||
$sql_where .= ($user_id === (int) $this->data['user_id']) ? " AND session_id <> '" . $db->sql_escape($this->session_id) . "'" : '';
|
||||
|
||||
$sql = 'DELETE FROM ' . SESSIONS_TABLE . "
|
||||
WHERE $sql_where";
|
||||
@@ -1386,7 +1389,7 @@ class session
|
||||
|
||||
// We're changing the password of the current user and they have a key
|
||||
// Lets regenerate it to be safe
|
||||
if ($user_id === $this->data['user_id'] && $this->cookie_data['k'])
|
||||
if ($user_id === (int) $this->data['user_id'] && $this->cookie_data['k'])
|
||||
{
|
||||
$this->set_login_key($user_id);
|
||||
}
|
||||
|
@@ -90,7 +90,7 @@ class template
|
||||
* Set custom template location (able to use directory outside of phpBB)
|
||||
* @access public
|
||||
*/
|
||||
function set_custom_template($template_path, $template_name, $template_mode = 'template')
|
||||
function set_custom_template($template_path, $template_name, $fallback_template_path = false)
|
||||
{
|
||||
global $phpbb_root_path, $user;
|
||||
|
||||
@@ -103,12 +103,24 @@ class template
|
||||
$this->root = $template_path;
|
||||
$this->cachepath = $phpbb_root_path . 'cache/ctpl_' . str_replace('_', '-', $template_name) . '_';
|
||||
|
||||
// As the template-engine is used for more than the template (emails, etc.), we should not set $user->theme in all cases, but only on the real template.
|
||||
if ($template_mode == 'template')
|
||||
if ($fallback_template_path !== false)
|
||||
{
|
||||
$user->theme['template_storedb'] = false;
|
||||
$user->theme['template_inherits_id'] = false;
|
||||
if (substr($fallback_template_path, -1) == '/')
|
||||
{
|
||||
$fallback_template_path = substr($fallback_template_path, 0, -1);
|
||||
}
|
||||
|
||||
$this->inherit_root = $fallback_template_path;
|
||||
$this->orig_tpl_inherits_id = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->orig_tpl_inherits_id = false;
|
||||
}
|
||||
|
||||
// the database does not store the path or name of a custom template
|
||||
// so there is no way we can properly store custom templates there
|
||||
$this->orig_tpl_storedb = false;
|
||||
|
||||
$this->_rootref = &$this->_tpldata['.'][0];
|
||||
|
||||
@@ -152,6 +164,7 @@ class template
|
||||
function destroy()
|
||||
{
|
||||
$this->_tpldata = array('.' => array(0 => array()));
|
||||
$this->_rootref = &$this->_tpldata['.'][0];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -248,8 +261,19 @@ class template
|
||||
{
|
||||
global $user, $phpEx, $config;
|
||||
|
||||
if (!isset($this->filename[$handle]))
|
||||
{
|
||||
trigger_error("template->_tpl_load(): No file specified for handle $handle", E_USER_ERROR);
|
||||
}
|
||||
|
||||
// reload these settings to have the values they had when this object was initialised
|
||||
// using set_template or set_custom_template, they might otherwise have been overwritten
|
||||
// by other template class instances in between.
|
||||
$user->theme['template_storedb'] = $this->orig_tpl_storedb;
|
||||
$user->theme['template_inherits_id'] = $this->orig_tpl_inherits_id;
|
||||
|
||||
$filename = $this->cachepath . str_replace('/', '.', $this->filename[$handle]) . '.' . $phpEx;
|
||||
$this->files_template[$handle] = $user->theme['template_id'];
|
||||
$this->files_template[$handle] = (isset($user->theme['template_id'])) ? $user->theme['template_id'] : 0;
|
||||
|
||||
$recompile = false;
|
||||
if (!file_exists($filename) || @filesize($filename) === 0)
|
||||
|
@@ -122,6 +122,7 @@ class ucp_pm
|
||||
// trigger_error('NO_AUTH_SEND_MESSAGE');
|
||||
$template->assign_vars(array(
|
||||
'S_NO_AUTH_SEND_MESSAGE' => true,
|
||||
'S_COMPOSE_PM_VIEW' => true,
|
||||
));
|
||||
|
||||
$tpl_file = 'ucp_pm_viewfolder';
|
||||
|
@@ -767,7 +767,7 @@ function compose_pm($id, $mode, $action)
|
||||
$parse_sig->bbcode_uid = $preview_signature_uid;
|
||||
$parse_sig->bbcode_bitfield = $preview_signature_bitfield;
|
||||
|
||||
$parse_sig->format_display($enable_bbcode, $enable_urls, $enable_smilies);
|
||||
$parse_sig->format_display($config['allow_sig_bbcode'], $config['allow_sig_links'], $config['allow_sig_smilies']);
|
||||
$preview_signature = $parse_sig->message;
|
||||
unset($parse_sig);
|
||||
}
|
||||
@@ -811,7 +811,7 @@ function compose_pm($id, $mode, $action)
|
||||
}
|
||||
|
||||
// Decode text for message display
|
||||
$bbcode_uid = (($action == 'quote' || $action == 'forward') && !$preview && !$refresh && !sizeof($error)) ? $bbcode_uid : $message_parser->bbcode_uid;
|
||||
$bbcode_uid = (($action == 'quote' || $action == 'forward') && !$preview && !$refresh && (!sizeof($error) || (sizeof($error) && !$submit))) ? $bbcode_uid : $message_parser->bbcode_uid;
|
||||
|
||||
$message_parser->decode_message($bbcode_uid);
|
||||
|
||||
|
@@ -637,12 +637,29 @@ function define_action_option($hardcoded, $action_option, $action_lang, $folder)
|
||||
function define_rule_option($hardcoded, $rule_option, $rule_lang, $check_ary)
|
||||
{
|
||||
global $template;
|
||||
global $module;
|
||||
|
||||
$exclude = array();
|
||||
|
||||
if (!$module->loaded('zebra', 'friends'))
|
||||
{
|
||||
$exclude[RULE_IS_FRIEND] = true;
|
||||
}
|
||||
|
||||
if (!$module->loaded('zebra', 'foes'))
|
||||
{
|
||||
$exclude[RULE_IS_FOE] = true;
|
||||
}
|
||||
|
||||
$s_rule_options = '';
|
||||
if (!$hardcoded)
|
||||
{
|
||||
foreach ($check_ary as $value => $_check)
|
||||
{
|
||||
if (isset($exclude[$value]))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$s_rule_options .= '<option value="' . $value . '"' . (($value == $rule_option) ? ' selected="selected"' : '') . '>' . $rule_lang[$value] . '</option>';
|
||||
}
|
||||
}
|
||||
|
@@ -65,6 +65,12 @@ function view_folder($id, $mode, $folder_id, $folder)
|
||||
|
||||
$mark_options = array('mark_important', 'delete_marked');
|
||||
|
||||
// Minimise edits
|
||||
if (!$auth->acl_get('u_pm_delete') && $key = array_search('delete_marked', $mark_options))
|
||||
{
|
||||
unset($mark_options[$key]);
|
||||
}
|
||||
|
||||
$s_mark_options = '';
|
||||
foreach ($mark_options as $mark_option)
|
||||
{
|
||||
@@ -194,13 +200,15 @@ function view_folder($id, $mode, $folder_id, $folder)
|
||||
else
|
||||
{
|
||||
// Build Recipient List if in outbox/sentbox
|
||||
$address = $data = array();
|
||||
|
||||
$address_temp = $address = $data = array();
|
||||
|
||||
if ($folder_id == PRIVMSGS_OUTBOX || $folder_id == PRIVMSGS_SENTBOX)
|
||||
{
|
||||
foreach ($folder_info['rowset'] as $message_id => $row)
|
||||
{
|
||||
$address[$message_id] = rebuild_header(array('to' => $row['to_address'], 'bcc' => $row['bcc_address']));
|
||||
$address_temp[$message_id] = rebuild_header(array('to' => $row['to_address'], 'bcc' => $row['bcc_address']));
|
||||
$address[$message_id] = array();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,8 +232,12 @@ function view_folder($id, $mode, $folder_id, $folder)
|
||||
$_types = array('u', 'g');
|
||||
foreach ($_types as $ug_type)
|
||||
{
|
||||
if (isset($address[$message_id][$ug_type]) && sizeof($address[$message_id][$ug_type]))
|
||||
if (isset($address_temp[$message_id][$ug_type]) && sizeof($address_temp[$message_id][$ug_type]))
|
||||
{
|
||||
if (!isset($address[$message_id][$ug_type]))
|
||||
{
|
||||
$address[$message_id][$ug_type] = array();
|
||||
}
|
||||
if ($ug_type == 'u')
|
||||
{
|
||||
$sql = 'SELECT user_id as id, username as name
|
||||
@@ -238,21 +250,31 @@ function view_folder($id, $mode, $folder_id, $folder)
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
WHERE ';
|
||||
}
|
||||
$sql .= $db->sql_in_set(($ug_type == 'u') ? 'user_id' : 'group_id', array_map('intval', array_keys($address[$message_id][$ug_type])));
|
||||
$sql .= $db->sql_in_set(($ug_type == 'u') ? 'user_id' : 'group_id', array_map('intval', array_keys($address_temp[$message_id][$ug_type])));
|
||||
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($info_row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$address[$message_id][$ug_type][$address[$message_id][$ug_type][$info_row['id']]][] = $info_row['name'];
|
||||
unset($address[$message_id][$ug_type][$info_row['id']]);
|
||||
$address[$message_id][$ug_type][$address_temp[$message_id][$ug_type][$info_row['id']]][] = $info_row['name'];
|
||||
unset($address_temp[$message_id][$ug_type][$info_row['id']]);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
}
|
||||
|
||||
decode_message($message_row['message_text'], $message_row['bbcode_uid']);
|
||||
// There is the chance that all recipients of the message got deleted. To avoid creating
|
||||
// exports without recipients, we add a bogus "undisclosed recipient".
|
||||
if (!(isset($address[$message_id]['g']) && sizeof($address[$message_id]['g'])) &&
|
||||
!(isset($address[$message_id]['u']) && sizeof($address[$message_id]['u'])))
|
||||
{
|
||||
$address[$message_id]['u'] = array();
|
||||
$address[$message_id]['u']['to'] = array();
|
||||
$address[$message_id]['u']['to'][] = $user->lang['UNDISCLOSED_RECIPIENT'];
|
||||
}
|
||||
|
||||
decode_message($message_row['message_text'], $message_row['bbcode_uid']);
|
||||
|
||||
$data[] = array(
|
||||
'subject' => censor_text($row['message_subject']),
|
||||
'sender' => $row['username'],
|
||||
@@ -432,7 +454,6 @@ function get_pm_from($folder_id, $folder, $user_id)
|
||||
'TOTAL_MESSAGES' => (($pm_count == 1) ? $user->lang['VIEW_PM_MESSAGE'] : sprintf($user->lang['VIEW_PM_MESSAGES'], $pm_count)),
|
||||
|
||||
'POST_IMG' => (!$auth->acl_get('u_sendpm')) ? $user->img('button_topic_locked', 'POST_PM_LOCKED') : $user->img('button_pm_new', 'POST_NEW_PM'),
|
||||
'L_NO_MESSAGES' => (!$auth->acl_get('u_sendpm')) ? $user->lang['NO_AUTH_SEND_MESSAGE'] : $user->lang['NO_MESSAGES'],
|
||||
|
||||
'S_NO_AUTH_SEND_MESSAGE' => !$auth->acl_get('u_sendpm'),
|
||||
|
||||
|
@@ -133,7 +133,7 @@ class ucp_profile
|
||||
|
||||
$message = 'PROFILE_UPDATED';
|
||||
|
||||
if ($config['email_enable'] && $data['email'] != $user->data['user_email'] && $user->data['user_type'] != USER_FOUNDER && ($config['require_activation'] == USER_ACTIVATION_SELF || $config['require_activation'] == USER_ACTIVATION_ADMIN))
|
||||
if ($auth->acl_get('u_chgemail') && $config['email_enable'] && $data['email'] != $user->data['user_email'] && $user->data['user_type'] != USER_FOUNDER && ($config['require_activation'] == USER_ACTIVATION_SELF || $config['require_activation'] == USER_ACTIVATION_ADMIN))
|
||||
{
|
||||
$message = ($config['require_activation'] == USER_ACTIVATION_SELF) ? 'ACCOUNT_EMAIL_CHANGED' : 'ACCOUNT_EMAIL_CHANGED_ADMIN';
|
||||
|
||||
|
@@ -333,6 +333,12 @@ class ucp_register
|
||||
trigger_error('NO_USER', E_USER_ERROR);
|
||||
}
|
||||
|
||||
// Okay, captcha, your job is done.
|
||||
if ($config['enable_confirm'] && isset($captcha))
|
||||
{
|
||||
$captcha->reset();
|
||||
}
|
||||
|
||||
if ($coppa && $config['email_enable'])
|
||||
{
|
||||
$message = $user->lang['ACCOUNT_COPPA'];
|
||||
|
@@ -32,7 +32,7 @@ unset($dbpasswd);
|
||||
$convertor_data = array(
|
||||
'forum_name' => 'phpBB 2.0.x',
|
||||
'version' => '1.0.3',
|
||||
'phpbb_version' => '3.0.6',
|
||||
'phpbb_version' => '3.0.7',
|
||||
'author' => '<a href="http://www.phpbb.com/">phpBB Group</a>',
|
||||
'dbms' => $dbms,
|
||||
'dbhost' => $dbhost,
|
||||
@@ -78,6 +78,15 @@ $tables = array(
|
||||
*
|
||||
* 'table_format' can take the value 'file' to indicate a config file. In this case array_name
|
||||
* is set to indicate the name of the array the config values are stored in
|
||||
* Example of using a file:
|
||||
* $config_schema = array(
|
||||
* 'table_format' => 'file',
|
||||
* 'filename' => 'NAME OF FILE', // If the file is not in the root directory, the path needs to be added with no leading slash
|
||||
* 'array_name' => 'NAME OF ARRAY', // Only used if the configuration file stores the setting in an array.
|
||||
* 'settings' => array(
|
||||
* 'board_email' => 'SUPPORT_EMAIL', // target config name => source target name
|
||||
* )
|
||||
* );
|
||||
* 'table_format' can be an array if the values are stored in a table which is an assosciative array
|
||||
* (as per phpBB 2.0.x)
|
||||
* If left empty, values are assumed to be stored in a table where each config setting is
|
||||
|
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
$updates_to_version = '3.0.6-RC2';
|
||||
$updates_to_version = '3.0.7';
|
||||
|
||||
// Enter any version to update from to test updates. The version within the db will not be updated.
|
||||
$debug_from_version = false;
|
||||
@@ -30,8 +30,12 @@ define('IN_INSTALL', true);
|
||||
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
|
||||
// Report all errors, except notices
|
||||
//error_reporting(E_ALL ^ E_NOTICE);
|
||||
// Report all errors, except notices and deprecation messages
|
||||
if (!defined('E_DEPRECATED'))
|
||||
{
|
||||
define('E_DEPRECATED', 8192);
|
||||
}
|
||||
//error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);
|
||||
error_reporting(E_ALL);
|
||||
|
||||
@set_time_limit(0);
|
||||
@@ -45,7 +49,7 @@ if (!defined('PHPBB_INSTALLED') || empty($dbms) || empty($acm_type))
|
||||
}
|
||||
|
||||
// Load Extensions
|
||||
if (!empty($load_extensions))
|
||||
if (!empty($load_extensions) && function_exists('dl'))
|
||||
{
|
||||
$load_extensions = explode(',', $load_extensions);
|
||||
|
||||
@@ -346,11 +350,15 @@ for ($i = 0; $i < sizeof($versions); $i++)
|
||||
|
||||
$no_updates = false;
|
||||
|
||||
$statements = $db_tools->perform_schema_changes($schema_changes);
|
||||
|
||||
foreach ($statements as $sql)
|
||||
// We run one index after the other... to be consistent with schema changes...
|
||||
foreach ($schema_changes as $key => $changes)
|
||||
{
|
||||
_sql($sql, $errored, $error_ary);
|
||||
$statements = $db_tools->perform_schema_changes(array($key => $changes));
|
||||
|
||||
foreach ($statements as $sql)
|
||||
{
|
||||
_sql($sql, $errored, $error_ary);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -716,6 +724,9 @@ function database_update_info()
|
||||
'session_forum_id' => array('UINT', 0),
|
||||
),
|
||||
),
|
||||
'drop_keys' => array(
|
||||
GROUPS_TABLE => array('group_legend'),
|
||||
),
|
||||
'add_index' => array(
|
||||
SESSIONS_TABLE => array(
|
||||
'session_forum_id' => array('session_forum_id'),
|
||||
@@ -724,9 +735,6 @@ function database_update_info()
|
||||
'group_legend_name' => array('group_legend', 'group_name'),
|
||||
),
|
||||
),
|
||||
'drop_keys' => array(
|
||||
GROUPS_TABLE => array('group_legend'),
|
||||
),
|
||||
),
|
||||
// No changes from 3.0.1-RC1 to 3.0.1
|
||||
'3.0.1-RC1' => array(),
|
||||
@@ -877,12 +885,32 @@ function database_update_info()
|
||||
),
|
||||
),
|
||||
),
|
||||
// Changes from 3.0.6-RC1 to 3.0.6-RC2
|
||||
'3.0.6-RC1' => array(
|
||||
|
||||
// No changes from 3.0.6-RC1 to 3.0.6-RC2
|
||||
'3.0.6-RC1' => array(),
|
||||
// No changes from 3.0.6-RC2 to 3.0.6-RC3
|
||||
'3.0.6-RC2' => array(),
|
||||
// No changes from 3.0.6-RC3 to 3.0.6-RC4
|
||||
'3.0.6-RC3' => array(),
|
||||
// No changes from 3.0.6-RC4 to 3.0.6
|
||||
'3.0.6-RC4' => array(),
|
||||
|
||||
// Changes from 3.0.6 to 3.0.7-RC1
|
||||
'3.0.6' => array(
|
||||
'drop_keys' => array(
|
||||
LOG_TABLE => array('log_time'),
|
||||
),
|
||||
'add_index' => array(
|
||||
TOPICS_TRACK_TABLE => array(
|
||||
'topic_id' => array('topic_id'),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// No changes from 3.0.7-RC1 to 3.0.7-RC2
|
||||
'3.0.7-RC1' => array(),
|
||||
// No changes from 3.0.7-RC2 to 3.0.7
|
||||
'3.0.7-RC2' => array(),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1049,10 +1077,21 @@ function change_database_data(&$no_updates, $version)
|
||||
|
||||
// Changes from 3.0.3-RC1 to 3.0.3
|
||||
case '3.0.3-RC1':
|
||||
$sql = 'UPDATE ' . LOG_TABLE . "
|
||||
SET log_operation = 'LOG_DELETE_TOPIC'
|
||||
WHERE log_operation = 'LOG_TOPIC_DELETED'";
|
||||
_sql($sql, $errored, $error_ary);
|
||||
if ($db->sql_layer == 'oracle')
|
||||
{
|
||||
// log_operation is CLOB - but we can change this later
|
||||
$sql = 'UPDATE ' . LOG_TABLE . "
|
||||
SET log_operation = 'LOG_DELETE_TOPIC'
|
||||
WHERE log_operation LIKE 'LOG_TOPIC_DELETED'";
|
||||
_sql($sql, $errored, $error_ary);
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'UPDATE ' . LOG_TABLE . "
|
||||
SET log_operation = 'LOG_DELETE_TOPIC'
|
||||
WHERE log_operation = 'LOG_TOPIC_DELETED'";
|
||||
_sql($sql, $errored, $error_ary);
|
||||
}
|
||||
|
||||
$no_updates = false;
|
||||
break;
|
||||
@@ -1195,6 +1234,18 @@ function change_database_data(&$no_updates, $version)
|
||||
'drop_keys' => array(
|
||||
ACL_OPTIONS_TABLE => array('auth_option'),
|
||||
),
|
||||
);
|
||||
|
||||
global $db_tools;
|
||||
|
||||
$statements = $db_tools->perform_schema_changes($changes);
|
||||
|
||||
foreach ($statements as $sql)
|
||||
{
|
||||
_sql($sql, $errored, $error_ary);
|
||||
}
|
||||
|
||||
$changes = array(
|
||||
'add_unique_index' => array(
|
||||
ACL_OPTIONS_TABLE => array(
|
||||
'auth_option' => array('auth_option'),
|
||||
@@ -1202,8 +1253,6 @@ function change_database_data(&$no_updates, $version)
|
||||
),
|
||||
);
|
||||
|
||||
global $db_tools;
|
||||
|
||||
$statements = $db_tools->perform_schema_changes($changes);
|
||||
|
||||
foreach ($statements as $sql)
|
||||
@@ -1513,6 +1562,86 @@ function change_database_data(&$no_updates, $version)
|
||||
// No changes from 3.0.6-RC1 to 3.0.6-RC2
|
||||
case '3.0.6-RC1':
|
||||
break;
|
||||
|
||||
// Changes from 3.0.6-RC2 to 3.0.6-RC3
|
||||
case '3.0.6-RC2':
|
||||
|
||||
// Update the Custom Profile Fields based on previous settings to the new format
|
||||
$sql = 'UPDATE ' . PROFILE_FIELDS_TABLE . '
|
||||
SET field_show_on_vt = 1
|
||||
WHERE field_hide = 0
|
||||
AND (field_required = 1 OR field_show_on_reg = 1 OR field_show_profile = 1)';
|
||||
_sql($sql, $errored, $error_ary);
|
||||
$no_updates = false;
|
||||
|
||||
break;
|
||||
|
||||
// No changes from 3.0.6-RC3 to 3.0.6-RC4
|
||||
case '3.0.6-RC3':
|
||||
break;
|
||||
|
||||
// No changes from 3.0.6-RC4 to 3.0.6
|
||||
case '3.0.6-RC4':
|
||||
break;
|
||||
|
||||
// Changes from 3.0.6 to 3.0.7-RC1
|
||||
case '3.0.6':
|
||||
|
||||
// ATOM Feeds
|
||||
set_config('feed_overall', '1');
|
||||
set_config('feed_http_auth', '0');
|
||||
set_config('feed_limit_post', (string) (isset($config['feed_limit']) ? (int) $config['feed_limit'] : 15));
|
||||
set_config('feed_limit_topic', (string) (isset($config['feed_overall_topics_limit']) ? (int) $config['feed_overall_topics_limit'] : 10));
|
||||
set_config('feed_topics_new', (!empty($config['feed_overall_topics']) ? '1' : '0'));
|
||||
set_config('feed_topics_active', (!empty($config['feed_overall_topics']) ? '1' : '0'));
|
||||
|
||||
// Delete all text-templates from the template_data
|
||||
$sql = 'DELETE FROM ' . STYLES_TEMPLATE_DATA_TABLE . '
|
||||
WHERE template_filename ' . $db->sql_like_expression($db->any_char . '.txt');
|
||||
_sql($sql, $errored, $error_ary);
|
||||
|
||||
$no_updates = false;
|
||||
break;
|
||||
|
||||
// Changes from 3.0.7-RC1 to 3.0.7-RC2
|
||||
case '3.0.7-RC1':
|
||||
|
||||
$sql = 'SELECT user_id, user_email, user_email_hash
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE user_type <> ' . USER_IGNORE . "
|
||||
AND user_email <> ''";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$i = 0;
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
// Snapshot of the phpbb_email_hash() function
|
||||
// We cannot call it directly because the auto updater updates the DB first. :/
|
||||
$user_email_hash = sprintf('%u', crc32(strtolower($row['user_email']))) . strlen($row['user_email']);
|
||||
|
||||
if ($user_email_hash != $row['user_email_hash'])
|
||||
{
|
||||
$sql_ary = array(
|
||||
'user_email_hash' => $user_email_hash,
|
||||
);
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
||||
WHERE user_id = ' . (int) $row['user_id'];
|
||||
_sql($sql, $errored, $error_ary, ($i % 100 == 0));
|
||||
|
||||
++$i;
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$no_updates = false;
|
||||
|
||||
break;
|
||||
|
||||
// No changes from 3.0.7-RC2 to 3.0.7
|
||||
case '3.0.7-RC2':
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2500,13 +2629,12 @@ class updater_db_tools
|
||||
FROM user_indexes
|
||||
WHERE table_name = '" . strtoupper($table_name) . "'
|
||||
AND generated = 'N'
|
||||
AND uniqueness = 'UNIQUE'
|
||||
AND index_name LIKE 'U_%'";
|
||||
AND uniqueness = 'UNIQUE'";
|
||||
$col = 'index_name';
|
||||
break;
|
||||
|
||||
case 'sqlite':
|
||||
$sql = "PRAGMA index_list('" . $table_name . "') WHERE unique = 1;";
|
||||
$sql = "PRAGMA index_list('" . $table_name . "');";
|
||||
$col = 'name';
|
||||
break;
|
||||
}
|
||||
@@ -2533,7 +2661,15 @@ class updater_db_tools
|
||||
switch ($this->sql_layer)
|
||||
{
|
||||
case 'oracle':
|
||||
$row[$col] = substr($row[$col], strlen('U_' . $row['table_owner']) + 1);
|
||||
// Two cases here... prefixed with U_[table_owner] and not prefixed with table_name
|
||||
if (strpos($row[$col], 'U_') === 0)
|
||||
{
|
||||
$row[$col] = substr($row[$col], strlen('U_' . $row['table_owner']) + 1);
|
||||
}
|
||||
else if (strpos($row[$col], strtoupper($table_name)) === 0)
|
||||
{
|
||||
$row[$col] = substr($row[$col], strlen($table_name) + 1);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'firebird':
|
||||
@@ -2844,7 +2980,29 @@ class updater_db_tools
|
||||
|
||||
case 'postgres':
|
||||
// Does not support AFTER, only through temporary table
|
||||
$statements[] = 'ALTER TABLE ' . $table_name . ' ADD COLUMN "' . $column_name . '" ' . $column_data['column_type_sql'];
|
||||
|
||||
if (version_compare($this->db->sql_server_info(true), '8.0', '>='))
|
||||
{
|
||||
$statements[] = 'ALTER TABLE ' . $table_name . ' ADD COLUMN "' . $column_name . '" ' . $column_data['column_type_sql'];
|
||||
}
|
||||
else
|
||||
{
|
||||
// old versions cannot add columns with default and null information
|
||||
$statements[] = 'ALTER TABLE ' . $table_name . ' ADD COLUMN "' . $column_name . '" ' . $column_data['column_type'] . ' ' . $column_data['constraint'];
|
||||
|
||||
if (isset($column_data['null']))
|
||||
{
|
||||
if ($column_data['null'] == 'NOT NULL')
|
||||
{
|
||||
$statements[] = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN ' . $column_name . ' SET NOT NULL';
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($column_data['default']))
|
||||
{
|
||||
$statements[] = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN ' . $column_name . ' SET DEFAULT ' . $column_data['default'];
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'sqlite':
|
||||
@@ -3207,7 +3365,8 @@ class updater_db_tools
|
||||
}
|
||||
else
|
||||
{
|
||||
$statements[] = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN "' . strtoupper($column_name) . '" TYPE ' . ' ' . $column_data['column_type_sql'];
|
||||
// TODO: try to change pkey without removing trigger, generator or constraints. ATM this query may fail.
|
||||
$statements[] = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN "' . strtoupper($column_name) . '" TYPE ' . ' ' . $column_data['column_type_sql_type'];
|
||||
}
|
||||
break;
|
||||
|
||||
|
@@ -18,8 +18,12 @@ define('IN_INSTALL', true);
|
||||
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
|
||||
// Report all errors, except notices
|
||||
error_reporting(E_ALL ^ E_NOTICE);
|
||||
// Report all errors, except notices and deprecation messages
|
||||
if (!defined('E_DEPRECATED'))
|
||||
{
|
||||
define('E_DEPRECATED', 8192);
|
||||
}
|
||||
error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);
|
||||
|
||||
// @todo Review this test and see if we can find out what it is which prevents PHP 4.2.x from even displaying the page with requirements on it
|
||||
if (version_compare(PHP_VERSION, '4.3.3') < 0)
|
||||
|
@@ -1212,7 +1212,7 @@ class install_install extends module
|
||||
}
|
||||
|
||||
// Change prefix
|
||||
$sql_query = preg_replace('#phpbb_#i', $data['table_prefix'], $sql_query);
|
||||
$sql_query = preg_replace('# phpbb_([^\s]*) #i', ' ' . $data['table_prefix'] . '\1 ', $sql_query);
|
||||
|
||||
// Change language strings...
|
||||
$sql_query = preg_replace_callback('#\{L_([A-Z0-9\-_]*)\}#s', 'adjust_language_keys_callback', $sql_query);
|
||||
|
@@ -240,6 +240,7 @@ class install_update extends module
|
||||
// Make sure the update list is destroyed.
|
||||
$cache->destroy('_update_list');
|
||||
$cache->destroy('_diff_files');
|
||||
$cache->destroy('_expected_files');
|
||||
break;
|
||||
|
||||
case 'version_check':
|
||||
@@ -262,6 +263,16 @@ class install_update extends module
|
||||
$template->assign_var('PACKAGE_VERSION', $this->update_info['version']['to']);
|
||||
}
|
||||
|
||||
// Since some people try to update to RC releases, but phpBB.com tells them the last version is the version they currently run
|
||||
// we are faced with the updater thinking the database schema is up-to-date; which it is, but should be updated none-the-less
|
||||
// We now try to cope with this by triggering the update process
|
||||
if (version_compare(str_replace('rc', 'RC', strtolower($this->current_version)), str_replace('rc', 'RC', strtolower($this->update_info['version']['to'])), '<'))
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_UP_TO_DATE' => false,
|
||||
));
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'update_db':
|
||||
@@ -302,7 +313,14 @@ class install_update extends module
|
||||
|
||||
case 'file_check':
|
||||
|
||||
// Make sure the previous file collection is no longer valid...
|
||||
// retrieve info on what changes should have already been made to the files.
|
||||
$expected_files = $cache->get('_expected_files');
|
||||
if (!$expected_files)
|
||||
{
|
||||
$expected_files = array();
|
||||
}
|
||||
|
||||
// Now make sure the previous file collection is no longer valid...
|
||||
$cache->destroy('_diff_files');
|
||||
|
||||
$this->page_title = 'STAGE_FILE_CHECK';
|
||||
@@ -339,7 +357,7 @@ class install_update extends module
|
||||
|
||||
if ($get_new_list)
|
||||
{
|
||||
$this->get_update_structure($update_list);
|
||||
$this->get_update_structure($update_list, $expected_files);
|
||||
$cache->put('_update_list', $update_list);
|
||||
|
||||
// Refresh the page if we are still not finished...
|
||||
@@ -374,6 +392,8 @@ class install_update extends module
|
||||
);
|
||||
}
|
||||
|
||||
$new_expected_files = array();
|
||||
|
||||
// Now assign the list to the template
|
||||
foreach ($update_list as $status => $filelist)
|
||||
{
|
||||
@@ -409,29 +429,38 @@ class install_update extends module
|
||||
|
||||
$diff_url = append_sid($this->p_master->module_url, "mode=$mode&sub=file_check&action=diff&status=$status&file=" . urlencode($file_struct['filename']));
|
||||
|
||||
$template->assign_block_vars($status, array(
|
||||
'STATUS' => $status,
|
||||
if (isset($file_struct['as_expected']) && $file_struct['as_expected'])
|
||||
{
|
||||
$new_expected_files[$file_struct['filename']] = $expected_files[$file_struct['filename']];
|
||||
}
|
||||
else
|
||||
{
|
||||
$template->assign_block_vars($status, array(
|
||||
'STATUS' => $status,
|
||||
|
||||
'FILENAME' => $filename,
|
||||
'DIR_PART' => $dir_part,
|
||||
'FILE_PART' => $file_part,
|
||||
'NUM_CONFLICTS' => (isset($file_struct['conflicts'])) ? $file_struct['conflicts'] : 0,
|
||||
'FILENAME' => $filename,
|
||||
'DIR_PART' => $dir_part,
|
||||
'FILE_PART' => $file_part,
|
||||
'NUM_CONFLICTS' => (isset($file_struct['conflicts'])) ? $file_struct['conflicts'] : 0,
|
||||
|
||||
'S_CUSTOM' => ($file_struct['custom']) ? true : false,
|
||||
'S_BINARY' => $s_binary,
|
||||
'CUSTOM_ORIGINAL' => ($file_struct['custom']) ? $file_struct['original'] : '',
|
||||
'S_CUSTOM' => ($file_struct['custom']) ? true : false,
|
||||
'S_BINARY' => $s_binary,
|
||||
'CUSTOM_ORIGINAL' => ($file_struct['custom']) ? $file_struct['original'] : '',
|
||||
|
||||
'U_SHOW_DIFF' => $diff_url,
|
||||
'L_SHOW_DIFF' => ($status != 'up_to_date') ? $user->lang['SHOW_DIFF_' . strtoupper($status)] : '',
|
||||
'U_SHOW_DIFF' => $diff_url,
|
||||
'L_SHOW_DIFF' => ($status != 'up_to_date') ? $user->lang['SHOW_DIFF_' . strtoupper($status)] : '',
|
||||
|
||||
'U_VIEW_MOD_FILE' => $diff_url . '&op=' . MERGE_MOD_FILE,
|
||||
'U_VIEW_NEW_FILE' => $diff_url . '&op=' . MERGE_NEW_FILE,
|
||||
'U_VIEW_NO_MERGE_MOD' => $diff_url . '&op=' . MERGE_NO_MERGE_MOD,
|
||||
'U_VIEW_NO_MERGE_NEW' => $diff_url . '&op=' . MERGE_NO_MERGE_NEW,
|
||||
));
|
||||
'U_VIEW_MOD_FILE' => $diff_url . '&op=' . MERGE_MOD_FILE,
|
||||
'U_VIEW_NEW_FILE' => $diff_url . '&op=' . MERGE_NEW_FILE,
|
||||
'U_VIEW_NO_MERGE_MOD' => $diff_url . '&op=' . MERGE_NO_MERGE_MOD,
|
||||
'U_VIEW_NO_MERGE_NEW' => $diff_url . '&op=' . MERGE_NO_MERGE_NEW,
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$cache->put('_expected_files', $new_expected_files);
|
||||
|
||||
$all_up_to_date = true;
|
||||
foreach ($update_list as $status => $filelist)
|
||||
{
|
||||
@@ -607,6 +636,7 @@ class install_update extends module
|
||||
// Before we do anything, let us diff the files and store the raw file information "somewhere"
|
||||
$get_files = false;
|
||||
$file_list = $cache->get('_diff_files');
|
||||
$expected_files = $cache->get('_expected_files');
|
||||
|
||||
if ($file_list === false || $file_list['status'] != -1)
|
||||
{
|
||||
@@ -622,6 +652,11 @@ class install_update extends module
|
||||
);
|
||||
}
|
||||
|
||||
if (!isset($expected_files) || $expected_files === false)
|
||||
{
|
||||
$expected_files = array();
|
||||
}
|
||||
|
||||
$processed = 0;
|
||||
foreach ($update_list as $status => $files)
|
||||
{
|
||||
@@ -635,6 +670,7 @@ class install_update extends module
|
||||
// Skip this file if the user selected to not update it
|
||||
if (in_array($file_struct['filename'], $no_update))
|
||||
{
|
||||
$expected_files[$file_struct['filename']] = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -666,6 +702,15 @@ class install_update extends module
|
||||
return;
|
||||
}
|
||||
|
||||
if (file_exists($phpbb_root_path . $file_struct['filename']))
|
||||
{
|
||||
$contents = file_get_contents($phpbb_root_path . $file_struct['filename']);
|
||||
if (isset($expected_files[$file_struct['filename']]) && md5($contents) == $expected_files[$file_struct['filename']])
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$original_filename = ($file_struct['custom']) ? $file_struct['original'] : $file_struct['filename'];
|
||||
|
||||
switch ($status)
|
||||
@@ -692,6 +737,7 @@ class install_update extends module
|
||||
break;
|
||||
}
|
||||
|
||||
$expected_files[$file_struct['filename']] = md5($contents);
|
||||
$file_list[$file_struct['filename']] = '_file_' . md5($file_struct['filename']);
|
||||
$cache->put($file_list[$file_struct['filename']], base64_encode($contents));
|
||||
|
||||
@@ -737,6 +783,7 @@ class install_update extends module
|
||||
break;
|
||||
}
|
||||
|
||||
$expected_files[$file_struct['filename']] = md5($contents);
|
||||
$file_list[$file_struct['filename']] = '_file_' . md5($file_struct['filename']);
|
||||
$cache->put($file_list[$file_struct['filename']], base64_encode($contents));
|
||||
|
||||
@@ -747,6 +794,7 @@ class install_update extends module
|
||||
}
|
||||
}
|
||||
}
|
||||
$cache->put('_expected_files', $expected_files);
|
||||
}
|
||||
|
||||
$file_list['status'] = -1;
|
||||
@@ -917,7 +965,7 @@ class install_update extends module
|
||||
{
|
||||
if (function_exists('phpbb_is_writable') && !phpbb_is_writable($phpbb_root_path . 'store/'))
|
||||
{
|
||||
trigger_error(sprintf($user->lang['DIRECTORY_NOT_WRITABLE'], $phpbb_root_path . 'store/'), E_USER_ERROR);
|
||||
trigger_error(sprintf('The directory “%s” is not writable.', $phpbb_root_path . 'store/'), E_USER_ERROR);
|
||||
}
|
||||
|
||||
if ($use_method == '.zip')
|
||||
@@ -1207,7 +1255,7 @@ class install_update extends module
|
||||
/**
|
||||
* Collect all file status infos we need for the update by diffing all files
|
||||
*/
|
||||
function get_update_structure(&$update_list)
|
||||
function get_update_structure(&$update_list, $expected_files)
|
||||
{
|
||||
global $phpbb_root_path, $phpEx, $user;
|
||||
|
||||
@@ -1293,7 +1341,7 @@ class install_update extends module
|
||||
else
|
||||
{
|
||||
// not modified?
|
||||
$this->make_update_diff($update_list, $file, $file);
|
||||
$this->make_update_diff($update_list, $file, $file, $expected_files);
|
||||
}
|
||||
|
||||
$num_bytes_processed += (file_exists($this->new_location . $file)) ? filesize($this->new_location . $file) : 100 * 1024;
|
||||
@@ -1334,17 +1382,34 @@ class install_update extends module
|
||||
/**
|
||||
* Compare files for storage in update_list
|
||||
*/
|
||||
function make_update_diff(&$update_list, $original_file, $file, $custom = false)
|
||||
function make_update_diff(&$update_list, $original_file, $file, $expected_files, $custom = false)
|
||||
{
|
||||
global $phpbb_root_path, $user;
|
||||
|
||||
$update_ary = array('filename' => $file, 'custom' => $custom);
|
||||
$update_ary = array('filename' => $file, 'custom' => $custom, 'as_expected' => false);
|
||||
|
||||
if ($custom)
|
||||
{
|
||||
$update_ary['original'] = $original_file;
|
||||
}
|
||||
|
||||
if (file_exists($phpbb_root_path . $file))
|
||||
{
|
||||
$content = file_get_contents($phpbb_root_path . $file);
|
||||
|
||||
if (isset($expected_files[$file]) && // the user already selected what to do with this file
|
||||
($expected_files[$file] === false || // the user wanted this file to stay the same, so just assume it's alright
|
||||
$expected_files[$file] === md5($content)))
|
||||
{
|
||||
// the file contains what it was supposed to contain after the merge
|
||||
$update_ary['as_expected'] = true;
|
||||
$update_ary['was_ignored'] = ($expected_files[$file] === false);
|
||||
$update_list['up_to_date'][] = $update_ary;
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// we only want to know if the files are successfully merged and newlines could result in errors (duplicate addition of lines and such things)
|
||||
// Therefore we check for empty diffs with two methods, preserving newlines and not preserving them (which mostly works best, therefore the first option)
|
||||
|
||||
@@ -1354,7 +1419,7 @@ class install_update extends module
|
||||
{
|
||||
$tmp = array(
|
||||
'file1' => file_get_contents($this->new_location . $original_file),
|
||||
'file2' => file_get_contents($phpbb_root_path . $file),
|
||||
'file2' => $content,
|
||||
);
|
||||
|
||||
// We need to diff the contents here to make sure the file is really the one we expect
|
||||
@@ -1393,7 +1458,7 @@ class install_update extends module
|
||||
{
|
||||
$tmp = array(
|
||||
'file1' => file_get_contents($this->old_location . $original_file),
|
||||
'file2' => file_get_contents($phpbb_root_path . $file),
|
||||
'file2' => $content,
|
||||
);
|
||||
|
||||
// We need to diff the contents here to make sure the file is really the one we expect
|
||||
@@ -1404,7 +1469,7 @@ class install_update extends module
|
||||
|
||||
$tmp = array(
|
||||
'file1' => file_get_contents($this->new_location . $original_file),
|
||||
'file2' => file_get_contents($phpbb_root_path . $file),
|
||||
'file2' => $content,
|
||||
);
|
||||
|
||||
$diff = new diff($tmp['file1'], $tmp['file2'], $preserve_cr);
|
||||
|
@@ -529,7 +529,6 @@ CREATE TABLE phpbb_log (
|
||||
ALTER TABLE phpbb_log ADD PRIMARY KEY (log_id);;
|
||||
|
||||
CREATE INDEX phpbb_log_log_type ON phpbb_log(log_type);;
|
||||
CREATE INDEX phpbb_log_log_time ON phpbb_log(log_time);;
|
||||
CREATE INDEX phpbb_log_forum_id ON phpbb_log(forum_id);;
|
||||
CREATE INDEX phpbb_log_topic_id ON phpbb_log(topic_id);;
|
||||
CREATE INDEX phpbb_log_reportee_id ON phpbb_log(reportee_id);;
|
||||
@@ -1263,6 +1262,7 @@ CREATE TABLE phpbb_topics_track (
|
||||
|
||||
ALTER TABLE phpbb_topics_track ADD PRIMARY KEY (user_id, topic_id);;
|
||||
|
||||
CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track(topic_id);;
|
||||
CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track(forum_id);;
|
||||
|
||||
# Table: 'phpbb_topics_posted'
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user