mirror of
https://github.com/phpbb/phpbb.git
synced 2025-09-09 07:40:45 +02:00
Compare commits
309 Commits
release-3.
...
release-3.
Author | SHA1 | Date | |
---|---|---|---|
|
67e8cbdd00 | ||
|
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 | ||
|
1612be1af3 | ||
|
96b3361577 | ||
|
3e0bf1f8a4 | ||
|
de25ce8724 | ||
|
023760c8b2 | ||
|
66038cde5b | ||
|
54c22ae52a | ||
|
c1b898890b | ||
|
1461beacf6 | ||
|
35eea4539a | ||
|
87eb1d9f20 | ||
|
782d680b54 | ||
|
90e1187601 | ||
|
5d52b32a63 | ||
|
2ba402b06d | ||
|
3d5ca6b2b7 | ||
|
61c6c07abc | ||
|
5382eb441d | ||
|
0e130c107b | ||
|
8da2b69e2b | ||
|
4006def79d | ||
|
97be42d31c | ||
|
7a244e1d2b | ||
|
1b64e41160 | ||
|
2e40ba022d | ||
|
b53a0c8041 | ||
|
38c4bcad55 | ||
|
9c1334cd62 | ||
|
bc677ae3ad | ||
|
d1f796bf25 | ||
|
13e8898563 | ||
|
223b9ed0d6 | ||
|
0b0c9544a3 | ||
|
6b5d195a98 | ||
|
8bcfd33539 | ||
|
2f808d274b | ||
|
8cea32f3bf | ||
|
c32d295d97 | ||
|
198989dcfd | ||
|
697fd5a134 | ||
|
b27e96cf62 | ||
|
c616b2b336 | ||
|
36dc2d6e2d | ||
|
1df914d80a | ||
|
b4c7dbcd66 | ||
|
ffbe4e3b82 | ||
|
bf2133d380 | ||
|
cb88671638 | ||
|
3b73584430 |
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-RC1';
|
||||
$simple_name_old = 'phpbb306';
|
||||
$simple_name_new = 'phpbb307-RC1';
|
||||
$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;
|
||||
}
|
||||
}
|
1677
build/diff_class.php
Normal file
1677
build/diff_class.php
Normal file
File diff suppressed because it is too large
Load Diff
521
build/package.php
Executable file
521
build/package.php
Executable file
@@ -0,0 +1,521 @@
|
||||
#!/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-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', '3.0.6-RC4', '3.0.6', '3.0.7-RC1');
|
||||
$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');
|
||||
}
|
||||
|
||||
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>
|
||||
@@ -54,10 +58,12 @@
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
<legend>{L_SUBMIT}</legend>
|
||||
<input class="button1" type="submit" id="main_submit" name="main_submit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="form_reset" name="reset" value="{L_RESET}" />
|
||||
<fieldset>
|
||||
<legend>{L_ACP_SUBMIT_CHANGES}</legend>
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="main_submit" name="main_submit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="form_reset" name="reset" value="{L_RESET}" />
|
||||
</p>
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
@@ -71,8 +71,9 @@
|
||||
<dl>
|
||||
<dt><label for="where">{L_ACTION}:</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" class="radio" name="where" value="store" checked="checked" /> {L_STORE_LOCAL}</label>
|
||||
<label><input type="radio" class="radio" name="where" value="download" /> {L_DOWNLOAD}</label></dd>
|
||||
<label><input id="where" type="radio" class="radio" name="where" value="store" checked="checked" /> {L_STORE_LOCAL}</label>
|
||||
<label><input type="radio" class="radio" name="where" value="download" /> {L_DOWNLOAD}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="table">{L_TABLE_SELECT}:</label></dt>
|
||||
|
@@ -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>
|
||||
|
@@ -41,6 +41,7 @@
|
||||
<td style="vertical-align: top;">
|
||||
{inactive.REASON}
|
||||
<!-- IF inactive.REMINDED --><br />{inactive.REMINDED_EXPLAIN}<!-- ENDIF -->
|
||||
</td>
|
||||
<td> <input type="checkbox" class="radio" name="mark[]" value="{inactive.USER_ID}" /> </td>
|
||||
</tr>
|
||||
<!-- BEGINELSE -->
|
||||
@@ -67,7 +68,7 @@
|
||||
<fieldset class="quick">
|
||||
<select name="action">{S_INACTIVE_OPTIONS}</select>
|
||||
<input class="button2" type="submit" name="submit" value="{L_SUBMIT}" />
|
||||
<p class="small"><a href="#" onclick="marklist('inactive', 'mark', true); return false;">{L_MARK_ALL}</a> • <a href="#" onclick="marklist('inactive', 'mark', false); return false;">{L_UNMARK_ALL}</a></p>
|
||||
<p class="small"><a href="#" onclick="marklist('inactive', 'mark', true); return false;">{L_MARK_ALL}</a> • <a href="#" onclick="marklist('inactive', 'mark', false); return false;">{L_UNMARK_ALL}</a></p>
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
|
||||
|
@@ -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 -->
|
||||
|
@@ -14,11 +14,12 @@
|
||||
|
||||
<!-- IF PAGINATION -->
|
||||
<div class="pagination" style="float: right; margin: 15px 0 2px 0">
|
||||
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> • <span>{PAGINATION}</span>
|
||||
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> • <span>{PAGINATION}</span>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<div class="clearfix"> </div><br style="clear: both;" />
|
||||
<div class="clearfix"> </div>
|
||||
<div><br style="clear: both;" /></div>
|
||||
|
||||
<!-- IF .log -->
|
||||
<table cellspacing="1">
|
||||
|
@@ -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" />
|
||||
@@ -232,6 +238,7 @@
|
||||
<td style="vertical-align: top;">
|
||||
{inactive.REASON}
|
||||
<!-- IF inactive.REMINDED --><br />{inactive.REMINDED_EXPLAIN}<!-- ENDIF -->
|
||||
</td>
|
||||
</tr>
|
||||
<!-- BEGINELSE -->
|
||||
<tr>
|
||||
|
@@ -20,7 +20,7 @@
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="new_id">{L_REPLACE}:</label><br /><span>{L_REPLACE_EXPLAIN}</span></dt>
|
||||
<dd><select name="new_id">{S_REPLACE_OPTIONS}</select></dd>
|
||||
<dd><select id="new_id" name="new_id">{S_REPLACE_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
|
||||
<p class="quick">
|
||||
@@ -135,11 +135,11 @@
|
||||
<div id="img_dimensions">
|
||||
<dl>
|
||||
<dt><label for="imgwidth">{L_IMAGE_WIDTH}:</label><br /><span>{L_AUTOMATIC_EXPLAIN}</span></dt>
|
||||
<dd><input type="text" name="imgwidth" value="{IMAGE_SIZE}" /></dd>
|
||||
<dd><input id="imgwidth" type="text" name="imgwidth" value="{IMAGE_SIZE}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="imgheight">{L_IMAGE_HEIGHT}:</label><br /><span>{L_AUTOMATIC_EXPLAIN}</span></dt>
|
||||
<dd><input type="text" name="imgheight" value="{IMAGE_HEIGHT}" /></dd>
|
||||
<dd><input id="imgheight" type="text" name="imgheight" value="{IMAGE_HEIGHT}" /></dd>
|
||||
</dl>
|
||||
</div>
|
||||
</fieldset>
|
||||
@@ -266,7 +266,7 @@
|
||||
|
||||
<p>{L_TEMPLATE_CACHE_EXPLAIN}</p>
|
||||
|
||||
<form name="acp_styles" method="post" action="{U_ACTION}">
|
||||
<form id="acp_styles" method="post" action="{U_ACTION}">
|
||||
<fieldset class="tabulated">
|
||||
<legend>{L_TEMPLATE_CACHE}</legend>
|
||||
|
||||
|
@@ -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 -->
|
||||
|
@@ -7,17 +7,16 @@
|
||||
<th>{L_REPORT_BY}</th>
|
||||
<th>{L_TIME}</th>
|
||||
<th>{L_FEEDBACK}</th>
|
||||
<!-- IF S_CLEARLOGS --><th>{L_MARK}</th><!-- ENDIF -->
|
||||
<th>{L_MARK}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- BEGIN warn -->
|
||||
<!-- IF warn.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
||||
|
||||
<td>{warn.USERNAME}</td>
|
||||
<td style="text-align: center; nowrap: nowrap;">{warn.DATE}</td>
|
||||
<td>{warn.ACTION}</td>
|
||||
<!-- IF S_CLEARLOGS --><td style="text-align: center;"><input type="checkbox" class="radio" name="mark[]" value="{warn.ID}" /></td><!-- ENDIF -->
|
||||
<td style="text-align: center;"><input type="checkbox" class="radio" name="mark[]" value="{warn.ID}" /></td>
|
||||
</tr>
|
||||
<!-- END warn -->
|
||||
</tbody>
|
||||
@@ -28,12 +27,10 @@
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF S_CLEARLOGS -->
|
||||
<fieldset class="quick">
|
||||
<input class="button2" type="submit" name="delall" value="{L_DELETE_ALL}" />
|
||||
<input class="button2" type="submit" name="delmarked" value="{L_DELETE_MARKED}" />
|
||||
<p class="small"><a href="#" onclick="marklist('list', 'mark', true);">{L_MARK_ALL}</a> • <a href="#" onclick="marklist('list', 'mark', false);">{L_UNMARK_ALL}</a></p>
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
<fieldset class="quick">
|
||||
<input class="button2" type="submit" name="delall" value="{L_DELETE_ALL}" />
|
||||
<input class="button2" type="submit" name="delmarked" value="{L_DELETE_MARKED}" />
|
||||
<p class="small"><a href="#" onclick="marklist('list', 'mark', true);">{L_MARK_ALL}</a> • <a href="#" onclick="marklist('list', 'mark', false);">{L_UNMARK_ALL}</a></p>
|
||||
</fieldset>
|
||||
{S_FORM_TOKEN}
|
||||
</form>
|
||||
|
@@ -69,8 +69,8 @@ h2, caption {
|
||||
h3, h4 {
|
||||
font-family: "Trebuchet MS", Helvetica, sans-serif;
|
||||
font-size: 1.20em;
|
||||
text-decoration: none;
|
||||
line-height: 1.20em;
|
||||
text-decoration: none;
|
||||
line-height: 1.20em;
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
@@ -97,8 +97,8 @@ hr {
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
.small {
|
||||
font-size: 0.85em;
|
||||
.small {
|
||||
font-size: 0.85em;
|
||||
}
|
||||
|
||||
/* General links */
|
||||
@@ -195,7 +195,6 @@ li {
|
||||
width: 76%;
|
||||
margin: 0 0 0 3%;
|
||||
min-height: 350px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.rtl #main {
|
||||
@@ -203,8 +202,8 @@ li {
|
||||
margin: 0 3% 0 0;
|
||||
}
|
||||
|
||||
* html #main {
|
||||
height: 350px;
|
||||
* html #main {
|
||||
height: 350px;
|
||||
}
|
||||
|
||||
#page-body.simple-page-body {
|
||||
@@ -316,7 +315,7 @@ li {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
span.corners-top, span.corners-bottom,
|
||||
span.corners-top, span.corners-bottom,
|
||||
span.corners-top span, span.corners-bottom span {
|
||||
font-size: 1px;
|
||||
line-height: 1px;
|
||||
@@ -795,7 +794,7 @@ label img {
|
||||
|
||||
fieldset.quick, p.quick {
|
||||
margin: 0 0 5px;
|
||||
padding: 5px 0 0;
|
||||
padding: 5px 0 0;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
text-align: right;
|
||||
@@ -848,7 +847,7 @@ select option.disabled {
|
||||
}
|
||||
|
||||
/* Special case inputs */
|
||||
select#board_timezone,
|
||||
select#board_timezone,
|
||||
select#full_folder_action {
|
||||
width: 95%;
|
||||
}
|
||||
@@ -1245,12 +1244,12 @@ input.disabled {
|
||||
}
|
||||
|
||||
/* Nice method for clearing floated blocks without having to insert any extra markup
|
||||
From http://www.positioniseverything.net/easyclearing.html
|
||||
From http://www.positioniseverything.net/easyclearing.html
|
||||
.clearfix:after, #tabs:after, .row:after, #content:after, fieldset dl:after, #page-body:after {
|
||||
content: ".";
|
||||
display: block;
|
||||
height: 0;
|
||||
clear: both;
|
||||
content: ".";
|
||||
display: block;
|
||||
height: 0;
|
||||
clear: both;
|
||||
visibility: hidden;
|
||||
}*/
|
||||
|
||||
@@ -1317,7 +1316,7 @@ fieldset.permissions legend input{
|
||||
height: 1.1em;
|
||||
}
|
||||
|
||||
/* Permission sections */
|
||||
/* Permission sections */
|
||||
fieldset.permissions .permissions-simple {
|
||||
text-align: left;
|
||||
padding-top: 3px;
|
||||
@@ -1528,7 +1527,7 @@ fieldset.permissions .padding {
|
||||
background-image: url("../images/corners_right2.gif");
|
||||
}
|
||||
|
||||
.permissions-panel span.corners-top, .permissions-panel span.corners-bottom,
|
||||
.permissions-panel span.corners-top, .permissions-panel span.corners-bottom,
|
||||
.permissions-panel span.corners-top span, .permissions-panel span.corners-bottom span {
|
||||
font-size: 1px;
|
||||
line-height: 1px;
|
||||
@@ -1606,7 +1605,7 @@ fieldset.permissions .padding {
|
||||
}
|
||||
|
||||
.permissions-panel th.row4 {
|
||||
background-image: none;
|
||||
background-image: none;
|
||||
background-color: #E4E8EB;
|
||||
color: #536482;
|
||||
border: none;
|
||||
@@ -1614,8 +1613,8 @@ fieldset.permissions .padding {
|
||||
|
||||
.permissions-panel th a:link, .permissions-panel th a:hover, .permissions-panel th a:visited {
|
||||
display: block;
|
||||
color: #FFFFFF;
|
||||
text-decoration: underline;
|
||||
color: #FFFFFF;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.permissions-panel td.permissions-yes label:hover {
|
||||
|
@@ -56,11 +56,13 @@
|
||||
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
<legend>{L_SUBMIT}</legend>
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
||||
<input class="button2" type="submit" id="preview" name="preview" value="{L_PREVIEW}" />
|
||||
<fieldset>
|
||||
<legend>{L_ACP_SUBMIT_CHANGES}</legend>
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
||||
<input class="button2" type="submit" id="preview" name="preview" value="{L_PREVIEW}" />
|
||||
</p>
|
||||
|
||||
<input type="hidden" name="select_captcha" value="{CAPTCHA_NAME}" />
|
||||
<input type="hidden" name="configure" value="1" />
|
||||
|
@@ -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>
|
||||
|
@@ -34,10 +34,12 @@
|
||||
<!-- INCLUDE {CAPTCHA_PREVIEW} -->
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
<legend>{L_SUBMIT}</legend>
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
||||
<fieldset>
|
||||
<legend>{L_ACP_SUBMIT_CHANGES}</legend>
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
||||
</p>
|
||||
<input type="hidden" name="select_captcha" value="{CAPTCHA_NAME}" />
|
||||
<input type="hidden" name="configure" value="1" />
|
||||
|
||||
|
@@ -15,9 +15,9 @@
|
||||
// <![CDATA[
|
||||
function resize_panel()
|
||||
{
|
||||
var block = document.getElementById('codepanel');
|
||||
var block = document.getElementById('codepanel');
|
||||
var height;
|
||||
|
||||
|
||||
if (window.innerHeight)
|
||||
{
|
||||
height = window.innerHeight - 150;
|
||||
@@ -26,7 +26,7 @@ function resize_panel()
|
||||
else
|
||||
{
|
||||
//whatever IE needs to do this
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
window.onresize = resize_panel;
|
||||
@@ -54,7 +54,7 @@ div#codepanel {
|
||||
width: 100%;
|
||||
}
|
||||
<!-- ELSE -->
|
||||
div#codepanel {
|
||||
div#codepanel {
|
||||
background-color: #eee;
|
||||
}
|
||||
<!-- ENDIF -->
|
||||
@@ -149,10 +149,10 @@ table.hrdiff tbody th {
|
||||
|
||||
table.hrdiff tbody td.old {
|
||||
border-left: 1px solid #999;
|
||||
border-right: 1px solid #999;
|
||||
border-right: 1px solid #999;
|
||||
}
|
||||
table.hrdiff tbody td.new {
|
||||
border-right: 1px solid #999;
|
||||
border-right: 1px solid #999;
|
||||
}
|
||||
|
||||
table.hrdiff td pre {
|
||||
@@ -237,19 +237,19 @@ table.hrdiff caption span {
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_CHANGE}" />
|
||||
</fieldset>
|
||||
</form>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_DIFF_CONFLICT_FILE -->
|
||||
<div style="float: {S_CONTENT_FLOW_BEGIN};"><strong>{L_NUM_CONFLICTS}: {NUM_CONFLICTS}</strong></div>
|
||||
<br style="clear: both;" />
|
||||
<!-- ENDIF -->
|
||||
</div>
|
||||
|
||||
|
||||
<div id="page-body">
|
||||
<div id="acp">
|
||||
<div class="panel" id="codepanel">
|
||||
<span class="corners-top"><span></span></span>
|
||||
<div id="diff_content">
|
||||
<div id="main">
|
||||
|
||||
<!-- IF S_DIFF_CONFLICT_FILE -->
|
||||
<div style="float: {S_CONTENT_FLOW_END};"><strong>{L_NUM_CONFLICTS}: {NUM_CONFLICTS}</strong></div>
|
||||
<!-- ENDIF -->
|
||||
{DIFF_CONTENT}
|
||||
</div>
|
||||
</div>
|
||||
@@ -257,6 +257,6 @@ table.hrdiff caption span {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- INCLUDE simple_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,211 @@
|
||||
<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. (Bugs #54705, #55895)</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 (fix by nrohler). (Bug #56335)</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>[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>[Feature] Ability to use HTTP authentication in ATOM feeds by passing the GET parameter "auth=http".</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>
|
||||
@@ -210,42 +298,47 @@
|
||||
<li>[Fix] Do not display links to user/post search if search is disabled. (Bug #50685 - Patch by HardStyle)</li>
|
||||
<li>[Fix] Fix icon alignment for forums with large descriptions in subsilver2. (Bug #50445)</li>
|
||||
<li>[Fix] Correctly display underlined links placed in last line in viewtopic. (Bug #14811 - Patch by primehalo)</li>
|
||||
<li>[Fix] Only check whether forum image exists if forum image is specified. (Bug #51905)</li>
|
||||
<li>[Fix] Fixed database 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] Add index on log_time to the log table to prevent slowdown on boards with many log entries. (Bug #44665 - Patch by bantu)</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] phpBB updater now skips sole whitespace changes. This reduces the chance of conflicts tremendously.</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] 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 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>
|
||||
@@ -253,32 +346,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:
|
||||
@@ -292,16 +385,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>
|
||||
@@ -390,7 +485,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>
|
||||
@@ -422,7 +517,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>
|
||||
@@ -521,7 +616,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>
|
||||
@@ -569,7 +664,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>
|
||||
@@ -640,7 +735,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>
|
||||
@@ -649,7 +744,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>
|
||||
@@ -684,7 +779,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>
|
||||
@@ -694,7 +789,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>
|
||||
@@ -757,7 +852,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>
|
||||
@@ -808,7 +903,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>
|
||||
@@ -917,7 +1012,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>
|
||||
@@ -963,7 +1058,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']),
|
||||
)
|
||||
);
|
||||
|
||||
|
@@ -29,6 +29,7 @@ class acp_board
|
||||
{
|
||||
global $db, $user, $auth, $template;
|
||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
global $cache;
|
||||
|
||||
$user->add_lang('acp/board');
|
||||
|
||||
@@ -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),
|
||||
)
|
||||
);
|
||||
@@ -469,6 +478,9 @@ class acp_board
|
||||
// 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');
|
||||
}
|
||||
@@ -910,7 +922,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">';
|
||||
|
@@ -30,10 +30,13 @@ class acp_captcha
|
||||
$user->add_lang('acp/board');
|
||||
|
||||
include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
|
||||
$captchas = phpbb_captcha_factory::get_captcha_types();
|
||||
|
||||
$selected = request_var('select_captcha', $config['captcha_plugin']);
|
||||
$selected = (isset($captchas['available'][$selected]) || isset($captchas['unavailable'][$selected])) ? $selected : $config['captcha_plugin'];
|
||||
$configure = request_var('configure', false);
|
||||
|
||||
|
||||
// Oh, they are just here for the view
|
||||
if (isset($_GET['captcha_demo']))
|
||||
{
|
||||
@@ -45,17 +48,15 @@ class acp_captcha
|
||||
{
|
||||
$config_captcha =& phpbb_captcha_factory::get_instance($selected);
|
||||
$config_captcha->acp_page($id, $this);
|
||||
add_log('admin', 'LOG_CONFIG_VISUAL');
|
||||
}
|
||||
else
|
||||
{
|
||||
$captchas = phpbb_captcha_factory::get_captcha_types();
|
||||
|
||||
$config_vars = array(
|
||||
'enable_confirm' => array('tpl' => 'REG_ENABLE', 'default' => false),
|
||||
'enable_post_confirm' => array('tpl' => 'POST_ENABLE', 'default' => false),
|
||||
'confirm_refresh' => array('tpl' => 'CONFIRM_REFRESH', 'default' => false),
|
||||
'max_reg_attempts' => array('tpl' => 'REG_LIMIT', 'default' => 0),
|
||||
'max_login_attempts' => array('tpl' => 'MAX_LOGIN_ATTEMPTS', 'default' => 0),
|
||||
);
|
||||
|
||||
$this->tpl_name = 'acp_captcha';
|
||||
|
@@ -142,7 +142,7 @@ class acp_database
|
||||
break;
|
||||
|
||||
case 'oracle':
|
||||
$extractor->flush('TRUNCATE TABLE ' . $table_name . "\\\n");
|
||||
$extractor->flush('TRUNCATE TABLE ' . $table_name . "/\n");
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -1716,8 +1716,7 @@ class oracle_extractor extends base_extractor
|
||||
{
|
||||
global $db;
|
||||
$sql_data = '-- Table: ' . $table_name . "\n";
|
||||
$sql_data .= "DROP TABLE $table_name;\n";
|
||||
$sql_data .= '\\' . "\n";
|
||||
$sql_data .= "DROP TABLE $table_name\n/\n";
|
||||
$sql_data .= "\nCREATE TABLE $table_name (\n";
|
||||
|
||||
$sql = "SELECT COLUMN_NAME, DATA_TYPE, DATA_PRECISION, DATA_LENGTH, NULLABLE, DATA_DEFAULT
|
||||
@@ -1732,7 +1731,7 @@ class oracle_extractor extends base_extractor
|
||||
|
||||
if ($row['data_type'] !== 'CLOB')
|
||||
{
|
||||
if ($row['data_type'] !== 'VARCHAR2')
|
||||
if ($row['data_type'] !== 'VARCHAR2' && $row['data_type'] !== 'CHAR')
|
||||
{
|
||||
$line .= '(' . $row['data_precision'] . ')';
|
||||
}
|
||||
@@ -1762,12 +1761,20 @@ class oracle_extractor extends base_extractor
|
||||
AND A.TABLE_NAME = '{$table_name}'";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$primary_key = array();
|
||||
$contraint_name = '';
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$rows[] = " CONSTRAINT {$row['constraint_name']} PRIMARY KEY ({$row['column_name']})";
|
||||
$constraint_name = '"' . $row['constraint_name'] . '"';
|
||||
$primary_key[] = '"' . $row['column_name'] . '"';
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($primary_key))
|
||||
{
|
||||
$rows[] = " CONSTRAINT {$constraint_name} PRIMARY KEY (" . implode(', ', $primary_key) . ')';
|
||||
}
|
||||
|
||||
$sql = "SELECT A.CONSTRAINT_NAME, A.COLUMN_NAME
|
||||
FROM USER_CONS_COLUMNS A, USER_CONSTRAINTS B
|
||||
WHERE A.CONSTRAINT_NAME = B.CONSTRAINT_NAME
|
||||
@@ -1775,24 +1782,44 @@ class oracle_extractor extends base_extractor
|
||||
AND A.TABLE_NAME = '{$table_name}'";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$unique = array();
|
||||
$contraint_name = '';
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$rows[] = " CONSTRAINT {$row['constraint_name']} UNIQUE ({$row['column_name']})";
|
||||
$constraint_name = '"' . $row['constraint_name'] . '"';
|
||||
$unique[] = '"' . $row['column_name'] . '"';
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql_data .= implode(",\n", $rows);
|
||||
$sql_data .= "\n)\n\\";
|
||||
if (sizeof($unique))
|
||||
{
|
||||
$rows[] = " CONSTRAINT {$constraint_name} UNIQUE (" . implode(', ', $unique) . ')';
|
||||
}
|
||||
|
||||
$sql = "SELECT A.REFERENCED_NAME
|
||||
FROM USER_DEPENDENCIES A, USER_TRIGGERS B
|
||||
$sql_data .= implode(",\n", $rows);
|
||||
$sql_data .= "\n)\n/\n";
|
||||
|
||||
$sql = "SELECT A.REFERENCED_NAME, C.*
|
||||
FROM USER_DEPENDENCIES A, USER_TRIGGERS B, USER_SEQUENCES C
|
||||
WHERE A.REFERENCED_TYPE = 'SEQUENCE'
|
||||
AND A.NAME = B.TRIGGER_NAME
|
||||
AND B. TABLE_NAME = '{$table_name}'";
|
||||
AND B.TABLE_NAME = '{$table_name}'
|
||||
AND C.SEQUENCE_NAME = A.REFERENCED_NAME";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$type = request_var('type', '');
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$sql_data .= "\nCREATE SEQUENCE {$row['referenced_name']}\\\n";
|
||||
$sql_data .= "\nDROP SEQUENCE \"{$row['referenced_name']}\"\n/\n";
|
||||
$sql_data .= "\nCREATE SEQUENCE \"{$row['referenced_name']}\"";
|
||||
|
||||
if ($type == 'full')
|
||||
{
|
||||
$sql_data .= ' START WITH ' . $row['last_number'];
|
||||
}
|
||||
|
||||
$sql_data .= "\n/\n";
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
@@ -1802,7 +1829,7 @@ class oracle_extractor extends base_extractor
|
||||
$result = $db->sql_query($sql);
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$sql_data .= "\nCREATE OR REPLACE TRIGGER {$row['description']}WHEN ({$row['when_clause']})\n{$row['trigger_body']}\\";
|
||||
$sql_data .= "\nCREATE OR REPLACE TRIGGER {$row['description']}WHEN ({$row['when_clause']})\n{$row['trigger_body']}\n/\n";
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
@@ -1822,7 +1849,7 @@ class oracle_extractor extends base_extractor
|
||||
|
||||
foreach ($index as $index_name => $column_names)
|
||||
{
|
||||
$sql_data .= "\nCREATE INDEX $index_name ON $table_name(" . implode(', ', $column_names) . ")\n\\";
|
||||
$sql_data .= "\nCREATE INDEX $index_name ON $table_name(" . implode(', ', $column_names) . ")\n/\n";
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
$this->flush($sql_data);
|
||||
@@ -1858,7 +1885,7 @@ class oracle_extractor extends base_extractor
|
||||
// Oracle uses uppercase - we use lowercase
|
||||
$str_val = $row[strtolower($ary_name[$i])];
|
||||
|
||||
if (preg_match('#char|text|bool|raw#i', $ary_type[$i]))
|
||||
if (preg_match('#char|text|bool|raw|clob#i', $ary_type[$i]))
|
||||
{
|
||||
$str_quote = '';
|
||||
$str_empty = "''";
|
||||
@@ -1892,7 +1919,7 @@ class oracle_extractor extends base_extractor
|
||||
|
||||
// Take the ordered fields and their associated data and build it
|
||||
// into a valid sql statement to recreate that field in the data.
|
||||
$sql_data = "INSERT INTO $table_name (" . implode(', ', $schema_fields) . ') VALUES (' . implode(', ', $schema_vals) . ");\n";
|
||||
$sql_data = "INSERT INTO $table_name (" . implode(', ', $schema_fields) . ') VALUES (' . implode(', ', $schema_vals) . ")\n/\n";
|
||||
|
||||
$this->flush($sql_data);
|
||||
}
|
||||
@@ -2211,8 +2238,10 @@ function sanitize_data_mssql($text)
|
||||
|
||||
function sanitize_data_oracle($text)
|
||||
{
|
||||
$data = preg_split('/[\0\n\t\r\b\f\'"\\\]/', $text);
|
||||
preg_match_all('/[\0\n\t\r\b\f\'"\\\]/', $text, $matches);
|
||||
// $data = preg_split('/[\0\n\t\r\b\f\'"\/\\\]/', $text);
|
||||
// preg_match_all('/[\0\n\t\r\b\f\'"\/\\\]/', $text, $matches);
|
||||
$data = preg_split('/[\0\b\f\'\/]/', $text);
|
||||
preg_match_all('/[\0\r\b\f\'\/]/', $text, $matches);
|
||||
|
||||
$val = array();
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
@@ -171,7 +169,7 @@ class acp_forums
|
||||
$forum_data['forum_status'] = ITEM_UNLOCKED;
|
||||
}
|
||||
|
||||
$forum_data['show_active'] = ($forum_data['forum_type'] == FORUM_POST) ? request_var('display_recent', false) : request_var('display_active', false);
|
||||
$forum_data['show_active'] = ($forum_data['forum_type'] == FORUM_POST) ? request_var('display_recent', true) : request_var('display_active', true);
|
||||
|
||||
// Get data for forum rules if specified...
|
||||
if ($forum_data['forum_rules'])
|
||||
@@ -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'];
|
||||
@@ -443,7 +442,7 @@ class acp_forums
|
||||
'prune_days' => 7,
|
||||
'prune_viewed' => 7,
|
||||
'prune_freq' => 1,
|
||||
'forum_flags' => FORUM_FLAG_POST_REVIEW,
|
||||
'forum_flags' => FORUM_FLAG_POST_REVIEW + FORUM_FLAG_ACTIVE_TOPICS,
|
||||
'forum_options' => 0,
|
||||
'forum_password' => '',
|
||||
'forum_password_confirm'=> '',
|
||||
@@ -907,7 +906,7 @@ class acp_forums
|
||||
array('lang' => 'FORUM_TOPICS_PAGE', 'value' => $forum_data['forum_topics_per_page'], 'column_type' => 'TINT:0'),
|
||||
);
|
||||
|
||||
if (!file_exists($phpbb_root_path . $forum_data['forum_image']))
|
||||
if (!empty($forum_data['forum_image']) && !file_exists($phpbb_root_path . $forum_data['forum_image']))
|
||||
{
|
||||
$errors[] = $user->lang['FORUM_IMAGE_NO_EXIST'];
|
||||
}
|
||||
@@ -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
|
||||
*
|
||||
|
@@ -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,
|
||||
|
@@ -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,10 +39,16 @@ 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]);
|
||||
|
||||
$announcement_url = trim($info[1]);
|
||||
$announcement_url = (strpos($announcement_url, '&') === false) ? str_replace('&', '&', $announcement_url) : $announcement_url;
|
||||
$update_link = append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=update');
|
||||
|
||||
// Determine automatic update...
|
||||
|
@@ -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'],
|
||||
@@ -1167,13 +1167,7 @@ class acp_users
|
||||
$deleteall = request_var('delall', 0);
|
||||
if ($deletemark && $marked)
|
||||
{
|
||||
$sql_in = array();
|
||||
foreach ($marked as $mark)
|
||||
{
|
||||
$sql_in[] = $mark;
|
||||
}
|
||||
$where_sql = ' AND ' . $db->sql_in_set('warning_id', $sql_in);
|
||||
unset($sql_in);
|
||||
$where_sql = ' AND ' . $db->sql_in_set('warning_id', array_values($marked));
|
||||
}
|
||||
|
||||
if ($where_sql || $deleteall)
|
||||
@@ -1291,7 +1285,6 @@ class acp_users
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_WARNINGS' => true,
|
||||
'S_CLEARLOGS' => $auth->acl_get('a_clearlogs'),
|
||||
));
|
||||
|
||||
break;
|
||||
@@ -1423,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>";
|
||||
@@ -1715,6 +1708,7 @@ class acp_users
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_AVATAR' => true,
|
||||
'S_CAN_UPLOAD' => $can_upload,
|
||||
'S_UPLOAD_FILE' => ($config['allow_avatar'] && $can_upload && $config['allow_avatar_upload']) ? true : false,
|
||||
'S_REMOTE_UPLOAD' => ($config['allow_avatar'] && $can_upload && $config['allow_avatar_remote_upload']) ? true : false,
|
||||
'S_ALLOW_REMOTE' => ($config['allow_avatar'] && $config['allow_avatar_remote']) ? true : false,
|
||||
|
@@ -62,15 +62,23 @@ 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)
|
||||
{
|
||||
$confirm_id = request_var('confirm_id', '');
|
||||
|
||||
// Visual Confirmation handling
|
||||
if (!$confirm_id)
|
||||
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($row);
|
||||
if ($vc_response)
|
||||
{
|
||||
return array(
|
||||
'status' => LOGIN_ERROR_ATTEMPTS,
|
||||
@@ -80,19 +88,9 @@ function login_db(&$username, &$password)
|
||||
}
|
||||
else
|
||||
{
|
||||
$captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
|
||||
$captcha->init(CONFIRM_LOGIN);
|
||||
$vc_response = $captcha->validate();
|
||||
|
||||
if ($vc_response)
|
||||
{
|
||||
return array(
|
||||
'status' => LOGIN_ERROR_ATTEMPTS,
|
||||
'error_msg' => 'LOGIN_ERROR_ATTEMPTS',
|
||||
'user_row' => $row,
|
||||
);
|
||||
}
|
||||
$captcha->reset();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// If the password convert flag is set we need to convert it
|
||||
@@ -201,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,
|
||||
);
|
||||
}
|
||||
|
@@ -128,7 +128,7 @@ class bbcode
|
||||
*/
|
||||
function bbcode_cache_init()
|
||||
{
|
||||
global $user, $phpbb_root_path;
|
||||
global $phpbb_root_path, $template, $user;
|
||||
|
||||
if (empty($this->template_filename))
|
||||
{
|
||||
@@ -137,7 +137,7 @@ class bbcode
|
||||
|
||||
if (!@file_exists($this->template_filename))
|
||||
{
|
||||
if (isset($user->theme['template_inherits_id']) && $user->theme['template_inherits_id'])
|
||||
if (isset($template->orig_tpl_inherits_id) && $template->orig_tpl_inherits_id)
|
||||
{
|
||||
$this->template_filename = $phpbb_root_path . 'styles/' . $user->theme['template_inherit_path'] . '/template/bbcode.html';
|
||||
if (!@file_exists($this->template_filename))
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -80,7 +80,7 @@ class phpbb_captcha_gd extends phpbb_default_captcha
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function get_name()
|
||||
{
|
||||
return 'CAPTCHA_GD';
|
||||
@@ -123,6 +123,8 @@ class phpbb_captcha_gd extends phpbb_default_captcha
|
||||
set_config($captcha_var, $value);
|
||||
}
|
||||
}
|
||||
|
||||
add_log('admin', 'LOG_CONFIG_VISUAL');
|
||||
trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($module->u_action));
|
||||
}
|
||||
else if ($submit)
|
||||
@@ -148,7 +150,7 @@ class phpbb_captcha_gd extends phpbb_default_captcha
|
||||
function execute_demo()
|
||||
{
|
||||
global $config;
|
||||
|
||||
|
||||
$config_old = $config;
|
||||
foreach ($this->captcha_vars as $captcha_var => $template_var)
|
||||
{
|
||||
|
@@ -53,16 +53,16 @@ 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->data['user_lang'];
|
||||
$this->question_lang = $user->lang_name;
|
||||
|
||||
// we need all defined questions - shouldn't be too many, so we can just grab them
|
||||
// try the user's lang first
|
||||
$sql = 'SELECT question_id
|
||||
FROM ' . CAPTCHA_QUESTIONS_TABLE . "
|
||||
WHERE lang_iso = '" . $db->sql_escape($user->data['user_lang']) . "'";
|
||||
WHERE lang_iso = '" . $db->sql_escape($user->lang_name) . "'";
|
||||
$result = $db->sql_query($sql, 3600);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
@@ -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();
|
||||
@@ -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
|
||||
@@ -685,12 +753,13 @@ class phpbb_captcha_qa
|
||||
$this->acp_add_question($data);
|
||||
}
|
||||
|
||||
add_log('admin', 'LOG_CONFIG_VISUAL');
|
||||
trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($list_url));
|
||||
}
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -768,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;
|
||||
@@ -887,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;
|
||||
}
|
||||
@@ -919,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;
|
||||
@@ -100,6 +107,8 @@ class phpbb_recaptcha extends phpbb_default_captcha
|
||||
set_config($captcha_var, $value);
|
||||
}
|
||||
}
|
||||
|
||||
add_log('admin', 'LOG_CONFIG_VISUAL');
|
||||
trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($module->u_action));
|
||||
}
|
||||
else if ($submit)
|
||||
|
@@ -25,7 +25,7 @@ if (!defined('IN_PHPBB'))
|
||||
*/
|
||||
|
||||
// phpBB Version
|
||||
define('PHPBB_VERSION', '3.0.6-RC1');
|
||||
define('PHPBB_VERSION', '3.0.7-RC1');
|
||||
|
||||
// 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':
|
||||
@@ -1190,11 +1196,13 @@ class phpbb_db_tools
|
||||
// For hexadecimal values do not use single quotes
|
||||
if (strpos($column_data[1], '0x') === 0)
|
||||
{
|
||||
$sql_default .= 'DEFAULT (' . $column_data[1] . ') ';
|
||||
$return_array['default'] = 'DEFAULT (' . $column_data[1] . ') ';
|
||||
$sql_default .= $return_array['default'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql_default .= 'DEFAULT (' . ((is_numeric($column_data[1])) ? $column_data[1] : "'{$column_data[1]}'") . ') ';
|
||||
$return_array['default'] = 'DEFAULT (' . ((is_numeric($column_data[1])) ? $column_data[1] : "'{$column_data[1]}'") . ') ';
|
||||
$sql_default .= $return_array['default'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1340,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':
|
||||
@@ -1781,7 +1811,7 @@ class phpbb_db_tools
|
||||
case 'firebird':
|
||||
$sql = "SELECT LOWER(RDB\$INDEX_NAME) as index_name
|
||||
FROM RDB\$INDICES
|
||||
WHERE RDB\$RELATION_NAME = " . strtoupper($table_name) . "
|
||||
WHERE RDB\$RELATION_NAME = '" . strtoupper($table_name) . "'
|
||||
AND RDB\$UNIQUE_FLAG IS NULL
|
||||
AND RDB\$FOREIGN_KEY IS NULL";
|
||||
$col = 'index_name';
|
||||
@@ -1808,8 +1838,9 @@ class phpbb_db_tools
|
||||
case 'oracle':
|
||||
$sql = "SELECT index_name
|
||||
FROM user_indexes
|
||||
WHERE table_name = '" . $table_name . "'
|
||||
AND generated = 'N'";
|
||||
WHERE table_name = '" . strtoupper($table_name) . "'
|
||||
AND generated = 'N'
|
||||
AND uniqueness = 'NONUNIQUE'";
|
||||
$col = 'index_name';
|
||||
break;
|
||||
|
||||
@@ -1864,12 +1895,33 @@ 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;
|
||||
|
||||
case 'mssql':
|
||||
$statements[] = 'ALTER TABLE [' . $table_name . '] ALTER COLUMN [' . $column_name . '] ' . $column_data['column_type_sql'];
|
||||
|
||||
if (!empty($column_data['default']))
|
||||
{
|
||||
// Using TRANSACT-SQL for this statement because we do not want to have colliding data if statements are executed at a later stage
|
||||
$statements[] = "DECLARE @drop_default_name VARCHAR(100), @cmd VARCHAR(1000)
|
||||
SET @drop_default_name =
|
||||
(SELECT so.name FROM sysobjects so
|
||||
JOIN sysconstraints sc ON so.id = sc.constid
|
||||
WHERE object_name(so.parent_obj) = '{$table_name}'
|
||||
AND so.xtype = 'D'
|
||||
AND sc.colid = (SELECT colid FROM syscolumns
|
||||
WHERE id = object_id('{$table_name}')
|
||||
AND name = '{$column_name}'))
|
||||
IF @drop_default_name <> ''
|
||||
BEGIN
|
||||
SET @cmd = 'ALTER TABLE [{$table_name}] DROP CONSTRAINT [' + @drop_default_name + ']'
|
||||
EXEC(@cmd)
|
||||
END
|
||||
SET @cmd = 'ALTER TABLE [{$table_name}] ADD CONSTRAINT [DF_{$table_name}_{$column_name}_1] {$column_data['default']} FOR [{$column_name}]'
|
||||
EXEC(@cmd)";
|
||||
}
|
||||
break;
|
||||
|
||||
case 'mysql_40':
|
||||
|
@@ -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)
|
||||
{
|
||||
@@ -255,13 +255,62 @@ class dbal_oracle extends dbal
|
||||
// We overcome Oracle's 4000 char limit by binding vars
|
||||
if (strlen($query) > 4000)
|
||||
{
|
||||
if (preg_match('/^(INSERT INTO[^(]++)\\(([^()]+)\\) VALUES[^(]++\\((.*?)\\)$/s', $query, $regs))
|
||||
if (preg_match('/^(INSERT INTO[^(]++)\\(([^()]+)\\) VALUES[^(]++\\((.*?)\\)$/sU', $query, $regs))
|
||||
{
|
||||
if (strlen($regs[3]) > 4000)
|
||||
{
|
||||
$cols = explode(', ', $regs[2]);
|
||||
|
||||
preg_match_all('/\'(?:[^\']++|\'\')*+\'|[\d-.]+/', $regs[3], $vals, PREG_PATTERN_ORDER);
|
||||
|
||||
if (sizeof($cols) !== sizeof($vals))
|
||||
{
|
||||
// Try to replace some common data we know is from our restore script or from other sources
|
||||
$regs[3] = str_replace("'||chr(47)||'", '/', $regs[3]);
|
||||
$_vals = explode(', ', $regs[3]);
|
||||
|
||||
$vals = array();
|
||||
$is_in_val = false;
|
||||
$i = 0;
|
||||
$string = '';
|
||||
|
||||
foreach ($_vals as $value)
|
||||
{
|
||||
if (strpos($value, "'") === false && !$is_in_val)
|
||||
{
|
||||
$vals[$i++] = $value;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (substr($value, -1) === "'")
|
||||
{
|
||||
$vals[$i] = $string . (($is_in_val) ? ', ' : '') . $value;
|
||||
$string = '';
|
||||
$is_in_val = false;
|
||||
|
||||
if ($vals[$i][0] !== "'")
|
||||
{
|
||||
$vals[$i] = "''" . $vals[$i];
|
||||
}
|
||||
$i++;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
$string .= (($is_in_val) ? ', ' : '') . $value;
|
||||
$is_in_val = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($string)
|
||||
{
|
||||
// New value if cols != value
|
||||
$vals[(sizeof($cols) !== sizeof($vals)) ? $i : $i - 1] .= $string;
|
||||
}
|
||||
|
||||
$vals = array(0 => $vals);
|
||||
}
|
||||
|
||||
$inserts = $vals[0];
|
||||
unset($vals);
|
||||
|
||||
|
@@ -71,8 +71,10 @@ class diff
|
||||
{
|
||||
$count = 0;
|
||||
|
||||
foreach ($this->_edits as $edit)
|
||||
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
|
||||
{
|
||||
$edit = $this->_edits[$i];
|
||||
|
||||
if (is_a($edit, 'diff_op_add') || is_a($edit, 'diff_op_change'))
|
||||
{
|
||||
$count += $edit->nfinal();
|
||||
@@ -92,8 +94,10 @@ class diff
|
||||
{
|
||||
$count = 0;
|
||||
|
||||
foreach ($this->_edits as $edit)
|
||||
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
|
||||
{
|
||||
$edit = $this->_edits[$i];
|
||||
|
||||
if (is_a($edit, 'diff_op_delete') || is_a($edit, 'diff_op_change'))
|
||||
{
|
||||
$count += $edit->norig();
|
||||
@@ -128,8 +132,9 @@ class diff
|
||||
|
||||
$rev->_edits = array();
|
||||
|
||||
foreach ($this->_edits as $edit)
|
||||
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
|
||||
{
|
||||
$edit = $this->_edits[$i];
|
||||
$rev->_edits[] = $edit->reverse();
|
||||
}
|
||||
|
||||
@@ -143,13 +148,36 @@ class diff
|
||||
*/
|
||||
function is_empty()
|
||||
{
|
||||
foreach ($this->_edits as $edit)
|
||||
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
|
||||
{
|
||||
if (!is_a($edit, 'diff_op_copy'))
|
||||
$edit = $this->_edits[$i];
|
||||
|
||||
// skip diff_op_copy
|
||||
if (is_a($edit, 'diff_op_copy'))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (is_a($edit, 'diff_op_delete') || is_a($edit, 'diff_op_add'))
|
||||
{
|
||||
$orig = $edit->orig;
|
||||
$final = $edit->final;
|
||||
|
||||
// We can simplify one case where the array is usually supposed to be empty...
|
||||
if (sizeof($orig) == 1 && trim($orig[0]) === '') $orig = array();
|
||||
if (sizeof($final) == 1 && trim($final[0]) === '') $final = array();
|
||||
|
||||
if (!$orig && !$final)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -164,8 +192,10 @@ class diff
|
||||
{
|
||||
$lcs = 0;
|
||||
|
||||
foreach ($this->_edits as $edit)
|
||||
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
|
||||
{
|
||||
$edit = $this->_edits[$i];
|
||||
|
||||
if (is_a($edit, 'diff_op_copy'))
|
||||
{
|
||||
$lcs += sizeof($edit->orig);
|
||||
@@ -185,8 +215,10 @@ class diff
|
||||
{
|
||||
$lines = array();
|
||||
|
||||
foreach ($this->_edits as $edit)
|
||||
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
|
||||
{
|
||||
$edit = $this->_edits[$i];
|
||||
|
||||
if ($edit->orig)
|
||||
{
|
||||
array_splice($lines, sizeof($lines), 0, $edit->orig);
|
||||
@@ -206,8 +238,10 @@ class diff
|
||||
{
|
||||
$lines = array();
|
||||
|
||||
foreach ($this->_edits as $edit)
|
||||
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
|
||||
{
|
||||
$edit = $this->_edits[$i];
|
||||
|
||||
if ($edit->final)
|
||||
{
|
||||
array_splice($lines, sizeof($lines), 0, $edit->final);
|
||||
@@ -258,8 +292,10 @@ class diff
|
||||
|
||||
$prevtype = null;
|
||||
|
||||
foreach ($this->_edits as $edit)
|
||||
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
|
||||
{
|
||||
$edit = $this->_edits[$i];
|
||||
|
||||
if ($prevtype == get_class($edit))
|
||||
{
|
||||
trigger_error("[diff] Edit sequence is non-optimal", E_USER_ERROR);
|
||||
@@ -456,14 +492,14 @@ class diff3 extends diff
|
||||
* @param array $final1 The first version to compare to.
|
||||
* @param array $final2 The second version to compare to.
|
||||
*/
|
||||
function diff3(&$orig, &$final1, &$final2)
|
||||
function diff3(&$orig, &$final1, &$final2, $preserve_cr = true)
|
||||
{
|
||||
$diff_engine = new diff_engine();
|
||||
|
||||
$diff_1 = $diff_engine->diff($orig, $final1);
|
||||
$diff_2 = $diff_engine->diff($orig, $final2);
|
||||
$diff_1 = $diff_engine->diff($orig, $final1, $preserve_cr);
|
||||
$diff_2 = $diff_engine->diff($orig, $final2, $preserve_cr);
|
||||
|
||||
unset($engine);
|
||||
unset($diff_engine);
|
||||
|
||||
$this->_edits = $this->_diff3($diff_1, $diff_2);
|
||||
}
|
||||
@@ -475,8 +511,10 @@ class diff3 extends diff
|
||||
{
|
||||
$conflicts = 0;
|
||||
|
||||
foreach ($this->_edits as $edit)
|
||||
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
|
||||
{
|
||||
$edit = $this->_edits[$i];
|
||||
|
||||
if ($edit->is_conflict())
|
||||
{
|
||||
$conflicts++;
|
||||
@@ -506,8 +544,10 @@ class diff3 extends diff
|
||||
|
||||
$lines = array();
|
||||
|
||||
foreach ($this->_edits as $edit)
|
||||
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
|
||||
{
|
||||
$edit = $this->_edits[$i];
|
||||
|
||||
if ($edit->is_conflict())
|
||||
{
|
||||
// Start conflict label
|
||||
@@ -544,8 +584,10 @@ class diff3 extends diff
|
||||
{
|
||||
$lines = array();
|
||||
|
||||
foreach ($this->_edits as $edit)
|
||||
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
|
||||
{
|
||||
$edit = $this->_edits[$i];
|
||||
|
||||
if ($edit->is_conflict())
|
||||
{
|
||||
$lines = array_merge($lines, $edit->final2);
|
||||
@@ -566,8 +608,10 @@ class diff3 extends diff
|
||||
{
|
||||
$lines = array();
|
||||
|
||||
foreach ($this->_edits as $edit)
|
||||
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
|
||||
{
|
||||
$edit = $this->_edits[$i];
|
||||
|
||||
if ($edit->is_conflict())
|
||||
{
|
||||
$lines = array_merge($lines, $edit->final1);
|
||||
@@ -588,8 +632,10 @@ class diff3 extends diff
|
||||
{
|
||||
$conflicts = array();
|
||||
|
||||
foreach ($this->_edits as $edit)
|
||||
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
|
||||
{
|
||||
$edit = $this->_edits[$i];
|
||||
|
||||
if ($edit->is_conflict())
|
||||
{
|
||||
$conflicts[] = array($edit->final1, $edit->final2);
|
||||
@@ -713,6 +759,9 @@ class diff3_op
|
||||
{
|
||||
if (!isset($this->_merged))
|
||||
{
|
||||
// Prepare the arrays before we compare them. ;)
|
||||
$this->solve_prepare();
|
||||
|
||||
if ($this->final1 === $this->final2)
|
||||
{
|
||||
$this->_merged = &$this->final1;
|
||||
@@ -727,7 +776,9 @@ class diff3_op
|
||||
}
|
||||
else
|
||||
{
|
||||
// The following tries to aggressively solve conflicts...
|
||||
$this->_merged = false;
|
||||
$this->solve_conflict();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -738,6 +789,267 @@ class diff3_op
|
||||
{
|
||||
return ($this->merged() === false) ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to prepare the arrays for comparing - we want to skip over newline changes
|
||||
* @author acydburn
|
||||
*/
|
||||
function solve_prepare()
|
||||
{
|
||||
// We can simplify one case where the array is usually supposed to be empty...
|
||||
if (sizeof($this->orig) == 1 && trim($this->orig[0]) === '') $this->orig = array();
|
||||
if (sizeof($this->final1) == 1 && trim($this->final1[0]) === '') $this->final1 = array();
|
||||
if (sizeof($this->final2) == 1 && trim($this->final2[0]) === '') $this->final2 = array();
|
||||
|
||||
// Now we only can have the case where the only difference between arrays are newlines, so compare all cases
|
||||
|
||||
// First, some strings we can compare...
|
||||
$orig = $final1 = $final2 = '';
|
||||
|
||||
foreach ($this->orig as $null => $line) $orig .= trim($line);
|
||||
foreach ($this->final1 as $null => $line) $final1 .= trim($line);
|
||||
foreach ($this->final2 as $null => $line) $final2 .= trim($line);
|
||||
|
||||
// final1 === final2
|
||||
if ($final1 === $final2)
|
||||
{
|
||||
// We preserve the part which will be used in the merge later
|
||||
$this->final2 = $this->final1;
|
||||
}
|
||||
// final1 === orig
|
||||
else if ($final1 === $orig)
|
||||
{
|
||||
// Here it does not really matter what we choose, but we will use the new code
|
||||
$this->orig = $this->final1;
|
||||
}
|
||||
// final2 === orig
|
||||
else if ($final2 === $orig)
|
||||
{
|
||||
// Here it does not really matter too (final1 will be used), but we will use the new code
|
||||
$this->orig = $this->final2;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find code portions from $orig in $final1 and use $final2 as merged instance if provided
|
||||
* @author acydburn
|
||||
*/
|
||||
function _compare_conflict_seq($orig, $final1, $final2 = false)
|
||||
{
|
||||
$result = array('merge_found' => false, 'merge' => array());
|
||||
|
||||
$_orig = &$this->$orig;
|
||||
$_final1 = &$this->$final1;
|
||||
|
||||
// Ok, we basically search for $orig in $final1
|
||||
$compare_seq = sizeof($_orig);
|
||||
|
||||
// Go through the conflict code
|
||||
for ($i = 0, $j = 0, $size = sizeof($_final1); $i < $size; $i++, $j = $i)
|
||||
{
|
||||
$line = $_final1[$i];
|
||||
$skip = 0;
|
||||
|
||||
for ($x = 0; $x < $compare_seq; $x++)
|
||||
{
|
||||
// Try to skip all matching lines
|
||||
if (trim($line) === trim($_orig[$x]))
|
||||
{
|
||||
$line = (++$j < $size) ? $_final1[$j] : $line;
|
||||
$skip++;
|
||||
}
|
||||
}
|
||||
|
||||
if ($skip === $compare_seq)
|
||||
{
|
||||
$result['merge_found'] = true;
|
||||
|
||||
if ($final2 !== false)
|
||||
{
|
||||
$result['merge'] = array_merge($result['merge'], $this->$final2);
|
||||
}
|
||||
$i += ($skip - 1);
|
||||
}
|
||||
else if ($final2 !== false)
|
||||
{
|
||||
$result['merge'][] = $line;
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tries to solve conflicts aggressively based on typical "assumptions"
|
||||
* @author acydburn
|
||||
*/
|
||||
function solve_conflict()
|
||||
{
|
||||
$this->_merged = false;
|
||||
|
||||
// CASE ONE: orig changed into final2, but modified/unknown code in final1.
|
||||
// IF orig is found "as is" in final1 we replace the code directly in final1 and populate this as final2/merge
|
||||
if (sizeof($this->orig) && sizeof($this->final2))
|
||||
{
|
||||
$result = $this->_compare_conflict_seq('orig', 'final1', 'final2');
|
||||
|
||||
if ($result['merge_found'])
|
||||
{
|
||||
$this->final2 = $result['merge'];
|
||||
$this->_merged = &$this->final2;
|
||||
return;
|
||||
}
|
||||
|
||||
$result = $this->_compare_conflict_seq('final2', 'final1');
|
||||
|
||||
if ($result['merge_found'])
|
||||
{
|
||||
$this->_merged = &$this->final1;
|
||||
return;
|
||||
}
|
||||
|
||||
// Try to solve $Id$ issues. ;)
|
||||
if (sizeof($this->orig) == 1 && sizeof($this->final1) == 1 && sizeof($this->final2) == 1)
|
||||
{
|
||||
$match = '#^' . preg_quote('* @version $Id: ', '#') . '[a-z\._\- ]+[0-9]+ [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9\:Z]+ [a-z0-9_\- ]+\$$#';
|
||||
|
||||
if (preg_match($match, $this->orig[0]) && preg_match($match, $this->final1[0]) && preg_match($match, $this->final2[0]))
|
||||
{
|
||||
$this->_merged = &$this->final2;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$second_run = false;
|
||||
|
||||
// Try to solve issues where the only reason why the above did not work is a newline being removed in the final1 code but exist in the orig/final2 code
|
||||
if (trim($this->orig[0]) === '' && trim($this->final2[0]) === '')
|
||||
{
|
||||
unset($this->orig[0], $this->final2[0]);
|
||||
$this->orig = array_values($this->orig);
|
||||
$this->final2 = array_values($this->final2);
|
||||
|
||||
$second_run = true;
|
||||
}
|
||||
|
||||
// The same is true for a line at the end. ;)
|
||||
if (sizeof($this->orig) && sizeof($this->final2) && sizeof($this->orig) === sizeof($this->final2) && trim($this->orig[sizeof($this->orig)-1]) === '' && trim($this->final2[sizeof($this->final2)-1]) === '')
|
||||
{
|
||||
unset($this->orig[sizeof($this->orig)-1], $this->final2[sizeof($this->final2)-1]);
|
||||
$this->orig = array_values($this->orig);
|
||||
$this->final2 = array_values($this->final2);
|
||||
|
||||
$second_run = true;
|
||||
}
|
||||
|
||||
if ($second_run)
|
||||
{
|
||||
$result = $this->_compare_conflict_seq('orig', 'final1', 'final2');
|
||||
|
||||
if ($result['merge_found'])
|
||||
{
|
||||
$this->final2 = $result['merge'];
|
||||
$this->_merged = &$this->final2;
|
||||
return;
|
||||
}
|
||||
|
||||
$result = $this->_compare_conflict_seq('final2', 'final1');
|
||||
|
||||
if ($result['merge_found'])
|
||||
{
|
||||
$this->_merged = &$this->final1;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// CASE TWO: Added lines from orig to final2 but final1 had added lines too. Just merge them.
|
||||
if (!sizeof($this->orig) && $this->final1 !== $this->final2 && sizeof($this->final1) && sizeof($this->final2))
|
||||
{
|
||||
$result = $this->_compare_conflict_seq('final2', 'final1');
|
||||
|
||||
if ($result['merge_found'])
|
||||
{
|
||||
$this->final2 = $this->final1;
|
||||
$this->_merged = &$this->final1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->_compare_conflict_seq('final1', 'final2');
|
||||
|
||||
if (!$result['merge_found'])
|
||||
{
|
||||
$this->final2 = array_merge($this->final1, $this->final2);
|
||||
$this->_merged = &$this->final2;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->final2 = $this->final1;
|
||||
$this->_merged = &$this->final1;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// CASE THREE: Removed lines (orig has the to-remove line(s), but final1 has additional lines which does not need to be removed). Just remove orig from final1 and then use final1 as final2/merge
|
||||
if (!sizeof($this->final2) && sizeof($this->orig) && sizeof($this->final1) && $this->orig !== $this->final1)
|
||||
{
|
||||
$result = $this->_compare_conflict_seq('orig', 'final1');
|
||||
|
||||
if (!$result['merge_found'])
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// First of all, try to find the code in orig in final1. ;)
|
||||
$compare_seq = sizeof($this->orig);
|
||||
$begin = $end = -1;
|
||||
$j = 0;
|
||||
|
||||
for ($i = 0, $size = sizeof($this->final1); $i < $size; $i++)
|
||||
{
|
||||
$line = $this->final1[$i];
|
||||
|
||||
if (trim($line) === trim($this->orig[$j]))
|
||||
{
|
||||
// Mark begin
|
||||
if ($begin === -1)
|
||||
{
|
||||
$begin = $i;
|
||||
}
|
||||
|
||||
// End is always $i, the last found line
|
||||
$end = $i;
|
||||
|
||||
if (isset($this->orig[$j+1]))
|
||||
{
|
||||
$j++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($begin !== -1 && $begin + ($compare_seq - 1) == $end)
|
||||
{
|
||||
foreach ($this->final1 as $i => $line)
|
||||
{
|
||||
if ($i < $begin || $i > $end)
|
||||
{
|
||||
$merged[] = $line;
|
||||
}
|
||||
}
|
||||
|
||||
$this->final2 = $merged;
|
||||
$this->_merged = &$this->final2;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -49,6 +49,9 @@ if (!defined('IN_PHPBB'))
|
||||
*/
|
||||
class diff_engine
|
||||
{
|
||||
/**
|
||||
* If set to true we trim all lines before we compare them. This ensures that sole space/tab changes do not trigger diffs.
|
||||
*/
|
||||
var $skip_whitespace_changes = true;
|
||||
|
||||
function diff(&$from_lines, &$to_lines, $preserve_cr = true)
|
||||
@@ -87,7 +90,7 @@ class diff_engine
|
||||
// Skip leading common lines.
|
||||
for ($skip = 0; $skip < $n_from && $skip < $n_to; $skip++)
|
||||
{
|
||||
if ($from_lines[$skip] !== $to_lines[$skip])
|
||||
if (trim($from_lines[$skip]) !== trim($to_lines[$skip]))
|
||||
{
|
||||
break;
|
||||
}
|
||||
@@ -100,7 +103,7 @@ class diff_engine
|
||||
|
||||
for ($endskip = 0; --$xi > $skip && --$yi > $skip; $endskip++)
|
||||
{
|
||||
if ($from_lines[$xi] !== $to_lines[$yi])
|
||||
if (trim($from_lines[$xi]) !== trim($to_lines[$yi]))
|
||||
{
|
||||
break;
|
||||
}
|
||||
@@ -110,12 +113,12 @@ class diff_engine
|
||||
// Ignore lines which do not exist in both files.
|
||||
for ($xi = $skip; $xi < $n_from - $endskip; $xi++)
|
||||
{
|
||||
$xhash[$from_lines[$xi]] = 1;
|
||||
if ($this->skip_whitespace_changes) $xhash[trim($from_lines[$xi])] = 1; else $xhash[$from_lines[$xi]] = 1;
|
||||
}
|
||||
|
||||
for ($yi = $skip; $yi < $n_to - $endskip; $yi++)
|
||||
{
|
||||
$line = $to_lines[$yi];
|
||||
$line = ($this->skip_whitespace_changes) ? trim($to_lines[$yi]) : $to_lines[$yi];
|
||||
|
||||
if (($this->ychanged[$yi] = empty($xhash[$line])))
|
||||
{
|
||||
@@ -128,7 +131,7 @@ class diff_engine
|
||||
|
||||
for ($xi = $skip; $xi < $n_from - $endskip; $xi++)
|
||||
{
|
||||
$line = $from_lines[$xi];
|
||||
$line = ($this->skip_whitespace_changes) ? trim($from_lines[$xi]) : $from_lines[$xi];
|
||||
|
||||
if (($this->xchanged[$xi] = empty($yhash[$line])))
|
||||
{
|
||||
@@ -142,8 +145,21 @@ class diff_engine
|
||||
$this->_compareseq(0, sizeof($this->xv), 0, sizeof($this->yv));
|
||||
|
||||
// Merge edits when possible.
|
||||
$this->_shift_boundaries($from_lines, $this->xchanged, $this->ychanged);
|
||||
$this->_shift_boundaries($to_lines, $this->ychanged, $this->xchanged);
|
||||
if ($this->skip_whitespace_changes)
|
||||
{
|
||||
$from_lines_clean = array_map('trim', $from_lines);
|
||||
$to_lines_clean = array_map('trim', $to_lines);
|
||||
|
||||
$this->_shift_boundaries($from_lines_clean, $this->xchanged, $this->ychanged);
|
||||
$this->_shift_boundaries($to_lines_clean, $this->ychanged, $this->xchanged);
|
||||
|
||||
unset($from_lines_clean, $to_lines_clean);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->_shift_boundaries($from_lines, $this->xchanged, $this->ychanged);
|
||||
$this->_shift_boundaries($to_lines, $this->ychanged, $this->xchanged);
|
||||
}
|
||||
|
||||
// Compute the edit operations.
|
||||
$edits = array();
|
||||
@@ -178,20 +194,6 @@ class diff_engine
|
||||
$add[] = $to_lines[$yi++];
|
||||
}
|
||||
|
||||
// Here we are a bit naughty. Naughty Boy... Naughty Boy...
|
||||
// We check if delete and add is filled and only consist of one item
|
||||
if ($this->skip_whitespace_changes && sizeof($delete) == 1 && sizeof($add) == 1)
|
||||
{
|
||||
// Now we simply trim the string and see if the lines are identical
|
||||
// If they are identical we do not need to take them into account for the merge (less conflicts in phpBB)
|
||||
if (trim($delete[0]) === trim($add[0]))
|
||||
{
|
||||
// This line ensures the line found here is correctly copied later (remember: we naughty boys like loops)
|
||||
$xi--; $yi--; $this->xchanged[$xi] = $this->ychanged[$yi] = false;
|
||||
$delete = $add = array();
|
||||
}
|
||||
}
|
||||
|
||||
if ($delete && $add)
|
||||
{
|
||||
$edits[] = new diff_op_change($delete, $add);
|
||||
|
@@ -1693,11 +1693,11 @@ function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $s
|
||||
'LEFT_JOIN' => array(
|
||||
array(
|
||||
'FROM' => array(TOPICS_TRACK_TABLE => 'tt'),
|
||||
'ON' => "tt.user_id = $user_id AND t.topic_id = tt.topic_id AND tt.mark_time > $last_mark",
|
||||
'ON' => "tt.user_id = $user_id AND t.topic_id = tt.topic_id",
|
||||
),
|
||||
array(
|
||||
'FROM' => array(FORUMS_TRACK_TABLE => 'ft'),
|
||||
'ON' => "ft.user_id = $user_id AND t.forum_id = ft.forum_id AND ft.mark_time > $last_mark",
|
||||
'ON' => "ft.user_id = $user_id AND t.forum_id = ft.forum_id",
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1705,10 +1705,7 @@ function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $s
|
||||
(
|
||||
(tt.mark_time IS NOT NULL AND t.topic_last_post_time > tt.mark_time) OR
|
||||
(tt.mark_time IS NULL AND ft.mark_time IS NOT NULL AND t.topic_last_post_time > ft.mark_time) OR
|
||||
(
|
||||
((tt.mark_time IS NULL AND ft.mark_time IS NULL) OR (tt.mark_time < $last_mark AND ft.mark_time < $last_mark))
|
||||
AND t.topic_last_post_time > $last_mark
|
||||
)
|
||||
(tt.mark_time IS NULL AND ft.mark_time IS NULL AND t.topic_last_post_time > $last_mark)
|
||||
)
|
||||
$sql_extra
|
||||
$sql_sort",
|
||||
@@ -3050,6 +3047,7 @@ function login_forum_box($forum_data)
|
||||
page_header($user->lang['LOGIN'], false);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_LOGIN_ACTION' => build_url(array('f')),
|
||||
'S_HIDDEN_FIELDS' => build_hidden_fields(array('f' => $forum_data['forum_id'])))
|
||||
);
|
||||
|
||||
@@ -3922,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
|
||||
*/
|
||||
@@ -3961,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)
|
||||
{
|
||||
@@ -3984,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;
|
||||
@@ -4034,16 +4130,6 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
|
||||
}
|
||||
}
|
||||
|
||||
// Which timezone?
|
||||
$tz = ($user->data['user_id'] != ANONYMOUS) ? strval(doubleval($user->data['user_timezone'])) : strval(doubleval($config['board_timezone']));
|
||||
|
||||
// Send a proper content-language to the output
|
||||
$user_lang = $user->lang['USER_LANG'];
|
||||
if (strpos($user_lang, '-x-') !== false)
|
||||
{
|
||||
$user_lang = substr($user_lang, 0, strpos($user_lang, '-x-'));
|
||||
}
|
||||
|
||||
$forum_id = request_var('f', 0);
|
||||
$topic_id = request_var('t', 0);
|
||||
|
||||
@@ -4064,6 +4150,16 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
|
||||
$board_url = generate_board_url() . '/';
|
||||
$web_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? $board_url : $phpbb_root_path;
|
||||
|
||||
// Which timezone?
|
||||
$tz = ($user->data['user_id'] != ANONYMOUS) ? strval(doubleval($user->data['user_timezone'])) : strval(doubleval($config['board_timezone']));
|
||||
|
||||
// Send a proper content-language to the output
|
||||
$user_lang = $user->lang['USER_LANG'];
|
||||
if (strpos($user_lang, '-x-') !== false)
|
||||
{
|
||||
$user_lang = substr($user_lang, 0, strpos($user_lang, '-x-'));
|
||||
}
|
||||
|
||||
// The following assigns all _common_ variables that may be used at any point in a template.
|
||||
$template->assign_vars(array(
|
||||
'SITENAME' => $config['sitename'],
|
||||
@@ -4141,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',
|
||||
@@ -4160,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('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)
|
||||
@@ -254,7 +255,7 @@ function get_forum_list($acl_list = 'f_list', $id_only = true, $postable_only =
|
||||
|
||||
if ($acl_list == '' || ($acl_list != '' && $auth->acl_gets($acl_list, $row['forum_id'])))
|
||||
{
|
||||
$rowset[] = ($id_only) ? $row['forum_id'] : $row;
|
||||
$rowset[] = ($id_only) ? (int) $row['forum_id'] : $row;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2361,8 +2362,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(
|
||||
@@ -2514,6 +2515,7 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id
|
||||
|
||||
case 'mod':
|
||||
$log_type = LOG_MOD;
|
||||
$sql_forum = '';
|
||||
|
||||
if ($topic_id)
|
||||
{
|
||||
@@ -2548,17 +2550,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)
|
||||
{
|
||||
|
@@ -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();
|
||||
|
||||
|
@@ -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');
|
||||
$tpl->set_custom_template($template_path, $template_lang . '_email', $fallback_template_path);
|
||||
|
||||
$tpl->set_filenames(array(
|
||||
'body' => $template_file . '.txt',
|
||||
@@ -1134,7 +1147,24 @@ class smtp_class
|
||||
global $user;
|
||||
|
||||
$err_msg = '';
|
||||
$local_host = (function_exists('php_uname')) ? gethostbyaddr(gethostbyname(php_uname('n'))) : $user->host;
|
||||
|
||||
// Here we try to determine the *real* hostname (reverse DNS entry preferrably)
|
||||
$local_host = $user->host;
|
||||
|
||||
if (function_exists('php_uname'))
|
||||
{
|
||||
$local_host = php_uname('n');
|
||||
|
||||
// Able to resolve name to IP
|
||||
if (($addr = @gethostbyname($local_host)) !== $local_host)
|
||||
{
|
||||
// Able to resolve IP back to name
|
||||
if (($name = @gethostbyaddr($addr)) !== $addr)
|
||||
{
|
||||
$local_host = $name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If we are authenticating through pop-before-smtp, we
|
||||
// have to login ones before we get authenticated
|
||||
|
@@ -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);
|
||||
@@ -1900,7 +1907,7 @@ function set_user_message_limit()
|
||||
*/
|
||||
function get_recipient_strings($pm_by_id)
|
||||
{
|
||||
global $user, $db;
|
||||
global $db, $phpbb_root_path, $phpEx, $user;
|
||||
|
||||
$address_list = $recipient_list = $address = array();
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -349,7 +349,6 @@ class filespec
|
||||
}
|
||||
|
||||
phpbb_chmod($this->destination_file, $chmod);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Try to get real filesize from destination folder
|
||||
|
@@ -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),
|
||||
)
|
||||
);
|
||||
|
||||
@@ -593,7 +594,7 @@ function close_report($report_id_list, $mode, $action, $pm = false)
|
||||
$db->sql_query($sql);
|
||||
|
||||
if ($action == 'delete')
|
||||
{echo "aha";
|
||||
{
|
||||
delete_pm(ANONYMOUS, $close_report_posts, PRIVMSGS_INBOX);
|
||||
}
|
||||
}
|
||||
@@ -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'])));
|
||||
@@ -259,7 +266,7 @@ function mcp_topic_view($id, $mode, $action)
|
||||
// Display topic icons for split topic
|
||||
$s_topic_icons = false;
|
||||
|
||||
if ($auth->acl_get('m_split', $topic_info['forum_id']))
|
||||
if ($auth->acl_gets('m_split', 'm_merge', (int) $topic_info['forum_id']))
|
||||
{
|
||||
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
|
||||
$s_topic_icons = posting_gen_topic_icons('', $icon_id);
|
||||
@@ -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;
|
||||
@@ -1345,7 +1340,7 @@ class parse_message extends bbcode_firstpass
|
||||
/**
|
||||
* Parse Attachments
|
||||
*/
|
||||
function parse_attachments($form_name, $mode, $forum_id, $submit, $preview, $refresh, $is_message = false, $post_msg_id = 0, $topic_id = 0)
|
||||
function parse_attachments($form_name, $mode, $forum_id, $submit, $preview, $refresh, $is_message = false)
|
||||
{
|
||||
global $config, $auth, $user, $phpbb_root_path, $phpEx, $db;
|
||||
|
||||
@@ -1498,25 +1493,16 @@ class parse_message extends bbcode_firstpass
|
||||
'filesize' => $filedata['filesize'],
|
||||
'filetime' => $filedata['filetime'],
|
||||
'thumbnail' => $filedata['thumbnail'],
|
||||
'is_orphan' => ($post_msg_id) ? 0 : 1,
|
||||
'is_orphan' => 1,
|
||||
'in_message' => ($is_message) ? 1 : 0,
|
||||
'poster_id' => $user->data['user_id'],
|
||||
);
|
||||
|
||||
if ($post_msg_id)
|
||||
{
|
||||
$sql_ary['post_msg_id'] = $post_msg_id;
|
||||
if ($topic_id)
|
||||
{
|
||||
$sql_ary['topic_id'] = $topic_id;
|
||||
}
|
||||
}
|
||||
|
||||
$db->sql_query('INSERT INTO ' . ATTACHMENTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
|
||||
|
||||
$new_entry = array(
|
||||
'attach_id' => $db->sql_nextid(),
|
||||
'is_orphan' => ($post_msg_id) ? 0 : 1,
|
||||
'is_orphan' => 1,
|
||||
'real_filename' => $filedata['real_filename'],
|
||||
'attach_comment'=> $this->filename_data['filecomment'],
|
||||
);
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -182,7 +182,7 @@ class session
|
||||
else
|
||||
{
|
||||
// Set to OS hostname or localhost
|
||||
$host = (function_exists('php_uname')) ? gethostbyaddr(gethostbyname(php_uname('n'))) : 'localhost';
|
||||
$host = (function_exists('php_uname')) ? php_uname('n') : 'localhost';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
function set_custom_template($template_path, $template_name, $fallback_template_path = false)
|
||||
{
|
||||
global $phpbb_root_path, $user;
|
||||
|
||||
@@ -102,8 +102,25 @@ class template
|
||||
|
||||
$this->root = $template_path;
|
||||
$this->cachepath = $phpbb_root_path . 'cache/ctpl_' . str_replace('_', '-', $template_name) . '_';
|
||||
$user->theme['template_storedb'] = false;
|
||||
$user->theme['template_inherits_id'] = false;
|
||||
|
||||
if ($fallback_template_path !== 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];
|
||||
|
||||
@@ -147,6 +164,7 @@ class template
|
||||
function destroy()
|
||||
{
|
||||
$this->_tpldata = array('.' => array(0 => array()));
|
||||
$this->_rootref = &$this->_tpldata['.'][0];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -243,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)
|
||||
|
@@ -708,7 +708,6 @@ class ucp_groups
|
||||
'S_UPLOAD_AVATAR_FILE' => ($config['allow_avatar'] && $config['allow_avatar_upload'] && $can_upload) ? true : false,
|
||||
'S_UPLOAD_AVATAR_URL' => ($config['allow_avatar'] && $config['allow_avatar_remote_upload'] && $can_upload) ? true : false,
|
||||
'S_LINK_AVATAR' => ($config['allow_avatar'] && $config['allow_avatar_remote']) ? true : false,
|
||||
'S_DISPLAY_GALLERY' => ($config['allow_avatar'] && $config['allow_avatar_local']) ? true : false,
|
||||
|
||||
'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
|
||||
'GROUP_RECEIVE_PM' => (isset($group_row['group_receive_pm']) && $group_row['group_receive_pm']) ? ' checked="checked"' : '',
|
||||
|
@@ -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';
|
||||
|
@@ -669,22 +669,7 @@ function compose_pm($id, $mode, $action)
|
||||
}
|
||||
|
||||
// Parse Attachments - before checksum is calculated
|
||||
if ($action == 'edit')
|
||||
{
|
||||
$message_parser->parse_attachments('fileupload', $action, 0, $submit, $preview, $refresh, true, $msg_id);
|
||||
if (sizeof($message_parser->attachment_data))
|
||||
{
|
||||
// Update attachment indicators for pms having attachments now, as a precaution if the pm does not get stored by submit
|
||||
$sql = 'UPDATE ' . PRIVMSGS_TABLE . '
|
||||
SET message_attachment = 1
|
||||
WHERE msg_id = ' . $msg_id;
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$message_parser->parse_attachments('fileupload', $action, 0, $submit, $preview, $refresh, true);
|
||||
}
|
||||
$message_parser->parse_attachments('fileupload', $action, 0, $submit, $preview, $refresh, true);
|
||||
|
||||
if (sizeof($message_parser->warn_msg) && !($remove_u || $remove_g || $add_to || $add_bcc))
|
||||
{
|
||||
@@ -782,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);
|
||||
}
|
||||
@@ -826,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';
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user